dsh-cc/dsh-cc--packages-interaction-command-doctor ↗★ 1

@dsh-cc/command-doctor

面向用户的斜杠命令,生成产品级会话健康报告。 适合排查会话配置问题的用户;verbose模式含较慢探测项。

包名
@dsh-cc/command-doctor
兼容性
待验证
Harness 依赖范围
>=0.1.5-rc.1
Cordis 依赖范围
>=0.1.5-rc.1
版本
0.7.1
许可证
Apache-2.0
最近更新
2026年9月16日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

@dsh-cc/command-doctor

English | 中文

Human-facing /doctor command: a product-grade session health report. One data object, three renderings — default text, verbose text, and a JSON file under $DSH_HOME. The plugin registers one global command through ctx.commands, so every composed command adapter discovers and executes it without a model turn.

Command contract

InputResult
/doctorCheap in-process checks. ok rows collapse to one line; warn/fail/skip/info rows expand with summary and suggested fix.
/doctor --verboseCheap checks plus the slow probes: LLM catalog validation, the serena-hooks PATH scan, git worktree facts, and a session-store write probe. Evidence is printed on every row.
/doctor --jsonCollects exactly like --verbose and writes the full report to $DSH_HOME/tui/doctor-report.json (created with parents, overwritten). The command text is only the path, the summary counts, and the fail/warn check ids — never a JSON blob in the transcript.

--verbose --json together collect verbose and emit JSON. Unknown tokens return the usage text as a success result; checks never run on a parse miss.

Report shape

DoctorReport carries schemaVersion: 1, generatedAt, durationMs, an env header (dsh-cc/harness/node/os/arch/cwd), and a checks array grouped under env, session, models, mcp, hooks, web, storage, git, plugins, and seams.

Consumer rule (schemaVersion): adding a check id is not breaking — consumers must tolerate unknown check ids and groups. Only a schemaVersion bump is breaking.

Every string is scrubbed for secret-like substrings (sk-, ghp_, xoxb-, Bearer ) before rendering or writing, and evidence values are restricted to primitives.

Composition

The producer injects commands. In the cc preset it lives inside the cc-services group so it can read ccModelRoutes, mcpConnections, and hookBridgeStatus:

- id: commands
  name: '@deepseek-ai/dsh-commands'
- id: command-doctor
  name: '@dsh-cc/command-doctor'

Every optional seam is duck-typed via ctx.get; an absent seam is a skip row, not a failure. Each check group is try/catch-isolated, so a throwing seam degrades to one failing row while the command itself still succeeds.

Known limits

  • No headless CLI — dsh doctor is Phase 2; the command only runs inside a session.
  • No CC-style mutations — this is read-only + findings + suggested fix; it never edits CLAUDE.md or skills, and MCP operations stay on /mcp.
  • Missing fetch provider is info — a mounted web seam without a fetch provider reports the known WEB_PROVIDER_UNAVAILABLE limit, not a failure.
  • Hook discovery is single-file — CC layered project/user discovery and live reload are not implemented (reported as an info row).

Model Experience

The slash input and the diagnostic output never enter model requests and consume no model tokens. Presentation text is never logged.