Acp
acp
¶
Per-task host-side ACP (Agent Client Protocol) aggregator.
Bridges a single ACP client (Zed, Toad, …) to one of several
in-container agents (claude, codex, copilot, …) by namespacing models
as agent:model (e.g. claude:opus-4.6) under ACP's standard
category: "model" configOption.
Module map:
daemon— Unix-socket server, container lifecycle supervision, and the standaloneterok-executor acpentry point. Ownsserve_acpand theacp_socket_is_liveprobe used to distinguish live daemons from stale socket files.roster— per-task aggregation: walks the image'sai.terok.agentslabel, probes each agent, and answers "what models does this container offer?" OwnsACPRosterand the vault-sidelist_authenticated_agents.proxy— the typed bidirectional ACP mediator: implements bothacp.Agent(toward the connected client) andacp.Client(toward the bound backend wrapper) on one object. Drives the bind handshake on first model pick.probe— the minimalinitialize + session/newhandshake that extracts an agent's model roster.cache— thread-safe per-agent model cache; survives reconnects, invalidated on credential rotation.endpoint— theACPEndpointStatusenum the host CLI uses to classify endpoints interok acp list.model_options— theagent:modelnamespace vocabulary and the typed builders + rewriter that keep the proxy's frames schema-valid.
Bind-trigger surfaces: explicit session/set_model /
session/set_config_option(configId="model"), or — for clients
that trust the advertised currentModelId — lazily on the first
backend-needing method (e.g. session/prompt). Cross-agent
switching mid-session is out of scope for v1; subsequent picks against
a different agent are rejected at the protocol level.
The exports below are re-exported from terok_executor so the
host-side caller (terok) doesn't have to reach into the submodules.
__all__ = list(_LAZY)
module-attribute
¶
__getattr__(name)
¶
Resolve a re-exported name to its defining submodule on first access (PEP 562).