Skip to main content

Crate oino_acp

Crate oino_acp 

Source
Expand description

oino-acp: Oino as an Agent Client Protocol v1 agent (oino --mode acp, modes.md §6).

The adapter sits on the in-process oino_client::InProcessBackend of one AgentSessionRuntime per ACP session — never on RPC JSON (research-acp §9.1) — and speaks ACP through the official agent-client-protocol SDK. Nothing else in the workspace sees ACP types.

§Method coverage

ACPOino
initializecapabilities of research-acp §5 (+ sessionCapabilities.fork), client caps recorded
authenticate, logoutaccepted (no auth methods: provider auth is extension-owned)
session/new, session/load (replay), session/resume, session/forkone runtime per session (SessionFactory)
session/list, session/close, session/deleteSessionManager listing, dispose, move to <agent>/trash/
session/prompt, session/cancelprompt (follow-up while streaming) resolved on agent_settled; abort
session/set_config_option, session/set_modemodel, thinking, queue modes, auto-compaction/retry; mode = thinking level
_oino/rpc, _oino/<command>any RPC command on the session’s backend

Agent → client: session/update (message/thought chunks, tool calls with kinds, locations, diffs and terminals, plans, usage, compaction, notices, commands, config, session info), session/request_permission (approval dialogs, confirm during a tool call), elicitation/create (select/input/editor/confirm/multiSelect), fs/* and terminal/* through AcpEnv, _oino/queue_update, _oino/run_state, _oino/extension_ui.

§API map

ModuleContents
agentAcpAgent: request dispatch, AgentInfo
factorySessionFactory, CoreSessionFactory, SessionDefaults
envAcpEnv: client-hosted files and terminals
clientClientLink, ClientCaps: typed agent → client calls
tools, convert, config, commands, uievent, prompt, config, slash-command and dialog mappings
errorAcpError

Re-exports§

pub use agent::AcpAgent;
pub use agent::AgentInfo;
pub use client::ClientCaps;
pub use env::AcpEnv;
pub use error::AcpError;
pub use factory::CoreSessionFactory;
pub use factory::ModelChoice;
pub use factory::ModelResolver;
pub use factory::SessionDefaults;
pub use factory::SessionFactory;
pub use factory::SessionRequest;

Modules§

agent
The ACP agent: request dispatch for initialize, session/* and _oino/* (modes §6.1, §6.2).
client
The agent’s view of the ACP client: capabilities and typed agent → client calls.
commands
Slash commands: the adapter’s built-ins (frontend commands that call the session API, modes §1.3) plus the session’s extension commands, prompt templates and skills (available_commands_update).
config
Session config options (configOptions, session/set_config_option, modes §6.2).
convert
Conversions between ACP content and Oino messages: prompt blocks in (modes §6.2), the transcript replayed by session/load, and the prompt stop reason.
env
AcpEnv: an ExecutionEnv that lets the ACP client host files and terminals (modes §6.4).
error
Adapter errors and their JSON-RPC forms.
factory
Creating session runtimes for ACP sessions.
tools
Tool-call presentation: ACP kind, title, locations, content and diffs (modes §6.3).
ui
Extension UI → ACP (modes §6.4): which dialogs become session/request_permission or elicitation/create, the elicitation schemas, and how answers map back to extension_ui_response values.

Functions§

serve_stdio
Serves ACP on stdin/stdout until the client closes stdin (oino --mode acp).