rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Refone/dsh-billing-mini-tag
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
Show the current session's spend (¥x.xx) at the right end of the composer
statistics row — to the right of the context-usage meter. Amounts are priced
from the official DeepSeek token quote.
the ¥1.47 on the right is this plugin
Two routes; use whichever matches how you run DSH.
Choose one of the four installation methods below. They are alternatives,
not steps to run in sequence — do not run all four. All four finish with the
same dsh plugin --profile web add command; only the package source differs.
Method A — npm package (recommended; follows the latest release):
dsh plugin --profile web add dsh-billing-mini-tag
Method B — pinned release tarball (reproducible version):
dsh plugin --profile web add https://github.com/Refone/dsh-billing-mini-tag/archive/refs/tags/v0.3.1.tar.gz
Method C — repository main branch (latest development code):
dsh plugin --profile web add github:Refone/dsh-billing-mini-tag
Method D — local clone (for development):
git clone https://github.com/Refone/dsh-billing-mini-tag.git
cd dsh-billing-mini-tag
dsh plugin --profile web add "$PWD"
dsh plugin add forwards to pnpm inside the profile directory, so pass an
absolute path — "$PWD" after cd does that. A relative . would resolve to
the profile directory, not this clone. Update the clone later with git pull.
After choosing one and installing, restart dsh web, refresh the page, then
send a message. Run the same add command again, with the same source, to
update; remove with:
dsh plugin --profile web remove dsh-billing-mini-tag
The package ships plain JavaScript with no prepare script, so a GitHub
install needs neither a build step nor pnpm's build-script authorization.
dsh-billing-mini-tag — or github:Refone/dsh-billing-mini-tag — into
Package name or address, then press Install.¥ appears at the far right of the composer statistics row,
to the right of the context-usage meter.If npm or GitHub is unreachable, expand Install source in the same dialog and pick a mirror, or paste the tarball URL from the releases page.
conversation.composer.dock
entry with order: 2. That slot renders before the shipped context-usage
meter, so the pill also carries a positive CSS order to stay to the meter's
right — the original layout — without starting a second line.The package ships two halves:
| Half | Entry | Responsibility |
|---|---|---|
| Host | src/index.js (. export) |
Serves GET /plugin-billing-mini-tag/cost?session=<id>, folds the session log per assistant step, and refreshes the official quote. |
| Browser | src/client.js (./client export) |
Registers the billing-mini-tag composer-dock entry and keeps the ¥… pill at the right end of the statistics row, right of the context-usage meter. |
The plugin declares no meta.title. DSH falls back to the package name
(dsh-billing-mini-tag), which is also the component row's id and module name,
so the component row no longer prints the name twice more under its own title.
locale/*.json keeps the description — which DSH does not derive from the
package — plus the pill tooltip copy.
The host half:
assistant/attempt / assistant/message usage events per
turn:step; a repeated step replaces its predecessor, and an
llm/retry-started makes the retried attempt bill as a separate call. This
mirrors DSH's own tokenUsage projection.¥0.00) plus raw tokens, per-model
breakdown, quote source, and unknown-model names for debugging. Unknown
sessions, unloaded logs, and failed quote fetches degrade to zero or the
previous quote instead of throwing.The route is same-origin only: it rejects cross-site callers and accepts
header-less probes only from loopback. A companion debug route,
GET /plugin-billing-mini-tag/quote, returns the cached quote and current
prices. Nothing is sent anywhere except the pricing-page request itself; there
is no telemetry.
Prices are CNY per 1M tokens from the official page:
| Bucket | How it is charged |
|---|---|
| Cache hit (input read from cache) | cache-hit price |
| Cache miss (uncached input) | cache-miss price |
| Cache write | cache-miss price |
| Output | output price |
Peak windows are evaluated in Beijing time (no DST): Mon–Fri 09:00–12:00 and
14:00–18:00. Chinese public holidays are not modelled, so weekday windows are
the best local approximation of the official peak definition. Models the quote
cannot classify fall back to the deepseek-flash bucket, and the route's debug
payload names them (unknownModels).
engines.dsh as >=0.2.0, the range
with the composer-dock list slot this control registers into.api-docs.deepseek.com for live quotes. Offline installs
still work with the embedded quote.locale service (shipped with the web
and desktop apps) for its pill tooltip. The fiber waits for it, so the
tooltip never renders as a raw key.Needs the
webServerservice. The plugin serves its cost route through the shippedwebbundle, so any profile that mounts it works — thewebprofile and the Desktop app'sdesktopprofile both do. Installing it into a custom profile that only hasdsh-baseleaves the entry waiting forwebServer, and DSH refuses to boot. Initialize custom profiles from the web template (dsh --profile <name> --from-default-profile web).
There is no build step: both halves are plain ESM/JS, and the browser half
is a hand-written module-loader wrapper that needs no bundler. pnpm pack
ships src/, cordis.patch.yml, the READMEs, the changelog, the license, and
the screenshot.
node scripts/check-release.mjs # publishing requirements
node scripts/test-client.mjs # browser-half smoke test (also `pnpm test`)
pnpm pack --dry-run # inspect the exact tarball contents
scripts/check-release.mjs verifies what the DSH ecosystem scans for — the
dsh-plugin keyword, a copyable dsh plugin --profile web add … command in
the README, an exported apply(ctx) module, a resolvable dsh.bundle.patch
bundle declaration — plus the package metadata, icon and locale keys.
scripts/test-client.mjs stubs window.__ModuleLoader__, React, the Cordis
slots service and the locale runtime, then renders what the GUI would get: the
¥x.xx pill and its tooltip in both shipped languages. The fake ctx.get()
answers nothing, so a regression back to an optional locale lookup fails the
test instead of shipping raw keys.
.
├── src/index.js # host half (apply, quote, session fold, HTTP route)
├── src/client.js # browser half (composer-dock control + ¥ pill)
├── locale/{en,zh}.json # plugin description + pill tooltip copy
├── icon.svg # inventory artwork
├── cordis.patch.yml # bundle patch: inserts the plugin into a profile
├── scripts/check-release.mjs
├── scripts/test-client.mjs
├── docs/development-trace.md
└── showcase.png
MIT © 2026 Refone
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek。