actor-ts 0.9.1 → 0.10.0

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 (886) hide show
  1. package/CHANGELOG.md +382 -0
  2. package/README.md +285 -269
  3. package/dist/ActorSystem.d.ts +3 -38
  4. package/dist/ActorSystem.d.ts.map +1 -1
  5. package/dist/ActorSystem.js +2 -2
  6. package/dist/ActorSystem.js.map +1 -1
  7. package/dist/ActorSystemOptions.d.ts +91 -0
  8. package/dist/ActorSystemOptions.d.ts.map +1 -0
  9. package/dist/ActorSystemOptions.js +45 -0
  10. package/dist/ActorSystemOptions.js.map +1 -0
  11. package/dist/Logger.d.ts +63 -0
  12. package/dist/Logger.d.ts.map +1 -1
  13. package/dist/Logger.js +146 -0
  14. package/dist/Logger.js.map +1 -1
  15. package/dist/cache/MemcachedCache.d.ts +2 -12
  16. package/dist/cache/MemcachedCache.d.ts.map +1 -1
  17. package/dist/cache/MemcachedCache.js +2 -1
  18. package/dist/cache/MemcachedCache.js.map +1 -1
  19. package/dist/cache/MemcachedCacheOptions.d.ts +40 -0
  20. package/dist/cache/MemcachedCacheOptions.d.ts.map +1 -0
  21. package/dist/cache/MemcachedCacheOptions.js +32 -0
  22. package/dist/cache/MemcachedCacheOptions.js.map +1 -0
  23. package/dist/cache/RedisCache.d.ts +2 -22
  24. package/dist/cache/RedisCache.d.ts.map +1 -1
  25. package/dist/cache/RedisCache.js +2 -1
  26. package/dist/cache/RedisCache.js.map +1 -1
  27. package/dist/cache/RedisCacheOptions.d.ts +56 -0
  28. package/dist/cache/RedisCacheOptions.d.ts.map +1 -0
  29. package/dist/cache/RedisCacheOptions.js +43 -0
  30. package/dist/cache/RedisCacheOptions.js.map +1 -0
  31. package/dist/cache/index.d.ts +6 -2
  32. package/dist/cache/index.d.ts.map +1 -1
  33. package/dist/cache/index.js +2 -0
  34. package/dist/cache/index.js.map +1 -1
  35. package/dist/cluster/Cluster.d.ts +4 -63
  36. package/dist/cluster/Cluster.d.ts.map +1 -1
  37. package/dist/cluster/Cluster.js +10 -5
  38. package/dist/cluster/Cluster.js.map +1 -1
  39. package/dist/cluster/ClusterBootstrap.d.ts +6 -84
  40. package/dist/cluster/ClusterBootstrap.d.ts.map +1 -1
  41. package/dist/cluster/ClusterBootstrap.js +33 -21
  42. package/dist/cluster/ClusterBootstrap.js.map +1 -1
  43. package/dist/cluster/ClusterBootstrapOptions.d.ts +152 -0
  44. package/dist/cluster/ClusterBootstrapOptions.d.ts.map +1 -0
  45. package/dist/cluster/ClusterBootstrapOptions.js +103 -0
  46. package/dist/cluster/ClusterBootstrapOptions.js.map +1 -0
  47. package/dist/cluster/ClusterClient.d.ts +21 -31
  48. package/dist/cluster/ClusterClient.d.ts.map +1 -1
  49. package/dist/cluster/ClusterClient.js +21 -6
  50. package/dist/cluster/ClusterClient.js.map +1 -1
  51. package/dist/cluster/ClusterClientOptions.d.ts +65 -0
  52. package/dist/cluster/ClusterClientOptions.d.ts.map +1 -0
  53. package/dist/cluster/ClusterClientOptions.js +43 -0
  54. package/dist/cluster/ClusterClientOptions.js.map +1 -0
  55. package/dist/cluster/ClusterClientReceptionist.d.ts +2 -8
  56. package/dist/cluster/ClusterClientReceptionist.d.ts.map +1 -1
  57. package/dist/cluster/ClusterClientReceptionist.js +3 -1
  58. package/dist/cluster/ClusterClientReceptionist.js.map +1 -1
  59. package/dist/cluster/ClusterClientReceptionistOptions.d.ts +32 -0
  60. package/dist/cluster/ClusterClientReceptionistOptions.d.ts.map +1 -0
  61. package/dist/cluster/ClusterClientReceptionistOptions.js +22 -0
  62. package/dist/cluster/ClusterClientReceptionistOptions.js.map +1 -0
  63. package/dist/cluster/ClusterOptions.d.ts +116 -0
  64. package/dist/cluster/ClusterOptions.d.ts.map +1 -0
  65. package/dist/cluster/ClusterOptions.js +77 -0
  66. package/dist/cluster/ClusterOptions.js.map +1 -0
  67. package/dist/cluster/FailureDetector.d.ts +4 -11
  68. package/dist/cluster/FailureDetector.d.ts.map +1 -1
  69. package/dist/cluster/FailureDetector.js +4 -3
  70. package/dist/cluster/FailureDetector.js.map +1 -1
  71. package/dist/cluster/FailureDetectorOptions.d.ts +38 -0
  72. package/dist/cluster/FailureDetectorOptions.d.ts.map +1 -0
  73. package/dist/cluster/FailureDetectorOptions.js +31 -0
  74. package/dist/cluster/FailureDetectorOptions.js.map +1 -0
  75. package/dist/cluster/PhiAccrualFailureDetector.d.ts +3 -19
  76. package/dist/cluster/PhiAccrualFailureDetector.d.ts.map +1 -1
  77. package/dist/cluster/PhiAccrualFailureDetector.js +2 -2
  78. package/dist/cluster/PhiAccrualFailureDetector.js.map +1 -1
  79. package/dist/cluster/PhiAccrualOptions.d.ts +53 -0
  80. package/dist/cluster/PhiAccrualOptions.d.ts.map +1 -0
  81. package/dist/cluster/PhiAccrualOptions.js +43 -0
  82. package/dist/cluster/PhiAccrualOptions.js.map +1 -0
  83. package/dist/cluster/downing/KeepOldest.d.ts +2 -11
  84. package/dist/cluster/downing/KeepOldest.d.ts.map +1 -1
  85. package/dist/cluster/downing/KeepOldest.js +2 -2
  86. package/dist/cluster/downing/KeepOldest.js.map +1 -1
  87. package/dist/cluster/downing/KeepOldestOptions.d.ts +34 -0
  88. package/dist/cluster/downing/KeepOldestOptions.d.ts.map +1 -0
  89. package/dist/cluster/downing/KeepOldestOptions.js +23 -0
  90. package/dist/cluster/downing/KeepOldestOptions.js.map +1 -0
  91. package/dist/cluster/downing/KeepReferee.d.ts +2 -10
  92. package/dist/cluster/downing/KeepReferee.d.ts.map +1 -1
  93. package/dist/cluster/downing/KeepReferee.js +3 -3
  94. package/dist/cluster/downing/KeepReferee.js.map +1 -1
  95. package/dist/cluster/downing/KeepRefereeOptions.d.ts +35 -0
  96. package/dist/cluster/downing/KeepRefereeOptions.d.ts.map +1 -0
  97. package/dist/cluster/downing/KeepRefereeOptions.js +25 -0
  98. package/dist/cluster/downing/KeepRefereeOptions.js.map +1 -0
  99. package/dist/cluster/downing/LeaseMajority.d.ts +63 -21
  100. package/dist/cluster/downing/LeaseMajority.d.ts.map +1 -1
  101. package/dist/cluster/downing/LeaseMajority.js +132 -9
  102. package/dist/cluster/downing/LeaseMajority.js.map +1 -1
  103. package/dist/cluster/downing/LeaseMajorityOptions.d.ts +49 -0
  104. package/dist/cluster/downing/LeaseMajorityOptions.d.ts.map +1 -0
  105. package/dist/cluster/downing/LeaseMajorityOptions.js +31 -0
  106. package/dist/cluster/downing/LeaseMajorityOptions.js.map +1 -0
  107. package/dist/cluster/downing/StaticQuorum.d.ts +2 -7
  108. package/dist/cluster/downing/StaticQuorum.d.ts.map +1 -1
  109. package/dist/cluster/downing/StaticQuorum.js +3 -3
  110. package/dist/cluster/downing/StaticQuorum.js.map +1 -1
  111. package/dist/cluster/downing/StaticQuorumOptions.d.ts +30 -0
  112. package/dist/cluster/downing/StaticQuorumOptions.d.ts.map +1 -0
  113. package/dist/cluster/downing/StaticQuorumOptions.js +23 -0
  114. package/dist/cluster/downing/StaticQuorumOptions.js.map +1 -0
  115. package/dist/cluster/downing/index.d.ts +8 -4
  116. package/dist/cluster/downing/index.d.ts.map +1 -1
  117. package/dist/cluster/downing/index.js +4 -0
  118. package/dist/cluster/downing/index.js.map +1 -1
  119. package/dist/cluster/index.d.ts +34 -19
  120. package/dist/cluster/index.d.ts.map +1 -1
  121. package/dist/cluster/index.js +15 -4
  122. package/dist/cluster/index.js.map +1 -1
  123. package/dist/cluster/pubsub/DistributedPubSubExtension.d.ts +2 -2
  124. package/dist/cluster/pubsub/DistributedPubSubExtension.d.ts.map +1 -1
  125. package/dist/cluster/pubsub/DistributedPubSubExtension.js +5 -2
  126. package/dist/cluster/pubsub/DistributedPubSubExtension.js.map +1 -1
  127. package/dist/cluster/pubsub/DistributedPubSubMediator.d.ts +3 -7
  128. package/dist/cluster/pubsub/DistributedPubSubMediator.d.ts.map +1 -1
  129. package/dist/cluster/pubsub/DistributedPubSubMediator.js +3 -3
  130. package/dist/cluster/pubsub/DistributedPubSubMediator.js.map +1 -1
  131. package/dist/cluster/pubsub/DistributedPubSubOptions.d.ts +29 -0
  132. package/dist/cluster/pubsub/DistributedPubSubOptions.d.ts.map +1 -0
  133. package/dist/cluster/pubsub/DistributedPubSubOptions.js +23 -0
  134. package/dist/cluster/pubsub/DistributedPubSubOptions.js.map +1 -0
  135. package/dist/cluster/pubsub/index.d.ts +2 -1
  136. package/dist/cluster/pubsub/index.d.ts.map +1 -1
  137. package/dist/cluster/pubsub/index.js +1 -0
  138. package/dist/cluster/pubsub/index.js.map +1 -1
  139. package/dist/cluster/router/ClusterRouter.d.ts +12 -32
  140. package/dist/cluster/router/ClusterRouter.d.ts.map +1 -1
  141. package/dist/cluster/router/ClusterRouter.js +4 -2
  142. package/dist/cluster/router/ClusterRouter.js.map +1 -1
  143. package/dist/cluster/router/ClusterRouterOptions.d.ts +60 -0
  144. package/dist/cluster/router/ClusterRouterOptions.d.ts.map +1 -0
  145. package/dist/cluster/router/ClusterRouterOptions.js +41 -0
  146. package/dist/cluster/router/ClusterRouterOptions.js.map +1 -0
  147. package/dist/cluster/router/index.d.ts +3 -1
  148. package/dist/cluster/router/index.d.ts.map +1 -1
  149. package/dist/cluster/router/index.js +1 -0
  150. package/dist/cluster/router/index.js.map +1 -1
  151. package/dist/cluster/sharding/CassandraRememberEntitiesStore.d.ts +1 -15
  152. package/dist/cluster/sharding/CassandraRememberEntitiesStore.d.ts.map +1 -1
  153. package/dist/cluster/sharding/CassandraRememberEntitiesStore.js +35 -2
  154. package/dist/cluster/sharding/CassandraRememberEntitiesStore.js.map +1 -1
  155. package/dist/cluster/sharding/CassandraRememberEntitiesStoreOptions.d.ts +63 -0
  156. package/dist/cluster/sharding/CassandraRememberEntitiesStoreOptions.d.ts.map +1 -0
  157. package/dist/cluster/sharding/CassandraRememberEntitiesStoreOptions.js +63 -0
  158. package/dist/cluster/sharding/CassandraRememberEntitiesStoreOptions.js.map +1 -0
  159. package/dist/cluster/sharding/ClusterSharding.d.ts +18 -64
  160. package/dist/cluster/sharding/ClusterSharding.d.ts.map +1 -1
  161. package/dist/cluster/sharding/ClusterSharding.js +44 -20
  162. package/dist/cluster/sharding/ClusterSharding.js.map +1 -1
  163. package/dist/cluster/sharding/CoordinatorState.d.ts +1 -1
  164. package/dist/cluster/sharding/CoordinatorState.js +1 -1
  165. package/dist/cluster/sharding/ShardCoordinator.d.ts +3 -63
  166. package/dist/cluster/sharding/ShardCoordinator.d.ts.map +1 -1
  167. package/dist/cluster/sharding/ShardCoordinator.js +3 -3
  168. package/dist/cluster/sharding/ShardCoordinator.js.map +1 -1
  169. package/dist/cluster/sharding/ShardCoordinatorOptions.d.ts +111 -0
  170. package/dist/cluster/sharding/ShardCoordinatorOptions.d.ts.map +1 -0
  171. package/dist/cluster/sharding/ShardCoordinatorOptions.js +69 -0
  172. package/dist/cluster/sharding/ShardCoordinatorOptions.js.map +1 -0
  173. package/dist/cluster/sharding/ShardRegion.d.ts +2 -33
  174. package/dist/cluster/sharding/ShardRegion.d.ts.map +1 -1
  175. package/dist/cluster/sharding/ShardRegion.js.map +1 -1
  176. package/dist/cluster/sharding/ShardedDaemonProcess.d.ts +2 -22
  177. package/dist/cluster/sharding/ShardedDaemonProcess.d.ts.map +1 -1
  178. package/dist/cluster/sharding/ShardedDaemonProcess.js +14 -11
  179. package/dist/cluster/sharding/ShardedDaemonProcess.js.map +1 -1
  180. package/dist/cluster/sharding/ShardedDaemonProcessOptions.d.ts +51 -0
  181. package/dist/cluster/sharding/ShardedDaemonProcessOptions.d.ts.map +1 -0
  182. package/dist/cluster/sharding/ShardedDaemonProcessOptions.js +35 -0
  183. package/dist/cluster/sharding/ShardedDaemonProcessOptions.js.map +1 -0
  184. package/dist/cluster/sharding/ShardingOptions.d.ts +84 -0
  185. package/dist/cluster/sharding/ShardingOptions.d.ts.map +1 -0
  186. package/dist/cluster/sharding/ShardingOptions.js +62 -0
  187. package/dist/cluster/sharding/ShardingOptions.js.map +1 -0
  188. package/dist/cluster/sharding/StartShardingOptions.d.ts +98 -0
  189. package/dist/cluster/sharding/StartShardingOptions.d.ts.map +1 -0
  190. package/dist/cluster/sharding/StartShardingOptions.js +52 -0
  191. package/dist/cluster/sharding/StartShardingOptions.js.map +1 -0
  192. package/dist/cluster/singleton/ClusterSingleton.d.ts +2 -30
  193. package/dist/cluster/singleton/ClusterSingleton.d.ts.map +1 -1
  194. package/dist/cluster/singleton/ClusterSingleton.js +15 -9
  195. package/dist/cluster/singleton/ClusterSingleton.js.map +1 -1
  196. package/dist/cluster/singleton/ClusterSingletonManager.d.ts +3 -18
  197. package/dist/cluster/singleton/ClusterSingletonManager.d.ts.map +1 -1
  198. package/dist/cluster/singleton/ClusterSingletonManager.js +3 -3
  199. package/dist/cluster/singleton/ClusterSingletonManager.js.map +1 -1
  200. package/dist/cluster/singleton/ClusterSingletonManagerOptions.d.ts +49 -0
  201. package/dist/cluster/singleton/ClusterSingletonManagerOptions.d.ts.map +1 -0
  202. package/dist/cluster/singleton/ClusterSingletonManagerOptions.js +40 -0
  203. package/dist/cluster/singleton/ClusterSingletonManagerOptions.js.map +1 -0
  204. package/dist/cluster/singleton/StartSingletonOptions.d.ts +64 -0
  205. package/dist/cluster/singleton/StartSingletonOptions.d.ts.map +1 -0
  206. package/dist/cluster/singleton/StartSingletonOptions.js +40 -0
  207. package/dist/cluster/singleton/StartSingletonOptions.js.map +1 -0
  208. package/dist/cluster/singleton/index.d.ts +6 -2
  209. package/dist/cluster/singleton/index.d.ts.map +1 -1
  210. package/dist/cluster/singleton/index.js +2 -0
  211. package/dist/cluster/singleton/index.js.map +1 -1
  212. package/dist/config/ConfigKeys.d.ts +5 -0
  213. package/dist/config/ConfigKeys.d.ts.map +1 -1
  214. package/dist/config/ConfigKeys.js +5 -0
  215. package/dist/config/ConfigKeys.js.map +1 -1
  216. package/dist/coordination/Lease.d.ts +32 -14
  217. package/dist/coordination/Lease.d.ts.map +1 -1
  218. package/dist/coordination/LeaseOptions.d.ts +61 -0
  219. package/dist/coordination/LeaseOptions.d.ts.map +1 -0
  220. package/dist/coordination/LeaseOptions.js +50 -0
  221. package/dist/coordination/LeaseOptions.js.map +1 -0
  222. package/dist/coordination/index.d.ts +5 -2
  223. package/dist/coordination/index.d.ts.map +1 -1
  224. package/dist/coordination/index.js +2 -0
  225. package/dist/coordination/index.js.map +1 -1
  226. package/dist/coordination/leases/InMemoryLease.d.ts +18 -5
  227. package/dist/coordination/leases/InMemoryLease.d.ts.map +1 -1
  228. package/dist/coordination/leases/InMemoryLease.js +23 -11
  229. package/dist/coordination/leases/InMemoryLease.js.map +1 -1
  230. package/dist/coordination/leases/KubernetesLease.d.ts +19 -24
  231. package/dist/coordination/leases/KubernetesLease.d.ts.map +1 -1
  232. package/dist/coordination/leases/KubernetesLease.js +28 -9
  233. package/dist/coordination/leases/KubernetesLease.js.map +1 -1
  234. package/dist/coordination/leases/KubernetesLeaseOptions.d.ts +58 -0
  235. package/dist/coordination/leases/KubernetesLeaseOptions.d.ts.map +1 -0
  236. package/dist/coordination/leases/KubernetesLeaseOptions.js +42 -0
  237. package/dist/coordination/leases/KubernetesLeaseOptions.js.map +1 -0
  238. package/dist/crdt/DistributedData.d.ts +2 -22
  239. package/dist/crdt/DistributedData.d.ts.map +1 -1
  240. package/dist/crdt/DistributedData.js +3 -2
  241. package/dist/crdt/DistributedData.js.map +1 -1
  242. package/dist/crdt/DistributedDataOptions.d.ts +50 -0
  243. package/dist/crdt/DistributedDataOptions.d.ts.map +1 -0
  244. package/dist/crdt/DistributedDataOptions.js +28 -0
  245. package/dist/crdt/DistributedDataOptions.js.map +1 -0
  246. package/dist/crdt/index.d.ts +3 -1
  247. package/dist/crdt/index.d.ts.map +1 -1
  248. package/dist/crdt/index.js +1 -0
  249. package/dist/crdt/index.js.map +1 -1
  250. package/dist/delivery/ProducerController.d.ts +4 -19
  251. package/dist/delivery/ProducerController.d.ts.map +1 -1
  252. package/dist/delivery/ProducerController.js +4 -3
  253. package/dist/delivery/ProducerController.js.map +1 -1
  254. package/dist/delivery/ProducerControllerOptions.d.ts +50 -0
  255. package/dist/delivery/ProducerControllerOptions.d.ts.map +1 -0
  256. package/dist/delivery/ProducerControllerOptions.js +36 -0
  257. package/dist/delivery/ProducerControllerOptions.js.map +1 -0
  258. package/dist/delivery/ReliableDelivery.d.ts +3 -2
  259. package/dist/delivery/ReliableDelivery.d.ts.map +1 -1
  260. package/dist/delivery/ReliableDelivery.js +2 -2
  261. package/dist/delivery/ReliableDelivery.js.map +1 -1
  262. package/dist/delivery/index.d.ts +3 -1
  263. package/dist/delivery/index.d.ts.map +1 -1
  264. package/dist/delivery/index.js +1 -0
  265. package/dist/delivery/index.js.map +1 -1
  266. package/dist/discovery/AutoDiscoveryOptions.d.ts +72 -0
  267. package/dist/discovery/AutoDiscoveryOptions.d.ts.map +1 -0
  268. package/dist/discovery/AutoDiscoveryOptions.js +34 -0
  269. package/dist/discovery/AutoDiscoveryOptions.js.map +1 -0
  270. package/dist/discovery/ConfigSeedProvider.d.ts +2 -7
  271. package/dist/discovery/ConfigSeedProvider.d.ts.map +1 -1
  272. package/dist/discovery/ConfigSeedProvider.js +4 -3
  273. package/dist/discovery/ConfigSeedProvider.js.map +1 -1
  274. package/dist/discovery/ConfigSeedProviderOptions.d.ts +34 -0
  275. package/dist/discovery/ConfigSeedProviderOptions.d.ts.map +1 -0
  276. package/dist/discovery/ConfigSeedProviderOptions.js +27 -0
  277. package/dist/discovery/ConfigSeedProviderOptions.js.map +1 -0
  278. package/dist/discovery/DnsSeedProvider.d.ts +3 -27
  279. package/dist/discovery/DnsSeedProvider.d.ts.map +1 -1
  280. package/dist/discovery/DnsSeedProvider.js +4 -4
  281. package/dist/discovery/DnsSeedProvider.js.map +1 -1
  282. package/dist/discovery/DnsSeedProviderOptions.d.ts +67 -0
  283. package/dist/discovery/DnsSeedProviderOptions.d.ts.map +1 -0
  284. package/dist/discovery/DnsSeedProviderOptions.js +48 -0
  285. package/dist/discovery/DnsSeedProviderOptions.js.map +1 -0
  286. package/dist/discovery/KubernetesApiSeedProvider.d.ts +2 -13
  287. package/dist/discovery/KubernetesApiSeedProvider.d.ts.map +1 -1
  288. package/dist/discovery/KubernetesApiSeedProvider.js +2 -2
  289. package/dist/discovery/KubernetesApiSeedProvider.js.map +1 -1
  290. package/dist/discovery/KubernetesApiSeedProviderOptions.d.ts +46 -0
  291. package/dist/discovery/KubernetesApiSeedProviderOptions.d.ts.map +1 -0
  292. package/dist/discovery/KubernetesApiSeedProviderOptions.js +39 -0
  293. package/dist/discovery/KubernetesApiSeedProviderOptions.js.map +1 -0
  294. package/dist/discovery/Receptionist.d.ts +3 -6
  295. package/dist/discovery/Receptionist.d.ts.map +1 -1
  296. package/dist/discovery/Receptionist.js +10 -3
  297. package/dist/discovery/Receptionist.js.map +1 -1
  298. package/dist/discovery/ReceptionistOptions.d.ts +30 -0
  299. package/dist/discovery/ReceptionistOptions.d.ts.map +1 -0
  300. package/dist/discovery/ReceptionistOptions.js +24 -0
  301. package/dist/discovery/ReceptionistOptions.js.map +1 -0
  302. package/dist/discovery/autoDiscovery.d.ts +3 -44
  303. package/dist/discovery/autoDiscovery.d.ts.map +1 -1
  304. package/dist/discovery/autoDiscovery.js +31 -32
  305. package/dist/discovery/autoDiscovery.js.map +1 -1
  306. package/dist/discovery/index.d.ts +10 -5
  307. package/dist/discovery/index.d.ts.map +1 -1
  308. package/dist/discovery/index.js +5 -0
  309. package/dist/discovery/index.js.map +1 -1
  310. package/dist/http/HttpExtension.d.ts.map +1 -1
  311. package/dist/http/HttpExtension.js +69 -8
  312. package/dist/http/HttpExtension.js.map +1 -1
  313. package/dist/http/Route.d.ts +76 -4
  314. package/dist/http/Route.d.ts.map +1 -1
  315. package/dist/http/Route.js +74 -1
  316. package/dist/http/Route.js.map +1 -1
  317. package/dist/http/backend/ExpressBackend.d.ts +18 -12
  318. package/dist/http/backend/ExpressBackend.d.ts.map +1 -1
  319. package/dist/http/backend/ExpressBackend.js +134 -8
  320. package/dist/http/backend/ExpressBackend.js.map +1 -1
  321. package/dist/http/backend/ExpressBackendOptions.d.ts +47 -0
  322. package/dist/http/backend/ExpressBackendOptions.d.ts.map +1 -0
  323. package/dist/http/backend/ExpressBackendOptions.js +35 -0
  324. package/dist/http/backend/ExpressBackendOptions.js.map +1 -0
  325. package/dist/http/backend/FastifyBackend.d.ts +4 -1
  326. package/dist/http/backend/FastifyBackend.d.ts.map +1 -1
  327. package/dist/http/backend/FastifyBackend.js +71 -1
  328. package/dist/http/backend/FastifyBackend.js.map +1 -1
  329. package/dist/http/backend/HonoBackend.d.ts +19 -13
  330. package/dist/http/backend/HonoBackend.d.ts.map +1 -1
  331. package/dist/http/backend/HonoBackend.js +152 -5
  332. package/dist/http/backend/HonoBackend.js.map +1 -1
  333. package/dist/http/backend/HonoBackendOptions.d.ts +47 -0
  334. package/dist/http/backend/HonoBackendOptions.d.ts.map +1 -0
  335. package/dist/http/backend/HonoBackendOptions.js +35 -0
  336. package/dist/http/backend/HonoBackendOptions.js.map +1 -0
  337. package/dist/http/backend/HttpServerBackend.d.ts +24 -0
  338. package/dist/http/backend/HttpServerBackend.d.ts.map +1 -1
  339. package/dist/http/index.d.ts +11 -5
  340. package/dist/http/index.d.ts.map +1 -1
  341. package/dist/http/index.js +8 -1
  342. package/dist/http/index.js.map +1 -1
  343. package/dist/http/middleware/BearerToken.d.ts +44 -0
  344. package/dist/http/middleware/BearerToken.d.ts.map +1 -0
  345. package/dist/http/middleware/BearerToken.js +72 -0
  346. package/dist/http/middleware/BearerToken.js.map +1 -0
  347. package/dist/http/middleware/IpAllowlist.d.ts +45 -0
  348. package/dist/http/middleware/IpAllowlist.d.ts.map +1 -0
  349. package/dist/http/middleware/IpAllowlist.js +148 -0
  350. package/dist/http/middleware/IpAllowlist.js.map +1 -0
  351. package/dist/http/middleware/index.d.ts +5 -0
  352. package/dist/http/middleware/index.d.ts.map +1 -0
  353. package/dist/http/middleware/index.js +3 -0
  354. package/dist/http/middleware/index.js.map +1 -0
  355. package/dist/http/types.d.ts +9 -0
  356. package/dist/http/types.d.ts.map +1 -1
  357. package/dist/http/types.js.map +1 -1
  358. package/dist/http/ws/ConnectionWiring.d.ts +59 -0
  359. package/dist/http/ws/ConnectionWiring.d.ts.map +1 -0
  360. package/dist/http/ws/ConnectionWiring.js +112 -0
  361. package/dist/http/ws/ConnectionWiring.js.map +1 -0
  362. package/dist/http/ws/SocketAdapter.d.ts +72 -0
  363. package/dist/http/ws/SocketAdapter.d.ts.map +1 -0
  364. package/dist/http/ws/SocketAdapter.js +97 -0
  365. package/dist/http/ws/SocketAdapter.js.map +1 -0
  366. package/dist/http/ws/WebSocketClientActor.d.ts +66 -0
  367. package/dist/http/ws/WebSocketClientActor.d.ts.map +1 -0
  368. package/dist/http/ws/WebSocketClientActor.js +194 -0
  369. package/dist/http/ws/WebSocketClientActor.js.map +1 -0
  370. package/dist/http/ws/WebSocketClientOptions.d.ts +77 -0
  371. package/dist/http/ws/WebSocketClientOptions.d.ts.map +1 -0
  372. package/dist/http/ws/WebSocketClientOptions.js +69 -0
  373. package/dist/http/ws/WebSocketClientOptions.js.map +1 -0
  374. package/dist/http/ws/WebSocketConnectionActor.d.ts +51 -0
  375. package/dist/http/ws/WebSocketConnectionActor.d.ts.map +1 -0
  376. package/dist/http/ws/WebSocketConnectionActor.js +170 -0
  377. package/dist/http/ws/WebSocketConnectionActor.js.map +1 -0
  378. package/dist/http/ws/WebSocketRoute.d.ts +20 -0
  379. package/dist/http/ws/WebSocketRoute.d.ts.map +1 -0
  380. package/dist/http/ws/WebSocketRoute.js +44 -0
  381. package/dist/http/ws/WebSocketRoute.js.map +1 -0
  382. package/dist/http/ws/WebSocketRouteOptions.d.ts +54 -0
  383. package/dist/http/ws/WebSocketRouteOptions.d.ts.map +1 -0
  384. package/dist/http/ws/WebSocketRouteOptions.js +55 -0
  385. package/dist/http/ws/WebSocketRouteOptions.js.map +1 -0
  386. package/dist/http/ws/WebSocketServerActor.d.ts +65 -0
  387. package/dist/http/ws/WebSocketServerActor.d.ts.map +1 -0
  388. package/dist/http/ws/WebSocketServerActor.js +133 -0
  389. package/dist/http/ws/WebSocketServerActor.js.map +1 -0
  390. package/dist/http/ws/WsCodec.d.ts +65 -0
  391. package/dist/http/ws/WsCodec.d.ts.map +1 -0
  392. package/dist/http/ws/WsCodec.js +82 -0
  393. package/dist/http/ws/WsCodec.js.map +1 -0
  394. package/dist/http/ws/WsConnection.d.ts +59 -0
  395. package/dist/http/ws/WsConnection.d.ts.map +1 -0
  396. package/dist/http/ws/WsConnection.js +45 -0
  397. package/dist/http/ws/WsConnection.js.map +1 -0
  398. package/dist/http/ws/WsMessages.d.ts +91 -0
  399. package/dist/http/ws/WsMessages.d.ts.map +1 -0
  400. package/dist/http/ws/WsMessages.js +90 -0
  401. package/dist/http/ws/WsMessages.js.map +1 -0
  402. package/dist/http/ws/WsPolicy.d.ts +32 -0
  403. package/dist/http/ws/WsPolicy.d.ts.map +1 -0
  404. package/dist/http/ws/WsPolicy.js +43 -0
  405. package/dist/http/ws/WsPolicy.js.map +1 -0
  406. package/dist/http/ws/index.d.ts +22 -0
  407. package/dist/http/ws/index.d.ts.map +1 -0
  408. package/dist/http/ws/index.js +15 -0
  409. package/dist/http/ws/index.js.map +1 -0
  410. package/dist/http/ws/matchPattern.d.ts +12 -0
  411. package/dist/http/ws/matchPattern.d.ts.map +1 -0
  412. package/dist/http/ws/matchPattern.js +29 -0
  413. package/dist/http/ws/matchPattern.js.map +1 -0
  414. package/dist/http/ws/rawResponse.d.ts +15 -0
  415. package/dist/http/ws/rawResponse.d.ts.map +1 -0
  416. package/dist/http/ws/rawResponse.js +54 -0
  417. package/dist/http/ws/rawResponse.js.map +1 -0
  418. package/dist/http/ws/types.d.ts +70 -0
  419. package/dist/http/ws/types.d.ts.map +1 -0
  420. package/dist/http/ws/types.js +81 -0
  421. package/dist/http/ws/types.js.map +1 -0
  422. package/dist/http/ws/wsCtor.d.ts +34 -0
  423. package/dist/http/ws/wsCtor.d.ts.map +1 -0
  424. package/dist/http/ws/wsCtor.js +38 -0
  425. package/dist/http/ws/wsCtor.js.map +1 -0
  426. package/dist/index.d.ts +25 -23
  427. package/dist/index.d.ts.map +1 -1
  428. package/dist/index.js +15 -11
  429. package/dist/index.js.map +1 -1
  430. package/dist/internal/ActorCell.d.ts +16 -1
  431. package/dist/internal/ActorCell.d.ts.map +1 -1
  432. package/dist/internal/ActorCell.js +32 -2
  433. package/dist/internal/ActorCell.js.map +1 -1
  434. package/dist/io/broker/AmqpActor.d.ts +19 -16
  435. package/dist/io/broker/AmqpActor.d.ts.map +1 -1
  436. package/dist/io/broker/AmqpActor.js +13 -5
  437. package/dist/io/broker/AmqpActor.js.map +1 -1
  438. package/dist/io/broker/AmqpOptions.d.ts +41 -0
  439. package/dist/io/broker/AmqpOptions.d.ts.map +1 -0
  440. package/dist/io/broker/AmqpOptions.js +34 -0
  441. package/dist/io/broker/AmqpOptions.js.map +1 -0
  442. package/dist/io/broker/BrokerActor.d.ts +4 -3
  443. package/dist/io/broker/BrokerActor.d.ts.map +1 -1
  444. package/dist/io/broker/BrokerActor.js +4 -2
  445. package/dist/io/broker/BrokerActor.js.map +1 -1
  446. package/dist/io/broker/BrokerOptions.d.ts +24 -0
  447. package/dist/io/broker/BrokerOptions.d.ts.map +1 -0
  448. package/dist/io/broker/BrokerOptions.js +29 -0
  449. package/dist/io/broker/BrokerOptions.js.map +1 -0
  450. package/dist/io/broker/BrokerSettings.d.ts +2 -2
  451. package/dist/io/broker/BrokerSettings.d.ts.map +1 -1
  452. package/dist/io/broker/BrokerSettings.js.map +1 -1
  453. package/dist/io/broker/GrpcClientActor.d.ts +6 -19
  454. package/dist/io/broker/GrpcClientActor.d.ts.map +1 -1
  455. package/dist/io/broker/GrpcClientActor.js +1 -1
  456. package/dist/io/broker/GrpcClientActor.js.map +1 -1
  457. package/dist/io/broker/GrpcClientOptions.d.ts +48 -0
  458. package/dist/io/broker/GrpcClientOptions.d.ts.map +1 -0
  459. package/dist/io/broker/GrpcClientOptions.js +42 -0
  460. package/dist/io/broker/GrpcClientOptions.js.map +1 -0
  461. package/dist/io/broker/GrpcServerActor.d.ts +3 -24
  462. package/dist/io/broker/GrpcServerActor.d.ts.map +1 -1
  463. package/dist/io/broker/GrpcServerActor.js +3 -3
  464. package/dist/io/broker/GrpcServerActor.js.map +1 -1
  465. package/dist/io/broker/GrpcServerOptions.d.ts +58 -0
  466. package/dist/io/broker/GrpcServerOptions.d.ts.map +1 -0
  467. package/dist/io/broker/GrpcServerOptions.js +44 -0
  468. package/dist/io/broker/GrpcServerOptions.js.map +1 -0
  469. package/dist/io/broker/JetStreamActor.d.ts +13 -35
  470. package/dist/io/broker/JetStreamActor.d.ts.map +1 -1
  471. package/dist/io/broker/JetStreamActor.js +2 -2
  472. package/dist/io/broker/JetStreamActor.js.map +1 -1
  473. package/dist/io/broker/JetStreamOptions.d.ts +64 -0
  474. package/dist/io/broker/JetStreamOptions.d.ts.map +1 -0
  475. package/dist/io/broker/JetStreamOptions.js +54 -0
  476. package/dist/io/broker/JetStreamOptions.js.map +1 -0
  477. package/dist/io/broker/KafkaActor.d.ts +13 -54
  478. package/dist/io/broker/KafkaActor.d.ts.map +1 -1
  479. package/dist/io/broker/KafkaActor.js +20 -8
  480. package/dist/io/broker/KafkaActor.js.map +1 -1
  481. package/dist/io/broker/KafkaOptions.d.ts +82 -0
  482. package/dist/io/broker/KafkaOptions.d.ts.map +1 -0
  483. package/dist/io/broker/KafkaOptions.js +50 -0
  484. package/dist/io/broker/KafkaOptions.js.map +1 -0
  485. package/dist/io/broker/MqttActor.d.ts +174 -114
  486. package/dist/io/broker/MqttActor.d.ts.map +1 -1
  487. package/dist/io/broker/MqttActor.js +328 -103
  488. package/dist/io/broker/MqttActor.js.map +1 -1
  489. package/dist/io/broker/MqttCodec.d.ts +70 -0
  490. package/dist/io/broker/MqttCodec.d.ts.map +1 -0
  491. package/dist/io/broker/MqttCodec.js +98 -0
  492. package/dist/io/broker/MqttCodec.js.map +1 -0
  493. package/dist/io/broker/MqttMessages.d.ts +145 -0
  494. package/dist/io/broker/MqttMessages.d.ts.map +1 -0
  495. package/dist/io/broker/MqttMessages.js +102 -0
  496. package/dist/io/broker/MqttMessages.js.map +1 -0
  497. package/dist/io/broker/MqttOptions.d.ts +100 -0
  498. package/dist/io/broker/MqttOptions.d.ts.map +1 -0
  499. package/dist/io/broker/MqttOptions.js +73 -0
  500. package/dist/io/broker/MqttOptions.js.map +1 -0
  501. package/dist/io/broker/NatsActor.d.ts +6 -21
  502. package/dist/io/broker/NatsActor.d.ts.map +1 -1
  503. package/dist/io/broker/NatsActor.js +1 -1
  504. package/dist/io/broker/NatsActor.js.map +1 -1
  505. package/dist/io/broker/NatsOptions.d.ts +51 -0
  506. package/dist/io/broker/NatsOptions.d.ts.map +1 -0
  507. package/dist/io/broker/NatsOptions.js +42 -0
  508. package/dist/io/broker/NatsOptions.js.map +1 -0
  509. package/dist/io/broker/RedisStreamsActor.d.ts +6 -24
  510. package/dist/io/broker/RedisStreamsActor.d.ts.map +1 -1
  511. package/dist/io/broker/RedisStreamsActor.js +1 -1
  512. package/dist/io/broker/RedisStreamsActor.js.map +1 -1
  513. package/dist/io/broker/RedisStreamsOptions.d.ts +51 -0
  514. package/dist/io/broker/RedisStreamsOptions.d.ts.map +1 -0
  515. package/dist/io/broker/RedisStreamsOptions.js +38 -0
  516. package/dist/io/broker/RedisStreamsOptions.js.map +1 -0
  517. package/dist/io/broker/SseActor.d.ts +6 -15
  518. package/dist/io/broker/SseActor.d.ts.map +1 -1
  519. package/dist/io/broker/SseActor.js +1 -1
  520. package/dist/io/broker/SseActor.js.map +1 -1
  521. package/dist/io/broker/SseOptions.d.ts +38 -0
  522. package/dist/io/broker/SseOptions.d.ts.map +1 -0
  523. package/dist/io/broker/SseOptions.js +30 -0
  524. package/dist/io/broker/SseOptions.js.map +1 -0
  525. package/dist/io/broker/TcpSocketActor.d.ts +6 -21
  526. package/dist/io/broker/TcpSocketActor.d.ts.map +1 -1
  527. package/dist/io/broker/TcpSocketActor.js +1 -1
  528. package/dist/io/broker/TcpSocketActor.js.map +1 -1
  529. package/dist/io/broker/TcpSocketOptions.d.ts +46 -0
  530. package/dist/io/broker/TcpSocketOptions.d.ts.map +1 -0
  531. package/dist/io/broker/TcpSocketOptions.js +34 -0
  532. package/dist/io/broker/TcpSocketOptions.js.map +1 -0
  533. package/dist/io/broker/UdpSocketActor.d.ts +6 -17
  534. package/dist/io/broker/UdpSocketActor.d.ts.map +1 -1
  535. package/dist/io/broker/UdpSocketActor.js +1 -1
  536. package/dist/io/broker/UdpSocketActor.js.map +1 -1
  537. package/dist/io/broker/UdpSocketOptions.d.ts +42 -0
  538. package/dist/io/broker/UdpSocketOptions.d.ts.map +1 -0
  539. package/dist/io/broker/UdpSocketOptions.js +34 -0
  540. package/dist/io/broker/UdpSocketOptions.js.map +1 -0
  541. package/dist/io/broker/index.d.ts +39 -19
  542. package/dist/io/broker/index.d.ts.map +1 -1
  543. package/dist/io/broker/index.js +21 -4
  544. package/dist/io/broker/index.js.map +1 -1
  545. package/dist/mailbox/BoundedMailbox.d.ts +12 -0
  546. package/dist/mailbox/BoundedMailbox.d.ts.map +1 -1
  547. package/dist/mailbox/BoundedMailbox.js +7 -1
  548. package/dist/mailbox/BoundedMailbox.js.map +1 -1
  549. package/dist/management/HttpManagement.d.ts +34 -1
  550. package/dist/management/HttpManagement.d.ts.map +1 -1
  551. package/dist/management/HttpManagement.js +30 -4
  552. package/dist/management/HttpManagement.js.map +1 -1
  553. package/dist/metrics/PromClientAdapter.d.ts +2 -12
  554. package/dist/metrics/PromClientAdapter.d.ts.map +1 -1
  555. package/dist/metrics/PromClientAdapter.js +2 -2
  556. package/dist/metrics/PromClientAdapter.js.map +1 -1
  557. package/dist/metrics/PromClientAdapterOptions.d.ts +46 -0
  558. package/dist/metrics/PromClientAdapterOptions.d.ts.map +1 -0
  559. package/dist/metrics/PromClientAdapterOptions.js +35 -0
  560. package/dist/metrics/PromClientAdapterOptions.js.map +1 -0
  561. package/dist/metrics/index.d.ts +3 -1
  562. package/dist/metrics/index.d.ts.map +1 -1
  563. package/dist/metrics/index.js +1 -0
  564. package/dist/metrics/index.js.map +1 -1
  565. package/dist/persistence/DurableStateActor.d.ts +4 -9
  566. package/dist/persistence/DurableStateActor.d.ts.map +1 -1
  567. package/dist/persistence/DurableStateActor.js +3 -3
  568. package/dist/persistence/DurableStateActor.js.map +1 -1
  569. package/dist/persistence/DurableStateOptions.d.ts +40 -0
  570. package/dist/persistence/DurableStateOptions.d.ts.map +1 -0
  571. package/dist/persistence/DurableStateOptions.js +36 -0
  572. package/dist/persistence/DurableStateOptions.js.map +1 -0
  573. package/dist/persistence/PersistenceOptions.d.ts +45 -0
  574. package/dist/persistence/PersistenceOptions.d.ts.map +1 -1
  575. package/dist/persistence/ReplicatedEventSourcedActor.d.ts.map +1 -1
  576. package/dist/persistence/ReplicatedEventSourcedActor.js +2 -2
  577. package/dist/persistence/ReplicatedEventSourcedActor.js.map +1 -1
  578. package/dist/persistence/durable-state-stores/MariaDbDurableStateStore.d.ts +32 -0
  579. package/dist/persistence/durable-state-stores/MariaDbDurableStateStore.d.ts.map +1 -0
  580. package/dist/persistence/durable-state-stores/MariaDbDurableStateStore.js +120 -0
  581. package/dist/persistence/durable-state-stores/MariaDbDurableStateStore.js.map +1 -0
  582. package/dist/persistence/durable-state-stores/MariaDbDurableStateStoreOptions.d.ts +38 -0
  583. package/dist/persistence/durable-state-stores/MariaDbDurableStateStoreOptions.d.ts.map +1 -0
  584. package/dist/persistence/durable-state-stores/MariaDbDurableStateStoreOptions.js +38 -0
  585. package/dist/persistence/durable-state-stores/MariaDbDurableStateStoreOptions.js.map +1 -0
  586. package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.d.ts +4 -9
  587. package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.d.ts.map +1 -1
  588. package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.js +49 -7
  589. package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStore.js.map +1 -1
  590. package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.d.ts +61 -0
  591. package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.d.ts.map +1 -0
  592. package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.js +42 -0
  593. package/dist/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.js.map +1 -0
  594. package/dist/persistence/durable-state-stores/PostgresDurableStateStore.d.ts +38 -0
  595. package/dist/persistence/durable-state-stores/PostgresDurableStateStore.d.ts.map +1 -0
  596. package/dist/persistence/durable-state-stores/PostgresDurableStateStore.js +121 -0
  597. package/dist/persistence/durable-state-stores/PostgresDurableStateStore.js.map +1 -0
  598. package/dist/persistence/durable-state-stores/PostgresDurableStateStoreOptions.d.ts +38 -0
  599. package/dist/persistence/durable-state-stores/PostgresDurableStateStoreOptions.d.ts.map +1 -0
  600. package/dist/persistence/durable-state-stores/PostgresDurableStateStoreOptions.js +38 -0
  601. package/dist/persistence/durable-state-stores/PostgresDurableStateStoreOptions.js.map +1 -0
  602. package/dist/persistence/index.d.ts +59 -16
  603. package/dist/persistence/index.d.ts.map +1 -1
  604. package/dist/persistence/index.js +33 -2
  605. package/dist/persistence/index.js.map +1 -1
  606. package/dist/persistence/journals/CassandraJournal.d.ts +1 -48
  607. package/dist/persistence/journals/CassandraJournal.d.ts.map +1 -1
  608. package/dist/persistence/journals/CassandraJournal.js +2 -2
  609. package/dist/persistence/journals/CassandraJournal.js.map +1 -1
  610. package/dist/persistence/journals/CassandraJournalOptions.d.ts +107 -0
  611. package/dist/persistence/journals/CassandraJournalOptions.d.ts.map +1 -0
  612. package/dist/persistence/journals/CassandraJournalOptions.js +90 -0
  613. package/dist/persistence/journals/CassandraJournalOptions.js.map +1 -0
  614. package/dist/persistence/journals/CassandraPlugin.d.ts +1 -16
  615. package/dist/persistence/journals/CassandraPlugin.d.ts.map +1 -1
  616. package/dist/persistence/journals/CassandraPlugin.js +9 -4
  617. package/dist/persistence/journals/CassandraPlugin.js.map +1 -1
  618. package/dist/persistence/journals/CassandraPluginOptions.d.ts +51 -0
  619. package/dist/persistence/journals/CassandraPluginOptions.d.ts.map +1 -0
  620. package/dist/persistence/journals/CassandraPluginOptions.js +37 -0
  621. package/dist/persistence/journals/CassandraPluginOptions.js.map +1 -0
  622. package/dist/persistence/journals/MariaDbClient.d.ts +54 -0
  623. package/dist/persistence/journals/MariaDbClient.d.ts.map +1 -0
  624. package/dist/persistence/journals/MariaDbClient.js +40 -0
  625. package/dist/persistence/journals/MariaDbClient.js.map +1 -0
  626. package/dist/persistence/journals/MariaDbJournal.d.ts +29 -0
  627. package/dist/persistence/journals/MariaDbJournal.d.ts.map +1 -0
  628. package/dist/persistence/journals/MariaDbJournal.js +161 -0
  629. package/dist/persistence/journals/MariaDbJournal.js.map +1 -0
  630. package/dist/persistence/journals/MariaDbJournalOptions.d.ts +43 -0
  631. package/dist/persistence/journals/MariaDbJournalOptions.d.ts.map +1 -0
  632. package/dist/persistence/journals/MariaDbJournalOptions.js +43 -0
  633. package/dist/persistence/journals/MariaDbJournalOptions.js.map +1 -0
  634. package/dist/persistence/journals/MariaDbPlugin.d.ts +27 -0
  635. package/dist/persistence/journals/MariaDbPlugin.d.ts.map +1 -0
  636. package/dist/persistence/journals/MariaDbPlugin.js +30 -0
  637. package/dist/persistence/journals/MariaDbPlugin.js.map +1 -0
  638. package/dist/persistence/journals/MariaDbPluginOptions.d.ts +52 -0
  639. package/dist/persistence/journals/MariaDbPluginOptions.d.ts.map +1 -0
  640. package/dist/persistence/journals/MariaDbPluginOptions.js +38 -0
  641. package/dist/persistence/journals/MariaDbPluginOptions.js.map +1 -0
  642. package/dist/persistence/journals/PostgresClient.d.ts +56 -0
  643. package/dist/persistence/journals/PostgresClient.d.ts.map +1 -0
  644. package/dist/persistence/journals/PostgresClient.js +35 -0
  645. package/dist/persistence/journals/PostgresClient.js.map +1 -0
  646. package/dist/persistence/journals/PostgresJournal.d.ts +41 -0
  647. package/dist/persistence/journals/PostgresJournal.d.ts.map +1 -0
  648. package/dist/persistence/journals/PostgresJournal.js +176 -0
  649. package/dist/persistence/journals/PostgresJournal.js.map +1 -0
  650. package/dist/persistence/journals/PostgresJournalOptions.d.ts +44 -0
  651. package/dist/persistence/journals/PostgresJournalOptions.d.ts.map +1 -0
  652. package/dist/persistence/journals/PostgresJournalOptions.js +44 -0
  653. package/dist/persistence/journals/PostgresJournalOptions.js.map +1 -0
  654. package/dist/persistence/journals/PostgresPlugin.d.ts +32 -0
  655. package/dist/persistence/journals/PostgresPlugin.d.ts.map +1 -0
  656. package/dist/persistence/journals/PostgresPlugin.js +35 -0
  657. package/dist/persistence/journals/PostgresPlugin.js.map +1 -0
  658. package/dist/persistence/journals/PostgresPluginOptions.d.ts +54 -0
  659. package/dist/persistence/journals/PostgresPluginOptions.d.ts.map +1 -0
  660. package/dist/persistence/journals/PostgresPluginOptions.js +39 -0
  661. package/dist/persistence/journals/PostgresPluginOptions.js.map +1 -0
  662. package/dist/persistence/journals/SqliteJournal.d.ts +5 -19
  663. package/dist/persistence/journals/SqliteJournal.d.ts.map +1 -1
  664. package/dist/persistence/journals/SqliteJournal.js +10 -9
  665. package/dist/persistence/journals/SqliteJournal.js.map +1 -1
  666. package/dist/persistence/journals/SqliteJournalOptions.d.ts +41 -0
  667. package/dist/persistence/journals/SqliteJournalOptions.d.ts.map +1 -0
  668. package/dist/persistence/journals/SqliteJournalOptions.js +31 -0
  669. package/dist/persistence/journals/SqliteJournalOptions.js.map +1 -0
  670. package/dist/persistence/object-storage/BodyCodec.d.ts +43 -0
  671. package/dist/persistence/object-storage/BodyCodec.d.ts.map +1 -1
  672. package/dist/persistence/object-storage/BodyCodec.js +78 -20
  673. package/dist/persistence/object-storage/BodyCodec.js.map +1 -1
  674. package/dist/persistence/object-storage/Compression.d.ts +21 -7
  675. package/dist/persistence/object-storage/Compression.d.ts.map +1 -1
  676. package/dist/persistence/object-storage/Compression.js +79 -29
  677. package/dist/persistence/object-storage/Compression.js.map +1 -1
  678. package/dist/persistence/object-storage/FilesystemObjectStorageBackend.d.ts +2 -61
  679. package/dist/persistence/object-storage/FilesystemObjectStorageBackend.d.ts.map +1 -1
  680. package/dist/persistence/object-storage/FilesystemObjectStorageBackend.js +56 -11
  681. package/dist/persistence/object-storage/FilesystemObjectStorageBackend.js.map +1 -1
  682. package/dist/persistence/object-storage/FilesystemObjectStorageOptions.d.ts +45 -0
  683. package/dist/persistence/object-storage/FilesystemObjectStorageOptions.d.ts.map +1 -0
  684. package/dist/persistence/object-storage/FilesystemObjectStorageOptions.js +30 -0
  685. package/dist/persistence/object-storage/FilesystemObjectStorageOptions.js.map +1 -0
  686. package/dist/persistence/object-storage/Integrity.d.ts +43 -0
  687. package/dist/persistence/object-storage/Integrity.d.ts.map +1 -0
  688. package/dist/persistence/object-storage/Integrity.js +66 -0
  689. package/dist/persistence/object-storage/Integrity.js.map +1 -0
  690. package/dist/persistence/object-storage/ObjectStoragePlugin.d.ts +6 -22
  691. package/dist/persistence/object-storage/ObjectStoragePlugin.d.ts.map +1 -1
  692. package/dist/persistence/object-storage/ObjectStoragePlugin.js +36 -28
  693. package/dist/persistence/object-storage/ObjectStoragePlugin.js.map +1 -1
  694. package/dist/persistence/object-storage/ObjectStoragePluginOptions.d.ts +60 -0
  695. package/dist/persistence/object-storage/ObjectStoragePluginOptions.d.ts.map +1 -0
  696. package/dist/persistence/object-storage/ObjectStoragePluginOptions.js +52 -0
  697. package/dist/persistence/object-storage/ObjectStoragePluginOptions.js.map +1 -0
  698. package/dist/persistence/object-storage/PluginConfig.d.ts +5 -2
  699. package/dist/persistence/object-storage/PluginConfig.d.ts.map +1 -1
  700. package/dist/persistence/object-storage/PluginConfig.js +8 -0
  701. package/dist/persistence/object-storage/PluginConfig.js.map +1 -1
  702. package/dist/persistence/object-storage/S3ObjectStorageBackend.d.ts +1 -30
  703. package/dist/persistence/object-storage/S3ObjectStorageBackend.d.ts.map +1 -1
  704. package/dist/persistence/object-storage/S3ObjectStorageBackend.js +12 -7
  705. package/dist/persistence/object-storage/S3ObjectStorageBackend.js.map +1 -1
  706. package/dist/persistence/object-storage/S3ObjectStorageOptions.d.ts +64 -0
  707. package/dist/persistence/object-storage/S3ObjectStorageOptions.d.ts.map +1 -0
  708. package/dist/persistence/object-storage/S3ObjectStorageOptions.js +42 -0
  709. package/dist/persistence/object-storage/S3ObjectStorageOptions.js.map +1 -0
  710. package/dist/persistence/object-storage/reEncryptionSweep.d.ts +72 -0
  711. package/dist/persistence/object-storage/reEncryptionSweep.d.ts.map +1 -1
  712. package/dist/persistence/object-storage/reEncryptionSweep.js +82 -2
  713. package/dist/persistence/object-storage/reEncryptionSweep.js.map +1 -1
  714. package/dist/persistence/projection/ProjectionActor.d.ts +4 -24
  715. package/dist/persistence/projection/ProjectionActor.d.ts.map +1 -1
  716. package/dist/persistence/projection/ProjectionActor.js +36 -2
  717. package/dist/persistence/projection/ProjectionActor.js.map +1 -1
  718. package/dist/persistence/projection/ProjectionOptions.d.ts +109 -0
  719. package/dist/persistence/projection/ProjectionOptions.d.ts.map +1 -0
  720. package/dist/persistence/projection/ProjectionOptions.js +108 -0
  721. package/dist/persistence/projection/ProjectionOptions.js.map +1 -0
  722. package/dist/persistence/snapshot-stores/CachedSnapshotStore.d.ts +2 -10
  723. package/dist/persistence/snapshot-stores/CachedSnapshotStore.d.ts.map +1 -1
  724. package/dist/persistence/snapshot-stores/CachedSnapshotStore.js +12 -6
  725. package/dist/persistence/snapshot-stores/CachedSnapshotStore.js.map +1 -1
  726. package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.d.ts +37 -0
  727. package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.d.ts.map +1 -0
  728. package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.js +31 -0
  729. package/dist/persistence/snapshot-stores/CachedSnapshotStoreOptions.js.map +1 -0
  730. package/dist/persistence/snapshot-stores/CassandraSnapshotStore.d.ts +1 -11
  731. package/dist/persistence/snapshot-stores/CassandraSnapshotStore.d.ts.map +1 -1
  732. package/dist/persistence/snapshot-stores/CassandraSnapshotStore.js +3 -3
  733. package/dist/persistence/snapshot-stores/CassandraSnapshotStore.js.map +1 -1
  734. package/dist/persistence/snapshot-stores/CassandraSnapshotStoreOptions.d.ts +61 -0
  735. package/dist/persistence/snapshot-stores/CassandraSnapshotStoreOptions.d.ts.map +1 -0
  736. package/dist/persistence/snapshot-stores/CassandraSnapshotStoreOptions.js +73 -0
  737. package/dist/persistence/snapshot-stores/CassandraSnapshotStoreOptions.js.map +1 -0
  738. package/dist/persistence/snapshot-stores/MariaDbSnapshotStore.d.ts +30 -0
  739. package/dist/persistence/snapshot-stores/MariaDbSnapshotStore.d.ts.map +1 -0
  740. package/dist/persistence/snapshot-stores/MariaDbSnapshotStore.js +102 -0
  741. package/dist/persistence/snapshot-stores/MariaDbSnapshotStore.js.map +1 -0
  742. package/dist/persistence/snapshot-stores/MariaDbSnapshotStoreOptions.d.ts +42 -0
  743. package/dist/persistence/snapshot-stores/MariaDbSnapshotStoreOptions.d.ts.map +1 -0
  744. package/dist/persistence/snapshot-stores/MariaDbSnapshotStoreOptions.js +42 -0
  745. package/dist/persistence/snapshot-stores/MariaDbSnapshotStoreOptions.js.map +1 -0
  746. package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.d.ts +2 -15
  747. package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.d.ts.map +1 -1
  748. package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.js +10 -6
  749. package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStore.js.map +1 -1
  750. package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.d.ts +45 -0
  751. package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.d.ts.map +1 -0
  752. package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.js +38 -0
  753. package/dist/persistence/snapshot-stores/ObjectStorageSnapshotStoreOptions.js.map +1 -0
  754. package/dist/persistence/snapshot-stores/PostgresSnapshotStore.d.ts +31 -0
  755. package/dist/persistence/snapshot-stores/PostgresSnapshotStore.d.ts.map +1 -0
  756. package/dist/persistence/snapshot-stores/PostgresSnapshotStore.js +101 -0
  757. package/dist/persistence/snapshot-stores/PostgresSnapshotStore.js.map +1 -0
  758. package/dist/persistence/snapshot-stores/PostgresSnapshotStoreOptions.d.ts +42 -0
  759. package/dist/persistence/snapshot-stores/PostgresSnapshotStoreOptions.d.ts.map +1 -0
  760. package/dist/persistence/snapshot-stores/PostgresSnapshotStoreOptions.js +42 -0
  761. package/dist/persistence/snapshot-stores/PostgresSnapshotStoreOptions.js.map +1 -0
  762. package/dist/persistence/snapshot-stores/SqliteSnapshotStore.d.ts +2 -15
  763. package/dist/persistence/snapshot-stores/SqliteSnapshotStore.d.ts.map +1 -1
  764. package/dist/persistence/snapshot-stores/SqliteSnapshotStore.js +7 -6
  765. package/dist/persistence/snapshot-stores/SqliteSnapshotStore.js.map +1 -1
  766. package/dist/persistence/snapshot-stores/SqliteSnapshotStoreOptions.d.ts +40 -0
  767. package/dist/persistence/snapshot-stores/SqliteSnapshotStoreOptions.d.ts.map +1 -0
  768. package/dist/persistence/snapshot-stores/SqliteSnapshotStoreOptions.js +31 -0
  769. package/dist/persistence/snapshot-stores/SqliteSnapshotStoreOptions.js.map +1 -0
  770. package/dist/runtime/http/BunHonoRunner.d.ts +7 -1
  771. package/dist/runtime/http/BunHonoRunner.d.ts.map +1 -1
  772. package/dist/runtime/http/BunHonoRunner.js +22 -0
  773. package/dist/runtime/http/BunHonoRunner.js.map +1 -1
  774. package/dist/runtime/http/DenoHonoRunner.d.ts +5 -2
  775. package/dist/runtime/http/DenoHonoRunner.d.ts.map +1 -1
  776. package/dist/runtime/http/DenoHonoRunner.js +19 -2
  777. package/dist/runtime/http/DenoHonoRunner.js.map +1 -1
  778. package/dist/runtime/http/HonoServerRunner.d.ts +39 -0
  779. package/dist/runtime/http/HonoServerRunner.d.ts.map +1 -1
  780. package/dist/runtime/http/NodeHonoRunner.d.ts +3 -1
  781. package/dist/runtime/http/NodeHonoRunner.d.ts.map +1 -1
  782. package/dist/runtime/http/NodeHonoRunner.js +22 -0
  783. package/dist/runtime/http/NodeHonoRunner.js.map +1 -1
  784. package/dist/runtime/http/index.d.ts +1 -1
  785. package/dist/runtime/http/index.d.ts.map +1 -1
  786. package/dist/runtime/http/index.js.map +1 -1
  787. package/dist/testkit/ManualScheduler.d.ts +2 -1
  788. package/dist/testkit/ManualScheduler.d.ts.map +1 -1
  789. package/dist/testkit/ManualScheduler.js +2 -1
  790. package/dist/testkit/ManualScheduler.js.map +1 -1
  791. package/dist/testkit/MockCluster.d.ts +74 -0
  792. package/dist/testkit/MockCluster.d.ts.map +1 -0
  793. package/dist/testkit/MockCluster.js +163 -0
  794. package/dist/testkit/MockCluster.js.map +1 -0
  795. package/dist/testkit/MultiNodeClusterFixture.d.ts +62 -0
  796. package/dist/testkit/MultiNodeClusterFixture.d.ts.map +1 -0
  797. package/dist/testkit/MultiNodeClusterFixture.js +43 -0
  798. package/dist/testkit/MultiNodeClusterFixture.js.map +1 -0
  799. package/dist/testkit/MultiNodeSpec.d.ts +45 -3
  800. package/dist/testkit/MultiNodeSpec.d.ts.map +1 -1
  801. package/dist/testkit/MultiNodeSpec.js +108 -14
  802. package/dist/testkit/MultiNodeSpec.js.map +1 -1
  803. package/dist/testkit/ParallelMultiNodeSpec.d.ts +12 -2
  804. package/dist/testkit/ParallelMultiNodeSpec.d.ts.map +1 -1
  805. package/dist/testkit/ParallelMultiNodeSpec.js +49 -4
  806. package/dist/testkit/ParallelMultiNodeSpec.js.map +1 -1
  807. package/dist/testkit/SnapshotMigrationTest.d.ts +86 -0
  808. package/dist/testkit/SnapshotMigrationTest.d.ts.map +1 -0
  809. package/dist/testkit/SnapshotMigrationTest.js +77 -0
  810. package/dist/testkit/SnapshotMigrationTest.js.map +1 -0
  811. package/dist/testkit/TestKit.d.ts +6 -8
  812. package/dist/testkit/TestKit.d.ts.map +1 -1
  813. package/dist/testkit/TestKit.js +10 -6
  814. package/dist/testkit/TestKit.js.map +1 -1
  815. package/dist/testkit/TestKitOptions.d.ts +26 -0
  816. package/dist/testkit/TestKitOptions.d.ts.map +1 -0
  817. package/dist/testkit/TestKitOptions.js +19 -0
  818. package/dist/testkit/TestKitOptions.js.map +1 -0
  819. package/dist/testkit/TestProbe.d.ts +2 -7
  820. package/dist/testkit/TestProbe.d.ts.map +1 -1
  821. package/dist/testkit/TestProbe.js +2 -1
  822. package/dist/testkit/TestProbe.js.map +1 -1
  823. package/dist/testkit/TestProbeOptions.d.ts +26 -0
  824. package/dist/testkit/TestProbeOptions.d.ts.map +1 -0
  825. package/dist/testkit/TestProbeOptions.js +19 -0
  826. package/dist/testkit/TestProbeOptions.js.map +1 -0
  827. package/dist/testkit/index.d.ts +10 -2
  828. package/dist/testkit/index.d.ts.map +1 -1
  829. package/dist/testkit/index.js +5 -0
  830. package/dist/testkit/index.js.map +1 -1
  831. package/dist/testkit/internal/parallel-multi-node-bootstrap.d.ts.map +1 -1
  832. package/dist/testkit/internal/parallel-multi-node-bootstrap.js +16 -12
  833. package/dist/testkit/internal/parallel-multi-node-bootstrap.js.map +1 -1
  834. package/dist/tracing/OtelAdapter.d.ts +4 -12
  835. package/dist/tracing/OtelAdapter.d.ts.map +1 -1
  836. package/dist/tracing/OtelAdapter.js +4 -2
  837. package/dist/tracing/OtelAdapter.js.map +1 -1
  838. package/dist/tracing/OtelAdapterOptions.d.ts +42 -0
  839. package/dist/tracing/OtelAdapterOptions.d.ts.map +1 -0
  840. package/dist/tracing/OtelAdapterOptions.js +34 -0
  841. package/dist/tracing/OtelAdapterOptions.js.map +1 -0
  842. package/dist/tracing/OtelLogsAdapter.d.ts +100 -0
  843. package/dist/tracing/OtelLogsAdapter.d.ts.map +1 -0
  844. package/dist/tracing/OtelLogsAdapter.js +130 -0
  845. package/dist/tracing/OtelLogsAdapter.js.map +1 -0
  846. package/dist/tracing/index.d.ts +5 -1
  847. package/dist/tracing/index.d.ts.map +1 -1
  848. package/dist/tracing/index.js +2 -0
  849. package/dist/tracing/index.js.map +1 -1
  850. package/dist/util/Constants.d.ts +23 -0
  851. package/dist/util/Constants.d.ts.map +1 -1
  852. package/dist/util/Constants.js +23 -0
  853. package/dist/util/Constants.js.map +1 -1
  854. package/dist/util/Lazy.d.ts +31 -0
  855. package/dist/util/Lazy.d.ts.map +1 -1
  856. package/dist/util/Lazy.js +70 -0
  857. package/dist/util/Lazy.js.map +1 -1
  858. package/dist/util/OptionsBuilder.d.ts +48 -0
  859. package/dist/util/OptionsBuilder.d.ts.map +1 -0
  860. package/dist/util/OptionsBuilder.js +53 -0
  861. package/dist/util/OptionsBuilder.js.map +1 -0
  862. package/dist/worker/WorkerCluster.d.ts +2 -11
  863. package/dist/worker/WorkerCluster.d.ts.map +1 -1
  864. package/dist/worker/WorkerCluster.js +2 -1
  865. package/dist/worker/WorkerCluster.js.map +1 -1
  866. package/dist/worker/WorkerClusterOptions.d.ts +55 -0
  867. package/dist/worker/WorkerClusterOptions.d.ts.map +1 -0
  868. package/dist/worker/WorkerClusterOptions.js +55 -0
  869. package/dist/worker/WorkerClusterOptions.js.map +1 -0
  870. package/dist/worker/index.d.ts +3 -1
  871. package/dist/worker/index.d.ts.map +1 -1
  872. package/dist/worker/index.js +1 -0
  873. package/dist/worker/index.js.map +1 -1
  874. package/package.json +56 -13
  875. package/dist/io/broker/ServerWebSocketActor.d.ts +0 -109
  876. package/dist/io/broker/ServerWebSocketActor.d.ts.map +0 -1
  877. package/dist/io/broker/ServerWebSocketActor.js +0 -128
  878. package/dist/io/broker/ServerWebSocketActor.js.map +0 -1
  879. package/dist/io/broker/WebSocketActor.d.ts +0 -77
  880. package/dist/io/broker/WebSocketActor.d.ts.map +0 -1
  881. package/dist/io/broker/WebSocketActor.js +0 -217
  882. package/dist/io/broker/WebSocketActor.js.map +0 -1
  883. package/dist/io/broker/WebSocketServerAdapters.d.ts +0 -140
  884. package/dist/io/broker/WebSocketServerAdapters.d.ts.map +0 -1
  885. package/dist/io/broker/WebSocketServerAdapters.js +0 -155
  886. package/dist/io/broker/WebSocketServerAdapters.js.map +0 -1
