@jxgame2020/dsh-token-quota 0.1.20 → 0.1.21
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/lib/client.js +78 -76
- package/lib/index.js +1 -1
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/index.js +2 -2
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -79,7 +79,7 @@ window.__ModuleLoader__.load({
|
|
|
79
79
|
d.dimWhenIdle = dimWhenIdle;
|
|
80
80
|
},
|
|
81
81
|
setUpgrade: (d, upgrade) => {
|
|
82
|
-
const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.
|
|
82
|
+
const normalized = upgrade !== null && upgrade.latestVersion !== "" && upgrade.latestVersion !== "0.1.21" ? upgrade : null;
|
|
83
83
|
if (d.upgrade === null || d.upgrade.latestVersion !== normalized?.latestVersion) d.upgradeDismissed = false;
|
|
84
84
|
d.upgrade = normalized;
|
|
85
85
|
},
|
|
@@ -185,91 +185,91 @@ window.__ModuleLoader__.load({
|
|
|
185
185
|
document.head.appendChild(tag);
|
|
186
186
|
}
|
|
187
187
|
var TokenQuotaPanel_module_css_default = {
|
|
188
|
-
"
|
|
189
|
-
"rowHeader": "NPLLIq_rowHeader",
|
|
190
|
-
"upgradeCommandRow": "NPLLIq_upgradeCommandRow",
|
|
191
|
-
"logToolbar": "NPLLIq_logToolbar",
|
|
192
|
-
"gearBtn": "NPLLIq_gearBtn",
|
|
193
|
-
"logPagerInfo": "NPLLIq_logPagerInfo",
|
|
188
|
+
"upgradeClose": "NPLLIq_upgradeClose",
|
|
194
189
|
"fillWarn": "NPLLIq_fillWarn",
|
|
195
|
-
"
|
|
196
|
-
"
|
|
197
|
-
"dialogBtn": "NPLLIq_dialogBtn",
|
|
198
|
-
"monitorHint": "NPLLIq_monitorHint",
|
|
199
|
-
"logPagerPages": "NPLLIq_logPagerPages",
|
|
190
|
+
"tab": "NPLLIq_tab",
|
|
191
|
+
"logClearDate": "NPLLIq_logClearDate",
|
|
200
192
|
"subtitle": "NPLLIq_subtitle",
|
|
201
|
-
"
|
|
202
|
-
"
|
|
203
|
-
"
|
|
204
|
-
"
|
|
193
|
+
"upgradeBannerText": "NPLLIq_upgradeBannerText",
|
|
194
|
+
"fillIdle": "NPLLIq_fillIdle",
|
|
195
|
+
"dialogTitle": "NPLLIq_dialogTitle",
|
|
196
|
+
"logPagerPages": "NPLLIq_logPagerPages",
|
|
197
|
+
"logPageSizeSelect": "NPLLIq_logPageSizeSelect",
|
|
198
|
+
"logUsedCol": "NPLLIq_logUsedCol",
|
|
199
|
+
"controls": "NPLLIq_controls",
|
|
200
|
+
"monitorHint": "NPLLIq_monitorHint",
|
|
201
|
+
"dialogOverlay": "NPLLIq_dialogOverlay",
|
|
202
|
+
"resetRow": "NPLLIq_resetRow",
|
|
203
|
+
"logClearDialog": "NPLLIq_logClearDialog",
|
|
204
|
+
"resetSelect": "NPLLIq_resetSelect",
|
|
205
|
+
"logModelCol": "NPLLIq_logModelCol",
|
|
206
|
+
"dialogBody": "NPLLIq_dialogBody",
|
|
207
|
+
"radioRow": "NPLLIq_radioRow",
|
|
208
|
+
"logHeader": "NPLLIq_logHeader",
|
|
209
|
+
"logClearBtn": "NPLLIq_logClearBtn",
|
|
210
|
+
"switch": "NPLLIq_switch",
|
|
211
|
+
"checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
|
|
212
|
+
"checkBtn": "NPLLIq_checkBtn",
|
|
205
213
|
"monitorRow": "NPLLIq_monitorRow",
|
|
206
|
-
"
|
|
207
|
-
"
|
|
208
|
-
"
|
|
214
|
+
"logSearch": "NPLLIq_logSearch",
|
|
215
|
+
"logPagerBtn": "NPLLIq_logPagerBtn",
|
|
216
|
+
"selectBtn": "NPLLIq_selectBtn",
|
|
217
|
+
"gearBtn": "NPLLIq_gearBtn",
|
|
218
|
+
"body": "NPLLIq_body",
|
|
219
|
+
"tabIcon": "NPLLIq_tabIcon",
|
|
220
|
+
"copyBtnDone": "NPLLIq_copyBtnDone",
|
|
221
|
+
"rowHeader": "NPLLIq_rowHeader",
|
|
222
|
+
"dialogLabel": "NPLLIq_dialogLabel",
|
|
223
|
+
"upgradeCommand": "NPLLIq_upgradeCommand",
|
|
224
|
+
"dialogHint": "NPLLIq_dialogHint",
|
|
225
|
+
"tabLabel": "NPLLIq_tabLabel",
|
|
226
|
+
"upgradeCommands": "NPLLIq_upgradeCommands",
|
|
227
|
+
"dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
|
|
209
228
|
"input": "NPLLIq_input",
|
|
229
|
+
"upgradeHint": "NPLLIq_upgradeHint",
|
|
230
|
+
"logTable": "NPLLIq_logTable",
|
|
231
|
+
"title": "NPLLIq_title",
|
|
232
|
+
"headerActions": "NPLLIq_headerActions",
|
|
233
|
+
"bar": "NPLLIq_bar",
|
|
234
|
+
"logDialog": "NPLLIq_logDialog",
|
|
235
|
+
"logPagerControls": "NPLLIq_logPagerControls",
|
|
210
236
|
"checkErrorHint": "NPLLIq_checkErrorHint",
|
|
211
|
-
"
|
|
212
|
-
"tabLabel": "NPLLIq_tabLabel",
|
|
213
|
-
"upgradeClose": "NPLLIq_upgradeClose",
|
|
214
|
-
"dialogClose": "NPLLIq_dialogClose",
|
|
237
|
+
"fillOver": "NPLLIq_fillOver",
|
|
215
238
|
"logScroll": "NPLLIq_logScroll",
|
|
216
|
-
"
|
|
217
|
-
"
|
|
239
|
+
"panelDim": "NPLLIq_panelDim",
|
|
240
|
+
"logDayCol": "NPLLIq_logDayCol",
|
|
218
241
|
"upgradeBanner": "NPLLIq_upgradeBanner",
|
|
219
|
-
"upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
|
|
220
|
-
"logPager": "NPLLIq_logPager",
|
|
221
|
-
"logPageSizeSelect": "NPLLIq_logPageSizeSelect",
|
|
222
|
-
"rowName": "NPLLIq_rowName",
|
|
223
|
-
"logClearDate": "NPLLIq_logClearDate",
|
|
224
242
|
"collapse": "NPLLIq_collapse",
|
|
225
|
-
"
|
|
226
|
-
"
|
|
227
|
-
"
|
|
228
|
-
"
|
|
229
|
-
"
|
|
230
|
-
"
|
|
231
|
-
"monitorName": "NPLLIq_monitorName",
|
|
232
|
-
"logClearBtn": "NPLLIq_logClearBtn",
|
|
233
|
-
"dialogBody": "NPLLIq_dialogBody",
|
|
234
|
-
"resetRow": "NPLLIq_resetRow",
|
|
235
|
-
"dialogHint": "NPLLIq_dialogHint",
|
|
236
|
-
"panelDim": "NPLLIq_panelDim",
|
|
237
|
-
"logDialog": "NPLLIq_logDialog",
|
|
238
|
-
"tab": "NPLLIq_tab",
|
|
239
|
-
"upgradeHint": "NPLLIq_upgradeHint",
|
|
243
|
+
"version": "NPLLIq_version",
|
|
244
|
+
"copyBtn": "NPLLIq_copyBtn",
|
|
245
|
+
"panel": "NPLLIq_panel",
|
|
246
|
+
"upgradeBannerFlash": "NPLLIq_upgradeBannerFlash",
|
|
247
|
+
"dialogClose": "NPLLIq_dialogClose",
|
|
248
|
+
"monitorList": "NPLLIq_monitorList",
|
|
240
249
|
"header": "NPLLIq_header",
|
|
241
|
-
"
|
|
250
|
+
"monitorName": "NPLLIq_monitorName",
|
|
251
|
+
"checkUpdatesRow": "NPLLIq_checkUpdatesRow",
|
|
252
|
+
"notice": "NPLLIq_notice",
|
|
253
|
+
"rowName": "NPLLIq_rowName",
|
|
254
|
+
"settingsBtn": "NPLLIq_settingsBtn",
|
|
255
|
+
"dialogActions": "NPLLIq_dialogActions",
|
|
256
|
+
"upgradeCommandRow": "NPLLIq_upgradeCommandRow",
|
|
242
257
|
"noticeError": "NPLLIq_noticeError",
|
|
243
|
-
"
|
|
258
|
+
"dialogSection": "NPLLIq_dialogSection",
|
|
259
|
+
"dialogHeader": "NPLLIq_dialogHeader",
|
|
244
260
|
"row": "NPLLIq_row",
|
|
245
|
-
"
|
|
246
|
-
"checkUpdatesLabel": "NPLLIq_checkUpdatesLabel",
|
|
261
|
+
"logPager": "NPLLIq_logPager",
|
|
247
262
|
"dialog": "NPLLIq_dialog",
|
|
248
|
-
"dialogHeader": "NPLLIq_dialogHeader",
|
|
249
|
-
"logModelCol": "NPLLIq_logModelCol",
|
|
250
|
-
"logUsedCol": "NPLLIq_logUsedCol",
|
|
251
|
-
"logSearch": "NPLLIq_logSearch",
|
|
252
|
-
"logPagerControls": "NPLLIq_logPagerControls",
|
|
253
|
-
"fillIdle": "NPLLIq_fillIdle",
|
|
254
|
-
"monitorList": "NPLLIq_monitorList",
|
|
255
|
-
"upgradeBannerText": "NPLLIq_upgradeBannerText",
|
|
256
|
-
"dialogBtnPrimary": "NPLLIq_dialogBtnPrimary",
|
|
257
|
-
"version": "NPLLIq_version",
|
|
258
|
-
"dialogTitle": "NPLLIq_dialogTitle",
|
|
259
|
-
"dialogSection": "NPLLIq_dialogSection",
|
|
260
|
-
"checkBtn": "NPLLIq_checkBtn",
|
|
261
263
|
"save": "NPLLIq_save",
|
|
262
|
-
"
|
|
263
|
-
"
|
|
264
|
-
"
|
|
265
|
-
"
|
|
266
|
-
"
|
|
267
|
-
"
|
|
264
|
+
"logPagerInfo": "NPLLIq_logPagerInfo",
|
|
265
|
+
"logToolbar": "NPLLIq_logToolbar",
|
|
266
|
+
"currentBadge": "NPLLIq_currentBadge",
|
|
267
|
+
"dialogBtn": "NPLLIq_dialogBtn",
|
|
268
|
+
"fullNotice": "NPLLIq_fullNotice",
|
|
269
|
+
"rowMeta": "NPLLIq_rowMeta",
|
|
270
|
+
"panelDimStrong": "NPLLIq_panelDimStrong",
|
|
268
271
|
"versionNew": "NPLLIq_versionNew",
|
|
269
|
-
"
|
|
270
|
-
"logTable": "NPLLIq_logTable",
|
|
271
|
-
"logHeader": "NPLLIq_logHeader",
|
|
272
|
-
"headerActions": "NPLLIq_headerActions"
|
|
272
|
+
"headerText": "NPLLIq_headerText"
|
|
273
273
|
};
|
|
274
274
|
//#endregion
|
|
275
275
|
//#region lib/types/client/TokenQuotaPanel.js
|
|
@@ -571,13 +571,13 @@ window.__ModuleLoader__.load({
|
|
|
571
571
|
title: t("upgradeAvailableHint"),
|
|
572
572
|
children: [
|
|
573
573
|
"v",
|
|
574
|
-
"0.1.
|
|
574
|
+
"0.1.21",
|
|
575
575
|
" → v",
|
|
576
576
|
upgrade.latestVersion
|
|
577
577
|
]
|
|
578
578
|
}) : (0, react_jsx_runtime.jsxs)("span", {
|
|
579
579
|
className: TokenQuotaPanel_module_css_default.version,
|
|
580
|
-
children: ["v", "0.1.
|
|
580
|
+
children: ["v", "0.1.21"]
|
|
581
581
|
})]
|
|
582
582
|
}), (0, react_jsx_runtime.jsx)("div", {
|
|
583
583
|
className: TokenQuotaPanel_module_css_default.subtitle,
|
|
@@ -1278,12 +1278,14 @@ window.__ModuleLoader__.load({
|
|
|
1278
1278
|
const TOKEN_QUOTA_NAMESPACE = "token-quota";
|
|
1279
1279
|
/** Snapshot pull cadence in milliseconds. */
|
|
1280
1280
|
const POLL_INTERVAL_MS = 3e3;
|
|
1281
|
-
/** Required services: slot registry, sessions, locale, settings scope. */
|
|
1281
|
+
/** Required services: slot registry, sessions, locale, settings scope, and the Host remote faces. */
|
|
1282
1282
|
const inject = [
|
|
1283
1283
|
"slots",
|
|
1284
1284
|
"sessions",
|
|
1285
1285
|
"locale",
|
|
1286
|
-
"settingsScope"
|
|
1286
|
+
"settingsScope",
|
|
1287
|
+
"remote",
|
|
1288
|
+
"remote.session"
|
|
1287
1289
|
];
|
|
1288
1290
|
/**
|
|
1289
1291
|
* Client plugin body: poll the Host snapshot route, run the full-quota
|
package/lib/index.js
CHANGED
|
@@ -453,7 +453,7 @@ var TokenQuotaService = class TokenQuotaService extends Service {
|
|
|
453
453
|
return this.upgradeCheck;
|
|
454
454
|
}
|
|
455
455
|
async doRefreshUpgrade() {
|
|
456
|
-
const current = "0.1.
|
|
456
|
+
const current = "0.1.21";
|
|
457
457
|
let latest;
|
|
458
458
|
try {
|
|
459
459
|
const response = await fetch(REGISTRY_LATEST_URL, {
|
|
@@ -24,7 +24,7 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
24
24
|
'token-quota': TokenQuotaKey;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
/** Required services: slot registry, sessions, locale, settings scope. */
|
|
27
|
+
/** Required services: slot registry, sessions, locale, settings scope, and the Host remote faces. */
|
|
28
28
|
export declare const inject: string[];
|
|
29
29
|
/**
|
|
30
30
|
* Client plugin body: poll the Host snapshot route, run the full-quota
|
|
@@ -8,8 +8,8 @@ const NS = 'token-quota';
|
|
|
8
8
|
const TOKEN_QUOTA_NAMESPACE = 'token-quota';
|
|
9
9
|
/** Snapshot pull cadence in milliseconds. */
|
|
10
10
|
const POLL_INTERVAL_MS = 3000;
|
|
11
|
-
/** Required services: slot registry, sessions, locale, settings scope. */
|
|
12
|
-
export const inject = ['slots', 'sessions', 'locale', 'settingsScope'];
|
|
11
|
+
/** Required services: slot registry, sessions, locale, settings scope, and the Host remote faces. */
|
|
12
|
+
export const inject = ['slots', 'sessions', 'locale', 'settingsScope', 'remote', 'remote.session'];
|
|
13
13
|
/**
|
|
14
14
|
* Client plugin body: poll the Host snapshot route, run the full-quota
|
|
15
15
|
* strategy, wire the injected face (directory load, limit write, model
|
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.21",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|