feat(doctor): catch half-written installs, not just absent ones

Runtime deps checked that node_modules existed, which is true of the broken
tree too — it now verifies every declared dependency landed. Dashboard UI
quotes the last client-build.log error instead of repeating the build command,
and npm and free disk get their own rows: both truncate installs silently.
This commit is contained in:
2026-09-08 15:44:41 +07:00
parent dab01b7f2b
commit 6f9b9c36b8
3 changed files with 244 additions and 19 deletions
+9 -3
View File
@@ -1,5 +1,5 @@
---
description: Diagnose a plugin-installed AgentHub — Node, bootstrap, server, hooks, CLI
description: Diagnose a plugin-installed AgentHub — Node, npm, disk, bootstrap, server, hooks, CLI, UI build
---
Run the diagnostic and report what it found. Do not fix anything unless the user
@@ -17,8 +17,13 @@ Print the output verbatim, then add at most three lines of guidance based on the
- `FAIL Hooks` → duplicate hook entries double every token and cost figure.
Starting a new Claude Code session removes them automatically (the bootstrap
backs the file up as `settings.json.agenthub-bak` first).
- `FAIL Server` or `FAIL Runtime deps` → run `/agenthub-update`, then check
- `FAIL Server` → run `/agenthub-update`, then check
`~/.claude/agenthub/runtime/bootstrap.log` and `server.log`.
- `FAIL Runtime deps` → the install is incomplete, not merely absent. Delete
`~/.claude/agenthub/runtime/node_modules` before running `/agenthub-update`;
reinstalling over the broken tree is what let it survive.
- `FAIL npm` or `FAIL Disk` → nothing else in the report can be trusted until
these are fixed; both silently truncate installs.
- `WARN agenthub CLI` → print the exact `export PATH=...` line from the output.
- `WARN Skill plugins` → the pipelines name slash commands no installed plugin
provides. The dashboard is unaffected; `/agenthub:ship-feature(-lane)` is what
@@ -26,6 +31,7 @@ Print the output verbatim, then add at most three lines of guidance based on the
means that attempt has not run or did not succeed — say `/agenthub-update` retries
it, and print the `claude plugin install …` line from the output as the manual
route.
- `WARN Dashboard UI` → run `/agenthub-open` to build the bundle.
- `WARN Dashboard UI` → run `/agenthub-open` to build the bundle. When the row
quotes a build error, report that error — it is the actual problem.
No preamble, no summary of things that passed.