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,80 @@
|
|
|
1
|
+
import { type CombinedVerdict, type CrossRepoNeed } from '@looply/core';
|
|
2
|
+
import { type CompatibleRecord } from './compatible-sets';
|
|
3
|
+
/**
|
|
4
|
+
* `looply repos` — THE CONSUMER D7 SAYS THIS MUST HAVE.
|
|
5
|
+
*
|
|
6
|
+
* 🔴 *"Do not reduce this to a manifest writer with no consumer."* A recorded
|
|
7
|
+
* compatible-revision set that nothing ever asks about is a log line pretending
|
|
8
|
+
* to be a safeguard. This is the asking: it reads what was accepted, reads where
|
|
9
|
+
* the repositories actually are now, and says whether the set still holds.
|
|
10
|
+
*
|
|
11
|
+
* Three verbs, and the middle one is the whole feature:
|
|
12
|
+
*
|
|
13
|
+
* looply repos what is true now
|
|
14
|
+
* looply repos --accept write down the revisions as compatible
|
|
15
|
+
* looply repos --published <id> one repository published; the rest remain
|
|
16
|
+
*
|
|
17
|
+
* ⚠️ IT PUBLISHES NOTHING ITSELF, and that is deliberate. Publication across
|
|
18
|
+
* repositories is not atomic and this does not pretend otherwise: it records
|
|
19
|
+
* that a step happened and says what is left, so an interruption leaves a
|
|
20
|
+
* resumable state rather than a mystery.
|
|
21
|
+
*/
|
|
22
|
+
export declare const REPOS_USAGE: string;
|
|
23
|
+
export interface ReposDeps {
|
|
24
|
+
/** Declared identities, from `repos:` in the config. */
|
|
25
|
+
declared(): readonly {
|
|
26
|
+
id: string;
|
|
27
|
+
path: string;
|
|
28
|
+
}[];
|
|
29
|
+
/**
|
|
30
|
+
* This project's own declared identity, worked out from the paths. Optional:
|
|
31
|
+
* a caller that omits it gets no circularity check rather than a wrong one.
|
|
32
|
+
*/
|
|
33
|
+
self?(): string | null;
|
|
34
|
+
/**
|
|
35
|
+
* What this project waits for another repository to publish, from
|
|
36
|
+
* `cross_repo_needs:`. Absent and empty mean the same: nothing is waited for.
|
|
37
|
+
*/
|
|
38
|
+
needs?(): readonly CrossRepoNeed[];
|
|
39
|
+
/**
|
|
40
|
+
* Where a repository is now.
|
|
41
|
+
*
|
|
42
|
+
* ⚠️ NULL, NEVER A GUESS. An unreadable repository must reach
|
|
43
|
+
* `combinedAcceptance` as absent so it answers `unmeasurable`; inventing a sha
|
|
44
|
+
* here would turn "I could not look" into "it has drifted".
|
|
45
|
+
*/
|
|
46
|
+
revisionOf(repo: {
|
|
47
|
+
id: string;
|
|
48
|
+
path: string;
|
|
49
|
+
}): Promise<{
|
|
50
|
+
sha: string;
|
|
51
|
+
from: string;
|
|
52
|
+
} | null>;
|
|
53
|
+
records(): Promise<CompatibleRecord[]>;
|
|
54
|
+
append(record: CompatibleRecord): Promise<void>;
|
|
55
|
+
now(): string;
|
|
56
|
+
newId(): string;
|
|
57
|
+
out(line: string): void;
|
|
58
|
+
err(line: string): void;
|
|
59
|
+
}
|
|
60
|
+
export declare const EXIT_OK = 0;
|
|
61
|
+
export declare const EXIT_REFUSED = 3;
|
|
62
|
+
export declare const EXIT_USAGE = 2;
|
|
63
|
+
/**
|
|
64
|
+
* 🔴 NOTHING WAS ESTABLISHED, AND A SCRIPT MUST NOT READ IT AS A REFUSAL.
|
|
65
|
+
*
|
|
66
|
+
* A repository that could not be read has not drifted — nobody knows — and the
|
|
67
|
+
* two call for opposite things: a refusal is answered by fixing the drift, and
|
|
68
|
+
* this is answered by looking again. `sessions-cmd.ts` keeps the same fourth
|
|
69
|
+
* code for the same reason, in its own words: "a script that retried a refusal
|
|
70
|
+
* would be wrong and a script that ignored an unmeasurable would be worse".
|
|
71
|
+
*/
|
|
72
|
+
export declare const EXIT_UNMEASURABLE = 4;
|
|
73
|
+
export declare function reposCommand(argv: readonly string[], deps: ReposDeps): Promise<number>;
|
|
74
|
+
/**
|
|
75
|
+
* ⚠️ `partial` IS NOT A FAILURE and must not exit non-zero. It is the expected
|
|
76
|
+
* middle of a publication that cannot be atomic, and a script that treats it as
|
|
77
|
+
* an error would stop exactly where it should carry on to the next repository.
|
|
78
|
+
*/
|
|
79
|
+
export declare function verdictExit(v: CombinedVerdict): number;
|
|
80
|
+
//# sourceMappingURL=repos-cmd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repos-cmd.d.ts","sourceRoot":"","sources":["../src/repos-cmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,eAAe,EACpB,KAAK,aAAa,EAEnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAqC,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE7F;;;;;;;;;;;;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@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXIT_UNMEASURABLE = exports.EXIT_USAGE = exports.EXIT_REFUSED = exports.EXIT_OK = exports.REPOS_USAGE = void 0;
|
|
4
|
+
exports.reposCommand = reposCommand;
|
|
5
|
+
exports.verdictExit = verdictExit;
|
|
6
|
+
const core_1 = require("@looply/core");
|
|
7
|
+
const compatible_sets_1 = require("./compatible-sets");
|
|
8
|
+
/**
|
|
9
|
+
* `looply repos` — THE CONSUMER D7 SAYS THIS MUST HAVE.
|
|
10
|
+
*
|
|
11
|
+
* 🔴 *"Do not reduce this to a manifest writer with no consumer."* A recorded
|
|
12
|
+
* compatible-revision set that nothing ever asks about is a log line pretending
|
|
13
|
+
* to be a safeguard. This is the asking: it reads what was accepted, reads where
|
|
14
|
+
* the repositories actually are now, and says whether the set still holds.
|
|
15
|
+
*
|
|
16
|
+
* Three verbs, and the middle one is the whole feature:
|
|
17
|
+
*
|
|
18
|
+
* looply repos what is true now
|
|
19
|
+
* looply repos --accept write down the revisions as compatible
|
|
20
|
+
* looply repos --published <id> one repository published; the rest remain
|
|
21
|
+
*
|
|
22
|
+
* ⚠️ IT PUBLISHES NOTHING ITSELF, and that is deliberate. Publication across
|
|
23
|
+
* repositories is not atomic and this does not pretend otherwise: it records
|
|
24
|
+
* that a step happened and says what is left, so an interruption leaves a
|
|
25
|
+
* resumable state rather than a mystery.
|
|
26
|
+
*/
|
|
27
|
+
exports.REPOS_USAGE = [
|
|
28
|
+
'looply repos where each declared repository is, and whether the accepted set still holds',
|
|
29
|
+
'looply repos --accept record the current revisions as a compatible set',
|
|
30
|
+
'looply repos --published <repo> record that one repository published the newest set',
|
|
31
|
+
].join('\n');
|
|
32
|
+
exports.EXIT_OK = 0;
|
|
33
|
+
exports.EXIT_REFUSED = 3;
|
|
34
|
+
exports.EXIT_USAGE = 2;
|
|
35
|
+
/**
|
|
36
|
+
* 🔴 NOTHING WAS ESTABLISHED, AND A SCRIPT MUST NOT READ IT AS A REFUSAL.
|
|
37
|
+
*
|
|
38
|
+
* A repository that could not be read has not drifted — nobody knows — and the
|
|
39
|
+
* two call for opposite things: a refusal is answered by fixing the drift, and
|
|
40
|
+
* this is answered by looking again. `sessions-cmd.ts` keeps the same fourth
|
|
41
|
+
* code for the same reason, in its own words: "a script that retried a refusal
|
|
42
|
+
* would be wrong and a script that ignored an unmeasurable would be worse".
|
|
43
|
+
*/
|
|
44
|
+
exports.EXIT_UNMEASURABLE = 4;
|
|
45
|
+
async function reposCommand(argv, deps) {
|
|
46
|
+
/**
|
|
47
|
+
* 🔴 THE ARGUMENTS ARE CHECKED BEFORE ANYTHING IS READ OR WRITTEN. Asked for
|
|
48
|
+
* both verbs at once, the first shape of this took the `--accept` branch and
|
|
49
|
+
* WROTE A SET — so `looply repos --published --accept`, which is a person
|
|
50
|
+
* mistyping one command, silently accepted a new compatible set instead of
|
|
51
|
+
* refusing. Two verbs is not a preference to resolve; it is a sentence with
|
|
52
|
+
* two meanings, and the only safe reading is neither.
|
|
53
|
+
*/
|
|
54
|
+
if (argv.includes('--accept') && argv.includes('--published')) {
|
|
55
|
+
deps.err(`looply repos: --accept and --published are two different things to do. Pick one.\n\n${exports.REPOS_USAGE}`);
|
|
56
|
+
return exports.EXIT_USAGE;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 🔴 AN ARGUMENT THIS DOES NOT KNOW IS A REFUSAL, NOT A SHRUG. Ignoring it
|
|
60
|
+
* meant `looply repos --acept` — one missing letter — printed a perfectly
|
|
61
|
+
* true status page and exited 0, so somebody who meant to accept a set walked
|
|
62
|
+
* away believing there was nothing to do. That is the same silent no-op twice
|
|
63
|
+
* more over, and the fix is to refuse the whole class rather than each case.
|
|
64
|
+
*/
|
|
65
|
+
const unknown = [];
|
|
66
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
67
|
+
if (argv[i] === '--accept')
|
|
68
|
+
continue;
|
|
69
|
+
// Whatever follows `--published` is its value; whether it names a real
|
|
70
|
+
// repository is a question for later, with the declarations in hand.
|
|
71
|
+
if (argv[i] === '--published') {
|
|
72
|
+
i += 1;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
unknown.push(argv[i]);
|
|
76
|
+
}
|
|
77
|
+
if (unknown.length > 0) {
|
|
78
|
+
deps.err(`looply repos: ${unknown.join(', ')} — no idea what that means.\n\n${exports.REPOS_USAGE}`);
|
|
79
|
+
return exports.EXIT_USAGE;
|
|
80
|
+
}
|
|
81
|
+
const declared = deps.declared();
|
|
82
|
+
if (declared.length === 0) {
|
|
83
|
+
deps.err('looply repos: this project declares no other repositories. Add `repos:` to .looply/config.yaml ' +
|
|
84
|
+
'— each entry an id and a local path.');
|
|
85
|
+
return exports.EXIT_USAGE;
|
|
86
|
+
}
|
|
87
|
+
/** Read once and shared by every verb: three questions about one moment. */
|
|
88
|
+
const now = [];
|
|
89
|
+
const unreadable = [];
|
|
90
|
+
const shown = new Map();
|
|
91
|
+
for (const r of declared) {
|
|
92
|
+
const at = await deps.revisionOf(r);
|
|
93
|
+
if (at === null) {
|
|
94
|
+
unreadable.push(r.id);
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
now.push({ repo: r.id, sha: at.sha });
|
|
98
|
+
shown.set(r.id, at.from);
|
|
99
|
+
}
|
|
100
|
+
if (argv.includes('--accept')) {
|
|
101
|
+
if (unreadable.length > 0) {
|
|
102
|
+
deps.err(`looply repos --accept: refusing — ${unreadable.join(', ')} could not be read, and a set that omits a ` +
|
|
103
|
+
'declared repository is a set nobody can check');
|
|
104
|
+
return exports.EXIT_REFUSED;
|
|
105
|
+
}
|
|
106
|
+
const setId = deps.newId();
|
|
107
|
+
await deps.append({ id: setId, kind: 'accepted', setId, at: deps.now(), revisions: now });
|
|
108
|
+
deps.out(`repos: accepted ${setId} — ${now.map((r) => `${r.repo}@${r.sha.slice(0, 7)}`).join(', ')}`);
|
|
109
|
+
deps.out(' nothing is published yet. `looply repos --published <repo>` records each step.');
|
|
110
|
+
return exports.EXIT_OK;
|
|
111
|
+
}
|
|
112
|
+
const records = await deps.records();
|
|
113
|
+
const setId = (0, compatible_sets_1.newestSetId)(records);
|
|
114
|
+
const publishAt = argv.indexOf('--published');
|
|
115
|
+
if (setId === null) {
|
|
116
|
+
/**
|
|
117
|
+
* ⚠️ ASKED TO RECORD A PUBLICATION WITH NOTHING ACCEPTED, THIS SAYS SO.
|
|
118
|
+
* Falling through to the status report below would print a perfectly true
|
|
119
|
+
* page and exit 0 — and the person who asked to record a step would have no
|
|
120
|
+
* way to tell that nothing was recorded.
|
|
121
|
+
*/
|
|
122
|
+
if (publishAt >= 0) {
|
|
123
|
+
deps.err('looply repos --published: refusing — nothing has been accepted as compatible yet, so there is no set to ' +
|
|
124
|
+
'publish against. `looply repos --accept` first.');
|
|
125
|
+
return exports.EXIT_REFUSED;
|
|
126
|
+
}
|
|
127
|
+
deps.out('repos: no compatible set has been accepted yet.');
|
|
128
|
+
for (const r of declared) {
|
|
129
|
+
deps.out(` ${r.id.padEnd(16)} ${shown.get(r.id) ?? 'could not be read'}`);
|
|
130
|
+
}
|
|
131
|
+
deps.out(' `looply repos --accept` writes the current revisions down as compatible.');
|
|
132
|
+
return exports.EXIT_OK;
|
|
133
|
+
}
|
|
134
|
+
if (publishAt >= 0) {
|
|
135
|
+
const repo = argv[publishAt + 1];
|
|
136
|
+
if (repo === undefined || repo.startsWith('--')) {
|
|
137
|
+
deps.err(`looply repos --published: which repository?\n\n${exports.REPOS_USAGE}`);
|
|
138
|
+
return exports.EXIT_USAGE;
|
|
139
|
+
}
|
|
140
|
+
const before = (0, compatible_sets_1.setFrom)(records, setId);
|
|
141
|
+
if (before === null) {
|
|
142
|
+
deps.err(`looply repos --published: ${setId} has no acceptance on record`);
|
|
143
|
+
return exports.EXIT_REFUSED;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* 🔴 THE DECISION IS `publicationRuling`, NOT THIS FUNCTION, AND §6.D IS
|
|
147
|
+
* WHY. The charter asks for a RUN to drive this same workflow, and a run
|
|
148
|
+
* that wrote its own lines would be a second implementation of these
|
|
149
|
+
* refusals — the one that forgets the drift check is the one that writes
|
|
150
|
+
* down a compatible pair that does not exist. A behaviour with two callers
|
|
151
|
+
* and one implementation cannot drift between them.
|
|
152
|
+
*
|
|
153
|
+
* Every refusal that used to live here still happens, in the same order,
|
|
154
|
+
* and is now shared: drift before anything is recorded, a repository this
|
|
155
|
+
* project does not declare, and one declared after the set was accepted.
|
|
156
|
+
*/
|
|
157
|
+
const ruling = (0, core_1.publicationRuling)({
|
|
158
|
+
declared: declared.map((d) => d.id),
|
|
159
|
+
set: before,
|
|
160
|
+
current: new Map(now.map((r) => [r.repo, r.sha])),
|
|
161
|
+
repo,
|
|
162
|
+
});
|
|
163
|
+
if (ruling.kind === 'refused' || ruling.kind === 'unmeasurable') {
|
|
164
|
+
deps.err(`looply repos --published: ${(0, core_1.describePublicationRuling)(ruling)}`);
|
|
165
|
+
return ruling.kind === 'unmeasurable' ? exports.EXIT_UNMEASURABLE : exports.EXIT_REFUSED;
|
|
166
|
+
}
|
|
167
|
+
if (ruling.kind === 'already') {
|
|
168
|
+
deps.out(`repos: ${(0, core_1.describePublicationRuling)(ruling)}`);
|
|
169
|
+
return exports.EXIT_OK;
|
|
170
|
+
}
|
|
171
|
+
await deps.append({ id: (0, compatible_sets_1.publishedId)(setId, repo), kind: 'published', setId, at: deps.now(), repo });
|
|
172
|
+
deps.out(`repos: ${(0, core_1.describePublicationRuling)(ruling)}`);
|
|
173
|
+
}
|
|
174
|
+
const after = (0, compatible_sets_1.setFrom)(await deps.records(), setId);
|
|
175
|
+
if (after === null) {
|
|
176
|
+
deps.err(`looply repos: ${setId} has no acceptance on record`);
|
|
177
|
+
return exports.EXIT_REFUSED;
|
|
178
|
+
}
|
|
179
|
+
const verdict = (0, core_1.combinedAcceptance)({
|
|
180
|
+
declared: declared.map((d) => d.id),
|
|
181
|
+
set: after,
|
|
182
|
+
current: new Map(now.map((r) => [r.repo, r.sha])),
|
|
183
|
+
});
|
|
184
|
+
deps.out(`repos: ${setId} accepted ${after.at}`);
|
|
185
|
+
for (const r of declared) {
|
|
186
|
+
const named = after.revisions.find((x) => x.repo === r.id);
|
|
187
|
+
const isAt = now.find((x) => x.repo === r.id);
|
|
188
|
+
const mark = after.published.includes(r.id) ? 'published' : 'to publish';
|
|
189
|
+
deps.out(` ${r.id.padEnd(16)} ${(named === undefined ? 'not in the set' : named.sha.slice(0, 7)).padEnd(16)} ` +
|
|
190
|
+
`now ${(isAt === undefined ? 'unreadable' : isAt.sha.slice(0, 7)).padEnd(12)} ${mark}`);
|
|
191
|
+
}
|
|
192
|
+
const said = (0, core_1.describeCombined)(verdict);
|
|
193
|
+
deps.out(said === null ? ` COMPLETE — every declared repository published this set and is still at it` : ` ${said}`);
|
|
194
|
+
/**
|
|
195
|
+
* 🔴 AND WHAT THIS PROJECT IS STILL WAITING FOR, which is a different question
|
|
196
|
+
* from whether the set holds.
|
|
197
|
+
*
|
|
198
|
+
* `combinedAcceptance` answers "is this convergence finished". A need answers
|
|
199
|
+
* "may I start" — and the two come apart in both directions: a PARTIAL set can
|
|
200
|
+
* already satisfy a need whose repository happens to be one of the published
|
|
201
|
+
* ones, and a COMPLETE set satisfies a need for a repository it never named at
|
|
202
|
+
* all only by accident. So the needs are asked separately and reported
|
|
203
|
+
* separately.
|
|
204
|
+
*
|
|
205
|
+
* ⚠️ IT DOES NOT CHANGE THE EXIT CODE. The verdict is about the set; a need is
|
|
206
|
+
* about this project's own readiness, and a script driving publication must
|
|
207
|
+
* not stop because some unrelated dependency is outstanding. The line is
|
|
208
|
+
* information, and `crossRepoReady` is what a caller asks when it wants the
|
|
209
|
+
* answer as a decision.
|
|
210
|
+
*/
|
|
211
|
+
const needs = deps.needs?.() ?? [];
|
|
212
|
+
if (needs.length > 0) {
|
|
213
|
+
const blockers = (0, core_1.crossRepoBlockedBy)({
|
|
214
|
+
needs,
|
|
215
|
+
declared: declared.map((d) => d.id),
|
|
216
|
+
self: deps.self?.() ?? null,
|
|
217
|
+
set: after,
|
|
218
|
+
current: new Map(now.map((r) => [r.repo, r.sha])),
|
|
219
|
+
});
|
|
220
|
+
const waiting = (0, core_1.describeCrossRepoBlockers)(blockers);
|
|
221
|
+
if (waiting === null) {
|
|
222
|
+
deps.out(` needs: all ${needs.length} met — every repository this project waits on has published`);
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
deps.out(` needs: ${waiting}`);
|
|
226
|
+
for (const b of blockers)
|
|
227
|
+
deps.out(` ${b.repo.padEnd(16)} ${b.reason.padEnd(12)} ${b.what}`);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return verdictExit(verdict);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* ⚠️ `partial` IS NOT A FAILURE and must not exit non-zero. It is the expected
|
|
234
|
+
* middle of a publication that cannot be atomic, and a script that treats it as
|
|
235
|
+
* an error would stop exactly where it should carry on to the next repository.
|
|
236
|
+
*/
|
|
237
|
+
function verdictExit(v) {
|
|
238
|
+
return v.kind === 'complete' || v.kind === 'partial' ? exports.EXIT_OK : exports.EXIT_REFUSED;
|
|
239
|
+
}
|
|
240
|
+
//# sourceMappingURL=repos-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repos-cmd.js","sourceRoot":"","sources":["../src/repos-cmd.ts"],"names":[],"mappings":";;;AAkFA,oCA0MC;AAOD,kCAEC;AArSD,uCAUsB;AACtB,uDAA6F;AAE7F;;;;;;;;;;;;;;;;;;GAkBG;AAEU,QAAA,WAAW,GAAG;IACzB,+GAA+G;IAC/G,oFAAoF;IACpF,uFAAuF;CACxF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AA+BA,QAAA,OAAO,GAAG,CAAC,CAAC;AACZ,QAAA,YAAY,GAAG,CAAC,CAAC;AACjB,QAAA,UAAU,GAAG,CAAC,CAAC;AAC5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AClD,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAA,gCAAyB,EAAC,QAAQ,CAAC,CAAC;QACpD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACrB,IAAI,CAAC,GAAG,CAAC,gBAAgB,KAAK,CAAC,MAAM,6DAA6D,CAAC,CAAC;QACtG,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,YAAY,OAAO,EAAE,CAAC,CAAC;YAChC,KAAK,MAAM,CAAC,IAAI,QAAQ;gBAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAClG,CAAC;IACH,CAAC;IAED,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED;;;;GAIG;AACH,SAAgB,WAAW,CAAC,CAAkB;IAC5C,OAAO,CAAC,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,eAAO,CAAC,CAAC,CAAC,oBAAY,CAAC;AAChF,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHAT A CLIENT SENDS, AND WHETHER THE ROUTE READS IT.
|
|
3
|
+
*
|
|
4
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
5
|
+
* 🔴 THE OTHER HALF OF THE BOUNDARY, AND IT HAS ALREADY COST US ONCE.
|
|
6
|
+
*
|
|
7
|
+
* `@looply/sdk`'s `decideApproval` sent `version` where the route reads
|
|
8
|
+
* `expectedVersion`. It would have 400'd on every call — on the path that spends
|
|
9
|
+
* a person's authorisation — and nothing could see it: the body is `unknown` on
|
|
10
|
+
* the wire, so no type on either side disagrees.
|
|
11
|
+
*
|
|
12
|
+
* Path parity checks the PATH. The declared-shape check reads the RESPONSE. A
|
|
13
|
+
* field a client sends that no route reads is the third case, and it is the one
|
|
14
|
+
* with the worst failure mode of the three, because the two outcomes are a 400
|
|
15
|
+
* (loud) and being silently ignored (a setting that never applies, a note that
|
|
16
|
+
* never saves, a version guard that never guards).
|
|
17
|
+
*
|
|
18
|
+
* ⚠️ THIS READS SOURCE, NOT TYPES. It is a small honest parser: it reports what
|
|
19
|
+
* it cannot read rather than passing over it, because a checker that silently
|
|
20
|
+
* skips is how a fifth of a corpus disappears under a confident summary line.
|
|
21
|
+
*/
|
|
22
|
+
export interface RouteBody {
|
|
23
|
+
/** `POST`, `PATCH`, … */
|
|
24
|
+
method: string;
|
|
25
|
+
/** Path with `:params` left in, e.g. `/v1/projects/:id/approvals/:approvalId`. */
|
|
26
|
+
path: string;
|
|
27
|
+
/** Keys the handler reads off the body — `body?.expectedVersion` → `expectedVersion`. */
|
|
28
|
+
reads: string[];
|
|
29
|
+
/**
|
|
30
|
+
* Does the handler hand the WHOLE body somewhere instead of picking fields?
|
|
31
|
+
*
|
|
32
|
+
* 🔴 THE DIFFERENCE BETWEEN "READS NOTHING" AND "UNREADABLE". A handler that
|
|
33
|
+
* forwards `body` wholesale reads no named key, and treating that as "reads
|
|
34
|
+
* nothing" would flag every field a client sends to it. Reported, not guessed.
|
|
35
|
+
*/
|
|
36
|
+
wholesale: boolean;
|
|
37
|
+
handler: string;
|
|
38
|
+
}
|
|
39
|
+
/** `@Controller('v1')` → `v1`. */
|
|
40
|
+
export declare function controllerPrefix(source: string): string;
|
|
41
|
+
export declare function routeBodies(source: string): RouteBody[];
|
|
42
|
+
export interface SentBody {
|
|
43
|
+
/** The client method the call sits in. */
|
|
44
|
+
caller: string;
|
|
45
|
+
method: string;
|
|
46
|
+
/** Path with `${...}` interpolations replaced by `:param`, to match a route. */
|
|
47
|
+
path: string;
|
|
48
|
+
/**
|
|
49
|
+
* The path literal exactly as written, before normalisation.
|
|
50
|
+
*
|
|
51
|
+
* Kept because a caller may need to assert something about the SOURCE rather
|
|
52
|
+
* than the route — e.g. that no query string was ever written into a path
|
|
53
|
+
* literal. Asserting that on the normalised value would only prove a
|
|
54
|
+
* `replace` had run, which it always has.
|
|
55
|
+
*/
|
|
56
|
+
rawPath: string;
|
|
57
|
+
/** Keys the client puts in the body. */
|
|
58
|
+
sends: string[];
|
|
59
|
+
/**
|
|
60
|
+
* Could the body be read at all?
|
|
61
|
+
*
|
|
62
|
+
* 🔴 FALSE IS NOT "SENDS NOTHING". A body built from a spread, a helper call
|
|
63
|
+
* or a variable this cannot resolve is UNREAD, and reporting it as empty would
|
|
64
|
+
* turn an unchecked call into a passing one.
|
|
65
|
+
*/
|
|
66
|
+
readable: boolean;
|
|
67
|
+
raw: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Blanks comments, preserving LENGTH and NEWLINES.
|
|
71
|
+
*
|
|
72
|
+
* 🔴 ONE PARSER, USED BY BOTH HALVES OF THIS FILE. The client half stripped
|
|
73
|
+
* comments and the ROUTE half did not, so prose became evidence: a doc comment
|
|
74
|
+
* mentioning a field produced a phantom `body?.x` read, and a commented-out
|
|
75
|
+
* `@Post(...)` produced a phantom ROUTE. It failed in both directions at once --
|
|
76
|
+
* excusing a field the handler never reads, and inventing one it does.
|
|
77
|
+
*
|
|
78
|
+
* ⚠️ IT IS STRING-AWARE, WHICH A REGEX CANNOT BE. `'https://x'` contains `//`
|
|
79
|
+
* and a naive line-comment regex deletes the rest of that line -- taking
|
|
80
|
+
* any real `body?.x` on it with it. Quotes, double quotes, template literals and
|
|
81
|
+
* backslash escapes are copied through untouched.
|
|
82
|
+
*
|
|
83
|
+
* Length and newlines are preserved because callers index into the result:
|
|
84
|
+
* decorator offsets, `lastIndexOf`, and the line-based handler-name scan all
|
|
85
|
+
* stay valid, so stripping is invisible to everything except the text it removes.
|
|
86
|
+
*
|
|
87
|
+
* Known limit, stated rather than hidden: a STRING whose contents look like a
|
|
88
|
+
* read (`'body?.kind'`) is preserved, because it is data and this cannot tell
|
|
89
|
+
* data from code. No such string exists in the controllers today.
|
|
90
|
+
*/
|
|
91
|
+
export declare function stripComments(text: string): string;
|
|
92
|
+
export declare function sentBodies(source: string): SentBody[];
|
|
93
|
+
//# sourceMappingURL=request-body-shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-body-shape.d.ts","sourceRoot":"","sources":["../src/request-body-shape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,SAAS;IACxB,yBAAyB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;;;;;OAMG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,kCAAkC;AAClC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMvD;AAQD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,CAsCvD;AAID,MAAM,WAAW,QAAQ;IACvB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AA+ID;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAoDlD;AAuCD,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,CAuDrD"}
|