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:
- Balance Display: Displays the total account balance (including topped-up and gifted credits).
- Consumption Statistics: Displays consumption for the current turn, session, and sub-agents.
- Burn Rate Monitoring:
- Real-time monitoring of the burn rate (default 15-second window).
- Calculation of the average burn rate (frozen upon task completion).
- Auto-termination: Supports automatic interruption of running turns when exceeding thresholds.
- Interaction & Layout:
- Supports drag-and-drop layout, with position memory across reloads.
- Supports collapsing into a capsule state.
- Visualization: Provides real-time chart visualization.
- 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¶
- Layout Adjustment: Drag the floating panel to any position on the conversation interface.
- State Collapsing: Click or double-click the panel header to collapse it into a capsule state, retaining only the status indicator and amount.
- Data Observation: While running tasks, observe the burn rate chart and real-time values to compare consumption across different tasks.
- 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 (
terminateAbovePerHouris 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.
- The auto-termination feature is disabled by default (
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.