dsh-graft-plugin

DSH PLUGIN记忆与知识

仓库 adithyanraj03/dsh-graft-plugin · npm dsh-graft-plugin

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

为 DeepSeek Harness 接入 graft 代码图谱:把每个符号的 file:line 位置与调用关系同时呈现给你和模型,提供五个查询工具、状态芯片与自动重建索引。

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

安装

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

能做什么

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

dsh-graft-plugin:为 DeepSeek Harness 提供代码图谱索引

  • composer 芯片显示索引状态与省下 token
  • 五个 graft 工具供模型查询调用关系
  • /graft 建索引并自动重建
  • graft viz 在侧边栏打开图谱

适用场景

代码评审文件读写

上游标签

ai-agentscode-graphcode-indexingcode-intelligencecontext-engineeringdeveloper-toolsdshdsh-plugingraftjavascriptllmstatic-analysis

验证等级与安全审查

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 插件清单中已激活 方式:插件清单查询

风险详情

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

仓库档案

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

README 全文

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

dsh-graft-plugin

A DeepSeek Harness plugin that puts graft — a prebuilt graph of every symbol, its file:line span, and who calls what — in front of both you and the model.

It does four things:

  • A chip in the composer naming the graft index the current session is actually serving, whether it still matches the code, and how many tokens graft has saved in that repo.
  • Five tools for the model — graft_ask, graft_grep, graft_callers, graft_skeleton, graft_map — resolved per session, so one dsh can serve several workspaces at once.
  • /graft to build or rebuild the index, and auto-rebuild after the model edits files.
  • A graft viz button that opens the graph in dsh's built-in right sidebar (0.1.5+), in dsh-better-sidebar if you still run it, and in a browser tab as the last resort.

Install

dsh plugin --profile web add dsh-graft-plugin
dsh --profile web

pnpm 10 and later block postinstall scripts from unapproved packages, and dsh skips writing the plugin's bundle row whenever the install exits non-zero — the dependency lands, the plugin stays invisible, and dsh starts up cleanly with no error to search for. If add ends with ERR_PNPM_IGNORED_BUILDS, approve and re-run it:

cd ~/.dsh/profiles/web && pnpm approve-builds      # tick dsh-graft-plugin
dsh plugin --profile web add dsh-graft-plugin      # re-run so the bundle row gets written

Confirm it mounted — the plugin must appear in both dependencies and dsh.profile.bundles in the profile's package.json:

cd ~/.dsh/profiles/web && node -e "const p=require('./package.json');
console.log(p.dependencies['dsh-graft-plugin'],
p.dsh.profile.bundles.includes('dsh-graft-plugin'))"

Every tool here shells out to the graft CLI, so it needs @nanonets/graft on PATH:

npm install -g @nanonets/graft

A postinstall does this for you when your package manager runs lifecycle scripts — under pnpm 10+ they are blocked by default, so treat the command above as the required step there, not a fallback. If your global npm prefix needs elevation, the postinstall says so and prints the one command to run by hand.

Then index a repo once:

cd
graft build

In the desktop app

The desktop dsh installs plugins from its own Plugins settings — no CLI, no profile directory:

  1. Open Plugins (settings, left sidebar) and click Add plugin.
  2. Paste the GitHub repository address into the field (the package name dsh-graft-plugin works too):
https://github.com/adithyanraj03/dsh-graft-plugin
  1. Click Install.

The dialog switches to the Installed confirmation, and the plugin appears under Installed at the bottom of the settings page:

> The dialog notes that installed plugins do not update automatically yet — to upgrade, uninstall and install again. The graft CLI requirement (npm install -g @nanonets/graft) is the same.

The sidebar tab

On dsh 0.1.5 and later the button opens the graph in dsh's own right sidebar — a tab titled Graft, also listed on the sidebar's guide page as "The graft graph for this workspace" — and a second click focuses the tab that is already open. No install needed for that path: the registration is soft, so an older dsh without the right sidebar falls through to dsh-better-sidebar when it is mounted, and to a browser tab when neither is there.

If your profile still runs dsh-better-sidebar, that path is tried first and behaves exactly as before. It ships as a dependency of this plugin (0.18.x), so it is already downloaded — but dsh only mounts what the profile lists:

dsh plugin --profile web add dsh-better-sidebar

> Compatibility. dsh-better-sidebar 0.18.x requires @deepseek-ai/dsh-client-ui-primitives, which dsh removed in 0.1.5-rc.2. On that version or later it will not mount — which is exactly the profiles where the built-in right sidebar takes over instead. Everything else in this plugin — chip, tools, /graft, auto-rebuild — is unaffected.

The chip, the tools, /graft and the auto-rebuild all work without any sidebar; the button simply falls back to a browser tab when neither one is present.

> This plugin does not insert a dsh-better-sidebar row itself, on purpose. That package's own bundle row carries a guard that disables it when another enabled row already mounts the same package. A second row with a different id makes that guard circular, and the losing outcome is your existing sidebar silently disabling itself. One explicit command is worth more than that risk.

What you get

The chip

Sits in the composer next to the model name:

● graft · my-repo          in sync
◐ graft · my-repo          syncing
▲ graft · my-repo          stale

Hovering (or clicking) opens a card with the resolved root, node and edge counts, freshness, the running saved-token tally, and the graft viz button.

The root is resolved from the session's own workspace, not from wherever dsh was launched. That is the whole reason this exists rather than the graft mcp server: graft mcp resolves its repo once, from its own working directory at startup, and nothing can re-point it afterwards. Launched from a home directory it answers "no graph found" for every workspace you open.

