dsh-codex-connect 0.1.0-alpha.4.21 → 0.1.0-alpha.4.22
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 +15 -2
- package/README.i18n.yaml +2 -2
- package/README.md +41 -6
- package/compatibility.json +3 -2
- package/docs/README.zh.md +41 -6
- package/docs/design.i18n.yaml +2 -2
- package/docs/design.md +1 -1
- package/docs/design.zh.md +1 -1
- package/lib/bin.js +2 -2
- package/lib/client.js +957 -248
- package/lib/index.d.ts +39 -11
- package/lib/index.js +2 -2
- package/lib/{src-Cxq99TvF.js → src-kwF-uZCG.js} +229 -57
- package/package.json +81 -54
package/INSTALL.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Installation Runbook for CLI Agents
|
|
2
2
|
|
|
3
|
+
Alpha 4.22 is verified with DSH `0.1.2-alpha.2` and its declared pi-ai range `^0.84.2`; the verified registry installation resolves pi-ai `0.84.4`.
|
|
4
|
+
|
|
3
5
|
Install `dsh-codex-connect` into one requested DeepSeek Harness profile without changing its current default model, search route, global configuration, or OAuth state.
|
|
4
6
|
|
|
5
7
|
## Safety requirements
|
|
@@ -20,10 +22,11 @@ Check `dsh --version` before changing the requested profile. Use `dsh --help` to
|
|
|
20
22
|
| --- | --- |
|
|
21
23
|
| `0.1.0-rc.7` | `0.1.0-alpha.4.14` |
|
|
22
24
|
| `0.1.1-rc.2` | `0.1.0-alpha.4.21` |
|
|
25
|
+
| `0.1.2-alpha.2` | `0.1.0-alpha.4.22` |
|
|
23
26
|
|
|
24
27
|
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.
|
|
25
28
|
|
|
26
|
-
Alpha 4.
|
|
29
|
+
Alpha 4.22's verified contract is DSH plugin API packages `0.1.2-alpha.2`, `@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.21 remains the verified choice for DSH `0.1.1-rc.2`; 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.
|
|
27
30
|
|
|
28
31
|
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).
|
|
29
32
|
|
|
@@ -42,7 +45,13 @@ These choices reflect the repository's existing verification record, not a new i
|
|
|
42
45
|
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.21
|
|
43
46
|
```
|
|
44
47
|
|
|
45
|
-
|
|
48
|
+
After the matching package is published, use Alpha 4.22 with DSH `0.1.2-alpha.2`:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.22
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
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, or `dsh plugin --profile web add 'github:franksong2702/dsh-codex-connect#v0.1.0-alpha.4.22'` only for the DSH `0.1.2-alpha.2` combination.
|
|
46
55
|
|
|
47
56
|
3. Run `dsh --profile web --dump-config` and require exactly one `llm-openai-codex` row loading `dsh-codex-connect`.
|
|
48
57
|
4. Confirm the effective `agent-default-model` and `web.searchProvider` values are unchanged from before installation.
|
|
@@ -54,6 +63,10 @@ These choices reflect the repository's existing verification record, not a new i
|
|
|
54
63
|
|
|
55
64
|
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.
|
|
56
65
|
|
|
66
|
+
Alpha 4.22 additionally offers the same account actions in **Settings → Models → Openai-Codex**, plus a shared **More settings** dialog for model visibility, proxy, search, image, and context-budget controls. The original Plugin settings entry remains available; neither entry automatically starts login or changes model/search defaults.
|
|
67
|
+
|
|
68
|
+
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).
|
|
69
|
+
|
|
57
70
|
### Remote browser access
|
|
58
71
|
|
|
59
72
|
The default Web OAuth boundary is loopback-only. When DSH runs on one device and you open it from another device on a trusted network through an IP address or domain, run the following on the device that runs DSH with the exact origin from the browser address bar:
|
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: a70138a6cef1b38bf564eb3d187046a2388305a1
|
|
6
|
+
docs/README.zh.md: f44a46b738a80bbb13765bb27f9424890c6d8663
|
package/README.md
CHANGED
|
@@ -28,13 +28,14 @@ dsh plugin --profile web add dsh-codex-connect@alpha
|
|
|
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
|
+
After its matching package is published, install Alpha 4.22 exactly with `dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.22`.
|
|
32
32
|
|
|
33
|
-
### What's new in Alpha 4.
|
|
33
|
+
### What's new in Alpha 4.22
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
35
|
+
- Target the DSH `0.1.2-alpha.2` client settings and session-controller APIs together with its declared `@earendil-works/pi-ai` range `^0.84.2`.
|
|
36
|
+
- Manage ChatGPT authorization, quota and shared Codex Connect settings from a compact **Openai-Codex** card in **Settings → Models**, while retaining the original Plugin settings entry.
|
|
37
|
+
- Continue, cancel or retry an interrupted browser authorization without restarting DSH or deleting an existing credential. The full authorization flow has a configurable bounded deadline.
|
|
38
|
+
- Adjust a bounded local context budget per visible Codex model with a linked slider and numeric input. Catalog defaults remain in effect until an override is saved; the configuration limit is not a claim about the service-side context capacity.
|
|
38
39
|
|
|
39
40
|
### Version updates
|
|
40
41
|
|
|
@@ -68,6 +69,10 @@ Expected result: the Harness web UI opens for the selected profile.
|
|
|
68
69
|
|
|
69
70
|
Open **Settings → Plugins → Plugin configuration → Codex Connect**.
|
|
70
71
|
|
|
72
|
+
Alpha 4.22 for DSH `0.1.2-alpha.2` also includes an **Openai-Codex** account card in **Settings → Models**, with the attribution “Powered by the Codex Connect plugin.” for ChatGPT sign-in, reauthorization, sign-out and quota. Both pages share one in-memory account state and polling owner. **More settings** opens the existing 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.
|
|
73
|
+
|
|
74
|
+
The compact Models row shows **Authorize** when signed out, or **Sign out** and **View quota** when signed in. Expanding quota shows only the server-reported usage rows, without repeating account controls. If browser authorization is interrupted, use **Continue authorization** in Models (**Reopen authorization** in Plugins) to resume the pending login, or **Cancel sign-in** and retry from either settings page or another trusted browser. Cancellation preserves an existing signed-in account. An abandoned authorization expires after 10 minutes by default; the plugin's `oauthTimeoutMs` configuration accepts 1,000–1,800,000 milliseconds and applies when the plugin loads. The separate 30-second wait for the initial authorization URL remains bounded. Neither cancellation nor expiry restarts DSH.
|
|
75
|
+
|
|
71
76
|
Expected result: a fresh installation shows **Not signed in** and a **Sign in with ChatGPT** button. The card is where you later manage optional capabilities too.
|
|
72
77
|
|
|
73
78
|
<p align="center">
|
|
@@ -229,6 +234,7 @@ Selecting Codex as the profile's global search route is another explicit change:
|
|
|
229
234
|
| `models` | full catalog | Codex model id array; empty hides all entries |
|
|
230
235
|
| `enableProxy` | `false` | boolean; direct connection unless explicitly enabled |
|
|
231
236
|
| `proxyUrl` | `http://127.0.0.1:7890` (inactive placeholder) | Credential-free HTTP(S) proxy origin |
|
|
237
|
+
| `contextWindowOverrides` | none | Per-model context-window override map; see below |
|
|
232
238
|
| `enableSearch` | `false` | boolean |
|
|
233
239
|
| `enableImageTool` | `false` | boolean |
|
|
234
240
|
| `enableImageGeneration` | `false` | boolean |
|
|
@@ -237,6 +243,34 @@ Selecting Codex as the profile's global search route is another explicit change:
|
|
|
237
243
|
| `searchContextSize` | `medium` | `low`, `medium`, `high` |
|
|
238
244
|
| `searchMaxOutputTokens` | `10000` | positive integer |
|
|
239
245
|
|
|
246
|
+
### Context-window overrides
|
|
247
|
+
|
|
248
|
+
Use `contextWindowOverrides` to opt into a per-model client context budget when you have evidence that the bundled catalog does not fit your deployment. It cannot enlarge the OpenAI backend's context capacity. Overrides default off; this feature does not verify the community-reported larger windows.
|
|
249
|
+
|
|
250
|
+
In Plugin configuration and **Models → More settings**, each model row shows its numeric context budget and keeps its visibility checkbox. **Context → Adjust** opens a synchronized slider and integer input, with the installed catalog default and a configuration ceiling. **Restore default** uses the catalog value even if composition supplies an override. Hiding a model preserves its budget. **Save** applies staged edits; **Discard** abandons them. An empty input is invalid, not a reset.
|
|
251
|
+
|
|
252
|
+
Configuration ceilings follow the [official Codex catalog snapshot](https://github.com/openai/codex/blob/7625343977154efed8c0dadba956374992a1580b/codex-rs/models-manager/models.json), checked on 2026-08-28: GPT-5.6 Sol/Terra/Luna allow up to 872,000 tokens, GPT-5.4 up to 1,000,000, and GPT-5.5/GPT-5.4 mini up to 272,000. Models without a recorded ceiling, including Spark, are capped at their installed provider default. A provider default newer than and larger than the recorded ceiling also becomes the cap. The UI identifies the source; these values are not fetched from the user's account and are not measured server capacities. Defaults remain unchanged. Going above the default displays a quota and request-failure warning; account and route limits may differ.
|
|
253
|
+
|
|
254
|
+
```yaml
|
|
255
|
+
- id: llm-openai-codex
|
|
256
|
+
config:
|
|
257
|
+
contextWindowOverrides:
|
|
258
|
+
# Illustration only: 350000 is not a verified or recommended server limit.
|
|
259
|
+
gpt-5.6-sol: 350000
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Keys must exactly match models in the installed Codex catalog. Maps accept at most 256 entries and positive safe-integer token counts within each model's configuration ceiling. Unknown ids and out-of-range values reject configuration or settings registration/writes with an explicit error; existing out-of-range overrides must be reduced or reset with `null`, not silently clamped. Other models keep their catalog metadata. Output-token limits, transport (SSE), and DSH's compaction policy are unchanged. Leave room for output and protocol overhead below your independently verified server limit. For a deployment configured to compact at 80%, a client window of `350000` gives a nominal threshold of `280000`; this arithmetic is not evidence that the server accepts that input size.
|
|
263
|
+
|
|
264
|
+
Persisted Host settings are applied on plugin load, and changes affect the next model resolution or prepared request. Already prepared requests retain their captured budget. The original catalog is never mutated.
|
|
265
|
+
|
|
266
|
+
To restore defaults, distinguish the settings layers:
|
|
267
|
+
|
|
268
|
+
- A resolved empty map `{}` or no override uses catalog windows.
|
|
269
|
+
- DSH recursively merges settings maps. Updating an existing map with `{}` is therefore not a clear operation.
|
|
270
|
+
- Set `contextWindowOverrides: null` to explicitly disable all overrides, including values inherited from composition.
|
|
271
|
+
- Set a model entry to `null` to restore only that model's catalog default while preserving other overrides. The UI saves explicit per-model masks so restored defaults do not re-inherit composition values.
|
|
272
|
+
- Removing the stored field re-inherits composition settings; with no composition override, it restores catalog windows. Removing one stored model entry similarly restores that model's composition or catalog value.
|
|
273
|
+
|
|
240
274
|
## Reauthentication, diagnostics, and conflicts
|
|
241
275
|
|
|
242
276
|
- If the card says **Sign in again** or the server asks for reauthentication, click that action and complete the same safe browser flow. It preserves this plugin's capability settings and does not silently change your default model or global search route. Do not run `logout` just to renew a session.
|
|
@@ -273,7 +307,8 @@ This report covers only the standalone route, not active profile routing, search
|
|
|
273
307
|
|
|
274
308
|
## Compatibility and security boundary
|
|
275
309
|
|
|
276
|
-
-
|
|
310
|
+
- Alpha 4.22 is verified with DSH plugin API packages `0.1.2-alpha.2`, `@earendil-works/pi-ai` `^0.84.2` (resolved as `0.84.4` during verification), and Node.js `^22.19.0 || >=24.0.0`. Published 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.
|
|
311
|
+
- 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.
|
|
277
312
|
- 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.
|
|
278
313
|
- 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.
|
|
279
314
|
- ChatGPT plan eligibility, model access, quotas, and backend behavior are controlled by OpenAI and may change.
|
package/compatibility.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"node": "^22.19.0 || >=24.0.0"
|
|
5
5
|
},
|
|
6
6
|
"dshPluginApi": {
|
|
7
|
-
"version": "0.1.
|
|
7
|
+
"version": "0.1.2-alpha.2",
|
|
8
8
|
"packages": [
|
|
9
9
|
"@deepseek-ai/dsh-agent",
|
|
10
10
|
"@deepseek-ai/dsh-atomic-write",
|
|
@@ -18,11 +18,12 @@
|
|
|
18
18
|
"@deepseek-ai/dsh-session",
|
|
19
19
|
"@deepseek-ai/dsh-settings",
|
|
20
20
|
"@deepseek-ai/dsh-tools",
|
|
21
|
+
"@deepseek-ai/dsh-util-values",
|
|
21
22
|
"@deepseek-ai/dsh-web"
|
|
22
23
|
]
|
|
23
24
|
},
|
|
24
25
|
"piAi": {
|
|
25
26
|
"package": "@earendil-works/pi-ai",
|
|
26
|
-
"version": "0.
|
|
27
|
+
"version": "^0.84.2"
|
|
27
28
|
}
|
|
28
29
|
}
|
package/docs/README.zh.md
CHANGED
|
@@ -28,13 +28,14 @@ dsh plugin --profile web add dsh-codex-connect@alpha
|
|
|
28
28
|
|
|
29
29
|
预期结果:包被加入该 profile。这个动作不会更改 profile 的默认模型或全局搜索路由。
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
匹配的 npm 包发布后,使用 `dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.22` 可以精确安装 Alpha 4.22。
|
|
32
32
|
|
|
33
|
-
### Alpha 4.
|
|
33
|
+
### Alpha 4.22 更新内容
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
35
|
+
- 同时适配 DSH `0.1.2-alpha.2` 的客户端设置、会话控制器接口及其声明的 `@earendil-works/pi-ai` 版本范围 `^0.84.2`。
|
|
36
|
+
- 在 **设置 → 模型** 中提供紧凑的 **Openai-Codex** 卡片,用于 ChatGPT 授权、额度和共享 Codex Connect 设置,同时保留原插件设置入口。
|
|
37
|
+
- 浏览器授权中断后,可以继续、取消或重试,不需要重启 DSH,也不会删除已有凭据;完整授权流程使用可配置且有范围限制的期限。
|
|
38
|
+
- 使用联动的滑条和数字输入框,逐模型调整有范围限制的本地上下文预算。保存覆盖值前继续使用目录默认值;配置上限不代表服务端上下文容量。
|
|
38
39
|
|
|
39
40
|
### 版本更新提醒
|
|
40
41
|
|
|
@@ -68,6 +69,10 @@ dsh web
|
|
|
68
69
|
|
|
69
70
|
打开 **设置 → 插件 → 插件配置 → Codex Connect**。
|
|
70
71
|
|
|
72
|
+
面向 DSH `0.1.2-alpha.2` 的 Alpha 4.22 还在 **设置 → 模型** 中提供 **Openai-Codex** 账户卡,辅助文案标注“由 Codex Connect 插件提供支持。”,用于 ChatGPT 登录、重新授权、退出和查看额度。两个页面共用同一份内存账户状态及轮询。**更多设置** 会在弹窗中打开现有的代理、模型显示、搜索、图片和上下文预算配置表单,原插件设置入口仍保留。两处保存到同一份配置;关闭弹窗或按 Escape 会放弃弹窗内未保存的修改。模型页底部入口是可选增强:没有该设置分区的 profile 仍保留原插件入口。
|
|
73
|
+
|
|
74
|
+
模型页紧凑卡片在未登录时显示 **授权**,已登录时显示 **退出登录** 和 **查看额度**。展开后只显示服务端返回的额度条目,不再重复账户操作。浏览器授权中断后,可以点击模型页的 **继续授权**(插件页为 **重新打开授权**)继续原登录,或点击 **取消登录** 后,从任一设置页或另一个受信任浏览器重试。取消不会退出已有账户。未完成的授权默认在 10 分钟后到期;插件配置 `oauthTimeoutMs` 可设为 1,000–1,800,000 毫秒,在插件加载时生效。获取初始授权链接仍有独立的 30 秒等待上限。取消和到期都不需要重启 DSH。
|
|
75
|
+
|
|
71
76
|
预期结果:新安装时账户区显示 **尚未登录**,并出现 **使用 ChatGPT 登录** 按钮。之后管理可选能力也在同一张卡片中完成。
|
|
72
77
|
|
|
73
78
|
<p align="center">
|
|
@@ -229,6 +234,7 @@ Codex Connect 默认使用**直连**。代理是可选项,只作用于本插
|
|
|
229
234
|
| `models` | 完整目录 | Codex model id 数组;空数组隐藏全部条目 |
|
|
230
235
|
| `enableProxy` | `false` | boolean;除非显式启用,否则使用直连 |
|
|
231
236
|
| `proxyUrl` | `http://127.0.0.1:7890`(未启用的占位值) | 不带凭据的 HTTP(S) proxy origin |
|
|
237
|
+
| `contextWindowOverrides` | 无 | 按模型覆盖 contextWindow 的映射;见下文 |
|
|
232
238
|
| `enableSearch` | `false` | boolean |
|
|
233
239
|
| `enableImageTool` | `false` | boolean |
|
|
234
240
|
| `enableImageGeneration` | `false` | boolean |
|
|
@@ -237,6 +243,34 @@ Codex Connect 默认使用**直连**。代理是可选项,只作用于本插
|
|
|
237
243
|
| `searchContextSize` | `medium` | `low`、`medium`、`high` |
|
|
238
244
|
| `searchMaxOutputTokens` | `10000` | 正整数 |
|
|
239
245
|
|
|
246
|
+
### 上下文窗口覆盖
|
|
247
|
+
|
|
248
|
+
当你有证据表明内置目录不适合当前部署时,可通过 `contextWindowOverrides` 主动设置每个模型的客户端上下文预算。它不能扩大 OpenAI 后端的上下文容量。默认不启用;此功能并未验证社区报告的更大窗口。
|
|
249
|
+
|
|
250
|
+
在插件配置和“模型 → 更多设置”中,每个模型行显示具体的上下文预算,并保留显示勾选框。“上下文 → 调整”展开双向同步的滑条和整数输入框,同时显示已安装目录的默认值及配置上限。“恢复默认”使用目录值,即使启动配置中有覆盖值也不例外。隐藏模型会保留其预算。“保存”提交暂存修改,“放弃”撤销修改。清空输入框属于无效输入,不等于恢复默认。
|
|
251
|
+
|
|
252
|
+
配置上限依据于 2026-08-28 核对的 [Codex 官方目录快照](https://github.com/openai/codex/blob/7625343977154efed8c0dadba956374992a1580b/codex-rs/models-manager/models.json):GPT-5.6 Sol/Terra/Luna 为 872,000 tokens,GPT-5.4 为 1,000,000,GPT-5.5/GPT-5.4 mini 为 272,000。没有已记录上限的模型(包括 Spark)暂以已安装提供方目录的默认值为上限;如果更新后的提供方默认值高于已记录上限,也以该默认值为上限。界面会标明依据;这些数值不是从用户账号动态获取的,也不是实测的服务端容量。默认值保持不变;超过默认值会提示额度消耗及请求失败风险,账号和通道限制可能不同。
|
|
253
|
+
|
|
254
|
+
```yaml
|
|
255
|
+
- id: llm-openai-codex
|
|
256
|
+
config:
|
|
257
|
+
contextWindowOverrides:
|
|
258
|
+
# 仅为示例:350000 不是已验证或推荐的服务端上限。
|
|
259
|
+
gpt-5.6-sol: 350000
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
键必须与已安装 Codex 目录中的模型 ID 完全一致。映射最多包含 256 项,token 数必须是模型配置上限内的正安全整数。未知 ID 或超范围数值会使配置或设置注册、写入明确报错;已有的超范围覆盖值需要调低或用 `null` 恢复默认,不会被静默截断。其他模型保留目录元数据。输出 token 上限、SSE 传输和 DSH 的压缩策略不变。请在独立验证过的服务端上限内,为输出及协议开销预留空间。如果部署设置为在 80% 时压缩,客户端窗口 `350000` 对应的名义阈值是 `280000`;这个算式不证明服务端接受这么大的输入。
|
|
263
|
+
|
|
264
|
+
插件加载时会应用持久化的 Host 设置,运行中修改会作用于下一次模型解析或请求准备。已经准备好的请求保留当时的预算快照。原始模型目录不会被修改。
|
|
265
|
+
|
|
266
|
+
恢复默认值时,需要区分配置层:
|
|
267
|
+
|
|
268
|
+
- 最终生效的映射为 `{}` 或没有覆盖时,使用目录窗口。
|
|
269
|
+
- DSH 会递归合并设置映射,因此用 `{}` 更新已有映射不等于清空。
|
|
270
|
+
- 设置 `contextWindowOverrides: null` 可明确关闭所有覆盖,包括从启动配置继承的值。
|
|
271
|
+
- 将某个模型条目设为 `null`,可只恢复该模型的目录默认值,保留其他覆盖。界面保存时会为默认模型写入明确的空值标记,防止恢复默认后重新继承启动配置值。
|
|
272
|
+
- 删除持久化字段会重新继承启动配置;启动配置没有覆盖时,恢复目录窗口。删除某个持久化模型条目,同样会恢复该模型的启动配置值或目录值。
|
|
273
|
+
|
|
240
274
|
## 重新登录、诊断与冲突
|
|
241
275
|
|
|
242
276
|
- 卡片显示 **重新登录**,或服务端要求重新认证时,点击该操作并完成同一套安全的浏览器流程。它会保留本插件的能力配置,不会偷偷改动默认模型或全局搜索路由。不要为了刷新会话而运行 `logout`。
|
|
@@ -273,7 +307,8 @@ dsh plugin --profile web exec dsh-codex-connect capabilities --model gpt-5.6-sol
|
|
|
273
307
|
|
|
274
308
|
## 兼容性与安全边界
|
|
275
309
|
|
|
276
|
-
-
|
|
310
|
+
- Alpha 4.22 已与 DSH 插件 API packages `0.1.2-alpha.2`、`@earendil-works/pi-ai` `^0.84.2`(验证时解析为 `0.84.4`)和 Node.js `^22.19.0 || >=24.0.0` 完成验证。已发布 Alpha 4.21 仍与 DSH `0.1.1-rc.2` 和 pi-ai `0.82.1` 保持已验证状态。[verified-compatibility.json](../verified-compatibility.json) 记录精确组合;安装命令见 [INSTALL.md](../INSTALL.md)。
|
|
311
|
+
- 新版 DSH 将原来的 client runtime 拆分为 Session Controller、Settings、Store 和 Renderer 包。Codex Connect 通过这些公开接口接入设置和图片操作。规范化预览的编码与尺寸由 DSH 决定;Codex Connect 另行保留字节完全一致的原图。
|
|
277
312
|
- 升级时请将 DSH 插件 API packages 与 `@earendil-works/pi-ai` 作为一组升级,再运行 `dsh-codex-connect doctor --json` 和兼容性检查。本契约不对未来版本作判断。
|
|
278
313
|
- 每日上游检查发现新的 DSH `latest` 或 `next` 候选版本时,会把 Codex Connect 安装到隔离 Profile 中,在没有 OAuth 凭据的情况下启动已安装的模型运行时,验证模型与推理强度发现,并确认提供方可被正确卸载。真实登录、额度和模型请求仍需在测试 Profile 中人工验证。
|
|
279
314
|
- ChatGPT 套餐资格、模型权限、额度和后端行为由 OpenAI 控制,可能变化。
|
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: 981c5097e5aa008ce087b3cbd9651e60e0b0dffc
|
|
4
|
+
design.zh.md: 81327b8268011fe2bb80b203c2e430610911d0f7
|
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
|
-
|
|
29
|
+
Alpha 4.22 pins Harness `0.1.2-alpha.2` 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 instead of the removed client-runtime package. The published compatibility record lists the exact Alpha 4.22 and DSH `0.1.2-alpha.2` 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 固定使用 Harness `0.1.
|
|
25
|
+
Alpha 4.22 固定使用 Harness `0.1.2-alpha.2` 开发依赖,并跟随其 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 的所属包导入,不再依赖已移除的 client-runtime 包。已发布兼容性记录列出 Alpha 4.22 与 DSH `0.1.2-alpha.2` 的精确组合。资格、额度、模型、服务端上下文容量和后端协议仍由上游控制。测试仅使用临时 OAuth 文档和模拟网络响应,CI 不执行真实认证。
|
package/lib/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { B as DSH_PLUGIN_API_PACKAGES,
|
|
2
|
+
import { At as openAICodexModelCatalog, B as DSH_PLUGIN_API_PACKAGES, Ct as normalizeTrustedOrigin, Dt as loginOpenAICodex, J as readInstalledPackageVersion, Mt as OPENAI_CODEX_PROVIDER, Nt as OpenAICodexCredentialStore, Ot as logoutOpenAICodex, Pt as openAICodexAuthPath, St as OpenAICodexTrustedOriginsStore, c as migrateOpenAICodexSearchHistory, j as CODEX_CONNECT_VERSION, k as diagnoseOpenAICodex, kt as openAICodexAuthStatus, l as OPENAI_CODEX_BASE_URL, mt as normalizeOpenAICodexProxyUrl, q as evaluateCompatibility } from "./src-kwF-uZCG.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { Agent, ProxyAgent, fetch } from "undici";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -208,7 +208,7 @@ var CodexCapabilityDiagnostics = class {
|
|
|
208
208
|
packageVersions: versions
|
|
209
209
|
});
|
|
210
210
|
const missing = Object.values(versions).some((value) => value === null) || !/^v?\d+\.\d+\.\d+$/u.test(versions["node"] ?? "");
|
|
211
|
-
const runtime = DSH_PLUGIN_API_PACKAGES.some((name) => versions[name] !== null && versions[name] !== "0.1.
|
|
211
|
+
const runtime = DSH_PLUGIN_API_PACKAGES.some((name) => versions[name] !== null && versions[name] !== "0.1.2-alpha.2") || compatibility.status === "incompatible" ? result("rejected", "declared-version-mismatch", "Use DSH API 0.1.2-alpha.2 and pi-ai ^0.84.2 together. DSH 0.1.0-rc.7 requires Codex Connect 0.1.0-alpha.4.14.") : missing || compatibility.status === "unknown" ? result("unknown", "version-metadata-unavailable", "Run this command from the plugin installation in the intended profile.") : result("supported", "declared-host-versions-match", "Host package versions satisfy the declared requirements; this is not a live profile or browser compatibility test.");
|
|
212
212
|
const model = this.deps.catalog().find((item) => item.id === request.model)?.id ?? null;
|
|
213
213
|
const unknownNetwork = result("unknown", "not-probed", "Run capabilities --model <catalog-id> --probe explicitly; this sends a fixed short request and may consume quota.");
|
|
214
214
|
const checks = {
|