Skip to main content

scv_tools/
lib.rs

1//! SCV's bounded, workspace-aware built-in tools.
2//!
3//! [`builtin_registry`] builds a session's tools: files (`read`,
4//! `read_skill`, `write`), the shell (`bash`), the web (`web_fetch`,
5//! `web_search`), delegation to other agent CLIs and to a nested SCV
6//! (`agent_*`, with background jobs), and `chat_attach` for chat sessions.
7//! [`delegation`] records every delegated process so SCV can list, stop, and
8//! clean them up.
9//!
10//! The source is laid out by what a tool does:
11//!
12//! - `builtin/`: tools that run inside SCV (`fs`, `skill`, `shell`, [`web`],
13//!   [`chat_attach`]).
14//! - `delegate/`: the `agent_*` tools that hand a turn to another agent: one
15//!   CLI process per turn (`native`), a long-lived Agent Client Protocol
16//!   server (`acp`), or a nested SCV (`scv`); the [`adapters`] table,
17//!   [`background`] jobs, [`conversation`] handles, run records
18//!   ([`delegation`]), the agents' own credential files ([`stores`]), and
19//!   how a run's output and progress are read.
20//! - `process`: spawning a child in its own process group and always
21//!   finishing the whole group.
22//! - `registry`, `config`, and `args`: assembling a session's tools, their
23//!   settings, and the argument helpers they share.
24
25mod args;
26mod builtin;
27mod config;
28mod delegate;
29mod process;
30mod registry;
31mod sync;
32
33pub use builtin::{chat_attach, web};
34pub use config::{AcpAgentLaunch, AgentAdapterConfig, DelegationContext, SkillMap, ToolsConfig};
35pub use delegate::{
36    adapters, background, choice as agent_choice, conversation, records as delegation,
37    request::{AGENT_EFFORTS, valid_effort, valid_model_name},
38    stores,
39};
40pub use process::apply_agent_environment;
41pub use registry::builtin_registry;