The DSH philosophy emphasizes “everything is a plugin.” When managing a large number of host and client profile plugins, common pain points include maintaining manifests, tracking updates, handling upgrade rollbacks, and performing backups and migrations. huahua-dsh-plugin-orchestra is a plugin management system designed to provide unified manifest management, update detection, one-click upgrades, backup, and rollback capabilities.

Core Features

This plugin provides the following core capabilities:

  • Plugin manifest: Generates and manages the plugin list, supporting a cache-first summary view.
  • Update detection: Checks for available updates and supports forced cache refresh (bypasses TTL but preserves ETag).
  • Upgrade and rollback: Supports upgrading or rolling back to a specified version, with automatic rollback on upgrade failure.
  • Backup management: Supports creating backups, viewing backup lists, and cleanup.
  • Cross-agent migration: Supports migrating plugins between agents.
  • Panel integration: Provides a “Plugin Management” entry card on the DSH settings page (with an update badge) and a notification center in the top-right corner.

Installation

Install this plugin using the DSH CLI:

dsh plugin --profile web add huahua-dsh-plugin-orchestra

For local development installation, you can use the path method:

dsh plugin --profile web add file:./huahua-dsh-plugin-orchestra

Command-Line Usage

After installation, you can operate via the CLI or by directly running node lib/cli/index.js. Some non-interactive commands require the --yes flag.

1. View Manifest and Updates

View the current plugin manifest (L1 purpose summary, cache-first):

node lib/cli/index.js list --json

Check the update status:

node lib/cli/index.js check --json

2. Upgrade and Rollback

Upgrade the specified plugin. --dry-run simulates the operation without making actual changes; --yes skips confirmation.

node lib/cli/index.js upgrade <pkg> [--to <ver>] [--dry-run] [--yes]

Roll the plugin back to a specified backup or the most recent available snapshot:

node lib/cli/index.js rollback <pkg> [--backup <id>] [--yes]

3. Backup Management

Manage plugin backups:

node lib/cli/index.js backup list|create <pkg>|prune <pkg> [--force]

Panel Usage

After installing the plugin, a “Plugin Management” entry card appears on the DSH settings page. Through this entry, you can access the following features:
* Plugin manifest / details / changelog
* Upgrade and rollback operations
* Backup management
* Global settings

A notification center floating window appears in the top-right corner to display update notifications.

Configuration and Data

  • Data directory: ~/.dsh/plugin-orchestra/
    • Contains config.json (configuration), cache/ (cache), backups/ (backup snapshots), and logs/ (logs).
  • Environment variables:
    • The DSH_ORCHESTRA_* family (e.g., DSH_ORCHESTRA_PROFILE).
    • GITHUB_TOKEN or GH_TOKEN: Used to increase the GitHub API rate limit quota (anonymous is 60/h; using a Token can raise it to 5000/h).

Exit Codes

Commands return the following exit codes:

  • 0: Operation successful
  • 2: Usage error
  • 3: Target does not exist
  • 4: No operation (conditions not met)
  • 5: Failed and rolled back (retryable)
  • 6: Failure requires manual intervention
  • 130: Interrupted by user

Technical Details and Notes

  • Node version: Requires ^22.19.0 || >=24.
  • Sandbox/CI environment: If node --test fails in a sandbox due to permission issues (spawn EPERM), it is recommended to run node tests/xxx.test.mjs directly.
  • Build and test:
    • Type check: pnpm typecheck
    • Build: pnpm build
    • Test: pnpm test (engine side) or pnpm test:client (panel side).

This plugin is open-sourced under the MIT License. Please review the source code and license before installation to ensure it meets your security and compliance requirements.