Expand description
Platform-neutral contracts and orchestration for fx.
This crate intentionally performs no filesystem, terminal, process, or network I/O. The ACP composition root and test hosts implement the ports declared here and share the same agent semantics.
Structs§
- Agent
- Provider-neutral agent orchestration.
- Agent
Options - Agent
Request - Agent
Result - Approval
Request - Chat
Message - Provider-neutral message. Optional fields are role-dependent but remain in one type so gateways can project them without lossy intermediate formats.
- Command
Review - Context
Projection - Deterministic
Context Projector - File
Change Review - Host-neutral material needed to review a file mutation.
- Gateway
Request - Gateway
Response - Memory
Read Evidence Store - Minimal in-process store used by the native CLI and tests.
- Model
Context Limits - Never
Cancelled - Permission
Engine - Pure permission policy shared by interactive, noninteractive, and ACP hosts.
- Permission
Request - Permission
Rule - Prepared
Tool Call - Read
Evidence - Evidence captured when a model-visible file read succeeds.
- Safe
Retry Gateway - Provider-neutral retry boundary for requests proven not to have been sent.
- Scoped
Project Context Error - Session
- Session
Preferences - Session
Summary - Static
Approval Handler - Stored
Tool Result - Tool
Advertisement - Tool
Call - Stable tool-call representation shared by gateways, sessions, and tools.
- Tool
Context - Tool
Limits - Tool
Output - Tool
Registry - Tool
Result Match - Tool
Result Page - Usage
Enums§
- Agent
Error - Agent
Event - Agent
Stop Reason - Approval
Decision - Approval
Error - Approval
Kind - Cache
Policy - Finish
Reason - Gateway
Error - Gateway
Event - Permission
Action - Permission
Decision - Permission
Mode - Registry
Error - Role
- A provider-neutral conversation role.
- Sandbox
Mode - Host execution isolation selected before a tool is prepared.
- Session
Store Error - Session
Target - Tool
Advertisement Kind - How a provider should project a tool advertisement on its wire protocol.
- Tool
Argument Integrity - Integrity of the exact tool arguments received from a provider.
- Tool
Choice - Tool
Effect - Tool
Error - Tool
Execution Provenance - Origin of a tool result. Provider-executed calls are never dispatched again by the local runtime.
- Tool
Preparation - Tool
Result Store Error - Tool
Review
Constants§
- DEFAULT_
HISTORY_ CONTEXT_ TOKENS - LARGE_
TOOL_ RESULT_ BYTES - TOOL_
RESULT_ DEFAULT_ READ_ BYTES - TOOL_
RESULT_ MAX_ READ_ BYTES - TOOL_
RESULT_ PREVIEW_ BYTES
Traits§
- Agent
Event Sink - Approval
Handler - Cancellation
Signal - Executor-neutral cooperative cancellation shared by agent and tool hosts.
- Context
Projector - Projects durable conversation state into one bounded provider request. Canonical history remains untouched for storage, replay, and audit.
- Gateway
- Provider boundary for model streaming.
- Gateway
Event Sink - Prepared
Tool Action - An approved action that can be consumed exactly once.
- Read
Evidence Store - Session-scoped read evidence port.
- Scoped
Project Context Provider - Stateful session boundary for discovering project instructions that apply to concrete structured tool targets.
- Session
Store - Durable session port. Implementations must commit atomically and preserve the previous readable state when a write fails.
- Tool
- Runtime-extensible tool contract. Validation, effect classification, and execution stay together so registry metadata cannot drift from behavior.
- Tool
Result Store - Session-scoped durable storage for complete textual tool results.
Functions§
- estimate_
messages_ tokens - estimate_
text_ tokens - redact_
secrets - Masks common credential assignments and token formats before text reaches a model, protocol notification, or durable tool-result sidecar.
Type Aliases§
- BoxFuture
- Boxed future used by object-safe asynchronous ports.
- Content
Hash - SHA-256 digest used by the original implementation for file snapshots.