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,327 @@
|
|
|
1
|
+
import { type GoalAutonomyState } from '@looply/core';
|
|
2
|
+
import { type LedgerFs } from './ledger-store';
|
|
3
|
+
/**
|
|
4
|
+
* WHAT THIS MACHINE HAS SPENT OF A GRANT.
|
|
5
|
+
*
|
|
6
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
7
|
+
* THE COUNT IS NOT A NUMBER IN A FILE. IT IS A PILE OF RECEIPTS.
|
|
8
|
+
*
|
|
9
|
+
* 6D1R-C. Spending used to be read-then-write on `startsConsumed`: read 3,
|
|
10
|
+
* add one, write 4. Two daemons for one project are possible -- nothing takes
|
|
11
|
+
* a lock at daemon startup, which was verified rather than assumed -- and two
|
|
12
|
+
* of them reading 3 both write 4. One Start's worth of budget, two Starts
|
|
13
|
+
* issued, and the file afterwards is perfectly well-formed and says 4. There
|
|
14
|
+
* is no later moment at which anything could notice.
|
|
15
|
+
*
|
|
16
|
+
* So an ordinal is now RESERVED rather than counted: one file per Start,
|
|
17
|
+
* created with O_EXCL, which the operating system will hand to exactly one
|
|
18
|
+
* caller. The loser of that race gets EEXIST, moves to the next ordinal and
|
|
19
|
+
* takes that one instead. Both callers end up with a distinct Start and the
|
|
20
|
+
* total spent is still the number of files, which nobody can lose an update
|
|
21
|
+
* to because nobody ever updates anything.
|
|
22
|
+
*
|
|
23
|
+
* `startsConsumed` is DERIVED from the receipts. Storing it as well would
|
|
24
|
+
* recreate the same defect one indirection down: two sources for one fact,
|
|
25
|
+
* disagreeing the first time a write was lost.
|
|
26
|
+
*
|
|
27
|
+
* At most one Start at a time is a separate invariant, and the RUN LEASE is
|
|
28
|
+
* what holds it -- also O_EXCL, also structural. The check here is a cheap
|
|
29
|
+
* early refusal, not the guard. Two daemons that both reserve an ordinal
|
|
30
|
+
* produce one run and one refusal, and the refused one has spent a Start,
|
|
31
|
+
* which is the direction this file always errs in.
|
|
32
|
+
*
|
|
33
|
+
* The server owns AUTHORIZATION — who may pursue which goal at which version,
|
|
34
|
+
* with what ceiling, until when. This owns EXECUTION PROGRESS: how many bounded
|
|
35
|
+
* Starts have actually been spent here, and which one is in flight.
|
|
36
|
+
*
|
|
37
|
+
* One fact, one writer. A `startsConsumed` column on the server would be a
|
|
38
|
+
* counter written from both sides, and the two would disagree the first time a
|
|
39
|
+
* machine spent a Start while offline.
|
|
40
|
+
*
|
|
41
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
42
|
+
* WHY NOT ANY EXISTING FILE
|
|
43
|
+
*
|
|
44
|
+
* `queue.json` — two processes write it without holding the run lease
|
|
45
|
+
* (`scan-cmd`, `verify-cmd`), each rewriting the whole list from a map filled at
|
|
46
|
+
* open. A stale writer would revert a budget, and reverting a budget REFILLS it.
|
|
47
|
+
*
|
|
48
|
+
* `goals.json` — the format is `{ schema, goals }` and nothing else survives a
|
|
49
|
+
* write. Not a race: a field that is not a goal is erased by the file's shape,
|
|
50
|
+
* on every write, from two processes.
|
|
51
|
+
*
|
|
52
|
+
* `control.json` — consumed unconditionally at the start of every run, on the
|
|
53
|
+
* reasoning that "starting a run is itself the human saying go". Right for a
|
|
54
|
+
* pause; fatal for a grant, which must outlive the runs it authorizes.
|
|
55
|
+
*
|
|
56
|
+
* The command row — deliberately time-boxed to the one-hour redelivery window,
|
|
57
|
+
* precisely so that an old command cannot be reinterpreted as a standing
|
|
58
|
+
* permission.
|
|
59
|
+
*
|
|
60
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
61
|
+
* FAILS CLOSED, WHICH IS THE WHOLE POINT
|
|
62
|
+
*
|
|
63
|
+
* A missing or unreadable file does NOT mean "nothing has been spent". It means
|
|
64
|
+
* this machine cannot say what it has spent, and a budget it cannot account for
|
|
65
|
+
* is a budget it may not draw on. Every other store here discards a corrupt
|
|
66
|
+
* file and carries on, because every other store holds a cache of something
|
|
67
|
+
* recoverable. This one holds the only record of what was already permitted and
|
|
68
|
+
* used, so the same policy would silently refill the budget on any corruption —
|
|
69
|
+
* turning a damaged file into unlimited Starts.
|
|
70
|
+
*/
|
|
71
|
+
/**
|
|
72
|
+
* Bumped only when the on-disk shape changes incompatibly. Read, not decorative.
|
|
73
|
+
*
|
|
74
|
+
* 2 dropped `startsConsumed` and `inFlight` from the file, because both are now
|
|
75
|
+
* derived from receipts. A schema-1 file is REFUSED rather than migrated: its
|
|
76
|
+
* count is a number this build has no receipts for, and inventing receipts to
|
|
77
|
+
* match it would be inventing the very evidence the receipts exist to be.
|
|
78
|
+
*/
|
|
79
|
+
export declare const AUTONOMY_STORE_SCHEMA = 2;
|
|
80
|
+
/**
|
|
81
|
+
* The TERMS of a grant, as this machine holds them. No count.
|
|
82
|
+
*
|
|
83
|
+
* Everything here was stamped by the server and is immutable for the life of
|
|
84
|
+
* the grant, except `state`, which is where this machine records that the
|
|
85
|
+
* pursuit came to rest.
|
|
86
|
+
*/
|
|
87
|
+
export interface AutonomyProgress {
|
|
88
|
+
controllerId: string;
|
|
89
|
+
goalId: string;
|
|
90
|
+
/** The version this grant is for. A grant never follows a goal to a new one. */
|
|
91
|
+
goalVersion: number;
|
|
92
|
+
/** The ceiling the SERVER stamped. Copied here so an offline machine still has a bound. */
|
|
93
|
+
maxStarts: number;
|
|
94
|
+
/** ISO. The absolute end, whatever is left of the count. */
|
|
95
|
+
expiresAt: string;
|
|
96
|
+
/** What this machine believes the grant has come to. The server is told separately. */
|
|
97
|
+
state: GoalAutonomyState;
|
|
98
|
+
/**
|
|
99
|
+
* When the server was successfully told how this pursuit ended. ISO.
|
|
100
|
+
*
|
|
101
|
+
* The ONE fact here that is not derivable from anything else, and it is
|
|
102
|
+
* recorded only because of that. Everything else about a grant's progress
|
|
103
|
+
* comes from immutable receipts and marks; "we got through to the server"
|
|
104
|
+
* comes from nowhere but the moment it happened.
|
|
105
|
+
*
|
|
106
|
+
* Without it a finished pursuit has no way to know it is finished with, so
|
|
107
|
+
* every tick would re-ask the server about every grant that ever ended, for
|
|
108
|
+
* as long as the machine lived — and those requests would compete with the
|
|
109
|
+
* live grants for the one turn a tick gives out.
|
|
110
|
+
*/
|
|
111
|
+
projectedAt?: string;
|
|
112
|
+
}
|
|
113
|
+
/** What the receipts add up to. Derived on every read; never stored. */
|
|
114
|
+
export interface AutonomySpend {
|
|
115
|
+
/** The ordinals this machine holds a reservation for, ascending. */
|
|
116
|
+
reserved: readonly number[];
|
|
117
|
+
/** Its length. Named because that is the whole point of the file layout. */
|
|
118
|
+
startsConsumed: number;
|
|
119
|
+
/**
|
|
120
|
+
* Reserved ordinals with no ending marked, LOWEST FIRST.
|
|
121
|
+
*
|
|
122
|
+
* This replaced a single `inFlight` and the change is not cosmetic. That
|
|
123
|
+
* field claimed two things it could not know, and both were wrong:
|
|
124
|
+
*
|
|
125
|
+
* IT NAMED THE HIGHEST such ordinal, because it was assigned in a loop with
|
|
126
|
+
* no break. Two daemons racing a reservation take ordinals 1 and 2, and the
|
|
127
|
+
* field then reported only 2 — so marking "the in-flight Start" over
|
|
128
|
+
* finished 2 and left 1 unresolved for ever, silently spending a Start on
|
|
129
|
+
* nothing and then refusing every later one against a Start that had never
|
|
130
|
+
* run.
|
|
131
|
+
*
|
|
132
|
+
* IT CALLED A RESERVATION A FLIGHT. An ordinal can be reserved by a process
|
|
133
|
+
* that dies before it launches anything: budget spent, nothing running, no
|
|
134
|
+
* runId, no attempt. Reporting that as in flight means waiting for a run
|
|
135
|
+
* that does not exist, and a controller waiting on it would wait for ever.
|
|
136
|
+
*
|
|
137
|
+
* A reserved ordinal with nothing yet attempted is RESUMABLE, not in flight.
|
|
138
|
+
* Whether anything is actually executing is a question about attempt claims
|
|
139
|
+
* and start marks — see start-attempts.ts — and this file deliberately does
|
|
140
|
+
* not pretend to answer it.
|
|
141
|
+
*/
|
|
142
|
+
unfinished: readonly number[];
|
|
143
|
+
/** The run each unfinished ordinal produced, where one is on record. */
|
|
144
|
+
runs: Readonly<Record<number, string>>;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* The filesystem this store needs.
|
|
148
|
+
*
|
|
149
|
+
* `createExclusive` is not a convenience: it is the entire concurrency
|
|
150
|
+
* argument. A store handed a double that quietly overwrites has no budget.
|
|
151
|
+
*/
|
|
152
|
+
export interface AutonomyFs extends LedgerFs {
|
|
153
|
+
/** Create only if absent. MUST reject with an `EEXIST` error when it is not. */
|
|
154
|
+
createExclusive(path: string, data: string): Promise<void>;
|
|
155
|
+
}
|
|
156
|
+
/** The real one: ledger reads and writes, plus the lease file's exclusive create. */
|
|
157
|
+
export declare const nodeAutonomyFs: AutonomyFs;
|
|
158
|
+
export type AutonomyRead = {
|
|
159
|
+
ok: true;
|
|
160
|
+
progress: AutonomyProgress[];
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Could not be read, or could not be trusted.
|
|
164
|
+
*
|
|
165
|
+
* NOT an empty list. The caller must treat this as "I cannot account for this
|
|
166
|
+
* budget", never as "nothing has been spent".
|
|
167
|
+
*/
|
|
168
|
+
| {
|
|
169
|
+
ok: false;
|
|
170
|
+
because: string;
|
|
171
|
+
/**
|
|
172
|
+
* WHETHER THE BYTES ARE ACCUSED OF ANYTHING.
|
|
173
|
+
*
|
|
174
|
+
* Absent means damaged: something was read and could not be trusted.
|
|
175
|
+
* True means nothing was read at all, and a caller that can wait should.
|
|
176
|
+
*
|
|
177
|
+
* Every other reader in this file already had this distinction - claims,
|
|
178
|
+
* launches, spendOf all got it - and the one read that a PERSON is
|
|
179
|
+
* waiting on did not. `adopt` throws on a failed read and the command
|
|
180
|
+
* handler refuses durably on any throw, so a file lock lasting a
|
|
181
|
+
* millisecond permanently refused a grant somebody had just authorized.
|
|
182
|
+
*/
|
|
183
|
+
transient?: boolean;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* The deterministic identity of one bounded Start within one grant.
|
|
187
|
+
*
|
|
188
|
+
* Two daemons can run for one project — nothing takes a lock at daemon startup,
|
|
189
|
+
* verified rather than assumed — so "the next Start" must be a name both would
|
|
190
|
+
* compute identically, not a fresh id each invents. Ordinal N of controller C is
|
|
191
|
+
* one Start no matter how many processes decide it is due.
|
|
192
|
+
*/
|
|
193
|
+
/**
|
|
194
|
+
* IS THIS RECEIPT A CAPABILITY, OR JUST A FILE THAT PARSES?
|
|
195
|
+
*
|
|
196
|
+
* The receipts ARE the Start budget. Nothing else counts them, and `spendOf`
|
|
197
|
+
* derives everything a person's evening is bounded by from the ones it finds on
|
|
198
|
+
* disk. So a receipt cannot be believed merely because JSON.parse succeeded and
|
|
199
|
+
* a number looked numeric — a certification pass fed it an empty file, the text
|
|
200
|
+
* `not json at all`, and a body naming ordinal 77 of another controller, and
|
|
201
|
+
* all three were counted as valid reservations.
|
|
202
|
+
*
|
|
203
|
+
* Every receipt carries exactly three facts, and each of them must agree with
|
|
204
|
+
* where the file is sitting:
|
|
205
|
+
*
|
|
206
|
+
* ordinal the file's own name says which Start this is
|
|
207
|
+
* controllerId the directory says whose grant it belongs to
|
|
208
|
+
* startId derived, never minted — `autonomyStartId(controllerId, ordinal)`
|
|
209
|
+
*
|
|
210
|
+
* A CONTRADICTION IS CORRUPTION, and neither side wins. If the path says
|
|
211
|
+
* controller C ordinal 3 and the body says controller D ordinal 2, believing
|
|
212
|
+
* the path would let a receipt be moved between grants by renaming it, and
|
|
213
|
+
* believing the body would let one be forged by writing it. There is no third
|
|
214
|
+
* option that is safe, so both are refused.
|
|
215
|
+
*
|
|
216
|
+
* NOTHING IS DUPLICATED HERE. The receipt is not given a goal id, a goal
|
|
217
|
+
* version or a generation, because it needs none of them: `controllerId` IS the
|
|
218
|
+
* generation — the server mints a new row with a new id for every act of
|
|
219
|
+
* permission, precisely so a fresh grant never inherits a spent one's identity
|
|
220
|
+
* — and the grant's own terms are held immutable by `adopt`, which refuses a
|
|
221
|
+
* known controller whose goal, version, ceiling or expiry has moved. Copying a
|
|
222
|
+
* receipt from C1 into C2's directory changes the controllerId it must match,
|
|
223
|
+
* and is caught here.
|
|
224
|
+
*/
|
|
225
|
+
export declare function receiptTrouble(text: string, controllerId: string, ordinal: number, maxStarts: number): string | null;
|
|
226
|
+
export declare function autonomyStartId(controllerId: string, ordinal: number): string;
|
|
227
|
+
export declare class AutonomyStore {
|
|
228
|
+
private readonly stateDir;
|
|
229
|
+
private readonly fs;
|
|
230
|
+
private loaded;
|
|
231
|
+
/** Distinguishes two writes from ONE process; the pid distinguishes processes. */
|
|
232
|
+
private static writes;
|
|
233
|
+
constructor(stateDir: string, fs: AutonomyFs);
|
|
234
|
+
private get path();
|
|
235
|
+
/** One directory per grant. The controllerId is opaque and never reused. */
|
|
236
|
+
private receiptDir;
|
|
237
|
+
/**
|
|
238
|
+
* The reservation for one ordinal. Zero-padded so the names sort as numbers
|
|
239
|
+
* for anybody who ever lists the directory by eye.
|
|
240
|
+
*/
|
|
241
|
+
private receiptPath;
|
|
242
|
+
/**
|
|
243
|
+
* Read the file, refusing to guess.
|
|
244
|
+
*
|
|
245
|
+
* ABSENT is `ok` with nothing in it — a machine that has never been granted
|
|
246
|
+
* autonomy has spent nothing, and that is a true statement rather than an
|
|
247
|
+
* assumption. UNREADABLE, malformed, wrong-schema and wrong-shape are all
|
|
248
|
+
* `ok: false`, because in every one of those cases a grant may exist whose
|
|
249
|
+
* spending this file was the only record of.
|
|
250
|
+
*/
|
|
251
|
+
read(): Promise<AutonomyRead>;
|
|
252
|
+
/**
|
|
253
|
+
* Spend one Start, BEFORE it is issued, and say which one it is.
|
|
254
|
+
*
|
|
255
|
+
* The direction is the safety argument. Consuming first means a crash between
|
|
256
|
+
* the write and the spawn COSTS a Start — one of eight, and the goal is no
|
|
257
|
+
* worse off. Consuming after would mean a crash between the spawn and the
|
|
258
|
+
* write GRANTS one, and a machine that crashes reliably at that point has an
|
|
259
|
+
* unbounded budget.
|
|
260
|
+
*
|
|
261
|
+
* Refuses rather than throws when the record cannot be read, when the grant is
|
|
262
|
+
* unknown, when it has ended, when it has expired, or when the ceiling is
|
|
263
|
+
* reached. Every one of those is "no Start today", not an error to be caught
|
|
264
|
+
* and ignored.
|
|
265
|
+
*/
|
|
266
|
+
consumeStart(controllerId: string, now: number): Promise<{
|
|
267
|
+
ok: true;
|
|
268
|
+
ordinal: number;
|
|
269
|
+
startId: string;
|
|
270
|
+
} | {
|
|
271
|
+
ok: false;
|
|
272
|
+
because: string;
|
|
273
|
+
}>;
|
|
274
|
+
/**
|
|
275
|
+
* Record which run a Start produced, so its ending can be watched for.
|
|
276
|
+
*
|
|
277
|
+
* Immutable like the reservation. A second call naming the SAME run is the
|
|
278
|
+
* redelivery this whole system is built to tolerate; a second call naming a
|
|
279
|
+
* different one is two runs claiming one Start, and it is refused rather
|
|
280
|
+
* than allowed to overwrite the first answer.
|
|
281
|
+
*/
|
|
282
|
+
noteRun(controllerId: string, ordinal: number, runId: string): Promise<void>;
|
|
283
|
+
/** The Start is over, however it ended. The count is NOT given back. */
|
|
284
|
+
clearInFlight(controllerId: string): Promise<void>;
|
|
285
|
+
/** Mark one Start over by ordinal. Idempotent: it is already over. */
|
|
286
|
+
finishStart(controllerId: string, ordinal: number): Promise<void>;
|
|
287
|
+
/** The terms of one grant, or why they cannot be answered for. */
|
|
288
|
+
termsOf(controllerId: string): Promise<{
|
|
289
|
+
ok: true;
|
|
290
|
+
grant: AutonomyProgress;
|
|
291
|
+
} | {
|
|
292
|
+
ok: false;
|
|
293
|
+
because: string;
|
|
294
|
+
}>;
|
|
295
|
+
/**
|
|
296
|
+
* Count the receipts.
|
|
297
|
+
*
|
|
298
|
+
* Probed ordinal by ordinal rather than listed, because a ceiling of eight
|
|
299
|
+
* makes eight reads cheaper than adding a directory-listing capability to
|
|
300
|
+
* every filesystem double in the tree -- and a probe cannot be fooled by a
|
|
301
|
+
* stray file the way a listing can.
|
|
302
|
+
*/
|
|
303
|
+
spendOf(controllerId: string, maxStarts: number): Promise<{
|
|
304
|
+
ok: true;
|
|
305
|
+
spend: AutonomySpend;
|
|
306
|
+
} | {
|
|
307
|
+
ok: false;
|
|
308
|
+
transient: boolean;
|
|
309
|
+
because: string;
|
|
310
|
+
}>;
|
|
311
|
+
/** Adopt a grant the server issued. Re-adopting the same one keeps what was spent. */
|
|
312
|
+
adopt(grant: Omit<AutonomyProgress, 'startsConsumed' | 'state'>): Promise<void>;
|
|
313
|
+
/**
|
|
314
|
+
* Note that the server has been told how this pursuit ended.
|
|
315
|
+
*
|
|
316
|
+
* Separate from `settle` on purpose: one is what this machine concluded, the
|
|
317
|
+
* other is that somebody else now knows. A crash between them must leave the
|
|
318
|
+
* conclusion standing and the telling still owed.
|
|
319
|
+
*/
|
|
320
|
+
markProjected(controllerId: string, at: string): Promise<void>;
|
|
321
|
+
/** Record where this grant came to rest. Terminal states spend nothing further. */
|
|
322
|
+
settle(controllerId: string, state: GoalAutonomyState): Promise<void>;
|
|
323
|
+
/** What this machine last read. Empty before a successful `read`. */
|
|
324
|
+
all(): AutonomyProgress[];
|
|
325
|
+
private write;
|
|
326
|
+
}
|
|
327
|
+
//# sourceMappingURL=autonomy-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autonomy-store.d.ts","sourceRoot":"","sources":["../src/autonomy-store.ts"],"names":[],"mappings":"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"}
|