dsh-codex-connect 0.1.0-alpha.4.24 → 0.1.0-alpha.4.26
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/INSTALL.md +20 -12
- package/README.i18n.yaml +2 -2
- package/README.md +22 -18
- package/compatibility.json +1 -1
- package/docs/README.zh.md +22 -18
- package/docs/design.i18n.yaml +2 -2
- package/docs/design.md +4 -2
- package/docs/design.zh.md +4 -2
- package/lib/bin.js +2 -2
- package/lib/client.js +125 -56
- package/lib/index.d.ts +36 -6
- package/lib/index.js +2 -2
- package/lib/{src-NE6c_5P4.js → src-FSN1b9Tk.js} +414 -61
- package/package.json +76 -76
package/INSTALL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Installation Runbook for CLI Agents
|
|
2
2
|
|
|
3
|
-
Alpha 4.
|
|
3
|
+
Alpha 4.26 is verified with DSH `0.1.2-rc.1` and its declared pi-ai range `^0.84.2`.
|
|
4
4
|
|
|
5
5
|
Install `dsh-codex-connect` into one requested DeepSeek Harness profile without changing its current default model, search route, global configuration, or OAuth state.
|
|
6
6
|
|
|
@@ -23,13 +23,14 @@ Check `dsh --version` before changing the requested profile. Use `dsh --help` to
|
|
|
23
23
|
| `0.1.0-rc.7` | `0.1.0-alpha.4.14` |
|
|
24
24
|
| `0.1.1-rc.2` | `0.1.0-alpha.4.21` |
|
|
25
25
|
| `0.1.2-alpha.2` | `0.1.0-alpha.4.23` |
|
|
26
|
-
| `0.1.2-
|
|
26
|
+
| `0.1.2-rc.1` | `0.1.0-alpha.4.26` |
|
|
27
|
+
| `0.1.2-alpha.5` | `0.1.0-alpha.4.25` |
|
|
27
28
|
|
|
28
29
|
If your exact DSH version is unknown or not listed, stop and verify the combination before installing. Do not blindly install `dsh-codex-connect@alpha`: `alpha` is a moving tag, not a compatibility guarantee. Do not infer support for newer DSH versions from these rows.
|
|
29
30
|
|
|
30
|
-
Alpha 4.
|
|
31
|
+
Alpha 4.26's verified contract is DSH plugin API packages `0.1.2-rc.1`, `@earendil-works/pi-ai` `^0.84.2`, and Node.js `^22.19.0 || >=24.0.0`. Alpha 4.25 remains the verified choice for DSH `0.1.2-alpha.5`, Alpha 4.23 remains the verified choice for DSH `0.1.2-alpha.2`, Alpha 4.21 remains the verified choice for DSH `0.1.1-rc.2`, and staying on DSH `0.1.0-rc.7` means selecting Alpha 4.14. Upgrading DSH is a separate decision: upgrade the DSH API packages and pi-ai together, then rerun `dsh-codex-connect doctor --json` and `pnpm --silent run check:compatibility` for the selected combination.
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
The Alpha 4.26 row reflects a fresh isolated installation and runtime probe. Historical rows remain the repository's existing verification record. This guidance does not change upstream DSH behavior or resolve [Issue #64](https://github.com/franksong2702/dsh-codex-connect/issues/64).
|
|
33
34
|
|
|
34
35
|
### Install the selected version and validate
|
|
35
36
|
|
|
@@ -52,25 +53,32 @@ These choices reflect the repository's existing verification record, not a new i
|
|
|
52
53
|
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.23
|
|
53
54
|
```
|
|
54
55
|
|
|
55
|
-
For DSH `0.1.2-
|
|
56
|
+
For DSH `0.1.2-rc.1`, use Alpha 4.26:
|
|
56
57
|
|
|
57
58
|
```sh
|
|
58
|
-
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.
|
|
59
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.26
|
|
59
60
|
```
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
For DSH `0.1.2-alpha.5`, use Alpha 4.25:
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
```sh
|
|
65
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.25
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
If npm is unavailable after the matching GitHub prerelease is created, use `dsh plugin --profile web add 'github:franksong2702/dsh-codex-connect#v0.1.0-alpha.4.21'` only for the DSH `0.1.1-rc.2` combination, `dsh plugin --profile web add 'github:franksong2702/dsh-codex-connect#v0.1.0-alpha.4.23'` only for the DSH `0.1.2-alpha.2` combination, `dsh plugin --profile web add 'github:franksong2702/dsh-codex-connect#v0.1.0-alpha.4.25'` only for the DSH `0.1.2-alpha.5` combination, or `dsh plugin --profile web add 'github:franksong2702/dsh-codex-connect#v0.1.0-alpha.4.26'` only for the DSH `0.1.2-rc.1` combination.
|
|
69
|
+
|
|
70
|
+
3. Run `dsh web --help` once to compose the installed profile without starting the server. DSH `0.1.2-rc.1` prepares profile plugin dependency fallback during this step.
|
|
71
|
+
4. Run `dsh --profile web --dump-config` and require exactly one `llm-openai-codex` row loading `dsh-codex-connect`.
|
|
72
|
+
5. Confirm the effective `agent-default-model` and `web.searchProvider` values are unchanged from before installation.
|
|
73
|
+
6. Run secret-free diagnostics:
|
|
66
74
|
|
|
67
75
|
```sh
|
|
68
76
|
dsh plugin --profile web exec dsh-codex-connect doctor
|
|
69
77
|
```
|
|
70
78
|
|
|
71
|
-
|
|
79
|
+
7. If the user explicitly requests login, open **Settings → Plugins → Plugin configuration → Codex Connect**, or check `status` and then use `login` or `login --device-code`. OAuth approval belongs to the user.
|
|
72
80
|
|
|
73
|
-
Alpha 4.
|
|
81
|
+
Alpha 4.25 offers the same account actions in **Settings → Models → Openai-Codex**, plus a shared **More settings** dialog for model visibility, proxy, search, image, context-budget, and Auto-review controls. The original Plugin settings entry remains available; neither entry automatically starts login or changes model/search defaults.
|
|
74
82
|
|
|
75
83
|
When signed out, select **Authorize**. When signed in, use **Sign out** or **View quota**; use **More settings** for plugin options. If authorization is abandoned, use **Reopen authorization** or **Cancel sign-in** and retry; cancellation does not delete an existing account. Pending authorization expires after 10 minutes by default (`oauthTimeoutMs` in plugin configuration, applied on load).
|
|
76
84
|
|
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# git hash-object README.md docs/README.zh.md
|
|
5
|
-
README.md:
|
|
6
|
-
docs/README.zh.md:
|
|
5
|
+
README.md: c2fb988676d46f1d05d96b2e665df6c4b0505fce
|
|
6
|
+
docs/README.zh.md: 54386abdfc31e6d3a243892ee9f8508642033b59
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Connect your ChatGPT subscription to DeepSeek Harness with OAuth, optional GPT I
|
|
|
10
10
|
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/en/hero.jpg" alt="Codex Connect — ChatGPT OAuth for DeepSeek Harness" width="100%">
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
|
-
`dsh-codex-connect` adds the `openai-codex` model catalog and a separate ChatGPT OAuth login. Models run through Harness's normal LLM service, so streaming, tool calls, reasoning replay, compaction, filesystem controls, permission gates, and approval prompts remain Harness-owned. It does not turn a ChatGPT subscription into an OpenAI Platform API credential. When an eligible GPT Codex model is selected, the Composer also shows a conversation-scoped Fast Mode toggle and
|
|
13
|
+
`dsh-codex-connect` adds the `openai-codex` model catalog and a separate ChatGPT OAuth login. Models run through Harness's normal LLM service, so streaming, tool calls, reasoning replay, compaction, filesystem controls, permission gates, and approval prompts remain Harness-owned. It does not turn a ChatGPT subscription into an OpenAI Platform API credential. When an eligible GPT Codex model is selected, the Composer also shows a conversation-scoped Fast Mode toggle and compact server-reported quota bars.
|
|
14
14
|
|
|
15
15
|
Installation is additive. The bundle does not replace the current default model or search route. Standalone search, `view_image`, and image generation remain disabled until explicitly enabled.
|
|
16
16
|
|
|
@@ -18,30 +18,34 @@ The setup and image-result screenshots in this English guide are captured from t
|
|
|
18
18
|
|
|
19
19
|
## Quick start (about five minutes)
|
|
20
20
|
|
|
21
|
-
This quick start targets DSH `0.1.2-
|
|
21
|
+
This quick start targets DSH `0.1.2-rc.1` with Codex Connect Alpha 4.26. Check `dsh --version` first. For DSH `0.1.2-alpha.5`, `0.1.2-alpha.2`, `0.1.1-rc.2`, or `0.1.0-rc.7`, select the matching plugin version in [INSTALL.md](INSTALL.md). This guide uses the `web` profile; replace `web` with the name of the Harness profile you already use. From a DeepSeek Harness source checkout, prefix the commands with `pnpm`.
|
|
22
22
|
|
|
23
23
|
### 1. Install the plugin into one profile
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.
|
|
26
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.26
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
Expected result: the package is added to that profile. This does not change the profile's default model or global search route.
|
|
30
30
|
|
|
31
31
|
Use the exact version above to keep the verified DSH and plugin pair reproducible. `alpha` is a moving npm tag, not a compatibility guarantee.
|
|
32
32
|
|
|
33
|
-
### What's new in Alpha 4.
|
|
33
|
+
### What's new in Alpha 4.26
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
- Add verified compatibility with DSH `0.1.2-rc.1`, including an isolated install, profile composition, diagnostics, model-catalog, and disposal canary.
|
|
36
|
+
|
|
37
|
+
### Previously in Alpha 4.25
|
|
38
|
+
|
|
39
|
+
- Show the exact 5-hour and weekly quota windows returned by ChatGPT for the selected Codex model. Missing windows stay hidden, Spark remains separate, and plan names do not suppress server data.
|
|
40
|
+
- Separate verified compatibility from maintainer follow-up. The settings card no longer treats missing verification as a known runtime failure or recommends a plugin downgrade.
|
|
41
|
+
- Link users to the canonical tracker for their DSH version when one exists, with a prefilled compatibility-gap report as the safe fallback.
|
|
42
|
+
- Track every newer DSH candidate through one Canary issue with explicit preliminary, compatibility-failure, or infrastructure-blocked state. Canary success does not declare support or publish anything.
|
|
39
43
|
|
|
40
44
|
### Version updates
|
|
41
45
|
|
|
42
|
-
Codex Connect checks public package metadata and this repository's `verified-compatibility.json` periodically through the DSH Web server. The same card reads the locally loaded DSH package version, shows it beside the latest DSH version recorded by this project, and evaluates the exact installed plugin and DSH version pair. Local version detection uses package metadata already available to the plugin and does not require a DSH Core change.
|
|
46
|
+
Codex Connect checks public package metadata and this repository's `verified-compatibility.json` periodically through the DSH Web server. The same card reads the locally loaded DSH package version, shows it beside the latest DSH version recorded by this project, and evaluates the exact installed plugin and DSH version pair. Local version detection uses package metadata already available to the plugin and does not require a DSH Core change. The card's optional tracker lookup sends only that public DSH version to GitHub's public search API.
|
|
43
47
|
|
|
44
|
-
The compatibility record lists exact plugin and DSH versions rather than assuming every later release remains compatible. Maintainers can add a newly verified DSH version to the repository file without publishing another plugin release.
|
|
48
|
+
The compatibility record lists exact plugin and DSH versions rather than assuming every later release remains compatible. Maintainers can add a newly verified DSH version to the repository file without publishing another plugin release. The card keeps two decisions separate: its status describes only whether the installed pair or a specific upgrade path has been verified, while its GitHub action appears only when the installed latest-or-newer DSH has no verified published plugin. Missing verification never claims that a pair is known to fail. A green result means the installed pair was verified. Yellow recommends updating the plugin when the latest plugin matches the installed DSH, or updating DSH when the latest plugin matches the latest verified DSH. Red means Codex Connect has not caught up with the installed latest-or-newer DSH; it links to the canonical compatibility tracker when one exists, or offers a prefilled compatibility-gap report when the tracker lookup is unavailable or has no match. Gray means an older DSH version is not recorded or the public record could not be checked.
|
|
45
49
|
|
|
46
50
|
When a newer plugin version is available, a frame-wide DSH notice appears even if you switch conversations. It first shows the user-facing changes between your installed version and the newest version; technical release notes remain available as a secondary detail or from the release page. To update, copy the short request shown in the notice to the Agent you use for this DSH project. The Agent can inspect the project instructions and choose the appropriate install or update method; the plugin never runs an upgrade command itself.
|
|
47
51
|
|
|
@@ -65,7 +69,7 @@ Expected result: the Harness web UI opens for the selected profile.
|
|
|
65
69
|
|
|
66
70
|
### 3. Find the Openai-Codex account card
|
|
67
71
|
|
|
68
|
-
Open **Settings → Models** and find **Openai-Codex**. This is the primary Alpha 4.
|
|
72
|
+
Open **Settings → Models** and find **Openai-Codex**. This is the primary Alpha 4.25 account entry. If the profile does not expose the Models settings section, open **Settings → Plugins → Plugin configuration → Codex Connect** instead.
|
|
69
73
|
|
|
70
74
|
The Models card carries the attribution “Powered by the Codex Connect plugin.” and provides ChatGPT authorization, reauthorization, sign-out and quota. Both settings pages share one in-memory account state and polling owner. **More settings** opens the proxy, model visibility, search, image and context-budget configuration form in a dialog; the original Plugin settings entry remains available. Both entries save to the same settings scope. Close or Escape discards unsaved dialog edits. The Models footer is optional: profiles without that settings section retain the existing Plugin entry.
|
|
71
75
|
|
|
@@ -136,11 +140,11 @@ Expected result: `status --json` reports `signed-in` and exits `0`, while `docto
|
|
|
136
140
|
The two small controls are shown only when the current conversation is using a GPT model from the `openai-codex` provider. They are session controls, not profile-wide settings:
|
|
137
141
|
|
|
138
142
|
- **Fast Mode (lightning icon)** is off by default for each conversation. Click it to request the faster `1.5×` mode; click it again to return to Standard speed. The control is bound to that conversation and does not change the selected model or other conversations. Hover or focus the icon to see the current state and its quota-consumption warning.
|
|
139
|
-
- **
|
|
140
|
-
- For the exact `gpt-5.3-codex-spark` model, the Composer reads the Spark
|
|
143
|
+
- **Quota bars** are the compact `5h` and `7d` rows beside the model selector. Each row appears only when the server returns that window for the current model bucket. Their colors move from green through yellow/orange to red as the remaining amount falls. Hover or focus the control to see each exact remaining percentage and server-provided reset time. It is hidden for non-GPT models or when no recognized usage window is available.
|
|
144
|
+
- For the exact `gpt-5.3-codex-spark` model, the Composer reads the separate Spark bucket. Other GPT Codex models read the standard Codex bucket. The plugin does not infer quota windows from the ChatGPT plan name.
|
|
141
145
|
|
|
142
146
|
<p align="center">
|
|
143
|
-
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/composer-capabilities.jpg" alt="DeepSeek Harness Composer with the per-conversation Fast Mode lightning control and
|
|
147
|
+
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/composer-capabilities.jpg" alt="DeepSeek Harness Composer with the per-conversation Fast Mode lightning control and quota bars" width="820">
|
|
144
148
|
</p>
|
|
145
149
|
|
|
146
150
|
## Optional capabilities (off by default)
|
|
@@ -200,10 +204,10 @@ The detailed image prompt is authored by the selected GPT model. Codex Connect d
|
|
|
200
204
|
|
|
201
205
|
After sign-in, the Codex Connect settings card can show several server-reported windows. They are separate buckets, not three views of one number:
|
|
202
206
|
|
|
203
|
-
-
|
|
204
|
-
-
|
|
207
|
+
- The standard **Codex** bucket can contain a **5-hour** window, a **Weekly** window, or both.
|
|
208
|
+
- The exact Spark model uses the separate **GPT-5.3-Codex-Spark** bucket and displays whichever windows that bucket returns.
|
|
205
209
|
|
|
206
|
-
Each bar shows the remaining percentage and its local reset time. OpenAI controls the returned windows, eligibility, and reset values;
|
|
210
|
+
Each bar shows the remaining percentage and its local reset time. OpenAI controls the returned windows, eligibility, and reset values; Codex Connect does not remove a returned window based on the plan name or invent a missing one.
|
|
207
211
|
|
|
208
212
|
### Change a default model or global search route separately
|
|
209
213
|
|
|
@@ -322,7 +326,7 @@ The command sends one fixed, synthetic no-op to the hidden reviewer through the
|
|
|
322
326
|
|
|
323
327
|
## Compatibility and security boundary
|
|
324
328
|
|
|
325
|
-
- Alpha 4.
|
|
329
|
+
- Alpha 4.26 is verified with DSH plugin API packages `0.1.2-rc.1`, `@earendil-works/pi-ai` `^0.84.2`, and Node.js `^22.19.0 || >=24.0.0`. Alpha 4.25 remains the verified choice for DSH `0.1.2-alpha.5`, Alpha 4.23 remains the verified choice for DSH `0.1.2-alpha.2`, and Alpha 4.21 remains verified with DSH `0.1.1-rc.2` and pi-ai `0.82.1`. [verified-compatibility.json](verified-compatibility.json) records the exact pairs; see [INSTALL.md](INSTALL.md) for installation commands.
|
|
326
330
|
- The new DSH client splits its former runtime into Session Controller, Settings, Store, and Renderer packages. Codex Connect uses those public interfaces for settings and image actions. DSH owns normalized preview encoding and dimensions; Codex Connect retains the exact original image separately.
|
|
327
331
|
- Upgrade the DSH plugin API packages and `@earendil-works/pi-ai` as one group, then run `dsh-codex-connect doctor --json` and the compatibility check again. This contract does not make claims about future versions.
|
|
328
332
|
- When the daily upstream check finds a new `latest` or `next` DSH candidate, it installs Codex Connect into an isolated profile, boots the installed model runtime without OAuth credentials, verifies model and reasoning-effort discovery, and confirms provider disposal. Live sign-in, quota, and model requests still require manual validation in the test profile.
|
package/compatibility.json
CHANGED
package/docs/README.zh.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/zh/hero.jpg" alt="Codex Connect — 通过 ChatGPT OAuth 连接 DeepSeek Harness" width="100%">
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
|
-
`dsh-codex-connect` 提供 `openai-codex` 模型目录和独立的 ChatGPT OAuth 登录。模型仍走 Harness 标准 LLM 服务,因此流式输出、工具调用、reasoning replay、压缩、文件系统控制、权限门禁和审批提示仍由 Harness 负责。ChatGPT 订阅不会因此变成 OpenAI Platform API 凭据。选择符合条件的 GPT Codex 模型后,Composer 还会显示按对话绑定的 Fast Mode
|
|
13
|
+
`dsh-codex-connect` 提供 `openai-codex` 模型目录和独立的 ChatGPT OAuth 登录。模型仍走 Harness 标准 LLM 服务,因此流式输出、工具调用、reasoning replay、压缩、文件系统控制、权限门禁和审批提示仍由 Harness 负责。ChatGPT 订阅不会因此变成 OpenAI Platform API 凭据。选择符合条件的 GPT Codex 模型后,Composer 还会显示按对话绑定的 Fast Mode 开关和服务端返回的紧凑额度条。
|
|
14
14
|
|
|
15
15
|
安装是增量的:bundle 不会替换当前主模型或搜索路由;独立搜索、`view_image` 和图片生成也默认关闭,必须显式开启。
|
|
16
16
|
|
|
@@ -18,30 +18,34 @@
|
|
|
18
18
|
|
|
19
19
|
## 五分钟快速开始
|
|
20
20
|
|
|
21
|
-
本快速指南适用于 DSH `0.1.2-
|
|
21
|
+
本快速指南适用于 DSH `0.1.2-rc.1` 与 Codex Connect Alpha 4.26。请先运行 `dsh --version`。如果使用 DSH `0.1.2-alpha.5`、`0.1.2-alpha.2`、`0.1.1-rc.2` 或 `0.1.0-rc.7`,请在 [INSTALL.md](../INSTALL.md) 中选择匹配的插件版本。本指南使用 `web` profile;请把 `web` 替换成你已经在用的 Harness profile 名称。如果在 DeepSeek Harness 源码 checkout 中运行,请在命令前加 `pnpm`。
|
|
22
22
|
|
|
23
23
|
### 1. 将插件装入一个 profile
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.
|
|
26
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.26
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
预期结果:包被加入该 profile。这个动作不会更改 profile 的默认模型或全局搜索路由。
|
|
30
30
|
|
|
31
31
|
请使用上面的精确版本,确保已验证的 DSH 与插件组合可以复现。`alpha` 是会移动的 npm 标签,不是兼容性保证。
|
|
32
32
|
|
|
33
|
-
### Alpha 4.
|
|
33
|
+
### Alpha 4.26 更新内容
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
- 新增对 DSH `0.1.2-rc.1` 的已验证兼容性,覆盖隔离安装、profile 组合、诊断、模型目录和卸载清理 canary。
|
|
36
|
+
|
|
37
|
+
### Alpha 4.25 既有内容
|
|
38
|
+
|
|
39
|
+
- 显示 ChatGPT 为当前 Codex 模型实际返回的 5 小时和每周额度窗口。缺少的窗口不会凭空出现,Spark 额度保持独立,也不会因套餐名称而隐藏服务端数据。
|
|
40
|
+
- 将“当前组合是否已验证”和“是否需要提醒维护者”分开判断。缺少验证记录不再被说成已知运行失败,也不会建议降级插件。
|
|
41
|
+
- 如果已经有当前 DSH 版本的统一跟进 Issue,设置卡片会直接链接过去;否则提供预填的兼容性缺口反馈。
|
|
42
|
+
- 每个更高版本的 DSH 候选只维护一个 Canary 跟进 Issue,明确区分等待完整验证、兼容性失败和基础设施阻塞。Canary 成功不会自动声明兼容或发布版本。
|
|
39
43
|
|
|
40
44
|
### 版本更新提醒
|
|
41
45
|
|
|
42
|
-
Codex Connect 会通过 DSH Web 服务定期检查公开的 npm 包信息,以及本仓库维护的 `verified-compatibility.json`。同一张卡片会读取本机实际加载的 DSH 软件包版本,与本项目记录的最新 DSH 版本并列显示,并对当前安装的插件版本和 DSH 版本这一组精确组合进行判断。本机版本检测只使用插件已经能够取得的软件包元数据,不要求 DSH Core
|
|
46
|
+
Codex Connect 会通过 DSH Web 服务定期检查公开的 npm 包信息,以及本仓库维护的 `verified-compatibility.json`。同一张卡片会读取本机实际加载的 DSH 软件包版本,与本项目记录的最新 DSH 版本并列显示,并对当前安装的插件版本和 DSH 版本这一组精确组合进行判断。本机版本检测只使用插件已经能够取得的软件包元数据,不要求 DSH Core 作出任何修改。卡片仅在需要兼容性跟进时查询 Issue,并且只向 GitHub 公开搜索 API 发送这个公开的 DSH 版本号。卡片将两项判断分开:状态只说明当前精确组合或明确升级路径是否已验证;只有当前安装的 DSH 等于或新于记录中的最新版、且尚无任何已验证的已发布插件时,才显示 GitHub 跟进操作。缺少验证记录不代表该组合已知不可运行。
|
|
43
47
|
|
|
44
|
-
兼容性清单按插件版本和 DSH 版本精确记录,不假设后续版本天然兼容。维护者确认新的 DSH
|
|
48
|
+
兼容性清单按插件版本和 DSH 版本精确记录,不假设后续版本天然兼容。维护者确认新的 DSH 版本后,只需更新仓库文件,不必重新发布插件。绿色表示当前安装组合已经通过验证。黄色状态下,如果最新插件适配当前 DSH,就建议升级插件;如果最新插件适配最新 DSH,就建议升级 DSH。红色表示当前 DSH 已达到或超过清单记录的最新版,但最新发布的插件仍未完成验证;如果已有该版本的统一兼容性跟进 Issue,卡片会直接链接过去,如果查询失败或没有匹配项,则提供预填的兼容性缺口反馈。灰色表示较早的 DSH 版本未被记录,或暂时无法检查公开清单。
|
|
45
49
|
|
|
46
50
|
发现插件新版本后,即使你切换了对话,DSH 界面也会显示全局更新提醒。提醒会先展示从你当前版本到最新版本之间对用户有用的功能;完整技术发布说明放在次级详情或发布页面中。插件不会自动执行升级命令。
|
|
47
51
|
|
|
@@ -67,7 +71,7 @@ dsh web
|
|
|
67
71
|
|
|
68
72
|
### 3. 找到 Openai-Codex 账户卡
|
|
69
73
|
|
|
70
|
-
打开 **设置 → 模型**,找到 **Openai-Codex**。这是 Alpha 4.
|
|
74
|
+
打开 **设置 → 模型**,找到 **Openai-Codex**。这是 Alpha 4.25 的主要账户入口。如果当前 profile 没有模型设置分区,请改用 **设置 → 插件 → 插件配置 → Codex Connect**。
|
|
71
75
|
|
|
72
76
|
模型页账户卡标注“由 Codex Connect 插件提供支持。”,用于 ChatGPT 授权、重新授权、退出和查看额度。两个设置页面共用同一份内存账户状态及轮询。**更多设置** 会在弹窗中打开代理、模型显示、搜索、图片和上下文预算配置表单,原插件设置入口仍保留。两处保存到同一份配置;关闭弹窗或按 Escape 会放弃弹窗内未保存的修改。模型页底部入口是可选增强:没有该设置分区的 profile 仍保留原插件入口。
|
|
73
77
|
|
|
@@ -138,11 +142,11 @@ dsh plugin --profile web exec dsh-codex-connect doctor --json
|
|
|
138
142
|
只有当前对话选择了 `openai-codex` 提供方的 GPT 模型时,Composer 才会显示下面两个小控件。它们都是当前对话级别的控制,不是 profile 全局设置:
|
|
139
143
|
|
|
140
144
|
- **Fast Mode(闪电图标)**:每个对话默认关闭。点击后请求更快的 `1.5 倍` 模式,再点一次恢复标准速度。它只绑定当前对话,不会改变模型选择,也不会影响其他对话。鼠标悬停或键盘聚焦闪电图标,可以看到当前状态和额度消耗提示。
|
|
141
|
-
-
|
|
142
|
-
- 对于精确模型 `gpt-5.3-codex-spark`,Composer
|
|
145
|
+
- **额度进度条**:位于模型选择器旁边,以紧凑的 `5h` 和 `7d` 行显示。只有服务端为当前模型额度桶返回对应窗口时,该行才会出现。剩余额度越低,颜色会从绿色经过黄色/橙色变为红色。鼠标悬停或键盘聚焦时,会显示每个窗口的精确剩余百分比和服务端提供的重置时间。非 GPT 模型或没有可识别额度窗口时不会显示。
|
|
146
|
+
- 对于精确模型 `gpt-5.3-codex-spark`,Composer 读取独立的 Spark 额度桶;其他 GPT Codex 模型读取标准 Codex 额度桶。插件不会根据 ChatGPT 套餐名称猜测额度窗口。
|
|
143
147
|
|
|
144
148
|
<p align="center">
|
|
145
|
-
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/composer-capabilities.jpg" alt="DeepSeek Harness Composer 中按对话绑定的 Fast Mode
|
|
149
|
+
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/composer-capabilities.jpg" alt="DeepSeek Harness Composer 中按对话绑定的 Fast Mode 闪电控件和额度进度条" width="820">
|
|
146
150
|
</p>
|
|
147
151
|
|
|
148
152
|
## 可选能力(默认关闭)
|
|
@@ -202,10 +206,10 @@ Codex Connect 默认使用**直连**。代理是可选项,只作用于本插
|
|
|
202
206
|
|
|
203
207
|
登录后,Codex Connect 设置卡片可能显示多个服务端额度窗口。它们是不同的额度桶,不是同一个数字重复显示:
|
|
204
208
|
|
|
205
|
-
- **Codex
|
|
206
|
-
-
|
|
209
|
+
- 标准 **Codex** 额度桶可能包含 **5 小时额度**、**每周额度**,或者同时包含两者。
|
|
210
|
+
- 精确 Spark 模型使用独立的 **GPT-5.3-Codex-Spark** 额度桶,并显示该额度桶实际返回的窗口。
|
|
207
211
|
|
|
208
|
-
每条进度条都会显示剩余百分比和按本地时区格式化的重置时间。额度窗口、模型资格和重置时间由 OpenAI
|
|
212
|
+
每条进度条都会显示剩余百分比和按本地时区格式化的重置时间。额度窗口、模型资格和重置时间由 OpenAI 返回;Codex Connect 不会根据套餐名称删除已返回的窗口,也不会虚构缺失窗口。
|
|
209
213
|
|
|
210
214
|
### 单独更改默认模型或全局搜索路由
|
|
211
215
|
|
|
@@ -324,7 +328,7 @@ dsh plugin --profile web exec dsh-codex-connect auto-review-probe --json
|
|
|
324
328
|
|
|
325
329
|
## 兼容性与安全边界
|
|
326
330
|
|
|
327
|
-
- Alpha 4.
|
|
331
|
+
- Alpha 4.26 已与 DSH 插件 API packages `0.1.2-rc.1`、`@earendil-works/pi-ai` `^0.84.2` 和 Node.js `^22.19.0 || >=24.0.0` 完成验证。Alpha 4.25 仍是 DSH `0.1.2-alpha.5` 的已验证选择;Alpha 4.23 仍是 DSH `0.1.2-alpha.2` 的已验证选择;Alpha 4.21 仍与 DSH `0.1.1-rc.2` 和 pi-ai `0.82.1` 保持已验证状态。[verified-compatibility.json](../verified-compatibility.json) 记录精确组合;安装命令见 [INSTALL.md](../INSTALL.md)。
|
|
328
332
|
- 新版 DSH 将原来的 client runtime 拆分为 Session Controller、Settings、Store 和 Renderer 包。Codex Connect 通过这些公开接口接入设置和图片操作。规范化预览的编码与尺寸由 DSH 决定;Codex Connect 另行保留字节完全一致的原图。
|
|
329
333
|
- 升级时请将 DSH 插件 API packages 与 `@earendil-works/pi-ai` 作为一组升级,再运行 `dsh-codex-connect doctor --json` 和兼容性检查。本契约不对未来版本作判断。
|
|
330
334
|
- 每日上游检查发现新的 DSH `latest` 或 `next` 候选版本时,会把 Codex Connect 安装到隔离 Profile 中,在没有 OAuth 凭据的情况下启动已安装的模型运行时,验证模型与推理强度发现,并确认提供方可被正确卸载。真实登录、额度和模型请求仍需在测试 Profile 中人工验证。
|
package/docs/design.i18n.yaml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
# Bilingual-pair consistency record for the design document. Re-record with:
|
|
2
2
|
# git hash-object docs/design.md docs/design.zh.md
|
|
3
|
-
design.md:
|
|
4
|
-
design.zh.md:
|
|
3
|
+
design.md: 6a633995a2ca0261f6c01f2b17710bf64dca87c7
|
|
4
|
+
design.zh.md: 6bf9359f089f52ef6b8e821f9a9aeab784e020bd
|
package/docs/design.md
CHANGED
|
@@ -10,7 +10,9 @@ The Host registers `llm-openai-codex` as the plugin-owned capability settings na
|
|
|
10
10
|
|
|
11
11
|
## OAuth persistence
|
|
12
12
|
|
|
13
|
-
The plugin uses `$DSH_HOME/.openai-codex-auth.json`, separate from Codex CLI/Desktop state.
|
|
13
|
+
The plugin uses `$DSH_HOME/.openai-codex-auth.json`, separate from Codex CLI/Desktop state. Format version 2 stores at most 16 OAuth accounts and names exactly one active account. Existing version-1 documents remain readable and migrate on the first credential mutation; that migration first creates the owner-only `.openai-codex-auth.json.v1-backup` rollback copy. A pre-existing rollback copy must be owner-only and match the current version-1 document or migration stops before replacing the main document. Removing any account or signing out deletes the rollback copy so removed credentials do not persist there. Documents are limited to 512 KiB. POSIX reads reject group/world-accessible files, non-regular files are rejected, writes are atomic, and mutations use the Harness cross-process file lock. Callers receive cloned credentials.
|
|
14
|
+
|
|
15
|
+
Browser account routes expose deterministic plugin-derived keys, local display labels, masked email addresses when present in the OAuth token, and active state. They never expose the provider's account id or token fields. Activation and deletion are serialized with browser OAuth. After OAuth resolution, quota, image-generation, and Auto-review requests resolve the account id stored with that exact access token, so a concurrent account switch cannot combine credentials from different accounts. Deleting the active account while another remains requires the caller to name the replacement; provider-global logout deletes every account. Browser-origin trust is a separate `$DSH_HOME/.openai-codex-trusted-origins.json` sidecar with `version: 1`, `mode: "allowlist"`, and exact normalized HTTP(S) origins; it never contains OAuth material and is changed only by the standalone CLI.
|
|
14
16
|
|
|
15
17
|
The settings routes and CLI reuse the existing OAuth path and route names for migration compatibility. Only an explicit login operation emits an authorization URL or code. Browser requests are accepted by default only from loopback; a remote request must use an exact effective HTTP(S) origin in the current sidecar, must not carry cross-site Fetch Metadata, and must match any supplied Origin exactly. The sidecar is re-read for every request, and unknown fields or modes fail closed. A login challenge accepts only credential-free HTTPS URLs and fails closed after 30 seconds or when the provider finishes without a URL; logout and disposal cancel pending waiters. Status responses are redacted. Doctor uses `lstat` metadata and never opens the document.
|
|
16
18
|
|
|
@@ -26,4 +28,4 @@ Before registration the plugin checks current provider ids. An existing `openai-
|
|
|
26
28
|
|
|
27
29
|
## Compatibility boundary
|
|
28
30
|
|
|
29
|
-
Alpha 4.
|
|
31
|
+
Alpha 4.26 pins Harness `0.1.2-rc.1` development dependencies and follows its pi-ai range `^0.84.2`. Supported Node.js remains `^22.19.0 || >=24.0.0`. The keyed `settings.plugin.item` integration remains, while client types come from their Session Controller, Settings, Store, and Renderer owners. The published compatibility record lists the exact Alpha 4.26 and DSH `0.1.2-rc.1` pair. Backend eligibility, quotas, models, service-side context capacity, and protocol details remain controlled upstream. Tests use temporary OAuth documents and mocked network responses; CI does not perform real authentication.
|
package/docs/design.zh.md
CHANGED
|
@@ -10,7 +10,9 @@ Host 将 `llm-openai-codex` 注册为插件自有的能力 settings namespace。
|
|
|
10
10
|
|
|
11
11
|
## OAuth 持久化
|
|
12
12
|
|
|
13
|
-
插件使用 `$DSH_HOME/.openai-codex-auth.json`,与 Codex CLI/Desktop
|
|
13
|
+
插件使用 `$DSH_HOME/.openai-codex-auth.json`,与 Codex CLI/Desktop 状态分离。格式 version 2 最多保存 16 个 OAuth 账户,并明确指定唯一当前账户。原 version 1 文件仍可读取,第一次修改凭据时才迁移;迁移前会先生成仅所有者可读的 `.openai-codex-auth.json.v1-backup` 回退副本。若该副本已存在,它必须仅所有者可读且与当前 version 1 文件一致,否则迁移会在替换主文件前停止。移除任一账户或执行退出登录时会删除该副本,避免已移除凭据继续留存。文档大小上限为 512 KiB。POSIX 上拒绝组/其他用户可读文件,也拒绝非普通文件;写入采用原子替换,所有修改使用 Harness 跨进程文件锁,返回给调用方的是凭据副本。
|
|
14
|
+
|
|
15
|
+
浏览器账户路由只返回插件派生的稳定键、本地显示名称、OAuth token 中存在邮箱时的脱敏地址以及当前账户状态,不返回 provider 原始 account id 或 token 字段。账户切换和删除与浏览器 OAuth 串行执行;OAuth 解析完成后,额度、图片生成和 Auto-review 请求会查找与该 access token 精确配套的 account id,因此并发切换账户不会混用两个账户的凭据。仍有其他账户时,删除当前账户必须由调用方明确指定接替账户;provider 级退出登录会删除全部账户。浏览器 origin 授权单独存放于 `$DSH_HOME/.openai-codex-trusted-origins.json`,格式为 `version: 1`、`mode: "allowlist"` 和规范化的精确 HTTP(S) origin;其中不含 OAuth 内容,且只能通过独立 CLI 修改。
|
|
14
16
|
|
|
15
17
|
为兼容迁移,设置页路由、OAuth 路径和 provider id 不改名。浏览器请求默认只允许 loopback;远程请求必须使用当前 sidecar 中的精确有效 HTTP(S) origin,不能带 cross-site Fetch Metadata,若带 Origin 还必须精确匹配。每次请求都会重新读取 sidecar;未知字段或错误 mode 会快速失败。登录挑战只接受不含凭据的 HTTPS 地址;30 秒内未得到地址、provider 已结束但没有地址、退出登录或插件卸载时,所有 waiter 都会被清理。只有显式登录会输出授权 URL 或代码;状态输出会脱敏。doctor 只用 `lstat` 检查元数据,不打开文件。
|
|
16
18
|
|
|
@@ -22,4 +24,4 @@ Host 将 `llm-openai-codex` 注册为插件自有的能力 settings namespace。
|
|
|
22
24
|
|
|
23
25
|
注册前检查现有 provider id;发现 `openai-codex` 已被占用时,给出旧 bundle 或手动 provider 配置的定向迁移提示。boot-free CLI doctor 只报告包/运行时版本、OAuth 路径元数据、能力默认值和安全提示。
|
|
24
26
|
|
|
25
|
-
Alpha 4.
|
|
27
|
+
Alpha 4.26 固定使用 Harness `0.1.2-rc.1` 开发依赖,并跟随其 pi-ai 版本范围 `^0.84.2`。Node.js 支持范围仍为 `^22.19.0 || >=24.0.0`。keyed `settings.plugin.item` 集成保持不变,客户端类型继续从 Session Controller、Settings、Store 和 Renderer 的所属包导入。已发布兼容性记录列出 Alpha 4.26 与 DSH `0.1.2-rc.1` 的精确组合。资格、额度、模型、服务端上下文容量和后端协议仍由上游控制。测试仅使用临时 OAuth 文档和模拟网络响应,CI 不执行真实认证。
|
package/lib/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { At as logoutOpenAICodex,
|
|
2
|
+
import { At as logoutOpenAICodex, H as DSH_PLUGIN_API_PACKAGES, Lt as OPENAI_CODEX_PROVIDER, Mt as openAICodexModelCatalog, N as CODEX_CONNECT_VERSION, Rt as OpenAICodexCredentialStore, Tt as normalizeTrustedOrigin, X as readInstalledPackageVersion, Y as evaluateCompatibility, c as migrateOpenAICodexSearchHistory, d as OPENAI_CODEX_BASE_URL, gt as normalizeOpenAICodexProxyUrl, j as diagnoseOpenAICodex, jt as openAICodexAuthStatus, kt as loginOpenAICodex, l as CODEX_AUTO_REVIEW_MODEL, u as probeCodexAutoReview, wt as OpenAICodexTrustedOriginsStore, zt as openAICodexAuthPath } from "./src-FSN1b9Tk.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { Agent, ProxyAgent, fetch } from "undici";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -208,7 +208,7 @@ var CodexCapabilityDiagnostics = class {
|
|
|
208
208
|
packageVersions: versions
|
|
209
209
|
});
|
|
210
210
|
const missing = Object.values(versions).some((value) => value === null) || !/^v?\d+\.\d+\.\d+$/u.test(versions["node"] ?? "");
|
|
211
|
-
const runtime = DSH_PLUGIN_API_PACKAGES.some((name) => versions[name] !== null && versions[name] !== "0.1.2-
|
|
211
|
+
const runtime = DSH_PLUGIN_API_PACKAGES.some((name) => versions[name] !== null && versions[name] !== "0.1.2-rc.1") || compatibility.status === "incompatible" ? result("rejected", "declared-version-mismatch", "Use DSH API 0.1.2-rc.1 and pi-ai ^0.84.2 together. DSH 0.1.0-rc.7 requires Codex Connect 0.1.0-alpha.4.14.") : missing || compatibility.status === "unknown" ? result("unknown", "version-metadata-unavailable", "Run this command from the plugin installation in the intended profile.") : result("supported", "declared-host-versions-match", "Host package versions satisfy the declared requirements; this is not a live profile or browser compatibility test.");
|
|
212
212
|
const model = this.deps.catalog().find((item) => item.id === request.model)?.id ?? null;
|
|
213
213
|
const unknownNetwork = result("unknown", "not-probed", "Run capabilities --model <catalog-id> --probe explicitly; this sends a fixed short request and may consume quota.");
|
|
214
214
|
const checks = {
|