dsh-codex-connect 0.1.0-alpha.4.6 → 0.1.0-alpha.4.7
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 +1 -1
- package/README.md +73 -32
- package/docs/README.zh.md +92 -34
- package/docs/assets/en/hero.jpg +0 -0
- package/docs/assets/en/model-selector.jpg +0 -0
- package/docs/assets/en/oauth-status.jpg +0 -0
- package/docs/assets/en/plugin-configuration.jpg +0 -0
- package/docs/assets/en/plugin-entry.jpg +0 -0
- package/docs/assets/zh/hero.jpg +0 -0
- package/docs/assets/zh/model-selector.jpg +0 -0
- package/docs/assets/zh/oauth-status.jpg +0 -0
- package/docs/assets/zh/plugin-configuration.jpg +0 -0
- package/docs/assets/zh/plugin-entry.jpg +0 -0
- package/lib/bin.js +1 -1
- package/lib/index.js +1 -1
- package/lib/{src-KKqkbCFT.js → src-Bk1Nq6B4.js} +1 -1
- package/package.json +1 -1
package/INSTALL.md
CHANGED
|
@@ -19,7 +19,7 @@ Install `dsh-codex-connect` into one requested DeepSeek Harness profile without
|
|
|
19
19
|
dsh plugin --profile web add dsh-codex-connect@alpha
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
After `0.1.0-alpha.4.
|
|
22
|
+
After `0.1.0-alpha.4.7` is published, pin it exactly with `dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.7`. 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.7'`.
|
|
23
23
|
|
|
24
24
|
3. Run `dsh --profile web --dump-config` and require exactly one `llm-openai-codex` row loading `dsh-codex-connect`.
|
|
25
25
|
4. Confirm the effective `agent-default-model` and `web.searchProvider` values are unchanged from before installation.
|
package/README.md
CHANGED
|
@@ -7,59 +7,87 @@ English | [中文](docs/README.zh.md)
|
|
|
7
7
|
Connect your ChatGPT subscription to DeepSeek Harness with OAuth, user-controlled defaults, Harness-native approvals, diagnostics, and reliable session recovery.
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/hero.jpg" alt="Codex Connect — ChatGPT OAuth for DeepSeek Harness" width="100%">
|
|
10
|
+
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/en/hero.jpg" alt="Codex Connect — ChatGPT OAuth for DeepSeek Harness" width="100%">
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
`dsh-codex-connect` adds the `openai-codex` model catalog and a separate ChatGPT OAuth login. Models run through Harness's normal LLM service, so streaming, tool calls, reasoning replay, compaction, filesystem controls, permission gates, and approval prompts remain Harness-owned. It does not turn a ChatGPT subscription into an OpenAI Platform API credential.
|
|
14
14
|
|
|
15
15
|
Installation is additive. The bundle does not replace the current default model or search route, and its standalone search provider and `view_image` tool are disabled until explicitly enabled.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Every UI screenshot in this English guide is captured from the English-localized Harness UI. The [Chinese guide](docs/README.zh.md) uses a Chinese capture of the same state. Model and provider identifiers keep their canonical spelling in both languages.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## Quick start (about five minutes)
|
|
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`.
|
|
22
|
+
|
|
23
|
+
### 1. Install the plugin into one profile
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
dsh plugin --profile web add dsh-codex-connect@alpha
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Expected result: the package is added to that profile. This does not change the profile's default model or global search route.
|
|
30
|
+
|
|
31
|
+
To reproduce this release exactly, use `dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.7`. 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.7'`. A local checkout can be installed as `link:/absolute/path/to/dsh-codex-connect`.
|
|
32
|
+
|
|
33
|
+
### 2. Start Harness
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
dsh web
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Expected result: the Harness web UI opens for the selected profile.
|
|
40
|
+
|
|
41
|
+
### 3. Find the Codex Connect card
|
|
42
|
+
|
|
43
|
+
Open **Settings → Plugins → Plugin configuration → Codex Connect**.
|
|
44
|
+
|
|
45
|
+
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.
|
|
20
46
|
|
|
21
47
|
<p align="center">
|
|
22
|
-
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/
|
|
48
|
+
<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="720">
|
|
23
49
|
</p>
|
|
24
50
|
|
|
25
|
-
|
|
51
|
+
### 4. Sign in with ChatGPT
|
|
52
|
+
|
|
53
|
+
Click **Sign in with ChatGPT** and complete the browser approval yourself. Do not copy an authorization URL, code, token, or account identifier into an issue, log, or configuration file.
|
|
54
|
+
|
|
55
|
+
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.
|
|
26
56
|
|
|
27
57
|
<p align="center">
|
|
28
|
-
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/
|
|
58
|
+
<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">
|
|
29
59
|
</p>
|
|
30
60
|
|
|
31
|
-
|
|
61
|
+
### 5. Choose a model and make one safe check
|
|
62
|
+
|
|
63
|
+
Open Harness's normal model picker and select an `openai-codex` model for the agent or session you are using. This selection is separate from writing the profile's default model or global search route.
|
|
64
|
+
|
|
65
|
+
The picker groups the available entries under **OpenAI Codex**. Model identifiers such as `GPT-5.6 Luna` are canonical names, so they intentionally remain un-translated.
|
|
32
66
|
|
|
33
67
|
<p align="center">
|
|
34
|
-
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/model-selector.jpg" alt="OpenAI Codex
|
|
68
|
+
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/en/model-selector.jpg" alt="OpenAI Codex model group in the English-localized DeepSeek Harness model picker" width="360">
|
|
35
69
|
</p>
|
|
36
70
|
|
|
37
|
-
|
|
71
|
+
To confirm the configured plugin row locally, run:
|
|
38
72
|
|
|
39
73
|
```sh
|
|
40
|
-
dsh
|
|
41
|
-
dsh web
|
|
74
|
+
dsh --profile web --dump-config
|
|
42
75
|
```
|
|
43
76
|
|
|
44
|
-
|
|
77
|
+
Expected result: the configuration has exactly one `llm-openai-codex` row. Keep this configuration dump local; it may include unrelated profile settings.
|
|
45
78
|
|
|
46
|
-
|
|
79
|
+
For secret-free status and diagnostics that do not start OAuth, run:
|
|
47
80
|
|
|
48
81
|
```sh
|
|
49
|
-
dsh plugin --profile web exec dsh-codex-connect
|
|
50
|
-
dsh plugin --profile web exec dsh-codex-connect
|
|
51
|
-
dsh plugin --profile web exec dsh-codex-connect doctor
|
|
82
|
+
dsh plugin --profile web exec dsh-codex-connect status --json
|
|
83
|
+
dsh plugin --profile web exec dsh-codex-connect doctor --json
|
|
52
84
|
```
|
|
53
85
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
For automation, `doctor --json` emits exactly one secret-free JSON document with schema version 1, package/version/Node metadata, credential-file state and safe mode, capabilities, conflict status, and hints; it omits the absolute credential path and OAuth/account/expiry data. `status --json` emits only signed-in or signed-out state with package metadata. `doctor --json` reads metadata only; `status --json` reads the credential solely to determine sign-in state, but neither mode prints credential contents or starts OAuth. Signed-out status still exits with code 1.
|
|
86
|
+
Expected result: `status --json` reports `signed-in` and exits `0`, while `doctor --json` prints one secret-free JSON document. A signed-out `status --json` exits `1`; return to step 4 instead of treating that as a plugin failure.
|
|
57
87
|
|
|
58
|
-
##
|
|
88
|
+
## Optional capabilities (off by default)
|
|
59
89
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
The installed bundle row remains the composition base and is intentionally inert beyond model-provider registration:
|
|
90
|
+
The installed bundle is intentionally inert beyond model-provider registration:
|
|
63
91
|
|
|
64
92
|
```yaml
|
|
65
93
|
- id: llm-openai-codex
|
|
@@ -68,6 +96,21 @@ The installed bundle row remains the composition base and is intentionally inert
|
|
|
68
96
|
enableImageTool: false
|
|
69
97
|
```
|
|
70
98
|
|
|
99
|
+
Open **Settings → Plugins → Plugin configuration → Codex Connect** to manage the account and these options in one card. **Save changes** affects only this plugin's capability section and applies live. It never selects a default model or a global search route.
|
|
100
|
+
|
|
101
|
+
### Enable only the capability you intend to use
|
|
102
|
+
|
|
103
|
+
- `enableSearch: true` registers Codex as an available search provider. It does not select the profile's global search route.
|
|
104
|
+
- `enableImageTool: true` enables `view_image` for approved local reads and public-network image fetches on vision-capable models.
|
|
105
|
+
|
|
106
|
+
The screenshot below is an example after someone has explicitly enabled capabilities. It does not show the fresh-install default. This English guide uses the English-localized capture; the Chinese guide shows the matching Chinese-localized state.
|
|
107
|
+
|
|
108
|
+
<p align="center">
|
|
109
|
+
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/en/plugin-configuration.jpg" alt="English-localized Codex Connect optional capability configuration after explicit opt-in" width="720">
|
|
110
|
+
</p>
|
|
111
|
+
|
|
112
|
+
### Change a default model or global search route separately
|
|
113
|
+
|
|
71
114
|
To make a Codex model the default for new agents, add or update the separate Harness row yourself:
|
|
72
115
|
|
|
73
116
|
```yaml
|
|
@@ -77,7 +120,7 @@ To make a Codex model the default for new agents, add or update the separate Har
|
|
|
77
120
|
model: gpt-5.6-sol
|
|
78
121
|
```
|
|
79
122
|
|
|
80
|
-
|
|
123
|
+
Selecting Codex as the profile's global search route is another explicit change:
|
|
81
124
|
|
|
82
125
|
```yaml
|
|
83
126
|
- id: llm-openai-codex
|
|
@@ -91,8 +134,6 @@ The card can enable Codex standalone search. Selecting it as the profile's globa
|
|
|
91
134
|
searchProvider: openai-codex
|
|
92
135
|
```
|
|
93
136
|
|
|
94
|
-
To add the image-loading tool, set `enableImageTool: true` on `llm-openai-codex`. Browser paste/drop remains a Harness attachment feature and does not depend on this tool.
|
|
95
|
-
|
|
96
137
|
| Field | Default | Values |
|
|
97
138
|
|---|---:|---|
|
|
98
139
|
| `enableSearch` | `false` | boolean |
|
|
@@ -102,13 +143,13 @@ To add the image-loading tool, set `enableImageTool: true` on `llm-openai-codex`
|
|
|
102
143
|
| `searchContextSize` | `medium` | `low`, `medium`, `high` |
|
|
103
144
|
| `searchMaxOutputTokens` | `10000` | positive integer |
|
|
104
145
|
|
|
105
|
-
##
|
|
146
|
+
## Reauthentication, diagnostics, and conflicts
|
|
106
147
|
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
148
|
+
- 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.
|
|
149
|
+
- `doctor` reads process and filesystem metadata only. `doctor --json` emits exactly one secret-free JSON document with schema version 1, package/version/Node metadata, credential-file state and safe mode, capabilities, conflict status, and hints. It omits the absolute credential path and OAuth, account, and expiry data.
|
|
150
|
+
- `status --json` emits only signed-in or signed-out state with package metadata. `status --json` reads the credential only to determine sign-in state, but never prints credential contents or starts OAuth.
|
|
151
|
+
- OAuth is stored separately at `$DSH_HOME/.openai-codex-auth.json` (`~/.dsh` by default). `~/.codex/auth.json` is never copied or modified. The parent directory and file use owner-only permissions where supported, writes are atomic, and refresh writes use a cross-process file lock.
|
|
152
|
+
- If startup reports an `openai-codex` collision, an old `dsh-codex` bundle or manual provider row may already own the adapter. Inspect the effective configuration and remove only the confirmed conflicting owner. Do not delete auth files or unrelated providers.
|
|
112
153
|
- Removing the package does not delete OAuth state. Run `logout` only when credential removal is intended.
|
|
113
154
|
|
|
114
155
|
## Compatibility and security boundary
|
package/docs/README.zh.md
CHANGED
|
@@ -7,59 +7,87 @@
|
|
|
7
7
|
通过 OAuth 将你的 ChatGPT 订阅连接到 DeepSeek Harness,同时保留用户自主默认项、Harness 原生审批、非敏感诊断和可靠的会话恢复。
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/hero.jpg" alt="Codex Connect — 通过 ChatGPT OAuth 连接 DeepSeek Harness" width="100%">
|
|
10
|
+
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/zh/hero.jpg" alt="Codex Connect — 通过 ChatGPT OAuth 连接 DeepSeek Harness" width="100%">
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
`dsh-codex-connect` 提供 `openai-codex` 模型目录和独立的 ChatGPT OAuth 登录。模型仍走 Harness 标准 LLM 服务,因此流式输出、工具调用、reasoning replay、压缩、文件系统控制、权限门禁和审批提示仍由 Harness 负责。ChatGPT 订阅不会因此变成 OpenAI Platform API 凭据。
|
|
14
14
|
|
|
15
15
|
安装是增量的:bundle 不会替换当前主模型或搜索路由;独立搜索提供方和 `view_image` 工具也默认关闭,必须显式开启。
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
本中文指南中的 UI 截图均来自中文本地化的 Harness 界面;[English 版](../README.md) 使用同一状态的英文截图。模型与提供方标识保留其规范拼写,不随界面语言翻译。
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## 五分钟快速开始
|
|
20
|
+
|
|
21
|
+
本指南使用 `web` profile。请把 `web` 替换成你已经在用的 Harness profile 名称。你需要先有可用的 `dsh` 安装;如果在 DeepSeek Harness 源码 checkout 中运行,请在命令前加 `pnpm`。
|
|
22
|
+
|
|
23
|
+
### 1. 将插件装入一个 profile
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
dsh plugin --profile web add dsh-codex-connect@alpha
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
预期结果:包被加入该 profile。这个动作不会更改 profile 的默认模型或全局搜索路由。
|
|
30
|
+
|
|
31
|
+
如需精确复现这个版本,使用 `dsh plugin --profile web add dsh-codex-connect@0.1.0-alpha.4.7`。对应 GitHub prerelease 已创建但 npm 不可用时,可使用 `dsh plugin --profile web add 'github:franksong2702/dsh-codex-connect#v0.1.0-alpha.4.7'`。本地 checkout 可安装为 `link:/absolute/path/to/dsh-codex-connect`。
|
|
32
|
+
|
|
33
|
+
### 2. 启动 Harness
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
dsh web
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
预期结果:所选 profile 的 Harness Web UI 打开。
|
|
40
|
+
|
|
41
|
+
### 3. 找到 Codex Connect 卡片
|
|
42
|
+
|
|
43
|
+
打开 **设置 → 插件 → 插件配置 → Codex Connect**。
|
|
44
|
+
|
|
45
|
+
预期结果:新安装时账户区显示 **尚未登录**,并出现 **使用 ChatGPT 登录** 按钮。之后管理可选能力也在同一张卡片中完成。
|
|
20
46
|
|
|
21
47
|
<p align="center">
|
|
22
|
-
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/
|
|
48
|
+
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/zh/plugin-entry.jpg" alt="Harness 插件配置中的中文 Codex Connect 折叠入口" width="720">
|
|
23
49
|
</p>
|
|
24
50
|
|
|
25
|
-
|
|
51
|
+
### 4. 使用 ChatGPT 登录
|
|
52
|
+
|
|
53
|
+
点击 **使用 ChatGPT 登录**,并自行完成浏览器审批。不要把授权 URL、授权码、token 或账户标识复制到 Issue、日志或配置文件中。
|
|
54
|
+
|
|
55
|
+
预期结果:账户区变为 **已登录**。下图展示的是完成本步骤后的成功状态,不是开始登录前的页面。
|
|
26
56
|
|
|
27
57
|
<p align="center">
|
|
28
|
-
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/
|
|
58
|
+
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/zh/oauth-status.jpg" alt="Harness 插件配置中的中文 Codex Connect 已登录状态" width="720">
|
|
29
59
|
</p>
|
|
30
60
|
|
|
31
|
-
|
|
61
|
+
### 5. 选择模型并做一次安全检查
|
|
62
|
+
|
|
63
|
+
打开 Harness 原生模型选择器,为当前正在使用的 agent 或会话选择一个 `openai-codex` 模型。这个选择与写入 profile 的默认模型或全局搜索路由是两件事。
|
|
64
|
+
|
|
65
|
+
选择器会把可用项归在 **OpenAI Codex** 下。`GPT-5.6 Luna` 一类模型标识是规范名称,因此会保留原样,不翻译。
|
|
32
66
|
|
|
33
67
|
<p align="center">
|
|
34
|
-
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/model-selector.jpg" alt="DeepSeek Harness 模型选择器中的 OpenAI Codex
|
|
68
|
+
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/zh/model-selector.jpg" alt="中文 DeepSeek Harness 模型选择器中的 OpenAI Codex 模型分组" width="360">
|
|
35
69
|
</p>
|
|
36
70
|
|
|
37
|
-
|
|
71
|
+
如需在本机确认插件配置行,运行:
|
|
38
72
|
|
|
39
73
|
```sh
|
|
40
|
-
dsh
|
|
41
|
-
dsh web
|
|
74
|
+
dsh --profile web --dump-config
|
|
42
75
|
```
|
|
43
76
|
|
|
44
|
-
|
|
77
|
+
预期结果:配置中恰好有一条 `llm-openai-codex`。请只在本机查看这份配置输出,它可能包含无关的 profile 设置。
|
|
45
78
|
|
|
46
|
-
|
|
79
|
+
如需不启动 OAuth 的非敏感状态和诊断输出,运行:
|
|
47
80
|
|
|
48
81
|
```sh
|
|
49
|
-
dsh plugin --profile web exec dsh-codex-connect
|
|
50
|
-
dsh plugin --profile web exec dsh-codex-connect
|
|
51
|
-
dsh plugin --profile web exec dsh-codex-connect doctor
|
|
82
|
+
dsh plugin --profile web exec dsh-codex-connect status --json
|
|
83
|
+
dsh plugin --profile web exec dsh-codex-connect doctor --json
|
|
52
84
|
```
|
|
53
85
|
|
|
54
|
-
`doctor`
|
|
55
|
-
|
|
56
|
-
供脚本使用时,`doctor --json` 只输出一条可解析的非敏感 JSON,包含 schema version 1、包/版本/Node 信息、认证文件状态与安全 mode、能力、冲突状态和提示;它省略认证文件绝对路径以及 OAuth、账户和过期时间信息。`status --json` 只输出 signed-in 或 signed-out 状态及包元数据。`doctor --json` 只读取元数据;`status --json` 仅为判断登录态读取认证文件,但两者都不会输出认证文件内容或启动 OAuth;signed-out 状态仍返回退出码 1。
|
|
57
|
-
|
|
58
|
-
## 显式配置
|
|
86
|
+
预期结果:`status --json` 报告 `signed-in` 并以 `0` 退出,`doctor --json` 只输出一条非敏感 JSON。尚未登录时 `status --json` 会以 `1` 退出;回到第 4 步登录即可,不要把它当作插件故障。
|
|
59
87
|
|
|
60
|
-
|
|
88
|
+
## 可选能力(默认关闭)
|
|
61
89
|
|
|
62
|
-
安装后的 bundle
|
|
90
|
+
安装后的 bundle 只注册模型提供方,默认不额外启用任何能力:
|
|
63
91
|
|
|
64
92
|
```yaml
|
|
65
93
|
- id: llm-openai-codex
|
|
@@ -68,7 +96,22 @@ dsh plugin --profile web exec dsh-codex-connect doctor
|
|
|
68
96
|
enableImageTool: false
|
|
69
97
|
```
|
|
70
98
|
|
|
71
|
-
|
|
99
|
+
打开 **设置 → 插件 → 插件配置 → Codex Connect**,即可在同一张卡片中管理账户和这些选项。**保存更改**只影响本插件的能力配置并即时生效,绝不会选择默认模型或全局搜索路由。
|
|
100
|
+
|
|
101
|
+
### 只开启你准备使用的能力
|
|
102
|
+
|
|
103
|
+
- `enableSearch: true` 会把 Codex 注册为可选择的搜索提供方,不会把它选为 profile 的全局搜索路由。
|
|
104
|
+
- `enableImageTool: true` 会为具备视觉能力的模型启用 `view_image`,用于审批后的本地读取和公网图片获取。
|
|
105
|
+
|
|
106
|
+
下图是有人显式开启能力之后的配置示例,不是新安装的默认状态。本中文指南使用中文本地化截图;English 版展示同一状态的英文截图。
|
|
107
|
+
|
|
108
|
+
<p align="center">
|
|
109
|
+
<img src="https://raw.githubusercontent.com/franksong2702/dsh-codex-connect/main/docs/assets/zh/plugin-configuration.jpg" alt="中文 Codex Connect 显式开启可选能力后的配置示例" width="720">
|
|
110
|
+
</p>
|
|
111
|
+
|
|
112
|
+
### 单独更改默认模型或全局搜索路由
|
|
113
|
+
|
|
114
|
+
如需把 Codex 模型设为新 agent 的默认模型,需要自行添加或修改独立的 Harness 配置项:
|
|
72
115
|
|
|
73
116
|
```yaml
|
|
74
117
|
- id: agent-default-model
|
|
@@ -77,7 +120,7 @@ dsh plugin --profile web exec dsh-codex-connect doctor
|
|
|
77
120
|
model: gpt-5.6-sol
|
|
78
121
|
```
|
|
79
122
|
|
|
80
|
-
|
|
123
|
+
如需把 Codex 选为 profile 的全局搜索路由,还需要另做一次显式配置:
|
|
81
124
|
|
|
82
125
|
```yaml
|
|
83
126
|
- id: llm-openai-codex
|
|
@@ -91,27 +134,42 @@ dsh plugin --profile web exec dsh-codex-connect doctor
|
|
|
91
134
|
searchProvider: openai-codex
|
|
92
135
|
```
|
|
93
136
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
137
|
+
| 字段 | 默认值 | 可选值 |
|
|
138
|
+
|---|---:|---|
|
|
139
|
+
| `enableSearch` | `false` | boolean |
|
|
140
|
+
| `enableImageTool` | `false` | boolean |
|
|
141
|
+
| `searchModel` | `gpt-5.6-sol` | Codex model id |
|
|
142
|
+
| `searchMode` | `cached` | `cached`、`indexed`、`live` |
|
|
143
|
+
| `searchContextSize` | `medium` | `low`、`medium`、`high` |
|
|
144
|
+
| `searchMaxOutputTokens` | `10000` | 正整数 |
|
|
145
|
+
|
|
146
|
+
## 重新登录、诊断与冲突
|
|
147
|
+
|
|
148
|
+
- 卡片显示 **重新登录**,或服务端要求重新认证时,点击该操作并完成同一套安全的浏览器流程。它会保留本插件的能力配置,不会偷偷改动默认模型或全局搜索路由。不要为了刷新会话而运行 `logout`。
|
|
149
|
+
- `doctor` 只读取进程与文件系统元数据。`doctor --json` 只输出一条可解析的非敏感 JSON,包含 schema version 1、包/版本/Node 信息、认证文件状态与安全 mode、能力、冲突状态和提示;它省略认证文件绝对路径以及 OAuth、账户和过期时间信息。
|
|
150
|
+
- `status --json` 只输出 signed-in 或 signed-out 状态及包元数据。它只为判断登录态读取认证文件,但不会输出认证文件内容或启动 OAuth。
|
|
151
|
+
- OAuth 单独存储于 `$DSH_HOME/.openai-codex-auth.json`(默认 `~/.dsh`)。`~/.codex/auth.json` 不会被复制或修改。支持的平台上,父目录与文件使用仅所有者可访问权限;写入采用原子替换,刷新写入使用跨进程文件锁。
|
|
152
|
+
- 启动报告 `openai-codex` 冲突时,旧 `dsh-codex` bundle 或手动 provider 配置可能已占用该 adapter。先检查有效配置,只移除已确认的冲突所有者。不要删除认证文件或无关 provider。
|
|
103
153
|
- 移除包不会删除 OAuth 状态;只有确实需要删除凭据时才运行 `logout`。
|
|
104
154
|
|
|
105
155
|
## 兼容性与安全边界
|
|
106
156
|
|
|
107
157
|
- Alpha 面向当前 Harness `0.1.0-rc.5` 主线组合与兼容的 `0.1.0-rc.6` 插件 API、Node.js `^22.19.0 || >=24.0.0` 和固定版本的 `@earendil-works/pi-ai` Codex provider。
|
|
108
158
|
- ChatGPT 套餐资格、模型权限、额度和后端行为由 OpenAI 控制,可能变化。
|
|
159
|
+
- Codex 端点不会强制普通 Responses 的 `max_output_tokens` 字段。Harness 压缩仍可工作,但这个摘要上限不能由服务端在该路由上强制。
|
|
109
160
|
- shell、文件系统、skills、MCP、subagents、审批、权限、附件、会话持久化、压缩与恢复继续由当前 Harness profile 提供。
|
|
110
161
|
- 远程 `view_image` 只允许公共 HTTP(S) 目标;每一次 DNS 结果与重定向都会重新检查,并将连接固定到已验证地址,从而阻止 localhost、私网、link-local 服务和云元数据地址。
|
|
111
162
|
- 安装、构建、测试、doctor 和包内容验证均不需要真实 OAuth。
|
|
112
163
|
|
|
113
164
|
详见 [安装运行手册](../INSTALL.md)、[Alpha 发布清单](../RELEASING.md)、[MIGRATION.md](../MIGRATION.md) 与 [架构说明](design.zh.md)。
|
|
114
165
|
|
|
166
|
+
## 开发
|
|
167
|
+
|
|
168
|
+
```sh
|
|
169
|
+
pnpm install --frozen-lockfile
|
|
170
|
+
pnpm run check
|
|
171
|
+
```
|
|
172
|
+
|
|
115
173
|
## 法律与致谢
|
|
116
174
|
|
|
117
175
|
Codex Connect 的修改与新增工作 Copyright 2026 Frank Song。本项目包含派生自 [Yan-Zero/dsh-codex](https://github.com/Yan-Zero/dsh-codex) 的软件;上游内容继续保留 Copyright 2026 Yan-Zero。两部分均按 Apache-2.0 发布,详情见 [NOTICE](../NOTICE)。本项目与 OpenAI、ChatGPT、Codex、DeepSeek 或 DeepSeek Harness 不存在隶属关系,也未获得其背书。
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/lib/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as loginOpenAICodex, E as CODEX_CONNECT_VERSION, I as openAICodexAuthPath, M as openAICodexAuthStatus, j as logoutOpenAICodex, w as diagnoseOpenAICodex } from "./src-
|
|
2
|
+
import { A as loginOpenAICodex, E as CODEX_CONNECT_VERSION, I as openAICodexAuthPath, M as openAICodexAuthStatus, j as logoutOpenAICodex, w as diagnoseOpenAICodex } from "./src-Bk1Nq6B4.js";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
import { realpathSync } from "node:fs";
|
|
5
5
|
import { createInterface } from "node:readline/promises";
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as loginOpenAICodex, C as assertNoOpenAICodexProviderConflict, D as OPENAI_CODEX_USAGE_URL, F as OpenAICodexCredentialStore, I as openAICodexAuthPath, M as openAICodexAuthStatus, N as OPENAI_CODEX_AUTH_FILENAME, O as parseOpenAICodexUsage, P as OPENAI_CODEX_PROVIDER, S as VIEW_IMAGE_TOOL_NAME, T as openAICodexConflictMessage, _ as decodeOpenAICodexSettings, a as name, b as installOpenAICodexSearchEvent, c as OPENAI_CODEX_SEARCH_URL, d as DEFAULT_OPENAI_CODEX_SEARCH_CONTEXT_SIZE, f as DEFAULT_OPENAI_CODEX_SEARCH_MAX_OUTPUT_TOKENS, g as OPENAI_CODEX_SETTINGS_NAMESPACE, h as DEFAULT_OPENAI_CODEX_SETTINGS, i as inject, j as logoutOpenAICodex, k as readOpenAICodexRateLimits, l as OpenAICodexSearchProvider, m as DEFAULT_OPENAI_CODEX_SEARCH_MODEL, n as OPENAI_CODEX_SETTINGS_NS, o as OPENAI_CODEX_BASE_URL, p as DEFAULT_OPENAI_CODEX_SEARCH_MODE, r as apply, s as OPENAI_CODEX_SEARCH_PROVIDER, t as Config, u as mapOpenAICodexSearchResponse, v as resolveOpenAICodexSettings, w as diagnoseOpenAICodex, x as recordOpenAICodexSearchRequest, y as OPENAI_CODEX_SEARCH_MODEL_REQUEST_EVENT } from "./src-
|
|
1
|
+
import { A as loginOpenAICodex, C as assertNoOpenAICodexProviderConflict, D as OPENAI_CODEX_USAGE_URL, F as OpenAICodexCredentialStore, I as openAICodexAuthPath, M as openAICodexAuthStatus, N as OPENAI_CODEX_AUTH_FILENAME, O as parseOpenAICodexUsage, P as OPENAI_CODEX_PROVIDER, S as VIEW_IMAGE_TOOL_NAME, T as openAICodexConflictMessage, _ as decodeOpenAICodexSettings, a as name, b as installOpenAICodexSearchEvent, c as OPENAI_CODEX_SEARCH_URL, d as DEFAULT_OPENAI_CODEX_SEARCH_CONTEXT_SIZE, f as DEFAULT_OPENAI_CODEX_SEARCH_MAX_OUTPUT_TOKENS, g as OPENAI_CODEX_SETTINGS_NAMESPACE, h as DEFAULT_OPENAI_CODEX_SETTINGS, i as inject, j as logoutOpenAICodex, k as readOpenAICodexRateLimits, l as OpenAICodexSearchProvider, m as DEFAULT_OPENAI_CODEX_SEARCH_MODEL, n as OPENAI_CODEX_SETTINGS_NS, o as OPENAI_CODEX_BASE_URL, p as DEFAULT_OPENAI_CODEX_SEARCH_MODE, r as apply, s as OPENAI_CODEX_SEARCH_PROVIDER, t as Config, u as mapOpenAICodexSearchResponse, v as resolveOpenAICodexSettings, w as diagnoseOpenAICodex, x as recordOpenAICodexSearchRequest, y as OPENAI_CODEX_SEARCH_MODEL_REQUEST_EVENT } from "./src-Bk1Nq6B4.js";
|
|
2
2
|
export { Config, DEFAULT_OPENAI_CODEX_SEARCH_CONTEXT_SIZE, DEFAULT_OPENAI_CODEX_SEARCH_MAX_OUTPUT_TOKENS, DEFAULT_OPENAI_CODEX_SEARCH_MODE, DEFAULT_OPENAI_CODEX_SEARCH_MODEL, DEFAULT_OPENAI_CODEX_SETTINGS, OPENAI_CODEX_AUTH_FILENAME, OPENAI_CODEX_BASE_URL, OPENAI_CODEX_PROVIDER, OPENAI_CODEX_SEARCH_MODEL_REQUEST_EVENT, OPENAI_CODEX_SEARCH_PROVIDER, OPENAI_CODEX_SEARCH_URL, OPENAI_CODEX_SETTINGS_NAMESPACE, OPENAI_CODEX_SETTINGS_NS, OPENAI_CODEX_USAGE_URL, OpenAICodexCredentialStore, OpenAICodexSearchProvider, VIEW_IMAGE_TOOL_NAME, apply, assertNoOpenAICodexProviderConflict, decodeOpenAICodexSettings, diagnoseOpenAICodex, inject, installOpenAICodexSearchEvent, loginOpenAICodex, logoutOpenAICodex, mapOpenAICodexSearchResponse, name, openAICodexAuthPath, openAICodexAuthStatus, openAICodexConflictMessage, parseOpenAICodexUsage, readOpenAICodexRateLimits, recordOpenAICodexSearchRequest, resolveOpenAICodexSettings };
|
|
@@ -646,7 +646,7 @@ function registerOpenAICodexAuthRoutes(ctx, store) {
|
|
|
646
646
|
}
|
|
647
647
|
//#endregion
|
|
648
648
|
//#region src/version.ts
|
|
649
|
-
const CODEX_CONNECT_VERSION = "0.1.0-alpha.4.
|
|
649
|
+
const CODEX_CONNECT_VERSION = "0.1.0-alpha.4.7";
|
|
650
650
|
//#endregion
|
|
651
651
|
//#region src/doctor.ts
|
|
652
652
|
/** Secret-free diagnostics and duplicate-provider guidance. */
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "dsh-codex-connect",
|
|
3
3
|
"displayName": "Codex Connect",
|
|
4
4
|
"description": "ChatGPT OAuth and Codex models for DeepSeek Harness.",
|
|
5
|
-
"version": "0.1.0-alpha.4.
|
|
5
|
+
"version": "0.1.0-alpha.4.7",
|
|
6
6
|
"author": "Frank Song",
|
|
7
7
|
"contributors": [
|
|
8
8
|
"Yan-Zero (original dsh-codex author)"
|