@jxgame2020/dsh-token-quota 0.1.19 → 0.1.20
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 +11 -3
- package/package.json +16 -1
package/README.md
CHANGED
|
@@ -28,6 +28,10 @@ Zero changes to the DSH core repo: no core file is modified, no official bundle
|
|
|
28
28
|
|
|
29
29
|
## 安装 / Installation
|
|
30
30
|
|
|
31
|
+
> **版本要求 / Version requirement**:`0.1.19+` 需要 DSH **≥ 0.1.5**(新 API:`SettingsProvider.installSection`、`ctx.remote.session`)。DSH 0.1.0-rc.7 及更早版本请使用 `@jxgame2020/dsh-token-quota@0.1.18`。
|
|
32
|
+
>
|
|
33
|
+
> **Version requirement**: `0.1.19+` requires DSH **≥ 0.1.5** (new APIs: `SettingsProvider.installSection`, `ctx.remote.session`). For DSH 0.1.0-rc.7 and earlier, install `@jxgame2020/dsh-token-quota@0.1.18`.
|
|
34
|
+
|
|
31
35
|
### 方式一:npm 安装(推荐)/ Option A: npm install (recommended)
|
|
32
36
|
|
|
33
37
|
在你的 web profile(`~/.dsh/profiles/web`)下安装依赖:
|
|
@@ -36,11 +40,15 @@ Install the dependency in your web profile (`~/.dsh/profiles/web`):
|
|
|
36
40
|
|
|
37
41
|
```bash
|
|
38
42
|
cd ~/.dsh/profiles/web
|
|
39
|
-
npm install @jxgame2020/dsh-token-quota
|
|
43
|
+
npm install @jxgame2020/dsh-token-quota --omit=peer
|
|
40
44
|
```
|
|
41
45
|
|
|
42
|
-
>
|
|
43
|
-
>
|
|
46
|
+
> **为什么 `--omit=peer` / Why `--omit=peer`**:插件运行时所需的 `@deepseek-ai/*` 由 DSH 宿主提供,不需要安装在 profile 里;npm 上这些包的最新 tag 是互不兼容的旧 rc 版本,自动安装 peer 会触发 ERESOLVE 冲突。0.1.20+ 已将这些 peer 全部标记为 optional,直接 `npm install @jxgame2020/dsh-token-quota` 通常也能成功;若仍报 `ERESOLVE`,加上 `--omit=peer` 即可。
|
|
47
|
+
>
|
|
48
|
+
> The plugin's `@deepseek-ai/*` dependencies are provided by the DSH host at runtime — they must NOT be installed into the profile (npm's latest tags for them are mutually-incompatible old rc versions, so auto-installing peers raises ERESOLVE). Since 0.1.20 all those peers are marked optional, so plain `npm install` usually works; if you still hit `ERESOLVE`, append `--omit=peer`.
|
|
49
|
+
|
|
50
|
+
> 用 pnpm 管理 profile 的话:`pnpm add @jxgame2020/dsh-token-quota`(pnpm 默认不装 peer,无需额外参数)。
|
|
51
|
+
> With pnpm: `pnpm add @jxgame2020/dsh-token-quota` (pnpm does not auto-install peers — no extra flag needed).
|
|
44
52
|
|
|
45
53
|
在 `cordis.patch.yml` 中挂载插件:
|
|
46
54
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jxgame2020/dsh-token-quota",
|
|
3
3
|
"description": "Daily per-model token quota accounting, enforcement, and a floating quota panel for the DeepSeek Harness — a fully self-contained plugin (no core-Harness wiring, no generated RPC contract)",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.20",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -152,6 +152,21 @@
|
|
|
152
152
|
},
|
|
153
153
|
"@deepseek-ai/schemastery": {
|
|
154
154
|
"optional": true
|
|
155
|
+
},
|
|
156
|
+
"@deepseek-ai/dsh-api-gateway": {
|
|
157
|
+
"optional": true
|
|
158
|
+
},
|
|
159
|
+
"@deepseek-ai/dsh-api-session-controller": {
|
|
160
|
+
"optional": true
|
|
161
|
+
},
|
|
162
|
+
"@deepseek-ai/dsh-client-store": {
|
|
163
|
+
"optional": true
|
|
164
|
+
},
|
|
165
|
+
"@deepseek-ai/dsh-client-ui-renderer": {
|
|
166
|
+
"optional": true
|
|
167
|
+
},
|
|
168
|
+
"@deepseek-ai/dsh-client-ui-session": {
|
|
169
|
+
"optional": true
|
|
155
170
|
}
|
|
156
171
|
}
|
|
157
172
|
}
|