Expand description
Transport-independent contracts for session and isolated agent execution. Implementations own provider routing and resource cleanup; hosts own scheduling.
Structs§
- Activity
Event - A bounded display snapshot of one observed provider operation.
- Activity
Facts - Structured facts about one operation, each present only when the provider reports it. Text fields are bounded single lines.
- Agent
Definition Prompt - Agent prompt state prepared for one provider turn.
- ApiEquivalent
Cost - What usage billed to a subscription plan would cost at the provider’s API list prices. It is no charge: the plan bills a flat fee.
- Context
Fill - How full a model’s context window was, measured by the reported input tokens of its requests, cache included.
- Cost
Estimate - Estimated cost of some usage: the charge of metered usage and the API equivalent of plan-billed usage, kept apart so an API equivalent is never summed into a charge. An estimate always holds at least one of them; usage with no price has no estimate. Provider bills stay authoritative.
- Diff
Stat - Lines a file change added and removed.
- Execution
Policy - Worker-selected harness controls, retained across retries and repairs. Defaults inherit the harness configuration. Adapters must reject explicit controls they cannot enforce rather than silently ignoring them.
- Line
Range - One-based line range of a file read.
- Model
Usage - Tokens and estimated charge of one model within one turn or isolated prompt.
- OneShot
Error - Typed failure returned by
OneShotClientsubmissions. - OneShot
Request - Input payload for one isolated prompt that prefers structured protocol output.
- OneShot
Submission - Parsed result returned by one isolated prompt execution.
- Priced
Cost - One priced amount in integer micro-USD, one millionth of a US dollar.
- Provider
Call Budget - A shared limit on underlying provider turns across cloned requests.
- Session
Ref - Opaque reference to an active agent session.
- Session
Stats - Diff statistics of one session worktree. Token usage is recorded
separately as
crate::TurnUsage. - Start
Session Request - Input payload for initiating a new agent session.
- Turn
Continuation - Continuation state for one provider-agnostic agent turn.
- Turn
Continuation Parts - Owned continuation inputs consumed by a runtime adapter.
- Turn
Request - Input payload for one provider-agnostic agent turn.
- Turn
Result - Normalized result returned when one agent turn completes successfully.
- Turn
Usage - Usage of every model one turn or isolated prompt used.
- Usage
Checkpoint - Cumulative usage totals an agent reported for the most recent
conversation in
folder, which a later run there continues.
Enums§
- Activity
Failure - Why an operation failed.
- Activity
Kind - Category of explicitly observed activity.
- Activity
Status - Lifecycle state for an observed operation.
- Agent
Definition Prompt Update - Agent change for a provider-managed conversation or retained native history.
- Agent
Error - Typed error returned by
AgentChanneloperations. - Agent
Request Kind - Turn initiation mode for
TurnRequest. - Context
Compaction - How a turn handles a session context that outgrows the model’s window.
- Cost
Basis - Where the prices of a
PricedCostcame from. - Host
Cache Sharing - Which dependency caches (Cargo, Go, pip, npm) sandboxed harness commands use.
- McpPolicy
- MCP configuration inheritance at harness startup.
- Output
Event - One change to the model output an agent streams while its turn runs.
- Output
Kind - What one streamed output item holds.
- Permission
Mode - Supported permission mode values for agent execution workflows.
- Plan
Login - Subscription login that bills usage a flat fee, whose priced figure is therefore only an API equivalent.
- Reasoning
Level - Supported reasoning-effort levels for task execution.
- Response
Style - Preferred amount of detail in user-facing session responses.
- Session
Diff State - Known availability of a session worktree diff.
- Speed
Mode - Response-speed preference applied to one agent session.
- Tool
Policy - Provider-native built-in tool names. Filesystem permission modes remain an independent restriction; these settings cannot relax a read-only turn.
- Turn
Event - Incremental event emitted during one agent turn.
- Turn
Notice - Something about how a turn ran that the user should know, reported at most once per occurrence while the turn runs. Hosts show it in the session transcript beside the turn’s answer.
- Usage
Purpose - Work an invocation’s usage is recorded under, so utility work stays distinguishable from session turns.
Traits§
- Agent
Channel - Provider-agnostic session channel for executing agent turns.
- Live
Transcript - Live transcript projection used when a provider runtime needs replay text.
- OneShot
Client - Provider-neutral boundary for isolated structured agent prompts.
- Provider
Call Ledger - Observes every change to one shared provider-call pool, so a host can persist spending across process restarts.
Functions§
- is_
input_ size_ error - Reports whether a provider rejected the size of an input or context window.
- normalize_
instruction_ conversation_ id - Normalizes one provider-native conversation id for persisted bootstrap reuse tracking.
Type Aliases§
- Agent
Future - Boxed async result used by
AgentChanneltrait methods.