@shuind/dsh-codex-harness 0.1.12 → 0.1.13

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/README.md CHANGED
@@ -1,73 +1,73 @@
1
1
  # @shuind/dsh-codex-harness
2
2
 
3
- DSH 接入 Codex 风格 GPT 模型的插件。
3
+ DSH 中提供 Codex preset:引入 Codex 风格的系统提示词与工具契约,支持图片输入、可选思考强度、Fast 优先级请求、OpenAI Responses 网页搜索与远程压缩,以及在 Web 设置上下文容量;旨在给来源于Codex的token提供适配harness,并兼容享受DSH生态。
4
4
 
5
- 选择 `Codex 模式` 时,本包复用用户在 DSH 中已经配置的模型,只增加 Codex 体验层:
5
+ ## 功能
6
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 或凭据。
7
+ - **Codex coding-agent 提示词**:提供 Codex 风格的系统提示词、工具契约和编码工作流。
8
+ - **Codex 工具**:`exec_command`、`write_stdin`、`apply_patch`、`update_plan`。
9
+ - **GPT 能力补全**:为 GPT 系列模型补充图片输入和思考强度选项;不会覆盖用户已有的显式配置。
10
+ - **Fast**:仅在 Codex preset 的模型选择菜单中显示,开启后向 Responses 请求发送 `service_tier: "priority"`。
11
+ - **远程搜索与压缩**:OpenAI Responses 请求默认优先使用 hosted `web_search` `/responses/compact`;失败时回退到 DSH 的本地实现。
12
+ - **上下文容量**:在 Web 中设置 `1K`–`1000K` tokens,设置值作用于下一次请求。
15
13
 
16
14
  ## 安装
17
15
 
18
16
  ```sh
19
- dsh plugin --profile web add @shuind/dsh-codex-harness@0.1.12
17
+ dsh plugin --profile web add @shuind/dsh-codex-harness@0.1.13
20
18
  ```
21
19
 
22
- 重启 Web,创建新会话,在模式菜单中选择 `Codex 模式`。
20
+ 重启 Web,创建新会话,在模式菜单中选择 **Codex 模式**。
23
21
 
24
- ## Fast 与上下文大小
22
+ ## 配置
25
23
 
26
- Codex 模式会在模型选择菜单中提供 `Fast` 控制。开启后,GPT Responses 请求会携带 `service_tier: "priority"`;它不是思考强度,也不会修改 `reasoning_effort`。该设置按 `codex` 设置命名空间保存,并作用于之后的请求。其他 preset 不会显示 Fast。
24
+ DSH Models / `llm-pi-ai` 中配置 Responses provider、endpoint、API key 和模型。例如:
27
25
 
28
- 点击上下文使用量指示器可以展开上下文设置。上下文大小使用整数 K tokens,可通过滑块或数字输入设置,范围为 `1K` 到 `1000K`;恢复模型默认值会删除覆盖。设置值用于下一次请求;上方的上下文 meter 显示当前请求实际使用的容量,因此修改设置后要发送下一次请求,上方的分母才会更新。这个值同时用于上下文容量投影、token meter、compaction 判断和适配器的响应 token 统计,而不只是修改显示文本。实际使用前请确认中转站和模型支持所选容量。
26
+ ```yaml
27
+ api: openai-responses
28
+ baseURL: https://your-responses-endpoint.example.com
29
+ apiKeyEnv: OPENAI_API_KEY
30
+ ```
29
31
 
30
- ## 中转站配置
32
+ 模型列表中填写中转站实际支持的 GPT 模型。
31
33
 
32
- 请继续在 DSH 的 Models/`llm-pi-ai` 配置中填写你的 Responses 中转站地址、API key 和模型。例如 provider 下配置 `api: openai-responses`、`baseURL`、`apiKeyEnv`,并在 `models` 中填写中转站实际支持的 GPT 模型 id。Codex 模式不会替换这些配置。
34
+ ## 请求设置
33
35
 
34
- 插件只会把缺少 `input` 或 `reasoningEfforts` 的 GPT 模型配置补成图片和思考强度能力;如果用户已经显式配置了这些字段,则保持用户配置不变。不同中转站对 GPT 模型名、图片格式、reasoning 参数和 hosted `web_search`/`responses/compact` 的支持程度不同,远程请求失败时会回退到 DSH 本地实现。
36
+ ### Fast
35
37
 
