@swirls/looms 0.2.0 → 0.4.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 (113) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/actor/host.js +4 -6
  3. package/dist/actor/index.d.ts +1 -1
  4. package/dist/actor/index.js +1 -1
  5. package/dist/actor/routing.d.ts +5 -0
  6. package/dist/actor/routing.js +14 -0
  7. package/dist/agent/agent-session.js +1 -0
  8. package/dist/agent/debugger/agent-chat.js +45 -38
  9. package/dist/agent/debugger/streaming-text.d.ts +6 -0
  10. package/dist/agent/debugger/streaming-text.js +33 -0
  11. package/dist/agent/debugger/summarize.js +2 -0
  12. package/dist/agent/effects.d.ts +30 -0
  13. package/dist/agent/events.d.ts +2 -0
  14. package/dist/agent/events.js +2 -0
  15. package/dist/agent/llm.js +1 -8
  16. package/dist/agent/module.d.ts +230 -160
  17. package/dist/agent/module.js +11 -7
  18. package/dist/agent/projections.d.ts +5 -0
  19. package/dist/agent/projections.js +43 -2
  20. package/dist/agent/scope.d.ts +2 -0
  21. package/dist/agent/signals.d.ts +5 -0
  22. package/dist/agent/signals.js +7 -0
  23. package/dist/agent/threads.js +35 -21
  24. package/dist/agent/transcript.d.ts +7 -0
  25. package/dist/agent/transcript.js +19 -0
  26. package/dist/agent/types.d.ts +10 -0
  27. package/dist/agent/types.js +4 -0
  28. package/dist/approval/debugger/approvals-view.js +5 -3
  29. package/dist/approval/effects.d.ts +12 -0
  30. package/dist/approval/module.d.ts +24 -0
  31. package/dist/client/client.d.ts +292 -0
  32. package/dist/client/client.js +17 -1
  33. package/dist/cloudflare/router.d.ts +1 -1
  34. package/dist/cloudflare/router.js +6 -8
  35. package/dist/core/attempts.d.ts +8 -0
  36. package/dist/core/attempts.js +27 -0
  37. package/dist/core/effects.d.ts +7 -0
  38. package/dist/core/effects.js +1 -0
  39. package/dist/core/fold.js +12 -6
  40. package/dist/core/fork.d.ts +35 -0
  41. package/dist/core/fork.js +129 -0
  42. package/dist/core/index.d.ts +3 -0
  43. package/dist/core/index.js +2 -0
  44. package/dist/core/module-scope.d.ts +1 -0
  45. package/dist/core/module.d.ts +2 -2
  46. package/dist/core/projection.d.ts +5 -4
  47. package/dist/core/projection.js +1 -0
  48. package/dist/core/protocol.d.ts +10 -1
  49. package/dist/core/protocol.js +11 -0
  50. package/dist/{react → core}/register.d.ts +9 -8
  51. package/dist/core/replay.d.ts +8 -0
  52. package/dist/core/snapshots.js +3 -17
  53. package/dist/core/state.d.ts +14 -0
  54. package/dist/core/state.js +25 -2
  55. package/dist/core/store.d.ts +1 -0
  56. package/dist/debugger/app/assets/index-CgDzWJg7.css +2 -0
  57. package/dist/debugger/app/assets/index-D--9esm9.js +22 -0
  58. package/dist/debugger/app/assets/routes-Dakrdusf.js +47 -0
  59. package/dist/debugger/app/index.html +2 -2
  60. package/dist/debugger/components/composer.d.ts +5 -2
  61. package/dist/debugger/components/composer.js +5 -4
  62. package/dist/debugger/components/run-tree.js +2 -5
  63. package/dist/debugger/events/catalog.js +1 -3
  64. package/dist/debugger/events/protocol-summarize.js +7 -0
  65. package/dist/debugger/lib/event-counts.d.ts +2 -2
  66. package/dist/debugger/lib/event-counts.js +5 -9
  67. package/dist/debugger/shell/debugger-shell.js +1 -1
  68. package/dist/debugger/shell/run-controls.d.ts +2 -1
  69. package/dist/debugger/shell/run-controls.js +40 -13
  70. package/dist/debugger/shell/run-search.js +1 -3
  71. package/dist/evaluator/effects.d.ts +45 -33
  72. package/dist/evaluator/module.d.ts +90 -66
  73. package/dist/projectors/index-model.d.ts +13 -7
  74. package/dist/projectors/index-model.js +21 -26
  75. package/dist/projectors/memory.js +19 -11
  76. package/dist/projectors/postgres.js +20 -19
  77. package/dist/projectors/schema.js +20 -18
  78. package/dist/projectors/sqlite.js +32 -27
  79. package/dist/react/derived.d.ts +26 -8
  80. package/dist/react/derived.js +23 -26
  81. package/dist/react/index.d.ts +3 -3
  82. package/dist/react/index.js +2 -2
  83. package/dist/react/materialize.js +16 -11
  84. package/dist/react/react.d.ts +12 -9
  85. package/dist/react/react.js +9 -6
  86. package/dist/react/store.d.ts +4 -5
  87. package/dist/react/tables.d.ts +3 -2
  88. package/dist/runtime/cancellation.js +14 -27
  89. package/dist/runtime/errors.d.ts +39 -0
  90. package/dist/runtime/errors.js +32 -0
  91. package/dist/runtime/helpers.d.ts +2 -0
  92. package/dist/runtime/helpers.js +23 -1
  93. package/dist/runtime/index.d.ts +1 -1
  94. package/dist/runtime/index.js +1 -1
  95. package/dist/runtime/looms.d.ts +4 -0
  96. package/dist/runtime/looms.js +1 -0
  97. package/dist/runtime/run-start.js +1 -3
  98. package/dist/runtime/runtime.d.ts +1 -1
  99. package/dist/runtime/runtime.js +45 -18
  100. package/dist/runtime/server/http.d.ts +2 -0
  101. package/dist/runtime/server/http.js +17 -2
  102. package/dist/runtime/server/routes/runs.js +35 -2
  103. package/dist/runtime/types.d.ts +8 -0
  104. package/dist/runtime/wake-engine.js +5 -2
  105. package/dist/s2/snapshot-store.js +2 -6
  106. package/dist/workflow/effects.d.ts +24 -0
  107. package/dist/workflow/effects.js +1 -0
  108. package/dist/workflow/module.d.ts +48 -0
  109. package/package.json +2 -2
  110. package/dist/debugger/app/assets/index-B3Ah8WAE.css +0 -2
  111. package/dist/debugger/app/assets/index-Qb371t_O.js +0 -22
  112. package/dist/debugger/app/assets/routes-CjtEHgPQ.js +0 -47
  113. /package/dist/{react → core}/register.js +0 -0
@@ -1,3 +1,4 @@
1
+ import { type EventInput } from '@swirls/looms/core';
1
2
  import type { AgentDefinition, AgentSessionDefinition } from './definitions';
2
3
  import { LlmTag, type LlmAdapter, type StubLlmPolicy } from './llm';
3
4
  export interface AgentModuleOptions {
@@ -76,6 +77,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
76
77
  }>;
77
78
  readonly interrupt: import("effect/Schema").optional<import("effect/Schema").Boolean>;
78
79
  }>;
80
+ 'turn.stopped': import("effect/Schema").Struct<{}>;
79
81
  'session.message.submitted': import("effect/Schema").Struct<{
80
82
  readonly messageId: import("effect/Schema").String;
81
83
  readonly text: import("effect/Schema").String;
@@ -186,7 +188,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
186
188
  }[] | undefined;
187
189
  readonly input?: import("effect/Schema").Json | undefined;
188
190
  readonly consumedSteerMessageIds?: readonly string[] | undefined;
