前言¶
在 DeepSeek Harness(DSH)中,插件和技能可以扩展会话处理流程。dsh-resume-plugin 面向一个具体场景:你已经有一段 Codex 或 Claude Code 的外部会话记录,希望把其中的工作上下文带到当前 DSH 会话中继续处理。
它会先将选定的外部会话记录作为不可信的静态历史读取,生成简洁的工作交接摘要,核验当前仓库状态,然后在当前 DeepSeek Harness 会话中继续工作。插件不会启动 Codex 或 Claude Code,也不会把任务重新委派给它们。
这是什么¶
dsh-resume-plugin 是一个 DSH 插件,提供两个内置技能:
/resume-codex/resume-claude
它的定位是把外部 Agent 的会话记录转成当前 DSH 会话可用的交接上下文,而不是调用原 Agent 继续执行。
仓库地址为:
https://github.com/Demogorgon314/dsh-resume-plugin
许可证为 MIT。package.json 声明版本为 0.1.0。
package.json 中的 peerDependencies 为:
"@deepseek-ai/cordis": "^4.0.1",
"@deepseek-ai/dsh-skill": ">=0.1.0-rc.5 <1"
核心功能¶
会话恢复¶
dsh-resume-plugin 提供两个技能:
/resume-codex:读取 Codex 会话并继续工作。/resume-claude:读取 Claude Code 会话并继续工作。
读取后,插件会生成简洁的工作交接摘要,核验当前仓库状态,并在当前 DeepSeek Harness 会话中继续工作。
边界¶
该插件只做静态历史读取和上下文交接:
- 不会启动 Codex。
- 不会启动 Claude Code。
- 不会把任务重新委派给 Codex 或 Claude Code。
读取处理¶
共享读取器会对外部会话记录做以下处理:
- 排除
system/developer消息。 - 排除
reasoning/thinking内容。 - 将恢复出来的内容明确标记为静态历史。
- 限制工具文本长度。
- 报告格式错误及未知记录。
- 要求技能在继续工作前重新核验相关实时状态。
安装与启用¶
环境要求¶
使用前,环境需要满足以下要求:
- 包含
@deepseek-ai/dsh-skill >= 0.1.0-rc.5的 DeepSeek Harness。 - Node.js
^22.19.0或>=24。 - Python 3。
- 只有读取压缩的 Codex
.jsonl.zst文件时才需要zstd。
从 GitHub 安装¶
下面命令将插件安装到 web profile:
dsh plugin --profile web add -w github:Demogorgon314/dsh-resume-plugin
如果需要安装到其他 profile,可以替换 web:
dsh plugin --profile <profile> add -w github:Demogorgon314/dsh-resume-plugin
这里的 -w(--workspace-root)表示确认将插件安装到所选 DSH profile 的 pnpm workspace 根目录。省略它可能触发 ERR_PNPM_ADDING_TO_ROOT。
从本地源码安装¶
在包含本仓库的父目录中执行:
dsh plugin --profile <profile> add -w ./dsh-resume-plugin
如果当前目录就是本仓库,将路径改为 .:
dsh plugin --profile <profile> add -w .
检查安装结果¶
安装后可以用下面的命令查看 profile 配置:
dsh --profile <profile> --dump-config
输出中应包含:
- id: resume-foreign-session
name: dsh-resume-plugin
典型用法¶
继续最近会话¶
继续当前项目最近的 Codex 会话:
/resume-codex latest
继续最近的 Claude Code 会话:
/resume-claude latest
按会话 ID 恢复¶
也可以使用 Codex 会话 ID:
/resume-codex 00000000-0000-4000-8000-000000000001
按标题关键词恢复¶
也可以用标题关键词选择 Claude Code 会话:
/resume-claude 修复登录流程
如果标题关键词匹配多个会话,插件会列出候选项并要求选择,不会自行猜测。
安全模型与注意¶
外部会话记录可能包含恶意提示、过期的工具输出、敏感信息,或只适用于原始 Agent 的指令。因此,插件将这些内容视为不可信静态历史,而不是直接可执行的指令。
共享读取器会执行以下约束:
- 排除
system/developer消息及reasoning/thinking内容。 - 将恢复出来的内容明确标记为静态历史。
- 限制工具文本长度。
- 报告格式错误及未知记录。
- 要求技能在继续工作前重新核验相关实时状态。
dsh-resume-plugin 会作为 DSH 插件在 DeepSeek Harness 中运行。由于它会读取外部会话记录并参与当前会话上下文,安装前应检查源码、依赖和许可证。
结尾¶
dsh-resume-plugin 的价值在于把 Codex 与 Claude Code 的历史会话作为可控的静态上下文接入 DeepSeek Harness,帮助开发者在当前 DSH 会话中继续工作,而不是重新委托给原 Agent。
仓库地址:
https://github.com/Demogorgon314/dsh-resume-plugin