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

Method run_manifest

atomic-cli/src/commands/agent/enable.rs:547–575  ·  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

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 ///

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