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

Method run_manifest

atomic-cli/src/commands/agent/disable.rs:233–259  ·  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

231 /// Mirrors `atomic agent enable --hooks`: removes only the entries whose
232 /// command matches the manifest's `command_prefix` from its target file.
233 fn run_manifest(&self, manifest: &std::path::Path) -> CliResult<()> {
234 use atomic_agent::hooks::manifest::uninstall_from_manifest;
235
236 match uninstall_from_manifest(manifest) {
237 Ok(outcome) => {
238 if outcome.removed > 0 {
239 print_success(&format!(
240 "Removed {} hook command(s) from {}",
241 outcome.removed,
242 outcome.target.display(),
243 ));
244 println!();
245 println!("Agent turns will no longer be recorded automatically.");
246 } else {
247 println!("No Atomic hooks found in {}.", outcome.target.display());
248 }
249 }
250 Err(e) => {
251 print_error(&format!(
252 "Failed to remove hooks from manifest {}: {}",
253 manifest.display(),
254 e,
255 ));
256 }
257 }
258 Ok(())
259 }
260
261 /// Remove hooks from global agent settings.
262 ///

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