1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! 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::;