@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
@@ -1,6 +1,7 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
- import { locateActivityLog, pairEntries } from '../task/activity-log.js';
3
+ import { activityWarnings } from '../task/activity-log.js';
4
+ import { lifecycleExecutions } from '../task/lifecycle-execution.js';
4
5
  import { resolveTaskRef } from '../task/resolve-ref.js';
5
6
  import { prepareAndRenderPrSummaryContent } from '../platform/pr-summary.js';
6
7
  import { applyTaskEvent } from '../task/events.js';
@@ -39,17 +40,14 @@ function openManualValidationStarted(taskMdPath) {
39
40
  catch {
40
41
  return { present: false, transactionId: null };
41
42
  }
42
- const section = locateActivityLog(content);
43
- if (!section)
44
- return { present: false, transactionId: null };
45
- const row = pairEntries(section.entries)
46
- .filter((item) => item.step === 'Complete Manual Validation' && item.started && !item.done)
43
+ const row = lifecycleExecutions(content)
44
+ .filter((item) => item.family === 'manual-validation')
47
45
  .at(-1);
48
46
  if (!row)
49
47
  return { present: false, transactionId: null };
50
48
  return {
51
49
  present: true,
52
- transactionId: /(?:^|;\s*)transaction=([A-Za-z0-9][A-Za-z0-9._-]{0,127})(?:;|$)/u.exec(row.note)?.[1] ?? null
50
+ transactionId: row.transactionId ?? null
53
51
  };
54
52
  }
