dsh-codex-subscription 1.7.0 → 1.7.2

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 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.7.0` package below; do not install a moving branch.
9
+ - Use the exact `1.7.2` 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.1-rc.2 plugin --profile web add dsh-codex-subscription@1.7.0
37
+ npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add dsh-codex-subscription@1.7.2
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.7.0
43
+ dsh plugin --profile web add dsh-codex-subscription@1.7.2
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.1-rc.2` in place of `dsh`.
60
60
 
61
- 1. `dsh-codex-subscription` version `1.7.0` appears exactly once.
61
+ 1. `dsh-codex-subscription` version `1.7.2` 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/README.md CHANGED
@@ -214,7 +214,7 @@ dsh plugin --profile web remove dsh-codex-subscription
214
214
  - **`dsh` is not recognized:** the official npm route does not create a global `dsh` command; use the complete `npx -y @deepseek-ai/dsh@0.1.1-rc.2 ...` command above;
215
215
  - **More than one DSH exists:** run the standard command from the intended DSH environment. For an Agent, specify the target or pass `-DshPath` explicitly;
216
216
  - **Setup still fails:** send the Agent guide above to an Agent. Do not delete the profile or change the system PATH to force an install.
217
- - **Need to report a problem:** generate a **Support diagnostics** report at the bottom of Settings, then open the [bug report form](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml). The form collects exact DSH/plugin versions and reproduction steps. The generated report excludes credentials and account identifiers; still do not attach sign-in URLs, authorization codes, or browser callback addresses.
217
+ - **Need to report a problem:** generate a **Support diagnostics** report at the bottom of Settings, then open the [bug report form](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml). The report includes the OS/runtime and a bounded sign-in phase, but excludes credentials, account identifiers, raw errors, and full logs. Paste it into the required diagnostics field; never attach sign-in URLs, authorization codes, or browser callback addresses.
218
218
 
219
219
  The ChatGPT Codex backend and DSH can change independently. This community project is not affiliated with or endorsed by DeepSeek or OpenAI.
220
220
 
package/README.zh-CN.md CHANGED
@@ -210,7 +210,7 @@ dsh plugin --profile web remove dsh-codex-subscription
210
210
  - **`dsh` 无法识别**:官方 npm 方式本来就不会创建全局 `dsh` 命令,请使用上面的完整 `npx -y @deepseek-ai/dsh@0.1.1-rc.2 ...` 命令;
211
211
  - **电脑上有多个 DSH**:请在目标 DSH 环境中运行标准命令;交给 Agent 时明确目标,或传入 `-DshPath`;
212
212
  - **安装仍然失败**:把上面的 Agent 文档链接发给 Agent,不要删除 profile 或随意修改系统 PATH。
