Skip to main content

Crate fxrs_core

Crate fxrs_core 

Source
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.
AgentOptions
AgentRequest
AgentResult
ApprovalRequest
ChatMessage
Provider-neutral message. Optional fields are role-dependent but remain in one type so gateways can project them without lossy intermediate formats.
CommandReview
ContextProjection
DeterministicContextProjector
FileChangeReview
Host-neutral material needed to review a file mutation.
GatewayRequest
GatewayResponse
MemoryReadEvidenceStore
Minimal in-process store used by the native CLI and tests.
ModelContextLimits
NeverCancelled
PermissionEngine
Pure permission policy shared by interactive, noninteractive, and ACP hosts.
PermissionRequest
PermissionRule
PreparedToolCall
ReadEvidence
Evidence captured when a model-visible file read succeeds.
SafeRetryGateway
Provider-neutral retry boundary for requests proven not to have been sent.
ScopedProjectContextError
Session
SessionPreferences
SessionSummary
StaticApprovalHandler
StoredToolResult
ToolAdvertisement
ToolCall
Stable tool-call representation shared by gateways, sessions, and tools.
ToolContext
ToolLimits
ToolOutput
ToolRegistry
ToolResultMatch
ToolResultPage
Usage

Enums§

AgentError
AgentEvent
AgentStopReason
ApprovalDecision
ApprovalError
ApprovalKind
CachePolicy
FinishReason
GatewayError
GatewayEvent
PermissionAction
PermissionDecision
PermissionMode
RegistryError
Role
A provider-neutral conversation role.
SandboxMode
Host execution isolation selected before a tool is prepared.
SessionStoreError
SessionTarget
ToolAdvertisementKind
How a provider should project a tool advertisement on its wire protocol.
ToolArgumentIntegrity
Integrity of the exact tool arguments received from a provider.
ToolChoice
ToolEffect
ToolError
ToolExecutionProvenance
Origin of a tool result. Provider-executed calls are never dispatched again by the local runtime.
ToolPreparation
ToolResultStoreError
ToolReview

Constants§

DEFAULT_HISTORY_CONTEXT_TOKENS
LARGE_TOOL_RESULT_BYTES
TOOL_RESULT_DEFAULT_READ_BYTES
TOOL_RESULT_MAX_READ_BYTES
TOOL_RESULT_PREVIEW_BYTES

Traits§

AgentEventSink
ApprovalHandler
CancellationSignal
Executor-neutral cooperative cancellation shared by agent and tool hosts.
ContextProjector
Projects durable conversation state into one bounded provider request. Canonical history remains untouched for storage, replay, and audit.
Gateway
Provider boundary for model streaming.
GatewayEventSink
PreparedToolAction
An approved action that can be consumed exactly once.
ReadEvidenceStore
Session-scoped read evidence port.
ScopedProjectContextProvider
Stateful session boundary for discovering project instructions that apply to concrete structured tool targets.
SessionStore
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.
ToolResultStore
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.
ContentHash
SHA-256 digest used by the original implementation for file snapshots.