Skip to main content

Module run_control

Module run_control 

Source
Expand description

Typed, cooperative control for an in-flight Code run.

A run is deliberately controlled through a small per-run inbox instead of mutating loop state from the host thread. This keeps the execution loop as the sole owner of its transcript while still allowing an embedding host to steer or interrupt work at well-defined safe points. The wire types in this module are also used by the language SDKs and can be persisted by a host without depending on Rust internals.

Structs§

InterruptRequest
Convenience input for crate::AgentSession::interrupt.
RunControlErrorInfo
Machine-readable rejection/settlement detail.
RunControlReceipt
Durable, idempotent acknowledgement for a control request.
RunControlRequest
Versioned request accepted by a run-control inbox.
RunControlSnapshot
Read-only state exposed to SDK/UI clients for optimistic concurrency.
SteerRequest
Convenience input for crate::AgentSession::steer.

Enums§

RunControlCommand
A typed control command.
RunControlError
Errors returned before a control is accepted.
RunControlOperation
The operation requested by a host.
RunControlReceiptState
Receipt state returned by the host boundary.

Constants§

RUN_CONTROL_MAX_ID_BYTES
Maximum size of an externally supplied identifier.
RUN_CONTROL_MAX_INPUT_BYTES
Maximum UTF-8 bytes accepted for a single steer message.
RUN_CONTROL_MAX_QUEUE
Maximum number of controls waiting at one run safe point.
RUN_CONTROL_MAX_REASON_BYTES
Maximum UTF-8 bytes accepted for an interrupt reason.
RUN_CONTROL_MAX_SEEN_REQUESTS
Number of request receipts retained for idempotent retries.
RUN_CONTROL_RECEIPT_SCHEMA_V1
Schema carried by a run-control receipt.
RUN_CONTROL_REQUEST_SCHEMA_V1
Schema carried by a run-control request.