Skip to main content

Module binding

Module binding 

Source
Available on crate feature computer-use only.
Expand description

Binds MCP responses back to the request that produced them. Binds every security-relevant MCP response back to what was actually asked for.

Typed deserialization proves shape, not provenance. ControlLease, TargetReservation, and ExecutionReceipt have no invariant-enforcing constructor, so a well-formed object belonging to another session, principal, or action deserializes cleanly and was accepted into graph state. The external runtime stays authoritative; this is the local check that makes a stale, confused, or mismatched response fail here rather than propagate.

Each validator compares one response against the envelope that requested it and reports the first mismatch by field name, so a rejection says what did not line up.

Functionsยง

validate_envelope_freshness
Verifies that an action envelope is inside its runtime-declared validity window.
validate_lease
Verifies a lease belongs to this session, principal, agent, and mode, and is usable.
validate_receipt
Verifies a receipt describes the action that was actually submitted.
validate_reservation
Verifies a reservation belongs to this action and is active, current, and target-bound.