@swirls/looms 0.3.0 → 0.5.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 (253) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/actor/cell.d.ts +21 -2
  3. package/dist/actor/cell.js +15 -3
  4. package/dist/actor/host.d.ts +10 -2
  5. package/dist/actor/host.js +27 -4
  6. package/dist/actor/index.d.ts +2 -1
  7. package/dist/actor/index.js +1 -1
  8. package/dist/actor/routing.d.ts +3 -0
  9. package/dist/actor/routing.js +13 -2
  10. package/dist/agent/debugger/agent-chat.js +3 -30
  11. package/dist/agent/debugger/streaming-text.d.ts +6 -0
  12. package/dist/agent/debugger/streaming-text.js +33 -0
  13. package/dist/agent/definitions-store.d.ts +1 -1
  14. package/dist/agent/definitions-store.js +1 -1
  15. package/dist/agent/definitions.d.ts +48 -0
  16. package/dist/agent/definitions.js +44 -0
  17. package/dist/agent/effects.d.ts +184 -0
  18. package/dist/agent/effects.js +172 -40
  19. package/dist/agent/events.d.ts +89 -0
  20. package/dist/agent/events.js +25 -0
  21. package/dist/agent/module.d.ts +819 -407
  22. package/dist/agent/module.js +5 -1
  23. package/dist/agent/scope.d.ts +88 -0
  24. package/dist/agent/threads.js +39 -3
  25. package/dist/agent/types.d.ts +4 -0
  26. package/dist/approval/effects.d.ts +40 -0
  27. package/dist/approval/module.d.ts +80 -0
  28. package/dist/client/client.d.ts +468 -119
  29. package/dist/client/client.js +214 -21
  30. package/dist/client/index.d.ts +1 -1
  31. package/dist/client/sse.d.ts +1 -1
  32. package/dist/client/sse.js +2 -2
  33. package/dist/cloudflare/durable-object.d.ts +66 -2
  34. package/dist/cloudflare/durable-object.js +96 -1
  35. package/dist/cloudflare/event-store.d.ts +7 -3
  36. package/dist/cloudflare/event-store.js +16 -3
  37. package/dist/cloudflare/index.d.ts +7 -1
  38. package/dist/cloudflare/index.js +7 -1
  39. package/dist/cloudflare/memory-queue.d.ts +18 -0
  40. package/dist/cloudflare/memory-queue.js +53 -0
  41. package/dist/cloudflare/queue-consumer.d.ts +52 -0
  42. package/dist/cloudflare/queue-consumer.js +102 -0
  43. package/dist/cloudflare/queue-message.d.ts +31 -0
  44. package/dist/cloudflare/queue-message.js +33 -0
  45. package/dist/cloudflare/queue-pull.d.ts +62 -0
  46. package/dist/cloudflare/queue-pull.js +130 -0
  47. package/dist/cloudflare/queue-worker.d.ts +39 -0
  48. package/dist/cloudflare/queue-worker.js +62 -0
  49. package/dist/cloudflare/r2-blob-store.d.ts +33 -0
  50. package/dist/cloudflare/r2-blob-store.js +60 -0
  51. package/dist/cloudflare/router.d.ts +4 -1
  52. package/dist/cloudflare/router.js +8 -3
  53. package/dist/cloudflare/websocket.d.ts +27 -0
  54. package/dist/cloudflare/websocket.js +215 -0
  55. package/dist/core/attempts.d.ts +8 -0
  56. package/dist/core/attempts.js +27 -0
  57. package/dist/core/blob-offload.d.ts +21 -0
  58. package/dist/core/blob-offload.js +143 -0
  59. package/dist/core/blob-store.d.ts +45 -0
  60. package/dist/core/blob-store.js +164 -0
  61. package/dist/core/blobs.d.ts +37 -0
  62. package/dist/core/blobs.js +160 -0
  63. package/dist/core/definition-resolver.d.ts +40 -0
  64. package/dist/core/definition-resolver.js +129 -0
  65. package/dist/core/definition-store.d.ts +6 -0
  66. package/dist/core/definition-store.js +37 -1
  67. package/dist/core/effects.d.ts +86 -3
  68. package/dist/core/effects.js +99 -3
  69. package/dist/core/envelope.d.ts +9 -0
  70. package/dist/core/envelope.js +4 -0
  71. package/dist/core/event-codec.js +3 -0
  72. package/dist/core/fold.js +83 -1
  73. package/dist/core/ids.d.ts +2 -0
  74. package/dist/core/ids.js +4 -0
  75. package/dist/core/index.d.ts +10 -0
  76. package/dist/core/index.js +9 -0
  77. package/dist/core/launcher.d.ts +97 -0
  78. package/dist/core/launcher.js +67 -0
  79. package/dist/core/module-scope.d.ts +7 -3
  80. package/dist/core/module-scope.js +3 -0
  81. package/dist/core/module.d.ts +10 -0
  82. package/dist/core/projection.d.ts +5 -4
  83. package/dist/core/projection.js +4 -0
  84. package/dist/core/protocol.d.ts +36 -1
  85. package/dist/core/protocol.js +35 -0
  86. package/dist/core/published.d.ts +2 -0
  87. package/dist/core/published.js +4 -1
  88. package/dist/{react → core}/register.d.ts +9 -8
  89. package/dist/core/replay.d.ts +96 -0
  90. package/dist/core/run-context.d.ts +33 -0
  91. package/dist/core/run-context.js +23 -0
  92. package/dist/core/sqlite-store.js +57 -5
  93. package/dist/core/state.d.ts +60 -0
  94. package/dist/core/state.js +19 -0
  95. package/dist/core/store.d.ts +6 -0
  96. package/dist/core/store.js +7 -0
  97. package/dist/core/subscription.d.ts +97 -0
  98. package/dist/core/subscription.js +224 -0
  99. package/dist/core/thread.d.ts +7 -0
  100. package/dist/core/thread.js +1 -0
  101. package/dist/core/trace.d.ts +21 -0
  102. package/dist/core/trace.js +45 -0
  103. package/dist/core/worker-callback.d.ts +25 -1
  104. package/dist/debugger/app/assets/{index-CgDzWJg7.css → index-B7GdT1UA.css} +1 -1
  105. package/dist/debugger/app/assets/index-C31SnCuN.js +22 -0
  106. package/dist/debugger/app/assets/routes-DPA3O5AF.js +47 -0
  107. package/dist/debugger/app/index.html +2 -2
  108. package/dist/debugger/components/event-inspector.d.ts +3 -1
  109. package/dist/debugger/components/event-inspector.js +25 -4
  110. package/dist/debugger/components/event-stream.d.ts +4 -1
  111. package/dist/debugger/components/event-stream.js +2 -2
  112. package/dist/debugger/components/run-tree.d.ts +5 -2
  113. package/dist/debugger/components/run-tree.js +10 -4
  114. package/dist/debugger/context.d.ts +8 -1
  115. package/dist/debugger/context.js +15 -3
  116. package/dist/debugger/events/protocol-summarize.js +18 -3
  117. package/dist/debugger/index.d.ts +1 -1
  118. package/dist/debugger/index.js +1 -1
  119. package/dist/debugger/shell/debugger-shell.js +1 -1
  120. package/dist/debugger/shell/events-pane.js +4 -3
  121. package/dist/debugger/styles.css +1 -0
  122. package/dist/evaluator/definitions-store.d.ts +3 -4
  123. package/dist/evaluator/definitions-store.js +3 -3
  124. package/dist/evaluator/definitions.d.ts +4 -1
  125. package/dist/evaluator/definitions.js +5 -2
  126. package/dist/evaluator/effects.d.ts +41 -0
  127. package/dist/evaluator/effects.js +6 -2
  128. package/dist/evaluator/module.d.ts +84 -0
  129. package/dist/evaluator/module.js +7 -3
  130. package/dist/evaluator/threads.d.ts +2 -0
  131. package/dist/evaluator/threads.js +4 -0
  132. package/dist/projectors/event-log.d.ts +87 -0
  133. package/dist/projectors/event-log.js +396 -0
  134. package/dist/projectors/index-model.d.ts +12 -0
  135. package/dist/projectors/index-model.js +12 -3
  136. package/dist/projectors/memory.js +7 -0
  137. package/dist/projectors/postgres.d.ts +1 -0
  138. package/dist/projectors/postgres.js +32 -15
  139. package/dist/projectors/schema.d.ts +5 -0
  140. package/dist/projectors/schema.js +26 -1
  141. package/dist/projectors/sqlite.js +47 -19
  142. package/dist/projectors/with-projectors.d.ts +7 -1
  143. package/dist/projectors/with-projectors.js +13 -3
  144. package/dist/react/derived.d.ts +26 -8
  145. package/dist/react/derived.js +23 -26
  146. package/dist/react/index.d.ts +3 -3
  147. package/dist/react/index.js +2 -2
  148. package/dist/react/materialize.js +5 -1
  149. package/dist/react/react.d.ts +16 -9
  150. package/dist/react/react.js +47 -23
  151. package/dist/react/store.d.ts +14 -6
  152. package/dist/react/store.js +104 -12
  153. package/dist/react/tables.d.ts +4 -1
  154. package/dist/runtime/cancellation.d.ts +2 -1
  155. package/dist/runtime/cancellation.js +35 -2
  156. package/dist/runtime/child-run.d.ts +10 -0
  157. package/dist/runtime/child-run.js +58 -0
  158. package/dist/runtime/deadline-transition-planner.js +11 -2
  159. package/dist/runtime/dispatch-effect.d.ts +2 -2
  160. package/dist/runtime/dispatch-effect.js +43 -19
  161. package/dist/runtime/errors.d.ts +14 -1
  162. package/dist/runtime/errors.js +10 -0
  163. package/dist/runtime/filesystem-blob-store.d.ts +6 -0
  164. package/dist/runtime/filesystem-blob-store.js +59 -0
  165. package/dist/runtime/helpers.d.ts +15 -6
  166. package/dist/runtime/helpers.js +46 -6
  167. package/dist/runtime/index.d.ts +4 -2
  168. package/dist/runtime/index.js +3 -1
  169. package/dist/runtime/local-effect-executor.d.ts +11 -2
  170. package/dist/runtime/local-effect-executor.js +80 -4
  171. package/dist/runtime/looms.d.ts +38 -4
  172. package/dist/runtime/looms.js +17 -3
  173. package/dist/runtime/repository.d.ts +5 -4
  174. package/dist/runtime/repository.js +5 -2
  175. package/dist/runtime/retry-policy.d.ts +5 -0
  176. package/dist/runtime/retry-policy.js +10 -2
  177. package/dist/runtime/run-start.d.ts +1 -1
  178. package/dist/runtime/run-start.js +10 -0
  179. package/dist/runtime/runtime.d.ts +2 -2
  180. package/dist/runtime/runtime.js +191 -68
  181. package/dist/runtime/server/auth.d.ts +3 -0
  182. package/dist/runtime/server/fetch-handler.d.ts +2 -2
  183. package/dist/runtime/server/fetch-handler.js +35 -4
  184. package/dist/runtime/server/grant.d.ts +49 -0
  185. package/dist/runtime/server/grant.js +177 -0
  186. package/dist/runtime/server/routes/effects.js +47 -5
  187. package/dist/runtime/server/routes/runs.js +6 -1
  188. package/dist/runtime/server/run-route.d.ts +18 -0
  189. package/dist/runtime/server/run-route.js +26 -0
  190. package/dist/runtime/server.d.ts +3 -1
  191. package/dist/runtime/server.js +3 -1
  192. package/dist/runtime/sse.js +26 -4
  193. package/dist/runtime/subscription.d.ts +8 -0
  194. package/dist/runtime/subscription.js +23 -0
  195. package/dist/runtime/types.d.ts +87 -8
  196. package/dist/runtime/wake-engine.d.ts +4 -2
  197. package/dist/runtime/wake-engine.js +57 -6
  198. package/dist/runtime/worker-callbacks.d.ts +12 -2
  199. package/dist/runtime/worker-callbacks.js +102 -72
  200. package/dist/runtime/worker-effect-dispatch.d.ts +14 -5
  201. package/dist/runtime/worker-effect-dispatch.js +84 -18
  202. package/dist/schedule/debugger/index.d.ts +4 -0
  203. package/dist/schedule/debugger/index.js +11 -0
  204. package/dist/schedule/debugger/schedule-view.d.ts +3 -0
  205. package/dist/schedule/debugger/schedule-view.js +68 -0
  206. package/dist/schedule/debugger/summarize.d.ts +2 -0
  207. package/dist/schedule/debugger/summarize.js +43 -0
  208. package/dist/schedule/definitions-store.d.ts +10 -0
  209. package/dist/schedule/definitions-store.js +8 -0
  210. package/dist/schedule/definitions.d.ts +57 -0
  211. package/dist/schedule/definitions.js +30 -0
  212. package/dist/schedule/effects.d.ts +756 -0
  213. package/dist/schedule/effects.js +244 -0
  214. package/dist/schedule/ensure.d.ts +55 -0
  215. package/dist/schedule/ensure.js +109 -0
  216. package/dist/schedule/events.d.ts +116 -0
  217. package/dist/schedule/events.js +49 -0
  218. package/dist/schedule/index.d.ts +11 -0
  219. package/dist/schedule/index.js +11 -0
  220. package/dist/schedule/module.d.ts +1474 -0
  221. package/dist/schedule/module.js +22 -0
  222. package/dist/schedule/projections.d.ts +55 -0
  223. package/dist/schedule/projections.js +88 -0
  224. package/dist/schedule/scope.d.ts +121 -0
  225. package/dist/schedule/scope.js +7 -0
  226. package/dist/schedule/signals.d.ts +25 -0
  227. package/dist/schedule/signals.js +33 -0
  228. package/dist/schedule/specs.d.ts +59 -0
  229. package/dist/schedule/specs.js +231 -0
  230. package/dist/schedule/threads.d.ts +25 -0
  231. package/dist/schedule/threads.js +259 -0
  232. package/dist/testing/corpus-module.d.ts +34 -0
  233. package/dist/testing/corpus-module.js +87 -0
  234. package/dist/testing/index.d.ts +2 -0
  235. package/dist/testing/index.js +5 -6
  236. package/dist/testing/replay-corpus.d.ts +22 -0
  237. package/dist/testing/replay-corpus.js +50 -0
  238. package/dist/workflow/definitions-store.d.ts +1 -1
  239. package/dist/workflow/definitions-store.js +1 -1
  240. package/dist/workflow/definitions.d.ts +14 -0
  241. package/dist/workflow/effects.d.ts +122 -0
  242. package/dist/workflow/effects.js +16 -6
  243. package/dist/workflow/events.d.ts +42 -0
  244. package/dist/workflow/events.js +4 -0
  245. package/dist/workflow/module.d.ts +345 -32
  246. package/dist/workflow/module.js +7 -3
  247. package/dist/workflow/scope.d.ts +42 -0
  248. package/dist/workflow/threads.d.ts +72 -0
  249. package/dist/workflow/threads.js +106 -38
  250. package/package.json +11 -2
  251. package/dist/debugger/app/assets/index-BevQYa-U.js +0 -22
  252. package/dist/debugger/app/assets/routes-B17Om93i.js +0 -47
  253. /package/dist/{react → core}/register.js +0 -0
