Introduction

When developing or debugging with DeepSeek Harness (DSH) in the Web Profile, developers often need to check the current API balance frequently. Opening the dashboard or refreshing the page interrupts the workflow. The dsh-balance-pill plugin solves this pain point by embedding a persistently visible balance indicator directly into the interface, allowing balance status to be checked without navigating to another page.

Plugin Overview

dsh-balance-pill is a DeepSeek Harness Web plugin maintained by developer ivbrajkovic and open-sourced under the MIT license.

Its core function is to display the current API balance in the DeepSeek Harness Web interface. When a session is open, the balance indicator appears in the session header; when no session is open, it is fixed to the top-right corner. The plugin does not provide charts or configuration popups; it exists solely as a lightweight visual component.

Core Features

The plugin has the following capabilities:

  • Positioning: It appears in the session header when a session is active; it remains fixed in the top-right corner otherwise, ensuring it is always visible.
  • Balance polling: It automatically polls the balance endpoint once per minute.
  • Peak/off-peak coloring: Depending on whether the current time falls within the configured peak-hour range, it shows a red background (peak) or a green background (off-peak).
  • Configuration management: Peak-hour rules are configured via the DSH Settings interface and persisted locally.

Installation and Activation

Before installation, ensure DEEPSEEK_API_KEY is configured and that DeepSeek Harness Web Profile is running.

  1. Install the plugin using the following command:
    dsh plugin --profile web add github:ivbrajkovic/dsh-balance-pill
  1. After installation, restart the Web Profile and refresh your browser page.

If you need to pin a specific version, you can append a commit hash:

dsh plugin --profile web add github:ivbrajkovic/dsh-balance-pill#<commit>

Configuration

Peak-hour rules for the plugin are configured via the DSH Settings interface, without modifying configuration files.

  1. Open Settings -> Plugins -> Plugin configuration.
  2. Expand and edit the Balance pill peak hours configuration item.
  3. Set the timezone (defaults to UTC) and peak-hour time ranges (format: HH:MM - HH:MM, one per line).
  4. Save the settings.

Configuration data is persisted to ~/.dsh/settings.yaml (namespace: dsh-balance-pill). The plugin’s logic is based on the user’s browser local timezone, and configuration updates take effect immediately (no restart required).

The configuration structure is shown below:

{
  timezone: "UTC",
  peakHours: [
    ["01:00", "04:00"],
    ["06:00", "10:00"],
  ],
}

Security and Architecture

The plugin emphasizes security in its architectural design:

  • Host/Client separation: The API key exists only in the DSH Host process and is used only for local endpoint requests; it is never sent to the browser.
  • Data transfer: The browser-side client receives only a simplified data format { "ok": true, "balance": 42.17, "currency": "CNY" } or an error state, and cannot access sensitive information.
  • Zero dependencies: The Host side uses Node.js’s built-in fetch, with no external dependencies; the Client side loads through DSH’s dsh.client.
  • Permission control: The plugin does not directly read files or launch processes; it only invokes DSH’s existing credentials and webServer services.

Conclusion

dsh-balance-pill provides a lightweight, secure, and intuitive way to monitor balance and usage time slots in the DeepSeek Harness development environment. For developers who run long-term debugging tasks, it effectively reduces the number of steps required to check the balance.

  • GitHub: https://github.com/ivbrajkovic/dsh-balance-pill
  • Directory: https://www.skillhub.cn/plugins/ivbrajkovic/dsh-balance-pill