@zlink-systems/framework 0.30.1 → 0.30.2
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/.tsbuildinfo +1 -1
- package/dist/contracts/Common/ZLinkEncodedPayload.d.ts +6 -0
- package/dist/contracts/Common/ZLinkEncodedPayload.js +18 -3
- package/dist/contracts/Common/encoded-payload-storage.d.ts +1 -1
- package/dist/contracts/Common/encoded-payload-storage.js +5 -2
- package/dist/contracts/Configuration/Builders.d.ts +1 -1
- package/dist/contracts/Configuration/RegistrationBuilderPolicy.d.ts +2 -1
- package/dist/contracts/Configuration/RegistrationBuilderPolicy.js +5 -1
- package/dist/contracts/Configuration/RegistrationBuilders.js +2 -2
- package/dist/contracts/Configuration/RegistrationTypes.d.ts +1 -0
- package/dist/contracts/Dispatch/ZLinkDispatchOptions.d.ts +2 -2
- package/dist/contracts/Locations/Rows.d.ts +2 -0
- package/dist/contracts/Spots/Contracts.d.ts +4 -0
- package/dist/contracts/Spots/ZLinkSpot.d.ts +3 -3
- package/dist/runtime/abort.d.ts +5 -0
- package/dist/runtime/abort.js +10 -0
- package/dist/runtime/actors/actor-authority-publication.js +3 -2
- package/dist/runtime/actors/actor-client.d.ts +0 -1
- package/dist/runtime/actors/actor-client.js +38 -45
- package/dist/runtime/actors/actor-context.d.ts +2 -0
- package/dist/runtime/actors/actor-context.js +46 -9
- package/dist/runtime/actors/actor-handoff.d.ts +7 -3
- package/dist/runtime/actors/actor-handoff.js +212 -88
- package/dist/runtime/actors/actor-join-relocation.d.ts +2 -0
- package/dist/runtime/actors/actor-local-native-join.js +4 -0
- package/dist/runtime/actors/actor-mailbox.js +27 -1
- package/dist/runtime/actors/actor-remote-joiner.js +3 -1
- package/dist/runtime/actors/actor-reply.d.ts +4 -0
- package/dist/runtime/actors/actor-reply.js +29 -0
- package/dist/runtime/actors/actor-runtime-contracts.d.ts +2 -0
- package/dist/runtime/actors/actor-runtime-state.js +2 -20
- package/dist/runtime/actors/actor-source-transfer.d.ts +1 -17
- package/dist/runtime/actors/index.d.ts +6 -2
- package/dist/runtime/actors/index.js +37 -21
- package/dist/runtime/actors/session-disconnected-wire.d.ts +8 -0
- package/dist/runtime/actors/session-disconnected-wire.js +48 -0
- package/dist/runtime/admission.d.ts +9 -1
- package/dist/runtime/admission.js +55 -32
- package/dist/runtime/application-jobs/application-job-queue-scope.d.ts +13 -0
- package/dist/runtime/application-jobs/application-job-queue-scope.js +27 -1
- package/dist/runtime/application-jobs/contracts.d.ts +2 -0
- package/dist/runtime/backend/contracts/index.d.ts +19 -3
- package/dist/runtime/backend/mesh-actor-session-node-adapter.js +2 -2
- package/dist/runtime/backend/mesh-completion-table.js +5 -0
- package/dist/runtime/backend/mesh-dispatch-pump.d.ts +26 -2
- package/dist/runtime/backend/mesh-dispatch-pump.js +193 -107
- package/dist/runtime/backend/node/node-raw-binding-port.js +90 -58
- package/dist/runtime/backend/node/node-raw-mesh-backend.d.ts +33 -8
- package/dist/runtime/backend/node/node-raw-mesh-backend.js +142 -143
- package/dist/runtime/backend/node/node-socket-backend-adapter.d.ts +1 -1
- package/dist/runtime/backend/node/node-socket-backend-adapter.js +5 -5
- package/dist/runtime/channels/channel-clients.d.ts +1 -0
- package/dist/runtime/channels/channel-clients.js +20 -5
- package/dist/runtime/channels/channel-dispatch-pipeline.d.ts +22 -3
- package/dist/runtime/channels/channel-dispatch-pipeline.js +103 -57
- package/dist/runtime/channels/channel-dispatchers.d.ts +3 -2
- package/dist/runtime/channels/channel-dispatchers.js +44 -37
- package/dist/runtime/channels/channel-envelope.d.ts +1 -0
- package/dist/runtime/channels/channel-envelope.js +74 -31
- package/dist/runtime/channels/channel-runtime-lifecycle.d.ts +4 -3
- package/dist/runtime/channels/channel-runtime-lifecycle.js +19 -24
- package/dist/runtime/channels/channel-runtime-manager.d.ts +3 -2
- package/dist/runtime/channels/channel-runtime-manager.js +4 -4
- package/dist/runtime/channels/channel-transports.d.ts +0 -1
- package/dist/runtime/channels/channel-transports.js +35 -33
- package/dist/runtime/channels/client-server-location-runtime.js +5 -4
- package/dist/runtime/channels/dispatch-error-reporter.d.ts +2 -1
- package/dist/runtime/channels/dispatch-error-reporter.js +2 -1
- package/dist/runtime/channels/fanout-location-runtime.d.ts +1 -1
- package/dist/runtime/channels/fanout-location-runtime.js +3 -3
- package/dist/runtime/diagnostics/flow-context.js +19 -7
- package/dist/runtime/diagnostics/index.js +4 -9
- package/dist/runtime/diagnostics/message-flow.d.ts +8 -0
- package/dist/runtime/diagnostics/message-flow.js +35 -5
- package/dist/runtime/diagnostics/runtime-metrics.d.ts +2 -2
- package/dist/runtime/diagnostics/runtime-metrics.js +10 -8
- package/dist/runtime/execution/index.d.ts +4 -2
- package/dist/runtime/execution/index.js +33 -10
- package/dist/runtime/execution/serial-execution-queue.d.ts +4 -0
- package/dist/runtime/execution/serial-execution-queue.js +21 -2
- package/dist/runtime/execution/state-lane.d.ts +2 -0
- package/dist/runtime/execution/state-lane.js +5 -0
- package/dist/runtime/foundation/operation-registry.d.ts +25 -1
- package/dist/runtime/foundation/operation-registry.js +86 -18
- package/dist/runtime/foundation/raw-service-mesh-runtime.d.ts +39 -3
- package/dist/runtime/foundation/raw-service-mesh-runtime.js +151 -55
- package/dist/runtime/foundation/service-liveness-registry.d.ts +12 -1
- package/dist/runtime/foundation/service-liveness-registry.js +38 -0
- package/dist/runtime/foundation/service-mailbox.d.ts +7 -0
- package/dist/runtime/foundation/service-maintenance-runtime.js +1 -6
- package/dist/runtime/foundation/service-relocation-object-owner.d.ts +2 -3
- package/dist/runtime/foundation/service-relocation-object-owner.js +48 -35
- package/dist/runtime/foundation/service-relocation-runtime.js +7 -3
- package/dist/runtime/foundation/service-runtime-contracts.d.ts +8 -1
- package/dist/runtime/foundation/service-session-binding-ingress-port.d.ts +2 -1
- package/dist/runtime/foundation/service-stateful-registry.d.ts +5 -4
- package/dist/runtime/foundation/service-stateful-registry.js +24 -26
- package/dist/runtime/foundation/service-stateful-runtime.d.ts +72 -6
- package/dist/runtime/foundation/service-stateful-runtime.js +444 -117
- package/dist/runtime/foundation/service-stateful-wire-codec.d.ts +14 -1
- package/dist/runtime/foundation/service-stateful-wire-codec.js +48 -27
- package/dist/runtime/foundation/service-wire-binary-primitives.d.ts +6 -1
- package/dist/runtime/foundation/service-wire-binary-primitives.js +27 -11
- package/dist/runtime/foundation/service-wire-constants.generated.d.ts +1 -0
- package/dist/runtime/foundation/service-wire-constants.generated.js +1 -0
- package/dist/runtime/foundation/service-wire-m6a-codec.d.ts +10 -0
- package/dist/runtime/foundation/service-wire-m6a-codec.js +166 -53
- package/dist/runtime/host/actor-packet-relay.d.ts +6 -4
- package/dist/runtime/host/actor-packet-relay.js +59 -72
- package/dist/runtime/host/actor-placement-coordinator.js +25 -8
- package/dist/runtime/host/actor-transfer-runtime.d.ts +7 -31
- package/dist/runtime/host/actor-transfer-runtime.js +85 -331
- package/dist/runtime/host/application-job-queue.d.ts +24 -3
- package/dist/runtime/host/application-job-queue.js +28 -41
- package/dist/runtime/host/index.d.ts +5 -1
- package/dist/runtime/host/index.js +171 -97
- package/dist/runtime/host/location-runtime-owner.js +2 -6
- package/dist/runtime/host/mesh-router-resolver.d.ts +4 -0
- package/dist/runtime/host/mesh-router-resolver.js +14 -6
- package/dist/runtime/host/remote-bound-session-relay.d.ts +2 -4
- package/dist/runtime/host/remote-bound-session-relay.js +71 -190
- package/dist/runtime/host/route-mesh-runtime.d.ts +2 -2
- package/dist/runtime/host/route-mesh-runtime.js +5 -3
- package/dist/runtime/host/runtime-shutdown.d.ts +1 -0
- package/dist/runtime/host/runtime-shutdown.js +3 -2
- package/dist/runtime/host/service-relocation-host-runtime.d.ts +17 -7
- package/dist/runtime/host/service-relocation-host-runtime.js +550 -367
- package/dist/runtime/host/spot-runtime-options-factory.js +15 -7
- package/dist/runtime/host/user-spot-creation-coordinator.js +33 -84
- package/dist/runtime/locations/auto-connect-loop.d.ts +2 -0
- package/dist/runtime/locations/auto-connect-loop.js +22 -14
- package/dist/runtime/locations/auto-connect-reconciler.js +0 -6
- package/dist/runtime/locations/auto-connect-types.d.ts +0 -1
- package/dist/runtime/locations/descriptor-publication.d.ts +4 -0
- package/dist/runtime/locations/descriptor-publication.js +11 -0
- package/dist/runtime/locations/domain-store-contract.d.ts +1 -0
- package/dist/runtime/locations/in-memory-authority-store.d.ts +7 -1
- package/dist/runtime/locations/in-memory-authority-store.js +56 -19
- package/dist/runtime/locations/in-memory-location-store.js +1 -10
- package/dist/runtime/locations/index.d.ts +1 -0
- package/dist/runtime/locations/index.js +1 -0
- package/dist/runtime/locations/lease-tracker.js +1 -6
- package/dist/runtime/locations/location-store-repository.d.ts +51 -1
- package/dist/runtime/locations/location-store-repository.js +363 -139
- package/dist/runtime/locations/relocation-blob.d.ts +18 -1
- package/dist/runtime/locations/relocation-blob.js +52 -1
- package/dist/runtime/locations/request-source-resolver.d.ts +37 -0
- package/dist/runtime/locations/request-source-resolver.js +80 -0
- package/dist/runtime/locations/resolvers.js +1 -1
- package/dist/runtime/locations/runtime.d.ts +6 -2
- package/dist/runtime/locations/runtime.js +37 -30
- package/dist/runtime/messaging/payload-codec.d.ts +7 -1
- package/dist/runtime/messaging/payload-codec.js +7 -6
- package/dist/runtime/messaging/request-result.js +29 -26
- package/dist/runtime/protocol/service_wire_codec.generated.d.ts +19 -1
- package/dist/runtime/protocol/service_wire_codec.generated.js +85 -0
- package/dist/runtime/protocol/service_wire_pilot_codec.generated.d.ts +7 -1
- package/dist/runtime/protocol/service_wire_pilot_codec.generated.js +23 -7
- package/dist/runtime/spots/formal-remote-actor-admission-registry.js +3 -2
- package/dist/runtime/spots/index.d.ts +18 -11
- package/dist/runtime/spots/index.js +234 -176
- package/dist/runtime/spots/spot-activation-registry.d.ts +4 -2
- package/dist/runtime/spots/spot-activation-registry.js +21 -11
- package/dist/runtime/spots/spot-activation-state.d.ts +1 -1
- package/dist/runtime/spots/spot-activation-state.js +7 -7
- package/dist/runtime/spots/spot-activation.d.ts +6 -3
- package/dist/runtime/spots/spot-activation.js +123 -44
- package/dist/runtime/spots/spot-actor-admission-coordinator.d.ts +1 -0
- package/dist/runtime/spots/spot-actor-admission-coordinator.js +13 -22
- package/dist/runtime/spots/spot-actor-membership.d.ts +0 -1
- package/dist/runtime/spots/spot-actor-membership.js +0 -8
- package/dist/runtime/spots/spot-actor-packet-dispatch.js +33 -8
- package/dist/runtime/spots/spot-actor-packet-drain.js +5 -33
- package/dist/runtime/spots/spot-entry-activation.d.ts +2 -0
- package/dist/runtime/spots/spot-entry-activation.js +14 -9
- package/dist/runtime/spots/spot-handler-registry.d.ts +4 -3
- package/dist/runtime/spots/spot-handler-registry.js +6 -2
- package/dist/runtime/spots/spot-manager-internal-contracts.d.ts +2 -2
- package/dist/runtime/spots/spot-manager-public.js +2 -2
- package/dist/runtime/spots/spot-node-autoconnect.d.ts +2 -1
- package/dist/runtime/spots/spot-node-autoconnect.js +18 -39
- package/dist/runtime/spots/spot-node-runtime-manager.d.ts +19 -2
- package/dist/runtime/spots/spot-node-runtime-manager.js +115 -50
- package/dist/runtime/spots/spot-outbound.js +3 -3
- package/dist/runtime/spots/spot-remote-codec.js +5 -1
- package/dist/runtime/spots/spot-runtime-ports.d.ts +0 -1
- package/dist/runtime/spots/spot-serial-executor.d.ts +10 -0
- package/dist/runtime/spots/spot-serial-executor.js +61 -8
- package/dist/runtime/spots/spot-serial-turn-executor.js +19 -2
- package/dist/runtime/spots/spot-subscription-dispatch.js +1 -1
- package/dist/runtime/spots/spot-timer.d.ts +57 -5
- package/dist/runtime/spots/spot-timer.js +287 -103
- package/dist/runtime/streams/actor-session-binding-registry.d.ts +42 -11
- package/dist/runtime/streams/actor-session-binding-registry.js +165 -48
- package/dist/runtime/streams/actor-session-binding-runtime-owner.d.ts +8 -4
- package/dist/runtime/streams/bound-actor-relay-sender.d.ts +2 -1
- package/dist/runtime/streams/bound-actor-relay-sender.js +15 -8
- package/dist/runtime/streams/bound-session-service.d.ts +1 -1
- package/dist/runtime/streams/bound-session-service.js +6 -11
- package/dist/runtime/streams/index.d.ts +3 -2
- package/dist/runtime/streams/index.js +6 -4
- package/dist/runtime/streams/managed-stream.js +3 -2
- package/dist/runtime/streams/native-fallback-bound-session.js +8 -73
- package/dist/runtime/streams/session-actor-coordinator.d.ts +2 -8
- package/dist/runtime/streams/session-actor-coordinator.js +15 -32
- package/dist/runtime/streams/stream-binding-runtime-ports.d.ts +3 -10
- package/dist/runtime/streams/stream-session-runtime.js +1 -4
- package/dist/runtime/workers/index.js +1 -1
- package/package.json +3 -3
- package/src/contracts/Common/ZLinkEncodedPayload.ts +24 -4
- package/src/contracts/Common/encoded-payload-storage.ts +6 -3
- package/src/contracts/Configuration/Builders.ts +4 -1
- package/src/contracts/Configuration/RegistrationBuilderPolicy.ts +7 -2
- package/src/contracts/Configuration/RegistrationBuilders.ts +6 -2
- package/src/contracts/Configuration/RegistrationTypes.ts +1 -0
- package/src/contracts/Dispatch/ZLinkDispatchOptions.ts +2 -1
- package/src/contracts/Locations/Rows.ts +2 -0
- package/src/contracts/Spots/Contracts.ts +8 -0
- package/src/contracts/Spots/ZLinkSpot.ts +3 -3
- package/src/runtime/abort.ts +12 -0
- package/src/runtime/actors/actor-authority-publication.ts +3 -2
- package/src/runtime/actors/actor-client.ts +61 -70
- package/src/runtime/actors/actor-context.ts +49 -9
- package/src/runtime/actors/actor-handoff.ts +282 -106
- package/src/runtime/actors/actor-join-relocation.ts +2 -0
- package/src/runtime/actors/actor-local-native-join.ts +4 -0
- package/src/runtime/actors/actor-mailbox.ts +40 -2
- package/src/runtime/actors/actor-remote-joiner.ts +6 -1
- package/src/runtime/actors/actor-reply.ts +42 -0
- package/src/runtime/actors/actor-runtime-contracts.ts +2 -0
- package/src/runtime/actors/actor-runtime-state.ts +2 -20
- package/src/runtime/actors/actor-source-transfer.ts +1 -34
- package/src/runtime/actors/index.ts +41 -27
- package/src/runtime/actors/session-disconnected-wire.ts +66 -0
- package/src/runtime/admission.ts +69 -34
- package/src/runtime/application-jobs/application-job-queue-scope.ts +33 -1
- package/src/runtime/application-jobs/contracts.ts +2 -0
- package/src/runtime/backend/contracts/index.ts +39 -4
- package/src/runtime/backend/mesh-actor-session-node-adapter.ts +5 -3
- package/src/runtime/backend/mesh-completion-table.ts +4 -0
- package/src/runtime/backend/mesh-dispatch-pump.ts +223 -124
- package/src/runtime/backend/node/node-raw-binding-port.ts +106 -70
- package/src/runtime/backend/node/node-raw-mesh-backend.ts +221 -170
- package/src/runtime/backend/node/node-socket-backend-adapter.ts +5 -5
- package/src/runtime/channels/channel-clients.ts +49 -24
- package/src/runtime/channels/channel-dispatch-pipeline.ts +173 -124
- package/src/runtime/channels/channel-dispatchers.ts +116 -72
- package/src/runtime/channels/channel-envelope.ts +105 -36
- package/src/runtime/channels/channel-runtime-lifecycle.ts +13 -13
- package/src/runtime/channels/channel-runtime-manager.ts +12 -5
- package/src/runtime/channels/channel-transports.ts +49 -58
- package/src/runtime/channels/client-server-location-runtime.ts +11 -10
- package/src/runtime/channels/dispatch-error-reporter.ts +4 -2
- package/src/runtime/channels/fanout-location-runtime.ts +17 -9
- package/src/runtime/diagnostics/flow-context.ts +20 -7
- package/src/runtime/diagnostics/index.ts +1 -7
- package/src/runtime/diagnostics/message-flow.ts +47 -9
- package/src/runtime/diagnostics/runtime-metrics.ts +12 -10
- package/src/runtime/execution/index.ts +40 -14
- package/src/runtime/execution/serial-execution-queue.ts +31 -4
- package/src/runtime/execution/state-lane.ts +7 -0
- package/src/runtime/foundation/operation-registry.ts +98 -20
- package/src/runtime/foundation/raw-service-mesh-runtime.ts +244 -67
- package/src/runtime/foundation/service-liveness-registry.ts +39 -0
- package/src/runtime/foundation/service-mailbox.ts +8 -0
- package/src/runtime/foundation/service-maintenance-runtime.ts +1 -8
- package/src/runtime/foundation/service-relocation-object-owner.ts +54 -37
- package/src/runtime/foundation/service-relocation-runtime.ts +7 -3
- package/src/runtime/foundation/service-runtime-contracts.ts +12 -1
- package/src/runtime/foundation/service-session-binding-ingress-port.ts +2 -1
- package/src/runtime/foundation/service-stateful-registry.ts +38 -35
- package/src/runtime/foundation/service-stateful-runtime.ts +667 -152
- package/src/runtime/foundation/service-stateful-wire-codec.ts +49 -11
- package/src/runtime/foundation/service-wire-binary-primitives.ts +35 -12
- package/src/runtime/foundation/service-wire-constants.generated.ts +1 -0
- package/src/runtime/foundation/service-wire-m6a-codec.ts +187 -51
- package/src/runtime/host/actor-packet-relay.ts +113 -94
- package/src/runtime/host/actor-placement-coordinator.ts +31 -8
- package/src/runtime/host/actor-transfer-runtime.ts +104 -430
- package/src/runtime/host/application-job-queue.ts +29 -44
- package/src/runtime/host/index.ts +286 -129
- package/src/runtime/host/location-runtime-owner.ts +2 -6
- package/src/runtime/host/mesh-router-resolver.ts +13 -5
- package/src/runtime/host/remote-bound-session-relay.ts +86 -248
- package/src/runtime/host/route-mesh-runtime.ts +11 -5
- package/src/runtime/host/runtime-shutdown.ts +15 -4
- package/src/runtime/host/service-relocation-host-runtime.ts +784 -475
- package/src/runtime/host/spot-runtime-options-factory.ts +18 -7
- package/src/runtime/host/user-spot-creation-coordinator.ts +41 -100
- package/src/runtime/locations/auto-connect-loop.ts +22 -14
- package/src/runtime/locations/auto-connect-reconciler.ts +0 -6
- package/src/runtime/locations/auto-connect-types.ts +0 -1
- package/src/runtime/locations/descriptor-publication.ts +7 -0
- package/src/runtime/locations/domain-store-contract.ts +5 -0
- package/src/runtime/locations/in-memory-authority-store.ts +85 -23
- package/src/runtime/locations/in-memory-location-store.ts +1 -12
- package/src/runtime/locations/index.ts +1 -0
- package/src/runtime/locations/lease-tracker.ts +2 -9
- package/src/runtime/locations/location-store-repository.ts +628 -152
- package/src/runtime/locations/relocation-blob.ts +75 -1
- package/src/runtime/locations/request-source-resolver.ts +138 -0
- package/src/runtime/locations/resolvers.ts +2 -2
- package/src/runtime/locations/runtime.ts +70 -40
- package/src/runtime/messaging/payload-codec.ts +8 -11
- package/src/runtime/messaging/request-result.ts +33 -29
- package/src/runtime/protocol/service_wire_codec.generated.ts +87 -4
- package/src/runtime/protocol/service_wire_pilot_codec.generated.ts +13 -10
- package/src/runtime/spots/formal-remote-actor-admission-registry.ts +3 -2
- package/src/runtime/spots/index.ts +375 -281
- package/src/runtime/spots/spot-activation-registry.ts +25 -13
- package/src/runtime/spots/spot-activation-state.ts +12 -19
- package/src/runtime/spots/spot-activation.ts +170 -86
- package/src/runtime/spots/spot-actor-admission-coordinator.ts +25 -55
- package/src/runtime/spots/spot-actor-membership.ts +0 -15
- package/src/runtime/spots/spot-actor-packet-dispatch.ts +56 -11
- package/src/runtime/spots/spot-actor-packet-drain.ts +9 -52
- package/src/runtime/spots/spot-entry-activation.ts +24 -19
- package/src/runtime/spots/spot-handler-registry.ts +15 -4
- package/src/runtime/spots/spot-manager-internal-contracts.ts +2 -2
- package/src/runtime/spots/spot-manager-public.ts +2 -2
- package/src/runtime/spots/spot-node-autoconnect.ts +22 -45
- package/src/runtime/spots/spot-node-runtime-manager.ts +197 -67
- package/src/runtime/spots/spot-outbound.ts +3 -3
- package/src/runtime/spots/spot-remote-codec.ts +9 -2
- package/src/runtime/spots/spot-runtime-ports.ts +0 -1
- package/src/runtime/spots/spot-serial-executor.ts +97 -25
- package/src/runtime/spots/spot-serial-turn-executor.ts +22 -3
- package/src/runtime/spots/spot-subscription-dispatch.ts +1 -1
- package/src/runtime/spots/spot-timer.ts +413 -157
- package/src/runtime/streams/actor-session-binding-registry.ts +236 -64
- package/src/runtime/streams/actor-session-binding-runtime-owner.ts +16 -8
- package/src/runtime/streams/bound-actor-relay-sender.ts +23 -9
- package/src/runtime/streams/bound-session-service.ts +7 -10
- package/src/runtime/streams/index.ts +12 -6
- package/src/runtime/streams/managed-stream.ts +4 -2
- package/src/runtime/streams/native-fallback-bound-session.ts +14 -103
- package/src/runtime/streams/session-actor-coordinator.ts +39 -88
- package/src/runtime/streams/stream-binding-runtime-ports.ts +3 -9
- package/src/runtime/streams/stream-session-runtime.ts +1 -5
- package/src/runtime/workers/index.ts +1 -1
|
@@ -1332,6 +1332,27 @@ function writeSourceCleanupState(input: SourceCleanupState, writer: Writer, cont
|
|
|
1332
1332
|
export function decodeSourceCleanupState(bytes: Uint8Array, context: ServiceWireDecoderContext): SourceCleanupState { const reader = new Reader(bytes); const value = readSourceCleanupState(reader, context, {}, 0); reader.done("source-cleanup-state"); return value; }
|
|
1333
1333
|
export function encodeSourceCleanupState(value: SourceCleanupState, context: ServiceWireDecoderContext): Uint8Array { const writer = new Writer(); writeSourceCleanupState(value, writer, context, {}, 0); return writer.result(); }
|
|
1334
1334
|
|
|
1335
|
+
export type SessionSealResult = "sealed" | "bindingAbsent";
|
|
1336
|
+
export function enumWireSessionSealResult(value: SessionSealResult): number { switch (value) {
|
|
1337
|
+
case "sealed": return 1;
|
|
1338
|
+
case "bindingAbsent": return 2;
|
|
1339
|
+
} }
|
|
1340
|
+
function readSessionSealResult(reader: Reader, context: ServiceWireDecoderContext, enclosing: any, flags: number): SessionSealResult {
|
|
1341
|
+
void context; void enclosing; void flags;
|
|
1342
|
+
const raw = reader.u(1); switch (Number(raw)) {
|
|
1343
|
+
case 1: return "sealed";
|
|
1344
|
+
case 2: return "bindingAbsent";
|
|
1345
|
+
default: fail("session-seal-result enum");
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
function writeSessionSealResult(input: SessionSealResult, writer: Writer, context: ServiceWireDecoderContext, enclosing: any, flags: number): void {
|
|
1350
|
+
void context; void enclosing; void flags; const value: any = input;
|
|
1351
|
+
writer.u(numeric(enumWireSessionSealResult(value)), 1);
|
|
1352
|
+
}
|
|
1353
|
+
export function decodeSessionSealResult(bytes: Uint8Array, context: ServiceWireDecoderContext): SessionSealResult { const reader = new Reader(bytes); const value = readSessionSealResult(reader, context, {}, 0); reader.done("session-seal-result"); return value; }
|
|
1354
|
+
export function encodeSessionSealResult(value: SessionSealResult, context: ServiceWireDecoderContext): Uint8Array { const writer = new Writer(); writeSessionSealResult(value, writer, context, {}, 0); return writer.result(); }
|
|
1355
|
+
|
|
1335
1356
|
export type ReplyRelayAckStatus = "terminalReceived" | "alreadyTerminal";
|
|
1336
1357
|
export function enumWireReplyRelayAckStatus(value: ReplyRelayAckStatus): number { switch (value) {
|
|
1337
1358
|
case "terminalReceived": return 1;
|
|
@@ -8835,7 +8856,7 @@ const frames: Uint8Array[] = [writer.result()];
|
|
|
8835
8856
|
return frames; }
|
|
8836
8857
|
export function validateInstanceSpotCommandRuntimePredicates(value: any, context: ServiceWireDecoderContext): void { void value; void context; }
|
|
8837
8858
|
|
|
8838
|
-
export type RelocationPrepareCommand = { readonly command: "relocationPrepare"; readonly flags: number; readonly relocation: RelocationId; readonly targetAttemptGeneration: NonzeroU64; readonly coordinator: RelocationCoordinatorFence; readonly target: RelocationTargetFence; readonly initiatorRole: RelocationRole; readonly object: RelocationObjectIdentity; readonly sourceNodeRid: Rid; readonly sourceNodeGeneration: NonzeroU64; readonly payloadTotalLength: RelocationLogicalLength; readonly payloadChunkCount: RelocationChunkCount; readonly payloadChecksumCrc32c: U32; readonly applicationVersion: ApplicationVersion; };
|
|
8859
|
+
export type RelocationPrepareCommand = { readonly command: "relocationPrepare"; readonly flags: number; readonly relocation: RelocationId; readonly targetAttemptGeneration: NonzeroU64; readonly coordinator: RelocationCoordinatorFence; readonly target: RelocationTargetFence; readonly initiatorRole: RelocationRole; readonly object: RelocationObjectIdentity; readonly sourceNodeRid: Rid; readonly sourceNodeGeneration: NonzeroU64; readonly payloadTotalLength: RelocationLogicalLength; readonly payloadChunkCount: RelocationChunkCount; readonly payloadChecksumCrc32c: U32; readonly applicationVersion: ApplicationVersion; readonly deadlineUnixMs: NonzeroU64; };
|
|
8839
8860
|
export function decodeRelocationPrepareCommand(frames: readonly Uint8Array[], context: ServiceWireDecoderContext): RelocationPrepareCommand { if (!frames.length) fail("relocationPrepare frames"); const reader = new Reader(frames[0]); if (Number(reader.u(1)) !== 90 || Number(reader.u(1)) !== 77 || Number(reader.u(1)) !== 1 || Number(reader.u(1)) !== 40) fail("relocationPrepare header"); const flags = Number(reader.u(1)); if ((flags & ~0) !== 0 || (flags & 0) !== 0) fail("relocationPrepare flags"); const value: any = { command: "relocationPrepare", flags };
|
|
8840
8861
|
value["relocation"] = readRelocationId(reader, context, value, flags);
|
|
8841
8862
|
|
|
@@ -8873,6 +8894,9 @@ export function decodeRelocationPrepareCommand(frames: readonly Uint8Array[], co
|
|
|
8873
8894
|
value["applicationVersion"] = readApplicationVersion(reader, context, value, flags);
|
|
8874
8895
|
|
|
8875
8896
|
|
|
8897
|
+
value["deadlineUnixMs"] = readNonzeroU64(reader, context, value, flags);
|
|
8898
|
+
|
|
8899
|
+
|
|
8876
8900
|
reader.done("relocationPrepare"); let frameIndex = 1;
|
|
8877
8901
|
|
|
8878
8902
|
if (frameIndex !== frames.length) fail("relocationPrepare frames");
|
|
@@ -8927,12 +8951,16 @@ export function encodeRelocationPrepareCommand(value: RelocationPrepareCommand,
|
|
|
8927
8951
|
|
|
8928
8952
|
|
|
8929
8953
|
writeApplicationVersion(numeric(value["applicationVersion"]), writer, context, value, value.flags);
|
|
8954
|
+
if (value["deadlineUnixMs"] === undefined) fail("deadlineUnixMs required");
|
|
8955
|
+
|
|
8956
|
+
|
|
8957
|
+
writeNonzeroU64(numeric(value["deadlineUnixMs"]), writer, context, value, value.flags);
|
|
8930
8958
|
const frames: Uint8Array[] = [writer.result()];
|
|
8931
8959
|
|
|
8932
8960
|
return frames; }
|
|
8933
8961
|
export function validateRelocationPrepareCommandRuntimePredicates(value: any, context: ServiceWireDecoderContext): void { void value; void context; }
|
|
8934
8962
|
|
|
8935
|
-
export type SessionRelocationSealCommand = { readonly command: "sessionRelocationSeal"; readonly flags: number; readonly relocation: RelocationId; readonly coordinator: RelocationCoordinatorFence; readonly senderRole: RelocationRole; readonly actor: ActorRouteFence; readonly sessionOwnerNodeRid: Rid; readonly sessionOwnerNodeGeneration: NonzeroU64; readonly sessionOwnerId: Text8; readonly sessionOwnerLeaseGeneration: NonzeroU64; readonly sessionRid: Rid; readonly bindingGeneration: NonzeroU64; };
|
|
8963
|
+
export type SessionRelocationSealCommand = { readonly command: "sessionRelocationSeal"; readonly flags: number; readonly relocation: RelocationId; readonly coordinator: RelocationCoordinatorFence; readonly senderRole: RelocationRole; readonly actor: ActorRouteFence; readonly sessionOwnerNodeRid: Rid; readonly sessionOwnerNodeGeneration: NonzeroU64; readonly sessionOwnerId: Text8; readonly sessionOwnerLeaseGeneration: NonzeroU64; readonly sessionRid: Rid; readonly bindingGeneration: NonzeroU64; readonly targetNodeRid: Rid; readonly targetNodeGeneration: NonzeroU64; };
|
|
8936
8964
|
export function decodeSessionRelocationSealCommand(frames: readonly Uint8Array[], context: ServiceWireDecoderContext): SessionRelocationSealCommand { if (!frames.length) fail("sessionRelocationSeal frames"); const reader = new Reader(frames[0]); if (Number(reader.u(1)) !== 90 || Number(reader.u(1)) !== 77 || Number(reader.u(1)) !== 1 || Number(reader.u(1)) !== 42) fail("sessionRelocationSeal header"); const flags = Number(reader.u(1)); if ((flags & ~0) !== 0 || (flags & 0) !== 0) fail("sessionRelocationSeal flags"); const value: any = { command: "sessionRelocationSeal", flags };
|
|
8937
8965
|
value["relocation"] = readRelocationId(reader, context, value, flags);
|
|
8938
8966
|
|
|
@@ -8964,6 +8992,12 @@ export function decodeSessionRelocationSealCommand(frames: readonly Uint8Array[]
|
|
|
8964
8992
|
value["bindingGeneration"] = readNonzeroU64(reader, context, value, flags);
|
|
8965
8993
|
|
|
8966
8994
|
|
|
8995
|
+
value["targetNodeRid"] = readRid(reader, context, value, flags);
|
|
8996
|
+
|
|
8997
|
+
|
|
8998
|
+
value["targetNodeGeneration"] = readNonzeroU64(reader, context, value, flags);
|
|
8999
|
+
|
|
9000
|
+
|
|
8967
9001
|
reader.done("sessionRelocationSeal"); let frameIndex = 1;
|
|
8968
9002
|
|
|
8969
9003
|
if (frameIndex !== frames.length) fail("sessionRelocationSeal frames");
|
|
@@ -9010,12 +9044,20 @@ export function encodeSessionRelocationSealCommand(value: SessionRelocationSealC
|
|
|
9010
9044
|
|
|
9011
9045
|
|
|
9012
9046
|
writeNonzeroU64(numeric(value["bindingGeneration"]), writer, context, value, value.flags);
|
|
9047
|
+
if (value["targetNodeRid"] === undefined) fail("targetNodeRid required");
|
|
9048
|
+
|
|
9049
|
+
|
|
9050
|
+
writeRid(value["targetNodeRid"], writer, context, value, value.flags);
|
|
9051
|
+
if (value["targetNodeGeneration"] === undefined) fail("targetNodeGeneration required");
|
|
9052
|
+
|
|
9053
|
+
|
|
9054
|
+
writeNonzeroU64(numeric(value["targetNodeGeneration"]), writer, context, value, value.flags);
|
|
9013
9055
|
const frames: Uint8Array[] = [writer.result()];
|
|
9014
9056
|
|
|
9015
9057
|
return frames; }
|
|
9016
9058
|
export function validateSessionRelocationSealCommandRuntimePredicates(value: any, context: ServiceWireDecoderContext): void { void value; void context; }
|
|
9017
9059
|
|
|
9018
|
-
export type SessionRelocationSealedCommand = { readonly command: "sessionRelocationSealed"; readonly flags: number; readonly relocation: RelocationId; readonly coordinator: RelocationCoordinatorFence; readonly actor: ActorRouteFence; readonly sessionOwnerNodeRid: Rid; readonly sessionOwnerNodeGeneration: NonzeroU64; readonly sessionOwnerId: Text8; readonly sessionOwnerLeaseGeneration: NonzeroU64; readonly sessionRid: Rid; readonly bindingGeneration: NonzeroU64; };
|
|
9060
|
+
export type SessionRelocationSealedCommand = { readonly command: "sessionRelocationSealed"; readonly flags: number; readonly relocation: RelocationId; readonly coordinator: RelocationCoordinatorFence; readonly actor: ActorRouteFence; readonly sessionOwnerNodeRid: Rid; readonly sessionOwnerNodeGeneration: NonzeroU64; readonly sessionOwnerId: Text8; readonly sessionOwnerLeaseGeneration: NonzeroU64; readonly sessionRid: Rid; readonly bindingGeneration: NonzeroU64; readonly sealResult: SessionSealResult; };
|
|
9019
9061
|
export function decodeSessionRelocationSealedCommand(frames: readonly Uint8Array[], context: ServiceWireDecoderContext): SessionRelocationSealedCommand { if (!frames.length) fail("sessionRelocationSealed frames"); const reader = new Reader(frames[0]); if (Number(reader.u(1)) !== 90 || Number(reader.u(1)) !== 77 || Number(reader.u(1)) !== 1 || Number(reader.u(1)) !== 43) fail("sessionRelocationSealed header"); const flags = Number(reader.u(1)); if ((flags & ~0) !== 0 || (flags & 0) !== 0) fail("sessionRelocationSealed flags"); const value: any = { command: "sessionRelocationSealed", flags };
|
|
9020
9062
|
value["relocation"] = readRelocationId(reader, context, value, flags);
|
|
9021
9063
|
|
|
@@ -9044,6 +9086,9 @@ export function decodeSessionRelocationSealedCommand(frames: readonly Uint8Array
|
|
|
9044
9086
|
value["bindingGeneration"] = readNonzeroU64(reader, context, value, flags);
|
|
9045
9087
|
|
|
9046
9088
|
|
|
9089
|
+
value["sealResult"] = readSessionSealResult(reader, context, value, flags);
|
|
9090
|
+
|
|
9091
|
+
|
|
9047
9092
|
reader.done("sessionRelocationSealed"); let frameIndex = 1;
|
|
9048
9093
|
|
|
9049
9094
|
if (frameIndex !== frames.length) fail("sessionRelocationSealed frames");
|
|
@@ -9086,6 +9131,10 @@ export function encodeSessionRelocationSealedCommand(value: SessionRelocationSea
|
|
|
9086
9131
|
|
|
9087
9132
|
|
|
9088
9133
|
writeNonzeroU64(numeric(value["bindingGeneration"]), writer, context, value, value.flags);
|
|
9134
|
+
if (value["sealResult"] === undefined) fail("sealResult required");
|
|
9135
|
+
|
|
9136
|
+
|
|
9137
|
+
writeSessionSealResult(value["sealResult"], writer, context, value, value.flags);
|
|
9089
9138
|
const frames: Uint8Array[] = [writer.result()];
|
|
9090
9139
|
|
|
9091
9140
|
return frames; }
|
|
@@ -9600,7 +9649,41 @@ const frames: Uint8Array[] = [writer.result()];
|
|
|
9600
9649
|
return frames; }
|
|
9601
9650
|
export function validateRelocationFailedCommandRuntimePredicates(value: any, context: ServiceWireDecoderContext): void { void value; void context; }
|
|
9602
9651
|
|
|
9603
|
-
export type
|
|
9652
|
+
export type BoundSessionCloseCommand = { readonly command: "boundSessionClose"; readonly flags: number; readonly correlation: NonzeroU64; readonly actor: ActorRef; readonly session: RetiredBoundSessionRouteFence; };
|
|
9653
|
+
export function decodeBoundSessionCloseCommand(frames: readonly Uint8Array[], context: ServiceWireDecoderContext): BoundSessionCloseCommand { if (!frames.length) fail("boundSessionClose frames"); const reader = new Reader(frames[0]); if (Number(reader.u(1)) !== 90 || Number(reader.u(1)) !== 77 || Number(reader.u(1)) !== 1 || Number(reader.u(1)) !== 54) fail("boundSessionClose header"); const flags = Number(reader.u(1)); if ((flags & ~0) !== 0 || (flags & 0) !== 0) fail("boundSessionClose flags"); const value: any = { command: "boundSessionClose", flags };
|
|
9654
|
+
value["correlation"] = readNonzeroU64(reader, context, value, flags);
|
|
9655
|
+
|
|
9656
|
+
|
|
9657
|
+
value["actor"] = readActorRef(reader, context, value, flags);
|
|
9658
|
+
|
|
9659
|
+
|
|
9660
|
+
value["session"] = readRetiredBoundSessionRouteFence(reader, context, value, flags);
|
|
9661
|
+
|
|
9662
|
+
|
|
9663
|
+
reader.done("boundSessionClose"); let frameIndex = 1;
|
|
9664
|
+
|
|
9665
|
+
if (frameIndex !== frames.length) fail("boundSessionClose frames");
|
|
9666
|
+
|
|
9667
|
+
return value; }
|
|
9668
|
+
export function encodeBoundSessionCloseCommand(value: BoundSessionCloseCommand, context: ServiceWireDecoderContext): readonly Uint8Array[] { if ((value.flags & ~0) !== 0 || (value.flags & 0) !== 0) fail("boundSessionClose flags"); const writer = new Writer(); writer.put([90,77, 1, 54, value.flags]);
|
|
9669
|
+
if (value["correlation"] === undefined) fail("correlation required");
|
|
9670
|
+
|
|
9671
|
+
|
|
9672
|
+
writeNonzeroU64(numeric(value["correlation"]), writer, context, value, value.flags);
|
|
9673
|
+
if (value["actor"] === undefined) fail("actor required");
|
|
9674
|
+
|
|
9675
|
+
|
|
9676
|
+
writeActorRef(value["actor"], writer, context, value, value.flags);
|
|
9677
|
+
if (value["session"] === undefined) fail("session required");
|
|
9678
|
+
|
|
9679
|
+
|
|
9680
|
+
writeRetiredBoundSessionRouteFence(value["session"], writer, context, value, value.flags);
|
|
9681
|
+
const frames: Uint8Array[] = [writer.result()];
|
|
9682
|
+
|
|
9683
|
+
return frames; }
|
|
9684
|
+
export function validateBoundSessionCloseCommandRuntimePredicates(value: any, context: ServiceWireDecoderContext): void { void value; void context; }
|
|
9685
|
+
|
|
9686
|
+
export type ServiceWireCommand = HelloCommand | AdmitCommand | RejectCommand | UpdateCommand | LivenessProbeCommand | LivenessAckCommand | NodeSendCommand | NodeRequestCommand | ChannelSendCommand | ChannelRequestCommand | ReplyCommand | SpotSendCommand | SpotRequestCommand | LogicalMulticastCommand | ActorSendCommand | ActorRequestCommand | ActorLookupCommand | ActorDestroyCommand | ActorJoinCommand | ActorLeftCommand | RelocationReadyCommand | RelocationDataCommand | ReplyRelayCommand | RelocationCutoverCommand | BoundSessionSendCommand | ActorJoinedCommand | BoundSessionBindCommand | InstanceSpotCommand | RelocationPrepareCommand | SessionRelocationSealCommand | SessionRelocationSealedCommand | SessionRelocationRouteCommand | ReplyRelayAckCommand | UserSpotCreateCommand | UserSpotCloseCommand | ActorCreateCommand | MessageFollowCommand | BoundSessionReplacedCommand | RelocationStateCommand | RelocationFailedCommand | BoundSessionCloseCommand;
|
|
9604
9687
|
|
|
9605
9688
|
export function decodeAuthorityPayloadV1DurableFormat(bytes: Uint8Array, context: ServiceWireDecoderContext): AuthorityPayloadV1 { if (bytes.length > 1048576) fail("authority-payload-v1 maximum"); const reader = new Reader(bytes); if (Number(reader.u(1)) !== 90 || Number(reader.u(1)) !== 76 || Number(reader.u(1)) !== 65 || Number(reader.u(1)) !== 85 || Number(reader.u(1)) !== 1) fail("authority-payload-v1 header"); const flags = readU16(reader, context, {}, 0); if (!same(flags, 0)) fail("authority-payload-v1 flags"); const length = Number(readU32(reader, context, {}, 0)); const body = reader.take(length); const checksumOffset = reader.offset; const declared = Number(reader.u(4)); reader.done("authority-payload-v1"); if (crc32c(bytes.slice(0, checksumOffset)) !== declared) fail("authority-payload-v1 checksum"); return decodeAuthorityPayloadV1(body, context); }
|
|
9606
9689
|
export function encodeAuthorityPayloadV1DurableFormat(value: AuthorityPayloadV1, context: ServiceWireDecoderContext): Uint8Array { const body = encodeAuthorityPayloadV1(value, context); const writer = new Writer(); writer.put([90,76,65,85, 1]); writeU16(0, writer, context, {}, 0); writeU32(body.length, writer, context, {}, 0); writer.put(body); writer.u(BigInt(crc32c(writer.result())), 4); const bytes = writer.result(); if (bytes.length > 1048576) fail("authority-payload-v1 maximum"); return bytes; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// <auto-generated> DO NOT EDIT. schema-sha256:
|
|
1
|
+
// <auto-generated> DO NOT EDIT. schema-sha256: 9ccb179e5231ac7a42bfa09ab1b5b9ea942ee17567e0db19023a6cba30c2e044
|
|
2
2
|
export interface ServiceWireRouteFence { readonly id: string; readonly generation: bigint; readonly targetNodeRid: Uint8Array; readonly targetNodeGeneration: bigint; readonly expectedAuthorityOwnerGeneration: bigint; readonly expectedOwnerLeaseGeneration: bigint; }
|
|
3
3
|
export interface ApplicationPayloadEnvelopeV1 { readonly packetName: string; readonly contentType: string; readonly payload: Uint8Array; }
|
|
4
4
|
export interface ActorJoin28 { readonly correlation: bigint; readonly actor: ServiceWireRouteFence; readonly entry: boolean; readonly targetSpot: ServiceWireRouteFence; readonly payload?: ApplicationPayloadEnvelopeV1; }
|
|
@@ -102,9 +102,12 @@ export interface ReplyRelayAck46 {readonly relocation:ServiceWireRelocationId;re
|
|
|
102
102
|
export interface RelocationReady30 {readonly relocation:ServiceWireRelocationId;readonly targetAttemptGeneration:bigint;readonly coordinator:ServiceWireCoordinatorFence;readonly target:ServiceWireTargetFence;readonly object:RelocationObjectIdentity;readonly senderRole:ServiceWireRelocationRole;}
|
|
103
103
|
export interface RelocationData31 {readonly relocation:ServiceWireRelocationId;readonly targetAttemptGeneration:bigint;readonly coordinator:ServiceWireCoordinatorFence;readonly senderRole:ServiceWireRelocationRole;readonly object:RelocationObjectIdentity;readonly record:Uint8Array;}
|
|
104
104
|
export interface RelocationCutover34 {readonly relocation:ServiceWireRelocationId;readonly targetAttemptGeneration:bigint;readonly coordinator:ServiceWireCoordinatorFence;readonly senderRole:ServiceWireRelocationRole;readonly object:RelocationObjectIdentity;readonly boundaryRecordCount:bigint;readonly boundaryChecksumCrc32c:number;}
|
|
105
|
-
export interface RelocationPrepare40 {readonly relocation:ServiceWireRelocationId;readonly targetAttemptGeneration:bigint;readonly coordinator:ServiceWireCoordinatorFence;readonly target:ServiceWireTargetFence;readonly initiatorRole:ServiceWireRelocationRole;readonly object:RelocationObjectIdentity;readonly sourceNodeRid:Uint8Array;readonly sourceNodeGeneration:bigint;readonly payloadTotalLength:bigint;readonly payloadChunkCount:number;readonly payloadChecksumCrc32c:number;readonly applicationVersion:bigint;}
|
|
106
|
-
export interface SessionRelocationSeal42 {readonly relocation:ServiceWireRelocationId;readonly coordinator:ServiceWireCoordinatorFence;readonly senderRole:ServiceWireRelocationRole;readonly actor:ServiceWireRouteFence;readonly sessionOwnerNodeRid:Uint8Array;readonly sessionOwnerNodeGeneration:bigint;readonly sessionOwnerId:string;readonly sessionOwnerLeaseGeneration:bigint;readonly sessionRid:Uint8Array;readonly bindingGeneration:bigint;}
|
|
107
|
-
export type
|
|
105
|
+
export interface RelocationPrepare40 {readonly relocation:ServiceWireRelocationId;readonly targetAttemptGeneration:bigint;readonly coordinator:ServiceWireCoordinatorFence;readonly target:ServiceWireTargetFence;readonly initiatorRole:ServiceWireRelocationRole;readonly object:RelocationObjectIdentity;readonly sourceNodeRid:Uint8Array;readonly sourceNodeGeneration:bigint;readonly payloadTotalLength:bigint;readonly payloadChunkCount:number;readonly payloadChecksumCrc32c:number;readonly applicationVersion:bigint;readonly deadlineUnixMs:bigint;}
|
|
106
|
+
export interface SessionRelocationSeal42 {readonly relocation:ServiceWireRelocationId;readonly coordinator:ServiceWireCoordinatorFence;readonly senderRole:ServiceWireRelocationRole;readonly actor:ServiceWireRouteFence;readonly sessionOwnerNodeRid:Uint8Array;readonly sessionOwnerNodeGeneration:bigint;readonly sessionOwnerId:string;readonly sessionOwnerLeaseGeneration:bigint;readonly sessionRid:Uint8Array;readonly bindingGeneration:bigint;readonly targetNodeRid:Uint8Array;readonly targetNodeGeneration:bigint;}
|
|
107
|
+
export type ServiceWireSessionSealResult="sealed"|"bindingAbsent";
|
|
108
|
+
export type SessionRelocationSealed43=Omit<SessionRelocationSeal42,"senderRole"|"targetNodeRid"|"targetNodeGeneration">&{readonly sealResult:ServiceWireSessionSealResult};
|
|
109
|
+
function b3WriteSealResult(o:number[],v:ServiceWireSessionSealResult):void{switch(v){case "sealed":o.push(1);return;case "bindingAbsent":o.push(2);return;default:throw new RangeError("sealResult");}}
|
|
110
|
+
function b3ReadSealResult(bytes:Uint8Array,at:{value:number}):ServiceWireSessionSealResult{switch(read8(bytes,at)){case 1:return "sealed";case 2:return "bindingAbsent";default:throw new RangeError("sealResult");}}
|
|
108
111
|
export interface SessionRelocationRoute44 {readonly relocation:ServiceWireRelocationId;readonly coordinator:ServiceWireCoordinatorFence;readonly senderRole:ServiceWireRelocationRole;readonly actor:ServiceWireActorRef;readonly sessionOwnerNodeRid:Uint8Array;readonly sessionOwnerNodeGeneration:bigint;readonly sessionOwnerId:string;readonly sessionOwnerLeaseGeneration:bigint;readonly sessionRid:Uint8Array;readonly bindingGeneration:bigint;readonly route:ServiceWireSessionRouteUpdate;}
|
|
109
112
|
export interface RelocationState52 {readonly relocation:ServiceWireRelocationId;readonly targetAttemptGeneration:bigint;readonly coordinator:ServiceWireCoordinatorFence;readonly senderRole:ServiceWireRelocationRole;readonly object:RelocationObjectIdentity;readonly chunkOrdinal:number;readonly chunkData:Uint8Array;}
|
|
110
113
|
export interface RelocationFailed53 {readonly relocation:ServiceWireRelocationId;readonly targetAttemptGeneration:bigint;readonly coordinator:ServiceWireCoordinatorFence;readonly target:ServiceWireTargetFence;readonly object:RelocationObjectIdentity;readonly senderRole:ServiceWireRelocationRole;readonly failureCode:number;}
|
|
@@ -151,14 +154,14 @@ export function encodeRelocationCutover34(v:RelocationCutover34):Uint8Array{cons
|
|
|
151
154
|
export function decodeRelocationCutover34(bytes:Uint8Array):RelocationCutover34{const at=b3ReadHeader(bytes,34,"relocationCutover"),v=b3ReadSourceBase(bytes,at),boundaryRecordCount=read64(bytes,at);if(boundaryRecordCount>9223372036854775807n)throw new RangeError("boundary count");const boundaryChecksumCrc32c=read32(bytes,at);b3Finish(at,bytes,"relocationCutover");return{...v,boundaryRecordCount,boundaryChecksumCrc32c};}
|
|
152
155
|
export function encodeRelocationState52(v:RelocationState52):Uint8Array{const o=b3Header(52);b3WriteSourceBase(o,v);if(v.chunkData.length>67108864)throw new RangeError("chunk data");u32(o,v.chunkOrdinal);u32(o,v.chunkData.length);appendBytes(o,v.chunkData);return Uint8Array.from(o);}
|
|
153
156
|
export function decodeRelocationState52(bytes:Uint8Array):RelocationState52{const at=b3ReadHeader(bytes,52,"relocationState"),v=b3ReadSourceBase(bytes,at),chunkOrdinal=read32(bytes,at),length=read32(bytes,at);if(length>67108864)throw new RangeError("chunk data");const chunkData=take(bytes,at,length,"chunk data");b3Finish(at,bytes,"relocationState");return{...v,chunkOrdinal,chunkData};}
|
|
154
|
-
export function encodeRelocationPrepare40(v:RelocationPrepare40):Uint8Array{const o=b3Header(40);b3WriteId(o,v.relocation,"relocation");if(v.targetAttemptGeneration===0n||v.sourceNodeGeneration===0n)throw new RangeError("prepare");u64(o,v.targetAttemptGeneration);b3WriteCoordinator(o,v.coordinator);b3WriteTarget(o,v.target);b3WriteRole(o,v.initiatorRole);if(v.initiatorRole!=="source")throw new RangeError("initiator role");writeRelocationObject(o,v.object);rid(o,v.sourceNodeRid);u64(o,v.sourceNodeGeneration);if(v.payloadTotalLength<0n||v.payloadTotalLength>274877906944n||v.payloadChunkCount>4096||v.applicationVersion<0n||v.applicationVersion>9223372036854775807n)throw new RangeError("prepare bounds");u64(o,v.payloadTotalLength);u32(o,v.payloadChunkCount);u32(o,v.payloadChecksumCrc32c);u64(o,v.applicationVersion);return Uint8Array.from(o);}
|
|
155
|
-
export function decodeRelocationPrepare40(bytes:Uint8Array):RelocationPrepare40{const at=b3ReadHeader(bytes,40,"relocationPrepare"),relocation=b3ReadId(bytes,at,"relocation"),targetAttemptGeneration=nonzero64(bytes,at,"target attempt"),coordinator=b3ReadCoordinator(bytes,at),target=b3ReadTarget(bytes,at),initiatorRole=b3ReadRole(bytes,at);if(initiatorRole!=="source")throw new RangeError("initiator role");const object=readRelocationObject(bytes,at),sourceNodeRid=readRid(bytes,at),sourceNodeGeneration=nonzero64(bytes,at,"source node"),payloadTotalLength=read64(bytes,at),payloadChunkCount=read32(bytes,at),payloadChecksumCrc32c=read32(bytes,at),applicationVersion=read64(bytes,at);if(payloadTotalLength>274877906944n||payloadChunkCount>4096||applicationVersion>9223372036854775807n)throw new RangeError("prepare bounds");b3Finish(at,bytes,"relocationPrepare");return{relocation,targetAttemptGeneration,coordinator,target,initiatorRole,object,sourceNodeRid,sourceNodeGeneration,payloadTotalLength,payloadChunkCount,payloadChecksumCrc32c,applicationVersion};}
|
|
157
|
+
export function encodeRelocationPrepare40(v:RelocationPrepare40):Uint8Array{const o=b3Header(40);b3WriteId(o,v.relocation,"relocation");if(v.targetAttemptGeneration===0n||v.sourceNodeGeneration===0n)throw new RangeError("prepare");u64(o,v.targetAttemptGeneration);b3WriteCoordinator(o,v.coordinator);b3WriteTarget(o,v.target);b3WriteRole(o,v.initiatorRole);if(v.initiatorRole!=="source")throw new RangeError("initiator role");writeRelocationObject(o,v.object);rid(o,v.sourceNodeRid);u64(o,v.sourceNodeGeneration);if(v.payloadTotalLength<0n||v.payloadTotalLength>274877906944n||v.payloadChunkCount>4096||v.applicationVersion<0n||v.applicationVersion>9223372036854775807n)throw new RangeError("prepare bounds");u64(o,v.payloadTotalLength);u32(o,v.payloadChunkCount);u32(o,v.payloadChecksumCrc32c);u64(o,v.applicationVersion);if(v.deadlineUnixMs===0n)throw new RangeError("deadline");u64(o,v.deadlineUnixMs);return Uint8Array.from(o);}
|
|
158
|
+
export function decodeRelocationPrepare40(bytes:Uint8Array):RelocationPrepare40{const at=b3ReadHeader(bytes,40,"relocationPrepare"),relocation=b3ReadId(bytes,at,"relocation"),targetAttemptGeneration=nonzero64(bytes,at,"target attempt"),coordinator=b3ReadCoordinator(bytes,at),target=b3ReadTarget(bytes,at),initiatorRole=b3ReadRole(bytes,at);if(initiatorRole!=="source")throw new RangeError("initiator role");const object=readRelocationObject(bytes,at),sourceNodeRid=readRid(bytes,at),sourceNodeGeneration=nonzero64(bytes,at,"source node"),payloadTotalLength=read64(bytes,at),payloadChunkCount=read32(bytes,at),payloadChecksumCrc32c=read32(bytes,at),applicationVersion=read64(bytes,at),deadlineUnixMs=nonzero64(bytes,at,"deadline");if(payloadTotalLength>274877906944n||payloadChunkCount>4096||applicationVersion>9223372036854775807n)throw new RangeError("prepare bounds");b3Finish(at,bytes,"relocationPrepare");return{relocation,targetAttemptGeneration,coordinator,target,initiatorRole,object,sourceNodeRid,sourceNodeGeneration,payloadTotalLength,payloadChunkCount,payloadChecksumCrc32c,applicationVersion,deadlineUnixMs};}
|
|
156
159
|
function b3WriteSealBase(o:number[],v:SessionRelocationSeal42|SessionRelocationSealed43,includeRole:boolean):void{b3WriteId(o,v.relocation,"relocation");b3WriteCoordinator(o,v.coordinator);if(includeRole){const role=(v as SessionRelocationSeal42).senderRole;b3WriteRole(o,role);if(role!=="source")throw new RangeError("sender role");}fence(o,v.actor);b3WriteSession(o,v);}
|
|
157
160
|
function b3ReadSealBase(bytes:Uint8Array,at:{value:number},includeRole:boolean){const relocation=b3ReadId(bytes,at,"relocation"),coordinator=b3ReadCoordinator(bytes,at);let senderRole:ServiceWireRelocationRole|undefined;if(includeRole){senderRole=b3ReadRole(bytes,at);if(senderRole!=="source")throw new RangeError("sender role");}const actor=readFence(bytes,at),session=b3ReadSession(bytes,at);return senderRole===undefined?{relocation,coordinator,actor,...session}:{relocation,coordinator,senderRole,actor,...session};}
|
|
158
|
-
export function encodeSessionRelocationSeal42(v:SessionRelocationSeal42):Uint8Array{const o=b3Header(42);b3WriteSealBase(o,v,true);return Uint8Array.from(o);}
|
|
159
|
-
export function decodeSessionRelocationSeal42(bytes:Uint8Array):SessionRelocationSeal42{const at=b3ReadHeader(bytes,42,"sessionRelocationSeal"),v=b3ReadSealBase(bytes,at,true) as SessionRelocationSeal42;b3Finish(at,bytes,"sessionRelocationSeal");return
|
|
160
|
-
export function encodeSessionRelocationSealed43(v:SessionRelocationSealed43):Uint8Array{const o=b3Header(43);b3WriteSealBase(o,v,false);return Uint8Array.from(o);}
|
|
161
|
-
export function decodeSessionRelocationSealed43(bytes:Uint8Array):SessionRelocationSealed43{const at=b3ReadHeader(bytes,43,"sessionRelocationSealed"),v=b3ReadSealBase(bytes,at,false) as SessionRelocationSealed43;b3Finish(at,bytes,"sessionRelocationSealed");return v;}
|
|
161
|
+
export function encodeSessionRelocationSeal42(v:SessionRelocationSeal42):Uint8Array{const o=b3Header(42);b3WriteSealBase(o,v,true);rid(o,v.targetNodeRid);if(v.targetNodeGeneration===0n)throw new RangeError("target node");u64(o,v.targetNodeGeneration);return Uint8Array.from(o);}
|
|
162
|
+
export function decodeSessionRelocationSeal42(bytes:Uint8Array):SessionRelocationSeal42{const at=b3ReadHeader(bytes,42,"sessionRelocationSeal"),v=b3ReadSealBase(bytes,at,true) as SessionRelocationSeal42;const targetNodeRid=readRid(bytes,at),targetNodeGeneration=nonzero64(bytes,at,"target node");b3Finish(at,bytes,"sessionRelocationSeal");return{...v,targetNodeRid,targetNodeGeneration};}
|
|
163
|
+
export function encodeSessionRelocationSealed43(v:SessionRelocationSealed43):Uint8Array{const o=b3Header(43);b3WriteSealBase(o,v,false);b3WriteSealResult(o,v.sealResult);return Uint8Array.from(o);}
|
|
164
|
+
export function decodeSessionRelocationSealed43(bytes:Uint8Array):SessionRelocationSealed43{const at=b3ReadHeader(bytes,43,"sessionRelocationSealed"),v={...b3ReadSealBase(bytes,at,false),sealResult:b3ReadSealResult(bytes,at)} as SessionRelocationSealed43;b3Finish(at,bytes,"sessionRelocationSealed");return v;}
|
|
162
165
|
export function encodeSessionRelocationRoute44(v:SessionRelocationRoute44):Uint8Array{const o=b3Header(44);b3WriteId(o,v.relocation,"relocation");b3WriteCoordinator(o,v.coordinator);b3WriteRole(o,v.senderRole);if((v.route.action==="commit"&&v.senderRole!=="target")||(v.route.action==="abort"&&v.senderRole!=="source"))throw new RangeError("route sender");b3WriteActorRef(o,v.actor);b3WriteSession(o,v);b3WriteRoute(o,v.route);return Uint8Array.from(o);}
|
|
163
166
|
export function decodeSessionRelocationRoute44(bytes:Uint8Array):SessionRelocationRoute44{const at=b3ReadHeader(bytes,44,"sessionRelocationRoute"),relocation=b3ReadId(bytes,at,"relocation"),coordinator=b3ReadCoordinator(bytes,at),senderRole=b3ReadRole(bytes,at),actor=b3ReadActorRef(bytes,at),session=b3ReadSession(bytes,at),route=b3ReadRoute(bytes,at);if((route.action==="commit"&&senderRole!=="target")||(route.action==="abort"&&senderRole!=="source"))throw new RangeError("route sender");b3Finish(at,bytes,"sessionRelocationRoute");return{relocation,coordinator,senderRole,actor,...session,route};}
|
|
164
167
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { routingIdsEqual } from '../routing-id';
|
|
1
2
|
import type { ApplicationJobOrigin } from '../application-jobs/contracts';
|
|
2
3
|
import type { ActorRef, RoutingId, ZLinkActor, ZLinkActorJoinOperationId } from '../../contracts';
|
|
3
4
|
import type { ZLinkRemoteBoundSessionTarget } from '../actors/actor-runtime-state';
|
|
@@ -417,9 +418,9 @@ function sameProvisionalAdmission(
|
|
|
417
418
|
left.requestFingerprint === right.requestFingerprint &&
|
|
418
419
|
sameOperationId(left.completionOperationId, right.completionOperationId) &&
|
|
419
420
|
String(left.sourceSpotId ?? '') === String(right.sourceSpotId ?? '') &&
|
|
420
|
-
|
|
421
|
+
routingIdsEqual(left.sourceActorNodeRid, right.sourceActorNodeRid) &&
|
|
421
422
|
left.actorRef.actorId === right.actorRef.actorId &&
|
|
422
|
-
|
|
423
|
+
routingIdsEqual(left.actorRef.nodeRid, right.actorRef.nodeRid) &&
|
|
423
424
|
left.actorRef.objectGeneration === right.actorRef.objectGeneration
|
|
424
425
|
);
|
|
425
426
|
}
|