reactive-resume
reactive-resume
A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:zhirai-tech/dsh-token-manager
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
AI Resource Optimization Engine
Make AI Work Smarter, Not Harder.
An intelligent optimization engine for AI Agents, improving task efficiency through adaptive reasoning, context optimization, caching, and resource orchestration.
Adaptive Reasoning:Pick the reasoning depth a task actually needs instead of always paying for the deepest mode. Context Optimization:Pass only the information a task needs, cutting repeated history, repeated files and dead context. Intelligent Orchestration:Coordinate main agents, subagents, models and resources so work finishes with less churn. Cache Optimization:Reuse results and cache instead of recomputing or re-requesting them. Quality & Efficiency:Optimise total resource use without trading away task quality.
Repository: https://github.com/zhirai-tech/dsh-token-manager · Author: ZHIRAI
English | 简体中文
Token cost monitoring, model-call efficiency analysis, AUTO reasoning-effort scheduling and reversible context optimization for DeepSeek Harness.
ZHIRAI · 智睿科技 · independent developer

| Dashboard | Live top strip | Compression records |
|---|---|---|
![]() |
![]() |
![]() |

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.
A Cordis plugin for DeepSeek Harness that answers five questions without touching Harness core, the model adapters, the compression/statistics pipeline, or dsh-mnemon:
token_manager_read; byte-identical repeated results are reused as tiny references.OFF / LOW / HIGH / MAX per task, escalates one level at a time on genuine reasoning failures, keeps manual levels untouched.| Area | Capability |
|---|---|
| Accounting | Per-call four buckets (uncached input / cache read / cache write / output) + reasoning-token provenance; deduplicated by (session, turn, step, attempt); totals cross-checked field-by-field against DSH's own tokenUsage projection. |
| Efficiency analysis | 15 finding types with per-type switches and thresholds; 5 task types with same-type historical baselines (median / p80). |
| AUTO reasoning | Per-task classification (intent, files, modules, multi-cause, subagent), first step already at the selected level, agent/pre-step escalation on evidence, environment failures never escalate, new task re-judges from scratch, manual selection exits AUTO. |
| Context optimization | Byte-identical tool-result reuse (reference + blob recovery), token_manager_context layered context pack, subagent spawn/fork audit (who inherits full history, how big the delegation prompt is). |
| Compression 2.0 | Shell-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. |
| Recovery | Content-addressed blobs; token_manager_read paginates the original by blob id or reads a file inside the session workspace. |
| Tasks & projects | Merge tasks, 9-field task summaries, versioned 8-section project summaries, JSON/Markdown/CSV export. |
| Interface | Chinese-first dark dashboard, composer AUTO control, AUTO vs manual cost comparison, 1600 / 897 / 390 responsive, help text collapsed into ? icons. |
| Scenario | Result |
|---|---|
| A/B, same command, compression off → on | 44,067 → 30,068 tokens (−31.8%), both answers identical |
| AUTO vs manual HIGH (same A–D task set, real calls) | 1,063,769 → 620,623 tokens (−41.7%), cost −44.7%, latency −54.4%, same 4/4 success |
| Env-failure task (should not escalate): manual HIGH misuse → AUTO | 617,106 → 147,417 tokens (−76.1%), cost −77.7%; AUTO stays LOW with holds |
| Task switch: after a complex task reached MAX, a new simple task | re-classified as OFF, no inheritance |
| Accuracy check, 1500-line output, ask line count + exact error line | Both 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% |
A/B and AUTO rows are real model calls (DeepSeek
deepseek-account/deepseek-flash); costs use the built-in reference prices, not a live bill. AUTO spends ~12% more than always-LOW — the price of genuinely escalating on complex tasks — while saving 41.7% versus always-HIGH.
A compact AUTO control sits beside the composer model selector. Manual levels keep working exactly as before — picking one simply leaves AUTO.
| AUTO vs manual (same A–D task set, real calls) | Manual HIGH | AUTO | Change |
|---|---|---|---|
| Total tokens | 1,063,769 | 620,623 | −41.7% |
| Cost (reference-price estimate) | ¥0.8347 | ¥0.4612 | −44.7% |
| Latency | 271.0s | 123.5s | −54.4% |
| Success | 4/4 | 4/4 | same |
| Overview · AUTO panel | Cost analysis · AUTO vs manual |
|---|---|
![]() |
![]() |
| Composer · AUTO menu | Settings · AUTO |
|---|---|
![]() |
![]() |
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;| Path | Content |
|---|---|
lib/ |
index.js (host, ~522 KB) and client.js (browser, ~361 KB), minified |
src/ |
README only — source not published |
tests/ |
README only — test-suite summary (350 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 |
From npm:
dsh plugin --profile <profile> add dsh-token-manager@1.4.0
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.4.0) 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.4.0.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 智控引擎 ControlX (ControlX) and /token-manager/api/health returns ok: true.
Full steps, upgrade and uninstall: docs/INSTALL.md.
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.
Everything lives in ControlX → 设置: 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.
agent.model.select() API, and only while the user has AUTO enabled.source.kind = "dsh-mnemon") are classified as protected and never compressed, deduplicated or removed (verified with real conversations; message hashes unchanged).%DSH_HOME%\dsh-token-manager\ (SQLite + content-addressed blobs); no telemetry, no network calls.token_manager_read validates session ownership and confines path reads to the session workspace.See docs/, .github/ and the table above. Sources are not published; issues about behaviour, compatibility and security are welcome.
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.
The test suite (350 unit tests + real-run acceptance logs) is maintained privately and run before every release. The public repository intentionally contains no source or test files.
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.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: monitoring、observability。