Packages

Generic Elixir models and portable validation for RelayMark documents and manifests

Current section

Files

Jump to
relay_mark_elixir priv relaymark directives relay.action_row.json
Raw

priv/relaymark/directives/relay.action_row.json

{
"$schema": "../schemas/relaymark-directive.schema.json",
"name": "ActionRow",
"ast_type": "relay.action_row",
"version": 1,
"category": "relay_kit",
"description": "A reviewable Relay action proposal attached to document context.",
"attributes": {
"proposal_id": {
"type": "string",
"description": "Stable generator/client proposal id retained across edits and review decisions; distinct from both the AST block id and the host proposal record id."
},
"proposal_record_id": {
"type": "string",
"description": "Stable host record id used to address authorized review and undo actions; this is an identifier, not an authorization credential."
},
"proposal_revision": {
"type": "integer",
"description": "Positive proposal revision. Editing retains proposal_id and increments this value."
},
"action": {
"type": "string",
"required": true,
"description": "Durable Relay.Action.Registry id."
},
"target": {
"type": "string",
"description": "Target entity, event, note, task, or unresolved target reference."
},
"destination": {
"type": "string",
"description": "Optional destination surface or collection for the action."
},
"visibility": {
"type": "enum",
"values": ["private", "org", "unlisted", "public"],
"default": "private"
},
"review": {
"type": "enum",
"values": ["draft", "ready", "accepted", "rejected", "undone"],
"default": "draft"
},
"decision_id": {
"type": "string",
"description": "Stable id of the durable accept or reject decision. An undone accepted proposal retains its original accept decision id."
},
"execution_id": {
"type": "string",
"description": "Stable host execution id after an accepted proposal mutates durable state."
},
"undo_id": {
"type": "string",
"description": "Stable id of the durable undo operation after an accepted execution is undone."
},
"confidence": {
"type": "number",
"description": "Agent confidence from 0.0 to 1.0 when applicable."
},
"evidence": {
"type": "array",
"items": "string",
"description": "Block or source ids that ground the proposal."
},
"args": {
"type": "object",
"description": "Host-validated action arguments."
}
},
"children": {
"mode": "mixed",
"allowed_types": ["paragraph", "text", "relay.entity_ref"],
"min": 1
},
"validation": [
"action must resolve to a host Relay.Action.Registry id before execution",
"review must be draft or ready for agent-created blocks",
"accepted, rejected, and undone states may only be produced by host review flows",
"a lifecycle-aware proposal carries distinct proposal_id and proposal_record_id values, keeps both stable, starts proposal_revision at 1, and increments it on edit",
"accepted proposals require decision_id and execution_id",
"rejected proposals require decision_id and must not carry execution_id or undo_id",
"undone proposals retain the original accept decision_id and execution_id and require a distinct undo_id",
"opaque authorization credentials and executable undo tokens must not be embedded in RelayMark",
"evidence refs should resolve to known blocks or source manifest entries when present",
"visibility must be allowed by the current document and user scope"
],
"projections": {
"relay_kit": "ActionRow",
"html": "reviewable-action-card",
"plain_text": "action label and review state",
"manifest": ["actions"]
},
"policy": {
"requires_review": true,
"requires_evidence": false,
"allows_agent_creation": true,
"visibility_attribute": "visibility"
}
}