@swirls/looms 0.6.0 → 0.7.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 (75) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/actor/cell.d.ts +1 -1
  3. package/dist/actor/routing.d.ts +5 -1
  4. package/dist/actor/routing.js +14 -3
  5. package/dist/agent/effects.d.ts +20 -2
  6. package/dist/agent/effects.js +2 -0
  7. package/dist/agent/module.d.ts +540 -504
  8. package/dist/approval/effects.d.ts +36 -27
  9. package/dist/approval/effects.js +1 -0
  10. package/dist/approval/module.d.ts +20 -2
  11. package/dist/client/client.d.ts +38 -10
  12. package/dist/client/client.js +2 -1
  13. package/dist/cloudflare/durable-object.d.ts +1 -1
  14. package/dist/cloudflare/index.d.ts +1 -1
  15. package/dist/cloudflare/index.js +1 -1
  16. package/dist/cloudflare/queue-consumer.d.ts +17 -10
  17. package/dist/cloudflare/queue-consumer.js +63 -27
  18. package/dist/cloudflare/queue-message.d.ts +4 -1
  19. package/dist/cloudflare/queue-message.js +4 -1
  20. package/dist/cloudflare/queue-worker.d.ts +7 -3
  21. package/dist/cloudflare/queue-worker.js +7 -2
  22. package/dist/cloudflare/queues.d.ts +1 -1
  23. package/dist/cloudflare/queues.js +1 -1
  24. package/dist/core/compose.d.ts +2 -1
  25. package/dist/core/compose.js +5 -0
  26. package/dist/core/effects.d.ts +84 -39
  27. package/dist/core/effects.js +29 -8
  28. package/dist/core/fold.js +87 -14
  29. package/dist/core/module-scope.d.ts +22 -8
  30. package/dist/core/module-scope.js +3 -0
  31. package/dist/core/module.d.ts +40 -9
  32. package/dist/core/module.js +25 -6
  33. package/dist/core/protocol.d.ts +12 -1
  34. package/dist/core/protocol.js +12 -0
  35. package/dist/core/published.d.ts +52 -0
  36. package/dist/core/published.js +45 -0
  37. package/dist/core/replay.d.ts +4 -2
  38. package/dist/core/state.d.ts +8 -2
  39. package/dist/core/state.js +2 -0
  40. package/dist/debugger/app/assets/{index-CUO1xyYW.js → index-CMRl_aWQ.js} +2 -2
  41. package/dist/debugger/app/assets/routes-CfXxKG45.js +47 -0
  42. package/dist/debugger/app/index.html +1 -1
  43. package/dist/debugger/events/protocol-summarize.js +2 -0
  44. package/dist/evaluator/effects.d.ts +10 -1
  45. package/dist/evaluator/effects.js +1 -0
  46. package/dist/evaluator/module.d.ts +20 -2
  47. package/dist/runtime/cancellation.js +1 -1
  48. package/dist/runtime/dispatch-effect.d.ts +2 -2
  49. package/dist/runtime/dispatch-effect.js +12 -4
  50. package/dist/runtime/effect-admission.d.ts +45 -0
  51. package/dist/runtime/effect-admission.js +70 -0
  52. package/dist/runtime/helpers.d.ts +6 -1
  53. package/dist/runtime/helpers.js +14 -5
  54. package/dist/runtime/index.d.ts +1 -0
  55. package/dist/runtime/index.js +1 -0
  56. package/dist/runtime/local-effect-executor.js +30 -8
  57. package/dist/runtime/retry-policy.js +6 -1
  58. package/dist/runtime/runtime.js +7 -2
  59. package/dist/runtime/server/routes/definitions.js +8 -1
  60. package/dist/runtime/types.d.ts +20 -5
  61. package/dist/runtime/wake-engine.js +20 -0
  62. package/dist/runtime/worker-callbacks.js +2 -2
  63. package/dist/runtime/worker-effect-dispatch.d.ts +35 -9
  64. package/dist/runtime/worker-effect-dispatch.js +105 -26
  65. package/dist/schedule/effects.d.ts +20 -2
  66. package/dist/schedule/effects.js +2 -0
  67. package/dist/schedule/module.d.ts +40 -4
  68. package/dist/testing/corpus-module.d.ts +2 -2
  69. package/dist/testing/corpus-module.js +27 -19
  70. package/dist/testing/index.js +12 -23
  71. package/dist/workflow/effects.d.ts +20 -2
  72. package/dist/workflow/effects.js +2 -0
  73. package/dist/workflow/module.d.ts +40 -4
  74. package/package.json +1 -1
  75. package/dist/debugger/app/assets/routes-lt_6J025.js +0 -47
@@ -215,7 +215,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
215
215
  readonly output: import("effect/Schema").Finite;
216
216
  }>;
