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

Method run_manifest

atomic-cli/src/commands/agent/disable.rs:268–294  ·  view source on GitHub ↗

Remove hooks described by an integration-supplied manifest file. Mirrors `atomic agent enable --hooks`: removes only the entries whose command matches the manifest's `command_prefix` from its target file.

(&self, manifest: &std::path::Path)

Source from the content-addressed store, hash-verified

266 /// Mirrors `atomic agent enable --hooks`: removes only the entries whose
267 /// command matches the manifest's `command_prefix` from its target file.
268 fn run_manifest(&self, manifest: &std::path::Path) -> CliResult<()> {
269 use atomic_agent::hooks::manifest::uninstall_from_manifest;
270
271 match uninstall_from_manifest(manifest) {
272 Ok(outcome) => {
273 if outcome.removed > 0 {
274 print_success(&format!(
275 "Removed {} hook command(s) from {}",
276 outcome.removed,
277 outcome.target.display(),
278 ));
279 println!();
280 println!("Agent turns will no longer be recorded automatically.");
281 } else {
282 println!("No Atomic hooks found in {}.", outcome.target.display());
283 }
284 }
285 Err(e) => {
286 print_error(&format!(
287 "Failed to remove hooks from manifest {}: {}",
288 manifest.display(),
289 e,
290 ));
291 }
292 }
293 Ok(())
294 }
295}
296
297// Tests

Callers 1

runMethod · 0.45

Calls 3

uninstall_from_manifestFunction · 0.85
print_successFunction · 0.85
print_errorFunction · 0.85

Tested by

no test coverage detected