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)
| 401 | /// hooks. The hook definitions live in the integration repo, so this path |
| 402 | /// never needs the per-agent definitions baked into this binary. |
| 403 | fn run_manifest(&self, manifest: &std::path::Path) -> CliResult<()> { |
| 404 | use atomic_agent::hooks::manifest::install_from_manifest; |
| 405 | |
| 406 | match install_from_manifest(manifest) { |
| 407 | Ok(outcome) => { |
| 408 | print_success(&format!( |
| 409 | "Installed hooks from {} → {}", |
| 410 | manifest.display(), |
| 411 | outcome.target.display(), |
| 412 | )); |
| 413 | let mut summary = format!("{} hook command(s) registered", outcome.added); |
| 414 | if outcome.removed > 0 { |
| 415 | summary.push_str(&format!(", {} stale entr(y/ies) replaced", outcome.removed)); |
| 416 | } |
| 417 | println!(" {summary}"); |
| 418 | println!(); |
| 419 | println!("Each agent turn in a project with .atomic/ will be recorded"); |
| 420 | println!("as an Atomic change with full AI provenance."); |
| 421 | } |
| 422 | Err(e) => { |
| 423 | print_error(&format!( |
| 424 | "Failed to install hooks from manifest {}: {}", |
| 425 | manifest.display(), |
| 426 | e, |
| 427 | )); |
| 428 | } |
| 429 | } |
| 430 | Ok(()) |
| 431 | } |
| 432 | |
| 433 | /// Install hooks globally to the agent's user-level settings. |
| 434 | /// |
no test coverage detected