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,133 @@
|
|
|
1
|
+
import { type ApplyIntent, type Artifact, type PlannedDeletion, type RetentionPolicy, type Tombstone } from '@looply/core';
|
|
2
|
+
/**
|
|
3
|
+
* `looply evidence` — THE INVENTORY THE RETENTION POLICY WAS WAITING FOR.
|
|
4
|
+
*
|
|
5
|
+
* 🔴 D5 SHIPPED A COMPLETE POLICY WITH NO CALLER. `retentionPlan` and
|
|
6
|
+
* `describeRetentionPlan` had zero production callers: the fold knew what should
|
|
7
|
+
* expire and nothing ever asked it. This asks.
|
|
8
|
+
*
|
|
9
|
+
* ⚠️ AND IT ONLY ASKS. There is no `--apply`, deliberately. `retentionPlan`'s own
|
|
10
|
+
* docblock is unambiguous about why — *"DRY RUN IS NOT A MODE HERE, IT IS THE
|
|
11
|
+
* ONLY THING THIS FUNCTION DOES. The charter requires that old stores get an
|
|
12
|
+
* inventory before anything is removed, and a function that could be called in
|
|
13
|
+
* either mode is one that gets called in the wrong one."* The same reasoning
|
|
14
|
+
* applies one level up: a command that could delete is one that eventually
|
|
15
|
+
* deletes the wrong thing, and the policy's first rule is the one about not
|
|
16
|
+
* deleting.
|
|
17
|
+
*
|
|
18
|
+
* So this prints what WOULD happen and stops. Applying a plan is a separate act
|
|
19
|
+
* somebody builds deliberately, with the tombstones the policy already
|
|
20
|
+
* specifies, and it is recorded as UNFINISHED rather than half-built here.
|
|
21
|
+
*/
|
|
22
|
+
export declare const EVIDENCE_USAGE: string;
|
|
23
|
+
export declare const EXIT_OK = 0;
|
|
24
|
+
export declare const EXIT_USAGE = 2;
|
|
25
|
+
/** The budget cannot be met without expiring something that may not be. */
|
|
26
|
+
export declare const EXIT_PAUSE_CAPTURE = 4;
|
|
27
|
+
/**
|
|
28
|
+
* An apply ran and refused at least one removal.
|
|
29
|
+
*
|
|
30
|
+
* 🔴 ITS OWN CODE, BECAUSE A REFUSAL IS NOT AN ERROR AND NOT A SUCCESS. Every
|
|
31
|
+
* refusal is the policy working, and a script that treated them as failure
|
|
32
|
+
* would learn to ignore them. One that could not tell them from a clean run
|
|
33
|
+
* would never look.
|
|
34
|
+
*/
|
|
35
|
+
export declare const EXIT_REFUSED = 5;
|
|
36
|
+
export interface EvidenceDeps {
|
|
37
|
+
/**
|
|
38
|
+
* Every artifact this project has, already classified.
|
|
39
|
+
*
|
|
40
|
+
* ⚠️ `owned` MUST be set by whoever knows. The policy treats absent as NOT
|
|
41
|
+
* owned and refuses to expire it — which is the safe default and exactly why
|
|
42
|
+
* the caller, not the fold, decides.
|
|
43
|
+
*/
|
|
44
|
+
artifacts(): Promise<readonly Artifact[]>;
|
|
45
|
+
/**
|
|
46
|
+
* What is present in the state directory and has NO class, so is not part of
|
|
47
|
+
* the plan above.
|
|
48
|
+
*
|
|
49
|
+
* 🔴 REPORTING THIS IS NOT OPTIONAL. Measured on a real project, the two
|
|
50
|
+
* classified stores held 109 KB of a 195 KB state directory: a report saying
|
|
51
|
+
* "7 artifacts across 2 stores" and nothing else silently omitted 44% of what
|
|
52
|
+
* was there, and read like an accounting. An instrument that measures less
|
|
53
|
+
* than it appears to is the defect this codebase names most often.
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* ⚠️ `bytes: null` means **could not be read**, not zero. An entry the
|
|
57
|
+
* scanner cannot size still has to appear, because the alternative is the
|
|
58
|
+
* silence this whole report exists to prevent.
|
|
59
|
+
*/
|
|
60
|
+
uninventoried(): Promise<readonly {
|
|
61
|
+
name: string;
|
|
62
|
+
bytes: number | null;
|
|
63
|
+
}[]>;
|
|
64
|
+
policy(): RetentionPolicy;
|
|
65
|
+
nowMs(): number;
|
|
66
|
+
out(line: string): void;
|
|
67
|
+
err(line: string): void;
|
|
68
|
+
/** Where an artifact lives on disk, absolute. */
|
|
69
|
+
pathOf?(a: Artifact): string;
|
|
70
|
+
/**
|
|
71
|
+
* The project's own state directory.
|
|
72
|
+
*
|
|
73
|
+
* 🔴 THIS IS WHAT MAKES A ROOT "EXPLICITLY RECORDED". `OWNER_CHARTER.md` §5 D5
|
|
74
|
+
* limits application to *"explicitly recorded disposable roots"*, and a path
|
|
75
|
+
* typed on a command line is explicit but not recorded — a typo is just as
|
|
76
|
+
* explicit. A root has to be one the PRODUCT made and knows about, so it is
|
|
77
|
+
* checked against this and refused otherwise.
|
|
78
|
+
*/
|
|
79
|
+
stateDir?(): string;
|
|
80
|
+
/** Carry out an intent. Injected, so this command is testable without a disk. */
|
|
81
|
+
apply?(intent: ApplyIntent): ApplyResult;
|
|
82
|
+
}
|
|
83
|
+
/** What `applyRetention` answers with, as this command needs to read it. */
|
|
84
|
+
export interface ApplyResult {
|
|
85
|
+
readonly removed: readonly Tombstone[];
|
|
86
|
+
readonly refused: readonly {
|
|
87
|
+
id: string;
|
|
88
|
+
because: string;
|
|
89
|
+
}[];
|
|
90
|
+
readonly alreadyGone: readonly string[];
|
|
91
|
+
readonly resumed: readonly string[];
|
|
92
|
+
/** Entries this intent had already finished. Absent on an older executor. */
|
|
93
|
+
readonly settled?: readonly {
|
|
94
|
+
id: string;
|
|
95
|
+
phase: string;
|
|
96
|
+
}[];
|
|
97
|
+
}
|
|
98
|
+
export declare function evidenceCommand(argv: readonly string[], deps: EvidenceDeps): Promise<number>;
|
|
99
|
+
/**
|
|
100
|
+
* The intent's id, DERIVED FROM WHAT IT IS ABOUT rather than freshly minted.
|
|
101
|
+
*
|
|
102
|
+
* 🔴 A MINTED ID MEANT A CRASH COULD NEVER BE RESUMED. `resumeApply` reads the
|
|
103
|
+
* journal for records of THIS intent; with a new id every invocation, an
|
|
104
|
+
* `intended` left behind by a crash belonged to an id nothing would ever ask
|
|
105
|
+
* about again — so the one state the two-phase journal exists to survive was
|
|
106
|
+
* the one state it could not reach. Measured live: three identical `refused`
|
|
107
|
+
* records for one artifact across three runs, because every run decided it
|
|
108
|
+
* afresh under a new name.
|
|
109
|
+
*
|
|
110
|
+
* Deriving it from the root and from each deletion's identity, size and age
|
|
111
|
+
* means the same plan is the same intent — so a crash resumes — and a different
|
|
112
|
+
* plan is a different one, so a later, different apply is not mistaken for a
|
|
113
|
+
* continuation of an earlier one.
|
|
114
|
+
*
|
|
115
|
+
* FNV-1a, inline: this needs a stable short string, not a cryptographic
|
|
116
|
+
* property, and reaching for a hash module to get one would be a dependency
|
|
117
|
+
* with nothing behind it.
|
|
118
|
+
*/
|
|
119
|
+
export declare function intentIdFor(root: string, deletions: readonly PlannedDeletion[]): string;
|
|
120
|
+
/**
|
|
121
|
+
* What this report does NOT account for, said out loud with its size.
|
|
122
|
+
*
|
|
123
|
+
* ⚠️ THE POLICY'S UNIT IS AN ARTIFACT WITH A CLASS, and a ledger or a cache
|
|
124
|
+
* has no class until somebody decides what one entry of it IS. Guessing in
|
|
125
|
+
* order to report a bigger number would be worse than omitting them — but
|
|
126
|
+
* omitting them SILENTLY is worse still, because the total then reads as the
|
|
127
|
+
* whole accounting.
|
|
128
|
+
*/
|
|
129
|
+
/** How many named entries the short form shows before it says how many it is hiding. */
|
|
130
|
+
export declare const UNINVENTORIED_PREVIEW = 5;
|
|
131
|
+
/** The numbers, unless a project says otherwise. Stated once, here and in the policy. */
|
|
132
|
+
export declare const evidencePolicy: () => RetentionPolicy;
|
|
133
|
+
//# sourceMappingURL=evidence-cmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence-cmd.d.ts","sourceRoot":"","sources":["../src/evidence-cmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,eAAO,MAAM,cAAc,QAQf,CAAC;AAEb,eAAO,MAAM,OAAO,IAAI,CAAC;AACzB,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,2EAA2E;AAC3E,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,SAAS,IAAI,OAAO,CAAC,SAAS,QAAQ,EAAE,CAAC,CAAC;IAC1C;;;;;;;;;OASG;IACH;;;;OAIG;IACH,aAAa,IAAI,OAAO,CAAC,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAAE,CAAC,CAAC;IAC5E,MAAM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
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.evidencePolicy = exports.UNINVENTORIED_PREVIEW = exports.EXIT_REFUSED = exports.EXIT_PAUSE_CAPTURE = exports.EXIT_USAGE = exports.EXIT_OK = exports.EVIDENCE_USAGE = void 0;
|
|
4
|
+
exports.evidenceCommand = evidenceCommand;
|
|
5
|
+
exports.intentIdFor = intentIdFor;
|
|
6
|
+
const core_1 = require("@looply/core");
|
|
7
|
+
/**
|
|
8
|
+
* `looply evidence` — THE INVENTORY THE RETENTION POLICY WAS WAITING FOR.
|
|
9
|
+
*
|
|
10
|
+
* 🔴 D5 SHIPPED A COMPLETE POLICY WITH NO CALLER. `retentionPlan` and
|
|
11
|
+
* `describeRetentionPlan` had zero production callers: the fold knew what should
|
|
12
|
+
* expire and nothing ever asked it. This asks.
|
|
13
|
+
*
|
|
14
|
+
* ⚠️ AND IT ONLY ASKS. There is no `--apply`, deliberately. `retentionPlan`'s own
|
|
15
|
+
* docblock is unambiguous about why — *"DRY RUN IS NOT A MODE HERE, IT IS THE
|
|
16
|
+
* ONLY THING THIS FUNCTION DOES. The charter requires that old stores get an
|
|
17
|
+
* inventory before anything is removed, and a function that could be called in
|
|
18
|
+
* either mode is one that gets called in the wrong one."* The same reasoning
|
|
19
|
+
* applies one level up: a command that could delete is one that eventually
|
|
20
|
+
* deletes the wrong thing, and the policy's first rule is the one about not
|
|
21
|
+
* deleting.
|
|
22
|
+
*
|
|
23
|
+
* So this prints what WOULD happen and stops. Applying a plan is a separate act
|
|
24
|
+
* somebody builds deliberately, with the tombstones the policy already
|
|
25
|
+
* specifies, and it is recorded as UNFINISHED rather than half-built here.
|
|
26
|
+
*/
|
|
27
|
+
exports.EVIDENCE_USAGE = [
|
|
28
|
+
'looply evidence what this project has accumulated, and what the retention policy would do with it',
|
|
29
|
+
'looply evidence --all the same, listing every uninventoried entry by name rather than the largest few',
|
|
30
|
+
'looply evidence --apply --root <d> carry the plan out, inside that one directory and nowhere else',
|
|
31
|
+
'',
|
|
32
|
+
'Without --apply it deletes nothing. With it, --root is REQUIRED and must name one',
|
|
33
|
+
'of this project\'s own evidence stores: the executor refuses anything unowned,',
|
|
34
|
+
'pinned, referenced, changed since the plan, or reachable only through a link.',
|
|
35
|
+
].join('\n');
|
|
36
|
+
exports.EXIT_OK = 0;
|
|
37
|
+
exports.EXIT_USAGE = 2;
|
|
38
|
+
/** The budget cannot be met without expiring something that may not be. */
|
|
39
|
+
exports.EXIT_PAUSE_CAPTURE = 4;
|
|
40
|
+
/**
|
|
41
|
+
* An apply ran and refused at least one removal.
|
|
42
|
+
*
|
|
43
|
+
* 🔴 ITS OWN CODE, BECAUSE A REFUSAL IS NOT AN ERROR AND NOT A SUCCESS. Every
|
|
44
|
+
* refusal is the policy working, and a script that treated them as failure
|
|
45
|
+
* would learn to ignore them. One that could not tell them from a clean run
|
|
46
|
+
* would never look.
|
|
47
|
+
*/
|
|
48
|
+
exports.EXIT_REFUSED = 5;
|
|
49
|
+
const kb = (bytes) => bytes >= 1024 * 1024 ? `${(bytes / 1024 / 1024).toFixed(1)} MB` : `${Math.round(bytes / 1024)} KB`;
|
|
50
|
+
async function evidenceCommand(argv, deps) {
|
|
51
|
+
/** Arguments first, before anything is read — the R2-G-1 lesson. */
|
|
52
|
+
const all = argv.includes('--all');
|
|
53
|
+
const apply = argv.includes('--apply');
|
|
54
|
+
const rootAt = argv.indexOf('--root');
|
|
55
|
+
const root = rootAt >= 0 ? argv[rootAt + 1] : undefined;
|
|
56
|
+
const consumed = new Set();
|
|
57
|
+
for (const [i, a] of argv.entries()) {
|
|
58
|
+
if (a === '--all' || a === '--apply' || a === '--root')
|
|
59
|
+
consumed.add(i);
|
|
60
|
+
if (a === '--root' && rootAt === i)
|
|
61
|
+
consumed.add(i + 1);
|
|
62
|
+
}
|
|
63
|
+
const unknown = argv.filter((_, i) => !consumed.has(i));
|
|
64
|
+
if (unknown.length > 0) {
|
|
65
|
+
deps.err(`looply evidence: ${unknown.join(', ')} — no idea what that means.\n\n${exports.EVIDENCE_USAGE}`);
|
|
66
|
+
return exports.EXIT_USAGE;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* ⚠️ `--root` WITHOUT `--apply` IS REFUSED RATHER THAN IGNORED. A person who
|
|
70
|
+
* typed a root meant to act on it; printing a report and exiting 0 would look
|
|
71
|
+
* exactly like having done so.
|
|
72
|
+
*/
|
|
73
|
+
if (rootAt >= 0 && !apply) {
|
|
74
|
+
deps.err(`looply evidence: --root means nothing without --apply.\n\n${exports.EVIDENCE_USAGE}`);
|
|
75
|
+
return exports.EXIT_USAGE;
|
|
76
|
+
}
|
|
77
|
+
if (apply) {
|
|
78
|
+
const bad = applyPrecheck(root, deps);
|
|
79
|
+
if (bad !== null) {
|
|
80
|
+
deps.err(`looply evidence --apply: ${bad}`);
|
|
81
|
+
return exports.EXIT_USAGE;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const artifacts = await deps.artifacts();
|
|
85
|
+
const uncounted = await deps.uninventoried();
|
|
86
|
+
if (artifacts.length === 0) {
|
|
87
|
+
deps.out('evidence: this project has accumulated nothing the retention policy covers.');
|
|
88
|
+
reportUninventoried(deps, uncounted, all);
|
|
89
|
+
return exports.EXIT_OK;
|
|
90
|
+
}
|
|
91
|
+
// (artifacts, nowMs, policy) — the order the fold declares, not the one that reads nicely.
|
|
92
|
+
const plan = (0, core_1.retentionPlan)(artifacts, deps.nowMs(), deps.policy());
|
|
93
|
+
/** What is there, by store, before anything about expiry. */
|
|
94
|
+
const byStore = new Map();
|
|
95
|
+
for (const a of artifacts) {
|
|
96
|
+
const at = byStore.get(a.store) ?? { count: 0, bytes: 0 };
|
|
97
|
+
byStore.set(a.store, { count: at.count + 1, bytes: at.bytes + a.bytes });
|
|
98
|
+
}
|
|
99
|
+
deps.out(`evidence: ${artifacts.length} artifact(s) across ${byStore.size} store(s)`);
|
|
100
|
+
for (const [store, at] of [...byStore.entries()].sort((a, b) => b[1].bytes - a[1].bytes)) {
|
|
101
|
+
deps.out(` ${store.padEnd(22)} ${String(at.count).padStart(4)} ${kb(at.bytes).padStart(9)}`);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* ⚠️ PROTECTED BYTES ARE SAID SEPARATELY FROM KEPT ONES. They are not the
|
|
105
|
+
* same claim: kept-but-expirable will go one day, and protected will not go
|
|
106
|
+
* at all. A single "retained" number would hide which of those a person is
|
|
107
|
+
* looking at.
|
|
108
|
+
*/
|
|
109
|
+
deps.out('');
|
|
110
|
+
deps.out(` would expire ${String(plan.tombstones.length).padStart(4)} ${kb(plan.tombstones.reduce((n, t) => n + t.bytes, 0)).padStart(9)}`);
|
|
111
|
+
deps.out(` would keep ${String(plan.decisions.filter((d) => d.verdict.kind === 'keep').length).padStart(4)} ${kb(plan.unpinnedBytesAfter).padStart(9)} unpinned, still expirable later`);
|
|
112
|
+
deps.out(` protected ${' -'} ${kb(plan.protectedBytes).padStart(9)} pinned or not owned — nothing may expire these`);
|
|
113
|
+
/**
|
|
114
|
+
* 🔴 THE REASONS ARE PRINTED, NOT JUST THE COUNTS. An inventory that said
|
|
115
|
+
* "12 would expire" and nothing else is a number somebody has to trust. The
|
|
116
|
+
* policy writes a `because` for every decision; this is where a person reads
|
|
117
|
+
* it and disagrees with it before anything is ever applied.
|
|
118
|
+
*/
|
|
119
|
+
/**
|
|
120
|
+
* 🔴 THE "NOTHING WAS DELETED" LINE IS DROPPED WHEN SOMETHING IS ABOUT TO BE.
|
|
121
|
+
*
|
|
122
|
+
* `describeRetentionPlan` ends with *"nothing was deleted: this is a plan, and
|
|
123
|
+
* applying one is a separate deliberate act"* — true of every report, and
|
|
124
|
+
* FALSE three lines above an apply that removed two directories. Measured on a
|
|
125
|
+
* real project: the report said nothing was deleted and the apply underneath
|
|
126
|
+
* it said `removed 2`. A reassurance contradicted by the next paragraph is
|
|
127
|
+
* worse than no reassurance.
|
|
128
|
+
*/
|
|
129
|
+
const lines = (0, core_1.describeRetentionPlan)(plan).filter((l) => !(apply && l.includes('nothing was deleted')));
|
|
130
|
+
if (lines.length > 0) {
|
|
131
|
+
deps.out('');
|
|
132
|
+
for (const line of lines)
|
|
133
|
+
deps.out(` ${line}`);
|
|
134
|
+
}
|
|
135
|
+
reportUninventoried(deps, uncounted, all);
|
|
136
|
+
if (apply) {
|
|
137
|
+
return carryOut(plan.tombstones, root, deps);
|
|
138
|
+
}
|
|
139
|
+
if (plan.capturePaused) {
|
|
140
|
+
/**
|
|
141
|
+
* 🔴 AN ACTIONABLE STATE, AND ITS OWN EXIT CODE. The budget is full of
|
|
142
|
+
* things that may not be expired, so capture of NEW artifacts must stop
|
|
143
|
+
* until a person resolves it. Reporting that as ordinary output would let a
|
|
144
|
+
* script sail past the one condition the budget exists to surface.
|
|
145
|
+
*/
|
|
146
|
+
deps.err('');
|
|
147
|
+
deps.err('evidence: CAPTURE PAUSED — the budget is full of artifacts nothing may expire. ' +
|
|
148
|
+
'New capture in those stores should stop until somebody pins less, or raises the budget deliberately.');
|
|
149
|
+
return exports.EXIT_PAUSE_CAPTURE;
|
|
150
|
+
}
|
|
151
|
+
// No closing line of our own: `describeRetentionPlan` already ends with
|
|
152
|
+
// "nothing was deleted: this is a plan…", and saying it twice would read as
|
|
153
|
+
// two different reassurances rather than one fact.
|
|
154
|
+
return exports.EXIT_OK;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* The intent's id, DERIVED FROM WHAT IT IS ABOUT rather than freshly minted.
|
|
158
|
+
*
|
|
159
|
+
* 🔴 A MINTED ID MEANT A CRASH COULD NEVER BE RESUMED. `resumeApply` reads the
|
|
160
|
+
* journal for records of THIS intent; with a new id every invocation, an
|
|
161
|
+
* `intended` left behind by a crash belonged to an id nothing would ever ask
|
|
162
|
+
* about again — so the one state the two-phase journal exists to survive was
|
|
163
|
+
* the one state it could not reach. Measured live: three identical `refused`
|
|
164
|
+
* records for one artifact across three runs, because every run decided it
|
|
165
|
+
* afresh under a new name.
|
|
166
|
+
*
|
|
167
|
+
* Deriving it from the root and from each deletion's identity, size and age
|
|
168
|
+
* means the same plan is the same intent — so a crash resumes — and a different
|
|
169
|
+
* plan is a different one, so a later, different apply is not mistaken for a
|
|
170
|
+
* continuation of an earlier one.
|
|
171
|
+
*
|
|
172
|
+
* FNV-1a, inline: this needs a stable short string, not a cryptographic
|
|
173
|
+
* property, and reaching for a hash module to get one would be a dependency
|
|
174
|
+
* with nothing behind it.
|
|
175
|
+
*/
|
|
176
|
+
function intentIdFor(root, deletions) {
|
|
177
|
+
const material = [root, ...[...deletions].map((d) => `${d.id}:${d.bytes}:${d.createdAtMs}`).sort()].join('|');
|
|
178
|
+
let h = 0x811c9dc5;
|
|
179
|
+
for (let i = 0; i < material.length; i += 1) {
|
|
180
|
+
h ^= material.charCodeAt(i);
|
|
181
|
+
h = Math.imul(h, 0x01000193) >>> 0;
|
|
182
|
+
}
|
|
183
|
+
return `ret_${h.toString(36)}`;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Everything wrong with an `--apply` invocation, before a single file is read.
|
|
187
|
+
*
|
|
188
|
+
* Null when there is nothing wrong. Checked BEFORE the inventory, so a bad root
|
|
189
|
+
* never reaches a plan — the R2-G-1 lesson applied to the one verb that can
|
|
190
|
+
* destroy something.
|
|
191
|
+
*/
|
|
192
|
+
function applyPrecheck(root, deps) {
|
|
193
|
+
if (deps.apply === undefined || deps.pathOf === undefined || deps.stateDir === undefined) {
|
|
194
|
+
return 'this build has no executor wired to it, so there is nothing to apply with';
|
|
195
|
+
}
|
|
196
|
+
if (root === undefined || root === '' || root.startsWith('--')) {
|
|
197
|
+
return '--root is required, and must name one of this project\u2019s evidence stores';
|
|
198
|
+
}
|
|
199
|
+
const state = deps.stateDir();
|
|
200
|
+
if (!(0, core_1.insideRoot)(state, root)) {
|
|
201
|
+
return `${root} is not inside this project\u2019s state directory (${state}), and only a root the product made may be applied to`;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* 🔴 AND IT MUST NOT BE THE STATE DIRECTORY ITSELF. `insideRoot` answers true
|
|
205
|
+
* for the root it is given, so naming the state directory would authorise the
|
|
206
|
+
* queue, the ledger, the lease and every index under it. A store is a child of
|
|
207
|
+
* it, never it.
|
|
208
|
+
*/
|
|
209
|
+
if ((0, core_1.insideRoot)(root, state)) {
|
|
210
|
+
return `${root} is the whole state directory — name a single store inside it, not the directory that holds everything`;
|
|
211
|
+
}
|
|
212
|
+
return null;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Turn what the plan would expire into an intent bounded by one root, and run it.
|
|
216
|
+
*
|
|
217
|
+
* ⚠️ THE PLAN IS FILTERED TO THE ROOT, NOT CHECKED AGAINST IT. An artifact the
|
|
218
|
+
* policy would expire that lives somewhere else is not an error and not a
|
|
219
|
+
* refusal — the person named one store, and the others are simply not this
|
|
220
|
+
* invocation's business. They are counted out loud so the difference between
|
|
221
|
+
* "nothing to do" and "nothing HERE to do" is visible.
|
|
222
|
+
*/
|
|
223
|
+
function carryOut(tombstones, root, deps) {
|
|
224
|
+
const pathOf = deps.pathOf;
|
|
225
|
+
const run = deps.apply;
|
|
226
|
+
const all = tombstones.map((t) => ({
|
|
227
|
+
id: t.id,
|
|
228
|
+
store: t.store,
|
|
229
|
+
path: pathOf({ id: t.id, store: t.store, bytes: t.bytes, createdAtMs: t.createdAtMs, class: 'failure-diagnostic' }),
|
|
230
|
+
bytes: t.bytes,
|
|
231
|
+
createdAtMs: t.createdAtMs,
|
|
232
|
+
because: t.because,
|
|
233
|
+
}));
|
|
234
|
+
const here = all.filter((d) => (0, core_1.insideRoot)(root, d.path));
|
|
235
|
+
const elsewhere = all.length - here.length;
|
|
236
|
+
deps.out('');
|
|
237
|
+
if (here.length === 0) {
|
|
238
|
+
deps.out(elsewhere === 0
|
|
239
|
+
? 'apply: the policy would expire nothing, so there is nothing to carry out.'
|
|
240
|
+
: `apply: nothing to carry out in ${root} — the ${elsewhere} the policy would expire live in other stores.`);
|
|
241
|
+
return exports.EXIT_OK;
|
|
242
|
+
}
|
|
243
|
+
const intent = {
|
|
244
|
+
intentId: intentIdFor(root, here),
|
|
245
|
+
root,
|
|
246
|
+
plannedAtMs: deps.nowMs(),
|
|
247
|
+
policy: deps.policy(),
|
|
248
|
+
deletions: here,
|
|
249
|
+
};
|
|
250
|
+
const out = run(intent);
|
|
251
|
+
deps.out(`apply: ${here.length} planned in ${root}${elsewhere > 0 ? ` (${elsewhere} more are in other stores)` : ''}`);
|
|
252
|
+
if (out.resumed.length > 0)
|
|
253
|
+
deps.out(` resumed ${String(out.resumed.length).padStart(4)} left in flight by an earlier run`);
|
|
254
|
+
deps.out(` removed ${String(out.removed.length).padStart(4)} ${kb(out.removed.reduce((n, t) => n + t.bytes, 0)).padStart(9)}`);
|
|
255
|
+
if (out.alreadyGone.length > 0)
|
|
256
|
+
deps.out(` already gone ${String(out.alreadyGone.length).padStart(4)} removed before this run reached them`);
|
|
257
|
+
/**
|
|
258
|
+
* 🔴 EVERY REFUSAL IS PRINTED WITH ITS REASON. A count of refusals is a number
|
|
259
|
+
* nobody can act on; the whole design of the executor is that it says which of
|
|
260
|
+
* a dozen named reasons applied, and a report that swallowed those would make
|
|
261
|
+
* the care in it invisible.
|
|
262
|
+
*/
|
|
263
|
+
for (const r of out.refused)
|
|
264
|
+
deps.out(` refused ${r.id}: ${r.because}`);
|
|
265
|
+
/**
|
|
266
|
+
* 🔴 A REFUSAL THIS RUN DID NOT MAKE IS STILL A REFUSAL.
|
|
267
|
+
*
|
|
268
|
+
* Running the same plan twice decides nothing the second time — that is the
|
|
269
|
+
* journal working. But reporting "removed 0, refused 0, exit 0" would tell
|
|
270
|
+
* somebody re-running to check that everything is fine, about a store where an
|
|
271
|
+
* artifact is still standing because the policy refused to remove it. The
|
|
272
|
+
* decision holds; it was simply made earlier, and it is said and counted.
|
|
273
|
+
*/
|
|
274
|
+
const stoodRefused = (out.settled ?? []).filter((e) => e.phase === 'refused');
|
|
275
|
+
for (const e of stoodRefused)
|
|
276
|
+
deps.out(` refused ${e.id}: decided by an earlier run of this same plan, and it still stands`);
|
|
277
|
+
if ((out.settled ?? []).length > 0) {
|
|
278
|
+
deps.out(` settled ${String(out.settled.length).padStart(4)} this plan had already been carried out`);
|
|
279
|
+
}
|
|
280
|
+
return out.refused.length + stoodRefused.length > 0 ? exports.EXIT_REFUSED : exports.EXIT_OK;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* What this report does NOT account for, said out loud with its size.
|
|
284
|
+
*
|
|
285
|
+
* ⚠️ THE POLICY'S UNIT IS AN ARTIFACT WITH A CLASS, and a ledger or a cache
|
|
286
|
+
* has no class until somebody decides what one entry of it IS. Guessing in
|
|
287
|
+
* order to report a bigger number would be worse than omitting them — but
|
|
288
|
+
* omitting them SILENTLY is worse still, because the total then reads as the
|
|
289
|
+
* whole accounting.
|
|
290
|
+
*/
|
|
291
|
+
/** How many named entries the short form shows before it says how many it is hiding. */
|
|
292
|
+
exports.UNINVENTORIED_PREVIEW = 5;
|
|
293
|
+
function reportUninventoried(deps, uncounted, all) {
|
|
294
|
+
if (uncounted.length === 0)
|
|
295
|
+
return;
|
|
296
|
+
/**
|
|
297
|
+
* 🔴 THE DOCBLOCK ABOVE SAID IT, AND THE CODE DID THE OPPOSITE.
|
|
298
|
+
*
|
|
299
|
+
* *"omitting them SILENTLY is worse still, because the total then reads as
|
|
300
|
+
* the whole accounting"* — and an entry the scanner could not `stat` was
|
|
301
|
+
* dropped on the floor, so a state directory containing an unreadable entry
|
|
302
|
+
* reported the same count and the same total as one containing nothing of
|
|
303
|
+
* the kind. Measured: 24 entries / 94 KB before a dangling junction was put
|
|
304
|
+
* in the state dir, and **24 entries / 94 KB after**.
|
|
305
|
+
*
|
|
306
|
+
* ⚠️ So an unsized entry is counted, named, and kept OUT of the byte total,
|
|
307
|
+
* and the total is marked as a floor rather than a figure. Adding a zero for
|
|
308
|
+
* it would understate the directory while looking exact, which is the same
|
|
309
|
+
* failure wearing a number.
|
|
310
|
+
*/
|
|
311
|
+
const sized = uncounted.filter((u) => u.bytes !== null);
|
|
312
|
+
const unsized = uncounted.filter((u) => u.bytes === null);
|
|
313
|
+
const total = sized.reduce((n, u) => n + u.bytes, 0);
|
|
314
|
+
const size = unsized.length > 0 ? `at least ${kb(total)}` : kb(total);
|
|
315
|
+
deps.out('');
|
|
316
|
+
deps.out(` NOT inventoried: ${uncounted.length} entr${uncounted.length === 1 ? 'y' : 'ies'}, ${size} — no class yet, so no plan covers them`);
|
|
317
|
+
/**
|
|
318
|
+
* 🔴 `… and 20 more` HID THE ONE THING THE CHARTER ASKS FOR BY NAME.
|
|
319
|
+
*
|
|
320
|
+
* `OWNER_CHARTER.md` §5 D5: *"Also cover the named compile/tool/rejected
|
|
321
|
+
* stores or report exact unclassified entries."* `rejected` is inventoried;
|
|
322
|
+
* the compile and tool stores are not, and on a real project they sat inside
|
|
323
|
+
* an elision that named five entries and swallowed twenty. A reader could not
|
|
324
|
+
* tell whether they were in there at all.
|
|
325
|
+
*
|
|
326
|
+
* So `--all` lists every one, and the short form's elision now carries the
|
|
327
|
+
* BYTES it is hiding as well as the count — a number that cannot be read as
|
|
328
|
+
* "a few small ones" when it is not.
|
|
329
|
+
*/
|
|
330
|
+
const ordered = [...sized].sort((a, b) => b.bytes - a.bytes);
|
|
331
|
+
const shown = all ? ordered : ordered.slice(0, exports.UNINVENTORIED_PREVIEW);
|
|
332
|
+
for (const u of shown) {
|
|
333
|
+
deps.out(` ${u.name.padEnd(30)} ${kb(u.bytes).padStart(9)}`);
|
|
334
|
+
}
|
|
335
|
+
const hidden = ordered.slice(shown.length);
|
|
336
|
+
if (hidden.length > 0) {
|
|
337
|
+
const hiddenBytes = hidden.reduce((n, u) => n + u.bytes, 0);
|
|
338
|
+
deps.out(` … and ${hidden.length} more, ${kb(hiddenBytes)} — \`looply evidence --all\` names them`);
|
|
339
|
+
}
|
|
340
|
+
for (const u of unsized) {
|
|
341
|
+
deps.out(` ${u.name.padEnd(30)} ${'unreadable'.padStart(9)}`);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
/** The numbers, unless a project says otherwise. Stated once, here and in the policy. */
|
|
345
|
+
const evidencePolicy = () => core_1.DEFAULT_RETENTION;
|
|
346
|
+
exports.evidencePolicy = evidencePolicy;
|
|
347
|
+
//# sourceMappingURL=evidence-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence-cmd.js","sourceRoot":"","sources":["../src/evidence-cmd.ts"],"names":[],"mappings":";;;AAsHA,0CAiHC;AAuBD,kCAQC;AAtQD,uCAUsB;AAEtB;;;;;;;;;;;;;;;;;;;GAmBG;AAEU,QAAA,cAAc,GAAG;IAC5B,uHAAuH;IACvH,qHAAqH;IACrH,oGAAoG;IACpG,EAAE;IACF,mFAAmF;IACnF,gFAAgF;IAChF,+EAA+E;CAChF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEA,QAAA,OAAO,GAAG,CAAC,CAAC;AACZ,QAAA,UAAU,GAAG,CAAC,CAAC;AAC5B,2EAA2E;AAC9D,QAAA,kBAAkB,GAAG,CAAC,CAAC;AACpC;;;;;;;GAOG;AACU,QAAA,YAAY,GAAG,CAAC,CAAC;AA4D9B,MAAM,EAAE,GAAG,CAAC,KAAa,EAAU,EAAE,CACnC,KAAK,IAAI,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;AAE9F,KAAK,UAAU,eAAe,CAAC,IAAuB,EAAE,IAAkB;IAC/E,oEAAoE;IACpE,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACnC,MAAM,KAAK,GAAG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CAAC,GAAG,CAAC,aAAa,MAAM,CAAC,MAAM,UAAU,EAAE,CAAC,WAAW,CAAC,yCAAyC,CAAC,CAAC;IACzG,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;AACH,CAAC;AAED,yFAAyF;AAClF,MAAM,cAAc,GAAG,GAAoB,EAAE,CAAC,wBAAiB,CAAC;AAA1D,QAAA,cAAc,kBAA4C"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHAT THE FILESYSTEM CANNOT SAY: provenance, pins and references, asked
|
|
3
|
+
* again at the moment of removal.
|
|
4
|
+
*
|
|
5
|
+
* 🔴 IT LIVES HERE, AND NOT IN `bin.ts`, FOR THE REASON `self-repo-id.ts`
|
|
6
|
+
* gives at length: a spec that needs this would otherwise have to import the
|
|
7
|
+
* CLI entry point, and two suites importing that file is how a half-written
|
|
8
|
+
* transform cache entry took the gate down twice. It is also the only way to
|
|
9
|
+
* test it at all — this is the last check before a delete, and it had no
|
|
10
|
+
* spec of its own while it was a private function in a 2,000-line file.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Ownership, class and — the hard one — whether anything still refers to it.
|
|
14
|
+
*
|
|
15
|
+
* 🔴 `referenced` DEFAULTS TO TRUE, AND THAT IS THE WHOLE DESIGN OF IT.
|
|
16
|
+
* `OWNER_CHARTER.md` §5 D5 forbids deleting *"artifacts referenced by
|
|
17
|
+
* active/review/recovery work"* and says *"missing/unreadable/unknown is never
|
|
18
|
+
* deletion permission"*. Put together, those mean an artifact whose references
|
|
19
|
+
* could not be established is referenced as far as this is concerned. Only a
|
|
20
|
+
* check that RAN and found nothing may answer false.
|
|
21
|
+
*
|
|
22
|
+
* The three places a rejected candidate can still be spoken for, and all of them
|
|
23
|
+
* are bounded reads of files this project already keeps:
|
|
24
|
+
*
|
|
25
|
+
* run.lease.json the run holding the project right now
|
|
26
|
+
* runs/ the run records that have not been reaped
|
|
27
|
+
* queue.json an item still carrying the failure this candidate is from
|
|
28
|
+
*
|
|
29
|
+
* ⚠️ NOT `events.jsonl`. Every run id that ever existed is in it, so a search
|
|
30
|
+
* there would find every artifact referenced for ever and the policy would never
|
|
31
|
+
* expire anything — a rule that always says no is indistinguishable from one
|
|
32
|
+
* nobody wrote.
|
|
33
|
+
*/
|
|
34
|
+
export declare function artifactFacts(stateDir: string, id: string): {
|
|
35
|
+
owned: boolean;
|
|
36
|
+
pinned: boolean;
|
|
37
|
+
referenced: boolean;
|
|
38
|
+
class: 'failure-diagnostic' | 'success-diagnostic' | 'durable';
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=evidence-facts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence-facts.d.ts","sourceRoot":"","sources":["../src/evidence-facts.ts"],"names":[],"mappings":"AAyBA;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG;IAC3D,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,oBAAoB,GAAG,oBAAoB,GAAG,SAAS,CAAC;CAChE,CAuDA"}
|