DeepSeek Harness 插件

dsh-codex-migrate

Migrate Codex CLI conversations, MCP servers, memories and project files into DeepSeek Harness sessions, workspaces and MCP registrations. 把 Codex CLI 的对话、MCP、记忆与项目文件迁移为 DSH 会话、工作区与 MCP 注册。(英文原文)

跳到安装方式

来源信息

GitHub 仓库
polarskicpl/dsh-codex-migrate
最近更新
2026年8月15日
分类
工具与能力
GitHub stars
2
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/polarskicpl/dsh-codex-migrate
插件名:dsh-codex-migrate
作者:polarskicpl

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-codex-migrate

<div align="center"> <img src="https://raw.githubusercontent.com/polarskicpl/dsh-codex-migrate/main/images/banner.png" alt="dsh-codex-migrate banner" width="520"> </div>

[中文](#中文) · [English](#english)

中文

Codex CLI 的历史迁移进 DeepSeek Harness(DSH):

  • 对话 → 真正的 DSH 会话:用户轮次、助手轮次与工具调用按 DSH 原生事件格式

转换(工具卡片默认折叠),按项目挂载到对应工作区,侧边栏直接可见、可续聊。

  • MCP 服务器 → 注册行:config.toml[mcp_servers.*] 变成

@deepseek-ai/dsh-mcp-client cordis 行,并生成一段可直接复制给任意 agent 的 注册提示词,让 agent 帮你完成注册。

  • 记忆与 AGENTS.md:复制到输出目录。
  • 项目文件(可选):按项目复制文本文件。

内置中英双语(界面跟随 DSH 语言;生成产物跟随 language 配置)。

安装

dsh plugin --profile web add dsh-codex-migrate

(或手动把 cordis.patch.yml 里的行合并进你的 profile patch),然后重启 DSH。 设置面板位于 设置 → Codex 迁移

包发布在 npm:dsh-codex-migrate (dsh plugin add 按包名从 npm registry 拉取;源码见 GitHub 仓库)。

配置

| 键 | 默认 | 含义 | | --- | --- | --- | | codexDir | '' | Codex 数据目录;留空 = 自动检测(~/.codex) | | outputDir | '' | 产物目录;留空 = <DSH_HOME>/codex-sync | | language | en | 生成产物的语言:en \| zh \| auto(跟随界面语言) | | sessionMode | new | all \| new \| selected | | projectMode | all | all \| selected | | includeSubagentSessions | false | 子智能体线程默认隐藏 | | importAsDshSessions | true | 生成真正的 DSH 会话(取消则只出 Markdown) | | … | | 频率、上限、MCP/记忆开关等,见 cordis.patch.yml |

生成产物(outputDir)

codex-sync/
├── config.json / state.json / diagnostics.json
├── index.md                     # 会话索引
├── sessions/*.md                # 每个会话的 Markdown
├── projects/                    # 可选的项目文件副本
├── memories/ , AGENTS.md
└── mcp/
    ├── cordis-mcp-rows.yml      # 可直接合并的 insert 块
    ├── report.md
    └── register-prompt.md       # 发给任意 agent 即可完成注册

安全边界

这是一个宿主插件:运行在 DSH 进程中,没有会话级沙箱。它只写 outputDir 内部、只读 Codex 目录。注册迁移过来的 MCP 之前请先审阅你的 Codex MCP 配置——注册后这些工具对会话内所有 agent(含子代理)可见;SSH 类 服务器建议使用命令白名单(--whitelist / commandWhitelist)而非黑名单。

开发

npm run build          # 把浏览器面打包成 lib/client.js

宿主面是纯 ESM,无需构建;浏览器面把 src/client/index.js 包装成 DSH Web 外壳 消费的 window.__ModuleLoader__.load 形式(运行时 require 由装载器的模块表解析)。

许可证

MIT

---

English

Migrate your Codex CLI history into DeepSeek Harness (DSH):

  • Conversations → real DSH sessions: user turns, assistant turns and tool

calls are converted into native DSH event format (tool cards collapse by default), mounted into per-project workspaces, and appear in the sidebar.

  • MCP servers → registration rows: config.toml [mcp_servers.*] entries

become @deepseek-ai/dsh-mcp-client cordis rows, plus a copy-paste registration prompt you can hand to any agent to complete the registration for you.

  • Memories & AGENTS.md: copied into the output directory.
  • Project files (optional): text files copied per project.

English and Chinese are both built in (UI follows the DSH locale; generated artifacts follow the language config).

Install

dsh plugin --profile web add dsh-codex-migrate

(or add the row from cordis.patch.yml to your profile patch manually), then restart DSH. The settings panel appears under Settings → Codex Migration.

The package is published on npm: dsh-codex-migrate (dsh plugin add resolves the name from the npm registry; source lives in the GitHub repository).

Configure

| Key | Default | Meaning | | --- | --- | --- | | codexDir | '' | Codex data dir; empty = auto-detect (~/.codex) | | outputDir | '' | Where artifacts live; empty = <DSH_HOME>/codex-sync | | language | en | en \| zh \| auto (follow UI locale) for generated artifacts | | sessionMode | new | all \| new \| selected | | projectMode | all | all \| selected | | includeSubagentSessions | false | Subagent threads are hidden by default | | importAsDshSessions | true | Create real DSH sessions (uncheck for Markdown-only) | | … | | frequency, caps, MCP/memories toggles — see cordis.patch.yml |

Generated artifacts (outputDir)

codex-sync/
├── config.json / state.json / diagnostics.json
├── index.md                     # session index
├── sessions/*.md                # per-session Markdown
├── projects/                    # optional project file copies
├── memories/ , AGENTS.md
└── mcp/
    ├── cordis-mcp-rows.yml      # DSH-ready insert block
    ├── report.md
    └── register-prompt.md       # paste to any agent to finish registration

Security boundary

This is a host plugin: it runs in the DSH process without a per-session sandbox. It only writes inside outputDir and only reads the Codex directory. Review your Codex MCP config before registering migrated MCP servers — after registration those tools are visible to every agent in a session, including subagents. For SSH-style servers prefer a command whitelist (--whitelist / commandWhitelist) over a blacklist.

Development

npm run build          # bundles the client half into lib/client.js

The host half is plain ESM and needs no build step. The client half wraps src/client/index.js into the window.__ModuleLoader__.load form consumed by the DSH web shell (runtime requires are resolved by the loader's module table).

License

MIT