213
- - **需要提交问题**:在设置页底部生成“支持诊断”,然后打开[使用问题表单](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml)。表单会收集准确的 DSH/插件版本和复现步骤;报告不含凭据和账号标识,仍不要附上登录链接、授权码或浏览器回调地址。
213
+ - **需要提交问题**:在设置页底部生成“支持诊断”,然后打开[使用问题表单](https://github.com/WSL043/dsh-codex-subscription/issues/new?template=install-problem.yml)。报告包含系统/运行时和有限的登录阶段,但不含凭据、账号标识、原始错误或完整日志;请粘贴到必填诊断栏,且不要附上登录链接、授权码或浏览器回调地址。
214
214
 
215
215
  ## 边界与支持
216
216
 
package/lib/client.js CHANGED
@@ -92,6 +92,19 @@ window.__ModuleLoader__.load({
92
92
  async function readLoginProgress({ flow, readFlow, readAccount }) {
93
93
  try {
94
94
  const nextFlow = await readFlow();
95
+ if (nextFlow.phase === "failed") try {
96
+ const account = await readAccount();
97
+ if (account?.authenticated === true) return {
98
+ flow: {
99
+ id: flow.id,
100
+ method: flow.method,
101
+ phase: "authenticated",
102
+ authenticated: true
103
+ },
104
+ account,
105
+ recovered: true
106
+ };
107
+ } catch {}
95
108
  if (nextFlow.phase !== "authenticated") return { flow: nextFlow };
96
109
  return {
97
110
  flow: nextFlow,
package/lib/index.js CHANGED
@@ -229,6 +229,14 @@ var CodexLoginCoordinator = class {
229
229
  async accountStatus(options) {
230
230
  return publicClone(await this.auth.status(options));
231
231
  }
232
+ supportState() {
233
+ const active = this.#activeId === void 0 ? void 0 : this.#sessions.get(this.#activeId);
234
+ if (active === void 0) return { phase: "idle" };
235
+ return {
236
+ method: active.view.method,
237
+ phase: active.view.phase
238
+ };
239
+ }
232
240
  async start({ method }) {
233
241
  if (!LOGIN_METHODS.has(method)) throw new Error(`unsupported Codex login method: ${String(method)}`);
234
242
  const active = this.#activeId === void 0 ? void 0 : this.#sessions.get(this.#activeId);
@@ -317,7 +325,7 @@ var CodexLoginCoordinator = class {
317
325
  authenticated: status.authenticated === true,
318
326
  ...typeof status.expiresAt === "number" ? { expiresAt: status.expiresAt } : {}
319
327
  };
320
- }).catch((error) => {
328
+ }).catch(async (error) => {
321
329
  if (controller.signal.aborted) {
322
330
  session.view = {
323
331
  id,
@@ -328,6 +336,20 @@ var CodexLoginCoordinator = class {
328
336
  };
329
337
  return;
330
338
  }
339
+ try {
340
+ const status = await this.auth.status();
341
+ if (status.authenticated === true) {
342
+ session.view = {
343
+ id,
344
+ provider: "openai-codex",
345
+ method,
346
+ phase: "authenticated",
347
+ authenticated: true,
348
+ ...typeof status.expiresAt === "number" ? { expiresAt: status.expiresAt } : {}
349
+ };
350
+ return;
351
+ }
352
+ } catch {}
331
353
  session.view = {
332
354
  id,
333
355
  provider: "openai-codex",
@@ -504,7 +526,7 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0 } = {
504
526
  }
505
527
  //#endregion
506
528
  //#region src/version.js
507
- const PACKAGE_VERSION = "1.7.0";
529
+ const PACKAGE_VERSION = "1.7.2";
508
530
  const USER_AGENT = `dsh-codex-subscription/${PACKAGE_VERSION}`;
509
531
  //#endregion
510
532
  //#region src/codex-search.js
@@ -898,7 +920,7 @@ function createCodexImageTool(options) {
898
920
  //#endregion
899
921
  //#region src/diagnostics.js
900
922
  /** Build a support report that deliberately excludes OAuth and account metadata. */
901
- async function createSubscriptionDiagnostics({ auth, preferences }) {
923
+ async function createSubscriptionDiagnostics({ auth, preferences, login = { phase: "idle" } }) {
902
924
  let account = { status: "unknown" };
903
925
  const issues = [];
904
926
  try {
@@ -907,11 +929,16 @@ async function createSubscriptionDiagnostics({ auth, preferences }) {
907
929
  issues.push({ code: "account-status-unavailable" });
908
930
  }
909
931
  return {
910
- schemaVersion: 1,
932
+ schemaVersion: 2,
911
933
  package: "dsh-codex-subscription",
912
934
  version: PACKAGE_VERSION,
913
- runtime: { node: process.version },
935
+ runtime: {
936
+ node: process.version,
937
+ platform: process.platform,
938
+ arch: process.arch
939
+ },
914
940
  account,
941
+ login,
915
942
  provider: {
916
943
  id: "openai-codex",
917
944
  transport: "sse",
@@ -1558,7 +1585,8 @@ function apply(ctx) {
1558
1585
  preferences,
1559
1586
  diagnosticsReader: () => createSubscriptionDiagnostics({
1560
1587
  auth,
1561
- preferences
1588
+ preferences,
1589
+ login: coordinator.supportState()
1562
1590
  })
1563
1591
  });
1564
1592
  ctx.effect(() => ctx.connection.rpc.handle(CHANNEL, handler, { authority: "loopback" }), "codex-subscription: loopback account RPC");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-codex-subscription",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
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",