dsh-dev-plugins
Public DeepSeek Harness (dsh) dev plugins: non-localhost Web UI serving, browser notifications, workspace token statistics, browser control through a Chrome extension, and a newline-on-Enter composer, without patching the installed dsh.
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:0xshawn/dsh-dev-pluginsドキュメント
README 全文を読む ↗Token usage statistics
The sidebar gains a Token usage entry that opens a page with:
- time presets (today, last 7 days, last 30 days, all time, custom range), with the day boundary taken from the browser's IANA time zone; the control uses the active light or dark theme colors;
- a daily bar chart of provider-billed tokens;
- summary cards for the total plus uncached input, output, cache read, and cache write;
- a workspace table with session counts and the same four buckets.
The data comes from the Host's durable session logs, read through
ctx.sessionQuery without activating any Agent. The plugin replays the same
provider usage samples the stock tokenUsage projection folds — one settlement
per Turn/step, with retried steps counting their replacement attempt — and skips
fork-inherited event prefixes so a forked Session does not double-count its
parent's usage. Subagent Sessions are included and attributed to the workspace
of their parent chain. Sessions not registered in a workspace fall back to a
per-directory row; Sessions with no directory at all share one "Other sessions"
row.
The first request scans the complete history and may take a few seconds; later
requests reuse a per-Session fold cache that the live session/event feed
invalidates. The page's Refresh button forces a full rescan. Usage is
attributed to the local day of the event that settled the billed sample, so a
Turn crossing midnight stays on the day it settled. Set statsPage: false to
remove both the sidebar page and its data route.
The page reads GET /dsh-dev-plugins/stats/data?from=&to=&tz=
(from/to optional, refresh=1 forces a rescan). The route is read-only and
applies the same trusted-authority and launch-token cookie checks as /api; it
returns only token totals, workspace paths, and day keys, never message content.