dsh-subscription-overlay: Subscription Quota Aggregation and Local Usage Tracking Plugin

Preface

In DeepSeek Harness (DSH) development scenarios, developers often need to switch between multiple AI service providers and manage their respective subscription quotas. Manually checking the remaining quota across different services frequently interrupts the workflow. The dsh-subscription-overlay plugin is designed to address this issue. Through a toggleable web overlay, it aggregates real-time quotas for Claude, Codex, and OpenCode Go, while performing local availability probes and consumption tracking for CommandCode, which lacks a public quota interface.

Plugin Overview

This is a DSH web plugin maintained by ajceee, released under the MIT License. It injects UI via DSH’s web plugin mechanism, providing a floating window and a settings panel to display unified service status and local consumption data.

Core Features

1. Subscription Quota Aggregation and Display

The plugin aggregates data from four providers:
* Claude, Codex, OpenCode Go: Display real-time usage bars and reset times.
* CommandCode: Since this service lacks a quota endpoint, the plugin only displays probe status (online/offline + latency) and local consumption records; it does not fabricate percentage bars.

2. Overlay and Interaction

  • Floating Window: Displayed by default as a draggable “pill” or “ring” mode, with badges indicating unread messages or status changes.
  • Hotkey Toggle: Use Ctrl+Shift+S to hide or show the overlay.
  • Panel Operations: Click the overlay to open the four-provider panel; click the refresh button to force data refetching.

3. Local Consumption Tracking

Provides a local monthly consumption ledger, recording the number of tokens used, and supports setting monthly budgets (in tokens). When the budget is greater than 0, it calculates and displays the budget utilization percentage.

4. Settings and Controls

  • Global and Per-Item Switches: Supports independently enabling/disabling data display for each provider.
  • Polling and Alerts: Set polling intervals (1-60 minutes) and alert thresholds (1-100%).
  • HTTP API: Provides a same-origin API interface, supporting status refresh, CommandCode probing, settings updates, and ledger appending via POST requests.

Installation and Configuration

Prerequisites:
* DSH version 0.1.5-rc.1 or higher.
* Node.js version 20+.

Installation Steps:
1. Clone or obtain the plugin source code to a local directory (e.g., C:/Projects/dsh-subscription-overlay).
2. Run the following command to install the plugin:

dsh plugin --profile web add C:/Projects/dsh-subscription-overlay
  1. Important: You must restart the DSH web process after installation to apply bundle-list changes.

Usage

  1. Show/Hide: Upon successful installation, a subscription quota overlay will appear in the bottom-right corner. Press Ctrl+Shift+S to quickly toggle its visibility.
  2. View Details: Click the overlay to open the panel and check the specific remaining quotas for each service.
  3. Refresh Data: Click the overlay or the refresh button inside the panel to force refetching data from OAuth/Session sources.
  4. CommandCode Probing: In the CommandCode card, click the “Probe” button to re-check service availability.
  5. Manage Consumption: Configure monthly budgets in the settings or view the “This Month’s Consumption” panel to see cumulative monthly token usage.

Notes

  • CommandCode Limitations: As the service lacks a quota endpoint, the panel only displays probe results and local records; it does not show percentages (unless a monthly budget is set).
  • Credential Management: The plugin does not store API keys in the settings; all credentials are resolved via DSH’s credential domain, supporting environment variables or session files as fallbacks.
  • Permissions and Restart: The plugin runs with the permissions of the current DSH process. Ensure you have reviewed the source code and license prior to installation. Restart the service after installation to load the new plugin.
羽毛球分组比赛记分
小程序二维码

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

Xiaoye