DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-token-manager

z

dsh-token-manager

Manifest valid

Token cost monitoring, call-efficiency analysis and reversible tool-output caching for DeepSeek Harness.

UI (client)hasBundlePatch

DSH Token Manager

English | 简体中文

DSH Tests Dependencies License

Token cost monitoring, model-call efficiency analysis and reversible tool-output caching for DeepSeek Harness.

ZHIRAI · 智睿科技 · independent developer


Plugin disabled vs enabled

DashboardLive top stripCompression records
DashboardLive stripCache

A/B measurement

Real screenshots from a running DSH desktop app: left = plugin disabled, right = plugin enabled (same machine, only the plugin toggled). The A/B chart comes from a real model-call comparison: 44,067 → 30,068 tokens (−31.8%) with identical answers.


What it is

A Cordis plugin for DeepSeek Harness that answers four questions without touching the model, the reasoning level, the harness core or dsh-mnemon:

  1. Where did my tokens go? Per-call four-bucket ledger, per task, session, project, today and all-time.
  2. Which calls are wasteful? 11 finding types: repeated file reads, repeated tools, repeated build/test/deploy commands, redundant confirmations, repeated plans/summaries, simple-task step inflation, cache-hit drops, task-cost anomalies and more.
  3. What can be compressed safely? Large shell/build/test/log outputs are replaced by structured summaries; the original is always recoverable via token_manager_read.
  4. What did it cost and save? Cost per task with your price table, plus estimated tokens and money saved by compression.
AreaCapability
AccountingPer-call four buckets (uncached input / cache read / cache write / output), deduplicated by (session, turn, step, attempt); totals cross-checked field-by-field against DSH's own tokenUsage projection.
Efficiency analysis11 finding types with per-type switches and thresholds; 5 task types with same-type historical baselines (median / p80).
Compression 2.0Shell-output aware (file lists, JSON/JSONL, Markdown, git diff/log, build, test, logs); every error/warning line preserved with its original line number; read results and error results are never compressed; history/prefix is never rewritten.
RecoveryContent-addressed blobs; token_manager_read paginates the original by blob id or reads a file inside the session workspace.
Tasks & projectsMerge tasks, 9-field task summaries, versioned 8-section project summaries, JSON/Markdown/CSV export.
InterfaceChinese-first dark dashboard, live top strip, 1600 / 897 / 390 responsive, help text collapsed into ? icons.

Measured (not marketing numbers)

ScenarioResult
A/B, same command, compression off → on44,067 → 30,068 tokens (−31.8%), both answers identical
Accuracy check, 1500-line output, ask line count + exact error lineBoth modes answered identically and correctly (1500 lines, exact L777 text, 1 ERROR / 1 WARNING)
Real 493k-token session (offline audit of 12 shell outputs)521,347 B → 169,738 B (−67.4%), error/warning lines preserved 20/20
Historical projects, cumulative tokens avoidable (estimate)large/long sessions 30%–50%, small projects 5%–15%

Percentages for historical projects are an offline estimate (compressed tokens × how many later calls would carry them). The A/B row is a real model call. Costs depend on your plan; the built-in reference prices are public list prices, not a live bill.

Distribution build

This repository is a distribution build, not an open-source repository:

  • lib/ contains the compiled, minified host and client bundles that DSH loads;
  • src/ and tests/ contain README notes only — sources and tests are not published;
  • scripts/ contains two real, usable helpers;
  • the plugin is proprietary (UNLICENSED, all rights reserved).
PathContent
lib/index.js (host, 197 KB) and client.js (browser, 188 KB), minified
src/README only — source not published
tests/README only — test-suite summary (231 tests), no test sources
scripts/token-report.mjs (per-call token report), install-sandbox.ps1 (isolated profile install)
locale/Chinese and English dictionaries
docs/install, config, troubleshooting, compression 2.0 report, market guide, video script, screenshots
.github/issue templates

Install

From npm:

dsh plugin --profile <profile> add dsh-token-manager@1.3.3

From GitHub (no market or npm needed):

dsh plugin --profile <profile> add github:zhirai-tech/dsh-token-manager

Then restart the profile. This installs the compiled release (v1.3.3) from this repository.

From this repository (local clone):

# from this repository (linked dev install)
dsh plugin --profile <profile> add "file:<absolute-path-to-this-repo>"

# or from the release zip
#   download dsh-token-manager-1.3.1.zip, unzip, then install the unzipped folder
dsh <profile> --no-open      # restart the GUI

