@amalgm/shell 0.1.164-preview.44386772850 → 0.1.164-preview.44991101539
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/dist/accepted-fold.js +0 -36
- package/dist/accepted-tail.js +0 -3
- package/dist/accepted-view.js +0 -1
- package/dist/agent-execution.js +0 -2
- package/dist/agent-instructions.js +0 -6
- package/dist/apply-attempt-memory.js +0 -5
- package/dist/apply-control.js +0 -50
- package/dist/apply-displaced-tree.js +0 -51
- package/dist/apply-durability.js +0 -16
- package/dist/apply-enter-build.js +2 -46
- package/dist/apply-enter-plan.js +0 -59
- package/dist/apply-fingerprint.js +0 -21
- package/dist/apply-git-held.js +4 -90
- package/dist/apply-git-storage.js +2 -38
- package/dist/apply-kept.js +0 -40
- package/dist/apply-local-work.js +0 -12
- package/dist/apply-map.js +18 -122
- package/dist/apply-showing.js +0 -71
- package/dist/apply-shown-again.js +0 -22
- package/dist/apply-spelling.js +0 -31
- package/dist/apply-trash-keep.js +5 -28
- package/dist/apply-window-cargo.js +0 -55
- package/dist/apply-window-ground.js +9 -71
- package/dist/apply-window-host.js +42 -421
- package/dist/apply-window-lane.js +0 -73
- package/dist/apply-window-line.js +0 -33
- package/dist/apply-window-recovery.js +0 -26
- package/dist/apply-window-reveal.js +0 -32
- package/dist/apply-window-rows.js +0 -53
- package/dist/apply-window-saves.js +0 -184
- package/dist/apply-window-store.js +0 -61
- package/dist/apply-window-verify.js +0 -42
- package/dist/authority-binding.js +0 -28
- package/dist/authorization/device-key.js +0 -1
- package/dist/authorization/index.js +0 -2
- package/dist/authorization/issuer.js +0 -1
- package/dist/authorization/key-store.js +0 -1
- package/dist/authorization/native-keyring.js +0 -1
- package/dist/authorization/recovery-client.js +0 -2
- package/dist/authorization/recovery-host.js +0 -1
- package/dist/authorization/recovery.js +0 -3
- package/dist/authorization/registration-http.js +0 -2
- package/dist/authorization/secret-process.js +0 -2
- package/dist/authorization/setup-http.js +0 -1
- package/dist/automations-cli-host.js +0 -2
- package/dist/background-error.js +0 -5
- package/dist/baseline-content.js +0 -3
- package/dist/billing/cli.js +0 -10
- package/dist/billing/mount.js +0 -1
- package/dist/billing/tools.js +0 -3
- package/dist/boot-identity.js +0 -12
- package/dist/browser-host.js +0 -15
- package/dist/builtin-agents.js +0 -8
- package/dist/capture-work.js +0 -9
- package/dist/captured-rows.js +4 -6
- package/dist/cargo-group.js +0 -48
- package/dist/cargo-journal.js +0 -36
- package/dist/channel-session.js +0 -9
- package/dist/chat-composition.js +0 -4
- package/dist/chat-host.js +0 -4
- package/dist/chat-toolbox.js +0 -2
- package/dist/chat-tools.js +0 -3
- package/dist/cli-arguments.js +17 -3
- package/dist/cli-commands.js +272 -0
- package/dist/cli.js +24 -72
- package/dist/construct-apply-host.js +0 -24
- package/dist/construct-door.js +3 -15
- package/dist/construct-ledger.js +3 -21
- package/dist/construct-products.js +0 -7
- package/dist/content-cache-collection.js +1 -27
- package/dist/content-cache-fences.js +0 -30
- package/dist/content-cache-host.js +0 -216
- package/dist/content-cache-index.js +0 -24
- package/dist/content-cache-namespace.js +0 -52
- package/dist/content-cache-partials.js +0 -23
- package/dist/content-cache-retention.js +1 -53
- package/dist/content-capture-pool.js +6 -134
- package/dist/content-capture-worker.js +4 -14
- package/dist/content-clock.js +1 -177
- package/dist/content-direct.js +0 -39
- package/dist/content-failure.js +0 -8
- package/dist/content-qualification.js +0 -56
- package/dist/content-wire-codec.js +0 -8
- package/dist/credentials-host.js +0 -2
- package/dist/derived-relocation.js +0 -27
- package/dist/detection/accepted-result.js +0 -14
- package/dist/detection/admission-save.js +0 -10
- package/dist/detection/admission-units.js +3 -93
- package/dist/detection/alias-discovery.js +0 -19
- package/dist/detection/alias-examination.js +0 -22
- package/dist/detection/apply-ownership.js +4 -52
- package/dist/detection/basis-advanced.js +0 -11
- package/dist/detection/cached-replay.js +0 -20
- package/dist/detection/capture-outcome.js +0 -20
- package/dist/detection/container-membership.js +0 -19
- package/dist/detection/detect-cancelled.js +0 -3
- package/dist/detection/directory-proof.js +0 -20
- package/dist/detection/dispositions.js +0 -29
- package/dist/detection/examinations.js +0 -32
- package/dist/detection/ground-proof.js +20 -130
- package/dist/detection/ground-reader.js +0 -9
- package/dist/detection/identity-discovery.js +15 -60
- package/dist/detection/maintenance-sweep.js +1 -73
- package/dist/detection/notebook-basis.js +1 -5
- package/dist/detection/owed-examinations.js +0 -4
- package/dist/detection/owed-selection.js +14 -40
- package/dist/detection/policy-owed.js +165 -26
- package/dist/detection/racy-close.js +46 -0
- package/dist/detection/reconciliation-coverage.js +0 -4
- package/dist/detection/repository-state.js +6 -56
- package/dist/detection/reveal-save.js +0 -2
- package/dist/detection/root-examination.js +32 -105
- package/dist/detection/root-walk.js +98 -295
- package/dist/detection/runtime.js +57 -153
- package/dist/detection/scope-frame.js +1 -37
- package/dist/detection/scoped-identity-port.js +0 -21
- package/dist/detection/sealed-folders.js +57 -0
- package/dist/detection/skip-policy.js +185 -0
- package/dist/detection/spelled-lookup.js +0 -19
- package/dist/detection/storage-holder.js +60 -0
- package/dist/detection/thread-database.js +0 -9
- package/dist/detection/unread-content.js +0 -13
- package/dist/detection/unreadable.js +0 -3
- package/dist/detection/walk-law.js +0 -20
- package/dist/detection/walked-roots.js +0 -6
- package/dist/detection/withheld.js +0 -46
- package/dist/development/fly-guest.js +0 -3
- package/dist/development/fly.js +2 -11
- package/dist/development/profile.js +0 -8
- package/dist/drive/cloud-files/asks.js +5 -48
- package/dist/drive/cloud-files/binding.js +0 -14
- package/dist/drive/cloud-files/contents.js +14 -57
- package/dist/drive/cloud-files/door.js +5 -45
- package/dist/drive/cloud-files/paths.js +4 -37
- package/dist/drive/cloud-files/populated.js +0 -14
- package/dist/drive/cloud-files/reconcile.js +18 -97
- package/dist/drive/cloud-files/sync-root.js +7 -21
- package/dist/drive/cloud-files/turns.js +0 -25
- package/dist/drive/cloud-files/writes.js +19 -122
- package/dist/drive/computer.js +0 -19
- package/dist/drive/fuse-opens.js +0 -31
- package/dist/drive/fuse.js +23 -43
- package/dist/drive/kept.js +32 -80
- package/dist/drive/kernel.js +12 -24
- package/dist/drive/layout.js +31 -20
- package/dist/drive/mount.js +53 -125
- package/dist/drive/mountpoint.js +0 -19
- package/dist/drive/names.js +17 -0
- package/dist/drive/nfs/apple-double.js +4 -29
- package/dist/drive/nfs/attributes.js +3 -19
- package/dist/drive/nfs/handles.js +0 -37
- package/dist/drive/nfs/mount3.js +0 -4
- package/dist/drive/nfs/nfs3.js +4 -65
- package/dist/drive/nfs/rpc.js +0 -19
- package/dist/drive/nfs/server.js +0 -14
- package/dist/drive/nfs/xdr.js +0 -15
- package/dist/drive/nfs.js +34 -90
- package/dist/drive/operations.js +46 -120
- package/dist/drive/shelf.js +0 -12
- package/dist/drive-maps.js +54 -0
- package/dist/drive-program/client.js +128 -0
- package/dist/drive-program/ports.js +49 -0
- package/dist/drive-program/program.js +82 -0
- package/dist/drive-program/protocol.js +2 -0
- package/dist/durability-barrier.js +0 -60
- package/dist/entity-access-wire.js +0 -9
- package/dist/entity-channel-holdings.js +0 -17
- package/dist/entity-grant-watch.js +0 -8
- package/dist/entity-record-observability.js +0 -4
- package/dist/entity-record-saves.js +0 -23
- package/dist/entity-record-store.js +0 -51
- package/dist/error-facts.js +1 -3
- package/dist/faults/drain.js +2 -32
- package/dist/faults/queue.js +0 -22
- package/dist/faults/show.js +0 -6
- package/dist/file-time.js +21 -0
- package/dist/files-browser-host.js +15 -7
- package/dist/files-mcp-host.js +0 -6
- package/dist/files-observability.js +0 -1
- package/dist/files-program/client.js +90 -320
- package/dist/files-program/journeys.js +0 -4
- package/dist/files-program/program.js +67 -162
- package/dist/files-program/protocol.js +0 -5
- package/dist/files-register-host.js +8 -56
- package/dist/files-trace.js +0 -39
- package/dist/files-watch-host.js +226 -0
- package/dist/filesystem.js +0 -39
- package/dist/flush.js +0 -37
- package/dist/forward.js +0 -8
- package/dist/gateway.js +0 -9
- package/dist/git/ground-owners.js +0 -11
- package/dist/git/held-package.js +0 -43
- package/dist/git/home.js +79 -67
- package/dist/git/marker.js +0 -9
- package/dist/git/named-objects.js +0 -32
- package/dist/git/objects.js +0 -23
- package/dist/git/play.js +0 -42
- package/dist/git/quarantine.js +0 -47
- package/dist/git/rail.js +55 -286
- package/dist/git/read-state.js +8 -70
- package/dist/git/repository.js +0 -43
- package/dist/git/write-files.js +16 -84
- package/dist/git-binding.js +58 -80
- package/dist/git-cat-file.js +0 -18
- package/dist/git-command.js +1 -71
- package/dist/git-index-entries.js +0 -5
- package/dist/git-index-format.js +0 -71
- package/dist/git-install-lines.js +0 -2
- package/dist/git-launcher-process.js +0 -19
- package/dist/git-launcher.js +1 -33
- package/dist/git-proven-blobs.js +48 -0
- package/dist/graph-heads.js +0 -14
- package/dist/ground-basis.js +1 -183
- package/dist/ground-checkpoint-worker.js +0 -26
- package/dist/ground-checkpoints.js +0 -14
- package/dist/ground-contract.js +1 -43
- package/dist/ground-coordination.js +0 -82
- package/dist/ground-database.js +0 -88
- package/dist/ground-differences.js +0 -6
- package/dist/ground-holders.js +0 -8
- package/dist/ground-initialization-worker.js +0 -7
- package/dist/ground-initialization.js +0 -19
- package/dist/ground-install-saves.js +0 -15
- package/dist/ground-inventory-schema.js +3 -142
- package/dist/ground-marks.js +0 -16
- package/dist/ground-places.js +33 -0
- package/dist/ground-profile.js +0 -77
- package/dist/ground-reads.js +0 -58
- package/dist/ground-relations.js +0 -43
- package/dist/ground-root-index.js +0 -7
- package/dist/ground-row.js +5 -29
- package/dist/ground-save-ops.js +0 -14
- package/dist/ground-saver-worker.js +3 -56
- package/dist/ground-saver.js +0 -52
- package/dist/ground-store.js +10 -144
- package/dist/held-ground.js +60 -0
- package/dist/index.js +0 -1
- package/dist/initial-publication.js +0 -7
- package/dist/install-from-git.js +42 -0
- package/dist/installation/environment.js +0 -4
- package/dist/installation/lease.js +0 -3
- package/dist/installation/ownership.js +0 -13
- package/dist/installation/selection.js +0 -2
- package/dist/keychain/cli-io.js +0 -7
- package/dist/keychain/cli.js +0 -9
- package/dist/keychain/host.js +0 -7
- package/dist/keychain/http-mount.js +0 -10
- package/dist/keychain/key-wire.js +0 -8
- package/dist/keychain/presence-mac.js +0 -7
- package/dist/keychain/presence.js +0 -7
- package/dist/keychain/rail.js +0 -7
- package/dist/keychain/secret-apply.js +0 -11
- package/dist/keychain/shelf-from-ledger.js +0 -7
- package/dist/keychain/use-log.js +0 -6
- package/dist/keychain/vault-file.js +0 -7
- package/dist/line-judge.js +0 -41
- package/dist/line-loops.js +0 -3
- package/dist/link-target.js +0 -38
- package/dist/local-host.js +0 -16
- package/dist/loop-watch.js +0 -13
- package/dist/machine-host.js +29 -123
- package/dist/main.js +4 -5
- package/dist/materialize-records.js +109 -112
- package/dist/materialized-graph.js +0 -1
- package/dist/module-thread.js +0 -8
- package/dist/mount.js +0 -7
- package/dist/native/cloud-files.node +0 -0
- package/dist/native/windows-fs.node +0 -0
- package/dist/official-mcp-host.js +0 -2
- package/dist/on-demand-roots.js +0 -4
- package/dist/open-standing.js +0 -36
- package/dist/own-folders.js +56 -0
- package/dist/own-results.js +0 -31
- package/dist/package-pages.js +0 -13
- package/dist/patient-flush.js +0 -16
- package/dist/physical-path-witness.js +0 -28
- package/dist/placement-owed.js +0 -8
- package/dist/placement-tidy.js +0 -68
- package/dist/platform-product-host.js +0 -3
- package/dist/platform-tools.js +0 -3
- package/dist/process-lifecycle.js +0 -7
- package/dist/product-cli.js +0 -10
- package/dist/pty-host.js +0 -22
- package/dist/received-state.js +0 -46
- package/dist/reference-placement.js +0 -30
- package/dist/registry-graph.js +0 -89
- package/dist/registry-page-cache.js +4 -12
- package/dist/release-catalog.js +0 -3
- package/dist/root-install.js +2 -36
- package/dist/runtime-activity.js +0 -14
- package/dist/runtime-argv.js +0 -8
- package/dist/runtime-command-host.js +0 -17
- package/dist/runtime-node-flags.js +0 -10
- package/dist/runtime-wire-host.js +0 -4
- package/dist/service/adapter.js +0 -6
- package/dist/service/cli.js +12 -46
- package/dist/service/control.js +0 -3
- package/dist/service/index.js +0 -4
- package/dist/service/keepalive.js +2 -21
- package/dist/service/launchd.js +0 -8
- package/dist/service/owner.js +0 -1
- package/dist/service/policy.js +0 -7
- package/dist/service/portable.js +0 -8
- package/dist/service/recovery.js +0 -9
- package/dist/service/registration.js +0 -29
- package/dist/service/systemd-unit.js +0 -4
- package/dist/service/systemd.js +0 -9
- package/dist/service/windows-action.js +0 -12
- package/dist/service/windows-task.js +0 -10
- package/dist/service/windows.js +0 -4
- package/dist/sha256.js +0 -2
- package/dist/sharing-admission.js +0 -16
- package/dist/sharing-host.js +0 -7
- package/dist/sharing-mcp-host.js +0 -6
- package/dist/snapshot-delivery-baseline.js +0 -29
- package/dist/socket-marking.js +0 -9
- package/dist/source-proof.js +0 -29
- package/dist/source-signature.js +4 -93
- package/dist/source-witness.js +0 -6
- package/dist/sqlite-durability.js +0 -12
- package/dist/sqlite.js +0 -10
- package/dist/state-host.js +0 -2
- package/dist/state-store.js +1 -4
- package/dist/supervised-program/child.js +136 -0
- package/dist/supervised-program/messages.js +1 -0
- package/dist/supervised-program/parent.js +249 -0
- package/dist/sync-address.js +0 -16
- package/dist/sync-cli.js +0 -9
- package/dist/sync-setting.js +0 -5
- package/dist/tool-mcp-client.js +0 -2
- package/dist/toolbox-host.js +0 -2
- package/dist/transfer-instrumentation.js +0 -21
- package/dist/turns.js +0 -41
- package/dist/updates/artifacts.js +0 -56
- package/dist/updates/bootstrap.js +0 -53
- package/dist/updates/controller.js +1 -25
- package/dist/updates/isolated-command-lifetime.js +0 -13
- package/dist/updates/locked-packages.js +0 -5
- package/dist/updates/store.js +0 -11
- package/dist/updates/trust.js +0 -6
- package/dist/user-ground-host.js +162 -1501
- package/dist/watching/fsevents.js +3 -41
- package/dist/watching/git-storage.js +0 -24
- package/dist/watching/host.js +65 -275
- package/dist/watching/index.js +1 -2
- package/dist/watching/inotify.js +0 -31
- package/dist/windows-fs.js +0 -5
- package/dist/windows-owner-only.js +0 -17
- package/dist/wire-binary.js +0 -4
- package/dist/wire-client.js +0 -42
- package/dist/wire-join.js +0 -11
- package/dist/wire-outbox.js +0 -29
- package/dist/wire-request-scope.js +0 -3
- package/dist/wire-socket-relay.js +0 -53
- package/dist/workspace-add-intent.js +2 -11
- package/dist/workspace-add-staging.js +4 -99
- package/dist/workspace-host.js +0 -5
- package/dist/workspace-store.js +0 -6
- package/examinations/fixtures/private-wire-authority.js +14 -10
- package/examinations/native-service.mjs +1 -1
- package/examinations/runtime-upgrade.native-test.mjs +11 -8
- package/npm-shrinkwrap.json +14 -14
- package/package.json +8 -17
- package/PURPOSE.md +0 -1956
- package/dist/accepted-fold.d.ts +0 -51
- package/dist/accepted-fold.js.map +0 -1
- package/dist/accepted-tail.d.ts +0 -36
- package/dist/accepted-tail.js.map +0 -1
- package/dist/accepted-view.d.ts +0 -27
- package/dist/accepted-view.js.map +0 -1
- package/dist/agent-execution.d.ts +0 -83
- package/dist/agent-execution.js.map +0 -1
- package/dist/agent-instructions.d.ts +0 -7
- package/dist/agent-instructions.js.map +0 -1
- package/dist/apply-attempt-memory.d.ts +0 -13
- package/dist/apply-attempt-memory.js.map +0 -1
- package/dist/apply-control.d.ts +0 -85
- package/dist/apply-control.js.map +0 -1
- package/dist/apply-displaced-tree.d.ts +0 -63
- package/dist/apply-displaced-tree.js.map +0 -1
- package/dist/apply-durability.d.ts +0 -33
- package/dist/apply-durability.js.map +0 -1
- package/dist/apply-enter-build.d.ts +0 -91
- package/dist/apply-enter-build.js.map +0 -1
- package/dist/apply-enter-plan.d.ts +0 -79
- package/dist/apply-enter-plan.js.map +0 -1
- package/dist/apply-fingerprint.d.ts +0 -39
- package/dist/apply-fingerprint.js.map +0 -1
- package/dist/apply-git-held.d.ts +0 -29
- package/dist/apply-git-held.js.map +0 -1
- package/dist/apply-git-storage.d.ts +0 -38
- package/dist/apply-git-storage.js.map +0 -1
- package/dist/apply-kept.d.ts +0 -42
- package/dist/apply-kept.js.map +0 -1
- package/dist/apply-local-work.d.ts +0 -41
- package/dist/apply-local-work.js.map +0 -1
- package/dist/apply-map.d.ts +0 -116
- package/dist/apply-map.js.map +0 -1
- package/dist/apply-showing.d.ts +0 -104
- package/dist/apply-showing.js.map +0 -1
- package/dist/apply-shown-again.d.ts +0 -28
- package/dist/apply-shown-again.js.map +0 -1
- package/dist/apply-spelling.d.ts +0 -35
- package/dist/apply-spelling.js.map +0 -1
- package/dist/apply-trash-keep.d.ts +0 -96
- package/dist/apply-trash-keep.js.map +0 -1
- package/dist/apply-window-cargo.d.ts +0 -54
- package/dist/apply-window-cargo.js.map +0 -1
- package/dist/apply-window-ground.d.ts +0 -130
- package/dist/apply-window-ground.js.map +0 -1
- package/dist/apply-window-host.d.ts +0 -136
- package/dist/apply-window-host.js.map +0 -1
- package/dist/apply-window-lane.d.ts +0 -30
- package/dist/apply-window-lane.js.map +0 -1
- package/dist/apply-window-line.d.ts +0 -31
- package/dist/apply-window-line.js.map +0 -1
- package/dist/apply-window-recovery.d.ts +0 -5
- package/dist/apply-window-recovery.js.map +0 -1
- package/dist/apply-window-reveal.d.ts +0 -22
- package/dist/apply-window-reveal.js.map +0 -1
- package/dist/apply-window-rows.d.ts +0 -144
- package/dist/apply-window-rows.js.map +0 -1
- package/dist/apply-window-saves.d.ts +0 -224
- package/dist/apply-window-saves.js.map +0 -1
- package/dist/apply-window-store.d.ts +0 -126
- package/dist/apply-window-store.js.map +0 -1
- package/dist/apply-window-verify.d.ts +0 -65
- package/dist/apply-window-verify.js.map +0 -1
- package/dist/authority-binding.d.ts +0 -9
- package/dist/authority-binding.js.map +0 -1
- package/dist/authorization/device-key.d.ts +0 -19
- package/dist/authorization/device-key.js.map +0 -1
- package/dist/authorization/index.d.ts +0 -65
- package/dist/authorization/index.js.map +0 -1
- package/dist/authorization/issuer.d.ts +0 -11
- package/dist/authorization/issuer.js.map +0 -1
- package/dist/authorization/key-store.d.ts +0 -16
- package/dist/authorization/key-store.js.map +0 -1
- package/dist/authorization/native-keyring.d.ts +0 -8
- package/dist/authorization/native-keyring.js.map +0 -1
- package/dist/authorization/recovery-client.d.ts +0 -19
- package/dist/authorization/recovery-client.js.map +0 -1
- package/dist/authorization/recovery-host.d.ts +0 -30
- package/dist/authorization/recovery-host.js.map +0 -1
- package/dist/authorization/recovery.d.ts +0 -13
- package/dist/authorization/recovery.js.map +0 -1
- package/dist/authorization/registration-http.d.ts +0 -5
- package/dist/authorization/registration-http.js.map +0 -1
- package/dist/authorization/secret-process.d.ts +0 -2
- package/dist/authorization/secret-process.js.map +0 -1
- package/dist/authorization/setup-http.d.ts +0 -5
- package/dist/authorization/setup-http.js.map +0 -1
- package/dist/automations-cli-host.d.ts +0 -4
- package/dist/automations-cli-host.js.map +0 -1
- package/dist/background-error.d.ts +0 -4
- package/dist/background-error.js.map +0 -1
- package/dist/baseline-content.d.ts +0 -12
- package/dist/baseline-content.js.map +0 -1
- package/dist/billing/cli.d.ts +0 -18
- package/dist/billing/cli.js.map +0 -1
- package/dist/billing/mount.d.ts +0 -12
- package/dist/billing/mount.js.map +0 -1
- package/dist/billing/tools.d.ts +0 -57
- package/dist/billing/tools.js.map +0 -1
- package/dist/boot-identity.d.ts +0 -1
- package/dist/boot-identity.js.map +0 -1
- package/dist/browser-host.d.ts +0 -30
- package/dist/browser-host.js.map +0 -1
- package/dist/builtin-agents.d.ts +0 -8
- package/dist/builtin-agents.js.map +0 -1
- package/dist/capture-work.d.ts +0 -8
- package/dist/capture-work.js.map +0 -1
- package/dist/captured-rows.d.ts +0 -33
- package/dist/captured-rows.js.map +0 -1
- package/dist/cargo-group.d.ts +0 -59
- package/dist/cargo-group.js.map +0 -1
- package/dist/cargo-journal.d.ts +0 -45
- package/dist/cargo-journal.js.map +0 -1
- package/dist/channel-session.d.ts +0 -60
- package/dist/channel-session.js.map +0 -1
- package/dist/chat-composition.d.ts +0 -30
- package/dist/chat-composition.js.map +0 -1
- package/dist/chat-host.d.ts +0 -30
- package/dist/chat-host.js.map +0 -1
- package/dist/chat-toolbox.d.ts +0 -10
- package/dist/chat-toolbox.js.map +0 -1
- package/dist/chat-tools.d.ts +0 -23
- package/dist/chat-tools.js.map +0 -1
- package/dist/cli-arguments.d.ts +0 -8
- package/dist/cli-arguments.js.map +0 -1
- package/dist/cli.d.ts +0 -10
- package/dist/cli.js.map +0 -1
- package/dist/construct-apply-host.d.ts +0 -64
- package/dist/construct-apply-host.js.map +0 -1
- package/dist/construct-door.d.ts +0 -39
- package/dist/construct-door.js.map +0 -1
- package/dist/construct-ledger.d.ts +0 -33
- package/dist/construct-ledger.js.map +0 -1
- package/dist/construct-products.d.ts +0 -22
- package/dist/construct-products.js.map +0 -1
- package/dist/content-cache-collection.d.ts +0 -25
- package/dist/content-cache-collection.js.map +0 -1
- package/dist/content-cache-fences.d.ts +0 -27
- package/dist/content-cache-fences.js.map +0 -1
- package/dist/content-cache-host.d.ts +0 -269
- package/dist/content-cache-host.js.map +0 -1
- package/dist/content-cache-index.d.ts +0 -59
- package/dist/content-cache-index.js.map +0 -1
- package/dist/content-cache-namespace.d.ts +0 -53
- package/dist/content-cache-namespace.js.map +0 -1
- package/dist/content-cache-partials.d.ts +0 -37
- package/dist/content-cache-partials.js.map +0 -1
- package/dist/content-cache-retention.d.ts +0 -38
- package/dist/content-cache-retention.js.map +0 -1
- package/dist/content-capture-pool.d.ts +0 -274
- package/dist/content-capture-pool.js.map +0 -1
- package/dist/content-capture-worker.d.ts +0 -7
- package/dist/content-capture-worker.js.map +0 -1
- package/dist/content-clock.d.ts +0 -68
- package/dist/content-clock.js.map +0 -1
- package/dist/content-direct.d.ts +0 -56
- package/dist/content-direct.js.map +0 -1
- package/dist/content-failure.d.ts +0 -18
- package/dist/content-failure.js.map +0 -1
- package/dist/content-qualification.d.ts +0 -72
- package/dist/content-qualification.js.map +0 -1
- package/dist/content-wire-codec.d.ts +0 -13
- package/dist/content-wire-codec.js.map +0 -1
- package/dist/credentials-host.d.ts +0 -5
- package/dist/credentials-host.js.map +0 -1
- package/dist/derived-relocation.d.ts +0 -31
- package/dist/derived-relocation.js.map +0 -1
- package/dist/detection/accepted-result.d.ts +0 -31
- package/dist/detection/accepted-result.js.map +0 -1
- package/dist/detection/admission-save.d.ts +0 -66
- package/dist/detection/admission-save.js.map +0 -1
- package/dist/detection/admission-units.d.ts +0 -78
- package/dist/detection/admission-units.js.map +0 -1
- package/dist/detection/alias-discovery.d.ts +0 -12
- package/dist/detection/alias-discovery.js.map +0 -1
- package/dist/detection/alias-examination.d.ts +0 -33
- package/dist/detection/alias-examination.js.map +0 -1
- package/dist/detection/apply-ownership.d.ts +0 -107
- package/dist/detection/apply-ownership.js.map +0 -1
- package/dist/detection/basis-advanced.d.ts +0 -15
- package/dist/detection/basis-advanced.js.map +0 -1
- package/dist/detection/cached-replay.d.ts +0 -38
- package/dist/detection/cached-replay.js.map +0 -1
- package/dist/detection/capture-outcome.d.ts +0 -16
- package/dist/detection/capture-outcome.js.map +0 -1
- package/dist/detection/container-membership.d.ts +0 -20
- package/dist/detection/container-membership.js.map +0 -1
- package/dist/detection/detect-cancelled.d.ts +0 -6
- package/dist/detection/detect-cancelled.js.map +0 -1
- package/dist/detection/directory-proof.d.ts +0 -47
- package/dist/detection/directory-proof.js.map +0 -1
- package/dist/detection/dispositions.d.ts +0 -107
- package/dist/detection/dispositions.js.map +0 -1
- package/dist/detection/examinations.d.ts +0 -33
- package/dist/detection/examinations.js.map +0 -1
- package/dist/detection/ground-proof.d.ts +0 -154
- package/dist/detection/ground-proof.js.map +0 -1
- package/dist/detection/ground-reader.d.ts +0 -29
- package/dist/detection/ground-reader.js.map +0 -1
- package/dist/detection/identity-discovery.d.ts +0 -45
- package/dist/detection/identity-discovery.js.map +0 -1
- package/dist/detection/maintenance-sweep.d.ts +0 -111
- package/dist/detection/maintenance-sweep.js.map +0 -1
- package/dist/detection/notebook-basis.d.ts +0 -24
- package/dist/detection/notebook-basis.js.map +0 -1
- package/dist/detection/owed-examinations.d.ts +0 -22
- package/dist/detection/owed-examinations.js.map +0 -1
- package/dist/detection/owed-selection.d.ts +0 -54
- package/dist/detection/owed-selection.js.map +0 -1
- package/dist/detection/policy-owed.d.ts +0 -17
- package/dist/detection/policy-owed.js.map +0 -1
- package/dist/detection/reconciliation-coverage.d.ts +0 -7
- package/dist/detection/reconciliation-coverage.js.map +0 -1
- package/dist/detection/repository-state.d.ts +0 -44
- package/dist/detection/repository-state.js.map +0 -1
- package/dist/detection/reveal-save.d.ts +0 -17
- package/dist/detection/reveal-save.js.map +0 -1
- package/dist/detection/root-examination.d.ts +0 -106
- package/dist/detection/root-examination.js.map +0 -1
- package/dist/detection/root-walk.d.ts +0 -191
- package/dist/detection/root-walk.js.map +0 -1
- package/dist/detection/runtime.d.ts +0 -144
- package/dist/detection/runtime.js.map +0 -1
- package/dist/detection/scope-frame.d.ts +0 -82
- package/dist/detection/scope-frame.js.map +0 -1
- package/dist/detection/scoped-identity-port.d.ts +0 -35
- package/dist/detection/scoped-identity-port.js.map +0 -1
- package/dist/detection/sharing-policy.d.ts +0 -19
- package/dist/detection/sharing-policy.js +0 -39
- package/dist/detection/sharing-policy.js.map +0 -1
- package/dist/detection/spelled-lookup.d.ts +0 -20
- package/dist/detection/spelled-lookup.js.map +0 -1
- package/dist/detection/thread-database.d.ts +0 -4
- package/dist/detection/thread-database.js.map +0 -1
- package/dist/detection/unread-content.d.ts +0 -20
- package/dist/detection/unread-content.js.map +0 -1
- package/dist/detection/unreadable.d.ts +0 -11
- package/dist/detection/unreadable.js.map +0 -1
- package/dist/detection/walk-law.d.ts +0 -25
- package/dist/detection/walk-law.js.map +0 -1
- package/dist/detection/walked-roots.d.ts +0 -17
- package/dist/detection/walked-roots.js.map +0 -1
- package/dist/detection/withheld.d.ts +0 -100
- package/dist/detection/withheld.js.map +0 -1
- package/dist/development/fly-guest.d.ts +0 -21
- package/dist/development/fly-guest.js.map +0 -1
- package/dist/development/fly.d.ts +0 -13
- package/dist/development/fly.js.map +0 -1
- package/dist/development/profile.d.ts +0 -34
- package/dist/development/profile.js.map +0 -1
- package/dist/drive/cloud-files/asks.d.ts +0 -7
- package/dist/drive/cloud-files/asks.js.map +0 -1
- package/dist/drive/cloud-files/binding.d.ts +0 -111
- package/dist/drive/cloud-files/binding.js.map +0 -1
- package/dist/drive/cloud-files/contents.d.ts +0 -82
- package/dist/drive/cloud-files/contents.js.map +0 -1
- package/dist/drive/cloud-files/door.d.ts +0 -11
- package/dist/drive/cloud-files/door.js.map +0 -1
- package/dist/drive/cloud-files/paths.d.ts +0 -42
- package/dist/drive/cloud-files/paths.js.map +0 -1
- package/dist/drive/cloud-files/populated.d.ts +0 -15
- package/dist/drive/cloud-files/populated.js.map +0 -1
- package/dist/drive/cloud-files/reconcile.d.ts +0 -17
- package/dist/drive/cloud-files/reconcile.js.map +0 -1
- package/dist/drive/cloud-files/sync-root.d.ts +0 -34
- package/dist/drive/cloud-files/sync-root.js.map +0 -1
- package/dist/drive/cloud-files/turns.d.ts +0 -9
- package/dist/drive/cloud-files/turns.js.map +0 -1
- package/dist/drive/cloud-files/writes.d.ts +0 -27
- package/dist/drive/cloud-files/writes.js.map +0 -1
- package/dist/drive/computer.d.ts +0 -19
- package/dist/drive/computer.js.map +0 -1
- package/dist/drive/fuse-opens.d.ts +0 -32
- package/dist/drive/fuse-opens.js.map +0 -1
- package/dist/drive/fuse.d.ts +0 -36
- package/dist/drive/fuse.js.map +0 -1
- package/dist/drive/kept.d.ts +0 -78
- package/dist/drive/kept.js.map +0 -1
- package/dist/drive/kernel.d.ts +0 -17
- package/dist/drive/kernel.js.map +0 -1
- package/dist/drive/layout.d.ts +0 -18
- package/dist/drive/layout.js.map +0 -1
- package/dist/drive/mount.d.ts +0 -107
- package/dist/drive/mount.js.map +0 -1
- package/dist/drive/mountpoint.d.ts +0 -14
- package/dist/drive/mountpoint.js.map +0 -1
- package/dist/drive/nfs/apple-double.d.ts +0 -6
- package/dist/drive/nfs/apple-double.js.map +0 -1
- package/dist/drive/nfs/attributes.d.ts +0 -64
- package/dist/drive/nfs/attributes.js.map +0 -1
- package/dist/drive/nfs/handles.d.ts +0 -44
- package/dist/drive/nfs/handles.js.map +0 -1
- package/dist/drive/nfs/mount3.d.ts +0 -16
- package/dist/drive/nfs/mount3.js.map +0 -1
- package/dist/drive/nfs/nfs3.d.ts +0 -27
- package/dist/drive/nfs/nfs3.js.map +0 -1
- package/dist/drive/nfs/rpc.d.ts +0 -66
- package/dist/drive/nfs/rpc.js.map +0 -1
- package/dist/drive/nfs/server.d.ts +0 -30
- package/dist/drive/nfs/server.js.map +0 -1
- package/dist/drive/nfs/xdr.d.ts +0 -44
- package/dist/drive/nfs/xdr.js.map +0 -1
- package/dist/drive/nfs.d.ts +0 -58
- package/dist/drive/nfs.js.map +0 -1
- package/dist/drive/operations.d.ts +0 -180
- package/dist/drive/operations.js.map +0 -1
- package/dist/drive/shelf.d.ts +0 -9
- package/dist/drive/shelf.js.map +0 -1
- package/dist/durability-barrier.d.ts +0 -66
- package/dist/durability-barrier.js.map +0 -1
- package/dist/entity-access-wire.d.ts +0 -33
- package/dist/entity-access-wire.js.map +0 -1
- package/dist/entity-channel-holdings.d.ts +0 -26
- package/dist/entity-channel-holdings.js.map +0 -1
- package/dist/entity-grant-watch.d.ts +0 -9
- package/dist/entity-grant-watch.js.map +0 -1
- package/dist/entity-record-observability.d.ts +0 -13
- package/dist/entity-record-observability.js.map +0 -1
- package/dist/entity-record-saves.d.ts +0 -47
- package/dist/entity-record-saves.js.map +0 -1
- package/dist/entity-record-store.d.ts +0 -60
- package/dist/entity-record-store.js.map +0 -1
- package/dist/error-facts.d.ts +0 -24
- package/dist/error-facts.js.map +0 -1
- package/dist/faults/drain.d.ts +0 -27
- package/dist/faults/drain.js.map +0 -1
- package/dist/faults/queue.d.ts +0 -46
- package/dist/faults/queue.js.map +0 -1
- package/dist/faults/show.d.ts +0 -7
- package/dist/faults/show.js.map +0 -1
- package/dist/files-browser-host.d.ts +0 -9
- package/dist/files-browser-host.js.map +0 -1
- package/dist/files-mcp-host.d.ts +0 -58
- package/dist/files-mcp-host.js.map +0 -1
- package/dist/files-observability.d.ts +0 -29
- package/dist/files-observability.js.map +0 -1
- package/dist/files-program/client.d.ts +0 -136
- package/dist/files-program/client.js.map +0 -1
- package/dist/files-program/journeys.d.ts +0 -15
- package/dist/files-program/journeys.js.map +0 -1
- package/dist/files-program/program.d.ts +0 -1
- package/dist/files-program/program.js.map +0 -1
- package/dist/files-program/protocol.d.ts +0 -180
- package/dist/files-program/protocol.js.map +0 -1
- package/dist/files-register-host.d.ts +0 -70
- package/dist/files-register-host.js.map +0 -1
- package/dist/files-trace.d.ts +0 -61
- package/dist/files-trace.js.map +0 -1
- package/dist/filesystem.d.ts +0 -38
- package/dist/filesystem.js.map +0 -1
- package/dist/flush.d.ts +0 -19
- package/dist/flush.js.map +0 -1
- package/dist/forward.d.ts +0 -11
- package/dist/forward.js.map +0 -1
- package/dist/gateway.d.ts +0 -38
- package/dist/gateway.js.map +0 -1
- package/dist/git/ground-owners.d.ts +0 -15
- package/dist/git/ground-owners.js.map +0 -1
- package/dist/git/held-package.d.ts +0 -67
- package/dist/git/held-package.js.map +0 -1
- package/dist/git/home.d.ts +0 -59
- package/dist/git/home.js.map +0 -1
- package/dist/git/marker.d.ts +0 -21
- package/dist/git/marker.js.map +0 -1
- package/dist/git/named-objects.d.ts +0 -24
- package/dist/git/named-objects.js.map +0 -1
- package/dist/git/objects.d.ts +0 -30
- package/dist/git/objects.js.map +0 -1
- package/dist/git/play.d.ts +0 -30
- package/dist/git/play.js.map +0 -1
- package/dist/git/quarantine.d.ts +0 -48
- package/dist/git/quarantine.js.map +0 -1
- package/dist/git/rail.d.ts +0 -206
- package/dist/git/rail.js.map +0 -1
- package/dist/git/read-state.d.ts +0 -49
- package/dist/git/read-state.js.map +0 -1
- package/dist/git/repository.d.ts +0 -62
- package/dist/git/repository.js.map +0 -1
- package/dist/git/write-files.d.ts +0 -29
- package/dist/git/write-files.js.map +0 -1
- package/dist/git-binding.d.ts +0 -53
- package/dist/git-binding.js.map +0 -1
- package/dist/git-cat-file.d.ts +0 -28
- package/dist/git-cat-file.js.map +0 -1
- package/dist/git-command.d.ts +0 -96
- package/dist/git-command.js.map +0 -1
- package/dist/git-index-entries.d.ts +0 -16
- package/dist/git-index-entries.js.map +0 -1
- package/dist/git-index-format.d.ts +0 -52
- package/dist/git-index-format.js.map +0 -1
- package/dist/git-install-lines.d.ts +0 -12
- package/dist/git-install-lines.js.map +0 -1
- package/dist/git-launcher-process.d.ts +0 -1
- package/dist/git-launcher-process.js.map +0 -1
- package/dist/git-launcher.d.ts +0 -70
- package/dist/git-launcher.js.map +0 -1
- package/dist/graph-heads.d.ts +0 -71
- package/dist/graph-heads.js.map +0 -1
- package/dist/ground-basis.d.ts +0 -278
- package/dist/ground-basis.js.map +0 -1
- package/dist/ground-checkpoint-worker.d.ts +0 -1
- package/dist/ground-checkpoint-worker.js.map +0 -1
- package/dist/ground-checkpoints.d.ts +0 -16
- package/dist/ground-checkpoints.js.map +0 -1
- package/dist/ground-contract.d.ts +0 -11
- package/dist/ground-contract.js.map +0 -1
- package/dist/ground-coordination.d.ts +0 -140
- package/dist/ground-coordination.js.map +0 -1
- package/dist/ground-database.d.ts +0 -40
- package/dist/ground-database.js.map +0 -1
- package/dist/ground-differences.d.ts +0 -24
- package/dist/ground-differences.js.map +0 -1
- package/dist/ground-holders.d.ts +0 -4
- package/dist/ground-holders.js.map +0 -1
- package/dist/ground-initialization-worker.d.ts +0 -1
- package/dist/ground-initialization-worker.js.map +0 -1
- package/dist/ground-initialization.d.ts +0 -38
- package/dist/ground-initialization.js.map +0 -1
- package/dist/ground-install-saves.d.ts +0 -104
- package/dist/ground-install-saves.js.map +0 -1
- package/dist/ground-inventory-schema.d.ts +0 -58
- package/dist/ground-inventory-schema.js.map +0 -1
- package/dist/ground-marks.d.ts +0 -49
- package/dist/ground-marks.js.map +0 -1
- package/dist/ground-profile.d.ts +0 -14
- package/dist/ground-profile.js.map +0 -1
- package/dist/ground-reads.d.ts +0 -86
- package/dist/ground-reads.js.map +0 -1
- package/dist/ground-relations.d.ts +0 -57
- package/dist/ground-relations.js.map +0 -1
- package/dist/ground-root-index.d.ts +0 -14
- package/dist/ground-root-index.js.map +0 -1
- package/dist/ground-row.d.ts +0 -78
- package/dist/ground-row.js.map +0 -1
- package/dist/ground-save-ops.d.ts +0 -62
- package/dist/ground-save-ops.js.map +0 -1
- package/dist/ground-saver-worker.d.ts +0 -1
- package/dist/ground-saver-worker.js.map +0 -1
- package/dist/ground-saver.d.ts +0 -103
- package/dist/ground-saver.js.map +0 -1
- package/dist/ground-store.d.ts +0 -125
- package/dist/ground-store.js.map +0 -1
- package/dist/index.d.ts +0 -22
- package/dist/index.js.map +0 -1
- package/dist/initial-publication.d.ts +0 -42
- package/dist/initial-publication.js.map +0 -1
- package/dist/installation/environment.d.ts +0 -34
- package/dist/installation/environment.js.map +0 -1
- package/dist/installation/lease.d.ts +0 -6
- package/dist/installation/lease.js.map +0 -1
- package/dist/installation/ownership.d.ts +0 -30
- package/dist/installation/ownership.js.map +0 -1
- package/dist/installation/selection.d.ts +0 -8
- package/dist/installation/selection.js.map +0 -1
- package/dist/keychain/cli-io.d.ts +0 -8
- package/dist/keychain/cli-io.js.map +0 -1
- package/dist/keychain/cli.d.ts +0 -12
- package/dist/keychain/cli.js.map +0 -1
- package/dist/keychain/host.d.ts +0 -28
- package/dist/keychain/host.js.map +0 -1
- package/dist/keychain/http-mount.d.ts +0 -16
- package/dist/keychain/http-mount.js.map +0 -1
- package/dist/keychain/key-wire.d.ts +0 -12
- package/dist/keychain/key-wire.js.map +0 -1
- package/dist/keychain/presence-mac.d.ts +0 -8
- package/dist/keychain/presence-mac.js.map +0 -1
- package/dist/keychain/presence.d.ts +0 -9
- package/dist/keychain/presence.js.map +0 -1
- package/dist/keychain/rail.d.ts +0 -19
- package/dist/keychain/rail.js.map +0 -1
- package/dist/keychain/secret-apply.d.ts +0 -22
- package/dist/keychain/secret-apply.js.map +0 -1
- package/dist/keychain/shelf-from-ledger.d.ts +0 -15
- package/dist/keychain/shelf-from-ledger.js.map +0 -1
- package/dist/keychain/use-log.d.ts +0 -7
- package/dist/keychain/use-log.js.map +0 -1
- package/dist/keychain/vault-file.d.ts +0 -12
- package/dist/keychain/vault-file.js.map +0 -1
- package/dist/line-judge.d.ts +0 -39
- package/dist/line-judge.js.map +0 -1
- package/dist/line-loops.d.ts +0 -22
- package/dist/line-loops.js.map +0 -1
- package/dist/link-target.d.ts +0 -16
- package/dist/link-target.js.map +0 -1
- package/dist/local-host.d.ts +0 -20
- package/dist/local-host.js.map +0 -1
- package/dist/loop-watch.d.ts +0 -17
- package/dist/loop-watch.js.map +0 -1
- package/dist/machine-host.d.ts +0 -249
- package/dist/machine-host.js.map +0 -1
- package/dist/main.d.ts +0 -2
- package/dist/main.js.map +0 -1
- package/dist/materialize-records.d.ts +0 -98
- package/dist/materialize-records.js.map +0 -1
- package/dist/materialized-graph.d.ts +0 -22
- package/dist/materialized-graph.js.map +0 -1
- package/dist/module-thread.d.ts +0 -9
- package/dist/module-thread.js.map +0 -1
- package/dist/mount.d.ts +0 -13
- package/dist/mount.js.map +0 -1
- package/dist/official-mcp-host.d.ts +0 -51
- package/dist/official-mcp-host.js.map +0 -1
- package/dist/on-demand-roots.d.ts +0 -31
- package/dist/on-demand-roots.js.map +0 -1
- package/dist/open-standing.d.ts +0 -8
- package/dist/open-standing.js.map +0 -1
- package/dist/own-results.d.ts +0 -37
- package/dist/own-results.js.map +0 -1
- package/dist/package-pages.d.ts +0 -41
- package/dist/package-pages.js.map +0 -1
- package/dist/patient-flush.d.ts +0 -24
- package/dist/patient-flush.js.map +0 -1
- package/dist/physical-path-witness.d.ts +0 -64
- package/dist/physical-path-witness.js.map +0 -1
- package/dist/placement-owed.d.ts +0 -28
- package/dist/placement-owed.js.map +0 -1
- package/dist/placement-tidy.d.ts +0 -57
- package/dist/placement-tidy.js.map +0 -1
- package/dist/platform-product-host.d.ts +0 -51
- package/dist/platform-product-host.js.map +0 -1
- package/dist/platform-tools.d.ts +0 -22
- package/dist/platform-tools.js.map +0 -1
- package/dist/process-lifecycle.d.ts +0 -13
- package/dist/process-lifecycle.js.map +0 -1
- package/dist/product-cli.d.ts +0 -26
- package/dist/product-cli.js.map +0 -1
- package/dist/pty-host.d.ts +0 -16
- package/dist/pty-host.js.map +0 -1
- package/dist/received-state.d.ts +0 -90
- package/dist/received-state.js.map +0 -1
- package/dist/reference-placement.d.ts +0 -26
- package/dist/reference-placement.js.map +0 -1
- package/dist/registry-graph.d.ts +0 -112
- package/dist/registry-graph.js.map +0 -1
- package/dist/registry-page-cache.d.ts +0 -15
- package/dist/registry-page-cache.js.map +0 -1
- package/dist/release-catalog.d.ts +0 -5
- package/dist/release-catalog.js.map +0 -1
- package/dist/root-install.d.ts +0 -72
- package/dist/root-install.js.map +0 -1
- package/dist/runtime-activity.d.ts +0 -20
- package/dist/runtime-activity.js.map +0 -1
- package/dist/runtime-argv.d.ts +0 -8
- package/dist/runtime-argv.js.map +0 -1
- package/dist/runtime-command-host.d.ts +0 -46
- package/dist/runtime-command-host.js.map +0 -1
- package/dist/runtime-node-flags.d.ts +0 -10
- package/dist/runtime-node-flags.js.map +0 -1
- package/dist/runtime-wire-host.d.ts +0 -17
- package/dist/runtime-wire-host.js.map +0 -1
- package/dist/service/adapter.d.ts +0 -37
- package/dist/service/adapter.js.map +0 -1
- package/dist/service/cli.d.ts +0 -8
- package/dist/service/cli.js.map +0 -1
- package/dist/service/control.d.ts +0 -38
- package/dist/service/control.js.map +0 -1
- package/dist/service/index.d.ts +0 -9
- package/dist/service/index.js.map +0 -1
- package/dist/service/keepalive.d.ts +0 -11
- package/dist/service/keepalive.js.map +0 -1
- package/dist/service/launchd.d.ts +0 -9
- package/dist/service/launchd.js.map +0 -1
- package/dist/service/owner.d.ts +0 -4
- package/dist/service/owner.js.map +0 -1
- package/dist/service/policy.d.ts +0 -36
- package/dist/service/policy.js.map +0 -1
- package/dist/service/portable.d.ts +0 -10
- package/dist/service/portable.js.map +0 -1
- package/dist/service/recovery.d.ts +0 -28
- package/dist/service/recovery.js.map +0 -1
- package/dist/service/registration.d.ts +0 -84
- package/dist/service/registration.js.map +0 -1
- package/dist/service/systemd-unit.d.ts +0 -7
- package/dist/service/systemd-unit.js.map +0 -1
- package/dist/service/systemd.d.ts +0 -5
- package/dist/service/systemd.js.map +0 -1
- package/dist/service/windows-action.d.ts +0 -18
- package/dist/service/windows-action.js.map +0 -1
- package/dist/service/windows-task.d.ts +0 -15
- package/dist/service/windows-task.js.map +0 -1
- package/dist/service/windows.d.ts +0 -2
- package/dist/service/windows.js.map +0 -1
- package/dist/sha256.d.ts +0 -1
- package/dist/sha256.js.map +0 -1
- package/dist/sharing-admission.d.ts +0 -22
- package/dist/sharing-admission.js.map +0 -1
- package/dist/sharing-host.d.ts +0 -14
- package/dist/sharing-host.js.map +0 -1
- package/dist/sharing-mcp-host.d.ts +0 -23
- package/dist/sharing-mcp-host.js.map +0 -1
- package/dist/snapshot-delivery-baseline.d.ts +0 -31
- package/dist/snapshot-delivery-baseline.js.map +0 -1
- package/dist/socket-marking.d.ts +0 -9
- package/dist/socket-marking.js.map +0 -1
- package/dist/source-proof.d.ts +0 -23
- package/dist/source-proof.js.map +0 -1
- package/dist/source-signature.d.ts +0 -157
- package/dist/source-signature.js.map +0 -1
- package/dist/source-witness.d.ts +0 -9
- package/dist/source-witness.js.map +0 -1
- package/dist/sqlite-durability.d.ts +0 -32
- package/dist/sqlite-durability.js.map +0 -1
- package/dist/sqlite.d.ts +0 -10
- package/dist/sqlite.js.map +0 -1
- package/dist/state-host.d.ts +0 -4
- package/dist/state-host.js.map +0 -1
- package/dist/state-store.d.ts +0 -15
- package/dist/state-store.js.map +0 -1
- package/dist/sync-address.d.ts +0 -16
- package/dist/sync-address.js.map +0 -1
- package/dist/sync-cli.d.ts +0 -7
- package/dist/sync-cli.js.map +0 -1
- package/dist/sync-setting.d.ts +0 -43
- package/dist/sync-setting.js.map +0 -1
- package/dist/tool-mcp-client.d.ts +0 -7
- package/dist/tool-mcp-client.js.map +0 -1
- package/dist/toolbox-host.d.ts +0 -4
- package/dist/toolbox-host.js.map +0 -1
- package/dist/transfer-instrumentation.d.ts +0 -47
- package/dist/transfer-instrumentation.js.map +0 -1
- package/dist/turns.d.ts +0 -44
- package/dist/turns.js.map +0 -1
- package/dist/updates/artifacts.d.ts +0 -66
- package/dist/updates/artifacts.js.map +0 -1
- package/dist/updates/bootstrap.d.ts +0 -94
- package/dist/updates/bootstrap.js.map +0 -1
- package/dist/updates/controller.d.ts +0 -78
- package/dist/updates/controller.js.map +0 -1
- package/dist/updates/isolated-command-lifetime.d.ts +0 -1
- package/dist/updates/isolated-command-lifetime.js.map +0 -1
- package/dist/updates/locked-packages.d.ts +0 -4
- package/dist/updates/locked-packages.js.map +0 -1
- package/dist/updates/store.d.ts +0 -47
- package/dist/updates/store.js.map +0 -1
- package/dist/updates/trust.d.ts +0 -20
- package/dist/updates/trust.js.map +0 -1
- package/dist/user-ground-host.d.ts +0 -1007
- package/dist/user-ground-host.js.map +0 -1
- package/dist/watching/fsevents.d.ts +0 -69
- package/dist/watching/fsevents.js.map +0 -1
- package/dist/watching/git-storage.d.ts +0 -22
- package/dist/watching/git-storage.js.map +0 -1
- package/dist/watching/host.d.ts +0 -388
- package/dist/watching/host.js.map +0 -1
- package/dist/watching/index.d.ts +0 -3
- package/dist/watching/index.js.map +0 -1
- package/dist/watching/inotify.d.ts +0 -81
- package/dist/watching/inotify.js.map +0 -1
- package/dist/windows-fs.d.ts +0 -12
- package/dist/windows-fs.js.map +0 -1
- package/dist/windows-owner-only.d.ts +0 -6
- package/dist/windows-owner-only.js.map +0 -1
- package/dist/wire-binary.d.ts +0 -9
- package/dist/wire-binary.js.map +0 -1
- package/dist/wire-client.d.ts +0 -86
- package/dist/wire-client.js.map +0 -1
- package/dist/wire-join.d.ts +0 -19
- package/dist/wire-join.js.map +0 -1
- package/dist/wire-outbox.d.ts +0 -37
- package/dist/wire-outbox.js.map +0 -1
- package/dist/wire-request-scope.d.ts +0 -17
- package/dist/wire-request-scope.js.map +0 -1
- package/dist/wire-socket-relay.d.ts +0 -54
- package/dist/wire-socket-relay.js.map +0 -1
- package/dist/workspace-add-intent.d.ts +0 -41
- package/dist/workspace-add-intent.js.map +0 -1
- package/dist/workspace-add-staging.d.ts +0 -192
- package/dist/workspace-add-staging.js.map +0 -1
- package/dist/workspace-host.d.ts +0 -32
- package/dist/workspace-host.js.map +0 -1
- package/dist/workspace-store.d.ts +0 -8
- package/dist/workspace-store.js.map +0 -1
- package/skills/shell/SKILL.md +0 -175
package/dist/git/rail.js
CHANGED
|
@@ -1,44 +1,8 @@
|
|
|
1
|
-
/** The repository type's Detect, upload and Apply, each a composition of
|
|
2
|
-
* Live's Git law (@amalgm/live git) over Git's own commands. Working-tree
|
|
3
|
-
* files are not here: they travel as ordinary file entities.
|
|
4
|
-
*
|
|
5
|
-
* Detect reads the Git directory, with no Git process, and records it when
|
|
6
|
-
* its state ID differs from the last state this machine recorded or applied.
|
|
7
|
-
* Upload packs what Git keeps beyond that last state's roots, with the files
|
|
8
|
-
* that state lacks. Apply writes the configuration first, as `git clone`
|
|
9
|
-
* writes it before it fetches, then installs the packs the receiver lacks,
|
|
10
|
-
* writes the other files under Git's locks, and verifies by reading the
|
|
11
|
-
* state back.
|
|
12
|
-
*
|
|
13
|
-
* A repository Git cannot pack (an object it cannot read, a configuration
|
|
14
|
-
* it cannot parse) is still one disk: it travels in byte form (@amalgm/live
|
|
15
|
-
* git/state.ts), its object storage file for file as it stands, and a
|
|
16
|
-
* receiver writes those files with no Git command, so its Git answers as the
|
|
17
|
-
* sender's did. The next state Git packs travels as Git again. Detect reads
|
|
18
|
-
* a repository in the form of the last state this machine recorded or
|
|
19
|
-
* applied, so one that stands still is unchanged in either. A configuration
|
|
20
|
-
* Git cannot parse leaves no Git to ask for the format and home: they are
|
|
21
|
-
* those of the last state here, or, for a repository keeping its own `.git`
|
|
22
|
-
* folder that this machine has never recorded, what its configuration's text
|
|
23
|
-
* names and no home.
|
|
24
|
-
*
|
|
25
|
-
* A linked worktree's or absorbed submodule's Git directory lives inside
|
|
26
|
-
* another repository's (home.ts), so each step also asks `owners` which
|
|
27
|
-
* repository that is and where it stands here. A self-held worktree's lives
|
|
28
|
-
* in its own storage, read and written whole, which a receiver keeps where
|
|
29
|
-
* `owners.storage` names.
|
|
30
|
-
*
|
|
31
|
-
* A repository that borrows objects (`objects/info/alternates`, as `git
|
|
32
|
-
* clone --shared` writes it) borrows them on every machine from the same
|
|
33
|
-
* repository, placed in each machine's ground (@amalgm/live
|
|
34
|
-
* git/alternates.ts). The lender's objects travel with the lender, so a
|
|
35
|
-
* borrower's record follows its lender's within one capture, and a borrower
|
|
36
|
-
* whose lender has yet to bring them waits for its Apply. */
|
|
37
1
|
import { lstat, mkdir, mkdtemp, open as openFile, readFile, realpath, rename, rm, rmdir, stat } from "node:fs/promises";
|
|
38
2
|
import { dirname, join, relative } from "node:path";
|
|
39
3
|
import { LOCAL_DIR_NAME } from "@amalgm/core/identity";
|
|
40
|
-
import { decodeGitArtifact, decodeGitArtifactHead, encodeGitArtifact, failure, GIT_ALTERNATES_PATH, GIT_ARTIFACT_PREFIX, gitApplyPlan, gitArtifactHeadLength, gitAsksGit, gitBlobs, gitBytesForm, gitChainPacks, gitChainReader, gitNamedObjects, gitNewBlobs, gitOwnPath, gitPlayable, gitPlayRecord, gitSelfHeld, gitSharesObjects, gitStateId, gitTransportVersion, isGitConfigurationPath, isGitNamingPath, compareGitText, } from "@amalgm/live";
|
|
41
|
-
import { aimSubmodule, aimWorktree, gitHome, homeGitDir, linkSubmodule, linkWorktree,
|
|
4
|
+
import { decodeGitArtifact, decodeGitArtifactHead, encodeGitArtifact, failure, GIT_ALTERNATES_PATH, GIT_ARTIFACT_PREFIX, gitApplyPlan, gitArtifactHeadLength, gitAsksGit, gitBlobs, gitBytesForm, gitChainPacks, gitChainReader, gitNamedObjects, gitNewBlobs, gitOwnPath, gitPlayable, gitPlayRecord, gitSelfHeld, gitSharesGitDir, gitSharesObjects, gitStateId, gitTransportVersion, isGitConfigurationPath, isGitNamingPath, compareGitText, } from "@amalgm/live";
|
|
5
|
+
import { aimSubmodule, aimWorktree, claimWorktreeGitDir, gitHome, homeGitDir, linkSubmodule, linkWorktree, } from "./home.js";
|
|
42
6
|
import { holdsReach, namesPromisor, packRepository, releaseKeep } from "./objects.js";
|
|
43
7
|
import { gitJoinedFiles, gitLooseObjects, playGit } from "./play.js";
|
|
44
8
|
import { migrateObjects, receiveObjects } from "./quarantine.js";
|
|
@@ -47,11 +11,6 @@ import { gitRefuses, initBareGitRepository, initGitRepository, openGitRepository
|
|
|
47
11
|
import { writeGitSteps } from "./write-files.js";
|
|
48
12
|
import { sha256Hex } from "../sha256.js";
|
|
49
13
|
const absent = (worktree) => { throw new Error(`${worktree} holds no repository`); };
|
|
50
|
-
/** The repository at `worktree`, or null when no `.git` stands there. One
|
|
51
|
-
* Git refuses takes its format and home from `last`; with no last state, one
|
|
52
|
-
* keeping its own `.git` folder has no home and the format its configuration
|
|
53
|
-
* names, and of any other nothing here can say where it lives, so it waits,
|
|
54
|
-
* named as Git's refusal. */
|
|
55
14
|
async function meet(worktree, owners, last) {
|
|
56
15
|
let repository;
|
|
57
16
|
try {
|
|
@@ -74,28 +33,15 @@ async function meet(worktree, owners, last) {
|
|
|
74
33
|
const place = await gitHome(repository, owners);
|
|
75
34
|
return "unsupported" in place ? place : { repository, home: place.home, refused: false };
|
|
76
35
|
}
|
|
77
|
-
/** The object format a configuration Git cannot parse names, read as its
|
|
78
|
-
* text says it (`objectFormat = sha256` under `[extensions]`); SHA-1, Git's
|
|
79
|
-
* own default, when it names none. */
|
|
80
36
|
async function namedFormat(gitDir) {
|
|
81
37
|
const text = await readFile(join(gitDir, "config"), "utf8").catch(() => "");
|
|
82
38
|
return /^\s*objectformat\s*=\s*"?sha256"?\s*(?:[#;].*)?$/im.test(text) ? "sha256" : "sha1";
|
|
83
39
|
}
|
|
84
|
-
/** Whether a repository is read in byte form: Git refuses it, or the state
|
|
85
|
-
* it is compared with is in byte form. */
|
|
86
40
|
const readsAsBytes = (met, compared) => met.refused || compared !== null && gitBytesForm(compared);
|
|
87
|
-
/** The repository's state where its Git directory lives, read in byte form
|
|
88
|
-
* when `bytes`. */
|
|
89
41
|
async function readHere(worktree, owners, last, bytes) {
|
|
90
42
|
const met = await meet(worktree, owners, last) ?? absent(worktree);
|
|
91
43
|
return "unsupported" in met ? met : readGitState(met.repository, met.home, await owners.ground(worktree), undefined, last, bytes);
|
|
92
44
|
}
|
|
93
|
-
/** Keeps the bytes of every file the notebook's state lacks, which an upload
|
|
94
|
-
* carries, and names the lenders its reading's alternates file names. The
|
|
95
|
-
* repository is read in the notebook's form, so one that stands still is
|
|
96
|
-
* unchanged in either; a change is read for Git to pack, unless Git refuses
|
|
97
|
-
* the repository or `bytes` asks for byte form, as when Git could not pack
|
|
98
|
-
* it (detection/repository-state.ts). */
|
|
99
45
|
export async function detectGit(worktree, notebook, owners, bytes = false) {
|
|
100
46
|
const last = async () => notebook?.state ?? null;
|
|
101
47
|
const met = await meet(worktree, owners, last) ?? absent(worktree);
|
|
@@ -120,17 +66,6 @@ export async function detectGit(worktree, notebook, owners, bytes = false) {
|
|
|
120
66
|
return { kind: "changed", stateId, reading: read.reading, bytes: asBytes, repository: met.repository, lenders };
|
|
121
67
|
}
|
|
122
68
|
const NONE = { stateId: null, state: async () => null };
|
|
123
|
-
/** The state ID alone, keeping no bytes, and the directory that state stands
|
|
124
|
-
* in. A repository stands in the form of the state it last stood at. It is
|
|
125
|
-
* read as Git reads it first: a Git-form read equal to the last state's ID
|
|
126
|
-
* proves that state is in Git form, since a state in Git form never names
|
|
127
|
-
* `objects` and so never equals one in byte form. Only otherwise is the last
|
|
128
|
-
* state opened, and a repository whose last state is in byte form is read
|
|
129
|
-
* again so. `stood` names the state it last stood at when that is not
|
|
130
|
-
* `last`, as when Apply asks whether ground already shows a record: a
|
|
131
|
-
* repository that stood in byte form is read so, since its storage is part
|
|
132
|
-
* of what it shows, and a Git-form read would pass over damage a byte-form
|
|
133
|
-
* state left there. */
|
|
134
69
|
export async function gitStateIdOf(worktree, owners, last = NONE, stood) {
|
|
135
70
|
const met = await meet(worktree, owners, last.state) ?? absent(worktree);
|
|
136
71
|
if ("unsupported" in met)
|
|
@@ -148,38 +83,26 @@ export async function gitStateIdOf(worktree, owners, last = NONE, stood) {
|
|
|
148
83
|
return read;
|
|
149
84
|
return readsAsBytes(met, await last.state()) ? readAs(true) : read;
|
|
150
85
|
}
|
|
151
|
-
/** What a state borrows objects from: its alternates file's blob. */
|
|
152
86
|
const borrows = (state) => state.files.find(file => file.path === GIT_ALTERNATES_PATH)?.oid ?? null;
|
|
153
87
|
const LENT = "/.git/objects";
|
|
154
|
-
/** The places the alternates file Apply wrote into the Git directory `dir` names. */
|
|
155
88
|
async function borrowedPlaces(dir) {
|
|
156
89
|
const bytes = await readFile(join(dir, GIT_ALTERNATES_PATH)).catch(() => null);
|
|
157
90
|
return bytes ? alternatePlaces(dir, bytes) : [];
|
|
158
91
|
}
|
|
159
|
-
/** The checkout whose objects `place` is, if any. */
|
|
160
92
|
const lenderAt = (place) => place.endsWith(LENT) ? [place.slice(0, -LENT.length)] : [];
|
|
161
|
-
/** The repositories held here whose checkouts are `lenders`, each once. */
|
|
162
93
|
async function heldLenders(lenders, owners) {
|
|
163
94
|
const held = await Promise.all(lenders.map(async (checkout) => owners.uuidAt(await realpath(checkout).catch(() => checkout))));
|
|
164
95
|
return [...new Set(held.filter(uuid => uuid !== null))];
|
|
165
96
|
}
|
|
166
|
-
/** The artifact for a detected state, following `parent`. A linked
|
|
167
|
-
* worktree's pack is also thin against its main checkout's last state,
|
|
168
|
-
* `main`. One read in byte form carries no pack and names no roots: its
|
|
169
|
-
* storage's files are its blobs. One that changes what it borrows from
|
|
170
|
-
* carries all it keeps itself: what its parent reached, a receiver may hold
|
|
171
|
-
* only through storage it no longer borrows. Everything the artifact says
|
|
172
|
-
* comes from the one reading Detect took: the files, the objects it names,
|
|
173
|
-
* and whether its storage borrows; no Git directory file is read again. */
|
|
174
97
|
export async function uploadGit(change, parent, main = null) {
|
|
175
98
|
const { state, bytes: held } = change.reading;
|
|
176
99
|
const thinAgainst = parent && borrows(parent.state) === borrows(state) ? parent.roots : [];
|
|
177
|
-
// A linked worktree keeps its objects in its main checkout's storage, which
|
|
178
|
-
// borrows what that checkout's last state says; unknown, it may borrow.
|
|
179
100
|
const storage = gitSharesObjects(state) ? main?.state ?? null : state;
|
|
180
101
|
const { roots, excludes, shared, pack } = change.bytes
|
|
181
102
|
? { roots: [], excludes: [], shared: [], pack: new Uint8Array() }
|
|
182
|
-
:
|
|
103
|
+
: gitSharesGitDir(state.home)
|
|
104
|
+
? { roots: parent?.roots ?? [], excludes: parent?.roots ?? [], shared: [], pack: new Uint8Array() }
|
|
105
|
+
: await packRepository(change.repository, thinAgainst, gitSharesObjects(state) ? main?.roots ?? [] : [], change.reading.named, storage === null || borrows(storage) !== null);
|
|
183
106
|
const blobs = new Map(gitNewBlobs(state, null, parent?.state ?? null).map(oid => {
|
|
184
107
|
const found = held.get(oid);
|
|
185
108
|
if (!found)
|
|
@@ -190,26 +113,16 @@ export async function uploadGit(change, parent, main = null) {
|
|
|
190
113
|
const transportVersion = gitTransportVersion(bytes, sha256Hex);
|
|
191
114
|
return { bytes, transportVersion, notebook: { stateId: change.stateId, transportVersion, state, roots } };
|
|
192
115
|
}
|
|
193
|
-
/** Apply cannot act yet: the repository holds a state Git itself refuses, a
|
|
194
|
-
* lock a running Git command holds, or another object format, each ended by
|
|
195
|
-
* a change here, which Detect observes; or its Git directory lives in the
|
|
196
|
-
* `owner` repository's, whose Apply has yet to bring it here. */
|
|
197
116
|
export class GitApplyWait extends Error {
|
|
198
117
|
owner;
|
|
199
118
|
unbuildable;
|
|
200
|
-
/** `unbuildable` names the target this computer cannot rebuild though its
|
|
201
|
-
* packages arrived and no lender brings the rest: no person's act or event
|
|
202
|
-
* ends that wait, so Apply counts it as package-unbuildable
|
|
203
|
-
* (docs/entity-apply.md "recover()"). */
|
|
204
119
|
constructor(message, owner = null, unbuildable = null) {
|
|
205
120
|
super(message);
|
|
206
121
|
this.owner = owner;
|
|
207
122
|
this.unbuildable = unbuildable;
|
|
208
123
|
}
|
|
209
124
|
}
|
|
210
|
-
/** A file the target's state names that no artifact on its chain carries. */
|
|
211
125
|
const notOnChain = (oid, target) => failure(`no artifact on the chain carries blob ${oid}`, "package-unbuildable", "file-not-on-chain", null, target);
|
|
212
|
-
/** The artifact `bytes` hold, proven to be the one `transportVersion` names. */
|
|
213
126
|
function readArtifact(transportVersion, bytes) {
|
|
214
127
|
if (gitTransportVersion(bytes, sha256Hex) !== transportVersion)
|
|
215
128
|
throw new Error(`artifact ${transportVersion} is corrupt`);
|
|
@@ -218,15 +131,9 @@ function readArtifact(transportVersion, bytes) {
|
|
|
218
131
|
throw new Error(`artifact ${transportVersion} is not readable: ${checked.error}`);
|
|
219
132
|
return checked.value;
|
|
220
133
|
}
|
|
221
|
-
/** The notebook of a recorded or applied artifact: what Detect compares the
|
|
222
|
-
* repository with next, and what the next upload follows. */
|
|
223
134
|
export const gitNotebook = (transportVersion, { state, roots }) => ({ stateId: gitStateId(state, sha256Hex), transportVersion, state, roots });
|
|
224
|
-
/** A file that holds no readable Git artifact. */
|
|
225
135
|
export class GitArtifactUnreadable extends Error {
|
|
226
136
|
}
|
|
227
|
-
/** The head of the artifact a file holds, read from its leading bytes alone,
|
|
228
|
-
* so learning a state or its parent never reads a pack; null when the file
|
|
229
|
-
* is gone. */
|
|
230
137
|
export async function readGitArtifactHead(file) {
|
|
231
138
|
let handle;
|
|
232
139
|
try {
|
|
@@ -241,7 +148,6 @@ export async function readGitArtifactHead(file) {
|
|
|
241
148
|
const prefix = Buffer.alloc(GIT_ARTIFACT_PREFIX);
|
|
242
149
|
await handle.read(prefix, 0, prefix.length, 0);
|
|
243
150
|
const length = gitArtifactHeadLength(prefix);
|
|
244
|
-
// A head longer than its file is no artifact: never allocate what is not there.
|
|
245
151
|
if (length === null || length > (await handle.stat()).size)
|
|
246
152
|
throw new GitArtifactUnreadable(`${file} holds no Git artifact`);
|
|
247
153
|
const head = Buffer.alloc(length);
|
|
@@ -255,39 +161,15 @@ export async function readGitArtifactHead(file) {
|
|
|
255
161
|
await handle.close();
|
|
256
162
|
}
|
|
257
163
|
}
|
|
258
|
-
|
|
259
|
-
* the notebook that proves it. `known` is the last state this machine
|
|
260
|
-
* recorded or applied: the locks it holds are synced, and any other lock is
|
|
261
|
-
* a Git command at work here, which Apply waits for. A repository new here
|
|
262
|
-
* is built whole in private, beneath the folder's local-only directory or
|
|
263
|
-
* where Add builds it (`clone.buildIn`), and revealed by one rename, as Apply
|
|
264
|
-
* reveals any prepared result: no Git process and no Detect sees it half
|
|
265
|
-
* built. A submodule's is built the same way and moved where its
|
|
266
|
-
* superproject keeps it; a linked worktree's is written beside its main
|
|
267
|
-
* checkout's, whose storage keeps its objects, once they stand there, and
|
|
268
|
-
* linked last, where it stands. Add clones (`clone`); Apply fetches. The
|
|
269
|
-
* notebook comes from reading the repository where it was revealed: Apply
|
|
270
|
-
* proves what it published.
|
|
271
|
-
*
|
|
272
|
-
* A repository already standing here plays the record onto the line, the
|
|
273
|
-
* state the records before it left here (`line`, the line this machine kept;
|
|
274
|
-
* with none, the record's change was made from it), and this machine's own
|
|
275
|
-
* records the line has not reached onto that, each from the state it was
|
|
276
|
-
* made from (`records.ahead`), so what Apply wrote here before is never
|
|
277
|
-
* taken for this machine's work (@amalgm/live git/play.ts). A record made on
|
|
278
|
-
* the line is the line, and so is a run of records each made on the one
|
|
279
|
-
* before it: Git plays nothing until the first record made on another state
|
|
280
|
-
* (playingFrom). One built here new holds the record's state, which is its
|
|
281
|
-
* line. */
|
|
282
|
-
export async function applyGit(worktree, target, source, known, owners, clone = null, line = null, records = NO_RECORDS) {
|
|
164
|
+
export async function applyGit(worktree, target, stated, source, known, owners, clone = null, line = null, records = NO_RECORDS) {
|
|
283
165
|
const artifact = artifactReader(source);
|
|
284
166
|
const top = await artifact(target);
|
|
285
167
|
const { home } = top.state;
|
|
168
|
+
if (!sameHome(home, stated)) {
|
|
169
|
+
throw new Error(`${worktree}'s record states Git home ${JSON.stringify(stated)}; its package ${target} keeps ${JSON.stringify(home)}`);
|
|
170
|
+
}
|
|
286
171
|
const here = { ground: await owners.ground(worktree), owners, builtAt: clone?.builtAt ?? (path => path) };
|
|
287
172
|
const install = (repository, objects, synced, playing = null, kept = clone?.kept ?? null) => installState(repository, objects, target, top, artifact, synced, here, kept, playing);
|
|
288
|
-
/** Verified where it stands, with the artifacts of what it played. The
|
|
289
|
-
* shown state's is read from the repository as Detect reads a change: its
|
|
290
|
-
* reading must be the state written. */
|
|
291
173
|
const finish = async (installed, verifying = () => verify(worktree, target, top, installed, owners)) => {
|
|
292
174
|
const applied = await verifying();
|
|
293
175
|
const shownId = gitStateId(installed.state, sha256Hex), lineId = gitStateId(installed.line, sha256Hex);
|
|
@@ -304,9 +186,6 @@ export async function applyGit(worktree, target, source, known, owners, clone =
|
|
|
304
186
|
shown = { stateId: shownId, transportVersion: upload.transportVersion, bytes: upload.bytes };
|
|
305
187
|
}
|
|
306
188
|
const sealed = (bytes) => ({ stateId: lineId, transportVersion: gitTransportVersion(bytes, sha256Hex), bytes });
|
|
307
|
-
// The line shown here is the shown artifact stating no change: made from
|
|
308
|
-
// its own state, so the record that carries it (an echo) plays nothing
|
|
309
|
-
// onto any other line, and installs the line whole.
|
|
310
189
|
const lineMade = installed.lineArtifact !== null ? sealed(installed.lineArtifact)
|
|
311
190
|
: lineId !== shownId || shown === null ? null
|
|
312
191
|
: sealed(encodeGitArtifact({ ...shown.bytes ? readArtifact(shown.transportVersion, shown.bytes) : await artifact(shown.transportVersion),
|
|
@@ -330,23 +209,49 @@ export async function applyGit(worktree, target, source, known, owners, clone =
|
|
|
330
209
|
if ("unsupported" in met)
|
|
331
210
|
throw new GitApplyWait(`${worktree} holds ${met.unsupported}; Apply waits for it to change`);
|
|
332
211
|
const repository = sameHome(met.home, home) ? met.repository
|
|
333
|
-
: await
|
|
334
|
-
|
|
335
|
-
// byte form, whose storage the target replaces.
|
|
212
|
+
: gitSharesGitDir(met.home) ? await claimGitDir(met.repository, (await homeHere())?.gitDir ?? null)
|
|
213
|
+
: await moveGitDir(worktree, met.repository, home, (await homeHere())?.gitDir ?? join(worktree, ".git"));
|
|
336
214
|
return finish(await install(repository, repository, known?.state ?? null, met.refused || known !== null && gitBytesForm(known.state) ? null : await playingFrom(line, records, target, artifact)));
|
|
337
215
|
};
|
|
216
|
+
const claimGitDir = async (repository, gitDir) => {
|
|
217
|
+
if (gitDir === null || !home?.path.startsWith("worktrees/") || !await sameDir(repository.gitDir, gitDir)) {
|
|
218
|
+
throw new GitApplyWait(`${worktree} shares a Git directory other than its state's; moving to that one is not built`);
|
|
219
|
+
}
|
|
220
|
+
await claimWorktreeGitDir(worktree, repository.gitDir);
|
|
221
|
+
return repository;
|
|
222
|
+
};
|
|
223
|
+
const share = async (met) => {
|
|
224
|
+
if (met && "unsupported" in met)
|
|
225
|
+
throw new GitApplyWait(`${worktree} holds ${met.unsupported}; Apply waits for it to change`);
|
|
226
|
+
const installed = { state: top.state, line: top.state, lineArtifact: null, left: [], joined: [] };
|
|
227
|
+
if (met && sameHome(met.home, home))
|
|
228
|
+
return verify(worktree, target, top, installed, owners);
|
|
229
|
+
const placed = (await homeHere());
|
|
230
|
+
if (met && await sameDir(met.repository.gitDir, placed.gitDir)) {
|
|
231
|
+
await claimWorktreeGitDir((await owners.holding(home.entity)).checkout, placed.gitDir);
|
|
232
|
+
return verify(worktree, target, top, installed, owners);
|
|
233
|
+
}
|
|
234
|
+
if (met)
|
|
235
|
+
throw new GitApplyWait(`${worktree} keeps a Git directory its state does not share; moving to its owner's is not built`);
|
|
236
|
+
await linkWorktree(worktree, placed.gitDir, false);
|
|
237
|
+
if (!clone)
|
|
238
|
+
return verify(worktree, target, top, installed, owners);
|
|
239
|
+
clone.linked(placedAt => aimWorktree(worktree, placed.gitDir, false, placedAt));
|
|
240
|
+
return verifyAt({ worktree, gitDir: placed.gitDir, commonDir: placed.owner.commonDir, objectFormat: top.state.format }, target, top, installed, home, here.ground);
|
|
241
|
+
};
|
|
338
242
|
const last = async () => known?.state ?? null;
|
|
339
243
|
const met = await meet(worktree, owners, last);
|
|
244
|
+
if (gitSharesGitDir(home))
|
|
245
|
+
return share(met);
|
|
340
246
|
if (met)
|
|
341
247
|
return standing(met);
|
|
342
|
-
// A move a crash cut short: the Git directory this machine last kept
|
|
343
|
-
// elsewhere for it still stands there, and no `.git` names it.
|
|
344
248
|
const before = known?.state.home ?? null;
|
|
345
|
-
const left = heldHome(before) && !
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
249
|
+
const left = heldHome(before) && !gitSharesGitDir(before) && !sameHome(before, home)
|
|
250
|
+
&& await homeGitDir(before, owners).catch(error => {
|
|
251
|
+
if (error instanceof RefusedRepository)
|
|
252
|
+
return null;
|
|
253
|
+
throw error;
|
|
254
|
+
});
|
|
350
255
|
if (left && await exists(left.gitDir)) {
|
|
351
256
|
const { gitDir } = left, { format: objectFormat } = known.state;
|
|
352
257
|
return standing({ repository: { worktree, gitDir, commonDir: gitDir, objectFormat }, home: before, refused: false });
|
|
@@ -355,13 +260,9 @@ export async function applyGit(worktree, target, source, known, owners, clone =
|
|
|
355
260
|
return buildSelfHeld(worktree, target, top, owners.storage, clone, here.ground, install);
|
|
356
261
|
const placed = await homeHere();
|
|
357
262
|
if (placed && gitSharesObjects(top.state)) {
|
|
358
|
-
// Asked before anything stands there: Watch hears that Git directory, so a
|
|
359
|
-
// wait that changed it would wake itself, again and again.
|
|
360
263
|
if (gitAsksGit(top) && !await gitRefuses(placed.owner)) {
|
|
361
264
|
await chainPacks(worktree, target, artifact, oids => holdsReach(placed.owner, oids), home.entity);
|
|
362
265
|
}
|
|
363
|
-
const shared = await sharesWorktreeGitDir(placed.gitDir, worktree);
|
|
364
|
-
// A Git directory this call makes and cannot fill goes with the attempt.
|
|
365
266
|
const made = !await exists(placed.gitDir);
|
|
366
267
|
await mkdir(placed.gitDir, { recursive: true });
|
|
367
268
|
const { commonDir, objectFormat } = placed.owner;
|
|
@@ -375,28 +276,18 @@ export async function applyGit(worktree, target, source, known, owners, clone =
|
|
|
375
276
|
await rm(placed.gitDir, { recursive: true, force: true });
|
|
376
277
|
throw error;
|
|
377
278
|
}
|
|
378
|
-
await linkWorktree(worktree, placed.gitDir,
|
|
379
|
-
clone?.linked(placedAt => aimWorktree(worktree, placed.gitDir,
|
|
279
|
+
await linkWorktree(worktree, placed.gitDir, true);
|
|
280
|
+
clone?.linked(placedAt => aimWorktree(worktree, placed.gitDir, true, placedAt));
|
|
380
281
|
return verifyAt(repository, target, top, installed, home, here.ground);
|
|
381
282
|
}
|
|
382
283
|
if (placed && await exists(placed.gitDir)) {
|
|
383
|
-
// The Git directory a deinit left where this submodule's goes is its.
|
|
384
284
|
await linkSubmodule(worktree, placed.gitDir);
|
|
385
285
|
clone?.linked(placedAt => aimSubmodule(worktree, placed.gitDir, placedAt));
|
|
386
286
|
return standing(await meet(worktree, owners, last) ?? absent(worktree));
|
|
387
287
|
}
|
|
388
|
-
// One build place per repository, the only place Git acts on it: beside
|
|
389
|
-
// it, or near the root of Add's build however deep it will stand there (Git
|
|
390
|
-
// for Windows refuses a repository past about 259 characters). A build a
|
|
391
|
-
// crash left behind goes first. Once revealed, the repository is read where
|
|
392
|
-
// it stands with file reads alone.
|
|
393
288
|
const control = join(worktree, LOCAL_DIR_NAME), staging = clone?.buildIn ?? join(control, "git");
|
|
394
289
|
await rm(staging, { recursive: true, force: true });
|
|
395
|
-
// A pack kept here is reported where it stays, once revealed.
|
|
396
290
|
const kept = [];
|
|
397
|
-
// A repository built fresh where records came before the target plays them
|
|
398
|
-
// as every machine that kept it did: a machine joining after a clash shows
|
|
399
|
-
// the line, never the newest record alone. Its first record is its line.
|
|
400
291
|
const playing = placed ? null : await playingFrom(null, { reached: records.reached, ahead: [] }, target, artifact);
|
|
401
292
|
try {
|
|
402
293
|
const built = await initGitRepository(staging, top.state.format);
|
|
@@ -423,36 +314,22 @@ export async function applyGit(worktree, target, source, known, owners, clone =
|
|
|
423
314
|
await rmdir(control).catch(() => { });
|
|
424
315
|
}
|
|
425
316
|
}
|
|
426
|
-
/** Proves, before Apply binds, that this computer can rebuild the target in
|
|
427
|
-
* the repository standing at `worktree`, and each record it plays onto the
|
|
428
|
-
* line (playingFrom), as receive-pack does before it names anything: each
|
|
429
|
-
* chain's packs go into the repository's quarantine and Git walks its roots
|
|
430
|
-
* there. Nothing the repository holds changes, and the reveal migrates what
|
|
431
|
-
* this proved last, the target's (installState). A record that cannot
|
|
432
|
-
* rebuild from what this computer holds is a GitApplyWait: a fact, which
|
|
433
|
-
* only a change to what it holds ends, never a timer. Only an existing
|
|
434
|
-
* repository that borrows nothing, before or after, is proved here; the
|
|
435
|
-
* others are proved by the reveal, which builds or moves them first. */
|
|
436
317
|
export async function proveGit(worktree, target, source, known, owners, line = null, records = NO_RECORDS) {
|
|
437
318
|
const artifact = artifactReader(source);
|
|
438
319
|
const top = await artifact(target);
|
|
439
|
-
// A target in byte form installs no objects: there is nothing to prove.
|
|
440
320
|
if (gitBytesForm(top.state))
|
|
441
321
|
return;
|
|
442
322
|
if (borrows(top.state) !== null || known && borrows(known.state) !== null)
|
|
443
323
|
return;
|
|
444
324
|
const met = await meet(worktree, owners, async () => known?.state ?? null);
|
|
445
|
-
if (!met || "unsupported" in met || met.refused || !sameHome(met.home, top.state.home)
|
|
325
|
+
if (!met || "unsupported" in met || met.refused || !sameHome(met.home, top.state.home)
|
|
326
|
+
|| gitSharesGitDir(top.state.home))
|
|
446
327
|
return;
|
|
447
|
-
// Its storage is its own, or, a linked worktree's, its main checkout's.
|
|
448
328
|
const { repository } = met;
|
|
449
329
|
if (await gitRefuses(repository))
|
|
450
330
|
return;
|
|
451
|
-
// A repository standing in byte form plays nothing (playingFrom), and its
|
|
452
|
-
// storage goes: the target's objects are proved without it.
|
|
453
331
|
const dropping = known !== null && gitBytesForm(known.state);
|
|
454
332
|
const playing = dropping ? null : await playingFrom(line, records, target, artifact);
|
|
455
|
-
// Each chain stands alone: it reaches back to what the repository holds.
|
|
456
333
|
for (const version of [...playing?.records.reached ?? [], target]) {
|
|
457
334
|
const chain = gitChainReader(version, artifact);
|
|
458
335
|
const blob = async (oid) => {
|
|
@@ -466,10 +343,6 @@ export async function proveGit(worktree, target, source, known, owners, line = n
|
|
|
466
343
|
throw await cannotRebuild(worktree, version, received.reason, [], owners);
|
|
467
344
|
}
|
|
468
345
|
}
|
|
469
|
-
/** Builds a self-held worktree new here: its storage, a bare repository
|
|
470
|
-
* where this machine keeps such storage (`storage`), filled and verified
|
|
471
|
-
* there, then its checkout linked to it as `git worktree add` links one. A
|
|
472
|
-
* build that fails goes with the attempt. */
|
|
473
346
|
async function buildSelfHeld(worktree, target, top, storage, clone, ground, install) {
|
|
474
347
|
if (storage === null)
|
|
475
348
|
throw new Error(`${worktree} is a worktree whose storage this machine keeps nowhere`);
|
|
@@ -480,8 +353,8 @@ async function buildSelfHeld(worktree, target, top, storage, clone, ground, inst
|
|
|
480
353
|
const repository = { worktree, gitDir, commonDir: objects.gitDir, objectFormat: objects.objectFormat };
|
|
481
354
|
try {
|
|
482
355
|
const applied = await verifyAt(repository, target, top, await install(repository, objects, null), home, ground);
|
|
483
|
-
await linkWorktree(worktree, gitDir,
|
|
484
|
-
clone?.linked(placedAt => aimWorktree(worktree, gitDir,
|
|
356
|
+
await linkWorktree(worktree, gitDir, true);
|
|
357
|
+
clone?.linked(placedAt => aimWorktree(worktree, gitDir, true, placedAt));
|
|
485
358
|
return applied;
|
|
486
359
|
}
|
|
487
360
|
catch (error) {
|
|
@@ -491,14 +364,6 @@ async function buildSelfHeld(worktree, target, top, storage, clone, ground, inst
|
|
|
491
364
|
}
|
|
492
365
|
const heldHome = (home) => home !== null && home.entity !== null;
|
|
493
366
|
const sameHome = (left, right) => left === right || left !== null && right !== null && left.entity === right.entity && left.path === right.path;
|
|
494
|
-
/** Moves a repository's own Git directory to `to`, where its state names it,
|
|
495
|
-
* as `git submodule absorbgitdirs` moves one into its superproject's: the
|
|
496
|
-
* `.git` naming the old place goes, one rename moves the directory, and a
|
|
497
|
-
* `.git` file names a home inside another repository's. The state's
|
|
498
|
-
* configuration, core.worktree included, follows at install. A crash between
|
|
499
|
-
* leaves no `.git`, and the next attempt finds the directory where this
|
|
500
|
-
* machine last kept it. A linked worktree's lives in its main checkout's,
|
|
501
|
-
* which keeps it. */
|
|
502
367
|
async function moveGitDir(worktree, repository, home, to) {
|
|
503
368
|
if (repository.gitDir !== repository.commonDir || home?.path.startsWith("worktrees/")) {
|
|
504
369
|
throw new Error(`${worktree} keeps its Git directory elsewhere than its state names; moving a linked worktree's is not built`);
|
|
@@ -514,19 +379,13 @@ async function moveGitDir(worktree, repository, home, to) {
|
|
|
514
379
|
await linkSubmodule(worktree, to);
|
|
515
380
|
return { ...repository, gitDir: to, commonDir: to };
|
|
516
381
|
}
|
|
382
|
+
const sameDir = async (left, right) => await realpath(left).catch(() => left) === await realpath(right).catch(() => right);
|
|
517
383
|
const exists = (path) => stat(path).then(() => true, error => {
|
|
518
384
|
if (error.code === "ENOENT")
|
|
519
385
|
return false;
|
|
520
386
|
throw error;
|
|
521
387
|
});
|
|
522
|
-
/** What Git reads before it acts: the configuration the repository will
|
|
523
|
-
* hold, and the storage it will borrow objects from, as `git clone --shared`
|
|
524
|
-
* writes both before it fetches. Storage it stops borrowing from is let go
|
|
525
|
-
* with the other files, once its own packs hold what it borrowed. */
|
|
526
388
|
const readFirst = (step) => isGitConfigurationPath(step.path) || step.path === GIT_ALTERNATES_PATH && step.target !== null;
|
|
527
|
-
/** The storage the repository borrows from, written first: where Add builds
|
|
528
|
-
* each place it names meanwhile, and the checkouts of the repositories
|
|
529
|
-
* lending it. */
|
|
530
389
|
async function borrowedBy(dir, here) {
|
|
531
390
|
const named = await borrowedPlaces(dir);
|
|
532
391
|
return {
|
|
@@ -535,7 +394,6 @@ async function borrowedBy(dir, here) {
|
|
|
535
394
|
};
|
|
536
395
|
}
|
|
537
396
|
const NO_RECORDS = { reached: [], ahead: [] };
|
|
538
|
-
/** Each artifact read and decoded once. */
|
|
539
397
|
function artifactReader(source) {
|
|
540
398
|
const decoded = new Map();
|
|
541
399
|
return version => {
|
|
@@ -544,21 +402,9 @@ function artifactReader(source) {
|
|
|
544
402
|
return decoded.get(version);
|
|
545
403
|
};
|
|
546
404
|
}
|
|
547
|
-
/** Whether the target plays anything onto the line kept here (playingFrom).
|
|
548
|
-
* A record onto which nothing plays is its line, so ground that shows its
|
|
549
|
-
* result shows the line; otherwise only the play says what the line shows. */
|
|
550
405
|
export async function linePlays(line, records, target, source) {
|
|
551
406
|
return await playingFrom(line, records, target, artifactReader(source)) !== null;
|
|
552
407
|
}
|
|
553
|
-
/** What the target plays onto, or null when nothing plays. line(n) =
|
|
554
|
-
* play(line(n-1), V_n, Y_n) is Y_n where line(n-1) is V_n, so up to the
|
|
555
|
-
* first record made on a state other than the line, each record's state is
|
|
556
|
-
* the line and Git plays nothing (@amalgm/live docs/clash-rules.md). With
|
|
557
|
-
* no line kept, the first record is the line; with a line kept but its
|
|
558
|
-
* package not held here (a cache emptied by hand: retention keeps it), the
|
|
559
|
-
* play starts at the first record since. A side in byte form is never
|
|
560
|
-
* played (@amalgm/live git/play.ts): where the line kept here or any record
|
|
561
|
-
* is one, the target replaces what stands. */
|
|
562
408
|
async function playingFrom(kept, records, target, artifact) {
|
|
563
409
|
const run = [...records.reached, target];
|
|
564
410
|
for (const version of [...kept?.held ? [kept.package] : [], ...run, ...records.ahead]) {
|
|
@@ -578,11 +424,6 @@ async function playingFrom(kept, records, target, artifact) {
|
|
|
578
424
|
return !onLine && reached.length === 0 && records.ahead.length === 0 ? null
|
|
579
425
|
: { line: onLine ? kept.package : null, records: { reached: onLine ? run.slice(0, -1) : reached, ahead: records.ahead } };
|
|
580
426
|
}
|
|
581
|
-
/** Whether the record `made` was made on the line `before`: from its
|
|
582
|
-
* package or its state, or it holds that state already, or it states its own
|
|
583
|
-
* state (an echo, which the entity's line hands here only onto the row it
|
|
584
|
-
* joins). Compared by state ID, decoding a package only when the record was
|
|
585
|
-
* made from one that is not the line's. */
|
|
586
427
|
async function madeOn(made, before, artifact) {
|
|
587
428
|
if (made.basis === null && made.parent === before.package)
|
|
588
429
|
return true;
|
|
@@ -595,8 +436,6 @@ async function madeOn(made, before, artifact) {
|
|
|
595
436
|
const basisId = gitStateId(basis, sha256Hex);
|
|
596
437
|
return basisId === before.state || basisId === state;
|
|
597
438
|
}
|
|
598
|
-
/** The packs that bring the target here, or the wait for the main checkout
|
|
599
|
-
* whose objects it needs first. */
|
|
600
439
|
async function chainPacks(worktree, target, artifact, holds, owner) {
|
|
601
440
|
const chain = await gitChainPacks(target, artifact, holds);
|
|
602
441
|
if (!chain.ok)
|
|
@@ -605,28 +444,13 @@ async function chainPacks(worktree, target, artifact, holds, owner) {
|
|
|
605
444
|
throw new GitApplyWait(`${worktree} waits for its main checkout's objects`, owner);
|
|
606
445
|
return chain.value.packs;
|
|
607
446
|
}
|
|
608
|
-
/** Writes what Git reads first, then installs the packs the Git directory
|
|
609
|
-
* lacks into `objects`, its storage, then writes the plan's other files, each
|
|
610
|
-
* from bytes already here when it can. A target in byte form is written file
|
|
611
|
-
* for file, storage included, and no Git command runs; one in Git form that
|
|
612
|
-
* follows a state in byte form first drops the storage that state left, and
|
|
613
|
-
* its objects are proved without it. Neither plays (playingFrom). Playing,
|
|
614
|
-
* once the record's commits stand, it plays the record onto the line and
|
|
615
|
-
* what stands here onto that (@amalgm/live git/play.ts), and writes the
|
|
616
|
-
* result. Returns the state it wrote, the line, and what the names it
|
|
617
|
-
* rewrote left behind. */
|
|
618
447
|
async function installState(repository, storage, target, top, artifact, known, here, flushedByGit, playing) {
|
|
619
448
|
const first = top.state;
|
|
620
449
|
const firstFiles = new Map([...first.files, ...first.index?.files ?? []].map(file => [file.path, file]));
|
|
621
450
|
const wanted = gitBlobs(first);
|
|
622
451
|
const { ground } = here;
|
|
623
|
-
// A file the install may rewrite keeps its bytes when they are written
|
|
624
|
-
// again or name objects (installed). Playing keeps every file's: what this
|
|
625
|
-
// machine changed since the line plays onto it.
|
|
626
452
|
const keep = playing ? () => true
|
|
627
453
|
: (path, oid) => firstFiles.get(path)?.oid !== oid && (wanted.has(oid) || namesObjects(path));
|
|
628
|
-
// The state here is read in byte form when the target or the synced state
|
|
629
|
-
// is: the plan reaches the one, or drops the storage the other left.
|
|
630
454
|
const asBytes = gitBytesForm(first) || known !== null && gitBytesForm(known);
|
|
631
455
|
const read = await readGitState(repository, first.home, ground, keep, async () => known, asBytes);
|
|
632
456
|
if ("unsupported" in read)
|
|
@@ -653,19 +477,16 @@ async function installState(repository, storage, target, top, artifact, known, h
|
|
|
653
477
|
throw failure(`no bytes for blob ${oid}`, "invariant-broken", "git-blob-unready");
|
|
654
478
|
return found;
|
|
655
479
|
};
|
|
656
|
-
// What stands, as each write leaves it: every step's basis.
|
|
657
480
|
let current = local;
|
|
658
481
|
let held = new Map([...current.files, ...current.index?.files ?? []].map(file => [file.path, file]));
|
|
659
482
|
let drops = [];
|
|
660
|
-
/** Every step from what stands to `goal`, its bytes at hand; the storage
|
|
661
|
-
* to drop first is set aside in `drops`. */
|
|
662
483
|
const stepsTo = async (goal) => {
|
|
663
|
-
const plan = gitApplyPlan(current, goal
|
|
484
|
+
const plan = gitApplyPlan(current, goal);
|
|
664
485
|
if (!plan.ok)
|
|
665
486
|
throw new GitApplyWait(plan.error);
|
|
666
|
-
const { drop, clear, writes, index,
|
|
487
|
+
const { drop, clear, writes, index, removals } = plan.value;
|
|
667
488
|
drops = drop.map(file => ({ path: file.path, basis: file, target: null }));
|
|
668
|
-
const written = [...writes, ...index
|
|
489
|
+
const written = [...writes, ...index];
|
|
669
490
|
for (const file of written) {
|
|
670
491
|
if (file.oid === null || ready.has(file.oid))
|
|
671
492
|
continue;
|
|
@@ -682,18 +503,14 @@ async function installState(repository, storage, target, top, artifact, known, h
|
|
|
682
503
|
};
|
|
683
504
|
};
|
|
684
505
|
const dir = gitStateDir(repository, first.home);
|
|
685
|
-
// Each write is one transaction: no reader sees part of it but between
|
|
686
|
-
// its renames, as Git's own ref transaction shows itself.
|
|
687
506
|
const write = (writes) => writeGitSteps(dir, writes, bytes, ground);
|
|
688
507
|
let steps = await stepsTo(first);
|
|
689
508
|
const firstSteps = steps.steps.filter(readFirst);
|
|
690
509
|
await write({ clear: [], steps: firstSteps });
|
|
691
|
-
// A target in byte form is its files, storage included: no Git acts on it.
|
|
692
510
|
if (gitBytesForm(first)) {
|
|
693
511
|
await write(steps);
|
|
694
512
|
return { state: first, line: first, lineArtifact: null, left: [], joined: [] };
|
|
695
513
|
}
|
|
696
|
-
// A target Git packs replaces the storage a byte form left, whole.
|
|
697
514
|
await write({ clear: [], steps: drops });
|
|
698
515
|
if (playing && firstSteps.length > 0) {
|
|
699
516
|
const wrote = new Map(firstSteps.map(step => [step.path, step.target]));
|
|
@@ -702,24 +519,14 @@ async function installState(repository, storage, target, top, artifact, known, h
|
|
|
702
519
|
current = { ...current, files };
|
|
703
520
|
held = new Map([...current.files, ...current.index?.files ?? []].map(file => [file.path, file]));
|
|
704
521
|
}
|
|
705
|
-
// While Add builds a lender in private, Git borrows from it there.
|
|
706
522
|
const borrowed = await borrowedBy(dir, here);
|
|
707
523
|
const objects = borrowed.built.length > 0 ? { ...storage, borrowing: borrowed.built } : storage;
|
|
708
524
|
if (await gitRefuses(objects)) {
|
|
709
|
-
// No Git acts here, and the sender's, refusing alike, packed nothing:
|
|
710
|
-
// the record's state replaces what stands, and is the line.
|
|
711
525
|
await write(steps);
|
|
712
526
|
return { state: first, line: first, lineArtifact: null, left: leftBehind(first.format, steps, kept, bytes), joined: [] };
|
|
713
527
|
}
|
|
714
|
-
// What stands here borrowed counts only while the goal borrows it alike,
|
|
715
|
-
// and storage a byte form left counts never, since it goes: otherwise the
|
|
716
|
-
// chain reaches a pack that carries all the goal keeps.
|
|
717
528
|
const lendsAlike = borrows(local) === borrows(first);
|
|
718
529
|
const dropping = known !== null && gitBytesForm(known);
|
|
719
|
-
// Playing, the line's records' objects come first: a repository built
|
|
720
|
-
// fresh holds none of the commits the records before this one made, and
|
|
721
|
-
// the play picks this one's onto them. What stands here is not received
|
|
722
|
-
// again (the chain stops at what this storage reaches).
|
|
723
530
|
const keeps = [];
|
|
724
531
|
for (const version of [...playing?.records.reached ?? [], target]) {
|
|
725
532
|
const received = await receiveTarget(objects, repository, version, version === target ? top : await artifact(version), artifact, blob, { whole: !lendsAlike || dropping, dropping, flushed: flushedByGit !== null });
|
|
@@ -737,17 +544,9 @@ async function installState(repository, storage, target, top, artifact, known, h
|
|
|
737
544
|
let line = first, goal = first, lineArtifact = null;
|
|
738
545
|
let joined = [];
|
|
739
546
|
if (playing) {
|
|
740
|
-
// Played from the record's proven objects and those standing here, so
|
|
741
|
-
// what the play makes stands connected as it is written.
|
|
742
547
|
const id = (state) => gitStateId(state, sha256Hex);
|
|
743
|
-
// A repository Add builds is flushed by its writers: Git flushes each
|
|
744
|
-
// object the play writes, and acknowledges it, as it does the packs
|
|
745
|
-
// it keeps. Only the object store names them: the play reports the
|
|
746
|
-
// Git-directory files it made, never the commits and trees Git wrote.
|
|
747
548
|
const git = playGit(repository, flushedByGit !== null);
|
|
748
549
|
const loose = flushedByGit ? new Set(await gitLooseObjects(repository)) : null;
|
|
749
|
-
/** Each record's play, by its package: the commits it was made from,
|
|
750
|
-
* it ended at, and the play made. */
|
|
751
550
|
const heads = new Map();
|
|
752
551
|
const play = async (sides, version) => {
|
|
753
552
|
if (!gitPlayable(sides))
|
|
@@ -759,34 +558,22 @@ async function installState(repository, storage, target, top, artifact, known, h
|
|
|
759
558
|
return played.state;
|
|
760
559
|
};
|
|
761
560
|
const basisOf = async (made) => made.basis ?? (made.parent === null ? null : (await artifact(made.parent)).state);
|
|
762
|
-
/** The change the record `version` made, played onto `onto`. */
|
|
763
561
|
const changeOnto = async (onto, version) => {
|
|
764
562
|
const mine = await artifact(version);
|
|
765
563
|
const from = await basisOf(mine);
|
|
766
564
|
return from !== null && id(from) === id(onto) ? mine.state : play({ line: onto, basis: from, record: mine.state }, version);
|
|
767
565
|
};
|
|
768
566
|
const basis = await basisOf(top);
|
|
769
|
-
// The line takes in the records the cloud accepted before this one,
|
|
770
|
-
// each settled here rather than played. With no line kept, the first
|
|
771
|
-
// is the line.
|
|
772
567
|
let start = playing.line === null ? null : (await artifact(playing.line)).state;
|
|
773
568
|
for (const version of playing.records.reached) {
|
|
774
569
|
start = start === null ? (await artifact(version)).state : await changeOnto(start, version);
|
|
775
570
|
}
|
|
776
571
|
const before = start ?? basis ?? first;
|
|
777
572
|
const [lineId, basisId] = [id(before), basis && id(basis)];
|
|
778
|
-
// Where the line is the record's basis or already its result, nothing
|
|
779
|
-
// came between: the record's state is the line. So is a record made
|
|
780
|
-
// from its own state (an echo), which the entity's line hands here only
|
|
781
|
-
// onto the row it joins (@amalgm/live playChange).
|
|
782
573
|
line = lineId === id(first) || lineId === basisId || basisId === id(first) ? first
|
|
783
574
|
: await play({ line: before, basis, record: first }, target);
|
|
784
575
|
const played = heads.get(target);
|
|
785
576
|
if (played !== undefined && id(line) !== id(first)) {
|
|
786
|
-
// A member's own records in a window are one change, from where the
|
|
787
|
-
// first was made to the last (@amalgm/live docs/clash-rules.md, One
|
|
788
|
-
// echo): back from the target, each reached record its chain was
|
|
789
|
-
// made on that played too adds what its commits changed.
|
|
790
577
|
let from = played.basis, on = basis;
|
|
791
578
|
for (const version of [...playing.records.reached].reverse()) {
|
|
792
579
|
const record = await artifact(version);
|
|
@@ -800,8 +587,6 @@ async function installState(repository, storage, target, top, artifact, known, h
|
|
|
800
587
|
joined = await gitJoinedFiles(repository, { ...played, basis: from });
|
|
801
588
|
}
|
|
802
589
|
goal = line;
|
|
803
|
-
// This machine's own records the line has not reached play onto it,
|
|
804
|
-
// each from the state it was made from: the line is all else here.
|
|
805
590
|
for (const version of playing.records.ahead)
|
|
806
591
|
goal = await changeOnto(goal, version);
|
|
807
592
|
if (goal !== first)
|
|
@@ -825,10 +610,6 @@ async function installState(repository, storage, target, top, artifact, known, h
|
|
|
825
610
|
await Promise.all(keeps.map(releaseKeep));
|
|
826
611
|
}
|
|
827
612
|
}
|
|
828
|
-
/** Receives the target's objects into the repository's quarantine in
|
|
829
|
-
* `storage` (quarantine.ts) and proves its roots connected there, under its
|
|
830
|
-
* own shallow boundary. Its packs arrive from a promisor remote when the
|
|
831
|
-
* storage's configuration or the target's names one. */
|
|
832
613
|
async function receiveTarget(storage, repository, target, top, artifact, blob, { whole, dropping, flushed }) {
|
|
833
614
|
const named = (path) => top.state.files.find(file => file.path === path)?.oid ?? null;
|
|
834
615
|
const config = named("config"), shallow = named("shallow");
|
|
@@ -836,11 +617,6 @@ async function receiveTarget(storage, repository, target, top, artifact, blob, {
|
|
|
836
617
|
|| config !== null && await namesPromisor(storage, await blob(config)) === true;
|
|
837
618
|
return receiveObjects(storage, repository, { target, promisor, whole, dropping, flushed }, () => chainPacks(repository.worktree, target, artifact, whole ? async () => false : oids => holdsReach(storage, oids), top.state.home?.entity ?? null), top.roots, shallow === null ? null : await blob(shallow));
|
|
838
619
|
}
|
|
839
|
-
/** The wait for a target this computer cannot rebuild from what it holds.
|
|
840
|
-
* Storage that borrows leaves out what it borrows, so its lender brings the
|
|
841
|
-
* rest: it waits on that lender's Apply when one is held here, else, as when
|
|
842
|
-
* both arrive in one catch-up, on a change to what this computer holds.
|
|
843
|
-
* Only storage that borrows from no one is unbuildable. Never a timer. */
|
|
844
620
|
async function cannotRebuild(worktree, target, reason, lenders, owners) {
|
|
845
621
|
if (lenders.length === 0) {
|
|
846
622
|
return new GitApplyWait(`${worktree} cannot rebuild ${target} from what this computer holds: ${reason}`, null, target);
|
|
@@ -849,12 +625,8 @@ async function cannotRebuild(worktree, target, reason, lenders, owners) {
|
|
|
849
625
|
return new GitApplyWait(lender ? `${worktree} borrows objects repository ${lender} has yet to bring`
|
|
850
626
|
: `${worktree} borrows objects from ${lenders.join(", ")}, which this computer does not hold yet`, lender);
|
|
851
627
|
}
|
|
852
|
-
/** Files naming objects as refs do: HEAD, the refs, packed-refs and the
|
|
853
|
-
* root refs. Reflogs are not among them: a checkout's grows with each step. */
|
|
854
628
|
const namesObjects = (path) => isGitNamingPath(path)
|
|
855
629
|
|| ((own) => own === "HEAD" || own === "packed-refs" || own.startsWith("refs/"))(gitOwnPath(path));
|
|
856
|
-
/** What the names these steps rewrote named before and name no more, from
|
|
857
|
-
* the bytes that stood (`stood`) and those written in their place. */
|
|
858
630
|
function leftBehind(format, { clear, steps }, stood, written) {
|
|
859
631
|
const before = new Set(), after = new Set();
|
|
860
632
|
for (const { path, basis, target } of [...clear, ...steps]) {
|
|
@@ -870,8 +642,6 @@ function leftBehind(format, { clear, steps }, stood, written) {
|
|
|
870
642
|
}
|
|
871
643
|
return [...before].filter(oid => !after.has(oid));
|
|
872
644
|
}
|
|
873
|
-
/** Reads the repository where it stands, in the form of the state just
|
|
874
|
-
* written; one Git refuses holds that state's format and home. */
|
|
875
645
|
const verify = (worktree, transportVersion, artifact, installed, owners) => proved(worktree, transportVersion, artifact, installed, readHere(worktree, owners, async () => installed.state, gitBytesForm(installed.state)));
|
|
876
646
|
const verifyAt = (repository, transportVersion, artifact, installed, home, ground) => proved(repository.worktree, transportVersion, artifact, installed, readGitState(repository, home, ground, undefined, async () => installed.state, gitBytesForm(installed.state)));
|
|
877
647
|
async function proved(worktree, transportVersion, artifact, installed, reading) {
|
|
@@ -882,4 +652,3 @@ async function proved(worktree, transportVersion, artifact, installed, reading)
|
|
|
882
652
|
}
|
|
883
653
|
return { ...gitNotebook(transportVersion, artifact), shown: null, line: null, left: installed.left, joined: installed.joined };
|
|
884
654
|
}
|
|
885
|
-
//# sourceMappingURL=rail.js.map
|