rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:kol-mm/dsh-config-migrate
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English: README.en.md
DeepSeek Harness 配置迁移插件 —— 一键导出/导入 ${DSH_HOME} 配置(settings、凭据、profiles、external-plugins、agent presets),跨平台支持 Windows / macOS / Linux,专为「换新设备零折腾」设计。
${DSH_HOME} 下的配置:settings.yaml、settings.yaml.bak、.credentials.yaml、.anonymous-user-idprofiles/**、external-plugins/**、.agent-presets/**node_modules、sessions、storages、.gitprofiles/*/package.json 里指向 external-plugins 的绝对 link: 路径自动改写为相对路径(link:../../external-plugins/<名>),跨机器有效password,对 .credentials.yaml 用 AES-256-GCM + scrypt 加密(node crypto),导出结果显示「凭据已加密」external-plugins/*/package.json,识别 DSH 不自带的 npm 依赖写入 pluginDeps,导入前预警skipCredentials)、自定义输出路径、dryRun 预览清单dsh-config-export*.json,或读取 .dshmig-state.json 记住的自定义导出路径importLast):直接恢复上次导出的备份,无需填路径*.bak-<时间戳>verifyErrors 报告encrypted 条目时用 password 解密;口令错误明确拒绝(不静默出垃圾数据)external-plugins/**(含二进制资源)node_modules/@dsh-external/<名> 链接:Windows 用 junction,macOS/Linux 用符号链接linkErrors 并提示(可能需要在新设备 pnpm install)onlyMissing)、排除凭据、dryRun 预览{
"format": "dsh-config-migration",
"version": 3,
"exportedAt": "2026-08-15T08:00:00.000Z",
"sourceHome": "C:\\Users\\xxx\\.dsh",
"platform": "Windows",
"pluginDeps": ["axios"],
"files": {
"settings.yaml": { "encoding": "utf8", "content": "ui-onboarding: ..." },
".credentials.yaml": { "encoding": "encrypted", "payload": { "salt": "...", "iv": "...", "tag": "...", "data": "..." } },
"profiles/web/package.json": { "encoding": "utf8", "content": "{ ... \"link:../../external-plugins/...\" ... }" },
"external-plugins/.../assets/x.webp": { "encoding": "base64", "content": "UklGRi4B..." }
}
}
在 DeepSeek Harness 会话中通过 Cordis 动态插件机制加载 host.js / client.js(见「代码结构」),运行后:
dsh_config_migrate(action: status/export/import/importLast)将本仓库放入 ${DSH_HOME}/external-plugins/ 并在 profile 的 package.json 中引用(参考 @dsh-external 的链接方式)。
| 文件 | 说明 |
|---|---|
host.js |
Host half:RPC handlers(config/status、config/export、config/import、config/importLast)+ 动态工具 dsh_config_migrate |
client.js |
Client half:设置页「配置迁移」UI(settings.section 槽位) |
.github/workflows/syntax-check.yml |
CI:new Function() 包裹校验两个函数体的语法 + package.json 合法性 |
两个 JS 文件均为 Cordis 插件函数体(return { apply(ctx) { ... } }),可直接作为动态 Package 的 code.host / code.client 加载。
process.platform 可用(沙箱),平台由路径推断:含盘符/反斜杠 → Windows,否则 Unixsubprocess 中 powershell.exe/openssl 不一定可用):Buffer.from(base64) 解码、fs.symlinkSync(type: junction|dir) 建链接crypto(AES-256-GCM + scrypt).credentials.yaml);可用 password 加密或 skipCredentials 排除encoding: "encrypted",无口令无法读取;口令错误导入会被明确拒绝${DSH_HOME}(会话工作区之外)使用完整访问权限,界面有明确提示.. / 绝对路径逃逸条目CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。