@@ -26,6 +26,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
26
26
  readonly definitionVersion: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").String, never>;
27
27
  readonly input: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
28
28
  readonly loopIndex: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").NullOr<import("effect/Schema").Finite>, never>;
29
+ readonly execution: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"thread">, import("effect/Schema").Literal<"run">]>, never>;
30
+ readonly close: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"terminate">, import("effect/Schema").Literal<"wait">]>, never>;
29
31
  }>;
30
32
  'map.requested': import("effect/Schema").Struct<{
31
33
  readonly nodeId: import("effect/Schema").String;
@@ -36,6 +38,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
36
38
  readonly items: import("effect/Schema").$Array<import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>>;
37
39
  readonly concurrency: import("effect/Schema").Finite;
38
40
  readonly limitBytes: import("effect/Schema").Finite;
41
+ readonly execution: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"thread">, import("effect/Schema").Literal<"run">]>, never>;
42
+ readonly close: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"terminate">, import("effect/Schema").Literal<"wait">]>, never>;
39
43
  }>;
40
44
  'sleep.requested': import("effect/Schema").Struct<{
41
45
  readonly nodeId: import("effect/Schema").String;
@@ -79,6 +83,9 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
79
83
  readonly actorId: import("effect/Schema").optional<import("effect/Schema").String>;
80
84
  }>, import("effect/Schema").Struct<{
81
85
  readonly type: import("effect/Schema").Literal<"system">;
86
+ }>, import("effect/Schema").Struct<{
87
+ readonly type: import("effect/Schema").Literal<"run">;
88
+ readonly runId: import("effect/Schema").String;
82
89
  }>]>>;
