@amalgm/shell 0.1.164-preview.36072132286 → 0.1.164-preview.36809057014
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PURPOSE.md +642 -128
- package/README.md +10 -8
- package/dist/accepted-tail.d.ts +26 -0
- package/dist/accepted-tail.js +37 -0
- package/dist/accepted-tail.js.map +1 -0
- package/dist/agent-execution.d.ts +16 -1
- package/dist/agent-execution.js +13 -5
- package/dist/agent-execution.js.map +1 -1
- package/dist/apply-cleanup.d.ts +28 -0
- package/dist/apply-cleanup.js +166 -0
- package/dist/apply-cleanup.js.map +1 -0
- package/dist/apply-recovery.d.ts +47 -0
- package/dist/apply-recovery.js +99 -0
- package/dist/apply-recovery.js.map +1 -0
- package/dist/apply-rows.d.ts +72 -0
- package/dist/apply-rows.js +150 -0
- package/dist/apply-rows.js.map +1 -0
- package/dist/apply-saves.d.ts +85 -0
- package/dist/apply-saves.js +238 -0
- package/dist/apply-saves.js.map +1 -0
- package/dist/boot.js +2 -1
- package/dist/boot.js.map +1 -1
- package/dist/capture-work.d.ts +8 -0
- package/dist/capture-work.js +67 -0
- package/dist/capture-work.js.map +1 -0
- package/dist/cargo-group.d.ts +45 -0
- package/dist/cargo-group.js +88 -0
- package/dist/cargo-group.js.map +1 -0
- package/dist/channel-session.d.ts +4 -2
- package/dist/channel-session.js +4 -3
- package/dist/channel-session.js.map +1 -1
- package/dist/chat-composition.d.ts +2 -0
- package/dist/chat-composition.js +1 -0
- package/dist/chat-composition.js.map +1 -1
- package/dist/cli.js +20 -1
- package/dist/cli.js.map +1 -1
- package/dist/construct-apply-host.d.ts +4 -2
- package/dist/construct-apply-host.js +8 -3
- package/dist/construct-apply-host.js.map +1 -1
- package/dist/construct-door.js +1 -1
- package/dist/construct-door.js.map +1 -1
- package/dist/construct-ledger.d.ts +6 -1
- package/dist/construct-ledger.js +21 -33
- package/dist/construct-ledger.js.map +1 -1
- package/dist/content-cache-collection.d.ts +18 -0
- package/dist/content-cache-collection.js +99 -0
- package/dist/content-cache-collection.js.map +1 -0
- package/dist/content-cache-host.d.ts +83 -17
- package/dist/content-cache-host.js +335 -95
- package/dist/content-cache-host.js.map +1 -1
- package/dist/content-cache-namespace.d.ts +59 -0
- package/dist/content-cache-namespace.js +210 -0
- package/dist/content-cache-namespace.js.map +1 -0
- package/dist/content-cache-ownership.d.ts +13 -0
- package/dist/content-cache-ownership.js +75 -0
- package/dist/content-cache-ownership.js.map +1 -0
- package/dist/content-cache-retention.d.ts +23 -0
- package/dist/content-cache-retention.js +195 -0
- package/dist/content-cache-retention.js.map +1 -0
- package/dist/content-capture-pool.d.ts +287 -0
- package/dist/content-capture-pool.js +461 -0
- package/dist/content-capture-pool.js.map +1 -0
- package/dist/content-capture-worker.d.ts +8 -0
- package/dist/content-capture-worker.js +109 -0
- package/dist/content-capture-worker.js.map +1 -0
- package/dist/content-clock.d.ts +42 -0
- package/dist/content-clock.js +166 -0
- package/dist/content-clock.js.map +1 -0
- package/dist/content-direct.d.ts +2 -0
- package/dist/content-direct.js +12 -0
- package/dist/content-direct.js.map +1 -1
- package/dist/content-failure.d.ts +18 -0
- package/dist/content-failure.js +38 -0
- package/dist/content-failure.js.map +1 -0
- package/dist/content-stream-thread.d.ts +60 -0
- package/dist/content-stream-thread.js +95 -0
- package/dist/content-stream-thread.js.map +1 -0
- package/dist/content-stream-worker.d.ts +7 -0
- package/dist/content-stream-worker.js +52 -0
- package/dist/content-stream-worker.js.map +1 -0
- package/dist/declaration-absorption.d.ts +37 -0
- package/dist/declaration-absorption.js +119 -0
- package/dist/declaration-absorption.js.map +1 -0
- package/dist/declaration-chain.d.ts +36 -0
- package/dist/declaration-chain.js +96 -0
- package/dist/declaration-chain.js.map +1 -0
- package/dist/declaration-commit.d.ts +31 -0
- package/dist/declaration-commit.js +49 -0
- package/dist/declaration-commit.js.map +1 -0
- package/dist/declaration-hold.d.ts +22 -0
- package/dist/declaration-hold.js +24 -0
- package/dist/declaration-hold.js.map +1 -0
- package/dist/declaration-journal.d.ts +62 -0
- package/dist/declaration-journal.js +99 -0
- package/dist/declaration-journal.js.map +1 -0
- package/dist/declaration-save.d.ts +31 -0
- package/dist/declaration-save.js +134 -0
- package/dist/declaration-save.js.map +1 -0
- package/dist/detection/accepted-result.d.ts +19 -1
- package/dist/detection/accepted-result.js +36 -5
- package/dist/detection/accepted-result.js.map +1 -1
- package/dist/detection/admission-save.d.ts +55 -0
- package/dist/detection/admission-save.js +48 -0
- package/dist/detection/admission-save.js.map +1 -0
- package/dist/detection/admission-units.d.ts +66 -0
- package/dist/detection/admission-units.js +322 -0
- package/dist/detection/admission-units.js.map +1 -0
- package/dist/detection/alias-discovery.d.ts +12 -0
- package/dist/detection/alias-discovery.js +80 -0
- package/dist/detection/alias-discovery.js.map +1 -0
- package/dist/detection/alias-examination.d.ts +30 -0
- package/dist/detection/alias-examination.js +49 -0
- package/dist/detection/alias-examination.js.map +1 -0
- package/dist/detection/apply-ownership.d.ts +81 -0
- package/dist/detection/apply-ownership.js +232 -0
- package/dist/detection/apply-ownership.js.map +1 -0
- package/dist/detection/basis-advanced.d.ts +11 -0
- package/dist/detection/basis-advanced.js +26 -0
- package/dist/detection/basis-advanced.js.map +1 -0
- package/dist/detection/capture-outcome.d.ts +16 -0
- package/dist/detection/capture-outcome.js +92 -0
- package/dist/detection/capture-outcome.js.map +1 -0
- package/dist/detection/container-membership.d.ts +32 -0
- package/dist/detection/container-membership.js +49 -0
- package/dist/detection/container-membership.js.map +1 -0
- package/dist/detection/detect-cancelled.d.ts +6 -0
- package/dist/detection/detect-cancelled.js +10 -0
- package/dist/detection/detect-cancelled.js.map +1 -0
- package/dist/detection/directory-proof.d.ts +47 -0
- package/dist/detection/directory-proof.js +77 -0
- package/dist/detection/directory-proof.js.map +1 -0
- package/dist/detection/disposition-rows.d.ts +18 -0
- package/dist/detection/disposition-rows.js +29 -0
- package/dist/detection/disposition-rows.js.map +1 -0
- package/dist/detection/dispositions.d.ts +130 -0
- package/dist/detection/dispositions.js +248 -0
- package/dist/detection/dispositions.js.map +1 -0
- package/dist/detection/git-notice.d.ts +88 -0
- package/dist/detection/git-notice.js +444 -0
- package/dist/detection/git-notice.js.map +1 -0
- package/dist/detection/ground-proof.d.ts +130 -0
- package/dist/detection/ground-proof.js +274 -0
- package/dist/detection/ground-proof.js.map +1 -0
- package/dist/detection/ground-reader.d.ts +29 -0
- package/dist/detection/ground-reader.js +102 -0
- package/dist/detection/ground-reader.js.map +1 -0
- package/dist/detection/held-territory.d.ts +51 -0
- package/dist/detection/held-territory.js +205 -0
- package/dist/detection/held-territory.js.map +1 -0
- package/dist/detection/identity-discovery.d.ts +45 -0
- package/dist/detection/identity-discovery.js +287 -0
- package/dist/detection/identity-discovery.js.map +1 -0
- package/dist/detection/maintenance-sweep.d.ts +108 -0
- package/dist/detection/maintenance-sweep.js +325 -0
- package/dist/detection/maintenance-sweep.js.map +1 -0
- package/dist/detection/name-reach.d.ts +12 -0
- package/dist/detection/name-reach.js +28 -0
- package/dist/detection/name-reach.js.map +1 -0
- package/dist/detection/notebook-basis.d.ts +5 -7
- package/dist/detection/notebook-basis.js +6 -7
- package/dist/detection/notebook-basis.js.map +1 -1
- package/dist/detection/owed-selection.d.ts +51 -0
- package/dist/detection/owed-selection.js +169 -0
- package/dist/detection/owed-selection.js.map +1 -0
- package/dist/detection/portable.d.ts +34 -34
- package/dist/detection/portable.js +67 -93
- package/dist/detection/portable.js.map +1 -1
- package/dist/detection/reconciliation-coverage.d.ts +7 -0
- package/dist/detection/reconciliation-coverage.js +16 -0
- package/dist/detection/reconciliation-coverage.js.map +1 -0
- package/dist/detection/repository-publication.d.ts +20 -0
- package/dist/detection/repository-publication.js +79 -0
- package/dist/detection/repository-publication.js.map +1 -0
- package/dist/detection/repository-routes.d.ts +43 -0
- package/dist/detection/repository-routes.js +97 -0
- package/dist/detection/repository-routes.js.map +1 -0
- package/dist/detection/root-examination.d.ts +94 -0
- package/dist/detection/root-examination.js +523 -0
- package/dist/detection/root-examination.js.map +1 -0
- package/dist/detection/runtime.d.ts +131 -64
- package/dist/detection/runtime.js +808 -1103
- package/dist/detection/runtime.js.map +1 -1
- package/dist/detection/scoped-identity-port.d.ts +34 -0
- package/dist/detection/scoped-identity-port.js +81 -0
- package/dist/detection/scoped-identity-port.js.map +1 -0
- package/dist/detection/seal-law.d.ts +66 -0
- package/dist/detection/seal-law.js +116 -0
- package/dist/detection/seal-law.js.map +1 -0
- package/dist/detection/sharing-policy.d.ts +11 -0
- package/dist/detection/sharing-policy.js +32 -0
- package/dist/detection/sharing-policy.js.map +1 -0
- package/dist/detection/thread-database.d.ts +4 -0
- package/dist/detection/thread-database.js +30 -0
- package/dist/detection/thread-database.js.map +1 -0
- package/dist/detection/unreadable.d.ts +11 -0
- package/dist/detection/unreadable.js +9 -0
- package/dist/detection/unreadable.js.map +1 -0
- package/dist/detection/verified-content.d.ts +6 -0
- package/dist/detection/verified-content.js +12 -0
- package/dist/detection/verified-content.js.map +1 -0
- package/dist/detection/walk-law.d.ts +34 -0
- package/dist/detection/walk-law.js +55 -0
- package/dist/detection/walk-law.js.map +1 -0
- package/dist/development/fly-guest.js +2 -1
- package/dist/development/fly-guest.js.map +1 -1
- package/dist/entity-apply-host.d.ts +29 -13
- package/dist/entity-apply-host.js +1426 -461
- package/dist/entity-apply-host.js.map +1 -1
- package/dist/entity-apply-store.d.ts +77 -30
- package/dist/entity-apply-store.js +221 -516
- package/dist/entity-apply-store.js.map +1 -1
- package/dist/entity-record-observability.js +2 -0
- package/dist/entity-record-observability.js.map +1 -1
- package/dist/entity-record-saves.d.ts +20 -0
- package/dist/entity-record-saves.js +91 -0
- package/dist/entity-record-saves.js.map +1 -0
- package/dist/entity-record-store.d.ts +15 -7
- package/dist/entity-record-store.js +57 -117
- package/dist/entity-record-store.js.map +1 -1
- package/dist/files-register-host.d.ts +22 -3
- package/dist/files-register-host.js +70 -31
- package/dist/files-register-host.js.map +1 -1
- package/dist/filesystem.js +3 -2
- package/dist/filesystem.js.map +1 -1
- package/dist/git-binding.d.ts +65 -0
- package/dist/git-binding.js +220 -0
- package/dist/git-binding.js.map +1 -0
- package/dist/git-capture.d.ts +39 -0
- package/dist/git-capture.js +86 -0
- package/dist/git-capture.js.map +1 -0
- package/dist/git-card.d.ts +12 -0
- package/dist/git-card.js +123 -0
- package/dist/git-card.js.map +1 -0
- package/dist/git-checkpoint-construction.d.ts +41 -0
- package/dist/git-checkpoint-construction.js +96 -0
- package/dist/git-checkpoint-construction.js.map +1 -0
- package/dist/git-checkpoint-preparation.d.ts +37 -0
- package/dist/git-checkpoint-preparation.js +145 -0
- package/dist/git-checkpoint-preparation.js.map +1 -0
- package/dist/git-command.d.ts +61 -8
- package/dist/git-command.js +217 -63
- package/dist/git-command.js.map +1 -1
- package/dist/git-configuration.d.ts +40 -0
- package/dist/git-configuration.js +217 -0
- package/dist/git-configuration.js.map +1 -0
- package/dist/git-evidence.d.ts +61 -0
- package/dist/git-evidence.js +181 -0
- package/dist/git-evidence.js.map +1 -0
- package/dist/git-index-entries.d.ts +15 -0
- package/dist/git-index-entries.js +44 -0
- package/dist/git-index-entries.js.map +1 -0
- package/dist/git-index-format.d.ts +35 -0
- package/dist/git-index-format.js +293 -0
- package/dist/git-index-format.js.map +1 -0
- package/dist/git-index-witness.d.ts +33 -0
- package/dist/git-index-witness.js +69 -0
- package/dist/git-index-witness.js.map +1 -0
- package/dist/git-literal-host.d.ts +82 -0
- package/dist/git-literal-host.js +172 -0
- package/dist/git-literal-host.js.map +1 -0
- package/dist/git-literal-read.d.ts +88 -0
- package/dist/git-literal-read.js +170 -0
- package/dist/git-literal-read.js.map +1 -0
- package/dist/git-literal-replay.d.ts +33 -0
- package/dist/git-literal-replay.js +268 -0
- package/dist/git-literal-replay.js.map +1 -0
- package/dist/git-native-file.d.ts +42 -0
- package/dist/git-native-file.js +145 -0
- package/dist/git-native-file.js.map +1 -0
- package/dist/git-native-index.d.ts +21 -0
- package/dist/git-native-index.js +44 -0
- package/dist/git-native-index.js.map +1 -0
- package/dist/git-operation-host.d.ts +48 -0
- package/dist/git-operation-host.js +127 -0
- package/dist/git-operation-host.js.map +1 -0
- package/dist/git-private-index.d.ts +11 -0
- package/dist/git-private-index.js +42 -0
- package/dist/git-private-index.js.map +1 -0
- package/dist/git-private-repository.d.ts +4 -0
- package/dist/git-private-repository.js +69 -0
- package/dist/git-private-repository.js.map +1 -0
- package/dist/git-private-view.d.ts +39 -0
- package/dist/git-private-view.js +162 -0
- package/dist/git-private-view.js.map +1 -0
- package/dist/git-ref-store.d.ts +12 -0
- package/dist/git-ref-store.js +68 -0
- package/dist/git-ref-store.js.map +1 -0
- package/dist/git-registration-host.d.ts +20 -30
- package/dist/git-registration-host.js +86 -249
- package/dist/git-registration-host.js.map +1 -1
- package/dist/git-repository-host.d.ts +148 -22
- package/dist/git-repository-host.js +633 -650
- package/dist/git-repository-host.js.map +1 -1
- package/dist/git-worktree-host.d.ts +2 -0
- package/dist/git-worktree-host.js +16 -0
- package/dist/git-worktree-host.js.map +1 -0
- package/dist/graph-publication.d.ts +75 -0
- package/dist/graph-publication.js +203 -0
- package/dist/graph-publication.js.map +1 -0
- package/dist/ground-basis.d.ts +242 -0
- package/dist/ground-basis.js +1023 -0
- package/dist/ground-basis.js.map +1 -0
- package/dist/ground-checkpoint-worker.d.ts +1 -0
- package/dist/ground-checkpoint-worker.js +84 -0
- package/dist/ground-checkpoint-worker.js.map +1 -0
- package/dist/ground-checkpoints.d.ts +16 -0
- package/dist/ground-checkpoints.js +45 -0
- package/dist/ground-checkpoints.js.map +1 -0
- package/dist/ground-coordination.d.ts +107 -3
- package/dist/ground-coordination.js +249 -24
- package/dist/ground-coordination.js.map +1 -1
- package/dist/ground-database.d.ts +42 -0
- package/dist/ground-database.js +290 -0
- package/dist/ground-database.js.map +1 -0
- package/dist/ground-differences.d.ts +23 -0
- package/dist/ground-differences.js +47 -0
- package/dist/ground-differences.js.map +1 -0
- package/dist/ground-holders.d.ts +4 -0
- package/dist/ground-holders.js +15 -0
- package/dist/ground-holders.js.map +1 -0
- package/dist/ground-initialization-worker.d.ts +1 -0
- package/dist/ground-initialization-worker.js +20 -0
- package/dist/ground-initialization-worker.js.map +1 -0
- package/dist/ground-initialization.d.ts +35 -0
- package/dist/ground-initialization.js +102 -0
- package/dist/ground-initialization.js.map +1 -0
- package/dist/ground-install-saves.d.ts +63 -0
- package/dist/ground-install-saves.js +139 -0
- package/dist/ground-install-saves.js.map +1 -0
- package/dist/ground-inventory-schema.d.ts +18 -0
- package/dist/ground-inventory-schema.js +168 -0
- package/dist/ground-inventory-schema.js.map +1 -0
- package/dist/ground-profile.d.ts +7 -0
- package/dist/ground-profile.js +52 -0
- package/dist/ground-profile.js.map +1 -0
- package/dist/ground-root-index.d.ts +2 -1
- package/dist/ground-root-index.js +16 -14
- package/dist/ground-root-index.js.map +1 -1
- package/dist/ground-row.d.ts +62 -0
- package/dist/ground-row.js +70 -0
- package/dist/ground-row.js.map +1 -0
- package/dist/ground-save-ops.d.ts +44 -0
- package/dist/ground-save-ops.js +41 -0
- package/dist/ground-save-ops.js.map +1 -0
- package/dist/ground-saver-worker.d.ts +1 -0
- package/dist/ground-saver-worker.js +156 -0
- package/dist/ground-saver-worker.js.map +1 -0
- package/dist/ground-saver.d.ts +75 -0
- package/dist/ground-saver.js +216 -0
- package/dist/ground-saver.js.map +1 -0
- package/dist/ground-store.d.ts +84 -0
- package/dist/ground-store.js +473 -0
- package/dist/ground-store.js.map +1 -0
- package/dist/ground-territory.d.ts +130 -0
- package/dist/ground-territory.js +511 -0
- package/dist/ground-territory.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/installation/ownership.d.ts +0 -2
- package/dist/installation/ownership.js +3 -15
- package/dist/installation/ownership.js.map +1 -1
- package/dist/machine-host.d.ts +3 -2
- package/dist/machine-host.js +28 -16
- package/dist/machine-host.js.map +1 -1
- package/dist/materialized-graph.d.ts +7 -7
- package/dist/materialized-graph.js +11 -23
- package/dist/materialized-graph.js.map +1 -1
- package/dist/module-thread.d.ts +9 -0
- package/dist/module-thread.js +10 -0
- package/dist/module-thread.js.map +1 -0
- package/dist/native/fsevents-stream.node +0 -0
- package/dist/physical-path-witness.d.ts +64 -0
- package/dist/physical-path-witness.js +168 -0
- package/dist/physical-path-witness.js.map +1 -0
- package/dist/register-upload-fusion.d.ts +5 -4
- package/dist/register-upload-fusion.js +9 -6
- package/dist/register-upload-fusion.js.map +1 -1
- package/dist/registry-graph.d.ts +3 -2
- package/dist/registry-graph.js +9 -6
- package/dist/registry-graph.js.map +1 -1
- package/dist/registry-page-cache.d.ts +5 -2
- package/dist/registry-page-cache.js.map +1 -1
- package/dist/repository-identity-steps.d.ts +5 -0
- package/dist/repository-identity-steps.js +33 -0
- package/dist/repository-identity-steps.js.map +1 -0
- package/dist/runtime-node-flags.d.ts +10 -0
- package/dist/runtime-node-flags.js +11 -0
- package/dist/runtime-node-flags.js.map +1 -0
- package/dist/service/adapter.d.ts +1 -1
- package/dist/service/adapter.js +1 -1
- package/dist/service/adapter.js.map +1 -1
- package/dist/service/cli.js +16 -20
- package/dist/service/cli.js.map +1 -1
- package/dist/service/control.d.ts +2 -2
- package/dist/service/keepalive.d.ts +4 -11
- package/dist/service/keepalive.js +65 -118
- package/dist/service/keepalive.js.map +1 -1
- package/dist/service/policy.d.ts +36 -0
- package/dist/service/policy.js +25 -0
- package/dist/service/policy.js.map +1 -0
- package/dist/service/portable.d.ts +1 -1
- package/dist/service/portable.js +1 -1
- package/dist/service/portable.js.map +1 -1
- package/dist/service/recovery.d.ts +10 -9
- package/dist/service/recovery.js +29 -19
- package/dist/service/recovery.js.map +1 -1
- package/dist/service/windows-action.d.ts +5 -3
- package/dist/service/windows-action.js +6 -9
- package/dist/service/windows-action.js.map +1 -1
- package/dist/service/windows-task.js +5 -5
- package/dist/service/windows-task.js.map +1 -1
- package/dist/sharing-admission.d.ts +17 -0
- package/dist/sharing-admission.js +128 -0
- package/dist/sharing-admission.js.map +1 -0
- package/dist/snapshot-delivery-baseline.d.ts +12 -3
- package/dist/snapshot-delivery-baseline.js +41 -42
- package/dist/snapshot-delivery-baseline.js.map +1 -1
- package/dist/source-proof.d.ts +36 -0
- package/dist/source-proof.js +70 -0
- package/dist/source-proof.js.map +1 -0
- package/dist/source-signature.d.ts +56 -0
- package/dist/source-signature.js +56 -0
- package/dist/source-signature.js.map +1 -0
- package/dist/source-witness.d.ts +15 -0
- package/dist/source-witness.js +29 -0
- package/dist/source-witness.js.map +1 -0
- package/dist/sqlite-durability.d.ts +31 -0
- package/dist/sqlite-durability.js +28 -0
- package/dist/sqlite-durability.js.map +1 -0
- package/dist/sqlite.d.ts +8 -2
- package/dist/sqlite.js +27 -4
- package/dist/sqlite.js.map +1 -1
- package/dist/sync-address.d.ts +19 -0
- package/dist/sync-address.js +52 -0
- package/dist/sync-address.js.map +1 -0
- package/dist/sync-setting.d.ts +15 -0
- package/dist/sync-setting.js +13 -0
- package/dist/sync-setting.js.map +1 -1
- package/dist/turns.d.ts +42 -0
- package/dist/turns.js +112 -0
- package/dist/turns.js.map +1 -0
- package/dist/updates/bootstrap.d.ts +53 -7
- package/dist/updates/bootstrap.js +224 -137
- package/dist/updates/bootstrap.js.map +1 -1
- package/dist/updates/controller.d.ts +8 -0
- package/dist/updates/controller.js +27 -3
- package/dist/updates/controller.js.map +1 -1
- package/dist/updates/store.d.ts +3 -0
- package/dist/updates/store.js +12 -0
- package/dist/updates/store.js.map +1 -1
- package/dist/user-ground-host.d.ts +364 -69
- package/dist/user-ground-host.js +5231 -3366
- package/dist/user-ground-host.js.map +1 -1
- package/dist/watching/fsevents.d.ts +52 -1
- package/dist/watching/fsevents.js +60 -25
- package/dist/watching/fsevents.js.map +1 -1
- package/dist/watching/host.d.ts +129 -5
- package/dist/watching/host.js +433 -80
- package/dist/watching/host.js.map +1 -1
- package/dist/watching/index.d.ts +1 -1
- package/dist/wire-binary.d.ts +3 -2
- package/dist/wire-binary.js +10 -8
- package/dist/wire-binary.js.map +1 -1
- package/dist/wire-client.d.ts +3 -4
- package/dist/wire-client.js +18 -44
- package/dist/wire-client.js.map +1 -1
- package/dist/wire-outbox.d.ts +34 -0
- package/dist/wire-outbox.js +127 -0
- package/dist/wire-outbox.js.map +1 -0
- package/dist/workspace-host.d.ts +4 -0
- package/dist/workspace-host.js +12 -1
- package/dist/workspace-host.js.map +1 -1
- package/examinations/fixtures/private-wire-authority.js +133 -10
- package/npm-shrinkwrap.json +43 -56
- package/package.json +26 -13
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/** Retain the physical basis of a complete walk across scheduling boundaries. */
|
|
2
|
+
import { sep } from "node:path";
|
|
3
|
+
import { eachStep } from "@amalgm/live";
|
|
4
|
+
import { listingQualification, listingWaitMs } from "../content-clock.js";
|
|
5
|
+
import { pathsWitnessSteps } from "../physical-path-witness.js";
|
|
6
|
+
import { sourceProofs, witnessProof } from "../source-proof.js";
|
|
7
|
+
import { physicalKey, signedStat, sourceUnchanged } from "../source-signature.js";
|
|
8
|
+
import { awaitTurn, finishStepsInTurns, turnBoundary } from "../turns.js";
|
|
9
|
+
const KIND = 0o170000;
|
|
10
|
+
const sameObject = (a, b) => a.physicalKey === physicalKey(b) && ((a.filesystemMode ?? 0) & KIND) === (Number(b.mode) & KIND);
|
|
11
|
+
const sameMarker = (a, b) => a === null || b === null
|
|
12
|
+
? a === b
|
|
13
|
+
: a.physicalKey === b.physicalKey && a.kind === b.kind;
|
|
14
|
+
const isDirectory = (source) => source.relativePath === "" || ((source.filesystemMode ?? 0) & KIND) === 0o040000;
|
|
15
|
+
/** Separators in an address: a parent is always shallower than its child. */
|
|
16
|
+
const depthOf = (relativePath) => {
|
|
17
|
+
let depth = 0;
|
|
18
|
+
for (let at = relativePath.indexOf("/"); at >= 0; at = relativePath.indexOf("/", at + 1))
|
|
19
|
+
depth += 1;
|
|
20
|
+
return depth;
|
|
21
|
+
};
|
|
22
|
+
const sameNames = (a, b) => a.length === b.length && a.every((name, index) => name === b[index]);
|
|
23
|
+
/** Stat calls between yields while closing. */
|
|
24
|
+
const CLOSE_YIELD_SOURCES = 256;
|
|
25
|
+
/** A closed walk, answered by absolute address so one pass can consult the
|
|
26
|
+
* closure that observed each member. Each answer is about one retained
|
|
27
|
+
* address; a reread that differs is input for a later attempt, never a new
|
|
28
|
+
* expected value. */
|
|
29
|
+
export class GroundClosure {
|
|
30
|
+
/** Absolute address to whether the walk read it as a directory. */
|
|
31
|
+
#observed;
|
|
32
|
+
#changes;
|
|
33
|
+
constructor(observed, changes) {
|
|
34
|
+
this.#observed = observed;
|
|
35
|
+
this.#changes = changes;
|
|
36
|
+
}
|
|
37
|
+
observes(path) { return this.#observed.has(path); }
|
|
38
|
+
#change(path) {
|
|
39
|
+
if (!this.#observed.has(path))
|
|
40
|
+
throw new Error(`ground closure never observed ${path}`);
|
|
41
|
+
return this.#changes.get(path);
|
|
42
|
+
}
|
|
43
|
+
/** Bytes, entry list and marker closed exactly as walked. */
|
|
44
|
+
settled(path) { return this.#change(path) === undefined; }
|
|
45
|
+
/** A directory an address resolves through: the same object and marker.
|
|
46
|
+
* Its own entry list may have changed; a sibling's churn crosses no route. */
|
|
47
|
+
routes(path) {
|
|
48
|
+
const change = this.#change(path);
|
|
49
|
+
return change === undefined || (!change.object && !change.marker);
|
|
50
|
+
}
|
|
51
|
+
/** Nothing at or beneath the directory changed. */
|
|
52
|
+
settledUnder(directory) {
|
|
53
|
+
const prefix = directory.endsWith(sep) ? directory : directory + sep;
|
|
54
|
+
for (const path of this.#changes.keys())
|
|
55
|
+
if (path === directory || path.startsWith(prefix))
|
|
56
|
+
return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
/** The first walked directory whose entry list did not close, with what
|
|
60
|
+
* moved, or null when every one closed: an identity the walk did not find
|
|
61
|
+
* was then absent from all of them, not moved between reads. A racy listing
|
|
62
|
+
* has not closed. */
|
|
63
|
+
get unsettledDirectory() {
|
|
64
|
+
for (const [path, change] of this.#changes) {
|
|
65
|
+
if (!this.#observed.get(path))
|
|
66
|
+
continue;
|
|
67
|
+
const kinds = Object.keys(change).filter(kind => change[kind]);
|
|
68
|
+
return `${path} (${kinds.join(", ")})`;
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
/** Absolute addresses whose walk read did not close. */
|
|
73
|
+
get changed() { return [...this.#changes.keys()]; }
|
|
74
|
+
}
|
|
75
|
+
/** This is evidence, never an identity resolver. Any changed source restarts
|
|
76
|
+
* reconciliation; fresh bytes must not inherit an old directory's UUID map.
|
|
77
|
+
* Parents open before children and close afterward. This rejects persistent
|
|
78
|
+
* replacement during the read; it does not make path resolution atomic.
|
|
79
|
+
*
|
|
80
|
+
* It closes in one of two forms. `close` answers per address, for a caller
|
|
81
|
+
* that waits only where ground moved. `witness` is the whole walk as plain
|
|
82
|
+
* data, for a journey that concludes every membership at once; any thread
|
|
83
|
+
* judges it, so a cold walk never closes on the admitting thread.
|
|
84
|
+
*
|
|
85
|
+
* A listing its walk's content clock qualified closes as its directory's
|
|
86
|
+
* signature does (see content-clock.ts). Any other closes only by a fresh
|
|
87
|
+
* listing, taken after the whole walk, that names exactly what the walk
|
|
88
|
+
* listed while the directory stands as walked on both sides. A racy listing
|
|
89
|
+
* must also qualify under a later stamp, which proves no same-tick change is
|
|
90
|
+
* hidden. A listing no stamp can qualify, on a filesystem ground-profile.ts
|
|
91
|
+
* does not trust or on another device than the clock, closes by agreement
|
|
92
|
+
* alone: an entry moved once between a directory not yet listed and one
|
|
93
|
+
* already listed changes one of those listings between its two reads. Only
|
|
94
|
+
* an entry moved and moved back across both reads, each move inside its
|
|
95
|
+
* directories' clock ticks, escapes that; any move is a later Watch
|
|
96
|
+
* generation. Such ground loses shortcuts, never conclusions. A walk that
|
|
97
|
+
* concludes nothing from its listings keeps none. */
|
|
98
|
+
export class GroundSourceProof {
|
|
99
|
+
#sources;
|
|
100
|
+
#byPath;
|
|
101
|
+
#reader;
|
|
102
|
+
#names;
|
|
103
|
+
#racy;
|
|
104
|
+
#racyWaitMs;
|
|
105
|
+
#unqualified;
|
|
106
|
+
#witness;
|
|
107
|
+
/** The proof of a walk's sources, built as steps. */
|
|
108
|
+
static *ofWalk(sources, reader, listings) {
|
|
109
|
+
const retained = [];
|
|
110
|
+
yield* eachStep(sources, source => retained.push({ depth: depthOf(source.relativePath), source: {
|
|
111
|
+
relativePath: source.relativePath, absolutePath: source.absolutePath,
|
|
112
|
+
physicalKey: source.physicalKey, sourceSignature: source.sourceSignature,
|
|
113
|
+
filesystemMode: source.filesystemMode,
|
|
114
|
+
...(source.gitMarker !== undefined ? { gitMarker: source.gitMarker } : {}),
|
|
115
|
+
} }));
|
|
116
|
+
retained.sort((a, b) => a.depth - b.depth || a.source.relativePath.localeCompare(b.source.relativePath));
|
|
117
|
+
yield;
|
|
118
|
+
const ordered = [];
|
|
119
|
+
const byPath = new Map();
|
|
120
|
+
yield* eachStep(retained, ({ source }) => { ordered.push(source); byPath.set(source.relativePath, source); });
|
|
121
|
+
if (!byPath.has('') || byPath.size !== ordered.length) {
|
|
122
|
+
throw new Error('ground proof requires one root and unique observed addresses');
|
|
123
|
+
}
|
|
124
|
+
yield* eachStep(ordered, source => {
|
|
125
|
+
if (source.relativePath === '')
|
|
126
|
+
return;
|
|
127
|
+
const parent = source.relativePath.slice(0, Math.max(0, source.relativePath.lastIndexOf('/')));
|
|
128
|
+
if (!byPath.has(parent))
|
|
129
|
+
throw new Error('ground proof is missing observed ancestry');
|
|
130
|
+
});
|
|
131
|
+
const racy = [];
|
|
132
|
+
let racyWaitMs = 0;
|
|
133
|
+
const unqualified = [];
|
|
134
|
+
const names = listings?.names ?? new Map();
|
|
135
|
+
if (listings)
|
|
136
|
+
yield* eachStep(ordered, source => {
|
|
137
|
+
if (!isDirectory(source) || source.sourceSignature === null || names.get(source.absolutePath) === null)
|
|
138
|
+
return;
|
|
139
|
+
const [dev, , , , mtimeNs, ctimeNs] = source.sourceSignature.split(":").map(BigInt);
|
|
140
|
+
const qualification = listingQualification(listings.clock, { dev: dev, mtimeNs: mtimeNs, ctimeNs: ctimeNs });
|
|
141
|
+
if (qualification === "racy") {
|
|
142
|
+
racy.push(source);
|
|
143
|
+
racyWaitMs = Math.max(racyWaitMs, listingWaitMs(listings.clock, { mtimeNs: mtimeNs, ctimeNs: ctimeNs }));
|
|
144
|
+
}
|
|
145
|
+
else if (qualification === "unqualified")
|
|
146
|
+
unqualified.push(source);
|
|
147
|
+
});
|
|
148
|
+
return new GroundSourceProof(ordered, byPath, reader, names, racy, racyWaitMs, unqualified);
|
|
149
|
+
}
|
|
150
|
+
constructor(sources, byPath, reader, names, racy, racyWaitMs, unqualified) {
|
|
151
|
+
this.#sources = sources;
|
|
152
|
+
this.#byPath = byPath;
|
|
153
|
+
this.#reader = reader;
|
|
154
|
+
this.#names = names;
|
|
155
|
+
this.#racy = racy;
|
|
156
|
+
this.#racyWaitMs = racyWaitMs;
|
|
157
|
+
this.#unqualified = unqualified;
|
|
158
|
+
}
|
|
159
|
+
/** Directories listed inside their racy interval, by absolute address. */
|
|
160
|
+
get racy() { return this.#racy.map(source => source.absolutePath); }
|
|
161
|
+
/** Directories listed where no stamp can qualify them, by absolute address. */
|
|
162
|
+
get unqualified() { return this.#unqualified.map(source => source.absolutePath); }
|
|
163
|
+
/** How long after this walk's stamp a later stamp can qualify every racy
|
|
164
|
+
* directory, if none changes; 0 when none is racy. */
|
|
165
|
+
get racyWaitMs() { return this.#racyWaitMs; }
|
|
166
|
+
/** Whether a fresh listing names exactly what the walk listed while the
|
|
167
|
+
* directory stands as walked on both sides of it, and, where a clock is
|
|
168
|
+
* given, qualifies under it. */
|
|
169
|
+
#listsAgain(source, clock) {
|
|
170
|
+
const names = this.#names.get(source.absolutePath), current = this.#reader.stat(source);
|
|
171
|
+
if (!names || current === null || !sourceUnchanged(source.sourceSignature, current)
|
|
172
|
+
|| (clock !== undefined && listingQualification(clock, current) !== "qualified"))
|
|
173
|
+
return false;
|
|
174
|
+
const now = this.#reader.list(source.absolutePath), after = this.#reader.stat(source);
|
|
175
|
+
return now !== null && after !== null && sourceUnchanged(source.sourceSignature, after) && sameNames(now, names);
|
|
176
|
+
}
|
|
177
|
+
/** Closes every listing its walk's clock did not qualify by listing it
|
|
178
|
+
* again, a racy one under clock, a later stamp, as Git settles a racily
|
|
179
|
+
* clean entry. Returns the first directory that stays open; each closed
|
|
180
|
+
* one is neither racy nor unqualified any more. */
|
|
181
|
+
async closeListings(clock, checkpoint) {
|
|
182
|
+
const open = async (sources, qualifying) => {
|
|
183
|
+
const remaining = [];
|
|
184
|
+
for (const source of sources) {
|
|
185
|
+
await turnBoundary();
|
|
186
|
+
checkpoint?.();
|
|
187
|
+
if (!this.#listsAgain(source, qualifying))
|
|
188
|
+
remaining.push(source);
|
|
189
|
+
}
|
|
190
|
+
return remaining;
|
|
191
|
+
};
|
|
192
|
+
this.#racy = await open(this.#racy, clock);
|
|
193
|
+
if (!this.#racy.length)
|
|
194
|
+
this.#racyWaitMs = 0;
|
|
195
|
+
this.#unqualified = await open(this.#unqualified);
|
|
196
|
+
return this.#racy[0]?.absolutePath ?? this.#unqualified[0]?.absolutePath ?? null;
|
|
197
|
+
}
|
|
198
|
+
/** Every retained source as one witness, parents first, built as steps
|
|
199
|
+
* once. Judging it reads each source forward, then each directory again in
|
|
200
|
+
* reverse, as `close` does. */
|
|
201
|
+
*witness() {
|
|
202
|
+
if (this.#witness)
|
|
203
|
+
return this.#witness;
|
|
204
|
+
const components = [];
|
|
205
|
+
yield* eachStep(this.#sources, source => {
|
|
206
|
+
if (source.sourceSignature === null)
|
|
207
|
+
throw new Error(`ground witness lacks a signed read: ${source.absolutePath}`);
|
|
208
|
+
components.push([source.absolutePath, signedStat(source.sourceSignature)]);
|
|
209
|
+
});
|
|
210
|
+
return (this.#witness = yield* pathsWitnessSteps(components));
|
|
211
|
+
}
|
|
212
|
+
/** Closes every retained source outside any transaction, yielding as it
|
|
213
|
+
* goes: parents forward before children, directories again in reverse,
|
|
214
|
+
* each directory's marker with it. Changes are answers, not failures; an
|
|
215
|
+
* unreadable address is a fault. */
|
|
216
|
+
async close(checkpoint) {
|
|
217
|
+
const changes = new Map();
|
|
218
|
+
const mark = (path, kind) => {
|
|
219
|
+
const change = changes.get(path) ?? { object: false, content: false, marker: false, listing: false };
|
|
220
|
+
change[kind] = true;
|
|
221
|
+
changes.set(path, change);
|
|
222
|
+
};
|
|
223
|
+
let reads = 0;
|
|
224
|
+
const read = async (source) => {
|
|
225
|
+
if (++reads % CLOSE_YIELD_SOURCES === 0) {
|
|
226
|
+
await awaitTurn();
|
|
227
|
+
checkpoint?.();
|
|
228
|
+
}
|
|
229
|
+
const current = this.#reader.stat(source);
|
|
230
|
+
if (current === null || !sameObject(source, current))
|
|
231
|
+
mark(source.absolutePath, "object");
|
|
232
|
+
else if (!sourceUnchanged(source.sourceSignature, current))
|
|
233
|
+
mark(source.absolutePath, "content");
|
|
234
|
+
};
|
|
235
|
+
const observed = new Map();
|
|
236
|
+
for (const source of this.#sources) {
|
|
237
|
+
observed.set(source.absolutePath, isDirectory(source));
|
|
238
|
+
await read(source);
|
|
239
|
+
if (source.gitMarker !== undefined
|
|
240
|
+
&& !sameMarker(source.gitMarker, this.#reader.marker(source.absolutePath))) {
|
|
241
|
+
mark(source.absolutePath, "marker");
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
for (let index = this.#sources.length - 1; index >= 0; index -= 1) {
|
|
245
|
+
const source = this.#sources[index];
|
|
246
|
+
if (isDirectory(source))
|
|
247
|
+
await read(source);
|
|
248
|
+
}
|
|
249
|
+
for (const path of this.racy)
|
|
250
|
+
mark(path, "listing");
|
|
251
|
+
// Every walked listing was read before any of these.
|
|
252
|
+
for (const source of this.#unqualified) {
|
|
253
|
+
if (changes.has(source.absolutePath))
|
|
254
|
+
continue;
|
|
255
|
+
await turnBoundary();
|
|
256
|
+
checkpoint?.();
|
|
257
|
+
if (!this.#listsAgain(source))
|
|
258
|
+
mark(source.absolutePath, "listing");
|
|
259
|
+
}
|
|
260
|
+
return new GroundClosure(observed, changes);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
/** Every dependency answers semantically before any root closes physically,
|
|
264
|
+
* so no root's physical close can precede another root's Git work. Each
|
|
265
|
+
* root's walk closes on both sides of its dependencies' witnesses, parents
|
|
266
|
+
* open before children and closed afterward, as two leaves because a proof
|
|
267
|
+
* closes once. Later filesystem changes belong to later Watch generations. */
|
|
268
|
+
export async function groundSourceProof(proofs) {
|
|
269
|
+
const walks = [];
|
|
270
|
+
for (const proof of proofs)
|
|
271
|
+
walks.push(await finishStepsInTurns(proof.physical.witness()));
|
|
272
|
+
return sourceProofs([witnessProof(walks), ...proofs.flatMap(proof => proof.dependencies), witnessProof(walks)]);
|
|
273
|
+
}
|
|
274
|
+
//# sourceMappingURL=ground-proof.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ground-proof.js","sourceRoot":"","sources":["../../src/detection/ground-proof.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAc,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAwB,MAAM,qBAAqB,CAAC;AAEhG,OAAO,EAAE,iBAAiB,EAAqB,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAoB,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAmB,MAAM,wBAAwB,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA+C1E,MAAM,IAAI,GAAG,QAAQ,CAAC;AACtB,MAAM,UAAU,GAAG,CAAC,CAAoB,EAAE,CAAa,EAAW,EAAE,CAClE,CAAC,CAAC,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,IA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AClE,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAE,CAAC;YACrC,IAAI,WAAW,CAAC,MAAM,CAAC;gBAAE,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC;QAC9C,CAAC;QACD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,IAAI;YAAE,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QACpD,qDAAqD;QACrD,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACvC,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC;gBAAE,SAAS;YAC/C,MAAM,YAAY,EAAE,CAAC;YAAC,UAAU,EAAE,EAAE,CAAC;YACrC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;gBAAE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;QACtE,CAAC;QACD,OAAO,IAAI,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF;AAQD;;;;8EAI8E;AAC9E,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAyC;IAC/E,MAAM,KAAK,GAAmB,EAAE,CAAC;IACjC,KAAK,MAAM,KAAK,IAAI,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,MAAM,kBAAkB,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC3F,OAAO,YAAY,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAClH,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** One named observation's indexed, detached database evidence. Memoized
|
|
2
|
+
* answers remain original facts; final admission checks all their revisions. */
|
|
3
|
+
import type Database from "better-sqlite3";
|
|
4
|
+
import type { GroundBasis, GroundRepositoryMember, GroundStructure, GroundNamespaceEntry } from "../ground-basis.js";
|
|
5
|
+
import type { GroundRow } from "../ground-row.js";
|
|
6
|
+
export declare class NamedGroundReader {
|
|
7
|
+
#private;
|
|
8
|
+
constructor(database: Database.Database);
|
|
9
|
+
private answer;
|
|
10
|
+
root(directory: string): GroundRow | undefined;
|
|
11
|
+
sharing(uuid: string): GroundRow | undefined;
|
|
12
|
+
/** A member write can retire its repository's admission. Retain that full
|
|
13
|
+
* original B target as well as the structural chain before any await/write. */
|
|
14
|
+
private coveringOwner;
|
|
15
|
+
physical(uuid: string): GroundRow | undefined;
|
|
16
|
+
repositoryMembers(): readonly GroundRepositoryMember[];
|
|
17
|
+
/** Every row at an address in either inventory, any status. An empty
|
|
18
|
+
* answer stays in the basis: a later owner of the slot retires it. */
|
|
19
|
+
atPath(rootUUID: string, path: string, inventory?: "entities" | "detection_notebook"): readonly GroundRow[];
|
|
20
|
+
/** One root's identities at a filesystem object. */
|
|
21
|
+
candidates(rootUUID: string, physicalKey: string): readonly GroundRow[];
|
|
22
|
+
/** Every name a filesystem object has, in any root. */
|
|
23
|
+
objectRows(physicalKey: string): readonly GroundRow[];
|
|
24
|
+
subtree(uuid: string, inventory?: "entities" | "detection_notebook"): readonly GroundRow[];
|
|
25
|
+
structure(inventory: "entities" | "detection_notebook", uuid: string): GroundStructure | undefined;
|
|
26
|
+
siblings(inventory: "entities" | "detection_notebook", parentUUID: string): readonly GroundNamespaceEntry[];
|
|
27
|
+
slot(inventory: "entities" | "detection_notebook", parentUUID: string, name: string): readonly GroundNamespaceEntry[];
|
|
28
|
+
finish(): GroundBasis;
|
|
29
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { groundStore } from "../ground-store.js";
|
|
2
|
+
export class NamedGroundReader {
|
|
3
|
+
#observation;
|
|
4
|
+
#answers = new Map();
|
|
5
|
+
#ownersRead = new Set();
|
|
6
|
+
constructor(database) { this.#observation = groundStore(database).observe(); }
|
|
7
|
+
answer(key, read) {
|
|
8
|
+
const id = JSON.stringify(key);
|
|
9
|
+
if (this.#answers.has(id))
|
|
10
|
+
return this.#answers.get(id);
|
|
11
|
+
const value = this.#observation.read(read);
|
|
12
|
+
this.#answers.set(id, value);
|
|
13
|
+
return value;
|
|
14
|
+
}
|
|
15
|
+
root(directory) {
|
|
16
|
+
return this.answer(["root", directory], reader => {
|
|
17
|
+
const roots = reader.rootsAtPath("entities", directory);
|
|
18
|
+
if (roots.length > 1)
|
|
19
|
+
throw new Error("named ground has multiple roots at one address");
|
|
20
|
+
if (roots.length === 0)
|
|
21
|
+
return undefined;
|
|
22
|
+
reader.sharing(roots[0].uuid);
|
|
23
|
+
return reader.physical(roots[0].uuid);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
sharing(uuid) {
|
|
27
|
+
const row = this.answer(["sharing", uuid], reader => {
|
|
28
|
+
reader.physical(uuid);
|
|
29
|
+
return reader.sharing(uuid);
|
|
30
|
+
});
|
|
31
|
+
if (row)
|
|
32
|
+
this.coveringOwner(row);
|
|
33
|
+
return row;
|
|
34
|
+
}
|
|
35
|
+
/** A member write can retire its repository's admission. Retain that full
|
|
36
|
+
* original B target as well as the structural chain before any await/write. */
|
|
37
|
+
coveringOwner(row) {
|
|
38
|
+
if (this.#ownersRead.has(row.uuid))
|
|
39
|
+
return;
|
|
40
|
+
const seen = new Set();
|
|
41
|
+
let parent = row.parentUUID;
|
|
42
|
+
while (parent) {
|
|
43
|
+
if (seen.has(parent))
|
|
44
|
+
throw new Error("sharing ancestry contains a cycle");
|
|
45
|
+
seen.add(parent);
|
|
46
|
+
const ancestor = this.structure("detection_notebook", parent);
|
|
47
|
+
if (!ancestor)
|
|
48
|
+
break;
|
|
49
|
+
if (ancestor.type === "repo.git") {
|
|
50
|
+
const owner = parent;
|
|
51
|
+
this.answer(["sharing", owner], reader => reader.sharing(owner));
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
parent = ancestor.parentUUID;
|
|
55
|
+
}
|
|
56
|
+
this.#ownersRead.add(row.uuid);
|
|
57
|
+
}
|
|
58
|
+
physical(uuid) {
|
|
59
|
+
return this.answer(["physical", uuid], reader => reader.physical(uuid));
|
|
60
|
+
}
|
|
61
|
+
repositoryMembers() {
|
|
62
|
+
return this.answer(["repository-members"], reader => reader.repositoryMembers());
|
|
63
|
+
}
|
|
64
|
+
/** Every row at an address in either inventory, any status. An empty
|
|
65
|
+
* answer stays in the basis: a later owner of the slot retires it. */
|
|
66
|
+
atPath(rootUUID, path, inventory = "entities") {
|
|
67
|
+
return this.answer(["path", inventory, rootUUID, path], reader => {
|
|
68
|
+
const rows = reader.atPath(inventory, rootUUID, path);
|
|
69
|
+
if (inventory === "entities")
|
|
70
|
+
for (const row of rows)
|
|
71
|
+
reader.sharing(row.uuid);
|
|
72
|
+
return rows;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/** One root's identities at a filesystem object. */
|
|
76
|
+
candidates(rootUUID, physicalKey) {
|
|
77
|
+
return this.answer(["physical-candidates", rootUUID, physicalKey], reader => reader.physicalCandidates("entities", rootUUID, physicalKey));
|
|
78
|
+
}
|
|
79
|
+
/** Every name a filesystem object has, in any root. */
|
|
80
|
+
objectRows(physicalKey) {
|
|
81
|
+
return this.answer(["object", physicalKey], reader => reader.objectRows("entities", physicalKey));
|
|
82
|
+
}
|
|
83
|
+
subtree(uuid, inventory = "entities") {
|
|
84
|
+
return this.answer(["subtree", inventory, uuid], reader => {
|
|
85
|
+
const rows = reader.subtree(inventory, uuid);
|
|
86
|
+
for (const row of rows)
|
|
87
|
+
reader.sharing(row.uuid);
|
|
88
|
+
return rows;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
structure(inventory, uuid) {
|
|
92
|
+
return this.answer(["structure", inventory, uuid], reader => reader.structure(inventory, uuid));
|
|
93
|
+
}
|
|
94
|
+
siblings(inventory, parentUUID) {
|
|
95
|
+
return this.answer(["siblings", inventory, parentUUID], reader => reader.children(inventory, parentUUID));
|
|
96
|
+
}
|
|
97
|
+
slot(inventory, parentUUID, name) {
|
|
98
|
+
return this.answer(["slot", inventory, parentUUID, name], reader => reader.slot(inventory, parentUUID, name));
|
|
99
|
+
}
|
|
100
|
+
finish() { return this.#observation.finish(); }
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=ground-reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ground-reader.js","sourceRoot":"","sources":["../../src/detection/ground-reader.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAIjD,MAAM,OAAO,iBAAiB;IACnB,YAAY,CAAoB;IAChC,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAC;IACtC,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;IAEzC,YAAY,QAA2B,IAAI,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAEzF,MAAM,CAAI,GAAuB,EAAE,IAAyC;QAClF,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAM,CAAC;QAC7D,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAC7B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,CAAC,SAAiB;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,EAAE;YAC/C,MAAM,KAAK,GAAG,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CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAC5G,CAAC;IAED,IAAI,CAAC,SAA4C,EAAE,UAAkB,EAAE,IAAY;QACjF,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;IAChH,CAAC;IAED,MAAM,KAAkB,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;CAC7D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type GroundIdentityPrior, type Steps } from "@amalgm/live";
|
|
2
|
+
import type { GroundRow } from "../ground-row.js";
|
|
3
|
+
import type { TerritoryHandle } from "../ground-territory.js";
|
|
4
|
+
import { type SourceFingerprint } from "../source-signature.js";
|
|
5
|
+
import type { SealEntry } from "./seal-law.js";
|
|
6
|
+
/** The held form cannot answer exactly; the complete form answers instead. */
|
|
7
|
+
export declare class HoldRefused extends Error {
|
|
8
|
+
readonly reason: string;
|
|
9
|
+
constructor(reason: string);
|
|
10
|
+
}
|
|
11
|
+
/** A prior row found by address, in the frame its inventory stored it. */
|
|
12
|
+
export type PriorRow = Omit<GroundRow, "relativePath">;
|
|
13
|
+
type Inventory = "o" | "b";
|
|
14
|
+
export declare class HeldTerritory {
|
|
15
|
+
#private;
|
|
16
|
+
constructor(o: TerritoryHandle, b: TerritoryHandle, rootAddress: string);
|
|
17
|
+
/** O's members whose payload names a Git index object. */
|
|
18
|
+
get indexed(): number;
|
|
19
|
+
/** O's row at this path of the examined root, as stored. */
|
|
20
|
+
at(path: string): PriorRow | undefined;
|
|
21
|
+
/** Both inventories' examined rows, read and framed, ordered by UUID. An
|
|
22
|
+
* identity examined in one inventory and held in the other would be
|
|
23
|
+
* decided twice; that is refused. */
|
|
24
|
+
examine(suspects: readonly string[]): {
|
|
25
|
+
readonly o: readonly GroundRow[];
|
|
26
|
+
readonly b: readonly GroundRow[];
|
|
27
|
+
};
|
|
28
|
+
/** O as the identity resolver asks about it, in the examined root's frame. */
|
|
29
|
+
get prior(): GroundIdentityPrior;
|
|
30
|
+
/** Held graph rows directly beneath each examined container that has any,
|
|
31
|
+
* by the container's UUID, framed. B's retired history, the rows only B
|
|
32
|
+
* holds, is no graph row. */
|
|
33
|
+
beneath(inventory: Inventory): Steps<ReadonlyMap<string, readonly GroundRow[]>>;
|
|
34
|
+
/** Examined O containers with held rows beneath them, framed. */
|
|
35
|
+
parents(): Steps<readonly GroundRow[]>;
|
|
36
|
+
/** Every held member of the repository by its path in the examined
|
|
37
|
+
* root's frame, as the repository's identity reads it. */
|
|
38
|
+
members(): Steps<ReadonlyMap<string, SealEntry>>;
|
|
39
|
+
/** A held leaf the repository's own read found at this fingerprint. While
|
|
40
|
+
* O still holds it as proven content, it stays held, and so does B's: the
|
|
41
|
+
* views agree, so B holds O's fingerprint and either O's boundary or one
|
|
42
|
+
* proven for O's signature. Else both rows are read and O's, framed,
|
|
43
|
+
* re-enters as observed. */
|
|
44
|
+
promoted(uuid: string, fingerprint: SourceFingerprint): GroundRow | null;
|
|
45
|
+
/** The rows this examination read, as stored: its S0 context. */
|
|
46
|
+
consumed(): {
|
|
47
|
+
readonly entities: readonly GroundRow[];
|
|
48
|
+
readonly detection_notebook: readonly GroundRow[];
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export {};
|