dev.agentpod.permission.answer.v2
A person’s answer to a permission.v2: the request’s id, an option id, the subject binding copied from what they saw, and an m.reference to the prose message. Readers ignore properties they do not know.
How it rides
Section titled “How it rides”An m.room.message whose content carries suite_event_type: "dev.agentpod.permission.answer.v2".
Who sends it, who reads it
Section titled “Who sends it, who reads it”- Sent by SuperMessage.
- Read by AgentPod.
Fields
Section titled “Fields”| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
msgtype |
"m.text" |
yes | ||
body |
string | yes | ||
schema_version |
integer | yes | at least 1 | |
suite_event_type |
"dev.agentpod.permission.answer.v2" |
yes | ||
request_id |
string | yes | at least 1 character; at most 600 characters | |
option_id |
string | yes | at least 1 character; at most 600 characters | |
subject |
object | yes | ||
subject.id |
string | yes | at least 1 character; at most 512 characters | |
subject.digest |
string | yes | at least 1 character; at most 512 characters | |
m.relates_to |
object | yes | ||
m.relates_to.rel_type |
"m.reference" |
yes | ||
m.relates_to.event_id |
string | yes | at least 1 character |
Example
Section titled “Example”From fixtures/matrix-events/examples.json, case “allow once”:
{ "msgtype": "m.text", "body": "Allow once", "schema_version": 1, "suite_event_type": "dev.agentpod.permission.answer.v2", "request_id": "acps_3f0c:12", "option_id": "allow_once", "subject": { "id": "acps_3f0c:12", "digest": "bb03bfd8ee6d757e6957d029cd6a7b8e004f16386755ce672e3f97f445563878" }, "m.relates_to": { "rel_type": "m.reference", "event_id": "$permissionEventId" }}The corpus has 2 valid cases in all:
reject once
{ "msgtype": "m.text", "body": "Reject", "schema_version": 1, "suite_event_type": "dev.agentpod.permission.answer.v2", "request_id": "acps_3f0c:12", "option_id": "reject_once", "subject": { "id": "acps_3f0c:12", "digest": "bb03bfd8ee6d757e6957d029cd6a7b8e004f16386755ce672e3f97f445563878" }, "m.relates_to": { "rel_type": "m.reference", "event_id": "$permissionEventId" }}Refused
Section titled “Refused”Each of these must fail. The corpus says why:
- a binding whose digest is not the request’s (refused by
recorded) - no binding (refused by
schema) - an option the request did not offer (refused by
recorded)
Source
Section titled “Source”- Schema:
schemas/matrix/dev.agentpod.permission.answer.v2.json - In the package:
import schema from "@superjackfruitlabs/treaty-matrix-events/schemas/dev.agentpod.permission.answer.v2.json" with { type: "json" };