@ifrankwang/openspec-agents 0.118.0
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 +91 -0
- package/assets/agents/openspec-architect.md +61 -0
- package/assets/agents/openspec-developer.md +21 -0
- package/assets/agents/openspec-main.md +35 -0
- package/assets/agents/openspec-reviewer-architecture.md +60 -0
- package/assets/agents/openspec-reviewer-maintainability.md +59 -0
- package/assets/agents/openspec-reviewer-performance.md +49 -0
- package/assets/agents/openspec-reviewer-security.md +51 -0
- package/assets/agents/openspec-reviewer-style.md +50 -0
- package/assets/agents/openspec-reviewer-task.md +40 -0
- package/assets/agents/openspec-reviewer-tool.md +30 -0
- package/assets/dashboard/index.html +295 -0
- package/assets/skills/api-conventions/SKILL.md +60 -0
- package/assets/skills/api-test/SKILL.md +175 -0
- package/assets/skills/architecture-evolution/SKILL.md +60 -0
- package/assets/skills/db-conventions/SKILL.md +62 -0
- package/assets/skills/ddd-architecture/SKILL.md +261 -0
- package/assets/skills/environment-cleanup/SKILL.md +44 -0
- package/assets/skills/java-api-conventions/SKILL.md +30 -0
- package/assets/skills/java-code-maintainability/SKILL.md +62 -0
- package/assets/skills/java-code-performance/SKILL.md +49 -0
- package/assets/skills/java-code-style/SKILL.md +54 -0
- package/assets/skills/java-db-conventions/SKILL.md +44 -0
- package/assets/skills/java-ddd-architecture/SKILL.md +533 -0
- package/assets/skills/java-dev-practices/SKILL.md +110 -0
- package/assets/skills/java-quality-gate/SKILL.md +455 -0
- package/assets/skills/java-quality-gate/reference/pmd-rules.md +16 -0
- package/assets/skills/java-quality-tool-improve/SKILL.md +142 -0
- package/assets/skills/java-security/SKILL.md +59 -0
- package/assets/skills/java-technical-debt/SKILL.md +36 -0
- package/assets/skills/orchestrator/SKILL.md +65 -0
- package/assets/skills/quality-gate/SKILL.md +84 -0
- package/assets/skills/security-baseline/SKILL.md +101 -0
- package/assets/skills/technical-debt/SKILL.md +78 -0
- package/assets/workflows/task.yaml +177 -0
- package/package.json +79 -0
- package/src/adapters/agent-md.ts +37 -0
- package/src/adapters/claude-code/index.ts +35 -0
- package/src/adapters/codex/index.ts +161 -0
- package/src/adapters/mcp-common/cli.ts +64 -0
- package/src/adapters/mcp-common/index.ts +137 -0
- package/src/adapters/mcp-common/json-schema.ts +53 -0
- package/src/adapters/mcp-common/server.ts +157 -0
- package/src/adapters/opencode/agents.ts +80 -0
- package/src/adapters/opencode/dashboard.ts +64 -0
- package/src/adapters/opencode/index.ts +34 -0
- package/src/adapters/opencode/json-schema.ts +60 -0
- package/src/adapters/opencode/skills.ts +19 -0
- package/src/adapters/opencode/tools.ts +78 -0
- package/src/adapters/plugin-common/index.ts +173 -0
- package/src/adapters/zcode/index.ts +32 -0
- package/src/core/constants.ts +46 -0
- package/src/core/dashboard.ts +101 -0
- package/src/core/derive.ts +146 -0
- package/src/core/exemptions.ts +168 -0
- package/src/core/git.ts +373 -0
- package/src/core/index.ts +76 -0
- package/src/core/namespace.ts +12 -0
- package/src/core/paths.ts +23 -0
- package/src/core/provider.ts +74 -0
- package/src/core/state.ts +357 -0
- package/src/core/task-children.ts +59 -0
- package/src/core/tasks-md.ts +89 -0
- package/src/core/tools/gate.ts +165 -0
- package/src/core/tools/lifecycle.ts +645 -0
- package/src/core/tools/schemas.ts +363 -0
- package/src/core/tools/submit.ts +863 -0
- package/src/core/tools/types.ts +129 -0
- package/src/core/types.ts +135 -0
- package/src/core/views.ts +195 -0
- package/src/core/workflow/collector.ts +150 -0
- package/src/core/workflow/engine.ts +576 -0
- package/src/core/workflow/index.ts +56 -0
- package/src/core/workflow/loader.ts +277 -0
- package/src/core/workflow/poller.ts +159 -0
- package/src/core/workflow/reset.ts +93 -0
- package/src/core/workflow/status.ts +1010 -0
- package/src/core/workflow/submit.ts +331 -0
- package/src/core/workflow/types.ts +100 -0
- package/src/core/workflow/writeback.ts +48 -0
- package/src/dashboard/page.ts +19 -0
- package/src/index.ts +2 -0
- package/src/skills/resolve.ts +95 -0
- package/src/skills/scan.ts +29 -0
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 6 个 opx_* 工具的纯 JSON Schema 参数定义(内核契约,agent 无关)。
|
|
3
|
+
* 语义与 OpenCode 适配层既有链式 schema 逐一对齐(含嵌套 object/array 校验);
|
|
4
|
+
* OpenCode 适配层消费本文件后做链式 API 转换,MCP Server 直接按本文件暴露参数。
|
|
5
|
+
*/
|
|
6
|
+
import type { JSONSchema } from "../provider.ts"
|
|
7
|
+
import { SEVERITY_LEVELS } from "../constants.ts"
|
|
8
|
+
import { CODE_DIMENSIONS } from "../types.ts"
|
|
9
|
+
import { SKIP_REASON_FORMAT } from "./gate.ts"
|
|
10
|
+
|
|
11
|
+
export const executionBoundarySchema: JSONSchema = {
|
|
12
|
+
type: "object",
|
|
13
|
+
description: "developer 的执行边界",
|
|
14
|
+
properties: {
|
|
15
|
+
allowed_directories: {
|
|
16
|
+
type: "array",
|
|
17
|
+
description: "developer 只能修改/创建文件的目录列表(含实施与验证所需的测试代码目录)",
|
|
18
|
+
items: { type: "string", minLength: 1 },
|
|
19
|
+
minItems: 1,
|
|
20
|
+
},
|
|
21
|
+
allowed_packages: {
|
|
22
|
+
type: "array",
|
|
23
|
+
description: "developer 只能新增/修改代码的包路径列表(含对应的测试包路径)",
|
|
24
|
+
items: { type: "string", minLength: 1 },
|
|
25
|
+
minItems: 1,
|
|
26
|
+
},
|
|
27
|
+
notes: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description:
|
|
30
|
+
"实施建议:关键坑位提醒、组件复用指引、设计约束边缘场景、框架应用说明(如对象映射框架使用要点);不含目录/包路径(见 allowed_directories/allowed_packages),无则留空",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
required: ["allowed_directories", "allowed_packages", "notes"],
|
|
34
|
+
additionalProperties: false,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const boundaryExpansionSchema: JSONSchema = {
|
|
38
|
+
type: "object",
|
|
39
|
+
description: "reviewer 声明的执行边界扩展",
|
|
40
|
+
properties: {
|
|
41
|
+
allowed_directories: {
|
|
42
|
+
type: "array",
|
|
43
|
+
description: "reviewer 声明的额外允许目录",
|
|
44
|
+
items: { type: "string", minLength: 1 },
|
|
45
|
+
minItems: 1,
|
|
46
|
+
},
|
|
47
|
+
allowed_packages: {
|
|
48
|
+
type: "array",
|
|
49
|
+
description: "reviewer 声明的额外允许包路径",
|
|
50
|
+
items: { type: "string", minLength: 1 },
|
|
51
|
+
minItems: 1,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
additionalProperties: false,
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const taskVerifyItem: JSONSchema = {
|
|
58
|
+
type: "object",
|
|
59
|
+
description: "验证失败的子任务项",
|
|
60
|
+
properties: {
|
|
61
|
+
task_id: { type: "string", minLength: 1, description: "子任务 ID(task 清单中 task 项的 id)" },
|
|
62
|
+
reason: { type: "string", minLength: 1, description: "失败理由" },
|
|
63
|
+
},
|
|
64
|
+
required: ["task_id", "reason"],
|
|
65
|
+
additionalProperties: false,
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export const validationStepSchema: JSONSchema = {
|
|
69
|
+
type: "object",
|
|
70
|
+
description: "验证步骤执行摘要",
|
|
71
|
+
properties: {
|
|
72
|
+
step: { type: "string", minLength: 1, description: "验证步骤名称,对应 opx_status 操作指引中的步骤描述" },
|
|
73
|
+
completed: { type: "boolean", description: "是否完成" },
|
|
74
|
+
evidence: { type: "string", description: "执行结果摘要或证据,含关键输出指标" },
|
|
75
|
+
skip_reason: {
|
|
76
|
+
type: "string",
|
|
77
|
+
description:
|
|
78
|
+
`结构化降级理由 JSON(仅 completed=false 时必填),格式:${SKIP_REASON_FORMAT};` +
|
|
79
|
+
`adjudication 取值:user_response=用户答复 / unattended_auto=无人值守自动降级 / env_unavailable=环境不可用(须附尝试记录)`,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
required: ["step", "completed"],
|
|
83
|
+
additionalProperties: false,
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const blockerItem: JSONSchema = {
|
|
87
|
+
type: "object",
|
|
88
|
+
description: "阻塞项",
|
|
89
|
+
properties: {
|
|
90
|
+
source_role: { type: "string", minLength: 1 },
|
|
91
|
+
task_id: { type: "string", minLength: 1 },
|
|
92
|
+
category: { type: "string", minLength: 1 },
|
|
93
|
+
description: { type: "string", minLength: 1 },
|
|
94
|
+
evidence: { type: "string", minLength: 1 },
|
|
95
|
+
attempted_actions: { type: "string", minLength: 1 },
|
|
96
|
+
options: { type: "array", items: { type: "string", minLength: 1 } },
|
|
97
|
+
},
|
|
98
|
+
required: ["source_role", "category", "description", "evidence", "attempted_actions"],
|
|
99
|
+
additionalProperties: false,
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export const exemptAdjudicationItem: JSONSchema = {
|
|
103
|
+
type: "object",
|
|
104
|
+
description: "豁免申请裁定项",
|
|
105
|
+
properties: {
|
|
106
|
+
issue_id: { type: "string", minLength: 1, description: "申请豁免的 issue ID" },
|
|
107
|
+
action: {
|
|
108
|
+
type: "string",
|
|
109
|
+
enum: ["dismissed", "rejected"],
|
|
110
|
+
description: "dismissed=豁免成立(issue 置 cancelled);rejected=驳回(issue 回 todo 继续修复)",
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
required: ["issue_id", "action"],
|
|
114
|
+
additionalProperties: false,
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export const recheckAdjudicationItem: JSONSchema = {
|
|
118
|
+
type: "object",
|
|
119
|
+
description: "待复核 issue 复核项",
|
|
120
|
+
properties: {
|
|
121
|
+
issue_id: { type: "string", minLength: 1, description: "已修复待复核(review 态)的 issue ID" },
|
|
122
|
+
verdict: {
|
|
123
|
+
type: "string",
|
|
124
|
+
enum: ["passed", "rejected"],
|
|
125
|
+
description: "passed=复核通过(issue 置 done);rejected=复核驳回(issue 回 todo 继续修复)",
|
|
126
|
+
},
|
|
127
|
+
reject_reason: { type: "string", description: "复核驳回原因(verdict=rejected 必填,供 developer 修复参考)" },
|
|
128
|
+
},
|
|
129
|
+
required: ["issue_id", "verdict"],
|
|
130
|
+
additionalProperties: false,
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export const checkpointSkipReasonItem: JSONSchema = {
|
|
134
|
+
type: "object",
|
|
135
|
+
description: "giveup 决策的必做项结构化降级理由",
|
|
136
|
+
properties: {
|
|
137
|
+
item: { type: "string", minLength: 1, description: "对应的必做项(质量门 skill 的 must_do 清单项)" },
|
|
138
|
+
category: { type: "string", minLength: 1, description: "降级类别,如环境不可用 / 用户裁定豁免 / 无人值守自动降级" },
|
|
139
|
+
adjudication: {
|
|
140
|
+
type: "string",
|
|
141
|
+
enum: ["user_response", "unattended_auto", "env_unavailable"],
|
|
142
|
+
description: "裁定方式:user_response=用户答复 / unattended_auto=无人值守自动降级 / env_unavailable=环境不可用(须附尝试记录)",
|
|
143
|
+
},
|
|
144
|
+
note: { type: "string", description: "降级说明" },
|
|
145
|
+
},
|
|
146
|
+
required: ["item", "category", "adjudication"],
|
|
147
|
+
additionalProperties: false,
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export const newChildIssueItem: JSONSchema = {
|
|
151
|
+
type: "object",
|
|
152
|
+
description: "提交时新增的 issue child",
|
|
153
|
+
properties: {
|
|
154
|
+
id: { type: "string", minLength: 1, description: "新 issue 的唯一 id(不可为空)" },
|
|
155
|
+
title: { type: "string", minLength: 1, description: "issue 标题(不可为空)" },
|
|
156
|
+
description: { type: "string", minLength: 1, description: "issue 描述(不可为空,参与去重 key)" },
|
|
157
|
+
severity: { type: "string", enum: SEVERITY_LEVELS },
|
|
158
|
+
dimension: {
|
|
159
|
+
type: "string",
|
|
160
|
+
enum: CODE_DIMENSIONS,
|
|
161
|
+
description:
|
|
162
|
+
"issue 归因维度:quality reviewer 报 issue 时由报源自动推断、无需填写(显式填写须与报源维度一致);tool/task reviewer 报 issue 时必须显式填写",
|
|
163
|
+
},
|
|
164
|
+
file: { type: "string", description: "问题所在文件路径(相对于 worktree)" },
|
|
165
|
+
line: { type: "integer", minimum: 0, description: "问题所在行号(0=整文件/待新建文件)" },
|
|
166
|
+
suggestion: { type: "string", description: "修复建议" },
|
|
167
|
+
rule: { type: "string", description: "工具规则名(如 PMD Rule / SonarQube rule),无则省略" },
|
|
168
|
+
root_cause_guess: { type: "string", description: "根因猜测(仅特定维度需要)" },
|
|
169
|
+
},
|
|
170
|
+
required: ["id", "title", "description"],
|
|
171
|
+
additionalProperties: false,
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export const recoverySchema: JSONSchema = {
|
|
175
|
+
type: "object",
|
|
176
|
+
description: "进度恢复参数。提供后按 phase 恢复阶段状态,< phase 为 completed,== phase 为 in_progress,> phase 为 not_started。",
|
|
177
|
+
properties: {
|
|
178
|
+
phase: { type: "string", enum: ["task_analysis", "dev_impl", "review"], description: "恢复到哪个阶段" },
|
|
179
|
+
review_layer: {
|
|
180
|
+
type: "string",
|
|
181
|
+
enum: ["tool", "task", "quality"],
|
|
182
|
+
description:
|
|
183
|
+
"恢复到 review 内某子层(仅 phase=review 时有效)。tool→从 tool 层开始(默认),task→tool 层标记完成从 task 层开始,quality→tool+task 层完成从 quality 层开始。已通过(passed)的审查层标记在恢复时保留,恢复自动跳到第一个未全部通过的子层",
|
|
184
|
+
},
|
|
185
|
+
reopenIssues: {
|
|
186
|
+
type: "boolean",
|
|
187
|
+
default: false,
|
|
188
|
+
description:
|
|
189
|
+
"完成后继续修 issue:将目标任务组全部非 verified issue 置为 rejected,重置 review 进度,回到 dev_impl 阶段。目标组必须为 completed。与 review_layer 互斥。",
|
|
190
|
+
},
|
|
191
|
+
reset_steps: {
|
|
192
|
+
type: "array",
|
|
193
|
+
description:
|
|
194
|
+
"重置指定 verify step 的通过标记为 pending(仅 phase=review 时有效,与 review_layer 互斥)。用于已 passed 但被本层遗漏复核/裁定阻塞的 review step 强制重新审查;恢复后 currentStep 落在第一个未全部通过的 verify step,可能早于被重置的 step。",
|
|
195
|
+
items: { type: "string", enum: ["verify_tool", "verify_task", "verify_quality"] },
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
required: ["phase"],
|
|
199
|
+
additionalProperties: false,
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export const orchInitSchema: JSONSchema = {
|
|
203
|
+
type: "object",
|
|
204
|
+
properties: {
|
|
205
|
+
change_id: { type: "string", minLength: 1, description: "OpenSpec 变更 ID" },
|
|
206
|
+
task_group_id: {
|
|
207
|
+
type: "string",
|
|
208
|
+
minLength: 1,
|
|
209
|
+
description: "要初始化的任务组 ID。无 recovery 重复调用当前组时保留进度;切换任务组时仅初始化目标组。",
|
|
210
|
+
},
|
|
211
|
+
base_branch: {
|
|
212
|
+
type: "string",
|
|
213
|
+
description: "基准分支名(如 main、develop),用于计算 merge-base 和 worktree fork 源。未传则自动从当前 git 分支推导。",
|
|
214
|
+
},
|
|
215
|
+
recovery: recoverySchema,
|
|
216
|
+
},
|
|
217
|
+
required: ["change_id", "task_group_id"],
|
|
218
|
+
additionalProperties: false,
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export const setWorktreeSchema: JSONSchema = {
|
|
222
|
+
type: "object",
|
|
223
|
+
properties: {
|
|
224
|
+
change_id: { type: "string", minLength: 1, description: "change ID" },
|
|
225
|
+
worktree_path: { type: "string", description: "git worktree 的绝对路径(可选,不传则按规范自动生成)" },
|
|
226
|
+
branch_name: { type: "string", description: "worktree 对应的分支名(可选,不传则按规范 task-group/{changeId}/{taskGroupId})" },
|
|
227
|
+
},
|
|
228
|
+
required: ["change_id"],
|
|
229
|
+
additionalProperties: false,
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export const statusSchema: JSONSchema = {
|
|
233
|
+
type: "object",
|
|
234
|
+
properties: {
|
|
235
|
+
change_id: { type: "string", minLength: 1, description: "change ID" },
|
|
236
|
+
},
|
|
237
|
+
required: ["change_id"],
|
|
238
|
+
additionalProperties: false,
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export const completeTaskGroupSchema: JSONSchema = {
|
|
242
|
+
type: "object",
|
|
243
|
+
properties: {
|
|
244
|
+
change_id: { type: "string", minLength: 1, description: "change ID" },
|
|
245
|
+
},
|
|
246
|
+
required: ["change_id"],
|
|
247
|
+
additionalProperties: false,
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export const setUnattendedSchema: JSONSchema = {
|
|
251
|
+
type: "object",
|
|
252
|
+
properties: {
|
|
253
|
+
change_id: { type: "string", minLength: 1, description: "change ID" },
|
|
254
|
+
enabled: { type: "boolean", default: true, description: "true=开启;false=关闭" },
|
|
255
|
+
},
|
|
256
|
+
required: ["change_id"],
|
|
257
|
+
additionalProperties: false,
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export const agentSubmitSchema: JSONSchema = {
|
|
261
|
+
type: "object",
|
|
262
|
+
properties: {
|
|
263
|
+
change_id: { type: "string", minLength: 1, description: "change ID" },
|
|
264
|
+
step_id: { type: "string", minLength: 1, description: "workflow step 的 id" },
|
|
265
|
+
verdict: { type: "string", enum: ["passed", "failed"], description: "裁决结果" },
|
|
266
|
+
fixed_issue_ids: {
|
|
267
|
+
type: "array",
|
|
268
|
+
description: "声明已修复的 issue child id",
|
|
269
|
+
items: { type: "string" },
|
|
270
|
+
},
|
|
271
|
+
exempt_issue_ids: {
|
|
272
|
+
type: "array",
|
|
273
|
+
description: "声明申请豁免的 issue child id",
|
|
274
|
+
items: { type: "string" },
|
|
275
|
+
},
|
|
276
|
+
exempt_adjudications: {
|
|
277
|
+
type: "array",
|
|
278
|
+
description: "裁定的豁免申请列表:dismissed→cancelled,rejected→回 todo",
|
|
279
|
+
items: exemptAdjudicationItem,
|
|
280
|
+
},
|
|
281
|
+
recheck_adjudications: {
|
|
282
|
+
type: "array",
|
|
283
|
+
description:
|
|
284
|
+
"复核已修复待复核(review 态)issue 的结论列表:passed→done,rejected→回 todo + refix_count 递增 + 写 reject_reason(谁提谁裁定)",
|
|
285
|
+
items: recheckAdjudicationItem,
|
|
286
|
+
},
|
|
287
|
+
checkpoint_decision: {
|
|
288
|
+
type: "string",
|
|
289
|
+
enum: ["continue", "giveup"],
|
|
290
|
+
description: "重试检查点决策:continue=重置该 step tag 并回退 parent;giveup=未解决 children 强制 cancelled 并将 step 标记 completed",
|
|
291
|
+
},
|
|
292
|
+
checkpoint_skip_reasons: {
|
|
293
|
+
type: "array",
|
|
294
|
+
description: "giveup 决策配套:对当前 step 质量门必做清单未覆盖项的结构化降级理由(未覆盖项缺理由则拒绝 giveup)",
|
|
295
|
+
items: checkpointSkipReasonItem,
|
|
296
|
+
},
|
|
297
|
+
new_children: {
|
|
298
|
+
type: "array",
|
|
299
|
+
description: "提交时新增的 issue child",
|
|
300
|
+
items: newChildIssueItem,
|
|
301
|
+
},
|
|
302
|
+
execution_boundary: {
|
|
303
|
+
...executionBoundarySchema,
|
|
304
|
+
description: "analyze step:架构预检产出的执行边界(verdict=passed 必传)",
|
|
305
|
+
},
|
|
306
|
+
blockers: { type: "array", description: "analyze step:新增 blocker 列表", items: blockerItem },
|
|
307
|
+
blocker_updates: {
|
|
308
|
+
type: "array",
|
|
309
|
+
description: "analyze step:按 blocker_id 置 resolved 并记录用户答复",
|
|
310
|
+
items: {
|
|
311
|
+
type: "object",
|
|
312
|
+
properties: {
|
|
313
|
+
blocker_id: { type: "string", minLength: 1, description: "blocker ID" },
|
|
314
|
+
user_response: { type: "string", minLength: 1, description: "用户答复" },
|
|
315
|
+
},
|
|
316
|
+
required: ["blocker_id", "user_response"],
|
|
317
|
+
additionalProperties: false,
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
blocker: {
|
|
321
|
+
...blockerItem,
|
|
322
|
+
description: "implement step:outcome=blocked 等价,须配合 verdict=failed",
|
|
323
|
+
},
|
|
324
|
+
self_check_results: { type: "string", description: "implement step:提交前自检结果汇总" },
|
|
325
|
+
completed_task_ids: {
|
|
326
|
+
type: "array",
|
|
327
|
+
description: "implement step:已完成的 task id(覆盖门禁:全部 open/rejected task 必须被覆盖)",
|
|
328
|
+
items: { type: "string" },
|
|
329
|
+
},
|
|
330
|
+
test_results: { type: "string", description: "verify_tool step:UT 运行结果摘要" },
|
|
331
|
+
validation_steps: {
|
|
332
|
+
type: "array",
|
|
333
|
+
description: "review step:验证步骤执行摘要",
|
|
334
|
+
items: validationStepSchema,
|
|
335
|
+
},
|
|
336
|
+
boundary_expansion: {
|
|
337
|
+
...boundaryExpansionSchema,
|
|
338
|
+
description: "review step:执行边界扩展(仅 verdict=failed 有效)",
|
|
339
|
+
},
|
|
340
|
+
verified_tasks: {
|
|
341
|
+
type: "array",
|
|
342
|
+
description: "verify_task step:验证通过的 task id",
|
|
343
|
+
items: { type: "string" },
|
|
344
|
+
},
|
|
345
|
+
failed_tasks: {
|
|
346
|
+
type: "array",
|
|
347
|
+
description: "verify_task step:验证失败的 task 列表(含原因)",
|
|
348
|
+
items: taskVerifyItem,
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
required: ["change_id", "step_id", "verdict"],
|
|
352
|
+
additionalProperties: false,
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/** 6 个 opx_* 工具的 JSON Schema 注册表(工具名 → 参数 schema)。 */
|
|
356
|
+
export const TOOL_SCHEMAS: Record<string, JSONSchema> = {
|
|
357
|
+
opx_orch_init: orchInitSchema,
|
|
358
|
+
opx_orch_set_worktree: setWorktreeSchema,
|
|
359
|
+
opx_status: statusSchema,
|
|
360
|
+
opx_orch_complete_task_group: completeTaskGroupSchema,
|
|
361
|
+
opx_orch_set_unattended: setUnattendedSchema,
|
|
362
|
+
opx_agent_submit: agentSubmitSchema,
|
|
363
|
+
}
|