@zlink-systems/framework 0.29.1 → 0.30.1

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.
Files changed (322) hide show
  1. package/LICENSE +150 -68
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/contracts/Actors/ZLinkActorClient.d.ts +2 -1
  4. package/dist/contracts/Channels/Calls.d.ts +2 -1
  5. package/dist/contracts/Common/ZLinkMessageMetadata.js +11 -5
  6. package/dist/contracts/Configuration/Builders.d.ts +1 -2
  7. package/dist/contracts/Configuration/Configs.d.ts +0 -5
  8. package/dist/contracts/Configuration/RegistrationBuilders.js +6 -4
  9. package/dist/contracts/Configuration/RegistrationTypes.d.ts +1 -6
  10. package/dist/contracts/Configuration/RegistrationValidators.js +4 -4
  11. package/dist/contracts/Configuration/index.d.ts +1 -1
  12. package/dist/contracts/Handlers/Attributes.d.ts +5 -13
  13. package/dist/contracts/Handlers/Attributes.js +7 -11
  14. package/dist/contracts/Handlers/JsonContract.d.ts +2 -46
  15. package/dist/contracts/Handlers/JsonContract.js +4 -153
  16. package/dist/contracts/Spots/Contracts.d.ts +2 -1
  17. package/dist/internal.d.ts +1 -0
  18. package/dist/internal.js +3 -1
  19. package/dist/nest-integration.d.ts +1 -1
  20. package/dist/nest-integration.js +2 -1
  21. package/dist/runtime/actors/actor-client.d.ts +1 -1
  22. package/dist/runtime/actors/actor-client.js +14 -12
  23. package/dist/runtime/actors/actor-handoff.d.ts +3 -2
  24. package/dist/runtime/actors/actor-handoff.js +15 -7
  25. package/dist/runtime/actors/actor-join-relocation.d.ts +1 -0
  26. package/dist/runtime/actors/actor-local-native-join.js +9 -12
  27. package/dist/runtime/actors/actor-remote-wire.js +15 -0
  28. package/dist/runtime/actors/actor-routed-join-transport.d.ts +6 -2
  29. package/dist/runtime/actors/actor-routed-json-request.d.ts +2 -0
  30. package/dist/runtime/actors/index.d.ts +2 -1
  31. package/dist/runtime/actors/index.js +18 -6
  32. package/dist/runtime/actors/spot-actor-dispatch.js +2 -2
  33. package/dist/runtime/admission.d.ts +1 -1
  34. package/dist/runtime/admission.js +15 -5
  35. package/dist/runtime/application-jobs/application-ingress-record-owner.d.ts +9 -9
  36. package/dist/runtime/application-jobs/application-ingress-record-owner.js +45 -23
  37. package/dist/runtime/application-jobs/application-job-queue-scope.d.ts +5 -2
  38. package/dist/runtime/application-jobs/application-job-queue-scope.js +41 -21
  39. package/dist/runtime/application-jobs/contracts.d.ts +15 -2
  40. package/dist/runtime/backend/contracts/index.d.ts +27 -27
  41. package/dist/runtime/backend/mesh-completion-table.d.ts +15 -5
  42. package/dist/runtime/backend/mesh-completion-table.js +160 -50
  43. package/dist/runtime/backend/mesh-dispatch-pump.d.ts +3 -0
  44. package/dist/runtime/backend/mesh-dispatch-pump.js +53 -36
  45. package/dist/runtime/backend/node/node-backend-adapter-factory.js +6 -1
  46. package/dist/runtime/backend/node/node-backend-adapter-support.d.ts +3 -3
  47. package/dist/runtime/backend/node/node-backend-adapter-support.js +33 -31
  48. package/dist/runtime/backend/node/node-dealer-channel-client-transport.d.ts +1 -1
  49. package/dist/runtime/backend/node/node-dealer-channel-client-transport.js +5 -2
  50. package/dist/runtime/backend/node/node-mesh-backend-adapter.d.ts +1 -9
  51. package/dist/runtime/backend/node/node-mesh-backend-adapter.js +1 -1
  52. package/dist/runtime/backend/node/node-raw-binding-port.js +50 -25
  53. package/dist/runtime/backend/node/node-raw-mesh-backend.d.ts +22 -16
  54. package/dist/runtime/backend/node/node-raw-mesh-backend.js +133 -149
  55. package/dist/runtime/backend/node/node-socket-backend-adapter.js +15 -10
  56. package/dist/runtime/backend/raw-binding-port.d.ts +10 -3
  57. package/dist/runtime/backend/runtime-message.d.ts +1 -0
  58. package/dist/runtime/backend/runtime-message.js +5 -0
  59. package/dist/runtime/backend/runtime-values.d.ts +1 -0
  60. package/dist/runtime/backend/runtime-values.js +2 -1
  61. package/dist/runtime/channels/channel-clients.d.ts +1 -0
  62. package/dist/runtime/channels/channel-clients.js +58 -21
  63. package/dist/runtime/channels/channel-dispatch-pipeline.d.ts +3 -2
  64. package/dist/runtime/channels/channel-dispatch-pipeline.js +20 -11
  65. package/dist/runtime/channels/channel-dispatch-services.d.ts +1 -0
  66. package/dist/runtime/channels/channel-dispatch-services.js +45 -0
  67. package/dist/runtime/channels/channel-dispatchers.d.ts +1 -1
  68. package/dist/runtime/channels/channel-dispatchers.js +27 -26
  69. package/dist/runtime/channels/channel-envelope-inspection.d.ts +1 -2
  70. package/dist/runtime/channels/channel-envelope-inspection.js +1 -16
  71. package/dist/runtime/channels/channel-envelope.d.ts +1 -0
  72. package/dist/runtime/channels/channel-envelope.js +83 -8
  73. package/dist/runtime/channels/channel-outbound-operations.d.ts +2 -2
  74. package/dist/runtime/channels/channel-outbound-operations.js +8 -8
  75. package/dist/runtime/channels/channel-receive-loops.js +3 -3
  76. package/dist/runtime/channels/channel-runtime-lifecycle.js +2 -1
  77. package/dist/runtime/channels/channel-runtime-manager.d.ts +6 -6
  78. package/dist/runtime/channels/channel-runtime-manager.js +12 -12
  79. package/dist/runtime/channels/channel-socket-registry.d.ts +10 -3
  80. package/dist/runtime/channels/channel-socket-registry.js +59 -82
  81. package/dist/runtime/channels/channel-transports.d.ts +18 -15
  82. package/dist/runtime/channels/channel-transports.js +48 -31
  83. package/dist/runtime/channels/local-spot-route-transport.d.ts +1 -1
  84. package/dist/runtime/channels/local-spot-route-transport.js +2 -1
  85. package/dist/runtime/channels/router-socket-spot-route-transport.d.ts +2 -2
  86. package/dist/runtime/channels/router-socket-spot-route-transport.js +4 -4
  87. package/dist/runtime/channels/source-spot-router.d.ts +2 -2
  88. package/dist/runtime/channels/source-spot-router.js +4 -4
  89. package/dist/runtime/channels/spot-node-route-transport.d.ts +2 -2
  90. package/dist/runtime/channels/spot-node-route-transport.js +4 -4
  91. package/dist/runtime/channels/spot-route-bridge-transport.d.ts +2 -2
  92. package/dist/runtime/channels/spot-route-bridge-transport.js +4 -4
  93. package/dist/runtime/channels/spot-route-dispatch-strategy.d.ts +5 -4
  94. package/dist/runtime/channels/spot-route-dispatch-strategy.js +18 -18
  95. package/dist/runtime/diagnostics/message-flow.d.ts +1 -0
  96. package/dist/runtime/diagnostics/message-flow.js +3 -3
  97. package/dist/runtime/execution/serial-execution-queue.d.ts +1 -0
  98. package/dist/runtime/execution/serial-execution-queue.js +1 -0
  99. package/dist/runtime/foundation/actor-join-recovery-codec.js +2 -2
  100. package/dist/runtime/foundation/durable-service-request.d.ts +14 -0
  101. package/dist/runtime/foundation/durable-service-request.js +98 -0
  102. package/dist/runtime/foundation/operation-identity.d.ts +1 -0
  103. package/dist/runtime/foundation/operation-identity.js +5 -1
  104. package/dist/runtime/foundation/raw-service-mesh-runtime.d.ts +37 -6
  105. package/dist/runtime/foundation/raw-service-mesh-runtime.js +473 -220
  106. package/dist/runtime/foundation/service-liveness-registry.d.ts +20 -8
  107. package/dist/runtime/foundation/service-liveness-registry.js +57 -44
  108. package/dist/runtime/foundation/service-mailbox.d.ts +3 -0
  109. package/dist/runtime/foundation/service-mailbox.js +2 -1
  110. package/dist/runtime/foundation/service-relocation-object-owner.d.ts +1 -0
  111. package/dist/runtime/foundation/service-relocation-object-owner.js +1 -0
  112. package/dist/runtime/foundation/service-relocation-runtime.d.ts +2 -0
  113. package/dist/runtime/foundation/service-relocation-runtime.js +13 -1
  114. package/dist/runtime/foundation/service-runtime-contracts.d.ts +2 -0
  115. package/dist/runtime/foundation/service-stateful-runtime.d.ts +10 -9
  116. package/dist/runtime/foundation/service-stateful-runtime.js +78 -126
  117. package/dist/runtime/foundation/service-stateful-wire-codec.d.ts +5 -7
  118. package/dist/runtime/foundation/service-stateful-wire-codec.js +43 -61
  119. package/dist/runtime/foundation/service-topology-registry.d.ts +16 -4
  120. package/dist/runtime/foundation/service-topology-registry.js +69 -30
  121. package/dist/runtime/foundation/service-wire-m6a-codec.d.ts +3 -3
  122. package/dist/runtime/foundation/service-wire-m6a-codec.js +36 -38
  123. package/dist/runtime/handlers/handler-instance-scope.d.ts +8 -0
  124. package/dist/runtime/handlers/handler-instance-scope.js +54 -11
  125. package/dist/runtime/host/actor-packet-relay.js +7 -7
  126. package/dist/runtime/host/actor-runtime-options-factory.js +2 -2
  127. package/dist/runtime/host/application-job-queue.d.ts +28 -9
  128. package/dist/runtime/host/application-job-queue.js +214 -50
  129. package/dist/runtime/host/entry-actor-runtime.d.ts +1 -0
  130. package/dist/runtime/host/entry-actor-runtime.js +4 -1
  131. package/dist/runtime/host/index.d.ts +7 -1
  132. package/dist/runtime/host/index.js +154 -126
  133. package/dist/runtime/host/instance-activation-authority.d.ts +2 -1
  134. package/dist/runtime/host/instance-activation-authority.js +89 -25
  135. package/dist/runtime/host/remote-bound-session-relay.js +2 -18
  136. package/dist/runtime/host/route-mesh-runtime.js +1 -1
  137. package/dist/runtime/host/service-relocation-control.d.ts +1 -0
  138. package/dist/runtime/host/service-relocation-control.js +10 -4
  139. package/dist/runtime/host/service-relocation-host-runtime.d.ts +6 -8
  140. package/dist/runtime/host/service-relocation-host-runtime.js +215 -243
  141. package/dist/runtime/host/spot-address-transport.d.ts +1 -0
  142. package/dist/runtime/host/spot-address-transport.js +28 -14
  143. package/dist/runtime/host/spot-runtime-options-factory.js +3 -2
  144. package/dist/runtime/host/user-spot-creation-coordinator.d.ts +1 -0
  145. package/dist/runtime/host/user-spot-creation-coordinator.js +1 -0
  146. package/dist/runtime/locations/actor-location-claims.d.ts +2 -2
  147. package/dist/runtime/locations/actor-location-claims.js +34 -19
  148. package/dist/runtime/locations/domain-store-contract.d.ts +2 -2
  149. package/dist/runtime/locations/in-memory-authority-store.d.ts +4 -2
  150. package/dist/runtime/locations/in-memory-authority-store.js +80 -8
  151. package/dist/runtime/locations/in-memory-location-store.d.ts +2 -2
  152. package/dist/runtime/locations/in-memory-location-store.js +19 -3
  153. package/dist/runtime/locations/internal-location-contracts.d.ts +3 -0
  154. package/dist/runtime/locations/lifecycle.d.ts +1 -2
  155. package/dist/runtime/locations/lifecycle.js +2 -5
  156. package/dist/runtime/locations/location-store-repository.d.ts +3 -2
  157. package/dist/runtime/locations/location-store-repository.js +165 -22
  158. package/dist/runtime/locations/resolvers.d.ts +2 -1
  159. package/dist/runtime/locations/resolvers.js +10 -1
  160. package/dist/runtime/locations/runtime.d.ts +1 -1
  161. package/dist/runtime/locations/runtime.js +24 -23
  162. package/dist/runtime/messaging/framework-json-v1.d.ts +4 -6
  163. package/dist/runtime/messaging/framework-json-v1.js +38 -294
  164. package/dist/runtime/messaging/packet-name.d.ts +1 -1
  165. package/dist/runtime/messaging/packet-name.js +8 -24
  166. package/dist/runtime/messaging/request-result.d.ts +2 -0
  167. package/dist/runtime/messaging/request-result.js +54 -0
  168. package/dist/runtime/messaging/submission-result.d.ts +2 -1
  169. package/dist/runtime/messaging/submission-result.js +7 -4
  170. package/dist/runtime/protocol/service_wire_codec.generated.d.ts +15 -0
  171. package/dist/runtime/protocol/service_wire_codec.generated.js +144 -0
  172. package/dist/runtime/protocol/service_wire_pilot_codec.generated.d.ts +9 -0
  173. package/dist/runtime/protocol/service_wire_pilot_codec.generated.js +14 -1
  174. package/dist/runtime/spots/formal-remote-actor-admission-registry.d.ts +9 -2
  175. package/dist/runtime/spots/formal-remote-actor-admission-registry.js +33 -19
  176. package/dist/runtime/spots/index.d.ts +7 -3
  177. package/dist/runtime/spots/index.js +23 -16
  178. package/dist/runtime/spots/spot-activation.d.ts +3 -1
  179. package/dist/runtime/spots/spot-activation.js +21 -12
  180. package/dist/runtime/spots/spot-actor-admission-coordinator.d.ts +2 -1
  181. package/dist/runtime/spots/spot-actor-admission-coordinator.js +11 -10
  182. package/dist/runtime/spots/spot-actor-packet-dispatch.d.ts +4 -1
  183. package/dist/runtime/spots/spot-actor-packet-dispatch.js +7 -5
  184. package/dist/runtime/spots/spot-actor-packet-drain.js +2 -0
  185. package/dist/runtime/spots/spot-actor-packet-relay-dispatch.js +1 -0
  186. package/dist/runtime/spots/spot-entry-activation.js +9 -3
  187. package/dist/runtime/spots/spot-handler-registry.d.ts +3 -1
  188. package/dist/runtime/spots/spot-handler-registry.js +18 -8
  189. package/dist/runtime/spots/spot-node-autoconnect.js +4 -3
  190. package/dist/runtime/spots/spot-node-runtime-manager.d.ts +2 -1
  191. package/dist/runtime/spots/spot-node-runtime-manager.js +4 -11
  192. package/dist/runtime/spots/spot-outbound.d.ts +3 -0
  193. package/dist/runtime/spots/spot-outbound.js +24 -15
  194. package/dist/runtime/spots/spot-routed-spot-packet-dispatch.d.ts +1 -0
  195. package/dist/runtime/spots/spot-routed-spot-packet-dispatch.js +1 -1
  196. package/dist/runtime/spots/spot-routing-internal.d.ts +6 -0
  197. package/dist/runtime/spots/spot-runtime-ports.d.ts +3 -1
  198. package/dist/runtime/spots/spot-subscription-dispatch.js +0 -3
  199. package/dist/runtime/spots/spot-timer.js +1 -0
  200. package/dist/runtime/streams/stream-session-runtime.d.ts +1 -1
  201. package/dist/runtime/streams/stream-session-runtime.js +14 -28
  202. package/package.json +3 -3
  203. package/src/contracts/Actors/ZLinkActorClient.ts +2 -1
  204. package/src/contracts/Channels/Calls.ts +2 -1
  205. package/src/contracts/Common/ZLinkMessageMetadata.ts +13 -8
  206. package/src/contracts/Configuration/Builders.ts +1 -2
  207. package/src/contracts/Configuration/Configs.ts +0 -6
  208. package/src/contracts/Configuration/RegistrationBuilders.ts +8 -12
  209. package/src/contracts/Configuration/RegistrationTypes.ts +1 -6
  210. package/src/contracts/Configuration/RegistrationValidators.ts +9 -10
  211. package/src/contracts/Configuration/index.ts +1 -6
  212. package/src/contracts/Handlers/Attributes.ts +14 -21
  213. package/src/contracts/Handlers/JsonContract.ts +8 -216
  214. package/src/contracts/Spots/Contracts.ts +2 -1
  215. package/src/internal.ts +1 -0
  216. package/src/nest-integration.ts +1 -0
  217. package/src/runtime/actors/actor-client.ts +40 -16
  218. package/src/runtime/actors/actor-handoff.ts +22 -8
  219. package/src/runtime/actors/actor-join-relocation.ts +1 -0
  220. package/src/runtime/actors/actor-local-native-join.ts +17 -26
  221. package/src/runtime/actors/actor-remote-wire.ts +17 -0
  222. package/src/runtime/actors/actor-routed-join-transport.ts +14 -4
  223. package/src/runtime/actors/actor-routed-json-request.ts +10 -2
  224. package/src/runtime/actors/index.ts +19 -5
  225. package/src/runtime/actors/spot-actor-dispatch.ts +4 -2
  226. package/src/runtime/admission.ts +18 -5
  227. package/src/runtime/application-jobs/application-ingress-record-owner.ts +53 -27
  228. package/src/runtime/application-jobs/application-job-queue-scope.ts +56 -22
  229. package/src/runtime/application-jobs/contracts.ts +28 -2
  230. package/src/runtime/backend/contracts/index.ts +63 -32
  231. package/src/runtime/backend/mesh-completion-table.ts +175 -59
  232. package/src/runtime/backend/mesh-dispatch-pump.ts +59 -32
  233. package/src/runtime/backend/node/node-backend-adapter-factory.ts +12 -5
  234. package/src/runtime/backend/node/node-backend-adapter-support.ts +42 -31
  235. package/src/runtime/backend/node/node-dealer-channel-client-transport.ts +12 -2
  236. package/src/runtime/backend/node/node-mesh-backend-adapter.ts +3 -10
  237. package/src/runtime/backend/node/node-raw-binding-port.ts +73 -37
  238. package/src/runtime/backend/node/node-raw-mesh-backend.ts +209 -176
  239. package/src/runtime/backend/node/node-socket-backend-adapter.ts +32 -13
  240. package/src/runtime/backend/raw-binding-port.ts +18 -3
  241. package/src/runtime/backend/runtime-message.ts +6 -0
  242. package/src/runtime/backend/runtime-values.ts +1 -0
  243. package/src/runtime/channels/channel-clients.ts +90 -41
  244. package/src/runtime/channels/channel-dispatch-pipeline.ts +69 -34
  245. package/src/runtime/channels/channel-dispatch-services.ts +69 -1
  246. package/src/runtime/channels/channel-dispatchers.ts +29 -27
  247. package/src/runtime/channels/channel-envelope-inspection.ts +2 -16
  248. package/src/runtime/channels/channel-envelope.ts +133 -8
  249. package/src/runtime/channels/channel-outbound-operations.ts +22 -8
  250. package/src/runtime/channels/channel-receive-loops.ts +3 -3
  251. package/src/runtime/channels/channel-runtime-lifecycle.ts +7 -1
  252. package/src/runtime/channels/channel-runtime-manager.ts +29 -12
  253. package/src/runtime/channels/channel-socket-registry.ts +84 -130
  254. package/src/runtime/channels/channel-transports.ts +128 -60
  255. package/src/runtime/channels/local-spot-route-transport.ts +3 -1
  256. package/src/runtime/channels/router-socket-spot-route-transport.ts +13 -4
  257. package/src/runtime/channels/source-spot-router.ts +8 -4
  258. package/src/runtime/channels/spot-node-route-transport.ts +8 -4
  259. package/src/runtime/channels/spot-route-bridge-transport.ts +6 -4
  260. package/src/runtime/channels/spot-route-dispatch-strategy.ts +47 -18
  261. package/src/runtime/diagnostics/message-flow.ts +1 -1
  262. package/src/runtime/execution/serial-execution-queue.ts +2 -0
  263. package/src/runtime/foundation/actor-join-recovery-codec.ts +2 -2
  264. package/src/runtime/foundation/durable-service-request.ts +137 -0
  265. package/src/runtime/foundation/operation-identity.ts +5 -1
  266. package/src/runtime/foundation/raw-service-mesh-runtime.ts +642 -253
  267. package/src/runtime/foundation/service-liveness-registry.ts +68 -59
  268. package/src/runtime/foundation/service-mailbox.ts +7 -1
  269. package/src/runtime/foundation/service-relocation-object-owner.ts +2 -0
  270. package/src/runtime/foundation/service-relocation-runtime.ts +18 -1
  271. package/src/runtime/foundation/service-runtime-contracts.ts +7 -1
  272. package/src/runtime/foundation/service-stateful-runtime.ts +128 -160
  273. package/src/runtime/foundation/service-stateful-wire-codec.ts +55 -84
  274. package/src/runtime/foundation/service-topology-registry.ts +103 -42
  275. package/src/runtime/foundation/service-wire-m6a-codec.ts +57 -38
  276. package/src/runtime/handlers/handler-instance-scope.ts +67 -16
  277. package/src/runtime/host/actor-packet-relay.ts +7 -0
  278. package/src/runtime/host/actor-runtime-options-factory.ts +14 -2
  279. package/src/runtime/host/application-job-queue.ts +249 -48
  280. package/src/runtime/host/entry-actor-runtime.ts +5 -0
  281. package/src/runtime/host/index.ts +224 -160
  282. package/src/runtime/host/instance-activation-authority.ts +132 -27
  283. package/src/runtime/host/remote-bound-session-relay.ts +2 -23
  284. package/src/runtime/host/route-mesh-runtime.ts +1 -1
  285. package/src/runtime/host/service-relocation-control.ts +11 -5
  286. package/src/runtime/host/service-relocation-host-runtime.ts +317 -291
  287. package/src/runtime/host/spot-address-transport.ts +49 -24
  288. package/src/runtime/host/spot-runtime-options-factory.ts +4 -0
  289. package/src/runtime/host/user-spot-creation-coordinator.ts +8 -0
  290. package/src/runtime/locations/actor-location-claims.ts +52 -30
  291. package/src/runtime/locations/domain-store-contract.ts +6 -2
  292. package/src/runtime/locations/in-memory-authority-store.ts +113 -9
  293. package/src/runtime/locations/in-memory-location-store.ts +25 -3
  294. package/src/runtime/locations/internal-location-contracts.ts +4 -0
  295. package/src/runtime/locations/lifecycle.ts +8 -26
  296. package/src/runtime/locations/location-store-repository.ts +220 -15
  297. package/src/runtime/locations/resolvers.ts +25 -2
  298. package/src/runtime/locations/runtime.ts +28 -24
  299. package/src/runtime/messaging/framework-json-v1.ts +5 -325
  300. package/src/runtime/messaging/packet-name.ts +5 -25
  301. package/src/runtime/messaging/request-result.ts +58 -0
  302. package/src/runtime/messaging/submission-result.ts +7 -3
  303. package/src/runtime/protocol/service_wire_codec.generated.ts +131 -1
  304. package/src/runtime/protocol/service_wire_pilot_codec.generated.ts +4 -4
  305. package/src/runtime/spots/formal-remote-actor-admission-registry.ts +45 -23
  306. package/src/runtime/spots/index.ts +30 -2
  307. package/src/runtime/spots/spot-activation.ts +33 -10
  308. package/src/runtime/spots/spot-actor-admission-coordinator.ts +13 -0
  309. package/src/runtime/spots/spot-actor-packet-dispatch.ts +10 -0
  310. package/src/runtime/spots/spot-actor-packet-drain.ts +2 -0
  311. package/src/runtime/spots/spot-actor-packet-relay-dispatch.ts +1 -0
  312. package/src/runtime/spots/spot-entry-activation.ts +12 -2
  313. package/src/runtime/spots/spot-handler-registry.ts +41 -8
  314. package/src/runtime/spots/spot-node-autoconnect.ts +6 -2
  315. package/src/runtime/spots/spot-node-runtime-manager.ts +7 -12
  316. package/src/runtime/spots/spot-outbound.ts +36 -16
  317. package/src/runtime/spots/spot-routed-spot-packet-dispatch.ts +2 -1
  318. package/src/runtime/spots/spot-routing-internal.ts +14 -0
  319. package/src/runtime/spots/spot-runtime-ports.ts +3 -0
  320. package/src/runtime/spots/spot-subscription-dispatch.ts +0 -3
  321. package/src/runtime/spots/spot-timer.ts +5 -1
  322. package/src/runtime/streams/stream-session-runtime.ts +13 -30
