@fitlab-ai/agent-infra 0.12.1 → 0.12.2

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.
Files changed (303) hide show
  1. package/README.md +0 -2
  2. package/README.zh-CN.md +0 -2
  3. package/dist/bin/internal-cli.js +2 -17
  4. package/dist/lib/agent-clients/adapter.js +0 -13
  5. package/dist/lib/agent-clients/adapters/antigravity-cli.js +0 -5
  6. package/dist/lib/agent-clients/adapters/claude-code-credentials.js +0 -17
  7. package/dist/lib/agent-clients/adapters/claude-code.js +0 -9
  8. package/dist/lib/agent-clients/adapters/codex.js +0 -52
  9. package/dist/lib/agent-clients/adapters/opencode.js +0 -5
  10. package/dist/lib/agent-clients/adapters/traecli.js +0 -5
  11. package/dist/lib/agent-clients/config.js +19 -54
  12. package/dist/lib/agent-clients/registry.js +1 -12
  13. package/dist/lib/agent-clients/schema.js +0 -18
  14. package/dist/lib/agent-clients/tokens.js +1 -2
  15. package/dist/lib/agent-clients/types.js +0 -1
  16. package/dist/lib/decide.js +2 -0
  17. package/dist/lib/git/worktree-identity.js +1 -9
  18. package/dist/lib/internal/agent-client.js +2 -62
  19. package/dist/lib/internal/cli-route-inventory.js +1 -5
  20. package/dist/lib/internal/manual-validation.js +18 -10
  21. package/dist/lib/internal/task-create.js +1 -1
  22. package/dist/lib/internal/task-event.js +1 -8
  23. package/dist/lib/internal/task-finalization.js +0 -1
  24. package/dist/lib/internal/task-lifecycle.js +2 -2
  25. package/dist/lib/internal/task-operation-registry.js +4 -20
  26. package/dist/lib/internal/task-review.js +4 -4
  27. package/dist/lib/platform/comment-safety.js +1 -7
  28. package/dist/lib/platform/in-label-sync.js +1 -14
  29. package/dist/lib/platform/issue-comments.js +1 -16
  30. package/dist/lib/platform/issues.js +1 -1
  31. package/dist/lib/platform/operation-coordinator.js +4 -2
  32. package/dist/lib/platform/pr-change-report.js +1 -4
  33. package/dist/lib/platform/pr-checks.js +2 -8
  34. package/dist/lib/platform/provider-validation.js +0 -20
  35. package/dist/lib/platform/pull-requests.js +73 -84
  36. package/dist/lib/platform/releases.js +1 -43
  37. package/dist/lib/platform/verification-required.js +0 -2
  38. package/dist/lib/platform/verification-sync.js +1 -79
  39. package/dist/lib/process-data/normalize.js +1 -185
  40. package/dist/lib/process-data/privacy.js +1 -16
  41. package/dist/lib/process-data/sources.js +2 -279
  42. package/dist/lib/render.js +0 -12
  43. package/dist/lib/run/index.js +15 -10
  44. package/dist/lib/run/skills.js +0 -3
  45. package/dist/lib/sandbox/commands/create.js +40 -53
  46. package/dist/lib/sandbox/commands/list-running.js +0 -18
  47. package/dist/lib/sandbox/commands/start.js +7 -8
  48. package/dist/lib/sandbox/constants.js +0 -6
  49. package/dist/lib/sandbox/control/client.js +0 -1
  50. package/dist/lib/sandbox/control/container-identity.js +1 -16
  51. package/dist/lib/sandbox/control/executor.js +0 -4
  52. package/dist/lib/sandbox/control/identity-sentinel.js +0 -7
  53. package/dist/lib/sandbox/control/lifecycle.js +21 -37
  54. package/dist/lib/sandbox/control/native-file-lock.js +0 -3
  55. package/dist/lib/sandbox/control/server.js +18 -38
  56. package/dist/lib/sandbox/control/state.js +1 -9
  57. package/dist/lib/sandbox/dockerfile.js +0 -6
  58. package/dist/lib/sandbox/engine.js +0 -14
  59. package/dist/lib/sandbox/engines/docker-exact-discovery.js +1 -4
  60. package/dist/lib/sandbox/engines/wsl2-paths.js +0 -3
  61. package/dist/lib/sandbox/recovery.js +24 -26
  62. package/dist/lib/sandbox/removal.js +11 -519
  63. package/dist/lib/sandbox/task-resolver.js +0 -41
  64. package/dist/lib/sandbox/tools.js +1 -4
  65. package/dist/lib/sandbox/workspace-view.js +1 -2
  66. package/dist/lib/server/display.js +0 -6
  67. package/dist/lib/task/activity-intent.js +45 -40
  68. package/dist/lib/task/activity-log.js +9 -16
  69. package/dist/lib/task/artifact-command.js +1 -1
  70. package/dist/lib/task/artifact-lifecycle.js +61 -63
  71. package/dist/lib/task/artifact-name.js +0 -6
  72. package/dist/lib/task/artifact-operations.js +3 -3
  73. package/dist/lib/task/capabilities.js +4 -5
  74. package/dist/lib/task/commands/log.js +0 -6
  75. package/dist/lib/task/commands/status.js +17 -60
  76. package/dist/lib/task/commit-operation.js +28 -39
  77. package/dist/lib/task/completion-facts.js +56 -43
  78. package/dist/lib/task/control-authority.js +23 -256
  79. package/dist/lib/task/control-recovery.js +3 -5
  80. package/dist/lib/task/create.js +2 -4
  81. package/dist/lib/task/decision-intents.js +8 -9
  82. package/dist/lib/task/delivery-target.js +1 -40
  83. package/dist/lib/task/events.js +84 -107
  84. package/dist/lib/task/finalization.js +44 -8
  85. package/dist/lib/task/ledger-intents.js +1 -1
  86. package/dist/lib/task/lifecycle-execution.js +38 -33
  87. package/dist/lib/task/lifecycle.js +49 -41
  88. package/dist/lib/task/local-artifact-finalization.js +1 -4
  89. package/dist/lib/task/manual-validation-evidence.js +1 -37
  90. package/dist/lib/task/platform-operation-recovery.js +67 -24
  91. package/dist/lib/task/pr-delivery-fact.js +2 -5
  92. package/dist/lib/task/qualification-confirmation.js +5 -7
  93. package/dist/lib/task/resolve-ref.js +1 -25
  94. package/dist/lib/task/review-command.js +2 -2
  95. package/dist/lib/task/review-finalization.js +1 -21
  96. package/dist/lib/task/review-fingerprint.js +0 -4
  97. package/dist/lib/task/secure-fs.js +0 -56
  98. package/dist/lib/task/short-id.js +1 -39
  99. package/dist/lib/task/skill-scope.js +0 -1
  100. package/dist/lib/task/verification-engine.js +58 -282
  101. package/dist/lib/task/verification.js +6 -3
  102. package/dist/lib/task/write.js +11 -1
  103. package/lib/agent-clients/adapter.ts +0 -76
  104. package/lib/agent-clients/adapters/antigravity-cli.ts +0 -5
  105. package/lib/agent-clients/adapters/claude-code-credentials.ts +0 -19
  106. package/lib/agent-clients/adapters/claude-code.ts +0 -9
  107. package/lib/agent-clients/adapters/codex.ts +0 -56
  108. package/lib/agent-clients/adapters/opencode.ts +0 -5
  109. package/lib/agent-clients/adapters/traecli.ts +0 -5
  110. package/lib/agent-clients/config.ts +20 -61
  111. package/lib/agent-clients/registry.ts +1 -34
  112. package/lib/agent-clients/schema.ts +0 -18
  113. package/lib/agent-clients/tokens.ts +1 -2
  114. package/lib/agent-clients/types.ts +0 -15
  115. package/lib/decide.ts +1 -0
  116. package/lib/git/worktree-identity.ts +0 -10
  117. package/lib/internal/agent-client.ts +2 -70
  118. package/lib/internal/cli-route-inventory.ts +1 -4
  119. package/lib/internal/manual-validation.ts +16 -9
  120. package/lib/internal/task-create.ts +0 -1
  121. package/lib/internal/task-event.ts +1 -5
  122. package/lib/internal/task-finalization.ts +0 -1
  123. package/lib/internal/task-lifecycle.ts +3 -5
  124. package/lib/internal/task-operation-registry.ts +3 -19
  125. package/lib/internal/task-review.ts +4 -4
  126. package/lib/platform/comment-safety.ts +0 -10
  127. package/lib/platform/github-provider.ts +0 -2
  128. package/lib/platform/in-label-sync.ts +0 -16
  129. package/lib/platform/issue-comments.ts +0 -21
  130. package/lib/platform/issues.ts +0 -2
  131. package/lib/platform/operation-coordinator.ts +4 -2
  132. package/lib/platform/pr-change-report.ts +0 -5
  133. package/lib/platform/pr-checks.ts +1 -10
  134. package/lib/platform/pr-review.ts +1 -1
  135. package/lib/platform/provider-bridge.ts +0 -1
  136. package/lib/platform/provider-loader.ts +1 -5
  137. package/lib/platform/provider-validation.ts +1 -49
  138. package/lib/platform/pull-requests.ts +64 -99
  139. package/lib/platform/releases.ts +1 -40
  140. package/lib/platform/verification-required.ts +0 -2
  141. package/lib/platform/verification-sync.ts +0 -94
  142. package/lib/process-data/normalize.ts +1 -186
  143. package/lib/process-data/privacy.ts +2 -19
  144. package/lib/process-data/sources.ts +3 -283
  145. package/lib/render.ts +0 -15
  146. package/lib/run/index.ts +13 -7
  147. package/lib/run/skills.ts +0 -4
  148. package/lib/sandbox/commands/create.ts +37 -74
  149. package/lib/sandbox/commands/list-running.ts +0 -19
  150. package/lib/sandbox/commands/start.ts +7 -10
  151. package/lib/sandbox/constants.ts +0 -8
  152. package/lib/sandbox/control/client.ts +0 -1
  153. package/lib/sandbox/control/container-identity.ts +1 -16
  154. package/lib/sandbox/control/executor.ts +1 -5
  155. package/lib/sandbox/control/identity-sentinel.ts +0 -8
  156. package/lib/sandbox/control/lifecycle.ts +18 -51
  157. package/lib/sandbox/control/native-file-lock.ts +0 -8
  158. package/lib/sandbox/control/protocol.ts +0 -2
  159. package/lib/sandbox/control/server.ts +13 -39
  160. package/lib/sandbox/control/state.ts +1 -10
  161. package/lib/sandbox/dockerfile.ts +0 -11
  162. package/lib/sandbox/engine.ts +0 -17
  163. package/lib/sandbox/engines/docker-exact-discovery.ts +1 -5
  164. package/lib/sandbox/engines/wsl2-paths.ts +0 -4
  165. package/lib/sandbox/recovery.ts +24 -26
  166. package/lib/sandbox/removal.ts +11 -696
  167. package/lib/sandbox/shell.ts +1 -1
  168. package/lib/sandbox/task-resolver.ts +0 -48
  169. package/lib/sandbox/tools.ts +1 -5
  170. package/lib/sandbox/workspace-view.ts +2 -4
  171. package/lib/server/display.ts +0 -14
  172. package/lib/server/process-control.ts +1 -1
  173. package/lib/task/activity-intent.ts +36 -44
  174. package/lib/task/activity-log.ts +9 -22
  175. package/lib/task/artifact-command.ts +1 -1
  176. package/lib/task/artifact-lifecycle.ts +58 -67
  177. package/lib/task/artifact-name.ts +0 -7
  178. package/lib/task/artifact-operations.ts +3 -3
  179. package/lib/task/capabilities.ts +5 -6
  180. package/lib/task/commands/log.ts +0 -7
  181. package/lib/task/commands/status.ts +14 -79
  182. package/lib/task/commit-operation.ts +29 -51
  183. package/lib/task/completion-facts.ts +45 -42
  184. package/lib/task/control-authority.ts +27 -317
  185. package/lib/task/control-recovery.ts +2 -5
  186. package/lib/task/create.ts +2 -5
  187. package/lib/task/decision-intents.ts +5 -5
  188. package/lib/task/delivery-target.ts +0 -40
  189. package/lib/task/events.ts +89 -123
  190. package/lib/task/finalization.ts +41 -9
  191. package/lib/task/ledger-intents.ts +1 -1
  192. package/lib/task/lifecycle-execution.ts +37 -89
  193. package/lib/task/lifecycle.ts +48 -44
  194. package/lib/task/local-artifact-finalization.ts +0 -7
  195. package/lib/task/manual-validation-evidence.ts +1 -47
  196. package/lib/task/platform-operation-recovery.ts +50 -26
  197. package/lib/task/pr-delivery-fact.ts +2 -11
  198. package/lib/task/qualification-confirmation.ts +6 -6
  199. package/lib/task/resolve-ref.ts +0 -23
  200. package/lib/task/review-command.ts +2 -2
  201. package/lib/task/review-finalization.ts +1 -27
  202. package/lib/task/review-fingerprint.ts +0 -8
  203. package/lib/task/secure-fs.ts +0 -42
  204. package/lib/task/short-id.ts +0 -43
  205. package/lib/task/skill-scope.ts +0 -1
  206. package/lib/task/verification-engine.ts +56 -287
  207. package/lib/task/verification.ts +5 -5
  208. package/lib/task/write.ts +12 -1
  209. package/package.json +2 -2
  210. package/templates/.agents/README.en.md +1 -3
  211. package/templates/.agents/README.zh-CN.md +0 -2
  212. package/templates/.agents/rules/README.en.md +0 -1
  213. package/templates/.agents/rules/README.zh-CN.md +0 -1
  214. package/templates/.agents/rules/commit-and-pr.en.md +1 -1
  215. package/templates/.agents/rules/commit-and-pr.zh-CN.md +1 -1
  216. package/templates/.agents/rules/no-mid-flow-questions.en.md +0 -10
  217. package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +0 -10
  218. package/templates/.agents/rules/pr-sync.en.md +1 -1
  219. package/templates/.agents/rules/pr-sync.zh-CN.md +1 -1
  220. package/templates/.agents/rules/task-management.en.md +3 -3
  221. package/templates/.agents/rules/task-management.zh-CN.md +3 -3
  222. package/templates/.agents/skills/analyze-task/SKILL.en.md +3 -3
  223. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +3 -3
  224. package/templates/.agents/skills/cancel-task/SKILL.en.md +2 -2
  225. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +2 -2
  226. package/templates/.agents/skills/code-task/SKILL.en.md +2 -2
  227. package/templates/.agents/skills/code-task/SKILL.zh-CN.md +4 -4
  228. package/templates/.agents/skills/commit/SKILL.en.md +2 -2
  229. package/templates/.agents/skills/commit/SKILL.zh-CN.md +2 -2
  230. package/templates/.agents/skills/commit/reference/commit-orchestration.en.md +6 -6
  231. package/templates/.agents/skills/commit/reference/commit-orchestration.zh-CN.md +6 -6
  232. package/templates/.agents/skills/plan-task/SKILL.en.md +2 -2
  233. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +2 -2
  234. package/templates/.agents/skills/review-analysis/SKILL.en.md +3 -3
  235. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +3 -3
  236. package/templates/.agents/skills/review-code/SKILL.en.md +5 -5
  237. package/templates/.agents/skills/review-code/SKILL.zh-CN.md +5 -5
  238. package/templates/.agents/skills/review-plan/SKILL.en.md +3 -3
  239. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +3 -3
  240. package/templates/.agents/skills/review-pr/SKILL.en.md +4 -4
  241. package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +4 -4
  242. package/templates/.agents/skills/run-manual-validation/SKILL.en.md +1 -1
  243. package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +1 -1
  244. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +3 -75
  245. package/templates/.agents/templates/task.en.md +1 -0
  246. package/templates/.agents/templates/task.zh-CN.md +1 -0
  247. package/templates/.claude/settings.json +0 -24
  248. package/templates/.codex/hooks.json +0 -50
  249. package/dist/lib/agent-clients/adapters/codex-lifecycle/app-server.js +0 -582
  250. package/dist/lib/agent-clients/adapters/codex-lifecycle/binding.js +0 -114
  251. package/dist/lib/agent-clients/adapters/codex-lifecycle/build-identity.js +0 -237
  252. package/dist/lib/agent-clients/adapters/codex-lifecycle/cli.js +0 -443
  253. package/dist/lib/agent-clients/adapters/codex-lifecycle/evidence.js +0 -236
  254. package/dist/lib/agent-clients/adapters/codex-lifecycle/recovery.js +0 -292
  255. package/dist/lib/agent-clients/adapters/codex-lifecycle/store.js +0 -267
  256. package/dist/lib/agent-clients/adapters/codex-orchestration.js +0 -466
  257. package/dist/lib/internal/task-orchestration.js +0 -71
  258. package/dist/lib/platform/verification.js +0 -6
  259. package/dist/lib/run/prompt.js +0 -2
  260. package/dist/lib/sandbox/engines/authority.js +0 -289
  261. package/dist/lib/task/delegation-receipts.js +0 -410
  262. package/dist/lib/task/orchestration.js +0 -1233
  263. package/dist/lib/task/verification-checks.js +0 -9
  264. package/dist/lib/task/workspace-snapshot.js +0 -121
  265. package/dist/lifecycle-build-manifest.json +0 -6
  266. package/lib/agent-clients/adapters/codex-lifecycle/app-server.ts +0 -688
  267. package/lib/agent-clients/adapters/codex-lifecycle/binding.ts +0 -147
  268. package/lib/agent-clients/adapters/codex-lifecycle/build-identity.ts +0 -349
  269. package/lib/agent-clients/adapters/codex-lifecycle/cli.ts +0 -506
  270. package/lib/agent-clients/adapters/codex-lifecycle/evidence.ts +0 -385
  271. package/lib/agent-clients/adapters/codex-lifecycle/manifest-files.json +0 -41
  272. package/lib/agent-clients/adapters/codex-lifecycle/recovery.ts +0 -418
  273. package/lib/agent-clients/adapters/codex-lifecycle/store.ts +0 -354
  274. package/lib/agent-clients/adapters/codex-orchestration.ts +0 -630
  275. package/lib/internal/task-orchestration.ts +0 -74
  276. package/lib/platform/verification.ts +0 -11
  277. package/lib/run/prompt.ts +0 -1
  278. package/lib/sandbox/engines/authority.ts +0 -365
  279. package/lib/task/delegation-receipts.ts +0 -547
  280. package/lib/task/orchestration.ts +0 -1651
  281. package/lib/task/verification-checks.ts +0 -10
  282. package/lib/task/workspace-snapshot.ts +0 -144
  283. package/templates/.agents/hooks/lifecycle-delegation.js +0 -140
  284. package/templates/.agents/rules/lifecycle-orchestration.en.md +0 -44
  285. package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +0 -44
  286. package/templates/.agents/skills/run-task/SKILL.en.md +0 -29
  287. package/templates/.agents/skills/run-task/SKILL.zh-CN.md +0 -29
  288. package/templates/.agents/skills/run-task/config/verify.en.json +0 -10
  289. package/templates/.agents/skills/run-task/config/verify.zh-CN.json +0 -10
  290. package/templates/.agents/skills/run-task/reference/host-validation.en.md +0 -24
  291. package/templates/.agents/skills/run-task/reference/host-validation.zh-CN.md +0 -24
  292. package/templates/.claude/agents/agent-infra-lifecycle-executor.en.md +0 -6
  293. package/templates/.claude/agents/agent-infra-lifecycle-executor.zh-CN.md +0 -6
  294. package/templates/.claude/agents/agent-infra-lifecycle-reviewer.en.md +0 -6
  295. package/templates/.claude/agents/agent-infra-lifecycle-reviewer.zh-CN.md +0 -6
  296. package/templates/.claude/commands/run-task.en.md +0 -8
  297. package/templates/.claude/commands/run-task.zh-CN.md +0 -8
  298. package/templates/.codex/agents/agent-infra-lifecycle-executor.en.toml +0 -3
  299. package/templates/.codex/agents/agent-infra-lifecycle-executor.zh-CN.toml +0 -3
  300. package/templates/.codex/agents/agent-infra-lifecycle-reviewer.en.toml +0 -3
  301. package/templates/.codex/agents/agent-infra-lifecycle-reviewer.zh-CN.toml +0 -3
  302. package/templates/.opencode/commands/run-task.en.md +0 -11
  303. package/templates/.opencode/commands/run-task.zh-CN.md +0 -11
