scv_server/lib.rs
1//! The SCV server: the authority over sessions, policy, and approvals, served
2//! over the daemon's Unix socket ([`run_socket`]) or one stdio connection
3//! ([`run_stdio`]), for the instance the caller selected with
4//! `scv_client::Layout::from_env`.
5//!
6//! Each connection gets its own session with an ordered turn queue; turns run
7//! `scv_core::AgentRuntime` with the configured provider and the tools
8//! `scv_tools` offers. The daemon also supervises long-running components
9//! (`components`), such as chat channel accounts, and plans restarts into a
10//! newly installed release. [`config`] reads and layers the configuration,
11//! which the `scv` command line also inspects.
12
13mod approval;
14mod attachments;
15mod components;
16pub mod config;
17mod confirm;
18mod connection;
19mod control;
20mod daemon;
21mod disk;
22mod events;
23mod outbound;
24mod project;
25mod prompt;
26mod restart;
27mod session;
28#[cfg(test)]
29mod test_support;
30mod workbench;
31
32pub use daemon::{run_socket, run_stdio};
33
34/// Saved queues of sessions that stopped, for `scv jobs` when no daemon is
35/// running. The daemon's own snapshot fills the same list.
36pub fn restorable_queues(layout: &scv_client::Layout) -> Vec<scv_protocol::RestorableSession> {
37 session::persist::restorable(layout)
38}
39pub use restart::{BuildInfo, build_info, watchdog as restart_watchdog};
40
41#[cfg(test)]
42mod tests;