codex-orchestrator 0.1.51 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +45 -389
- package/dist/src/index.d.ts +16 -46
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -24
- package/dist/src/index.js.map +1 -1
- package/dist/src/v2/acceptance-proof.d.ts +111 -0
- package/dist/src/v2/acceptance-proof.d.ts.map +1 -0
- package/dist/src/v2/acceptance-proof.js +427 -0
- package/dist/src/v2/acceptance-proof.js.map +1 -0
- package/dist/src/v2/adapters/command.d.ts.map +1 -0
- package/dist/src/v2/adapters/command.js.map +1 -0
- package/dist/src/v2/adapters/durable-atomic-file.d.ts.map +1 -0
- package/dist/src/v2/adapters/durable-atomic-file.js.map +1 -0
- package/dist/src/v2/adapters/gh-cli.d.ts.map +1 -0
- package/dist/src/v2/adapters/gh-cli.js.map +1 -0
- package/dist/src/v2/adapters/gh-issue-adapter.d.ts.map +1 -0
- package/dist/src/v2/adapters/gh-issue-adapter.js.map +1 -0
- package/dist/src/v2/adapters/gh-pull-request-adapter.d.ts.map +1 -0
- package/dist/src/v2/adapters/gh-pull-request-adapter.js.map +1 -0
- package/dist/src/v2/adapters/issues.d.ts.map +1 -0
- package/dist/src/v2/adapters/issues.js.map +1 -0
- package/dist/src/v2/adapters/mission-coordinator-lock.d.ts.map +1 -0
- package/dist/src/v2/adapters/mission-coordinator-lock.js.map +1 -0
- package/dist/src/v2/adapters/path-policy.d.ts.map +1 -0
- package/dist/src/v2/adapters/path-policy.js.map +1 -0
- package/dist/src/v2/adapters/pull-requests.d.ts.map +1 -0
- package/dist/src/v2/adapters/pull-requests.js.map +1 -0
- package/dist/src/v2/adapters/target-activity-fence.d.ts.map +1 -0
- package/dist/src/{runner → v2/adapters}/target-activity-fence.js +1 -1
- package/dist/src/v2/adapters/target-activity-fence.js.map +1 -0
- package/dist/src/{git → v2/adapters}/worktree.d.ts +1 -1
- package/dist/src/v2/adapters/worktree.d.ts.map +1 -0
- package/dist/src/{git → v2/adapters}/worktree.js +2 -2
- package/dist/src/v2/adapters/worktree.js.map +1 -0
- package/dist/src/v2/atomic-store.d.ts +36 -0
- package/dist/src/v2/atomic-store.d.ts.map +1 -0
- package/dist/src/v2/atomic-store.js +328 -0
- package/dist/src/v2/atomic-store.js.map +1 -0
- package/dist/src/v2/candidate-cli.d.ts +22 -0
- package/dist/src/v2/candidate-cli.d.ts.map +1 -0
- package/dist/src/v2/candidate-cli.js +161 -0
- package/dist/src/v2/candidate-cli.js.map +1 -0
- package/dist/src/v2/checked-change.d.ts +49 -0
- package/dist/src/v2/checked-change.d.ts.map +1 -0
- package/dist/src/v2/checked-change.js +139 -0
- package/dist/src/v2/checked-change.js.map +1 -0
- package/dist/src/v2/cli-contract.d.ts +8 -0
- package/dist/src/v2/cli-contract.d.ts.map +1 -0
- package/dist/src/v2/cli-contract.js +32 -0
- package/dist/src/v2/cli-contract.js.map +1 -0
- package/dist/src/v2/codex-process.d.ts +71 -0
- package/dist/src/v2/codex-process.d.ts.map +1 -0
- package/dist/src/v2/codex-process.js +404 -0
- package/dist/src/v2/codex-process.js.map +1 -0
- package/dist/src/v2/config.d.ts +45 -0
- package/dist/src/v2/config.d.ts.map +1 -0
- package/dist/src/v2/config.js +139 -0
- package/dist/src/v2/config.js.map +1 -0
- package/dist/src/v2/containment.d.ts +55 -0
- package/dist/src/v2/containment.d.ts.map +1 -0
- package/dist/src/v2/containment.js +370 -0
- package/dist/src/v2/containment.js.map +1 -0
- package/dist/src/v2/implementation-report.d.ts +18 -0
- package/dist/src/v2/implementation-report.d.ts.map +1 -0
- package/dist/src/v2/implementation-report.js +147 -0
- package/dist/src/v2/implementation-report.js.map +1 -0
- package/dist/src/v2/legacy-cutover.d.ts +52 -0
- package/dist/src/v2/legacy-cutover.d.ts.map +1 -0
- package/dist/src/v2/legacy-cutover.js +87 -0
- package/dist/src/v2/legacy-cutover.js.map +1 -0
- package/dist/src/v2/mobile-lease.d.ts +97 -0
- package/dist/src/v2/mobile-lease.d.ts.map +1 -0
- package/dist/src/v2/mobile-lease.js +253 -0
- package/dist/src/v2/mobile-lease.js.map +1 -0
- package/dist/src/v2/proof-report.d.ts +118 -0
- package/dist/src/v2/proof-report.d.ts.map +1 -0
- package/dist/src/v2/proof-report.js +703 -0
- package/dist/src/v2/proof-report.js.map +1 -0
- package/dist/src/v2/proof-store.d.ts +42 -0
- package/dist/src/v2/proof-store.d.ts.map +1 -0
- package/dist/src/v2/proof-store.js +180 -0
- package/dist/src/v2/proof-store.js.map +1 -0
- package/dist/src/v2/report-envelope.d.ts +4 -0
- package/dist/src/v2/report-envelope.d.ts.map +1 -0
- package/dist/src/v2/report-envelope.js +46 -0
- package/dist/src/v2/report-envelope.js.map +1 -0
- package/dist/src/v2/run-issue.d.ts +213 -0
- package/dist/src/v2/run-issue.d.ts.map +1 -0
- package/dist/src/v2/run-issue.js +906 -0
- package/dist/src/v2/run-issue.js.map +1 -0
- package/dist/src/v2/run-store.d.ts +136 -0
- package/dist/src/v2/run-store.d.ts.map +1 -0
- package/dist/src/v2/run-store.js +346 -0
- package/dist/src/v2/run-store.js.map +1 -0
- package/dist/src/v2/runtime-assets.d.ts +31 -0
- package/dist/src/v2/runtime-assets.d.ts.map +1 -0
- package/dist/src/v2/runtime-assets.js +473 -0
- package/dist/src/v2/runtime-assets.js.map +1 -0
- package/dist/src/v2/runtime.d.ts +137 -0
- package/dist/src/v2/runtime.d.ts.map +1 -0
- package/dist/src/v2/runtime.js +847 -0
- package/dist/src/v2/runtime.js.map +1 -0
- package/dist/src/v2/setup-cli.d.ts +5 -0
- package/dist/src/v2/setup-cli.d.ts.map +1 -0
- package/dist/src/v2/setup-cli.js +83 -0
- package/dist/src/v2/setup-cli.js.map +1 -0
- package/dist/src/v2/setup-runtime.d.ts +6 -0
- package/dist/src/v2/setup-runtime.d.ts.map +1 -0
- package/dist/src/v2/setup-runtime.js +213 -0
- package/dist/src/v2/setup-runtime.js.map +1 -0
- package/dist/src/v2/setup-store.d.ts +19 -0
- package/dist/src/v2/setup-store.d.ts.map +1 -0
- package/dist/src/v2/setup-store.js +208 -0
- package/dist/src/v2/setup-store.js.map +1 -0
- package/dist/src/v2/setup.d.ts +147 -0
- package/dist/src/v2/setup.d.ts.map +1 -0
- package/dist/src/v2/setup.js +529 -0
- package/dist/src/v2/setup.js.map +1 -0
- package/docs/deep-dive.md +54 -803
- package/internal-skills/acceptance-proof/SKILL.md +14 -0
- package/internal-skills/acceptance-proof/references/android.md +14 -0
- package/internal-skills/acceptance-proof/references/browser.md +13 -0
- package/internal-skills/acceptance-proof/references/ios.md +14 -0
- package/internal-skills/acceptance-proof/tools/android-lease.mjs +280 -0
- package/internal-skills/acceptance-proof/tools/ios-lease.mjs +288 -0
- package/internal-skills/agent-auto/SKILL.md +14 -0
- package/package.json +11 -18
- package/bridge-runtime.json +0 -2719
- package/dist/src/bridge-runtime.d.ts +0 -17
- package/dist/src/bridge-runtime.d.ts.map +0 -1
- package/dist/src/bridge-runtime.js +0 -170
- package/dist/src/bridge-runtime.js.map +0 -1
- package/dist/src/cli.d.ts +0 -3
- package/dist/src/cli.d.ts.map +0 -1
- package/dist/src/cli.js +0 -569
- package/dist/src/cli.js.map +0 -1
- package/dist/src/codex/command-adapter.d.ts +0 -47
- package/dist/src/codex/command-adapter.d.ts.map +0 -1
- package/dist/src/codex/command-adapter.js +0 -169
- package/dist/src/codex/command-adapter.js.map +0 -1
- package/dist/src/codex/mobile-device-guard.d.ts +0 -7
- package/dist/src/codex/mobile-device-guard.d.ts.map +0 -1
- package/dist/src/codex/mobile-device-guard.js +0 -63
- package/dist/src/codex/mobile-device-guard.js.map +0 -1
- package/dist/src/config/constants.d.ts +0 -6
- package/dist/src/config/constants.d.ts.map +0 -1
- package/dist/src/config/constants.js +0 -19
- package/dist/src/config/constants.js.map +0 -1
- package/dist/src/config/schema.d.ts +0 -234
- package/dist/src/config/schema.d.ts.map +0 -1
- package/dist/src/config/schema.js +0 -673
- package/dist/src/config/schema.js.map +0 -1
- package/dist/src/fs/durable-atomic-file.d.ts.map +0 -1
- package/dist/src/fs/durable-atomic-file.js.map +0 -1
- package/dist/src/git/base-branch.d.ts +0 -26
- package/dist/src/git/base-branch.d.ts.map +0 -1
- package/dist/src/git/base-branch.js +0 -45
- package/dist/src/git/base-branch.js.map +0 -1
- package/dist/src/git/worktree.d.ts.map +0 -1
- package/dist/src/git/worktree.js.map +0 -1
- package/dist/src/github/gh-cli.d.ts.map +0 -1
- package/dist/src/github/gh-cli.js.map +0 -1
- package/dist/src/github/gh-issue-adapter.d.ts.map +0 -1
- package/dist/src/github/gh-issue-adapter.js.map +0 -1
- package/dist/src/github/gh-pull-request-adapter.d.ts.map +0 -1
- package/dist/src/github/gh-pull-request-adapter.js.map +0 -1
- package/dist/src/github/issues.d.ts.map +0 -1
- package/dist/src/github/issues.js.map +0 -1
- package/dist/src/github/pull-requests.d.ts.map +0 -1
- package/dist/src/github/pull-requests.js.map +0 -1
- package/dist/src/package-info.d.ts +0 -6
- package/dist/src/package-info.d.ts.map +0 -1
- package/dist/src/package-info.js +0 -13
- package/dist/src/package-info.js.map +0 -1
- package/dist/src/path-policy.d.ts.map +0 -1
- package/dist/src/path-policy.js.map +0 -1
- package/dist/src/process/command.d.ts.map +0 -1
- package/dist/src/process/command.js.map +0 -1
- package/dist/src/review-handoff.d.ts +0 -3
- package/dist/src/review-handoff.d.ts.map +0 -1
- package/dist/src/review-handoff.js +0 -8
- package/dist/src/review-handoff.js.map +0 -1
- package/dist/src/runner/acceptance-proof-loop.d.ts +0 -97
- package/dist/src/runner/acceptance-proof-loop.d.ts.map +0 -1
- package/dist/src/runner/acceptance-proof-loop.js +0 -404
- package/dist/src/runner/acceptance-proof-loop.js.map +0 -1
- package/dist/src/runner/acceptance-proof-runner.d.ts +0 -24
- package/dist/src/runner/acceptance-proof-runner.d.ts.map +0 -1
- package/dist/src/runner/acceptance-proof-runner.js +0 -121
- package/dist/src/runner/acceptance-proof-runner.js.map +0 -1
- package/dist/src/runner/acceptance-proof.d.ts +0 -189
- package/dist/src/runner/acceptance-proof.d.ts.map +0 -1
- package/dist/src/runner/acceptance-proof.js +0 -594
- package/dist/src/runner/acceptance-proof.js.map +0 -1
- package/dist/src/runner/agent-attempt.d.ts +0 -105
- package/dist/src/runner/agent-attempt.d.ts.map +0 -1
- package/dist/src/runner/agent-attempt.js +0 -245
- package/dist/src/runner/agent-attempt.js.map +0 -1
- package/dist/src/runner/android-visual-proof-command.d.ts +0 -26
- package/dist/src/runner/android-visual-proof-command.d.ts.map +0 -1
- package/dist/src/runner/android-visual-proof-command.js +0 -592
- package/dist/src/runner/android-visual-proof-command.js.map +0 -1
- package/dist/src/runner/auto-visual-proof-command.d.ts +0 -15
- package/dist/src/runner/auto-visual-proof-command.d.ts.map +0 -1
- package/dist/src/runner/auto-visual-proof-command.js +0 -64
- package/dist/src/runner/auto-visual-proof-command.js.map +0 -1
- package/dist/src/runner/browser-proof-contract.d.ts +0 -134
- package/dist/src/runner/browser-proof-contract.d.ts.map +0 -1
- package/dist/src/runner/browser-proof-contract.js +0 -400
- package/dist/src/runner/browser-proof-contract.js.map +0 -1
- package/dist/src/runner/browser-visual-proof-command.d.ts +0 -101
- package/dist/src/runner/browser-visual-proof-command.d.ts.map +0 -1
- package/dist/src/runner/browser-visual-proof-command.js +0 -532
- package/dist/src/runner/browser-visual-proof-command.js.map +0 -1
- package/dist/src/runner/command-utils.d.ts +0 -15
- package/dist/src/runner/command-utils.d.ts.map +0 -1
- package/dist/src/runner/command-utils.js +0 -228
- package/dist/src/runner/command-utils.js.map +0 -1
- package/dist/src/runner/completion-report.d.ts +0 -121
- package/dist/src/runner/completion-report.d.ts.map +0 -1
- package/dist/src/runner/completion-report.js +0 -381
- package/dist/src/runner/completion-report.js.map +0 -1
- package/dist/src/runner/context-snapshot.d.ts +0 -33
- package/dist/src/runner/context-snapshot.d.ts.map +0 -1
- package/dist/src/runner/context-snapshot.js +0 -99
- package/dist/src/runner/context-snapshot.js.map +0 -1
- package/dist/src/runner/daemon-command.d.ts +0 -30
- package/dist/src/runner/daemon-command.d.ts.map +0 -1
- package/dist/src/runner/daemon-command.js +0 -262
- package/dist/src/runner/daemon-command.js.map +0 -1
- package/dist/src/runner/doctor-command.d.ts +0 -41
- package/dist/src/runner/doctor-command.d.ts.map +0 -1
- package/dist/src/runner/doctor-command.js +0 -177
- package/dist/src/runner/doctor-command.js.map +0 -1
- package/dist/src/runner/durable-run-summary.d.ts +0 -80
- package/dist/src/runner/durable-run-summary.d.ts.map +0 -1
- package/dist/src/runner/durable-run-summary.js +0 -200
- package/dist/src/runner/durable-run-summary.js.map +0 -1
- package/dist/src/runner/flutter-sdk-discovery.d.ts +0 -5
- package/dist/src/runner/flutter-sdk-discovery.d.ts.map +0 -1
- package/dist/src/runner/flutter-sdk-discovery.js +0 -103
- package/dist/src/runner/flutter-sdk-discovery.js.map +0 -1
- package/dist/src/runner/fresh-context-review.d.ts +0 -22
- package/dist/src/runner/fresh-context-review.d.ts.map +0 -1
- package/dist/src/runner/fresh-context-review.js +0 -177
- package/dist/src/runner/fresh-context-review.js.map +0 -1
- package/dist/src/runner/handoff-evidence.d.ts +0 -141
- package/dist/src/runner/handoff-evidence.d.ts.map +0 -1
- package/dist/src/runner/handoff-evidence.js +0 -543
- package/dist/src/runner/handoff-evidence.js.map +0 -1
- package/dist/src/runner/hygiene-cleanup.d.ts +0 -15
- package/dist/src/runner/hygiene-cleanup.d.ts.map +0 -1
- package/dist/src/runner/hygiene-cleanup.js +0 -25
- package/dist/src/runner/hygiene-cleanup.js.map +0 -1
- package/dist/src/runner/ios-visual-proof-command.d.ts +0 -25
- package/dist/src/runner/ios-visual-proof-command.d.ts.map +0 -1
- package/dist/src/runner/ios-visual-proof-command.js +0 -353
- package/dist/src/runner/ios-visual-proof-command.js.map +0 -1
- package/dist/src/runner/issue-state-machine.d.ts +0 -39
- package/dist/src/runner/issue-state-machine.d.ts.map +0 -1
- package/dist/src/runner/issue-state-machine.js +0 -124
- package/dist/src/runner/issue-state-machine.js.map +0 -1
- package/dist/src/runner/issue-tree.d.ts +0 -65
- package/dist/src/runner/issue-tree.d.ts.map +0 -1
- package/dist/src/runner/issue-tree.js +0 -474
- package/dist/src/runner/issue-tree.js.map +0 -1
- package/dist/src/runner/lifecycle-events.d.ts +0 -44
- package/dist/src/runner/lifecycle-events.d.ts.map +0 -1
- package/dist/src/runner/lifecycle-events.js +0 -108
- package/dist/src/runner/lifecycle-events.js.map +0 -1
- package/dist/src/runner/local-execution-session.d.ts +0 -112
- package/dist/src/runner/local-execution-session.d.ts.map +0 -1
- package/dist/src/runner/local-execution-session.js +0 -1064
- package/dist/src/runner/local-execution-session.js.map +0 -1
- package/dist/src/runner/local-state.d.ts +0 -44
- package/dist/src/runner/local-state.d.ts.map +0 -1
- package/dist/src/runner/local-state.js +0 -150
- package/dist/src/runner/local-state.js.map +0 -1
- package/dist/src/runner/mission-activation.d.ts +0 -29
- package/dist/src/runner/mission-activation.d.ts.map +0 -1
- package/dist/src/runner/mission-activation.js +0 -54
- package/dist/src/runner/mission-activation.js.map +0 -1
- package/dist/src/runner/mission-agent-broker.d.ts +0 -53
- package/dist/src/runner/mission-agent-broker.d.ts.map +0 -1
- package/dist/src/runner/mission-agent-broker.js +0 -182
- package/dist/src/runner/mission-agent-broker.js.map +0 -1
- package/dist/src/runner/mission-cancellation.d.ts +0 -77
- package/dist/src/runner/mission-cancellation.d.ts.map +0 -1
- package/dist/src/runner/mission-cancellation.js +0 -180
- package/dist/src/runner/mission-cancellation.js.map +0 -1
- package/dist/src/runner/mission-canonical-path.d.ts +0 -34
- package/dist/src/runner/mission-canonical-path.d.ts.map +0 -1
- package/dist/src/runner/mission-canonical-path.js +0 -121
- package/dist/src/runner/mission-canonical-path.js.map +0 -1
- package/dist/src/runner/mission-capability-kernel.d.ts +0 -34
- package/dist/src/runner/mission-capability-kernel.d.ts.map +0 -1
- package/dist/src/runner/mission-capability-kernel.js +0 -158
- package/dist/src/runner/mission-capability-kernel.js.map +0 -1
- package/dist/src/runner/mission-check-policy.d.ts +0 -17
- package/dist/src/runner/mission-check-policy.d.ts.map +0 -1
- package/dist/src/runner/mission-check-policy.js +0 -31
- package/dist/src/runner/mission-check-policy.js.map +0 -1
- package/dist/src/runner/mission-coordinator-lock.d.ts.map +0 -1
- package/dist/src/runner/mission-coordinator-lock.js.map +0 -1
- package/dist/src/runner/mission-deployment.d.ts +0 -21
- package/dist/src/runner/mission-deployment.d.ts.map +0 -1
- package/dist/src/runner/mission-deployment.js +0 -108
- package/dist/src/runner/mission-deployment.js.map +0 -1
- package/dist/src/runner/mission-evaluation.d.ts +0 -61
- package/dist/src/runner/mission-evaluation.d.ts.map +0 -1
- package/dist/src/runner/mission-evaluation.js +0 -183
- package/dist/src/runner/mission-evaluation.js.map +0 -1
- package/dist/src/runner/mission-executor-probe.d.ts +0 -10
- package/dist/src/runner/mission-executor-probe.d.ts.map +0 -1
- package/dist/src/runner/mission-executor-probe.js +0 -180
- package/dist/src/runner/mission-executor-probe.js.map +0 -1
- package/dist/src/runner/mission-git-contracts.d.ts +0 -75
- package/dist/src/runner/mission-git-contracts.d.ts.map +0 -1
- package/dist/src/runner/mission-git-contracts.js +0 -201
- package/dist/src/runner/mission-git-contracts.js.map +0 -1
- package/dist/src/runner/mission-git-runtime-owner-ref.d.ts +0 -13
- package/dist/src/runner/mission-git-runtime-owner-ref.d.ts.map +0 -1
- package/dist/src/runner/mission-git-runtime-owner-ref.js +0 -111
- package/dist/src/runner/mission-git-runtime-owner-ref.js.map +0 -1
- package/dist/src/runner/mission-git-transaction.d.ts +0 -97
- package/dist/src/runner/mission-git-transaction.d.ts.map +0 -1
- package/dist/src/runner/mission-git-transaction.js +0 -1009
- package/dist/src/runner/mission-git-transaction.js.map +0 -1
- package/dist/src/runner/mission-identifiers.d.ts +0 -31
- package/dist/src/runner/mission-identifiers.d.ts.map +0 -1
- package/dist/src/runner/mission-identifiers.js +0 -75
- package/dist/src/runner/mission-identifiers.js.map +0 -1
- package/dist/src/runner/mission-input-snapshot.d.ts +0 -21
- package/dist/src/runner/mission-input-snapshot.d.ts.map +0 -1
- package/dist/src/runner/mission-input-snapshot.js +0 -63
- package/dist/src/runner/mission-input-snapshot.js.map +0 -1
- package/dist/src/runner/mission-ownership.d.ts +0 -38
- package/dist/src/runner/mission-ownership.d.ts.map +0 -1
- package/dist/src/runner/mission-ownership.js +0 -88
- package/dist/src/runner/mission-ownership.js.map +0 -1
- package/dist/src/runner/mission-patch-audit.d.ts +0 -21
- package/dist/src/runner/mission-patch-audit.d.ts.map +0 -1
- package/dist/src/runner/mission-patch-audit.js +0 -186
- package/dist/src/runner/mission-patch-audit.js.map +0 -1
- package/dist/src/runner/mission-path-language.d.ts +0 -6
- package/dist/src/runner/mission-path-language.d.ts.map +0 -1
- package/dist/src/runner/mission-path-language.js +0 -106
- package/dist/src/runner/mission-path-language.js.map +0 -1
- package/dist/src/runner/mission-permit-authority.d.ts +0 -26
- package/dist/src/runner/mission-permit-authority.d.ts.map +0 -1
- package/dist/src/runner/mission-permit-authority.js +0 -145
- package/dist/src/runner/mission-permit-authority.js.map +0 -1
- package/dist/src/runner/mission-plan-parent-coordinator.d.ts +0 -87
- package/dist/src/runner/mission-plan-parent-coordinator.d.ts.map +0 -1
- package/dist/src/runner/mission-plan-parent-coordinator.js +0 -441
- package/dist/src/runner/mission-plan-parent-coordinator.js.map +0 -1
- package/dist/src/runner/mission-plan-parent.d.ts +0 -156
- package/dist/src/runner/mission-plan-parent.d.ts.map +0 -1
- package/dist/src/runner/mission-plan-parent.js +0 -589
- package/dist/src/runner/mission-plan-parent.js.map +0 -1
- package/dist/src/runner/mission-process-executor.d.ts +0 -25
- package/dist/src/runner/mission-process-executor.d.ts.map +0 -1
- package/dist/src/runner/mission-process-executor.js +0 -182
- package/dist/src/runner/mission-process-executor.js.map +0 -1
- package/dist/src/runner/mission-publication-git.d.ts +0 -21
- package/dist/src/runner/mission-publication-git.d.ts.map +0 -1
- package/dist/src/runner/mission-publication-git.js +0 -61
- package/dist/src/runner/mission-publication-git.js.map +0 -1
- package/dist/src/runner/mission-publication.d.ts +0 -192
- package/dist/src/runner/mission-publication.d.ts.map +0 -1
- package/dist/src/runner/mission-publication.js +0 -1001
- package/dist/src/runner/mission-publication.js.map +0 -1
- package/dist/src/runner/mission-quarantine-patch-executor.d.ts +0 -29
- package/dist/src/runner/mission-quarantine-patch-executor.d.ts.map +0 -1
- package/dist/src/runner/mission-quarantine-patch-executor.js +0 -121
- package/dist/src/runner/mission-quarantine-patch-executor.js.map +0 -1
- package/dist/src/runner/mission-repository-executor.d.ts +0 -54
- package/dist/src/runner/mission-repository-executor.d.ts.map +0 -1
- package/dist/src/runner/mission-repository-executor.js +0 -192
- package/dist/src/runner/mission-repository-executor.js.map +0 -1
- package/dist/src/runner/mission-repository-observer.d.ts +0 -8
- package/dist/src/runner/mission-repository-observer.d.ts.map +0 -1
- package/dist/src/runner/mission-repository-observer.js +0 -24
- package/dist/src/runner/mission-repository-observer.js.map +0 -1
- package/dist/src/runner/mission-reservations.d.ts +0 -15
- package/dist/src/runner/mission-reservations.d.ts.map +0 -1
- package/dist/src/runner/mission-reservations.js +0 -116
- package/dist/src/runner/mission-reservations.js.map +0 -1
- package/dist/src/runner/mission-resolution-loop.d.ts +0 -172
- package/dist/src/runner/mission-resolution-loop.d.ts.map +0 -1
- package/dist/src/runner/mission-resolution-loop.js +0 -318
- package/dist/src/runner/mission-resolution-loop.js.map +0 -1
- package/dist/src/runner/mission-runtime-owner.d.ts +0 -36
- package/dist/src/runner/mission-runtime-owner.d.ts.map +0 -1
- package/dist/src/runner/mission-runtime-owner.js +0 -174
- package/dist/src/runner/mission-runtime-owner.js.map +0 -1
- package/dist/src/runner/mission-safe-executor.d.ts +0 -96
- package/dist/src/runner/mission-safe-executor.d.ts.map +0 -1
- package/dist/src/runner/mission-safe-executor.js +0 -288
- package/dist/src/runner/mission-safe-executor.js.map +0 -1
- package/dist/src/runner/mission-sandbox.d.ts +0 -16
- package/dist/src/runner/mission-sandbox.d.ts.map +0 -1
- package/dist/src/runner/mission-sandbox.js +0 -91
- package/dist/src/runner/mission-sandbox.js.map +0 -1
- package/dist/src/runner/mission-scheduler.d.ts +0 -57
- package/dist/src/runner/mission-scheduler.d.ts.map +0 -1
- package/dist/src/runner/mission-scheduler.js +0 -205
- package/dist/src/runner/mission-scheduler.js.map +0 -1
- package/dist/src/runner/mission-scope-expansion.d.ts +0 -47
- package/dist/src/runner/mission-scope-expansion.d.ts.map +0 -1
- package/dist/src/runner/mission-scope-expansion.js +0 -147
- package/dist/src/runner/mission-scope-expansion.js.map +0 -1
- package/dist/src/runner/mission-state-machine.d.ts +0 -118
- package/dist/src/runner/mission-state-machine.d.ts.map +0 -1
- package/dist/src/runner/mission-state-machine.js +0 -316
- package/dist/src/runner/mission-state-machine.js.map +0 -1
- package/dist/src/runner/mission-state-store.d.ts +0 -70
- package/dist/src/runner/mission-state-store.d.ts.map +0 -1
- package/dist/src/runner/mission-state-store.js +0 -916
- package/dist/src/runner/mission-state-store.js.map +0 -1
- package/dist/src/runner/mobile-device-lease.d.ts +0 -11
- package/dist/src/runner/mobile-device-lease.d.ts.map +0 -1
- package/dist/src/runner/mobile-device-lease.js +0 -121
- package/dist/src/runner/mobile-device-lease.js.map +0 -1
- package/dist/src/runner/mobile-visual-proof-command.d.ts +0 -17
- package/dist/src/runner/mobile-visual-proof-command.d.ts.map +0 -1
- package/dist/src/runner/mobile-visual-proof-command.js +0 -168
- package/dist/src/runner/mobile-visual-proof-command.js.map +0 -1
- package/dist/src/runner/plan-auto-command.d.ts +0 -35
- package/dist/src/runner/plan-auto-command.d.ts.map +0 -1
- package/dist/src/runner/plan-auto-command.js +0 -918
- package/dist/src/runner/plan-auto-command.js.map +0 -1
- package/dist/src/runner/plan-auto-recovery.d.ts +0 -83
- package/dist/src/runner/plan-auto-recovery.d.ts.map +0 -1
- package/dist/src/runner/plan-auto-recovery.js +0 -303
- package/dist/src/runner/plan-auto-recovery.js.map +0 -1
- package/dist/src/runner/prompt.d.ts +0 -68
- package/dist/src/runner/prompt.d.ts.map +0 -1
- package/dist/src/runner/prompt.js +0 -202
- package/dist/src/runner/prompt.js.map +0 -1
- package/dist/src/runner/proof-routing.d.ts +0 -73
- package/dist/src/runner/proof-routing.d.ts.map +0 -1
- package/dist/src/runner/proof-routing.js +0 -182
- package/dist/src/runner/proof-routing.js.map +0 -1
- package/dist/src/runner/proof-strategy.d.ts +0 -21
- package/dist/src/runner/proof-strategy.d.ts.map +0 -1
- package/dist/src/runner/proof-strategy.js +0 -26
- package/dist/src/runner/proof-strategy.js.map +0 -1
- package/dist/src/runner/recovery.d.ts +0 -25
- package/dist/src/runner/recovery.d.ts.map +0 -1
- package/dist/src/runner/recovery.js +0 -89
- package/dist/src/runner/recovery.js.map +0 -1
- package/dist/src/runner/review-gate-policy.d.ts +0 -13
- package/dist/src/runner/review-gate-policy.d.ts.map +0 -1
- package/dist/src/runner/review-gate-policy.js +0 -241
- package/dist/src/runner/review-gate-policy.js.map +0 -1
- package/dist/src/runner/review-gates.d.ts +0 -28
- package/dist/src/runner/review-gates.d.ts.map +0 -1
- package/dist/src/runner/review-gates.js +0 -328
- package/dist/src/runner/review-gates.js.map +0 -1
- package/dist/src/runner/rework-policy.d.ts +0 -48
- package/dist/src/runner/rework-policy.d.ts.map +0 -1
- package/dist/src/runner/rework-policy.js +0 -150
- package/dist/src/runner/rework-policy.js.map +0 -1
- package/dist/src/runner/run-log.d.ts +0 -18
- package/dist/src/runner/run-log.d.ts.map +0 -1
- package/dist/src/runner/run-log.js +0 -53
- package/dist/src/runner/run-log.js.map +0 -1
- package/dist/src/runner/runner-handoff-decision.d.ts +0 -48
- package/dist/src/runner/runner-handoff-decision.d.ts.map +0 -1
- package/dist/src/runner/runner-handoff-decision.js +0 -93
- package/dist/src/runner/runner-handoff-decision.js.map +0 -1
- package/dist/src/runner/safety.d.ts +0 -14
- package/dist/src/runner/safety.d.ts.map +0 -1
- package/dist/src/runner/safety.js +0 -31
- package/dist/src/runner/safety.js.map +0 -1
- package/dist/src/runner/scope-isolation-policy.d.ts +0 -17
- package/dist/src/runner/scope-isolation-policy.d.ts.map +0 -1
- package/dist/src/runner/scope-isolation-policy.js +0 -82
- package/dist/src/runner/scope-isolation-policy.js.map +0 -1
- package/dist/src/runner/scoped-auto-command.d.ts +0 -90
- package/dist/src/runner/scoped-auto-command.d.ts.map +0 -1
- package/dist/src/runner/scoped-auto-command.js +0 -561
- package/dist/src/runner/scoped-auto-command.js.map +0 -1
- package/dist/src/runner/scoped-recovery.d.ts +0 -78
- package/dist/src/runner/scoped-recovery.d.ts.map +0 -1
- package/dist/src/runner/scoped-recovery.js +0 -601
- package/dist/src/runner/scoped-recovery.js.map +0 -1
- package/dist/src/runner/session-home.d.ts +0 -8
- package/dist/src/runner/session-home.d.ts.map +0 -1
- package/dist/src/runner/session-home.js +0 -18
- package/dist/src/runner/session-home.js.map +0 -1
- package/dist/src/runner/status-command.d.ts +0 -38
- package/dist/src/runner/status-command.d.ts.map +0 -1
- package/dist/src/runner/status-command.js +0 -97
- package/dist/src/runner/status-command.js.map +0 -1
- package/dist/src/runner/target-activity-fence.d.ts.map +0 -1
- package/dist/src/runner/target-activity-fence.js.map +0 -1
- package/dist/src/runner/terminal-outcome.d.ts +0 -58
- package/dist/src/runner/terminal-outcome.d.ts.map +0 -1
- package/dist/src/runner/terminal-outcome.js +0 -73
- package/dist/src/runner/terminal-outcome.js.map +0 -1
- package/dist/src/runner/visual-proof-runner.d.ts +0 -27
- package/dist/src/runner/visual-proof-runner.d.ts.map +0 -1
- package/dist/src/runner/visual-proof-runner.js +0 -379
- package/dist/src/runner/visual-proof-runner.js.map +0 -1
- package/dist/src/runner/worktree-cleanup.d.ts +0 -27
- package/dist/src/runner/worktree-cleanup.d.ts.map +0 -1
- package/dist/src/runner/worktree-cleanup.js +0 -63
- package/dist/src/runner/worktree-cleanup.js.map +0 -1
- package/dist/src/setup/codex-command-resolver.d.ts +0 -10
- package/dist/src/setup/codex-command-resolver.d.ts.map +0 -1
- package/dist/src/setup/codex-command-resolver.js +0 -91
- package/dist/src/setup/codex-command-resolver.js.map +0 -1
- package/dist/src/setup/github-label-adapter.d.ts +0 -13
- package/dist/src/setup/github-label-adapter.d.ts.map +0 -1
- package/dist/src/setup/github-label-adapter.js +0 -28
- package/dist/src/setup/github-label-adapter.js.map +0 -1
- package/dist/src/setup/labels.d.ts +0 -27
- package/dist/src/setup/labels.d.ts.map +0 -1
- package/dist/src/setup/labels.js +0 -42
- package/dist/src/setup/labels.js.map +0 -1
- package/dist/src/setup/project-config.d.ts +0 -24
- package/dist/src/setup/project-config.d.ts.map +0 -1
- package/dist/src/setup/project-config.js +0 -678
- package/dist/src/setup/project-config.js.map +0 -1
- package/dist/src/setup/prompt-sync.d.ts +0 -14
- package/dist/src/setup/prompt-sync.d.ts.map +0 -1
- package/dist/src/setup/prompt-sync.js +0 -228
- package/dist/src/setup/prompt-sync.js.map +0 -1
- package/dist/src/setup/setup-command.d.ts +0 -29
- package/dist/src/setup/setup-command.d.ts.map +0 -1
- package/dist/src/setup/setup-command.js +0 -304
- package/dist/src/setup/setup-command.js.map +0 -1
- package/dist/src/setup/skill-runtime-v2-preparation.d.ts +0 -56
- package/dist/src/setup/skill-runtime-v2-preparation.d.ts.map +0 -1
- package/dist/src/setup/skill-runtime-v2-preparation.js +0 -304
- package/dist/src/setup/skill-runtime-v2-preparation.js.map +0 -1
- package/dist/src/setup/workflows.d.ts +0 -10
- package/dist/src/setup/workflows.d.ts.map +0 -1
- package/dist/src/setup/workflows.js +0 -41
- package/dist/src/setup/workflows.js.map +0 -1
- package/prompts/setup-skill.md +0 -12
- package/prompts/workflows/acceptance-proof.md +0 -29
- package/prompts/workflows/breakdown-review.md +0 -48
- package/prompts/workflows/issue-breakdown.md +0 -155
- package/prompts/workflows/issue-tree-orchestration.md +0 -163
- package/prompts/workflows/prd.md +0 -80
- package/prompts/workflows/scoped-implementation.md +0 -129
- package/prompts/workflows/triage.md +0 -149
- /package/dist/src/{process → v2/adapters}/command.d.ts +0 -0
- /package/dist/src/{process → v2/adapters}/command.js +0 -0
- /package/dist/src/{fs → v2/adapters}/durable-atomic-file.d.ts +0 -0
- /package/dist/src/{fs → v2/adapters}/durable-atomic-file.js +0 -0
- /package/dist/src/{github → v2/adapters}/gh-cli.d.ts +0 -0
- /package/dist/src/{github → v2/adapters}/gh-cli.js +0 -0
- /package/dist/src/{github → v2/adapters}/gh-issue-adapter.d.ts +0 -0
- /package/dist/src/{github → v2/adapters}/gh-issue-adapter.js +0 -0
- /package/dist/src/{github → v2/adapters}/gh-pull-request-adapter.d.ts +0 -0
- /package/dist/src/{github → v2/adapters}/gh-pull-request-adapter.js +0 -0
- /package/dist/src/{github → v2/adapters}/issues.d.ts +0 -0
- /package/dist/src/{github → v2/adapters}/issues.js +0 -0
- /package/dist/src/{runner → v2/adapters}/mission-coordinator-lock.d.ts +0 -0
- /package/dist/src/{runner → v2/adapters}/mission-coordinator-lock.js +0 -0
- /package/dist/src/{path-policy.d.ts → v2/adapters/path-policy.d.ts} +0 -0
- /package/dist/src/{path-policy.js → v2/adapters/path-policy.js} +0 -0
- /package/dist/src/{github → v2/adapters}/pull-requests.d.ts +0 -0
- /package/dist/src/{github → v2/adapters}/pull-requests.js +0 -0
- /package/dist/src/{runner → v2/adapters}/target-activity-fence.d.ts +0 -0
|
@@ -1,673 +0,0 @@
|
|
|
1
|
-
import { forbiddenRuntimeKeys, labelKeys, labelPreparationPolicies, workflowKeys, workflowSources, } from './constants.js';
|
|
2
|
-
import { reviewHandoffFlows } from '../review-handoff.js';
|
|
3
|
-
export const checkExecutionPhaseKeys = ['child', 'parent-integration'];
|
|
4
|
-
export const acceptanceProofStrategies = [
|
|
5
|
-
'auto',
|
|
6
|
-
'visual',
|
|
7
|
-
'browser-visual',
|
|
8
|
-
'mobile-visual',
|
|
9
|
-
'non-visual-smoke',
|
|
10
|
-
'none',
|
|
11
|
-
];
|
|
12
|
-
export const codexPhaseKeys = [
|
|
13
|
-
'plan-parent',
|
|
14
|
-
'scoped-issue',
|
|
15
|
-
'tree-child',
|
|
16
|
-
'acceptance-proof',
|
|
17
|
-
'fresh-context-review',
|
|
18
|
-
'visual-proof',
|
|
19
|
-
'quality-review',
|
|
20
|
-
];
|
|
21
|
-
export const forbiddenCodexProfileEnvKeys = new Set([
|
|
22
|
-
'GH_TOKEN',
|
|
23
|
-
'GITHUB_TOKEN',
|
|
24
|
-
'SSH_AUTH_SOCK',
|
|
25
|
-
'GIT_ASKPASS',
|
|
26
|
-
'HOME',
|
|
27
|
-
'CODEX_ORCHESTRATOR_ALLOW_MOBILE_DEVICE_CONTROL',
|
|
28
|
-
'CODEX_ORCHESTRATOR_MOBILE_DEVICE_GUARD',
|
|
29
|
-
'CODEX_ORCHESTRATOR_PROMPT_FILE',
|
|
30
|
-
'CODEX_ORCHESTRATOR_REPORT_FILE',
|
|
31
|
-
]);
|
|
32
|
-
export function validateConfig(input) {
|
|
33
|
-
const errors = [];
|
|
34
|
-
const root = asObject(input);
|
|
35
|
-
if (!root) {
|
|
36
|
-
return { ok: false, errors: ['config must be an object'] };
|
|
37
|
-
}
|
|
38
|
-
for (const forbiddenKey of forbiddenRuntimeKeys) {
|
|
39
|
-
if (forbiddenKey in root) {
|
|
40
|
-
errors.push(`${forbiddenKey} is runtime state and must not be committed config`);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
expectLiteral(root, 'version', 1, errors);
|
|
44
|
-
const github = expectObject(root, 'github', errors);
|
|
45
|
-
const runner = expectObject(root, 'runner', errors);
|
|
46
|
-
const codex = expectObject(root, 'codex', errors);
|
|
47
|
-
const project = expectObject(root, 'project', errors);
|
|
48
|
-
const workflows = expectObject(root, 'workflows', errors);
|
|
49
|
-
const checks = expectObject(root, 'checks', errors);
|
|
50
|
-
const checksPolicy = expectOptionalObject(root, 'checksPolicy', errors);
|
|
51
|
-
const reviewGates = expectObject(root, 'reviewGates', errors);
|
|
52
|
-
const loopPolicy = expectObject(root, 'loopPolicy', errors);
|
|
53
|
-
const deny = expectObject(root, 'deny', errors);
|
|
54
|
-
const branches = expectObject(root, 'branches', errors);
|
|
55
|
-
const pullRequests = expectObject(root, 'pullRequests', errors);
|
|
56
|
-
const issueClassification = expectObject(root, 'issueClassification', errors);
|
|
57
|
-
if (github) {
|
|
58
|
-
expectString(github, 'github.owner', errors);
|
|
59
|
-
expectString(github, 'github.repo', errors);
|
|
60
|
-
expectUnion(github, 'github.prepareLabels', labelPreparationPolicies, errors);
|
|
61
|
-
const labels = expectObject(github, 'github.labels', errors);
|
|
62
|
-
if (labels) {
|
|
63
|
-
for (const labelKey of labelKeys) {
|
|
64
|
-
validateLabel(labels, `github.labels.${labelKey}`, errors);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (runner) {
|
|
69
|
-
expectString(runner, 'runner.workspaceRoot', errors);
|
|
70
|
-
expectParallelLimit(runner, errors);
|
|
71
|
-
expectOptionalParallelLimit(runner, 'runner.maxParallelScopedIssues', errors);
|
|
72
|
-
expectString(runner, 'runner.stateDir', errors);
|
|
73
|
-
expectBoolean(runner, 'runner.allowAgentLocalCommits', errors);
|
|
74
|
-
validateWorktreeCleanup(runner, errors);
|
|
75
|
-
validateResolutionMission(runner, errors);
|
|
76
|
-
}
|
|
77
|
-
if (codex) {
|
|
78
|
-
expectLiteral(codex, 'codex.adapter', 'codex-cli', errors);
|
|
79
|
-
expectString(codex, 'codex.command', errors);
|
|
80
|
-
expectStringArray(codex, 'codex.args', errors);
|
|
81
|
-
expectOptionalPositiveInteger(codex, 'codex.timeoutMs', errors);
|
|
82
|
-
expectOptionalPositiveInteger(codex, 'codex.mobileTimeoutMs', errors);
|
|
83
|
-
expectOptionalPositiveInteger(codex, 'codex.idleTimeoutMs', errors);
|
|
84
|
-
expectOptionalBoolean(codex, 'codex.ignoreUserConfig', errors);
|
|
85
|
-
validateCodexFigmaMcp(codex, errors);
|
|
86
|
-
validateCodexProfiles(codex, errors);
|
|
87
|
-
expectLiteral(codex, 'codex.promptFileEnv', 'CODEX_ORCHESTRATOR_PROMPT_FILE', errors);
|
|
88
|
-
expectLiteral(codex, 'codex.reportFileEnv', 'CODEX_ORCHESTRATOR_REPORT_FILE', errors);
|
|
89
|
-
}
|
|
90
|
-
if (project) {
|
|
91
|
-
expectLiteral(project, 'project.configDir', '.codex-orchestrator', errors);
|
|
92
|
-
expectLiteral(project, 'project.promptsDir', '.codex-orchestrator/prompts', errors);
|
|
93
|
-
}
|
|
94
|
-
if (workflows) {
|
|
95
|
-
for (const workflowKey of workflowKeys) {
|
|
96
|
-
validateWorkflow(workflows, `workflows.${workflowKey}`, errors);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (checks) {
|
|
100
|
-
validateChecks(checks, errors);
|
|
101
|
-
}
|
|
102
|
-
if (checksPolicy) {
|
|
103
|
-
validateChecksPolicy(checksPolicy, errors);
|
|
104
|
-
}
|
|
105
|
-
if (reviewGates) {
|
|
106
|
-
validateReviewGates(reviewGates, errors);
|
|
107
|
-
}
|
|
108
|
-
if (loopPolicy) {
|
|
109
|
-
validateLoopPolicy(loopPolicy, errors);
|
|
110
|
-
}
|
|
111
|
-
if (deny) {
|
|
112
|
-
expectStringArray(deny, 'deny.secretFiles', errors);
|
|
113
|
-
expectBoolean(deny, 'deny.destructiveDbOrCache', errors);
|
|
114
|
-
expectBoolean(deny, 'deny.productionDeployOrRelease', errors);
|
|
115
|
-
expectStringArray(deny, 'deny.additionalPathGlobs', errors);
|
|
116
|
-
}
|
|
117
|
-
if (branches) {
|
|
118
|
-
validateBaseBranch(branches, errors);
|
|
119
|
-
expectString(branches, 'branches.scopedIssue', errors);
|
|
120
|
-
expectString(branches, 'branches.issueTree', errors);
|
|
121
|
-
}
|
|
122
|
-
if (pullRequests) {
|
|
123
|
-
expectString(pullRequests, 'pullRequests.scopedIssueTitle', errors);
|
|
124
|
-
expectString(pullRequests, 'pullRequests.issueTreeTitle', errors);
|
|
125
|
-
}
|
|
126
|
-
if (issueClassification) {
|
|
127
|
-
expectStringArray(issueClassification, 'issueClassification.promotionCriteria', errors);
|
|
128
|
-
expectLiteral(issueClassification, 'issueClassification.clarificationGate', 'block-and-comment', errors);
|
|
129
|
-
}
|
|
130
|
-
if (errors.length > 0) {
|
|
131
|
-
return { ok: false, errors };
|
|
132
|
-
}
|
|
133
|
-
return { ok: true, value: normalizeConfig(root) };
|
|
134
|
-
}
|
|
135
|
-
function normalizeConfig(config) {
|
|
136
|
-
const figmaMcp = config.codex.figmaMcp;
|
|
137
|
-
if (!figmaMcp) {
|
|
138
|
-
return config;
|
|
139
|
-
}
|
|
140
|
-
const { issueTextPatterns, optionalIssueTextPatterns, requiredIssueTextPatterns, optionalFailure, requiredFailure, ...rest } = figmaMcp;
|
|
141
|
-
return {
|
|
142
|
-
...config,
|
|
143
|
-
codex: {
|
|
144
|
-
...config.codex,
|
|
145
|
-
figmaMcp: {
|
|
146
|
-
...rest,
|
|
147
|
-
optionalIssueTextPatterns: optionalIssueTextPatterns ?? issueTextPatterns ?? [],
|
|
148
|
-
requiredIssueTextPatterns: requiredIssueTextPatterns ?? [],
|
|
149
|
-
optionalFailure: optionalFailure ?? 'retry-without-mcp',
|
|
150
|
-
requiredFailure: requiredFailure ?? 'block',
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
function asObject(value) {
|
|
156
|
-
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
157
|
-
return undefined;
|
|
158
|
-
}
|
|
159
|
-
return value;
|
|
160
|
-
}
|
|
161
|
-
function readPath(parent, path) {
|
|
162
|
-
const lastKey = path.split('.').at(-1);
|
|
163
|
-
return lastKey ? parent[lastKey] : undefined;
|
|
164
|
-
}
|
|
165
|
-
function expectObject(parent, path, errors) {
|
|
166
|
-
const value = readPath(parent, path);
|
|
167
|
-
const objectValue = asObject(value);
|
|
168
|
-
if (!objectValue) {
|
|
169
|
-
errors.push(`${path} must be an object`);
|
|
170
|
-
return undefined;
|
|
171
|
-
}
|
|
172
|
-
return objectValue;
|
|
173
|
-
}
|
|
174
|
-
function expectOptionalObject(parent, path, errors) {
|
|
175
|
-
const value = readPath(parent, path);
|
|
176
|
-
if (value === undefined) {
|
|
177
|
-
return undefined;
|
|
178
|
-
}
|
|
179
|
-
const objectValue = asObject(value);
|
|
180
|
-
if (!objectValue) {
|
|
181
|
-
errors.push(`${path} must be an object`);
|
|
182
|
-
return undefined;
|
|
183
|
-
}
|
|
184
|
-
return objectValue;
|
|
185
|
-
}
|
|
186
|
-
function expectString(parent, path, errors) {
|
|
187
|
-
const value = readPath(parent, path);
|
|
188
|
-
if (typeof value !== 'string' || value.length === 0) {
|
|
189
|
-
errors.push(`${path} must be a non-empty string`);
|
|
190
|
-
return undefined;
|
|
191
|
-
}
|
|
192
|
-
return value;
|
|
193
|
-
}
|
|
194
|
-
function expectBoolean(parent, path, errors) {
|
|
195
|
-
const value = readPath(parent, path);
|
|
196
|
-
if (typeof value !== 'boolean') {
|
|
197
|
-
errors.push(`${path} must be a boolean`);
|
|
198
|
-
return undefined;
|
|
199
|
-
}
|
|
200
|
-
return value;
|
|
201
|
-
}
|
|
202
|
-
function expectOptionalBoolean(parent, path, errors) {
|
|
203
|
-
const value = readPath(parent, path);
|
|
204
|
-
if (value === undefined) {
|
|
205
|
-
return undefined;
|
|
206
|
-
}
|
|
207
|
-
if (typeof value !== 'boolean') {
|
|
208
|
-
errors.push(`${path} must be a boolean when provided`);
|
|
209
|
-
return undefined;
|
|
210
|
-
}
|
|
211
|
-
return value;
|
|
212
|
-
}
|
|
213
|
-
function expectLiteral(parent, path, expected, errors) {
|
|
214
|
-
const value = readPath(parent, path);
|
|
215
|
-
if (value !== expected) {
|
|
216
|
-
errors.push(`${path} must be ${expected}`);
|
|
217
|
-
return undefined;
|
|
218
|
-
}
|
|
219
|
-
return expected;
|
|
220
|
-
}
|
|
221
|
-
function expectUnion(parent, path, expected, errors) {
|
|
222
|
-
const value = readPath(parent, path);
|
|
223
|
-
if (typeof value !== 'string' || !expected.includes(value)) {
|
|
224
|
-
errors.push(`${path} must be one of ${expected.join(', ')}`);
|
|
225
|
-
return undefined;
|
|
226
|
-
}
|
|
227
|
-
return value;
|
|
228
|
-
}
|
|
229
|
-
function expectParallelLimit(parent, errors) {
|
|
230
|
-
const value = readPath(parent, 'runner.maxParallelChildren');
|
|
231
|
-
if (!Number.isInteger(value) || typeof value !== 'number' || value < 1 || value > 3) {
|
|
232
|
-
errors.push('runner.maxParallelChildren must be an integer between 1 and 3');
|
|
233
|
-
return undefined;
|
|
234
|
-
}
|
|
235
|
-
return value;
|
|
236
|
-
}
|
|
237
|
-
function expectOptionalParallelLimit(parent, path, errors) {
|
|
238
|
-
const value = readPath(parent, path);
|
|
239
|
-
if (value === undefined) {
|
|
240
|
-
return undefined;
|
|
241
|
-
}
|
|
242
|
-
if (!Number.isInteger(value) || typeof value !== 'number' || value < 1 || value > 3) {
|
|
243
|
-
errors.push(`${path} must be an integer between 1 and 3 when provided`);
|
|
244
|
-
return undefined;
|
|
245
|
-
}
|
|
246
|
-
return value;
|
|
247
|
-
}
|
|
248
|
-
function expectStringArray(parent, path, errors) {
|
|
249
|
-
const value = readPath(parent, path);
|
|
250
|
-
if (!Array.isArray(value) || value.some((item) => typeof item !== 'string' || item.length === 0)) {
|
|
251
|
-
errors.push(`${path} must be an array of non-empty strings`);
|
|
252
|
-
return undefined;
|
|
253
|
-
}
|
|
254
|
-
return value;
|
|
255
|
-
}
|
|
256
|
-
function expectOptionalStringArray(parent, path, errors) {
|
|
257
|
-
const value = readPath(parent, path);
|
|
258
|
-
if (value === undefined) {
|
|
259
|
-
return undefined;
|
|
260
|
-
}
|
|
261
|
-
if (!Array.isArray(value) || value.some((item) => typeof item !== 'string' || item.length === 0)) {
|
|
262
|
-
errors.push(`${path} must be an array of non-empty strings when provided`);
|
|
263
|
-
return undefined;
|
|
264
|
-
}
|
|
265
|
-
return value;
|
|
266
|
-
}
|
|
267
|
-
function validateLabel(parent, path, errors) {
|
|
268
|
-
const label = expectObject(parent, path, errors);
|
|
269
|
-
if (!label) {
|
|
270
|
-
return;
|
|
271
|
-
}
|
|
272
|
-
expectString(label, `${path}.name`, errors);
|
|
273
|
-
expectString(label, `${path}.color`, errors);
|
|
274
|
-
expectString(label, `${path}.description`, errors);
|
|
275
|
-
}
|
|
276
|
-
function validateBaseBranch(branches, errors) {
|
|
277
|
-
const value = readPath(branches, 'branches.base');
|
|
278
|
-
if (typeof value === 'string') {
|
|
279
|
-
if (value.length === 0) {
|
|
280
|
-
errors.push('branches.base must be a non-empty string or explicit base branch object');
|
|
281
|
-
}
|
|
282
|
-
return;
|
|
283
|
-
}
|
|
284
|
-
const base = asObject(value);
|
|
285
|
-
if (!base) {
|
|
286
|
-
errors.push('branches.base must be a non-empty string or explicit base branch object');
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
expectLiteral(base, 'branches.base.mode', 'explicit', errors);
|
|
290
|
-
expectString(base, 'branches.base.remote', errors);
|
|
291
|
-
expectString(base, 'branches.base.branch', errors);
|
|
292
|
-
}
|
|
293
|
-
function validateWorkflow(parent, path, errors) {
|
|
294
|
-
const workflow = expectObject(parent, path, errors);
|
|
295
|
-
if (!workflow) {
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
const source = expectUnion(workflow, `${path}.source`, workflowSources, errors);
|
|
299
|
-
expectString(workflow, `${path}.skillName`, errors);
|
|
300
|
-
if (source === 'existing-skill' || source === 'package-owned-skill') {
|
|
301
|
-
expectString(workflow, `${path}.skillPath`, errors);
|
|
302
|
-
}
|
|
303
|
-
if (source === 'package-bundled-prompt' || source === 'package-owned-prompt-fallback') {
|
|
304
|
-
expectString(workflow, `${path}.promptPath`, errors);
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
function validateChecks(checks, errors) {
|
|
308
|
-
for (const [name, command] of Object.entries(checks)) {
|
|
309
|
-
if (name.length === 0 || typeof command !== 'string' || command.length === 0) {
|
|
310
|
-
errors.push('checks must map non-empty names to non-empty shell commands');
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
function validateCodexProfiles(codex, errors) {
|
|
315
|
-
const profiles = expectOptionalObject(codex, 'codex.profiles', errors);
|
|
316
|
-
if (!profiles) {
|
|
317
|
-
return;
|
|
318
|
-
}
|
|
319
|
-
for (const key of Object.keys(profiles)) {
|
|
320
|
-
if (!codexPhaseKeys.includes(key)) {
|
|
321
|
-
errors.push(`codex.profiles contains unknown phase ${key}`);
|
|
322
|
-
continue;
|
|
323
|
-
}
|
|
324
|
-
const profile = expectOptionalObject(profiles, `codex.profiles.${key}`, errors);
|
|
325
|
-
if (!profile) {
|
|
326
|
-
continue;
|
|
327
|
-
}
|
|
328
|
-
expectOptionalString(profile, `codex.profiles.${key}.command`, errors);
|
|
329
|
-
expectOptionalStringArray(profile, `codex.profiles.${key}.args`, errors);
|
|
330
|
-
expectOptionalPositiveInteger(profile, `codex.profiles.${key}.timeoutMs`, errors);
|
|
331
|
-
expectOptionalPositiveInteger(profile, `codex.profiles.${key}.idleTimeoutMs`, errors);
|
|
332
|
-
validateCodexProfileEnv(profile, key, errors);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
function validateCodexProfileEnv(profile, phase, errors) {
|
|
336
|
-
const env = expectOptionalObject(profile, `codex.profiles.${phase}.env`, errors);
|
|
337
|
-
if (!env) {
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
const keys = Object.keys(env);
|
|
341
|
-
if (keys.some((key) => !/^[A-Z_][A-Z0-9_]*$/.test(key))) {
|
|
342
|
-
errors.push(`codex.profiles.${phase}.env must contain valid environment variable names`);
|
|
343
|
-
}
|
|
344
|
-
const forbidden = keys.find((key) => forbiddenCodexProfileEnvKeys.has(key));
|
|
345
|
-
if (forbidden) {
|
|
346
|
-
errors.push(`codex.profiles.${phase}.env must not contain forbidden key ${forbidden}`);
|
|
347
|
-
}
|
|
348
|
-
for (const [key, value] of Object.entries(env)) {
|
|
349
|
-
if (typeof value !== 'string') {
|
|
350
|
-
errors.push(`codex.profiles.${phase}.env.${key} must be a string`);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
function validateCodexFigmaMcp(codex, errors) {
|
|
355
|
-
const figmaMcp = expectOptionalObject(codex, 'codex.figmaMcp', errors);
|
|
356
|
-
if (!figmaMcp) {
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
expectBoolean(figmaMcp, 'codex.figmaMcp.enabled', errors);
|
|
360
|
-
expectString(figmaMcp, 'codex.figmaMcp.url', errors);
|
|
361
|
-
const hasLegacyPatterns = Array.isArray(figmaMcp.issueTextPatterns);
|
|
362
|
-
if (hasLegacyPatterns) {
|
|
363
|
-
expectStringArray(figmaMcp, 'codex.figmaMcp.issueTextPatterns', errors);
|
|
364
|
-
validateRegexArray(figmaMcp, 'codex.figmaMcp.issueTextPatterns', errors);
|
|
365
|
-
}
|
|
366
|
-
else {
|
|
367
|
-
expectStringArray(figmaMcp, 'codex.figmaMcp.optionalIssueTextPatterns', errors);
|
|
368
|
-
validateRegexArray(figmaMcp, 'codex.figmaMcp.optionalIssueTextPatterns', errors);
|
|
369
|
-
expectStringArray(figmaMcp, 'codex.figmaMcp.requiredIssueTextPatterns', errors);
|
|
370
|
-
validateRegexArray(figmaMcp, 'codex.figmaMcp.requiredIssueTextPatterns', errors);
|
|
371
|
-
}
|
|
372
|
-
if ('optionalFailure' in figmaMcp) {
|
|
373
|
-
expectLiteral(figmaMcp, 'codex.figmaMcp.optionalFailure', 'retry-without-mcp', errors);
|
|
374
|
-
}
|
|
375
|
-
if ('requiredFailure' in figmaMcp) {
|
|
376
|
-
expectLiteral(figmaMcp, 'codex.figmaMcp.requiredFailure', 'block', errors);
|
|
377
|
-
}
|
|
378
|
-
const httpHeaders = expectObject(figmaMcp, 'codex.figmaMcp.httpHeaders', errors);
|
|
379
|
-
if (!httpHeaders) {
|
|
380
|
-
return;
|
|
381
|
-
}
|
|
382
|
-
for (const [key, value] of Object.entries(httpHeaders)) {
|
|
383
|
-
if (key.length === 0 || typeof value !== 'string' || value.length === 0) {
|
|
384
|
-
errors.push('codex.figmaMcp.httpHeaders must map non-empty names to non-empty string values');
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
function validateChecksPolicy(policy, errors) {
|
|
389
|
-
if ('missingNpmScript' in policy) {
|
|
390
|
-
expectUnion(policy, 'checksPolicy.missingNpmScript', ['fail', 'skip'], errors);
|
|
391
|
-
}
|
|
392
|
-
const lintBaseline = 'lintBaseline' in policy ? asObject(policy.lintBaseline) : undefined;
|
|
393
|
-
if ('lintBaseline' in policy && !lintBaseline) {
|
|
394
|
-
errors.push('checksPolicy.lintBaseline must be an object');
|
|
395
|
-
return;
|
|
396
|
-
}
|
|
397
|
-
if (lintBaseline) {
|
|
398
|
-
if ('mode' in lintBaseline) {
|
|
399
|
-
expectUnion(lintBaseline, 'checksPolicy.lintBaseline.mode', ['strict', 'touched-only'], errors);
|
|
400
|
-
}
|
|
401
|
-
if ('touchedFilesCommand' in lintBaseline) {
|
|
402
|
-
expectString(lintBaseline, 'checksPolicy.lintBaseline.touchedFilesCommand', errors);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
const scope = 'scope' in policy ? asObject(policy.scope) : undefined;
|
|
406
|
-
if ('scope' in policy && !scope) {
|
|
407
|
-
errors.push('checksPolicy.scope must be an object');
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
410
|
-
if (scope) {
|
|
411
|
-
validateChecksPolicyScope(scope, errors);
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
function validateChecksPolicyScope(scope, errors) {
|
|
415
|
-
for (const [checkName, rawRule] of Object.entries(scope)) {
|
|
416
|
-
if (checkName.length === 0) {
|
|
417
|
-
errors.push('checksPolicy.scope must map non-empty check names to objects');
|
|
418
|
-
continue;
|
|
419
|
-
}
|
|
420
|
-
const rule = asObject(rawRule);
|
|
421
|
-
if (!rule) {
|
|
422
|
-
errors.push(`checksPolicy.scope.${checkName} must be an object`);
|
|
423
|
-
continue;
|
|
424
|
-
}
|
|
425
|
-
if ('phases' in rule) {
|
|
426
|
-
const phases = expectOptionalStringArray(rule, `checksPolicy.scope.${checkName}.phases`, errors);
|
|
427
|
-
if (phases && phases.some((phase) => !checkExecutionPhaseKeys.includes(phase))) {
|
|
428
|
-
errors.push(`checksPolicy.scope.${checkName}.phases must contain only ${checkExecutionPhaseKeys.join(', ')}`);
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
if ('changedPathGlobs' in rule) {
|
|
432
|
-
expectOptionalStringArray(rule, `checksPolicy.scope.${checkName}.changedPathGlobs`, errors);
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
function validateReviewGates(parent, errors) {
|
|
437
|
-
const acceptanceProof = expectObject(parent, 'reviewGates.acceptanceProof', errors);
|
|
438
|
-
if (acceptanceProof) {
|
|
439
|
-
expectBoolean(acceptanceProof, 'reviewGates.acceptanceProof.enabled', errors);
|
|
440
|
-
expectUnion(acceptanceProof, 'reviewGates.acceptanceProof.proofStrategy', acceptanceProofStrategies, errors);
|
|
441
|
-
expectString(acceptanceProof, 'reviewGates.acceptanceProof.artifactDir', errors);
|
|
442
|
-
expectStringArray(acceptanceProof, 'reviewGates.acceptanceProof.issueTextPatterns', errors);
|
|
443
|
-
expectStringArray(acceptanceProof, 'reviewGates.acceptanceProof.changedPathGlobs', errors);
|
|
444
|
-
expectStringArray(acceptanceProof, 'reviewGates.acceptanceProof.proofOwnedPathGlobs', errors);
|
|
445
|
-
expectPositiveInteger(acceptanceProof, 'reviewGates.acceptanceProof.maxIterations', errors);
|
|
446
|
-
expectOptionalString(acceptanceProof, 'reviewGates.acceptanceProof.runnerValidationCommand', errors);
|
|
447
|
-
expectOptionalPositiveInteger(acceptanceProof, 'reviewGates.acceptanceProof.runnerTimeoutMs', errors);
|
|
448
|
-
expectOptionalStringArray(acceptanceProof, 'reviewGates.acceptanceProof.envPassthrough', errors);
|
|
449
|
-
validateBrowserProofConfig(acceptanceProof, errors);
|
|
450
|
-
validateEnvironmentVariableNames(acceptanceProof, 'reviewGates.acceptanceProof.envPassthrough', errors);
|
|
451
|
-
validateRegexArray(acceptanceProof, 'reviewGates.acceptanceProof.issueTextPatterns', errors);
|
|
452
|
-
}
|
|
453
|
-
const visualProof = expectObject(parent, 'reviewGates.visualProof', errors);
|
|
454
|
-
if (visualProof) {
|
|
455
|
-
expectBoolean(visualProof, 'reviewGates.visualProof.enabled', errors);
|
|
456
|
-
expectString(visualProof, 'reviewGates.visualProof.artifactDir', errors);
|
|
457
|
-
expectStringArray(visualProof, 'reviewGates.visualProof.issueTextPatterns', errors);
|
|
458
|
-
expectStringArray(visualProof, 'reviewGates.visualProof.changedPathGlobs', errors);
|
|
459
|
-
expectStringArray(visualProof, 'reviewGates.visualProof.requiredValidationPatterns', errors);
|
|
460
|
-
expectStringArray(visualProof, 'reviewGates.visualProof.blockOnSkippedPatterns', errors);
|
|
461
|
-
expectPositiveInteger(visualProof, 'reviewGates.visualProof.minScreenshotArtifacts', errors);
|
|
462
|
-
expectOptionalBoolean(visualProof, 'reviewGates.visualProof.requireWhenDesirable', errors);
|
|
463
|
-
expectOptionalString(visualProof, 'reviewGates.visualProof.runnerValidationCommand', errors);
|
|
464
|
-
expectOptionalPositiveInteger(visualProof, 'reviewGates.visualProof.runnerTimeoutMs', errors);
|
|
465
|
-
expectOptionalStringArray(visualProof, 'reviewGates.visualProof.envPassthrough', errors);
|
|
466
|
-
validateEnvironmentVariableNames(visualProof, 'reviewGates.visualProof.envPassthrough', errors);
|
|
467
|
-
validateRegexArray(visualProof, 'reviewGates.visualProof.issueTextPatterns', errors);
|
|
468
|
-
validateRegexArray(visualProof, 'reviewGates.visualProof.requiredValidationPatterns', errors);
|
|
469
|
-
validateRegexArray(visualProof, 'reviewGates.visualProof.blockOnSkippedPatterns', errors);
|
|
470
|
-
}
|
|
471
|
-
validateQualityGate(parent, errors);
|
|
472
|
-
validateRiskRoutingGate(parent, errors);
|
|
473
|
-
}
|
|
474
|
-
function validateRiskRoutingGate(parent, errors) {
|
|
475
|
-
const riskRouting = expectOptionalObject(parent, 'reviewGates.riskRouting', errors);
|
|
476
|
-
if (!riskRouting) {
|
|
477
|
-
return;
|
|
478
|
-
}
|
|
479
|
-
expectBoolean(riskRouting, 'reviewGates.riskRouting.enabled', errors);
|
|
480
|
-
expectUnion(riskRouting, 'reviewGates.riskRouting.mode', ['warn', 'block'], errors);
|
|
481
|
-
expectBoolean(riskRouting, 'reviewGates.riskRouting.requireScopedReviewHandoff', errors);
|
|
482
|
-
expectBoolean(riskRouting, 'reviewGates.riskRouting.requireParentSizeRisk', errors);
|
|
483
|
-
expectBoolean(riskRouting, 'reviewGates.riskRouting.requireParentReviewHandoff', errors);
|
|
484
|
-
expectStringArray(riskRouting, 'reviewGates.riskRouting.riskyChangedPathGlobs', errors);
|
|
485
|
-
expectBoolean(riskRouting, 'reviewGates.riskRouting.highRiskRequiresCodeReview', errors);
|
|
486
|
-
expectReviewHandoffFlows(riskRouting, errors);
|
|
487
|
-
}
|
|
488
|
-
function validateBrowserProofConfig(acceptanceProof, errors) {
|
|
489
|
-
const browserProof = expectOptionalObject(acceptanceProof, 'reviewGates.acceptanceProof.browserProof', errors);
|
|
490
|
-
if (!browserProof) {
|
|
491
|
-
return;
|
|
492
|
-
}
|
|
493
|
-
expectOptionalString(browserProof, 'reviewGates.acceptanceProof.browserProof.scenarioPath', errors);
|
|
494
|
-
expectOptionalString(browserProof, 'reviewGates.acceptanceProof.browserProof.baseUrl', errors);
|
|
495
|
-
expectBoolean(browserProof, 'reviewGates.acceptanceProof.browserProof.strictConsoleErrors', errors);
|
|
496
|
-
expectBoolean(browserProof, 'reviewGates.acceptanceProof.browserProof.strictNetworkFailures', errors);
|
|
497
|
-
}
|
|
498
|
-
function validateLoopPolicy(parent, errors) {
|
|
499
|
-
const issueSelection = expectObject(parent, 'loopPolicy.issueSelection', errors);
|
|
500
|
-
if (issueSelection) {
|
|
501
|
-
expectStringArray(issueSelection, 'loopPolicy.issueSelection.priorityLabels', errors);
|
|
502
|
-
expectUnion(issueSelection, 'loopPolicy.issueSelection.tieBreaker', ['issue-number-asc'], errors);
|
|
503
|
-
}
|
|
504
|
-
const rework = expectObject(parent, 'loopPolicy.rework', errors);
|
|
505
|
-
if (rework) {
|
|
506
|
-
expectNonNegativeInteger(rework, 'loopPolicy.rework.maxAttempts', errors);
|
|
507
|
-
expectRetryableBlockers(rework, errors);
|
|
508
|
-
}
|
|
509
|
-
const freshContextReview = expectObject(parent, 'loopPolicy.freshContextReview', errors);
|
|
510
|
-
if (freshContextReview) {
|
|
511
|
-
expectBoolean(freshContextReview, 'loopPolicy.freshContextReview.enabled', errors);
|
|
512
|
-
expectUnion(freshContextReview, 'loopPolicy.freshContextReview.mode', ['advisory'], errors);
|
|
513
|
-
expectBoolean(freshContextReview, 'loopPolicy.freshContextReview.blockOnHighConfidencePolicyViolations', errors);
|
|
514
|
-
}
|
|
515
|
-
const durableRunSummaries = expectObject(parent, 'loopPolicy.durableRunSummaries', errors);
|
|
516
|
-
if (durableRunSummaries) {
|
|
517
|
-
expectBoolean(durableRunSummaries, 'loopPolicy.durableRunSummaries.enabled', errors);
|
|
518
|
-
}
|
|
519
|
-
const policySuggestions = expectObject(parent, 'loopPolicy.policySuggestions', errors);
|
|
520
|
-
if (policySuggestions) {
|
|
521
|
-
expectBoolean(policySuggestions, 'loopPolicy.policySuggestions.enabled', errors);
|
|
522
|
-
expectPositiveInteger(policySuggestions, 'loopPolicy.policySuggestions.maxSuggestions', errors);
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
function validateQualityGate(parent, errors) {
|
|
526
|
-
const quality = expectObject(parent, 'reviewGates.quality', errors);
|
|
527
|
-
if (!quality) {
|
|
528
|
-
return;
|
|
529
|
-
}
|
|
530
|
-
expectBoolean(quality, 'reviewGates.quality.enabled', errors);
|
|
531
|
-
expectStringArray(quality, 'reviewGates.quality.runtimeChangedPathGlobs', errors);
|
|
532
|
-
expectStringArray(quality, 'reviewGates.quality.testChangedPathGlobs', errors);
|
|
533
|
-
const tdd = expectObject(quality, 'reviewGates.quality.tdd', errors);
|
|
534
|
-
if (tdd) {
|
|
535
|
-
expectBoolean(tdd, 'reviewGates.quality.tdd.enabled', errors);
|
|
536
|
-
expectBoolean(tdd, 'reviewGates.quality.tdd.requireTestChange', errors);
|
|
537
|
-
expectStringArray(tdd, 'reviewGates.quality.tdd.requiredValidationPatterns', errors);
|
|
538
|
-
validateRegexArray(tdd, 'reviewGates.quality.tdd.requiredValidationPatterns', errors);
|
|
539
|
-
}
|
|
540
|
-
const cleanupReview = expectObject(quality, 'reviewGates.quality.cleanupReview', errors);
|
|
541
|
-
if (cleanupReview) {
|
|
542
|
-
expectBoolean(cleanupReview, 'reviewGates.quality.cleanupReview.enabled', errors);
|
|
543
|
-
expectPositiveInteger(cleanupReview, 'reviewGates.quality.cleanupReview.runtimeFileThreshold', errors);
|
|
544
|
-
expectStringArray(cleanupReview, 'reviewGates.quality.cleanupReview.requiredValidationPatterns', errors);
|
|
545
|
-
validateRegexArray(cleanupReview, 'reviewGates.quality.cleanupReview.requiredValidationPatterns', errors);
|
|
546
|
-
}
|
|
547
|
-
const codeReview = expectObject(quality, 'reviewGates.quality.codeReview', errors);
|
|
548
|
-
if (codeReview) {
|
|
549
|
-
expectBoolean(codeReview, 'reviewGates.quality.codeReview.enabled', errors);
|
|
550
|
-
expectStringArray(codeReview, 'reviewGates.quality.codeReview.requiredValidationPatterns', errors);
|
|
551
|
-
validateRegexArray(codeReview, 'reviewGates.quality.codeReview.requiredValidationPatterns', errors);
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
function validateWorktreeCleanup(parent, errors) {
|
|
555
|
-
const value = readPath(parent, 'runner.worktreeCleanup');
|
|
556
|
-
if (value === undefined) {
|
|
557
|
-
return;
|
|
558
|
-
}
|
|
559
|
-
const worktreeCleanup = asObject(value);
|
|
560
|
-
if (!worktreeCleanup) {
|
|
561
|
-
errors.push('runner.worktreeCleanup must be an object when provided');
|
|
562
|
-
return;
|
|
563
|
-
}
|
|
564
|
-
expectBoolean(worktreeCleanup, 'runner.worktreeCleanup.enabled', errors);
|
|
565
|
-
}
|
|
566
|
-
function validateResolutionMission(parent, errors) {
|
|
567
|
-
const resolutionMission = expectOptionalObject(parent, 'runner.resolutionMission', errors);
|
|
568
|
-
if (!resolutionMission) {
|
|
569
|
-
return;
|
|
570
|
-
}
|
|
571
|
-
const mode = readPath(resolutionMission, 'runner.resolutionMission.mode');
|
|
572
|
-
if (mode !== 'off' && mode !== 'shadow' && mode !== 'enabled') {
|
|
573
|
-
errors.push('runner.resolutionMission.mode must be off, shadow, or enabled');
|
|
574
|
-
}
|
|
575
|
-
const markerLabel = expectString(resolutionMission, 'runner.resolutionMission.markerLabel', errors);
|
|
576
|
-
if (markerLabel !== undefined && markerLabel.trim().length === 0) {
|
|
577
|
-
errors.push('runner.resolutionMission.markerLabel must contain non-whitespace characters');
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
function expectOptionalString(parent, path, errors) {
|
|
581
|
-
const value = readPath(parent, path);
|
|
582
|
-
if (value === undefined) {
|
|
583
|
-
return undefined;
|
|
584
|
-
}
|
|
585
|
-
if (typeof value !== 'string') {
|
|
586
|
-
errors.push(`${path} must be a string when provided`);
|
|
587
|
-
return undefined;
|
|
588
|
-
}
|
|
589
|
-
return value;
|
|
590
|
-
}
|
|
591
|
-
function expectPositiveInteger(parent, path, errors) {
|
|
592
|
-
const value = readPath(parent, path);
|
|
593
|
-
if (!Number.isInteger(value) || typeof value !== 'number' || value < 1) {
|
|
594
|
-
errors.push(`${path} must be a positive integer`);
|
|
595
|
-
return undefined;
|
|
596
|
-
}
|
|
597
|
-
return value;
|
|
598
|
-
}
|
|
599
|
-
function expectNonNegativeInteger(parent, path, errors) {
|
|
600
|
-
const value = readPath(parent, path);
|
|
601
|
-
if (!Number.isInteger(value) || typeof value !== 'number' || value < 0) {
|
|
602
|
-
errors.push(`${path} must be a non-negative integer`);
|
|
603
|
-
return undefined;
|
|
604
|
-
}
|
|
605
|
-
return value;
|
|
606
|
-
}
|
|
607
|
-
function expectRetryableBlockers(parent, errors) {
|
|
608
|
-
const validBlockers = [
|
|
609
|
-
'missing-completion-report',
|
|
610
|
-
'idle-timeout-before-change',
|
|
611
|
-
'incomplete-after-progress',
|
|
612
|
-
'invalid-completion-report',
|
|
613
|
-
'no-changed-files',
|
|
614
|
-
'failed-configured-checks',
|
|
615
|
-
'missing-quality-gate-evidence',
|
|
616
|
-
'failed-acceptance-proof',
|
|
617
|
-
'risk-routing-policy',
|
|
618
|
-
'optional-figma-mcp-failure',
|
|
619
|
-
];
|
|
620
|
-
const value = readPath(parent, 'loopPolicy.rework.retryableBlockers');
|
|
621
|
-
if (!Array.isArray(value) || value.some((item) => typeof item !== 'string' || !validBlockers.includes(item))) {
|
|
622
|
-
errors.push(`loopPolicy.rework.retryableBlockers must contain only ${validBlockers.join(', ')}`);
|
|
623
|
-
return undefined;
|
|
624
|
-
}
|
|
625
|
-
return value;
|
|
626
|
-
}
|
|
627
|
-
function expectReviewHandoffFlows(parent, errors) {
|
|
628
|
-
const value = readPath(parent, 'reviewGates.riskRouting.allowedLowRiskFlows');
|
|
629
|
-
if (!Array.isArray(value) || value.some((item) => typeof item !== 'string' || !reviewHandoffFlows.includes(item))) {
|
|
630
|
-
errors.push(`reviewGates.riskRouting.allowedLowRiskFlows must contain only ${reviewHandoffFlows.join(', ')}`);
|
|
631
|
-
return undefined;
|
|
632
|
-
}
|
|
633
|
-
return value;
|
|
634
|
-
}
|
|
635
|
-
function expectOptionalPositiveInteger(parent, path, errors) {
|
|
636
|
-
const value = readPath(parent, path);
|
|
637
|
-
if (value === undefined) {
|
|
638
|
-
return undefined;
|
|
639
|
-
}
|
|
640
|
-
if (!Number.isInteger(value) || typeof value !== 'number' || value < 1) {
|
|
641
|
-
errors.push(`${path} must be a positive integer when provided`);
|
|
642
|
-
return undefined;
|
|
643
|
-
}
|
|
644
|
-
return value;
|
|
645
|
-
}
|
|
646
|
-
function validateRegexArray(parent, path, errors) {
|
|
647
|
-
const value = readPath(parent, path);
|
|
648
|
-
if (!Array.isArray(value)) {
|
|
649
|
-
return;
|
|
650
|
-
}
|
|
651
|
-
for (const pattern of value) {
|
|
652
|
-
if (typeof pattern !== 'string') {
|
|
653
|
-
continue;
|
|
654
|
-
}
|
|
655
|
-
try {
|
|
656
|
-
new RegExp(pattern, 'iu');
|
|
657
|
-
}
|
|
658
|
-
catch {
|
|
659
|
-
errors.push(`${path} contains invalid regular expression ${pattern}`);
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
function validateEnvironmentVariableNames(parent, path, errors) {
|
|
664
|
-
const value = readPath(parent, path);
|
|
665
|
-
if (!Array.isArray(value)) {
|
|
666
|
-
return;
|
|
667
|
-
}
|
|
668
|
-
const hasInvalidName = value.some((name) => typeof name === 'string' && !/^[A-Z_][A-Z0-9_]*$/u.test(name));
|
|
669
|
-
if (hasInvalidName) {
|
|
670
|
-
errors.push(`${path} must contain valid environment variable names`);
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
//# sourceMappingURL=schema.js.map
|