dsh-codex-connect 0.1.0-alpha.4.21 → 0.1.0-alpha.4.23

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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # Installation Runbook for CLI Agents
2
2
 
3
+ Alpha 4.23 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.23` |
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.21's verified contract is DSH plugin API packages `0.1.1-rc.2`, `@earendil-works/pi-ai` `0.82.1`, and Node.js `^22.19.0 || >=24.0.0`. It uses the rc.2 keyed Plugin configuration slot. Staying on DSH `0.1.0-rc.7` means selecting Alpha 4.14, not installing Alpha 4.21 into that older API. 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.
29
+ Alpha 4.23'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.22 remains an earlier verified choice for the same DSH version, and 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
- If npm is unavailable after its 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.
48
+ For DSH `0.1.2-alpha.2`, use Alpha 4.23:
49
+
50
+ ```sh
51
+ dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.23
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.23'` 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.23 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: d62a4cd451fbe49ec059d3dafe63fff20ae20e79
6
- docs/README.zh.md: f217d465535099bcd0144e506302169df9d32bc3
5
+ README.md: 5166f2ac28ab4497ab1d52151fa773ce845ed25c
6
+ docs/README.zh.md: ed0a2c4fc2ecb25fcd85a917014278354837d894
package/README.md CHANGED
@@ -18,23 +18,23 @@ 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 guide uses the `web` profile. Replace `web` with the name of the Harness profile you already use. You need a working `dsh` installation; from a DeepSeek Harness source checkout, prefix the commands with `pnpm`.
21
+ This quick start targets DSH `0.1.2-alpha.2` with Codex Connect Alpha 4.23. Check `dsh --version` first. For DSH `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@alpha
26
+ dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.23
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
- To reproduce this release exactly, use `dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.21`. If npm is unavailable after the matching GitHub prerelease exists, use `dsh plugin --profile web add 'github:franksong2702/dsh-codex-connect#v0.1.0-alpha.4.21'`. A local checkout can be installed as `link:/absolute/path/to/dsh-codex-connect`.
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.21
33
+ ### What's new in Alpha 4.23
34
34
 
35
- - Preserve and download the exact generated image separately from the conversation preview, including from restored sessions and forks that inherited the image result.
36
- - Inspect runtime and Responses/SSE evidence with the opt-in `capabilities` command. Network probing requires explicit `--probe`; it does not enable unsupported features or alter routing.
37
- - Use clearer exact-version installation guidance and expanded release/canary CI checks. The supported DSH version remains `0.1.1-rc.2`.
35
+ - Open and render Web sessions normally on DSH `0.1.2-alpha.2`; the Composer model directory now declares the nested session remote it uses.
36
+ - Probe the hidden `codex-auto-review` approval reviewer with one explicit, synthetic no-op through `auto-review-probe`. The command does not add a selectable model, review a real command, refresh credentials, or enable Auto-review.
37
+ - Keep the quick-start command pinned to the verified DSH `0.1.2-alpha.2` pair and avoid duplicate upstream Canary runs when npm channels resolve to the same DSH version.
38
38
 
39
39
  ### Version updates
40
40
 
@@ -42,9 +42,7 @@ Codex Connect checks public package metadata and this repository's `verified-com
42
42
 
43
43
  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. A green result means the installed pair was verified; yellow means the latest plugin was verified with the installed DSH version and should be installed first; red means the installed DSH version is known but neither the installed plugin nor the latest published plugin has a matching record; gray means the installed DSH version is not recorded or the public record could not be checked. A red result includes a prefilled GitHub issue link for the installed DSH version so users can remind the maintainer without composing a report from scratch.
44
44
 
45
- 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 are available as a secondary detail, or from the release page. The plugin never runs an upgrade command by itself.
46
-
47
- The notice first summarizes the user-facing changes between your installed version and the newest version. Technical release notes remain available as a secondary detail. 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 does not execute anything on your behalf.
45
+ 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.
48
46
 
49
47
  After the Agent reports completion, return to the notice or settings card and select **Done — check again**. If the running process still reports the old version, restart that profile's DSH Web process and check again.
