DeepSeek Harness plugin

dsh-knowledge-dhb86183

Local knowledge base for DeepSeek Harness: index markdown / text / code / web pages into a zero-dependency SQLite FTS5 store, retrieve snippets with sources, distill session experiences — tools

Jump to install

Source facts

Repository
dhb861832993-star/dsh-knowledge
Latest update
Aug 18, 2026
Category
Plugin Markets & Managers
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/dhb861832993-star/dsh-knowledge
Plugin: dsh-knowledge-dhb86183
Author: dhb861832993-star

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-knowledge 📚

DeepSeek Harness 本地知识库插件(三期全:文档知识库 + 会话经验库 + 网页剪藏/Web 面板)——纯本地、零依赖的全文检索 + 实战经验沉淀 + 网页收藏。导入 markdown/笔记/配置/源码到 SQLite FTS5 索引,模型回答时自动检索并标注来源;对话中解决的实际问题,模型会主动提炼成经验条目入库;网页教程一键剪藏;kbquery 围栏渲染交互式浏览面板。

> 🔌 生态:仓库已挂 #dsh · #dsh-plugin · #knowledge-base · #rag · #fts5 topic。

✨ 特性

  • 零 npm 依赖:用 Node 24 内置 node:sqlite(DSH 官方会话检索同款引擎)+ 内置 fetch,不调 embedding API,完全离线
  • 中文友好:FTS5 trigram 分词 + 短词 LIKE 兜底,中文/代码/混合文本直接搜
  • 带来源检索:命中片段返回 来源路径 + 标题 + 行号区间,模型回答强制引用
  • 经验库(二期):对话解决实际问题时模型主动 kb_remember 入库;kb_ingest_session 读取历史会话(zstd 多帧解码)补录经验
  • 网页剪藏(三期):kb_add_url 抓取网页 → 启发式正文提取(去导航/页脚/脚本)→ 转 Markdown 入库
  • 交互面板(三期):kbquery 围栏渲染搜索面板(输入框 + 结果卡片),数据走 host JSON API
  • 增量导入:文件 mtime 未变自动跳过;同 URL 重新剪藏自动更新
  • 安全:导入路径限定工作区,二进制/PDF 跳过,抓取限 4 MiB
  • 单文件存储:~/.dsh/knowledge/kb.sqlite,可整体备份

工具

工具说明
kb_add导入文件或文件夹(默认递归),返回 per-file 状态与块数
kb_add_url剪藏网页入库(kind=web,path=url:…),同 URL 自动更新
kb_searchFTS5 BM25 全文检索文档+经验+网页,返回带来源的片段
kb_stats文档数、块数、经验数、类型分布、库路径
kb_list列出已入库文档(最新优先)
kb_remember主动记录一条实战经验(title/problem/solution/tags/source)
kb_ingest_session读取历史会话转写补录经验(无参=列会话,带 sessionId=读转写)
kb_experiences列出已记录的经验

交互面板

模型输出 kbquery 围栏即渲染面板(你说"打开知识库面板"/"搜一下知识库"即可触发):

{"placeholder":"搜索知识库…"}

支持 {"q":"UE4.27 MCP"} 预填搜索。面板数据来自 host API:/plugins/dsh-knowledge/api/{search,list,stats}

🌌 知识库星系图谱(右上角按钮)

窗口右上角有一个悬浮 🌌 按钮,点击打开太阳系风格的知识关系图谱:

  • 力导向布局:共享关键词的节点被弹簧拉近自动聚成星团,不同主题互相排斥自然分离,布局静止稳定,节点永不重叠——同一知识点一眼可见
  • 太阳 = 知识库;行星 = 文档(蓝)/网页(绿)/经验(橙),大小 = 内容量;发光连线 = 共享关键词,越亮关联越强
  • 交互:

- 悬停 → 浮动提示(类型/标题/关键词) - 点击星球 → 进入聚焦模式:关联节点点亮、无关节点变暗;右侧滑入详情面板(全文 + 🔗 关联知识列表,可点击跳转) - 拖拽 → 平移画布;滚轮 → 以光标为中心缩放;双击 → 复位视角

  • 网页类节点详情面板提供"🌐 打开原文"外链
  • 顶部毛玻璃栏:实时统计 + 类型图例 + 复位/刷新/关闭按钮
  • 入口按钮可拖拽,并自动避让 DSH 自身控件,不与其他 UI 重叠
  • 数据来自 /api/graph(节点+边)与 /api/doc(全文)

安装

# GitHub 仓库安装(发布后)
dsh plugin --profile web add github:YOUR_USERNAME/dsh-knowledge

# 或本地开发
dsh plugin --profile web add link:/path/to/dsh-knowledge

重启 dsh web,新会话生效。装完后问一句"知识库里有什么",模型会用 kb_stats 告诉你状态。

快速上手

用户: 把我的 UE4.27-MCP-配置说明.md 和笔记文件夹导入知识库
模型: (调用 kb_add 导入,然后 kb_stats 确认)

用户: 上次 UE4.27 MCP 的端口配置是多少?
模型: (kb_search "UE4.27 MCP 端口",引用来源路径和行号回答)

架构

  • lib/index.js — host 半边:kb_* 工具 + 系统提示段 + /plugins/dsh-knowledge/api JSON API
  • lib/client.js — 浏览器半边:kbquery 围栏 → 交互式搜索面板(输入框 + 结果卡片)
  • lib/session-log.js — DSH 会话日志读取:zstd 多帧扫描解码(scanZstdFrames)+ JSONL 解析 + 转写提取
  • lib/clip.js — 网页剪藏:内置 fetch + 启发式 HTML→Markdown 正文提取(readability-lite)
  • 存储:node:sqlite(DatabaseSync),docs / chunks / experiences 普通表 + chunks_fts / experiences_fts FTS5 虚拟表(trigram)
  • 分块:按行切块(默认 800 字符/块,120 字符重叠),保留 1-based 行号区间
  • 检索:长词走 FTS5 BM25(OR 组合),短词(中文双字词)走 LIKE 兜底,经验条目与文档统一返回

自测

node scripts/selftest.mjs

自测脚本模拟 DSH 的 ctx 环境,真实调用全部七个工具,验证导入→检索→统计→列出→经验记录→会话读取的全链路。

安全

  • 导入路径解析后必须落在工作区根内(绝对/相对都校验,防越界)
  • 二进制扩展名黑名单拒绝读取
  • 数据库只写 DSH home 下的固定位置,不触碰其他路径

License

MIT