Expand description
§capo-agent
Library crate for the Capo coding agent. See the design spec at
docs/superpowers/specs/2026-04-23-capo-design.md.
§Imports
Prefer the crate-root re-exports for stable protocol types:
ⓘ
use capo_agent::{App, AppBuilder, UiEvent, Command, UiToolResult, ProgressChunk};Submodule paths (capo_agent::events::UiEvent, capo_agent::tools::ToolCtx)
are available but considered semver-unstable within 0.x; prefer the
re-exports above.
Re-exports§
pub use app::App;pub use app::AppBuilder;pub use auth::load as load_auth;pub use auth::save_with_mode as save_auth;pub use auth::Auth;pub use auth::ProviderAuth;pub use config::Config;pub use context_files::assemble_system_prompt;pub use context_files::load_project_context_files;pub use context_files::ContextFile;pub use error::AppError;pub use error::Result;pub use events::Command;pub use events::PermissionChoice;pub use events::PermissionResolution;pub use events::ProgressChunk;pub use events::UiEvent;pub use events::UiToolResult;pub use mcp::McpConfig;pub use mcp::McpServerConfig;pub use model::ModelId;pub use paths::agent_dir;pub use permissions::Decision;pub use permissions::NoOpPermissionGate;pub use permissions::PermissionGate;pub use permissions::PermissionRequest;pub use session::encode_cwd;pub use session::hydrate_read_files;pub use session::SessionId;pub use session::SessionLookup;pub use session::SessionPaths;pub use settings::CliOverrides;pub use settings::LlmProviderKind;pub use settings::LoggingSettings;pub use settings::ModelSettings;pub use settings::SessionSettings;pub use settings::Settings;pub use settings::UiSettings;pub use skills::load_all as load_skills;pub use skills::load_from_dir as load_skills_from_dir;pub use skills::LoadSkillsResult;pub use skills::Skill;pub use skills::SkillDiagnostic;pub use skills::SkillSource;pub use user_message::Attachment;pub use user_message::AttachmentError;pub use user_message::AttachmentErrorKind;pub use user_message::UserMessage;
Modules§
- agent
- app
- auth
- Credential storage (
~/.capo/agent/auth.json). - config
- context_
files - AGENTS.md / CLAUDE.md walk-up (matches pi’s
resource-loader.ts::loadProjectContextFiles). - error
- events
- llm
- mcp
- MCP server configuration and lifecycle. See
docs/superpowers/specs/2026-05-18-capo-m4-design.md§3. - model
ModelId— a thin newtype over the provider’s model-name string, used byApp::switch_modeland (Phase D2) the/modelpicker.- paths
- Filesystem path helpers for capo’s per-user agent directory.
- permissions
- protocol
- JSON/RPC wire protocol — line-delimited JSON encoding of the existing
UiEvent(out) andCommand(in) enums. Seedocs/json.mdanddocs/rpc.md. - session
- M3: persistent session storage on top of
motosan_agent_loop::FileSessionStore. - settings
- Structured user settings (
~/.capo/agent/settings.json). - skills
- Skill loading, validation, system-prompt injection, and
/skill:expansion. Seedocs/superpowers/specs/2026-05-18-capo-m4-design.md§2. - tools
- user_
message - Public
UserMessageandAttachmenttypes plus the internalprepare_user_messagepipeline that turns them into amotosan_agent_loop::Messagefor provider dispatch.
Structs§
- Branch
Node - One node of a
BranchTree, index-aligned with the entry log. - Branch
Tree - A navigable view of a session log as a branch tree.
Enums§
- Message
- A single message in the conversation history.
- Role
- The role of a message participant. Kept as a lightweight enum so
downstream code can keep writing
msg.role() == Role::User.
Type Aliases§
- EntryId
- Opaque identifier for a persisted entry. Generated by the store on append.