BaiZhi967/dsh-plugin-zcode-import
DSH 会话导入插件:按工作区浏览本地 ZCode 的会话,勾选或整工作区导入 DeepSeek Harness · Import local ZCode conversations into DeepSeek Harness
Project Overview项目介绍
dsh-plugin-zcode-import is a DSH-native session-import plugin whose sole purpose is to move historical conversations from the local ZCode CLI tool into a DeepSeek Harness instance. It is installed with dsh plugin --profile web add github:BaiZhi967/dsh-plugin-zcode-import or by inserting it into the active profile through cordis.patch.yml; once loaded, the DSH Settings panel gains a dedicated "Session Import" tab with a two-pane layout that lists ZCode workspaces on the left and their conversations on the right. The plugin opens ZCode's cli/db/db.sqlite strictly read-only, aggregates sessions by the directory field (there is no workspace table), and writes through the runtime sessionPersistence and workspaceRegistry APIs instead of touching session.v3.jsonl.zstd directly, avoiding the fail-closed read path that would produce unopenable sessions.
Imported conversations become fully native DSH sessions: they appear under the correct workspace in the left sidebar, can be reopened, continued, archived, or deleted just like sessions created inside DSH itself, and the original ZCode data is never modified. Conversation ids are derived from ZCode's UUIDs as session-<uuid>, so re-running an import hits an stat() check and is reported as "already exists" rather than producing duplicates. The target user is a developer or team that has accumulated a large ZCode history and wants a unified DSH workspace with includeSubagents=1, an ZCODE_HOME environment variable, or a root field under the plugin's config in cordis.patch.yml.
Dependencies are DSH >= 0.1.6-alpha.2 and Node >= 22.19.0 (it relies on the built-in node:sqlite module added in Node 22.5+); the license is MIT. Attachments in ZCode file parts are reduced to filename placeholders only, the recorded provider/model is preserved merely as a display tag on assistant turns, subagent sessions are hidden by default, and new ZCode conversations generated after the import require a second run. Two verification scripts (tools/check-conversion.mjs and tools/verify-stored.mjs) validate conversion and on-disk output against the official @deepseek-ai/dsh-session-format-catalog, reporting 403/403 conversion passes and 44/44 stored-session passes on a 2.4 GB database.
dsh-plugin-zcode-import 是一款面向 DeepSeek Harness(DSH)的原生会话导入插件,专门把本地 ZCode(CLI 编码助手)的历史对话迁入 DSH。它通过 dsh plugin --profile web add github:BaiZhi967/dsh-plugin-zcode-import 安装,也支持写到 profile 的 cordis.patch.yml 中;安装后设置面板会多出"会话导入"页,左栏列 ZCode 工作区,右栏列会话,勾选后可批量或整工作区导入。它只读打开 ZCode 的 cli/db/db.sqlite,复用 sessionPersistence 与 workspaceRegistry 运行时 API 写入,避开 fail-closed 的原始 jsonl 读取路径。
导入会话在 DSH 侧是真实原生会话:会出现在左侧列表对应工作区下、可继续提问、可归档;会话 id 由 ZCode 的 UUID 派生为 session-<uuid>,重复导入会被识别为已存在而跳过,不会产生副本。它面向已经把 ZCode 作为主力 CLI、又希望把历史沉淀搬进 DSH 统一管理的开发者与团队;典型流程是设置→会话导入→选工作区→勾选→一键导入→关闭设置继续使用,自定义目录可通过 ZCODE_HOME 环境变量或 cordis.patch.yml 的 root 字段指定。
依赖与限制:要求 DSH >= 0.1.6-alpha.2、Node >= 22.19.0(依赖内置 node:sqlite),MIT 协议。ZCode 库以 readOnly 打开,插件不会改动 ZCode 数据;二进制附件仅保留文件名占位,模型来源标注沿用 ZCode 记录;子代理会话默认折叠,可加 ?includeSubagents=1 列出;ZCode 后续新对话需重新导入。本机实测 403 个真人会话、236,060 个事件、44 个落盘会话均零失败。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-plugin-zcode-import(BaiZhi967/dsh-plugin-zcode-import)
仓库:https://github.com/BaiZhi967/dsh-plugin-zcode-import
本站详情页:https://www.yhbd.top/plugins/baizhi967-dsh-plugin-zcode-import/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-09-30 · 主语言 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 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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 github:BaiZhi967/dsh-plugin-zcode-import
把 BaiZhi967/dsh-plugin-zcode-import 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-plugin-zcode-import
English | 中文
把本地 ZCode 的会话导入 DeepSeek Harness:设置面板里多一页「会话导入」,左边列出 ZCode 的工作区,右边列出该工作区的对话,勾选几条或整个工作区一键导入。导入后就是原生 DSH 会话——出现在左侧会话列表对应工作区下,能打开、能继续对话,不是导出一份文本。
- 直接读 ZCode 的
db.sqlite,只读打开,不改动、不迁移 ZCode 的任何数据; - 会话 id 由 ZCode 的 UUID 派生,重复导入会被识别为「已存在」,不会产生副本;
- 全量导入很快:30 个会话约 3 秒(本机实测)。
✨ 功能
| 能力 | 说明 |
|---|---|
| 设置页入口 | 设置面板新增「会话导入」页(与「通用 / 模型 / 插件」同级),无需命令行 |
| 工作区列表 | 按 session.directory 自动聚合出 ZCode 工作区,显示会话数、最近更新时间;目录已被删除的会标黄提示 |
| 对话列表 | 选中工作区后列出其对话:标题、更新时间、消息条数、是否已导入;子代理会话默认折叠 |
| 部分导入 | 勾选任意几条 → 「导入选中会话」;「全选未导入」一键勾选 |
| 整工作区导入 | 「导入整个工作区」一次导入该工作区全部对话 |
| 进度与明细 | 导入过程有进度条 + 当前标题,结束后逐条列出「已导入 / 已存在 / 跳过 / 失败」及原因 |
| 内容完整 | 文本、思考(reasoning)、工具调用与工具结果全部还原成 DSH 的 tool/call + tool/result |
| 自动建工作区 | 目标目录在 DSH 里还没有工作区时自动创建并挂载,导入完即出现在侧栏 |
| 热重载 | 改 impl.js 后 POST /__reload 即可生效,不用重启 DSH;客户端改动由 DSH 模块热更新送达页面 |
📦 安装
# 从 GitHub 安装(本仓库)
dsh plugin --profile web add github:BaiZhi967/dsh-plugin-zcode-import
dsh --profile web
本地开发(clone 下来改):
git clone https://github.com/BaiZhi967/dsh-plugin-zcode-import.git
cd dsh-plugin-zcode-import
# 在插件目录的「父目录」执行,dsh 会把相对路径锚定到调用目录
dsh plugin --profile web add ../dsh-plugin-zcode-import
dsh --profile web
也可以直接写进 profile 的 cordis.patch.yml:
- insert:
- id: zcode-import
name: dsh-plugin-zcode-import
环境要求:DSH
>= 0.2.0-rc.2、Node>= 22.19.0(用到内置node:sqlite,需 Node 22.5+;本插件按 22.19 起算)。
装好后刷新一次页面,打开 设置 → 会话导入。
🚀 用法
- 设置 → 会话导入:顶部会显示识别到的 ZCode 数据目录;
- 左栏点一个工作区;
- 右栏勾选要导入的对话,点 导入选中会话;或直接点 导入整个工作区;
- 进度条跑完看「导入明细」,然后关掉设置——会话已经在左侧列表里了。
导入的会话可以像平常一样打开、继续提问、归档或删除。删掉导入的会话不会影响 ZCode 原数据。
自定义 ZCode 位置
默认读 <用户目录>/.zcode。非标准安装用任一方式指定:
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
liangmianya/dsh-synapse
alaliqing/claude-paper
acryldev/acryl
omdsh-dev/dsh-annotation
Anionex/dsh-turn-rewind
Tyan66666/billion-context-dsh
qkycir-123/dsh-run2skill