DSH Plugins Marketplace

DSH Plugins

Plugins

/

Terminal & Clients

/

@choi-p/dsh-backup

@

@choi-p/dsh-backup

Manifest valid

Backup, restore, download and GitHub-sync DeepSeek Harness user data (~/.dsh): /backup, scheduled auto-backup that survives restarts, sha256 checksums, integrity verify, rotation and a visual Settings panel. Cross-platform (macOS/Linux/Windows). One-click backup and restore of DSH data: scheduled automatic backup, integrity verification, download and GitHub sync, with a visual Settings panel.

UI (client)hasBundlePatch

dsh-backup

Fork of xiaoyuyu6420/dsh-backup,独立维护/重构版本。

version license platform node dsh-plugin

一键备份与恢复 DeepSeek Harness 用户数据——~/.dsh 下的会话、设置、凭据、 技能与插件配置(排除可重装的 node_modules),自动生成 sha256 校验和、完整性 校验、自动轮换,定时自动备份状态落盘、重启续跑。支持 macOS / Linux / Windows。

命令

  • /backup —— 立即备份 ~/.dsh 到 ~/Desktop/dsh-backups/dsh-<时间戳>.tar.gz
  • /backup list —— 列出已有备份(名称 + 大小)与自动备份状态
  • /backup verify [前缀|all] —— 校验归档完整性(缺省校验最新一份)
  • /backup restore <前缀|latest> [--dry-run] —— 从归档恢复 ~/.dsh
  • /backup auto <N小时>|off|status —— 每 N 小时自动备份(1~720;<24h 保留 3 份,否则 7 份;状态持久化,重启续跑)
  • /backup --keep N —— 覆盖轮换保留份数(默认 7)
  • /backup github status|sync —— GitHub 同步状态 / 立即推送
  • backup_dsh 工具 —— 模型可调用同一能力(mode=backup|list|verify|restore|auto)

GitHub 同步

配置 config.githubRepo 后,每次备份(手动 / 定时 / 面板)都会把归档、校验 边车与轮换删除一并推送到 Git 仓库:

- id: dsh-backup
  name: '@choi-p/dsh-backup'
  config:
    githubRepo: '你的账号/dsh-backups'   # owner/repo、完整 URL 或本地路径

请使用私有仓库——归档含明文凭据。https 远端需要环境变量 token (DSH_BACKUP_GITHUB_TOKEN 或 GITHUB_TOKEN),token 只写入同步工作树的 credential 文件(不进进程参数)。推送为 HEAD:main --force-with-lease; 超过 90MB 的归档会跳过并提示。同步状态(上次推送 / 错误)存于 <destination>/auto.json,面板与 /backup github status 可见。

Settings 可视面板(Web)

同样的能力在 dsh web 的 Settings → Plugins → 备份 标签页有可视化入口: 显示备份目录、自动备份状态、GitHub 同步状态和每份归档的大小,支持一键立即 备份、逐份校验、下载、带 dry-run 预览与二次确认的恢复。总览卡中的备份 目录、默认保留份数与排除项可直接编辑,保存后写入当前 profile 的 cordis.patch.yml 并立即生效(无需手改配置或重启)。下载走仅限本机的 GET /backup-download/<归档名> 路由。面板经 backupPanel Typert Remote 命名空间(/api RPC)与宿主通信;浏览器 bundle 手写在 lib/client.js, 安装时无需构建。

恢复的工作方式

恢复安全性是设计出来的:

  1. 先校验归档 sha256——损坏的归档绝不触碰现有数据。
  2. 列出归档条目,任何超出备份根目录的路径都会拒绝恢复(tar 路径穿越防护)。
  3. 当前 ~/.dsh 先自动快照,再移动到 ~/.dsh.pre-restore-<时间戳>——恢复是替换而不是合并。
  4. 解压归档后重启 dsh,恢复的会话与配置即生效。

--dry-run 只显示归档概要,不写入任何内容。

配置(可选)

在生效的 cordis profile 中为插件声明 config:

- id: dsh-backup
  name: '@choi-p/dsh-backup'
  config:
    destination: '~/Backups/dsh'   # 默认 ~/Desktop/dsh-backups
    keep: 10                       # 默认轮换保留份数
    exclude:                       # 额外的 tar --exclude 模式
      - '*cache*'
    githubRepo: '账号/dsh-backups' # 可选 GitHub 同步(见下文)

自动备份状态保存在 <destination>/auto.json,重启后续跑。

安全说明

备份包含明文凭据(.credentials.yaml、qq-bridge/config.json)。归档与校验 文件在 POSIX 上为 chmod 600(Windows 依赖用户目录 ACL),但请不要把备份 目录同步到不受信的位置,并像对待 API key 一样对待备份文件。

存储说明:插件自有数据(归档、校验和、auto.json)直接经 node:fs 写入, 与 DSH 自身的会话持久化同一模式——ctx.fs 能力是模型面的沙箱 surface, 不适用于宿主插件的自有存储。

安装

dsh plugin --profile web add @choi-p/dsh-backup

然后重启 dsh web(插件发现按进程缓存),输入 /backup 或打开 Settings → Plugins → 备份。

依赖

  • macOS、Linux 或 Windows 10+,PATH 中有 tar(Windows 自带 System32 的 bsdtar,Git Bash 的 GNU tar 也可以;校验和优先 sha256sum/shasum, Windows 上回退进程内哈希)
  • DSH >= 0.1.0-rc.7(settings 服务)

开发

零构建、零第三方依赖——全部功能为手写纯 JavaScript,直接放在 lib/ (仅使用 @deepseek-ai/* 平台包):

  • lib/index.js —— 宿主半边:/backup 命令、backup_dsh 工具、 backupPanel Typert Remote 服务、仅限本机的下载路由与定时备份。
  • lib/client.js —— 浏览器半边:手写 Web bundle(无 JSX、无打包器), 遵循 shell 的 window.__ModuleLoader__ 握手;React 运行时从 shell 模块表 解析;typert strict codec 用内联极简校验器替代 zod。

没有 src/ 和 scripts/——直接改 lib/ 下的文件即可。

许可证

MIT — forked from xiaoyuyu6420/dsh-backup

Comments

Loading…

From the same category

dsh-web

by zhu1090093659

DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop

Tools & CapabilitiesUI & ExperienceDevelopment & InfrastructureTerminal & ClientsModels & ProvidersManifest valid

★ 8.3k

↓ 203/wk

Apache-2.0

TypeScript

Oct 2, 2026

dsh plugin --profile web add dsh-web

by ccch1mneyyy

DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rol

Terminal & ClientsManifest valid

★ 3.9k

↓ 15.9k/wk

MIT

TypeScript

Oct 2, 2026

dsh plugin --profile terminal add @deepseek-harness-tui/dsh-tui

by YuJunZhiXue

DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐

Tools & CapabilitiesTerminal & ClientsManifest valid

★ 3k

MIT

JavaScript

Oct 2, 2026

dsh plugin --profile web add dsh-purge

by bowenliang123

The best DeepSeek Harness plugin for context insight and management, with context dashboard / browser / sidebar and context command, for context statistics, composition, breakdown, evolution details,

Tools & CapabilitiesUI & ExperienceTerminal & ClientsManifest valid

★ 1.8k

↓ 37.3k/wk

Apache-2.0

TypeScript

Sep 30, 2026

dsh plugin --profile web add dsh-context

by agentrq

AgentRQ: Human-in-loop realtime conversational task manager for AI Agents. Self-hosted! Control your own agents from wherever you want Mobile, Web, Desktop. Designed to work well with your own Claude

Workflow & AutomationUI & ExperienceTerminal & ClientsManifest valid

★ 1.1k

↓ 46/wk

Apache-2.0

JavaScript

Oct 2, 2026

dsh plugin --profile web add @agentrq/dsh-plugin-agentrq

by vshulcz

One memory shared by Claude Code, Codex, Cursor, Copilot CLI, OpenClaw and 20 more coding agents, built from the session history already on disk. A fix found in one agent comes back in any of them, in

Tools & CapabilitiesTerminal & ClientsMemory & ContextManifest valid

★ 1.1k

↓ 1.2k/wk

MIT

Go

Oct 2, 2026

dsh plugin --profile web add dsh-deja