@@ -1,296 +1,40 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FRAMEWORK_JSON_V1_PROFILE = void 0;
4
- exports.stringifyFrameworkJsonV1 = stringifyFrameworkJsonV1;
5
- exports.parseFrameworkJsonV1 = parseFrameworkJsonV1;
6
- exports.FRAMEWORK_JSON_V1_PROFILE = 'framework-json-v1';
7
- const SIGNED_64_MIN = -(1n << 63n);
8
- const UNSIGNED_64_MAX = (1n << 64n) - 1n;
9
- function stringifyFrameworkJsonV1(value, schema) {
10
- if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {
11
- throw new TypeError('framework-json-v1 payload is not a JSON value.');
12
- }
13
- const encoded = JSON.stringify(value, frameworkJsonV1Replacer);
14
- if (schema !== undefined) {
15
- validateFrameworkJsonV1Value(JSON.parse(encoded), schema, '$', false);
16
- }
17
- return encoded;
18
- }
19
- // Module-level so JSON.stringify does not allocate a fresh closure per
20
- // encoded message. On the root call `this` is the {'': value} wrapper, so
21
- // this[key] resolves the raw (pre-toJSON) source for every key including ''.
22
- function frameworkJsonV1Replacer(key, item) {
23
- const source = this[key];
24
- if (typeof source === 'number' && !Number.isFinite(source)) {
25
- throw new TypeError('framework-json-v1 only accepts finite JSON numbers.');
26
- }
27
- if (typeof source === 'bigint') {
28
- if (source < SIGNED_64_MIN || source > UNSIGNED_64_MAX) {
29
- throw new RangeError('framework-json-v1 64-bit integer is outside the supported range.');
30
- }
31
- return source.toString(10);
32
- }
33
- if (source instanceof Uint8Array) {
34
- return Buffer.from(source.buffer, source.byteOffset, source.byteLength).toString('base64');
35
- }
36
- if (source instanceof Date) {
37
- throw new TypeError('framework-json-v1 does not implicitly encode Date values.');
38
- }
39
- if (typeof source === 'object' &&
40
- source !== null &&
41
- typeof source.toJSON === 'function') {
42
- throw new TypeError('framework-json-v1 does not implicitly invoke custom toJSON methods.');
43
- }
44
- return item;
45
- }
46
- function parseFrameworkJsonV1(text, options = {}, schema) {
47
- if (text.charCodeAt(0) === 0xfeff) {
48
- throw new SyntaxError('framework-json-v1 does not allow a UTF-8 BOM.');
49
- }
50
- new JsonPropertyScanner(text, options).scan();
51
- const parsed = JSON.parse(text);
52
- return schema === undefined ? parsed : validateFrameworkJsonV1Value(parsed, schema, '$', true);
53
- }
54
- // Sticky pattern shared across scans; matching happens synchronously so the
55
- // mutable lastIndex never crosses calls.
56
- const NUMBER_TOKEN_PATTERN = /-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?/uy;
57
- const BASE64_PATTERN = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/u;
58
- const INT32_MIN = -2_147_483_648;
59
- const INT32_MAX = 2_147_483_647;
60
- const UINT32_MAX = 4_294_967_295;
61
- function validateFrameworkJsonV1Value(value, schema, path, decode) {
62
- switch (schema.type) {
63
- case 'boolean':
64
- if (typeof value !== 'boolean')
65
- schemaFailure(path, 'a boolean');
66
- return value;
67
- case 'string':
68
- if (typeof value !== 'string')
69
- schemaFailure(path, 'a string');
70
- return value;
71
- case 'number':
72
- if (typeof value !== 'number' || !Number.isFinite(value))
73
- schemaFailure(path, 'a finite number');
74
- return value;
75
- case 'int32':
76
- if (!Number.isInteger(value) ||
77
- value < INT32_MIN ||
78
- value > INT32_MAX) {
79
- schemaFailure(path, 'an int32 JSON number');
80
- }
81
- return value;
82
- case 'uint32':
83
- if (!Number.isInteger(value) || value < 0 || value > UINT32_MAX) {
84
- schemaFailure(path, 'a uint32 JSON number');
85
- }
86
- return value;
87
- case 'int64':
88
- return validateDecimalInteger(value, path, true, decode);
89
- case 'uint64':
90
- return validateDecimalInteger(value, path, false, decode);
91
- case 'bytes': {
92
- if (typeof value !== 'string' || !BASE64_PATTERN.test(value)) {
93
- schemaFailure(path, 'padded RFC 4648 base64');
94
- }
95
- const bytes = Buffer.from(value, 'base64');
96
- if (bytes.toString('base64') !== value)
97
- schemaFailure(path, 'canonical padded RFC 4648 base64');
98
- return decode ? Uint8Array.from(bytes) : value;
99
- }
100
- case 'enum':
101
- if (typeof value !== 'string' || !schema.names.includes(value)) {
102
- schemaFailure(path, `one of ${schema.names.join(', ')}`);
103
- }
104
- return value;
105
- case 'nullable':
106
- return value === null
107
- ? null
108
- : validateFrameworkJsonV1Value(value, schema.value, path, decode);
109
- case 'array':
110
- if (!Array.isArray(value))
111
- schemaFailure(path, 'an array');
112
- return value.map((item, index) => validateFrameworkJsonV1Value(item, schema.items, `${path}[${index}]`, decode));
113
- case 'record': {
114
- if (!isJsonObject(value))
115
- schemaFailure(path, 'an object');
116
- const result = {};
117
- for (const [name, item] of Object.entries(value)) {
118
- result[name] = validateFrameworkJsonV1Value(item, schema.values, `${path}.${name}`, decode);
119
- }
120
- return decode ? result : value;
121
- }
122
- case 'object': {
123
- if (!isJsonObject(value))
124
- schemaFailure(path, 'an object');
125
- const input = value;
126
- for (const name of schema.required) {
127
- if (!Object.prototype.hasOwnProperty.call(input, name)) {
128
- throw new TypeError(`framework-json-v1 required property '${path}.${name}' is missing.`);
129
- }
130
- }
131
- const result = {};
132
- for (const [name, item] of Object.entries(input)) {
133
- const propertySchema = schema.properties[name];
134
- if (propertySchema === undefined) {
135
- if (schema.additionalProperties === false) {
136
- throw new TypeError(`framework-json-v1 property '${path}.${name}' is not allowed.`);
137
- }
138
- continue;
139
- }
140
- result[name] = validateFrameworkJsonV1Value(item, propertySchema, `${path}.${name}`, decode);
141
- }
142
- return decode ? result : value;
143
- }
144
- }
145
- }
146
- function validateDecimalInteger(value, path, signed, decode) {
147
- if (typeof value !== 'string' || !/^(?:0|[1-9][0-9]*|-[1-9][0-9]*)$/u.test(value)) {
148
- schemaFailure(path, signed ? 'a canonical int64 decimal string' : 'a canonical uint64 decimal string');
149
- }
150
- const parsed = BigInt(value);
151
- const minimum = signed ? SIGNED_64_MIN : 0n;
152
- const maximum = signed ? (1n << 63n) - 1n : UNSIGNED_64_MAX;
153
- if (parsed < minimum || parsed > maximum)
154
- schemaFailure(path, signed ? 'an int64 value' : 'a uint64 value');
155
- return decode ? parsed : value;
156
- }
157
- function isJsonObject(value) {
158
- return typeof value === 'object' && value !== null && !Array.isArray(value);
159
- }
160
- function schemaFailure(path, expected) {
161
- throw new TypeError(`framework-json-v1 value '${path}' must be ${expected}.`);
162
- }
163
- class JsonPropertyScanner {
164
- text;
165
- options;
166
- index = 0;
167
- constructor(text, options) {
168
- this.text = text;
169
- this.options = options;
170
- }
171
- scan() {
172
- this.skipWhitespace();
173
- this.scanValue();
174
- this.skipWhitespace();
175
- if (this.index !== this.text.length)
176
- this.fail('trailing data');
177
- }
178
- scanValue() {
179
- this.skipWhitespace();
180
- const token = this.text[this.index];
181
- if (token === '{')
182
- return this.scanObject();
183
- if (token === '[')
184
- return this.scanArray();
185
- if (token === '"') {
186
- this.scanString();
187
- return;
188
- }
189
- if (token === 't')
190
- return this.scanLiteral('true');
191
- if (token === 'f')
192
- return this.scanLiteral('false');
193
- if (token === 'n')
194
- return this.scanLiteral('null');
195
- this.scanNumber();
196
- }
197
- scanObject() {
198
- this.index++;
199
- this.skipWhitespace();
200
- if (this.text[this.index] === '}') {
201
- this.index++;
202
- return;
203
- }
204
- const properties = new Set();
205
- for (;;) {
206
- this.skipWhitespace();
207
- if (this.text[this.index] !== '"')
208
- this.fail('object property name');
209
- const property = this.scanString();
210
- if (properties.has(property)) {
211
- throw new SyntaxError(`framework-json-v1 duplicate property '${property}'.`);
212
- }
213
- properties.add(property);
214
- if (this.options.rejectPropertyName?.(property) === true) {
215
- throw new SyntaxError(`framework-json-v1 property '${property}' is not allowed.`);
216
- }
217
- this.skipWhitespace();
218
- if (this.text[this.index] !== ':')
219
- this.fail("':' after object property");
220
- this.index++;
221
- this.scanValue();
222
- this.skipWhitespace();
223
- const delimiter = this.text[this.index++];
224
- if (delimiter === '}')
225
- return;
226
- if (delimiter !== ',')
227
- this.fail("',' or '}' after object property");
228
- }
229
- }
230
- scanArray() {
231
- this.index++;
232
- this.skipWhitespace();
233
- if (this.text[this.index] === ']') {
234
- this.index++;
235
- return;
236
- }
237
- for (;;) {
238
- this.scanValue();
239
- this.skipWhitespace();
240
- const delimiter = this.text[this.index++];
241
- if (delimiter === ']')
242
- return;
243
- if (delimiter !== ',')
244
- this.fail("',' or ']' after array item");
245
- }
246
- }
247
- scanString() {
248
- const start = this.index++;
249
- let sawEscape = false;
250
- for (;;) {
251
- if (this.index >= this.text.length)
252
- this.fail('unterminated string');
253
- const character = this.text[this.index++];
254
- if (character === '"') {
255
- // Without escapes the token content is verbatim; the outer
256
- // JSON.parse pass still rejects any raw control characters.
257
- return sawEscape
258
- ? JSON.parse(this.text.slice(start, this.index))
259
- : this.text.slice(start + 1, this.index - 1);
260
- }
261
- if (character === '\\') {
262
- sawEscape = true;
263
- if (this.index >= this.text.length)
264
- this.fail('unterminated escape');
265
- const escaped = this.text[this.index++];
266
- if (escaped === 'u')
267
- this.index += 4;
268
- }
269
- }
270
- }
271
- scanLiteral(value) {
272
- if (!this.text.startsWith(value, this.index))
273
- this.fail(value);
274
- this.index += value.length;
275
- }
276
- scanNumber() {
277
- NUMBER_TOKEN_PATTERN.lastIndex = this.index;
278
- const match = NUMBER_TOKEN_PATTERN.exec(this.text);
279
- if (match === null)
280
- this.fail('JSON value');
281
- this.index += match[0].length;
282
- }
283
- skipWhitespace() {
284
- for (;;) {
285
- const code = this.text.charCodeAt(this.index);
286
- if (code === 0x20 || code === 0x09 || code === 0x0a || code === 0x0d) {
287
- this.index += 1;
288
- continue;
289
- }
290
- return;
291
- }
292
- }
293
- fail(expected) {
294
- throw new SyntaxError(`framework-json-v1 expected ${expected} at offset ${this.index}.`);
295
- }
296
- }
36
+ exports.parseFrameworkJsonV1 = exports.stringifyFrameworkJsonV1 = exports.FRAMEWORK_JSON_V1_PROFILE = void 0;
37
+ const profile = __importStar(require("@zlink-systems/stream-wire/internal/json"));
38
+ exports.FRAMEWORK_JSON_V1_PROFILE = profile.FRAMEWORK_JSON_V1_PROFILE;
39
+ exports.stringifyFrameworkJsonV1 = profile.stringifyFrameworkJsonV1;
40
+ exports.parseFrameworkJsonV1 = profile.parseFrameworkJsonV1;
@@ -1,4 +1,4 @@
1
1
  import type { ZLinkPacketJsonContract } from '../../contracts/Handlers/JsonContract';
