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
package/dist/gate.d.ts
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { type Exemption, type GateStepResult, type GateVerdict } from '@looply/core';
|
|
2
|
+
import { type ChangedEntry, type ScopeDecl, type ScopeViolation } from './scope-rule';
|
|
3
|
+
/**
|
|
4
|
+
* The gate executor.
|
|
5
|
+
*
|
|
6
|
+
* Two classes of failure, and conflating them is a real bug: an **abort** means an
|
|
7
|
+
* interlock tripped (a production database is reachable, or the diff touched a
|
|
8
|
+
* railed path) and must stop everything before a single step runs; a **red** means
|
|
9
|
+
* a check failed and the round is discarded normally.
|
|
10
|
+
*/
|
|
11
|
+
export interface StepSpec {
|
|
12
|
+
name: string;
|
|
13
|
+
run: string;
|
|
14
|
+
timeoutS?: number;
|
|
15
|
+
/** Glob; the step is skipped when no changed path matches it. */
|
|
16
|
+
when?: string;
|
|
17
|
+
/** A required step that never ran blocks the commit — it is not an implicit pass. */
|
|
18
|
+
required?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface CommandResult {
|
|
21
|
+
ok: boolean;
|
|
22
|
+
timedOut: boolean;
|
|
23
|
+
ms: number;
|
|
24
|
+
output?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The process exit status, when the runner had one.
|
|
27
|
+
*
|
|
28
|
+
* ⚠️ ABSENT MEANS THE RUNNER DID NOT SAY, NOT ZERO. The contained gate runner
|
|
29
|
+
* always had the code — `UntrustedExecutionResult` carries it — and folded it
|
|
30
|
+
* into `ok` on the way out, so a rejected candidate's evidence could record
|
|
31
|
+
* "it failed" and never "it exited 2". A runner that cannot produce one
|
|
32
|
+
* (a step that never started) leaves it out, and the evidence says null.
|
|
33
|
+
*/
|
|
34
|
+
exitCode?: number;
|
|
35
|
+
/**
|
|
36
|
+
* The step did not RUN, as distinct from running and failing.
|
|
37
|
+
*
|
|
38
|
+
* Set only by a runner that could not start the step at all — no contained
|
|
39
|
+
* toolchain, untrusted execution unavailable. `ok` is still false, so every
|
|
40
|
+
* existing reader keeps refusing the commit; this only tells the round what
|
|
41
|
+
* it may charge the item for.
|
|
42
|
+
*/
|
|
43
|
+
unavailable?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* WHAT THIS INVOCATION COST, WHEN THE PROVIDER SAID.
|
|
46
|
+
*
|
|
47
|
+
* 🔴 IT WAS PARSED AND THEN DROPPED ON THE FLOOR. `parseAgentEnvelope` reads
|
|
48
|
+
* `total_cost_usd`, `num_turns`, `usage` and `session_id` off every JSON
|
|
49
|
+
* envelope — and `unwrapEnvelope`, the only thing any production caller uses,
|
|
50
|
+
* returned a `CommandResult` with nowhere to put them. So the field existed,
|
|
51
|
+
* the parser had a docblock about why discarding it was theatre, and all
|
|
52
|
+
* three call sites discarded it anyway.
|
|
53
|
+
*
|
|
54
|
+
* ⚠️ ABSENT MEANS THE PROVIDER DID NOT SAY, NOT ZERO. The round runs its
|
|
55
|
+
* agent with `--output-format text` and gets no envelope at all, so the
|
|
56
|
+
* expensive path reports nothing here — which `withinEnvelope` reads as
|
|
57
|
+
* unmeasurable and REFUSES against a dollar ceiling, rather than as free.
|
|
58
|
+
*/
|
|
59
|
+
cost?: InvocationCost;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* WHAT ONE PROVIDER INVOCATION COST, DECLARED ONCE.
|
|
63
|
+
*
|
|
64
|
+
* 🔴 THIS WAS TWO DECLARATIONS AND THEY DRIFTED THE MOMENT ONE GREW. The same
|
|
65
|
+
* six fields were written out here and again on `AgentEnvelope['cost']`;
|
|
66
|
+
* `unwrapEnvelope` spreads the envelope's object into this one wholesale, so
|
|
67
|
+
* adding a field to the parser put it on the wire at RUNTIME while this type
|
|
68
|
+
* said it did not exist — and a field a type does not name is a field nothing
|
|
69
|
+
* downstream can read. Found the moment M7-3 added the two cache counts.
|
|
70
|
+
*
|
|
71
|
+
* One type, in the lower module, imported by the parser above it. There is no
|
|
72
|
+
* second place to update and therefore no second place to forget.
|
|
73
|
+
*
|
|
74
|
+
* ⚠️ ABSENT MEANS THE PROVIDER DID NOT SAY, NOT ZERO. The round runs its agent
|
|
75
|
+
* with `--output-format text` and gets no envelope at all, so the expensive
|
|
76
|
+
* path reports nothing here — which `withinEnvelope` reads as unmeasurable and
|
|
77
|
+
* REFUSES against a dollar ceiling, rather than as free.
|
|
78
|
+
*/
|
|
79
|
+
export interface InvocationCost {
|
|
80
|
+
readonly usd?: number;
|
|
81
|
+
readonly turns?: number;
|
|
82
|
+
readonly sessionId?: string;
|
|
83
|
+
readonly inputTokens?: number;
|
|
84
|
+
readonly outputTokens?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Context served from the provider's cache, and context written into it —
|
|
87
|
+
* whether this turn paid again for what it already had (the audit's E-05).
|
|
88
|
+
*/
|
|
89
|
+
readonly cacheReadTokens?: number;
|
|
90
|
+
readonly cacheWriteTokens?: number;
|
|
91
|
+
}
|
|
92
|
+
export type CommandRunner = (cmd: string, timeoutMs: number) => Promise<CommandResult>;
|
|
93
|
+
export declare const ABORT_PROD = 91;
|
|
94
|
+
export declare const ABORT_RAILS = 92;
|
|
95
|
+
/**
|
|
96
|
+
* The name of the synthetic gate step a scope refusal fails.
|
|
97
|
+
*
|
|
98
|
+
* 🔴 A SCOPE VIOLATION IS A RED, NOT AN ABORT, AND THE DIFFERENCE IS NOT
|
|
99
|
+
* COSMETIC. It was written as a third abort code first, and two things already
|
|
100
|
+
* in this codebase said that was wrong:
|
|
101
|
+
*
|
|
102
|
+
* - `rejectionInput` WITHHOLDS THE PATCH of an aborted candidate, because the
|
|
103
|
+
* rails fire on content that must not be copied into a record. A change that
|
|
104
|
+
* is merely in the wrong PLACE is ordinary work, and withholding it would
|
|
105
|
+
* destroy the very evidence bounded repair runs on. That withheld message
|
|
106
|
+
* even reads "the rails aborted this candidate", which a scope abort would
|
|
107
|
+
* have made false.
|
|
108
|
+
* - an abort raises a `critical` alert. A model that strayed one file outside
|
|
109
|
+
* its grant is a round to discard and brief, not a page at 3am.
|
|
110
|
+
*
|
|
111
|
+
* So the round goes red on this named step: the candidate is never accepted, no
|
|
112
|
+
* gate step runs against a tree that may have weakened it, the attempt is spent,
|
|
113
|
+
* the evidence is retained, and the worker is told what it did. Rails keep sole
|
|
114
|
+
* ownership of `abort`.
|
|
115
|
+
*
|
|
116
|
+
* ⚠️ A PROJECT COULD NAME A REAL GATE STEP `scope`. Nothing forbids it, and the
|
|
117
|
+
* result would be two steps sharing a name in the record rather than a wrong
|
|
118
|
+
* verdict. Said here rather than left to be discovered.
|
|
119
|
+
*/
|
|
120
|
+
export declare const SCOPE_STEP = "scope";
|
|
121
|
+
export interface Rails {
|
|
122
|
+
forbiddenPaths: readonly string[];
|
|
123
|
+
prodPatterns: readonly string[];
|
|
124
|
+
}
|
|
125
|
+
export interface InterlockInput {
|
|
126
|
+
changedPaths: readonly string[];
|
|
127
|
+
rails: Rails;
|
|
128
|
+
/** Contents of any env files worth inspecting, plus the live environment. */
|
|
129
|
+
envValues: readonly string[];
|
|
130
|
+
/**
|
|
131
|
+
* Granted exemptions (DESIGN §8). A grant opens a railed path only when
|
|
132
|
+
* `isExemptionValid` accepts it for this item, this exact path and this
|
|
133
|
+
* moment — a raw path list here would skip the expiry and the one-item
|
|
134
|
+
* check, which is precisely the widening the core model exists to prevent.
|
|
135
|
+
*/
|
|
136
|
+
exemptions?: readonly Exemption[];
|
|
137
|
+
/** The item this round is running; exemptions are per-item. */
|
|
138
|
+
itemId?: string;
|
|
139
|
+
/** Clock for the expiry check. */
|
|
140
|
+
now?: number;
|
|
141
|
+
/**
|
|
142
|
+
* The diff WITH its status codes, which `changedPaths` does not carry.
|
|
143
|
+
*
|
|
144
|
+
* Required for the scope interlock and for nothing else: telling an added
|
|
145
|
+
* file from a modified one is the entire difference between `scope.additive`
|
|
146
|
+
* meaning what it says and meaning nothing. A caller that omits it leaves
|
|
147
|
+
* the scope check unrun rather than guessing, and a guess here would be a
|
|
148
|
+
* guess about whether a file already existed.
|
|
149
|
+
*/
|
|
150
|
+
changedEntries?: readonly ChangedEntry[];
|
|
151
|
+
/** The project's declared scope; see `scope-rule.ts` for the semantics. */
|
|
152
|
+
scope?: ScopeDecl;
|
|
153
|
+
}
|
|
154
|
+
export interface AbortResult {
|
|
155
|
+
code: number;
|
|
156
|
+
reason: string;
|
|
157
|
+
paths?: string[];
|
|
158
|
+
}
|
|
159
|
+
export declare const DEFAULT_TIMEOUT_S = 600;
|
|
160
|
+
/**
|
|
161
|
+
* Interlocks run before any step. They are hard aborts, not tallied failures —
|
|
162
|
+
* a railed path in the diff may mean the gate itself is broken, which is a
|
|
163
|
+
* different emergency from a failing test.
|
|
164
|
+
*/
|
|
165
|
+
export declare function checkInterlocks(input: InterlockInput): AbortResult | null;
|
|
166
|
+
export interface ScopeRefusal {
|
|
167
|
+
readonly reason: string;
|
|
168
|
+
readonly paths: string[];
|
|
169
|
+
readonly violations: readonly ScopeViolation[];
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Whether this diff left the grant it was given.
|
|
173
|
+
*
|
|
174
|
+
* Runs BEFORE any gate step, for the reason `judged-by.ts` gives: a round's
|
|
175
|
+
* spec files sit inside the scope it may change, so a gate measured after a
|
|
176
|
+
* candidate edited it is measuring the candidate's own gate.
|
|
177
|
+
*
|
|
178
|
+
* ⚠️ RETURNS null WHEN IT CANNOT MEASURE, rather than passing quietly on a
|
|
179
|
+
* technicality. Two distinct ways that happens, and neither is a violation: the
|
|
180
|
+
* caller supplied no `scope` (every caller that predates this check), or supplied
|
|
181
|
+
* no `changedEntries` (no status codes, so an addition and a modification are
|
|
182
|
+
* indistinguishable). Both are absences of INPUT, not findings about a diff, and
|
|
183
|
+
* turning either into a refusal would fail every round on a field nobody filled
|
|
184
|
+
* in.
|
|
185
|
+
*/
|
|
186
|
+
export declare function scopeRefusal(input: InterlockInput): ScopeRefusal | null;
|
|
187
|
+
/**
|
|
188
|
+
* The grants that actually opened a railed path for this diff. The caller puts
|
|
189
|
+
* these in the commit trailer — a door opened silently is indistinguishable in
|
|
190
|
+
* the log from a rail that never fired, and DESIGN §8 requires the opposite.
|
|
191
|
+
*/
|
|
192
|
+
export declare function exemptionsUsed(input: InterlockInput): Exemption[];
|
|
193
|
+
/** A step runs unless it has a `when:` filter that no changed path satisfies. */
|
|
194
|
+
export declare function shouldRunStep(step: StepSpec, changedPaths: readonly string[]): boolean;
|
|
195
|
+
export interface GateResult {
|
|
196
|
+
verdict: GateVerdict;
|
|
197
|
+
steps: GateStepResult[];
|
|
198
|
+
abort?: AbortResult;
|
|
199
|
+
/** Grants that opened railed paths this round; the trailer records them. */
|
|
200
|
+
exemptionsUsed?: Exemption[];
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* One executed step, as it happened: the command, the exit, the text.
|
|
204
|
+
*
|
|
205
|
+
* 🔴 NOT ON `GateResult`, AND NOT ON THE LEDGER. The result is the wire shape:
|
|
206
|
+
* it reaches the event stream and the server, it carries a digest for exactly
|
|
207
|
+
* that reason, and a test pins that no raw output appears anywhere on it. This
|
|
208
|
+
* is the other half — the text a person needs to see WHY a candidate was
|
|
209
|
+
* rejected — and it travels through `RunGateInput.diagnostics`, a sink the
|
|
210
|
+
* round hands straight to evidence retention, so the text exists in one place
|
|
211
|
+
* (beside the discarded patch, before `git reset --hard` destroys the only
|
|
212
|
+
* other copy) and never on an object that is serialised. The previous trial
|
|
213
|
+
* recorded `outputDigest: 38faf4ea…` for a red typecheck and nothing else; the
|
|
214
|
+
* reason it failed was unrecoverable from the run.
|
|
215
|
+
*
|
|
216
|
+
* Bounded per step (`GATE_STEP_OUTPUT_MAX_CHARS`), truncation marked in the
|
|
217
|
+
* text and in `outputTruncated`. Skipped steps produce none.
|
|
218
|
+
*/
|
|
219
|
+
export interface GateStepDiagnostic {
|
|
220
|
+
step: string;
|
|
221
|
+
/** The configured shell line, verbatim. */
|
|
222
|
+
command: string;
|
|
223
|
+
/** null when the runner produced no status — a step that never started. */
|
|
224
|
+
exitCode: number | null;
|
|
225
|
+
timedOut: boolean;
|
|
226
|
+
/** The step could not run at all (no toolchain, no container). */
|
|
227
|
+
unavailable: boolean;
|
|
228
|
+
ok: boolean;
|
|
229
|
+
ms: number;
|
|
230
|
+
/**
|
|
231
|
+
* Which of the four things happened. `failed` is the ordinary red: the step
|
|
232
|
+
* ran to completion and said no. The others are about the environment or a
|
|
233
|
+
* resource, and a repair prompt must not present them as the code's fault.
|
|
234
|
+
*/
|
|
235
|
+
classification: 'passed' | 'failed' | 'timed_out' | 'unavailable';
|
|
236
|
+
/** stdout and stderr interleaved — the runner reports them as one stream. */
|
|
237
|
+
output: string;
|
|
238
|
+
outputChars: number;
|
|
239
|
+
outputTruncated: boolean;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* How much of one step's output the round keeps for evidence.
|
|
243
|
+
*
|
|
244
|
+
* 256K characters keeps a whole failing jest run with its summary; a tsc error
|
|
245
|
+
* list is far smaller. Past the bound the HEAD and the TAIL are kept — the tail
|
|
246
|
+
* because that is where every toolchain prints its summary, the head because
|
|
247
|
+
* that is where the first error is — and the cut is announced in the text.
|
|
248
|
+
*/
|
|
249
|
+
export declare const GATE_STEP_OUTPUT_MAX_CHARS: number;
|
|
250
|
+
/**
|
|
251
|
+
* Keep `text` inside `maxChars`, announcing the cut in the text itself.
|
|
252
|
+
*
|
|
253
|
+
* ⚠️ NEVER SILENT. Evidence that was trimmed and does not say so reads as the
|
|
254
|
+
* whole story, and a person repairing from it would be repairing against a
|
|
255
|
+
* log that stops mid-error with no warning that it did.
|
|
256
|
+
*/
|
|
257
|
+
export declare function boundText(text: string, maxChars: number): {
|
|
258
|
+
text: string;
|
|
259
|
+
chars: number;
|
|
260
|
+
truncated: boolean;
|
|
261
|
+
};
|
|
262
|
+
export interface RunGateInput {
|
|
263
|
+
steps: readonly StepSpec[];
|
|
264
|
+
changedPaths: readonly string[];
|
|
265
|
+
runner: CommandRunner;
|
|
266
|
+
interlocks?: InterlockInput;
|
|
267
|
+
/** Receives each executed step's {@link GateStepDiagnostic}; see that type for why it is a sink. */
|
|
268
|
+
diagnostics?: (d: GateStepDiagnostic) => void;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Run the gate. Steps execute in the order given — configuration puts the cheapest
|
|
272
|
+
* first, so a broken typecheck never waits on a full test suite — and execution
|
|
273
|
+
* stops at the first failure, because everything after it is uninformative.
|
|
274
|
+
*/
|
|
275
|
+
export declare function runGate(input: RunGateInput): Promise<GateResult>;
|
|
276
|
+
/** Required step names, for the commit check in `@looply/core`. */
|
|
277
|
+
export declare function requiredSteps(steps: readonly StepSpec[]): string[];
|
|
278
|
+
//# sourceMappingURL=gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAEtB;;;;;;;GAOG;AAEH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAA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;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAarD;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC3B,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,oGAAoG;IACpG,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAC/C;AAED;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CA+GtE;AAED,mEAAmE;AACnE,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,MAAM,EAAE,CAElE"}
|
package/dist/gate.js
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GATE_STEP_OUTPUT_MAX_CHARS = exports.DEFAULT_TIMEOUT_S = exports.SCOPE_STEP = exports.ABORT_RAILS = exports.ABORT_PROD = void 0;
|
|
4
|
+
exports.checkInterlocks = checkInterlocks;
|
|
5
|
+
exports.scopeRefusal = scopeRefusal;
|
|
6
|
+
exports.exemptionsUsed = exemptionsUsed;
|
|
7
|
+
exports.shouldRunStep = shouldRunStep;
|
|
8
|
+
exports.boundText = boundText;
|
|
9
|
+
exports.runGate = runGate;
|
|
10
|
+
exports.requiredSteps = requiredSteps;
|
|
11
|
+
const core_1 = require("@looply/core");
|
|
12
|
+
const glob_1 = require("./glob");
|
|
13
|
+
const scope_rule_1 = require("./scope-rule");
|
|
14
|
+
exports.ABORT_PROD = 91;
|
|
15
|
+
exports.ABORT_RAILS = 92;
|
|
16
|
+
/**
|
|
17
|
+
* The name of the synthetic gate step a scope refusal fails.
|
|
18
|
+
*
|
|
19
|
+
* 🔴 A SCOPE VIOLATION IS A RED, NOT AN ABORT, AND THE DIFFERENCE IS NOT
|
|
20
|
+
* COSMETIC. It was written as a third abort code first, and two things already
|
|
21
|
+
* in this codebase said that was wrong:
|
|
22
|
+
*
|
|
23
|
+
* - `rejectionInput` WITHHOLDS THE PATCH of an aborted candidate, because the
|
|
24
|
+
* rails fire on content that must not be copied into a record. A change that
|
|
25
|
+
* is merely in the wrong PLACE is ordinary work, and withholding it would
|
|
26
|
+
* destroy the very evidence bounded repair runs on. That withheld message
|
|
27
|
+
* even reads "the rails aborted this candidate", which a scope abort would
|
|
28
|
+
* have made false.
|
|
29
|
+
* - an abort raises a `critical` alert. A model that strayed one file outside
|
|
30
|
+
* its grant is a round to discard and brief, not a page at 3am.
|
|
31
|
+
*
|
|
32
|
+
* So the round goes red on this named step: the candidate is never accepted, no
|
|
33
|
+
* gate step runs against a tree that may have weakened it, the attempt is spent,
|
|
34
|
+
* the evidence is retained, and the worker is told what it did. Rails keep sole
|
|
35
|
+
* ownership of `abort`.
|
|
36
|
+
*
|
|
37
|
+
* ⚠️ A PROJECT COULD NAME A REAL GATE STEP `scope`. Nothing forbids it, and the
|
|
38
|
+
* result would be two steps sharing a name in the record rather than a wrong
|
|
39
|
+
* verdict. Said here rather than left to be discovered.
|
|
40
|
+
*/
|
|
41
|
+
exports.SCOPE_STEP = 'scope';
|
|
42
|
+
exports.DEFAULT_TIMEOUT_S = 600;
|
|
43
|
+
/**
|
|
44
|
+
* Split the railed paths in the diff into violations and doors legitimately
|
|
45
|
+
* opened. Missing `itemId` or `now` fails closed — with no item to check
|
|
46
|
+
* against or no clock for the expiry, no grant can be shown valid, so none is.
|
|
47
|
+
*/
|
|
48
|
+
function splitRailViolations(input) {
|
|
49
|
+
const { exemptions = [], itemId, now } = input;
|
|
50
|
+
const canExempt = exemptions.length > 0 && itemId !== undefined && now !== undefined;
|
|
51
|
+
const violations = [];
|
|
52
|
+
const used = [];
|
|
53
|
+
for (const path of (0, glob_1.filterMatching)(input.changedPaths, input.rails.forbiddenPaths)) {
|
|
54
|
+
const grant = canExempt ? exemptions.find((e) => (0, core_1.isExemptionValid)(e, now, itemId, path)) : undefined;
|
|
55
|
+
if (grant === undefined)
|
|
56
|
+
violations.push(path);
|
|
57
|
+
else if (!used.includes(grant))
|
|
58
|
+
used.push(grant);
|
|
59
|
+
}
|
|
60
|
+
return { violations, used };
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Interlocks run before any step. They are hard aborts, not tallied failures —
|
|
64
|
+
* a railed path in the diff may mean the gate itself is broken, which is a
|
|
65
|
+
* different emergency from a failing test.
|
|
66
|
+
*/
|
|
67
|
+
function checkInterlocks(input) {
|
|
68
|
+
for (const value of input.envValues) {
|
|
69
|
+
const hit = input.rails.prodPatterns.find((p) => value.toLowerCase().includes(p.toLowerCase()));
|
|
70
|
+
if (hit) {
|
|
71
|
+
return {
|
|
72
|
+
code: exports.ABORT_PROD,
|
|
73
|
+
reason: `a database URL points at a remote host (matched ${JSON.stringify(hit)})`,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const { violations } = splitRailViolations(input);
|
|
78
|
+
if (violations.length) {
|
|
79
|
+
return {
|
|
80
|
+
code: exports.ABORT_RAILS,
|
|
81
|
+
reason: 'the round touched paths the rails forbid',
|
|
82
|
+
paths: violations,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Whether this diff left the grant it was given.
|
|
89
|
+
*
|
|
90
|
+
* Runs BEFORE any gate step, for the reason `judged-by.ts` gives: a round's
|
|
91
|
+
* spec files sit inside the scope it may change, so a gate measured after a
|
|
92
|
+
* candidate edited it is measuring the candidate's own gate.
|
|
93
|
+
*
|
|
94
|
+
* ⚠️ RETURNS null WHEN IT CANNOT MEASURE, rather than passing quietly on a
|
|
95
|
+
* technicality. Two distinct ways that happens, and neither is a violation: the
|
|
96
|
+
* caller supplied no `scope` (every caller that predates this check), or supplied
|
|
97
|
+
* no `changedEntries` (no status codes, so an addition and a modification are
|
|
98
|
+
* indistinguishable). Both are absences of INPUT, not findings about a diff, and
|
|
99
|
+
* turning either into a refusal would fail every round on a field nobody filled
|
|
100
|
+
* in.
|
|
101
|
+
*/
|
|
102
|
+
function scopeRefusal(input) {
|
|
103
|
+
const { scope, changedEntries } = input;
|
|
104
|
+
if (scope === undefined || changedEntries === undefined)
|
|
105
|
+
return null;
|
|
106
|
+
const violations = (0, scope_rule_1.scopeViolations)(changedEntries, scope);
|
|
107
|
+
if (violations.length === 0)
|
|
108
|
+
return null;
|
|
109
|
+
return {
|
|
110
|
+
reason: (0, scope_rule_1.describeScopeViolations)(violations),
|
|
111
|
+
paths: violations.map((v) => v.path),
|
|
112
|
+
violations,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The grants that actually opened a railed path for this diff. The caller puts
|
|
117
|
+
* these in the commit trailer — a door opened silently is indistinguishable in
|
|
118
|
+
* the log from a rail that never fired, and DESIGN §8 requires the opposite.
|
|
119
|
+
*/
|
|
120
|
+
function exemptionsUsed(input) {
|
|
121
|
+
return splitRailViolations(input).used;
|
|
122
|
+
}
|
|
123
|
+
/** A step runs unless it has a `when:` filter that no changed path satisfies. */
|
|
124
|
+
function shouldRunStep(step, changedPaths) {
|
|
125
|
+
const when = step.when;
|
|
126
|
+
if (!when)
|
|
127
|
+
return true;
|
|
128
|
+
return changedPaths.some((p) => (0, glob_1.matchesGlob)(p, when));
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* How much of one step's output the round keeps for evidence.
|
|
132
|
+
*
|
|
133
|
+
* 256K characters keeps a whole failing jest run with its summary; a tsc error
|
|
134
|
+
* list is far smaller. Past the bound the HEAD and the TAIL are kept — the tail
|
|
135
|
+
* because that is where every toolchain prints its summary, the head because
|
|
136
|
+
* that is where the first error is — and the cut is announced in the text.
|
|
137
|
+
*/
|
|
138
|
+
exports.GATE_STEP_OUTPUT_MAX_CHARS = 256 * 1024;
|
|
139
|
+
/**
|
|
140
|
+
* Keep `text` inside `maxChars`, announcing the cut in the text itself.
|
|
141
|
+
*
|
|
142
|
+
* ⚠️ NEVER SILENT. Evidence that was trimmed and does not say so reads as the
|
|
143
|
+
* whole story, and a person repairing from it would be repairing against a
|
|
144
|
+
* log that stops mid-error with no warning that it did.
|
|
145
|
+
*/
|
|
146
|
+
function boundText(text, maxChars) {
|
|
147
|
+
const chars = text.length;
|
|
148
|
+
if (chars <= maxChars)
|
|
149
|
+
return { text, chars, truncated: false };
|
|
150
|
+
const head = Math.floor(maxChars / 4);
|
|
151
|
+
const tail = maxChars - head;
|
|
152
|
+
const omitted = chars - head - tail;
|
|
153
|
+
return {
|
|
154
|
+
text: `${text.slice(0, head)}\n\n[… looply: ${omitted} characters omitted here; ` +
|
|
155
|
+
`the full output was ${chars} characters …]\n\n${text.slice(chars - tail)}`,
|
|
156
|
+
chars,
|
|
157
|
+
truncated: true,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Run the gate. Steps execute in the order given — configuration puts the cheapest
|
|
162
|
+
* first, so a broken typecheck never waits on a full test suite — and execution
|
|
163
|
+
* stops at the first failure, because everything after it is uninformative.
|
|
164
|
+
*/
|
|
165
|
+
async function runGate(input) {
|
|
166
|
+
let used = [];
|
|
167
|
+
if (input.interlocks) {
|
|
168
|
+
const abort = checkInterlocks(input.interlocks);
|
|
169
|
+
if (abort)
|
|
170
|
+
return { verdict: 'abort', steps: [], abort };
|
|
171
|
+
used = exemptionsUsed(input.interlocks);
|
|
172
|
+
/**
|
|
173
|
+
* Scope AFTER the rails and BEFORE the first step. Both halves of that
|
|
174
|
+
* ordering are load-bearing: rails first, so a mandatory deny is never
|
|
175
|
+
* reported as a scope question and `scope.free` can never open a railed path;
|
|
176
|
+
* steps after, so nothing is measured on a tree whose candidate may have
|
|
177
|
+
* altered the measuring.
|
|
178
|
+
*/
|
|
179
|
+
const refusal = scopeRefusal(input.interlocks);
|
|
180
|
+
if (refusal) {
|
|
181
|
+
// The reason reaches the worker through the DIAGNOSTICS, which is the
|
|
182
|
+
// channel `prepareRepair` reads to brief a repair attempt. A step result
|
|
183
|
+
// carries a digest and never text, by the contract on `GateStepResult`.
|
|
184
|
+
const detail = refusal.violations
|
|
185
|
+
.map((v) => v.path + ' [' + v.status + '] ' + v.because)
|
|
186
|
+
.join('\n');
|
|
187
|
+
const text = refusal.reason + '\n' + detail;
|
|
188
|
+
input.diagnostics?.({
|
|
189
|
+
step: exports.SCOPE_STEP,
|
|
190
|
+
command: '(scope check - no command was run)',
|
|
191
|
+
exitCode: null,
|
|
192
|
+
timedOut: false,
|
|
193
|
+
// Not `unavailable`: the check RAN and answered. `unavailable` means the
|
|
194
|
+
// environment could not measure, and a repair prompt must not present
|
|
195
|
+
// this as something other than the candidate's own doing.
|
|
196
|
+
unavailable: false,
|
|
197
|
+
ok: false,
|
|
198
|
+
ms: 0,
|
|
199
|
+
classification: 'failed',
|
|
200
|
+
output: text,
|
|
201
|
+
outputChars: text.length,
|
|
202
|
+
outputTruncated: false,
|
|
203
|
+
});
|
|
204
|
+
return {
|
|
205
|
+
verdict: 'red',
|
|
206
|
+
steps: [{ step: exports.SCOPE_STEP, ok: false, ms: 0, outputDigest: (0, core_1.failureOutputDigest)(refusal.reason) }],
|
|
207
|
+
...(used.length ? { exemptionsUsed: used } : {}),
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
const done = (verdict, steps) => used.length ? { verdict, steps, exemptionsUsed: used } : { verdict, steps };
|
|
212
|
+
const results = [];
|
|
213
|
+
for (const step of input.steps) {
|
|
214
|
+
if (!shouldRunStep(step, input.changedPaths)) {
|
|
215
|
+
// Recorded, never silently omitted: a skip is information, and hiding it is
|
|
216
|
+
// how a gate starts claiming coverage it does not have.
|
|
217
|
+
results.push({ step: step.name, ok: true, ms: 0, skipped: true });
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
const timeoutMs = (step.timeoutS ?? exports.DEFAULT_TIMEOUT_S) * 1000;
|
|
221
|
+
const r = await input.runner(step.run, timeoutMs);
|
|
222
|
+
const result = { step: step.name, ok: r.ok, ms: r.ms };
|
|
223
|
+
if (r.timedOut)
|
|
224
|
+
result.timedOut = true;
|
|
225
|
+
// The text, kept OFF the result and handed to the sink. Bounded now rather
|
|
226
|
+
// than at the point of writing, so nothing downstream can hold an
|
|
227
|
+
// unbounded log by forgetting to.
|
|
228
|
+
const bounded = boundText(r.output ?? '', exports.GATE_STEP_OUTPUT_MAX_CHARS);
|
|
229
|
+
input.diagnostics?.({
|
|
230
|
+
step: step.name,
|
|
231
|
+
command: step.run,
|
|
232
|
+
exitCode: typeof r.exitCode === 'number' ? r.exitCode : null,
|
|
233
|
+
timedOut: r.timedOut,
|
|
234
|
+
unavailable: r.unavailable === true,
|
|
235
|
+
ok: r.ok,
|
|
236
|
+
ms: r.ms,
|
|
237
|
+
classification: r.unavailable === true ? 'unavailable' : r.timedOut ? 'timed_out' : r.ok ? 'passed' : 'failed',
|
|
238
|
+
output: bounded.text,
|
|
239
|
+
outputChars: bounded.chars,
|
|
240
|
+
outputTruncated: bounded.truncated,
|
|
241
|
+
});
|
|
242
|
+
/**
|
|
243
|
+
* Only on failure, and only when there was output. A green step has no
|
|
244
|
+
* failure to identify, and signing one would put a digest of ordinary build
|
|
245
|
+
* chatter on every event for nothing.
|
|
246
|
+
*
|
|
247
|
+
* ⚠️ A TIMEOUT STILL GETS ONE, and that is deliberate even though
|
|
248
|
+
* `FailureFacts` excludes the timeout FLAG from the signature: what a
|
|
249
|
+
* timeout printed before it was killed is often the same text every time,
|
|
250
|
+
* and the detector's own contract says a timeout is a resource outcome
|
|
251
|
+
* rather than a deterministic failure — so it is the OUTPUT that decides
|
|
252
|
+
* sameness here, not the fact of timing out.
|
|
253
|
+
*/
|
|
254
|
+
if (!r.ok && r.output !== undefined && r.output !== '' && r.unavailable !== true) {
|
|
255
|
+
result.outputDigest = (0, core_1.failureOutputDigest)(r.output);
|
|
256
|
+
}
|
|
257
|
+
results.push(result);
|
|
258
|
+
/**
|
|
259
|
+
* A step that could not run stops the gate as a failure does — everything
|
|
260
|
+
* after it would be as uninformative — but it is a different verdict.
|
|
261
|
+
*
|
|
262
|
+
* ⚠️ AND IT CARRIES NO DIGEST, above. A signature is what loop safety uses
|
|
263
|
+
* to decide "the same failure keeps coming back"; signing "no contained
|
|
264
|
+
* toolchain" would let a broken machine raise a hold against a pursuit
|
|
265
|
+
* whose code was never examined.
|
|
266
|
+
*/
|
|
267
|
+
if (r.unavailable === true)
|
|
268
|
+
return done('blocked', results);
|
|
269
|
+
if (!r.ok)
|
|
270
|
+
return done('red', results);
|
|
271
|
+
}
|
|
272
|
+
return done('green', results);
|
|
273
|
+
}
|
|
274
|
+
/** Required step names, for the commit check in `@looply/core`. */
|
|
275
|
+
function requiredSteps(steps) {
|
|
276
|
+
return steps.filter((s) => s.required).map((s) => s.name);
|
|
277
|
+
}
|
|
278
|
+
//# sourceMappingURL=gate.js.map
|
package/dist/gate.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate.js","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":";;;AA8MA,0CAsBC;AAuBD,oCAUC;AAOD,wCAEC;AAGD,sCAIC;AAmED,8BAgBC;AAgBD,0BA+GC;AAGD,sCAEC;AA5eD,uCAMsB;AACtB,iCAAqD;AACrD,6CAMsB;AAiGT,QAAA,UAAU,GAAG,EAAE,CAAC;AAChB,QAAA,WAAW,GAAG,EAAE,CAAC;AAC9B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACU,QAAA,UAAU,GAAG,OAAO,CAAC;AA2CrB,QAAA,iBAAiB,GAAG,GAAG,CAAC;AAEr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