Bundle
dsh-config-sync
DeepSeek Harness config sync: export/import DSH settings, API credentials, profile plugin patches and user agent presets as portable local bundles or a single password-encrypted file (AES-256-GCM + PBKDF2-SHA256).
- Source
- muyifc
- stars
- 1 stars
- License
- MIT
- Updated
- Updated 5 days ago
Readme
# dsh-config-sync DeepSeek Harness 配置同步插件:一键把 DSH 的 **API 设置、凭据、profile 插件补丁和用户 agent presets** 导出为可移植的备份包,或**单个口令加密文件**(AES-256-GCM),在新机器上解密恢复。 A DeepSeek Harness plugin for backing up and restoring your DSH configuration — settings, API credentials, profile plugin patches and user agent presets — as portable bundles or a single password-encrypted file. ## 功能 / Features 注册 5 个模型工具 / registers 5 model-facing tools: | 工具 / Tool | 作用 / Purpose | | --- | --- | | `dsh_config_export` | 导出为目录包(manifest.json + 文件) | | `dsh_config_export_encrypted` | 导出为单个口令加密文件 `.dshsync` | | `dsh_config_import` | 从目录包恢复(先预览,覆盖前自动备份) | | `dsh_config_import_encrypted` | 从 `.dshsync` 解密恢复 | | `dsh_config_status` | 查看配置与备份清单(绝不显示密钥内容) | 同步内容 / What gets synced: - `settings.yaml` — 默认模型等设置 - `.credentials.yaml` — API 密钥(内容永不出现在工具结果里) - `profiles/<name>/**` — `cordis.patch.yml`、`package.json`、`pnpm-workspace.yaml` 等(**不含 node_modules**) - `.agent-presets/**` — 用户 agent presets 安全设计 / Safety: - 导入只接受白名单路径,拒绝路径穿越(`..`)、绝对路径与 `node_modules` - 导入默认 `dry_run` 预览;实际覆盖前把旧文件备份到 `<DSH_HOME>\config-backups\pre-import-<时间戳>` - 加密文件:PBKDF2-SHA256(60 万次迭代)+ AES-256-GCM,口令错误明确报错;加密文件放网盘 / 微信 / U 盘都安全 ## 安装 / Install ```sh # 方式一:npm(推荐) dsh plugin --profile web add dsh-config-sync # 方式二:GitHub dsh plugin --profile web add github:muyifc/dsh-config-sync # 方式三:本地路径 dsh plugin --profile web add E:\path\to\dsh-config-sync ``` 安装后重启 DSH 即生效。 ## 使用 / Usage 在对话里直接说,或让模型调用工具: ``` 导出我的配置到 D:\backup 把我的配置加密导出到 D:\backup # 生成 .dshsync,留空口令则自动生成短语 从 D:\backup\dsh-config-<ts>.dshsync 恢复配置,口令 xxx 查看我的 DSH 配置同步状态 ``` ## 加密文件格式 / Encrypted format `.dshsync` 是一个 JSON 信封(`dsh-config-encrypted` v1): ``` kdf : PBKDF2-SHA256, 600000 次迭代, 随机 16 字节 salt cipher : AES-256-GCM, 随机 12 字节 nonce, 16 字节认证 tag ``` 解密后的载荷是 `dsh-config-bundle-json` v1 文档。口令是唯一防线:丢失口令文件即作废。 ## 开发 / Development ```sh pnpm install node test/smoke.mjs ``` 冒烟测试覆盖:明文导出、加密导出、错误口令拒绝、加密恢复、覆盖前备份、凭据跳过、状态查询,以及与旧版动态插件产物的跨版本解密兼容。 ## License MIT
Install
dsh plugin --profile web add github:muyifc/dsh-config-sync#c33ad40fae6779bc9ba660abcf7efe2be958a9d4
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-config-sync from the hub