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)
| 634 | /// hooks. The hook definitions live in the integration repo, so this path |
| 635 | /// never needs the per-agent definitions baked into this binary. |
| 636 | fn run_manifest(&self, manifest: &std::path::Path) -> CliResult<()> { |
| 637 | use atomic_agent::hooks::manifest::install_from_manifest; |
| 638 | |
| 639 | match install_from_manifest(manifest) { |
| 640 | Ok(outcome) => { |
| 641 | print_success(&format!( |
| 642 | "Installed hooks from {} → {}", |
| 643 | manifest.display(), |
| 644 | outcome.target.display(), |
| 645 | )); |
| 646 | let mut summary = format!("{} hook command(s) registered", outcome.added); |
| 647 | if outcome.removed > 0 { |
| 648 | summary.push_str(&format!(", {} stale entr(y/ies) replaced", outcome.removed)); |
| 649 | } |
| 650 | println!(" {summary}"); |
| 651 | println!(); |
| 652 | println!("Each agent turn in a project with .atomic/ will be recorded"); |
| 653 | println!("as an Atomic change with full AI provenance."); |
| 654 | } |
| 655 | Err(e) => { |
| 656 | print_error(&format!( |
| 657 | "Failed to install hooks from manifest {}: {}", |
| 658 | manifest.display(), |
| 659 | e, |
| 660 | )); |
| 661 | } |
| 662 | } |
| 663 | Ok(()) |
| 664 | } |
| 665 | } |
| 666 | |
| 667 | // Tests |
no test coverage detected