dsh-token-gobbler

DSH PLUGIN模型与账号接入

仓库 psynosaur/dsh-token-gobbler

模型与账号接入 未标注验证等级 安全审查:未标注 可信度:未标注 可安装插件

Token Gobbler 是 DeepSeek Harness 的会话审计插件,读取 DSH 轨迹统计各模型 token 用量、速度与成本,把日常使用变成模型评测。

一句话选型结论

按资料字段整理

dsh-token-gobbler 是模型与账号接入类的 DSH 可安装插件,未做沙盒验证,暂无安全审查结论,列出 5 项功能,没有现成安装命令,需要按仓库 README 接入。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类模型与账号接入 收录类型可安装插件 验证等级未标注验证等级 安全审查未标注
验证等级 UNKNOWN 未标注验证等级
GitHub 星标 0 复刻 0 · 未关闭 issue 0
最近更新 2026-09-13 创建于 2026-09-04
README 15.0 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名未发布到 npm可用 npm view 查看包信息

能做什么

5 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-token-gobbler:为 DeepSeek Harness 会话做 token 用量审计的 DSH plugin

  • 按模型归因每步 token 用量
  • 统计解码与预填充速度
  • 公司价与本地价成本对比
  • 多会话运行对比图表
  • 导入其他 DSH 数据源

上游标签

aidshdsh-pluginperformance-analysisperformance-metricsperformance-monitoring

验证等级与安全审查

未标注验证等级
自动化流程结论,不是人工审核
验证等级未标注验证等级上游未给出验证结论,安装前请自行确认
安全审查未标注静态分析结论,未标注不代表已通过审查
仓库健康度未标注按仓库活跃度与最近更新时间给出
可信度未标注综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 列出了 5 项功能,能直接看出它解决什么问题。

先想清楚的地方

  • 安全审查还没结论,装之前先看仓库改了什么、要什么权限。
  • 没有现成安装命令,要按仓库 README 手动接入。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在模型与账号接入场景里给 DSH 补能力的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-token-gobbler当前 未做沙盒验证 未标注 0 未标注 无
archify L4 · 沙盒安装通过 低风险 8.0 万 未标注 有
DeepSeek-Reasonix L4 · 沙盒安装通过 低风险 3.6 万 未标注 有
nocobase L3 · 安装规范通过 低风险 2.5 万 0.1.1-rc.2 无
learn-harness-engineering L4 · 沙盒安装通过 低风险 2.0 万 未标注 有
dsh-our-free-model 未做沙盒验证 未标注 8,064 未标注 无

仓库档案

模型与账号接入
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方psynosaur仓库 dsh-token-gobbler · 默认分支 main
分类模型与账号接入model
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言JavaScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue0 / 0 / 0收录时的数值,非实时
创建 / 更新2026-09-04 · 2026-09-13最后推送 2026-09-13
本站收录2026-09-17首次进入本站目录的时间

README 全文

15.0 KB
作者原文,中文版优先;只做安全转义,不改内容

🦃 token-gobbler

> same gobbling, different invoices. watch the corp tokens get chomped.
>
> Using DSH is running model evaluations. Every session — every prompt, tool call and turn —
> is a measurement of the model that served it. The token gobbler is the audit of that: which
> model did the work, how it performed, and whether the bill is honest.

A DeepSeek Harness composition plugin that reads your DSH session
data, counts every token you fed the machine (fresh input, output, cache reads, cache writes),
attributes those tokens to the models that actually produced them, and prices the whole gobbling
against the models your corp could've billed you for — Copilot's Claude / Grok — next to the free
local models you're actually running.

It's a little turkey with a spreadsheet. The turkey is you. The spreadsheet is the invoice.

The activity modal, Daily tab — filter by home (all sources / this machine / an imported one),
open a day, open a session: stat cards on top, that session's context & throughput chart underneath
(
Trend mode here — one line per metric, the raw steps faint behind it, the ✂ compaction boundary
marked), and the turn-by-turn outline of every prompt, tool call and compaction at the bottom.


What it does

