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,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHAT A CLIENT METHOD CLAIMS ITS RESPONSE LOOKS LIKE.
|
|
3
|
+
*
|
|
4
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
5
|
+
* 🔴 THIS EXISTS BECAUSE A CLIENT CLAIMED TWO FIELDS THAT DO NOT EXIST, AND
|
|
6
|
+
* EVERY GATE PASSED.
|
|
7
|
+
*
|
|
8
|
+
* `ServerClient.heartbeat` was typed `{ ok: boolean; nextBeatS?: number }`. The
|
|
9
|
+
* route returns `{ ttlS, refreshS }`. Both declared fields were invented, and
|
|
10
|
+
* the consequence was not cosmetic: the server publishes `refreshS` precisely so
|
|
11
|
+
* a presence TTL can be tuned without shipping a new CLI, and no caller could
|
|
12
|
+
* reach a field its own type did not name.
|
|
13
|
+
*
|
|
14
|
+
* ⚠️ NOTHING COULD HAVE SEEN IT. `this.request<T>(…)` makes `T` true by
|
|
15
|
+
* assertion — the body is `unknown` on the wire, so TypeScript has nothing to
|
|
16
|
+
* object to. The SDK's boundary check compares PATHS, and the path was right.
|
|
17
|
+
* The unit specs inject a fake `fetch`, so the client agreed with itself. The
|
|
18
|
+
* same shape produced the SDK's invented `RunView.outcome` and `SafetyView`.
|
|
19
|
+
*
|
|
20
|
+
* So: read what each method DECLARES, and let a test that has a real response in
|
|
21
|
+
* its hands check the claim against it.
|
|
22
|
+
*
|
|
23
|
+
* This is deliberately a small, honest parser. It reports what it could not read
|
|
24
|
+
* rather than passing over it, because a checker that silently skips is how a
|
|
25
|
+
* fifth of a corpus disappears under a confident summary line.
|
|
26
|
+
*/
|
|
27
|
+
export type ShapeKind =
|
|
28
|
+
/** An inline object literal — `this.request<{ a: string; b?: number }>` — the
|
|
29
|
+
* form that can be checked against a real response without resolving
|
|
30
|
+
* anything. This is also the form every invented field has taken. */
|
|
31
|
+
'literal'
|
|
32
|
+
/** A named type — `this.request<IngestAck>`. Resolving it means resolving
|
|
33
|
+
* imports, which this does not attempt. Reported, never silently dropped. */
|
|
34
|
+
| 'named';
|
|
35
|
+
export interface DeclaredField {
|
|
36
|
+
name: string;
|
|
37
|
+
/** `b?: number` — absent from a response is correct, so it is not checkable. */
|
|
38
|
+
optional: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface DeclaredShape {
|
|
41
|
+
/** The client method the call sits in. */
|
|
42
|
+
method: string;
|
|
43
|
+
kind: ShapeKind;
|
|
44
|
+
/** Empty for `named`. */
|
|
45
|
+
fields: DeclaredField[];
|
|
46
|
+
/** The type argument exactly as written, for a failure message that can be read. */
|
|
47
|
+
raw: string;
|
|
48
|
+
/**
|
|
49
|
+
* Is the call's result RETURNED as the method's own result, or unwrapped first?
|
|
50
|
+
*
|
|
51
|
+
* 🔴 THIS DISTINCTION IS WHAT KEEPS THE CHECK HONEST. `@looply/sdk` writes
|
|
52
|
+
* `const r = await this.request<{ goal: GoalView }>(...); return r.goal;` — the
|
|
53
|
+
* declared type is the ENVELOPE, and the method hands back what is inside it.
|
|
54
|
+
* Holding the envelope's field list against the unwrapped value would fail on
|
|
55
|
+
* a correct client, and the natural way to make that green again is to weaken
|
|
56
|
+
* the check until it proves nothing.
|
|
57
|
+
*
|
|
58
|
+
* So a shape is only checkable against a method's result when it IS that
|
|
59
|
+
* result. Measured: the daemon's client returns all 20 directly, the phone all
|
|
60
|
+
* 34, and the SDK unwraps every literal one it has.
|
|
61
|
+
*/
|
|
62
|
+
returned: boolean;
|
|
63
|
+
}
|
|
64
|
+
export declare function declaredResponseShapes(src: string): DeclaredShape[];
|
|
65
|
+
/**
|
|
66
|
+
* The required fields a method claims, or null when the claim is not checkable.
|
|
67
|
+
*
|
|
68
|
+
* Null and empty are DIFFERENT and the difference matters: null means "this type
|
|
69
|
+
* was never read", empty means "read, and it promises nothing". Collapsing them
|
|
70
|
+
* turns an unchecked method into a passing one.
|
|
71
|
+
*/
|
|
72
|
+
/**
|
|
73
|
+
* Every field a method DECLARES, split by requiredness — or null when the claim
|
|
74
|
+
* is not checkable.
|
|
75
|
+
*
|
|
76
|
+
* 🔴 REQUIREDNESS DECIDES WHAT ABSENCE MEANS, NOT WHETHER THE FIELD IS REAL.
|
|
77
|
+
* `requiredFieldsOf` below drops optionals, so an invented OPTIONAL field was
|
|
78
|
+
* invisible — and the defect that motivated this whole check declared TWO
|
|
79
|
+
* invented fields, `{ ok: boolean; nextBeatS?: number }`, of which the optional
|
|
80
|
+
* one would have sailed through. A checker that catches half its own founding
|
|
81
|
+
* defect is the kind of thing that gets quoted as coverage.
|
|
82
|
+
*
|
|
83
|
+
* A client must not claim a field the server never sends, whatever the `?` says.
|
|
84
|
+
* What `?` legitimately buys is that the field may be ABSENT FROM A GIVEN
|
|
85
|
+
* RESPONSE — so the caller must say which optionals its fixture does not
|
|
86
|
+
* exercise, rather than the checker silently excusing all of them.
|
|
87
|
+
*/
|
|
88
|
+
export declare function declaredFieldsOf(shapes: DeclaredShape[], method: string): {
|
|
89
|
+
required: string[];
|
|
90
|
+
optional: string[];
|
|
91
|
+
} | null;
|
|
92
|
+
export declare function requiredFieldsOf(shapes: DeclaredShape[], method: string): string[] | null;
|
|
93
|
+
//# sourceMappingURL=declared-response-shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declared-response-shape.d.ts","sourceRoot":"","sources":["../src/declared-response-shape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,MAAM,SAAS;AACnB;;sEAEsE;AACpE,SAAS;AACX;8EAC8E;GAC5E,OAAO,CAAC;AAEZ,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,SAAS,CAAC;IAChB,yBAAyB;IACzB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,oFAAoF;IACpF,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;;;;;;;;;OAaG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAiFD,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,EAAE,CA2CnE;AAED;;;;;;GAMG;AACH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,aAAa,EAAE,EACvB,MAAM,EAAE,MAAM,GACb;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CAOnD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAMzF"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* WHAT A CLIENT METHOD CLAIMS ITS RESPONSE LOOKS LIKE.
|
|
4
|
+
*
|
|
5
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
6
|
+
* 🔴 THIS EXISTS BECAUSE A CLIENT CLAIMED TWO FIELDS THAT DO NOT EXIST, AND
|
|
7
|
+
* EVERY GATE PASSED.
|
|
8
|
+
*
|
|
9
|
+
* `ServerClient.heartbeat` was typed `{ ok: boolean; nextBeatS?: number }`. The
|
|
10
|
+
* route returns `{ ttlS, refreshS }`. Both declared fields were invented, and
|
|
11
|
+
* the consequence was not cosmetic: the server publishes `refreshS` precisely so
|
|
12
|
+
* a presence TTL can be tuned without shipping a new CLI, and no caller could
|
|
13
|
+
* reach a field its own type did not name.
|
|
14
|
+
*
|
|
15
|
+
* ⚠️ NOTHING COULD HAVE SEEN IT. `this.request<T>(…)` makes `T` true by
|
|
16
|
+
* assertion — the body is `unknown` on the wire, so TypeScript has nothing to
|
|
17
|
+
* object to. The SDK's boundary check compares PATHS, and the path was right.
|
|
18
|
+
* The unit specs inject a fake `fetch`, so the client agreed with itself. The
|
|
19
|
+
* same shape produced the SDK's invented `RunView.outcome` and `SafetyView`.
|
|
20
|
+
*
|
|
21
|
+
* So: read what each method DECLARES, and let a test that has a real response in
|
|
22
|
+
* its hands check the claim against it.
|
|
23
|
+
*
|
|
24
|
+
* This is deliberately a small, honest parser. It reports what it could not read
|
|
25
|
+
* rather than passing over it, because a checker that silently skips is how a
|
|
26
|
+
* fifth of a corpus disappears under a confident summary line.
|
|
27
|
+
*/
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.declaredResponseShapes = declaredResponseShapes;
|
|
30
|
+
exports.declaredFieldsOf = declaredFieldsOf;
|
|
31
|
+
exports.requiredFieldsOf = requiredFieldsOf;
|
|
32
|
+
/** Reads `<…>` starting at the `<`, respecting nesting. Returns null if unbalanced. */
|
|
33
|
+
function typeArgument(src, openAt) {
|
|
34
|
+
let depth = 0;
|
|
35
|
+
for (let i = openAt; i < src.length; i++) {
|
|
36
|
+
const c = src[i];
|
|
37
|
+
if (c === '<')
|
|
38
|
+
depth++;
|
|
39
|
+
else if (c === '>') {
|
|
40
|
+
depth--;
|
|
41
|
+
if (depth === 0)
|
|
42
|
+
return { text: src.slice(openAt + 1, i), end: i };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
/** The nearest enclosing ` name(` above `at`. */
|
|
48
|
+
function enclosingMethod(src, at) {
|
|
49
|
+
const before = src.slice(0, at);
|
|
50
|
+
const lines = before.split('\n');
|
|
51
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
52
|
+
// Two-space indent, an identifier, an open paren: a class method. Deliberately
|
|
53
|
+
// not matching `if (`/`for (` — those are keywords, excluded below.
|
|
54
|
+
const m = /^ {2}(?:async )?([A-Za-z_$][\w$]*)\s*\(/.exec(lines[i].replace('\r', ''));
|
|
55
|
+
if (m && !['if', 'for', 'while', 'switch', 'catch', 'return'].includes(m[1]))
|
|
56
|
+
return m[1];
|
|
57
|
+
}
|
|
58
|
+
return '<unknown>';
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Is there a `|` or `&` at the OUTERMOST level?
|
|
62
|
+
*
|
|
63
|
+
* ð´ "ANYWHERE IN THE STRING" IS THE WRONG TEST, AND IT WAS THE FIRST ONE
|
|
64
|
+
* WRITTEN. `{ answeredAt: string | null }` is a perfectly ordinary object
|
|
65
|
+
* literal whose FIELD happens to be nullable; rejecting it as a union skipped a
|
|
66
|
+
* method that was checkable, and skipping is the silent direction. `{ a } | null`
|
|
67
|
+
* really is a union, and its `|` sits at depth 0 after the closing brace.
|
|
68
|
+
*/
|
|
69
|
+
function unionAtTopLevel(raw) {
|
|
70
|
+
let depth = 0;
|
|
71
|
+
for (const c of raw) {
|
|
72
|
+
if (c === '{' || c === '(' || c === '[' || c === '<')
|
|
73
|
+
depth++;
|
|
74
|
+
else if (c === '}' || c === ')' || c === ']' || c === '>')
|
|
75
|
+
depth--;
|
|
76
|
+
else if ((c === '|' || c === '&') && depth === 0)
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
/** Splits `a: string; b?: { c: number }` on top-level `;` only. */
|
|
82
|
+
/**
|
|
83
|
+
* Splits a type literal into its members.
|
|
84
|
+
*
|
|
85
|
+
* 🔴 THREE SEPARATORS, NOT ONE, AND THE MISSING TWO WERE LIVE DEFECTS.
|
|
86
|
+
* This split on `;` alone, so:
|
|
87
|
+
* `{ a: string, b: number }` -> ONE member, and only `a` was read
|
|
88
|
+
* a member on its own line with no `;` -> collapsed into its predecessor
|
|
89
|
+
* Both are ordinary TypeScript that survives prettier, and both silently
|
|
90
|
+
* shrank the declared field set -- which makes an INVENTED field invisible,
|
|
91
|
+
* because a field the parser never saw cannot be reported as missing.
|
|
92
|
+
*
|
|
93
|
+
* A newline at depth 0 is also a separator. A member whose type sits on the
|
|
94
|
+
* next line then splits into `a:` and its type; the first still matches the
|
|
95
|
+
* field pattern and the second simply does not, so nothing is lost.
|
|
96
|
+
*/
|
|
97
|
+
function topLevelMembers(body) {
|
|
98
|
+
const out = [];
|
|
99
|
+
let depth = 0;
|
|
100
|
+
let start = 0;
|
|
101
|
+
for (let i = 0; i < body.length; i++) {
|
|
102
|
+
const c = body[i];
|
|
103
|
+
if (c === '{' || c === '(' || c === '[' || c === '<')
|
|
104
|
+
depth++;
|
|
105
|
+
else if (c === '}' || c === ')' || c === ']' || c === '>')
|
|
106
|
+
depth--;
|
|
107
|
+
else if (depth === 0 && (c === ';' || c === ',' || c === '\n')) {
|
|
108
|
+
out.push(body.slice(start, i));
|
|
109
|
+
start = i + 1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
out.push(body.slice(start));
|
|
113
|
+
return out.map((m) => m.trim()).filter((m) => m.length > 0);
|
|
114
|
+
}
|
|
115
|
+
function declaredResponseShapes(src) {
|
|
116
|
+
const shapes = [];
|
|
117
|
+
const needle = 'this.request<';
|
|
118
|
+
let from = 0;
|
|
119
|
+
for (;;) {
|
|
120
|
+
const at = src.indexOf(needle, from);
|
|
121
|
+
if (at === -1)
|
|
122
|
+
break;
|
|
123
|
+
const openAt = at + needle.length - 1;
|
|
124
|
+
const arg = typeArgument(src, openAt);
|
|
125
|
+
if (!arg) {
|
|
126
|
+
from = at + needle.length;
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
from = arg.end;
|
|
130
|
+
const raw = arg.text.trim();
|
|
131
|
+
const method = enclosingMethod(src, at);
|
|
132
|
+
// The text between the start of the line and the call. `return this.request<`
|
|
133
|
+
// and `return await this.request<` are returned; `const r = await ...` is not.
|
|
134
|
+
const lineStart = src.lastIndexOf('\n', at) + 1;
|
|
135
|
+
const returned = /^\s*return\s+(await\s+)?$/.test(src.slice(lineStart, at));
|
|
136
|
+
// 🔴 ONLY A PURE OBJECT LITERAL IS CHECKABLE. A union (`X | null`), an
|
|
137
|
+
// intersection (`A & { b }`) or a named type is reported as `named` rather
|
|
138
|
+
// than half-parsed — a field list guessed out of a union is worse than
|
|
139
|
+
// admitting the type was not read.
|
|
140
|
+
const isPureLiteral = raw.startsWith('{') && raw.endsWith('}') && !unionAtTopLevel(raw);
|
|
141
|
+
if (!isPureLiteral) {
|
|
142
|
+
shapes.push({ method, kind: 'named', fields: [], raw, returned });
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
const fields = [];
|
|
146
|
+
for (const member of topLevelMembers(raw.slice(1, -1))) {
|
|
147
|
+
// `readonly` is a modifier; a property name may be quoted. Both are
|
|
148
|
+
// idiomatic and both used to drop the field silently.
|
|
149
|
+
const m = /^(?:readonly\s+)?(?:\'([^']+)'|\"([^"]+)\"|([A-Za-z_$][\w$]*))\s*(\?)?\s*:/.exec(member);
|
|
150
|
+
// Groups: 1 single-quoted name, 2 double-quoted, 3 bare identifier,
|
|
151
|
+
// 4 the optional marker.
|
|
152
|
+
if (m)
|
|
153
|
+
fields.push({ name: (m[1] ?? m[2] ?? m[3]), optional: m[4] === '?' });
|
|
154
|
+
}
|
|
155
|
+
shapes.push({ method, kind: 'literal', fields, raw, returned });
|
|
156
|
+
}
|
|
157
|
+
return shapes;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The required fields a method claims, or null when the claim is not checkable.
|
|
161
|
+
*
|
|
162
|
+
* Null and empty are DIFFERENT and the difference matters: null means "this type
|
|
163
|
+
* was never read", empty means "read, and it promises nothing". Collapsing them
|
|
164
|
+
* turns an unchecked method into a passing one.
|
|
165
|
+
*/
|
|
166
|
+
/**
|
|
167
|
+
* Every field a method DECLARES, split by requiredness — or null when the claim
|
|
168
|
+
* is not checkable.
|
|
169
|
+
*
|
|
170
|
+
* 🔴 REQUIREDNESS DECIDES WHAT ABSENCE MEANS, NOT WHETHER THE FIELD IS REAL.
|
|
171
|
+
* `requiredFieldsOf` below drops optionals, so an invented OPTIONAL field was
|
|
172
|
+
* invisible — and the defect that motivated this whole check declared TWO
|
|
173
|
+
* invented fields, `{ ok: boolean; nextBeatS?: number }`, of which the optional
|
|
174
|
+
* one would have sailed through. A checker that catches half its own founding
|
|
175
|
+
* defect is the kind of thing that gets quoted as coverage.
|
|
176
|
+
*
|
|
177
|
+
* A client must not claim a field the server never sends, whatever the `?` says.
|
|
178
|
+
* What `?` legitimately buys is that the field may be ABSENT FROM A GIVEN
|
|
179
|
+
* RESPONSE — so the caller must say which optionals its fixture does not
|
|
180
|
+
* exercise, rather than the checker silently excusing all of them.
|
|
181
|
+
*/
|
|
182
|
+
function declaredFieldsOf(shapes, method) {
|
|
183
|
+
const shape = shapes.find((s) => s.method === method);
|
|
184
|
+
if (!shape || shape.kind !== 'literal' || !shape.returned)
|
|
185
|
+
return null;
|
|
186
|
+
return {
|
|
187
|
+
required: shape.fields.filter((f) => !f.optional).map((f) => f.name),
|
|
188
|
+
optional: shape.fields.filter((f) => f.optional).map((f) => f.name),
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function requiredFieldsOf(shapes, method) {
|
|
192
|
+
const shape = shapes.find((s) => s.method === method);
|
|
193
|
+
if (!shape || shape.kind !== 'literal')
|
|
194
|
+
return null;
|
|
195
|
+
// An unwrapped envelope describes the WIRE, not this method's result.
|
|
196
|
+
if (!shape.returned)
|
|
197
|
+
return null;
|
|
198
|
+
return shape.fields.filter((f) => !f.optional).map((f) => f.name);
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=declared-response-shape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declared-response-shape.js","sourceRoot":"","sources":["../src/declared-response-shape.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;;AAyHH,wDA2CC;AAyBD,4CAUC;AAED,4CAMC;AArKD,uFAAuF;AACvF,SAAS,YAAY,CAAC,GAAW,EAAE,MAAc;IAC/C,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,CAAC,GAA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ding } from './goal-ownership';
|
|
3
|
+
/**
|
|
4
|
+
* THE SURFACES A RUN DECLARES — the one place the run reads `Goal.surfaces`.
|
|
5
|
+
*
|
|
6
|
+
* Read from the goal the run is BOUND to, as the daemon's mirror holds it,
|
|
7
|
+
* and only when the project asked for surfaces (`run.surfaces: true`). Off
|
|
8
|
+
* means no lease is ever taken — not "taken and ignored": the acquire is not
|
|
9
|
+
* called at all, so a project that never asked has no new file, no new
|
|
10
|
+
* failure mode and no new refusal. Unbound means the same.
|
|
11
|
+
*
|
|
12
|
+
* Extracted from `run-cmd.ts` so the seam can be held to a test that feeds
|
|
13
|
+
* it a real mirror and takes a real lease with what it answers.
|
|
14
|
+
*/
|
|
15
|
+
export declare function declaredSurfacesFor(config: Pick<LooplyConfig, 'run'>, binding: GoalBinding): readonly string[];
|
|
16
|
+
//# sourceMappingURL=declared-surfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declared-surfaces.d.ts","sourceRoot":"","sources":["../src/declared-surfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,WAAW,GAAG,SAAS,MAAM,EAAE,CAE9G"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.declaredSurfacesFor = declaredSurfacesFor;
|
|
4
|
+
/**
|
|
5
|
+
* THE SURFACES A RUN DECLARES — the one place the run reads `Goal.surfaces`.
|
|
6
|
+
*
|
|
7
|
+
* Read from the goal the run is BOUND to, as the daemon's mirror holds it,
|
|
8
|
+
* and only when the project asked for surfaces (`run.surfaces: true`). Off
|
|
9
|
+
* means no lease is ever taken — not "taken and ignored": the acquire is not
|
|
10
|
+
* called at all, so a project that never asked has no new file, no new
|
|
11
|
+
* failure mode and no new refusal. Unbound means the same.
|
|
12
|
+
*
|
|
13
|
+
* Extracted from `run-cmd.ts` so the seam can be held to a test that feeds
|
|
14
|
+
* it a real mirror and takes a real lease with what it answers.
|
|
15
|
+
*/
|
|
16
|
+
function declaredSurfacesFor(config, binding) {
|
|
17
|
+
return config.run.surfaces === true && binding.kind === 'bound' ? (binding.goal.surfaces ?? []) : [];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=declared-surfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declared-surfaces.js","sourceRoot":"","sources":["../src/declared-surfaces.ts"],"names":[],"mappings":";;AAeA,kDAEC;AAdD;;;;;;;;;;;GAWG;AACH,SAAgB,mBAAmB,CAAC,MAAiC,EAAE,OAAoB;IACzF,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,KAAK,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvG,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { type DependsFacts, type DependsVerdict, type ProposedDependency, type TrustedActionContext } from '@looply/core';
|
|
2
|
+
import { type EdgeApprovalCapability, type FiledEdge } from './edge-approval';
|
|
3
|
+
/**
|
|
4
|
+
* PUTTING A PROPOSED EDGE TO THE FENCE, WITH FACTS SOMEBODY ACTUALLY READ.
|
|
5
|
+
*
|
|
6
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
7
|
+
* 🔴 THE FENCE TAKES FACTS AND CANNOT GO AND GET THEM. `dependsVerdict` is pure
|
|
8
|
+
* — goal versions, source hashes and the graph all arrive as arguments — which
|
|
9
|
+
* is what makes staleness testable without a server and is also why, until this
|
|
10
|
+
* file existed, nothing ever ran it: the daemon held the edges and had no
|
|
11
|
+
* assembled answer to judge them against.
|
|
12
|
+
*
|
|
13
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
14
|
+
* ⚠️ AND THE FACTS ARE READ ONCE, FOR ALL THE EDGES IN A TICK.
|
|
15
|
+
*
|
|
16
|
+
* Reading them per edge would let two edges in one cadence be judged against
|
|
17
|
+
* two different worlds — the second one stale by a change the first one caused,
|
|
18
|
+
* or worse, not stale because a change landed between the two reads. One
|
|
19
|
+
* snapshot, every edge, one answer about one moment.
|
|
20
|
+
*
|
|
21
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
22
|
+
* 🔴 NOTHING HERE APPLIES ANYTHING. An accepted edge is returned for a person;
|
|
23
|
+
* writing one would be a provider's suggestion reaching the graph through a
|
|
24
|
+
* daemon tick, which is the whole thing the fence and the approval path exist
|
|
25
|
+
* to prevent.
|
|
26
|
+
*/
|
|
27
|
+
export interface DependsReviewDeps {
|
|
28
|
+
/** Every goal of the project, with the fields the fence compares. */
|
|
29
|
+
goals(): Promise<DependsFacts['goals']>;
|
|
30
|
+
/** The content hash each source id currently holds. */
|
|
31
|
+
sourceShas(): Promise<ReadonlyMap<string, string>>;
|
|
32
|
+
readonly projectId: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ReviewedEdge {
|
|
35
|
+
readonly edge: ProposedDependency;
|
|
36
|
+
readonly verdict: DependsVerdict;
|
|
37
|
+
}
|
|
38
|
+
export interface DependsReview {
|
|
39
|
+
readonly reviewed: readonly ReviewedEdge[];
|
|
40
|
+
/**
|
|
41
|
+
* 🔴 THE FACTS COULD NOT BE ASSEMBLED, SO NOTHING WAS JUDGED. Not an empty
|
|
42
|
+
* review — an absent one. A caller that read `reviewed: []` as "no edges
|
|
43
|
+
* survived" would be reporting a refusal nobody made.
|
|
44
|
+
*/
|
|
45
|
+
readonly because: string | null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Judge every edge one tick produced, against one reading of the world.
|
|
49
|
+
*
|
|
50
|
+
* ⚠️ `citationsVerified: true` IS TRUE BY CONSTRUCTION HERE AND IS STILL PASSED
|
|
51
|
+
* RATHER THAN ASSUMED. `toDependsProposals` only returns edges from records
|
|
52
|
+
* whose verdict was `ok`, so the fence's first check cannot fail on this path —
|
|
53
|
+
* but it is a real guard for every other path, and hard-coding it inside the
|
|
54
|
+
* fence would remove it for all of them to save one argument here.
|
|
55
|
+
*/
|
|
56
|
+
export declare function reviewEdges(edges: readonly ProposedDependency[], deps: DependsReviewDeps): Promise<DependsReview>;
|
|
57
|
+
/**
|
|
58
|
+
* The lines a person reads.
|
|
59
|
+
*
|
|
60
|
+
* 🔴 AN ACCEPTED EDGE IS THE ONE THAT NEEDS THE LOUDEST CAVEAT, not the
|
|
61
|
+
* quietest line. "Accepted" here means "it passed every check a machine can
|
|
62
|
+
* make" and nothing else; the edge is not in the graph and will not be until
|
|
63
|
+
* somebody puts it there.
|
|
64
|
+
*/
|
|
65
|
+
export declare function reportReview(review: DependsReview, out: (line: string) => void): void;
|
|
66
|
+
/**
|
|
67
|
+
* ⚠️ HOW MANY NEW QUESTIONS ONE CADENCE MAY RAISE.
|
|
68
|
+
*
|
|
69
|
+
* 🔴 NOT A HYPOTHETICAL BOUND. `proposalsForTick` re-reads every record for
|
|
70
|
+
* every goal it iterates, so an edge accepted three cadences ago is in
|
|
71
|
+
* `tick.edges` on this cadence too — and on every cadence after it. Without a
|
|
72
|
+
* cap, ten pending edges would be ten network calls per heartbeat, for ever.
|
|
73
|
+
* The approval surface deduplicates on the client reference so none of them
|
|
74
|
+
* would create a second question; the cost is entirely in making the calls.
|
|
75
|
+
*
|
|
76
|
+
* One, like `MAX_ASKS_PER_TICK` beside it, and for the same reason: a heartbeat
|
|
77
|
+
* should wait for one thing, not for a queue.
|
|
78
|
+
*/
|
|
79
|
+
export declare const MAX_EDGE_FILINGS_PER_TICK = 1;
|
|
80
|
+
export interface FilingOutcome {
|
|
81
|
+
readonly filed: readonly FiledEdge[];
|
|
82
|
+
/** Accepted, and left for a later cadence because of the cap. */
|
|
83
|
+
readonly deferred: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* File the accepted edges of one review, within the cadence's bound.
|
|
87
|
+
*
|
|
88
|
+
* 🔴 ONLY `accepted` REACHES ANYBODY, and `fileEdge` is what enforces that —
|
|
89
|
+
* this function does not re-implement the judgement, it only decides how many
|
|
90
|
+
* of them one cadence may raise, and which ones.
|
|
91
|
+
*
|
|
92
|
+
* 🔴 `turn` DECIDES WHICH, AND WITHOUT IT THE BOUND STARVED EVERY EDGE BUT ONE.
|
|
93
|
+
* `accepted` arrives in the same order every cadence, and an edge that is
|
|
94
|
+
* already waiting for a decision stays accepted until somebody decides it — so
|
|
95
|
+
* `slice(0, max)` re-filed that one edge on every heartbeat (a deduplicated
|
|
96
|
+
* call, asking nobody anything) and the edge behind it was never raised at all.
|
|
97
|
+
* MEASURED live (LIVE-2): "already waiting for a decision: Make gol_…ejz@2 wait
|
|
98
|
+
* for gol_…e57@2" and "1 more accepted edge(s) wait for a later cadence", every
|
|
99
|
+
* cadence, while the fence had accepted the second edge long before. Starting
|
|
100
|
+
* the window at `turn` keeps the bound exactly as it was — `max` calls per
|
|
101
|
+
* cadence — and gives every accepted edge its turn within `accepted.length`
|
|
102
|
+
* cadences. The caller advances it, the way `autonomyTick` gets `rotation`.
|
|
103
|
+
*/
|
|
104
|
+
export declare function fileReviewed(review: DependsReview, ctx: TrustedActionContext, approvals: EdgeApprovalCapability, max?: number, turn?: number): Promise<FilingOutcome>;
|
|
105
|
+
/**
|
|
106
|
+
* The lines a person reads about what was raised.
|
|
107
|
+
*
|
|
108
|
+
* ⚠️ A DEFERRED EDGE IS SAID OUT LOUD. Silence would make a cap look like a
|
|
109
|
+
* judgement: "nothing else was accepted" and "the rest wait for the next
|
|
110
|
+
* cadence" are completely different, and only one of them is about the edges.
|
|
111
|
+
*/
|
|
112
|
+
export declare function reportFiling(outcome: FilingOutcome, out: (line: string) => void): void;
|
|
113
|
+
//# sourceMappingURL=depends-review.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depends-review.d.ts","sourceRoot":"","sources":["../src/depends-review.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAA2B,KAAK,sBAAsB,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEvG;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,WAAW,iBAAiB;IAChC,qEAAqE;IACrE,KAAK,IAAI,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;IACxC,uDAAuD;IACvD,UAAU,IAAI,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,SAAS,kBAAkB,EAAE,EACpC,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,aAAa,CAAC,CAexB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAQrF;AAID;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IACrC,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,aAAa,EACrB,GAAG,EAAE,oBAAoB,EACzB,SAAS,EAAE,sBAAsB,EACjC,GAAG,GAAE,MAAkC,EACvC,IAAI,SAAI,GACP,OAAO,CAAC,aAAa,CAAC,CASxB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAKtF"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_EDGE_FILINGS_PER_TICK = void 0;
|
|
4
|
+
exports.reviewEdges = reviewEdges;
|
|
5
|
+
exports.reportReview = reportReview;
|
|
6
|
+
exports.fileReviewed = fileReviewed;
|
|
7
|
+
exports.reportFiling = reportFiling;
|
|
8
|
+
const core_1 = require("@looply/core");
|
|
9
|
+
const edge_approval_1 = require("./edge-approval");
|
|
10
|
+
/**
|
|
11
|
+
* Judge every edge one tick produced, against one reading of the world.
|
|
12
|
+
*
|
|
13
|
+
* ⚠️ `citationsVerified: true` IS TRUE BY CONSTRUCTION HERE AND IS STILL PASSED
|
|
14
|
+
* RATHER THAN ASSUMED. `toDependsProposals` only returns edges from records
|
|
15
|
+
* whose verdict was `ok`, so the fence's first check cannot fail on this path —
|
|
16
|
+
* but it is a real guard for every other path, and hard-coding it inside the
|
|
17
|
+
* fence would remove it for all of them to save one argument here.
|
|
18
|
+
*/
|
|
19
|
+
async function reviewEdges(edges, deps) {
|
|
20
|
+
if (edges.length === 0)
|
|
21
|
+
return { reviewed: [], because: null };
|
|
22
|
+
let facts;
|
|
23
|
+
try {
|
|
24
|
+
const [goals, sourceShas] = await Promise.all([deps.goals(), deps.sourceShas()]);
|
|
25
|
+
facts = { projectId: deps.projectId, goals, sourceShas, citationsVerified: true };
|
|
26
|
+
}
|
|
27
|
+
catch (e) {
|
|
28
|
+
return {
|
|
29
|
+
reviewed: [],
|
|
30
|
+
because: `the facts to judge ${edges.length} proposed edge(s) could not be read (${e.message}), so none was judged`,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return { reviewed: edges.map((edge) => ({ edge, verdict: (0, core_1.dependsVerdict)(edge, facts) })), because: null };
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The lines a person reads.
|
|
37
|
+
*
|
|
38
|
+
* 🔴 AN ACCEPTED EDGE IS THE ONE THAT NEEDS THE LOUDEST CAVEAT, not the
|
|
39
|
+
* quietest line. "Accepted" here means "it passed every check a machine can
|
|
40
|
+
* make" and nothing else; the edge is not in the graph and will not be until
|
|
41
|
+
* somebody puts it there.
|
|
42
|
+
*/
|
|
43
|
+
function reportReview(review, out) {
|
|
44
|
+
if (review.because !== null) {
|
|
45
|
+
out(`depends : ${review.because}`);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
for (const { verdict } of review.reviewed) {
|
|
49
|
+
out(`depends : ${(0, core_1.describeDependsVerdict)(verdict)}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/* ────────────────────────────────── putting it to a person ── */
|
|
53
|
+
/**
|
|
54
|
+
* ⚠️ HOW MANY NEW QUESTIONS ONE CADENCE MAY RAISE.
|
|
55
|
+
*
|
|
56
|
+
* 🔴 NOT A HYPOTHETICAL BOUND. `proposalsForTick` re-reads every record for
|
|
57
|
+
* every goal it iterates, so an edge accepted three cadences ago is in
|
|
58
|
+
* `tick.edges` on this cadence too — and on every cadence after it. Without a
|
|
59
|
+
* cap, ten pending edges would be ten network calls per heartbeat, for ever.
|
|
60
|
+
* The approval surface deduplicates on the client reference so none of them
|
|
61
|
+
* would create a second question; the cost is entirely in making the calls.
|
|
62
|
+
*
|
|
63
|
+
* One, like `MAX_ASKS_PER_TICK` beside it, and for the same reason: a heartbeat
|
|
64
|
+
* should wait for one thing, not for a queue.
|
|
65
|
+
*/
|
|
66
|
+
exports.MAX_EDGE_FILINGS_PER_TICK = 1;
|
|
67
|
+
/**
|
|
68
|
+
* File the accepted edges of one review, within the cadence's bound.
|
|
69
|
+
*
|
|
70
|
+
* 🔴 ONLY `accepted` REACHES ANYBODY, and `fileEdge` is what enforces that —
|
|
71
|
+
* this function does not re-implement the judgement, it only decides how many
|
|
72
|
+
* of them one cadence may raise, and which ones.
|
|
73
|
+
*
|
|
74
|
+
* 🔴 `turn` DECIDES WHICH, AND WITHOUT IT THE BOUND STARVED EVERY EDGE BUT ONE.
|
|
75
|
+
* `accepted` arrives in the same order every cadence, and an edge that is
|
|
76
|
+
* already waiting for a decision stays accepted until somebody decides it — so
|
|
77
|
+
* `slice(0, max)` re-filed that one edge on every heartbeat (a deduplicated
|
|
78
|
+
* call, asking nobody anything) and the edge behind it was never raised at all.
|
|
79
|
+
* MEASURED live (LIVE-2): "already waiting for a decision: Make gol_…ejz@2 wait
|
|
80
|
+
* for gol_…e57@2" and "1 more accepted edge(s) wait for a later cadence", every
|
|
81
|
+
* cadence, while the fence had accepted the second edge long before. Starting
|
|
82
|
+
* the window at `turn` keeps the bound exactly as it was — `max` calls per
|
|
83
|
+
* cadence — and gives every accepted edge its turn within `accepted.length`
|
|
84
|
+
* cadences. The caller advances it, the way `autonomyTick` gets `rotation`.
|
|
85
|
+
*/
|
|
86
|
+
async function fileReviewed(review, ctx, approvals, max = exports.MAX_EDGE_FILINGS_PER_TICK, turn = 0) {
|
|
87
|
+
const accepted = review.reviewed.filter((r) => r.verdict.kind === 'accepted');
|
|
88
|
+
const start = accepted.length === 0 ? 0 : ((turn % accepted.length) + accepted.length) % accepted.length;
|
|
89
|
+
const inTurn = [...accepted.slice(start), ...accepted.slice(0, start)];
|
|
90
|
+
const filed = [];
|
|
91
|
+
for (const { edge, verdict } of inTurn.slice(0, max)) {
|
|
92
|
+
filed.push(await (0, edge_approval_1.fileEdge)(edge, verdict, ctx, approvals));
|
|
93
|
+
}
|
|
94
|
+
return { filed, deferred: Math.max(0, accepted.length - max) };
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The lines a person reads about what was raised.
|
|
98
|
+
*
|
|
99
|
+
* ⚠️ A DEFERRED EDGE IS SAID OUT LOUD. Silence would make a cap look like a
|
|
100
|
+
* judgement: "nothing else was accepted" and "the rest wait for the next
|
|
101
|
+
* cadence" are completely different, and only one of them is about the edges.
|
|
102
|
+
*/
|
|
103
|
+
function reportFiling(outcome, out) {
|
|
104
|
+
for (const f of outcome.filed)
|
|
105
|
+
out(`depends : ${(0, edge_approval_1.describeFiled)(f)}`);
|
|
106
|
+
if (outcome.deferred > 0) {
|
|
107
|
+
out(`depends : ${outcome.deferred} more accepted edge(s) wait for a later cadence — one is raised per heartbeat`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=depends-review.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depends-review.js","sourceRoot":"","sources":["../src/depends-review.ts"],"names":[],"mappings":";;;AAmEA,kCAkBC;AAUD,oCAQC;AA4CD,oCAeC;AASD,oCAKC;AAhLD,uCAOsB;AACtB,mDAAuG;AAkDvG;;;;;;;;GAQG;AACI,KAAK,UAAU,WAAW,CAC/B,KAAoC,EACpC,IAAuB;IAEvB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAE/D,IAAI,KAAmB,CAAC;IACxB,IAAI,CAAC;QACH,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,C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