50
48
 
@@ -64,11 +62,17 @@ dsh web
64
62
 
65
63
  Expected result: the Harness web UI opens for the selected profile.
66
64
 
67
- ### 3. Find the Codex Connect card
65
+ ### 3. Find the Openai-Codex account card
66
+
67
+ Open **Settings → Models** and find **Openai-Codex**. This is the primary Alpha 4.23 account entry. If the profile does not expose the Models settings section, open **Settings → Plugins → Plugin configuration → Codex Connect** instead.
68
+
69
+ 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.
68
70
 
69
- Open **Settings Plugins Plugin configuration Codex Connect**.
71
+ 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.
70
72
 
71
- 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.
73
+ Expected result: a fresh installation shows **Authorize** in Models. The Plugin configuration fallback shows **Not signed in** and **Sign in with ChatGPT**.
74
+
75
+ The screenshot below shows the retained Plugin configuration fallback.
72
76
 
73
77
  <p align="center">
74
78
  <img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/en/plugin-entry.jpg" alt="Collapsed English-localized Codex Connect entry under Harness plugin configuration" width="586">
@@ -76,9 +80,9 @@ Expected result: a fresh installation shows **Not signed in** and a **Sign in wi
76
80
 
77
81
  ### 4. Sign in with ChatGPT
78
82
 
79
- Click **Sign in with ChatGPT** and complete the browser approval yourself. If an embedded WebView blocks the sign-in window, use the displayed **Open ChatGPT sign-in page** link to continue in your system browser. Do not copy an authorization URL, code, token, or account identifier into an issue, log, or configuration file.
83
+ Select **Authorize** in Models, or **Sign in with ChatGPT** in Plugin configuration, and complete the browser approval yourself. If an embedded WebView blocks the sign-in window, use the displayed **Open ChatGPT sign-in page** link to continue in your system browser. Do not copy an authorization URL, code, token, or account identifier into an issue, log, or configuration file.
80
84
 
81
- Expected result: the account area changes to **Signed in**. The screenshot below is the successful end state after this step; it is not the initial sign-in screen.
85
+ Expected result: Models shows **Sign out** and **View quota**. The Plugin configuration account area shows **Signed in**. The screenshot below shows that fallback view after a successful sign-in; it is not the initial sign-in screen.
82
86
 
83
87
  <p align="center">
84
88
  <img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/en/oauth-status.jpg" alt="English-localized Codex Connect signed-in state inside Harness plugin configuration" width="720">
@@ -229,6 +233,7 @@ Selecting Codex as the profile's global search route is another explicit change:
229
233
  | `models` | full catalog | Codex model id array; empty hides all entries |
230
234
  | `enableProxy` | `false` | boolean; direct connection unless explicitly enabled |
231
235
  | `proxyUrl` | `http://127.0.0.1:7890` (inactive placeholder) | Credential-free HTTP(S) proxy origin |
236
+ | `contextWindowOverrides` | none | Per-model context-window override map; see below |
232
237
  | `enableSearch` | `false` | boolean |
233
238
  | `enableImageTool` | `false` | boolean |
234
239
  | `enableImageGeneration` | `false` | boolean |
@@ -237,6 +242,34 @@ Selecting Codex as the profile's global search route is another explicit change:
237
242
  | `searchContextSize` | `medium` | `low`, `medium`, `high` |
238
243
  | `searchMaxOutputTokens` | `10000` | positive integer |
239
244
 
245
+ ### Context-window overrides
246
+
247
+ 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.
248
+
249
+ 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.
250
+
251
+ 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.
252
+
253
+ ```yaml
254
+ - id: llm-openai-codex
255
+ config:
256
+ contextWindowOverrides:
257
+ # Illustration only: 350000 is not a verified or recommended server limit.
258
+ gpt-5.6-sol: 350000
259
+ ```
260
+
261
+ 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.
262
+
263
+ 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.
264
+
265
+ To restore defaults, distinguish the settings layers:
266
+
267
+ - A resolved empty map `{}` or no override uses catalog windows.
268
+ - DSH recursively merges settings maps. Updating an existing map with `{}` is therefore not a clear operation.
269
+ - Set `contextWindowOverrides: null` to explicitly disable all overrides, including values inherited from composition.
270
+ - 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.
271
+ - 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.
272
+
240
273
  ## Reauthentication, diagnostics, and conflicts