55
53
  async function executeManualValidationTransaction(taskRef, values, cwd, options = {}) {
@@ -106,7 +104,7 @@ async function executeManualValidationTransactionAtResolvedTask(taskRef, values,
106
104
  if (!transactionResult.ok && transactionResult.error.code !== 'MANUAL_VALIDATION_TRANSACTION_MISSING')
107
105
  return result('failed', transactionResult.error);
108
106
  if (transactionResult.ok && transactionResult.value.phase === 'committed')
109
- return result('applied', null, { transaction: transactionResult.value, receipt: transactionResult.value.committedReceipt, idempotent: true });
107
+ return result('applied', null, { transaction: transactionResult.value, receipt: transactionResult.value.committedReceipt, idempotent: true, warnings: activityWarnings(taskContent) });
110
108
  const openStarted = transactionResult.ok ? { present: false, transactionId: null } : openManualValidationStarted(resolved.taskMdPath);
111
109
  if (openStarted.present && !openStarted.transactionId) {
112
110
  return result('failed', { code: 'MANUAL_VALIDATION_TRANSACTION_RECOVERY_REQUIRED', message: 'open manual-validation started event has no recoverable transactionId' });
@@ -134,12 +132,17 @@ async function executeManualValidationTransactionAtResolvedTask(taskRef, values,
134
132
  });
135
133
  let transaction;
136
134
  const idempotent = transactionResult.ok;
135
+ const warnings = [];
136
+ const currentWarnings = () => warnings.length
137
+ ? warnings.filter((warning, index) => warnings.findIndex((item) => item.code === warning.code && item.message === warning.message) === index)
138
+ : activityWarnings(taskContent);
137
139
  let startedEventApplied = false;
138
140
  if (!transactionResult.ok) {
139
141
  transaction = createTransaction();
140
142
  const started = applyTaskEvent({ taskRef, event: 'manual-validation.started', agent, initiator: 'model', requestId: transactionId, reasonCode: 'user-request', transactionId }, { repoRoot: cwd });
141
143
  if (started.status === 'failed')
142
144
  return result('failed', started.error ?? { code: 'MANUAL_VALIDATION_TRANSACTION_FAILED', message: 'manual-validation started event failed' });
145
+ warnings.push(...(started.warnings ?? []));
143
146
  startedEventApplied = true;
144
147
  if (previousTransaction) {
145
148
  try {
@@ -165,9 +168,10 @@ async function executeManualValidationTransactionAtResolvedTask(taskRef, values,
165
168
  const started = applyTaskEvent({ taskRef, event: 'manual-validation.started', agent, initiator: 'model', requestId: transaction.transactionId, reasonCode: 'user-request', transactionId: transaction.transactionId }, { repoRoot: cwd });
166
169
  if (started.status === 'failed')
167
170
  return result('failed', started.error ?? { code: 'MANUAL_VALIDATION_TRANSACTION_FAILED', message: 'manual-validation started event failed' });
171
+ warnings.push(...(started.warnings ?? []));
168
172
  }
169
173
  if (prepareOnly)
170
- return result('applied', null, { transaction, prepared: true, idempotent });
174
+ return result('applied', null, { transaction, prepared: true, idempotent, warnings: currentWarnings() });
171
175
  const transactionFailure = (failure) => {
172
176
  throw new Error(`${failure.code}: ${failure.message}`);
173
177
  };
@@ -224,6 +228,7 @@ async function executeManualValidationTransactionAtResolvedTask(taskRef, values,
224
228
  const completed = applyTaskEvent({ taskRef, event: 'manual-validation.completed', agent, initiator: 'model', requestId: transaction.transactionId, reasonCode: 'user-request', artifact: values.artifact, summaryResult: 'human-confirmed validation and committed receipt', transactionId: transaction.transactionId, receiptDigest: receipt.receiptDigest, prHeadSha: receipt.prHeadSha }, { repoRoot: cwd });
225
229
  if (completed.status === 'failed')
226
230
  transactionFailure(completed.error ?? { code: 'MANUAL_VALIDATION_TRANSACTION_FAILED', message: 'manual-validation completion event failed' });
231
+ warnings.push(...(completed.warnings ?? []));
227
232
  transitionAndPersist('receipt-committed', { eventAppended: true });
228
233
  }
229
234
  if (transaction.phase === 'receipt-committed') {
@@ -239,7 +244,7 @@ async function executeManualValidationTransactionAtResolvedTask(taskRef, values,
239
244
  if (!/^###\s+✅\s+(?:Manual Validation Passed|人工验证已通过)\s*$/mu.test(postWrite.comment?.body ?? '') || postWrite.pullRequest?.head.sha !== receipt.prHeadSha || !manualValidationFinalSummaryProjectionMatches(postWrite.comment?.body ?? '', receipt))
240
245
  transactionFailure({ code: 'MANUAL_VALIDATION_TRANSACTION_RECOVERY_REQUIRED', message: 'final summary post-write verification failed' });
241
246
  transitionAndPersist('committed', { postWriteVerified: true });
242
- return result('applied', null, { transaction, receipt, idempotent: false });
247
+ return result('applied', null, { transaction, receipt, idempotent: false, warnings: currentWarnings() });
243
248
  }
244
249
  catch (error) {
245
250
  const message = error instanceof Error ? error.message : String(error);
@@ -309,6 +314,9 @@ async function manualValidation(args = []) {
309
314
  const format = values.format === 'text' ? 'text' : 'json';
310
315
  const output = await executeManualValidationTransaction(taskRef, values, path.resolve(values.cwd ?? process.cwd()));
311
316
  process.stdout.write(format === 'json' ? `${JSON.stringify(output)}\n` : `${output.status === 'applied' ? 'Manual validation transaction committed.' : `${output.error?.code}: ${output.error?.message}`}\n`);
317
+ if (format === 'text' && Array.isArray(output.warnings))
318
+ for (const warning of output.warnings)
319
+ process.stderr.write(`${warning.code}: ${warning.message}\n`);
312
320
  if (output.status === 'failed')
313
321
  process.exitCode = 1;
314
322
  }
@@ -4,7 +4,7 @@ import path from 'node:path';
4
4
  import { requestSandboxTaskCreate, SandboxControlClientError } from '../sandbox/control/client.js';
5
5
  import { SANDBOX_CONTROL_MAX_BYTES } from '../sandbox/control/protocol.js';
6
6
  import { validateTaskCreateCandidate } from '../task/create.js';
7
- import { createTask, parseTaskCreateResult, projectTaskCreateResult, taskCreateExitCode, taskCreateFailure } from '../task/create-service.js';
7
+ import { createTask, parseTaskCreateResult, taskCreateExitCode, taskCreateFailure } from '../task/create-service.js';
8
8
  import { ensureInternalHandlerRoute, internalHandlerRoute } from './cli-route-inventory.js';
9
9
  function failed(code, message, retryable = false, control) {
10
10
  return taskCreateFailure({ code, message, retryable }, control);
@@ -2,7 +2,7 @@ import { normalizeAgentToken, AGENT_USAGE_HINT } from '../agent-clients/tokens.j
2
2
  import { applyTaskEvent, eventCatalog } from '../task/events.js';
3
3
  import { resolveTaskRef } from '../task/resolve-ref.js';
4
4
  import { ensureInternalHandlerRoute, internalHandlerRoute } from './cli-route-inventory.js';
5
- const USAGE = `Usage: agent-infra-internal task-event <N | TASK-id> <event> --agent <agent> [event options] [--orchestrated] [--dry-run]
5
+ const USAGE = `Usage: agent-infra-internal task-event <N | TASK-id> <event> --agent <agent> [event options] [--dry-run]
6
6
 
7
7
  Apply one closed-set task lifecycle event and print a structured JSON result.
8
8
  Events: ${eventCatalog.join(', ')}
@@ -31,13 +31,6 @@ export function parseTaskEventRequest(args) {
31
31
  const seen = new Set();
32
32
  for (let index = 2; index < args.length; index += 1) {
33
33
  const flag = args[index];
34
- if (flag === '--orchestrated') {
35
- if (seen.has(flag))
36
- throw new Error(`duplicate option '${flag}'`);
37
- seen.add(flag);
38
- request.orchestrated = true;
39
- continue;
40
- }
41
34
  if (flag === '--dry-run') {
42
35
  if (seen.has(flag))
43
36
  throw new Error(`duplicate option '${flag}'`);
@@ -1,4 +1,3 @@
1
- import path from 'node:path';
2
1
  import { createDirectHostExecutionContext, dispatchTaskControlOperation, parseTaskControlOperation } from '../task/control-authority.js';
3
2
  import { applyTaskFinalization } from '../task/finalization.js';
4
3
  import { detectRepoRoot, resolveTaskRef } from '../task/resolve-ref.js';
@@ -3,7 +3,7 @@ import { lifecycleIntentCatalog } from '../task/lifecycle.js';
3
3
  import { detectRepoRoot, resolveTaskRef } from '../task/resolve-ref.js';
4
4
  import { ensureInternalHandlerRoute, internalHandlerRoute } from './cli-route-inventory.js';
5
5
  import { loadSandboxControlLocation } from '../sandbox/config.js';
6
- const USAGE = `Usage: agent-infra-internal task-lifecycle <N | TASK-id> <intent> --agent <agent> [intent flags] [--dry-run]\n\nIntents: ${lifecycleIntentCatalog.filter((intent) => intent !== 'complete').join(', ')}\nrecover-started: --auto\n`;
6
+ const USAGE = `Usage: agent-infra-internal task-lifecycle <N | TASK-id> <intent> --agent <agent> [intent flags] [--dry-run]\n\nIntents: ${lifecycleIntentCatalog.filter((intent) => intent !== 'complete').join(', ')}\n`;
7
7
  function usageFailure(message) {
8
8
  process.stdout.write(`${JSON.stringify({ status: 'failed', changed: false, error: { code: 'LIFECYCLE_PAYLOAD_INVALID', message } })}\n`);
9
9
  process.stderr.write(USAGE);
@@ -56,7 +56,7 @@ async function taskLifecycle(args = []) {
56
56
  const controlLocation = loadSandboxControlLocation(repoRoot);
57
57
  const result = await dispatchTaskControlOperation(createDirectHostExecutionContext({ repoRoot, ...(controlLocation ?? {}) }), operation);
58
58
  process.stdout.write(`${JSON.stringify(result)}\n`);
59
- if (result.status === 'failed' || result.status === 'owner-unknown' || result.status === 'conflict')
59
+ if (result.status === 'failed')
60
60
  process.exitCode = 1;
61
61
  }
62
62
  export { taskLifecycle };
@@ -1,9 +1,8 @@
1
1
  import fs from 'node:fs';
2
- import path from 'node:path';
3
- import { accessSandboxTaskView, parseSandboxTaskView, taskViewFromStatus } from '../sandbox/control/task-view.js';
2
+ import { accessSandboxTaskView, taskViewFromStatus } from '../sandbox/control/task-view.js';
4
3
  import { resolveTaskRef } from '../task/resolve-ref.js';
5
4
  import { PUBLIC_CLI_COMMAND_ALIASES, PUBLIC_CLI_SELECTOR_ALIASES, internalRouteSelector } from './cli-route-inventory.js';
6
- import { hasSandboxControlMarker, resolveSandboxControlTransport, sandboxTaskMarkerState } from '../sandbox/environment.js';
5
+ import { hasSandboxControlMarker, sandboxTaskMarkerState } from '../sandbox/environment.js';
7
6
  export { resolveSandboxControlTransport } from '../sandbox/environment.js';
8
7
  const descriptor = (dispatcher, command, selector, scope, effect, taskRefSource = scope === 'non-task' ? 'none' : 'argv') => ({ dispatcher, command, selector, scope, effect, taskRefSource, guardBeforeImport: true });
9
8
  function internalTaskRoutes() {
@@ -19,12 +18,6 @@ function internalTaskRoutes() {
19
18
  descriptor('internal', 'sandbox-control', 'client', 'conditional', 'progress', 'delegated'),
20
19
  descriptor('internal', 'agent-client', 'next-steps', 'non-task', 'diagnostic', 'none'),
21
20
  descriptor('internal', 'agent-client', 'model-selection', 'non-task', 'diagnostic', 'none'),
22
- descriptor('internal', 'agent-client', 'launch-carrier', 'non-task', 'diagnostic', 'none'),
23
- descriptor('internal', 'codex-lifecycle', 'preflight', 'non-task', 'diagnostic', 'none'),
24
- descriptor('internal', 'codex-lifecycle', 'hook-event', 'conditional', 'progress'),
25
- descriptor('internal', 'codex-lifecycle', 'resolve-start', 'conditional', 'progress'),
26
- descriptor('internal', 'codex-lifecycle', 'resolve-stop', 'conditional', 'progress'),
27
- descriptor('internal', 'codex-lifecycle', 'consume', 'conditional', 'progress'),
28
21
  descriptor('internal', 'git-workflow', 'inspect', 'conditional', 'diagnostic'),
29
22
  descriptor('internal', 'git-workflow', 'preview-tree', 'conditional', 'diagnostic'),
30
23
  descriptor('internal', 'git-workflow', 'snapshot', 'conditional', 'diagnostic'),
@@ -97,8 +90,6 @@ function internalTaskRoutes() {
97
90
  descriptor('internal', 'task-artifact', 'init', 'task-bound', 'artifact-write'),
98
91
  descriptor('internal', 'task-artifact', 'preflight', 'task-bound', 'artifact-write'),
99
92
  descriptor('internal', 'task-artifact', 'finalize-local', 'task-bound', 'artifact-write'),
100
- descriptor('internal', 'task-orchestration', 'status', 'task-bound', 'diagnostic'),
101
- descriptor('internal', 'task-orchestration', 'progress', 'task-bound', 'progress'),
102
93
  descriptor('internal', 'task-review', 'preflight', 'task-bound', 'artifact-write'),
103
94
  descriptor('internal', 'task-review', 'finalize-summary', 'task-bound', 'progress'),
104
95
  descriptor('internal', 'task-event', 'event', 'task-bound', 'progress'),
@@ -174,11 +165,11 @@ export const TASK_OPERATION_DESCRIPTORS = Object.freeze([
174
165
  ...PUBLIC_OPERATION_DESCRIPTORS
175
166
  ]);
176
167
  export const INTERNAL_DISPATCHER_ROUTES = Object.freeze([
177
- 'task-create', 'task-qualification', 'sandbox-control', 'agent-client', 'codex-lifecycle',
168
+ 'task-create', 'task-qualification', 'sandbox-control', 'agent-client',
178
169
  'git-workflow', 'task-delivery', 'release-workflow', 'platform-release-notes', 'platform-security', 'platform-metadata', 'platform-context',
179
170
  'platform-comment', 'platform-issue', 'platform-pr', 'platform-pr-review', 'pr-review-grade',
180
171
  'platform-checks', 'task-context', 'task-workspace', 'task-ledger', 'task-warning', 'task-activity', 'task-artifact',
181
- 'task-orchestration', 'task-review', 'task-event', 'task-lifecycle',
172
+ 'task-review', 'task-event', 'task-lifecycle',
182
173
  'task-finalization', 'task-platform-recovery', 'task-short-id', 'task-snapshot', 'task-verify', 'task-validate', 'manual-validation'
183
174
  ]);
184
175
  export const PUBLIC_DISPATCHER_ROUTES = Object.freeze([
@@ -228,8 +219,6 @@ export function resolveDelegatedTaskOperation(args) {
228
219
  const [operation, ...rest] = args;
229
220
  if (operation !== 'client' || !rest[0])
230
221
  return null;
231
- if (rest[0] === 'task-orchestration')
232
- return null;
233
222
  return resolveTaskOperation('internal', rest[0], rest.slice(1));
234
223
  }
235
224
  function explicitTaskRefForOperation(dispatcher, command, args, selected) {
@@ -253,8 +242,6 @@ function explicitTaskRefForOperation(dispatcher, command, args, selected) {
253
242
  }
254
243
  return command === 'merge' ? null : first(args) || null;
255
244
  }
256
- if (command === 'codex-lifecycle')
257
- return optionValue(args, '--task-id') ?? null;
258
245
  if (command === 'platform-comment' || command === 'platform-issue') {
259
246
  return first(args) === 'list' ? null : args[1] ?? null;
260
247
  }
@@ -391,7 +378,4 @@ export function guardTaskOperation(dispatcher, command, args = [], options = {})
391
378
  }
392
379
  return { descriptor: selected, taskView };
393
380
  }
394
- export function assertTaskViewStatus(value) {
395
- return parseSandboxTaskView(value);
396
- }
397
381
  //# sourceMappingURL=task-operation-registry.js.map
@@ -2,7 +2,7 @@ import { parseReviewCommand } from '../task/review-command.js';
2
2
  import { finalizeReviewSummary, preflightReviewSummary } from '../task/review-finalization.js';
3
3
  import { resolveTaskRef } from '../task/resolve-ref.js';
4
4
  import { ensureInternalHandlerRoute } from './cli-route-inventory.js';
5
- const USAGE = 'Usage: agent-infra-internal task-review <task-ref> <preflight|finalize-summary> --stage <analysis|plan|code> --artifact <review-*.md> [--orchestrated] [--dry-run]\n';
5
+ const USAGE = 'Usage: agent-infra-internal task-review <task-ref> <preflight|finalize-summary> --stage <analysis|plan|code> --artifact <review-*.md> [--dry-run]\n';
6
6
  function failUsage(message) {
7
7
  process.stdout.write(`${JSON.stringify({
8
8
  status: 'failed',
@@ -28,7 +28,7 @@ async function taskReview(args = []) {
28
28
  failUsage(error instanceof Error ? error.message : String(error));
29
29
  return;
30
30
  }
31
- const { stage, artifact, dryRun, orchestrated } = request;
31
+ const { stage, artifact, dryRun } = request;
32
32
  const operation = args[1];
33
33
  const resolved = resolveTaskRef(args[0]);
34
34
  if (!resolved.ok) {
@@ -36,8 +36,8 @@ async function taskReview(args = []) {
36
36
  return;
37
37
  }
38
38
  const result = operation === 'preflight'
39
- ? preflightReviewSummary({ taskRef: args[0], stage, artifact, orchestrated, dryRun })
40
- : finalizeReviewSummary({ taskRef: args[0], stage, artifact, orchestrated, dryRun });
39
+ ? preflightReviewSummary({ taskRef: args[0], stage, artifact, dryRun })
40
+ : finalizeReviewSummary({ taskRef: args[0], stage, artifact, dryRun });
41
41
  process.stdout.write(`${JSON.stringify(result)}\n`);
42
42
  if (result.status === 'failed')
43
43
  process.exitCode = 1;
@@ -75,12 +75,6 @@ function escapeHtml(value) {
75
75
  function escapeHtmlText(value) {
76
76
  return escapeHtml(value);
77
77
  }
78
- function escapeHtmlAttribute(value) {
79
- return escapeHtml(value);
80
- }
81
- function escapeMarkdownLiteral(value) {
82
- return value.replace(/[\\`*_{}\[\]()#+.!|<>-]/g, '\\$&');
83
- }
84
78
  function markerSafe(value, markers) {
85
79
  let result = value;
86
80
  for (const marker of markers) {
@@ -231,5 +225,5 @@ function splitDocumentPlaceholder(value, placeholder) {
231
225
  }
232
226
  return ok({ prefix: source.slice(0, position), suffix: source.slice(position + placeholder.length) });
233
227
  }
234
- export { CONTROL_MARKER_PATTERN, escapeHtmlAttribute, escapeHtmlText, escapeMarkdownLiteral, fenceRanges, renderSafeCodeFence, canonicalizeCommentBody, canonicalizeSummaryBody, sanitizeMarkdownDocument, splitDocumentPlaceholder };
228
+ export { CONTROL_MARKER_PATTERN, escapeHtmlText, fenceRanges, renderSafeCodeFence, canonicalizeCommentBody, canonicalizeSummaryBody, sanitizeMarkdownDocument, splitDocumentPlaceholder };
235
229
  //# sourceMappingURL=comment-safety.js.map
@@ -129,16 +129,6 @@ function flattenPages(value) {
129
129
  return [];
130
130
  return value.flatMap((page) => Array.isArray(page) ? page : [page]);
131
131
  }
132
- function extractRepositoryLabelNames(value) {
133
- return flattenPages(value).flatMap((entry) => {
134
- if (typeof entry === 'string')
135
- return [entry];
136
- if (entry && typeof entry === 'object' && typeof entry.name === 'string') {
137
- return [entry.name];
138
- }
139
- return [];
140
- }).filter(Boolean).sort();
141
- }
142
132
  function extractPullRequestFileNames(value) {
143
133
  const entries = flattenPages(value);
144
134
  if (!Array.isArray(value) || entries.some((entry) => !entry || typeof entry !== 'object'))
@@ -148,8 +138,5 @@ function extractPullRequestFileNames(value) {
148
138
  return null;
149
139
  return [...new Set(names)].sort();
150
140
  }
151
- function resourceSnapshot(kind, number, labels) {
152
- return { kind, number, labels: [...labels].sort() };
153
- }
154
- export { extractPullRequestFileNames, extractRepositoryLabelNames, flattenPages, inLabels, inLabelMappingDigest, labelDelta, mergeInLabels, planInLabelUpdate, resourceSnapshot, syncLabelDelta, validateInLabelMapping, validateRepositoryLabelPayload };
141
+ export { extractPullRequestFileNames, flattenPages, inLabels, inLabelMappingDigest, labelDelta, mergeInLabels, planInLabelUpdate, syncLabelDelta, validateInLabelMapping, validateRepositoryLabelPayload };
155
142
  //# sourceMappingURL=in-label-sync.js.map
@@ -101,9 +101,6 @@ function renderTaskCommentResult(content, taskId, language = '') {
101
101
  function renderTaskComment(content, taskId, _agent, language = '') {
102
102
  return renderTaskCommentResult(content, taskId, language).body;
103
103
  }
104
- function isTaskCommentTooLarge(content, taskId = 'TASK-UNKNOWN', _agent = 'codex') {
105
- return renderTaskCommentResult(content, taskId).byteLength > COMMENT_BYTE_LIMIT;
106
- }
107
104
  function taskCommentLanguage(repoRoot) {
108
105
  try {
109
106
  const config = JSON.parse(fs.readFileSync(path.join(repoRoot, '.agents', '.airc.json'), 'utf8'));
@@ -301,18 +298,6 @@ function chunkArtifactComment(input) {
301
298
  function findMarkerComments(comments, marker) {
302
299
  return comments.filter((comment) => normalizeCommentContent(String(comment.body || '')).split('\n', 1)[0] === marker);
303
300
  }
304
- function flattenComments(value) {
305
- if (!Array.isArray(value))
306
- return [];
307
- const flattened = value.flatMap((entry) => Array.isArray(entry) ? entry : [entry]);
308
- return flattened.filter((entry) => Boolean(entry && typeof entry === 'object' && (typeof entry.id === 'number' || typeof entry.id === 'string') && typeof entry.body === 'string'));
309
- }
310
- function listRemoteComments(client, repo, issue, cwd) {
311
- const result = client.json([
312
- 'api', '--paginate', '--slurp', `repos/${repo}/issues/${issue}/comments?per_page=100`
313
- ], { cwd });
314
- return result.ok ? { ok: true, value: flattenComments(result.value) } : result;
315
- }
316
301
  function contextFields(context) {
317
302
  return {
318
303
  platform: context.platform,
@@ -872,5 +857,5 @@ async function checkPlatformCommentOwner(taskRef, options = {}) {
872
857
  }
873
858
  return platformResult('no-op', { ...contextFields(context), resource: { kind: 'issue', number: resourceIdentityNumber(issueIdentity), identity: issueIdentity }, error: null });
874
859
  }
875
- export { COMMENT_BYTE_LIMIT, MARKERS, chunkArtifactComment, inspectPlatformCommentOperation, findMarkerComments, listRemoteComments, checkPlatformCommentOwner, listPlatformComments, normalizeCommentContent, renderTaskComment, renderTaskCommentResult, syncCommentPlan, isTaskCommentTooLarge, syncPlatformComment, validateRelatedMarkerSet };
860
+ export { COMMENT_BYTE_LIMIT, MARKERS, chunkArtifactComment, inspectPlatformCommentOperation, findMarkerComments, checkPlatformCommentOwner, listPlatformComments, normalizeCommentContent, renderTaskComment, renderTaskCommentResult, syncCommentPlan, syncPlatformComment, validateRelatedMarkerSet };
876
861
  //# sourceMappingURL=issue-comments.js.map
@@ -11,7 +11,7 @@ import { writeTask } from '../task/write.js';
11
11
  import { resolvePlatformProviderContext } from './context.js';
12
12
  import { DEFAULT_REQUIREMENT_SECTION_ANCHORS, chooseMilestone, desiredIssueType, normalizeOption, planIssueMetadata } from './issue-metadata.js';
13
13
  import { platformResult } from './types.js';
14
- import { labelDelta, inLabelMappingDigest, planInLabelUpdate, syncLabelDelta, validateInLabelMapping, validateRepositoryLabelPayload } from './in-label-sync.js';
14
+ import { labelDelta, inLabelMappingDigest, planInLabelUpdate, validateInLabelMapping, } from './in-label-sync.js';
15
15
  import { providerError, providerOperationContext, providerStatus, providerResourceIdentity, providerResourceToken, unsupportedProviderOperation } from './provider-bridge.js';
16
16
  import { resourceIdentityEquals, resourceIdentityNumber, resourceIdentityString, serializeResourceIdentity } from './resource-identity.js';
17
17
  import { taskIssueIdentity, taskIssueIdentityError } from './task-identities.js';
@@ -14,7 +14,8 @@ async function coordinatePlatformWrite(input) {
14
14
  retryable: true
15
15
  });
16
16
  }
17
- const selection = input.operation.kind === 'issue-metadata' && input.operation.issueMetadata?.state === 'closed'
17
+ const boundedPr = input.operation.kind === 'pull-request' && input.operation.dependency === 'required';
18
+ const selection = boundedPr || input.operation.kind === 'issue-metadata' && input.operation.issueMetadata?.state === 'closed'
18
19
  ? 'all' : input.operation.dependency;
19
20
  const drained = input.drain
20
21
  ? await input.drain(input.operation.taskRef, operationId, input.agent, input.operation.cwd)
@@ -22,7 +23,8 @@ async function coordinatePlatformWrite(input) {
22
23
  agent: input.agent,
23
24
  client: input.client,
24
25
  cwd: input.operation.cwd,
25
- excludeId: operationId
26
+ excludeId: operationId,
27
+ ...(boundedPr ? { beforeId: operationId } : {})
26
28
  });
27
29
  if (drained.status !== 'applied' && drained.status !== 'no-op') {
28
30
  return input.block(drained.error ? { ...drained.error, retryable: true } : {
@@ -435,9 +435,6 @@ function buildPrChangeReport(identity, taskIntentSha256, mechanical, candidate)
435
435
  precheck
436
436
  });
437
437
  }
438
- function reportFilePath(taskDir) {
439
- return path.join(taskDir, REPORT_FILE_NAME);
440
- }
441
438
  function readPrChangeReport(file) {
442
439
  try {
443
440
  const stat = fs.lstatSync(file);
@@ -698,5 +695,5 @@ function replaceCanonicalReportPlaceholder(body, report) {
698
695
  return invalid('summary contains a reserved control marker', 'PR_SUMMARY_RENDER_INVALID');
699
696
  return { ok: true, value };
700
697
  }
701
- export { CANONICAL_REPORT_HEADING, CANONICAL_REPORT_PLACEHOLDER, PRECHECK_IDS, REPORT_FILE_NAME, REPORT_VERSION, buildPrChangeReport, readPrChangeReport, renderCanonicalChangeReport, replaceCanonicalReportPlaceholder, reportFilePath, runMechanicalChangeReport, taskIntentDigest, taskIntentProjection, validateMechanicalReport, validatePrecheckCandidate, validatePrChangeReport, writePrChangeReportAtomic };
698
+ export { CANONICAL_REPORT_HEADING, CANONICAL_REPORT_PLACEHOLDER, PRECHECK_IDS, REPORT_FILE_NAME, REPORT_VERSION, buildPrChangeReport, readPrChangeReport, renderCanonicalChangeReport, replaceCanonicalReportPlaceholder, runMechanicalChangeReport, taskIntentDigest, taskIntentProjection, validateMechanicalReport, validatePrecheckCandidate, validatePrChangeReport, writePrChangeReportAtomic };
702
699
  //# sourceMappingURL=pr-change-report.js.map
@@ -6,7 +6,7 @@ import { resolvePlatformProviderContext } from './context.js';
6
6
  import { inspectPlatformPullRequest } from './pull-requests.js';
7
7
  import { platformResult } from './types.js';
8
8
  import { readPrDeliveryFact } from '../task/pr-delivery-fact.js';
9
- import { providerError, providerOperationContext, providerStatus, resourceIdentity, resourceIdentityNumber, unsupportedProviderOperation } from './provider-bridge.js';
9
+ import { providerError, providerOperationContext, providerStatus, resourceIdentityNumber, unsupportedProviderOperation } from './provider-bridge.js';
10
10
  function classifyRequiredChecks(required) {
11
11
  if (required.length === 0)
12
12
  return { state: 'no-required', required };
@@ -27,12 +27,6 @@ function classifyPullRequestReadiness(input) {
27
27
  return { state: 'pending', headSha: input.headSha };
28
28
  return { state: 'ready', headSha: input.headSha };
29
29
  }
30
- function resolveRunCandidate(candidates, headSha, checkName) {
31
- const matches = candidates.filter((candidate) => candidate.headSha === headSha && candidate.name === checkName);
32
- if (matches.length === 1)
33
- return { status: 'resolved', runId: matches[0].id, jobId: matches[0].jobId || null };
34
- return { status: matches.length === 0 ? 'missing' : 'ambiguous', runId: null, jobId: null };
35
- }
36
30
  function checksResult(status, overrides = {}) {
37
31
  return {
38
32
  ...platformResult(status),
@@ -228,5 +222,5 @@ async function fetchPlatformCheckLogs(taskRef, options) {
228
222
  });
229
223
  }
230
224
  }
231
- export { classifyPullRequestReadiness, classifyRequiredChecks, fetchPlatformCheckLogs, inspectRequiredChecks, inspectPullRequestReadiness, resolvePlatformCheckRun, resolveRunCandidate, watchPullRequestReadiness };
225
+ export { classifyPullRequestReadiness, classifyRequiredChecks, fetchPlatformCheckLogs, inspectRequiredChecks, inspectPullRequestReadiness, resolvePlatformCheckRun, watchPullRequestReadiness };
232
226
  //# sourceMappingURL=pr-checks.js.map
@@ -290,15 +290,6 @@ function validateSecurityAlert(value) {
290
290
  data: jsonValue(item.data, 'security alert.data')
291
291
  };
292
292
  }
293
- function validateLabelDefinition(value, label) {
294
- const item = record(value, label);
295
- exactKeys(item, ['name', 'color', 'description'], label);
296
- return {
297
- name: stringValue(item.name, `${label}.name`),
298
- color: stringValue(item.color, `${label}.color`),
299
- description: stringValue(item.description, `${label}.description`, true)
300
- };
301
- }
302
293
  function validateLabelReconciliation(value) {
303
294
  const item = record(value, 'label reconciliation');
304
295
  exactKeys(item, ['changed', 'created', 'updated', 'removed', 'skipped'], 'label reconciliation');
@@ -311,17 +302,6 @@ function validateLabelReconciliation(value) {
311
302
  skipped: names('skipped')
312
303
  };
313
304
  }
314
- function validateMilestoneDefinition(value, label) {
315
- const item = record(value, label);
316
- exactKeys(item, ['title', 'description', 'state'], label);
317
- if (item.state !== 'open' && item.state !== 'closed')
318
- throw new Error(`${label}.state is invalid`);
319
- return {
320
- title: stringValue(item.title, `${label}.title`),
321
- description: stringValue(item.description, `${label}.description`, true),
322
- state: item.state
323
- };
324
- }
325
305
  function validateMilestoneInitialization(value) {
326
306
  const item = record(value, 'milestone initialization');
327
307
  exactKeys(item, ['changed', 'created', 'skipped'], 'milestone initialization');