rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:webmanufaktur/dsh-opencode-usage-plugin
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A DeepSeek Harness plugin bundle that shows
live opencode usage in the Harness Web UI: sessions, prompts, tokens,
estimated cost, and per-tool reliability, read on demand from the local opencode CLI.


opencode stats --json --models: sessions, tokens, cost, and usage per
provider/model. Each range is cached for 30 seconds, and the Refresh button forces a fresh
read.This page reports opencode's own usage only. Command Code billing or quota data is deliberately out of scope.
dsh web).opencode on the Host, with the local state that opencode stats reads. The Host resolves
the binary at $OPENCODE_BIN, /opt/homebrew/bin/opencode, /usr/local/bin/opencode,
~/.local/bin/opencode, /usr/bin/opencode, then PATH.The package is a local bundle (@local/opencode-usage), not a registry package.
git clone https://github.com/webmanufaktur/dsh-opencode-usage-plugin.git
Install the checkout as a profile bundle: in the Harness, ask the agent to install the bundle
at /absolute/path/dsh-opencode-usage-plugin — plugin_manager install_bundle links the
directory and enables it. The row id is opencode-usage.
Then open Settings → OpenCode usage. Because the package is link-installed, edits in the checkout apply without reinstalling; restart the Harness to reload the Host half.
index.jsRegisters one authenticated exact-Fetch route through ctx.connection.fetch:
GET /api/opencode.usage?range=7|30|90|all[&fresh=1]
opencode stats --json --models (--days <n> or --all) and projects the payload into
small display values: sessions, subagents, prompts, steps, token totals, cost, per-model rows
(provider, model, variant, steps, tokens, cost), tool calls and the top 8 tools by call count.modelCount carries the full count.fresh=1 bypasses the cache (used by Refresh).{ ok: false, error } with status 400 for an unknown range and 502 when the CLI
fails or is missing.The route lives inside the browser-authentication fence, so only the owner's page can read it.
client.jsRegisters a settings.section entry ("OpenCode usage") and renders the page with host theme
tokens. It fetches the route document-relative (api/opencode.usage), so the existing browser
cookie authenticates the request. Copy comes from locale dictionaries in English and German.
| Path | Purpose |
|---|---|
index.js |
Host half: the route, CLI invocation, cache, projection |
client.js |
Client half: Settings page, dictionaries, styles |
cordis.patch.yml |
Bundle patch inserting the opencode-usage row |
locale/en.json, locale/de.json |
Plugin Manager title and description |
icon.svg |
Plugin icon |
docs/preview.png |
Screenshot of the rendered page |
No build step and no dependencies. Check syntax with node --check index.js client.js. The
running Harness picks up client changes through HMR; restart it after changing index.js.
dsh.client web module)node:child_process--dsw-alias-* theme tokensopencode CLI (opencode stats --json)| Env | URL |
|---|---|
| prod | — (local Harness plugin; no hosted endpoint) |
| dev | — (same checkout, link-installed in the desktop profile) |
Internal developer tooling by Alexander Abelt (webmanufaktur). It runs inside the local DeepSeek Harness and has no external client.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。