Reads the trajectory file DSH keeps per session — ~/.dsh/sessions///session.jsonl.zstd, a
multi-frame zstd JSONL event log — and reconstructs, per session:

  • Model attribution — which provider/model served each step, matched against the projection
    store's authoritative totals and split across the models actually used. Best available: exact
    per-turn usage chunks, else estimated by step count, else the profile default model.
  • Token buckets — uncached input, output, cache read, cache write (thinking is a subdivision of
    output, never double-counted).
  • Speed — decode tok/s (streamed output ÷ time from first chunk to the usage chunk) and prefill
    tok/s (new input ÷ TTFT), plus per-step thinking time.
  • Per-tool cost — the actual tool-call argument payload (~chars/4), not the whole step context.
  • Pricing — a rate-card table (corp vs local) with a WFH / corp cost split.

The hard parts (multi-frame zstd decompression, per-step timing from chunk/step timestamps, a two-layer
in-memory + disk parse cache with a ♻ Reprocess reset) live in lib/trajectory.ts and
lib/report.ts.

Every DSH session is a model evaluation

You don't have to set up a benchmark — using DSH is the benchmark. The harness routes each
turn to whichever model the profile picked and records the whole exchange: the prompt, the tools
the agent called, the streamed output, the timings, the retries, the compactions, the outcome.
Every turn is one data point; a day of DSH work is an evaluation suite you already ran.

Token Gobbler is the audit of that suite, and it is deliberately model-agnostic: it reads the
same trajectory whatever produced it, so a local Qwen on llama.cpp, a DeepSeek API model and the
corp's Claude are all measured by the same yardstick.

  • Which model did the work — per-step model attribution, including the step a session switches
    models mid-run (the ⇄ marker on the chart).
  • How it performed — decode and prefill tok/s, TTFT, step wall-time, output per step, and the
    context growth the ✂ compaction boundaries reset.
  • What it cost — tokens by bucket, priced against the corp rate card and the local one.
  • How each turn went — its outcome badge (completed / aborted / error / max tokens / …), plus
    the retries, approvals, tool calls and compactions behind it.

Read it at three levels: the Runs tab compares a model's own runs like-for-like, the
Compare tab puts 2–4 runs of different models on one chart (resampled onto a shared progress
or runtime axis), and the invoice says whether the performance you paid for is the performance you
got. 🔌 Imported sources folds other DSH homes — other boxes, other OSes — into every number,
so the audit covers every model you run through DSH, anywhere. When you compare a local Qwen
against the corp's Claude, you're not just saving money; you're running a live benchmark and
keeping the receipts.

Install

npx @deepseek-ai/dsh plugin --profile web add github:Psynosaur/dsh-token-gobbler

Then restart the harness. Or add "token-gobbler": "link:/path/to/token-gobbler" to the profile's
dependencies and "token-gobbler" to its dsh.profile.bundles, then pnpm install.

Usage

node bin/token-gobbler.js          # pretty report
node bin/token-gobbler.js --json   # machine-readable
node bin/token-gobbler.js --days N # time window

Web dashboard

Adds a Token Gobbler section to the DSH settings modal: a stack of collapsible drawers — 💰
Cost
, 🪙 Tokens, ⚡ Speed, 📊 Activity, 📈 Chart defaults, 🔌 Imported sources —
where each head carries the number that matters while the cards stay folded away. It holds the ↻
Refresh
button plus a ♻ Reprocess button that clears the trajectory parse cache and re-parses
every historic file. The activity modal (the 🦃 button, bottom right) has tabs: Overview,
Cost, Performance, Runs (sessions grouped by the model that served them, one line per
metric over the runs, like-for-like — a model is only ever compared against itself), Compare
(pick 2–4 runs of any models out of a filterable list and read their per-step decode, prefill,
step time and running output on one shared axis — by run progress or by elapsed runtime, so runs of
different lengths line up), Daily (a GitHub-style calendar heatmap of token usage per day —
hover a day for its combined stats, click to filter the per-session table to it), Llama Metrics
(live llama.cpp server polling) and Settings (the rate cards).

Charts