The visualiser

The graft viz button opens the graph as a tab — in dsh's built-in right sidebar on 0.1.5+, in dsh-better-sidebar if that is what you run. The context view lays out the whole graph:

The code view drills into a single file — what it contains, what it depends on, what depends on it:

The tools

tool what it answers
graft_ask "how does X work" / "where is Y" — ranked hits with code inlined at exact file:line
graft_grep every occurrence, grouped by enclosing symbol (graft_ask is top-N and misses some)
graft_callers who calls a symbol, what it calls, or the full blast radius before a rename
graft_skeleton a file's whole API in ~200 tokens
graft_map orientation in an unfamiliar tree

None of them take a boolean parameter. They take string enums instead — detail: "full" rather than full: true — which reads better to a model and sidesteps a real failure mode on some OpenAI-compatible servers, where a tool call that sets a boolean is emitted as literal `` text and never runs.

/graft

  • /graft — build the index, or rebuild it if one exists
  • /graft status — what the chip knows, as text
  • /graft deep — a full rebuild

Auto-rebuild

After the model writes or edits files, the index is rebuilt in the background, debounced so a long turn does not rebuild on every keystroke. This reuses graft's own sync runner rather than reimplementing it, so it cannot drift from what graft build does.

Configuration

All optional, all on the plugin's row in your profile's cordis.patch.yml:

- id: graft-status
name: 'dsh-graft-plugin'
config:
cwd: 'C:/path/to/repo'   # pin to one repo instead of resolving per session
tools: false             # drop the graft_* tools, keep the chip
command: false           # drop /graft
promptSection: false     # stop telling the model to prefer graft
autoBuild: false         # stop rebuilding after edits

Requirements

dsh status
0.1.2-rc.1 – 0.1.0-rc.7 tested, full feature set — the graft viz tab via dsh-better-sidebar
0.1.5-rc.2 / 0.1.5 tested — chip, tools, /graft and auto-rebuild all work; on 0.1.5 the graft viz button opens the graph in the built-in right sidebar
0.2.0-rc.2 needs plugin 0.2.1+ — earlier releases fail to activate (see Troubleshooting)
  • Node 22+
  • the graft CLI on PATH (npm install -g @nanonets/graft)

The client bundle requires only react, which is why it survives the dsh 0.1.5-rc.2 client-package removals that broke several neighbouring plugins.

Development

npm install
npm test           # portable: builds a synthetic graft index in a temp dir
npm run test:live  # drives the real graft CLI against a real repo

npm test needs no graft index and no graft install anywhere on the machine. The one suite that does build a real index skips itself, loudly, when graft is absent — a missing CLI is a setup state, not a defect.

Two identifiers, deliberately different

The cordis row id (graft-status) is this plugin's own handle — it keys the storage file, the prompt section and every effect label, and is stable across renames.

The client bundle's __ModuleLoader__.load({ id }) is not that handle. It must be the published package name: dsh builds each client row from entry.options.name — the name: in cordis.patch.yml — serves the bundle at /plugins//client.js, then asserts that a factory registered under that same name. Using the row id there fails every boot with:

bundle /plugins/dsh-graft-plugin/client.js loaded without
registering "dsh-graft-plugin" via __ModuleLoader__.load

npm test guards this both ways (the guard was added with the 0.1.1 fix).

Troubleshooting

No chip appears and dsh started without errors. The plugin is in the profile's package.json dependencies but not in dsh.profile.bundles — which happens under pnpm 10+ when the add ends non-zero on ERR_PNPM_IGNORED_BUILDS; dsh skips the bundle row in that case and starts up looking healthy. Fix: pnpm approve-builds in the profile directory (tick dsh-graft-plugin), then re-run dsh plugin --profile web add dsh-graft-plugin. If pnpm approve-builds reports nothing awaiting approval, check pnpm-workspace.yaml for an unanswered dsh-graft-plugin entry (pnpm's approval placeholder) and set its value to true first.

On dsh 0.2 the plugin fails to load with strict codec has no create() factory, and dsh offers to remove it. dsh 0.2 requires every strict remote codec to carry a create() schema factory; plugin releases before 0.2.1 only had the 0.1 schema key. Update to 0.2.1 or later, which carries both and so loads on 0.1 and 0.2.

/graft says the graft CLI is not on PATH. The postinstall was blocked or skipped (see Install): npm install -g @nanonets/graft.

Licence

MIT

常见问题

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

在 DSH 里执行 `dsh plugin --profile web add dsh-graft-plugin` 即可。对应的 npm 包名是 `dsh-graft-plugin`。

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

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

dsh-graft-plugin 安全吗?

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

dsh-graft-plugin 支持哪些 DSH 版本?

上游记录的兼容版本包括 0.2.0-rc.2、0.2.0-rc.1、0.1.7-rc.2、0.1.7-rc.1、0.1.6-alpha.2、0.1.6-alpha.1。

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

Node.js >=22;需要同时安装 @deepseek-ai/dsh-typert-protocol@>=0.1.0-rc.6。环境不满足时安装会失败,建议先确认本机版本。

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

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

dsh-graft-plugin 有哪些功能?

composer 芯片显示索引状态与省下 token、五个 graft 工具供模型查询调用关系、/graft 建索引并自动重建、graft viz 在侧边栏打开图谱。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 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 万 星

adithyanraj03 的其它插件

2 个

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