looply-cli 0.0.0-stage → 0.3.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 +2727 -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/serve-cmd.d.ts +115 -0
- package/dist/serve-cmd.d.ts.map +1 -0
- package/dist/serve-cmd.js +505 -0
- package/dist/serve-cmd.js.map +1 -0
- package/dist/serve.d.ts +167 -0
- package/dist/serve.d.ts.map +1 -0
- package/dist/serve.js +336 -0
- package/dist/serve.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 +52 -4
- 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,78 @@
|
|
|
1
|
+
import type { Status } from '@looply/core';
|
|
2
|
+
import { type RecoveryGit } from './recovery';
|
|
3
|
+
import { type LeaseState } from './run-lease';
|
|
4
|
+
import type { AnyEventInput, LedgerFs } from './ledger-store';
|
|
5
|
+
/**
|
|
6
|
+
* What a previous run left behind, settled when the daemon starts.
|
|
7
|
+
*
|
|
8
|
+
* The classifier and its applier already existed and are not duplicated here.
|
|
9
|
+
* What was missing was a *caller*: `looply run` was the only thing that ever ran
|
|
10
|
+
* recovery, so a crashed run was repaired only when somebody started another
|
|
11
|
+
* one. That is precisely the state a crash leaves a person in — the phone shows
|
|
12
|
+
* a run already in progress and offers no Start — so the repair was gated behind
|
|
13
|
+
* the action the unrepaired state discourages. Meanwhile the daemon sat there
|
|
14
|
+
* polling commands every three seconds and shipping the ledger every five,
|
|
15
|
+
* walking past the evidence on every tick.
|
|
16
|
+
*
|
|
17
|
+
* The user-visible half is `run.ended` never being emitted: `status.json` still
|
|
18
|
+
* says `live`, the server's `Run.endedAt` stays null, and the project answers
|
|
19
|
+
* 409 to a delete for ever. Nothing heals that on its own.
|
|
20
|
+
*
|
|
21
|
+
* **This process holds no lease, and three separate safety properties in this
|
|
22
|
+
* codebase are derived from holding one.** That is what makes this delicate, and
|
|
23
|
+
* it is why the scope is narrower than `run-cmd`'s:
|
|
24
|
+
*
|
|
25
|
+
* 1. The queue has no cross-process write protection at all. `QueueStore.update`
|
|
26
|
+
* compares an in-memory version and `persist()` serialises the whole map, so
|
|
27
|
+
* two writers do not lose one item to each other — the later rename reverts
|
|
28
|
+
* the entire queue to its own snapshot. So this closes the run and never
|
|
29
|
+
* touches the queue; see `runClosureOnly`.
|
|
30
|
+
* 2. The classifier will happily requeue a *live* run's `in_progress` item if it
|
|
31
|
+
* is handed a null lease. `run-cmd` is saved from that only by ordering —
|
|
32
|
+
* `acquire()` throws between its classify and its apply. There is no acquire
|
|
33
|
+
* here, so the lease state is checked first and anything but `dead` stops.
|
|
34
|
+
* 3. Nothing removes the lease, which is the point of a lease that survives a
|
|
35
|
+
* daemon restart. So without an idempotence check a supervised daemon
|
|
36
|
+
* restarting five times would append five `run.ended` events and show the
|
|
37
|
+
* phone five recovery alerts for one crash.
|
|
38
|
+
*/
|
|
39
|
+
export interface StartupRecoveryDeps {
|
|
40
|
+
leases: {
|
|
41
|
+
inspect(): Promise<LeaseState>;
|
|
42
|
+
};
|
|
43
|
+
/** Three read-only methods. The driver has ten, and two of them write. */
|
|
44
|
+
git: RecoveryGit;
|
|
45
|
+
/** `open()` both enables `append` and hands back the projection this needs. */
|
|
46
|
+
ledger: {
|
|
47
|
+
open(): Promise<Status>;
|
|
48
|
+
append(input: AnyEventInput): Promise<unknown>;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Where that ledger lives, and how to read it — for the one question the
|
|
52
|
+
* projection cannot answer: whether THIS run already has an ending. See the
|
|
53
|
+
* idempotence check below.
|
|
54
|
+
*/
|
|
55
|
+
ledgerStateDir: string;
|
|
56
|
+
ledgerFs: Pick<LedgerFs, 'readFile'>;
|
|
57
|
+
projectId: string;
|
|
58
|
+
now(): number;
|
|
59
|
+
log(line: string): void;
|
|
60
|
+
}
|
|
61
|
+
export type StartupRecovery =
|
|
62
|
+
/** Nothing was done, and why. */
|
|
63
|
+
{
|
|
64
|
+
kind: 'idle';
|
|
65
|
+
reason: 'no-lease' | 'run-live' | 'already-closed' | 'undecidable';
|
|
66
|
+
}
|
|
67
|
+
/** A dead run was given an ending on the ledger. */
|
|
68
|
+
| {
|
|
69
|
+
kind: 'closed';
|
|
70
|
+
runId: string;
|
|
71
|
+
}
|
|
72
|
+
/** Something is here that cannot be proven safe to touch. Nothing was changed. */
|
|
73
|
+
| {
|
|
74
|
+
kind: 'blocked';
|
|
75
|
+
reason: string;
|
|
76
|
+
};
|
|
77
|
+
export declare function recoverStaleRunOnStartup(d: StartupRecoveryDeps): Promise<StartupRecovery>;
|
|
78
|
+
//# sourceMappingURL=daemon-recovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemon-recovery.d.ts","sourceRoot":"","sources":["../src/daemon-recov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B,GAAG,OAAO,CAAC,eAAe,CAAC,CA0J/F"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.recoverStaleRunOnStartup = recoverStaleRunOnStartup;
|
|
4
|
+
const recovery_1 = require("./recovery");
|
|
5
|
+
const goal_met_target_1 = require("./goal-met-target");
|
|
6
|
+
const recovery_io_1 = require("./recovery-io");
|
|
7
|
+
const run_lease_1 = require("./run-lease");
|
|
8
|
+
const run_ended_1 = require("./run-ended");
|
|
9
|
+
async function recoverStaleRunOnStartup(d) {
|
|
10
|
+
// The gate, and the only one. `run-cmd` folds `active` and `ambiguous` into a
|
|
11
|
+
// null lease and is saved from the consequences by `acquire()` throwing a few
|
|
12
|
+
// lines later. There is no acquire here, and the consequence is specific: with
|
|
13
|
+
// a null lease and a live run's `in_progress` item, the classifier returns a
|
|
14
|
+
// *requeue* for the item that run is holding right now. So this asks one
|
|
15
|
+
// question before it has looked at git or the queue at all.
|
|
16
|
+
const state = await d.leases.inspect();
|
|
17
|
+
if (state.kind === 'free')
|
|
18
|
+
return { kind: 'idle', reason: 'no-lease' };
|
|
19
|
+
if (state.kind === 'active') {
|
|
20
|
+
d.log(`daemon : ${(0, run_lease_1.describeLease)(state)} — leaving it alone.`);
|
|
21
|
+
return { kind: 'idle', reason: 'run-live' };
|
|
22
|
+
}
|
|
23
|
+
if (state.kind === 'ambiguous') {
|
|
24
|
+
// Fails closed, for the same reason `acquire` does: telling the phone that a
|
|
25
|
+
// healthy run crashed is worse than leaving a crashed one looking live.
|
|
26
|
+
d.log(`daemon : ${(0, run_lease_1.describeLease)(state)} — not recovering it.`);
|
|
27
|
+
return { kind: 'idle', reason: 'undecidable' };
|
|
28
|
+
}
|
|
29
|
+
let status;
|
|
30
|
+
try {
|
|
31
|
+
status = await d.ledger.open();
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
// A repair that cannot be performed must not stop the process that does the
|
|
35
|
+
// polling, the command dispatch and the shipping from starting at all. Every
|
|
36
|
+
// other store on this path is already total for the same reason — the cursor
|
|
37
|
+
// and the receipts both report "unreadable" rather than throwing — and an
|
|
38
|
+
// events.jsonl held open by an indexer or a scanner is an ordinary Windows
|
|
39
|
+
// condition, not a broken repository.
|
|
40
|
+
d.log(`daemon : could not read the ledger to check for a stale run — ${e.message}`);
|
|
41
|
+
return { kind: 'idle', reason: 'undecidable' };
|
|
42
|
+
}
|
|
43
|
+
// Only the run the lease names, and only once.
|
|
44
|
+
//
|
|
45
|
+
// Idempotence across restarts is the reason for the check: nothing removes
|
|
46
|
+
// the lease — that is what makes it survive one — so without it a daemon
|
|
47
|
+
// under a supervisor would append a `run.ended` and a recovery alert every
|
|
48
|
+
// time it came back, and the phone would show one banner per restart for one
|
|
49
|
+
// crash.
|
|
50
|
+
//
|
|
51
|
+
// 🔴 THE CHECK USED TO BE `status.live`, AND THAT LEFT ONE SHAPE UN-ENDED FOR
|
|
52
|
+
// EVER. `run.started` is emitted after the compile pass and both verify
|
|
53
|
+
// passes, so a run killed while its agent is working — which is most of a
|
|
54
|
+
// run's early life — has taken its lease, registered, and written NOTHING to
|
|
55
|
+
// its ledger. `status.live` is false for it, so this returned
|
|
56
|
+
// `already-closed`, wrote no ending, and the reasoning recorded here was
|
|
57
|
+
// "nothing local reads `live`". That stopped being true when the autonomous
|
|
58
|
+
// controller began waiting on `run.ended` to close a Start: such a run held
|
|
59
|
+
// its ordinal until the grant expired, in a single checkout as much as in a
|
|
60
|
+
// placed one.
|
|
61
|
+
//
|
|
62
|
+
// So the question is asked of the ledger directly: has THIS run already been
|
|
63
|
+
// given an ending? `readRunEnded` is the same reader the controller uses,
|
|
64
|
+
// and it is keyed on the run id rather than on the projection, so a run that
|
|
65
|
+
// never reached `run.started` is closed exactly once and then found closed.
|
|
66
|
+
//
|
|
67
|
+
// ⚠️ A DIFFERENT RUN LIVE ON THIS LEDGER IS STILL LEFT ALONE. A dead lease
|
|
68
|
+
// beside a ledger whose live run is somebody else is not a state this can
|
|
69
|
+
// reason about, and the old answer — do nothing — stands.
|
|
70
|
+
if (status.live && status.runId !== state.lease.runId) {
|
|
71
|
+
return { kind: 'idle', reason: 'already-closed' };
|
|
72
|
+
}
|
|
73
|
+
const ending = await (0, run_ended_1.readRunEnded)(d.ledgerStateDir, d.ledgerFs, state.lease.runId);
|
|
74
|
+
if (!ending.ok) {
|
|
75
|
+
d.log(`daemon : could not tell whether ${state.lease.runId} already ended — ${ending.because}`);
|
|
76
|
+
return { kind: 'idle', reason: 'undecidable' };
|
|
77
|
+
}
|
|
78
|
+
if (ending.ended)
|
|
79
|
+
return { kind: 'idle', reason: 'already-closed' };
|
|
80
|
+
let recovery;
|
|
81
|
+
try {
|
|
82
|
+
recovery = (0, recovery_1.classifyRecovery)({
|
|
83
|
+
lease: state.lease,
|
|
84
|
+
// Deliberately empty, and provably equivalent to reading queue.json here.
|
|
85
|
+
// `stranded` feeds exactly one thing in the classifier — the `items` list
|
|
86
|
+
// — and `runClosureOnly` discards that below; with a non-null lease the
|
|
87
|
+
// only other use, `nothingLeftBehind`, is false either way. So reading the
|
|
88
|
+
// queue would change no decision this function makes, while adding a
|
|
89
|
+
// failure mode (a zero-byte queue.json throws inside `JSON.parse`, and
|
|
90
|
+
// would abort a closure that never depended on it) and putting a
|
|
91
|
+
// QueueStore in a process that must never write one.
|
|
92
|
+
stranded: [],
|
|
93
|
+
changedPaths: await d.git.changedPaths(),
|
|
94
|
+
currentBranch: await d.git.currentBranch(),
|
|
95
|
+
headSubject: await d.git.messageOf('HEAD'),
|
|
96
|
+
// F33: a goal-met Start that moved HEAD and died left it here on purpose.
|
|
97
|
+
judging: (0, goal_met_target_1.readJudgingMarker)(d.ledgerStateDir),
|
|
98
|
+
...(d.git.headSha === undefined ? {} : { headSha: await d.git.headSha() }),
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
catch (e) {
|
|
102
|
+
// A tree we could not read is not a clean tree. `changedPaths` is the one
|
|
103
|
+
// piece of evidence that throws, and reading its failure as "nothing
|
|
104
|
+
// changed" is exactly the guess the dirty-tree rule exists to refuse.
|
|
105
|
+
d.log(`daemon : could not check what a previous run left behind — ${e.message}`);
|
|
106
|
+
return { kind: 'idle', reason: 'undecidable' };
|
|
107
|
+
}
|
|
108
|
+
if (recovery.kind === 'blocked') {
|
|
109
|
+
// Nothing is written — not the ledger, not the queue, not a ref. A person is
|
|
110
|
+
// told what was found and why it will not be guessed at. Deliberately not an
|
|
111
|
+
// alert on the phone: with nothing to dedupe on, a dirty tree would raise a
|
|
112
|
+
// fresh warning on every daemon start until somebody cleaned it up.
|
|
113
|
+
d.log(`recover : ${recovery.reason}`);
|
|
114
|
+
return { kind: 'blocked', reason: recovery.reason };
|
|
115
|
+
}
|
|
116
|
+
if (recovery.kind === 'none' || !recovery.closeRun) {
|
|
117
|
+
return { kind: 'idle', reason: 'no-lease' };
|
|
118
|
+
}
|
|
119
|
+
// Between the lease read at the top and here sit three git spawns, which is
|
|
120
|
+
// long enough for a `looply run` to have started, taken the lease, and run its
|
|
121
|
+
// own recovery on the same dead run. Re-read, and stop if anything moved.
|
|
122
|
+
//
|
|
123
|
+
// This narrows the window rather than closing it: two processes appending to
|
|
124
|
+
// one events.jsonl each hold their own in-memory seq counter, so a genuinely
|
|
125
|
+
// simultaneous close writes two lines with the same `(runId, seq)`. Ingest
|
|
126
|
+
// dedupes on exactly that pair, so the server keeps one — which is correct for
|
|
127
|
+
// the closure but means one of the two recovery *alerts* is discarded, and
|
|
128
|
+
// which one is decided by arrival order. Both describe the same crash; the
|
|
129
|
+
// run's is the more informative, because it can also say what it requeued.
|
|
130
|
+
// Recorded here rather than engineered around, because the alternative is a
|
|
131
|
+
// daemon-held lease and run-lease.ts explains at length why that is worse.
|
|
132
|
+
const now = await d.leases.inspect();
|
|
133
|
+
if (now.kind !== 'dead' || now.lease.token !== state.lease.token) {
|
|
134
|
+
return { kind: 'idle', reason: 'undecidable' };
|
|
135
|
+
}
|
|
136
|
+
// The closure half only, and the applier is given no queue — so if item
|
|
137
|
+
// repairs ever reached it, it would refuse rather than silently drop them.
|
|
138
|
+
await (0, recovery_io_1.applyRecovery)((0, recovery_1.runClosureOnly)(recovery), {
|
|
139
|
+
ledger: d.ledger,
|
|
140
|
+
// M5-5: read again at write time — the check above and this write are
|
|
141
|
+
// moments apart, and another process may close the same run between them.
|
|
142
|
+
alreadyEnded: async (runId) => {
|
|
143
|
+
const ended = await (0, run_ended_1.readRunEnded)(d.ledgerStateDir, d.ledgerFs, runId);
|
|
144
|
+
return ended.ok ? ended.ended : null;
|
|
145
|
+
},
|
|
146
|
+
projectId: d.projectId,
|
|
147
|
+
now: d.now,
|
|
148
|
+
log: d.log,
|
|
149
|
+
});
|
|
150
|
+
// The lease is left exactly where it is. Deleting it is sanctioned in
|
|
151
|
+
// principle — `acquire` does it — but it is this tree's ownership token and
|
|
152
|
+
// the only file a starting run and this process could ever contend over;
|
|
153
|
+
// leaving it alone is what makes "the daemon takes no ownership" literally
|
|
154
|
+
// true rather than approximately true. It is also `run-cmd`'s input to the
|
|
155
|
+
// branch-divergence check, which nothing here replaces. The cost is one
|
|
156
|
+
// duplicate `run.ended` if a run is later started by hand, and that is
|
|
157
|
+
// harmless at every reader: ingest guards its Run row on `endedAt: null`, and
|
|
158
|
+
// the local fold is idempotent assignment.
|
|
159
|
+
return { kind: 'closed', runId: recovery.closeRun };
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=daemon-recovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemon-recovery.js","sourceRoot":"","sources":["../src/daemon-recovery.ts"],"names":[],"mappings":";;AAqEA,4DA0JC;AA9ND,yCAA+F;AAC/F,uDAAsD;AACtD,+CAA8C;AAC9C,2CAA6D;AAE7D,2CAA2C;AA+DpC,KAAK,UAAU,wBAAwB,CAAC,CAAsB;IACnE,8EAA8E;IAC9E,8EAA8E;IAC9E,+EAA+E;IAC/E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,0 +1,368 @@
|
|
|
1
|
+
import type { AnyEvent, Goal } from '@looply/core';
|
|
2
|
+
import { type ServerClient, type ServerCommand } from './server-client';
|
|
3
|
+
/**
|
|
4
|
+
* The daemon.
|
|
5
|
+
*
|
|
6
|
+
* Long-lived and idle-but-connected, because pairing happens before any run
|
|
7
|
+
* exists and runs are started from a phone. That is the departure from the
|
|
8
|
+
* harness this replaces, which was a script that existed only while it worked.
|
|
9
|
+
*
|
|
10
|
+
* Two jobs, one loop: prove the machine is alive, and ship the ledger. Both are
|
|
11
|
+
* best-effort by design — the server being unreachable degrades looply to a loop
|
|
12
|
+
* that works locally and reports late, which is exactly what it should degrade
|
|
13
|
+
* to and never worse.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* What became of a command the daemon was handed.
|
|
17
|
+
*
|
|
18
|
+
* - `done` — carried out. Acked; never handed over again.
|
|
19
|
+
* - `refused` — this build will never carry this verb out. Also terminal, and
|
|
20
|
+
* that is the point: leaving it unacked would have the server offer it again
|
|
21
|
+
* every three seconds for the life of the machine.
|
|
22
|
+
* - `retry` — could not be carried out *now* (no launcher, a spawn that failed,
|
|
23
|
+
* a control file that would not write). Left unacked deliberately, so the
|
|
24
|
+
* next poll offers it again.
|
|
25
|
+
*
|
|
26
|
+
* This used to be a boolean, and the false branch was documented as "comes back
|
|
27
|
+
* on the next poll". It did not: delivery was a destructive pop with nothing
|
|
28
|
+
* putting ids back, so anything not acked was lost outright.
|
|
29
|
+
*/
|
|
30
|
+
export type CommandDisposition = 'done' | 'refused' | 'retry';
|
|
31
|
+
/**
|
|
32
|
+
* What a handler decided, and — for a refusal — why.
|
|
33
|
+
*
|
|
34
|
+
* The reason rides ONLY on the refused shape, deliberately. A `done` command
|
|
35
|
+
* has nothing to explain and a `retry` is not an answer yet, so making either
|
|
36
|
+
* of them carry a reason would be making an unreachable state representable —
|
|
37
|
+
* and the one bug this shape exists to prevent is a stale explanation arriving
|
|
38
|
+
* attached to a success.
|
|
39
|
+
*
|
|
40
|
+
* A bare disposition still means what it always did, so every handler that has
|
|
41
|
+
* nothing to add keeps returning one.
|
|
42
|
+
*/
|
|
43
|
+
export type CommandDecision = CommandDisposition | {
|
|
44
|
+
disposition: 'refused';
|
|
45
|
+
reason: string;
|
|
46
|
+
};
|
|
47
|
+
export type CommandHandler = (command: ServerCommand) => Promise<boolean | CommandDecision>;
|
|
48
|
+
/** What the loop acts on: one disposition, and a reason only a refusal may have. */
|
|
49
|
+
export interface DecidedCommand {
|
|
50
|
+
disposition: CommandDisposition;
|
|
51
|
+
reason?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface DaemonDeps {
|
|
54
|
+
client: ServerClient;
|
|
55
|
+
machineId: string;
|
|
56
|
+
projectId: string;
|
|
57
|
+
cliVersion: string;
|
|
58
|
+
/** Omit and commands are left on the server for a daemon that can act on them. */
|
|
59
|
+
onCommand?: CommandHandler;
|
|
60
|
+
/** How often to ask for commands the phone has queued. */
|
|
61
|
+
commandPollMs?: number;
|
|
62
|
+
/** Refresh presence at a third of the TTL, so one missed beat is survivable. */
|
|
63
|
+
heartbeatMs?: number;
|
|
64
|
+
/** How often the buffered ledger is shipped. */
|
|
65
|
+
flushMs?: number;
|
|
66
|
+
/** Ceiling on events held for an absent server; see `DEFAULT_BUFFER_LIMIT`. */
|
|
67
|
+
bufferLimit?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Where the confirmed-delivery cursor lives, when this process owns one.
|
|
70
|
+
*
|
|
71
|
+
* Only the standalone daemon passes it. A run's own attached sync daemon
|
|
72
|
+
* deliberately does not: two processes advancing one cursor file would each
|
|
73
|
+
* overwrite the other's view of a run they cannot see, and the run's own
|
|
74
|
+
* events are replayed by the daemon anyway if the run dies before shipping.
|
|
75
|
+
*/
|
|
76
|
+
cursors?: {
|
|
77
|
+
all(): Record<string, number>;
|
|
78
|
+
advance(next: Record<string, number>): Promise<void>;
|
|
79
|
+
};
|
|
80
|
+
/** Reads the ledger and hands the uploader whatever the cursor does not cover. */
|
|
81
|
+
replay?(sink: {
|
|
82
|
+
enqueue(e: AnyEvent): void;
|
|
83
|
+
durableHead(runId: string): number;
|
|
84
|
+
}): Promise<{
|
|
85
|
+
replayed: number;
|
|
86
|
+
damaged: number;
|
|
87
|
+
/**
|
|
88
|
+
* Lines that are events this build has no name for. Declared here as well
|
|
89
|
+
* as on `ReplayResult` because THIS type is what the daemon actually reads,
|
|
90
|
+
* and a field a structural type does not name is a field the daemon cannot
|
|
91
|
+
* say — which is how a counted fact goes unsaid (§5 item 41).
|
|
92
|
+
*/
|
|
93
|
+
fromNewerBuild?: number;
|
|
94
|
+
}>;
|
|
95
|
+
/**
|
|
96
|
+
* Where the server's goals are mirrored, when this process owns the mirror.
|
|
97
|
+
*
|
|
98
|
+
* Only the standalone daemon passes it. These stores rewrite the whole file
|
|
99
|
+
* from their own in-memory map, so a second writer does not race a row — it
|
|
100
|
+
* reverts the file to its own snapshot. One writer, and this is it.
|
|
101
|
+
*/
|
|
102
|
+
goals?: {
|
|
103
|
+
replace(goals: readonly Goal[]): Promise<void>;
|
|
104
|
+
};
|
|
105
|
+
/** How often the goal mirror is refreshed. */
|
|
106
|
+
goalPollMs?: number;
|
|
107
|
+
/**
|
|
108
|
+
* Close out a run that died without writing its own ending.
|
|
109
|
+
*
|
|
110
|
+
* Supplied only by the standalone daemon, and IN THE LOOP rather than only at
|
|
111
|
+
* startup — which is where it used to live, and only there.
|
|
112
|
+
*
|
|
113
|
+
* That was sufficient while nothing waited on a run: a person taps Start,
|
|
114
|
+
* and if the last run had been killed the next daemon start tidied it up. It
|
|
115
|
+
* stops being sufficient the moment anything waits for `run.ended`, because a
|
|
116
|
+
* SIGKILLed run never writes one. A daemon that stays up for a week would
|
|
117
|
+
* leave that run un-ended for a week, and anything waiting on it would wait
|
|
118
|
+
* for ever.
|
|
119
|
+
*
|
|
120
|
+
* Idempotent by its own contract: it inspects the lease, and answers `idle`
|
|
121
|
+
* when there is nothing to do, when the run is live, or when the ending is
|
|
122
|
+
* already written. Calling it on a tick is therefore free in the common case.
|
|
123
|
+
*/
|
|
124
|
+
recoverStaleRun?(): Promise<void>;
|
|
125
|
+
/**
|
|
126
|
+
* One autonomy transition for at most one controller.
|
|
127
|
+
*
|
|
128
|
+
* Optional like every other job here: a daemon with no autonomy wiring simply
|
|
129
|
+
* never continues a goal by itself, which is the safe absence rather than a
|
|
130
|
+
* failure. See autonomy-tick.ts.
|
|
131
|
+
*/
|
|
132
|
+
autonomyTick?(): Promise<void>;
|
|
133
|
+
/**
|
|
134
|
+
* The coordinator's turn, when a project has one.
|
|
135
|
+
*
|
|
136
|
+
* ⚠️ AN ENTRY, NOT A PROCESS. This loop is already deterministic and
|
|
137
|
+
* single-threaded with pluggable jobs and `tick = min(all cadences)`; the
|
|
138
|
+
* coordinator is one more of them. Its errors are caught exactly like every
|
|
139
|
+
* other job's, so a coordinator that throws cannot reject the loop — which is
|
|
140
|
+
* the property that lets a scheduler be added to a daemon people rely on.
|
|
141
|
+
*
|
|
142
|
+
* ⚠️ AND IT IS OPTIONAL, so a machine that has never configured capacity has
|
|
143
|
+
* no coordinator at all and behaves exactly as it does today.
|
|
144
|
+
*/
|
|
145
|
+
coordinatorTick?(): Promise<void>;
|
|
146
|
+
/** How often to give the controller a turn. */
|
|
147
|
+
autonomyPollMs?: number;
|
|
148
|
+
/** How often that check runs. Slow: it exists for a rare, durable condition. */
|
|
149
|
+
stalePollMs?: number;
|
|
150
|
+
log(line: string): void;
|
|
151
|
+
sleep(ms: number): Promise<void>;
|
|
152
|
+
now(): number;
|
|
153
|
+
/** Polled between ticks; true once a stop was requested. */
|
|
154
|
+
stopRequested?(): boolean;
|
|
155
|
+
}
|
|
156
|
+
export declare const DEFAULT_HEARTBEAT_MS = 15000;
|
|
157
|
+
/**
|
|
158
|
+
* Bounds on a cadence the SERVER proposes.
|
|
159
|
+
*
|
|
160
|
+
* The floor stops a malformed or hostile `refreshS` turning the loop into a
|
|
161
|
+
* spin — `tick` is the MINIMUM of every cadence, so a zero here would busy-wait
|
|
162
|
+
* the whole daemon, not just the heartbeat. The ceiling is a sanity limit; a
|
|
163
|
+
* server that wants an hour between beats has almost certainly sent nonsense.
|
|
164
|
+
*/
|
|
165
|
+
export declare const MIN_HEARTBEAT_MS = 2000;
|
|
166
|
+
export declare const MAX_HEARTBEAT_MS = 300000;
|
|
167
|
+
/**
|
|
168
|
+
* How often to beat: what the operator configured, else what the server asked
|
|
169
|
+
* for, else the built-in default.
|
|
170
|
+
*
|
|
171
|
+
* 🔴 THE SERVER PUBLISHES THIS CADENCE ON PURPOSE AND NOTHING WAS READING IT.
|
|
172
|
+
* `MachinesService.heartbeat` returns `{ ttlS, refreshS }` and says why in its
|
|
173
|
+
* own words: "the cadence is server-owned, so tuning the TTL never requires
|
|
174
|
+
* shipping a new CLI." That property was FALSE. The daemon paced on
|
|
175
|
+
* `DEFAULT_HEARTBEAT_MS` and discarded the response — it could not have used
|
|
176
|
+
* `refreshS`, because `ServerClient` typed the reply `{ ok, nextBeatS? }` and
|
|
177
|
+
* BOTH of those fields were invented. Found by driving the real client against
|
|
178
|
+
* a real server (`daemon-client-flagship.e2e.spec.ts`).
|
|
179
|
+
*
|
|
180
|
+
* ⚠️ TODAY THIS CHANGES NOTHING, AND THAT IS THE UNCOMFORTABLE PART. The server
|
|
181
|
+
* says `PRESENCE_REFRESH_S = 15` and this file said `15_000`, so the two agreed
|
|
182
|
+
* — by coincidence, as two hardcoded constants written independently in two
|
|
183
|
+
* trees. The failure was asymmetric and waiting: RAISING the server's TTL is
|
|
184
|
+
* harmless, but LOWERING it (say to 21s, refresh 7s) leaves a CLI beating every
|
|
185
|
+
* 15s against a 21s window, and every machine in the fleet flickers offline for
|
|
186
|
+
* a reason nothing in the CLI could explain.
|
|
187
|
+
*
|
|
188
|
+
* The operator's own `--heartbeat-ms` still wins: a person who pinned a cadence
|
|
189
|
+
* on this machine outranks a suggestion from the other end of the wire.
|
|
190
|
+
*/
|
|
191
|
+
export declare function heartbeatCadenceMs(configured: number | undefined, serverRefreshS: number | null | undefined): number;
|
|
192
|
+
export declare const DEFAULT_FLUSH_MS = 5000;
|
|
193
|
+
/** Fast enough that a tap on a phone feels immediate, slow enough to be free. */
|
|
194
|
+
export declare const DEFAULT_COMMAND_POLL_MS = 3000;
|
|
195
|
+
/**
|
|
196
|
+
* Goal intent changes when a person types, not when the loop runs, so this is
|
|
197
|
+
* slow on purpose. Nothing reads the mirror in this phase; refreshing it faster
|
|
198
|
+
* would spend requests on a file with no consumer.
|
|
199
|
+
*/
|
|
200
|
+
export declare const DEFAULT_GOAL_POLL_MS = 30000;
|
|
201
|
+
/**
|
|
202
|
+
* How often a dead run is looked for.
|
|
203
|
+
*
|
|
204
|
+
* Slow on purpose. It reads a lease file and, at most, writes one ending for a
|
|
205
|
+
* process that is already gone — there is nothing to be gained by asking often,
|
|
206
|
+
* and a run that ends normally writes its own ending within milliseconds. The
|
|
207
|
+
* cost of being late is that something waiting on a CRASHED run waits up to
|
|
208
|
+
* this long, which is a minute, once, for a case that should be rare.
|
|
209
|
+
*/
|
|
210
|
+
export declare const DEFAULT_STALE_POLL_MS = 60000;
|
|
211
|
+
/**
|
|
212
|
+
* How often a controller gets a turn.
|
|
213
|
+
*
|
|
214
|
+
* Ten seconds, chosen against the cadences already here rather than picked: the
|
|
215
|
+
* command poll is 3s because a person is waiting for their tap to land, the
|
|
216
|
+
* heartbeat 15s, the goal pull 30s, the stale sweep 60s. Nobody is waiting on
|
|
217
|
+
* an autonomous Start — the person authorized it and went to bed — so it sits
|
|
218
|
+
* between the ones that serve a live tap and the ones that sweep.
|
|
219
|
+
*
|
|
220
|
+
* It also bounds the cost of the one thing a tick can do that is not free. A
|
|
221
|
+
* tick that launches a Start waits for the child's settle window (750ms) before
|
|
222
|
+
* returning, so at this cadence the controller can occupy at most about seven
|
|
223
|
+
* per cent of one daemon's time, and only on the ticks that actually launch.
|
|
224
|
+
*/
|
|
225
|
+
export declare const DEFAULT_AUTONOMY_POLL_MS = 10000;
|
|
226
|
+
export interface DaemonStatus {
|
|
227
|
+
online: boolean;
|
|
228
|
+
lastBeatAt: number | null;
|
|
229
|
+
/** Consecutive failures. Reported so a long outage is visible, not guessed at. */
|
|
230
|
+
missedBeats: number;
|
|
231
|
+
buffered: number;
|
|
232
|
+
delivered: number;
|
|
233
|
+
/** Events the buffer cap threw away. Non-zero means the mirror has a gap. */
|
|
234
|
+
dropped: number;
|
|
235
|
+
/** Events the server took without accounting for. Non-zero means it kept fewer than it was sent. */
|
|
236
|
+
unacked: number;
|
|
237
|
+
}
|
|
238
|
+
export declare class Daemon {
|
|
239
|
+
private readonly deps;
|
|
240
|
+
private readonly uploader;
|
|
241
|
+
private running;
|
|
242
|
+
private online;
|
|
243
|
+
private lastBeatAt;
|
|
244
|
+
private missedBeats;
|
|
245
|
+
private delivered;
|
|
246
|
+
/** Whether the server-kept-fewer-than-it-was-sent line has been said. */
|
|
247
|
+
private unackedReported;
|
|
248
|
+
/** Commands already reported as left-queued, so a retry loop says so once. */
|
|
249
|
+
private readonly retried;
|
|
250
|
+
/**
|
|
251
|
+
* Whether the current outage has been mentioned.
|
|
252
|
+
*
|
|
253
|
+
* Not `online`, which starts false: keying the message off a true→false
|
|
254
|
+
* transition means a daemon that never connects in the first place says
|
|
255
|
+
* nothing at all, which is the one case where the user most needs telling.
|
|
256
|
+
*/
|
|
257
|
+
private outageReported;
|
|
258
|
+
/**
|
|
259
|
+
* The refresh interval the server last asked for, in seconds; null until a
|
|
260
|
+
* heartbeat has succeeded. Read through `heartbeatCadenceMs`, never directly.
|
|
261
|
+
*/
|
|
262
|
+
private serverRefreshS;
|
|
263
|
+
/** Set when the server refuses the credential; retrying cannot fix that. */
|
|
264
|
+
private revoked;
|
|
265
|
+
/** Whether the buffer overflow has been mentioned; see `enqueue`. */
|
|
266
|
+
private overflowReported;
|
|
267
|
+
/** Whether the catching-up line has been said for the current backlog. */
|
|
268
|
+
private replayReported;
|
|
269
|
+
/** Whether the ledger-unreadable line has been said for the current outage. */
|
|
270
|
+
private replayFailureReported;
|
|
271
|
+
private goalFailureReported;
|
|
272
|
+
constructor(deps: DaemonDeps);
|
|
273
|
+
/** Queue an event for the next flush. Called from the ledger append path. */
|
|
274
|
+
enqueue(event: AnyEvent): void;
|
|
275
|
+
/**
|
|
276
|
+
* Hand the uploader whatever the ledger holds and the cursor does not cover.
|
|
277
|
+
*
|
|
278
|
+
* Asked on every flush tick, not once. This used to latch itself off the
|
|
279
|
+
* first time a pass found nothing to send — and the ordinary case is that the
|
|
280
|
+
* very first pass finds nothing, because the daemon is started before any run
|
|
281
|
+
* exists. So it replayed zero on its first tick, closed the latch, and never
|
|
282
|
+
* looked at the ledger again for the rest of its life. A run that died an
|
|
283
|
+
* hour later left its tail on disk with nothing that would ever look at it:
|
|
284
|
+
* exactly the failure replay was written to close, put back by the
|
|
285
|
+
* optimisation meant to make replay cheap.
|
|
286
|
+
*
|
|
287
|
+
* **"Nothing to send now" and "nothing will ever need sending again" are not
|
|
288
|
+
* the same statement, and only the first is something a pass can prove.**
|
|
289
|
+
*
|
|
290
|
+
* Being cheap is the supplier's job, not this method's — `makeLedgerReplay`
|
|
291
|
+
* skips the read entirely while the ledger cannot have grown, which costs a
|
|
292
|
+
* stat rather than a parse of the whole file.
|
|
293
|
+
*/
|
|
294
|
+
private replayOnce;
|
|
295
|
+
/** Revocation is terminal: retrying a revoked token cannot ever succeed. */
|
|
296
|
+
private markRevoked;
|
|
297
|
+
status(): DaemonStatus;
|
|
298
|
+
/**
|
|
299
|
+
* One heartbeat.
|
|
300
|
+
*
|
|
301
|
+
* Presence is a TTL key on the server, so missing a beat is what makes a
|
|
302
|
+
* machine read as offline. A failure here is logged once on the transition
|
|
303
|
+
* rather than every tick — an hour offline should not be an hour of identical
|
|
304
|
+
* log lines nobody reads.
|
|
305
|
+
*/
|
|
306
|
+
beat(): Promise<boolean>;
|
|
307
|
+
/**
|
|
308
|
+
* Give a dead run its ending, if one is owed.
|
|
309
|
+
*
|
|
310
|
+
* Never throws into the loop. A recovery that failed will be tried again on
|
|
311
|
+
* the next sweep, and a daemon that died over a lease file it could not read
|
|
312
|
+
* would have turned a recoverable condition into an outage.
|
|
313
|
+
*/
|
|
314
|
+
/**
|
|
315
|
+
* Give the controller one turn.
|
|
316
|
+
*
|
|
317
|
+
* Errors are logged and swallowed, exactly as the stale sweep's are: this
|
|
318
|
+
* would otherwise be the first job in the loop capable of rejecting
|
|
319
|
+
* `Daemon.run()`, and a daemon that dies because one grant's record was
|
|
320
|
+
* briefly unreadable would take the heartbeat, the command poll and every
|
|
321
|
+
* other project's work down with it.
|
|
322
|
+
*
|
|
323
|
+
* There is no retry here. The next cadence is the retry, and a tight catch
|
|
324
|
+
* loop would turn a server outage into a spin.
|
|
325
|
+
*/
|
|
326
|
+
private runAutonomyTick;
|
|
327
|
+
/** See {@link DaemonDeps.coordinatorTick}. Caught like every other job. */
|
|
328
|
+
private runCoordinatorTick;
|
|
329
|
+
private sweepStaleRun;
|
|
330
|
+
/**
|
|
331
|
+
* Refresh the local copy of the server's goals.
|
|
332
|
+
*
|
|
333
|
+
* Strictly a mirror: read the server's answer, write it down, and nothing
|
|
334
|
+
* else. It does not touch the queue, it does not start a run, and it does not
|
|
335
|
+
* call an agent — a goal is not read to decide what to do until a later phase,
|
|
336
|
+
* and this method existing is not that phase beginning.
|
|
337
|
+
*
|
|
338
|
+
* A failure keeps whatever the mirror already holds. Erasing a good copy
|
|
339
|
+
* because the server is briefly away would make an outage worse than it is,
|
|
340
|
+
* and the file's whole purpose is to be the answer when the server is not
|
|
341
|
+
* there to give one. Offline is already reported by the heartbeat, so this
|
|
342
|
+
* says nothing per tick.
|
|
343
|
+
*/
|
|
344
|
+
pullGoals(): Promise<number | null>;
|
|
345
|
+
/** Report a goal-refresh failure once per outage, not once per tick. */
|
|
346
|
+
private reportGoalFailure;
|
|
347
|
+
/**
|
|
348
|
+
* Collect and carry out whatever the phone queued.
|
|
349
|
+
*
|
|
350
|
+
* A command is acked only once the handler says it was carried out. Acking on
|
|
351
|
+
* receipt would mean a command lost to a crash between pop and execution is
|
|
352
|
+
* gone forever, and the person who tapped Stop would never learn it did not
|
|
353
|
+
* happen.
|
|
354
|
+
*/
|
|
355
|
+
pollCommands(): Promise<number>;
|
|
356
|
+
/** Ship whatever is buffered. Retained on failure; never dropped. */
|
|
357
|
+
flush(): Promise<void>;
|
|
358
|
+
/**
|
|
359
|
+
* Run until stopped.
|
|
360
|
+
*
|
|
361
|
+
* Heartbeat and flush share one clock rather than running two timers, so a
|
|
362
|
+
* slow server cannot let them drift into overlapping and doubling the load on
|
|
363
|
+
* a machine that is already struggling to reach it.
|
|
364
|
+
*/
|
|
365
|
+
run(): Promise<DaemonStatus>;
|
|
366
|
+
stop(): void;
|
|
367
|
+
}
|
|
368
|
+
//# sourceMappingURL=daemon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../src/daemon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAe,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErF;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,eAAe,GAAG,kBAAkB,GAAG;IAAE,WAAW,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9F,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,GAAG,eAAe,CAAC,CAAC;AAE5F,oFAAoF;AACpF,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,kBAAkB,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAUD,M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