DeepSeek Harness Plugin: weibaohui/dsh-sync

Introduction

DeepSeek Harness (DSH) follows the “everything is a plugin” ecosystem philosophy. When collaborating on agent development across multiple machines, synchronizing skills, sessions, settings, and plugin manifests can easily lead to data inconsistency. weibaohui/dsh-sync is designed to solve data synchronization and conflict issues in multi-machine environments, providing a complete backup and recovery solution.

Plugin Introduction

Name: weibaohui/dsh-sync
Core Features: Session synchronization and conflict resolution (apiproxy, inline token)
Maintainer: weibaohui
Category: Memory
License: MIT
Stars: 7

This plugin supports multi-machine synchronization and multi-protocol backup, covering Git, WebDAV, and local folders. It allows synchronization of four types of content: skills, sessions, settings, and plugin manifests. The plugin has built-in AI smart alignment and conflict resolution mechanisms, provides local-first snapshots and cloud recovery capabilities, and includes security mechanisms such as private repository validation and token isolation.

Core Features

Multi-Protocol Backup

The plugin provides three backup protocols, each corresponding to a tab and a toggle:

  • Git repository (enabled by default): supports the full branch → PR → merge workflow, explicit conflicts, and AI semantic merging.
  • WebDAV (disabled by default): compatible with standard WebDAV services such as Jianguoyun, Nextcloud, and Alist. Uses SHA1-based manifest incremental uploads, transmitting only changed files.
  • Local folder (disabled by default): supports paths such as ~. Each synchronization atomically mirrors the entire directory, so an interrupted sync does not leave a partial backup.

Four Types of Content Synchronization

Each content type can be toggled independently and configured with a synchronization policy:

  • Skills: enabled by default, policy = union. All new additions are accepted, and changes from both sides are merged using AI semantic merging.
  • Sessions: disabled by default, policy = backup. Written to backup/<instanceID>/, each machine has an independent cloud copy, and local data is never overwritten.
  • Settings: enabled by default, policy = backup.
  • Plugin manifests: enabled by default, policy = backup.

AI Smart Alignment and Conflict Resolution

  • Smart alignment: Click “AI Smart Alignment” to first automatically backfill remote additions, then have AI perform semantic merging on files modified on both sides. After merging, the result is automatically pushed.
  • Conflict resolution: When a conflict occurs, an “AI Resolve Conflicts” button appears on the settings page. Clicking it triggers automatic push and PR merge by the system.

Snapshots and Recovery

  • Local-first snapshots: By default, snapshots are stored locally only (~/.dsh/dsh-sync/snapshots/), with 30 snapshots retained using rolling retention.
  • Generic cloud upload: Cloud upload occurs only when “Upload to Cloud” is checked, and data is written to all enabled cloud protocols.
  • Recovery: Local recovery is performed directly; if local data is missing, fallback proceeds in the order Git → WebDAV → local folder.

Security Mechanisms

  • Private repository validation: Supports four hosting providers: GitCode (default), GitHub, GitLab, and Gitee. If a repository is determined to be public when saving, saving is always rejected.
  • Token isolation: AI prompts do not contain any access tokens. Credentials are written only and not read back, and are injected via environment variables.

Installation and Enablement

Use the official command to install the plugin:

dsh plugin --profile web add @weibaohui/dsh-sync -w

After installation, restart dsh web to make it take effect.

Typical Usage

  1. Create a private Git repository: Create a private repository on GitCode (default), GitHub, GitLab, or Gitee.
  2. Configure the hosting provider: Open Web UI → Settings → dsh-sync → Git tab, select the hosting provider, and enter the repository URL and access token.
  3. Switch hosting provider: Supports four hosting providers: GitCode, GitHub, GitLab, and Gitee.
  4. Use AI alignment: After routine modifications, click “AI Smart Alignment” to perform semantic merging.
  5. Browse and restore: When a conflict occurs, click “AI Resolve Conflicts”. When you need to restore files from the remote, click “Browse Remote” → select files → “Preview Fetch” → “Apply”.

Notes

  • Sensitive information leakage risk: If files such as settings.yaml contain confidential data, they may enter the AI context (an inherent property of the semantic merging feature). If this is a concern, set conflictMode=manual or disable the corresponding synchronization toggle.
  • Windows path issues: On Windows, Git Bash path conversion issues may occur; pay attention to environment variable configuration.
  • Settings persistence: Settings persistence depends on the host document or a self-managed file (~/.dsh/dsh-sync/settings.).
  • Self-hosted/unknown hosts: Repository privacy cannot be validated; users must manually confirm the risk before saving.

Summary

weibaohui/dsh-sync focuses on solving data consistency issues in DSH multi-machine development. Through multi-protocol backup, AI-assisted merging, and secure snapshot mechanisms, it provides a reliable synchronization solution.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye