dpskh/dsh-checkpoint
在会话中标记探索的起始点;与rewind配对使用,可将探索内容从上下文中折叠出来。
项目介绍Project Overview
@dpskh/tool-checkpoint 是 DSH 插件,挂载后提供 ctx.checkpoint 服务与模型可调用的 checkpoint 工具,按会话 ID 在插件自有存储中持久记录探索起点标记,标记不写入会话日志。适合在多步调查、搜索或实验前打点,供配套 rewind 插件将标记后的过程折叠为报告。注意:本插件只记录标记,不执行折叠;单独使用时标记保持惰性,需配合 @dpskh/tool-rewind 才生效。
@dpskh/tool-checkpoint is a DSH plugin that provides the ctx.checkpoint service and a model-facing checkpoint tool. It durably records an exploration start marker per session in plugin-owned storage, without writing to the session log. Use it before multi-step investigations, searches, or experiments so the companion rewind plugin can later fold that span into a report. Caveat: this plugin only marks; it never folds, so markers remain inert unless paired with @dpskh/tool-rewind.
请帮我了解并安装插件:【dsh-checkpoint】【https://github.com/dpskh/dsh-checkpoint】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add github:dpskh/dsh-checkpoint
把 dpskh/dsh-checkpoint 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
@dpskh/tool-checkpoint — checkpoint marker for the DeepSeek Harness
English | 中文
One package, one entry plugin. Mounting @dpskh/tool-checkpoint provides ctx.checkpoint (a service that durably records a checkpoint mark in the plugin-owned storage domain, keyed by session id) and the model-facing checkpoint tool over it. The marker records the conversation position an exploration starts from; the sibling @dpskh/tool-rewind plugin folds everything after the marker into an auto-generated report, keeping the exploration's noisy middle (reads, searches, experiments) out of the model-visible context while the durable log retains the full exploration for audit. This plugin never folds anything itself — the marker stays inert until a rewind.
The mark is not a session event: it lives in the checkpoint storage domain (~/.dsh/storages/checkpoint.json), so the durable session log stays purely core-vocabulary and remains readable by any harness — an out-of-repo plugin event would be refused by harnesses whose vocabulary lacks it. rewind consumes marks exclusively through this service.
Configuration
- id: tool-checkpoint
name: '@dpskh/tool-checkpoint'
config:
toolName: checkpoint # model-facing tool name (default checkpoint)
Working together
The marker only earns its keep with a fold: mount both plugins so rewind can collapse the exploration the marker anchors. checkpoint alone records inert markers; rewind alone has nothing to fold and fails with a no-checkpoint error.
- id: tool-checkpoint
name: '@dpskh/tool-checkpoint'
- id: tool-rewind
name: '@dpskh/tool-rewind' # https://github.com/dpskh/dsh-rewind
config:
reportLanguage: en # en | zh report instruction language
Contract
ctx.checkpoint.mark(session, objective?)— record a durable mark for the session in the plugin-owned storage domain, keyed by session id, and return{ id, logLength }.idis the plugin-owned monotonic marker identity;logLengthis the session log length at mark time (the fold anchor: the seq of the first event after the marker). A numberedturnrecords the open turn the marker was taken in;nullmarks an idle session. The mark lives outside the session log, so compaction or a later fold never shadows it and it stays locatable no matter what happens between mark and rewind.ctx.checkpoint.latestMark(sessionId)/ctx.checkpoint.hasActive(sessionId)/ctx.checkpoint.completeFold(sessionId, id)— the consumption surfacerewinduses: read the latest mark, ask whether a fold is still owed, and stamp a mark folded after a successful fold.checkpointtool —{ objective?: string }→{ id, logLength }. The model calls it before an exploration whose intermediate steps would clutter the context, thenrewindfolds everything since the mark into an auto-generated report. Render intent: generic card.
Model Experience
Directly: the checkpoint tool call and its { id, logLength } result. The tool description teaches the mark-then-rewind workflow; a tool:checkpoint system-prompt section makes it a standing instruction (mark before any investigation that will take more than one tool call, rewind before finishing the turn). The marker itself never enters the model-visible history and never enters the session log.
KV Cache effect
Prefix-stable: the tool schema is fixed; markers are storage records, not session events, so they never alter the request prefix.
Known Limitations and Deferred Work
- Marker without a rewind is inert — a checkpoint that is never rewound costs nothing but leaves the exploration in context; the workflow depends on the model pairing mark and rewind.
- One fold per marker —
rewindfolds from the most recent marker; folding the same marker twice is rejected as an empty region.
nexu-io/open-design
freestylefly/awesome-gpt-image-2
anywhere-labs/dsh-desktop
walkinglabs/learn-harness-engineering
awesome-dsh-plugin/awesome-dsh-plugin
MemTensor/MemOS