dsh-plugin-knowledge-graph

DSH PLUGIN记忆与知识

仓库 Luke-Yong/dsh-plugin-knowledge-graph · npm dsh-plugin-knowledge-graph

记忆与知识 L5 · 运行验证通过 安全审查:低风险 可信度:金 可安装插件
安装这个插件

为 DeepSeek Harness 提供代码知识图谱工具,通过 read_graph 查询文件结构、符号导出与依赖关系,加速代码理解。

验证等级 L5 L5 · 运行验证通过
GitHub 星标 4 复刻 0 · 未关闭 issue 0
最近更新 2026-08-17 创建于 2026-08-14
README 3.4 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add github:Luke-Yong/dsh-plugin-knowledge-graph
兼容 DSH 版本0.2.0-rc.2 等 11 个版本版本不匹配时安装会报错
Node.js 要求>=22.19来自仓库 package.json 的 engines 字段
前置依赖@deepseek-ai/cordis@*、@deepseek-ai/dsh-tools@*需要同时安装的同级依赖
npm 包名dsh-plugin-knowledge-graph可用 npm view 查看包信息

能做什么

4 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-plugin-knowledge-graph:DeepSeek Harness 的代码库知识图谱插件

  • 构建代码知识图谱
  • 查询文件与符号关系
  • 识别未使用的导入
  • 支持 TS/JS 与 Python

适用场景

文件读写记忆

上游标签

dsh-plugin

验证等级与安全审查

L5 · 运行验证通过
自动化流程结论,不是人工审核
验证等级L5 · 运行验证通过在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来
安全审查低风险静态分析结论,未标注不代表已通过审查
仓库健康度稳定按仓库活跃度与最近更新时间给出
可信度金综合仓库活跃度与验证结果

上面的结论来自上游最近一次自动化验证(2026-10-08): 同一套检查会在插件发新版后重跑,页面显示的是最新一次的逐项结果。

逐项检查结果

L1 · 已找到 ✓ 通过
  • L1.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L2 · 结构化 ✓ 通过
  • L2.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L3 · 安装规范 ✓ 通过
  • L3.1_INSTALL_COMMAND_PARSED 安装命令已解析 方式:安装规范解析
  • L3.2_DSH_VERSION_DECLARED DSH 版本已声明 方式:DSH 版本声明
L4 · 安装已测 ✓ 通过
  • L4.1_INSTALL_EXECUTED_CONFINED 受限沙盒内执行安装 方式:沙盒安装执行
  • L4.2_INSTALL_SUCCESS 沙盒安装成功 方式:沙盒安装执行
  • L4.3_ARTIFACT_CONFIRMED 安装产物已确认 方式:沙盒安装执行
L5 · 运行已测 ✓ 通过
  • L5.1_INSTALL_PASSED_SANDBOXED 沙盒安装通过 方式:沙盒安装执行
  • L5.2_WEB_BOOT_READY Web 启动就绪 方式:Web 启动
  • L5.3_HTTP_SERVED HTTP 服务响应 方式:HTTP 请求
  • L5.4_PLUGIN_INVENTORY_ACTIVE 插件清单中已激活 方式:插件清单查询
— · 其它检查项
  • L4_0_SANDBOX 沙盒安装判定 方式:沙盒安装执行

风险详情

  • 审查结论 通过
  • 结论说明 vet 静态分析未发现可疑行为,判定为干净(clean)。
  • 风险计数 严重 0 / 高 0 / 中 0
  • 风险详情 未发现严重或警告级问题。

仓库档案

记忆与知识
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方Luke-Yong仓库 dsh-plugin-knowledge-graph · 默认分支 main
分类记忆与知识memory
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言TypeScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue4 / 0 / 0收录时的数值,非实时
创建 / 更新2026-08-14 · 2026-08-17最后推送 2026-08-17
本站收录2026-08-17首次进入本站目录的时间

README 全文

3.4 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-plugin-knowledge-graph

A DeepSeek Harness (DSH) plugin that exposes a read_graph tool backed by a codebase knowledge graph. The graph tracks every file, directory, exported symbol, and their relationships so an agent can answer structural and dependency questions faster than grepping or reading files.

> Status: infancy. This project is in its infancy stage. Execution behavior, the query surface, and compatibility may change while the project is iterated on and tested by the open source community.

> Derived work. This project is derived from the knowledge graph tool in Luke-Yong/H, adapted to DeepSeek Harness's "everything is a plugin" model.