241
274
 
242
275
  - 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.
@@ -271,9 +304,22 @@ The report labels each check `supported`, `rejected`, or `unknown`, with a reaso
271
304
 
272
305
  This report covers only the standalone route, not active profile routing, search/image tools, browser compatibility, provider retry behavior, or session recovery. Automatic provider failover is `rejected` because this plugin does not implement it; select an alternative provider explicitly. WebSocket-to-SSE fallback is inactive with the finite SSE default. `contextManagement` and continuation remain `unknown`; native compaction and WebSocket reuse are `rejected` by the current integration policy. No diagnostic result enables these capabilities or changes Harness history. Exit codes cover runtime, OAuth, selected model, Responses, and SSE only: `0` means all five were supported, `1` means at least one was rejected, and `2` means unknown evidence, invalid options, or an inspection failure. Rejected optional capabilities do not change that exit code.
273
306
 
307
+ ### Hidden approval-review capability probe
308
+
309
+ Issue #84 is being investigated with a separate, opt-in probe. It does not add `codex-auto-review` to the model selector and does not review or execute a real Harness command.
310
+
311
+ ```sh
312
+ dsh plugin --profile web exec dsh-codex-connect auto-review-probe --json
313
+ ```
314
+
315
+ The command sends one fixed, synthetic no-op to the hidden reviewer through the ChatGPT OAuth Responses route. It requires an unexpired stored credential, never refreshes or writes credentials, does not follow redirects or retry, caps the response at 64 KiB, and destroys its owned connection before returning. `--proxy <http(s)-origin>` and `--timeout-ms <1..60000>` have the same explicit-network meaning as the ordinary capability probe.
316
+
317
+ `supported` means only that the route accepted the exact hidden model id and returned one complete assessment matching the reviewer JSON fields. `rejected` means the request or local prerequisite was explicitly rejected. Timeouts, cancellation, malformed output, incomplete streams, rate limits, and network failures remain `unknown`. Output omits credentials, account ids, response ids, provider messages, model text, paths, headers, and proxy origins. Exit `0` requires runtime, OAuth, and reviewer checks to be supported; exit `1` means at least one was rejected; exit `2` means evidence is unknown or input is invalid. The report is evidence only: it never enables automatic approval, changes DSH policy, or authorizes an action.
318
+
274
319
  ## Compatibility and security boundary
275
320
 
276
- - The only verified compatibility combination is DSH plugin API packages `0.1.1-rc.2`, `@earendil-works/pi-ai` `0.82.1`, and Node.js `^22.19.0 || >=24.0.0`; see [compatibility.json](compatibility.json). Alpha 4.21 uses the rc.2 keyed Plugin configuration slot; users of older DSH API packages should upgrade to the rc.2 API packages.
321
+ - Alpha 4.23 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.22 remains an earlier verified choice for the same DSH version; 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.
322
+ - 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
323
  - 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
324
  - 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
325
  - ChatGPT plan eligibility, model access, quotas, and backend behavior are controlled by OpenAI and may change.
@@ -4,7 +4,7 @@
4
4
  "node": "^22.19.0 || >=24.0.0"
5
5
  },
6
6
  "dshPluginApi": {
7
- "version": "0.1.1-rc.2",
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.82.1"
27
+ "version": "^0.84.2"
27
28
  }
28
29
  }
package/docs/README.zh.md CHANGED
@@ -18,23 +18,23 @@
18
18
 
19
19
  ## 五分钟快速开始
20
20
 
21
- 本指南使用 `web` profile。请把 `web` 替换成你已经在用的 Harness profile 名称。你需要先有可用的 `dsh` 安装;如果在 DeepSeek Harness 源码 checkout 中运行,请在命令前加 `pnpm`。
21
+ 本快速指南适用于 DSH `0.1.2-alpha.2` 与 Codex Connect Alpha 4.23。请先运行 `dsh --version`。如果使用 DSH `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@alpha
26
+ dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.23
27
27
  ```
