dsh-budget-watcher: DeepSeek Harness Conversation Floating Balance and Consumption Monitor

Preface

In the DeepSeek Harness (DSH) conversation interface, users often cannot intuitively see real-time changes in account balance or the per-turn cost of current tasks. This results in a situation where, during long-running tasks, users are often only informed of balance exhaustion or overspending after the task has been interrupted. Targeting this scenario, dsh-budget-watcher provides a floating window that displays account status and consumption in real-time.

Plugin Introduction

dsh-budget-watcher is a DeepSeek Harness plugin maintained by NeutronStar714 and categorized under admin-security. It displays the total account balance, consumption of the current turn and session via a floating window, and provides real-time burn rate monitoring.

Core Features

This plugin focuses on cost monitoring and control, with specific features including:

  1. Balance Display: Displays the total account balance (including topped-up and gifted credits).
  2. Consumption Statistics: Displays consumption for the current turn, session, and sub-agents.
  3. Burn Rate Monitoring:
    • Real-time monitoring of the burn rate (default 15-second window).
    • Calculation of the average burn rate (frozen upon task completion).
  4. Auto-termination: Supports automatic interruption of running turns when exceeding thresholds.
  5. Interaction & Layout:
    • Supports drag-and-drop layout, with position memory across reloads.
    • Supports collapsing into a capsule state.
  6. Visualization: Provides real-time chart visualization.
  7. Performance: Consumes no extra Tokens or requests.

Installation & Activation

Currently, no official installation command is provided. The plugin requires manual configuration or deployment. According to the package.json configuration, this plugin depends on @deepseek-ai/schemastery (version ~3.18.4) and requires Node.js version >= 20.

Typical Usage

  1. Layout Adjustment: Drag the floating panel to any position on the conversation interface.
  2. State Collapsing: Click or double-click the panel header to collapse it into a capsule state, retaining only the status indicator and amount.
  3. Data Observation: While running tasks, observe the burn rate chart and real-time values to compare consumption across different tasks.
  4. Threshold Configuration: Adjust warning thresholds and interruption thresholds via settings.

Use Cases & Notes

  • Use Cases: Developers running long-term agent tasks who are sensitive to API account costs.
  • Notes:
    • The auto-termination feature is disabled by default (terminateAbovePerHour is set to 0).
    • There are precision limitations with Turn targeting (known limitation).
    • Only tallies the consumption of the current turn and its direct/indirect sub-agents.
    • The displayed balance is DeepSeek’s total_balance.
    • Does not initiate additional API calls.
    • The plugin runs with the permissions of the current dsh process; source code and license (MIT) should be checked before installation.

Summary

Through real-time data visualization and threshold control, this plugin helps developers accurately grasp costs during task execution and avoid unexpected balance exhaustion. For more details, please visit GitHub.

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

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

Xiaoye