dsh-codex-connect 0.1.0-alpha.4.37 → 0.1.0-alpha.4.39
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 +14 -10
- package/README.i18n.yaml +2 -2
- package/README.md +11 -5
- package/docs/README.zh.md +11 -5
- package/docs/agent-notes/adaptive-runtime-status.md +33 -1
- package/docs/design.md +8 -0
- package/docs/experiments/issue-219-diagnostics.md +49 -0
- package/docs/reference.i18n.yaml +2 -2
- package/docs/reference.md +3 -3
- package/docs/reference.zh.md +3 -3
- package/docs/release-notes/alpha-4.37.md +2 -2
- package/docs/release-notes/alpha-4.38.md +34 -0
- package/docs/release-notes/alpha-4.39.md +36 -0
- package/lib/bin.js +12 -8
- package/lib/client.js +20 -7
- package/lib/index.d.ts +63 -1
- package/lib/index.js +1 -1
- package/lib/{src-CceJ4VNv.js → src-lkjrFR_5.js} +854 -170
- package/package.json +1 -1
package/INSTALL.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Installation Runbook for CLI Agents
|
|
2
2
|
|
|
3
|
-
Published Alpha 4.
|
|
3
|
+
Published Alpha 4.38 is verified with DSH `0.1.2-rc.1` and pi-ai `0.84.4` within `^0.84.2`, and with each exact DSH `0.1.5-alpha.1`, `0.1.5-rc.1`, and `0.1.5-rc.2` model-runtime pairing using pi-ai `0.85.1`.
|
|
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
|
|
|
7
|
-
Channel snapshot on 2026-09-
|
|
7
|
+
Channel snapshot on 2026-09-20: npm `alpha` points to `0.1.0-alpha.4.38`; `latest` intentionally remains on `0.1.0-alpha.4.34`. Use the exact-version commands below for 4.38. Publishing an Alpha and promoting the default installation channel are separate actions.
|
|
8
8
|
|
|
9
9
|
## Safety requirements
|
|
10
10
|
|
|
@@ -25,15 +25,19 @@ Check `dsh --version` before changing the requested profile. Use `dsh --help` to
|
|
|
25
25
|
| `0.1.0-rc.7` | `0.1.0-alpha.4.14` |
|
|
26
26
|
| `0.1.1-rc.2` | `0.1.0-alpha.4.21` |
|
|
27
27
|
| `0.1.2-alpha.2` | `0.1.0-alpha.4.23` |
|
|
28
|
-
| `0.1.2-rc.1` | `0.1.0-alpha.4.
|
|
28
|
+
| `0.1.2-rc.1` | `0.1.0-alpha.4.38` |
|
|
29
29
|
| `0.1.2-alpha.5` | `0.1.0-alpha.4.25` |
|
|
30
|
-
| `0.1.5-alpha.1` | `0.1.0-alpha.4.
|
|
31
|
-
| `0.1.5-rc.1` | `0.1.0-alpha.4.
|
|
32
|
-
| `0.1.5-rc.2` | `0.1.0-alpha.4.
|
|
30
|
+
| `0.1.5-alpha.1` | `0.1.0-alpha.4.38` |
|
|
31
|
+
| `0.1.5-rc.1` | `0.1.0-alpha.4.38` |
|
|
32
|
+
| `0.1.5-rc.2` | `0.1.0-alpha.4.38` |
|
|
33
33
|
|
|
34
34
|
If your exact DSH version is unknown or not listed, preserve the installed host, report that the combination is unverified, and verify it before making installation changes. A missing record does not prove incompatibility, and the catalog's latest verified DSH version is not the latest upstream release. Do not recommend upgrading or downgrading DSH merely to match a row. Investigate any specific failure and seek verification of the installed combination. 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.
|
|
35
35
|
|
|
36
|
-
Alpha 4.
|
|
36
|
+
Alpha 4.38 requires one consistent DSH plugin API version: `0.1.2-rc.1` with `@earendil-works/pi-ai` `^0.84.2`, or one of `0.1.5-alpha.1`, `0.1.5-rc.1`, and `0.1.5-rc.2` with pi-ai `0.85.1`; Node.js remains `^22.19.0 || >=24.0.0`. Mixed host versions and other DSH/pi-ai combinations remain unverified. 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. Changing DSH is a separate operation requiring the user's explicit request; a plugin update request does not authorize it. The repository's `pnpm --silent run check:compatibility` remains a strict development/release dependency gate, not a recommendation to change a user's host.
|
|
37
|
+
|
|
38
|
+
The Alpha 4.38 recommendation follows successful exact-release main CI, 1012 local tests, 32 Chromium tests, and a four-host same-artifact installation matrix with 40 fresh native-compaction lifecycle processes. Independent post-publication download verified that npm's archive is byte-identical to the tested artifact and the release workflow's verified package; the Git tag resolves to the exact release commit. These are synthetic-provider installation/lifecycle checks, not new real-account acceptance or a newly exercised published-package upgrade. See [.github/ALPHA_438_PUBLICATION.md](.github/ALPHA_438_PUBLICATION.md). Native context management remains opt-in. The preview-only DSH checkpoint-retry patch is not installed by this plugin, and stock DSH 0.1.6-alpha.2 remains undeclared. A separate DSH 0.1.6-alpha.1 canary also passed with this artifact on macOS/Node 22.22.3; it does not broaden declared support or prove Windows/live-account recovery for #219.
|
|
39
|
+
|
|
40
|
+
Historical Alpha 4.35 evidence (not relabeled as 4.37):
|
|
37
41
|
|
|
38
42
|
The Alpha 4.35 rows reflect successful release-commit CI on Node 22.19.0 and 24.20.0 (840 tests each), 28 Chromium tests, Windows canary contracts, and the four-host installation/Reserve matrix. Independent post-publication checks installed the exact npm version on all four hosts, matched all 63 installed plugin files to the verified published archive, and exercised a 4.34-to-4.35 upgrade on rc.2. All eight advertised models resolved and prepared, defaults were unchanged, all optional capabilities remained disabled, and provider disposal and synthetic Reserve transitions passed. These checks are not fresh real OAuth, live Reserve/model/tool/image, or full Windows application acceptance. See [.github/ALPHA_435_RELEASE_READINESS.md](.github/ALPHA_435_RELEASE_READINESS.md) for publication, installation evidence, and limitations. 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).
|
|
39
43
|
|
|
@@ -60,10 +64,10 @@ Alpha 4.33 omits the `modelErrors` profile field required by RC model packages,
|
|
|
60
64
|
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.23
|
|
61
65
|
```
|
|
62
66
|
|
|
63
|
-
For DSH `0.1.2-rc.1`, `0.1.5-alpha.1`, `0.1.5-rc.1`, or `0.1.5-rc.2`, use Alpha 4.
|
|
67
|
+
For DSH `0.1.2-rc.1`, `0.1.5-alpha.1`, `0.1.5-rc.1`, or `0.1.5-rc.2`, use Alpha 4.38:
|
|
64
68
|
|
|
65
69
|
```sh
|
|
66
|
-
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.
|
|
70
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.38
|
|
67
71
|
```
|
|
68
72
|
|
|
69
73
|
For DSH `0.1.2-alpha.5`, use Alpha 4.25:
|
|
@@ -72,7 +76,7 @@ Alpha 4.33 omits the `modelErrors` profile field required by RC model packages,
|
|
|
72
76
|
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.25
|
|
73
77
|
```
|
|
74
78
|
|
|
75
|
-
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.
|
|
79
|
+
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.38'` only for the DSH `0.1.2-rc.1`, `0.1.5-alpha.1`, `0.1.5-rc.1`, or `0.1.5-rc.2` combinations.
|
|
76
80
|
|
|
77
81
|
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.
|
|
78
82
|
4. Run `dsh --profile web --dump-config` and require exactly one `llm-openai-codex` row loading `dsh-codex-connect`.
|
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: 1b0dd174f9f6cd5cde9034ce0931cdd7b2fda5b8
|
|
6
|
+
docs/README.zh.md: 302b9f4e768307b51ab1a6740ba95ee87599c7e4
|
package/README.md
CHANGED
|
@@ -16,17 +16,17 @@ This guide describes the published pairings below. Check `dsh --version` first a
|
|
|
16
16
|
|
|
17
17
|
| Requirement | Verified pairing |
|
|
18
18
|
|---|---|
|
|
19
|
-
| Codex Connect | `0.1.0-alpha.4.
|
|
19
|
+
| Codex Connect | `0.1.0-alpha.4.38` |
|
|
20
20
|
| DeepSeek Harness | `0.1.2-rc.1`, `0.1.5-alpha.1`, `0.1.5-rc.1`, or `0.1.5-rc.2` |
|
|
21
21
|
| Node.js | `^22.19.0 \|\| >=24.0.0` |
|
|
22
22
|
| Account | ChatGPT OAuth with access to the requested Codex model; availability is decided by OpenAI |
|
|
23
23
|
|
|
24
|
-
As of 2026-09-
|
|
24
|
+
As of 2026-09-20, npm `alpha` points to 4.38 while `latest` intentionally remains on 4.34. Use the exact version below for 4.38; this recommendation does not promote the default installation channel.
|
|
25
25
|
|
|
26
26
|
### 1. Install
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
|
-
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.
|
|
29
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.38
|
|
30
30
|
dsh web
|
|
31
31
|
```
|
|
32
32
|
|
|
@@ -56,7 +56,7 @@ dsh plugin --profile web exec dsh-codex-connect doctor --json
|
|
|
56
56
|
- **Accounts:** save up to 16 accounts on the DSH host and manually select the active account for subsequent requests. Account selection is not a per-session binding. Requests keep their captured account; the plugin does not rotate accounts or silently fail over.
|
|
57
57
|
- **Models and Astra support:** the currently verified DSH and plugin combination supports `gpt-6-astra`. The plugin supplies its missing model definition with Low, Medium, High, Xhigh, and Max reasoning levels; Default preserves the provider default. Saved Off/Minimal selections require an [explicit update](MIGRATION.md#astra-reasoning-selections). When the installed dependency catalog includes Astra, the plugin preserves its native metadata while retaining these five calibrated reasoning choices. A model appearing in the list does not mean the current account has permission to use it; overall compatibility with new dependency versions still requires separate verification.
|
|
58
58
|
- **Fast Mode:** request priority service for one conversation, off by default. Actual speed and quota consumption depend on the service; no fixed speed multiplier is guaranteed.
|
|
59
|
-
- **Quota:** show the server-returned `5h` and `7d` windows and reset times, normally refreshed every 60 seconds while signed in. Missing windows are not invented; Spark uses its separate quota bucket.
|
|
59
|
+
- **Quota:** show the server-returned `5h` and `7d` windows and reset times, normally refreshed every 60 seconds while signed in and the tab is visible; failures back off. Missing windows are not invented; Spark uses its separate quota bucket.
|
|
60
60
|
- **Plugin updates:** check for newer Codex Connect releases without installing anything or recommending changes to DSH. Host compatibility is available through explicit local diagnostics.
|
|
61
61
|
|
|
62
62
|
<p align="center">
|
|
@@ -78,7 +78,7 @@ All options below are off on a fresh installation. Edit them in **Settings → P
|
|
|
78
78
|
|
|
79
79
|
**Published experiment:** Alpha 4.35 includes Luna Reserve fallback, disabled by default. Real-account Reserve entry and recovery remain unverified; Alpha 4.34 does not include this feature.
|
|
80
80
|
|
|
81
|
-
With `enableReserveFallback: true`, the account UI and agent routing share one identity-bound quota state. Background refresh follows the returned quota windows; fresh state is reused across agent steps. The plugin enters `gpt-reserve` only with complete, non-FedRAMP account/user identity and backend Luna Reserve authorization, then restores the session's previous model and reasoning effort after confirmed ordinary-usage recovery. Reserve has its own allowance, is hidden from the model picker, and is not unlimited. The backend decides eligibility; reset times alone do not authorize a switch. This version supports known `gpt-5.6-luna` metadata only. See [Luna Reserve fallback](docs/reference.md#luna-reserve-fallback) for refresh, identity, and verification limits.
|
|
81
|
+
With `enableReserveFallback: true`, the account UI and agent routing share one identity-bound quota state. Background refresh follows the returned quota windows while recently in use; fresh state is reused across agent steps. Ordinary quota reads also share the cache, even with Reserve disabled. The plugin enters `gpt-reserve` only with complete, non-FedRAMP account/user identity and backend Luna Reserve authorization, then restores the session's previous model and reasoning effort after confirmed ordinary-usage recovery. Reserve has its own allowance, is hidden from the model picker, and is not unlimited. The backend decides eligibility; reset times alone do not authorize a switch. This version supports known `gpt-5.6-luna` metadata only. See [Luna Reserve fallback](docs/reference.md#luna-reserve-fallback) for refresh, identity, and verification limits.
|
|
82
82
|
|
|
83
83
|
Use the image generation capability included with your current GPT subscription. Generated originals are stored separately from attachment previews; disabling the capability or uninstalling the plugin does not delete them. See [Configuration and recovery](docs/reference.md#search-and-image-tools) for storage and access rules.
|
|
84
84
|
|
|
@@ -100,8 +100,14 @@ Subsequent Codex requests use the selected active account; conversations do not
|
|
|
100
100
|
|
|
101
101
|
### Why does a listed model fail?
|
|
102
102
|
|
|
103
|
+
Model HTTP/SSE failures include bounded, request-local diagnostic metadata after the existing error message. An `overloaded` message alone does not establish an account block. See [persistent-error diagnostics](docs/experiments/issue-219-diagnostics.md) for scope and reproduction.
|
|
104
|
+
|
|
103
105
|
Account permissions, plugin/host compatibility, and network conditions all affect availability. Access on another client does not guarantee this integration will work. OpenAI controls model access, quota, context capacity, and service behavior; catalog entries are not proof of entitlement.
|
|
104
106
|
|
|
107
|
+
### Does changing client headers prevent persistent authorization failures?
|
|
108
|
+
|
|
109
|
+
No such guarantee is established. Codex Connect is a third-party integration; it does not impersonate Codex Desktop or fabricate installation/attestation headers. The pi-ai model/OAuth route and auxiliary routes currently identify themselves differently. OpenAI's [App Server documentation](https://developers.openai.com/codex/app-server/) asks integrations to identify their own client with `clientInfo`; it does not establish acceptance rules for this plugin's direct backend calls. An `overloaded` message is not proof of a block. Capture the bounded error metadata and compare successful and failed windows before attributing the cause; share request IDs privately, never tokens or full session archives.
|
|
110
|
+
|
|
105
111
|
### Can I keep the original `dsh-codex` plugin installed?
|
|
106
112
|
|
|
107
113
|
Not in the same effective configuration: both register `openai-codex`. Follow [MIGRATION.md](MIGRATION.md); remove only the confirmed conflicting entry, not credentials or unrelated providers.
|
package/docs/README.zh.md
CHANGED
|
@@ -16,17 +16,17 @@ Codex Connect 为标准 Harness agent loop 添加 `openai-codex` 模型提供方
|
|
|
16
16
|
|
|
17
17
|
| 要求 | 已验证组合 |
|
|
18
18
|
|---|---|
|
|
19
|
-
| Codex Connect | `0.1.0-alpha.4.
|
|
19
|
+
| Codex Connect | `0.1.0-alpha.4.38` |
|
|
20
20
|
| DeepSeek Harness | `0.1.2-rc.1`、`0.1.5-alpha.1`、`0.1.5-rc.1` 或 `0.1.5-rc.2` |
|
|
21
21
|
| Node.js | `^22.19.0 \|\| >=24.0.0` |
|
|
22
22
|
| 账户 | 通过 ChatGPT OAuth 使用所请求的 Codex 模型;可用性由 OpenAI 决定 |
|
|
23
23
|
|
|
24
|
-
截至 2026-09-
|
|
24
|
+
截至 2026-09-20,npm `alpha` 指向 4.38,`latest` 则有意保留在 4.34。安装 4.38 请使用下方精确版本命令;文档推荐更新不代表默认安装渠道已提升。
|
|
25
25
|
|
|
26
26
|
### 1. 安装
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
|
-
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.
|
|
29
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.38
|
|
30
30
|
dsh web
|
|
31
31
|
```
|
|
32
32
|
|
|
@@ -56,7 +56,7 @@ dsh plugin --profile web exec dsh-codex-connect doctor --json
|
|
|
56
56
|
- **账户:**在 DSH 主机上保存最多 16 个账户,手动选择后续请求使用的活动账户,不按会话绑定。请求保持已固定的账户,插件不会自动轮换或静默故障切换。
|
|
57
57
|
- **模型与 Astra 支持:**当前已验证的 DSH 与插件组合已支持 `gpt-6-astra`。插件补充缺失的模型定义,提供 Low、Medium、High、Xhigh 和 Max 五档推理强度;Default 保持提供方默认值。已保存的 Off/Minimal 选择需要[明确更新](../MIGRATION.md#astra-reasoning-selections)。安装的依赖目录包含 Astra 时,插件保留其原生元数据,同时维持这五档已校准的推理选择。模型出现在列表中,不代表当前账户具有调用权限;新依赖版本的整体兼容性仍需单独验证。
|
|
58
58
|
- **Fast Mode:**为单个对话请求优先服务,默认关闭。实际速度和额度消耗取决于服务端,不保证固定提速倍数。
|
|
59
|
-
- **额度:**显示服务端返回的 `5h`、`7d`
|
|
59
|
+
- **额度:**显示服务端返回的 `5h`、`7d` 窗口及重置时间,已登录且标签页可见时通常每 60 秒刷新一次;失败后延长重试间隔。不虚构缺失窗口;Spark 使用独立额度桶。
|
|
60
60
|
- **插件更新:**检查 Codex Connect 新版本,不自动安装,也不建议更改 DSH。宿主兼容性信息通过主动运行的本地诊断查看。
|
|
61
61
|
|
|
62
62
|
<p align="center">
|
|
@@ -78,7 +78,7 @@ dsh plugin --profile web exec dsh-codex-connect doctor --json
|
|
|
78
78
|
|
|
79
79
|
**已发布的实验功能:** Alpha 4.35 包含 Luna Reserve 回退,仍默认关闭。真实账户进入 Reserve 及恢复普通模型的过程仍未验证;Alpha 4.34 不包含该功能。
|
|
80
80
|
|
|
81
|
-
启用 `enableReserveFallback: true` 后,账户 UI 和 agent
|
|
81
|
+
启用 `enableReserveFallback: true` 后,账户 UI 和 agent 路由共用一份绑定身份的额度状态,最近有使用需求时按服务端返回的额度窗口后台刷新;有效状态可跨 agent step 复用。普通额度读取也共用缓存,即使 Reserve 已关闭。只有身份完整、非 FedRAMP 且服务端授权时,插件才进入 `gpt-reserve`;普通额度确认恢复后,切回该会话先前的模型和推理强度。Reserve 有自己的额度,不出现在模型选择器中,也不是无限额度。资格由服务端决定,重置时间本身不授权切换。当前版本只支持已知的 `gpt-5.6-luna` 元数据。刷新、身份和验证限制见 [Luna Reserve 回退](reference.zh.md#luna-reserve-回退)。
|
|
82
82
|
|
|
83
83
|
使用你当前 GPT 订阅计划提供的图片生成能力。生成原文件与附件预览分开保存;关闭能力或卸载插件不会删除这些文件。存储和访问规则见[配置与恢复](reference.zh.md#搜索与图片工具)。
|
|
84
84
|
|
|
@@ -100,8 +100,14 @@ OAuth 凭据保存在运行 DSH 的主机上,由该主机用于向 OpenAI 认
|
|
|
100
100
|
|
|
101
101
|
### 为什么列表中的模型调用失败?
|
|
102
102
|
|
|
103
|
+
模型 HTTP/SSE 请求失败时,会在原错误消息后附加有界、仅属于该请求的诊断信息。单凭 `overloaded` 消息不能认定账户被封锁。范围与复现方式见[持续错误诊断](experiments/issue-219-diagnostics.md)。
|
|
104
|
+
|
|
103
105
|
账户权限、插件与宿主兼容性、网络条件都会影响可用性。其他客户端可以使用,不代表此集成一定可用。OpenAI 控制模型权限、额度、上下文容量和服务行为;目录条目不是账户权限证明。
|
|
104
106
|
|
|
107
|
+
### 修改客户端请求头就能避免持续授权失败吗?
|
|
108
|
+
|
|
109
|
+
目前没有这样的保证。Codex Connect 是第三方集成,不冒充 Codex Desktop,也不伪造安装标识或 attestation 请求头。pi-ai 模型/OAuth 路由与辅助路由目前采用不同的客户端身份。OpenAI 的 [App Server 文档](https://developers.openai.com/codex/app-server/)要求集成通过 `clientInfo` 标识自己的客户端,但这不能证明本插件直接调用后端接口的接受规则。`overloaded` 本身不是封锁证据。应保留有界诊断信息,对照成功和失败时段后再判断原因;请求 ID 仅私下提供,不公开 token 或完整会话归档。
|
|
110
|
+
|
|
105
111
|
### 可以保留原来的 `dsh-codex` 插件吗?
|
|
106
112
|
|
|
107
113
|
不能在同一份有效配置中并存:两者都会注册 `openai-codex`。请遵循 [MIGRATION.md](../MIGRATION.md),只移除已经确认冲突的条目,不删除凭据或无关提供方。
|
|
@@ -1,4 +1,36 @@
|
|
|
1
|
-
# Alpha 4.
|
|
1
|
+
# Alpha 4.39 preparation checkpoint — 2026-09-21
|
|
2
|
+
|
|
3
|
+
Remote main is `6ce8a37ca7c28640a43b9189b767e4f6212cea7e`, the normal merge of #227. Published Alpha `0.1.0-alpha.4.38` remains the current public recommendation while 4.39 is prepared; `latest` remains separately managed at 4.34. #227 centralizes authenticated `chatgpt.com/backend-api` request governance across Model/pi-ai, Search, quota, image generation, Auto-review and native compaction. It preserves pi-ai's model identity, uses honest plugin identity on plugin-owned direct routes, adds per-attempt correlation, bounded admission, cancellation/deadline composition, proxy lifetime and server-directed lane cooldown. It does not establish the unverified risk-control hypothesis from #219.
|
|
4
|
+
|
|
5
|
+
The second review of #227 found and fixed response-lifetime/cancellation leaks, cooldown admission races, queued deadline gaps, Request-signal propagation and authenticated redirect risks before merge. All eight exact-head GitHub checks passed on the corrected head. The overlapping #226 is now closed as superseded and must not be revived independently.
|
|
6
|
+
|
|
7
|
+
## Current Adaptive Runtime tracks
|
|
8
|
+
|
|
9
|
+
| Track | Current state | Next gate |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| Remember #65 / #196 | Native compaction mechanism is merged, released and default-off; bounded real A/B and preview evidence exist. | Real-provider durable restart/fork/fault/accounting/long-task acceptance remains broader than current synthetic and bounded live controls. |
|
|
12
|
+
| Think #220 → #221 → #222 → #224 | Four stacked draft PRs cover replay isolation, native admission/cancellation, four-host lifecycle, saved default-off opt-in and native UI controls. #167 is now historical/conflicting. | Rebase/replay the stack onto current main after #227, then verify authenticated Session-page transport and human experience before considering merge. |
|
|
13
|
+
| Split #199 → #200 | Draft design plus bounded read-only worker; exact-host and Chromium/Gateway/Conversation synthetic acceptance are substantial. | Human usefulness, persistent permission/budget reconstruction, restart/resume and real-task value remain unaccepted. |
|
|
14
|
+
|
|
15
|
+
The umbrella remains #195. Think/Split are not included in Alpha 4.39. Do not infer composability merely because Remember is already on main.
|
|
16
|
+
|
|
17
|
+
## Compatibility and open acceptance
|
|
18
|
+
|
|
19
|
+
Declared DSH hosts remain exactly `0.1.2-rc.1`, `0.1.5-alpha.1`, `0.1.5-rc.1`, and `0.1.5-rc.2`. #211 remains an upstream DSH 0.1.6-alpha.2 peer-resolution repair tracker; the proposed host-side repair was delivered to the upstream Discussion but is not a stock release. #207/#183 retain their separate broader acceptance scopes.
|
|
20
|
+
|
|
21
|
+
#219 remains open for the external reporter to confirm whether the original persistent overloaded condition recurs under comparable normal use. #215 remains primarily blocked on the reporter's missing local profile archive evidence. #194 waits for natural Luna Reserve eligibility rather than manufactured exhaustion. #208 remains an independent opt-in “new session Fast Mode default” enhancement.
|
|
22
|
+
|
|
23
|
+
Alpha 4.39 preparation is authorized through normal review/merge/OIDC publication. It must not change daily services, use live credentials/models, promote `latest`, or silently enable experimental defaults. Candidate verification and publication evidence belong in [.github/ALPHA_439_RELEASE_READINESS.md](../../.github/ALPHA_439_RELEASE_READINESS.md) and the eventual publication record.
|
|
24
|
+
|
|
25
|
+
The dated checkpoints below are historical and retain their original scope.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Alpha 4.37 published checkpoint — 2026-09-19
|
|
30
|
+
|
|
31
|
+
Alpha `0.1.0-alpha.4.37` was published from `5cbd0d330d12c81f0bf37515b65bc799e480aa78` through successful workflow `35439115133`. The npm archive equals the final tested artifact; the Git tag and published GitHub prerelease match the release commit. `alpha` is 4.37; `latest` remains 4.34. See [publication verification](../../.github/ALPHA_437_PUBLICATION.md). No service or default changed, and no new live-model request was made. The local DSH repair, Think and Split are not included.
|
|
32
|
+
|
|
33
|
+
## Historical preparation checkpoint — 2026-09-19
|
|
2
34
|
|
|
3
35
|
#216 was normally squash-merged at `525e01b6e1c2b7d23ba70e29510ef1fd31fb0168`; the merge tree equals the reviewed `1e05677` tree. Main CI `35436177342` passed. This branch prepares 0.1.0-alpha.4.37. The maintainer subsequently authorized publication through the normal candidate-review/main-CI/OIDC workflow on 2026-09-19; a prepared branch is not publication evidence. `latest`, running services and live model calls remain outside scope. See [release readiness](../../.github/ALPHA_437_RELEASE_READINESS.md) and [draft release notes](../release-notes/alpha-4.37.md).
|
|
4
36
|
|
package/docs/design.md
CHANGED
|
@@ -18,6 +18,14 @@ The settings routes and CLI reuse the existing OAuth path and route names for mi
|
|
|
18
18
|
|
|
19
19
|
Browser account and update requests have a 45-second deadline covering response headers and JSON bodies. A timed-out account mutation is not retried automatically: while the account view is observed, the browser reads server state again because the mutation may already have committed. Failed state reads retry after five seconds, including when no account is stored. Plugin disposal aborts browser waits without logging out the server account.
|
|
20
20
|
|
|
21
|
+
## Backend request governance
|
|
22
|
+
|
|
23
|
+
Authenticated runtime traffic to `https://chatgpt.com/backend-api/` passes through one plugin-owned request governor before network dispatch. The governor fail-closes on any other origin/path, composes caller and route deadlines, keeps the existing Codex-only proxy scope alive for the complete logical direct request or provider stream, assigns a fresh `x-client-request-id` to every HTTP attempt, and bounds one plugin instance to eight concurrent backend requests. Concurrency is counted per HTTP attempt, not during authentication; even parallel fetches within one logical operation share that limit. Requests queued behind that limit remain cancellable and within route deadlines. Cancelling unread/paused bodies, response-hook failures and scope disposal releases resources; scope disposal runs before other plugin teardown waits. URL/header inputs are snapshotted before queue waits and authenticated requests never automatically follow redirects. HTTP `429` or `503` responses with a valid `Retry-After` create a lane-local cooldown that is rechecked on admission, never occupies a network slot while waiting, and honors longer service delays using timer slices of at most 15 minutes; the governor does not invent an account-block verdict or replay a failed model turn. Route-specific protocol retries remain with their existing owners, such as pi-ai model retry semantics and native-compaction's bounded retry loop.
|
|
24
|
+
|
|
25
|
+
Direct plugin routes use the honest shared identity `originator: deepseek-harness` and `User-Agent: dsh-codex-connect`; Search, quota, image generation, Auto-review, and native compaction all use that policy. The pi-ai model route deliberately preserves pi-ai's provider identity rather than impersonating Codex CLI/Desktop, while still receiving the same attempt id, concurrency, proxy, cancellation, server-directed cooldown, and bounded HTTP diagnostic metadata. Native compaction travels through the provider fetch seam at runtime and therefore shares the model governor lane while retaining the direct-plugin identity on its own request. This split is explicit policy, not a claim about undocumented upstream risk controls.
|
|
26
|
+
|
|
27
|
+
Standalone capability/Auto-review probes reuse the same pure URL/header policy but keep their isolated one-shot dispatcher and deadline instead of depending on a running plugin governor. The proxy reachability probe is also a bootstrap exception because it tests the proxy primitive used by the governor itself. OAuth authorization/refresh and credential-free public image fetching are outside `backend-api` and keep their separate security boundaries. Browser calls to this plugin's own local HTTP routes are likewise not upstream backend traffic.
|
|
28
|
+
|
|
21
29
|
## Search and images
|
|
22
30
|
|
|
23
31
|
When `enableSearch: true`, the plugin registers its standalone search provider. It does not append a plugin-owned required-on-read Session event because an external package cannot guarantee that its `@deepseek-ai/dsh-session` module instance owns the Host persistence vocabulary; the standard web Tool call and result remain in the Session log. DSH `0.1.2-rc.1` does not expose the WebRuntime provider selection through its settings service, so the compatibility adapter verifies that release's runtime field, records the previous provider, and selects Codex only while the capability is active. Disable and disposal restore the recorded provider unless another owner has selected a newer route. An unsupported runtime fails activation instead of reporting a route change that did not occur. Search responses are mapped to Harness text and citation records.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Issue 219: persistent SSE failures and quota traffic
|
|
2
|
+
|
|
3
|
+
Implementation baseline: main commit e5772cd8a5c47f30b5ab14fe73d2901914348463 (alpha 4.37), 2026-09-20.
|
|
4
|
+
These changes are diagnostic and traffic-management fixes, not evidence that the reported authorization session was blocked or that an account-side problem has been resolved.
|
|
5
|
+
|
|
6
|
+
## Model request diagnostics
|
|
7
|
+
|
|
8
|
+
The adapter uses the provider's request-local fetch extension, not a global fetch patch or a modified pi-ai installation. It observes bounded complete SSE frames while forwarding the original bytes, response metadata, backpressure and cancellation. It does not retry or replay failed model turns.
|
|
9
|
+
|
|
10
|
+
Each HTTP attempt receives a fresh x-client-request-id. Session affinity and originator/User-Agent are unchanged. The final Harness error message receives a compact JSON diagnostic suffix only after Harness has classified the original error, so numeric request ids cannot change PI_AI_ERROR into AUTH/RATE_LIMIT. Concurrent turns do not share diagnostic state.
|
|
11
|
+
|
|
12
|
+
Fields are limited to HTTP status, locally generated attempt id, bounded server request ids, first SSE error event type, schema-shaped error code/type, and a finite HTTP Retry-After delay. Missing fields remain missing. Arbitrary event fields, full headers, tokens, account ids, generated content and raw payloads are not added to the suffix. A maximum 16 KiB decoded frame is observed; larger or malformed frames stop further SSE attribution for that response, preserving HTTP metadata without guessing at later frames; incomplete frames are not inferred. The original bytes sent to pi-ai are unchanged. Existing provider error text remains unchanged.
|
|
13
|
+
|
|
14
|
+
Coverage is the model adapter's HTTP/SSE route through a pi-ai version honoring the fetch extension. It does not add persisted history to doctor, infer blocked-vs-capacity from a message, change standalone Search/Image/Auto-review diagnostics, or instrument native compaction's separate direct fetch. WebSocket diagnostics are not claimed; the plugin's model profile uses SSE.
|
|
15
|
+
|
|
16
|
+
## Quota traffic
|
|
17
|
+
|
|
18
|
+
Ordinary quota reads now coalesce and cache even when Reserve is off. Cache keys bind the account and a hash of the exact access credential; no raw token is retained as a key. Renewed credentials do not inherit an old session's rejected snapshot. Configuration/account mutations and disposal still invalidate authority.
|
|
19
|
+
|
|
20
|
+
Successful ordinary snapshots last 60 seconds. Reserve retains its existing adaptive freshness requirements while in use, but its timer cannot renew its own activity lease. After two minutes without a foreground consumer it stops fetching. Expiry still revokes stale routing permits without a network request. Enabling Reserve remains explicit; none of these changes infer server authorization from elapsed time or a generic error.
|
|
21
|
+
|
|
22
|
+
Transient errors use 60/120/240/480/900-second backoff, positive jitter bounded to 10% (and a 900-second local ceiling), and any longer valid server Retry-After. A successful refresh resets the failure count. Authentication rejection and non-retryable 4xx failures latch for the current credential/state. Retry hints outside the timer range cannot become immediate timers.
|
|
23
|
+
|
|
24
|
+
The browser does not poll while hidden, does not overlap slow requests, and respects its existing cooldown when refocused. Both local network failures and server quotaError responses cause browser backoff. Foreground retry requests cannot bypass the backend's cached failure deadline. These caches are per plugin instance, not a cross-process rate limiter.
|
|
25
|
+
|
|
26
|
+
## Offline verification
|
|
27
|
+
|
|
28
|
+
Run from the working checkout:
|
|
29
|
+
|
|
30
|
+
~~~sh
|
|
31
|
+
pnpm exec vitest run tests/issue-219-diagnostics.spec.ts tests/issue-219-quota.client.spec.tsx tests/quota-state.spec.ts tests/openai-codex-quota-indicator.client.spec.tsx tests/usage.spec.ts tests/adapter.spec.ts tests/adapter-auth-boundary.spec.ts
|
|
32
|
+
pnpm run check
|
|
33
|
+
~~~
|
|
34
|
+
|
|
35
|
+
The targeted fixtures use synthetic credentials and mocked HTTP/SSE, including an actual pi-ai -> Harness adapter pass. They cover flat/nested/response.failed errors, request-id isolation, host classification, hooks, malformed/large/split frames, cancellation, visibility, ordinary-mode cache sharing, repeated errors, retry hints, reauthorization and idle expiry. They do not reproduce the reporter's 23-hour account condition or constitute Windows/live-account acceptance.
|
|
36
|
+
|
|
37
|
+
A follow-up review reproduced an expiry/foreground-refresh race introduced in 420ce42: when a foreground refresh starts at the old snapshot deadline before its already-queued timer fires, the timer could abort the replacement request using the old deadline. The timer now skips entries with a pending refresh; starting that refresh has already revoked the old snapshot. The regression test queues both operations at the same deadline and verifies that the old permit expires, the new request survives, and concurrent readers reuse its result. The test fails before the fix and passes after it; account invalidation and disposal still cancel pending work.
|
|
38
|
+
|
|
39
|
+
A second review reproduced incorrect attribution of an unread later error after malformed JSON, an oversized earlier error, or a completed empty response in one network chunk. Three real-adapter regressions fail on 0bc83ee and pass after stopping observation at an ambiguous or terminal boundary. HTTP request metadata remains available when SSE attribution stops.
|
|
40
|
+
|
|
41
|
+
When collecting future evidence, compare a failed request's timestamp, HTTP status, SSE code/type and server request id with its successful window. Share request ids privately with the service operator; never publish OAuth tokens, credential files, account ids or a complete session archive.
|
|
42
|
+
|
|
43
|
+
## Issue closure criteria
|
|
44
|
+
|
|
45
|
+
The release candidate is 0.1.0-alpha.4.38. Its client-side acceptance covers hidden-page suspension, ordinary cache/coalescing, failure backoff, renewed-credential isolation, bounded diagnostics and the expiry/attribution regressions. CI and synthetic fixtures cannot establish the cause or recovery of a 23-hour upstream failure. Do not auto-close #219 merely because this PR merges or the package publishes.
|
|
46
|
+
|
|
47
|
+
The reporter should confirm the exact installed plugin/DSH/pi-ai versions and whether normal use remains healthy through a comparable observation window. If it recurs, retain the timestamp, HTTP status, error code/type and request IDs from the new suffix; send request IDs privately to the service operator. Compare ordinary single-turn use with optional Search/Image/Reserve/Auto-review disabled, then re-enable only the needed routes one at a time. This is controlled diagnosis, not a high-volume stress test or a guarantee of recovery. Do not revoke all devices, delete credentials, rotate accounts, or rewrite the client identity automatically.
|
|
48
|
+
|
|
49
|
+
On 2026-09-20 a repository-scoped issue search for `overloaded` found #219 only. This is not a claim that no similar upstream report exists. Header classification, backend eligibility and account/session-level restrictions require evidence from the service operator; official-client binary strings are not a published backend contract.
|
package/docs/reference.i18n.yaml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
# Bilingual-pair consistency record for the operational reference. Re-record with:
|
|
2
2
|
# git hash-object docs/reference.md docs/reference.zh.md
|
|
3
|
-
docs/reference.md:
|
|
4
|
-
docs/reference.zh.md:
|
|
3
|
+
docs/reference.md: b6d177da34691432d0c39c27644ef4b083af0d2a
|
|
4
|
+
docs/reference.zh.md: 926b475eb378191b56b9de6c386b7a03a9292d30
|
package/docs/reference.md
CHANGED
|
@@ -28,7 +28,7 @@ An explicit OAuth `invalid_grant` rejection during refresh shows the reauthoriza
|
|
|
28
28
|
For GPT Codex conversations, the Composer shows Fast Mode and quota:
|
|
29
29
|
|
|
30
30
|
- **Fast Mode** requests priority service (`service_tier: 'priority'`) for that conversation only. It is off by default and does not change the model. Actual speed and quota consumption depend on the service; a fixed speed multiplier is not guaranteed.
|
|
31
|
-
- **Quota bars** normally refresh every 60 seconds while signed in and show only the `5h` and `7d` windows returned by the server, with the exact remaining percentage and reset time. `gpt-5.3-codex-spark` uses its separate Spark bucket. Codex Connect never invents missing windows or suppresses returned windows based on a plan name.
|
|
31
|
+
- **Quota bars** normally refresh every 60 seconds while signed in and the tab is visible (hidden tabs pause; failures back off) and show only the `5h` and `7d` windows returned by the server, with the exact remaining percentage and reset time. `gpt-5.3-codex-spark` uses its separate Spark bucket. Codex Connect never invents missing windows or suppresses returned windows based on a plan name.
|
|
32
32
|
|
|
33
33
|
<p align="center">
|
|
34
34
|
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/composer-capabilities.jpg" alt="Fast Mode and quota controls in the DeepSeek Harness Composer" width="820">
|
|
@@ -61,9 +61,9 @@ Direct connection is the default. An enabled credential-free HTTP(S) proxy appli
|
|
|
61
61
|
|
|
62
62
|
Published Alpha 4.35 includes this default-off experiment; Alpha 4.34 does not include it. Real-account Reserve entry and recovery remain unverified. See the [publication and installation evidence](../.github/ALPHA_435_RELEASE_READINESS.md).
|
|
63
63
|
|
|
64
|
-
`enableReserveFallback: true` opts agent requests into backend-authorized Luna Reserve fallback. The account UI and routing share an in-memory account/user-bound quota snapshot; concurrent reads coalesce and fresh reads do not issue another quota `GET`. A cold or stale read waits for refresh. After a successful fetch, background refresh runs at 60/30/15/5 seconds for usage below 75%, at least 75%, at least 90%, and at least 99%, using the highest consumption across ordinary and relevant model windows. Future reset times shorten the next refresh to reset plus one second; they never establish recovery. Cache reads do not postpone that deadline.
|
|
64
|
+
`enableReserveFallback: true` opts agent requests into backend-authorized Luna Reserve fallback. The account UI and routing share an in-memory account/user-bound quota snapshot; concurrent reads coalesce and fresh reads do not issue another quota `GET`. A cold or stale read waits for refresh. After a successful fetch, background refresh runs at 60/30/15/5 seconds for usage below 75%, at least 75%, at least 90%, and at least 99%, using the highest consumption across ordinary and relevant model windows. Future reset times shorten the next refresh to reset plus one second; they never establish recovery. Cache reads do not postpone that deadline. Transient failures discard cached decisions and use exponential backoff starting at 60 seconds, with up to 10% positive jitter and a 15-minute local cap; a longer valid `Retry-After` takes precedence. Authentication rejections and non-retryable 4xx errors stop automatic usage requests for that credential until credentials/state change. Delays beyond the timer range stop automatic retry rather than overflowing. Background GETs stop after two minutes without a foreground quota consumer; stale routing authority still expires. Account mutations, settings changes, and plugin disposal invalidate the state; UI receives only the public quota projection.
|
|
65
65
|
|
|
66
|
-
A valid shared decision issues a private one-shot permit for the next `gpt-reserve` dispatch in that session/account. This local dispatch guard is not a server-side per-call authorization requirement. Cancellation, replacement, an agent error, turn stopping, quota invalidation, snapshot refresh, or cache eviction revokes an unused permit. Return-target I/O rechecks that authority before restoring an ordinary model. Direct and auxiliary Reserve calls fail before a model request. With fallback disabled, ordinary agent steps do not query quota
|
|
66
|
+
A valid shared decision issues a private one-shot permit for the next `gpt-reserve` dispatch in that session/account. This local dispatch guard is not a server-side per-call authorization requirement. Cancellation, replacement, an agent error, turn stopping, quota invalidation, snapshot refresh, or cache eviction revokes an unused permit. Return-target I/O rechecks that authority before restoring an ordinary model. Direct and auxiliary Reserve calls fail before a model request. With fallback disabled, ordinary agent steps do not query quota and there is no background quota poller; account UI reads share a 60-second credential-bound cache, concurrent GET coalescing, and failure cooldowns. An already-Reserve session requires an explicitly selected ordinary model.
|
|
67
67
|
|
|
68
68
|
The access token must contain non-empty `chatgpt_account_id` and `chatgpt_user_id` (or `user_id`) claims under `https://api.openai.com/auth`, and `chatgpt_account_is_fedramp` must be absent or `false`. Missing, partial, FedRAMP, changed, or response-mismatched identity disables fallback for that step. The plugin does not guess identity from an email address or subscription plan.
|
|
69
69
|
|
package/docs/reference.zh.md
CHANGED
|
@@ -28,7 +28,7 @@ Codex 目录来自已安装的 `@earendil-works/pi-ai` 包,不是实时查询
|
|
|
28
28
|
GPT Codex 对话的 Composer 会显示 Fast Mode 与额度:
|
|
29
29
|
|
|
30
30
|
- **Fast Mode** 只为当前对话请求优先服务(`service_tier: 'priority'`)。默认关闭,也不会更换模型。实际速度和额度消耗取决于服务端,不保证固定提速倍数。
|
|
31
|
-
-
|
|
31
|
+
- **额度条**在已登录且标签页可见时通常每 60 秒刷新一次(隐藏时暂停,失败后延长重试间隔),只显示服务端实际返回的 `5h` 和 `7d` 窗口,并显示精确剩余百分比与重置时间。`gpt-5.3-codex-spark` 使用独立的 Spark 额度桶。Codex Connect 不会虚构缺失窗口,也不会根据套餐名称隐藏已返回窗口。
|
|
32
32
|
|
|
33
33
|
<p align="center">
|
|
34
34
|
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/composer-capabilities.jpg" alt="DeepSeek Harness Composer 中的 Fast Mode 与额度控件" width="820">
|
|
@@ -61,9 +61,9 @@ GPT Codex 对话的 Composer 会显示 Fast Mode 与额度:
|
|
|
61
61
|
|
|
62
62
|
已发布的 Alpha 4.35 包含这项默认关闭的实验功能;Alpha 4.34 不包含该功能。真实账户进入 Reserve 及恢复普通模型的过程仍未完成验证。详见[发布与安装验证记录](../.github/ALPHA_435_RELEASE_READINESS.md)。
|
|
63
63
|
|
|
64
|
-
`enableReserveFallback: true` 为 agent 请求启用由后端授权的 Luna Reserve 回退。账户 UI 和路由共用绑定账户与用户的内存额度快照;并发读取合并,有效状态不再发起额度 `GET`。首次或过期读取等待刷新。查询成功后,根据普通额度和相关模型窗口中的最高消耗,低于 75%、达到 75%、达到 90%、达到 99% 时,分别每 60/30/15/5
|
|
64
|
+
`enableReserveFallback: true` 为 agent 请求启用由后端授权的 Luna Reserve 回退。账户 UI 和路由共用绑定账户与用户的内存额度快照;并发读取合并,有效状态不再发起额度 `GET`。首次或过期读取等待刷新。查询成功后,根据普通额度和相关模型窗口中的最高消耗,低于 75%、达到 75%、达到 90%、达到 99% 时,分别每 60/30/15/5 秒后台刷新。未来重置时间可将下次刷新提前到重置后一秒,但不证明额度恢复。缓存读取不会推迟刷新期限。临时查询失败会清除缓存决策,并从 60 秒开始指数退避,附加最多 10% 的正向随机延迟,本地等待上限为 15 分钟;服务端有效的 `Retry-After` 更长时优先遵循。认证拒绝和不可重试的 4xx 错误会停止该凭据的自动额度请求,直到凭据或状态改变。超出定时器范围的延迟会停止自动重试,而不会溢出为立即重试。两分钟没有前台额度消费者后,后台停止发送 GET;过期的路由授权仍会失效。账户修改、设置变更和插件卸载会使状态失效;UI 只接收公开额度投影。
|
|
65
65
|
|
|
66
|
-
有效的共享决策为该会话和账户的下一次 `gpt-reserve` 调用签发私有一次性许可。这是本地调用保护,不代表服务端要求每次调用单独认证额度。取消、替换请求、agent 出错、回合停止、额度状态失效、快照刷新或缓存淘汰都会撤销未使用的许可。恢复普通模型前,返回记录的读取也会重新检查该授权是否有效。直接和辅助 Reserve 调用会在发送前失败。关闭回退时,普通 agent
|
|
66
|
+
有效的共享决策为该会话和账户的下一次 `gpt-reserve` 调用签发私有一次性许可。这是本地调用保护,不代表服务端要求每次调用单独认证额度。取消、替换请求、agent 出错、回合停止、额度状态失效、快照刷新或缓存淘汰都会撤销未使用的许可。恢复普通模型前,返回记录的读取也会重新检查该授权是否有效。直接和辅助 Reserve 调用会在发送前失败。关闭回退时,普通 agent 步骤不查询额度,也不创建后台额度轮询;账户 UI 读取共用绑定凭据的 60 秒缓存、并发 GET 合并与失败冷却;已处于 Reserve 的会话需要显式选择普通模型。
|
|
67
67
|
|
|
68
68
|
Access token 的 `https://api.openai.com/auth` 中必须包含非空的 `chatgpt_account_id` 和 `chatgpt_user_id`(或 `user_id`),且 `chatgpt_account_is_fedramp` 必须缺省或为 `false`。身份缺失、不完整、属于 FedRAMP、发生变化或与额度响应不匹配时,该步骤不会启用回退。插件不会从邮箱地址或订阅套餐推测身份。
|
|
69
69
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Codex Connect 0.1.0-alpha.4.37 —
|
|
1
|
+
# Codex Connect 0.1.0-alpha.4.37 — release notes
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Published on 2026-09-19.** [GitHub prerelease](https://github.com/franksong2702/dsh-codex-connect/releases/tag/v0.1.0-alpha.4.37); npm `alpha` points to 4.37 and `latest` remains 4.34. The [publication record](../../.github/ALPHA_437_PUBLICATION.md) verifies the immutable release commit and archive. This post-publication document update does not republish the package.
|
|
4
4
|
|
|
5
5
|
## Changes
|
|
6
6
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Alpha 4.38 — persistent-error diagnostics and quota traffic
|
|
2
|
+
|
|
3
|
+
## English
|
|
4
|
+
|
|
5
|
+
This release addresses confirmed client-side defects from #219, not a proven account-block cause or verified recovery of the reporter's 23-hour condition.
|
|
6
|
+
|
|
7
|
+
- Preserve bounded HTTP/SSE error code/type and request IDs through the model adapter, with a unique client ID per HTTP attempt. Append diagnostics after Harness classification; leave model retries and client identity unchanged. No raw payload, token or account ID is added to the diagnostic suffix.
|
|
8
|
+
- Pause quota polling in hidden pages; share and coalesce ordinary quota reads even when Reserve is disabled. Apply increasing failure backoff, valid server Retry-After hints, and credential-bound rejection state. Reserve background polling stops after two minutes without foreground demand.
|
|
9
|
+
- Fix expiry timers cancelling fresh requests and prevent unread later SSE errors from being attributed to earlier malformed/oversized/terminal frames.
|
|
10
|
+
|
|
11
|
+
Validated with 1012 local tests, 32 Chromium UI tests, both Node CI targets and a four-host identical-artifact installation matrix. A separate DSH 0.1.6-alpha.1 synthetic canary passed on macOS / Node 22.22.3; that is not full declared support or Windows/live-account acceptance.
|
|
12
|
+
|
|
13
|
+
For the four declared DSH versions (0.1.2-rc.1, 0.1.5-alpha.1, 0.1.5-rc.1, 0.1.5-rc.2), pin the exact plugin version after checking the installed host:
|
|
14
|
+
|
|
15
|
+
~~~sh
|
|
16
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.38
|
|
17
|
+
dsh plugin --profile web exec dsh-codex-connect doctor --json
|
|
18
|
+
~~~
|
|
19
|
+
|
|
20
|
+
Keep your current profile name and host version. npm alpha now points to 4.38; latest intentionally remains 4.34. No automatic OAuth, account rotation, first-party impersonation or service restart is part of this release.
|
|
21
|
+
|
|
22
|
+
npm processing delayed public availability beyond the original workflow's readback window. The recovery-only workflow completed the missing GitHub prerelease after exact archive verification; npm was not republished. The released tag and package identify commit `40dae54cac2561eb153cb217353a0b7345a43b8d`.
|
|
23
|
+
|
|
24
|
+
#219 remains open pending comparable normal-use verification or service-side evidence. If the failure recurs, retain the timestamp and bounded error fields; share request IDs privately with the service operator, never tokens or complete session archives.
|
|
25
|
+
|
|
26
|
+
## 中文
|
|
27
|
+
|
|
28
|
+
本版修复 #219 中已确认的客户端诊断与额度查询缺陷,不把 overloaded 文案当作封号证据,也不声称已验证原始持续故障恢复。
|
|
29
|
+
|
|
30
|
+
错误信息现在保留有界的 HTTP/SSE 错误码、类型和请求标识;每次 HTTP 尝试具有独立标识,且在 Harness 完成分类后追加诊断,避免误分类。不会在新增诊断中保存 token、账户 ID 或完整响应正文,也不修改客户端身份或增加模型请求重试。
|
|
31
|
+
|
|
32
|
+
隐藏页面暂停额度轮询,普通查询也共享缓存并合并并发请求;失败逐步退避并遵守 Retry-After。Reserve 在两分钟无人读取后停止后台查询。同时修复旧定时器误取消新请求、错误归因到未读取的后续 SSE 帧两处回归。
|
|
33
|
+
|
|
34
|
+
完整测试、浏览器测试、Node CI 和四个声明支持的 DSH 安装组合均通过。报告者所用 DSH 0.1.6-alpha.1 的额外模拟检查也通过,但不等于 Windows 实机或真实账户验收。请保留现有 DSH 和 profile,使用上方精确版本命令;本版不自动登录、切换账户或重启服务。#219 仍等待报告者确认同类正常使用下是否恢复。
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Alpha 4.39 — unified Codex backend request governance
|
|
2
|
+
|
|
3
|
+
## English
|
|
4
|
+
|
|
5
|
+
Alpha 4.39 delivers the backend-request architecture follow-up from #219 and merged PR #227. It centralizes authenticated `chatgpt.com/backend-api` traffic behind one plugin-owned governance layer without claiming that the reporter's persistent upstream condition was caused by request identity or traffic shape.
|
|
6
|
+
|
|
7
|
+
- Model/pi-ai, Search, quota, image generation, Auto-review, and native compaction now share request admission, cancellation/deadline composition, Codex-only proxy scope, per-attempt request correlation, and bounded response metadata.
|
|
8
|
+
- Direct plugin routes use the existing honest plugin identity; the model route preserves pi-ai's provider identity. The plugin does not impersonate Codex CLI/Desktop or invent undocumented first-party headers.
|
|
9
|
+
- Authenticated backend requests fail closed outside `https://chatgpt.com/backend-api/`, reject credential-bearing URLs, and do not automatically follow redirects.
|
|
10
|
+
- One plugin instance admits at most eight simultaneously open backend responses. Queue waits remain cancellable, cooldown waits do not consume a slot, and an already queued request rechecks cooldown before dispatch.
|
|
11
|
+
- HTTP 429/503 with valid Retry-After creates lane-local server-directed cooldown. The client does not infer an account block, truncate a longer service-directed deadline, or automatically replay failed model turns.
|
|
12
|
+
- Follow-up review hardened stream cancellation/body cleanup, queued deadlines, Request-signal propagation, redirect protection, and response cleanup when hooks fail.
|
|
13
|
+
|
|
14
|
+
Existing route-specific semantics remain in place: pi-ai owns ordinary model/SSE retries, quota keeps its credential-bound cache/backoff, native compaction keeps its bounded retry loop, and Search/Image/Auto-review do not gain automatic replay.
|
|
15
|
+
|
|
16
|
+
For a declared compatible DSH host, pin the exact version after checking the installed host:
|
|
17
|
+
|
|
18
|
+
~~~sh
|
|
19
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.39
|
|
20
|
+
dsh plugin --profile web exec dsh-codex-connect doctor --json
|
|
21
|
+
~~~
|
|
22
|
+
|
|
23
|
+
All optional capabilities remain disabled by default. This release does not close #219 or establish undocumented OpenAI risk-control behavior. It does not change OAuth credentials, daily services, or the separately managed `latest` npm channel.
|
|
24
|
+
|
|
25
|
+
## 中文
|
|
26
|
+
|
|
27
|
+
Alpha 4.39 交付 #219 暴露出的后续架构工作以及已合并的 #227:把经过认证的 `chatgpt.com/backend-api` 流量统一收敛到插件内部的一层请求治理中,但不把“请求身份/流量形态触发了上游风控”当作已经证实的因果关系。
|
|
28
|
+
|
|
29
|
+
- Model/pi-ai、Search、额度、图片生成、Auto-review 和 Native Compaction 共享请求准入、取消/超时组合、Codex 专用代理作用域、每次 HTTP 尝试的 request ID 与有界响应诊断。
|
|
30
|
+
- 插件直连路径使用一致且诚实的插件身份;模型路径继续保留 pi-ai 自己的 provider 身份,不伪装 Codex CLI/Desktop。
|
|
31
|
+
- 携带认证的请求只允许发送到 `https://chatgpt.com/backend-api/`,拒绝 URL 中嵌入凭据,也不会自动跟随重定向。
|
|
32
|
+
- 单个插件实例最多同时持有 8 个开放的后端响应;排队和冷却等待可以取消,冷却不占并发槽位,排队完成后会再次检查是否仍需冷却。
|
|
33
|
+
- 只有 HTTP 429/503 且服务端提供有效 Retry-After 时才建立对应 lane 的冷却;不会据此推断“账户被封”,不会缩短服务端要求的更长等待,也不会自动重放失败的模型请求。
|
|
34
|
+
- 合并前二次 review 进一步修复了流取消/响应体清理、排队超时、Request signal 传递、重定向保护以及诊断 hook 失败后的资源释放。
|
|
35
|
+
|
|
36
|
+
原有各路径的协议语义保持不变;所有可选能力仍默认关闭。这个版本不代表 #219 原始持续故障已经由报告者确认恢复,也不会修改 OAuth 凭据、日常服务或单独维护的 npm `latest` 渠道。
|
package/lib/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as DSH_PLUGIN_API_PACKAGES, B as isSupportedDshPluginApiVersion, Ft as
|
|
2
|
+
import { A as DSH_PLUGIN_API_PACKAGES, B as isSupportedDshPluginApiVersion, Ft as prepareOpenAICodexBackendHeaders, Gt as OpenAICodexCredentialStore, It as loginOpenAICodex, Kt as openAICodexAuthPath, Lt as logoutOpenAICodex, Pt as openAICodexModelCatalog, Rt as openAICodexAuthStatus, V as readInstalledPackageVersion, Wt as OPENAI_CODEX_PROVIDER, c as migrateOpenAICodexSearchHistory, d as OPENAI_CODEX_BASE_URL, jt as normalizeOpenAICodexProxyUrl, l as CODEX_AUTO_REVIEW_MODEL, nt as OpenAICodexTrustedOriginsStore, rt as normalizeTrustedOrigin, u as probeCodexAutoReview, x as CODEX_CONNECT_VERSION, y as diagnoseOpenAICodex, z as evaluateCompatibility, zt as publicAuthError } from "./src-lkjrFR_5.js";
|
|
3
3
|
import { i as fetch, r as ProxyAgent, t as Agent } from "./undici-runtime-H2uktiw6.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { realpathSync } from "node:fs";
|
|
@@ -55,18 +55,22 @@ async function probeCodexResponses(request, createDispatcher = (proxyUrl) => pro
|
|
|
55
55
|
const timer = setTimeout(() => controller.abort(), request.timeoutMs);
|
|
56
56
|
let httpStatus;
|
|
57
57
|
try {
|
|
58
|
+
const { headers } = prepareOpenAICodexBackendHeaders({
|
|
59
|
+
authorization: `Bearer ${request.access}`,
|
|
60
|
+
"chatgpt-account-id": request.accountId,
|
|
61
|
+
"content-type": "application/json",
|
|
62
|
+
accept: "text/event-stream"
|
|
63
|
+
}, "plugin");
|
|
64
|
+
const requestHeaders = {};
|
|
65
|
+
headers.forEach((value, key) => {
|
|
66
|
+
requestHeaders[key] = value;
|
|
67
|
+
});
|
|
58
68
|
const response = await fetch(`${OPENAI_CODEX_BASE_URL}/responses`, {
|
|
59
69
|
dispatcher,
|
|
60
70
|
method: "POST",
|
|
61
71
|
redirect: "manual",
|
|
62
72
|
signal: controller.signal,
|
|
63
|
-
headers:
|
|
64
|
-
authorization: `Bearer ${request.access}`,
|
|
65
|
-
"chatgpt-account-id": request.accountId,
|
|
66
|
-
"content-type": "application/json",
|
|
67
|
-
accept: "text/event-stream",
|
|
68
|
-
originator: "deepseek-harness"
|
|
69
|
-
},
|
|
73
|
+
headers: requestHeaders,
|
|
70
74
|
body: JSON.stringify({
|
|
71
75
|
model: request.model,
|
|
72
76
|
instructions: "You are a connectivity diagnostic. Reply with only ok.",
|
package/lib/client.js
CHANGED
|
@@ -4244,7 +4244,7 @@ window.__ModuleLoader__.load({
|
|
|
4244
4244
|
return typeof remainingPercent === "number" && Number.isFinite(remainingPercent) && remainingPercent >= 0 && remainingPercent <= 100 && typeof windowSeconds === "number" && Number.isSafeInteger(windowSeconds) && windowSeconds > 0 && (resetAt === void 0 || typeof resetAt === "number" && Number.isSafeInteger(resetAt) && resetAt > 0 && Number.isFinite((/* @__PURE__ */ new Date(resetAt * 1e3)).getTime()));
|
|
4245
4245
|
}
|
|
4246
4246
|
function usageFromStatus(value) {
|
|
4247
|
-
if (!isRecord$1(value) || value["status"] !== "signed-in") return void 0;
|
|
4247
|
+
if (!isRecord$1(value) || value["status"] !== "signed-in" || typeof value["quotaError"] === "string") return void 0;
|
|
4248
4248
|
const usage = value["usage"];
|
|
4249
4249
|
if (!isRecord$1(usage) || !Array.isArray(usage["rateLimits"])) return void 0;
|
|
4250
4250
|
const rateLimits = usage["rateLimits"];
|
|
@@ -4308,8 +4308,18 @@ window.__ModuleLoader__.load({
|
|
|
4308
4308
|
const controller = new AbortController();
|
|
4309
4309
|
let inFlight = false;
|
|
4310
4310
|
let disposed = false;
|
|
4311
|
+
let failures = 0;
|
|
4312
|
+
let nextAt = 0;
|
|
4313
|
+
let timer;
|
|
4314
|
+
const schedule = () => {
|
|
4315
|
+
window.clearTimeout(timer);
|
|
4316
|
+
timer = void 0;
|
|
4317
|
+
if (!disposed && !document.hidden && !inFlight) timer = window.setTimeout(() => {
|
|
4318
|
+
refresh();
|
|
4319
|
+
}, Math.max(0, nextAt - Date.now()));
|
|
4320
|
+
};
|
|
4311
4321
|
const refresh = async () => {
|
|
4312
|
-
if (inFlight || disposed) return;
|
|
4322
|
+
if (inFlight || disposed || document.hidden) return;
|
|
4313
4323
|
inFlight = true;
|
|
4314
4324
|
try {
|
|
4315
4325
|
const response = await fetch(OPENAI_CODEX_AUTH_STATUS_PATH, {
|
|
@@ -4320,24 +4330,27 @@ window.__ModuleLoader__.load({
|
|
|
4320
4330
|
});
|
|
4321
4331
|
const value = await response.json().catch(() => void 0);
|
|
4322
4332
|
const usage = response.ok ? usageFromStatus(value) : void 0;
|
|
4333
|
+
failures = usage === void 0 ? Math.min(failures + 1, 5) : 0;
|
|
4323
4334
|
if (!disposed && !controller.signal.aborted) setRequest(usage === void 0 ? { status: "hidden" } : {
|
|
4324
4335
|
status: "ready",
|
|
4325
4336
|
usage
|
|
4326
4337
|
});
|
|
4327
4338
|
} catch {
|
|
4339
|
+
failures = Math.min(failures + 1, 5);
|
|
4328
4340
|
if (!disposed && !controller.signal.aborted) setRequest({ status: "hidden" });
|
|
4329
4341
|
} finally {
|
|
4330
4342
|
inFlight = false;
|
|
4343
|
+
nextAt = Date.now() + Math.min(9e5, USAGE_POLL_INTERVAL_MS * 2 ** Math.max(0, failures - 1));
|
|
4344
|
+
schedule();
|
|
4331
4345
|
}
|
|
4332
4346
|
};
|
|
4333
4347
|
setRequest({ status: "loading" });
|
|
4334
4348
|
refresh();
|
|
4335
|
-
|
|
4336
|
-
refresh();
|
|
4337
|
-
}, USAGE_POLL_INTERVAL_MS);
|
|
4349
|
+
document.addEventListener("visibilitychange", schedule);
|
|
4338
4350
|
return () => {
|
|
4339
4351
|
disposed = true;
|
|
4340
|
-
|
|
4352
|
+
document.removeEventListener("visibilitychange", schedule);
|
|
4353
|
+
window.clearTimeout(timer);
|
|
4341
4354
|
controller.abort();
|
|
4342
4355
|
};
|
|
4343
4356
|
}, [eligible]);
|
|
@@ -6530,7 +6543,7 @@ window.__ModuleLoader__.load({
|
|
|
6530
6543
|
}
|
|
6531
6544
|
//#endregion
|
|
6532
6545
|
//#region src/version.ts
|
|
6533
|
-
const CODEX_CONNECT_VERSION = "0.1.0-alpha.4.
|
|
6546
|
+
const CODEX_CONNECT_VERSION = "0.1.0-alpha.4.39";
|
|
6534
6547
|
//#endregion
|
|
6535
6548
|
//#region src/client/OpenAICodexModelsCard.tsx
|
|
6536
6549
|
/** Compact Models account entry with quota disclosure and shared configuration. */
|