DeepSeek Harness 插件依赖图检查器:把运行中的 Cordis 插件/服务拓扑快照为可缩放的浏览器面板图,附带图论指标,以及面向模型的 graph.render 工具。
安装
# npm 包(预构建)
dsh plugin --profile web add @sleetdrop/dsh-plugin-topology
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:sleetdrop/dsh-plugin-topology
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Plugin dependency graph inspector for DeepSeek Harness. It snapshots the live Cordis plugin fiber tree into a plugin/service bipartite graph, derives graph-theory metrics, and renders it as JSON, Graphviz DOT, or SVG.
One installable bundle ships three surfaces:
- host service (
@sleetdrop/dsh-plugin-topology): aTypertRemoteServiceexposinganalyze()andrender()over the gateway. - host tool (
@sleetdrop/dsh-plugin-topology/tool): the model-facinggraph.rendertool, registering onctx.tools. - browser surface (
dsh.client): a global panel reachable from the sidebar footer that renders the graph, metrics, legend, unresolved-dependency log, and pan/zoom + format downloads.
Install
# From the npm registry (prebuilt lib/, no build permission needed):
dsh plugin --profile <name> add @sleetdrop/dsh-plugin-topology
# From a local checkout:
git clone https://github.com/sleetdrop/dsh-plugin-topology.git
cd dsh-plugin-topology && pnpm install && pnpm build
dsh plugin --profile <name> add ./dsh-plugin-topology
The bundle patch mounts the host service row and the graph.render tool row.
The tool row can live in the profile patch instead — a deployment that prefers
per-session placement may remove it from cordis.patch.yml and add it to its
agent preset.
Model Experience
The graph.render tool serializes the running instance's plugin dependency
graph as one document:
json— a NetworkX-compatible node-link graph whose nodes carry graph-theory metrics (in/out degree, degree/betweenness/eigenvector centrality, page-rank) and whosegraphobject carries global metrics (density, strongly connected components,isDag, diameter).dot— Graphviz source for layout via any Graphviz tool.svg— a Graphviz-rendered SVG, with isolated plugins composed beside the main graph.
For dot or svg, write the returned content to a file with the write tool to
produce a shareable artifact. Use json to inspect or analyze the assembly.
Screenshots
The panel opens maximized by default and renders the live plugin/service topology as a zoomable Graphviz graph, with metrics, a color legend, and an unresolved-dependency table. The same panel is localized through the harness locale dictionaries:
Browser panel
The trigger sits in sidebar.footer.action (a root-scope list slot, above
Settings), visible with or without a selected session — the topology is
runtime-global and needs no session context. The panel opens maximized by
default (the Graphviz canvas needs the space); the header button restores a
centered window. Same-named plugin instances merge into one node; each node's
label carries the instance creation ordinals in brackets (timer [1,9,23]),
assigned at startup and meaningful only within that run.
Node inspection
The SVG renders inline, so the graph is interactive without baking anything into the export — a downloaded SVG still opens clean in any viewer.
- Hover raises a light ring on the node, nothing else.
- Click selects the node and opens a fixed inspector on the right (360px,
collapsible to a 40px rail). It shows the fiber
state, modulesource, and two independently scrolling sections:→ Dependenciesand← Dependents. Each row carries a state dot, the instance ordinals, and the mediating service(s); clicking a row selects and flies to that target. - The inspector header links the name to npm and carries
Frame allper direction, collapse, and close. A local filter narrows both sections by name or service and showsmatching / total; it never changes the graph highlight. Section heights follow their row counts, so one direction cannot push the other out of view. - Breadcrumb + history: the canvas keeps
Overview / … / currentat the top left.←,Backspaceor⌘[returns to the previous selection; the breadcrumb segments are clickable. - Off-screen chips: up to three far endpoints are surfaced at the padded viewport border; clicking one selects it.
- Search:
/focuses the toolbar search; it matches plugin names and services. Selecting a service opens the service inspector: providers, consumers, bus factor, critical/single-provider status, and the creation ordinals of both sides; clicking a row selects the plugin. - Startup timeline: a continuous creation-ordinal heat strip sits under the
inspector header. Neutral density is the background; charcoal hairlines mark
the selected instances, indigo dependencies, ochre dependents, and coral
late providers. Hover shows
#ordinal · plugin · state. - Unresolved rows: the unresolved table's plugin cell locates the node and opens the same inspector.
Degree counts are read from the rendered SVG rather than the raw snapshot, so a merged node reports the edges actually drawn after the projection collapses same-named instances.
The client injects remote (the gateway ClientRemote service) and self-mounts
its own pluginTopology Remote contribution, so it does not require editing
the host assembly's contribution list.
Compatibility
The plugin uses its own independent semantic version — it does not mirror the DeepSeek Harness version. New plugin features and bugfixes bump the plugin version on their own schedule, independent of which DSH release it targets. The table below maps each plugin version to the DSH release it was validated against, so pick the plugin version whose target DSH matches your harness.
Current release targets DeepSeek Harness 0.2.1-rc.2; the peerDependencies
pin the client packages and @deepseek-ai/cordis@^4.0.4 the snapshot reads
through. The 0.1.2 rc line removed the old dsh-client-runtime browser runtime:
the client now runs on the Cordis Context augmented by the shell baseline
renderer (dsh-client-ui-renderer → ctx.slots), dsh-client-store
(defineStore), dsh-client-locale (ctx.locale), and dsh-api-remotes
(ctx.remote). The service reads Cordis internals (root.registry,
root.reflect.store, fiber fields) that are not part of the stable public API
— verify the installed harness satisfies the peer ranges before enabling the
tool or panel.
DSH itself has no beta channel — it publishes alpha then rc. Follow its
next dist-tag: latest is not a dependable pointer across the suite, because
the individual @deepseek-ai/dsh-* packages leave it on an older prerelease
rather than moving it with next. This plugin adapts to stable DSH rc
releases only and skips the fast-moving alpha line.
| Plugin version (Git + npm) | Targets DSH harness | Notes |
|---|---|---|
0.1.0 |
0.1.1-rc.2 |
Old dsh-client-runtime browser model (frozen). |
0.2.0 |
0.1.2-rc.1 |
Cordis-Context browser model; client-runtime removed. |
0.3.0 |
0.1.5-rc.1 |
Dependency refresh for DSH 0.1.5-rc.1; no code changes required. |
0.3.1 |
0.1.5-rc.3 |
Peer refresh to DSH 0.1.5-rc.3 (same 0.1.5 rc line). |
0.4.0 |
0.1.7-rc.2 |
TypertCodec API migration (schema → create); cordis ^4.0.4. |
0.5.0 |
0.2.0-rc.2 |
Node detail popover + direction-scoped dependency highlight; panel colors rebound to the real DSH theme tokens (dark theme). The peer refresh to DSH 0.2.0-rc.2 needed no source changes of its own. |
0.6.0 |
0.2.0-rc.2 |
Right-side inspector (collapsible, independently scrolling dependency/dependent sections, local filter, proportional heights), breadcrumb history, off-screen chips, plugin/service search, arrow-based direction. Quality gates: CI, drift checks, locale/inspector-model tests. No DSH source changes. |
0.7.0 |
0.2.1-rc.2 |
Service inspector, missing services, startup timeline; live topology doctor (loaded-only). DSH peer refresh to 0.2.1-rc.2; quality gates unchanged. |
Known Limitations
- A future Cordis that reshapes the internal registry/reflect surfaces breaks
snapshot(); it does not degrade silently. - The browser panel requires a web profile (the
--patchoverlay covers only the node half). - Same-named instances merge in the display graph; per-instance identity stays available in the JSON export and the complete downloadable DOT.
Development
pnpm install
pnpm check # CI-equivalent: typecheck, build, tests, drift, pack, compat
pnpm check includes the deterministic drift checks (orphaned lib/, client
externals, DSH theme tokens, package payload, README/RELEASING/peer
compatibility) and the locale/inspector model tests; CI runs the same matrix on
Node 22 and 24.
The dsh.client browser bundle inlines everything except the shell's frozen
platform-module rows (react, react/jsx-runtime, and
@deepseek-ai/dsh-client-store), which every supported harness shell serves.
See NEXT-STEPS.md for planned renderer improvements and docs/QUALITY.md for the quality/drift workstream.
Publishing
The full end-to-end release checklist (version bump → build/test → commit/tag →
headless + browser smoke → publish) is in docs/RELEASING.md.
The final publish requires an interactive OTP, so it is run by hand. A portable
helper script handles the registry/login guards, publish, and verification:
./scripts/publish.sh # prompts for login (if needed) and OTP
prepublishOnly runs pnpm check (the CI-equivalent gate). publishConfig pins access: public and the registry.npmjs.org target. If npm publish fails with an
EPERM from the npm cache (root-owned files), either fix the cache once
(sudo chown -R $(id -u):$(id -g) ~/.npm) or publish through pnpm, whose
store avoids the npm cache entirely:
pnpm publish # same prepublishOnly gate, pnpm store
files ships lib/, cordis.patch.yml, overlay.example.yml, and
NEXT-STEPS.md; npm adds README and LICENSE automatically.
License
链接
同类插件
yjh051108/dsh-routing-suite★ 6997
一个仓库三件套:DSH 插件包的运行时注入器(注入、热重载、卸载、开发侧挂区一键转正、路由自愈,外带设置页插件管理:列出、卸载、拖入文件夹内化)、任务感知的思维模式路由 agent 预设(router-standard / router-spec / router-react)、以及分级两级任务协议(commit_star / lock_stage / revise_do / edit_plan / mark_task / redteam_verdict 六个工具,任务状态落盘)。注入器实现直接在库内,安装的是它自己的行为而不是一份依赖清单。
strukto-ai/mirage#dsh★ 3696
把文件系统与 bash 提供者换成 mirage 虚拟工作区:文件工具与 shell 命令作用于挂载的资源(RAM、S3、Redis、Slack、Gmail、Notion、Postgres)而非宿主磁盘,支持按挂载点设置读/写/执行模式、按命令选择沙箱(进程内 monty、pyodide、quickjs;远程 docker、e2b、daytona),并可在虚拟终端中安装 CLI(git、gh、slack、linear、ntn、gws,或自行注册的程序树)作为命令头词。
first-fluke/oh-my-agent#dsh★ 1344
在工具执行前后以及尝试结束当前轮次时运行项目 OMA 检查。随插件安装 OMA CLI 依赖,并在首次使用时初始化未配置的项目。需要 Node.js 22+;首次初始化需要网络连接和项目目录写入权限。
hust-open-atom-club/oh-dsh★ 322
社区发行版:TUI、桌面端与 Web UI 统一体验,分层安装、一步到位。
weijiafu14/pi2dsh★ 217
Pi Host ABI 兼容引擎:装一次之后,npm 上的 Pi 扩展原包经 `dsh plugin add <pi-package>` 直接作为 DSH 原生插件挂载。已在官方 DSH 上端到端验证 pi-mcp-adapter(完整 MCP 管理面:OAuth、resources、prompts、MCP Apps、elicitation、sampling)、@tintinweb/pi-subagents、pi-code、pi-hermes-memory、pi-background-tasks;`pi2dsh inspect` 在安装前报告一个包的兼容情况。
Fishquito7/dsh-skill-mcp-panel★ 207
在 DSH Web 设置中管理技能与 MCP 服务器:技能卡片热启停、工作区作用域、分组、批量迁移与拖拽导入,以及 stdio/HTTP MCP 增删改查、连接测试、密钥脱敏,并附带统一 dsh-panel 命令行。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。