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,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_INDEXED_BYTES = void 0;
|
|
4
|
+
exports.packageFor = packageFor;
|
|
5
|
+
exports.extractFrom = extractFrom;
|
|
6
|
+
exports.resolveSpecifier = resolveSpecifier;
|
|
7
|
+
exports.buildProjectIndex = buildProjectIndex;
|
|
8
|
+
const core_1 = require("@looply/core");
|
|
9
|
+
/**
|
|
10
|
+
* BUILDING THE INDEX FROM WHAT GIT ALREADY KNOWS.
|
|
11
|
+
*
|
|
12
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
13
|
+
* 🔴 NO PARSER, AND THAT IS A SHIPPING CONSTRAINT RATHER THAN A PREFERENCE
|
|
14
|
+
*
|
|
15
|
+
* `typescript` is NOT a dependency of this package. It resolves inside this
|
|
16
|
+
* monorepo only because the root has a hoisted dev copy — the published
|
|
17
|
+
* `looply-cli` declares three runtime dependencies and TypeScript is not among
|
|
18
|
+
* them. A `require('typescript')` here would pass every test in this repository
|
|
19
|
+
* and throw MODULE_NOT_FOUND for every real `npx looply-cli` user, and the
|
|
20
|
+
* committed-tree certifier could not catch it either: it borrows `node_modules`
|
|
21
|
+
* from the working tree, which HAS the hoisted copy.
|
|
22
|
+
*
|
|
23
|
+
* So extraction is dependency-free and deliberately CONSERVATIVE. It finds what
|
|
24
|
+
* it can state plainly and records everything else as unparsed WITH A REASON.
|
|
25
|
+
* A guessed symbol would be structural truth invented by pattern-matching,
|
|
26
|
+
* which is precisely what a deterministic index exists not to contain.
|
|
27
|
+
*
|
|
28
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
29
|
+
* WHAT IT FINDS, AND WHAT IT DOES NOT
|
|
30
|
+
*
|
|
31
|
+
* finds top-level `export` declarations and static import specifiers
|
|
32
|
+
* does not private symbols, re-export chains, dynamic imports, anything
|
|
33
|
+
* inside a namespace or a conditional block
|
|
34
|
+
*
|
|
35
|
+
* The boundary is chosen so that a false POSITIVE is nearly impossible: every
|
|
36
|
+
* pattern is anchored to the start of a line, so a match is a real top-level
|
|
37
|
+
* declaration or nothing. Missing something is recoverable — a later phase can
|
|
38
|
+
* widen it. Inventing something is not, because a graph built on it looks
|
|
39
|
+
* exactly like a graph built on evidence.
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* Files above this are recorded as `unparsed`, not read.
|
|
43
|
+
*
|
|
44
|
+
* A megabyte of source is a generated file or a vendored blob, and reading it
|
|
45
|
+
* would spend the whole budget on something no dependency question is about.
|
|
46
|
+
* Recorded rather than skipped, so a reader knows the index HAS an opinion
|
|
47
|
+
* about that path and the opinion is "I did not look".
|
|
48
|
+
*/
|
|
49
|
+
exports.MAX_INDEXED_BYTES = 512 * 1024;
|
|
50
|
+
/**
|
|
51
|
+
* The package a file belongs to.
|
|
52
|
+
*
|
|
53
|
+
* Longest prefix wins, so a nested package inside another is attributed to the
|
|
54
|
+
* nearer one rather than to whichever happened to be checked first — an order
|
|
55
|
+
* dependence would be exactly the kind of non-determinism this phase is about.
|
|
56
|
+
*/
|
|
57
|
+
function packageFor(path, packages) {
|
|
58
|
+
let best = null;
|
|
59
|
+
for (const p of packages) {
|
|
60
|
+
if (path === p.dir || path.startsWith(`${p.dir}/`)) {
|
|
61
|
+
if (best === null || p.dir.length > best.dir.length)
|
|
62
|
+
best = p;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return best === null ? null : best.name;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Split source into lines, tolerating either line ending.
|
|
69
|
+
*
|
|
70
|
+
* ⚠️ CRLF IS THE DEFAULT IN THIS REPOSITORY, NOT AN EDGE CASE. A line-anchored
|
|
71
|
+
* pattern written for `\n` matches nothing in a CRLF file and the extractor
|
|
72
|
+
* silently reports an empty file — the failure reads as "this file declares
|
|
73
|
+
* nothing" rather than as an error.
|
|
74
|
+
*/
|
|
75
|
+
function lines(text) {
|
|
76
|
+
return text.split(/\r?\n/);
|
|
77
|
+
}
|
|
78
|
+
const DECLARATION = /^export\s+(?:declare\s+)?(?:default\s+)?(?:async\s+)?(function|class|interface|type|const|let|var|enum)\s+([A-Za-z_$][A-Za-z0-9_$]*)/;
|
|
79
|
+
const KIND_OF = {
|
|
80
|
+
function: 'function',
|
|
81
|
+
class: 'class',
|
|
82
|
+
interface: 'interface',
|
|
83
|
+
type: 'type',
|
|
84
|
+
const: 'const',
|
|
85
|
+
let: 'const',
|
|
86
|
+
var: 'const',
|
|
87
|
+
enum: 'enum',
|
|
88
|
+
};
|
|
89
|
+
/** A static import or re-export, as written. Anchored: no match, no claim. */
|
|
90
|
+
const IMPORT = /^(?:import|export)\b[^'"]*from\s+['"]([^'"]+)['"]/;
|
|
91
|
+
const BARE_IMPORT = /^import\s+['"]([^'"]+)['"]/;
|
|
92
|
+
/**
|
|
93
|
+
* A statement that OPENS a braced import list without closing it on this line.
|
|
94
|
+
*
|
|
95
|
+
* 🔴 THE LINE-ANCHORED PATTERNS ABOVE CANNOT SEE A MULTI-LINE IMPORT AT ALL,
|
|
96
|
+
* AND THIS REPOSITORY IS FULL OF THEM.
|
|
97
|
+
*
|
|
98
|
+
* Measured at the Phase-13 freeze, over every tracked `.ts`/`.tsx`: the
|
|
99
|
+
* extractor saw 1,839 single-line imports and MISSED 164 multi-line ones, of
|
|
100
|
+
* which 105 were relative — that is, real edges. They are spread over 144 of
|
|
101
|
+
* 454 files, so a third of the repository had at least one dependency the index
|
|
102
|
+
* silently did not have.
|
|
103
|
+
*
|
|
104
|
+
* That was survivable while nothing consumed the index. Phase 13 consumes it to
|
|
105
|
+
* answer "what depends on this", where a missing edge is not a gap in a cache —
|
|
106
|
+
* it is a wrong answer to the question the phase exists to answer. Phase 12 said
|
|
107
|
+
* of exactly this: `Missing something is recoverable — a later phase can widen
|
|
108
|
+
* it.` This is that phase.
|
|
109
|
+
*
|
|
110
|
+
* ⚠️ WIDENED WITHOUT LOOSENING. The statement must still START at the beginning
|
|
111
|
+
* of a line, and the brace must follow `import`/`export` immediately — so
|
|
112
|
+
* `export function foo() {` cannot match, because what follows `export ` there
|
|
113
|
+
* is `function`. A false positive is still nearly impossible, which was the
|
|
114
|
+
* property worth keeping.
|
|
115
|
+
*/
|
|
116
|
+
const OPENS_LIST = /^(?:import|export)\s+(?:type\s+)?\{[^}]*$/;
|
|
117
|
+
/** The line that closes one, carrying the specifier. */
|
|
118
|
+
const CLOSES_LIST = /^\s*\}\s*from\s+['"]([^'"]+)['"]/;
|
|
119
|
+
/**
|
|
120
|
+
* How far to look for the close.
|
|
121
|
+
*
|
|
122
|
+
* Bounded so a malformed file cannot make extraction quadratic. The longest
|
|
123
|
+
* real import list in this repository is well inside it; a statement longer
|
|
124
|
+
* than this is not recorded, which is the same conservative failure the rest of
|
|
125
|
+
* this extractor makes.
|
|
126
|
+
*/
|
|
127
|
+
const MAX_IMPORT_LINES = 200;
|
|
128
|
+
/**
|
|
129
|
+
* Read one TypeScript file's exported declarations and imports.
|
|
130
|
+
*
|
|
131
|
+
* Line-anchored on purpose: a pattern that could match mid-line would find
|
|
132
|
+
* `export` inside a string or a comment and invent a symbol from it.
|
|
133
|
+
*/
|
|
134
|
+
function extractFrom(path, source) {
|
|
135
|
+
const symbols = [];
|
|
136
|
+
const imports = [];
|
|
137
|
+
const seen = new Set();
|
|
138
|
+
const all = lines(source);
|
|
139
|
+
/**
|
|
140
|
+
* Lines that are the INTERIOR of a multi-line import, and so must not be
|
|
141
|
+
* read as anything else. Without this a name inside a braced list could
|
|
142
|
+
* match a pattern meant for a statement.
|
|
143
|
+
*/
|
|
144
|
+
const consumed = new Set();
|
|
145
|
+
for (let i = 0; i < all.length; i += 1) {
|
|
146
|
+
const line = all[i] ?? '';
|
|
147
|
+
if (IMPORT.test(line) || BARE_IMPORT.test(line) || !OPENS_LIST.test(line))
|
|
148
|
+
continue;
|
|
149
|
+
for (let j = i + 1; j < Math.min(i + MAX_IMPORT_LINES, all.length); j += 1) {
|
|
150
|
+
const next = all[j] ?? '';
|
|
151
|
+
const close = CLOSES_LIST.exec(next);
|
|
152
|
+
if (close !== null) {
|
|
153
|
+
const spec = close[1];
|
|
154
|
+
imports.push({ from: path, specifier: spec, resolved: resolveSpecifier(path, spec) });
|
|
155
|
+
for (let k = i; k <= j; k += 1)
|
|
156
|
+
consumed.add(k);
|
|
157
|
+
i = j;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
// A new statement began before this one closed: the open was not an
|
|
161
|
+
// import list after all, and nothing is claimed.
|
|
162
|
+
if (/^(?:import|export)\b/.test(next))
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
all.forEach((line, i) => {
|
|
167
|
+
if (consumed.has(i))
|
|
168
|
+
return;
|
|
169
|
+
const decl = DECLARATION.exec(line);
|
|
170
|
+
if (decl !== null) {
|
|
171
|
+
const [, keyword, name] = decl;
|
|
172
|
+
const kind = KIND_OF[keyword ?? ''];
|
|
173
|
+
if (kind !== undefined && name !== undefined) {
|
|
174
|
+
const id = `${path}#${name}`;
|
|
175
|
+
// One declaration per name per file: an overload set is one symbol, and
|
|
176
|
+
// a duplicate id would make the index depend on how many times a name
|
|
177
|
+
// happened to appear.
|
|
178
|
+
if (!seen.has(id)) {
|
|
179
|
+
seen.add(id);
|
|
180
|
+
symbols.push({ id, name, kind, file: path, line: i + 1 });
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
const spec = IMPORT.exec(line)?.[1] ?? BARE_IMPORT.exec(line)?.[1];
|
|
185
|
+
if (spec !== undefined) {
|
|
186
|
+
imports.push({ from: path, specifier: spec, resolved: resolveSpecifier(path, spec) });
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
return { symbols, imports };
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Where a specifier points, when that can be answered without guessing.
|
|
193
|
+
*
|
|
194
|
+
* 🔴 RELATIVE SPECIFIERS ONLY. A bare specifier may be a package OR a path
|
|
195
|
+
* alias configured in a tsconfig this extractor does not read, and inventing a
|
|
196
|
+
* target would put a relationship in the index that nothing established.
|
|
197
|
+
* `null` means NOT RESOLVED — it does not mean external.
|
|
198
|
+
*
|
|
199
|
+
* ⚠️ THE EXTENSION IS NOT GUESSED EITHER. `./foo` could be `foo.ts`, `foo.tsx`
|
|
200
|
+
* or `foo/index.ts`, and choosing one would be right most of the time, which is
|
|
201
|
+
* the worst possible property for a fact somebody builds on. The caller
|
|
202
|
+
* resolves against the real file list; this reports the normalised path only.
|
|
203
|
+
*/
|
|
204
|
+
function resolveSpecifier(from, specifier) {
|
|
205
|
+
if (!specifier.startsWith('.'))
|
|
206
|
+
return null;
|
|
207
|
+
const dir = from.includes('/') ? from.slice(0, from.lastIndexOf('/')) : '';
|
|
208
|
+
const joined = `${dir}/${specifier}`;
|
|
209
|
+
const parts = [];
|
|
210
|
+
for (const part of joined.split('/')) {
|
|
211
|
+
if (part === '' || part === '.')
|
|
212
|
+
continue;
|
|
213
|
+
if (part === '..') {
|
|
214
|
+
if (parts.length === 0)
|
|
215
|
+
return null; // escapes the project; not ours
|
|
216
|
+
parts.pop();
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
parts.push(part);
|
|
220
|
+
}
|
|
221
|
+
return parts.length === 0 ? null : parts.join('/');
|
|
222
|
+
}
|
|
223
|
+
/** Attach a real file to a normalised specifier, or leave it unresolved. */
|
|
224
|
+
function bindImports(imports, known) {
|
|
225
|
+
const candidates = (base) => [
|
|
226
|
+
base,
|
|
227
|
+
`${base}.ts`,
|
|
228
|
+
`${base}.tsx`,
|
|
229
|
+
`${base}/index.ts`,
|
|
230
|
+
`${base}/index.tsx`,
|
|
231
|
+
];
|
|
232
|
+
return imports.map((i) => {
|
|
233
|
+
if (i.resolved === null)
|
|
234
|
+
return i;
|
|
235
|
+
const hit = candidates(i.resolved).find((c) => known.has(c));
|
|
236
|
+
// Unresolved stays unresolved: a specifier pointing at a file that is not
|
|
237
|
+
// in the index is a fact about the index, not a licence to invent one.
|
|
238
|
+
return { ...i, resolved: hit ?? null };
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Build the whole index for a revision.
|
|
243
|
+
*
|
|
244
|
+
* Every collection is sorted before it is returned, so the caller cannot
|
|
245
|
+
* accidentally depend on the order git happened to emit.
|
|
246
|
+
*/
|
|
247
|
+
async function buildProjectIndex(input) {
|
|
248
|
+
const treeSha = input.treeSha ?? (await input.git.headTreeSha());
|
|
249
|
+
const entries = await input.git.listTree(treeSha);
|
|
250
|
+
const files = [];
|
|
251
|
+
const rawSymbols = [];
|
|
252
|
+
const rawImports = [];
|
|
253
|
+
for (const entry of entries) {
|
|
254
|
+
const path = (0, core_1.canonicalPath)(entry.path);
|
|
255
|
+
const language = (0, core_1.languageOf)(path);
|
|
256
|
+
const base = {
|
|
257
|
+
path,
|
|
258
|
+
blobSha: entry.blobSha,
|
|
259
|
+
bytes: entry.bytes,
|
|
260
|
+
language,
|
|
261
|
+
packageName: packageFor(path, input.packages),
|
|
262
|
+
isTest: (0, core_1.isTestPath)(path),
|
|
263
|
+
};
|
|
264
|
+
if (language !== 'typescript') {
|
|
265
|
+
files.push({ ...base, status: { kind: 'unparsed', because: 'unsupported-language' } });
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
if (entry.bytes > exports.MAX_INDEXED_BYTES) {
|
|
269
|
+
files.push({ ...base, status: { kind: 'unparsed', because: 'too-large' } });
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
let source;
|
|
273
|
+
try {
|
|
274
|
+
source = await input.git.readBlob(entry.blobSha);
|
|
275
|
+
}
|
|
276
|
+
catch {
|
|
277
|
+
// One unreadable blob does not fail the index. It is recorded as a fact
|
|
278
|
+
// about that file, and every other file is still described.
|
|
279
|
+
files.push({ ...base, status: { kind: 'unparsed', because: 'unreadable' } });
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
282
|
+
const { symbols, imports } = extractFrom(path, source);
|
|
283
|
+
rawSymbols.push(...symbols);
|
|
284
|
+
rawImports.push(...imports);
|
|
285
|
+
files.push({ ...base, status: { kind: 'indexed' } });
|
|
286
|
+
}
|
|
287
|
+
const known = new Set(files.map((f) => f.path));
|
|
288
|
+
return {
|
|
289
|
+
schema: core_1.PROJECT_INDEX_SCHEMA,
|
|
290
|
+
extractor: core_1.INDEX_EXTRACTOR_VERSION,
|
|
291
|
+
treeSha,
|
|
292
|
+
files: (0, core_1.sortFiles)(files),
|
|
293
|
+
symbols: (0, core_1.sortSymbols)(rawSymbols),
|
|
294
|
+
imports: (0, core_1.sortImports)(bindImports(rawImports, known)),
|
|
295
|
+
packages: [...input.packages.map((p) => p.name)].sort(),
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
//# sourceMappingURL=project-index-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-index-builder.js","sourceRoot":"","sources":["../src/project-index-builder.ts"],"names":[],"mappings":";;;AAgFA,gCAQC;AAkFD,kCAyDC;AAeD,4CAeC;AA6BD,8CAuDC;AArVD,uCAasB;AAGtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;;;;;GAOG;AACU,QAAA,iBAAiB,GAAG,GAAG,GAAG,IAAI,CAAC;AAgB5C;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY,EAAE,QAAgC;IACvE,IAAI,IAAI,GAAuB,IAAI,CAAC;IACpC,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;QACzB,IAAI,IAAI,KAAK,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC;YACnD,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM;gBAAE,IAAI,GAAG,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IACD,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AAC1C,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,WAAW,GACf,sIAAsI,CAAC;AAEzI,MAAM,OAAO,GAA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|
|
1
|
+
import type { ProjectIndexSnapshot } from '@looply/core';
|
|
2
|
+
import type { MemoryDraft } from './project-memory-store';
|
|
3
|
+
/**
|
|
4
|
+
* WHAT THE INDEX ESTABLISHES, AS MEMORY A PLANNER CAN READ.
|
|
5
|
+
*
|
|
6
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
7
|
+
* THIS CLOSES TWO GAPS AT ONCE, AND BOTH WERE RECORDED AS KNOWN LIMITS
|
|
8
|
+
*
|
|
9
|
+
* Phase 11 froze with `fact` having NO PRODUCTION PRODUCER — the machinery was
|
|
10
|
+
* proven and unfed, which is exactly the shape Phase 9 shipped and had to fix.
|
|
11
|
+
* Phase 12 then built an index that nothing consumed. Each was the other's
|
|
12
|
+
* missing half.
|
|
13
|
+
*
|
|
14
|
+
* 🔴 THE DIRECTION IS ONE-WAY AND MUST STAY THAT WAY. The repository produces
|
|
15
|
+
* the index; the index may produce memory. Memory NEVER produces index truth —
|
|
16
|
+
* an inference that could become a structural fact would be a model writing the
|
|
17
|
+
* map, which is the thing both phases are built to prevent.
|
|
18
|
+
*
|
|
19
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
20
|
+
* WHY SO FEW FACTS
|
|
21
|
+
*
|
|
22
|
+
* The index knows about hundreds of files and thousands of symbols. Almost none
|
|
23
|
+
* of that belongs in memory: memory is BOUNDED, a planner reads a handful of
|
|
24
|
+
* lines, and flooding it with per-file facts would push out the decisions and
|
|
25
|
+
* the failed approaches that are the reason it exists.
|
|
26
|
+
*
|
|
27
|
+
* So this records only what is true of the PROJECT rather than of a file — the
|
|
28
|
+
* shape of the workspace, which is small, stable across revisions, and the sort
|
|
29
|
+
* of thing a plan is actually written against. Per-file questions are what the
|
|
30
|
+
* index QUERY is for; memory is for what a person would say out loud.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* A ceiling, not a target.
|
|
34
|
+
*
|
|
35
|
+
* If a repository somehow declared fifty packages, the answer is still that a
|
|
36
|
+
* planner reads a handful of lines. The bound is here rather than at the caller
|
|
37
|
+
* because a caller that forgot it would flood memory silently.
|
|
38
|
+
*/
|
|
39
|
+
export declare const MAX_INDEX_FACTS = 12;
|
|
40
|
+
/**
|
|
41
|
+
* The facts the index establishes about a project.
|
|
42
|
+
*
|
|
43
|
+
* Every one is:
|
|
44
|
+
* - `deterministic`, because it came from committed content, not a model
|
|
45
|
+
* - stamped with the tree it was observed at, so it goes stale honestly when
|
|
46
|
+
* the repository changes shape
|
|
47
|
+
* - about the project rather than about a file, so it stays true long enough
|
|
48
|
+
* to be worth remembering
|
|
49
|
+
*/
|
|
50
|
+
export declare function factsFromIndex(snapshot: ProjectIndexSnapshot, projectKey: string): MemoryDraft[];
|
|
51
|
+
//# sourceMappingURL=project-index-facts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-index-facts.d.ts","sourceRoot":"","sources":["../src/project-index-facts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,oBAAoB,EAC9B,UAAU,EAAE,MAAM,GACjB,WAAW,EAAE,CA2Bf"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_INDEX_FACTS = void 0;
|
|
4
|
+
exports.factsFromIndex = factsFromIndex;
|
|
5
|
+
/**
|
|
6
|
+
* WHAT THE INDEX ESTABLISHES, AS MEMORY A PLANNER CAN READ.
|
|
7
|
+
*
|
|
8
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
9
|
+
* THIS CLOSES TWO GAPS AT ONCE, AND BOTH WERE RECORDED AS KNOWN LIMITS
|
|
10
|
+
*
|
|
11
|
+
* Phase 11 froze with `fact` having NO PRODUCTION PRODUCER — the machinery was
|
|
12
|
+
* proven and unfed, which is exactly the shape Phase 9 shipped and had to fix.
|
|
13
|
+
* Phase 12 then built an index that nothing consumed. Each was the other's
|
|
14
|
+
* missing half.
|
|
15
|
+
*
|
|
16
|
+
* 🔴 THE DIRECTION IS ONE-WAY AND MUST STAY THAT WAY. The repository produces
|
|
17
|
+
* the index; the index may produce memory. Memory NEVER produces index truth —
|
|
18
|
+
* an inference that could become a structural fact would be a model writing the
|
|
19
|
+
* map, which is the thing both phases are built to prevent.
|
|
20
|
+
*
|
|
21
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
22
|
+
* WHY SO FEW FACTS
|
|
23
|
+
*
|
|
24
|
+
* The index knows about hundreds of files and thousands of symbols. Almost none
|
|
25
|
+
* of that belongs in memory: memory is BOUNDED, a planner reads a handful of
|
|
26
|
+
* lines, and flooding it with per-file facts would push out the decisions and
|
|
27
|
+
* the failed approaches that are the reason it exists.
|
|
28
|
+
*
|
|
29
|
+
* So this records only what is true of the PROJECT rather than of a file — the
|
|
30
|
+
* shape of the workspace, which is small, stable across revisions, and the sort
|
|
31
|
+
* of thing a plan is actually written against. Per-file questions are what the
|
|
32
|
+
* index QUERY is for; memory is for what a person would say out loud.
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* A ceiling, not a target.
|
|
36
|
+
*
|
|
37
|
+
* If a repository somehow declared fifty packages, the answer is still that a
|
|
38
|
+
* planner reads a handful of lines. The bound is here rather than at the caller
|
|
39
|
+
* because a caller that forgot it would flood memory silently.
|
|
40
|
+
*/
|
|
41
|
+
exports.MAX_INDEX_FACTS = 12;
|
|
42
|
+
/**
|
|
43
|
+
* The facts the index establishes about a project.
|
|
44
|
+
*
|
|
45
|
+
* Every one is:
|
|
46
|
+
* - `deterministic`, because it came from committed content, not a model
|
|
47
|
+
* - stamped with the tree it was observed at, so it goes stale honestly when
|
|
48
|
+
* the repository changes shape
|
|
49
|
+
* - about the project rather than about a file, so it stays true long enough
|
|
50
|
+
* to be worth remembering
|
|
51
|
+
*/
|
|
52
|
+
function factsFromIndex(snapshot, projectKey) {
|
|
53
|
+
const revision = { treeSha: snapshot.treeSha };
|
|
54
|
+
const drafts = [];
|
|
55
|
+
for (const name of snapshot.packages) {
|
|
56
|
+
const dir = directoryOf(snapshot, name);
|
|
57
|
+
if (dir === null)
|
|
58
|
+
continue;
|
|
59
|
+
drafts.push({
|
|
60
|
+
kind: 'fact',
|
|
61
|
+
source: 'deterministic',
|
|
62
|
+
subject: `package ${name}`,
|
|
63
|
+
content: `lives at ${dir}`,
|
|
64
|
+
/**
|
|
65
|
+
* The index snapshot is the evidence, named by the revision it describes.
|
|
66
|
+
* A reader can rebuild that exact index and check the claim, which is what
|
|
67
|
+
* separates a fact from a sentence.
|
|
68
|
+
*/
|
|
69
|
+
provenance: { via: 'project-index', refs: [snapshot.treeSha] },
|
|
70
|
+
// NOT scoped to a path: this is about a package, and a `path` scope would
|
|
71
|
+
// make it expire whenever that one file changed.
|
|
72
|
+
scope: { projectKey },
|
|
73
|
+
revision,
|
|
74
|
+
});
|
|
75
|
+
if (drafts.length >= exports.MAX_INDEX_FACTS)
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
return drafts;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Where a package's files live, derived from the files attributed to it.
|
|
82
|
+
*
|
|
83
|
+
* ⚠️ THE COMMON PREFIX OF ITS OWN FILES, NOT A GUESS FROM ITS NAME. A package
|
|
84
|
+
* called `@looply/core` need not live in `core` — this repository's own
|
|
85
|
+
* `looply-cli` lives in `packages/cli`, where the name and the directory do not
|
|
86
|
+
* match at all. Deriving the directory from the name would be right often
|
|
87
|
+
* enough to look correct and wrong exactly where it matters.
|
|
88
|
+
*/
|
|
89
|
+
function directoryOf(snapshot, packageName) {
|
|
90
|
+
/**
|
|
91
|
+
* The DIRECTORIES, not the paths — a test caught this. With a single file,
|
|
92
|
+
* the common prefix of the full paths is the file itself, and the fact would
|
|
93
|
+
* read "package X lives at packages/core/src/a.ts", which names a file and
|
|
94
|
+
* calls it a home.
|
|
95
|
+
*/
|
|
96
|
+
const mine = snapshot.files
|
|
97
|
+
.filter((f) => f.packageName === packageName)
|
|
98
|
+
.map((f) => (f.path.includes('/') ? f.path.slice(0, f.path.lastIndexOf('/')) : ''));
|
|
99
|
+
if (mine.length === 0)
|
|
100
|
+
return null;
|
|
101
|
+
const first = mine[0].split('/');
|
|
102
|
+
let common = first.length;
|
|
103
|
+
for (const path of mine) {
|
|
104
|
+
const parts = path.split('/');
|
|
105
|
+
let i = 0;
|
|
106
|
+
while (i < common && i < parts.length && parts[i] === first[i])
|
|
107
|
+
i += 1;
|
|
108
|
+
common = i;
|
|
109
|
+
}
|
|
110
|
+
// A package whose files share no directory — because they sit at the
|
|
111
|
+
// repository root, or diverge immediately — is not describable this way.
|
|
112
|
+
// "lives at " is worse than silence, and "lives at the repository root" is
|
|
113
|
+
// true and useless.
|
|
114
|
+
const dir = first.slice(0, common).join('/');
|
|
115
|
+
return dir === '' ? null : dir;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=project-index-facts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-index-facts.js","sourceRoot":"","sources":["../src/project-index-facts.ts"],"names":[],"mappings":";;;AAoDA,wCA8BC;AA/ED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;GAMG;AACU,QAAA,eAAe,GAAG,EAAE,CAAC;AAElC;;;;;;;;;GASG;AACH,SAAgB,cAAc,CAC5B,QAA8B,EAC9B,UAAkB;IAElB,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAC;IAC/C,MAAM,MAAM,GAAkB,EAAE,CAAC;IAEjC,KAAK,M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AG,CAAC,CAAC;IAClC,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC1B,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,OAAO,CAAC,GAAG,MAAM,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;YAAE,CAAC,IAAI,CAAC,CAAC;QACvE,MAAM,GAAG,CAAC,CAAC;IACb,CAAC;IACD,qEAAqE;IACrE,yEAAyE;IACzE,2EAA2E;IAC3E,oBAAoB;IACpB,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { type ProjectIndexSnapshot } from '@looply/core';
|
|
2
|
+
import type { LedgerFs } from './ledger-store';
|
|
3
|
+
/**
|
|
4
|
+
* THE INDEX ON DISK — `.looply/state/project-index-<tree>.json`.
|
|
5
|
+
*
|
|
6
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
7
|
+
* 🔴 A CACHE, NOT AN AUTHORITY
|
|
8
|
+
*
|
|
9
|
+
* The repository is the truth and this is derived from it. Losing every
|
|
10
|
+
* snapshot costs a rebuild and nothing else, which is why this store is allowed
|
|
11
|
+
* to be simpler than the memory ledger: there is no history to protect, no
|
|
12
|
+
* concurrent writer whose record could be lost, and no claim that outlives its
|
|
13
|
+
* evidence. If it disagrees with the repository, it is wrong and it is thrown
|
|
14
|
+
* away.
|
|
15
|
+
*
|
|
16
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
17
|
+
* KEYED ON THE TREE, WHICH IS WHAT "INCREMENTAL" MEANS HERE
|
|
18
|
+
*
|
|
19
|
+
* The phase permits an incremental rebuild provided its output equals a clean
|
|
20
|
+
* one. This takes the other road and does not patch a snapshot at all: because
|
|
21
|
+
* enumeration comes from the git index rather than a directory walk, a full
|
|
22
|
+
* rebuild is already cheap, and a patching path that must PROVE it equals a
|
|
23
|
+
* clean rebuild is pure risk for a saving nobody needs.
|
|
24
|
+
*
|
|
25
|
+
* So the cache is content-addressed by tree. Same tree, reuse. Different tree,
|
|
26
|
+
* rebuild whole. There is no third state in which a snapshot describes a mix of
|
|
27
|
+
* two revisions, which is the failure a patching implementation would have to
|
|
28
|
+
* work to avoid.
|
|
29
|
+
*
|
|
30
|
+
* ⚠️ THIS IS ALSO WHY THERE IS NO FILE WATCHER. A watcher would be an
|
|
31
|
+
* optimisation whose correctness depended on never missing an event; the tree
|
|
32
|
+
* sha is a question that can simply be asked, and a missed answer is not
|
|
33
|
+
* possible.
|
|
34
|
+
*/
|
|
35
|
+
export type IndexStoreState = 'ok' | 'unreadable';
|
|
36
|
+
/**
|
|
37
|
+
* How many snapshots to keep.
|
|
38
|
+
*
|
|
39
|
+
* Small on purpose: a snapshot is worth keeping only while somebody might
|
|
40
|
+
* still be on that revision, and a rebuild is cheap. The alternative — an
|
|
41
|
+
* unbounded directory of derived files — is the defect that arrives months
|
|
42
|
+
* later on somebody else's machine, which this codebase has already met once.
|
|
43
|
+
*/
|
|
44
|
+
export declare const MAX_SNAPSHOTS = 4;
|
|
45
|
+
export declare class ProjectIndexStore {
|
|
46
|
+
private readonly stateDir;
|
|
47
|
+
private readonly fs;
|
|
48
|
+
private state;
|
|
49
|
+
constructor(stateDir: string, fs: LedgerFs & {
|
|
50
|
+
readDir?: (path: string) => Promise<string[]>;
|
|
51
|
+
});
|
|
52
|
+
private pathFor;
|
|
53
|
+
status(): IndexStoreState;
|
|
54
|
+
/**
|
|
55
|
+
* The snapshot for a tree, or null.
|
|
56
|
+
*
|
|
57
|
+
* 🔴 REFUSES A SNAPSHOT THAT DOES NOT DESCRIBE THE TREE ASKED FOR. The file
|
|
58
|
+
* name says which revision it is, and so does the content; if they disagree,
|
|
59
|
+
* something copied a file or a write was interrupted, and the honest answer
|
|
60
|
+
* is "I do not have one" rather than a plausible index of the wrong revision.
|
|
61
|
+
* A stale index is worse than no index, because a reader cannot tell.
|
|
62
|
+
*/
|
|
63
|
+
load(treeSha: string,
|
|
64
|
+
/**
|
|
65
|
+
* 🔴 THE PACKAGE SET THE CALLER WILL BUILD WITH, AND WITHOUT IT THIS CACHE
|
|
66
|
+
* IS KEYED ON LESS THAN THE SNAPSHOT DEPENDS ON.
|
|
67
|
+
*
|
|
68
|
+
* Found by an adversarial review during Phase 13, and it is a fourth class
|
|
69
|
+
* of staleness none of the checks below can see. A snapshot is a function
|
|
70
|
+
* of (tree, packages) — `run-cmd.ts` builds it with
|
|
71
|
+
* `workspacePackages(config)`, derived from `config.scope.free`, which is
|
|
72
|
+
* read from a WORKING-TREE config file that no tree sha covers. That value
|
|
73
|
+
* reaches the snapshot twice: every file’s `packageName`, and the signed
|
|
74
|
+
* `packages` array.
|
|
75
|
+
*
|
|
76
|
+
* So a person adding a workspace to their config, without committing and
|
|
77
|
+
* without any code changing, got the previous package set back for ever
|
|
78
|
+
* under a matching key — and `factsFromIndex` then wrote "package X lives
|
|
79
|
+
* at Y" from it. No version bump is even conceptually available for that
|
|
80
|
+
* class: nothing about the CODE changed.
|
|
81
|
+
*
|
|
82
|
+
* ⚠️ OPTIONAL, SO EVERY EXISTING CALLER KEEPS WORKING — but a caller that
|
|
83
|
+
* omits it is asking to be handed a snapshot built under a package set
|
|
84
|
+
* nobody compared. The two production callers both pass it.
|
|
85
|
+
*/
|
|
86
|
+
expectedPackages?: readonly string[]): Promise<ProjectIndexSnapshot | null>;
|
|
87
|
+
/**
|
|
88
|
+
* Write a snapshot for its own tree.
|
|
89
|
+
*
|
|
90
|
+
* Temp-then-rename, so a reader never sees half a file — the same contract
|
|
91
|
+
* every other durable write in this repository uses, and the reason `load`
|
|
92
|
+
* can treat unparseable JSON as merely absent rather than as corruption to
|
|
93
|
+
* reason about.
|
|
94
|
+
*/
|
|
95
|
+
save(snapshot: ProjectIndexSnapshot): Promise<void>;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=project-index-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-index-store.d.ts","sourceRoot":"","sources":["../src/project-index-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,YAAY,CAAC;AAElD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,qBAAa,iBAAiB;IAI1B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,EAAE;IAJrB,OAAO,CAAC,KAAK,CAAyB;gBAGnB,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,QAAQ,GAAG;QAAE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;KAAE;IAGnF,OAAO,CAAC,OAAO;IAIf,MAAM,IAAI,eAAe;IAIzB;;;;;;;;OAQG;IACG,IAAI,CACR,OAAO,EAAE,MAAM;IACf;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,GACnC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC;IA2CvC;;;;;;;OAOG;IACG,IAAI,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;CAsB1D"}
|