@origintrail-official/dkg-agent 10.0.16 → 10.0.18
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/README.md +24 -0
- package/dist/active-public-context-graph-chain-proof.d.ts +8 -5
- package/dist/active-public-context-graph-chain-proof.d.ts.map +1 -1
- package/dist/active-public-context-graph-chain-proof.js +8 -3
- package/dist/active-public-context-graph-chain-proof.js.map +1 -1
- package/dist/agent-peer-discovery.d.ts +24 -0
- package/dist/agent-peer-discovery.d.ts.map +1 -0
- package/dist/agent-peer-discovery.js +50 -0
- package/dist/agent-peer-discovery.js.map +1 -0
- package/dist/authority-index-bootstrap.d.ts +13 -0
- package/dist/authority-index-bootstrap.d.ts.map +1 -0
- package/dist/authority-index-bootstrap.js +38 -0
- package/dist/authority-index-bootstrap.js.map +1 -0
- package/dist/authority-index-config.d.ts +76 -0
- package/dist/authority-index-config.d.ts.map +1 -0
- package/dist/authority-index-config.js +142 -0
- package/dist/authority-index-config.js.map +1 -0
- package/dist/authority-index-snapshot-client.d.ts +42 -0
- package/dist/authority-index-snapshot-client.d.ts.map +1 -0
- package/dist/authority-index-snapshot-client.js +119 -0
- package/dist/authority-index-snapshot-client.js.map +1 -0
- package/dist/authority-index-snapshot-config.d.ts +17 -0
- package/dist/authority-index-snapshot-config.d.ts.map +1 -0
- package/dist/authority-index-snapshot-config.js +54 -0
- package/dist/authority-index-snapshot-config.js.map +1 -0
- package/dist/authority-index-snapshot-handler.d.ts +12 -0
- package/dist/authority-index-snapshot-handler.d.ts.map +1 -0
- package/dist/authority-index-snapshot-handler.js +93 -0
- package/dist/authority-index-snapshot-handler.js.map +1 -0
- package/dist/authority-index-snapshot-runtime.d.ts +16 -0
- package/dist/authority-index-snapshot-runtime.d.ts.map +1 -0
- package/dist/authority-index-snapshot-runtime.js +45 -0
- package/dist/authority-index-snapshot-runtime.js.map +1 -0
- package/dist/authority-index-snapshot-service.d.ts +6 -0
- package/dist/authority-index-snapshot-service.d.ts.map +1 -0
- package/dist/authority-index-snapshot-service.js +7 -0
- package/dist/authority-index-snapshot-service.js.map +1 -0
- package/dist/authority-index-snapshot-transport.d.ts +11 -0
- package/dist/authority-index-snapshot-transport.d.ts.map +1 -0
- package/dist/authority-index-snapshot-transport.js +25 -0
- package/dist/authority-index-snapshot-transport.js.map +1 -0
- package/dist/authority-index-snapshot-wire.d.ts +15 -0
- package/dist/authority-index-snapshot-wire.d.ts.map +1 -0
- package/dist/authority-index-snapshot-wire.js +55 -0
- package/dist/authority-index-snapshot-wire.js.map +1 -0
- package/dist/bounded-curator-roster-traversal.d.ts +41 -0
- package/dist/bounded-curator-roster-traversal.d.ts.map +1 -0
- package/dist/bounded-curator-roster-traversal.js +59 -0
- package/dist/bounded-curator-roster-traversal.js.map +1 -0
- package/dist/chain-authority-read-budgets.d.ts +51 -0
- package/dist/chain-authority-read-budgets.d.ts.map +1 -0
- package/dist/chain-authority-read-budgets.js +74 -0
- package/dist/chain-authority-read-budgets.js.map +1 -0
- package/dist/chain-reconciler.d.ts +13 -67
- package/dist/chain-reconciler.d.ts.map +1 -1
- package/dist/chain-reconciler.js +42 -321
- package/dist/chain-reconciler.js.map +1 -1
- package/dist/coalescing-recurring-task.d.ts +2 -0
- package/dist/coalescing-recurring-task.d.ts.map +1 -0
- package/dist/coalescing-recurring-task.js +3 -0
- package/dist/coalescing-recurring-task.js.map +1 -0
- package/dist/context-graph-binding-state.d.ts +9 -0
- package/dist/context-graph-binding-state.d.ts.map +1 -1
- package/dist/context-graph-binding-state.js +28 -6
- package/dist/context-graph-binding-state.js.map +1 -1
- package/dist/context-graph-discovery-options.d.ts +46 -0
- package/dist/context-graph-discovery-options.d.ts.map +1 -0
- package/dist/context-graph-discovery-options.js +85 -0
- package/dist/context-graph-discovery-options.js.map +1 -0
- package/dist/context-graph-list-authority-enrichment.d.ts +48 -0
- package/dist/context-graph-list-authority-enrichment.d.ts.map +1 -0
- package/dist/context-graph-list-authority-enrichment.js +78 -0
- package/dist/context-graph-list-authority-enrichment.js.map +1 -0
- package/dist/context-graph-meta-projection.d.ts +25 -3
- package/dist/context-graph-meta-projection.d.ts.map +1 -1
- package/dist/context-graph-meta-projection.js +88 -3
- package/dist/context-graph-meta-projection.js.map +1 -1
- package/dist/context-graph-read-authority.d.ts +15 -0
- package/dist/context-graph-read-authority.d.ts.map +1 -1
- package/dist/context-graph-read-authority.js +22 -0
- package/dist/context-graph-read-authority.js.map +1 -1
- package/dist/context-graph-registration-read-plan.d.ts +28 -0
- package/dist/context-graph-registration-read-plan.d.ts.map +1 -0
- package/dist/context-graph-registration-read-plan.js +142 -0
- package/dist/context-graph-registration-read-plan.js.map +1 -0
- package/dist/context-graph-subscription-authority-recovery.d.ts +49 -0
- package/dist/context-graph-subscription-authority-recovery.d.ts.map +1 -0
- package/dist/context-graph-subscription-authority-recovery.js +197 -0
- package/dist/context-graph-subscription-authority-recovery.js.map +1 -0
- package/dist/core-hosted-public-cg-record-decision.d.ts +10 -0
- package/dist/core-hosted-public-cg-record-decision.d.ts.map +1 -0
- package/dist/core-hosted-public-cg-record-decision.js +16 -0
- package/dist/core-hosted-public-cg-record-decision.js.map +1 -0
- package/dist/curator-meta-refresh.d.ts +39 -0
- package/dist/curator-meta-refresh.d.ts.map +1 -1
- package/dist/curator-meta-refresh.js +114 -22
- package/dist/curator-meta-refresh.js.map +1 -1
- package/dist/discovery.d.ts +11 -4
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +43 -11
- package/dist/discovery.js.map +1 -1
- package/dist/dkg-agent-base.d.ts +75 -79
- package/dist/dkg-agent-base.d.ts.map +1 -1
- package/dist/dkg-agent-base.js +72 -76
- package/dist/dkg-agent-base.js.map +1 -1
- package/dist/dkg-agent-ccl.d.ts.map +1 -1
- package/dist/dkg-agent-ccl.js.map +1 -1
- package/dist/dkg-agent-cg-registry.d.ts +76 -2
- package/dist/dkg-agent-cg-registry.d.ts.map +1 -1
- package/dist/dkg-agent-cg-registry.js +674 -43
- package/dist/dkg-agent-cg-registry.js.map +1 -1
- package/dist/dkg-agent-cg-resolve.d.ts +93 -61
- package/dist/dkg-agent-cg-resolve.d.ts.map +1 -1
- package/dist/dkg-agent-cg-resolve.js +235 -57
- package/dist/dkg-agent-cg-resolve.js.map +1 -1
- package/dist/dkg-agent-constants.d.ts +35 -1
- package/dist/dkg-agent-constants.d.ts.map +1 -1
- package/dist/dkg-agent-constants.js +35 -1
- package/dist/dkg-agent-constants.js.map +1 -1
- package/dist/dkg-agent-context-graph.d.ts.map +1 -1
- package/dist/dkg-agent-context-graph.js +333 -86
- package/dist/dkg-agent-context-graph.js.map +1 -1
- package/dist/dkg-agent-crypto.d.ts +20 -3
- package/dist/dkg-agent-crypto.d.ts.map +1 -1
- package/dist/dkg-agent-crypto.js +165 -42
- package/dist/dkg-agent-crypto.js.map +1 -1
- package/dist/dkg-agent-diagnostics.d.ts.map +1 -1
- package/dist/dkg-agent-diagnostics.js +1 -2
- package/dist/dkg-agent-diagnostics.js.map +1 -1
- package/dist/dkg-agent-endorse.d.ts.map +1 -1
- package/dist/dkg-agent-endorse.js.map +1 -1
- package/dist/dkg-agent-join.d.ts +2 -9
- package/dist/dkg-agent-join.d.ts.map +1 -1
- package/dist/dkg-agent-join.js +9 -4
- package/dist/dkg-agent-join.js.map +1 -1
- package/dist/dkg-agent-lifecycle.d.ts +129 -18
- package/dist/dkg-agent-lifecycle.d.ts.map +1 -1
- package/dist/dkg-agent-lifecycle.js +1261 -927
- package/dist/dkg-agent-lifecycle.js.map +1 -1
- package/dist/dkg-agent-ownership.d.ts.map +1 -1
- package/dist/dkg-agent-ownership.js.map +1 -1
- package/dist/dkg-agent-publish.d.ts.map +1 -1
- package/dist/dkg-agent-publish.js +68 -43
- package/dist/dkg-agent-publish.js.map +1 -1
- package/dist/dkg-agent-query.d.ts +31 -8
- package/dist/dkg-agent-query.d.ts.map +1 -1
- package/dist/dkg-agent-query.js +215 -107
- package/dist/dkg-agent-query.js.map +1 -1
- package/dist/dkg-agent-registry.d.ts +14 -17
- package/dist/dkg-agent-registry.d.ts.map +1 -1
- package/dist/dkg-agent-registry.js +37 -20
- package/dist/dkg-agent-registry.js.map +1 -1
- package/dist/dkg-agent-rfc64-catalog-auto-publish.d.ts +27 -1
- package/dist/dkg-agent-rfc64-catalog-auto-publish.d.ts.map +1 -1
- package/dist/dkg-agent-rfc64-catalog-auto-publish.js +477 -168
- package/dist/dkg-agent-rfc64-catalog-auto-publish.js.map +1 -1
- package/dist/dkg-agent-rfc64-catalog-bootstrap.d.ts.map +1 -1
- package/dist/dkg-agent-rfc64-catalog-bootstrap.js +2 -2
- package/dist/dkg-agent-rfc64-catalog-bootstrap.js.map +1 -1
- package/dist/dkg-agent-rfc64-catalog-upsert.d.ts +7 -0
- package/dist/dkg-agent-rfc64-catalog-upsert.d.ts.map +1 -1
- package/dist/dkg-agent-rfc64-catalog-upsert.js +20 -3
- package/dist/dkg-agent-rfc64-catalog-upsert.js.map +1 -1
- package/dist/dkg-agent-rfc64-catalog.d.ts +190 -11
- package/dist/dkg-agent-rfc64-catalog.d.ts.map +1 -1
- package/dist/dkg-agent-rfc64-catalog.js +1563 -351
- package/dist/dkg-agent-rfc64-catalog.js.map +1 -1
- package/dist/dkg-agent-rfc64-meta-bootstrap.d.ts +15 -0
- package/dist/dkg-agent-rfc64-meta-bootstrap.d.ts.map +1 -0
- package/dist/dkg-agent-rfc64-meta-bootstrap.js +127 -0
- package/dist/dkg-agent-rfc64-meta-bootstrap.js.map +1 -0
- package/dist/dkg-agent-rfc64-seed-fetch.d.ts +85 -0
- package/dist/dkg-agent-rfc64-seed-fetch.d.ts.map +1 -0
- package/dist/dkg-agent-rfc64-seed-fetch.js +389 -0
- package/dist/dkg-agent-rfc64-seed-fetch.js.map +1 -0
- package/dist/dkg-agent-rfc64-seed-store.d.ts +42 -0
- package/dist/dkg-agent-rfc64-seed-store.d.ts.map +1 -0
- package/dist/dkg-agent-rfc64-seed-store.js +127 -0
- package/dist/dkg-agent-rfc64-seed-store.js.map +1 -0
- package/dist/dkg-agent-rfc64-swm-catalog-projection-supervisor.d.ts.map +1 -1
- package/dist/dkg-agent-rfc64-swm-catalog-projection-supervisor.js +3 -3
- package/dist/dkg-agent-rfc64-swm-catalog-projection-supervisor.js.map +1 -1
- package/dist/dkg-agent-rfc64-swm-catalog-projection.js +2 -2
- package/dist/dkg-agent-rfc64-swm-catalog-projection.js.map +1 -1
- package/dist/dkg-agent-rfc64-swm-recovery-runtime.d.ts +3 -0
- package/dist/dkg-agent-rfc64-swm-recovery-runtime.d.ts.map +1 -1
- package/dist/dkg-agent-rfc64-swm-recovery-runtime.js +14 -2
- package/dist/dkg-agent-rfc64-swm-recovery-runtime.js.map +1 -1
- package/dist/dkg-agent-swm-host.d.ts +50 -33
- package/dist/dkg-agent-swm-host.d.ts.map +1 -1
- package/dist/dkg-agent-swm-host.js +518 -259
- package/dist/dkg-agent-swm-host.js.map +1 -1
- package/dist/dkg-agent-swm-substrate.d.ts +2 -0
- package/dist/dkg-agent-swm-substrate.d.ts.map +1 -1
- package/dist/dkg-agent-swm-substrate.js +29 -22
- package/dist/dkg-agent-swm-substrate.js.map +1 -1
- package/dist/dkg-agent-types.d.ts +128 -174
- package/dist/dkg-agent-types.d.ts.map +1 -1
- package/dist/dkg-agent-types.js +21 -0
- package/dist/dkg-agent-types.js.map +1 -1
- package/dist/dkg-agent-vm-reconcile-scheduling.d.ts +25 -0
- package/dist/dkg-agent-vm-reconcile-scheduling.d.ts.map +1 -0
- package/dist/dkg-agent-vm-reconcile-scheduling.js +106 -0
- package/dist/dkg-agent-vm-reconcile-scheduling.js.map +1 -0
- package/dist/dkg-agent.d.ts +51 -13
- package/dist/dkg-agent.d.ts.map +1 -1
- package/dist/dkg-agent.js +535 -309
- package/dist/dkg-agent.js.map +1 -1
- package/dist/finalization-annotations.d.ts +5 -0
- package/dist/finalization-annotations.d.ts.map +1 -0
- package/dist/finalization-annotations.js +6 -0
- package/dist/finalization-annotations.js.map +1 -0
- package/dist/finalization-graph-envelope.d.ts +3 -2
- package/dist/finalization-graph-envelope.d.ts.map +1 -1
- package/dist/finalization-graph-envelope.js.map +1 -1
- package/dist/finalization-handler.d.ts +10 -4
- package/dist/finalization-handler.d.ts.map +1 -1
- package/dist/finalization-handler.js +152 -61
- package/dist/finalization-handler.js.map +1 -1
- package/dist/finalization-publisher-authority-observer.d.ts +40 -0
- package/dist/finalization-publisher-authority-observer.d.ts.map +1 -0
- package/dist/finalization-publisher-authority-observer.js +76 -0
- package/dist/finalization-publisher-authority-observer.js.map +1 -0
- package/dist/finalization-recovery-eligibility.d.ts +23 -0
- package/dist/finalization-recovery-eligibility.d.ts.map +1 -0
- package/dist/finalization-recovery-eligibility.js +40 -0
- package/dist/finalization-recovery-eligibility.js.map +1 -0
- package/dist/finalization-recovery-sqlite-codec.d.ts.map +1 -1
- package/dist/finalization-recovery-sqlite-codec.js +4 -0
- package/dist/finalization-recovery-sqlite-codec.js.map +1 -1
- package/dist/finalization-recovery-sqlite-schema.d.ts.map +1 -1
- package/dist/finalization-recovery-sqlite-schema.js +52 -13
- package/dist/finalization-recovery-sqlite-schema.js.map +1 -1
- package/dist/finalization-recovery-sqlite-store.d.ts +2 -2
- package/dist/finalization-recovery-sqlite-store.d.ts.map +1 -1
- package/dist/finalization-recovery-sqlite-store.js +49 -19
- package/dist/finalization-recovery-sqlite-store.js.map +1 -1
- package/dist/finalization-recovery-store.d.ts +33 -1
- package/dist/finalization-recovery-store.d.ts.map +1 -1
- package/dist/finalization-recovery-store.js +40 -0
- package/dist/finalization-recovery-store.js.map +1 -1
- package/dist/finalization-recovery.d.ts +7 -6
- package/dist/finalization-recovery.d.ts.map +1 -1
- package/dist/finalization-recovery.js +145 -86
- package/dist/finalization-recovery.js.map +1 -1
- package/dist/finalized-authority-cold-resolution.d.ts +69 -0
- package/dist/finalized-authority-cold-resolution.d.ts.map +1 -0
- package/dist/finalized-authority-cold-resolution.js +129 -0
- package/dist/finalized-authority-cold-resolution.js.map +1 -0
- package/dist/generic-sql-source.d.ts.map +1 -1
- package/dist/generic-sql-source.js +2 -1
- package/dist/generic-sql-source.js.map +1 -1
- package/dist/gossip-publish-handler.d.ts.map +1 -1
- package/dist/gossip-publish-handler.js +6 -7
- package/dist/gossip-publish-handler.js.map +1 -1
- package/dist/imported-artifact.d.ts.map +1 -1
- package/dist/imported-artifact.js +2 -1
- package/dist/imported-artifact.js.map +1 -1
- package/dist/index.d.ts +16 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/context-graph-authority/context-graph-access-policy.d.ts +34 -1
- package/dist/internal/context-graph-authority/context-graph-access-policy.d.ts.map +1 -1
- package/dist/internal/context-graph-authority/context-graph-access-policy.js +80 -2
- package/dist/internal/context-graph-authority/context-graph-access-policy.js.map +1 -1
- package/dist/internal/context-graph-authority/context-graph-authority.d.ts.map +1 -1
- package/dist/internal/context-graph-authority/context-graph-authority.js +2 -0
- package/dist/internal/context-graph-authority/context-graph-authority.js.map +1 -1
- package/dist/internal/context-graph-authority/finalized-context-graph-access-policy.d.ts +84 -0
- package/dist/internal/context-graph-authority/finalized-context-graph-access-policy.d.ts.map +1 -0
- package/dist/internal/context-graph-authority/finalized-context-graph-access-policy.js +130 -0
- package/dist/internal/context-graph-authority/finalized-context-graph-access-policy.js.map +1 -0
- package/dist/internal/context-graph-authority/finalized-context-graph-binding.d.ts +52 -0
- package/dist/internal/context-graph-authority/finalized-context-graph-binding.d.ts.map +1 -0
- package/dist/internal/context-graph-authority/finalized-context-graph-binding.js +51 -0
- package/dist/internal/context-graph-authority/finalized-context-graph-binding.js.map +1 -0
- package/dist/internal/promote/assertion-promote-precommit.d.ts.map +1 -1
- package/dist/internal/promote/assertion-promote-precommit.js +3 -0
- package/dist/internal/promote/assertion-promote-precommit.js.map +1 -1
- package/dist/internal/vm-reconcile-sweep-admission.d.ts +9 -0
- package/dist/internal/vm-reconcile-sweep-admission.d.ts.map +1 -0
- package/dist/internal/vm-reconcile-sweep-admission.js +2 -0
- package/dist/internal/vm-reconcile-sweep-admission.js.map +1 -0
- package/dist/internal/vm-reconcile-sweep.d.ts +33 -0
- package/dist/internal/vm-reconcile-sweep.d.ts.map +1 -0
- package/dist/internal/vm-reconcile-sweep.js +168 -0
- package/dist/internal/vm-reconcile-sweep.js.map +1 -0
- package/dist/local-context-graph-provenance.d.ts +30 -0
- package/dist/local-context-graph-provenance.d.ts.map +1 -0
- package/dist/local-context-graph-provenance.js +50 -0
- package/dist/local-context-graph-provenance.js.map +1 -0
- package/dist/local-context-graph-registration-status.d.ts +20 -0
- package/dist/local-context-graph-registration-status.d.ts.map +1 -0
- package/dist/local-context-graph-registration-status.js +91 -0
- package/dist/local-context-graph-registration-status.js.map +1 -0
- package/dist/map-with-concurrency.d.ts +7 -0
- package/dist/map-with-concurrency.d.ts.map +1 -1
- package/dist/map-with-concurrency.js +82 -0
- package/dist/map-with-concurrency.js.map +1 -1
- package/dist/p2p/messenger.d.ts +13 -13
- package/dist/p2p/messenger.d.ts.map +1 -1
- package/dist/p2p/messenger.js +23 -15
- package/dist/p2p/messenger.js.map +1 -1
- package/dist/p2p/network-admission-coordinator.d.ts +19 -0
- package/dist/p2p/network-admission-coordinator.d.ts.map +1 -1
- package/dist/p2p/network-admission-coordinator.js +47 -0
- package/dist/p2p/network-admission-coordinator.js.map +1 -1
- package/dist/p2p/network-admission-probe-retry.d.ts +10 -0
- package/dist/p2p/network-admission-probe-retry.d.ts.map +1 -1
- package/dist/p2p/network-admission-probe-retry.js +23 -0
- package/dist/p2p/network-admission-probe-retry.js.map +1 -1
- package/dist/p2p/network-admission.d.ts +4 -0
- package/dist/p2p/network-admission.d.ts.map +1 -1
- package/dist/p2p/network-admission.js +10 -0
- package/dist/p2p/network-admission.js.map +1 -1
- package/dist/p2p/outbox-drain-types.d.ts +26 -0
- package/dist/p2p/outbox-drain-types.d.ts.map +1 -0
- package/dist/p2p/outbox-drain-types.js +2 -0
- package/dist/p2p/outbox-drain-types.js.map +1 -0
- package/dist/p2p/outbox-drainer.d.ts +21 -5
- package/dist/p2p/outbox-drainer.d.ts.map +1 -1
- package/dist/p2p/outbox-drainer.js +71 -22
- package/dist/p2p/outbox-drainer.js.map +1 -1
- package/dist/p2p/peer-connection.d.ts +11 -0
- package/dist/p2p/peer-connection.d.ts.map +1 -0
- package/dist/p2p/peer-connection.js +2 -0
- package/dist/p2p/peer-connection.js.map +1 -0
- package/dist/p2p/peer-event-lifetime.d.ts +15 -0
- package/dist/p2p/peer-event-lifetime.d.ts.map +1 -0
- package/dist/p2p/peer-event-lifetime.js +46 -0
- package/dist/p2p/peer-event-lifetime.js.map +1 -0
- package/dist/p2p/sync-transport.d.ts +14 -4
- package/dist/p2p/sync-transport.d.ts.map +1 -1
- package/dist/p2p/sync-transport.js +14 -4
- package/dist/p2p/sync-transport.js.map +1 -1
- package/dist/prepare-unscoped-context-graph-read-checks.d.ts +16 -0
- package/dist/prepare-unscoped-context-graph-read-checks.d.ts.map +1 -0
- package/dist/prepare-unscoped-context-graph-read-checks.js +133 -0
- package/dist/prepare-unscoped-context-graph-read-checks.js.map +1 -0
- package/dist/random-sampling-bind.d.ts +23 -3
- package/dist/random-sampling-bind.d.ts.map +1 -1
- package/dist/random-sampling-bind.js +38 -19
- package/dist/random-sampling-bind.js.map +1 -1
- package/dist/random-sampling-eligibility.d.ts +24 -0
- package/dist/random-sampling-eligibility.d.ts.map +1 -0
- package/dist/random-sampling-eligibility.js +31 -0
- package/dist/random-sampling-eligibility.js.map +1 -0
- package/dist/random-sampling-runtime.d.ts +86 -0
- package/dist/random-sampling-runtime.d.ts.map +1 -0
- package/dist/random-sampling-runtime.js +228 -0
- package/dist/random-sampling-runtime.js.map +1 -0
- package/dist/registered-context-graph-authority.d.ts +22 -1
- package/dist/registered-context-graph-authority.d.ts.map +1 -1
- package/dist/rfc64/authority-rpc-circuit-breaker-v1.d.ts +162 -0
- package/dist/rfc64/authority-rpc-circuit-breaker-v1.d.ts.map +1 -0
- package/dist/rfc64/authority-rpc-circuit-breaker-v1.js +367 -0
- package/dist/rfc64/authority-rpc-circuit-breaker-v1.js.map +1 -0
- package/dist/rfc64/background-work-dispatcher-v1.d.ts +21 -0
- package/dist/rfc64/background-work-dispatcher-v1.d.ts.map +1 -0
- package/dist/rfc64/background-work-dispatcher-v1.js +144 -0
- package/dist/rfc64/background-work-dispatcher-v1.js.map +1 -0
- package/dist/rfc64/catalog-access-policy-v1.d.ts +30 -15
- package/dist/rfc64/catalog-access-policy-v1.d.ts.map +1 -1
- package/dist/rfc64/catalog-access-policy-v1.js +140 -3
- package/dist/rfc64/catalog-access-policy-v1.js.map +1 -1
- package/dist/rfc64/catalog-authority-config-v1.d.ts +4 -1
- package/dist/rfc64/catalog-authority-config-v1.d.ts.map +1 -1
- package/dist/rfc64/catalog-authority-config-v1.js +10 -2
- package/dist/rfc64/catalog-authority-config-v1.js.map +1 -1
- package/dist/rfc64/catalog-authority-refresh-binding-v1.d.ts +25 -0
- package/dist/rfc64/catalog-authority-refresh-binding-v1.d.ts.map +1 -0
- package/dist/rfc64/catalog-authority-refresh-binding-v1.js +60 -0
- package/dist/rfc64/catalog-authority-refresh-binding-v1.js.map +1 -0
- package/dist/rfc64/catalog-authority-refresh-loop-v1.d.ts +43 -4
- package/dist/rfc64/catalog-authority-refresh-loop-v1.d.ts.map +1 -1
- package/dist/rfc64/catalog-authority-refresh-loop-v1.js +292 -84
- package/dist/rfc64/catalog-authority-refresh-loop-v1.js.map +1 -1
- package/dist/rfc64/catalog-authority-revision-projection-v1.d.ts +10 -0
- package/dist/rfc64/catalog-authority-revision-projection-v1.d.ts.map +1 -0
- package/dist/rfc64/catalog-authority-revision-projection-v1.js +33 -0
- package/dist/rfc64/catalog-authority-revision-projection-v1.js.map +1 -0
- package/dist/rfc64/catalog-limits-v1.d.ts +3 -0
- package/dist/rfc64/catalog-limits-v1.d.ts.map +1 -0
- package/dist/rfc64/catalog-limits-v1.js +4 -0
- package/dist/rfc64/catalog-limits-v1.js.map +1 -0
- package/dist/rfc64/catalog-replay-connection-runtime-v1.d.ts +29 -0
- package/dist/rfc64/catalog-replay-connection-runtime-v1.d.ts.map +1 -0
- package/dist/rfc64/catalog-replay-connection-runtime-v1.js +82 -0
- package/dist/rfc64/catalog-replay-connection-runtime-v1.js.map +1 -0
- package/dist/rfc64/catalog-replay-generation-v1.d.ts +43 -0
- package/dist/rfc64/catalog-replay-generation-v1.d.ts.map +1 -0
- package/dist/rfc64/catalog-replay-generation-v1.js +54 -0
- package/dist/rfc64/catalog-replay-generation-v1.js.map +1 -0
- package/dist/rfc64/catalog-replay-recovery-runtime-v1.d.ts +86 -0
- package/dist/rfc64/catalog-replay-recovery-runtime-v1.d.ts.map +1 -0
- package/dist/rfc64/catalog-replay-recovery-runtime-v1.js +528 -0
- package/dist/rfc64/catalog-replay-recovery-runtime-v1.js.map +1 -0
- package/dist/rfc64/catalog-responsibility-registry-v1.d.ts.map +1 -1
- package/dist/rfc64/catalog-responsibility-registry-v1.js +2 -1
- package/dist/rfc64/catalog-responsibility-registry-v1.js.map +1 -1
- package/dist/rfc64/catalog-rollout-authority-v1.d.ts +36 -3
- package/dist/rfc64/catalog-rollout-authority-v1.d.ts.map +1 -1
- package/dist/rfc64/catalog-rollout-authority-v1.js +74 -22
- package/dist/rfc64/catalog-rollout-authority-v1.js.map +1 -1
- package/dist/rfc64/catalog-runtime-v1.d.ts +4 -0
- package/dist/rfc64/catalog-runtime-v1.d.ts.map +1 -1
- package/dist/rfc64/catalog-runtime-v1.js.map +1 -1
- package/dist/rfc64/catalog-shadow-observability-v1.d.ts +136 -0
- package/dist/rfc64/catalog-shadow-observability-v1.d.ts.map +1 -0
- package/dist/rfc64/catalog-shadow-observability-v1.js +175 -0
- package/dist/rfc64/catalog-shadow-observability-v1.js.map +1 -0
- package/dist/rfc64/catalog-transport-authorization-v1.d.ts.map +1 -1
- package/dist/rfc64/catalog-transport-authorization-v1.js +20 -13
- package/dist/rfc64/catalog-transport-authorization-v1.js.map +1 -1
- package/dist/rfc64/finalized-authority-snapshot-batch-runtime-v1.d.ts +28 -0
- package/dist/rfc64/finalized-authority-snapshot-batch-runtime-v1.d.ts.map +1 -0
- package/dist/rfc64/finalized-authority-snapshot-batch-runtime-v1.js +78 -0
- package/dist/rfc64/finalized-authority-snapshot-batch-runtime-v1.js.map +1 -0
- package/dist/rfc64/finalized-policy-agent-precommit-v1.d.ts +14 -0
- package/dist/rfc64/finalized-policy-agent-precommit-v1.d.ts.map +1 -1
- package/dist/rfc64/finalized-policy-agent-precommit-v1.js +10 -0
- package/dist/rfc64/finalized-policy-agent-precommit-v1.js.map +1 -1
- package/dist/rfc64/finalized-vm-agent-precommit-v1.d.ts +6 -0
- package/dist/rfc64/finalized-vm-agent-precommit-v1.d.ts.map +1 -1
- package/dist/rfc64/finalized-vm-agent-precommit-v1.js +2 -1
- package/dist/rfc64/finalized-vm-agent-precommit-v1.js.map +1 -1
- package/dist/rfc64/inventory-v1/candidate.d.ts +13 -5
- package/dist/rfc64/inventory-v1/candidate.d.ts.map +1 -1
- package/dist/rfc64/inventory-v1/candidate.js +133 -3
- package/dist/rfc64/inventory-v1/candidate.js.map +1 -1
- package/dist/rfc64/inventory-v1/index.d.ts +1 -1
- package/dist/rfc64/inventory-v1/index.d.ts.map +1 -1
- package/dist/rfc64/inventory-v1/index.js.map +1 -1
- package/dist/rfc64/inventory-v1/open.d.ts.map +1 -1
- package/dist/rfc64/inventory-v1/open.js +28 -3
- package/dist/rfc64/inventory-v1/open.js.map +1 -1
- package/dist/rfc64/inventory-v1/sql.d.ts +13 -1
- package/dist/rfc64/inventory-v1/sql.d.ts.map +1 -1
- package/dist/rfc64/inventory-v1/sql.js +42 -2
- package/dist/rfc64/inventory-v1/sql.js.map +1 -1
- package/dist/rfc64/inventory-v1/statements.d.ts +10 -2
- package/dist/rfc64/inventory-v1/statements.d.ts.map +1 -1
- package/dist/rfc64/inventory-v1/statements.js +35 -0
- package/dist/rfc64/inventory-v1/statements.js.map +1 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-auth-v1.d.ts +9 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-auth-v1.d.ts.map +1 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-auth-v1.js +50 -0
- package/dist/rfc64/inventory-v1/swm-author-inventory-auth-v1.js.map +1 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-commit-plan.d.ts +16 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-commit-plan.d.ts.map +1 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-commit-plan.js +28 -0
- package/dist/rfc64/inventory-v1/swm-author-inventory-commit-plan.js.map +1 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-contracts.d.ts +19 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-contracts.d.ts.map +1 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-contracts.js.map +1 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-persistence.d.ts +5 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-persistence.d.ts.map +1 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-persistence.js +137 -13
- package/dist/rfc64/inventory-v1/swm-author-inventory-persistence.js.map +1 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-sql-codec.d.ts +2 -2
- package/dist/rfc64/inventory-v1/swm-author-inventory-sql-codec.d.ts.map +1 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-sql-codec.js.map +1 -1
- package/dist/rfc64/legacy-swm-boundary-v1.d.ts +35 -0
- package/dist/rfc64/legacy-swm-boundary-v1.d.ts.map +1 -1
- package/dist/rfc64/legacy-swm-boundary-v1.js +301 -75
- package/dist/rfc64/legacy-swm-boundary-v1.js.map +1 -1
- package/dist/rfc64/persistence-v1.d.ts +3 -0
- package/dist/rfc64/persistence-v1.d.ts.map +1 -1
- package/dist/rfc64/persistence-v1.js +16 -2
- package/dist/rfc64/persistence-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-activation-config-v1.d.ts +41 -2
- package/dist/rfc64/public-catalog-activation-config-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-activation-config-v1.js +212 -18
- package/dist/rfc64/public-catalog-activation-config-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-native-receiver-v1.d.ts +29 -0
- package/dist/rfc64/public-catalog-native-receiver-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-native-receiver-v1.js +381 -262
- package/dist/rfc64/public-catalog-native-receiver-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-native-reconciler-v1.d.ts +5 -3
- package/dist/rfc64/public-catalog-native-reconciler-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-native-reconciler-v1.js +20 -7
- package/dist/rfc64/public-catalog-native-reconciler-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-native-transport-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-native-transport-v1.js +26 -23
- package/dist/rfc64/public-catalog-native-transport-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-receiver-task-lifecycle-v1.d.ts +32 -6
- package/dist/rfc64/public-catalog-receiver-task-lifecycle-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-receiver-task-lifecycle-v1.js +60 -16
- package/dist/rfc64/public-catalog-receiver-task-lifecycle-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-receiver-v1.d.ts +66 -7
- package/dist/rfc64/public-catalog-receiver-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-receiver-v1.js +255 -48
- package/dist/rfc64/public-catalog-receiver-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-service-v1.d.ts +105 -0
- package/dist/rfc64/public-catalog-service-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-service-v1.js +468 -17
- package/dist/rfc64/public-catalog-service-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-transport-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-transport-v1.js +12 -10
- package/dist/rfc64/public-catalog-transport-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-workload-owner-v1.d.ts +7 -2
- package/dist/rfc64/public-catalog-workload-owner-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-workload-owner-v1.js +13 -0
- package/dist/rfc64/public-catalog-workload-owner-v1.js.map +1 -1
- package/dist/rfc64/swm-author-inventory-producer-v1.d.ts +19 -0
- package/dist/rfc64/swm-author-inventory-producer-v1.d.ts.map +1 -1
- package/dist/rfc64/swm-author-inventory-producer-v1.js +154 -0
- package/dist/rfc64/swm-author-inventory-producer-v1.js.map +1 -1
- package/dist/rfc64/swm-catalog-durable-asset-resolver-v1.d.ts.map +1 -1
- package/dist/rfc64/swm-catalog-durable-asset-resolver-v1.js +29 -17
- package/dist/rfc64/swm-catalog-durable-asset-resolver-v1.js.map +1 -1
- package/dist/rfc64/unregistered-authority-seed-store-v1.d.ts +57 -0
- package/dist/rfc64/unregistered-authority-seed-store-v1.d.ts.map +1 -0
- package/dist/rfc64/unregistered-authority-seed-store-v1.js +97 -0
- package/dist/rfc64/unregistered-authority-seed-store-v1.js.map +1 -0
- package/dist/rfc64/unregistered-authority-transport-v1.d.ts +131 -0
- package/dist/rfc64/unregistered-authority-transport-v1.d.ts.map +1 -0
- package/dist/rfc64/unregistered-authority-transport-v1.js +379 -0
- package/dist/rfc64/unregistered-authority-transport-v1.js.map +1 -0
- package/dist/rfc64/unregistered-replica-authority-v1.d.ts +114 -0
- package/dist/rfc64/unregistered-replica-authority-v1.d.ts.map +1 -0
- package/dist/rfc64/unregistered-replica-authority-v1.js +242 -0
- package/dist/rfc64/unregistered-replica-authority-v1.js.map +1 -0
- package/dist/sqlite/module-loader-v1.d.ts +6 -1
- package/dist/sqlite/module-loader-v1.d.ts.map +1 -1
- package/dist/sqlite/module-loader-v1.js +5 -3
- package/dist/sqlite/module-loader-v1.js.map +1 -1
- package/dist/swm/swm-catchup-peer-selection.d.ts +11 -1
- package/dist/swm/swm-catchup-peer-selection.d.ts.map +1 -1
- package/dist/swm/swm-catchup-peer-selection.js +18 -1
- package/dist/swm/swm-catchup-peer-selection.js.map +1 -1
- package/dist/sync/auth/request-authorize.d.ts.map +1 -1
- package/dist/sync/auth/request-authorize.js +4 -3
- package/dist/sync/auth/request-authorize.js.map +1 -1
- package/dist/sync/durable-integrity.d.ts.map +1 -1
- package/dist/sync/durable-integrity.js +52 -64
- package/dist/sync/durable-integrity.js.map +1 -1
- package/dist/sync/exact-asset-fetch.d.ts +6 -0
- package/dist/sync/exact-asset-fetch.d.ts.map +1 -1
- package/dist/sync/exact-asset-fetch.js +1 -0
- package/dist/sync/exact-asset-fetch.js.map +1 -1
- package/dist/sync/graph-scoped-swm-recovery.d.ts +28 -7
- package/dist/sync/graph-scoped-swm-recovery.d.ts.map +1 -1
- package/dist/sync/graph-scoped-swm-recovery.js +262 -121
- package/dist/sync/graph-scoped-swm-recovery.js.map +1 -1
- package/dist/sync/memory-telemetry.d.ts +1 -1
- package/dist/sync/memory-telemetry.d.ts.map +1 -1
- package/dist/sync/metadata-literal.d.ts +4 -0
- package/dist/sync/metadata-literal.d.ts.map +1 -0
- package/dist/sync/metadata-literal.js +6 -0
- package/dist/sync/metadata-literal.js.map +1 -0
- package/dist/sync/on-connect/attempt-accounting.d.ts.map +1 -1
- package/dist/sync/on-connect/attempt-accounting.js +10 -5
- package/dist/sync/on-connect/attempt-accounting.js.map +1 -1
- package/dist/sync/on-connect/peer-job-runner.d.ts +4 -1
- package/dist/sync/on-connect/peer-job-runner.d.ts.map +1 -1
- package/dist/sync/on-connect/peer-job-runner.js +16 -2
- package/dist/sync/on-connect/peer-job-runner.js.map +1 -1
- package/dist/sync/on-connect/peer-scheduler.d.ts +3 -0
- package/dist/sync/on-connect/peer-scheduler.d.ts.map +1 -1
- package/dist/sync/on-connect/peer-scheduler.js +15 -0
- package/dist/sync/on-connect/peer-scheduler.js.map +1 -1
- package/dist/sync/on-connect/sync-on-connect.d.ts +38 -4
- package/dist/sync/on-connect/sync-on-connect.d.ts.map +1 -1
- package/dist/sync/on-connect/sync-on-connect.js +114 -10
- package/dist/sync/on-connect/sync-on-connect.js.map +1 -1
- package/dist/sync/peer-connection.d.ts +24 -0
- package/dist/sync/peer-connection.d.ts.map +1 -0
- package/dist/sync/peer-connection.js +75 -0
- package/dist/sync/peer-connection.js.map +1 -0
- package/dist/sync/peer-sync-session.d.ts +59 -0
- package/dist/sync/peer-sync-session.d.ts.map +1 -0
- package/dist/sync/peer-sync-session.js +139 -0
- package/dist/sync/peer-sync-session.js.map +1 -0
- package/dist/sync/requester/durable-sync.d.ts +4 -2
- package/dist/sync/requester/durable-sync.d.ts.map +1 -1
- package/dist/sync/requester/durable-sync.js +53 -9
- package/dist/sync/requester/durable-sync.js.map +1 -1
- package/dist/sync/requester/entity-slice-recovery.d.ts +53 -0
- package/dist/sync/requester/entity-slice-recovery.d.ts.map +1 -0
- package/dist/sync/requester/entity-slice-recovery.js +77 -0
- package/dist/sync/requester/entity-slice-recovery.js.map +1 -0
- package/dist/sync/requester/exact-durable-fetch.d.ts +27 -0
- package/dist/sync/requester/exact-durable-fetch.d.ts.map +1 -1
- package/dist/sync/requester/exact-durable-fetch.js +39 -10
- package/dist/sync/requester/exact-durable-fetch.js.map +1 -1
- package/dist/sync/requester/graph-scoped-materialization.d.ts.map +1 -1
- package/dist/sync/requester/graph-scoped-materialization.js +17 -2
- package/dist/sync/requester/graph-scoped-materialization.js.map +1 -1
- package/dist/sync/requester/manifest-bound-snapshot-walk.d.ts +55 -0
- package/dist/sync/requester/manifest-bound-snapshot-walk.d.ts.map +1 -0
- package/dist/sync/requester/manifest-bound-snapshot-walk.js +197 -0
- package/dist/sync/requester/manifest-bound-snapshot-walk.js.map +1 -0
- package/dist/sync/requester/page-fetch.d.ts +11 -3
- package/dist/sync/requester/page-fetch.d.ts.map +1 -1
- package/dist/sync/requester/page-fetch.js +208 -174
- package/dist/sync/requester/page-fetch.js.map +1 -1
- package/dist/sync/requester/private-swm-recovery-budget.d.ts +14 -0
- package/dist/sync/requester/private-swm-recovery-budget.d.ts.map +1 -0
- package/dist/sync/requester/private-swm-recovery-budget.js +39 -0
- package/dist/sync/requester/private-swm-recovery-budget.js.map +1 -0
- package/dist/sync/requester/private-swm-snapshot-walk-registry.d.ts +44 -0
- package/dist/sync/requester/private-swm-snapshot-walk-registry.d.ts.map +1 -0
- package/dist/sync/requester/private-swm-snapshot-walk-registry.js +96 -0
- package/dist/sync/requester/private-swm-snapshot-walk-registry.js.map +1 -0
- package/dist/sync/requester/shared-memory-sync.d.ts +37 -88
- package/dist/sync/requester/shared-memory-sync.d.ts.map +1 -1
- package/dist/sync/requester/shared-memory-sync.js +352 -226
- package/dist/sync/requester/shared-memory-sync.js.map +1 -1
- package/dist/sync/requester/swm-recovery-apply.d.ts +4 -1
- package/dist/sync/requester/swm-recovery-apply.d.ts.map +1 -1
- package/dist/sync/requester/swm-recovery-apply.js +105 -20
- package/dist/sync/requester/swm-recovery-apply.js.map +1 -1
- package/dist/sync/requester/swm-recovery.d.ts +44 -11
- package/dist/sync/requester/swm-recovery.d.ts.map +1 -1
- package/dist/sync/requester/swm-recovery.js +158 -34
- package/dist/sync/requester/swm-recovery.js.map +1 -1
- package/dist/sync/requester/swm-snapshot-materializer.d.ts +9 -0
- package/dist/sync/requester/swm-snapshot-materializer.d.ts.map +1 -1
- package/dist/sync/requester/swm-snapshot-materializer.js +45 -10
- package/dist/sync/requester/swm-snapshot-materializer.js.map +1 -1
- package/dist/sync/requester/swm-target-executor.d.ts +14 -5
- package/dist/sync/requester/swm-target-executor.d.ts.map +1 -1
- package/dist/sync/requester/swm-target-executor.js +36 -7
- package/dist/sync/requester/swm-target-executor.js.map +1 -1
- package/dist/sync/responder/graph-plan.d.ts +25 -1
- package/dist/sync/responder/graph-plan.d.ts.map +1 -1
- package/dist/sync/responder/graph-plan.js +325 -21
- package/dist/sync/responder/graph-plan.js.map +1 -1
- package/dist/sync/selected-swm-meta-budget.d.ts +11 -0
- package/dist/sync/selected-swm-meta-budget.d.ts.map +1 -1
- package/dist/sync/selected-swm-meta-budget.js +10 -0
- package/dist/sync/selected-swm-meta-budget.js.map +1 -1
- package/dist/sync/selected-swm-meta-fetcher.d.ts +2 -0
- package/dist/sync/selected-swm-meta-fetcher.d.ts.map +1 -1
- package/dist/sync/selected-swm-meta-fetcher.js +87 -73
- package/dist/sync/selected-swm-meta-fetcher.js.map +1 -1
- package/dist/sync/shared-memory-completion.d.ts +27 -0
- package/dist/sync/shared-memory-completion.d.ts.map +1 -0
- package/dist/sync/shared-memory-completion.js +28 -0
- package/dist/sync/shared-memory-completion.js.map +1 -0
- package/dist/sync/shared-memory-diagnostics.d.ts +106 -0
- package/dist/sync/shared-memory-diagnostics.d.ts.map +1 -0
- package/dist/sync/shared-memory-diagnostics.js +170 -0
- package/dist/sync/shared-memory-diagnostics.js.map +1 -0
- package/dist/sync/shared-memory-freshness.d.ts +2 -3
- package/dist/sync/shared-memory-freshness.d.ts.map +1 -1
- package/dist/sync/shared-memory-freshness.js +0 -9
- package/dist/sync/shared-memory-freshness.js.map +1 -1
- package/dist/sync/work-admission.d.ts +38 -0
- package/dist/sync/work-admission.d.ts.map +1 -0
- package/dist/sync/work-admission.js +70 -0
- package/dist/sync/work-admission.js.map +1 -0
- package/dist/unscoped-query-admission.d.ts +17 -0
- package/dist/unscoped-query-admission.d.ts.map +1 -0
- package/dist/unscoped-query-admission.js +69 -0
- package/dist/unscoped-query-admission.js.map +1 -0
- package/dist/unscoped-query-consistency.d.ts +20 -0
- package/dist/unscoped-query-consistency.d.ts.map +1 -0
- package/dist/unscoped-query-consistency.js +45 -0
- package/dist/unscoped-query-consistency.js.map +1 -0
- package/dist/vm-reconcile-dispatcher.d.ts +114 -0
- package/dist/vm-reconcile-dispatcher.d.ts.map +1 -0
- package/dist/vm-reconcile-dispatcher.js +456 -0
- package/dist/vm-reconcile-dispatcher.js.map +1 -0
- package/package.json +28 -9
- package/dist/rfc64/coalescing-supervisor-v1.d.ts +0 -24
- package/dist/rfc64/coalescing-supervisor-v1.d.ts.map +0 -1
- package/dist/rfc64/coalescing-supervisor-v1.js +0 -112
- package/dist/rfc64/coalescing-supervisor-v1.js.map +0 -1
package/README.md
CHANGED
|
@@ -45,6 +45,30 @@ const agents = await agent.findAgents();
|
|
|
45
45
|
const skills = await agent.findSkills({ skillType: 'sentiment-analysis' });
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
## Bounded peer discovery
|
|
49
|
+
|
|
50
|
+
`DiscoveryClient.findAgentPeerPageByAddress(wallet, { limit, afterPeerId?, signal? })`
|
|
51
|
+
requires an integer limit from 1 to `MAX_AGENT_PEER_PAGE_SIZE` (1,024). It returns
|
|
52
|
+
`{ peerIds, nextAfterPeerId }`: peer IDs are unique and ordered, the cursor is
|
|
53
|
+
exclusive, and a null continuation means the query found no further row. The
|
|
54
|
+
query retains at most `limit + 1` rows and does not select optional profile fields.
|
|
55
|
+
The existing `findAgentPeerIdsByAddress(wallet, options?)` remains available as a
|
|
56
|
+
deprecated array-returning facade. It walks bounded pages internally, retaining
|
|
57
|
+
the full result only for callers explicitly using that legacy API.
|
|
58
|
+
|
|
59
|
+
Bounded recovery providers must implement the exported `AgentPeerDiscovery`
|
|
60
|
+
contract. Providers that cannot paginate must reject the lookup; bounded recovery
|
|
61
|
+
reports `lookupFailed` and never substitutes `findAgents()`. This also applies to
|
|
62
|
+
registry discovery during its metadata-refresh fallback. Legacy single-curator
|
|
63
|
+
metadata resolution and callers explicitly using the rich profile API retain
|
|
64
|
+
their existing behavior.
|
|
65
|
+
|
|
66
|
+
A page walk is not a snapshot of a changing registry. Recovery treats tail pages
|
|
67
|
+
as incomplete roster evidence even when a tail page has no continuation. Only a
|
|
68
|
+
fresh first-page query covering the entire bounded roster can support its existing
|
|
69
|
+
absence-proof checks. These local peer IDs do not themselves establish curator
|
|
70
|
+
authority.
|
|
71
|
+
|
|
48
72
|
## Internal Dependencies
|
|
49
73
|
|
|
50
74
|
- `@origintrail-official/dkg-core` — P2P node, crypto, event bus
|
|
@@ -10,13 +10,16 @@ export type ActivePublicContextGraphChainProof = {
|
|
|
10
10
|
detail?: string;
|
|
11
11
|
};
|
|
12
12
|
export type OnChainAccessPolicyState = 0 | 1 | 'unregistered' | 'unknown';
|
|
13
|
-
export type
|
|
14
|
-
slotBindingMode: 'chain-attested-repair';
|
|
15
|
-
}) => Promise<OnChainAccessPolicyState>;
|
|
13
|
+
export type FinalizedOnChainAccessPolicyStateResolver = (contextGraphId: string, operationContext: OperationContext) => Promise<OnChainAccessPolicyState>;
|
|
16
14
|
export type OperationAwareActivePublicChainProofResolver = (contextGraphId: string, operationContext: OperationContext) => Promise<ActivePublicContextGraphChainProof>;
|
|
17
15
|
export type BoundActivePublicChainProofResolver = (operationContext: OperationContext) => Promise<ActivePublicContextGraphChainProof>;
|
|
18
|
-
/**
|
|
19
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Strict metadata-bootstrap proof boundary: owns binding policy, finalized
|
|
18
|
+
* authority-index consistency, RPC classification, and state conversion.
|
|
19
|
+
* Runtime SWM/publish policy gates do not use this resolver and retain fresh
|
|
20
|
+
* current-state reads.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveActivePublicContextGraphChainProof(resolveFinalizedOnChainAccessPolicyState: FinalizedOnChainAccessPolicyStateResolver, contextGraphId: string, operationContext: OperationContext): Promise<ActivePublicContextGraphChainProof>;
|
|
20
23
|
/** Bind one lazy proof promise to one normalized graph for repair + confirmation reuse. */
|
|
21
24
|
export declare function memoizeActivePublicContextGraphChainProof(contextGraphId: string, resolveProof: OperationAwareActivePublicChainProofResolver): BoundActivePublicChainProofResolver;
|
|
22
25
|
//# sourceMappingURL=active-public-context-graph-chain-proof.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"active-public-context-graph-chain-proof.d.ts","sourceRoot":"","sources":["../src/active-public-context-graph-chain-proof.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AA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B,OAAO,CAAC,kCAAkC,CAAC,CAAC;AAEjD;;;;;GAKG;AACH,wBAAsB,yCAAyC,CAC7D,wCAAwC,EAAE,yCAAyC,EACnF,cAAc,EAAE,MAAM,EACtB,gBAAgB,EAAE,gBAAgB,GACjC,OAAO,CAAC,kCAAkC,CAAC,CAoB7C;AAED,2FAA2F;AAC3F,wBAAgB,yCAAyC,CACvD,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,4CAA4C,GACzD,mCAAmC,CAMrC"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Strict metadata-bootstrap proof boundary: owns binding policy, finalized
|
|
4
|
+
* authority-index consistency, RPC classification, and state conversion.
|
|
5
|
+
* Runtime SWM/publish policy gates do not use this resolver and retain fresh
|
|
6
|
+
* current-state reads.
|
|
7
|
+
*/
|
|
8
|
+
export async function resolveActivePublicContextGraphChainProof(resolveFinalizedOnChainAccessPolicyState, contextGraphId, operationContext) {
|
|
4
9
|
let state;
|
|
5
10
|
try {
|
|
6
|
-
state = await
|
|
11
|
+
state = await resolveFinalizedOnChainAccessPolicyState(contextGraphId, operationContext);
|
|
7
12
|
}
|
|
8
13
|
catch (error) {
|
|
9
14
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"active-public-context-graph-chain-proof.js","sourceRoot":"","sources":["../src/active-public-context-graph-chain-proof.ts"],"names":[],"mappings":"AAAA,sCAAsC;
|
|
1
|
+
{"version":3,"file":"active-public-context-graph-chain-proof.js","sourceRoot":"","sources":["../src/active-public-context-graph-chain-proof.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAyBtC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,yCAAyC,CAC7D,wCAAmF,EACnF,cAAsB,EACtB,gBAAkC;IAElC,IAAI,KAA+B,CAAC;IACpC,IAAI,CAAC;QACH,KAAK,GAAG,MAAM,wCAAwC,CACpD,cAAc,EACd,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,aAAa;YACrB,MAAM,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAC/D,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAC5C,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IACnE,IAAI,KAAK,KAAK,cAAc,EAAE,CAAC;QAC7B,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;IACzD,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;AACpD,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,yCAAyC,CACvD,cAAsB,EACtB,YAA0D;IAE1D,IAAI,KAA8D,CAAC;IACnE,OAAO,CAAC,gBAAgB,EAAE,EAAE;QAC1B,KAAK,KAAK,YAAY,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;QACzD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Maximum peer IDs in one wallet-registry page, excluding one lookahead row. */
|
|
2
|
+
export declare const MAX_AGENT_PEER_PAGE_SIZE = 1024;
|
|
3
|
+
export interface AgentPeerPageRequest {
|
|
4
|
+
/** Positive integer, at most MAX_AGENT_PEER_PAGE_SIZE. */
|
|
5
|
+
readonly limit: number;
|
|
6
|
+
/** Exclusive lexical peer-ID cursor; omit for the first page. */
|
|
7
|
+
readonly afterPeerId?: string;
|
|
8
|
+
readonly signal?: AbortSignal;
|
|
9
|
+
}
|
|
10
|
+
export interface AgentPeerPage {
|
|
11
|
+
/** Strictly increasing, duplicate-free peer IDs; at most request.limit. */
|
|
12
|
+
readonly peerIds: readonly string[];
|
|
13
|
+
/** Last returned peer ID when another row exists, otherwise null. */
|
|
14
|
+
readonly nextAfterPeerId: string | null;
|
|
15
|
+
}
|
|
16
|
+
/** Required capability for bounded recovery. Unsupported providers must reject. */
|
|
17
|
+
export interface AgentPeerDiscovery {
|
|
18
|
+
findAgentPeerPageByAddress(agentAddress: string, request: AgentPeerPageRequest): Promise<AgentPeerPage>;
|
|
19
|
+
}
|
|
20
|
+
export declare function validateAgentPeerPageRequest(request: AgentPeerPageRequest): void;
|
|
21
|
+
/** Reject a broken provider contract before treating a page as registry evidence. */
|
|
22
|
+
export declare function validateAgentPeerPage(page: unknown, request: AgentPeerPageRequest): AgentPeerPage;
|
|
23
|
+
export declare function readAgentPeerPage(discovery: AgentPeerDiscovery, agentAddress: string, request: AgentPeerPageRequest): Promise<AgentPeerPage>;
|
|
24
|
+
//# sourceMappingURL=agent-peer-discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-peer-discovery.d.ts","sourceRoot":"","sources":["../src/agent-peer-discovery.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C,MAAM,WAAW,oBAAoB;IACnC,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iEAAiE;IACjE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,MAAM,WAAW,aAAa;IAC5B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,qEAAqE;IACrE,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAED,mFAAmF;AACnF,MAAM,WAAW,kBAAkB;IACjC,0BAA0B,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CACzG;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAQhF;AAED,qFAAqF;AACrF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,oBAAoB,GAAG,aAAa,CA8BjG;AAED,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,kBAAkB,EAC7B,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,aAAa,CAAC,CAKxB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** Maximum peer IDs in one wallet-registry page, excluding one lookahead row. */
|
|
2
|
+
export const MAX_AGENT_PEER_PAGE_SIZE = 1024;
|
|
3
|
+
export function validateAgentPeerPageRequest(request) {
|
|
4
|
+
if (!Number.isSafeInteger(request.limit) || request.limit < 1 || request.limit > MAX_AGENT_PEER_PAGE_SIZE) {
|
|
5
|
+
throw new RangeError(`Peer page limit must be an integer from 1 to ${MAX_AGENT_PEER_PAGE_SIZE}`);
|
|
6
|
+
}
|
|
7
|
+
if (request.afterPeerId !== undefined && (typeof request.afterPeerId !== 'string' || request.afterPeerId.length === 0)) {
|
|
8
|
+
throw new TypeError('Peer page cursor must be a nonempty string');
|
|
9
|
+
}
|
|
10
|
+
request.signal?.throwIfAborted();
|
|
11
|
+
}
|
|
12
|
+
/** Reject a broken provider contract before treating a page as registry evidence. */
|
|
13
|
+
export function validateAgentPeerPage(page, request) {
|
|
14
|
+
if (page === null || typeof page !== 'object' || Array.isArray(page)) {
|
|
15
|
+
throw new TypeError('Peer discovery returned an invalid page');
|
|
16
|
+
}
|
|
17
|
+
const { peerIds: rawPeerIds, nextAfterPeerId } = page;
|
|
18
|
+
if (!Array.isArray(rawPeerIds)) {
|
|
19
|
+
throw new Error('Peer discovery exceeded its page bound');
|
|
20
|
+
}
|
|
21
|
+
const peerCount = rawPeerIds.length;
|
|
22
|
+
if (!Number.isSafeInteger(peerCount) || peerCount < 0 || peerCount > request.limit) {
|
|
23
|
+
throw new Error('Peer discovery exceeded its page bound');
|
|
24
|
+
}
|
|
25
|
+
if (nextAfterPeerId !== null && typeof nextAfterPeerId !== 'string') {
|
|
26
|
+
throw new TypeError('Peer discovery returned an invalid continuation');
|
|
27
|
+
}
|
|
28
|
+
const peerIds = [];
|
|
29
|
+
let previous = request.afterPeerId;
|
|
30
|
+
for (let index = 0; index < peerCount; index++) {
|
|
31
|
+
const peerId = rawPeerIds[index];
|
|
32
|
+
if (typeof peerId !== 'string' || peerId.length === 0 || (previous !== undefined && peerId <= previous)) {
|
|
33
|
+
throw new Error('Peer discovery returned a non-monotonic page');
|
|
34
|
+
}
|
|
35
|
+
peerIds.push(peerId);
|
|
36
|
+
previous = peerId;
|
|
37
|
+
}
|
|
38
|
+
if (nextAfterPeerId !== null && (peerIds.length !== request.limit || nextAfterPeerId !== previous)) {
|
|
39
|
+
throw new Error('Peer discovery returned an invalid continuation');
|
|
40
|
+
}
|
|
41
|
+
request.signal?.throwIfAborted();
|
|
42
|
+
return { peerIds, nextAfterPeerId };
|
|
43
|
+
}
|
|
44
|
+
export async function readAgentPeerPage(discovery, agentAddress, request) {
|
|
45
|
+
const boundedRequest = Object.freeze({ ...request });
|
|
46
|
+
validateAgentPeerPageRequest(boundedRequest);
|
|
47
|
+
const page = await discovery.findAgentPeerPageByAddress(agentAddress, boundedRequest);
|
|
48
|
+
return validateAgentPeerPage(page, boundedRequest);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=agent-peer-discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-peer-discovery.js","sourceRoot":"","sources":["../src/agent-peer-discovery.ts"],"names":[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AC,CAAC;IAC7C,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,0BAA0B,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IACtF,OAAO,qBAAqB,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ContextGraphAuthorityIndexBootstrap } from '@origintrail-official/dkg-chain';
|
|
2
|
+
import { type AuthorityIndexSnapshotPlan } from './authority-index-config.js';
|
|
3
|
+
export interface AuthorityIndexBootstrapLog {
|
|
4
|
+
readonly info: (message: string) => void;
|
|
5
|
+
readonly warn: (message: string) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The chain index bootstrap for a snapshot plan. Operator trust fails closed
|
|
9
|
+
* exactly as configured; only the network-relay default degrades to the
|
|
10
|
+
* local-history scan, and it reports that and the scan's progress.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createAuthorityIndexBootstrap(plan: AuthorityIndexSnapshotPlan, fetchSnapshot: ContextGraphAuthorityIndexBootstrap['fetchSnapshot'], log: AuthorityIndexBootstrapLog): ContextGraphAuthorityIndexBootstrap;
|
|
13
|
+
//# sourceMappingURL=authority-index-bootstrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authority-index-bootstrap.d.ts","sourceRoot":"","sources":["../src/authority-index-bootstrap.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,EAA6B,KAAK,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAIzG,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,0BAA0B,EAChC,aAAa,EAAE,mCAAmC,CAAC,eAAe,CAAC,EACnE,GAAG,EAAE,0BAA0B,GAC9B,mCAAmC,CAgBrC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
import { authorityIndexTrustDomain } from './authority-index-config.js';
|
|
3
|
+
const SCAN_PROGRESS_LOG_INTERVAL_MS = 30_000;
|
|
4
|
+
/**
|
|
5
|
+
* The chain index bootstrap for a snapshot plan. Operator trust fails closed
|
|
6
|
+
* exactly as configured; only the network-relay default degrades to the
|
|
7
|
+
* local-history scan, and it reports that and the scan's progress.
|
|
8
|
+
*/
|
|
9
|
+
export function createAuthorityIndexBootstrap(plan, fetchSnapshot, log) {
|
|
10
|
+
const bootstrap = {
|
|
11
|
+
maxTailBlocks: plan.config.maxTailBlocks,
|
|
12
|
+
trustDomain: authorityIndexTrustDomain(plan.config),
|
|
13
|
+
fetchSnapshot,
|
|
14
|
+
};
|
|
15
|
+
if (plan.source === 'operator')
|
|
16
|
+
return bootstrap;
|
|
17
|
+
return {
|
|
18
|
+
...bootstrap,
|
|
19
|
+
// No relay may answer; the edge must still bind graphs.
|
|
20
|
+
localHistoryFallback: true,
|
|
21
|
+
onLocalHistoryFallback: ({ scope, reason }) => log.warn(`[authority-index] no network relay supplied a snapshot for ${scope}; falling back to local history: ${reason}`),
|
|
22
|
+
onScanProgress: createScanProgressLogger(log.info),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** One line per scope per 30 s: a mainnet history scan pages for many minutes. */
|
|
26
|
+
function createScanProgressLogger(info) {
|
|
27
|
+
const lastLoggedAt = new Map();
|
|
28
|
+
return (progress) => {
|
|
29
|
+
const at = Date.now();
|
|
30
|
+
const last = lastLoggedAt.get(progress.scope);
|
|
31
|
+
if (last !== undefined && at - last < SCAN_PROGRESS_LOG_INTERVAL_MS)
|
|
32
|
+
return;
|
|
33
|
+
lastLoggedAt.set(progress.scope, at);
|
|
34
|
+
info(`[authority-index] scope=${progress.scope} scanned=${progress.scannedBlocks} `
|
|
35
|
+
+ `through=${progress.throughBlockNumber} behind=${progress.finalizedNumber - progress.throughBlockNumber}`);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=authority-index-bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authority-index-bootstrap.js","sourceRoot":"","sources":["../src/authority-index-bootstrap.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAGtC,OAAO,EAAE,yBAAyB,EAAmC,MAAM,6BAA6B,CAAC;AAEzG,MAAM,6BAA6B,GAAG,MAAM,CAAC;AAO7C;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAC3C,IAAgC,EAChC,aAAmE,EACnE,GAA+B;IAE/B,MAAM,SAAS,GAAG;QAChB,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa;QACxC,WAAW,EAAE,yBAAyB,CAAC,IAAI,CAAC,MAAM,CAAC;QACnD,aAAa;KACd,CAAC;IACF,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU;QAAE,OAAO,SAAS,CAAC;IACjD,OAAO;QACL,GAAG,SAAS;QACZ,wDAAwD;QACxD,oBAAoB,EAAE,IAAI;QAC1B,sBAAsB,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CACrD,8DAA8D,KAAK,oCAAoC,MAAM,EAAE,CAChH;QACD,cAAc,EAAE,wBAAwB,CAAC,GAAG,CAAC,IAAI,CAAC;KACnD,CAAC;AACJ,CAAC;AAED,kFAAkF;AAClF,SAAS,wBAAwB,CAC/B,IAA+B;IAE/B,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC/C,OAAO,CAAC,QAAQ,EAAE,EAAE;QAClB,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACtB,MAAM,IAAI,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC9C,IAAI,IAAI,KAAK,SAAS,IAAI,EAAE,GAAG,IAAI,GAAG,6BAA6B;YAAE,OAAO;QAC5E,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACrC,IAAI,CAAC,2BAA2B,QAAQ,CAAC,KAAK,YAAY,QAAQ,CAAC,aAAa,GAAG;cAC/E,WAAW,QAAQ,CAAC,kBAAkB,WAAW,QAAQ,CAAC,eAAe,GAAG,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACjH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type NormalizedAuthorityIndexSnapshotConfig } from './authority-index-snapshot-service.js';
|
|
2
|
+
/** Explicit trust in the history supplied by these core PeerIDs. */
|
|
3
|
+
export interface AuthorityIndexConfig {
|
|
4
|
+
mode: 'core-snapshot';
|
|
5
|
+
trustedCorePeers: readonly string[];
|
|
6
|
+
maxTailBlocks?: number;
|
|
7
|
+
/** Increment to discard cached trusted history while keeping the same peers. */
|
|
8
|
+
cacheEpoch?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface ResolvedAuthorityIndexConfig extends AuthorityIndexConfig {
|
|
11
|
+
readonly maxTailBlocks: number;
|
|
12
|
+
readonly cacheEpoch: number;
|
|
13
|
+
/** Canonical identities retained for transport and persistence namespacing. */
|
|
14
|
+
readonly snapshot: NormalizedAuthorityIndexSnapshotConfig;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* `nodeRole` is required: this resolver's job includes rejecting cores, so a
|
|
18
|
+
* default would silently opt an embedder's unlabelled core out of that rule.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveAuthorityIndexConfig(config: unknown, nodeRole: 'core' | 'edge'): ResolvedAuthorityIndexConfig | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The persistence namespace of a trust set: its sorted PeerIDs, so moving a
|
|
23
|
+
* core to a new address keeps its imported prefix. Epoch zero preserves the
|
|
24
|
+
* original namespace; increasing it lets an operator discard a suspect
|
|
25
|
+
* imported prefix without changing peers.
|
|
26
|
+
*/
|
|
27
|
+
export declare function authorityIndexTrustDomain(config: ResolvedAuthorityIndexConfig): string;
|
|
28
|
+
/** The agent config fields that decide authority-index bootstrap; `DKGAgentConfig` satisfies it. */
|
|
29
|
+
export interface AuthorityIndexBootstrapInput {
|
|
30
|
+
/** The operator's `authorityIndex` block, raw or already resolved. */
|
|
31
|
+
readonly authorityIndex?: unknown;
|
|
32
|
+
readonly nodeRole?: 'core' | 'edge';
|
|
33
|
+
readonly chainAdapter?: unknown;
|
|
34
|
+
readonly chainConfig?: {
|
|
35
|
+
readonly operationalKeys?: readonly string[];
|
|
36
|
+
};
|
|
37
|
+
readonly localContextGraphAuthorityIndexStore?: unknown;
|
|
38
|
+
/** The network file's relay multiaddrs; see `DKGAgentConfig.networkRelays`. */
|
|
39
|
+
readonly networkRelays?: readonly string[];
|
|
40
|
+
}
|
|
41
|
+
export type AuthorityIndexBootstrapPlan = {
|
|
42
|
+
/** The operator's `authorityIndex` block: its pinned cores, failing closed. */
|
|
43
|
+
readonly source: 'operator';
|
|
44
|
+
readonly config: ResolvedAuthorityIndexConfig;
|
|
45
|
+
} | {
|
|
46
|
+
/**
|
|
47
|
+
* The edge default: the network file's relays, each pinned by the PeerID
|
|
48
|
+
* in its multiaddr, falling back to local history when none answers.
|
|
49
|
+
*/
|
|
50
|
+
readonly source: 'network-relays';
|
|
51
|
+
readonly config: ResolvedAuthorityIndexConfig;
|
|
52
|
+
} | {
|
|
53
|
+
/** No snapshot bootstrap: the index is scanned from chain history. */
|
|
54
|
+
readonly source: 'local-history';
|
|
55
|
+
readonly config?: undefined;
|
|
56
|
+
/** Why an edge without operator config does not seed from the network relays. */
|
|
57
|
+
readonly skipReason?: string;
|
|
58
|
+
};
|
|
59
|
+
/** A plan that seeds the index from trusted snapshots. */
|
|
60
|
+
export type AuthorityIndexSnapshotPlan = Exclude<AuthorityIndexBootstrapPlan, {
|
|
61
|
+
readonly source: 'local-history';
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* How an agent builds its authority index. The daemon plans from the config it
|
|
65
|
+
* hands `DKGAgent.create`, which plans again from the same config, so the
|
|
66
|
+
* startup line always describes the policy the agent runs.
|
|
67
|
+
*
|
|
68
|
+
* Operator config always wins and is never downgraded: without the agent's
|
|
69
|
+
* core-snapshot prerequisites it throws. An edge without operator config
|
|
70
|
+
* seeds from the network file's relays and falls back to local history. Only
|
|
71
|
+
* those relays are trusted: agent-registry profiles are unauthenticated
|
|
72
|
+
* gossip, and nothing binds a profile's PeerID to the staked identity it
|
|
73
|
+
* names. A core indexes its own chain history.
|
|
74
|
+
*/
|
|
75
|
+
export declare function planAuthorityIndexBootstrap(input: AuthorityIndexBootstrapInput): AuthorityIndexBootstrapPlan;
|
|
76
|
+
//# sourceMappingURL=authority-index-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authority-index-config.d.ts","sourceRoot":"","sources":["../src/authority-index-config.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,sCAAsC,EAC5C,MAAM,uCAAuC,CAAC;AAI/C,oEAAoE;AACpE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,eAAe,CAAC;IACtB,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gFAAgF;IAChF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,4BAA6B,SAAQ,oBAAoB;IACxE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,EAAE,sCAAsC,CAAC;CAC3D;AAED;;;GAGG;AACH,w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AC,CAAC;AAEpH;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,4BAA4B,GAAG,2BAA2B,CAkB5G"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { AUTHORITY_INDEX_SNAPSHOT_MAX_TRUSTED_PEERS, normalizeAuthorityIndexSnapshotConfig, } from './authority-index-snapshot-service.js';
|
|
4
|
+
const resolvedConfigs = new WeakSet();
|
|
5
|
+
/**
|
|
6
|
+
* `nodeRole` is required: this resolver's job includes rejecting cores, so a
|
|
7
|
+
* default would silently opt an embedder's unlabelled core out of that rule.
|
|
8
|
+
*/
|
|
9
|
+
export function resolveAuthorityIndexConfig(config, nodeRole) {
|
|
10
|
+
if (config === undefined)
|
|
11
|
+
return undefined;
|
|
12
|
+
if (config === null || typeof config !== 'object' || Array.isArray(config)) {
|
|
13
|
+
throw new TypeError('authorityIndex must be an object');
|
|
14
|
+
}
|
|
15
|
+
const allowedKeys = new Set(['mode', 'trustedCorePeers', 'maxTailBlocks', 'cacheEpoch']);
|
|
16
|
+
const unknownKeys = Object.keys(config).filter((key) => !allowedKeys.has(key));
|
|
17
|
+
if (unknownKeys.length > 0) {
|
|
18
|
+
throw new TypeError(`Unknown authorityIndex option(s): ${unknownKeys.join(', ')}. `
|
|
19
|
+
+ 'Supported options: mode, trustedCorePeers, maxTailBlocks, cacheEpoch');
|
|
20
|
+
}
|
|
21
|
+
const value = config;
|
|
22
|
+
const cacheEpoch = value.cacheEpoch === undefined ? 0 : value.cacheEpoch;
|
|
23
|
+
if (!Number.isSafeInteger(cacheEpoch) || cacheEpoch < 0) {
|
|
24
|
+
throw new TypeError('authorityIndex.cacheEpoch must be a non-negative safe integer');
|
|
25
|
+
}
|
|
26
|
+
if (value.mode !== 'core-snapshot') {
|
|
27
|
+
throw new TypeError('authorityIndex.mode must be core-snapshot');
|
|
28
|
+
}
|
|
29
|
+
if (nodeRole !== 'edge') {
|
|
30
|
+
throw new TypeError('authorityIndex core-snapshot mode is only supported on edge nodes');
|
|
31
|
+
}
|
|
32
|
+
// The daemon validates before allocating resources, then passes this same
|
|
33
|
+
// immutable value to DKGAgent.create. Only our own objects bypass re-parsing.
|
|
34
|
+
if (resolvedConfigs.has(config))
|
|
35
|
+
return config;
|
|
36
|
+
try {
|
|
37
|
+
const normalized = normalizeAuthorityIndexSnapshotConfig(value);
|
|
38
|
+
const resolved = {
|
|
39
|
+
mode: 'core-snapshot',
|
|
40
|
+
trustedCorePeers: Object.freeze(normalized.trustedCorePeers.map((peer) => peer.multiaddr)),
|
|
41
|
+
maxTailBlocks: normalized.maxTailBlocks,
|
|
42
|
+
cacheEpoch,
|
|
43
|
+
snapshot: normalized,
|
|
44
|
+
};
|
|
45
|
+
// Persisted config keeps its public wire shape; parsed runtime metadata must
|
|
46
|
+
// not become an unknown field when a caller serializes a resolved config.
|
|
47
|
+
Object.defineProperty(resolved, 'snapshot', { enumerable: false });
|
|
48
|
+
Object.freeze(resolved);
|
|
49
|
+
resolvedConfigs.add(resolved);
|
|
50
|
+
return resolved;
|
|
51
|
+
}
|
|
52
|
+
catch (cause) {
|
|
53
|
+
throw new TypeError(`authorityIndex: ${cause instanceof Error ? cause.message : String(cause)}`, { cause });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The persistence namespace of a trust set: its sorted PeerIDs, so moving a
|
|
58
|
+
* core to a new address keeps its imported prefix. Epoch zero preserves the
|
|
59
|
+
* original namespace; increasing it lets an operator discard a suspect
|
|
60
|
+
* imported prefix without changing peers.
|
|
61
|
+
*/
|
|
62
|
+
export function authorityIndexTrustDomain(config) {
|
|
63
|
+
const peerIds = config.snapshot.trustedCorePeers.map((peer) => peer.peerId).sort();
|
|
64
|
+
return createHash('sha256').update(JSON.stringify(config.cacheEpoch === 0 ? peerIds : { trustedCorePeers: peerIds, cacheEpoch: config.cacheEpoch })).digest('hex');
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* How an agent builds its authority index. The daemon plans from the config it
|
|
68
|
+
* hands `DKGAgent.create`, which plans again from the same config, so the
|
|
69
|
+
* startup line always describes the policy the agent runs.
|
|
70
|
+
*
|
|
71
|
+
* Operator config always wins and is never downgraded: without the agent's
|
|
72
|
+
* core-snapshot prerequisites it throws. An edge without operator config
|
|
73
|
+
* seeds from the network file's relays and falls back to local history. Only
|
|
74
|
+
* those relays are trusted: agent-registry profiles are unauthenticated
|
|
75
|
+
* gossip, and nothing binds a profile's PeerID to the staked identity it
|
|
76
|
+
* names. A core indexes its own chain history.
|
|
77
|
+
*/
|
|
78
|
+
export function planAuthorityIndexBootstrap(input) {
|
|
79
|
+
const nodeRole = input.nodeRole ?? 'edge';
|
|
80
|
+
const operatorConfig = resolveAuthorityIndexConfig(input.authorityIndex, nodeRole);
|
|
81
|
+
const unmet = unmetCoreSnapshotPrerequisite(input);
|
|
82
|
+
if (operatorConfig !== undefined) {
|
|
83
|
+
if (unmet !== undefined) {
|
|
84
|
+
throw new TypeError('authorityIndex core-snapshot mode requires a configured EVM chain and a local authority index store');
|
|
85
|
+
}
|
|
86
|
+
return Object.freeze({ source: 'operator', config: operatorConfig });
|
|
87
|
+
}
|
|
88
|
+
if (nodeRole !== 'edge')
|
|
89
|
+
return Object.freeze({ source: 'local-history' });
|
|
90
|
+
if (unmet !== undefined)
|
|
91
|
+
return Object.freeze({ source: 'local-history', skipReason: unmet });
|
|
92
|
+
const relays = pinnableNetworkRelays(input.networkRelays ?? []);
|
|
93
|
+
if (relays.length === 0) {
|
|
94
|
+
return Object.freeze({ source: 'local-history', skipReason: 'no network relay is available to seed from' });
|
|
95
|
+
}
|
|
96
|
+
const relayConfig = resolveAuthorityIndexConfig({ mode: 'core-snapshot', trustedCorePeers: relays }, 'edge');
|
|
97
|
+
return Object.freeze({ source: 'network-relays', config: relayConfig });
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Core-snapshot mode needs the agent to construct its own EVM adapter, so it
|
|
101
|
+
* installs the snapshot transport and trust namespace together, with
|
|
102
|
+
* operational keys and a durable local index store.
|
|
103
|
+
*/
|
|
104
|
+
function unmetCoreSnapshotPrerequisite(input) {
|
|
105
|
+
if (input.chainAdapter !== undefined) {
|
|
106
|
+
return 'the chain adapter is injected (such as the mock chain), not a configured EVM chain';
|
|
107
|
+
}
|
|
108
|
+
if (input.chainConfig === undefined)
|
|
109
|
+
return 'no EVM chain is configured';
|
|
110
|
+
if (!input.chainConfig.operationalKeys?.length)
|
|
111
|
+
return 'no operational key is configured';
|
|
112
|
+
if (input.localContextGraphAuthorityIndexStore === undefined) {
|
|
113
|
+
return 'no local authority index store is available';
|
|
114
|
+
}
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The network relays an explicit `trustedCorePeers` entry could name: first
|
|
119
|
+
* address per PeerID, at most eight. A network file may still list
|
|
120
|
+
* placeholder PeerIDs, which never become trust.
|
|
121
|
+
*/
|
|
122
|
+
function pinnableNetworkRelays(relays) {
|
|
123
|
+
const peerIds = new Set();
|
|
124
|
+
const pinnable = [];
|
|
125
|
+
for (const relay of relays) {
|
|
126
|
+
if (pinnable.length === AUTHORITY_INDEX_SNAPSHOT_MAX_TRUSTED_PEERS)
|
|
127
|
+
break;
|
|
128
|
+
let peerId;
|
|
129
|
+
try {
|
|
130
|
+
[{ peerId }] = normalizeAuthorityIndexSnapshotConfig({ trustedCorePeers: [relay] }).trustedCorePeers;
|
|
131
|
+
}
|
|
132
|
+
catch {
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
if (peerIds.has(peerId))
|
|
136
|
+
continue;
|
|
137
|
+
peerIds.add(peerId);
|
|
138
|
+
pinnable.push(relay);
|
|
139
|
+
}
|
|
140
|
+
return pinnable;
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=authority-index-config.js.map
|
|
@@ -0,0 +1 @@
|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I,MAAc,CAAC;QACnB,IAAI,CAAC;YACH,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,qCAAqC,CAAC,EAAE,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,gBAAgB,CAAC;QACvG,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;QACD,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,SAAS;QAClC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ContextGraphAuthorityIndexSnapshotRequest } from '@origintrail-official/dkg-chain';
|
|
2
|
+
import { type AuthorityIndexSnapshotConfig, type AuthorityIndexSnapshotPeer, type NormalizedAuthorityIndexSnapshotConfig } from './authority-index-snapshot-config.js';
|
|
3
|
+
import { type Status } from './authority-index-snapshot-wire.js';
|
|
4
|
+
export interface AuthorityIndexSnapshotTransportOptions {
|
|
5
|
+
readonly signal: AbortSignal;
|
|
6
|
+
readonly timeoutMs: number;
|
|
7
|
+
readonly maxReadBytes: number;
|
|
8
|
+
readonly payloadReuse: 'single-use';
|
|
9
|
+
}
|
|
10
|
+
export type AuthorityIndexSnapshotClientOptions = ({
|
|
11
|
+
readonly config: AuthorityIndexSnapshotConfig;
|
|
12
|
+
readonly normalizedConfig?: never;
|
|
13
|
+
} | {
|
|
14
|
+
readonly normalizedConfig: NormalizedAuthorityIndexSnapshotConfig;
|
|
15
|
+
readonly config?: never;
|
|
16
|
+
}) & {
|
|
17
|
+
/**
|
|
18
|
+
* Prime peer.multiaddr, then call ProtocolRouter.send(peer.peerId, protocol, ...).
|
|
19
|
+
* The router's authenticated Noise connection binds the response to that exact
|
|
20
|
+
* configured PeerID. Never implement this callback with a response-claimed ID.
|
|
21
|
+
* Pass the complete options object: single-use bypasses pooled buffering and
|
|
22
|
+
* maxReadBytes aborts the response stream before its wire budget is exceeded.
|
|
23
|
+
*/
|
|
24
|
+
readonly request: (peer: AuthorityIndexSnapshotPeer, bytes: Uint8Array, options: AuthorityIndexSnapshotTransportOptions) => Promise<Uint8Array>;
|
|
25
|
+
readonly timeoutMs?: number;
|
|
26
|
+
/** One peer walk, including chain admission, never gets more than 30 seconds. */
|
|
27
|
+
readonly overallTimeoutMs?: number;
|
|
28
|
+
};
|
|
29
|
+
export declare class AuthorityIndexSnapshotUnavailableError extends AggregateError {
|
|
30
|
+
readonly code = "AUTHORITY_INDEX_SNAPSHOT_UNAVAILABLE";
|
|
31
|
+
constructor(errors: readonly unknown[]);
|
|
32
|
+
}
|
|
33
|
+
export declare class AuthorityIndexSnapshotPeerStatusError extends Error {
|
|
34
|
+
readonly peerId: string;
|
|
35
|
+
readonly status: Status;
|
|
36
|
+
constructor(peerId: string, status: Status);
|
|
37
|
+
}
|
|
38
|
+
/** Ordered, bounded failover; no discovery, multicast, or durable message outbox. */
|
|
39
|
+
export declare function createAuthorityIndexSnapshotClient(options: AuthorityIndexSnapshotClientOptions): {
|
|
40
|
+
fetchSnapshot(request: ContextGraphAuthorityIndexSnapshotRequest, signal?: AbortSignal, validateSnapshot?: (snapshot: unknown, signal?: AbortSignal) => Promise<void>): Promise<unknown>;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=authority-index-snapshot-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authority-index-snapshot-client.d.ts","sourceRoot":"","sources":["../src/authority-index-snapshot-client.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,yCAAyC,EAC/C,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,sCAAsC,EAC5C,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAUL,KAAK,MAAM,EACZ,MAAM,oCAA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