83
90
  readonly ephemeral: import("effect/Schema").optional<import("effect/Schema").Boolean>;
84
91
  readonly id: import("effect/Schema").optional<import("effect/Schema").String>;
@@ -96,10 +103,24 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
96
103
  readonly type: import("effect/Schema").Literal<"runtime.cancel">;
97
104
  readonly threadId: import("effect/Schema").String;
98
105
  readonly tag: import("effect/Schema").optional<import("effect/Schema").String>;
106
+ }>, import("effect/Schema").Struct<{
107
+ readonly type: import("effect/Schema").Literal<"runtime.launch">;
108
+ readonly runId: import("effect/Schema").String;
109
+ readonly kind: import("effect/Schema").String;
110
+ readonly definitionName: import("effect/Schema").String;
111
+ readonly definitionVersion: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").String, never>;
112
+ readonly input: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
113
+ readonly close: import("effect/Schema").withDecodingDefaultKey<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"terminate">, import("effect/Schema").Literal<"wait">]>, never>;
114
+ readonly tag: import("effect/Schema").optional<import("effect/Schema").String>;
115
+ }>, import("effect/Schema").Struct<{
116
+ readonly type: import("effect/Schema").Literal<"runtime.cancelRun">;
117
+ readonly runId: import("effect/Schema").String;
118
+ readonly tag: import("effect/Schema").optional<import("effect/Schema").String>;
99
119
  }>, import("effect/Schema").Struct<{
100
120
  readonly type: import("effect/Schema").String;
101
121
  readonly input: import("effect/Schema").Codec<import("effect/Schema").Json, import("effect/Schema").Json, never, never>;
102
122
  readonly tag: import("effect/Schema").optional<import("effect/Schema").String>;
123
+ readonly at: import("effect/Schema").optional<import("effect/Schema").Finite>;
103
124
  }>]>>;