28
28
 
29
29
  预期结果:包被加入该 profile。这个动作不会更改 profile 的默认模型或全局搜索路由。
30
30
 
31
- 如需精确复现这个版本,使用 `dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.21`。对应 GitHub prerelease 已创建但 npm 不可用时,可使用 `dsh plugin --profile web add 'github:franksong2702/dsh-codex-connect#v0.1.0-alpha.4.21'`。本地 checkout 可安装为 `link:/absolute/path/to/dsh-codex-connect`。
31
+ 请使用上面的精确版本,确保已验证的 DSH 与插件组合可以复现。`alpha` 是会移动的 npm 标签,不是兼容性保证。
32
32
 
33
- ### Alpha 4.21 更新内容
33
+ ### Alpha 4.23 更新内容
34
34
 
35
- - 将生成图片的精确原文件与对话预览分开保存和下载,恢复会话及继承了图片结果的 fork 会话同样可用。
36
- - 使用可选的 `capabilities` 命令检查运行环境与 Responses/SSE 的支持证据。网络探测必须显式传入 `--probe`;不会启用未支持的功能或修改路由。
37
- - 提供更清晰的精确版本安装指引,并扩展发布与 canary 的 CI 检查。支持的 DSH 版本仍为 `0.1.1-rc.2`。
35
+ - DSH `0.1.2-alpha.2` 中正常打开和渲染 Web 会话;Composer 模型目录现在会声明其使用的嵌套会话 remote。
36
+ - 通过 `auto-review-probe` 显式发送一条合成空操作,探测隐藏的 `codex-auto-review` 审批 reviewer。该命令不会添加可选模型、审查真实命令、刷新凭据或启用 Auto-review。
37
+ - 快速开始继续固定使用已验证的 DSH `0.1.2-alpha.2` 组合;当 npm 多个渠道解析到同一 DSH 版本时,上游 Canary 不再重复执行。
38
38
 
39
39
  ### 版本更新提醒
40
40
 
@@ -64,11 +64,17 @@ dsh web
64
64
 
65
65
  预期结果:所选 profile 的 Harness Web UI 打开。
66
66
 
67
- ### 3. 找到 Codex Connect 卡片
67
+ ### 3. 找到 Openai-Codex 账户卡
68
68
 
69
- 打开 **设置 → 插件 → 插件配置 → Codex Connect**。
69
+ 打开 **设置 → 模型**,找到 **Openai-Codex**。这是 Alpha 4.23 的主要账户入口。如果当前 profile 没有模型设置分区,请改用 **设置 → 插件 → 插件配置 → Codex Connect**。
70
70
 
71
- 预期结果:新安装时账户区显示 **尚未登录**,并出现 **使用 ChatGPT 登录** 按钮。之后管理可选能力也在同一张卡片中完成。
71
+ 模型页账户卡标注“由 Codex Connect 插件提供支持。”,用于 ChatGPT 授权、重新授权、退出和查看额度。两个设置页面共用同一份内存账户状态及轮询。**更多设置** 会在弹窗中打开代理、模型显示、搜索、图片和上下文预算配置表单,原插件设置入口仍保留。两处保存到同一份配置;关闭弹窗或按 Escape 会放弃弹窗内未保存的修改。模型页底部入口是可选增强:没有该设置分区的 profile 仍保留原插件入口。
72
+
73
+ 模型页紧凑卡片在未登录时显示 **授权**,已登录时显示 **退出登录** 和 **查看额度**。展开后只显示服务端返回的额度条目,不再重复账户操作。浏览器授权中断后,可以点击模型页的 **继续授权**(插件页为 **重新打开授权**)继续原登录,或点击 **取消登录** 后,从任一设置页或另一个受信任浏览器重试。取消不会退出已有账户。未完成的授权默认在 10 分钟后到期;插件配置 `oauthTimeoutMs` 可设为 1,000–1,800,000 毫秒,在插件加载时生效。获取初始授权链接仍有独立的 30 秒等待上限。取消和到期都不需要重启 DSH。
74
+
75
+ 预期结果:新安装时模型页显示 **授权**。插件配置备用入口显示 **尚未登录** 和 **使用 ChatGPT 登录**。
76
+
77
+ 下图展示的是保留的插件配置备用入口。
72
78
 
