{"_id":"@az7627/dsh-token-usage","_rev":"2-c3168571f0c2758a8cea47afa06fa5f7","name":"@az7627/dsh-token-usage","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@az7627/dsh-token-usage","version":"0.1.0","license":"MIT","_id":"@az7627/dsh-token-usage@0.1.0","maintainers":[{"name":"az7627","email":"a233d@outlook.com"}],"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}},"dist":{"shasum":"a07d26f90792ce4302b318d5dd926a7637bb990d","tarball":"https://registry.npmjs.org/@az7627/dsh-token-usage/-/dsh-token-usage-0.1.0.tgz","fileCount":51,"integrity":"sha512-e4DkSlNwEbIKbj0yWl25lRGZEx567Y+xZO9FJv9KaGS38wUxv51g+dXxYrrcFC3Uw+KXbuPy2rjDVUCGDj93Tg==","signatures":[{"sig":"MEQCIErrQG4y78qxvyQ1rBVJfxnbO7QJLMsDto528wGswLnQAiBL8JWknNDfInzeBr2AFfawQsKK9/X+FiJLIfu85q229w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4776785},"main":"lib/index.js","pnpm":{"autoInstallPeers":false},"type":"module","types":"lib/types/index.d.ts","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./package.json":"./package.json"},"gitHead":"b6aaa1c7b334b33700152a4ba8d134db9272c4b6","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json && tsdown","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"az7627","email":"a233d@outlook.com"},"_npmVersion":"11.13.0","description":"Per-conversation token usage timeline plugin for the dsh Web conversation view","directories":{},"_nodeVersion":"24.16.0","dependencies":{"zod":"^4.4.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^29.0.0","react":"^18.2.0","tsdown":"^0.22.2","vitest":"^4.1.0","echarts":"^5.6.0","react-dom":"^18.2.0","typescript":"^6.0.0","@types/node":"^24.0.0","@types/react":"~18.3.1","lightningcss":"^1.30.0","@types/react-dom":"~18.3.0","vite-tsconfig-paths":"^6.0.0","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2"},"peerDependencies":{"react":"^18.2.0","react-dom":"^18.2.0","@deepseek-ai/cordis":"*","@deepseek-ai/dsh-session":"*","@deepseek-ai/dsh-client-locale":"*","@deepseek-ai/dsh-host-apiproxy":"*","@deepseek-ai/dsh-session-query":"*","@deepseek-ai/dsh-client-runtime":"*","@deepseek-ai/dsh-client-ui-slots":"*","@deepseek-ai/dsh-client-connection":"*","@deepseek-ai/dsh-client-ui-primitives":"*","@deepseek-ai/dsh-client-ui-conversation":"*"},"_npmOperationalInternal":{"tmp":"tmp/dsh-token-usage_0.1.0_1786896648432_0.11016456369255057","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@az7627/dsh-token-usage","version":"0.1.1","description":"Per-conversation token usage timeline plugin for the dsh Web conversation view","type":"module","main":"lib/index.js","types":"lib/types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/az7627/dsh-token-usage.git"},"publishConfig":{"access":"public"},"exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./package.json":"./package.json"},"scripts":{"build":"tsc -p tsconfig.json && tsdown","typecheck":"tsc -p tsconfig.json --noEmit","test":"vitest run"},"license":"MIT","dependencies":{"zod":"^4.4.3"},"pnpm":{"autoInstallPeers":false},"peerDependencies":{"@deepseek-ai/cordis":"*","@deepseek-ai/dsh-client-connection":"*","@deepseek-ai/dsh-client-locale":"*","@deepseek-ai/dsh-client-runtime":"*","@deepseek-ai/dsh-client-ui-conversation":"*","@deepseek-ai/dsh-client-ui-primitives":"*","@deepseek-ai/dsh-client-ui-slots":"*","@deepseek-ai/dsh-host-apiproxy":"*","@deepseek-ai/dsh-session":"*","@deepseek-ai/dsh-session-query":"*","react":"^18.2.0","react-dom":"^18.2.0"},"devDependencies":{"@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/node":"^24.0.0","@types/react":"~18.3.1","@types/react-dom":"~18.3.0","echarts":"^5.6.0","jsdom":"^29.0.0","lightningcss":"^1.30.0","react":"^18.2.0","react-dom":"^18.2.0","tsdown":"^0.22.2","typescript":"^6.0.0","vite-tsconfig-paths":"^6.0.0","vitest":"^4.1.0"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-conversation"],"platform":"web"}},"gitHead":"ff697113812957453ef3b41cf06e68ab31ad1e4b","_id":"@az7627/dsh-token-usage@0.1.1","bugs":{"url":"https://github.com/az7627/dsh-token-usage/issues"},"homepage":"https://github.com/az7627/dsh-token-usage#readme","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-+ZTBPqHKQCVofdCkorqv3PheZF7UwqeR9fpEQEd8rkh5lzb/E54G0JJV3ZJfQI00XhSpP8j89NkXuCmhG/2oKw==","shasum":"14ae9df05fb0f4a311d31104525b09537435432a","tarball":"https://registry.npmjs.org/@az7627/dsh-token-usage/-/dsh-token-usage-0.1.1.tgz","fileCount":51,"unpackedSize":4776796,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBX/ySp5i/PnOq5+55rG9SHs6BGZx95BYJ6baZyazZGSAiAoU8vmGnNqEoMKtEtqkxz7VnrQwj9ixDIbHw5Dzr2WEg=="}]},"_npmUser":{"name":"az7627","email":"a233d@outlook.com"},"directories":{},"maintainers":[{"name":"az7627","email":"a233d@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-token-usage_0.1.1_1786967105382_0.45928558722247503"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-16T16:10:48.227Z","modified":"2026-08-17T11:45:05.785Z","0.1.0":"2026-08-16T16:10:48.624Z","0.1.1":"2026-08-17T11:45:05.603Z"},"license":"MIT","description":"Per-conversation token usage timeline plugin for the dsh Web conversation view","maintainers":[{"name":"az7627","email":"a233d@outlook.com"}],"readme":"# @az7627/dsh-token-usage\r\n\r\nDeepSeek Harness 插件：在 Web 对话视图统计 token 用量（分时段堆叠柱状图 + 精确到个位的总计）。npm 包名带作用域（无作用域的 `dsh-token-usage` 已被他人占用）。\r\n\r\n- 会话头右缘「用量统计」按钮 → 右侧抽屉\r\n- 对话多选（默认当前对话 / 全选 / 仅当前）\r\n- 分度：15 分钟 / 1 小时 / 1 天；范围：近 7 天 / 近 30 天 / 全部\r\n- 三桶：缓存输入（`cacheReadTokens`）、输入（`inputTokens + cacheWriteTokens`）、输出（`outputTokens`）\r\n- ECharts 堆叠柱状图（本地时区日历对齐）、精确到个位的 tooltip、总计与每对话明细\r\n- 数据来自会话日志重放（`/usage` RPC 通道），历史对话装上即有数据\r\n\r\n## 安装到你的 dsh\r\n\r\n### 从 npm 安装（推荐）\r\n\r\n```sh\r\n# 首次安装（会把它挂进 ~/.dsh/profiles/web 的 bundle 列表）\r\nnpx @deepseek-ai/dsh plugin --profile web add @az7627/dsh-token-usage\r\n\r\n# 重启你的 dsh web 后生效\r\nnpx @deepseek-ai/dsh web\r\n```\r\n\r\n- 更新：重新执行上面的 add（pnpm 会装最新版）\r\n- 卸载：`npx @deepseek-ai/dsh plugin --profile web remove @az7627/dsh-token-usage`\r\n\r\n### 本地开发（link 安装）\r\n\r\n```sh\r\nnpx @deepseek-ai/dsh plugin --profile web add <本目录的绝对路径>\r\n```\r\n\r\n改完源码 `pnpm run build` 后重启 `npx @deepseek-ai/dsh web` 即生效，无需重新 add。\r\n\r\n## 开发\r\n\r\n```sh\r\npnpm install     # 依赖（zod 运行期；echarts 打进浏览器 bundle）\r\npnpm run build   # tsc + tsdown → lib/index.js（宿主半）+ lib/client.js（浏览器半）\r\npnpm test        # vitest（组件测试 mock 了 echarts）\r\n```\r\n\r\n类型检查依赖同目录下 `deepseek-harness` 源码树里已构建的 `lib/types`（仅编译期引用，运行期全部由 dsh 安装提供）。\r\n","readmeFilename":"README.md","homepage":"https://github.com/az7627/dsh-token-usage#readme","repository":{"type":"git","url":"git+https://github.com/az7627/dsh-token-usage.git"},"bugs":{"url":"https://github.com/az7627/dsh-token-usage/issues"}}