@shuind/dsh-codex-harness 0.1.10 → 0.1.12
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/LICENSE +21 -21
- package/README.md +27 -6
- package/README.zh.md +3 -3
- package/cordis.patch.yml +5 -5
- package/lib/client.js +633 -0
- package/lib/index.js +445 -4
- package/lib/types/client/index.d.ts +40 -0
- package/lib/types/client/index.js +112 -0
- package/lib/types/context.d.ts +5 -0
- package/lib/types/context.js +5 -0
- package/lib/types/index.d.ts +32 -0
- package/lib/types/index.js +156 -1
- package/lib/types/patch.js +15 -15
- package/lib/types/remote.d.ts +21 -0
- package/lib/types/remote.js +324 -0
- package/package.json +99 -13
- package/presets/codex/agent.cordis.yml +13 -0
- package/presets/codex/preset.yml +3 -3
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 DeepSeek
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,17 +1,38 @@
|
|
|
1
1
|
# @shuind/dsh-codex-harness
|
|
2
2
|
|
|
3
|
-
给 DSH 接入 Codex 风格 GPT
|
|
3
|
+
给 DSH 接入 Codex 风格 GPT 模型的插件。
|
|
4
4
|
|
|
5
|
-
DSH
|
|
5
|
+
选择 `Codex 模式` 时,本包复用用户在 DSH 中已经配置的模型,只增加 Codex 体验层:
|
|
6
|
+
|
|
7
|
+
- 检测用户配置的 GPT 系列模型;
|
|
8
|
+
- 为未声明能力的 GPT 模型补充可选思考强度(`low`、`medium`、`high`、`xhigh`、`max`);
|
|
9
|
+
- 为未声明能力的 GPT 模型默认补充文本和图片输入;
|
|
10
|
+
- 默认优先把 GPT Responses 请求中的 `web_search` 改为远程 hosted tool;失败时回退到保留的 DSH `web_search` function tool;
|
|
11
|
+
- 默认优先调用远程 `/responses/compact`,并把返回的原生 compaction item 在后续 Responses 请求中恢复;失败时回退到保留的 DSH 本地 compaction;
|
|
12
|
+
- 继续提供 Codex 的 `exec_command`、`write_stdin`、`apply_patch` 和 `update_plan`。
|
|
13
|
+
|
|
14
|
+
DSH 的通用 `@deepseek-ai/dsh-llm-pi-ai` 继续负责用户配置的 provider、Responses 中转地址、API key、实际模型请求和图片附件传输。本插件不会创建新的 `openai-codex` route,也不会覆盖用户的 endpoint 或凭据。
|
|
6
15
|
|
|
7
16
|
## 安装
|
|
8
17
|
|
|
9
18
|
```sh
|
|
10
|
-
dsh plugin --profile web add @shuind/dsh-codex-harness@0.1.
|
|
19
|
+
dsh plugin --profile web add @shuind/dsh-codex-harness@0.1.12
|
|
11
20
|
```
|
|
12
21
|
|
|
13
22
|
重启 Web,创建新会话,在模式菜单中选择 `Codex 模式`。
|
|
14
23
|
|
|
24
|
+
## Fast 与上下文大小
|
|
25
|
+
|
|
26
|
+
Codex 模式会在模型选择菜单中提供 `Fast` 控制。开启后,GPT Responses 请求会携带 `service_tier: "priority"`;它不是思考强度,也不会修改 `reasoning_effort`。该设置按 `codex` 设置命名空间保存,并作用于之后的请求。其他 preset 不会显示 Fast。
|
|
27
|
+
|
|
28
|
+
点击上下文使用量指示器可以展开上下文设置。上下文大小使用整数 K tokens,可通过滑块或数字输入设置,范围为 `1K` 到 `1000K`;恢复模型默认值会删除覆盖。设置值用于下一次请求;上方的上下文 meter 显示当前请求实际使用的容量,因此修改设置后要发送下一次请求,上方的分母才会更新。这个值同时用于上下文容量投影、token meter、compaction 判断和适配器的响应 token 统计,而不只是修改显示文本。实际使用前请确认中转站和模型支持所选容量。
|
|
29
|
+
|
|
30
|
+
## 中转站配置
|
|
31
|
+
|
|
32
|
+
请继续在 DSH 的 Models/`llm-pi-ai` 配置中填写你的 Responses 中转站地址、API key 和模型。例如 provider 下配置 `api: openai-responses`、`baseURL`、`apiKeyEnv`,并在 `models` 中填写中转站实际支持的 GPT 模型 id。Codex 模式不会替换这些配置。
|
|
33
|
+
|
|
34
|
+
插件只会把缺少 `input` 或 `reasoningEfforts` 的 GPT 模型配置补成图片和思考强度能力;如果用户已经显式配置了这些字段,则保持用户配置不变。不同中转站对 GPT 模型名、图片格式、reasoning 参数和 hosted `web_search`/`responses/compact` 的支持程度不同,远程请求失败时会回退到 DSH 本地实现。
|
|
35
|
+
|
|
15
36
|
如果之前安装过旧包,先移除旧包,并把旧的 Codex preset 目录备份后再重启:
|
|
16
37
|
|
|
17
38
|
```sh
|
|
@@ -28,11 +49,11 @@ mv "$DSH_HOME/.agent-presets/codex" "$DSH_HOME/.agent-presets/codex.old"
|
|
|
28
49
|
- `apply_patch`
|
|
29
50
|
- `update_plan`
|
|
30
51
|
|
|
31
|
-
工具名称、参数和结果格式兼容 Codex
|
|
52
|
+
工具名称、参数和结果格式兼容 Codex。模型、思考强度、图片和搜索能力通过 DSH 的 LLM、附件和 Web seam 提供,Skills、文件系统策略、Shell、Terminal 等能力仍通过 DSH 的可插拔扩展提供。
|
|
32
53
|
|
|
33
54
|
## 兼容性
|
|
34
55
|
|
|
35
|
-
-
|
|
56
|
+
- 兼容包含 `@deepseek-ai/dsh-llm-pi-ai` 和 `@deepseek-ai/dsh-tool-web` 的 DSH `0.1.0-rc.8` 及更新版本。
|
|
36
57
|
- 兼容旧版和新版 `dsh-tool-todo`。
|
|
37
58
|
- 不依赖 `registerTodosProjection`。
|
|
38
59
|
- Codex 工具只在 Codex preset 中挂载,不会污染 standard、code、minimal 或其他 preset。
|
|
@@ -47,6 +68,6 @@ mv "$DSH_HOME/.agent-presets/codex" "$DSH_HOME/.agent-presets/codex.old"
|
|
|
47
68
|
name: '@shuind/dsh-codex-harness'
|
|
48
69
|
```
|
|
49
70
|
|
|
50
|
-
配置项:`defaultYieldTimeMs`、`pollYieldTimeMs`、`writeYieldTimeMs`、`maxOutputBytes
|
|
71
|
+
配置项:`defaultYieldTimeMs`、`pollYieldTimeMs`、`writeYieldTimeMs`、`maxOutputBytes`、`hostedWebSearch`、`remoteCompact`。其中后两个默认开启,设为 `false` 可以直接使用保留的 DSH 本地 fallback。provider、Responses 中转地址、API key、模型和模型级能力继续由 DSH 的 `llm-pi-ai` 配置管理。
|
|
51
72
|
|
|
52
73
|
MIT License
|
package/README.zh.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# @shuind/dsh-codex-harness
|
|
2
|
-
|
|
3
|
-
中文文档已默认放在 [README.md](README.md)。
|
|
1
|
+
# @shuind/dsh-codex-harness
|
|
2
|
+
|
|
3
|
+
中文文档已默认放在 [README.md](README.md)。
|
package/cordis.patch.yml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
- insert:
|
|
2
|
-
# The bundle is host-plane installation only. The Codex tool/prompt row
|
|
3
|
-
# lives in presets/codex/agent.cordis.yml, so other presets stay unchanged.
|
|
4
|
-
- id: codex-preset-installer
|
|
5
|
-
name: '@shuind/dsh-codex-harness/installer'
|
|
1
|
+
- insert:
|
|
2
|
+
# The bundle is host-plane installation only. The Codex tool/prompt row
|
|
3
|
+
# lives in presets/codex/agent.cordis.yml, so other presets stay unchanged.
|
|
4
|
+
- id: codex-preset-installer
|
|
5
|
+
name: '@shuind/dsh-codex-harness/installer'
|