@typeonce/effect-machine 0.47.0 → 0.48.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 (334) hide show
  1. package/AGENTS.md +374 -22
  2. package/CLAUDE.md +374 -22
  3. package/README.md +56 -7
  4. package/ai-docs/src/10_modeling/01_create-a-machine.ts +3 -3
  5. package/ai-docs/src/10_modeling/index.md +64 -17
  6. package/ai-docs/src/20_root-api/index.md +2 -2
  7. package/ai-docs/src/35_cluster/index.md +213 -0
  8. package/ai-docs/src/37_new-host/index.md +90 -0
  9. package/dist/LocalMachine.d.ts +417 -0
  10. package/dist/LocalMachine.d.ts.map +1 -0
  11. package/dist/LocalMachine.js +193 -0
  12. package/dist/LocalMachine.js.map +1 -0
  13. package/dist/Machine.d.ts +1122 -814
  14. package/dist/Machine.d.ts.map +1 -1
  15. package/dist/Machine.js +195 -186
  16. package/dist/Machine.js.map +1 -1
  17. package/dist/index.d.ts +1 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +1 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/internal/machine/atom.d.ts +8 -10
  22. package/dist/internal/machine/atom.d.ts.map +1 -1
  23. package/dist/internal/machine/atom.js +7 -6
  24. package/dist/internal/machine/atom.js.map +1 -1
  25. package/dist/internal/machine/capability.d.ts +101 -0
  26. package/dist/internal/machine/capability.d.ts.map +1 -0
  27. package/dist/internal/machine/capability.js +70 -0
  28. package/dist/internal/machine/capability.js.map +1 -0
  29. package/dist/internal/machine/{invocationDefinition.d.ts → capturedInvocation.d.ts} +11 -11
  30. package/dist/internal/machine/capturedInvocation.d.ts.map +1 -0
  31. package/dist/internal/machine/{invocationDefinition.js → capturedInvocation.js} +2 -2
  32. package/dist/internal/machine/capturedInvocation.js.map +1 -0
  33. package/dist/internal/machine/child.d.ts +14 -0
  34. package/dist/internal/machine/child.d.ts.map +1 -0
  35. package/dist/internal/machine/child.js +19 -0
  36. package/dist/internal/machine/child.js.map +1 -0
  37. package/dist/internal/machine/childRegistry.d.ts +0 -2
  38. package/dist/internal/machine/childRegistry.d.ts.map +1 -1
  39. package/dist/internal/machine/childRegistry.js +2 -2
  40. package/dist/internal/machine/childRegistry.js.map +1 -1
  41. package/dist/internal/machine/cluster.d.ts +19 -4
  42. package/dist/internal/machine/cluster.d.ts.map +1 -1
  43. package/dist/internal/machine/cluster.js +263 -110
  44. package/dist/internal/machine/cluster.js.map +1 -1
  45. package/dist/internal/machine/clusterChild.d.ts +66 -0
  46. package/dist/internal/machine/clusterChild.d.ts.map +1 -0
  47. package/dist/internal/machine/clusterChild.js +105 -0
  48. package/dist/internal/machine/clusterChild.js.map +1 -0
  49. package/dist/internal/machine/clusterFailure.d.ts +14 -0
  50. package/dist/internal/machine/clusterFailure.d.ts.map +1 -0
  51. package/dist/internal/machine/clusterFailure.js +44 -0
  52. package/dist/internal/machine/clusterFailure.js.map +1 -0
  53. package/dist/internal/machine/clusterInstance.d.ts +194 -0
  54. package/dist/internal/machine/clusterInstance.d.ts.map +1 -0
  55. package/dist/internal/machine/clusterInstance.js +1076 -0
  56. package/dist/internal/machine/clusterInstance.js.map +1 -0
  57. package/dist/internal/machine/clusterKeepAlive.d.ts +47 -0
  58. package/dist/internal/machine/clusterKeepAlive.d.ts.map +1 -0
  59. package/dist/internal/machine/clusterKeepAlive.js +72 -0
  60. package/dist/internal/machine/clusterKeepAlive.js.map +1 -0
  61. package/dist/internal/machine/clusterProgress.d.ts +73 -0
  62. package/dist/internal/machine/clusterProgress.d.ts.map +1 -0
  63. package/dist/internal/machine/clusterProgress.js +116 -0
  64. package/dist/internal/machine/clusterProgress.js.map +1 -0
  65. package/dist/internal/machine/clusterProtocol.d.ts +37 -4
  66. package/dist/internal/machine/clusterProtocol.d.ts.map +1 -1
  67. package/dist/internal/machine/clusterProtocol.js +18 -4
  68. package/dist/internal/machine/clusterProtocol.js.map +1 -1
  69. package/dist/internal/machine/clusterProxy.d.ts +46 -0
  70. package/dist/internal/machine/clusterProxy.d.ts.map +1 -0
  71. package/dist/internal/machine/clusterProxy.js +150 -0
  72. package/dist/internal/machine/clusterProxy.js.map +1 -0
  73. package/dist/internal/machine/clusterRead.d.ts +61 -0
  74. package/dist/internal/machine/clusterRead.d.ts.map +1 -0
  75. package/dist/internal/machine/clusterRead.js +108 -0
  76. package/dist/internal/machine/clusterRead.js.map +1 -0
  77. package/dist/internal/machine/clusterSqlStorage.d.ts +16 -0
  78. package/dist/internal/machine/clusterSqlStorage.d.ts.map +1 -0
  79. package/dist/internal/machine/clusterSqlStorage.js +138 -0
  80. package/dist/internal/machine/clusterSqlStorage.js.map +1 -0
  81. package/dist/internal/machine/clusterStorageCheck.d.ts +19 -0
  82. package/dist/internal/machine/clusterStorageCheck.d.ts.map +1 -0
  83. package/dist/internal/machine/clusterStorageCheck.js +186 -0
  84. package/dist/internal/machine/clusterStorageCheck.js.map +1 -0
  85. package/dist/internal/machine/clusterTarget.d.ts +74 -0
  86. package/dist/internal/machine/clusterTarget.d.ts.map +1 -0
  87. package/dist/internal/machine/clusterTarget.js +81 -0
  88. package/dist/internal/machine/clusterTarget.js.map +1 -0
  89. package/dist/internal/machine/clusterTimer.d.ts +21 -0
  90. package/dist/internal/machine/clusterTimer.d.ts.map +1 -0
  91. package/dist/internal/machine/clusterTimer.js +50 -0
  92. package/dist/internal/machine/clusterTimer.js.map +1 -0
  93. package/dist/internal/machine/clusterWake.d.ts +61 -0
  94. package/dist/internal/machine/clusterWake.d.ts.map +1 -0
  95. package/dist/internal/machine/clusterWake.js +81 -0
  96. package/dist/internal/machine/clusterWake.js.map +1 -0
  97. package/dist/internal/machine/clusterWork.d.ts +130 -0
  98. package/dist/internal/machine/clusterWork.d.ts.map +1 -0
  99. package/dist/internal/machine/clusterWork.js +191 -0
  100. package/dist/internal/machine/clusterWork.js.map +1 -0
  101. package/dist/internal/machine/command.d.ts +4 -4
  102. package/dist/internal/machine/command.d.ts.map +1 -1
  103. package/dist/internal/machine/commandRuntime.d.ts +8 -6
  104. package/dist/internal/machine/commandRuntime.d.ts.map +1 -1
  105. package/dist/internal/machine/commandRuntime.js +1 -5
  106. package/dist/internal/machine/commandRuntime.js.map +1 -1
  107. package/dist/internal/machine/configuration.d.ts +0 -13
  108. package/dist/internal/machine/configuration.d.ts.map +1 -1
  109. package/dist/internal/machine/configuration.js +0 -151
  110. package/dist/internal/machine/configuration.js.map +1 -1
  111. package/dist/internal/machine/errors.d.ts +11 -2
  112. package/dist/internal/machine/errors.d.ts.map +1 -1
  113. package/dist/internal/machine/errors.js +11 -2
  114. package/dist/internal/machine/errors.js.map +1 -1
  115. package/dist/internal/machine/executionPlan.d.ts +45 -3
  116. package/dist/internal/machine/executionPlan.d.ts.map +1 -1
  117. package/dist/internal/machine/executionPlan.js +328 -191
  118. package/dist/internal/machine/executionPlan.js.map +1 -1
  119. package/dist/internal/machine/implementation.d.ts +6 -6
  120. package/dist/internal/machine/implementation.d.ts.map +1 -1
  121. package/dist/internal/machine/inspectionRuntime.d.ts +1 -1
  122. package/dist/internal/machine/inspectionRuntime.d.ts.map +1 -1
  123. package/dist/internal/machine/invocationChanges.d.ts +60 -0
  124. package/dist/internal/machine/invocationChanges.d.ts.map +1 -0
  125. package/dist/internal/machine/invocationChanges.js +54 -0
  126. package/dist/internal/machine/invocationChanges.js.map +1 -0
  127. package/dist/internal/machine/{activities.d.ts → invocationDefinitions.d.ts} +8 -8
  128. package/dist/internal/machine/invocationDefinitions.d.ts.map +1 -0
  129. package/dist/internal/machine/{activities.js → invocationDefinitions.js} +5 -5
  130. package/dist/internal/machine/invocationDefinitions.js.map +1 -0
  131. package/dist/internal/machine/invocationEvent.d.ts +16 -7
  132. package/dist/internal/machine/invocationEvent.d.ts.map +1 -1
  133. package/dist/internal/machine/invocationEvent.js +26 -12
  134. package/dist/internal/machine/invocationEvent.js.map +1 -1
  135. package/dist/internal/machine/invocationOutcome.d.ts +89 -0
  136. package/dist/internal/machine/invocationOutcome.d.ts.map +1 -0
  137. package/dist/internal/machine/invocationOutcome.js +76 -0
  138. package/dist/internal/machine/invocationOutcome.js.map +1 -0
  139. package/dist/internal/machine/invocationResolution.d.ts +137 -0
  140. package/dist/internal/machine/invocationResolution.d.ts.map +1 -0
  141. package/dist/internal/machine/invocationResolution.js +150 -0
  142. package/dist/internal/machine/invocationResolution.js.map +1 -0
  143. package/dist/internal/machine/logicScope.d.ts +24 -0
  144. package/dist/internal/machine/logicScope.d.ts.map +1 -0
  145. package/dist/internal/machine/logicScope.js +33 -0
  146. package/dist/internal/machine/logicScope.js.map +1 -0
  147. package/dist/internal/machine/machine.d.ts +17 -23
  148. package/dist/internal/machine/machine.d.ts.map +1 -1
  149. package/dist/internal/machine/machine.js +24 -40
  150. package/dist/internal/machine/machine.js.map +1 -1
  151. package/dist/internal/machine/observation.d.ts +3 -0
  152. package/dist/internal/machine/observation.d.ts.map +1 -1
  153. package/dist/internal/machine/observation.js +56 -2
  154. package/dist/internal/machine/observation.js.map +1 -1
  155. package/dist/internal/machine/plannedSnapshot.d.ts.map +1 -1
  156. package/dist/internal/machine/plannedSnapshot.js +11 -20
  157. package/dist/internal/machine/plannedSnapshot.js.map +1 -1
  158. package/dist/internal/machine/planner.d.ts +36 -23
  159. package/dist/internal/machine/planner.d.ts.map +1 -1
  160. package/dist/internal/machine/planner.js +15 -8
  161. package/dist/internal/machine/planner.js.map +1 -1
  162. package/dist/internal/machine/process.d.ts +17 -9
  163. package/dist/internal/machine/process.d.ts.map +1 -1
  164. package/dist/internal/machine/process.js +43 -503
  165. package/dist/internal/machine/process.js.map +1 -1
  166. package/dist/internal/machine/protocol.d.ts +1 -1
  167. package/dist/internal/machine/protocol.d.ts.map +1 -1
  168. package/dist/internal/machine/protocol.js +48 -10
  169. package/dist/internal/machine/protocol.js.map +1 -1
  170. package/dist/internal/machine/runtime.d.ts +20 -16
  171. package/dist/internal/machine/runtime.d.ts.map +1 -1
  172. package/dist/internal/machine/runtime.js +93 -88
  173. package/dist/internal/machine/runtime.js.map +1 -1
  174. package/dist/internal/machine/runtimeCompiled.d.ts.map +1 -1
  175. package/dist/internal/machine/runtimeCompiled.js +359 -120
  176. package/dist/internal/machine/runtimeCompiled.js.map +1 -1
  177. package/dist/internal/machine/runtimeProtocol.d.ts +151 -82
  178. package/dist/internal/machine/runtimeProtocol.d.ts.map +1 -1
  179. package/dist/internal/machine/runtimeProtocol.js +236 -219
  180. package/dist/internal/machine/runtimeProtocol.js.map +1 -1
  181. package/dist/internal/machine/stateDefinition.d.ts +0 -1
  182. package/dist/internal/machine/stateDefinition.d.ts.map +1 -1
  183. package/dist/internal/machine/stateDefinition.js +0 -1
  184. package/dist/internal/machine/stateDefinition.js.map +1 -1
  185. package/dist/internal/machine/step.d.ts +486 -0
  186. package/dist/internal/machine/step.d.ts.map +1 -0
  187. package/dist/internal/machine/step.js +957 -0
  188. package/dist/internal/machine/step.js.map +1 -0
  189. package/dist/internal/machine/stepHost.d.ts +33 -0
  190. package/dist/internal/machine/stepHost.d.ts.map +1 -0
  191. package/dist/internal/machine/stepHost.js +501 -0
  192. package/dist/internal/machine/stepHost.js.map +1 -0
  193. package/dist/internal/machine/symbols.d.ts +2 -11
  194. package/dist/internal/machine/symbols.d.ts.map +1 -1
  195. package/dist/internal/machine/symbols.js +2 -2
  196. package/dist/internal/machine/symbols.js.map +1 -1
  197. package/dist/internal/machine/transition.d.ts +7 -7
  198. package/dist/internal/machine/transition.d.ts.map +1 -1
  199. package/dist/internal/testing/machine/check.d.ts.map +1 -1
  200. package/dist/internal/testing/machine/check.js +217 -25
  201. package/dist/internal/testing/machine/check.js.map +1 -1
  202. package/dist/internal/testing/machine/exploration.d.ts +19 -2
  203. package/dist/internal/testing/machine/exploration.d.ts.map +1 -1
  204. package/dist/internal/testing/machine/exploration.js +14 -3
  205. package/dist/internal/testing/machine/exploration.js.map +1 -1
  206. package/dist/internal/testing/machine/format.js.map +1 -1
  207. package/dist/internal/testing/machine/probe.d.ts.map +1 -1
  208. package/dist/internal/testing/machine/probe.js +1 -1
  209. package/dist/internal/testing/machine/probe.js.map +1 -1
  210. package/dist/internal/testing/machine/runtime.d.ts +2 -2
  211. package/dist/internal/testing/machine/runtime.d.ts.map +1 -1
  212. package/dist/internal/testing/machine/runtime.js +10 -3
  213. package/dist/internal/testing/machine/runtime.js.map +1 -1
  214. package/dist/internal/testing/machine/trace.d.ts +38 -3
  215. package/dist/internal/testing/machine/trace.d.ts.map +1 -1
  216. package/dist/internal/testing/machine/trace.js +180 -33
  217. package/dist/internal/testing/machine/trace.js.map +1 -1
  218. package/dist/internal/testing/machine/transitionCoverage.d.ts +1 -1
  219. package/dist/internal/testing/machine/transitionCoverage.d.ts.map +1 -1
  220. package/dist/internal/testing/machine/verification.d.ts.map +1 -1
  221. package/dist/internal/testing/machine/verification.js +9 -1
  222. package/dist/internal/testing/machine/verification.js.map +1 -1
  223. package/dist/internal/testing/machine/work.d.ts +47 -0
  224. package/dist/internal/testing/machine/work.d.ts.map +1 -0
  225. package/dist/internal/testing/machine/work.js +74 -0
  226. package/dist/internal/testing/machine/work.js.map +1 -0
  227. package/dist/testing/MachineTest.d.ts +253 -37
  228. package/dist/testing/MachineTest.d.ts.map +1 -1
  229. package/dist/testing/MachineTest.js +81 -9
  230. package/dist/testing/MachineTest.js.map +1 -1
  231. package/dist/unstable/cluster/ClusterMachine.d.ts +1071 -41
  232. package/dist/unstable/cluster/ClusterMachine.d.ts.map +1 -1
  233. package/dist/unstable/cluster/ClusterMachine.js +441 -12
  234. package/dist/unstable/cluster/ClusterMachine.js.map +1 -1
  235. package/dist/unstable/cluster/ClusterMachineProxy.d.ts +257 -0
  236. package/dist/unstable/cluster/ClusterMachineProxy.d.ts.map +1 -0
  237. package/dist/unstable/cluster/ClusterMachineProxy.js +73 -0
  238. package/dist/unstable/cluster/ClusterMachineProxy.js.map +1 -0
  239. package/dist/unstable/cluster/SqlMachineStorage.d.ts +125 -0
  240. package/dist/unstable/cluster/SqlMachineStorage.d.ts.map +1 -0
  241. package/dist/unstable/cluster/SqlMachineStorage.js +62 -0
  242. package/dist/unstable/cluster/SqlMachineStorage.js.map +1 -0
  243. package/dist/unstable/cluster/index.d.ts +13 -0
  244. package/dist/unstable/cluster/index.d.ts.map +1 -1
  245. package/dist/unstable/cluster/index.js +13 -0
  246. package/dist/unstable/cluster/index.js.map +1 -1
  247. package/dist/unstable/reactivity/AtomMachine.d.ts +21 -26
  248. package/dist/unstable/reactivity/AtomMachine.d.ts.map +1 -1
  249. package/dist/unstable/reactivity/AtomMachine.js.map +1 -1
  250. package/package.json +5 -3
  251. package/src/LocalMachine.ts +611 -0
  252. package/src/Machine.ts +1383 -1336
  253. package/src/index.ts +1 -0
  254. package/src/internal/machine/atom.ts +20 -49
  255. package/src/internal/machine/capability.ts +123 -0
  256. package/src/internal/machine/{invocationDefinition.ts → capturedInvocation.ts} +13 -13
  257. package/src/internal/machine/child.ts +25 -0
  258. package/src/internal/machine/childRegistry.ts +1 -4
  259. package/src/internal/machine/cluster.ts +420 -205
  260. package/src/internal/machine/clusterChild.ts +117 -0
  261. package/src/internal/machine/clusterFailure.ts +53 -0
  262. package/src/internal/machine/clusterInstance.ts +1779 -0
  263. package/src/internal/machine/clusterKeepAlive.ts +93 -0
  264. package/src/internal/machine/clusterProgress.ts +159 -0
  265. package/src/internal/machine/clusterProtocol.ts +46 -4
  266. package/src/internal/machine/clusterProxy.ts +233 -0
  267. package/src/internal/machine/clusterRead.ts +207 -0
  268. package/src/internal/machine/clusterSqlStorage.ts +181 -0
  269. package/src/internal/machine/clusterStorageCheck.ts +274 -0
  270. package/src/internal/machine/clusterTarget.ts +154 -0
  271. package/src/internal/machine/clusterTimer.ts +58 -0
  272. package/src/internal/machine/clusterWake.ts +100 -0
  273. package/src/internal/machine/clusterWork.ts +269 -0
  274. package/src/internal/machine/command.ts +4 -4
  275. package/src/internal/machine/commandRuntime.ts +12 -24
  276. package/src/internal/machine/configuration.ts +0 -181
  277. package/src/internal/machine/errors.ts +11 -2
  278. package/src/internal/machine/executionPlan.ts +493 -263
  279. package/src/internal/machine/implementation.ts +6 -6
  280. package/src/internal/machine/inspectionRuntime.ts +1 -1
  281. package/src/internal/machine/invocationChanges.ts +89 -0
  282. package/src/internal/machine/{activities.ts → invocationDefinitions.ts} +10 -10
  283. package/src/internal/machine/invocationEvent.ts +35 -12
  284. package/src/internal/machine/invocationOutcome.ts +145 -0
  285. package/src/internal/machine/invocationResolution.ts +307 -0
  286. package/src/internal/machine/logicScope.ts +47 -0
  287. package/src/internal/machine/machine.ts +35 -100
  288. package/src/internal/machine/observation.ts +67 -2
  289. package/src/internal/machine/plannedSnapshot.ts +17 -20
  290. package/src/internal/machine/planner.ts +75 -99
  291. package/src/internal/machine/process.ts +78 -722
  292. package/src/internal/machine/protocol.ts +70 -26
  293. package/src/internal/machine/runtime.ts +198 -195
  294. package/src/internal/machine/runtimeCompiled.ts +496 -171
  295. package/src/internal/machine/runtimeProtocol.ts +416 -305
  296. package/src/internal/machine/stateDefinition.ts +0 -5
  297. package/src/internal/machine/step.ts +1518 -0
  298. package/src/internal/machine/stepHost.ts +634 -0
  299. package/src/internal/machine/symbols.ts +3 -14
  300. package/src/internal/machine/transition.ts +11 -11
  301. package/src/internal/testing/machine/check.ts +240 -36
  302. package/src/internal/testing/machine/exploration.ts +42 -3
  303. package/src/internal/testing/machine/format.ts +1 -1
  304. package/src/internal/testing/machine/probe.ts +2 -1
  305. package/src/internal/testing/machine/runtime.ts +15 -5
  306. package/src/internal/testing/machine/trace.ts +261 -41
  307. package/src/internal/testing/machine/transitionCoverage.ts +1 -1
  308. package/src/internal/testing/machine/verification.ts +11 -5
  309. package/src/internal/testing/machine/work.ts +101 -0
  310. package/src/testing/MachineTest.ts +268 -44
  311. package/src/unstable/cluster/ClusterMachine.ts +1183 -59
  312. package/src/unstable/cluster/ClusterMachineProxy.ts +372 -0
  313. package/src/unstable/cluster/SqlMachineStorage.ts +136 -0
  314. package/src/unstable/cluster/index.ts +15 -0
  315. package/src/unstable/reactivity/AtomMachine.ts +27 -88
  316. package/dist/internal/machine/activities.d.ts.map +0 -1
  317. package/dist/internal/machine/activities.js.map +0 -1
  318. package/dist/internal/machine/invocation.d.ts +0 -33
  319. package/dist/internal/machine/invocation.d.ts.map +0 -1
  320. package/dist/internal/machine/invocation.js +0 -220
  321. package/dist/internal/machine/invocation.js.map +0 -1
  322. package/dist/internal/machine/invocationDefinition.d.ts.map +0 -1
  323. package/dist/internal/machine/invocationDefinition.js.map +0 -1
  324. package/dist/internal/machine/requirements.d.ts +0 -4
  325. package/dist/internal/machine/requirements.d.ts.map +0 -1
  326. package/dist/internal/machine/requirements.js +0 -2
  327. package/dist/internal/machine/requirements.js.map +0 -1
  328. package/dist/internal/machine/runtimeGeneric.d.ts +0 -3
  329. package/dist/internal/machine/runtimeGeneric.d.ts.map +0 -1
  330. package/dist/internal/machine/runtimeGeneric.js +0 -465
  331. package/dist/internal/machine/runtimeGeneric.js.map +0 -1
  332. package/src/internal/machine/invocation.ts +0 -376
  333. package/src/internal/machine/requirements.ts +0 -11
  334. package/src/internal/machine/runtimeGeneric.ts +0 -797
