# dsh-subagent-inspector [简体中文](README.md) An original, independent, read-only DeepSeek Harness Web plugin. Open a right-side drawer from the current Session header to inspect the full subagent tree, Turns and Steps, task prompts, recorded reasoning, responses, Todos, tool calls and results, errors, duration, and token usage in real time. ![dsh-subagent-inspector test interface](docs/screenshot.png) > [!WARNING] > The inspector exposes complete Session logs, including prompts, tool arguments, and tool results. These may contain source code, file contents, command output, or other sensitive information. The plugin does not enable CORS, but if Harness Web binds to `0.0.0.0`, these read-only routes inherit the same network exposure boundary. Use it only on trusted networks. ## Compatibility - Harness Web only. - v0.1.0 is pinned to DeepSeek Harness `0.1.1-rc.2`. - Harness is still in Developer Preview. Wait for a matching plugin release before upgrading Harness. ## Install ```bash dsh plugin --profile web add github:chongyangdu2008-cyrus/dsh-subagent-inspector#v0.1.0 ``` Restart the Web profile: ```bash dsh web ``` Uninstall: ```bash dsh plugin --profile web remove dsh-subagent-inspector ``` ## Features - Adds an entry to `conversation.session.header.actions` without replacing the official `ui-subagent` navigation. - Collapsible, arbitrarily nested tree with execution state, mode, depth, duration, token usage, and current tool. - Turn → Step timeline for prompts, recorded reasoning, responses, Todos, request metadata, tool calls/results, and termination reasons. - Full tool payloads are collapsed by default. Log content is never rendered as raw HTML. - Live SSE updates, reconnect deduplication, auto-follow, new-event notice, history pagination, and native subagent Session navigation. - Simplified Chinese and English UI; every Chinese Harness locale uses the Simplified Chinese dictionary. - Complete history for local Session-backed subagents and lifecycle-only placeholders for remote providers without a local Session. ## Observability boundary This plugin only reads official Session, agent, and subagent events. It registers no model tool and does not alter subagent scheduling, model selection, permissions, or context. Only reasoning actually recorded by Harness is displayed. Internal reasoning that a model did not provide, a provider did not return, or Harness did not persist is never guessed or generated. Forked children show only their own `seq >= seedLength` suffix, not the inherited parent history. ## Read-only routes All routes are same-origin and accept `GET` only: - `/dsh-subagent-inspector/snapshot?rootSessionId=...` - `/dsh-subagent-inspector/history?rootSessionId=...&sessionId=...&beforeSeq=...&limit=...` - `/dsh-subagent-inspector/stream?rootSessionId=...` History defaults to 200 events and is capped at 500. Session IDs are validated and unknown event kinds are safely ignored. See [Architecture](docs/architecture.md) for the protocol and data flow. ## Development Node.js 22+ and pnpm 11 are required: ```bash pnpm install pnpm verify ``` The repository commits prebuilt `lib/` artifacts and deliberately has no `prepare` script, so GitHub installation does not require build-script approval. CI checks type safety, tests, build freshness, package contents, and an isolated Harness install/uninstall. Licensed under the [MIT License](LICENSE). The implementation relies only on the DeepSeek Harness [official repository](https://github.com/deepseek-ai/deepseek-harness), [architecture](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/architecture.md), [subagent UI](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/client/ui-subagent/README.md), and [plugin publishing guide](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md); it does not copy third-party plugin implementations.