73
79
  <p align="center">
74
80
  <img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/zh/plugin-entry.jpg" alt="Harness 插件配置中的中文 Codex Connect 折叠入口" width="586">
@@ -76,9 +82,9 @@ dsh web
76
82
 
77
83
  ### 4. 使用 ChatGPT 登录
78
84
 
79
- 点击 **使用 ChatGPT 登录**,并自行完成浏览器审批。如果内嵌 WebView 阻止登录窗口,请点击页面显示的 **打开 ChatGPT 登录页面**,在系统浏览器中继续。不要把授权 URL、授权码、token 或账户标识复制到 Issue、日志或配置文件中。
85
+ 在模型页点击 **授权**,或在插件配置中点击 **使用 ChatGPT 登录**,然后自行完成浏览器审批。如果内嵌 WebView 阻止登录窗口,请点击页面显示的 **打开 ChatGPT 登录页面**,在系统浏览器中继续。不要把授权 URL、授权码、token 或账户标识复制到 Issue、日志或配置文件中。
80
86
 
81
- 预期结果:账户区变为 **已登录**。下图展示的是完成本步骤后的成功状态,不是开始登录前的页面。
87
+ 预期结果:模型页显示 **退出登录** 和 **查看额度**;插件配置的账户区显示 **已登录**。下图展示的是成功登录后的备用入口,不是开始登录前的页面。
82
88
 
83
89
  <p align="center">
84
90
  <img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/zh/oauth-status.jpg" alt="Harness 插件配置中的中文 Codex Connect 已登录状态" width="720">
@@ -229,6 +235,7 @@ Codex Connect 默认使用**直连**。代理是可选项,只作用于本插
229
235
  | `models` | 完整目录 | Codex model id 数组;空数组隐藏全部条目 |
230
236
  | `enableProxy` | `false` | boolean;除非显式启用,否则使用直连 |
231
237
  | `proxyUrl` | `http://127.0.0.1:7890`(未启用的占位值) | 不带凭据的 HTTP(S) proxy origin |
238
+ | `contextWindowOverrides` | 无 | 按模型覆盖 contextWindow 的映射;见下文 |
232
239
  | `enableSearch` | `false` | boolean |
233
240
  | `enableImageTool` | `false` | boolean |
234
241
  | `enableImageGeneration` | `false` | boolean |
@@ -237,6 +244,34 @@ Codex Connect 默认使用**直连**。代理是可选项,只作用于本插
237
244
  | `searchContextSize` | `medium` | `low`、`medium`、`high` |
238
245
  | `searchMaxOutputTokens` | `10000` | 正整数 |
239
246
 
