DeepSeek Harness 插件

zhangguiping-xydt/dsh-session-lab

Star 数 ★ 0 分类 技能包 收录于 2026-08-31

用于打包可验证会话、评测可复用技能和对比受控会话轨迹的 DSH 工作流。

安装

# Release 预构建包

dsh plugin --profile web add "https://github.com/zhangguiping-xydt/dsh-session-lab/releases/download/v0.1.0/dsh-session-lab-v0.1.0.tgz"

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:zhangguiping-xydt/dsh-session-lab

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

面向 DeepSeek Harness 的会话证据打包、Skill 评测与受控轨迹对比工具包。

English | 中文

DSH Session Lab 是一个独立的 DeepSeek Harness(DSH)社区插件包,用于把一次成功的 Agent 会话转化为可分享的证据、可评测的 Skill 和可对比的受控实验。

本项目是独立的 pre-1.0 社区插件包,不是 DeepSeek 官方产品,也不代表 DeepSeek 立场。

三个工作 Skill

你要做什么 使用 产出
分享或归档一次会话 dsh-capsule 已脱敏、带完整性校验的 .dshc 证据包
把成功会话沉淀成可复用工作流 dsh-teach 候选 Skill、独立 baseline/treatment 评测报告
理解两次运行为什么不同 dsh-time-machine 基于共同切点的轨迹比较和因果限制说明

30 秒开始

环境要求:Node.js 22.19+ (或 24+)用于 DSH 和插件安装,Python 3.10+ 用于 Skill 辅助脚本。

在已有 DSH profile 中从 GitHub 安装:

dsh plugin --profile web add github:zhangguiping-xydt/dsh-session-lab

要固定到已审阅的版本:

dsh plugin --profile web add github:zhangguiping-xydt/dsh-session-lab#v0.1.0

如果没有全局 dsh 命令:

npx --yes @deepseek-ai/dsh@latest plugin --profile web add \
  github:zhangguiping-xydt/dsh-session-lab

安装后重启 DSH profile。可用下面的命令检查插件层是否加载:

dsh --profile web --dump-config | rg '# == dsh-session-lab'

在 DSH Web UI 的“Settings → Plugins → Plugin list”中,也可以搜索并确认 session-lab 已显示为 Mounted、Enabled:

DSH Session Lab 已安装在 DSH Web UI 中

然后在会话中明确调用:

Use $dsh-capsule to package and verify this DSH export.
Use $dsh-teach to extract and independently evaluate a Skill from this successful session.
Use $dsh-time-machine to compare these two sessions from their common completed turn.

使用时要知道的事

  • dsh-capsule 只处理你明确提供的 DSH /export 文件,不会读取 $DSH_HOME/sessions 中的内部压缩存储。
  • 原始导出、补丁、图片和报告可能含有敏感内容;模式替换不等于完整匿名化。
  • 不要把文件路径、账号、Session ID、内部地址、Token 或 API Key 发到公开仓库。
  • dsh-time-machine 的会话 fork 不会自动隔离工作区;两条轨迹应使用独立副本或 worktree。
  • “会话完成”不代表业务结果正确;评测必须有会话外的测试或明确人工判据。

评测示例

仓库内提供了一个已脱敏的 dsh-teach 完整评测示例:6 个成对任务、共12次新会话:

baseline 通过:1/6
treatment 通过:6/6
安全失败:0
误触:0
路由遗漏:0

这是固定样例的回归证据,不是对所有项目和模型的保证。请阅读完整报告、中文案例说明 和评测协议。

本地开发与验证

npm ci
python3 -m pip install -r requirements-dev.txt
npm run verify
npm run test:eval
npm run lint:package
npm pack --dry-run

发布与参与

mkdir -p dist
npm pack --pack-destination dist
dsh plugin --profile headless add ./dist/dsh-session-lab-0.1.0.tgz

本项目使用 MIT 许可证。插件市场与社区收录不会因为你是否发布 npm 而改变 GitHub 安装方式。

安全声明

安装 DSH 插件会在本机权限范围内运行第三方代码。安装前请审阅源码,并在不含有敏凭据的可丢弃环境中试用。详细说明见 SECURITY.md。

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。