dsh-tool-result-pruner-plus

DSH PLUGIN记忆与知识

仓库 MathieuPortmann/dsh-tool-result-pruner-plus

记忆与知识 L4 · 沙盒安装通过 安全审查:低风险 可信度:银 可安装插件
安装这个插件

dsh-tool-result-pruner-plus 是 MathieuPortmann 维护的 记忆与知识 类 DSH 可安装插件, 仓库为 MathieuPortmann/dsh-tool-result-pruner-plus,许可证 MIT。 下面按「装什么、怎么装、验没验过、跑起来要注意什么」逐项列出。

一句话选型结论

按资料字段整理

dsh-tool-result-pruner-plus 是记忆与知识类的 DSH 可安装插件,验证等级 L4 · 沙盒安装通过,安全审查为低风险,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类记忆与知识 收录类型可安装插件 验证等级L4 · 沙盒安装通过 安全审查低风险
验证等级 L4 L4 · 沙盒安装通过
GitHub 星标 0 复刻 未标注 · 未关闭 issue 未标注
最近更新 2026-10-25 创建于 未标注
README 4.7 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add github:MathieuPortmann/dsh-tool-result-pruner-plus#v0.1.0
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名未发布到 npm可用 npm view 查看包信息

能做什么

记忆与知识
字段来自项目仓库与公开索引,中文说明由本站标注

适用场景

记忆

验证等级与安全审查

L4 · 沙盒安装通过
自动化流程结论,不是人工审核
验证等级L4 · 沙盒安装通过安装命令在隔离沙盒内真实执行成功,无依赖错误
安全审查低风险静态分析结论,未标注不代表已通过审查
仓库健康度活跃按仓库活跃度与最近更新时间给出
可信度银综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 验证等级 L4:在沙盒里真实装过,依赖能装上,不是纸面声明。
  • 静态安全审查为低风险,没有发现明显可疑行为。
  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有声明 Node.js 版本要求,版本不匹配可能装不上。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在记忆与知识场景里给 DSH 补能力的人。
  • 想装完就能用、不想自己排依赖的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-tool-result-pruner-plus当前 L4 · 沙盒安装通过 低风险 0 未标注 有
ruflo L3 · 安装规范通过 低风险 7.4 万 未标注 无
OpenViking L3 · 安装规范通过 低风险 3.9 万 未标注 无
WeKnora L4 · 沙盒安装通过 低风险 3.3 万 未标注 有
distilly L4 · 沙盒安装通过 低风险 2.5 万 未标注 有
EverOS L4 · 沙盒安装通过 低风险 1.3 万 未标注 有

仓库档案

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

README 全文

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

dsh-tool-result-pruner-plus

Drop-in replacement for DSH's tool-result pruner
(@deepseek-ai/dsh-compaction-tool-result-pruner). When a long tool result is cut to save
context, the result now starts with a notice that says it is incomplete, what is missing,
and exactly how to read it back.

> Maintenance: best-effort. Issues may go unanswered; forks are welcome.

Why

The stock pruner keeps the first 4096 and the last 1024 characters of an oversized result and
puts [... tool result middle pruned ...] in between. A model reads 4 KB of normal-looking
output before it meets that marker, with no size, no range and no way back. Small models then
conclude that something is absent, re-run the same command (cut the same way), or work from an
amputated file. See deepseek-harness discussion 8153,
whose head-notice proposal this plugin implements.

What the model sees

[INCOMPLETE tool result (pruned): you see only part of it. The full result was 48970 chars over 851 lines. Shown: chars 1-4096 and chars 47947-48970. NOT shown: chars 4097-47946.
Source: read {"file_path":"/home/u/inventory.txt"} at 2026-10-25T17:26:10.802Z; it may have changed since.
File lines 71-829 are missing or partial: do not conclude that something is absent from the file before checking them. Looking for something specific: search for it first (grep -n), or read only the lines you need. To read all of them: read file_path="/home/u/inventory.txt" offset=71 limit=131, then continue from the next offset (6 reads in all). Do not run the same command or read again unchanged: it is cut the same way.]

then the usual head, a middle marker that names its range
([... chars 4097-47946 not shown; see the notice at the top ...]), and the tail.

  • read results: the missing file lines come from the N: prefixes on both sides of the
    cut (the tail's first line is ignored, since it starts mid-line). The slice size comes from the
    gap's own average line length and stays under the threshold, so the recovery read is not cut
    again. If one line is longer than a result can hold, the notice says to search instead.
  • Other tools: the notice gives the first missing output line and suggests
    sed -n 'A,Bp' in pieces, grep, or writing the output to a file.
  • A result that was already cut is labelled as such, without a line hint (its counts are of
    what was left, not of the original).
  • Budget: the notice fits between head and tail; if needed the head is shortened (never below
    1024 chars). When even that is not enough, or anything about a result is unexpected, that result
    gets the stock cut. One malformed event skips only that result.

Measured effect

Disposable DSH 0.2.1-rc.2 profile, qwen3.5:9b on Ollama (32K window), same prompt each time:
read a 845-line file (45 KB) and say whether any item carries a CODE= value (one does, on
line 517, inside the pruned middle).

Pruner Correct answers
stock 0 / 4 (all four answered "none")
this plugin 4 / 4 (each followed the notice: one grep CODE= on the file, then the right answer; 2 tool calls)

Install

dsh plugin --profile web add github:MathieuPortmann/dsh-tool-result-pruner-plus

The pruner lives inside each agent preset's compaction group, so installing the package is not
enough: in your profile's cordis.patch.yml, wherever a preset lists

- id: tool-result-pruner
name: '@deepseek-ai/dsh-compaction-tool-result-pruner'

change the name to 'dsh-tool-result-pruner-plus' (keep the config block). Check with
dsh --profile web --dump-config | grep -A1 'id: tool-result-pruner', then restart. To go back,
restore the stock name.

Configuration

The stock keys, defaults and validation, unchanged: thresholdChars (8192), headChars (4096),
tailChars (1024).

Compatibility

Component Supported
Node.js ^22.19.0 \|\| >=24.0.0
DSH >=0.2.0-rc.2 <0.3.0; extends the installed stock ToolResultPruner class and imports @deepseek-ai/dsh-llm (both declared as optional peerDependencies)
Platform any; pure JavaScript

Tested on DSH 0.2.1-rc.2.

Permissions and external services

Capability Used for
Files, network, commands none
Dynamic module loading loads the stock pruner and @deepseek-ai/dsh-llm from the DSH installation running the plugin; nothing is downloaded
Session log the same compaction/prune + tool/result replace events as the stock pruner; tool-call arguments (cut to 200 chars) are quoted in the notice

Develop

npm test   # 9 standalone tests of lib/notice.js, no DSH needed

License

MIT

常见问题

5 问
答案由本站依据条目字段整理,不引用上游原文
dsh-tool-result-pruner-plus 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add github:MathieuPortmann/dsh-tool-result-pruner-plus#v0.1.0` 即可。

dsh-tool-result-pruner-plus 的验证等级是什么意思?

L4 · 沙盒安装通过。安装命令在隔离沙盒内真实执行成功,无依赖错误

dsh-tool-result-pruner-plus 安全吗?

低风险。

dsh-tool-result-pruner-plus 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-tool-result-pruner-plus 用的是什么许可证?

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

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

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 万 星

MathieuPortmann 的其它插件

6 个

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