Or in the DSH desktop app: Settings → Plugins → install from local directory.

Verify: the sidebar shows Token 监控 and /token-manager/api/health returns ok: true.

Full steps, upgrade and uninstall: docs/INSTALL.md.

Requirements

DeepSeek Harness 0.2.x (verified on 0.2.1-rc.5), Node.js 24.x bundled with DSH, no network access, no API keys.

Configuration

Everything lives in Token 监控 → 设置: collection switches, 11 analysis toggles and thresholds, price table (4 buckets, currency, unit), compression mode (off / observe / on) and thresholds, cache limits, context analysis (dry-run only).

Defaults are safe: monitoring on, compression in observe mode (records but never replaces), context analysis dry-run only. Auto-compression must be enabled explicitly.

Full reference: docs/CONFIG.md.

Compatibility and safety

  • No core changes: no edits to DeepSeek Harness, dsh-mnemon, the model configuration or the reasoning level.
  • dsh-mnemon coexistence: messages injected by mnemon (source.kind = "dsh-mnemon") are classified as protected and never compressed, deduplicated or removed (verified with real conversations; message hashes unchanged).
  • Local-only data: %DSH_HOME%\dsh-token-manager\ (SQLite + content-addressed blobs); no telemetry, no network calls.
  • HTTP boundary: every request goes through DSH's connection fence; token_manager_read validates session ownership and confines path reads to the session workspace.
  • Reversible: uninstall removes listeners, routes, tool and UI; data remains until you delete it.

Repository layout

See docs/, .github/ and the table above. Sources are not published; issues about behaviour, compatibility and security are welcome.

Market

DSH's plugin market is a JSON index any static host can serve. This repository ships a ready index:

https://raw.githubusercontent.com/zhirai-tech/dsh-token-manager/main/docs/market/index.json

Add it under Plugins → Discover → Add index source. See docs/MARKET.md for the format and how to get listed in community catalogs.

Development

The test suite (231 unit tests + real-history cross-check) is maintained privately and run before every release. The public repository intentionally contains no source or test files.

License

Proprietary / All rights reserved — UNLICENSED. See LICENSE. No permission is granted to copy, modify or redistribute without written permission.


ZHIRAI · 智睿科技
Build Ideas Into Reality · 把想法变成现实
zhirai.cloud · xtang3125@gmail.com
© 2026 ZHIRAI. All Rights Reserved.

Comments

Loading…

From the same category

reactive-resume

DeepSeek Harness plugin for Reactive Resume: bridges your resumes and job applications into a Harness session over MCP.

Tools & CapabilitiesManifest valid

★ 41.7k

↓ 146/wk

MIT

Aug 24, 2026

dsh plugin --profile web add dsh-plugin-reactive-resume

by dsh-market

The plugin market inside DeepSeek Harness — browse, search, one-click install · DSH 可视化插件市场

Tools & CapabilitiesManifest valid

★ 10.3k

↓ 136.6k/wk

MIT

TypeScript

Nov 2, 2026

dsh plugin --profile web add dshmarket

by Tencent

Let AI agents use your real, logged-in browser without interrupting your work. CLI + extension for browser automation across any shell-capable AI agent.

Tools & CapabilitiesManifest valid

★ 9.9k

↓ 7.4k/wk

MIT

TypeScript

Nov 2, 2026

dsh plugin --profile terminal add @wxg-prc-cpg/browser-skill-dsh-plugin

by superdesigndev

OpenRouter for agent tools. Join community here: https://discord.gg/6mQYYfFMAn

Tools & CapabilitiesManifest valid

★ 7.1k

NOASSERTION

Python

Nov 3, 2026

dsh plugin --profile web add treg-dsh

by yjh051108

dsh-routing-suite — injector + router-standard kit: install the runtime injector first, then the task-aware reasoning-mode router preset (measured P1-P23).

Tools & CapabilitiesManifest valid

★ 7k

MIT

JavaScript

Sep 18, 2026

dsh plugin --profile web add @dsh-external/dsh-super-injector

by Q00

Agent OS: the agent gets smarter on its own. We just hold the line: Interview-gated, staged evaluation, budgeted evolution loop. MCP server, 14 runtimes: Claude Code, Codex CLI, Gemini CLI, OpenCode,

Tools & CapabilitiesManifest valid

★ 6.3k

MIT

Python

Nov 1, 2026

Index only — not installable