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;
26pub mod publish;
27mod restart;
28mod session;
29#[cfg(test)]
30mod test_support;
31mod workbench;
32
33pub use daemon::{run_socket, run_stdio};
34
35/// Saved queues of sessions that stopped, for `scv jobs` when no daemon is
36/// running. The daemon's own snapshot fills the same list.
37pub fn restorable_queues(layout: &scv_client::Layout) -> Vec<scv_protocol::RestorableSession> {
38 session::persist::restorable(layout)
39}
40pub use restart::{BuildInfo, build_info, watchdog as restart_watchdog};
41
42#[cfg(test)]
43mod tests;