looply-cli 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +137 -3
- package/dist/.src-hash +1 -0
- package/dist/acceptance-observe.d.ts +108 -0
- package/dist/acceptance-observe.d.ts.map +1 -0
- package/dist/acceptance-observe.js +152 -0
- package/dist/acceptance-observe.js.map +1 -0
- package/dist/agent-cmd.d.ts +131 -0
- package/dist/agent-cmd.d.ts.map +1 -0
- package/dist/agent-cmd.js +154 -0
- package/dist/agent-cmd.js.map +1 -0
- package/dist/agent-contained.d.ts +114 -0
- package/dist/agent-contained.d.ts.map +1 -0
- package/dist/agent-contained.js +292 -0
- package/dist/agent-contained.js.map +1 -0
- package/dist/agent-driver.d.ts +130 -0
- package/dist/agent-driver.d.ts.map +1 -0
- package/dist/agent-driver.js +170 -0
- package/dist/agent-driver.js.map +1 -0
- package/dist/agent-envelope.d.ts +94 -0
- package/dist/agent-envelope.d.ts.map +1 -0
- package/dist/agent-envelope.js +214 -0
- package/dist/agent-envelope.js.map +1 -0
- package/dist/agent-exec.d.ts +182 -0
- package/dist/agent-exec.d.ts.map +1 -0
- package/dist/agent-exec.js +125 -0
- package/dist/agent-exec.js.map +1 -0
- package/dist/agent-runtime.d.ts +23 -0
- package/dist/agent-runtime.d.ts.map +1 -0
- package/dist/agent-runtime.js +143 -0
- package/dist/agent-runtime.js.map +1 -0
- package/dist/approval-gate-read.d.ts +66 -0
- package/dist/approval-gate-read.d.ts.map +1 -0
- package/dist/approval-gate-read.js +138 -0
- package/dist/approval-gate-read.js.map +1 -0
- package/dist/approval-resolution.d.ts +87 -0
- package/dist/approval-resolution.d.ts.map +1 -0
- package/dist/approval-resolution.js +100 -0
- package/dist/approval-resolution.js.map +1 -0
- package/dist/approval-resumes.d.ts +102 -0
- package/dist/approval-resumes.d.ts.map +1 -0
- package/dist/approval-resumes.js +167 -0
- package/dist/approval-resumes.js.map +1 -0
- package/dist/ask-brain.d.ts +167 -0
- package/dist/ask-brain.d.ts.map +1 -0
- package/dist/ask-brain.js +355 -0
- package/dist/ask-brain.js.map +1 -0
- package/dist/autonomy-authority.d.ts +80 -0
- package/dist/autonomy-authority.d.ts.map +1 -0
- package/dist/autonomy-authority.js +82 -0
- package/dist/autonomy-authority.js.map +1 -0
- package/dist/autonomy-controller.d.ts +321 -0
- package/dist/autonomy-controller.d.ts.map +1 -0
- package/dist/autonomy-controller.js +517 -0
- package/dist/autonomy-controller.js.map +1 -0
- package/dist/autonomy-store.d.ts +327 -0
- package/dist/autonomy-store.d.ts.map +1 -0
- package/dist/autonomy-store.js +581 -0
- package/dist/autonomy-store.js.map +1 -0
- package/dist/autonomy-tick.d.ts +257 -0
- package/dist/autonomy-tick.d.ts.map +1 -0
- package/dist/autonomy-tick.js +616 -0
- package/dist/autonomy-tick.js.map +1 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +2719 -0
- package/dist/bin.js.map +1 -0
- package/dist/brain-advice.d.ts +21 -0
- package/dist/brain-advice.d.ts.map +1 -0
- package/dist/brain-advice.js +51 -0
- package/dist/brain-advice.js.map +1 -0
- package/dist/candidate-replay-runtime.d.ts +125 -0
- package/dist/candidate-replay-runtime.d.ts.map +1 -0
- package/dist/candidate-replay-runtime.js +188 -0
- package/dist/candidate-replay-runtime.js.map +1 -0
- package/dist/checkout-carry.d.ts +76 -0
- package/dist/checkout-carry.d.ts.map +1 -0
- package/dist/checkout-carry.js +125 -0
- package/dist/checkout-carry.js.map +1 -0
- package/dist/citation-readers.d.ts +26 -0
- package/dist/citation-readers.d.ts.map +1 -0
- package/dist/citation-readers.js +102 -0
- package/dist/citation-readers.js.map +1 -0
- package/dist/command-receipts.d.ts +79 -0
- package/dist/command-receipts.d.ts.map +1 -0
- package/dist/command-receipts.js +143 -0
- package/dist/command-receipts.js.map +1 -0
- package/dist/command-runner.d.ts +32 -0
- package/dist/command-runner.d.ts.map +1 -0
- package/dist/command-runner.js +108 -0
- package/dist/command-runner.js.map +1 -0
- package/dist/compatible-sets.d.ts +67 -0
- package/dist/compatible-sets.d.ts.map +1 -0
- package/dist/compatible-sets.js +81 -0
- package/dist/compatible-sets.js.map +1 -0
- package/dist/compile-check.d.ts +31 -0
- package/dist/compile-check.d.ts.map +1 -0
- package/dist/compile-check.js +34 -0
- package/dist/compile-check.js.map +1 -0
- package/dist/compile-store.d.ts +16 -0
- package/dist/compile-store.d.ts.map +1 -0
- package/dist/compile-store.js +21 -0
- package/dist/compile-store.js.map +1 -0
- package/dist/completion.d.ts +106 -0
- package/dist/completion.d.ts.map +1 -0
- package/dist/completion.js +131 -0
- package/dist/completion.js.map +1 -0
- package/dist/config.d.ts +549 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +763 -0
- package/dist/config.js.map +1 -0
- package/dist/control-file.d.ts +142 -0
- package/dist/control-file.d.ts.map +1 -0
- package/dist/control-file.js +144 -0
- package/dist/control-file.js.map +1 -0
- package/dist/coordinator-state.d.ts +131 -0
- package/dist/coordinator-state.d.ts.map +1 -0
- package/dist/coordinator-state.js +380 -0
- package/dist/coordinator-state.js.map +1 -0
- package/dist/coordinator.d.ts +95 -0
- package/dist/coordinator.d.ts.map +1 -0
- package/dist/coordinator.js +97 -0
- package/dist/coordinator.js.map +1 -0
- package/dist/cursor-store.d.ts +53 -0
- package/dist/cursor-store.d.ts.map +1 -0
- package/dist/cursor-store.js +98 -0
- package/dist/cursor-store.js.map +1 -0
- package/dist/daemon-cmd.d.ts +239 -0
- package/dist/daemon-cmd.d.ts.map +1 -0
- package/dist/daemon-cmd.js +1751 -0
- package/dist/daemon-cmd.js.map +1 -0
- package/dist/daemon-lock.d.ts +140 -0
- package/dist/daemon-lock.d.ts.map +1 -0
- package/dist/daemon-lock.js +352 -0
- package/dist/daemon-lock.js.map +1 -0
- package/dist/daemon-recovery.d.ts +78 -0
- package/dist/daemon-recovery.d.ts.map +1 -0
- package/dist/daemon-recovery.js +161 -0
- package/dist/daemon-recovery.js.map +1 -0
- package/dist/daemon.d.ts +368 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +601 -0
- package/dist/daemon.js.map +1 -0
- package/dist/declared-response-shape.d.ts +93 -0
- package/dist/declared-response-shape.d.ts.map +1 -0
- package/dist/declared-response-shape.js +200 -0
- package/dist/declared-response-shape.js.map +1 -0
- package/dist/declared-surfaces.d.ts +16 -0
- package/dist/declared-surfaces.d.ts.map +1 -0
- package/dist/declared-surfaces.js +19 -0
- package/dist/declared-surfaces.js.map +1 -0
- package/dist/depends-review.d.ts +113 -0
- package/dist/depends-review.d.ts.map +1 -0
- package/dist/depends-review.js +110 -0
- package/dist/depends-review.js.map +1 -0
- package/dist/doctor.d.ts +91 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +71 -0
- package/dist/doctor.js.map +1 -0
- package/dist/edge-approval.d.ts +105 -0
- package/dist/edge-approval.d.ts.map +1 -0
- package/dist/edge-approval.js +100 -0
- package/dist/edge-approval.js.map +1 -0
- package/dist/evidence-cache.d.ts +45 -0
- package/dist/evidence-cache.d.ts.map +1 -0
- package/dist/evidence-cache.js +90 -0
- package/dist/evidence-cache.js.map +1 -0
- package/dist/evidence-cmd.d.ts +133 -0
- package/dist/evidence-cmd.d.ts.map +1 -0
- package/dist/evidence-cmd.js +347 -0
- package/dist/evidence-cmd.js.map +1 -0
- package/dist/evidence-facts.d.ts +40 -0
- package/dist/evidence-facts.d.ts.map +1 -0
- package/dist/evidence-facts.js +114 -0
- package/dist/evidence-facts.js.map +1 -0
- package/dist/exclusive-lock.d.ts +52 -0
- package/dist/exclusive-lock.d.ts.map +1 -0
- package/dist/exclusive-lock.js +150 -0
- package/dist/exclusive-lock.js.map +1 -0
- package/dist/exec-domains.d.ts +140 -0
- package/dist/exec-domains.d.ts.map +1 -0
- package/dist/exec-domains.js +287 -0
- package/dist/exec-domains.js.map +1 -0
- package/dist/exemption-store.d.ts +197 -0
- package/dist/exemption-store.d.ts.map +1 -0
- package/dist/exemption-store.js +266 -0
- package/dist/exemption-store.js.map +1 -0
- package/dist/explicit-start-gate.d.ts +96 -0
- package/dist/explicit-start-gate.d.ts.map +1 -0
- package/dist/explicit-start-gate.js +103 -0
- package/dist/explicit-start-gate.js.map +1 -0
- package/dist/fs-trouble.d.ts +70 -0
- package/dist/fs-trouble.d.ts.map +1 -0
- package/dist/fs-trouble.js +98 -0
- package/dist/fs-trouble.js.map +1 -0
- package/dist/gate.d.ts +278 -0
- package/dist/gate.d.ts.map +1 -0
- package/dist/gate.js +278 -0
- package/dist/gate.js.map +1 -0
- package/dist/git-driver.d.ts +519 -0
- package/dist/git-driver.d.ts.map +1 -0
- package/dist/git-driver.js +900 -0
- package/dist/git-driver.js.map +1 -0
- package/dist/git-push-executor.d.ts +41 -0
- package/dist/git-push-executor.d.ts.map +1 -0
- package/dist/git-push-executor.js +142 -0
- package/dist/git-push-executor.js.map +1 -0
- package/dist/glob.d.ts +26 -0
- package/dist/glob.d.ts.map +1 -0
- package/dist/glob.js +93 -0
- package/dist/glob.js.map +1 -0
- package/dist/goal-adaptive.d.ts +295 -0
- package/dist/goal-adaptive.d.ts.map +1 -0
- package/dist/goal-adaptive.js +393 -0
- package/dist/goal-adaptive.js.map +1 -0
- package/dist/goal-compile.d.ts +342 -0
- package/dist/goal-compile.d.ts.map +1 -0
- package/dist/goal-compile.js +444 -0
- package/dist/goal-compile.js.map +1 -0
- package/dist/goal-depends-executor.d.ts +55 -0
- package/dist/goal-depends-executor.d.ts.map +1 -0
- package/dist/goal-depends-executor.js +202 -0
- package/dist/goal-depends-executor.js.map +1 -0
- package/dist/goal-execution-evidence.d.ts +135 -0
- package/dist/goal-execution-evidence.d.ts.map +1 -0
- package/dist/goal-execution-evidence.js +159 -0
- package/dist/goal-execution-evidence.js.map +1 -0
- package/dist/goal-gap.d.ts +140 -0
- package/dist/goal-gap.d.ts.map +1 -0
- package/dist/goal-gap.js +197 -0
- package/dist/goal-gap.js.map +1 -0
- package/dist/goal-met-target.d.ts +98 -0
- package/dist/goal-met-target.d.ts.map +1 -0
- package/dist/goal-met-target.js +92 -0
- package/dist/goal-met-target.js.map +1 -0
- package/dist/goal-ownership.d.ts +416 -0
- package/dist/goal-ownership.d.ts.map +1 -0
- package/dist/goal-ownership.js +576 -0
- package/dist/goal-ownership.js.map +1 -0
- package/dist/goal-runs.d.ts +82 -0
- package/dist/goal-runs.d.ts.map +1 -0
- package/dist/goal-runs.js +120 -0
- package/dist/goal-runs.js.map +1 -0
- package/dist/goal-store.d.ts +146 -0
- package/dist/goal-store.d.ts.map +1 -0
- package/dist/goal-store.js +294 -0
- package/dist/goal-store.js.map +1 -0
- package/dist/goal-view.d.ts +156 -0
- package/dist/goal-view.d.ts.map +1 -0
- package/dist/goal-view.js +499 -0
- package/dist/goal-view.js.map +1 -0
- package/dist/governed-approvals.d.ts +152 -0
- package/dist/governed-approvals.d.ts.map +1 -0
- package/dist/governed-approvals.js +246 -0
- package/dist/governed-approvals.js.map +1 -0
- package/dist/governed-broker.d.ts +169 -0
- package/dist/governed-broker.d.ts.map +1 -0
- package/dist/governed-broker.js +196 -0
- package/dist/governed-broker.js.map +1 -0
- package/dist/governed-run.d.ts +220 -0
- package/dist/governed-run.d.ts.map +1 -0
- package/dist/governed-run.js +406 -0
- package/dist/governed-run.js.map +1 -0
- package/dist/grant-reconcile.d.ts +63 -0
- package/dist/grant-reconcile.d.ts.map +1 -0
- package/dist/grant-reconcile.js +121 -0
- package/dist/grant-reconcile.js.map +1 -0
- package/dist/index-for-head.d.ts +56 -0
- package/dist/index-for-head.d.ts.map +1 -0
- package/dist/index-for-head.js +103 -0
- package/dist/index-for-head.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/init-detect.d.ts +39 -0
- package/dist/init-detect.d.ts.map +1 -0
- package/dist/init-detect.js +188 -0
- package/dist/init-detect.js.map +1 -0
- package/dist/integration-deps.d.ts +62 -0
- package/dist/integration-deps.d.ts.map +1 -0
- package/dist/integration-deps.js +251 -0
- package/dist/integration-deps.js.map +1 -0
- package/dist/integration-runtime.d.ts +458 -0
- package/dist/integration-runtime.d.ts.map +1 -0
- package/dist/integration-runtime.js +681 -0
- package/dist/integration-runtime.js.map +1 -0
- package/dist/integration.d.ts +45 -0
- package/dist/integration.d.ts.map +1 -0
- package/dist/integration.js +87 -0
- package/dist/integration.js.map +1 -0
- package/dist/integrator.d.ts +84 -0
- package/dist/integrator.d.ts.map +1 -0
- package/dist/integrator.js +193 -0
- package/dist/integrator.js.map +1 -0
- package/dist/lane-claims.d.ts +174 -0
- package/dist/lane-claims.d.ts.map +1 -0
- package/dist/lane-claims.js +218 -0
- package/dist/lane-claims.js.map +1 -0
- package/dist/lane-coverage.d.ts +87 -0
- package/dist/lane-coverage.d.ts.map +1 -0
- package/dist/lane-coverage.js +129 -0
- package/dist/lane-coverage.js.map +1 -0
- package/dist/ledger-replay.d.ts +115 -0
- package/dist/ledger-replay.d.ts.map +1 -0
- package/dist/ledger-replay.js +155 -0
- package/dist/ledger-replay.js.map +1 -0
- package/dist/ledger-store.d.ts +68 -0
- package/dist/ledger-store.d.ts.map +1 -0
- package/dist/ledger-store.js +111 -0
- package/dist/ledger-store.js.map +1 -0
- package/dist/loop-safety-observer.d.ts +132 -0
- package/dist/loop-safety-observer.d.ts.map +1 -0
- package/dist/loop-safety-observer.js +76 -0
- package/dist/loop-safety-observer.js.map +1 -0
- package/dist/loop-safety-store.d.ts +339 -0
- package/dist/loop-safety-store.d.ts.map +1 -0
- package/dist/loop-safety-store.js +800 -0
- package/dist/loop-safety-store.js.map +1 -0
- package/dist/machine-store.d.ts +54 -0
- package/dist/machine-store.d.ts.map +1 -0
- package/dist/machine-store.js +149 -0
- package/dist/machine-store.js.map +1 -0
- package/dist/mcp-main.d.ts +2 -0
- package/dist/mcp-main.d.ts.map +1 -0
- package/dist/mcp-main.js +116 -0
- package/dist/mcp-main.js.map +1 -0
- package/dist/mcp-server.d.ts +72 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +259 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/model-routing.d.ts +75 -0
- package/dist/model-routing.d.ts.map +1 -0
- package/dist/model-routing.js +108 -0
- package/dist/model-routing.js.map +1 -0
- package/dist/model-transport.d.ts +188 -0
- package/dist/model-transport.d.ts.map +1 -0
- package/dist/model-transport.js +625 -0
- package/dist/model-transport.js.map +1 -0
- package/dist/notify-cadence.d.ts +55 -0
- package/dist/notify-cadence.d.ts.map +1 -0
- package/dist/notify-cadence.js +68 -0
- package/dist/notify-cadence.js.map +1 -0
- package/dist/notify-channel.d.ts +69 -0
- package/dist/notify-channel.d.ts.map +1 -0
- package/dist/notify-channel.js +151 -0
- package/dist/notify-channel.js.map +1 -0
- package/dist/notify.d.ts +71 -0
- package/dist/notify.d.ts.map +1 -0
- package/dist/notify.js +125 -0
- package/dist/notify.js.map +1 -0
- package/dist/observation-inventory.d.ts +65 -0
- package/dist/observation-inventory.d.ts.map +1 -0
- package/dist/observation-inventory.js +139 -0
- package/dist/observation-inventory.js.map +1 -0
- package/dist/owned-children.d.ts +45 -0
- package/dist/owned-children.d.ts.map +1 -0
- package/dist/owned-children.js +64 -0
- package/dist/owned-children.js.map +1 -0
- package/dist/packet-for-goal.d.ts +19 -0
- package/dist/packet-for-goal.d.ts.map +1 -0
- package/dist/packet-for-goal.js +32 -0
- package/dist/packet-for-goal.js.map +1 -0
- package/dist/pair-cmd.d.ts +85 -0
- package/dist/pair-cmd.d.ts.map +1 -0
- package/dist/pair-cmd.js +205 -0
- package/dist/pair-cmd.js.map +1 -0
- package/dist/partial-asker.d.ts +96 -0
- package/dist/partial-asker.d.ts.map +1 -0
- package/dist/partial-asker.js +117 -0
- package/dist/partial-asker.js.map +1 -0
- package/dist/pdf-text-lines.d.ts +17 -0
- package/dist/pdf-text-lines.d.ts.map +1 -0
- package/dist/pdf-text-lines.js +70 -0
- package/dist/pdf-text-lines.js.map +1 -0
- package/dist/pdf-text-worker.d.ts +2 -0
- package/dist/pdf-text-worker.d.ts.map +1 -0
- package/dist/pdf-text-worker.js +81 -0
- package/dist/pdf-text-worker.js.map +1 -0
- package/dist/pdf-text.d.ts +56 -0
- package/dist/pdf-text.d.ts.map +1 -0
- package/dist/pdf-text.js +64 -0
- package/dist/pdf-text.js.map +1 -0
- package/dist/pending-action.d.ts +154 -0
- package/dist/pending-action.d.ts.map +1 -0
- package/dist/pending-action.js +148 -0
- package/dist/pending-action.js.map +1 -0
- package/dist/preemptor.d.ts +40 -0
- package/dist/preemptor.d.ts.map +1 -0
- package/dist/preemptor.js +49 -0
- package/dist/preemptor.js.map +1 -0
- package/dist/programme-mode.d.ts +29 -0
- package/dist/programme-mode.d.ts.map +1 -0
- package/dist/programme-mode.js +50 -0
- package/dist/programme-mode.js.map +1 -0
- package/dist/progress-view.d.ts +14 -0
- package/dist/progress-view.d.ts.map +1 -0
- package/dist/progress-view.js +114 -0
- package/dist/progress-view.js.map +1 -0
- package/dist/project-graph-builder.d.ts +81 -0
- package/dist/project-graph-builder.d.ts.map +1 -0
- package/dist/project-graph-builder.js +246 -0
- package/dist/project-graph-builder.js.map +1 -0
- package/dist/project-graph-runtime.d.ts +86 -0
- package/dist/project-graph-runtime.d.ts.map +1 -0
- package/dist/project-graph-runtime.js +112 -0
- package/dist/project-graph-runtime.js.map +1 -0
- package/dist/project-index-builder.d.ts +96 -0
- package/dist/project-index-builder.d.ts.map +1 -0
- package/dist/project-index-builder.js +298 -0
- package/dist/project-index-builder.js.map +1 -0
- package/dist/project-index-facts.d.ts +51 -0
- package/dist/project-index-facts.d.ts.map +1 -0
- package/dist/project-index-facts.js +117 -0
- package/dist/project-index-facts.js.map +1 -0
- package/dist/project-index-store.d.ts +97 -0
- package/dist/project-index-store.d.ts.map +1 -0
- package/dist/project-index-store.js +140 -0
- package/dist/project-index-store.js.map +1 -0
- package/dist/project-memory-store.d.ts +127 -0
- package/dist/project-memory-store.d.ts.map +1 -0
- package/dist/project-memory-store.js +302 -0
- package/dist/project-memory-store.js.map +1 -0
- package/dist/proposal-store.d.ts +14 -0
- package/dist/proposal-store.d.ts.map +1 -0
- package/dist/proposal-store.js +19 -0
- package/dist/proposal-store.js.map +1 -0
- package/dist/prover.d.ts +80 -0
- package/dist/prover.d.ts.map +1 -0
- package/dist/prover.js +137 -0
- package/dist/prover.js.map +1 -0
- package/dist/provider-identity-store.d.ts +34 -0
- package/dist/provider-identity-store.d.ts.map +1 -0
- package/dist/provider-identity-store.js +72 -0
- package/dist/provider-identity-store.js.map +1 -0
- package/dist/provider-identity.d.ts +104 -0
- package/dist/provider-identity.d.ts.map +1 -0
- package/dist/provider-identity.js +167 -0
- package/dist/provider-identity.js.map +1 -0
- package/dist/provider-limit.d.ts +79 -0
- package/dist/provider-limit.d.ts.map +1 -0
- package/dist/provider-limit.js +148 -0
- package/dist/provider-limit.js.map +1 -0
- package/dist/provider-preflight.d.ts +171 -0
- package/dist/provider-preflight.d.ts.map +1 -0
- package/dist/provider-preflight.js +395 -0
- package/dist/provider-preflight.js.map +1 -0
- package/dist/provider-state.d.ts +120 -0
- package/dist/provider-state.d.ts.map +1 -0
- package/dist/provider-state.js +182 -0
- package/dist/provider-state.js.map +1 -0
- package/dist/providers.d.ts +132 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +161 -0
- package/dist/providers.js.map +1 -0
- package/dist/publication-recorder.d.ts +117 -0
- package/dist/publication-recorder.d.ts.map +1 -0
- package/dist/publication-recorder.js +124 -0
- package/dist/publication-recorder.js.map +1 -0
- package/dist/pursuit-delivery.d.ts +24 -0
- package/dist/pursuit-delivery.d.ts.map +1 -0
- package/dist/pursuit-delivery.js +38 -0
- package/dist/pursuit-delivery.js.map +1 -0
- package/dist/queue-store.d.ts +132 -0
- package/dist/queue-store.d.ts.map +1 -0
- package/dist/queue-store.js +185 -0
- package/dist/queue-store.js.map +1 -0
- package/dist/queue-summary.d.ts +14 -0
- package/dist/queue-summary.d.ts.map +1 -0
- package/dist/queue-summary.js +82 -0
- package/dist/queue-summary.js.map +1 -0
- package/dist/queue-view.d.ts +20 -0
- package/dist/queue-view.d.ts.map +1 -0
- package/dist/queue-view.js +163 -0
- package/dist/queue-view.js.map +1 -0
- package/dist/queue-write-lease.d.ts +106 -0
- package/dist/queue-write-lease.d.ts.map +1 -0
- package/dist/queue-write-lease.js +282 -0
- package/dist/queue-write-lease.js.map +1 -0
- package/dist/rails-home.d.ts +162 -0
- package/dist/rails-home.d.ts.map +1 -0
- package/dist/rails-home.js +452 -0
- package/dist/rails-home.js.map +1 -0
- package/dist/rails-migrations.d.ts +75 -0
- package/dist/rails-migrations.d.ts.map +1 -0
- package/dist/rails-migrations.js +199 -0
- package/dist/rails-migrations.js.map +1 -0
- package/dist/rails-stores.d.ts +49 -0
- package/dist/rails-stores.d.ts.map +1 -0
- package/dist/rails-stores.js +100 -0
- package/dist/rails-stores.js.map +1 -0
- package/dist/reaper.d.ts +69 -0
- package/dist/reaper.d.ts.map +1 -0
- package/dist/reaper.js +152 -0
- package/dist/reaper.js.map +1 -0
- package/dist/record-store.d.ts +36 -0
- package/dist/record-store.d.ts.map +1 -0
- package/dist/record-store.js +78 -0
- package/dist/record-store.js.map +1 -0
- package/dist/recovery-io.d.ts +50 -0
- package/dist/recovery-io.d.ts.map +1 -0
- package/dist/recovery-io.js +122 -0
- package/dist/recovery-io.js.map +1 -0
- package/dist/recovery.d.ts +146 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +110 -0
- package/dist/recovery.js.map +1 -0
- package/dist/redraw.d.ts +34 -0
- package/dist/redraw.d.ts.map +1 -0
- package/dist/redraw.js +62 -0
- package/dist/redraw.js.map +1 -0
- package/dist/rejected-evidence.d.ts +255 -0
- package/dist/rejected-evidence.d.ts.map +1 -0
- package/dist/rejected-evidence.js +324 -0
- package/dist/rejected-evidence.js.map +1 -0
- package/dist/report-cmd.d.ts +32 -0
- package/dist/report-cmd.d.ts.map +1 -0
- package/dist/report-cmd.js +201 -0
- package/dist/report-cmd.js.map +1 -0
- package/dist/repos-cmd.d.ts +80 -0
- package/dist/repos-cmd.d.ts.map +1 -0
- package/dist/repos-cmd.js +240 -0
- package/dist/repos-cmd.js.map +1 -0
- package/dist/request-body-shape.d.ts +93 -0
- package/dist/request-body-shape.d.ts.map +1 -0
- package/dist/request-body-shape.js +407 -0
- package/dist/request-body-shape.js.map +1 -0
- package/dist/requirement-claims.d.ts +89 -0
- package/dist/requirement-claims.d.ts.map +1 -0
- package/dist/requirement-claims.js +92 -0
- package/dist/requirement-claims.js.map +1 -0
- package/dist/retention-apply-runtime.d.ts +105 -0
- package/dist/retention-apply-runtime.d.ts.map +1 -0
- package/dist/retention-apply-runtime.js +269 -0
- package/dist/retention-apply-runtime.js.map +1 -0
- package/dist/reverify.d.ts +41 -0
- package/dist/reverify.d.ts.map +1 -0
- package/dist/reverify.js +69 -0
- package/dist/reverify.js.map +1 -0
- package/dist/round-records.d.ts +65 -0
- package/dist/round-records.d.ts.map +1 -0
- package/dist/round-records.js +61 -0
- package/dist/round-records.js.map +1 -0
- package/dist/round-runner.d.ts +924 -0
- package/dist/round-runner.d.ts.map +1 -0
- package/dist/round-runner.js +1693 -0
- package/dist/round-runner.js.map +1 -0
- package/dist/run-approval.d.ts +180 -0
- package/dist/run-approval.d.ts.map +1 -0
- package/dist/run-approval.js +199 -0
- package/dist/run-approval.js.map +1 -0
- package/dist/run-cmd.d.ts +359 -0
- package/dist/run-cmd.d.ts.map +1 -0
- package/dist/run-cmd.js +4418 -0
- package/dist/run-cmd.js.map +1 -0
- package/dist/run-delivery.d.ts +71 -0
- package/dist/run-delivery.d.ts.map +1 -0
- package/dist/run-delivery.js +104 -0
- package/dist/run-delivery.js.map +1 -0
- package/dist/run-ended.d.ts +75 -0
- package/dist/run-ended.d.ts.map +1 -0
- package/dist/run-ended.js +27 -0
- package/dist/run-ended.js.map +1 -0
- package/dist/run-ending-locator.d.ts +125 -0
- package/dist/run-ending-locator.d.ts.map +1 -0
- package/dist/run-ending-locator.js +133 -0
- package/dist/run-ending-locator.js.map +1 -0
- package/dist/run-launcher.d.ts +459 -0
- package/dist/run-launcher.d.ts.map +1 -0
- package/dist/run-launcher.js +652 -0
- package/dist/run-launcher.js.map +1 -0
- package/dist/run-lease.d.ts +208 -0
- package/dist/run-lease.d.ts.map +1 -0
- package/dist/run-lease.js +301 -0
- package/dist/run-lease.js.map +1 -0
- package/dist/run-refusal-marks.d.ts +189 -0
- package/dist/run-refusal-marks.d.ts.map +1 -0
- package/dist/run-refusal-marks.js +249 -0
- package/dist/run-refusal-marks.js.map +1 -0
- package/dist/run-start-marks.d.ts +153 -0
- package/dist/run-start-marks.d.ts.map +1 -0
- package/dist/run-start-marks.js +269 -0
- package/dist/run-start-marks.js.map +1 -0
- package/dist/scan-cmd.d.ts +14 -0
- package/dist/scan-cmd.d.ts.map +1 -0
- package/dist/scan-cmd.js +270 -0
- package/dist/scan-cmd.js.map +1 -0
- package/dist/scan-events.d.ts +50 -0
- package/dist/scan-events.d.ts.map +1 -0
- package/dist/scan-events.js +91 -0
- package/dist/scan-events.js.map +1 -0
- package/dist/scan.d.ts +191 -0
- package/dist/scan.d.ts.map +1 -0
- package/dist/scan.js +417 -0
- package/dist/scan.js.map +1 -0
- package/dist/scope-rule.d.ts +148 -0
- package/dist/scope-rule.d.ts.map +1 -0
- package/dist/scope-rule.js +121 -0
- package/dist/scope-rule.js.map +1 -0
- package/dist/self-repo-id.d.ts +18 -0
- package/dist/self-repo-id.d.ts.map +1 -0
- package/dist/self-repo-id.js +70 -0
- package/dist/self-repo-id.js.map +1 -0
- package/dist/server-client.d.ts +766 -0
- package/dist/server-client.d.ts.map +1 -0
- package/dist/server-client.js +475 -0
- package/dist/server-client.js.map +1 -0
- package/dist/session-adapter-runtime.d.ts +195 -0
- package/dist/session-adapter-runtime.d.ts.map +1 -0
- package/dist/session-adapter-runtime.js +373 -0
- package/dist/session-adapter-runtime.js.map +1 -0
- package/dist/session-checkpoint-runtime.d.ts +62 -0
- package/dist/session-checkpoint-runtime.d.ts.map +1 -0
- package/dist/session-checkpoint-runtime.js +268 -0
- package/dist/session-checkpoint-runtime.js.map +1 -0
- package/dist/session-control-transport.d.ts +106 -0
- package/dist/session-control-transport.d.ts.map +1 -0
- package/dist/session-control-transport.js +232 -0
- package/dist/session-control-transport.js.map +1 -0
- package/dist/session-observation-store.d.ts +98 -0
- package/dist/session-observation-store.d.ts.map +1 -0
- package/dist/session-observation-store.js +155 -0
- package/dist/session-observation-store.js.map +1 -0
- package/dist/session-observe-runtime.d.ts +123 -0
- package/dist/session-observe-runtime.d.ts.map +1 -0
- package/dist/session-observe-runtime.js +317 -0
- package/dist/session-observe-runtime.js.map +1 -0
- package/dist/session-store.d.ts +98 -0
- package/dist/session-store.d.ts.map +1 -0
- package/dist/session-store.js +116 -0
- package/dist/session-store.js.map +1 -0
- package/dist/sessions-cmd.d.ts +202 -0
- package/dist/sessions-cmd.d.ts.map +1 -0
- package/dist/sessions-cmd.js +609 -0
- package/dist/sessions-cmd.js.map +1 -0
- package/dist/settings-overlay.d.ts +53 -0
- package/dist/settings-overlay.d.ts.map +1 -0
- package/dist/settings-overlay.js +175 -0
- package/dist/settings-overlay.js.map +1 -0
- package/dist/setup-prompt.d.ts +34 -0
- package/dist/setup-prompt.d.ts.map +1 -0
- package/dist/setup-prompt.js +92 -0
- package/dist/setup-prompt.js.map +1 -0
- package/dist/setup.d.ts +103 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +283 -0
- package/dist/setup.js.map +1 -0
- package/dist/shared-grants.d.ts +164 -0
- package/dist/shared-grants.d.ts.map +1 -0
- package/dist/shared-grants.js +242 -0
- package/dist/shared-grants.js.map +1 -0
- package/dist/signals.d.ts +55 -0
- package/dist/signals.d.ts.map +1 -0
- package/dist/signals.js +85 -0
- package/dist/signals.js.map +1 -0
- package/dist/source-cmd.d.ts +201 -0
- package/dist/source-cmd.d.ts.map +1 -0
- package/dist/source-cmd.js +684 -0
- package/dist/source-cmd.js.map +1 -0
- package/dist/source-verdict.d.ts +99 -0
- package/dist/source-verdict.d.ts.map +1 -0
- package/dist/source-verdict.js +182 -0
- package/dist/source-verdict.js.map +1 -0
- package/dist/spend-ledger.d.ts +350 -0
- package/dist/spend-ledger.d.ts.map +1 -0
- package/dist/spend-ledger.js +546 -0
- package/dist/spend-ledger.js.map +1 -0
- package/dist/stale-run-sweep.d.ts +79 -0
- package/dist/stale-run-sweep.d.ts.map +1 -0
- package/dist/stale-run-sweep.js +116 -0
- package/dist/stale-run-sweep.js.map +1 -0
- package/dist/start-attempts.d.ts +385 -0
- package/dist/start-attempts.d.ts.map +1 -0
- package/dist/start-attempts.js +613 -0
- package/dist/start-attempts.js.map +1 -0
- package/dist/status-cmd.d.ts +28 -0
- package/dist/status-cmd.d.ts.map +1 -0
- package/dist/status-cmd.js +116 -0
- package/dist/status-cmd.js.map +1 -0
- package/dist/stop-follow-up.d.ts +107 -0
- package/dist/stop-follow-up.d.ts.map +1 -0
- package/dist/stop-follow-up.js +172 -0
- package/dist/stop-follow-up.js.map +1 -0
- package/dist/surface-lease.d.ts +118 -0
- package/dist/surface-lease.d.ts.map +1 -0
- package/dist/surface-lease.js +485 -0
- package/dist/surface-lease.js.map +1 -0
- package/dist/sync.d.ts +54 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +93 -0
- package/dist/sync.js.map +1 -0
- package/dist/syncing-ledger.d.ts +45 -0
- package/dist/syncing-ledger.d.ts.map +1 -0
- package/dist/syncing-ledger.js +53 -0
- package/dist/syncing-ledger.js.map +1 -0
- package/dist/temp-fixtures.d.ts +68 -0
- package/dist/temp-fixtures.d.ts.map +1 -0
- package/dist/temp-fixtures.js +38 -0
- package/dist/temp-fixtures.js.map +1 -0
- package/dist/token-window.d.ts +84 -0
- package/dist/token-window.d.ts.map +1 -0
- package/dist/token-window.js +143 -0
- package/dist/token-window.js.map +1 -0
- package/dist/tool-bridge.d.ts +177 -0
- package/dist/tool-bridge.d.ts.map +1 -0
- package/dist/tool-bridge.js +329 -0
- package/dist/tool-bridge.js.map +1 -0
- package/dist/tool-call-record.d.ts +197 -0
- package/dist/tool-call-record.d.ts.map +1 -0
- package/dist/tool-call-record.js +276 -0
- package/dist/tool-call-record.js.map +1 -0
- package/dist/tool-protocol.d.ts +135 -0
- package/dist/tool-protocol.d.ts.map +1 -0
- package/dist/tool-protocol.js +104 -0
- package/dist/tool-protocol.js.map +1 -0
- package/dist/tool-worker.d.ts +3 -0
- package/dist/tool-worker.d.ts.map +1 -0
- package/dist/tool-worker.js +478 -0
- package/dist/tool-worker.js.map +1 -0
- package/dist/toolchain-mirror.d.ts +86 -0
- package/dist/toolchain-mirror.d.ts.map +1 -0
- package/dist/toolchain-mirror.js +307 -0
- package/dist/toolchain-mirror.js.map +1 -0
- package/dist/trusted-git.d.ts +243 -0
- package/dist/trusted-git.d.ts.map +1 -0
- package/dist/trusted-git.js +920 -0
- package/dist/trusted-git.js.map +1 -0
- package/dist/ui.d.ts +76 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +118 -0
- package/dist/ui.js.map +1 -0
- package/dist/untrusted-exec.d.ts +275 -0
- package/dist/untrusted-exec.d.ts.map +1 -0
- package/dist/untrusted-exec.js +479 -0
- package/dist/untrusted-exec.js.map +1 -0
- package/dist/untrusted-gate.d.ts +73 -0
- package/dist/untrusted-gate.d.ts.map +1 -0
- package/dist/untrusted-gate.js +226 -0
- package/dist/untrusted-gate.js.map +1 -0
- package/dist/uploader.d.ts +153 -0
- package/dist/uploader.d.ts.map +1 -0
- package/dist/uploader.js +204 -0
- package/dist/uploader.js.map +1 -0
- package/dist/verifier.d.ts +66 -0
- package/dist/verifier.d.ts.map +1 -0
- package/dist/verifier.js +170 -0
- package/dist/verifier.js.map +1 -0
- package/dist/verify-apply.d.ts +26 -0
- package/dist/verify-apply.d.ts.map +1 -0
- package/dist/verify-apply.js +36 -0
- package/dist/verify-apply.js.map +1 -0
- package/dist/verify-cmd.d.ts +44 -0
- package/dist/verify-cmd.d.ts.map +1 -0
- package/dist/verify-cmd.js +125 -0
- package/dist/verify-cmd.js.map +1 -0
- package/dist/verify-pass.d.ts +73 -0
- package/dist/verify-pass.d.ts.map +1 -0
- package/dist/verify-pass.js +103 -0
- package/dist/verify-pass.js.map +1 -0
- package/dist/welcome.d.ts +43 -0
- package/dist/welcome.d.ts.map +1 -0
- package/dist/welcome.js +116 -0
- package/dist/welcome.js.map +1 -0
- package/dist/workspace-provisioner.d.ts +65 -0
- package/dist/workspace-provisioner.d.ts.map +1 -0
- package/dist/workspace-provisioner.js +66 -0
- package/dist/workspace-provisioner.js.map +1 -0
- package/dist/workspace-quarantine.d.ts +64 -0
- package/dist/workspace-quarantine.d.ts.map +1 -0
- package/dist/workspace-quarantine.js +156 -0
- package/dist/workspace-quarantine.js.map +1 -0
- package/dist/workspace-residue-sweep.d.ts +113 -0
- package/dist/workspace-residue-sweep.d.ts.map +1 -0
- package/dist/workspace-residue-sweep.js +158 -0
- package/dist/workspace-residue-sweep.js.map +1 -0
- package/dist/workspace.d.ts +639 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +2026 -0
- package/dist/workspace.js.map +1 -0
- package/package.json +54 -6
- package/win/CredProbe.cs +64 -0
- package/win/FakeClaude.cs +56 -0
- package/win/HandleProbe.cs +116 -0
- package/win/TokenProbe.cs +53 -0
- package/win/appcontainer.ps1 +500 -0
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.scopedQueue = scopedQueue;
|
|
4
|
+
exports.resolveGoalBinding = resolveGoalBinding;
|
|
5
|
+
exports.splitGoalWork = splitGoalWork;
|
|
6
|
+
exports.currentCompilerPlanExists = currentCompilerPlanExists;
|
|
7
|
+
exports.currentPlanRevision = currentPlanRevision;
|
|
8
|
+
exports.decideCompile = decideCompile;
|
|
9
|
+
exports.contradictingItems = contradictingItems;
|
|
10
|
+
exports.stillTheAuthority = stillTheAuthority;
|
|
11
|
+
exports.materialiseGoalPlan = materialiseGoalPlan;
|
|
12
|
+
exports.adoptGoalItems = adoptGoalItems;
|
|
13
|
+
exports.releaseGoalItems = releaseGoalItems;
|
|
14
|
+
exports.nodeGoalReleaser = nodeGoalReleaser;
|
|
15
|
+
const core_1 = require("@looply/core");
|
|
16
|
+
const goal_compile_1 = require("./goal-compile");
|
|
17
|
+
const queue_store_1 = require("./queue-store");
|
|
18
|
+
/**
|
|
19
|
+
* The same queue, showing only what this run owns.
|
|
20
|
+
*
|
|
21
|
+
* `list()` is filtered and NOTHING else is. That asymmetry is the whole design:
|
|
22
|
+
* `list()` is how work is chosen, so scoping it is what stops two runs picking
|
|
23
|
+
* the same item — but `get()` and `update()` are how work already in hand is
|
|
24
|
+
* read back and written, and scoping those would make a run unable to finish an
|
|
25
|
+
* item whose ownership changed underneath it. A run that cannot write down what
|
|
26
|
+
* it just did is worse than one that sees an item it will not pick.
|
|
27
|
+
*
|
|
28
|
+
* The filter is symmetric: a goal run sees only its own items, and an unbound
|
|
29
|
+
* run sees only unowned ones. The second half matters as much as the first —
|
|
30
|
+
* without it, a hand-typed `looply run` would quietly pick up work a goal is in
|
|
31
|
+
* the middle of.
|
|
32
|
+
*/
|
|
33
|
+
function scopedQueue(queue, scope) {
|
|
34
|
+
if (scope === null) {
|
|
35
|
+
// Still wrapped, not returned as-is: an unbound run must be hidden from
|
|
36
|
+
// goal-owned work too, and returning the raw store here is exactly the
|
|
37
|
+
// asymmetry that would leave one direction unguarded.
|
|
38
|
+
return {
|
|
39
|
+
list: () => queue.list().filter((i) => (0, core_1.isEligibleFor)(i, null)),
|
|
40
|
+
get: (id) => queue.get(id),
|
|
41
|
+
update: (id, v, patch) => queue.update(id, v, patch),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
list: () => queue.list().filter((i) => (0, core_1.isEligibleFor)(i, scope)),
|
|
46
|
+
get: (id) => queue.get(id),
|
|
47
|
+
update: (id, v, patch) => queue.update(id, v, patch),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Resolve the goal a Start named, refreshing the local mirror only if it must.
|
|
52
|
+
*
|
|
53
|
+
* The happy path is deliberately OFFLINE. The daemon pulls goals on its own
|
|
54
|
+
* cadence, so by the time it spawns a run the mirror almost always already
|
|
55
|
+
* holds the version the phone was looking at — and a run that phoned home
|
|
56
|
+
* before it could begin would make the server a dependency of doing any work at
|
|
57
|
+
* all, which is the opposite of what this product is.
|
|
58
|
+
*
|
|
59
|
+
* The version is what makes that safe. It is not a freshness heuristic: the
|
|
60
|
+
* server stamped it at the moment the command was created, so an exact match
|
|
61
|
+
* proves the mirror holds the very goal the person tapped Start on, whatever
|
|
62
|
+
* has happened since.
|
|
63
|
+
*/
|
|
64
|
+
async function resolveGoalBinding(deps) {
|
|
65
|
+
const { goalId, goalVersion, mirror, projectId } = deps;
|
|
66
|
+
if (goalId === undefined || goalVersion === undefined)
|
|
67
|
+
return { kind: 'unbound' };
|
|
68
|
+
const first = mirror.get(goalId);
|
|
69
|
+
if (first !== null) {
|
|
70
|
+
if (first.version === goalVersion)
|
|
71
|
+
return check(first, projectId);
|
|
72
|
+
if (first.version > goalVersion) {
|
|
73
|
+
// This machine is AHEAD of the Start. Goal versions only ever go up, so a
|
|
74
|
+
// command naming 7 against a mirror holding 8 is describing a past that
|
|
75
|
+
// cannot come back — and no server is needed to know it. Refused
|
|
76
|
+
// terminally rather than retried: the old answer was an hour of pointless
|
|
77
|
+
// three-second retries for a command that could never become current.
|
|
78
|
+
return {
|
|
79
|
+
kind: 'refused',
|
|
80
|
+
reason: `goal ${goalId} has moved on since that Start was made (version ${first.version}, not ${goalVersion}) — start it again`,
|
|
81
|
+
lapse: 'superseded',
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// Not mirrored here, or mirrored BEHIND what the phone saw. Both are answered
|
|
86
|
+
// the same way: ask, once. Being behind is the machine's problem, not the
|
|
87
|
+
// command's, so it stays retryable.
|
|
88
|
+
if (!deps.refresh) {
|
|
89
|
+
return {
|
|
90
|
+
kind: 'retry',
|
|
91
|
+
reason: first === null
|
|
92
|
+
? `goal ${goalId} is not known here yet, and this machine is not paired to ask`
|
|
93
|
+
: `goal ${goalId} is at version ${first.version} here but the phone saw ${goalVersion}, and this machine is not paired to ask`,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
if ((await deps.refresh()) === 'unreachable') {
|
|
97
|
+
// Retryable, NOT refused. The next attempt may well reach the server, and
|
|
98
|
+
// turning a network blip into a dead command would lose the person's tap.
|
|
99
|
+
return { kind: 'retry', reason: `could not reach the server to check goal ${goalId}` };
|
|
100
|
+
}
|
|
101
|
+
const second = mirror.get(goalId);
|
|
102
|
+
if (second === null) {
|
|
103
|
+
// The server was asked and does not have it. Nothing about waiting will
|
|
104
|
+
// change that.
|
|
105
|
+
return { kind: 'refused', reason: `there is no goal ${goalId} in this project`, lapse: 'gone' };
|
|
106
|
+
}
|
|
107
|
+
if (second.version !== goalVersion) {
|
|
108
|
+
// The goal moved on between the tap and now. Acting on it would carry out
|
|
109
|
+
// an instruction against wording nobody approved, so the phone has to ask
|
|
110
|
+
// again with what it can now see.
|
|
111
|
+
return {
|
|
112
|
+
kind: 'refused',
|
|
113
|
+
reason: `goal ${goalId} has changed since that Start was made (version ${second.version}, not ${goalVersion}) — start it again`,
|
|
114
|
+
lapse: 'superseded',
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
return check(second, projectId);
|
|
118
|
+
}
|
|
119
|
+
function check(goal, projectId) {
|
|
120
|
+
if (goal.projectId !== projectId) {
|
|
121
|
+
// A mirror holding another project's goal is a paired-machine mix-up, not a
|
|
122
|
+
// transient one. Running it here would work this tree against a goal
|
|
123
|
+
// written about a different repository.
|
|
124
|
+
return { kind: 'refused', reason: `goal ${goal.id} belongs to another project`, lapse: 'gone' };
|
|
125
|
+
}
|
|
126
|
+
if (goal.state !== 'active') {
|
|
127
|
+
// Version match and state are independent: a goal can be abandoned without
|
|
128
|
+
// its wording changing, so the stamp alone does not prove it may run.
|
|
129
|
+
return {
|
|
130
|
+
kind: 'refused',
|
|
131
|
+
reason: `goal ${goal.id} is ${goal.state} — only an active goal can be worked on`,
|
|
132
|
+
lapse: goal.state === 'abandoned' ? 'abandoned' : 'gone',
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
return { kind: 'bound', goal };
|
|
136
|
+
}
|
|
137
|
+
function splitGoalWork(items, scope) {
|
|
138
|
+
const split = {
|
|
139
|
+
currentPlan: [],
|
|
140
|
+
manual: [],
|
|
141
|
+
olderPlans: [],
|
|
142
|
+
unknownPlans: [],
|
|
143
|
+
forged: [],
|
|
144
|
+
newerPlans: [],
|
|
145
|
+
};
|
|
146
|
+
for (const item of items) {
|
|
147
|
+
switch ((0, core_1.classifyForScope)(item, scope)) {
|
|
148
|
+
case 'current-plan':
|
|
149
|
+
split.currentPlan.push(item);
|
|
150
|
+
break;
|
|
151
|
+
case 'manual':
|
|
152
|
+
split.manual.push(item);
|
|
153
|
+
break;
|
|
154
|
+
case 'older-plan':
|
|
155
|
+
split.olderPlans.push(item);
|
|
156
|
+
break;
|
|
157
|
+
case 'unknown-plan':
|
|
158
|
+
split.unknownPlans.push(item);
|
|
159
|
+
break;
|
|
160
|
+
case 'forged-provenance':
|
|
161
|
+
split.forged.push(item);
|
|
162
|
+
break;
|
|
163
|
+
case 'newer-plan':
|
|
164
|
+
split.newerPlans.push(item);
|
|
165
|
+
break;
|
|
166
|
+
/**
|
|
167
|
+
* REVISIONS BUCKET WITH THEIR VERSIONS, because they are the same facts
|
|
168
|
+
* one level down.
|
|
169
|
+
*
|
|
170
|
+
* These two cases used to fall through into nothing, which was harmless
|
|
171
|
+
* only while a run selected with a revision-BLIND scope — no item could
|
|
172
|
+
* ever classify as either. Making selection revision-aware turns that
|
|
173
|
+
* silence into a hole: an older revision would vanish from `olderPlans`
|
|
174
|
+
* and a newer one from `newerPlans`, so `decideCompile` would stop seeing
|
|
175
|
+
* the contradiction it exists to catch.
|
|
176
|
+
*/
|
|
177
|
+
case 'older-revision':
|
|
178
|
+
split.olderPlans.push(item);
|
|
179
|
+
break;
|
|
180
|
+
case 'newer-revision':
|
|
181
|
+
split.newerPlans.push(item);
|
|
182
|
+
break;
|
|
183
|
+
case 'unowned':
|
|
184
|
+
case 'not-ours':
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return split;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Has the compiler already produced a plan for THIS version of this goal?
|
|
192
|
+
*
|
|
193
|
+
* Counts `current-plan` and nothing else. Not manual work, which a person
|
|
194
|
+
* provided rather than the compiler planning it; not an earlier plan, whose
|
|
195
|
+
* counting was the original defect; and not a provenance-unknown legacy item,
|
|
196
|
+
* because "some compiler once made this" is not evidence that THIS version has
|
|
197
|
+
* a plan — treating it as such would leave an amended goal unable to compile
|
|
198
|
+
* for ever, which is the same defect wearing a different hat.
|
|
199
|
+
*
|
|
200
|
+
* Existence, not usability: a finished current plan still exists, and that is
|
|
201
|
+
* what stops a second one being compiled for the same version.
|
|
202
|
+
*/
|
|
203
|
+
function currentCompilerPlanExists(items, scope) {
|
|
204
|
+
return splitGoalWork(items, scope).currentPlan.length > 0;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* How many plans this goal version has had, read back off the queue.
|
|
208
|
+
*
|
|
209
|
+
* THE ONLY HOME THAT FAILS CLOSED, and the reason is that it is not a separate
|
|
210
|
+
* fact at all — it is a property of the rows themselves. queue.json has writers
|
|
211
|
+
* that do not hold the lease, so a stale one can rename its own snapshot over
|
|
212
|
+
* the file; but when it does, the revision number and the plan it counts go in
|
|
213
|
+
* the SAME rename. The next Start then sees the earlier revision and
|
|
214
|
+
* re-materialises that one, which is a retry. It can never see a later revision
|
|
215
|
+
* than the work that survives, so a clobber cannot skip a budget forward.
|
|
216
|
+
*
|
|
217
|
+
* Counted over the goal's own compiled rows at this VERSION, whatever revision
|
|
218
|
+
* they belong to — deliberately NOT through `scopedQueue`, which hides earlier
|
|
219
|
+
* revisions and would therefore forget they ever happened. `releaseOnAbandon`
|
|
220
|
+
* keeps `closed` rows owned, so the marker each revision leaves behind survives
|
|
221
|
+
* an abandonment that frees everything still workable.
|
|
222
|
+
*
|
|
223
|
+
* Zero means this version has had no plan yet. An absent revision reads as 1,
|
|
224
|
+
* which is what every plan compiled before revisions existed is.
|
|
225
|
+
*/
|
|
226
|
+
function currentPlanRevision(items, goalId, goalVersion) {
|
|
227
|
+
let highest = 0;
|
|
228
|
+
for (const item of items) {
|
|
229
|
+
if ((item.goalId ?? null) !== goalId)
|
|
230
|
+
continue;
|
|
231
|
+
if (item.source !== core_1.COMPILER_SOURCE)
|
|
232
|
+
continue;
|
|
233
|
+
if (item.compiledForGoalVersion !== goalVersion)
|
|
234
|
+
continue;
|
|
235
|
+
const revision = (0, core_1.planRevisionOf)(item);
|
|
236
|
+
if (revision > highest)
|
|
237
|
+
highest = revision;
|
|
238
|
+
}
|
|
239
|
+
return highest;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Should this run compile a plan for the goal version it is bound to?
|
|
243
|
+
*
|
|
244
|
+
* THE ONE AUTHORITY. It existed twice before — once in `run-cmd`, once
|
|
245
|
+
* re-implemented in the exercise that claims to prove `run-cmd` — and the two
|
|
246
|
+
* had already drifted apart: the copy used `nothing scoped-visible at all`,
|
|
247
|
+
* which answers CASE 7 (an older plan kept, the person's own work now finished,
|
|
248
|
+
* no plan for this version) with "do not compile" while the real composition
|
|
249
|
+
* root compiles. A test written against the copy would have proved the opposite
|
|
250
|
+
* of the behaviour it was named after and passed. Two predicates for one
|
|
251
|
+
* question is the defect; this is the fix, and the exercise now calls it.
|
|
252
|
+
*
|
|
253
|
+
* The order is the argument:
|
|
254
|
+
*
|
|
255
|
+
* unbound a run with no goal never compiles — there is no intent to
|
|
256
|
+
* compile FROM.
|
|
257
|
+
* contradicted the queue holds a plan for a LATER version, which is
|
|
258
|
+
* durable evidence this run's authority is stale. `run-cmd`
|
|
259
|
+
* refuses terminally before ever reaching here; this is the
|
|
260
|
+
* second lock, so that removing the first cannot silently
|
|
261
|
+
* turn a contradiction into a fresh plan.
|
|
262
|
+
* plan-exists this version has already had one. EXISTENCE, not progress:
|
|
263
|
+
* a finished or stalled plan still counts, and that is what
|
|
264
|
+
* makes same-version replanning impossible in this phase.
|
|
265
|
+
* work-in-progress something eligible can still move — work a person
|
|
266
|
+
* supplied by hand, or this version's own plan — so get on
|
|
267
|
+
* with it rather than planning around it.
|
|
268
|
+
*
|
|
269
|
+
* `eligible` must be the VERSION-AWARE set (a `scopedQueue` listing), never the
|
|
270
|
+
* raw queue: counting an older plan's items as "work in progress" is how an
|
|
271
|
+
* amended goal would never get a plan of its own.
|
|
272
|
+
*/
|
|
273
|
+
function decideCompile(split, eligible, scope) {
|
|
274
|
+
if (scope === null)
|
|
275
|
+
return { compile: false, because: 'unbound' };
|
|
276
|
+
if (split.newerPlans.length)
|
|
277
|
+
return { compile: false, because: 'contradicted' };
|
|
278
|
+
if (split.currentPlan.length)
|
|
279
|
+
return { compile: false, because: 'plan-exists' };
|
|
280
|
+
// Spelt out rather than folded into the return, because which `workLeft`
|
|
281
|
+
// answers permit a compile is the whole anti-loop rule: `finished` and
|
|
282
|
+
// `stalled` and `none` all permit one, and only for a version with no plan.
|
|
283
|
+
if ((0, core_1.workLeft)(eligible) === 'working')
|
|
284
|
+
return { compile: false, because: 'work-in-progress' };
|
|
285
|
+
return { compile: true };
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Durable evidence that this run must not act under.
|
|
289
|
+
*
|
|
290
|
+
* Returned as the offending items rather than a boolean so the refusal can say
|
|
291
|
+
* which ones and at what version, which is the only useful thing to tell
|
|
292
|
+
* somebody whose queue has been rewritten underneath them.
|
|
293
|
+
*/
|
|
294
|
+
function contradictingItems(items, scope) {
|
|
295
|
+
return items.filter((i) => (0, core_1.contradictsScope)((0, core_1.classifyForScope)(i, scope)));
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Whether this row is the receipt a plan revision leaves, rather than work.
|
|
299
|
+
*
|
|
300
|
+
* Structural, not a flag: the id is derived from the goal, the version and the
|
|
301
|
+
* revision, so a row can only be a receipt by ALREADY having the id a receipt
|
|
302
|
+
* for those exact fields would have. Nothing can claim the exemption by
|
|
303
|
+
* asserting it.
|
|
304
|
+
*/
|
|
305
|
+
function isPlanReceipt(item, goalId) {
|
|
306
|
+
const version = item.compiledForGoalVersion;
|
|
307
|
+
const revision = item.compiledForPlanRevision;
|
|
308
|
+
if (item.state !== 'closed' || version === undefined || revision === undefined)
|
|
309
|
+
return false;
|
|
310
|
+
return item.id === (0, goal_compile_1.planMarkerId)(goalId, version, revision);
|
|
311
|
+
}
|
|
312
|
+
function stillTheAuthority(fresh, goalId, boundVersion,
|
|
313
|
+
/**
|
|
314
|
+
* The wording this run was BOUND to, when the caller still has it.
|
|
315
|
+
*
|
|
316
|
+
* ⚠️ OPTIONAL, AND ABSENT MEANS ABSENT. Three of the four places that refuse
|
|
317
|
+
* a superseded goal hold only one of the two texts — a Start carries an id
|
|
318
|
+
* and a number, and a queue's contradicting rows carry a version — so they
|
|
319
|
+
* genuinely cannot answer "which part changed" and are not asked to pretend.
|
|
320
|
+
* Given nothing, this says exactly what it said before.
|
|
321
|
+
*/
|
|
322
|
+
boundText) {
|
|
323
|
+
// Could not find out. NOT "the goal moved" — that would be a terminal
|
|
324
|
+
// refusal, told to a person, about a file that was briefly busy.
|
|
325
|
+
if (!fresh.ok)
|
|
326
|
+
return { ok: false, reason: fresh.because, lapse: 'unreadable', unknown: true };
|
|
327
|
+
const now = fresh.goals.find((g) => g.id === goalId) ?? null;
|
|
328
|
+
if (now === null)
|
|
329
|
+
return { ok: false, reason: 'it is no longer known on this machine', lapse: 'gone' };
|
|
330
|
+
if (now.version > boundVersion) {
|
|
331
|
+
/**
|
|
332
|
+
* WHAT MOVED, AND NOT ONLY THAT IT MOVED (the audit's C-05).
|
|
333
|
+
*
|
|
334
|
+
* The numbers were the whole sentence: a person was told their Start was
|
|
335
|
+
* refused because the goal is at 8 and they named 7, and left to find out
|
|
336
|
+
* for themselves whether the words they care about are among what changed.
|
|
337
|
+
* Both texts are in hand here whenever the caller has the binding — which
|
|
338
|
+
* is the case after a compile, the ten-minute window where this fires most
|
|
339
|
+
* — so the comparison is made rather than left to the reader.
|
|
340
|
+
*
|
|
341
|
+
* ⚠️ ADDED TO THE REASON, NOT TO THE SHAPE. `AuthorityLapse` gains no
|
|
342
|
+
* member, no branch changes its verdict, and nothing newly refuses: the
|
|
343
|
+
* four quarantines refuse exactly what they refused before. One sentence
|
|
344
|
+
* is read in four places — the first-plan compile note and three adaptive
|
|
345
|
+
* decisions — so saying more here says more in all of them, with no new
|
|
346
|
+
* path to keep in step.
|
|
347
|
+
*/
|
|
348
|
+
const said = boundText === undefined ? '' : (0, core_1.describeWordingChange)((0, core_1.wordingChange)(boundText, now.text));
|
|
349
|
+
return { ok: false, reason: `it has moved on to version ${now.version}${said}`, lapse: 'superseded' };
|
|
350
|
+
}
|
|
351
|
+
if (now.version < boundVersion) {
|
|
352
|
+
// Behind what this Start is bound to. Not authority to act under: a mirror
|
|
353
|
+
// that went backwards is a mirror something rewrote, and writing here would
|
|
354
|
+
// be putting work behind the authority. A G@8 Start can never become a G@9
|
|
355
|
+
// one either — this only ever refuses, never re-binds.
|
|
356
|
+
return { ok: false, reason: `this machine’s copy has gone back to version ${now.version}`, lapse: 'behind' };
|
|
357
|
+
}
|
|
358
|
+
if (now.state !== 'active') {
|
|
359
|
+
// `abandoned` is the only non-active state a bound goal reaches in practice;
|
|
360
|
+
// `draft` would mean the server un-chose it, which is equally not authority.
|
|
361
|
+
return { ok: false, reason: `it is ${now.state}`, lapse: now.state === 'abandoned' ? 'abandoned' : 'gone' };
|
|
362
|
+
}
|
|
363
|
+
return { ok: true };
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Write a compiled plan into the queue, as one durable batch.
|
|
367
|
+
*
|
|
368
|
+
* The choke point for the ownership invariant, and the only reason this is a
|
|
369
|
+
* function rather than a call to `insertAll` at the call site: EVERY item a
|
|
370
|
+
* compilation produces must be born owned by the goal it was compiled for, and
|
|
371
|
+
* this is where that is enforced rather than hoped for.
|
|
372
|
+
*
|
|
373
|
+
* The invariant is forced by selection, not chosen. `scopedQueue` filters
|
|
374
|
+
* symmetrically: an unowned compiled item would be invisible to the very run
|
|
375
|
+
* that compiled it, and visible to an unbound run that knows nothing about the
|
|
376
|
+
* goal. So an item arriving here without the right owner is a bug in the caller,
|
|
377
|
+
* and refusing the WHOLE batch is the only safe answer — a partial plan is a
|
|
378
|
+
* shape nobody asked for.
|
|
379
|
+
*
|
|
380
|
+
* Idempotent through `insertAll`: an id already in the queue is skipped, so a
|
|
381
|
+
* retry after a crash lands only what is missing, and a retry after a complete
|
|
382
|
+
* write lands nothing. That works precisely because compiled ids are derived
|
|
383
|
+
* from the goal, its version and the step, rather than minted per attempt.
|
|
384
|
+
*/
|
|
385
|
+
async function materialiseGoalPlan(queue, goalId, items) {
|
|
386
|
+
for (const item of items) {
|
|
387
|
+
if ((item.goalId ?? null) !== goalId) {
|
|
388
|
+
return {
|
|
389
|
+
ok: false,
|
|
390
|
+
problem: `compiled item ${item.id} is not owned by goal ${goalId} — refusing the whole plan`,
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
if (item.state !== 'draft' && !isPlanReceipt(item, goalId)) {
|
|
394
|
+
// Nothing in this system is born pickable. A compiled step is a claim
|
|
395
|
+
// that some work is worth doing; the verify pass is what turns a claim
|
|
396
|
+
// into something a round may pick.
|
|
397
|
+
//
|
|
398
|
+
// The one exception is the row a revision leaves to say it happened. It
|
|
399
|
+
// is born `closed`, which is STRICTER than draft rather than looser —
|
|
400
|
+
// nothing picks it, nothing verifies it, and it can never be `done` — and
|
|
401
|
+
// it is recognised by recomputing its own derived id from its own fields,
|
|
402
|
+
// so a hand-written closed row cannot pass as one.
|
|
403
|
+
return { ok: false, problem: `compiled item ${item.id} is born ${item.state}, not draft` };
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
const written = await queue.insertAll(items);
|
|
407
|
+
if (!written.ok) {
|
|
408
|
+
// The only failure `insertAll` reports is one id twice in one batch, which
|
|
409
|
+
// the compiler already collapses. Reaching this means a caller built the
|
|
410
|
+
// batch some other way.
|
|
411
|
+
return { ok: false, problem: `the plan names item ${written.id} twice` };
|
|
412
|
+
}
|
|
413
|
+
return { ok: true, created: written.inserted.length, alreadyThere: written.alreadyPresent.length };
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Hand a set of items to a goal, all of them or none.
|
|
417
|
+
*
|
|
418
|
+
* One durable write, because the alternative — `update` per item — can be
|
|
419
|
+
* interrupted halfway and leave a goal owning some of what the phone named and
|
|
420
|
+
* not the rest, with nothing recording which. A caller retrying that has no way
|
|
421
|
+
* to tell a partial adoption from a fresh one.
|
|
422
|
+
*
|
|
423
|
+
* Every refusal names the item. Adoption is a deliberate act performed from a
|
|
424
|
+
* screen where the person can see the item, so "one of these is wrong" is not a
|
|
425
|
+
* useful answer.
|
|
426
|
+
*/
|
|
427
|
+
async function adoptGoalItems(queue, goalId, itemIds) {
|
|
428
|
+
const patches = [];
|
|
429
|
+
let alreadyOwned = 0;
|
|
430
|
+
for (const id of itemIds) {
|
|
431
|
+
const item = queue.get(id);
|
|
432
|
+
if (item === undefined)
|
|
433
|
+
return { ok: false, problem: `no item ${id} here` };
|
|
434
|
+
const owner = item.goalId ?? null;
|
|
435
|
+
if (owner === goalId) {
|
|
436
|
+
// Already ours. Counted rather than patched, so a redelivered start-run
|
|
437
|
+
// adopting the same set is a no-op instead of a version bump that would
|
|
438
|
+
// invalidate anything holding a copy.
|
|
439
|
+
alreadyOwned += 1;
|
|
440
|
+
continue;
|
|
441
|
+
}
|
|
442
|
+
if (owner !== null) {
|
|
443
|
+
// A transfer, not an adoption. Refused rather than performed: the other
|
|
444
|
+
// goal may have a run working this very item, and taking it silently is
|
|
445
|
+
// how two runs end up editing one item's code. Letting it go from the
|
|
446
|
+
// first goal is an explicit act with its own command.
|
|
447
|
+
return { ok: false, problem: `item ${id} belongs to goal ${owner} — let it go from there first` };
|
|
448
|
+
}
|
|
449
|
+
if (item.state === 'in_progress') {
|
|
450
|
+
// Unowned and in progress means a run without a goal is working it right
|
|
451
|
+
// now. Adopting it would move it out of that run's view mid-round.
|
|
452
|
+
return { ok: false, problem: `item ${id} is being worked on right now` };
|
|
453
|
+
}
|
|
454
|
+
patches.push({ id, expectedVersion: item.version, patch: { goalId } });
|
|
455
|
+
}
|
|
456
|
+
const written = await queue.patchAll(patches);
|
|
457
|
+
if (!written.ok)
|
|
458
|
+
return { ok: false, problem: describeBatchFailure(written) };
|
|
459
|
+
return { ok: true, adopted: written.items.length, alreadyOwned };
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Let go of everything a goal owns that can still be worked.
|
|
463
|
+
*
|
|
464
|
+
* Takes no item ids, deliberately. The phone that abandons a goal does not know
|
|
465
|
+
* what that goal came to own — items are adopted over a whole evening, and a
|
|
466
|
+
* list assembled by a client is a list that is already stale. The instruction is
|
|
467
|
+
* "let this goal's work go"; the machine that holds the queue decides what that
|
|
468
|
+
* means, item by item, from {@link releaseOnAbandon}.
|
|
469
|
+
*
|
|
470
|
+
* Idempotent: running it twice releases nothing the second time, because there
|
|
471
|
+
* is nothing left owned that is releasable.
|
|
472
|
+
*/
|
|
473
|
+
async function releaseGoalItems(queue, goalId) {
|
|
474
|
+
const patches = [];
|
|
475
|
+
let heldByARun = 0;
|
|
476
|
+
let keptAsRecord = 0;
|
|
477
|
+
for (const item of queue.list()) {
|
|
478
|
+
if ((item.goalId ?? null) !== goalId)
|
|
479
|
+
continue;
|
|
480
|
+
const decision = (0, core_1.releaseOnAbandon)(item.state);
|
|
481
|
+
if (decision === 'held-by-a-run') {
|
|
482
|
+
heldByARun += 1;
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
485
|
+
if (decision === 'keeps-its-record') {
|
|
486
|
+
keptAsRecord += 1;
|
|
487
|
+
continue;
|
|
488
|
+
}
|
|
489
|
+
// Explicit null, not a deleted key. Both read as unowned, but a reader
|
|
490
|
+
// comparing two queue files should be able to see that something happened.
|
|
491
|
+
patches.push({ id: item.id, expectedVersion: item.version, patch: { goalId: null } });
|
|
492
|
+
}
|
|
493
|
+
const written = await queue.patchAll(patches);
|
|
494
|
+
if (!written.ok) {
|
|
495
|
+
// Every id and version came from a synchronous pass over the store's own
|
|
496
|
+
// map a moment ago, with no await in between, so there is no interleaving
|
|
497
|
+
// that could make one stale. Reachable only through a bug in this file.
|
|
498
|
+
throw new Error(`release: the queue refused a batch it produced itself — ${describeBatchFailure(written)}`);
|
|
499
|
+
}
|
|
500
|
+
return { released: written.items.length, heldByARun, keptAsRecord };
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* The real one, over the queue on disk.
|
|
504
|
+
*
|
|
505
|
+
* Two things here are load-bearing, and both were learned from a race that
|
|
506
|
+
* reached a state neither command's contract described.
|
|
507
|
+
*
|
|
508
|
+
* FIRST, it TAKES the tree rather than merely looking at it. The daemon and the
|
|
509
|
+
* run are separate processes over one `queue.json`; a check followed by a write
|
|
510
|
+
* leaves a window in which the run can take the lease and adopt in between, and
|
|
511
|
+
* the release then completes against a queue that no longer describes reality.
|
|
512
|
+
* The lease is already an exclusive create — the only mutual exclusion in this
|
|
513
|
+
* system — so the release holds it for the few milliseconds it writes, exactly
|
|
514
|
+
* as a run does. A `LeaseHeldError` is the busy answer, and it arrives from the
|
|
515
|
+
* filesystem rather than from a check that can go stale.
|
|
516
|
+
*
|
|
517
|
+
* SECOND, it writes the abandonment into the local goal mirror. Releasing the
|
|
518
|
+
* items is not enough on its own: a Start bound to G@7 that is still in flight,
|
|
519
|
+
* or that arrives later on a machine whose mirror is behind and offline, would
|
|
520
|
+
* resolve against `active` and adopt the very items this just freed — into a
|
|
521
|
+
* goal nobody is pursuing, with the one-shot release already acked and gone.
|
|
522
|
+
* The release IS this machine being told the goal was let go, so it remembers.
|
|
523
|
+
* That is not instant revocation and it does not need the server: a machine
|
|
524
|
+
* that has not heard still starts, exactly as before. It only refuses once it
|
|
525
|
+
* has carried the release out itself.
|
|
526
|
+
*/
|
|
527
|
+
function nodeGoalReleaser(stateDir, fs, leases, cliVersion,
|
|
528
|
+
/** The mirror to record the abandonment in. Absent in tests that do not keep one. */
|
|
529
|
+
goals) {
|
|
530
|
+
return {
|
|
531
|
+
async release(goalId, goalVersion) {
|
|
532
|
+
let token;
|
|
533
|
+
try {
|
|
534
|
+
token = (await leases.acquire({
|
|
535
|
+
// Honest about what is holding the tree and why. A release holds it
|
|
536
|
+
// for a single write, so this is unlikely ever to be seen — but a
|
|
537
|
+
// lease nobody can explain is worse than a wordy one.
|
|
538
|
+
runId: `release-${goalId}`,
|
|
539
|
+
branch: '(letting a goal go)',
|
|
540
|
+
baseBranch: '(letting a goal go)',
|
|
541
|
+
cliVersion,
|
|
542
|
+
})).token;
|
|
543
|
+
}
|
|
544
|
+
catch {
|
|
545
|
+
// Held by a live run, or not decidable. Both wait: the cost of being
|
|
546
|
+
// wrong is a lost round of work, and waiting costs only time.
|
|
547
|
+
return { busy: 'the working tree is busy — the release waits for it' };
|
|
548
|
+
}
|
|
549
|
+
try {
|
|
550
|
+
const queue = new queue_store_1.QueueStore(stateDir, fs);
|
|
551
|
+
await queue.open();
|
|
552
|
+
const outcome = await releaseGoalItems(queue, goalId);
|
|
553
|
+
// AFTER the items, so a crash between the two leaves the mirror still
|
|
554
|
+
// saying `active` and the release still deliverable — which retries
|
|
555
|
+
// correctly. The other order would leave a goal marked abandoned here
|
|
556
|
+
// with its work never freed and the command about to be acked.
|
|
557
|
+
await goals?.markAbandoned(goalId, goalVersion);
|
|
558
|
+
return outcome;
|
|
559
|
+
}
|
|
560
|
+
finally {
|
|
561
|
+
await leases.release(token);
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
function describeBatchFailure(r) {
|
|
567
|
+
switch (r.reason) {
|
|
568
|
+
case 'duplicate-id':
|
|
569
|
+
return 'the same item was named twice';
|
|
570
|
+
case 'not-found':
|
|
571
|
+
return `no item ${r.id} here`;
|
|
572
|
+
case 'stale-version':
|
|
573
|
+
return `item ${r.id} changed underneath this (now at version ${r.currentVersion})`;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
//# sourceMappingURL=goal-ownership.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goal-ownership.js","sourceRoot":"","sources":["../src/goal-ownership.ts"],"names":[],"mappings":";;AAoDA,kCAgBC;AA8DD,gDAuDC;AAsDD,sCAoDC;AAeD,8DAEC;AAsBD,kDAUC;AA6CD,sCAaC;AASD,gDAEC;AA0DD,8CAuDC;AA0BD,kDAkCC;AAkBD,wCAsCC;AAsBD,4CA6BC;AAsCD,4CA4CC;AAnwBD,uCAcsB;AACtB,iDAA8C;AAC9C,+CAA2C;AAqB3C;;;;;;;;;;;;;;GAcG;AACH,SAAgB,WAAW,CAA0B,KAAQ,EAAE,KAAe;IAC5E,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,wEAAwE;QACxE,uEAAuE;QACvE,sDAAsD;QACtD,OAAO;YACL,IAAI,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,oBAAa,EAAC,CAAC,EAAE,IAAI,CAAC,CAAC;YAC9D,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1B,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,KAAK,E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