247
+ ### 上下文窗口覆盖
248
+
249
+ 当你有证据表明内置目录不适合当前部署时,可通过 `contextWindowOverrides` 主动设置每个模型的客户端上下文预算。它不能扩大 OpenAI 后端的上下文容量。默认不启用;此功能并未验证社区报告的更大窗口。
250
+
251
+ 在插件配置和“模型 → 更多设置”中,每个模型行显示具体的上下文预算,并保留显示勾选框。“上下文 → 调整”展开双向同步的滑条和整数输入框,同时显示已安装目录的默认值及配置上限。“恢复默认”使用目录值,即使启动配置中有覆盖值也不例外。隐藏模型会保留其预算。“保存”提交暂存修改,“放弃”撤销修改。清空输入框属于无效输入,不等于恢复默认。
252
+
253
+ 配置上限依据于 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)暂以已安装提供方目录的默认值为上限;如果更新后的提供方默认值高于已记录上限,也以该默认值为上限。界面会标明依据;这些数值不是从用户账号动态获取的,也不是实测的服务端容量。默认值保持不变;超过默认值会提示额度消耗及请求失败风险,账号和通道限制可能不同。
254
+
255
+ ```yaml
256
+ - id: llm-openai-codex
257
+ config:
258
+ contextWindowOverrides:
259
+ # 仅为示例:350000 不是已验证或推荐的服务端上限。
260
+ gpt-5.6-sol: 350000
261
+ ```
262
+
263
+ 键必须与已安装 Codex 目录中的模型 ID 完全一致。映射最多包含 256 项,token 数必须是模型配置上限内的正安全整数。未知 ID 或超范围数值会使配置或设置注册、写入明确报错;已有的超范围覆盖值需要调低或用 `null` 恢复默认,不会被静默截断。其他模型保留目录元数据。输出 token 上限、SSE 传输和 DSH 的压缩策略不变。请在独立验证过的服务端上限内,为输出及协议开销预留空间。如果部署设置为在 80% 时压缩,客户端窗口 `350000` 对应的名义阈值是 `280000`;这个算式不证明服务端接受这么大的输入。
264
+
265
+ 插件加载时会应用持久化的 Host 设置,运行中修改会作用于下一次模型解析或请求准备。已经准备好的请求保留当时的预算快照。原始模型目录不会被修改。
266
+
267
+ 恢复默认值时,需要区分配置层:
268
+
269
+ - 最终生效的映射为 `{}` 或没有覆盖时,使用目录窗口。
270
+ - DSH 会递归合并设置映射,因此用 `{}` 更新已有映射不等于清空。
271
+ - 设置 `contextWindowOverrides: null` 可明确关闭所有覆盖,包括从启动配置继承的值。
272
+ - 将某个模型条目设为 `null`,可只恢复该模型的目录默认值,保留其他覆盖。界面保存时会为默认模型写入明确的空值标记,防止恢复默认后重新继承启动配置值。
273
+ - 删除持久化字段会重新继承启动配置;启动配置没有覆盖时,恢复目录窗口。删除某个持久化模型条目,同样会恢复该模型的启动配置值或目录值。
274
+
240
275
  ## 重新登录、诊断与冲突
241
276
 
242
277
  - 卡片显示 **重新登录**,或服务端要求重新认证时,点击该操作并完成同一套安全的浏览器流程。它会保留本插件的能力配置,不会偷偷改动默认模型或全局搜索路由。不要为了刷新会话而运行 `logout`。
@@ -271,9 +306,22 @@ dsh plugin --profile web exec dsh-codex-connect capabilities --model gpt-5.6-sol
271
306
 
272
307
  本报告仅涵盖独立路由,不验证活动 profile 路由、搜索/图片工具、浏览器兼容性、provider 重试行为或会话恢复。本插件没有实现自动 provider 故障切换,因此该项为 `rejected`,需要用户明确选择其他 provider。有限 SSE 默认路径不会触发 WebSocket 到 SSE 的回退。`contextManagement` 和续接仍为 `unknown`;原生 compaction 和 WebSocket reuse 在当前集成策略下为 `rejected`。诊断结果不会启用这些能力,也不会更改 Harness 历史。退出码只覆盖运行时、OAuth、所选模型、Responses 和 SSE:`0` 表示五项均可用,`1` 表示至少一项被拒绝,`2` 表示证据未知、选项无效或检查失败。被拒绝的可选能力不影响该退出码。
273
308
 
