MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / doctor_check_cli_plugin

Function doctor_check_cli_plugin

src/agents/antigravity.rs:256–281  ·  view source on GitHub ↗
(dc: &mut DoctorCounters, home: &Path)

Source from the content-addressed store, hash-verified

254}
255
256fn doctor_check_cli_plugin(dc: &mut DoctorCounters, home: &Path) {
257 let plugin_path = cli_plugin_path(home);
258
259 if !plugin_path.exists() {
260 dc.warn(&format!(
261 "{} not found — run `tracedecay install --agent antigravity` if you use the Antigravity CLI (#85)",
262 plugin_path.display()
263 ));
264 return;
265 }
266
267 let settings = load_json_file(&plugin_path);
268 let server = settings.get("mcpServers").and_then(|v| v.get("tracedecay"));
269
270 if server.and_then(|v| v.as_object()).is_some() {
271 dc.pass(&format!(
272 "CLI plugin registered in {}",
273 plugin_path.display()
274 ));
275 } else {
276 dc.fail(&format!(
277 "CLI plugin file exists but lacks `mcpServers.tracedecay` in {} — run `tracedecay install --agent antigravity`",
278 plugin_path.display()
279 ));
280 }
281}

Callers 1

healthcheckMethod · 0.85

Calls 6

cli_plugin_pathFunction · 0.85
load_json_fileFunction · 0.85
existsMethod · 0.80
warnMethod · 0.80
passMethod · 0.80
failMethod · 0.80

Tested by

no test coverage detected