DSH-crystal: DSH's Chief Steward Plugin

Introduction

The philosophy behind DSH is “everything is a plugin.” Developers often need to manage multiple plugins, monitor runtime status, and control resource usage. Manual maintenance is costly, and scattered scripts are hard to orchestrate uniformly. DSH-crystal is a workflow-type plugin designed to provide a unified entry point, integrating health checks, bookkeeping, backups, on-demand scheduling, desktop pet, memory, and QQ bridge linkage into a single interface.

Plugin Overview

DSH-crystal (nlw258000nlw/dsh-crystal), maintained by nlw258000nlw, is a workflow plugin. It offers “steward-level” unified management: system health checks with auto-repair, a capability ledger, memory diagnostics, desktop pet and reminder bus, on-demand plugin scheduling, and QQ bridge integration.

Core Features

1. Health Check & Auto-Repair

The plugin includes 21 built-in system health check scripts (doctor). After running the health check command, the target state is 0 unresolved red / 0 yellow / 20 green / 1 gray. If issues are detected, use the auto-repair parameter -Verb doctor -Auto to attempt resolution. For troubleshooting, check the [RED]/[YELLOW] lines in data\crystal\alerts.log, and cross-reference with doctor-state.json to pinpoint the problem.

2. Capability Ledger

The DSH sidebar “Crystal” panel includes modules for the capability ledger, health check details, mode levels, memory, QQ linkage, and more. The ledger is used to record and manage plugin runtime status and configurations.

3. Desktop Pet & Reminder Bus

The desktop pet is launched via scripts\crystal.ps1 -Verb pet -Arg1 start. The right-click menu provides nine functions. Parameters such as pet size, speech interval, voice toggle, and silent hours can be configured in the settings file.

4. Memory & Review Rules

The plugin provides a memory toolkit and review rule configuration. Use rules.review.every to control the forced review interval every N items, defaulting to 3.

5. On-Demand Plugin Scheduling

The plugins section supports 13 plugin demand levels, configurable as always / on-demand / off, enabling on-demand scheduling.

6. Usage Bookkeeping & Budget Alerts

The budget section allows setting a daily budget (e.g., 12 CNY / 500 million tokens). When the limit is reached, a desktop pet bubble reminder is triggered.

7. QQ Bridge Integration

The panel includes a QQ linkage module for interfacing with QQ bridge-related features.

8. Data Paths & Backup

The paths section can override auto-detected data paths and takes the highest priority. An automatic backup is created before any configuration changes.

Installation & Activation

Pass the plugin directory to DSH and install via CLI:

dsh plugin --profile desktop add link:<this_directory>

The plugin will automatically handle dependencies and bundles.

Configuration Guide

The main configuration file is crystal.json. An automatic backup is created before any modifications.

  • modes: chat / work, each corresponding to dual-level trigger words, injection rules, and tool interception.
  • pet: size / intervalMin / voice / silent, controlling pet size, speech interval, voice toggle, and silent hours.
  • rules: review.every, the forced review interval every N items, defaulting to 3.
  • plugins: 13 plugin demand levels, supporting always / on-demand / off.
  • budget: usage budget (e.g., 12 CNY / 500 million tokens), used to trigger reminders.
  • paths: data paths, can override auto-detection results, highest priority.

Typical Usage

Health Check

powershell -File scripts\crystal.ps1 -Verb doctor

Auto-Repair

powershell -File scripts\crystal.ps1 -Verb doctor -Auto

Launch Desktop Pet

scripts\crystal.ps1 -Verb pet -Arg1 start

View Status (JSON)

scripts\crystal.ps1 -Verb status -Arg1 json

Use Cases & Notes

  • Ideal for DSH developers who need unified management of multiple plugins, monitoring of health check status, and control of resources and budget.
  • The plugin runs with the current DSH process permissions.
  • It is recommended to review the source code and license (MIT) before installation.

Conclusion

DSH-crystal provides one-stop health checks, ledger management, scheduling, desktop pet, and integration features, making it well-suited as a “chief steward” plugin in the DSH ecosystem. More details and documentation can be found in the repository.

  • Directory page: https://www.skillhub.cn/plugins/nlw258000nlw/dsh-crystal
  • GitHub: https://github.com/nlw258000nlw/dsh-crystal
羽毛球分组比赛记分
小程序二维码

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

Xiaoye