dev.superpipeline.question.answer.v2
A person’s structured answer to a question.v2: the question’s id, an option id or free text (or both, for an option that asks for input), an m.reference to the question’s message, and on a subject-bound question the binding copied from what the person saw. 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.superpipeline.question.answer.v2".
Who sends it, who reads it
Section titled “Who sends it, who reads it”- Sent by SuperMessage.
- Read by AgentPod, SuperExchange.
The carrier is whichever service carries the board’s chat: AgentPod’s hub, or SuperExchange for a board that has moved to it.
Fields
Section titled “Fields”| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
msgtype |
"m.text" |
yes | ||
body |
string | yes | ||
schema_version |
integer | no | at least 1 | |
suite_event_type |
"dev.superpipeline.question.answer.v2" |
yes | ||
elicitation_id |
string | yes | at least 1 character; at most 200 characters | |
option_id |
string | no | at least 1 character | |
text |
string | no | at most 16000 characters | |
subject |
object | no | ||
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 |
The schema also states these rules across fields, as written:
{ "anyOf": [ { "required": [ "option_id" ] }, { "required": [ "text" ], "properties": { "text": { "pattern": "\\S" } } } ]}Example
Section titled “Example”From fixtures/matrix-events/examples.json, case “an option the question offered”:
{ "msgtype": "m.text", "body": "Run the tests", "schema_version": 1, "suite_event_type": "dev.superpipeline.question.answer.v2", "elicitation_id": "elc_7f3c", "option_id": "run_them", "m.relates_to": { "rel_type": "m.reference", "event_id": "$questionEventId" }}The corpus has 7 valid cases in all:
the option that asks for text, with its text
{ "msgtype": "m.text", "body": "Something else: run only the unit tests", "schema_version": 1, "suite_event_type": "dev.superpipeline.question.answer.v2", "elicitation_id": "elc_7f3c", "option_id": "other", "m.relates_to": { "rel_type": "m.reference", "event_id": "$questionEventId" }, "text": "Run only the unit tests"}a free-text answer to a question with no options
{ "msgtype": "m.text", "body": "main", "schema_version": 1, "suite_event_type": "dev.superpipeline.question.answer.v2", "elicitation_id": "elc_8a21", "m.relates_to": { "rel_type": "m.reference", "event_id": "$questionEventId" }, "text": "main"}subject-bound: an approval carrying the binding
{ "msgtype": "m.text", "body": "Approve", "schema_version": 1, "suite_event_type": "dev.superpipeline.question.answer.v2", "elicitation_id": "elc_9b44", "option_id": "approve", "subject": { "id": "8f9a0d0e-4b2a-4c1e-9c55-1a2b3c4d5e6f", "digest": "0588c96c7eff47e1a83d9fc1d0ecda3cc3b72e559a5c402bb9da29d9851dbceb" }, "m.relates_to": { "rel_type": "m.reference", "event_id": "$questionEventId" }}subject-bound: a decline carrying the binding
{ "msgtype": "m.text", "body": "Deny", "schema_version": 1, "suite_event_type": "dev.superpipeline.question.answer.v2", "elicitation_id": "elc_9b44", "option_id": "deny", "subject": { "id": "8f9a0d0e-4b2a-4c1e-9c55-1a2b3c4d5e6f", "digest": "0588c96c7eff47e1a83d9fc1d0ecda3cc3b72e559a5c402bb9da29d9851dbceb" }, "m.relates_to": { "rel_type": "m.reference", "event_id": "$questionEventId" }}approval-request: allow once, bound
{ "msgtype": "m.text", "body": "Allow once", "suite_event_type": "dev.superpipeline.question.answer.v2", "elicitation_id": "apr_5d2e9c41", "option_id": "allow_once", "subject": { "id": "stkreq_8f2c", "digest": "sha256:4be1c0de9a7f30b2" }, "m.relates_to": { "rel_type": "m.reference", "event_id": "$aprEventId" }}approval-request: deny, bound
{ "msgtype": "m.text", "body": "Deny", "suite_event_type": "dev.superpipeline.question.answer.v2", "elicitation_id": "apr_5d2e9c41", "option_id": "deny", "subject": { "id": "stkreq_8f2c", "digest": "sha256:4be1c0de9a7f30b2" }, "m.relates_to": { "rel_type": "m.reference", "event_id": "$aprEventId" }}Refused
Section titled “Refused”Each of these must fail. The corpus says why:
- an option the question did not offer (refused by
recorded) - the option whose input is required, with no text (refused by
recorded) - an empty free-text answer (refused by
schema) - a free-text answer over the question’s limit (refused by
recorded) - no m.relates_to, exactly as for a gate decision (refused by
schema) - subject-bound: an approval with no binding (refused by
recorded) - subject-bound: a binding whose digest is not the question’s (refused by
recorded) - subject-bound: a decline whose binding names another subject (refused by
recorded) - approval-request: allow once with no binding (refused by
recorded) - approval-request: allow once bound to another digest (refused by
recorded) - approval-request: allow always, which is never offered (refused by
recorded) - approval-request: a reference to another message (refused by
recorded)
Source
Section titled “Source”- Schema:
schemas/matrix/dev.superpipeline.question.answer.v2.json - In the package:
import schema from "@superjackfruitlabs/treaty-matrix-events/schemas/dev.superpipeline.question.answer.v2.json" with { type: "json" };