shepherd-cli 6.6.1

The canonical shepherd command-line interface over the per-project registry, run artifacts, and sprint pipeline.
//! Host hook transport over the shared native guard engine.
//!
//! This was two commands, `claude-hook` and `codex-hook`, each a zero-field
//! unit struct whose entire body was `run_native_hook(HookHost::X, globals)`.
//! The parameter was encoded in the subcommand NAME, and `HookHost` was a
//! private two-variant duplicate of `shepherd_core::types::Harness`, which
//! already had four variants and derived everything needed. Two commands, two
//! files, and a shadow enum to express one argument.
//!
//! ## Per-harness reach
//!
//! Collapsing the commands did not collapse what each host offers, and one
//! difference is load-bearing enough that `hooks/scripts/generate_harness_parity.sh`
//! cites this file for it: the regular Codex marketplace carrier registers
//! SessionStart and PreToolUse only. Codex subagent lifecycle events stay
//! unavailable until the host exposes a
//! trusted spawn-to-child correlation contract, so shepherd cannot attribute a
//! Codex child to its parent the way it can under Claude Code.
//!
//! That phrase is on one line deliberately: the generator's `find_line` is
//! `grep -nF`, which matches within a line, so wrapping the citation anchor
//! across a break makes it invisible.
//!
//! This sentence was the module doc of the deleted `codex_hook.rs`. The refactor
//! took the file and the fact with it, which the parity generator caught by
//! failing to find its citation anchor -- the anchor was doing real work.

use crate::{
    cmd::native_hook::run_native_hook,
    interface::{CliError, CliGlobals},
};

#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, clap::Args)]
pub struct HookCmd {
    /// Host whose hook envelope arrives on stdin.
    #[arg(long)]
    harness: shepherd::Harness,
}

impl HookCmd {
    pub(crate) fn run(self, globals: CliGlobals) -> Result<(), CliError> {
        run_native_hook(self.harness, globals)
    }
}