yangyongzhen/dsh-session-export
将DeepSeek Harness会话导出为Markdown格式,用于审阅、博客撰写和审计。dsh插件。
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness that automatically exports agent conversation sessions to formatted Markdown files. The plugin listens to DSH’s session event stream, and triggers an automatic export after a configurable debounce period once a conversation turn ends. By default, exported files are saved to $DSH_HOME/exports with a session ID in the filename, and it flushes any unexported sessions on process exit, including for one-off headless tasks, so no conversation data is lost. Its rendering logic is written as modular pure functions, so other DSH plugins can import and reuse this functionality directly.
Two types of users benefit most from this plugin: content creators and developers who regularly work with DeepSeek Harness sessions. Content creators can automatically capture and save full conversation records for later review, blogging, or auditing without having to manually copy and paste content. Developers building other DSH plugins can leverage the existing rendering pipeline to add export functionality to their own work instead of building it from scratch. Installing the plugin can be done two ways: check out the repository locally and add it via the file path, or install it directly from the remote Git repository. It supports all three DSH profile types: web, tui, and headless.
After installation, users can configure several options via their DSH profile configuration, including the plugin enable toggle, custom output directory, debounce wait time in milliseconds, maximum character length for tool call results, and whether to include injected messages. Each exported Markdown file includes full session metadata, model information, token usage statistics, turn-by-turn conversation content, tool call records, and a full list of errors encountered during the session. To verify the plugin is installed correctly, users can run dsh --profile <name> --dump-config to check that it appears in the configuration tree, then run a test headless task to confirm the export file is generated correctly.
这是一个专为 DeepSeek Harness 开发的原生插件,核心功能是将 DSH 的 Agent 会话自动导出为格式规整的 Markdown 文件,方便用户进行会话复盘、内容整理、博客撰写或安全审计。它通过监听 session/event 事件流,在每个对话回合结束等待设定的静默时间后自动触发导出。默认导出路径为 $DSH_HOME/exports/session-<id>.md,进程退出(包括无界面一次性任务)时会同步刷新未导出的会话,保证记录不丢失。
对需要长期积累整理 Agent 会话内容的开发者、内容创作者来说,这个插件可以省去手动复制保存会话的麻烦,全自动完成全流程记录留存。开发者还可以复用它的纯函数模块化渲染能力,为自己开发的其他 DSH 插件快速添加会话导出功能。安装方式支持本地检出后本地路径安装,也支持直接从 Git 仓库远程安装,适配 web、tui、headless 三种 DSH 运行 profile。
用户可以通过 DSH 的 profile 配置文件修改插件选项,包括总开关、导出目录、静默等待时间、工具内容截断长度、是否包含注入消息等。导出内容包含会话基础信息、模型与 token 消耗统计、每个回合的提问、工具调用、模型回复、结束原因,以及全会话错误汇总。开发需要 pnpm 依赖管理,安装完成后可通过 DSH 配置转储命令验证安装是否成功。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-session-export(yangyongzhen/dsh-session-export)
仓库:https://github.com/yangyongzhen/dsh-session-export
本站详情页:https://www.yhbd.top/plugins/yangyongzhen-dsh-session-export/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 3 · 最近提交 2026-08-14 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add https://gitcode.com/qq8864/dsh-session-export.git
把 yangyongzhen/dsh-session-export 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-session-export
DeepSeek Harness 会话导出与复盘插件:把 agent 会话自动导出为 Markdown 文件,供复盘、写博客、审计使用。
- 监听
session/event事件流,turn 结束并静默debounceMs后自动导出 - 输出
$DSH_HOME/exports/session-<id>.md(默认~/.dsh/exports/) - 进程退出(含 headless 一次性任务)时同步 flush 未导出的会话,不丢记录
- 渲染纯函数模块化导出,其他插件可复用
安装
# 本地 checkout 安装(推荐,免构建)
dsh plugin --profile <web|tui|headless> add file:/path/to/dsh-session-export
# 或从 Git 仓库直接安装
dsh plugin --profile <web|tui|headless> add https://gitcode.com/qq8864/dsh-session-export.git
配置
通过 profile 的 cordis.patch.yml 或 --patch overlay 覆盖:
- id: session-export
config:
enabled: true # 总开关,false 关闭自动导出
outDir: ~/exports # 导出目录,默认 $DSH_HOME/exports
debounceMs: 1000 # turn/end 后的静默等待(毫秒)
maxResultChars: 2000 # 工具参数/结果的截断长度
includeInjected: false # true 时包含注入消息(上下文快照、skill 目录等)
导出内容
# 会话导出
- 会话 ID / 创建时间 / 工作目录 / Agent 预设 / 导出时间
- 模型(provider/model)与统计:turn/step/工具调用次数、token 消耗(含缓存读写)、耗时
## Turn N / Step N.t 回合与步骤结构
### 用户 / 目标 直接提示词与目标延续(注入消息默认过滤)
#### 工具调用:name 工具名 + 参数 JSON
#### 工具结果 返回内容(截断)
### 助手 模型文本 + 该步 token 明细
> Turn N 结束:完成 回合结束原因(完成/出错/被中断/达到上限…)
## 错误记录 全部回合错误汇总
作为库使用
渲染管线独立于运行时,其他插件可直接复用:
import { renderSessionMarkdown, summarizeStats } from 'dsh-session-export';
// 或按包路径导入:dsh-session-export 的 lib/markdown.js
const md = renderSessionMarkdown(session.events, { sessionId: session.id }, 2000, false);
开发
pnpm install
pnpm run build # tsc -> lib/
验证
dsh --profile <name> --dump-config确认插件进入配置树- headless 冒烟:
dsh --profile headless "一句话介绍你自己"后检查$DSH_HOME/exports/
huangziyuan-general/dsh-novel-forge
omdsh-dev/dsh-security-audit
huanghai-lab/dsh-custom-instructions
QIN-SMART/dsh-session-md
toby-bridges/api-relay-audit
wenbin-wb/dsh-bridge
PerryLink/dsh-permission-rules
MichengAI/dsh-archive-manager