DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-anysearch-quota

f

dsh-anysearch-quota

Manifest valid

DSH Plugin: AnySearch Quota Badge + Quota View for the Session Title Row, Prioritizing the Real Remaining Quota from the Console Dashboard, Falling Back to Local Bookkeeping Estimates

UI (client)hasBundlePatchMachine translated

dsh-anysearch-quota

Answers one question for DSH: how much AnySearch search do I have left?

It does it in two places:

  • A badge on the session title row — AnySearch 958. Click it to open the full panel.
  • An 额度 tab in the conversation Views, beside Chat / Trajectory / Stats.

Where the numbers come from

SourceWhat it givesTrust
Console dashboardremaining / used / total, plan tier, next resetThe real account figure, same source as anysearch.com/console/overview
Local ledgercalls this machine made, per UTC dayExact for this machine; an estimate against the account balance
Rate windowx-ratelimit-limit / -remaining / -resetReal, but a short-lived limiter — not "calls left"

The dashboard source wins whenever it is available; the panel labels the local ledger as an estimate when it is not. The two are never mixed in one display.

The console dashboard source

AnySearch's public API has no endpoint for the remaining balance — its own docs say the console is authoritative. The console page is fed by an internal JSON API, which this plugin calls directly:

POST /auth/refresh              { refresh_token }        → session tokens
GET  /api/user/billing/overview Authorization: Bearer …  → the real counters

It authenticates as a console session, not with the as_sk_… API key (that key is rejected with 401). To enable it, copy the console's refresh token into a credential:

  1. Sign in at https://www.anysearch.com/console/overview.
  2. In the browser devtools, read localStorage['search-template-auth-state'] and copy its state.refreshToken.
  3. Store it as the credential ANYSEARCH_CONSOLE_REFRESH_TOKEN in $DSH_HOME/.credentials.yaml:
refs:
  ANYSEARCH_CONSOLE_REFRESH_TOKEN: "<the refresh token>"

That is the only value that leaves this machine besides the search requests themselves, and it only goes to www.anysearch.com. The console rotates the refresh token on every exchange; the rotated value is written back through the credential service, so the session survives a restart.

Without it the plugin still works: it shows the local ledger estimate and tells you which credential would enable the real figures.

The local ledger

Calls are counted from observed tools/result events, billed by AnySearch's own rules:

  • a successful web_search / anysearch_search → 1 call
  • a successful web_fetch (extract) → 1 call
  • anysearch_batch_search → 1 per successful sub-query
  • failed, invalid and timed-out requests → none (only a failure count)
  • anysearch_capabilities → none

The rate window

GET /v1/domains is documented as consuming no free or paid search quota, so it is the endpoint used to read the limiter headers. A 429 answer is recorded too — that is what a saturated window looks like. The panel states plainly that these headers are a window, not the daily quota.

Configuration

Optional keys on the plugin's row in cordis.patch.yml:

- id: dsh-anysearch-quota
  config:
    consoleEnabled: true                          # false: ledger estimate only
    consoleTokenEnv: ANYSEARCH_CONSOLE_REFRESH_TOKEN
    consoleBaseURL: https://www.anysearch.com
    consoleTtlMs: 60000                            # how long a dashboard reading is reused
    freeCalls: 1000                                # allowance the ledger estimate is drawn against
    probeEnabled: true                             # startup window probe + probe button
    probeMinIntervalMs: 30000
    apiKeyEnv: ANYSEARCH_API_KEY
    baseURL: https://api.anysearch.com
    stateFile: /path/state.json

Placement

  • The badge registers in conversation.session.header.actions (the Session title row) and, because the header hides its chrome on a blank New Session, also in conversation.hero.options. The two phases never overlap.
  • The panel is portalled to document.body: the header clips its overflow, so a panel growing inside it would be cut off.
  • The 额度 tab stays available for the full view.

Privacy

The API key and the console refresh token are resolved inside the Host process, per operation, from credential references. The browser half only ever receives numbers. The ledger is a local JSON file at $DSH_HOME/anysearch-quota/state.json; turning the plugin off stops the counting and removes the badge and tab, but keeps that file.

Notes

  • Counting starts when the plugin loads; calls made before installation are not in the ledger.
  • Calls from other devices or other clients are invisible to the ledger, which is why the ledger's "remaining" is an estimate and the dashboard's is not.

Comments

Loading…

Similar plugins

dsh-credits

by AnLifeX

DeepSeek Harness(dsh web)额度插件:跟随当前模型显示官方余额或 OpenCode Go 订阅用量,支持本会话估算、跨会话累计消耗与可视化设置。

Terminal & ClientsManifest valid

★ 3

↓ 231/wk

MIT

JavaScript

Oct 10, 2026

dsh plugin --profile web add dsh-credits

by marisa-4219

DeepSeek Harness 多供应商额度监控插件:余额型 API 查询 + 限额型本地用量计量,侧边栏实时卡片 + 可视化配置。

UI & ExperienceManifest valid

★ 7

↓ 102/wk

MIT

JavaScript

Oct 12, 2026

dsh plugin --profile web add deepseek-harness-quota-monitor

by ytftu

DSH(DeepSeek Harness)插件:底栏会话消费金额、每条回复本轮金额、右上角开放平台余额/今日用量/峰谷,点击弹出折线图。

Development & InfrastructureManifest valid

★ 3

↓ 404/wk

MIT

JavaScript

Oct 31, 2026

dsh plugin --profile web add dsh-session-cost

by DosterBool

DeepSeek Harness 插件:状态栏实时余额 + 本会话花费追踪 + 低余额暂停输出并引导充值

Manifest valid

★ 0

JavaScript

Aug 16, 2026

dsh plugin --profile web add dsh-balance-guard

by faith1688

专为 DeepSeek API 打造的实时用量 / 费用 / 余额计量插件 —— 在聊天输入框旁直接看到 tokens、花费与真实余额。

Tools & CapabilitiesTerminal & ClientsModels & ProvidersManifest valid

★ 3

↓ 250/wk

MIT

JavaScript

Sep 13, 2026

dsh plugin --profile web add @faith1688/dsh-usage-meter-harness

by Cassius0924

DeepSeek 额度与用量仪表盘 — DSH (DeepSeek Harness) 动态 Cordis 插件

UI & ExperienceManifest valid

★ 13

↓ 889/wk

MIT

TypeScript

Nov 12, 2026

dsh plugin --profile web add @cassius0924/dsh-usage-dashboard