@@ -1 +1 @@
1
- {"version":3,"file":"ClusterMachine.d.ts","sourceRoot":"","sources":["../../../src/unstable/cluster/ClusterMachine.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACjF,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAE5C,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MA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O,CAAC,wBAAwB,CAAC,MAAM,CAAC,GAChD,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,MAAM,CAAC,CACnC,CAAA"}
@@ -1,6 +1,8 @@
1
1
  import * as internal from "../../internal/machine/cluster.js";
2
2
  import * as Protocol from "../../internal/machine/clusterProtocol.js";
3
- import { Accepted, Rejected, Storage } from "../../internal/machine/clusterProtocol.js";
3
+ import { Accepted, MachineFailedError, ReadError, Rejected, Storage } from "../../internal/machine/clusterProtocol.js";
4
+ import * as StorageCheck from "../../internal/machine/clusterStorageCheck.js";
5
+ import { StorageCheckFailure } from "../../internal/machine/clusterStorageCheck.js";
4
6
  /**
5
7
  * Constructors and types for Cluster machine commit results.
6
8
  *
@@ -14,10 +16,48 @@ export const CommitResult = Protocol.CommitResult;
14
16
  * **When to use**
15
17
  *
16
18
  * Use to connect `ClusterMachine` to a durable checkpoint store that can
17
- * atomically deduplicate request ids and replace the current checkpoint.
19
+ * atomically deduplicate request ids and compare-and-set the current
20
+ * checkpoint.
21
+ *
22
+ * **Details**
23
+ *
24
+ * `loadForRequest` returns the latest checkpoint of an entity and whether a
25
+ * request id was already committed for it. `load` returns the checkpoint alone,
26
+ * for the inputs that are not requests: an entity that wakes up, and the end of
27
+ * an invocation.
28
+ *
29
+ * `commit` decides and writes atomically, in this order:
30
+ *
31
+ * 1. `Duplicate` when `checkpoint.origin` is a request whose id was already
32
+ * committed, whatever the revision. A checkpoint of any other origin is never
33
+ * a duplicate.
34
+ * 2. `RevisionConflict` when the stored revision is not exactly
35
+ * `checkpoint.revision - 1`. An entity without a checkpoint has revision
36
+ * `0`, so its first checkpoint has revision `1`.
37
+ * 3. `Committed` otherwise. The checkpoint replaces the stored one, and the
38
+ * request id of its origin, when it has one, is recorded with it.
39
+ *
40
+ * Each live entity loads its checkpoint once and keeps the decoded state in
41
+ * memory, so most inputs only call `commit`. Storage remains the truth: memory
42
+ * advances only after the whole transaction succeeded, and is loaded again
43
+ * after any other outcome. Before a request is rejected, `loadForRequest` is
44
+ * called to recognize a redelivery that was already committed.
45
+ *
46
+ * The due time of a timer is part of the checkpoint that enters its state, so
47
+ * storing the checkpoint whole is all that timers require. An entity that loads a
48
+ * state with a timer without a due time, which an earlier deployment can leave
49
+ * behind, commits one more checkpoint before it starts any work. Its origin is
50
+ * `Checkpoint.Origin.Timers`, and `commit` treats it as any origin that is not a
51
+ * request.
18
52
  *
19
53
  * **Gotchas**
20
54
  *
55
+ * The revision check is what stops an entity that lost its shard, and still
56
+ * holds an older state, from overwriting a newer checkpoint. It must be part of
57
+ * the same atomic write, such as an update conditional on the stored revision
58
+ * together with an insert that fails when a checkpoint exists. Comparing in a
59
+ * separate read is not enough.
60
+ *
21
61
  * For checkpoint and emitted-message persistence to commit atomically, this
22
62
  * service must join the transaction opened through the configured
23
63
  * `MessageStorage`. The reply is persisted after that transaction; storing the
@@ -25,6 +65,9 @@ export const CommitResult = Protocol.CommitResult;
25
65
  * applying the transition again. A separate transaction or database cannot
26
66
  * provide checkpoint-and-emission atomicity.
27
67
  *
68
+ * A failed operation never fails the machine. An input that is not a request is
69
+ * retried for as long as the entity lives.
70
+ *
28
71
  * @category services
29
72
  * @since 0.4.0
30
73
  */
@@ -41,6 +84,21 @@ export { Accepted };
41
84
  * Schema for reasons a Cluster machine request can be rejected without
42
85
  * advancing its checkpoint.
43
86
  *
87
+ * **Details**
88
+ *
89
+ * `InvalidEvent` reports an event that {@link Client} refused before sending
90
+ * it, because its schema or the protocol of the machine refuses it. The
91
+ * machine never sees such an event.
92
+ *
93
+ * `DefinitionIdMismatch` reports a checkpoint whose `definitionId` is not the id
94
+ * of the machine that loaded it. `PersistenceFailure` reports storage that
95
+ * failed. `RevisionConflict` reports storage that worked and refused the request,
96
+ * because another instance of the entity advanced the checkpoint both times the
97
+ * request was applied.
98
+ * `MachineFailed` reports a machine whose stored status is `Failed`, and its
99
+ * message is the stored failure. A request that was committed before the
100
+ * failure is still answered as accepted.
101
+ *
44
102
  * @category models
45
103
  * @since 0.4.0
46
104
  */
@@ -49,6 +107,11 @@ export const RejectionReason = Protocol.RejectionReason;
49
107
  * Rejected Cluster machine request. Transaction-participating durable storage
50
108
  * leaves the previous checkpoint in place and suppresses emitted events.
51
109
  *
110
+ * **Details**
111
+ *
112
+ * It is a yieldable error, which {@link Client} reports in its error channel,
113
+ * and the raw `send` RPC of the entity returns as a value of {@link SendResult}.
114
+ *
52
115
  * @category models
53
116
  * @since 0.4.0
54
117
  */
@@ -60,6 +123,29 @@ export { Rejected };
60
123
  * @since 0.4.0
61
124
  */
62
125
  export const SendResult = Protocol.SendResult;
126
+ /**
127
+ * Why a {@link Client} could not read a checkpoint: it was written by another
128
+ * definition or version, or it is not one that this machine can hold.
129
+ *
130
+ * @category errors
131
+ * @since 0.48.0
132
+ */
133
+ export { ReadError };
134
+ /**
135
+ * Reasons for a {@link ReadError}.
136
+ *
137
+ * @category errors
138
+ * @since 0.48.0
139
+ */
140
+ export const ReadFailureReason = Protocol.ReadFailureReason;
141
+ /**
142
+ * The failure of a Cluster machine that `join` waited for, as the text that
143
+ * the machine stored when it failed.
144
+ *
145
+ * @category errors
146
+ * @since 0.48.0
147
+ */
148
+ export { MachineFailedError };
63
149
  /**
64
150
  * Creates an in-memory Cluster machine checkpoint store.
65
151
  *
@@ -71,7 +157,9 @@ export const SendResult = Protocol.SendResult;
71
157
  * **Gotchas**
72
158
  *
73
159
  * This store is not durable and does not provide rollback with the in-memory
74
- * `MessageStorage` transaction marker.
160
+ * `MessageStorage` transaction marker. A request rejected as `EmissionFailure`
161
+ * keeps the checkpoint it had already committed. The outcome of an invoked
162
+ * effect or timer whose `enqueue` fails keeps it too, so it is not applied again.
75
163
  *
76
164
  * @category constructors
77
165
  * @since 0.4.0
@@ -84,6 +172,56 @@ export const makeMemory = internal.makeMemory;
84
172
  * @since 0.4.0
85
173
  */
86
174
  export const layerMemory = internal.layerMemory;
175
+ /**
176
+ * Checks that a {@link Storage} keeps the contract that Cluster machines rely
177
+ * on, and fails with the first scenario it breaks.
178
+ *
179
+ * **When to use**
180
+ *
181
+ * Use in the tests of a `Storage` of your own, against the database it runs
182
+ * on.
183
+ *
184
+ * **Details**
185
+ *
186
+ * The check commits to new entities of its own entity types, and so runs
187
+ * against a store that holds other machines. It checks that:
188
+ *
189
+ * - every field of a checkpoint is stored unchanged, including a 64-bit request
190
+ * id;
191
+ * - only the revision after the stored one commits;
192
+ * - a committed request is a `Duplicate` whatever the revision, and is
193
+ * reported as processed with the checkpoint it committed;
194
+ * - a rejected commit writes nothing and records no request;
195
+ * - a commit whose origin is not a request is never a `Duplicate`;
196
+ * - entities of other ids and types are kept apart;
197
+ * - of two concurrent commits of one revision, one commits.
198
+ *
199
+ * With `withTransaction`, it also checks that a commit inside a transaction
200
+ * that fails is rolled back. Pass the `withTransaction` of the
201
+ * `MessageStorage` that the store runs beside.
202
+ *
203
+ * **Example** (Checking the in-memory store)
204
+ *
205
+ * ```ts import.meta.vitest
206
+ * import { ClusterMachine } from "@typeonce/effect-machine/cluster"
207
+ * import { Effect } from "effect"
208
+ *
209
+ * const program = Effect.flatMap(ClusterMachine.makeMemory, (storage) => ClusterMachine.checkStorage(storage))
210
+ *
211
+ * await Effect.runPromise(program) // => undefined
212
+ * ```
213
+ *
214
+ * @category testing
215
+ * @since 0.48.0
216
+ */
217
+ export const checkStorage = StorageCheck.check;
218
+ /**
219
+ * The scenario of {@link checkStorage} that a store breaks, and how.
220
+ *
221
+ * @category errors
222
+ * @since 0.48.0
223
+ */
224
+ export { StorageCheckFailure };
87
225
  /**
88
226
  * Creates a persisted Cluster entity adapter for a machine.
89
227
  *
@@ -94,22 +232,195 @@ export const layerMemory = internal.layerMemory;
94
232
  *
95
233
  * **Details**
96
234
  *
97
- * A missing checkpoint runs initial planning before the first event. Existing
98
- * checkpoints are identity-checked, version-checked, decoded, and resumed
99
- * without rerunning initial entry behavior. Final checkpoints accept later
100
- * requests as no-ops. The stable bridge identity is `machine.id` when present,
235
+ * A missing checkpoint runs initial planning before the first event. An entity
236
+ * may also be started explicitly via `client.start(...input)`. For a machine
237
+ * that declares `input`, you may either omit the default input from
238
+ * `ClusterMachine.make` and pass per-entity input to `client.start(input)`
239
+ * (sending an event before start rejects as `InvalidEvent`), or pass a default
240
+ * input to `ClusterMachine.make` so `client.send` can auto-start while
241
+ * `client.start(input)` still starts an entity with a custom input. Existing
242
+ * checkpoints are checked for their definition id and version, decoded, and
243
+ * resumed without rerunning initial entry behavior. Final checkpoints accept
244
+ * later requests as no-ops. The definition id is `machine.id` when present,
101
245
  * otherwise the Cluster entity type.
102
246
  *
247
+ * A live entity loads its checkpoint when it comes up, or for its first request
248
+ * when the machine invokes nothing, and then keeps the decoded state in memory
249
+ * until the entity is passivated or restarted. Storage remains the truth. A
250
+ * request whose state turns out to be behind storage is applied again to the
251
+ * stored state, and is rejected as `RevisionConflict` when storage has moved
252
+ * again.
253
+ *
254
+ * Effects invoked by active states run in the live entity. Work starts once the
255
+ * step that entered its state is stored, and stops once the step that exited it
256
+ * is stored. The end of the work is applied as a step of its own, in order with
257
+ * requests, and only the state it leads to is stored, never the result itself.
258
+ * While work should run the entity is kept alive, so it is not passivated, and
259
+ * Cluster brings it up on another runner after a crash. It is kept alive through
260
+ * `Entity.keepAlive`, so a host that provides an `Entity.KeepAliveHandler` is
261
+ * told when to keep it, and when to let it go.
262
+ *
263
+ * An entity that comes up starts the work of its stored state again. Input
264
+ * mappers run again against that state, with `Machine.InitialEvent` as their
265
+ * event, as they do for `LocalMachine.resume`. An invocation that ended while its
266
+ * state stayed active is not started again until its state is entered again.
267
+ *
268
+ * A timer is stored as the time at which it is due, in the same checkpoint as the
269
+ * step that enters its state. The live entity waits for that time and then
270
+ * applies the completion as a step of its own. An entity that comes up again,
271
+ * here or on another runner, waits only for the time that remains, and completes
272
+ * a timer whose time has passed at once. Leaving the state cancels the timer, and
273
+ * entering it again stores a new due time. `LocalMachine.resume` differs: it starts the
274
+ * full duration again.
275
+ *
276
+ * The duration of a timer is evaluated after the step that enters its state is
277
+ * planned and before that step is stored, and not again while its due time is
278
+ * stored. The local runtime evaluates it once the state is entered, in order with
279
+ * the other invocations of the state. A duration that cannot be evaluated does
280
+ * not reject the request. The step is stored, and the machine then fails as it
281
+ * does locally.
282
+ *
283
+ * Work that ends in a way the model does not handle, an outcome that cannot be
284
+ * applied, and a source that cannot be constructed fail the machine, as they do
285
+ * locally. The failure is stored with the last state, and every later request is
286
+ * rejected as `MachineFailed`. There is no retry of failed work: a model that
287
+ * recovers declares `onFailure`.
288
+ *
289
+ * A machine that this host cannot run does not compile: one whose states invoke a
290
+ * Stream or a `Logic`, or whose invoked work requires `Machine.MachineRuntime`,
291
+ * as `Machine.spawn` does, and `Machine.sendTo` and `Machine.stopChild` with a
292
+ * child address. With the descriptor of a child machine, they require only
293
+ * `Machine.ChildMachineRuntime`, which this host provides: they act on the
294
+ * child that runs when the work acts, through a persisted request saved outside
295
+ * the transaction of a step, and ignore a child that does not run. The error
296
+ * names the property
297
+ * `~effect/cluster/ClusterMachine/UnsupportedProcessLocal`, and lists there every
298
+ * invocation kind and capability to replace with an Effect, a timer, or a child
299
+ * machine. A source that is registered and never invoked is accepted.
300
+ *
301
+ * Streams and `Logic` are refused because their progress cannot be stored. A
302
+ * checkpoint holds the state of a machine, and after a crash, a move to another
303
+ * runner, or a restart, the machine continues from it and its work runs again
304
+ * from the start. An Effect or a timer ends with one outcome, so running it
305
+ * again changes nothing that was applied. A Stream ends after many elements,
306
+ * and how far it got lives only in memory: run again, it would apply elements
307
+ * that were applied before, or miss some when it does not produce the same ones.
308
+ * A `Logic` is a process with a state and a mailbox of its own, and both would
309
+ * be lost. Model a process, or a source of many events, as a child machine,
310
+ * whose every step is stored, or as an Effect that ends with one result and a
311
+ * state that is entered again for the next one.
312
+ *
103
313
  * **Gotchas**
104
314
  *
105
- * Invoked processes, spawned children, action-time `runtime.raise`, timers,
106
- * subscriptions, and other process-local state are not durable and are
107
- * rejected. Planning-time raised events remain part of the current macrostep.
315
+ * Work runs at least once and must be safe to repeat. It runs again after a
316
+ * crash, a move to another runner, a restart of the entity, and when another
317
+ * instance advanced the checkpoint, and it can run twice at the same time while
318
+ * a shard moves. One result is applied. Results are not stored, so a result that
319
+ * was not applied before a crash is computed again.
320
+ *
321
+ * A storage or `enqueue` failure never fails the machine. An outcome that cannot
322
+ * be stored is retried for as long as the entity lives.
323
+ *
324
+ * Use `effect` 4.1.5 or later. Earlier versions answer the keep-alive request
325
+ * of an entity after about ten minutes, so a machine whose work runs or whose
326
+ * timer waits longer would not come up again after a crash.
327
+ *
328
+ * A timer that waits no longer than `DurableClock.InMemoryThreshold`, one
329
+ * minute by default, keeps its entity in memory, as a workflow keeps a short
330
+ * sleep. The step that stores a longer wait also saves, in the same
331
+ * transaction of `MessageStorage`, a message to the entity that Cluster
332
+ * delivers when the timer is due. Such a timer keeps nothing alive, so the
333
+ * entity may leave memory, and the message brings it back, here or on another
334
+ * runner. The path, the id, and the due time of the timer name the message, so
335
+ * the message of a wait that ended is ignored. A timer that never ends saves no
336
+ * message. A long wait stored before this version gets its message when its
337
+ * entity next comes up.
338
+ *
339
+ * A message is read by the runner every `entityMessagePollInterval`, so a long
340
+ * timer of an entity that left memory fires up to that much after it is due.
341
+ *
342
+ * Due times are read from the wall clock of the runner, so runners whose clocks
343
+ * differ complete a timer that moves between them that much earlier or later.
344
+ *
345
+ * A state that was stored before the machine declared one of its timers has no
346
+ * due time for it. The entity evaluates the duration when it comes up, with
347
+ * `Machine.InitialEvent`, and stores the due time before it starts any work. A
348
+ * state that was stored with a timer the machine no longer declares is rejected
349
+ * as `InvalidCheckpoint`, so migrate such checkpoints.
350
+ *
351
+ * Machines send to each other through a {@link Target}, which names an entity
352
+ * by its type and id: `target` of an adapter makes one, and `self` is the one of
353
+ * the machine's own entity. An event that a step sends with `enqueue.sendTo` is
354
+ * saved with its checkpoint and applied once, and work sends with `send` of a
355
+ * target.
356
+ *
357
+ * A child machine that a state invokes runs as an entity of its own, of type
358
+ * `Type/childId`, which the layer of the adapter registers too, with the same
359
+ * version. Each activation of the state starts a new child, whose id is
360
+ * `entityId/childId/revision`, with the revision of the step that entered the
361
+ * state, so a child knows nothing of the one before it. The step that enters
362
+ * the state saves the start of the child, with its input, in the transaction of
363
+ * its checkpoint, and the step that exits it saves its stop, so a child runs
364
+ * exactly while its state is stored. `enqueue.sendTo` with the descriptor of a
365
+ * child sends to the child that runs once the step is stored, and drops the
366
+ * event when none does. `enqueue.stop` with the descriptor of a child stops the
367
+ * running child in the same transaction, settles its invocation progress so it
368
+ * does not restart while the state stays active, and ignores a child that does
369
+ * not run. Commands are carried out before the work of the states a step enters
370
+ * starts, as they are locally, so both drop a child that the same step enters.
371
+ * Work acts on the child of its state with `Machine.sendTo` and
372
+ * `Machine.stopChild`, and its input mapper with `children.sendTo` and
373
+ * `children.stop`. The child's `parent` is the target of its parent. A
374
+ * child that ends tells its parent, which reads its output or its failure from
375
+ * `Storage` and applies it as the end of the invocation. A failure of a child
376
+ * fails its parent, also when the parent declares `onFailure`, because the
377
+ * failure is stored as text and not as the error of the child. A stopped child
378
+ * is stored as `Stopped`, and a machine that fails or ends stops its children.
379
+ *
380
+ * When a state of the parent takes the snapshots of a child with `onSnapshot`,
381
+ * each step of the child that plans its initial state or takes a transition, and
382
+ * leaves it active, sends its parent the encoded snapshot in the transaction of
383
+ * its checkpoint. The parent applies each one once, as Cluster delivers it,
384
+ * while it runs that child. A transition on a snapshot that cannot
385
+ * be applied fails the parent. A child whose parent takes none of its snapshots
386
+ * sends none.
387
+ *
388
+ * The compiler reads only the requirements of a machine, so these uses of a local
389
+ * process compile and fail at run time:
390
+ *
391
+ * - A step whose plan sends to a target that is neither a {@link Target} nor
392
+ * the descriptor of an invoked child, or stops a child address rather than
393
+ * the descriptor of an invoked child with `enqueue.stop`. It rejects the
394
+ * request as `UnsupportedProcessLocal`, or fails the machine when the step
395
+ * applies an outcome. Planning-time raised events remain part of the current
396
+ * macrostep.
397
+ * - Work that spawns a child with `children.spawn` from the context of its
398
+ * input mapper, or that `children.sendTo` and `children.stop` give a child
399
+ * address. It fails the machine.
400
+ * - A machine whose requirements are `any`, such as an erased one. When any of its
401
+ * states declares an unsupported invocation, it rejects every request as
402
+ * `UnsupportedProcessLocal`. Work of such a machine that uses
403
+ * `Machine.MachineRuntime`, such as `Machine.spawn`, or `Machine.sendTo` and
404
+ * `Machine.stopChild` with a child address, fails the machine with
405
+ * `ProcessLocalError`.
406
+ *
407
+ * A deployment that adds an invocation to a state does not wake the entities
408
+ * that are already in it. Their work starts when they come up.
409
+ *
410
+ * A request redelivered to a live entity is planned again before storage
411
+ * recognizes it. The plan is discarded, but its resolvers have run again, and so
412
+ * have the input mappers and sources of the timers it enters, so they must not
413
+ * perform effects.
414
+ *
415
+ * A checkpoint changed outside the bridge while an entity is live is noticed
416
+ * through its revision, so such a change must also advance the revision.
417
+ *
108
418
  * Arbitrary action effects may run again after a crash before checkpoint
109
419
  * commit, so the bridge does not provide exactly-once external effects.
110
420
  * State values, completion outputs, and public input events must declare
111
- * JSON-compatible encoded representations. Local and internal event protocols
112
- * remain unrestricted because they do not cross the Cluster boundary.
421
+ * JSON-compatible encoded representations. Local and internal event protocols,
422
+ * and the inputs, outputs, and errors of invoked work, remain unrestricted
423
+ * because they do not cross the Cluster boundary.
113
424
  *
114
425
  * **Example** (Adapting a machine to an entity)
115
426
  *
@@ -129,6 +440,124 @@ export const layerMemory = internal.layerMemory;
129
440
  * adapter.entity.type // => "IdleMachine"
130
441
  * ```
131
442
  *
443
+ * **Example** (Running an invoked effect in an entity)
444
+ *
445
+ * ```ts import.meta.vitest
446
+ * import { Machine } from "@typeonce/effect-machine"
447
+ * import { ClusterMachine } from "@typeonce/effect-machine/cluster"
448
+ * import { Effect, Schema } from "effect"
449
+ *
450
+ * const machine = Machine.make({
451
+ * id: "Invoice",
452
+ * root: Machine.state({
453
+ * states: {
454
+ * Draft: {},
455
+ * Sending: { fields: { invoiceId: Schema.String } },
456
+ * Sent: { fields: { receipt: Schema.String } },
457
+ * Rejected: { fields: { reason: Schema.String } }
458
+ * }
459
+ * }),
460
+ * events: Machine.events({ Send: { invoiceId: Schema.String } }),
461
+ * effects: {
462
+ * // Can run more than once, so the invoice id makes it safe to repeat.
463
+ * send: (invoiceId: string) =>
464
+ * invoiceId === "" ? Effect.fail({ reason: "No invoice" }) : Effect.succeed(`receipt-${invoiceId}`)
465
+ * }
466
+ * }).handle({
467
+ * initial: { target: "Draft" },
468
+ * states: {
469
+ * Draft: { on: { Send: { target: "Sending", data: ({ event }) => ({ invoiceId: event.invoiceId }) } } },
470
+ * Sending: {
471
+ * invoke: {
472
+ * src: "send",
473
+ * input: ({ state }) => state.invoiceId,
474
+ * onDone: { target: "Sent", data: ({ output }) => ({ receipt: output }) },
475
+ * onFailure: { target: "Rejected", data: ({ error }) => ({ reason: error.reason }) }
476
+ * }
477
+ * }
478
+ * }
479
+ * })
480
+ *
481
+ * const adapter = ClusterMachine.make("Invoice", machine, { version: "1" })
482
+ *
483
+ * // Provide the layer with a Cluster runner and a durable `ClusterMachine.Storage`.
484
+ * const layer = adapter.toLayer()
485
+ *
486
+ * adapter.entity.type // => "Invoice"
487
+ * ```
488
+ *
489
+ * **Example** (Waiting for a timer that survives its runner)
490
+ *
491
+ * ```ts import.meta.vitest
492
+ * import { Machine } from "@typeonce/effect-machine"
493
+ * import { ClusterMachine } from "@typeonce/effect-machine/cluster"
494
+ * import { Schema } from "effect"
495
+ *
496
+ * const machine = Machine.make({
497
+ * id: "Trial",
498
+ * root: Machine.state({
499
+ * states: {
500
+ * Inactive: {},
501
+ * Running: { fields: { days: Schema.Number } },
502
+ * Expired: {}
503
+ * }
504
+ * }),
505
+ * events: Machine.events({ Start: { days: Schema.Number }, Cancel: {} }),
506
+ * timers: { trial: (days: number) => ({ days }) }
507
+ * }).handle({
508
+ * initial: { target: "Inactive" },
509
+ * states: {
510
+ * Inactive: { on: { Start: { target: "Running", data: ({ event }) => ({ days: event.days }) } } },
511
+ * Running: {
512
+ * invoke: { src: "trial", input: ({ state }) => state.days, onDone: { target: "Expired" } },
513
+ * on: { Cancel: { target: "Inactive" } }
514
+ * }
515
+ * }
516
+ * })
517
+ *
518
+ * const adapter = ClusterMachine.make("Trial", machine, { version: "1" })
519
+ *
520
+ * adapter.entity.type // => "Trial"
521
+ * ```
522
+ *
523
+ * **Example** (Refusing a machine that Cluster cannot run)
524
+ *
525
+ * ```ts import.meta.vitest
526
+ * import { Machine } from "@typeonce/effect-machine"
527
+ * import { ClusterMachine } from "@typeonce/effect-machine/cluster"
528
+ * import { Effect, Stream } from "effect"
529
+ *
530
+ * const definition = Machine.make({
531
+ * id: "Sensor",
532
+ * root: Machine.state({ states: { Reading: {}, Read: {} } }),
533
+ * events: Machine.events({}),
534
+ * effects: { read: Effect.succeed(20) },
535
+ * streams: { readings: Stream.make(20, 21) }
536
+ * })
537
+ *
538
+ * const streaming = definition.handle({
539
+ * initial: { target: "Reading" },
540
+ * states: {
541
+ * Reading: { invoke: { src: "readings", onElement: { stay: true }, onDone: { target: "Read" } } }
542
+ * }
543
+ * })
544
+ *
545
+ * // @ts-expect-error Invokes a Stream: { invocations: "Stream"; capabilities: never }
546
+ * ClusterMachine.make("Sensor", streaming, { version: "1" })
547
+ *
548
+ * const reading = definition.handle({
549
+ * initial: { target: "Reading" },
550
+ * states: {
551
+ * Reading: { invoke: { src: "read", onDone: { target: "Read" } } }
552
+ * }
553
+ * })
554
+ *
555
+ * const adapter = ClusterMachine.make("Sensor", reading, { version: "1" })
556
+ *
557
+ * adapter.entity.type // => "Sensor"
558
+ * ```
559
+ *
560
+ * @see {@link Machine.InvocationSupport} for the requirement of each invocation kind.
132
561
  * @category constructors
133
562
  * @since 0.4.0
134
563
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ClusterMachine.js","sourceRoot":"","sources":["../../../src/unstable/cluster/ClusterMachine.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAA;AAC7D,OAAO,KAAK,QAAQ,MAAM,2CAA2C,CAA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