DeepSeek Harness Slider Puzzle Plugin: dsh-puzzle-plugin

DeepSeek Harness (DSH) adopts a plugin-based architecture, allowing developers to extend WebUI functionality. During development or usage, there is sometimes a need for a lightweight, dependency-free sliding puzzle feature to test interactions or provide entertainment. Here we introduce dsh-puzzle-plugin, a sliding puzzle game plugin designed specifically for the DSH WebUI.

This is a sliding puzzle game integrated into the DSH WebUI. It supports difficulty switching from 2x2 to 6x6, features move count and time tracking, and enables real-time interaction via AI tools. Maintained by developer feverZHONG, this plugin is licensed under MIT and has zero third-party dependencies.

Core Features

  • Game Mechanics: Adopts Klotski-style sliding puzzle gameplay, supporting switching between five grid sizes: 2x2, 3x3, 4x4, 5x5, and 6x6.
  • Interaction & Statistics: Provides functions for starting a new game, previewing the current state, tracking move counts, and tracking time spent. A celebration effect with random quotes is triggered upon puzzle completion.
  • AI Assistant Tools: The model can interact with the puzzle panel via the following tools:
    • puzzle_talk: Send text hints or encouragement to the panel.
    • puzzle_state: Query current game information (grid size, moves, time, completion status, current image, available images).
    • puzzle_set_image: Change the puzzle image, supporting specified gallery names or direct URLs.
  • Image Management: Supports three methods for changing images. First, place images in the $DSH_HOME/puzzles/ directory (supporting png/jpg/webp/gif) and click refresh on the settings page; second, paste an image URL directly on the panel or settings page; third, use the conversational command puzzle_set_image.

Installation and Activation

The plugin code is licensed under MIT, and the documentation is licensed under CC BY 4.0 (Attribution required). The installation command is as follows:

dsh plugin --profile web add dsh-puzzle-plugin-0.2.0.tgz

Restart the WebUI after installation to load the plugin.

Typical Usage

  • View Current Status: The model calls puzzle_state to view the current puzzle’s grid size, move count, time spent, and completion status.
  • Change Image: If the puzzle background image needs to be changed, use the puzzle_set_image command in the conversation to specify a local file name or a web URL.
  • Package Plugin: If compiling from source code, run the packaging command in the project directory:
pnpm pack --pack-destination <your_plugin_distribution_directory>

Use Cases and Notes

  • Configuration & Persistence: The plugin’s configuration is persisted in $DSH_HOME/dsh-puzzle-config.json, containing the current image and default grid size settings. It does not rely on the Config schema and takes effect immediately upon installation.
  • Development & Hot Reload: The plugin code is licensed under MIT. After modifying the source code in client/src/, you must run node client/build.mjs to regenerate the client.js artifact; simply refresh the page to apply changes. Modifying code in the host/ directory requires restarting the WebUI.
  • Permission Note: The plugin runs with the permissions of the current DSH process. Please ensure the source code and license comply with your usage standards.

This plugin is suitable for developers who need to integrate lightweight games or test panel interactions within the DSH environment. Full documentation and source code are available at:
* GitHub
* DSH Plugin Directory

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

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

Xiaoye