中文EN

@sleetdrop/dsh-plugin-topology

dev已测通过npmMIT

DeepSeek Harness 插件依赖图检查器:把运行中的 Cordis 插件/服务拓扑快照为可缩放的浏览器面板图,附带图论指标,以及面向模型的 graph.render 工具。

下载量 / Downloads
2,095
依赖体积 / node_modules
19.1 MB
测试时间 / Tested
2026-11-06
DSH 版本 / Version
0.2.2-rc.1

安装

dsh plugin --profile web add @sleetdrop/dsh-plugin-topology

沙箱测试结果

阶段结果
1 安装✓
2 列装✓
3 挂载✓
4 启动—

四阶段在隔离沙箱里跑:安装(有网)→ 列装 → 挂载 → 启动(后三步断网)。

README

@sleetdrop/dsh-plugin-topology

![CI](https://github.com/sleetdrop/dsh-plugin-topology/actions/workflows/ci.yml)

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): a TypertRemoteService

exposing analyze() and render() over the gateway.

  • host tool (@sleetdrop/dsh-plugin-topology/tool): the model-facing

graph_render tool, registering on ctx.tools.

  • browser surface (dsh.client): a global page reachable from the sidebar's

panel list 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 whose graph object 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 page renders the live plugin/service topology as a zoomable Graphviz

graph, with metrics, a color legend, and an unresolved-dependency table. The

same view is localized through the harness locale dictionaries:

  • [Chinese (zh_CN)](docs/screenshots/panel-zh_CN.png)
  • [English (en_US)](docs/screenshots/panel-en_US.png)

Browser page

The entry is a global-panel row in the sidebar (sidebar.panellist), visible

with or without a selected session — the topology is runtime-global and needs

no session context. The row addresses the main panel keyed plugin-topology,

so the view occupies the center column under the harness's page chrome (on

macOS it clears the window's traffic-light strip); leaving it is ordinary

sidebar navigation, exactly like the Plugins page, with no window controls of

its own. 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

with a selection, 300px as an empty hint rail, collapsible to 40px). It shows

the fiber state, module source, and two independently scrolling sections:

→ Dependencies and ← 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 all per

direction, collapse, and close. A local filter narrows both sections by name

or service and shows matching / 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 the visited path (… / current)

at the top left. There is no leading "Overview" crumb: fitting the whole graph

belongs to the zoom control, and a mode switch inside a path read like a

reset. ←, Backspace or ⌘[ 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 page-header 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 creation-ordinal strip under the inspector header.

Every mark is the same 2px hairline: charcoal selected, indigo dependencies,

ochre dependents; no background band or separator. The strip itself is

static — 2px marks are too small to aim at — so hovering or focusing a

dependency/dependent row in the inspector pulses the matching mark on the

selected blink's 500ms rhythm and highlights its graph edge; the pulse repeats

until the pointer or focus leaves, and clicking the row selects it. The x-axis carries

creation order, so a dependency to the right of the selected mark is simply a

provider created later; there is no separate deferred state. There is no

density background. After a 320ms attention delay, the selected hairlines

blink twice at a 500ms cursor interval when the selection changes (disabled

under reduced motion).

  • Color language: red is reserved for real failures (FAILED, missing or

unresolved providers) and the node/table outline that flags the

…(truncated)

以上内容来自 npm 上的 README,我们只做格式化,不改内容。

版本

npm 上共发布:12,最后更新 2026-11-04

链接

GitHub · Homepage · npm

同类插件