DSH Plugins Marketplace

DSH Plugins

Plugins

/

Sessions & Messages

/

dsh-cloud-sync

d

dsh-cloud-sync

Identified

Ship OpenTelemetry GenAI observability and multi-device cloud state sync from one DSH bundle. It reuses and replaces the standalone @loongsuite/dsh-plugin (traces + metrics for sessions, agent loop, L

dsh-cloud-sync

一个 DeepSeek Harness (DSH) 插件 bundle,把两件事装进一个包:

  1. OpenTelemetry GenAI 可观测性 —— 复用 @loongsuite/dsh-plugin,把会话 / Agent 循环 / LLM / 工具生命周期事件导出为 OTel GenAI trace 与 metric。
  2. 云端状态同步 —— 新增的 Host 插件,作为 WebSocket 客户端主动外连云端中继,把完整会话事件日志(session header + snapshotEvents())增量推送到云端,从而把不同本地端登录的 DSH 状态集中同步;并在连接时自动拉回并重建其他设备的会话(跨设备续接)。

结构

dsh-cloud-sync/
├─ package.json         bundle 清单(含 dsh.bundle.patch 与依赖)
├─ cordis.patch.yml     插入两行:observability + sync
├─ index.js             云端同步插件(WebSocket 客户端)
├─ locale/en.json  locale/zh.json   显示元数据
└─ icon.svg

工作原理

  • 启动时用 Node 内置 WebSocket(undici,无需额外依赖)连接 config.server。
  • 连接后发送 hello(携带 deviceId / instanceId / token),随后对 sessions.list() 里的每个 session 推送一次完整快照(header + 全部事件),重连后同样重新全量同步一次。
  • 监听 session/created(推快照)、session/event(推增量事件)、session/disposed(从云端删除该会话)。
  • 启用 resume 时,连接后向云端 sync.list 拉取其他设备的会话摘要,再 sync.pull 逐个拉全量日志并用 sessions.create(id, { seed }) 本地重建。
  • 断线后指数退避重连,并用 ping 心跳保活。

事件中的 Buffer/ArrayBuffer/BigInt/Error 会被 JSON 安全序列化(__bytes/__bigint/__error),函数与 symbol 被丢弃;续接重建前用逆向 revive() 还原。

配置

键默认说明
enabledtrue是否启用云端同步
serverws://127.0.0.1:8080/ws云端 WebSocket 地址
token空云端鉴权令牌,须与云端 AUTH_TOKEN/AUTH_TOKENS 之一一致
deviceId自动(<profile>@<hostname>)本机设备标识
resumetrue连接后自动拉取并重建其他设备的会话(跨设备续接)
resumeOnlyFrom[]只拉取这些 deviceId 的会话(空 = 全部)
resumeMaxSessions20每次连接最多重建的会话数
reconnectMinMs / reconnectMaxMs500 / 30000重连退避区间
heartbeatMs30000心跳间隔
debugfalse打印收发消息类型

环境变量可覆盖:DSH_CLOUD_SYNC_SERVER、DSH_CLOUD_SYNC_TOKEN、DSH_CLOUD_SYNC_DEVICE。

手动操作(斜杠命令)

插件注册了 /cloud-sync 命令:

  • /cloud-sync 或 /cloud-sync status —— 显示同步状态(设备、云端、连接、本地会话数、续接开关)。
  • /cloud-sync delete <sessionId> —— 从云端删除指定会话。
  • /cloud-sync resync —— 立即触发一次全量重同步。

Web UI(设置页)

插件带一个客户端面板,出现在 设置 → 云端同步(settings.section 槽位,order 35):

  • 状态卡:连接点(已连接/未连接)、中继地址、本机设备名、本地会话数、凭据是否已设置、最近一次连接时间与错误。
  • 连接设置:中继地址、设备名、Token(留空表示不修改)、是否启用跨设备续接;「保存并重连」立即生效(写入 ~/.dsh/cloud-sync/settings.json,无需重启 DSH)。
  • 本地会话:列出本机会话,「删除云端副本」从云端移除该会话。
  • 其他设备会话:列出云端其他设备的会话,可「从云端拉取」(立即重建到本地)或删除。

面板通过宿主注册的同源 HTTP 路由工作:GET /cloud-sync/status、GET /cloud-sync/sessions、GET /cloud-sync/remote、POST /cloud-sync/config、POST /cloud-sync/resync、POST /cloud-sync/delete。这些路由仅在 Web UI 宿主存在时注册。

安装

本 bundle 用于替换独立的 @loongsuite/dsh-plugin:

  1. 从 profile 的 bundle 列表中禁用(或移除)@loongsuite/dsh-plugin。
  2. 用 Plugin Manager 安装本 bundle(它会把 @loongsuite/dsh-plugin 作为普通依赖拉进来,并重新插入 observability 行,同时新增 sync 行)。

index.js 零第三方运行时依赖——只用 Node 22 内置模块(node:os、node:crypto 与全局 WebSocket);@loongsuite/dsh-plugin 作为 bundle 依赖由 DSH loader 从 profile 解析,index.js 不直接 import。

详见根目录 PROTOCOL.md(wire 协议)与 cloud-server/(参考云端服务)。

Comments

Loading…

Similar plugins

dsh-harness-ui

by jianjianzhu

Full-page Harness console for the DeepSeek Harness Web GUI: sessions, plugins, market, MCP, skills and usage in one shell.

UI & ExperienceDevelopment & InfrastructureManifest valid

★ 0

MIT

JavaScript

Sep 20, 2026

dsh plugin --profile web add dsh-harness-ui

by AIcivilization

Many model sources behind one OpenAI-compatible endpoint for DeepSeek Harness (dsh) and your tools: WorkBuddy, OpenCode Zen, Codex, Kimi… 多家模型汇成一个 OpenAI 兼容地址,dsh 和其他软件都能直接用。

Development & InfrastructureTerminal & ClientsModels & ProvidersManifest valid

★ 3

↓ 2k/wk

MIT

TypeScript

Nov 10, 2026

dsh plugin --profile web add dsh-model

by mrzturn

dsh-switchman who is a plugin for deepseek harness

Development & InfrastructureSessions & MessagesManifest valid

★ 9

↓ 1.6k/wk

MIT

JavaScript

Nov 9, 2026

dsh plugin --profile web add dsh-switchman

by GaoHu1997

Keep a DSH profile identical across machines through any WebDAV server. The plugin collects the five parts that make up a setup — models (the llm-pi-ai line of cordis.patch.yml), defaults (the agent-d

Development & InfrastructureModels & ProvidersManifest valid

★ 0

MIT

TypeScript

Nov 7, 2026

dsh plugin --profile web add dsh-webdav-sync

Auto-resumes dsh sessions whose turn was left mid-flight by a web process restart or by a transient upstream failure, by injecting a 「继续(自动)」 ("continue (auto)") user message so the agent picks up exa

Workflow & AutomationModels & ProvidersManifest valid

★ 0

↓ 95/wk

dsh plugin --profile web add dsh-autoresume

by ChenYiming-aaa

DeepSeek Harness(DSH)GitHub 集成插件:一次认证(GITHUB_TOKEN 或 OAuth Device Flow)后,模型可直接调用 45 个 github_* 工具完成建仓、推送、提 PR、管 issue、搜索代码等;常规读写直接放行,危险操作(删除/force push/合并 PR/关 issue)保留审批门;token 存于 DSH credentials 服务,不落日志。对标 opencode GitHub MCP。

Security & AuditTools & CapabilitiesManifest valid

★ 3

↓ 284/wk

MIT

JavaScript

Aug 27, 2026

dsh plugin --profile web add dsh-github