Expand description
Fundamental types: Role / Verb / RoleVerbGate / CapToken / IDs.
Structs§
- CapToken
- Capability token.
max_usespicks between OneTime / Session / Limited. - IdParse
Error - Error returned when an ID string does not carry the expected prefix.
- Role
Verb Gate - Role × Verb gate table. Const-style storage.
- RunId
- Opaque run identifier, e.g.
R-<hex>. OneRunIdnames one kick of aTaskId— minted server-side when a task is started, propagated through the engine ctx to every wire frame so steps, workers, and outputs correlate back to the run. - Session
Id - Opaque session identifier, e.g.
S-<hex>. SeeStepIdfor the newtype rationale. - StepId
- Opaque per-step identifier, e.g.
ST-<hex>. Newtype overStringso step, session, and worker ids can’t be swapped by accident at call sites. - TaskId
- Opaque work-item identifier, e.g.
T-<hex>. OneTaskIdnames one unit of work (“resolve issue #10” + a Blueprint ref + input ctx), persisted in the task store. A task can be kicked N times; each kick is aRunId. - Token
Signer - Server-side machinery for minting and verifying tokens.
- Worker
Id - Opaque worker identifier, e.g.
W-<hex>. SeeStepIdfor the newtype rationale. - Worker
Payload - Response body for
HTTP /v1/worker/prompt— the shape that lets a SubAgent pull its task input in a single round-trip.
Enums§
- CapToken
Decode Error - Error returned when
CapToken::decodefails. - Role
- The four participant roles in the swarm. Every
Verba caller wants to invoke must be allow-listed for its role in aRoleVerbGate. - Verb
- Every action a participant can request. Grouped by the
Rolethat typically performs it (see the// operator/// worker/ … section comments below); the grouping is documentation only — actual authorization is decided byRoleVerbGate::is_allowed.
Constants§
- OBSERVER_
VERBS - Verbs an Observer may invoke — strictly read-only (event subscription and trace/state reads, no mutation).
- OPERATOR_
VERBS - Verbs an Operator may invoke — covers task lifecycle, session, and senior interactions.
- SENIOR_
VERBS - Verbs a Senior may invoke — human/oversight actions: answering queries, overriding verdicts, and pausing/resuming/injecting into the dispatch loop.
- WORKER_
LEAF_ VERBS - The Worker verbs shared across all workers — the minimum a leaf
needs, with no sub-task spawning. If we introduce
Role::WorkerLeafin the future, that role gets allowed against this slice. - WORKER_
SWARM_ VERBS - Worker verbs for recursive swarming: sub-task spawn and
observation. When
Role::WorkerSwarmsplits out in the future, that role gets allowed againstWORKER_LEAF_VERBSplus this slice. The safety valves areEngineCfg.max_spawn_depthtoday, and a task-ownership gate down the line.
Functions§
- ct_eq
- Constant-time byte-slice equality (XOR accumulate). Public so bearer
comparisons outside this module (e.g. the operator login token check)
can avoid the timing side channel of
==. - default_
role_ verb_ table - The default Role × Verb table.
- secure_
hex - OS-RNG hex, safe for bearer credentials.
- token_
fingerprint - Hex SHA-256 of a token nonce / bearer string — the lookup-key shape
used by
CapToken::fingerprint. Standalone so callers holding only the bearer string (not a decoded token) can derive the same key. - uid_hex
- In-process-unique, restart-decorrelated hex id.