Expand description
Slash command registry, handler trait, and channel sink abstraction for Zeph.
This crate provides the non-generic infrastructure for slash command dispatch:
ChannelSink— minimal async I/O trait replacing theC: Channelgeneric in handlersCommandOutput— exhaustive result type for command executionSlashCategory— grouping enum for/helpoutputCommandInfo— static metadata for a registered commandCommandHandler— object-safe handler trait (noCgeneric)CommandRegistry— registry with longest-word-boundary dispatchCommandContext— non-generic dispatch context with trait-object fieldstraits— sub-trait definitions for subsystem accesshandlers— concrete handler implementations (session, debug)
§Design
CommandRegistry and CommandHandler are non-generic: they operate on CommandContext,
a concrete struct whose fields are trait objects (&mut dyn DebugAccess, etc.). zeph-core
implements these traits on its internal state types and constructs CommandContext at dispatch
time from Agent<C> fields.
This crate does NOT depend on zeph-core. A change in zeph-core’s agent loop does
not recompile zeph-commands.
Re-exports§
pub use commands::COMMANDS;pub use commands::is_recognized_command;pub use handlers::help::render_help_text;pub use context::CommandContext;pub use sink::ChannelSink;pub use sink::NullSink;pub use traits::agent::AgentAccess;pub use traits::agent::NullAgent;pub use traits::graph::GraphAccess;pub use traits::integration::IntegrationAccess;pub use traits::lsp::LspAccess;pub use traits::mcp::McpAccess;pub use traits::memory::MemoryAccess;pub use traits::misc::MiscAccess;pub use traits::model::ModelAccess;pub use traits::orchestration::OrchestrationAccess;pub use traits::policy::PolicyAccess;pub use traits::scheduler::SchedulerAccess;pub use traits::session_control::SessionControlAccess;pub use traits::skill::SkillAccess;pub use traits::subagent::SubagentAccess;pub use traits::tracking::TrackingAccess;pub use traits::worktree::WorktreeAccess;pub use transcript::TranscriptEntry;pub use transcript::TranscriptFormatter;pub use transcript::TranscriptRole;
Modules§
- commands
- Static registry of all slash commands, used for
/helpoutput generation. - context
- Non-generic command execution context.
- handlers
- Slash command handler implementations.
- sink
- Minimal channel I/O trait for slash command handlers.
- traits
- Sub-trait definitions for command handler context access.
- transcript
- Shared transcript formatting for
/history(spec-068 §13.6).
Structs§
- Command
Error - Error type returned by command handlers.
- Command
Info - Static metadata about a registered command, used for
/helpoutput generation. - Command
Registry - Registry of slash command handlers.
- Goal
Snapshot - Lightweight cross-crate snapshot of an active goal.
Enums§
- Command
Output - Result of executing a slash command.
- Goal
Status View - Status of a long-horizon goal.
- Slash
Category - Category for grouping commands in
/helpoutput.
Traits§
- Command
Handler - A slash command handler that can be registered with
CommandRegistry.