Introduction

The core philosophy of DeepSeek Harness (DSH) is that “everything is a plugin.” When integrating the workbuddy2api local gateway, this usually involves manually configuring model metadata, manually managing the process lifecycle, downloading binaries, and handling login workflows. This plugin is designed to take over these repetitive tasks, enabling managed gateway processes and automatic model catalog synchronization.

Plugin Scope

dsh-workbuddy2api is a DeepSeek Harness (DSH) plugin used to supervise the workbuddy2api gateway process and automatically register its models. It does not contain implementation logic; it is responsible for only two things: process lifecycle management and model catalog automation.

Core Features

  1. Process Hosting: Automatically starts the gateway when dsh starts and automatically reclaims it when dsh exits. If a healthy gateway is already running on the target port, it is reused directly; no duplicate startup occurs, and unrelated processes are not terminated.
  2. Model Synchronization: Automatically synchronizes the model catalog by reading the gateway’s /v1/models endpoint in real time, and automatically maps the model list, context window, output limit, and thinking tier.
  3. One-Click Setup: Automatically downloads the gateway binary (with SHA256 verification), prepares the runtime directory, guides the login process, and starts the service via the /wb2api-setup command.
  4. Management Commands: Provides six management commands covering initialization, status queries, and start/stop control.
  5. Authentication and Policies: Includes a built-in OAuth login flow and supports protocol adaptation, account pools, weighted account selection, tiered circuit breaking, and scheduled tasks.

Installation and Enablement

Use the following command to complete the installation (version v0.3.2):

dsh plugin --profile web add https://github.com/tearslee/dsh-workbuddy2api/releases/download/v0.3.2/dsh-workbuddy2api-0.3.2.tgz

After installation, you must restart dsh for the new plugin to take effect.

Usage and Configuration

Run /wb2api-setup in the conversation to initialize. This command will, in order, locate or download the gateway executable, prepare the runtime directory, guide the login process, and start the gateway.

Common commands also include:
* /wb2api-status: View the gateway status.
* /wb2api-start: Start the gateway.
* /wb2api-restart: Restart the gateway.

Configure the relevant parameters in cordis.patch.yml to enable the provider:

- insert:
    - id: workbuddy2api
      name: 'dsh-workbuddy2api'
      config:
        baseURL: http://127.0.0.1:7863/v1
        autoStart: true

Important Notes

  1. Restart Required After Installation: Newly installed plugin code is not hot-loaded at runtime; dsh must be restarted.
  2. Package Name Conflict: A package with the same name on npm is already taken. Do not use dsh plugin add dsh-workbuddy2api; use the official GitHub Release artifact instead.
  3. Upstream Repository Status: The original upstream repository has been deleted; use the continuation repository.
  4. Artifact Verification: Artifacts are obtained from Releases; the SHA256 checksum must be verified after download.
  5. No Hot Mounting: Hot-mounting new plugins while the system is running is not supported.