返回目录
其他 插件

DeepSeek-harness-Extension

Crayonnan/DeepSeek-harness-Extension

该仓库暂未提供项目说明。

Stars
0
Forks
0
Issues
0
更新
1 天前

PROJECT TOPICS

项目标签

PROJECT README

README

dsh-quota-bar

English | 中文

A lightweight quota bar plugin for the DeepSeek Harness web GUI — a pill in the session header showing your current quota, with a dashboard for usage, balance, cache-hit rate and per-model spend.

Features

  • Quota pill (session header, right edge): OpenCode Go plan usage — worst-window remaining % — or DeepSeek API account balance.
  • Dashboard on click:
    • Quota row: OpenCode Go three usage windows (5h rolling / weekly / monthly, % used + progress bar + plan limit + reset time) or the DeepSeek balance card (total / topped-up / granted).
    • Session chips: cache-hit rate, input / output tokens, context occupancy (live from host projections).
  • Model spend: per-model tokens and estimated USD cost across all durable session logs, with horizontal cost-share bars and a total.
  • Provider auto-detected from the default model; API keys resolve through the DSH credentials seam and never leave the host.

Design

Dual-face Cordis plugin (no build step, plain ESM):

Part File Role
Host index.js TypertRemoteService with two RPC methods: status() fetches live quota/balance from the provider endpoints; usage() zstd-decodes every session log (~/.dsh/sessions/**/session.jsonl.zstd), folds per-(turn,step) usage samples attributed to the model of the latest request/header, and prices them with the pi-ai catalog (USD / 1M tokens, ~15s cache).
Client client.js Hand-written browser bundle registering a conversation.session.header.utilities slot entry; renders the pill + dashboard; reads live tokenUsage / contextPressure session projections.
Manifest typert.host.js Strict-mode zod schemas for both RPC methods.

Install

dsh plugin --profile web add "github:Crayonnan/DeepSeek-harness-Extension"

Add to $DSH_HOME/profiles/web/cordis.patch.yml:

- insert:
    - id: quota-bar
      name: 'dsh-quota-bar'

Restart dsh web.

Network-restricted? If codeload.github.com is unreachable: dsh plugin --profile web add "git+https://github.com/Crayonnan/DeepSeek-harness-Extension.git"

Configuration

- id: quota-bar
  name: dsh-quota-bar
  config:
    opencodeUsageUrl: https://opencode.ai/zen/go/v1/usage  # default
    deepseekBaseUrl: https://api.deepseek.com              # default
    timeoutMs: 15000                                       # default
    sessionsRoot: <absolute path>                          # optional; default $DSH_HOME/sessions
    modelCosts:                                            # optional; overrides catalog pricing (USD / 1M tokens)
      kimi-k3: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 0 }

Pricing priority: built-in table < pi-ai catalog (<provider>.json) < modelCosts.

Uninstall

Remove the patch row, then dsh plugin --profile web remove dsh-quota-bar.

License

MIT

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类其他
规则置信度

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。