@dpskh/tool-rewind
Exploration-fold plugin for the DeepSeek Harness: folds everything since the most recent checkpoint mark (recorded by the @dpskh/tool-checkpoint plugin in its storage domain) into an auto-generated report, replacing the exploration's noisy middle in the model-visible surface while the durable log keeps the full exploration for audit; writes only core-vocabulary session events
AI 分析
核心用途是节省 Token 并清理上下文噪音。适合长对话、多步骤调试任务。必要条件:需配合 @dpskh/tool-checkpoint 插件使用。
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:dpskh/dsh-rewindドキュメント
README 全文を読む ↗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.