deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:erduotong/dsh-plugin-graph
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DeepSeek Harness(DSH)Web 设置页插件:以力导向图(Koishi / Obsidian 风格)可视化客户端插件之间的关系。
Tip: 这是一个dsh自己写的项目,还在快速完善中 如有好的想法,欢迎提出Issue~
功能
window.__DSH_BOOT__ 与插槽注册表;ctx.slots.snapshot()。inject —— 插件对其它包的依赖;declares —— 插槽声明者;registers —— 注册到插槽的插件。~/.dsh/profiles/web)。二选一:
方式 A:从 npm registry 安装(推荐一般用户使用)
dsh plugin --profile web add dsh-plugin-graph
方式 B:从本地源码目录安装(开发 / 未发布时)
dsh plugin --profile web add /path/to/dsh-plugin-graph
dsh plugin add会把包装进 profile 的package.json依赖并链接到~/.dsh/profiles/web/node_modules。请不要用裸npm i dsh-plugin-graph安装——那只会装进当前目录的node_modules,dsh 并不知道它。
本包自带 dsh.bundle 声明(cordis.patch.yml 配置层),dsh plugin add 后会自动追加到 profile 的 dsh.profile.bundles 层叠,启动时由包自带的 patch 挂载 ui-plugin-graph 行——无需手动编辑 cordis.patch.yml。
升级提示:如果在旧版本(无
dsh.bundle)时手动往cordis.patch.yml加过insert: - id: ui-plugin-graph,请删除该条目,避免与 bundle 自带的挂载重复。
| 操作 | 效果 |
|---|---|
| 拖拽节点 | 钉住该节点,重新加热布局 |
| 拖拽空白处 | 平移画布 |
| 滚轮 | 缩放 |
| 悬停节点 | 高亮相邻节点,弹出信息框(依赖/被依赖、声明者/注册者) |
| 点击右上角 ⤢ | 打开全屏模态框(Esc / 遮罩 / × 关闭) |
| 点击 ↻ | 手动刷新(重新读取启动清单与插槽注册表) |
dsh plugin --profile web remove dsh-plugin-graph
dsh 会同时移除依赖与 dsh.profile.bundles 里的层条目;如果旧版本手动加过 cordis.patch.yml 的 insert,也一并删除,最后重启 dsh。
dsh plugin add 后 profile 的 package.json 中 dsh.profile.bundles 包含 dsh-plugin-graph(cat ~/.dsh/profiles/web/package.json);确认重启过 dsh;确认 node_modules 里链接存在(ls ~/.dsh/profiles/web/node_modules/dsh-plugin-graph)。declares no dsh.bundle 警告:说明安装的版本过旧(< 0.2.0,尚无 bundle 声明),升级后重新 dsh plugin add 即可自动成为 profile 层。missing peer @deepseek-ai/cordis / react ...):这是预期提示。profile 模板固定 autoInstallPeers: false + hoisted linker,缺失 peer 会回退到安装级 profiles/node_modules,运行时由宿主提供,功能不受影响(harness 内部 client 插件同样声明这些 peer)。若升级 dsh 后版本不匹配,同步升级本包。__DSH_BOOT__ 内的 dsh.client 行);宿主平面行(webserver、storage 等)仅在被插槽声明/注册时出现。见「已知限制」。pnpm install
pnpm build # tsc 声明 + tsdown 打包(lib/client.js 为浏览器 bundle)
pnpm test # vitest 单元测试(--pool=threads)
构建产物约定:exports["./client"] 指向 lib/client.js,宿主经 /plugins/<id>/client.js 提供;dsh.client 声明是浏览器名册准入。
build() 同步读取 window.__DSH_BOOT__ 与 ctx.slots.snapshot(),由 buildPluginGraph 组装成模型,再由 buildVisualGraph 转为图节点/边(纯函数、可单测)。ForceGraph.tsx 内置斥力 + 弹簧 + 向心力 + 阻尼 + alpha 衰减,requestAnimationFrame 驱动,收敛后自动停止;拖拽节点时将其钉住(不参与积分),邻居仍对其受力。--dsw-static-* / --dsw-alias-*),自动适配亮/暗主题。slots/changed,HMR 注册变化需手动刷新(画布右上角 ↻)。__DSH_BOOT__ 中,仅当被插槽声明/注册时才会出现。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。