dsh-codex-connect 0.1.0-alpha.4.22 → 0.1.0-alpha.4.24
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 +16 -8
- package/README.i18n.yaml +2 -2
- package/README.md +35 -20
- package/compatibility.json +1 -1
- package/cordis.patch.yml +1 -0
- package/docs/README.zh.md +34 -17
- package/docs/auto-review.md +26 -0
- package/docs/auto-review.zh.md +26 -0
- package/docs/design.i18n.yaml +2 -2
- package/docs/design.md +1 -1
- package/docs/design.zh.md +1 -1
- package/lib/bin.js +125 -5
- package/lib/client.js +1412 -550
- package/lib/index.d.ts +11 -3
- package/lib/index.js +1 -1
- package/lib/{src-kwF-uZCG.js → src-NE6c_5P4.js} +817 -8
- package/package.json +79 -72
package/INSTALL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Installation Runbook for CLI Agents
|
|
2
2
|
|
|
3
|
-
Alpha 4.
|
|
3
|
+
Alpha 4.24 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
|
|
|
@@ -22,11 +22,12 @@ Check `dsh --version` before changing the requested profile. Use `dsh --help` to
|
|
|
22
22
|
| --- | --- |
|
|
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
|
-
| `0.1.2-alpha.2` | `0.1.0-alpha.4.
|
|
25
|
+
| `0.1.2-alpha.2` | `0.1.0-alpha.4.23` |
|
|
26
|
+
| `0.1.2-alpha.5` | `0.1.0-alpha.4.24` |
|
|
26
27
|
|
|
27
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.
|
|
28
29
|
|
|
29
|
-
Alpha 4.
|
|
30
|
+
Alpha 4.24'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.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.
|
|
30
31
|
|
|
31
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).
|
|
32
33
|
|
|
@@ -45,13 +46,19 @@ These choices reflect the repository's existing verification record, not a new i
|
|
|
45
46
|
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.21
|
|
46
47
|
```
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
For DSH `0.1.2-alpha.2`, use Alpha 4.23:
|
|
49
50
|
|
|
50
51
|
```sh
|
|
51
|
-
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.
|
|
52
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.23
|
|
52
53
|
```
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
For DSH `0.1.2-alpha.5`, use Alpha 4.24:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.24
|
|
59
|
+
```
|
|
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.24'` only for the DSH `0.1.2-alpha.5` combination.
|
|
55
62
|
|
|
56
63
|
3. Run `dsh --profile web --dump-config` and require exactly one `llm-openai-codex` row loading `dsh-codex-connect`.
|
|
57
64
|
4. Confirm the effective `agent-default-model` and `web.searchProvider` values are unchanged from before installation.
|
|
@@ -63,7 +70,7 @@ These choices reflect the repository's existing verification record, not a new i
|
|
|
63
70
|
|
|
64
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.
|
|
65
72
|
|
|
66
|
-
Alpha 4.
|
|
73
|
+
Alpha 4.24 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.
|
|
67
74
|
|
|
68
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).
|
|
69
76
|
|
|
@@ -80,7 +87,7 @@ The value is a full `http://` or `https://` origin including its port, not a bar
|
|
|
80
87
|
|
|
81
88
|
## Optional configuration
|
|
82
89
|
|
|
83
|
-
Use **Settings → Plugins → Plugin configuration → Codex Connect** for live, staged Save/Discard edits. The same
|
|
90
|
+
Use **Settings → Plugins → Plugin configuration → Codex Connect** for live, staged Save/Discard edits organized under Account & quota, Models, Network, and Capabilities. Switching modules preserves the draft. The same settings control `enableSearch`, `enableImageTool`, `enableImageGeneration`, and `enableAutoReview`; all four default to `false`. Enabling Auto-review permits bounded approval context, tool arguments, working directory, and the planned action to be sent to `chatgpt.com`; failures return to human approval. Enabling image generation uses the image generation capability included with the current GPT subscription and saves results as DSH attachments. Enabling search registers a provider but does not select it; selecting `web.searchProvider: openai-codex` is a second explicit profile change. Setting `agent-default-model` to `openai-codex` is also a separate explicit change.
|
|
84
91
|
|
|
85
92
|
Apply only requested choices and preserve unrelated keys:
|
|
86
93
|
|
|
@@ -90,6 +97,7 @@ Apply only requested choices and preserve unrelated keys:
|
|
|
90
97
|
enableSearch: true
|
|
91
98
|
enableImageTool: false
|
|
92
99
|
enableImageGeneration: false
|
|
100
|
+
enableAutoReview: false
|
|
93
101
|
searchMode: live
|
|
94
102
|
|
|
95
103
|
- id: web
|
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: 9e115087a48526ebe60bee0c22d5b27f2b81e57e
|
|
6
|
+
docs/README.zh.md: d5c92989b98411b98c9ad688b2258edbcc4ec368
|
package/README.md
CHANGED
|
@@ -18,24 +18,24 @@ 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
|
|
21
|
+
This quick start targets DSH `0.1.2-alpha.5` with Codex Connect Alpha 4.24. 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@alpha
|
|
26
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.24
|
|
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.24
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
35
|
+
- Run on the exact DSH `0.1.2-alpha.5` package set, with registry-only installation and isolated runtime checks.
|
|
36
|
+
- Optionally let Codex Auto-review eligible Harness approval requests after DSH policy checks. It is off by default, requires a first-use disclosure confirmation, fails back to human approval, and supports one exact manual override after a denial.
|
|
37
|
+
- Configure the optional Codex-only proxy through a clearer staged workflow: detect or enter an address, test that exact draft, explicitly activate it, and save. Editing an enabled address requires a fresh successful test; failures never silently fall back to direct access.
|
|
38
|
+
- Navigate the larger plugin configuration through Account & quota, Models, Network, and Capabilities modules while preserving one shared Save/Discard draft.
|
|
39
39
|
|
|
40
40
|
### Version updates
|
|
41
41
|
|
|
@@ -43,9 +43,7 @@ Codex Connect checks public package metadata and this repository's `verified-com
|
|
|
43
43
|
|
|
44
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. 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.
|
|
45
45
|
|
|
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
|
|
47
|
-
|
|
48
|
-
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.
|
|
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.
|
|
49
47
|
|
|
50
48
|
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.
|
|
51
49
|
|
|
@@ -65,15 +63,17 @@ dsh web
|
|
|
65
63
|
|
|
66
64
|
Expected result: the Harness web UI opens for the selected profile.
|
|
67
65
|
|
|
68
|
-
### 3. Find the Codex
|
|
66
|
+
### 3. Find the Openai-Codex account card
|
|
69
67
|
|
|
70
|
-
Open **Settings → Plugins → Plugin configuration → Codex Connect
|
|
68
|
+
Open **Settings → Models** and find **Openai-Codex**. This is the primary Alpha 4.24 account entry. If the profile does not expose the Models settings section, open **Settings → Plugins → Plugin configuration → Codex Connect** instead.
|
|
71
69
|
|
|
72
|
-
|
|
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.
|
|
73
71
|
|
|
74
72
|
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
73
|
|
|
76
|
-
Expected result: a fresh installation shows **Not signed in** and
|
|
74
|
+
Expected result: a fresh installation shows **Authorize** in Models. The Plugin configuration fallback shows **Not signed in** and **Sign in with ChatGPT**.
|
|
75
|
+
|
|
76
|
+
The screenshot below shows the retained Plugin configuration fallback.
|
|
77
77
|
|
|
78
78
|
<p align="center">
|
|
79
79
|
<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">
|
|
@@ -81,9 +81,9 @@ Expected result: a fresh installation shows **Not signed in** and a **Sign in wi
|
|
|
81
81
|
|
|
82
82
|
### 4. Sign in with ChatGPT
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
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.
|
|
85
85
|
|
|
86
|
-
Expected result:
|
|
86
|
+
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.
|
|
87
87
|
|
|
88
88
|
<p align="center">
|
|
89
89
|
<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">
|
|
@@ -154,9 +154,10 @@ The installed bundle is intentionally inert beyond model-provider registration:
|
|
|
154
154
|
enableSearch: false
|
|
155
155
|
enableImageTool: false
|
|
156
156
|
enableImageGeneration: false
|
|
157
|
+
enableAutoReview: false
|
|
157
158
|
```
|
|
158
159
|
|
|
159
|
-
Open **Settings → Plugins → Plugin configuration → Codex Connect** to manage the
|
|
160
|
+
Open **Settings → Plugins → Plugin configuration → Codex Connect** to manage the same settings through four modules: **Account & quota**, **Models**, **Network**, and **Capabilities**. Switching modules preserves staged edits; the persistent Save/Discard actions apply them together. **Save changes** affects only this plugin and never selects a default model or a global search route. The Models page's **More settings** dialog uses the same organization without repeating the account module.
|
|
160
161
|
|
|
161
162
|
### Network connection and proxy detection
|
|
162
163
|
|
|
@@ -164,7 +165,7 @@ Codex Connect uses a **Direct connection** by default. A proxy is optional and a
|
|
|
164
165
|
|
|
165
166
|
Select **Detect proxy** to test only the standard proxy environment variables and the documented loopback candidates `127.0.0.1:7890`, `127.0.0.1:7897`, and `127.0.0.1:10809`. Detection makes no model call, consumes no quota, and does not write settings. A response from the canonical Codex endpoint proves network reachability; `401/403`, proxy `407`, DNS, refused connection, timeout, TLS, and CONNECT failures remain separate diagnostics.
|
|
166
167
|
|
|
167
|
-
Choose **Use this proxy** only after reviewing a candidate, then click **Save changes**. **Configure manually**
|
|
168
|
+
Choose **Use this proxy** only after reviewing a candidate, then click **Save changes**. **Configure manually** requires the exact current credential-free HTTP(S) proxy origin to pass its test before the activation action becomes available; editing the draft invalidates the earlier result. **Disable proxy** is always available. A failed probe leaves the previous mode unchanged, and an enabled proxy failure is shown as an actionable error; Codex Connect never silently retries the request through a direct connection.
|
|
168
169
|
|
|
169
170
|
### Enable only the capability you intend to use
|
|
170
171
|
|
|
@@ -305,9 +306,23 @@ The report labels each check `supported`, `rejected`, or `unknown`, with a reaso
|
|
|
305
306
|
|
|
306
307
|
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.
|
|
307
308
|
|
|
309
|
+
### Codex Auto-review and capability probe
|
|
310
|
+
|
|
311
|
+
Codex Auto-review is an official Codex capability integrated by Codex Connect and disabled by default under **Settings → Plugins → Codex Connect**. Its short explanation stays visible; the full disclosure is expandable, and the first enablement in each profile requires confirmation. When enabled, it reviews eligible Harness approval requests after DSH policy runs. Enabling it permits the plugin to send bounded recent approval context, tool arguments, working directory, and the planned action to `chatgpt.com`; hidden reasoning and stored credentials are excluded. Only a complete structured allow result can grant one execution. Denials inject a rationale and no-circumvention instruction, repeated denials open a turn-local circuit breaker, and `/approve <denial-id>` can authorize one exact retry when the optional command service is present. See [Auto-review](docs/auto-review.md) and [自动审查](docs/auto-review.zh.md).
|
|
312
|
+
|
|
313
|
+
The separate probe remains available for diagnosing the hidden route. It does not add `codex-auto-review` to the model selector and does not review or execute a real Harness command.
|
|
314
|
+
|
|
315
|
+
```sh
|
|
316
|
+
dsh plugin --profile web exec dsh-codex-connect auto-review-probe --json
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
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.
|
|
320
|
+
|
|
321
|
+
`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 changes the Auto-review setting, DSH policy, or authorization state.
|
|
322
|
+
|
|
308
323
|
## Compatibility and security boundary
|
|
309
324
|
|
|
310
|
-
- Alpha 4.
|
|
325
|
+
- Alpha 4.24 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.23 remains the verified choice for DSH `0.1.2-alpha.2`; 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
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.
|
|
312
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.
|
|
313
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/compatibility.json
CHANGED
package/cordis.patch.yml
CHANGED
package/docs/README.zh.md
CHANGED
|
@@ -18,24 +18,24 @@
|
|
|
18
18
|
|
|
19
19
|
## 五分钟快速开始
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
本快速指南适用于 DSH `0.1.2-alpha.5` 与 Codex Connect Alpha 4.24。请先运行 `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@alpha
|
|
26
|
+
dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.24
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
预期结果:包被加入该 profile。这个动作不会更改 profile 的默认模型或全局搜索路由。
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
请使用上面的精确版本,确保已验证的 DSH 与插件组合可以复现。`alpha` 是会移动的 npm 标签,不是兼容性保证。
|
|
32
32
|
|
|
33
|
-
### Alpha 4.
|
|
33
|
+
### Alpha 4.24 更新内容
|
|
34
34
|
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
35
|
+
- 在精确的 DSH `0.1.2-alpha.5` 包组上运行,并完成纯 registry 安装和隔离运行时检查。
|
|
36
|
+
- 可选地让 Codex 自动审查在 DSH 策略检查之后处理符合条件的 Harness 审批请求。它默认关闭,首次启用需确认完整告知,失败会回到人工审批,拒绝后支持对完全相同的重试做一次人工覆盖。
|
|
37
|
+
- 通过更清晰的分步流程配置仅作用于 Codex 的可选代理:检测或输入地址、测试当前草稿、明确启用,再保存。修改已启用地址后必须重新测试;失败绝不会静默改走直连。
|
|
38
|
+
- 通过“账户与额度”“模型”“网络”和“能力”四个模块导航更长的插件配置,同时保留一份共享的保存/放弃草稿。
|
|
39
39
|
|
|
40
40
|
### 版本更新提醒
|
|
41
41
|
|
|
@@ -65,15 +65,17 @@ dsh web
|
|
|
65
65
|
|
|
66
66
|
预期结果:所选 profile 的 Harness Web UI 打开。
|
|
67
67
|
|
|
68
|
-
### 3. 找到 Codex
|
|
68
|
+
### 3. 找到 Openai-Codex 账户卡
|
|
69
69
|
|
|
70
|
-
打开 **设置 → 插件 → 插件配置 → Codex Connect**。
|
|
70
|
+
打开 **设置 → 模型**,找到 **Openai-Codex**。这是 Alpha 4.24 的主要账户入口。如果当前 profile 没有模型设置分区,请改用 **设置 → 插件 → 插件配置 → Codex Connect**。
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
模型页账户卡标注“由 Codex Connect 插件提供支持。”,用于 ChatGPT 授权、重新授权、退出和查看额度。两个设置页面共用同一份内存账户状态及轮询。**更多设置** 会在弹窗中打开代理、模型显示、搜索、图片和上下文预算配置表单,原插件设置入口仍保留。两处保存到同一份配置;关闭弹窗或按 Escape 会放弃弹窗内未保存的修改。模型页底部入口是可选增强:没有该设置分区的 profile 仍保留原插件入口。
|
|
73
73
|
|
|
74
74
|
模型页紧凑卡片在未登录时显示 **授权**,已登录时显示 **退出登录** 和 **查看额度**。展开后只显示服务端返回的额度条目,不再重复账户操作。浏览器授权中断后,可以点击模型页的 **继续授权**(插件页为 **重新打开授权**)继续原登录,或点击 **取消登录** 后,从任一设置页或另一个受信任浏览器重试。取消不会退出已有账户。未完成的授权默认在 10 分钟后到期;插件配置 `oauthTimeoutMs` 可设为 1,000–1,800,000 毫秒,在插件加载时生效。获取初始授权链接仍有独立的 30 秒等待上限。取消和到期都不需要重启 DSH。
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
预期结果:新安装时模型页显示 **授权**。插件配置备用入口显示 **尚未登录** 和 **使用 ChatGPT 登录**。
|
|
77
|
+
|
|
78
|
+
下图展示的是保留的插件配置备用入口。
|
|
77
79
|
|
|
78
80
|
<p align="center">
|
|
79
81
|
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/zh/plugin-entry.jpg" alt="Harness 插件配置中的中文 Codex Connect 折叠入口" width="586">
|
|
@@ -81,9 +83,9 @@ dsh web
|
|
|
81
83
|
|
|
82
84
|
### 4. 使用 ChatGPT 登录
|
|
83
85
|
|
|
84
|
-
|
|
86
|
+
在模型页点击 **授权**,或在插件配置中点击 **使用 ChatGPT 登录**,然后自行完成浏览器审批。如果内嵌 WebView 阻止登录窗口,请点击页面显示的 **打开 ChatGPT 登录页面**,在系统浏览器中继续。不要把授权 URL、授权码、token 或账户标识复制到 Issue、日志或配置文件中。
|
|
85
87
|
|
|
86
|
-
|
|
88
|
+
预期结果:模型页显示 **退出登录** 和 **查看额度**;插件配置的账户区显示 **已登录**。下图展示的是成功登录后的备用入口,不是开始登录前的页面。
|
|
87
89
|
|
|
88
90
|
<p align="center">
|
|
89
91
|
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/zh/oauth-status.jpg" alt="Harness 插件配置中的中文 Codex Connect 已登录状态" width="720">
|
|
@@ -154,9 +156,10 @@ dsh plugin --profile web exec dsh-codex-connect doctor --json
|
|
|
154
156
|
enableSearch: false
|
|
155
157
|
enableImageTool: false
|
|
156
158
|
enableImageGeneration: false
|
|
159
|
+
enableAutoReview: false
|
|
157
160
|
```
|
|
158
161
|
|
|
159
|
-
打开 **设置 → 插件 → 插件配置 → Codex Connect
|
|
162
|
+
打开 **设置 → 插件 → 插件配置 → Codex Connect**,即可通过**账户与额度**、**模型**、**网络**和**能力**四个模块管理同一组设置。切换模块不会丢失暂存修改,常驻的保存/放弃操作会统一处理这些修改。**保存更改**只影响本插件,绝不会选择默认模型或全局搜索路由。模型页的**更多设置**弹窗采用相同组织方式,但不重复账户模块。
|
|
160
163
|
|
|
161
164
|
### 网络连接与代理检测
|
|
162
165
|
|
|
@@ -164,7 +167,7 @@ Codex Connect 默认使用**直连**。代理是可选项,只作用于本插
|
|
|
164
167
|
|
|
165
168
|
点击 **检测代理** 时,只会测试标准代理环境变量,以及文档列出的本机候选地址:`127.0.0.1:7890`、`127.0.0.1:7897` 和 `127.0.0.1:10809`。检测不调用模型、不消耗额度,也不会写入设置。规范 Codex 端点返回任何 HTTP 响应都表示网络可达;`401/403`、代理 `407`、DNS、连接被拒绝、超时、TLS 和 CONNECT 失败会分别显示为诊断类别。
|
|
166
169
|
|
|
167
|
-
请先检查候选地址,再选择 **使用此代理**,最后点击
|
|
170
|
+
请先检查候选地址,再选择 **使用此代理**,最后点击 **保存更改**。**手动配置**要求当前这个不带凭据的 HTTP(S) proxy origin 测试成功后才允许启用;修改草稿会使之前的测试结果失效。**停用代理**始终可用。检测失败会保留原来的模式;代理已启用但请求失败时,界面会给出可操作的错误,绝不会静默改走直连。
|
|
168
171
|
|
|
169
172
|
### 只开启你准备使用的能力
|
|
170
173
|
|
|
@@ -305,9 +308,23 @@ dsh plugin --profile web exec dsh-codex-connect capabilities --model gpt-5.6-sol
|
|
|
305
308
|
|
|
306
309
|
本报告仅涵盖独立路由,不验证活动 profile 路由、搜索/图片工具、浏览器兼容性、provider 重试行为或会话恢复。本插件没有实现自动 provider 故障切换,因此该项为 `rejected`,需要用户明确选择其他 provider。有限 SSE 默认路径不会触发 WebSocket 到 SSE 的回退。`contextManagement` 和续接仍为 `unknown`;原生 compaction 和 WebSocket reuse 在当前集成策略下为 `rejected`。诊断结果不会启用这些能力,也不会更改 Harness 历史。退出码只覆盖运行时、OAuth、所选模型、Responses 和 SSE:`0` 表示五项均可用,`1` 表示至少一项被拒绝,`2` 表示证据未知、选项无效或检查失败。被拒绝的可选能力不影响该退出码。
|
|
307
310
|
|
|
311
|
+
### Codex 自动审查与能力探针
|
|
312
|
+
|
|
313
|
+
Codex 自动审查是 Codex Connect 接入的 Codex 官方能力,在 **设置 → 插件 → Codex Connect** 中默认关闭。界面常驻简短说明,完整告知可展开,每个 profile 首次启用时需要确认。启用后,它会在 DSH 策略检查之后审查符合条件的 Harness 审批请求。启用即允许插件把有界的最近审批上下文、工具参数、工作目录和待执行动作发送到 `chatgpt.com`;隐藏推理和已保存凭据会被排除。只有完整的结构化允许结果才能授权一次执行。拒绝会注入理由和禁止绕行指引;连续拒绝会打开当前轮熔断器;存在可选命令服务时,`/approve <拒绝记录 ID>` 可以授权一次完全相同的重试。详见[自动审查](auto-review.zh.md)和 [Auto-review](auto-review.md)。
|
|
314
|
+
|
|
315
|
+
独立探针继续用于诊断隐藏路由。它不会把 `codex-auto-review` 加入模型选择器,也不会审查或执行真实的 Harness 命令。
|
|
316
|
+
|
|
317
|
+
```sh
|
|
318
|
+
dsh plugin --profile web exec dsh-codex-connect auto-review-probe --json
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
该命令通过 ChatGPT OAuth Responses 路由向隐藏 reviewer 发送一条固定的合成空操作。它要求已存凭据尚未过期,不刷新或写入凭据,不跟随重定向、不重试,响应上限为 64 KiB,并在返回前销毁自有连接。`--proxy <http(s)-origin>` 和 `--timeout-ms <1..60000>` 与普通能力探针具有相同的显式网络含义。
|
|
322
|
+
|
|
323
|
+
`supported` 只表示路由接受了精确的隐藏模型 ID,并返回一条符合 reviewer JSON 字段的完整审查结果。`rejected` 表示请求或本地前置条件被明确拒绝。超时、取消、格式错误、不完整流、限流和网络故障均保持 `unknown`。输出会省略凭据、账号 ID、response ID、服务端消息、模型文本、路径、headers 和代理 origin。只有运行时、OAuth 和 reviewer 三项均为可用时才返回 `0`;至少一项被拒绝时返回 `1`;证据未知或输入无效时返回 `2`。该报告只提供证据:它绝不会修改自动审查设置、DSH 策略或授权状态。
|
|
324
|
+
|
|
308
325
|
## 兼容性与安全边界
|
|
309
326
|
|
|
310
|
-
- Alpha 4.
|
|
327
|
+
- Alpha 4.24 已与 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.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)。
|
|
311
328
|
- 新版 DSH 将原来的 client runtime 拆分为 Session Controller、Settings、Store 和 Renderer 包。Codex Connect 通过这些公开接口接入设置和图片操作。规范化预览的编码与尺寸由 DSH 决定;Codex Connect 另行保留字节完全一致的原图。
|
|
312
329
|
- 升级时请将 DSH 插件 API packages 与 `@earendil-works/pi-ai` 作为一组升级,再运行 `dsh-codex-connect doctor --json` 和兼容性检查。本契约不对未来版本作判断。
|
|
313
330
|
- 每日上游检查发现新的 DSH `latest` 或 `next` 候选版本时,会把 Codex Connect 安装到隔离 Profile 中,在没有 OAuth 凭据的情况下启动已安装的模型运行时,验证模型与推理强度发现,并确认提供方可被正确卸载。真实登录、额度和模型请求仍需在测试 Profile 中人工验证。
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Auto-review
|
|
2
|
+
|
|
3
|
+
Auto-review is an official Codex capability. Codex Connect integrates its reviewer with eligible DeepSeek Harness approval requests. The feature is disabled by default and participates only when the active request provider is `openai-codex`; another provider's session always keeps its existing answerer chain. It does not weaken Harness approval policy, sandboxing, tool restrictions, or permission checks: Harness decides whether approval is needed before Auto-review runs.
|
|
4
|
+
|
|
5
|
+
Enable **Codex Auto-review** under **Settings → Plugins → Codex Connect → Optional capabilities**. The settings card keeps a short explanation visible and places the full disclosure behind **Learn what is sent and how failures are handled**. The first attempt to enable Auto-review in a profile requires confirmation; that acknowledgement is saved in the profile and is not requested again in another browser. Enabling it permits Codex Connect to send the recent approval context, tool arguments, working directory, and planned action to `chatgpt.com`. Hidden reasoning and stored credentials are excluded. Disabling it immediately delegates every request to the existing human answerer chain.
|
|
6
|
+
|
|
7
|
+
## Decision rules
|
|
8
|
+
|
|
9
|
+
- Only a complete structured `allow` result returns `allowed-once`.
|
|
10
|
+
- A structured `deny` rejects the action and adds the rationale plus a no-circumvention instruction to the next model step.
|
|
11
|
+
- Missing or ambiguous action data, missing credentials, unsupported routes, malformed responses, and transport failures return to human approval.
|
|
12
|
+
- Cancellation stays cancelled. A timeout is reported separately; one retry of the exact action is permitted before later timeouts return to human approval.
|
|
13
|
+
- Three consecutive denials, or ten denials in the last fifty reviews in one turn, stop that turn.
|
|
14
|
+
- `/approve <denial-id>` authorizes one retry only when the tool, canonical arguments, and working directory exactly match the selected denial. A mismatch consumes the one-shot authorization without allowing the action. This command requires the optional `@deepseek-ai/dsh-commands` host capability.
|
|
15
|
+
|
|
16
|
+
Approval requests and outcomes remain durable through Harness `approval/asked` and `approval/decided` events. `/approve` uses Harness command lifecycle events. Codex Connect logs only the action fingerprint and structured assessment labels; it does not duplicate raw tool arguments in a new audit event.
|
|
17
|
+
|
|
18
|
+
## Context limits
|
|
19
|
+
|
|
20
|
+
The reviewer input uses conservative UTF-8 byte limits before network transmission: 20,000 bytes for retained narrative, 10,000 bytes for tool context, 5,000 bytes per narrative entry, 1,000 bytes per tool entry, and at most forty recent non-user entries. User text is labeled trusted; assistant and plugin text is not authorization. Omission and truncation counts are included in the request.
|
|
21
|
+
|
|
22
|
+
## Service status
|
|
23
|
+
|
|
24
|
+
OpenAI documents Auto-review as a Codex feature, but does not promise the `codex-auto-review` OAuth route as a stable public API. The separate `auto-review-probe` command checks only whether the current OAuth route accepts one synthetic no-op assessment. Runtime failures always return to human approval; they never authorize execution.
|
|
25
|
+
|
|
26
|
+
See [OpenAI Auto-review](https://learn.chatgpt.com/docs/sandboxing/auto-review), [OpenAI guardrails and approvals](https://developers.openai.com/api/docs/guides/agents/guardrails-approvals), and [Issue #84](https://github.com/franksong2702/dsh-codex-connect/issues/84).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# 自动审查
|
|
2
|
+
|
|
3
|
+
Auto-review 是 Codex 官方能力,Codex Connect 把它的审核器接入符合条件的 DeepSeek Harness 审批请求。该功能默认关闭,并且只在当前请求提供方是 `openai-codex` 时参与审批;其他提供方的会话始终保留原有回答器链。它也不会削弱 Harness 的审批策略、沙箱、工具限制或权限检查:是否需要审批始终由 Harness 先决定。
|
|
4
|
+
|
|
5
|
+
在 **设置 → 插件 → Codex Connect → 可选能力** 中启用 **Codex 自动审查**。设置卡片常驻一句简短说明,完整告知放在 **了解发送内容与失败处理** 中。每个 profile 首次启用时必须确认;该确认保存在 profile 中,更换浏览器后不会再次弹出。启用即允许 Codex Connect 把最近的审批上下文、工具参数、工作目录和待执行动作发送到 `chatgpt.com`。隐藏推理和已保存凭据不会进入审核请求。关闭后立即把所有请求交还原有人工审批链。
|
|
6
|
+
|
|
7
|
+
## 决策规则
|
|
8
|
+
|
|
9
|
+
- 只有完整、结构化的 `allow` 才返回 `allowed-once`。
|
|
10
|
+
- 结构化 `deny` 会拒绝动作,并把理由及禁止绕行指引加入下一模型步骤。
|
|
11
|
+
- 动作缺失或歧义、凭据缺失、路由不支持、响应畸形和传输失败都回到人工审批。
|
|
12
|
+
- 取消仍是取消。超时会单独提示;同一精确动作只允许重试审核一次,之后的超时回到人工审批。
|
|
13
|
+
- 同一轮连续拒绝三次,或最近五十次审核中拒绝十次,会停止该轮。
|
|
14
|
+
- `/approve <拒绝记录 ID>` 只授权一次完全相同的重试:工具、规范化参数和工作目录必须与所选拒绝记录一致。不匹配会消费这次授权,但不会放行动作。该命令需要宿主提供可选的 `@deepseek-ai/dsh-commands` 能力。
|
|
15
|
+
|
|
16
|
+
审批问题和结果继续由 Harness 的 `approval/asked`、`approval/decided` 事件持久记录;`/approve` 使用 Harness 命令生命周期事件。Codex Connect 只额外记录动作指纹和结构化评估标签,不在新审计事件中重复原始工具参数。
|
|
17
|
+
|
|
18
|
+
## 上下文限制
|
|
19
|
+
|
|
20
|
+
网络请求前使用保守的 UTF-8 字节限制:会话文本 20,000 字节,工具上下文 10,000 字节,单条会话文本 5,000 字节,单条工具记录 1,000 字节,并且最多保留四十条最近的非用户记录。用户文本标记为可信授权来源;assistant 和插件文本不构成授权。请求中会明确包含省略和截断数量。
|
|
21
|
+
|
|
22
|
+
## 服务状态
|
|
23
|
+
|
|
24
|
+
OpenAI 已把 Auto-review 记录为 Codex 功能,但没有承诺 `codex-auto-review` OAuth 路由是稳定公共 API。独立的 `auto-review-probe` 命令只检查当前 OAuth 路由能否完成一次合成的空操作评估。运行时失败始终回到人工审批,绝不会放行执行。
|
|
25
|
+
|
|
26
|
+
参见 [OpenAI Auto-review](https://learn.chatgpt.com/docs/sandboxing/auto-review)、[OpenAI 审批与护栏](https://developers.openai.com/api/docs/guides/agents/guardrails-approvals) 和 [Issue #84](https://github.com/franksong2702/dsh-codex-connect/issues/84)。
|
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: b1ce6b106a81c0e035db3f87c87748bbcc60a743
|
|
4
|
+
design.zh.md: 821df671587a95baba65dd5e874f4d1d535a52a2
|
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.24 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.24 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.24 固定使用 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.24 与 DSH `0.1.2-alpha.5` 的精确组合。资格、额度、模型、服务端上下文容量和后端协议仍由上游控制。测试仅使用临时 OAuth 文档和模拟网络响应,CI 不执行真实认证。
|