package/README.md CHANGED
@@ -200,14 +200,12 @@ The most-used lifecycle commands, in delivery order. The command prefix varies b
200
200
  | Command | Purpose |
201
201
  |---------|---------|
202
202
  | `create-task` / `import-issue` | Start a task from a description or a GitHub Issue |
203
- | `run-task` | Resume the lifecycle with fresh isolated executors/reviewers when the selected client exposes verified actual model/effort evidence; Codex now has an experimental Hooks + App Server evidence channel, but orchestration remains disabled until that channel is connected to delegation receipts |
204
203
  | `analyze-task` | Capture scope and risks, then select the streamlined, standard, or full path |
205
204
  | `review-analysis` | Review the analysis when the selected full path requires an independent requirement checkpoint |
206
205
  | `plan-task` / `review-plan` | Design the approach on standard/full paths; independently review it only on the full path |
207
206
  | `code-task` → `review-code` | Implement and test; `code-task` creates a local checkpoint, then a structured review checks that checkpoint |
208
207
  | `create-pr` → `complete-task` | Publish the approved checkpoint to the task-bound target branch, then archive after merge and final gates |
209
208
 
210
- Start with one atomic role policy, for example: `$run-task --task 42 --executor-model <id> --executor-reasoning-effort <value> --reviewer-model <id> --reviewer-reasoning-effort <value>`. Both roles may use the same model. With no explicit policy, `run-task` reads the current Agent Client's optional `agentClients[].orchestration`; if neither source is complete, it shows the host model-selection guidance before creating any run. Re-entry uses the persisted run policy. Finish or clear active runs before upgrading agent-infra; unsupported disk state fails closed without rewriting.
211
209
 
