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,347 @@
|
|
|
1
|
+
import { open } from 'node:fs/promises';
|
|
2
|
+
/**
|
|
3
|
+
* The **`do --watch` observer** (tasks `do-watch` + `do-watch-session-log-format`)
|
|
4
|
+
* — a READ-ONLY concurrent tail of the pi session `.jsonl` event log, restoring
|
|
5
|
+
* for `do` the live agent-conversation view `ar-run.sh --watch` gave.
|
|
6
|
+
*
|
|
7
|
+
* `ar-run.sh --watch` piped `pi -p --mode json | jq` to surface the high-signal
|
|
8
|
+
* events; `do` runs the agent CAPTURED through the harness seam, so that live
|
|
9
|
+
* view was lost. The pi adapter writes a session `.jsonl` at the KNOWN file path
|
|
10
|
+
* the caller generated (`--session <path>`, task `session-path-pi-default`) —
|
|
11
|
+
* but that is pi's SESSION-PERSISTENCE log, a DIFFERENT format from the
|
|
12
|
+
* `--mode json` STREAM `ar-run.sh` piped. The tailer is pointed at that EXACT
|
|
13
|
+
* path (no newest-by-mtime dir guessing), so the stale-sibling race is gone.
|
|
14
|
+
*
|
|
15
|
+
* A session-log record is `{"type":"message", "message":{role, content[]}}` (or a
|
|
16
|
+
* `session`/`model_change`/`thinking_level_change` preamble record). The earlier
|
|
17
|
+
* classifier matched the STREAM vocabulary (`tool_start`/`message_end`/`agent_end`),
|
|
18
|
+
* none of which occur in the session log — so every line fell through to skip and
|
|
19
|
+
* `do --watch` was silently a no-op. This module tails the growing session log and
|
|
20
|
+
* surfaces the same high-signal level `ar-run.sh --watch` gave, read off the
|
|
21
|
+
* SESSION-LOG shape:
|
|
22
|
+
*
|
|
23
|
+
* - an `assistant` `message` → its `content[]` `text` parts, then `▶ <name>`
|
|
24
|
+
* (cyan) per `content[]` `toolCall` part;
|
|
25
|
+
* - `✓ agent finished` (green) on PROCESS EXIT — the session log has no
|
|
26
|
+
* `agent_end` event, so the tailer emits it once on `stop()`;
|
|
27
|
+
* - everything else (`session`/`model_change`/user messages/tool results/…) →
|
|
28
|
+
* skipped.
|
|
29
|
+
*
|
|
30
|
+
* The classifier mirrors pi-remote's `session-pool.ts` reference parser (`type` →
|
|
31
|
+
* `role` → `content[]` block walk over `thinking`/`text`/`toolCall`, incl.
|
|
32
|
+
* `tc.name||tc.toolName` and content-as-string). The JSONL is parsed in TS (NO
|
|
33
|
+
* `jq` — that bash dependency is part of what `do` replaces). It is a PURE
|
|
34
|
+
* OBSERVER: it only READS the log; it never changes the run's outcome, gate,
|
|
35
|
+
* integration, git, or exit code. Colour is honoured ONLY on a TTY / when
|
|
36
|
+
* `NO_COLOR` is unset (the same rule as `output.ts`), threaded in by the caller
|
|
37
|
+
* as a boolean.
|
|
38
|
+
*/
|
|
39
|
+
// The same conventional ANSI codes `ar-run.sh`'s jq filter emitted (cyan tool
|
|
40
|
+
// marker, green finished marker, reset). Colour is applied ONLY when the caller
|
|
41
|
+
// passes `color: true` (its TTY/NO_COLOR decision); plain otherwise.
|
|
42
|
+
const CYAN = '\u001b[36m';
|
|
43
|
+
const GREEN = '\u001b[32m';
|
|
44
|
+
const RESET = '\u001b[0m';
|
|
45
|
+
/** Wrap `text` in `code` + reset when `color`, else return it unchanged. */
|
|
46
|
+
function paint(text, color, code) {
|
|
47
|
+
return color ? `${code}${text}${RESET}` : text;
|
|
48
|
+
}
|
|
49
|
+
/** The green `✓ agent finished` line, emitted on PROCESS EXIT (not a log event). */
|
|
50
|
+
export function finishedLine(color) {
|
|
51
|
+
return paint('✓ agent finished', color, GREEN);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A one-line VISUAL BOUNDARY banner the caller prints between two tailed agent
|
|
55
|
+
* streams (e.g. the build stream and the Gate-2 review stream — task
|
|
56
|
+
* `watch-review-session`), so a watching human knows the first stream ended and
|
|
57
|
+
* the next began. Reuses this module's colour rule (cyan, the same marker hue as
|
|
58
|
+
* the `▶ <tool>` lines) so it reads as part of the same live view. Pure: returns
|
|
59
|
+
* the string; the caller routes it to the watch sink.
|
|
60
|
+
*/
|
|
61
|
+
export function boundaryLine(label, color) {
|
|
62
|
+
return paint(`▶ ${label}`, color, CYAN);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Parse ONE pi SESSION-LOG `.jsonl` line and return the high-signal lines to
|
|
66
|
+
* surface — or `[]` to SKIP it. This is the pure, unit-testable classifier,
|
|
67
|
+
* mirroring pi-remote's `session-pool.ts` block walk:
|
|
68
|
+
*
|
|
69
|
+
* - a `{type:"message", message:{role:"assistant", content}}` record → for each
|
|
70
|
+
* `content[]` part: a `text` part yields its text (parts concatenated into
|
|
71
|
+
* ONE line, like the old `jq` `.content[]` select); a `toolCall` part yields
|
|
72
|
+
* `▶ <name>` (cyan; `name` OR `toolName`, defaulting to `tool`); a `thinking`
|
|
73
|
+
* part (and anything else) is skipped. A plain-string `content` yields one
|
|
74
|
+
* text line.
|
|
75
|
+
* - everything else (`session`/`model_change`/`thinking_level_change`, user
|
|
76
|
+
* messages, tool results, blank/malformed lines) → `[]` (skipped).
|
|
77
|
+
*
|
|
78
|
+
* "Finished" is NOT a record here — the session log has no `agent_end`; the
|
|
79
|
+
* tailer emits {@link finishedLine} on process exit instead.
|
|
80
|
+
*
|
|
81
|
+
* Malformed JSON is skipped (not thrown): a partially-written trailing line in a
|
|
82
|
+
* growing log must not crash the observer.
|
|
83
|
+
*/
|
|
84
|
+
export function formatWatchEvent(line, color) {
|
|
85
|
+
const trimmed = line.trim();
|
|
86
|
+
if (trimmed === '') {
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
let event;
|
|
90
|
+
try {
|
|
91
|
+
event = JSON.parse(trimmed);
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
// A half-written trailing line in a growing log — skip, never throw.
|
|
95
|
+
return [];
|
|
96
|
+
}
|
|
97
|
+
if (typeof event !== 'object' || event === null) {
|
|
98
|
+
return [];
|
|
99
|
+
}
|
|
100
|
+
const record = event;
|
|
101
|
+
if (record.type !== 'message') {
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
const message = record.message;
|
|
105
|
+
if (!message || message.role !== 'assistant') {
|
|
106
|
+
// Skip user turns, tool results, and any non-assistant message.
|
|
107
|
+
return [];
|
|
108
|
+
}
|
|
109
|
+
return assistantLines(message.content, color);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Walk an assistant `message.content` into the lines to surface, mirroring
|
|
113
|
+
* pi-remote's `session-pool.ts` reference parser. The `text` parts are
|
|
114
|
+
* concatenated into a SINGLE leading line (so a multi-part assistant turn reads
|
|
115
|
+
* as one sentence, as `ar-run.sh --watch` showed it); each `toolCall` part adds a
|
|
116
|
+
* `▶ <name>` line after it. A plain-string content yields the single text line.
|
|
117
|
+
* `thinking` parts and any other block type are skipped.
|
|
118
|
+
*/
|
|
119
|
+
function assistantLines(content, color) {
|
|
120
|
+
if (typeof content === 'string') {
|
|
121
|
+
return content === '' ? [] : [content];
|
|
122
|
+
}
|
|
123
|
+
if (!Array.isArray(content)) {
|
|
124
|
+
return [];
|
|
125
|
+
}
|
|
126
|
+
const lines = [];
|
|
127
|
+
const text = assistantContentText(content);
|
|
128
|
+
for (const part of content) {
|
|
129
|
+
if (typeof part !== 'object' || part === null) {
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
const p = part;
|
|
133
|
+
if (p.type === 'toolCall') {
|
|
134
|
+
const name = (typeof p.name === 'string' && p.name !== '' && p.name) ||
|
|
135
|
+
(typeof p.toolName === 'string' && p.toolName !== '' && p.toolName) ||
|
|
136
|
+
'tool';
|
|
137
|
+
lines.push(paint(`▶ ${name}`, color, CYAN));
|
|
138
|
+
}
|
|
139
|
+
// `text` is collected by assistantContentText; `thinking` and any other
|
|
140
|
+
// block type are skipped.
|
|
141
|
+
}
|
|
142
|
+
return text === '' ? lines : [text, ...lines];
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Concatenate the `text` parts of ONE assistant `message.content` (the answer
|
|
146
|
+
* text, with tool/thinking blocks dropped) — the single source of truth for
|
|
147
|
+
* "what did the assistant SAY" shared by the {@link assistantLines} watch view
|
|
148
|
+
* and the {@link lastAssistantText} output reader (task `harness-agent-output`).
|
|
149
|
+
* A plain-string content is itself the text. Returns `''` when there is no text.
|
|
150
|
+
*/
|
|
151
|
+
function assistantContentText(content) {
|
|
152
|
+
if (typeof content === 'string') {
|
|
153
|
+
return content;
|
|
154
|
+
}
|
|
155
|
+
if (!Array.isArray(content)) {
|
|
156
|
+
return '';
|
|
157
|
+
}
|
|
158
|
+
const textParts = [];
|
|
159
|
+
for (const part of content) {
|
|
160
|
+
if (typeof part !== 'object' || part === null) {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
const p = part;
|
|
164
|
+
if (p.type === 'text' && typeof p.text === 'string') {
|
|
165
|
+
textParts.push(p.text);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return textParts.join('');
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Extract the **last assistant message's text** from a pi session `.jsonl`
|
|
172
|
+
* (task `harness-agent-output`) — the agent's final ANSWER, surfaced through
|
|
173
|
+
* the harness seam as `LaunchResult.output`. It REUSES this module's session-log
|
|
174
|
+
* shape walk (one parser, not two): it scans the `{type:"message",
|
|
175
|
+
* message:{role:"assistant", content[]}}` records, takes the LAST one carrying
|
|
176
|
+
* non-empty `text`, and returns its concatenated text.
|
|
177
|
+
*
|
|
178
|
+
* Returns `undefined` when the log has no assistant text at all — an absent log,
|
|
179
|
+
* a malformed/short log, or a run whose only assistant turn was tool-calls (no
|
|
180
|
+
* `text` part). A tool-only assistant turn is NOT a final answer, so a LATER
|
|
181
|
+
* text turn (if any) wins; with no text turn anywhere the result is `undefined`.
|
|
182
|
+
*
|
|
183
|
+
* Malformed/blank lines are skipped (never thrown): a partially-written trailing
|
|
184
|
+
* line in a just-closed log must not crash the reader.
|
|
185
|
+
*/
|
|
186
|
+
export function lastAssistantText(jsonl) {
|
|
187
|
+
let last;
|
|
188
|
+
for (const line of jsonl.split('\n')) {
|
|
189
|
+
const trimmed = line.trim();
|
|
190
|
+
if (trimmed === '') {
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
let event;
|
|
194
|
+
try {
|
|
195
|
+
event = JSON.parse(trimmed);
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
continue; // a half-written / malformed line — skip, never throw.
|
|
199
|
+
}
|
|
200
|
+
if (typeof event !== 'object' || event === null) {
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
const record = event;
|
|
204
|
+
if (record.type !== 'message') {
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
const message = record.message;
|
|
208
|
+
if (!message || message.role !== 'assistant') {
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
const text = assistantContentText(message.content);
|
|
212
|
+
if (text !== '') {
|
|
213
|
+
last = text; // a later text turn supersedes an earlier one.
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return last;
|
|
217
|
+
}
|
|
218
|
+
const DEFAULT_POLL_INTERVAL_MS = 100;
|
|
219
|
+
/**
|
|
220
|
+
* A concurrent, READ-ONLY tail of the pi session `.jsonl`. It polls the KNOWN
|
|
221
|
+
* session-file path (which the pi adapter creates only once pi starts) until it
|
|
222
|
+
* appears, then reads newly-appended bytes, splits them into complete lines, and
|
|
223
|
+
* surfaces each via {@link formatWatchEvent}. A partial trailing line is
|
|
224
|
+
* buffered until its newline arrives, so an event split across two reads is
|
|
225
|
+
* never mis-parsed.
|
|
226
|
+
*
|
|
227
|
+
* It is a pure observer: nothing it does feeds back into the run. `start()`
|
|
228
|
+
* begins polling; `stop()` performs one final drain (to catch events written
|
|
229
|
+
* just before the agent exited), emits the `✓ agent finished` line ONCE (the
|
|
230
|
+
* session log has no `agent_end` — process exit IS the finish signal), and
|
|
231
|
+
* releases the file handle. Created and driven by `do --watch` ALONGSIDE the
|
|
232
|
+
* (async) agent launch; `stop()` runs when that launch returns (i.e. the agent
|
|
233
|
+
* process exited).
|
|
234
|
+
*/
|
|
235
|
+
export class SessionTailer {
|
|
236
|
+
sessionFile;
|
|
237
|
+
color;
|
|
238
|
+
sink;
|
|
239
|
+
pollIntervalMs;
|
|
240
|
+
handle;
|
|
241
|
+
offset = 0;
|
|
242
|
+
pending = '';
|
|
243
|
+
timer;
|
|
244
|
+
polling = false;
|
|
245
|
+
stopped = false;
|
|
246
|
+
finishedEmitted = false;
|
|
247
|
+
constructor(options) {
|
|
248
|
+
this.sessionFile = options.sessionFile;
|
|
249
|
+
this.color = options.color;
|
|
250
|
+
this.sink = options.sink ?? ((line) => process.stderr.write(`${line}\n`));
|
|
251
|
+
this.pollIntervalMs = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
|
|
252
|
+
}
|
|
253
|
+
/** Begin polling for the known session file and tailing its new bytes. */
|
|
254
|
+
start() {
|
|
255
|
+
if (this.timer !== undefined || this.stopped) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
this.timer = setInterval(() => {
|
|
259
|
+
void this.poll();
|
|
260
|
+
}, this.pollIntervalMs);
|
|
261
|
+
// `unref` so an orphaned timer never keeps the process alive past the run.
|
|
262
|
+
this.timer.unref?.();
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Stop tailing: one final drain (events written right before the agent exited
|
|
266
|
+
* must still be surfaced), emit the `✓ agent finished` line ONCE (process exit
|
|
267
|
+
* is the finish signal — the session log carries no `agent_end`), then release
|
|
268
|
+
* the handle. Idempotent: a second `stop()` re-emits nothing.
|
|
269
|
+
*/
|
|
270
|
+
async stop() {
|
|
271
|
+
const wasStopped = this.stopped;
|
|
272
|
+
this.stopped = true;
|
|
273
|
+
if (this.timer !== undefined) {
|
|
274
|
+
clearInterval(this.timer);
|
|
275
|
+
this.timer = undefined;
|
|
276
|
+
}
|
|
277
|
+
if (!wasStopped) {
|
|
278
|
+
await this.drain();
|
|
279
|
+
}
|
|
280
|
+
if (this.handle !== undefined) {
|
|
281
|
+
await this.handle.close();
|
|
282
|
+
this.handle = undefined;
|
|
283
|
+
}
|
|
284
|
+
if (!this.finishedEmitted) {
|
|
285
|
+
this.finishedEmitted = true;
|
|
286
|
+
this.sink(finishedLine(this.color));
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
/** One poll tick: ensure the handle is open, then drain new bytes. */
|
|
290
|
+
async poll() {
|
|
291
|
+
if (this.polling) {
|
|
292
|
+
return; // a slow read must not overlap the next tick.
|
|
293
|
+
}
|
|
294
|
+
this.polling = true;
|
|
295
|
+
try {
|
|
296
|
+
await this.drain();
|
|
297
|
+
}
|
|
298
|
+
catch {
|
|
299
|
+
// A transient read error (the log being rotated/created) — try next tick.
|
|
300
|
+
}
|
|
301
|
+
finally {
|
|
302
|
+
this.polling = false;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
/** Open the log if not yet open, read appended bytes, surface whole lines. */
|
|
306
|
+
async drain() {
|
|
307
|
+
if (this.handle === undefined) {
|
|
308
|
+
// Open the KNOWN path. pi creates it ASYNCHRONOUSLY after spawn, so until
|
|
309
|
+
// it exists `open` throws ENOENT — treat that as "not yet" and retry next
|
|
310
|
+
// tick (NEVER open once at start(), which would race the file into being).
|
|
311
|
+
try {
|
|
312
|
+
this.handle = await open(this.sessionFile, 'r');
|
|
313
|
+
}
|
|
314
|
+
catch (err) {
|
|
315
|
+
if (err.code === 'ENOENT') {
|
|
316
|
+
return; // file not written yet — wait for it.
|
|
317
|
+
}
|
|
318
|
+
throw err; // a real error — bubble to poll's try/catch (next-tick retry).
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
const stats = await this.handle.stat();
|
|
322
|
+
if (stats.size <= this.offset) {
|
|
323
|
+
return; // no new bytes.
|
|
324
|
+
}
|
|
325
|
+
const length = stats.size - this.offset;
|
|
326
|
+
const buffer = Buffer.alloc(length);
|
|
327
|
+
const { bytesRead } = await this.handle.read(buffer, 0, length, this.offset);
|
|
328
|
+
this.offset += bytesRead;
|
|
329
|
+
this.pending += buffer.toString('utf8', 0, bytesRead);
|
|
330
|
+
this.flushLines();
|
|
331
|
+
}
|
|
332
|
+
/** Split the buffer on newlines, surfacing each COMPLETE line; keep the rest. */
|
|
333
|
+
flushLines() {
|
|
334
|
+
let newlineIndex = this.pending.indexOf('\n');
|
|
335
|
+
while (newlineIndex !== -1) {
|
|
336
|
+
const line = this.pending.slice(0, newlineIndex);
|
|
337
|
+
this.pending = this.pending.slice(newlineIndex + 1);
|
|
338
|
+
// A single record may surface MULTIPLE lines (assistant text + each of
|
|
339
|
+
// its tool starts), or none (skipped record types).
|
|
340
|
+
for (const formatted of formatWatchEvent(line, this.color)) {
|
|
341
|
+
this.sink(formatted);
|
|
342
|
+
}
|
|
343
|
+
newlineIndex = this.pending.indexOf('\n');
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
//# sourceMappingURL=watch-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-session.js","sourceRoot":"","sources":["../src/watch-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAkB,MAAM,kBAAkB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,8EAA8E;AAC9E,gFAAgF;AAChF,qEAAqE;AACrE,MAAM,IAAI,GAAG,YAAY,CAAC;AAC1B,MAAM,KAAK,GAAG,YAAY,CAAC;AAC3B,MAAM,KAAK,GAAG,WAAW,CAAC;AAE1B,4EAA4E;AAC5E,SAAS,KAAK,CAAC,IAAY,EAAE,KAAc,EAAE,IAAY;IACxD,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAChD,CAAC;AAqBD,oFAAoF;AACpF,MAAM,UAAU,YAAY,CAAC,KAAc;IAC1C,OAAO,KAAK,CAAC,kBAAkB,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAChD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa,EAAE,KAAc;IACzD,OAAO,KAAK,CAAC,KAAK,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,KAAc;IAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,IAAI,OAAO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C5D,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACtB,CAAC;YACD,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;IACF,CAAC;CACD"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The **work-layout** module: the SOLE source of every `work/...` path string,
|
|
3
|
+
* folder-name union/array, the item-scan predicate, and the prefix-task helpers
|
|
4
|
+
* used across `src/`.
|
|
5
|
+
*
|
|
6
|
+
* This is Phase 0 of the `folder-taxonomy-reorg-and-rename` prd — the de-risking
|
|
7
|
+
* checkpoint. EVERY raw work-path literal (`join(cwd, 'work', ...)`, `'work/<folder>'`,
|
|
8
|
+
* `'work/<folder>/'.length` prefix-tasks) and EVERY folder-name union/array that
|
|
9
|
+
* used to be scattered across ~70 files now routes through here. The NAMES are
|
|
10
|
+
* byte-identical to today (no rename, no behaviour change); only the SOURCE of the
|
|
11
|
+
* string has moved into this one module.
|
|
12
|
+
*
|
|
13
|
+
* The whole point of the seam: the LATER rename tasks flip the VALUES in
|
|
14
|
+
* {@link WORK_FOLDER_NAME} (and `git mv` the on-disk folders) and NOTHING ELSE.
|
|
15
|
+
* Call sites reference folders by their SYMBOLIC key (`'tasks-ready'`,
|
|
16
|
+
* `'specs-ready'`, …), never by a raw string, so a folder-VALUE flip never
|
|
17
|
+
* re-touches a single call site (a KEY rename, e.g. the prd→spec cutover below,
|
|
18
|
+
* is a mechanical relabel of the key literal at each site — behaviour-preserving).
|
|
19
|
+
*
|
|
20
|
+
* Domain note (crown-jewel invariant): a `work/` tree is a set of governance
|
|
21
|
+
* folders where "status IS the folder" — a CAS `git mv` between durable folders is
|
|
22
|
+
* the conflict-safe state machine. This module owns the folder NAMES that literally
|
|
23
|
+
* are that state machine, so it is deliberately the one place a careless rename can
|
|
24
|
+
* touch.
|
|
25
|
+
*
|
|
26
|
+
* The transient states (`in-progress`/`needs-attention`/`tasking`/`advancing`) are
|
|
27
|
+
* NOT folders — they are per-item lock-ref state (see `item-lock.ts`). A stray
|
|
28
|
+
* `in-progress` literal still referenced by some legacy/recovery readers routes
|
|
29
|
+
* through this module like any other folder, but is NOT part of the durable
|
|
30
|
+
* folder-as-status set.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* The repo-relative root of the `work/` governance tree. The single literal `'work'`
|
|
34
|
+
* the whole package shares — every path builder below is rooted here.
|
|
35
|
+
*/
|
|
36
|
+
export declare const WORK_ROOT: "work";
|
|
37
|
+
/**
|
|
38
|
+
* Every work-folder SYMBOLIC KEY → its current on-disk folder NAME (byte-identical
|
|
39
|
+
* to today). This is the ONE place a folder name lives; the later taxonomy rename is
|
|
40
|
+
* a value-only flip of the right-hand side here.
|
|
41
|
+
*
|
|
42
|
+
* Folder kinds (kept here as a single registry, but their distinct roles matter):
|
|
43
|
+
* - TASK lifecycle, the `tasks/` Kanban board: `tasks/backlog` (staging, key
|
|
44
|
+
* `tasks-backlog`) → `tasks/ready` (the agent pool, key `tasks-ready`) →
|
|
45
|
+
* `tasks/done` / `tasks/cancelled` (the PER-REGIME won't-proceed terminal, key
|
|
46
|
+
* `cancelled`).
|
|
47
|
+
* - SPEC lifecycle, the `specs/` regime: `specs/proposed` (staging, key
|
|
48
|
+
* `specs-proposed`) → `specs/ready` (auto-task pool, key `specs-ready`) →
|
|
49
|
+
* `specs/tasked` (tasked, resting, key `specs-tasked`) / `specs/dropped`
|
|
50
|
+
* (the PER-REGIME won't-proceed terminal, key `specs-dropped`).
|
|
51
|
+
* - The PER-REGIME won't-proceed terminals (`tasks/cancelled` + `specs/dropped`)
|
|
52
|
+
* replace the previous shared top-level `work/dropped/`: a dropped task and a
|
|
53
|
+
* dropped spec sharing a slug used to COLLIDE on one bare-slug
|
|
54
|
+
* `work/dropped/<slug>.md`; namespacing each regime's terminal removes the
|
|
55
|
+
* collision. A dropped OBSERVATION needs no terminal — notes leave by deletion.
|
|
56
|
+
* - Capture buckets under the `notes/` umbrella (do NOT flow; leave by deletion):
|
|
57
|
+
* `notes/observations` / `notes/ideas` / `notes/findings`.
|
|
58
|
+
* - Top-level surfaces: `questions` (the "what needs me?" queue), `protocol`
|
|
59
|
+
* (propagated protocol docs). NEITHER is folded under an umbrella.
|
|
60
|
+
* - The stray transient `in-progress` still referenced by legacy/recovery readers
|
|
61
|
+
* and `needs-attention` (both are really lock-ref state, NOT durable folders;
|
|
62
|
+
* routed here only so no reader hand-writes the literal).
|
|
63
|
+
*
|
|
64
|
+
* NOTE on the prd→spec vocabulary cutover
|
|
65
|
+
* (`rename-spec-work-layout-and-folders`, migrate-batch 1 of
|
|
66
|
+
* `prd-to-spec-vocabulary-cutover-and-migration-command`): the spec-regime KEYS
|
|
67
|
+
* below now read in the `spec` vocabulary (`specs-proposed`/`specs-ready`/
|
|
68
|
+
* `specs-tasked`/`specs-dropped`) AND their VALUES flip to `work/specs/*` in
|
|
69
|
+
* lockstep with the on-disk `git mv work/prds/* → work/specs/*`. Unlike the earlier
|
|
70
|
+
* key-only relabel, this batch moves the folders too, so the KEY and VALUE change
|
|
71
|
+
* together and the self-renaming-folder guard stays green. The KEY rename is a
|
|
72
|
+
* mechanical relabel of the key literal at each call site (behaviour-preserving);
|
|
73
|
+
* the frontmatter `prd:` field (a DATA alias the migration command converts) is the
|
|
74
|
+
* one deliberate survivor; the `--specs-land-in` flag/`specsLandIn` config + the
|
|
75
|
+
* `Spec*` symbols were completed by the later batches + the contract task. The
|
|
76
|
+
* folder-as-status invariant is unchanged.
|
|
77
|
+
*/
|
|
78
|
+
export declare const WORK_FOLDER_NAME: {
|
|
79
|
+
readonly 'tasks-backlog': "tasks/backlog";
|
|
80
|
+
readonly 'tasks-ready': "tasks/ready";
|
|
81
|
+
readonly 'in-progress': "in-progress";
|
|
82
|
+
readonly 'needs-attention': "needs-attention";
|
|
83
|
+
readonly done: "tasks/done";
|
|
84
|
+
readonly cancelled: "tasks/cancelled";
|
|
85
|
+
readonly 'specs-proposed': "specs/proposed";
|
|
86
|
+
readonly 'specs-ready': "specs/ready";
|
|
87
|
+
readonly 'specs-tasked': "specs/tasked";
|
|
88
|
+
readonly 'specs-dropped': "specs/dropped";
|
|
89
|
+
readonly observations: "notes/observations";
|
|
90
|
+
readonly ideas: "notes/ideas";
|
|
91
|
+
readonly findings: "notes/findings";
|
|
92
|
+
readonly questions: "questions";
|
|
93
|
+
readonly protocol: "protocol";
|
|
94
|
+
};
|
|
95
|
+
/** The SYMBOLIC KEY of a work folder (stable across the later rename). */
|
|
96
|
+
export type WorkFolderKey = keyof typeof WORK_FOLDER_NAME;
|
|
97
|
+
/**
|
|
98
|
+
* Resolve a folder's current on-disk NAME from its symbolic key. The ONE accessor
|
|
99
|
+
* every other folder-name lookup derives from, so the rename flips it in lockstep.
|
|
100
|
+
*/
|
|
101
|
+
export declare function workFolderName(folder: WorkFolderKey): string;
|
|
102
|
+
/**
|
|
103
|
+
* Absolute path of a work folder under a repo/cwd root:
|
|
104
|
+
* `<root>/work/<folder-name>`. Replaces every `join(cwd, 'work', '<folder>')` and
|
|
105
|
+
* `join(repoPath, 'work', folder)` call site.
|
|
106
|
+
*/
|
|
107
|
+
export declare function workFolderPath(root: string, folder: WorkFolderKey): string;
|
|
108
|
+
/**
|
|
109
|
+
* Absolute path of a single item's `.md` file in a work folder:
|
|
110
|
+
* `<root>/work/<folder-name>/<slug>.md`. Replaces every
|
|
111
|
+
* `join(cwd, 'work', folder, `${slug}.md`)` call site. `slug` is the bare slug
|
|
112
|
+
* (the `.md` suffix is appended here).
|
|
113
|
+
*/
|
|
114
|
+
export declare function workItemPath(root: string, folder: WorkFolderKey, slug: string): string;
|
|
115
|
+
/**
|
|
116
|
+
* REPO-RELATIVE path of a work folder: `work/<folder-name>` (no trailing slash, no
|
|
117
|
+
* root). The form used for `git mv` / `git`-relative paths and the staging/pool dir
|
|
118
|
+
* constants (`STAGED_TASKS_DIR`, etc.). Replaces raw `'work/<folder>'` literals.
|
|
119
|
+
*/
|
|
120
|
+
export declare function workFolderRel(folder: WorkFolderKey): string;
|
|
121
|
+
/**
|
|
122
|
+
* REPO-RELATIVE path of a single item file: `work/<folder-name>/<basename>`. The
|
|
123
|
+
* `basename` is a full filename (caller decides whether it carries `.md`), matching
|
|
124
|
+
* the existing `join('work', folder, '<file>')` call sites that pass either a
|
|
125
|
+
* `${slug}.md` or a pre-suffixed name.
|
|
126
|
+
*/
|
|
127
|
+
export declare function workItemRel(folder: WorkFolderKey, basename: string): string;
|
|
128
|
+
/**
|
|
129
|
+
* The REPO-RELATIVE folder PREFIX (WITH trailing slash): `work/<folder-name>/`. The
|
|
130
|
+
* form a reader matches with `startsWith(...)` and tasks off to recover a filename
|
|
131
|
+
* (see {@link stripWorkFolderPrefix}). Replaces hand-written `'work/<folder>/'`
|
|
132
|
+
* literals and their `.length` prefix-tasks.
|
|
133
|
+
*/
|
|
134
|
+
export declare function workFolderPrefix(folder: WorkFolderKey): string;
|
|
135
|
+
/**
|
|
136
|
+
* Recover the filename portion of a repo-relative path that lives DIRECTLY under a
|
|
137
|
+
* work folder, by stripping its `work/<folder-name>/` prefix. Replaces the
|
|
138
|
+
* hand-written `path.slice('work/<folder>/'.length)` prefix-task. Returns
|
|
139
|
+
* `undefined` when `path` is not under that folder, so callers that already
|
|
140
|
+
* `startsWith`-guarded keep their exact behaviour (and callers that did not can
|
|
141
|
+
* branch on `undefined` instead of tasking a wrong length).
|
|
142
|
+
*/
|
|
143
|
+
export declare function stripWorkFolderPrefix(path: string, folder: WorkFolderKey): string | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* The ITEM-SCAN predicate: does this directory entry NAME count as a `work/` item?
|
|
146
|
+
* Defined ONCE here so no reader re-implements the `.md` filter. Case-insensitive
|
|
147
|
+
* on the extension, matching every existing `name.toLowerCase().endsWith('.md')`
|
|
148
|
+
* call site verbatim.
|
|
149
|
+
*/
|
|
150
|
+
export declare function isWorkItemFile(name: string): boolean;
|
|
151
|
+
/**
|
|
152
|
+
* The TASK-RESOLUTION folders `resolveTask` (prompt.ts) walks, in precedence
|
|
153
|
+
* order: `in-progress` over `tasks-ready`, with `done` appended only behind the
|
|
154
|
+
* stranded-continue gate. Order is load-bearing — kept exactly as the original
|
|
155
|
+
* union/array. (`tasks-backlog` is NOT in this DEFAULT order: it is appended at
|
|
156
|
+
* the LOWEST priority ONLY behind the explicit `--allow-backlog` flag, prd
|
|
157
|
+
* `do-allow-backlog-drive-staged-tasks-without-promotion` — see
|
|
158
|
+
* {@link TaskResolutionFolder}.)
|
|
159
|
+
*/
|
|
160
|
+
export declare const TASK_RESOLUTION_FOLDERS: readonly ["in-progress", "tasks-ready", "done"];
|
|
161
|
+
/**
|
|
162
|
+
* One of the folders a task can be RESOLVED from (prompt.ts `TaskFolder`): the
|
|
163
|
+
* default {@link TASK_RESOLUTION_FOLDERS} PLUS `tasks-backlog`, which is reachable
|
|
164
|
+
* ONLY behind the explicit `--allow-backlog` flag (never on a default resolution).
|
|
165
|
+
* Kept off the default-order array on purpose so no autonomous path resolves
|
|
166
|
+
* staging.
|
|
167
|
+
*/
|
|
168
|
+
export type TaskResolutionFolder = (typeof TASK_RESOLUTION_FOLDERS)[number] | 'tasks-backlog';
|
|
169
|
+
/**
|
|
170
|
+
* The task LIFECYCLE folders a `task:<slug>` / lone-task `issue:` can reside
|
|
171
|
+
* in (spec-complete.ts + close-job.ts `TASK_FOLDERS`): `tasks-ready`, `in-progress`,
|
|
172
|
+
* `needs-attention`, `done`.
|
|
173
|
+
*/
|
|
174
|
+
export declare const TASK_LIFECYCLE_FOLDERS: readonly ["tasks-ready", "in-progress", "needs-attention", "done"];
|
|
175
|
+
/** One of the task lifecycle folders (spec-complete.ts / close-job.ts). */
|
|
176
|
+
export type TaskLifecycleFolder = (typeof TASK_LIFECYCLE_FOLDERS)[number];
|
|
177
|
+
/**
|
|
178
|
+
* The DURABLE task-status folders the ledger lint / integration core treat as the
|
|
179
|
+
* one-slug-one-folder state machine: `tasks-ready`, `done`, `cancelled`
|
|
180
|
+
* (ledger-lint.ts + integration-core.ts `LEDGER_STATUS_FOLDERS`). The transient
|
|
181
|
+
* `in-progress`/`needs-attention`/`tasking` are NOT here (they are lock-ref state).
|
|
182
|
+
* `cancelled` is the task regime's won't-proceed terminal (the per-regime split
|
|
183
|
+
* of the previous shared `dropped/`); the spec regime's terminal `specs-dropped`
|
|
184
|
+
* is NOT here (this set is the TASK board's state machine, keyed by `tasks/`-slug,
|
|
185
|
+
* and a spec never co-resides with a task on the tasks board).
|
|
186
|
+
*/
|
|
187
|
+
export declare const LEDGER_STATUS_FOLDERS: readonly ["tasks-ready", "done", "cancelled"];
|
|
188
|
+
/** One of the durable ledger status folders (ledger-lint.ts / integration-core.ts). */
|
|
189
|
+
export type LedgerStatusFolder = (typeof LEDGER_STATUS_FOLDERS)[number];
|
|
190
|
+
/**
|
|
191
|
+
* The SPEC-lifecycle folders an `issue:`-bearing spec / a tasked spec can reside
|
|
192
|
+
* in: `specs-ready` (source / pool), `specs-tasked` (tasked, resting) —
|
|
193
|
+
* close-job.ts `SPEC_FOLDERS`.
|
|
194
|
+
*/
|
|
195
|
+
export declare const SPEC_FOLDERS: readonly ["specs-ready", "specs-tasked"];
|
|
196
|
+
/** One of the spec-lifecycle folders (close-job.ts / ledger-read.ts). */
|
|
197
|
+
export type SpecFolder = (typeof SPEC_FOLDERS)[number];
|
|
198
|
+
//# sourceMappingURL=work-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-layout.d.ts","sourceRoot":"","sources":["../src/work-layout.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAG,MAAe,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;CAgBnB,CAAC;AAEX,0EAA0E;AAC1E,MAAM,MA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