DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Tool Rewind — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
T

@dpskh/tool-rewind

Tool Rewind

DeepSeek Harness 的 Exploration-fold 插件:将自最近的检查点标记(由 @dpskh/tool-checkpoint 插件记录在其存储域中)以来的所有内容折叠为自动生成的报告,在模型可见界面中替换探索过程嘈杂的中间内容,同时持久日志保留完整探索记录以供审计;仅写入核心词汇的会话事件

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:dpskh/dsh-rewind#295f41d3189a07612545b2044dd1460444455822
README兼容性版本

兼容性与来源证明

Tool Rewind 以 @dpskh/tool-rewind 发布,当前版本为 0.2.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/8/21

版本

0.2.0stable
2026/8/21

相关插件

正在加载相关插件…

最新版
0.2.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 2
周下载
0
最近提交
2026/8/21
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 developer-tools 分类下经过校验的插件。

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk Minimal@deepseek-ai/dsh-sdk-minimal独立的最小 SDK 配置包:JSON-RPC、一个 DeepSeek 适配器、持久化 Shell 和 JSONL 会话Sdk App@deepseek-ai/dsh-sdk-appdsh SDK 配置包:基于 dsh-base 提供 stdio JSON-RPC 服务和进程生命周期管理Subagent Codex@deepseek-ai/dsh-subagent-codex基于官方 app-server 协议的一次性 Codex 子代理提供程序

README

@dpskh/tool-rewind — exploration fold for the DeepSeek Harness

English | 中文

dshfind

One package, one entry plugin. Mounting @dpskh/tool-rewind provides ctx.rewind (a service that folds everything since the most recent checkpoint mark into an auto-generated report) and the model-facing rewind tool over it. The fold shadows the exploration's surface range with the report — the same surfaceOp: { op: 'replace' } mechanism the DeepSeek Harness compaction seam uses — so subsequent requests no longer carry the exploration's intermediate steps (reads, searches, experiments), while the durable log keeps the full exploration for audit. The report is produced by ctx.llm (auto-generated); the mark is owned and served by the sibling @dpskh/tool-checkpoint plugin (ctx.checkpoint.latestMark / hasActive / completeFold). This plugin writes no session events of its own — the fold commits only the core-vocabulary user/message replacement, so the durable session log stays readable by any harness. No upstream package is modified.

Configuration

- id: tool-rewind
  name: '@dpskh/tool-rewind'
  config:
    toolName: rewind                # model-facing tool name (default rewind)
    maxTokens: 1024                 # summarization output budget
    maxSummarizationRetries: 2      # empty-completion retries before failing
    summarizationProvider: deepseek # optional override of the routed provider
    summarizationModel: deepseek-chat
    reportLanguage: en              # en | zh (report instruction language)

Provider/model resolution order for the report call: configured overrides, then the session's last routed request/header config, then the agent's options. Missing all three fails loud.

The report call runs with thinking disabled when the route exposes an off reasoning effort — condensing an exploration is mechanical, and a reasoning model's thinking tokens otherwise compete with the report text under maxTokens (thinking can exhaust the budget before any text starts, leaving an empty completion). Empty completions retry up to maxSummarizationRetries; an exhausted budget rejects with a message carrying the finish reason and token usage, which the rejection message preserves.

Working together

The fold needs a marker: mount both plugins so rewind can collapse the exploration anchored by a checkpoint. rewind alone has nothing to fold and fails with a no-checkpoint error; checkpoint alone records inert markers.

- id: tool-checkpoint
  name: '@dpskh/tool-checkpoint'    # https://github.com/dpskh/dsh-checkpoint
- id: tool-rewind
  name: '@dpskh/tool-rewind'
  config:
    reportLanguage: en              # en | zh report instruction language

Contract

  • ctx.rewind.rewind(agent, signal) — read the session's latest mark through ctx.checkpoint; select the surface span after it (never folding the rewind call itself, never splitting a tool-call/result pair at the trailing boundary); summarize the span over ctx.llm; then commit, in one synchronous block, a replacement user/message carrying the report with source marker { kind: 'plugin', plugin: 'rewind' } (isRewindReportSource recognizes it) and stamp the mark folded through ctx.checkpoint.completeFold. Failures write nothing — the region stays intact, the mark stays active, and the fold is retryable — and reject with a classified RewindError (NO_CHECKPOINT, EMPTY_REGION, UNBALANCED, FOLD_IN_PROGRESS, CHANGED, SHRINK). A per-session in-process lock rejects concurrent folds. A mark taken mid-call — the checkpoint tool runs between its own tool-call and result — leaves that result orphaned right after the mark; selection skips exactly that node, so the checkpoint call's own pair stays visible and the fold starts at the exploration that follows. Exploration calls issued in parallel with the checkpoint (same assistant message) leave their results behind the mark too; those are folded, so a parallel exploration never collapses into an empty region.
  • rewind tool — no arguments → { markId, foldedNodes, start, end, foldedChars, reportChars }, where foldedChars is the model-visible text the folded region contributed (assistant text, reasoning, tool-call arguments, and tool outputs) and reportChars is the replacement report's length — the shrink accounting is visible in every result and error. Render intent: generic card.
  • Turn guard — while the session has an active (unfolded) checkpoint mark, agent/turn-stopping injects a standing warning into the agent's next-step inbox (one per agent per turn), so the turn cannot end until rewind folds the exploration. Activeness is read through ctx.checkpoint. A rewind that legitimately fails (e.g. an empty region) cannot trap the turn in a warning loop.

Model Experience

Directly: the rewind tool call and its fold result. The replacement report message is model-visible from the next request on; the exploration's durable events stay in the log but out of the model-visible surface. A tool:rewind system-prompt section makes fold discipline a standing instruction (rewind immediately after the marked exploration, before unrelated work).

KV Cache effect

The report call reuses the session's system prompt and tool schemas so it stays a prefix of the last routed request (warm prefix cache). The fold itself shifts the model-visible prefix of subsequent requests by design.

Known Limitations and Deferred Work

  • Shrink check is char-based — the report must be shorter than the folded region's model-visible text (measured in characters, not tokens); the yardstick counts every block the model reads: assistant/user text, reasoning, tool-call arguments, and tool outputs (recursively). A token-meter-based check would be more precise; image blocks carry no text yardstick and are conservatively ignored.
  • Empty completions on routes without an off reasoning effort — such routes keep their default thinking; if thinking exhausts maxTokens the completion is empty and only the retry budget saves the fold.
  • One fold per marker — folding the same marker twice is rejected as an empty region; a new exploration needs a fresh checkpoint.
  • Mid-exploration compaction — if automatic compaction shadows part of the exploration before rewind runs, the fold covers whatever remains on the surface; the storage-resident mark survives either way.