@amalgm/shell 0.1.164-preview.41762776698 → 0.1.164-preview.44185399271
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/PURPOSE.md +359 -235
- package/README.md +18 -0
- package/dist/accepted-fold.d.ts +51 -0
- package/dist/accepted-fold.js +106 -0
- package/dist/accepted-fold.js.map +1 -0
- package/dist/accepted-tail.d.ts +19 -9
- package/dist/accepted-tail.js +28 -11
- package/dist/accepted-tail.js.map +1 -1
- package/dist/accepted-view.d.ts +27 -0
- package/dist/accepted-view.js +8 -0
- package/dist/accepted-view.js.map +1 -0
- package/dist/apply-attempt-memory.d.ts +13 -0
- package/dist/apply-attempt-memory.js +26 -0
- package/dist/apply-attempt-memory.js.map +1 -0
- package/dist/apply-control.d.ts +85 -0
- package/dist/apply-control.js +131 -0
- package/dist/apply-control.js.map +1 -0
- package/dist/apply-displaced-tree.d.ts +63 -0
- package/dist/apply-displaced-tree.js +148 -0
- package/dist/apply-displaced-tree.js.map +1 -0
- package/dist/apply-durability.d.ts +33 -0
- package/dist/apply-durability.js +72 -0
- package/dist/apply-durability.js.map +1 -0
- package/dist/apply-enter-build.d.ts +91 -0
- package/dist/apply-enter-build.js +145 -0
- package/dist/apply-enter-build.js.map +1 -0
- package/dist/apply-enter-plan.d.ts +79 -0
- package/dist/apply-enter-plan.js +148 -0
- package/dist/apply-enter-plan.js.map +1 -0
- package/dist/apply-fingerprint.d.ts +39 -0
- package/dist/apply-fingerprint.js +84 -0
- package/dist/apply-fingerprint.js.map +1 -0
- package/dist/apply-git-held.d.ts +29 -0
- package/dist/apply-git-held.js +184 -0
- package/dist/apply-git-held.js.map +1 -0
- package/dist/apply-git-storage.d.ts +38 -0
- package/dist/apply-git-storage.js +110 -0
- package/dist/apply-git-storage.js.map +1 -0
- package/dist/apply-kept.d.ts +42 -0
- package/dist/apply-kept.js +135 -0
- package/dist/apply-kept.js.map +1 -0
- package/dist/apply-local-work.d.ts +41 -0
- package/dist/apply-local-work.js +72 -0
- package/dist/apply-local-work.js.map +1 -0
- package/dist/apply-map.d.ts +116 -0
- package/dist/apply-map.js +383 -0
- package/dist/apply-map.js.map +1 -0
- package/dist/apply-showing.d.ts +104 -0
- package/dist/apply-showing.js +236 -0
- package/dist/apply-showing.js.map +1 -0
- package/dist/apply-shown-again.d.ts +28 -0
- package/dist/apply-shown-again.js +81 -0
- package/dist/apply-shown-again.js.map +1 -0
- package/dist/apply-spelling.d.ts +35 -0
- package/dist/apply-spelling.js +79 -0
- package/dist/apply-spelling.js.map +1 -0
- package/dist/apply-trash-keep.d.ts +96 -0
- package/dist/apply-trash-keep.js +194 -0
- package/dist/apply-trash-keep.js.map +1 -0
- package/dist/apply-window-cargo.d.ts +54 -0
- package/dist/apply-window-cargo.js +219 -0
- package/dist/apply-window-cargo.js.map +1 -0
- package/dist/apply-window-ground.d.ts +130 -0
- package/dist/apply-window-ground.js +324 -0
- package/dist/apply-window-ground.js.map +1 -0
- package/dist/apply-window-host.d.ts +136 -0
- package/dist/apply-window-host.js +1842 -0
- package/dist/apply-window-host.js.map +1 -0
- package/dist/apply-window-lane.d.ts +30 -0
- package/dist/apply-window-lane.js +311 -0
- package/dist/apply-window-lane.js.map +1 -0
- package/dist/apply-window-line.d.ts +31 -0
- package/dist/apply-window-line.js +150 -0
- package/dist/apply-window-line.js.map +1 -0
- package/dist/apply-window-recovery.d.ts +5 -0
- package/dist/apply-window-recovery.js +72 -0
- package/dist/apply-window-recovery.js.map +1 -0
- package/dist/apply-window-reveal.d.ts +22 -0
- package/dist/apply-window-reveal.js +98 -0
- package/dist/apply-window-reveal.js.map +1 -0
- package/dist/apply-window-rows.d.ts +144 -0
- package/dist/apply-window-rows.js +178 -0
- package/dist/apply-window-rows.js.map +1 -0
- package/dist/apply-window-saves.d.ts +224 -0
- package/dist/apply-window-saves.js +674 -0
- package/dist/apply-window-saves.js.map +1 -0
- package/dist/apply-window-store.d.ts +126 -0
- package/dist/apply-window-store.js +312 -0
- package/dist/apply-window-store.js.map +1 -0
- package/dist/apply-window-verify.d.ts +65 -0
- package/dist/apply-window-verify.js +195 -0
- package/dist/apply-window-verify.js.map +1 -0
- package/dist/authority-binding.d.ts +1 -24
- package/dist/authority-binding.js +44 -9
- package/dist/authority-binding.js.map +1 -1
- package/dist/background-error.d.ts +4 -0
- package/dist/background-error.js +15 -0
- package/dist/background-error.js.map +1 -0
- package/dist/baseline-content.d.ts +12 -0
- package/dist/baseline-content.js +12 -0
- package/dist/baseline-content.js.map +1 -0
- package/dist/boot-identity.d.ts +1 -0
- package/dist/boot-identity.js +39 -0
- package/dist/boot-identity.js.map +1 -0
- package/dist/browser-host.d.ts +4 -3
- package/dist/browser-host.js +29 -14
- package/dist/browser-host.js.map +1 -1
- package/dist/captured-rows.d.ts +33 -0
- package/dist/captured-rows.js +45 -0
- package/dist/captured-rows.js.map +1 -0
- package/dist/cargo-group.d.ts +31 -17
- package/dist/cargo-group.js +78 -29
- package/dist/cargo-group.js.map +1 -1
- package/dist/cargo-journal.d.ts +45 -0
- package/dist/cargo-journal.js +130 -0
- package/dist/cargo-journal.js.map +1 -0
- package/dist/chat-composition.d.ts +4 -1
- package/dist/chat-composition.js +4 -1
- package/dist/chat-composition.js.map +1 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +117 -55
- package/dist/cli.js.map +1 -1
- package/dist/construct-apply-host.d.ts +8 -7
- package/dist/construct-apply-host.js +20 -8
- package/dist/construct-apply-host.js.map +1 -1
- package/dist/construct-door.d.ts +2 -0
- package/dist/construct-door.js +4 -3
- package/dist/construct-door.js.map +1 -1
- package/dist/construct-ledger.d.ts +2 -0
- package/dist/construct-ledger.js +13 -1
- package/dist/construct-ledger.js.map +1 -1
- package/dist/content-cache-collection.d.ts +11 -4
- package/dist/content-cache-collection.js +74 -62
- package/dist/content-cache-collection.js.map +1 -1
- package/dist/content-cache-fences.d.ts +27 -0
- package/dist/content-cache-fences.js +116 -0
- package/dist/content-cache-fences.js.map +1 -0
- package/dist/content-cache-host.d.ts +163 -91
- package/dist/content-cache-host.js +531 -354
- package/dist/content-cache-host.js.map +1 -1
- package/dist/content-cache-index.d.ts +36 -7
- package/dist/content-cache-index.js +79 -32
- package/dist/content-cache-index.js.map +1 -1
- package/dist/content-cache-namespace.d.ts +28 -34
- package/dist/content-cache-namespace.js +85 -99
- package/dist/content-cache-namespace.js.map +1 -1
- package/dist/content-cache-partials.d.ts +37 -0
- package/dist/content-cache-partials.js +79 -0
- package/dist/content-cache-partials.js.map +1 -0
- package/dist/content-cache-retention.d.ts +27 -12
- package/dist/content-cache-retention.js +143 -132
- package/dist/content-cache-retention.js.map +1 -1
- package/dist/content-capture-pool.d.ts +70 -83
- package/dist/content-capture-pool.js +112 -82
- package/dist/content-capture-pool.js.map +1 -1
- package/dist/content-capture-worker.d.ts +3 -4
- package/dist/content-capture-worker.js +28 -35
- package/dist/content-capture-worker.js.map +1 -1
- package/dist/content-clock.d.ts +54 -28
- package/dist/content-clock.js +345 -102
- package/dist/content-clock.js.map +1 -1
- package/dist/content-direct.d.ts +0 -2
- package/dist/content-direct.js +53 -31
- package/dist/content-direct.js.map +1 -1
- package/dist/content-qualification.d.ts +72 -0
- package/dist/content-qualification.js +129 -0
- package/dist/content-qualification.js.map +1 -0
- package/dist/credentials-host.js +3 -2
- package/dist/credentials-host.js.map +1 -1
- package/dist/derived-relocation.d.ts +31 -0
- package/dist/derived-relocation.js +71 -0
- package/dist/derived-relocation.js.map +1 -0
- package/dist/detection/accepted-result.js +3 -3
- package/dist/detection/accepted-result.js.map +1 -1
- package/dist/detection/admission-save.d.ts +25 -14
- package/dist/detection/admission-save.js +34 -22
- package/dist/detection/admission-save.js.map +1 -1
- package/dist/detection/admission-units.d.ts +32 -20
- package/dist/detection/admission-units.js +230 -97
- package/dist/detection/admission-units.js.map +1 -1
- package/dist/detection/alias-examination.d.ts +5 -2
- package/dist/detection/alias-examination.js +15 -3
- package/dist/detection/alias-examination.js.map +1 -1
- package/dist/detection/apply-ownership.d.ts +70 -44
- package/dist/detection/apply-ownership.js +140 -132
- package/dist/detection/apply-ownership.js.map +1 -1
- package/dist/detection/basis-advanced.d.ts +4 -0
- package/dist/detection/basis-advanced.js +9 -0
- package/dist/detection/basis-advanced.js.map +1 -1
- package/dist/detection/cached-replay.d.ts +38 -0
- package/dist/detection/cached-replay.js +66 -0
- package/dist/detection/cached-replay.js.map +1 -0
- package/dist/detection/capture-outcome.js +33 -36
- package/dist/detection/capture-outcome.js.map +1 -1
- package/dist/detection/container-membership.d.ts +13 -25
- package/dist/detection/container-membership.js +24 -28
- package/dist/detection/container-membership.js.map +1 -1
- package/dist/detection/directory-proof.js +1 -1
- package/dist/detection/directory-proof.js.map +1 -1
- package/dist/detection/dispositions.d.ts +10 -33
- package/dist/detection/dispositions.js +27 -91
- package/dist/detection/dispositions.js.map +1 -1
- package/dist/detection/examinations.d.ts +33 -0
- package/dist/detection/examinations.js +50 -0
- package/dist/detection/examinations.js.map +1 -0
- package/dist/detection/ground-proof.d.ts +35 -11
- package/dist/detection/ground-proof.js +111 -52
- package/dist/detection/ground-proof.js.map +1 -1
- package/dist/detection/ground-reader.d.ts +10 -10
- package/dist/detection/ground-reader.js +19 -42
- package/dist/detection/ground-reader.js.map +1 -1
- package/dist/detection/identity-discovery.d.ts +1 -1
- package/dist/detection/identity-discovery.js +27 -35
- package/dist/detection/identity-discovery.js.map +1 -1
- package/dist/detection/maintenance-sweep.d.ts +5 -2
- package/dist/detection/maintenance-sweep.js +15 -5
- package/dist/detection/maintenance-sweep.js.map +1 -1
- package/dist/detection/notebook-basis.d.ts +6 -3
- package/dist/detection/notebook-basis.js +8 -5
- package/dist/detection/notebook-basis.js.map +1 -1
- package/dist/detection/owed-examinations.d.ts +22 -0
- package/dist/detection/owed-examinations.js +54 -0
- package/dist/detection/owed-examinations.js.map +1 -0
- package/dist/detection/owed-selection.d.ts +23 -20
- package/dist/detection/owed-selection.js +56 -43
- package/dist/detection/owed-selection.js.map +1 -1
- package/dist/detection/policy-owed.d.ts +17 -0
- package/dist/detection/policy-owed.js +33 -0
- package/dist/detection/policy-owed.js.map +1 -0
- package/dist/detection/repository-state.d.ts +44 -0
- package/dist/detection/repository-state.js +95 -0
- package/dist/detection/repository-state.js.map +1 -0
- package/dist/detection/reveal-save.d.ts +17 -0
- package/dist/detection/reveal-save.js +15 -0
- package/dist/detection/reveal-save.js.map +1 -0
- package/dist/detection/root-examination.d.ts +25 -13
- package/dist/detection/root-examination.js +273 -220
- package/dist/detection/root-examination.js.map +1 -1
- package/dist/detection/root-walk.d.ts +191 -0
- package/dist/detection/root-walk.js +1383 -0
- package/dist/detection/root-walk.js.map +1 -0
- package/dist/detection/runtime.d.ts +41 -53
- package/dist/detection/runtime.js +285 -345
- package/dist/detection/runtime.js.map +1 -1
- package/dist/detection/scope-frame.d.ts +82 -0
- package/dist/detection/scope-frame.js +183 -0
- package/dist/detection/scope-frame.js.map +1 -0
- package/dist/detection/scoped-identity-port.d.ts +11 -10
- package/dist/detection/scoped-identity-port.js +18 -25
- package/dist/detection/scoped-identity-port.js.map +1 -1
- package/dist/detection/sharing-policy.d.ts +14 -6
- package/dist/detection/sharing-policy.js +13 -7
- package/dist/detection/sharing-policy.js.map +1 -1
- package/dist/detection/spelled-lookup.d.ts +20 -0
- package/dist/detection/spelled-lookup.js +83 -0
- package/dist/detection/spelled-lookup.js.map +1 -0
- package/dist/detection/unread-content.d.ts +20 -0
- package/dist/detection/unread-content.js +33 -0
- package/dist/detection/unread-content.js.map +1 -0
- package/dist/detection/walk-law.d.ts +11 -21
- package/dist/detection/walk-law.js +14 -22
- package/dist/detection/walk-law.js.map +1 -1
- package/dist/detection/walked-roots.d.ts +17 -0
- package/dist/detection/walked-roots.js +27 -0
- package/dist/detection/walked-roots.js.map +1 -0
- package/dist/detection/withheld.d.ts +100 -0
- package/dist/detection/withheld.js +118 -0
- package/dist/detection/withheld.js.map +1 -0
- package/dist/development/profile.js +1 -1
- package/dist/development/profile.js.map +1 -1
- package/dist/drive/cloud-files/asks.d.ts +7 -0
- package/dist/drive/cloud-files/asks.js +181 -0
- package/dist/drive/cloud-files/asks.js.map +1 -0
- package/dist/drive/cloud-files/binding.d.ts +111 -0
- package/dist/drive/cloud-files/binding.js +31 -0
- package/dist/drive/cloud-files/binding.js.map +1 -0
- package/dist/drive/cloud-files/contents.d.ts +82 -0
- package/dist/drive/cloud-files/contents.js +204 -0
- package/dist/drive/cloud-files/contents.js.map +1 -0
- package/dist/drive/cloud-files/door.d.ts +11 -0
- package/dist/drive/cloud-files/door.js +118 -0
- package/dist/drive/cloud-files/door.js.map +1 -0
- package/dist/drive/cloud-files/paths.d.ts +42 -0
- package/dist/drive/cloud-files/paths.js +93 -0
- package/dist/drive/cloud-files/paths.js.map +1 -0
- package/dist/drive/cloud-files/populated.d.ts +15 -0
- package/dist/drive/cloud-files/populated.js +38 -0
- package/dist/drive/cloud-files/populated.js.map +1 -0
- package/dist/drive/cloud-files/reconcile.d.ts +17 -0
- package/dist/drive/cloud-files/reconcile.js +478 -0
- package/dist/drive/cloud-files/reconcile.js.map +1 -0
- package/dist/drive/cloud-files/sync-root.d.ts +34 -0
- package/dist/drive/cloud-files/sync-root.js +68 -0
- package/dist/drive/cloud-files/sync-root.js.map +1 -0
- package/dist/drive/cloud-files/turns.d.ts +9 -0
- package/dist/drive/cloud-files/turns.js +58 -0
- package/dist/drive/cloud-files/turns.js.map +1 -0
- package/dist/drive/cloud-files/writes.d.ts +27 -0
- package/dist/drive/cloud-files/writes.js +436 -0
- package/dist/drive/cloud-files/writes.js.map +1 -0
- package/dist/drive/computer.d.ts +19 -0
- package/dist/drive/computer.js +61 -0
- package/dist/drive/computer.js.map +1 -0
- package/dist/drive/fuse-opens.d.ts +32 -0
- package/dist/drive/fuse-opens.js +110 -0
- package/dist/drive/fuse-opens.js.map +1 -0
- package/dist/drive/fuse.d.ts +36 -0
- package/dist/drive/fuse.js +102 -0
- package/dist/drive/fuse.js.map +1 -0
- package/dist/drive/kept.d.ts +78 -0
- package/dist/drive/kept.js +263 -0
- package/dist/drive/kept.js.map +1 -0
- package/dist/drive/kernel.d.ts +17 -0
- package/dist/drive/kernel.js +36 -0
- package/dist/drive/kernel.js.map +1 -0
- package/dist/drive/layout.d.ts +18 -0
- package/dist/drive/layout.js +39 -0
- package/dist/drive/layout.js.map +1 -0
- package/dist/drive/mount.d.ts +107 -0
- package/dist/drive/mount.js +259 -0
- package/dist/drive/mount.js.map +1 -0
- package/dist/drive/mountpoint.d.ts +14 -0
- package/dist/drive/mountpoint.js +51 -0
- package/dist/drive/mountpoint.js.map +1 -0
- package/dist/drive/nfs/apple-double.d.ts +6 -0
- package/dist/drive/nfs/apple-double.js +140 -0
- package/dist/drive/nfs/apple-double.js.map +1 -0
- package/dist/drive/nfs/attributes.d.ts +64 -0
- package/dist/drive/nfs/attributes.js +97 -0
- package/dist/drive/nfs/attributes.js.map +1 -0
- package/dist/drive/nfs/handles.d.ts +44 -0
- package/dist/drive/nfs/handles.js +209 -0
- package/dist/drive/nfs/handles.js.map +1 -0
- package/dist/drive/nfs/mount3.d.ts +16 -0
- package/dist/drive/nfs/mount3.js +38 -0
- package/dist/drive/nfs/mount3.js.map +1 -0
- package/dist/drive/nfs/nfs3.d.ts +27 -0
- package/dist/drive/nfs/nfs3.js +516 -0
- package/dist/drive/nfs/nfs3.js.map +1 -0
- package/dist/drive/nfs/rpc.d.ts +66 -0
- package/dist/drive/nfs/rpc.js +122 -0
- package/dist/drive/nfs/rpc.js.map +1 -0
- package/dist/drive/nfs/server.d.ts +30 -0
- package/dist/drive/nfs/server.js +109 -0
- package/dist/drive/nfs/server.js.map +1 -0
- package/dist/drive/nfs/xdr.d.ts +44 -0
- package/dist/drive/nfs/xdr.js +111 -0
- package/dist/drive/nfs/xdr.js.map +1 -0
- package/dist/drive/nfs.d.ts +58 -0
- package/dist/drive/nfs.js +193 -0
- package/dist/drive/nfs.js.map +1 -0
- package/dist/drive/operations.d.ts +180 -0
- package/dist/drive/operations.js +358 -0
- package/dist/drive/operations.js.map +1 -0
- package/dist/drive/shelf.d.ts +9 -0
- package/dist/drive/shelf.js +41 -0
- package/dist/drive/shelf.js.map +1 -0
- package/dist/durability-barrier.d.ts +39 -11
- package/dist/durability-barrier.js +106 -41
- package/dist/durability-barrier.js.map +1 -1
- package/dist/entity-access-wire.d.ts +3 -2
- package/dist/entity-access-wire.js +9 -25
- package/dist/entity-access-wire.js.map +1 -1
- package/dist/entity-channel-holdings.d.ts +7 -7
- package/dist/entity-channel-holdings.js +49 -8
- package/dist/entity-channel-holdings.js.map +1 -1
- package/dist/entity-grant-watch.d.ts +9 -0
- package/dist/entity-grant-watch.js +29 -0
- package/dist/entity-grant-watch.js.map +1 -0
- package/dist/entity-record-observability.d.ts +1 -1
- package/dist/entity-record-observability.js +34 -29
- package/dist/entity-record-observability.js.map +1 -1
- package/dist/entity-record-saves.d.ts +34 -7
- package/dist/entity-record-saves.js +72 -20
- package/dist/entity-record-saves.js.map +1 -1
- package/dist/entity-record-store.d.ts +43 -15
- package/dist/entity-record-store.js +160 -55
- package/dist/entity-record-store.js.map +1 -1
- package/dist/error-facts.d.ts +24 -0
- package/dist/error-facts.js +35 -0
- package/dist/error-facts.js.map +1 -0
- package/dist/faults/drain.d.ts +27 -0
- package/dist/faults/drain.js +211 -0
- package/dist/faults/drain.js.map +1 -0
- package/dist/faults/queue.d.ts +46 -0
- package/dist/faults/queue.js +100 -0
- package/dist/faults/queue.js.map +1 -0
- package/dist/faults/show.d.ts +7 -0
- package/dist/faults/show.js +32 -0
- package/dist/faults/show.js.map +1 -0
- package/dist/files-mcp-host.d.ts +58 -0
- package/dist/files-mcp-host.js +63 -0
- package/dist/files-mcp-host.js.map +1 -0
- package/dist/files-observability.d.ts +5 -2
- package/dist/files-observability.js.map +1 -1
- package/dist/files-program/client.d.ts +136 -0
- package/dist/files-program/client.js +442 -0
- package/dist/files-program/client.js.map +1 -0
- package/dist/files-program/journeys.d.ts +15 -0
- package/dist/files-program/journeys.js +79 -0
- package/dist/files-program/journeys.js.map +1 -0
- package/dist/files-program/program.d.ts +1 -0
- package/dist/files-program/program.js +344 -0
- package/dist/files-program/program.js.map +1 -0
- package/dist/files-program/protocol.d.ts +180 -0
- package/dist/files-program/protocol.js +7 -0
- package/dist/files-program/protocol.js.map +1 -0
- package/dist/files-register-host.d.ts +18 -21
- package/dist/files-register-host.js +104 -94
- package/dist/files-register-host.js.map +1 -1
- package/dist/files-trace.d.ts +29 -9
- package/dist/files-trace.js +58 -14
- package/dist/files-trace.js.map +1 -1
- package/dist/filesystem.d.ts +27 -9
- package/dist/filesystem.js +94 -56
- package/dist/filesystem.js.map +1 -1
- package/dist/flush.d.ts +19 -0
- package/dist/flush.js +84 -0
- package/dist/flush.js.map +1 -0
- package/dist/gateway.js +5 -2
- package/dist/gateway.js.map +1 -1
- package/dist/git/ground-owners.d.ts +15 -0
- package/dist/git/ground-owners.js +67 -0
- package/dist/git/ground-owners.js.map +1 -0
- package/dist/git/held-package.d.ts +67 -0
- package/dist/git/held-package.js +95 -0
- package/dist/git/held-package.js.map +1 -0
- package/dist/git/home.d.ts +59 -0
- package/dist/git/home.js +132 -0
- package/dist/git/home.js.map +1 -0
- package/dist/git/marker.d.ts +21 -0
- package/dist/git/marker.js +30 -0
- package/dist/git/marker.js.map +1 -0
- package/dist/git/named-objects.d.ts +24 -0
- package/dist/git/named-objects.js +176 -0
- package/dist/git/named-objects.js.map +1 -0
- package/dist/git/objects.d.ts +30 -0
- package/dist/git/objects.js +88 -0
- package/dist/git/objects.js.map +1 -0
- package/dist/git/play.d.ts +30 -0
- package/dist/git/play.js +305 -0
- package/dist/git/play.js.map +1 -0
- package/dist/git/quarantine.d.ts +48 -0
- package/dist/git/quarantine.js +150 -0
- package/dist/git/quarantine.js.map +1 -0
- package/dist/git/rail.d.ts +206 -0
- package/dist/git/rail.js +885 -0
- package/dist/git/rail.js.map +1 -0
- package/dist/git/read-state.d.ts +49 -0
- package/dist/git/read-state.js +238 -0
- package/dist/git/read-state.js.map +1 -0
- package/dist/git/repository.d.ts +62 -0
- package/dist/git/repository.js +130 -0
- package/dist/git/repository.js.map +1 -0
- package/dist/git/write-files.d.ts +29 -0
- package/dist/git/write-files.js +215 -0
- package/dist/git/write-files.js.map +1 -0
- package/dist/git-binding.d.ts +37 -49
- package/dist/git-binding.js +262 -134
- package/dist/git-binding.js.map +1 -1
- package/dist/git-cat-file.d.ts +28 -0
- package/dist/git-cat-file.js +125 -0
- package/dist/git-cat-file.js.map +1 -0
- package/dist/git-command.d.ts +45 -10
- package/dist/git-command.js +197 -89
- package/dist/git-command.js.map +1 -1
- package/dist/git-index-entries.d.ts +10 -8
- package/dist/git-index-entries.js +21 -39
- package/dist/git-index-entries.js.map +1 -1
- package/dist/git-index-format.d.ts +35 -18
- package/dist/git-index-format.js +210 -53
- package/dist/git-index-format.js.map +1 -1
- package/dist/git-install-lines.d.ts +12 -0
- package/dist/git-install-lines.js +22 -0
- package/dist/git-install-lines.js.map +1 -0
- package/dist/git-launcher-process.d.ts +1 -0
- package/dist/git-launcher-process.js +81 -0
- package/dist/git-launcher-process.js.map +1 -0
- package/dist/git-launcher.d.ts +70 -0
- package/dist/git-launcher.js +178 -0
- package/dist/git-launcher.js.map +1 -0
- package/dist/graph-heads.d.ts +71 -0
- package/dist/graph-heads.js +90 -0
- package/dist/graph-heads.js.map +1 -0
- package/dist/ground-basis.d.ts +141 -105
- package/dist/ground-basis.js +367 -460
- package/dist/ground-basis.js.map +1 -1
- package/dist/ground-checkpoint-worker.js +26 -25
- package/dist/ground-checkpoint-worker.js.map +1 -1
- package/dist/ground-checkpoints.d.ts +1 -1
- package/dist/ground-checkpoints.js +6 -6
- package/dist/ground-contract.d.ts +11 -0
- package/dist/ground-contract.js +115 -0
- package/dist/ground-contract.js.map +1 -0
- package/dist/ground-coordination.d.ts +30 -20
- package/dist/ground-coordination.js +96 -51
- package/dist/ground-coordination.js.map +1 -1
- package/dist/ground-database.d.ts +11 -13
- package/dist/ground-database.js +283 -97
- package/dist/ground-database.js.map +1 -1
- package/dist/ground-differences.d.ts +19 -18
- package/dist/ground-differences.js +20 -42
- package/dist/ground-differences.js.map +1 -1
- package/dist/ground-initialization.d.ts +3 -0
- package/dist/ground-initialization.js.map +1 -1
- package/dist/ground-install-saves.d.ts +61 -20
- package/dist/ground-install-saves.js +56 -52
- package/dist/ground-install-saves.js.map +1 -1
- package/dist/ground-inventory-schema.d.ts +42 -2
- package/dist/ground-inventory-schema.js +244 -31
- package/dist/ground-inventory-schema.js.map +1 -1
- package/dist/ground-marks.d.ts +49 -0
- package/dist/ground-marks.js +105 -0
- package/dist/ground-marks.js.map +1 -0
- package/dist/ground-profile.d.ts +7 -0
- package/dist/ground-profile.js +85 -16
- package/dist/ground-profile.js.map +1 -1
- package/dist/ground-reads.d.ts +86 -0
- package/dist/ground-reads.js +256 -0
- package/dist/ground-reads.js.map +1 -0
- package/dist/ground-relations.d.ts +57 -0
- package/dist/ground-relations.js +206 -0
- package/dist/ground-relations.js.map +1 -0
- package/dist/ground-root-index.d.ts +3 -2
- package/dist/ground-root-index.js +4 -3
- package/dist/ground-root-index.js.map +1 -1
- package/dist/ground-row.d.ts +23 -7
- package/dist/ground-row.js +27 -11
- package/dist/ground-row.js.map +1 -1
- package/dist/ground-save-ops.d.ts +42 -26
- package/dist/ground-save-ops.js +46 -26
- package/dist/ground-save-ops.js.map +1 -1
- package/dist/ground-saver-worker.js +171 -44
- package/dist/ground-saver-worker.js.map +1 -1
- package/dist/ground-saver.d.ts +35 -7
- package/dist/ground-saver.js +52 -25
- package/dist/ground-saver.js.map +1 -1
- package/dist/ground-store.d.ts +51 -10
- package/dist/ground-store.js +439 -89
- package/dist/ground-store.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/initial-publication.d.ts +42 -0
- package/dist/initial-publication.js +42 -0
- package/dist/initial-publication.js.map +1 -0
- package/dist/installation/environment.d.ts +1 -0
- package/dist/installation/environment.js +3 -0
- package/dist/installation/environment.js.map +1 -1
- package/dist/keychain/cli-io.d.ts +8 -0
- package/dist/keychain/cli-io.js +55 -0
- package/dist/keychain/cli-io.js.map +1 -0
- package/dist/keychain/cli.d.ts +12 -0
- package/dist/keychain/cli.js +48 -0
- package/dist/keychain/cli.js.map +1 -0
- package/dist/keychain/host.d.ts +28 -0
- package/dist/keychain/host.js +43 -0
- package/dist/keychain/host.js.map +1 -0
- package/dist/keychain/http-mount.d.ts +16 -0
- package/dist/keychain/http-mount.js +74 -0
- package/dist/keychain/http-mount.js.map +1 -0
- package/dist/keychain/key-wire.d.ts +12 -0
- package/dist/keychain/key-wire.js +45 -0
- package/dist/keychain/key-wire.js.map +1 -0
- package/dist/keychain/presence-mac.d.ts +8 -0
- package/dist/keychain/presence-mac.js +26 -0
- package/dist/keychain/presence-mac.js.map +1 -0
- package/dist/keychain/presence.d.ts +9 -0
- package/dist/keychain/presence.js +24 -0
- package/dist/keychain/presence.js.map +1 -0
- package/dist/keychain/rail.d.ts +19 -0
- package/dist/keychain/rail.js +20 -0
- package/dist/keychain/rail.js.map +1 -0
- package/dist/keychain/secret-apply.d.ts +22 -0
- package/dist/keychain/secret-apply.js +46 -0
- package/dist/keychain/secret-apply.js.map +1 -0
- package/dist/keychain/shelf-from-ledger.d.ts +15 -0
- package/dist/keychain/shelf-from-ledger.js +18 -0
- package/dist/keychain/shelf-from-ledger.js.map +1 -0
- package/dist/keychain/use-log.d.ts +7 -0
- package/dist/keychain/use-log.js +15 -0
- package/dist/keychain/use-log.js.map +1 -0
- package/dist/keychain/vault-file.d.ts +12 -0
- package/dist/keychain/vault-file.js +19 -0
- package/dist/keychain/vault-file.js.map +1 -0
- package/dist/line-judge.d.ts +39 -0
- package/dist/line-judge.js +177 -0
- package/dist/line-judge.js.map +1 -0
- package/dist/line-loops.d.ts +22 -0
- package/dist/line-loops.js +19 -0
- package/dist/line-loops.js.map +1 -0
- package/dist/link-target.d.ts +16 -0
- package/dist/link-target.js +81 -0
- package/dist/link-target.js.map +1 -0
- package/dist/loop-watch.d.ts +17 -0
- package/dist/loop-watch.js +44 -0
- package/dist/loop-watch.js.map +1 -0
- package/dist/machine-host.d.ts +93 -23
- package/dist/machine-host.js +336 -178
- package/dist/machine-host.js.map +1 -1
- package/dist/main.js +3 -1
- package/dist/main.js.map +1 -1
- package/dist/materialize-records.d.ts +98 -0
- package/dist/materialize-records.js +446 -0
- package/dist/materialize-records.js.map +1 -0
- package/dist/materialized-graph.d.ts +14 -21
- package/dist/materialized-graph.js +1 -135
- package/dist/materialized-graph.js.map +1 -1
- package/dist/mount.d.ts +13 -0
- package/dist/mount.js +33 -0
- package/dist/mount.js.map +1 -0
- package/dist/native/cloud-files.node +0 -0
- package/dist/native/fsevents-stream.node +0 -0
- package/dist/native/inotify.node +0 -0
- package/dist/native/windows-fs.node +0 -0
- package/dist/on-demand-roots.d.ts +31 -0
- package/dist/on-demand-roots.js +18 -0
- package/dist/on-demand-roots.js.map +1 -0
- package/dist/open-standing.d.ts +8 -0
- package/dist/open-standing.js +109 -0
- package/dist/open-standing.js.map +1 -0
- package/dist/own-results.d.ts +37 -0
- package/dist/own-results.js +98 -0
- package/dist/own-results.js.map +1 -0
- package/dist/package-pages.d.ts +41 -0
- package/dist/package-pages.js +76 -0
- package/dist/package-pages.js.map +1 -0
- package/dist/patient-flush.d.ts +24 -0
- package/dist/patient-flush.js +37 -0
- package/dist/patient-flush.js.map +1 -0
- package/dist/physical-path-witness.d.ts +2 -11
- package/dist/physical-path-witness.js +19 -43
- package/dist/physical-path-witness.js.map +1 -1
- package/dist/placement-owed.d.ts +28 -0
- package/dist/placement-owed.js +32 -0
- package/dist/placement-owed.js.map +1 -0
- package/dist/placement-tidy.d.ts +57 -0
- package/dist/placement-tidy.js +313 -0
- package/dist/placement-tidy.js.map +1 -0
- package/dist/platform-product-host.d.ts +12 -0
- package/dist/platform-product-host.js +23 -1
- package/dist/platform-product-host.js.map +1 -1
- package/dist/platform-tools.d.ts +1 -0
- package/dist/platform-tools.js +11 -1
- package/dist/platform-tools.js.map +1 -1
- package/dist/process-lifecycle.d.ts +7 -0
- package/dist/process-lifecycle.js +13 -0
- package/dist/process-lifecycle.js.map +1 -1
- package/dist/pty-host.d.ts +2 -0
- package/dist/pty-host.js +1 -0
- package/dist/pty-host.js.map +1 -1
- package/dist/received-state.d.ts +90 -0
- package/dist/received-state.js +167 -0
- package/dist/received-state.js.map +1 -0
- package/dist/reference-placement.d.ts +26 -0
- package/dist/reference-placement.js +121 -0
- package/dist/reference-placement.js.map +1 -0
- package/dist/registry-graph.d.ts +63 -55
- package/dist/registry-graph.js +291 -170
- package/dist/registry-graph.js.map +1 -1
- package/dist/registry-page-cache.d.ts +2 -4
- package/dist/registry-page-cache.js.map +1 -1
- package/dist/root-install.d.ts +72 -0
- package/dist/root-install.js +178 -0
- package/dist/root-install.js.map +1 -0
- package/dist/runtime-activity.d.ts +20 -0
- package/dist/runtime-activity.js +86 -0
- package/dist/runtime-activity.js.map +1 -0
- package/dist/runtime-argv.d.ts +8 -0
- package/dist/runtime-argv.js +37 -0
- package/dist/runtime-argv.js.map +1 -0
- package/dist/runtime-command-host.d.ts +9 -3
- package/dist/runtime-command-host.js +27 -7
- package/dist/runtime-command-host.js.map +1 -1
- package/dist/runtime-node-flags.d.ts +6 -6
- package/dist/runtime-node-flags.js +6 -6
- package/dist/runtime-wire-host.d.ts +4 -1
- package/dist/runtime-wire-host.js +11 -6
- package/dist/runtime-wire-host.js.map +1 -1
- package/dist/sha256.d.ts +1 -0
- package/dist/sha256.js +4 -0
- package/dist/sha256.js.map +1 -0
- package/dist/sharing-admission.d.ts +9 -4
- package/dist/sharing-admission.js +57 -98
- package/dist/sharing-admission.js.map +1 -1
- package/dist/sharing-host.d.ts +6 -11
- package/dist/sharing-host.js +6 -10
- package/dist/sharing-host.js.map +1 -1
- package/dist/snapshot-delivery-baseline.d.ts +23 -13
- package/dist/snapshot-delivery-baseline.js +37 -40
- package/dist/snapshot-delivery-baseline.js.map +1 -1
- package/dist/socket-marking.d.ts +9 -0
- package/dist/socket-marking.js +26 -0
- package/dist/socket-marking.js.map +1 -0
- package/dist/source-proof.d.ts +2 -15
- package/dist/source-proof.js +9 -4
- package/dist/source-proof.js.map +1 -1
- package/dist/source-signature.d.ts +122 -21
- package/dist/source-signature.js +139 -28
- package/dist/source-signature.js.map +1 -1
- package/dist/source-witness.d.ts +2 -8
- package/dist/source-witness.js +1 -14
- package/dist/source-witness.js.map +1 -1
- package/dist/sqlite-durability.d.ts +1 -0
- package/dist/sqlite-durability.js +2 -0
- package/dist/sqlite-durability.js.map +1 -1
- package/dist/sqlite.js +8 -8
- package/dist/sqlite.js.map +1 -1
- package/dist/sync-address.d.ts +0 -3
- package/dist/sync-address.js +1 -23
- package/dist/sync-address.js.map +1 -1
- package/dist/sync-cli.d.ts +6 -2
- package/dist/sync-cli.js +19 -4
- package/dist/sync-cli.js.map +1 -1
- package/dist/sync-setting.d.ts +16 -1
- package/dist/sync-setting.js +6 -0
- package/dist/sync-setting.js.map +1 -1
- package/dist/transfer-instrumentation.d.ts +3 -3
- package/dist/transfer-instrumentation.js +7 -5
- package/dist/transfer-instrumentation.js.map +1 -1
- package/dist/turns.d.ts +4 -2
- package/dist/turns.js +17 -15
- package/dist/turns.js.map +1 -1
- package/dist/updates/artifacts.d.ts +9 -4
- package/dist/updates/artifacts.js +132 -9
- package/dist/updates/artifacts.js.map +1 -1
- package/dist/updates/controller.js +4 -3
- package/dist/updates/controller.js.map +1 -1
- package/dist/updates/locked-packages.d.ts +4 -0
- package/dist/updates/locked-packages.js +26 -0
- package/dist/updates/locked-packages.js.map +1 -0
- package/dist/updates/store.d.ts +5 -4
- package/dist/updates/store.js +5 -4
- package/dist/updates/store.js.map +1 -1
- package/dist/user-ground-host.d.ts +534 -179
- package/dist/user-ground-host.js +3293 -5218
- package/dist/user-ground-host.js.map +1 -1
- package/dist/watching/fsevents.d.ts +22 -6
- package/dist/watching/fsevents.js +29 -7
- package/dist/watching/fsevents.js.map +1 -1
- package/dist/watching/git-storage.d.ts +22 -0
- package/dist/watching/git-storage.js +125 -0
- package/dist/watching/git-storage.js.map +1 -0
- package/dist/watching/host.d.ts +149 -23
- package/dist/watching/host.js +706 -206
- package/dist/watching/host.js.map +1 -1
- package/dist/watching/index.d.ts +3 -2
- package/dist/watching/index.js +2 -1
- package/dist/watching/index.js.map +1 -1
- package/dist/watching/inotify.d.ts +81 -0
- package/dist/watching/inotify.js +184 -0
- package/dist/watching/inotify.js.map +1 -0
- package/dist/windows-fs.d.ts +12 -0
- package/dist/windows-fs.js +19 -0
- package/dist/windows-fs.js.map +1 -0
- package/dist/windows-owner-only.d.ts +6 -0
- package/dist/windows-owner-only.js +84 -0
- package/dist/windows-owner-only.js.map +1 -0
- package/dist/wire-client.d.ts +13 -11
- package/dist/wire-client.js +51 -78
- package/dist/wire-client.js.map +1 -1
- package/dist/wire-join.d.ts +19 -0
- package/dist/wire-join.js +54 -0
- package/dist/wire-join.js.map +1 -0
- package/dist/wire-outbox.d.ts +3 -0
- package/dist/wire-outbox.js +6 -1
- package/dist/wire-outbox.js.map +1 -1
- package/dist/wire-request-scope.d.ts +2 -1
- package/dist/wire-request-scope.js +2 -1
- package/dist/wire-request-scope.js.map +1 -1
- package/dist/workspace-add-intent.d.ts +41 -0
- package/dist/workspace-add-intent.js +107 -0
- package/dist/workspace-add-intent.js.map +1 -0
- package/dist/workspace-add-staging.d.ts +78 -74
- package/dist/workspace-add-staging.js +131 -179
- package/dist/workspace-add-staging.js.map +1 -1
- package/dist/workspace-host.d.ts +17 -0
- package/dist/workspace-host.js +17 -21
- package/dist/workspace-host.js.map +1 -1
- package/examinations/fixtures/private-wire-authority.js +534 -499
- package/examinations/native-service.mjs +29 -4
- package/examinations/runtime-upgrade.native-test.mjs +16 -1
- package/npm-shrinkwrap.json +253 -464
- package/package.json +29 -33
- package/dist/apply-cleanup.d.ts +0 -28
- package/dist/apply-cleanup.js +0 -166
- package/dist/apply-cleanup.js.map +0 -1
- package/dist/apply-recovery.d.ts +0 -47
- package/dist/apply-recovery.js +0 -100
- package/dist/apply-recovery.js.map +0 -1
- package/dist/apply-rows.d.ts +0 -72
- package/dist/apply-rows.js +0 -150
- package/dist/apply-rows.js.map +0 -1
- package/dist/apply-saves.d.ts +0 -85
- package/dist/apply-saves.js +0 -238
- package/dist/apply-saves.js.map +0 -1
- package/dist/bounded-for-each.d.ts +0 -3
- package/dist/bounded-for-each.js +0 -26
- package/dist/bounded-for-each.js.map +0 -1
- package/dist/content-cache-ownership.d.ts +0 -13
- package/dist/content-cache-ownership.js +0 -75
- package/dist/content-cache-ownership.js.map +0 -1
- package/dist/content-stream-thread.d.ts +0 -60
- package/dist/content-stream-thread.js +0 -95
- package/dist/content-stream-thread.js.map +0 -1
- package/dist/content-stream-worker.d.ts +0 -7
- package/dist/content-stream-worker.js +0 -52
- package/dist/content-stream-worker.js.map +0 -1
- package/dist/declaration-absorption.d.ts +0 -37
- package/dist/declaration-absorption.js +0 -119
- package/dist/declaration-absorption.js.map +0 -1
- package/dist/declaration-chain.d.ts +0 -36
- package/dist/declaration-chain.js +0 -96
- package/dist/declaration-chain.js.map +0 -1
- package/dist/declaration-commit.d.ts +0 -31
- package/dist/declaration-commit.js +0 -49
- package/dist/declaration-commit.js.map +0 -1
- package/dist/declaration-hold.d.ts +0 -22
- package/dist/declaration-hold.js +0 -24
- package/dist/declaration-hold.js.map +0 -1
- package/dist/declaration-journal.d.ts +0 -62
- package/dist/declaration-journal.js +0 -99
- package/dist/declaration-journal.js.map +0 -1
- package/dist/declaration-save.d.ts +0 -31
- package/dist/declaration-save.js +0 -134
- package/dist/declaration-save.js.map +0 -1
- package/dist/detection/disposition-rows.d.ts +0 -18
- package/dist/detection/disposition-rows.js +0 -29
- package/dist/detection/disposition-rows.js.map +0 -1
- package/dist/detection/git-notice.d.ts +0 -88
- package/dist/detection/git-notice.js +0 -444
- package/dist/detection/git-notice.js.map +0 -1
- package/dist/detection/held-territory.d.ts +0 -51
- package/dist/detection/held-territory.js +0 -205
- package/dist/detection/held-territory.js.map +0 -1
- package/dist/detection/name-reach.d.ts +0 -12
- package/dist/detection/name-reach.js +0 -28
- package/dist/detection/name-reach.js.map +0 -1
- package/dist/detection/portable.d.ts +0 -66
- package/dist/detection/portable.js +0 -137
- package/dist/detection/portable.js.map +0 -1
- package/dist/detection/repository-publication.d.ts +0 -20
- package/dist/detection/repository-publication.js +0 -79
- package/dist/detection/repository-publication.js.map +0 -1
- package/dist/detection/repository-routes.d.ts +0 -43
- package/dist/detection/repository-routes.js +0 -98
- package/dist/detection/repository-routes.js.map +0 -1
- package/dist/detection/seal-law.d.ts +0 -66
- package/dist/detection/seal-law.js +0 -116
- package/dist/detection/seal-law.js.map +0 -1
- package/dist/detection/verified-content.d.ts +0 -6
- package/dist/detection/verified-content.js +0 -12
- package/dist/detection/verified-content.js.map +0 -1
- package/dist/entity-apply-host.d.ts +0 -80
- package/dist/entity-apply-host.js +0 -2316
- package/dist/entity-apply-host.js.map +0 -1
- package/dist/entity-apply-store.d.ts +0 -105
- package/dist/entity-apply-store.js +0 -290
- package/dist/entity-apply-store.js.map +0 -1
- package/dist/git-capture.d.ts +0 -36
- package/dist/git-capture.js +0 -91
- package/dist/git-capture.js.map +0 -1
- package/dist/git-card.d.ts +0 -17
- package/dist/git-card.js +0 -133
- package/dist/git-card.js.map +0 -1
- package/dist/git-checkpoint-construction.d.ts +0 -40
- package/dist/git-checkpoint-construction.js +0 -102
- package/dist/git-checkpoint-construction.js.map +0 -1
- package/dist/git-checkpoint-preparation.d.ts +0 -37
- package/dist/git-checkpoint-preparation.js +0 -145
- package/dist/git-checkpoint-preparation.js.map +0 -1
- package/dist/git-configuration.d.ts +0 -40
- package/dist/git-configuration.js +0 -217
- package/dist/git-configuration.js.map +0 -1
- package/dist/git-evidence.d.ts +0 -61
- package/dist/git-evidence.js +0 -181
- package/dist/git-evidence.js.map +0 -1
- package/dist/git-index-witness.d.ts +0 -33
- package/dist/git-index-witness.js +0 -69
- package/dist/git-index-witness.js.map +0 -1
- package/dist/git-literal-host.d.ts +0 -82
- package/dist/git-literal-host.js +0 -173
- package/dist/git-literal-host.js.map +0 -1
- package/dist/git-literal-read.d.ts +0 -88
- package/dist/git-literal-read.js +0 -170
- package/dist/git-literal-read.js.map +0 -1
- package/dist/git-literal-replay.d.ts +0 -33
- package/dist/git-literal-replay.js +0 -269
- package/dist/git-literal-replay.js.map +0 -1
- package/dist/git-native-file.d.ts +0 -42
- package/dist/git-native-file.js +0 -145
- package/dist/git-native-file.js.map +0 -1
- package/dist/git-native-index.d.ts +0 -21
- package/dist/git-native-index.js +0 -44
- package/dist/git-native-index.js.map +0 -1
- package/dist/git-operation-host.d.ts +0 -48
- package/dist/git-operation-host.js +0 -127
- package/dist/git-operation-host.js.map +0 -1
- package/dist/git-private-index.d.ts +0 -11
- package/dist/git-private-index.js +0 -42
- package/dist/git-private-index.js.map +0 -1
- package/dist/git-private-repository.d.ts +0 -4
- package/dist/git-private-repository.js +0 -69
- package/dist/git-private-repository.js.map +0 -1
- package/dist/git-private-view.d.ts +0 -57
- package/dist/git-private-view.js +0 -240
- package/dist/git-private-view.js.map +0 -1
- package/dist/git-ref-store.d.ts +0 -12
- package/dist/git-ref-store.js +0 -68
- package/dist/git-ref-store.js.map +0 -1
- package/dist/git-registration-host.d.ts +0 -38
- package/dist/git-registration-host.js +0 -96
- package/dist/git-registration-host.js.map +0 -1
- package/dist/git-repository-host.d.ts +0 -191
- package/dist/git-repository-host.js +0 -917
- package/dist/git-repository-host.js.map +0 -1
- package/dist/git-worktree-host.d.ts +0 -2
- package/dist/git-worktree-host.js +0 -16
- package/dist/git-worktree-host.js.map +0 -1
- package/dist/graph-publication.d.ts +0 -75
- package/dist/graph-publication.js +0 -203
- package/dist/graph-publication.js.map +0 -1
- package/dist/ground-territory.d.ts +0 -130
- package/dist/ground-territory.js +0 -511
- package/dist/ground-territory.js.map +0 -1
- package/dist/register-upload-fusion.d.ts +0 -84
- package/dist/register-upload-fusion.js +0 -172
- package/dist/register-upload-fusion.js.map +0 -1
- package/dist/repository-identity-steps.d.ts +0 -5
- package/dist/repository-identity-steps.js +0 -33
- package/dist/repository-identity-steps.js.map +0 -1
package/README.md
CHANGED
|
@@ -75,6 +75,16 @@ The setting is a lifecycle boundary, not an authorization workaround. A separate
|
|
|
75
75
|
Gateway construct-authority rejection can still prevent pending work from being
|
|
76
76
|
accepted after explicit resume.
|
|
77
77
|
|
|
78
|
+
`amalgm mount --user EMAIL` runs the same runtime on a machine whose disk is
|
|
79
|
+
thrown away after it stops, such as a cloud sandbox. Each brick reports how
|
|
80
|
+
much work it is doing, and every change prints one `AMALGM_ACTIVITY` line. A
|
|
81
|
+
stop signal, or staying idle for `--exit-when-idle MINUTES`, takes no new work
|
|
82
|
+
and exits 0 only once nothing runs: no terminal, app, automation run or chat
|
|
83
|
+
turn, and no file change still unsettled or unsent. A brick that has not
|
|
84
|
+
reported counts as busy, and so does one that cannot tell its count: Files
|
|
85
|
+
while its Outbox cannot be read, or while the home holding its database is
|
|
86
|
+
away. A second signal stops at once, exits 1 and names what still ran.
|
|
87
|
+
|
|
78
88
|
```bash
|
|
79
89
|
npm install
|
|
80
90
|
npm test
|
|
@@ -94,6 +104,9 @@ npx --package @amalgm/shell amalgm login --no-open
|
|
|
94
104
|
# Resume one user on a machine that has several
|
|
95
105
|
npx --package @amalgm/shell amalgm run --user person@example.com
|
|
96
106
|
|
|
107
|
+
# Run on a throwaway machine; stop only when nothing runs
|
|
108
|
+
npx --package @amalgm/shell amalgm mount --user person@example.com --exit-when-idle 1
|
|
109
|
+
|
|
97
110
|
# Inspect registration and authenticated runtime health without starting either
|
|
98
111
|
npx --package @amalgm/shell amalgm status --user person@example.com
|
|
99
112
|
|
|
@@ -106,6 +119,11 @@ npx --package @amalgm/shell amalgm files register ./project --user person@exampl
|
|
|
106
119
|
# Materialize into the current directory and keep it on that same running Watch
|
|
107
120
|
npx --package @amalgm/shell amalgm files add <workspace-id> --user person@example.com
|
|
108
121
|
|
|
122
|
+
# Delete for good what stands in Trash: all of it, or one item; never a root.
|
|
123
|
+
# Only roots this computer holds whole; a root its drive serves on demand is left to the web
|
|
124
|
+
npx --package @amalgm/shell amalgm files trash empty --user person@example.com
|
|
125
|
+
npx --package @amalgm/shell amalgm files trash delete <uuid> --user person@example.com
|
|
126
|
+
|
|
109
127
|
# Use Automations' six MCP-equivalent JSON commands through the signed-in runtime
|
|
110
128
|
npx --package @amalgm/shell amalgm automations list --user person@example.com
|
|
111
129
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The accepted fold: a committed head H at watermark M with every change
|
|
3
|
+
* the authority accepted in (M, N] played on, read through Live's accepted view
|
|
4
|
+
* (accepted-view.ts), which answers what the one reducer holds a point at a
|
|
5
|
+
* time.
|
|
6
|
+
*
|
|
7
|
+
* H is paged per root, and nothing reads the whole account. A row, a
|
|
8
|
+
* listing or a subtree within a root reads only what it names; only `locate`
|
|
9
|
+
* and a whole root ask where H holds something. A whole root is read only
|
|
10
|
+
* when asked for: from H's pages when no result touches an identity H holds
|
|
11
|
+
* in it, since then it holds exactly H's rows, and otherwise as the view's
|
|
12
|
+
* subtree beneath it.
|
|
13
|
+
*/
|
|
14
|
+
import { type AcceptedRecord, type CloudEntityRecord, type PlayableChange, type Sha256Hex } from "@amalgm/live";
|
|
15
|
+
import type { RegistryGraph } from "./registry-graph.js";
|
|
16
|
+
export type { AcceptedRecord } from "@amalgm/live";
|
|
17
|
+
export declare class AcceptedFold {
|
|
18
|
+
#private;
|
|
19
|
+
readonly graph: RegistryGraph;
|
|
20
|
+
private constructor();
|
|
21
|
+
/** The view of `results` over `graph`. Nothing folds: each question reads
|
|
22
|
+
* what it names. */
|
|
23
|
+
static open(graph: RegistryGraph, changes: readonly PlayableChange[], sha256Hex: Sha256Hex): Promise<AcceptedFold>;
|
|
24
|
+
/** Play the changes accepted next, in acceptance order, and say which
|
|
25
|
+
* identities they touch: every row whose answer they can move is among
|
|
26
|
+
* them. */
|
|
27
|
+
advance(changes: readonly PlayableChange[]): Promise<Set<string>>;
|
|
28
|
+
/** One root's rows, in uuid order; empty when the fold holds no root by
|
|
29
|
+
* that id. Only this asks where H holds what a result touched. */
|
|
30
|
+
root(rootId: string): Promise<readonly CloudEntityRecord[]>;
|
|
31
|
+
/** The subtree `uuid` heads, `uuid` first, any status; empty when the fold
|
|
32
|
+
* holds no row for it. A root H holds is read whole first, so the walk
|
|
33
|
+
* beneath it answers from memory; a subtree within one reads only the pages
|
|
34
|
+
* that hold its containers' children. */
|
|
35
|
+
subtree(uuid: string): Promise<readonly CloudEntityRecord[]>;
|
|
36
|
+
/** The rows directly beneath `uuid`, any status; empty when the fold holds
|
|
37
|
+
* no row for it. */
|
|
38
|
+
children(uuid: string): Promise<readonly CloudEntityRecord[]>;
|
|
39
|
+
/** The row the fold holds for `uuid`, or undefined for none. */
|
|
40
|
+
row(uuid: string): Promise<CloudEntityRecord | undefined>;
|
|
41
|
+
/** The row the fold holds for each of `uuids` it holds, read together. */
|
|
42
|
+
rows(uuids: readonly string[]): Promise<ReadonlyMap<string, CloudEntityRecord>>;
|
|
43
|
+
/** Where the fold holds `uuid`, or null when it holds no row for it. */
|
|
44
|
+
locate(uuid: string): Promise<AcceptedRecord | null>;
|
|
45
|
+
/** Every root's own row: the discovery set. Only a root's own result
|
|
46
|
+
* creates, changes or demotes it. */
|
|
47
|
+
rootRecords(): Promise<readonly CloudEntityRecord[]>;
|
|
48
|
+
/** Every root a result reaches: what a head through N must rebuild so it
|
|
49
|
+
* never names a watermark it has not applied. */
|
|
50
|
+
reached(): Promise<readonly string[]>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The accepted fold: a committed head H at watermark M with every change
|
|
3
|
+
* the authority accepted in (M, N] played on, read through Live's accepted view
|
|
4
|
+
* (accepted-view.ts), which answers what the one reducer holds a point at a
|
|
5
|
+
* time.
|
|
6
|
+
*
|
|
7
|
+
* H is paged per root, and nothing reads the whole account. A row, a
|
|
8
|
+
* listing or a subtree within a root reads only what it names; only `locate`
|
|
9
|
+
* and a whole root ask where H holds something. A whole root is read only
|
|
10
|
+
* when asked for: from H's pages when no result touches an identity H holds
|
|
11
|
+
* in it, since then it holds exactly H's rows, and otherwise as the view's
|
|
12
|
+
* subtree beneath it.
|
|
13
|
+
*/
|
|
14
|
+
import { AcceptedView, sortSteps, } from "@amalgm/live";
|
|
15
|
+
import { finishStepsInTurns } from "./turns.js";
|
|
16
|
+
const byUuid = (left, right) => left.uuid < right.uuid ? -1 : left.uuid > right.uuid ? 1 : 0;
|
|
17
|
+
export class AcceptedFold {
|
|
18
|
+
graph;
|
|
19
|
+
#view;
|
|
20
|
+
#heldRoots;
|
|
21
|
+
/** Every resulting identity that is or becomes a root. */
|
|
22
|
+
#statedRoots = new Set();
|
|
23
|
+
/** Every identity a result touched. */
|
|
24
|
+
#touched = new Set();
|
|
25
|
+
constructor(graph, sha256Hex) {
|
|
26
|
+
this.graph = graph;
|
|
27
|
+
this.#view = new AcceptedView(graph, sha256Hex);
|
|
28
|
+
this.#heldRoots = new Set(graph.rootIds());
|
|
29
|
+
}
|
|
30
|
+
/** The view of `results` over `graph`. Nothing folds: each question reads
|
|
31
|
+
* what it names. */
|
|
32
|
+
static async open(graph, changes, sha256Hex) {
|
|
33
|
+
const fold = new AcceptedFold(graph, sha256Hex);
|
|
34
|
+
await fold.advance(changes);
|
|
35
|
+
return fold;
|
|
36
|
+
}
|
|
37
|
+
/** Play the changes accepted next, in acceptance order, and say which
|
|
38
|
+
* identities they touch: every row whose answer they can move is among
|
|
39
|
+
* them. */
|
|
40
|
+
async advance(changes) {
|
|
41
|
+
for (const { result: { uuid, parentUUID } } of changes) {
|
|
42
|
+
if (parentUUID === null || this.#heldRoots.has(uuid))
|
|
43
|
+
this.#statedRoots.add(uuid);
|
|
44
|
+
}
|
|
45
|
+
const { touched } = await this.#view.advance(changes);
|
|
46
|
+
for (const uuid of touched)
|
|
47
|
+
this.#touched.add(uuid);
|
|
48
|
+
return touched;
|
|
49
|
+
}
|
|
50
|
+
/** One root's rows, in uuid order; empty when the fold holds no root by
|
|
51
|
+
* that id. Only this asks where H holds what a result touched. */
|
|
52
|
+
async root(rootId) {
|
|
53
|
+
const reached = new Set((await this.graph.rootsOf([...this.#touched])).values());
|
|
54
|
+
if (!reached.has(rootId) && !this.#touched.has(rootId))
|
|
55
|
+
return this.graph.recordsFor(rootId);
|
|
56
|
+
const own = await this.#view.row(rootId);
|
|
57
|
+
if (!own || own.parentUUID !== null)
|
|
58
|
+
return [];
|
|
59
|
+
return finishStepsInTurns(sortSteps(await this.subtree(rootId), byUuid));
|
|
60
|
+
}
|
|
61
|
+
/** The subtree `uuid` heads, `uuid` first, any status; empty when the fold
|
|
62
|
+
* holds no row for it. A root H holds is read whole first, so the walk
|
|
63
|
+
* beneath it answers from memory; a subtree within one reads only the pages
|
|
64
|
+
* that hold its containers' children. */
|
|
65
|
+
async subtree(uuid) {
|
|
66
|
+
if (this.#heldRoots.has(uuid))
|
|
67
|
+
await this.graph.recordsFor(uuid);
|
|
68
|
+
return this.#view.subtree(uuid);
|
|
69
|
+
}
|
|
70
|
+
/** The rows directly beneath `uuid`, any status; empty when the fold holds
|
|
71
|
+
* no row for it. */
|
|
72
|
+
children(uuid) {
|
|
73
|
+
return this.#view.children(uuid);
|
|
74
|
+
}
|
|
75
|
+
/** The row the fold holds for `uuid`, or undefined for none. */
|
|
76
|
+
row(uuid) {
|
|
77
|
+
return this.#view.row(uuid);
|
|
78
|
+
}
|
|
79
|
+
/** The row the fold holds for each of `uuids` it holds, read together. */
|
|
80
|
+
rows(uuids) {
|
|
81
|
+
return this.#view.rows(uuids);
|
|
82
|
+
}
|
|
83
|
+
/** Where the fold holds `uuid`, or null when it holds no row for it. */
|
|
84
|
+
locate(uuid) {
|
|
85
|
+
return this.#view.locate(uuid);
|
|
86
|
+
}
|
|
87
|
+
/** Every root's own row: the discovery set. Only a root's own result
|
|
88
|
+
* creates, changes or demotes it. */
|
|
89
|
+
async rootRecords() {
|
|
90
|
+
const roots = new Map((await this.graph.rootRecords()).map((record) => [record.uuid, record]));
|
|
91
|
+
const stated = await this.#view.rows([...this.#statedRoots]);
|
|
92
|
+
for (const uuid of this.#statedRoots) {
|
|
93
|
+
roots.delete(uuid);
|
|
94
|
+
const row = stated.get(uuid);
|
|
95
|
+
if (row?.parentUUID === null)
|
|
96
|
+
roots.set(uuid, row);
|
|
97
|
+
}
|
|
98
|
+
return [...roots.values()];
|
|
99
|
+
}
|
|
100
|
+
/** Every root a result reaches: what a head through N must rebuild so it
|
|
101
|
+
* never names a watermark it has not applied. */
|
|
102
|
+
reached() {
|
|
103
|
+
return this.#view.reached();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=accepted-fold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accepted-fold.js","sourceRoot":"","sources":["../src/accepted-fold.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,YAAY,EACZ,SAAS,GAKV,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAIhD,MAAM,MAAM,GAAG,CAAC,IAAuB,EAAE,KAAwB,EAAU,EAAE,CAC3E,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/D,MAAM,OAAO,YAAY;IAQM;IAPpB,KAAK,CAAe;IACpB,UAAU,CAAsB;IACzC,0DAA0D;IACjD,YAAY,GAAG,IAAI,GAAG,EAAU,CAAC;IAC1C,uCAAuC;IAC9B,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IAEtC,YAA6B,KAAoB,EAAE,SAAoB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AG,IAAI,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAU,CAAC,CAAC,CAAC;QACxG,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QAC7D,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACrC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACnB,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,GAAG,EAAE,UAAU,KAAK,IAAI;gBAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACrD,CAAC;QACD,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7B,CAAC;IAED;qDACiD;IACjD,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IAC9B,CAAC;CACF"}
|
package/dist/accepted-tail.d.ts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The accepted tail:
|
|
3
|
-
*
|
|
4
|
-
* delivery
|
|
2
|
+
* The accepted tail: every authority-accepted record delivered in (M, N], in
|
|
3
|
+
* acceptance order, read in one SQLite transaction together with this
|
|
4
|
+
* machine's delivery receipt and its history floor (graph-heads.ts). N is
|
|
5
|
+
* the receipt, or an earlier position the receipt has passed. The one
|
|
6
|
+
* reducer (AGENTS.md §3.4) plays the changes in that order, each changing
|
|
7
|
+
* only its facets (Live play.ts). A package creates each member of its
|
|
8
|
+
* subtree (package-pages.ts).
|
|
5
9
|
*
|
|
6
|
-
* The Inbox holds every authority record above the floor through the
|
|
7
|
-
* A tail may begin only at or above that floor: below it this
|
|
8
|
-
* received the records a
|
|
10
|
+
* The Inbox holds every authority record above the floor through the
|
|
11
|
+
* receipt. A tail may begin only at or above that floor: below it this
|
|
12
|
+
* machine never received the records a kept head covered, and an Inbox read there
|
|
9
13
|
* would silently omit accepted results. Such a read fails closed.
|
|
10
14
|
*/
|
|
11
15
|
import type Database from "better-sqlite3";
|
|
12
|
-
import { type CloudEntityRecord } from "@amalgm/live";
|
|
16
|
+
import { type AcceptedEntityRecord, type CloudEntityRecord, type PlayableChange } from "@amalgm/live";
|
|
13
17
|
export declare class AcceptedHistoryUnavailableError extends Error {
|
|
14
18
|
readonly after: number;
|
|
15
19
|
readonly floor: number;
|
|
@@ -18,9 +22,15 @@ export declare class AcceptedHistoryUnavailableError extends Error {
|
|
|
18
22
|
export interface AcceptedTail {
|
|
19
23
|
/** M: the base the tail folds onto. */
|
|
20
24
|
readonly after: number;
|
|
21
|
-
/** N: the
|
|
25
|
+
/** N: the position the tail runs through, never past the local gap-free
|
|
26
|
+
* authority cursor. */
|
|
22
27
|
readonly through: number;
|
|
28
|
+
/** Every accepted change in (after, through], in acceptance order. */
|
|
29
|
+
readonly accepted: readonly PlayableChange[];
|
|
30
|
+
/** The accepted record each change came from, aligned with `accepted`: a
|
|
31
|
+
* package's members each name the package. */
|
|
32
|
+
readonly origins: readonly AcceptedEntityRecord[];
|
|
23
33
|
/** The latest accepted result per entity in (after, through]. */
|
|
24
34
|
readonly results: readonly CloudEntityRecord[];
|
|
25
35
|
}
|
|
26
|
-
export declare function readAcceptedTail(database: Database.Database, authorityId: string, after: number): AcceptedTail;
|
|
36
|
+
export declare function readAcceptedTail(database: Database.Database, authorityId: string, after: number, until?: number): AcceptedTail;
|
package/dist/accepted-tail.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { decodeAcceptedEntityRecord } from "@amalgm/live";
|
|
1
|
+
import { decodeAcceptedEntityRecord, } from "@amalgm/live";
|
|
2
|
+
import { readDeliveryReceipt } from "./graph-heads.js";
|
|
3
|
+
import { statedResults } from "./package-pages.js";
|
|
2
4
|
export class AcceptedHistoryUnavailableError extends Error {
|
|
3
5
|
after;
|
|
4
6
|
floor;
|
|
@@ -9,29 +11,44 @@ export class AcceptedHistoryUnavailableError extends Error {
|
|
|
9
11
|
this.name = "AcceptedHistoryUnavailableError";
|
|
10
12
|
}
|
|
11
13
|
}
|
|
12
|
-
export function readAcceptedTail(database, authorityId, after) {
|
|
14
|
+
export function readAcceptedTail(database, authorityId, after, until) {
|
|
13
15
|
return database.transaction(() => {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
const receipt = readDeliveryReceipt(database, authorityId);
|
|
17
|
+
const received = receipt?.through ?? 0;
|
|
18
|
+
const through = until ?? received;
|
|
19
|
+
const floor = receipt?.floor ?? 0;
|
|
20
|
+
if (received < through)
|
|
21
|
+
throw new Error(`local delivery cursor ${received} has not reached ${through}`);
|
|
20
22
|
if (through < after) {
|
|
21
23
|
throw new Error("local delivery cursor is behind the active snapshot watermark");
|
|
22
24
|
}
|
|
23
25
|
if (floor > after)
|
|
24
26
|
throw new AcceptedHistoryUnavailableError(after, floor);
|
|
27
|
+
const accepted = [];
|
|
28
|
+
const origins = [];
|
|
25
29
|
const latest = new Map();
|
|
26
30
|
for (const { recordJson } of database.prepare(`
|
|
27
31
|
SELECT record_json AS recordJson FROM record_inbox
|
|
28
32
|
WHERE authority_id = ? AND delivery_sequence > ? AND delivery_sequence <= ?
|
|
29
33
|
ORDER BY delivery_sequence
|
|
30
34
|
`).iterate(authorityId, after, through)) {
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
// A package creates its whole subtree; every member is made here.
|
|
36
|
+
const record = decodeAcceptedEntityRecord(recordJson);
|
|
37
|
+
const { change } = record;
|
|
38
|
+
// Every other change plays as it was accepted, an echo's joins included.
|
|
39
|
+
if (change.replay.kind !== "package") {
|
|
40
|
+
accepted.push(change);
|
|
41
|
+
origins.push(record);
|
|
42
|
+
}
|
|
43
|
+
for (const result of statedResults(database, change)) {
|
|
44
|
+
if (change.replay.kind === "package") {
|
|
45
|
+
accepted.push({ facets: ["create"], result });
|
|
46
|
+
origins.push(record);
|
|
47
|
+
}
|
|
48
|
+
latest.set(result.uuid, result);
|
|
49
|
+
}
|
|
33
50
|
}
|
|
34
|
-
return { after, through, results: [...latest.values()] };
|
|
51
|
+
return { after, through, accepted, origins, results: [...latest.values()] };
|
|
35
52
|
})();
|
|
36
53
|
}
|
|
37
54
|
//# sourceMappingURL=accepted-tail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accepted-tail.js","sourceRoot":"","sources":["../src/accepted-tail.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accepted-tail.js","sourceRoot":"","sources":["../src/accepted-tail.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,0BAA0B,GAI3B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,OAAO,+BAAgC,SAAQ,KAAK;IACnC;IAAwB;IAA7C,YAAqB,KAAa,EAAW,KAAa;QACxD,KAAK,CAAC,mCAAmC,KAAK,qCAAqC,KAAK,EAAE,CAAC,CAAC;QADzE,UAAK,GAAL,KAAK,CAAQ;QAAW,UAAK,GAAL,KAAK,CAAQ;QAExD,IAAI,CAAC,IAAI,GAAG,iCAAiC,CAAC;IAChD,CAAC;CACF;AAiBD,MAAM,UAAU,gBAAgB,CAC9B,QAA2B,EAC3B,WAAmB,EACnB,KAAa,EACb,KAAc;IAEd,OAAO,QAAQ,CAAC,WAAW,CAAC,GAAiB,EAAE;QAC7C,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;QAC3D,MAAM,QAAQ,GAAG,OAAO,EAAE,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C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;oBAC9C,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACvB,CAAC;gBACD,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAClC,CAAC;QACH,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;IAC9E,CAAC,CAAC,EAAE,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The accepted view AV: what this machine knows the authority has accepted.
|
|
3
|
+
* It is the committed head H at its delivery watermark M, folded with every
|
|
4
|
+
* record accepted in (M, N] by Live's one reducer (accepted-fold.ts). Local
|
|
5
|
+
* work the authority has not accepted is never part of it.
|
|
6
|
+
*/
|
|
7
|
+
import type { Sha256Hex } from "@amalgm/live";
|
|
8
|
+
import { AcceptedFold } from "./accepted-fold.js";
|
|
9
|
+
import type { AcceptedTail } from "./accepted-tail.js";
|
|
10
|
+
import type { RegistryGraph } from "./registry-graph.js";
|
|
11
|
+
/** The committed head this machine last read from the authority. */
|
|
12
|
+
export interface CloudHead {
|
|
13
|
+
readonly resourceId: string;
|
|
14
|
+
readonly authorityEpoch: number;
|
|
15
|
+
readonly headVersion: number;
|
|
16
|
+
readonly checksum: string;
|
|
17
|
+
/** M: the complete authority prefix the head already contains. */
|
|
18
|
+
readonly deliveryWatermark: number;
|
|
19
|
+
readonly graph: RegistryGraph;
|
|
20
|
+
}
|
|
21
|
+
/** H ⊕ (M, N]: the head, the accepted tail after it, and their fold. */
|
|
22
|
+
export interface AcceptedView {
|
|
23
|
+
readonly head: CloudHead;
|
|
24
|
+
readonly tail: AcceptedTail;
|
|
25
|
+
readonly fold: AcceptedFold;
|
|
26
|
+
}
|
|
27
|
+
export declare function acceptedView(head: CloudHead, tail: AcceptedTail, sha256Hex: Sha256Hex): Promise<AcceptedView>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AcceptedFold } from "./accepted-fold.js";
|
|
2
|
+
export async function acceptedView(head, tail, sha256Hex) {
|
|
3
|
+
if (tail.after !== head.deliveryWatermark) {
|
|
4
|
+
throw new Error("accepted tail does not begin at the head's delivery watermark");
|
|
5
|
+
}
|
|
6
|
+
return { head, tail, fold: await AcceptedFold.open(head.graph, tail.accepted, sha256Hex) };
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=accepted-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accepted-view.js","sourceRoot":"","sources":["../src/accepted-view.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAsBlD,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,IAAe,EACf,IAAkB,EAClB,SAAoB;IAEpB,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,CAAC;AAC7F,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EntityApplyIntent } from "@amalgm/live";
|
|
2
|
+
/** One value per member of an Apply attempt. An attempt's values go whole when
|
|
3
|
+
* it ends, whichever members its window still names, so a member cut from the
|
|
4
|
+
* prefix leaves nothing behind. */
|
|
5
|
+
export declare class AttemptMemory<V> {
|
|
6
|
+
#private;
|
|
7
|
+
get(intent: EntityApplyIntent): V | undefined;
|
|
8
|
+
set(intent: EntityApplyIntent, value: V): void;
|
|
9
|
+
/** How many members of the attempt hold a value. */
|
|
10
|
+
count(attemptId: string): number;
|
|
11
|
+
delete(intent: EntityApplyIntent): void;
|
|
12
|
+
forget(attemptId: string): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** One value per member of an Apply attempt. An attempt's values go whole when
|
|
2
|
+
* it ends, whichever members its window still names, so a member cut from the
|
|
3
|
+
* prefix leaves nothing behind. */
|
|
4
|
+
export class AttemptMemory {
|
|
5
|
+
#attempts = new Map();
|
|
6
|
+
get(intent) {
|
|
7
|
+
return this.#attempts.get(intent.attemptId)?.get(intent.entityId);
|
|
8
|
+
}
|
|
9
|
+
set(intent, value) {
|
|
10
|
+
let members = this.#attempts.get(intent.attemptId);
|
|
11
|
+
if (!members)
|
|
12
|
+
this.#attempts.set(intent.attemptId, members = new Map());
|
|
13
|
+
members.set(intent.entityId, value);
|
|
14
|
+
}
|
|
15
|
+
/** How many members of the attempt hold a value. */
|
|
16
|
+
count(attemptId) {
|
|
17
|
+
return this.#attempts.get(attemptId)?.size ?? 0;
|
|
18
|
+
}
|
|
19
|
+
delete(intent) {
|
|
20
|
+
this.#attempts.get(intent.attemptId)?.delete(intent.entityId);
|
|
21
|
+
}
|
|
22
|
+
forget(attemptId) {
|
|
23
|
+
this.#attempts.delete(attemptId);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=apply-attempt-memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-attempt-memory.js","sourceRoot":"","sources":["../src/apply-attempt-memory.ts"],"names":[],"mappings":"AAEA;;mCAEmC;AACnC,MAAM,OAAO,aAAa;IACf,SAAS,GAAG,IAAI,GAAG,EAA0B,CAAC;IAEvD,GAAG,CAAC,MAAyB;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACpE,CAAC;IAED,GAAG,CAAC,MAAyB,EAAE,KAAQ;QACrC,IAAI,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACnD,IAAI,CAAC,OAAO;YAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC;QACxE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;IAED,oDAAoD;IACpD,KAAK,CAAC,SAAiB;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,IAAI,IAAI,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,MAAyB;QAC9B,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChE,CAAC;IAED,MAAM,CAAC,SAAiB;QACtB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;CACF"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/** One window's private ground: its control tree beneath each binding root
|
|
2
|
+
* it touches, and the bound root law that guards every read, write or
|
|
3
|
+
* removal inside that root.
|
|
4
|
+
*
|
|
5
|
+
* The tree lies in the root's reserved local directory, named by the
|
|
6
|
+
* window's attempt, so no two windows ever share one. Everything a window
|
|
7
|
+
* stages or sets aside lives there until the durability point removes the
|
|
8
|
+
* tree: a file or link result before its reveal, an Enter's sealed tree, the
|
|
9
|
+
* object a Leave takes from its address, a repository's Git part marker,
|
|
10
|
+
* and a former repository's Git storage. The tree is never ground:
|
|
11
|
+
* Detect does not look beneath the reserved directory.
|
|
12
|
+
*
|
|
13
|
+
* Bound root law: every address a receipt names lies in its binding root,
|
|
14
|
+
* so the root is judged before anything in it is read, written or deleted.
|
|
15
|
+
* - present: the bound object stands at its path, and Apply proceeds;
|
|
16
|
+
* - unavailable: nothing stands there, a non-directory does, a directory
|
|
17
|
+
* on another device does (an unmounted volume), or this process cannot
|
|
18
|
+
* see what does. The root may return as it was, so the window holds its
|
|
19
|
+
* line, and nothing beneath the path is touched meanwhile;
|
|
20
|
+
* - replaced: another directory on the same device stands there. What the
|
|
21
|
+
* window held left with the old object: its members stay owed, and
|
|
22
|
+
* nothing beneath the new root is touched, not even the control tree. */
|
|
23
|
+
import { type BigIntStats } from "node:fs";
|
|
24
|
+
import type { GitLine } from "./materialized-graph.js";
|
|
25
|
+
/** A binding root as a receipt names it: its path and exact object. */
|
|
26
|
+
export interface BoundRoot {
|
|
27
|
+
readonly path: string;
|
|
28
|
+
/** Exact physical key `device:inode:birth`. */
|
|
29
|
+
readonly physicalKey: string;
|
|
30
|
+
}
|
|
31
|
+
/** The window's control tree beneath `root`; null for a name that is no
|
|
32
|
+
* attempt (a name read from ground becomes a path only in this grammar). */
|
|
33
|
+
export declare const windowControl: (root: string, attemptId: string) => string | null;
|
|
34
|
+
/** The binding root whose control tree holds `control`, or any path beneath
|
|
35
|
+
* that tree: the parent of the reserved local directory on the way up. */
|
|
36
|
+
export declare function applyControlRoot(control: string): string;
|
|
37
|
+
/** Creates `directory` (the control tree by default) privately beneath the
|
|
38
|
+
* binding root that already stands, never the root itself: a vanished root
|
|
39
|
+
* stays vanished. */
|
|
40
|
+
export declare const ensureApplyPrivate: (control: string, directory?: string) => void;
|
|
41
|
+
/** Where one member's result is staged before its reveal. */
|
|
42
|
+
export declare const stagedPath: (control: string, entityId: string) => string;
|
|
43
|
+
/** Where the object a member replaces or removes is set aside. */
|
|
44
|
+
export declare const displacedPath: (control: string, entityId: string) => string;
|
|
45
|
+
/** A repository reveal's Git part marker: absent before the part begins,
|
|
46
|
+
* `started`, durably, before Git writes anything, and `ended` once Git's own
|
|
47
|
+
* read proved the result (apply-window-recovery.ts). A record played onto a
|
|
48
|
+
* line it was not made from (src/git/rail.ts) ends as `ended <state>
|
|
49
|
+
* <package> <line>`: the state the repository shows, the package that
|
|
50
|
+
* carries it, and the line after the record, each sealed in the cache before
|
|
51
|
+
* the marker names it. */
|
|
52
|
+
export declare const gitPartPath: (control: string, entityId: string) => string;
|
|
53
|
+
export type GitPart = "started" | "ended";
|
|
54
|
+
/** What a played repository shows, and the line it keeps. */
|
|
55
|
+
export interface GitPartEnd {
|
|
56
|
+
readonly state: string;
|
|
57
|
+
readonly package: string;
|
|
58
|
+
readonly line: GitLine;
|
|
59
|
+
}
|
|
60
|
+
/** A checkout file the line holds otherwise than the record did
|
|
61
|
+
* (src/git/play.ts `gitJoinedFiles`): its path in the repository, the hash
|
|
62
|
+
* of the record's bytes and of the joined bytes, and their length. The
|
|
63
|
+
* reveal seals the joined bytes in the cache before the marker names them,
|
|
64
|
+
* so its sender's echo can state them (apply-window-saves.ts). */
|
|
65
|
+
export interface GitJoinedHead {
|
|
66
|
+
readonly path: string;
|
|
67
|
+
readonly record: string;
|
|
68
|
+
readonly joined: string;
|
|
69
|
+
readonly size: number;
|
|
70
|
+
}
|
|
71
|
+
/** The member's Git part; anything but `ended` is a `started` a crash tore. */
|
|
72
|
+
export declare function readGitPart(control: string, entityId: string): GitPart | null;
|
|
73
|
+
/** What an ended Git part shows and keeps in place of its target's; null
|
|
74
|
+
* for the target's own. */
|
|
75
|
+
export declare function gitPartEnd(control: string, entityId: string): GitPartEnd | null;
|
|
76
|
+
/** The checkout files an ended Git part joined. */
|
|
77
|
+
export declare const gitPartJoined: (control: string, entityId: string) => readonly GitJoinedHead[];
|
|
78
|
+
export declare const gitPartEnded: (end: GitPartEnd | null, joined?: readonly GitJoinedHead[]) => string;
|
|
79
|
+
/** A former repository's displaced Git storage (src/apply-git-storage.ts). */
|
|
80
|
+
export declare const displacedGitPath: (control: string, entityId: string) => string;
|
|
81
|
+
export type BoundRootGround = "present" | "unavailable" | "replaced";
|
|
82
|
+
/** The judgment from one lstat of the root's path (null: nothing seen there), for
|
|
83
|
+
* a reader that already holds it. */
|
|
84
|
+
export declare function judgeRootStat(ground: BigIntStats | null, physical: string): BoundRootGround;
|
|
85
|
+
export declare const judgeBoundRoot: (root: BoundRoot) => BoundRootGround;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/** One window's private ground: its control tree beneath each binding root
|
|
2
|
+
* it touches, and the bound root law that guards every read, write or
|
|
3
|
+
* removal inside that root.
|
|
4
|
+
*
|
|
5
|
+
* The tree lies in the root's reserved local directory, named by the
|
|
6
|
+
* window's attempt, so no two windows ever share one. Everything a window
|
|
7
|
+
* stages or sets aside lives there until the durability point removes the
|
|
8
|
+
* tree: a file or link result before its reveal, an Enter's sealed tree, the
|
|
9
|
+
* object a Leave takes from its address, a repository's Git part marker,
|
|
10
|
+
* and a former repository's Git storage. The tree is never ground:
|
|
11
|
+
* Detect does not look beneath the reserved directory.
|
|
12
|
+
*
|
|
13
|
+
* Bound root law: every address a receipt names lies in its binding root,
|
|
14
|
+
* so the root is judged before anything in it is read, written or deleted.
|
|
15
|
+
* - present: the bound object stands at its path, and Apply proceeds;
|
|
16
|
+
* - unavailable: nothing stands there, a non-directory does, a directory
|
|
17
|
+
* on another device does (an unmounted volume), or this process cannot
|
|
18
|
+
* see what does. The root may return as it was, so the window holds its
|
|
19
|
+
* line, and nothing beneath the path is touched meanwhile;
|
|
20
|
+
* - replaced: another directory on the same device stands there. What the
|
|
21
|
+
* window held left with the old object: its members stay owed, and
|
|
22
|
+
* nothing beneath the new root is touched, not even the control tree. */
|
|
23
|
+
import { lstatSync, readFileSync } from "node:fs";
|
|
24
|
+
import { basename, dirname, join } from "node:path";
|
|
25
|
+
import { LOCAL_DIR_NAME } from "@amalgm/core/identity";
|
|
26
|
+
import { UUID_PATTERN } from "@amalgm/live";
|
|
27
|
+
import { ensureDirBeneath } from "./filesystem.js";
|
|
28
|
+
import { denied } from "./detection/unreadable.js";
|
|
29
|
+
import { onBoundDevice, physicalKey } from "./source-signature.js";
|
|
30
|
+
/** The window's control tree beneath `root`; null for a name that is no
|
|
31
|
+
* attempt (a name read from ground becomes a path only in this grammar). */
|
|
32
|
+
export const windowControl = (root, attemptId) => UUID_PATTERN.test(attemptId) ? join(root, LOCAL_DIR_NAME, "apply", attemptId) : null;
|
|
33
|
+
/** The binding root whose control tree holds `control`, or any path beneath
|
|
34
|
+
* that tree: the parent of the reserved local directory on the way up. */
|
|
35
|
+
export function applyControlRoot(control) {
|
|
36
|
+
for (let at = control;;) {
|
|
37
|
+
const parent = dirname(at);
|
|
38
|
+
if (basename(at) === LOCAL_DIR_NAME)
|
|
39
|
+
return parent;
|
|
40
|
+
if (parent === at)
|
|
41
|
+
throw new Error(`${control} lies in no Apply control tree`);
|
|
42
|
+
at = parent;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/** Creates `directory` (the control tree by default) privately beneath the
|
|
46
|
+
* binding root that already stands, never the root itself: a vanished root
|
|
47
|
+
* stays vanished. */
|
|
48
|
+
export const ensureApplyPrivate = (control, directory = control) => ensureDirBeneath(applyControlRoot(control), directory, 0o700);
|
|
49
|
+
/** Where one member's result is staged before its reveal. */
|
|
50
|
+
export const stagedPath = (control, entityId) => join(control, "staged", entityId);
|
|
51
|
+
/** Where the object a member replaces or removes is set aside. */
|
|
52
|
+
export const displacedPath = (control, entityId) => join(control, "displaced", entityId);
|
|
53
|
+
/** A repository reveal's Git part marker: absent before the part begins,
|
|
54
|
+
* `started`, durably, before Git writes anything, and `ended` once Git's own
|
|
55
|
+
* read proved the result (apply-window-recovery.ts). A record played onto a
|
|
56
|
+
* line it was not made from (src/git/rail.ts) ends as `ended <state>
|
|
57
|
+
* <package> <line>`: the state the repository shows, the package that
|
|
58
|
+
* carries it, and the line after the record, each sealed in the cache before
|
|
59
|
+
* the marker names it. */
|
|
60
|
+
export const gitPartPath = (control, entityId) => join(control, "git", entityId);
|
|
61
|
+
const ENDED = /^ended(?: ([0-9a-f]{64}) ([0-9a-f]{64}) ([0-9a-f]{64}) ([0-9a-f]{64}))?$/;
|
|
62
|
+
/** An ended marker's two lines: what the part shows and keeps, then the
|
|
63
|
+
* joined files as JSON when there are any. Anything else, a torn write
|
|
64
|
+
* included, is a `started` a crash tore. */
|
|
65
|
+
function parseEnded(marker) {
|
|
66
|
+
if (marker === null)
|
|
67
|
+
return null;
|
|
68
|
+
const [first, rest] = [marker.split("\n", 1)[0], marker.slice(marker.indexOf("\n") + 1)];
|
|
69
|
+
const end = ENDED.exec(first);
|
|
70
|
+
if (end === null)
|
|
71
|
+
return null;
|
|
72
|
+
if (first === marker)
|
|
73
|
+
return { end, joined: [] };
|
|
74
|
+
try {
|
|
75
|
+
return { end, joined: JSON.parse(rest) };
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function readMarker(control, entityId) {
|
|
82
|
+
try {
|
|
83
|
+
return readFileSync(gitPartPath(control, entityId), "utf8");
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
if (["ENOENT", "ENOTDIR"].includes(error.code ?? ""))
|
|
87
|
+
return null;
|
|
88
|
+
throw error;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/** The member's Git part; anything but `ended` is a `started` a crash tore. */
|
|
92
|
+
export function readGitPart(control, entityId) {
|
|
93
|
+
const marker = readMarker(control, entityId);
|
|
94
|
+
return marker === null ? null : parseEnded(marker) !== null ? "ended" : "started";
|
|
95
|
+
}
|
|
96
|
+
/** What an ended Git part shows and keeps in place of its target's; null
|
|
97
|
+
* for the target's own. */
|
|
98
|
+
export function gitPartEnd(control, entityId) {
|
|
99
|
+
const found = parseEnded(readMarker(control, entityId))?.end;
|
|
100
|
+
return found?.[1] ? { state: found[1], package: found[2], line: { package: found[3], state: found[4] } } : null;
|
|
101
|
+
}
|
|
102
|
+
/** The checkout files an ended Git part joined. */
|
|
103
|
+
export const gitPartJoined = (control, entityId) => parseEnded(readMarker(control, entityId))?.joined ?? [];
|
|
104
|
+
export const gitPartEnded = (end, joined = []) => (end === null ? "ended" : `ended ${end.state} ${end.package} ${end.line.package} ${end.line.state}`)
|
|
105
|
+
+ (joined.length === 0 ? "" : `\n${JSON.stringify(joined)}`);
|
|
106
|
+
/** A former repository's displaced Git storage (src/apply-git-storage.ts). */
|
|
107
|
+
export const displacedGitPath = (control, entityId) => join(control, "displaced-git", entityId);
|
|
108
|
+
function stand(path) {
|
|
109
|
+
try {
|
|
110
|
+
return lstatSync(path, { bigint: true });
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
const code = error.code;
|
|
114
|
+
// Missing, obstructed or hidden: nothing this process can see stands there.
|
|
115
|
+
if (code === "ENOENT" || code === "ENOTDIR" || denied(error))
|
|
116
|
+
return null;
|
|
117
|
+
throw error;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/** The judgment from one lstat of the root's path (null: nothing seen there), for
|
|
121
|
+
* a reader that already holds it. */
|
|
122
|
+
export function judgeRootStat(ground, physical) {
|
|
123
|
+
if (!ground?.isDirectory())
|
|
124
|
+
return "unavailable";
|
|
125
|
+
const standing = physicalKey(ground);
|
|
126
|
+
if (standing === physical)
|
|
127
|
+
return "present";
|
|
128
|
+
return onBoundDevice(physical, ground) ? "replaced" : "unavailable";
|
|
129
|
+
}
|
|
130
|
+
export const judgeBoundRoot = (root) => judgeRootStat(stand(root.path), root.physicalKey);
|
|
131
|
+
//# sourceMappingURL=apply-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-control.js","sourceRoot":"","sources":["../src/apply-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;2EAqB2E;AAC3E,OAAO,EAAE,SAAS,EAAE,YAAY,EAAoB,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,M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