@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,110 @@
|
|
|
1
|
+
/** The Git storage a received folder result displaces. A repository that
|
|
2
|
+
* becomes a folder loses only its Git storage; its worktree members stay where
|
|
3
|
+
* they stand, each on its own channel. Apply never deletes a person's Git
|
|
4
|
+
* write.
|
|
5
|
+
*
|
|
6
|
+
* - The final guard stamps its root's content clock, then takes the
|
|
7
|
+
* storage's fingerprint (apply-fingerprint.ts) before its fresh repository
|
|
8
|
+
* observation proves the storage is O, so any Git write after that
|
|
9
|
+
* observation differs from the fingerprint.
|
|
10
|
+
* - The receipt binds that manifest before any effect. It is the only
|
|
11
|
+
* evidence of which storage is O.
|
|
12
|
+
* - The reveal moves the marker into control only while it is the manifest's
|
|
13
|
+
* own object.
|
|
14
|
+
* - Verify takes the displaced storage's fingerprint again before it judges
|
|
15
|
+
* anything else (keptStorageIsO). Unchanged storage is the O the cloud
|
|
16
|
+
* already holds and goes with the window's control tree at the durability
|
|
17
|
+
* point, once its member matches. Changed storage, and storage whose member
|
|
18
|
+
* answers anything else, is brought home (returnGitStorage): a person's
|
|
19
|
+
* Git write the durability point would otherwise destroy returns to its
|
|
20
|
+
* folder, the member stays owed, and Detect records it as the repository's
|
|
21
|
+
* newest result.
|
|
22
|
+
*
|
|
23
|
+
* A gitfile marker names storage outside the worktree. The rename moves only
|
|
24
|
+
* the marker, so the manifest also holds that storage's absolute address. */
|
|
25
|
+
import { readFileSync, renameSync } from "node:fs";
|
|
26
|
+
import { join } from "node:path";
|
|
27
|
+
import { clockBoundary, fingerprintClock, fingerprintTree } from "./apply-fingerprint.js";
|
|
28
|
+
import { moveWithoutReplacing } from "./apply-spelling.js";
|
|
29
|
+
import { flushDirectory } from "./flush.js";
|
|
30
|
+
import { gitStorageDirectory } from "./git-binding.js";
|
|
31
|
+
import { optionalLstat } from "./physical-path-witness.js";
|
|
32
|
+
import { physicalKey } from "./source-signature.js";
|
|
33
|
+
/** The displaced marker's name in its intent's control tree. */
|
|
34
|
+
export const DISPLACED_GIT = "displaced-git";
|
|
35
|
+
/** The manifest of `worktree`'s Git storage as it stands now, under `stamp`. */
|
|
36
|
+
export async function captureGitStorage(worktree, stamp, reads = {}) {
|
|
37
|
+
const markerPath = join(worktree, ".git");
|
|
38
|
+
const marker = optionalLstat(markerPath);
|
|
39
|
+
if (!marker)
|
|
40
|
+
throw new Error("Apply found no Git storage to displace");
|
|
41
|
+
const { directory } = gitStorageDirectory(worktree);
|
|
42
|
+
const storage = optionalLstat(directory);
|
|
43
|
+
if (!storage?.isDirectory())
|
|
44
|
+
throw new Error("Apply found no Git storage directory to displace");
|
|
45
|
+
const clock = fingerprintClock(stamp);
|
|
46
|
+
const taken = await fingerprintTree(directory, { clock: clockBoundary(clock), ...reads });
|
|
47
|
+
if ("differs" in taken)
|
|
48
|
+
return null;
|
|
49
|
+
return {
|
|
50
|
+
contract: "amalgm.apply-git-storage@2",
|
|
51
|
+
marker: { object: physicalKey(marker), gitfile: marker.isFile() ? readFileSync(markerPath, "utf8") : null },
|
|
52
|
+
storage: { path: directory, object: physicalKey(storage) },
|
|
53
|
+
clock, digest: taken.digest,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** Whether `marker` is the manifest's own marker over exactly its storage. */
|
|
57
|
+
async function gitStorageUnchanged(marker, manifest, reads) {
|
|
58
|
+
// A manifest of another contract proves nothing.
|
|
59
|
+
if (manifest.contract !== "amalgm.apply-git-storage@2")
|
|
60
|
+
return false;
|
|
61
|
+
const stats = optionalLstat(marker);
|
|
62
|
+
if (!stats || physicalKey(stats) !== manifest.marker.object)
|
|
63
|
+
return false;
|
|
64
|
+
if (manifest.marker.gitfile !== null
|
|
65
|
+
&& (!stats.isFile() || readFileSync(marker, "utf8") !== manifest.marker.gitfile))
|
|
66
|
+
return false;
|
|
67
|
+
const directory = manifest.marker.gitfile === null ? marker : manifest.storage.path;
|
|
68
|
+
const storage = optionalLstat(directory);
|
|
69
|
+
if (!storage?.isDirectory() || physicalKey(storage) !== manifest.storage.object)
|
|
70
|
+
return false;
|
|
71
|
+
const taken = await fingerprintTree(directory, { clock: clockBoundary(manifest.clock), ...reads });
|
|
72
|
+
return "digest" in taken && taken.digest === manifest.digest;
|
|
73
|
+
}
|
|
74
|
+
/** Moves the worktree's marker into control while it is the manifest's own
|
|
75
|
+
* object. Storage already displaced, or removed by a person, leaves nothing
|
|
76
|
+
* to move; any other marker is ground the bound read must judge first. */
|
|
77
|
+
export function displaceGitStorage(control, worktree, manifest) {
|
|
78
|
+
const marker = join(worktree, ".git");
|
|
79
|
+
if (optionalLstat(join(control, DISPLACED_GIT)))
|
|
80
|
+
return;
|
|
81
|
+
const stats = optionalLstat(marker);
|
|
82
|
+
if (!stats)
|
|
83
|
+
return;
|
|
84
|
+
if (physicalKey(stats) !== manifest.marker.object)
|
|
85
|
+
throw new Error("Git storage changed before Apply displaced it");
|
|
86
|
+
renameSync(marker, join(control, DISPLACED_GIT));
|
|
87
|
+
flushDirectory(control);
|
|
88
|
+
flushDirectory(worktree);
|
|
89
|
+
}
|
|
90
|
+
/** Whether the storage displaced into `control` is still the manifest's O.
|
|
91
|
+
* Storage that never left, because a person removed it first, has nothing to
|
|
92
|
+
* lose. */
|
|
93
|
+
export async function keptStorageIsO(control, manifest, reads = {}) {
|
|
94
|
+
const displaced = join(control, DISPLACED_GIT);
|
|
95
|
+
return !optionalLstat(displaced) || await gitStorageUnchanged(displaced, manifest, reads);
|
|
96
|
+
}
|
|
97
|
+
/** Returns storage displaced into `control` to `worktree`, durably. False
|
|
98
|
+
* when another `.git` stands there, so the caller keeps it rather than lets
|
|
99
|
+
* the durability point take it. */
|
|
100
|
+
export function returnGitStorage(control, worktree) {
|
|
101
|
+
const displaced = join(control, DISPLACED_GIT);
|
|
102
|
+
if (!optionalLstat(displaced))
|
|
103
|
+
return true;
|
|
104
|
+
if (!moveWithoutReplacing(displaced, join(worktree, ".git")))
|
|
105
|
+
return false;
|
|
106
|
+
flushDirectory(control);
|
|
107
|
+
flushDirectory(worktree);
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=apply-git-storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-git-storage.js","sourceRoot":"","sources":["../src/apply-git-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;6EAuB6E;AAC7E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAC9B,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC;AAiB7C,gFAAgF;AAChF,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,QAAgB,EAAE,KAAmB,EAAE,QAAe,EAAE;IAE9F,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC1C,MA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AAC,MAAM,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACpH,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;IACjD,cAAc,CAAC,OAAO,CAAC,CAAC;IACxB,cAAc,CAAC,QAAQ,CAAC,CAAC;AAC3B,CAAC;AAED;;WAEW;AACX,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAAe,EAAE,QAA4B,EAAE,QAAe,EAAE;IACnG,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAC/C,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,IAAI,MAAM,mBAAmB,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC5F,CAAC;AAED;;mCAEmC;AACnC,MAAM,UAAU,gBAAgB,CAAC,OAAe,EAAE,QAAgB;IAChE,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAC/C,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3C,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3E,cAAc,CAAC,OAAO,CAAC,CAAC;IACxB,cAAc,CAAC,QAAQ,CAAC,CAAC;IACzB,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { GroundRow } from "./ground-row.js";
|
|
2
|
+
/** One topmost remainder: where it stood, and its nearest shared container. */
|
|
3
|
+
export interface Remainder {
|
|
4
|
+
readonly owner: string;
|
|
5
|
+
readonly path: string;
|
|
6
|
+
}
|
|
7
|
+
/** The remainder rows whose parent is shared: each carries what lies beneath it. */
|
|
8
|
+
export declare function topmostRemainder(rows: readonly GroundRow[]): Remainder[];
|
|
9
|
+
/** Moves each remainder from the displaced container into its owner's keep,
|
|
10
|
+
* under this attempt, or a fresh sibling of it where a name is taken. A
|
|
11
|
+
* remainder no longer displaced was kept by an earlier run: its owner's keep
|
|
12
|
+
* is flushed again, once. */
|
|
13
|
+
export declare function keepRemainder(input: {
|
|
14
|
+
readonly root: string;
|
|
15
|
+
readonly attemptId: string;
|
|
16
|
+
readonly source: string;
|
|
17
|
+
readonly displaced: string;
|
|
18
|
+
readonly remainder: readonly Remainder[];
|
|
19
|
+
}): string[];
|
|
20
|
+
/** Moves `from` into its owner's keep as `name`, under this attempt or a
|
|
21
|
+
* fresh sibling of it where the name is taken, and names the directories
|
|
22
|
+
* owed a flush; none when nothing stands at `from`. */
|
|
23
|
+
export declare function keepAside(input: {
|
|
24
|
+
readonly root: string;
|
|
25
|
+
readonly attemptId: string;
|
|
26
|
+
readonly owner: string;
|
|
27
|
+
readonly from: string;
|
|
28
|
+
readonly name: string;
|
|
29
|
+
}): string[];
|
|
30
|
+
/** Returns each name kept for `owner` into `container`, its address in this
|
|
31
|
+
* root, wherever `free` holds, and names the directories owed a flush: every
|
|
32
|
+
* keep still standing with the container, so a return repeated after a crash
|
|
33
|
+
* flushes the moves an earlier run made. */
|
|
34
|
+
export declare function returnKept(input: {
|
|
35
|
+
readonly root: string;
|
|
36
|
+
readonly owner: string;
|
|
37
|
+
readonly container: string;
|
|
38
|
+
readonly free: (path: string) => boolean;
|
|
39
|
+
}): string[];
|
|
40
|
+
/** Takes each emptied keep of `owner` once its return's flush is done; a
|
|
41
|
+
* removal a crash loses leaves an empty keep the next return flushes again. */
|
|
42
|
+
export declare function vacateKept(root: string, owner: string): void;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/** Unshared ground belongs to its nearest shared container UUID.
|
|
2
|
+
*
|
|
3
|
+
* When that identity ceases to be materialized as a container (a Leave, or a
|
|
4
|
+
* leaf replacing it), its remainder is kept outside Detect's namespace,
|
|
5
|
+
* beneath the binding root's reserved local directory:
|
|
6
|
+
*
|
|
7
|
+
* <root>/.amalgm/kept/<owner UUID>/<attempt>/<name>
|
|
8
|
+
*
|
|
9
|
+
* Its member's Verify keeps it, and the member completes only once the keep
|
|
10
|
+
* is durable. Shared ground Apply set aside whose address a person took
|
|
11
|
+
* while the window held it is kept the same way, beneath the container's own
|
|
12
|
+
* UUID (keepAside), since no other home is free. A reveal that materializes
|
|
13
|
+
* the same identity as a container again in that root returns each kept name
|
|
14
|
+
* into its free address, durably and inside the ground its window owns; an
|
|
15
|
+
* occupied address keeps it. The end of that window wakes Detect over the
|
|
16
|
+
* container, which examines its root. Kept
|
|
17
|
+
* ground goes only with its owner's effective permanent deletion
|
|
18
|
+
* (unfinished: no permanent-delete record exists yet).
|
|
19
|
+
*
|
|
20
|
+
* Every move here refuses to replace what stands, so a step repeated after a
|
|
21
|
+
* crash finds its own earlier move done and only flushes it. */
|
|
22
|
+
import { readdirSync, rmdirSync } from "node:fs";
|
|
23
|
+
import { basename, dirname, join, relative } from "node:path";
|
|
24
|
+
import { LOCAL_DIR_NAME } from "@amalgm/core/identity";
|
|
25
|
+
import { moveWithoutReplacing, standing } from "./apply-spelling.js";
|
|
26
|
+
import { ensureDirBeneath } from "./filesystem.js";
|
|
27
|
+
const keptRoot = (root) => join(root, LOCAL_DIR_NAME, "kept");
|
|
28
|
+
const ownerKeep = (root, owner) => join(keptRoot(root), owner);
|
|
29
|
+
/** The remainder rows whose parent is shared: each carries what lies beneath it. */
|
|
30
|
+
export function topmostRemainder(rows) {
|
|
31
|
+
const held = new Set(rows.map(row => row.uuid));
|
|
32
|
+
return rows.flatMap(row => row.parentUUID !== null && !held.has(row.parentUUID)
|
|
33
|
+
? [{ owner: row.parentUUID, path: row.absolutePath }] : []);
|
|
34
|
+
}
|
|
35
|
+
/** Moves each remainder from the displaced container into its owner's keep,
|
|
36
|
+
* under this attempt, or a fresh sibling of it where a name is taken. A
|
|
37
|
+
* remainder no longer displaced was kept by an earlier run: its owner's keep
|
|
38
|
+
* is flushed again, once. */
|
|
39
|
+
export function keepRemainder(input) {
|
|
40
|
+
const changed = new Set();
|
|
41
|
+
const replayed = new Set();
|
|
42
|
+
for (const { owner, path } of input.remainder) {
|
|
43
|
+
const from = join(input.displaced, relative(input.source, path));
|
|
44
|
+
const keep = ownerKeep(input.root, owner);
|
|
45
|
+
if (!standing(from)) {
|
|
46
|
+
if (!replayed.has(owner)) {
|
|
47
|
+
for (const attempt of attempts(keep, input.attemptId))
|
|
48
|
+
chainOf(input.root, join(keep, attempt), changed);
|
|
49
|
+
}
|
|
50
|
+
replayed.add(owner);
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
for (const directory of keepAside({ root: input.root, attemptId: input.attemptId, owner, from, name: basename(path) })) {
|
|
54
|
+
changed.add(directory);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return [...changed];
|
|
58
|
+
}
|
|
59
|
+
/** Moves `from` into its owner's keep as `name`, under this attempt or a
|
|
60
|
+
* fresh sibling of it where the name is taken, and names the directories
|
|
61
|
+
* owed a flush; none when nothing stands at `from`. */
|
|
62
|
+
export function keepAside(input) {
|
|
63
|
+
const keep = ownerKeep(input.root, input.owner);
|
|
64
|
+
for (let k = 0; standing(input.from); k += 1) {
|
|
65
|
+
const into = join(keep, k === 0 ? input.attemptId : `${input.attemptId}-${k}`);
|
|
66
|
+
ensureDirBeneath(input.root, into, 0o700);
|
|
67
|
+
if (!moveWithoutReplacing(input.from, join(into, input.name)))
|
|
68
|
+
continue;
|
|
69
|
+
const changed = new Set([dirname(input.from)]);
|
|
70
|
+
chainOf(input.root, into, changed);
|
|
71
|
+
return [...changed];
|
|
72
|
+
}
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
/** Adds every directory from `directory` up to, not including, `root`. */
|
|
76
|
+
function chainOf(root, directory, into) {
|
|
77
|
+
for (let at = directory; at !== root; at = dirname(at))
|
|
78
|
+
into.add(at);
|
|
79
|
+
}
|
|
80
|
+
/** Returns each name kept for `owner` into `container`, its address in this
|
|
81
|
+
* root, wherever `free` holds, and names the directories owed a flush: every
|
|
82
|
+
* keep still standing with the container, so a return repeated after a crash
|
|
83
|
+
* flushes the moves an earlier run made. */
|
|
84
|
+
export function returnKept(input) {
|
|
85
|
+
const keep = ownerKeep(input.root, input.owner);
|
|
86
|
+
const changed = [];
|
|
87
|
+
for (const attempt of names(keep)) {
|
|
88
|
+
const at = join(keep, attempt);
|
|
89
|
+
for (const name of names(at)) {
|
|
90
|
+
const to = join(input.container, name);
|
|
91
|
+
if (input.free(to))
|
|
92
|
+
moveWithoutReplacing(join(at, name), to);
|
|
93
|
+
}
|
|
94
|
+
changed.push(at);
|
|
95
|
+
}
|
|
96
|
+
return changed.length > 0 ? [...changed, input.container] : [];
|
|
97
|
+
}
|
|
98
|
+
/** Takes each emptied keep of `owner` once its return's flush is done; a
|
|
99
|
+
* removal a crash loses leaves an empty keep the next return flushes again. */
|
|
100
|
+
export function vacateKept(root, owner) {
|
|
101
|
+
const keep = ownerKeep(root, owner);
|
|
102
|
+
for (const attempt of names(keep))
|
|
103
|
+
vacate(join(keep, attempt));
|
|
104
|
+
vacate(keep);
|
|
105
|
+
}
|
|
106
|
+
/** This attempt's keep directories for one owner: its own, then each fresh
|
|
107
|
+
* sibling, in order, while they stand. */
|
|
108
|
+
function attempts(keep, attemptId) {
|
|
109
|
+
const found = [];
|
|
110
|
+
for (let k = 0; standing(join(keep, k === 0 ? attemptId : `${attemptId}-${k}`)); k += 1) {
|
|
111
|
+
found.push(k === 0 ? attemptId : `${attemptId}-${k}`);
|
|
112
|
+
}
|
|
113
|
+
return found;
|
|
114
|
+
}
|
|
115
|
+
function names(directory) {
|
|
116
|
+
try {
|
|
117
|
+
return readdirSync(directory);
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
if (error.code === "ENOENT")
|
|
121
|
+
return [];
|
|
122
|
+
throw error;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/** Removes a keep directory only once nothing is left in it. */
|
|
126
|
+
function vacate(directory) {
|
|
127
|
+
try {
|
|
128
|
+
rmdirSync(directory);
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
if (!["ENOTEMPTY", "EEXIST", "ENOENT"].includes(error.code ?? ""))
|
|
132
|
+
throw error;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=apply-kept.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-kept.js","sourceRoot":"","sources":["../src/apply-kept.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;gEAoBgE;AAChE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AASnD,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;AAC9E,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;AAEvF,oFAAoF;AACpF,MAAM,UAAU,gBAAgB,CAAC,IAA0B;IACzD,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,UAAU,KAAK,IAAI,IAA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E,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACxF,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,KAAK,CAAC,SAAiB;IAC9B,IAAI,CAAC;QAAC,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC;IAAC,CAAC;IACtC,OAAO,KAAK,EAAE,CAAC;QAAC,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,EAAE,CAAC;QAAC,MAAM,KAAK,CAAC;IAAC,CAAC;AACnG,CAAC;AAED,gEAAgE;AAChE,SAAS,MAAM,CAAC,SAAiB;IAC/B,IAAI,CAAC;QAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAAC,CAAC;IAC7B,OAAO,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAE,KAA+B,CAAC,IAAI,IAAI,EAAE,CAAC;YAAE,MAAM,KAAK,CAAC;IAC5G,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Apply's local-work gate (Live's docs/entity-apply.md, law 3) over this
|
|
2
|
+
* computer's Outbox and Inbox: whether a local record on an entity's own
|
|
3
|
+
* channel is not ordered at or before an accepted target.
|
|
4
|
+
*
|
|
5
|
+
* Order is delivery position. A stamped receipt carries its own; a pending
|
|
6
|
+
* row takes the Inbox position of the same mutation when Receive already
|
|
7
|
+
* holds it, because Send's stamp can land after Receive; otherwise its
|
|
8
|
+
* position is unknown, so it is after every target. On one channel Send's
|
|
9
|
+
* rows are accepted in local order, so stamped positions rise with the
|
|
10
|
+
* channel's sequence: the channel's newest receipt alone says whether any
|
|
11
|
+
* receipt is after the target. Across channels a row that frees storage may
|
|
12
|
+
* be accepted ahead of an earlier one (Live send-freeing.ts), so the
|
|
13
|
+
* authority's highest receipt answers for them all.
|
|
14
|
+
*
|
|
15
|
+
* Most targets meet no local work at all, so one probe of the authority's
|
|
16
|
+
* pending rows and newest receipt answers them before any channel is read.
|
|
17
|
+
*
|
|
18
|
+
* A kept member's target is a result, not a position: the kept head's state
|
|
19
|
+
* or this computer's own newer result (own-results.ts). Local work follows
|
|
20
|
+
* it exactly when this computer's newest own result carries another one.
|
|
21
|
+
*
|
|
22
|
+
* Whether that work wins is the type's (Live's `localWorkWins`): it always
|
|
23
|
+
* does over a replaced type, and over a played one only when it hides the
|
|
24
|
+
* entity or makes it another type, so the gate answers the newest own
|
|
25
|
+
* result's type and status. Local work after a position is exactly an
|
|
26
|
+
* Outbox row `ownResults` reads at that position, so it always has one. */
|
|
27
|
+
import type { CloudEntityRecord, LocalWork } from "@amalgm/live";
|
|
28
|
+
import type Database from "better-sqlite3";
|
|
29
|
+
/** Whether a local record on the entity's channel is after `deliverySequence`. */
|
|
30
|
+
export declare function hasLocalWorkAfter(database: Database.Database, authorityId: string, entityId: string, deliverySequence: number): boolean;
|
|
31
|
+
/** This computer's newest own result when local work on the entity's
|
|
32
|
+
* channel is after `deliverySequence`, else null. */
|
|
33
|
+
export declare function localWorkAfter(database: Database.Database, authorityId: string, entityId: string, deliverySequence: number): LocalWork | null;
|
|
34
|
+
/** `hasLocalWorkAfterTarget` answering the newest own result, or null when
|
|
35
|
+
* no local work follows the target. The Apply store's port form. */
|
|
36
|
+
export declare function localWorkAfterTarget(database: Database.Database, authorityId: string, entityId: string, target: number | CloudEntityRecord): LocalWork | null;
|
|
37
|
+
/** The gate for the retained Inbox row at `globalSequence` on the entity's
|
|
38
|
+
* channel, or for a kept member's result: whether its newest own result not
|
|
39
|
+
* held at the kept head's watermark, the history floor, is another one. The
|
|
40
|
+
* Apply store's port form. */
|
|
41
|
+
export declare function hasLocalWorkAfterTarget(database: Database.Database, authorityId: string, entityId: string, target: number | CloudEntityRecord): boolean;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { readDeliveryReceipt } from "./graph-heads.js";
|
|
2
|
+
import { ownResults } from "./own-results.js";
|
|
3
|
+
import { cachedStatement } from "./sqlite.js";
|
|
4
|
+
/** Whether a local record on the entity's channel is after `deliverySequence`. */
|
|
5
|
+
export function hasLocalWorkAfter(database, authorityId, entityId, deliverySequence) {
|
|
6
|
+
return anyWorkAfter(database, authorityId, deliverySequence)
|
|
7
|
+
&& channelWorkAfter(database, authorityId, entityId, deliverySequence);
|
|
8
|
+
}
|
|
9
|
+
/** This computer's newest own result when local work on the entity's
|
|
10
|
+
* channel is after `deliverySequence`, else null. */
|
|
11
|
+
export function localWorkAfter(database, authorityId, entityId, deliverySequence) {
|
|
12
|
+
if (!hasLocalWorkAfter(database, authorityId, entityId, deliverySequence))
|
|
13
|
+
return null;
|
|
14
|
+
return ownResults(database, authorityId, deliverySequence, [entityId]).get(entityId) ?? null;
|
|
15
|
+
}
|
|
16
|
+
/** `hasLocalWorkAfterTarget` answering the newest own result, or null when
|
|
17
|
+
* no local work follows the target. The Apply store's port form. */
|
|
18
|
+
export function localWorkAfterTarget(database, authorityId, entityId, target) {
|
|
19
|
+
if (typeof target === "number")
|
|
20
|
+
return localWorkAfter(database, authorityId, entityId, retainedPosition(database, authorityId, entityId, target));
|
|
21
|
+
const floor = readDeliveryReceipt(database, authorityId)?.floor ?? 0;
|
|
22
|
+
const own = ownResults(database, authorityId, floor, [entityId]).get(entityId);
|
|
23
|
+
return own !== undefined && own.version !== target.version ? own : null;
|
|
24
|
+
}
|
|
25
|
+
/** The gate for the retained Inbox row at `globalSequence` on the entity's
|
|
26
|
+
* channel, or for a kept member's result: whether its newest own result not
|
|
27
|
+
* held at the kept head's watermark, the history floor, is another one. The
|
|
28
|
+
* Apply store's port form. */
|
|
29
|
+
export function hasLocalWorkAfterTarget(database, authorityId, entityId, target) {
|
|
30
|
+
if (typeof target !== "number") {
|
|
31
|
+
const floor = readDeliveryReceipt(database, authorityId)?.floor ?? 0;
|
|
32
|
+
const own = ownResults(database, authorityId, floor, [entityId]).get(entityId);
|
|
33
|
+
return own !== undefined && own.version !== target.version;
|
|
34
|
+
}
|
|
35
|
+
return hasLocalWorkAfter(database, authorityId, entityId, retainedPosition(database, authorityId, entityId, target));
|
|
36
|
+
}
|
|
37
|
+
function retainedPosition(database, authorityId, entityId, globalSequence) {
|
|
38
|
+
const deliverySequence = cachedStatement(database, `SELECT delivery_sequence FROM record_inbox
|
|
39
|
+
WHERE entity_id = ? AND global_sequence = ? AND authority_id = ?`).pluck()
|
|
40
|
+
.get(entityId, globalSequence, authorityId);
|
|
41
|
+
if (deliverySequence === undefined) {
|
|
42
|
+
throw new Error(`Apply local-work target ${entityId}@${globalSequence} is not retained`);
|
|
43
|
+
}
|
|
44
|
+
return deliverySequence;
|
|
45
|
+
}
|
|
46
|
+
/** Whether any local record on the authority may be after the target:
|
|
47
|
+
* a pending row, or a receipt delivered after it. */
|
|
48
|
+
function anyWorkAfter(database, authorityId, deliverySequence) {
|
|
49
|
+
return cachedStatement(database, `SELECT
|
|
50
|
+
EXISTS (SELECT 1 FROM record_outbox WHERE authority_id = ? AND status = 'pending')
|
|
51
|
+
OR COALESCE((SELECT delivery_sequence FROM record_outbox
|
|
52
|
+
WHERE authority_id = ? AND status = 'accepted'
|
|
53
|
+
ORDER BY delivery_sequence DESC LIMIT 1), 0) > ?`).pluck()
|
|
54
|
+
.get(authorityId, authorityId, deliverySequence) === 1;
|
|
55
|
+
}
|
|
56
|
+
const PENDING_AFTER = `SELECT EXISTS (SELECT 1 FROM record_outbox AS local
|
|
57
|
+
WHERE local.authority_id = ? AND local.entity_id = ? AND local.status = 'pending'
|
|
58
|
+
AND NOT EXISTS (SELECT 1 FROM record_inbox AS inbox
|
|
59
|
+
WHERE inbox.entity_id = local.entity_id AND inbox.mutation_id = local.mutation_id
|
|
60
|
+
AND inbox.authority_id = local.authority_id AND inbox.delivery_sequence <= ?))`;
|
|
61
|
+
const NEWEST_RECEIPT = `SELECT delivery_sequence FROM record_outbox
|
|
62
|
+
WHERE authority_id = ? AND entity_id = ? AND global_sequence IS NOT NULL
|
|
63
|
+
ORDER BY global_sequence DESC LIMIT 1`;
|
|
64
|
+
function channelWorkAfter(database, authorityId, entityId, deliverySequence) {
|
|
65
|
+
if (cachedStatement(database, PENDING_AFTER).pluck().get(authorityId, entityId, deliverySequence) === 1)
|
|
66
|
+
return true;
|
|
67
|
+
const newest = cachedStatement(database, NEWEST_RECEIPT).pluck().get(authorityId, entityId);
|
|
68
|
+
if (newest === null)
|
|
69
|
+
throw new Error(`entity ${entityId} has an accepted local row with no delivery position`);
|
|
70
|
+
return newest !== undefined && newest > deliverySequence;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=apply-local-work.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-local-work.js","sourceRoot":"","sources":["../src/apply-local-work.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,kFAAkF;AAClF,MAAM,UAAU,iBAAiB,CAAC,QAA2B,EAAE,WAAmB,EAAE,QAAgB,EAClG,gBAAwB;IACxB,OAAO,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,gBAAgB,CAAC;WACvD,gBAAgB,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC;AAC3E,CAAC;AAED;qDACqD;AACrD,MAAM,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AG,CAAC,WAAW,EAAE,QAAQ,EAAE,gBAAgB,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACrH,MAAM,MAAM,GAAG,eAAe,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,QAAQ,CAA8B,CAAC;IACzH,IAAI,MAAM,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,UAAU,QAAQ,sDAAsD,CAAC,CAAC;IAC/G,OAAO,MAAM,KAAK,SAAS,IAAI,MAAM,GAAG,gBAAgB,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The drive's map of one root this computer serves on demand: Apply's door
|
|
3
|
+
* to it (Live drive/contracts.ts MapPort).
|
|
4
|
+
*
|
|
5
|
+
* Listed is the root's received state (received-state.ts) at the received
|
|
6
|
+
* prefix, the delivery cursor: the position a fetch lane pins (Live
|
|
7
|
+
* apply/lane.ts), so a touch places exactly the version the map lists, the
|
|
8
|
+
* newest this computer has received. Placed is a row stored in O, shown or
|
|
9
|
+
* hidden, and the map holds it where it stands on this computer, at the
|
|
10
|
+
* parent and name Detect or Apply last admitted: `ls` and `open` agree while
|
|
11
|
+
* Apply has not yet revealed an accepted move, and a person's new entity
|
|
12
|
+
* holds its slot beside what the map lists, so a listed namesake takes its
|
|
13
|
+
* derived name rather than hiding behind the person's. An entered folder's or
|
|
14
|
+
* workspace's version is the membership the map lists beneath it, at the
|
|
15
|
+
* place the map lists it: O's counts only the children this computer placed
|
|
16
|
+
* (detection/container-membership.ts), and the received one may name a place
|
|
17
|
+
* Apply has not yet moved it to. One never entered shows its record's, as
|
|
18
|
+
* nothing lists beneath it yet. An observed absence, a person's `rm -rf`
|
|
19
|
+
* (ground-store.ts), stands nowhere: its top reads as no O row, as the
|
|
20
|
+
* relations read it (ground-relations.ts), so the map lists it where the line
|
|
21
|
+
* does, else nowhere, and a name a person removed holds no slot once the line
|
|
22
|
+
* says so. Each row it hides is still this computer's, so the shelf says the
|
|
23
|
+
* ground is gone rather than the map listing it again. An entity with no O
|
|
24
|
+
* row stands first where this computer's own newest record of it stands
|
|
25
|
+
* while the received prefix does not hold that record yet: the removal, move
|
|
26
|
+
* or change of mode of a unit this computer never placed (Live
|
|
27
|
+
* drive/records.ts, held-removals.ts), or the removal of ground a person
|
|
28
|
+
* removed. The authority accepts this computer's records in their order, so
|
|
29
|
+
* that result is the next the line will say of it, and the map lists it so,
|
|
30
|
+
* under the parent that record names, from the moment it is recorded.
|
|
31
|
+
*
|
|
32
|
+
* The map holds what the drive has entered (MapPort.enter): the root, and
|
|
33
|
+
* each container's children whole once the drive first reads beneath it,
|
|
34
|
+
* read through H's pages for that one folder (registry-graph.ts). Each wake
|
|
35
|
+
* brings what it holds to the received prefix in the cost of what changed:
|
|
36
|
+
* every held entity the records accepted since its last position touch (a
|
|
37
|
+
* container one joins or leaves), each record that joins a container the
|
|
38
|
+
* drive entered, and the entities the wake names, those a window end or a
|
|
39
|
+
* Detect commit admitted (MapIndex, @amalgm/live/drive). A record that takes
|
|
40
|
+
* an entity into a container the drive never entered leaves it unread until
|
|
41
|
+
* the drive enters it. A new kept
|
|
42
|
+
* head, or a fold the heads let go, loads the root again, and enters again
|
|
43
|
+
* every container the drive had entered that still stands. The map holds its
|
|
44
|
+
* own HeldHeads over the computer's proven graphs, so its root's proven graph
|
|
45
|
+
* and fold stay resident while the drive is mounted: the rail's idle drops
|
|
46
|
+
* only the line's own, and the line's next read takes the graph the map still
|
|
47
|
+
* holds rather than proving it again. In memory: the rows of the folders the
|
|
48
|
+
* drive entered, beside the fold's results since H.
|
|
49
|
+
*
|
|
50
|
+
* A look at a reference, a stat of it or a listing of the folder it stands
|
|
51
|
+
* in, needs only its root's top (Live drive/contracts.ts Top), so it loads no
|
|
52
|
+
* map: `readDriveTop` reads the root's own record where its map would list
|
|
53
|
+
* it, the O row else the fold's, through H's pages for that one record. The
|
|
54
|
+
* fold folds the root only when a result since H reaches it. That record's
|
|
55
|
+
* version is not the membership a map lists, since a membership change is
|
|
56
|
+
* never a record. It need not be until the drive lists inside the root; from
|
|
57
|
+
* then the drive holds the root's map, and its top is the map's root
|
|
58
|
+
* (drive/mount.ts composeDrive).
|
|
59
|
+
*/
|
|
60
|
+
import { type CloudEntityRecord } from "@amalgm/live";
|
|
61
|
+
import { type MapEntity, type MapPort } from "@amalgm/live/drive";
|
|
62
|
+
import type Database from "better-sqlite3";
|
|
63
|
+
import { HeldHeads, type ProvenGraphs } from "./received-state.js";
|
|
64
|
+
export interface ApplyMapOptions {
|
|
65
|
+
readonly database: Database.Database;
|
|
66
|
+
readonly authorityId: string;
|
|
67
|
+
readonly rootUUID: string;
|
|
68
|
+
/** This computer's proven kept heads: the map holds its root's for as long
|
|
69
|
+
* as it serves. */
|
|
70
|
+
readonly graphs: ProvenGraphs;
|
|
71
|
+
/** Hears each run that changed what the map lists: the entities it took
|
|
72
|
+
* and every container it touched, or null after a whole load. */
|
|
73
|
+
readonly onChange?: (touched: ReadonlySet<string> | null) => void;
|
|
74
|
+
}
|
|
75
|
+
export declare class ApplyMap {
|
|
76
|
+
#private;
|
|
77
|
+
readonly map: MapPort;
|
|
78
|
+
constructor(options: ApplyMapOptions);
|
|
79
|
+
get rootUUID(): string;
|
|
80
|
+
/** How many times the whole root was loaded again rather than advanced. */
|
|
81
|
+
get loads(): number;
|
|
82
|
+
/** The delivery position the map describes, null until it is loaded. */
|
|
83
|
+
get through(): number | null;
|
|
84
|
+
/** How many entities the map holds, any status. */
|
|
85
|
+
get size(): number;
|
|
86
|
+
/** The entity the map holds at `uuid`, any status. */
|
|
87
|
+
entity(uuid: string): MapEntity | undefined;
|
|
88
|
+
/** The record the map lists for an entity this computer never placed, at
|
|
89
|
+
* the version it lists it: the base its removal records Trash on. Null
|
|
90
|
+
* when the map does not hold the entity, or holds less than its record (a
|
|
91
|
+
* repository's package is not kept here), or this computer holds it: a
|
|
92
|
+
* placed unit's removal is its shelf's. */
|
|
93
|
+
listed(uuid: string): CloudEntityRecord | null;
|
|
94
|
+
/** Bring the map to the received prefix, taking `uuids` where they stand
|
|
95
|
+
* now. One run at a time; a wake during a run is answered by one more run
|
|
96
|
+
* after it, however many wakes arrive. Resolves when the run that saw this
|
|
97
|
+
* wake is done; rejects as that run did, leaving the map at its last
|
|
98
|
+
* position and every woken entity owed to the next run. */
|
|
99
|
+
refresh(uuids?: Iterable<string>): Promise<void>;
|
|
100
|
+
/** Forget the held fold; the next refresh loads the root again. */
|
|
101
|
+
drop(): void;
|
|
102
|
+
}
|
|
103
|
+
/** What a look at a root's top needs: its own record as its map would list
|
|
104
|
+
* it, and whether this computer holds it. */
|
|
105
|
+
export interface DriveTop {
|
|
106
|
+
readonly entity: MapEntity;
|
|
107
|
+
readonly placed: boolean;
|
|
108
|
+
}
|
|
109
|
+
/** The top of one root at the received prefix, read without its map. Null
|
|
110
|
+
* exactly when the root's map would hold nothing. */
|
|
111
|
+
export declare function readDriveTop(input: {
|
|
112
|
+
readonly database: Database.Database;
|
|
113
|
+
readonly authorityId: string;
|
|
114
|
+
readonly rootUUID: string;
|
|
115
|
+
readonly heads: HeldHeads;
|
|
116
|
+
}): Promise<DriveTop | null>;
|