212
210
  See the full catalog — task status, release, security, and project-maintenance skills — in [Built-in AI Skills](./docs/en/skills.md).
213
211
 
package/README.zh-CN.md CHANGED
@@ -199,14 +199,12 @@ ai agent-client configure
199
199
  | 命令 | 用途 |
200
200
  |------|------|
201
201
  | `create-task` / `import-issue` | 从描述或 GitHub Issue 创建任务 |
202
- | `run-task` | 当所选客户端能提供已验证的 actual model/effort 证据时,用 fresh 隔离 executor/reviewer 续跑生命周期;Codex 现已具备实验性的 Hooks + App Server 证据通道,但在该通道接入 delegation receipt 前仍不会启用 orchestration |
203
202
  | `analyze-task` | 明确范围与风险,再选择精简、标准或完整路径 |
204
203
  | `review-analysis` | 仅在完整路径需要独立需求检查点时审查分析 |
205
204
  | `plan-task` / `review-plan` | 标准和完整路径需要设计方案;只有完整路径独立审查方案 |
206
205
  | `code-task` → `review-code` | 实现并测试;`code-task` 创建本地 checkpoint,再由结构化审查检视该 checkpoint |
207
206
  | `create-pr` → `complete-task` | 将已通过审查的 checkpoint 发布到任务绑定目标分支,并在合并和最终门禁通过后归档 |
