Foreword

In DSH, client plugins have injected dependencies among themselves, as well as slot declarations and registrations. This information is scattered across the startup manifest, the slot registry, and plugin configurations. When troubleshooting which plugin depends on whom, who depends on it, or who declared a specific slot, it often requires checking multiple locations back and forth.

dsh-plugin-graph is a plugin designed for the DSH Web settings page that renders these relationships as a force-directed graph, used for quickly viewing the inject, declares, and registers relationships between client plugins.

What is this

dsh-plugin-graph is maintained by erduotong and is licensed under MIT. It is not a tool to replace the DSH runtime, but rather adds an entry point for “Plugin Relationship Graph” in the DSH Web settings page, displaying the relationships between client plugins and slots in the current DSH Web process using a read-only view.

Core Features

The following introduces several capabilities available for direct use.

Force-directed Canvas

  • Nodes automatically undergo physical layout.
  • Node sizes scale based on degree.
  • Blue dots represent plugin nodes, sourced from the startup manifest window.__DSH_BOOT__ and the slot registry.
  • Amber diamonds represent slot nodes, sourced from the real-time slot registry ctx.slots.snapshot().

Relationship Edges

  • Blue inject: Dependencies of a plugin on other packages.
  • Green declares: Slot declarers.
  • Amber registers: Plugins registered to slots.

Canvas Interactions

  • Dragging nodes: Pins the node and re-heats the layout.
  • Dragging empty space: Pans the canvas.
  • Scroll wheel: Zooms the canvas.
  • Hovering over nodes: Highlights adjacent nodes and pops up a tooltip showing dependencies/dependents, declarers/registerers.
  • Click manual refresh: Re-reads the startup manifest and slot registry.
  • Clicking the expand button in the top-right corner: Opens a full-screen modal, closable via Esc, the backdrop, or ×.

Read-only Snapshot

This plugin does not subscribe to any events; the graph is rebuilt upon mounting and manual refresh. Specifically, it does not subscribe to slots/changed, so when Hot Module Replacement (HMR) changes in registration relationships occur, the canvas needs to be manually refreshed.

The embedded graph and the modal graph are two independent simulation instances, each calculating its own layout without sharing drag positions.

Installation and Enablement

Prerequisites

First, confirm that DeepSeek Harness has been installed and the Web interface has been launched at least once. Upon launching, a Web profile directory will be generated:

~/.dsh/profiles/web

Installation

General users can install from the npm registry:

dsh plugin --profile web add dsh-plugin-graph

Local source installation, for example during development or when not yet published:

dsh plugin --profile web add /path/to/dsh-plugin-graph

The install command will wrap the dependencies from the profile’s package.json and link them to:

~/.dsh/profiles/web/node_modules

Do not use a bare npm i dsh-plugin-graph to install. That would only install into the node_modules of the current directory, and the DSH profile would not be aware of it.

Auto-loading Instructions

This package comes with a dsh.bundle declaration. After dsh plugin add, it will be appended to the dsh.profile.bundles stack of the profile, no manual editing of cordis.patch.yml is required.

If you previously manually added insert entries to cordis.patch.yml in an older version without dsh.bundle, you need to delete that entry before upgrading and reinstall to avoid duplicate mounting.

Restart and Open

  1. Restart the dsh Web process. Configuration changes and loader entries only take effect after a restart.
  2. Open the settings page, which is “Settings” at the bottom of the sidebar.
  3. Find the “Plugin Relationship Graph” entry and click to enter to see the force-directed graph.

Typical Usage

The following is a common troubleshooting path.

  1. After installing the plugin, restart the dsh Web process.
  2. Open the Web settings page and enter “Plugin Relationship Graph”.
  3. Hover over a plugin node to view its dependencies/dependents, declarers/registerers.
  4. If there are many nodes in the graph, click manual refresh to re-read the startup manifest and slot registry.
  5. When a detailed view of the relationships is needed, open the full-screen modal to zoom with the scroll wheel and pan by dragging empty space.

If you want to build and test in a local source directory, you can execute:

pnpm install
pnpm build
pnpm test

To uninstall, use:

dsh plugin --profile web remove dsh-plugin-graph

Applicable Scenarios and Notes

Suitable for use in the following scenarios:

  • Troubleshooting which packages a specific DSH Web client plugin depends on.
  • Viewing who declared a specific slot and which plugins registered it.
  • After local source installation, quickly confirming that plugin and slot relationships meet expectations.

Notes:

  • It only covers client plugins. Host flat layers (e.g., webserver, storage) are not in window.__DSH_BOOT__; they will only appear if they are declared or registered to a slot.
  • It is a read-only snapshot view and does not change DSH runtime behavior.
  • It runs with the permissions of the current dsh process; check the source code and license before installing. The license is MIT.
  • If pnpm reports missing peer dependencies during installation (e.g., missing peer @deepseek-ai/cordis / react ...), this is an expected warning; they are provided by the host at runtime.
  • If you use it via the community directory, note that the community directory is an independent site with no official affiliation to DeepSeek or Hypersphere; do not interpret it as an official app store.

Conclusion

The value of dsh-plugin-graph lies in converging the scattered client plugin relationships in the DSH Web settings page into a readable graph. It is suitable for dependency troubleshooting, slot relationship confirmation, and local development verification.

GitHub:

https://github.com/erduotong/dsh-plugin-graph

Directory page link:

https://www.skillhub.cn/plugins/erduotong/dsh-plugin-graph