36
- 如果之前安装过旧包,先移除旧包,并把旧的 Codex preset 目录备份后再重启:
38
+ Fast `reasoning_effort` 独立。开启 Fast 后,GPT Responses 请求会携带:
37
39
 
38
- ```sh
39
- dsh plugin --profile web remove @shuind/dsh-codex
40
- mv "$DSH_HOME/.agent-presets/codex" "$DSH_HOME/.agent-presets/codex.old"
40
+ ```json
41
+ {
42
+ "service_tier": "priority"
43
+ }
41
44
  ```
42
45
 
43
- 安装器会把随包提供的 preset 写入 `$DSH_HOME/.agent-presets/codex`,不会覆盖已有目录。升级已有安装时,请先备份并移除旧的 `codex` preset 目录,再重启 Web,让新版本安装包含压缩组的 preset。
44
-
45
- ## 提供的工具
46
+ Fast 设置保存在 `codex` 命名空间,只对 Codex preset 生效。
46
47
 
47
- - `exec_command`
48
- - `write_stdin`
49
- - `apply_patch`
50
- - `update_plan`
48
+ ### 上下文容量
51
49
 
52
- 工具名称、参数和结果格式兼容 Codex。模型、思考强度、图片和搜索能力通过 DSH 的 LLM、附件和 Web seam 提供,Skills、文件系统策略、Shell、Terminal 等能力仍通过 DSH 的可插拔扩展提供。
50
+ 点击 Web 顶部的上下文使用量指示器,可以设置下一次请求的上下文容量。上方 meter 显示当前请求的实际容量;修改设置后,需要发送下一次请求才会更新。
53
51
 
54
- ## 兼容性
55
-
56
- - 兼容包含 `@deepseek-ai/dsh-llm-pi-ai` 和 `@deepseek-ai/dsh-tool-web` 的 DSH `0.1.0-rc.8` 及更新版本。
57
- - 兼容旧版和新版 `dsh-tool-todo`。
58
- - 不依赖 `registerTodosProjection`。
59
- - Codex 工具只在 Codex preset 中挂载,不会污染 standard、code、minimal 或其他 preset。
60
- - preset 在创建会话时确定;已有会话不会自动切换。
52
+ 上下文容量使用整数 K tokens,范围为 `1K` 到 `1000K`。实际可用上限仍取决于模型和中转站支持情况。
61
53
 
62
54
  ## 自定义 preset
63
55
 
64
- 如果要组合自己的 Codex preset,把下面这一行放进该 preset 的 `agent.cordis.yml`,不要放进 profile 顶层 patch:
56
+ 在自定义 `agent.cordis.yml` 中挂载 Codex 工具层:
65
57
 
66
58
  ```yaml
67
59
  - id: codex-tools
68
60
  name: '@shuind/dsh-codex-harness'
69
61
  ```
70
62
 
71
- 配置项:`defaultYieldTimeMs`、`pollYieldTimeMs`、`writeYieldTimeMs`、`maxOutputBytes`、`hostedWebSearch`、`remoteCompact`。其中后两个默认开启,设为 `false` 可以直接使用保留的 DSH 本地 fallback。provider、Responses 中转地址、API key、模型和模型级能力继续由 DSH 的 `llm-pi-ai` 配置管理。
63
+ 如果需要保留 Codex preset 的完整工具、搜索、压缩和 Skills 组合,建议直接使用随包提供的 `presets/codex`。
64
+
65
+ ## 注意事项
66
+
67
+ - preset 在创建会话时确定;已有会话不会自动切换到 Codex 模式。
68
+ - GPT 模型的图片输入和思考强度属于能力补全;用户已明确配置的字段会被保留。
69
+ - hosted search、远程压缩以及 reasoning 参数的可用性取决于实际 Responses 中转站和模型。
70
+
71
+ ## License
72
72
 
73
- MIT License
73
+ MIT
package/cordis.patch.yml CHANGED
@@ -1,5 +1,10 @@
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'
6
+ # Register the browser face as part of the bundle. Without this explicit
7
+ # entry, a profile can load the host installer while the Web client never
8
+ # receives Fast/context controls.
9
+ - id: codex-client
10
+ name: '@shuind/dsh-codex-harness'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuind/dsh-codex-harness",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "A minimal Codex harness for GPT models that do not fit DSH's native interface, while remaining compatible with the DSH plugin ecosystem.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",