Expand description
Agent backend transports and provider-neutral contracts.
This crate owns the agent execution boundary used by Agentty: provider
model metadata, turn prompt payloads, CLI/app-server transports, and
channel contracts. It intentionally avoids depending on the agentty
application crate so provider-specific dependencies compile in a leaf
workspace member.
Structs§
- Agent
CliInfo - One locally runnable agent CLI and the installed version refreshed at startup.
- Agent
Selection - Session-level agent selection that keeps provider kind and model together.
- AppServer
Turn Request - Input payload for one app-server turn execution.
- AppServer
Turn Response - Normalized result for one app-server turn.
- Build
Command Request - Request payload used to build provider transport commands.
- OneShot
Request - Input payload for one isolated prompt that prefers structured protocol output.
- OneShot
Submission - Parsed result returned by one isolated prompt execution.
- Real
Agent Availability Probe - Production availability probe backed by
PATHexecutable discovery. - Session
Ref - Opaque reference to an active agent session.
- Session
Stats - Token and diff usage statistics associated with one agent session or isolated prompt.
- Start
Session Request - Input payload for initiating a new agent session.
- Static
Agent Availability Probe - Availability probe that returns one caller-provided snapshot.
- Turn
Request - Input payload for one provider-agnostic agent turn.
- Turn
Result - Normalized result returned when one agent turn completes successfully.
Enums§
- Agent
Backend Error - Error type for backend setup and command construction failures.
- Agent
CliVersion - Automatic update and version probe state for one locally runnable agent CLI.
- Agent
Error - Typed error returned by
AgentChanneloperations. - Agent
Kind - Supported agent provider families.
- Agent
Model - Supported agent model names across all providers.
- Agent
Request Kind - Turn initiation mode for
TurnRequest. - Agent
Transport - Transport runtime used to execute turns for one backend.
- AppServer
Error - Typed error returned by app-server infrastructure operations.
- AppServer
Stream Event - Incremental event emitted during one app-server turn.
- Permission
Mode - Supported permission mode values for agent execution workflows.
- Reasoning
Level - Supported reasoning-effort levels for task execution.
- Turn
Event - Incremental event emitted during one agent turn.
Traits§
- Agent
Availability Probe - Detects which provider CLIs are locally runnable on the current machine.
- Agent
Backend - Builds and configures external agent CLI commands.
- Agent
Channel - Provider-agnostic session channel for executing agent turns.
- Agent
Selection Metadata - Human-readable metadata for slash-menu selectable items.
- AppServer
Client - Persistent app-server session boundary used by session workers.
- Live
Transcript - Live transcript projection used when a provider runtime needs replay text.
Functions§
- cleanup_
session_ worktree_ artifacts - Removes provider-owned worktree artifacts derived from one session folder.
- create_
agent_ channel - Creates the provider-specific channel for the given agent kind.
- create_
app_ server_ client - Returns the app-server client for the selected provider when applicable.
- create_
backend - Creates the backend implementation for the selected agent provider.
- diff_
fence - Builds a Markdown code-fence delimiter long enough to safely wrap an arbitrary prompt payload.
- executable_
name - Returns the CLI executable name used by the provided agent kind.
- normalize_
instruction_ conversation_ id - Normalizes one provider-native conversation id for persisted bootstrap reuse tracking.
- parse_
persisted_ session_ agent_ model - Parses one persisted session agent/model pair without deriving the agent from the model when the saved agent kind is available.
- resolve_
agent_ kind_ for_ model - Resolves a provider kind that can run
modelfrom the available provider list. - resolve_
agent_ selection_ for_ model - Resolves an
AgentSelectionfor a model-only setting. - resolve_
model_ for_ available_ agent_ kinds - Resolves one model against the currently available agent kinds.
- resolve_
prompt_ model_ agent_ kind - Resolves the agent kind used for prompt-side
/modelselection. - selectable_
models_ for_ agent_ kinds - Returns all selectable models owned by the provided agent kinds in stable settings and slash-menu order.
- submit_
one_ shot - Executes one isolated prompt and returns the parsed response.
- submit_
one_ shot_ with_ app_ server_ client - Executes one isolated prompt through the shared app-server transport.
- submit_
one_ shot_ with_ backend - Executes one isolated prompt using the provided backend.
- transport_
mode - Returns transport mode for the selected provider.
Type Aliases§
- Agent
Future - Boxed async result used by
AgentChanneltrait methods. - AppServer
Future - Boxed async result used by
AppServerClienttrait methods.