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. - agent_
options - The
modelandeffortvalues an agent’s ACP server offers, as SCV last saw them. - 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.
Enums§
- Reach
- How SCV reaches an agent, decided from its adapter settings and what is
installed; the
agenttool andscv agents checkdecide the same way. - Skill
- Where a skill’s text comes from.
Constants§
- AGENT_
EFFORTS - Effort values the
agenttool’s schema always lists; an ACP agent’s own values are added to them.
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). - call_
agent - Make one
agentcall tonamefromcwd, as a session’sagenttool makes it, forscv agents check. The call runs in the foreground and may taketimeout; wheninterruptedcompletes first, it is cancelled. The agent’s model list decides, not a saved one. The run is recorded underdelegation, like a session’s, and this returns only once the agent’s process group is gone. The result is the tool’s JSON result, or SCV’s own error when the call was refused or nothing could run. - offered_
agents - The agents a session’s
agenttool offers, sorted: the values its schema lists. Empty when the session offers none. - reach
- How SCV would reach the agent
adapterconfigures. - valid_
effort - Whether
valuecan be passed as an effort: 1-32 ASCII letters, digits,-, or_, starting with a letter or digit so it never reads as a flag. Which values an agent supports is the agent’s to check, since its levels change with its releases. - 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.
Type Aliases§
- Skill
Map - A session’s skills by name.