(dc: &mut DoctorCounters, mcp_path: &Path)
| 693 | } |
| 694 | |
| 695 | fn doctor_check_plugin_mcp(dc: &mut DoctorCounters, mcp_path: &Path) { |
| 696 | if !mcp_path.exists() { |
| 697 | dc.warn(&format!( |
| 698 | "{} not found — run `tracedecay install --agent cursor`", |
| 699 | mcp_path.display() |
| 700 | )); |
| 701 | return; |
| 702 | } |
| 703 | let settings = load_json_file(mcp_path); |
| 704 | let server = &settings["mcpServers"]["tracedecay"]; |
| 705 | if server["command"] |
| 706 | .as_str() |
| 707 | .is_some_and(|command| !command.is_empty()) |
| 708 | && server["args"] == json!(["serve", "--path", "${workspaceFolder}"]) |
| 709 | { |
| 710 | dc.pass(&format!( |
| 711 | "Cursor plugin MCP registered in {}", |
| 712 | mcp_path.display() |
| 713 | )); |
| 714 | } else { |
| 715 | dc.fail(&format!( |
| 716 | "Cursor plugin MCP config is incomplete in {} — run `tracedecay install --agent cursor`", |
| 717 | mcp_path.display() |
| 718 | )); |
| 719 | } |
| 720 | } |
| 721 | |
| 722 | /// `(event, hook subcommand)` pairs parsed from the embedded plugin |
| 723 | /// `hooks/hooks.json` template, so the doctor check can never drift from the |
no test coverage detected