dsh-ds-balance 2.3.0 → 2.3.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.
package/README.md CHANGED
@@ -101,7 +101,7 @@
101
101
 
102
102
  ### 前置
103
103
 
104
- - **DSH**:版本范围以 [package.json](package.json) 的声明为准,本插件跟的是宿主当前那条 **RC 线**(dist-tag 是 `next`)。
104
+ - **DSH**:版本范围以 [package.json](package.json) 的 `engines.dsh` 为唯一真源(与全部 `@deepseek-ai/dsh-*` 声明逐字相同),本插件跟的是宿主当前那条 **RC 线**(dist-tag 是 `next`)。声明面同时承诺**两族**(RC 族与仍可用的旧 RC 族,用 `||` 显式枚举 —— npm 只在同一 `major.minor.patch` 的预发布之间匹配,单区间罩不住两族),具体值一律现查,本文件不抄那个会漂的值。
105
105
  - **Node**:`>= 20`(同一处声明)。
106
106
 
107
107
  装宿主时**要显式点名版本线**:`@deepseek-ai/dsh` 的 `alpha` 与 `latest` 都**不是**我们声明的那条线 —— 按默认方式装会落在声明范围之外。
@@ -153,8 +153,9 @@ dsh plugin --profile web add "$PWD"
153
153
  浏览器半边会整个不渲染 —— 圆环与浮层也一起消失)。插件不查宿主版本号,而是**当场探测那个能力**;
154
154
  拿不到时浮层里会多一行英文提示,说明配置界面为什么不可用、该往哪儿升级。
155
155
  技术细节见 [配置表单的能力探测](docs/ARCHITECTURE.md)。
