Skip to main content

Module coordination

Module coordination 

Source
Expand description

Multi-agent coordination opcodesMULTI_AGENT_PROTOCOL.md, Sentinel bytecode block 0x70–0x7F (the deontic ISA owns 0x50–0x53; this block is collision-free).

These govern the mechanical ingestion + evaluation of coordination nquins and execute atomically in the Sentinel VM. This module is the decidable core of the three opcodes — the expiry gate, the anti-usury resource contract + circuit breakers, and the fidelity/efficiency arithmetic — as deterministic, zero-heap, tested functions. The non-decidable substrate is passed in as a seam, never stubbed here:

  • 0x70 root-delegation signature verification → a verify closure the daemon backs with the key-vault Root Key (secure enclave);
  • 0x71 SuspendedTransactionQueue yield → the caller acts on CoordFault::InsufficientGlobalResources;
  • 0x72 VC minting to the Semantic Shared Context Graph → the caller writes the PerformanceRecord as an nquin; the privileged (daemon-only) gate is the caller’s.

Wiring an operand-stack execution path into webizen_bytecode (today a per-quin matcher) + the substrate above is the next increment; the semantics are fixed here.

Structs§

CoordContext
Host-provided seams the coordination VM cannot decide itself (the daemon backs these).
CoordOutcome
What a coordination program produced (besides the operand stack).
PerformanceRecord
The performance verdict minted by 0x72 — the inputs to the performance-VC nquin written to the Semantic Shared Context Graph.
ResourceContract
The live resource contract + hardware circuit breakers a granted task runs under (established by 0x71). Deterministic, zero-heap.

Enums§

CoordFault
Coordination-layer faults. Each dumps the current VM frame.
CoordVmError
Coordination VM faults.

Constants§

COORD_STACK_DEPTH
Operand-stack depth — fixed/bounded like the rest of the VM.
OP_AUTHORIZATION_GRANT
0x70 — verify cryptographic delegation Human-Root → ephemeral agent.
OP_PERFORMANCE_RATING
0x72 — privileged: mint the performance VC at task resolution (Sentinel daemon only).
OP_PUSH_U64
0x7F — push the next 8 little-endian bytes as a u64 operand.
OP_RESOURCE_DECLARATION
0x71 — declare the hard computational boundaries (anti-usury layer) for a task.
PRIORITY_BASE
Full compute priority of an unfaulted agent.
PRIORITY_FLOOR
Redemption floor — an honest agent decaying on fidelity faults never fully starves and can climb back. (Usury bypasses the floor: it quarantines to 0.)

Functions§

compute_priority
Darwinian compute priority from an agent’s recent record: usury_event0 (hard quarantine); otherwise PRIORITY_BASE × (1/2)^windowed_faults, clamped at PRIORITY_FLOOR.
eval_authorization_grant
0x70 OP_AUTHORIZATION_GRANT. Stack: [Agent_DID_Hash, Human_Root_DID_Hash, Metadata_Timestamp]. Pops the timestamp first (expiry gate), then verifies the delegation signature against the active Root Key (the verify_root_delegation seam).
eval_performance_rating
0x72 OP_PERFORMANCE_RATING (privileged). Stack: [Agent_DID_Hash, Declared_Tokens, Actual_Tokens_Burned, Validation_Boolean]. Computes fidelity + efficiency and flags usury. The VM then mints the VC nquin and pushes its hash; the daemon-only privilege gate is the caller’s (require_privileged).
eval_resource_declaration
0x71 OP_RESOURCE_DECLARATION. Stack: [Task_ID_Hash, Token_Ceiling, Max_Clock_Cycles]. Allocates the declared bounds to a fresh ResourceContract and arms its circuit breakers. Errors with InsufficientGlobalResources (→ yield to the SuspendedTransactionQueue) when the declared ceiling exceeds the daemon’s global allowance.
execute_coordination
Execute a coordination-ISA program against a fresh fixed-depth operand stack.
perf_vc_hash
Deterministic VC identity for a minted performance record — the nquin_hash 0x72 pushes to confirm minting. The host writes the full PerformanceRecord to the context graph.
require_privileged
Privilege gate for 0x72: only the Sentinel daemon may mint performance VCs.