@shuind/dsh-codex-harness 0.1.35 → 0.1.36
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
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
- **精简 Codex coding-agent 提示词**:使用精简版系统提示词;身份、模型和工作目录由 `dsh-persona` 提供,避免重复的 Harness 身份说明,同时保留必要的工具契约和编码工作流。
|
|
8
8
|
- **Codex 工具**:`exec_command`、`write_stdin`、`apply_patch`、`update_plan`;`apply_patch` 匹配失败时会显示文件、hunk、行号、可见空白和附近文件内容,便于修正上下文。
|
|
9
|
-
- **后台任务**:`exec_command` 支持 `run_in_background: true`,立即返回 DSH `job_id
|
|
9
|
+
- **后台任务**:`exec_command` 支持 `run_in_background: true`,立即返回 DSH `job_id`;`job_output`、`job_list`、`job_kill` 以及完成通知和对应提示词均由 `@deepseek-ai/dsh-tool-jobs` 提供,Codex 层不重复注入后台任务管理提示。随包 preset 使用官方 `wakeup` 投递策略,空闲 agent 也会自动收到完成通知。
|
|
10
10
|
- **GPT 能力补全**:为 GPT 系列模型补充图片输入和思考强度选项;不会覆盖用户已有的显式配置。
|
|
11
11
|
- **Fast**:仅在 Codex preset 的模型选择菜单中显示,开启后向 Responses 请求发送 `service_tier: "priority"`。
|
|
12
12
|
- **Legacy Web compatibility**: The plugin uses only slots present in the legacy host. The context-size control is appended to the host context-usage popup, and the activity line is appended beside `Deep diving...`; no host upgrade is required.
|
|
13
|
+
- **Official DSH capabilities**: The shipped Codex presets add the official goal, reviewed plan-mode, continuable subagent/workflow, user-question, and durable todo surfaces. Background-job guidance and completion notifications remain owned by `@deepseek-ai/dsh-tool-jobs`; the Codex layer does not duplicate that prompt.
|
|
13
14
|
- **Responses 原生 apply_patch**:在 GPT Responses 请求的插件传输边界,把普通 JSON function tool 改写为 `type: "custom"` + OpenAI `lark` grammar;下一轮历史同步改写为 `custom_tool_call`。如果中转站拒绝 custom tool,则自动回退到普通 function tool,不改变 DSH 工具执行器。
|
|
14
15
|
- **远程搜索与压缩**:OpenAI Responses 请求默认优先使用 hosted `web_search` 和 `/responses/compact`;失败时回退到 DSH 的本地实现。
|
|
15
16
|
- **远程压缩用量**:`/responses/compact` 返回标准 `usage` 时,插件会把 `input_tokens`、缓存读写和 `output_tokens` 原样拆分为 DSH 的用量字段;不再把远程压缩伪造成 `0`。中转站缺失或返回不一致的 usage 时,插件不会编造数字。
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
## 安装
|
|
21
22
|
|
|
22
23
|
```sh
|
|
23
|
-
dsh plugin --profile web add @shuind/dsh-codex-harness@0.1.
|
|
24
|
+
dsh plugin --profile web add @shuind/dsh-codex-harness@0.1.36
|
|
24
25
|
```
|
|
25
26
|
|
|
26
27
|
重启 Web,创建新会话,在模式菜单中选择 **Codex 模式**。
|
|
@@ -72,7 +73,7 @@ Codex 发起模型请求时,Web 会在 `Deep diving...` 右侧显示 `请求
|
|
|
72
73
|
|
|
73
74
|
它们分别位于 `${DSH_HOME:-$HOME/.dsh}/.agent-presets/codex/` 和 `${DSH_HOME:-$HOME/.dsh}/.agent-presets/codex-collaboration/`。如果对应目录已经存在,插件会保留你的文件,不会覆盖自定义内容。
|
|
74
75
|
|
|
75
|
-
在 Web 的 **Agent 预设** 中选择 **Codex 模式** 或 **Codex 协作模式**,再新建会话即可使用随包提供的 Codex
|
|
76
|
+
在 Web 的 **Agent 预设** 中选择 **Codex 模式** 或 **Codex 协作模式**,再新建会话即可使用随包提供的 Codex 工具、官方后台任务控制、目标、Plan mode、子 Agent/工作流、用户询问、todo、网页搜索、远程压缩和 Skills 组合。两套 preset 共用 Fast、思考强度、GPT 图片输入和上下文容量设置;只有系统提示词是否包含协作指导不同。
|
|
76
77
|
|
|
77
78
|
## 自定义 preset
|
|
78
79
|
|
|
@@ -96,7 +97,7 @@ Codex 发起模型请求时,Web 会在 `Deep diving...` 右侧显示 `请求
|
|
|
96
97
|
- id: codex-jobs
|
|
97
98
|
name: '@deepseek-ai/dsh-tool-jobs'
|
|
98
99
|
config:
|
|
99
|
-
completionDelivery:
|
|
100
|
+
completionDelivery: wakeup
|
|
100
101
|
```
|
|
101
102
|
|
|
102
103
|
再写入 `preset.yml`,让 Web 中显示更清晰的名称:
|
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.36",
|
|
4
4
|
"description": "A Codex harness with a streamlined system prompt 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",
|
|
@@ -45,6 +45,13 @@
|
|
|
45
45
|
"README.zh.md",
|
|
46
46
|
"LICENSE"
|
|
47
47
|
],
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsc --noCheck -p tsconfig.json && tsdown",
|
|
50
|
+
"check": "tsc -p tsconfig.json --noEmit",
|
|
51
|
+
"test": "vitest run",
|
|
52
|
+
"pack:check": "npm pack --dry-run",
|
|
53
|
+
"prepare": "npm run build"
|
|
54
|
+
},
|
|
48
55
|
"repository": {
|
|
49
56
|
"type": "git",
|
|
50
57
|
"url": "git+https://github.com/shuind/dsh-codex-harness.git"
|
|
@@ -232,11 +239,5 @@
|
|
|
232
239
|
"typescript": "^6.0.3",
|
|
233
240
|
"unrun": "^0.3.1",
|
|
234
241
|
"vitest": "^4.1.8"
|
|
235
|
-
},
|
|
236
|
-
"scripts": {
|
|
237
|
-
"build": "tsc --noCheck -p tsconfig.json && tsdown",
|
|
238
|
-
"check": "tsc -p tsconfig.json --noEmit",
|
|
239
|
-
"test": "vitest run",
|
|
240
|
-
"pack:check": "npm pack --dry-run"
|
|
241
242
|
}
|
|
242
|
-
}
|
|
243
|
+
}
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
config:
|
|
22
22
|
collaborationPrompt: false
|
|
23
23
|
|
|
24
|
-
# Background
|
|
25
|
-
#
|
|
26
|
-
#
|
|
24
|
+
# Background-job guidance and completion delivery belong to the official
|
|
25
|
+
# dsh-tool-jobs plugin. Use wakeup delivery so an idle agent also learns about
|
|
26
|
+
# a completed job without needing a separate user/tool wake.
|
|
27
27
|
- id: codex-jobs
|
|
28
28
|
name: '@deepseek-ai/dsh-tool-jobs'
|
|
29
29
|
config:
|
|
30
|
-
completionDelivery:
|
|
30
|
+
completionDelivery: wakeup
|
|
31
31
|
|
|
32
32
|
# The generic DSH pi-ai adapter still owns the user's configured provider,
|
|
33
33
|
# endpoint, API key, and model. Codex's remote-first transport wrapper is
|
|
@@ -89,3 +89,105 @@
|
|
|
89
89
|
|
|
90
90
|
- id: tool-skill
|
|
91
91
|
name: '@deepseek-ai/dsh-tool-skill'
|
|
92
|
+
|
|
93
|
+
# Goal state remains host-owned and session-keyed. This row adds the official
|
|
94
|
+
# model-facing goal lifecycle without moving the goal service into the preset.
|
|
95
|
+
- id: tool-goal
|
|
96
|
+
name: '@deepseek-ai/dsh-tool-goal'
|
|
97
|
+
|
|
98
|
+
# Official plan mode supplies the reviewed exit_plan_mode flow. Keep the
|
|
99
|
+
# Codex update_plan and todo_write tools out of this planning phase.
|
|
100
|
+
- id: planning
|
|
101
|
+
name: cordis:group
|
|
102
|
+
group: true
|
|
103
|
+
isolate:
|
|
104
|
+
planMode: true
|
|
105
|
+
config:
|
|
106
|
+
- id: plan-mode
|
|
107
|
+
name: '@deepseek-ai/dsh-plan-mode'
|
|
108
|
+
config:
|
|
109
|
+
section: |
|
|
110
|
+
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement, including an answer confirming something you asked, approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
|
111
|
+
|
|
112
|
+
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
|
|
113
|
+
|
|
114
|
+
The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override later tool descriptions or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use update_plan or todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
|
|
115
|
+
|
|
116
|
+
Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
|
|
117
|
+
|
|
118
|
+
Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
|
|
119
|
+
|
|
120
|
+
When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
|
|
121
|
+
|
|
122
|
+
# Continuable delegation and workflow execution are official model-facing
|
|
123
|
+
# capabilities. Their registries and providers stay in the host composition.
|
|
124
|
+
- id: delegation
|
|
125
|
+
name: cordis:group
|
|
126
|
+
group: true
|
|
127
|
+
isolate:
|
|
128
|
+
workflowEngine: true
|
|
129
|
+
config:
|
|
130
|
+
- id: tool-subagent-control
|
|
131
|
+
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
132
|
+
|
|
133
|
+
- id: tool-subagent-list-agents
|
|
134
|
+
name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
|
|
135
|
+
|
|
136
|
+
- id: tool-subagent
|
|
137
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
138
|
+
config:
|
|
139
|
+
provider: spawn
|
|
140
|
+
toolName: subagent
|
|
141
|
+
modelSelectionSettings: true
|
|
142
|
+
backgroundMode: continuable
|
|
143
|
+
|
|
144
|
+
- id: tool-subagent-fork
|
|
145
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
146
|
+
config:
|
|
147
|
+
provider: fork
|
|
148
|
+
toolName: subagent_fork
|
|
149
|
+
backgroundMode: continuable
|
|
150
|
+
|
|
151
|
+
# Optional providers remain disabled until their matching Bundle is
|
|
152
|
+
# installed in the host profile.
|
|
153
|
+
- id: tool-subagent-codex
|
|
154
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
155
|
+
disabled: true
|
|
156
|
+
config:
|
|
157
|
+
provider: codex
|
|
158
|
+
toolName: subagent_codex
|
|
159
|
+
backgroundMode: one-shot
|
|
160
|
+
maxDepth: provider-managed
|
|
161
|
+
|
|
162
|
+
- id: tool-subagent-claude-code
|
|
163
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
164
|
+
disabled: true
|
|
165
|
+
config:
|
|
166
|
+
provider: claude-code
|
|
167
|
+
toolName: subagent_claude_code
|
|
168
|
+
backgroundMode: one-shot
|
|
169
|
+
maxDepth: provider-managed
|
|
170
|
+
|
|
171
|
+
- id: workflow-worker-thread
|
|
172
|
+
name: '@deepseek-ai/dsh-workflow-worker-thread'
|
|
173
|
+
config:
|
|
174
|
+
provider: spawn
|
|
175
|
+
|
|
176
|
+
- id: tool-workflow
|
|
177
|
+
name: '@deepseek-ai/dsh-tool-workflow'
|
|
178
|
+
|
|
179
|
+
- id: tool-ralph
|
|
180
|
+
name: '@deepseek-ai/dsh-tool-ralph'
|
|
181
|
+
config:
|
|
182
|
+
subagentProvider: spawn
|
|
183
|
+
maxRounds: 64
|
|
184
|
+
|
|
185
|
+
# These official tools provide the interactive question surface and the
|
|
186
|
+
# durable whole-list task view alongside Codex-compatible update_plan.
|
|
187
|
+
- id: tool-ask-user
|
|
188
|
+
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
189
|
+
|
|
190
|
+
- id: tool-todo
|
|
191
|
+
name: '@deepseek-ai/dsh-tool-todo'
|
|
192
|
+
config:
|
|
193
|
+
allowParallelInProgress: true
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
config:
|
|
22
22
|
collaborationPrompt: true
|
|
23
23
|
|
|
24
|
-
# Background
|
|
25
|
-
#
|
|
26
|
-
#
|
|
24
|
+
# Background-job guidance and completion delivery belong to the official
|
|
25
|
+
# dsh-tool-jobs plugin. Use wakeup delivery so an idle agent also learns about
|
|
26
|
+
# a completed job without needing a separate user/tool wake.
|
|
27
27
|
- id: codex-jobs
|
|
28
28
|
name: '@deepseek-ai/dsh-tool-jobs'
|
|
29
29
|
config:
|
|
30
|
-
completionDelivery:
|
|
30
|
+
completionDelivery: wakeup
|
|
31
31
|
|
|
32
32
|
# The generic DSH pi-ai adapter still owns the user's configured provider,
|
|
33
33
|
# endpoint, API key, and model. Codex's remote-first transport wrapper is
|
|
@@ -89,3 +89,105 @@
|
|
|
89
89
|
|
|
90
90
|
- id: tool-skill
|
|
91
91
|
name: '@deepseek-ai/dsh-tool-skill'
|
|
92
|
+
|
|
93
|
+
# Goal state remains host-owned and session-keyed. This row adds the official
|
|
94
|
+
# model-facing goal lifecycle without moving the goal service into the preset.
|
|
95
|
+
- id: tool-goal
|
|
96
|
+
name: '@deepseek-ai/dsh-tool-goal'
|
|
97
|
+
|
|
98
|
+
# Official plan mode supplies the reviewed exit_plan_mode flow. Keep the
|
|
99
|
+
# Codex update_plan and todo_write tools out of this planning phase.
|
|
100
|
+
- id: planning
|
|
101
|
+
name: cordis:group
|
|
102
|
+
group: true
|
|
103
|
+
isolate:
|
|
104
|
+
planMode: true
|
|
105
|
+
config:
|
|
106
|
+
- id: plan-mode
|
|
107
|
+
name: '@deepseek-ai/dsh-plan-mode'
|
|
108
|
+
config:
|
|
109
|
+
section: |
|
|
110
|
+
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement, including an answer confirming something you asked, approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
|
111
|
+
|
|
112
|
+
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
|
|
113
|
+
|
|
114
|
+
The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override later tool descriptions or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use update_plan or todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
|
|
115
|
+
|
|
116
|
+
Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
|
|
117
|
+
|
|
118
|
+
Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
|
|
119
|
+
|
|
120
|
+
When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
|
|
121
|
+
|
|
122
|
+
# Continuable delegation and workflow execution are official model-facing
|
|
123
|
+
# capabilities. Their registries and providers stay in the host composition.
|
|
124
|
+
- id: delegation
|
|
125
|
+
name: cordis:group
|
|
126
|
+
group: true
|
|
127
|
+
isolate:
|
|
128
|
+
workflowEngine: true
|
|
129
|
+
config:
|
|
130
|
+
- id: tool-subagent-control
|
|
131
|
+
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
132
|
+
|
|
133
|
+
- id: tool-subagent-list-agents
|
|
134
|
+
name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
|
|
135
|
+
|
|
136
|
+
- id: tool-subagent
|
|
137
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
138
|
+
config:
|
|
139
|
+
provider: spawn
|
|
140
|
+
toolName: subagent
|
|
141
|
+
modelSelectionSettings: true
|
|
142
|
+
backgroundMode: continuable
|
|
143
|
+
|
|
144
|
+
- id: tool-subagent-fork
|
|
145
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
146
|
+
config:
|
|
147
|
+
provider: fork
|
|
148
|
+
toolName: subagent_fork
|
|
149
|
+
backgroundMode: continuable
|
|
150
|
+
|
|
151
|
+
# Optional providers remain disabled until their matching Bundle is
|
|
152
|
+
# installed in the host profile.
|
|
153
|
+
- id: tool-subagent-codex
|
|
154
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
155
|
+
disabled: true
|
|
156
|
+
config:
|
|
157
|
+
provider: codex
|
|
158
|
+
toolName: subagent_codex
|
|
159
|
+
backgroundMode: one-shot
|
|
160
|
+
maxDepth: provider-managed
|
|
161
|
+
|
|
162
|
+
- id: tool-subagent-claude-code
|
|
163
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
164
|
+
disabled: true
|
|
165
|
+
config:
|
|
166
|
+
provider: claude-code
|
|
167
|
+
toolName: subagent_claude_code
|
|
168
|
+
backgroundMode: one-shot
|
|
169
|
+
maxDepth: provider-managed
|
|
170
|
+
|
|
171
|
+
- id: workflow-worker-thread
|
|
172
|
+
name: '@deepseek-ai/dsh-workflow-worker-thread'
|
|
173
|
+
config:
|
|
174
|
+
provider: spawn
|
|
175
|
+
|
|
176
|
+
- id: tool-workflow
|
|
177
|
+
name: '@deepseek-ai/dsh-tool-workflow'
|
|
178
|
+
|
|
179
|
+
- id: tool-ralph
|
|
180
|
+
name: '@deepseek-ai/dsh-tool-ralph'
|
|
181
|
+
config:
|
|
182
|
+
subagentProvider: spawn
|
|
183
|
+
maxRounds: 64
|
|
184
|
+
|
|
185
|
+
# These official tools provide the interactive question surface and the
|
|
186
|
+
# durable whole-list task view alongside Codex-compatible update_plan.
|
|
187
|
+
- id: tool-ask-user
|
|
188
|
+
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
189
|
+
|
|
190
|
+
- id: tool-todo
|
|
191
|
+
name: '@deepseek-ai/dsh-tool-todo'
|
|
192
|
+
config:
|
|
193
|
+
allowParallelInProgress: true
|