Skip to content

External-origin interaction contract candidate

This standalone module defines strict request, projection and result parsers for the accepted R1a interaction.create, interaction.list, interaction.show, interaction.respond, and interaction.cancel slice. The package root now exports these contracts, and the canonical local-node request/result and receipt/exposure registries include all five methods. Public SDK bindings, Node Effect storage/control handlers and CLI commands exist as source candidates. Node rejects Invocation attachments before touching storage or identity services. Schema v37 supplies immutable creation/resolution tables, verified with disposable SQLite including close/reopen replay. Desktop projections, built-Node/native dogfood and independent acceptance remain unfinished.

Creation has separate question and selection variants. Selection options are frozen per-interaction tokens, not resource identifiers. yes and no carry no execution authority. Text remains literal data. Bodies and answers preserve LF, CRLF and tabs while rejecting terminal controls and bare carriage returns; their UTF-8 byte bounds remain 4 KiB and 16 KiB respectively. Subjects and option labels are single-line, including denial of Unicode line/paragraph separators. Objects reject unknown fields, including caller-supplied actor, activation, proof and executable UI fields.

Node derives the authenticated operator actor, checks exact existing idle Session and Project ownership/revision, and freezes activationId: null and wakeDisposition: record-only in results. The origin label is not evidence of client identity. Future timestamps, signed scoped pagination, expiry, option membership, answer-kind matching, CAS, immutable command replay, confidentiality and human-only authorization remain Node responsibilities, not schema guarantees.

The accepted external-origin create result is an ordinary accepted mutation with its receipt. It is distinct from the future activation-bound model-tool blocked envelope described in older architecture examples. Generic answers never confirm operations, issue grants or wake Sessions.

Interaction is the answer-free maia.interaction/v1 projection used in list, create and cancel results. InteractionDetail requires complete answer, response-digest and same-principal responder fields when answered, and rejects those fields in other states. Frozen kind/token membership, timestamp order, revision 1 for pending/projected expiry, and revision 2 for the single terminal answer/cancellation are checked. These checks establish structural consistency, not identity, clock truth, digest authenticity or execution authority.

Mutation results reuse the existing command-receipt schema. Actor, command, method, target, revision and immutable event times must agree. Create returns the original pending projection; later reads do not change that receipt. Show/respond can contain the authorized answer, while list/create/cancel cannot. List results echo exact Project/Session scope, contain unique IDs, and carry an opaque next cursor only with a nonempty page. Every result has a 64 KiB encoded ceiling, including list pages with a nominal limit of up to 100 rows. Node must stop a page before its byte bound and bind cursor snapshots to actor and scope.

The read-only portfolio handoff is cleared. The coordinator owns direct integration under the existing interaction task. The Node implementation bounds pending and retained growth, projects expiry without writes, and invalidates signed pages when their scoped collection changes. SDK mutation callers must reconcile the same command ID after an unverified acknowledgement. Desktop and current-artifact independent review remain required. Registry metadata classifies all five methods as human-only, not model tools; that metadata alone is not authorization. No activation, confirmation or UI authority is created here.

Imported from Maia OS docs at a2175bb