@amalgm/shell 0.1.164-preview.44185399271 → 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 +266 -0
- package/dist/billing/mount.js +33 -0
- package/dist/billing/tools.js +138 -0
- 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 +36 -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 +8 -2
- 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 +36 -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/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 -31
- 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
|
@@ -1,29 +1,13 @@
|
|
|
1
|
-
/** Node filesystem, immutable-cache, Git and Verify effects for Live's Apply
|
|
2
|
-
* window (docs/entity-apply.md). One host for the rail's lifetime.
|
|
3
|
-
*
|
|
4
|
-
* The window's steps on this computer:
|
|
5
|
-
* - look and final guard (#inspectGround): each member judged against what
|
|
6
|
-
* its tables and its ground show now; the final guard, under held ground,
|
|
7
|
-
* freezes the member's receipt (#receipt);
|
|
8
|
-
* - prepare (#ensurePrepared): the member's result staged privately in the
|
|
9
|
-
* window's control tree, from the sealed cache, the ground this computer
|
|
10
|
-
* shows, or the wire; a result its own object already holds stages nothing;
|
|
11
|
-
* - bind: the store posts the window's row with every receipt;
|
|
12
|
-
* - reveal (#reveal): each step idempotent against its receipt, so a bound
|
|
13
|
-
* window re-entered after a park or a restart runs the same steps again
|
|
14
|
-
* (#recover), finishing what stands and leaving a person's version theirs;
|
|
15
|
-
* - Verify (#verify): one reread of real ground, its rows staged for the end;
|
|
16
|
-
* - the durability point (apply-durability.ts), owed where the window placed
|
|
17
|
-
* its results, runs at idle or at the cap. */
|
|
18
1
|
import { chmodSync, lstatSync, readFileSync, readdirSync, readlinkSync, rmSync, writeFileSync } from "node:fs";
|
|
19
2
|
import { readFile, rm } from "node:fs/promises";
|
|
20
3
|
import { basename, dirname, join, relative } from "node:path";
|
|
21
|
-
import { CONTAINERS, Recovering, buildEntityApplyEffects, canonicalVersion, classifyFile, contentWaits, failure, isRefusal, portableFileMode, resolvedPrefix, revealOrder } from "@amalgm/live";
|
|
4
|
+
import { CONTAINERS, Recovering, buildEntityApplyEffects, canonicalVersion, classifyFile, contentWaits, failure, isRefusal, portableFileMode, recordGitHome, resolvedPrefix, revealOrder } from "@amalgm/live";
|
|
22
5
|
import { LOCAL_DIR_NAME } from "@amalgm/core/identity";
|
|
23
6
|
import { applyControlRoot, displacedGitPath, displacedPath, ensureApplyPrivate, gitPartPath, judgeBoundRoot, gitPartEnd, gitPartEnded, gitPartJoined, readGitPart, stagedPath, windowControl } from "./apply-control.js";
|
|
24
7
|
import { ApplyDurability } from "./apply-durability.js";
|
|
25
8
|
import { keepAside, keepRemainder, returnKept, topmostRemainder, vacateKept } from "./apply-kept.js";
|
|
26
9
|
import { keptProofs, takeTrashed, trashKeepOf, trashSteps } from "./apply-trash-keep.js";
|
|
10
|
+
import { setRecordedTime } from "./file-time.js";
|
|
27
11
|
import { copyToNewFile } from "./filesystem.js";
|
|
28
12
|
import { flushEach } from "./flush.js";
|
|
29
13
|
import { GitHeld } from "./apply-git-held.js";
|
|
@@ -57,6 +41,7 @@ import { reflogKeys, repositoryGroundCones } from "./git-binding.js";
|
|
|
57
41
|
import { hasGitMarker } from "./git/marker.js";
|
|
58
42
|
import { groundGitOwners } from "./git/ground-owners.js";
|
|
59
43
|
import { installGitLines } from "./git-install-lines.js";
|
|
44
|
+
import { repairMoved } from "./git/home.js";
|
|
60
45
|
import { applyGit, GitApplyWait, gitStateIdOf, linePlays, proveGit } from "./git/rail.js";
|
|
61
46
|
import { openGroundConnection } from "./ground-database.js";
|
|
62
47
|
import { portableGroundRecord as portable, storedWithin } from "./ground-row.js";
|
|
@@ -68,33 +53,19 @@ import { lineLoops } from "./line-loops.js";
|
|
|
68
53
|
import { HeldHeads, ReceivedStateUnavailableError } from "./received-state.js";
|
|
69
54
|
import { sha256Hex } from "./sha256.js";
|
|
70
55
|
import { closePhysically, closeSource, semanticProof, sourceProofs, witnessProof } from "./source-proof.js";
|
|
71
|
-
import { physicalKey, shownMode, signedStat, sourceReusable, sourceSignature } from "./source-signature.js";
|
|
56
|
+
import { physicalKey, shownMode, shownTime, signedStat, sourceReusable, sourceSignature } from "./source-signature.js";
|
|
72
57
|
import { awaitTurn } from "./turns.js";
|
|
73
|
-
/** The immutable artifact a repository or structural result names, if any. */
|
|
74
58
|
const resultArtifact = (plan) => plan.kind === "repo.git" ? plan.artifact : plan.kind === "structure" ? plan.resultArtifact : null;
|
|
75
|
-
/** The types whose object carries its own result where it moves. */
|
|
76
59
|
const MOVES_WITH_RESULT = new Set(["file.text", "file.binary", "link", "repo.git"]);
|
|
77
|
-
/** Whether the object standing for `current`, O's row for the entity, holds
|
|
78
|
-
* the result a structural change names: a file, link or repository renamed
|
|
79
|
-
* or moved with its type, content and mode, a repository's only once its
|
|
80
|
-
* record's own package is held here (git/held-package.ts): equal content
|
|
81
|
-
* spares the move's rewrite, never the package the row will name. Nothing is prepared for it; its reveal
|
|
82
|
-
* moves that object (docs/entity-apply.md in Live, Prepare, prove, reveal).
|
|
83
|
-
* The final guard asks again under held ground and proves the object still
|
|
84
|
-
* shows its row, and Verify reads it at its new address. */
|
|
85
60
|
const holdsResult = (plan, current, cacheDir) => {
|
|
86
61
|
if (plan.kind !== "structure" || !current || !MOVES_WITH_RESULT.has(plan.target.type))
|
|
87
62
|
return false;
|
|
88
63
|
const shown = portable(current), stat = tryLstat(current.absolutePath);
|
|
89
64
|
return shown.type === plan.target.type && shown.payloadVersion === plan.target.payloadVersion
|
|
90
|
-
&& shown.fileMode === plan.target.fileMode &&
|
|
65
|
+
&& shown.fileMode === plan.target.fileMode && shown.mtime === plan.target.mtime
|
|
66
|
+
&& stat !== null && physicalKey(stat) === current.physicalKey
|
|
91
67
|
&& (shown.type !== "repo.git" || holdsPackage(cacheDir, plan.target.transportVersion));
|
|
92
68
|
};
|
|
93
|
-
/** Apply cannot act on a repository yet (src/git/rail.ts). A worktree or
|
|
94
|
-
* submodule waits on the repository whose Git directory holds its own, whose
|
|
95
|
-
* Apply releases it; any other wait, on a change there, which Detect
|
|
96
|
-
* observes. A target rail.ts names unbuildable is counted once as
|
|
97
|
-
* package-unbuildable; its wait stays the same. */
|
|
98
69
|
const gitWait = (intent, error, recoveries) => {
|
|
99
70
|
if (error.unbuildable !== null) {
|
|
100
71
|
recoveries?.recover({ law: "package-unbuildable", trigger: "root-unreached",
|
|
@@ -105,7 +76,6 @@ const gitWait = (intent, error, recoveries) => {
|
|
|
105
76
|
: { producer: "capability", entityIds: [intent.entityId] } };
|
|
106
77
|
};
|
|
107
78
|
const objectOf = (path, stats) => ({ path, physicalKey: physicalKey(stats), signature: sourceSignature(stats) });
|
|
108
|
-
/** The member's kind, from its plan. */
|
|
109
79
|
const kindOf = (plan) => {
|
|
110
80
|
if (plan.kind === "leave")
|
|
111
81
|
return "leave";
|
|
@@ -125,11 +95,9 @@ const kindOf = (plan) => {
|
|
|
125
95
|
return "construct";
|
|
126
96
|
};
|
|
127
97
|
const declined = (reason) => ({ kind: "declined", reason });
|
|
128
|
-
/** One persistent machine-effect owner for the Apply rail lifetime. */
|
|
129
98
|
export class ApplyWindowHost {
|
|
130
99
|
store;
|
|
131
100
|
effects;
|
|
132
|
-
/** The construct records this computer holds; constructs have no ground. */
|
|
133
101
|
constructs;
|
|
134
102
|
cargo;
|
|
135
103
|
durability;
|
|
@@ -140,15 +108,11 @@ export class ApplyWindowHost {
|
|
|
140
108
|
#restorePackage;
|
|
141
109
|
#recoveries;
|
|
142
110
|
#gitHeld;
|
|
111
|
+
#reportGit;
|
|
143
112
|
#progressed;
|
|
144
|
-
/** The kept heads Enter closures fold from, held until the rail is idle:
|
|
145
|
-
* the lines', and the fetch lanes' own, so a lane never reads behind a
|
|
146
|
-
* line. */
|
|
147
113
|
#heads;
|
|
148
114
|
#laneHeads;
|
|
149
|
-
/** The line's judge: which moves the cloud's order refuses. */
|
|
150
115
|
#judge;
|
|
151
|
-
/** The cloud's verdict when its order refuses a record's move, for the rail's plays. */
|
|
152
116
|
loops = (record) => lineLoops(this.#database, record);
|
|
153
117
|
#acquireGround;
|
|
154
118
|
#onStage;
|
|
@@ -156,35 +120,20 @@ export class ApplyWindowHost {
|
|
|
156
120
|
#onDemand;
|
|
157
121
|
#now;
|
|
158
122
|
#ground;
|
|
159
|
-
/** The repositories this machine holds, where worktrees and submodules
|
|
160
|
-
* find the Git directory that holds their own (src/git/home.ts). */
|
|
161
123
|
#gitOwners;
|
|
162
124
|
#onDerivedRelocationStage;
|
|
163
125
|
#prepared = new AttemptMemory();
|
|
164
|
-
/** Each attempt's fences, held from its first preparation until it ends. */
|
|
165
126
|
#writers = new Map();
|
|
166
127
|
#enterClosures = new AttemptMemory();
|
|
167
|
-
/** Each container Enter's staging slot. A slot is never given back before
|
|
168
|
-
* its attempt ends, so no two Enters of one window build in one place. */
|
|
169
128
|
#enterSlots = new AttemptMemory();
|
|
170
|
-
/** The ground the window in flight holds. */
|
|
171
129
|
#held = null;
|
|
172
|
-
/** The Git storage manifest a final guard took before proving a repository
|
|
173
|
-
* is O, for the receipt the same pass freezes. */
|
|
174
130
|
#gitStorage = new AttemptMemory();
|
|
175
|
-
/** The tree of a container a final guard proved is O, for the receipt of
|
|
176
|
-
* the member that displaces it. */
|
|
177
131
|
#displaced = new AttemptMemory();
|
|
178
|
-
/** Each window's content clock per binding root, stamped once. */
|
|
179
132
|
#clocks = new Map();
|
|
180
|
-
/** The control trees each window in flight made, by attempt. */
|
|
181
133
|
#controls = new Map();
|
|
182
134
|
#contentReads = new AttemptMemory();
|
|
183
|
-
/** The entities each line member returns to their line parent before it
|
|
184
|
-
* stands (ShownGround.returns), as its look read them. */
|
|
185
135
|
#returns = new AttemptMemory();
|
|
186
136
|
constructor(options) {
|
|
187
|
-
// Read-only: the file's saver thread makes every write this host posts.
|
|
188
137
|
this.#database = openGroundConnection(options.databaseFile);
|
|
189
138
|
this.#now = options.now ?? Date.now;
|
|
190
139
|
this.#onDemand = options.onDemand ?? NOTHING_ON_DEMAND;
|
|
@@ -199,7 +148,6 @@ export class ApplyWindowHost {
|
|
|
199
148
|
laneHeads: this.#laneHeads,
|
|
200
149
|
judge: this.#judge,
|
|
201
150
|
onEnded: (intent, members, written, stated) => this.#ended(intent, members, written, stated),
|
|
202
|
-
// Not a failure: the line proves again at its next fair turn.
|
|
203
151
|
onStale: (members, reason) => {
|
|
204
152
|
for (const member of members) {
|
|
205
153
|
this.#onStage?.({ entityId: member.entityId, throughSequence: member.throughSequence, type: member.type,
|
|
@@ -212,7 +160,8 @@ export class ApplyWindowHost {
|
|
|
212
160
|
this.#restorePackage = options.restorePackage;
|
|
213
161
|
this.#bindingDir = options.bindingDir;
|
|
214
162
|
this.#ground = new WindowGround(this.#database);
|
|
215
|
-
this.#
|
|
163
|
+
this.#reportGit = error => options.onBackgroundError?.(error);
|
|
164
|
+
this.#gitHeld = new GitHeld(this.#ground, this.#reportGit);
|
|
216
165
|
this.#cargo = new WindowCargo(options.cacheDir, options.readContent, this.#gitHeld, options.recoveries);
|
|
217
166
|
this.#recoveries = options.recoveries;
|
|
218
167
|
this.#progressed = options.progressed;
|
|
@@ -225,9 +174,6 @@ export class ApplyWindowHost {
|
|
|
225
174
|
this.#onWindowEnded = options.onWindowEnded;
|
|
226
175
|
this.#gitOwners = groundGitOwners(this.#database, null, options.gitStorage ?? null);
|
|
227
176
|
this.#onDerivedRelocationStage = options.onDerivedRelocationStage;
|
|
228
|
-
// Every type in Live's alphabet binds both sockets or the registry
|
|
229
|
-
// refuses to build. Filesystem entities reread their native ground;
|
|
230
|
-
// constructs have no address and reread the product's running version.
|
|
231
177
|
const adapters = [
|
|
232
178
|
...["workspace", "folder", "repo.git", "file.text", "file.binary", "link", "reference"]
|
|
233
179
|
.map(type => this.#adapter(type)),
|
|
@@ -257,8 +203,6 @@ export class ApplyWindowHost {
|
|
|
257
203
|
},
|
|
258
204
|
});
|
|
259
205
|
}
|
|
260
|
-
/** A construct's guard needs no ground, so it freezes the member's receipt
|
|
261
|
-
* itself: a window binds only members with one. */
|
|
262
206
|
#bindsWithoutGround(adapter) {
|
|
263
207
|
const apply = adapter.rails.apply;
|
|
264
208
|
return Object.freeze({ ...adapter, rails: Object.freeze({ ...adapter.rails, apply: Object.freeze({ ...apply,
|
|
@@ -274,19 +218,11 @@ export class ApplyWindowHost {
|
|
|
274
218
|
close() {
|
|
275
219
|
this.#held?.();
|
|
276
220
|
this.#held = null;
|
|
277
|
-
// An attempt left open, such as a bound window whose end answered stale
|
|
278
|
-
// before the rail stopped, is recovered from its receipt; its fences go.
|
|
279
221
|
for (const writer of this.#writers.values())
|
|
280
222
|
writer.close();
|
|
281
223
|
this.#writers.clear();
|
|
282
224
|
this.store.close();
|
|
283
225
|
}
|
|
284
|
-
/**
|
|
285
|
-
* Recovery on every start, before Detect looks: every window ended but
|
|
286
|
-
* not yet durable is owed to the point again. Its bytes persisted before
|
|
287
|
-
* they were shown (ApplyWindowStore.bindWindow), so it owes only
|
|
288
|
-
* placement. An open window is the line's own first step (#recover).
|
|
289
|
-
*/
|
|
290
226
|
async recoverStart() {
|
|
291
227
|
await this.#sweepControlTrees();
|
|
292
228
|
for (const window of readEndedWindows(this.#database)) {
|
|
@@ -294,17 +230,12 @@ export class ApplyWindowHost {
|
|
|
294
230
|
}
|
|
295
231
|
await this.durability.point();
|
|
296
232
|
}
|
|
297
|
-
/** The rail's idle: every revealed byte persists, then one strict save.
|
|
298
|
-
* The line holds no kept head past it; a graph a drive map holds stays. */
|
|
299
233
|
durabilityPoint() {
|
|
300
234
|
this.#heads.drop();
|
|
301
235
|
this.#laneHeads.drop();
|
|
302
236
|
this.#judge.drop();
|
|
303
237
|
return this.durability.point();
|
|
304
238
|
}
|
|
305
|
-
/** A control tree no window row names belongs to a window that never
|
|
306
|
-
* bound, or to one made durable under a root that was away: it goes.
|
|
307
|
-
* Nothing beneath a root that is not present is touched. */
|
|
308
239
|
async #sweepControlTrees() {
|
|
309
240
|
const windows = boundAttempts(this.#database);
|
|
310
241
|
for (const root of this.#ground.bindingRoots()) {
|
|
@@ -333,18 +264,11 @@ export class ApplyWindowHost {
|
|
|
333
264
|
return rows.some(row => row !== undefined && meets(row));
|
|
334
265
|
});
|
|
335
266
|
}
|
|
336
|
-
/** Where an examination of these entities must read: each one's O and B
|
|
337
|
-
* placement, so an entity that vanished starts from its original address. */
|
|
338
267
|
examinationAddresses(entityIds) {
|
|
339
268
|
return [...new Set(entityIds.flatMap(uuid => [this.#ground.observed(uuid), this.#ground.shared(uuid)]
|
|
340
269
|
.flatMap(row => row ? [row.absolutePath] : [])))];
|
|
341
270
|
}
|
|
342
271
|
#adapter(type) {
|
|
343
|
-
// An attempt is one writer from its preparation on: what any of its
|
|
344
|
-
// steps fences stays fenced until the attempt is discarded or ends
|
|
345
|
-
// (content-cache-fences.ts), every path past a preparation reaching one.
|
|
346
|
-
// A package an Enter's prepare sealed is named by no row until its bind.
|
|
347
|
-
// A step before any preparation, a look, fences only for itself.
|
|
348
272
|
const using = (intent, work) => {
|
|
349
273
|
const writer = this.#writers.get(intent.attemptId);
|
|
350
274
|
return writer ? writer.run(work) : fencing(work);
|
|
@@ -363,10 +287,6 @@ export class ApplyWindowHost {
|
|
|
363
287
|
rails: Object.freeze({ apply, verify }),
|
|
364
288
|
});
|
|
365
289
|
}
|
|
366
|
-
// ---------------------------------------------------------------- prepare
|
|
367
|
-
/** A repository in an Enter that cannot be built yet, such as a linked
|
|
368
|
-
* worktree whose main checkout's Apply has yet to bring its objects,
|
|
369
|
-
* waits on it, so the window ends before it (journey.ts). */
|
|
370
290
|
async #prepare(intent, plan) {
|
|
371
291
|
try {
|
|
372
292
|
if (entersContainer(plan))
|
|
@@ -401,14 +321,11 @@ export class ApplyWindowHost {
|
|
|
401
321
|
const artifact = resultArtifact(plan);
|
|
402
322
|
const current = this.#context(intent, plan, false)?.current ?? null;
|
|
403
323
|
if (intent.emptied) {
|
|
404
|
-
// An emptied file fetches none of its bytes (#stageResult).
|
|
405
324
|
}
|
|
406
325
|
else if (holdsResult(plan, current, this.#cacheDir)) {
|
|
407
326
|
prepared = { shown: true };
|
|
408
327
|
}
|
|
409
328
|
else if (plan.kind === "file.text" || plan.kind === "file.binary" || plan.kind === "link") {
|
|
410
|
-
// A text splice's base may be the file this computer shows: the
|
|
411
|
-
// splice's result proves its hash before it is sealed.
|
|
412
329
|
const base = plan.kind === "file.text" && plan.strategy.kind === "delta" && current?.type === "file.text"
|
|
413
330
|
&& current.payloadVersion === plan.strategy.basePayloadVersion ? current.absolutePath : undefined;
|
|
414
331
|
prepared = { artifact: await this.#cargo.prepare(plan, this.#onBytes(intent), base) };
|
|
@@ -421,13 +338,6 @@ export class ApplyWindowHost {
|
|
|
421
338
|
this.#emit(intent, plan, "cargo-verified");
|
|
422
339
|
return prepared;
|
|
423
340
|
}
|
|
424
|
-
/**
|
|
425
|
-
* A container Enter's staged tree (src/apply-enter-build.ts). A bound
|
|
426
|
-
* member reads only its seal, because its tree may already have landed. An
|
|
427
|
-
* unbound one builds, or adopts its own sealed build, against the division
|
|
428
|
-
* this computer's ground shows now. It reads and builds nothing while its
|
|
429
|
-
* root is not present or the target has no placement: the guard names each.
|
|
430
|
-
*/
|
|
431
341
|
async #prepareEnter(intent, plan) {
|
|
432
342
|
const memo = this.#prepared.get(intent)?.enter;
|
|
433
343
|
if (memo)
|
|
@@ -459,8 +369,9 @@ export class ApplyWindowHost {
|
|
|
459
369
|
bindingDir: this.#bindingDir,
|
|
460
370
|
held: this.#gitOwners,
|
|
461
371
|
gitLines: installGitLines(this.#database, intent.authorityId, closure.position, this.#cacheDir),
|
|
372
|
+
report: this.#reportGit,
|
|
373
|
+
onBytes: this.#onBytes(intent),
|
|
462
374
|
readContent: async (artifacts, staged) => {
|
|
463
|
-
// The ground this UUID's Trash kept here comes back first.
|
|
464
375
|
const keep = trashKeepOf(applyControlRoot(control), plan.target.uuid);
|
|
465
376
|
const taken = staged
|
|
466
377
|
? await takeTrashed({ keep, proofs: keptProofs(this.#database, keep, plan.target.uuid), artifacts, staged })
|
|
@@ -494,7 +405,6 @@ export class ApplyWindowHost {
|
|
|
494
405
|
this.#enterSlots.set(intent, slot = this.#enterSlots.count(intent.attemptId));
|
|
495
406
|
return slot;
|
|
496
407
|
}
|
|
497
|
-
/** The attempt's one writer scope, opened by its first preparation. */
|
|
498
408
|
#writerOf(intent) {
|
|
499
409
|
let scope = this.#writers.get(intent.attemptId);
|
|
500
410
|
if (!scope)
|
|
@@ -512,38 +422,22 @@ export class ApplyWindowHost {
|
|
|
512
422
|
this.#contentReads.forget(attemptId);
|
|
513
423
|
this.#returns.forget(attemptId);
|
|
514
424
|
}
|
|
515
|
-
// ------------------------------------------------------------------ guard
|
|
516
|
-
/** Only a final safe or already-target guard keeps its member in the window. */
|
|
517
425
|
async #guard(intent, plan, stage) {
|
|
518
|
-
// Resolved promises do not service sockets or Watch callbacks. Let the
|
|
519
|
-
// host run before collecting the proof that authorizes this decision.
|
|
520
426
|
await awaitTurn();
|
|
521
427
|
return this.#inspectGround(intent, plan, stage);
|
|
522
428
|
}
|
|
523
|
-
/**
|
|
524
|
-
* The look is an optimistic preflight: it reads ground and tables while
|
|
525
|
-
* nothing is held. The final guard runs under the window's held ground and
|
|
526
|
-
* freezes the member's receipt from the ground it proved, right before the
|
|
527
|
-
* bind. A bound member is never guarded again: it finishes through its
|
|
528
|
-
* receipt (#recover).
|
|
529
|
-
*/
|
|
530
429
|
async #inspectGround(intent, plan, stage) {
|
|
531
430
|
const finalGuard = stage === "final";
|
|
532
431
|
this.#gitStorage.delete(intent);
|
|
533
432
|
this.#displaced.delete(intent);
|
|
534
433
|
try {
|
|
535
434
|
if (finalGuard) {
|
|
536
|
-
// An Enter whose build was dropped builds again here, under the
|
|
537
|
-
// held ground.
|
|
538
435
|
if (entersContainer(plan))
|
|
539
436
|
await this.#prepareEnter(intent, plan);
|
|
540
437
|
}
|
|
541
438
|
else {
|
|
542
439
|
this.#emit(intent, plan, "preflight-started");
|
|
543
440
|
}
|
|
544
|
-
// The line judged this play from the tables, and Detect may have
|
|
545
|
-
// changed them since: a play that no longer holds is judged again. The
|
|
546
|
-
// final guard holds only the ground the look's returns named.
|
|
547
441
|
const { judged, returns } = await this.#showing(intent, plan);
|
|
548
442
|
if (judged !== plan.play) {
|
|
549
443
|
return { kind: "rejudge", reason: `The accepted result now plays ${judged} on this computer, not ${plan.play}.` };
|
|
@@ -562,16 +456,12 @@ export class ApplyWindowHost {
|
|
|
562
456
|
if (ownership)
|
|
563
457
|
return ownership;
|
|
564
458
|
const current = context.current;
|
|
565
|
-
// A receipt must preserve the source association the guard proved. An
|
|
566
|
-
// equal-content atomic save can still replace the object being moved.
|
|
567
459
|
for (const row of [current, ...context.room.map(move => this.#ground.current(move.row.uuid))]) {
|
|
568
460
|
const stat = row && tryLstat(row.absolutePath);
|
|
569
461
|
if (stat && physicalKey(stat) !== row.physicalKey) {
|
|
570
462
|
return { kind: "local-change", reason: "Detect must refresh the source's physical association." };
|
|
571
463
|
}
|
|
572
464
|
}
|
|
573
|
-
// The guard asks for each directory on the member's paths once, and
|
|
574
|
-
// looks at them on disk again as it closes (directoriesStand).
|
|
575
465
|
const directories = new Map();
|
|
576
466
|
const replacedParent = { kind: "unsettled-ground", reason: "Detect must reconcile a replaced parent directory." };
|
|
577
467
|
if (![context.parent, current && current.uuid !== current.rootUUID && current.parentUUID
|
|
@@ -579,9 +469,6 @@ export class ApplyWindowHost {
|
|
|
579
469
|
.every(row => row === null || row === undefined || this.#ground.directoryAncestorsMatch(row, directories))) {
|
|
580
470
|
return replacedParent;
|
|
581
471
|
}
|
|
582
|
-
// A reveal installs the repository's own `.git` where the entity
|
|
583
|
-
// stands. A `.git` there that names no repository exists only on this
|
|
584
|
-
// computer, so the reveal waits until the person removes or repairs it.
|
|
585
472
|
if (plan.target.type === "repo.git" && !leaving && !entersContainer(plan) && current
|
|
586
473
|
&& tryLstat(join(current.absolutePath, ".git")) && !hasGitMarker(current.absolutePath)) {
|
|
587
474
|
return { kind: "dependency", waitFor: { producer: "detect", entityIds: [current.uuid] },
|
|
@@ -589,9 +476,6 @@ export class ApplyWindowHost {
|
|
|
589
476
|
reason: `${current.absolutePath} holds Git metadata that names no repository; only this computer has it.` };
|
|
590
477
|
}
|
|
591
478
|
if (entersContainer(plan) && finalGuard) {
|
|
592
|
-
// The build assumed the ground's division and its address. A build
|
|
593
|
-
// that no longer shows them is dropped and built again by the next
|
|
594
|
-
// attempt.
|
|
595
479
|
const { closure, division } = await this.#enterDivision(intent, plan);
|
|
596
480
|
const enter = this.#prepared.get(intent)?.enter;
|
|
597
481
|
if (!enter || !holds(enter.tree, enter.seal.root) || !sealShows(enter.seal, { target: plan.target,
|
|
@@ -600,10 +484,6 @@ export class ApplyWindowHost {
|
|
|
600
484
|
return { kind: "retry", reason: "The entering tree no longer shows this computer's ground; it is built again." };
|
|
601
485
|
}
|
|
602
486
|
}
|
|
603
|
-
// Identity comes from O, never a historical sharing address or byte
|
|
604
|
-
// equality. A same-identity complete target can be adopted even when B
|
|
605
|
-
// lags, provided no other physical effect remains. A Leave's target
|
|
606
|
-
// address is the ground it removes, so it is never already there.
|
|
607
487
|
const physical = this.#ground.observed(intent.entityId);
|
|
608
488
|
const targetStats = tryLstat(context.targetPath);
|
|
609
489
|
const targetIdentity = !leaving && physical?.status === "active"
|
|
@@ -611,7 +491,7 @@ export class ApplyWindowHost {
|
|
|
611
491
|
&& targetStats !== null && physicalKey(targetStats) === physical.physicalKey;
|
|
612
492
|
if (targetIdentity
|
|
613
493
|
&& context.room.length === 0
|
|
614
|
-
&& await this.#matches(intent, plan.target, context.targetPath)
|
|
494
|
+
&& await this.#matches(intent, plan.target, context.targetPath, physical)
|
|
615
495
|
&& this.#ground.physicalDirectoriesMatch(physical, directories)
|
|
616
496
|
&& await this.#standsAsRecord(intent, plan)) {
|
|
617
497
|
if (!this.#ground.directoriesStand(directories))
|
|
@@ -632,13 +512,6 @@ export class ApplyWindowHost {
|
|
|
632
512
|
return { kind: "local-change", reason: localObservation.reason };
|
|
633
513
|
if (localObservation.kind === "retry")
|
|
634
514
|
return localObservation;
|
|
635
|
-
// A Leave, or a leaf replacing a container, displaces the whole directory.
|
|
636
|
-
// Its matching Verify keeps the local remainder below it
|
|
637
|
-
// (apply-kept.ts) and lets go of the rest, so the final guard proves
|
|
638
|
-
// every other name beneath it is O and takes its fingerprint
|
|
639
|
-
// (apply-displaced-tree.ts). A `.git` there that names no repository
|
|
640
|
-
// has no copy anywhere else: the effect waits for Detect to see that
|
|
641
|
-
// ground leave or become shared.
|
|
642
515
|
if (current && CONTAINERS.has(current.type) && tryLstat(current.absolutePath)
|
|
643
516
|
&& (leaving || !CONTAINERS.has(plan.target.type))) {
|
|
644
517
|
const named = this.#ground.unsharedGitWithin(current.absolutePath);
|
|
@@ -659,7 +532,7 @@ export class ApplyWindowHost {
|
|
|
659
532
|
aside: topmostRemainder(localObservation.remainder)
|
|
660
533
|
.filter(({ path }) => path !== current.absolutePath && storedWithin(current.absolutePath, path)),
|
|
661
534
|
stamp: await stampContentClock(this.#database.name, this.#ground.bindingRoot(context)),
|
|
662
|
-
shows: (row, path) => this.#matches(intent, portable(row), path),
|
|
535
|
+
shows: (row, path) => this.#matches(intent, portable(row), path, row),
|
|
663
536
|
...this.#readCounters(intent),
|
|
664
537
|
});
|
|
665
538
|
if (proof.kind === "differs")
|
|
@@ -675,26 +548,16 @@ export class ApplyWindowHost {
|
|
|
675
548
|
safe = !tryLstat(context.targetPath) ? { kind: "safe" } : await this.#occupiedDestination(intent, context);
|
|
676
549
|
}
|
|
677
550
|
else if (current.absolutePath !== context.targetPath && occupiedByOther(context.targetPath, current.absolutePath)) {
|
|
678
|
-
// A move/rename may never erase a different thing already occupying
|
|
679
|
-
// the accepted destination under any spelling (src/apply-spelling.ts).
|
|
680
551
|
safe = await this.#occupiedDestination(intent, context);
|
|
681
|
-
// A source that is itself the result must still show its row.
|
|
682
552
|
if (safe.kind === "safe" && finalGuard && this.#prepared.get(intent)?.shown
|
|
683
|
-
&& !await this.#matches(intent, portable(current), current.absolutePath))
|
|
553
|
+
&& !await this.#matches(intent, portable(current), current.absolutePath, current))
|
|
684
554
|
safe = { kind: "local-change" };
|
|
685
555
|
}
|
|
686
556
|
else if (!leaving && !tryLstat(current.absolutePath) && !tryLstat(context.targetPath)) {
|
|
687
|
-
// Absence at one address can be a move. While the entity is still
|
|
688
|
-
// materialized, Detect must reconcile its root before repair may
|
|
689
|
-
// destroy that physical continuity.
|
|
690
557
|
safe = this.#ground.observed(current.uuid)
|
|
691
558
|
? { kind: "unsettled-ground", reason: "Detect must distinguish a move from local absence." } : { kind: "safe" };
|
|
692
559
|
}
|
|
693
560
|
else {
|
|
694
|
-
// A repository that becomes a folder displaces only its Git storage
|
|
695
|
-
// (src/apply-git-storage.ts). Its fingerprint is taken here, under a
|
|
696
|
-
// clock stamped first and before the observation that proves the
|
|
697
|
-
// storage is O, so every later Git write differs from it.
|
|
698
561
|
if (finalGuard && current.type === "repo.git" && plan.kind === "structure"
|
|
699
562
|
&& (plan.target.type === "workspace" || plan.target.type === "folder") && hasGitMarker(current.absolutePath)) {
|
|
700
563
|
const stamp = await stampContentClock(this.#database.name, this.#ground.bindingRoot(context));
|
|
@@ -703,16 +566,11 @@ export class ApplyWindowHost {
|
|
|
703
566
|
return { kind: "local-change", reason: "Git storage changed while Apply read it." };
|
|
704
567
|
this.#gitStorage.set(intent, storage);
|
|
705
568
|
}
|
|
706
|
-
|
|
707
|
-
// there, its O row; anything else is a person's change, which Detect
|
|
708
|
-
// records before Apply looks again.
|
|
709
|
-
safe = await this.#matches(intent, portable(current), current.absolutePath)
|
|
569
|
+
safe = await this.#matches(intent, portable(current), current.absolutePath, current)
|
|
710
570
|
&& this.#ground.physicalDirectoriesMatch(current, directories) ? { kind: "safe" } : { kind: "local-change" };
|
|
711
571
|
}
|
|
712
572
|
if (safe.kind === "safe" && !this.#ground.directoriesStand(directories))
|
|
713
573
|
return replacedParent;
|
|
714
|
-
// Preparation took the object standing for the entity as the result;
|
|
715
|
-
// one that no longer holds it is prepared again.
|
|
716
574
|
if (safe.kind === "safe" && finalGuard && this.#prepared.get(intent)?.shown && !holdsResult(plan, current, this.#cacheDir)) {
|
|
717
575
|
this.#prepared.delete(intent);
|
|
718
576
|
return { kind: "retry", reason: "The ground no longer holds this result where it stands; it is prepared again." };
|
|
@@ -728,8 +586,6 @@ export class ApplyWindowHost {
|
|
|
728
586
|
catch (error) {
|
|
729
587
|
if (error instanceof GitApplyWait)
|
|
730
588
|
return gitWait(intent, error, this.#recoveries);
|
|
731
|
-
// No kept graph head reaches the Enter's position: the line holds, and
|
|
732
|
-
// the missing history counts once.
|
|
733
589
|
if (error instanceof ReceivedStateUnavailableError) {
|
|
734
590
|
this.#recoveries?.recover(error.need);
|
|
735
591
|
return { kind: "dependency", reason: error.message };
|
|
@@ -741,13 +597,6 @@ export class ApplyWindowHost {
|
|
|
741
597
|
this.#emit(intent, plan, "preflight-finished");
|
|
742
598
|
}
|
|
743
599
|
}
|
|
744
|
-
/**
|
|
745
|
-
* The member's receipt, frozen from the ground its final guard proved:
|
|
746
|
-
* its address, its binding root, the object it reveals over, the object it
|
|
747
|
-
* stages, the sibling moves that free its address, and a former
|
|
748
|
-
* repository's Git storage. Null when a person replaced the source since
|
|
749
|
-
* the guard: nothing binds for it.
|
|
750
|
-
*/
|
|
751
600
|
async #receipt(intent, plan, context, look) {
|
|
752
601
|
const anchor = context.current ?? context.parent;
|
|
753
602
|
if (!anchor)
|
|
@@ -774,8 +623,6 @@ export class ApplyWindowHost {
|
|
|
774
623
|
}
|
|
775
624
|
else if ((kind === "container" || kind === "repository")
|
|
776
625
|
&& !(sourceStats?.isDirectory() && !sourceStats.isSymbolicLink())) {
|
|
777
|
-
// A directory the reveal will show is named here, before bind, like
|
|
778
|
-
// every object Apply shows: Detect then knows it as this member's.
|
|
779
626
|
const path = stageDirectory(control, intent.entityId);
|
|
780
627
|
staged = objectOf(path, lstatSync(path, { bigint: true }));
|
|
781
628
|
}
|
|
@@ -793,11 +640,6 @@ export class ApplyWindowHost {
|
|
|
793
640
|
displaced: this.#displaced.get(intent) ?? null,
|
|
794
641
|
};
|
|
795
642
|
}
|
|
796
|
-
/** A file or link result staged at its vacant private address, with its
|
|
797
|
-
* portable mode. The copy runs in pieces its lane hears, so a large result
|
|
798
|
-
* neither holds the runtime nor reads as a stall. Its bytes persist before
|
|
799
|
-
* its receipt binds, with every staged file of its window
|
|
800
|
-
* (ApplyWindowStore.bindWindow). */
|
|
801
643
|
async #stageResult(intent, plan, context, control) {
|
|
802
644
|
const staged = stagedPath(control, intent.entityId);
|
|
803
645
|
ensureApplyPrivate(control, dirname(staged));
|
|
@@ -811,12 +653,12 @@ export class ApplyWindowHost {
|
|
|
811
653
|
return staged;
|
|
812
654
|
}
|
|
813
655
|
if (intent.emptied) {
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
throw new Error(`ordinary file ${plan.target.uuid} has no portable mode`);
|
|
656
|
+
if (plan.target.fileMode === null || plan.target.mtime === null) {
|
|
657
|
+
throw new Error(`ordinary file ${plan.target.uuid} has no portable mode or time`);
|
|
658
|
+
}
|
|
818
659
|
writeFileSync(staged, "", { flag: "wx", mode: 0o600 });
|
|
819
660
|
chmodSync(staged, plan.target.fileMode);
|
|
661
|
+
setRecordedTime(staged, plan.target.mtime);
|
|
820
662
|
return staged;
|
|
821
663
|
}
|
|
822
664
|
const artifact = (await this.#ensurePrepared(intent, plan)).artifact;
|
|
@@ -826,13 +668,14 @@ export class ApplyWindowHost {
|
|
|
826
668
|
writeLinkTarget(new TextDecoder("utf-8", { fatal: true }).decode(readFileSync(artifact.file)), staged, context.targetPath);
|
|
827
669
|
return staged;
|
|
828
670
|
}
|
|
829
|
-
if (plan.target.fileMode === null)
|
|
830
|
-
throw new Error(`ordinary file ${plan.target.uuid} has no portable mode`);
|
|
671
|
+
if (plan.target.fileMode === null || plan.target.mtime === null) {
|
|
672
|
+
throw new Error(`ordinary file ${plan.target.uuid} has no portable mode or time`);
|
|
673
|
+
}
|
|
831
674
|
await copyToNewFile(artifact.file, staged, this.#onBytes(intent));
|
|
832
675
|
chmodSync(staged, plan.target.fileMode);
|
|
676
|
+
setRecordedTime(staged, plan.target.mtime);
|
|
833
677
|
return staged;
|
|
834
678
|
}
|
|
835
|
-
/** Another open window owning part of this member's scope is a wait. */
|
|
836
679
|
#foreignOwnership(intent, root, addresses) {
|
|
837
680
|
const physical = addresses.flatMap(path => {
|
|
838
681
|
const stat = tryLstat(path);
|
|
@@ -852,9 +695,6 @@ export class ApplyWindowHost {
|
|
|
852
695
|
return { kind: "local-change" };
|
|
853
696
|
return { kind: "conflict", reason: `destination ${targetPath} is held by ${occupant.type} ${occupant.uuid}` };
|
|
854
697
|
}
|
|
855
|
-
/** The room-making chain is ready when its last destination is free, on
|
|
856
|
-
* disk and in O, and every sibling in it still proves its own portable
|
|
857
|
-
* identity. A chain ending where the target stands is a closed cycle. */
|
|
858
698
|
async #roomReady(intent, context) {
|
|
859
699
|
const { room, current } = context;
|
|
860
700
|
const last = room.at(-1).destination;
|
|
@@ -865,15 +705,11 @@ export class ApplyWindowHost {
|
|
|
865
705
|
if (!free(last) || !room.every(move => dirname(move.source) === dirname(move.destination) || free(move.destination)))
|
|
866
706
|
return false;
|
|
867
707
|
for (const { row } of room) {
|
|
868
|
-
if (!await this.#matches(intent, portable(row), row.absolutePath))
|
|
708
|
+
if (!await this.#matches(intent, portable(row), row.absolutePath, row))
|
|
869
709
|
return false;
|
|
870
710
|
}
|
|
871
711
|
return true;
|
|
872
712
|
}
|
|
873
|
-
// ------------------------------------------------------------------- hold
|
|
874
|
-
/** Hold every address the window touches, through its final guards, bind,
|
|
875
|
-
* reveals and Verify. Context may change while waiting: no effect may use
|
|
876
|
-
* cones discovered after acquisition without proving them again. */
|
|
877
713
|
async #hold(intent, plans) {
|
|
878
714
|
const members = intent.members.map((member, index) => ({ intent: member, plan: plans[index] }));
|
|
879
715
|
const cones = () => [...new Set(members.flatMap(({ intent: member, plan }) => this.#groundCones(member, plan)))];
|
|
@@ -896,7 +732,6 @@ export class ApplyWindowHost {
|
|
|
896
732
|
}
|
|
897
733
|
throw new Error("Apply ground scope changed repeatedly while acquiring ownership");
|
|
898
734
|
}
|
|
899
|
-
/** The held ground for a bound window's recovery: its receipts' footprint. */
|
|
900
735
|
async #holdReceipts(receipts) {
|
|
901
736
|
const { cones } = windowFootprint(receipts);
|
|
902
737
|
const addresses = [...new Set(cones.flatMap(address => repositoryGroundCones(address)))];
|
|
@@ -905,25 +740,15 @@ export class ApplyWindowHost {
|
|
|
905
740
|
return () => { if (this.#held === release)
|
|
906
741
|
this.#held = null; release(); };
|
|
907
742
|
}
|
|
908
|
-
/** The held ground: every address plus Git storage a repository at that
|
|
909
|
-
* address keeps outside its checkout, which the same effect writes. */
|
|
910
743
|
#groundCones(intent, plan) {
|
|
911
744
|
return [...new Set(this.applyAddresses(intent, plan).flatMap(address => repositoryGroundCones(address)))];
|
|
912
745
|
}
|
|
913
|
-
/**
|
|
914
|
-
* The visible addresses one member may read or replace: its target
|
|
915
|
-
* address, the entity's current address when it moves, its room chain's
|
|
916
|
-
* sources and destinations. A bound member's are its receipt's. A member current rows no longer place holds only its O
|
|
917
|
-
* address, and its guard then finds its play changed.
|
|
918
|
-
*/
|
|
919
746
|
applyAddresses(intent, plan) {
|
|
920
747
|
const receipt = this.#receiptOf(intent);
|
|
921
748
|
if (receipt)
|
|
922
749
|
return windowFootprint([receipt]).cones;
|
|
923
750
|
return this.#addresses(intent, this.#context(intent, plan));
|
|
924
751
|
}
|
|
925
|
-
/** An unbound member's addresses from one placement of it: a guard places
|
|
926
|
-
* its member once and reads these from that placement. */
|
|
927
752
|
#addresses(intent, context) {
|
|
928
753
|
const physical = context?.current ?? this.#ground.observed(intent.entityId);
|
|
929
754
|
const addresses = new Set(physical ? [physical.absolutePath] : []);
|
|
@@ -938,8 +763,6 @@ export class ApplyWindowHost {
|
|
|
938
763
|
}
|
|
939
764
|
return [...addresses];
|
|
940
765
|
}
|
|
941
|
-
/** Called only after the requesting Watch cutoff settles. Outbox protection
|
|
942
|
-
* remains the rail's independent check; local-only observations never fake it. */
|
|
943
766
|
captureOutcome(intent, plan, observedAddresses) {
|
|
944
767
|
const outcome = settledCaptureOutcome(this.#database, {
|
|
945
768
|
authorityId: intent.authorityId, entityId: intent.entityId,
|
|
@@ -947,17 +770,6 @@ export class ApplyWindowHost {
|
|
|
947
770
|
});
|
|
948
771
|
return outcome.kind === "settled" ? { kind: "settled" } : outcome;
|
|
949
772
|
}
|
|
950
|
-
// ----------------------------------------------------------------- reveal
|
|
951
|
-
/**
|
|
952
|
-
* Shows the member's result at its address through its receipt. Every
|
|
953
|
-
* step proves its own ground as it acts and skips what an earlier run of
|
|
954
|
-
* the same receipt already did, so a bound window runs these same steps
|
|
955
|
-
* again after a park or a restart. A person's object found in the way
|
|
956
|
-
* declines: nothing more of the member is shown, and Verify finds the
|
|
957
|
-
* person's version. A member whose reveal does not finish is never
|
|
958
|
-
* verified, and the durability point lets its control tree go, so what it
|
|
959
|
-
* set aside comes home first (#bringHome).
|
|
960
|
-
*/
|
|
961
773
|
async #reveal(intent, plan) {
|
|
962
774
|
this.#emit(intent, plan, "reveal-started");
|
|
963
775
|
try {
|
|
@@ -976,33 +788,26 @@ export class ApplyWindowHost {
|
|
|
976
788
|
this.#emit(intent, plan, "reveal-finished");
|
|
977
789
|
}
|
|
978
790
|
}
|
|
979
|
-
/** The member's reveal steps on a present root (#reveal). */
|
|
980
791
|
async #revealSteps(intent, plan, receipt) {
|
|
981
792
|
const { address, control, source } = receipt;
|
|
982
793
|
await this.#makeRoom(receipt);
|
|
794
|
+
for (const move of receipt.room)
|
|
795
|
+
await this.#repairMoved(move.source, move.destination);
|
|
983
796
|
if (receipt.kind === "leave")
|
|
984
797
|
return this.#setAside(receipt);
|
|
985
|
-
// A leaf replacing a container takes the container aside whole first.
|
|
986
798
|
if (receipt.displaced) {
|
|
987
799
|
const declinedAside = this.#setAside(receipt);
|
|
988
800
|
if (declinedAside)
|
|
989
801
|
return declinedAside;
|
|
990
802
|
}
|
|
991
|
-
// Identity owns the address transition: the source moves to its target
|
|
992
|
-
// address first, and a payload change then replaces it there. The move
|
|
993
|
-
// refuses rather than replaces a person's object at the target.
|
|
994
803
|
if (source && source.path !== address && holds(source.path, source.physicalKey)) {
|
|
995
804
|
ensureDirBeneath(receipt.root.path, dirname(address), 0o755);
|
|
996
805
|
if (!moveWithoutReplacing(source.path, address))
|
|
997
806
|
return declined(`${address} holds another object.`);
|
|
998
807
|
}
|
|
999
808
|
if (receipt.kind === "container" || receipt.kind === "repository") {
|
|
1000
|
-
// A directory standing at the address is the member's folder, or one
|
|
1001
|
-
// it merges into; anything else gives way to its staged directory.
|
|
1002
809
|
const at = standing(address), staged = receipt.staged;
|
|
1003
810
|
if (!at || !at.isDirectory() || at.isSymbolicLink()) {
|
|
1004
|
-
// With none staged, the source directory was the result, and a
|
|
1005
|
-
// person has moved or replaced it since the guard.
|
|
1006
811
|
if (!staged)
|
|
1007
812
|
return declined(`${address} no longer holds the folder.`);
|
|
1008
813
|
if (!holds(address, staged.physicalKey)) {
|
|
@@ -1012,14 +817,13 @@ export class ApplyWindowHost {
|
|
|
1012
817
|
return declined(`${address} holds another object.`);
|
|
1013
818
|
}
|
|
1014
819
|
}
|
|
1015
|
-
// A former repository's Git storage stays private until its Verify:
|
|
1016
|
-
// a match lets the durability point take it, and any other answer
|
|
1017
|
-
// returns it (#bringHome).
|
|
1018
820
|
if (receipt.gitStorage) {
|
|
1019
821
|
const displaced = displacedGitPath(control, intent.entityId);
|
|
1020
822
|
ensureApplyPrivate(control, displaced);
|
|
1021
823
|
displaceGitStorage(displaced, address, receipt.gitStorage);
|
|
1022
824
|
}
|
|
825
|
+
if (source && source.path !== address)
|
|
826
|
+
await this.#repairMoved(source.path, address);
|
|
1023
827
|
await this.#return(receipt.root.path, [{ uuid: intent.entityId, path: address }]);
|
|
1024
828
|
if (receipt.kind === "repository")
|
|
1025
829
|
return await this.#revealGit(intent, plan, receipt);
|
|
@@ -1040,9 +844,6 @@ export class ApplyWindowHost {
|
|
|
1040
844
|
.map(row => ({ uuid: row.record.uuid, path: join(address, ...row.relativePath.split("/").filter(Boolean)) })));
|
|
1041
845
|
return;
|
|
1042
846
|
}
|
|
1043
|
-
// A file, link or reference: its staged object. One gone from its
|
|
1044
|
-
// private name was shown already (apply-window-recovery.ts). With none,
|
|
1045
|
-
// its source holds the result, and its move above revealed it.
|
|
1046
847
|
const staged = receipt.staged;
|
|
1047
848
|
if (!staged && source)
|
|
1048
849
|
return;
|
|
@@ -1055,10 +856,6 @@ export class ApplyWindowHost {
|
|
|
1055
856
|
if (!replaceAt(receipt, staged.path))
|
|
1056
857
|
return declined(`${address} holds another object.`);
|
|
1057
858
|
}
|
|
1058
|
-
/** A repository that stands where its result will stand proves, before
|
|
1059
|
-
* the window binds, that this computer can rebuild its target and every
|
|
1060
|
-
* record it plays onto the line (rail.ts proveGit): one that cannot waits,
|
|
1061
|
-
* and its window never binds. */
|
|
1062
859
|
async #proveGit(intent, plan) {
|
|
1063
860
|
const target = plan.target.transportVersion, artifact = resultArtifact(plan);
|
|
1064
861
|
const context = this.#context(intent, plan, false);
|
|
@@ -1068,14 +865,6 @@ export class ApplyWindowHost {
|
|
|
1068
865
|
const { line, records } = this.#gitLine(intent);
|
|
1069
866
|
await proveGit(standing, target, this.#gitSource(intent, artifact), await this.#gitKnown(intent.entityId, standing), this.#gitOwners, line, records);
|
|
1070
867
|
}
|
|
1071
|
-
/** The line the records before this one left here, and the records since:
|
|
1072
|
-
* every one the cloud accepted since the line, which the line takes in
|
|
1073
|
-
* first, and this computer's own not accepted by this record, which play
|
|
1074
|
-
* on top. A record made on the line is the line and Git plays nothing; a
|
|
1075
|
-
* clash plays onto it (docs/clash-rules.md in Live). Its row in `git_lines`
|
|
1076
|
-
* owns the line's package in cache retention, so only a cache emptied by
|
|
1077
|
-
* hand leaves the line unheld, and the play then starts at the first record
|
|
1078
|
-
* since. */
|
|
1079
868
|
#gitLine(intent) {
|
|
1080
869
|
const kept = keptLine(this.#database, intent.entityId);
|
|
1081
870
|
return {
|
|
@@ -1083,11 +872,6 @@ export class ApplyWindowHost {
|
|
|
1083
872
|
records: lineRecords(this.#database, intent.authorityId, intent.entityId, kept?.through ?? 0, intent.throughSequence),
|
|
1084
873
|
};
|
|
1085
874
|
}
|
|
1086
|
-
/** Whether ground that shows the record's result shows what the member
|
|
1087
|
-
* must show. A repository shows its line played through the record, which
|
|
1088
|
-
* is the record's own result only when the line plays nothing (rail.ts
|
|
1089
|
-
* linePlays): its own record over a line another computer moved shows
|
|
1090
|
-
* none of that computer's work yet, so it reveals. */
|
|
1091
875
|
async #standsAsRecord(intent, plan) {
|
|
1092
876
|
if (plan.kind !== "repo.git")
|
|
1093
877
|
return true;
|
|
@@ -1097,38 +881,20 @@ export class ApplyWindowHost {
|
|
|
1097
881
|
const { line, records } = this.#gitLine(intent);
|
|
1098
882
|
return !await linePlays(line, records, target, this.#gitSource(intent, artifact));
|
|
1099
883
|
}
|
|
1100
|
-
/** The last state this machine recorded or applied on a repository: its O
|
|
1101
|
-
* row's package, which a row names only when held here. One the cache lost
|
|
1102
|
-
* is fetched back, ringing `directory` when it lands, or the repository is
|
|
1103
|
-
* recover()'s: never read as none (git/held-package.ts). */
|
|
1104
884
|
#gitKnown(entityId, directory) {
|
|
1105
885
|
const row = this.#ground.current(entityId);
|
|
1106
886
|
return row?.type === "repo.git"
|
|
1107
887
|
? baseNotebook(this.#cacheDir, directory, row, this.#restorePackage) : Promise.resolve(null);
|
|
1108
888
|
}
|
|
1109
|
-
/** A target's artifact and its parents, from the cache when its bytes
|
|
1110
|
-
* prove their name, else the wire. */
|
|
1111
889
|
#gitSource(intent, artifact) {
|
|
1112
890
|
return async (version) => readFile((await this.#cargo.sealed(version, this.#onBytes(intent))
|
|
1113
891
|
?? await this.#cargo.readOne({ ...artifact, contentHash: version }, undefined, this.#onBytes(intent))).file);
|
|
1114
892
|
}
|
|
1115
|
-
/**
|
|
1116
|
-
* A repository's Git part: its folder stands, and Git's own files are
|
|
1117
|
-
* made to hold the record played onto the line this computer keeps
|
|
1118
|
-
* (src/git/rail.ts). The part marker says `started`, durably, before Git
|
|
1119
|
-
* writes anything, so recovery knows a torn install is Apply's own;
|
|
1120
|
-
* `ended` follows Git's read of the result, naming what the repository
|
|
1121
|
-
* shows and the line after the record when either is not the record's
|
|
1122
|
-
* own, each package sealed here first. An ended part is done. Its
|
|
1123
|
-
* working-tree files are their own members.
|
|
1124
|
-
*/
|
|
1125
893
|
async #revealGit(intent, plan, receipt) {
|
|
1126
894
|
const target = plan.target.transportVersion, artifact = resultArtifact(plan);
|
|
1127
895
|
if (!target || !artifact)
|
|
1128
896
|
throw new Error(`repository ${intent.entityId} Apply names no Git artifact`);
|
|
1129
897
|
const marker = gitPartPath(receipt.control, intent.entityId);
|
|
1130
|
-
// The last state this machine recorded or applied on it: its O row's
|
|
1131
|
-
// package, which a row names only when held (#gitKnown).
|
|
1132
898
|
const known = () => this.#gitKnown(intent.entityId, receipt.address);
|
|
1133
899
|
try {
|
|
1134
900
|
const part = readGitPart(receipt.control, intent.entityId);
|
|
@@ -1140,20 +906,15 @@ export class ApplyWindowHost {
|
|
|
1140
906
|
await flushEach([marker], [dirname(marker)]);
|
|
1141
907
|
}
|
|
1142
908
|
const { line, records } = this.#gitLine(intent);
|
|
1143
|
-
const { shown, line: after, left, joined } = await applyGit(receipt.address, target, this.#gitSource(intent, artifact), await known(), this.#gitOwners, null, line, records);
|
|
909
|
+
const { shown, line: after, left, joined } = await applyGit(receipt.address, target, recordGitHome(plan.target), this.#gitSource(intent, artifact), await known(), this.#gitOwners, null, line, records);
|
|
1144
910
|
this.#gitHeld.left(intent.entityId, left);
|
|
1145
911
|
const seal = (made) => made?.bytes ? sealContent(this.#cacheDir, { entityId: intent.entityId, entityType: "repo.git", kind: "git", contentHash: made.transportVersion }, made.bytes, "apply") : Promise.resolve();
|
|
1146
912
|
const heads = joined.map(({ path, record, joined: bytes }) => ({ path, record: sha256Hex(record), joined: sha256Hex(bytes), size: bytes.byteLength }));
|
|
1147
913
|
await Promise.all([seal(shown), after === shown ? Promise.resolve() : seal(after),
|
|
1148
914
|
...joined.map(({ joined: bytes }, at) => sealContent(this.#cacheDir, { entityId: intent.entityId, entityType: "file.text", kind: "file", contentHash: heads[at].joined }, bytes, "apply"))]);
|
|
1149
|
-
// A line that joined two writings is what this computer's echo states
|
|
1150
|
-
// (apply-window-saves.ts, stateJoinedLine), with the checkout files
|
|
1151
|
-
// both writings changed: their bytes stay held for Send as a recorded
|
|
1152
|
-
// change's cargo does.
|
|
1153
915
|
if (after !== null && after.stateId !== plan.target.payloadVersion) {
|
|
1154
916
|
await persistRecordCargo(this.#cacheDir, [after.transportVersion, ...heads.map(({ joined: hash }) => hash)]);
|
|
1155
917
|
}
|
|
1156
|
-
// Unflushed: a lost `ended` only plays the same record again.
|
|
1157
918
|
writeFileSync(marker, gitPartEnded(shown === null && after === null ? null : {
|
|
1158
919
|
state: shown?.stateId ?? plan.target.payloadVersion, package: shown?.transportVersion ?? target,
|
|
1159
920
|
line: { package: after?.transportVersion ?? target, state: after?.stateId ?? plan.target.payloadVersion }
|
|
@@ -1169,16 +930,9 @@ export class ApplyWindowHost {
|
|
|
1169
930
|
throw error;
|
|
1170
931
|
}
|
|
1171
932
|
}
|
|
1172
|
-
/** Takes the source aside, whole, for a member that lets it go: a Leave,
|
|
1173
|
-
* or a leaf replacing a container. Its Verify reads the copy against the
|
|
1174
|
-
* fingerprint its final guard took before anything else, and keeps what it
|
|
1175
|
-
* set aside on a match or brings the copy home on any other answer
|
|
1176
|
-
* (#verify). The step repeats safely after a crash. */
|
|
1177
933
|
#setAside(receipt) {
|
|
1178
934
|
return takeSource(receipt) ? undefined : declined("A person's object stands where this member acts.");
|
|
1179
935
|
}
|
|
1180
|
-
/** Keeps the remainder the member displaced with its source, durably,
|
|
1181
|
-
* once its Verify matches and before it may complete. */
|
|
1182
936
|
async #keep(intent, plan, receipt) {
|
|
1183
937
|
const remainder = receipt.displaced?.aside ?? [];
|
|
1184
938
|
if (remainder.length === 0 || !receipt.source)
|
|
@@ -1187,18 +941,6 @@ export class ApplyWindowHost {
|
|
|
1187
941
|
displaced: displacedPath(receipt.control, intent.entityId), remainder }));
|
|
1188
942
|
this.#emit(intent, plan, "kept", `Local ground beneath ${intent.entityId} was kept by attempt ${intent.attemptId}.`);
|
|
1189
943
|
}
|
|
1190
|
-
/**
|
|
1191
|
-
* Brings what the member set aside home, durably, for any answer but its
|
|
1192
|
-
* Verify's match: a Leave's source, or the container a leaf replaces
|
|
1193
|
-
* (#setAside). A staged leaf first returns to its private name while it
|
|
1194
|
-
* stands as staged, so the container can return to the address it left
|
|
1195
|
-
* (apply-displaced-tree.ts); a directory whose home a person took is kept
|
|
1196
|
-
* beneath the container's own UUID (apply-kept.ts), and a leaf there is the
|
|
1197
|
-
* O its guard proved. A former repository's Git storage returns to its
|
|
1198
|
-
* folder, or is kept there when another `.git` stands
|
|
1199
|
-
* (apply-git-storage.ts). Every step repeats safely after a crash, and a
|
|
1200
|
-
* root that is not present holds everything in its own control tree.
|
|
1201
|
-
*/
|
|
1202
944
|
async #bringHome(intent, plan, receipt) {
|
|
1203
945
|
if (judgeBoundRoot(receipt.root) !== "present")
|
|
1204
946
|
return;
|
|
@@ -1222,10 +964,6 @@ export class ApplyWindowHost {
|
|
|
1222
964
|
if (kept)
|
|
1223
965
|
this.#emit(intent, plan, "kept", `Ground ${id} set aside was kept by attempt ${intent.attemptId}; its home holds another object.`);
|
|
1224
966
|
}
|
|
1225
|
-
/** Returns the ground kept for each container this reveal shows again
|
|
1226
|
-
* (apply-kept.ts) into its free addresses, durably, inside the ground the
|
|
1227
|
-
* window owns; emptied keeps go only after that flush. The window's end
|
|
1228
|
-
* wakes Detect over each container. */
|
|
1229
967
|
async #return(root, containers) {
|
|
1230
968
|
const changed = [], owners = [];
|
|
1231
969
|
for (const { uuid, path } of containers) {
|
|
@@ -1241,9 +979,9 @@ export class ApplyWindowHost {
|
|
|
1241
979
|
for (const owner of owners)
|
|
1242
980
|
vacateKept(root, owner);
|
|
1243
981
|
}
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
982
|
+
#repairMoved(from, to) {
|
|
983
|
+
return repairMoved(from, to, this.#ground.pointersAcross(from, to));
|
|
984
|
+
}
|
|
1247
985
|
async #makeRoom(receipt) {
|
|
1248
986
|
if (receipt.room.length === 0)
|
|
1249
987
|
return;
|
|
@@ -1256,17 +994,9 @@ export class ApplyWindowHost {
|
|
|
1256
994
|
onStage: this.#onDerivedRelocationStage,
|
|
1257
995
|
});
|
|
1258
996
|
}
|
|
1259
|
-
// ----------------------------------------------------------------- verify
|
|
1260
|
-
/** One reread of the member's real ground, under the window's held ground
|
|
1261
|
-
* and its root's content clock; its exact rows are staged for the end.
|
|
1262
|
-
* What the member set aside goes with its window only when this answers
|
|
1263
|
-
* match: any other answer brings it home before anything judges what was
|
|
1264
|
-
* shown, since the durability point lets the window's control tree go. */
|
|
1265
997
|
async #verify(intent, plan) {
|
|
1266
998
|
this.#emit(intent, plan, "verify-started");
|
|
1267
999
|
try {
|
|
1268
|
-
// Yield before the fresh physical proof, never between a final guard
|
|
1269
|
-
// and reveal. Ground ownership remains in force.
|
|
1270
1000
|
await awaitTurn();
|
|
1271
1001
|
const receipt = this.#receiptOf(intent);
|
|
1272
1002
|
if (!receipt)
|
|
@@ -1283,13 +1013,8 @@ export class ApplyWindowHost {
|
|
|
1283
1013
|
this.#emit(intent, plan, "verify-finished");
|
|
1284
1014
|
}
|
|
1285
1015
|
}
|
|
1286
|
-
/** Verify's reread on a present root (#verify). `shown` is a person's
|
|
1287
|
-
* change to what the window showed, which #shown projects. */
|
|
1288
1016
|
async #verifyMember(intent, plan, receipt) {
|
|
1289
1017
|
try {
|
|
1290
|
-
// What the member set aside is read first, against the fingerprint its
|
|
1291
|
-
// final guard took: a person's write there is theirs, whatever else
|
|
1292
|
-
// Verify finds (apply-displaced-tree.ts, apply-git-storage.ts).
|
|
1293
1018
|
if (!await this.#asideIsO(intent, receipt)) {
|
|
1294
1019
|
return { kind: "local-change", reason: "A person changed what Apply set aside; it returns home for Detect to record." };
|
|
1295
1020
|
}
|
|
@@ -1302,14 +1027,12 @@ export class ApplyWindowHost {
|
|
|
1302
1027
|
return { kind: "rejudge", reason: read.reason };
|
|
1303
1028
|
const room = read.value;
|
|
1304
1029
|
const context = this.#boundContext(receipt);
|
|
1305
|
-
// Every read Verify proves follows its root's content clock.
|
|
1306
1030
|
const clock = await this.#clock(intent.attemptId, receipt.root.path);
|
|
1307
1031
|
let proof;
|
|
1308
1032
|
let ground;
|
|
1309
1033
|
if (receipt.kind === "leave") {
|
|
1310
1034
|
if (standing(receipt.address) !== null)
|
|
1311
1035
|
return { kind: "local-change" };
|
|
1312
|
-
// The kept names leave the copy before its proof reads it.
|
|
1313
1036
|
await this.#keep(intent, plan, receipt);
|
|
1314
1037
|
proof = this.#absenceReceipt(receipt);
|
|
1315
1038
|
ground = leaveGround();
|
|
@@ -1322,26 +1045,19 @@ export class ApplyWindowHost {
|
|
|
1322
1045
|
ground = enterGround(enter, verifiedRow(this.#ground, plan.target, context, proof, clock));
|
|
1323
1046
|
}
|
|
1324
1047
|
else if (intent.emptied && receipt.staged) {
|
|
1325
|
-
// An emptied file shows the object Apply placed, whatever a person
|
|
1326
|
-
// wrote in it since. Nothing proved its content, so its rows name
|
|
1327
|
-
// the target unsighted, offering the object's presence, and only
|
|
1328
|
-
// Detect records what stands there (drive/README.md in Live). One
|
|
1329
|
-
// whose target already stood staged nothing, and is judged as any.
|
|
1330
1048
|
const placed = await this.#landed(receipt.address, receipt.staged.physicalKey);
|
|
1331
1049
|
if (!placed)
|
|
1332
1050
|
return { kind: "shown", enter, room, clock };
|
|
1333
1051
|
proof = placed;
|
|
1334
|
-
|
|
1052
|
+
const stats = signedStat(receipt.staged.signature);
|
|
1053
|
+
ground = containerGround(this.#ground, plan.target, context, { ...verifiedRow(this.#ground, plan.target, context, { stats, proof: placed.proof }, null), presence: sightingUnder(clock, stats) });
|
|
1335
1054
|
}
|
|
1336
1055
|
else {
|
|
1337
|
-
// A played repository shows the record played onto the line and
|
|
1338
|
-
// what this computer changed since: its row states that, Apply's own
|
|
1339
|
-
// verified result, so Detect publishes nothing for it, and the end
|
|
1340
|
-
// keeps the line the next record plays onto (src/git/rail.ts).
|
|
1341
1056
|
const end = receipt.kind === "repository" ? gitPartEnd(receipt.control, intent.entityId) : null;
|
|
1342
1057
|
const shown = end === null ? plan.target : { ...plan.target, payloadVersion: end.state, transportVersion: end.package,
|
|
1343
1058
|
version: canonicalVersion({ ...plan.target, payloadVersion: end.state }, sha256Hex) };
|
|
1344
|
-
const
|
|
1059
|
+
const signed = { mtime: shown.mtime, sourceSignature: (receipt.staged ?? receipt.source)?.signature ?? null };
|
|
1060
|
+
const matches = await this.#matches(intent, shown, receipt.address, signed, receipt.address, found => { proof = found; });
|
|
1345
1061
|
if (!matches)
|
|
1346
1062
|
return { kind: "shown", enter, room, clock };
|
|
1347
1063
|
await this.#keep(intent, plan, receipt);
|
|
@@ -1368,9 +1084,6 @@ export class ApplyWindowHost {
|
|
|
1368
1084
|
throw error;
|
|
1369
1085
|
}
|
|
1370
1086
|
}
|
|
1371
|
-
/** Whether what the member set aside is still the O its final guard
|
|
1372
|
-
* fingerprinted, read under that guard's clock while its qualification
|
|
1373
|
-
* stands. Nothing set aside has nothing to lose. */
|
|
1374
1087
|
async #asideIsO(intent, receipt) {
|
|
1375
1088
|
const { displaced, gitStorage, source } = receipt;
|
|
1376
1089
|
const reads = this.#readCounters(intent);
|
|
@@ -1381,9 +1094,6 @@ export class ApplyWindowHost {
|
|
|
1381
1094
|
return !gitStorage || (stands(gitStorage.clock)
|
|
1382
1095
|
&& await keptStorageIsO(displacedGitPath(receipt.control, intent.entityId), gitStorage, reads));
|
|
1383
1096
|
}
|
|
1384
|
-
/** What a member's rows consume, read under the window's one observation:
|
|
1385
|
-
* its target's facts, an Enter's sealed members, and the room its reveal
|
|
1386
|
-
* made. */
|
|
1387
1097
|
async #readFacts(intent, plan, receipt) {
|
|
1388
1098
|
const enter = receipt.kind === "enter" ? (await this.#ensurePrepared(intent, plan)).enter : undefined;
|
|
1389
1099
|
const [members, containers] = enter
|
|
@@ -1396,16 +1106,6 @@ export class ApplyWindowHost {
|
|
|
1396
1106
|
});
|
|
1397
1107
|
return { enter, read };
|
|
1398
1108
|
}
|
|
1399
|
-
/**
|
|
1400
|
-
* A person changed, moved or removed what the window showed before Verify
|
|
1401
|
-
* read it. A staged object that left its control tree was shown, since a
|
|
1402
|
-
* rename leaves it at one name or the other (ApplyWindowStore.bindWindow):
|
|
1403
|
-
* its rows project as staged, unsighted, beside the room the reveal made,
|
|
1404
|
-
* and the member stays owed. The window's clock, stamped after the staged
|
|
1405
|
-
* object existed, offers its presence, so its key carries it wherever the
|
|
1406
|
-
* person moved it. Detect then reads the person's version as a change of
|
|
1407
|
-
* the identity Apply showed, never as a new one.
|
|
1408
|
-
*/
|
|
1409
1109
|
#shown(intent, plan, receipt, enter, room, clock) {
|
|
1410
1110
|
const { staged } = receipt;
|
|
1411
1111
|
if (staged && !holds(staged.path, staged.physicalKey)) {
|
|
@@ -1418,8 +1118,6 @@ export class ApplyWindowHost {
|
|
|
1418
1118
|
}
|
|
1419
1119
|
return { kind: "local-change" };
|
|
1420
1120
|
}
|
|
1421
|
-
/** The window's content clock for one root, stamped once per window after
|
|
1422
|
-
* its reveals, so Verify proves what the window wrote. */
|
|
1423
1121
|
async #clock(attemptId, root) {
|
|
1424
1122
|
const clocks = this.#clocks.get(attemptId) ?? new Map();
|
|
1425
1123
|
this.#clocks.set(attemptId, clocks);
|
|
@@ -1427,14 +1125,12 @@ export class ApplyWindowHost {
|
|
|
1427
1125
|
clocks.set(root, (await stampAfterWrites(this.#database.name, root)).boundary);
|
|
1428
1126
|
return clocks.get(root);
|
|
1429
1127
|
}
|
|
1430
|
-
/** An unavailable root holds the line on its own capability. */
|
|
1431
1128
|
#rootWait(path) {
|
|
1432
1129
|
const root = this.#ground.atPath(path);
|
|
1433
1130
|
const entityIds = root && root.uuid === root.rootUUID ? [root.uuid] : [];
|
|
1434
1131
|
return { kind: "dependency", reason: `Materialized root ${path} is unavailable; Apply waits for it to return.`,
|
|
1435
1132
|
waitFor: { producer: "capability", entityIds } };
|
|
1436
1133
|
}
|
|
1437
|
-
/** A bound member's addresses, read from its receipt. */
|
|
1438
1134
|
#boundContext(receipt) {
|
|
1439
1135
|
const { target } = receipt;
|
|
1440
1136
|
const current = this.#ground.current(receipt.intent.entityId);
|
|
@@ -1446,9 +1142,6 @@ export class ApplyWindowHost {
|
|
|
1446
1142
|
targetName: basename(receipt.address),
|
|
1447
1143
|
};
|
|
1448
1144
|
}
|
|
1449
|
-
/** The proof of a staged object standing at its target, nothing in it
|
|
1450
|
-
* read: an Enter's landed tree, whose members are the seal's, or an emptied
|
|
1451
|
-
* file, whose bytes are a person's. Null when a person moved or replaced it. */
|
|
1452
1145
|
async #landed(path, physical) {
|
|
1453
1146
|
const stats = standing(path);
|
|
1454
1147
|
if (!stats || stats.isSymbolicLink() || physicalKey(stats) !== physical)
|
|
@@ -1457,8 +1150,6 @@ export class ApplyWindowHost {
|
|
|
1457
1150
|
await closeSource(proof);
|
|
1458
1151
|
return { stats: receiptStats(stats), proof };
|
|
1459
1152
|
}
|
|
1460
|
-
/** A Leave's proof is the ground Verify read: the address it left and the
|
|
1461
|
-
* private object it took, each exactly as found. */
|
|
1462
1153
|
#absenceReceipt(receipt) {
|
|
1463
1154
|
const witnesses = new PhysicalPathWitnesses();
|
|
1464
1155
|
for (const path of [receipt.address, displacedPath(receipt.control, receipt.intent.entityId)])
|
|
@@ -1467,16 +1158,6 @@ export class ApplyWindowHost {
|
|
|
1467
1158
|
closePhysically(proof);
|
|
1468
1159
|
return { stats: null, proof };
|
|
1469
1160
|
}
|
|
1470
|
-
// ---------------------------------------------------------------- recover
|
|
1471
|
-
/**
|
|
1472
|
-
* A bound window re-entered after a park or a restart: its receipts are
|
|
1473
|
-
* read from its rows, its ground held again, and each member finished
|
|
1474
|
-
* through its receipt in containment order (apply-window-recovery.ts): a
|
|
1475
|
-
* result that stands is verified; a prefix, or a torn result, runs its
|
|
1476
|
-
* reveal steps again; a person's version stays theirs and the member stays
|
|
1477
|
-
* owed. A member whose records the Inbox no longer holds has no plan and
|
|
1478
|
-
* stays owed.
|
|
1479
|
-
*/
|
|
1480
1161
|
async #recover(intent, plans) {
|
|
1481
1162
|
this.store.forgetObservation(intent.attemptId);
|
|
1482
1163
|
let receipts = this.store.receipts(intent.attemptId);
|
|
@@ -1549,15 +1230,12 @@ export class ApplyWindowHost {
|
|
|
1549
1230
|
}
|
|
1550
1231
|
return intent.members.map(member => outcomes.get(member.entityId) ?? { kind: "owed", reason: "not reached" });
|
|
1551
1232
|
}
|
|
1552
|
-
/** Whether the ground at `at` shows what the member's final guard proved
|
|
1553
|
-
* of its source (#guard), read the same way: the source's O row, which
|
|
1554
|
-
* stands until the window ends. A repository Git refuses shows nothing. */
|
|
1555
1233
|
async #showsGuarded(intent, at) {
|
|
1556
1234
|
const current = this.#ground.current(intent.entityId);
|
|
1557
1235
|
if (!current)
|
|
1558
1236
|
return false;
|
|
1559
1237
|
try {
|
|
1560
|
-
return await this.#matches(intent, portable(current), at);
|
|
1238
|
+
return await this.#matches(intent, portable(current), at, current);
|
|
1561
1239
|
}
|
|
1562
1240
|
catch (error) {
|
|
1563
1241
|
if (error instanceof GitApplyWait)
|
|
@@ -1565,9 +1243,6 @@ export class ApplyWindowHost {
|
|
|
1565
1243
|
throw error;
|
|
1566
1244
|
}
|
|
1567
1245
|
}
|
|
1568
|
-
/** A window that never bound leaves nothing anyone owns: what its attempt
|
|
1569
|
-
* prepared and its control trees go, a member cut from the prefix included.
|
|
1570
|
-
* A bound window keeps its trees for #recover. */
|
|
1571
1246
|
async #discard(intent) {
|
|
1572
1247
|
const bound = boundAttempts(this.#database).has(intent.attemptId);
|
|
1573
1248
|
this.#forgetAttempt(intent.attemptId);
|
|
@@ -1586,10 +1261,6 @@ export class ApplyWindowHost {
|
|
|
1586
1261
|
await rm(control, { recursive: true, force: true });
|
|
1587
1262
|
}
|
|
1588
1263
|
}
|
|
1589
|
-
/** The end commit landed: the window's ground is no longer owned, every
|
|
1590
|
-
* byte it revealed is owed to the durability point, and every entity whose
|
|
1591
|
-
* rows it wrote, a closure an Enter installed or ground a Leave took away
|
|
1592
|
-
* included, is heard by whatever reads those rows. */
|
|
1593
1264
|
#ended(intent, members, written, stated) {
|
|
1594
1265
|
const byEntity = intent ? this.store.receipts(intent.attemptId) : new Map();
|
|
1595
1266
|
const receipts = [...byEntity.values()];
|
|
@@ -1599,9 +1270,6 @@ export class ApplyWindowHost {
|
|
|
1599
1270
|
const receipt = byEntity.get(member.entityId);
|
|
1600
1271
|
const common = { entityId: member.entityId, throughSequence: member.throughSequence, type: member.type, at: this.#now(),
|
|
1601
1272
|
contentReads: receipt ? this.#takeReads(receipt.intent) : 0 };
|
|
1602
|
-
// In the resolved prefix, a settled member owed no effect and a
|
|
1603
|
-
// materialized one retired. Every other member is judged again at the
|
|
1604
|
-
// next step: its own reason, or the first owed member it stands behind.
|
|
1605
1273
|
if (index >= resolved.length) {
|
|
1606
1274
|
this.#onStage?.({ ...common, stage: "owed",
|
|
1607
1275
|
reason: member.outcome.kind === "owed" ? member.outcome.reason : `behind owed member ${behind.entityId}` });
|
|
@@ -1623,12 +1291,6 @@ export class ApplyWindowHost {
|
|
|
1623
1291
|
this.#onWindowEnded?.({ cones, uuids: [...new Set([...uuids, ...written])], stated });
|
|
1624
1292
|
this.durability.owe({ attemptId: intent.attemptId, members: receipts.length, ...this.#owedBy(receipts, made) });
|
|
1625
1293
|
}
|
|
1626
|
-
/** Where a window's receipts placed their results, and the control trees
|
|
1627
|
-
* it may let go once durable, `made` by a member it left out included: that
|
|
1628
|
-
* member's tree may stand in a root no receipt names. Every byte it showed persisted before its
|
|
1629
|
-
* receipt bound (ApplyWindowStore.bindWindow, apply-enter-build.ts); a
|
|
1630
|
-
* revealed file is still flushed, which carries its name where a platform
|
|
1631
|
-
* opens no directory. */
|
|
1632
1294
|
#owedBy(receipts, made = []) {
|
|
1633
1295
|
const files = new Set(), directories = new Set(), controls = new Set(made);
|
|
1634
1296
|
for (const receipt of receipts) {
|
|
@@ -1658,7 +1320,6 @@ export class ApplyWindowHost {
|
|
|
1658
1320
|
#receiptOf(intent) {
|
|
1659
1321
|
return this.store.receipts(intent.attemptId).get(intent.entityId) ?? null;
|
|
1660
1322
|
}
|
|
1661
|
-
/** The window's control tree beneath the member's binding root. */
|
|
1662
1323
|
#controlOf(intent, context) {
|
|
1663
1324
|
const anchor = context.current ?? context.parent;
|
|
1664
1325
|
if (!anchor)
|
|
@@ -1671,14 +1332,9 @@ export class ApplyWindowHost {
|
|
|
1671
1332
|
controls.add(control);
|
|
1672
1333
|
return control;
|
|
1673
1334
|
}
|
|
1674
|
-
|
|
1675
|
-
/** A match has three answers (AGENTS.md section 8): the ground shows the
|
|
1676
|
-
* record; a settled read shows other ground; or nothing was proved, and
|
|
1677
|
-
* the fault throws for the rail to retry. Only the second is ever a
|
|
1678
|
-
* person's change. A refusal is a settled answer. */
|
|
1679
|
-
async #matches(intent, record, path, originalPath = path, remember) {
|
|
1335
|
+
async #matches(intent, record, path, signed, originalPath = path, remember) {
|
|
1680
1336
|
try {
|
|
1681
|
-
return await this.#reads(intent, record, path, originalPath, remember);
|
|
1337
|
+
return await this.#reads(intent, record, path, signed, originalPath, remember);
|
|
1682
1338
|
}
|
|
1683
1339
|
catch (error) {
|
|
1684
1340
|
if (isRefusal(error))
|
|
@@ -1686,7 +1342,7 @@ export class ApplyWindowHost {
|
|
|
1686
1342
|
throw error;
|
|
1687
1343
|
}
|
|
1688
1344
|
}
|
|
1689
|
-
async #reads(intent, record, path, originalPath, remember) {
|
|
1345
|
+
async #reads(intent, record, path, signed, originalPath, remember) {
|
|
1690
1346
|
if (record.status !== "active")
|
|
1691
1347
|
throw new Error(`Apply matched ${record.status} ${record.uuid}, which nothing shows`);
|
|
1692
1348
|
const stats = standing(path);
|
|
@@ -1702,28 +1358,22 @@ export class ApplyWindowHost {
|
|
|
1702
1358
|
const expected = record.payloadVersion;
|
|
1703
1359
|
if (!expected)
|
|
1704
1360
|
throw new Error(`Apply matched ${record.uuid} with no payload`);
|
|
1705
|
-
const modeShown = record.type === "link" || record.fileMode === portableFileMode(record.type, shownMode(Number(stats.mode), record.fileMode))
|
|
1361
|
+
const modeShown = record.type === "link" || record.fileMode === portableFileMode(record.type, shownMode(Number(stats.mode), record.fileMode))
|
|
1362
|
+
&& record.mtime === shownTime(record.type, stats.mtimeNs, signed);
|
|
1706
1363
|
const shown = async () => {
|
|
1707
1364
|
const witnesses = new PhysicalPathWitnesses();
|
|
1708
1365
|
witnesses.remember(dirname(path), optionalLstat(dirname(path)));
|
|
1709
1366
|
witnesses.remember(path, stats);
|
|
1710
1367
|
return modeShown && retain(stats, witnessProof([witnesses.seal()]));
|
|
1711
1368
|
};
|
|
1712
|
-
// A leaf this computer proved keeps its proof while the slot shows its
|
|
1713
|
-
// exact signature, by the rule Detect reuses it (source-signature.ts):
|
|
1714
|
-
// its bytes are not read again. An object Apply just placed carries
|
|
1715
|
-
// the change time of its rename, past every earlier stamp, so it is
|
|
1716
|
-
// always read once, and that read becomes its row's proof.
|
|
1717
1369
|
const proven = this.#ground.atPath(path);
|
|
1718
1370
|
if (proven?.payloadVersion && sourceReusable(proven, stats)) {
|
|
1719
1371
|
return proven.type === record.type && proven.payloadVersion === expected && shown();
|
|
1720
1372
|
}
|
|
1721
1373
|
this.#contentReads.set(intent, (this.#contentReads.get(intent) ?? 0) + 1);
|
|
1722
|
-
// Read the way Detect reads it (src/detection/runtime.ts).
|
|
1723
1374
|
if (record.type === "link") {
|
|
1724
1375
|
return stats.isSymbolicLink() && sha256Hex(Buffer.from(readLinkTarget(path), "utf8")) === expected && shown();
|
|
1725
1376
|
}
|
|
1726
|
-
// No accepted record names content past the bound (contentWaits).
|
|
1727
1377
|
if (!stats.isFile() || contentWaits(stats.size) !== null)
|
|
1728
1378
|
return false;
|
|
1729
1379
|
const content = await captureContent(path, stats, null, { lane: "named", onBytes: this.#onBytes(intent) });
|
|
@@ -1741,26 +1391,11 @@ export class ApplyWindowHost {
|
|
|
1741
1391
|
}
|
|
1742
1392
|
const addressProof = witnessProof([addressWitness(path, stats)]);
|
|
1743
1393
|
if (record.type === "repo.git") {
|
|
1744
|
-
// A repository is its folder plus its Git directory's state, read
|
|
1745
|
-
// without a Git process; its working-tree files are their own entities.
|
|
1746
1394
|
if (!stats.isDirectory() || stats.isSymbolicLink() || !hasGitMarker(path))
|
|
1747
1395
|
return false;
|
|
1748
|
-
// The record completes here only through its own package, held
|
|
1749
|
-
// (git/held-package.ts), which its row then names. Equal Git state
|
|
1750
|
-
// without it is no completion: the member fetches it, and its reveal
|
|
1751
|
-
// rewrites nothing that already stands.
|
|
1752
1396
|
const carries = record.transportVersion;
|
|
1753
1397
|
if (!holdsPackage(this.#cacheDir, carries))
|
|
1754
1398
|
return false;
|
|
1755
|
-
// It is read in the form of the state it last stood at, as Apply
|
|
1756
|
-
// writes it: a repository that stood in byte form shows its storage,
|
|
1757
|
-
// which a Git-form record leaves out, so only its reveal, dropping that
|
|
1758
|
-
// storage, makes it stand as the record. That state is its O row's
|
|
1759
|
-
// package; one not held here proves nothing, and the reveal reads it.
|
|
1760
|
-
// Otherwise it is read in the form of the record's state: one in byte
|
|
1761
|
-
// form is shown only by storage that stands as its bytes. One Git
|
|
1762
|
-
// refuses, or a disk that keeps no posture, reads the rest from that
|
|
1763
|
-
// package's state.
|
|
1764
1399
|
const last = { stateId: record.payloadVersion,
|
|
1765
1400
|
state: async () => (await heldNotebook(this.#cacheDir, carries))?.state ?? null };
|
|
1766
1401
|
const row = this.#ground.current(record.uuid);
|
|
@@ -1773,8 +1408,6 @@ export class ApplyWindowHost {
|
|
|
1773
1408
|
throw new GitApplyWait(`${path} holds ${read.unsupported}; Apply waits for it to change`);
|
|
1774
1409
|
if (read.stateId !== record.payloadVersion)
|
|
1775
1410
|
return false;
|
|
1776
|
-
// The state ID is Git's answer, which no witness of the folder holds:
|
|
1777
|
-
// the end asks it again, and a Git command since moves the proof.
|
|
1778
1411
|
const answered = semanticProof(async () => {
|
|
1779
1412
|
const again = hasGitMarker(path) ? await gitStateIdOf(path, this.#gitOwners, last, stood) : null;
|
|
1780
1413
|
if (!again || !("stateId" in again) || again.stateId !== read.stateId) {
|
|
@@ -1789,22 +1422,15 @@ export class ApplyWindowHost {
|
|
|
1789
1422
|
return false;
|
|
1790
1423
|
return retain(stats, addressProof);
|
|
1791
1424
|
}
|
|
1792
|
-
// -------------------------------------------------------------- placement
|
|
1793
1425
|
#placed(intent, plan) {
|
|
1794
1426
|
const context = this.#context(intent, plan);
|
|
1795
1427
|
if (!context)
|
|
1796
1428
|
throw new Error(`entity ${intent.entityId} plays ${plan.play}, but no current row places it`);
|
|
1797
1429
|
return context;
|
|
1798
1430
|
}
|
|
1799
|
-
/** Where the member stands and what moves before it, with the returns its
|
|
1800
|
-
* look read. */
|
|
1801
1431
|
#context(intent, plan, leaving = plan.kind === "leave") {
|
|
1802
1432
|
return this.#ground.context(plan.target, leaving, this.#returns.get(intent));
|
|
1803
1433
|
}
|
|
1804
|
-
/** How this computer shows the member's result now, and, on a line, the
|
|
1805
|
-
* entities its own moves would put in a loop that return to their line
|
|
1806
|
-
* parent first (LineJudge.withLineParents). A lane enters a unit and
|
|
1807
|
-
* returns nothing. */
|
|
1808
1434
|
async #showing(intent, plan) {
|
|
1809
1435
|
if (intent.unit !== null) {
|
|
1810
1436
|
return { judged: new ShownGround(this.#database, this.#onDemand, enteredPlace(intent)).judge(plan.target), returns: new Map() };
|
|
@@ -1818,7 +1444,6 @@ export class ApplyWindowHost {
|
|
|
1818
1444
|
this.#onStage?.({ entityId: intent.entityId, throughSequence: intent.throughSequence, type: plan.target.type, stage,
|
|
1819
1445
|
...(reason === undefined ? {} : { reason }), contentReads: this.#takeReads(intent), at: this.#now() });
|
|
1820
1446
|
}
|
|
1821
|
-
/** Counts a fingerprint's reads as the member's own (apply-fingerprint.ts). */
|
|
1822
1447
|
#readCounters(intent) {
|
|
1823
1448
|
return { onRead: () => this.#contentReads.set(intent, (this.#contentReads.get(intent) ?? 0) + 1),
|
|
1824
1449
|
onBytes: this.#onBytes(intent) };
|
|
@@ -1828,15 +1453,11 @@ export class ApplyWindowHost {
|
|
|
1828
1453
|
this.#contentReads.delete(intent);
|
|
1829
1454
|
return reads;
|
|
1830
1455
|
}
|
|
1831
|
-
/** A lane window's cargo moves its fetch's stall clock; a line's has no
|
|
1832
|
-
* fetch waiting on it. Every lane read has a listener (src/apply-window-cargo.ts). */
|
|
1833
1456
|
#onBytes(intent) {
|
|
1834
1457
|
const unit = intent.unit, progressed = this.#progressed;
|
|
1835
1458
|
return unit === null ? undefined : bytes => progressed?.(unit, bytes);
|
|
1836
1459
|
}
|
|
1837
1460
|
}
|
|
1838
|
-
/** Whether two looks named the same returns. */
|
|
1839
1461
|
function sameReturns(a, b) {
|
|
1840
1462
|
return (a?.size ?? 0) === b.size && [...b].every(([uuid, parent]) => a?.get(uuid) === parent);
|
|
1841
1463
|
}
|
|
1842
|
-
//# sourceMappingURL=apply-window-host.js.map
|