104
125
  }>;
105
126
  }>, {
@@ -122,6 +143,27 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
122
143
  } | undefined;
123
144
  readonly input?: import("effect/Schema").Json | undefined;
124
145
  }, import("./definitions-store").WorkflowDefinitionsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
146
+ readonly type: "runtime.effect.retry.scheduled";
147
+ readonly payload: {
148
+ readonly effectId: string;
149
+ readonly attempt: number;
150
+ readonly nextAttemptAt: number;
151
+ readonly error: string;
152
+ };
153
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
154
+ readonly type: "runtime.child.close.requested";
155
+ readonly payload: {
156
+ readonly policy: "terminate" | "wait";
157
+ };
158
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
159
+ readonly type: "runtime.child.settled";
160
+ readonly payload: {
161
+ readonly runId: string;
162
+ readonly status: "cancelled" | "completed" | "failed";
163
+ readonly output: import("effect/Schema").Json;
164
+ readonly error: string | null;
165
+ };
166
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
125
167
  readonly type: "runtime.effect.ambiguous";
126
168
  readonly payload: {
127
169
  readonly effectId: string;
@@ -165,6 +207,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
165
207
  readonly payload: {
166
208
  readonly effectId: string;
167
209
  readonly error: string;
210
+ readonly nonRetryable?: boolean | undefined;
211
+ readonly retryAfterMs?: number | undefined;
168
212
  };
169
213
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
170
214
  readonly type: "runtime.effect.heartbeat";
@@ -173,6 +217,7 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
173
217
  readonly attempt: number;
174
218
  readonly heartbeatAt: number;
175
219
  readonly deadlineAt: number | null;
220
+ readonly details?: import("effect/Schema").Json | undefined;
176
221
  };
177
222
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
178
223
  readonly type: "runtime.effect.queued";
@@ -181,14 +226,6 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
181
226
  readonly attempt: number;
182
227
  readonly deadlineAt: number | null;
183
228
  };
184
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
185
- readonly type: "runtime.effect.retry.scheduled";
186
- readonly payload: {
187
- readonly effectId: string;
188
- readonly attempt: number;
189
- readonly nextAttemptAt: number;
190
- readonly error: string;
191
- };
192
229
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
193
230
  readonly type: "runtime.effect.timed_out";
194
231
  readonly payload: {
@@ -225,6 +262,16 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
225
262
  readonly sourceRunId: string;
226
263
  readonly sourceSeq: number;
227
264
  };
265
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
266
+ readonly type: "runtime.run.launched";
267
+ readonly payload: {
268
+ readonly runId: string;
269
+ readonly kind: string;
270
+ readonly definitionName: string;
271
+ readonly definitionVersion: string;
272
+ readonly effectId: string;
273
+ readonly close: "terminate" | "wait";
274
+ };
228
275
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
229
276
  readonly type: "runtime.run.started";
230
277
  readonly payload: {
@@ -234,6 +281,20 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
234
281
  readonly definitionVersion: string;
235
282
  readonly input: import("effect/Schema").Json;
236
283
  readonly requestedThreadId?: string | null | undefined;
284
+ readonly launchedBy?: {
285
+ readonly runId: string;
286
+ readonly threadId: string;
287
+ readonly effectId: string;
288
+ readonly causationId: string;
289
+ readonly causationSeq: number;
290
+ } | undefined;
291
+ readonly attributes?: {
292
+ readonly [x: string]: string;
293
+ } | undefined;
294
+ readonly trace?: {
295
+ readonly traceparent: string;
296
+ readonly tracestate?: string | undefined;
297
+ } | undefined;
237
298
  };
238
299
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
239
300
  readonly type: "runtime.signal.received";
@@ -357,6 +418,9 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
357
418
  readonly actorId?: string | undefined;
358
419
  } | {
359
420
  readonly type: "system";
421
+ } | {
422
+ readonly type: "run";
423
+ readonly runId: string;
360
424
  } | undefined;
361
425
  readonly ephemeral?: boolean | undefined;
362
426
  readonly id?: string | undefined;
@@ -374,10 +438,24 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
374
438
  readonly type: "runtime.cancel";
375
439
  readonly threadId: string;
376
440
  readonly tag?: string | undefined;
441
+ } | {
442
+ readonly type: "runtime.launch";
443
+ readonly runId: string;
444
+ readonly kind: string;
445
+ readonly definitionName: string;
446
+ readonly definitionVersion: string;
447
+ readonly input: import("effect/Schema").Json;
448
+ readonly close: "terminate" | "wait";
449
+ readonly tag?: string | undefined;
450
+ } | {
451
+ readonly type: "runtime.cancelRun";
452
+ readonly runId: string;
453
+ readonly tag?: string | undefined;
377
454
  } | {
378
455
  readonly type: string;
379
456
  readonly input: import("effect/Schema").Json;
380
457
  readonly tag?: string | undefined;
458
+ readonly at?: number | undefined;
381
459
  })[];