156
- - **兼容性不是推断出来的**:每周由 [compat.yml](.github/workflows/compat.yml) 在 `next`(RC 线)上
157
- 换包实跑一遍现有测试,另有一步单独判声明面罩不罩得住;红了会开或更新一条固定标题的跟踪 issue。
156
+ - **兼容性不是推断出来的**:每周由 [compat.yml](.github/workflows/compat.yml) 在 `next`(RC 线,承诺线)与
157
+ 声明面里的**第二族**(旧 RC 族,记录线)上换包实跑一遍现有测试,另有一步单独判声明面罩不罩得住;
158
+ 承诺线红了会开或更新一条固定标题的跟踪 issue。
158
159
  当前结论与红了怎么办见 [兼容性](docs/PUBLISHING.md#兼容性)。
159
160
 
160
161
  ## 配置
package/README_en.md CHANGED
@@ -103,7 +103,7 @@ The division of labour is fixed: **the ring answers "roughly how much is left",
103
103
 
104
104
  ### Requirements
105
105
 
106
- - **DSH**: the range is whatever [package.json](package.json) declares; this plugin follows the host's current **RC line** (the dist-tag is `next`).
106
+ - **DSH**: the range lives in `engines.dsh` in [package.json](package.json) — the single source of truth, character-for-character identical to every `@deepseek-ai/dsh-*` entry. This plugin follows the host's current **RC line** (the dist-tag is `next`). The declared surface commits to **two** prerelease families (the RC family and the still-usable older one, enumerated with `||` — npm only matches prereleases within the same `major.minor.patch`, so a single range cannot cover two families); the exact value drifts, so look it up rather than trusting this file.
107
107
  - **Node**: `>= 20` (declared in the same place).
108
108
 
109
109
  Install the host by **naming the version line explicitly**: neither `alpha` nor `latest` of `@deepseek-ai/dsh` is the line we declare — a default install lands outside the declared range.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 用 dsh 官方存储接缝实现 {@link CoreStore}。
3
3
  *
4
- * 关键约束(见 docs/backend-architecture.md §10):
4
+ * 关键约束(见 docs/BACKEND-CONTRACTS.md §10):
5
5
  * - `open` 每进程只能一次,重名抛 `already-open`;
6
6
  * - **`close()` 必须由调用方在 `ctx.effect` 的 disposer 里调用**,否则热重挂会锁死;
7
7
  * - 打开失败要**降级**而不是抛出去 —— 未观察的 rejection 曾把宿主整个拖下水。
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 用 dsh 官方存储接缝实现 {@link CoreStore}。
3
3
  *
4
- * 关键约束(见 docs/backend-architecture.md §10):
4
+ * 关键约束(见 docs/BACKEND-CONTRACTS.md §10):
5
5
  * - `open` 每进程只能一次,重名抛 `already-open`;
6
6
  * - **`close()` 必须由调用方在 `ctx.effect` 的 disposer 里调用**,否则热重挂会锁死;
7
7
  * - 打开失败要**降级**而不是抛出去 —— 未观察的 rejection 曾把宿主整个拖下水。
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 服务端盐的读写。
3
3
  *
4
- * `accountTag` 由它派生,所以**它丢了账本就会孤立**:见 docs/backend-architecture.md §19 第 5 条。
4
+ * `accountTag` 由它派生,所以**它丢了账本就会孤立**:见 docs/BACKEND-CONTRACTS.md §19 第 5 条。
5
5
  * 文件权限 0600;路径由组装点用 `@deepseek-ai/dsh-home-paths` 的 `dshHomePath()` 拼出来。
6
6
  * @module dsh-ds-balance/adapters/salt-file
7
7
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 服务端盐的读写。
3
3
  *
4
- * `accountTag` 由它派生,所以**它丢了账本就会孤立**:见 docs/backend-architecture.md §19 第 5 条。
4
+ * `accountTag` 由它派生,所以**它丢了账本就会孤立**:见 docs/BACKEND-CONTRACTS.md §19 第 5 条。
5
5
  * 文件权限 0600;路径由组装点用 `@deepseek-ai/dsh-home-paths` 的 `dshHomePath()` 拼出来。
6
6
  * @module dsh-ds-balance/adapters/salt-file
7
7
  */
package/lib/config.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 插件配置:schemastery schema、常量与派生值。
3
3
  *
4
- * 字段名与 [UI 侧契约与移交](../docs/ui-handoff.md) 第六节逐字一致,共 **11** 个。
4
+ * 字段名与 [UI 侧契约与移交](../docs/UI-HANDOFF.md) 第六节逐字一致,共 **11** 个。
5
5
  * `timeoutMs` **不在 schema 里**:它是常量加环境变量覆盖,UI 不暴露。
6
6
  * @module dsh-ds-balance/config
7
7
  */
package/lib/config.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 插件配置:schemastery schema、常量与派生值。
3
3
  *
4
- * 字段名与 [UI 侧契约与移交](../docs/ui-handoff.md) 第六节逐字一致,共 **11** 个。
4
+ * 字段名与 [UI 侧契约与移交](../docs/UI-HANDOFF.md) 第六节逐字一致,共 **11** 个。
5
5
  * `timeoutMs` **不在 schema 里**:它是常量加环境变量覆盖,UI 不暴露。
6
6
  * @module dsh-ds-balance/config
7
7
  */
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * 依赖全部构造注入、**不碰 `ctx`** —— 因此它能脱离宿主直接测。
5
5
  *
6
- * 铁律(见 docs/backend-architecture.md §19 第 3、4 条):
6
+ * 铁律(见 docs/BACKEND-CONTRACTS.md §19 第 3、4 条):
7
7
  * - **任何 handler 都不许把异常抛出去**。抛出去会被宿主包成 500,前端就拿不到
8
8
  * `error` 结构了。余额端点的业务错误一律走 `200 + state: error`。
9
9
  * - **每次请求现读配置**,不许在闭包里捕获旧值。
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * 依赖全部构造注入、**不碰 `ctx`** —— 因此它能脱离宿主直接测。
5
5
  *
6
- * 铁律(见 docs/backend-architecture.md §19 第 3、4 条):
6
+ * 铁律(见 docs/BACKEND-CONTRACTS.md §19 第 3、4 条):
7
7
  * - **任何 handler 都不许把异常抛出去**。抛出去会被宿主包成 500,前端就拿不到
8
8
  * `error` 结构了。余额端点的业务错误一律走 `200 + state: error`。
9
9
  * - **每次请求现读配置**,不许在闭包里捕获旧值。
@@ -4,7 +4,7 @@
4
4
  * 三层职责分得很开:本文件只管**注册**,`handlers.ts` 管**怎么做**,
5
5
  * `wire.ts` 管**长什么样**。注册需要 `ctx`,所以只有本文件碰宿主。
6
6
  *
7
- * 契约要点(docs/backend-architecture.md §3.3 / §8.2):
7
+ * 契约要点(docs/BACKEND-CONTRACTS.md §3.3 / §8.2):
8
8
  * - `path` 写死精确值、不带尾随斜杠(实现是 Map 精确键匹配);
9
9
  * - `requestBody` 必填;
10
10
  * - 物理载体**已先做完信任与浏览器鉴权**,handler 不必再判一次。
@@ -4,7 +4,7 @@
4
4
  * 三层职责分得很开:本文件只管**注册**,`handlers.ts` 管**怎么做**,
5
5
  * `wire.ts` 管**长什么样**。注册需要 `ctx`,所以只有本文件碰宿主。
6
6
  *
7
- * 契约要点(docs/backend-architecture.md §3.3 / §8.2):
7
+ * 契约要点(docs/BACKEND-CONTRACTS.md §3.3 / §8.2):
8
8
  * - `path` 写死精确值、不带尾随斜杠(实现是 Map 精确键匹配);
9
9
  * - `requestBody` 必填;
10
10
  * - 物理载体**已先做完信任与浏览器鉴权**,handler 不必再判一次。
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 线上形状与序列化。
3
3
  *
4
- * 契约见 docs/backend-architecture.md §8:**金额一律八位小数字符串**,
4
+ * 契约见 docs/BACKEND-CONTRACTS.md §8:**金额一律八位小数字符串**,
5
5
  * `bigint` 最小单位只活在进程内。本模块是纯函数,不碰 `ctx`、不发请求。
6
6
  * @module dsh-ds-balance/http/wire
7
7
  */
package/lib/http/wire.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * 线上形状与序列化。
3
3
  *
4
- * 契约见 docs/backend-architecture.md §8:**金额一律八位小数字符串**,
4
+ * 契约见 docs/BACKEND-CONTRACTS.md §8:**金额一律八位小数字符串**,
5
5
  * `bigint` 最小单位只活在进程内。本模块是纯函数,不碰 `ctx`、不发请求。
6
6
  * @module dsh-ds-balance/http/wire
7
7
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 快照存储端口。实现走 dsh 官方存储接缝,见 docs/backend-architecture.md §10。
2
+ * 快照存储端口。实现走 dsh 官方存储接缝,见 docs/BACKEND-CONTRACTS.md §10。
3
3
  * @module dsh-ds-balance/ports/core-store
4
4
  */
5
5
  import type { BalanceSnapshot } from '../domain/balance.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 快照存储端口。实现走 dsh 官方存储接缝,见 docs/backend-architecture.md §10。
2
+ * 快照存储端口。实现走 dsh 官方存储接缝,见 docs/BACKEND-CONTRACTS.md §10。
3
3
  * @module dsh-ds-balance/ports/core-store
4
4
  */
5
5
  export {};
package/lib/version.d.ts CHANGED
@@ -8,5 +8,5 @@
8
8
  /** 线上 schema 版本。响应里逐条回传,消费方据此判断兼容性。 */
9
9
  export declare const SCHEMA_VERSION = 1;
10
10
  /** 插件版本。与 `package.json` 的 `version` 一致(有测试兜底)。 */
11
- export declare const PLUGIN_VERSION = "2.3.0";
11
+ export declare const PLUGIN_VERSION = "2.3.1";
12
12
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -8,5 +8,5 @@
8
8
  /** 线上 schema 版本。响应里逐条回传,消费方据此判断兼容性。 */
9
9
  export const SCHEMA_VERSION = 1;
10
10
  /** 插件版本。与 `package.json` 的 `version` 一致(有测试兜底)。 */
11
- export const PLUGIN_VERSION = '2.3.0';
11
+ export const PLUGIN_VERSION = '2.3.1';
12
12
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ds-balance",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "icon": "./icon.svg",
5
5
  "description": "DSH plugin: shows the DeepSeek account balance at the bottom of the sidebar, with a configuration card on the Plugins page.",
6
6
  "keywords": [
@@ -47,7 +47,7 @@
47
47
  "LICENSE"
48
48
  ],
49
49
  "engines": {
50
- "dsh": ">=0.2.0-rc.1",
50
+ "dsh": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
51
51
  "node": ">=20"
52
52
  },
53
53
  "dsh": {
@@ -75,16 +75,16 @@
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@deepseek-ai/cordis": "^4.0.3",
78
- "@deepseek-ai/dsh-client-connection": ">=0.2.0-rc.1",
79
- "@deepseek-ai/dsh-client-locale": ">=0.2.0-rc.1",
80
- "@deepseek-ai/dsh-client-ui-primitives": ">=0.2.0-rc.1",
81
- "@deepseek-ai/dsh-client-ui-settings": ">=0.2.0-rc.1",
82
- "@deepseek-ai/dsh-client-ui-slots": ">=0.2.0-rc.1",
83
- "@deepseek-ai/dsh-credentials": ">=0.2.0-rc.1",
84
- "@deepseek-ai/dsh-deepseek-account-platform": ">=0.2.0-rc.1",
85
- "@deepseek-ai/dsh-home-paths": ">=0.2.0-rc.1",
86
- "@deepseek-ai/dsh-settings": ">=0.2.0-rc.1",
87
- "@deepseek-ai/dsh-storage-domain": ">=0.2.0-rc.1",
78
+ "@deepseek-ai/dsh-client-connection": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
79
+ "@deepseek-ai/dsh-client-locale": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
80
+ "@deepseek-ai/dsh-client-ui-primitives": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
81
+ "@deepseek-ai/dsh-client-ui-settings": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
82
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
83
+ "@deepseek-ai/dsh-credentials": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
84
+ "@deepseek-ai/dsh-deepseek-account-platform": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
85
+ "@deepseek-ai/dsh-home-paths": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
86
+ "@deepseek-ai/dsh-settings": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
87
+ "@deepseek-ai/dsh-storage-domain": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
88
88
  "@deepseek-ai/schemastery": "^3.18.3",
89
89
  "react": "^18.3.1",
90
90
  "react-dom": "^18.3.1"
@@ -92,19 +92,19 @@
92
92
  "devDependencies": {
93
93
  "@deepseek-ai/cordis": "^4.0.3",
94
94
  "@deepseek-ai/cordis-plugin-loader": "^1.0.4",
95
- "@deepseek-ai/dsh-client-connection": ">=0.2.0-rc.1",
96
- "@deepseek-ai/dsh-client-locale": ">=0.2.0-rc.1",
97
- "@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.2.0-rc.1",
98
- "@deepseek-ai/dsh-client-ui-primitives": ">=0.2.0-rc.1",
99
- "@deepseek-ai/dsh-client-ui-renderer": ">=0.2.0-rc.1",
100
- "@deepseek-ai/dsh-client-ui-settings": ">=0.2.0-rc.1",
101
- "@deepseek-ai/dsh-client-ui-sidebar": ">=0.2.0-rc.1",
102
- "@deepseek-ai/dsh-client-ui-slots": ">=0.2.0-rc.1",
103
- "@deepseek-ai/dsh-credentials": ">=0.2.0-rc.1",
104
- "@deepseek-ai/dsh-deepseek-account-platform": ">=0.2.0-rc.1",
105
- "@deepseek-ai/dsh-home-paths": ">=0.2.0-rc.1",
106
- "@deepseek-ai/dsh-settings": ">=0.2.0-rc.1",
107
- "@deepseek-ai/dsh-storage-domain": ">=0.2.0-rc.1",
95
+ "@deepseek-ai/dsh-client-connection": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
96
+ "@deepseek-ai/dsh-client-locale": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
97
+ "@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
98
+ "@deepseek-ai/dsh-client-ui-primitives": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
99
+ "@deepseek-ai/dsh-client-ui-renderer": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
100
+ "@deepseek-ai/dsh-client-ui-settings": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
101
+ "@deepseek-ai/dsh-client-ui-sidebar": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
102
+ "@deepseek-ai/dsh-client-ui-slots": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
103
+ "@deepseek-ai/dsh-credentials": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
104
+ "@deepseek-ai/dsh-deepseek-account-platform": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
105
+ "@deepseek-ai/dsh-home-paths": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
106
+ "@deepseek-ai/dsh-settings": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
107
+ "@deepseek-ai/dsh-storage-domain": ">=0.1.7-rc.1 <0.1.8-0 || >=0.2.0-rc.1 <0.2.1-0",
108
108
  "@deepseek-ai/schemastery": "^3.18.3",
109
109
  "@eslint/js": "^10.0.1",
110
110
  "@types/node": "^20.0.0",