claude_pool_server/lib.rs
1//! Library interface for claude-pool-server.
2//!
3//! Exposes [`State`] and the tool/resource builders so that integration tests
4//! (and downstream embedders) can construct a router without going through the
5//! binary entry point.
6
7pub mod prompts;
8pub mod resources;
9pub mod tools;
10
11pub mod auth;
12
13use std::path::PathBuf;
14use std::sync::Arc;
15
16use claude_pool::{Pool, PoolStore, SkillRegistry, WorkflowRegistry};
17use tokio::sync::RwLock;
18
19/// Shared state accessible by all tool/resource handlers.
20pub struct State<S: PoolStore> {
21 /// The pool instance.
22 pub pool: Pool<S>,
23 /// Thread-safe skill registry (mutated by skill management tools).
24 pub skills: Arc<RwLock<SkillRegistry>>,
25 /// Workflow registry.
26 pub workflows: WorkflowRegistry,
27 /// Directory for persisting project-local skills.
28 pub skills_dir: PathBuf,
29}