@origintrail-official/dkg-agent 10.0.19 → 10.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/approved-private-replica.d.ts +54 -0
- package/dist/approved-private-replica.d.ts.map +1 -0
- package/dist/approved-private-replica.js +148 -0
- package/dist/approved-private-replica.js.map +1 -0
- package/dist/bounded-operation.d.ts +2 -0
- package/dist/bounded-operation.d.ts.map +1 -1
- package/dist/bounded-operation.js +5 -0
- package/dist/bounded-operation.js.map +1 -1
- package/dist/chain-finality-confirmations-v1.d.ts +7 -0
- package/dist/chain-finality-confirmations-v1.d.ts.map +1 -0
- package/dist/chain-finality-confirmations-v1.js +9 -0
- package/dist/chain-finality-confirmations-v1.js.map +1 -0
- package/dist/chain-reconciler.d.ts +23 -0
- package/dist/chain-reconciler.d.ts.map +1 -1
- package/dist/chain-reconciler.js +35 -0
- package/dist/chain-reconciler.js.map +1 -1
- package/dist/confirmed-graph-scoped-vm-resolver.d.ts +7 -1
- package/dist/confirmed-graph-scoped-vm-resolver.d.ts.map +1 -1
- package/dist/confirmed-graph-scoped-vm-resolver.js +5 -3
- package/dist/confirmed-graph-scoped-vm-resolver.js.map +1 -1
- package/dist/context-graph-authority-dependency.d.ts +11 -0
- package/dist/context-graph-authority-dependency.d.ts.map +1 -0
- package/dist/context-graph-authority-dependency.js +50 -0
- package/dist/context-graph-authority-dependency.js.map +1 -0
- package/dist/context-graph-binding-state.d.ts +6 -0
- package/dist/context-graph-binding-state.d.ts.map +1 -1
- package/dist/context-graph-binding-state.js +17 -10
- package/dist/context-graph-binding-state.js.map +1 -1
- package/dist/context-graph-claim-proof.d.ts +74 -0
- package/dist/context-graph-claim-proof.d.ts.map +1 -0
- package/dist/context-graph-claim-proof.js +137 -0
- package/dist/context-graph-claim-proof.js.map +1 -0
- package/dist/context-graph-member-proof.d.ts +33 -0
- package/dist/context-graph-member-proof.d.ts.map +1 -0
- package/dist/context-graph-member-proof.js +142 -0
- package/dist/context-graph-member-proof.js.map +1 -0
- package/dist/context-graph-membership-persist-scheduler.d.ts +7 -23
- package/dist/context-graph-membership-persist-scheduler.d.ts.map +1 -1
- package/dist/context-graph-membership-persist-scheduler.js +12 -88
- package/dist/context-graph-membership-persist-scheduler.js.map +1 -1
- package/dist/context-graph-meta-confirmation.d.ts +22 -2
- package/dist/context-graph-meta-confirmation.d.ts.map +1 -1
- package/dist/context-graph-meta-confirmation.js +54 -23
- package/dist/context-graph-meta-confirmation.js.map +1 -1
- package/dist/context-graph-meta-projection.d.ts +13 -2
- package/dist/context-graph-meta-projection.d.ts.map +1 -1
- package/dist/context-graph-meta-projection.js +61 -24
- package/dist/context-graph-meta-projection.js.map +1 -1
- package/dist/context-graph-metadata-relocation.d.ts +18 -30
- package/dist/context-graph-metadata-relocation.d.ts.map +1 -1
- package/dist/context-graph-metadata-relocation.js +32 -2
- package/dist/context-graph-metadata-relocation.js.map +1 -1
- package/dist/context-graph-private-meta-proof.d.ts +8 -9
- package/dist/context-graph-private-meta-proof.d.ts.map +1 -1
- package/dist/context-graph-private-meta-proof.js +25 -89
- package/dist/context-graph-private-meta-proof.js.map +1 -1
- package/dist/context-graph-public-meta-proof.d.ts +11 -1
- package/dist/context-graph-public-meta-proof.d.ts.map +1 -1
- package/dist/context-graph-public-meta-proof.js +23 -3
- package/dist/context-graph-public-meta-proof.js.map +1 -1
- package/dist/context-graph-read-authority.d.ts +30 -3
- package/dist/context-graph-read-authority.d.ts.map +1 -1
- package/dist/context-graph-read-authority.js +62 -18
- package/dist/context-graph-read-authority.js.map +1 -1
- package/dist/context-graph-storage-discovery.d.ts +14 -4
- package/dist/context-graph-storage-discovery.d.ts.map +1 -1
- package/dist/context-graph-storage-discovery.js +27 -7
- package/dist/context-graph-storage-discovery.js.map +1 -1
- package/dist/context-graph-subscription-authority-recovery.d.ts +7 -0
- package/dist/context-graph-subscription-authority-recovery.d.ts.map +1 -1
- package/dist/context-graph-subscription-authority-recovery.js +1 -0
- package/dist/context-graph-subscription-authority-recovery.js.map +1 -1
- package/dist/context-graph-subscription-persist-scheduler.d.ts +52 -0
- package/dist/context-graph-subscription-persist-scheduler.d.ts.map +1 -0
- package/dist/context-graph-subscription-persist-scheduler.js +78 -0
- package/dist/context-graph-subscription-persist-scheduler.js.map +1 -0
- package/dist/curator-dial-address.d.ts +16 -0
- package/dist/curator-dial-address.d.ts.map +1 -0
- package/dist/curator-dial-address.js +58 -0
- package/dist/curator-dial-address.js.map +1 -0
- package/dist/curator-meta-refresh.d.ts +18 -4
- package/dist/curator-meta-refresh.d.ts.map +1 -1
- package/dist/curator-meta-refresh.js +61 -58
- package/dist/curator-meta-refresh.js.map +1 -1
- package/dist/curator-peer-connection.d.ts +21 -0
- package/dist/curator-peer-connection.d.ts.map +1 -0
- package/dist/curator-peer-connection.js +41 -0
- package/dist/curator-peer-connection.js.map +1 -0
- package/dist/dkg-agent-agents-phonebook.d.ts +41 -0
- package/dist/dkg-agent-agents-phonebook.d.ts.map +1 -0
- package/dist/dkg-agent-agents-phonebook.js +155 -0
- package/dist/dkg-agent-agents-phonebook.js.map +1 -0
- package/dist/dkg-agent-base.d.ts +162 -24
- package/dist/dkg-agent-base.d.ts.map +1 -1
- package/dist/dkg-agent-base.js +175 -147
- package/dist/dkg-agent-base.js.map +1 -1
- package/dist/dkg-agent-cg-chain-observation.d.ts +6 -1
- package/dist/dkg-agent-cg-chain-observation.d.ts.map +1 -1
- package/dist/dkg-agent-cg-chain-observation.js +20 -5
- package/dist/dkg-agent-cg-chain-observation.js.map +1 -1
- package/dist/dkg-agent-cg-name-resolution.d.ts +38 -2
- package/dist/dkg-agent-cg-name-resolution.d.ts.map +1 -1
- package/dist/dkg-agent-cg-name-resolution.js +100 -8
- package/dist/dkg-agent-cg-name-resolution.js.map +1 -1
- package/dist/dkg-agent-cg-registry.d.ts +43 -3
- package/dist/dkg-agent-cg-registry.d.ts.map +1 -1
- package/dist/dkg-agent-cg-registry.js +267 -129
- package/dist/dkg-agent-cg-registry.js.map +1 -1
- package/dist/dkg-agent-cg-resolve.d.ts +6 -4
- package/dist/dkg-agent-cg-resolve.d.ts.map +1 -1
- package/dist/dkg-agent-cg-resolve.js +40 -18
- package/dist/dkg-agent-cg-resolve.js.map +1 -1
- package/dist/dkg-agent-constants.d.ts +10 -2
- package/dist/dkg-agent-constants.d.ts.map +1 -1
- package/dist/dkg-agent-constants.js +10 -2
- 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 +1 -5
- package/dist/dkg-agent-context-graph.js.map +1 -1
- package/dist/dkg-agent-crypto.d.ts +128 -21
- package/dist/dkg-agent-crypto.d.ts.map +1 -1
- package/dist/dkg-agent-crypto.js +824 -176
- 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 +4 -3
- package/dist/dkg-agent-diagnostics.js.map +1 -1
- package/dist/dkg-agent-helpers.d.ts +2 -2
- package/dist/dkg-agent-helpers.d.ts.map +1 -1
- package/dist/dkg-agent-helpers.js +3 -3
- package/dist/dkg-agent-helpers.js.map +1 -1
- package/dist/dkg-agent-join.d.ts +12 -1
- package/dist/dkg-agent-join.d.ts.map +1 -1
- package/dist/dkg-agent-join.js +80 -92
- package/dist/dkg-agent-join.js.map +1 -1
- package/dist/dkg-agent-lifecycle.d.ts +129 -22
- package/dist/dkg-agent-lifecycle.d.ts.map +1 -1
- package/dist/dkg-agent-lifecycle.js +690 -211
- package/dist/dkg-agent-lifecycle.js.map +1 -1
- package/dist/dkg-agent-publish.d.ts +33 -40
- package/dist/dkg-agent-publish.d.ts.map +1 -1
- package/dist/dkg-agent-publish.js +194 -281
- package/dist/dkg-agent-publish.js.map +1 -1
- package/dist/dkg-agent-query.d.ts +7 -0
- package/dist/dkg-agent-query.d.ts.map +1 -1
- package/dist/dkg-agent-query.js +102 -86
- package/dist/dkg-agent-query.js.map +1 -1
- package/dist/dkg-agent-registered-private-empty-vm.d.ts +70 -0
- package/dist/dkg-agent-registered-private-empty-vm.d.ts.map +1 -0
- package/dist/dkg-agent-registered-private-empty-vm.js +133 -0
- package/dist/dkg-agent-registered-private-empty-vm.js.map +1 -0
- package/dist/dkg-agent-rfc64-catalog-auto-publish.d.ts +8 -3
- package/dist/dkg-agent-rfc64-catalog-auto-publish.d.ts.map +1 -1
- package/dist/dkg-agent-rfc64-catalog-auto-publish.js +45 -51
- package/dist/dkg-agent-rfc64-catalog-auto-publish.js.map +1 -1
- package/dist/dkg-agent-rfc64-catalog.d.ts +87 -80
- package/dist/dkg-agent-rfc64-catalog.d.ts.map +1 -1
- package/dist/dkg-agent-rfc64-catalog.js +726 -476
- package/dist/dkg-agent-rfc64-catalog.js.map +1 -1
- package/dist/dkg-agent-rfc64-meta-bootstrap.d.ts +6 -1
- package/dist/dkg-agent-rfc64-meta-bootstrap.d.ts.map +1 -1
- package/dist/dkg-agent-rfc64-meta-bootstrap.js +29 -13
- package/dist/dkg-agent-rfc64-meta-bootstrap.js.map +1 -1
- package/dist/dkg-agent-rfc64-swm-catalog-projection-supervisor.d.ts +8 -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 +249 -40
- package/dist/dkg-agent-rfc64-swm-catalog-projection-supervisor.js.map +1 -1
- package/dist/dkg-agent-rfc64-swm-catalog-projection.d.ts.map +1 -1
- package/dist/dkg-agent-rfc64-swm-catalog-projection.js +3 -2
- package/dist/dkg-agent-rfc64-swm-catalog-projection.js.map +1 -1
- package/dist/dkg-agent-swm-host.d.ts +217 -52
- package/dist/dkg-agent-swm-host.d.ts.map +1 -1
- package/dist/dkg-agent-swm-host.js +1305 -858
- package/dist/dkg-agent-swm-host.js.map +1 -1
- package/dist/dkg-agent-swm-state.d.ts +15 -0
- package/dist/dkg-agent-swm-state.d.ts.map +1 -1
- package/dist/dkg-agent-swm-state.js +43 -0
- package/dist/dkg-agent-swm-state.js.map +1 -1
- package/dist/dkg-agent-swm-substrate.d.ts +49 -8
- package/dist/dkg-agent-swm-substrate.d.ts.map +1 -1
- package/dist/dkg-agent-swm-substrate.js +219 -46
- package/dist/dkg-agent-swm-substrate.js.map +1 -1
- package/dist/dkg-agent-types.d.ts +86 -27
- package/dist/dkg-agent-types.d.ts.map +1 -1
- package/dist/dkg-agent-types.js.map +1 -1
- package/dist/dkg-agent-vm-promotion.d.ts +4 -0
- package/dist/dkg-agent-vm-promotion.d.ts.map +1 -1
- package/dist/dkg-agent-vm-promotion.js +40 -5
- package/dist/dkg-agent-vm-promotion.js.map +1 -1
- package/dist/dkg-agent-vm-reconcile-scheduling.d.ts +7 -0
- package/dist/dkg-agent-vm-reconcile-scheduling.d.ts.map +1 -1
- package/dist/dkg-agent-vm-reconcile-scheduling.js +18 -0
- package/dist/dkg-agent-vm-reconcile-scheduling.js.map +1 -1
- package/dist/dkg-agent.d.ts +31 -2
- package/dist/dkg-agent.d.ts.map +1 -1
- package/dist/dkg-agent.js +188 -72
- package/dist/dkg-agent.js.map +1 -1
- package/dist/exact-graph-content-verifier.d.ts.map +1 -1
- package/dist/exact-graph-content-verifier.js +3 -2
- package/dist/exact-graph-content-verifier.js.map +1 -1
- package/dist/finalization-handler.d.ts +26 -211
- package/dist/finalization-handler.d.ts.map +1 -1
- package/dist/finalization-handler.js +94 -1652
- package/dist/finalization-handler.js.map +1 -1
- package/dist/finalization-recovery-sqlite-displacement.d.ts +37 -0
- package/dist/finalization-recovery-sqlite-displacement.d.ts.map +1 -0
- package/dist/finalization-recovery-sqlite-displacement.js +102 -0
- package/dist/finalization-recovery-sqlite-displacement.js.map +1 -0
- package/dist/finalization-recovery-sqlite-policy.d.ts +20 -4
- package/dist/finalization-recovery-sqlite-policy.d.ts.map +1 -1
- package/dist/finalization-recovery-sqlite-policy.js +21 -5
- package/dist/finalization-recovery-sqlite-policy.js.map +1 -1
- package/dist/finalization-recovery-sqlite-rows.d.ts +53 -0
- package/dist/finalization-recovery-sqlite-rows.d.ts.map +1 -0
- package/dist/finalization-recovery-sqlite-rows.js +77 -0
- package/dist/finalization-recovery-sqlite-rows.js.map +1 -0
- package/dist/finalization-recovery-sqlite-store.d.ts +10 -4
- package/dist/finalization-recovery-sqlite-store.d.ts.map +1 -1
- package/dist/finalization-recovery-sqlite-store.js +49 -50
- package/dist/finalization-recovery-sqlite-store.js.map +1 -1
- package/dist/finalization-recovery-store.d.ts +18 -0
- package/dist/finalization-recovery-store.d.ts.map +1 -1
- package/dist/finalization-recovery-store.js +24 -0
- package/dist/finalization-recovery-store.js.map +1 -1
- package/dist/finalization-recovery-worker.js +1 -1
- package/dist/finalization-recovery-worker.js.map +1 -1
- package/dist/finalization-recovery.d.ts +2 -3
- package/dist/finalization-recovery.d.ts.map +1 -1
- package/dist/finalization-recovery.js +12 -9
- package/dist/finalization-recovery.js.map +1 -1
- package/dist/finalized-authority-cold-resolution.d.ts +6 -1
- package/dist/finalized-authority-cold-resolution.d.ts.map +1 -1
- package/dist/finalized-authority-cold-resolution.js +22 -3
- package/dist/finalized-authority-cold-resolution.js.map +1 -1
- package/dist/gossip-publish-handler.d.ts.map +1 -1
- package/dist/gossip-publish-handler.js +4 -2
- package/dist/gossip-publish-handler.js.map +1 -1
- package/dist/gossip-session.d.ts +29 -0
- package/dist/gossip-session.d.ts.map +1 -0
- package/dist/gossip-session.js +48 -0
- package/dist/gossip-session.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/context-graph-authority/approved-member-acceptance.d.ts +61 -0
- package/dist/internal/context-graph-authority/approved-member-acceptance.d.ts.map +1 -0
- package/dist/internal/context-graph-authority/approved-member-acceptance.js +75 -0
- package/dist/internal/context-graph-authority/approved-member-acceptance.js.map +1 -0
- package/dist/internal/context-graph-authority/context-graph-agent-gate-authority.d.ts +5 -5
- package/dist/internal/context-graph-authority/context-graph-agent-gate-authority.d.ts.map +1 -1
- package/dist/internal/context-graph-authority/context-graph-agent-gate-authority.js +59 -49
- package/dist/internal/context-graph-authority/context-graph-agent-gate-authority.js.map +1 -1
- package/dist/internal/context-graph-authority/context-graph-authority.d.ts +1 -0
- package/dist/internal/context-graph-authority/context-graph-authority.d.ts.map +1 -1
- package/dist/internal/context-graph-authority/context-graph-authority.js +25 -0
- package/dist/internal/context-graph-authority/context-graph-authority.js.map +1 -1
- package/dist/internal/context-graph-authority/finalized-target-projection.d.ts +17 -0
- package/dist/internal/context-graph-authority/finalized-target-projection.d.ts.map +1 -0
- package/dist/internal/context-graph-authority/finalized-target-projection.js +36 -0
- package/dist/internal/context-graph-authority/finalized-target-projection.js.map +1 -0
- package/dist/internal/context-graph-authority/swm-transport-authority.d.ts +84 -0
- package/dist/internal/context-graph-authority/swm-transport-authority.d.ts.map +1 -0
- package/dist/internal/context-graph-authority/swm-transport-authority.js +175 -0
- package/dist/internal/context-graph-authority/swm-transport-authority.js.map +1 -0
- package/dist/internal/context-graph-binding-abort.d.ts +3 -0
- package/dist/internal/context-graph-binding-abort.d.ts.map +1 -0
- package/dist/internal/context-graph-binding-abort.js +32 -0
- package/dist/internal/context-graph-binding-abort.js.map +1 -0
- package/dist/internal/context-graph-cache-invalidating-store.d.ts +3 -0
- package/dist/internal/context-graph-cache-invalidating-store.d.ts.map +1 -0
- package/dist/internal/context-graph-cache-invalidating-store.js +167 -0
- package/dist/internal/context-graph-cache-invalidating-store.js.map +1 -0
- package/dist/internal/context-graph-meta-record-copy.d.ts +3 -0
- package/dist/internal/context-graph-meta-record-copy.d.ts.map +1 -0
- package/dist/internal/context-graph-meta-record-copy.js +21 -0
- package/dist/internal/context-graph-meta-record-copy.js.map +1 -0
- package/dist/internal/gossip/host-mode-handler.d.ts +11 -0
- package/dist/internal/gossip/host-mode-handler.d.ts.map +1 -0
- package/dist/internal/gossip/host-mode-handler.js +41 -0
- package/dist/internal/gossip/host-mode-handler.js.map +1 -0
- package/dist/internal/join-encryption-key-bundle.d.ts +10 -0
- package/dist/internal/join-encryption-key-bundle.d.ts.map +1 -0
- package/dist/internal/join-encryption-key-bundle.js +72 -0
- package/dist/internal/join-encryption-key-bundle.js.map +1 -0
- package/dist/internal/knowledge-asset-vm-publish-request.d.ts +31 -0
- package/dist/internal/knowledge-asset-vm-publish-request.d.ts.map +1 -0
- package/dist/internal/knowledge-asset-vm-publish-request.js +91 -0
- package/dist/internal/knowledge-asset-vm-publish-request.js.map +1 -0
- package/dist/internal/lifecycle-sync-policy.d.ts +5 -0
- package/dist/internal/lifecycle-sync-policy.d.ts.map +1 -0
- package/dist/internal/lifecycle-sync-policy.js +12 -0
- package/dist/internal/lifecycle-sync-policy.js.map +1 -0
- package/dist/internal/local-private-member.d.ts +14 -0
- package/dist/internal/local-private-member.d.ts.map +1 -0
- package/dist/internal/local-private-member.js +21 -0
- package/dist/internal/local-private-member.js.map +1 -0
- package/dist/internal/promote/assertion-promote-precommit.d.ts +41 -1
- package/dist/internal/promote/assertion-promote-precommit.d.ts.map +1 -1
- package/dist/internal/promote/assertion-promote-precommit.js +79 -22
- package/dist/internal/promote/assertion-promote-precommit.js.map +1 -1
- package/dist/internal/storage-ack-owned-request.d.ts +16 -0
- package/dist/internal/storage-ack-owned-request.d.ts.map +1 -0
- package/dist/internal/storage-ack-owned-request.js +16 -0
- package/dist/internal/storage-ack-owned-request.js.map +1 -0
- package/dist/internal/vm-reconcile-local-admission-wait.d.ts +96 -0
- package/dist/internal/vm-reconcile-local-admission-wait.d.ts.map +1 -0
- package/dist/internal/vm-reconcile-local-admission-wait.js +226 -0
- package/dist/internal/vm-reconcile-local-admission-wait.js.map +1 -0
- package/dist/internal/vm-reconcile-read-authority.d.ts +27 -0
- package/dist/internal/vm-reconcile-read-authority.d.ts.map +1 -0
- package/dist/internal/vm-reconcile-read-authority.js +33 -0
- package/dist/internal/vm-reconcile-read-authority.js.map +1 -0
- package/dist/internal/vm-reconcile-sweep-admission.d.ts +2 -0
- package/dist/internal/vm-reconcile-sweep-admission.d.ts.map +1 -1
- package/dist/internal/vm-reconcile-sweep.d.ts +16 -4
- package/dist/internal/vm-reconcile-sweep.d.ts.map +1 -1
- package/dist/internal/vm-reconcile-sweep.js +91 -50
- package/dist/internal/vm-reconcile-sweep.js.map +1 -1
- package/dist/internal/workspace-projected-delegatees.d.ts +3 -0
- package/dist/internal/workspace-projected-delegatees.d.ts.map +1 -0
- package/dist/internal/workspace-projected-delegatees.js +34 -0
- package/dist/internal/workspace-projected-delegatees.js.map +1 -0
- package/dist/join-approval-restart-projection.d.ts +14 -0
- package/dist/join-approval-restart-projection.d.ts.map +1 -0
- package/dist/join-approval-restart-projection.js +32 -0
- package/dist/join-approval-restart-projection.js.map +1 -0
- package/dist/keyed-persist-scheduler.d.ts +72 -0
- package/dist/keyed-persist-scheduler.d.ts.map +1 -0
- package/dist/keyed-persist-scheduler.js +140 -0
- package/dist/keyed-persist-scheduler.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 +36 -0
- package/dist/map-with-concurrency.js.map +1 -1
- package/dist/p2p/network-admission-coordinator.d.ts +15 -0
- package/dist/p2p/network-admission-coordinator.d.ts.map +1 -1
- package/dist/p2p/network-admission-coordinator.js +20 -2
- package/dist/p2p/network-admission-coordinator.js.map +1 -1
- package/dist/p2p/peer-connect.d.ts +10 -1
- package/dist/p2p/peer-connect.d.ts.map +1 -1
- package/dist/p2p/peer-connect.js +11 -2
- package/dist/p2p/peer-connect.js.map +1 -1
- package/dist/p2p/peer-selection.d.ts +8 -0
- package/dist/p2p/peer-selection.d.ts.map +1 -1
- package/dist/p2p/peer-selection.js +21 -12
- package/dist/p2p/peer-selection.js.map +1 -1
- package/dist/p2p/protocol-readiness.d.ts +3 -3
- package/dist/p2p/protocol-readiness.d.ts.map +1 -1
- package/dist/p2p/protocol-readiness.js +4 -3
- package/dist/p2p/protocol-readiness.js.map +1 -1
- package/dist/prepare-unscoped-context-graph-read-checks.d.ts.map +1 -1
- package/dist/prepare-unscoped-context-graph-read-checks.js +12 -0
- package/dist/prepare-unscoped-context-graph-read-checks.js.map +1 -1
- package/dist/registered-context-graph-authority.d.ts +19 -0
- package/dist/registered-context-graph-authority.d.ts.map +1 -1
- package/dist/registered-private-empty-vm-attempt-v1.d.ts +34 -0
- package/dist/registered-private-empty-vm-attempt-v1.d.ts.map +1 -0
- package/dist/registered-private-empty-vm-attempt-v1.js +120 -0
- package/dist/registered-private-empty-vm-attempt-v1.js.map +1 -0
- package/dist/reserved-ka-id-allocation.d.ts +12 -0
- package/dist/reserved-ka-id-allocation.d.ts.map +1 -0
- package/dist/reserved-ka-id-allocation.js +25 -0
- package/dist/reserved-ka-id-allocation.js.map +1 -0
- package/dist/rfc64/applied-catalog-authority-transition-v1.d.ts.map +1 -1
- package/dist/rfc64/applied-catalog-authority-transition-v1.js +15 -17
- package/dist/rfc64/applied-catalog-authority-transition-v1.js.map +1 -1
- package/dist/rfc64/authority-rpc-circuit-breaker-v1.d.ts +5 -3
- package/dist/rfc64/authority-rpc-circuit-breaker-v1.d.ts.map +1 -1
- package/dist/rfc64/authority-rpc-circuit-breaker-v1.js +9 -0
- package/dist/rfc64/authority-rpc-circuit-breaker-v1.js.map +1 -1
- package/dist/rfc64/catalog-completion-evidence-v1.d.ts +38 -0
- package/dist/rfc64/catalog-completion-evidence-v1.d.ts.map +1 -0
- package/dist/rfc64/catalog-completion-evidence-v1.js +49 -0
- package/dist/rfc64/catalog-completion-evidence-v1.js.map +1 -0
- package/dist/rfc64/catalog-operational-applied-heads-v1.d.ts +12 -13
- package/dist/rfc64/catalog-operational-applied-heads-v1.d.ts.map +1 -1
- package/dist/rfc64/catalog-operational-applied-heads-v1.js +17 -52
- package/dist/rfc64/catalog-operational-applied-heads-v1.js.map +1 -1
- package/dist/rfc64/catalog-operational-reads-v1.d.ts +13 -0
- package/dist/rfc64/catalog-operational-reads-v1.d.ts.map +1 -0
- package/dist/rfc64/catalog-operational-reads-v1.js +56 -0
- package/dist/rfc64/catalog-operational-reads-v1.js.map +1 -0
- package/dist/rfc64/catalog-operational-targets-v1.d.ts +55 -0
- package/dist/rfc64/catalog-operational-targets-v1.d.ts.map +1 -0
- package/dist/rfc64/catalog-operational-targets-v1.js +379 -0
- package/dist/rfc64/catalog-operational-targets-v1.js.map +1 -0
- package/dist/rfc64/catalog-repair-diagnostics-v1.d.ts +28 -0
- package/dist/rfc64/catalog-repair-diagnostics-v1.d.ts.map +1 -0
- package/dist/rfc64/catalog-repair-diagnostics-v1.js +93 -0
- package/dist/rfc64/catalog-repair-diagnostics-v1.js.map +1 -0
- package/dist/rfc64/catalog-repair-retry-v1.d.ts +13 -0
- package/dist/rfc64/catalog-repair-retry-v1.d.ts.map +1 -0
- package/dist/rfc64/catalog-repair-retry-v1.js +39 -0
- package/dist/rfc64/catalog-repair-retry-v1.js.map +1 -0
- package/dist/rfc64/catalog-replay-recovery-runtime-v1.d.ts +52 -0
- package/dist/rfc64/catalog-replay-recovery-runtime-v1.d.ts.map +1 -1
- package/dist/rfc64/catalog-replay-recovery-runtime-v1.js +188 -32
- package/dist/rfc64/catalog-replay-recovery-runtime-v1.js.map +1 -1
- package/dist/rfc64/catalog-replay-snapshot-runtime-v1.d.ts +2 -8
- package/dist/rfc64/catalog-replay-snapshot-runtime-v1.d.ts.map +1 -1
- package/dist/rfc64/catalog-replay-snapshot-runtime-v1.js +10 -37
- package/dist/rfc64/catalog-replay-snapshot-runtime-v1.js.map +1 -1
- package/dist/rfc64/catalog-rollout-authority-v1.d.ts +13 -0
- package/dist/rfc64/catalog-rollout-authority-v1.d.ts.map +1 -1
- package/dist/rfc64/catalog-rollout-authority-v1.js +11 -0
- package/dist/rfc64/catalog-rollout-authority-v1.js.map +1 -1
- package/dist/rfc64/catalog-row-authorship.d.ts +12 -0
- package/dist/rfc64/catalog-row-authorship.d.ts.map +1 -1
- package/dist/rfc64/catalog-row-authorship.js +110 -57
- package/dist/rfc64/catalog-row-authorship.js.map +1 -1
- package/dist/rfc64/inventory-v1/candidate.d.ts +31 -10
- package/dist/rfc64/inventory-v1/candidate.d.ts.map +1 -1
- package/dist/rfc64/inventory-v1/candidate.js +51 -16
- 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 +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 +7 -4
- package/dist/rfc64/inventory-v1/open.js.map +1 -1
- package/dist/rfc64/inventory-v1/swm-author-inventory-persistence.d.ts +3 -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 +15 -0
- package/dist/rfc64/inventory-v1/swm-author-inventory-persistence.js.map +1 -1
- package/dist/rfc64/legacy-swm-boundary-codec-v1.d.ts +25 -0
- package/dist/rfc64/legacy-swm-boundary-codec-v1.d.ts.map +1 -0
- package/dist/rfc64/legacy-swm-boundary-codec-v1.js +127 -0
- package/dist/rfc64/legacy-swm-boundary-codec-v1.js.map +1 -0
- package/dist/rfc64/legacy-swm-boundary-v1.d.ts +12 -0
- package/dist/rfc64/legacy-swm-boundary-v1.d.ts.map +1 -1
- package/dist/rfc64/legacy-swm-boundary-v1.js +83 -144
- package/dist/rfc64/legacy-swm-boundary-v1.js.map +1 -1
- package/dist/rfc64/private-catalog-subscription-readiness-v1.d.ts +33 -0
- package/dist/rfc64/private-catalog-subscription-readiness-v1.d.ts.map +1 -0
- package/dist/rfc64/private-catalog-subscription-readiness-v1.js +97 -0
- package/dist/rfc64/private-catalog-subscription-readiness-v1.js.map +1 -0
- package/dist/rfc64/private-read-roster-v1.d.ts +14 -0
- package/dist/rfc64/private-read-roster-v1.d.ts.map +1 -0
- package/dist/rfc64/private-read-roster-v1.js +57 -0
- package/dist/rfc64/private-read-roster-v1.js.map +1 -0
- package/dist/rfc64/public-catalog-native-receiver-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-native-receiver-v1.js +26 -21
- package/dist/rfc64/public-catalog-native-receiver-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-native-reconciler-v1.d.ts +17 -11
- package/dist/rfc64/public-catalog-native-reconciler-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-native-reconciler-v1.js +10 -8
- package/dist/rfc64/public-catalog-native-reconciler-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-receiver-v1.d.ts +9 -0
- package/dist/rfc64/public-catalog-receiver-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-receiver-v1.js +11 -2
- package/dist/rfc64/public-catalog-receiver-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-service-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-service-v1.js +21 -22
- package/dist/rfc64/public-catalog-service-v1.js.map +1 -1
- package/dist/rfc64/public-catalog-successor-producer-v1.d.ts.map +1 -1
- package/dist/rfc64/public-catalog-successor-producer-v1.js +5 -4
- package/dist/rfc64/public-catalog-successor-producer-v1.js.map +1 -1
- package/dist/rfc64/registered-private-empty-vm-proof-v1.d.ts +20 -0
- package/dist/rfc64/registered-private-empty-vm-proof-v1.d.ts.map +1 -0
- package/dist/rfc64/registered-private-empty-vm-proof-v1.js +26 -0
- package/dist/rfc64/registered-private-empty-vm-proof-v1.js.map +1 -0
- package/dist/rfc64/swm-catalog-durable-asset-resolver-v1.d.ts.map +1 -1
- package/dist/rfc64/swm-catalog-durable-asset-resolver-v1.js +60 -53
- package/dist/rfc64/swm-catalog-durable-asset-resolver-v1.js.map +1 -1
- package/dist/rfc64/swm-inventory-catalog-reconciler-v1.d.ts +2 -1
- package/dist/rfc64/swm-inventory-catalog-reconciler-v1.d.ts.map +1 -1
- package/dist/rfc64/swm-inventory-catalog-reconciler-v1.js +44 -4
- package/dist/rfc64/swm-inventory-catalog-reconciler-v1.js.map +1 -1
- package/dist/rfc64/swm-inventory-shadow-runtime-v1.d.ts +3 -1
- package/dist/rfc64/swm-inventory-shadow-runtime-v1.d.ts.map +1 -1
- package/dist/rfc64/swm-inventory-shadow-runtime-v1.js +34 -0
- package/dist/rfc64/swm-inventory-shadow-runtime-v1.js.map +1 -1
- package/dist/sync/auth/pipe-request-tail.d.ts +5 -1
- package/dist/sync/auth/pipe-request-tail.d.ts.map +1 -1
- package/dist/sync/auth/pipe-request-tail.js +13 -3
- package/dist/sync/auth/pipe-request-tail.js.map +1 -1
- package/dist/sync/auth/request-build.d.ts +3 -0
- package/dist/sync/auth/request-build.d.ts.map +1 -1
- package/dist/sync/auth/request-build.js +11 -2
- package/dist/sync/auth/request-build.js.map +1 -1
- package/dist/sync/backpressure.d.ts +27 -16
- package/dist/sync/backpressure.d.ts.map +1 -1
- package/dist/sync/backpressure.js +66 -40
- package/dist/sync/backpressure.js.map +1 -1
- package/dist/sync/catchup-policy.d.ts +2 -0
- package/dist/sync/catchup-policy.d.ts.map +1 -1
- package/dist/sync/catchup-policy.js +2 -0
- package/dist/sync/catchup-policy.js.map +1 -1
- package/dist/sync/exact-asset-fetch.d.ts +22 -0
- package/dist/sync/exact-asset-fetch.d.ts.map +1 -1
- package/dist/sync/exact-asset-fetch.js +30 -3
- package/dist/sync/exact-asset-fetch.js.map +1 -1
- package/dist/sync/exact-assets.d.ts +7 -5
- package/dist/sync/exact-assets.d.ts.map +1 -1
- package/dist/sync/exact-assets.js +13 -8
- package/dist/sync/exact-assets.js.map +1 -1
- package/dist/sync/exact-batch-observation.d.ts +3 -0
- package/dist/sync/exact-batch-observation.d.ts.map +1 -0
- package/dist/sync/exact-batch-observation.js +13 -0
- package/dist/sync/exact-batch-observation.js.map +1 -0
- package/dist/sync/exact-batch-stream-capability.d.ts +24 -0
- package/dist/sync/exact-batch-stream-capability.d.ts.map +1 -0
- package/dist/sync/exact-batch-stream-capability.js +88 -0
- package/dist/sync/exact-batch-stream-capability.js.map +1 -0
- package/dist/sync/exact-batch-stream-contract.d.ts +78 -0
- package/dist/sync/exact-batch-stream-contract.d.ts.map +1 -0
- package/dist/sync/exact-batch-stream-contract.js +206 -0
- package/dist/sync/exact-batch-stream-contract.js.map +1 -0
- package/dist/sync/on-connect/sync-on-connect.d.ts +1 -1
- package/dist/sync/on-connect/sync-on-connect.d.ts.map +1 -1
- package/dist/sync/on-connect/sync-on-connect.js +3 -3
- package/dist/sync/on-connect/sync-on-connect.js.map +1 -1
- package/dist/sync/on-demand-agents-phonebook.d.ts +162 -0
- package/dist/sync/on-demand-agents-phonebook.d.ts.map +1 -0
- package/dist/sync/on-demand-agents-phonebook.js +571 -0
- package/dist/sync/on-demand-agents-phonebook.js.map +1 -0
- package/dist/sync/peer-connection.d.ts.map +1 -1
- package/dist/sync/peer-connection.js +11 -2
- package/dist/sync/peer-connection.js.map +1 -1
- package/dist/sync/priority-admission-queue.d.ts +17 -0
- package/dist/sync/priority-admission-queue.d.ts.map +1 -1
- package/dist/sync/priority-admission-queue.js +58 -37
- package/dist/sync/priority-admission-queue.js.map +1 -1
- package/dist/sync/requester/admission-boundary.d.ts +12 -0
- package/dist/sync/requester/admission-boundary.d.ts.map +1 -0
- package/dist/sync/requester/admission-boundary.js +22 -0
- package/dist/sync/requester/admission-boundary.js.map +1 -0
- package/dist/sync/requester/durable-sync.d.ts +2 -1
- package/dist/sync/requester/durable-sync.d.ts.map +1 -1
- package/dist/sync/requester/durable-sync.js +3 -188
- package/dist/sync/requester/durable-sync.js.map +1 -1
- package/dist/sync/requester/exact-batch-stream-driver.d.ts +83 -0
- package/dist/sync/requester/exact-batch-stream-driver.d.ts.map +1 -0
- package/dist/sync/requester/exact-batch-stream-driver.js +299 -0
- package/dist/sync/requester/exact-batch-stream-driver.js.map +1 -0
- package/dist/sync/requester/exact-batch-stream.d.ts +72 -0
- package/dist/sync/requester/exact-batch-stream.d.ts.map +1 -0
- package/dist/sync/requester/exact-batch-stream.js +267 -0
- package/dist/sync/requester/exact-batch-stream.js.map +1 -0
- package/dist/sync/requester/exact-recovery-transport.d.ts +19 -0
- package/dist/sync/requester/exact-recovery-transport.d.ts.map +1 -0
- package/dist/sync/requester/exact-recovery-transport.js +3 -0
- package/dist/sync/requester/exact-recovery-transport.js.map +1 -0
- package/dist/sync/requester/finalized-swm-twin-reconciliation.js +12 -3
- package/dist/sync/requester/finalized-swm-twin-reconciliation.js.map +1 -1
- package/dist/sync/requester/graph-scoped-materialization.d.ts.map +1 -1
- package/dist/sync/requester/graph-scoped-materialization.js +61 -27
- package/dist/sync/requester/graph-scoped-materialization.js.map +1 -1
- package/dist/sync/requester/page-fetch.d.ts +7 -0
- package/dist/sync/requester/page-fetch.d.ts.map +1 -1
- package/dist/sync/requester/page-fetch.js +103 -49
- package/dist/sync/requester/page-fetch.js.map +1 -1
- package/dist/sync/requester/shared-memory-sync.d.ts +10 -5
- package/dist/sync/requester/shared-memory-sync.d.ts.map +1 -1
- package/dist/sync/requester/shared-memory-sync.js +149 -150
- package/dist/sync/requester/shared-memory-sync.js.map +1 -1
- package/dist/sync/requester/swm-materialization-memo.d.ts +12 -0
- package/dist/sync/requester/swm-materialization-memo.d.ts.map +1 -0
- package/dist/sync/requester/swm-materialization-memo.js +54 -0
- package/dist/sync/requester/swm-materialization-memo.js.map +1 -0
- package/dist/sync/requester/swm-recovery.d.ts +3 -29
- package/dist/sync/requester/swm-recovery.d.ts.map +1 -1
- package/dist/sync/requester/swm-recovery.js +11 -10
- package/dist/sync/requester/swm-recovery.js.map +1 -1
- package/dist/sync/requester/swm-snapshot-materializer.d.ts.map +1 -1
- package/dist/sync/requester/swm-snapshot-materializer.js +18 -0
- package/dist/sync/requester/swm-snapshot-materializer.js.map +1 -1
- package/dist/sync/requester/swm-target-executor.d.ts +6 -0
- package/dist/sync/requester/swm-target-executor.d.ts.map +1 -1
- package/dist/sync/requester/swm-target-executor.js +24 -3
- package/dist/sync/requester/swm-target-executor.js.map +1 -1
- package/dist/sync/requester/verified-asset-preparation.d.ts +9 -0
- package/dist/sync/requester/verified-asset-preparation.d.ts.map +1 -0
- package/dist/sync/requester/verified-asset-preparation.js +190 -0
- package/dist/sync/requester/verified-asset-preparation.js.map +1 -0
- package/dist/sync/responder/asset-metadata.d.ts +18 -0
- package/dist/sync/responder/asset-metadata.d.ts.map +1 -0
- package/dist/sync/responder/asset-metadata.js +27 -0
- package/dist/sync/responder/asset-metadata.js.map +1 -0
- package/dist/sync/responder/durable-data-request-policy.d.ts +2 -16
- package/dist/sync/responder/durable-data-request-policy.d.ts.map +1 -1
- package/dist/sync/responder/durable-data-request-policy.js +1 -31
- package/dist/sync/responder/durable-data-request-policy.js.map +1 -1
- package/dist/sync/responder/exact-asset-export-cache.d.ts +89 -0
- package/dist/sync/responder/exact-asset-export-cache.d.ts.map +1 -0
- package/dist/sync/responder/exact-asset-export-cache.js +550 -0
- package/dist/sync/responder/exact-asset-export-cache.js.map +1 -0
- package/dist/sync/responder/exact-batch-stream.d.ts +47 -0
- package/dist/sync/responder/exact-batch-stream.d.ts.map +1 -0
- package/dist/sync/responder/exact-batch-stream.js +151 -0
- package/dist/sync/responder/exact-batch-stream.js.map +1 -0
- package/dist/sync/responder/exact-data-session.d.ts +67 -0
- package/dist/sync/responder/exact-data-session.d.ts.map +1 -0
- package/dist/sync/responder/exact-data-session.js +130 -0
- package/dist/sync/responder/exact-data-session.js.map +1 -0
- package/dist/sync/responder/exact-graph-cursor-filter.d.ts +9 -0
- package/dist/sync/responder/exact-graph-cursor-filter.d.ts.map +1 -0
- package/dist/sync/responder/exact-graph-cursor-filter.js +101 -0
- package/dist/sync/responder/exact-graph-cursor-filter.js.map +1 -0
- package/dist/sync/responder/exact-graph-reader.d.ts +95 -0
- package/dist/sync/responder/exact-graph-reader.d.ts.map +1 -0
- package/dist/sync/responder/exact-graph-reader.js +623 -0
- package/dist/sync/responder/exact-graph-reader.js.map +1 -0
- package/dist/sync/responder/exact-page-reader.d.ts +37 -0
- package/dist/sync/responder/exact-page-reader.d.ts.map +1 -0
- package/dist/sync/responder/exact-page-reader.js +130 -0
- package/dist/sync/responder/exact-page-reader.js.map +1 -0
- package/dist/sync/responder/graph-plan.d.ts +19 -85
- package/dist/sync/responder/graph-plan.d.ts.map +1 -1
- package/dist/sync/responder/graph-plan.js +51 -988
- package/dist/sync/responder/graph-plan.js.map +1 -1
- package/dist/sync/responder/page-framing-policy.d.ts +31 -0
- package/dist/sync/responder/page-framing-policy.d.ts.map +1 -0
- package/dist/sync/responder/page-framing-policy.js +41 -0
- package/dist/sync/responder/page-framing-policy.js.map +1 -0
- package/dist/sync/responder/responder-row-page.d.ts +85 -0
- package/dist/sync/responder/responder-row-page.d.ts.map +1 -0
- package/dist/sync/responder/responder-row-page.js +181 -0
- package/dist/sync/responder/responder-row-page.js.map +1 -0
- package/dist/sync/responder/row-serialization.d.ts +34 -0
- package/dist/sync/responder/row-serialization.d.ts.map +1 -0
- package/dist/sync/responder/row-serialization.js +69 -0
- package/dist/sync/responder/row-serialization.js.map +1 -0
- package/dist/sync/responder/session-plan-memo.d.ts +20 -0
- package/dist/sync/responder/session-plan-memo.d.ts.map +1 -0
- package/dist/sync/responder/session-plan-memo.js +135 -0
- package/dist/sync/responder/session-plan-memo.js.map +1 -0
- package/dist/sync/responder/sync-handler.d.ts +26 -1
- package/dist/sync/responder/sync-handler.d.ts.map +1 -1
- package/dist/sync/responder/sync-handler.js +107 -58
- package/dist/sync/responder/sync-handler.js.map +1 -1
- package/dist/sync/shared-memory-completion.d.ts +30 -0
- package/dist/sync/shared-memory-completion.d.ts.map +1 -1
- package/dist/sync/shared-memory-completion.js +13 -0
- package/dist/sync/shared-memory-completion.js.map +1 -1
- package/dist/sync/system-context-graph-policy.d.ts +10 -0
- package/dist/sync/system-context-graph-policy.d.ts.map +1 -1
- package/dist/sync/system-context-graph-policy.js +11 -0
- package/dist/sync/system-context-graph-policy.js.map +1 -1
- package/dist/sync/wire-compression.d.ts +47 -0
- package/dist/sync/wire-compression.d.ts.map +1 -0
- package/dist/sync/wire-compression.js +111 -0
- package/dist/sync/wire-compression.js.map +1 -0
- package/dist/unscoped-query-consistency.d.ts +12 -0
- package/dist/unscoped-query-consistency.d.ts.map +1 -1
- package/dist/unscoped-query-consistency.js +17 -1
- package/dist/unscoped-query-consistency.js.map +1 -1
- package/dist/vm-promotion-audit.d.ts +2 -2
- package/dist/vm-promotion-audit.d.ts.map +1 -1
- package/dist/vm-promotion-audit.js +26 -9
- package/dist/vm-promotion-audit.js.map +1 -1
- package/dist/vm-publish-snapshot-preflight.d.ts +13 -0
- package/dist/vm-publish-snapshot-preflight.d.ts.map +1 -0
- package/dist/vm-publish-snapshot-preflight.js +94 -0
- package/dist/vm-publish-snapshot-preflight.js.map +1 -0
- package/dist/vm-reconcile-dispatcher.d.ts +42 -1
- package/dist/vm-reconcile-dispatcher.d.ts.map +1 -1
- package/dist/vm-reconcile-dispatcher.js +103 -4
- package/dist/vm-reconcile-dispatcher.js.map +1 -1
- package/dist/vm-reconcile-peer-topology.d.ts +7 -9
- package/dist/vm-reconcile-peer-topology.d.ts.map +1 -1
- package/dist/vm-reconcile-peer-topology.js +1 -37
- package/dist/vm-reconcile-peer-topology.js.map +1 -1
- package/dist/vm-recovery-candidate-order.d.ts +16 -0
- package/dist/vm-recovery-candidate-order.d.ts.map +1 -0
- package/dist/vm-recovery-candidate-order.js +24 -0
- package/dist/vm-recovery-candidate-order.js.map +1 -0
- package/dist/vm-recovery-core-transport-preference.d.ts +69 -0
- package/dist/vm-recovery-core-transport-preference.d.ts.map +1 -0
- package/dist/vm-recovery-core-transport-preference.js +131 -0
- package/dist/vm-recovery-core-transport-preference.js.map +1 -0
- package/dist/vm-recovery-experiment-policy.d.ts +24 -0
- package/dist/vm-recovery-experiment-policy.d.ts.map +1 -0
- package/dist/vm-recovery-experiment-policy.js +18 -0
- package/dist/vm-recovery-experiment-policy.js.map +1 -0
- package/dist/vm-recovery-footprint.d.ts +54 -0
- package/dist/vm-recovery-footprint.d.ts.map +1 -1
- package/dist/vm-recovery-footprint.js +88 -24
- package/dist/vm-recovery-footprint.js.map +1 -1
- package/dist/vm-recovery-microbatch.d.ts +2 -0
- package/dist/vm-recovery-microbatch.d.ts.map +1 -1
- package/dist/vm-recovery-microbatch.js +7 -3
- package/dist/vm-recovery-microbatch.js.map +1 -1
- package/dist/vm-recovery-pass-authority.d.ts +84 -0
- package/dist/vm-recovery-pass-authority.d.ts.map +1 -0
- package/dist/vm-recovery-pass-authority.js +126 -0
- package/dist/vm-recovery-pass-authority.js.map +1 -0
- package/dist/vm-recovery-phase-timing.d.ts +75 -0
- package/dist/vm-recovery-phase-timing.d.ts.map +1 -0
- package/dist/vm-recovery-phase-timing.js +236 -0
- package/dist/vm-recovery-phase-timing.js.map +1 -0
- package/dist/vm-recovery-preparation.d.ts +143 -0
- package/dist/vm-recovery-preparation.d.ts.map +1 -0
- package/dist/vm-recovery-preparation.js +433 -0
- package/dist/vm-recovery-preparation.js.map +1 -0
- package/dist/vm-recovery-provider-policy.d.ts +13 -1
- package/dist/vm-recovery-provider-policy.d.ts.map +1 -1
- package/dist/vm-recovery-provider-policy.js +37 -5
- package/dist/vm-recovery-provider-policy.js.map +1 -1
- package/dist/vm-recovery-stream-profile.d.ts +15 -0
- package/dist/vm-recovery-stream-profile.d.ts.map +1 -0
- package/dist/vm-recovery-stream-profile.js +53 -0
- package/dist/vm-recovery-stream-profile.js.map +1 -0
- package/dist/vm-recovery-stream-setback-policy.d.ts +54 -0
- package/dist/vm-recovery-stream-setback-policy.d.ts.map +1 -0
- package/dist/vm-recovery-stream-setback-policy.js +85 -0
- package/dist/vm-recovery-stream-setback-policy.js.map +1 -0
- package/dist/vm-recovery-timing-observer.d.ts +27 -0
- package/dist/vm-recovery-timing-observer.d.ts.map +1 -0
- package/dist/vm-recovery-timing-observer.js +49 -0
- package/dist/vm-recovery-timing-observer.js.map +1 -0
- package/dist/vm-recovery-transport-budget-policy.d.ts +32 -0
- package/dist/vm-recovery-transport-budget-policy.d.ts.map +1 -0
- package/dist/vm-recovery-transport-budget-policy.js +55 -0
- package/dist/vm-recovery-transport-budget-policy.js.map +1 -0
- package/dist/vm-recovery-transport-plan.d.ts +83 -0
- package/dist/vm-recovery-transport-plan.d.ts.map +1 -0
- package/dist/vm-recovery-transport-plan.js +117 -0
- package/dist/vm-recovery-transport-plan.js.map +1 -0
- package/dist/vm-refresh.d.ts +138 -0
- package/dist/vm-refresh.d.ts.map +1 -0
- package/dist/vm-refresh.js +201 -0
- package/dist/vm-refresh.js.map +1 -0
- package/package.json +19 -9
- package/dist/finalization-annotations.d.ts +0 -5
- package/dist/finalization-annotations.d.ts.map +0 -1
- package/dist/finalization-annotations.js +0 -6
- package/dist/finalization-annotations.js.map +0 -1
- package/dist/swm-ka-bound.d.ts +0 -21
- package/dist/swm-ka-bound.d.ts.map +0 -1
- package/dist/swm-ka-bound.js +0 -36
- package/dist/swm-ka-bound.js.map +0 -1
|
@@ -7,111 +7,34 @@
|
|
|
7
7
|
* register/batch/identity entrypoints. Bodies are a 1:1 move; methods take
|
|
8
8
|
* `this: DKGAgent` so cross-calls resolve against the composed class.
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
11
|
-
|
|
10
|
+
import { planKnowledgeAssetVmPublication, isGraphScopedKnowledgeAssetVmPublishRequest, assertionSealFromQueuedKnowledgeAssetVmPublishRequest, createKnowledgeAssetVmPublishIntentKey } from './internal/knowledge-asset-vm-publish-request.js';
|
|
11
|
+
export { createKnowledgeAssetVmPublishIntentKey } from './internal/knowledge-asset-vm-publish-request.js';
|
|
12
|
+
import { randomUUID } from 'node:crypto';
|
|
13
|
+
import { preflightKnowledgeAssetVmPublishSnapshot } from './vm-publish-snapshot-preflight.js';
|
|
14
|
+
import { PROTOCOL_SWM_UPDATE, contextGraphPublishTopic, contextGraphWorkspaceTopic, contextGraphUpdateTopic, contextGraphFinalizationTopic, contextGraphDataGraphUri, contextGraphMetaGraphUri, contextGraphSharedMemoryUri, contextGraphDataUri, contextGraphMetaUri, assertionLifecycleUri, contextGraphAssertionUri, contextGraphCatalogUri, contextGraphLayerUri, MemoryLayer, encodeKAUpdateRequest, encodeGossipEnvelope, GOSSIP_ENVELOPE_VERSION, encodeFinalizationMessage, SYSTEM_CONTEXT_GRAPHS, DKG_ONTOLOGY, createOperationContext, escapeSparqlLiteral, assertSafeIri, isTrustLevelQuad, buildAuthorAttestationTypedData, buildUpdateAuthorAttestationTypedData, AUTHOR_SCHEME_VERSION_V1, buildAssertionSealQuads, buildAssertionPublishReceiptQuads, parseAssertionSealQuads, ASSERTION_SEAL_PREDICATES, GRAPH_KA_CONTENT_SCOPE_VERSION, LegacyKnowledgeAssetReadOnlyError, createGraphKnowledgeAssetScope, knowledgeAssetLayerGraphUri, computeSwmSenderKeyMembershipHash, encryptV10PublishPayload, encryptChunked, buildCiphertextChunksRoot, computeGossipSigningPayloadV2, GOSSIP_TYPE_WORKSPACE_PUBLISH_CHUNKED, ciphertextChunkStoreGraph, ciphertextChunkStoreSubject, CIPHERTEXT_CHUNK_PREDICATE, withSpan, getMetrics, assertQuadLiteralsMutf8Safe, PUBLISH_AUTHOR_NOT_CUSTODIAL_CODE, PUBLISH_AUTHOR_SELECTION_CONFLICT_CODE, formatPublishAuthorNotCustodialMessage, } from '@origintrail-official/dkg-core';
|
|
12
15
|
import { SpanStatusCode } from '@opentelemetry/api';
|
|
13
|
-
import { deleteByPatternWithoutCount, GraphManager, PrivateContentStore, loadSharedMemoryQuadsForScope,
|
|
14
|
-
import { computeFlatKCRootV10 as computeFlatKCRoot, computePrivateRootV10 as computePrivateRoot, skolemizeKnowledgeAssetParts, assertNoKnowledgeAssetPayloadNamedGraphs, assertValidPrecomputedUpdateAttestation, isReservedSubject, canonicalPublishPayload, generatedPrivateCatalogTripleKeys,
|
|
15
|
-
// OT-RFC-43 A2 — per-layer pointer + KA-id predicates and stamp helpers.
|
|
16
|
-
KA_ID_PRED, RESERVED_UAL_PRED, WM_CURRENT_ASSERTION_PRED, SWM_CURRENT_ASSERTION_PRED, VM_CURRENT_ASSERTION_PRED, createResolveCurrentWorkspaceGossipPayload, parseEncodedWorkspaceGossipPayload, assertPublicationPricingPolicyApplicable, } from '@origintrail-official/dkg-publisher';
|
|
16
|
+
import { deleteByPatternWithoutCount, GraphManager, PrivateContentStore, loadSharedMemoryQuadsForScope, } from '@origintrail-official/dkg-storage';
|
|
17
|
+
import { computeFlatKCRootV10 as computeFlatKCRoot, computePrivateRootV10 as computePrivateRoot, skolemizeKnowledgeAssetParts, assertNoKnowledgeAssetPayloadNamedGraphs, assertValidPrecomputedUpdateAttestation, isReservedSubject, canonicalPublishPayload, generatedPrivateCatalogTripleKeys, resolveKnowledgeAssetOperationPublicQuads, resolveKnowledgeAssetWorkspaceHead, workspaceHeadIncludesShareOperationId, KnowledgeAssetOperationPublicSnapshotNotFoundError, workspacePublicQuadsDigest, TripleStoreAsyncLiftPublisher, KA_ID_PRED, RESERVED_UAL_PRED, WM_CURRENT_ASSERTION_PRED, SWM_CURRENT_ASSERTION_PRED, VM_CURRENT_ASSERTION_PRED, createResolveCurrentWorkspaceGossipPayload, parseEncodedWorkspaceGossipPayload, } from '@origintrail-official/dkg-publisher';
|
|
17
18
|
import { pickPublishLifecycleHooks } from '@origintrail-official/dkg-publisher';
|
|
18
19
|
import { ethers } from 'ethers';
|
|
19
20
|
import { buildAuthoritativePublicMetaQuads } from './context-graph-public-meta-proof.js';
|
|
20
21
|
import { resolveFinalizedAssertionAuthor } from './finalized-assertion-author.js';
|
|
21
|
-
import { RootlessUpdateError } from './rootless-update-error.js';
|
|
22
|
+
import { RootlessUpdateError, isRootlessUpdateError } from './rootless-update-error.js';
|
|
22
23
|
import { emitPublicProjection, buildPublicProjection } from './context-graph-public-projection.js';
|
|
23
24
|
import { chooseFanOutTier, executeSubstrateFanOut, classifySendResult, } from './swm/substrate-fanout.js';
|
|
24
25
|
import { classifySwmFanoutPeerOutcome, } from './swm/swm-fanout-peer-selection.js';
|
|
25
|
-
import { KEEP_ROOT_COPY_PREDICATE } from './finalization-handler.js';
|
|
26
26
|
import { applyPublishedNamedKaVmLifecycle } from './named-ka-vm-lifecycle.js';
|
|
27
|
+
import { packKnowledgeAssetIdFromIdentity } from './ka-identity.js';
|
|
27
28
|
import { normalizeRecoveredNamedKaPublish, throwIfRecoveryDeadlineReached, } from './named-ka-publish-recovery.js';
|
|
28
29
|
import { stripLiteral, jsonLdToQuads, } from './dkg-agent-utils.js';
|
|
29
30
|
import { PRIVATE_DATA_ANCHOR, } from './dkg-agent-constants.js';
|
|
30
31
|
import { ContextGraphNotFoundError, InvalidContentError, } from './dkg-agent-types.js';
|
|
31
32
|
import { normalizePublishContextGraphId, isPublishAsyncQuadEnvelope, assertQuadArray, sliceIntoCiphertextChunks, } from './dkg-agent-helpers.js';
|
|
32
33
|
import { readMaxKaNumberWithRetry, isTransientChainError } from './allocator.js';
|
|
33
|
-
import { swmSenderStateKey, } from './dkg-agent-swm-state.js';
|
|
34
|
+
import { computeSwmSenderKeyRecipientRouteHash, swmSenderStateKey, } from './dkg-agent-swm-state.js';
|
|
34
35
|
import { DKGAgentBase } from './dkg-agent-base.js';
|
|
35
36
|
import { CONTEXT_GRAPH_AUTHORITY_RPC_SITES as CG_AUTH_RPC_SITES, withRpcUsageSite, } from '@origintrail-official/dkg-chain';
|
|
36
37
|
import { createLocalContextGraphOriginMembershipRecord } from './local-context-graph-provenance.js';
|
|
37
|
-
/** One operation discriminator shared by admission, sync, and queued execution. */
|
|
38
|
-
function planKnowledgeAssetVmPublication(input) {
|
|
39
|
-
if (input.vmCurrentAssertion) {
|
|
40
|
-
assertPublicationPricingPolicyApplicable(input.pricingPolicy, { kind: 'update' });
|
|
41
|
-
return { kind: 'update', vmCurrentAssertion: input.vmCurrentAssertion };
|
|
42
|
-
}
|
|
43
|
-
assertPublicationPricingPolicyApplicable(input.pricingPolicy, {
|
|
44
|
-
kind: 'initial',
|
|
45
|
-
graphScoped: true,
|
|
46
|
-
});
|
|
47
|
-
return { kind: 'initial', pricingPolicy: input.pricingPolicy };
|
|
48
|
-
}
|
|
49
|
-
/** Rebuild the immutable graph-scoped seal carried by one queued VM request. */
|
|
50
|
-
function assertionSealFromQueuedKnowledgeAssetVmPublishRequest(request) {
|
|
51
|
-
// Both execution boundaries validate the immutable graph-scoped envelope
|
|
52
|
-
// before calling this shared reconstruction helper.
|
|
53
|
-
const graphScope = createGraphKnowledgeAssetScope(request.kaUal, request.assertionVersion);
|
|
54
|
-
return {
|
|
55
|
-
merkleRoot: ethers.getBytes(request.seal.merkleRoot),
|
|
56
|
-
authorAddress: ethers.getAddress(request.seal.authorAddress),
|
|
57
|
-
authorAttestationR: ethers.getBytes(request.seal.signature.r),
|
|
58
|
-
authorAttestationVS: ethers.getBytes(request.seal.signature.vs),
|
|
59
|
-
authorSchemeVersion: request.seal.schemeVersion,
|
|
60
|
-
chainId: BigInt(request.sealChainId),
|
|
61
|
-
kav10Address: ethers.getAddress(request.sealKav10Address),
|
|
62
|
-
finalizedAtIso: request.sealFinalizedAtIso,
|
|
63
|
-
contentScopeVersion: GRAPH_KA_CONTENT_SCOPE_VERSION,
|
|
64
|
-
kaUal: graphScope.ual,
|
|
65
|
-
assertionVersion: graphScope.assertionVersion,
|
|
66
|
-
publicTripleCount: request.publicTripleCount,
|
|
67
|
-
...(request.privateMerkleRoot
|
|
68
|
-
? { privateMerkleRoot: ethers.getBytes(request.privateMerkleRoot) }
|
|
69
|
-
: {}),
|
|
70
|
-
privateTripleCount: request.privateTripleCount,
|
|
71
|
-
rootEntities: [],
|
|
72
|
-
...(request.seal.reservedKaId !== undefined
|
|
73
|
-
? { reservedKaId: BigInt(request.seal.reservedKaId) }
|
|
74
|
-
: {}),
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
/** Canonical immutable projection of the persisted queued-publish request. */
|
|
78
|
-
export function createKnowledgeAssetVmPublishIntentKey(request) {
|
|
79
|
-
const canonicalIntent = {
|
|
80
|
-
contextGraphId: request.contextGraphId,
|
|
81
|
-
name: request.name,
|
|
82
|
-
agentAddress: request.agentAddress ?? null,
|
|
83
|
-
subGraphName: request.subGraphName ?? null,
|
|
84
|
-
shareOperationId: request.shareOperationId,
|
|
85
|
-
roots: request.roots,
|
|
86
|
-
contentScopeVersion: request.contentScopeVersion ?? null,
|
|
87
|
-
kaUal: request.kaUal ?? null,
|
|
88
|
-
assertionVersion: request.assertionVersion ?? null,
|
|
89
|
-
publicTripleCount: request.publicTripleCount ?? null,
|
|
90
|
-
privateMerkleRoot: request.privateMerkleRoot?.toLowerCase() ?? null,
|
|
91
|
-
privateTripleCount: request.privateTripleCount ?? null,
|
|
92
|
-
accessPolicy: request.accessPolicy ?? null,
|
|
93
|
-
allowedPeers: request.allowedPeers ?? [],
|
|
94
|
-
entityProofs: request.entityProofs ?? null,
|
|
95
|
-
sealMerkleRoot: request.sealMerkleRoot.toLowerCase(),
|
|
96
|
-
seal: request.seal,
|
|
97
|
-
sealChainId: request.sealChainId,
|
|
98
|
-
sealKav10Address: request.sealKav10Address,
|
|
99
|
-
sealFinalizedAtIso: request.sealFinalizedAtIso,
|
|
100
|
-
wmCurrentAssertion: request.wmCurrentAssertion ?? null,
|
|
101
|
-
swmCurrentAssertion: request.swmCurrentAssertion ?? null,
|
|
102
|
-
vmCurrentAssertion: request.vmCurrentAssertion ?? null,
|
|
103
|
-
kaNumber: request.kaNumber ?? null,
|
|
104
|
-
reservedUal: request.reservedUal ?? null,
|
|
105
|
-
publishEpochs: request.publishEpochs ?? null,
|
|
106
|
-
// Keep the pre-feature canonical JSON unchanged when the policy is omitted.
|
|
107
|
-
...(request.pricingPolicy !== undefined
|
|
108
|
-
? { pricingPolicy: request.pricingPolicy }
|
|
109
|
-
: {}),
|
|
110
|
-
clearSharedMemoryAfter: request.clearSharedMemoryAfter ?? null,
|
|
111
|
-
publisherNodeIdentityIdOverride: request.publisherNodeIdentityIdOverride ?? null,
|
|
112
|
-
};
|
|
113
|
-
return `sha256:${createHash('sha256').update(JSON.stringify(canonicalIntent)).digest('hex')}`;
|
|
114
|
-
}
|
|
115
38
|
/**
|
|
116
39
|
* #1116 (round 11) — stable code tagged on the `assertionFinalize` throws that are
|
|
117
40
|
* recoverable SIGNING/CHAIN CAPABILITY GAPS (no local signing key, non-V10 chain
|
|
@@ -155,6 +78,24 @@ function updateAttestationNotCustodialError(authorAddress) {
|
|
|
155
78
|
function rootlessUpdateError(code, message) {
|
|
156
79
|
return new RootlessUpdateError(code, message);
|
|
157
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* GH#2958 — a finalized update numbered anything but `confirmed + 1` can never be published: the
|
|
83
|
+
* publisher, the StorageACK handler, peers and the chain all require exactly that number. Coded
|
|
84
|
+
* `PUBLISH_INTENT_STALE` (the draft no longer matches what can be published) so the async lane
|
|
85
|
+
* records a terminal pre-send failure instead of the retryable `rpc_unavailable` an untyped
|
|
86
|
+
* error falls into, and both publish routes answer 409. The recovery depends on which way the
|
|
87
|
+
* number is off: a draft numbered too high keeps its shared content, a draft numbered too low
|
|
88
|
+
* means the published version moved on, so it is re-based on that.
|
|
89
|
+
*/
|
|
90
|
+
function versionGapError(kaUal, sealVersion, requiredVersion) {
|
|
91
|
+
const sealed = BigInt(sealVersion);
|
|
92
|
+
const recovery = sealed > requiredVersion
|
|
93
|
+
? 'Re-open the draft with wm/pull-from (layer "swm" keeps the shared content), then finalize and share it again.'
|
|
94
|
+
: 'The published version has moved on since this draft was finalized: re-base it with wm/pull-from '
|
|
95
|
+
+ '(layer "vm"), re-apply your edits, then finalize and share it again.';
|
|
96
|
+
return Object.assign(new Error(`Cannot publish the update of ${kaUal}: this finalized version is numbered ${sealed}, but the next `
|
|
97
|
+
+ `publishable version is ${requiredVersion} (the confirmed version is ${requiredVersion - 1n}). ${recovery}`), { code: 'PUBLISH_INTENT_STALE' });
|
|
98
|
+
}
|
|
158
99
|
function latestShareOperationId(history) {
|
|
159
100
|
const promoted = [...history.events]
|
|
160
101
|
.reverse()
|
|
@@ -986,14 +927,25 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
986
927
|
if (!opts?.localOnly && promoted.gossipPayload) {
|
|
987
928
|
await this.publishWorkspaceGossip(contextGraphId, promoted.gossipPayload, ctx, gossipSigner, promoted.shareOperationId);
|
|
988
929
|
}
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
930
|
+
try {
|
|
931
|
+
await this.afterDurableSwmPromotionV1({
|
|
932
|
+
contextGraphId,
|
|
933
|
+
subGraphName: opts?.subGraphName,
|
|
934
|
+
assertionCoordinate: assertionName,
|
|
935
|
+
lifecycleAgentAddress,
|
|
936
|
+
shareOperationId: promoted.shareOperationId,
|
|
937
|
+
ctx,
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
catch {
|
|
941
|
+
// Deliberately best-effort here (the stamp already logged its cause).
|
|
942
|
+
// This entry point mints a fresh `async-<uuid>` assertion per call, so
|
|
943
|
+
// surfacing the error would hand the caller a failure for a name it
|
|
944
|
+
// cannot replay, inviting a re-publish under a NEW identity. The VM
|
|
945
|
+
// publish queued below stamps `vmCurrentAssertion`, and an absent swm
|
|
946
|
+
// pointer is then the valid divergence-only shape (swm == vm).
|
|
947
|
+
// Named-KA shares (`assertion.promote`) do surface and replay the failure.
|
|
948
|
+
}
|
|
997
949
|
const intent = await this.resolveFinalizedAssertionVmPublishIntent(contextGraphId, assertionName, {
|
|
998
950
|
agentAddress: lifecycleAgentAddress,
|
|
999
951
|
subGraphName: opts?.subGraphName,
|
|
@@ -1350,8 +1302,7 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
1350
1302
|
}
|
|
1351
1303
|
if (opts.assertionVersion !== undefined
|
|
1352
1304
|
&& BigInt(opts.assertionVersion) !== BigInt(nextAssertionVersion)) {
|
|
1353
|
-
throw
|
|
1354
|
-
`the durable current version to ${nextAssertionVersion}`);
|
|
1305
|
+
throw versionGapError(updateScope.ual, opts.assertionVersion, BigInt(nextAssertionVersion));
|
|
1355
1306
|
}
|
|
1356
1307
|
if (opts.publicTripleCount !== undefined
|
|
1357
1308
|
&& opts.publicTripleCount !== canonicalParts.publicQuads.length) {
|
|
@@ -1505,7 +1456,10 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
1505
1456
|
const result = await publisher.updateKnowledgeAssetFromStagedSharedWorkingMemoryV1(kaId, publisherUpdateOptions);
|
|
1506
1457
|
this.log.info(ctx, `Update complete — status=${result.status}`);
|
|
1507
1458
|
onPhase?.('broadcast', 'start');
|
|
1508
|
-
|
|
1459
|
+
// Members of a curated graph pick up an update from the chain update
|
|
1460
|
+
// event, which refreshes their Verifiable Memory from the curator. The
|
|
1461
|
+
// graph's update topic carries public updates only.
|
|
1462
|
+
if (result.onChainResult && result.publicQuads && !isCuratedUpdate) {
|
|
1509
1463
|
try {
|
|
1510
1464
|
const dataGraph = knowledgeAssetLayerGraphUri(contextGraphId, MemoryLayer.VerifiableMemory, updateScope, opts?.subGraphName);
|
|
1511
1465
|
const nquadsStr = result.publicQuads
|
|
@@ -2238,6 +2192,18 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
2238
2192
|
`KaNumberAllocator on the agent (daemon lifecycle) or supply a ` +
|
|
2239
2193
|
`preSignedAuthorAttestation whose reservedKaId lives in the author's namespace.`), { code: SEAL_CAPABILITY_GAP_CODE });
|
|
2240
2194
|
}
|
|
2195
|
+
// GH#2958 — a draft of a PUBLISHED KA is numbered from the confirmed record `update()` will
|
|
2196
|
+
// validate, not from the lifecycle counter. That counter is "last FINALIZED": it only ever
|
|
2197
|
+
// grows, so every finalized update that is abandoned before it is published (superseded,
|
|
2198
|
+
// discarded, replaced by pull-from) would push the next draft one number too high, past
|
|
2199
|
+
// what `update()`, the publisher and the chain accept, and the KA could never be updated
|
|
2200
|
+
// again. An abandoned draft instead shares its number with its successor, as an
|
|
2201
|
+
// unpublished mint already does. The lifecycle counter above stays the fallback for a
|
|
2202
|
+
// record that cannot answer. The number is not signed (the attestation binds merkleRoot,
|
|
2203
|
+
// author, reservedKaId and scheme), so deriving it here changes no signature.
|
|
2204
|
+
if (hasConfirmedVm) {
|
|
2205
|
+
assertionVersion = await this._nextUpdateVersionOrUndefined(reservedKaId, contextGraphId, opts?.subGraphName) ?? assertionVersion;
|
|
2206
|
+
}
|
|
2241
2207
|
// 8. Build EIP-712 typed data (binds reservedKaId — OT-RFC-43 §F2).
|
|
2242
2208
|
const typedData = buildAuthorAttestationTypedData({
|
|
2243
2209
|
chainId,
|
|
@@ -2748,12 +2714,21 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
2748
2714
|
recipientKeyId: r.recipientKeyId,
|
|
2749
2715
|
})),
|
|
2750
2716
|
});
|
|
2717
|
+
const recipientRouteHash = computeSwmSenderKeyRecipientRouteHash({
|
|
2718
|
+
contextGraphId,
|
|
2719
|
+
subGraphName,
|
|
2720
|
+
recipients: resolution.recipients,
|
|
2721
|
+
});
|
|
2751
2722
|
const stateKey = swmSenderStateKey(contextGraphId, subGraphName, senderAddress);
|
|
2752
2723
|
let state = this.swmSenderKeySendStates.get(stateKey);
|
|
2753
|
-
if (!state
|
|
2724
|
+
if (!state
|
|
2725
|
+
|| state.membershipHash !== membershipHash
|
|
2726
|
+
|| state.recipientRouteHash !== recipientRouteHash) {
|
|
2754
2727
|
const reason = !state
|
|
2755
2728
|
? 'no persisted state'
|
|
2756
|
-
:
|
|
2729
|
+
: state.membershipHash !== membershipHash
|
|
2730
|
+
? `membership changed (was=${state.membershipHash} now=${membershipHash})`
|
|
2731
|
+
: `recipient routes changed (was=${state.recipientRouteHash ?? 'legacy-untracked'} now=${recipientRouteHash})`;
|
|
2757
2732
|
this.log.info(ctx, `${logPrefix}: bootstrapping/rotating swm-sender-key epoch for curated CG ${contextGraphId} ` +
|
|
2758
2733
|
`(sender=${senderAddress}, recipients=${resolution.recipients.length}, reason=${reason})`);
|
|
2759
2734
|
const pruned = this.prunePendingSenderKeysForEpochRotation({
|
|
@@ -2778,7 +2753,12 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
2778
2753
|
await this.saveSwmSenderKeyState();
|
|
2779
2754
|
}
|
|
2780
2755
|
else {
|
|
2781
|
-
await this.drainPendingSenderKeyForRecipients(resolution.recipients, ctx
|
|
2756
|
+
await this.drainPendingSenderKeyForRecipients(resolution.recipients, ctx, {
|
|
2757
|
+
contextGraphId,
|
|
2758
|
+
subGraphName,
|
|
2759
|
+
senderAgentAddress: state.senderAgentAddress,
|
|
2760
|
+
epochId: state.epochId,
|
|
2761
|
+
});
|
|
2782
2762
|
}
|
|
2783
2763
|
return {
|
|
2784
2764
|
chainKey: state.chainKey,
|
|
@@ -3202,6 +3182,17 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
3202
3182
|
throw Object.assign(new Error(`Cannot publish "${name}" asynchronously: the current SWM share has no sealed assertion pointer. ` +
|
|
3203
3183
|
`Finalize and share the full asset before publishing.`), { code: 'PUBLISH_INTENT_STALE' });
|
|
3204
3184
|
}
|
|
3185
|
+
if (operationPlan.kind === 'update') {
|
|
3186
|
+
// GH#2958 — refuse a finalized update `update()` is going to refuse, here, before a job
|
|
3187
|
+
// exists, so the client learns it at the moment it can act. Last, so every recovery this
|
|
3188
|
+
// error recommends (re-open from the shared copy) is possible whenever it is raised. A
|
|
3189
|
+
// confirmed record that cannot answer leaves the decision to `update()`.
|
|
3190
|
+
const sealScope = createGraphKnowledgeAssetScope(seal.kaUal, seal.assertionVersion);
|
|
3191
|
+
const requiredVersion = await this._nextUpdateVersionOrUndefined(packKnowledgeAssetIdFromIdentity(sealScope), contextGraphId, opts?.subGraphName);
|
|
3192
|
+
if (requiredVersion !== undefined && requiredVersion !== BigInt(seal.assertionVersion)) {
|
|
3193
|
+
throw versionGapError(seal.kaUal, seal.assertionVersion, requiredVersion);
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3205
3196
|
const sealMerkleRoot = (merkleBare.startsWith('0x') ? merkleBare : `0x${merkleBare}`);
|
|
3206
3197
|
const queuedSeal = {
|
|
3207
3198
|
merkleRoot: ethers.hexlify(seal.merkleRoot),
|
|
@@ -3261,43 +3252,32 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
3261
3252
|
intentKey: createKnowledgeAssetVmPublishIntentKey(request),
|
|
3262
3253
|
};
|
|
3263
3254
|
}
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3255
|
+
/**
|
|
3256
|
+
* GH#2958 — the version a finalized update of this KA must carry, read from the SAME confirmed
|
|
3257
|
+
* record `update()` validates, so the number a draft is sealed with and the number `update()`
|
|
3258
|
+
* demands cannot disagree. `undefined` when that record cannot answer (not materialized here,
|
|
3259
|
+
* not confirmed yet, corrupt or legacy): the caller then falls back to its own rule. Anything
|
|
3260
|
+
* else (a store failure) propagates - a transient read error must never silently pick a number.
|
|
3261
|
+
*/
|
|
3262
|
+
async _nextUpdateVersionOrUndefined(kaId, contextGraphId, subGraphName) {
|
|
3267
3263
|
try {
|
|
3268
|
-
const
|
|
3269
|
-
|
|
3270
|
-
graphManager: new GraphManager(this.store),
|
|
3271
|
-
request: snapshot,
|
|
3272
|
-
publicSnapshotStore: this.publicSnapshotStore,
|
|
3273
|
-
});
|
|
3274
|
-
validateLiftPublishPayload({
|
|
3275
|
-
request: snapshot,
|
|
3276
|
-
metadata: snapshotMetadata,
|
|
3277
|
-
resolved,
|
|
3278
|
-
});
|
|
3279
|
-
if (resolved.quads.length === 0 && (resolved.privateQuads ?? []).length === 0) {
|
|
3280
|
-
throw new Error(`No queued shared-memory snapshot quads for context graph ${request.contextGraphId} ` +
|
|
3281
|
-
`share operation ${request.shareOperationId}`);
|
|
3282
|
-
}
|
|
3264
|
+
const scope = await resolveDirectRootlessUpdateScope(this, this.chain.chainId, kaId, contextGraphId, subGraphName);
|
|
3265
|
+
return BigInt(scope.assertionVersion);
|
|
3283
3266
|
}
|
|
3284
3267
|
catch (err) {
|
|
3285
|
-
if (err instanceof LegacyKnowledgeAssetReadOnlyError)
|
|
3268
|
+
if (!isRootlessUpdateError(err) && !(err instanceof LegacyKnowledgeAssetReadOnlyError))
|
|
3286
3269
|
throw err;
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
(err instanceof Error ? err.message : String(err)));
|
|
3290
|
-
wrapped.code = 'PUBLISH_INTENT_STALE';
|
|
3291
|
-
throw wrapped;
|
|
3270
|
+
this.log.debug(createOperationContext('publish'), `The confirmed record of KA ${kaId} cannot number its next update (${err.code}); using the lifecycle counter`);
|
|
3271
|
+
return undefined;
|
|
3292
3272
|
}
|
|
3293
3273
|
}
|
|
3274
|
+
async preflightKnowledgeAssetVmPublishSnapshot(request) {
|
|
3275
|
+
return preflightKnowledgeAssetVmPublishSnapshot({
|
|
3276
|
+
store: this.store, publicSnapshotStore: this.publicSnapshotStore, log: this.log, request,
|
|
3277
|
+
});
|
|
3278
|
+
}
|
|
3294
3279
|
async preflightQueuedKnowledgeAssetVmPublishExecution(request, opts) {
|
|
3295
|
-
if (request
|
|
3296
|
-
|| request.kaUal === undefined
|
|
3297
|
-
|| request.assertionVersion === undefined
|
|
3298
|
-
|| request.publicTripleCount === undefined
|
|
3299
|
-
|| request.privateTripleCount === undefined
|
|
3300
|
-
|| request.roots.length !== 0) {
|
|
3280
|
+
if (!isGraphScopedKnowledgeAssetVmPublishRequest(request)) {
|
|
3301
3281
|
throw new LegacyKnowledgeAssetReadOnlyError();
|
|
3302
3282
|
}
|
|
3303
3283
|
createGraphKnowledgeAssetScope(request.kaUal, request.assertionVersion);
|
|
@@ -3380,10 +3360,10 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
3380
3360
|
throw stale(`Knowledge asset VM publish intent for "${request.name}" changed after enqueue: ` +
|
|
3381
3361
|
'the immutable SWM access envelope no longer matches the queued request.');
|
|
3382
3362
|
}
|
|
3383
|
-
//
|
|
3384
|
-
//
|
|
3385
|
-
//
|
|
3386
|
-
//
|
|
3363
|
+
// The swm pointer is a divergence-only projection, and `publishAsync`
|
|
3364
|
+
// keeps its stamp best-effort. The lifecycle row can therefore be absent
|
|
3365
|
+
// even though the complete-share marker and immutable graph-scoped head
|
|
3366
|
+
// both committed. Absence alone is not proof that the queued content
|
|
3387
3367
|
// changed: the exact operation id, assertion version, access envelope and
|
|
3388
3368
|
// queued WM root above are the durable authority. A present-but-different
|
|
3389
3369
|
// SWM pointer remains terminally stale via the comparison above.
|
|
@@ -3484,12 +3464,7 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
3484
3464
|
}
|
|
3485
3465
|
async _finalizeRecoveredQueuedKnowledgeAssetVmPublish(input, ctx) {
|
|
3486
3466
|
const { request, job, lookup, recovery, signal } = input;
|
|
3487
|
-
if (request
|
|
3488
|
-
|| request.kaUal === undefined
|
|
3489
|
-
|| request.assertionVersion === undefined
|
|
3490
|
-
|| request.publicTripleCount === undefined
|
|
3491
|
-
|| request.privateTripleCount === undefined
|
|
3492
|
-
|| request.roots.length !== 0) {
|
|
3467
|
+
if (!isGraphScopedKnowledgeAssetVmPublishRequest(request)) {
|
|
3493
3468
|
throw new LegacyKnowledgeAssetReadOnlyError();
|
|
3494
3469
|
}
|
|
3495
3470
|
const recovered = await normalizeRecoveredNamedKaPublish({
|
|
@@ -3697,11 +3672,7 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
3697
3672
|
if (request.contentScopeVersion !== GRAPH_KA_CONTENT_SCOPE_VERSION) {
|
|
3698
3673
|
throw new LegacyKnowledgeAssetReadOnlyError();
|
|
3699
3674
|
}
|
|
3700
|
-
if (request
|
|
3701
|
-
|| request.kaUal === undefined
|
|
3702
|
-
|| request.assertionVersion === undefined
|
|
3703
|
-
|| request.publicTripleCount === undefined
|
|
3704
|
-
|| request.privateTripleCount === undefined) {
|
|
3675
|
+
if (!isGraphScopedKnowledgeAssetVmPublishRequest(request)) {
|
|
3705
3676
|
throw new Error('Queued graph-scoped VM publish has an incomplete KA content envelope');
|
|
3706
3677
|
}
|
|
3707
3678
|
const graphScope = createGraphKnowledgeAssetScope(request.kaUal, request.assertionVersion);
|
|
@@ -3791,12 +3762,14 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
3791
3762
|
let result;
|
|
3792
3763
|
const clearPublishedGraph = async (label) => {
|
|
3793
3764
|
try {
|
|
3794
|
-
await publisher.clearPublishedKnowledgeAssetSwm(request.contextGraphId, sharedMemoryScope, request.subGraphName, ctx, graphScope.ual);
|
|
3765
|
+
await publisher.clearPublishedKnowledgeAssetSwm(request.contextGraphId, sharedMemoryScope, request.subGraphName, ctx, graphScope.ual, graphScope.assertionVersion);
|
|
3795
3766
|
}
|
|
3796
3767
|
catch (err) {
|
|
3797
3768
|
this.log.warn(ctx, `Failed to clear published SWM graph after confirmed queued ${label} of <${lifecycleUri}>: ` +
|
|
3798
3769
|
(err instanceof Error ? err.message : String(err)));
|
|
3770
|
+
return;
|
|
3799
3771
|
}
|
|
3772
|
+
await this.retireLegacySwmAfterConfirmedLocalPublish(request.contextGraphId, graphScope.ual, graphScope.assertionVersion, request.subGraphName, ctx);
|
|
3800
3773
|
};
|
|
3801
3774
|
const clearRemainingSharedMemory = async () => {
|
|
3802
3775
|
try {
|
|
@@ -4022,29 +3995,6 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
4022
3995
|
catch {
|
|
4023
3996
|
this.log.warn(ctx, `No peers subscribed to ${topic} yet`);
|
|
4024
3997
|
}
|
|
4025
|
-
try {
|
|
4026
|
-
const gm = new GraphManager(this.store);
|
|
4027
|
-
const wsMetaGraph = request.subGraphName
|
|
4028
|
-
? gm.sharedMemoryMetaUri(request.contextGraphId, request.subGraphName)
|
|
4029
|
-
: contextGraphWorkspaceMetaGraphUri(request.contextGraphId);
|
|
4030
|
-
const keepLiteral = `"${keepRootCopyOnLabel}"`;
|
|
4031
|
-
for (const root of rootEntities.filter(isSafeIri)) {
|
|
4032
|
-
await deleteByPatternWithoutCount(this.store, {
|
|
4033
|
-
subject: root,
|
|
4034
|
-
predicate: KEEP_ROOT_COPY_PREDICATE,
|
|
4035
|
-
graph: wsMetaGraph,
|
|
4036
|
-
});
|
|
4037
|
-
await this.store.insert([{
|
|
4038
|
-
subject: root,
|
|
4039
|
-
predicate: KEEP_ROOT_COPY_PREDICATE,
|
|
4040
|
-
object: keepLiteral,
|
|
4041
|
-
graph: wsMetaGraph,
|
|
4042
|
-
}]);
|
|
4043
|
-
}
|
|
4044
|
-
}
|
|
4045
|
-
catch (err) {
|
|
4046
|
-
this.log.warn(ctx, `Failed to persist keepRootCopyOnLabel signal for ${result.ual}: ${err instanceof Error ? err.message : String(err)}`);
|
|
4047
|
-
}
|
|
4048
3998
|
}
|
|
4049
3999
|
if (result.status === 'confirmed') {
|
|
4050
4000
|
try {
|
|
@@ -4261,7 +4211,8 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
4261
4211
|
// that mirrored the share), so SWM and VM permanently disagreed.
|
|
4262
4212
|
if (result.status === 'confirmed') {
|
|
4263
4213
|
try {
|
|
4264
|
-
await publisher.clearPublishedKnowledgeAssetSwm(contextGraphId, sharedMemoryScope, opts?.subGraphName, opts?.operationCtx ?? createOperationContext('publishFromSWM'), graphScope.ual);
|
|
4214
|
+
await publisher.clearPublishedKnowledgeAssetSwm(contextGraphId, sharedMemoryScope, opts?.subGraphName, opts?.operationCtx ?? createOperationContext('publishFromSWM'), graphScope.ual, graphScope.assertionVersion);
|
|
4215
|
+
await this.retireLegacySwmAfterConfirmedLocalPublish(contextGraphId, graphScope.ual, graphScope.assertionVersion, opts?.subGraphName, opts?.operationCtx ?? createOperationContext('publishFromSWM'));
|
|
4265
4216
|
}
|
|
4266
4217
|
catch (err) {
|
|
4267
4218
|
this.log.warn(opts?.operationCtx ?? createOperationContext('publishFromSWM'), `Failed to clear SWM after confirmed update of <${lifecycleUri}>: ` +
|
|
@@ -4527,6 +4478,21 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
4527
4478
|
return;
|
|
4528
4479
|
await this.observeRfc64ConfirmedVmV1(input);
|
|
4529
4480
|
}
|
|
4481
|
+
/** The local confirmed publisher has already written VM and drained this exact SWM root. */
|
|
4482
|
+
async retireLegacySwmAfterConfirmedLocalPublish(contextGraphId, kaUal, assertionVersion, subGraphName, ctx) {
|
|
4483
|
+
try {
|
|
4484
|
+
await this.retireLegacySwmAfterVerifiedVmTwin({
|
|
4485
|
+
contextGraphId,
|
|
4486
|
+
kaUal,
|
|
4487
|
+
assertionVersion,
|
|
4488
|
+
subGraphName,
|
|
4489
|
+
});
|
|
4490
|
+
}
|
|
4491
|
+
catch (err) {
|
|
4492
|
+
this.log.warn(ctx, `Failed to retire the legacy SWM boundary after confirmed local VM publish: ` +
|
|
4493
|
+
(err instanceof Error ? err.message : String(err)));
|
|
4494
|
+
}
|
|
4495
|
+
}
|
|
4530
4496
|
/**
|
|
4531
4497
|
* OT-RFC-43 A2 — mint a `precomputedUpdateAttestation` over
|
|
4532
4498
|
* `UpdateAuthorAttestation(kaId, newMerkleRoot=seal.merkleRoot, author)` for
|
|
@@ -4641,10 +4607,16 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
4641
4607
|
* OT-RFC-43 A2 (decision 2) — stamp `dkg:swmCurrentAssertion` on the
|
|
4642
4608
|
* lifecycle URN when an assertion is promoted/shared into SWM. The pointer
|
|
4643
4609
|
* value is the assertion's sealed merkle root hex (read from the seal on the
|
|
4644
|
-
* assertion-graph URI).
|
|
4645
|
-
*
|
|
4646
|
-
*
|
|
4647
|
-
*
|
|
4610
|
+
* assertion-graph URI). A missing seal (a non-finalized promote) leaves the
|
|
4611
|
+
* SWM pointer unset, which `deriveStatus` reads as "not yet wm-sealed for
|
|
4612
|
+
* SWM".
|
|
4613
|
+
*
|
|
4614
|
+
* A store failure is logged and RETHROWN. The SWM share already committed, so
|
|
4615
|
+
* the caller owns the classification: swallowing it here left a share that
|
|
4616
|
+
* reported success with a permanently missing root (GH#2901). The stamp is an
|
|
4617
|
+
* idempotent drop-then-set, so replaying the already-committed operation is
|
|
4618
|
+
* the repair. The drop and the set are two store calls: until that replay, a
|
|
4619
|
+
* failure between them leaves the committed share with no pointer.
|
|
4648
4620
|
*/
|
|
4649
4621
|
async _stampSwmPointer(contextGraphId, name, agentAddress, subGraphName) {
|
|
4650
4622
|
try {
|
|
@@ -4665,52 +4637,26 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
4665
4637
|
catch (err) {
|
|
4666
4638
|
this.log.warn(createOperationContext('share'), `Failed to stamp swmCurrentAssertion for "${name}" in "${contextGraphId}": ` +
|
|
4667
4639
|
(err instanceof Error ? err.message : String(err)));
|
|
4640
|
+
throw err;
|
|
4668
4641
|
}
|
|
4669
4642
|
}
|
|
4670
|
-
/**
|
|
4671
|
-
* OT-RFC-49 legacy compatibility — ensure a curated CG's public `_catalog`
|
|
4672
|
-
* floor is in SWM for an arbitrary root-selected combined-model publish.
|
|
4673
|
-
*
|
|
4674
|
-
* New graph-scoped KAs never call this helper: they keep the catalog detached
|
|
4675
|
-
* from WM/SWM and derive its proof material at the publisher boundary. This
|
|
4676
|
-
* remains only for legacy selection-based publishes whose author seal and KC
|
|
4677
|
-
* root intentionally use the historical combined model.
|
|
4678
|
-
*
|
|
4679
|
-
* IDEMPOTENT: repeated insertion dedupes in the store/V10 Merkle path because
|
|
4680
|
-
* the floor is deterministic, so `catalogLeafCount` stays stable across
|
|
4681
|
-
* repeated legacy selection publishes.
|
|
4682
|
-
*
|
|
4683
|
-
* Returns a possibly-extended `selection`: for a `{rootEntities}` publish the
|
|
4684
|
-
* CG-DID catalog subject is appended so it is in scope for BOTH the author seal
|
|
4685
|
-
* (`_loadSelectedSWMQuads`) and the publisher's reload — which scope identically.
|
|
4686
|
-
* For `selection: 'all'` the selection is returned unchanged (both already read
|
|
4687
|
-
* the whole SWM graph). The generated floor is written into the same explicit
|
|
4688
|
-
* graph scope as the publish; otherwise an exact named-lifecycle read would
|
|
4689
|
-
* correctly exclude a floor left in the legacy bucket.
|
|
4690
|
-
*/
|
|
4691
|
-
async _ensureCuratedCatalogInSwm(contextGraphId, selection, subGraphName, ctx, scope = { kind: 'complete-family' }) {
|
|
4692
|
-
const swmGraph = contextGraphSharedMemoryUri(contextGraphId, subGraphName);
|
|
4693
|
-
const catalogTargetGraph = canonicalSharedMemoryScopeWriteGraph(swmGraph, scope);
|
|
4694
|
-
const cgDid = contextGraphDataUri(contextGraphId);
|
|
4695
|
-
const { quads: catalogQuads } = appendMissingGeneratedPrivateCatalogFloor(contextGraphId, [], catalogTargetGraph);
|
|
4696
|
-
await this.store.insert(catalogQuads);
|
|
4697
|
-
this.log.info(ctx, `OT-RFC-49: ensured ${catalogQuads.length}-quad public _catalog floor in SWM for curated CG ${contextGraphId} (from-SWM publish without finalize)`);
|
|
4698
|
-
if (selection !== 'all' && !selection.rootEntities.includes(cgDid)) {
|
|
4699
|
-
return { rootEntities: [...selection.rootEntities, cgDid] };
|
|
4700
|
-
}
|
|
4701
|
-
return selection;
|
|
4702
|
-
}
|
|
4703
4643
|
/**
|
|
4704
4644
|
* Publish shared memory content: read from SWM graph and publish with full finality (data graph + chain).
|
|
4705
4645
|
* After on-chain confirmation, broadcasts a lightweight FinalizationMessage so peers with matching
|
|
4706
4646
|
* SWM state can promote it to canonical without re-downloading the full payload.
|
|
4707
4647
|
*
|
|
4708
|
-
*
|
|
4709
|
-
*
|
|
4710
|
-
*
|
|
4711
|
-
*
|
|
4712
|
-
*
|
|
4713
|
-
*
|
|
4648
|
+
* The publish must be graph-scoped (`contentScopeVersion`, `kaUal`,
|
|
4649
|
+
* `assertionVersion`): a call without that scope is refused with
|
|
4650
|
+
* `LegacyKnowledgeAssetReadOnlyError`. `publishFromFinalizedAssertion`
|
|
4651
|
+
* supplies the scope from the finalized seal and is the entry point for
|
|
4652
|
+
* callers that hold a named assertion.
|
|
4653
|
+
*
|
|
4654
|
+
* #1116 (round 9) — INTENTIONALLY NOT marker-gated. This is the internal
|
|
4655
|
+
* substrate entry (#1087): without a precomputed seal it mints a FRESH inline
|
|
4656
|
+
* seal over the selected slice rather than consuming a finalized named
|
|
4657
|
+
* lifecycle, so the swmShareComplete full-share invariant does not apply. The
|
|
4658
|
+
* marker gate lives on `publishFromFinalizedAssertion` (the named-lifecycle
|
|
4659
|
+
* /vm/publish path) only.
|
|
4714
4660
|
*/
|
|
4715
4661
|
async publishFromSharedMemory(contextGraphId, selection, options) {
|
|
4716
4662
|
return withSpan('agent.publish_from_swm', async (span) => {
|
|
@@ -4725,6 +4671,16 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
4725
4671
|
...(chainId ? { 'dkg.chain_id': chainId } : {}),
|
|
4726
4672
|
});
|
|
4727
4673
|
const ctx = options?.operationCtx ?? createOperationContext('publishFromSWM');
|
|
4674
|
+
// A publish names the Knowledge Asset's own graph. Root-entity Knowledge
|
|
4675
|
+
// Assets are read-only: peers finalize nothing else, and a Core keeps no
|
|
4676
|
+
// copy of such a publish that it could promote.
|
|
4677
|
+
if (options?.contentScopeVersion !== GRAPH_KA_CONTENT_SCOPE_VERSION) {
|
|
4678
|
+
const scopeVersion = options?.contentScopeVersion;
|
|
4679
|
+
if (scopeVersion === undefined || scopeVersion === 0 || scopeVersion === 1) {
|
|
4680
|
+
throw new LegacyKnowledgeAssetReadOnlyError();
|
|
4681
|
+
}
|
|
4682
|
+
throw new Error(`Unsupported KA content scope version ${scopeVersion}`);
|
|
4683
|
+
}
|
|
4728
4684
|
const effectiveSubCG = options?.subContextGraphId ?? options?.contextGraphId;
|
|
4729
4685
|
// `ctxGraphIdStr` doubles as `publishContextGraphId` for REMAP-flow
|
|
4730
4686
|
// publishes — the publisher uses its presence as a signal to DELETE the
|
|
@@ -4733,17 +4689,6 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
4733
4689
|
const ctxGraphIdStr = effectiveSubCG != null ? String(effectiveSubCG) : undefined;
|
|
4734
4690
|
const onChainId = ctxGraphIdStr ?? (await this.getContextGraphOnChainId(contextGraphId)) ?? undefined;
|
|
4735
4691
|
const v10ACKProvider = this.createV10ACKProvider(contextGraphId);
|
|
4736
|
-
// OT-RFC-49 catalog handling differs by content model. Legacy arbitrary
|
|
4737
|
-
// SWM selections retain their combined-model floor injection. A V2 named
|
|
4738
|
-
// lifecycle carries only the trusted floor capability: the publisher
|
|
4739
|
-
// derives a detached catalog commitment without altering the exact KA
|
|
4740
|
-
// graph or its author seal.
|
|
4741
|
-
const graphScopedPublish = options?.contentScopeVersion === GRAPH_KA_CONTENT_SCOPE_VERSION;
|
|
4742
|
-
let localTrustedNonManifestCatalogTriples;
|
|
4743
|
-
if (!graphScopedPublish && onChainId != null && (await this.isPrivateContextGraph(contextGraphId))) {
|
|
4744
|
-
localTrustedNonManifestCatalogTriples = generatedPrivateCatalogTripleKeys(contextGraphId);
|
|
4745
|
-
selection = await this._ensureCuratedCatalogInSwm(contextGraphId, selection, options?.subGraphName, ctx, options?.sharedMemoryScope);
|
|
4746
|
-
}
|
|
4747
4692
|
// RFC-001 §9.x — selection-based publish bridge. If the caller
|
|
4748
4693
|
// already sealed the content (named-assertion lifecycle) they
|
|
4749
4694
|
// pass `precomputedAttestation` through and we forward verbatim.
|
|
@@ -4769,7 +4714,7 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
4769
4714
|
...(options?.schemeVersion !== undefined
|
|
4770
4715
|
? { schemeVersion: options.schemeVersion }
|
|
4771
4716
|
: {}),
|
|
4772
|
-
graphScoped:
|
|
4717
|
+
graphScoped: true,
|
|
4773
4718
|
});
|
|
4774
4719
|
}
|
|
4775
4720
|
}
|
|
@@ -4802,17 +4747,16 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
4802
4747
|
this.log.info(ctx, `LU-11: curated CG ${contextGraphId} — chunked path active (per-chunk SWM gossip + V2 ACK)`);
|
|
4803
4748
|
}
|
|
4804
4749
|
// V2 curation is decided by the live chain-aware encryption resolver, not
|
|
4805
|
-
// by a second local `_meta` read.
|
|
4806
|
-
//
|
|
4807
|
-
//
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
: localTrustedNonManifestCatalogTriples;
|
|
4750
|
+
// by a second local `_meta` read. The publish carries the detached catalog
|
|
4751
|
+
// (OT-RFC-49) whenever the exact same operation was resolved as curated:
|
|
4752
|
+
// the publisher derives its commitment without altering the exact KA graph
|
|
4753
|
+
// or its author seal.
|
|
4754
|
+
const trustedNonManifestCatalogTriples = resolveCuratedV2CatalogCapability({
|
|
4755
|
+
contextGraphId,
|
|
4756
|
+
graphScoped: true,
|
|
4757
|
+
onChainContextGraphId: onChainId,
|
|
4758
|
+
encryptInlinePayload,
|
|
4759
|
+
});
|
|
4816
4760
|
const publisher = options?.publisherOverride ?? this.publisher;
|
|
4817
4761
|
const result = await publisher.publishFromSharedMemory(contextGraphId, selection, {
|
|
4818
4762
|
operationCtx: ctx,
|
|
@@ -4841,6 +4785,11 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
4841
4785
|
encryptInlinePayload,
|
|
4842
4786
|
encryptInlineChunked,
|
|
4843
4787
|
});
|
|
4788
|
+
if (result.status === 'confirmed'
|
|
4789
|
+
&& options?.kaUal !== undefined
|
|
4790
|
+
&& options.assertionVersion !== undefined) {
|
|
4791
|
+
await this.retireLegacySwmAfterConfirmedLocalPublish(contextGraphId, options.kaUal, String(options.assertionVersion), options.subGraphName, ctx);
|
|
4792
|
+
}
|
|
4844
4793
|
span.setAttribute('dkg.publish_status', result.status);
|
|
4845
4794
|
if (result.status === 'failed') {
|
|
4846
4795
|
span.setStatus({ code: SpanStatusCode.ERROR });
|
|
@@ -4892,19 +4841,15 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
4892
4841
|
targetContextGraphId: result.contextGraphError ? undefined : broadcastCgId,
|
|
4893
4842
|
subGraphName: options?.subGraphName,
|
|
4894
4843
|
keepRootCopyOnLabel,
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
...(options.privateMerkleRoot
|
|
4901
|
-
? { privateMerkleRoot: options.privateMerkleRoot }
|
|
4902
|
-
: {}),
|
|
4903
|
-
privateTripleCount: options.privateTripleCount ?? 0,
|
|
4904
|
-
accessPolicy: result.accessPolicy ?? 'ownerOnly',
|
|
4905
|
-
allowedPeers: result.allowedPeers ?? [],
|
|
4906
|
-
}
|
|
4844
|
+
contentScopeVersion: GRAPH_KA_CONTENT_SCOPE_VERSION,
|
|
4845
|
+
assertionVersion: String(options.assertionVersion),
|
|
4846
|
+
publicTripleCount: options.publicTripleCount ?? 0,
|
|
4847
|
+
...(options.privateMerkleRoot
|
|
4848
|
+
? { privateMerkleRoot: options.privateMerkleRoot }
|
|
4907
4849
|
: {}),
|
|
4850
|
+
privateTripleCount: options.privateTripleCount ?? 0,
|
|
4851
|
+
accessPolicy: result.accessPolicy ?? 'ownerOnly',
|
|
4852
|
+
allowedPeers: result.allowedPeers ?? [],
|
|
4908
4853
|
};
|
|
4909
4854
|
const topic = contextGraphFinalizationTopic(contextGraphId);
|
|
4910
4855
|
try {
|
|
@@ -4914,38 +4859,6 @@ export class PublishMethods extends DKGAgentBase {
|
|
|
4914
4859
|
catch {
|
|
4915
4860
|
this.log.warn(ctx, `No peers subscribed to ${topic} yet`);
|
|
4916
4861
|
}
|
|
4917
|
-
// Durable keep-root signal. The gossip envelope's `keepRootCopyOnLabel`
|
|
4918
|
-
// only reaches peers online for the broadcast; a subscriber that missed
|
|
4919
|
-
// it later recovers the publish via the chain-driven reconcile sweep,
|
|
4920
|
-
// which has no wire to learn the dual-write intent from. Persist the same
|
|
4921
|
-
// decision per root into SWM workspace meta — co-located with the per-root
|
|
4922
|
-
// `privateMerkleRoot` that already replicates to subscribers — so the
|
|
4923
|
-
// reconcile path can mirror the gossip dual-write decision. Read back by
|
|
4924
|
-
// `FinalizationHandler.getKeepRootCopySignal`. Updates reuse a root
|
|
4925
|
-
// entity, so replace any prior value rather than accumulate.
|
|
4926
|
-
try {
|
|
4927
|
-
const gm = new GraphManager(this.store);
|
|
4928
|
-
const wsMetaGraph = options?.subGraphName
|
|
4929
|
-
? gm.sharedMemoryMetaUri(contextGraphId, options.subGraphName)
|
|
4930
|
-
: contextGraphWorkspaceMetaGraphUri(contextGraphId);
|
|
4931
|
-
const keepLiteral = `"${keepRootCopyOnLabel}"`;
|
|
4932
|
-
for (const root of rootEntities.filter(isSafeIri)) {
|
|
4933
|
-
await deleteByPatternWithoutCount(this.store, {
|
|
4934
|
-
subject: root,
|
|
4935
|
-
predicate: KEEP_ROOT_COPY_PREDICATE,
|
|
4936
|
-
graph: wsMetaGraph,
|
|
4937
|
-
});
|
|
4938
|
-
await this.store.insert([{
|
|
4939
|
-
subject: root,
|
|
4940
|
-
predicate: KEEP_ROOT_COPY_PREDICATE,
|
|
4941
|
-
object: keepLiteral,
|
|
4942
|
-
graph: wsMetaGraph,
|
|
4943
|
-
}]);
|
|
4944
|
-
}
|
|
4945
|
-
}
|
|
4946
|
-
catch (err) {
|
|
4947
|
-
this.log.warn(ctx, `Failed to persist keepRootCopyOnLabel signal for ${result.ual}: ${err instanceof Error ? err.message : String(err)}`);
|
|
4948
|
-
}
|
|
4949
4862
|
}
|
|
4950
4863
|
recordPublishOutcome(result.status, 'swm', publishStartedAt, chainId);
|
|
4951
4864
|
return result;
|