#[doc(inline)]
pub use self::prelude::*;
pub mod bootstrap;
pub mod candidate;
pub mod compile;
pub mod coordination;
pub mod dispatch;
mod eval_manifest;
pub mod execution;
pub mod guard;
mod harness_evidence;
mod harness_matrix;
pub mod hook;
pub mod knowledge;
pub mod lock;
pub mod mem;
pub mod models;
pub mod planning;
pub mod run;
pub mod seed;
pub mod status;
mod native_broker;
mod native_hook;
mod transport_bind;
pub(crate) mod prelude {
pub use super::ShepherdCommand;
pub use super::bootstrap::{ConfigCmd, DoctorCmd, HomeCmd, InitCmd};
pub use super::candidate::CandidateCmd;
pub use super::compile::CompileCmd;
pub use super::coordination::{SignalCmd, SyncCmd, TeammateCmd, WorktreeCmd};
pub use super::dispatch::DispatchCmd;
pub use super::execution::{DeliverableCmd, IssuesCmd, LintCmd, ReadyCmd, SprintCmd};
pub use super::guard::GuardCmd;
pub use super::hook::HookCmd;
pub use super::knowledge::{DupsCmd, EvalCmd, ExportCmd, InsightsCmd, QueryCmd, SearchCmd};
pub use super::lock::LockCmd;
pub use super::mem::MemCmd;
pub use super::models::ModelsCmd;
pub use super::planning::{
AuditCmd, CloseLaneCmd, DiscoveryCmd, GraphCmd, PlanCmd, RenderCmd, ReportCmd,
};
pub use super::run::RunCmd;
pub use super::seed::SeedCmd;
pub use super::status::{HandoffCmd, StatusCmd};
pub use crate::migrate::MigrateCmd;
}
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, clap::Subcommand)]
pub enum ShepherdCommand {
Candidate(CandidateCmd),
Audit(AuditCmd),
Compile(CompileCmd),
Hook(HookCmd),
CloseLane(CloseLaneCmd),
Config(ConfigCmd),
Dispatch(DispatchCmd),
Discovery(DiscoveryCmd),
Doctor(DoctorCmd),
Deliverable(DeliverableCmd),
Dups(DupsCmd),
Eval(EvalCmd),
Export(ExportCmd),
Guard(GuardCmd),
Graph(GraphCmd),
Handoff(HandoffCmd),
Init(InitCmd),
Insights(InsightsCmd),
Issues(IssuesCmd),
Lint(LintCmd),
Lock(LockCmd),
Home(HomeCmd),
Migrate(MigrateCmd),
Mem(MemCmd),
Models(ModelsCmd),
Plan(PlanCmd),
Query(QueryCmd),
Render(RenderCmd),
Ready(ReadyCmd),
Report(ReportCmd),
Status(StatusCmd),
Search(SearchCmd),
Seed(SeedCmd),
Signal(SignalCmd),
Sprint(SprintCmd),
Sync(SyncCmd),
Teammate(TeammateCmd),
Run(RunCmd),
Worktree(WorktreeCmd),
#[command(external_subcommand)]
Unsupported(Vec<String>),
}
impl ShepherdCommand {
pub(crate) fn run(
self,
globals: crate::interface::CliGlobals,
) -> Result<(), crate::interface::CliError> {
match self {
Self::Candidate(command) => command.run(globals),
Self::Audit(command) => command.run(globals),
Self::Compile(command) => command.run(),
Self::Hook(command) => command.run(globals),
Self::CloseLane(command) => command.run(globals),
Self::Config(command) => command.run(globals),
Self::Dispatch(command) => command.run(globals),
Self::Discovery(command) => command.run(globals),
Self::Deliverable(command) => command.run(globals),
Self::Doctor(command) => command.run(globals),
Self::Dups(command) => command.run(globals),
Self::Eval(command) => command.run(globals),
Self::Export(command) => command.run(globals),
Self::Guard(command) => command.run(),
Self::Graph(command) => command.run(globals),
Self::Handoff(command) => command.run(globals),
Self::Init(command) => command.run(globals),
Self::Insights(command) => command.run(globals),
Self::Issues(command) => command.run(globals),
Self::Lint(command) => command.run(globals),
Self::Home(command) => command.run(globals),
Self::Lock(command) => command.run(globals),
Self::Migrate(command) => command.run(globals),
Self::Mem(command) => command.run(globals),
Self::Models(command) => command.run(globals),
Self::Plan(command) => command.run(globals),
Self::Query(command) => command.run(globals),
Self::Render(command) => command.run(globals),
Self::Ready(command) => command.run(globals),
Self::Report(command) => command.run(globals),
Self::Status(command) => command.run(globals),
Self::Search(command) => command.run(globals),
Self::Seed(command) => command.run(),
Self::Signal(command) => command.run(globals),
Self::Sprint(command) => command.run(globals),
Self::Sync(command) => command.run(globals),
Self::Teammate(command) => command.run(globals),
Self::Run(command) => command.run(globals),
Self::Worktree(command) => command.run(globals),
Self::Unsupported(arguments) => {
let command = arguments.first().map(String::as_str).unwrap_or("<empty>");
Err(crate::interface::CliError::message(format!(
"command `{command}` is unavailable in the canonical Rust CLI; legacy Python, Bash, and Node command authorities are retired"
)))
}
}
}
}