Wrap an `atomic agent hooks …` invocation in the shell guard that installed hooks run behind. The hook must only fire where Atomic's graph is reachable, but it must fire in **both** kinds of working tree: a canonical checkout, which has a `.atomic/` directory; and an agent sandbox, which has **no** `.atomic/` of its own — only a `.atomic-sandbox` pointer file to the canonical graph. Guarding on
(inner: &str)
| 99 | /// recorder runs when either marker is present, and a recorder failure is |
| 100 | /// swallowed so the agent turn is never blocked. |
| 101 | pub(crate) fn guarded_hook_command(inner: &str) -> String { |
| 102 | format!( |
| 103 | "test -d .atomic || test -f {pointer} && {inner} || true", |
| 104 | pointer = atomic_repository::SANDBOX_POINTER, |
| 105 | ) |
| 106 | } |
| 107 | |
| 108 | // AgentHook Trait |
| 109 |
no outgoing calls
no test coverage detected