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

Method run_manifest

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

177 /// Mirrors `atomic agent enable --hooks`: removes only the entries whose
178 /// command matches the manifest's `command_prefix` from its target file.
179 fn run_manifest(&self, manifest: &std::path::Path) -> CliResult<()> {
180 use atomic_agent::hooks::manifest::uninstall_from_manifest;
181
182 match uninstall_from_manifest(manifest) {
183 Ok(outcome) => {
184 if outcome.removed > 0 {
185 print_success(&format!(
186 "Removed {} hook command(s) from {}",
187 outcome.removed,
188 outcome.target.display(),
189 ));
190 println!();
191 println!("Agent turns will no longer be recorded automatically.");
192 } else {
193 println!("No Atomic hooks found in {}.", outcome.target.display());
194 }
195 }
196 Err(e) => {
197 print_error(&format!(
198 "Failed to remove hooks from manifest {}: {}",
199 manifest.display(),
200 e,
201 ));
202 }
203 }
204 Ok(())
205 }
206
207 /// Remove hooks from global agent settings.
208 ///

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