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,609 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXIT_UNMEASURABLE = exports.EXIT_REFUSED = exports.EXIT_USAGE = exports.MAX_DIRECT_WAIT_S = exports.EXIT_OK = exports.WATCH_EVENT_CAP = exports.MAX_WATCH_MINUTES = exports.DEFAULT_WATCH_MINUTES = exports.SESSIONS_USAGE = void 0;
|
|
4
|
+
exports.sessionsCommand = sessionsCommand;
|
|
5
|
+
exports.verdictExit = verdictExit;
|
|
6
|
+
const core_1 = require("@looply/core");
|
|
7
|
+
const session_store_1 = require("./session-store");
|
|
8
|
+
/**
|
|
9
|
+
* `looply sessions` — F-14's consumer, and the documented handshake itself.
|
|
10
|
+
*
|
|
11
|
+
* 🔴 THE HANDSHAKE IS A FILE, NOT A TERMINAL. The charter forbids seizing one,
|
|
12
|
+
* so nothing here attaches to a terminal: a session that wants managing WRITES
|
|
13
|
+
* a claim and points looply at it. There is no path by which looply adopts a
|
|
14
|
+
* session that did not ask — which is also why the user's own unrelated
|
|
15
|
+
* sessions are untouched. Not an exclusion list; nothing can reach them.
|
|
16
|
+
*
|
|
17
|
+
* looply sessions what this machine knows about
|
|
18
|
+
* looply sessions --offer <file> a session asks to be managed
|
|
19
|
+
* looply sessions --ack <id> the session acknowledges control
|
|
20
|
+
* looply sessions --watch <id> attach a bounded watcher to one
|
|
21
|
+
* looply sessions --direct <id> tell a controlled session to do one thing
|
|
22
|
+
* looply sessions --checkpoint <id> capture what a REFUSED session has done
|
|
23
|
+
* looply sessions --observations <id> what earlier watches recorded
|
|
24
|
+
*
|
|
25
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
26
|
+
* 🔴 THERE IS NO `--authorize`, AND ITS ABSENCE IS THE POINT.
|
|
27
|
+
*
|
|
28
|
+
* The first version of this had one, and `approval-architecture.spec.ts` was
|
|
29
|
+
* right to refuse it. Its rule is that the server is the authority, and a file
|
|
30
|
+
* this machine can write asserting somebody approved is a second answer nobody
|
|
31
|
+
* gave — the machine holds the filesystem. A local `--authorize` is exactly
|
|
32
|
+
* that: anyone with a shell could mint the human half of a two-party rule,
|
|
33
|
+
* offline, and this fold would read it as a person's decision.
|
|
34
|
+
*
|
|
35
|
+
* ⚠️ That guard matches on SUBSTRINGS, so it does not distinguish a violation
|
|
36
|
+
* from a docblock quoting one. Its forbidden tokens are paraphrased here rather
|
|
37
|
+
* than quoted, deliberately — the first draft of this comment tripped the guard
|
|
38
|
+
* with the guard's own words.
|
|
39
|
+
*
|
|
40
|
+
* So the authorization half has NO LOCAL SOURCE. `controlAuthorized` can only
|
|
41
|
+
* ever arrive from a server-issued grant, and `serverControl` is how this build
|
|
42
|
+
* asks for one.
|
|
43
|
+
*
|
|
44
|
+
* ⚠️ WHAT REMAINS UNFINISHED IS NARROWER THAN IT WAS, AND SAYING SO PRECISELY
|
|
45
|
+
* MATTERS — THE OLD WORDING HERE ("this build cannot obtain one yet") SURVIVED
|
|
46
|
+
* THE PACKET THAT MADE IT FALSE, which is how a finished feature goes on
|
|
47
|
+
* reading as a missing one. The grant exists, the routes exist, the machine
|
|
48
|
+
* reads them, and the fold refuses everything it should. The one missing actor
|
|
49
|
+
* is the session's own ADAPTER: `controlVerdict` accepts only an
|
|
50
|
+
* acknowledgement that came through it, nothing in the product sends one yet,
|
|
51
|
+
* and so `controlled` is unreachable end to end BY CONSTRUCTION rather than by
|
|
52
|
+
* oversight. Sessions top out at observe-only, which is where the charter says
|
|
53
|
+
* to start — and observe-only now does something: `--watch` attaches a bounded
|
|
54
|
+
* watcher.
|
|
55
|
+
*/
|
|
56
|
+
exports.SESSIONS_USAGE = [
|
|
57
|
+
'looply sessions every session that has asked to be managed, and where it stands',
|
|
58
|
+
'looply sessions --offer <file> a session presents its claim through the adapter',
|
|
59
|
+
'looply sessions --ack <id> record that the session acknowledges control',
|
|
60
|
+
'looply sessions --watch <id> attach a bounded watcher to an adopted session',
|
|
61
|
+
'looply sessions --direct <id> --do <verb> [--arg k=v] [--wait <seconds, 1 to 600>]',
|
|
62
|
+
' tell a CONTROLLED session to do one thing',
|
|
63
|
+
'looply sessions --checkpoint <id> capture what a REFUSED session has done, honestly',
|
|
64
|
+
'looply sessions --observations <id> what earlier watches recorded, and what they did not',
|
|
65
|
+
' --for <minutes> how long to watch, at most 480 (default 30)',
|
|
66
|
+
'',
|
|
67
|
+
'Control also needs an authorization, and there is deliberately no local way to give one:',
|
|
68
|
+
'the server is the authority for that, and this machine asks it. What is still missing is',
|
|
69
|
+
"the session's own adapter sending an acknowledgement, so sessions top out at observe-only",
|
|
70
|
+
'— which is where the charter says to start, and which --watch now makes mean something.',
|
|
71
|
+
].join('\n');
|
|
72
|
+
/**
|
|
73
|
+
* F42: THE QUESTION A CONTROLLED WATCH ASKS BEFORE EVERY WALK — re-asked, never
|
|
74
|
+
* remembered, the same rule `--direct` follows. `controlled` is the only yes;
|
|
75
|
+
* a refusal or an unmeasurable answer is a no; a server that cannot be asked at
|
|
76
|
+
* all (`null`, or no way to ask) is a rejection, which the runtime stops on too
|
|
77
|
+
* and ALSO names among the record's blind spots ("the server could not be
|
|
78
|
+
* asked"), so an unanswered question is distinguishable from a refusal.
|
|
79
|
+
*/
|
|
80
|
+
function controlStillHolds(deps, sessionId) {
|
|
81
|
+
return async () => {
|
|
82
|
+
const answer = (await deps.serverControl?.(sessionId)) ?? null;
|
|
83
|
+
if (answer === null)
|
|
84
|
+
throw new Error(`the server could not be asked whether control of ${sessionId} still holds`);
|
|
85
|
+
return answer.kind === 'controlled';
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
exports.DEFAULT_WATCH_MINUTES = 30;
|
|
89
|
+
exports.MAX_WATCH_MINUTES = 8 * 60;
|
|
90
|
+
/** Events one watch may record before it stops and reports itself truncated. */
|
|
91
|
+
exports.WATCH_EVENT_CAP = 5_000;
|
|
92
|
+
exports.EXIT_OK = 0;
|
|
93
|
+
/**
|
|
94
|
+
* F41: THE LONGEST `--direct --wait` MAY ASK FOR, in seconds. The default wait stays short (bin.ts), because
|
|
95
|
+
* an unbounded wait is this process hanging on the cooperation of the thing it directs; but a session whose
|
|
96
|
+
* adapter runs a real provider turn answers in tens of seconds, not ten, and without a way to wait for it every
|
|
97
|
+
* permitted direction read as "no answer yet". MEASURED for LIVE-3. Asked for explicitly, and bounded.
|
|
98
|
+
*/
|
|
99
|
+
exports.MAX_DIRECT_WAIT_S = 600;
|
|
100
|
+
exports.EXIT_USAGE = 2;
|
|
101
|
+
exports.EXIT_REFUSED = 3;
|
|
102
|
+
/** Nothing was established. Distinct from refused, and a script must not read it as either. */
|
|
103
|
+
exports.EXIT_UNMEASURABLE = 4;
|
|
104
|
+
async function sessionsCommand(argv, deps) {
|
|
105
|
+
/** Arguments first, before anything is read or written — the R2-G-1 lesson. */
|
|
106
|
+
const verbs = ['--offer', '--ack', '--watch', '--direct', '--checkpoint', '--observations'].filter((v) => argv.includes(v));
|
|
107
|
+
if (verbs.length > 1) {
|
|
108
|
+
deps.err(`looply sessions: ${verbs.join(' and ')} are different things to do. Pick one.\n\n${exports.SESSIONS_USAGE}`);
|
|
109
|
+
return exports.EXIT_USAGE;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* ⚠️ `--authorize` IS NAMED HERE ON PURPOSE. Somebody will try it — the flag
|
|
113
|
+
* existed, and the two-party rule invites it. A bare "no idea what that
|
|
114
|
+
* means" would read as an oversight; this says it was removed and why.
|
|
115
|
+
*/
|
|
116
|
+
if (argv.includes('--authorize')) {
|
|
117
|
+
deps.err('looply sessions: there is no --authorize, deliberately. Authorizing control is the server\'s to give — ' +
|
|
118
|
+
'a machine that could grant it offline would be granting itself authority. Sessions stay observe-only here.');
|
|
119
|
+
return exports.EXIT_USAGE;
|
|
120
|
+
}
|
|
121
|
+
const unknown = [];
|
|
122
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
123
|
+
const a = argv[i];
|
|
124
|
+
if (a === '--offer' ||
|
|
125
|
+
a === '--ack' ||
|
|
126
|
+
a === '--watch' ||
|
|
127
|
+
a === '--for' ||
|
|
128
|
+
a === '--direct' ||
|
|
129
|
+
a === '--do' ||
|
|
130
|
+
a === '--arg' ||
|
|
131
|
+
a === '--wait' ||
|
|
132
|
+
a === '--checkpoint' ||
|
|
133
|
+
a === '--observations') {
|
|
134
|
+
i += 1;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
unknown.push(a);
|
|
138
|
+
}
|
|
139
|
+
if (unknown.length > 0) {
|
|
140
|
+
deps.err(`looply sessions: ${unknown.join(', ')} — no idea what that means.\n\n${exports.SESSIONS_USAGE}`);
|
|
141
|
+
return exports.EXIT_USAGE;
|
|
142
|
+
}
|
|
143
|
+
const valueOf = (flag) => {
|
|
144
|
+
const i = argv.indexOf(flag);
|
|
145
|
+
if (i < 0)
|
|
146
|
+
return null;
|
|
147
|
+
const v = argv[i + 1];
|
|
148
|
+
return v === undefined || v.startsWith('--') ? null : v;
|
|
149
|
+
};
|
|
150
|
+
for (const flag of verbs) {
|
|
151
|
+
if (valueOf(flag) === null) {
|
|
152
|
+
deps.err(`looply sessions ${flag}: ${flag === '--offer' ? 'which claim file?' : 'which session?'}\n\n${exports.SESSIONS_USAGE}`);
|
|
153
|
+
return exports.EXIT_USAGE;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
const records = await deps.records();
|
|
157
|
+
/** The session acknowledges. Recorded, and nothing else happens. */
|
|
158
|
+
const ackAt = valueOf('--ack');
|
|
159
|
+
if (ackAt !== null) {
|
|
160
|
+
const standing = (0, session_store_1.standingOf)(records, ackAt);
|
|
161
|
+
/**
|
|
162
|
+
* ⚠️ A SESSION THAT HAS NEVER PRESENTED CANNOT ACKNOWLEDGE. Otherwise a
|
|
163
|
+
* typo'd id writes a standing record for a session that later appears and
|
|
164
|
+
* finds half its consent already waiting.
|
|
165
|
+
*/
|
|
166
|
+
if (standing === null) {
|
|
167
|
+
deps.err(`looply sessions --ack: ${ackAt} has never asked to be managed`);
|
|
168
|
+
return exports.EXIT_REFUSED;
|
|
169
|
+
}
|
|
170
|
+
if (standing.acked) {
|
|
171
|
+
deps.out(`sessions: ${ackAt} has already acknowledged — nothing to do`);
|
|
172
|
+
return exports.EXIT_OK;
|
|
173
|
+
}
|
|
174
|
+
await deps.append({ id: (0, session_store_1.ackedId)(ackAt), kind: 'acked', sessionId: ackAt, at: deps.now() });
|
|
175
|
+
deps.out(`sessions: recorded — ${ackAt} acknowledged`);
|
|
176
|
+
deps.out(' this does not adopt anything, and it is not the authorization half.');
|
|
177
|
+
return exports.EXIT_OK;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Attach a bounded watcher to a session this machine already adopted.
|
|
181
|
+
*
|
|
182
|
+
* 🔴 IT COVERS FROM NOW, NOT FROM THE ADOPTION, AND THE DIFFERENCE IS THE
|
|
183
|
+
* WHOLE POINT OF `coversFrom` ONE LEVEL UP. A session adopted at 12:00 and
|
|
184
|
+
* watched at 12:30 was not watched for half an hour. Reusing the verdict's
|
|
185
|
+
* moment here would produce a record claiming to cover a window in which
|
|
186
|
+
* nothing observed — the same "certify the past" defect the fold refuses per
|
|
187
|
+
* event, reintroduced wholesale by a single convenient assignment. The
|
|
188
|
+
* adoption's moment is PRINTED beside it precisely so the gap is visible
|
|
189
|
+
* rather than hidden.
|
|
190
|
+
*/
|
|
191
|
+
const watchAt = valueOf('--watch');
|
|
192
|
+
if (watchAt !== null) {
|
|
193
|
+
const standing = (0, session_store_1.standingOf)(records, watchAt);
|
|
194
|
+
if (standing === null) {
|
|
195
|
+
deps.err(`looply sessions --watch: ${watchAt} has never asked to be managed`);
|
|
196
|
+
return exports.EXIT_REFUSED;
|
|
197
|
+
}
|
|
198
|
+
const verdict = standing.verdict;
|
|
199
|
+
if (verdict === null) {
|
|
200
|
+
deps.err(`looply sessions --watch: ${watchAt} has presented but was never decided — offer it first`);
|
|
201
|
+
return exports.EXIT_REFUSED;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* ⚠️ A REFUSED OR UNMEASURABLE SESSION IS NOT WATCHED, and the refusal
|
|
205
|
+
* says which it was. Watching one would be the fake label by another route:
|
|
206
|
+
* a record exists, it has a session id on it, and nothing ever established
|
|
207
|
+
* that this machine may observe that session at all.
|
|
208
|
+
*/
|
|
209
|
+
if (verdict.kind !== 'observe-only' && verdict.kind !== 'controlled') {
|
|
210
|
+
deps.err(`looply sessions --watch: ${watchAt} is ${verdict.kind} — ${verdict.because}. ` +
|
|
211
|
+
'A session this machine did not adopt is not one it may watch.');
|
|
212
|
+
return verdictExit(verdict);
|
|
213
|
+
}
|
|
214
|
+
const claim = (0, session_store_1.latestClaimOf)(records, watchAt);
|
|
215
|
+
if (claim === null) {
|
|
216
|
+
deps.err(`looply sessions --watch: ${watchAt} has a decision but no claim on record — nothing says what to watch`);
|
|
217
|
+
return exports.EXIT_UNMEASURABLE;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* ⚠️ A CEILING A FLAG CANNOT RAISE, and the clamp is SAID rather than
|
|
221
|
+
* applied quietly: somebody who asked for a day and silently got eight
|
|
222
|
+
* hours would read the resulting record as covering the day.
|
|
223
|
+
*/
|
|
224
|
+
const askedFor = valueOf('--for');
|
|
225
|
+
let minutes = exports.DEFAULT_WATCH_MINUTES;
|
|
226
|
+
if (askedFor !== null) {
|
|
227
|
+
const n = Number(askedFor);
|
|
228
|
+
if (!Number.isInteger(n) || n <= 0) {
|
|
229
|
+
deps.err(`looply sessions --for: ${askedFor} is not a positive whole number of minutes`);
|
|
230
|
+
return exports.EXIT_USAGE;
|
|
231
|
+
}
|
|
232
|
+
minutes = Math.min(n, exports.MAX_WATCH_MINUTES);
|
|
233
|
+
if (minutes !== n)
|
|
234
|
+
deps.out(` note: ${n} minutes is over the ${exports.MAX_WATCH_MINUTES}-minute ceiling; watching for ${minutes}`);
|
|
235
|
+
}
|
|
236
|
+
if (deps.watch === undefined) {
|
|
237
|
+
deps.err(`looply sessions --watch: this build has no watcher, so nothing was established about ${watchAt}. ` +
|
|
238
|
+
'It is not being reported as a quiet session.');
|
|
239
|
+
return exports.EXIT_UNMEASURABLE;
|
|
240
|
+
}
|
|
241
|
+
const from = deps.now();
|
|
242
|
+
const window = {
|
|
243
|
+
sessionId: watchAt,
|
|
244
|
+
coversFrom: from,
|
|
245
|
+
until: new Date(Date.parse(from) + minutes * 60_000).toISOString(),
|
|
246
|
+
/**
|
|
247
|
+
* 🔴 THE SCOPE IS THE CLAIM'S, AND THAT IS SAFE ONLY BECAUSE OF WHERE
|
|
248
|
+
* THIS CODE SITS. `sessionAdoptionVerdict` already refused any claim
|
|
249
|
+
* asking for a path outside `measured.scopeAllowed`, and this line is
|
|
250
|
+
* reached only for a session it accepted. Read anywhere else, a claim's
|
|
251
|
+
* scope is a session describing its own reach.
|
|
252
|
+
*/
|
|
253
|
+
scope: claim.scope,
|
|
254
|
+
cap: exports.WATCH_EVENT_CAP,
|
|
255
|
+
};
|
|
256
|
+
deps.out(`sessions: watching ${watchAt} for up to ${minutes} minute(s)`);
|
|
257
|
+
deps.out(` adopted at ${verdict.coversFrom} — this watch covers from ${from}, and NOT the gap between them`);
|
|
258
|
+
/**
|
|
259
|
+
* 🔴 THE OPEN RECORD GOES DOWN BEFORE THE WATCH STARTS. If this process is
|
|
260
|
+
* killed mid-watch — which is how a long watch usually ends — the store
|
|
261
|
+
* holds a record saying it was never closed, instead of holding nothing and
|
|
262
|
+
* letting nothing be read as "never watched".
|
|
263
|
+
*/
|
|
264
|
+
await deps.recordObservation?.(openObservation(watchAt, from));
|
|
265
|
+
const record = await deps.watch(window, {
|
|
266
|
+
workspace: claim.workspace,
|
|
267
|
+
pid: claim.pid,
|
|
268
|
+
...(verdict.kind === 'controlled' ? { stillAuthorized: controlStillHolds(deps, watchAt) } : {}),
|
|
269
|
+
});
|
|
270
|
+
await deps.recordObservation?.(record);
|
|
271
|
+
reportWatch(deps, record);
|
|
272
|
+
if (deps.recordObservation === undefined) {
|
|
273
|
+
deps.out(' not kept: this build has nowhere to store an observation, so this record ends with the process.');
|
|
274
|
+
}
|
|
275
|
+
return exports.EXIT_OK;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Direct a session this machine holds control of.
|
|
279
|
+
*
|
|
280
|
+
* 🔴 CONTROL IS RE-ASKED HERE, NOT REMEMBERED. A verdict computed when the
|
|
281
|
+
* session was adopted says nothing about whether a person has since withdrawn
|
|
282
|
+
* the grant, and the charter's "stop on valid revocation" is only real if
|
|
283
|
+
* somebody asks again before each direction.
|
|
284
|
+
*/
|
|
285
|
+
/**
|
|
286
|
+
* Capture what a session looply could NOT adopt has actually done.
|
|
287
|
+
*
|
|
288
|
+
* 🔴 THE OFFER EXISTED AND NOTHING PERFORMED IT. Every refusal has carried
|
|
289
|
+
* `offer: 'checkpoint-and-start-a-managed-run'` since adoption was written,
|
|
290
|
+
* and the offer was a string: the person who read the refusal was told to do
|
|
291
|
+
* something the product could not do. Not a false claim — a true one with
|
|
292
|
+
* nothing behind it.
|
|
293
|
+
*/
|
|
294
|
+
/**
|
|
295
|
+
* What earlier watches recorded.
|
|
296
|
+
*
|
|
297
|
+
* 🔴 NOTHING ON FILE HAS THREE MEANINGS — never watched, watched and the
|
|
298
|
+
* records retained away, and watched by a process that was killed — and the
|
|
299
|
+
* store distinguishes all three. A build with nowhere to store them is a
|
|
300
|
+
* fourth, and it says so rather than answering "never watched".
|
|
301
|
+
*/
|
|
302
|
+
const observationsAt = valueOf('--observations');
|
|
303
|
+
if (observationsAt !== null) {
|
|
304
|
+
if (deps.observations === undefined) {
|
|
305
|
+
deps.err(`looply sessions --observations: this build has nowhere to store an observation, so nothing is on file for ${observationsAt}. ` +
|
|
306
|
+
'That is not the same as a session that was never watched.');
|
|
307
|
+
return exports.EXIT_UNMEASURABLE;
|
|
308
|
+
}
|
|
309
|
+
for (const line of await deps.observations(observationsAt))
|
|
310
|
+
deps.out(line);
|
|
311
|
+
return exports.EXIT_OK;
|
|
312
|
+
}
|
|
313
|
+
const checkpointAt = valueOf('--checkpoint');
|
|
314
|
+
if (checkpointAt !== null) {
|
|
315
|
+
const standing = (0, session_store_1.standingOf)(records, checkpointAt);
|
|
316
|
+
if (standing === null) {
|
|
317
|
+
deps.err(`looply sessions --checkpoint: ${checkpointAt} has never asked to be managed`);
|
|
318
|
+
return exports.EXIT_REFUSED;
|
|
319
|
+
}
|
|
320
|
+
if (standing.verdict === null) {
|
|
321
|
+
deps.err(`looply sessions --checkpoint: ${checkpointAt} has presented but was never decided — offer it first`);
|
|
322
|
+
return exports.EXIT_REFUSED;
|
|
323
|
+
}
|
|
324
|
+
const claim = (0, session_store_1.latestClaimOf)(records, checkpointAt);
|
|
325
|
+
if (claim === null) {
|
|
326
|
+
deps.err(`looply sessions --checkpoint: ${checkpointAt} has a decision but no claim on record — nothing says what to capture`);
|
|
327
|
+
return exports.EXIT_UNMEASURABLE;
|
|
328
|
+
}
|
|
329
|
+
if (deps.measureWorkspace === undefined || deps.writeCheckpoint === undefined) {
|
|
330
|
+
deps.err(`looply sessions --checkpoint: this build cannot capture a workspace, so nothing was established about ${checkpointAt}. ` +
|
|
331
|
+
'It is not being reported as a session with nothing to capture.');
|
|
332
|
+
return exports.EXIT_UNMEASURABLE;
|
|
333
|
+
}
|
|
334
|
+
const measured = await deps.measureWorkspace(claim.workspace, checkpointAt, claim.pid);
|
|
335
|
+
const verdict = (0, core_1.checkpointVerdict)(standing.verdict, claim.workspace, measured, deps.now());
|
|
336
|
+
if (verdict.kind === 'refused') {
|
|
337
|
+
deps.err(`looply sessions --checkpoint: ${verdict.because}`);
|
|
338
|
+
return exports.EXIT_REFUSED;
|
|
339
|
+
}
|
|
340
|
+
if (verdict.kind === 'unmeasurable') {
|
|
341
|
+
deps.err(`looply sessions --checkpoint: ${verdict.because}. Nothing was captured.`);
|
|
342
|
+
return exports.EXIT_UNMEASURABLE;
|
|
343
|
+
}
|
|
344
|
+
for (const line of await deps.writeCheckpoint(verdict.checkpoint))
|
|
345
|
+
deps.out(line);
|
|
346
|
+
return exports.EXIT_OK;
|
|
347
|
+
}
|
|
348
|
+
const directAt = valueOf('--direct');
|
|
349
|
+
if (directAt !== null) {
|
|
350
|
+
const verb = valueOf('--do');
|
|
351
|
+
if (verb === null) {
|
|
352
|
+
deps.err("looply sessions --direct: --do <verb> says what to do, and it must be one of the grant's scope.");
|
|
353
|
+
return exports.EXIT_USAGE;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* ⚠️ ARGUMENTS ARE `k=v` AND ARE NEVER INTERPRETED HERE. What they mean is
|
|
357
|
+
* the adapter's contract; a CLI that parsed them would be inventing a
|
|
358
|
+
* capability model nobody granted.
|
|
359
|
+
*/
|
|
360
|
+
const args = {};
|
|
361
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
362
|
+
if (argv[i] !== '--arg')
|
|
363
|
+
continue;
|
|
364
|
+
const pair = argv[i + 1];
|
|
365
|
+
if (pair === undefined || !pair.includes('=')) {
|
|
366
|
+
deps.err(`looply sessions --arg: ${pair ?? '(nothing)'} is not k=v`);
|
|
367
|
+
return exports.EXIT_USAGE;
|
|
368
|
+
}
|
|
369
|
+
const eq = pair.indexOf('=');
|
|
370
|
+
args[pair.slice(0, eq)] = pair.slice(eq + 1);
|
|
371
|
+
}
|
|
372
|
+
// F41: an explicit wait for the answer, whole seconds, bounded; absent, the build's short default.
|
|
373
|
+
const waitAt = valueOf('--wait');
|
|
374
|
+
let waitMs;
|
|
375
|
+
if (waitAt !== null) {
|
|
376
|
+
const seconds = Number(waitAt);
|
|
377
|
+
if (!Number.isInteger(seconds) || seconds < 1 || seconds > exports.MAX_DIRECT_WAIT_S) {
|
|
378
|
+
deps.err(`looply sessions --wait: ${waitAt} is not a whole number of seconds from 1 to ${exports.MAX_DIRECT_WAIT_S}`);
|
|
379
|
+
return exports.EXIT_USAGE;
|
|
380
|
+
}
|
|
381
|
+
waitMs = seconds * 1000;
|
|
382
|
+
}
|
|
383
|
+
const context = (await deps.directionContext?.(directAt)) ?? null;
|
|
384
|
+
const at = deps.now();
|
|
385
|
+
const instruction = {
|
|
386
|
+
id: deps.newHandshakeId(),
|
|
387
|
+
/**
|
|
388
|
+
* ⚠️ THE GRANT ID COMES FROM THE VERDICT, and an empty one when there
|
|
389
|
+
* is no verdict is deliberate: `mayDirect` answers `unmeasurable` before
|
|
390
|
+
* it ever looks at the id, so an empty string never reaches a comparison
|
|
391
|
+
* that could accidentally match.
|
|
392
|
+
*/
|
|
393
|
+
grantId: context?.control?.kind === 'controlled' ? context.control.grantId : '',
|
|
394
|
+
verb,
|
|
395
|
+
args,
|
|
396
|
+
at,
|
|
397
|
+
};
|
|
398
|
+
const ruling = (0, core_1.mayDirect)(instruction, {
|
|
399
|
+
control: context?.control ?? null,
|
|
400
|
+
scope: context?.scope ?? [],
|
|
401
|
+
expiresAt: context?.expiresAt ?? at,
|
|
402
|
+
at,
|
|
403
|
+
});
|
|
404
|
+
deps.out(`sessions: ${(0, core_1.describeDirection)(ruling)}`);
|
|
405
|
+
if (ruling.kind === 'stopped' || ruling.kind === 'refused')
|
|
406
|
+
return exports.EXIT_REFUSED;
|
|
407
|
+
if (ruling.kind === 'unmeasurable')
|
|
408
|
+
return exports.EXIT_UNMEASURABLE;
|
|
409
|
+
if (deps.direct === undefined) {
|
|
410
|
+
deps.err(`looply sessions --direct: this build has no channel to ${directAt}, so nothing was sent. ` +
|
|
411
|
+
'It is not being reported as an instruction the session ignored.');
|
|
412
|
+
return exports.EXIT_UNMEASURABLE;
|
|
413
|
+
}
|
|
414
|
+
const result = await deps.direct(directAt, ruling.instruction, waitMs);
|
|
415
|
+
if (result === null) {
|
|
416
|
+
/**
|
|
417
|
+
* 🔴 SILENCE IS NOT A FAILURE, AND IT GETS ITS OWN EXIT CODE. An
|
|
418
|
+
* instruction that was sent and not answered is a different thing from one
|
|
419
|
+
* the session refused, and a script that retried the first and gave up on
|
|
420
|
+
* the second would have them exactly backwards.
|
|
421
|
+
*/
|
|
422
|
+
deps.out(` no answer yet from ${directAt} — the instruction was sent, and nothing has come back`);
|
|
423
|
+
return exports.EXIT_UNMEASURABLE;
|
|
424
|
+
}
|
|
425
|
+
deps.out(` ${result.outcome}: ${result.detail === '' ? '(no detail)' : result.detail}`);
|
|
426
|
+
/**
|
|
427
|
+
* ⚠️ A `done` IS THE SESSION'S CLAIM, NOT THIS MACHINE'S FINDING. What
|
|
428
|
+
* actually happened is the watcher's to say, and saying so here is cheaper
|
|
429
|
+
* than somebody later reading an exit code as proof.
|
|
430
|
+
*/
|
|
431
|
+
if (result.outcome === 'done') {
|
|
432
|
+
deps.out(' that is what the session says it did; `--watch` is what this machine saw.');
|
|
433
|
+
}
|
|
434
|
+
return result.outcome === 'done' ? exports.EXIT_OK : exports.EXIT_REFUSED;
|
|
435
|
+
}
|
|
436
|
+
const offerAt = valueOf('--offer');
|
|
437
|
+
if (offerAt !== null) {
|
|
438
|
+
const claim = await deps.readClaim(offerAt);
|
|
439
|
+
if (claim === null) {
|
|
440
|
+
deps.err(`looply sessions --offer: ${offerAt} could not be read as a session claim`);
|
|
441
|
+
return exports.EXIT_USAGE;
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* 🔴 CONSENT IS READ FROM THE RECORD, NOT FROM THE CLAIM. A session that
|
|
445
|
+
* could assert its own consent would be granting itself a power, and the
|
|
446
|
+
* whole point of the two-party rule is that it cannot.
|
|
447
|
+
*
|
|
448
|
+
* 🔴 AND THE AUTHORIZATION HALF IS THE SERVER'S, NOT THIS FILE'S. It used
|
|
449
|
+
* to come from `standing.authorized` — a line in a file on the machine the
|
|
450
|
+
* grant would authorize. Nothing ever set it, because `--authorize` was
|
|
451
|
+
* removed for exactly this reason, so the hole was inert rather than open;
|
|
452
|
+
* it is now closed by construction. A local record cannot say a person
|
|
453
|
+
* authorized anything.
|
|
454
|
+
*/
|
|
455
|
+
const standing = (0, session_store_1.standingOf)(records, claim.sessionId);
|
|
456
|
+
const fromServer = (await deps.serverControl?.(claim.sessionId)) ?? null;
|
|
457
|
+
/**
|
|
458
|
+
* ⚠️ BOTH HALVES COME FROM ONE ANSWER, because they are no longer
|
|
459
|
+
* independent. `controlVerdict` says `controlled` only when a live
|
|
460
|
+
* server-issued grant AND the session's own adapter acknowledgement agree on
|
|
461
|
+
* the handshake, session, workspace, repository and scope. Anything less is
|
|
462
|
+
* not "authorized but unacknowledged" — it is not authorization.
|
|
463
|
+
*/
|
|
464
|
+
const consented = {
|
|
465
|
+
authorized: fromServer?.kind === 'controlled',
|
|
466
|
+
acked: fromServer?.kind === 'controlled',
|
|
467
|
+
};
|
|
468
|
+
const measured = await deps.measure(claim, consented);
|
|
469
|
+
const handshakeId = deps.newHandshakeId();
|
|
470
|
+
const at = deps.now();
|
|
471
|
+
const verdict = (0, core_1.sessionAdoptionVerdict)(claim, measured, at);
|
|
472
|
+
/**
|
|
473
|
+
* 🔴 SAID OUT LOUD, WHICHEVER WAY IT WENT. A session that tops out at
|
|
474
|
+
* observe-only reads as a limitation of the product unless the reason is on
|
|
475
|
+
* the screen — and the reason is usually specific: no grant, a revoked one,
|
|
476
|
+
* an acknowledgement that came from a person rather than the session.
|
|
477
|
+
* Silence here is what made "control has no path" look like a missing
|
|
478
|
+
* feature rather than a missing authorization.
|
|
479
|
+
*/
|
|
480
|
+
if (fromServer === null) {
|
|
481
|
+
// The REASON is printed by `serverControl` itself, which knows which of
|
|
482
|
+
// unpaired / unregistered / unreachable it was. Naming a cause here too
|
|
483
|
+
// meant printing a guess one line under the fact.
|
|
484
|
+
deps.out(' control : nothing was established, so it may not direct anything');
|
|
485
|
+
}
|
|
486
|
+
else if (fromServer.kind !== 'controlled') {
|
|
487
|
+
deps.out(` control : ${fromServer.because}`);
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
deps.out(` control : authorized — ${fromServer.because}`);
|
|
491
|
+
}
|
|
492
|
+
// The local record is still what `--ack` writes and what the listing shows;
|
|
493
|
+
// it is bookkeeping about what this machine has seen, and it decides nothing.
|
|
494
|
+
void standing;
|
|
495
|
+
await deps.append({ id: handshakeId, kind: 'offered', sessionId: claim.sessionId, at, claim });
|
|
496
|
+
await deps.append({ id: (0, session_store_1.decidedId)(handshakeId), kind: 'decided', sessionId: claim.sessionId, at, handshakeId, verdict });
|
|
497
|
+
report(deps, verdict);
|
|
498
|
+
return verdictExit(verdict);
|
|
499
|
+
}
|
|
500
|
+
/** Bare: what this machine knows. */
|
|
501
|
+
const known = (0, session_store_1.sessionsKnown)(records);
|
|
502
|
+
if (known.length === 0) {
|
|
503
|
+
deps.out('sessions: no session has asked to be managed.');
|
|
504
|
+
deps.out(' `looply sessions --offer <file>` is how one asks.');
|
|
505
|
+
return exports.EXIT_OK;
|
|
506
|
+
}
|
|
507
|
+
deps.out(`sessions: ${known.length} known`);
|
|
508
|
+
for (const id of known) {
|
|
509
|
+
const s = (0, session_store_1.standingOf)(records, id);
|
|
510
|
+
if (s === null)
|
|
511
|
+
continue;
|
|
512
|
+
const kind = s.verdict === null ? 'never decided' : s.verdict.kind;
|
|
513
|
+
const consent = `${s.authorized ? 'authorized' : 'not authorized'}, ${s.acked ? 'acknowledged' : 'not acknowledged'}`;
|
|
514
|
+
deps.out(` ${id.padEnd(20)} ${kind.padEnd(14)} ${String(s.handshakes).padStart(2)} handshake(s) ${consent}`);
|
|
515
|
+
/**
|
|
516
|
+
* ⚠️ `coversFrom` IS PRINTED BESIDE A MANAGED SESSION, always. It is the
|
|
517
|
+
* answer to "what does this cover", and the charter's "do not certify
|
|
518
|
+
* earlier unobserved actions" is only real if a person can see the line.
|
|
519
|
+
*/
|
|
520
|
+
if (s.verdict !== null && (s.verdict.kind === 'observe-only' || s.verdict.kind === 'controlled')) {
|
|
521
|
+
deps.out(` ${' '.repeat(20)} covers from ${s.verdict.coversFrom} — nothing before it`);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
return exports.EXIT_OK;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* What the watch saw.
|
|
528
|
+
*
|
|
529
|
+
* 🔴 THE COMPLETENESS IS A LINE OF ITS OWN, ALWAYS, EVEN WHEN IT IS
|
|
530
|
+
* `complete`. A reader who has to infer wholeness from the absence of a warning
|
|
531
|
+
* is a reader who will one day infer it from the absence of a bug — and the
|
|
532
|
+
* line that matters most is the quiet one, where a record with no events has to
|
|
533
|
+
* say whether the session did nothing or the watcher saw nothing.
|
|
534
|
+
*/
|
|
535
|
+
/**
|
|
536
|
+
* ⚠️ `attached: true` AND `stop: null` ARE BOTH TRUE AT THE MOMENT THIS IS
|
|
537
|
+
* WRITTEN, and if the process dies they stay true forever — which is exactly
|
|
538
|
+
* what a later reader should be told.
|
|
539
|
+
*/
|
|
540
|
+
function openObservation(sessionId, coversFrom) {
|
|
541
|
+
return {
|
|
542
|
+
sessionId,
|
|
543
|
+
coversFrom,
|
|
544
|
+
coversTo: null,
|
|
545
|
+
events: [],
|
|
546
|
+
predates: 0,
|
|
547
|
+
outOfScope: 0,
|
|
548
|
+
unjudgeable: 0,
|
|
549
|
+
unreadable: [],
|
|
550
|
+
stop: null,
|
|
551
|
+
attached: true,
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
function reportWatch(deps, record) {
|
|
555
|
+
deps.out(` ${record.events.length} event(s) recorded, covering to ${record.coversTo ?? '(never closed)'}`);
|
|
556
|
+
const c = (0, core_1.observationCompleteness)(record);
|
|
557
|
+
deps.out(` ${c.kind}: ${c.because}`);
|
|
558
|
+
if (record.predates > 0)
|
|
559
|
+
deps.out(` ${record.predates} predate this watch and are NOT certified by it`);
|
|
560
|
+
if (record.outOfScope > 0)
|
|
561
|
+
deps.out(` ${record.outOfScope} outside the granted scope, not recorded`);
|
|
562
|
+
if (record.unjudgeable > 0)
|
|
563
|
+
deps.out(` ${record.unjudgeable} could not be placed against the scope`);
|
|
564
|
+
for (const blind of record.unreadable)
|
|
565
|
+
deps.out(` blind: ${blind}`);
|
|
566
|
+
for (const e of record.events)
|
|
567
|
+
deps.out(` ${e.at} ${e.kind.padEnd(8)} ${e.path ?? ''} ${e.detail}`);
|
|
568
|
+
}
|
|
569
|
+
function report(deps, verdict) {
|
|
570
|
+
const said = (0, core_1.describeSessionAdoption)(verdict);
|
|
571
|
+
if (verdict.kind === 'controlled') {
|
|
572
|
+
deps.out(`sessions: ${verdict.sessionId} is under management — covers from ${verdict.coversFrom}, nothing before it`);
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
if (said === null)
|
|
576
|
+
return;
|
|
577
|
+
if (verdict.kind === 'observe-only') {
|
|
578
|
+
deps.out(`sessions: ${said}`);
|
|
579
|
+
deps.out(` covers from ${verdict.coversFrom} — nothing before it`);
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
deps.err(`looply sessions: ${said}`);
|
|
583
|
+
/**
|
|
584
|
+
* 🔴 THE OFFER NAMES THE COMMAND THAT PERFORMS IT. `describeSessionAdoption`
|
|
585
|
+
* ends with "checkpoint what it has done and start a managed run from there",
|
|
586
|
+
* which for as long as nothing could checkpoint was an instruction to do
|
|
587
|
+
* something by hand. It is a command now, so it is printed as one.
|
|
588
|
+
*/
|
|
589
|
+
const offer = (0, core_1.checkpointOffer)(verdict);
|
|
590
|
+
if (offer !== null)
|
|
591
|
+
deps.err(` ${offer}`);
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* ⚠️ FOUR EXIT CODES, NOT THREE. `unmeasurable` gets its own, because a script
|
|
595
|
+
* that retried a refusal would be wrong and a script that ignored an
|
|
596
|
+
* unmeasurable would be worse — they are different instructions to the caller.
|
|
597
|
+
*/
|
|
598
|
+
function verdictExit(v) {
|
|
599
|
+
switch (v.kind) {
|
|
600
|
+
case 'observe-only':
|
|
601
|
+
case 'controlled':
|
|
602
|
+
return exports.EXIT_OK;
|
|
603
|
+
case 'refused':
|
|
604
|
+
return exports.EXIT_REFUSED;
|
|
605
|
+
case 'unmeasurable':
|
|
606
|
+
return exports.EXIT_UNMEASURABLE;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
//# sourceMappingURL=sessions-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessions-cmd.js","sourceRoot":"","sources":["../src/sessions-cmd.ts"],"names":[],"mappings":";;;AAyPA,0CA2cC;AAsED,kCAUC;AApxBD,uCAoBsB;AACtB,mDAAmH;AAEnH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEU,QAAA,cAAc,GAAG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