@@ -1,67 +1,8 @@
1
1
  import { type Option } from '../../util/Option.js';
2
2
  import { type ObjectFetched, type ObjectInfo, type ObjectStorageBackend, type PutOptions } from './ObjectStorageBackend.js';
3
- /**
4
- * Filesystem-backed `ObjectStorageBackend` — stores each object as a file
5
- * under a root directory, with the storage key mapped 1:1 to a relative
6
- * path. Suitable for unit tests, local development, and "S3-API parity
7
- * without the cloud", and **safe for concurrent multi-process writers**:
8
- * every `put` / `delete` acquires a per-key advisory file lock (atomic
9
- * `O_EXCL` create) so the CAS check + write block is serialized at the
10
- * filesystem layer, and writes use a temp-file + rename so concurrent
11
- * readers never observe a half-written object.
12
- *
13
- * The backend lazy-imports `node:fs/promises` and `node:path` so this
14
- * module is harmless to include on Bun / Deno where those built-ins
15
- * already exist (Node-compat layer) — only the actual operations touch
16
- * them.
17
- *
18
- * Implementation notes:
19
- *
20
- * - **Disk is canonical.** Etags are content-derived
21
- * ({@link computeEtag} — deterministic FNV-1a + length). No in-memory
22
- * map; the file content alone determines the etag, so a fresh process
23
- * sees the exact same etags every other process does. Same key, same
24
- * bytes → same etag, regardless of who wrote them or when.
25
- * - **Per-key advisory lock.** The lock file lives next to the target
26
- * file as `<key>.lock`. Acquisition uses
27
- * `fs.writeFile(lockPath, ..., { flag: 'wx' })`, which is
28
- * atomic-create-only on every POSIX and NTFS filesystem the framework
29
- * targets.
30
- * - **Stale-lock recovery.** Lock files older than {@link staleLockMs}
31
- * (default 30 s) are assumed to be left behind by a crashed writer
32
- * and forcibly removed; one final acquisition retry is then made.
33
- * This keeps the pathological "process died holding a lock" case from
34
- * blocking the directory forever, at the cost of being technically
35
- * incorrect if a real writer is taking longer than `staleLockMs` for a
36
- * single `put` — which shouldn't happen for the small payloads this
37
- * backend targets.
38
- * - **Atomic body writes.** `put` writes to a per-process tmp file
39
- * (`<key>.tmp.<pid>.<ts>.<rand>`), then renames over the target. On
40
- * POSIX `rename(2)` is atomic on the same filesystem; on Windows
41
- * `MoveFileEx(MOVEFILE_REPLACE_EXISTING)` provides equivalent
42
- * behaviour. Concurrent readers always see either the old body or
43
- * the new body, never a truncated buffer.
44
- */
45
- export interface FilesystemObjectStorageOptions {
46
- /** Root directory. Will be created (recursively) if it doesn't exist. */
47
- readonly dir: string;
48
- /**
49
- * How long to wait when contending for a per-key write lock before
50
- * giving up with `ObjectStorageBackendError`. Default 5_000 ms — long
51
- * enough that legitimate contenders complete first, short enough that
52
- * a stuck holder gets surfaced quickly.
53
- */
54
- readonly lockTimeoutMs?: number;
55
- /**
56
- * Lock files older than this are assumed stale (left behind by a
57
- * crashed writer) and forcibly removed. Default 30_000 ms — well
58
- * above the expected duration of any single `put`, so legitimate
59
- * writers never get their lock yanked.
60
- */
61
- readonly staleLockMs?: number;
62
- }
3
+ import type { FilesystemObjectStorageOptions } from './FilesystemObjectStorageOptions.js';
63
4
  export declare class FilesystemObjectStorageBackend implements ObjectStorageBackend {
64
- private readonly options;
5
+ private readonly dir;
65
6
  private readonly lockTimeoutMs;
66
7
  private readonly staleLockMs;
67
8
  constructor(options: FilesystemObjectStorageOptions);
@@ -1 +1 @@
1
- {"version":3,"file":"FilesystemObjectStorageBackend.d.ts","sourceRoot":"","sources":["../../../src/persistence/object-storage/FilesystemObjectStorageBackend.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG/D,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,MAAM,WAAW,8BAA8B;IAC7C,0EAA0E;IAC1E,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAyDD,qBAAa,8BAA+B,YAAW,oBAAoB;IAI7D,OAAO,CAAC,QAAQ,CAAC,OAAO;IAHpC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAER,OAAO,EAAE,8BAA8B;IAK9D,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,GAAE,UAAe,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAyEpF,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IA+BhD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBlC,IAAI,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAoCrE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
1
+ {"version":3,"file":"FilesystemObjectStorageBackend.d.ts","sourceRoot":"","sources":["../../../src/persistence/object-storage/FilesystemObjectStorageBackend.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG/D,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,8BAA8B,EAAsC,MAAM,qCAAqC,CAAC;AAoG9H,qBAAa,8BAA+B,YAAW,oBAAoB;IACzE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,OAAO,EAAE,8BAA8B;IAQ7C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,GAAE,UAAe,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAyEpF,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IA+BhD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBlC,IAAI,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAoCrE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
@@ -3,6 +3,48 @@ import { none, some } from '../../util/Option.js';
3
3
  import { wrapError } from '../../util/WrapError.js';
4
4
  import { makeKeyValidator } from '../storage/KeyValidator.js';
5
5
  import { ObjectStorageBackendError, ObjectStorageConcurrencyError, } from './ObjectStorageBackend.js';
6
+ /**
7
+ * Filesystem-backed `ObjectStorageBackend` — stores each object as a file
8
+ * under a root directory, with the storage key mapped 1:1 to a relative
9
+ * path. Suitable for unit tests, local development, and "S3-API parity
10
+ * without the cloud", and **safe for concurrent multi-process writers**:
11
+ * every `put` / `delete` acquires a per-key advisory file lock (atomic
12
+ * `O_EXCL` create) so the CAS check + write block is serialized at the
13
+ * filesystem layer, and writes use a temp-file + rename so concurrent
14
+ * readers never observe a half-written object.
15
+ *
16
+ * The backend lazy-imports `node:fs/promises` and `node:path` so this
17
+ * module is harmless to include on Bun / Deno where those built-ins
18
+ * already exist (Node-compat layer) — only the actual operations touch
19
+ * them.
20
+ *
21
+ * Implementation notes:
22
+ *
23
+ * - **Disk is canonical.** Etags are content-derived
24
+ * ({@link computeEtag} — deterministic FNV-1a + length). No in-memory
25
+ * map; the file content alone determines the etag, so a fresh process
26
+ * sees the exact same etags every other process does. Same key, same
27
+ * bytes → same etag, regardless of who wrote them or when.
28
+ * - **Per-key advisory lock.** The lock file lives next to the target
29
+ * file as `<key>.lock`. Acquisition uses
30
+ * `fs.writeFile(lockPath, ..., { flag: 'wx' })`, which is
31
+ * atomic-create-only on every POSIX and NTFS filesystem the framework
32
+ * targets.
33
+ * - **Stale-lock recovery.** Lock files older than {@link staleLockMs}
34
+ * (default 30 s) are assumed to be left behind by a crashed writer
35
+ * and forcibly removed; one final acquisition retry is then made.
36
+ * This keeps the pathological "process died holding a lock" case from
37
+ * blocking the directory forever, at the cost of being technically
38
+ * incorrect if a real writer is taking longer than `staleLockMs` for a
39
+ * single `put` — which shouldn't happen for the small payloads this
40
+ * backend targets.
41
+ * - **Atomic body writes.** `put` writes to a per-process tmp file
42
+ * (`<key>.tmp.<pid>.<ts>.<rand>`), then renames over the target. On
43
+ * POSIX `rename(2)` is atomic on the same filesystem; on Windows
44
+ * `MoveFileEx(MOVEFILE_REPLACE_EXISTING)` provides equivalent
45
+ * behaviour. Concurrent readers always see either the old body or
46
+ * the new body, never a truncated buffer.
47
+ */
6
48
  const DEFAULT_LOCK_TIMEOUT_MS = 5_000;
7
49
  const DEFAULT_STALE_LOCK_MS = 30_000;
8
50
  /**
@@ -49,19 +91,22 @@ function assertWithinRoot(pathMod, root, fullPath) {
49
91
  }
50
92
  }
51
93
  export class FilesystemObjectStorageBackend {
52
- options;
94
+ dir;
53
95
  lockTimeoutMs;
54
96
  staleLockMs;
55
97
  constructor(options) {
56
- this.options = options;
57
- this.lockTimeoutMs = options.lockTimeoutMs ?? DEFAULT_LOCK_TIMEOUT_MS;
58
- this.staleLockMs = options.staleLockMs ?? DEFAULT_STALE_LOCK_MS;
98
+ const s = options;
99
+ if (s.dir === undefined)
100
+ throw new Error('FilesystemObjectStorageBackend: dir is required (call withDir()).');
101
+ this.dir = s.dir;
102
+ this.lockTimeoutMs = s.lockTimeoutMs ?? DEFAULT_LOCK_TIMEOUT_MS;
103
+ this.staleLockMs = s.staleLockMs ?? DEFAULT_STALE_LOCK_MS;
59
104
  }
60
105
  async put(key, body, opts = {}) {
61
106
  assertSafeKey(key);
62
107
  const { fs, path } = await fsLazy.get();
63
- const fullPath = path.join(this.options.dir, key);
64
- assertWithinRoot(path, this.options.dir, fullPath);
108
+ const fullPath = path.join(this.dir, key);
109
+ assertWithinRoot(path, this.dir, fullPath);
65
110
  const lockPath = fullPath + '.lock';
66
111
  // Parent directory must exist before lock acquisition (the lock file
67
112
  // lives there). `mkdir(recursive)` is idempotent across processes,
@@ -126,8 +171,8 @@ export class FilesystemObjectStorageBackend {
126
171
  async get(key) {
127
172
  assertSafeKey(key);
128
173
  const { fs, path } = await fsLazy.get();
129
- const fullPath = path.join(this.options.dir, key);
130
- assertWithinRoot(path, this.options.dir, fullPath);
174
+ const fullPath = path.join(this.dir, key);
175
+ assertWithinRoot(path, this.dir, fullPath);
131
176
  let body;
132
177
  let stat;
133
178
  try {
@@ -159,8 +204,8 @@ export class FilesystemObjectStorageBackend {
159
204
  async delete(key) {
160
205
  assertSafeKey(key);
161
206
  const { fs, path } = await fsLazy.get();
162
- const fullPath = path.join(this.options.dir, key);
163
- assertWithinRoot(path, this.options.dir, fullPath);
207
+ const fullPath = path.join(this.dir, key);
208
+ assertWithinRoot(path, this.dir, fullPath);
164
209
  const lockPath = fullPath + '.lock';
165
210
  // Lock so a concurrent put doesn't see a half-deleted state mid-CAS.
166
211
  // We may be deleting a never-written key (idempotent), but the
@@ -193,7 +238,7 @@ export class FilesystemObjectStorageBackend {
193
238
  if (opts.prefix !== '')
194
239
  assertSafeKey(opts.prefix);
195
240
  const { fs, path } = await fsLazy.get();
196
- const root = this.options.dir;
241
+ const root = this.dir;
197
242
  // Prefix may include a directory portion. We walk from root and filter.
198
243
  const out = [];
199
244
  const walk = async (rel) => {
@@ -1 +1 @@
1
- {"version":3,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AyB,CACjC,4BAA4B,QAAQ,UAAU,cAAc,IAAI,CACjE,CAAC;YACJ,CAAC;YACD,MAAM,IAAI,OAAO,CAAO,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;YACzD,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;AACH,CAAC;AAED,+DAA+D;AAC/D,SAAS,WAAW,CAAC,IAAgB;IACnC,wDAAwD;IACxD,wEAAwE;IACxE,oEAAoE;IACpE,2EAA2E;IAC3E,IAAI,CAAC,GAAG,UAAU,CAAC;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAE,CAAC;QACd,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IACD,+DAA+D;IAC/D,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC;IACjB,OAAO,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;AAC1E,CAAC"}
1
+ {"version":3,"file":"FilesystemObjectStorageBackend.js","sourceRoot":"","sources":["../../../src/persistence/object-storage/FilesystemObjectStorageBackend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAe,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO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D,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;AACH,CAAC;AAED,+DAA+D;AAC/D,SAAS,WAAW,CAAC,IAAgB;IACnC,wDAAwD;IACxD,wEAAwE;IACxE,oEAAoE;IACpE,2EAA2E;IAC3E,IAAI,CAAC,GAAG,UAAU,CAAC;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAE,CAAC;QACd,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IACD,+DAA+D;IAC/D,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC;IACjB,OAAO,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;AAC1E,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { OptionsBuilder } from '../../util/OptionsBuilder.js';
2
+ export interface FilesystemObjectStorageOptionsType {
3
+ /** Root directory. Will be created (recursively) if it doesn't exist. */
4
+ readonly dir: string;
5
+ /**
6
+ * How long to wait when contending for a per-key write lock before
7
+ * giving up with `ObjectStorageBackendError`. Default 5_000 ms — long
8
+ * enough that legitimate contenders complete first, short enough that
9
+ * a stuck holder gets surfaced quickly.
10
+ */
11
+ readonly lockTimeoutMs?: number;
12
+ /**
13
+ * Lock files older than this are assumed stale (left behind by a
14
+ * crashed writer) and forcibly removed. Default 30_000 ms — well
15
+ * above the expected duration of any single `put`, so legitimate
16
+ * writers never get their lock yanked.
17
+ */
18
+ readonly staleLockMs?: number;
19
+ }
20
+ /**
21
+ * Fluent builder for {@link FilesystemObjectStorageOptionsType}. `dir` is
22
+ * required by the backend:
23
+ *
24
+ * new FilesystemObjectStorageBackend(
25
+ * FilesystemObjectStorageOptions.create().withDir('/var/lib/actor-ts'),
26
+ * )
27
+ */
28
+ export declare class FilesystemObjectStorageOptionsBuilder extends OptionsBuilder<FilesystemObjectStorageOptionsType> {
29
+ /** Start a fresh builder. Equivalent to `new FilesystemObjectStorageOptionsBuilder()`. */
30
+ static create(): FilesystemObjectStorageOptionsBuilder;
31
+ /** Root directory. Created recursively if it doesn't exist. */
32
+ withDir(dir: string): this;
33
+ /** How long to contend for a per-key write lock before giving up. Default 5_000 ms. */
34
+ withLockTimeoutMs(lockTimeoutMs: number): this;
35
+ /** Lock files older than this are treated as stale and forcibly removed. Default 30_000 ms. */
36
+ withStaleLockMs(staleLockMs: number): this;
37
+ }
38
+ /**
39
+ * Accepted input for the filesystem object-storage backend constructor: the fluent
40
+ * {@link FilesystemObjectStorageOptionsBuilder} OR a plain {@link FilesystemObjectStorageOptionsType} object.
41
+ */
42
+ export type FilesystemObjectStorageOptions = FilesystemObjectStorageOptionsBuilder | Partial<FilesystemObjectStorageOptionsType>;
43
+ /** Value alias so `FilesystemObjectStorageOptions.create()` / `new FilesystemObjectStorageOptions()` resolve to the builder. */
44
+ export declare const FilesystemObjectStorageOptions: typeof FilesystemObjectStorageOptionsBuilder;
45
+ //# sourceMappingURL=FilesystemObjectStorageOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilesystemObjectStorageOptions.d.ts","sourceRoot":"","sources":["../../../src/persistence/object-storage/FilesystemObjectStorageOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,kCAAkC;IACjD,0EAA0E;IAC1E,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,qBAAa,qCAAsC,SAAQ,cAAc,CAAC,kCAAkC,CAAC;IAC3G,2FAA2F;IAC3F,MAAM,CAAC,MAAM,IAAI,qCAAqC;IAItD,gEAAgE;IAChE,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B,wFAAwF;IACxF,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;IAI9C,gGAAgG;IAChG,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;CAG3C;AAED;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,qCAAqC,GAAG,OAAO,CAAC,kCAAkC,CAAC,CAAC;AACjI,gIAAgI;AAChI,eAAO,MAAM,8BAA8B,8CAAwC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { OptionsBuilder } from '../../util/OptionsBuilder.js';
2
+ /**
3
+ * Fluent builder for {@link FilesystemObjectStorageOptionsType}. `dir` is
4
+ * required by the backend:
5
+ *
6
+ * new FilesystemObjectStorageBackend(
7
+ * FilesystemObjectStorageOptions.create().withDir('/var/lib/actor-ts'),
8
+ * )
9
+ */
10
+ export class FilesystemObjectStorageOptionsBuilder extends OptionsBuilder {
11
+ /** Start a fresh builder. Equivalent to `new FilesystemObjectStorageOptionsBuilder()`. */
12
+ static create() {
13
+ return new FilesystemObjectStorageOptionsBuilder();
14
+ }
15
+ /** Root directory. Created recursively if it doesn't exist. */
16
+ withDir(dir) {
17
+ return this.set('dir', dir);
18
+ }
19
+ /** How long to contend for a per-key write lock before giving up. Default 5_000 ms. */
20
+ withLockTimeoutMs(lockTimeoutMs) {
21
+ return this.set('lockTimeoutMs', lockTimeoutMs);
22
+ }
23
+ /** Lock files older than this are treated as stale and forcibly removed. Default 30_000 ms. */
24
+ withStaleLockMs(staleLockMs) {
25
+ return this.set('staleLockMs', staleLockMs);
26
+ }
27
+ }
28
+ /** Value alias so `FilesystemObjectStorageOptions.create()` / `new FilesystemObjectStorageOptions()` resolve to the builder. */
29
+ export const FilesystemObjectStorageOptions = FilesystemObjectStorageOptionsBuilder;
30
+ //# sourceMappingURL=FilesystemObjectStorageOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilesystemObjectStorageOptions.js","sourceRoot":"","sources":["../../../src/persistence/object-storage/FilesystemObjectStorageOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAqB9D;;;;;;;GAOG;AACH,MAAM,OAAO,qCAAsC,SAAQ,cAAkD;IAC3G,2FAA2F;IAC3F,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,qCAAqC,EAAE,CAAC;IACrD,CAAC;IAED,gEAAgE;IAChE,OAAO,CAAC,GAAW;QACjB,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED,wFAAwF;IACxF,iBAAiB,CAAC,aAAqB;QACrC,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IAClD,CAAC;IAED,gGAAgG;IAChG,eAAe,CAAC,WAAmB;QACjC,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IAC9C,CAAC;CACF;AAOD,gIAAgI;AAChI,MAAM,CAAC,MAAM,8BAA8B,GAAG,qCAAqC,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * HMAC-SHA256 helpers for unencrypted body integrity (#116).
3
+ *
4
+ * Closes a gap in the wire format: AES-GCM's auth tag protects
5
+ * encrypted bodies against tampering, but `mode: 'none'` bodies (the
6
+ * default) had no integrity field. An attacker with write access to
7
+ * the object-storage backend could flip JSON bytes — including the
8
+ * `revision` digit used by DurableState's CAS — without detection.
9
+ *
10
+ * Fix: opt-in HMAC-SHA256 over the payload bytes, truncated to 16
11
+ * bytes (128-bit MAC strength), appended to the body and flagged in
12
+ * the manifest. Key is **separate** from the encryption master key
13
+ * (the threat is tampering, not confidentiality), held by the same
14
+ * deployment. Verification runs at the codec boundary before the
15
+ * payload is returned to the store layer.
16
+ *
17
+ * Defaults to off so legacy bodies (no `FLAG_INTEGRITY_HMAC`) keep
18
+ * decoding cleanly. Operators opt in by setting the new
19
+ * `IntegrityConfig` on a `ObjectStorageDurableStateStore` (or the
20
+ * `integrity` option on a single call).
21
+ */
22
+ /** Length of the HMAC key, in bytes. */
23
+ export declare const HMAC_KEY_LENGTH = 32;
24
+ /**
25
+ * Length of the truncated HMAC tag appended to bodies. Truncated
26
+ * SHA-256 stays well above the practical forgery threshold (128 bits =
27
+ * 2^128 attempts). Keeps the storage overhead constant at 16 bytes
28
+ * per body regardless of payload size.
29
+ */
30
+ export declare const HMAC_TAG_LENGTH = 16;
31
+ /**
32
+ * Compute HMAC-SHA256 over `data` with `key`, truncated to
33
+ * {@link HMAC_TAG_LENGTH} bytes.
34
+ */
35
+ export declare function hmacSha256(key: Uint8Array, data: Uint8Array): Promise<Uint8Array>;
36
+ /**
37
+ * Constant-time comparison of two byte arrays. Avoids leaking the
38
+ * position of the first mismatch via timing. Returns `false` for
39
+ * length-mismatches as a fast-path (no information leak since length
40
+ * is part of the wire format).
41
+ */
42
+ export declare function constantTimeEqual(a: Uint8Array, b: Uint8Array): boolean;
43
+ //# sourceMappingURL=Integrity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Integrity.d.ts","sourceRoot":"","sources":["../../../src/persistence/object-storage/Integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wCAAwC;AACxC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,KAAK,CAAC;AAalC;;;GAGG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAcvF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,OAAO,CAKvE"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * HMAC-SHA256 helpers for unencrypted body integrity (#116).
3
+ *
4
+ * Closes a gap in the wire format: AES-GCM's auth tag protects
5
+ * encrypted bodies against tampering, but `mode: 'none'` bodies (the
6
+ * default) had no integrity field. An attacker with write access to
7
+ * the object-storage backend could flip JSON bytes — including the
8
+ * `revision` digit used by DurableState's CAS — without detection.
9
+ *
10
+ * Fix: opt-in HMAC-SHA256 over the payload bytes, truncated to 16
11
+ * bytes (128-bit MAC strength), appended to the body and flagged in
12
+ * the manifest. Key is **separate** from the encryption master key
13
+ * (the threat is tampering, not confidentiality), held by the same
14
+ * deployment. Verification runs at the codec boundary before the
15
+ * payload is returned to the store layer.
16
+ *
17
+ * Defaults to off so legacy bodies (no `FLAG_INTEGRITY_HMAC`) keep
18
+ * decoding cleanly. Operators opt in by setting the new
19
+ * `IntegrityConfig` on a `ObjectStorageDurableStateStore` (or the
20
+ * `integrity` option on a single call).
21
+ */
22
+ /** Length of the HMAC key, in bytes. */
23
+ export const HMAC_KEY_LENGTH = 32;
24
+ /**
25
+ * Length of the truncated HMAC tag appended to bodies. Truncated
26
+ * SHA-256 stays well above the practical forgery threshold (128 bits =
27
+ * 2^128 attempts). Keeps the storage overhead constant at 16 bytes
28
+ * per body regardless of payload size.
29
+ */
30
+ export const HMAC_TAG_LENGTH = 16;
31
+ function getSubtle() {
32
+ const s = globalThis.crypto?.subtle;
33
+ if (!s) {
34
+ throw new Error('SubtleCrypto is not available in this runtime. Body integrity '
35
+ + 'requires WebCrypto — Node 20+, Bun, or Deno.');
36
+ }
37
+ return s;
38
+ }
39
+ /**
40
+ * Compute HMAC-SHA256 over `data` with `key`, truncated to
41
+ * {@link HMAC_TAG_LENGTH} bytes.
42
+ */
43
+ export async function hmacSha256(key, data) {
44
+ if (key.byteLength !== HMAC_KEY_LENGTH) {
45
+ throw new Error(`integrity key must be ${HMAC_KEY_LENGTH} bytes, got ${key.byteLength}`);
46
+ }
47
+ const subtle = getSubtle();
48
+ const cryptoKey = await subtle.importKey('raw', key, { name: 'HMAC', hash: 'SHA-256' }, false, ['sign']);
49
+ const sig = await subtle.sign('HMAC', cryptoKey, data);
50
+ return new Uint8Array(sig).subarray(0, HMAC_TAG_LENGTH);
51
+ }
52
+ /**
53
+ * Constant-time comparison of two byte arrays. Avoids leaking the
54
+ * position of the first mismatch via timing. Returns `false` for
55
+ * length-mismatches as a fast-path (no information leak since length
56
+ * is part of the wire format).
57
+ */
58
+ export function constantTimeEqual(a, b) {
59
+ if (a.length !== b.length)
60
+ return false;
61
+ let diff = 0;
62
+ for (let i = 0; i < a.length; i++)
63
+ diff |= a[i] ^ b[i];
64
+ return diff === 0;
65
+ }
66
+ //# sourceMappingURL=Integrity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Integrity.js","sourceRoot":"","sources":["../../../src/persistence/object-storage/Integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wCAAwC;AACxC,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAElC,SAAS,SAAS;IAChB,MAAM,CAAC,GAAI,UAAU,CAAC,MAA6B,EAAE,MAAM,CAAC;IAC5D,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,IAAI,KAAK,CACb,iEAAiE;cAC/D,8CAA8C,CACjD,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAe,EAAE,IAAgB;IAChE,IAAI,GAAG,CAAC,UAAU,KAAK,eAAe,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,yBAAyB,eAAe,eAAe,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IAC3F,CAAC;IACD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,SAAS,CACtC,KAAK,EACL,GAA8B,EAC9B,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,EACjC,KAAK,EACL,CAAC,MAAM,CAAC,CACT,CAAC;IACF,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,IAA+B,CAAC,CAAC;IAClF,OAAO,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,CAAa,EAAE,CAAa;IAC5D,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACxC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,IAAI,IAAI,CAAC,CAAC,CAAC,CAAE,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;IACzD,OAAO,IAAI,KAAK,CAAC,CAAC;AACpB,CAAC"}
@@ -2,7 +2,7 @@ import type { PersistenceExtension } from '../PersistenceExtension.js';
2
2
  import { ObjectStorageDurableStateStore } from '../durable-state-stores/ObjectStorageDurableStateStore.js';
3
3
  import { type S3Credentials } from './S3ObjectStorageBackend.js';
4
4
  import type { ObjectStorageBackend } from './ObjectStorageBackend.js';
5
- import { type CompressionConfig, type CompressionResolver, type EncryptionConfig, type EncryptionResolver } from './PluginConfig.js';
5
+ import type { ObjectStoragePluginOptions } from './ObjectStoragePluginOptions.js';
6
6
  /** Canonical plugin IDs registered by `registerObjectStoragePlugins`. */
7
7
  export declare const OBJECT_STORAGE_SNAPSHOT_PLUGIN_ID = "actor-ts.persistence.snapshot-store.object-storage";
8
8
  export declare const OBJECT_STORAGE_DURABLE_STATE_PLUGIN_ID = "actor-ts.persistence.durable-state.object-storage";
@@ -26,22 +26,6 @@ export type ObjectStorageBackendSpec = {
26
26
  readonly kind: 'custom';
27
27
  readonly backend: ObjectStorageBackend;
28
28
  };
29
- export interface ObjectStoragePluginOptions {
30
- /** Plugin ID under which the snapshot store is registered. */
31
- readonly snapshotPluginId?: string;
32
- /** Plugin ID for the durable-state store. */
33
- readonly durableStatePluginId?: string;
34
- /** Backend definition — filesystem, S3, or custom. */
35
- readonly backend: ObjectStorageBackendSpec;
36
- /** Key prefix prepended to every object — e.g. `'env-prod/'`. */
37
- readonly prefix?: string;
38
- /** Snapshot history retention; `0` disables pruning. Default: 3. */
39
- readonly keepN?: number;
40
- /** Compression config or per-pid resolver. Default: gzip. */
41
- readonly compression?: CompressionConfig | CompressionResolver;
42
- /** Encryption config or per-pid resolver. Default: none. */
43
- readonly encryption?: EncryptionConfig | EncryptionResolver;
44
- }
45
29
  export interface ObjectStoragePluginHandles {
46
30
  /** The shared backend — both stores write through this. */
47
31
  readonly backend: ObjectStorageBackend;
@@ -75,11 +59,11 @@ export interface ObjectStoragePluginHandles {
75
59
  * Example:
76
60
  *
77
61
  * const ext = system.extension(PersistenceExtensionId);
78
- * const { durableStateStore } = await registerObjectStoragePlugins(ext, {
79
- * backend: { kind: 's3', bucket: 'my-app', region: 'eu-central-1' },
80
- * compression: { algorithm: 'zstd' },
81
- * encryption: encryptionByPrefix({ default: { mode: 'sse-s3' } }),
82
- * });
62
+ * const { durableStateStore } = await registerObjectStoragePlugins(ext,
63
+ * ObjectStoragePluginOptions.create()
64
+ * .withBackend({ kind: 's3', bucket: 'my-app', region: 'eu-central-1' })
65
+ * .withCompression({ algorithm: 'zstd' })
66
+ * .withEncryption(encryptionByPrefix({ default: { mode: 'sse-s3' } })));
83
67
  * // ... and to make the snapshot plugin active:
84
68
  * // actor-ts.persistence.snapshot-store.plugin = "actor-ts.persistence.snapshot-store.object-storage"
85
69
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectStoragePlugin.d.ts","sourceRoot":"","sources":["../../../src/persistence/object-storage/ObjectStoragePlugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2DAA2D,CAAC;AAK3G,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAE3B,yEAAyE;AACzE,eAAO,MAAM,iCAAiC,uDAAuD,CAAC;AACtG,eAAO,MAAM,sCAAsC,sDAAsD,CAAC;AAE1G;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAChC;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACrD;IACE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC;CACtC,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAA;CAAE,CAAC;AAExE,MAAM,WAAW,0BAA0B;IACzC,8DAA8D;IAC9D,QAAQ,CAAC,gBAAgB,CAAC,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AkC,MAAM,iCAAiC,CAAC;AASlH,yEAAyE;AACzE,eAAO,MAAM,iCAAiC,uDAAuD,CAAC;AACtG,eAAO,MAAM,sCAAsC,sDAAsD,CAAC;AAE1G;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAChC;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACrD;IACE,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC;CACtC,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAA;CAAE,CAAC;AAExE,MAAM,WAAW,0BAA0B;IACzC,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACvC;;;;;OAKG;IACH,QAAQ,CAAC,iBAAiB,EAAE,8BAA8B,CAAC;CAC5D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,4BAA4B,CAChD,GAAG,EAAE,oBAAoB,EACzB,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,0BAA0B,CAAC,CA0BrC;AAED;;;;GAIG;AACH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,IAAI,CAAC,CAkBf"}
@@ -30,30 +30,35 @@ export const OBJECT_STORAGE_DURABLE_STATE_PLUGIN_ID = 'actor-ts.persistence.dura
30
30
  * Example:
31
31
  *
32
32
  * const ext = system.extension(PersistenceExtensionId);
33
- * const { durableStateStore } = await registerObjectStoragePlugins(ext, {
34
- * backend: { kind: 's3', bucket: 'my-app', region: 'eu-central-1' },
35
- * compression: { algorithm: 'zstd' },
36
- * encryption: encryptionByPrefix({ default: { mode: 'sse-s3' } }),
37
- * });
33
+ * const { durableStateStore } = await registerObjectStoragePlugins(ext,
34
+ * ObjectStoragePluginOptions.create()
35
+ * .withBackend({ kind: 's3', bucket: 'my-app', region: 'eu-central-1' })
36
+ * .withCompression({ algorithm: 'zstd' })
37
+ * .withEncryption(encryptionByPrefix({ default: { mode: 'sse-s3' } })));
38
38
  * // ... and to make the snapshot plugin active:
39
39
  * // actor-ts.persistence.snapshot-store.plugin = "actor-ts.persistence.snapshot-store.object-storage"
40
40
  */
41
41
  export async function registerObjectStoragePlugins(ext, options) {
42
- await validateObjectStoragePeerDeps(options);
43
- const backend = buildBackend(options.backend);
44
- const snapshotId = options.snapshotPluginId ?? OBJECT_STORAGE_SNAPSHOT_PLUGIN_ID;
45
- ext.registerSnapshotStore(snapshotId, (_system) => new ObjectStorageSnapshotStore({
46
- backend,
47
- prefix: options.prefix,
48
- keepN: options.keepN,
49
- compression: options.compression,
50
- encryption: options.encryption,
51
- }));
42
+ const s = options;
43
+ if (s.backend === undefined)
44
+ throw new Error('registerObjectStoragePlugins: backend is required (call withBackend()).');
45
+ await validateObjectStoragePeerDeps(s);
46
+ const backend = buildBackend(s.backend);
47
+ const snapshotId = s.snapshotPluginId ?? OBJECT_STORAGE_SNAPSHOT_PLUGIN_ID;
48
+ ext.registerSnapshotStore(snapshotId, (_system) => {
49
+ return new ObjectStorageSnapshotStore({
50
+ backend,
51
+ ...(s.prefix !== undefined ? { prefix: s.prefix } : {}),
52
+ ...(s.keepN !== undefined ? { keepN: s.keepN } : {}),
53
+ ...(s.compression !== undefined ? { compression: s.compression } : {}),
54
+ ...(s.encryption !== undefined ? { encryption: s.encryption } : {}),
55
+ });
56
+ });
52
57
  const durableStateStore = new ObjectStorageDurableStateStore({
53
58
  backend,
54
- prefix: options.prefix,
55
- compression: options.compression,
56
- encryption: options.encryption,
59
+ ...(s.prefix !== undefined ? { prefix: s.prefix } : {}),
60
+ ...(s.compression !== undefined ? { compression: s.compression } : {}),
61
+ ...(s.encryption !== undefined ? { encryption: s.encryption } : {}),
57
62
  });
58
63
  return { backend, durableStateStore };
59
64
  }
@@ -63,9 +68,10 @@ export async function registerObjectStoragePlugins(ext, options) {
63
68
  * actually registering the plugin.
64
69
  */
65
70
  export async function validateObjectStoragePeerDeps(options) {
71
+ const s = options;
66
72
  // Compression: probe each algorithm at most once.
67
73
  const algos = new Set();
68
- for (const cfg of collectCompressionConfigs(options.compression)) {
74
+ for (const cfg of collectCompressionConfigs(s.compression)) {
69
75
  algos.add(cfg.algorithm);
70
76
  }
71
77
  for (const algo of algos) {
@@ -74,7 +80,7 @@ export async function validateObjectStoragePeerDeps(options) {
74
80
  // Encryption: WebCrypto is needed for the client-aes256-gcm mode
75
81
  // (HKDF + AES-GCM go through SubtleCrypto). The server-side modes
76
82
  // — sse-s3, sse-kms — are header pass-throughs and need nothing.
77
- const encConfigs = collectEncryptionConfigs(options.encryption);
83
+ const encConfigs = collectEncryptionConfigs(s.encryption);
78
84
  if (encConfigs.some((c) => c.mode === 'client-aes256-gcm')) {
79
85
  await probeEncryptionAvailability();
80
86
  }
@@ -99,14 +105,16 @@ function collectEncryptionConfigs(e) {
99
105
  }
100
106
  function buildBackend(spec) {
101
107
  switch (spec.kind) {
102
- case 'filesystem': return new FilesystemObjectStorageBackend({ dir: spec.dir });
103
- case 's3': return new S3ObjectStorageBackend({
104
- bucket: spec.bucket,
105
- region: spec.region,
106
- endpoint: spec.endpoint,
107
- forcePathStyle: spec.forcePathStyle,
108
- credentials: spec.credentials,
109
- });
108
+ case 'filesystem':
109
+ return new FilesystemObjectStorageBackend({ dir: spec.dir });
110
+ case 's3':
111
+ return new S3ObjectStorageBackend({
112
+ bucket: spec.bucket,
113
+ region: spec.region,
114
+ ...(spec.endpoint !== undefined ? { endpoint: spec.endpoint } : {}),
115
+ ...(spec.forcePathStyle !== undefined ? { forcePathStyle: spec.forcePathStyle } : {}),
116
+ ...(spec.credentials !== undefined ? { credentials: spec.credentials } : {}),
117
+ });
110
118
  case 'custom': return spec.backend;
111
119
  }
112
120
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectStoragePlugin.js","sourceRoot":"","sources":["../../../src/persistence/object-storage/ObjectStoragePlugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,2DAA2D,CAAC;AAC3G,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EACL,sBAAsB,GAEvB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,cAAc,GAKf,MAAM,mBAAmB,CAAC;AAE3B,yEAAyE;AACzE,MAAM,CAAC,MAAM,iCAAiC,GAAG,oDAAoD,CAAC;AACtG,MAAM,CAAC,MAAM,sCAAsC,GAAG,mDAAmD,CAAC;AAiD1G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,GAAyB,EACzB,OAAmC;IAEnC,MAAM,6BAA6B,CAAC,OAAO,CAAC,CAAC;IAE7C,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,UAAU,GAAG,OAAO,CAAC,gBAAgB,IAAI,iCAAiC,CAAC;IAEjF,GAAG,CAAC,qBAAqB,CAAC,UAAU,EAAE,CAAC,OAAoB,EAAE,EAAE,CAC7D,IAAI,0BAA0B,CAAC;QAC7B,OAAO;QACP,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,KAAK,EAAE,OAAO,CAAC,KAA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