Skip to main content

Crate scv_tools

Crate scv_tools 

Source
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/: the agent tool 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); the adapters table, background jobs, conversation handles, 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, and args: 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 agent tool lists each agent with its product, what that harness offers, what it takes, and the user’s own use_for note, 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 agent call with background: true returns a job handle at once while the agent keeps working; agent_status and agent_wait observe the job, agent_cancel stops 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_history and chat_keep: the chat log of the conversation a chat session answers (see scv_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_fetch and the configured-backend web_search.

Structs§

AcpAgentLaunch
An agent’s Agent Client Protocol server, resolved from its adapter-table entry and [agents.<name>] transport.
AgentAdapterConfig
DelegationContext
The registry and parent session that delegated runs are recorded under.
ToolsConfig
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 agent tool, able to run in the background, and the job tools (agent_wait, agent_status, agent_cancel).
offered_agents
The agents a session’s agent tool offers, sorted: the values its schema lists. Empty when the session offers none.
valid_effort
Whether value is one of AGENT_EFFORTS.
valid_model_name
Model names are passed as one argument, so only reject values that could read as a flag, name an @file argument, or carry unexpected characters.

Type Aliases§

SkillMap