@kidli1412/dsh-token-heatmap 0.1.2 → 0.1.3

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.
package/README.md CHANGED
@@ -21,7 +21,7 @@ A DeepSeek Harness web plugin: a GitHub-style daily token-usage heatmap of the *
21
21
 
22
22
  ## 安装 / Install
23
23
 
24
- 需要 `web` profile(`@deepseek-ai/dsh >= 0.1.0-rc.6`)与 `pnpm`。
24
+ 需要 `web` profile 与 `pnpm`。DSH 兼容版本见下方「兼容性 / Compatibility」;运行于 `@deepseek-ai/dsh >= 0.1.2-alpha.4`(0.1.2 版本线)。
25
25
 
26
26
  从 npm 安装:
27
27
 
@@ -59,6 +59,12 @@ dsh plugin --profile web remove @kidli1412/dsh-token-heatmap
59
59
  - 无会话/无工作区时(`input.dock` 需要会话上下文)统计卡不渲染。
60
60
  - 服务端与客户端都随 `dsh web` 启动加载,因此新增/更新插件后需要重启。
61
61
 
62
+ ## 兼容性 / Compatibility
63
+
64
+ - **DSH**:manifest 通过 `dsh.compatibility.dshReleases` 将官方最新三个版本 `0.1.2-alpha.4`、`0.1.2-alpha.5`、`0.1.2-rc.1` 逐项声明为 `compatible`(DSH STORE 的精确逐版本兼容证据;仅范围声明不会恢复上架)。插件使用的客户端注入(locale / runtime / ui-slots)与 Host 服务(`settings` namespace、`webServer` 精确路由)在这条版本线上保持稳定。
65
+ - **Node**:`^22.19.0 || >=24.0.0`(与 DSH 一致)。
66
+ - **依赖**:`@deepseek-ai/dsh-settings` 自 0.1.3 起提升为 `^0.1.2-rc.1`、`@deepseek-ai/schemastery` 提升为 `^3.18.2`,与 DSH 0.1.2 版本线对齐。npm 的 prerelease 解析规则下 `^0.1.0-rc.7` 不会解析到 `0.1.2-rc.1`(只会装 `0.1.0-rc.8`),因此较低的范围会拉到与新版 DSH 不同 train 的 settings 副本。
67
+
62
68
  ## License
63
69
 
64
70
  MIT。聚合与回环端点实现参考了 [dsh-usage-stats](https://github.com/Ychris12138/dsh-usage-stats)(MIT © Ychris12138)。
package/lib/index.js CHANGED
@@ -37,7 +37,6 @@ import { join, dirname } from "node:path";
37
37
  import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
38
38
  import { applyUsageDelta, createUsageState, mergeInto, renderUsage, zeroBuckets } from "./usage.js";
39
39
  import { DEFAULT_CONFIG, parseConfig } from "./config.js";
40
- import { settingsNamespace } from "@deepseek-ai/dsh-settings";
41
40
  import z from "@deepseek-ai/schemastery";
42
41
 
43
42
  /** Stable Cordis plugin name. */
@@ -56,8 +55,11 @@ const inject = ["webServer", "sessions", "sessionPersistence", "settings"];
56
55
  * namespace. The card edits `enabled` + `colorScheme` through the settings
57
56
  * scope; the legacy `<DSH_HOME>/storages/token-heatmap-config.json` document
58
57
  * is migrated once at startup (see migrateLegacyConfig).
58
+ * DSH 0.1.2 起 `@deepseek-ai/dsh-settings` 不再导出 settingsNamespace 帮助函数:
59
+ * namespace 直接以字面量传入(register/get/update 内部仍按
60
+ * /^[a-z][a-z0-9-]*$/ 校验)。
59
61
  */
60
- const SETTINGS_NAMESPACE = settingsNamespace("token-heatmap");
62
+ const SETTINGS_NAMESPACE = "token-heatmap";
61
63
 
62
64
  /**
63
65
  * Durable display preferences; also the wire envelope the browser scope
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kidli1412/dsh-token-heatmap",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "DSH web plugin: GitHub-style daily token-usage heatmap on the new-session screen with a selectable calendar-year view, green/blue color schemes and a display switch (设置 → 插件 → 插件配置), plus today / this-month / all-time totals.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -17,8 +17,8 @@
17
17
  "LICENSE"
18
18
  ],
19
19
  "dependencies": {
20
- "@deepseek-ai/dsh-settings": "^0.1.0-rc.7",
21
- "@deepseek-ai/schemastery": "^3.18.1"
20
+ "@deepseek-ai/dsh-settings": "^0.1.2-rc.1",
21
+ "@deepseek-ai/schemastery": "^3.18.2"
22
22
  },
23
23
  "dsh": {
24
24
  "bundle": {
@@ -31,6 +31,13 @@
31
31
  "@deepseek-ai/dsh-client-runtime",
32
32
  "@deepseek-ai/dsh-client-ui-slots"
33
33
  ]
34
+ },
35
+ "compatibility": {
36
+ "dshReleases": {
37
+ "0.1.2-alpha.4": "compatible",
38
+ "0.1.2-alpha.5": "compatible",
39
+ "0.1.2-rc.1": "compatible"
40
+ }
34
41
  }
35
42
  },
36
43
  "scripts": {