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,56 @@
|
|
|
1
|
+
import type { ProjectIndexSnapshot } from '@looply/core';
|
|
2
|
+
import { type LooplyConfig } from './config';
|
|
3
|
+
import { type PackageRoot } from './project-index-builder';
|
|
4
|
+
/**
|
|
5
|
+
* THE INDEX OF THE COMMITTED TREE AT HEAD — loaded or built exactly as
|
|
6
|
+
* `looply run` does it, so a measurement made here and one made by a run are
|
|
7
|
+
* the same measurement.
|
|
8
|
+
*
|
|
9
|
+
* `looply source reconcile` needs the project index (Phase 12's derived,
|
|
10
|
+
* model-free map of the repository) and the tree it describes. Both live on
|
|
11
|
+
* the machine that holds the repository; the server has neither. This module
|
|
12
|
+
* is the one place that answers "which tree, and what does the index say
|
|
13
|
+
* about it", shared by the run (through `workspacePackages`) and the verb.
|
|
14
|
+
*
|
|
15
|
+
* ⚠️ THE PACKAGE SET IS PART OF THE CACHE KEY. `ProjectIndexStore.load` refuses
|
|
16
|
+
* a snapshot built under a different workspace list, so the list must be
|
|
17
|
+
* derived the same way here as in the run — which is why the derivation moved
|
|
18
|
+
* here rather than being written a second time.
|
|
19
|
+
*/
|
|
20
|
+
/** Where a project declares itself. The same file every other verb reads. */
|
|
21
|
+
export declare const CONFIG_PATH = ".looply/config.yaml";
|
|
22
|
+
/**
|
|
23
|
+
* The workspace packages, as the index needs them.
|
|
24
|
+
*
|
|
25
|
+
* ⚠️ DERIVED FROM `scope.free`, WHICH IS WHAT THE PROJECT ITSELF DECLARED. The
|
|
26
|
+
* audit found `detectWorkspaces` already produces exactly this at `looply init`
|
|
27
|
+
* and writes it into the config as `${w}/**` patterns — so reading it back is
|
|
28
|
+
* reusing a tested producer rather than inventing a second answer to the same
|
|
29
|
+
* question. A package the config does not mention is one the project does not
|
|
30
|
+
* consider part of itself.
|
|
31
|
+
*/
|
|
32
|
+
export declare function workspacePackages(config: LooplyConfig): PackageRoot[];
|
|
33
|
+
export type IndexForHead = {
|
|
34
|
+
ok: true;
|
|
35
|
+
treeSha: string;
|
|
36
|
+
snapshot: ProjectIndexSnapshot;
|
|
37
|
+
cached: boolean;
|
|
38
|
+
} | {
|
|
39
|
+
ok: false;
|
|
40
|
+
because: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* HEAD's committed tree and its index, from the cache when the same tree and
|
|
44
|
+
* package set were indexed before, built otherwise.
|
|
45
|
+
*
|
|
46
|
+
* Not a git repository, or one with no commit: `ok: false` with the reason —
|
|
47
|
+
* a reconciliation needs a tree to be keyed by, and inventing one would make
|
|
48
|
+
* the record say something about a revision that does not exist.
|
|
49
|
+
*/
|
|
50
|
+
export declare function indexForHead(cwd: string): Promise<IndexForHead>;
|
|
51
|
+
/**
|
|
52
|
+
* The same index for ANY committed tree of this repository — read from git objects, so no
|
|
53
|
+
* checkout is needed (F25: the lane measures the integration tip from the project checkout).
|
|
54
|
+
*/
|
|
55
|
+
export declare function indexForTree(cwd: string, treeSha: string): Promise<IndexForHead>;
|
|
56
|
+
//# sourceMappingURL=index-for-head.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-for-head.d.ts","sourceRoot":"","sources":["../src/index-for-head.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAG1D,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG9E;;;;;;;;;;;;;;;GAeG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,WAAW,wBAAwB,CAAC;AAEjD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW,EAAE,CAOrE;AAED,MAAM,MAAM,YAAY,GACpB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,oBAAoB,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAC9E;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnC;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAUrE;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAgBtF"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONFIG_PATH = void 0;
|
|
4
|
+
exports.workspacePackages = workspacePackages;
|
|
5
|
+
exports.indexForHead = indexForHead;
|
|
6
|
+
exports.indexForTree = indexForTree;
|
|
7
|
+
const node_fs_1 = require("node:fs");
|
|
8
|
+
const node_path_1 = require("node:path");
|
|
9
|
+
const config_1 = require("./config");
|
|
10
|
+
const git_driver_1 = require("./git-driver");
|
|
11
|
+
const ledger_store_1 = require("./ledger-store");
|
|
12
|
+
const project_index_builder_1 = require("./project-index-builder");
|
|
13
|
+
const project_index_store_1 = require("./project-index-store");
|
|
14
|
+
/**
|
|
15
|
+
* THE INDEX OF THE COMMITTED TREE AT HEAD — loaded or built exactly as
|
|
16
|
+
* `looply run` does it, so a measurement made here and one made by a run are
|
|
17
|
+
* the same measurement.
|
|
18
|
+
*
|
|
19
|
+
* `looply source reconcile` needs the project index (Phase 12's derived,
|
|
20
|
+
* model-free map of the repository) and the tree it describes. Both live on
|
|
21
|
+
* the machine that holds the repository; the server has neither. This module
|
|
22
|
+
* is the one place that answers "which tree, and what does the index say
|
|
23
|
+
* about it", shared by the run (through `workspacePackages`) and the verb.
|
|
24
|
+
*
|
|
25
|
+
* ⚠️ THE PACKAGE SET IS PART OF THE CACHE KEY. `ProjectIndexStore.load` refuses
|
|
26
|
+
* a snapshot built under a different workspace list, so the list must be
|
|
27
|
+
* derived the same way here as in the run — which is why the derivation moved
|
|
28
|
+
* here rather than being written a second time.
|
|
29
|
+
*/
|
|
30
|
+
/** Where a project declares itself. The same file every other verb reads. */
|
|
31
|
+
exports.CONFIG_PATH = '.looply/config.yaml';
|
|
32
|
+
/**
|
|
33
|
+
* The workspace packages, as the index needs them.
|
|
34
|
+
*
|
|
35
|
+
* ⚠️ DERIVED FROM `scope.free`, WHICH IS WHAT THE PROJECT ITSELF DECLARED. The
|
|
36
|
+
* audit found `detectWorkspaces` already produces exactly this at `looply init`
|
|
37
|
+
* and writes it into the config as `${w}/**` patterns — so reading it back is
|
|
38
|
+
* reusing a tested producer rather than inventing a second answer to the same
|
|
39
|
+
* question. A package the config does not mention is one the project does not
|
|
40
|
+
* consider part of itself.
|
|
41
|
+
*/
|
|
42
|
+
function workspacePackages(config) {
|
|
43
|
+
const dirs = new Set();
|
|
44
|
+
for (const pattern of config.scope.free) {
|
|
45
|
+
const dir = pattern.replace(/\/\*+$/, '').replace(/\/+$/, '');
|
|
46
|
+
if (dir !== '' && dir !== '**' && !dir.includes('*'))
|
|
47
|
+
dirs.add(dir);
|
|
48
|
+
}
|
|
49
|
+
return [...dirs].sort().map((dir) => ({ name: dir, dir }));
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* HEAD's committed tree and its index, from the cache when the same tree and
|
|
53
|
+
* package set were indexed before, built otherwise.
|
|
54
|
+
*
|
|
55
|
+
* Not a git repository, or one with no commit: `ok: false` with the reason —
|
|
56
|
+
* a reconciliation needs a tree to be keyed by, and inventing one would make
|
|
57
|
+
* the record say something about a revision that does not exist.
|
|
58
|
+
*/
|
|
59
|
+
async function indexForHead(cwd) {
|
|
60
|
+
const git = new git_driver_1.GitDriver((0, git_driver_1.nodeGitExec)(cwd));
|
|
61
|
+
let treeSha;
|
|
62
|
+
try {
|
|
63
|
+
treeSha = await git.headTreeSha();
|
|
64
|
+
}
|
|
65
|
+
catch (e) {
|
|
66
|
+
const detail = e instanceof Error ? e.message.split('\n')[0] ?? '' : String(e);
|
|
67
|
+
return { ok: false, because: `not a git repository with a commit at ${cwd} (${detail})` };
|
|
68
|
+
}
|
|
69
|
+
return indexForTree(cwd, treeSha);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The same index for ANY committed tree of this repository — read from git objects, so no
|
|
73
|
+
* checkout is needed (F25: the lane measures the integration tip from the project checkout).
|
|
74
|
+
*/
|
|
75
|
+
async function indexForTree(cwd, treeSha) {
|
|
76
|
+
const git = new git_driver_1.GitDriver((0, git_driver_1.nodeGitExec)(cwd));
|
|
77
|
+
const packages = packagesFor(cwd);
|
|
78
|
+
const store = new project_index_store_1.ProjectIndexStore((0, git_driver_1.executionStateDir)(cwd), ledger_store_1.nodeLedgerFs);
|
|
79
|
+
const cached = await store.load(treeSha, packages.map((pkg) => pkg.name));
|
|
80
|
+
if (cached !== null)
|
|
81
|
+
return { ok: true, treeSha, snapshot: cached, cached: true };
|
|
82
|
+
const built = await (0, project_index_builder_1.buildProjectIndex)({ git, packages, treeSha });
|
|
83
|
+
try {
|
|
84
|
+
await store.save(built);
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// A cache, not an authority: the measurement stands without it.
|
|
88
|
+
}
|
|
89
|
+
return { ok: true, treeSha, snapshot: built, cached: false };
|
|
90
|
+
}
|
|
91
|
+
/** The declared workspace packages, or none when there is no config to read them from. */
|
|
92
|
+
function packagesFor(cwd) {
|
|
93
|
+
const path = (0, node_path_1.join)(cwd, exports.CONFIG_PATH);
|
|
94
|
+
if (!(0, node_fs_1.existsSync)(path))
|
|
95
|
+
return [];
|
|
96
|
+
try {
|
|
97
|
+
return workspacePackages((0, config_1.parseConfig)((0, node_fs_1.readFileSync)(path, 'utf8')));
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=index-for-head.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-for-head.js","sourceRoot":"","sources":["../src/index-for-head.ts"],"names":[],"mappings":";;;AAuCA,8CAOC;AAcD,oCAUC;AAMD,oCAgBC;AA5FD,qCAAmD;AACnD,yCAAiC;AAEjC,qCAA0D;AAC1D,6CAAyE;AACzE,iDAA8C;AAC9C,mEAA8E;AAC9E,+DAA0D;AAE1D;;;;;;;;;;;;;;;GAeG;AAEH,6EAA6E;AAChE,QAAA,WAAW,GAAG,qBAAqB,CAA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,OAAO,iBAAiB,CAAC,IAAA,oBAAW,EAAC,IAAA,sBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACpE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export * from './glob';
|
|
2
|
+
export * from './gate';
|
|
3
|
+
export * from './agent-driver';
|
|
4
|
+
export * from './command-runner';
|
|
5
|
+
export * from './git-driver';
|
|
6
|
+
export * from './init-detect';
|
|
7
|
+
export * from './notify';
|
|
8
|
+
export * from './notify-cadence';
|
|
9
|
+
export * from './prover';
|
|
10
|
+
export * from './notify-channel';
|
|
11
|
+
export * from './config';
|
|
12
|
+
export * from './run-cmd';
|
|
13
|
+
export * from './run-launcher';
|
|
14
|
+
export * from './scan';
|
|
15
|
+
export * from './scan-cmd';
|
|
16
|
+
export * from './scan-events';
|
|
17
|
+
export * from './machine-store';
|
|
18
|
+
export * from './server-client';
|
|
19
|
+
export * from './pair-cmd';
|
|
20
|
+
export * from './daemon';
|
|
21
|
+
export * from './daemon-cmd';
|
|
22
|
+
export * from './sync';
|
|
23
|
+
export * from './syncing-ledger';
|
|
24
|
+
export * from './ui';
|
|
25
|
+
export * from './welcome';
|
|
26
|
+
export * from './agent-cmd';
|
|
27
|
+
export * from './doctor';
|
|
28
|
+
export * from './control-file';
|
|
29
|
+
export * from './evidence-cache';
|
|
30
|
+
export * from './ledger-store';
|
|
31
|
+
export * from './queue-store';
|
|
32
|
+
export * from './report-cmd';
|
|
33
|
+
export * from './reverify';
|
|
34
|
+
export * from './round-runner';
|
|
35
|
+
export * from './signals';
|
|
36
|
+
export * from './status-cmd';
|
|
37
|
+
export * from './uploader';
|
|
38
|
+
export * from './verifier';
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./glob"), exports);
|
|
18
|
+
__exportStar(require("./gate"), exports);
|
|
19
|
+
__exportStar(require("./agent-driver"), exports);
|
|
20
|
+
__exportStar(require("./command-runner"), exports);
|
|
21
|
+
__exportStar(require("./git-driver"), exports);
|
|
22
|
+
__exportStar(require("./init-detect"), exports);
|
|
23
|
+
__exportStar(require("./notify"), exports);
|
|
24
|
+
__exportStar(require("./notify-cadence"), exports);
|
|
25
|
+
__exportStar(require("./prover"), exports);
|
|
26
|
+
__exportStar(require("./notify-channel"), exports);
|
|
27
|
+
__exportStar(require("./config"), exports);
|
|
28
|
+
__exportStar(require("./run-cmd"), exports);
|
|
29
|
+
__exportStar(require("./run-launcher"), exports);
|
|
30
|
+
__exportStar(require("./scan"), exports);
|
|
31
|
+
__exportStar(require("./scan-cmd"), exports);
|
|
32
|
+
__exportStar(require("./scan-events"), exports);
|
|
33
|
+
__exportStar(require("./machine-store"), exports);
|
|
34
|
+
__exportStar(require("./server-client"), exports);
|
|
35
|
+
__exportStar(require("./pair-cmd"), exports);
|
|
36
|
+
__exportStar(require("./daemon"), exports);
|
|
37
|
+
__exportStar(require("./daemon-cmd"), exports);
|
|
38
|
+
__exportStar(require("./sync"), exports);
|
|
39
|
+
__exportStar(require("./syncing-ledger"), exports);
|
|
40
|
+
__exportStar(require("./ui"), exports);
|
|
41
|
+
__exportStar(require("./welcome"), exports);
|
|
42
|
+
__exportStar(require("./agent-cmd"), exports);
|
|
43
|
+
__exportStar(require("./doctor"), exports);
|
|
44
|
+
__exportStar(require("./control-file"), exports);
|
|
45
|
+
__exportStar(require("./evidence-cache"), exports);
|
|
46
|
+
__exportStar(require("./ledger-store"), exports);
|
|
47
|
+
__exportStar(require("./queue-store"), exports);
|
|
48
|
+
__exportStar(require("./report-cmd"), exports);
|
|
49
|
+
__exportStar(require("./reverify"), exports);
|
|
50
|
+
__exportStar(require("./round-runner"), exports);
|
|
51
|
+
__exportStar(require("./signals"), exports);
|
|
52
|
+
__exportStar(require("./status-cmd"), exports);
|
|
53
|
+
__exportStar(require("./uploader"), exports);
|
|
54
|
+
__exportStar(require("./verifier"), exports);
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,yCAAuB;AACvB,iDAA+B;AAC/B,mDAAiC;AACjC,+CAA6B;AAC7B,gDAA8B;AAC9B,2CAAyB;AACzB,mDAAiC;AACjC,2CAAyB;AACzB,mDAAiC;AACjC,2CAAyB;AACzB,4CAA0B;AAC1B,iDAA+B;AAC/B,yCAAuB;AACvB,6CAA2B;AAC3B,gDAA8B;AAC9B,kDAAgC;AAChC,kDAAgC;AAChC,6CAA2B;AAC3B,2CAAyB;AACzB,+CAA6B;AAC7B,yCAAuB;AACvB,mDAAiC;AACjC,uCAAqB;AACrB,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,iDAA+B;AAC/B,mDAAiC;AACjC,iDAA+B;AAC/B,gDAA8B;AAC9B,+CAA6B;AAC7B,6CAA2B;AAC3B,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,6CAA2B;AAC3B,6CAA2B"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `looply init`, detection pass (DESIGN §5.2: "profile the repo, ask what
|
|
3
|
+
* cannot be inferred"). This module is the *inferring* half only: read what the
|
|
4
|
+
* repo already states — lockfile, package.json, tsconfig — and turn it into a
|
|
5
|
+
* draft `.looply/config.yaml`. The questions come later; nothing here prompts.
|
|
6
|
+
*
|
|
7
|
+
* Pure text-in, text-out: the filesystem is injected, `bin.ts` owns the real
|
|
8
|
+
* reads and the single write. Every detected fact carries its evidence string,
|
|
9
|
+
* because a draft the user cannot audit ("why does it think yarn?") gets
|
|
10
|
+
* deleted rather than reviewed.
|
|
11
|
+
*/
|
|
12
|
+
export interface InitFs {
|
|
13
|
+
/** Return the file's text, or null when it does not exist or cannot be read. */
|
|
14
|
+
readFile(path: string): string | null;
|
|
15
|
+
}
|
|
16
|
+
export type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun';
|
|
17
|
+
export interface DetectedStep {
|
|
18
|
+
name: string;
|
|
19
|
+
run: string;
|
|
20
|
+
timeoutS: number;
|
|
21
|
+
}
|
|
22
|
+
export interface RepoProfile {
|
|
23
|
+
name: string;
|
|
24
|
+
packageManager: PackageManager;
|
|
25
|
+
/** What decided the package manager — a field, a lockfile, or the default. */
|
|
26
|
+
packageManagerEvidence: string;
|
|
27
|
+
workspaces: string[];
|
|
28
|
+
typecheck: DetectedStep | null;
|
|
29
|
+
testRunner: DetectedStep | null;
|
|
30
|
+
}
|
|
31
|
+
export declare function detectRepo(fs: InitFs, dirName: string): RepoProfile;
|
|
32
|
+
/**
|
|
33
|
+
* Render the draft. When at least one gate was detected the output parses with
|
|
34
|
+
* `parseConfig` — init handing the user a file its own loader rejects is a
|
|
35
|
+
* broken feature, not a draft. When nothing was detected the draft says so in a
|
|
36
|
+
* comment instead of inventing a check that does not exist.
|
|
37
|
+
*/
|
|
38
|
+
export declare function renderDraftConfig(profile: RepoProfile): string;
|
|
39
|
+
//# sourceMappingURL=init-detect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-detect.d.ts","sourceRoot":"","sources":["../src/init-detect.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,MAAM;IACrB,gFAAgF;IAChF,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACvC;AAED,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAE7D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,cAAc,CAAC;IAC/B,8EAA8E;IAC9E,sBAAsB,EAAE,MAAM,CAAC;IAC/B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,YAAY,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,YAAY,GAAG,IAAI,CAAC;CACjC;AAoID,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,WAAW,CAanE;AAUD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAoC9D"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.detectRepo = detectRepo;
|
|
4
|
+
exports.renderDraftConfig = renderDraftConfig;
|
|
5
|
+
const yaml_1 = require("yaml");
|
|
6
|
+
const isObj = (v) => typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
7
|
+
function readJson(fs, path) {
|
|
8
|
+
const text = fs.readFile(path);
|
|
9
|
+
if (text === null)
|
|
10
|
+
return null;
|
|
11
|
+
try {
|
|
12
|
+
const v = JSON.parse(text);
|
|
13
|
+
return isObj(v) ? v : null;
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const PACKAGE_MANAGERS = ['npm', 'pnpm', 'yarn', 'bun'];
|
|
20
|
+
/** Lockfile → package manager, checked in this order. */
|
|
21
|
+
const LOCKFILES = [
|
|
22
|
+
['pnpm-lock.yaml', 'pnpm'],
|
|
23
|
+
['yarn.lock', 'yarn'],
|
|
24
|
+
['bun.lockb', 'bun'],
|
|
25
|
+
['bun.lock', 'bun'],
|
|
26
|
+
['package-lock.json', 'npm'],
|
|
27
|
+
];
|
|
28
|
+
function detectPackageManager(fs, pkg) {
|
|
29
|
+
// The explicit `packageManager` field wins over lockfiles: a repo migrating
|
|
30
|
+
// between managers often still carries the old lockfile, and the field is the
|
|
31
|
+
// one place the humans wrote their intent down.
|
|
32
|
+
const field = pkg?.['packageManager'];
|
|
33
|
+
if (typeof field === 'string') {
|
|
34
|
+
const name = field.split('@')[0];
|
|
35
|
+
if (PACKAGE_MANAGERS.includes(name)) {
|
|
36
|
+
return { pm: name, evidence: `package.json packageManager: ${JSON.stringify(field)}` };
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
for (const [lockfile, pm] of LOCKFILES) {
|
|
40
|
+
if (fs.readFile(lockfile) !== null)
|
|
41
|
+
return { pm, evidence: lockfile };
|
|
42
|
+
}
|
|
43
|
+
return { pm: 'npm', evidence: 'default — no lockfile or packageManager field found' };
|
|
44
|
+
}
|
|
45
|
+
function detectWorkspaces(fs, pkg) {
|
|
46
|
+
const ws = pkg?.['workspaces'];
|
|
47
|
+
// package.json allows both the bare array and the { packages: [...] } object.
|
|
48
|
+
const fromPkg = Array.isArray(ws) ? ws : isObj(ws) && Array.isArray(ws['packages']) ? ws['packages'] : null;
|
|
49
|
+
if (fromPkg)
|
|
50
|
+
return fromPkg.filter((w) => typeof w === 'string');
|
|
51
|
+
const pnpmWs = fs.readFile('pnpm-workspace.yaml');
|
|
52
|
+
if (pnpmWs !== null) {
|
|
53
|
+
try {
|
|
54
|
+
const parsed = (0, yaml_1.parse)(pnpmWs);
|
|
55
|
+
const packages = isObj(parsed) ? parsed['packages'] : null;
|
|
56
|
+
if (Array.isArray(packages))
|
|
57
|
+
return packages.filter((w) => typeof w === 'string');
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
// Unparseable workspace file: report no workspaces rather than fail the
|
|
61
|
+
// whole draft over a file looply does not even need.
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
/** Script names projects actually use for this, in the order they are preferred. */
|
|
67
|
+
const TYPECHECK_SCRIPTS = ['typecheck', 'type-check', 'types', 'tsc', 'check-types'];
|
|
68
|
+
function detectTypecheck(fs) {
|
|
69
|
+
// The project's own script wins over anything inferred. It is the answer the
|
|
70
|
+
// repository already gave, it handles vue-tsc and svelte-check and every other
|
|
71
|
+
// variant, and it works when the tsconfig lives somewhere other than the root
|
|
72
|
+
// — which is every monorepo. Without this a project with a typecheck script
|
|
73
|
+
// and no root tsconfig got no typecheck gate at all, so a round could land
|
|
74
|
+
// type errors and still go green.
|
|
75
|
+
const pkg = fs.readFile('package.json');
|
|
76
|
+
if (pkg !== null) {
|
|
77
|
+
try {
|
|
78
|
+
const parsed = JSON.parse(pkg);
|
|
79
|
+
const scripts = isObj(parsed) && isObj(parsed['scripts']) ? parsed['scripts'] : null;
|
|
80
|
+
if (scripts) {
|
|
81
|
+
for (const name of TYPECHECK_SCRIPTS) {
|
|
82
|
+
if (typeof scripts[name] === 'string' && scripts[name]) {
|
|
83
|
+
return { name: 'typecheck', run: `npm run ${name} --silent`, timeoutS: 300 };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
// A malformed package.json is the manifest detector's problem to report;
|
|
90
|
+
// here it just means falling through to the tsconfig probe.
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const text = fs.readFile('tsconfig.json');
|
|
94
|
+
if (text === null)
|
|
95
|
+
return null;
|
|
96
|
+
// tsconfig is JSONC — a comment must not read as "no references". Try a real
|
|
97
|
+
// parse first, fall back to a substring probe when comments break it.
|
|
98
|
+
let hasReferences;
|
|
99
|
+
try {
|
|
100
|
+
const parsed = JSON.parse(text);
|
|
101
|
+
hasReferences = isObj(parsed) && Array.isArray(parsed['references']) && parsed['references'].length > 0;
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
hasReferences = text.includes('"references"');
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
name: 'tsc',
|
|
108
|
+
run: hasReferences ? 'npx --no-install tsc -b' : 'npx --no-install tsc --noEmit',
|
|
109
|
+
timeoutS: 180,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function detectTestRunner(pkg, pm) {
|
|
113
|
+
const dependencies = pkg?.['dependencies'];
|
|
114
|
+
const devDependencies = pkg?.['devDependencies'];
|
|
115
|
+
const deps = {
|
|
116
|
+
...(isObj(dependencies) ? dependencies : {}),
|
|
117
|
+
...(isObj(devDependencies) ? devDependencies : {}),
|
|
118
|
+
};
|
|
119
|
+
if ('jest' in deps)
|
|
120
|
+
return { name: 'jest', run: 'npx --no-install jest --ci', timeoutS: 900 };
|
|
121
|
+
if ('vitest' in deps)
|
|
122
|
+
return { name: 'vitest', run: 'npx --no-install vitest run', timeoutS: 900 };
|
|
123
|
+
const scripts = pkg?.['scripts'];
|
|
124
|
+
const test = isObj(scripts) ? scripts['test'] : undefined;
|
|
125
|
+
// `npm init` seeds a test script that always exits 1. A gate built on it
|
|
126
|
+
// would fail every round of every run — that is not a detected test runner,
|
|
127
|
+
// it is a detected absence of one.
|
|
128
|
+
if (typeof test === 'string' && test.trim() && !test.includes('no test specified')) {
|
|
129
|
+
return { name: 'test', run: `${pm} test`, timeoutS: 900 };
|
|
130
|
+
}
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
function detectRepo(fs, dirName) {
|
|
134
|
+
const pkg = readJson(fs, 'package.json');
|
|
135
|
+
const { pm, evidence } = detectPackageManager(fs, pkg);
|
|
136
|
+
const pkgName = pkg?.['name'];
|
|
137
|
+
const name = typeof pkgName === 'string' && pkgName.trim() ? pkgName : dirName;
|
|
138
|
+
return {
|
|
139
|
+
name,
|
|
140
|
+
packageManager: pm,
|
|
141
|
+
packageManagerEvidence: evidence,
|
|
142
|
+
workspaces: detectWorkspaces(fs, pkg),
|
|
143
|
+
typecheck: detectTypecheck(fs),
|
|
144
|
+
testRunner: detectTestRunner(pkg, pm),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
/** YAML double-quoted scalars are a superset of JSON strings, so this is safe. */
|
|
148
|
+
const yamlStr = (s) => JSON.stringify(s);
|
|
149
|
+
function gateLine(step, required) {
|
|
150
|
+
const req = required ? ', required: true' : '';
|
|
151
|
+
return ` - { name: ${yamlStr(step.name)}, run: ${yamlStr(step.run)}, timeout_s: ${step.timeoutS}${req} }`;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Render the draft. When at least one gate was detected the output parses with
|
|
155
|
+
* `parseConfig` — init handing the user a file its own loader rejects is a
|
|
156
|
+
* broken feature, not a draft. When nothing was detected the draft says so in a
|
|
157
|
+
* comment instead of inventing a check that does not exist.
|
|
158
|
+
*/
|
|
159
|
+
function renderDraftConfig(profile) {
|
|
160
|
+
const lines = [
|
|
161
|
+
'# .looply/config.yaml — drafted by `looply init` from what the repo shows.',
|
|
162
|
+
'# Detection only: review every line before the first run.',
|
|
163
|
+
'',
|
|
164
|
+
'project:',
|
|
165
|
+
` name: ${yamlStr(profile.name)}`,
|
|
166
|
+
'',
|
|
167
|
+
`# package manager: ${profile.packageManager} (${profile.packageManagerEvidence})`,
|
|
168
|
+
];
|
|
169
|
+
if (profile.workspaces.length) {
|
|
170
|
+
lines.push(`# workspaces: ${profile.workspaces.join(', ')}`);
|
|
171
|
+
}
|
|
172
|
+
lines.push('');
|
|
173
|
+
const gates = [];
|
|
174
|
+
// Cheapest first — the order in the file is the execution order (DESIGN §4).
|
|
175
|
+
if (profile.typecheck)
|
|
176
|
+
gates.push(gateLine(profile.typecheck, false));
|
|
177
|
+
if (profile.testRunner)
|
|
178
|
+
gates.push(gateLine(profile.testRunner, true));
|
|
179
|
+
if (gates.length) {
|
|
180
|
+
lines.push('gates: # cheapest first; the order is the execution order', ...gates);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
lines.push('# gates: nothing detected — looply needs at least one check before it can run.', '# gates:', '# - { name: test, run: "…", timeout_s: 900, required: true }');
|
|
184
|
+
}
|
|
185
|
+
lines.push('', 'rails:', ' forbidden_paths: [] # nothing is off limits until you list it here', '', 'notify:', ' channel: sms', ' every_min: 30', '');
|
|
186
|
+
return lines.join('\n');
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=init-detect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-detect.js","sourceRoot":"","sources":["../src/init-detect.ts"],"names":[],"mappings":";;AAuKA,gCAaC;AAgBD,8CAoCC;AAxOD,+BAA0C;AAuC1C,MAAM,KAAK,GAAG,CAAC,CAAU,EAAY,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAEjG,SAAS,QAAQ,CAAC,EAAU,EAAE,IAAY;IACxC,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/B,IAAI,CAAC;QACH,MAAM,CAAC,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,C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AAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { LooplyConfig } from './config';
|
|
2
|
+
import { type DoctorDeps, type DoctorStepReport } from './doctor';
|
|
3
|
+
import { GitDriver } from './git-driver';
|
|
4
|
+
import type { IntegrationDeps, LaneCheck } from './integration-runtime';
|
|
5
|
+
import { type Goal, type ProjectGraphSnapshot, type RequirementLink } from '@looply/core';
|
|
6
|
+
/**
|
|
7
|
+
* THE INTEGRATION LANE'S DEPS, BUILT ONCE FOR BOTH CALLERS (M5-1).
|
|
8
|
+
*
|
|
9
|
+
* `looply integrate --branch` built these inline; the daemon now offers
|
|
10
|
+
* branches too, and two hand-built copies of "the project's own gate, run in
|
|
11
|
+
* the candidate's checkout" would drift the moment one was touched. Lifted
|
|
12
|
+
* here verbatim; the command and the daemon call this and nothing else.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Doctor's deps, for a given working directory. Lifted from `bin.ts` so the
|
|
16
|
+
* command's `looply doctor` and the lane's candidate check keep using the same
|
|
17
|
+
* runner, the same containment question and the same environment reading.
|
|
18
|
+
*/
|
|
19
|
+
export declare function nodeDoctorDepsFor(cwd: string): DoctorDeps;
|
|
20
|
+
/**
|
|
21
|
+
* One doctor step as the lane's check. A step that never ran, or ran out of time, reached no verdict:
|
|
22
|
+
* it stays `ok: false` for every reader that refuses on red, and says `inconclusive` so that programme
|
|
23
|
+
* admission never reads it as "red on the base" (see `LaneCheck.inconclusive`).
|
|
24
|
+
*/
|
|
25
|
+
export declare function laneCheckOf(step: DoctorStepReport): LaneCheck;
|
|
26
|
+
/**
|
|
27
|
+
* RULE #2's GOAL READER FOR THE LANE (F18): the goal as a server's goal list holds it at the moment a
|
|
28
|
+
* candidate is judged — its version and its requirement links, table rows included — or null when the
|
|
29
|
+
* list does not name it. A read that throws is the lane's to contain (`IntegrationDeps.currency`), where
|
|
30
|
+
* it yields no receipt and never a refusal.
|
|
31
|
+
*/
|
|
32
|
+
export declare function laneGoalReader(projectGoals: () => Promise<{
|
|
33
|
+
readonly goals: readonly Pick<Goal, 'id' | 'version' | 'requirements'>[];
|
|
34
|
+
}>): (goalId: string) => Promise<{
|
|
35
|
+
version: number;
|
|
36
|
+
requirements: readonly RequirementLink[];
|
|
37
|
+
} | null>;
|
|
38
|
+
export declare function nodeIntegrationDeps(cwd: string, cfg: LooplyConfig, log: (line: string) => void, git?: GitDriver,
|
|
39
|
+
/**
|
|
40
|
+
* The project graph, when one is held. Used only to sharpen what the ledger
|
|
41
|
+
* says about a carried change — see `replay` below.
|
|
42
|
+
*
|
|
43
|
+
* ⚠️ OPTIONAL BECAUSE THE LANE MUST NOT DEPEND ON IT. The graph is built per
|
|
44
|
+
* run and is absent in plenty of real projects; a replay that only worked
|
|
45
|
+
* where a graph happened to exist would leave R2-J-1's measured loss standing
|
|
46
|
+
* everywhere else.
|
|
47
|
+
*/
|
|
48
|
+
graph?: () => Promise<ProjectGraphSnapshot | null>,
|
|
49
|
+
/**
|
|
50
|
+
* RULE #2 — the goal as it is NOW, read at integration time.
|
|
51
|
+
*
|
|
52
|
+
* ⚠️ OPTIONAL, AND ABSENT MEANS NO INTEGRATED RECEIPT IS COMPUTED. A project
|
|
53
|
+
* with no server, and every existing caller, is untouched. The other two
|
|
54
|
+
* halves of the currency — the acceptance-map digest and the required
|
|
55
|
+
* environment profile — come from `cfg`, which this factory already holds, so
|
|
56
|
+
* only the goal itself needs asking.
|
|
57
|
+
*/
|
|
58
|
+
goals?: (goalId: string) => Promise<{
|
|
59
|
+
version: number;
|
|
60
|
+
requirements: readonly RequirementLink[];
|
|
61
|
+
} | null>): IntegrationDeps;
|
|
62
|
+
//# sourceMappingURL=integration-deps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-deps.d.ts","sourceRoot":"","sources":["../src/integration-deps.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM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