189
- }, import("./definitions-store").AgentDefinitionsTag | LlmTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
191
+ }, import("./definitions-store").AgentDefinitionsTag | LlmTag, (Omit<EventInput, "payload" | "type"> & {
190
192
  readonly type: "agent.effects.requested";
191
193
  readonly payload: {
192
194
  readonly toolCallId: string;
@@ -252,7 +254,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
252
254
  readonly match?: import("effect/Schema").Json | undefined;
253
255
  } | undefined;
254
256
  };
255
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
257
+ }) | (Omit<EventInput, "payload" | "type"> & {
256
258
  readonly type: "agent.message";
257
259
  readonly payload: {
258
260
  readonly turn: number;
@@ -272,7 +274,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
272
274
  readonly output: number;
273
275
  } | undefined;
274
276
  };
275
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
277
+ }) | (Omit<EventInput, "payload" | "type"> & {
276
278
  readonly type: "agent.message.received";
277
279
  readonly payload: {
278
280
  readonly message: {
@@ -287,10 +289,10 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
287
289
  }[] | undefined;
288
290
  };
289
291
  };
290
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
292
+ }) | (Omit<EventInput, "payload" | "type"> & {
291
293
  readonly type: "agent.session.cancel.requested";
292
294
  readonly payload: {};
293
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
295
+ }) | (Omit<EventInput, "payload" | "type"> & {
294
296
  readonly type: "agent.session.message.submitted";
295
297
  readonly payload: {
296
298
  readonly messageId: string;
@@ -298,26 +300,26 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
298
300
  readonly delivery?: "followUp" | "nextTurn" | "steer" | undefined;
299
301
  readonly activeChildThreadId?: string | undefined;
300
302
  };
301
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
303
+ }) | (Omit<EventInput, "payload" | "type"> & {
302
304
  readonly type: "agent.session.steer.delivered";
303
305
  readonly payload: {
304
306
  readonly messageId: string;
305
307
  readonly activeMessageId: string;
306
308
  };
307
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
309
+ }) | (Omit<EventInput, "payload" | "type"> & {
308
310
  readonly type: "agent.session.turn.closed";
309
311
  readonly payload: {
310
312
  readonly messageId: string;
311
313
  readonly status: "cancelled" | "completed" | "failed";
312
314
  readonly error?: string | undefined;
313
315
  };
314
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
316
+ }) | (Omit<EventInput, "payload" | "type"> & {
315
317
  readonly type: "agent.session.turn.started";
316
318
  readonly payload: {
317
319
  readonly messageId: string;
318
320
  readonly childThreadId: string;
319
321
  };
320
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
322
+ }) | (Omit<EventInput, "payload" | "type"> & {
321
323
  readonly type: "agent.spawn.requested";
322
324
  readonly payload: {
323
325
  readonly childThreadId: string;
@@ -327,7 +329,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
327
329
  readonly toolCallId: string;
328
330
  readonly input: import("effect/Schema").Json;
329
331
  };
330
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
332
+ }) | (Omit<EventInput, "payload" | "type"> & {
331
333
  readonly type: "agent.steered";
332
334
  readonly payload: {
333
335
  readonly turn: number;
@@ -345,7 +347,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
345
347
  };
346
348
  readonly interrupt?: boolean | undefined;
347
349
  };
348
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
350
+ }) | (Omit<EventInput, "payload" | "type"> & {
349
351
  readonly type: "agent.tool.result";
350
352
  readonly payload: {
351
353
  readonly turn: number;
@@ -354,7 +356,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
354
356
  readonly result: import("effect/Schema").Json;
355
357
  readonly error: string | null;
356
358
  };
357
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
359
+ }) | (Omit<EventInput, "payload" | "type"> & {
358
360
  readonly type: "agent.tool_call.requested";
359
361
  readonly payload: {
360
362
  readonly turn: number;
@@ -364,63 +366,66 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
364
366
  readonly arguments: import("effect/Schema").Json;
365
367
  };
366
368
  };
367
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
369
+ }) | (Omit<EventInput, "payload" | "type"> & {
368
370
  readonly type: "agent.turn.started";
369
371
  readonly payload: {
370
372
  readonly turn: number;
371
373
  };
372
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
374
+ }) | (Omit<EventInput, "payload" | "type"> & {
375
+ readonly type: "agent.turn.stopped";
376
+ readonly payload: {};
377
+ }) | (Omit<EventInput, "payload" | "type"> & {
373
378
  readonly type: "agent.turn.text_delta";
374
379
  readonly payload: {
375
380
  readonly turn: number;
376
381
  readonly delta: string;
377
382
  };
378
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
383
+ }) | (Omit<EventInput, "payload" | "type"> & {
379
384
  readonly type: "runtime.effect.ambiguous";
380
385
  readonly payload: {
381
386
  readonly effectId: string;
382
387
  readonly attempt: number;
383
388
  readonly error: string;
384
389
  };
385
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
390
+ }) | (Omit<EventInput, "payload" | "type"> & {
386
391
  readonly type: "runtime.effect.attempt.started";
387
392
  readonly payload: {
388
393
  readonly effectId: string;
389
394
  readonly attempt: number;
390
395
  };
391
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
396
+ }) | (Omit<EventInput, "payload" | "type"> & {
392
397
  readonly type: "runtime.effect.cancel.requested";
393
398
  readonly payload: {
394
399
  readonly effectId: string;
395
400
  readonly attempt: number;
396
401
  readonly deadlineAt: number | null;
397
402
  };
398
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
403
+ }) | (Omit<EventInput, "payload" | "type"> & {
399
404
  readonly type: "runtime.effect.cancelled";
400
405
  readonly payload: {
401
406
  readonly effectId: string;
402
407
  readonly attempt: number;
403
408
  };
404
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
409
+ }) | (Omit<EventInput, "payload" | "type"> & {
405
410
  readonly type: "runtime.effect.completed";
406
411
  readonly payload: {
407
412
  readonly effectId: string;
408
413
  readonly attempt: number;
409
414
  };
410
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
415
+ }) | (Omit<EventInput, "payload" | "type"> & {
411
416
  readonly type: "runtime.effect.dispatched";
412
417
  readonly payload: {
413
418
  readonly effectId: string;
414
419
  readonly attempt: number;
415
420
  readonly deadlineAt: number | null;
416
421
  };
417
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
422
+ }) | (Omit<EventInput, "payload" | "type"> & {
418
423
  readonly type: "runtime.effect.failed";
419
424
  readonly payload: {
420
425
  readonly effectId: string;
421
426
  readonly error: string;
422
427
  };
423
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
428
+ }) | (Omit<EventInput, "payload" | "type"> & {
424
429
  readonly type: "runtime.effect.heartbeat";
425
430
  readonly payload: {
426
431
  readonly effectId: string;
@@ -428,14 +433,14 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
428
433
  readonly heartbeatAt: number;
429
434
  readonly deadlineAt: number | null;
430
435
  };
431
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
436
+ }) | (Omit<EventInput, "payload" | "type"> & {
432
437
  readonly type: "runtime.effect.queued";
433
438
  readonly payload: {
434
439
  readonly effectId: string;
435
440
  readonly attempt: number;
436
441
  readonly deadlineAt: number | null;
437
442
  };
438
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
443
+ }) | (Omit<EventInput, "payload" | "type"> & {
439
444
  readonly type: "runtime.effect.retry.scheduled";
440
445
  readonly payload: {
441
446
  readonly effectId: string;
@@ -443,32 +448,43 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
443
448
  readonly nextAttemptAt: number;
444
449
  readonly error: string;
445
450
  };
446
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
451
+ }) | (Omit<EventInput, "payload" | "type"> & {
447
452
  readonly type: "runtime.effect.timed_out";
448
453
  readonly payload: {
449
454
  readonly effectId: string;
450
455
  readonly attempt: number;
451
456
  readonly timeout: string;
452
457
  };
453
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
458
+ }) | (Omit<EventInput, "payload" | "type"> & {
454
459
  readonly type: "runtime.effect.worker.started";
455
460
  readonly payload: {
456
461
  readonly effectId: string;
457
462
  readonly attempt: number;
458
463
  readonly deadlineAt: number | null;
459
464
  };
460
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
465
+ }) | (Omit<EventInput, "payload" | "type"> & {
466
+ readonly type: "runtime.fork.elided";
467
+ readonly payload: {
468
+ readonly type: string;
469
+ };
470
+ }) | (Omit<EventInput, "payload" | "type"> & {
461
471
  readonly type: "runtime.run.cancelled";
462
472
  readonly payload: {
463
473
  readonly reason?: string | undefined;
464
474
  };
465
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
475
+ }) | (Omit<EventInput, "payload" | "type"> & {
466
476
  readonly type: "runtime.run.completed";
467
477
  readonly payload: {
468
478
  readonly output: import("effect/Schema").Json;
469
479
  readonly error: string | null;
470
480
  };
471
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
481
+ }) | (Omit<EventInput, "payload" | "type"> & {
482
+ readonly type: "runtime.run.forked";
483
+ readonly payload: {
484
+ readonly sourceRunId: string;
485
+ readonly sourceSeq: number;
486
+ };
487
+ }) | (Omit<EventInput, "payload" | "type"> & {
472
488
  readonly type: "runtime.run.started";
473
489
  readonly payload: {
474
490
  readonly rootThreadId?: string | undefined;
@@ -478,42 +494,43 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
478
494
  readonly input: import("effect/Schema").Json;
479
495
  readonly requestedThreadId?: string | null | undefined;
480
496
  };
481
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
497
+ }) | (Omit<EventInput, "payload" | "type"> & {
482
498
  readonly type: "runtime.signal.received";
483
499
  readonly payload: {
484
500
  readonly signalType: string;
485
501
  };
486
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
502
+ }) | (Omit<EventInput, "payload" | "type"> & {
487
503
  readonly type: "runtime.snapshot.taken";
488
504
  readonly payload: {
489
505
  readonly seq: number;
490
506
  readonly stateHash: string;
491
507
  readonly state?: import("effect/Schema").Json | undefined;
492
508
  };
493
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
509
+ }) | (Omit<EventInput, "payload" | "type"> & {
494
510
  readonly type: "runtime.thread.cancel.requested";
495
511
  readonly payload: {
496
512
  readonly threadId: string;
497
513
  };
498
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
514
+ }) | (Omit<EventInput, "payload" | "type"> & {
499
515
  readonly type: "runtime.thread.cancelled";
500
516
  readonly payload: {
501
517
  readonly threadId: string;
502
518
  readonly reason?: string | undefined;
519
+ readonly resumeSeq?: number | undefined;
503
520
  };
504
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
521
+ }) | (Omit<EventInput, "payload" | "type"> & {
505
522
  readonly type: "runtime.thread.completed";
506
523
  readonly payload: {
507
524
  readonly threadId: string;
508
525
  readonly output: import("effect/Schema").Json;
509
526
  };
510
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
527
+ }) | (Omit<EventInput, "payload" | "type"> & {
511
528
  readonly type: "runtime.thread.failed";
512
529
  readonly payload: {
513
530
  readonly threadId: string;
514
531
  readonly error: string;
515
532
  };
516
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
533
+ }) | (Omit<EventInput, "payload" | "type"> & {
517
534
  readonly type: "runtime.thread.started";
518
535
  readonly payload: {
519
536
  readonly threadId: string;
@@ -523,20 +540,20 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
523
540
  readonly input: import("effect/Schema").Json;
524
541
  readonly parentThreadId: string | null;
525
542
  };
526
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
543
+ }) | (Omit<EventInput, "payload" | "type"> & {
527
544
  readonly type: "runtime.timer.fired";
528
545
  readonly payload: {
529
546
  readonly timerId: string;
530
547
  readonly waitId: string;
531
548
  };
532
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
549
+ }) | (Omit<EventInput, "payload" | "type"> & {
533
550
  readonly type: "runtime.timer.set";
534
551
  readonly payload: {
535
552
  readonly timerId: string;
536
553
  readonly waitId: string;
537
554
  readonly wakeAt: number;
538
555
  };
539
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
556
+ }) | (Omit<EventInput, "payload" | "type"> & {
540
557
  readonly type: "runtime.wait.registered";
541
558
  readonly payload: {
542
559
  readonly waitId: string;
@@ -549,7 +566,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
549
566
  };
550
567
  readonly tag?: import("effect/Schema").Json | undefined;
551
568
  };
552
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
569
+ }) | (Omit<EventInput, "payload" | "type"> & {
553
570
  readonly type: "runtime.wait.satisfied";
554
571
  readonly payload: {
555
572
  readonly waitId: string;
@@ -570,7 +587,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
570
587
  readonly name: string;
571
588
  readonly arguments: import("effect/Schema").Json;
572
589
  };
573
- }, import("./definitions-store").AgentDefinitionsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
590
+ }, import("./definitions-store").AgentDefinitionsTag, (Omit<EventInput, "payload" | "type"> & {
574
591
  readonly type: "agent.effects.requested";
575
592
  readonly payload: {
576
593
  readonly toolCallId: string;
@@ -636,7 +653,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
636
653
  readonly match?: import("effect/Schema").Json | undefined;
637
654
  } | undefined;
638
655
  };
639
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
656
+ }) | (Omit<EventInput, "payload" | "type"> & {
640
657
  readonly type: "agent.message";
641
658
  readonly payload: {
642
659
  readonly turn: number;
@@ -656,7 +673,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
656
673
  readonly output: number;
657
674
  } | undefined;
658
675
  };
659
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
676
+ }) | (Omit<EventInput, "payload" | "type"> & {
660
677
  readonly type: "agent.message.received";
661
678
  readonly payload: {
662
679
  readonly message: {
@@ -671,10 +688,10 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
671
688
  }[] | undefined;
672
689
  };
673
690
  };
674
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
691
+ }) | (Omit<EventInput, "payload" | "type"> & {
675
692
  readonly type: "agent.session.cancel.requested";
676
693
  readonly payload: {};
677
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
694
+ }) | (Omit<EventInput, "payload" | "type"> & {
678
695
  readonly type: "agent.session.message.submitted";
679
696
  readonly payload: {
680
697
  readonly messageId: string;
@@ -682,26 +699,26 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
682
699
  readonly delivery?: "followUp" | "nextTurn" | "steer" | undefined;
683
700
  readonly activeChildThreadId?: string | undefined;
684
701
  };
685
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
702
+ }) | (Omit<EventInput, "payload" | "type"> & {
686
703
  readonly type: "agent.session.steer.delivered";
687
704
  readonly payload: {
688
705
  readonly messageId: string;
689
706
  readonly activeMessageId: string;
690
707
  };
691
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
708
+ }) | (Omit<EventInput, "payload" | "type"> & {
692
709
  readonly type: "agent.session.turn.closed";
693
710
  readonly payload: {
694
711
  readonly messageId: string;
695
712
  readonly status: "cancelled" | "completed" | "failed";
696
713
  readonly error?: string | undefined;
697
714
  };
698
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
715
+ }) | (Omit<EventInput, "payload" | "type"> & {
699
716
  readonly type: "agent.session.turn.started";
700
717
  readonly payload: {
701
718
  readonly messageId: string;
702
719
  readonly childThreadId: string;
703
720
  };
704
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
721
+ }) | (Omit<EventInput, "payload" | "type"> & {
705
722
  readonly type: "agent.spawn.requested";
706
723
  readonly payload: {
707
724
  readonly childThreadId: string;
@@ -711,7 +728,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
711
728
  readonly toolCallId: string;
712
729
  readonly input: import("effect/Schema").Json;
713
730
  };
714
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
731
+ }) | (Omit<EventInput, "payload" | "type"> & {
715
732
  readonly type: "agent.steered";
716
733
  readonly payload: {
717
734
  readonly turn: number;
@@ -729,7 +746,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
729
746
  };
730
747
  readonly interrupt?: boolean | undefined;
731
748
  };
732
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
749
+ }) | (Omit<EventInput, "payload" | "type"> & {
733
750
  readonly type: "agent.tool.result";
734
751
  readonly payload: {
735
752
  readonly turn: number;
@@ -738,7 +755,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
738
755
  readonly result: import("effect/Schema").Json;
739
756
  readonly error: string | null;
740
757
  };
741
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
758
+ }) | (Omit<EventInput, "payload" | "type"> & {
742
759
  readonly type: "agent.tool_call.requested";
743
760
  readonly payload: {
744
761
  readonly turn: number;
@@ -748,63 +765,66 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
748
765
  readonly arguments: import("effect/Schema").Json;
749
766
  };
750
767
  };
751
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
768
+ }) | (Omit<EventInput, "payload" | "type"> & {
752
769
  readonly type: "agent.turn.started";
753
770
  readonly payload: {
754
771
  readonly turn: number;
755
772
  };
756
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
773
+ }) | (Omit<EventInput, "payload" | "type"> & {
774
+ readonly type: "agent.turn.stopped";
775
+ readonly payload: {};
776
+ }) | (Omit<EventInput, "payload" | "type"> & {
757
777
  readonly type: "agent.turn.text_delta";
758
778
  readonly payload: {
759
779
  readonly turn: number;
760
780
  readonly delta: string;
761
781
  };
762
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
782
+ }) | (Omit<EventInput, "payload" | "type"> & {
763
783
  readonly type: "runtime.effect.ambiguous";
764
784
  readonly payload: {
765
785
  readonly effectId: string;
766
786
  readonly attempt: number;
767
787
  readonly error: string;
768
788
  };
769
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
789
+ }) | (Omit<EventInput, "payload" | "type"> & {
770
790
  readonly type: "runtime.effect.attempt.started";
771
791
  readonly payload: {
772
792
  readonly effectId: string;
773
793
  readonly attempt: number;
774
794
  };
775
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
795
+ }) | (Omit<EventInput, "payload" | "type"> & {
776
796
  readonly type: "runtime.effect.cancel.requested";
777
797
  readonly payload: {
778
798
  readonly effectId: string;
779
799
  readonly attempt: number;
780
800
  readonly deadlineAt: number | null;
781
801
  };
782
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
802
+ }) | (Omit<EventInput, "payload" | "type"> & {
783
803
  readonly type: "runtime.effect.cancelled";
784
804
  readonly payload: {
785
805
  readonly effectId: string;
786
806
  readonly attempt: number;
787
807
  };
788
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
808
+ }) | (Omit<EventInput, "payload" | "type"> & {
789
809
  readonly type: "runtime.effect.completed";
790
810
  readonly payload: {
791
811
  readonly effectId: string;
792
812
  readonly attempt: number;
793
813
  };
794
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
814
+ }) | (Omit<EventInput, "payload" | "type"> & {
795
815
  readonly type: "runtime.effect.dispatched";
796
816
  readonly payload: {
797
817
  readonly effectId: string;
798
818
  readonly attempt: number;
799
819
  readonly deadlineAt: number | null;
800
820
  };
801
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
821
+ }) | (Omit<EventInput, "payload" | "type"> & {
802
822
  readonly type: "runtime.effect.failed";
803
823
  readonly payload: {
804
824
  readonly effectId: string;
805
825
  readonly error: string;
806
826
  };
807
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
827
+ }) | (Omit<EventInput, "payload" | "type"> & {
808
828
  readonly type: "runtime.effect.heartbeat";
809
829
  readonly payload: {
810
830
  readonly effectId: string;
@@ -812,14 +832,14 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
812
832
  readonly heartbeatAt: number;
813
833
  readonly deadlineAt: number | null;
814
834
  };
815
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
835
+ }) | (Omit<EventInput, "payload" | "type"> & {
816
836
  readonly type: "runtime.effect.queued";
817
837
  readonly payload: {
818
838
  readonly effectId: string;
819
839
  readonly attempt: number;
820
840
  readonly deadlineAt: number | null;
821
841
  };
822
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
842
+ }) | (Omit<EventInput, "payload" | "type"> & {
823
843
  readonly type: "runtime.effect.retry.scheduled";
824
844
  readonly payload: {
825
845
  readonly effectId: string;
@@ -827,32 +847,43 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
827
847
  readonly nextAttemptAt: number;
828
848
  readonly error: string;
829
849
  };
830
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
850
+ }) | (Omit<EventInput, "payload" | "type"> & {
831
851
  readonly type: "runtime.effect.timed_out";
832
852
  readonly payload: {
833
853
  readonly effectId: string;
834
854
  readonly attempt: number;
835
855
  readonly timeout: string;
836
856
  };
837
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
857
+ }) | (Omit<EventInput, "payload" | "type"> & {
838
858
  readonly type: "runtime.effect.worker.started";
839
859
  readonly payload: {
840
860
  readonly effectId: string;
841
861
  readonly attempt: number;
842
862
  readonly deadlineAt: number | null;
843
863
  };
844
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
864
+ }) | (Omit<EventInput, "payload" | "type"> & {
865
+ readonly type: "runtime.fork.elided";
866
+ readonly payload: {
867
+ readonly type: string;
868
+ };
869
+ }) | (Omit<EventInput, "payload" | "type"> & {
845
870
  readonly type: "runtime.run.cancelled";
846
871
  readonly payload: {
847
872
  readonly reason?: string | undefined;
848
873
  };
849
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
874
+ }) | (Omit<EventInput, "payload" | "type"> & {
850
875
  readonly type: "runtime.run.completed";
851
876
  readonly payload: {
852
877
  readonly output: import("effect/Schema").Json;
853
878
  readonly error: string | null;
854
879
  };
855
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
880
+ }) | (Omit<EventInput, "payload" | "type"> & {
881
+ readonly type: "runtime.run.forked";
882
+ readonly payload: {
883
+ readonly sourceRunId: string;
884
+ readonly sourceSeq: number;
885
+ };
886
+ }) | (Omit<EventInput, "payload" | "type"> & {
856
887
  readonly type: "runtime.run.started";
857
888
  readonly payload: {
858
889
  readonly rootThreadId?: string | undefined;
@@ -862,42 +893,43 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
862
893
  readonly input: import("effect/Schema").Json;
863
894
  readonly requestedThreadId?: string | null | undefined;
864
895
  };
865
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
896
+ }) | (Omit<EventInput, "payload" | "type"> & {
866
897
  readonly type: "runtime.signal.received";
867
898
  readonly payload: {
868
899
  readonly signalType: string;
869
900
  };
870
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
901
+ }) | (Omit<EventInput, "payload" | "type"> & {
871
902
  readonly type: "runtime.snapshot.taken";
872
903
  readonly payload: {
873
904
  readonly seq: number;
874
905
  readonly stateHash: string;
875
906
  readonly state?: import("effect/Schema").Json | undefined;
876
907
  };
877
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
908
+ }) | (Omit<EventInput, "payload" | "type"> & {
878
909
  readonly type: "runtime.thread.cancel.requested";
879
910
  readonly payload: {
880
911
  readonly threadId: string;
881
912
  };
882
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
913
+ }) | (Omit<EventInput, "payload" | "type"> & {
883
914
  readonly type: "runtime.thread.cancelled";
884
915
  readonly payload: {
885
916
  readonly threadId: string;
886
917
  readonly reason?: string | undefined;
918
+ readonly resumeSeq?: number | undefined;
887
919
  };
888
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
920
+ }) | (Omit<EventInput, "payload" | "type"> & {
889
921
  readonly type: "runtime.thread.completed";
890
922
  readonly payload: {
891
923
  readonly threadId: string;
892
924
  readonly output: import("effect/Schema").Json;
893
925
  };
894
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
926
+ }) | (Omit<EventInput, "payload" | "type"> & {
895
927
  readonly type: "runtime.thread.failed";
896
928
  readonly payload: {
897
929
  readonly threadId: string;
898
930
  readonly error: string;
899
931
  };
900
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
932
+ }) | (Omit<EventInput, "payload" | "type"> & {
901
933
  readonly type: "runtime.thread.started";
902
934
  readonly payload: {
903
935
  readonly threadId: string;
@@ -907,20 +939,20 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
907
939
  readonly input: import("effect/Schema").Json;
908
940
  readonly parentThreadId: string | null;
909
941
  };
910
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
942
+ }) | (Omit<EventInput, "payload" | "type"> & {
911
943
  readonly type: "runtime.timer.fired";
912
944
  readonly payload: {
913
945
  readonly timerId: string;
914
946
  readonly waitId: string;
915
947
  };
916
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
948
+ }) | (Omit<EventInput, "payload" | "type"> & {
917
949
  readonly type: "runtime.timer.set";
918
950
  readonly payload: {
919
951
  readonly timerId: string;
920
952
  readonly waitId: string;
921
953
  readonly wakeAt: number;
922
954
  };
923
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
955
+ }) | (Omit<EventInput, "payload" | "type"> & {
924
956
  readonly type: "runtime.wait.registered";
925
957
  readonly payload: {
926
958
  readonly waitId: string;
@@ -933,7 +965,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
933
965
  };
934
966
  readonly tag?: import("effect/Schema").Json | undefined;
935
967
  };
936
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
968
+ }) | (Omit<EventInput, "payload" | "type"> & {
937
969
  readonly type: "runtime.wait.satisfied";
938
970
  readonly payload: {
939
971
  readonly waitId: string;
@@ -966,6 +998,10 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
966
998
  readonly input: number;
967
999
  readonly output: number;
968
1000
  }>;
1001
+ turnActivity: import("@swirls/looms/core").ProjectionDefinition<{
1002
+ readonly rootThreadId: string | null;
1003
+ readonly active: boolean;
1004
+ }>;
969
1005
  }, import("effect/Context").Service.Any> & {
970
1006
  readonly effects: {
971
1007
  callLLM: import("@swirls/looms/core").EffectDefinition<{
@@ -985,7 +1021,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
985
1021
  }[] | undefined;
986
1022
  readonly input?: import("effect/Schema").Json | undefined;
987
1023
  readonly consumedSteerMessageIds?: readonly string[] | undefined;
988
- }, import("./definitions-store").AgentDefinitionsTag | LlmTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1024
+ }, import("./definitions-store").AgentDefinitionsTag | LlmTag, (Omit<EventInput, "payload" | "type"> & {
989
1025
  readonly type: "agent.effects.requested";
990
1026
  readonly payload: {
991
1027
  readonly toolCallId: string;
@@ -1051,7 +1087,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1051
1087
  readonly match?: import("effect/Schema").Json | undefined;
1052
1088
  } | undefined;
1053
1089
  };
1054
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1090
+ }) | (Omit<EventInput, "payload" | "type"> & {
1055
1091
  readonly type: "agent.message";
1056
1092
  readonly payload: {
1057
1093
  readonly turn: number;
@@ -1071,7 +1107,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1071
1107
  readonly output: number;
1072
1108
  } | undefined;
1073
1109
  };
1074
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1110
+ }) | (Omit<EventInput, "payload" | "type"> & {
1075
1111
  readonly type: "agent.message.received";
1076
1112
  readonly payload: {
1077
1113
  readonly message: {
@@ -1086,10 +1122,10 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1086
1122
  }[] | undefined;
1087
1123
  };
1088
1124
  };
1089
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1125
+ }) | (Omit<EventInput, "payload" | "type"> & {
1090
1126
  readonly type: "agent.session.cancel.requested";
1091
1127
  readonly payload: {};
1092
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1128
+ }) | (Omit<EventInput, "payload" | "type"> & {
1093
1129
  readonly type: "agent.session.message.submitted";
1094
1130
  readonly payload: {
1095
1131
  readonly messageId: string;
@@ -1097,26 +1133,26 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1097
1133
  readonly delivery?: "followUp" | "nextTurn" | "steer" | undefined;
1098
1134
  readonly activeChildThreadId?: string | undefined;
1099
1135
  };
1100
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1136
+ }) | (Omit<EventInput, "payload" | "type"> & {
1101
1137
  readonly type: "agent.session.steer.delivered";
1102
1138
  readonly payload: {
1103
1139
  readonly messageId: string;
1104
1140
  readonly activeMessageId: string;
1105
1141
  };
1106
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1142
+ }) | (Omit<EventInput, "payload" | "type"> & {
1107
1143
  readonly type: "agent.session.turn.closed";
1108
1144
  readonly payload: {
1109
1145
  readonly messageId: string;
1110
1146
  readonly status: "cancelled" | "completed" | "failed";
1111
1147
  readonly error?: string | undefined;
1112
1148
  };
1113
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1149
+ }) | (Omit<EventInput, "payload" | "type"> & {
1114
1150
  readonly type: "agent.session.turn.started";
1115
1151
  readonly payload: {
1116
1152
  readonly messageId: string;
1117
1153
  readonly childThreadId: string;
1118
1154
  };
1119
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1155
+ }) | (Omit<EventInput, "payload" | "type"> & {
1120
1156
  readonly type: "agent.spawn.requested";
1121
1157
  readonly payload: {
1122
1158
  readonly childThreadId: string;
@@ -1126,7 +1162,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1126
1162
  readonly toolCallId: string;
1127
1163
  readonly input: import("effect/Schema").Json;
1128
1164
  };
1129
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1165
+ }) | (Omit<EventInput, "payload" | "type"> & {
1130
1166
  readonly type: "agent.steered";
1131
1167
  readonly payload: {
1132
1168
  readonly turn: number;
@@ -1144,7 +1180,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1144
1180
  };
1145
1181
  readonly interrupt?: boolean | undefined;
1146
1182
  };
1147
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1183
+ }) | (Omit<EventInput, "payload" | "type"> & {
1148
1184
  readonly type: "agent.tool.result";
1149
1185
  readonly payload: {
1150
1186
  readonly turn: number;
@@ -1153,7 +1189,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1153
1189
  readonly result: import("effect/Schema").Json;
1154
1190
  readonly error: string | null;
1155
1191
  };
1156
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1192
+ }) | (Omit<EventInput, "payload" | "type"> & {
1157
1193
  readonly type: "agent.tool_call.requested";
1158
1194
  readonly payload: {
1159
1195
  readonly turn: number;
@@ -1163,63 +1199,66 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1163
1199
  readonly arguments: import("effect/Schema").Json;
1164
1200
  };
1165
1201
  };
1166
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1202
+ }) | (Omit<EventInput, "payload" | "type"> & {
1167
1203
  readonly type: "agent.turn.started";
1168
1204
  readonly payload: {
1169
1205
  readonly turn: number;
1170
1206
  };
1171
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1207
+ }) | (Omit<EventInput, "payload" | "type"> & {
1208
+ readonly type: "agent.turn.stopped";
1209
+ readonly payload: {};
1210
+ }) | (Omit<EventInput, "payload" | "type"> & {
1172
1211
  readonly type: "agent.turn.text_delta";
1173
1212
  readonly payload: {
1174
1213
  readonly turn: number;
1175
1214
  readonly delta: string;
1176
1215
  };
1177
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1216
+ }) | (Omit<EventInput, "payload" | "type"> & {
1178
1217
  readonly type: "runtime.effect.ambiguous";
1179
1218
  readonly payload: {
1180
1219
  readonly effectId: string;
1181
1220
  readonly attempt: number;
1182
1221
  readonly error: string;
1183
1222
  };
1184
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1223
+ }) | (Omit<EventInput, "payload" | "type"> & {
1185
1224
  readonly type: "runtime.effect.attempt.started";
1186
1225
  readonly payload: {
1187
1226
  readonly effectId: string;
1188
1227
  readonly attempt: number;
1189
1228
  };
1190
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1229
+ }) | (Omit<EventInput, "payload" | "type"> & {
1191
1230
  readonly type: "runtime.effect.cancel.requested";
1192
1231
  readonly payload: {
1193
1232
  readonly effectId: string;
1194
1233
  readonly attempt: number;
1195
1234
  readonly deadlineAt: number | null;
1196
1235
  };
1197
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1236
+ }) | (Omit<EventInput, "payload" | "type"> & {
1198
1237
  readonly type: "runtime.effect.cancelled";
1199
1238
  readonly payload: {
1200
1239
  readonly effectId: string;
1201
1240
  readonly attempt: number;
1202
1241
  };
1203
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1242
+ }) | (Omit<EventInput, "payload" | "type"> & {
1204
1243
  readonly type: "runtime.effect.completed";
1205
1244
  readonly payload: {
1206
1245
  readonly effectId: string;
1207
1246
  readonly attempt: number;
1208
1247
  };
1209
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1248
+ }) | (Omit<EventInput, "payload" | "type"> & {
1210
1249
  readonly type: "runtime.effect.dispatched";
1211
1250
  readonly payload: {
1212
1251
  readonly effectId: string;
1213
1252
  readonly attempt: number;
1214
1253
  readonly deadlineAt: number | null;
1215
1254
  };
1216
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1255
+ }) | (Omit<EventInput, "payload" | "type"> & {
1217
1256
  readonly type: "runtime.effect.failed";
1218
1257
  readonly payload: {
1219
1258
  readonly effectId: string;
1220
1259
  readonly error: string;
1221
1260
  };
1222
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1261
+ }) | (Omit<EventInput, "payload" | "type"> & {
1223
1262
  readonly type: "runtime.effect.heartbeat";
1224
1263
  readonly payload: {
1225
1264
  readonly effectId: string;
@@ -1227,14 +1266,14 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1227
1266
  readonly heartbeatAt: number;
1228
1267
  readonly deadlineAt: number | null;
1229
1268
  };
1230
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1269
+ }) | (Omit<EventInput, "payload" | "type"> & {
1231
1270
  readonly type: "runtime.effect.queued";
1232
1271
  readonly payload: {
1233
1272
  readonly effectId: string;
1234
1273
  readonly attempt: number;
1235
1274
  readonly deadlineAt: number | null;
1236
1275
  };
1237
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1276
+ }) | (Omit<EventInput, "payload" | "type"> & {
1238
1277
  readonly type: "runtime.effect.retry.scheduled";
1239
1278
  readonly payload: {
1240
1279
  readonly effectId: string;
@@ -1242,32 +1281,43 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1242
1281
  readonly nextAttemptAt: number;
1243
1282
  readonly error: string;
1244
1283
  };
1245
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1284
+ }) | (Omit<EventInput, "payload" | "type"> & {
1246
1285
  readonly type: "runtime.effect.timed_out";
1247
1286
  readonly payload: {
1248
1287
  readonly effectId: string;
1249
1288
  readonly attempt: number;
1250
1289
  readonly timeout: string;
1251
1290
  };
1252
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1291
+ }) | (Omit<EventInput, "payload" | "type"> & {
1253
1292
  readonly type: "runtime.effect.worker.started";
1254
1293
  readonly payload: {
1255
1294
  readonly effectId: string;
1256
1295
  readonly attempt: number;
1257
1296
  readonly deadlineAt: number | null;
1258
1297
  };
1259
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1298
+ }) | (Omit<EventInput, "payload" | "type"> & {
1299
+ readonly type: "runtime.fork.elided";
1300
+ readonly payload: {
1301
+ readonly type: string;
1302
+ };
1303
+ }) | (Omit<EventInput, "payload" | "type"> & {
1260
1304
  readonly type: "runtime.run.cancelled";
1261
1305
  readonly payload: {
1262
1306
  readonly reason?: string | undefined;
1263
1307
  };
1264
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1308
+ }) | (Omit<EventInput, "payload" | "type"> & {
1265
1309
  readonly type: "runtime.run.completed";
1266
1310
  readonly payload: {
1267
1311
  readonly output: import("effect/Schema").Json;
1268
1312
  readonly error: string | null;
1269
1313
  };
1270
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1314
+ }) | (Omit<EventInput, "payload" | "type"> & {
1315
+ readonly type: "runtime.run.forked";
1316
+ readonly payload: {
1317
+ readonly sourceRunId: string;
1318
+ readonly sourceSeq: number;
1319
+ };
1320
+ }) | (Omit<EventInput, "payload" | "type"> & {
1271
1321
  readonly type: "runtime.run.started";
1272
1322
  readonly payload: {
1273
1323
  readonly rootThreadId?: string | undefined;
@@ -1277,42 +1327,43 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1277
1327
  readonly input: import("effect/Schema").Json;
1278
1328
  readonly requestedThreadId?: string | null | undefined;
1279
1329
  };
1280
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1330
+ }) | (Omit<EventInput, "payload" | "type"> & {
1281
1331
  readonly type: "runtime.signal.received";
1282
1332
  readonly payload: {
1283
1333
  readonly signalType: string;
1284
1334
  };
1285
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1335
+ }) | (Omit<EventInput, "payload" | "type"> & {
1286
1336
  readonly type: "runtime.snapshot.taken";
1287
1337
  readonly payload: {
1288
1338
  readonly seq: number;
1289
1339
  readonly stateHash: string;
1290
1340
  readonly state?: import("effect/Schema").Json | undefined;
1291
1341
  };
1292
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1342
+ }) | (Omit<EventInput, "payload" | "type"> & {
1293
1343
  readonly type: "runtime.thread.cancel.requested";
1294
1344
  readonly payload: {
1295
1345
  readonly threadId: string;
1296
1346
  };
1297
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1347
+ }) | (Omit<EventInput, "payload" | "type"> & {
1298
1348
  readonly type: "runtime.thread.cancelled";
1299
1349
  readonly payload: {
1300
1350
  readonly threadId: string;
1301
1351
  readonly reason?: string | undefined;
1352
+ readonly resumeSeq?: number | undefined;
1302
1353
  };
1303
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1354
+ }) | (Omit<EventInput, "payload" | "type"> & {
1304
1355
  readonly type: "runtime.thread.completed";
1305
1356
  readonly payload: {
1306
1357
  readonly threadId: string;
1307
1358
  readonly output: import("effect/Schema").Json;
1308
1359
  };
1309
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1360
+ }) | (Omit<EventInput, "payload" | "type"> & {
1310
1361
  readonly type: "runtime.thread.failed";
1311
1362
  readonly payload: {
1312
1363
  readonly threadId: string;
1313
1364
  readonly error: string;
1314
1365
  };
1315
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1366
+ }) | (Omit<EventInput, "payload" | "type"> & {
1316
1367
  readonly type: "runtime.thread.started";
1317
1368
  readonly payload: {
1318
1369
  readonly threadId: string;
@@ -1322,20 +1373,20 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1322
1373
  readonly input: import("effect/Schema").Json;
1323
1374
  readonly parentThreadId: string | null;
1324
1375
  };
1325
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1376
+ }) | (Omit<EventInput, "payload" | "type"> & {
1326
1377
  readonly type: "runtime.timer.fired";
1327
1378
  readonly payload: {
1328
1379
  readonly timerId: string;
1329
1380
  readonly waitId: string;
1330
1381
  };
1331
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1382
+ }) | (Omit<EventInput, "payload" | "type"> & {
1332
1383
  readonly type: "runtime.timer.set";
1333
1384
  readonly payload: {
1334
1385
  readonly timerId: string;
1335
1386
  readonly waitId: string;
1336
1387
  readonly wakeAt: number;
1337
1388
  };
1338
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1389
+ }) | (Omit<EventInput, "payload" | "type"> & {
1339
1390
  readonly type: "runtime.wait.registered";
1340
1391
  readonly payload: {
1341
1392
  readonly waitId: string;
@@ -1348,7 +1399,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1348
1399
  };
1349
1400
  readonly tag?: import("effect/Schema").Json | undefined;
1350
1401
  };
1351
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1402
+ }) | (Omit<EventInput, "payload" | "type"> & {
1352
1403
  readonly type: "runtime.wait.satisfied";
1353
1404
  readonly payload: {
1354
1405
  readonly waitId: string;
@@ -1369,7 +1420,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1369
1420
  readonly name: string;
1370
1421
  readonly arguments: import("effect/Schema").Json;
1371
1422
  };
1372
- }, import("./definitions-store").AgentDefinitionsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1423
+ }, import("./definitions-store").AgentDefinitionsTag, (Omit<EventInput, "payload" | "type"> & {
1373
1424
  readonly type: "agent.effects.requested";
1374
1425
  readonly payload: {
1375
1426
  readonly toolCallId: string;
@@ -1435,7 +1486,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1435
1486
  readonly match?: import("effect/Schema").Json | undefined;
1436
1487
  } | undefined;
1437
1488
  };
1438
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1489
+ }) | (Omit<EventInput, "payload" | "type"> & {
1439
1490
  readonly type: "agent.message";
1440
1491
  readonly payload: {
1441
1492
  readonly turn: number;
@@ -1455,7 +1506,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1455
1506
  readonly output: number;
1456
1507
  } | undefined;
1457
1508
  };
1458
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1509
+ }) | (Omit<EventInput, "payload" | "type"> & {
1459
1510
  readonly type: "agent.message.received";
1460
1511
  readonly payload: {
1461
1512
  readonly message: {
@@ -1470,10 +1521,10 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1470
1521
  }[] | undefined;
1471
1522
  };
1472
1523
  };
1473
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1524
+ }) | (Omit<EventInput, "payload" | "type"> & {
1474
1525
  readonly type: "agent.session.cancel.requested";
1475
1526
  readonly payload: {};
1476
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1527
+ }) | (Omit<EventInput, "payload" | "type"> & {
1477
1528
  readonly type: "agent.session.message.submitted";
1478
1529
  readonly payload: {
1479
1530
  readonly messageId: string;
@@ -1481,26 +1532,26 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1481
1532
  readonly delivery?: "followUp" | "nextTurn" | "steer" | undefined;
1482
1533
  readonly activeChildThreadId?: string | undefined;
1483
1534
  };
1484
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1535
+ }) | (Omit<EventInput, "payload" | "type"> & {
1485
1536
  readonly type: "agent.session.steer.delivered";
1486
1537
  readonly payload: {
1487
1538
  readonly messageId: string;
1488
1539
  readonly activeMessageId: string;
1489
1540
  };
1490
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1541
+ }) | (Omit<EventInput, "payload" | "type"> & {
1491
1542
  readonly type: "agent.session.turn.closed";
1492
1543
  readonly payload: {
1493
1544
  readonly messageId: string;
1494
1545
  readonly status: "cancelled" | "completed" | "failed";
1495
1546
  readonly error?: string | undefined;
1496
1547
  };
1497
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1548
+ }) | (Omit<EventInput, "payload" | "type"> & {
1498
1549
  readonly type: "agent.session.turn.started";
1499
1550
  readonly payload: {
1500
1551
  readonly messageId: string;
1501
1552
  readonly childThreadId: string;
1502
1553
  };
1503
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1554
+ }) | (Omit<EventInput, "payload" | "type"> & {
1504
1555
  readonly type: "agent.spawn.requested";
1505
1556
  readonly payload: {
1506
1557
  readonly childThreadId: string;
@@ -1510,7 +1561,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1510
1561
  readonly toolCallId: string;
1511
1562
  readonly input: import("effect/Schema").Json;
1512
1563
  };
1513
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1564
+ }) | (Omit<EventInput, "payload" | "type"> & {
1514
1565
  readonly type: "agent.steered";
1515
1566
  readonly payload: {
1516
1567
  readonly turn: number;
@@ -1528,7 +1579,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1528
1579
  };
1529
1580
  readonly interrupt?: boolean | undefined;
1530
1581
  };
1531
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1582
+ }) | (Omit<EventInput, "payload" | "type"> & {
1532
1583
  readonly type: "agent.tool.result";
1533
1584
  readonly payload: {
1534
1585
  readonly turn: number;
@@ -1537,7 +1588,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1537
1588
  readonly result: import("effect/Schema").Json;
1538
1589
  readonly error: string | null;
1539
1590
  };
1540
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1591
+ }) | (Omit<EventInput, "payload" | "type"> & {
1541
1592
  readonly type: "agent.tool_call.requested";
1542
1593
  readonly payload: {
1543
1594
  readonly turn: number;
@@ -1547,63 +1598,66 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1547
1598
  readonly arguments: import("effect/Schema").Json;
1548
1599
  };
1549
1600
  };
1550
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1601
+ }) | (Omit<EventInput, "payload" | "type"> & {
1551
1602
  readonly type: "agent.turn.started";
1552
1603
  readonly payload: {
1553
1604
  readonly turn: number;
1554
1605
  };
1555
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1606
+ }) | (Omit<EventInput, "payload" | "type"> & {
1607
+ readonly type: "agent.turn.stopped";
1608
+ readonly payload: {};
1609
+ }) | (Omit<EventInput, "payload" | "type"> & {
1556
1610
  readonly type: "agent.turn.text_delta";
1557
1611
  readonly payload: {
1558
1612
  readonly turn: number;
1559
1613
  readonly delta: string;
1560
1614
  };
1561
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1615
+ }) | (Omit<EventInput, "payload" | "type"> & {
1562
1616
  readonly type: "runtime.effect.ambiguous";
1563
1617
  readonly payload: {
1564
1618
  readonly effectId: string;
1565
1619
  readonly attempt: number;
1566
1620
  readonly error: string;
1567
1621
  };
1568
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1622
+ }) | (Omit<EventInput, "payload" | "type"> & {
1569
1623
  readonly type: "runtime.effect.attempt.started";
1570
1624
  readonly payload: {
1571
1625
  readonly effectId: string;
1572
1626
  readonly attempt: number;
1573
1627
  };
1574
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1628
+ }) | (Omit<EventInput, "payload" | "type"> & {
1575
1629
  readonly type: "runtime.effect.cancel.requested";
1576
1630
  readonly payload: {
1577
1631
  readonly effectId: string;
1578
1632
  readonly attempt: number;
1579
1633
  readonly deadlineAt: number | null;
1580
1634
  };
1581
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1635
+ }) | (Omit<EventInput, "payload" | "type"> & {
1582
1636
  readonly type: "runtime.effect.cancelled";
1583
1637
  readonly payload: {
1584
1638
  readonly effectId: string;
1585
1639
  readonly attempt: number;
1586
1640
  };
1587
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1641
+ }) | (Omit<EventInput, "payload" | "type"> & {
1588
1642
  readonly type: "runtime.effect.completed";
1589
1643
  readonly payload: {
1590
1644
  readonly effectId: string;
1591
1645
  readonly attempt: number;
1592
1646
  };
1593
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1647
+ }) | (Omit<EventInput, "payload" | "type"> & {
1594
1648
  readonly type: "runtime.effect.dispatched";
1595
1649
  readonly payload: {
1596
1650
  readonly effectId: string;
1597
1651
  readonly attempt: number;
1598
1652
  readonly deadlineAt: number | null;
1599
1653
  };
1600
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1654
+ }) | (Omit<EventInput, "payload" | "type"> & {
1601
1655
  readonly type: "runtime.effect.failed";
1602
1656
  readonly payload: {
1603
1657
  readonly effectId: string;
1604
1658
  readonly error: string;
1605
1659
  };
1606
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1660
+ }) | (Omit<EventInput, "payload" | "type"> & {
1607
1661
  readonly type: "runtime.effect.heartbeat";
1608
1662
  readonly payload: {
1609
1663
  readonly effectId: string;
@@ -1611,14 +1665,14 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1611
1665
  readonly heartbeatAt: number;
1612
1666
  readonly deadlineAt: number | null;
1613
1667
  };
1614
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1668
+ }) | (Omit<EventInput, "payload" | "type"> & {
1615
1669
  readonly type: "runtime.effect.queued";
1616
1670
  readonly payload: {
1617
1671
  readonly effectId: string;
1618
1672
  readonly attempt: number;
1619
1673
  readonly deadlineAt: number | null;
1620
1674
  };
1621
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1675
+ }) | (Omit<EventInput, "payload" | "type"> & {
1622
1676
  readonly type: "runtime.effect.retry.scheduled";
1623
1677
  readonly payload: {
1624
1678
  readonly effectId: string;
@@ -1626,32 +1680,43 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1626
1680
  readonly nextAttemptAt: number;
1627
1681
  readonly error: string;
1628
1682
  };
1629
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1683
+ }) | (Omit<EventInput, "payload" | "type"> & {
1630
1684
  readonly type: "runtime.effect.timed_out";
1631
1685
  readonly payload: {
1632
1686
  readonly effectId: string;
1633
1687
  readonly attempt: number;
1634
1688
  readonly timeout: string;
1635
1689
  };
1636
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1690
+ }) | (Omit<EventInput, "payload" | "type"> & {
1637
1691
  readonly type: "runtime.effect.worker.started";
1638
1692
  readonly payload: {
1639
1693
  readonly effectId: string;
1640
1694
  readonly attempt: number;
1641
1695
  readonly deadlineAt: number | null;
1642
1696
  };
1643
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1697
+ }) | (Omit<EventInput, "payload" | "type"> & {
1698
+ readonly type: "runtime.fork.elided";
1699
+ readonly payload: {
1700
+ readonly type: string;
1701
+ };
1702
+ }) | (Omit<EventInput, "payload" | "type"> & {
1644
1703
  readonly type: "runtime.run.cancelled";
1645
1704
  readonly payload: {
1646
1705
  readonly reason?: string | undefined;
1647
1706
  };
1648
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1707
+ }) | (Omit<EventInput, "payload" | "type"> & {
1649
1708
  readonly type: "runtime.run.completed";
1650
1709
  readonly payload: {
1651
1710
  readonly output: import("effect/Schema").Json;
1652
1711
  readonly error: string | null;
1653
1712
  };
1654
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1713
+ }) | (Omit<EventInput, "payload" | "type"> & {
1714
+ readonly type: "runtime.run.forked";
1715
+ readonly payload: {
1716
+ readonly sourceRunId: string;
1717
+ readonly sourceSeq: number;
1718
+ };
1719
+ }) | (Omit<EventInput, "payload" | "type"> & {
1655
1720
  readonly type: "runtime.run.started";
1656
1721
  readonly payload: {
1657
1722
  readonly rootThreadId?: string | undefined;
@@ -1661,42 +1726,43 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1661
1726
  readonly input: import("effect/Schema").Json;
1662
1727
  readonly requestedThreadId?: string | null | undefined;
1663
1728
  };
1664
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1729
+ }) | (Omit<EventInput, "payload" | "type"> & {
1665
1730
  readonly type: "runtime.signal.received";
1666
1731
  readonly payload: {
1667
1732
  readonly signalType: string;
1668
1733
  };
1669
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1734
+ }) | (Omit<EventInput, "payload" | "type"> & {
1670
1735
  readonly type: "runtime.snapshot.taken";
1671
1736
  readonly payload: {
1672
1737
  readonly seq: number;
1673
1738
  readonly stateHash: string;
1674
1739
  readonly state?: import("effect/Schema").Json | undefined;
1675
1740
  };
1676
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1741
+ }) | (Omit<EventInput, "payload" | "type"> & {
1677
1742
  readonly type: "runtime.thread.cancel.requested";
1678
1743
  readonly payload: {
1679
1744
  readonly threadId: string;
1680
1745
  };
1681
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1746
+ }) | (Omit<EventInput, "payload" | "type"> & {
1682
1747
  readonly type: "runtime.thread.cancelled";
1683
1748
  readonly payload: {
1684
1749
  readonly threadId: string;
1685
1750
  readonly reason?: string | undefined;
1751
+ readonly resumeSeq?: number | undefined;
1686
1752
  };
1687
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1753
+ }) | (Omit<EventInput, "payload" | "type"> & {
1688
1754
  readonly type: "runtime.thread.completed";
1689
1755
  readonly payload: {
1690
1756
  readonly threadId: string;
1691
1757
  readonly output: import("effect/Schema").Json;
1692
1758
  };
1693
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1759
+ }) | (Omit<EventInput, "payload" | "type"> & {
1694
1760
  readonly type: "runtime.thread.failed";
1695
1761
  readonly payload: {
1696
1762
  readonly threadId: string;
1697
1763
  readonly error: string;
1698
1764
  };
1699
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1765
+ }) | (Omit<EventInput, "payload" | "type"> & {
1700
1766
  readonly type: "runtime.thread.started";
1701
1767
  readonly payload: {
1702
1768
  readonly threadId: string;
@@ -1706,20 +1772,20 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1706
1772
  readonly input: import("effect/Schema").Json;
1707
1773
  readonly parentThreadId: string | null;
1708
1774
  };
1709
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1775
+ }) | (Omit<EventInput, "payload" | "type"> & {
1710
1776
  readonly type: "runtime.timer.fired";
1711
1777
  readonly payload: {
1712
1778
  readonly timerId: string;
1713
1779
  readonly waitId: string;
1714
1780
  };
1715
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1781
+ }) | (Omit<EventInput, "payload" | "type"> & {
1716
1782
  readonly type: "runtime.timer.set";
1717
1783
  readonly payload: {
1718
1784
  readonly timerId: string;
1719
1785
  readonly waitId: string;
1720
1786
  readonly wakeAt: number;
1721
1787
  };
1722
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1788
+ }) | (Omit<EventInput, "payload" | "type"> & {
1723
1789
  readonly type: "runtime.wait.registered";
1724
1790
  readonly payload: {
1725
1791
  readonly waitId: string;
@@ -1732,7 +1798,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1732
1798
  };
1733
1799
  readonly tag?: import("effect/Schema").Json | undefined;
1734
1800
  };
1735
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1801
+ }) | (Omit<EventInput, "payload" | "type"> & {
1736
1802
  readonly type: "runtime.wait.satisfied";
1737
1803
  readonly payload: {
1738
1804
  readonly waitId: string;
@@ -1767,5 +1833,9 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
1767
1833
  readonly input: number;
1768
1834
  readonly output: number;
1769
1835
  }>;
1836
+ turnActivity: import("@swirls/looms/core").ProjectionDefinition<{
1837
+ readonly rootThreadId: string | null;
1838
+ readonly active: boolean;
1839
+ }>;
1770
1840
  };
1771
1841
  };