What it does

Given a workspace root, the plugin builds an in-memory graph and answers queries such as:

  • structure — print the full directory tree
  • exports — list every symbol exported by a file
  • imports_of — list symbols a file imports (with their source files; stdlib/third-party imports are tagged)
  • exporters_of — find which files export a symbol
  • dependents — find which files import from a file
  • unused_imports — list imports never referenced in the file

Symbols are parsed from TypeScript/JavaScript (via the TypeScript compiler API) and Python (module-level def, class, and name = value bindings).

Graph model

The graph uses three node types and four edge types:

Nodes Meaning
dir A directory
file A source file
symbol An exported symbol (function, class, const, type, interface, enum, default)
Edges Meaning
CONTAINS Structural parent → child (dir → dir/file, file → symbol)
EXPORTS File → symbol it exports
IMPORTS File-level dependency (file → file)
IMPORTS_SYMBOL Precise symbol-level dependency (file → symbol)

Installation

Install with the DSH CLI into a profile:

dsh plugin --profile web add github:Luke-Yong/dsh-plugin-knowledge-graph

Pin to a specific commit for reproducibility:

dsh plugin --profile web add github:Luke-Yong/dsh-plugin-knowledge-graph#

Usage

The plugin registers a single tool, read_graph, on ctx.tools. Its parameters:

Parameter Type Required Description
query string yes Query string in form
root string no Absolute workspace root to graph. Defaults to process.cwd()

> Root hygiene: the root default (process.cwd()) may be a parent directory containing several independent projects. Always pass an explicit root pointing at the single workspace you are working in, so structure doesn't descend into sibling trees.

Example queries:

exports src/index.ts
exporters_of buildKnowledgeGraph
imports_of src/query.ts
dependents src/knowledgeGraph.ts
unused_imports app.py
structure

Project structure

src/
index.ts         Plugin entry — registers the read_graph tool
knowledgeGraph.ts  Graph builder (filesystem walk, import/export parsing, serialization)
query.ts         Query engine (runGraphQuery)

Building

npm run build   # tsc -p tsconfig.json

Output is emitted to dist/ (dist/index.js is the package entry point).

License

MIT

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
dsh-plugin-knowledge-graph 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add github:Luke-Yong/dsh-plugin-knowledge-graph` 即可。对应的 npm 包名是 `dsh-plugin-knowledge-graph`。

dsh-plugin-knowledge-graph 的验证等级是什么意思?

L5 · 运行验证通过。在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来

dsh-plugin-knowledge-graph 安全吗?

低风险。vet 静态分析未发现可疑行为,判定为干净(clean)。

dsh-plugin-knowledge-graph 支持哪些 DSH 版本?

上游记录的兼容版本包括 0.2.0-rc.2、0.2.0-rc.1、0.1.7-rc.2、0.1.7-alpha.2、0.1.6-alpha.2、0.1.6-alpha.1、0.1.5-rc.2、0.1.3-alpha.2。版本较多,只列出前 8 个。

dsh-plugin-knowledge-graph 需要什么运行环境?

Node.js >=22.19;需要同时安装 @deepseek-ai/cordis@*、@deepseek-ai/dsh-tools@*。环境不满足时安装会失败,建议先确认本机版本。

dsh-plugin-knowledge-graph 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-plugin-knowledge-graph 有哪些功能?

构建代码知识图谱、查询文件与符号关系、识别未使用的导入、支持 TS/JS 与 Python。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

记忆与知识
按星标排序,可作替代方案

ruflo

ruflo

L3 · 安装规范通过 7.4 万 星

OpenViking

OpenViking

面向 DeepSeek Harness 的 OpenViking 记忆与上下文插件:pre-step 自动召回与画像注入、会话捕获、`vik

L3 · 安装规范通过 3.9 万 星

WeKnora

WeKnora

把 WeKnora 知识库接入 dsh 的四个只读工具:列出知识库、混合检索原文片段、按顺序还原单篇文档,以及直接取用 WeKnora 自己

L4 · 沙盒安装通过 3.3 万 星

distilly

distilly

Distilly — Distill how they think into reusable Skills for any Agent o

L4 · 沙盒安装通过 2.5 万 星

EverOS

EverOS

L4 · 沙盒安装通过 1.3 万 星

MemOS

MemOS

L4 · 沙盒安装通过 1.2 万 星

Luke-Yong 的其它插件

1 个

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 2026-10-08。