@goodandready/dsh-usage-guard 0.1.18 → 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 CHANGED
@@ -214,7 +214,7 @@ Logs informative diagnostic warnings naming the exact session, turn, step, raw p
214
214
  - Complete trilingual localization for English, Russian, and Chinese (`en`, `ru`, `zh`).
215
215
  - Graceful fallback slot `settings.section` for legacy core versions without the plugin settings tab.
216
216
  * **Design Contract**:
217
- - Added official UI design contract in `docs/design/DESIGN.md` complying with `project-design-contract` and `dsh-ui-design`.
217
+ - Complies with official DSH UI design guidelines (`project-design-contract` and `dsh-ui-design`).
218
218
 
219
219
  ---
220
220
 
package/README.ru.md CHANGED
@@ -205,7 +205,7 @@ graph LR
205
205
  - Полноценная локализация интерфейса карточки на русский, английский и китайский языки (`en`, `ru`, `zh`).
206
206
  - Запасной fallback-слот `settings.section` на случай запуска в сборках DSH без вкладки настроек плагинов.
207
207
  * **Дизайн-контракт**:
208
- - Создан обязательный документ `docs/design/DESIGN.md` в соответствии со стандартами `project-design-contract` и `dsh-ui-design`.
208
+ - Соответствует официальным стандартам оформления интерфейсов DSH (`project-design-contract` и `dsh-ui-design`).
209
209
 
210
210
  ---
211
211
 
package/README.zh.md CHANGED
@@ -140,8 +140,8 @@ graph LR
140
140
  - 严格遵循 DSH 原生设计规范(CSS 变量、12px 圆角、核心折叠图标 `IconChevronDownOutline14`、无障碍 `aria-expanded`)。
141
141
  - 提供中、英、俄完整三语本地化支持(`zh` / `en` / `ru`)。
142
142
  - 内置 `settings.section` 降级容错机制。
143
- * **设计契约**:
144
- - 补充 `docs/design/DESIGN.md`,符合 `project-design-contract` 和 `dsh-ui-design` 标准。
143
+ * **设计规范**:
144
+ - 符合 DSH UI 官方设计标准(`project-design-contract` 与 `dsh-ui-design`)。
145
145
 
146
146
  ---
147
147
 
package/lib/updater.js CHANGED
@@ -174,14 +174,23 @@ export async function getUpdateStatus(options, target = runtime()) {
174
174
  };
175
175
  }
176
176
 
177
+ export function buildInstallArgs(cliEntry, profileName, packageSpec, options = {}) {
178
+ return [
179
+ cliEntry, 'plugin', '--profile', profileName, 'add',
180
+ packageSpec,
181
+ `--registry=${options.registry ?? 'https://registry.npmjs.org/'}`,
182
+ ];
183
+ }
184
+
177
185
  async function installExact(target, packageSpec, options) {
178
186
  if (target.cliEntry === undefined) throw new Error('Automatic update is unavailable in this runtime.');
179
187
  await new Promise((resolvePromise, reject) => {
180
- const child = spawn(process.execPath, [
181
- target.cliEntry, 'plugin', '--profile', target.profileName, 'add',
182
- '--config.minimumReleaseAge=0', packageSpec,
183
- `--registry=${options.registry ?? 'https://registry.npmjs.org/'}`,
184
- ], {
188
+ const child = spawn(process.execPath, buildInstallArgs(
189
+ target.cliEntry,
190
+ target.profileName,
191
+ packageSpec,
192
+ options,
193
+ ), {
185
194
  cwd: target.profileDir,
186
195
  windowsHide: true,
187
196
  stdio: ['ignore', 'pipe', 'pipe'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-usage-guard",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "description": "Keeps a malformed token-usage sample from taking a whole session history down with it: a missing or non-numeric counter becomes zero before the harness adds it up, so the fold never yields NaN and already-broken sessions open again.",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -57,5 +57,6 @@
57
57
  },
58
58
  "scripts": {
59
59
  "test": "node --test test/*.test.mjs"
60
- }
60
+ },
61
+ "packageManager": "npm@12.0.1"
61
62
  }