Du010902/dsh-knowledgenet-plugin
Project Overview项目介绍
This repository is a DSH-native cordis plugin named @local/dsh-knowledgenet that attaches a local knowledge graph to any DSH workspace. It stores one node per Markdown file under the workspace at .dsh_knowledge/, with node identity carried by a ULID in front-matter so renaming titles or files never breaks edges; prerequisite edges with their "why" and source live in graph.json. The README explicitly frames this as a DSH plugin — not a general note-taking app — and ties the library's existence to the presence of .dsh_knowledge/, optionally overrideable via cordis.patch.yml's libraryRoot.
The plugin ships a right-sidebar "Knowledge Graph" panel visible from every workspace. On first open, if no library exists, it silently creates one; if a v2 library is detected, it returns unsupported_format and instructs the user to delete and recreate. The model receives a set of kn_* tools — kn_list_graph, kn_find_node, kn_read_node, kn_enter_node/kn_back, kn_write_note, kn_add_prerequisite, kn_propose_prerequisites, kn_plan_status, and kn_status — and a written discipline: search requests must not invoke write tools, creating a node requires stating intent and user consent, and at most one kn_add_prerequisite may run per turn. Multi-concept edits must be proposed first and are only materialised when the user clicks "Land" in the panel.
Writes are sandboxed to the library root, refuse .. and absolute paths, and use content-fingerprint optimistic concurrency so external editor changes cannot be silently overwritten; graph mutations are idempotent, self-loops and cycles are rejected, and deleting a node strips its edges. Deletion is permanent with no recycle bin or tombstone — the README tells users to copy the .md themselves if they want a backup. Installation is a single line in cordis.patch.yml; the plugin has zero runtime dependencies and runs no install scripts. Build is node build.mjs, tests run via node --test "tests/*.test.mjs", and the 77 vendored upstream files under src/vendor/upstream/ are byte-frozen and verified with scripts/sync-vendor.mjs --check. Known limits include one library per workspace, no pagination above 400 nodes per kn_list_graph call, and a single 3D view (the 2D focus view was removed).
这是 DSH 的一个 cordis 原生插件 @local/dsh-knowledgenet,把本地知识图谱挂到 DSH 工作区里。底层采用"一节点一个 markdown 文件"格式:节点元数据写在 front-matter,正文即笔记本身,节点身份由 ULID 承担,改标题或重命名文件都不会断边;带前置依赖与"为什么"的边统一存在 graph.json 中。
它在右侧栏提供「知识库图谱」面板(任意工作区都可见,仅显示真正渲染时才取数),并向模型暴露一组 kn_* 工具:只读侧有 kn_list_graph、kn_find_node、kn_read_node、kn_enter_node/kn_back、kn_status;写入侧有 kn_write_note、kn_add_prerequisite、kn_propose_prerequisites、kn_plan_status。搜索类请求不可调用写工具,建点前必须说明并等用户同意,一轮最多落一条前置,多个概念只能先提案再由用户在面板里勾选落地。
库根固定在工作区 .dsh_knowledge/,若不存在则在第一次打开面板时静默创建;写入路径严格限制在库根之内,删除为硬删除且无回收站。安装只需把 @local/dsh-knowledgenet 写入 profile 的 cordis.patch.yml,插件零运行时依赖、构建时不执行脚本;旧 v2 库格式已被拒绝并提示迁移。已知取舍包括每工作区单库、kn_list_graph 默认上限 400 节点无分页、三维图为上游实现。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-knowledgenet-plugin(Du010902/dsh-knowledgenet-plugin)
仓库:https://github.com/Du010902/dsh-knowledgenet-plugin
本站详情页:https://www.yhbd.top/plugins/du010902-dsh-knowledgenet-plugin/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 2 · 最近提交 2026-10-03 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:Du010902/dsh-knowledgenet-plugin
把 Du010902/dsh-knowledgenet-plugin 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
@local/dsh-knowledgenet
把本地知识图谱接进 DSH:一个节点就是一个 markdown 文件,节点之间记「前置依赖」,
用右侧栏的「知识库图谱」面板看全局、随手补点,用 kn_* 工具让模型按图谱讲、按纪律写。
它是什么 / 不是什么
- 是:DSH 的一个插件。给每个工作区提供一个知识库(工作区里的
.dsh_knowledge/), 以及一组让模型读写这个知识库的工具。 - 不是:通用笔记软件,也不是把工作区变成"知识库工作区"的开关 —— 任何工作区都可以有知识库,
有没有完全由"目录里有没有
.dsh_knowledge/"决定。
存储格式(v3,一节点 = 一个 markdown)
<工作区>/.dsh_knowledge/
library.json { formatVersion: 3, libraryId, title, createdAt, storage: "single-file-markdown" }
Nodes/注意力机制.md ← 一个节点 = 一个文件
Nodes/注意力机制-2.md ← 允许同名,自动加后缀
graph.json { revision, edges: [ A → B + 为什么 + 出处 ] }
节点文件长这样 —— 头部是元数据,正文就是笔记本身:
---
id: 01M3NHE78B55MHMDQ9D192MXAM ← 唯一标识(ULID):**永不随标题或文件名变化**
title: 注意力机制
status: todo ← todo | learning | done
aliases: [Attention, 注意机制]
createdAt: 2026-09-29T03:00:00.000Z
updatedAt: 2026-09-29T03:05:00.000Z
rev: 2
---
这里是正文,随便写;用编辑器直接改也不会坏(front-matter 之后的都是正文)。
身份与名称彻底解耦
| 你做的事 | 结果 |
|---|---|
改 title: |
身份不变,关系不断 ✓ |
重命名文件(注意力机制.md → Attn.md) |
身份不变,关系不断 ✓(面板按 id 找) |
| 建两个同名节点 | 两个不同身份 ✓(标题.md / 标题-2.md) |
手工丢一个没有 front-matter 的 md 进 Nodes/ |
先给临时身份(adopted-…),首次写入时固化成正式 ULID ✓ |
不兼容老格式(v2)
老格式(一节点一个文件夹 + .meta/knowledgenet/node.json + 每个节点一份 relations.json)
已不再支持 ✓。遇到它时不给含糊结果,而是明确报错:
unsupported_format:这个知识库是老格式(formatVersion=2),当前版本只支持新格式…
请把 <库根> 整个删掉,然后在面板里点「知识库图谱」重新创建。
迁移方式:删掉那个目录 → 打开「知识库图谱」→ 自动建一个新的 v3 库(空库,不会动工作区其它文件)✓。
库 ↔ 工作区
- 任意工作区都可以有一个知识库,位置固定为
<工作区>/.dsh_knowledge/✓。 - 打开方式:右侧栏「知识库图谱」标签页(所有工作区都可见 ✓)。第一次打开若还没有库, 会静默创建一个(不弹窗、不问问题 ✓);已经有的直接显示。
- 会话 cwd 在库的子目录里也能向上找到库 ✓。
- 也可以在工作区之外用配置固定一个库(
cordis.patch.yml的libraryRoot)。
「看不到插件」是怎么做到的(隔离)
没有知识库的工作区:kn_* 工具对该会话被 restrict 移除、协议提示词渲染为空 ⇒
模型完全看不到插件 ✓。有知识库的工作区才可见 ✓,而且建库后当前会话立刻放开
(不用等下一个会话 ✓)。
工具
| 工具 | 作用 | 读写 |
|---|---|---|
kn_list_graph |
列出节点与依赖(可按 focusId 看一跳邻里) |
只读 |
kn_find_node |
按标题/别名查(判重、找复用) | 只读 |
kn_read_node |
读一个节点的正文与关系(含"为什么依赖"、出处) | 只读 |
kn_enter_node / kn_back |
进入前置 / 返回上一层(学习栈) | 会话内状态 |
kn_write_note |
写正文(带内容指纹冲突守卫,绝不静默覆盖) | 写 |
kn_add_prerequisite |
记一条前置(必要时建点;命中相近候选会先要你确认) | 写 |
kn_propose_prerequisites |
一次提案多个前置(只写计划文件,不建点) | 写计划 |
kn_plan_status |
查提案状态(落地了哪些、有没有失败) | 只读 |
kn_status |
自诊断(路由是否注册、缓存/扫描指标、隔离判定留痕) | 只读 |
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
ruvnet/ruflo
Tencent/WeKnora
EverMind-AI/EverOS
MemTensor/MemOS
plastic-labs/honcho
agentscope-ai/ReMe
zilliztech/memsearch
vshulcz/deja-vu