dev.agentpod.permission.outcome.v1
The receipt that closes a permission card: selected (with the option), expired or cancelled, referencing the prose message. decided_by is a label, never an mxid. Readers ignore properties they do not know.
How it rides
Section titled “How it rides”Content that carries suite_event_type: "dev.agentpod.permission.outcome.v1".
Who sends it, who reads it
Section titled “Who sends it, who reads it”- Sent by AgentPod.
- Read by SuperMessage.
Fields
Section titled “Fields”| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
suite_event_type |
"dev.agentpod.permission.outcome.v1" |
yes | ||
request_id |
string | yes | at least 1 character | |
session_id |
string | yes | at least 1 character | |
request_seq |
integer | yes | at least 0 | |
outcome |
one of "selected", "expired", "cancelled" |
yes | ||
option_id |
string or null | yes | ||
decided_by |
string or null | yes | ||
m.relates_to |
object | yes | ||
m.relates_to.rel_type |
"m.reference" |
yes | ||
m.relates_to.event_id |
string | yes | at least 1 character |
The schema also states these rules across fields, as written:
{ "allOf": [ { "if": { "properties": { "outcome": { "const": "selected" } } }, "then": { "properties": { "option_id": { "type": "string", "minLength": 1 } } }, "else": { "properties": { "option_id": { "type": "null" }, "decided_by": { "type": "null" } } } } ]}Example
Section titled “Example”From fixtures/matrix-events/examples.json, case “answered from the room”:
{ "suite_event_type": "dev.agentpod.permission.outcome.v1", "request_id": "acps_3f0c:12", "session_id": "acps_3f0c", "request_seq": 12, "outcome": "selected", "option_id": "allow_once", "decided_by": "fixture-person", "m.relates_to": { "rel_type": "m.reference", "event_id": "$permissionEventId" }}The corpus has 3 valid cases in all:
expired unanswered
{ "suite_event_type": "dev.agentpod.permission.outcome.v1", "request_id": "acps_3f0c:12", "session_id": "acps_3f0c", "request_seq": 12, "outcome": "expired", "option_id": null, "decided_by": null, "m.relates_to": { "rel_type": "m.reference", "event_id": "$permissionEventId" }}built: an option selected
{ "suite_event_type": "dev.agentpod.permission.outcome.v1", "request_id": "acps_1:4", "session_id": "acps_1", "request_seq": 4, "outcome": "selected", "option_id": "allow", "decided_by": "rakesh", "m.relates_to": { "rel_type": "m.reference", "event_id": "$prose" }}Refused
Section titled “Refused”Each of these must fail. The corpus says why:
- no m.relates_to. A client cannot tell which card to close. (refused by
schema) - an outcome outside selected | expired | cancelled (refused by
schema)
Source
Section titled “Source”- Schema:
schemas/matrix/dev.agentpod.permission.outcome.v1.json - In the package:
import schema from "@superjackfruitlabs/treaty-matrix-events/schemas/dev.agentpod.permission.outcome.v1.json" with { type: "json" };