2
2
  export declare function resolveFrameworkPacketName(payload: unknown, explicitPacketName: string | undefined, surface: string): string;
3
3
  export declare function resolveFrameworkPacketJsonContract(payload: unknown, explicitPacketName?: string): ZLinkPacketJsonContract | undefined;
4
- export declare function readFrameworkPacketJsonContract(type: object, explicitPacketName?: string): ZLinkPacketJsonContract | undefined;
4
+ export { readFrameworkPacketJsonContract } from '@zlink-systems/stream-wire/internal/json';
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readFrameworkPacketJsonContract = void 0;
3
4
  exports.resolveFrameworkPacketName = resolveFrameworkPacketName;
4
5
  exports.resolveFrameworkPacketJsonContract = resolveFrameworkPacketJsonContract;
5
- exports.readFrameworkPacketJsonContract = readFrameworkPacketJsonContract;
6
+ const json_1 = require("@zlink-systems/stream-wire/internal/json");
6
7
  const Attributes_1 = require("../../contracts/Handlers/Attributes");
7
8
  const configuration_1 = require("../configuration");
8
9
  const STRUCTURAL_PAYLOAD_NAMES = new Set([
@@ -18,7 +19,7 @@ const STRUCTURAL_PAYLOAD_NAMES = new Set([
18
19
  'Date'
19
20
  ]);
20
21
  function resolveFrameworkPacketName(payload, explicitPacketName, surface) {
21
- const packetName = normalizePacketName(explicitPacketName) ??
22
+ const packetName = (0, json_1.normalizePacketName)(explicitPacketName) ??
22
23
  tryDecoratorPacketName(payload) ??
23
24
  tryConstructorPacketName(payload);
24
25
  if (packetName === undefined) {
@@ -32,20 +33,10 @@ function resolveFrameworkPacketJsonContract(payload, explicitPacketName) {
32
33
  const constructor = payload.constructor;
33
34
  if (constructor === undefined || constructor === Object)
34
35
  return undefined;
35
- return readFrameworkPacketJsonContract(constructor, explicitPacketName);
36
- }
37
- function readFrameworkPacketJsonContract(type, explicitPacketName) {
38
- const expectedPacketName = normalizePacketName(explicitPacketName);
39
- for (const metadata of (0, Attributes_1.readZLinkDecoratorMetadata)(type)) {
40
- if (metadata.kind === 'packet' &&
41
- metadata.jsonContract !== undefined &&
42
- (expectedPacketName === undefined ||
43
- normalizePacketName(metadata.packetName) === expectedPacketName)) {
44
- return metadata.jsonContract;
45
- }
46
- }
47
- return undefined;
36
+ return (0, json_1.readFrameworkPacketJsonContract)(constructor, explicitPacketName);
48
37
  }
38
+ var json_2 = require("@zlink-systems/stream-wire/internal/json");
39
+ Object.defineProperty(exports, "readFrameworkPacketJsonContract", { enumerable: true, get: function () { return json_2.readFrameworkPacketJsonContract; } });
49
40
  function tryDecoratorPacketName(payload) {
50
41
  if (typeof payload !== 'object' || payload === null) {
51
42
  return undefined;
@@ -56,7 +47,7 @@ function tryDecoratorPacketName(payload) {
56
47
  }
57
48
  for (const metadata of (0, Attributes_1.readZLinkDecoratorMetadata)(constructor)) {
58
49
  if (metadata.kind === 'packet') {
59
- return normalizePacketName(metadata.packetName);
50
+ return (0, json_1.normalizePacketName)(metadata.packetName);
60
51
  }
61
52
  }
62
53
  return undefined;
@@ -69,12 +60,5 @@ function tryConstructorPacketName(payload) {
69
60
  if (typeof name !== 'string' || STRUCTURAL_PAYLOAD_NAMES.has(name)) {
70
61
  return undefined;
71
62
  }
72
- return normalizePacketName(name);
73
- }
74
- function normalizePacketName(value) {
75
- if (typeof value !== 'string') {
76
- return undefined;
77
- }
78
- const trimmed = value.trim();
79
- return trimmed.length > 0 ? trimmed : undefined;
63
+ return (0, json_1.normalizePacketName)(name);
80
64
  }
@@ -0,0 +1,2 @@
1
+ import type { ZLinkRequest } from '../../contracts/Handlers/Attributes';
2
+ export declare function createZLinkRequest<TReply>(start: (onAdmitted: () => void) => Promise<TReply>, deliverReply?: (reply: Promise<TReply>) => Promise<TReply>): ZLinkRequest<TReply>;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createZLinkRequest = createZLinkRequest;
4
+ const completedAdmission = Promise.resolve();
5
+ const ignoreAdmissionFailure = () => { };
6
+ function createZLinkRequest(start, deliverReply) {
7
+ let admitted;
8
+ let resolveAdmission;
9
+ let rejectAdmission;
10
+ const confirmAdmission = () => {
11
+ admitted ??= completedAdmission;
12
+ resolveAdmission?.();
13
+ };
14
+ const failAdmission = (error) => {
15
+ if (admitted === undefined) {
16
+ admitted = Promise.reject(error);
17
+ // Existing callers may observe only the reply Promise. Observing the
18
+ // rejection here leaves the public admission Promise rejected.
19
+ void admitted.catch(ignoreAdmissionFailure);
20
+ }
21
+ else {
22
+ rejectAdmission?.(error);
23
+ }
24
+ };
25
+ const observeAdmission = () => {
26
+ if (admitted === undefined) {
27
+ admitted = new Promise((resolve, reject) => {
28
+ resolveAdmission = resolve;
29
+ rejectAdmission = reject;
30
+ });
31
+ void admitted.catch(ignoreAdmissionFailure);
32
+ }
33
+ return admitted;
34
+ };
35
+ let pending;
36
+ try {
37
+ pending = start(confirmAdmission);
38
+ }
39
+ catch (error) {
40
+ pending = Promise.reject(error);
41
+ }
42
+ const observed = pending.then((value) => {
43
+ // A successful reply proves admission even without an observation callback.
44
+ confirmAdmission();
45
+ return value;
46
+ }, (error) => {
47
+ failAdmission(error);
48
+ throw error;
49
+ });
50
+ const reply = deliverReply?.(observed) ?? observed;
51
+ return Object.defineProperty(reply, 'admitted', {
52
+ get: observeAdmission
53
+ });
54
+ }
@@ -10,7 +10,8 @@ export declare enum ZLinkSubmitStatus {
10
10
  export interface ZLinkSubmitResult {
11
11
  readonly status: ZLinkSubmitStatus;
12
12
  }
13
- /** Projects immediate refusal and pending admission failure from their Core phase. */
13
+ export declare const submittedResult: ZLinkSubmitResult;
14
+ /** Projects typed submit failure; capacity refusal has no admission wait token. */
14
15
  export declare function submitToRequestResult(result: number, phase: 'submit' | 'completion'): number;
15
16
  export declare function classifySubmitResult(result: number, operation: string, phase?: 'submit' | 'completion'): ZLinkSubmitResult;
16
17
  export declare function requireOneWayCompletion(result: ZLinkSubmitResult, operation: string, notFoundKind?: ZLinkFrameworkInternalErrorKind): void;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ZLinkSubmitStatus = void 0;
3
+ exports.submittedResult = exports.ZLinkSubmitStatus = void 0;
4
4
  exports.submitToRequestResult = submitToRequestResult;
5
5
  exports.classifySubmitResult = classifySubmitResult;
6
6
  exports.requireOneWayCompletion = requireOneWayCompletion;
@@ -19,13 +19,16 @@ var ZLinkSubmitStatus;
19
19
  ZLinkSubmitStatus["RouteNotConnected"] = "routeNotConnected";
20
20
  ZLinkSubmitStatus["Shutdown"] = "shutdown";
21
21
  })(ZLinkSubmitStatus || (exports.ZLinkSubmitStatus = ZLinkSubmitStatus = {}));
22
- /** Projects immediate refusal and pending admission failure from their Core phase. */
22
+ exports.submittedResult = Object.freeze({
23
+ status: ZLinkSubmitStatus.Submitted
24
+ });
25
+ /** Projects typed submit failure; capacity refusal has no admission wait token. */
23
26
  function submitToRequestResult(result, phase) {
24
27
  switch (result) {
25
28
  case runtime_values_1.SubmitResult.Ok:
26
29
  return runtime_values_1.RequestResult.Ok;
27
30
  case runtime_values_1.SubmitResult.Backpressured:
28
- return phase === 'submit' ? runtime_values_1.RequestResult.NotConnected : runtime_values_1.RequestResult.TimedOut;
31
+ return runtime_values_1.RequestResult.NotConnected;
29
32
  case runtime_values_1.SubmitResult.NotConnected:
30
33
  return runtime_values_1.RequestResult.NotConnected;
31
34
  case runtime_values_1.SubmitResult.NotFound:
@@ -50,7 +53,7 @@ function classifySubmitResult(result, operation, phase = 'submit') {
50
53
  const terminal = submitToRequestResult(result, phase);
51
54
  switch (terminal) {
52
55
  case runtime_values_1.RequestResult.Ok:
53
- return { status: ZLinkSubmitStatus.Submitted };
56
+ return exports.submittedResult;
54
57
  case runtime_values_1.RequestResult.TimedOut:
55
58
  return { status: ZLinkSubmitStatus.TimedOut };
56
59
  case runtime_values_1.RequestResult.NotFound:
@@ -1169,6 +1169,20 @@ export declare function encodeRelocationPendingTimerTick(value: RelocationPendin
1169
1169
  export type RelocationPendingTimerTickVector = readonly RelocationPendingTimerTick[];
1170
1170
  export declare function decodeRelocationPendingTimerTickVector(bytes: Uint8Array, context: ServiceWireDecoderContext): RelocationPendingTimerTickVector;
1171
1171
  export declare function encodeRelocationPendingTimerTickVector(value: RelocationPendingTimerTickVector, context: ServiceWireDecoderContext): Uint8Array;
1172
+ export type RelocationSessionBinding = {
1173
+ readonly participantId: NonzeroU64;
1174
+ readonly sessionOwnerNodeRid: Rid;
1175
+ readonly sessionOwnerNodeGeneration: NonzeroU64;
1176
+ readonly sessionOwnerId: Text8;
1177
+ readonly sessionOwnerLeaseGeneration: NonzeroU64;
1178
+ readonly sessionRid: Rid;
1179
+ readonly bindingGeneration: NonzeroU64;
1180
+ };
1181
+ export declare function decodeRelocationSessionBinding(bytes: Uint8Array, context: ServiceWireDecoderContext): RelocationSessionBinding;
1182
+ export declare function encodeRelocationSessionBinding(value: RelocationSessionBinding, context: ServiceWireDecoderContext): Uint8Array;
1183
+ export type RelocationSessionBindingVector = readonly RelocationSessionBinding[];
1184
+ export declare function decodeRelocationSessionBindingVector(bytes: Uint8Array, context: ServiceWireDecoderContext): RelocationSessionBindingVector;
1185
+ export declare function encodeRelocationSessionBindingVector(value: RelocationSessionBindingVector, context: ServiceWireDecoderContext): Uint8Array;
1172
1186
  export type RelocationEnvelopeV1 = {
1173
1187
  readonly relocation: RelocationId;
1174
1188
  readonly object: RelocationObjectIdentity;
@@ -1177,6 +1191,7 @@ export type RelocationEnvelopeV1 = {
1177
1191
  readonly savedWork: SavedWorkVector;
1178
1192
  readonly timerRegistrations: RelocationTimerRegistrationVector;
1179
1193
  readonly pendingTimerTicks: RelocationPendingTimerTickVector;
1194
+ readonly sessionBindings: RelocationSessionBindingVector;
1180
1195
  };
1181
1196
  export declare function decodeRelocationEnvelopeV1(bytes: Uint8Array, context: ServiceWireDecoderContext): RelocationEnvelopeV1;
1182
1197
  export declare function encodeRelocationEnvelopeV1(value: RelocationEnvelopeV1, context: ServiceWireDecoderContext): Uint8Array;