382
460
  };
383
461
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
@@ -391,6 +469,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
391
469
  readonly items: readonly import("effect/Schema").Json[];
392
470
  readonly concurrency: number;
393
471
  readonly limitBytes: number;
472
+ readonly execution: "run" | "thread";
473
+ readonly close: "terminate" | "wait";
394
474
  };
395
475
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
396
476
  readonly type: "workflow.node.finished";
@@ -430,6 +510,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
430
510
  readonly definitionVersion: string;
431
511
  readonly input: import("effect/Schema").Json;
432
512
  readonly loopIndex: number | null;
513
+ readonly execution: "run" | "thread";
514
+ readonly close: "terminate" | "wait";
433
515
  };
434
516
  })>;
435
517
  runNode: import("@swirls/looms/core").EffectDefinition<{
@@ -457,6 +539,27 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
457
539
  };
458
540
  } | undefined;
459
541
  }, import("./definitions-store").WorkflowDefinitionsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
542
+ readonly type: "runtime.effect.retry.scheduled";
543
+ readonly payload: {
544
+ readonly effectId: string;
545
+ readonly attempt: number;
546
+ readonly nextAttemptAt: number;
547
+ readonly error: string;
548
+ };
549
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
550
+ readonly type: "runtime.child.close.requested";
551
+ readonly payload: {
552
+ readonly policy: "terminate" | "wait";
553
+ };
554
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
555
+ readonly type: "runtime.child.settled";
556
+ readonly payload: {
557
+ readonly runId: string;
558
+ readonly status: "cancelled" | "completed" | "failed";
559
+ readonly output: import("effect/Schema").Json;
560
+ readonly error: string | null;
561
+ };
562
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
460
563
  readonly type: "runtime.effect.ambiguous";
461
564
  readonly payload: {
462
565
  readonly effectId: string;
@@ -500,6 +603,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
500
603
  readonly payload: {
501
604
  readonly effectId: string;
502
605
  readonly error: string;
606
+ readonly nonRetryable?: boolean | undefined;
607
+ readonly retryAfterMs?: number | undefined;
503
608
  };
504
609
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
505
610
  readonly type: "runtime.effect.heartbeat";
@@ -508,6 +613,7 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
508
613
  readonly attempt: number;
509
614
  readonly heartbeatAt: number;
510
615
  readonly deadlineAt: number | null;
616
+ readonly details?: import("effect/Schema").Json | undefined;
511
617
  };
512
618
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
513
619
  readonly type: "runtime.effect.queued";
@@ -516,14 +622,6 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
516
622
  readonly attempt: number;
517
623
  readonly deadlineAt: number | null;
518
624
  };
519
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
520
- readonly type: "runtime.effect.retry.scheduled";
521
- readonly payload: {
522
- readonly effectId: string;
523
- readonly attempt: number;
524
- readonly nextAttemptAt: number;
525
- readonly error: string;
526
- };
527
625
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
528
626
  readonly type: "runtime.effect.timed_out";
529
627
  readonly payload: {
@@ -560,6 +658,16 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
560
658
  readonly sourceRunId: string;
561
659
  readonly sourceSeq: number;
562
660
  };
661
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
662
+ readonly type: "runtime.run.launched";
663
+ readonly payload: {
664
+ readonly runId: string;
665
+ readonly kind: string;
666
+ readonly definitionName: string;
667
+ readonly definitionVersion: string;
668
+ readonly effectId: string;
669
+ readonly close: "terminate" | "wait";
670
+ };
563
671
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
564
672
  readonly type: "runtime.run.started";
565
673
  readonly payload: {
@@ -569,6 +677,20 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
569
677
  readonly definitionVersion: string;
570
678
  readonly input: import("effect/Schema").Json;
571
679
  readonly requestedThreadId?: string | null | undefined;
680
+ readonly launchedBy?: {
681
+ readonly runId: string;
682
+ readonly threadId: string;
683
+ readonly effectId: string;
684
+ readonly causationId: string;
685
+ readonly causationSeq: number;
686
+ } | undefined;
687
+ readonly attributes?: {
688
+ readonly [x: string]: string;
689
+ } | undefined;
690
+ readonly trace?: {
691
+ readonly traceparent: string;
692
+ readonly tracestate?: string | undefined;
693
+ } | undefined;
572
694
  };
573
695
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
574
696
  readonly type: "runtime.signal.received";
@@ -692,6 +814,9 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
692
814
  readonly actorId?: string | undefined;
693
815
  } | {
694
816
  readonly type: "system";
817
+ } | {
818
+ readonly type: "run";
819
+ readonly runId: string;
695
820
  } | undefined;
696
821
  readonly ephemeral?: boolean | undefined;
697
822
  readonly id?: string | undefined;
@@ -709,10 +834,24 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
709
834
  readonly type: "runtime.cancel";
710
835
  readonly threadId: string;
711
836
  readonly tag?: string | undefined;
837
+ } | {
838
+ readonly type: "runtime.launch";
839
+ readonly runId: string;
840
+ readonly kind: string;
841
+ readonly definitionName: string;
842
+ readonly definitionVersion: string;
843
+ readonly input: import("effect/Schema").Json;
844
+ readonly close: "terminate" | "wait";
845
+ readonly tag?: string | undefined;
846
+ } | {
847
+ readonly type: "runtime.cancelRun";
848
+ readonly runId: string;
849
+ readonly tag?: string | undefined;
712
850
  } | {
713
851
  readonly type: string;
714
852
  readonly input: import("effect/Schema").Json;
715
853
  readonly tag?: string | undefined;
854
+ readonly at?: number | undefined;
716
855
  })[];
717
856
  };
718
857
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
@@ -726,6 +865,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
726
865
  readonly items: readonly import("effect/Schema").Json[];
727
866
  readonly concurrency: number;
728
867
  readonly limitBytes: number;
868
+ readonly execution: "run" | "thread";
869
+ readonly close: "terminate" | "wait";
729
870
  };
