Requests and Responses
Read this if: you need the interaction model for typed protocol operations and retries.
Skip this if: you need only the protocol overview; start with Protocol.
Go deeper: Handshake, Contracts, Events.
Requests are typed operations initiated by a gateway, client, or node peer. Responses are typed replies correlated by request_id.
The wire shapes are defined by shared versioned contracts, not by prose examples.
Request/response model
Request envelope:
request_idtypepayload- optional
trace
Response envelope:
request_idtypeokresultwhen successfulerrorwhen unsuccessful
The architectural point is correlation and retry safety: one logical action should remain interpretable even when transport visibility is imperfect.
Common request families
- handshake:
connect.init,connect.proof - operator interaction:
conversation.send,approval.list,approval.resolve - workflow control:
workflow.start,workflow.resume,workflow.cancel - pairing and node readiness:
pairing.approve,pairing.deny,capability.ready - execution and evidence:
task.execute,attempt.evidence - health:
ping
Error model
Prefer explicit typed errors over vague strings:
contract_errorunauthorized/forbiddennot_foundrate_limitedinternal
That error vocabulary is part of the contract boundary and should stay consistent across handlers.
Retry and idempotency
Tyrum treats retries as normal:
- transport retry: a peer can resend the same logical request with the same
request_idwhen it did not observe a response - side-effect idempotency: state-changing operations may also carry or derive an
idempotency_keyso retries do not duplicate outcomes
approval.resolve as the reference example
- the approval row transitions atomically from pending to a terminal state
- only the first successful resolution enqueues resume/cancel work
- duplicate resolve attempts for an already-resolved approval do not enqueue more side effects
- downstream
approval.updatedremains at-least-once, so consumers still dedupe byevent_id