@shuind/dsh-codex-harness 0.1.12 → 0.1.14
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 +40 -40
- package/cordis.patch.yml +10 -5
- package/lib/index.js +9 -0
- package/lib/types/index.js +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
1
|
# @shuind/dsh-codex-harness
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
在 DSH 中提供 Codex preset:引入 Codex 风格的系统提示词与工具契约,支持图片输入、可选思考强度、Fast 优先级请求、OpenAI Responses 网页搜索与远程压缩,以及在 Web 设置上下文容量;旨在给来源于Codex的token提供适配harness,并兼容享受DSH生态。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 功能
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
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.
|
|
17
|
+
dsh plugin --profile web add @shuind/dsh-codex-harness@0.1.14
|
|
20
18
|
```
|
|
21
19
|
|
|
22
|
-
重启 Web,创建新会话,在模式菜单中选择
|
|
20
|
+
重启 Web,创建新会话,在模式菜单中选择 **Codex 模式**。
|
|
23
21
|
|
|
24
|
-
##
|
|
22
|
+
## 配置
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
在 DSH 的 Models / `llm-pi-ai` 中配置 Responses provider、endpoint、API key 和模型。例如:
|
|
27
25
|
|
|
28
|
-
|
|
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
|
-
|
|
34
|
+
## 请求设置
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
### Fast
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
Fast 与 `reasoning_effort` 独立。开启 Fast 后,GPT Responses 请求会携带:
|
|
37
39
|
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"service_tier": "priority"
|
|
43
|
+
}
|
|
41
44
|
```
|
|
42
45
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
## 提供的工具
|
|
46
|
+
Fast 设置保存在 `codex` 命名空间,只对 Codex preset 生效。
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
- `write_stdin`
|
|
49
|
-
- `apply_patch`
|
|
50
|
-
- `update_plan`
|
|
48
|
+
### 上下文容量
|
|
51
49
|
|
|
52
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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/lib/index.js
CHANGED
|
@@ -846,6 +846,15 @@ const CODEX_BASE_PROMPT = String.raw`You are Codex, based on {{model}}. You are
|
|
|
846
846
|
|
|
847
847
|
- When searching for text or files, prefer using rg or rg --files respectively because rg is much faster than alternatives like grep. If rg is not available, use the next best alternative.
|
|
848
848
|
|
|
849
|
+
## Collaboration
|
|
850
|
+
|
|
851
|
+
- Ask, align, and clarify whenever uncertainty, assumptions, tradeoffs, or decisions could materially affect the outcome.
|
|
852
|
+
- Understand the user's full picture, align it with your own, and leave no hidden assumptions or gaps.
|
|
853
|
+
- Keep only the essential logic and core actions. There's no need to explain or test what was removed or why something wasn't done.
|
|
854
|
+
- Convey enough valuable information with as few words as possible. Stay focused on the end goal.
|
|
855
|
+
- Solve problems by thinking from first principles and at a higher level.
|
|
856
|
+
- Make things as effortless as possible for the user.
|
|
857
|
+
|
|
849
858
|
## Editing constraints
|
|
850
859
|
|
|
851
860
|
- Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.
|
package/lib/types/index.js
CHANGED
|
@@ -142,6 +142,15 @@ const CODEX_BASE_PROMPT = String.raw `You are Codex, based on {{model}}. You are
|
|
|
142
142
|
|
|
143
143
|
- When searching for text or files, prefer using rg or rg --files respectively because rg is much faster than alternatives like grep. If rg is not available, use the next best alternative.
|
|
144
144
|
|
|
145
|
+
## Collaboration
|
|
146
|
+
|
|
147
|
+
- Ask, align, and clarify whenever uncertainty, assumptions, tradeoffs, or decisions could materially affect the outcome.
|
|
148
|
+
- Understand the user's full picture, align it with your own, and leave no hidden assumptions or gaps.
|
|
149
|
+
- Keep only the essential logic and core actions. There's no need to explain or test what was removed or why something wasn't done.
|
|
150
|
+
- Convey enough valuable information with as few words as possible. Stay focused on the end goal.
|
|
151
|
+
- Solve problems by thinking from first principles and at a higher level.
|
|
152
|
+
- Make things as effortless as possible for the user.
|
|
153
|
+
|
|
145
154
|
## Editing constraints
|
|
146
155
|
|
|
147
156
|
- Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuind/dsh-codex-harness",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
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",
|