309
+ ### 隐藏审批审查能力探针
310
+
311
+ Issue #84 使用一条独立、按需执行的探针开展调研。它不会把 `codex-auto-review` 加入模型选择器,也不会审查或执行真实的 Harness 命令。
312
+
313
+ ```sh
314
+ dsh plugin --profile web exec dsh-codex-connect auto-review-probe --json
315
+ ```
316
+
317
+ 该命令通过 ChatGPT OAuth Responses 路由向隐藏 reviewer 发送一条固定的合成空操作。它要求已存凭据尚未过期,不刷新或写入凭据,不跟随重定向、不重试,响应上限为 64 KiB,并在返回前销毁自有连接。`--proxy <http(s)-origin>` 和 `--timeout-ms <1..60000>` 与普通能力探针具有相同的显式网络含义。
318
+
319
+ `supported` 只表示路由接受了精确的隐藏模型 ID,并返回一条符合 reviewer JSON 字段的完整审查结果。`rejected` 表示请求或本地前置条件被明确拒绝。超时、取消、格式错误、不完整流、限流和网络故障均保持 `unknown`。输出会省略凭据、账号 ID、response ID、服务端消息、模型文本、路径、headers 和代理 origin。只有运行时、OAuth 和 reviewer 三项均为可用时才返回 `0`;至少一项被拒绝时返回 `1`;证据未知或输入无效时返回 `2`。该报告只提供证据:它绝不会启用自动审批、修改 DSH 策略或授权任何操作。
320
+
274
321
  ## 兼容性与安全边界
275
322
 
276
- - 当前唯一已验证的兼容组合是 DSH 插件 API packages `0.1.1-rc.2`、`@earendil-works/pi-ai` `0.82.1` Node.js `^22.19.0 || >=24.0.0`;详见 [compatibility.json](../compatibility.json)。Alpha 4.21 使用 rc.2 keyed 插件配置 slot;旧版 DSH API packages 用户应升级到 rc.2 API packages
323
+ - Alpha 4.23 已与 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.22 仍是同一 DSH 版本较早的已验证选择;Alpha 4.21 仍与 DSH `0.1.1-rc.2` pi-ai `0.82.1` 保持已验证状态。[verified-compatibility.json](../verified-compatibility.json) 记录精确组合;安装命令见 [INSTALL.md](../INSTALL.md)
324
+ - 新版 DSH 将原来的 client runtime 拆分为 Session Controller、Settings、Store 和 Renderer 包。Codex Connect 通过这些公开接口接入设置和图片操作。规范化预览的编码与尺寸由 DSH 决定;Codex Connect 另行保留字节完全一致的原图。
277
325
  - 升级时请将 DSH 插件 API packages 与 `@earendil-works/pi-ai` 作为一组升级,再运行 `dsh-codex-connect doctor --json` 和兼容性检查。本契约不对未来版本作判断。
278
326
  - 每日上游检查发现新的 DSH `latest` 或 `next` 候选版本时,会把 Codex Connect 安装到隔离 Profile 中,在没有 OAuth 凭据的情况下启动已安装的模型运行时,验证模型与推理强度发现,并确认提供方可被正确卸载。真实登录、额度和模型请求仍需在测试 Profile 中人工验证。
279
327
  - ChatGPT 套餐资格、模型权限、额度和后端行为由 OpenAI 控制,可能变化。
@@ -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: c03949ff0c973040401b558cadf34f92cdccf568
4
- design.zh.md: 2bd55edd9b6a6f079775eaf6dcc5892755ef6fda
3
+ design.md: 4059dfc558bfa89509534585e89ce58185081119
4
+ design.zh.md: 8d0dc555e9a3419b3ad880e45a1e1dfd8760af48
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
- The Alpha pins Harness `0.1.1-rc.2` development dependencies and uses its keyed `settings.plugin.item` contract; supported Node.js is `^22.19.0 || >=24.0.0`. It pins `@earendil-works/pi-ai` `0.82.1`. Backend eligibility, quotas, models, and protocol details remain controlled upstream. Tests use temporary OAuth documents and mocked network responses; CI does not perform real authentication.
29
+ Alpha 4.23 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.23 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.1-rc.2` 开发依赖,并采用其 keyed `settings.plugin.item` 契约;Node.js 支持 `^22.19.0 || >=24.0.0`。`@earendil-works/pi-ai` 固定为 `0.82.1`。资格、额度、模型和后端协议仍由上游控制。测试仅使用临时 OAuth 文档和模拟网络响应,CI 不执行真实认证。
25
+ Alpha 4.23 固定使用 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.23 与 DSH `0.1.2-alpha.2` 的精确组合。资格、额度、模型、服务端上下文容量和后端协议仍由上游控制。测试仅使用临时 OAuth 文档和模拟网络响应,CI 不执行真实认证。