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)
| 545 | /// hooks. The hook definitions live in the integration repo, so this path |
| 546 | /// never needs the per-agent definitions baked into this binary. |
| 547 | fn run_manifest(&self, manifest: &std::path::Path) -> CliResult<()> { |
| 548 | use atomic_agent::hooks::manifest::install_from_manifest; |
| 549 | |
| 550 | match install_from_manifest(manifest) { |
| 551 | Ok(outcome) => { |
| 552 | print_success(&format!( |
| 553 | "Installed hooks from {} → {}", |
| 554 | manifest.display(), |
| 555 | outcome.target.display(), |
| 556 | )); |
| 557 | let mut summary = format!("{} hook command(s) registered", outcome.added); |
| 558 | if outcome.removed > 0 { |
| 559 | summary.push_str(&format!(", {} stale entr(y/ies) replaced", outcome.removed)); |
| 560 | } |
| 561 | println!(" {summary}"); |
| 562 | println!(); |
| 563 | println!("Each agent turn in a project with .atomic/ will be recorded"); |
| 564 | println!("as an Atomic change with full AI provenance."); |
| 565 | } |
| 566 | Err(e) => { |
| 567 | print_error(&format!( |
| 568 | "Failed to install hooks from manifest {}: {}", |
| 569 | manifest.display(), |
| 570 | e, |
| 571 | )); |
| 572 | } |
| 573 | } |
| 574 | Ok(()) |
| 575 | } |
| 576 | |
| 577 | /// Install hooks globally to the agent's user-level settings. |
| 578 | /// |
no test coverage detected