@fitlab-ai/agent-infra 0.9.4 → 0.9.6
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 +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/bin/internal-cli.js +13 -3
- package/dist/lib/agent-clients/adapter.js +2 -2
- package/dist/lib/agent-clients/adapters/codex-lifecycle/app-server.js +492 -0
- package/dist/lib/agent-clients/adapters/codex-lifecycle/evidence.js +175 -0
- package/dist/lib/agent-clients/adapters/codex-lifecycle/store.js +255 -0
- package/dist/lib/agent-clients/adapters/codex.js +3 -3
- package/dist/lib/git/workflow.js +0 -1
- package/dist/lib/git/worktree-identity.js +64 -0
- package/dist/lib/internal/codex-lifecycle.js +300 -0
- package/dist/lib/internal/release-workflow.js +108 -11
- package/dist/lib/internal/sandbox-control.js +43 -6
- package/dist/lib/internal/task-create.js +56 -0
- package/dist/lib/internal/task-orchestration.js +71 -31
- package/dist/lib/platform/issue-comments.js +2 -1
- package/dist/lib/release/workflow.js +29 -21
- package/dist/lib/sandbox/commands/create.js +16 -16
- package/dist/lib/sandbox/commands/prune.js +40 -16
- package/dist/lib/sandbox/commands/rm.js +318 -89
- package/dist/lib/sandbox/control/client.js +152 -22
- package/dist/lib/sandbox/control/executor.js +136 -0
- package/dist/lib/sandbox/control/lifecycle.js +348 -0
- package/dist/lib/sandbox/control/protocol.js +73 -18
- package/dist/lib/sandbox/control/server.js +235 -80
- package/dist/lib/sandbox/control/state.js +181 -0
- package/dist/lib/sandbox/index.js +2 -2
- package/dist/lib/sandbox/managed-fs.js +14 -2
- package/dist/lib/sandbox/mounts.js +35 -24
- package/dist/lib/sandbox/recovery.js +262 -45
- package/dist/lib/sandbox/workspace-view.js +80 -11
- package/dist/lib/sandbox/worktree-safety.js +196 -0
- package/dist/lib/server/process-control.js +6 -0
- package/dist/lib/task/activity-log.js +32 -5
- package/dist/lib/task/artifact-lifecycle.js +5 -4
- package/dist/lib/task/codex-orchestration.js +161 -0
- package/dist/lib/task/commands/status.js +3 -0
- package/dist/lib/task/commands/validate.js +289 -0
- package/dist/lib/task/commit-finalization.js +50 -12
- package/dist/lib/task/create-service.js +137 -0
- package/dist/lib/task/create.js +333 -0
- package/dist/lib/task/delegation-receipts.js +25 -0
- package/dist/lib/task/events.js +10 -4
- package/dist/lib/task/finalization-artifacts.js +2 -1
- package/dist/lib/task/implementation-inputs.js +1 -7
- package/dist/lib/task/index.js +9 -0
- package/dist/lib/task/orchestration.js +283 -18
- package/dist/lib/task/review-fingerprint.js +4 -0
- package/dist/lib/task/verification-engine.js +38 -6
- package/dist/lib/task/verification.js +1 -0
- package/dist/lib/task/workspace-snapshot.js +78 -3
- package/lib/agent-clients/adapter.ts +4 -4
- package/lib/agent-clients/adapters/codex-lifecycle/app-server.ts +569 -0
- package/lib/agent-clients/adapters/codex-lifecycle/evidence.ts +323 -0
- package/lib/agent-clients/adapters/codex-lifecycle/store.ts +298 -0
- package/lib/agent-clients/adapters/codex.ts +3 -3
- package/lib/git/workflow.ts +0 -1
- package/lib/git/worktree-identity.ts +86 -0
- package/lib/internal/codex-lifecycle.ts +308 -0
- package/lib/internal/release-workflow.ts +107 -11
- package/lib/internal/sandbox-control.ts +38 -6
- package/lib/internal/task-create.ts +61 -0
- package/lib/internal/task-orchestration.ts +57 -31
- package/lib/platform/issue-comments.ts +2 -1
- package/lib/release/workflow.ts +69 -20
- package/lib/sandbox/commands/create.ts +18 -21
- package/lib/sandbox/commands/prune.ts +53 -15
- package/lib/sandbox/commands/rm.ts +368 -103
- package/lib/sandbox/control/client.ts +173 -25
- package/lib/sandbox/control/executor.ts +163 -0
- package/lib/sandbox/control/lifecycle.ts +342 -0
- package/lib/sandbox/control/protocol.ts +110 -48
- package/lib/sandbox/control/server.ts +252 -85
- package/lib/sandbox/control/state.ts +196 -0
- package/lib/sandbox/index.ts +2 -2
- package/lib/sandbox/managed-fs.ts +17 -2
- package/lib/sandbox/mounts.ts +31 -13
- package/lib/sandbox/recovery.ts +301 -60
- package/lib/sandbox/workspace-view.ts +89 -12
- package/lib/sandbox/worktree-safety.ts +234 -0
- package/lib/server/process-control.ts +11 -0
- package/lib/task/activity-log.ts +46 -7
- package/lib/task/artifact-lifecycle.ts +5 -4
- package/lib/task/codex-orchestration.ts +233 -0
- package/lib/task/commands/status.ts +2 -0
- package/lib/task/commands/validate.ts +282 -0
- package/lib/task/commit-finalization.ts +75 -12
- package/lib/task/create-service.ts +171 -0
- package/lib/task/create.ts +372 -0
- package/lib/task/delegation-receipts.ts +52 -3
- package/lib/task/events.ts +9 -4
- package/lib/task/finalization-artifacts.ts +2 -1
- package/lib/task/implementation-inputs.ts +1 -5
- package/lib/task/index.ts +8 -0
- package/lib/task/orchestration.ts +381 -22
- package/lib/task/review-fingerprint.ts +9 -0
- package/lib/task/verification-engine.ts +42 -8
- package/lib/task/verification.ts +2 -1
- package/lib/task/workspace-snapshot.ts +98 -4
- package/package.json +7 -7
- package/templates/.agents/hooks/lifecycle-delegation.js +88 -8
- package/templates/.agents/rules/lifecycle-orchestration.en.md +1 -1
- package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +1 -1
- package/templates/.agents/rules/no-mid-flow-questions.en.md +1 -0
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +1 -0
- package/templates/.agents/rules/task-management.en.md +1 -0
- package/templates/.agents/rules/task-management.zh-CN.md +1 -0
- package/templates/.agents/skills/commit/SKILL.en.md +3 -9
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +6 -10
- package/templates/.agents/skills/commit/reference/commit-orchestration.en.md +4 -3
- package/templates/.agents/skills/commit/reference/commit-orchestration.zh-CN.md +5 -4
- package/templates/.agents/skills/create-task/SKILL.en.md +26 -43
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +26 -43
- package/templates/.agents/skills/post-release/SKILL.en.md +32 -6
- package/templates/.agents/skills/post-release/SKILL.zh-CN.md +32 -6
- package/templates/.agents/skills/run-manual-validation/SKILL.en.md +42 -0
- package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +42 -0
- package/templates/.agents/skills/run-manual-validation/config/verify.en.json +14 -0
- package/templates/.agents/skills/run-manual-validation/config/verify.zh-CN.json +14 -0
- package/templates/.agents/skills/run-manual-validation/reference/report-template.en.md +44 -0
- package/templates/.agents/skills/run-manual-validation/reference/report-template.zh-CN.md +44 -0
- package/templates/.agents/skills/run-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/run-task/reference/host-validation.en.md +3 -3
- package/templates/.agents/skills/run-task/reference/host-validation.zh-CN.md +3 -3
- package/templates/.claude/commands/run-manual-validation.en.md +9 -0
- package/templates/.claude/commands/run-manual-validation.zh-CN.md +9 -0
- package/templates/.codex/hooks.json +50 -0
- package/templates/.opencode/commands/run-manual-validation.en.md +11 -0
- package/templates/.opencode/commands/run-manual-validation.zh-CN.md +11 -0
|
@@ -17,7 +17,7 @@ description: >
|
|
|
17
17
|
- Do not perform requirements analysis; analysis is handled separately by `analyze-task`
|
|
18
18
|
- Do not directly implement the requested functionality
|
|
19
19
|
- Do not skip the workflow and jump directly to planning or implementation
|
|
20
|
-
- Only do this: parse the description ->
|
|
20
|
+
- Only do this: parse the description -> write one structured candidate -> invoke the host `task-create` entry point -> verify the result -> inform the user of the next step
|
|
21
21
|
- Issue creation is decided by the `.agents/rules/create-issue.md` rule; on custom or empty platforms (no platform-specific variant provided), the rule naturally degrades to a no-op
|
|
22
22
|
|
|
23
23
|
The user's description is a **work item**, not an **instruction to execute immediately**.
|
|
@@ -72,7 +72,7 @@ If the description is unclear, **ask the user to clarify first**.
|
|
|
72
72
|
- `bugfix` -> `bug-fix`
|
|
73
73
|
- `refactor` -> `refactoring`
|
|
74
74
|
|
|
75
|
-
### 2. Create
|
|
75
|
+
### 2. Create an Immutable Candidate
|
|
76
76
|
|
|
77
77
|
Get the current timestamp:
|
|
78
78
|
|
|
@@ -80,14 +80,17 @@ Get the current timestamp:
|
|
|
80
80
|
date +%Y%m%d-%H%M%S
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
- Write the
|
|
83
|
+
- Generate one UUID v4 `idempotencyKey` and write the parsed fields to one JSON file.
|
|
84
|
+
- The candidate follows `TaskCreateCandidateV1`: version, key, standard agent, title, type, unprefixed branch slug, priority, effort, description, and the seven task-input lists.
|
|
85
|
+
- Write it once before the first request. A timeout retry must reuse the same file and let the client generate a new outer request id; do not rerun AI derivation.
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
-
|
|
87
|
+
Invoke the single entry point:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
agent-infra-internal task-create --input "$candidate_file"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The host owns TASK-id/timestamps/version, workflow and branch derivation, template rendering, atomic persistence, short ids, Issue sync, and warnings. The skill must not create task directories, copy templates, allocate short ids, or call platform subcommands directly.
|
|
91
94
|
|
|
92
95
|
Task metadata (`task.md` YAML front matter):
|
|
93
96
|
```yaml
|
|
@@ -109,7 +112,7 @@ assigned_to: {current AI agent}
|
|
|
109
112
|
|
|
110
113
|
priority / effort are required: the AI infers them from the task title and description (candidates in `.agents/rules/issue-fields.md`; normalize localized input). Leave start_date / target_date empty at creation: `start_date` is written by the analyze stage and `target_date` by the complete stage; do not invent dates.
|
|
111
114
|
|
|
112
|
-
### 3.
|
|
115
|
+
### 3. Handle the Structured Result
|
|
113
116
|
|
|
114
117
|
Get the current time:
|
|
115
118
|
|
|
@@ -117,43 +120,25 @@ Get the current time:
|
|
|
117
120
|
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
118
121
|
```
|
|
119
122
|
|
|
120
|
-
|
|
121
|
-
- `
|
|
122
|
-
- `
|
|
123
|
-
- `
|
|
124
|
-
- `agent_infra_version`: value from `.agents/rules/version-stamp.md`
|
|
125
|
-
- `## Context` -> `- **Branch**:`: update it to the generated branch name
|
|
126
|
-
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
127
|
-
```
|
|
128
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Create Task** by {agent} — Task created from description
|
|
129
|
-
```
|
|
123
|
+
- `applied` / `no-op`: use the returned task id, short id, and optional Issue identity; do not discover them by scanning directories.
|
|
124
|
+
- `degraded`: the local task is retained; display the returned warning.
|
|
125
|
+
- `blocked`: retain the candidate and retry the same file after the transient problem is fixed.
|
|
126
|
+
- `failed`: report the stable error code. Never modify and retry a candidate under the same idempotency key.
|
|
130
127
|
|
|
131
|
-
### 4.
|
|
128
|
+
### 4. Platform Failure Compatibility
|
|
132
129
|
|
|
133
|
-
|
|
130
|
+
The host service owns platform cascading. The compatibility recovery commands remain visible in the host warning and are not run from the sandbox:
|
|
134
131
|
|
|
135
132
|
```bash
|
|
136
|
-
agent-infra-internal
|
|
137
|
-
agent-infra-internal platform-
|
|
133
|
+
agent-infra-internal task-warning {task-id} add --step create-task --severity ACTION_REQUIRED --code ISSUE_CREATE_FAILED --target issue --message "{error_code}: {error_message}" --action "Fix auth/network/template issues and manually retry Issue creation, or create/find an Issue and write issue_number"
|
|
134
|
+
agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}
|
|
138
135
|
```
|
|
139
136
|
|
|
140
|
-
|
|
141
|
-
- Intent created the Issue: `issue_number` was written through the task writer; run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
|
|
142
|
-
- Rule failed (auth / network / template parse / etc.): do not roll back task.md or append an extra Activity Log entry; run `agent-infra-internal task-warning {task-id} add --step create-task --severity ACTION_REQUIRED --code ISSUE_CREATE_FAILED --target issue --message "{error_code}: {error_message}" --action "Fix auth/network/template issues and manually retry Issue creation, or create/find an Issue and write issue_number"` to submit a structured warning intent (callers do not allocate ids or edit rows), then follow Scenario C
|
|
143
|
-
- Intent returned no-op/degraded: continue applicable operations without blocking the workflow
|
|
144
|
-
- task.md already has a valid `issue_number`: create validates the binding and returns no-op without creating a duplicate
|
|
137
|
+
The skill only consumes the Issue identity, operations, and warnings returned by the host; it must not repeat platform writes.
|
|
145
138
|
|
|
146
139
|
### 5. Verification Gate
|
|
147
140
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
```bash
|
|
151
|
-
node .agents/scripts/task-short-id.js alloc "$task_id"
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
If this fails (non-zero exit), follow the message — archive some active tasks or raise `task.shortIdLength` — and do NOT continue.
|
|
155
|
-
|
|
156
|
-
Run the verification gate to confirm the task artifact and sync state are valid:
|
|
141
|
+
The host `task-create` service runs the same typed gate before returning. Consume the returned `task:verify` operation; a branch-only sandbox must not try to read the invisible new task. For direct host diagnostics, run:
|
|
157
142
|
|
|
158
143
|
```bash
|
|
159
144
|
agent-infra-internal task-verify {task-id} create-task.completed --format text
|
|
@@ -244,12 +229,10 @@ For later platform sync: after fixing auth / network / template issues, manually
|
|
|
244
229
|
|
|
245
230
|
## Completion Checklist
|
|
246
231
|
|
|
247
|
-
- [ ]
|
|
232
|
+
- [ ] Wrote one candidate and invoked `agent-infra-internal task-create`
|
|
233
|
+
- [ ] The host created `.agents/workspace/active/{task-id}/task.md`
|
|
248
234
|
- [ ] Wrote and checked `## Task Input` source and state semantics according to `reference/context-capture.md`
|
|
249
|
-
- [ ]
|
|
250
|
-
- [ ] Updated `updated_at` to the current time in task.md
|
|
251
|
-
- [ ] Updated `assigned_to` in task.md
|
|
252
|
-
- [ ] Appended an Activity Log entry to task.md
|
|
235
|
+
- [ ] The returned task id and short id passed completion verification
|
|
253
236
|
- [ ] Tried cascading Issue creation through `.agents/rules/create-issue.md`; if it failed, kept task.md and recorded the reason
|
|
254
237
|
- [ ] Rendered the selected next-step commands through the shared helper
|
|
255
238
|
- [ ] **Did not modify any business code or configuration files**
|
|
@@ -17,7 +17,7 @@ description: >
|
|
|
17
17
|
- 不要执行需求分析;分析由 `analyze-task` 独立完成
|
|
18
18
|
- 不要直接实现所描述的功能
|
|
19
19
|
- 不要跳过工作流直接进入计划/实现阶段
|
|
20
|
-
- 仅执行:解析描述 ->
|
|
20
|
+
- 仅执行:解析描述 -> 一次性生成结构化 candidate -> 调用宿主 `task-create` 入口 -> 校验结果 -> 告知用户下一步
|
|
21
21
|
- Issue 创建由 `.agents/rules/create-issue.md` 规则决定;自定义或空平台(未提供平台变体规则文件)时,规则会自然降级为 no-op
|
|
22
22
|
|
|
23
23
|
用户的描述是一个**待办事项**,而不是**立即执行的指令**。
|
|
@@ -71,7 +71,7 @@ description: >
|
|
|
71
71
|
- `bugfix` -> `bug-fix`
|
|
72
72
|
- `refactor` -> `refactoring`
|
|
73
73
|
|
|
74
|
-
### 2.
|
|
74
|
+
### 2. 生成不可变 candidate
|
|
75
75
|
|
|
76
76
|
获取当前时间戳:
|
|
77
77
|
|
|
@@ -79,14 +79,17 @@ description: >
|
|
|
79
79
|
date +%Y%m%d-%H%M%S
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
82
|
+
- 生成随机 UUID v4 作为 `idempotencyKey`,并把步骤 1 的结果写入单个 JSON 文件。
|
|
83
|
+
- candidate 必须符合宿主 `TaskCreateCandidateV1`:`version`、`idempotencyKey`、标准 `agent`、`title`、`type`、不带项目前缀的 `branchSlug`、`priority`、`effort`、`description` 和 `taskInput` 七类列表。
|
|
84
|
+
- 首次提交前只写一次 candidate;等待终态期间不得重新运行 AI 推导或改写文件。超时重试必须复用同一文件,由客户端生成新的 outer request ID。
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
86
|
+
调用统一入口:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
agent-infra-internal task-create --input "$candidate_file"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
宿主负责 TASK-id/时间戳/版本戳、workflow/branch 派生、模板渲染、原子持久化、短号、Issue 与 warning。技能不得自行 `mkdir`、复制任务模板、分配短号或直接调用平台子命令。
|
|
90
93
|
|
|
91
94
|
任务元数据(task.md YAML front matter):
|
|
92
95
|
```yaml
|
|
@@ -108,7 +111,7 @@ assigned_to: {当前 AI 代理}
|
|
|
108
111
|
|
|
109
112
|
priority / effort 必填:由 AI 从任务标题与描述推断后填入(候选值见 `.agents/rules/issue-fields.md`;中文输入按本地化映射规范化)。start_date / target_date 创建时保持留空:`start_date` 由 analyze 阶段写入、`target_date` 由 complete 阶段写入;不要臆测日期。
|
|
110
113
|
|
|
111
|
-
### 3.
|
|
114
|
+
### 3. 处理结构化结果
|
|
112
115
|
|
|
113
116
|
获取当前时间:
|
|
114
117
|
|
|
@@ -116,43 +119,25 @@ priority / effort 必填:由 AI 从任务标题与描述推断后填入(候
|
|
|
116
119
|
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
117
120
|
```
|
|
118
121
|
|
|
119
|
-
|
|
120
|
-
- `
|
|
121
|
-
- `
|
|
122
|
-
- `
|
|
123
|
-
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
124
|
-
- `## 上下文` 中的 `- **分支**:`:更新为生成的分支名
|
|
125
|
-
- **追加**到 `## Activity Log`(不要覆盖之前的记录):
|
|
126
|
-
```
|
|
127
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Create Task** by {agent} — Task created from description
|
|
128
|
-
```
|
|
122
|
+
- `applied` / `no-op`:从响应读取 task ID、短号与可选 Issue 身份;不得从目录扫描推断。
|
|
123
|
+
- `degraded`:本地任务已经保留;展示响应中的 warning。
|
|
124
|
+
- `blocked`:保留 candidate 文件,修复暂态问题后用同一文件重试。
|
|
125
|
+
- `failed`:报告稳定错误码;幂等冲突时不得改写原 key 或原 candidate 后重试。
|
|
129
126
|
|
|
130
|
-
### 4.
|
|
127
|
+
### 4. 平台失败兼容说明
|
|
131
128
|
|
|
132
|
-
|
|
129
|
+
平台级联由宿主服务完成。兼容的人工恢复命令仍由宿主 warning 指引,不在沙箱内执行:
|
|
133
130
|
|
|
134
131
|
```bash
|
|
135
|
-
agent-infra-internal
|
|
136
|
-
agent-infra-internal platform-
|
|
132
|
+
agent-infra-internal task-warning {task-id} add --step create-task --severity ACTION_REQUIRED --code ISSUE_CREATE_FAILED --target issue --message "{error_code}: {error_message}" --action "修复认证/网络/模板问题后手动重试 Issue 创建,或手动创建/找到 Issue 后写入 issue_number"
|
|
133
|
+
agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}
|
|
137
134
|
```
|
|
138
135
|
|
|
139
|
-
|
|
140
|
-
- intent 成功创建 Issue:`issue_number` 已由任务写入内核回写;调用 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}`
|
|
141
|
-
- 规则失败(认证 / 网络 / 模板解析等):不回滚 task.md;不追加额外 Activity Log;先调用 `agent-infra-internal task-warning {task-id} add --step create-task --severity ACTION_REQUIRED --code ISSUE_CREATE_FAILED --target issue --message "{error_code}: {error_message}" --action "修复认证/网络/模板问题后手动重试 Issue 创建,或手动创建/找到 Issue 后写入 issue_number"` 提交结构化 warning 意图(调用方不分配编号或写表格);再按"场景 C:Issue 创建失败"输出
|
|
142
|
-
- intent 为 no-op/degraded:按结构化 operations 继续可执行部分;自定义或空平台不创建评论且不阻塞工作流
|
|
143
|
-
- task.md 已存在有效 `issue_number`:create intent 校验绑定后返回 no-op,不重复创建
|
|
136
|
+
技能只消费宿主返回的 Issue identity、operations 与 warnings;不得重复发起平台写入。
|
|
144
137
|
|
|
145
138
|
### 5. 完成校验
|
|
146
139
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
node .agents/scripts/task-short-id.js alloc "$task_id"
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
如失败(退出码非 0),按提示「归档若干任务」或「调高 task.shortIdLength」处理;不要继续执行后续步骤。
|
|
154
|
-
|
|
155
|
-
运行完成校验,确认任务产物和同步状态符合规范:
|
|
140
|
+
宿主 `task-create` 服务在返回前运行同一 typed 完成校验;技能从响应的 `task:verify` operation 取得当次结果。branch-only 不得尝试读取不可见的新任务。宿主直接诊断时可运行:
|
|
156
141
|
|
|
157
142
|
```bash
|
|
158
143
|
agent-infra-internal task-verify {task-id} create-task.completed --format text
|
|
@@ -243,12 +228,10 @@ Issue 创建失败:
|
|
|
243
228
|
|
|
244
229
|
## 完成检查清单
|
|
245
230
|
|
|
246
|
-
- [ ]
|
|
231
|
+
- [ ] 只生成一次结构化 candidate 并调用 `agent-infra-internal task-create`
|
|
232
|
+
- [ ] 宿主创建了任务文件 `.agents/workspace/active/{task-id}/task.md`
|
|
247
233
|
- [ ] 已按 `reference/context-capture.md` 写入并复核 `## 任务输入` 的来源与状态语义
|
|
248
|
-
- [ ]
|
|
249
|
-
- [ ] 更新了 task.md 中的 `updated_at` 为当前时间
|
|
250
|
-
- [ ] 更新了 task.md 中的 `assigned_to`
|
|
251
|
-
- [ ] 追加了 Activity Log 条目到 task.md
|
|
234
|
+
- [ ] 响应中的任务 ID 和短号已通过完成校验
|
|
252
235
|
- [ ] 已按 `.agents/rules/create-issue.md` 尝试级联创建 Issue;失败时保留 task.md 并记录原因
|
|
253
236
|
- [ ] 已通过统一 helper 渲染已选场景的下一步命令
|
|
254
237
|
- [ ] **没有修改任何业务代码或配置文件**
|
|
@@ -15,16 +15,42 @@ Require one explicit canonical SemVer `{version}`. Do not fall back to the lates
|
|
|
15
15
|
agent-infra-internal release-workflow inspect {version}
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
Pending or unknown is blocked; a definite failure is failed.
|
|
18
|
+
Pending or unknown is blocked; a definite failure is failed. Report `complete` directly from external facts.
|
|
19
19
|
|
|
20
|
-
## 2.
|
|
20
|
+
## 2. Prepare Local Post-release Work
|
|
21
|
+
|
|
22
|
+
When incomplete, run:
|
|
21
23
|
|
|
22
24
|
```bash
|
|
23
|
-
agent-infra-internal release-workflow post {version}
|
|
25
|
+
agent-infra-internal release-workflow post-prepare {version}
|
|
26
|
+
agent-infra-internal release-workflow inspect {version}
|
|
24
27
|
```
|
|
25
28
|
|
|
26
|
-
The core owns build, next development version, inline artifacts, explicit-path commit
|
|
29
|
+
The core owns build, the optional demo, next development version, inline artifacts, and the explicit-path post commit. This action must not push. Replays recover from Git and channel facts without repeating completed work.
|
|
30
|
+
|
|
31
|
+
## 3. Check the Confirmation Snapshot
|
|
32
|
+
|
|
33
|
+
- `complete`: report completion without asking or publishing.
|
|
34
|
+
- `postConfirmation` present: display every field and its `sha256`, then continue to step 4.
|
|
35
|
+
- `postConfirmation` absent: report diagnostics such as `isHead=false` or a dirty worktree/index and stop without asking or publishing.
|
|
27
36
|
|
|
28
|
-
##
|
|
37
|
+
## 4. Authorize the Current Snapshot
|
|
38
|
+
|
|
39
|
+
Only after displaying the complete `postConfirmation` in the current session, ask once whether to publish. Continue only for an unambiguous affirmative answer. Denial, adjustment, a question, ambiguity, or interruption stops. Authorization never carries across sessions or snapshots.
|
|
40
|
+
|
|
41
|
+
## 5. Publish the Confirmed Snapshot
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
agent-infra-internal release-workflow post-publish {version} \
|
|
45
|
+
--expected-sha256 "{post-confirmation-sha256}"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The core re-inspects and verifies the digest before one normal branch push; force pushes are forbidden. On snapshot drift, stop and return to step 1 for a new display and authorization.
|
|
49
|
+
|
|
50
|
+
## 6. Re-inspect and Report
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
agent-infra-internal release-workflow inspect {version}
|
|
54
|
+
```
|
|
29
55
|
|
|
30
|
-
Report channel, smoke, commit, and
|
|
56
|
+
Report all channel, released/new version, smoke, post commit, and remote branch facts. Describe completion only for phase `complete`; never present failed, degraded, or blocked as success.
|
|
@@ -15,16 +15,42 @@ description: >
|
|
|
15
15
|
agent-infra-internal release-workflow inspect {version}
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
pending/unknown 必须 blocked,确定失败必须 failed
|
|
18
|
+
pending/unknown 必须 blocked,确定失败必须 failed。`complete` 直接按外部事实报告完成。
|
|
19
19
|
|
|
20
|
-
## 2.
|
|
20
|
+
## 2. 准备本地后处理
|
|
21
|
+
|
|
22
|
+
尚未完成时执行:
|
|
21
23
|
|
|
22
24
|
```bash
|
|
23
|
-
agent-infra-internal release-workflow post {version}
|
|
25
|
+
agent-infra-internal release-workflow post-prepare {version}
|
|
26
|
+
agent-infra-internal release-workflow inspect {version}
|
|
24
27
|
```
|
|
25
28
|
|
|
26
|
-
core 负责 build
|
|
29
|
+
core 负责 build、可选 demo、下一开发版本、内联产物和显式路径 post commit;该动作不得 push。重跑从 Git 与渠道事实恢复,不重复已完成操作。
|
|
30
|
+
|
|
31
|
+
## 3. 检查确认快照
|
|
32
|
+
|
|
33
|
+
- `complete`:报告完成,不询问、不 publish。
|
|
34
|
+
- 存在 `postConfirmation`:展示完整字段和 `sha256`,进入步骤 4。
|
|
35
|
+
- 不存在 `postConfirmation`:报告 `isHead=false`、工作树或暂存区非空等诊断并停止,不询问、不 publish。
|
|
27
36
|
|
|
28
|
-
##
|
|
37
|
+
## 4. 获取当前快照授权
|
|
38
|
+
|
|
39
|
+
仅在当前会话已展示完整 `postConfirmation` 后询问一次是否发布。只有无歧义肯定答复才继续;否定、调整、疑问、歧义或中断均停止。授权不跨会话或快照复用。
|
|
40
|
+
|
|
41
|
+
## 5. 发布已确认快照
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
agent-infra-internal release-workflow post-publish {version} \
|
|
45
|
+
--expected-sha256 "{post-confirmation-sha256}"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
core 重新 inspect 并校验摘要后仅执行普通 branch push,禁止 force push。摘要漂移时停止并回到步骤 1 重新展示、重新确认。
|
|
49
|
+
|
|
50
|
+
## 6. 写后复核并报告
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
agent-infra-internal release-workflow inspect {version}
|
|
54
|
+
```
|
|
29
55
|
|
|
30
|
-
报告全部渠道、smoke、commit
|
|
56
|
+
报告全部渠道、released/new version、smoke、post commit 与远端 branch 事实;只有阶段为 `complete` 才表述为完成,不把 failed/degraded/blocked 表述为成功。
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: run-manual-validation
|
|
3
|
+
description: >
|
|
4
|
+
Safely run task manual validation on the host and record standard evidence.
|
|
5
|
+
Use when validation needs host credentials, a real container, or in-place worktree state.
|
|
6
|
+
Only invoke automatically when the conversation includes a resolvable task reference.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Run Manual Validation
|
|
10
|
+
|
|
11
|
+
## Boundary
|
|
12
|
+
|
|
13
|
+
- Select the validation mode, call the sole mechanical entry point, and record evidence; do not mark PR manual validation complete.
|
|
14
|
+
- `complete-manual-validation` remains the maintainer's final registration after coverage is judged sufficient.
|
|
15
|
+
- Never manipulate temporary worktrees, leases, or containers directly; only call `ai task validate`.
|
|
16
|
+
- Never record tokens, environment variables, full argv, absolute user paths, or raw transcripts in the artifact.
|
|
17
|
+
|
|
18
|
+
## Step 0: State Check (pre-execution hard gate)
|
|
19
|
+
|
|
20
|
+
Resolve the task reference, then run this command and copy its original output into the artifact:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
agent-infra-internal task-snapshot {task-id} --format text
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Steps
|
|
27
|
+
|
|
28
|
+
1. Resolve `{task-ref}`, the validation target, and the command after the literal `--`; stop without writing an artifact if any is missing.
|
|
29
|
+
2. Run `agent-infra-internal task-artifact {task-id} inspect --family validation-run`, take the round and artifact name from the core result, then run `agent-infra-internal task-event {task-id} validation-run.started --agent {standard-agent-token}`.
|
|
30
|
+
3. Use snapshot for fixed-commit checks and inplace for uncommitted content, original mounts, or original permissions; when uncertain, start with snapshot and upgrade only with evidence.
|
|
31
|
+
4. Call `ai task validate {task-ref} --scope {scope} --format json -- {command...}`. A runtime upgrade must be a second explicit inplace call with its reason recorded.
|
|
32
|
+
5. Read `reference/report-template.md`, create `validation-run.md|validation-run-r{N}.md`, and record only the CLI JSON allowlist and a sanitized summary.
|
|
33
|
+
6. Run `agent-infra-internal task-event {task-id} validation-run.completed --agent {standard-agent-token} --artifact {artifact}`. When an Issue exists, run `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` and then `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {artifact} --agent {standard-agent-token}`.
|
|
34
|
+
7. Run `agent-infra-internal task-verify {task-id} validation-run.completed --artifact {artifact} --format text`; fix failures and rerun it.
|
|
35
|
+
8. Report the evidence path, coverage gaps, and verification result; explicitly leave the decision to run `complete-manual-validation` to the maintainer. Read `.agents/rules/next-step-output.md` and end with `Completed at`.
|
|
36
|
+
|
|
37
|
+
## Completion Checklist
|
|
38
|
+
|
|
39
|
+
- [ ] Used `ai task validate`
|
|
40
|
+
- [ ] Recorded sanitized validation-run evidence
|
|
41
|
+
- [ ] Did not change PR manual validation completion state
|
|
42
|
+
- [ ] Updated task.md and passed completion verification
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: run-manual-validation
|
|
3
|
+
description: >
|
|
4
|
+
在宿主机安全运行任务人工校验并记录标准证据。
|
|
5
|
+
当校验依赖宿主权限、真实容器或原位工作树状态时使用。
|
|
6
|
+
仅当对话包含可解析的任务引用时才可自动调用本技能。
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# 运行人工校验
|
|
10
|
+
|
|
11
|
+
## 行为边界
|
|
12
|
+
|
|
13
|
+
- 本技能负责选择校验模式、调用唯一机械入口并记录证据;不把 PR 人工校验标为完成。
|
|
14
|
+
- `complete-manual-validation` 仍是维护者确认覆盖充分后的最终登记入口。
|
|
15
|
+
- 禁止直接操作临时 worktree、lease 或 container;只调用 `ai task validate`。
|
|
16
|
+
- 产物不得记录 token、环境变量、完整 argv、绝对用户路径或原始 transcript。
|
|
17
|
+
|
|
18
|
+
## 第 0 步:状态核对(执行前硬约束)
|
|
19
|
+
|
|
20
|
+
解析任务引用后运行,并把原文写入产物:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
agent-infra-internal task-snapshot {task-id} --format text
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 执行步骤
|
|
27
|
+
|
|
28
|
+
1. 解析 `{task-ref}`、验证目标和 `--` 后的命令;缺失时停止,不写产物。
|
|
29
|
+
2. 运行 `agent-infra-internal task-artifact {task-id} inspect --family validation-run`,从核心结果取得轮次和产物名;随后运行 `agent-infra-internal task-event {task-id} validation-run.started --agent {standard-agent-token}`。
|
|
30
|
+
3. 选择模式:固定提交只查用 snapshot;依赖未提交内容、原挂载或原位权限用 inplace;不确定时先 snapshot,只有证据表明必须原位时才升级。
|
|
31
|
+
4. 调用 `ai task validate {task-ref} --scope {scope} --format json -- {command...}`。运行时升级必须作为第二次显式 inplace 调用,并记录理由。
|
|
32
|
+
5. 读取 `reference/report-template.md`,创建 `validation-run.md|validation-run-r{N}.md`;只写 CLI JSON allowlist 与去敏摘要。
|
|
33
|
+
6. 运行 `agent-infra-internal task-event {task-id} validation-run.completed --agent {standard-agent-token} --artifact {artifact}`。存在 Issue 时依次运行 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` 和 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {artifact} --agent {standard-agent-token}`。
|
|
34
|
+
7. 运行 `agent-infra-internal task-verify {task-id} validation-run.completed --artifact {artifact} --format text`;未通过则修复后重跑。
|
|
35
|
+
8. 告知用户证据路径、覆盖缺口和验证结果;明确仍需维护者判断是否执行 `complete-manual-validation`。读取 `.agents/rules/next-step-output.md`,最后一行输出 `Completed at`。
|
|
36
|
+
|
|
37
|
+
## 完成检查清单
|
|
38
|
+
|
|
39
|
+
- [ ] 已使用 `ai task validate`
|
|
40
|
+
- [ ] 已记录去敏 validation-run 证据
|
|
41
|
+
- [ ] 未修改 PR 人工验证完成状态
|
|
42
|
+
- [ ] 已更新 task.md 并通过完成校验
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "run-manual-validation",
|
|
3
|
+
"checks": {
|
|
4
|
+
"task-meta": { "required_fields": ["id", "type", "workflow", "status", "created_at", "updated_at", "agent_infra_version", "current_step", "assigned_to"] },
|
|
5
|
+
"artifact": {
|
|
6
|
+
"file_pattern": "validation-run.md|validation-run-r{N}.md",
|
|
7
|
+
"required_sections": ["State Check", "Validation Target", "Mode Decision", "Command Summary", "Structured Evidence", "Cleanup and Recovery", "Remaining Coverage", "Raw Evidence"],
|
|
8
|
+
"required_patterns": ["^\\$ "]
|
|
9
|
+
},
|
|
10
|
+
"activity-log": { "expected_action_pattern": "Run Manual Validation \\(Round \\d+\\)" },
|
|
11
|
+
"review-ledger": { "stage_scope": ["analysis", "plan", "code"] },
|
|
12
|
+
"platform-sync": { "when": "issue_number_exists", "expected_comment_marker": "<!-- sync-issue:{task-id}:{artifact-stem} -->", "verify_comment_content": true, "verify_task_comment_content": true, "verify_issue_type": true, "verify_issue_fields": false, "verify_milestone": true, "expected_comment_marker_key": "artifact" }
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "run-manual-validation",
|
|
3
|
+
"checks": {
|
|
4
|
+
"task-meta": { "required_fields": ["id", "type", "workflow", "status", "created_at", "updated_at", "agent_infra_version", "current_step", "assigned_to"] },
|
|
5
|
+
"artifact": {
|
|
6
|
+
"file_pattern": "validation-run.md|validation-run-r{N}.md",
|
|
7
|
+
"required_sections": ["状态核对", "验证目标", "模式判定", "命令摘要", "结构化证据", "清理与恢复", "尚未覆盖", "证据原文"],
|
|
8
|
+
"required_patterns": ["^\\$ "]
|
|
9
|
+
},
|
|
10
|
+
"activity-log": { "expected_action_pattern": "Run Manual Validation \\(Round \\d+\\)" },
|
|
11
|
+
"review-ledger": { "stage_scope": ["analysis", "plan", "code"] },
|
|
12
|
+
"platform-sync": { "when": "issue_number_exists", "expected_comment_marker": "<!-- sync-issue:{task-id}:{artifact-stem} -->", "verify_comment_content": true, "verify_task_comment_content": true, "verify_issue_type": true, "verify_issue_fields": false, "verify_milestone": true, "expected_comment_marker_key": "artifact" }
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Validation Run Evidence
|
|
2
|
+
|
|
3
|
+
## State Check
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
$ agent-infra-internal task-snapshot {task-id} --format text
|
|
7
|
+
{raw-output}
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Validation Target
|
|
11
|
+
|
|
12
|
+
{target-and-coverage}
|
|
13
|
+
|
|
14
|
+
## Mode Decision
|
|
15
|
+
|
|
16
|
+
- Mode: `{snapshot|inplace}`
|
|
17
|
+
- Reason: {reason}
|
|
18
|
+
- Runtime upgrade: {none-or-reason}
|
|
19
|
+
|
|
20
|
+
## Command Summary
|
|
21
|
+
|
|
22
|
+
- Command name: `{basename-only}`
|
|
23
|
+
- Do not record full argv, environment variables, or raw output.
|
|
24
|
+
|
|
25
|
+
## Structured Evidence
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{sanitized-ai-task-validate-json}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Cleanup and Recovery
|
|
32
|
+
|
|
33
|
+
{cleanup-and-recovery-result}
|
|
34
|
+
|
|
35
|
+
## Remaining Coverage
|
|
36
|
+
|
|
37
|
+
{remaining-manual-validation-items}
|
|
38
|
+
|
|
39
|
+
## Raw Evidence
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
$ ai task validate {task-ref} --scope {scope} --format json -- {redacted-command}
|
|
43
|
+
{sanitized-result}
|
|
44
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# 验证运行证据
|
|
2
|
+
|
|
3
|
+
## 状态核对
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
$ agent-infra-internal task-snapshot {task-id} --format text
|
|
7
|
+
{raw-output}
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## 验证目标
|
|
11
|
+
|
|
12
|
+
{target-and-coverage}
|
|
13
|
+
|
|
14
|
+
## 模式判定
|
|
15
|
+
|
|
16
|
+
- 模式:`{snapshot|inplace}`
|
|
17
|
+
- 依据:{reason}
|
|
18
|
+
- 运行时升级:{none-or-reason}
|
|
19
|
+
|
|
20
|
+
## 命令摘要
|
|
21
|
+
|
|
22
|
+
- 命令名称:`{basename-only}`
|
|
23
|
+
- 不记录完整 argv、环境变量或原始输出。
|
|
24
|
+
|
|
25
|
+
## 结构化证据
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{sanitized-ai-task-validate-json}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 清理与恢复
|
|
32
|
+
|
|
33
|
+
{cleanup-and-recovery-result}
|
|
34
|
+
|
|
35
|
+
## 尚未覆盖
|
|
36
|
+
|
|
37
|
+
{remaining-manual-validation-items}
|
|
38
|
+
|
|
39
|
+
## 证据原文
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
$ ai task validate {task-ref} --scope {scope} --format json -- {redacted-command}
|
|
43
|
+
{sanitized-result}
|
|
44
|
+
```
|
|
@@ -12,8 +12,8 @@ The orchestrator delegates only and never executes a stage skill itself. First r
|
|
|
12
12
|
1. Resolve the task, current Agent Client, and optional atomic policy flags `--executor-model`, `--executor-reasoning-effort`, `--reviewer-model`, and `--reviewer-reasoning-effort`, then run `task-snapshot`. If any explicit policy flag is present, all four role fields are required and must not be merged with configuration; both roles may use the same model.
|
|
13
13
|
2. Run `task-orchestration {task-id} begin-or-resume --client {client}` with the complete explicit policy. With no explicit policy, core reads only that client's `agentClients[].orchestration`; an existing v2 run uses its persisted policy. Only on `ORCHESTRATION_MODEL_POLICY_REQUIRED`, show the complete/partial/interactive-only `agent-client model-selection` context and collect one complete policy; no answer means no run is created. Stop on paused/completed results.
|
|
14
14
|
3. Run `route` and read its structured result. On `completed`, immediately run `agent-infra-internal task-verify {task-id} run-task.completed --format text` and stop. Only when the result is `running` with a non-null `next`, use its single action, role, round, artifact, `requestedModel`, and `requestedReasoningEffort`; never infer them from review prose, session defaults, or a partial tool schema.
|
|
15
|
-
4. Only for the `running` result from step 3, run `prepare --client {client} --requested-model {requestedModel} --requested-reasoning-effort {requestedReasoningEffort}` so core validates both fields and host evidence before snapshotting. Claude Code's native start event
|
|
16
|
-
5.
|
|
15
|
+
4. Only for the `running` result from step 3, run `prepare --client {client} --requested-model {requestedModel} --requested-reasoning-effort {requestedReasoningEffort}` so core validates both fields and host evidence before snapshotting. Codex also validates the CLI, features, hook trust/discovery, and App Server schema first; a failed preflight creates neither a receipt nor a workspace baseline. Claude Code's native start event still cannot provide stable actual model/effort evidence and returns `ORCHESTRATION_CLIENT_UNSUPPORTED`. Only after validation succeeds, start a fresh native child with the same model/effort overrides and only the short task ref, skill name, literal `--orchestrated` execution marker, and minimal handoff. The child must forward that marker to every provenance-sensitive command in the stage.
|
|
16
|
+
5. Codex prefers SubagentStart/Stop plus App Server actual evidence to activate, consume, and seal the unique receipt. When a custom role does not emit native start/stop, trusted parent PostTool spawn uniquely resolves the child from rollout evidence and a completed wait validates the terminal before idempotent sealing. Timed-out waits do nothing; only empty turns or protocol `inProgress` may wait, while malformed, identity/transport errors, or abnormal terminals pause. Other supported clients keep native start/stop correlation. After the child returns, run `advance` only for a sealed receipt. Repeat step 3 only for `running`; stop immediately for `paused` or `completed`.
|
|
17
17
|
6. Create a new child every round and never follow up with an old reviewer. Native start must report actual model and actual reasoning effort; each requested/actual mismatch needs its own host fallback reason, and requested values must never be fabricated as actual evidence. Capability, hook, identity, evidence, ledger, or fingerprint failures must call `pause` and fail closed.
|
|
18
18
|
7. On pause or completion, run the matching typed verification and report the structured run summary, pause reason, commit endpoint, or clean completion evidence.
|
|
19
19
|
|
|
@@ -12,8 +12,8 @@ description: >
|
|
|
12
12
|
1. 解析任务引用、当前 Agent Client,以及可选的原子策略 `--executor-model`、`--executor-reasoning-effort`、`--reviewer-model`、`--reviewer-reasoning-effort`,并执行 `agent-infra-internal task-snapshot {task-id} --format text`。任一显式策略字段出现时四个 role 字段必须完整,不得与配置拼接;两个角色可以使用同一模型。
|
|
13
13
|
2. 调用 `agent-infra-internal task-orchestration {task-id} begin-or-resume --client {client}` 并转发完整显式策略。完全没有显式策略时由核心读取当前 client 的 `agentClients[].orchestration`;已有 v2 run 使用持久化策略。仅当核心返回 `ORCHESTRATION_MODEL_POLICY_REQUIRED` 时,先用 `agent-client model-selection` 展示 complete/partial/interactive-only 来源,再一次收集完整策略;未回答则不创建 run。若为 paused/completed,按结构化结果停止。
|
|
14
14
|
3. 调用 `route` 并读取结构化结果。若返回 `completed`,立即运行 `agent-infra-internal task-verify {task-id} run-task.completed --format text` 并停止;仅当返回 `running` 且 `next` 非空时读取唯一 action、role、round、artifact、`requestedModel` 和 `requestedReasoningEffort`,不得从审查文案、会话默认或局部 tool schema 自行推断。
|
|
15
|
-
4. 仅对步骤 3 的 `running` 结果调用 `prepare --client {client} --requested-model {requestedModel} --requested-reasoning-effort {requestedReasoningEffort}
|
|
16
|
-
5.
|
|
15
|
+
4. 仅对步骤 3 的 `running` 结果调用 `prepare --client {client} --requested-model {requestedModel} --requested-reasoning-effort {requestedReasoningEffort}`;核心在记录工作区基线前校验两字段与宿主证据能力。Codex 还会先验证 CLI、feature、hook trust/discovery 与 App Server schema;任一 preflight 失败均不得创建 receipt 或工作区基线。当前 Claude Code 的原生 start 事件无法稳定提供 actual model/effort,因此仍返回 `ORCHESTRATION_CLIENT_UNSUPPORTED`。只有校验成功时才用当前客户端的 fresh 原生子 Agent 启动指定角色,并显式覆盖同一 model/effort;只传短任务引用、skill 名、字面执行标记 `--orchestrated` 和最小交接摘要,不传 receipt identity,不继承总控历史。子 Agent 必须把该标记转发给本阶段所有 provenance 敏感命令。
|
|
16
|
+
5. Codex 优先用 SubagentStart/Stop 与 App Server actual evidence 激活、消费并封存唯一 receipt;当 custom role 未投递原生 start/stop 时,受信 parent PostTool spawn 从 rollout 唯一解析 child,completed wait 再验证 terminal 并幂等封存。timed-out wait 无动作;只有 empty turns 或协议 `inProgress` 可等待,malformed、身份/传输错误或异常 terminal 均暂停。其他受支持客户端沿用原生 start/stop hook 关联。子 Agent 返回后只对 sealed receipt 调用 `advance`;只有 `running` 才重复步骤 3,`paused` 或 `completed` 立即停止。
|
|
17
17
|
6. 每轮创建新 child;禁止 follow-up 复用 reviewer。原生 start 必须回传 actual model 与 actual reasoning effort;任一 actual 与 requested 不同时必须有各自的宿主降级理由,缺失时不得用 requested 值补造。任何 capability、hook、身份、证据、账本或 fingerprint 异常都调用 `pause` 并失败关闭。
|
|
18
18
|
7. 完成或暂停后运行对应 typed verification,并把结构化 run 摘要、暂停原因、commit 终点或 clean completion evidence 告知用户。
|
|
19
19
|
|
|
@@ -5,16 +5,16 @@ Before publishing support for a client, prove the lifecycle evidence chain with
|
|
|
5
5
|
## Required Evidence
|
|
6
6
|
|
|
7
7
|
- Client version, enabled multi-agent capability, launch surface, and trust boundary.
|
|
8
|
-
- Raw start/stop events
|
|
8
|
+
- Raw start/stop events, or the parent PostTool spawn/completed-wait fallback when custom roles omit them, stably correlate the managed agent, parent/child identity, fresh spawn mode, actual model, and actual reasoning effort.
|
|
9
9
|
- Explicit requested model/effort reaches each executor/reviewer. A fallback of either field reports the corresponding actual value and its own non-empty reason.
|
|
10
10
|
- Candidate-checkout and packed-install behavior match, with model policy, receipts, and verification results auditable in `orchestration.json`.
|
|
11
11
|
|
|
12
12
|
## Validation Sequence
|
|
13
13
|
|
|
14
14
|
1. Record client version, feature state, and launch command in a clean temporary repository.
|
|
15
|
-
2. Start a fresh executor and reviewer, retaining redacted raw stdin and the structured run. Never synthesize a field the host did not emit.
|
|
15
|
+
2. Start a fresh executor and reviewer, retaining redacted raw stdin and the structured run. Validate both native start/stop and the parent PostTool fallback; timed-out waits must do nothing. Never synthesize a field the host did not emit.
|
|
16
16
|
3. Validate model/effort match paths, single and dual justified fallbacks, and fail-closed behavior for missing actual fields.
|
|
17
17
|
4. Validate the same commit from a candidate checkout and an `npm pack` install; record the tarball hash and results.
|
|
18
18
|
5. Commit only redacted summaries and non-sensitive fixtures. Remove or replace tokens, user-specific absolute paths, transcript content, and credentials.
|
|
19
19
|
|
|
20
|
-
If any required field cannot be observed reliably from the real host, keep that client's orchestration capability `unsupported` and record the gap as manual validation.
|
|
20
|
+
If any required field cannot be observed reliably from the real host, keep that client's orchestration capability `unsupported` and record the gap as manual validation. Codex may advertise `experimental`, but every `prepare` must still pass static preflight and either native start/stop or the parent spawn/completed-wait fallback must produce verifiable consumed host evidence. The fallback may wait only for empty turns or protocol `inProgress`; malformed, identity/transport errors, or abnormal terminals pause deterministically.
|