730
871
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
731
872
  readonly type: "workflow.node.finished";
@@ -765,6 +906,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
765
906
  readonly definitionVersion: string;
766
907
  readonly input: import("effect/Schema").Json;
767
908
  readonly loopIndex: number | null;
909
+ readonly execution: "run" | "thread";
910
+ readonly close: "terminate" | "wait";
768
911
  };
769
912
  })>;
770
913
  }, {
@@ -799,6 +942,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
799
942
  readonly attempt: number;
800
943
  readonly input: import("effect/Schema").Json;
801
944
  readonly loopIndex: number | null;
945
+ readonly execution: "run" | "thread";
946
+ readonly close: "terminate" | "wait";
802
947
  }[];
803
948
  readonly pendingMaps: {
804
949
  readonly nodeId: string;
@@ -813,6 +958,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
813
958
  readonly outputs: {
814
959
  readonly [x: string]: import("effect/Schema").Json;
815
960
  };
961
+ readonly execution: "run" | "thread";
962
+ readonly close: "terminate" | "wait";
816
963
  }[];
817
964
  readonly pendingSleeps: {
818
965
  readonly waitId: string;
@@ -856,6 +1003,9 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
856
1003
  readonly actorId?: string | undefined;
857
1004
  } | {
858
1005
  readonly type: "system";
1006
+ } | {
1007
+ readonly type: "run";
1008
+ readonly runId: string;
859
1009
  } | undefined;
860
1010
  readonly ephemeral?: boolean | undefined;
861
1011
  readonly id?: string | undefined;
@@ -873,10 +1023,24 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
873
1023
  readonly type: "runtime.cancel";
874
1024
  readonly threadId: string;
875
1025
  readonly tag?: string | undefined;
1026
+ } | {
1027
+ readonly type: "runtime.launch";
1028
+ readonly runId: string;
1029
+ readonly kind: string;
1030
+ readonly definitionName: string;
1031
+ readonly definitionVersion: string;
1032
+ readonly input: import("effect/Schema").Json;
1033
+ readonly close: "terminate" | "wait";
1034
+ readonly tag?: string | undefined;
1035
+ } | {
1036
+ readonly type: "runtime.cancelRun";
1037
+ readonly runId: string;
1038
+ readonly tag?: string | undefined;
876
1039
  } | {
877
1040
  readonly type: string;
878
1041
  readonly input: import("effect/Schema").Json;
879
1042
  readonly tag?: string | undefined;
1043
+ readonly at?: number | undefined;
880
1044
  })[];
881
1045
  }[];
882
1046
  readonly pendingEmits: {
@@ -897,6 +1061,9 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
897
1061
  readonly actorId?: string | undefined;
898
1062
  } | {
899
1063
  readonly type: "system";
1064
+ } | {
1065
+ readonly type: "run";
1066
+ readonly runId: string;
900
1067
  } | undefined;
901
1068
  readonly ephemeral?: boolean | undefined;
902
1069
  readonly id?: string | undefined;
@@ -946,6 +1113,27 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
946
1113
  } | undefined;
947
1114
  readonly input?: import("effect/Schema").Json | undefined;
948
1115
  }, import("./definitions-store").WorkflowDefinitionsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1116
+ readonly type: "runtime.effect.retry.scheduled";
1117
+ readonly payload: {
1118
+ readonly effectId: string;
1119
+ readonly attempt: number;
1120
+ readonly nextAttemptAt: number;
1121
+ readonly error: string;
1122
+ };
1123
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1124
+ readonly type: "runtime.child.close.requested";
1125
+ readonly payload: {
1126
+ readonly policy: "terminate" | "wait";
1127
+ };
1128
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1129
+ readonly type: "runtime.child.settled";
1130
+ readonly payload: {
1131
+ readonly runId: string;
1132
+ readonly status: "cancelled" | "completed" | "failed";
1133
+ readonly output: import("effect/Schema").Json;
1134
+ readonly error: string | null;
1135
+ };
1136
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
949
1137
  readonly type: "runtime.effect.ambiguous";
950
1138
  readonly payload: {
951
1139
  readonly effectId: string;
@@ -989,6 +1177,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
989
1177
  readonly payload: {
990
1178
  readonly effectId: string;
991
1179
  readonly error: string;
1180
+ readonly nonRetryable?: boolean | undefined;
1181
+ readonly retryAfterMs?: number | undefined;
992
1182
  };
993
1183
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
994
1184
  readonly type: "runtime.effect.heartbeat";
@@ -997,6 +1187,7 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
997
1187
  readonly attempt: number;
998
1188
  readonly heartbeatAt: number;
999
1189
  readonly deadlineAt: number | null;
1190
+ readonly details?: import("effect/Schema").Json | undefined;
1000
1191
  };
1001
1192
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1002
1193
  readonly type: "runtime.effect.queued";
@@ -1005,14 +1196,6 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1005
1196
  readonly attempt: number;
1006
1197
  readonly deadlineAt: number | null;
1007
1198
  };
1008
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1009
- readonly type: "runtime.effect.retry.scheduled";
1010
- readonly payload: {
1011
- readonly effectId: string;
1012
- readonly attempt: number;
1013
- readonly nextAttemptAt: number;
1014
- readonly error: string;
1015
- };
1016
1199
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1017
1200
  readonly type: "runtime.effect.timed_out";
1018
1201
  readonly payload: {
@@ -1049,6 +1232,16 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1049
1232
  readonly sourceRunId: string;
1050
1233
  readonly sourceSeq: number;
1051
1234
  };
1235
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1236
+ readonly type: "runtime.run.launched";
1237
+ readonly payload: {
1238
+ readonly runId: string;
1239
+ readonly kind: string;
1240
+ readonly definitionName: string;
1241
+ readonly definitionVersion: string;
1242
+ readonly effectId: string;
1243
+ readonly close: "terminate" | "wait";
1244
+ };
1052
1245
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1053
1246
  readonly type: "runtime.run.started";
