Skip to main content

capo_agent/
lib.rs

1//! # capo-agent
2//!
3//! Library crate for the Capo coding agent. See the design spec at
4//! `docs/superpowers/specs/2026-04-23-capo-design.md`.
5//!
6//! ## Imports
7//!
8//! Prefer the crate-root re-exports for stable protocol types:
9//!
10//! ```ignore
11//! use capo_agent::{App, AppBuilder, UiEvent, Command, UiToolResult, ProgressChunk};
12//! ```
13//!
14//! Submodule paths (`capo_agent::events::UiEvent`, `capo_agent::tools::ToolCtx`)
15//! are available but considered semver-unstable within 0.x; prefer the
16//! re-exports above.
17
18#![forbid(unsafe_code)]
19
20pub mod agent;
21pub mod app;
22pub mod auth;
23pub mod config;
24pub mod context_files;
25pub mod error;
26pub mod events;
27pub mod llm;
28pub mod mcp;
29pub mod model;
30pub mod paths;
31pub mod permissions;
32pub mod protocol;
33pub mod session;
34pub mod settings;
35pub mod skills;
36pub mod tools;
37
38pub use app::{App, AppBuilder};
39pub use auth::{load as load_auth, save_with_mode as save_auth, Auth, ProviderAuth};
40pub use config::Config;
41pub use context_files::{assemble_system_prompt, load_project_context_files, ContextFile};
42pub use error::{AppError, Result};
43pub use events::{
44    Command, PermissionChoice, PermissionResolution, ProgressChunk, UiEvent, UiToolResult,
45};
46pub use mcp::{McpConfig, McpServerConfig};
47pub use model::ModelId;
48pub use motosan_agent_loop::{BranchNode, BranchTree, EntryId, Message, Role};
49pub use paths::agent_dir;
50pub use permissions::{Decision, NoOpPermissionGate, PermissionGate, PermissionRequest};
51pub use session::{encode_cwd, hydrate_read_files, SessionId, SessionLookup, SessionPaths};
52pub use settings::{
53    CliOverrides, LlmProviderKind, LoggingSettings, ModelSettings, SessionSettings, Settings,
54    UiSettings,
55};
56pub use skills::{
57    load_all as load_skills, load_from_dir as load_skills_from_dir, LoadSkillsResult, Skill,
58    SkillDiagnostic, SkillSource,
59};