Every chart is drawn by the plugin's own canvas engine (client/graph.ts +
client/graph-canvas.tsx) — no chart library is bundled, and none is injected into the host page.
Each chart opens in one of six plot modes, switched per chart above the plot: Lines, Both
(lines plus a dot per point), Dots (a scatter), Trend (a rolling median/mean/EMA through the
dots, the raw points left faint behind it), Bars (one bar per point, grown from the axis floor —
for discrete values like a day's cost) and Heat (one row per metric, one column per step, shaded
by value). Legend chips hide a whole group (a compaction window, a home), metric chips hide one
metric across every group, and the value axes rescale to whatever is left; hiding a metric is also how
you read two scales that differ by orders of magnitude. Which mode and which chips a chart opens with
are remembered per chart, and what they open with by default — plus how the lines themselves are
drawn
(curved through the points or straight between them, how round the curve is, and whether Trend
mode's own rolling line is curved too) and how Trend and Heat behave — is set once in Settings ›
Token Gobbler › 📈 Chart defaults
. Smoothing is monotone cubic (Fritsch–Carlson): the curve passes
through every step exactly and never overshoots between two of them, so a smoothed chart cannot show a
spike the data does not have.

Imported sources — other machines & other OSes

Your other boxes count too. Settings › Token Gobbler › 🔌 Imported sources registers ANOTHER
machine's DSH home and folds its sessions into every number — the Windows install on a mounted NTFS
volume (/media///Users//.dsh), a macOS home on /Volumes, a nightly rsync of a
laptop's ~/.dsh, or just a copy of its sessions/ folder.

  • Add — type the path (or hit 🔍 Scan for DSH homes, which probes /mnt, /media/,
    /run/media/, /Volumes and your home for the shapes a DSH home takes). The layout is
    detected (a full home, the sessions/ folder, a projection store, or a bare tree of trajectories)
    and the OS is read from the sessions' own cwds — a Windows session says D:\models\… no matter
    where the drive is mounted today.
  • Marked, everywhere — every imported session carries its home's badge (🪟/🍎/🐧 + name) in the
    session tables and drawers, and the activity modal gets a chip row to filter every tab down to one
    home.
  • Manage — ↻ Resync re-reads that home only (its cached parses are dropped; the rest of the
    dashboard keeps its warm cache), ⏸ Pause keeps it registered but out of the totals, ✕ Remove
    forgets the import (the files on that machine are never touched).
  • Read-only and honest — the registry is /token-gobbler/sources.json; nothing is
    ever written into an imported home. A session id that exists in two homes is counted once (this
    machine wins), and a home with trajectories but no projection store still reports: its rows are
    rebuilt from the trajectory.

Turn outline & the event timeline

Every session drawer (Daily, Combined, Performance, Tokens, Sessions, Cost …) opens with a Turn
outline & events
section: one card per turn with its outcome badge (completed / in progress /
aborted / blocked / error / max tokens / interrupted), the prompt, the response (or the tools a
tool-only step called), the wall time and the step count — then that turn's compact event chips.
Events that belong to no turn (the system prompt, the session title) sit on a session-level row.
The per-turn → step table repeats the outcome badge and the first four event icons on each Turn
header row.

Events come from the trajectory records the parser previously only tallied:

chip source record example
⚠ error turn/end with a non-completed reason; failed compaction/end aborted — stopped by user
■ user-stop turn/end aborted by the user Turn stopped by user
↻ retry llm/retry Retry 1/5 · TRANSPORT: terminated (after 504ms)
✋ approval approval/asked + approval/decided Approval asked · bash — escalate sandbox…
✂ compaction / prune compaction/* Compaction summary — 3226 tokens shadowed
☑ todo todo/write Todo list written — 3 items
⌘ command command/done Command success: Compacted 54 history items
🏷 title session/title Session title: … (provider)
⇄ model model/selection Model → deepseek-v4-pro · …
📦 deliverable deliverables/presented Deliverables presented — 6 files
⚙ system system/message (v3) System prompt — 8466 chars

A session whose trajectory has no turn records (older sessions) still shows its turns, derived from
the step tree, without prompts.

Trajectory formats & shape snapshots

Token Gobbler reads DSH session trajectories from ~/.dsh/sessions///. DSH
has shipped two on-disk shapes, parsed by the same pass:

  • v0 — session.jsonl.zstd: one TOP-LEVEL record per streaming chunk (assistant/chunk with
    chunk.type usage/finish/…, plus text-chunks / tool-call-chunks / reasoning-chunks).
    The per-step tokens live in the usage chunk and the serving model in
    chunk.finish.replayState.response.
  • v3 — session.v3.jsonl.zstd (current): the stream is NESTED in
    assistant/message.data.stream and data.usage mirrors its usage chunk; finish no longer
    carries replayState (the model is on message.source), the system prompt moved from
    request/header to a system/message record, and the header gained isSeeded. A directory
    holding both files parses the v3 copy only.

Because a format change used to look identical to "the numbers went to zero", every parse also
records the SHAPE of what it read. Snapshot it and diff an upgrade against it:

npm run report:shape                                       # shape of what is on disk right now
node scripts/trajectory-shape.js --out docs/trajectory-shapes.md
node scripts/trajectory-shape.js --compare docs/trajectory-shapes.md
# exit 0 = the format did not move; exit 1 = a record type / field / value set / stream kind changed

The manifest is Markdown for reading and carries the machine-readable snapshot in a fenced block.
See lib/trajectory.ts (the "FORMAT VERSIONS" header) for the field-level differences.

Pricing

cost = (uncachedInput·input + output·output + cacheRead·cacheRead + cacheWrite·cacheWrite) / 1e6
Model Kind $/M in $/M out $/M cacheR $/M cacheW
Claude Opus 4.6 corp 5.00 25.00 0.50 6.25
Claude Sonnet 4.6 corp 3.00 15.00 0.30 3.75
Claude Sonnet 5 (est.) corp 3.00 15.00 0.30 3.75
Grok 4.6 (est.) corp 3.00 15.00 0.30 3.75
DeepSeek V4 Flash (API) corp 0.44 1.32 0.014 0
DeepSeek V4 Pro (API) corp 1.32 3.96 0.044 0
Qwen 3.8 27B (local) local 0.25 2.50 0.05 0.3125

Pricing is table-driven: a model prices under its own entry, family fallbacks resolve for unseen
self-hosted models, and the first table is seeded from the trajectory (known models prefilled with
their real rates). Every entry carries a kind — corp (billed, in the company bucket) or
local (the home lab, priced at its configured rates). Edit lib/pricing.ts, or the Pricing tab
(saved to ~/.dsh/token-gobbler/pricing.json), where you set each model's kind, its rates, and the
★ WFH reference model without touching code.

Build

npm install     # one-time: esbuild + typescript
npm run build   # build:lib (tsc lib/*.ts -> lib/*.js) + build:client (esbuild -> lib/client.js)
npm run typecheck
npm test        # builds lib/*.js, then runs the node --test suite

Edit the .ts sources, never the generated .js.

Layout

client/*.ts(x)     web dashboard (TypeScript, bundled by esbuild)
client/graph.ts    the canvas chart engine every chart is drawn by (dependency-free)
lib/index.ts       host: /token-gobbler/* routes
lib/trajectory.ts  zstd trajectory reader/parser (v0 + v3) + shape capture
lib/projcache.ts   projection-store reader
lib/sources.ts     imported DSH homes: registry, layout + OS detection, scanning
lib/pricing.ts     rate cards + cost math
lib/report.ts      aggregate + attribution + pricing
lib/client.js      GENERATED (esbuild); do not edit
bin/token-gobbler.js  CLI (pretty/--json/--days/--breakdown)
scripts/trajectory-shape.js  trajectory shape snapshot/diff CLI
docs/trajectory-shapes.md    the pinned shape manifest (`npm run report:shape`)
test/report.test.js   node --test suite (plus sources / trajectory / drawers / graph / settings /
llama-metrics)

MIT. Not affiliated with any turkey, corp, or token ledger. The gobbler does not eat
your tokens — it audits them.

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
dsh-token-gobbler 怎么安装?

本站没有抓到该条目的安装命令,请到仓库主页确认安装方式;这类条目多数是生态应用或尚未发布安装包的项目。

dsh-token-gobbler 的验证等级是什么意思?

未标注验证等级。上游未给出验证结论,安装前请自行确认

dsh-token-gobbler 安全吗?

未标注。

dsh-token-gobbler 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-token-gobbler 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-token-gobbler 有哪些功能?

按模型归因每步 token 用量、统计解码与预填充速度、公司价与本地价成本对比、多会话运行对比图表、导入其他 DSH 数据源。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

模型与账号接入
按星标排序,可作替代方案

archify

archify

从仓库或系统描述生成经过校验的自包含交互式架构图、流程图、时序图、数据流图和生命周期图。

L4 · 沙盒安装通过 8.0 万 星

nocobase

nocobase

L3 · 安装规范通过 2.5 万 星

dsh-our-free-model

dsh-our-free-model

为 DeepSeek Harness 挂载免登录、免 API Key 的免费前沿模型通道,装完即用,并附用量看板与 OpenAI 兼容本地转

未标注验证等级 8,064 星

dsh-purge

dsh-purge

dsh-purge 是一款 DeepSeek Harness 设置插件,可修改默认副本、权限策略和工具限制,并添加规则卡片以分组应用补丁,支

L5 · 运行验证通过 4,573 星

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 —。