@kenz1117/dsh-ui-usage-billing 1.5.1 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/lib/client.js +5 -5
  4. package/lib/index.js +728 -420
  5. package/lib/types/client/TokenPanel.d.ts +1 -1
  6. package/lib/types/client/UsageBilling.d.ts +7 -347
  7. package/lib/types/client/api/balance.d.ts +24 -0
  8. package/lib/types/client/api/pricing.d.ts +26 -0
  9. package/lib/types/client/api/relay.d.ts +13 -0
  10. package/lib/types/client/api/subscriptions.d.ts +13 -0
  11. package/lib/types/client/api/usage-stats.d.ts +11 -0
  12. package/lib/types/client/api/usage-tool.d.ts +16 -0
  13. package/lib/types/client/budget-store.d.ts +6 -0
  14. package/lib/types/client/constants.d.ts +28 -0
  15. package/lib/types/client/domain/forecast.d.ts +24 -0
  16. package/lib/types/client/domain/host-version.d.ts +18 -0
  17. package/lib/types/client/domain/icons.d.ts +9 -0
  18. package/lib/types/client/domain/kpi.d.ts +34 -0
  19. package/lib/types/client/domain/model-budget.d.ts +13 -0
  20. package/lib/types/client/domain/notify.d.ts +14 -0
  21. package/lib/types/client/domain/provider-aliases.d.ts +28 -0
  22. package/lib/types/client/domain/provider-merge.d.ts +26 -0
  23. package/lib/types/client/domain/recharge.d.ts +15 -0
  24. package/lib/types/client/domain/recost.d.ts +10 -0
  25. package/lib/types/client/domain/session-viewer.d.ts +13 -0
  26. package/lib/types/client/domain/streak.d.ts +25 -0
  27. package/lib/types/client/domain/subscription-vendors.d.ts +11 -0
  28. package/lib/types/client/domain/types.d.ts +312 -0
  29. package/lib/types/client/domain/week.d.ts +35 -0
  30. package/lib/types/client/locales.d.ts +1 -1
  31. package/lib/types/client/settings-search.d.ts +12 -0
  32. package/lib/types/config.d.ts +79 -0
  33. package/lib/types/guard.d.ts +49 -0
  34. package/lib/types/index.d.ts +3 -100
  35. package/lib/types/routes/balance.d.ts +37 -0
  36. package/lib/types/routes/notify-claim.d.ts +24 -0
  37. package/lib/types/routes/pricing.d.ts +26 -0
  38. package/lib/types/routes/relay-quotas.d.ts +27 -0
  39. package/lib/types/routes/subscriptions.d.ts +28 -0
  40. package/lib/types/routes/usage-stats.d.ts +44 -0
  41. package/lib/types/routes/usage-tool.d.ts +27 -0
  42. package/lib/types/silent.d.ts +21 -0
  43. package/package.json +14 -7
package/README.en.md CHANGED
@@ -238,7 +238,7 @@ The host discovers the browser side automatically via the `dsh.client` declarati
238
238
 
239
239
  - **Permission level: high**: reads durable session logs (files), calls official multi-vendor / subscription / balance / pricing APIs (network), reads `apiKeyEnv` via the credentials seam (credentials), writes the ledger and stats snapshot under the harness home (`DSH_HOME` / `~/.dsh`) (persistent state); **no** command execution / shell.
240
240
  - **Update channel: `user-reviewed`**: with file / network / credential capabilities, DSH STORE requires local manual confirmation on every install; review the repo, pinned commit, lifecycle scripts, and impact scope before installing.
