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,616 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decideAutonomyTick = exports.MAX_CONTROLLERS_PER_TICK = void 0;
|
|
4
|
+
exports.autonomyTick = autonomyTick;
|
|
5
|
+
const autonomy_controller_1 = require("./autonomy-controller");
|
|
6
|
+
Object.defineProperty(exports, "decideAutonomyTick", { enumerable: true, get: function () { return autonomy_controller_1.decideAutonomyTick; } });
|
|
7
|
+
const autonomy_store_1 = require("./autonomy-store");
|
|
8
|
+
const spend_ledger_1 = require("./spend-ledger");
|
|
9
|
+
const run_launcher_1 = require("./run-launcher");
|
|
10
|
+
/**
|
|
11
|
+
* Do at most one thing for at most one controller.
|
|
12
|
+
*
|
|
13
|
+
* Never throws for an ordinary refusal, an unreachable server or an unreadable
|
|
14
|
+
* record: those are outcomes, and the daemon loop must not be the place they
|
|
15
|
+
* are discovered. A genuine programming error still propagates.
|
|
16
|
+
*/
|
|
17
|
+
async function autonomyTick(deps) {
|
|
18
|
+
const read = await deps.autonomy.read();
|
|
19
|
+
if (!read.ok) {
|
|
20
|
+
// The record of what this machine may spend cannot be read. Nothing is
|
|
21
|
+
// attempted against a budget it cannot account for.
|
|
22
|
+
return { action: { kind: 'idle', because: read.because } };
|
|
23
|
+
}
|
|
24
|
+
// Live grants, PLUS finished ones the server has not been told about. A
|
|
25
|
+
// pursuit that ended still owes one thing, and a tick that only looked at
|
|
26
|
+
// live grants would leave that owed for ever — the phone would show a night's
|
|
27
|
+
// work still running against a machine that finished hours ago.
|
|
28
|
+
const live = read.progress.filter((g) => g.state === 'authorized' || g.projectedAt === undefined);
|
|
29
|
+
if (live.length === 0) {
|
|
30
|
+
return { action: { kind: 'idle', because: 'no grant is live or owes a report here' } };
|
|
31
|
+
}
|
|
32
|
+
// Deterministic order, then rotated. `expiresAt` is stamped at authorization
|
|
33
|
+
// and never moves, so ascending is oldest-grant-first; the id breaks ties so
|
|
34
|
+
// two grants authorized in the same millisecond still order the same way on
|
|
35
|
+
// every machine and every tick.
|
|
36
|
+
const ordered = [...live].sort((a, b) => a.expiresAt.localeCompare(b.expiresAt) || a.controllerId.localeCompare(b.controllerId));
|
|
37
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
38
|
+
// SELECTED IS NOT THE SAME AS ACTIONABLE.
|
|
39
|
+
//
|
|
40
|
+
// The turn used to go to whichever grant sorted first, and it kept going
|
|
41
|
+
// there whatever that grant had to say. A controller merely WAITING for its
|
|
42
|
+
// run — hours of `wait`, one every ten seconds — held the only slot the whole
|
|
43
|
+
// time. Measured: a hundred cadences, a hundred turns to the waiting grant,
|
|
44
|
+
// and zero Starts for the newer one beside it, which had work ready and never
|
|
45
|
+
// once got asked.
|
|
46
|
+
//
|
|
47
|
+
// So the scan looks for a grant that can actually MOVE. `wait`, `hold` and
|
|
48
|
+
// `idle` are answers, not transitions: nothing durable changes, so a
|
|
49
|
+
// controller that can only produce them has no claim on the turn.
|
|
50
|
+
//
|
|
51
|
+
// BOUNDED, AND CHEAP TO BE WRONG ABOUT. Reading a grant's facts and asking
|
|
52
|
+
// the reducer writes nothing — that is the whole point of a pure reducer over
|
|
53
|
+
// facts gathered elsewhere. So the scan can afford to ask several controllers
|
|
54
|
+
// what they would do and still perform at most one of the answers.
|
|
55
|
+
//
|
|
56
|
+
// THE ONE-TRANSITION RULE IS UNTOUCHED. Several may be asked; exactly one is
|
|
57
|
+
// carried out, and the rest are forgotten until the next cadence.
|
|
58
|
+
/**
|
|
59
|
+
* 🔴 THE PREFERENCE ORDERS THE FRONT OF THE QUEUE; THE ROTATION STILL TURNS
|
|
60
|
+
* THE REST — AND THE FIRST VERSION OF THIS CODE FROZE THE WHOLE DAEMON.
|
|
61
|
+
*
|
|
62
|
+
* MEASURED, by the cycle that attacked this very commit: with a preference of
|
|
63
|
+
* ANY length the old code pinned `start = 0`, so the scan window became the
|
|
64
|
+
* first six entries of a fixed order and never moved again. Forty ticks,
|
|
65
|
+
* forty `hold`s, zero Starts, for ever — and a ONE-ENTRY preference naming a
|
|
66
|
+
* single blocked goal was enough to do it. The comment above said rotating a
|
|
67
|
+
* deliberate order "is just discarding it" and was wrong in the way that
|
|
68
|
+
* matters: rotation is not about fairness between the preferred, it is the
|
|
69
|
+
* only thing that lets a controller outside the window ever be ASKED.
|
|
70
|
+
*
|
|
71
|
+
* ⚠️ SO THE TWO ARE COMPOSED RATHER THAN CHOSEN BETWEEN. The scan order is
|
|
72
|
+
*
|
|
73
|
+
* [ the goals the scheduler named, in ITS order ]
|
|
74
|
+
* ++ [ everything else, rotated by one each cadence ]
|
|
75
|
+
*
|
|
76
|
+
* The coordinator still gets first look, which is the whole point of asking
|
|
77
|
+
* it. Nothing outside its answer can starve, because the tail advances every
|
|
78
|
+
* cadence whatever the head says. And with no preference at all the order is
|
|
79
|
+
* exactly what it was before this seam existed — the rotated list — so the
|
|
80
|
+
* unwired path is untouched.
|
|
81
|
+
*
|
|
82
|
+
* ⚠️ AND THE PREFERRED BLOCK IS CAPPED. A preference longer than the scan
|
|
83
|
+
* window would refill the window with preferred entries every tick and
|
|
84
|
+
* reproduce the freeze by a longer route, so at most half the window is spent
|
|
85
|
+
* on it. `decideSchedule` never names more goals than there is capacity for,
|
|
86
|
+
* so in practice this cap is slack; it is here because "in practice" is what
|
|
87
|
+
* the frozen version also assumed.
|
|
88
|
+
*/
|
|
89
|
+
const preference = deps.prefer?.() ?? [];
|
|
90
|
+
const turn = ((deps.rotation?.() ?? 0) % ordered.length + ordered.length) % ordered.length;
|
|
91
|
+
const preferredFirst = [];
|
|
92
|
+
const rest = [];
|
|
93
|
+
if (preference.length > 0) {
|
|
94
|
+
const rank = (g) => {
|
|
95
|
+
const at = preference.indexOf(g.goalId);
|
|
96
|
+
return at === -1 ? -1 : at;
|
|
97
|
+
};
|
|
98
|
+
const named = ordered
|
|
99
|
+
.map((g, i) => ({ g, i, at: rank(g) }))
|
|
100
|
+
.filter((d) => d.at !== -1)
|
|
101
|
+
.sort((a, b) => a.at - b.at || a.i - b.i)
|
|
102
|
+
.slice(0, Math.max(1, Math.floor(exports.MAX_CONTROLLERS_PER_TICK / 2)));
|
|
103
|
+
const taken = new Set(named.map((d) => d.g.controllerId));
|
|
104
|
+
preferredFirst.push(...named.map((d) => d.g));
|
|
105
|
+
rest.push(...ordered.filter((g) => !taken.has(g.controllerId)));
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
rest.push(...ordered);
|
|
109
|
+
}
|
|
110
|
+
// The tail rotates every cadence, so every controller outside the preferred
|
|
111
|
+
// block is reached within `rest.length` ticks whatever the coordinator says.
|
|
112
|
+
const rotated = rest.length === 0 ? [] : rest.map((_, i) => rest[(turn + i) % rest.length]);
|
|
113
|
+
const scanOrder = [...preferredFirst, ...rotated];
|
|
114
|
+
const scan = Math.min(scanOrder.length, exports.MAX_CONTROLLERS_PER_TICK);
|
|
115
|
+
/**
|
|
116
|
+
* 🔴 HOW MANY EXECUTIONS ONE CADENCE MAY LAUNCH — AND IT USED TO BE ONE,
|
|
117
|
+
* WHICH IS NOT PARALLELISM BY ANY READING.
|
|
118
|
+
*
|
|
119
|
+
* The one-transition rule is right about TRANSITIONS: reserving an ordinal,
|
|
120
|
+
* settling a pursuit, projecting a terminal state. Each of those writes
|
|
121
|
+
* durable state and each deserves to be attributable to a cadence.
|
|
122
|
+
*
|
|
123
|
+
* Launching is not one of those. `starter.start` spawns a DETACHED child and
|
|
124
|
+
* returns without waiting — that is its whole design, so the heartbeat is not
|
|
125
|
+
* held for hours — so N launches in one cadence produce N processes running
|
|
126
|
+
* at the same instant, which is the only definition of parallelism that means
|
|
127
|
+
* anything. Doing them one per cadence would fill N slots in N cadences and
|
|
128
|
+
* call the queue a fleet.
|
|
129
|
+
*
|
|
130
|
+
* ⚠️ ONE STILL, FOR EVERYTHING ELSE. Exactly one non-launch transition per
|
|
131
|
+
* cadence, unchanged. And the default is one launch too, so a caller that
|
|
132
|
+
* does not ask for capacity behaves precisely as it always has.
|
|
133
|
+
*
|
|
134
|
+
* ⚠️ THE CEILING IS THE CALLER'S, AND IT IS A CEILING RATHER THAN A TARGET.
|
|
135
|
+
* `launchesPerTick` is `N - active` computed by the daemon from the registry;
|
|
136
|
+
* this loop stops when the goals run out, which is the common case.
|
|
137
|
+
*/
|
|
138
|
+
const launchBudget = Math.max(1, deps.launchesPerTick?.() ?? 1);
|
|
139
|
+
let launched = 0;
|
|
140
|
+
let firstOutcome = null;
|
|
141
|
+
let fallback = null;
|
|
142
|
+
/**
|
|
143
|
+
* A goal skipped for want of a slot, kept ONLY so the cadence can say so.
|
|
144
|
+
*
|
|
145
|
+
* 🔴 IT MUST NOT SHARE `fallback`, AND THAT SHARING DEFEATED THE GUARD
|
|
146
|
+
* BELOW ENTIRELY.
|
|
147
|
+
*
|
|
148
|
+
* MEASURED: the skip did `fallback ??= { grant, action }` and the loop's exit
|
|
149
|
+
* PERFORMS `fallback` — so the unplaced goal was launched anyway, into the
|
|
150
|
+
* project's own checkout, which is the exact behaviour the guard exists to
|
|
151
|
+
* prevent. The guard read as if it worked, the end-to-end run refused with
|
|
152
|
+
* "a run is already going here", and the two facts never met.
|
|
153
|
+
*/
|
|
154
|
+
let deferred = null;
|
|
155
|
+
for (let i = 0; i < scan; i++) {
|
|
156
|
+
const candidate = scanOrder[i];
|
|
157
|
+
const facts = await loadFacts(deps, candidate);
|
|
158
|
+
const action = (0, autonomy_controller_1.decideAutonomyTick)(facts);
|
|
159
|
+
deps.onDecision?.(candidate.goalId, action.kind);
|
|
160
|
+
if (movesSomething(action)) {
|
|
161
|
+
/**
|
|
162
|
+
* 🔴 A GOAL THE COORDINATOR DID NOT PLACE MUST NOT BE LAUNCHED.
|
|
163
|
+
*
|
|
164
|
+
* MEASURED END TO END, and only by the end-to-end harness: with capacity
|
|
165
|
+
* 2 and three authorized goals, A starts, and the scheduler then emits
|
|
166
|
+
* ONE more start because one slot is left. The tick's scan still reaches
|
|
167
|
+
* B and C — they are in the rotation — and with no placement for them the
|
|
168
|
+
* launcher fell back to its unplaced path: the project's own checkout,
|
|
169
|
+
* the project's own lease, and a clash with the run already there. Three
|
|
170
|
+
* cadences, three refusals reading "a run is already going here for goal
|
|
171
|
+
* gol_A".
|
|
172
|
+
*
|
|
173
|
+
* That is the single-run behaviour coming back through the back door.
|
|
174
|
+
* When a coordinator is deciding, it decides WHO runs; a goal it did not
|
|
175
|
+
* place has not been refused, it simply has no slot this cadence, and a
|
|
176
|
+
* later cadence places it when one frees.
|
|
177
|
+
*
|
|
178
|
+
* ⚠️ ONLY WHEN A COORDINATOR IS ACTUALLY PLACING. With no `workspaceFor`
|
|
179
|
+
* at all — every existing caller — nothing is skipped and this behaves
|
|
180
|
+
* exactly as it always has.
|
|
181
|
+
*/
|
|
182
|
+
if (action.kind === 'execute-attempt' &&
|
|
183
|
+
deps.workspaceFor !== undefined &&
|
|
184
|
+
deps.workspaceFor(candidate.goalId) === undefined) {
|
|
185
|
+
deferred ??= candidate;
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
const outcome = { controllerId: candidate.controllerId, ...(await perform(deps, candidate, action)) };
|
|
189
|
+
// Anything that is not a launch is the tick's one transition, as before.
|
|
190
|
+
if (action.kind !== 'execute-attempt')
|
|
191
|
+
return outcome;
|
|
192
|
+
firstOutcome ??= outcome;
|
|
193
|
+
launched += 1;
|
|
194
|
+
if (launched >= launchBudget)
|
|
195
|
+
return firstOutcome;
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
// Keep the first non-transition so a tick where nobody can move still
|
|
199
|
+
// reports something true about the grant whose turn it was.
|
|
200
|
+
fallback ??= { grant: candidate, action };
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* ⚠️ THE FIRST LAUNCH IS WHAT THE TICK REPORTS. `TickOutcome` describes ONE
|
|
204
|
+
* action and every existing reader — the daemon's log, the tests — expects
|
|
205
|
+
* that shape. Reporting the first is the honest summary of a cadence that
|
|
206
|
+
* launched several, and changing the shape would rewrite a contract for a
|
|
207
|
+
* detail the caller does not act on.
|
|
208
|
+
*/
|
|
209
|
+
if (firstOutcome !== null)
|
|
210
|
+
return firstOutcome;
|
|
211
|
+
/**
|
|
212
|
+
* ⚠️ A DEFERRED GOAL IS REPORTED, NEVER PERFORMED. It has not been refused
|
|
213
|
+
* and nothing about it has failed; the coordinator simply has no slot for it
|
|
214
|
+
* this cadence, and a later one places it when a slot frees.
|
|
215
|
+
*/
|
|
216
|
+
if (fallback === null && deferred !== null) {
|
|
217
|
+
return {
|
|
218
|
+
controllerId: deferred.controllerId,
|
|
219
|
+
action: {
|
|
220
|
+
kind: 'idle',
|
|
221
|
+
because: `goal ${deferred.goalId} is authorized but the coordinator has not placed it; waiting for a slot`,
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
const chosen = fallback;
|
|
226
|
+
return {
|
|
227
|
+
controllerId: chosen.grant.controllerId,
|
|
228
|
+
...(await perform(deps, chosen.grant, chosen.action)),
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* How many controllers one cadence may ASK before giving up on finding work.
|
|
233
|
+
*
|
|
234
|
+
* A ceiling rather than "all of them", so a machine holding many grants cannot
|
|
235
|
+
* turn the autonomy cadence into an unbounded sweep every ten seconds. Six is
|
|
236
|
+
* comfortably more than the number of goals a person pursues at once and small
|
|
237
|
+
* enough that the worst tick is still a handful of file reads and one HTTP GET
|
|
238
|
+
* per candidate.
|
|
239
|
+
*
|
|
240
|
+
* Being wrong low is harmless: the rotation moves on, so a controller missed
|
|
241
|
+
* this cadence is asked on the next one. Being wrong high costs work every ten
|
|
242
|
+
* seconds for ever.
|
|
243
|
+
*/
|
|
244
|
+
exports.MAX_CONTROLLERS_PER_TICK = 6;
|
|
245
|
+
/**
|
|
246
|
+
* Whether this action would change something durable.
|
|
247
|
+
*
|
|
248
|
+
* The whole fairness rule rests on this distinction, so it is written once,
|
|
249
|
+
* here, rather than being re-derived at the call site. `wait` and `hold` are
|
|
250
|
+
* honest answers — something is legitimately in progress, or cannot be acted on
|
|
251
|
+
* — but nothing about the world changes, so they give up the turn.
|
|
252
|
+
*/
|
|
253
|
+
function movesSomething(action) {
|
|
254
|
+
switch (action.kind) {
|
|
255
|
+
case 'reserve-ordinal':
|
|
256
|
+
case 'execute-attempt':
|
|
257
|
+
case 'finish-ordinal':
|
|
258
|
+
case 'terminal':
|
|
259
|
+
case 'project-terminal':
|
|
260
|
+
case 'accept-server-ending':
|
|
261
|
+
return true;
|
|
262
|
+
case 'wait':
|
|
263
|
+
case 'hold':
|
|
264
|
+
return false;
|
|
265
|
+
default: {
|
|
266
|
+
const never = action;
|
|
267
|
+
throw new Error(`no fairness decision for ${String(never)}`);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Everything the reducer is allowed to see, gathered from the authorities that
|
|
273
|
+
* own it.
|
|
274
|
+
*
|
|
275
|
+
* Nothing is derived twice. The attempt history comes from `StartAttempts`, the
|
|
276
|
+
* spend from `AutonomyStore`, the run's ending from the ledger reader — and
|
|
277
|
+
* this function's whole job is to put them beside each other.
|
|
278
|
+
*/
|
|
279
|
+
async function loadFacts(deps, grant) {
|
|
280
|
+
const requestIdFor = (ordinal) => (0, autonomy_store_1.autonomyStartId)(grant.controllerId, ordinal);
|
|
281
|
+
const base = {
|
|
282
|
+
controllerId: grant.controllerId,
|
|
283
|
+
localState: grant.state,
|
|
284
|
+
expiresAt: grant.expiresAt,
|
|
285
|
+
maxStarts: grant.maxStarts,
|
|
286
|
+
now: deps.now(),
|
|
287
|
+
requestIdFor,
|
|
288
|
+
};
|
|
289
|
+
if (grant.state !== 'authorized') {
|
|
290
|
+
// Over locally. The only question left is whether the server knows, and
|
|
291
|
+
// asking is cheap compared with leaving a finished pursuit showing as
|
|
292
|
+
// running on somebody's phone.
|
|
293
|
+
const remote = await deps.reconcile(grant);
|
|
294
|
+
return {
|
|
295
|
+
...base,
|
|
296
|
+
unfinished: [],
|
|
297
|
+
startsConsumed: grant.maxStarts,
|
|
298
|
+
reconciliation: remote,
|
|
299
|
+
// Unreachable is not "the server knows". It is "ask again later".
|
|
300
|
+
serverKnowsItEnded: remote.kind === 'ended' ? true : remote.kind === 'unreachable' ? undefined : false,
|
|
301
|
+
endingRecorded: grant.projectedAt !== undefined,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
// Read BEFORE anything is decided, and shared by both spending paths. A
|
|
305
|
+
// person's tap is not about one ordinal; it is about whether the machine
|
|
306
|
+
// should be going at all.
|
|
307
|
+
const humanHold = (await deps.humanHold?.()) ?? undefined;
|
|
308
|
+
const spend = await deps.autonomy.spendOf(grant.controllerId, grant.maxStarts);
|
|
309
|
+
if (!spend.ok) {
|
|
310
|
+
// A spend that cannot be read is not a spend of zero. Reconciliation is
|
|
311
|
+
// skipped: there is nothing this tick could safely do with the answer.
|
|
312
|
+
//
|
|
313
|
+
// WEATHER holds — something else had the file for a moment, and the next
|
|
314
|
+
// tick reads it again. DAMAGE stops: a receipt whose contents contradict
|
|
315
|
+
// where it sits, or a hole where one was removed, will not improve by being
|
|
316
|
+
// read again, and a budget that cannot be believed cannot bound anything.
|
|
317
|
+
return {
|
|
318
|
+
...base,
|
|
319
|
+
unfinished: [],
|
|
320
|
+
startsConsumed: grant.maxStarts,
|
|
321
|
+
reconciliation: { kind: 'unreachable', because: spend.because },
|
|
322
|
+
...(spend.transient ? {} : { recordsDamaged: spend.because }),
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
const { unfinished, startsConsumed } = spend.spend;
|
|
326
|
+
const ordinal = unfinished[0];
|
|
327
|
+
const held = humanHold === undefined ? {} : { humanHold };
|
|
328
|
+
// The server is asked once, and only when the answer could matter. A tick
|
|
329
|
+
// that is going to wait for a live attempt has nothing to spend and no reason
|
|
330
|
+
// to make a request.
|
|
331
|
+
const reconciliation = await deps.reconcile(grant);
|
|
332
|
+
/**
|
|
333
|
+
* Asked BESIDE reconciliation, and for the same reason.
|
|
334
|
+
*
|
|
335
|
+
* Both answer "may this machine spend anything right now", both are only
|
|
336
|
+
* true at the instant they were read, and both gate the two spending paths
|
|
337
|
+
* together. Reading one and not the other would mean a tick that had asked
|
|
338
|
+
* permission of the grant but not of the person.
|
|
339
|
+
*
|
|
340
|
+
* Unconditional for an authorized grant, exactly as reconciliation is. It
|
|
341
|
+
* could be narrowed to the ticks that can actually spend, and the saving
|
|
342
|
+
* would be real — but the condition would then live in two places, and the
|
|
343
|
+
* one that drifts is the one that decides a pursuit may proceed without
|
|
344
|
+
* having looked.
|
|
345
|
+
*/
|
|
346
|
+
const gate = await deps.approvalGate?.(grant);
|
|
347
|
+
const approval = gate === undefined ? {} : { approvalGate: gate };
|
|
348
|
+
const programme = deps.programme === true ? { programme: true } : {};
|
|
349
|
+
/**
|
|
350
|
+
* Read beside the approval and for the same reason: both are authorities that
|
|
351
|
+
* can refuse a spend, and a tick that asked one but not the other would
|
|
352
|
+
* proceed without having looked. Unconditional for an authorized grant, so
|
|
353
|
+
* the condition cannot drift into two places.
|
|
354
|
+
*/
|
|
355
|
+
const safety = await deps.loopSafety?.(grant);
|
|
356
|
+
const loopSafety = safety === undefined ? {} : { loopSafety: safety };
|
|
357
|
+
if (ordinal === undefined) {
|
|
358
|
+
return { ...base, unfinished, startsConsumed, reconciliation, ...held, ...approval, ...loopSafety, ...programme };
|
|
359
|
+
}
|
|
360
|
+
const requestId = requestIdFor(ordinal);
|
|
361
|
+
const refusal = await deps.refusalOf(requestId);
|
|
362
|
+
const attempt = await deps.attempts.progress(requestId, {
|
|
363
|
+
startedRun: await deps.startMarkOf(requestId),
|
|
364
|
+
refusal: refusal,
|
|
365
|
+
ordinalReserved: true,
|
|
366
|
+
});
|
|
367
|
+
const runEnded = attempt.kind === 'run-started' ? await deps.runEnded(attempt.runId) : undefined;
|
|
368
|
+
/**
|
|
369
|
+
* M5-2: the third key, asked only once the Start has refused — before that
|
|
370
|
+
* there is no branch whose publication could matter — and only of a caller
|
|
371
|
+
* that can ask it. Whatever the mark named is what is asked about; a mark
|
|
372
|
+
* that named nothing is asked about nothing, and the controller says so.
|
|
373
|
+
*/
|
|
374
|
+
const publication = attempt.kind === 'refused' && deps.publicationOf !== undefined
|
|
375
|
+
? await deps.publicationOf(refusal?.branch, grant.goalId)
|
|
376
|
+
: undefined;
|
|
377
|
+
return {
|
|
378
|
+
...base,
|
|
379
|
+
unfinished,
|
|
380
|
+
startsConsumed,
|
|
381
|
+
attempt,
|
|
382
|
+
...(runEnded === undefined ? {} : { runEnded }),
|
|
383
|
+
...(publication === undefined ? {} : { publication }),
|
|
384
|
+
reconciliation,
|
|
385
|
+
...held,
|
|
386
|
+
...approval,
|
|
387
|
+
...loopSafety,
|
|
388
|
+
...programme,
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
/** Carry out the one action, and nothing beyond it. */
|
|
392
|
+
async function perform(deps, grant, action) {
|
|
393
|
+
switch (action.kind) {
|
|
394
|
+
case 'reserve-ordinal': {
|
|
395
|
+
// Racing daemons converge here through the exclusive receipt: one wins the
|
|
396
|
+
// ordinal, the other is told, and neither spends twice.
|
|
397
|
+
const out = await deps.autonomy.consumeStart(grant.controllerId, deps.now());
|
|
398
|
+
deps.log(out.ok
|
|
399
|
+
? `autonomy: reserved Start ${out.ordinal} of ${grant.maxStarts} for goal ${grant.goalId}.`
|
|
400
|
+
: `autonomy: could not reserve a Start — ${out.because}`);
|
|
401
|
+
return { action };
|
|
402
|
+
}
|
|
403
|
+
case 'execute-attempt': {
|
|
404
|
+
// SPEND THE TRY FIRST.
|
|
405
|
+
//
|
|
406
|
+
// Before the spawn, not after, and this ordering is the whole repair. The
|
|
407
|
+
// retry budget used to be derived from the receipt the CHILD writes at the
|
|
408
|
+
// admission seam, so a launch that died before reaching it — missing
|
|
409
|
+
// binary, argv the CLI rejects, EPERM on the state directory — left no
|
|
410
|
+
// trace and cost nothing. Measured: five hundred ticks, five hundred
|
|
411
|
+
// spawns, every one of them calling itself attempt 1.
|
|
412
|
+
//
|
|
413
|
+
// Losing the race is not a failure. It means another daemon reserved this
|
|
414
|
+
// exact try in the same instant; it spawns, we do not, and neither of us
|
|
415
|
+
// spent two.
|
|
416
|
+
/**
|
|
417
|
+
* ⚠️ A CHEAP PRE-CHECK, NOT THE GATE. THE GATE IS IN THE RUN.
|
|
418
|
+
*
|
|
419
|
+
* 🔴 IT USED TO RESERVE HERE, AND THAT WOULD HAVE DOUBLE-COUNTED EVERY
|
|
420
|
+
* START. The canonical admission is `runLoop`'s — the one thing a manual
|
|
421
|
+
* run, a daemon-spawned Start and a coordinator-placed goal all are — and
|
|
422
|
+
* a reservation taken here would be held AGAIN there, so one start held
|
|
423
|
+
* twice its estimate and the machine refused itself at half its ceiling.
|
|
424
|
+
*
|
|
425
|
+
* This READS and does not reserve. What it buys is that a start already
|
|
426
|
+
* obviously over the ceiling costs no spawn, no workspace and none of a
|
|
427
|
+
* small number of attempts. What it does NOT do is decide, because a
|
|
428
|
+
* decision taken here and acted on there is two policies pretending to be
|
|
429
|
+
* one.
|
|
430
|
+
*
|
|
431
|
+
* 🔴 THE MONEY CEILING ITSELF IS ENFORCED IN `runLoop`.
|
|
432
|
+
*
|
|
433
|
+
* `withinEnvelope` shipped fully specced with no production caller, and
|
|
434
|
+
* the spend ledger it needed was write-only: nothing anywhere read it, no
|
|
435
|
+
* config key could construct an `Envelope`, and `grep withinEnvelope(`
|
|
436
|
+
* returned one `export function` line and zero call sites. A budget over
|
|
437
|
+
* numbers nobody counts is theatre — `envelope.ts` says so in its own
|
|
438
|
+
* first paragraph, and was describing itself.
|
|
439
|
+
*
|
|
440
|
+
* ⚠️ HERE, BECAUSE THIS IS WHERE THE MACHINE SPENDS WITHOUT ASKING. It is
|
|
441
|
+
* the one seam that turns a decision into a detached child that will run
|
|
442
|
+
* for hours; everything upstream is reading files. `looply run` typed by
|
|
443
|
+
* a person is deliberately NOT bounded by it — that is not the machine
|
|
444
|
+
* spending on its own, and refusing there would break Simple Mode for a
|
|
445
|
+
* ceiling written about Autopilot.
|
|
446
|
+
*
|
|
447
|
+
* ⚠️ AND BEFORE THE TRY IS SPENT, NOT AFTER. `reserveLaunch` below burns
|
|
448
|
+
* one of a small number of attempts. A start refused for budget has not
|
|
449
|
+
* failed at anything and must not cost the pursuit a try.
|
|
450
|
+
*
|
|
451
|
+
* ⚠️ NO ENVELOPE, NO CHECK. Absent is what every existing project has,
|
|
452
|
+
* and it is bounded exactly as it was: by hours, rounds and the queue.
|
|
453
|
+
*/
|
|
454
|
+
const envelope = deps.envelope?.();
|
|
455
|
+
if (envelope !== undefined) {
|
|
456
|
+
/**
|
|
457
|
+
* ⚠️ THE SAME ASSUMPTION THE GATE USES, or the pre-check refuses
|
|
458
|
+
* things the gate would admit. The round path reports no cost at all;
|
|
459
|
+
* without the estimate to stand in for it, ONE round turn makes the
|
|
460
|
+
* window unmeasurable and this advisory check locks the machine out
|
|
461
|
+
* for the rest of the window — before the canonical gate is even
|
|
462
|
+
* consulted.
|
|
463
|
+
*/
|
|
464
|
+
const peek = (0, spend_ledger_1.peekEnvelope)(envelope, deps.runsInFlight?.() ?? 0, deps.now(), deps.home, deps.estimateUsd?.());
|
|
465
|
+
if (!peek.ok) {
|
|
466
|
+
deps.log(`autonomy: not starting — ${peek.because}.`);
|
|
467
|
+
return { action, started: { kind: 'blocked', reason: peek.because } };
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
const reserved = await deps.attempts.reserveLaunch(action.requestId, action.attempt);
|
|
471
|
+
if (!reserved.ok) {
|
|
472
|
+
deps.log(`autonomy: Start ${action.ordinal} attempt ${action.attempt} — ${reserved.because}.`);
|
|
473
|
+
return { action, started: { kind: 'blocked', reason: reserved.because } };
|
|
474
|
+
}
|
|
475
|
+
// ALWAYS RECORDED, even if asking throws.
|
|
476
|
+
//
|
|
477
|
+
// A launch with no spawn record beside it is the one genuinely unreadable
|
|
478
|
+
// state — it could be a daemon mid-spawn or a daemon that died between
|
|
479
|
+
// the two writes, and neither can be told from the other, so it waits.
|
|
480
|
+
// Leaving the gap open to an ordinary rejection between these two lines
|
|
481
|
+
// would make that stall reachable without anybody dying: the reserving
|
|
482
|
+
// daemon would then probe its OWN pid, find itself alive, and wait for
|
|
483
|
+
// ever on a spawn it already knows never happened.
|
|
484
|
+
// PROGRAMME MODE (M6-7): the controller let an `approved` decision through.
|
|
485
|
+
// The Start must carry that approval, reserved once through the same seam
|
|
486
|
+
// a person's Start uses; if it cannot be reserved now — revoked meanwhile,
|
|
487
|
+
// taken by another run, the checkout busy — nothing is spent and the tick
|
|
488
|
+
// holds with the reason. Read again here, not from the tick's facts: the
|
|
489
|
+
// gate is the server's word and a person may have changed it since.
|
|
490
|
+
let continuation = {};
|
|
491
|
+
if (action.fromDecision === true) {
|
|
492
|
+
if (deps.continueFrom === undefined || deps.approvalGate === undefined) {
|
|
493
|
+
const because = 'programme mode has no continuation seam on this machine';
|
|
494
|
+
deps.log(`autonomy: Start ${action.ordinal} attempt ${action.attempt} — ${because}; holding.`);
|
|
495
|
+
return { action: { kind: 'hold', because } };
|
|
496
|
+
}
|
|
497
|
+
const gate = await deps.approvalGate(grant);
|
|
498
|
+
continuation = await deps.continueFrom(gate, action.requestId, deps.workspaceFor?.(grant.goalId));
|
|
499
|
+
if (continuation.refuse !== undefined) {
|
|
500
|
+
deps.log(`autonomy: Start ${action.ordinal} attempt ${action.attempt} — the approved action could not be continued from: ${continuation.refuse.reason}; holding.`);
|
|
501
|
+
return { action: { kind: 'hold', because: continuation.refuse.reason } };
|
|
502
|
+
}
|
|
503
|
+
// Named from what the continuation hands back, never from the gate: this
|
|
504
|
+
// file learns THAT a decision was made, not which (approval-stop.e2e pins it).
|
|
505
|
+
const named = continuation.governedApprovalId ?? continuation.resumedFromApprovalId ?? '(unnamed)';
|
|
506
|
+
deps.log(`autonomy: Start ${action.ordinal} — continuing from approval ${named} without another tap (programme mode).`);
|
|
507
|
+
}
|
|
508
|
+
let started;
|
|
509
|
+
try {
|
|
510
|
+
started = await deps.starter.start({
|
|
511
|
+
requestId: action.requestId,
|
|
512
|
+
origin: {
|
|
513
|
+
kind: 'autonomy',
|
|
514
|
+
controllerId: grant.controllerId,
|
|
515
|
+
ordinal: action.ordinal,
|
|
516
|
+
attempt: action.attempt,
|
|
517
|
+
},
|
|
518
|
+
goalId: grant.goalId,
|
|
519
|
+
goalVersion: grant.goalVersion,
|
|
520
|
+
...(continuation.governedApprovalId === undefined ? {} : { governedApprovalId: continuation.governedApprovalId }),
|
|
521
|
+
...(continuation.resumedFromApprovalId === undefined
|
|
522
|
+
? {}
|
|
523
|
+
: { resumedFromApprovalId: continuation.resumedFromApprovalId }),
|
|
524
|
+
// Where the coordinator placed this goal. Absent keeps the launcher's
|
|
525
|
+
// single-checkout behaviour exactly as it was.
|
|
526
|
+
...(deps.workspaceFor?.(grant.goalId) === undefined
|
|
527
|
+
? {}
|
|
528
|
+
: { workspace: deps.workspaceFor(grant.goalId) }),
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
catch (e) {
|
|
532
|
+
await deps.attempts.noteSpawn(action.requestId, action.attempt, { spawned: false });
|
|
533
|
+
deps.log(`autonomy: Start ${action.ordinal} attempt ${action.attempt} — could not be asked for (${e.message}).`);
|
|
534
|
+
return { action, started: { kind: 'failed', reason: e.message } };
|
|
535
|
+
}
|
|
536
|
+
const result = (0, run_launcher_1.asStartResult)(started);
|
|
537
|
+
// WHETHER A CHILD EXISTS, written down the moment we are told.
|
|
538
|
+
//
|
|
539
|
+
// Without it, a spent try with no claim is unreadable: a spawn that
|
|
540
|
+
// failed outright and a child a millisecond from claiming look identical,
|
|
541
|
+
// and the difference decides between trying again and waiting.
|
|
542
|
+
//
|
|
543
|
+
// A PID IS THE ONLY HONEST EVIDENCE, and the first version of this asked
|
|
544
|
+
// the wrong question twice. It read `result.kind !== 'failed'`, but three
|
|
545
|
+
// of the launcher's exits are PRE-SPAWN — a lease clash, a live-child
|
|
546
|
+
// clash — and those report `blocked`, so a try that never created
|
|
547
|
+
// anything was recorded as having produced a child. And it looked for
|
|
548
|
+
// `started.pid`, which a run never has: a run is held to proof, so a
|
|
549
|
+
// successful spawn answers `waiting`, not `started`. So the field was
|
|
550
|
+
// always absent and the branch that exists to probe the child was dead.
|
|
551
|
+
//
|
|
552
|
+
// Together those turned R1's retry into a 24-hour stall: no claim, a
|
|
553
|
+
// spawn record claiming a child, and no pid to probe — which reads as
|
|
554
|
+
// unprobeable, and unprobeable waits.
|
|
555
|
+
const spawnedPid = started.started
|
|
556
|
+
? started.pid
|
|
557
|
+
: 'spawnedPid' in started
|
|
558
|
+
? started.spawnedPid
|
|
559
|
+
: undefined;
|
|
560
|
+
await deps.attempts.noteSpawn(action.requestId, action.attempt, {
|
|
561
|
+
spawned: spawnedPid !== undefined,
|
|
562
|
+
...(spawnedPid === undefined ? {} : { pid: spawnedPid }),
|
|
563
|
+
});
|
|
564
|
+
// Whatever came back, this tick is over. A `run-started` is not waited
|
|
565
|
+
// for — the mark holds the runId and a later tick reads it — and a
|
|
566
|
+
// `blocked` is not a failure to record, just somebody else's turn.
|
|
567
|
+
if (result.kind === 'run-started') {
|
|
568
|
+
await deps.autonomy.noteRun(grant.controllerId, action.ordinal, result.runId);
|
|
569
|
+
}
|
|
570
|
+
deps.log(`autonomy: Start ${action.ordinal} attempt ${action.attempt} — ${result.kind}.`);
|
|
571
|
+
return { action, started: result };
|
|
572
|
+
}
|
|
573
|
+
case 'finish-ordinal': {
|
|
574
|
+
await deps.autonomy.finishStart(grant.controllerId, action.ordinal);
|
|
575
|
+
deps.log(`autonomy: Start ${action.ordinal} is over.`);
|
|
576
|
+
return { action };
|
|
577
|
+
}
|
|
578
|
+
case 'terminal': {
|
|
579
|
+
// Local terminal truth, written durably, so a restarted daemon stops
|
|
580
|
+
// without needing the server to tell it again. Projecting it onward is
|
|
581
|
+
// 6D2F's job; stopping is this slice's.
|
|
582
|
+
await deps.autonomy.settle(grant.controllerId, action.state);
|
|
583
|
+
deps.log(`autonomy: ${grant.goalId} — ${action.state}: ${action.because}`);
|
|
584
|
+
return { action };
|
|
585
|
+
}
|
|
586
|
+
case 'accept-server-ending': {
|
|
587
|
+
// The same mark a successful report writes, for the same reason: this
|
|
588
|
+
// machine has nothing further to say about this pursuit. Reusing it is
|
|
589
|
+
// what makes the grant leave the live set and stop taking a turn.
|
|
590
|
+
await deps.autonomy.markProjected(grant.controllerId, new Date(deps.now()).toISOString());
|
|
591
|
+
deps.log(`autonomy: ${grant.goalId} — the server already knows it ended as ${action.state}.`);
|
|
592
|
+
return { action };
|
|
593
|
+
}
|
|
594
|
+
case 'project-terminal': {
|
|
595
|
+
const out = await deps.projectTerminal(grant, action.state, action.because);
|
|
596
|
+
if (out.ok) {
|
|
597
|
+
// Only after it got through. A crash between the report and this mark
|
|
598
|
+
// costs one repeated report, which the server answers idempotently;
|
|
599
|
+
// marking first would cost the report altogether.
|
|
600
|
+
await deps.autonomy.markProjected(grant.controllerId, new Date(deps.now()).toISOString());
|
|
601
|
+
}
|
|
602
|
+
deps.log(out.ok
|
|
603
|
+
? `autonomy: told the server ${grant.goalId} ended as ${action.state}.`
|
|
604
|
+
: `autonomy: could not report how ${grant.goalId} ended — ${out.because ?? 'no reason given'}`);
|
|
605
|
+
return { action };
|
|
606
|
+
}
|
|
607
|
+
case 'wait':
|
|
608
|
+
case 'hold':
|
|
609
|
+
return { action };
|
|
610
|
+
default: {
|
|
611
|
+
const never = action;
|
|
612
|
+
throw new Error(`no way to perform ${String(never)}`);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
//# sourceMappingURL=autonomy-tick.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autonomy-tick.js","sourceRoot":"","sources":["../src/autonomy-tick.ts"],"names":[],"mappings":";;;AAoOA,oCAgOC;AAncD,+DAK+B;AA+2BtB,mGAn3BP,wCAAkB,OAm3BO;AA92B3B,qDAAyF;AAIzF,iDAA8C;AAC9C,iDAAqG;AAiNrG;;;;;;GAMG;AACI,KAAK,UAAU,YAAY,CAAC,IAAsB;IACvD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACxC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACb,uEAAuE;QACvE,oDAAoD;QACpD,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,CAA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