208
207
 
209
- 启动时可提供原子角色策略,例如:`$run-task --task 42 --executor-model <id> --executor-reasoning-effort <值> --reviewer-model <id> --reviewer-reasoning-effort <值>`。两个角色可以使用同一模型。完全没有显式策略时,`run-task` 读取当前 Agent Client 可选的 `agentClients[].orchestration`;两个来源都不完整时,会在创建任何 run 前展示宿主模型选择指引。重入使用已持久化的 run 策略。升级 agent-infra 前必须完成或清空 active run;不受支持的磁盘状态会失败关闭且不改写。
210
208
 
211
209
  完整清单(任务状态、发布、安全、项目维护等 skill)见 [内置 AI Skills](./docs/zh-CN/skills.md)。
212
210
 
@@ -8,7 +8,7 @@ if (major < 22 || (major === 22 && minor < 9)) {
8
8
  }
9
9
  const command = process.argv[2] || '';
10
10
  const internalRouteRegistered = Object.hasOwn(INTERNAL_HANDLER_ROUTE_SELECTORS, command);
11
- const taskControlCommand = command === 'task-lifecycle' || command === 'task-orchestration' || command === 'task-finalization';
11
+ const taskControlCommand = command === 'task-lifecycle' || command === 'task-finalization';
12
12
  const taskWorkflowCommand = command === 'task-artifact'
13
13
  || command === 'task-review'
14
14
  || command === 'task-event'
