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)
| 122 | /// recorder runs when either marker is present, and a recorder failure is |
| 123 | /// swallowed so the agent turn is never blocked. |
| 124 | pub(crate) fn guarded_hook_command(inner: &str) -> String { |
| 125 | format!( |
| 126 | "test -d .atomic || test -f {pointer} && {inner} || true", |
| 127 | pointer = atomic_repository::SANDBOX_POINTER, |
| 128 | ) |
| 129 | } |
| 130 | |
| 131 | // AgentHook Trait |
| 132 |
no outgoing calls