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` tool that hands a turn to another agent, named
15//! as its argument, on one of three backends: one CLI process per turn
16//! (`native`), a long-lived Agent Client Protocol server (`acp`), or a
17//! nested SCV (`scv`); the [`adapters`] table,
18//! [`background`] jobs, [`conversation`] handles, run records
19//! ([`delegation`]), the agents' own credential files ([`stores`]), and
20//! how a run's output and progress are read.
21//! - `process`: spawning a child in its own process group and always
22//! finishing the whole group.
23//! - `registry`, `config`, and `args`: assembling a session's tools, their
24//! settings, and the argument helpers they share.
25
26mod args;
27mod builtin;
28mod config;
29mod delegate;
30mod process;
31mod registry;
32mod sync;
33
34pub use builtin::{chat_attach, chat_history, web};
35pub use config::{
36 AcpAgentLaunch, AgentAdapterConfig, DelegationContext, Skill, SkillMap, ToolsConfig,
37};
38pub use delegate::{
39 adapters,
40 agent::offered_agents,
41 background, choice as agent_choice, conversation, options as agent_options,
42 records as delegation,
43 request::{AGENT_EFFORTS, valid_effort, valid_model_name},
44 stores,
45};
46pub use process::apply_agent_environment;
47pub use registry::{Reach, builtin_registry, call_agent, reach};