MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / run_manifest

Method run_manifest

atomic-cli/src/commands/agent/enable.rs:474–502  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

472 /// hooks. The hook definitions live in the integration repo, so this path
473 /// never needs the per-agent definitions baked into this binary.
474 fn run_manifest(&self, manifest: &std::path::Path) -> CliResult<()> {
475 use atomic_agent::hooks::manifest::install_from_manifest;
476
477 match install_from_manifest(manifest) {
478 Ok(outcome) => {
479 print_success(&format!(
480 "Installed hooks from {} → {}",
481 manifest.display(),
482 outcome.target.display(),
483 ));
484 let mut summary = format!("{} hook command(s) registered", outcome.added);
485 if outcome.removed > 0 {
486 summary.push_str(&format!(", {} stale entr(y/ies) replaced", outcome.removed));
487 }
488 println!(" {summary}");
489 println!();
490 println!("Each agent turn in a project with .atomic/ will be recorded");
491 println!("as an Atomic change with full AI provenance.");
492 }
493 Err(e) => {
494 print_error(&format!(
495 "Failed to install hooks from manifest {}: {}",
496 manifest.display(),
497 e,
498 ));
499 }
500 }
501 Ok(())
502 }
503
504 /// Install hooks globally to the agent's user-level settings.
505 ///

Callers 1

runMethod · 0.45

Calls 3

install_from_manifestFunction · 0.85
print_successFunction · 0.85
print_errorFunction · 0.85

Tested by

no test coverage detected