dsh-codex-connect 0.1.0-alpha.4.24 → 0.1.0-alpha.4.25
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 +7 -7
- package/README.i18n.yaml +2 -2
- package/README.md +18 -18
- package/docs/README.zh.md +18 -18
- package/docs/design.i18n.yaml +2 -2
- package/docs/design.md +1 -1
- package/docs/design.zh.md +1 -1
- package/lib/bin.js +1 -1
- package/lib/client.js +125 -56
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -1
- package/lib/{src-NE6c_5P4.js → src-Di2xxpDv.js} +61 -8
- package/package.json +2 -2
package/INSTALL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Installation Runbook for CLI Agents
|
|
2
2
|
|
|
3
|
-
Alpha 4.
|
|
3
|
+
Alpha 4.25 is verified with DSH `0.1.2-alpha.5` and its declared pi-ai range `^0.84.2`; the verified registry installation resolves pi-ai `0.84.4`.
|
|
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,11 +23,11 @@ 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-alpha.5` | `0.1.0-alpha.4.
|
|
26
|
+
| `0.1.2-alpha.5` | `0.1.0-alpha.4.25` |
|
|
27
27
|
|
|
28
28
|
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
29
|
|
|
30
|
-
Alpha 4.
|
|
30
|
+
Alpha 4.25's verified contract is DSH plugin API packages `0.1.2-alpha.5`, `@earendil-works/pi-ai` `^0.84.2` (resolved as `0.84.4` during verification), and Node.js `^22.19.0 || >=24.0.0`. Alpha 4.24 remains an earlier verified choice for the same DSH version, 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
31
|
|
|
32
32
|
These choices reflect the repository's existing verification record, not a new installation or runtime probe. This guidance does not fix upstream DSH compatibility or resolve [Issue #64](https://github.com/franksong2702/dsh-codex-connect/issues/64).
|
|
33
33
|
|
|
@@ -52,13 +52,13 @@ These choices reflect the repository's existing verification record, not a new i
|
|
|
52
52
|
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.23
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
For DSH `0.1.2-alpha.5`, use Alpha 4.
|
|
55
|
+
For DSH `0.1.2-alpha.5`, use Alpha 4.25:
|
|
56
56
|
|
|
57
57
|
```sh
|
|
58
|
-
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.
|
|
58
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.25
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
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, or `dsh plugin --profile web add 'github:franksong2702/dsh-codex-connect#v0.1.0-alpha.4.
|
|
61
|
+
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, or `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.
|
|
62
62
|
|
|
63
63
|
3. Run `dsh --profile web --dump-config` and require exactly one `llm-openai-codex` row loading `dsh-codex-connect`.
|
|
64
64
|
4. Confirm the effective `agent-default-model` and `web.searchProvider` values are unchanged from before installation.
|
|
@@ -70,7 +70,7 @@ These choices reflect the repository's existing verification record, not a new i
|
|
|
70
70
|
|
|
71
71
|
6. 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
72
|
|
|
73
|
-
Alpha 4.
|
|
73
|
+
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
74
|
|
|
75
75
|
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
76
|
|
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: 65a8d94c57ae1bd869f5247f158cb1f8d221f4c0
|
|
6
|
+
docs/README.zh.md: 1bdd0641d14d6c27da312ce9ac954fbb2664beae
|
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,30 @@ 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-alpha.5` with Codex Connect Alpha 4.
|
|
21
|
+
This quick start targets DSH `0.1.2-alpha.5` with Codex Connect Alpha 4.25. Check `dsh --version` first. For DSH `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.25
|
|
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.25
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
35
|
+
- 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.
|
|
36
|
+
- 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.
|
|
37
|
+
- Link users to the canonical tracker for their DSH version when one exists, with a prefilled compatibility-gap report as the safe fallback.
|
|
38
|
+
- 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
39
|
|
|
40
40
|
### Version updates
|
|
41
41
|
|
|
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.
|
|
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. The card's optional tracker lookup sends only that public DSH version to GitHub's public search API.
|
|
43
43
|
|
|
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.
|
|
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. 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
45
|
|
|
46
46
|
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
47
|
|
|
@@ -65,7 +65,7 @@ Expected result: the Harness web UI opens for the selected profile.
|
|
|
65
65
|
|
|
66
66
|
### 3. Find the Openai-Codex account card
|
|
67
67
|
|
|
68
|
-
Open **Settings → Models** and find **Openai-Codex**. This is the primary Alpha 4.
|
|
68
|
+
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
69
|
|
|
70
70
|
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
71
|
|
|
@@ -136,11 +136,11 @@ Expected result: `status --json` reports `signed-in` and exits `0`, while `docto
|
|
|
136
136
|
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
137
|
|
|
138
138
|
- **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
|
|
139
|
+
- **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.
|
|
140
|
+
- 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
141
|
|
|
142
142
|
<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
|
|
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 quota bars" width="820">
|
|
144
144
|
</p>
|
|
145
145
|
|
|
146
146
|
## Optional capabilities (off by default)
|
|
@@ -200,10 +200,10 @@ The detailed image prompt is authored by the selected GPT model. Codex Connect d
|
|
|
200
200
|
|
|
201
201
|
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
202
|
|
|
203
|
-
-
|
|
204
|
-
-
|
|
203
|
+
- The standard **Codex** bucket can contain a **5-hour** window, a **Weekly** window, or both.
|
|
204
|
+
- The exact Spark model uses the separate **GPT-5.3-Codex-Spark** bucket and displays whichever windows that bucket returns.
|
|
205
205
|
|
|
206
|
-
Each bar shows the remaining percentage and its local reset time. OpenAI controls the returned windows, eligibility, and reset values;
|
|
206
|
+
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
207
|
|
|
208
208
|
### Change a default model or global search route separately
|
|
209
209
|
|
|
@@ -322,7 +322,7 @@ The command sends one fixed, synthetic no-op to the hidden reviewer through the
|
|
|
322
322
|
|
|
323
323
|
## Compatibility and security boundary
|
|
324
324
|
|
|
325
|
-
- Alpha 4.
|
|
325
|
+
- Alpha 4.25 is verified with DSH plugin API packages `0.1.2-alpha.5`, `@earendil-works/pi-ai` `^0.84.2` (resolved as `0.84.4` during verification), and Node.js `^22.19.0 || >=24.0.0`. Alpha 4.24 remains an earlier verified choice for the same DSH version, 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
326
|
- 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
327
|
- 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
328
|
- 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/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,30 @@
|
|
|
18
18
|
|
|
19
19
|
## 五分钟快速开始
|
|
20
20
|
|
|
21
|
-
本快速指南适用于 DSH `0.1.2-alpha.5` 与 Codex Connect Alpha 4.
|
|
21
|
+
本快速指南适用于 DSH `0.1.2-alpha.5` 与 Codex Connect Alpha 4.25。请先运行 `dsh --version`。如果使用 DSH `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.25
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
预期结果:包被加入该 profile。这个动作不会更改 profile 的默认模型或全局搜索路由。
|
|
30
30
|
|
|
31
31
|
请使用上面的精确版本,确保已验证的 DSH 与插件组合可以复现。`alpha` 是会移动的 npm 标签,不是兼容性保证。
|
|
32
32
|
|
|
33
|
-
### Alpha 4.
|
|
33
|
+
### Alpha 4.25 更新内容
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
35
|
+
- 显示 ChatGPT 为当前 Codex 模型实际返回的 5 小时和每周额度窗口。缺少的窗口不会凭空出现,Spark 额度保持独立,也不会因套餐名称而隐藏服务端数据。
|
|
36
|
+
- 将“当前组合是否已验证”和“是否需要提醒维护者”分开判断。缺少验证记录不再被说成已知运行失败,也不会建议降级插件。
|
|
37
|
+
- 如果已经有当前 DSH 版本的统一跟进 Issue,设置卡片会直接链接过去;否则提供预填的兼容性缺口反馈。
|
|
38
|
+
- 每个更高版本的 DSH 候选只维护一个 Canary 跟进 Issue,明确区分等待完整验证、兼容性失败和基础设施阻塞。Canary 成功不会自动声明兼容或发布版本。
|
|
39
39
|
|
|
40
40
|
### 版本更新提醒
|
|
41
41
|
|
|
42
|
-
Codex Connect 会通过 DSH Web 服务定期检查公开的 npm 包信息,以及本仓库维护的 `verified-compatibility.json`。同一张卡片会读取本机实际加载的 DSH 软件包版本,与本项目记录的最新 DSH 版本并列显示,并对当前安装的插件版本和 DSH 版本这一组精确组合进行判断。本机版本检测只使用插件已经能够取得的软件包元数据,不要求 DSH Core
|
|
42
|
+
Codex Connect 会通过 DSH Web 服务定期检查公开的 npm 包信息,以及本仓库维护的 `verified-compatibility.json`。同一张卡片会读取本机实际加载的 DSH 软件包版本,与本项目记录的最新 DSH 版本并列显示,并对当前安装的插件版本和 DSH 版本这一组精确组合进行判断。本机版本检测只使用插件已经能够取得的软件包元数据,不要求 DSH Core 作出任何修改。卡片仅在需要兼容性跟进时查询 Issue,并且只向 GitHub 公开搜索 API 发送这个公开的 DSH 版本号。卡片将两项判断分开:状态只说明当前精确组合或明确升级路径是否已验证;只有当前安装的 DSH 等于或新于记录中的最新版、且尚无任何已验证的已发布插件时,才显示 GitHub 跟进操作。缺少验证记录不代表该组合已知不可运行。
|
|
43
43
|
|
|
44
|
-
兼容性清单按插件版本和 DSH 版本精确记录,不假设后续版本天然兼容。维护者确认新的 DSH
|
|
44
|
+
兼容性清单按插件版本和 DSH 版本精确记录,不假设后续版本天然兼容。维护者确认新的 DSH 版本后,只需更新仓库文件,不必重新发布插件。绿色表示当前安装组合已经通过验证。黄色状态下,如果最新插件适配当前 DSH,就建议升级插件;如果最新插件适配最新 DSH,就建议升级 DSH。红色表示当前 DSH 已达到或超过清单记录的最新版,但最新发布的插件仍未完成验证;如果已有该版本的统一兼容性跟进 Issue,卡片会直接链接过去,如果查询失败或没有匹配项,则提供预填的兼容性缺口反馈。灰色表示较早的 DSH 版本未被记录,或暂时无法检查公开清单。
|
|
45
45
|
|
|
46
46
|
发现插件新版本后,即使你切换了对话,DSH 界面也会显示全局更新提醒。提醒会先展示从你当前版本到最新版本之间对用户有用的功能;完整技术发布说明放在次级详情或发布页面中。插件不会自动执行升级命令。
|
|
47
47
|
|
|
@@ -67,7 +67,7 @@ dsh web
|
|
|
67
67
|
|
|
68
68
|
### 3. 找到 Openai-Codex 账户卡
|
|
69
69
|
|
|
70
|
-
打开 **设置 → 模型**,找到 **Openai-Codex**。这是 Alpha 4.
|
|
70
|
+
打开 **设置 → 模型**,找到 **Openai-Codex**。这是 Alpha 4.25 的主要账户入口。如果当前 profile 没有模型设置分区,请改用 **设置 → 插件 → 插件配置 → Codex Connect**。
|
|
71
71
|
|
|
72
72
|
模型页账户卡标注“由 Codex Connect 插件提供支持。”,用于 ChatGPT 授权、重新授权、退出和查看额度。两个设置页面共用同一份内存账户状态及轮询。**更多设置** 会在弹窗中打开代理、模型显示、搜索、图片和上下文预算配置表单,原插件设置入口仍保留。两处保存到同一份配置;关闭弹窗或按 Escape 会放弃弹窗内未保存的修改。模型页底部入口是可选增强:没有该设置分区的 profile 仍保留原插件入口。
|
|
73
73
|
|
|
@@ -138,11 +138,11 @@ dsh plugin --profile web exec dsh-codex-connect doctor --json
|
|
|
138
138
|
只有当前对话选择了 `openai-codex` 提供方的 GPT 模型时,Composer 才会显示下面两个小控件。它们都是当前对话级别的控制,不是 profile 全局设置:
|
|
139
139
|
|
|
140
140
|
- **Fast Mode(闪电图标)**:每个对话默认关闭。点击后请求更快的 `1.5 倍` 模式,再点一次恢复标准速度。它只绑定当前对话,不会改变模型选择,也不会影响其他对话。鼠标悬停或键盘聚焦闪电图标,可以看到当前状态和额度消耗提示。
|
|
141
|
-
-
|
|
142
|
-
- 对于精确模型 `gpt-5.3-codex-spark`,Composer
|
|
141
|
+
- **额度进度条**:位于模型选择器旁边,以紧凑的 `5h` 和 `7d` 行显示。只有服务端为当前模型额度桶返回对应窗口时,该行才会出现。剩余额度越低,颜色会从绿色经过黄色/橙色变为红色。鼠标悬停或键盘聚焦时,会显示每个窗口的精确剩余百分比和服务端提供的重置时间。非 GPT 模型或没有可识别额度窗口时不会显示。
|
|
142
|
+
- 对于精确模型 `gpt-5.3-codex-spark`,Composer 读取独立的 Spark 额度桶;其他 GPT Codex 模型读取标准 Codex 额度桶。插件不会根据 ChatGPT 套餐名称猜测额度窗口。
|
|
143
143
|
|
|
144
144
|
<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
|
|
145
|
+
<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
146
|
</p>
|
|
147
147
|
|
|
148
148
|
## 可选能力(默认关闭)
|
|
@@ -202,10 +202,10 @@ Codex Connect 默认使用**直连**。代理是可选项,只作用于本插
|
|
|
202
202
|
|
|
203
203
|
登录后,Codex Connect 设置卡片可能显示多个服务端额度窗口。它们是不同的额度桶,不是同一个数字重复显示:
|
|
204
204
|
|
|
205
|
-
- **Codex
|
|
206
|
-
-
|
|
205
|
+
- 标准 **Codex** 额度桶可能包含 **5 小时额度**、**每周额度**,或者同时包含两者。
|
|
206
|
+
- 精确 Spark 模型使用独立的 **GPT-5.3-Codex-Spark** 额度桶,并显示该额度桶实际返回的窗口。
|
|
207
207
|
|
|
208
|
-
每条进度条都会显示剩余百分比和按本地时区格式化的重置时间。额度窗口、模型资格和重置时间由 OpenAI
|
|
208
|
+
每条进度条都会显示剩余百分比和按本地时区格式化的重置时间。额度窗口、模型资格和重置时间由 OpenAI 返回;Codex Connect 不会根据套餐名称删除已返回的窗口,也不会虚构缺失窗口。
|
|
209
209
|
|
|
210
210
|
### 单独更改默认模型或全局搜索路由
|
|
211
211
|
|
|
@@ -324,7 +324,7 @@ dsh plugin --profile web exec dsh-codex-connect auto-review-probe --json
|
|
|
324
324
|
|
|
325
325
|
## 兼容性与安全边界
|
|
326
326
|
|
|
327
|
-
- Alpha 4.
|
|
327
|
+
- Alpha 4.25 已与 DSH 插件 API packages `0.1.2-alpha.5`、`@earendil-works/pi-ai` `^0.84.2`(验证时解析为 `0.84.4`)和 Node.js `^22.19.0 || >=24.0.0` 完成验证。Alpha 4.24 仍是同一 DSH 版本较早的已验证选择;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
328
|
- 新版 DSH 将原来的 client runtime 拆分为 Session Controller、Settings、Store 和 Renderer 包。Codex Connect 通过这些公开接口接入设置和图片操作。规范化预览的编码与尺寸由 DSH 决定;Codex Connect 另行保留字节完全一致的原图。
|
|
329
329
|
- 升级时请将 DSH 插件 API packages 与 `@earendil-works/pi-ai` 作为一组升级,再运行 `dsh-codex-connect doctor --json` 和兼容性检查。本契约不对未来版本作判断。
|
|
330
330
|
- 每日上游检查发现新的 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: 86c383527dad511eb3458fb6c6389d5f8e9e9c16
|
|
4
|
+
design.zh.md: f6112594d2c88ebab0f35e5f8f8dd2e949e611b5
|
package/docs/design.md
CHANGED
|
@@ -26,4 +26,4 @@ Before registration the plugin checks current provider ids. An existing `openai-
|
|
|
26
26
|
|
|
27
27
|
## Compatibility boundary
|
|
28
28
|
|
|
29
|
-
Alpha 4.
|
|
29
|
+
Alpha 4.25 pins Harness `0.1.2-alpha.5` development dependencies and follows its pi-ai range `^0.84.2`; the verified release lockfile selects pi-ai `0.84.4`. 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.25 and DSH `0.1.2-alpha.5` 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
|
@@ -22,4 +22,4 @@ Host 将 `llm-openai-codex` 注册为插件自有的能力 settings namespace。
|
|
|
22
22
|
|
|
23
23
|
注册前检查现有 provider id;发现 `openai-codex` 已被占用时,给出旧 bundle 或手动 provider 配置的定向迁移提示。boot-free CLI doctor 只报告包/运行时版本、OAuth 路径元数据、能力默认值和安全提示。
|
|
24
24
|
|
|
25
|
-
Alpha 4.
|
|
25
|
+
Alpha 4.25 固定使用 Harness `0.1.2-alpha.5` 开发依赖,并跟随其 pi-ai 版本范围 `^0.84.2`;已验证的发布锁文件选择 pi-ai `0.84.4`。Node.js 支持范围仍为 `^22.19.0 || >=24.0.0`。keyed `settings.plugin.item` 集成保持不变,客户端类型继续从 Session Controller、Settings、Store 和 Renderer 的所属包导入。已发布兼容性记录列出 Alpha 4.25 与 DSH `0.1.2-alpha.5` 的精确组合。资格、额度、模型、服务端上下文容量和后端协议仍由上游控制。测试仅使用临时 OAuth 文档和模拟网络响应,CI 不执行真实认证。
|
package/lib/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { At as logoutOpenAICodex, Ft as OpenAICodexCredentialStore, H as DSH_PLUGIN_API_PACKAGES, It as openAICodexAuthPath, Mt as openAICodexModelCatalog, N as CODEX_CONNECT_VERSION, Pt as OPENAI_CODEX_PROVIDER, 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 } from "./src-
|
|
2
|
+
import { At as logoutOpenAICodex, Ft as OpenAICodexCredentialStore, H as DSH_PLUGIN_API_PACKAGES, It as openAICodexAuthPath, Mt as openAICodexModelCatalog, N as CODEX_CONNECT_VERSION, Pt as OPENAI_CODEX_PROVIDER, 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 } from "./src-Di2xxpDv.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { Agent, ProxyAgent, fetch } from "undici";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
package/lib/client.js
CHANGED
|
@@ -2019,6 +2019,9 @@ window.__ModuleLoader__.load({
|
|
|
2019
2019
|
function releaseUrl(version) {
|
|
2020
2020
|
return `${OPENAI_CODEX_RELEASE_PAGE_BASE}${version}`;
|
|
2021
2021
|
}
|
|
2022
|
+
function validCanaryTrackerUrl(value) {
|
|
2023
|
+
return typeof value === "string" && /^https:\/\/github\.com\/franksong2702\/dsh-codex-connect\/issues\/[1-9]\d*$/u.test(value);
|
|
2024
|
+
}
|
|
2022
2025
|
/** Validate a route response before it is rendered by the browser. */
|
|
2023
2026
|
function parseOpenAICodexUpdateResult(value) {
|
|
2024
2027
|
if (typeof value !== "object" || value === null || Array.isArray(value)) return void 0;
|
|
@@ -2091,9 +2094,14 @@ window.__ModuleLoader__.load({
|
|
|
2091
2094
|
if (typeof value !== "object" || value === null || Array.isArray(value)) return void 0;
|
|
2092
2095
|
const record = value;
|
|
2093
2096
|
const status = record["status"];
|
|
2094
|
-
if (status !== "compatible" && status !== "plugin-update-required" && status !== "not-yet-compatible" && status !== "unverified") return void 0;
|
|
2097
|
+
if (status !== "compatible" && status !== "plugin-update-required" && status !== "dsh-update-required" && status !== "not-yet-compatible" && status !== "unverified") return void 0;
|
|
2095
2098
|
if (record["latestPluginVersion"] !== latestPluginVersion) return void 0;
|
|
2096
2099
|
const latestDshVersion = record["latestDshVersion"];
|
|
2100
|
+
const reportCompatibilityGap = record["reportCompatibilityGap"];
|
|
2101
|
+
const trackerUrl = record["trackerUrl"];
|
|
2102
|
+
if (reportCompatibilityGap !== void 0 && reportCompatibilityGap !== true) return void 0;
|
|
2103
|
+
if (reportCompatibilityGap === true && status !== "not-yet-compatible") return void 0;
|
|
2104
|
+
if (trackerUrl !== void 0 && (reportCompatibilityGap !== true || !validCanaryTrackerUrl(trackerUrl))) return void 0;
|
|
2097
2105
|
if (status === "unverified") {
|
|
2098
2106
|
if (latestDshVersion === void 0) return {
|
|
2099
2107
|
status,
|
|
@@ -2110,7 +2118,9 @@ window.__ModuleLoader__.load({
|
|
|
2110
2118
|
return {
|
|
2111
2119
|
status,
|
|
2112
2120
|
latestPluginVersion,
|
|
2113
|
-
latestDshVersion
|
|
2121
|
+
latestDshVersion,
|
|
2122
|
+
...reportCompatibilityGap === true ? { reportCompatibilityGap: true } : {},
|
|
2123
|
+
...trackerUrl === void 0 ? {} : { trackerUrl }
|
|
2114
2124
|
};
|
|
2115
2125
|
}
|
|
2116
2126
|
//#endregion
|
|
@@ -2468,18 +2478,21 @@ window.__ModuleLoader__.load({
|
|
|
2468
2478
|
const compatibilityTitleKeys = {
|
|
2469
2479
|
compatible: "compatibilityCompatibleTitle",
|
|
2470
2480
|
"plugin-update-required": "compatibilityPluginUpdateTitle",
|
|
2481
|
+
"dsh-update-required": "compatibilityDshUpdateTitle",
|
|
2471
2482
|
"not-yet-compatible": "compatibilityNotReadyTitle",
|
|
2472
2483
|
unverified: "compatibilityUnverifiedTitle"
|
|
2473
2484
|
};
|
|
2474
2485
|
const compatibilityBodyKeys = {
|
|
2475
2486
|
compatible: "compatibilityCompatibleBody",
|
|
2476
2487
|
"plugin-update-required": "compatibilityPluginUpdateBody",
|
|
2488
|
+
"dsh-update-required": "compatibilityDshUpdateBody",
|
|
2477
2489
|
"not-yet-compatible": "compatibilityNotReadyBody",
|
|
2478
2490
|
unverified: "compatibilityUnverifiedBody"
|
|
2479
2491
|
};
|
|
2480
2492
|
const compatibilityIcons = {
|
|
2481
2493
|
compatible: "🟢",
|
|
2482
2494
|
"plugin-update-required": "🟡",
|
|
2495
|
+
"dsh-update-required": "🟡",
|
|
2483
2496
|
"not-yet-compatible": "🔴",
|
|
2484
2497
|
unverified: "⚪"
|
|
2485
2498
|
};
|
|
@@ -2499,10 +2512,10 @@ window.__ModuleLoader__.load({
|
|
|
2499
2512
|
latest
|
|
2500
2513
|
});
|
|
2501
2514
|
}
|
|
2502
|
-
function compatibilityIssueUrl(currentVersion, latestPluginVersion, currentDshVersion) {
|
|
2515
|
+
function compatibilityIssueUrl(currentVersion, latestPluginVersion, currentDshVersion, latestDshVersion) {
|
|
2503
2516
|
const params = new URLSearchParams({
|
|
2504
|
-
title: `
|
|
2505
|
-
body: `The compatibility card
|
|
2517
|
+
title: `Support Codex Connect on DSH ${currentDshVersion}`,
|
|
2518
|
+
body: `The compatibility card could not find a verified Codex Connect release for DSH ${currentDshVersion}. Installed Codex Connect: ${currentVersion}. Latest published Codex Connect: ${latestPluginVersion}. Latest DSH version in the compatibility record: ${latestDshVersion ?? "unavailable"}. This reports a verification or adaptation gap; it does not claim that the installed combination is known to fail.`
|
|
2506
2519
|
});
|
|
2507
2520
|
return `${OPENAI_CODEX_REPOSITORY_URL}/issues/new?${params.toString()}`;
|
|
2508
2521
|
}
|
|
@@ -2639,8 +2652,8 @@ window.__ModuleLoader__.load({
|
|
|
2639
2652
|
compatibilityTitleKey = "compatibilityCurrentDshNewerTitle";
|
|
2640
2653
|
compatibilityBodyKey = "compatibilityCurrentDshNewerBody";
|
|
2641
2654
|
}
|
|
2642
|
-
const compatibilityWarning = compatibility?.status === "plugin-update-required" || compatibility?.status === "not-yet-compatible";
|
|
2643
|
-
const noticeKey = latestVersion === void 0 ? void 0 : `${snapshot.currentVersion}:${latestVersion}:${snapshot.currentDshVersion ?? "unknown"}:${compatibility?.latestDshVersion ?? "unknown"}:${compatibility?.status ?? "none"}`;
|
|
2655
|
+
const compatibilityWarning = compatibility?.status === "plugin-update-required" || compatibility?.status === "dsh-update-required" || compatibility?.status === "not-yet-compatible";
|
|
2656
|
+
const noticeKey = latestVersion === void 0 ? void 0 : `${snapshot.currentVersion}:${latestVersion}:${snapshot.currentDshVersion ?? "unknown"}:${compatibility?.latestDshVersion ?? "unknown"}:${compatibility?.status ?? "none"}:${compatibility?.reportCompatibilityGap === true ? "report" : "no-report"}`;
|
|
2644
2657
|
if (overlay && (!compatibilityWarning && snapshot.status !== "update-available" || noticeKey === void 0 || snapshot.dismissedNotice === noticeKey)) return null;
|
|
2645
2658
|
const available = snapshot.status === "update-available";
|
|
2646
2659
|
const technicalDetails = available && technicalDetailsOpen;
|
|
@@ -2697,14 +2710,21 @@ window.__ModuleLoader__.load({
|
|
|
2697
2710
|
}),
|
|
2698
2711
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2699
2712
|
style: bodyStyle$1,
|
|
2700
|
-
children: t(compatibilityBodyKey ?? compatibilityBodyKeys[compatibility.status])
|
|
2713
|
+
children: compatibility.status === "dsh-update-required" ? t("compatibilityDshUpdateBody", { latestDshVersion: compatibility.latestDshVersion ?? "" }) : t(compatibilityBodyKey ?? compatibilityBodyKeys[compatibility.status])
|
|
2701
2714
|
}),
|
|
2702
|
-
compatibility.status === "
|
|
2703
|
-
href:
|
|
2715
|
+
compatibility.status === "dsh-update-required" && compatibility.latestDshVersion !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
2716
|
+
href: `https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v${compatibility.latestDshVersion}`,
|
|
2704
2717
|
target: "_blank",
|
|
2705
2718
|
rel: "noopener noreferrer",
|
|
2706
2719
|
style: textButtonStyle,
|
|
2707
|
-
children: t("
|
|
2720
|
+
children: t("compatibilityDshUpdateAction", { version: compatibility.latestDshVersion })
|
|
2721
|
+
}) : null,
|
|
2722
|
+
compatibility.reportCompatibilityGap === true && snapshot.currentDshVersion !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
2723
|
+
href: compatibility.trackerUrl ?? compatibilityIssueUrl(snapshot.currentVersion, compatibility.latestPluginVersion, snapshot.currentDshVersion, compatibility.latestDshVersion),
|
|
2724
|
+
target: "_blank",
|
|
2725
|
+
rel: "noopener noreferrer",
|
|
2726
|
+
style: textButtonStyle,
|
|
2727
|
+
children: compatibility.trackerUrl === void 0 ? t("compatibilityReport") : t("compatibilityViewTracker")
|
|
2708
2728
|
}) : null
|
|
2709
2729
|
]
|
|
2710
2730
|
}),
|
|
@@ -3503,8 +3523,9 @@ window.__ModuleLoader__.load({
|
|
|
3503
3523
|
}
|
|
3504
3524
|
//#endregion
|
|
3505
3525
|
//#region src/client/OpenAICodexQuotaIndicator.tsx
|
|
3506
|
-
/** Compact
|
|
3526
|
+
/** Compact server-driven Codex quota indicator for the Composer tool row. */
|
|
3507
3527
|
const WEEK_SECONDS = 604800;
|
|
3528
|
+
const FIVE_HOUR_SECONDS = 18e3;
|
|
3508
3529
|
const USAGE_POLL_INTERVAL_MS = 6e4;
|
|
3509
3530
|
const CODEX_PROVIDER$1 = "openai-codex";
|
|
3510
3531
|
const SPARK_MODEL = "gpt-5.3-codex-spark";
|
|
@@ -3530,9 +3551,9 @@ window.__ModuleLoader__.load({
|
|
|
3530
3551
|
}
|
|
3531
3552
|
return usage;
|
|
3532
3553
|
}
|
|
3533
|
-
function
|
|
3554
|
+
function quotaOf(usage, model, windowSeconds) {
|
|
3534
3555
|
const quotaId = model === SPARK_MODEL ? SPARK_QUOTA_ID : "codex";
|
|
3535
|
-
return usage.rateLimits.find((limit) => limit.id === quotaId)?.windows.find((window) => window.windowSeconds ===
|
|
3556
|
+
return usage.rateLimits.find((limit) => limit.id === quotaId)?.windows.find((window) => window.windowSeconds === windowSeconds);
|
|
3536
3557
|
}
|
|
3537
3558
|
function isGptModel(state) {
|
|
3538
3559
|
const current = state.current;
|
|
@@ -3568,7 +3589,7 @@ window.__ModuleLoader__.load({
|
|
|
3568
3589
|
function subscribeDirectory$1(directory, listener) {
|
|
3569
3590
|
return directory.subscribe(listener);
|
|
3570
3591
|
}
|
|
3571
|
-
/** Render
|
|
3592
|
+
/** Render the recognized quota windows returned for the current model bucket. */
|
|
3572
3593
|
function OpenAICodexQuotaIndicator({ directory, t }) {
|
|
3573
3594
|
const directoryState = (0, react.useSyncExternalStore)((listener) => subscribeDirectory$1(directory, listener), () => directory.getSnapshot(), () => directory.getSnapshot());
|
|
3574
3595
|
const eligible = isGptModel(directoryState);
|
|
@@ -3618,18 +3639,32 @@ window.__ModuleLoader__.load({
|
|
|
3618
3639
|
};
|
|
3619
3640
|
}, [eligible]);
|
|
3620
3641
|
if (!eligible || request.status !== "ready" || request.usage === void 0) return null;
|
|
3621
|
-
const
|
|
3622
|
-
|
|
3623
|
-
const
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3642
|
+
const model = directoryState.current?.model;
|
|
3643
|
+
const fiveHour = quotaOf(request.usage, model, FIVE_HOUR_SECONDS);
|
|
3644
|
+
const weekly = quotaOf(request.usage, model, WEEK_SECONDS);
|
|
3645
|
+
const quotas = [...fiveHour === void 0 ? [] : [{
|
|
3646
|
+
kind: "five-hour",
|
|
3647
|
+
shortLabel: t("composerFiveHourShort"),
|
|
3648
|
+
summary: t("composerFiveHourQuotaSummary", {
|
|
3649
|
+
percent: formatPercent(fiveHour.remainingPercent),
|
|
3650
|
+
time: formatOpenAICodexResetAt(fiveHour.resetAt) ?? t("resetUnavailable")
|
|
3651
|
+
}),
|
|
3652
|
+
window: fiveHour
|
|
3653
|
+
}], ...weekly === void 0 ? [] : [{
|
|
3654
|
+
kind: "weekly",
|
|
3655
|
+
shortLabel: t("composerWeeklyShort"),
|
|
3656
|
+
summary: t("composerWeeklyQuotaSummary", {
|
|
3657
|
+
percent: formatPercent(weekly.remainingPercent),
|
|
3658
|
+
time: formatOpenAICodexResetAt(weekly.resetAt) ?? t("resetUnavailable")
|
|
3659
|
+
}),
|
|
3660
|
+
window: weekly
|
|
3661
|
+
}]];
|
|
3662
|
+
if (quotas.length === 0) return null;
|
|
3663
|
+
const summary = quotas.map((quota) => quota.summary).join("; ");
|
|
3629
3664
|
const tooltipVisible = isHovered || isFocused;
|
|
3630
3665
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3631
3666
|
role: "status",
|
|
3632
|
-
"data-openai-codex-quota": "
|
|
3667
|
+
"data-openai-codex-quota": quotas.map((quota) => quota.kind).join(","),
|
|
3633
3668
|
"aria-label": summary,
|
|
3634
3669
|
"aria-describedby": tooltipVisible ? tooltipId : void 0,
|
|
3635
3670
|
tabIndex: 0,
|
|
@@ -3647,39 +3682,59 @@ window.__ModuleLoader__.load({
|
|
|
3647
3682
|
},
|
|
3648
3683
|
style: {
|
|
3649
3684
|
display: "inline-flex",
|
|
3650
|
-
width:
|
|
3651
|
-
|
|
3685
|
+
width: `70px`,
|
|
3686
|
+
minHeight: "28px",
|
|
3652
3687
|
position: "relative",
|
|
3653
3688
|
alignItems: "center",
|
|
3654
|
-
justifyContent: "center"
|
|
3689
|
+
justifyContent: "center",
|
|
3690
|
+
flexDirection: "column",
|
|
3691
|
+
gap: "3px"
|
|
3655
3692
|
},
|
|
3656
|
-
children: [
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
style: {
|
|
3660
|
-
display: "block",
|
|
3661
|
-
width: `${QUOTA_PROGRESS_WIDTH_PX}px`,
|
|
3662
|
-
height: `${QUOTA_PROGRESS_TRACK_HEIGHT_PX}px`,
|
|
3663
|
-
borderRadius: "999px",
|
|
3664
|
-
backgroundColor: "var(--dsw-alias-border-l2)",
|
|
3665
|
-
overflow: "hidden"
|
|
3666
|
-
},
|
|
3667
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3693
|
+
children: [quotas.map((quota) => {
|
|
3694
|
+
const progressColor = quotaProgressColor(quota.window.remainingPercent);
|
|
3695
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3668
3696
|
"aria-hidden": "true",
|
|
3669
|
-
"data-openai-codex-quota-progress": "weekly",
|
|
3670
|
-
"data-openai-codex-quota-color": progressColor.name,
|
|
3671
3697
|
style: {
|
|
3672
|
-
display: "
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3698
|
+
display: "inline-flex",
|
|
3699
|
+
alignItems: "center",
|
|
3700
|
+
gap: 4
|
|
3701
|
+
},
|
|
3702
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3703
|
+
style: {
|
|
3704
|
+
width: 18,
|
|
3705
|
+
color: "var(--dsw-alias-label-tertiary)",
|
|
3706
|
+
fontSize: 9,
|
|
3707
|
+
lineHeight: "10px",
|
|
3708
|
+
textAlign: "right"
|
|
3709
|
+
},
|
|
3710
|
+
children: quota.shortLabel
|
|
3711
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3712
|
+
"data-openai-codex-quota-track": quota.kind,
|
|
3713
|
+
style: {
|
|
3714
|
+
display: "block",
|
|
3715
|
+
width: `${QUOTA_PROGRESS_WIDTH_PX}px`,
|
|
3716
|
+
height: `${QUOTA_PROGRESS_TRACK_HEIGHT_PX}px`,
|
|
3717
|
+
borderRadius: "999px",
|
|
3718
|
+
backgroundColor: "var(--dsw-alias-border-l2)",
|
|
3719
|
+
overflow: "hidden"
|
|
3720
|
+
},
|
|
3721
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3722
|
+
"data-openai-codex-quota-progress": quota.kind,
|
|
3723
|
+
"data-openai-codex-quota-color": progressColor.name,
|
|
3724
|
+
style: {
|
|
3725
|
+
display: "block",
|
|
3726
|
+
width: `${boundedQuotaPercent(quota.window.remainingPercent)}%`,
|
|
3727
|
+
height: "100%",
|
|
3728
|
+
borderRadius: "inherit",
|
|
3729
|
+
backgroundColor: progressColor.value
|
|
3730
|
+
}
|
|
3731
|
+
})
|
|
3732
|
+
})]
|
|
3733
|
+
}, quota.kind);
|
|
3679
3734
|
}), tooltipVisible ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3680
3735
|
id: tooltipId,
|
|
3681
3736
|
role: "tooltip",
|
|
3682
|
-
"data-openai-codex-quota-tooltip": "
|
|
3737
|
+
"data-openai-codex-quota-tooltip": quotas.map((quota) => quota.kind).join(","),
|
|
3683
3738
|
style: {
|
|
3684
3739
|
position: "absolute",
|
|
3685
3740
|
bottom: "calc(100% + 6px)",
|
|
@@ -3966,6 +4021,9 @@ window.__ModuleLoader__.load({
|
|
|
3966
4021
|
resetAt: "Resets {time}",
|
|
3967
4022
|
resetUnavailable: "Reset time unavailable",
|
|
3968
4023
|
composerWeeklyQuota: "Codex weekly quota",
|
|
4024
|
+
composerFiveHourShort: "5h",
|
|
4025
|
+
composerWeeklyShort: "7d",
|
|
4026
|
+
composerFiveHourQuotaSummary: "Codex 5-hour quota: {percent}% remaining; resets {time}",
|
|
3969
4027
|
composerWeeklyQuotaSummary: "Codex weekly quota: {percent}% remaining; resets {time}",
|
|
3970
4028
|
fastModeEnabledTitle: "Current: 1.5× speed, with faster quota consumption. Click to switch to Standard speed.",
|
|
3971
4029
|
fastModeDisabledTitle: "Current: Standard speed. Click to enable 1.5× speed.",
|
|
@@ -4147,8 +4205,11 @@ window.__ModuleLoader__.load({
|
|
|
4147
4205
|
compatibilityCurrentDshNewerBody: "Compatibility has not been confirmed for this running DSH version yet.",
|
|
4148
4206
|
compatibilityPluginUpdateTitle: "Update Codex Connect first",
|
|
4149
4207
|
compatibilityPluginUpdateBody: "Your installed plugin is not verified with this DSH version, but the latest plugin is. Update the plugin before DSH.",
|
|
4150
|
-
|
|
4151
|
-
|
|
4208
|
+
compatibilityDshUpdateTitle: "Current combination is not verified; update DSH",
|
|
4209
|
+
compatibilityDshUpdateBody: "This exact Codex Connect and DSH combination has not been verified. The latest Codex Connect is verified with DSH {latestDshVersion}; move to that verified pair instead of installing an older plugin.",
|
|
4210
|
+
compatibilityDshUpdateAction: "Open DSH {version} release",
|
|
4211
|
+
compatibilityNotReadyTitle: "Codex Connect has not caught up with this DSH version",
|
|
4212
|
+
compatibilityNotReadyBody: "Neither your installed plugin nor the latest published plugin has been verified with this DSH version. This does not prove the combination will fail; report the gap so the maintainer can verify and adapt it.",
|
|
4152
4213
|
compatibilityUnverifiedTitle: "Compatibility is not confirmed",
|
|
4153
4214
|
compatibilityUnverifiedBody: "The compatibility information maintained by this project is temporarily unavailable. Check again later.",
|
|
4154
4215
|
compatibilityDshSame: "DSH: {version} · Up to date",
|
|
@@ -4159,7 +4220,8 @@ window.__ModuleLoader__.load({
|
|
|
4159
4220
|
compatibilityPluginSame: "Codex Connect: {version} · Up to date",
|
|
4160
4221
|
compatibilityPluginDifferent: "Codex Connect: Current {current} · Latest {latest}",
|
|
4161
4222
|
compatibilityPluginCurrentOnly: "Codex Connect: Current {current} · Latest version unavailable",
|
|
4162
|
-
compatibilityReport: "
|
|
4223
|
+
compatibilityReport: "Report a Codex Connect compatibility gap",
|
|
4224
|
+
compatibilityViewTracker: "View compatibility progress",
|
|
4163
4225
|
currentVersion: "Current version: {version}",
|
|
4164
4226
|
checkForUpdates: "Check for updates",
|
|
4165
4227
|
checkingForUpdates: "Checking for updates…",
|
|
@@ -4252,6 +4314,9 @@ window.__ModuleLoader__.load({
|
|
|
4252
4314
|
resetAt: "{time} 重置",
|
|
4253
4315
|
resetUnavailable: "重置时间不可用",
|
|
4254
4316
|
composerWeeklyQuota: "Codex 周额度",
|
|
4317
|
+
composerFiveHourShort: "5h",
|
|
4318
|
+
composerWeeklyShort: "7d",
|
|
4319
|
+
composerFiveHourQuotaSummary: "Codex 5 小时额度:剩余 {percent}%;重置时间 {time}",
|
|
4255
4320
|
composerWeeklyQuotaSummary: "Codex 周额度:剩余 {percent}%;重置时间 {time}",
|
|
4256
4321
|
fastModeEnabledTitle: "当前:1.5 倍速度,额度消耗更快。点击切换到标准速度",
|
|
4257
4322
|
fastModeDisabledTitle: "当前:标准速度。点击开启 1.5 倍速度",
|
|
@@ -4433,8 +4498,11 @@ window.__ModuleLoader__.load({
|
|
|
4433
4498
|
compatibilityCurrentDshNewerBody: "当前运行的 DSH 版本尚未确认兼容性。",
|
|
4434
4499
|
compatibilityPluginUpdateTitle: "请先升级 Codex Connect",
|
|
4435
4500
|
compatibilityPluginUpdateBody: "当前插件尚未通过该 DSH 版本的验证,但最新插件已经通过。请先升级插件,再升级 DSH。",
|
|
4436
|
-
|
|
4437
|
-
|
|
4501
|
+
compatibilityDshUpdateTitle: "当前版本组合尚未验证,请升级 DSH",
|
|
4502
|
+
compatibilityDshUpdateBody: "当前 Codex Connect 与 DSH 的精确组合尚未验证。最新版 Codex Connect 已与 DSH {latestDshVersion} 完成验证;请升级到这组已验证版本,不必安装旧版插件。",
|
|
4503
|
+
compatibilityDshUpdateAction: "打开 DSH {version} 发布页",
|
|
4504
|
+
compatibilityNotReadyTitle: "Codex Connect 尚未跟上此 DSH 版本",
|
|
4505
|
+
compatibilityNotReadyBody: "当前插件和最新发布的插件都尚未通过该 DSH 版本的兼容性验证。这不代表它一定无法运行;请反馈此适配缺口,让维护者尽快验证并更新。",
|
|
4438
4506
|
compatibilityUnverifiedTitle: "兼容性尚未确认",
|
|
4439
4507
|
compatibilityUnverifiedBody: "暂时无法取得本项目维护的兼容性信息,请稍后重新检查。",
|
|
4440
4508
|
compatibilityDshSame: "DSH:{version} · 已是最新",
|
|
@@ -4445,7 +4513,8 @@ window.__ModuleLoader__.load({
|
|
|
4445
4513
|
compatibilityPluginSame: "Codex Connect:{version} · 已是最新",
|
|
4446
4514
|
compatibilityPluginDifferent: "Codex Connect:当前 {current} · 最新 {latest}",
|
|
4447
4515
|
compatibilityPluginCurrentOnly: "Codex Connect:当前 {current} · 无法取得最新版本",
|
|
4448
|
-
compatibilityReport: "
|
|
4516
|
+
compatibilityReport: "反馈 Codex Connect 兼容性缺口",
|
|
4517
|
+
compatibilityViewTracker: "查看兼容性跟进",
|
|
4449
4518
|
currentVersion: "当前版本:{version}",
|
|
4450
4519
|
checkForUpdates: "检查更新",
|
|
4451
4520
|
checkingForUpdates: "正在检查更新…",
|
|
@@ -5656,7 +5725,7 @@ window.__ModuleLoader__.load({
|
|
|
5656
5725
|
}
|
|
5657
5726
|
//#endregion
|
|
5658
5727
|
//#region src/version.ts
|
|
5659
|
-
const CODEX_CONNECT_VERSION = "0.1.0-alpha.4.
|
|
5728
|
+
const CODEX_CONNECT_VERSION = "0.1.0-alpha.4.25";
|
|
5660
5729
|
//#endregion
|
|
5661
5730
|
//#region src/client/OpenAICodexModelsCard.tsx
|
|
5662
5731
|
/** Compact Models account entry with quota disclosure and shared configuration. */
|
package/lib/index.d.ts
CHANGED
|
@@ -582,11 +582,13 @@ interface OpenAICodexUpdateHighlight {
|
|
|
582
582
|
version: string;
|
|
583
583
|
kind: OpenAICodexUpdateHighlightKind;
|
|
584
584
|
}
|
|
585
|
-
type OpenAICodexDshCompatibilityStatus = 'compatible' | 'plugin-update-required' | 'not-yet-compatible' | 'unverified';
|
|
585
|
+
type OpenAICodexDshCompatibilityStatus = 'compatible' | 'plugin-update-required' | 'dsh-update-required' | 'not-yet-compatible' | 'unverified';
|
|
586
586
|
interface OpenAICodexDshCompatibilityAdvice {
|
|
587
587
|
status: OpenAICodexDshCompatibilityStatus;
|
|
588
588
|
latestPluginVersion: string;
|
|
589
589
|
latestDshVersion?: string;
|
|
590
|
+
reportCompatibilityGap?: true;
|
|
591
|
+
trackerUrl?: string;
|
|
590
592
|
}
|
|
591
593
|
type OpenAICodexUpdateResult = {
|
|
592
594
|
status: 'up-to-date';
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as OPENAI_CODEX_LOCAL_PROXY_CANDIDATES, A as assertNoOpenAICodexProviderConflict, At as logoutOpenAICodex, B as COMPATIBILITY_PACKAGES, C as OPENAI_CODEX_TRANSPORT_ERROR_CODES, Ct as isFastModeSessionId, D as isOpenAICodexTransportError, Dt as parseOpenAICodexUsage, E as OpenAICodexTransportError, Et as OPENAI_CODEX_USAGE_URL, F as checkForOpenAICodexUpdate, Ft as OpenAICodexCredentialStore, G as SUPPORTED_NODE_RANGE, H as DSH_PLUGIN_API_PACKAGES, I as compareOpenAICodexVersions, It as openAICodexAuthPath, J as detectCompatibility, K as SUPPORTED_PI_AI_RANGE, L as parseOpenAICodexUpdateResult, M as openAICodexConflictMessage, Nt as OPENAI_CODEX_AUTH_FILENAME, O as VIEW_IMAGE_TOOL_NAME, Ot as readOpenAICodexRateLimits, P as OPENAI_CODEX_UPDATE_PATH, Pt as OPENAI_CODEX_PROVIDER, Q as OPENAI_CODEX_PROXY_TEST_PATH, R as parseOpenAICodexVersion, S as OPENAI_CODEX_TRANSPORT_API_VERSION, St as OPENAI_CODEX_FAST_MODE_MAX_SESSION_ID_LENGTH, T as OpenAICodexTransport, U as PI_AI_PACKAGE, V as COMPATIBILITY_SCHEMA_VERSION, W as SUPPORTED_DSH_PLUGIN_API_VERSION, Y as evaluateCompatibility, Z as OPENAI_CODEX_PROXY_DETECT_PATH, _ as OPENAI_CODEX_IMAGE_MAX_COUNT, _t as resolveOpenAICodexProxyUrl, a as name, at as listOpenAICodexProxyCandidates, b as OPENAI_CODEX_IMAGE_PROMPT_MAX_LENGTH, bt as FastModeRegistry, c as migrateOpenAICodexSearchHistory, ct as DEFAULT_OPENAI_CODEX_SEARCH_MAX_OUTPUT_TOKENS, d as OPENAI_CODEX_BASE_URL, dt as DEFAULT_OPENAI_CODEX_SETTINGS, et as OPENAI_CODEX_PROXY_CANDIDATE_LIMIT, f as OPENAI_CODEX_SEARCH_PROVIDER, ft as OPENAI_CODEX_SETTINGS_NAMESPACE, g as OPENAI_CODEX_IMAGE_GENERATION_URL, h as mapOpenAICodexSearchResponse, ht as isValidOpenAICodexProxyUrl, i as inject, it as detectOpenAICodexProxies, j as diagnoseOpenAICodex, jt as openAICodexAuthStatus, k as IMAGE_GENERATE_TOOL_NAME, kt as loginOpenAICodex, lt as DEFAULT_OPENAI_CODEX_SEARCH_MODE, m as OpenAICodexSearchProvider, mt as isValidOpenAICodexContextWindowOverrides, n as OPENAI_CODEX_SETTINGS_NS, nt as OPENAI_CODEX_PROXY_PROBE_URL, o as OPENAI_CODEX_HISTORY_BACKUP_SUFFIX, ot as DEFAULT_OPENAI_CODEX_PROXY_URL, p as OPENAI_CODEX_SEARCH_URL, pt as decodeOpenAICodexSettings, q as assessCompatibility, r as apply, rt as OpenAICodexProxyManager, s as OPENAI_CODEX_SEARCH_MODEL_REQUEST_EVENT, st as DEFAULT_OPENAI_CODEX_SEARCH_CONTEXT_SIZE, t as Config, tt as OPENAI_CODEX_PROXY_PROBE_TIMEOUT_MS, ut as DEFAULT_OPENAI_CODEX_SEARCH_MODEL, v as OPENAI_CODEX_IMAGE_MAX_ERROR_BYTES, vt as resolveOpenAICodexSettings, w as OPENAI_CODEX_TRANSPORT_SERVICE, x as OPENAI_CODEX_IMAGE_REQUEST_TIMEOUT_MS, xt as OPENAI_CODEX_FAST_MODE_MAX_SESSIONS, y as OPENAI_CODEX_IMAGE_MAX_RESPONSE_BYTES, yt as OPENAI_CODEX_FAST_MODE_PATH, z as COMPATIBILITY_CONTRACT } from "./src-
|
|
1
|
+
import { $ as OPENAI_CODEX_LOCAL_PROXY_CANDIDATES, A as assertNoOpenAICodexProviderConflict, At as logoutOpenAICodex, B as COMPATIBILITY_PACKAGES, C as OPENAI_CODEX_TRANSPORT_ERROR_CODES, Ct as isFastModeSessionId, D as isOpenAICodexTransportError, Dt as parseOpenAICodexUsage, E as OpenAICodexTransportError, Et as OPENAI_CODEX_USAGE_URL, F as checkForOpenAICodexUpdate, Ft as OpenAICodexCredentialStore, G as SUPPORTED_NODE_RANGE, H as DSH_PLUGIN_API_PACKAGES, I as compareOpenAICodexVersions, It as openAICodexAuthPath, J as detectCompatibility, K as SUPPORTED_PI_AI_RANGE, L as parseOpenAICodexUpdateResult, M as openAICodexConflictMessage, Nt as OPENAI_CODEX_AUTH_FILENAME, O as VIEW_IMAGE_TOOL_NAME, Ot as readOpenAICodexRateLimits, P as OPENAI_CODEX_UPDATE_PATH, Pt as OPENAI_CODEX_PROVIDER, Q as OPENAI_CODEX_PROXY_TEST_PATH, R as parseOpenAICodexVersion, S as OPENAI_CODEX_TRANSPORT_API_VERSION, St as OPENAI_CODEX_FAST_MODE_MAX_SESSION_ID_LENGTH, T as OpenAICodexTransport, U as PI_AI_PACKAGE, V as COMPATIBILITY_SCHEMA_VERSION, W as SUPPORTED_DSH_PLUGIN_API_VERSION, Y as evaluateCompatibility, Z as OPENAI_CODEX_PROXY_DETECT_PATH, _ as OPENAI_CODEX_IMAGE_MAX_COUNT, _t as resolveOpenAICodexProxyUrl, a as name, at as listOpenAICodexProxyCandidates, b as OPENAI_CODEX_IMAGE_PROMPT_MAX_LENGTH, bt as FastModeRegistry, c as migrateOpenAICodexSearchHistory, ct as DEFAULT_OPENAI_CODEX_SEARCH_MAX_OUTPUT_TOKENS, d as OPENAI_CODEX_BASE_URL, dt as DEFAULT_OPENAI_CODEX_SETTINGS, et as OPENAI_CODEX_PROXY_CANDIDATE_LIMIT, f as OPENAI_CODEX_SEARCH_PROVIDER, ft as OPENAI_CODEX_SETTINGS_NAMESPACE, g as OPENAI_CODEX_IMAGE_GENERATION_URL, h as mapOpenAICodexSearchResponse, ht as isValidOpenAICodexProxyUrl, i as inject, it as detectOpenAICodexProxies, j as diagnoseOpenAICodex, jt as openAICodexAuthStatus, k as IMAGE_GENERATE_TOOL_NAME, kt as loginOpenAICodex, lt as DEFAULT_OPENAI_CODEX_SEARCH_MODE, m as OpenAICodexSearchProvider, mt as isValidOpenAICodexContextWindowOverrides, n as OPENAI_CODEX_SETTINGS_NS, nt as OPENAI_CODEX_PROXY_PROBE_URL, o as OPENAI_CODEX_HISTORY_BACKUP_SUFFIX, ot as DEFAULT_OPENAI_CODEX_PROXY_URL, p as OPENAI_CODEX_SEARCH_URL, pt as decodeOpenAICodexSettings, q as assessCompatibility, r as apply, rt as OpenAICodexProxyManager, s as OPENAI_CODEX_SEARCH_MODEL_REQUEST_EVENT, st as DEFAULT_OPENAI_CODEX_SEARCH_CONTEXT_SIZE, t as Config, tt as OPENAI_CODEX_PROXY_PROBE_TIMEOUT_MS, ut as DEFAULT_OPENAI_CODEX_SEARCH_MODEL, v as OPENAI_CODEX_IMAGE_MAX_ERROR_BYTES, vt as resolveOpenAICodexSettings, w as OPENAI_CODEX_TRANSPORT_SERVICE, x as OPENAI_CODEX_IMAGE_REQUEST_TIMEOUT_MS, xt as OPENAI_CODEX_FAST_MODE_MAX_SESSIONS, y as OPENAI_CODEX_IMAGE_MAX_RESPONSE_BYTES, yt as OPENAI_CODEX_FAST_MODE_PATH, z as COMPATIBILITY_CONTRACT } from "./src-Di2xxpDv.js";
|
|
2
2
|
export { COMPATIBILITY_CONTRACT, COMPATIBILITY_PACKAGES, COMPATIBILITY_SCHEMA_VERSION, Config, DEFAULT_OPENAI_CODEX_PROXY_URL, DEFAULT_OPENAI_CODEX_SEARCH_CONTEXT_SIZE, DEFAULT_OPENAI_CODEX_SEARCH_MAX_OUTPUT_TOKENS, DEFAULT_OPENAI_CODEX_SEARCH_MODE, DEFAULT_OPENAI_CODEX_SEARCH_MODEL, DEFAULT_OPENAI_CODEX_SETTINGS, DSH_PLUGIN_API_PACKAGES, FastModeRegistry, FastModeRegistry as OpenAICodexFastModeRegistry, IMAGE_GENERATE_TOOL_NAME, OPENAI_CODEX_AUTH_FILENAME, OPENAI_CODEX_BASE_URL, OPENAI_CODEX_FAST_MODE_MAX_SESSIONS, OPENAI_CODEX_FAST_MODE_MAX_SESSION_ID_LENGTH, OPENAI_CODEX_FAST_MODE_PATH, OPENAI_CODEX_HISTORY_BACKUP_SUFFIX, OPENAI_CODEX_IMAGE_GENERATION_URL, OPENAI_CODEX_IMAGE_MAX_COUNT, OPENAI_CODEX_IMAGE_MAX_ERROR_BYTES, OPENAI_CODEX_IMAGE_MAX_RESPONSE_BYTES, OPENAI_CODEX_IMAGE_PROMPT_MAX_LENGTH, OPENAI_CODEX_IMAGE_REQUEST_TIMEOUT_MS, OPENAI_CODEX_LOCAL_PROXY_CANDIDATES, OPENAI_CODEX_PROVIDER, OPENAI_CODEX_PROXY_CANDIDATE_LIMIT, OPENAI_CODEX_PROXY_DETECT_PATH, OPENAI_CODEX_PROXY_PROBE_TIMEOUT_MS, OPENAI_CODEX_PROXY_PROBE_URL, OPENAI_CODEX_PROXY_TEST_PATH, OPENAI_CODEX_SEARCH_MODEL_REQUEST_EVENT, OPENAI_CODEX_SEARCH_PROVIDER, OPENAI_CODEX_SEARCH_URL, OPENAI_CODEX_SETTINGS_NAMESPACE, OPENAI_CODEX_SETTINGS_NS, OPENAI_CODEX_TRANSPORT_API_VERSION, OPENAI_CODEX_TRANSPORT_ERROR_CODES, OPENAI_CODEX_TRANSPORT_SERVICE, OPENAI_CODEX_UPDATE_PATH, OPENAI_CODEX_USAGE_URL, OpenAICodexCredentialStore, OpenAICodexProxyManager, OpenAICodexSearchProvider, OpenAICodexTransport, OpenAICodexTransportError, PI_AI_PACKAGE, SUPPORTED_DSH_PLUGIN_API_VERSION, SUPPORTED_NODE_RANGE, SUPPORTED_PI_AI_RANGE, VIEW_IMAGE_TOOL_NAME, apply, assertNoOpenAICodexProviderConflict, assessCompatibility, checkForOpenAICodexUpdate, compareOpenAICodexVersions, decodeOpenAICodexSettings, detectCompatibility, detectOpenAICodexProxies, diagnoseOpenAICodex, evaluateCompatibility, inject, isFastModeSessionId, isOpenAICodexTransportError, isValidOpenAICodexContextWindowOverrides, isValidOpenAICodexProxyUrl, listOpenAICodexProxyCandidates, loginOpenAICodex, logoutOpenAICodex, mapOpenAICodexSearchResponse, migrateOpenAICodexSearchHistory, name, openAICodexAuthPath, openAICodexAuthStatus, openAICodexConflictMessage, parseOpenAICodexUpdateResult, parseOpenAICodexUsage, parseOpenAICodexVersion, readOpenAICodexRateLimits, resolveOpenAICodexProxyUrl, resolveOpenAICodexSettings };
|
|
@@ -1831,10 +1831,12 @@ const OPENAI_CODEX_RELEASE_API_BASE = "https://api.github.com/repos/franksong270
|
|
|
1831
1831
|
const OPENAI_CODEX_RELEASE_PAGE_BASE = "https://github.com/franksong2702/dsh-codex-connect/releases/tag/v";
|
|
1832
1832
|
const OPENAI_CODEX_UPDATE_HIGHLIGHTS_URL = "https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/update-highlights.json";
|
|
1833
1833
|
const OPENAI_CODEX_VERIFIED_COMPATIBILITY_URL = "https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/verified-compatibility.json";
|
|
1834
|
+
const OPENAI_CODEX_CANARY_TRACKER_SEARCH_API_URL = "https://api.github.com/search/issues";
|
|
1834
1835
|
const OPENAI_CODEX_UPDATE_MAX_METADATA_BYTES = 65536;
|
|
1835
1836
|
const OPENAI_CODEX_UPDATE_MAX_HIGHLIGHTS_BYTES = 65536;
|
|
1836
1837
|
const OPENAI_CODEX_UPDATE_MAX_COMPATIBILITY_BYTES = 65536;
|
|
1837
1838
|
const OPENAI_CODEX_UPDATE_MAX_RELEASE_BYTES = 32768;
|
|
1839
|
+
const OPENAI_CODEX_UPDATE_MAX_TRACKER_BYTES = 32768;
|
|
1838
1840
|
const HIGHLIGHT_KINDS = [
|
|
1839
1841
|
"trusted-origins",
|
|
1840
1842
|
"runtime-compatibility",
|
|
@@ -1988,11 +1990,18 @@ function evaluateOpenAICodexDshCompatibility(currentVersion, latestPluginVersion
|
|
|
1988
1990
|
latestPluginVersion,
|
|
1989
1991
|
latestDshVersion: catalog.latestDshVersion
|
|
1990
1992
|
};
|
|
1991
|
-
return {
|
|
1992
|
-
status:
|
|
1993
|
+
if (catalog.pluginVersions.some((plugin) => plugin.version === latestPluginVersion && plugin.verifiedDshVersions.includes(catalog.latestDshVersion)) && compareOpenAICodexVersions(currentDshVersion, catalog.latestDshVersion) < 0) return {
|
|
1994
|
+
status: "dsh-update-required",
|
|
1993
1995
|
latestPluginVersion,
|
|
1994
1996
|
latestDshVersion: catalog.latestDshVersion
|
|
1995
1997
|
};
|
|
1998
|
+
const currentDshAtOrBeyondLatest = compareOpenAICodexVersions(currentDshVersion, catalog.latestDshVersion) >= 0;
|
|
1999
|
+
return {
|
|
2000
|
+
status: currentDshAtOrBeyondLatest ? "not-yet-compatible" : "unverified",
|
|
2001
|
+
latestPluginVersion,
|
|
2002
|
+
latestDshVersion: catalog.latestDshVersion,
|
|
2003
|
+
...currentDshAtOrBeyondLatest ? { reportCompatibilityGap: true } : {}
|
|
2004
|
+
};
|
|
1996
2005
|
}
|
|
1997
2006
|
function boundedText(value, maxBytes) {
|
|
1998
2007
|
if (new TextEncoder().encode(value).byteLength > maxBytes) throw new RangeError("update response is too large");
|
|
@@ -2097,12 +2106,49 @@ async function releaseDetails(version, fetchImpl, timeoutMs) {
|
|
|
2097
2106
|
}
|
|
2098
2107
|
}
|
|
2099
2108
|
async function dshCompatibilityAdvice(currentVersion, latestPluginVersion, currentDshVersion, fetchImpl, timeoutMs) {
|
|
2109
|
+
let catalog;
|
|
2100
2110
|
try {
|
|
2101
2111
|
const { response, text } = await fetchBounded(fetchImpl, OPENAI_CODEX_VERIFIED_COMPATIBILITY_URL, OPENAI_CODEX_UPDATE_MAX_COMPATIBILITY_BYTES, timeoutMs, { accept: "application/json" });
|
|
2102
|
-
if (
|
|
2103
|
-
return evaluateOpenAICodexDshCompatibility(currentVersion, latestPluginVersion, currentDshVersion, parseOpenAICodexVerifiedCompatibility(JSON.parse(text)));
|
|
2112
|
+
if (response.ok) catalog = parseOpenAICodexVerifiedCompatibility(JSON.parse(text));
|
|
2104
2113
|
} catch {
|
|
2105
|
-
|
|
2114
|
+
catalog = void 0;
|
|
2115
|
+
}
|
|
2116
|
+
const advice = evaluateOpenAICodexDshCompatibility(currentVersion, latestPluginVersion, currentDshVersion, catalog);
|
|
2117
|
+
if (advice.reportCompatibilityGap !== true || currentDshVersion === void 0) return advice;
|
|
2118
|
+
const trackerUrl = await findOpenAICodexCanaryTracker(currentDshVersion, fetchImpl, timeoutMs);
|
|
2119
|
+
return trackerUrl === void 0 ? advice : {
|
|
2120
|
+
...advice,
|
|
2121
|
+
trackerUrl
|
|
2122
|
+
};
|
|
2123
|
+
}
|
|
2124
|
+
function canaryTrackerSearchUrl(version) {
|
|
2125
|
+
const params = new URLSearchParams({
|
|
2126
|
+
q: `repo:franksong2702/dsh-codex-connect is:issue in:title "compatibility: track DSH ${version}"`,
|
|
2127
|
+
per_page: "5"
|
|
2128
|
+
});
|
|
2129
|
+
return `${OPENAI_CODEX_CANARY_TRACKER_SEARCH_API_URL}?${params.toString()}`;
|
|
2130
|
+
}
|
|
2131
|
+
function validCanaryTrackerUrl(value) {
|
|
2132
|
+
return typeof value === "string" && /^https:\/\/github\.com\/franksong2702\/dsh-codex-connect\/issues\/[1-9]\d*$/u.test(value);
|
|
2133
|
+
}
|
|
2134
|
+
async function findOpenAICodexCanaryTracker(version, fetchImpl, timeoutMs) {
|
|
2135
|
+
try {
|
|
2136
|
+
const { response, text } = await fetchBounded(fetchImpl, canaryTrackerSearchUrl(version), OPENAI_CODEX_UPDATE_MAX_TRACKER_BYTES, timeoutMs, { accept: "application/vnd.github+json" });
|
|
2137
|
+
if (!response.ok) return void 0;
|
|
2138
|
+
const value = JSON.parse(text);
|
|
2139
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return void 0;
|
|
2140
|
+
const items = value["items"];
|
|
2141
|
+
if (!Array.isArray(items) || items.length > 5) return void 0;
|
|
2142
|
+
const expectedTitle = `compatibility: track DSH ${version}`;
|
|
2143
|
+
const expectedMarker = `<!-- dsh-canary:${version} -->`;
|
|
2144
|
+
for (const item of items) {
|
|
2145
|
+
if (typeof item !== "object" || item === null || Array.isArray(item)) continue;
|
|
2146
|
+
const issue = item;
|
|
2147
|
+
if (issue["title"] === expectedTitle && typeof issue["body"] === "string" && issue["body"].includes(expectedMarker) && issue["pull_request"] === void 0 && validCanaryTrackerUrl(issue["html_url"])) return issue["html_url"];
|
|
2148
|
+
}
|
|
2149
|
+
return;
|
|
2150
|
+
} catch {
|
|
2151
|
+
return;
|
|
2106
2152
|
}
|
|
2107
2153
|
}
|
|
2108
2154
|
/** Check npm's public dist-tags and enrich an available update with public release notes. */
|
|
@@ -2242,9 +2288,14 @@ function parseOpenAICodexDshCompatibilityAdvice(value, latestPluginVersion) {
|
|
|
2242
2288
|
if (typeof value !== "object" || value === null || Array.isArray(value)) return void 0;
|
|
2243
2289
|
const record = value;
|
|
2244
2290
|
const status = record["status"];
|
|
2245
|
-
if (status !== "compatible" && status !== "plugin-update-required" && status !== "not-yet-compatible" && status !== "unverified") return void 0;
|
|
2291
|
+
if (status !== "compatible" && status !== "plugin-update-required" && status !== "dsh-update-required" && status !== "not-yet-compatible" && status !== "unverified") return void 0;
|
|
2246
2292
|
if (record["latestPluginVersion"] !== latestPluginVersion) return void 0;
|
|
2247
2293
|
const latestDshVersion = record["latestDshVersion"];
|
|
2294
|
+
const reportCompatibilityGap = record["reportCompatibilityGap"];
|
|
2295
|
+
const trackerUrl = record["trackerUrl"];
|
|
2296
|
+
if (reportCompatibilityGap !== void 0 && reportCompatibilityGap !== true) return void 0;
|
|
2297
|
+
if (reportCompatibilityGap === true && status !== "not-yet-compatible") return void 0;
|
|
2298
|
+
if (trackerUrl !== void 0 && (reportCompatibilityGap !== true || !validCanaryTrackerUrl(trackerUrl))) return void 0;
|
|
2248
2299
|
if (status === "unverified") {
|
|
2249
2300
|
if (latestDshVersion === void 0) return {
|
|
2250
2301
|
status,
|
|
@@ -2261,7 +2312,9 @@ function parseOpenAICodexDshCompatibilityAdvice(value, latestPluginVersion) {
|
|
|
2261
2312
|
return {
|
|
2262
2313
|
status,
|
|
2263
2314
|
latestPluginVersion,
|
|
2264
|
-
latestDshVersion
|
|
2315
|
+
latestDshVersion,
|
|
2316
|
+
...reportCompatibilityGap === true ? { reportCompatibilityGap: true } : {},
|
|
2317
|
+
...trackerUrl === void 0 ? {} : { trackerUrl }
|
|
2265
2318
|
};
|
|
2266
2319
|
}
|
|
2267
2320
|
//#endregion
|
|
@@ -2510,7 +2563,7 @@ function registerOpenAICodexOriginalImageRoute(ctx, trustedOrigins, assets) {
|
|
|
2510
2563
|
}
|
|
2511
2564
|
//#endregion
|
|
2512
2565
|
//#region src/version.ts
|
|
2513
|
-
const CODEX_CONNECT_VERSION = "0.1.0-alpha.4.
|
|
2566
|
+
const CODEX_CONNECT_VERSION = "0.1.0-alpha.4.25";
|
|
2514
2567
|
//#endregion
|
|
2515
2568
|
//#region src/doctor.ts
|
|
2516
2569
|
/** Secret-free diagnostics and duplicate-provider guidance. */
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dsh-codex-connect",
|
|
3
3
|
"displayName": "Codex Connect",
|
|
4
4
|
"description": "ChatGPT OAuth and Codex models for DeepSeek Harness.",
|
|
5
|
-
"version": "0.1.0-alpha.4.
|
|
5
|
+
"version": "0.1.0-alpha.4.25",
|
|
6
6
|
"author": "Frank Song",
|
|
7
7
|
"contributors": [
|
|
8
8
|
"Yan-Zero (original dsh-codex author)"
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"@types/node": "^22.20.0",
|
|
196
196
|
"@types/react": "~18.3.1",
|
|
197
197
|
"@types/react-dom": "~18.3.1",
|
|
198
|
-
"@vitest/browser-playwright": "4.1.
|
|
198
|
+
"@vitest/browser-playwright": "4.1.11",
|
|
199
199
|
"jsdom": "29.1.1",
|
|
200
200
|
"playwright": "1.62.1",
|
|
201
201
|
"react": "^18.2.0",
|