217
217
  }>, {
218
- callLLM: import("@swirls/looms/core").EffectDefinition<{
218
+ callLLM: import("@swirls/looms/core").LocalEffectDefinition<{
219
219
  readonly turn: number;
220
220
  readonly definitionName?: string | undefined;
221
221
  readonly definitionVersion: string;
@@ -235,243 +235,6 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
235
235
  readonly alreadyCompacted?: boolean | undefined;
236
236
  readonly consumedSteerMessageIds?: readonly string[] | undefined;
237
237
  }, import("./definitions-store").AgentDefinitionsTag | LlmTag, (Omit<EventInput, "payload" | "type"> & {
238
- readonly type: "runtime.child.close.requested";
239
- readonly payload: {
240
- readonly policy: "terminate" | "wait";
241
- };
242
- }) | (Omit<EventInput, "payload" | "type"> & {
243
- readonly type: "runtime.child.settled";
244
- readonly payload: {
245
- readonly runId: string;
246
- readonly status: "cancelled" | "completed" | "failed";
247
- readonly output: import("effect/Schema").Json;
248
- readonly error: string | null;
249
- };
250
- }) | (Omit<EventInput, "payload" | "type"> & {
251
- readonly type: "runtime.effect.ambiguous";
252
- readonly payload: {
253
- readonly effectId: string;
254
- readonly attempt: number;
255
- readonly error: string;
256
- };
257
- }) | (Omit<EventInput, "payload" | "type"> & {
258
- readonly type: "runtime.effect.attempt.started";
259
- readonly payload: {
260
- readonly effectId: string;
261
- readonly attempt: number;
262
- };
263
- }) | (Omit<EventInput, "payload" | "type"> & {
264
- readonly type: "runtime.effect.cancel.requested";
265
- readonly payload: {
266
- readonly effectId: string;
267
- readonly attempt: number;
268
- readonly deadlineAt: number | null;
269
- };
270
- }) | (Omit<EventInput, "payload" | "type"> & {
271
- readonly type: "runtime.effect.cancelled";
272
- readonly payload: {
273
- readonly effectId: string;
274
- readonly attempt: number;
275
- };
276
- }) | (Omit<EventInput, "payload" | "type"> & {
277
- readonly type: "runtime.effect.completed";
278
- readonly payload: {
279
- readonly effectId: string;
280
- readonly attempt: number;
281
- };
282
- }) | (Omit<EventInput, "payload" | "type"> & {
283
- readonly type: "runtime.effect.dispatched";
284
- readonly payload: {
285
- readonly effectId: string;
286
- readonly attempt: number;
287
- readonly deadlineAt: number | null;
288
- };
289
- }) | (Omit<EventInput, "payload" | "type"> & {
290
- readonly type: "runtime.effect.failed";
291
- readonly payload: {
292
- readonly effectId: string;
293
- readonly error: string;
294
- readonly nonRetryable?: boolean | undefined;
295
- readonly retryAfterMs?: number | undefined;
296
- };
297
- }) | (Omit<EventInput, "payload" | "type"> & {
298
- readonly type: "runtime.effect.heartbeat";
299
- readonly payload: {
300
- readonly effectId: string;
301
- readonly attempt: number;
302
- readonly heartbeatAt: number;
303
- readonly deadlineAt: number | null;
304
- readonly details?: import("effect/Schema").Json | undefined;
305
- };
306
- }) | (Omit<EventInput, "payload" | "type"> & {
307
- readonly type: "runtime.effect.queued";
308
- readonly payload: {
309
- readonly effectId: string;
310
- readonly attempt: number;
311
- readonly deadlineAt: number | null;
312
- };
313
- }) | (Omit<EventInput, "payload" | "type"> & {
314
- readonly type: "runtime.effect.retry.scheduled";
315
- readonly payload: {
316
- readonly effectId: string;
317
- readonly attempt: number;
318
- readonly nextAttemptAt: number;
319
- readonly error: string;
320
- };
321
- }) | (Omit<EventInput, "payload" | "type"> & {
322
- readonly type: "runtime.effect.timed_out";
323
- readonly payload: {
324
- readonly effectId: string;
325
- readonly attempt: number;
326
- readonly timeout: string;
327
- };
328
- }) | (Omit<EventInput, "payload" | "type"> & {
329
- readonly type: "runtime.effect.worker.started";
330
- readonly payload: {
331
- readonly effectId: string;
332
- readonly attempt: number;
333
- readonly deadlineAt: number | null;
334
- };
335
- }) | (Omit<EventInput, "payload" | "type"> & {
336
- readonly type: "runtime.fork.elided";
337
- readonly payload: {
338
- readonly type: string;
339
- };
340
- }) | (Omit<EventInput, "payload" | "type"> & {
341
- readonly type: "runtime.run.cancelled";
342
- readonly payload: {
343
- readonly reason?: string | undefined;
344
- };
345
- }) | (Omit<EventInput, "payload" | "type"> & {
346
- readonly type: "runtime.run.completed";
347
- readonly payload: {
348
- readonly output: import("effect/Schema").Json;
349
- readonly error: string | null;
350
- };
351
- }) | (Omit<EventInput, "payload" | "type"> & {
352
- readonly type: "runtime.run.forked";
353
- readonly payload: {
354
- readonly sourceRunId: string;
355
- readonly sourceSeq: number;
356
- };
357
- }) | (Omit<EventInput, "payload" | "type"> & {
358
- readonly type: "runtime.run.launched";
359
- readonly payload: {
360
- readonly runId: string;
361
- readonly kind: string;
362
- readonly definitionName: string;
363
- readonly definitionVersion: string;
364
- readonly effectId: string;
365
- readonly close: "terminate" | "wait";
366
- };
367
- }) | (Omit<EventInput, "payload" | "type"> & {
368
- readonly type: "runtime.run.started";
369
- readonly payload: {
370
- readonly rootThreadId?: string | undefined;
371
- readonly kind: string;
372
- readonly definitionName: string;
373
- readonly definitionVersion: string;
374
- readonly input: import("effect/Schema").Json;
375
- readonly requestedThreadId?: string | null | undefined;
376
- readonly launchedBy?: {
377
- readonly runId: string;
378
- readonly threadId: string;
379
- readonly effectId: string;
380
- readonly causationId: string;
381
- readonly causationSeq: number;
382
- } | undefined;
383
- readonly attributes?: {
384
- readonly [x: string]: string;
385
- } | undefined;
386
- readonly trace?: {
387
- readonly traceparent: string;
388
- readonly tracestate?: string | undefined;
389
- } | undefined;
390
- };
391
- }) | (Omit<EventInput, "payload" | "type"> & {
392
- readonly type: "runtime.signal.received";
393
- readonly payload: {
394
- readonly signalType: string;
395
- };
396
- }) | (Omit<EventInput, "payload" | "type"> & {
397
- readonly type: "runtime.snapshot.taken";
398
- readonly payload: {
399
- readonly seq: number;
400
- readonly stateHash: string;
401
- readonly state?: import("effect/Schema").Json | undefined;
402
- };
403
- }) | (Omit<EventInput, "payload" | "type"> & {
404
- readonly type: "runtime.thread.cancel.requested";
405
- readonly payload: {
406
- readonly threadId: string;
407
- };
408
- }) | (Omit<EventInput, "payload" | "type"> & {
409
- readonly type: "runtime.thread.cancelled";
410
- readonly payload: {
411
- readonly threadId: string;
412
- readonly reason?: string | undefined;
413
- readonly resumeSeq?: number | undefined;
414
- };
415
- }) | (Omit<EventInput, "payload" | "type"> & {
416
- readonly type: "runtime.thread.completed";
417
- readonly payload: {
418
- readonly threadId: string;
419
- readonly output: import("effect/Schema").Json;
420
- };
421
- }) | (Omit<EventInput, "payload" | "type"> & {
422
- readonly type: "runtime.thread.failed";
423
- readonly payload: {
424
- readonly threadId: string;
425
- readonly error: string;
426
- };
427
- }) | (Omit<EventInput, "payload" | "type"> & {
428
- readonly type: "runtime.thread.started";
429
- readonly payload: {
430
- readonly threadId: string;
431
- readonly kind: string;
432
- readonly definitionName: string;
433
- readonly definitionVersion: string;
434
- readonly input: import("effect/Schema").Json;
435
- readonly parentThreadId: string | null;
436
- };
437
- }) | (Omit<EventInput, "payload" | "type"> & {
438
- readonly type: "runtime.timer.fired";
439
- readonly payload: {
440
- readonly timerId: string;
441
- readonly waitId: string;
442
- };
443
- }) | (Omit<EventInput, "payload" | "type"> & {
444
- readonly type: "runtime.timer.set";
445
- readonly payload: {
446
- readonly timerId: string;
447
- readonly waitId: string;
448
- readonly wakeAt: number;
449
- };
450
- }) | (Omit<EventInput, "payload" | "type"> & {
451
- readonly type: "runtime.wait.registered";
452
- readonly payload: {
453
- readonly waitId: string;
454
- readonly threadId?: string | undefined;
455
- readonly on: {
456
- readonly type: string | readonly string[];
457
- readonly match?: import("effect/Schema").Json | undefined;
458
- } | {
459
- readonly timerAt: number;
460
- };
461
- readonly tag?: import("effect/Schema").Json | undefined;
462
- };
463
- }) | (Omit<EventInput, "payload" | "type"> & {
464
- readonly type: "runtime.wait.satisfied";
465
- readonly payload: {
466
- readonly waitId: string;
467
- readonly tag?: import("effect/Schema").Json | undefined;
468
- readonly event: {
469
- readonly id: string;
470
- readonly type: string;
471
- readonly payload: import("effect/Schema").Json;
472
- };
473
- };
474
- }) | (Omit<EventInput, "payload" | "type"> & {
475
238
  readonly type: "agent.context.compacted";
476
239
  readonly payload: {
477
240
  readonly turn: number;
@@ -713,19 +476,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
713
476
  readonly input: number;
714
477
  readonly output: number;
715
478
  };
716
- })>;
717
- executeTool: import("@swirls/looms/core").EffectDefinition<{
718
- readonly turn: number;
719
- readonly definitionName?: string | undefined;
720
- readonly definitionVersion: string;
721
- readonly toolCall: {
722
- readonly id: string;
723
- readonly name: string;
724
- readonly arguments: import("effect/Schema").Json;
725
- };
726
- readonly input?: import("effect/Schema").Json | undefined;
727
- readonly depth?: number | undefined;
728
- }, import("./definitions-store").AgentDefinitionsTag, (Omit<EventInput, "payload" | "type"> & {
479
+ }) | (Omit<EventInput, "payload" | "type"> & {
729
480
  readonly type: "runtime.child.close.requested";
730
481
  readonly payload: {
731
482
  readonly policy: "terminate" | "wait";
@@ -770,6 +521,15 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
770
521
  readonly effectId: string;
771
522
  readonly attempt: number;
772
523
  };
524
+ }) | (Omit<EventInput, "payload" | "type"> & {
525
+ readonly type: "runtime.effect.dispatch.deferred";
526
+ readonly payload: {
527
+ readonly effectId: string;
528
+ readonly attempt: number;
529
+ readonly retryAt: number;
530
+ readonly error: string;
531
+ readonly try: number;
532
+ };
773
533
  }) | (Omit<EventInput, "payload" | "type"> & {
774
534
  readonly type: "runtime.effect.dispatched";
775
535
  readonly payload: {
@@ -962,7 +722,19 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
962
722
  readonly payload: import("effect/Schema").Json;
963
723
  };
964
724
  };
965
- }) | (Omit<EventInput, "payload" | "type"> & {
725
+ })>;
726
+ executeTool: import("@swirls/looms/core").LocalEffectDefinition<{
727
+ readonly turn: number;
728
+ readonly definitionName?: string | undefined;
729
+ readonly definitionVersion: string;
730
+ readonly toolCall: {
731
+ readonly id: string;
732
+ readonly name: string;
733
+ readonly arguments: import("effect/Schema").Json;
734
+ };
735
+ readonly input?: import("effect/Schema").Json | undefined;
736
+ readonly depth?: number | undefined;
737
+ }, import("./definitions-store").AgentDefinitionsTag, (Omit<EventInput, "payload" | "type"> & {
966
738
  readonly type: "agent.context.compacted";
967
739
  readonly payload: {
968
740
  readonly turn: number;
@@ -1204,6 +976,252 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1204
976
  readonly input: number;
1205
977
  readonly output: number;
1206
978
  };
979
+ }) | (Omit<EventInput, "payload" | "type"> & {
980
+ readonly type: "runtime.child.close.requested";
981
+ readonly payload: {
982
+ readonly policy: "terminate" | "wait";
983
+ };
984
+ }) | (Omit<EventInput, "payload" | "type"> & {
985
+ readonly type: "runtime.child.settled";
986
+ readonly payload: {
987
+ readonly runId: string;
988
+ readonly status: "cancelled" | "completed" | "failed";
989
+ readonly output: import("effect/Schema").Json;
990
+ readonly error: string | null;
991
+ };
992
+ }) | (Omit<EventInput, "payload" | "type"> & {
993
+ readonly type: "runtime.effect.ambiguous";
994
+ readonly payload: {
995
+ readonly effectId: string;
996
+ readonly attempt: number;
997
+ readonly error: string;
998
+ };
999
+ }) | (Omit<EventInput, "payload" | "type"> & {
1000
+ readonly type: "runtime.effect.attempt.started";
1001
+ readonly payload: {
1002
+ readonly effectId: string;
1003
+ readonly attempt: number;
1004
+ };
1005
+ }) | (Omit<EventInput, "payload" | "type"> & {
1006
+ readonly type: "runtime.effect.cancel.requested";
1007
+ readonly payload: {
1008
+ readonly effectId: string;
1009
+ readonly attempt: number;
1010
+ readonly deadlineAt: number | null;
1011
+ };
1012
+ }) | (Omit<EventInput, "payload" | "type"> & {
1013
+ readonly type: "runtime.effect.cancelled";
1014
+ readonly payload: {
1015
+ readonly effectId: string;
1016
+ readonly attempt: number;
1017
+ };
1018
+ }) | (Omit<EventInput, "payload" | "type"> & {
1019
+ readonly type: "runtime.effect.completed";
1020
+ readonly payload: {
1021
+ readonly effectId: string;
1022
+ readonly attempt: number;
1023
+ };
1024
+ }) | (Omit<EventInput, "payload" | "type"> & {
1025
+ readonly type: "runtime.effect.dispatch.deferred";
1026
+ readonly payload: {
1027
+ readonly effectId: string;
1028
+ readonly attempt: number;
1029
+ readonly retryAt: number;
1030
+ readonly error: string;
1031
+ readonly try: number;
1032
+ };
1033
+ }) | (Omit<EventInput, "payload" | "type"> & {
1034
+ readonly type: "runtime.effect.dispatched";
1035
+ readonly payload: {
1036
+ readonly effectId: string;
1037
+ readonly attempt: number;
1038
+ readonly deadlineAt: number | null;
1039
+ };
1040
+ }) | (Omit<EventInput, "payload" | "type"> & {
1041
+ readonly type: "runtime.effect.failed";
1042
+ readonly payload: {
1043
+ readonly effectId: string;
1044
+ readonly error: string;
1045
+ readonly nonRetryable?: boolean | undefined;
1046
+ readonly retryAfterMs?: number | undefined;
1047
+ };
1048
+ }) | (Omit<EventInput, "payload" | "type"> & {
1049
+ readonly type: "runtime.effect.heartbeat";
1050
+ readonly payload: {
1051
+ readonly effectId: string;
1052
+ readonly attempt: number;
1053
+ readonly heartbeatAt: number;
1054
+ readonly deadlineAt: number | null;
1055
+ readonly details?: import("effect/Schema").Json | undefined;
1056
+ };
1057
+ }) | (Omit<EventInput, "payload" | "type"> & {
1058
+ readonly type: "runtime.effect.queued";
1059
+ readonly payload: {
1060
+ readonly effectId: string;
1061
+ readonly attempt: number;
1062
+ readonly deadlineAt: number | null;
1063
+ };
1064
+ }) | (Omit<EventInput, "payload" | "type"> & {
1065
+ readonly type: "runtime.effect.retry.scheduled";
1066
+ readonly payload: {
1067
+ readonly effectId: string;
1068
+ readonly attempt: number;
1069
+ readonly nextAttemptAt: number;
1070
+ readonly error: string;
1071
+ };
1072
+ }) | (Omit<EventInput, "payload" | "type"> & {
1073
+ readonly type: "runtime.effect.timed_out";
1074
+ readonly payload: {
1075
+ readonly effectId: string;
1076
+ readonly attempt: number;
1077
+ readonly timeout: string;
1078
+ };
1079
+ }) | (Omit<EventInput, "payload" | "type"> & {
1080
+ readonly type: "runtime.effect.worker.started";
1081
+ readonly payload: {
1082
+ readonly effectId: string;
1083
+ readonly attempt: number;
1084
+ readonly deadlineAt: number | null;
1085
+ };
1086
+ }) | (Omit<EventInput, "payload" | "type"> & {
1087
+ readonly type: "runtime.fork.elided";
1088
+ readonly payload: {
1089
+ readonly type: string;
1090
+ };
1091
+ }) | (Omit<EventInput, "payload" | "type"> & {
1092
+ readonly type: "runtime.run.cancelled";
1093
+ readonly payload: {
1094
+ readonly reason?: string | undefined;
1095
+ };
1096
+ }) | (Omit<EventInput, "payload" | "type"> & {
1097
+ readonly type: "runtime.run.completed";
1098
+ readonly payload: {
1099
+ readonly output: import("effect/Schema").Json;
1100
+ readonly error: string | null;
1101
+ };
1102
+ }) | (Omit<EventInput, "payload" | "type"> & {
1103
+ readonly type: "runtime.run.forked";
1104
+ readonly payload: {
1105
+ readonly sourceRunId: string;
1106
+ readonly sourceSeq: number;
1107
+ };
1108
+ }) | (Omit<EventInput, "payload" | "type"> & {
1109
+ readonly type: "runtime.run.launched";
1110
+ readonly payload: {
1111
+ readonly runId: string;
1112
+ readonly kind: string;
1113
+ readonly definitionName: string;
1114
+ readonly definitionVersion: string;
1115
+ readonly effectId: string;
1116
+ readonly close: "terminate" | "wait";
1117
+ };
1118
+ }) | (Omit<EventInput, "payload" | "type"> & {
1119
+ readonly type: "runtime.run.started";
1120
+ readonly payload: {
1121
+ readonly rootThreadId?: string | undefined;
1122
+ readonly kind: string;
1123
+ readonly definitionName: string;
1124
+ readonly definitionVersion: string;
1125
+ readonly input: import("effect/Schema").Json;
1126
+ readonly requestedThreadId?: string | null | undefined;
1127
+ readonly launchedBy?: {
1128
+ readonly runId: string;
1129
+ readonly threadId: string;
1130
+ readonly effectId: string;
1131
+ readonly causationId: string;
1132
+ readonly causationSeq: number;
1133
+ } | undefined;
1134
+ readonly attributes?: {
1135
+ readonly [x: string]: string;
1136
+ } | undefined;
1137
+ readonly trace?: {
1138
+ readonly traceparent: string;
1139
+ readonly tracestate?: string | undefined;
1140
+ } | undefined;
1141
+ };
1142
+ }) | (Omit<EventInput, "payload" | "type"> & {
1143
+ readonly type: "runtime.signal.received";
1144
+ readonly payload: {
1145
+ readonly signalType: string;
1146
+ };
1147
+ }) | (Omit<EventInput, "payload" | "type"> & {
1148
+ readonly type: "runtime.snapshot.taken";
1149
+ readonly payload: {
1150
+ readonly seq: number;
1151
+ readonly stateHash: string;
1152
+ readonly state?: import("effect/Schema").Json | undefined;
1153
+ };
1154
+ }) | (Omit<EventInput, "payload" | "type"> & {
1155
+ readonly type: "runtime.thread.cancel.requested";
1156
+ readonly payload: {
1157
+ readonly threadId: string;
1158
+ };
1159
+ }) | (Omit<EventInput, "payload" | "type"> & {
1160
+ readonly type: "runtime.thread.cancelled";
1161
+ readonly payload: {
1162
+ readonly threadId: string;
1163
+ readonly reason?: string | undefined;
1164
+ readonly resumeSeq?: number | undefined;
1165
+ };
1166
+ }) | (Omit<EventInput, "payload" | "type"> & {
1167
+ readonly type: "runtime.thread.completed";
1168
+ readonly payload: {
1169
+ readonly threadId: string;
1170
+ readonly output: import("effect/Schema").Json;
1171
+ };
1172
+ }) | (Omit<EventInput, "payload" | "type"> & {
1173
+ readonly type: "runtime.thread.failed";
1174
+ readonly payload: {
1175
+ readonly threadId: string;
1176
+ readonly error: string;
1177
+ };
1178
+ }) | (Omit<EventInput, "payload" | "type"> & {
1179
+ readonly type: "runtime.thread.started";
1180
+ readonly payload: {
1181
+ readonly threadId: string;
1182
+ readonly kind: string;
1183
+ readonly definitionName: string;
1184
+ readonly definitionVersion: string;
1185
+ readonly input: import("effect/Schema").Json;
1186
+ readonly parentThreadId: string | null;
1187
+ };
1188
+ }) | (Omit<EventInput, "payload" | "type"> & {
1189
+ readonly type: "runtime.timer.fired";
1190
+ readonly payload: {
1191
+ readonly timerId: string;
1192
+ readonly waitId: string;
1193
+ };
1194
+ }) | (Omit<EventInput, "payload" | "type"> & {
1195
+ readonly type: "runtime.timer.set";
1196
+ readonly payload: {
1197
+ readonly timerId: string;
1198
+ readonly waitId: string;
1199
+ readonly wakeAt: number;
1200
+ };
1201
+ }) | (Omit<EventInput, "payload" | "type"> & {
1202
+ readonly type: "runtime.wait.registered";
1203
+ readonly payload: {
1204
+ readonly waitId: string;
1205
+ readonly threadId?: string | undefined;
1206
+ readonly on: {
1207
+ readonly type: string | readonly string[];
1208
+ readonly match?: import("effect/Schema").Json | undefined;
1209
+ } | {
1210
+ readonly timerAt: number;
1211
+ };
1212
+ readonly tag?: import("effect/Schema").Json | undefined;
1213
+ };
1214
+ }) | (Omit<EventInput, "payload" | "type"> & {
1215
+ readonly type: "runtime.wait.satisfied";
1216
+ readonly payload: {
1217
+ readonly waitId: string;
1218
+ readonly tag?: import("effect/Schema").Json | undefined;
1219
+ readonly event: {
1220
+ readonly id: string;
1221
+ readonly type: string;
1222
+ readonly payload: import("effect/Schema").Json;
1223
+ };
1224
+ };
1207
1225
  })>;
1208
1226
  }, {
1209
1227
  agent: import("@swirls/looms/core").ThreadDefinition<import("./types").AgentState>;
@@ -1232,7 +1250,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1232
1250
  }>;
