Install hooks from an integration-supplied manifest file. The manifest names its own target settings file and the hook commands to register; this merges them in idempotently, preserving any non-Atomic hooks. The hook definitions live in the integration repo, so this path never needs the per-agent definitions baked into this binary.
(&self, manifest: &std::path::Path)
| 271 | /// hooks. The hook definitions live in the integration repo, so this path |
| 272 | /// never needs the per-agent definitions baked into this binary. |
| 273 | fn run_manifest(&self, manifest: &std::path::Path) -> CliResult<()> { |
| 274 | use atomic_agent::hooks::manifest::install_from_manifest; |
| 275 | |
| 276 | match install_from_manifest(manifest) { |
| 277 | Ok(outcome) => { |
| 278 | print_success(&format!( |
| 279 | "Installed hooks from {} → {}", |
| 280 | manifest.display(), |
| 281 | outcome.target.display(), |
| 282 | )); |
| 283 | let mut summary = format!("{} hook command(s) registered", outcome.added); |
| 284 | if outcome.removed > 0 { |
| 285 | summary.push_str(&format!(", {} stale entr(y/ies) replaced", outcome.removed)); |
| 286 | } |
| 287 | println!(" {summary}"); |
| 288 | println!(); |
| 289 | println!("Each agent turn in a project with .atomic/ will be recorded"); |
| 290 | println!("as an Atomic change with full AI provenance."); |
| 291 | } |
| 292 | Err(e) => { |
| 293 | print_error(&format!( |
| 294 | "Failed to install hooks from manifest {}: {}", |
| 295 | manifest.display(), |
| 296 | e, |
| 297 | )); |
| 298 | } |
| 299 | } |
| 300 | Ok(()) |
| 301 | } |
| 302 | |
| 303 | /// Install hooks globally to the agent's user-level settings. |
| 304 | /// |
no test coverage detected