dsh-codex-subscription 1.13.0 → 1.13.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/AGENTS.md +4 -4
- package/lib/client.js +35 -55
- package/lib/index.js +3 -2
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -6,7 +6,7 @@ Use this guide when a user asks an Agent to install, update, verify, or remove
|
|
|
6
6
|
## Safety
|
|
7
7
|
|
|
8
8
|
- Confirm the target DSH installation and profile. Use `web` only when it is the user's target.
|
|
9
|
-
- Use the exact `1.13.
|
|
9
|
+
- Use the exact `1.13.1` package below; do not install a moving branch.
|
|
10
10
|
- Never print OAuth credentials, account IDs, authorization callbacks, or credential-store contents.
|
|
11
11
|
- Preserve the DSH profile, unrelated plugins, sessions, and saved sign-in.
|
|
12
12
|
- Do not start, stop, or restart DSH without explicit permission.
|
|
@@ -34,13 +34,13 @@ For an official DSH installation run through npm, keep the complete `npx` prefix
|
|
|
34
34
|
run command does not create a global `dsh` command:
|
|
35
35
|
|
|
36
36
|
```sh
|
|
37
|
-
npx -y @deepseek-ai/dsh@0.1.2-rc.1 plugin --profile web add dsh-codex-subscription@1.13.
|
|
37
|
+
npx -y @deepseek-ai/dsh@0.1.2-rc.1 plugin --profile web add dsh-codex-subscription@1.13.1
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
With an existing global `dsh` command:
|
|
41
41
|
|
|
42
42
|
```sh
|
|
43
|
-
dsh plugin --profile web add dsh-codex-subscription@1.13.
|
|
43
|
+
dsh plugin --profile web add dsh-codex-subscription@1.13.1
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
Use the same `add` command to update or repair. This is the complete package-changing operation.
|
|
@@ -58,7 +58,7 @@ dsh --profile web --dump-config
|
|
|
58
58
|
|
|
59
59
|
For the official npm route, run the same checks with `npx -y @deepseek-ai/dsh@0.1.2-rc.1` in place of `dsh`.
|
|
60
60
|
|
|
61
|
-
1. `dsh-codex-subscription` version `1.13.
|
|
61
|
+
1. `dsh-codex-subscription` version `1.13.1` appears exactly once.
|
|
62
62
|
2. `codex-subscription` appears exactly once in the composed config.
|
|
63
63
|
3. No unrelated plugin or profile was changed and DSH was not restarted.
|
|
64
64
|
|
package/lib/client.js
CHANGED
|
@@ -403,10 +403,8 @@ window.__ModuleLoader__.load({
|
|
|
403
403
|
loadFailed: "无法读取账户状态。",
|
|
404
404
|
accountRetry: "重试",
|
|
405
405
|
diagnostics: "支持诊断",
|
|
406
|
-
diagnosticsHint: "仅含环境与请求状态,不含凭据。",
|
|
407
|
-
diagnosticsOpen: "展开",
|
|
408
|
-
diagnosticsClose: "收起",
|
|
409
406
|
diagnosticsLoad: "生成诊断",
|
|
407
|
+
diagnosticsLoading: "生成中…",
|
|
410
408
|
diagnosticsCopy: "复制诊断",
|
|
411
409
|
diagnosticsCopied: "已复制",
|
|
412
410
|
diagnosticsFailed: "无法生成诊断信息。",
|
|
@@ -446,7 +444,6 @@ window.__ModuleLoader__.load({
|
|
|
446
444
|
unlimited: "不限额",
|
|
447
445
|
monthlyCreditLimit: "Credits 月度消费上限",
|
|
448
446
|
resetCredits: "额度重置",
|
|
449
|
-
resetCreditsValue: "{count} 次可用",
|
|
450
447
|
resetCreditDefaultName: "额度重置",
|
|
451
448
|
resetUse: "使用",
|
|
452
449
|
resetPreparing: "准备中…",
|
|
@@ -591,10 +588,8 @@ window.__ModuleLoader__.load({
|
|
|
591
588
|
loadFailed: "Could not read account status.",
|
|
592
589
|
accountRetry: "Retry",
|
|
593
590
|
diagnostics: "Support diagnostics",
|
|
594
|
-
diagnosticsHint: "Environment and request status only; no credentials.",
|
|
595
|
-
diagnosticsOpen: "Show",
|
|
596
|
-
diagnosticsClose: "Hide",
|
|
597
591
|
diagnosticsLoad: "Create report",
|
|
592
|
+
diagnosticsLoading: "Creating…",
|
|
598
593
|
diagnosticsCopy: "Copy report",
|
|
599
594
|
diagnosticsCopied: "Copied",
|
|
600
595
|
diagnosticsFailed: "Could not create diagnostics.",
|
|
@@ -634,7 +629,6 @@ window.__ModuleLoader__.load({
|
|
|
634
629
|
unlimited: "Unlimited",
|
|
635
630
|
monthlyCreditLimit: "Monthly Credits spending cap",
|
|
636
631
|
resetCredits: "Quota resets",
|
|
637
|
-
resetCreditsValue: "{count} available",
|
|
638
632
|
resetCreditDefaultName: "Quota reset",
|
|
639
633
|
resetUse: "Use",
|
|
640
634
|
resetPreparing: "Preparing…",
|
|
@@ -775,7 +769,7 @@ window.__ModuleLoader__.load({
|
|
|
775
769
|
.codexSubscriptionFlow p{font-size:13px;line-height:20px;color:var(--dsw-alias-label-secondary)}.codexSubscriptionCode{width:max-content;max-width:100%;font:600 16px/22px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.08em;overflow-wrap:anywhere}
|
|
776
770
|
.codexSubscriptionError{font-size:13px;line-height:20px;color:var(--dsw-alias-state-error-primary)}.codexSubscriptionInput{width:100%;box-sizing:border-box}
|
|
777
771
|
.codexSubscriptionRecover{display:flex;align-items:center;justify-content:space-between;gap:12px}.codexSubscriptionRecover .codexSubscriptionError{flex:1}.codexSubscriptionRecover button{flex:0 0 auto}
|
|
778
|
-
.codexSubscriptionDiagnostics{padding:
|
|
772
|
+
.codexSubscriptionDiagnostics{padding:8px 12px;gap:8px;background:transparent;color:var(--dsw-alias-label-secondary)}.codexSubscriptionDiagnostics pre{max-height:240px;margin:0;padding:10px 12px;border-radius:8px;background:var(--dsw-alias-bg-module-platform);overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:11px/17px ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--dsw-alias-label-secondary)}.codexSubscriptionLink{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:0 13px;border:1px solid var(--dsw-alias-border-l2);border-radius:999px;background:transparent;color:var(--dsw-alias-label-primary);font-size:13px;line-height:20px;text-decoration:none;white-space:nowrap}.codexSubscriptionLink:hover{background:var(--dsw-alias-bg-module-platform)}.codexSubscriptionLink:focus-visible{outline:2px solid var(--dsw-alias-border-l3);outline-offset:2px}
|
|
779
773
|
.codexSubscriptionSectionTitle{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.codexSubscriptionFreshness{font-size:11px;line-height:17px;color:var(--dsw-alias-label-tertiary)}
|
|
780
774
|
.codexSubscriptionRefresh{flex:0 0 auto;min-width:72px;width:max-content;white-space:nowrap!important;word-break:keep-all!important;overflow-wrap:normal!important;writing-mode:horizontal-tb!important}.codexSubscriptionRefresh *{white-space:nowrap!important;word-break:keep-all!important;writing-mode:horizontal-tb!important}
|
|
781
775
|
.codexSubscriptionEmpty{padding:18px;border:1px dashed var(--dsw-alias-border-l3);border-radius:10px;text-align:center;font-size:13px;line-height:20px;color:var(--dsw-alias-label-tertiary)}
|
|
@@ -785,7 +779,7 @@ window.__ModuleLoader__.load({
|
|
|
785
779
|
.codexSubscriptionLimit progress::-webkit-progress-bar{background:var(--dsw-alias-border-l3);border-radius:999px}.codexSubscriptionLimit progress::-webkit-progress-value{background:var(--dsw-alias-brand-primary,#3964fe);border-radius:999px}.codexSubscriptionLimit progress::-moz-progress-bar{background:var(--dsw-alias-brand-primary,#3964fe);border-radius:999px}.codexSubscriptionLimitMeta{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11px;line-height:17px;color:var(--dsw-alias-label-tertiary)}
|
|
786
780
|
.codexSubscriptionCreditSection{display:flex;flex-direction:column;gap:7px}.codexSubscriptionCreditNote{font-size:11px;line-height:17px;color:var(--dsw-alias-label-tertiary)}.codexSubscriptionCreditRows{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}.codexSubscriptionCreditBalance,.codexSubscriptionSpendLimit{min-width:0;border-radius:10px;padding:12px 14px;background:var(--dsw-alias-bg-module-platform)}
|
|
787
781
|
.codexSubscriptionCreditBalance{display:flex;flex-direction:column;gap:6px}.codexSubscriptionCreditBalance span,.codexSubscriptionCreditLabel{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary)}.codexSubscriptionCreditBalance strong{font:600 18px/24px ui-monospace,SFMono-Regular,Consolas,monospace;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
|
|
788
|
-
.codexSubscriptionCreditRows{display:flex;flex-direction:column;gap:6px}.
|
|
782
|
+
.codexSubscriptionCreditRows{display:flex;flex-direction:column;gap:6px}.codexSubscriptionResetMeta{display:flex;min-width:0;flex-direction:column;gap:1px}.codexSubscriptionResetBalance{display:flex;flex-direction:column;gap:8px}.codexSubscriptionResetCard{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;padding:9px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:9px;background:var(--dsw-alias-bg-module-platform)}.codexSubscriptionResetCard .codexSubscriptionResetMeta{flex:1}.codexSubscriptionResetCard strong{overflow:hidden;font-size:12px;line-height:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}.codexSubscriptionResetCard .codexSubscriptionActions{flex:0 0 auto}.codexSubscriptionResetCard .codexSubscriptionResetUse{min-height:28px;padding:0 10px}.codexSubscriptionResetBalance .codexSubscriptionActions{justify-content:flex-start}.codexSubscriptionResetFlow{display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--dsw-alias-border-l2);padding-top:10px}.codexSubscriptionResetFlow h4{margin:0;font-size:13px;line-height:20px;font-weight:500}.codexSubscriptionResetWarning{font-size:12px;line-height:18px;color:var(--dsw-alias-label-secondary)}.codexSubscriptionResetExpiry{font-size:11px;line-height:17px;color:var(--dsw-alias-label-tertiary)}.codexSubscriptionResetCheck{display:flex;align-items:flex-start;gap:8px;padding:9px 10px;border-radius:8px;background:var(--dsw-alias-bg-module-platform);font-size:12px;line-height:18px;color:var(--dsw-alias-label-primary);cursor:pointer}.codexSubscriptionResetCheck input{margin:3px 0 0;accent-color:var(--dsw-alias-label-primary)}.codexSubscriptionResetFinal{border-color:var(--dsw-alias-state-error-primary)!important;color:var(--dsw-alias-state-error-primary)!important}.codexSubscriptionResetResult{font-size:12px;line-height:18px;color:var(--dsw-alias-state-success-primary)}
|
|
789
783
|
.codexSubscriptionResetUse:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}.codexSubscriptionResetUse:focus-visible{outline:2px solid var(--dsw-alias-border-l3);outline-offset:1px}
|
|
790
784
|
.codexSubscriptionSpendLimit{display:flex;flex-direction:column;gap:8px}.codexSubscriptionSpendTop{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.codexSubscriptionSpendTop strong{font:600 16px/22px ui-monospace,SFMono-Regular,Consolas,monospace;font-variant-numeric:tabular-nums}.codexSubscriptionSpendLimit progress{width:100%;height:6px;border:0;border-radius:999px;overflow:hidden;background:var(--dsw-alias-border-l3);accent-color:var(--dsw-alias-brand-primary,#3964fe);-webkit-appearance:none;appearance:none}.codexSubscriptionSpendLimit progress::-webkit-progress-bar{background:var(--dsw-alias-border-l3);border-radius:999px}.codexSubscriptionSpendLimit progress::-webkit-progress-value{background:var(--dsw-alias-brand-primary,#3964fe);border-radius:999px}.codexSubscriptionSpendLimit progress::-moz-progress-bar{background:var(--dsw-alias-brand-primary,#3964fe);border-radius:999px}
|
|
791
785
|
.codexComposerQuota{display:inline-flex;align-items:center;flex:0 0 auto;height:28px;box-sizing:border-box;padding:0;color:var(--dsw-alias-label-secondary);font-family:inherit;font-size:12px;line-height:20px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap;user-select:none}.codexComposerQuotaBar{display:block;width:40px;height:4px;border:0;border-radius:999px;overflow:hidden;background:var(--dsw-alias-border-l3);accent-color:var(--dsw-alias-label-secondary);-webkit-appearance:none;appearance:none}.codexComposerQuotaBar::-webkit-progress-bar{background:var(--dsw-alias-border-l3);border-radius:999px}.codexComposerQuotaBar::-webkit-progress-value{background:var(--dsw-alias-label-secondary);border-radius:999px}.codexComposerQuotaBar::-moz-progress-bar{background:var(--dsw-alias-label-secondary);border-radius:999px}
|
|
@@ -2278,7 +2272,6 @@ window.__ModuleLoader__.load({
|
|
|
2278
2272
|
});
|
|
2279
2273
|
}
|
|
2280
2274
|
function DiagnosticsCard({ rpc, t }) {
|
|
2281
|
-
const [diagnosticsOpen, setDiagnosticsOpen] = (0, react.useState)(false);
|
|
2282
2275
|
const [report, setReport] = (0, react.useState)();
|
|
2283
2276
|
const [busy, setBusy] = (0, react.useState)(false);
|
|
2284
2277
|
const [copied, setCopied] = (0, react.useState)(false);
|
|
@@ -2295,46 +2288,36 @@ window.__ModuleLoader__.load({
|
|
|
2295
2288
|
};
|
|
2296
2289
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2297
2290
|
className: "codexSubscriptionCard codexSubscriptionDiagnostics",
|
|
2298
|
-
children: [
|
|
2299
|
-
className: "codexSubscriptionSectionHead",
|
|
2300
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2301
|
-
className: "codexSubscriptionSectionTitle",
|
|
2302
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("diagnostics") })
|
|
2303
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2304
|
-
className: "codexSubscriptionActions",
|
|
2305
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
2306
|
-
className: "codexSubscriptionDiagnosticsToggle",
|
|
2307
|
-
type: "button",
|
|
2308
|
-
variant: "outline",
|
|
2309
|
-
"aria-expanded": diagnosticsOpen,
|
|
2310
|
-
onClick: () => setDiagnosticsOpen((value) => !value),
|
|
2311
|
-
children: t(diagnosticsOpen ? "diagnosticsClose" : "diagnosticsOpen")
|
|
2312
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
2313
|
-
className: "codexSubscriptionLink",
|
|
2314
|
-
href: SUPPORT_ISSUE_URL,
|
|
2315
|
-
target: "_blank",
|
|
2316
|
-
rel: "noreferrer",
|
|
2317
|
-
children: t("feedbackOpen")
|
|
2318
|
-
})]
|
|
2319
|
-
})]
|
|
2320
|
-
}), diagnosticsOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
2321
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2322
|
-
className: "codexSubscriptionNote",
|
|
2323
|
-
children: t("diagnosticsHint")
|
|
2324
|
-
}),
|
|
2291
|
+
children: [
|
|
2325
2292
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2326
|
-
className: "
|
|
2327
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
children:
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2293
|
+
className: "codexSubscriptionSectionHead",
|
|
2294
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2295
|
+
className: "codexSubscriptionSectionTitle",
|
|
2296
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("diagnostics") })
|
|
2297
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2298
|
+
className: "codexSubscriptionActions",
|
|
2299
|
+
children: [
|
|
2300
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
2301
|
+
type: "button",
|
|
2302
|
+
variant: "outline",
|
|
2303
|
+
disabled: busy,
|
|
2304
|
+
onClick: load,
|
|
2305
|
+
children: busy ? t("diagnosticsLoading") : t("diagnosticsLoad")
|
|
2306
|
+
}),
|
|
2307
|
+
report === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
2308
|
+
type: "button",
|
|
2309
|
+
variant: "outline",
|
|
2310
|
+
onClick: copy,
|
|
2311
|
+
children: copied ? t("diagnosticsCopied") : t("diagnosticsCopy")
|
|
2312
|
+
}),
|
|
2313
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
2314
|
+
className: "codexSubscriptionLink",
|
|
2315
|
+
href: SUPPORT_ISSUE_URL,
|
|
2316
|
+
target: "_blank",
|
|
2317
|
+
rel: "noreferrer",
|
|
2318
|
+
children: t("feedbackOpen")
|
|
2319
|
+
})
|
|
2320
|
+
]
|
|
2338
2321
|
})]
|
|
2339
2322
|
}),
|
|
2340
2323
|
report === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", { children: JSON.stringify(report, null, 2) }),
|
|
@@ -2343,7 +2326,7 @@ window.__ModuleLoader__.load({
|
|
|
2343
2326
|
role: "alert",
|
|
2344
2327
|
children: t("diagnosticsFailed")
|
|
2345
2328
|
}) : null
|
|
2346
|
-
]
|
|
2329
|
+
]
|
|
2347
2330
|
});
|
|
2348
2331
|
}
|
|
2349
2332
|
function ResetTime({ resetsAt, t }) {
|
|
@@ -2700,10 +2683,7 @@ window.__ModuleLoader__.load({
|
|
|
2700
2683
|
}) : null,
|
|
2701
2684
|
visibleUsage?.resetCredits?.availableCount > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2702
2685
|
className: "codexSubscriptionCreditBalance",
|
|
2703
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.
|
|
2704
|
-
className: "codexSubscriptionResetSummary",
|
|
2705
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("resetCredits") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: fill(t("resetCreditsValue"), { count: visibleUsage.resetCredits.availableCount }) })]
|
|
2706
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResetCreditList, {
|
|
2686
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("resetCredits") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResetCreditList, {
|
|
2707
2687
|
rpc,
|
|
2708
2688
|
t,
|
|
2709
2689
|
count: visibleUsage.resetCredits.availableCount,
|
package/lib/index.js
CHANGED
|
@@ -40,7 +40,8 @@ function decodeJwtPayload(access) {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
function emailFromAccessToken(access) {
|
|
43
|
-
|
|
43
|
+
const payload = decodeJwtPayload(access);
|
|
44
|
+
return normalizeAccountEmail(payload?.["https://api.openai.com/profile"]?.email ?? payload?.email);
|
|
44
45
|
}
|
|
45
46
|
/** Normalize the one non-secret account attribute that may cross the UI boundary. */
|
|
46
47
|
function sanitizeOAuthCredential(value) {
|
|
@@ -1302,7 +1303,7 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, reso
|
|
|
1302
1303
|
}
|
|
1303
1304
|
//#endregion
|
|
1304
1305
|
//#region src/version.js
|
|
1305
|
-
const PACKAGE_VERSION = "1.13.
|
|
1306
|
+
const PACKAGE_VERSION = "1.13.1";
|
|
1306
1307
|
const USER_AGENT = `dsh-codex-subscription/${PACKAGE_VERSION}`;
|
|
1307
1308
|
//#endregion
|
|
1308
1309
|
//#region src/model-catalog.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-codex-subscription",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "Use ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast mode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|