@amalgm/shell 0.1.164-preview.41762776698 → 0.1.164-preview.44386772850
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/billing/cli.d.ts +18 -0
- package/dist/billing/cli.js +276 -0
- package/dist/billing/cli.js.map +1 -0
- package/dist/billing/mount.d.ts +12 -0
- package/dist/billing/mount.js +34 -0
- package/dist/billing/mount.js.map +1 -0
- package/dist/billing/tools.d.ts +57 -0
- package/dist/billing/tools.js +141 -0
- package/dist/billing/tools.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 +129 -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 +4 -0
- package/dist/installation/environment.js +13 -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 +344 -179
- 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
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/** Live's showing law (judgeShowing) over this computer's tables. A place is
|
|
2
|
+
* shown when O holds an active row for it, beneath active rows up to its
|
|
3
|
+
* root. O holds only ground this computer shows, so its rows are the whole
|
|
4
|
+
* answer: a hidden entity has none, and one beneath a folder in Trash shows
|
|
5
|
+
* nothing, so a late result for it resolves where it sits. A row is
|
|
6
|
+
* a root when it is its own root_uuid: its binding places it, even when Add
|
|
7
|
+
* kept the cloud parentUUID of a selected nested folder or repository. A
|
|
8
|
+
* construct has no ground: it was shown when the construct ledger holds it
|
|
9
|
+
* active (construct-ledger.ts).
|
|
10
|
+
*
|
|
11
|
+
* A root the drive serves is on demand (src/drive/): what O holds beneath it
|
|
12
|
+
* was placed and keeps applying, and a result that would enter is listed
|
|
13
|
+
* until a fetch lane places its unit (Live lane.ts), unless the home places
|
|
14
|
+
* it as login does (Live placedAtHome): the runtime's own entries whole, the
|
|
15
|
+
* projects and computers folders bare. The place a lane enters, its unit or the outermost
|
|
16
|
+
* plain folder missing above it (apply-window-lane.ts), enters as it would
|
|
17
|
+
* anywhere (enteredPlace).
|
|
18
|
+
*
|
|
19
|
+
* The line reader, the settle save and the unbound guard all judge
|
|
20
|
+
* through this one reading, so a save or a guard judges exactly what the
|
|
21
|
+
* read judged, against the tables as they stand then. One judge reads each
|
|
22
|
+
* place at most once, and the line's window reads its places through the
|
|
23
|
+
* same reading (Live window.ts, Independence).
|
|
24
|
+
*
|
|
25
|
+
* A judgment is a function of the places it read, so it stands exactly
|
|
26
|
+
* while each still reads the same. A head settled with no effect commits
|
|
27
|
+
* nothing a window shows, so its end re-reads those places in the end's own
|
|
28
|
+
* transaction (apply-window-saves.ts): a parent another track placed since,
|
|
29
|
+
* or took away, makes the settlement stale, and the line judges it again. */
|
|
30
|
+
import { canonicalVersion, decodeAcceptedEntityRecord, isConstructType, judgeLineHead, judgeShowing, lineReturns, playChange } from "@amalgm/live";
|
|
31
|
+
import { localWorkAfter } from "./apply-local-work.js";
|
|
32
|
+
import { admittedVersion, outboxRow, playedLine } from "./apply-window-rows.js";
|
|
33
|
+
import { sha256Hex } from "./sha256.js";
|
|
34
|
+
import { lineLoops } from "./line-loops.js";
|
|
35
|
+
import { cachedStatement } from "./sqlite.js";
|
|
36
|
+
/** O's active row for one place. */
|
|
37
|
+
function readActiveRow(database, uuid) {
|
|
38
|
+
const row = cachedStatement(database, `SELECT parent_uuid AS parentUUID, name, type, uuid = root_uuid AS root
|
|
39
|
+
FROM entities WHERE uuid = ? AND status = 'active' LIMIT 1`).get(uuid);
|
|
40
|
+
return row ? { parentUUID: row.parentUUID, name: row.name, type: row.type, root: row.root === 1 } : null;
|
|
41
|
+
}
|
|
42
|
+
/** O's row for one place while it shows: active, with every row above it
|
|
43
|
+
* active up to its root. Trash changes only the topmost status, so a row
|
|
44
|
+
* beneath a trashed or deleted folder stays active and shows nothing, as
|
|
45
|
+
* Detect reads it (ground-row.ts effectivelyActive). `known` keeps each
|
|
46
|
+
* place a walk read, so one judge reads each place once. */
|
|
47
|
+
export function readShownRow(database, uuid, known = new Map()) {
|
|
48
|
+
const walked = new Map();
|
|
49
|
+
let shows = false;
|
|
50
|
+
for (let at = uuid; at !== null && !walked.has(at);) {
|
|
51
|
+
const remembered = known.get(at);
|
|
52
|
+
if (remembered !== undefined) {
|
|
53
|
+
shows = remembered !== null;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
const row = readActiveRow(database, at);
|
|
57
|
+
if (!row)
|
|
58
|
+
break;
|
|
59
|
+
walked.set(at, row);
|
|
60
|
+
if (row.root) {
|
|
61
|
+
shows = true;
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
at = row.parentUUID;
|
|
65
|
+
}
|
|
66
|
+
for (const [at, row] of walked)
|
|
67
|
+
known.set(at, shows ? row : null);
|
|
68
|
+
return known.get(uuid) ?? null;
|
|
69
|
+
}
|
|
70
|
+
/** The reference this computer shows that leads to `rootUUID`, the first by
|
|
71
|
+
* UUID, or null. A shown reference's accepted result is B's too, and B keys
|
|
72
|
+
* references by their target; O says which one shows. */
|
|
73
|
+
export function shownReferenceTo(database, rootUUID) {
|
|
74
|
+
return cachedStatement(database, `SELECT shown.uuid FROM detection_notebook AS kept
|
|
75
|
+
JOIN entities AS shown ON shown.uuid = kept.uuid
|
|
76
|
+
WHERE kept.payload_version = ? AND kept.type = 'reference'
|
|
77
|
+
AND shown.type = 'reference' AND shown.status = 'active' AND shown.payload_version = ?
|
|
78
|
+
ORDER BY shown.uuid LIMIT 1`).pluck().get(rootUUID, rootUUID) ?? null;
|
|
79
|
+
}
|
|
80
|
+
/** The first place of `places` that no longer reads as a judgment read it,
|
|
81
|
+
* or null while all stand. */
|
|
82
|
+
export function movedPlace(database, places) {
|
|
83
|
+
const known = new Map();
|
|
84
|
+
for (const { uuid, row } of places) {
|
|
85
|
+
const now = readShownRow(database, uuid, known);
|
|
86
|
+
const same = now === null || row === null ? now === row : now.parentUUID === row.parentUUID && now.name === row.name
|
|
87
|
+
&& now.type === row.type && now.root === row.root;
|
|
88
|
+
if (!same)
|
|
89
|
+
return uuid;
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
/** How the line judges `target`, an entity's newest row delivered within
|
|
94
|
+
* `through`, where it sits now (Live settling.ts): the one reading the line
|
|
95
|
+
* and every fetch lane share. */
|
|
96
|
+
export function judgeHead(database, authorityId, entityId, target, through, shown) {
|
|
97
|
+
let places = [];
|
|
98
|
+
let played;
|
|
99
|
+
let before;
|
|
100
|
+
const line = () => (before ??= { row: playedLine(database, authorityId, entityId, target.globalSequence - 1) }).row;
|
|
101
|
+
const result = () => played ??= playedResult(database, authorityId, entityId, target, line());
|
|
102
|
+
const judgment = judgeLineHead(target, {
|
|
103
|
+
lineBefore: () => lineBefore(database, authorityId, target, line()),
|
|
104
|
+
localWorkAfter: () => localWorkAfter(database, authorityId, entityId, through),
|
|
105
|
+
outboxRow: () => outboxRow(database, target.mutationId),
|
|
106
|
+
admittedVersion: () => admittedVersion(database, entityId),
|
|
107
|
+
playedVersion: () => result().version,
|
|
108
|
+
showing: () => {
|
|
109
|
+
const read = shown.judgeReading(result());
|
|
110
|
+
places = read.places;
|
|
111
|
+
return read.judgment;
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
return { judgment, places, result: result() };
|
|
115
|
+
}
|
|
116
|
+
/** The version of `target`'s line just before it, as this computer plays
|
|
117
|
+
* it. For any type but a repository that is the entity's line row. A
|
|
118
|
+
* repository's Git line can stand where no record does: a record played
|
|
119
|
+
* onto a line its sender had not seen leaves a state of its own
|
|
120
|
+
* (src/git/rail.ts), which only its sender's echo names. So the line starts
|
|
121
|
+
* from the Git line this computer keeps and walks the records since: one
|
|
122
|
+
* made on the line becomes the line, an echo of the row it joins states it,
|
|
123
|
+
* and any other leaves a line no record names yet (undefined), on which no
|
|
124
|
+
* own record settles. */
|
|
125
|
+
function lineBefore(database, authorityId, target, row) {
|
|
126
|
+
if (row?.type !== "repo.git")
|
|
127
|
+
return row?.version ?? null;
|
|
128
|
+
const kept = cachedStatement(database, "SELECT state_id AS state, through FROM git_lines WHERE entity_id = ?")
|
|
129
|
+
.get(target.entityId);
|
|
130
|
+
if (kept === undefined || kept.through >= target.globalSequence)
|
|
131
|
+
return row.version;
|
|
132
|
+
let stands = playedLine(database, authorityId, target.entityId, kept.through);
|
|
133
|
+
if (stands === null)
|
|
134
|
+
return row.version;
|
|
135
|
+
let line = stands.payloadVersion === kept.state ? stands.version
|
|
136
|
+
: canonicalVersion({ ...stands, payloadVersion: kept.state }, sha256Hex);
|
|
137
|
+
const since = cachedStatement(database, `SELECT record_json FROM record_inbox
|
|
138
|
+
WHERE authority_id = ? AND entity_id = ? AND global_sequence > ? AND global_sequence < ?
|
|
139
|
+
ORDER BY global_sequence`).pluck().all(authorityId, target.entityId, kept.through, target.globalSequence);
|
|
140
|
+
for (const json of since) {
|
|
141
|
+
const record = decodeAcceptedEntityRecord(json);
|
|
142
|
+
const { change } = record;
|
|
143
|
+
if (change.joins === undefined)
|
|
144
|
+
line = line !== undefined && change.basedOnState === line ? change.result.version : undefined;
|
|
145
|
+
else if (change.joins === stands?.version)
|
|
146
|
+
line = change.result.version;
|
|
147
|
+
stands = playChange(stands, change, sha256Hex, lineLoops(database, record)).row;
|
|
148
|
+
}
|
|
149
|
+
return line;
|
|
150
|
+
}
|
|
151
|
+
/** The place a member's judgment enters: a lane member that enters is its
|
|
152
|
+
* lane's entry, its unit or the outermost plain folder missing above it; any
|
|
153
|
+
* other lane member judges as its unit; a line member enters nothing listed. */
|
|
154
|
+
export const enteredPlace = (intent) => intent.unit !== null && intent.play === "enter" ? intent.entityId : intent.unit;
|
|
155
|
+
/** A computer that shows every root whole. */
|
|
156
|
+
export const NOTHING_ON_DEMAND = { root: () => false, home: () => false };
|
|
157
|
+
export class ShownGround {
|
|
158
|
+
#database;
|
|
159
|
+
#onDemand;
|
|
160
|
+
#unit;
|
|
161
|
+
#lineParent;
|
|
162
|
+
#places = new Map();
|
|
163
|
+
#rows = new Map();
|
|
164
|
+
/** The places the judgment being read has read, while one is. */
|
|
165
|
+
#reading = null;
|
|
166
|
+
/** `unit` is the place a fetch lane enters (enteredPlace), null on a line;
|
|
167
|
+
* `lineParent` is where the judged line holds an entity this computer's
|
|
168
|
+
* own move would put in a loop (LineJudge.withLineParents). */
|
|
169
|
+
constructor(database, onDemand, unit = null, lineParent) {
|
|
170
|
+
this.#database = database;
|
|
171
|
+
this.#onDemand = onDemand;
|
|
172
|
+
this.#unit = unit;
|
|
173
|
+
this.#lineParent = lineParent;
|
|
174
|
+
}
|
|
175
|
+
judge(result) {
|
|
176
|
+
if (isConstructType(result.type))
|
|
177
|
+
return judgeShowing(result, uuid => this.#construct(uuid));
|
|
178
|
+
const judged = judgeShowing(result, uuid => this.place(uuid), this.#lineParent);
|
|
179
|
+
return judged === "listed" && result.uuid === this.#unit ? "enter" : judged;
|
|
180
|
+
}
|
|
181
|
+
/** The entities this computer moves back to their line parent before
|
|
182
|
+
* `result` stands (Live `lineReturns`), each to its line parent. */
|
|
183
|
+
returns(result) {
|
|
184
|
+
return this.#lineParent ? lineReturns(result, uuid => this.place(uuid), this.#lineParent) : new Map();
|
|
185
|
+
}
|
|
186
|
+
/** `judge`, with every place it read. */
|
|
187
|
+
judgeReading(result) {
|
|
188
|
+
const reading = new Map();
|
|
189
|
+
this.#reading = reading;
|
|
190
|
+
try {
|
|
191
|
+
return { judgment: this.judge(result), places: [...reading.values()] };
|
|
192
|
+
}
|
|
193
|
+
finally {
|
|
194
|
+
this.#reading = null;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/** Whether the root a result shows beneath places on demand. */
|
|
198
|
+
beneathOnDemand(result) {
|
|
199
|
+
const seen = new Set();
|
|
200
|
+
for (let uuid = result.uuid; uuid !== null && !seen.has(uuid);) {
|
|
201
|
+
seen.add(uuid);
|
|
202
|
+
const place = this.place(uuid);
|
|
203
|
+
if (place?.root)
|
|
204
|
+
return place.onDemand;
|
|
205
|
+
uuid = uuid === result.uuid ? result.parentUUID : place?.parentUUID ?? null;
|
|
206
|
+
}
|
|
207
|
+
return false;
|
|
208
|
+
}
|
|
209
|
+
#construct(uuid) {
|
|
210
|
+
const row = cachedStatement(this.#database, `SELECT type, name FROM constructs
|
|
211
|
+
WHERE uuid = ? AND status = 'active'`).get(uuid);
|
|
212
|
+
return row && { parentUUID: null, ...row, root: true, available: true, onDemand: false, home: false };
|
|
213
|
+
}
|
|
214
|
+
/** O's row for one place while it shows, read once per judge. */
|
|
215
|
+
place(uuid) {
|
|
216
|
+
let place = this.#places.get(uuid);
|
|
217
|
+
if (place === undefined) {
|
|
218
|
+
const row = readShownRow(this.#database, uuid, this.#rows);
|
|
219
|
+
// A missing root holds the line until it returns (the guard's root
|
|
220
|
+
// check), so every O root is available to the judgment.
|
|
221
|
+
place = row ? { ...row, available: true, onDemand: row.root && this.#onDemand.root(uuid),
|
|
222
|
+
home: row.root && this.#onDemand.home(uuid) } : null;
|
|
223
|
+
this.#places.set(uuid, place);
|
|
224
|
+
}
|
|
225
|
+
this.#reading?.set(uuid, { uuid, row: place && { parentUUID: place.parentUUID, name: place.name, type: place.type,
|
|
226
|
+
root: place.root } });
|
|
227
|
+
return place ?? undefined;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/** What `target` leaves on its entity's line: the line where it last stood,
|
|
231
|
+
* with every record after it through `target` played on (Live selection.ts).
|
|
232
|
+
* The showing law judges where that sits, and settling compares its version. */
|
|
233
|
+
export function playedResult(database, authorityId, entityId, target, stands = playedLine(database, authorityId, entityId, target.globalSequence - 1)) {
|
|
234
|
+
return playChange(stands, target.change, sha256Hex, lineLoops(database, target)).row ?? target.change.result;
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=apply-showing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-showing.js","sourceRoot":"","sources":["../src/apply-showing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EA4B6E;AAC7E,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAEhE,MAAM,cAAc,CAAC;AAEjF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,wB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roundWriter } from "./ground-store.js";
|
|
4
|
+
/** Every row of an entity after `after` is owed again. */
|
|
5
|
+
export declare const oweAfter: (database: Database.Database, authorityId: string, entityId: string, after: number) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Each entity in `entities` that now shows here, and each entity whose
|
|
8
|
+
* result lies directly in a container in `containers` that now shows here,
|
|
9
|
+
* whose newest row arrived after `after`, resolved, and is neither
|
|
10
|
+
* materialized here nor what this computer's notebook admits, is owed again
|
|
11
|
+
* from that row: under whole-result LWW the newest result is the one to
|
|
12
|
+
* show. A first child that arrived while its parent was absent returns this
|
|
13
|
+
* way; when the line Enters it in turn, its own end owes its children, so
|
|
14
|
+
* every generation returns. `placed` names what the caller itself just
|
|
15
|
+
* placed. The containers lead each index seek (CROSS JOIN fixes the order),
|
|
16
|
+
* and INDEXED BY refuses any plan that scans the Inbox.
|
|
17
|
+
*/
|
|
18
|
+
export declare function oweShownAgain(database: Database.Database, input: {
|
|
19
|
+
readonly entities: ReadonlySet<string>;
|
|
20
|
+
readonly containers: ReadonlySet<string>;
|
|
21
|
+
readonly authorityIds: readonly string[];
|
|
22
|
+
readonly after: number;
|
|
23
|
+
readonly placed?: ReadonlySet<string>;
|
|
24
|
+
}): void;
|
|
25
|
+
/** Detect's side, inside its write once its rows are final: every row now
|
|
26
|
+
* showing beneath each top it revealed, and each row of `shown` O did not
|
|
27
|
+
* show before, owes again on every authority this computer follows. */
|
|
28
|
+
export declare function oweRevealedAgain(database: Database.Database, writer: GroundWriter, tops: Iterable<string>, shown?: readonly GroundRow[]): void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/** Ground that starts showing here voids each settlement that judged it
|
|
2
|
+
* unshown (apply-showing.ts): a settlement stands only while the places it
|
|
3
|
+
* read read the same. Apply's Enter, Detect's reveal, and Detect's admission
|
|
4
|
+
* of a row O did not show each owe those settlements again in their own
|
|
5
|
+
* commit, so the line plays them where they now show. */
|
|
6
|
+
import { CONTAINERS } from "@amalgm/live";
|
|
7
|
+
import { admittedVersion } from "./apply-window-rows.js";
|
|
8
|
+
import { groundStore } from "./ground-store.js";
|
|
9
|
+
import { cachedStatement } from "./sqlite.js";
|
|
10
|
+
/** Every row of an entity after `after` is owed again. */
|
|
11
|
+
export const oweAfter = (database, authorityId, entityId, after) => {
|
|
12
|
+
cachedStatement(database, `UPDATE record_inbox SET resolved_at = NULL
|
|
13
|
+
WHERE authority_id = ? AND entity_id = ? AND global_sequence > ? AND resolved_at IS NOT NULL`)
|
|
14
|
+
.run(authorityId, entityId, after);
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Each entity in `entities` that now shows here, and each entity whose
|
|
18
|
+
* result lies directly in a container in `containers` that now shows here,
|
|
19
|
+
* whose newest row arrived after `after`, resolved, and is neither
|
|
20
|
+
* materialized here nor what this computer's notebook admits, is owed again
|
|
21
|
+
* from that row: under whole-result LWW the newest result is the one to
|
|
22
|
+
* show. A first child that arrived while its parent was absent returns this
|
|
23
|
+
* way; when the line Enters it in turn, its own end owes its children, so
|
|
24
|
+
* every generation returns. `placed` names what the caller itself just
|
|
25
|
+
* placed. The containers lead each index seek (CROSS JOIN fixes the order),
|
|
26
|
+
* and INDEXED BY refuses any plan that scans the Inbox.
|
|
27
|
+
*/
|
|
28
|
+
export function oweShownAgain(database, input) {
|
|
29
|
+
const { entities, containers, after, placed } = input;
|
|
30
|
+
if (entities.size === 0 && (containers.size === 0 || input.authorityIds.length === 0))
|
|
31
|
+
return;
|
|
32
|
+
const rows = cachedStatement(database, `WITH candidate(entity_id) AS (
|
|
33
|
+
SELECT value FROM json_each(?)
|
|
34
|
+
UNION
|
|
35
|
+
SELECT r.entity_id FROM json_each(?) AS parent
|
|
36
|
+
CROSS JOIN json_each(?) AS authority
|
|
37
|
+
CROSS JOIN record_inbox r INDEXED BY record_inbox_parent ON r.authority_id = authority.value
|
|
38
|
+
AND json_extract(r.record_json, '$.change.result.parentUUID') = parent.value AND r.delivery_sequence > ?)
|
|
39
|
+
SELECT n.entity_id AS entityId, n.authority_id AS authorityId, n.global_sequence AS globalSequence,
|
|
40
|
+
json_extract(n.record_json, '$.change.result.parentUUID') AS parentUUID,
|
|
41
|
+
json_extract(n.record_json, '$.change.result.version') AS version
|
|
42
|
+
FROM candidate c
|
|
43
|
+
CROSS JOIN record_inbox n ON n.entity_id = c.entity_id
|
|
44
|
+
AND n.global_sequence = (SELECT MAX(global_sequence) FROM record_inbox WHERE entity_id = c.entity_id)
|
|
45
|
+
LEFT JOIN entity_apply_state s ON s.entity_id = n.entity_id AND s.authority_id = n.authority_id
|
|
46
|
+
WHERE n.resolved_at IS NOT NULL AND n.delivery_sequence > ?
|
|
47
|
+
AND COALESCE(s.materialized_sequence, 0) < n.global_sequence`).all(JSON.stringify([...entities]), JSON.stringify([...containers]), JSON.stringify(input.authorityIds), after, after);
|
|
48
|
+
for (const { entityId, authorityId, globalSequence, parentUUID, version } of rows) {
|
|
49
|
+
if (placed?.has(entityId))
|
|
50
|
+
continue;
|
|
51
|
+
if (!entities.has(entityId) && (parentUUID === null || !containers.has(parentUUID)))
|
|
52
|
+
continue;
|
|
53
|
+
if (admittedVersion(database, entityId) === version)
|
|
54
|
+
continue;
|
|
55
|
+
oweAfter(database, authorityId, entityId, globalSequence - 1);
|
|
56
|
+
cachedStatement(database, `UPDATE entity_apply_state SET resolved_through = ?
|
|
57
|
+
WHERE entity_id = ? AND authority_id = ? AND resolved_through >= ?`)
|
|
58
|
+
.run(globalSequence - 1, entityId, authorityId, globalSequence);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** Detect's side, inside its write once its rows are final: every row now
|
|
62
|
+
* showing beneath each top it revealed, and each row of `shown` O did not
|
|
63
|
+
* show before, owes again on every authority this computer follows. */
|
|
64
|
+
export function oweRevealedAgain(database, writer, tops, shown = []) {
|
|
65
|
+
const entities = new Set(), containers = new Set();
|
|
66
|
+
const add = (row) => {
|
|
67
|
+
entities.add(row.uuid);
|
|
68
|
+
if (CONTAINERS.has(row.type))
|
|
69
|
+
containers.add(row.uuid);
|
|
70
|
+
};
|
|
71
|
+
for (const top of tops) {
|
|
72
|
+
const row = writer.get("entities", top);
|
|
73
|
+
if (row)
|
|
74
|
+
for (const beneath of groundStore(database).rowsUnder("entities", row.rootUUID, row.relativePath))
|
|
75
|
+
add(beneath);
|
|
76
|
+
}
|
|
77
|
+
shown.forEach(add);
|
|
78
|
+
const authorityIds = cachedStatement(database, "SELECT authority_id FROM authority_delivery_cursors").pluck().all();
|
|
79
|
+
oweShownAgain(database, { entities, containers, authorityIds, after: 0 });
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=apply-shown-again.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-shown-again.js","sourceRoot":"","sources":["../src/apply-shown-again.ts"],"names":[],"mappings":"AAAA;;;;yDAIyD;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAqB,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,0DAA0D;AAC1D,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,QAA2B,EAAE,WAAmB,EAAE,QAAgB,EAAE,KAAa,EAAQ,EAAE;IAClH,eAAe,CAAC,QAAQ,EAAE;kGACsE,CAAC;SAC9F,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AACvC,CAAC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,QAA2B,EAAE,KAM1D;IACC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACtD,IAAI,QAAQ,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,YA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nC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvB,IAAI,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC,CAAC;IACF,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QACxC,IAAI,GAAG;YAAE,KAAK,MAAM,OAAO,IAAI,WAAW,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,UAAU,EAAE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,YAAY,CAAC;gBAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3H,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACnB,MAAM,YAAY,GAAG,eAAe,CAAC,QAAQ,EAAE,qDAAqD,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,EAAc,CAAC;IAChI,aAAa,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Apply's claims about names. A filesystem that folds letter case or Unicode
|
|
2
|
+
* normalization finds an object under every spelling of its name, so a lookup
|
|
3
|
+
* alone never proves that a name stands (`src/detection/spelled-lookup.ts`).
|
|
4
|
+
*
|
|
5
|
+
* - A claim that a record stands at a name holds only for an object stored
|
|
6
|
+
* under exactly that name.
|
|
7
|
+
* - A slot is vacant only when no spelling of its name finds an object, or
|
|
8
|
+
* the one found is the object Apply itself moves there or from there: a
|
|
9
|
+
* rename that only respells a name leaves nothing else behind. A move may
|
|
10
|
+
* never replace any other object, and a vacated slot may hold no other. */
|
|
11
|
+
import { type BigIntStats } from "node:fs";
|
|
12
|
+
/** The object stored under exactly this name, or null. */
|
|
13
|
+
export declare function standing(path: string): BigIntStats | null;
|
|
14
|
+
/** Whether the object stored under exactly this name is the one `anchor` names. */
|
|
15
|
+
export declare function holds(path: string, anchor: string): boolean;
|
|
16
|
+
/** Whether any object but the one at `own` occupies `address`. */
|
|
17
|
+
export declare function occupiedByOther(address: string, own: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Every Apply move, in a reveal or a return: `from`'s object moves to `to`
|
|
20
|
+
* only while no spelling of `to` finds another object and `to`'s parent
|
|
21
|
+
* stands, so it never replaces a person's ground nor recreates an ancestor a
|
|
22
|
+
* person removed. Answers whether `from`'s object now stands at `to`.
|
|
23
|
+
*
|
|
24
|
+
* - A rename that only respells the name renames.
|
|
25
|
+
* - The same object standing at `to` (the link step of an interrupted move,
|
|
26
|
+
* or the other name of a hard link) stays, and `from` goes.
|
|
27
|
+
* - A regular file moves by link then unlink, which no occupant arriving
|
|
28
|
+
* between the check and the link can lose. The unlink takes `from` only
|
|
29
|
+
* while it still names the object: one a person saved there since the link
|
|
30
|
+
* is theirs, and stays. A directory or symlink renames,
|
|
31
|
+
* which on POSIX can still replace an occupant created in that instant: an
|
|
32
|
+
* empty directory, or for a symlink any non-directory (macOS `link()`
|
|
33
|
+
* follows symlinks, and Node has no no-replace rename).
|
|
34
|
+
*/
|
|
35
|
+
export declare function moveWithoutReplacing(from: string, to: string): boolean;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/** Apply's claims about names. A filesystem that folds letter case or Unicode
|
|
2
|
+
* normalization finds an object under every spelling of its name, so a lookup
|
|
3
|
+
* alone never proves that a name stands (`src/detection/spelled-lookup.ts`).
|
|
4
|
+
*
|
|
5
|
+
* - A claim that a record stands at a name holds only for an object stored
|
|
6
|
+
* under exactly that name.
|
|
7
|
+
* - A slot is vacant only when no spelling of its name finds an object, or
|
|
8
|
+
* the one found is the object Apply itself moves there or from there: a
|
|
9
|
+
* rename that only respells a name leaves nothing else behind. A move may
|
|
10
|
+
* never replace any other object, and a vacated slot may hold no other. */
|
|
11
|
+
import { linkSync, renameSync, unlinkSync } from "node:fs";
|
|
12
|
+
import { dirname } from "node:path";
|
|
13
|
+
import { optionalLstat } from "./physical-path-witness.js";
|
|
14
|
+
import { spelledLookup } from "./detection/spelled-lookup.js";
|
|
15
|
+
import { physicalKey } from "./source-signature.js";
|
|
16
|
+
/** The object stored under exactly this name, or null. */
|
|
17
|
+
export function standing(path) {
|
|
18
|
+
const found = spelledLookup()(path);
|
|
19
|
+
return found === "respelled" ? null : found;
|
|
20
|
+
}
|
|
21
|
+
/** Whether the object stored under exactly this name is the one `anchor` names. */
|
|
22
|
+
export function holds(path, anchor) {
|
|
23
|
+
const stats = standing(path);
|
|
24
|
+
return stats !== null && physicalKey(stats) === anchor;
|
|
25
|
+
}
|
|
26
|
+
/** Whether any object but the one at `own` occupies `address`. */
|
|
27
|
+
export function occupiedByOther(address, own) {
|
|
28
|
+
const found = spelledLookup()(address);
|
|
29
|
+
if (found !== "respelled")
|
|
30
|
+
return found !== null;
|
|
31
|
+
const object = optionalLstat(own), occupant = optionalLstat(address);
|
|
32
|
+
return !object || !occupant || physicalKey(object) !== physicalKey(occupant);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Every Apply move, in a reveal or a return: `from`'s object moves to `to`
|
|
36
|
+
* only while no spelling of `to` finds another object and `to`'s parent
|
|
37
|
+
* stands, so it never replaces a person's ground nor recreates an ancestor a
|
|
38
|
+
* person removed. Answers whether `from`'s object now stands at `to`.
|
|
39
|
+
*
|
|
40
|
+
* - A rename that only respells the name renames.
|
|
41
|
+
* - The same object standing at `to` (the link step of an interrupted move,
|
|
42
|
+
* or the other name of a hard link) stays, and `from` goes.
|
|
43
|
+
* - A regular file moves by link then unlink, which no occupant arriving
|
|
44
|
+
* between the check and the link can lose. The unlink takes `from` only
|
|
45
|
+
* while it still names the object: one a person saved there since the link
|
|
46
|
+
* is theirs, and stays. A directory or symlink renames,
|
|
47
|
+
* which on POSIX can still replace an occupant created in that instant: an
|
|
48
|
+
* empty directory, or for a symlink any non-directory (macOS `link()`
|
|
49
|
+
* follows symlinks, and Node has no no-replace rename).
|
|
50
|
+
*/
|
|
51
|
+
export function moveWithoutReplacing(from, to) {
|
|
52
|
+
const object = optionalLstat(from);
|
|
53
|
+
if (!object)
|
|
54
|
+
return false;
|
|
55
|
+
const there = standing(to);
|
|
56
|
+
if (there && physicalKey(there) === physicalKey(object)) {
|
|
57
|
+
unlinkSync(from);
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
if (occupiedByOther(to, from) || !optionalLstat(dirname(to))?.isDirectory())
|
|
61
|
+
return false;
|
|
62
|
+
if (!object.isFile() || spelledLookup()(to) === "respelled") {
|
|
63
|
+
renameSync(from, to);
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
try {
|
|
67
|
+
linkSync(from, to);
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
if (error.code === "EEXIST")
|
|
71
|
+
return false;
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
74
|
+
const still = optionalLstat(from);
|
|
75
|
+
if (still && physicalKey(still) === physicalKey(object))
|
|
76
|
+
unlinkSync(from);
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=apply-spelling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-spelling.js","sourceRoot":"","sources":["../src/apply-spelling.ts"],"names":[],"mappings":"AAAA;;;;;;;;;6EAS6E;AAC7E,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAoB,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE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AAI,CAAC;IAAC,CAAC;IAC3F,IAAI,eAAe,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE;QAAE,OAAO,KAAK,CAAC;IAC1F,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,aAAa,EAAE,CAAC,EAAE,CAAC,KAAK,WAAW,EAAE,CAAC;QAAC,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAAC,OAAO,IAAI,CAAC;IAAC,CAAC;IACnG,IAAI,CAAC;QACH,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACrB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QACrE,MAAM,KAAK,CAAC;IACd,CAAC;IACD,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,KAAK,IAAI,WAAW,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,MAAM,CAAC;QAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAC1E,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/** A trashed container keeps its ground on this computer until its identity
|
|
2
|
+
* returns, as one disk's Trash holds a folder until it is put back:
|
|
3
|
+
*
|
|
4
|
+
* <root>/.amalgm/trash/<UUID>/<attempt>
|
|
5
|
+
*
|
|
6
|
+
* A Leave whose result is trashed takes its container's ground aside into
|
|
7
|
+
* its window's control tree (apply-displaced-tree.ts), and its Verify keeps
|
|
8
|
+
* the unshared remainder (apply-kept.ts). When the window is durable and lets
|
|
9
|
+
* that tree go, the shared copy moves here instead of away: one rename on the
|
|
10
|
+
* root's own device. Nothing is flushed. A keep is evidence, never truth, so
|
|
11
|
+
* one a crash loses costs only a download.
|
|
12
|
+
*
|
|
13
|
+
* A kept file's proof follows its object, as a proof follows the object
|
|
14
|
+
* everywhere (source-signature.ts latestProof): the Leave's end, in the
|
|
15
|
+
* commit that takes its rows off O, notes each file's content, signature and
|
|
16
|
+
* sighting from the O row its final guard proved it showed. Taking the
|
|
17
|
+
* directory aside renames only the directory, so no file beneath it changes.
|
|
18
|
+
*
|
|
19
|
+
* A container Enter of the same UUID in that root takes its cold files from
|
|
20
|
+
* the keep before it asks the wire. A kept file whose signature still equals
|
|
21
|
+
* its noted one, with its content proven under the qualification its root
|
|
22
|
+
* still stands under (sourceReusable's leaf law), holds the content noted, unread, as
|
|
23
|
+
* Detect reuses an unchanged file. Every other kept file is hashed where it
|
|
24
|
+
* lies, and only while an artifact is still wanted. One whose whole-file
|
|
25
|
+
* hash an artifact names is renamed into that artifact's first staged
|
|
26
|
+
* destination, its object and stat unchanged since it was proved, and cloned
|
|
27
|
+
* to the rest; each is handed to the tree's barrier like a downloaded file
|
|
28
|
+
* (workspace-add-staging.ts), so the tree persists whole before its seal.
|
|
29
|
+
* Only what the keep cannot prove is downloaded. That Enter's end lets its
|
|
30
|
+
* notes go, and once its window is durable its keep goes: what it took
|
|
31
|
+
* stands in the ground, and nothing left there is anything this UUID shows.
|
|
32
|
+
*
|
|
33
|
+
* Steps run in window order at the durability point, so a Leave and a later
|
|
34
|
+
* Enter of one UUID in one point keep and then release, in that order.
|
|
35
|
+
*
|
|
36
|
+
* Restoring one child out of a trashed container is that child's own Enter,
|
|
37
|
+
* which finds no keep under its UUID and downloads. Kept ground goes
|
|
38
|
+
* otherwise only with its owner's effective permanent deletion or Trash
|
|
39
|
+
* expiry (unfinished: neither exists yet), as apply-kept.ts. The keep lies
|
|
40
|
+
* beneath the reserved local directory, which Detect never reads. */
|
|
41
|
+
import type Database from "better-sqlite3";
|
|
42
|
+
import { type CloudEntityRecord, type TransferArtifact } from "@amalgm/live";
|
|
43
|
+
import type { WindowMemberReceipt } from "./apply-window-rows.js";
|
|
44
|
+
import type { GroundRow } from "./ground-row.js";
|
|
45
|
+
import type { LocalArtifactFile } from "./materialize-records.js";
|
|
46
|
+
import type { AddStagingRouting } from "./workspace-add-staging.js";
|
|
47
|
+
/** Where one UUID's trashed ground is kept in a binding root. */
|
|
48
|
+
export declare const trashKeepOf: (root: string, uuid: string) => string;
|
|
49
|
+
/** One step a durable window owes its Trash keeps. */
|
|
50
|
+
export type TrashStep = {
|
|
51
|
+
readonly kind: "keep";
|
|
52
|
+
readonly root: string;
|
|
53
|
+
readonly from: string;
|
|
54
|
+
readonly into: string;
|
|
55
|
+
} | {
|
|
56
|
+
readonly kind: "release";
|
|
57
|
+
readonly keep: string;
|
|
58
|
+
};
|
|
59
|
+
/** What a window's receipts owe the Trash keeps, in member order: a trashed
|
|
60
|
+
* container Leave keeps what it took, and a container Enter releases its
|
|
61
|
+
* UUID's keep. */
|
|
62
|
+
export declare function trashSteps(receipts: readonly WindowMemberReceipt[]): TrashStep[];
|
|
63
|
+
/** Runs the steps in order, before the control trees go. A copy that no
|
|
64
|
+
* longer stands was brought home, or kept by an earlier run. */
|
|
65
|
+
export declare function settleTrash(steps: readonly TrashStep[]): Promise<void>;
|
|
66
|
+
/** What proved one kept file: its content, under its signature and the
|
|
67
|
+
* sighting that read it. */
|
|
68
|
+
export interface KeptProof {
|
|
69
|
+
readonly payloadVersion: string;
|
|
70
|
+
readonly sourceSignature: string;
|
|
71
|
+
readonly sighting: string;
|
|
72
|
+
}
|
|
73
|
+
/** Notes, at a Leave's end, before its rows leave O, the proof of each file
|
|
74
|
+
* beneath a container whose result is trashed: `top` is its O row and
|
|
75
|
+
* `rows` every O row beneath it. Anything else notes nothing. */
|
|
76
|
+
export declare function noteKeptProofs(database: Database.Database, input: {
|
|
77
|
+
readonly attemptId: string;
|
|
78
|
+
readonly result: CloudEntityRecord;
|
|
79
|
+
readonly top: GroundRow;
|
|
80
|
+
readonly rows: readonly GroundRow[];
|
|
81
|
+
}): void;
|
|
82
|
+
/** Lets a UUID's notes go once it enters again. */
|
|
83
|
+
export declare const releaseKeptProofs: (database: Database.Database, uuid: string) => void;
|
|
84
|
+
/** Each noted proof of a UUID whose root still stands under the
|
|
85
|
+
* qualification it was sighted under, by where its file lies in `keep`. */
|
|
86
|
+
export declare function keptProofs(database: Database.Database, keep: string, uuid: string): Map<string, KeptProof>;
|
|
87
|
+
/** Takes every staged file the keep proves into its staged destinations and
|
|
88
|
+
* answers it as downloaded: first each file its noted proof still proves,
|
|
89
|
+
* unread, then, while anything is still wanted, each other file by its hash.
|
|
90
|
+
* A keep that does not stand answers nothing. */
|
|
91
|
+
export declare function takeTrashed(input: {
|
|
92
|
+
readonly keep: string;
|
|
93
|
+
readonly proofs: ReadonlyMap<string, KeptProof>;
|
|
94
|
+
readonly artifacts: readonly TransferArtifact[];
|
|
95
|
+
readonly staged: AddStagingRouting;
|
|
96
|
+
}): Promise<Map<string, LocalArtifactFile>>;
|