dorfl 0.0.0 → 0.1.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/dist/advance-ci-template.d.ts +73 -0
- package/dist/advance-ci-template.d.ts.map +1 -0
- package/dist/advance-ci-template.js +104 -0
- package/dist/advance-ci-template.js.map +1 -0
- package/dist/advance-classify.d.ts +132 -0
- package/dist/advance-classify.d.ts.map +1 -0
- package/dist/advance-classify.js +120 -0
- package/dist/advance-classify.js.map +1 -0
- package/dist/advance-drivers.d.ts +182 -0
- package/dist/advance-drivers.d.ts.map +1 -0
- package/dist/advance-drivers.js +231 -0
- package/dist/advance-drivers.js.map +1 -0
- package/dist/advance-isolated.d.ts +156 -0
- package/dist/advance-isolated.d.ts.map +1 -0
- package/dist/advance-isolated.js +256 -0
- package/dist/advance-isolated.js.map +1 -0
- package/dist/advance-lifecycle-template.d.ts +107 -0
- package/dist/advance-lifecycle-template.d.ts.map +1 -0
- package/dist/advance-lifecycle-template.js +668 -0
- package/dist/advance-lifecycle-template.js.map +1 -0
- package/dist/advance-loop-driver.d.ts +325 -0
- package/dist/advance-loop-driver.d.ts.map +1 -0
- package/dist/advance-loop-driver.js +437 -0
- package/dist/advance-loop-driver.js.map +1 -0
- package/dist/advance-treeless-publish.d.ts +108 -0
- package/dist/advance-treeless-publish.d.ts.map +1 -0
- package/dist/advance-treeless-publish.js +71 -0
- package/dist/advance-treeless-publish.js.map +1 -0
- package/dist/advance.d.ts +340 -0
- package/dist/advance.d.ts.map +1 -0
- package/dist/advance.js +1122 -0
- package/dist/advance.js.map +1 -0
- package/dist/advancing-lock.d.ts +294 -0
- package/dist/advancing-lock.d.ts.map +1 -0
- package/dist/advancing-lock.js +594 -0
- package/dist/advancing-lock.js.map +1 -0
- package/dist/agent-launch.d.ts +79 -0
- package/dist/agent-launch.d.ts.map +1 -0
- package/dist/agent-launch.js +61 -0
- package/dist/agent-launch.js.map +1 -0
- package/dist/agent-stop.d.ts +149 -0
- package/dist/agent-stop.d.ts.map +1 -0
- package/dist/agent-stop.js +307 -0
- package/dist/agent-stop.js.map +1 -0
- package/dist/apply-decide.d.ts +127 -0
- package/dist/apply-decide.d.ts.map +1 -0
- package/dist/apply-decide.js +176 -0
- package/dist/apply-decide.js.map +1 -0
- package/dist/apply-merge-action.d.ts +206 -0
- package/dist/apply-merge-action.d.ts.map +1 -0
- package/dist/apply-merge-action.js +307 -0
- package/dist/apply-merge-action.js.map +1 -0
- package/dist/apply-persist.d.ts +174 -0
- package/dist/apply-persist.d.ts.map +1 -0
- package/dist/apply-persist.js +359 -0
- package/dist/apply-persist.js.map +1 -0
- package/dist/arbiter.d.ts +120 -0
- package/dist/arbiter.d.ts.map +1 -0
- package/dist/arbiter.js +255 -0
- package/dist/arbiter.js.map +1 -0
- package/dist/brand.d.ts +70 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/brand.js +84 -0
- package/dist/brand.js.map +1 -0
- package/dist/buildable-body.d.ts +132 -0
- package/dist/buildable-body.d.ts.map +1 -0
- package/dist/buildable-body.js +131 -0
- package/dist/buildable-body.js.map +1 -0
- package/dist/categorise.d.ts +66 -0
- package/dist/categorise.d.ts.map +1 -0
- package/dist/categorise.js +106 -0
- package/dist/categorise.js.map +1 -0
- package/dist/claim-cas.d.ts +117 -0
- package/dist/claim-cas.d.ts.map +1 -0
- package/dist/claim-cas.js +312 -0
- package/dist/claim-cas.js.map +1 -0
- package/dist/cli-spinner.d.ts +112 -0
- package/dist/cli-spinner.d.ts.map +1 -0
- package/dist/cli-spinner.js +157 -0
- package/dist/cli-spinner.js.map +1 -0
- package/dist/cli.d.ts +11 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +3094 -0
- package/dist/cli.js.map +1 -0
- package/dist/close-job-template.d.ts +70 -0
- package/dist/close-job-template.d.ts.map +1 -0
- package/dist/close-job-template.js +180 -0
- package/dist/close-job-template.js.map +1 -0
- package/dist/close-job.d.ts +95 -0
- package/dist/close-job.d.ts.map +1 -0
- package/dist/close-job.js +226 -0
- package/dist/close-job.js.map +1 -0
- package/dist/complete.d.ts +361 -0
- package/dist/complete.d.ts.map +1 -0
- package/dist/complete.js +885 -0
- package/dist/complete.js.map +1 -0
- package/dist/concurrency.d.ts +68 -0
- package/dist/concurrency.d.ts.map +1 -0
- package/dist/concurrency.js +112 -0
- package/dist/concurrency.js.map +1 -0
- package/dist/config-override.d.ts +76 -0
- package/dist/config-override.d.ts.map +1 -0
- package/dist/config-override.js +50 -0
- package/dist/config-override.js.map +1 -0
- package/dist/config.d.ts +668 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +241 -0
- package/dist/config.js.map +1 -0
- package/dist/continue-branch.d.ts +249 -0
- package/dist/continue-branch.d.ts.map +1 -0
- package/dist/continue-branch.js +389 -0
- package/dist/continue-branch.js.map +1 -0
- package/dist/cwd-section.d.ts +186 -0
- package/dist/cwd-section.d.ts.map +1 -0
- package/dist/cwd-section.js +209 -0
- package/dist/cwd-section.js.map +1 -0
- package/dist/decision-engine.d.ts +170 -0
- package/dist/decision-engine.d.ts.map +1 -0
- package/dist/decision-engine.js +136 -0
- package/dist/decision-engine.js.map +1 -0
- package/dist/detect.d.ts +17 -0
- package/dist/detect.d.ts.map +1 -0
- package/dist/detect.js +118 -0
- package/dist/detect.js.map +1 -0
- package/dist/do-autopick.d.ts +85 -0
- package/dist/do-autopick.d.ts.map +1 -0
- package/dist/do-autopick.js +112 -0
- package/dist/do-autopick.js.map +1 -0
- package/dist/do-config.d.ts +312 -0
- package/dist/do-config.d.ts.map +1 -0
- package/dist/do-config.js +358 -0
- package/dist/do-config.js.map +1 -0
- package/dist/do-remote-auto.d.ts +75 -0
- package/dist/do-remote-auto.d.ts.map +1 -0
- package/dist/do-remote-auto.js +111 -0
- package/dist/do-remote-auto.js.map +1 -0
- package/dist/do.d.ts +621 -0
- package/dist/do.d.ts.map +1 -0
- package/dist/do.js +1882 -0
- package/dist/do.js.map +1 -0
- package/dist/drop-source.d.ts +96 -0
- package/dist/drop-source.d.ts.map +1 -0
- package/dist/drop-source.js +91 -0
- package/dist/drop-source.js.map +1 -0
- package/dist/eligibility.d.ts +46 -0
- package/dist/eligibility.d.ts.map +1 -0
- package/dist/eligibility.js +34 -0
- package/dist/eligibility.js.map +1 -0
- package/dist/env-config.d.ts +51 -0
- package/dist/env-config.d.ts.map +1 -0
- package/dist/env-config.js +272 -0
- package/dist/env-config.js.map +1 -0
- package/dist/failure-cause.d.ts +70 -0
- package/dist/failure-cause.d.ts.map +1 -0
- package/dist/failure-cause.js +126 -0
- package/dist/failure-cause.js.map +1 -0
- package/dist/format.d.ts +43 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +256 -0
- package/dist/format.js.map +1 -0
- package/dist/frontmatter.d.ts +215 -0
- package/dist/frontmatter.d.ts.map +1 -0
- package/dist/frontmatter.js +345 -0
- package/dist/frontmatter.js.map +1 -0
- package/dist/gate-readiness.d.ts +84 -0
- package/dist/gate-readiness.d.ts.map +1 -0
- package/dist/gate-readiness.js +103 -0
- package/dist/gate-readiness.js.map +1 -0
- package/dist/gc.d.ts +165 -0
- package/dist/gc.d.ts.map +1 -0
- package/dist/gc.js +313 -0
- package/dist/gc.js.map +1 -0
- package/dist/gh-failure.d.ts +42 -0
- package/dist/gh-failure.d.ts.map +1 -0
- package/dist/gh-failure.js +49 -0
- package/dist/gh-failure.js.map +1 -0
- package/dist/git.d.ts +75 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +130 -0
- package/dist/git.js.map +1 -0
- package/dist/github.d.ts +187 -0
- package/dist/github.d.ts.map +1 -0
- package/dist/github.js +343 -0
- package/dist/github.js.map +1 -0
- package/dist/harness.d.ts +242 -0
- package/dist/harness.d.ts.map +1 -0
- package/dist/harness.js +157 -0
- package/dist/harness.js.map +1 -0
- package/dist/identity.d.ts +167 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +231 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +147 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +76 -0
- package/dist/index.js.map +1 -0
- package/dist/install-ci-branch-protection.d.ts +147 -0
- package/dist/install-ci-branch-protection.d.ts.map +1 -0
- package/dist/install-ci-branch-protection.js +166 -0
- package/dist/install-ci-branch-protection.js.map +1 -0
- package/dist/install-ci-capabilities/advance-lifecycle.d.ts +15 -0
- package/dist/install-ci-capabilities/advance-lifecycle.d.ts.map +1 -0
- package/dist/install-ci-capabilities/advance-lifecycle.js +28 -0
- package/dist/install-ci-capabilities/advance-lifecycle.js.map +1 -0
- package/dist/install-ci-capabilities/close-job.d.ts +13 -0
- package/dist/install-ci-capabilities/close-job.d.ts.map +1 -0
- package/dist/install-ci-capabilities/close-job.js +26 -0
- package/dist/install-ci-capabilities/close-job.js.map +1 -0
- package/dist/install-ci-capabilities/example-noop.d.ts +16 -0
- package/dist/install-ci-capabilities/example-noop.d.ts.map +1 -0
- package/dist/install-ci-capabilities/example-noop.js +23 -0
- package/dist/install-ci-capabilities/example-noop.js.map +1 -0
- package/dist/install-ci-capabilities/intake.d.ts +15 -0
- package/dist/install-ci-capabilities/intake.d.ts.map +1 -0
- package/dist/install-ci-capabilities/intake.js +28 -0
- package/dist/install-ci-capabilities/intake.js.map +1 -0
- package/dist/install-ci-capabilities/verify.d.ts +14 -0
- package/dist/install-ci-capabilities/verify.d.ts.map +1 -0
- package/dist/install-ci-capabilities/verify.js +27 -0
- package/dist/install-ci-capabilities/verify.js.map +1 -0
- package/dist/install-ci-core.d.ts +446 -0
- package/dist/install-ci-core.d.ts.map +1 -0
- package/dist/install-ci-core.js +760 -0
- package/dist/install-ci-core.js.map +1 -0
- package/dist/install-ci-github.d.ts +167 -0
- package/dist/install-ci-github.d.ts.map +1 -0
- package/dist/install-ci-github.js +315 -0
- package/dist/install-ci-github.js.map +1 -0
- package/dist/install-ci.d.ts +105 -0
- package/dist/install-ci.d.ts.map +1 -0
- package/dist/install-ci.js +363 -0
- package/dist/install-ci.js.map +1 -0
- package/dist/intake-event.d.ts +88 -0
- package/dist/intake-event.d.ts.map +1 -0
- package/dist/intake-event.js +66 -0
- package/dist/intake-event.js.map +1 -0
- package/dist/intake-marker.d.ts +95 -0
- package/dist/intake-marker.d.ts.map +1 -0
- package/dist/intake-marker.js +127 -0
- package/dist/intake-marker.js.map +1 -0
- package/dist/intake-triage.d.ts +48 -0
- package/dist/intake-triage.d.ts.map +1 -0
- package/dist/intake-triage.js +95 -0
- package/dist/intake-triage.js.map +1 -0
- package/dist/intake-trigger-template.d.ts +185 -0
- package/dist/intake-trigger-template.d.ts.map +1 -0
- package/dist/intake-trigger-template.js +449 -0
- package/dist/intake-trigger-template.js.map +1 -0
- package/dist/intake.d.ts +569 -0
- package/dist/intake.d.ts.map +1 -0
- package/dist/intake.js +1628 -0
- package/dist/intake.js.map +1 -0
- package/dist/integration-core.d.ts +539 -0
- package/dist/integration-core.d.ts.map +1 -0
- package/dist/integration-core.js +2195 -0
- package/dist/integration-core.js.map +1 -0
- package/dist/integrator.d.ts +343 -0
- package/dist/integrator.d.ts.map +1 -0
- package/dist/integrator.js +400 -0
- package/dist/integrator.js.map +1 -0
- package/dist/isolation.d.ts +219 -0
- package/dist/isolation.d.ts.map +1 -0
- package/dist/isolation.js +261 -0
- package/dist/isolation.js.map +1 -0
- package/dist/issue-provider.d.ts +349 -0
- package/dist/issue-provider.d.ts.map +1 -0
- package/dist/issue-provider.js +360 -0
- package/dist/issue-provider.js.map +1 -0
- package/dist/item-lock.d.ts +626 -0
- package/dist/item-lock.d.ts.map +1 -0
- package/dist/item-lock.js +1381 -0
- package/dist/item-lock.js.map +1 -0
- package/dist/item-path.d.ts +49 -0
- package/dist/item-path.d.ts.map +1 -0
- package/dist/item-path.js +66 -0
- package/dist/item-path.js.map +1 -0
- package/dist/ledger-lint.d.ts +129 -0
- package/dist/ledger-lint.d.ts.map +1 -0
- package/dist/ledger-lint.js +249 -0
- package/dist/ledger-lint.js.map +1 -0
- package/dist/ledger-read.d.ts +357 -0
- package/dist/ledger-read.d.ts.map +1 -0
- package/dist/ledger-read.js +442 -0
- package/dist/ledger-read.js.map +1 -0
- package/dist/ledger-write.d.ts +330 -0
- package/dist/ledger-write.d.ts.map +1 -0
- package/dist/ledger-write.js +411 -0
- package/dist/ledger-write.js.map +1 -0
- package/dist/lifecycle-gather.d.ts +30 -0
- package/dist/lifecycle-gather.d.ts.map +1 -0
- package/dist/lifecycle-gather.js +205 -0
- package/dist/lifecycle-gather.js.map +1 -0
- package/dist/lifecycle-pools.d.ts +180 -0
- package/dist/lifecycle-pools.d.ts.map +1 -0
- package/dist/lifecycle-pools.js +78 -0
- package/dist/lifecycle-pools.js.map +1 -0
- package/dist/merge-question-surfacer.d.ts +166 -0
- package/dist/merge-question-surfacer.d.ts.map +1 -0
- package/dist/merge-question-surfacer.js +297 -0
- package/dist/merge-question-surfacer.js.map +1 -0
- package/dist/mint-adr.d.ts +126 -0
- package/dist/mint-adr.d.ts.map +1 -0
- package/dist/mint-adr.js +257 -0
- package/dist/mint-adr.js.map +1 -0
- package/dist/mirror-pool-scan.d.ts +125 -0
- package/dist/mirror-pool-scan.d.ts.map +1 -0
- package/dist/mirror-pool-scan.js +104 -0
- package/dist/mirror-pool-scan.js.map +1 -0
- package/dist/needs-attention.d.ts +341 -0
- package/dist/needs-attention.d.ts.map +1 -0
- package/dist/needs-attention.js +900 -0
- package/dist/needs-attention.js.map +1 -0
- package/dist/orphan-sidecar.d.ts +79 -0
- package/dist/orphan-sidecar.d.ts.map +1 -0
- package/dist/orphan-sidecar.js +71 -0
- package/dist/orphan-sidecar.js.map +1 -0
- package/dist/output.d.ts +48 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +66 -0
- package/dist/output.js.map +1 -0
- package/dist/pi-harness.d.ts +179 -0
- package/dist/pi-harness.d.ts.map +1 -0
- package/dist/pi-harness.js +342 -0
- package/dist/pi-harness.js.map +1 -0
- package/dist/placement.d.ts +99 -0
- package/dist/placement.d.ts.map +1 -0
- package/dist/placement.js +67 -0
- package/dist/placement.js.map +1 -0
- package/dist/prd-to-spec.d.ts +315 -0
- package/dist/prd-to-spec.d.ts.map +1 -0
- package/dist/prd-to-spec.js +684 -0
- package/dist/prd-to-spec.js.map +1 -0
- package/dist/prepare.d.ts +121 -0
- package/dist/prepare.d.ts.map +1 -0
- package/dist/prepare.js +140 -0
- package/dist/prepare.js.map +1 -0
- package/dist/prompt.d.ts +360 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +499 -0
- package/dist/prompt.js.map +1 -0
- package/dist/protocol/ADR-FORMAT.md +47 -0
- package/dist/protocol/CLAIM-PROTOCOL.md +217 -0
- package/dist/protocol/REVIEW-PROTOCOL.md +119 -0
- package/dist/protocol/SURFACE-PROTOCOL.md +121 -0
- package/dist/protocol/TASKING-PROTOCOL.md +122 -0
- package/dist/protocol/WORK-CONTRACT.md +276 -0
- package/dist/protocol/spec-template.md +71 -0
- package/dist/protocol/task-template.md +65 -0
- package/dist/readiness.d.ts +66 -0
- package/dist/readiness.d.ts.map +1 -0
- package/dist/readiness.js +36 -0
- package/dist/readiness.js.map +1 -0
- package/dist/reap-branches.d.ts +102 -0
- package/dist/reap-branches.d.ts.map +1 -0
- package/dist/reap-branches.js +149 -0
- package/dist/reap-branches.js.map +1 -0
- package/dist/recover-isolated.d.ts +72 -0
- package/dist/recover-isolated.d.ts.map +1 -0
- package/dist/recover-isolated.js +188 -0
- package/dist/recover-isolated.js.map +1 -0
- package/dist/registry.d.ts +172 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +296 -0
- package/dist/registry.js.map +1 -0
- package/dist/repo-config.d.ts +201 -0
- package/dist/repo-config.d.ts.map +1 -0
- package/dist/repo-config.js +414 -0
- package/dist/repo-config.js.map +1 -0
- package/dist/repo-key.d.ts +20 -0
- package/dist/repo-key.d.ts.map +1 -0
- package/dist/repo-key.js +68 -0
- package/dist/repo-key.js.map +1 -0
- package/dist/repo-mirror.d.ts +177 -0
- package/dist/repo-mirror.d.ts.map +1 -0
- package/dist/repo-mirror.js +271 -0
- package/dist/repo-mirror.js.map +1 -0
- package/dist/retry-backoff.d.ts +90 -0
- package/dist/retry-backoff.d.ts.map +1 -0
- package/dist/retry-backoff.js +98 -0
- package/dist/retry-backoff.js.map +1 -0
- package/dist/review-gate.d.ts +173 -0
- package/dist/review-gate.d.ts.map +1 -0
- package/dist/review-gate.js +261 -0
- package/dist/review-gate.js.map +1 -0
- package/dist/review-verdict.d.ts +149 -0
- package/dist/review-verdict.d.ts.map +1 -0
- package/dist/review-verdict.js +332 -0
- package/dist/review-verdict.js.map +1 -0
- package/dist/run.d.ts +221 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +963 -0
- package/dist/run.js.map +1 -0
- package/dist/scan.d.ts +308 -0
- package/dist/scan.d.ts.map +1 -0
- package/dist/scan.js +374 -0
- package/dist/scan.js.map +1 -0
- package/dist/select-order.d.ts +75 -0
- package/dist/select-order.d.ts.map +1 -0
- package/dist/select-order.js +108 -0
- package/dist/select-order.js.map +1 -0
- package/dist/select-priority.d.ts +188 -0
- package/dist/select-priority.d.ts.map +1 -0
- package/dist/select-priority.js +80 -0
- package/dist/select-priority.js.map +1 -0
- package/dist/select.d.ts +25 -0
- package/dist/select.d.ts.map +1 -0
- package/dist/select.js +43 -0
- package/dist/select.js.map +1 -0
- package/dist/session-path.d.ts +36 -0
- package/dist/session-path.d.ts.map +1 -0
- package/dist/session-path.js +129 -0
- package/dist/session-path.js.map +1 -0
- package/dist/sidecar-apply.d.ts +83 -0
- package/dist/sidecar-apply.d.ts.map +1 -0
- package/dist/sidecar-apply.js +111 -0
- package/dist/sidecar-apply.js.map +1 -0
- package/dist/sidecar.d.ts +245 -0
- package/dist/sidecar.d.ts.map +1 -0
- package/dist/sidecar.js +481 -0
- package/dist/sidecar.js.map +1 -0
- package/dist/slug-namespace.d.ts +204 -0
- package/dist/slug-namespace.d.ts.map +1 -0
- package/dist/slug-namespace.js +229 -0
- package/dist/slug-namespace.js.map +1 -0
- package/dist/spec-complete.d.ts +44 -0
- package/dist/spec-complete.d.ts.map +1 -0
- package/dist/spec-complete.js +69 -0
- package/dist/spec-complete.js.map +1 -0
- package/dist/start.d.ts +97 -0
- package/dist/start.d.ts.map +1 -0
- package/dist/start.js +633 -0
- package/dist/start.js.map +1 -0
- package/dist/status.d.ts +199 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +228 -0
- package/dist/status.js.map +1 -0
- package/dist/surface-gate.d.ts +162 -0
- package/dist/surface-gate.d.ts.map +1 -0
- package/dist/surface-gate.js +206 -0
- package/dist/surface-gate.js.map +1 -0
- package/dist/surface-persist.d.ts +86 -0
- package/dist/surface-persist.d.ts.map +1 -0
- package/dist/surface-persist.js +129 -0
- package/dist/surface-persist.js.map +1 -0
- package/dist/tasker-review-loop.d.ts +249 -0
- package/dist/tasker-review-loop.d.ts.map +1 -0
- package/dist/tasker-review-loop.js +369 -0
- package/dist/tasker-review-loop.js.map +1 -0
- package/dist/tasking-eligibility.d.ts +74 -0
- package/dist/tasking-eligibility.d.ts.map +1 -0
- package/dist/tasking-eligibility.js +52 -0
- package/dist/tasking-eligibility.js.map +1 -0
- package/dist/tasking-lock.d.ts +111 -0
- package/dist/tasking-lock.d.ts.map +1 -0
- package/dist/tasking-lock.js +256 -0
- package/dist/tasking-lock.js.map +1 -0
- package/dist/tasking.d.ts +275 -0
- package/dist/tasking.d.ts.map +1 -0
- package/dist/tasking.js +952 -0
- package/dist/tasking.js.map +1 -0
- package/dist/triage-gate.d.ts +127 -0
- package/dist/triage-gate.d.ts.map +1 -0
- package/dist/triage-gate.js +139 -0
- package/dist/triage-gate.js.map +1 -0
- package/dist/triage-persist.d.ts +163 -0
- package/dist/triage-persist.d.ts.map +1 -0
- package/dist/triage-persist.js +387 -0
- package/dist/triage-persist.js.map +1 -0
- package/dist/verdict-json.d.ts +32 -0
- package/dist/verdict-json.d.ts.map +1 -0
- package/dist/verdict-json.js +74 -0
- package/dist/verdict-json.js.map +1 -0
- package/dist/verify-workflow-template.d.ts +60 -0
- package/dist/verify-workflow-template.d.ts.map +1 -0
- package/dist/verify-workflow-template.js +126 -0
- package/dist/verify-workflow-template.js.map +1 -0
- package/dist/verify.d.ts +60 -0
- package/dist/verify.d.ts.map +1 -0
- package/dist/verify.js +62 -0
- package/dist/verify.js.map +1 -0
- package/dist/watch-session.d.ts +112 -0
- package/dist/watch-session.d.ts.map +1 -0
- package/dist/watch-session.js +347 -0
- package/dist/watch-session.js.map +1 -0
- package/dist/work-layout.d.ts +198 -0
- package/dist/work-layout.d.ts.map +1 -0
- package/dist/work-layout.js +217 -0
- package/dist/work-layout.js.map +1 -0
- package/dist/work-on.d.ts +154 -0
- package/dist/work-on.d.ts.map +1 -0
- package/dist/work-on.js +387 -0
- package/dist/work-on.js.map +1 -0
- package/dist/workspace.d.ts +224 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +325 -0
- package/dist/workspace.js.map +1 -0
- package/package.json +46 -2
- package/src/advance-ci-template.ts +203 -0
- package/src/advance-classify.ts +197 -0
- package/src/advance-drivers.ts +414 -0
- package/src/advance-isolated.ts +432 -0
- package/src/advance-lifecycle-template.ts +791 -0
- package/src/advance-loop-driver.ts +745 -0
- package/src/advance-treeless-publish.ts +177 -0
- package/src/advance.ts +1564 -0
- package/src/advancing-lock.ts +988 -0
- package/src/agent-launch.ts +137 -0
- package/src/agent-stop.ts +361 -0
- package/src/apply-decide.ts +242 -0
- package/src/apply-merge-action.ts +502 -0
- package/src/apply-persist.ts +518 -0
- package/src/arbiter.ts +372 -0
- package/src/brand.ts +111 -0
- package/src/buildable-body.ts +196 -0
- package/src/categorise.ts +158 -0
- package/src/claim-cas.ts +513 -0
- package/src/cli-spinner.ts +225 -0
- package/src/cli.ts +4369 -0
- package/src/close-job-template.ts +236 -0
- package/src/close-job.ts +319 -0
- package/src/complete.ts +1379 -0
- package/src/concurrency.ts +151 -0
- package/src/config-override.ts +116 -0
- package/src/config.ts +883 -0
- package/src/continue-branch.ts +542 -0
- package/src/cwd-section.ts +392 -0
- package/src/decision-engine.ts +272 -0
- package/src/detect.ts +124 -0
- package/src/do-autopick.ts +223 -0
- package/src/do-config.ts +589 -0
- package/src/do-remote-auto.ts +197 -0
- package/src/do.ts +2623 -0
- package/src/drop-source.ts +194 -0
- package/src/eligibility.ts +79 -0
- package/src/env-config.ts +305 -0
- package/src/failure-cause.ts +142 -0
- package/src/format.ts +313 -0
- package/src/frontmatter.ts +485 -0
- package/src/gate-readiness.ts +147 -0
- package/src/gc.ts +510 -0
- package/src/gh-failure.ts +53 -0
- package/src/git.ts +186 -0
- package/src/github.ts +468 -0
- package/src/harness.ts +355 -0
- package/src/identity.ts +322 -0
- package/src/index.ts +785 -0
- package/src/install-ci-branch-protection.ts +255 -0
- package/src/install-ci-capabilities/advance-lifecycle.ts +34 -0
- package/src/install-ci-capabilities/close-job.ts +32 -0
- package/src/install-ci-capabilities/example-noop.ts +24 -0
- package/src/install-ci-capabilities/intake.ts +34 -0
- package/src/install-ci-capabilities/verify.ts +33 -0
- package/src/install-ci-core.ts +1088 -0
- package/src/install-ci-github.ts +376 -0
- package/src/install-ci.ts +552 -0
- package/src/intake-event.ts +102 -0
- package/src/intake-marker.ts +195 -0
- package/src/intake-triage.ts +138 -0
- package/src/intake-trigger-template.ts +591 -0
- package/src/intake.ts +2445 -0
- package/src/integration-core.ts +3065 -0
- package/src/integrator.ts +771 -0
- package/src/isolation.ts +484 -0
- package/src/issue-provider.ts +733 -0
- package/src/item-lock.ts +1858 -0
- package/src/item-path.ts +75 -0
- package/src/ledger-lint.ts +332 -0
- package/src/ledger-read.ts +924 -0
- package/src/ledger-write.ts +865 -0
- package/src/lifecycle-gather.ts +298 -0
- package/src/lifecycle-pools.ts +250 -0
- package/src/merge-question-surfacer.ts +496 -0
- package/src/mint-adr.ts +362 -0
- package/src/mirror-pool-scan.ts +240 -0
- package/src/needs-attention.ts +1506 -0
- package/src/orphan-sidecar.ts +150 -0
- package/src/output.ts +89 -0
- package/src/pi-harness.ts +403 -0
- package/src/placement.ts +131 -0
- package/src/prd-to-spec.ts +1023 -0
- package/src/prepare.ts +230 -0
- package/src/prompt.ts +760 -0
- package/src/readiness.ts +98 -0
- package/src/reap-branches.ts +278 -0
- package/src/recover-isolated.ts +276 -0
- package/src/registry.ts +475 -0
- package/src/repo-config.ts +550 -0
- package/src/repo-key.ts +74 -0
- package/src/repo-mirror.ts +367 -0
- package/src/retry-backoff.ts +130 -0
- package/src/review-gate.ts +389 -0
- package/src/review-verdict.ts +422 -0
- package/src/run.ts +1430 -0
- package/src/scan.ts +611 -0
- package/src/select-order.ts +143 -0
- package/src/select-priority.ts +266 -0
- package/src/select.ts +62 -0
- package/src/session-path.ts +153 -0
- package/src/sidecar-apply.ts +216 -0
- package/src/sidecar.ts +700 -0
- package/src/slug-namespace.ts +367 -0
- package/src/spec-complete.ts +118 -0
- package/src/start.ts +974 -0
- package/src/status.ts +441 -0
- package/src/surface-gate.ts +337 -0
- package/src/surface-persist.ts +241 -0
- package/src/tasker-review-loop.ts +671 -0
- package/src/tasking-eligibility.ts +114 -0
- package/src/tasking-lock.ts +416 -0
- package/src/tasking.ts +1438 -0
- package/src/triage-gate.ts +248 -0
- package/src/triage-persist.ts +570 -0
- package/src/verdict-json.ts +73 -0
- package/src/verify-workflow-template.ts +159 -0
- package/src/verify.ts +123 -0
- package/src/watch-session.ts +397 -0
- package/src/work-layout.ts +262 -0
- package/src/work-on.ts +660 -0
- package/src/workspace.ts +502 -0
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Map the shared harness/adapter flags into a {@link PartialConfig} of overrides
|
|
3
|
+
* — the per-key mapping `run` and `do` both reuse. Only flags actually present
|
|
4
|
+
* contribute (absent flag ⇒ absent key), so the override layer never clobbers a
|
|
5
|
+
* lower precedence source with `undefined`. `--harness` is validated against the
|
|
6
|
+
* `HarnessAdapter` union (an out-of-range value is dropped, matching `run`).
|
|
7
|
+
*/
|
|
8
|
+
export function harnessFlagOverrides(flags) {
|
|
9
|
+
const overrides = {};
|
|
10
|
+
if (flags.agentCmd !== undefined) {
|
|
11
|
+
overrides.agentCmd = flags.agentCmd;
|
|
12
|
+
}
|
|
13
|
+
if (flags.model !== undefined) {
|
|
14
|
+
overrides.model = flags.model;
|
|
15
|
+
}
|
|
16
|
+
if (flags.harness === 'null' || flags.harness === 'pi') {
|
|
17
|
+
overrides.harness = flags.harness;
|
|
18
|
+
}
|
|
19
|
+
if (flags.piBin !== undefined) {
|
|
20
|
+
overrides.piBin = flags.piBin;
|
|
21
|
+
}
|
|
22
|
+
if (flags.sessionsDir !== undefined) {
|
|
23
|
+
overrides.sessionsDir = flags.sessionsDir;
|
|
24
|
+
}
|
|
25
|
+
return overrides;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Build the flag-override `PartialConfig` for the `do` command. This is the FIX
|
|
29
|
+
* for the silent-drop bug: `do` DECLARES `--harness`/`--agent-cmd`/`--pi-bin`/
|
|
30
|
+
* `--model`, so its action MUST thread them into `resolveRepoConfig`'s `flags`
|
|
31
|
+
* — not just `{integration}`. It reuses the SAME per-key mapping `run` uses
|
|
32
|
+
* ({@link harnessFlagOverrides}), then folds in the integrate-time mode (the
|
|
33
|
+
* already-resolved `--merge`/`--propose`, via `integrationFromFlags`) so the
|
|
34
|
+
* full set rides the same precedence chain (flag > env > per-repo > global >
|
|
35
|
+
* default).
|
|
36
|
+
*/
|
|
37
|
+
export function doFlagOverrides(flags, integration) {
|
|
38
|
+
const overrides = {
|
|
39
|
+
...harnessFlagOverrides(flags),
|
|
40
|
+
// `--observation-triage <off|ask|auto>` rides the SAME flag-override chain
|
|
41
|
+
// (flag > env > per-repo > global > default): the observation-inbox gate.
|
|
42
|
+
...observationTriageFlagOverrides(flags),
|
|
43
|
+
// `--surface-blockers`/`--no-surface-blockers` rides the SAME chain: the
|
|
44
|
+
// boolean gate over DECLARED blocked work (the orthogonal peer of
|
|
45
|
+
// `--observation-triage`).
|
|
46
|
+
...surfaceBlockersFlagOverrides(flags),
|
|
47
|
+
// `--merge-questions <off|ask|auto>` rides the SAME flag-override chain
|
|
48
|
+
// (flag > env > per-repo > global > default `ask`): the 3-state gate over
|
|
49
|
+
// the merge-question SURFACER (prd `land-time-reverify-and-parallel-
|
|
50
|
+
// merge-ceiling` Story 17 / task `merge-questions-gate-axis`). SEPARATE
|
|
51
|
+
// axis from `--observation-triage` with a HIGHER default — NEVER rides
|
|
52
|
+
// `--observation-triage`.
|
|
53
|
+
...mergeQuestionsFlagOverrides(flags),
|
|
54
|
+
// `--strict-merge-approval`/`--no-strict-merge-approval` rides the SAME
|
|
55
|
+
// flag-override chain (flag > env > per-repo > global > default `false`):
|
|
56
|
+
// the OPT-IN strictness layered on the OQ6 stale-approval default. SEPARATE
|
|
57
|
+
// axis from `--merge-questions` — the re-surface vs. land branch is
|
|
58
|
+
// `apply-rung-merge-disposition`'s consumer; this only resolves the boolean.
|
|
59
|
+
...strictMergeApprovalFlagOverrides(flags),
|
|
60
|
+
// `--selection-order <order>` rides the SAME flag-override chain (flag > env >
|
|
61
|
+
// per-repo > global > default): a comma-separated value becomes a list (an
|
|
62
|
+
// explicit pool order), otherwise the verbatim string (a preset keyword). The
|
|
63
|
+
// resolver (`select-order.ts`) validates/expands it at selection time.
|
|
64
|
+
...selectionOrderFlagOverrides(flags),
|
|
65
|
+
// Gate 2 (PR/code review) flags ride the SAME flag-override path so
|
|
66
|
+
// `--review`/`--review-model`/`--review-max-rounds` resolve
|
|
67
|
+
// flag > env > per-repo > global > default, exactly like the harness flags.
|
|
68
|
+
...reviewFlagOverrides(flags),
|
|
69
|
+
// The tasker IMPROVER-loop family (`--tasker-loop`/`--no-tasker-loop`/
|
|
70
|
+
// `--tasker-loop-max`/`--tasker-loop-model`) rides the same chain — a DISTINCT
|
|
71
|
+
// family from the gate's `--review*`, never sharing a flag/key/field name.
|
|
72
|
+
// The flag fields bridge onto the `taskerLoop*` config keys.
|
|
73
|
+
...taskerLoopFlagOverrides(flags),
|
|
74
|
+
// `--fresh-worktree-gate`/`--no-fresh-worktree-gate` (run the acceptance gate
|
|
75
|
+
// against the REBASED tip in a clean throwaway worktree, ON by default) rides
|
|
76
|
+
// the SAME chain — a DISTINCT family from `--review*`/`--tasker-loop*`.
|
|
77
|
+
...freshWorktreeGateFlagOverrides(flags),
|
|
78
|
+
// `--no-pr` (the PR-INTENT axis): suppress the PR even on an authed GitHub
|
|
79
|
+
// arbiter. Rides the SAME flag > env > per-repo > global > default chain.
|
|
80
|
+
...noPRFlagOverrides(flags),
|
|
81
|
+
// `--merge-retries <n>` (the cross-job merge serialiser's CAS-retry cap — prd
|
|
82
|
+
// `land-time-reverify-and-parallel-merge-ceiling` Story 5 / Applied Answer
|
|
83
|
+
// q1 (a)) rides the SAME chain (flag > env > per-repo > global > default).
|
|
84
|
+
...mergeRetriesFlagOverrides(flags),
|
|
85
|
+
};
|
|
86
|
+
if (integration !== undefined) {
|
|
87
|
+
// An explicit `--merge`/`--propose` flag ALWAYS wins for the transition this
|
|
88
|
+
// command runs. `do` runs EITHER the build transition (a task) OR the tasking
|
|
89
|
+
// transition (a `do prd:`) per invocation, and the typed flag is
|
|
90
|
+
// transition-AGNOSTIC, so it must override BOTH the build mode (`integration`)
|
|
91
|
+
// AND the tasking mode (`taskingIntegration`). Setting both at the top of the
|
|
92
|
+
// precedence chain means a `--propose` on a `taskingIntegration:'merge'` repo
|
|
93
|
+
// proposes the tasking too (the tasking path reads `taskingIntegration ??
|
|
94
|
+
// integration`, and the flag-set `taskingIntegration` shadows the config one).
|
|
95
|
+
// (`per-transition-integration-mode-slicing-vs-build`.)
|
|
96
|
+
overrides.integration = integration;
|
|
97
|
+
overrides.taskingIntegration = integration;
|
|
98
|
+
}
|
|
99
|
+
return overrides;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Map the Gate-2 review flags into a {@link PartialConfig} of overrides — the
|
|
103
|
+
* per-key mapping `do` and `complete` both reuse. Only flags actually present
|
|
104
|
+
* contribute (absent flag ⇒ absent key), so the override layer never clobbers a
|
|
105
|
+
* lower-precedence source with `undefined`. `--review-max-rounds` is parsed to a
|
|
106
|
+
* number; a non-numeric value is dropped (the lower layer / default decides).
|
|
107
|
+
*/
|
|
108
|
+
export function reviewFlagOverrides(flags) {
|
|
109
|
+
const overrides = {};
|
|
110
|
+
if (flags.review !== undefined) {
|
|
111
|
+
overrides.review = flags.review;
|
|
112
|
+
}
|
|
113
|
+
if (flags.reviewModel !== undefined) {
|
|
114
|
+
overrides.reviewModel = flags.reviewModel;
|
|
115
|
+
}
|
|
116
|
+
if (flags.reviewMaxRounds !== undefined) {
|
|
117
|
+
const n = Number(flags.reviewMaxRounds);
|
|
118
|
+
if (flags.reviewMaxRounds.trim() !== '' && !Number.isNaN(n)) {
|
|
119
|
+
overrides.reviewMaxRounds = n;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return overrides;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Map the tasker IMPROVER-loop flags into a {@link PartialConfig} of overrides.
|
|
126
|
+
* Only flags actually present contribute (absent flag ⇒ absent key), so the
|
|
127
|
+
* override layer never clobbers a lower-precedence source with `undefined`.
|
|
128
|
+
* `--tasker-loop-max` is parsed to a number; a non-numeric value is dropped (the
|
|
129
|
+
* lower layer / default decides). A DISTINCT family from {@link reviewFlagOverrides}.
|
|
130
|
+
*
|
|
131
|
+
* The tasking-vocabulary FLAG fields (`taskerLoop*`) bridge onto the
|
|
132
|
+
* `taskerLoop*` CONFIG KEYS, so the operator types `--tasker-loop` and the value
|
|
133
|
+
* resolves through the standard precedence into `config.taskerLoop`.
|
|
134
|
+
*/
|
|
135
|
+
export function taskerLoopFlagOverrides(flags) {
|
|
136
|
+
const overrides = {};
|
|
137
|
+
if (flags.taskerLoop !== undefined) {
|
|
138
|
+
overrides.taskerLoop = flags.taskerLoop;
|
|
139
|
+
}
|
|
140
|
+
if (flags.taskerLoopMax !== undefined) {
|
|
141
|
+
const n = Number(flags.taskerLoopMax);
|
|
142
|
+
if (flags.taskerLoopMax.trim() !== '' && !Number.isNaN(n)) {
|
|
143
|
+
overrides.taskerLoopMax = n;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (flags.taskerLoopModel !== undefined) {
|
|
147
|
+
overrides.taskerLoopModel = flags.taskerLoopModel;
|
|
148
|
+
}
|
|
149
|
+
return overrides;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Map the `--fresh-worktree-gate`/`--no-fresh-worktree-gate` flag into a
|
|
153
|
+
* {@link PartialConfig} override. Only a present flag contributes (absent ⇒
|
|
154
|
+
* absent key), so the override layer never clobbers a lower-precedence source
|
|
155
|
+
* with `undefined`. A negatable boolean (mirrors `taskerLoop`), so the caller
|
|
156
|
+
* leaves `freshWorktreeGate` UNDEFINED unless the user explicitly passed the
|
|
157
|
+
* flag (see the cli's option-source read).
|
|
158
|
+
*/
|
|
159
|
+
export function freshWorktreeGateFlagOverrides(flags) {
|
|
160
|
+
const overrides = {};
|
|
161
|
+
if (flags.freshWorktreeGate !== undefined) {
|
|
162
|
+
overrides.freshWorktreeGate = flags.freshWorktreeGate;
|
|
163
|
+
}
|
|
164
|
+
return overrides;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Map the `--selection-order` flag into a {@link PartialConfig} override. Only a
|
|
168
|
+
* present flag contributes (absent ⇒ absent key). A value CONTAINING a comma is
|
|
169
|
+
* parsed into a trimmed, non-empty list (an explicit pool order, mirroring the
|
|
170
|
+
* env `'list'` coercion); otherwise it is the verbatim string (a preset keyword
|
|
171
|
+
* or a single pool name). The resolver (`select-order.ts`) does the
|
|
172
|
+
* validation/expansion + loud failure at selection time — this only normalises
|
|
173
|
+
* the flag's surface syntax.
|
|
174
|
+
*/
|
|
175
|
+
export function selectionOrderFlagOverrides(flags) {
|
|
176
|
+
const overrides = {};
|
|
177
|
+
if (flags.selectionOrder !== undefined) {
|
|
178
|
+
const raw = flags.selectionOrder;
|
|
179
|
+
overrides.selectionOrder = raw.includes(',')
|
|
180
|
+
? raw
|
|
181
|
+
.split(',')
|
|
182
|
+
.map((s) => s.trim())
|
|
183
|
+
.filter((s) => s !== '')
|
|
184
|
+
: raw;
|
|
185
|
+
}
|
|
186
|
+
return overrides;
|
|
187
|
+
}
|
|
188
|
+
/** The valid `--observation-triage` values (mirrors the env enum coercion). */
|
|
189
|
+
const OBSERVATION_TRIAGE_VALUES = [
|
|
190
|
+
'off',
|
|
191
|
+
'ask',
|
|
192
|
+
'auto',
|
|
193
|
+
];
|
|
194
|
+
/**
|
|
195
|
+
* Map the `--observation-triage` flag into a {@link PartialConfig} override. Only
|
|
196
|
+
* a present flag contributes (absent ⇒ absent key). An INVALID value FAILS LOUDLY
|
|
197
|
+
* (the same loud-failure contract the env enum coercion enforces) rather than
|
|
198
|
+
* silently falling through to a lower layer — a typo on an autonomy gate must
|
|
199
|
+
* never be quietly ignored.
|
|
200
|
+
*/
|
|
201
|
+
export function observationTriageFlagOverrides(flags) {
|
|
202
|
+
const overrides = {};
|
|
203
|
+
if (flags.observationTriage !== undefined) {
|
|
204
|
+
const raw = flags.observationTriage;
|
|
205
|
+
if (!OBSERVATION_TRIAGE_VALUES.includes(raw)) {
|
|
206
|
+
throw new Error(`Invalid value for --observation-triage: '${raw}'. ` +
|
|
207
|
+
`Expected one of: ${OBSERVATION_TRIAGE_VALUES.join(', ')}.`);
|
|
208
|
+
}
|
|
209
|
+
overrides.observationTriage = raw;
|
|
210
|
+
}
|
|
211
|
+
return overrides;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Map the `--surface-blockers` flag into a {@link PartialConfig} override. Only a
|
|
215
|
+
* present flag contributes (absent ⇒ absent key), so the override layer never
|
|
216
|
+
* clobbers a lower-precedence source with `undefined`. A negatable boolean, so the
|
|
217
|
+
* caller leaves `surfaceBlockers` UNDEFINED unless the user explicitly passed
|
|
218
|
+
* `--surface-blockers`/`--no-surface-blockers` (see the cli's option-source read).
|
|
219
|
+
*/
|
|
220
|
+
export function surfaceBlockersFlagOverrides(flags) {
|
|
221
|
+
const overrides = {};
|
|
222
|
+
if (flags.surfaceBlockers !== undefined) {
|
|
223
|
+
overrides.surfaceBlockers = flags.surfaceBlockers;
|
|
224
|
+
}
|
|
225
|
+
return overrides;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Map the `--merge-retries <n>` flag into a {@link PartialConfig} override. Only
|
|
229
|
+
* a present flag contributes (absent ⇒ absent key), so the override layer never
|
|
230
|
+
* clobbers a lower-precedence source with `undefined`. The value MUST be a
|
|
231
|
+
* NON-NEGATIVE integer (`0` is meaningful — it disables the retry, the
|
|
232
|
+
* un-retried path the engine's tests pin); a non-integer / negative value is
|
|
233
|
+
* dropped silently so the lower layer / default decides (mirrors
|
|
234
|
+
* {@link reviewFlagOverrides}'s parse-or-drop on `--review-max-rounds`).
|
|
235
|
+
*/
|
|
236
|
+
export function mergeRetriesFlagOverrides(flags) {
|
|
237
|
+
const overrides = {};
|
|
238
|
+
if (flags.mergeRetries !== undefined) {
|
|
239
|
+
const raw = flags.mergeRetries;
|
|
240
|
+
if (raw.trim() !== '') {
|
|
241
|
+
const n = Number(raw);
|
|
242
|
+
if (Number.isInteger(n) && n >= 0) {
|
|
243
|
+
overrides.mergeRetries = n;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return overrides;
|
|
248
|
+
}
|
|
249
|
+
/** The valid `--merge-questions` values (mirrors the env enum coercion). */
|
|
250
|
+
const MERGE_QUESTIONS_VALUES = [
|
|
251
|
+
'off',
|
|
252
|
+
'ask',
|
|
253
|
+
'auto',
|
|
254
|
+
];
|
|
255
|
+
/**
|
|
256
|
+
* Map the `--merge-questions` flag into a {@link PartialConfig} override. Only a
|
|
257
|
+
* present flag contributes (absent ⇒ absent key). An INVALID value FAILS LOUDLY
|
|
258
|
+
* (the same loud-failure contract `--observation-triage` enforces) rather than
|
|
259
|
+
* silently falling through — a typo on a question-surfacing gate must never be
|
|
260
|
+
* quietly ignored.
|
|
261
|
+
*/
|
|
262
|
+
export function mergeQuestionsFlagOverrides(flags) {
|
|
263
|
+
const overrides = {};
|
|
264
|
+
if (flags.mergeQuestions !== undefined) {
|
|
265
|
+
const raw = flags.mergeQuestions;
|
|
266
|
+
if (!MERGE_QUESTIONS_VALUES.includes(raw)) {
|
|
267
|
+
throw new Error(`Invalid value for --merge-questions: '${raw}'. ` +
|
|
268
|
+
`Expected one of: ${MERGE_QUESTIONS_VALUES.join(', ')}.`);
|
|
269
|
+
}
|
|
270
|
+
overrides.mergeQuestions = raw;
|
|
271
|
+
}
|
|
272
|
+
return overrides;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Map the `--strict-merge-approval`/`--no-strict-merge-approval` flag into a
|
|
276
|
+
* {@link PartialConfig} override. Only a present flag contributes (absent ⇒
|
|
277
|
+
* absent key), so the override layer never clobbers a lower-precedence source
|
|
278
|
+
* with `undefined`. A negatable boolean (mirrors
|
|
279
|
+
* {@link freshWorktreeGateFlagOverrides}): the caller leaves
|
|
280
|
+
* `strictMergeApproval` UNDEFINED unless the user explicitly passed the flag.
|
|
281
|
+
*/
|
|
282
|
+
export function strictMergeApprovalFlagOverrides(flags) {
|
|
283
|
+
const overrides = {};
|
|
284
|
+
if (flags.strictMergeApproval !== undefined) {
|
|
285
|
+
overrides.strictMergeApproval = flags.strictMergeApproval;
|
|
286
|
+
}
|
|
287
|
+
return overrides;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Map the `--no-pr` flag into a {@link PartialConfig} override. Only an explicit
|
|
291
|
+
* `--no-pr` (commander's `pr === false`) contributes `noPR: true`; otherwise the
|
|
292
|
+
* key stays absent so the lower layer (env / per-repo / global / default) decides.
|
|
293
|
+
*/
|
|
294
|
+
export function noPRFlagOverrides(flags) {
|
|
295
|
+
const overrides = {};
|
|
296
|
+
if (flags.pr === false) {
|
|
297
|
+
overrides.noPR = true;
|
|
298
|
+
}
|
|
299
|
+
return overrides;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* The null-default guard: the `null` adapter shells out to `agentCmd`, so it is
|
|
303
|
+
* required there; the `pi` adapter invokes the pi CLI directly and does not
|
|
304
|
+
* consume `agentCmd`. Returns `true` when the resolved config selects the null
|
|
305
|
+
* adapter with no `agentCmd` — the case `do`/`run`/`--remote` must reject with a
|
|
306
|
+
* clear error ({@link NO_AGENT_CMD_MESSAGE}). All three CLI sites call THIS one
|
|
307
|
+
* predicate (named here so the fix's no-regression test can pin it).
|
|
308
|
+
*/
|
|
309
|
+
export function doNeedsAgentCmd(config) {
|
|
310
|
+
return config.harness !== 'pi' && config.agentCmd.trim() === '';
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* The shared up-front message for the {@link doNeedsAgentCmd} refusal. Names BOTH
|
|
314
|
+
* escape hatches: the `--harness pi` adapter (which needs no agentCmd) and
|
|
315
|
+
* setting `harness`/`agentCmd` in config. Shared so `do`/`run`/`--remote` speak
|
|
316
|
+
* with one voice (and the test that pins `--harness pi` only has to pin it once).
|
|
317
|
+
*/
|
|
318
|
+
export const NO_AGENT_CMD_MESSAGE = 'no harness configured and no agentCmd set — nothing would run. Pass ' +
|
|
319
|
+
'--harness pi (or set harness/agentCmd in .dorfl.json or global config).';
|
|
320
|
+
/**
|
|
321
|
+
* The shared up-front message for the PR-INTENT pre-flight refusal: a `propose`
|
|
322
|
+
* run on a GitHub arbiter intends a PR (`noPR` unset) but a `gh` AUTH/AVAILABILITY
|
|
323
|
+
* PROBE says `gh` cannot open one. Surfaced BEFORE any claim/onboard/build so no
|
|
324
|
+
* work is wasted, and naming EVERY real fix (auth `gh`, set a `providers.github`
|
|
325
|
+
* identity token, switch to `--merge`, or `--no-pr` to push without a PR). The
|
|
326
|
+
* honest-failure value the `noPR` axis buys: it disambiguates "I deliberately
|
|
327
|
+
* want no PR" from "I wanted a PR and silently didn't get one". Shared so the
|
|
328
|
+
* in-place + no-checkout `do` paths speak with one voice.
|
|
329
|
+
*/
|
|
330
|
+
export const PROPOSE_PR_INTENT_GH_UNAVAILABLE_MESSAGE = 'propose mode on a GitHub arbiter intends a PR, but `gh` is not ' +
|
|
331
|
+
'available/authenticated to open one. Run `gh auth login` (or set a ' +
|
|
332
|
+
'`providers.github` identity token), or pass `--merge` to land on main, or ' +
|
|
333
|
+
'`--no-pr` to push the branch without opening a PR.';
|
|
334
|
+
/**
|
|
335
|
+
* Should the PR-INTENT pre-flight guard FIRE for this run? It fires ONLY when ALL
|
|
336
|
+
* hold: the run is `propose` mode (not `merge` — merge never opens a PR), the
|
|
337
|
+
* arbiter is a GitHub URL (only then is a PR even possible), `noPR` is UNSET (the
|
|
338
|
+
* operator INTENDS a PR), and the injected `gh` auth/availability `probe` reports
|
|
339
|
+
* `gh` cannot open one. The probe (mirroring `GitHubProvider.available`) is
|
|
340
|
+
* the signal, NOT a config inspection: an ABSENT `providers.github` identity must
|
|
341
|
+
* NOT trip this guard — it falls back to AMBIENT `gh` auth (the common local-dev
|
|
342
|
+
* case), which the probe correctly reports as available. A genuinely TRANSIENT
|
|
343
|
+
* mid-run `gh` outage (the probe passes here but the API fails later) is left to
|
|
344
|
+
* the runtime degrade — the probe only catches the start-of-run unauthed case.
|
|
345
|
+
*/
|
|
346
|
+
export function shouldFailProposePrIntent(input) {
|
|
347
|
+
if (input.mode !== 'propose') {
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
if (!input.arbiterIsGitHub) {
|
|
351
|
+
return false;
|
|
352
|
+
}
|
|
353
|
+
if (input.noPR === true) {
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
return !input.ghCanOpenPr();
|
|
357
|
+
}
|
|
358
|
+
//# sourceMappingURL=do-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"do-config.js","sourceRoot":"","sources":["../src/do-config.ts"],"names":[],"mappings":"AA8BA;;;;;;GAMG;A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CAAC;QACzB,OAAO,KAAK,CAAC;IACd,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type DoRemoteOptions, type DoResult } from './do.js';
|
|
2
|
+
import { type LedgerReadStrategy } from './ledger-read.js';
|
|
3
|
+
import type { Config } from './config.js';
|
|
4
|
+
/**
|
|
5
|
+
* The MIRROR-SIDE auto-pick / `-n` caller for `do --remote` (prd `advance-loop`,
|
|
6
|
+
* task `advance-drivers-and-gates`, US #25) — the THIN caller the mirror-side
|
|
7
|
+
* eligible-pool scan (`mirror-side-eligible-pool-scan`) makes possible, the
|
|
8
|
+
* isolated counterpart of `do-autopick`'s in-place {@link performDoAuto}.
|
|
9
|
+
*
|
|
10
|
+
* It is the piece that lets the inline `-n`×`--remote` REFUSAL be removed: the
|
|
11
|
+
* refusal was a placeholder for "a remote/isolated auto-pick would need a
|
|
12
|
+
* mirror-side pool scan." That scan now EXISTS ({@link scanMirrorPool}), so this
|
|
13
|
+
* caller SELECTS + ORDERS items from the bare hub mirror's committed `main` (the
|
|
14
|
+
* SAME two pools, the SAME `selectPrioritised`, the SAME per-action gates) and
|
|
15
|
+
* runs the EXISTING {@link performDoRemote} pipeline per selected item,
|
|
16
|
+
* SEQUENTIALLY — it reimplements NOTHING.
|
|
17
|
+
*
|
|
18
|
+
* **`-n` is ALWAYS SEQUENTIAL (US #25).** Selecting N items from the mirror and
|
|
19
|
+
* running them one at a time is a dumb "run the remote tick N times" loop;
|
|
20
|
+
* parallelism over a remote pool is `run`'s concurrent loop or the CI matrix,
|
|
21
|
+
* NEVER `-n`. The per-action gate family is honoured by the SELECTION layer: the
|
|
22
|
+
* mirror scan only enumerates eligible tasks (gated on `autoBuild`) + taskable
|
|
23
|
+
* prds (gated on `autoTask`), so with a gate off that pool is empty.
|
|
24
|
+
*
|
|
25
|
+
* Each `performDoRemote` call idempotently `ensureMirror`s + re-fetches the SAME
|
|
26
|
+
* bare mirror (no re-clone), so looping it per item is cheap; the mirror scan
|
|
27
|
+
* `ensureMirror`s ONCE up front to read the freshest pool.
|
|
28
|
+
*/
|
|
29
|
+
/** The single-`do --remote` runner this caller drives per selected item. */
|
|
30
|
+
export type DoRemoteRunner = (options: DoRemoteOptions) => Promise<DoResult>;
|
|
31
|
+
/** Options shared with {@link performDoRemote}, threaded verbatim to each item. */
|
|
32
|
+
type SharedRemoteOptions = Omit<DoRemoteOptions, 'arg'>;
|
|
33
|
+
export interface PerformDoRemoteAutoOptions extends SharedRemoteOptions {
|
|
34
|
+
/**
|
|
35
|
+
* The resolved (remote) repo config — provides `autoBuild`/`autoTask` (the
|
|
36
|
+
* mirror scan applies them) and `selectionOrder` (the cross-pool order). The
|
|
37
|
+
* per-action gates are applied at the SELECTION layer, exactly as in-place.
|
|
38
|
+
*/
|
|
39
|
+
config: Config;
|
|
40
|
+
/**
|
|
41
|
+
* `do --remote -n <x>`: how many eligible items to do, IN SEQUENCE. Auto-pick
|
|
42
|
+
* (no arg, no count) ⇒ 1. SEQUENTIAL — never a parallelism knob (US #25).
|
|
43
|
+
*/
|
|
44
|
+
count?: number;
|
|
45
|
+
/** Override the single-`do --remote` runner (tests inject a stub). Defaults to {@link performDoRemote}. */
|
|
46
|
+
run?: DoRemoteRunner;
|
|
47
|
+
/** Override the read seam (mirror pool); defaults to the active {@link ledgerRead}. */
|
|
48
|
+
read?: LedgerReadStrategy;
|
|
49
|
+
/** Sink for a non-fatal mirror-config-read warning, forwarded to the scan. */
|
|
50
|
+
warn?: (message: string) => void;
|
|
51
|
+
}
|
|
52
|
+
/** The aggregate result of a multi-item `do --remote` invocation (mirrors `DoMultiResult`). */
|
|
53
|
+
export interface DoRemoteMultiResult {
|
|
54
|
+
results: DoResult[];
|
|
55
|
+
/** 0 iff every item that ran succeeded (an empty auto-pick is not a failure); else the first non-zero. */
|
|
56
|
+
exitCode: number;
|
|
57
|
+
message: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Run the `do --remote` AUTO-PICK / `-n <x>` form: ensure the hub mirror, scan its
|
|
61
|
+
* committed `main` for the two eligible pools (gated per-action), order + bound
|
|
62
|
+
* them by `count`, and run {@link performDoRemote} per selected item,
|
|
63
|
+
* SEQUENTIALLY.
|
|
64
|
+
*/
|
|
65
|
+
export declare function performDoRemoteAuto(options: PerformDoRemoteAutoOptions): Promise<DoRemoteMultiResult>;
|
|
66
|
+
/**
|
|
67
|
+
* Run the EXPLICIT multi-arg form (`do --remote <a> <b> …`): the NAMED items in
|
|
68
|
+
* the GIVEN order (no pool/priority — the operator chose them), each through the
|
|
69
|
+
* EXISTING {@link performDoRemote} pipeline, SEQUENTIALLY. No mirror scan is
|
|
70
|
+
* needed (the args are explicit); the per-item pipeline resolves each
|
|
71
|
+
* bare/`task:`/`prd:` arg itself.
|
|
72
|
+
*/
|
|
73
|
+
export declare function performDoRemoteArgs(args: string[], options: PerformDoRemoteAutoOptions): Promise<DoRemoteMultiResult>;
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=do-remote-auto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"do-remote-auto.d.ts","sourceRoot":"","sources":["../src/do-remote-auto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,eAAe,EAAE,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAG7E,OAAO,EAAa,KAAK,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAErE,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,4EAA4E;AAC5E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE7E,mFAAmF;AACnF,KAAK,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;AAExD,MAAM,WAAW,0BAA2B,SAAQ,mBAAmB;IACtE;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2GAA2G;IAC3G,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,uFAAuF;IACvF,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,8EAA8E;IAC9E,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,+FAA+F;AAC/F,MAAM,WAAW,mBAAmB;IACnC,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,0GAA0G;IAC1G,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACxC,OAAO,EAAE,0BAA0B,GACjC,OAAO,CAAC,mBAAmB,CAAC,CAqE9B;AAOD;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACxC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,0BAA0B,GACjC,OAAO,CAAC,mBAAmB,CAAC,CAe9B"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { performDoRemote } from './do.js';
|
|
2
|
+
import { ensureMirror } from './repo-mirror.js';
|
|
3
|
+
import { scanMirrorPool } from './mirror-pool-scan.js';
|
|
4
|
+
import { ledgerRead } from './ledger-read.js';
|
|
5
|
+
import { selectPrioritised } from './select-priority.js';
|
|
6
|
+
/**
|
|
7
|
+
* Run the `do --remote` AUTO-PICK / `-n <x>` form: ensure the hub mirror, scan its
|
|
8
|
+
* committed `main` for the two eligible pools (gated per-action), order + bound
|
|
9
|
+
* them by `count`, and run {@link performDoRemote} per selected item,
|
|
10
|
+
* SEQUENTIALLY.
|
|
11
|
+
*/
|
|
12
|
+
export async function performDoRemoteAuto(options) {
|
|
13
|
+
const run = options.run ?? performDoRemote;
|
|
14
|
+
const read = options.read ?? ledgerRead;
|
|
15
|
+
const note = options.note ?? (() => { });
|
|
16
|
+
const count = options.count ?? 1;
|
|
17
|
+
// Ensure (create/fetch) the bare hub mirror ONCE up front so the pool scan reads
|
|
18
|
+
// the freshest committed `main`. Each per-item `performDoRemote` re-ensures the
|
|
19
|
+
// SAME mirror idempotently (a fetch, never a re-clone).
|
|
20
|
+
let mirror;
|
|
21
|
+
try {
|
|
22
|
+
mirror = ensureMirror({
|
|
23
|
+
url: options.remote,
|
|
24
|
+
workspacesDir: options.workspacesDir,
|
|
25
|
+
env: options.env,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
30
|
+
note(message);
|
|
31
|
+
return { results: [], exitCode: 1, message };
|
|
32
|
+
}
|
|
33
|
+
// Scan the mirror's committed `main` for the SAME two pools the in-place scan
|
|
34
|
+
// enumerates (eligible tasks gated on `autoBuild`, taskable prds gated on
|
|
35
|
+
// `autoTask`), through the EXACT in-place predicates.
|
|
36
|
+
const scan = await scanMirrorPool({
|
|
37
|
+
mirrorPath: mirror.path,
|
|
38
|
+
config: options.config,
|
|
39
|
+
read,
|
|
40
|
+
warn: options.warn,
|
|
41
|
+
env: options.env,
|
|
42
|
+
});
|
|
43
|
+
// Order across both pools per the resolved `selectionOrder` + bound by count — the
|
|
44
|
+
// SAME shared, pure `selectPrioritised` the in-place + `run` drivers use.
|
|
45
|
+
const selected = selectPrioritised({
|
|
46
|
+
report: scan.report,
|
|
47
|
+
caps: {
|
|
48
|
+
maxParallel: Number.MAX_SAFE_INTEGER,
|
|
49
|
+
perRepoMax: Number.MAX_SAFE_INTEGER,
|
|
50
|
+
},
|
|
51
|
+
specs: scan.specs,
|
|
52
|
+
selectionOrder: options.config.selectionOrder,
|
|
53
|
+
count,
|
|
54
|
+
});
|
|
55
|
+
if (selected.length === 0) {
|
|
56
|
+
const message = 'Nothing eligible to do on the remote (no eligible tasks and no ' +
|
|
57
|
+
'taskable prds under the per-action gates).';
|
|
58
|
+
note(message);
|
|
59
|
+
return { results: [], exitCode: 0, message };
|
|
60
|
+
}
|
|
61
|
+
const shared = sharedRemoteOptions(options);
|
|
62
|
+
const results = [];
|
|
63
|
+
for (const item of selected) {
|
|
64
|
+
const arg = remoteArgFor(item);
|
|
65
|
+
const result = await run({ ...shared, arg });
|
|
66
|
+
results.push(result);
|
|
67
|
+
}
|
|
68
|
+
const firstFailure = results.find((r) => r.exitCode !== 0);
|
|
69
|
+
const exitCode = firstFailure ? firstFailure.exitCode : 0;
|
|
70
|
+
const ok = results.filter((r) => r.exitCode === 0).length;
|
|
71
|
+
const message = `did ${results.length} remote item${results.length === 1 ? '' : 's'} ` +
|
|
72
|
+
`(${ok} ok, ${results.length - ok} not).`;
|
|
73
|
+
return { results, exitCode, message };
|
|
74
|
+
}
|
|
75
|
+
/** The `do --remote` arg for a selected item: `spec:<slug>` for a spec, bare slug for a task. */
|
|
76
|
+
function remoteArgFor(item) {
|
|
77
|
+
return item.namespace === 'spec' ? `spec:${item.slug}` : item.slug;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Run the EXPLICIT multi-arg form (`do --remote <a> <b> …`): the NAMED items in
|
|
81
|
+
* the GIVEN order (no pool/priority — the operator chose them), each through the
|
|
82
|
+
* EXISTING {@link performDoRemote} pipeline, SEQUENTIALLY. No mirror scan is
|
|
83
|
+
* needed (the args are explicit); the per-item pipeline resolves each
|
|
84
|
+
* bare/`task:`/`prd:` arg itself.
|
|
85
|
+
*/
|
|
86
|
+
export async function performDoRemoteArgs(args, options) {
|
|
87
|
+
const run = options.run ?? performDoRemote;
|
|
88
|
+
const shared = sharedRemoteOptions(options);
|
|
89
|
+
const results = [];
|
|
90
|
+
for (const arg of args) {
|
|
91
|
+
const result = await run({ ...shared, arg });
|
|
92
|
+
results.push(result);
|
|
93
|
+
}
|
|
94
|
+
const firstFailure = results.find((r) => r.exitCode !== 0);
|
|
95
|
+
const exitCode = firstFailure ? firstFailure.exitCode : 0;
|
|
96
|
+
const ok = results.filter((r) => r.exitCode === 0).length;
|
|
97
|
+
const message = `did ${results.length} remote item${results.length === 1 ? '' : 's'} ` +
|
|
98
|
+
`(${ok} ok, ${results.length - ok} not).`;
|
|
99
|
+
return { results, exitCode, message };
|
|
100
|
+
}
|
|
101
|
+
/** Strip the multi-only fields, leaving exactly the per-item {@link DoRemoteOptions} base. */
|
|
102
|
+
function sharedRemoteOptions(options) {
|
|
103
|
+
const { config: _config, count: _count, run: _run, read: _read, warn: _warn, ...rest } = options;
|
|
104
|
+
void _config;
|
|
105
|
+
void _count;
|
|
106
|
+
void _run;
|
|
107
|
+
void _read;
|
|
108
|
+
void _warn;
|
|
109
|
+
return rest;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=do-remote-auto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"do-remote-auto.js","sourceRoot":"","sources":["../src/do-remote-auto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAsC,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAC,UAAU,EAA0B,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAC,iBAAiB,EAAoB,MAAM,sBAAsB,CAAC;AA+D1E;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACxC,OAAmC;IAEnC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,eAAe,CAAC;IAC3C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC;IAEjC,iFAAiF;IACjF,gFA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