@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,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What one folder of the sync root should hold, from the drive alone: one
|
|
3
|
+
* placeholder for each name the drive lists there, said whole. A folder the
|
|
4
|
+
* shelf speaks for shows the shelf's own names, each with its real size and
|
|
5
|
+
* times; one the map lists shows its entities, each file at the size its
|
|
6
|
+
* record states. A placeholder's size is said once, so a folder holding a
|
|
7
|
+
* file whose record states no size is not listed: Windows hears EIO, never a
|
|
8
|
+
* size nobody stated.
|
|
9
|
+
*
|
|
10
|
+
* An unplaced repository's `.git` is a folder placeholder like any other,
|
|
11
|
+
* the repository's Git directory as the drive lists it, so listing the
|
|
12
|
+
* repository's folder places nothing; listing inside `.git` places the
|
|
13
|
+
* repository, as a look there does on every computer.
|
|
14
|
+
* A link is made beside the placeholders, never a placeholder itself
|
|
15
|
+
* (asks.ts), and a look places nothing for it: the drive lists its target,
|
|
16
|
+
* which is written at this computer's disk as link-target.ts writes every
|
|
17
|
+
* link, so it reads back exactly; and whether it leads to a folder, which
|
|
18
|
+
* Windows must know to make it, is what the drive says stands where it
|
|
19
|
+
* leads. Only a link the drive lists without its target (a reference) is
|
|
20
|
+
* placed first (`linkAt`); one that cannot be placed now keeps no other name
|
|
21
|
+
* from showing, and is made after the listing (reconcile.ts).
|
|
22
|
+
* A reference into a root this person holds stands on the shelf as a link,
|
|
23
|
+
* but the drive shows that root inline where it stands: it is a folder, as
|
|
24
|
+
* every computer's look says, never a link to place.
|
|
25
|
+
*
|
|
26
|
+
* A change reaches only some names of a folder Windows already holds: each
|
|
27
|
+
* that stands for an entity it touched, and each the folder and the drive do
|
|
28
|
+
* not both show (one made, gone or renamed). A scoped look says only those,
|
|
29
|
+
* so it costs the names a change reaches, never the folder's size.
|
|
30
|
+
*/
|
|
31
|
+
import { lstatSync, readlinkSync, statSync } from "node:fs";
|
|
32
|
+
import { win32 } from "node:path";
|
|
33
|
+
import { diskLinkTarget } from "../../link-target.js";
|
|
34
|
+
import { addressOf, errno } from "../operations.js";
|
|
35
|
+
import { childOf, drivePath, identityText, missing, stamp, syncPath } from "./paths.js";
|
|
36
|
+
/** The folder at a drive path as the drive shows it now. Rejects with ENOENT
|
|
37
|
+
* or ENOTDIR where the drive shows no folder, with EIO where a file's record
|
|
38
|
+
* states no size, and with a placement's failure when a repository listed
|
|
39
|
+
* inside its `.git` could not be placed. */
|
|
40
|
+
export async function contents(serving, sync, at, scope = null) {
|
|
41
|
+
const { drive, operations } = serving;
|
|
42
|
+
const { root, mounted } = sync;
|
|
43
|
+
let listed = await drive.list(addressOf(at));
|
|
44
|
+
if (listed.kind === "place-first") {
|
|
45
|
+
await operations.place(at);
|
|
46
|
+
listed = await drive.list(addressOf(at));
|
|
47
|
+
}
|
|
48
|
+
if (listed.kind === "nowhere")
|
|
49
|
+
throw errno("ENOENT");
|
|
50
|
+
if (listed.kind === "notdir")
|
|
51
|
+
throw errno("ENOTDIR");
|
|
52
|
+
if (listed.kind !== "entries")
|
|
53
|
+
throw errno("EIO");
|
|
54
|
+
const items = [];
|
|
55
|
+
const links = [];
|
|
56
|
+
const unplaced = [];
|
|
57
|
+
const shelf = serving.shelf(listed.root);
|
|
58
|
+
const only = scope === null ? null : reached(listed, scope);
|
|
59
|
+
const said = (name) => only === null || only.has(name.toLowerCase());
|
|
60
|
+
for (const name of listed.shelf) {
|
|
61
|
+
if (!said(name))
|
|
62
|
+
continue;
|
|
63
|
+
const path = shelf.path([...listed.address, name]);
|
|
64
|
+
let stats;
|
|
65
|
+
try {
|
|
66
|
+
stats = lstatSync(path);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
if (missing(error))
|
|
70
|
+
continue;
|
|
71
|
+
throw error;
|
|
72
|
+
}
|
|
73
|
+
if (stats.isSymbolicLink()) {
|
|
74
|
+
const into = await entered(serving, at, name, listed.root, mounted);
|
|
75
|
+
if (into !== null)
|
|
76
|
+
items.push(into);
|
|
77
|
+
else
|
|
78
|
+
links.push(await shown(serving, root, at, name, readlinkSync(path)));
|
|
79
|
+
}
|
|
80
|
+
else if (stats.isDirectory())
|
|
81
|
+
items.push(folder(name, stats.mtimeMs, stats.birthtimeMs));
|
|
82
|
+
else if (stats.isFile())
|
|
83
|
+
items.push(placed(name, stats));
|
|
84
|
+
}
|
|
85
|
+
const entries = listed.entries.filter((entry) => said(entry.name));
|
|
86
|
+
for (const entry of entries) {
|
|
87
|
+
if (entry.kind !== "file")
|
|
88
|
+
continue;
|
|
89
|
+
if (entry.size === null)
|
|
90
|
+
throw errno("EIO");
|
|
91
|
+
items.push({
|
|
92
|
+
name: entry.name, directory: false, size: entry.size, mtimeMs: mounted.getTime(),
|
|
93
|
+
identity: identityText({ v: entry.payloadVersion, s: null }),
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
for (const entry of entries) {
|
|
97
|
+
if (entry.kind === "directory")
|
|
98
|
+
items.push(folder(entry.name, mounted.getTime()));
|
|
99
|
+
else if (entry.kind !== "link")
|
|
100
|
+
continue;
|
|
101
|
+
else if (entry.target === null)
|
|
102
|
+
unplaced.push(entry.name);
|
|
103
|
+
else
|
|
104
|
+
links.push(await shown(serving, root, at, entry.name, diskLinkTarget(entry.target)));
|
|
105
|
+
}
|
|
106
|
+
const where = await drive.where(addressOf(at));
|
|
107
|
+
const uuid = where.kind === "shelf" ? where.entity?.uuid ?? null : where.kind === "listed" ? where.entry.uuid : null;
|
|
108
|
+
return { items, links, unplaced, uuid, only };
|
|
109
|
+
}
|
|
110
|
+
/** The lowercase names a change reaches in a folder: each standing for an
|
|
111
|
+
* entity it touched, and each the folder holds or the drive shows, not both. */
|
|
112
|
+
function reached(listed, { holds, touched }) {
|
|
113
|
+
const reached = new Set();
|
|
114
|
+
const shows = new Set(listed.shelf.map((name) => name.toLowerCase()));
|
|
115
|
+
for (const { name, uuid } of [...listed.entries, ...listed.standing]) {
|
|
116
|
+
shows.add(name.toLowerCase());
|
|
117
|
+
if (touched.has(uuid))
|
|
118
|
+
reached.add(name.toLowerCase());
|
|
119
|
+
}
|
|
120
|
+
const held = new Set(holds.map((name) => name.toLowerCase()));
|
|
121
|
+
for (const name of shows)
|
|
122
|
+
if (!held.has(name))
|
|
123
|
+
reached.add(name);
|
|
124
|
+
for (const name of held)
|
|
125
|
+
if (!shows.has(name))
|
|
126
|
+
reached.add(name);
|
|
127
|
+
return reached;
|
|
128
|
+
}
|
|
129
|
+
/** A placeholder for a shelf file, standing for its bytes there. */
|
|
130
|
+
export const placed = (name, stats) => ({
|
|
131
|
+
name, directory: false, size: stats.size, mtimeMs: stats.mtimeMs, birthtimeMs: stats.birthtimeMs,
|
|
132
|
+
identity: identityText({ v: null, s: stamp(stats) }),
|
|
133
|
+
});
|
|
134
|
+
const folder = (name, mtimeMs, birthtimeMs = mtimeMs) => ({
|
|
135
|
+
name, directory: true, size: 0, mtimeMs, birthtimeMs, identity: identityText({ v: null, s: null }),
|
|
136
|
+
});
|
|
137
|
+
/** The folder a shelf link in a folder at a drive path stands for when the
|
|
138
|
+
* drive leads through it into a root other than `root`, the folder's own:
|
|
139
|
+
* the root it enters, at its shelf's times, or the mount's while nothing
|
|
140
|
+
* stands there. Null for a link the drive shows as itself. */
|
|
141
|
+
async function entered(serving, at, name, root, mounted) {
|
|
142
|
+
const where = await serving.drive.where(addressOf(childOf(at, name)));
|
|
143
|
+
if (where.kind === "listed")
|
|
144
|
+
return where.root !== root && where.entry.kind === "directory" ? folder(name, mounted.getTime()) : null;
|
|
145
|
+
if (where.kind !== "shelf" || where.root === root)
|
|
146
|
+
return null;
|
|
147
|
+
let stats;
|
|
148
|
+
try {
|
|
149
|
+
stats = statSync(serving.shelf(where.root).path(where.address));
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
if (missing(error))
|
|
153
|
+
return null;
|
|
154
|
+
throw error;
|
|
155
|
+
}
|
|
156
|
+
return stats.isDirectory() ? folder(name, stats.mtimeMs, stats.birthtimeMs) : null;
|
|
157
|
+
}
|
|
158
|
+
/** A link the folder at a drive path shows, as the sync root makes it: its
|
|
159
|
+
* target as this computer's disk keeps it, and whether it leads to a folder. */
|
|
160
|
+
async function shown(serving, root, at, name, target) {
|
|
161
|
+
return { name, target, directory: await leadsToFolder(serving, root, at, target) };
|
|
162
|
+
}
|
|
163
|
+
/** Whether a link's target, resolved from the folder at a drive path where
|
|
164
|
+
* the link stands, is a folder, placing nothing: inside the drive, as the
|
|
165
|
+
* drive lists it or the shelf holds it there; outside, as the disk holds it.
|
|
166
|
+
* A target on another computer ("\\server") is never looked at. One that
|
|
167
|
+
* cannot be looked at, or leads nowhere, makes a file link, as in Node. */
|
|
168
|
+
async function leadsToFolder(serving, root, at, target) {
|
|
169
|
+
if (/^[\\/]{2}/.test(target))
|
|
170
|
+
return false;
|
|
171
|
+
const full = win32.resolve(syncPath(root, at), target);
|
|
172
|
+
const inside = drivePath(root, full);
|
|
173
|
+
try {
|
|
174
|
+
if (inside === null)
|
|
175
|
+
return statSync(full).isDirectory();
|
|
176
|
+
const where = await serving.drive.where(addressOf(inside));
|
|
177
|
+
if (where.kind === "listed")
|
|
178
|
+
return where.entry.kind === "directory";
|
|
179
|
+
if (where.kind === "shelf")
|
|
180
|
+
return statSync(serving.shelf(where.root).path(where.address)).isDirectory();
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/** The link a folder at a drive path shows by name, placed, as the sync root
|
|
188
|
+
* makes it: its own target text, and the kind of what that target is on the
|
|
189
|
+
* shelf, a file when nothing stands there. Rejects as its placement does. */
|
|
190
|
+
export async function linkAt(serving, at, name) {
|
|
191
|
+
const child = childOf(at, name);
|
|
192
|
+
await serving.operations.place(child);
|
|
193
|
+
const target = await serving.operations.readlink(child);
|
|
194
|
+
const where = await serving.drive.where(addressOf(child));
|
|
195
|
+
if (where.kind !== "shelf")
|
|
196
|
+
throw errno("EIO");
|
|
197
|
+
let directory = false;
|
|
198
|
+
try {
|
|
199
|
+
directory = statSync(serving.shelf(where.root).path(where.address)).isDirectory();
|
|
200
|
+
}
|
|
201
|
+
catch { /* a dangling link leads to a file */ }
|
|
202
|
+
return { name, target, directory };
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=contents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contents.js","sourceRoot":"","sources":["../../../src/drive/cloud-files/contents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAc,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAIlC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAwB,MAAM,kBAAkB,CAAC;AAG1E,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA0CxF;;;4CAG4C;AAC5C,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,OAAgB,EAAE,IAAwC,EAAE,EAAU,EAAE,QAAsB,IAAI;IAElG,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IACtC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC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/** The provider name Windows shows for the sync root, and finds it by. */
|
|
4
|
+
export declare const PROVIDER = "Amalgm";
|
|
5
|
+
/** Whether a sync root an earlier Files program registered stands at the
|
|
6
|
+
* mountpoint. */
|
|
7
|
+
export declare function cloudFilesStanding(mountpoint: string): Promise<boolean>;
|
|
8
|
+
/** Registers the sync root at the mountpoint and serves the drive through it.
|
|
9
|
+
* Resolves once Windows sends its asks to this program; the root stays
|
|
10
|
+
* registered after `unmount()`, which is for the whole runtime's stop. */
|
|
11
|
+
export declare function mountCloudFiles(input: DoorInput): Promise<MountedDrive>;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The drive as a Windows sync root: Windows' own Cloud Files API, the one
|
|
3
|
+
* OneDrive serves through, through Amalgm's binding (binding.ts). Explorer,
|
|
4
|
+
* shells, editors and Git see ordinary folders and files at the person's
|
|
5
|
+
* conventional home; each name is a placeholder, and Windows asks the door
|
|
6
|
+
* for a folder's names the first time anything looks inside it, and for a
|
|
7
|
+
* file's bytes the first time anything reads them.
|
|
8
|
+
*
|
|
9
|
+
* The sync root mirrors the drive; it is never the shelf. The shelf stays
|
|
10
|
+
* the ground Detect and Apply read and write, as on every other computer,
|
|
11
|
+
* and the door answers each ask by the one rule (operations.ts) through the
|
|
12
|
+
* drive's operations (asks.ts): a listing places nothing but a repository's
|
|
13
|
+
* door, and each link it names is made after it, on its own; a read places
|
|
14
|
+
* its file, then streams the shelf's bytes into the placeholder. A file read
|
|
15
|
+
* is therefore on disk twice, on the shelf and in the sync root, as every
|
|
16
|
+
* Cloud Files provider keeps a synced copy of what it fetched.
|
|
17
|
+
*
|
|
18
|
+
* Windows tells the provider only of removals and renames, before they
|
|
19
|
+
* happen, so the door watches the sync root for everything else a person
|
|
20
|
+
* does there and carries it to the shelf (writes.ts), and keeps every folder
|
|
21
|
+
* Windows holds whole saying what the drive says (reconcile.ts). Only the
|
|
22
|
+
* provider may change a placeholder, so only this program does; its own
|
|
23
|
+
* process never asks itself (cloud-files.c answers those).
|
|
24
|
+
*
|
|
25
|
+
* The sync root stays registered across Files programs, so placeholders and
|
|
26
|
+
* fetched bytes survive a restart; an earlier program's root is `standing`.
|
|
27
|
+
* While no program serves, Windows answers each ask that needs one with
|
|
28
|
+
* "the cloud file provider is not running". At rest the door disconnects;
|
|
29
|
+
* when it serves again it looks at every folder once.
|
|
30
|
+
*/
|
|
31
|
+
import { mkdirSync } from "node:fs";
|
|
32
|
+
import { win32 } from "node:path";
|
|
33
|
+
import { driveOperations } from "../operations.js";
|
|
34
|
+
import { answer } from "./asks.js";
|
|
35
|
+
import { failed, loadCloudFiles } from "./binding.js";
|
|
36
|
+
import { Populated } from "./populated.js";
|
|
37
|
+
import { reconciler } from "./reconcile.js";
|
|
38
|
+
import { hresult, reason } from "./sync-root.js";
|
|
39
|
+
import { watchWrites } from "./writes.js";
|
|
40
|
+
/** The provider name Windows shows for the sync root, and finds it by. */
|
|
41
|
+
export const PROVIDER = "Amalgm";
|
|
42
|
+
const PROVIDER_VERSION = "1";
|
|
43
|
+
/** Whether a sync root an earlier Files program registered stands at the
|
|
44
|
+
* mountpoint. */
|
|
45
|
+
export async function cloudFilesStanding(mountpoint) {
|
|
46
|
+
return loadCloudFiles().registered(win32.resolve(mountpoint), PROVIDER);
|
|
47
|
+
}
|
|
48
|
+
/** Registers the sync root at the mountpoint and serves the drive through it.
|
|
49
|
+
* Resolves once Windows sends its asks to this program; the root stays
|
|
50
|
+
* registered after `unmount()`, which is for the whole runtime's stop. */
|
|
51
|
+
export async function mountCloudFiles(input) {
|
|
52
|
+
const binding = loadCloudFiles();
|
|
53
|
+
const owned = new Set();
|
|
54
|
+
const { mounted } = input.keeper.unkept;
|
|
55
|
+
const root = win32.resolve(input.mountpoint);
|
|
56
|
+
const serving = (drive) => ({
|
|
57
|
+
drive: drive.drive,
|
|
58
|
+
shelf: drive.shelf,
|
|
59
|
+
operations: driveOperations({
|
|
60
|
+
drive: drive.drive, shelf: drive.shelf, home: drive.home, keeper: drive.keeper, owned,
|
|
61
|
+
...(drive.onPlaced ? { onPlaced: drive.onPlaced } : {}),
|
|
62
|
+
}),
|
|
63
|
+
...(drive.onPlaced ? { onPlaced: drive.onPlaced } : {}),
|
|
64
|
+
});
|
|
65
|
+
mkdirSync(root, { recursive: true });
|
|
66
|
+
const registered = binding.register(root, PROVIDER, PROVIDER_VERSION, input.home);
|
|
67
|
+
if (failed(registered))
|
|
68
|
+
throw hresult(`register ${root}`, registered);
|
|
69
|
+
const sync = {
|
|
70
|
+
binding, root, mounted, populated: new Populated(), links: new Map(), leaving: new Set(),
|
|
71
|
+
log: (message) => { process.stderr.write(`drive: ${message}\n`); },
|
|
72
|
+
};
|
|
73
|
+
let current = null;
|
|
74
|
+
let connection = null;
|
|
75
|
+
let unsubscribe = null;
|
|
76
|
+
const writes = watchWrites(sync, () => current, () => reconcile.walk(false));
|
|
77
|
+
const reconcile = reconciler(sync, () => current, writes);
|
|
78
|
+
const open = (drive) => {
|
|
79
|
+
const next = serving(drive);
|
|
80
|
+
const opened = binding.connect(root, (event) => {
|
|
81
|
+
void answer(sync, writes, reconcile, opened, next, event).catch((error) => sync.log(`the ${event.kind} of ${event.path}: ${reason(error)}`));
|
|
82
|
+
});
|
|
83
|
+
connection = opened;
|
|
84
|
+
current = next;
|
|
85
|
+
unsubscribe = drive.changes((touched) => reconcile.changed(touched));
|
|
86
|
+
};
|
|
87
|
+
const close = () => {
|
|
88
|
+
unsubscribe?.();
|
|
89
|
+
unsubscribe = null;
|
|
90
|
+
current = null;
|
|
91
|
+
if (connection !== null)
|
|
92
|
+
binding.disconnect(connection);
|
|
93
|
+
connection = null;
|
|
94
|
+
};
|
|
95
|
+
try {
|
|
96
|
+
open(input);
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
writes.close();
|
|
100
|
+
reconcile.close();
|
|
101
|
+
throw error;
|
|
102
|
+
}
|
|
103
|
+
reconcile.walk(true);
|
|
104
|
+
return {
|
|
105
|
+
serve(drive) {
|
|
106
|
+
close();
|
|
107
|
+
open(drive);
|
|
108
|
+
reconcile.walk(false);
|
|
109
|
+
},
|
|
110
|
+
rest: close,
|
|
111
|
+
async unmount() {
|
|
112
|
+
writes.close();
|
|
113
|
+
reconcile.close();
|
|
114
|
+
close();
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=door.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"door.js","sourceRoot":"","sources":["../../../src/drive/cloud-files/door.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGlC,OAAO,EAAE,eAAe,EAAwC,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAmB,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAiB,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,0EAA0E;AAC1E,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC;AACjC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B;iBACiB;AACjB,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,UAAkB;IACzD,OAAO,cAAc,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC;AAC1E,CAAC;AAED;;0EAE0E;AAC1E,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,KAAgB;IACp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CAAC;IACvE,CAAC,CAAC;IACF,MAAM,KAAK,GAAG,GAAS,EAAE;QACvB,WAAW,EAAE,EAAE,CAAC;QAChB,WAAW,GAAG,IAAI,CAAC;QACnB,OAAO,GAAG,IAAI,CAAC;QACf,IAAI,UAAU,KAAK,IAAI;YAAE,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACxD,UAAU,GAAG,IAAI,CAAC;IACpB,CAAC,CAAC;IAEF,IAAI,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,EAAE,CAAC;QACf,SAAS,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,KAAK,CAAC;IACd,CAAC;IACD,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,OAAO;QACL,KAAK,CAAC,KAAK;YACT,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,KAAK,CAAC,CAAC;YACZ,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,EAAE,KAAK;QACX,KAAK,CAAC,OAAO;YACX,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,SAAS,CAAC,KAAK,EAAE,CAAC;YAClB,KAAK,EAAE,CAAC;QACV,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ConstantName } from "./binding.js";
|
|
2
|
+
/** The drive path of a sync-root path; null outside the root. */
|
|
3
|
+
export declare function drivePath(root: string, path: string): string | null;
|
|
4
|
+
/** The sync-root path of a drive path. */
|
|
5
|
+
export declare function syncPath(root: string, path: string): string;
|
|
6
|
+
export declare function parentOf(path: string): string;
|
|
7
|
+
export declare function childOf(path: string, name: string): string;
|
|
8
|
+
export declare function nameOf(path: string): string;
|
|
9
|
+
/** Whether path is at or beneath ancestor; drive paths, compared without case. */
|
|
10
|
+
export declare function within(path: string, ancestor: string): boolean;
|
|
11
|
+
/** What a placeholder stands for. */
|
|
12
|
+
export interface Identity {
|
|
13
|
+
/** The payload head of bytes never placed on this computer. */
|
|
14
|
+
readonly v: string | null;
|
|
15
|
+
/** The shelf file's `stamp` once its bytes stand there. */
|
|
16
|
+
readonly s: string | null;
|
|
17
|
+
}
|
|
18
|
+
export declare const identityText: (identity: Identity) => string;
|
|
19
|
+
/** A placeholder's identity; null when it carries none the door wrote. */
|
|
20
|
+
export declare function identityOf(text: string | null): Identity | null;
|
|
21
|
+
/** A shelf file as its placeholder names it: its size and modification time. */
|
|
22
|
+
export declare const stamp: (stats: {
|
|
23
|
+
readonly size: number;
|
|
24
|
+
readonly mtimeMs: number;
|
|
25
|
+
}) => string;
|
|
26
|
+
/** Whether a whole file placeholder Windows holds in sync was written since
|
|
27
|
+
* its identity was said. Windows keeps one in sync through an append, so
|
|
28
|
+
* only a size other than the one its identity names says so: a stamp's own,
|
|
29
|
+
* or, for a payload head, the drive's file's when it still names that head.
|
|
30
|
+
* Where neither can say, nothing does. */
|
|
31
|
+
export declare function appended(state: {
|
|
32
|
+
readonly size: number;
|
|
33
|
+
}, identity: Identity | null, drive: {
|
|
34
|
+
readonly payloadVersion: string | null;
|
|
35
|
+
readonly size: number | null;
|
|
36
|
+
} | null): boolean;
|
|
37
|
+
/** A failure as the NTSTATUS Windows hears: a refusal is access denied, a
|
|
38
|
+
* missing address not found, and anything else, an unfinished placement
|
|
39
|
+
* among them, a device I/O error (EIO to Node), never success with no bytes. */
|
|
40
|
+
export declare function statusOf(error: unknown, constants: Readonly<Record<ConstantName, number>>): number;
|
|
41
|
+
/** Whether an error says nothing stands there. */
|
|
42
|
+
export declare const missing: (error: unknown) => boolean;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the sync root's paths and the drive's paths meet, what a placeholder
|
|
3
|
+
* says it holds, and how a failure is said back to Windows.
|
|
4
|
+
*
|
|
5
|
+
* Windows names a placeholder by its full path, drive letter first, in its
|
|
6
|
+
* own case; the drive names an address by `/`-separated names from its root,
|
|
7
|
+
* `/` the root itself (operations.ts). NTFS compares names without case, so a
|
|
8
|
+
* sync-root path is matched to the root so too.
|
|
9
|
+
*
|
|
10
|
+
* A placeholder's identity is the one thing the provider keeps on it: which
|
|
11
|
+
* bytes it stands for. `v` is the payload head of a file whose bytes were
|
|
12
|
+
* never placed; `s` the size and modification time of the shelf's own file it
|
|
13
|
+
* mirrors once they were. Equal identity is the door's only proof that a
|
|
14
|
+
* placeholder still says what the drive says.
|
|
15
|
+
*/
|
|
16
|
+
import { win32 } from "node:path";
|
|
17
|
+
/** The drive path of a sync-root path; null outside the root. */
|
|
18
|
+
export function drivePath(root, path) {
|
|
19
|
+
const base = win32.resolve(root);
|
|
20
|
+
const full = win32.resolve(path);
|
|
21
|
+
if (full.toLowerCase() === base.toLowerCase())
|
|
22
|
+
return "/";
|
|
23
|
+
const prefix = base.endsWith("\\") ? base : `${base}\\`;
|
|
24
|
+
if (!full.toLowerCase().startsWith(prefix.toLowerCase()))
|
|
25
|
+
return null;
|
|
26
|
+
return `/${full.slice(prefix.length).split("\\").join("/")}`;
|
|
27
|
+
}
|
|
28
|
+
/** The sync-root path of a drive path. */
|
|
29
|
+
export function syncPath(root, path) {
|
|
30
|
+
return path === "/" ? win32.resolve(root) : win32.join(root, ...path.slice(1).split("/"));
|
|
31
|
+
}
|
|
32
|
+
export function parentOf(path) {
|
|
33
|
+
const at = path.lastIndexOf("/");
|
|
34
|
+
return at <= 0 ? "/" : path.slice(0, at);
|
|
35
|
+
}
|
|
36
|
+
export function childOf(path, name) {
|
|
37
|
+
return path === "/" ? `/${name}` : `${path}/${name}`;
|
|
38
|
+
}
|
|
39
|
+
export function nameOf(path) {
|
|
40
|
+
return path.slice(path.lastIndexOf("/") + 1);
|
|
41
|
+
}
|
|
42
|
+
/** Whether path is at or beneath ancestor; drive paths, compared without case. */
|
|
43
|
+
export function within(path, ancestor) {
|
|
44
|
+
const a = ancestor.toLowerCase();
|
|
45
|
+
const p = path.toLowerCase();
|
|
46
|
+
return a === "/" || p === a || p.startsWith(`${a}/`);
|
|
47
|
+
}
|
|
48
|
+
export const identityText = (identity) => JSON.stringify({ v: identity.v, s: identity.s });
|
|
49
|
+
/** A placeholder's identity; null when it carries none the door wrote. */
|
|
50
|
+
export function identityOf(text) {
|
|
51
|
+
if (text === null)
|
|
52
|
+
return null;
|
|
53
|
+
try {
|
|
54
|
+
const value = JSON.parse(text);
|
|
55
|
+
const v = typeof value.v === "string" ? value.v : null;
|
|
56
|
+
const s = typeof value.s === "string" ? value.s : null;
|
|
57
|
+
return value.v === v && value.s === s ? { v, s } : null;
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** A shelf file as its placeholder names it: its size and modification time. */
|
|
64
|
+
export const stamp = (stats) => `${stats.size}:${stats.mtimeMs}`;
|
|
65
|
+
/** Whether a whole file placeholder Windows holds in sync was written since
|
|
66
|
+
* its identity was said. Windows keeps one in sync through an append, so
|
|
67
|
+
* only a size other than the one its identity names says so: a stamp's own,
|
|
68
|
+
* or, for a payload head, the drive's file's when it still names that head.
|
|
69
|
+
* Where neither can say, nothing does. */
|
|
70
|
+
export function appended(state, identity, drive) {
|
|
71
|
+
let named = null;
|
|
72
|
+
if (identity?.s)
|
|
73
|
+
named = Number(identity.s.slice(0, identity.s.indexOf(":")));
|
|
74
|
+
else if (identity?.v && drive?.payloadVersion === identity.v)
|
|
75
|
+
named = drive.size;
|
|
76
|
+
return named !== null && named !== state.size;
|
|
77
|
+
}
|
|
78
|
+
/** A failure as the NTSTATUS Windows hears: a refusal is access denied, a
|
|
79
|
+
* missing address not found, and anything else, an unfinished placement
|
|
80
|
+
* among them, a device I/O error (EIO to Node), never success with no bytes. */
|
|
81
|
+
export function statusOf(error, constants) {
|
|
82
|
+
const code = typeof error === "object" && error !== null ? error.code : undefined;
|
|
83
|
+
switch (code) {
|
|
84
|
+
case "EPERM":
|
|
85
|
+
case "EACCES": return constants.STATUS_ACCESS_DENIED;
|
|
86
|
+
case "ENOENT":
|
|
87
|
+
case "ENOTDIR": return constants.STATUS_OBJECT_NAME_NOT_FOUND;
|
|
88
|
+
default: return constants.STATUS_IO_DEVICE_ERROR;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/** Whether an error says nothing stands there. */
|
|
92
|
+
export const missing = (error) => typeof error === "object" && error !== null && ["ENOENT", "ENOTDIR"].includes(String(error.code));
|
|
93
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../src/drive/cloud-files/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAIlC,iEAAiE;AACjE,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,IAAY;IAClD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE;QAAE,OAAO,GAAG,CAAC;IAC1D,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC;IACxD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QAAE,OAAO,IAAI,CAAC;IACtE,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC/D,CAAC;AAED,0CAA0C;AAC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,IAAI,QAAQ,EAAE,CAAC,IAAI,KAAK,EAAE,cAAc,KAAK,QAAQ,CAAC,CAAC;QAAE,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;IACjF,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,IAAI,CAAC;AAChD,CAAC;AAED;;gFAEgF;AAChF,MAAM,UAAU,QAAQ,CAAC,KAAc,EAAE,SAAiD;IACxF,MAAM,IAAI,GAAG,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAE,KAA4B,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1G,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,OAAO,CAAC;QAAC,KAAK,QAAQ,CAAC,CAAC,OAAO,SAAS,CAAC,oBAAoB,CAAC;QACnE,KAAK,QAAQ,CAAC;QAAC,KAAK,SAAS,CAAC,CAAC,OAAO,SAAS,CAAC,4BAA4B,CAAC;QAC7E,OAAO,CAAC,CAAC,OAAO,SAAS,CAAC,sBAAsB,CAAC;IACnD,CAAC;AACH,CAAC;AAED,kDAAkD;AAClD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAc,EAAW,EAAE,CACjD,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAE,KAA4B,CAAC,IAAI,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface Folder {
|
|
2
|
+
/** The folder's drive path, as the door first listed it. */
|
|
3
|
+
readonly path: string;
|
|
4
|
+
readonly uuid: string | null;
|
|
5
|
+
}
|
|
6
|
+
export declare class Populated {
|
|
7
|
+
#private;
|
|
8
|
+
add(path: string, uuid: string | null): void;
|
|
9
|
+
has(path: string): boolean;
|
|
10
|
+
/** Forgets the folder at path and every folder beneath it. */
|
|
11
|
+
remove(path: string): void;
|
|
12
|
+
/** The folders at and beneath from now stand at and beneath to. */
|
|
13
|
+
move(from: string, to: string): void;
|
|
14
|
+
folders(): readonly Folder[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sync-root folders the door has answered whole. Windows asks for a
|
|
3
|
+
* folder's listing once and then holds its placeholders itself, so these are
|
|
4
|
+
* the only folders whose placeholders the door must keep saying what the
|
|
5
|
+
* drive says (reconcile.ts), and the only ones it may look inside: a look
|
|
6
|
+
* into any other folder would ask the door itself for its listing.
|
|
7
|
+
*
|
|
8
|
+
* Each folder is kept by its drive path, compared without case, with the UUID
|
|
9
|
+
* of the entity it shows when the map names one: a change to that entity or
|
|
10
|
+
* a child of it is what sends the door back to that folder.
|
|
11
|
+
*/
|
|
12
|
+
import { within } from "./paths.js";
|
|
13
|
+
export class Populated {
|
|
14
|
+
#folders = new Map();
|
|
15
|
+
add(path, uuid) {
|
|
16
|
+
this.#folders.set(path.toLowerCase(), { path, uuid });
|
|
17
|
+
}
|
|
18
|
+
has(path) {
|
|
19
|
+
return this.#folders.has(path.toLowerCase());
|
|
20
|
+
}
|
|
21
|
+
/** Forgets the folder at path and every folder beneath it. */
|
|
22
|
+
remove(path) {
|
|
23
|
+
for (const [key, folder] of this.#folders)
|
|
24
|
+
if (within(folder.path, path))
|
|
25
|
+
this.#folders.delete(key);
|
|
26
|
+
}
|
|
27
|
+
/** The folders at and beneath from now stand at and beneath to. */
|
|
28
|
+
move(from, to) {
|
|
29
|
+
const moved = [...this.#folders.values()].filter((folder) => within(folder.path, from));
|
|
30
|
+
this.remove(from);
|
|
31
|
+
for (const folder of moved)
|
|
32
|
+
this.add(`${to}${folder.path.slice(from.length)}`, folder.uuid);
|
|
33
|
+
}
|
|
34
|
+
folders() {
|
|
35
|
+
return [...this.#folders.values()];
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=populated.js.map
|
|
@@ -0,0 +1 @@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IAC9F,CAAC;IAED,OAAO;QACL,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Serving } from "./contents.js";
|
|
2
|
+
import { type SyncRoot } from "./sync-root.js";
|
|
3
|
+
import type { Writes } from "./writes.js";
|
|
4
|
+
export interface Reconciler {
|
|
5
|
+
/** Looks again at each folder that shows a touched entity, at the names
|
|
6
|
+
* the change reaches, and whole at one the map names none for; at every
|
|
7
|
+
* folder whole when touched is null. */
|
|
8
|
+
changed(touched: ReadonlySet<string> | null): void;
|
|
9
|
+
/** Looks at every folder Windows holds whole, from the root down. With
|
|
10
|
+
* `adopt`, each link standing in them is taken for the door's own: after a
|
|
11
|
+
* program stops, the next cannot tell the links it made from a person's. */
|
|
12
|
+
walk(adopt: boolean): void;
|
|
13
|
+
/** Looks at one folder Windows holds whole, as after its listing. */
|
|
14
|
+
look(at: string): void;
|
|
15
|
+
close(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare function reconciler(sync: SyncRoot, serving: () => Serving | null, writes: Writes): Reconciler;
|