1054
1247
  readonly payload: {
@@ -1058,6 +1251,20 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1058
1251
  readonly definitionVersion: string;
1059
1252
  readonly input: import("effect/Schema").Json;
1060
1253
  readonly requestedThreadId?: string | null | undefined;
1254
+ readonly launchedBy?: {
1255
+ readonly runId: string;
1256
+ readonly threadId: string;
1257
+ readonly effectId: string;
1258
+ readonly causationId: string;
1259
+ readonly causationSeq: number;
1260
+ } | undefined;
1261
+ readonly attributes?: {
1262
+ readonly [x: string]: string;
1263
+ } | undefined;
1264
+ readonly trace?: {
1265
+ readonly traceparent: string;
1266
+ readonly tracestate?: string | undefined;
1267
+ } | undefined;
1061
1268
  };
1062
1269
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1063
1270
  readonly type: "runtime.signal.received";
@@ -1181,6 +1388,9 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1181
1388
  readonly actorId?: string | undefined;
1182
1389
  } | {
1183
1390
  readonly type: "system";
1391
+ } | {
1392
+ readonly type: "run";
1393
+ readonly runId: string;
1184
1394
  } | undefined;
1185
1395
  readonly ephemeral?: boolean | undefined;
1186
1396
  readonly id?: string | undefined;
@@ -1198,10 +1408,24 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1198
1408
  readonly type: "runtime.cancel";
1199
1409
  readonly threadId: string;
1200
1410
  readonly tag?: string | undefined;
1411
+ } | {
1412
+ readonly type: "runtime.launch";
1413
+ readonly runId: string;
1414
+ readonly kind: string;
1415
+ readonly definitionName: string;
1416
+ readonly definitionVersion: string;
1417
+ readonly input: import("effect/Schema").Json;
1418
+ readonly close: "terminate" | "wait";
1419
+ readonly tag?: string | undefined;
1420
+ } | {
1421
+ readonly type: "runtime.cancelRun";
1422
+ readonly runId: string;
1423
+ readonly tag?: string | undefined;
1201
1424
  } | {
1202
1425
  readonly type: string;
1203
1426
  readonly input: import("effect/Schema").Json;
1204
1427
  readonly tag?: string | undefined;
1428
+ readonly at?: number | undefined;
1205
1429
  })[];
1206
1430
  };
1207
1431
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
@@ -1215,6 +1439,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1215
1439
  readonly items: readonly import("effect/Schema").Json[];
1216
1440
  readonly concurrency: number;
1217
1441
  readonly limitBytes: number;
1442
+ readonly execution: "run" | "thread";
1443
+ readonly close: "terminate" | "wait";
1218
1444
  };
1219
1445
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1220
1446
  readonly type: "workflow.node.finished";
@@ -1254,6 +1480,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1254
1480
  readonly definitionVersion: string;
1255
1481
  readonly input: import("effect/Schema").Json;
1256
1482
  readonly loopIndex: number | null;
1483
+ readonly execution: "run" | "thread";
1484
+ readonly close: "terminate" | "wait";
1257
1485
  };
1258
1486
  })>;
1259
1487
  runNode: import("@swirls/looms/core").EffectDefinition<{
@@ -1281,6 +1509,27 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1281
1509
  };
1282
1510
  } | undefined;
1283
1511
  }, import("./definitions-store").WorkflowDefinitionsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1512
+ readonly type: "runtime.effect.retry.scheduled";
1513
+ readonly payload: {
1514
+ readonly effectId: string;
1515
+ readonly attempt: number;
1516
+ readonly nextAttemptAt: number;
1517
+ readonly error: string;
1518
+ };
1519
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1520
+ readonly type: "runtime.child.close.requested";
1521
+ readonly payload: {
1522
+ readonly policy: "terminate" | "wait";
1523
+ };
1524
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1525
+ readonly type: "runtime.child.settled";
1526
+ readonly payload: {
1527
+ readonly runId: string;
1528
+ readonly status: "cancelled" | "completed" | "failed";
1529
+ readonly output: import("effect/Schema").Json;
1530
+ readonly error: string | null;
1531
+ };
1532
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1284
1533
  readonly type: "runtime.effect.ambiguous";
1285
1534
  readonly payload: {
1286
1535
  readonly effectId: string;
@@ -1324,6 +1573,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1324
1573
  readonly payload: {
1325
1574
  readonly effectId: string;
1326
1575
  readonly error: string;
1576
+ readonly nonRetryable?: boolean | undefined;
1577
+ readonly retryAfterMs?: number | undefined;
1327
1578
  };
1328
1579
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1329
1580
  readonly type: "runtime.effect.heartbeat";
@@ -1332,6 +1583,7 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1332
1583
  readonly attempt: number;
1333
1584
  readonly heartbeatAt: number;
1334
1585
  readonly deadlineAt: number | null;
1586
+ readonly details?: import("effect/Schema").Json | undefined;
1335
1587
  };
1336
1588
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1337
1589
  readonly type: "runtime.effect.queued";
@@ -1340,14 +1592,6 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1340
1592
  readonly attempt: number;
1341
1593
  readonly deadlineAt: number | null;
1342
1594
  };
1343
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1344
- readonly type: "runtime.effect.retry.scheduled";
1345
- readonly payload: {
1346
- readonly effectId: string;
1347
- readonly attempt: number;
1348
- readonly nextAttemptAt: number;
1349
- readonly error: string;
1350
- };
1351
1595
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1352
1596
  readonly type: "runtime.effect.timed_out";
1353
1597
  readonly payload: {
@@ -1384,6 +1628,16 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1384
1628
  readonly sourceRunId: string;
1385
1629
  readonly sourceSeq: number;
1386
1630
  };
1631
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1632
+ readonly type: "runtime.run.launched";
1633
+ readonly payload: {
1634
+ readonly runId: string;
1635
+ readonly kind: string;
1636
+ readonly definitionName: string;
1637
+ readonly definitionVersion: string;
1638
+ readonly effectId: string;
1639
+ readonly close: "terminate" | "wait";
1640
+ };
1387
1641
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1388
1642
  readonly type: "runtime.run.started";
