@tnnevol/dsh-codex-auth 0.1.5-rc.2 → 0.1.7-rc.2.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/README.md +3 -3
- package/compatibility.json +15 -6
- package/cordis.patch.yml +103 -10
- package/lib/auth-paths.d.ts +3 -1
- package/lib/auth-paths.js +3 -1
- package/lib/client.js +581 -120
- package/lib/index.js +241 -8
- package/lib/style.css +1 -1
- package/package.json +62 -70
package/README.md
CHANGED
|
@@ -4,10 +4,10 @@ DSH 的 ChatGPT / Codex 登录、模型目录和账号用量插件。
|
|
|
4
4
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
7
|
-
插件发布在 npm,要求 DSH `0.1.
|
|
7
|
+
插件发布在 npm,要求 DSH `0.1.7-rc.2` 。安装命令:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
dsh plugin --profile web add @tnnevol/dsh-codex-auth@0.1.
|
|
10
|
+
dsh plugin --profile web add @tnnevol/dsh-codex-auth@0.1.7-rc.2
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
装完重启 Web profile 即可。如果提示 `cannot resolve profile bundle`,重新跑一次上面的安装命令,别只在 `package.json` 里手动补 bundle。
|
|
@@ -19,4 +19,4 @@ dsh plugin --profile web add @tnnevol/dsh-codex-auth@0.1.5-rc.2
|
|
|
19
19
|
- 对话输入区右侧显示当前 Codex 模型的用量状态,可展开看剩余额度和重置时间
|
|
20
20
|
- 读取并在模型选择器里展示 Codex 模型目录
|
|
21
21
|
|
|
22
|
-
更完整的说明见线上文档:<https://
|
|
22
|
+
更完整的说明见线上文档:<https://fndsh-doc.tnnevol.cn/plugins/dsh-codex-auth>
|
package/compatibility.json
CHANGED
|
@@ -4,24 +4,33 @@
|
|
|
4
4
|
"node": "^22.19.0 || >=24.0.0"
|
|
5
5
|
},
|
|
6
6
|
"dshPluginApi": {
|
|
7
|
-
"version": "0.1.
|
|
7
|
+
"version": "0.1.7-rc.2",
|
|
8
8
|
"packages": [
|
|
9
|
+
"@deepseek-ai/dsh-agent-default-model",
|
|
10
|
+
"@deepseek-ai/dsh-api-remotes",
|
|
11
|
+
"@deepseek-ai/dsh-api-session-controller",
|
|
9
12
|
"@deepseek-ai/dsh-atomic-write",
|
|
10
13
|
"@deepseek-ai/dsh-attachment",
|
|
14
|
+
"@deepseek-ai/dsh-client-connection",
|
|
15
|
+
"@deepseek-ai/dsh-client-locale",
|
|
16
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
17
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager",
|
|
18
|
+
"@deepseek-ai/dsh-client-ui-primitives",
|
|
19
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
11
20
|
"@deepseek-ai/dsh-client-ui-session",
|
|
21
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
22
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins",
|
|
23
|
+
"@deepseek-ai/dsh-client-ui-slots",
|
|
12
24
|
"@deepseek-ai/dsh-credentials",
|
|
13
25
|
"@deepseek-ai/dsh-home-paths",
|
|
14
26
|
"@deepseek-ai/dsh-host-webserver",
|
|
15
|
-
"@deepseek-ai/dsh-invariants",
|
|
16
|
-
"@deepseek-ai/dsh-launch-environment",
|
|
17
27
|
"@deepseek-ai/dsh-llm",
|
|
18
28
|
"@deepseek-ai/dsh-llm-pi-ai",
|
|
19
|
-
"@deepseek-ai/dsh-settings"
|
|
20
|
-
"@deepseek-ai/dsh-timeout"
|
|
29
|
+
"@deepseek-ai/dsh-settings"
|
|
21
30
|
]
|
|
22
31
|
},
|
|
23
32
|
"piAi": {
|
|
24
33
|
"package": "@earendil-works/pi-ai",
|
|
25
|
-
"version": "0.
|
|
34
|
+
"version": "0.85.1"
|
|
26
35
|
}
|
|
27
36
|
}
|
package/cordis.patch.yml
CHANGED
|
@@ -5,6 +5,24 @@
|
|
|
5
5
|
# Use the official pi-ai settings family so the DSH Models page renders the
|
|
6
6
|
# provider's credential status and its standard model-catalog editor. The
|
|
7
7
|
# access token is mirrored to this reference by the plugin after OAuth login.
|
|
8
|
+
#
|
|
9
|
+
# Every entry states its full capability set on purpose. A configured `models`
|
|
10
|
+
# list replaces the installed catalog wholesale, so an entry that only names an
|
|
11
|
+
# id keeps nothing but whatever the installed catalog happens to describe for
|
|
12
|
+
# that id — and silently loses reasoning levels and image input when the id is
|
|
13
|
+
# newer than that catalog, which is exactly what happened to `gpt-6-sol` and
|
|
14
|
+
# `gpt-6-luna` (both absent from the codex catalog in pi-ai through 0.87.0,
|
|
15
|
+
# added in 0.87.1). The fields below mirror the catalog's own values, so
|
|
16
|
+
# clearing the DSH settings override ("恢复默认模型") lands on each model's real
|
|
17
|
+
# capabilities again — context window, image input, and its actual thinking
|
|
18
|
+
# levels — instead of on `reasoning: false` plus llm-pi-ai's defaults
|
|
19
|
+
# (contextWindow 262144, input `["text"]`).
|
|
20
|
+
#
|
|
21
|
+
# `reasoningEfforts` is per model because the levels differ per model. Wire
|
|
22
|
+
# spellings are the codex endpoint's own: `minimal` is sent as `low`, and `off`
|
|
23
|
+
# is declared with no value so that "not thinking" omits the reasoning option
|
|
24
|
+
# rather than sending a level the endpoint would reject. `gpt-6-astra` genuinely
|
|
25
|
+
# has no `off` (its catalog entry maps `off` to `null`), so its list omits it.
|
|
8
26
|
- id: llm-pi-ai
|
|
9
27
|
config:
|
|
10
28
|
providers:
|
|
@@ -12,17 +30,92 @@
|
|
|
12
30
|
displayName: OpenAI Codex
|
|
13
31
|
apiKeyEnv: OPENAI_CODEX_AUTH_TOKEN
|
|
14
32
|
models:
|
|
15
|
-
- id: gpt-
|
|
16
|
-
name: GPT-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
- id: gpt-6-astra
|
|
34
|
+
name: GPT-6-Astra
|
|
35
|
+
contextWindow: 272000
|
|
36
|
+
maxTokens: 128000
|
|
37
|
+
input: [text, image]
|
|
38
|
+
reasoningEfforts:
|
|
39
|
+
minimal: low
|
|
40
|
+
low: low
|
|
41
|
+
medium: medium
|
|
42
|
+
high: high
|
|
43
|
+
xhigh: xhigh
|
|
44
|
+
max: max
|
|
45
|
+
- id: gpt-6-sol
|
|
46
|
+
name: GPT-6-Sol
|
|
47
|
+
contextWindow: 272000
|
|
48
|
+
maxTokens: 128000
|
|
49
|
+
input: [text, image]
|
|
50
|
+
reasoningEfforts:
|
|
51
|
+
off: none
|
|
52
|
+
minimal: low
|
|
53
|
+
low: low
|
|
54
|
+
medium: medium
|
|
55
|
+
high: high
|
|
56
|
+
xhigh: xhigh
|
|
57
|
+
max: max
|
|
58
|
+
- id: gpt-6-luna
|
|
59
|
+
name: GPT-6-Luna
|
|
60
|
+
contextWindow: 272000
|
|
61
|
+
maxTokens: 128000
|
|
62
|
+
input: [text, image]
|
|
63
|
+
reasoningEfforts:
|
|
64
|
+
off: none
|
|
65
|
+
minimal: low
|
|
66
|
+
low: low
|
|
67
|
+
medium: medium
|
|
68
|
+
high: high
|
|
69
|
+
xhigh: xhigh
|
|
70
|
+
max: max
|
|
25
71
|
- id: gpt-5.6-sol
|
|
26
72
|
name: GPT-5.6 Sol
|
|
73
|
+
contextWindow: 272000
|
|
74
|
+
maxTokens: 128000
|
|
75
|
+
input: [text, image]
|
|
76
|
+
reasoningEfforts:
|
|
77
|
+
off: null
|
|
78
|
+
minimal: low
|
|
79
|
+
low: low
|
|
80
|
+
medium: medium
|
|
81
|
+
high: high
|
|
82
|
+
xhigh: xhigh
|
|
83
|
+
max: max
|
|
27
84
|
- id: gpt-5.6-terra
|
|
28
85
|
name: GPT-5.6 Terra
|
|
86
|
+
contextWindow: 272000
|
|
87
|
+
maxTokens: 128000
|
|
88
|
+
input: [text, image]
|
|
89
|
+
reasoningEfforts:
|
|
90
|
+
off: null
|
|
91
|
+
minimal: low
|
|
92
|
+
low: low
|
|
93
|
+
medium: medium
|
|
94
|
+
high: high
|
|
95
|
+
xhigh: xhigh
|
|
96
|
+
max: max
|
|
97
|
+
- id: gpt-5.6-luna
|
|
98
|
+
name: GPT-5.6 Luna
|
|
99
|
+
contextWindow: 272000
|
|
100
|
+
maxTokens: 128000
|
|
101
|
+
input: [text, image]
|
|
102
|
+
reasoningEfforts:
|
|
103
|
+
off: null
|
|
104
|
+
minimal: low
|
|
105
|
+
low: low
|
|
106
|
+
medium: medium
|
|
107
|
+
high: high
|
|
108
|
+
xhigh: xhigh
|
|
109
|
+
max: max
|
|
110
|
+
- id: gpt-5.5
|
|
111
|
+
name: GPT-5.5
|
|
112
|
+
contextWindow: 272000
|
|
113
|
+
maxTokens: 128000
|
|
114
|
+
input: [text, image]
|
|
115
|
+
reasoningEfforts:
|
|
116
|
+
off: null
|
|
117
|
+
minimal: low
|
|
118
|
+
low: low
|
|
119
|
+
medium: medium
|
|
120
|
+
high: high
|
|
121
|
+
xhigh: xhigh
|
package/lib/auth-paths.d.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
/** Browser-facing paths owned by the standalone Codex authentication plugin. */
|
|
3
3
|
declare const CODEX_AUTH_STATUS_PATH = "/plugins/dsh-codex-auth-plugin/auth/status";
|
|
4
4
|
declare const CODEX_AUTH_LOGIN_PATH = "/plugins/dsh-codex-auth-plugin/auth/login";
|
|
5
|
+
/** OpenAI's device-code page is fixed; opening it does not depend on the NAS network request. */
|
|
6
|
+
declare const CODEX_AUTH_VERIFICATION_URI = "https://auth.openai.com/codex/device";
|
|
5
7
|
declare const CODEX_AUTH_CANCEL_PATH = "/plugins/dsh-codex-auth-plugin/auth/cancel";
|
|
6
8
|
declare const CODEX_AUTH_LOGOUT_PATH = "/plugins/dsh-codex-auth-plugin/auth/logout";
|
|
7
9
|
declare const CODEX_USAGE_PATH = "/plugins/dsh-codex-auth-plugin/auth/usage";
|
|
@@ -10,4 +12,4 @@ declare const CODEX_GLOBAL_MODEL_PATH = "/plugins/dsh-codex-auth-plugin/auth/glo
|
|
|
10
12
|
/** Same-origin endpoint that refreshes the OpenAI Codex route's model catalog. */
|
|
11
13
|
declare const CODEX_MODEL_REFRESH_PATH = "/plugins/dsh-codex-auth-plugin/auth/refresh-models";
|
|
12
14
|
//#endregion
|
|
13
|
-
export { CODEX_AUTH_CANCEL_PATH, CODEX_AUTH_LOGIN_PATH, CODEX_AUTH_LOGOUT_PATH, CODEX_AUTH_STATUS_PATH, CODEX_GLOBAL_MODEL_PATH, CODEX_MODEL_REFRESH_PATH, CODEX_USAGE_PATH };
|
|
15
|
+
export { CODEX_AUTH_CANCEL_PATH, CODEX_AUTH_LOGIN_PATH, CODEX_AUTH_LOGOUT_PATH, CODEX_AUTH_STATUS_PATH, CODEX_AUTH_VERIFICATION_URI, CODEX_GLOBAL_MODEL_PATH, CODEX_MODEL_REFRESH_PATH, CODEX_USAGE_PATH };
|
package/lib/auth-paths.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
/** Browser-facing paths owned by the standalone Codex authentication plugin. */
|
|
3
3
|
const CODEX_AUTH_STATUS_PATH = "/plugins/dsh-codex-auth-plugin/auth/status";
|
|
4
4
|
const CODEX_AUTH_LOGIN_PATH = "/plugins/dsh-codex-auth-plugin/auth/login";
|
|
5
|
+
/** OpenAI's device-code page is fixed; opening it does not depend on the NAS network request. */
|
|
6
|
+
const CODEX_AUTH_VERIFICATION_URI = "https://auth.openai.com/codex/device";
|
|
5
7
|
const CODEX_AUTH_CANCEL_PATH = "/plugins/dsh-codex-auth-plugin/auth/cancel";
|
|
6
8
|
const CODEX_AUTH_LOGOUT_PATH = "/plugins/dsh-codex-auth-plugin/auth/logout";
|
|
7
9
|
const CODEX_USAGE_PATH = "/plugins/dsh-codex-auth-plugin/auth/usage";
|
|
@@ -10,4 +12,4 @@ const CODEX_GLOBAL_MODEL_PATH = "/plugins/dsh-codex-auth-plugin/auth/global-mode
|
|
|
10
12
|
/** Same-origin endpoint that refreshes the OpenAI Codex route's model catalog. */
|
|
11
13
|
const CODEX_MODEL_REFRESH_PATH = "/plugins/dsh-codex-auth-plugin/auth/refresh-models";
|
|
12
14
|
//#endregion
|
|
13
|
-
export { CODEX_AUTH_CANCEL_PATH, CODEX_AUTH_LOGIN_PATH, CODEX_AUTH_LOGOUT_PATH, CODEX_AUTH_STATUS_PATH, CODEX_GLOBAL_MODEL_PATH, CODEX_MODEL_REFRESH_PATH, CODEX_USAGE_PATH };
|
|
15
|
+
export { CODEX_AUTH_CANCEL_PATH, CODEX_AUTH_LOGIN_PATH, CODEX_AUTH_LOGOUT_PATH, CODEX_AUTH_STATUS_PATH, CODEX_AUTH_VERIFICATION_URI, CODEX_GLOBAL_MODEL_PATH, CODEX_MODEL_REFRESH_PATH, CODEX_USAGE_PATH };
|