@@ -50,7 +50,7 @@ function taskControlTransportFailure(message, code = 'TASK_CONTROL_TRANSPORT_INV
50
50
  let controlRouted = false;
51
51
  if (!taskViewGuardFailed && !markerlessHelp && (taskControlCommand || taskWorkflowCommand || manualValidationWorkflowCommand || taskPlatformRecoveryCommand)) {
52
52
  const transport = resolveSandboxControlTransport(process.env, {
53
- localWorkflow: command === 'task-orchestration' || command === 'task-finalization' || taskWorkflowCommand || manualValidationWorkflowCommand || taskPlatformRecoveryCommand
53
+ localWorkflow: command === 'task-finalization' || taskWorkflowCommand || manualValidationWorkflowCommand || taskPlatformRecoveryCommand
54
54
  });
55
55
  switch (transport.kind) {
56
56
  case 'fail-closed': {
@@ -75,11 +75,6 @@ if (!taskViewGuardFailed && !markerlessHelp && (taskControlCommand || taskWorkfl
75
75
  }
76
76
  if (!controlRouted && !taskViewGuardFailed && internalRouteRegistered)
77
77
  switch (command) {
78
- case 'task-orchestration': {
79
- const { taskOrchestration } = await import('../lib/internal/task-orchestration.js');
80
- await taskOrchestration(process.argv.slice(3));
81
- break;
82
- }
83
78
  case 'task-lifecycle': {
84
79
  const { taskLifecycle } = await import('../lib/internal/task-lifecycle.js');
85
80
  await taskLifecycle(process.argv.slice(3));
@@ -110,11 +105,6 @@ if (!controlRouted && !taskViewGuardFailed && internalRouteRegistered)
110
105
  agentClient(process.argv.slice(3));
111
106
  break;
112
107
  }
113
- case 'codex-lifecycle': {
114
- const { codexLifecycle } = await import('../lib/agent-clients/adapters/codex-lifecycle/cli.js');
115
- await codexLifecycle(process.argv.slice(3));
116
- break;
117
- }
118
108
  case 'git-workflow': {
119
109
  const { gitWorkflow } = await import('../lib/internal/git-workflow.js');
120
110
  gitWorkflow(process.argv.slice(3));
@@ -215,11 +205,6 @@ if (!controlRouted && !taskViewGuardFailed && internalRouteRegistered)
215
205
  taskArtifact(process.argv.slice(3));
216
206
  break;
217
207
  }
218
- case 'task-orchestration': {
219
- const { taskOrchestration } = await import('../lib/internal/task-orchestration.js');
220
- await taskOrchestration(process.argv.slice(3));
221
- break;
222
- }
223
208
  case 'task-review': {
224
209
  const { taskReview } = await import('../lib/internal/task-review.js');
225
210
  await taskReview(process.argv.slice(3));
@@ -208,15 +208,6 @@ function defineAgentClientAdapter(candidate) {
208
208
  else {
209
209
  throw new Error(`Agent Client '${candidate.id}' has an invalid model-selection context`);
210
210
  }
211
- const evidence = candidate.delegationEvidence;
212
- if (!evidence
213
- || !['host-event', 'app-server', 'unavailable'].includes(evidence.actualModel)
214
- || !['host-event', 'app-server', 'spawn-ack', 'unavailable'].includes(evidence.actualReasoningEffort)
215
- || ['spawnModeRequired', 'actualModelRequired', 'actualReasoningEffortRequired', 'fallbackReasonRequired']
216
- .some((key) => evidence[key] !== undefined
217
- && typeof evidence[key] !== 'boolean')) {
218
- throw new Error(`Agent Client '${candidate.id}' has invalid delegation evidence`);
219
- }
220
211
  if (typeof candidate.project !== 'object'
221
212
  || candidate.project === null
222
213
  || Array.isArray(candidate.project)) {
@@ -430,10 +421,6 @@ function defineAgentClientAdapter(candidate) {
430
421
  invocation: candidate.invocation,
431
422
  capabilities: Object.freeze(capabilities),
432
423
  modelSelection: frozenModelSelection,
433
- delegationEvidence: Object.freeze({ ...evidence }),
434
- ...(candidate.orchestrationAdapter === undefined
435
- ? {}
436
- : { orchestrationAdapter: Object.freeze({ ...candidate.orchestrationAdapter }) }),
437
424
  project: Object.freeze({
438
425
  ownedPathPrefixes: Object.freeze(paths),
439
426
  ...projectAssets,
@@ -10,7 +10,6 @@ const antigravityCliAdapter = defineAgentClientAdapter({
10
10
  commands: { level: 'integrated' },
11
11
  hooks: { level: 'compatible' },
12
12
  subagents: { level: 'unsupported' },
13
- orchestration: { level: 'unsupported' },
14
13
  sandbox: { level: 'integrated' },
15
14
  verification: { level: 'compatible' }
16
15
  },
@@ -19,10 +18,6 @@ const antigravityCliAdapter = defineAgentClientAdapter({
19
18
  command: '/model',
20
19
  guidance: 'Use the host model picker for the complete model and reasoning-effort catalog.'
21
20
  },
22
- delegationEvidence: {
23
- actualModel: 'unavailable',
24
- actualReasoningEffort: 'unavailable'
25
- },
26
21
  project: {
27
22
  ownedPathPrefixes: [],
28
23
  managed: [],
@@ -383,23 +383,6 @@ export function reconcileClaudeCredentials(home, options = {}) {
383
383
  warnings
384
384
  };
385
385
  }
386
- export function syncClaudeCredentialsFromKeychain(home, project, options = {}) {
387
- const result = reconcileClaudeCredentials(home, {
388
- ...options,
389
- singleProject: project
390
- });
391
- if (result.status !== 'OK' && result.status !== 'KEYCHAIN_WRITE_FAILED') {
392
- return {
393
- status: result.status,
394
- written: false
395
- };
396
- }
397
- return {
398
- status: result.status === 'KEYCHAIN_WRITE_FAILED' ? 'OK' : result.status,
399
- written: result.filesWritten.includes(project),
400
- expiresAt: result.expiresAt
401
- };
402
- }
403
386
  export function formatRemaining(expiresAt) {
404
387
  if (typeof expiresAt !== 'number') {
405
388
  return 'unknown';
@@ -11,7 +11,6 @@ const claudeCodeAdapter = defineAgentClientAdapter({
11
11
  commands: { level: 'integrated' },
12
12
  hooks: { level: 'integrated' },
13
13
  subagents: { level: 'experimental' },
14
- orchestration: { level: 'experimental' },
15
14
  sandbox: { level: 'integrated' },
16
15
  verification: { level: 'compatible' }
17
16
  },
@@ -20,14 +19,6 @@ const claudeCodeAdapter = defineAgentClientAdapter({
20
19
  command: '/model',
21
20
  guidance: 'Use the host model picker for the complete model and reasoning-effort catalog.'
22
21
  },
23
- delegationEvidence: {
24
- actualModel: 'host-event',
25
- actualReasoningEffort: 'spawn-ack',
26
- spawnModeRequired: false,
27
- actualModelRequired: false,
28
- actualReasoningEffortRequired: false,
29
- fallbackReasonRequired: false
30
- },
31
22
  project: {
32
23
  ownedPathPrefixes: ['.claude/'],
33
24
  managed: ['.claude/commands/', '.claude/agents/', '.claude/rules/'],
@@ -1,40 +1,6 @@
1
1
  import { defineAgentClientAdapter } from '../adapter.js';
2
2
  import { hostJoin } from '../../sandbox/engines/wsl2-paths.js';
3
3
  import { codexBeforeContainerCreateHook, codexRecoveryChecks } from './codex-sandbox.js';
4
- import { parseCodexLifecycleBinding } from './codex-lifecycle/binding.js';
5
- import { isCodexDelegationReceiptEvidence, isCodexLifecycleActivationEvidence } from './codex-lifecycle/evidence.js';
6
- function codexCarrierError(code) {
7
- const error = new Error(code);
8
- error.name = code;
9
- return error;
10
- }
11
- function codexStageToken(stage) {
12
- const tokens = {
13
- analysis: 'a',
14
- plan: 'p',
15
- code: 'c',
16
- 'review-analysis': 'ra',
17
- 'review-plan': 'rp',
18
- 'review-code': 'rc',
19
- commit: 'm'
20
- };
21
- const token = tokens[stage];
22
- if (!token)
23
- throw codexCarrierError('CODEX_LIFECYCLE_SPAWN_IDENTITY_INVALID');
24
- return token;
25
- }
26
- function codexLaunchCarrier(adapterContext, identity) {
27
- if (!Number.isSafeInteger(identity.round) || identity.round < 1
28
- || !['executor', 'reviewer'].includes(identity.role)) {
29
- throw codexCarrierError('CODEX_LIFECYCLE_SPAWN_IDENTITY_INVALID');
30
- }
31
- const label = `${codexStageToken(identity.stage)}_${identity.role === 'reviewer' ? 'r' : 'e'}_r${identity.round}`;
32
- const taskName = `${label}${adapterContext}`;
33
- const parsed = parseCodexLifecycleBinding(taskName);
34
- if (!parsed)
35
- throw codexCarrierError('CODEX_LIFECYCLE_LAUNCH_CONTEXT_INVALID');
36
- return Object.freeze({ task_name: parsed.taskName });
37
- }
38
4
  const codexAdapter = defineAgentClientAdapter({
39
5
  id: 'codex',
40
6
  displayName: 'Codex',
@@ -45,7 +11,6 @@ const codexAdapter = defineAgentClientAdapter({
45
11
  commands: { level: 'integrated' },
46
12
  hooks: { level: 'integrated' },
47
13
  subagents: { level: 'experimental' },
48
- orchestration: { level: 'experimental' },
49
14
  sandbox: { level: 'integrated' },
50
15
  verification: { level: 'compatible' }
51
16
  },
@@ -54,23 +19,6 @@ const codexAdapter = defineAgentClientAdapter({
54
19
  command: '/model',
55
20
  guidance: 'Use the host model picker for the complete model and reasoning-effort catalog.'
56
21
  },
57
- delegationEvidence: {
58
- actualModel: 'app-server',
59
- actualReasoningEffort: 'app-server'
60
- },
61
- orchestrationAdapter: {
62
- validateActivationEvidence: isCodexLifecycleActivationEvidence,
63
- validateReceiptEvidence: isCodexDelegationReceiptEvidence,
64
- createLaunchCarrier: codexLaunchCarrier,
65
- prepareDelegation: async (...args) => {
66
- const { prepareCodexOrchestrationDelegation } = await import('./codex-orchestration.js');
67
- return prepareCodexOrchestrationDelegation(...args);
68
- },
69
- recoverStarted: async (...args) => {
70
- const { recoverStartedLifecycleFromAdapter } = await import('./codex-lifecycle/recovery.js');
71
- return recoverStartedLifecycleFromAdapter(...args);
72
- }
73
- },
74
22
  project: {
75
23
  ownedPathPrefixes: ['.codex/'],
76
24
  managed: ['.codex/hooks.json', '.codex/agents/'],
@@ -12,7 +12,6 @@ const opencodeAdapter = defineAgentClientAdapter({
12
12
  commands: { level: 'integrated' },
13
13
  hooks: { level: 'compatible' },
14
14
  subagents: { level: 'unsupported' },
15
- orchestration: { level: 'unsupported' },
16
15
  sandbox: { level: 'integrated' },
17
16
  verification: { level: 'compatible' }
18
17
  },
@@ -21,10 +20,6 @@ const opencodeAdapter = defineAgentClientAdapter({
21
20
  command: '/models',
22
21
  guidance: 'Use the host model picker for the complete model and reasoning-effort catalog.'
23
22
  },
24
- delegationEvidence: {
25
- actualModel: 'unavailable',
26
- actualReasoningEffort: 'unavailable'
27
- },
28
23
  project: {
29
24
  ownedPathPrefixes: ['.opencode/'],
30
25
  managed: ['.opencode/commands/'],
@@ -10,7 +10,6 @@ const traecliAdapter = defineAgentClientAdapter({
10
10
  commands: { level: 'integrated' },
11
11
  hooks: { level: 'compatible' },
12
12
  subagents: { level: 'experimental' },
13
- orchestration: { level: 'experimental' },
14
13
  sandbox: { level: 'integrated' },
15
14
  verification: { level: 'compatible' }
16
15
  },
@@ -19,10 +18,6 @@ const traecliAdapter = defineAgentClientAdapter({
19
18
  command: '/model',
20
19
  guidance: 'Use the host model picker for the complete model and reasoning-effort catalog.'
21
20
  },
22
- delegationEvidence: {
23
- actualModel: 'unavailable',
24
- actualReasoningEffort: 'unavailable'
25
- },
26
21
  project: {
27
22
  ownedPathPrefixes: ['.traecli/'],
28
23
  managed: ['.traecli/commands/'],
@@ -20,37 +20,6 @@ function isRecord(value) {
20
20
  function fail(code, path) {
21
21
  throw new AgentClientConfigError({ code, path });
22
22
  }
23
- function parseExactText(value, path) {
24
- if (typeof value !== 'string' || value.length === 0 || value.trim() !== value) {
25
- fail('INVALID_AGENT_CLIENTS', path);
26
- }
27
- return value;
28
- }
29
- function parseOrchestrationPolicy(value, path) {
30
- if (!isRecord(value))
31
- fail('INVALID_AGENT_CLIENTS', path);
32
- const keys = Object.keys(value);
33
- if (keys.length !== 2
34
- || !hasOwn(value, 'executor')
35
- || !hasOwn(value, 'reviewer')) {
36
- fail('INVALID_AGENT_CLIENTS', path);
37
- }
38
- const parseRole = (candidate, rolePath) => {
39
- if (!isRecord(candidate)
40
- || Object.keys(candidate).length !== 2
41
- || !hasOwn(candidate, 'model')
42
- || !hasOwn(candidate, 'reasoningEffort')) {
43
- fail('INVALID_AGENT_CLIENTS', rolePath);
44
- }
45
- return Object.freeze({
46
- model: parseExactText(candidate.model, `${rolePath}.model`),
47
- reasoningEffort: parseExactText(candidate.reasoningEffort, `${rolePath}.reasoningEffort`)
48
- });
49
- };
50
- const executor = parseRole(value.executor, `${path}.executor`);
51
- const reviewer = parseRole(value.reviewer, `${path}.reviewer`);
52
- return Object.freeze({ executor, reviewer });
53
- }
54
23
  function parseCanonical(value) {
55
24
  if (!Array.isArray(value))
56
25
  fail('INVALID_AGENT_CLIENTS', 'agentClients');
@@ -60,11 +29,10 @@ function parseCanonical(value) {
60
29
  if (!isRecord(candidate))
61
30
  fail('INVALID_AGENT_CLIENTS', path);
62
31
  const keys = Object.keys(candidate);
63
- if ((keys.length !== 3 && keys.length !== 4)
32
+ if (keys.length !== 3
64
33
  || !hasOwn(candidate, 'id')
65
34
  || !hasOwn(candidate, 'enabled')
66
- || !hasOwn(candidate, 'installInSandbox')
67
- || (keys.length === 4 && !hasOwn(candidate, 'orchestration'))) {
35
+ || !hasOwn(candidate, 'installInSandbox')) {
68
36
  fail('INVALID_AGENT_CLIENTS', path);
69
37
  }
70
38
  if (!isAgentClientId(candidate.id)) {
@@ -79,10 +47,7 @@ function parseCanonical(value) {
79
47
  }
80
48
  entries.set(candidate.id, {
81
49
  enabled: candidate.enabled,
82
- installInSandbox: candidate.installInSandbox,
83
- ...(hasOwn(candidate, 'orchestration')
84
- ? { orchestration: parseOrchestrationPolicy(candidate.orchestration, `${path}.orchestration`) }
85
- : {})
50
+ installInSandbox: candidate.installInSandbox
86
51
  });
87
52
  }
88
53
  for (const id of AGENT_CLIENT_IDS) {
@@ -95,24 +60,10 @@ function serializeAgentClients(state) {
95
60
  return AGENT_CLIENT_IDS.map((id) => ({
96
61
  id,
97
62
  enabled: state[id].enabled,
98
- installInSandbox: state[id].installInSandbox,
99
- ...(state[id].orchestration
100
- ? { orchestration: structuredClone(state[id].orchestration) }
101
- : {})
63
+ installInSandbox: state[id].installInSandbox
102
64
  }));
103
65
  }
104
- function normalizeAgentClients(input) {
105
- if (!hasOwn(input, 'agentClients'))
106
- fail('MISSING_AGENT_CLIENT', 'agentClients');
107
- const state = parseCanonical(input.agentClients);
108
- for (const [index, id] of AGENT_CLIENT_IDS.entries()) {
109
- const entry = Array.isArray(input.agentClients) ? input.agentClients[index] : undefined;
110
- if (!isRecord(entry) || entry.id !== id) {
111
- fail('INVALID_AGENT_CLIENTS', `agentClients[${index}].id`);
112
- }
113
- }
114
- if (hasOwn(input, 'tuis'))
115
- fail('INVALID_AGENT_CLIENTS', 'tuis');
66
+ function validateSandboxTools(input) {
116
67
  const sandbox = isRecord(input.sandbox) ? input.sandbox : undefined;
117
68
  if (sandbox && hasOwn(sandbox, 'customTools')) {
118
69
  fail('INVALID_AGENT_CLIENTS', 'sandbox.customTools');
@@ -129,6 +80,20 @@ function normalizeAgentClients(input) {
129
80
  }
130
81
  }
131
82
  }
83
+ }
84
+ function normalizeAgentClients(input) {
85
+ if (!hasOwn(input, 'agentClients'))
86
+ fail('MISSING_AGENT_CLIENT', 'agentClients');
87
+ const state = parseCanonical(input.agentClients);
88
+ for (const [index, id] of AGENT_CLIENT_IDS.entries()) {
89
+ const entry = Array.isArray(input.agentClients) ? input.agentClients[index] : undefined;
90
+ if (!isRecord(entry) || entry.id !== id) {
91
+ fail('INVALID_AGENT_CLIENTS', `agentClients[${index}].id`);
92
+ }
93
+ }
94
+ if (hasOwn(input, 'tuis'))
95
+ fail('INVALID_AGENT_CLIENTS', 'tuis');
96
+ validateSandboxTools(input);
132
97
  return {
133
98
  state,
134
99
  canonical: serializeAgentClients(state)
@@ -49,20 +49,9 @@ function listEnabledAgentClientAdapters(state) {
49
49
  function listInstalledAgentClientAdapters(state) {
50
50
  return Object.freeze(AGENT_CLIENT_ADAPTERS.filter((adapter) => state[adapter.id].installInSandbox));
51
51
  }
52
- function getAgentClientCapability(id, capability) {
53
- return getAgentClientAdapter(id).capabilities[capability];
54
- }
55
52
  function getAgentClientModelSelection(id) {
56
53
  return getAgentClientAdapter(id).modelSelection;
57
54
  }
58
- function getAgentClientDelegationEvidence(id) {
59
- return getAgentClientAdapter(id).delegationEvidence;
60
- }
61
- function listEnabledAgentClientAdaptersByCapability(state, capability, acceptedLevels) {
62
- const accepted = new Set(acceptedLevels);
63
- return Object.freeze(AGENT_CLIENT_ADAPTERS.filter((adapter) => state[adapter.id].enabled
64
- && accepted.has(adapter.capabilities[capability].level)));
65
- }
66
55
  function createAgentClientManifest() {
67
56
  return Object.freeze(AGENT_CLIENT_ADAPTERS.map((adapter) => Object.freeze({
68
57
  id: adapter.id,
@@ -82,5 +71,5 @@ function createAgentClientManifest() {
82
71
  })
83
72
  })));
84
73
  }
85
- export { AGENT_CLIENT_REGISTRY, createAgentClientManifest, getAgentClientAdapter, getAgentClientCapability, getAgentClientDelegationEvidence, getAgentClientModelSelection, listAgentClientAdapters, listEnabledAgentClientAdapters, listEnabledAgentClientAdaptersByCapability, listInstalledAgentClientAdapters };
74
+ export { AGENT_CLIENT_REGISTRY, createAgentClientManifest, getAgentClientAdapter, getAgentClientModelSelection, listAgentClientAdapters, listEnabledAgentClientAdapters, listInstalledAgentClientAdapters };
86
75
  //# sourceMappingURL=registry.js.map
@@ -26,15 +26,6 @@ const AGENT_CLIENTS_SCHEMA = {
26
26
  installInSandbox: {
27
27
  type: 'boolean'
28
28
  },
29
- orchestration: {
30
- type: 'object',
31
- additionalProperties: false,
32
- required: ['executor', 'reviewer'],
33
- properties: {
34
- executor: { $ref: '#/definitions/orchestrationRolePolicy' },
35
- reviewer: { $ref: '#/definitions/orchestrationRolePolicy' }
36
- }
37
- }
38
29
  }
39
30
  }))
40
31
  },
@@ -61,15 +52,6 @@ const AGENT_CLIENTS_SCHEMA = {
61
52
  }
62
53
  },
63
54
  definitions: {
64
- orchestrationRolePolicy: {
65
- type: 'object',
66
- additionalProperties: false,
67
- required: ['model', 'reasoningEffort'],
68
- properties: {
69
- model: { type: 'string', minLength: 1 },
70
- reasoningEffort: { type: 'string', minLength: 1 }
71
- }
72
- },
73
55
  agentClientCapabilityId: {
74
56
  type: 'string',
75
57
  enum: [...AGENT_CLIENT_CAPABILITY_IDS]
@@ -3,8 +3,7 @@
3
3
  // internal commands and the rendering side share one definition.
4
4
  export const AGENT_TOKEN_VALUES = ['claude', 'codex', 'antigravity', 'opencode', 'cursor', 'traecli'];
5
5
  export const KNOWN_AI_AGENTS = new Set(AGENT_TOKEN_VALUES);
6
- // Long name -> short name mapping: `claude-code` reuses the existing
7
- // orchestration precedent, and `antigravity-cli` is the active client.
6
+ // Long name -> short name mapping for the activity-log agent field.
8
7
  export const AGENT_LONG_NAMES = {
9
8
  'claude-code': 'claude',
10
9
  'antigravity-cli': 'antigravity'
@@ -11,7 +11,6 @@ const AGENT_CLIENT_CAPABILITY_IDS = [
11
11
  'commands',
12
12
  'hooks',
13
13
  'subagents',
14
- 'orchestration',
15
14
  'sandbox',
16
15
  'verification'
17
16
  ];
@@ -83,6 +83,8 @@ export async function decide(args, options = {}) {
83
83
  const result = await applyHumanDecision(request, writeOptions);
84
84
  if (result.error)
85
85
  throw new Error(result.error.message);
86
+ for (const warning of result.warnings ?? [])
87
+ process.stderr.write(`Warning: ${warning.code}: ${warning.message}\n`);
86
88
  return 0;
87
89
  }
88
90
  catch (error) {
@@ -52,13 +52,5 @@ function assertGitWorktreeBinding(stateRoot, worktreeRoot, expectedBranch) {
52
52
  }
53
53
  return worktree;
54
54
  }
55
- function assertGitRepositoryBinding(stateRoot, worktreeRoot) {
56
- const state = resolveGitWorktreeIdentity(stateRoot);
57
- const worktree = resolveGitWorktreeIdentity(worktreeRoot);
58
- if (!sameFilesystemEntry(state.commonDir, worktree.commonDir)) {
59
- throw new Error('SANDBOX_CONTROL_WORKTREE_INVALID: state and worktree roots have different Git common directories');
60
- }
61
- return worktree;
62
- }
63
- export { assertGitWorktreeBinding, assertGitRepositoryBinding, normalizeCanonicalPath, resolveGitWorktreeIdentity, sameFilesystemEntry };
55
+ export { assertGitWorktreeBinding, normalizeCanonicalPath, resolveGitWorktreeIdentity, sameFilesystemEntry };
64
56
  //# sourceMappingURL=worktree-identity.js.map
@@ -3,10 +3,10 @@ import path from 'node:path';
3
3
  import { AgentClientConfigError, normalizeAgentClients } from '../agent-clients/config.js';
4
4
  import { normalizeCustomToolInvocations } from '../agent-clients/custom-tool-invocations.js';
5
5
  import { renderNextStepCommands } from '../agent-clients/next-steps.js';
6
- import { getAgentClientAdapter, getAgentClientModelSelection } from '../agent-clients/registry.js';
6
+ import { getAgentClientModelSelection } from '../agent-clients/registry.js';
7
7
  import { isAgentClientId } from '../agent-clients/types.js';
8
8
  import { ensureInternalHandlerRoute, internalHandlerRoute } from './cli-route-inventory.js';
9
- const USAGE = 'Usage: agent-infra-internal agent-client <next-steps|model-selection|launch-carrier> [options]\n';
9
+ const USAGE = 'Usage: agent-infra-internal agent-client <next-steps|model-selection> [options]\n';
10
10
  function failure(code, message) {
11
11
  process.stdout.write(`${JSON.stringify({
12
12
  status: 'failed',
@@ -72,63 +72,6 @@ function parseArgs(args) {
72
72
  format
73
73
  };
74
74
  }
75
- function parseLaunchCarrierArgs(args) {
76
- const allowed = new Set(['--client', '--adapter-context', '--stage', '--round', '--role', '--format']);
77
- const values = {};
78
- const seen = new Set();
79
- for (let index = 1; index < args.length; index += 1) {
80
- const flag = args[index];
81
- if (!allowed.has(flag) || seen.has(flag)) {
82
- failure('AGENT_CLIENT_PAYLOAD_INVALID', `invalid or duplicate option '${flag}'`);
83
- return null;
84
- }
85
- const value = args[++index];
86
- if (!value || value.startsWith('--')) {
87
- failure('AGENT_CLIENT_PAYLOAD_INVALID', `option '${flag}' requires a value`);
88
- return null;
89
- }
90
- seen.add(flag);
91
- values[flag] = value;
92
- }
93
- const round = Number(values['--round']);
94
- if (!isAgentClientId(values['--client']) || !values['--adapter-context'] || !values['--stage'] || !values['--role']
95
- || !Number.isSafeInteger(round) || round < 1 || (values['--format'] ?? 'json') !== 'json') {
96
- failure('AGENT_CLIENT_PAYLOAD_INVALID', 'launch-carrier requires client, adapter context, stage, positive round, role, and json format');
97
- return null;
98
- }
99
- return {
100
- client: values['--client'],
101
- adapterContext: values['--adapter-context'],
102
- stage: values['--stage'],
103
- round,
104
- role: values['--role']
105
- };
106
- }
107
- function launchCarrier(args) {
108
- const parsed = parseLaunchCarrierArgs(args);
109
- if (!parsed)
110
- return;
111
- const createCarrier = getAgentClientAdapter(parsed.client).orchestrationAdapter?.createLaunchCarrier;
112
- if (!createCarrier) {
113
- process.stdout.write(`${JSON.stringify({
114
- status: 'failed', changed: false, client: parsed.client, carrier: null,
115
- error: { code: 'AGENT_CLIENT_LAUNCH_CARRIER_UNSUPPORTED', message: `Agent Client '${parsed.client}' does not support lifecycle launch carriers` }
116
- })}\n`);
117
- process.exitCode = 1;
118
- return;
119
- }
120
- try {
121
- const carrier = createCarrier(parsed.adapterContext, { stage: parsed.stage, round: parsed.round, role: parsed.role });
122
- process.stdout.write(`${JSON.stringify({ status: 'ready', changed: false, client: parsed.client, carrier, error: null })}\n`);
123
- }
124
- catch (error) {
125
- process.stdout.write(`${JSON.stringify({
126
- status: 'failed', changed: false, client: parsed.client, carrier: null,
127
- error: { code: error instanceof Error && error.name ? error.name : 'AGENT_CLIENT_LAUNCH_CARRIER_INVALID', message: error instanceof Error ? error.message : String(error) }
128
- })}\n`);
129
- process.exitCode = 1;
130
- }
131
- }
132
75
  function modelSelection(args) {
133
76
  const values = {};
134
77
  const seen = new Set();
@@ -225,9 +168,6 @@ function writeNextStepOutput(format, commands, diagnostics) {
225
168
  function agentClient(args = []) {
226
169
  if (!ensureInternalHandlerRoute('agent-client', args))
227
170
  return;
228
- if (internalHandlerRoute('agent-client', 'launch-carrier', args[0] ?? '')) {
229
- return launchCarrier(args);
230
- }
231
171
  if (internalHandlerRoute('agent-client', 'model-selection', args[0] ?? '')) {
232
172
  return modelSelection(args);
233
173
  }
@@ -33,8 +33,7 @@ export const INTERNAL_HANDLER_ROUTE_SELECTORS = Object.freeze({
33
33
  'task-create': ['input'],
34
34
  'task-qualification': ['proposal', 'confirm', 'supersede', 'revoke'],
35
35
  'sandbox-control': ['serve', 'execute', 'recover', 'client'],
36
- 'agent-client': ['next-steps', 'model-selection', 'launch-carrier'],
37
- 'codex-lifecycle': ['preflight', 'hook-event', 'resolve-start', 'resolve-stop', 'consume'],
36
+ 'agent-client': ['next-steps', 'model-selection'],
38
37
  'git-workflow': ['inspect', 'preview-tree', 'snapshot', 'compare-trees', 'commit', 'push-rebased'],
39
38
  'task-delivery': ['deliver'],
40
39
  'release-workflow': ['inspect', 'prepare', 'publish', 'post-prepare', 'post-publish'],
@@ -54,7 +53,6 @@ export const INTERNAL_HANDLER_ROUTE_SELECTORS = Object.freeze({
54
53
  'task-warning': ['list', 'add', 'set-status'],
55
54
  'task-activity': ['pr-review-inspect', 'pr-review-start', 'pr-review-complete', 'pr-review-terminate'],
56
55
  'task-artifact': ['inspect', 'init', 'preflight', 'finalize-local'],
57
- 'task-orchestration': ['status', 'progress'],
58
56
  'task-review': ['preflight', 'finalize-summary'],
59
57
  'task-event': ['event'],
60
58
  'task-lifecycle': ['intent'],
@@ -100,8 +98,6 @@ export function internalRouteSelector(command, args) {
100
98
  return optionValue(args, '--scope') ?? 'snapshot';
101
99
  if (command === 'task-short-id')
102
100
  return first(args) === 'list' && args.includes('--verify') ? 'list-verify' : first(args);
103
- if (command === 'task-orchestration')
104
- return args[1] === 'status' ? 'status' : args[1] ? 'progress' : '';
105
101
  if (command === 'task-review')
106
102
  return args[1] ?? '';
107
103
  if (command === 'task-artifact')