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,345 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal, dependency-free parser for the small subset of YAML frontmatter the
|
|
3
|
+
* `work/` contract uses: top-level scalar keys and string lists (inline `[a, b]`
|
|
4
|
+
* or block `- a` form). It deliberately does NOT implement general YAML — only
|
|
5
|
+
* what `work/` task frontmatter needs (slug, humanOnly, blockedBy, ...).
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Extract the raw frontmatter block (the lines between the leading `---` and the
|
|
9
|
+
* next `---`). Returns `undefined` when the document does not start with a
|
|
10
|
+
* frontmatter fence.
|
|
11
|
+
*/
|
|
12
|
+
function extractBlock(content) {
|
|
13
|
+
const normalized = content.replace(/\r\n/g, '\n').replace(/^\uFEFF/, '');
|
|
14
|
+
if (!normalized.startsWith('---\n') && normalized !== '---') {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
const lines = normalized.split('\n');
|
|
18
|
+
// First line is the opening fence.
|
|
19
|
+
const closing = lines.indexOf('---', 1);
|
|
20
|
+
if (closing === -1) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
return lines.slice(1, closing).join('\n');
|
|
24
|
+
}
|
|
25
|
+
/** Strip surrounding single or double quotes from a scalar token. */
|
|
26
|
+
function unquote(value) {
|
|
27
|
+
const trimmed = value.trim();
|
|
28
|
+
if (trimmed.length >= 2) {
|
|
29
|
+
const first = trimmed[0];
|
|
30
|
+
const last = trimmed[trimmed.length - 1];
|
|
31
|
+
if ((first === '"' || first === "'") && last === first) {
|
|
32
|
+
return trimmed.slice(1, -1);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return trimmed;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Extract the `[...]` body of a YAML flow-style inline list, IGNORING anything
|
|
39
|
+
* after the matching closing `]` (notably a trailing `# comment`, the documented
|
|
40
|
+
* house style on `blockedBy: [] # startable now`). Quote-aware: a `]` inside a
|
|
41
|
+
* single/double-quoted item is data, not the list terminator. Returns the inner
|
|
42
|
+
* text (between the brackets), or `undefined` if no matching `]` is found
|
|
43
|
+
* (malformed — caller treats it as empty).
|
|
44
|
+
*/
|
|
45
|
+
function inlineListInner(value) {
|
|
46
|
+
const trimmed = value.trim();
|
|
47
|
+
if (trimmed[0] !== '[') {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
let quote;
|
|
51
|
+
for (let i = 1; i < trimmed.length; i++) {
|
|
52
|
+
const ch = trimmed[i];
|
|
53
|
+
if (quote) {
|
|
54
|
+
if (ch === quote) {
|
|
55
|
+
quote = undefined;
|
|
56
|
+
}
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
if (ch === "'" || ch === '"') {
|
|
60
|
+
quote = ch;
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if (ch === ']') {
|
|
64
|
+
return trimmed.slice(1, i);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
function parseInlineList(value) {
|
|
70
|
+
const body = inlineListInner(value);
|
|
71
|
+
if (body === undefined) {
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
const inner = body.trim();
|
|
75
|
+
if (inner === '') {
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
return inner
|
|
79
|
+
.split(',')
|
|
80
|
+
.map((item) => unquote(item))
|
|
81
|
+
.filter((item) => item !== '');
|
|
82
|
+
}
|
|
83
|
+
function toBoolean(value) {
|
|
84
|
+
const v = unquote(value).toLowerCase();
|
|
85
|
+
if (v === 'true') {
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
88
|
+
if (v === 'false') {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Set (or clear) the top-level `needsAnswers:` frontmatter marker on a `work/`
|
|
95
|
+
* markdown document, returning the new content. Used by the tasker review→edit
|
|
96
|
+
* LOOP's verdict sink (`slicer-review-edit-loop`) to emit a specific uncertain
|
|
97
|
+
* candidate task as `needsAnswers: true` (open questions block autonomous build;
|
|
98
|
+
* a human must answer them). If a `needsAnswers:` line already exists it is
|
|
99
|
+
* REPLACED (idempotent); otherwise it is appended as the last line inside the
|
|
100
|
+
* frontmatter fence. A document with NO frontmatter fence gets one PREPENDED (see
|
|
101
|
+
* {@link setFrontmatterMarker}) — observations are born fence-less (the
|
|
102
|
+
* `capture-signal` skill writes prose), so the tooling-owned `needsAnswers` axis
|
|
103
|
+
* MUST be settable on them rather than silently dropped.
|
|
104
|
+
*/
|
|
105
|
+
export function setNeedsAnswersMarker(content, value) {
|
|
106
|
+
return setFrontmatterMarker(content, 'needsAnswers', String(value));
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Set (or replace) a top-level scalar `<key>: <value>` frontmatter marker on a
|
|
110
|
+
* `work/` markdown document, returning the new content. The generalised form of
|
|
111
|
+
* {@link setNeedsAnswersMarker} the advance APPLY rung uses to stamp a
|
|
112
|
+
* `triaged: keep` marker (US #30) on an item a human answered "keep" — so a
|
|
113
|
+
* settled observation drops out of the candidate pool and is never re-asked. If a
|
|
114
|
+
* `<key>:` line already exists it is REPLACED (idempotent); otherwise it is
|
|
115
|
+
* appended as the last line inside the frontmatter fence.
|
|
116
|
+
*
|
|
117
|
+
* A document with NO frontmatter fence gets ONE PREPENDED carrying just this
|
|
118
|
+
* marker (`---\n<key>: <value>\n---\n\n<body>`). This is the load-bearing fix for
|
|
119
|
+
* `sidecar-without-needsAnswers`: observations are routinely created fence-less
|
|
120
|
+
* (the `capture-signal` skill writes free-form prose), and the OLD behaviour
|
|
121
|
+
* silently returned the body UNCHANGED — so `persistSurfacedQuestions` wrote the
|
|
122
|
+
* sidecar while the `needsAnswers:true` flag it believed it set was discarded,
|
|
123
|
+
* tearing the `needsAnswers ⟺ active sidecar` invariant a later tick refused to
|
|
124
|
+
* classify. These markers (`needsAnswers`, `triaged`) are tooling-owned axes, not
|
|
125
|
+
* prose, so the tool is entitled to introduce the fence it needs.
|
|
126
|
+
*
|
|
127
|
+
* The ONE remaining return-unchanged case is a MALFORMED doc that opens a fence
|
|
128
|
+
* (`---\n`) but never closes it: rewriting that risks corrupting hand-authored
|
|
129
|
+
* content, so it is left untouched (a degenerate input no writer produces).
|
|
130
|
+
*/
|
|
131
|
+
export function setFrontmatterMarker(content, key, value) {
|
|
132
|
+
const normalized = content.replace(/\r\n/g, '\n');
|
|
133
|
+
if (!normalized.startsWith('---\n')) {
|
|
134
|
+
// Fence-less document: PREPEND a minimal fence carrying just this marker,
|
|
135
|
+
// preserving the body verbatim (no leading blank between fence and body is
|
|
136
|
+
// collapsed — exactly one blank line separates the fence from the content).
|
|
137
|
+
const body = normalized.replace(/^\n+/, '');
|
|
138
|
+
return `---\n${key}: ${value}\n---\n\n${body}`;
|
|
139
|
+
}
|
|
140
|
+
const lines = normalized.split('\n');
|
|
141
|
+
const closing = lines.indexOf('---', 1);
|
|
142
|
+
if (closing === -1) {
|
|
143
|
+
// Malformed: an opening fence with no close. Leave it untouched rather than
|
|
144
|
+
// risk corrupting hand-authored content.
|
|
145
|
+
return content;
|
|
146
|
+
}
|
|
147
|
+
const pattern = new RegExp(`^${key}\\s*:`);
|
|
148
|
+
for (let i = 1; i < closing; i++) {
|
|
149
|
+
if (pattern.test(lines[i])) {
|
|
150
|
+
lines[i] = `${key}: ${value}`;
|
|
151
|
+
return lines.join('\n');
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
lines.splice(closing, 0, `${key}: ${value}`);
|
|
155
|
+
return lines.join('\n');
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* PROPAGATE the origin-trust PROVENANCE (`origin` + `originTrust`) from a SOURCE
|
|
159
|
+
* artifact (a prd) onto a TARGET artifact's content (an emitted task), returning
|
|
160
|
+
* the new content (task `untrusted-origin-forces-build-propose`). The tasker
|
|
161
|
+
* calls this so a task born from an untrusted-origin prd carries the stamp the
|
|
162
|
+
* BUILD transition reads. IDEMPOTENT: each present source field is written via
|
|
163
|
+
* {@link setFrontmatterMarker} (replace-or-append). When the source has NO `origin`
|
|
164
|
+
* (a human/local-authored prd ⇒ trusted), the target is returned UNCHANGED — the
|
|
165
|
+
* normal path is never stamped (zero behaviour change). When a stamp IS applied to
|
|
166
|
+
* a fence-less target, {@link setFrontmatterMarker} now prepends a fence to carry
|
|
167
|
+
* it (tasks the tasker emits always have a fence, so this is the defensive path).
|
|
168
|
+
*/
|
|
169
|
+
export function propagateOrigin(source, targetContent) {
|
|
170
|
+
if (source.origin === undefined && source.originTrust === undefined) {
|
|
171
|
+
return targetContent;
|
|
172
|
+
}
|
|
173
|
+
let next = targetContent;
|
|
174
|
+
if (source.origin !== undefined) {
|
|
175
|
+
next = setFrontmatterMarker(next, 'origin', source.origin);
|
|
176
|
+
}
|
|
177
|
+
if (source.originTrust !== undefined) {
|
|
178
|
+
next = setFrontmatterMarker(next, 'originTrust', source.originTrust);
|
|
179
|
+
}
|
|
180
|
+
return next;
|
|
181
|
+
}
|
|
182
|
+
export function parseFrontmatter(content) {
|
|
183
|
+
const block = extractBlock(content);
|
|
184
|
+
const result = {
|
|
185
|
+
origin: undefined,
|
|
186
|
+
originTrust: undefined,
|
|
187
|
+
slug: undefined,
|
|
188
|
+
spec: undefined,
|
|
189
|
+
prd: undefined,
|
|
190
|
+
issue: undefined,
|
|
191
|
+
humanOnly: undefined,
|
|
192
|
+
needsAnswers: undefined,
|
|
193
|
+
triaged: undefined,
|
|
194
|
+
blockedBy: [],
|
|
195
|
+
taskedAfter: [],
|
|
196
|
+
promptGuidance: { testFirst: undefined },
|
|
197
|
+
};
|
|
198
|
+
if (block === undefined) {
|
|
199
|
+
return result;
|
|
200
|
+
}
|
|
201
|
+
const lines = block.split('\n');
|
|
202
|
+
for (let i = 0; i < lines.length; i++) {
|
|
203
|
+
const line = lines[i];
|
|
204
|
+
// Skip blank lines and comments and non top-level (indented) lines; block
|
|
205
|
+
// list items are consumed inline below.
|
|
206
|
+
if (line.trim() === '' || line.trimStart().startsWith('#')) {
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
// Top-level keys are alphanumeric / `_`; the dot is allowed so the per-item
|
|
210
|
+
// override for the `promptGuidance` namespace can be parsed in its DOTTED
|
|
211
|
+
// scalar form (e.g. `promptGuidance.testFirst: true`) without introducing a
|
|
212
|
+
// nested-mapping parser.
|
|
213
|
+
const match = /^([A-Za-z0-9_.]+)\s*:\s*(.*)$/.exec(line);
|
|
214
|
+
if (!match) {
|
|
215
|
+
continue;
|
|
216
|
+
}
|
|
217
|
+
const key = match[1];
|
|
218
|
+
const rawValue = match[2].trim();
|
|
219
|
+
if (key === 'origin') {
|
|
220
|
+
// Provenance: how the artifact was born. Only the known values map;
|
|
221
|
+
// anything else (or empty) reads as undefined (⇒ the human/trusted default).
|
|
222
|
+
const v = unquote(rawValue).toLowerCase();
|
|
223
|
+
result.origin = v === 'human' || v === 'issue' ? v : undefined;
|
|
224
|
+
}
|
|
225
|
+
else if (key === 'originTrust') {
|
|
226
|
+
// The author-trust verdict at birth. Only the known values map; anything
|
|
227
|
+
// else (or empty) reads as undefined (⇒ trusted, the zero-change default).
|
|
228
|
+
const v = unquote(rawValue).toLowerCase();
|
|
229
|
+
result.originTrust = v === 'trusted' || v === 'untrusted' ? v : undefined;
|
|
230
|
+
}
|
|
231
|
+
else if (key === 'slug') {
|
|
232
|
+
result.slug = rawValue === '' ? undefined : unquote(rawValue);
|
|
233
|
+
}
|
|
234
|
+
else if (key === 'spec' || key === 'prd') {
|
|
235
|
+
// EXPAND step (prd `prd-to-spec-vocabulary-cutover-and-migration-command`):
|
|
236
|
+
// the parent-spec pointer is written under EITHER the new `spec:` key or the
|
|
237
|
+
// legacy `prd:` key. Populate BOTH `fm.spec` and `fm.prd` with the same value
|
|
238
|
+
// so a caller reading either field sees it. `spec:` wins if both are present
|
|
239
|
+
// (the canonical key takes precedence over the legacy alias); an empty value
|
|
240
|
+
// on one key does NOT clobber a non-empty value already read from the other.
|
|
241
|
+
const value = rawValue === '' ? undefined : unquote(rawValue);
|
|
242
|
+
if (key === 'spec') {
|
|
243
|
+
// The canonical key wins: overwrite whatever `prd:` may have set.
|
|
244
|
+
if (value !== undefined) {
|
|
245
|
+
result.spec = value;
|
|
246
|
+
result.prd = value;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
else if (result.spec === undefined) {
|
|
250
|
+
// Legacy `prd:` only fills in when `spec:` has not already set the pair.
|
|
251
|
+
result.spec = value;
|
|
252
|
+
result.prd = value;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
else if (key === 'issue') {
|
|
256
|
+
// Integer issue link (`intake`'s prd-emit OR a lone-task emit). A
|
|
257
|
+
// non-integer / empty value reads as undefined (the field is absent rather
|
|
258
|
+
// than malformed).
|
|
259
|
+
const n = Number(unquote(rawValue));
|
|
260
|
+
result.issue =
|
|
261
|
+
rawValue !== '' && Number.isInteger(n) && n > 0 ? n : undefined;
|
|
262
|
+
}
|
|
263
|
+
else if (key === 'promptGuidance.testFirst') {
|
|
264
|
+
// Per-item override for the `promptGuidance.testFirst` nudge. An empty or
|
|
265
|
+
// malformed value reads as `undefined` (⇒ inherit the next layer), the
|
|
266
|
+
// same silent-on-malformed shape `humanOnly` uses — never a silent coerce.
|
|
267
|
+
result.promptGuidance.testFirst =
|
|
268
|
+
rawValue === '' ? undefined : toBoolean(rawValue);
|
|
269
|
+
}
|
|
270
|
+
else if (key === 'humanOnly') {
|
|
271
|
+
result.humanOnly = rawValue === '' ? undefined : toBoolean(rawValue);
|
|
272
|
+
}
|
|
273
|
+
else if (key === 'needsAnswers') {
|
|
274
|
+
result.needsAnswers = rawValue === '' ? undefined : toBoolean(rawValue);
|
|
275
|
+
}
|
|
276
|
+
else if (key === 'triaged') {
|
|
277
|
+
// The SETTLED marker: a non-empty value (`keep`/`duplicate`) drops the
|
|
278
|
+
// observation out of the triage pool. An empty value reads as undefined
|
|
279
|
+
// (undeclared — still untriaged).
|
|
280
|
+
result.triaged = rawValue === '' ? undefined : unquote(rawValue);
|
|
281
|
+
}
|
|
282
|
+
else if (key === 'blockedBy' || key === 'taskedAfter') {
|
|
283
|
+
let list;
|
|
284
|
+
if (rawValue.startsWith('[')) {
|
|
285
|
+
list = parseInlineList(rawValue);
|
|
286
|
+
}
|
|
287
|
+
else if (rawValue === '') {
|
|
288
|
+
// Block-style list: consume following indented `- item` lines.
|
|
289
|
+
const items = [];
|
|
290
|
+
let j = i + 1;
|
|
291
|
+
while (j < lines.length) {
|
|
292
|
+
const itemMatch = /^\s+-\s*(.+)$/.exec(lines[j]);
|
|
293
|
+
if (!itemMatch) {
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
const item = unquote(itemMatch[1]);
|
|
297
|
+
if (item !== '') {
|
|
298
|
+
items.push(item);
|
|
299
|
+
}
|
|
300
|
+
j++;
|
|
301
|
+
}
|
|
302
|
+
list = items;
|
|
303
|
+
i = j - 1;
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
list = [];
|
|
307
|
+
}
|
|
308
|
+
if (key === 'blockedBy') {
|
|
309
|
+
result.blockedBy = list;
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
result.taskedAfter = list;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return result;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Resolve, from a parsed artifact's frontmatter, HOW it closes its source issue:
|
|
320
|
+
* the `prd:` hop or the lone-task `issue:` field. A PURE helper for the FUTURE
|
|
321
|
+
* CI close-job (`runner-in-ci`'s) — it is NOT wired into intake or any reader
|
|
322
|
+
* today; it merely pins the one-closure-path PRECEDENCE in one place.
|
|
323
|
+
*
|
|
324
|
+
* Encodes the invariant: a task uses `issue:` XOR `prd:`. When (only a human
|
|
325
|
+
* hand-edit could) BOTH are present, `prd:` WINS — the close-job hops to the prd's
|
|
326
|
+
* `issue:` and IGNORES the task's own `issue:` (the fanned-prd path is the
|
|
327
|
+
* authoritative one; a lone `issue:` on a `prd:`-bearing task is a contradiction
|
|
328
|
+
* that degrades to "use the prd" rather than crashing).
|
|
329
|
+
*
|
|
330
|
+
* Returns:
|
|
331
|
+
* - `{via: 'spec', spec}` when a `spec:` is present (hop to the spec's `issue:`; the
|
|
332
|
+
* caller resolves the spec file to read its number);
|
|
333
|
+
* - `{via: 'issue', issue}` when only a lone-task `issue:` is present;
|
|
334
|
+
* - `undefined` when neither is present (no closure path).
|
|
335
|
+
*/
|
|
336
|
+
export function resolveClosingIssue(frontmatter) {
|
|
337
|
+
if (frontmatter.spec !== undefined) {
|
|
338
|
+
return { via: 'spec', spec: frontmatter.spec };
|
|
339
|
+
}
|
|
340
|
+
if (frontmatter.issue !== undefined) {
|
|
341
|
+
return { via: 'issue', issue: frontmatter.issue };
|
|
342
|
+
}
|
|
343
|
+
return undefined;
|
|
344
|
+
}
|
|
345
|
+
//# sourceMappingURL=frontmatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../src/frontmatter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsIH;;;;GAIG;AACH,SAAS,YAAY,CAAC,OAAe;IACpC,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACzE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;QAC7D,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,mCAAmC;IACnC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACxC,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC;QACpB,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC;AAED,qEAAqE;AACrE,SAAS,OAAO,CAAC,KAAa;IAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,OAAO,CAAC,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,CAAC,GAAG,CAAC,CAAC;YACX,CAAC;iBAAM,CAAC;gBACP,IAAI,GAAG,EAAE,CAAC;YACX,CAAC;YACD,IAAI,GAAG,KAAK,WAAW,EAAE,CAAC;gBACzB,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;YACzB,CAAC;iBAAM,CAAC;gBACP,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC;YAC3B,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,mBAAmB,CAClC,WAAgD;IAEhD,IAAI,WAAW,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QACpC,OAAO,EAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAC,CAAC;IAC9C,CAAC;IACD,IAAI,WAAW,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QACrC,OAAO,EAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAC,CAAC;IACjD,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type PrepareConfig } from './prepare.js';
|
|
2
|
+
/**
|
|
3
|
+
* Pre-claim / pre-build startup GUARD for the fresh-worktree acceptance gate
|
|
4
|
+
* (task `do-fails-fast-when-acceptance-gate-statically-unrunnable`).
|
|
5
|
+
*
|
|
6
|
+
* The fresh-worktree gate (`gate-on-rebased-tip-fresh-worktree`, ON by default)
|
|
7
|
+
* runs `prepare` then `verify` in a CLEAN throwaway worktree with NO
|
|
8
|
+
* `node_modules`. If `prepare` resolves to no commands AND the repo has a
|
|
9
|
+
* lockfile (evidence that an install IS required), the gate will provably fail
|
|
10
|
+
* with "command not found" — a STATICALLY-detectable misconfiguration we can
|
|
11
|
+
* surface at second zero, BEFORE wasting a claim + agent build + a routed
|
|
12
|
+
* needs-attention.
|
|
13
|
+
*
|
|
14
|
+
* Critical non-regression: `prepare` resolving to no commands is a DELIBERATE
|
|
15
|
+
* no-op (`prepare.ts`: "a repo with no deps needs none; we never invent a
|
|
16
|
+
* default that would run `pnpm install` in a repo that has no lockfile"). So
|
|
17
|
+
* the guard KEYS off LOCKFILE-PRESENT evidence — never off `prepare`-unset
|
|
18
|
+
* alone — and a genuinely dep-free repo (no lockfile) PROCEEDS unchanged.
|
|
19
|
+
*
|
|
20
|
+
* There is NO "verify unset" case: {@link resolveVerifyCommands} substitutes
|
|
21
|
+
* `DEFAULT_VERIFY_COMMAND` when `verify` is unset OR all-blank, so `verify` is
|
|
22
|
+
* NEVER statically unrunnable-because-unset. A "verify unset → STOP" guard
|
|
23
|
+
* would be dead code (or fire wrongly on the default). The guard is deps-only.
|
|
24
|
+
*
|
|
25
|
+
* The guard is also gated on `freshWorktreeGate === true` for THIS invocation:
|
|
26
|
+
* when the gate is OFF (`--no-fresh-worktree-gate`) the acceptance gate runs in
|
|
27
|
+
* the agent's BUILD worktree (which HAS deps), so the throwaway-worktree
|
|
28
|
+
* reasoning does not apply.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* The lockfile basenames whose presence implies an install is required. Order
|
|
32
|
+
* is the search order (first match wins — its basename is the one named in the
|
|
33
|
+
* guard message).
|
|
34
|
+
*/
|
|
35
|
+
export declare const LOCKFILE_BASENAMES: readonly ["pnpm-lock.yaml", "package-lock.json", "yarn.lock"];
|
|
36
|
+
/**
|
|
37
|
+
* Probe `cwd` for one of {@link LOCKFILE_BASENAMES} on disk and return the
|
|
38
|
+
* first match (or `undefined`). The standard probe for the in-place / job-
|
|
39
|
+
* worktree paths where the repo is materialised on disk.
|
|
40
|
+
*/
|
|
41
|
+
export declare function detectLockfileOnDisk(cwd: string): string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Probe a BARE mirror's `main` ref via `git ls-tree` for one of
|
|
44
|
+
* {@link LOCKFILE_BASENAMES} and return the first match (or `undefined`). Used
|
|
45
|
+
* by the no-checkout `do --remote` path, which has no working tree until AFTER
|
|
46
|
+
* the claim; this lets the guard fire BEFORE the claim. Best-effort: a missing
|
|
47
|
+
* `main` ref or a failing `git ls-tree` returns `undefined` (the guard then
|
|
48
|
+
* stays quiet and any genuine plumbing error surfaces later as a usage error).
|
|
49
|
+
*/
|
|
50
|
+
export declare function detectLockfileOnMirrorMain(mirrorPath: string, env?: NodeJS.ProcessEnv): string | undefined;
|
|
51
|
+
export interface GatePreconditionInput {
|
|
52
|
+
/**
|
|
53
|
+
* The resolved fresh-worktree-gate flag for THIS invocation
|
|
54
|
+
* (flag > env > per-repo > global > default `true`). The guard ONLY fires when
|
|
55
|
+
* this is exactly `true` — `false`/`undefined` ⇒ the throwaway-worktree
|
|
56
|
+
* reasoning does not apply and the guard returns `undefined`.
|
|
57
|
+
*/
|
|
58
|
+
freshWorktreeGate: boolean | undefined;
|
|
59
|
+
/** The resolved `prepare` config (unset / string / list). */
|
|
60
|
+
prepare?: PrepareConfig;
|
|
61
|
+
/**
|
|
62
|
+
* The lockfile basename probed for this repo (one of
|
|
63
|
+
* {@link LOCKFILE_BASENAMES}), or `undefined` for the intentional dep-free
|
|
64
|
+
* case. The caller picks the probe ({@link detectLockfileOnDisk} for the
|
|
65
|
+
* in-place / job-worktree paths, {@link detectLockfileOnMirrorMain} for the
|
|
66
|
+
* no-checkout `do --remote` path).
|
|
67
|
+
*/
|
|
68
|
+
lockfile: string | undefined;
|
|
69
|
+
}
|
|
70
|
+
export interface GatePreconditionFailure {
|
|
71
|
+
/** The lockfile basename (from {@link LOCKFILE_BASENAMES}) that tripped the guard. */
|
|
72
|
+
lockfile: string;
|
|
73
|
+
/** A precise, actionable error message naming the lockfile and the two ways out. */
|
|
74
|
+
message: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Check the fresh-worktree-gate startup preconditions. Returns the failure
|
|
78
|
+
* (with a precise message) when the gate is STATICALLY unrunnable for the
|
|
79
|
+
* deps-only reason; returns `undefined` otherwise (proceed normally).
|
|
80
|
+
*
|
|
81
|
+
* NOTE — deps-only, not verify-presence: see the file-level doc.
|
|
82
|
+
*/
|
|
83
|
+
export declare function checkGatePreconditions(input: GatePreconditionInput): GatePreconditionFailure | undefined;
|
|
84
|
+
//# sourceMappingURL=gate-readiness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate-readiness.d.ts","sourceRoot":"","sources":["../src/gate-readiness.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,KAAK,aAAa,EAAC,MAAM,cAAc,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,+DAIrB,CAAC;AAEX;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEpE;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACzC,UAAU,EAAE,MAAM,EAClB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,GACrB,MAAM,GAAG,SAAS,CAiBpB;AAED,MAAM,WAAW,qBAAqB;IACrC;;;;;OAKG;IACH,iBAAiB,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,6DAA6D;IAC7D,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACvC,sFAAsF;IACtF,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,qBAAqB,GAC1B,uBAAuB,GAAG,SAAS,CA0BrC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { run } from './git.js';
|
|
4
|
+
import { resolvePrepareCommands } from './prepare.js';
|
|
5
|
+
/**
|
|
6
|
+
* Pre-claim / pre-build startup GUARD for the fresh-worktree acceptance gate
|
|
7
|
+
* (task `do-fails-fast-when-acceptance-gate-statically-unrunnable`).
|
|
8
|
+
*
|
|
9
|
+
* The fresh-worktree gate (`gate-on-rebased-tip-fresh-worktree`, ON by default)
|
|
10
|
+
* runs `prepare` then `verify` in a CLEAN throwaway worktree with NO
|
|
11
|
+
* `node_modules`. If `prepare` resolves to no commands AND the repo has a
|
|
12
|
+
* lockfile (evidence that an install IS required), the gate will provably fail
|
|
13
|
+
* with "command not found" — a STATICALLY-detectable misconfiguration we can
|
|
14
|
+
* surface at second zero, BEFORE wasting a claim + agent build + a routed
|
|
15
|
+
* needs-attention.
|
|
16
|
+
*
|
|
17
|
+
* Critical non-regression: `prepare` resolving to no commands is a DELIBERATE
|
|
18
|
+
* no-op (`prepare.ts`: "a repo with no deps needs none; we never invent a
|
|
19
|
+
* default that would run `pnpm install` in a repo that has no lockfile"). So
|
|
20
|
+
* the guard KEYS off LOCKFILE-PRESENT evidence — never off `prepare`-unset
|
|
21
|
+
* alone — and a genuinely dep-free repo (no lockfile) PROCEEDS unchanged.
|
|
22
|
+
*
|
|
23
|
+
* There is NO "verify unset" case: {@link resolveVerifyCommands} substitutes
|
|
24
|
+
* `DEFAULT_VERIFY_COMMAND` when `verify` is unset OR all-blank, so `verify` is
|
|
25
|
+
* NEVER statically unrunnable-because-unset. A "verify unset → STOP" guard
|
|
26
|
+
* would be dead code (or fire wrongly on the default). The guard is deps-only.
|
|
27
|
+
*
|
|
28
|
+
* The guard is also gated on `freshWorktreeGate === true` for THIS invocation:
|
|
29
|
+
* when the gate is OFF (`--no-fresh-worktree-gate`) the acceptance gate runs in
|
|
30
|
+
* the agent's BUILD worktree (which HAS deps), so the throwaway-worktree
|
|
31
|
+
* reasoning does not apply.
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* The lockfile basenames whose presence implies an install is required. Order
|
|
35
|
+
* is the search order (first match wins — its basename is the one named in the
|
|
36
|
+
* guard message).
|
|
37
|
+
*/
|
|
38
|
+
export const LOCKFILE_BASENAMES = [
|
|
39
|
+
'pnpm-lock.yaml',
|
|
40
|
+
'package-lock.json',
|
|
41
|
+
'yarn.lock',
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* Probe `cwd` for one of {@link LOCKFILE_BASENAMES} on disk and return the
|
|
45
|
+
* first match (or `undefined`). The standard probe for the in-place / job-
|
|
46
|
+
* worktree paths where the repo is materialised on disk.
|
|
47
|
+
*/
|
|
48
|
+
export function detectLockfileOnDisk(cwd) {
|
|
49
|
+
return LOCKFILE_BASENAMES.find((name) => existsSync(join(cwd, name)));
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Probe a BARE mirror's `main` ref via `git ls-tree` for one of
|
|
53
|
+
* {@link LOCKFILE_BASENAMES} and return the first match (or `undefined`). Used
|
|
54
|
+
* by the no-checkout `do --remote` path, which has no working tree until AFTER
|
|
55
|
+
* the claim; this lets the guard fire BEFORE the claim. Best-effort: a missing
|
|
56
|
+
* `main` ref or a failing `git ls-tree` returns `undefined` (the guard then
|
|
57
|
+
* stays quiet and any genuine plumbing error surfaces later as a usage error).
|
|
58
|
+
*/
|
|
59
|
+
export function detectLockfileOnMirrorMain(mirrorPath, env) {
|
|
60
|
+
const res = run('git', ['ls-tree', '--name-only', 'main', ...LOCKFILE_BASENAMES], mirrorPath, { env });
|
|
61
|
+
if (res.status !== 0) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
const present = new Set(res.stdout
|
|
65
|
+
.split('\n')
|
|
66
|
+
.map((line) => line.trim())
|
|
67
|
+
.filter((line) => line !== ''));
|
|
68
|
+
return LOCKFILE_BASENAMES.find((name) => present.has(name));
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Check the fresh-worktree-gate startup preconditions. Returns the failure
|
|
72
|
+
* (with a precise message) when the gate is STATICALLY unrunnable for the
|
|
73
|
+
* deps-only reason; returns `undefined` otherwise (proceed normally).
|
|
74
|
+
*
|
|
75
|
+
* NOTE — deps-only, not verify-presence: see the file-level doc.
|
|
76
|
+
*/
|
|
77
|
+
export function checkGatePreconditions(input) {
|
|
78
|
+
// Gate OFF for THIS invocation ⇒ no throwaway worktree ⇒ the deps reasoning
|
|
79
|
+
// does not apply. (The default is ON; the guard fires when ON.)
|
|
80
|
+
if (input.freshWorktreeGate !== true) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
// `prepare` resolves to at least one command ⇒ the throwaway worktree will
|
|
84
|
+
// install (or codegen, etc.); not statically unrunnable. Covers BOTH `prepare`
|
|
85
|
+
// unset AND an all-blank list returning `[]` via the SAME `resolvePrepareCommands`.
|
|
86
|
+
if (resolvePrepareCommands(input.prepare).length > 0) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
// No lockfile ⇒ the intentional dep-free repo (the design point preserved):
|
|
90
|
+
// `prepare` unset is a DELIBERATE no-op and `verify` runs against a repo that
|
|
91
|
+
// needs no install — proceed.
|
|
92
|
+
if (input.lockfile === undefined) {
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
lockfile: input.lockfile,
|
|
97
|
+
message: 'the fresh-worktree gate is on but no `prepare` step is configured, ' +
|
|
98
|
+
`and a lockfile (${input.lockfile}) is present — the throwaway worktree ` +
|
|
99
|
+
'will have no installed deps, so the gate cannot run. Add a `prepare` ' +
|
|
100
|
+
'(e.g. `pnpm install --frozen-lockfile`) or pass --no-fresh-worktree-gate.',
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=gate-readiness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate-readiness.js","sourceRoot":"","sources":["../src/gate-readiness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA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