@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
package/dist/machine-host.js
CHANGED
|
@@ -3,34 +3,37 @@ import { createShellToolsMcp } from "./toolbox-host.js";
|
|
|
3
3
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
4
4
|
import { existsSync, readdirSync } from "node:fs";
|
|
5
5
|
import { homedir as osHomedir, hostname, platform, release } from "node:os";
|
|
6
|
-
import { join, resolve } from "node:path";
|
|
6
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
7
7
|
import { admitRuntimeFormat } from './updates/store.js';
|
|
8
8
|
import { serviceIdentity } from './service/registration.js';
|
|
9
|
-
import {
|
|
10
|
-
import { readSyncMode, writeSyncMode, syncPausedError
|
|
11
|
-
import { buildRootManifest, requireCurrentLayout, approveMachineSetup, adoptMachineSetup, joinApprovedMachine, mergeRecordAuth, resumeMachine, resolveRuntimeBinding, runtimeBindingsMatch, runtimeBindingFromRecord, RUNTIME_IDENTITY_PATH, createRuntimeIdentity, laneLayout, laneRoot, resolveRuntimeEndpoint, userLayout, } from "@amalgm/core/identity";
|
|
9
|
+
import { LOOP_BUDGET_MS } from './loop-watch.js';
|
|
10
|
+
import { readSyncMode, writeSyncMode, syncPausedError } from './sync-setting.js';
|
|
11
|
+
import { buildRootManifest, requireCurrentLayout, approveMachineSetup, adoptMachineSetup, joinApprovedMachine, mergeRecordAuth, resumeMachine, resolveRuntimeBinding, runtimeBindingsMatch, runtimeBindingFromRecord, RUNTIME_IDENTITY_PATH, createRuntimeIdentity, laneLayout, laneRoot, resolveRuntimeEndpoint, userFolderName, userLayout, } from "@amalgm/core/identity";
|
|
12
|
+
import { createActivity } from "@amalgm/core/supervision";
|
|
12
13
|
import { StateRail } from "@amalgm/core/state";
|
|
13
|
-
import { atomicJson, atomicJsonSet, ensurePrivateDir, readJson, } from "./filesystem.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { atomicJson, atomicJsonSet, ensureOwnerOnlyDir, ensurePrivateDir, readJson, } from "./filesystem.js";
|
|
15
|
+
import { FilesProgram } from "./files-program/client.js";
|
|
16
|
+
import { keychainFile, openKeychainHost } from "./keychain/host.js";
|
|
16
17
|
import { createShellAuthorization, loadInstallationDeviceKey, } from "./authorization/index.js";
|
|
17
18
|
import { recoverMachineAuthorization, } from "./authorization/recovery-host.js";
|
|
18
19
|
import { postRegistration } from "./authorization/registration-http.js";
|
|
19
20
|
import { postSetupJson, setupOrigin } from "./authorization/setup-http.js";
|
|
20
21
|
import { installBuiltinAgents } from "./builtin-agents.js";
|
|
21
22
|
import { InstallationOwnership } from "./installation/ownership.js";
|
|
22
|
-
import { runtimeAppOrigin, runtimeProxyOrigin, runtimeWireUrl } from "./installation/environment.js";
|
|
23
|
+
import { runtimeAppOrigin, runtimeGatewayOrigin, runtimeProxyOrigin, runtimeWireUrl } from "./installation/environment.js";
|
|
23
24
|
import { forwardMount } from "./forward.js";
|
|
24
25
|
import { filesBrowserMount } from "./files-browser-host.js";
|
|
25
|
-
import { createConstructPort } from "./construct-products.js";
|
|
26
26
|
import { createGateway } from "./gateway.js";
|
|
27
27
|
import { localMount } from "./local-host.js";
|
|
28
28
|
import { stateMount } from "./state-host.js";
|
|
29
29
|
import { FileStateEventStore } from "./state-store.js";
|
|
30
|
-
import { createWorkspaceHost } from "./workspace-host.js";
|
|
30
|
+
import { createWorkspaceHost, kernelFolderAt } from "./workspace-host.js";
|
|
31
31
|
import { createPtyHost } from "./pty-host.js";
|
|
32
|
+
import { counted, waitForIdle } from "./runtime-activity.js";
|
|
32
33
|
import { callRuntimeCommand, inspectRuntimeCommands, publishRuntimeCommands, runtimeCommandConnection, unpublishRuntimeCommands, } from "./runtime-command-host.js";
|
|
33
34
|
import { shellReleaseCatalog, shellReleaseVerifier } from "./release-catalog.js";
|
|
35
|
+
import { driveLayout } from "./drive/layout.js";
|
|
36
|
+
import { keepSocketMarkingBestEffort } from "./socket-marking.js";
|
|
34
37
|
/** The production effects around Core's machine-setup operation. It does not
|
|
35
38
|
* decide ordering, readiness, or installation selection; those remain Core. */
|
|
36
39
|
export class MachineHost {
|
|
@@ -38,6 +41,9 @@ export class MachineHost {
|
|
|
38
41
|
homedir;
|
|
39
42
|
/** This binding's lane: `~/amalgm`, `~/amalgm-preview` or `~/amalgm-dev/<session>`. */
|
|
40
43
|
lane;
|
|
44
|
+
/** Where every person's ground stands: `lane.users`, or the drive's home
|
|
45
|
+
* shelves when the home is the drive. */
|
|
46
|
+
homes;
|
|
41
47
|
ports;
|
|
42
48
|
binding;
|
|
43
49
|
/** A local runtime with no declared Wire composes no Files cloud rail:
|
|
@@ -45,7 +51,16 @@ export class MachineHost {
|
|
|
45
51
|
wireComposed;
|
|
46
52
|
ownership;
|
|
47
53
|
selectedUserEmail;
|
|
54
|
+
/** The Wire, the Files ground and the drive run here, in a program of
|
|
55
|
+
* their own (files-program/client.ts). */
|
|
56
|
+
files = null;
|
|
48
57
|
groundHost = null;
|
|
58
|
+
/** The Files program's last answer to what it holds back, and the question
|
|
59
|
+
* still on its way (heardBlocked). */
|
|
60
|
+
blockedHeard = null;
|
|
61
|
+
blockedAsking = null;
|
|
62
|
+
/** The drive serving the selected person's home, while it is mounted. */
|
|
63
|
+
servedDrive = null;
|
|
49
64
|
runtimeWire = null;
|
|
50
65
|
activeSyncMode = null;
|
|
51
66
|
syncPhase = 'stopped';
|
|
@@ -56,9 +71,18 @@ export class MachineHost {
|
|
|
56
71
|
syncIdentity = null;
|
|
57
72
|
/** Apps while a runtime holds it: the product that answers for `app`. */
|
|
58
73
|
appsProduct = null;
|
|
74
|
+
/** The person's keychain while this runtime runs. */
|
|
75
|
+
keychain = null;
|
|
59
76
|
running = new Set();
|
|
60
|
-
|
|
77
|
+
/** What runs here, said by each brick through the hook it is handed
|
|
78
|
+
* (Core axiom 31). A brick started again is handed its hook again; one
|
|
79
|
+
* stopped while the runtime runs is handed to nobody, so it stays unheard. */
|
|
80
|
+
activity = createActivity();
|
|
81
|
+
/** A Files Register or Add holds local ground the cloud has not yet
|
|
82
|
+
* accepted until its journey ends. */
|
|
83
|
+
filesJourneys = counted(this.activity.hook("live", "commands"));
|
|
61
84
|
constructor(options) {
|
|
85
|
+
keepSocketMarkingBestEffort();
|
|
62
86
|
setupOrigin(options.appUrl);
|
|
63
87
|
this.binding = resolveRuntimeBinding(options);
|
|
64
88
|
if (options.services && this.binding.runtimeLabel !== 'local')
|
|
@@ -67,15 +91,16 @@ export class MachineHost {
|
|
|
67
91
|
throw new Error('Only a local profile may override product source availability.');
|
|
68
92
|
runtimeAppOrigin(this.binding, options.appUrl);
|
|
69
93
|
for (const [role, endpoint] of [['proxy', options.proxyUrl], ['wire', options.wireUrl],
|
|
70
|
-
['automations', options.platformProducts?.automationsBaseUrl], ['channels', options.platformProducts?.channelsBaseUrl]
|
|
94
|
+
['automations', options.platformProducts?.automationsBaseUrl], ['channels', options.platformProducts?.channelsBaseUrl],
|
|
95
|
+
['gateway', options.platformProducts?.filesBaseUrl]]) {
|
|
71
96
|
if (endpoint)
|
|
72
97
|
resolveRuntimeEndpoint(this.binding, role, endpoint, options.appUrl);
|
|
73
98
|
}
|
|
74
99
|
this.options = { ...options, ...this.binding };
|
|
75
100
|
this.wireComposed = this.binding.runtimeLabel !== 'local' || Boolean(options.wireUrl);
|
|
76
|
-
this.stages = new FilesStageRecorder(options.onFilesStage);
|
|
77
101
|
this.homedir = resolve(options.homedir ?? osHomedir());
|
|
78
102
|
this.lane = laneLayout(laneRoot(this.homedir, this.binding));
|
|
103
|
+
this.homes = options.drive ? driveLayout(this.lane).homes : this.lane.users;
|
|
79
104
|
this.ownership = new InstallationOwnership({ home: this.homedir, binding: this.binding });
|
|
80
105
|
this.selectedUserEmail = normalizeEmail(options.userEmail);
|
|
81
106
|
try {
|
|
@@ -155,52 +180,45 @@ export class MachineHost {
|
|
|
155
180
|
if (!tunnelUrl || !tunnelToken) {
|
|
156
181
|
throw Object.assign(new Error("machine tunnel credentials are missing"), { code: "tunnel_credentials_missing" });
|
|
157
182
|
}
|
|
158
|
-
await this.groundHost
|
|
183
|
+
await this.stopGround(this.groundHost);
|
|
159
184
|
this.groundHost = null;
|
|
160
185
|
await this.runtimeWire?.close();
|
|
161
|
-
this.runtimeWire =
|
|
186
|
+
this.runtimeWire = null;
|
|
187
|
+
const files = this.filesProgram();
|
|
188
|
+
this.runtimeWire = await files.openWire({
|
|
162
189
|
url: runtimeWireUrl(this.binding, this.options.appUrl, tunnelUrl, this.options.wireUrl),
|
|
163
190
|
token: tunnelToken,
|
|
164
191
|
runtimeVersion: this.options.runtimeVersion,
|
|
165
|
-
}
|
|
192
|
+
});
|
|
166
193
|
this.activeSyncMode = this.syncMode();
|
|
167
194
|
if (!existsSync(this.syncSettingFile()))
|
|
168
195
|
writeSyncMode(this.syncSettingFile(), this.activeSyncMode);
|
|
169
196
|
this.syncIdentity = identity;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
onBackgroundError: this.options.onBackgroundError,
|
|
186
|
-
onWorkspaceAddStage: this.options.onWorkspaceAddStage,
|
|
187
|
-
onFilesStage: this.stages.observe,
|
|
188
|
-
filesTraceActive: () => this.stages.listening,
|
|
189
|
-
// The products are selected when the runtime starts, after this
|
|
190
|
-
// rail exists, so the owner of a construct type is asked per act.
|
|
191
|
-
constructProduct: (type) => (type === "app" ? this.appsProduct : null),
|
|
192
|
-
});
|
|
193
|
-
};
|
|
197
|
+
const user = this.user(identity.userEmail);
|
|
198
|
+
this.createGround = () => files.createGround({
|
|
199
|
+
userEmail: identity.userEmail,
|
|
200
|
+
userRoot: user.root,
|
|
201
|
+
dir: user.computer.live,
|
|
202
|
+
computerName: text(record.name) || defaultMachineName(),
|
|
203
|
+
// Login places the home's map when the drive serves it, the home
|
|
204
|
+
// whole otherwise (Live user-ground.ts).
|
|
205
|
+
drive: this.options.drive === true,
|
|
206
|
+
// Outside every user's ground, as self-held worktrees' storage must be.
|
|
207
|
+
gitStorage: join(this.lane.dir, "git"),
|
|
208
|
+
tunnelUrl,
|
|
209
|
+
tunnelToken,
|
|
210
|
+
runtimeVersion: this.options.runtimeVersion,
|
|
211
|
+
}, () => this.filesCounts());
|
|
194
212
|
if (this.activeSyncMode === 'paused') {
|
|
195
213
|
this.syncPhase = 'paused';
|
|
196
214
|
return {
|
|
197
215
|
...identity, localRoot: this.user().root, mode: 'paused',
|
|
198
|
-
cloudHead: null,
|
|
216
|
+
cloudHead: null, watcherRoots: 0, watching: false,
|
|
199
217
|
};
|
|
200
218
|
}
|
|
201
219
|
this.syncPhase = 'starting';
|
|
202
220
|
this.groundHost = await this.createGround();
|
|
203
|
-
const evidence = await this.groundHost
|
|
221
|
+
const evidence = await this.convergeGround(this.groundHost, identity);
|
|
204
222
|
this.syncPhase = 'enabled';
|
|
205
223
|
return evidence;
|
|
206
224
|
},
|
|
@@ -380,115 +398,104 @@ export class MachineHost {
|
|
|
380
398
|
userRoot: paths.root,
|
|
381
399
|
};
|
|
382
400
|
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
401
|
+
/** The Files program, started when Files is first needed. */
|
|
402
|
+
filesProgram() {
|
|
403
|
+
return this.files ??= new FilesProgram({
|
|
404
|
+
// Real disk: nothing the program starts may wait on the drive it serves.
|
|
405
|
+
cwd: this.lane.root,
|
|
406
|
+
home: this.homedir,
|
|
407
|
+
binding: this.binding,
|
|
408
|
+
...(this.options.openWatchModule ? { openWatchModule: this.options.openWatchModule } : {}),
|
|
409
|
+
observers: {
|
|
410
|
+
wireError: this.options.onWireError,
|
|
411
|
+
backgroundError: this.options.onBackgroundError,
|
|
412
|
+
watchHealth: this.options.onWatchHealth,
|
|
413
|
+
detectScan: this.options.onDetectScan,
|
|
414
|
+
applyStage: this.options.onApplyStage,
|
|
415
|
+
filesStage: this.options.onFilesStage,
|
|
416
|
+
placed: this.options.onPlaced,
|
|
417
|
+
},
|
|
418
|
+
...(this.options.onInstallStage ? { installStage: this.options.onInstallStage } : {}),
|
|
419
|
+
// Apps runs here; the program asks it about each app it records or
|
|
420
|
+
// applies.
|
|
421
|
+
app: async (method, args) => {
|
|
422
|
+
const product = this.appsProduct;
|
|
423
|
+
const act = product?.[method];
|
|
424
|
+
if (typeof act !== "function")
|
|
425
|
+
throw new Error(`Apps is not running here to answer ${method}`);
|
|
426
|
+
return act.apply(product, args);
|
|
427
|
+
},
|
|
428
|
+
// The keychain runs here too, so its key never enters the program.
|
|
429
|
+
secret: async (id, name, head) => {
|
|
430
|
+
if (!this.keychain)
|
|
431
|
+
throw new Error("The keychain is not running here to hear a secret");
|
|
432
|
+
return this.keychain.follower.receive(id, name, head);
|
|
433
|
+
},
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
/** Converges a ground. With the home as the drive, the drive then serves
|
|
437
|
+
* the ground at the person's conventional home, over their home shelf,
|
|
438
|
+
* until the whole runtime stops (drive/mount.ts). */
|
|
439
|
+
async convergeGround(ground, identity) {
|
|
440
|
+
const evidence = await ground.converge(identity);
|
|
441
|
+
if (this.options.drive && this.groundHost === ground) {
|
|
442
|
+
// A drive that rested while its ground was closed (a pause) serves
|
|
443
|
+
// again over this one, through the same mount.
|
|
444
|
+
this.servedDrive = await this.filesProgram().serveDrive(ground, identity.userEmail, () => this.activity.hook("live", "placing"));
|
|
445
|
+
}
|
|
446
|
+
return evidence;
|
|
447
|
+
}
|
|
448
|
+
/** Where the drive serves the home while it is mounted. */
|
|
449
|
+
driveServed() {
|
|
450
|
+
const served = this.servedDrive;
|
|
451
|
+
return served && { home: served.home, mountpoint: served.mountpoint, shelf: served.shelf };
|
|
452
|
+
}
|
|
453
|
+
/** Whether a folder stands at a path, for in-process code: under the
|
|
454
|
+
* mountpoint the drive answers (drive/README.md, one door), and before the
|
|
455
|
+
* drive is up nothing there is a folder yet; anywhere else, the kernel. */
|
|
456
|
+
async folderAt(mountpoint, path) {
|
|
457
|
+
const address = relative(mountpoint, path);
|
|
458
|
+
if (address === ".." || address.startsWith(`..${sep}`) || isAbsolute(address))
|
|
459
|
+
return kernelFolderAt(path);
|
|
460
|
+
const served = this.servedDrive;
|
|
461
|
+
return served !== null && served.folder(address === "" ? [] : address.split(sep));
|
|
388
462
|
}
|
|
389
463
|
/** Materialize through Live and prove the same runtime owns ongoing Watch. */
|
|
390
|
-
|
|
391
|
-
this.
|
|
392
|
-
if (!this.groundHost)
|
|
393
|
-
throw new Error("add requires a running authenticated runtime");
|
|
394
|
-
const ground = this.groundHost;
|
|
395
|
-
return ground.operation(async () => {
|
|
396
|
-
const started = performance.now();
|
|
397
|
-
emitFilesStage(this.stages.observe, {
|
|
398
|
-
primitive: "download", stage: "files-add", status: "started", workspaceId,
|
|
399
|
-
});
|
|
400
|
-
try {
|
|
401
|
-
const { addFilesWorkspace } = await import("@amalgm/live/files");
|
|
402
|
-
const added = await addFilesWorkspace(workspaceId, destinationParent, ground.filesCommandPorts().add);
|
|
403
|
-
const result = { ...added, watch: ground.addedWorkspaceEvidence(added.workspaceId) };
|
|
404
|
-
emitFilesStage(this.stages.observe, {
|
|
405
|
-
primitive: "download",
|
|
406
|
-
stage: "files-add",
|
|
407
|
-
status: "completed",
|
|
408
|
-
workspaceId,
|
|
409
|
-
durationMs: performance.now() - started,
|
|
410
|
-
});
|
|
411
|
-
return result;
|
|
412
|
-
}
|
|
413
|
-
catch (error) {
|
|
414
|
-
emitFilesStage(this.stages.observe, {
|
|
415
|
-
primitive: "download",
|
|
416
|
-
stage: "files-add",
|
|
417
|
-
status: "failed",
|
|
418
|
-
workspaceId,
|
|
419
|
-
durationMs: performance.now() - started,
|
|
420
|
-
});
|
|
421
|
-
throw error;
|
|
422
|
-
}
|
|
423
|
-
});
|
|
464
|
+
addWorkspace(workspaceId, destinationParent) {
|
|
465
|
+
return this.journey((ground) => ground.add(workspaceId, destinationParent, false));
|
|
424
466
|
}
|
|
425
467
|
/** Route the complete user-visible register journey through Live's
|
|
426
|
-
*
|
|
427
|
-
|
|
428
|
-
this.
|
|
429
|
-
if (!this.groundHost)
|
|
430
|
-
throw new Error("register requires a running authenticated runtime");
|
|
431
|
-
const ground = this.groundHost;
|
|
432
|
-
return ground.operation(async () => {
|
|
433
|
-
const journeyStarted = performance.now();
|
|
434
|
-
const declarationStarted = performance.now();
|
|
435
|
-
emitFilesStage(this.stages.observe, {
|
|
436
|
-
primitive: "register", stage: "files-register", status: "started", path: requestedPath,
|
|
437
|
-
});
|
|
438
|
-
emitFilesStage(this.stages.observe, {
|
|
439
|
-
primitive: "register", stage: "durable-declaration", status: "started", path: requestedPath,
|
|
440
|
-
});
|
|
441
|
-
try {
|
|
442
|
-
const declared = await (await import("@amalgm/live/files")).registerFilesWorkspace(requestedPath, ground.filesCommandPorts().register);
|
|
443
|
-
emitFilesStage(this.stages.observe, {
|
|
444
|
-
primitive: "register",
|
|
445
|
-
stage: "durable-declaration",
|
|
446
|
-
status: "completed",
|
|
447
|
-
path: requestedPath,
|
|
448
|
-
workspaceId: declared.workspaceId,
|
|
449
|
-
durationMs: performance.now() - declarationStarted,
|
|
450
|
-
});
|
|
451
|
-
const completed = await ground.completeWorkspaceRegistration(declared.workspaceId);
|
|
452
|
-
emitFilesStage(this.stages.observe, {
|
|
453
|
-
primitive: "register",
|
|
454
|
-
stage: "files-register",
|
|
455
|
-
status: "completed",
|
|
456
|
-
path: requestedPath,
|
|
457
|
-
workspaceId: declared.workspaceId,
|
|
458
|
-
durationMs: performance.now() - journeyStarted,
|
|
459
|
-
});
|
|
460
|
-
return { ...declared, ...completed };
|
|
461
|
-
}
|
|
462
|
-
catch (error) {
|
|
463
|
-
emitFilesStage(this.stages.observe, {
|
|
464
|
-
primitive: "register",
|
|
465
|
-
stage: "files-register",
|
|
466
|
-
status: "failed",
|
|
467
|
-
path: requestedPath,
|
|
468
|
-
durationMs: performance.now() - journeyStarted,
|
|
469
|
-
});
|
|
470
|
-
throw error;
|
|
471
|
-
}
|
|
472
|
-
});
|
|
468
|
+
* placement and this already-running Files owner. */
|
|
469
|
+
registerWorkspace(requestedPath) {
|
|
470
|
+
return this.journey((ground) => ground.register(requestedPath, false));
|
|
473
471
|
}
|
|
474
|
-
/** Run one Files journey
|
|
475
|
-
* when the caller asked to be traced. The CLI
|
|
476
|
-
* effects and never sees this runtime's stdout, so
|
|
477
|
-
* is the only way a typed command can report what its
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
472
|
+
/** Run one Files journey in the Files program, which returns its own
|
|
473
|
+
* stage ledger with the result when the caller asked to be traced. The CLI
|
|
474
|
+
* process owns no Files effects and never sees this runtime's stdout, so
|
|
475
|
+
* returning the ledger is the only way a typed command can report what its
|
|
476
|
+
* journey spent. */
|
|
477
|
+
journey(run) {
|
|
478
|
+
return this.filesJourneys(async () => {
|
|
479
|
+
this.assertSyncEnabled();
|
|
480
|
+
if (!this.groundHost)
|
|
481
|
+
throw new Error("Files commands require a running authenticated runtime");
|
|
482
|
+
return run(this.groundHost);
|
|
483
|
+
});
|
|
483
484
|
}
|
|
484
|
-
watchEvidence() {
|
|
485
|
+
async watchEvidence() {
|
|
485
486
|
this.assertSyncEnabled();
|
|
486
487
|
if (!this.groundHost)
|
|
487
488
|
throw new Error("Watch evidence requires a running authenticated runtime");
|
|
488
489
|
return this.groundHost.watchEvidence();
|
|
489
490
|
}
|
|
490
|
-
async callFilesRuntime(path, body) {
|
|
491
|
-
return callRuntimeCommand(await this.runtimeCommandAddress(), path, body);
|
|
491
|
+
async callFilesRuntime(path, body, signal) {
|
|
492
|
+
return callRuntimeCommand(await this.runtimeCommandAddress(), path, body, signal);
|
|
493
|
+
}
|
|
494
|
+
/** With the rails running: put back missing names and send what is unsent. */
|
|
495
|
+
catchUpKeychain() {
|
|
496
|
+
if (this.syncPhase !== 'enabled')
|
|
497
|
+
return;
|
|
498
|
+
this.keychain?.catchUp().catch((error) => this.options.onBackgroundError?.(error));
|
|
492
499
|
}
|
|
493
500
|
/** The running runtime's loopback address and admission token, for product commands. */
|
|
494
501
|
async runtimeConnection() {
|
|
@@ -515,6 +522,16 @@ export class MachineHost {
|
|
|
515
522
|
this.ownership.close();
|
|
516
523
|
}
|
|
517
524
|
}
|
|
525
|
+
/** Takes no new work, then resolves once nothing runs here, or with what
|
|
526
|
+
* still runs when `force` aborts first. A mount's disk is destroyed after
|
|
527
|
+
* it stops, so it closes only on an idle answer, and only after Watch has
|
|
528
|
+
* counted every change the OS already handed it. */
|
|
529
|
+
stopWhenIdle(force) {
|
|
530
|
+
for (const runtime of this.running) {
|
|
531
|
+
runtime.stopNewWork().catch((error) => this.options.onBackgroundError?.(error));
|
|
532
|
+
}
|
|
533
|
+
return waitForIdle(this.activity, force, () => this.groundHost?.flushWatch() ?? Promise.resolve());
|
|
534
|
+
}
|
|
518
535
|
async drainRuntime(options = {}) {
|
|
519
536
|
await this.syncChange;
|
|
520
537
|
const runtimes = [...this.running];
|
|
@@ -533,20 +550,75 @@ export class MachineHost {
|
|
|
533
550
|
this.groundHost = null;
|
|
534
551
|
for (const runtime of runtimes)
|
|
535
552
|
await runtime.stop().catch(() => undefined);
|
|
536
|
-
|
|
553
|
+
const drive = this.servedDrive;
|
|
554
|
+
const wire = this.runtimeWire;
|
|
555
|
+
const files = this.files;
|
|
556
|
+
this.servedDrive = null;
|
|
537
557
|
this.runtimeWire = null;
|
|
558
|
+
this.files = null;
|
|
538
559
|
this.createGround = null;
|
|
539
560
|
this.syncIdentity = null;
|
|
540
561
|
this.syncPhase = 'stopped';
|
|
562
|
+
// The drive unmounts only here, as the whole runtime stops, once
|
|
563
|
+
// nothing that may look under it still runs.
|
|
564
|
+
try {
|
|
565
|
+
await drive?.unmount();
|
|
566
|
+
await wire?.close();
|
|
567
|
+
}
|
|
568
|
+
finally {
|
|
569
|
+
await files?.close();
|
|
570
|
+
}
|
|
541
571
|
}
|
|
542
572
|
}
|
|
543
573
|
syncSettingFile() { return this.user().computer.sync; }
|
|
544
574
|
syncMode() { return readSyncMode(this.syncSettingFile()); }
|
|
545
|
-
syncStatus() {
|
|
575
|
+
async syncStatus() {
|
|
576
|
+
// Sync stays on through a stopped Files program, but Watch and Record do
|
|
577
|
+
// not stand until it does: saying so never waits on its restart.
|
|
578
|
+
const down = this.syncPhase === 'enabled' ? this.files?.down() : null;
|
|
579
|
+
if (down) {
|
|
580
|
+
return { configured: this.syncMode(), state: down.parked ? 'failed' : 'starting', error: down.reason };
|
|
581
|
+
}
|
|
582
|
+
const heard = await this.heardBlocked();
|
|
546
583
|
return { configured: this.syncMode(),
|
|
547
584
|
state: this.wireComposed ? this.syncPhase : 'unavailable',
|
|
548
585
|
...(this.syncError ? { error: this.syncError } : {}),
|
|
549
|
-
...(
|
|
586
|
+
...(heard ? { ...heard.held, blockedHeardAt: new Date(heard.at).toISOString() } : {}) };
|
|
587
|
+
}
|
|
588
|
+
/** Status always answers: it asks the Files program what it holds back and
|
|
589
|
+
* waits for it at most one loop budget, then says the program's last
|
|
590
|
+
* answer and when it was heard. A busy program delays only the freshness of
|
|
591
|
+
* that part, never the answer. One question is in flight at a time; a
|
|
592
|
+
* program that stopped for good holds back nothing it can name. */
|
|
593
|
+
async heardBlocked() {
|
|
594
|
+
const ground = this.groundHost;
|
|
595
|
+
if (!ground)
|
|
596
|
+
return null;
|
|
597
|
+
if (this.blockedAsking?.ground !== ground) {
|
|
598
|
+
const asking = { ground, answered: ground.blocked().then((held) => { this.blockedHeard = { ground, held, at: Date.now() }; }, () => { if (this.blockedHeard?.ground === ground)
|
|
599
|
+
this.blockedHeard = null; }).finally(() => { if (this.blockedAsking === asking)
|
|
600
|
+
this.blockedAsking = null; }) };
|
|
601
|
+
this.blockedAsking = asking;
|
|
602
|
+
}
|
|
603
|
+
let timer;
|
|
604
|
+
await Promise.race([
|
|
605
|
+
this.blockedAsking.answered,
|
|
606
|
+
new Promise((done) => { timer = setTimeout(done, LOOP_BUDGET_MS); }),
|
|
607
|
+
]);
|
|
608
|
+
clearTimeout(timer);
|
|
609
|
+
return this.blockedHeard?.ground === ground ? this.blockedHeard : null;
|
|
610
|
+
}
|
|
611
|
+
/** Live's Files counts, handed out again: the instance handed them last is
|
|
612
|
+
* their one reporter. */
|
|
613
|
+
filesCounts() {
|
|
614
|
+
return { unsent: this.activity.hook("live", "unsent"), unsettled: this.activity.hook("live", "unsettled") };
|
|
615
|
+
}
|
|
616
|
+
/** Stops a Files instance while the runtime keeps running. Its counts go to
|
|
617
|
+
* nobody first: a closed instance reports nothing more, and while Files is
|
|
618
|
+
* paused or failed nothing can say that nothing would be lost. */
|
|
619
|
+
async stopGround(ground, options) {
|
|
620
|
+
this.filesCounts();
|
|
621
|
+
await ground?.close(options);
|
|
550
622
|
}
|
|
551
623
|
/** The single control point for CLI, API and future product policy. */
|
|
552
624
|
setSyncMode(mode) {
|
|
@@ -558,7 +630,7 @@ export class MachineHost {
|
|
|
558
630
|
if (mode === 'paused') {
|
|
559
631
|
this.syncPhase = 'pausing';
|
|
560
632
|
try {
|
|
561
|
-
await this.groundHost
|
|
633
|
+
await this.stopGround(this.groundHost, { catchUp: false });
|
|
562
634
|
}
|
|
563
635
|
catch (error) {
|
|
564
636
|
this.syncError = error instanceof Error ? error.message : String(error);
|
|
@@ -576,7 +648,7 @@ export class MachineHost {
|
|
|
576
648
|
this.syncError = undefined;
|
|
577
649
|
let ground;
|
|
578
650
|
try {
|
|
579
|
-
await this.groundHost
|
|
651
|
+
await this.stopGround(this.groundHost, { catchUp: false });
|
|
580
652
|
ground = await this.createGround();
|
|
581
653
|
}
|
|
582
654
|
catch (error) {
|
|
@@ -585,16 +657,17 @@ export class MachineHost {
|
|
|
585
657
|
return this.syncStatus();
|
|
586
658
|
}
|
|
587
659
|
this.groundHost = ground;
|
|
588
|
-
this.syncStart =
|
|
660
|
+
this.syncStart = this.convergeGround(ground, this.syncIdentity).then(() => {
|
|
589
661
|
if (this.activeSyncMode === 'enabled')
|
|
590
662
|
this.syncPhase = 'enabled';
|
|
663
|
+
this.catchUpKeychain();
|
|
591
664
|
}, async (error) => {
|
|
592
665
|
// A requested pause owns shutdown; any other failure is contained
|
|
593
666
|
// in Files and leaves the runtime, its chat and its Wire untouched.
|
|
594
|
-
if (this.activeSyncMode === 'paused')
|
|
667
|
+
if (this.activeSyncMode === 'paused' || this.groundHost !== ground)
|
|
595
668
|
return;
|
|
596
669
|
try {
|
|
597
|
-
await
|
|
670
|
+
await this.stopGround(ground, { catchUp: false });
|
|
598
671
|
this.groundHost = null;
|
|
599
672
|
}
|
|
600
673
|
catch (stopError) {
|
|
@@ -678,7 +751,7 @@ export class MachineHost {
|
|
|
678
751
|
};
|
|
679
752
|
}
|
|
680
753
|
user(email = this.requireSelectedUser()) {
|
|
681
|
-
return userLayout(this.
|
|
754
|
+
return userLayout(join(this.homes, userFolderName(email)));
|
|
682
755
|
}
|
|
683
756
|
requireSelectedUser() {
|
|
684
757
|
if (!this.selectedUserEmail) {
|
|
@@ -691,13 +764,13 @@ export class MachineHost {
|
|
|
691
764
|
resolveUserForResume() {
|
|
692
765
|
if (this.selectedUserEmail)
|
|
693
766
|
return;
|
|
694
|
-
if (!existsSync(this.
|
|
767
|
+
if (!existsSync(this.homes))
|
|
695
768
|
return;
|
|
696
769
|
const candidates = [];
|
|
697
|
-
for (const entry of readdirSync(this.
|
|
770
|
+
for (const entry of readdirSync(this.homes, { withFileTypes: true })) {
|
|
698
771
|
if (!entry.isDirectory())
|
|
699
772
|
continue;
|
|
700
|
-
const user = userLayout(join(this.
|
|
773
|
+
const user = userLayout(join(this.homes, entry.name));
|
|
701
774
|
const manifest = readJson(user.manifest);
|
|
702
775
|
const email = normalizeEmail(manifest?.canonicalEmail || entry.name);
|
|
703
776
|
const status = readJson(user.computer.status);
|
|
@@ -763,6 +836,8 @@ export class MachineHost {
|
|
|
763
836
|
this.selectedUserEmail = recordEmail;
|
|
764
837
|
this.acquireRuntimeOwnership();
|
|
765
838
|
const { computer } = this.user();
|
|
839
|
+
// The sign-in secret, the credentials and the vault share this folder.
|
|
840
|
+
ensureOwnerOnlyDir(computer.dir);
|
|
766
841
|
atomicJsonSet([
|
|
767
842
|
[computer.record, machine.publicRecord],
|
|
768
843
|
[computer.auth, machine.secretAuth],
|
|
@@ -786,6 +861,11 @@ export class MachineHost {
|
|
|
786
861
|
throw Object.assign(new Error("runtime identity or credentials are incomplete"), { code: "runtime_identity_incomplete" });
|
|
787
862
|
}
|
|
788
863
|
const user = this.user(userEmail);
|
|
864
|
+
ensureOwnerOnlyDir(user.computer.dir);
|
|
865
|
+
// One door (drive/README.md): on a drive computer every path handed to a
|
|
866
|
+
// person or a program they run is under the mountpoint, and the
|
|
867
|
+
// runtime's own bricks keep their whole folders on the shelf, `user`.
|
|
868
|
+
const door = this.options.drive ? userLayout(driveLayout(this.lane).mountpoint(userEmail)) : user;
|
|
789
869
|
const runtimeToken = randomBytes(32).toString("base64url");
|
|
790
870
|
const runtimeIdentity = createRuntimeIdentity({
|
|
791
871
|
binding: this.binding, userScope: userEmail, deviceId, instanceId: randomUUID(),
|
|
@@ -804,7 +884,8 @@ export class MachineHost {
|
|
|
804
884
|
};
|
|
805
885
|
const pty = createPtyHost({
|
|
806
886
|
env,
|
|
807
|
-
defaultCwd:
|
|
887
|
+
defaultCwd: door.workspaces,
|
|
888
|
+
activity: this.activity.hook("core", "terminals"),
|
|
808
889
|
});
|
|
809
890
|
const services = new Set(machine.installation.services);
|
|
810
891
|
const state = new StateRail({
|
|
@@ -813,8 +894,11 @@ export class MachineHost {
|
|
|
813
894
|
const workspaceHost = createWorkspaceHost({
|
|
814
895
|
file: user.computer.workspaces,
|
|
815
896
|
computerId,
|
|
816
|
-
workspaceRoot:
|
|
897
|
+
workspaceRoot: door.workspaces,
|
|
817
898
|
state,
|
|
899
|
+
...(this.options.drive ? {
|
|
900
|
+
drive: { shelf: user.workspaces, folderAt: (path) => this.folderAt(door.root, path) },
|
|
901
|
+
} : {}),
|
|
818
902
|
});
|
|
819
903
|
const chatHostSdk = services.has("chat") ? await import("@amalgm/chat/host") : null;
|
|
820
904
|
const agentsSdk = services.has("agents") ? await import("@amalgm/agents") : null;
|
|
@@ -856,15 +940,21 @@ export class MachineHost {
|
|
|
856
940
|
parked: user.computer.parked,
|
|
857
941
|
recordConstruct: (change) => {
|
|
858
942
|
this.assertSyncEnabled();
|
|
859
|
-
|
|
860
|
-
if (!ground)
|
|
943
|
+
if (!this.groundHost)
|
|
861
944
|
throw new Error("Recording an app requires a converged runtime");
|
|
862
|
-
return
|
|
945
|
+
return this.groundHost.recordConstruct({ entityType: "app", ...change });
|
|
863
946
|
},
|
|
947
|
+
// A crash loop that gives up, or a callback that fails, is never silent.
|
|
948
|
+
onError: (error) => this.options.onBackgroundError?.(error),
|
|
949
|
+
activity: this.activity.hook("apps", "running"),
|
|
864
950
|
})
|
|
865
951
|
: null;
|
|
952
|
+
// Set once the runtime listens; closing waits for it so Apps never closes mid-boot.
|
|
953
|
+
let appsBooted = null;
|
|
866
954
|
const appsMcp = appsService ? appsSdk.createMcpServer({ apps: appsService }) : null;
|
|
867
955
|
this.appsProduct = appsService ? appsSdk.appConstructSurface(appsService) : null;
|
|
956
|
+
if (!appsService)
|
|
957
|
+
await this.files?.products({ app: false });
|
|
868
958
|
const platformTools = services.has("tools")
|
|
869
959
|
? await (await import("./platform-tools.js")).platformToolDefinitions({
|
|
870
960
|
...(agentsMcp ? { agents: agentsMcp } : {}),
|
|
@@ -874,12 +964,34 @@ export class MachineHost {
|
|
|
874
964
|
products: {
|
|
875
965
|
automations: Boolean(this.options.platformProducts?.automationsBaseUrl),
|
|
876
966
|
channels: Boolean(this.options.platformProducts?.channelsBaseUrl),
|
|
967
|
+
files: Boolean(this.options.platformProducts?.filesBaseUrl),
|
|
877
968
|
},
|
|
878
969
|
})
|
|
879
970
|
: [];
|
|
971
|
+
// Login placed the agents folder whole, on a drive computer too, so the
|
|
972
|
+
// stock agents meet the ones the graph holds, never listed addresses.
|
|
880
973
|
if (agentsService)
|
|
881
974
|
installBuiltinAgents(agentsService, platformTools.map((tool) => tool.id));
|
|
882
975
|
const credentialVault = createCredentialVault(user.computer.credentials);
|
|
976
|
+
const keychain = openKeychainHost({
|
|
977
|
+
file: keychainFile(dirname(user.computer.credentials)),
|
|
978
|
+
wire: () => {
|
|
979
|
+
const wire = this.runtimeWire;
|
|
980
|
+
return wire ? (frame) => wire.vaultKey(frame.version ?? null) : null;
|
|
981
|
+
},
|
|
982
|
+
withGround: async (act) => {
|
|
983
|
+
this.assertSyncEnabled();
|
|
984
|
+
const ground = this.groundHost;
|
|
985
|
+
if (!ground)
|
|
986
|
+
throw new Error("The keychain needs a converged runtime");
|
|
987
|
+
return act(ground);
|
|
988
|
+
},
|
|
989
|
+
onError: (error) => this.options.onBackgroundError?.(error),
|
|
990
|
+
presence: this.options.keychainPresence,
|
|
991
|
+
});
|
|
992
|
+
this.keychain = keychain;
|
|
993
|
+
await this.files?.products({ secret: true });
|
|
994
|
+
this.catchUpKeychain();
|
|
883
995
|
const toolsMcp = services.has("tools")
|
|
884
996
|
? await createShellToolsMcp({
|
|
885
997
|
root: user.toolbox,
|
|
@@ -913,28 +1025,24 @@ export class MachineHost {
|
|
|
913
1025
|
? { platform: this.options.authorizationPlatform }
|
|
914
1026
|
: {}),
|
|
915
1027
|
});
|
|
1028
|
+
// Files billing, for this computer's own CLI and agents (billing/mount.ts).
|
|
1029
|
+
const billingMcp = (await import("./billing/mount.js")).billingMount((await import("./billing/tools.js")).createBillingTools({
|
|
1030
|
+
authorization,
|
|
1031
|
+
appUrl: this.options.appUrl,
|
|
1032
|
+
gatewayUrl: runtimeGatewayOrigin(this.binding, this.options.appUrl, this.options.wireUrl),
|
|
1033
|
+
}));
|
|
916
1034
|
// The Sharing doors. Constructs are entity types on the rails, so the
|
|
917
1035
|
// surface is mounted for every installation: which products answer for a
|
|
918
1036
|
// construct kind is an installation fact, reported in that kind's own
|
|
919
|
-
// lane.
|
|
920
|
-
// under a long-lived mount.
|
|
1037
|
+
// lane. Each command runs on the ground converged when it is asked,
|
|
1038
|
+
// because the rail stops and starts under a long-lived mount.
|
|
921
1039
|
const sharing = (await import("./sharing-host.js")).createSharingSurface({
|
|
922
|
-
|
|
1040
|
+
execute: async (name, request) => {
|
|
923
1041
|
this.assertSyncEnabled();
|
|
924
1042
|
if (!this.groundHost)
|
|
925
1043
|
throw new Error("Sharing requires a running authenticated runtime");
|
|
926
|
-
return this.groundHost.
|
|
927
|
-
constructs: createConstructPort({
|
|
928
|
-
// Apps records its constructs through the intentional door, so
|
|
929
|
-
// it answers for `app`. A kind no product owns here resolves to
|
|
930
|
-
// "not selected in this installation"; no other kind is hurt.
|
|
931
|
-
products: this.appsProduct ? { app: this.appsProduct } : {},
|
|
932
|
-
kindOf: async (uuid) => this.groundHost?.constructKind(uuid) ?? null,
|
|
933
|
-
}),
|
|
934
|
-
link: (id) => `${this.options.appUrl.replace(/\/+$/, "")}/c/${id}`,
|
|
935
|
-
});
|
|
1044
|
+
return this.groundHost.share(name, request, { userId, email: userEmail }, this.options.appUrl.replace(/\/+$/, ""));
|
|
936
1045
|
},
|
|
937
|
-
actor: () => ({ userId, email: userEmail }),
|
|
938
1046
|
});
|
|
939
1047
|
let gateway = null;
|
|
940
1048
|
const gatewayPort = () => {
|
|
@@ -958,6 +1066,7 @@ export class MachineHost {
|
|
|
958
1066
|
credentialBroker: authorization,
|
|
959
1067
|
proxyBaseUrl: env.AMALGM_PROXY_URL,
|
|
960
1068
|
workspaces: workspaceHost.scope,
|
|
1069
|
+
activity: this.activity.hook("chat", "turns"),
|
|
961
1070
|
})
|
|
962
1071
|
: null;
|
|
963
1072
|
if (chat)
|
|
@@ -970,9 +1079,10 @@ export class MachineHost {
|
|
|
970
1079
|
sourceHomeDirectory: this.homedir,
|
|
971
1080
|
...(this.options.platformProducts.automationsBaseUrl ? {
|
|
972
1081
|
processes: (await import("@amalgm/automations")).createNodeAutomationProcessHost({
|
|
973
|
-
defaultCwd:
|
|
1082
|
+
defaultCwd: door.workspaces,
|
|
974
1083
|
environment: { ...process.env, HOME: this.homedir },
|
|
975
1084
|
}),
|
|
1085
|
+
activity: this.activity.hook("automations", "runs"),
|
|
976
1086
|
} : {}),
|
|
977
1087
|
...(toolsMcp ? { toolbox: toolsMcp.toolbox } : {}),
|
|
978
1088
|
...(chat ? { actions: { 'chat.chat_agent_run': chatAgentAction(chat.agentRunner) } } : {}),
|
|
@@ -997,9 +1107,16 @@ export class MachineHost {
|
|
|
997
1107
|
const channelsMcp = products?.channels
|
|
998
1108
|
? await (await import("./official-mcp-host.js")).connectOfficialMcpServer((await import("@amalgm/channels/mcp")).createChannelsMcpServer(products.channels), { name: 'amalgm-channels', version: '0.1.0' })
|
|
999
1109
|
: null;
|
|
1110
|
+
const filesMcp = products?.files ? (await import("./files-mcp-host.js")).mountFilesMcp(products.files) : null;
|
|
1000
1111
|
const chatMcp = chat ? (await import("@amalgm/chat/mcp")).createChatMcpServer(chat.chat, { agentRunner: chat.agentRunner }) : null;
|
|
1001
1112
|
const closeSelectedProducts = async () => {
|
|
1113
|
+
// Boot's word comes first, so the Files program hears this one last, and
|
|
1114
|
+
// it stops asking before the answers stop.
|
|
1115
|
+
await appsBooted;
|
|
1116
|
+
await this.files?.products({ app: null, secret: null }).catch((error) => this.options.onBackgroundError?.(error));
|
|
1002
1117
|
this.appsProduct = null;
|
|
1118
|
+
this.keychain?.close();
|
|
1119
|
+
this.keychain = null;
|
|
1003
1120
|
await appsService?.close();
|
|
1004
1121
|
await browserHost?.close();
|
|
1005
1122
|
};
|
|
@@ -1018,11 +1135,27 @@ export class MachineHost {
|
|
|
1018
1135
|
} },
|
|
1019
1136
|
{
|
|
1020
1137
|
prefix: "/entities/register",
|
|
1021
|
-
handle: (body) => this.journey(
|
|
1138
|
+
handle: (body) => this.journey((ground) => ground.register(bodyText(body, "path"), traced(body))),
|
|
1022
1139
|
},
|
|
1023
1140
|
{
|
|
1024
1141
|
prefix: "/entities/add",
|
|
1025
|
-
handle: (body) => this.journey(
|
|
1142
|
+
handle: (body) => this.journey((ground) => ground.add(bodyText(body, "uuid"), bodyText(body, "path"), traced(body))),
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
prefix: "/entities/trash",
|
|
1146
|
+
handle: async (body) => {
|
|
1147
|
+
const pick = bodyText(body, "pick");
|
|
1148
|
+
// Move to Trash is the web's record, asked of the gateway with this
|
|
1149
|
+
// computer's own token; deleting for good runs here, over the ground.
|
|
1150
|
+
if (pick === "move") {
|
|
1151
|
+
if (!products?.files)
|
|
1152
|
+
throw new Error("Move to Trash needs the hosted Files door, which this runtime has not");
|
|
1153
|
+
return products.files.moveToTrash(bodyText(body, "uuid"));
|
|
1154
|
+
}
|
|
1155
|
+
if (pick !== "all" && pick !== "one")
|
|
1156
|
+
throw new Error('pick is "all", "one" or "move"');
|
|
1157
|
+
return this.journey((ground) => ground.trash(pick === "all" ? "all" : { uuid: bodyText(body, "uuid") }));
|
|
1158
|
+
},
|
|
1026
1159
|
},
|
|
1027
1160
|
{
|
|
1028
1161
|
prefix: "/sharing/cli",
|
|
@@ -1035,6 +1168,7 @@ export class MachineHost {
|
|
|
1035
1168
|
protocol: "mcp-json-rpc",
|
|
1036
1169
|
handle: (body) => sharing.mcp.handle(body),
|
|
1037
1170
|
},
|
|
1171
|
+
billingMcp,
|
|
1038
1172
|
...(agentsMcp ? [{
|
|
1039
1173
|
prefix: "/mcp/agents",
|
|
1040
1174
|
protocol: "mcp-json-rpc",
|
|
@@ -1061,6 +1195,11 @@ export class MachineHost {
|
|
|
1061
1195
|
protocol: "mcp-json-rpc",
|
|
1062
1196
|
handle: (body) => toolsManagement.handle(body),
|
|
1063
1197
|
}] : []),
|
|
1198
|
+
...(filesMcp ? [{
|
|
1199
|
+
prefix: "/mcp/files",
|
|
1200
|
+
protocol: "mcp-json-rpc",
|
|
1201
|
+
handle: (body) => filesMcp.handle(body),
|
|
1202
|
+
}] : []),
|
|
1064
1203
|
...(channelsMcp ? [{
|
|
1065
1204
|
prefix: "/mcp/channels",
|
|
1066
1205
|
protocol: "mcp-json-rpc",
|
|
@@ -1078,6 +1217,7 @@ export class MachineHost {
|
|
|
1078
1217
|
forwardMount("/skills", () => agentsAddress.port, { root: "/skills" }),
|
|
1079
1218
|
] : []),
|
|
1080
1219
|
...credentialVaultMounts(credentialVault),
|
|
1220
|
+
keychain.mount,
|
|
1081
1221
|
...(toolsAddress ? [forwardMount("/toolbox", () => toolsAddress.port, { root: "/toolbox" })] : []),
|
|
1082
1222
|
...(chat?.mounts() ?? []),
|
|
1083
1223
|
stateMount(state),
|
|
@@ -1086,7 +1226,7 @@ export class MachineHost {
|
|
|
1086
1226
|
...(services.has("core") ? [localMount({
|
|
1087
1227
|
home: this.homedir,
|
|
1088
1228
|
env,
|
|
1089
|
-
workspaceRoot:
|
|
1229
|
+
workspaceRoot: door.workspaces,
|
|
1090
1230
|
...(chatHostSdk ? {
|
|
1091
1231
|
providerLogin: chatHostSdk.providerLoginConfigured,
|
|
1092
1232
|
harnessAvailability: () => chatHostSdk.harnessAvailability({ home: this.homedir }),
|
|
@@ -1094,7 +1234,7 @@ export class MachineHost {
|
|
|
1094
1234
|
})] : []),
|
|
1095
1235
|
pty.mount,
|
|
1096
1236
|
],
|
|
1097
|
-
upgrades: [pty.upgrade, ...(browserHost
|
|
1237
|
+
upgrades: [pty.upgrade, ...(browserHost?.upgrades ?? [])],
|
|
1098
1238
|
});
|
|
1099
1239
|
let commandPublication = null;
|
|
1100
1240
|
try {
|
|
@@ -1109,6 +1249,25 @@ export class MachineHost {
|
|
|
1109
1249
|
throw new Error("runtime gateway did not bind a TCP port");
|
|
1110
1250
|
await this.runtimeWire?.start(address.port, runtimeToken);
|
|
1111
1251
|
products?.runner.start();
|
|
1252
|
+
// The apps a person left on come back with the runtime and stay on:
|
|
1253
|
+
// boot adopts the processes that outlived the last runtime, starts the
|
|
1254
|
+
// rest, and keeps every one supervised. It never holds readiness; an
|
|
1255
|
+
// app that cannot start is reported and retried by its own policy.
|
|
1256
|
+
appsBooted = appsService?.boot().then((started) => {
|
|
1257
|
+
for (const result of started) {
|
|
1258
|
+
if (result.status === "rejected")
|
|
1259
|
+
this.options.onBackgroundError?.(result.reason);
|
|
1260
|
+
}
|
|
1261
|
+
}, (error) => {
|
|
1262
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
1263
|
+
this.options.onBackgroundError?.(new Error(`Apps did not boot: ${reason}`, { cause: error }));
|
|
1264
|
+
})
|
|
1265
|
+
// Boot starts every app it finds, so a received app it found half made
|
|
1266
|
+
// would look broken. Only now can Apply deliver. A boot that failed
|
|
1267
|
+
// still says so: each act tries Apps itself and reports what stops it,
|
|
1268
|
+
// and a record never waits for a word that is not coming.
|
|
1269
|
+
.then(() => this.files?.products({ app: true }))
|
|
1270
|
+
.catch((error) => this.options.onBackgroundError?.(error)) ?? null;
|
|
1112
1271
|
commandPublication = {
|
|
1113
1272
|
instanceId: runtimeIdentity.instanceId,
|
|
1114
1273
|
userRoot: user.root,
|
|
@@ -1126,14 +1285,16 @@ export class MachineHost {
|
|
|
1126
1285
|
computerId,
|
|
1127
1286
|
deviceId,
|
|
1128
1287
|
services: machine.installation.services,
|
|
1129
|
-
tunnelsAuthenticated: true,
|
|
1130
1288
|
proxyContext: { userId, computerId },
|
|
1131
1289
|
},
|
|
1290
|
+
// Automations and channels pull work from the cloud; everything else
|
|
1291
|
+
// here is asked for by a person or an agent already at work.
|
|
1292
|
+
stopNewWork: async () => { await products?.runner.close(); },
|
|
1132
1293
|
stop: async () => {
|
|
1133
1294
|
this.running.delete(running);
|
|
1134
1295
|
if (commandPublication)
|
|
1135
1296
|
unpublishRuntimeCommands(commandPublication);
|
|
1136
|
-
this.runtimeWire?.
|
|
1297
|
+
await this.runtimeWire?.configure().catch(() => undefined);
|
|
1137
1298
|
const terminalsClosed = Promise.allSettled([pty.close()]);
|
|
1138
1299
|
try {
|
|
1139
1300
|
const closed = new Promise((resolve) => gateway.close(() => resolve()));
|
|
@@ -1162,7 +1323,7 @@ export class MachineHost {
|
|
|
1162
1323
|
catch (error) {
|
|
1163
1324
|
if (commandPublication)
|
|
1164
1325
|
unpublishRuntimeCommands(commandPublication);
|
|
1165
|
-
this.runtimeWire?.
|
|
1326
|
+
await this.runtimeWire?.configure().catch(() => undefined);
|
|
1166
1327
|
const terminalsClosed = Promise.allSettled([pty.close()]);
|
|
1167
1328
|
for (const close of [
|
|
1168
1329
|
() => browserHost?.close(),
|
|
@@ -1199,6 +1360,10 @@ function normalizeEmail(value) {
|
|
|
1199
1360
|
function text(value) {
|
|
1200
1361
|
return typeof value === "string" ? value.trim() : "";
|
|
1201
1362
|
}
|
|
1363
|
+
/** Whether a Files command asked for its stage ledger. */
|
|
1364
|
+
function traced(body) {
|
|
1365
|
+
return body?.trace === true;
|
|
1366
|
+
}
|
|
1202
1367
|
function bodyText(body, key) {
|
|
1203
1368
|
if (!body || typeof body !== "object" || Array.isArray(body)) {
|
|
1204
1369
|
throw new Error("Files runtime requires a JSON object");
|