Expand description
SCV’s bounded, workspace-aware built-in tools.
builtin_registry builds a session’s tools: files (read,
read_skill, write), the shell (bash), the web (web_fetch,
web_search), delegation to other agent CLIs and to a nested SCV
(agent, with background jobs), and chat_attach for chat sessions.
delegation records every delegated process so SCV can list, stop, and
clean them up.
The source is laid out by what a tool does:
builtin/: tools that run inside SCV (fs,skill,shell,web,chat_attach).delegate/: theagenttool that hands a turn to another agent, named as its argument, on one of three backends: one CLI process per turn (native), a long-lived Agent Client Protocol server (acp), or a nested SCV (scv); theadapterstable,backgroundjobs,conversationhandles, run records (delegation), the agents’ own credential files (stores), and how a run’s output and progress are read.process: spawning a child in its own process group and always finishing the whole group.registry,config, andargs: assembling a session’s tools, their settings, and the argument helpers they share.
Modules§
- adapters
- The native agent CLIs SCV can delegate to, one descriptor each.
- agent_
choice - What lets the model choose between delegated agents: the
agenttool lists each agent with its product, what that harness offers, what it takes, and the user’s ownuse_fornote, and, when a call fails because the agent is missing, signed out, or its provider returned an error, names the other agents to call instead. - background
- Background delegations: an
agentcall withbackground: truereturns a job handle at once while the agent keeps working;agent_statusandagent_waitobserve the job,agent_cancelstops it, and the session is told when it finishes so the server can report it in a turn of its own. - chat_
attach chat_attach: send a file with a chat session’s reply.- chat_
history chat_historyandchat_keep: the chat log of the conversation a chat session answers (seescv_client::history).- conversation
- Multi-turn conversations with delegated agents.
- delegation
- What SCV started, so it can list, stop, and clean up delegated agents.
- stores
- Credentials for the native agents SCV delegates to, always inside SCV’s private agent homes: importing a user’s own Codex or Grok setup, and the API-key and endpoint stores SCV writes in an agent CLI’s native format.
- web
- Web tools:
web_fetchand the configured-backendweb_search.
Structs§
- AcpAgent
Launch - An agent’s Agent Client Protocol server, resolved from its adapter-table
entry and
[agents.<name>] transport. - Agent
Adapter Config - Delegation
Context - The registry and parent session that delegated runs are recorded under.
- Tools
Config - Limits and shared state for one session’s tools.
Constants§
- AGENT_
EFFORTS - Effort values the built-in adapters accept.
Functions§
- apply_
agent_ environment - Give a native agent command its adapter environment: remove every
inherited credential, endpoint, and state-location variable any adapter
declares, then set
environment(such as the relocated config home). - builtin_
registry - The tools a session offers: the built-in ones, then, when an installed
agent is offered below the delegation depth limit, the
agenttool, able to run in the background, and the job tools (agent_wait,agent_status,agent_cancel). - offered_
agents - The agents a session’s
agenttool offers, sorted: the values its schema lists. Empty when the session offers none. - valid_
effort - Whether
valueis one ofAGENT_EFFORTS. - valid_
model_ name - Model names are passed as one argument, so only reject values that could
read as a flag, name an
@fileargument, or carry unexpected characters.