dsh-codex-subscription 1.1.5 → 1.1.6
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 +5 -5
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/lib/client.js +53 -6
- package/lib/index.js +1 -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.1.
|
|
9
|
+
- Use the exact `1.1.6` 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.
|
|
@@ -38,19 +38,19 @@ For an official DSH installation run through npm, keep the complete `npx` prefix
|
|
|
38
38
|
run command does not create a global `dsh` command:
|
|
39
39
|
|
|
40
40
|
```sh
|
|
41
|
-
npx -y @deepseek-ai/dsh@0.1.1-rc.1 plugin --profile web add dsh-codex-subscription@1.1.
|
|
41
|
+
npx -y @deepseek-ai/dsh@0.1.1-rc.1 plugin --profile web add dsh-codex-subscription@1.1.6
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
With an existing global `dsh` command:
|
|
45
45
|
|
|
46
46
|
```sh
|
|
47
|
-
dsh plugin --profile web add dsh-codex-subscription@1.1.
|
|
47
|
+
dsh plugin --profile web add dsh-codex-subscription@1.1.6
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
From a DSH-Portable folder:
|
|
51
51
|
|
|
52
52
|
```powershell
|
|
53
|
-
.\dsh.exe plugin --profile web add dsh-codex-subscription@1.1.
|
|
53
|
+
.\dsh.exe plugin --profile web add dsh-codex-subscription@1.1.6
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
Use the same `add` command to update or repair. This is the complete package-changing operation.
|
|
@@ -70,7 +70,7 @@ For DSH-Portable, replace `dsh` with `.\dsh.exe`. Static acceptance requires:
|
|
|
70
70
|
|
|
71
71
|
For the official npm route, run the same checks with `npx -y @deepseek-ai/dsh@0.1.1-rc.1` in place of `dsh`.
|
|
72
72
|
|
|
73
|
-
1. `dsh-codex-subscription` version `1.1.
|
|
73
|
+
1. `dsh-codex-subscription` version `1.1.6` appears exactly once.
|
|
74
74
|
2. `codex-subscription` appears exactly once in the composed config.
|
|
75
75
|
3. No unrelated plugin or profile was changed and DSH was not restarted.
|
|
76
76
|
|
package/README.en.md
CHANGED
|
@@ -49,7 +49,7 @@ These capabilities reuse the same local ChatGPT sign-in. Subscription routing fa
|
|
|
49
49
|
|
|
50
50
|
This plugin is currently compatible through DeepSeek Harness `0.1.1-rc.1` and requires a ChatGPT account that currently has Codex access.
|
|
51
51
|
|
|
52
|
-
- Do not want to configure Node.js? Use
|
|
52
|
+
- Do not want to configure Node.js? Use [DSH-Portable](https://github.com/WSL043/DSH-Portable), a community desktop distribution with portable and installed editions for Windows plus desktop packages for macOS and Linux.
|
|
53
53
|
- Prefer the official route? Follow the [DeepSeek Harness run guide](https://github.com/deepseek-ai/deepseek-harness#run).
|
|
54
54
|
|
|
55
55
|
## Install
|
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
本插件当前适配到 DeepSeek Harness `0.1.1-rc.1`,并需要一个当前具有 Codex 使用资格的 ChatGPT 账户。
|
|
52
52
|
|
|
53
|
-
- 不想配置 Node.js:使用 [DSH-Portable
|
|
53
|
+
- 不想配置 Node.js:使用 [DSH-Portable](https://github.com/WSL043/DSH-Portable)。这是社区桌面分发,提供 Windows 便携版和安装版,以及 macOS、Linux 桌面包;
|
|
54
54
|
- 想按官方方式运行:查看 [DeepSeek Harness 官方说明](https://github.com/deepseek-ai/deepseek-harness#run)。
|
|
55
55
|
|
|
56
56
|
## 安装
|
package/lib/client.js
CHANGED
|
@@ -79,6 +79,34 @@ window.__ModuleLoader__.load({
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
//#endregion
|
|
82
|
+
//#region src/login-progress.js
|
|
83
|
+
/** Reconcile a login flow with the credential store without exposing credentials. */
|
|
84
|
+
async function readLoginProgress({ flow, readFlow, readAccount }) {
|
|
85
|
+
try {
|
|
86
|
+
const nextFlow = await readFlow();
|
|
87
|
+
if (nextFlow.phase !== "authenticated") return { flow: nextFlow };
|
|
88
|
+
return {
|
|
89
|
+
flow: nextFlow,
|
|
90
|
+
account: await readAccount()
|
|
91
|
+
};
|
|
92
|
+
} catch (flowError) {
|
|
93
|
+
try {
|
|
94
|
+
const account = await readAccount();
|
|
95
|
+
if (account?.authenticated === true) return {
|
|
96
|
+
flow: {
|
|
97
|
+
id: flow.id,
|
|
98
|
+
method: flow.method,
|
|
99
|
+
phase: "authenticated",
|
|
100
|
+
authenticated: true
|
|
101
|
+
},
|
|
102
|
+
account,
|
|
103
|
+
recovered: true
|
|
104
|
+
};
|
|
105
|
+
} catch {}
|
|
106
|
+
throw flowError;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
82
110
|
//#region src/client.jsx
|
|
83
111
|
const inject = [
|
|
84
112
|
"slots",
|
|
@@ -985,12 +1013,17 @@ window.__ModuleLoader__.load({
|
|
|
985
1013
|
"cancelled"
|
|
986
1014
|
].includes(flow.phase)) return void 0;
|
|
987
1015
|
const timer = window.setInterval(() => {
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1016
|
+
readLoginProgress({
|
|
1017
|
+
flow,
|
|
1018
|
+
readFlow: () => call("login/status", { id: flow.id }),
|
|
1019
|
+
readAccount: () => call("status")
|
|
1020
|
+
}).then((next) => {
|
|
1021
|
+
setFlow(next.flow);
|
|
1022
|
+
setError(void 0);
|
|
1023
|
+
if (next.account !== void 0) {
|
|
1024
|
+
setAccount(next.account);
|
|
992
1025
|
notifyQuickQuota();
|
|
993
|
-
}
|
|
1026
|
+
}
|
|
994
1027
|
}).catch(() => setError(t("failed")));
|
|
995
1028
|
}, 800);
|
|
996
1029
|
return () => window.clearInterval(timer);
|
|
@@ -1006,7 +1039,21 @@ window.__ModuleLoader__.load({
|
|
|
1006
1039
|
const cancel = () => {
|
|
1007
1040
|
if (flow?.id === void 0) return;
|
|
1008
1041
|
setBusy(true);
|
|
1009
|
-
call("login/cancel", { id: flow.id }).then(
|
|
1042
|
+
call("login/cancel", { id: flow.id }).then((next) => {
|
|
1043
|
+
setFlow(next);
|
|
1044
|
+
return call("status").then((account) => {
|
|
1045
|
+
if (account.authenticated === true) {
|
|
1046
|
+
setAccount(account);
|
|
1047
|
+
setFlow({
|
|
1048
|
+
...next,
|
|
1049
|
+
phase: "authenticated",
|
|
1050
|
+
authenticated: true
|
|
1051
|
+
});
|
|
1052
|
+
setError(void 0);
|
|
1053
|
+
notifyQuickQuota();
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1056
|
+
}).catch(() => setError(t("failed"))).finally(() => setBusy(false));
|
|
1010
1057
|
};
|
|
1011
1058
|
const submit = (event) => {
|
|
1012
1059
|
event.preventDefault();
|
package/lib/index.js
CHANGED
|
@@ -373,7 +373,6 @@ var CodexLoginCoordinator = class {
|
|
|
373
373
|
};
|
|
374
374
|
session.controller.abort(/* @__PURE__ */ new Error("Codex login cancelled"));
|
|
375
375
|
}
|
|
376
|
-
await Promise.resolve(session.run).catch(() => void 0);
|
|
377
376
|
return this.read(id);
|
|
378
377
|
}
|
|
379
378
|
async logout(options) {
|
|
@@ -495,7 +494,7 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0 } = {
|
|
|
495
494
|
streamSimple: (model, context, options) => provider.streamSimple(model, context, withSpeed(model, options))
|
|
496
495
|
});
|
|
497
496
|
}
|
|
498
|
-
const USER_AGENT = `dsh-codex-subscription/1.1.
|
|
497
|
+
const USER_AGENT = `dsh-codex-subscription/1.1.6`;
|
|
499
498
|
//#endregion
|
|
500
499
|
//#region src/codex-search.js
|
|
501
500
|
const CODEX_SEARCH_PROVIDER_ID = "codex-subscription";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-codex-subscription",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "ChatGPT and Codex subscriptions for DeepSeek Harness with OAuth login, image generation, quota, and subscription web search",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|