1389
1643
  readonly payload: {
@@ -1393,6 +1647,20 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1393
1647
  readonly definitionVersion: string;
1394
1648
  readonly input: import("effect/Schema").Json;
1395
1649
  readonly requestedThreadId?: string | null | undefined;
1650
+ readonly launchedBy?: {
1651
+ readonly runId: string;
1652
+ readonly threadId: string;
1653
+ readonly effectId: string;
1654
+ readonly causationId: string;
1655
+ readonly causationSeq: number;
1656
+ } | undefined;
1657
+ readonly attributes?: {
1658
+ readonly [x: string]: string;
1659
+ } | undefined;
1660
+ readonly trace?: {
1661
+ readonly traceparent: string;
1662
+ readonly tracestate?: string | undefined;
1663
+ } | undefined;
1396
1664
  };
1397
1665
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1398
1666
  readonly type: "runtime.signal.received";
@@ -1516,6 +1784,9 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1516
1784
  readonly actorId?: string | undefined;
1517
1785
  } | {
1518
1786
  readonly type: "system";
1787
+ } | {
1788
+ readonly type: "run";
1789
+ readonly runId: string;
1519
1790
  } | undefined;
1520
1791
  readonly ephemeral?: boolean | undefined;
1521
1792
  readonly id?: string | undefined;
@@ -1533,10 +1804,24 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1533
1804
  readonly type: "runtime.cancel";
1534
1805
  readonly threadId: string;
1535
1806
  readonly tag?: string | undefined;
1807
+ } | {
1808
+ readonly type: "runtime.launch";
1809
+ readonly runId: string;
1810
+ readonly kind: string;
1811
+ readonly definitionName: string;
1812
+ readonly definitionVersion: string;
1813
+ readonly input: import("effect/Schema").Json;
1814
+ readonly close: "terminate" | "wait";
1815
+ readonly tag?: string | undefined;
1816
+ } | {
1817
+ readonly type: "runtime.cancelRun";
1818
+ readonly runId: string;
1819
+ readonly tag?: string | undefined;
1536
1820
  } | {
1537
1821
  readonly type: string;
1538
1822
  readonly input: import("effect/Schema").Json;
1539
1823
  readonly tag?: string | undefined;
1824
+ readonly at?: number | undefined;
1540
1825
  })[];
1541
1826
  };
1542
1827
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
@@ -1550,6 +1835,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1550
1835
  readonly items: readonly import("effect/Schema").Json[];
1551
1836
  readonly concurrency: number;
1552
1837
  readonly limitBytes: number;
1838
+ readonly execution: "run" | "thread";
1839
+ readonly close: "terminate" | "wait";
1553
1840
  };
1554
1841
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1555
1842
  readonly type: "workflow.node.finished";
@@ -1589,6 +1876,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1589
1876
  readonly definitionVersion: string;
1590
1877
  readonly input: import("effect/Schema").Json;
1591
1878
  readonly loopIndex: number | null;
1879
+ readonly execution: "run" | "thread";
1880
+ readonly close: "terminate" | "wait";
1592
1881
  };
1593
1882
  })>;
1594
1883
  };
@@ -1624,6 +1913,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1624
1913
  readonly attempt: number;
1625
1914
  readonly input: import("effect/Schema").Json;
1626
1915
  readonly loopIndex: number | null;
1916
+ readonly execution: "run" | "thread";
1917
+ readonly close: "terminate" | "wait";
1627
1918
  }[];
1628
1919
  readonly pendingMaps: {
1629
1920
  readonly nodeId: string;
@@ -1638,6 +1929,8 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1638
1929
  readonly outputs: {
1639
1930
  readonly [x: string]: import("effect/Schema").Json;
1640
1931
  };
1932
+ readonly execution: "run" | "thread";
1933
+ readonly close: "terminate" | "wait";
1641
1934
  }[];
1642
1935
  readonly pendingSleeps: {
1643
1936
  readonly waitId: string;
@@ -1681,6 +1974,9 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1681
1974
  readonly actorId?: string | undefined;
1682
1975
  } | {
1683
1976
  readonly type: "system";
1977
+ } | {
1978
+ readonly type: "run";
1979
+ readonly runId: string;
1684
1980
  } | undefined;
1685
1981
  readonly ephemeral?: boolean | undefined;
1686
1982
  readonly id?: string | undefined;
@@ -1698,10 +1994,24 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1698
1994
  readonly type: "runtime.cancel";
1699
1995
  readonly threadId: string;
1700
1996
  readonly tag?: string | undefined;
1997
+ } | {
1998
+ readonly type: "runtime.launch";
1999
+ readonly runId: string;
2000
+ readonly kind: string;
2001
+ readonly definitionName: string;
2002
+ readonly definitionVersion: string;
2003
+ readonly input: import("effect/Schema").Json;
2004
+ readonly close: "terminate" | "wait";
2005
+ readonly tag?: string | undefined;
2006
+ } | {
2007
+ readonly type: "runtime.cancelRun";
2008
+ readonly runId: string;
2009
+ readonly tag?: string | undefined;
1701
2010
  } | {
1702
2011
  readonly type: string;
1703
2012
  readonly input: import("effect/Schema").Json;
1704
2013
  readonly tag?: string | undefined;
2014
+ readonly at?: number | undefined;
1705
2015
  })[];
1706
2016
  }[];
1707
2017
  readonly pendingEmits: {
@@ -1722,6 +2032,9 @@ export declare function workflow(options?: WorkflowModuleOptions): import("@swir
1722
2032
  readonly actorId?: string | undefined;
1723
2033
  } | {
1724
2034
  readonly type: "system";
2035
+ } | {
2036
+ readonly type: "run";
2037
+ readonly runId: string;
1725
2038
  } | undefined;
1726
2039
  readonly ephemeral?: boolean | undefined;
1727
2040
  readonly id?: string | undefined;