1233
1251
  }, import("effect/Context").Service.Any> & {
1234
1252
  readonly effects: {
1235
- callLLM: import("@swirls/looms/core").EffectDefinition<{
1253
+ callLLM: import("@swirls/looms/core").LocalEffectDefinition<{
1236
1254
  readonly turn: number;
1237
1255
  readonly definitionName?: string | undefined;
1238
1256
  readonly definitionVersion: string;
@@ -1252,243 +1270,6 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1252
1270
  readonly alreadyCompacted?: boolean | undefined;
1253
1271
  readonly consumedSteerMessageIds?: readonly string[] | undefined;
1254
1272
  }, import("./definitions-store").AgentDefinitionsTag | LlmTag, (Omit<EventInput, "payload" | "type"> & {
1255
- readonly type: "runtime.child.close.requested";
1256
- readonly payload: {
1257
- readonly policy: "terminate" | "wait";
1258
- };
1259
- }) | (Omit<EventInput, "payload" | "type"> & {
1260
- readonly type: "runtime.child.settled";
1261
- readonly payload: {
1262
- readonly runId: string;
1263
- readonly status: "cancelled" | "completed" | "failed";
1264
- readonly output: import("effect/Schema").Json;
1265
- readonly error: string | null;
1266
- };
1267
- }) | (Omit<EventInput, "payload" | "type"> & {
1268
- readonly type: "runtime.effect.ambiguous";
1269
- readonly payload: {
1270
- readonly effectId: string;
1271
- readonly attempt: number;
1272
- readonly error: string;
1273
- };
1274
- }) | (Omit<EventInput, "payload" | "type"> & {
1275
- readonly type: "runtime.effect.attempt.started";
1276
- readonly payload: {
1277
- readonly effectId: string;
1278
- readonly attempt: number;
1279
- };
1280
- }) | (Omit<EventInput, "payload" | "type"> & {
1281
- readonly type: "runtime.effect.cancel.requested";
1282
- readonly payload: {
1283
- readonly effectId: string;
1284
- readonly attempt: number;
1285
- readonly deadlineAt: number | null;
1286
- };
1287
- }) | (Omit<EventInput, "payload" | "type"> & {
1288
- readonly type: "runtime.effect.cancelled";
1289
- readonly payload: {
1290
- readonly effectId: string;
1291
- readonly attempt: number;
1292
- };
1293
- }) | (Omit<EventInput, "payload" | "type"> & {
1294
- readonly type: "runtime.effect.completed";
1295
- readonly payload: {
1296
- readonly effectId: string;
1297
- readonly attempt: number;
1298
- };
1299
- }) | (Omit<EventInput, "payload" | "type"> & {
1300
- readonly type: "runtime.effect.dispatched";
1301
- readonly payload: {
1302
- readonly effectId: string;
1303
- readonly attempt: number;
1304
- readonly deadlineAt: number | null;
1305
- };
1306
- }) | (Omit<EventInput, "payload" | "type"> & {
1307
- readonly type: "runtime.effect.failed";
1308
- readonly payload: {
1309
- readonly effectId: string;
1310
- readonly error: string;
1311
- readonly nonRetryable?: boolean | undefined;
1312
- readonly retryAfterMs?: number | undefined;
1313
- };
1314
- }) | (Omit<EventInput, "payload" | "type"> & {
1315
- readonly type: "runtime.effect.heartbeat";
1316
- readonly payload: {
1317
- readonly effectId: string;
1318
- readonly attempt: number;
1319
- readonly heartbeatAt: number;
1320
- readonly deadlineAt: number | null;
1321
- readonly details?: import("effect/Schema").Json | undefined;
1322
- };
1323
- }) | (Omit<EventInput, "payload" | "type"> & {
1324
- readonly type: "runtime.effect.queued";
1325
- readonly payload: {
1326
- readonly effectId: string;
1327
- readonly attempt: number;
1328
- readonly deadlineAt: number | null;
1329
- };
1330
- }) | (Omit<EventInput, "payload" | "type"> & {
1331
- readonly type: "runtime.effect.retry.scheduled";
1332
- readonly payload: {
1333
- readonly effectId: string;
1334
- readonly attempt: number;
1335
- readonly nextAttemptAt: number;
1336
- readonly error: string;
1337
- };
1338
- }) | (Omit<EventInput, "payload" | "type"> & {
1339
- readonly type: "runtime.effect.timed_out";
1340
- readonly payload: {
1341
- readonly effectId: string;
1342
- readonly attempt: number;
1343
- readonly timeout: string;
1344
- };
1345
- }) | (Omit<EventInput, "payload" | "type"> & {
1346
- readonly type: "runtime.effect.worker.started";
1347
- readonly payload: {
1348
- readonly effectId: string;
1349
- readonly attempt: number;
1350
- readonly deadlineAt: number | null;
1351
- };
1352
- }) | (Omit<EventInput, "payload" | "type"> & {
1353
- readonly type: "runtime.fork.elided";
1354
- readonly payload: {
1355
- readonly type: string;
1356
- };
1357
- }) | (Omit<EventInput, "payload" | "type"> & {
1358
- readonly type: "runtime.run.cancelled";
1359
- readonly payload: {
1360
- readonly reason?: string | undefined;
1361
- };
1362
- }) | (Omit<EventInput, "payload" | "type"> & {
1363
- readonly type: "runtime.run.completed";
1364
- readonly payload: {
1365
- readonly output: import("effect/Schema").Json;
1366
- readonly error: string | null;
1367
- };
1368
- }) | (Omit<EventInput, "payload" | "type"> & {
1369
- readonly type: "runtime.run.forked";
1370
- readonly payload: {
1371
- readonly sourceRunId: string;
1372
- readonly sourceSeq: number;
1373
- };
1374
- }) | (Omit<EventInput, "payload" | "type"> & {
1375
- readonly type: "runtime.run.launched";
1376
- readonly payload: {
1377
- readonly runId: string;
1378
- readonly kind: string;
1379
- readonly definitionName: string;
1380
- readonly definitionVersion: string;
1381
- readonly effectId: string;
1382
- readonly close: "terminate" | "wait";
1383
- };
1384
- }) | (Omit<EventInput, "payload" | "type"> & {
1385
- readonly type: "runtime.run.started";
1386
- readonly payload: {
1387
- readonly rootThreadId?: string | undefined;
1388
- readonly kind: string;
1389
- readonly definitionName: string;
1390
- readonly definitionVersion: string;
1391
- readonly input: import("effect/Schema").Json;
1392
- readonly requestedThreadId?: string | null | undefined;
1393
- readonly launchedBy?: {
1394
- readonly runId: string;
1395
- readonly threadId: string;
1396
- readonly effectId: string;
1397
- readonly causationId: string;
1398
- readonly causationSeq: number;
1399
- } | undefined;
1400
- readonly attributes?: {
1401
- readonly [x: string]: string;
1402
- } | undefined;
1403
- readonly trace?: {
1404
- readonly traceparent: string;
1405
- readonly tracestate?: string | undefined;
1406
- } | undefined;
1407
- };
1408
- }) | (Omit<EventInput, "payload" | "type"> & {
1409
- readonly type: "runtime.signal.received";
1410
- readonly payload: {
1411
- readonly signalType: string;
1412
- };
1413
- }) | (Omit<EventInput, "payload" | "type"> & {
1414
- readonly type: "runtime.snapshot.taken";
1415
- readonly payload: {
1416
- readonly seq: number;
1417
- readonly stateHash: string;
1418
- readonly state?: import("effect/Schema").Json | undefined;
1419
- };
1420
- }) | (Omit<EventInput, "payload" | "type"> & {
1421
- readonly type: "runtime.thread.cancel.requested";
1422
- readonly payload: {
1423
- readonly threadId: string;
1424
- };
1425
- }) | (Omit<EventInput, "payload" | "type"> & {
1426
- readonly type: "runtime.thread.cancelled";
1427
- readonly payload: {
1428
- readonly threadId: string;
1429
- readonly reason?: string | undefined;
1430
- readonly resumeSeq?: number | undefined;
1431
- };
1432
- }) | (Omit<EventInput, "payload" | "type"> & {
1433
- readonly type: "runtime.thread.completed";
1434
- readonly payload: {
1435
- readonly threadId: string;
1436
- readonly output: import("effect/Schema").Json;
1437
- };
1438
- }) | (Omit<EventInput, "payload" | "type"> & {
1439
- readonly type: "runtime.thread.failed";
1440
- readonly payload: {
1441
- readonly threadId: string;
1442
- readonly error: string;
1443
- };
1444
- }) | (Omit<EventInput, "payload" | "type"> & {
1445
- readonly type: "runtime.thread.started";
1446
- readonly payload: {
1447
- readonly threadId: string;
1448
- readonly kind: string;
1449
- readonly definitionName: string;
1450
- readonly definitionVersion: string;
1451
- readonly input: import("effect/Schema").Json;
1452
- readonly parentThreadId: string | null;
1453
- };
1454
- }) | (Omit<EventInput, "payload" | "type"> & {
1455
- readonly type: "runtime.timer.fired";
1456
- readonly payload: {
1457
- readonly timerId: string;
1458
- readonly waitId: string;
1459
- };
1460
- }) | (Omit<EventInput, "payload" | "type"> & {
1461
- readonly type: "runtime.timer.set";
1462
- readonly payload: {
1463
- readonly timerId: string;
1464
- readonly waitId: string;
1465
- readonly wakeAt: number;
1466
- };
1467
- }) | (Omit<EventInput, "payload" | "type"> & {
1468
- readonly type: "runtime.wait.registered";
1469
- readonly payload: {
1470
- readonly waitId: string;
1471
- readonly threadId?: string | undefined;
1472
- readonly on: {
1473
- readonly type: string | readonly string[];
1474
- readonly match?: import("effect/Schema").Json | undefined;
1475
- } | {
1476
- readonly timerAt: number;
1477
- };
1478
- readonly tag?: import("effect/Schema").Json | undefined;
1479
- };
1480
- }) | (Omit<EventInput, "payload" | "type"> & {
1481
- readonly type: "runtime.wait.satisfied";
1482
- readonly payload: {
1483
- readonly waitId: string;
1484
- readonly tag?: import("effect/Schema").Json | undefined;
1485
- readonly event: {
1486
- readonly id: string;
1487
- readonly type: string;
1488
- readonly payload: import("effect/Schema").Json;
1489
- };
1490
- };
1491
- }) | (Omit<EventInput, "payload" | "type"> & {
1492
1273
  readonly type: "agent.context.compacted";
1493
1274
  readonly payload: {
1494
1275
  readonly turn: number;
@@ -1730,19 +1511,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1730
1511
  readonly input: number;
1731
1512
  readonly output: number;
1732
1513
  };
1733
- })>;
1734
- executeTool: import("@swirls/looms/core").EffectDefinition<{
1735
- readonly turn: number;
1736
- readonly definitionName?: string | undefined;
1737
- readonly definitionVersion: string;
1738
- readonly toolCall: {
1739
- readonly id: string;
1740
- readonly name: string;
1741
- readonly arguments: import("effect/Schema").Json;
1742
- };
1743
- readonly input?: import("effect/Schema").Json | undefined;
1744
- readonly depth?: number | undefined;
1745
- }, import("./definitions-store").AgentDefinitionsTag, (Omit<EventInput, "payload" | "type"> & {
1514
+ }) | (Omit<EventInput, "payload" | "type"> & {
1746
1515
  readonly type: "runtime.child.close.requested";
1747
1516
  readonly payload: {
1748
1517
  readonly policy: "terminate" | "wait";
@@ -1787,6 +1556,15 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1787
1556
  readonly effectId: string;
1788
1557
  readonly attempt: number;
1789
1558
  };
1559
+ }) | (Omit<EventInput, "payload" | "type"> & {
1560
+ readonly type: "runtime.effect.dispatch.deferred";
1561
+ readonly payload: {
1562
+ readonly effectId: string;
1563
+ readonly attempt: number;
1564
+ readonly retryAt: number;
1565
+ readonly error: string;
1566
+ readonly try: number;
1567
+ };
1790
1568
  }) | (Omit<EventInput, "payload" | "type"> & {
1791
1569
  readonly type: "runtime.effect.dispatched";
1792
1570
  readonly payload: {
@@ -1979,7 +1757,19 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1979
1757
  readonly payload: import("effect/Schema").Json;
1980
1758
  };
1981
1759
  };
1982
- }) | (Omit<EventInput, "payload" | "type"> & {
1760
+ })>;
1761
+ executeTool: import("@swirls/looms/core").LocalEffectDefinition<{
1762
+ readonly turn: number;
1763
+ readonly definitionName?: string | undefined;
1764
+ readonly definitionVersion: string;
1765
+ readonly toolCall: {
1766
+ readonly id: string;
1767
+ readonly name: string;
1768
+ readonly arguments: import("effect/Schema").Json;
1769
+ };
1770
+ readonly input?: import("effect/Schema").Json | undefined;
1771
+ readonly depth?: number | undefined;
1772
+ }, import("./definitions-store").AgentDefinitionsTag, (Omit<EventInput, "payload" | "type"> & {
1983
1773
  readonly type: "agent.context.compacted";
1984
1774
  readonly payload: {
1985
1775
  readonly turn: number;
@@ -2221,6 +2011,252 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
2221
2011
  readonly input: number;
2222
2012
  readonly output: number;
2223
2013
  };
2014
+ }) | (Omit<EventInput, "payload" | "type"> & {
2015
+ readonly type: "runtime.child.close.requested";
2016
+ readonly payload: {
2017
+ readonly policy: "terminate" | "wait";
2018
+ };
2019
+ }) | (Omit<EventInput, "payload" | "type"> & {
2020
+ readonly type: "runtime.child.settled";
2021
+ readonly payload: {
2022
+ readonly runId: string;
2023
+ readonly status: "cancelled" | "completed" | "failed";
2024
+ readonly output: import("effect/Schema").Json;
2025
+ readonly error: string | null;
2026
+ };
2027
+ }) | (Omit<EventInput, "payload" | "type"> & {
2028
+ readonly type: "runtime.effect.ambiguous";
2029
+ readonly payload: {
2030
+ readonly effectId: string;
2031
+ readonly attempt: number;
2032
+ readonly error: string;
2033
+ };
2034
+ }) | (Omit<EventInput, "payload" | "type"> & {
2035
+ readonly type: "runtime.effect.attempt.started";
2036
+ readonly payload: {
2037
+ readonly effectId: string;
2038
+ readonly attempt: number;
2039
+ };
2040
+ }) | (Omit<EventInput, "payload" | "type"> & {
2041
+ readonly type: "runtime.effect.cancel.requested";
2042
+ readonly payload: {
2043
+ readonly effectId: string;
2044
+ readonly attempt: number;
2045
+ readonly deadlineAt: number | null;
2046
+ };
2047
+ }) | (Omit<EventInput, "payload" | "type"> & {
2048
+ readonly type: "runtime.effect.cancelled";
2049
+ readonly payload: {
2050
+ readonly effectId: string;
2051
+ readonly attempt: number;
2052
+ };
2053
+ }) | (Omit<EventInput, "payload" | "type"> & {
2054
+ readonly type: "runtime.effect.completed";
2055
+ readonly payload: {
2056
+ readonly effectId: string;
2057
+ readonly attempt: number;
2058
+ };
2059
+ }) | (Omit<EventInput, "payload" | "type"> & {
2060
+ readonly type: "runtime.effect.dispatch.deferred";
2061
+ readonly payload: {
2062
+ readonly effectId: string;
2063
+ readonly attempt: number;
2064
+ readonly retryAt: number;
2065
+ readonly error: string;
2066
+ readonly try: number;
2067
+ };
2068
+ }) | (Omit<EventInput, "payload" | "type"> & {
2069
+ readonly type: "runtime.effect.dispatched";
2070
+ readonly payload: {
2071
+ readonly effectId: string;
2072
+ readonly attempt: number;
2073
+ readonly deadlineAt: number | null;
2074
+ };
2075
+ }) | (Omit<EventInput, "payload" | "type"> & {
2076
+ readonly type: "runtime.effect.failed";
2077
+ readonly payload: {
2078
+ readonly effectId: string;
2079
+ readonly error: string;
2080
+ readonly nonRetryable?: boolean | undefined;
2081
+ readonly retryAfterMs?: number | undefined;
2082
+ };
2083
+ }) | (Omit<EventInput, "payload" | "type"> & {
2084
+ readonly type: "runtime.effect.heartbeat";
2085
+ readonly payload: {
2086
+ readonly effectId: string;
2087
+ readonly attempt: number;
2088
+ readonly heartbeatAt: number;
2089
+ readonly deadlineAt: number | null;
2090
+ readonly details?: import("effect/Schema").Json | undefined;
2091
+ };
2092
+ }) | (Omit<EventInput, "payload" | "type"> & {
2093
+ readonly type: "runtime.effect.queued";
2094
+ readonly payload: {
2095
+ readonly effectId: string;
2096
+ readonly attempt: number;
2097
+ readonly deadlineAt: number | null;
2098
+ };
2099
+ }) | (Omit<EventInput, "payload" | "type"> & {
2100
+ readonly type: "runtime.effect.retry.scheduled";
2101
+ readonly payload: {
2102
+ readonly effectId: string;
2103
+ readonly attempt: number;
2104
+ readonly nextAttemptAt: number;
2105
+ readonly error: string;
2106
+ };
2107
+ }) | (Omit<EventInput, "payload" | "type"> & {
2108
+ readonly type: "runtime.effect.timed_out";
2109
+ readonly payload: {
2110
+ readonly effectId: string;
2111
+ readonly attempt: number;
2112
+ readonly timeout: string;
2113
+ };
2114
+ }) | (Omit<EventInput, "payload" | "type"> & {
2115
+ readonly type: "runtime.effect.worker.started";
2116
+ readonly payload: {
2117
+ readonly effectId: string;
2118
+ readonly attempt: number;
2119
+ readonly deadlineAt: number | null;
2120
+ };
2121
+ }) | (Omit<EventInput, "payload" | "type"> & {
2122
+ readonly type: "runtime.fork.elided";
2123
+ readonly payload: {
2124
+ readonly type: string;
2125
+ };
2126
+ }) | (Omit<EventInput, "payload" | "type"> & {
2127
+ readonly type: "runtime.run.cancelled";
2128
+ readonly payload: {
2129
+ readonly reason?: string | undefined;
2130
+ };
2131
+ }) | (Omit<EventInput, "payload" | "type"> & {
2132
+ readonly type: "runtime.run.completed";
2133
+ readonly payload: {
2134
+ readonly output: import("effect/Schema").Json;
2135
+ readonly error: string | null;
2136
+ };
2137
+ }) | (Omit<EventInput, "payload" | "type"> & {
2138
+ readonly type: "runtime.run.forked";
2139
+ readonly payload: {
2140
+ readonly sourceRunId: string;
2141
+ readonly sourceSeq: number;
2142
+ };
2143
+ }) | (Omit<EventInput, "payload" | "type"> & {
2144
+ readonly type: "runtime.run.launched";
2145
+ readonly payload: {
2146
+ readonly runId: string;
2147
+ readonly kind: string;
2148
+ readonly definitionName: string;
2149
+ readonly definitionVersion: string;
2150
+ readonly effectId: string;
2151
+ readonly close: "terminate" | "wait";
2152
+ };
2153
+ }) | (Omit<EventInput, "payload" | "type"> & {
2154
+ readonly type: "runtime.run.started";
2155
+ readonly payload: {
2156
+ readonly rootThreadId?: string | undefined;
2157
+ readonly kind: string;
2158
+ readonly definitionName: string;
2159
+ readonly definitionVersion: string;
2160
+ readonly input: import("effect/Schema").Json;
2161
+ readonly requestedThreadId?: string | null | undefined;
2162
+ readonly launchedBy?: {
2163
+ readonly runId: string;
2164
+ readonly threadId: string;
2165
+ readonly effectId: string;
2166
+ readonly causationId: string;
2167
+ readonly causationSeq: number;
2168
+ } | undefined;
2169
+ readonly attributes?: {
2170
+ readonly [x: string]: string;
2171
+ } | undefined;
2172
+ readonly trace?: {
2173
+ readonly traceparent: string;
2174
+ readonly tracestate?: string | undefined;
2175
+ } | undefined;
2176
+ };
2177
+ }) | (Omit<EventInput, "payload" | "type"> & {
2178
+ readonly type: "runtime.signal.received";
2179
+ readonly payload: {
2180
+ readonly signalType: string;
2181
+ };
2182
+ }) | (Omit<EventInput, "payload" | "type"> & {
2183
+ readonly type: "runtime.snapshot.taken";
2184
+ readonly payload: {
2185
+ readonly seq: number;
2186
+ readonly stateHash: string;
2187
+ readonly state?: import("effect/Schema").Json | undefined;
2188
+ };
2189
+ }) | (Omit<EventInput, "payload" | "type"> & {
2190
+ readonly type: "runtime.thread.cancel.requested";
2191
+ readonly payload: {
2192
+ readonly threadId: string;
2193
+ };
2194
+ }) | (Omit<EventInput, "payload" | "type"> & {
2195
+ readonly type: "runtime.thread.cancelled";
2196
+ readonly payload: {
2197
+ readonly threadId: string;
2198
+ readonly reason?: string | undefined;
2199
+ readonly resumeSeq?: number | undefined;
2200
+ };
2201
+ }) | (Omit<EventInput, "payload" | "type"> & {
2202
+ readonly type: "runtime.thread.completed";
2203
+ readonly payload: {
2204
+ readonly threadId: string;
2205
+ readonly output: import("effect/Schema").Json;
2206
+ };
2207
+ }) | (Omit<EventInput, "payload" | "type"> & {
2208
+ readonly type: "runtime.thread.failed";
2209
+ readonly payload: {
2210
+ readonly threadId: string;
2211
+ readonly error: string;
2212
+ };
2213
+ }) | (Omit<EventInput, "payload" | "type"> & {
2214
+ readonly type: "runtime.thread.started";
2215
+ readonly payload: {
2216
+ readonly threadId: string;
2217
+ readonly kind: string;
2218
+ readonly definitionName: string;
2219
+ readonly definitionVersion: string;
2220
+ readonly input: import("effect/Schema").Json;
2221
+ readonly parentThreadId: string | null;
2222
+ };
2223
+ }) | (Omit<EventInput, "payload" | "type"> & {
2224
+ readonly type: "runtime.timer.fired";
2225
+ readonly payload: {
2226
+ readonly timerId: string;
2227
+ readonly waitId: string;
2228
+ };
2229
+ }) | (Omit<EventInput, "payload" | "type"> & {
2230
+ readonly type: "runtime.timer.set";
2231
+ readonly payload: {
2232
+ readonly timerId: string;
2233
+ readonly waitId: string;
2234
+ readonly wakeAt: number;
2235
+ };
2236
+ }) | (Omit<EventInput, "payload" | "type"> & {
2237
+ readonly type: "runtime.wait.registered";
2238
+ readonly payload: {
2239
+ readonly waitId: string;
2240
+ readonly threadId?: string | undefined;
2241
+ readonly on: {
2242
+ readonly type: string | readonly string[];
2243
+ readonly match?: import("effect/Schema").Json | undefined;
2244
+ } | {
2245
+ readonly timerAt: number;
2246
+ };
2247
+ readonly tag?: import("effect/Schema").Json | undefined;
2248
+ };
2249
+ }) | (Omit<EventInput, "payload" | "type"> & {
2250
+ readonly type: "runtime.wait.satisfied";
2251
+ readonly payload: {
2252
+ readonly waitId: string;
2253
+ readonly tag?: import("effect/Schema").Json | undefined;
2254
+ readonly event: {
2255
+ readonly id: string;
2256
+ readonly type: string;
2257
+ readonly payload: import("effect/Schema").Json;
2258
+ };
2259
+ };
2224
2260
  })>;
2225
2261
  };
2226
2262
  readonly threads: {