241
- - **Compatibility**: the preview line (npm `latest`/`alpha`, 1.4.x — kept above the stable line to kill the version inversion) targets DSH `0.1.2` ~ `0.2.0` (host `latest` currently at 0.2.0-rc.2; per-version compatibility declarations grow as real-hardware verification lands); the stable line (npm `stable`, 1.1.x, **frozen**, final v1.1.17) targets legacy hosts `0.1.0-rc.8` ~ `0.1.1-rc.2`. Per-version declarations live in `package.json` under `dsh.compatibility`; the two-line mapping and monitoring mechanism are documented in [COMPATIBILITY.md](COMPATIBILITY.md). Node.js `^22.19.0 || >=24.0.0`.
241
+ - **Compatibility**: the preview line (npm `latest`/`alpha`, 1.6.x — kept above the stable line to kill the version inversion) targets DSH `0.1.2-alpha.1` ~ `0.2.1-rc.2` (host `latest` currently at 0.2.0-rc.2, preview at 0.2.1-rc.2; the full 0.2.1 series is declared per version); the stable line (npm `stable`, 1.1.x, **frozen**, final v1.1.17) targets legacy hosts `0.1.0-rc.8` ~ `0.1.1-rc.2`. Per-version declarations live in `package.json` under `dsh.compatibility`; the two-line mapping and monitoring mechanism are documented in [COMPATIBILITY.md](COMPATIBILITY.md). Node.js `^22.19.0 || >=24.0.0`.
242
242
  - **Lifecycle**: no `preinstall` / `install` / `postinstall` / `prepare` (ready on install).
243
243
  - **No impersonation**: adds only its own entry id `ui-usage-billing`; `@deepseek-ai/dsh-*` packages are `peerDependencies` only (no reinstall / replace / shadowing of official components); the package uses the third-party namespace `@kenz1117/*`.
244
244
  - **Build artifacts**: runtime files `lib/*` and `cordis.patch.yml` are committed at the pinned commit and declared in `files`.
package/README.md CHANGED
@@ -252,7 +252,7 @@ npm publish --access public
252
252
 
253
253
  - **权限等级:high**:读取持久会话日志(文件)、访问多厂商官方 / 订阅 / 余额 / 定价 API(网络)、经凭据 seam 读取 `apiKeyEnv`(凭据)、写入 harness home(`DSH_HOME` / `~/.dsh`)下的账本与快照(持久状态);**不含**命令执行 / Shell。
254
254
  - **更新通道:`user-reviewed`**:本插件具备文件 / 网络 / 凭据能力,DSH STORE 采用每次安装需本机人工确认的通道;安装前请复核仓库、固定 Commit、生命周期脚本与影响范围。
255
- - **兼容范围**:预览线(npm `latest`/`alpha`,1.5.x,自 v1.2.0 起恒高于稳定线以消除版本号倒挂)适配 DSH `0.1.2-alpha.1` ~ `0.2.1-rc.2`(宿主 `latest` 现指向 0.2.0-rc.2、预览线最新为 0.2.1-rc.2;0.2.1-alpha.4/5 与 rc.1 未真机验证不声明,rc.2 起恢复逐版本扩展);稳定线(npm `stable`,1.1.x,**已冻结**,终版 v1.1.17)适配旧宿主 `0.1.0-rc.8` ~ `0.1.1-rc.2`。逐版本声明见 `package.json` 的 `dsh.compatibility`,双线对照与监控机制见 [COMPATIBILITY.md](COMPATIBILITY.md)。Node.js `^22.19.0 || >=24.0.0`。
255
+ - **兼容范围**:预览线(npm `latest`/`alpha`,1.6.x,自 v1.2.0 起恒高于稳定线以消除版本号倒挂)适配 DSH `0.1.2-alpha.1` ~ `0.2.1-rc.2`(宿主 `latest` 现指向 0.2.0-rc.2、预览线最新为 0.2.1-rc.2;0.2.1 全系列逐版本声明);稳定线(npm `stable`,1.1.x,**已冻结**,终版 v1.1.17)适配旧宿主 `0.1.0-rc.8` ~ `0.1.1-rc.2`。逐版本声明见 `package.json` 的 `dsh.compatibility`,双线对照与监控机制见 [COMPATIBILITY.md](COMPATIBILITY.md)。Node.js `^22.19.0 || >=24.0.0`。
256
256
  - **生命周期**:无 `preinstall` / `install` / `postinstall` / `prepare`(安装即用)。
257
257
  - **不冒用官方**:仅新增自有 entry id `ui-usage-billing`;对 `@deepseek-ai/dsh-*` 仅为 `peerDependencies` 依赖(不重复安装 / 不替换 / 不遮蔽官方组件),包名使用第三方命名空间 `@kenz1117/*`。
258
258
  - **打包产物**:运行文件 `lib/*` 与 `cordis.patch.yml` 已随固定 Commit 提交并声明在 `files`。