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