@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
|
@@ -1,2 +1,53 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
2
|
+
import type { NativeWatchEvidence, NativeWatchHandle, OpenNativeWatch } from "./host.js";
|
|
3
|
+
/** One native event: real path, FSEvents flags, event ID, and the file ID of
|
|
4
|
+
* the object the path held, or null when FSEvents recorded none. */
|
|
5
|
+
export type FsEvent = readonly [path: string, flags: number, id: bigint, file: bigint | null];
|
|
6
|
+
/** Amalgm's own FSEvents binding (native/fsevents/stream.c): one stream per
|
|
7
|
+
* start(), each native callback delivered to its handler as one batch, in
|
|
8
|
+
* native order. stop() returns once no callback is in flight. */
|
|
9
|
+
export interface FsEventsBinding {
|
|
10
|
+
start(path: string, since: bigint | undefined, latencySeconds: number, createFlags: number, handler: (events: readonly FsEvent[]) => void): object;
|
|
11
|
+
stop(handle: object): void;
|
|
12
|
+
readonly constants: Readonly<Record<string, number>>;
|
|
13
|
+
readonly createFlags: Readonly<Record<string, number>>;
|
|
14
|
+
}
|
|
15
|
+
/** How long FSEvents may gather events after the first before delivering. No
|
|
16
|
+
* Defer delivers the first event after quiet at once; this only bounds how
|
|
17
|
+
* long a burst is coalesced. macOS itself adds ~10 ms that no flag removes. */
|
|
18
|
+
export declare const FSEVENTS_LATENCY_SECONDS = 0.005;
|
|
19
|
+
/**
|
|
20
|
+
* One FSEvents stream per handle. Node's own `fs.watch` serves every handle in
|
|
21
|
+
* the process from a single stream that libuv recreates, resuming from the
|
|
22
|
+
* present, whenever any handle opens or closes; events inside that gap are
|
|
23
|
+
* lost for every other handle. A stream of its own starts and stops alone.
|
|
24
|
+
*
|
|
25
|
+
* FSEvents is always recursive and reports real paths. A non-recursive handle
|
|
26
|
+
* keeps the entries directly inside its directory; deeper events belong to
|
|
27
|
+
* the content handles covering them, and the directory's own metadata is not
|
|
28
|
+
* an address change. Dropped, wrapped, or root-changed streams cannot name
|
|
29
|
+
* what happened and widen to the complete directory. Hard-link flags only
|
|
30
|
+
* say the named path may share its content with another name; they travel
|
|
31
|
+
* as a hint on that path, with the file ID of the object it held, and Detect
|
|
32
|
+
* decides what the alias requires.
|
|
33
|
+
*/
|
|
34
|
+
export declare class FsEventsWatch extends EventEmitter implements NativeWatchHandle {
|
|
35
|
+
private readonly directory;
|
|
36
|
+
private readonly prefix;
|
|
37
|
+
private readonly recursive;
|
|
38
|
+
private readonly listener;
|
|
39
|
+
private readonly native;
|
|
40
|
+
private readonly handle;
|
|
41
|
+
private readonly widening;
|
|
42
|
+
private readonly coalesced;
|
|
43
|
+
private readonly renaming;
|
|
44
|
+
private readonly aliases;
|
|
45
|
+
private readonly streamId;
|
|
46
|
+
private closed;
|
|
47
|
+
private stopping;
|
|
48
|
+
constructor(directory: string, recursive: boolean, listener: (event: string, filename: string | null, evidence: NativeWatchEvidence) => void, native?: FsEventsBinding);
|
|
49
|
+
on(event: "error" | "close", listener: (...args: any[]) => void): this;
|
|
50
|
+
close(): Promise<void>;
|
|
51
|
+
private deliver;
|
|
52
|
+
}
|
|
2
53
|
export declare const openFsEvents: OpenNativeWatch;
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { EventEmitter } from "node:events";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
2
3
|
import { realpathSync } from "node:fs";
|
|
3
4
|
import { createRequire } from "node:module";
|
|
4
|
-
import { isAbsolute,
|
|
5
|
+
import { isAbsolute, sep } from "node:path";
|
|
6
|
+
/** How long FSEvents may gather events after the first before delivering. No
|
|
7
|
+
* Defer delivers the first event after quiet at once; this only bounds how
|
|
8
|
+
* long a burst is coalesced. macOS itself adds ~10 ms that no flag removes. */
|
|
9
|
+
export const FSEVENTS_LATENCY_SECONDS = 0.005;
|
|
5
10
|
let binding = null;
|
|
6
11
|
function loadBinding() {
|
|
7
12
|
if (binding)
|
|
8
13
|
return binding;
|
|
9
14
|
try {
|
|
10
|
-
binding = createRequire(import.meta.url)("fsevents");
|
|
15
|
+
binding = createRequire(import.meta.url)("../native/fsevents-stream.node");
|
|
11
16
|
}
|
|
12
17
|
catch (error) {
|
|
13
18
|
const reason = error instanceof Error ? error.message : String(error);
|
|
14
|
-
throw new Error(`Watch on macOS needs
|
|
19
|
+
throw new Error(`Watch on macOS needs Amalgm's FSEvents binding: ${reason}`);
|
|
15
20
|
}
|
|
16
21
|
return binding;
|
|
17
22
|
}
|
|
@@ -25,33 +30,49 @@ function loadBinding() {
|
|
|
25
30
|
* keeps the entries directly inside its directory; deeper events belong to
|
|
26
31
|
* the content handles covering them, and the directory's own metadata is not
|
|
27
32
|
* an address change. Dropped, wrapped, or root-changed streams cannot name
|
|
28
|
-
* what happened and widen to the complete directory.
|
|
33
|
+
* what happened and widen to the complete directory. Hard-link flags only
|
|
34
|
+
* say the named path may share its content with another name; they travel
|
|
35
|
+
* as a hint on that path, with the file ID of the object it held, and Detect
|
|
36
|
+
* decides what the alias requires.
|
|
29
37
|
*/
|
|
30
|
-
class FsEventsWatch extends EventEmitter {
|
|
38
|
+
export class FsEventsWatch extends EventEmitter {
|
|
31
39
|
directory;
|
|
40
|
+
prefix;
|
|
32
41
|
recursive;
|
|
33
42
|
listener;
|
|
34
|
-
|
|
43
|
+
native;
|
|
44
|
+
handle;
|
|
35
45
|
widening;
|
|
46
|
+
coalesced;
|
|
36
47
|
renaming;
|
|
48
|
+
aliases;
|
|
49
|
+
streamId = randomUUID();
|
|
37
50
|
closed = false;
|
|
38
51
|
stopping = null;
|
|
39
|
-
constructor(directory, recursive, listener) {
|
|
52
|
+
constructor(directory, recursive, listener, native = loadBinding()) {
|
|
40
53
|
super();
|
|
41
|
-
const {
|
|
42
|
-
const
|
|
43
|
-
const value =
|
|
54
|
+
const { constants, createFlags } = native;
|
|
55
|
+
const named = (table, name) => {
|
|
56
|
+
const value = table[name];
|
|
44
57
|
if (value === undefined)
|
|
45
|
-
throw new Error(`
|
|
58
|
+
throw new Error(`FSEvents binding lacks flag ${name}`);
|
|
46
59
|
return value;
|
|
47
60
|
};
|
|
61
|
+
const flag = (name) => named(constants, name);
|
|
48
62
|
this.directory = realpathSync(directory);
|
|
63
|
+
this.prefix = this.directory.endsWith(sep) ? this.directory : this.directory + sep;
|
|
49
64
|
this.recursive = recursive;
|
|
50
65
|
this.listener = listener;
|
|
51
|
-
this.widening = flag("
|
|
66
|
+
this.widening = flag("UserDropped") | flag("KernelDropped")
|
|
52
67
|
| flag("EventIdsWrapped") | flag("RootChanged") | flag("Mount") | flag("Unmount");
|
|
68
|
+
this.coalesced = flag("MustScanSubDirs");
|
|
53
69
|
this.renaming = flag("ItemCreated") | flag("ItemRemoved") | flag("ItemRenamed");
|
|
54
|
-
this.
|
|
70
|
+
this.aliases = flag("ItemIsHardlink") | flag("ItemIsLastHardlink");
|
|
71
|
+
this.native = native;
|
|
72
|
+
// File events name each path; WatchRoot reports the root's own address
|
|
73
|
+
// changing; NoDefer delivers the first event after quiet at once.
|
|
74
|
+
this.handle = native.start(this.directory, undefined, FSEVENTS_LATENCY_SECONDS, named(createFlags, "FileEvents") | named(createFlags, "WatchRoot") | named(createFlags, "NoDefer"), events => { for (const [path, flags, id, file] of events)
|
|
75
|
+
this.deliver(path, flags, id, file); });
|
|
55
76
|
}
|
|
56
77
|
on(event, listener) {
|
|
57
78
|
return super.on(event, listener);
|
|
@@ -60,32 +81,46 @@ class FsEventsWatch extends EventEmitter {
|
|
|
60
81
|
if (this.stopping)
|
|
61
82
|
return this.stopping;
|
|
62
83
|
this.closed = true;
|
|
63
|
-
this.
|
|
64
|
-
|
|
65
|
-
});
|
|
84
|
+
this.native.stop(this.handle);
|
|
85
|
+
this.stopping = Promise.resolve().then(() => { this.emit("close"); });
|
|
66
86
|
return this.stopping;
|
|
67
87
|
}
|
|
68
|
-
deliver(path, flags) {
|
|
88
|
+
deliver(path, flags, eventId, file) {
|
|
69
89
|
if (this.closed)
|
|
70
90
|
return;
|
|
71
91
|
const event = (flags & this.renaming) !== 0 ? "rename" : "change";
|
|
72
|
-
|
|
73
|
-
this.
|
|
92
|
+
const evidence = Object.freeze({
|
|
93
|
+
backend: "fsevents", streamId: this.streamId, path, flags, eventId: String(eventId),
|
|
94
|
+
scope: (flags & (this.widening | this.coalesced)) !== 0 ? "domain" : "path",
|
|
95
|
+
alias: (flags & this.aliases) !== 0, file: file === null ? null : String(file),
|
|
96
|
+
});
|
|
97
|
+
if ((flags & this.widening) !== 0 || !isAbsolute(path)) {
|
|
98
|
+
// An absent or undecodable native path loses attribution; it is not
|
|
99
|
+
// an ordinary nameless notification within a known root.
|
|
100
|
+
this.listener(event, null, Object.freeze({ ...evidence, scope: "domain" }));
|
|
74
101
|
return;
|
|
75
102
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
103
|
+
// Both are physical canonical paths: containment is one prefix test. A
|
|
104
|
+
// path that is not canonical fails it and widens to the domain.
|
|
105
|
+
const local = path === this.directory ? ""
|
|
106
|
+
: path.startsWith(this.prefix) ? path.slice(this.prefix.length) : null;
|
|
107
|
+
if (local === null) {
|
|
108
|
+
this.listener(event, null, Object.freeze({ ...evidence, scope: "domain" }));
|
|
79
109
|
return;
|
|
80
110
|
}
|
|
81
111
|
if (local === "") {
|
|
82
|
-
if (this.recursive)
|
|
83
|
-
this.listener(event, null);
|
|
112
|
+
if (this.recursive || (flags & this.coalesced) !== 0)
|
|
113
|
+
this.listener(event, null, evidence);
|
|
84
114
|
return;
|
|
85
115
|
}
|
|
86
116
|
if (!this.recursive && local.includes(sep))
|
|
87
117
|
return;
|
|
88
|
-
|
|
118
|
+
// The native stream is recursive even for a logical address handle.
|
|
119
|
+
// Preserve that handle's declared coverage before interpreting an entry;
|
|
120
|
+
// incidental deep activity outside it is not a new watched namespace.
|
|
121
|
+
// MustScanSubDirs describes that reported subtree, unlike stream loss;
|
|
122
|
+
// an entirely disjoint subtree does not erase this handle's coverage.
|
|
123
|
+
this.listener(event, local, evidence);
|
|
89
124
|
}
|
|
90
125
|
}
|
|
91
126
|
export const openFsEvents = (directory, options, listener) => new FsEventsWatch(directory, options.recursive, listener);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fsevents.js","sourceRoot":"","sources":["../../src/watching/fsevents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"fsevents.js","sourceRoot":"","sources":["../../src/watching/fsevents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAmB5C;;+EAE+E;AAC/E,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC;AAE9C,IAAI,OAAO,GAA2B,IAAI,CAAC;AAE3C,SAAS,WAAW;IAClB,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC;IAC5B,IAAI,CAAC;QACH,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,gCAAgC,CAAoB,CAAC;IAChG,CAAC;IAAC,OAAO,KAAK,EAAE,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QACtE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACxC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,YAAY,GAAoB,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,CAC5E,IAAI,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC"}
|
package/dist/watching/host.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SuspicionSnapshot } from "@amalgm/live";
|
|
1
|
+
import { type SuspicionPending, type SuspicionSnapshot } from "@amalgm/live";
|
|
2
2
|
export interface WatchGround {
|
|
3
3
|
readonly rootId: string;
|
|
4
4
|
readonly directory: string;
|
|
@@ -14,10 +14,35 @@ export interface WatchHealth {
|
|
|
14
14
|
readonly addressHandles: number;
|
|
15
15
|
readonly reason?: string;
|
|
16
16
|
}
|
|
17
|
+
/** One root's live cut. Its owner settles what it proved and always
|
|
18
|
+
* releases it; a released cut can no longer be settled or waited on. */
|
|
17
19
|
export interface WatchObservation {
|
|
18
20
|
readonly rootId: string;
|
|
19
21
|
readonly directory: string;
|
|
20
22
|
readonly suspicion: SuspicionSnapshot;
|
|
23
|
+
/** These roots must complete together; native event IDs never settle them. */
|
|
24
|
+
readonly domain?: WatchDomainCutoff;
|
|
25
|
+
}
|
|
26
|
+
/** What one root still owes, for scheduling only. It proves nothing. */
|
|
27
|
+
export interface WatchPending {
|
|
28
|
+
readonly rootId: string;
|
|
29
|
+
readonly directory: string;
|
|
30
|
+
readonly pending: SuspicionPending;
|
|
31
|
+
}
|
|
32
|
+
/** The binding world one turn began in. */
|
|
33
|
+
export interface WatchBoundary {
|
|
34
|
+
readonly owner: string;
|
|
35
|
+
readonly bindings: number;
|
|
36
|
+
}
|
|
37
|
+
interface WatchDomainCutoff {
|
|
38
|
+
readonly owner: string;
|
|
39
|
+
readonly generation: number;
|
|
40
|
+
readonly bindings: number;
|
|
41
|
+
readonly participants: readonly {
|
|
42
|
+
readonly rootId: string;
|
|
43
|
+
readonly directory: string;
|
|
44
|
+
readonly generation: number;
|
|
45
|
+
}[];
|
|
21
46
|
}
|
|
22
47
|
export interface WatchCoverageEvidence {
|
|
23
48
|
readonly health: WatchHealth;
|
|
@@ -42,9 +67,25 @@ export interface NativeWatchHandle {
|
|
|
42
67
|
close(): void | Promise<void>;
|
|
43
68
|
on(event: "error" | "close", listener: (...args: any[]) => void): this;
|
|
44
69
|
}
|
|
70
|
+
export interface NativeWatchEvidence {
|
|
71
|
+
readonly backend: "fsevents";
|
|
72
|
+
readonly streamId: string;
|
|
73
|
+
readonly path: string;
|
|
74
|
+
readonly flags: number;
|
|
75
|
+
/** FSEvents IDs are uint64; decimal text keeps every one exact. */
|
|
76
|
+
readonly eventId: string;
|
|
77
|
+
readonly scope: "path" | "domain";
|
|
78
|
+
/** The named path may be one of several links to the same content. A hint
|
|
79
|
+
* for Detect on that path, never a wider Watch scope. */
|
|
80
|
+
readonly alias: boolean;
|
|
81
|
+
/** The FSEvents file ID, in decimal: the object the path held within its
|
|
82
|
+
* filesystem. null when the event recorded none. */
|
|
83
|
+
readonly file: string | null;
|
|
84
|
+
}
|
|
85
|
+
type NativeWatchListener = (event: string, filename: string | Buffer | null, evidence?: NativeWatchEvidence) => void;
|
|
45
86
|
export type OpenNativeWatch = (directory: string, options: {
|
|
46
87
|
readonly recursive: boolean;
|
|
47
|
-
}, listener:
|
|
88
|
+
}, listener: NativeWatchListener) => NativeWatchHandle;
|
|
48
89
|
export interface NodeWatchHostOptions {
|
|
49
90
|
readonly open?: OpenNativeWatch;
|
|
50
91
|
/** Injectable only for deterministic physical-backend certification. */
|
|
@@ -61,6 +102,8 @@ export interface WatchEventEvidence {
|
|
|
61
102
|
readonly directory: string;
|
|
62
103
|
readonly path: string | null;
|
|
63
104
|
readonly at: number;
|
|
105
|
+
readonly event: string;
|
|
106
|
+
readonly native?: NativeWatchEvidence;
|
|
64
107
|
}
|
|
65
108
|
export interface WatchCloseOptions {
|
|
66
109
|
/** A one-shot effect that introduced no user edits may close without a catch-up scan. */
|
|
@@ -90,9 +133,22 @@ export declare class NodeWatchHost {
|
|
|
90
133
|
private readonly stopErrors;
|
|
91
134
|
private closeTask;
|
|
92
135
|
private plan;
|
|
136
|
+
private readonly domainOwner;
|
|
137
|
+
private bindingGeneration;
|
|
138
|
+
private domainGeneration;
|
|
139
|
+
private resolvedDomainGeneration;
|
|
140
|
+
private coverageGap;
|
|
93
141
|
private retryTimer;
|
|
94
142
|
private retryAttempt;
|
|
95
143
|
private closed;
|
|
144
|
+
private finalCutoff;
|
|
145
|
+
/** Native notices beyond this turn's slice, in arrival order. */
|
|
146
|
+
private backlog;
|
|
147
|
+
private backlogHead;
|
|
148
|
+
private sliceLeft;
|
|
149
|
+
/** When this turn's budget ends; set by the turn's first admission. */
|
|
150
|
+
private sliceEnds;
|
|
151
|
+
private turnScheduled;
|
|
96
152
|
private currentHealth;
|
|
97
153
|
constructor(options: NodeWatchHostOptions);
|
|
98
154
|
reconcile(grounds: readonly WatchGround[], options?: WatchReconcileOptions): WatchHealth;
|
|
@@ -102,12 +158,68 @@ export declare class NodeWatchHost {
|
|
|
102
158
|
/** Exact physical/logical coverage evidence for diagnostics and product
|
|
103
159
|
* readiness. This observes the one host; it never creates a handle. */
|
|
104
160
|
evidence(): WatchCoverageEvidence;
|
|
105
|
-
|
|
161
|
+
/** What every root still owes. Scheduling reads this; only a cut proves. */
|
|
162
|
+
pending(): readonly WatchPending[];
|
|
163
|
+
/** Cut every root at what it owes now; an owed domain cuts all roots
|
|
164
|
+
* together. Native cutoffs are never widened by the passage of time. */
|
|
165
|
+
freeze(): readonly WatchObservation[];
|
|
166
|
+
/** Cut the selected roots alone. A partial cut never carries the domain.
|
|
167
|
+
* "escalated" cuts the rings a named proof escalated while no ring owes
|
|
168
|
+
* the complete root; otherwise the complete root. */
|
|
169
|
+
freezeRoots(select: (root: {
|
|
170
|
+
readonly rootId: string;
|
|
171
|
+
readonly directory: string;
|
|
172
|
+
}) => boolean, scope: "owed" | "complete" | "escalated"): readonly WatchObservation[];
|
|
173
|
+
/** Cut one root at exactly these named rings. A lane that proves part of a
|
|
174
|
+
* root's names cuts only its own; the rest stay owed to their lane. */
|
|
175
|
+
freezePaths(rootId: string, paths: readonly string[]): WatchObservation | null;
|
|
176
|
+
/** A ticket for exact addresses: each root waits only for the named
|
|
177
|
+
* addresses inside it. A root inside an address, or an address outside
|
|
178
|
+
* every root, needs that complete proof — the scope `suspect` rang. */
|
|
179
|
+
freezeAddresses(absolutePaths: readonly string[]): readonly WatchObservation[];
|
|
180
|
+
private cut;
|
|
181
|
+
/** Every participant is one root's complete cut. */
|
|
182
|
+
private domainObservations;
|
|
183
|
+
/** One finite complete-lane batch: an owed domain, else the roots owing a
|
|
184
|
+
* complete-root or escalated proof. Named rings are not complete work;
|
|
185
|
+
* their own lanes serve them. A root whose ground is `held` is not cut: it
|
|
186
|
+
* is `withheld`. A `parked` root is not cut either; its park's own cause
|
|
187
|
+
* wakes it. A domain, which cuts every root together, waits whole. */
|
|
188
|
+
selectComplete(held: (directory: string) => boolean, parked: (rootId: string) => boolean): {
|
|
189
|
+
readonly cuts: readonly WatchObservation[];
|
|
190
|
+
readonly withheld: readonly string[];
|
|
191
|
+
};
|
|
192
|
+
/** The binding world a turn begins in; a later rebinding invalidates it. */
|
|
193
|
+
boundary(): WatchBoundary;
|
|
194
|
+
boundaryCurrent(boundary: WatchBoundary): boolean;
|
|
195
|
+
/** A named cut widened: its rings keep their generations and are now owed
|
|
196
|
+
* a complete-root proof. The cut itself stays live until released. */
|
|
197
|
+
escalate(observation: WatchObservation): void;
|
|
198
|
+
/** Names another examiner found (the sweep) that a named proof could not
|
|
199
|
+
* settle. Watch never rang them, so they are rung here and escalated at
|
|
200
|
+
* once: owed the same scoped wider proof as a widened native ring, never
|
|
201
|
+
* the complete root merely because Watch did not hear them. */
|
|
202
|
+
escalatePaths(rootId: string, paths: readonly string[]): void;
|
|
203
|
+
/** Every cut must be released by its owner, proved or not. */
|
|
204
|
+
release(observations: readonly WatchObservation[]): void;
|
|
205
|
+
private completeDomain;
|
|
106
206
|
settle(observations: readonly WatchObservation[]): void;
|
|
107
|
-
/** True only when
|
|
108
|
-
*
|
|
207
|
+
/** True only when everything each cut scoped at or before its generation
|
|
208
|
+
* has been proved, by any proof. Newer rings keep their own pass. A root
|
|
209
|
+
* no longer bound owes this caller nothing. */
|
|
109
210
|
settled(observations: readonly WatchObservation[]): boolean;
|
|
211
|
+
/** A capture may depend on another root's unfinished observation. Return
|
|
212
|
+
* scopes only; Apply ownership and recovery decisions remain with the host. */
|
|
213
|
+
dependencies(observations: readonly WatchObservation[]): readonly string[];
|
|
214
|
+
/** Coverage is continuous while healthy. A catch-up close is a final cutoff,
|
|
215
|
+
* not a gap: it suspects every root before retiring its handles, and every
|
|
216
|
+
* later change belongs to the next startup's blind interval. */
|
|
217
|
+
continuous(): boolean;
|
|
218
|
+
bindingsCurrent(observations: readonly WatchObservation[]): boolean;
|
|
110
219
|
suspectAll(): void;
|
|
220
|
+
/** One ambiguous effect can reach another root through a historical alias.
|
|
221
|
+
* Keep one bounded obligation, not a history of native notifications. */
|
|
222
|
+
suspectDomain(): void;
|
|
111
223
|
/** A host effect that touched exact ground rings the same named suspicion a
|
|
112
224
|
* native callback would: each root containing the address suspects that
|
|
113
225
|
* one path. An address outside every root suspects the complete plan, so an
|
|
@@ -128,9 +240,21 @@ export declare class NodeWatchHost {
|
|
|
128
240
|
* in question; those roots are returned. */
|
|
129
241
|
private rearmAddressedContent;
|
|
130
242
|
private suspectRoots;
|
|
243
|
+
/** Every doorbell enters here; null suspects the complete root. A ring can
|
|
244
|
+
* only start an obligation, so examiners hear it only when none was owed. */
|
|
245
|
+
private ring;
|
|
246
|
+
private observeObligation;
|
|
247
|
+
private loseCoverage;
|
|
131
248
|
private degrade;
|
|
132
249
|
private publishHealth;
|
|
133
250
|
private signal;
|
|
251
|
+
/** Admit a notice now while this turn's slice lasts and nothing earlier
|
|
252
|
+
* waits; otherwise after every earlier notice, in a later turn. */
|
|
253
|
+
private admit;
|
|
254
|
+
private admitNow;
|
|
255
|
+
/** Each turn renews the slice and admits the oldest waiting notices. */
|
|
256
|
+
private nextTurn;
|
|
134
257
|
private scheduleRetry;
|
|
135
258
|
private cancelRetry;
|
|
136
259
|
}
|
|
260
|
+
export {};
|