Skip to content

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.

An m.room.message whose content carries suite_event_type: "dev.agentpod.permission.answer.v2".

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

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"
}
}

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)