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,307 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { allAnswered, isEntryAnswered, parseSidecar, sidecarPathFor, } from './sidecar.js';
|
|
4
|
+
import { run as runProc } from './git.js';
|
|
5
|
+
import { createJob } from './workspace.js';
|
|
6
|
+
import { performIntegration, } from './integration-core.js';
|
|
7
|
+
/**
|
|
8
|
+
* Parse the human's plain free-text answer into the deterministic
|
|
9
|
+
* {@link MergeActionVerb}. The merge-question surfacer renders
|
|
10
|
+
* `merge | hold | drop` in the entry's `default` as a human-readable hint, so
|
|
11
|
+
* the human typically types one of those words verbatim. We accept any text
|
|
12
|
+
* whose first whole word (case-insensitive) is one of `merge` / `hold` / `drop`
|
|
13
|
+
* — this is the same machine-parseable choice shape the surfacer's applied
|
|
14
|
+
* answer q1 documents ("a DETERMINISTIC CHOICE shape … the human picks and the
|
|
15
|
+
* system parses unambiguously").
|
|
16
|
+
*
|
|
17
|
+
* Returns `undefined` on ANYTHING else (an empty answer, a typo, a long
|
|
18
|
+
* narrative without one of the three words at the start) so the caller can
|
|
19
|
+
* route the ambiguity HONESTLY — never default-to-merge on a malformed answer,
|
|
20
|
+
* which would invent a land the human did not authorise.
|
|
21
|
+
*/
|
|
22
|
+
export function parseMergeAnswer(text) {
|
|
23
|
+
const trimmed = text.trim().toLowerCase();
|
|
24
|
+
if (trimmed === '')
|
|
25
|
+
return undefined;
|
|
26
|
+
// The first whole alphabetic word; trailing punctuation (a comma, em-dash,
|
|
27
|
+
// period) and any following commentary are tolerated. We deliberately do
|
|
28
|
+
// NOT consume hyphens / apostrophes — the three verbs are plain ASCII
|
|
29
|
+
// words, and over-tolerating typo-shapes would silently invent a verb the
|
|
30
|
+
// human did not pick.
|
|
31
|
+
const match = /^([a-z]+)/.exec(trimmed);
|
|
32
|
+
if (match === null)
|
|
33
|
+
return undefined;
|
|
34
|
+
const word = match[1];
|
|
35
|
+
if (word === 'merge' || word === 'hold' || word === 'drop') {
|
|
36
|
+
return word;
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Detect the FIRST answered `kind: merge` entry's deterministic action verb in
|
|
42
|
+
* a fully-answered sidecar (the apply rung's pre-decider kind-check). Returns
|
|
43
|
+
* `undefined` when the sidecar carries no answered `kind: merge` entry (the
|
|
44
|
+
* apply rung then proceeds to the existing path — agentic for observations,
|
|
45
|
+
* normal apply for task/prd content questions).
|
|
46
|
+
*
|
|
47
|
+
* The sidecar is read OFF DISK keyed off the namespaced item identity; the
|
|
48
|
+
* model is parsed via the SAME `parseSidecar` the rest of the engine uses.
|
|
49
|
+
* Returns `undefined` on a missing/unparseable sidecar (the caller's normal
|
|
50
|
+
* apply path will then raise the right error).
|
|
51
|
+
*/
|
|
52
|
+
export function detectAnsweredMergeAction(cwd, item) {
|
|
53
|
+
const abs = join(cwd, sidecarPathFor(item));
|
|
54
|
+
if (!existsSync(abs))
|
|
55
|
+
return undefined;
|
|
56
|
+
let model;
|
|
57
|
+
try {
|
|
58
|
+
model = parseSidecar(readFileSync(abs, 'utf8'));
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
if (!allAnswered(model))
|
|
64
|
+
return undefined;
|
|
65
|
+
for (const entry of model.entries) {
|
|
66
|
+
if (entry.kind !== 'merge')
|
|
67
|
+
continue;
|
|
68
|
+
if (!isEntryAnswered(entry))
|
|
69
|
+
continue;
|
|
70
|
+
const verb = parseMergeAnswer(entry.answer);
|
|
71
|
+
if (verb !== undefined) {
|
|
72
|
+
return { verb, entry };
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Resolve the arbiter URL the land worktree mirrors from. Prefers the
|
|
79
|
+
* caller-supplied `arbiterUrl` (the registry-set advance driver knows it
|
|
80
|
+
* directly); falls back to `git remote get-url <arbiter>` in the apply rung's
|
|
81
|
+
* `cwd` (the in-place / one-shot caller). Returns `undefined` when the URL
|
|
82
|
+
* cannot be resolved — the caller maps that to a clean refusal.
|
|
83
|
+
*/
|
|
84
|
+
function resolveArbiterUrl(input) {
|
|
85
|
+
if (input.arbiterUrl !== undefined && input.arbiterUrl !== '') {
|
|
86
|
+
return input.arbiterUrl;
|
|
87
|
+
}
|
|
88
|
+
const res = runProc('git', ['remote', 'get-url', input.arbiter], input.cwd, {
|
|
89
|
+
env: input.env,
|
|
90
|
+
});
|
|
91
|
+
if (res.status !== 0)
|
|
92
|
+
return undefined;
|
|
93
|
+
const url = res.stdout.trim();
|
|
94
|
+
return url === '' ? undefined : url;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The `strictMergeApproval` re-stale check (PRD OQ6 opt-in): did `<arbiter>/
|
|
98
|
+
* main` move past the merge-base of the work branch since the surfacer
|
|
99
|
+
* authored the question? The git-alone analogue of GitHub's "dismiss stale
|
|
100
|
+
* approvals when the base changes" — host-agnostic by reachability.
|
|
101
|
+
*
|
|
102
|
+
* We fetch the latest `<arbiter>/main` from the JOB worktree's hub mirror (the
|
|
103
|
+
* worktree's `origin`), compute `merge-base(<branch>, <origin/main>)`, and
|
|
104
|
+
* compare against `<origin/main>` itself: if the merge-base IS `<origin/main>`,
|
|
105
|
+
* the branch is a strict descendant — the merge-base did NOT move — and the
|
|
106
|
+
* cheap default applies (HONOUR + land on green re-verify). If the merge-base
|
|
107
|
+
* is NOT `<origin/main>`, `main` advanced past the branch's divergence point
|
|
108
|
+
* since the branch was last rebased — the merge-base MOVED — and the strict
|
|
109
|
+
* mode re-surfaces.
|
|
110
|
+
*
|
|
111
|
+
* Returns `true` when the merge-base moved (⇒ re-surface), `false` otherwise.
|
|
112
|
+
* On any plumbing failure returns `false` (do NOT spuriously re-surface — the
|
|
113
|
+
* red re-verify is still the load-bearing safety; a transient git failure must
|
|
114
|
+
* not block a clean answer-then-land).
|
|
115
|
+
*/
|
|
116
|
+
function mergeBaseMoved(job, env) {
|
|
117
|
+
const fetch = runProc('git', [
|
|
118
|
+
'fetch',
|
|
119
|
+
'--quiet',
|
|
120
|
+
job.arbiterRemote,
|
|
121
|
+
`+refs/heads/main:refs/remotes/${job.arbiterRemote}/main`,
|
|
122
|
+
], job.dir, { env });
|
|
123
|
+
if (fetch.status !== 0)
|
|
124
|
+
return false;
|
|
125
|
+
const mainRef = `${job.arbiterRemote}/main`;
|
|
126
|
+
const mainSha = runProc('git', ['rev-parse', '--verify', '--quiet', mainRef], job.dir, { env });
|
|
127
|
+
if (mainSha.status !== 0)
|
|
128
|
+
return false;
|
|
129
|
+
const base = runProc('git', ['merge-base', 'HEAD', mainRef], job.dir, { env });
|
|
130
|
+
if (base.status !== 0)
|
|
131
|
+
return false;
|
|
132
|
+
return base.stdout.trim() !== mainSha.stdout.trim();
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* The PRODUCTION dispatcher: an answered `kind: merge` entry's verb drives one
|
|
136
|
+
* of the four terminals (`landed` / `refused` / `restale` / `hold|drop`). For
|
|
137
|
+
* `answer=merge` it checks out the unmerged `work/<slug>` via the EXISTING
|
|
138
|
+
* `workspace.ts` per-job worktree seam ({@link createJob}, the same seam the
|
|
139
|
+
* build / recovery callers use) and invokes the LAND primitive
|
|
140
|
+
* ({@link performIntegration}) with `committedRecovery: true` +
|
|
141
|
+
* `freshWorktreeGate: true` — so the rebased tip is re-verified BEFORE it
|
|
142
|
+
* lands, the answered-merge land path NEVER integrates a clean-rebase-but-
|
|
143
|
+
* broken tree, and a refusal routes to needs-attention through the SAME
|
|
144
|
+
* shared seam (`applyNeedsAttentionTransition`) the build path uses. The job
|
|
145
|
+
* worktree is always disposed (success or failure) so the hub mirror does not
|
|
146
|
+
* accumulate stale per-job state.
|
|
147
|
+
*
|
|
148
|
+
* For `answer=hold` and `answer=drop` the dispatcher does not land — it just
|
|
149
|
+
* tells the apply rung to fall through to the normal answer-recording path.
|
|
150
|
+
* (Cancellation of the work branch on `drop` is OUT OF SCOPE; the answer is
|
|
151
|
+
* recorded and a future surfacer / human handles the artifact.)
|
|
152
|
+
*/
|
|
153
|
+
export async function performMergeAction(input) {
|
|
154
|
+
const note = input.note ?? (() => { });
|
|
155
|
+
const { verb } = input.action;
|
|
156
|
+
if (verb === 'hold') {
|
|
157
|
+
return {
|
|
158
|
+
outcome: 'hold',
|
|
159
|
+
message: `merge-question for ${input.item} answered HOLD — leaving \`work/${input.slug}\` ` +
|
|
160
|
+
`unmerged (the answer is recorded in the item body).`,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
if (verb === 'drop') {
|
|
164
|
+
return {
|
|
165
|
+
outcome: 'drop',
|
|
166
|
+
message: `merge-question for ${input.item} answered DROP — leaving \`work/${input.slug}\` ` +
|
|
167
|
+
`unmerged (the answer is recorded; cancellation of the work branch is ` +
|
|
168
|
+
`out of this dispatcher's scope).`,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
// verb === 'merge'
|
|
172
|
+
const url = resolveArbiterUrl(input);
|
|
173
|
+
if (url === undefined) {
|
|
174
|
+
return {
|
|
175
|
+
outcome: 'refused',
|
|
176
|
+
message: `merge-question for ${input.item} answered MERGE — but the arbiter URL ` +
|
|
177
|
+
`could not be resolved (no arbiterUrl threaded, and \`git remote get-url ` +
|
|
178
|
+
`${input.arbiter}\` failed in ${input.cwd}). NOT landing; the answer ` +
|
|
179
|
+
`stays surfaced.`,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
// Check out the unmerged `work/<type>-<slug>` via the EXISTING per-job
|
|
183
|
+
// worktree seam — the SAME seam build/recovery callers use, NOT a bespoke
|
|
184
|
+
// worktree or clone. The job dir is the worktree `performIntegration` works
|
|
185
|
+
// from; its `arbiterRemote` is the worktree's `origin` (a bare-hub remote
|
|
186
|
+
// that mirrors the real arbiter), which the integration core push-targets.
|
|
187
|
+
let job;
|
|
188
|
+
try {
|
|
189
|
+
job = createJob({
|
|
190
|
+
url,
|
|
191
|
+
slug: input.slug,
|
|
192
|
+
type: 'task',
|
|
193
|
+
workspacesDir: input.workspacesDir,
|
|
194
|
+
env: input.env,
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
catch (err) {
|
|
198
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
199
|
+
return {
|
|
200
|
+
outcome: 'refused',
|
|
201
|
+
message: `merge-question for ${input.item} answered MERGE — but checking out ` +
|
|
202
|
+
`\`work/${input.slug}\` via the per-job worktree seam failed (${detail}). ` +
|
|
203
|
+
`NOT landing; the answer stays surfaced.`,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
try {
|
|
207
|
+
// CONTINUE-rebase-conflict: createJob's CONTINUE-rebase aborted on a
|
|
208
|
+
// genuine code conflict. The kept work stays on the branch (recoverable);
|
|
209
|
+
// we refuse the land and route via the standard refusal shape.
|
|
210
|
+
if (job.continueRebaseConflict) {
|
|
211
|
+
return {
|
|
212
|
+
outcome: 'refused',
|
|
213
|
+
message: `merge-question for ${input.item} answered MERGE — but rebasing ` +
|
|
214
|
+
`\`work/${input.slug}\` onto current main conflicted (the kept work is ` +
|
|
215
|
+
`intact on the branch; resolve and re-answer). NOT landing.`,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
if (job.continuePushFailure !== undefined) {
|
|
219
|
+
return {
|
|
220
|
+
outcome: 'refused',
|
|
221
|
+
message: `merge-question for ${input.item} answered MERGE — but the ` +
|
|
222
|
+
`continue-rebase push to the arbiter failed (${job.continuePushFailure}). ` +
|
|
223
|
+
`NOT landing; the kept work is intact on the branch.`,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
// STRICT re-stale check (OQ6 opt-in): when ON and the merge-base moved
|
|
227
|
+
// between the surfacer's question and this apply, RE-SURFACE the
|
|
228
|
+
// merge-question (the apply rung folds this into a re-pause) instead of
|
|
229
|
+
// landing. Default OFF ⇒ this block is skipped; the cheap "green
|
|
230
|
+
// re-verify is enough" path runs.
|
|
231
|
+
if (input.strictMergeApproval === true && mergeBaseMoved(job, input.env)) {
|
|
232
|
+
return {
|
|
233
|
+
outcome: 'restale',
|
|
234
|
+
message: `merge-question for ${input.item} answered MERGE — but ` +
|
|
235
|
+
`strictMergeApproval is ON and the merge-base of \`work/${input.slug}\` ` +
|
|
236
|
+
`moved between answer and apply: RE-SURFACING the merge-question ` +
|
|
237
|
+
`(no land; the human re-confirms against the new base).`,
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
// LAND through the EXISTING `performIntegration`. The branch's tip
|
|
241
|
+
// already carries its done-move commit (surfacer enumerates `work/*`
|
|
242
|
+
// unreachable from main, so it is a previously-built strand), so we
|
|
243
|
+
// drive the committed-recovery tail — but with `freshWorktreeGate: true`
|
|
244
|
+
// so the REBASED TIP is re-verified BEFORE the integrate (the
|
|
245
|
+
// `committed-recovery-honours-fresh-worktree-gate` task's contract).
|
|
246
|
+
const integration = await performIntegration({
|
|
247
|
+
cwd: job.dir,
|
|
248
|
+
arbiter: job.arbiterRemote,
|
|
249
|
+
slug: input.slug,
|
|
250
|
+
source: 'tasks-ready',
|
|
251
|
+
recovering: false,
|
|
252
|
+
committedRecovery: true,
|
|
253
|
+
freshWorktreeGate: true,
|
|
254
|
+
prepare: input.prepare,
|
|
255
|
+
verify: input.verify,
|
|
256
|
+
mode: 'merge',
|
|
257
|
+
// surfaceArbiter is set so a RED rebased-tip gate (or a rebase
|
|
258
|
+
// conflict surfaced during the retry loop) routes to needs-attention
|
|
259
|
+
// observably on the arbiter (not local-only). The build path uses
|
|
260
|
+
// this shape; we mirror it here for the answered-merge land.
|
|
261
|
+
surfaceArbiter: job.arbiterRemote,
|
|
262
|
+
recoveryRebaseRetries: input.recoveryRebaseRetries,
|
|
263
|
+
recoveryRebaseJitterMs: input.recoveryRebaseJitterMs,
|
|
264
|
+
mergeRetries: input.mergeRetries,
|
|
265
|
+
env: input.env,
|
|
266
|
+
note,
|
|
267
|
+
});
|
|
268
|
+
if (integration.outcome === 'completed') {
|
|
269
|
+
return {
|
|
270
|
+
outcome: 'landed',
|
|
271
|
+
message: `merge-question for ${input.item} answered MERGE — landed ` +
|
|
272
|
+
`\`work/${input.slug}\` on \`${job.arbiterRemote}/main\` via the ` +
|
|
273
|
+
`land primitive (rebase → re-verify on the rebased tip → advance).`,
|
|
274
|
+
integration,
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
if (integration.outcome === 'already-integrated') {
|
|
278
|
+
return {
|
|
279
|
+
outcome: 'already-integrated',
|
|
280
|
+
message: `merge-question for ${input.item} answered MERGE — \`work/${input.slug}\` ` +
|
|
281
|
+
`was already on \`${job.arbiterRemote}/main\` (idempotent re-run).`,
|
|
282
|
+
integration,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
// gate-failed / prepare-failed / review-blocked / review-unparseable /
|
|
286
|
+
// rebase-conflict / invariant-violation: the land was REFUSED;
|
|
287
|
+
// performIntegration routed the bounce per its own shared seam (gated by
|
|
288
|
+
// `surfaceArbiter`), so `main` never received a failing tree.
|
|
289
|
+
return {
|
|
290
|
+
outcome: 'refused',
|
|
291
|
+
message: integration.reason ??
|
|
292
|
+
`merge-question for ${input.item} answered MERGE — the land was REFUSED ` +
|
|
293
|
+
`(${integration.outcome}); NOT landing; the answer stays surfaced.`,
|
|
294
|
+
integration,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
finally {
|
|
298
|
+
try {
|
|
299
|
+
job.dispose();
|
|
300
|
+
}
|
|
301
|
+
catch {
|
|
302
|
+
// Best-effort: a failed dispose leaves a reapable per-job worktree
|
|
303
|
+
// behind, which `gc` cleans up. Never crash the dispatch on teardown.
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
//# sourceMappingURL=apply-merge-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-merge-action.js","sourceRoot":"","sources":["../src/apply-merge-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC;AACjD,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAC/B,OAAO,EACN,WAAW,EACX,eAAe,EACf,YAAY,EACZ,cAAc,GAGd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,GAAG,IAAI,OAAO,EAAC,MAAM,UAAU,CAAC;AACxC,OAAO,EAAC,SAAS,EAAW,MAAM,g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K,CAAC,sBAAsB;YACpD,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,GAAG,EAAE,KAAK,CAAC,GAAG;YACd,IAAI;SACJ,CAAC,CAAC;QAEH,IAAI,WAAW,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;YACzC,OAAO;gBACN,OAAO,EAAE,QAAQ;gBACjB,OAAO,EACN,sBAAsB,KAAK,CAAC,IAAI,2BAA2B;oBAC3D,UAAU,KAAK,CAAC,IAAI,WAAW,GAAG,CAAC,aAAa,kBAAkB;oBAClE,mEAAmE;gBACpE,WAAW;aACX,CAAC;QACH,CAAC;QACD,IAAI,WAAW,CAAC,OAAO,KAAK,oBAAoB,EAAE,CAAC;YAClD,OAAO;gBACN,OAAO,EAAE,oBAAoB;gBAC7B,OAAO,EACN,sBAAsB,KAAK,CAAC,IAAI,4BAA4B,KAAK,CAAC,IAAI,KAAK;oBAC3E,oBAAoB,GAAG,CAAC,aAAa,8BAA8B;gBACpE,WAAW;aACX,CAAC;QACH,CAAC;QACD,uEAAuE;QACvE,+DAA+D;QAC/D,yEAAyE;QACzE,8DAA8D;QAC9D,OAAO;YACN,OAAO,EAAE,SAAS;YAClB,OAAO,EACN,WAAW,CAAC,MAAM;gBAClB,sBAAsB,KAAK,CAAC,IAAI,yCAAyC;oBACxE,IAAI,WAAW,CAAC,OAAO,4CAA4C;YACrE,WAAW;SACX,CAAC;IACH,CAAC;YAAS,CAAC;QACV,IAAI,CAAC;YACJ,GAAG,CAAC,OAAO,EAAE,CAAC;QACf,CAAC;QAAC,MAAM,CAAC;YACR,mEAAmE;YACnE,sEAAsE;QACvE,CAAC;IACF,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { type NewQuestion } from './sidecar.js';
|
|
2
|
+
import { APPLY_LIFECYCLE_FOLDERS, resolveItemPathByIdentity } from './item-path.js';
|
|
3
|
+
/**
|
|
4
|
+
* The engine-owned APPLY PERSIST (prd `advance-loop`, task `advance-rung-apply`;
|
|
5
|
+
* AGENTIC apply, task `agentic-apply-retire-disposition-vocabulary`) — the half of
|
|
6
|
+
* the APPLY rung the ENGINE owns. On `classify=apply` (ALL sidecar entries
|
|
7
|
+
* answered), it applies the HUMAN's answers to the item ATOMICALLY (item body +
|
|
8
|
+
* sidecar in ONE commit, via the sidecar contract's {@link applyAtomic}), then
|
|
9
|
+
* EITHER:
|
|
10
|
+
*
|
|
11
|
+
* - **append / re-pause** — when the apply has NEW questions to ask: append
|
|
12
|
+
* `qN+1…`, stay `needsAnswers:true`, re-pause (the "all answered?" flips back
|
|
13
|
+
* to false); OR
|
|
14
|
+
* - **discharge by deletion** — when the caller decided the SOURCE should leave
|
|
15
|
+
* by deletion (`discharge` set): `git rm` the source + sidecar in a STANDALONE
|
|
16
|
+
* revertible commit, the reason in the commit message (git history is the
|
|
17
|
+
* archive); OR
|
|
18
|
+
* - **resolve fully** (the default) — clear `needsAnswers` + DELETE the sidecar
|
|
19
|
+
* in the SAME atomic commit (the invariant `needsAnswers:false ⟺ no active
|
|
20
|
+
* sidecar`); the item advances toward build by its normal lifecycle.
|
|
21
|
+
*
|
|
22
|
+
* **The disposition vocabulary is GONE** (task
|
|
23
|
+
* `agentic-apply-retire-disposition-vocabulary`): the apply rung no longer reads a
|
|
24
|
+
* per-entry `disposition=` token, no longer runs a most-decisive picker, and has
|
|
25
|
+
* no `keep`/`triaged:keep` resting state. A sidecar entry is BINARY (no-answer |
|
|
26
|
+
* answered); what to DO with a fully-answered OBSERVATION is decided by the
|
|
27
|
+
* AGENTIC apply decision in the advance tick (`advance.ts` `applyRung` over the
|
|
28
|
+
* shared `decide` engine), which then routes here (re-pause / discharge / via
|
|
29
|
+
* `promoteObservation` for a mint). A signal is still-open, acted-on, or deleted
|
|
30
|
+
* — there is no \"retain as resolved\" state.
|
|
31
|
+
*
|
|
32
|
+
* The work-item (task/prd) terminal MOVES (`tasks/cancelled`, `prds/dropped`) and
|
|
33
|
+
* the `needs-attention/` LIFECYCLE state are a SEPARATE lifecycle concern (a
|
|
34
|
+
* task/prd is dropped by its own lifecycle, not by a question answer) — they are
|
|
35
|
+
* NOT routed from here any more (they were the removed disposition vocabulary).
|
|
36
|
+
*
|
|
37
|
+
* It is the SIBLING of {@link import('./surface-persist.js').persistSurfacedQuestions}:
|
|
38
|
+
* that is the SURFACE rung's one-commit primitive (append-or-create + set
|
|
39
|
+
* `needsAnswers`); this is the APPLY rung's (apply answers + resolve / re-pause /
|
|
40
|
+
* discharge). Kept file-orthogonal so the rung bodies land in different tasks.
|
|
41
|
+
*
|
|
42
|
+
* **NEVER invents an answer (US #4).** The apply rung applies ONLY what the human
|
|
43
|
+
* authored — the recorded `answer:` text. It does NOT fill, guess, or author an
|
|
44
|
+
* answer; a SUBSET-answered sidecar is not even classified `apply` (the classifier
|
|
45
|
+
* NO-OPs), so this is only ever called with a fully-answered sidecar. **ALWAYS
|
|
46
|
+
* allowed (no gate)** — applying a human's answer is never gated, even with every
|
|
47
|
+
* autonomy flag off (the engine, not this module, enforces the no-gate
|
|
48
|
+
* sequencing).
|
|
49
|
+
*
|
|
50
|
+
* Like the surface persist, this is the LOCAL one-commit primitive over a working
|
|
51
|
+
* tree (the throwaway-git-repo test pattern). The `advancing` CAS lock that makes
|
|
52
|
+
* it WINNER-ONLY is held by `performAdvance` BEFORE this is called; this module
|
|
53
|
+
* does NOT race the arbiter — that is the lock's job.
|
|
54
|
+
*/
|
|
55
|
+
export { APPLY_LIFECYCLE_FOLDERS, resolveItemPathByIdentity };
|
|
56
|
+
/** Marker that opens the applied-answers record in an item body. */
|
|
57
|
+
declare const APPLIED_HEADING = "## Applied answers";
|
|
58
|
+
/**
|
|
59
|
+
* The STRUCTURAL fence the templates wrap the transient open-questions block in
|
|
60
|
+
* — an HTML-comment marker pair, mirroring the existing `<!-- dorfl-…
|
|
61
|
+
* -->` style in `sidecar.ts`. Apply's reconcile (full-resolution route only)
|
|
62
|
+
* strips everything between the OPEN and CLOSE markers (inclusive) when it folds
|
|
63
|
+
* answers in and clears `needsAnswers`, so the resolved item body reads as
|
|
64
|
+
* resolved (no leftover "these are still open" prose above `## Applied answers`).
|
|
65
|
+
*
|
|
66
|
+
* The strip is STRUCTURAL (marker-pair based), NOT a heading-text regex — the
|
|
67
|
+
* prd's D1 decision: a `## Open questions` heading match would be fragile to
|
|
68
|
+
* author wording (`## Open questions (clear needsAnswers when resolved)` vs.
|
|
69
|
+
* `## Open questions`). Items authored WITHOUT the markers are left untouched
|
|
70
|
+
* (backward compat — no marker ⇒ nothing to strip ⇒ identical bytes).
|
|
71
|
+
*
|
|
72
|
+
* The sibling task `templates-mark-transient-open-questions-block` introduces
|
|
73
|
+
* the markers in the prd/task templates; this task exports the constants so
|
|
74
|
+
* the two tasks agree on the literal byte sequence.
|
|
75
|
+
*/
|
|
76
|
+
export declare const OPEN_QUESTIONS_MARKER_OPEN = "<!-- open-questions -->";
|
|
77
|
+
export declare const OPEN_QUESTIONS_MARKER_CLOSE = "<!-- /open-questions -->";
|
|
78
|
+
export interface ApplyAnsweredQuestionsOptions {
|
|
79
|
+
/** Working clone/worktree the apply commits in. */
|
|
80
|
+
cwd: string;
|
|
81
|
+
/** The namespaced item identity (`task:foo` / `prd:bar` / `observation:baz`). */
|
|
82
|
+
item: string;
|
|
83
|
+
/**
|
|
84
|
+
* The item file path RELATIVE to `cwd` (e.g. `work/backlog/foo.md`). The
|
|
85
|
+
* sidecar path is derived from the identity, NOT from this path (identity-keyed,
|
|
86
|
+
* folder-agnostic). The apply rewrites THIS file + the sidecar and commits them
|
|
87
|
+
* together.
|
|
88
|
+
*/
|
|
89
|
+
itemPath: string;
|
|
90
|
+
/**
|
|
91
|
+
* NEW follow-up questions the apply has (the agentic `ask-follow-up` verdict, or
|
|
92
|
+
* a caller-supplied batch). When non-empty, the apply APPENDS them (`qN+1…`,
|
|
93
|
+
* never mutating an answered entry) and RE-PAUSES (`needsAnswers:true` stays) —
|
|
94
|
+
* the "all answered?" flips back to false. Empty/omitted ⇒ resolve the item (or
|
|
95
|
+
* discharge it, when `discharge` is set).
|
|
96
|
+
*/
|
|
97
|
+
appendQuestions?: NewQuestion[];
|
|
98
|
+
/**
|
|
99
|
+
* DISCHARGE the SOURCE by DELETION (the agentic `delete-source` verdict, or a
|
|
100
|
+
* direct discharge): instead of resolving in place, `git rm` the source + its
|
|
101
|
+
* answered sidecar in a STANDALONE revertible commit, the `reason` recorded in
|
|
102
|
+
* the commit message (git history is the archive). Fires DIRECT (no
|
|
103
|
+
* preview/confirm — decision 12). Mutually exclusive with `appendQuestions`
|
|
104
|
+
* (re-pause and discharge cannot both happen on one apply); when both are given
|
|
105
|
+
* the re-pause wins (you cannot discharge a source you are still asking about).
|
|
106
|
+
*/
|
|
107
|
+
discharge?: {
|
|
108
|
+
reason: string;
|
|
109
|
+
};
|
|
110
|
+
/** Advisory committer id for the commit subject. Defaults to git user.name. */
|
|
111
|
+
by?: string;
|
|
112
|
+
/** Environment for child git processes. */
|
|
113
|
+
env?: NodeJS.ProcessEnv;
|
|
114
|
+
/** Sink for human-readable progress notes. */
|
|
115
|
+
note?: (message: string) => void;
|
|
116
|
+
}
|
|
117
|
+
/** The terminal an apply reached. */
|
|
118
|
+
export type ApplyTerminal =
|
|
119
|
+
/** Resolved fully: needsAnswers cleared + sidecar deleted (the default). */
|
|
120
|
+
'resolved'
|
|
121
|
+
/** New questions appended; stayed needsAnswers:true and re-paused. */
|
|
122
|
+
| 'repaused'
|
|
123
|
+
/**
|
|
124
|
+
* The SOURCE was DISCHARGED BY DELETION (the agentic `delete-source` verdict, or
|
|
125
|
+
* a direct discharge): the source (+ its answered sidecar) were `git rm`-ed in a
|
|
126
|
+
* STANDALONE revertible commit, the reason recorded in the commit message (git
|
|
127
|
+
* history = archive). A discharged item leaves by being GONE — there is no
|
|
128
|
+
* resting marker. This is the apply rung applying the human's RATIFIED answer
|
|
129
|
+
* (human-authored, not a unilateral agent destruction of a live signal).
|
|
130
|
+
*/
|
|
131
|
+
| 'deleted'
|
|
132
|
+
/**
|
|
133
|
+
* The item file was GONE by the time apply tried to write (a concurrent
|
|
134
|
+
* promote/terminal-move/delete between capture and write). Apply exited
|
|
135
|
+
* CLEAN: no commit, no ghost file at the stale path. The matching benign
|
|
136
|
+
* skip the surface/triage rungs already use (`advance.ts` `vanishedSkip`),
|
|
137
|
+
* extended into the apply rung by the F3a folder-agnostic resolver.
|
|
138
|
+
*/
|
|
139
|
+
| 'vanished';
|
|
140
|
+
export interface ApplyAnsweredQuestionsResult {
|
|
141
|
+
/** The terminal the apply reached. */
|
|
142
|
+
outcome: ApplyTerminal;
|
|
143
|
+
/** The commit sha the apply produced. */
|
|
144
|
+
commit?: string;
|
|
145
|
+
/** The sidecar path (relative to `cwd`) the apply touched. */
|
|
146
|
+
sidecarPath: string;
|
|
147
|
+
/** The item path (relative to `cwd`) after the apply. */
|
|
148
|
+
itemPath: string;
|
|
149
|
+
/** A human-readable summary. */
|
|
150
|
+
message: string;
|
|
151
|
+
}
|
|
152
|
+
/** Raised for usage errors (a missing repo, an unreadable item, a subset apply). */
|
|
153
|
+
export declare class ApplyPersistError extends Error {
|
|
154
|
+
constructor(message: string);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Apply a FULLY-ANSWERED sidecar's answers to its item ATOMICALLY, then route it.
|
|
158
|
+
* The keystone APPLY rung the advance engine dispatches into once the classifier
|
|
159
|
+
* said `apply` (all entries answered) AND the `advancing` lock was won.
|
|
160
|
+
*
|
|
161
|
+
* The decision (the human's recorded intent + the caller's routing — NEVER an
|
|
162
|
+
* invention):
|
|
163
|
+
*
|
|
164
|
+
* 1. **append / re-pause** — `appendQuestions` is non-empty: append `qN+1…`,
|
|
165
|
+
* keep `needsAnswers:true`, re-pause (one commit, body + sidecar).
|
|
166
|
+
* 2. **discharge by deletion** — `discharge` is set (the `delete-source`
|
|
167
|
+
* verdict): `git rm` the source + sidecar in a standalone revertible commit,
|
|
168
|
+
* the reason in the commit message.
|
|
169
|
+
* 3. **resolve fully** (the default) — clear `needsAnswers` + delete the sidecar
|
|
170
|
+
* in ONE commit; the item advances toward build by its normal lifecycle.
|
|
171
|
+
*/
|
|
172
|
+
export declare function applyAnsweredQuestions(options: ApplyAnsweredQuestionsOptions): ApplyAnsweredQuestionsResult;
|
|
173
|
+
export { APPLIED_HEADING };
|
|
174
|
+
//# sourceMappingURL=apply-persist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-persist.d.ts","sourceRoot":"","sources":["../src/apply-persist.ts"],"names":[],"mappings":"AAIA,OAAO,EAKN,KAAK,WAAW,EAGhB,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,uBAAuB,EACvB,yBAAyB,EACzB,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAMH,OAAO,EAAC,uBAAuB,EAAE,yBAAyB,EAAC,CAAC;AAE5D,oEAAoE;AACpE,QAAA,MAAM,eAAe,uBAAuB,CAAC;AAE7C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AACpE,eAAO,MAAM,2BAA2B,6BAA6B,CAAC;AAEtE,MAAM,WAAW,6BAA6B;IAC7C,mDAAmD;IACnD,GAAG,EAAE,MAAM,CAAC;IACZ,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,WAAW,EAAE,CAAC;IAChC;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC;IAC7B,+EAA+E;IAC/E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2CAA2C;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAA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