@swirls/looms 0.23.0 → 0.25.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 (53) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/agent/threads.js +4 -1
  3. package/dist/approval/effects.d.ts +26 -26
  4. package/dist/approval/module.d.ts +52 -52
  5. package/dist/debugger/app/assets/index-GLtrulmj.js +23 -0
  6. package/dist/debugger/app/assets/{routes-Ch30UGik.js → routes-CECZJJob.js} +1 -1
  7. package/dist/debugger/app/index.html +1 -1
  8. package/dist/evaluator/effects.d.ts +33 -33
  9. package/dist/evaluator/module.d.ts +66 -66
  10. package/dist/nats/index.d.ts +1 -1
  11. package/dist/nats/index.js +1 -1
  12. package/dist/nats/projector.d.ts +17 -0
  13. package/dist/nats/projector.js +29 -8
  14. package/dist/nats/subjects.d.ts +8 -0
  15. package/dist/nats/subjects.js +10 -0
  16. package/dist/nats/transport.d.ts +10 -0
  17. package/dist/nats/transport.js +13 -4
  18. package/dist/swarm/board.d.ts +292 -0
  19. package/dist/swarm/board.js +123 -0
  20. package/dist/swarm/conformance.d.ts +15 -0
  21. package/dist/swarm/conformance.js +225 -0
  22. package/dist/swarm/definitions.d.ts +94 -0
  23. package/dist/swarm/definitions.js +51 -0
  24. package/dist/swarm/effects.d.ts +4720 -0
  25. package/dist/swarm/effects.js +296 -0
  26. package/dist/swarm/ensure.d.ts +16 -0
  27. package/dist/swarm/ensure.js +24 -0
  28. package/dist/swarm/events.d.ts +240 -0
  29. package/dist/swarm/events.js +49 -0
  30. package/dist/swarm/index.d.ts +15 -0
  31. package/dist/swarm/index.js +15 -0
  32. package/dist/swarm/memory-board.d.ts +10 -0
  33. package/dist/swarm/memory-board.js +344 -0
  34. package/dist/swarm/module.d.ts +9593 -0
  35. package/dist/swarm/module.js +94 -0
  36. package/dist/swarm/projections.d.ts +60 -0
  37. package/dist/swarm/projections.js +102 -0
  38. package/dist/swarm/prompt.d.ts +4 -0
  39. package/dist/swarm/prompt.js +35 -0
  40. package/dist/swarm/scope.d.ts +357 -0
  41. package/dist/swarm/scope.js +8 -0
  42. package/dist/swarm/services.d.ts +29 -0
  43. package/dist/swarm/services.js +40 -0
  44. package/dist/swarm/signals.d.ts +14 -0
  45. package/dist/swarm/signals.js +15 -0
  46. package/dist/swarm/steps.d.ts +15 -0
  47. package/dist/swarm/steps.js +27 -0
  48. package/dist/swarm/threads.d.ts +41 -0
  49. package/dist/swarm/threads.js +244 -0
  50. package/dist/swarm/tools.d.ts +19 -0
  51. package/dist/swarm/tools.js +100 -0
  52. package/package.json +7 -2
  53. package/dist/debugger/app/assets/index-CxbIGkpY.js +0 -22
@@ -0,0 +1,4720 @@
1
+ import { Schema } from 'effect';
2
+ import { RunLauncherTag } from '@swirls/looms/core';
3
+ import { BoardsTag, SwarmDefinitionsTag } from './services';
4
+ /** Board events read per pull. A fuller board is read over several pulls. */
5
+ export declare const PULL_LIMIT = 50;
6
+ export declare const pullEffect: NoInfer<import("@swirls/looms/core").LocalEffectDefinition<{
7
+ readonly definitionName: string;
8
+ readonly definitionVersion: string;
9
+ readonly board: string;
10
+ readonly after: string | null;
11
+ readonly pull: number;
12
+ }, BoardsTag | SwarmDefinitionsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
13
+ readonly type: "runtime.child.close.requested";
14
+ readonly payload: {
15
+ readonly policy: "terminate" | "wait";
16
+ };
17
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
18
+ readonly type: "runtime.child.settled";
19
+ readonly payload: {
20
+ readonly runId: string;
21
+ readonly status: "cancelled" | "completed" | "failed";
22
+ readonly output: Schema.Json;
23
+ readonly error: string | null;
24
+ };
25
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
26
+ readonly type: "runtime.effect.ambiguous";
27
+ readonly payload: {
28
+ readonly effectId: string;
29
+ readonly attempt: number;
30
+ readonly error: string;
31
+ };
32
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
33
+ readonly type: "runtime.effect.attempt.started";
34
+ readonly payload: {
35
+ readonly effectId: string;
36
+ readonly attempt: number;
37
+ };
38
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
39
+ readonly type: "runtime.effect.cancel.requested";
40
+ readonly payload: {
41
+ readonly effectId: string;
42
+ readonly attempt: number;
43
+ readonly deadlineAt: number | null;
44
+ };
45
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
46
+ readonly type: "runtime.effect.cancelled";
47
+ readonly payload: {
48
+ readonly effectId: string;
49
+ readonly attempt: number;
50
+ };
51
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
52
+ readonly type: "runtime.effect.completed";
53
+ readonly payload: {
54
+ readonly effectId: string;
55
+ readonly attempt: number;
56
+ };
57
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
58
+ readonly type: "runtime.effect.dispatch.deferred";
59
+ readonly payload: {
60
+ readonly effectId: string;
61
+ readonly attempt: number;
62
+ readonly retryAt: number;
63
+ readonly error: string;
64
+ readonly try: number;
65
+ };
66
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
67
+ readonly type: "runtime.effect.dispatched";
68
+ readonly payload: {
69
+ readonly effectId: string;
70
+ readonly attempt: number;
71
+ readonly deadlineAt: number | null;
72
+ };
73
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
74
+ readonly type: "runtime.effect.failed";
75
+ readonly payload: {
76
+ readonly effectId: string;
77
+ readonly error: string;
78
+ readonly nonRetryable?: boolean | undefined;
79
+ readonly retryAfterMs?: number | undefined;
80
+ };
81
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
82
+ readonly type: "runtime.effect.heartbeat";
83
+ readonly payload: {
84
+ readonly effectId: string;
85
+ readonly attempt: number;
86
+ readonly heartbeatAt: number;
87
+ readonly deadlineAt: number | null;
88
+ readonly details?: Schema.Json | undefined;
89
+ };
90
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
91
+ readonly type: "runtime.effect.queued";
92
+ readonly payload: {
93
+ readonly effectId: string;
94
+ readonly attempt: number;
95
+ readonly deadlineAt: number | null;
96
+ };
97
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
98
+ readonly type: "runtime.effect.retry.scheduled";
99
+ readonly payload: {
100
+ readonly effectId: string;
101
+ readonly attempt: number;
102
+ readonly nextAttemptAt: number;
103
+ readonly error: string;
104
+ };
105
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
106
+ readonly type: "runtime.effect.timed_out";
107
+ readonly payload: {
108
+ readonly effectId: string;
109
+ readonly attempt: number;
110
+ readonly timeout: string;
111
+ };
112
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
113
+ readonly type: "runtime.effect.worker.started";
114
+ readonly payload: {
115
+ readonly effectId: string;
116
+ readonly attempt: number;
117
+ readonly deadlineAt: number | null;
118
+ };
119
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
120
+ readonly type: "runtime.fork.elided";
121
+ readonly payload: {
122
+ readonly type: string;
123
+ };
124
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
125
+ readonly type: "runtime.run.cancelled";
126
+ readonly payload: {
127
+ readonly reason?: string | undefined;
128
+ };
129
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
130
+ readonly type: "runtime.run.completed";
131
+ readonly payload: {
132
+ readonly output: Schema.Json;
133
+ readonly error: string | null;
134
+ };
135
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
136
+ readonly type: "runtime.run.forked";
137
+ readonly payload: {
138
+ readonly sourceRunId: string;
139
+ readonly sourceSeq: number;
140
+ };
141
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
142
+ readonly type: "runtime.run.launched";
143
+ readonly payload: {
144
+ readonly runId: string;
145
+ readonly kind: string;
146
+ readonly definitionName: string;
147
+ readonly definitionVersion: string;
148
+ readonly effectId: string;
149
+ readonly close: "terminate" | "wait";
150
+ };
151
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
152
+ readonly type: "runtime.run.started";
153
+ readonly payload: {
154
+ readonly rootThreadId?: string | undefined;
155
+ readonly kind: string;
156
+ readonly definitionName: string;
157
+ readonly definitionVersion: string;
158
+ readonly input: Schema.Json;
159
+ readonly requestedThreadId?: string | null | undefined;
160
+ readonly launchedBy?: {
161
+ readonly runId: string;
162
+ readonly threadId: string;
163
+ readonly effectId: string;
164
+ readonly causationId: string;
165
+ readonly causationSeq: number;
166
+ } | undefined;
167
+ readonly attributes?: {
168
+ readonly [x: string]: string;
169
+ } | undefined;
170
+ readonly trace?: {
171
+ readonly traceparent: string;
172
+ readonly tracestate?: string | undefined;
173
+ } | undefined;
174
+ };
175
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
176
+ readonly type: "runtime.signal.received";
177
+ readonly payload: {
178
+ readonly signalType: string;
179
+ };
180
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
181
+ readonly type: "runtime.snapshot.taken";
182
+ readonly payload: {
183
+ readonly seq: number;
184
+ readonly stateHash: string;
185
+ readonly state?: Schema.Json | undefined;
186
+ };
187
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
188
+ readonly type: "runtime.thread.cancel.requested";
189
+ readonly payload: {
190
+ readonly threadId: string;
191
+ };
192
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
193
+ readonly type: "runtime.thread.cancelled";
194
+ readonly payload: {
195
+ readonly threadId: string;
196
+ readonly reason?: string | undefined;
197
+ readonly resumeSeq?: number | undefined;
198
+ };
199
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
200
+ readonly type: "runtime.thread.completed";
201
+ readonly payload: {
202
+ readonly threadId: string;
203
+ readonly output: Schema.Json;
204
+ };
205
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
206
+ readonly type: "runtime.thread.failed";
207
+ readonly payload: {
208
+ readonly threadId: string;
209
+ readonly error: string;
210
+ };
211
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
212
+ readonly type: "runtime.thread.started";
213
+ readonly payload: {
214
+ readonly threadId: string;
215
+ readonly kind: string;
216
+ readonly definitionName: string;
217
+ readonly definitionVersion: string;
218
+ readonly input: Schema.Json;
219
+ readonly parentThreadId: string | null;
220
+ };
221
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
222
+ readonly type: "runtime.timer.fired";
223
+ readonly payload: {
224
+ readonly timerId: string;
225
+ readonly waitId: string;
226
+ };
227
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
228
+ readonly type: "runtime.timer.set";
229
+ readonly payload: {
230
+ readonly timerId: string;
231
+ readonly waitId: string;
232
+ readonly wakeAt: number;
233
+ };
234
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
235
+ readonly type: "runtime.wait.registered";
236
+ readonly payload: {
237
+ readonly waitId: string;
238
+ readonly threadId?: string | undefined;
239
+ readonly on: {
240
+ readonly type: string | readonly string[];
241
+ readonly match?: Schema.Json | undefined;
242
+ } | {
243
+ readonly timerAt: number;
244
+ };
245
+ readonly tag?: Schema.Json | undefined;
246
+ };
247
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
248
+ readonly type: "runtime.wait.satisfied";
249
+ readonly payload: {
250
+ readonly waitId: string;
251
+ readonly tag?: Schema.Json | undefined;
252
+ readonly event: {
253
+ readonly id: string;
254
+ readonly type: string;
255
+ readonly payload: Schema.Json;
256
+ };
257
+ };
258
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
259
+ readonly type: "swarm.board.pulled";
260
+ readonly payload: {
261
+ readonly board: string;
262
+ readonly pull: number;
263
+ readonly cursor: string | null;
264
+ readonly events: readonly {
265
+ readonly cursor: string;
266
+ readonly type: "message.labeled" | "message.posted" | "task.blocked" | "task.canceled" | "task.claimed" | "task.completed" | "task.created" | "task.failed" | "task.ready" | "task.reopened";
267
+ readonly at: number;
268
+ readonly by: string;
269
+ readonly message?: {
270
+ readonly id: string;
271
+ readonly channel: string;
272
+ readonly text: string;
273
+ readonly by: string;
274
+ readonly re: string | null;
275
+ readonly mentions: readonly string[];
276
+ readonly labels: {
277
+ readonly [x: string]: string;
278
+ };
279
+ readonly createdAt: number;
280
+ } | undefined;
281
+ readonly task?: {
282
+ readonly id: string;
283
+ readonly channel: string;
284
+ readonly text: string;
285
+ readonly by: string;
286
+ readonly for: string | null;
287
+ readonly needs: readonly string[];
288
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
289
+ readonly holder: string | null;
290
+ readonly epoch: number;
291
+ readonly leaseUntil: number | null;
292
+ readonly note: string | null;
293
+ readonly createdAt: number;
294
+ readonly updatedAt: number;
295
+ } | undefined;
296
+ }[];
297
+ readonly more: boolean;
298
+ readonly nextPullAt: number | null;
299
+ };
300
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
301
+ readonly type: "swarm.call.rejected";
302
+ readonly payload: {
303
+ readonly callId: string;
304
+ readonly board: string;
305
+ readonly code: string;
306
+ readonly error: string;
307
+ };
308
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
309
+ readonly type: "swarm.member.activated";
310
+ readonly payload: {
311
+ readonly board: string;
312
+ readonly member: string;
313
+ readonly activation: number;
314
+ readonly runId: string;
315
+ readonly events: number;
316
+ readonly at: number;
317
+ };
318
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
319
+ readonly type: "swarm.message.labeled";
320
+ readonly payload: {
321
+ readonly callId: string;
322
+ readonly board: string;
323
+ readonly message: {
324
+ readonly id: string;
325
+ readonly channel: string;
326
+ readonly text: string;
327
+ readonly by: string;
328
+ readonly re: string | null;
329
+ readonly mentions: readonly string[];
330
+ readonly labels: {
331
+ readonly [x: string]: string;
332
+ };
333
+ readonly createdAt: number;
334
+ };
335
+ };
336
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
337
+ readonly type: "swarm.message.posted";
338
+ readonly payload: {
339
+ readonly callId: string;
340
+ readonly board: string;
341
+ readonly message: {
342
+ readonly id: string;
343
+ readonly channel: string;
344
+ readonly text: string;
345
+ readonly by: string;
346
+ readonly re: string | null;
347
+ readonly mentions: readonly string[];
348
+ readonly labels: {
349
+ readonly [x: string]: string;
350
+ };
351
+ readonly createdAt: number;
352
+ };
353
+ };
354
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
355
+ readonly type: "swarm.messages.read";
356
+ readonly payload: {
357
+ readonly callId: string;
358
+ readonly board: string;
359
+ readonly messages: readonly {
360
+ readonly id: string;
361
+ readonly channel: string;
362
+ readonly text: string;
363
+ readonly by: string;
364
+ readonly re: string | null;
365
+ readonly mentions: readonly string[];
366
+ readonly labels: {
367
+ readonly [x: string]: string;
368
+ };
369
+ readonly createdAt: number;
370
+ }[];
371
+ };
372
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
373
+ readonly type: "swarm.nudged";
374
+ readonly payload: {};
375
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
376
+ readonly type: "swarm.stopped";
377
+ readonly payload: {};
378
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
379
+ readonly type: "swarm.task.claimed";
380
+ readonly payload: {
381
+ readonly callId: string;
382
+ readonly board: string;
383
+ readonly claim: {
384
+ readonly task: {
385
+ readonly id: string;
386
+ readonly channel: string;
387
+ readonly text: string;
388
+ readonly by: string;
389
+ readonly for: string | null;
390
+ readonly needs: readonly string[];
391
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
392
+ readonly holder: string | null;
393
+ readonly epoch: number;
394
+ readonly leaseUntil: number | null;
395
+ readonly note: string | null;
396
+ readonly createdAt: number;
397
+ readonly updatedAt: number;
398
+ };
399
+ readonly token: string;
400
+ readonly until: number;
401
+ } | null;
402
+ };
403
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
404
+ readonly type: "swarm.task.created";
405
+ readonly payload: {
406
+ readonly callId: string;
407
+ readonly board: string;
408
+ readonly task: {
409
+ readonly id: string;
410
+ readonly channel: string;
411
+ readonly text: string;
412
+ readonly by: string;
413
+ readonly for: string | null;
414
+ readonly needs: readonly string[];
415
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
416
+ readonly holder: string | null;
417
+ readonly epoch: number;
418
+ readonly leaseUntil: number | null;
419
+ readonly note: string | null;
420
+ readonly createdAt: number;
421
+ readonly updatedAt: number;
422
+ };
423
+ };
424
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
425
+ readonly type: "swarm.task.settled";
426
+ readonly payload: {
427
+ readonly callId: string;
428
+ readonly board: string;
429
+ readonly task: {
430
+ readonly id: string;
431
+ readonly channel: string;
432
+ readonly text: string;
433
+ readonly by: string;
434
+ readonly for: string | null;
435
+ readonly needs: readonly string[];
436
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
437
+ readonly holder: string | null;
438
+ readonly epoch: number;
439
+ readonly leaseUntil: number | null;
440
+ readonly note: string | null;
441
+ readonly createdAt: number;
442
+ readonly updatedAt: number;
443
+ };
444
+ };
445
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
446
+ readonly type: "swarm.tasks.listed";
447
+ readonly payload: {
448
+ readonly callId: string;
449
+ readonly board: string;
450
+ readonly tasks: readonly {
451
+ readonly id: string;
452
+ readonly channel: string;
453
+ readonly text: string;
454
+ readonly by: string;
455
+ readonly for: string | null;
456
+ readonly needs: readonly string[];
457
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
458
+ readonly holder: string | null;
459
+ readonly epoch: number;
460
+ readonly leaseUntil: number | null;
461
+ readonly note: string | null;
462
+ readonly createdAt: number;
463
+ readonly updatedAt: number;
464
+ }[];
465
+ };
466
+ })>>;
467
+ /** The run id of a member's activation. Derived, so a retried activation starts the same run. */
468
+ export declare function activationRunId(swarmRunId: string, member: string, activation: number): string;
469
+ export declare const activateEffect: NoInfer<import("@swirls/looms/core").LocalEffectDefinition<{
470
+ readonly definitionName: string;
471
+ readonly definitionVersion: string;
472
+ readonly board: string;
473
+ readonly member: string;
474
+ readonly activation: number;
475
+ readonly events: readonly {
476
+ readonly cursor: string;
477
+ readonly type: "message.labeled" | "message.posted" | "task.blocked" | "task.canceled" | "task.claimed" | "task.completed" | "task.created" | "task.failed" | "task.ready" | "task.reopened";
478
+ readonly at: number;
479
+ readonly by: string;
480
+ readonly message?: {
481
+ readonly id: string;
482
+ readonly channel: string;
483
+ readonly text: string;
484
+ readonly by: string;
485
+ readonly re: string | null;
486
+ readonly mentions: readonly string[];
487
+ readonly labels: {
488
+ readonly [x: string]: string;
489
+ };
490
+ readonly createdAt: number;
491
+ } | undefined;
492
+ readonly task?: {
493
+ readonly id: string;
494
+ readonly channel: string;
495
+ readonly text: string;
496
+ readonly by: string;
497
+ readonly for: string | null;
498
+ readonly needs: readonly string[];
499
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
500
+ readonly holder: string | null;
501
+ readonly epoch: number;
502
+ readonly leaseUntil: number | null;
503
+ readonly note: string | null;
504
+ readonly createdAt: number;
505
+ readonly updatedAt: number;
506
+ } | undefined;
507
+ }[];
508
+ }, RunLauncherTag | SwarmDefinitionsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
509
+ readonly type: "runtime.child.close.requested";
510
+ readonly payload: {
511
+ readonly policy: "terminate" | "wait";
512
+ };
513
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
514
+ readonly type: "runtime.child.settled";
515
+ readonly payload: {
516
+ readonly runId: string;
517
+ readonly status: "cancelled" | "completed" | "failed";
518
+ readonly output: Schema.Json;
519
+ readonly error: string | null;
520
+ };
521
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
522
+ readonly type: "runtime.effect.ambiguous";
523
+ readonly payload: {
524
+ readonly effectId: string;
525
+ readonly attempt: number;
526
+ readonly error: string;
527
+ };
528
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
529
+ readonly type: "runtime.effect.attempt.started";
530
+ readonly payload: {
531
+ readonly effectId: string;
532
+ readonly attempt: number;
533
+ };
534
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
535
+ readonly type: "runtime.effect.cancel.requested";
536
+ readonly payload: {
537
+ readonly effectId: string;
538
+ readonly attempt: number;
539
+ readonly deadlineAt: number | null;
540
+ };
541
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
542
+ readonly type: "runtime.effect.cancelled";
543
+ readonly payload: {
544
+ readonly effectId: string;
545
+ readonly attempt: number;
546
+ };
547
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
548
+ readonly type: "runtime.effect.completed";
549
+ readonly payload: {
550
+ readonly effectId: string;
551
+ readonly attempt: number;
552
+ };
553
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
554
+ readonly type: "runtime.effect.dispatch.deferred";
555
+ readonly payload: {
556
+ readonly effectId: string;
557
+ readonly attempt: number;
558
+ readonly retryAt: number;
559
+ readonly error: string;
560
+ readonly try: number;
561
+ };
562
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
563
+ readonly type: "runtime.effect.dispatched";
564
+ readonly payload: {
565
+ readonly effectId: string;
566
+ readonly attempt: number;
567
+ readonly deadlineAt: number | null;
568
+ };
569
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
570
+ readonly type: "runtime.effect.failed";
571
+ readonly payload: {
572
+ readonly effectId: string;
573
+ readonly error: string;
574
+ readonly nonRetryable?: boolean | undefined;
575
+ readonly retryAfterMs?: number | undefined;
576
+ };
577
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
578
+ readonly type: "runtime.effect.heartbeat";
579
+ readonly payload: {
580
+ readonly effectId: string;
581
+ readonly attempt: number;
582
+ readonly heartbeatAt: number;
583
+ readonly deadlineAt: number | null;
584
+ readonly details?: Schema.Json | undefined;
585
+ };
586
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
587
+ readonly type: "runtime.effect.queued";
588
+ readonly payload: {
589
+ readonly effectId: string;
590
+ readonly attempt: number;
591
+ readonly deadlineAt: number | null;
592
+ };
593
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
594
+ readonly type: "runtime.effect.retry.scheduled";
595
+ readonly payload: {
596
+ readonly effectId: string;
597
+ readonly attempt: number;
598
+ readonly nextAttemptAt: number;
599
+ readonly error: string;
600
+ };
601
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
602
+ readonly type: "runtime.effect.timed_out";
603
+ readonly payload: {
604
+ readonly effectId: string;
605
+ readonly attempt: number;
606
+ readonly timeout: string;
607
+ };
608
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
609
+ readonly type: "runtime.effect.worker.started";
610
+ readonly payload: {
611
+ readonly effectId: string;
612
+ readonly attempt: number;
613
+ readonly deadlineAt: number | null;
614
+ };
615
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
616
+ readonly type: "runtime.fork.elided";
617
+ readonly payload: {
618
+ readonly type: string;
619
+ };
620
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
621
+ readonly type: "runtime.run.cancelled";
622
+ readonly payload: {
623
+ readonly reason?: string | undefined;
624
+ };
625
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
626
+ readonly type: "runtime.run.completed";
627
+ readonly payload: {
628
+ readonly output: Schema.Json;
629
+ readonly error: string | null;
630
+ };
631
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
632
+ readonly type: "runtime.run.forked";
633
+ readonly payload: {
634
+ readonly sourceRunId: string;
635
+ readonly sourceSeq: number;
636
+ };
637
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
638
+ readonly type: "runtime.run.launched";
639
+ readonly payload: {
640
+ readonly runId: string;
641
+ readonly kind: string;
642
+ readonly definitionName: string;
643
+ readonly definitionVersion: string;
644
+ readonly effectId: string;
645
+ readonly close: "terminate" | "wait";
646
+ };
647
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
648
+ readonly type: "runtime.run.started";
649
+ readonly payload: {
650
+ readonly rootThreadId?: string | undefined;
651
+ readonly kind: string;
652
+ readonly definitionName: string;
653
+ readonly definitionVersion: string;
654
+ readonly input: Schema.Json;
655
+ readonly requestedThreadId?: string | null | undefined;
656
+ readonly launchedBy?: {
657
+ readonly runId: string;
658
+ readonly threadId: string;
659
+ readonly effectId: string;
660
+ readonly causationId: string;
661
+ readonly causationSeq: number;
662
+ } | undefined;
663
+ readonly attributes?: {
664
+ readonly [x: string]: string;
665
+ } | undefined;
666
+ readonly trace?: {
667
+ readonly traceparent: string;
668
+ readonly tracestate?: string | undefined;
669
+ } | undefined;
670
+ };
671
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
672
+ readonly type: "runtime.signal.received";
673
+ readonly payload: {
674
+ readonly signalType: string;
675
+ };
676
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
677
+ readonly type: "runtime.snapshot.taken";
678
+ readonly payload: {
679
+ readonly seq: number;
680
+ readonly stateHash: string;
681
+ readonly state?: Schema.Json | undefined;
682
+ };
683
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
684
+ readonly type: "runtime.thread.cancel.requested";
685
+ readonly payload: {
686
+ readonly threadId: string;
687
+ };
688
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
689
+ readonly type: "runtime.thread.cancelled";
690
+ readonly payload: {
691
+ readonly threadId: string;
692
+ readonly reason?: string | undefined;
693
+ readonly resumeSeq?: number | undefined;
694
+ };
695
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
696
+ readonly type: "runtime.thread.completed";
697
+ readonly payload: {
698
+ readonly threadId: string;
699
+ readonly output: Schema.Json;
700
+ };
701
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
702
+ readonly type: "runtime.thread.failed";
703
+ readonly payload: {
704
+ readonly threadId: string;
705
+ readonly error: string;
706
+ };
707
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
708
+ readonly type: "runtime.thread.started";
709
+ readonly payload: {
710
+ readonly threadId: string;
711
+ readonly kind: string;
712
+ readonly definitionName: string;
713
+ readonly definitionVersion: string;
714
+ readonly input: Schema.Json;
715
+ readonly parentThreadId: string | null;
716
+ };
717
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
718
+ readonly type: "runtime.timer.fired";
719
+ readonly payload: {
720
+ readonly timerId: string;
721
+ readonly waitId: string;
722
+ };
723
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
724
+ readonly type: "runtime.timer.set";
725
+ readonly payload: {
726
+ readonly timerId: string;
727
+ readonly waitId: string;
728
+ readonly wakeAt: number;
729
+ };
730
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
731
+ readonly type: "runtime.wait.registered";
732
+ readonly payload: {
733
+ readonly waitId: string;
734
+ readonly threadId?: string | undefined;
735
+ readonly on: {
736
+ readonly type: string | readonly string[];
737
+ readonly match?: Schema.Json | undefined;
738
+ } | {
739
+ readonly timerAt: number;
740
+ };
741
+ readonly tag?: Schema.Json | undefined;
742
+ };
743
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
744
+ readonly type: "runtime.wait.satisfied";
745
+ readonly payload: {
746
+ readonly waitId: string;
747
+ readonly tag?: Schema.Json | undefined;
748
+ readonly event: {
749
+ readonly id: string;
750
+ readonly type: string;
751
+ readonly payload: Schema.Json;
752
+ };
753
+ };
754
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
755
+ readonly type: "swarm.board.pulled";
756
+ readonly payload: {
757
+ readonly board: string;
758
+ readonly pull: number;
759
+ readonly cursor: string | null;
760
+ readonly events: readonly {
761
+ readonly cursor: string;
762
+ readonly type: "message.labeled" | "message.posted" | "task.blocked" | "task.canceled" | "task.claimed" | "task.completed" | "task.created" | "task.failed" | "task.ready" | "task.reopened";
763
+ readonly at: number;
764
+ readonly by: string;
765
+ readonly message?: {
766
+ readonly id: string;
767
+ readonly channel: string;
768
+ readonly text: string;
769
+ readonly by: string;
770
+ readonly re: string | null;
771
+ readonly mentions: readonly string[];
772
+ readonly labels: {
773
+ readonly [x: string]: string;
774
+ };
775
+ readonly createdAt: number;
776
+ } | undefined;
777
+ readonly task?: {
778
+ readonly id: string;
779
+ readonly channel: string;
780
+ readonly text: string;
781
+ readonly by: string;
782
+ readonly for: string | null;
783
+ readonly needs: readonly string[];
784
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
785
+ readonly holder: string | null;
786
+ readonly epoch: number;
787
+ readonly leaseUntil: number | null;
788
+ readonly note: string | null;
789
+ readonly createdAt: number;
790
+ readonly updatedAt: number;
791
+ } | undefined;
792
+ }[];
793
+ readonly more: boolean;
794
+ readonly nextPullAt: number | null;
795
+ };
796
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
797
+ readonly type: "swarm.call.rejected";
798
+ readonly payload: {
799
+ readonly callId: string;
800
+ readonly board: string;
801
+ readonly code: string;
802
+ readonly error: string;
803
+ };
804
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
805
+ readonly type: "swarm.member.activated";
806
+ readonly payload: {
807
+ readonly board: string;
808
+ readonly member: string;
809
+ readonly activation: number;
810
+ readonly runId: string;
811
+ readonly events: number;
812
+ readonly at: number;
813
+ };
814
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
815
+ readonly type: "swarm.message.labeled";
816
+ readonly payload: {
817
+ readonly callId: string;
818
+ readonly board: string;
819
+ readonly message: {
820
+ readonly id: string;
821
+ readonly channel: string;
822
+ readonly text: string;
823
+ readonly by: string;
824
+ readonly re: string | null;
825
+ readonly mentions: readonly string[];
826
+ readonly labels: {
827
+ readonly [x: string]: string;
828
+ };
829
+ readonly createdAt: number;
830
+ };
831
+ };
832
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
833
+ readonly type: "swarm.message.posted";
834
+ readonly payload: {
835
+ readonly callId: string;
836
+ readonly board: string;
837
+ readonly message: {
838
+ readonly id: string;
839
+ readonly channel: string;
840
+ readonly text: string;
841
+ readonly by: string;
842
+ readonly re: string | null;
843
+ readonly mentions: readonly string[];
844
+ readonly labels: {
845
+ readonly [x: string]: string;
846
+ };
847
+ readonly createdAt: number;
848
+ };
849
+ };
850
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
851
+ readonly type: "swarm.messages.read";
852
+ readonly payload: {
853
+ readonly callId: string;
854
+ readonly board: string;
855
+ readonly messages: readonly {
856
+ readonly id: string;
857
+ readonly channel: string;
858
+ readonly text: string;
859
+ readonly by: string;
860
+ readonly re: string | null;
861
+ readonly mentions: readonly string[];
862
+ readonly labels: {
863
+ readonly [x: string]: string;
864
+ };
865
+ readonly createdAt: number;
866
+ }[];
867
+ };
868
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
869
+ readonly type: "swarm.nudged";
870
+ readonly payload: {};
871
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
872
+ readonly type: "swarm.stopped";
873
+ readonly payload: {};
874
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
875
+ readonly type: "swarm.task.claimed";
876
+ readonly payload: {
877
+ readonly callId: string;
878
+ readonly board: string;
879
+ readonly claim: {
880
+ readonly task: {
881
+ readonly id: string;
882
+ readonly channel: string;
883
+ readonly text: string;
884
+ readonly by: string;
885
+ readonly for: string | null;
886
+ readonly needs: readonly string[];
887
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
888
+ readonly holder: string | null;
889
+ readonly epoch: number;
890
+ readonly leaseUntil: number | null;
891
+ readonly note: string | null;
892
+ readonly createdAt: number;
893
+ readonly updatedAt: number;
894
+ };
895
+ readonly token: string;
896
+ readonly until: number;
897
+ } | null;
898
+ };
899
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
900
+ readonly type: "swarm.task.created";
901
+ readonly payload: {
902
+ readonly callId: string;
903
+ readonly board: string;
904
+ readonly task: {
905
+ readonly id: string;
906
+ readonly channel: string;
907
+ readonly text: string;
908
+ readonly by: string;
909
+ readonly for: string | null;
910
+ readonly needs: readonly string[];
911
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
912
+ readonly holder: string | null;
913
+ readonly epoch: number;
914
+ readonly leaseUntil: number | null;
915
+ readonly note: string | null;
916
+ readonly createdAt: number;
917
+ readonly updatedAt: number;
918
+ };
919
+ };
920
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
921
+ readonly type: "swarm.task.settled";
922
+ readonly payload: {
923
+ readonly callId: string;
924
+ readonly board: string;
925
+ readonly task: {
926
+ readonly id: string;
927
+ readonly channel: string;
928
+ readonly text: string;
929
+ readonly by: string;
930
+ readonly for: string | null;
931
+ readonly needs: readonly string[];
932
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
933
+ readonly holder: string | null;
934
+ readonly epoch: number;
935
+ readonly leaseUntil: number | null;
936
+ readonly note: string | null;
937
+ readonly createdAt: number;
938
+ readonly updatedAt: number;
939
+ };
940
+ };
941
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
942
+ readonly type: "swarm.tasks.listed";
943
+ readonly payload: {
944
+ readonly callId: string;
945
+ readonly board: string;
946
+ readonly tasks: readonly {
947
+ readonly id: string;
948
+ readonly channel: string;
949
+ readonly text: string;
950
+ readonly by: string;
951
+ readonly for: string | null;
952
+ readonly needs: readonly string[];
953
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
954
+ readonly holder: string | null;
955
+ readonly epoch: number;
956
+ readonly leaseUntil: number | null;
957
+ readonly note: string | null;
958
+ readonly createdAt: number;
959
+ readonly updatedAt: number;
960
+ }[];
961
+ };
962
+ })>>;
963
+ export declare const PostArgsSchema: Schema.Struct<{
964
+ readonly channel: Schema.String;
965
+ readonly text: Schema.String;
966
+ readonly labels: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
967
+ }>;
968
+ export declare const ReplyArgsSchema: Schema.Struct<{
969
+ /** Any message of the thread to reply in. */
970
+ readonly to: Schema.String;
971
+ readonly text: Schema.String;
972
+ }>;
973
+ export declare const ReadArgsSchema: Schema.Struct<{
974
+ readonly channel: Schema.optional<Schema.String>;
975
+ readonly thread: Schema.optional<Schema.String>;
976
+ readonly by: Schema.optional<Schema.String>;
977
+ /** Only messages that mention the caller. */
978
+ readonly mentionsMe: Schema.optional<Schema.Boolean>;
979
+ readonly after: Schema.optional<Schema.String>;
980
+ readonly limit: Schema.optional<Schema.Finite>;
981
+ }>;
982
+ export declare const LabelArgsSchema: Schema.Struct<{
983
+ readonly message: Schema.String;
984
+ readonly set: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
985
+ readonly unset: Schema.optional<Schema.$Array<Schema.String>>;
986
+ readonly if: Schema.optional<Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>>;
987
+ }>;
988
+ export declare const CreateTaskArgsSchema: Schema.Struct<{
989
+ readonly channel: Schema.String;
990
+ readonly text: Schema.String;
991
+ readonly for: Schema.optional<Schema.String>;
992
+ readonly needs: Schema.optional<Schema.$Array<Schema.String>>;
993
+ }>;
994
+ export declare const ListTasksArgsSchema: Schema.Struct<{
995
+ readonly channel: Schema.optional<Schema.String>;
996
+ readonly state: Schema.optional<Schema.Union<readonly [Schema.Literal<"waiting">, Schema.Literal<"ready">, Schema.Literal<"claimed">, Schema.Literal<"blocked">, Schema.Literal<"completed">, Schema.Literal<"failed">, Schema.Literal<"canceled">]>>;
997
+ readonly for: Schema.optional<Schema.String>;
998
+ }>;
999
+ export declare const ClaimTaskArgsSchema: Schema.Struct<{
1000
+ readonly task: Schema.optional<Schema.String>;
1001
+ readonly channel: Schema.optional<Schema.String>;
1002
+ readonly leaseMs: Schema.optional<Schema.Finite>;
1003
+ }>;
1004
+ export declare const SettleTaskArgsSchema: Schema.Struct<{
1005
+ readonly task: Schema.String;
1006
+ readonly token: Schema.String;
1007
+ readonly outcome: Schema.Union<readonly [Schema.Literal<"completed">, Schema.Literal<"failed">, Schema.Literal<"blocked">, Schema.Literal<"released">]>;
1008
+ readonly note: Schema.optional<Schema.String>;
1009
+ }>;
1010
+ export declare const postEffect: NoInfer<import("@swirls/looms/core").LocalEffectDefinition<{
1011
+ readonly callId: string;
1012
+ readonly board: string;
1013
+ readonly as: string;
1014
+ readonly channel: string;
1015
+ readonly text: string;
1016
+ readonly labels?: {
1017
+ readonly [x: string]: string;
1018
+ } | undefined;
1019
+ }, BoardsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1020
+ readonly type: "runtime.child.close.requested";
1021
+ readonly payload: {
1022
+ readonly policy: "terminate" | "wait";
1023
+ };
1024
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1025
+ readonly type: "runtime.child.settled";
1026
+ readonly payload: {
1027
+ readonly runId: string;
1028
+ readonly status: "cancelled" | "completed" | "failed";
1029
+ readonly output: Schema.Json;
1030
+ readonly error: string | null;
1031
+ };
1032
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1033
+ readonly type: "runtime.effect.ambiguous";
1034
+ readonly payload: {
1035
+ readonly effectId: string;
1036
+ readonly attempt: number;
1037
+ readonly error: string;
1038
+ };
1039
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1040
+ readonly type: "runtime.effect.attempt.started";
1041
+ readonly payload: {
1042
+ readonly effectId: string;
1043
+ readonly attempt: number;
1044
+ };
1045
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1046
+ readonly type: "runtime.effect.cancel.requested";
1047
+ readonly payload: {
1048
+ readonly effectId: string;
1049
+ readonly attempt: number;
1050
+ readonly deadlineAt: number | null;
1051
+ };
1052
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1053
+ readonly type: "runtime.effect.cancelled";
1054
+ readonly payload: {
1055
+ readonly effectId: string;
1056
+ readonly attempt: number;
1057
+ };
1058
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1059
+ readonly type: "runtime.effect.completed";
1060
+ readonly payload: {
1061
+ readonly effectId: string;
1062
+ readonly attempt: number;
1063
+ };
1064
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1065
+ readonly type: "runtime.effect.dispatch.deferred";
1066
+ readonly payload: {
1067
+ readonly effectId: string;
1068
+ readonly attempt: number;
1069
+ readonly retryAt: number;
1070
+ readonly error: string;
1071
+ readonly try: number;
1072
+ };
1073
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1074
+ readonly type: "runtime.effect.dispatched";
1075
+ readonly payload: {
1076
+ readonly effectId: string;
1077
+ readonly attempt: number;
1078
+ readonly deadlineAt: number | null;
1079
+ };
1080
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1081
+ readonly type: "runtime.effect.failed";
1082
+ readonly payload: {
1083
+ readonly effectId: string;
1084
+ readonly error: string;
1085
+ readonly nonRetryable?: boolean | undefined;
1086
+ readonly retryAfterMs?: number | undefined;
1087
+ };
1088
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1089
+ readonly type: "runtime.effect.heartbeat";
1090
+ readonly payload: {
1091
+ readonly effectId: string;
1092
+ readonly attempt: number;
1093
+ readonly heartbeatAt: number;
1094
+ readonly deadlineAt: number | null;
1095
+ readonly details?: Schema.Json | undefined;
1096
+ };
1097
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1098
+ readonly type: "runtime.effect.queued";
1099
+ readonly payload: {
1100
+ readonly effectId: string;
1101
+ readonly attempt: number;
1102
+ readonly deadlineAt: number | null;
1103
+ };
1104
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1105
+ readonly type: "runtime.effect.retry.scheduled";
1106
+ readonly payload: {
1107
+ readonly effectId: string;
1108
+ readonly attempt: number;
1109
+ readonly nextAttemptAt: number;
1110
+ readonly error: string;
1111
+ };
1112
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1113
+ readonly type: "runtime.effect.timed_out";
1114
+ readonly payload: {
1115
+ readonly effectId: string;
1116
+ readonly attempt: number;
1117
+ readonly timeout: string;
1118
+ };
1119
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1120
+ readonly type: "runtime.effect.worker.started";
1121
+ readonly payload: {
1122
+ readonly effectId: string;
1123
+ readonly attempt: number;
1124
+ readonly deadlineAt: number | null;
1125
+ };
1126
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1127
+ readonly type: "runtime.fork.elided";
1128
+ readonly payload: {
1129
+ readonly type: string;
1130
+ };
1131
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1132
+ readonly type: "runtime.run.cancelled";
1133
+ readonly payload: {
1134
+ readonly reason?: string | undefined;
1135
+ };
1136
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1137
+ readonly type: "runtime.run.completed";
1138
+ readonly payload: {
1139
+ readonly output: Schema.Json;
1140
+ readonly error: string | null;
1141
+ };
1142
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1143
+ readonly type: "runtime.run.forked";
1144
+ readonly payload: {
1145
+ readonly sourceRunId: string;
1146
+ readonly sourceSeq: number;
1147
+ };
1148
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1149
+ readonly type: "runtime.run.launched";
1150
+ readonly payload: {
1151
+ readonly runId: string;
1152
+ readonly kind: string;
1153
+ readonly definitionName: string;
1154
+ readonly definitionVersion: string;
1155
+ readonly effectId: string;
1156
+ readonly close: "terminate" | "wait";
1157
+ };
1158
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1159
+ readonly type: "runtime.run.started";
1160
+ readonly payload: {
1161
+ readonly rootThreadId?: string | undefined;
1162
+ readonly kind: string;
1163
+ readonly definitionName: string;
1164
+ readonly definitionVersion: string;
1165
+ readonly input: Schema.Json;
1166
+ readonly requestedThreadId?: string | null | undefined;
1167
+ readonly launchedBy?: {
1168
+ readonly runId: string;
1169
+ readonly threadId: string;
1170
+ readonly effectId: string;
1171
+ readonly causationId: string;
1172
+ readonly causationSeq: number;
1173
+ } | undefined;
1174
+ readonly attributes?: {
1175
+ readonly [x: string]: string;
1176
+ } | undefined;
1177
+ readonly trace?: {
1178
+ readonly traceparent: string;
1179
+ readonly tracestate?: string | undefined;
1180
+ } | undefined;
1181
+ };
1182
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1183
+ readonly type: "runtime.signal.received";
1184
+ readonly payload: {
1185
+ readonly signalType: string;
1186
+ };
1187
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1188
+ readonly type: "runtime.snapshot.taken";
1189
+ readonly payload: {
1190
+ readonly seq: number;
1191
+ readonly stateHash: string;
1192
+ readonly state?: Schema.Json | undefined;
1193
+ };
1194
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1195
+ readonly type: "runtime.thread.cancel.requested";
1196
+ readonly payload: {
1197
+ readonly threadId: string;
1198
+ };
1199
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1200
+ readonly type: "runtime.thread.cancelled";
1201
+ readonly payload: {
1202
+ readonly threadId: string;
1203
+ readonly reason?: string | undefined;
1204
+ readonly resumeSeq?: number | undefined;
1205
+ };
1206
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1207
+ readonly type: "runtime.thread.completed";
1208
+ readonly payload: {
1209
+ readonly threadId: string;
1210
+ readonly output: Schema.Json;
1211
+ };
1212
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1213
+ readonly type: "runtime.thread.failed";
1214
+ readonly payload: {
1215
+ readonly threadId: string;
1216
+ readonly error: string;
1217
+ };
1218
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1219
+ readonly type: "runtime.thread.started";
1220
+ readonly payload: {
1221
+ readonly threadId: string;
1222
+ readonly kind: string;
1223
+ readonly definitionName: string;
1224
+ readonly definitionVersion: string;
1225
+ readonly input: Schema.Json;
1226
+ readonly parentThreadId: string | null;
1227
+ };
1228
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1229
+ readonly type: "runtime.timer.fired";
1230
+ readonly payload: {
1231
+ readonly timerId: string;
1232
+ readonly waitId: string;
1233
+ };
1234
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1235
+ readonly type: "runtime.timer.set";
1236
+ readonly payload: {
1237
+ readonly timerId: string;
1238
+ readonly waitId: string;
1239
+ readonly wakeAt: number;
1240
+ };
1241
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1242
+ readonly type: "runtime.wait.registered";
1243
+ readonly payload: {
1244
+ readonly waitId: string;
1245
+ readonly threadId?: string | undefined;
1246
+ readonly on: {
1247
+ readonly type: string | readonly string[];
1248
+ readonly match?: Schema.Json | undefined;
1249
+ } | {
1250
+ readonly timerAt: number;
1251
+ };
1252
+ readonly tag?: Schema.Json | undefined;
1253
+ };
1254
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1255
+ readonly type: "runtime.wait.satisfied";
1256
+ readonly payload: {
1257
+ readonly waitId: string;
1258
+ readonly tag?: Schema.Json | undefined;
1259
+ readonly event: {
1260
+ readonly id: string;
1261
+ readonly type: string;
1262
+ readonly payload: Schema.Json;
1263
+ };
1264
+ };
1265
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1266
+ readonly type: "swarm.board.pulled";
1267
+ readonly payload: {
1268
+ readonly board: string;
1269
+ readonly pull: number;
1270
+ readonly cursor: string | null;
1271
+ readonly events: readonly {
1272
+ readonly cursor: string;
1273
+ readonly type: "message.labeled" | "message.posted" | "task.blocked" | "task.canceled" | "task.claimed" | "task.completed" | "task.created" | "task.failed" | "task.ready" | "task.reopened";
1274
+ readonly at: number;
1275
+ readonly by: string;
1276
+ readonly message?: {
1277
+ readonly id: string;
1278
+ readonly channel: string;
1279
+ readonly text: string;
1280
+ readonly by: string;
1281
+ readonly re: string | null;
1282
+ readonly mentions: readonly string[];
1283
+ readonly labels: {
1284
+ readonly [x: string]: string;
1285
+ };
1286
+ readonly createdAt: number;
1287
+ } | undefined;
1288
+ readonly task?: {
1289
+ readonly id: string;
1290
+ readonly channel: string;
1291
+ readonly text: string;
1292
+ readonly by: string;
1293
+ readonly for: string | null;
1294
+ readonly needs: readonly string[];
1295
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
1296
+ readonly holder: string | null;
1297
+ readonly epoch: number;
1298
+ readonly leaseUntil: number | null;
1299
+ readonly note: string | null;
1300
+ readonly createdAt: number;
1301
+ readonly updatedAt: number;
1302
+ } | undefined;
1303
+ }[];
1304
+ readonly more: boolean;
1305
+ readonly nextPullAt: number | null;
1306
+ };
1307
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1308
+ readonly type: "swarm.call.rejected";
1309
+ readonly payload: {
1310
+ readonly callId: string;
1311
+ readonly board: string;
1312
+ readonly code: string;
1313
+ readonly error: string;
1314
+ };
1315
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1316
+ readonly type: "swarm.member.activated";
1317
+ readonly payload: {
1318
+ readonly board: string;
1319
+ readonly member: string;
1320
+ readonly activation: number;
1321
+ readonly runId: string;
1322
+ readonly events: number;
1323
+ readonly at: number;
1324
+ };
1325
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1326
+ readonly type: "swarm.message.labeled";
1327
+ readonly payload: {
1328
+ readonly callId: string;
1329
+ readonly board: string;
1330
+ readonly message: {
1331
+ readonly id: string;
1332
+ readonly channel: string;
1333
+ readonly text: string;
1334
+ readonly by: string;
1335
+ readonly re: string | null;
1336
+ readonly mentions: readonly string[];
1337
+ readonly labels: {
1338
+ readonly [x: string]: string;
1339
+ };
1340
+ readonly createdAt: number;
1341
+ };
1342
+ };
1343
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1344
+ readonly type: "swarm.message.posted";
1345
+ readonly payload: {
1346
+ readonly callId: string;
1347
+ readonly board: string;
1348
+ readonly message: {
1349
+ readonly id: string;
1350
+ readonly channel: string;
1351
+ readonly text: string;
1352
+ readonly by: string;
1353
+ readonly re: string | null;
1354
+ readonly mentions: readonly string[];
1355
+ readonly labels: {
1356
+ readonly [x: string]: string;
1357
+ };
1358
+ readonly createdAt: number;
1359
+ };
1360
+ };
1361
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1362
+ readonly type: "swarm.messages.read";
1363
+ readonly payload: {
1364
+ readonly callId: string;
1365
+ readonly board: string;
1366
+ readonly messages: readonly {
1367
+ readonly id: string;
1368
+ readonly channel: string;
1369
+ readonly text: string;
1370
+ readonly by: string;
1371
+ readonly re: string | null;
1372
+ readonly mentions: readonly string[];
1373
+ readonly labels: {
1374
+ readonly [x: string]: string;
1375
+ };
1376
+ readonly createdAt: number;
1377
+ }[];
1378
+ };
1379
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1380
+ readonly type: "swarm.nudged";
1381
+ readonly payload: {};
1382
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1383
+ readonly type: "swarm.stopped";
1384
+ readonly payload: {};
1385
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1386
+ readonly type: "swarm.task.claimed";
1387
+ readonly payload: {
1388
+ readonly callId: string;
1389
+ readonly board: string;
1390
+ readonly claim: {
1391
+ readonly task: {
1392
+ readonly id: string;
1393
+ readonly channel: string;
1394
+ readonly text: string;
1395
+ readonly by: string;
1396
+ readonly for: string | null;
1397
+ readonly needs: readonly string[];
1398
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
1399
+ readonly holder: string | null;
1400
+ readonly epoch: number;
1401
+ readonly leaseUntil: number | null;
1402
+ readonly note: string | null;
1403
+ readonly createdAt: number;
1404
+ readonly updatedAt: number;
1405
+ };
1406
+ readonly token: string;
1407
+ readonly until: number;
1408
+ } | null;
1409
+ };
1410
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1411
+ readonly type: "swarm.task.created";
1412
+ readonly payload: {
1413
+ readonly callId: string;
1414
+ readonly board: string;
1415
+ readonly task: {
1416
+ readonly id: string;
1417
+ readonly channel: string;
1418
+ readonly text: string;
1419
+ readonly by: string;
1420
+ readonly for: string | null;
1421
+ readonly needs: readonly string[];
1422
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
1423
+ readonly holder: string | null;
1424
+ readonly epoch: number;
1425
+ readonly leaseUntil: number | null;
1426
+ readonly note: string | null;
1427
+ readonly createdAt: number;
1428
+ readonly updatedAt: number;
1429
+ };
1430
+ };
1431
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1432
+ readonly type: "swarm.task.settled";
1433
+ readonly payload: {
1434
+ readonly callId: string;
1435
+ readonly board: string;
1436
+ readonly task: {
1437
+ readonly id: string;
1438
+ readonly channel: string;
1439
+ readonly text: string;
1440
+ readonly by: string;
1441
+ readonly for: string | null;
1442
+ readonly needs: readonly string[];
1443
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
1444
+ readonly holder: string | null;
1445
+ readonly epoch: number;
1446
+ readonly leaseUntil: number | null;
1447
+ readonly note: string | null;
1448
+ readonly createdAt: number;
1449
+ readonly updatedAt: number;
1450
+ };
1451
+ };
1452
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1453
+ readonly type: "swarm.tasks.listed";
1454
+ readonly payload: {
1455
+ readonly callId: string;
1456
+ readonly board: string;
1457
+ readonly tasks: readonly {
1458
+ readonly id: string;
1459
+ readonly channel: string;
1460
+ readonly text: string;
1461
+ readonly by: string;
1462
+ readonly for: string | null;
1463
+ readonly needs: readonly string[];
1464
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
1465
+ readonly holder: string | null;
1466
+ readonly epoch: number;
1467
+ readonly leaseUntil: number | null;
1468
+ readonly note: string | null;
1469
+ readonly createdAt: number;
1470
+ readonly updatedAt: number;
1471
+ }[];
1472
+ };
1473
+ })>>;
1474
+ export declare const replyEffect: NoInfer<import("@swirls/looms/core").LocalEffectDefinition<{
1475
+ readonly callId: string;
1476
+ readonly board: string;
1477
+ readonly as: string;
1478
+ readonly to: string;
1479
+ readonly text: string;
1480
+ }, BoardsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1481
+ readonly type: "runtime.child.close.requested";
1482
+ readonly payload: {
1483
+ readonly policy: "terminate" | "wait";
1484
+ };
1485
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1486
+ readonly type: "runtime.child.settled";
1487
+ readonly payload: {
1488
+ readonly runId: string;
1489
+ readonly status: "cancelled" | "completed" | "failed";
1490
+ readonly output: Schema.Json;
1491
+ readonly error: string | null;
1492
+ };
1493
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1494
+ readonly type: "runtime.effect.ambiguous";
1495
+ readonly payload: {
1496
+ readonly effectId: string;
1497
+ readonly attempt: number;
1498
+ readonly error: string;
1499
+ };
1500
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1501
+ readonly type: "runtime.effect.attempt.started";
1502
+ readonly payload: {
1503
+ readonly effectId: string;
1504
+ readonly attempt: number;
1505
+ };
1506
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1507
+ readonly type: "runtime.effect.cancel.requested";
1508
+ readonly payload: {
1509
+ readonly effectId: string;
1510
+ readonly attempt: number;
1511
+ readonly deadlineAt: number | null;
1512
+ };
1513
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1514
+ readonly type: "runtime.effect.cancelled";
1515
+ readonly payload: {
1516
+ readonly effectId: string;
1517
+ readonly attempt: number;
1518
+ };
1519
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1520
+ readonly type: "runtime.effect.completed";
1521
+ readonly payload: {
1522
+ readonly effectId: string;
1523
+ readonly attempt: number;
1524
+ };
1525
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1526
+ readonly type: "runtime.effect.dispatch.deferred";
1527
+ readonly payload: {
1528
+ readonly effectId: string;
1529
+ readonly attempt: number;
1530
+ readonly retryAt: number;
1531
+ readonly error: string;
1532
+ readonly try: number;
1533
+ };
1534
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1535
+ readonly type: "runtime.effect.dispatched";
1536
+ readonly payload: {
1537
+ readonly effectId: string;
1538
+ readonly attempt: number;
1539
+ readonly deadlineAt: number | null;
1540
+ };
1541
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1542
+ readonly type: "runtime.effect.failed";
1543
+ readonly payload: {
1544
+ readonly effectId: string;
1545
+ readonly error: string;
1546
+ readonly nonRetryable?: boolean | undefined;
1547
+ readonly retryAfterMs?: number | undefined;
1548
+ };
1549
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1550
+ readonly type: "runtime.effect.heartbeat";
1551
+ readonly payload: {
1552
+ readonly effectId: string;
1553
+ readonly attempt: number;
1554
+ readonly heartbeatAt: number;
1555
+ readonly deadlineAt: number | null;
1556
+ readonly details?: Schema.Json | undefined;
1557
+ };
1558
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1559
+ readonly type: "runtime.effect.queued";
1560
+ readonly payload: {
1561
+ readonly effectId: string;
1562
+ readonly attempt: number;
1563
+ readonly deadlineAt: number | null;
1564
+ };
1565
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1566
+ readonly type: "runtime.effect.retry.scheduled";
1567
+ readonly payload: {
1568
+ readonly effectId: string;
1569
+ readonly attempt: number;
1570
+ readonly nextAttemptAt: number;
1571
+ readonly error: string;
1572
+ };
1573
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1574
+ readonly type: "runtime.effect.timed_out";
1575
+ readonly payload: {
1576
+ readonly effectId: string;
1577
+ readonly attempt: number;
1578
+ readonly timeout: string;
1579
+ };
1580
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1581
+ readonly type: "runtime.effect.worker.started";
1582
+ readonly payload: {
1583
+ readonly effectId: string;
1584
+ readonly attempt: number;
1585
+ readonly deadlineAt: number | null;
1586
+ };
1587
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1588
+ readonly type: "runtime.fork.elided";
1589
+ readonly payload: {
1590
+ readonly type: string;
1591
+ };
1592
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1593
+ readonly type: "runtime.run.cancelled";
1594
+ readonly payload: {
1595
+ readonly reason?: string | undefined;
1596
+ };
1597
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1598
+ readonly type: "runtime.run.completed";
1599
+ readonly payload: {
1600
+ readonly output: Schema.Json;
1601
+ readonly error: string | null;
1602
+ };
1603
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1604
+ readonly type: "runtime.run.forked";
1605
+ readonly payload: {
1606
+ readonly sourceRunId: string;
1607
+ readonly sourceSeq: number;
1608
+ };
1609
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1610
+ readonly type: "runtime.run.launched";
1611
+ readonly payload: {
1612
+ readonly runId: string;
1613
+ readonly kind: string;
1614
+ readonly definitionName: string;
1615
+ readonly definitionVersion: string;
1616
+ readonly effectId: string;
1617
+ readonly close: "terminate" | "wait";
1618
+ };
1619
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1620
+ readonly type: "runtime.run.started";
1621
+ readonly payload: {
1622
+ readonly rootThreadId?: string | undefined;
1623
+ readonly kind: string;
1624
+ readonly definitionName: string;
1625
+ readonly definitionVersion: string;
1626
+ readonly input: Schema.Json;
1627
+ readonly requestedThreadId?: string | null | undefined;
1628
+ readonly launchedBy?: {
1629
+ readonly runId: string;
1630
+ readonly threadId: string;
1631
+ readonly effectId: string;
1632
+ readonly causationId: string;
1633
+ readonly causationSeq: number;
1634
+ } | undefined;
1635
+ readonly attributes?: {
1636
+ readonly [x: string]: string;
1637
+ } | undefined;
1638
+ readonly trace?: {
1639
+ readonly traceparent: string;
1640
+ readonly tracestate?: string | undefined;
1641
+ } | undefined;
1642
+ };
1643
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1644
+ readonly type: "runtime.signal.received";
1645
+ readonly payload: {
1646
+ readonly signalType: string;
1647
+ };
1648
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1649
+ readonly type: "runtime.snapshot.taken";
1650
+ readonly payload: {
1651
+ readonly seq: number;
1652
+ readonly stateHash: string;
1653
+ readonly state?: Schema.Json | undefined;
1654
+ };
1655
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1656
+ readonly type: "runtime.thread.cancel.requested";
1657
+ readonly payload: {
1658
+ readonly threadId: string;
1659
+ };
1660
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1661
+ readonly type: "runtime.thread.cancelled";
1662
+ readonly payload: {
1663
+ readonly threadId: string;
1664
+ readonly reason?: string | undefined;
1665
+ readonly resumeSeq?: number | undefined;
1666
+ };
1667
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1668
+ readonly type: "runtime.thread.completed";
1669
+ readonly payload: {
1670
+ readonly threadId: string;
1671
+ readonly output: Schema.Json;
1672
+ };
1673
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1674
+ readonly type: "runtime.thread.failed";
1675
+ readonly payload: {
1676
+ readonly threadId: string;
1677
+ readonly error: string;
1678
+ };
1679
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1680
+ readonly type: "runtime.thread.started";
1681
+ readonly payload: {
1682
+ readonly threadId: string;
1683
+ readonly kind: string;
1684
+ readonly definitionName: string;
1685
+ readonly definitionVersion: string;
1686
+ readonly input: Schema.Json;
1687
+ readonly parentThreadId: string | null;
1688
+ };
1689
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1690
+ readonly type: "runtime.timer.fired";
1691
+ readonly payload: {
1692
+ readonly timerId: string;
1693
+ readonly waitId: string;
1694
+ };
1695
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1696
+ readonly type: "runtime.timer.set";
1697
+ readonly payload: {
1698
+ readonly timerId: string;
1699
+ readonly waitId: string;
1700
+ readonly wakeAt: number;
1701
+ };
1702
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1703
+ readonly type: "runtime.wait.registered";
1704
+ readonly payload: {
1705
+ readonly waitId: string;
1706
+ readonly threadId?: string | undefined;
1707
+ readonly on: {
1708
+ readonly type: string | readonly string[];
1709
+ readonly match?: Schema.Json | undefined;
1710
+ } | {
1711
+ readonly timerAt: number;
1712
+ };
1713
+ readonly tag?: Schema.Json | undefined;
1714
+ };
1715
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1716
+ readonly type: "runtime.wait.satisfied";
1717
+ readonly payload: {
1718
+ readonly waitId: string;
1719
+ readonly tag?: Schema.Json | undefined;
1720
+ readonly event: {
1721
+ readonly id: string;
1722
+ readonly type: string;
1723
+ readonly payload: Schema.Json;
1724
+ };
1725
+ };
1726
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1727
+ readonly type: "swarm.board.pulled";
1728
+ readonly payload: {
1729
+ readonly board: string;
1730
+ readonly pull: number;
1731
+ readonly cursor: string | null;
1732
+ readonly events: readonly {
1733
+ readonly cursor: string;
1734
+ readonly type: "message.labeled" | "message.posted" | "task.blocked" | "task.canceled" | "task.claimed" | "task.completed" | "task.created" | "task.failed" | "task.ready" | "task.reopened";
1735
+ readonly at: number;
1736
+ readonly by: string;
1737
+ readonly message?: {
1738
+ readonly id: string;
1739
+ readonly channel: string;
1740
+ readonly text: string;
1741
+ readonly by: string;
1742
+ readonly re: string | null;
1743
+ readonly mentions: readonly string[];
1744
+ readonly labels: {
1745
+ readonly [x: string]: string;
1746
+ };
1747
+ readonly createdAt: number;
1748
+ } | undefined;
1749
+ readonly task?: {
1750
+ readonly id: string;
1751
+ readonly channel: string;
1752
+ readonly text: string;
1753
+ readonly by: string;
1754
+ readonly for: string | null;
1755
+ readonly needs: readonly string[];
1756
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
1757
+ readonly holder: string | null;
1758
+ readonly epoch: number;
1759
+ readonly leaseUntil: number | null;
1760
+ readonly note: string | null;
1761
+ readonly createdAt: number;
1762
+ readonly updatedAt: number;
1763
+ } | undefined;
1764
+ }[];
1765
+ readonly more: boolean;
1766
+ readonly nextPullAt: number | null;
1767
+ };
1768
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1769
+ readonly type: "swarm.call.rejected";
1770
+ readonly payload: {
1771
+ readonly callId: string;
1772
+ readonly board: string;
1773
+ readonly code: string;
1774
+ readonly error: string;
1775
+ };
1776
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1777
+ readonly type: "swarm.member.activated";
1778
+ readonly payload: {
1779
+ readonly board: string;
1780
+ readonly member: string;
1781
+ readonly activation: number;
1782
+ readonly runId: string;
1783
+ readonly events: number;
1784
+ readonly at: number;
1785
+ };
1786
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1787
+ readonly type: "swarm.message.labeled";
1788
+ readonly payload: {
1789
+ readonly callId: string;
1790
+ readonly board: string;
1791
+ readonly message: {
1792
+ readonly id: string;
1793
+ readonly channel: string;
1794
+ readonly text: string;
1795
+ readonly by: string;
1796
+ readonly re: string | null;
1797
+ readonly mentions: readonly string[];
1798
+ readonly labels: {
1799
+ readonly [x: string]: string;
1800
+ };
1801
+ readonly createdAt: number;
1802
+ };
1803
+ };
1804
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1805
+ readonly type: "swarm.message.posted";
1806
+ readonly payload: {
1807
+ readonly callId: string;
1808
+ readonly board: string;
1809
+ readonly message: {
1810
+ readonly id: string;
1811
+ readonly channel: string;
1812
+ readonly text: string;
1813
+ readonly by: string;
1814
+ readonly re: string | null;
1815
+ readonly mentions: readonly string[];
1816
+ readonly labels: {
1817
+ readonly [x: string]: string;
1818
+ };
1819
+ readonly createdAt: number;
1820
+ };
1821
+ };
1822
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1823
+ readonly type: "swarm.messages.read";
1824
+ readonly payload: {
1825
+ readonly callId: string;
1826
+ readonly board: string;
1827
+ readonly messages: readonly {
1828
+ readonly id: string;
1829
+ readonly channel: string;
1830
+ readonly text: string;
1831
+ readonly by: string;
1832
+ readonly re: string | null;
1833
+ readonly mentions: readonly string[];
1834
+ readonly labels: {
1835
+ readonly [x: string]: string;
1836
+ };
1837
+ readonly createdAt: number;
1838
+ }[];
1839
+ };
1840
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1841
+ readonly type: "swarm.nudged";
1842
+ readonly payload: {};
1843
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1844
+ readonly type: "swarm.stopped";
1845
+ readonly payload: {};
1846
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1847
+ readonly type: "swarm.task.claimed";
1848
+ readonly payload: {
1849
+ readonly callId: string;
1850
+ readonly board: string;
1851
+ readonly claim: {
1852
+ readonly task: {
1853
+ readonly id: string;
1854
+ readonly channel: string;
1855
+ readonly text: string;
1856
+ readonly by: string;
1857
+ readonly for: string | null;
1858
+ readonly needs: readonly string[];
1859
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
1860
+ readonly holder: string | null;
1861
+ readonly epoch: number;
1862
+ readonly leaseUntil: number | null;
1863
+ readonly note: string | null;
1864
+ readonly createdAt: number;
1865
+ readonly updatedAt: number;
1866
+ };
1867
+ readonly token: string;
1868
+ readonly until: number;
1869
+ } | null;
1870
+ };
1871
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1872
+ readonly type: "swarm.task.created";
1873
+ readonly payload: {
1874
+ readonly callId: string;
1875
+ readonly board: string;
1876
+ readonly task: {
1877
+ readonly id: string;
1878
+ readonly channel: string;
1879
+ readonly text: string;
1880
+ readonly by: string;
1881
+ readonly for: string | null;
1882
+ readonly needs: readonly string[];
1883
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
1884
+ readonly holder: string | null;
1885
+ readonly epoch: number;
1886
+ readonly leaseUntil: number | null;
1887
+ readonly note: string | null;
1888
+ readonly createdAt: number;
1889
+ readonly updatedAt: number;
1890
+ };
1891
+ };
1892
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1893
+ readonly type: "swarm.task.settled";
1894
+ readonly payload: {
1895
+ readonly callId: string;
1896
+ readonly board: string;
1897
+ readonly task: {
1898
+ readonly id: string;
1899
+ readonly channel: string;
1900
+ readonly text: string;
1901
+ readonly by: string;
1902
+ readonly for: string | null;
1903
+ readonly needs: readonly string[];
1904
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
1905
+ readonly holder: string | null;
1906
+ readonly epoch: number;
1907
+ readonly leaseUntil: number | null;
1908
+ readonly note: string | null;
1909
+ readonly createdAt: number;
1910
+ readonly updatedAt: number;
1911
+ };
1912
+ };
1913
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1914
+ readonly type: "swarm.tasks.listed";
1915
+ readonly payload: {
1916
+ readonly callId: string;
1917
+ readonly board: string;
1918
+ readonly tasks: readonly {
1919
+ readonly id: string;
1920
+ readonly channel: string;
1921
+ readonly text: string;
1922
+ readonly by: string;
1923
+ readonly for: string | null;
1924
+ readonly needs: readonly string[];
1925
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
1926
+ readonly holder: string | null;
1927
+ readonly epoch: number;
1928
+ readonly leaseUntil: number | null;
1929
+ readonly note: string | null;
1930
+ readonly createdAt: number;
1931
+ readonly updatedAt: number;
1932
+ }[];
1933
+ };
1934
+ })>>;
1935
+ export declare const readEffect: NoInfer<import("@swirls/looms/core").LocalEffectDefinition<{
1936
+ readonly callId: string;
1937
+ readonly board: string;
1938
+ readonly as: string;
1939
+ readonly channel?: string | undefined;
1940
+ readonly thread?: string | undefined;
1941
+ readonly by?: string | undefined;
1942
+ readonly mentionsMe?: boolean | undefined;
1943
+ readonly after?: string | undefined;
1944
+ readonly limit?: number | undefined;
1945
+ }, BoardsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1946
+ readonly type: "runtime.child.close.requested";
1947
+ readonly payload: {
1948
+ readonly policy: "terminate" | "wait";
1949
+ };
1950
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1951
+ readonly type: "runtime.child.settled";
1952
+ readonly payload: {
1953
+ readonly runId: string;
1954
+ readonly status: "cancelled" | "completed" | "failed";
1955
+ readonly output: Schema.Json;
1956
+ readonly error: string | null;
1957
+ };
1958
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1959
+ readonly type: "runtime.effect.ambiguous";
1960
+ readonly payload: {
1961
+ readonly effectId: string;
1962
+ readonly attempt: number;
1963
+ readonly error: string;
1964
+ };
1965
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1966
+ readonly type: "runtime.effect.attempt.started";
1967
+ readonly payload: {
1968
+ readonly effectId: string;
1969
+ readonly attempt: number;
1970
+ };
1971
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1972
+ readonly type: "runtime.effect.cancel.requested";
1973
+ readonly payload: {
1974
+ readonly effectId: string;
1975
+ readonly attempt: number;
1976
+ readonly deadlineAt: number | null;
1977
+ };
1978
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1979
+ readonly type: "runtime.effect.cancelled";
1980
+ readonly payload: {
1981
+ readonly effectId: string;
1982
+ readonly attempt: number;
1983
+ };
1984
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1985
+ readonly type: "runtime.effect.completed";
1986
+ readonly payload: {
1987
+ readonly effectId: string;
1988
+ readonly attempt: number;
1989
+ };
1990
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
1991
+ readonly type: "runtime.effect.dispatch.deferred";
1992
+ readonly payload: {
1993
+ readonly effectId: string;
1994
+ readonly attempt: number;
1995
+ readonly retryAt: number;
1996
+ readonly error: string;
1997
+ readonly try: number;
1998
+ };
1999
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2000
+ readonly type: "runtime.effect.dispatched";
2001
+ readonly payload: {
2002
+ readonly effectId: string;
2003
+ readonly attempt: number;
2004
+ readonly deadlineAt: number | null;
2005
+ };
2006
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2007
+ readonly type: "runtime.effect.failed";
2008
+ readonly payload: {
2009
+ readonly effectId: string;
2010
+ readonly error: string;
2011
+ readonly nonRetryable?: boolean | undefined;
2012
+ readonly retryAfterMs?: number | undefined;
2013
+ };
2014
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2015
+ readonly type: "runtime.effect.heartbeat";
2016
+ readonly payload: {
2017
+ readonly effectId: string;
2018
+ readonly attempt: number;
2019
+ readonly heartbeatAt: number;
2020
+ readonly deadlineAt: number | null;
2021
+ readonly details?: Schema.Json | undefined;
2022
+ };
2023
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2024
+ readonly type: "runtime.effect.queued";
2025
+ readonly payload: {
2026
+ readonly effectId: string;
2027
+ readonly attempt: number;
2028
+ readonly deadlineAt: number | null;
2029
+ };
2030
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2031
+ readonly type: "runtime.effect.retry.scheduled";
2032
+ readonly payload: {
2033
+ readonly effectId: string;
2034
+ readonly attempt: number;
2035
+ readonly nextAttemptAt: number;
2036
+ readonly error: string;
2037
+ };
2038
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2039
+ readonly type: "runtime.effect.timed_out";
2040
+ readonly payload: {
2041
+ readonly effectId: string;
2042
+ readonly attempt: number;
2043
+ readonly timeout: string;
2044
+ };
2045
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2046
+ readonly type: "runtime.effect.worker.started";
2047
+ readonly payload: {
2048
+ readonly effectId: string;
2049
+ readonly attempt: number;
2050
+ readonly deadlineAt: number | null;
2051
+ };
2052
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2053
+ readonly type: "runtime.fork.elided";
2054
+ readonly payload: {
2055
+ readonly type: string;
2056
+ };
2057
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2058
+ readonly type: "runtime.run.cancelled";
2059
+ readonly payload: {
2060
+ readonly reason?: string | undefined;
2061
+ };
2062
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2063
+ readonly type: "runtime.run.completed";
2064
+ readonly payload: {
2065
+ readonly output: Schema.Json;
2066
+ readonly error: string | null;
2067
+ };
2068
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2069
+ readonly type: "runtime.run.forked";
2070
+ readonly payload: {
2071
+ readonly sourceRunId: string;
2072
+ readonly sourceSeq: number;
2073
+ };
2074
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2075
+ readonly type: "runtime.run.launched";
2076
+ readonly payload: {
2077
+ readonly runId: string;
2078
+ readonly kind: string;
2079
+ readonly definitionName: string;
2080
+ readonly definitionVersion: string;
2081
+ readonly effectId: string;
2082
+ readonly close: "terminate" | "wait";
2083
+ };
2084
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2085
+ readonly type: "runtime.run.started";
2086
+ readonly payload: {
2087
+ readonly rootThreadId?: string | undefined;
2088
+ readonly kind: string;
2089
+ readonly definitionName: string;
2090
+ readonly definitionVersion: string;
2091
+ readonly input: Schema.Json;
2092
+ readonly requestedThreadId?: string | null | undefined;
2093
+ readonly launchedBy?: {
2094
+ readonly runId: string;
2095
+ readonly threadId: string;
2096
+ readonly effectId: string;
2097
+ readonly causationId: string;
2098
+ readonly causationSeq: number;
2099
+ } | undefined;
2100
+ readonly attributes?: {
2101
+ readonly [x: string]: string;
2102
+ } | undefined;
2103
+ readonly trace?: {
2104
+ readonly traceparent: string;
2105
+ readonly tracestate?: string | undefined;
2106
+ } | undefined;
2107
+ };
2108
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2109
+ readonly type: "runtime.signal.received";
2110
+ readonly payload: {
2111
+ readonly signalType: string;
2112
+ };
2113
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2114
+ readonly type: "runtime.snapshot.taken";
2115
+ readonly payload: {
2116
+ readonly seq: number;
2117
+ readonly stateHash: string;
2118
+ readonly state?: Schema.Json | undefined;
2119
+ };
2120
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2121
+ readonly type: "runtime.thread.cancel.requested";
2122
+ readonly payload: {
2123
+ readonly threadId: string;
2124
+ };
2125
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2126
+ readonly type: "runtime.thread.cancelled";
2127
+ readonly payload: {
2128
+ readonly threadId: string;
2129
+ readonly reason?: string | undefined;
2130
+ readonly resumeSeq?: number | undefined;
2131
+ };
2132
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2133
+ readonly type: "runtime.thread.completed";
2134
+ readonly payload: {
2135
+ readonly threadId: string;
2136
+ readonly output: Schema.Json;
2137
+ };
2138
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2139
+ readonly type: "runtime.thread.failed";
2140
+ readonly payload: {
2141
+ readonly threadId: string;
2142
+ readonly error: string;
2143
+ };
2144
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2145
+ readonly type: "runtime.thread.started";
2146
+ readonly payload: {
2147
+ readonly threadId: string;
2148
+ readonly kind: string;
2149
+ readonly definitionName: string;
2150
+ readonly definitionVersion: string;
2151
+ readonly input: Schema.Json;
2152
+ readonly parentThreadId: string | null;
2153
+ };
2154
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2155
+ readonly type: "runtime.timer.fired";
2156
+ readonly payload: {
2157
+ readonly timerId: string;
2158
+ readonly waitId: string;
2159
+ };
2160
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2161
+ readonly type: "runtime.timer.set";
2162
+ readonly payload: {
2163
+ readonly timerId: string;
2164
+ readonly waitId: string;
2165
+ readonly wakeAt: number;
2166
+ };
2167
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2168
+ readonly type: "runtime.wait.registered";
2169
+ readonly payload: {
2170
+ readonly waitId: string;
2171
+ readonly threadId?: string | undefined;
2172
+ readonly on: {
2173
+ readonly type: string | readonly string[];
2174
+ readonly match?: Schema.Json | undefined;
2175
+ } | {
2176
+ readonly timerAt: number;
2177
+ };
2178
+ readonly tag?: Schema.Json | undefined;
2179
+ };
2180
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2181
+ readonly type: "runtime.wait.satisfied";
2182
+ readonly payload: {
2183
+ readonly waitId: string;
2184
+ readonly tag?: Schema.Json | undefined;
2185
+ readonly event: {
2186
+ readonly id: string;
2187
+ readonly type: string;
2188
+ readonly payload: Schema.Json;
2189
+ };
2190
+ };
2191
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2192
+ readonly type: "swarm.board.pulled";
2193
+ readonly payload: {
2194
+ readonly board: string;
2195
+ readonly pull: number;
2196
+ readonly cursor: string | null;
2197
+ readonly events: readonly {
2198
+ readonly cursor: string;
2199
+ readonly type: "message.labeled" | "message.posted" | "task.blocked" | "task.canceled" | "task.claimed" | "task.completed" | "task.created" | "task.failed" | "task.ready" | "task.reopened";
2200
+ readonly at: number;
2201
+ readonly by: string;
2202
+ readonly message?: {
2203
+ readonly id: string;
2204
+ readonly channel: string;
2205
+ readonly text: string;
2206
+ readonly by: string;
2207
+ readonly re: string | null;
2208
+ readonly mentions: readonly string[];
2209
+ readonly labels: {
2210
+ readonly [x: string]: string;
2211
+ };
2212
+ readonly createdAt: number;
2213
+ } | undefined;
2214
+ readonly task?: {
2215
+ readonly id: string;
2216
+ readonly channel: string;
2217
+ readonly text: string;
2218
+ readonly by: string;
2219
+ readonly for: string | null;
2220
+ readonly needs: readonly string[];
2221
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
2222
+ readonly holder: string | null;
2223
+ readonly epoch: number;
2224
+ readonly leaseUntil: number | null;
2225
+ readonly note: string | null;
2226
+ readonly createdAt: number;
2227
+ readonly updatedAt: number;
2228
+ } | undefined;
2229
+ }[];
2230
+ readonly more: boolean;
2231
+ readonly nextPullAt: number | null;
2232
+ };
2233
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2234
+ readonly type: "swarm.call.rejected";
2235
+ readonly payload: {
2236
+ readonly callId: string;
2237
+ readonly board: string;
2238
+ readonly code: string;
2239
+ readonly error: string;
2240
+ };
2241
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2242
+ readonly type: "swarm.member.activated";
2243
+ readonly payload: {
2244
+ readonly board: string;
2245
+ readonly member: string;
2246
+ readonly activation: number;
2247
+ readonly runId: string;
2248
+ readonly events: number;
2249
+ readonly at: number;
2250
+ };
2251
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2252
+ readonly type: "swarm.message.labeled";
2253
+ readonly payload: {
2254
+ readonly callId: string;
2255
+ readonly board: string;
2256
+ readonly message: {
2257
+ readonly id: string;
2258
+ readonly channel: string;
2259
+ readonly text: string;
2260
+ readonly by: string;
2261
+ readonly re: string | null;
2262
+ readonly mentions: readonly string[];
2263
+ readonly labels: {
2264
+ readonly [x: string]: string;
2265
+ };
2266
+ readonly createdAt: number;
2267
+ };
2268
+ };
2269
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2270
+ readonly type: "swarm.message.posted";
2271
+ readonly payload: {
2272
+ readonly callId: string;
2273
+ readonly board: string;
2274
+ readonly message: {
2275
+ readonly id: string;
2276
+ readonly channel: string;
2277
+ readonly text: string;
2278
+ readonly by: string;
2279
+ readonly re: string | null;
2280
+ readonly mentions: readonly string[];
2281
+ readonly labels: {
2282
+ readonly [x: string]: string;
2283
+ };
2284
+ readonly createdAt: number;
2285
+ };
2286
+ };
2287
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2288
+ readonly type: "swarm.messages.read";
2289
+ readonly payload: {
2290
+ readonly callId: string;
2291
+ readonly board: string;
2292
+ readonly messages: readonly {
2293
+ readonly id: string;
2294
+ readonly channel: string;
2295
+ readonly text: string;
2296
+ readonly by: string;
2297
+ readonly re: string | null;
2298
+ readonly mentions: readonly string[];
2299
+ readonly labels: {
2300
+ readonly [x: string]: string;
2301
+ };
2302
+ readonly createdAt: number;
2303
+ }[];
2304
+ };
2305
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2306
+ readonly type: "swarm.nudged";
2307
+ readonly payload: {};
2308
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2309
+ readonly type: "swarm.stopped";
2310
+ readonly payload: {};
2311
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2312
+ readonly type: "swarm.task.claimed";
2313
+ readonly payload: {
2314
+ readonly callId: string;
2315
+ readonly board: string;
2316
+ readonly claim: {
2317
+ readonly task: {
2318
+ readonly id: string;
2319
+ readonly channel: string;
2320
+ readonly text: string;
2321
+ readonly by: string;
2322
+ readonly for: string | null;
2323
+ readonly needs: readonly string[];
2324
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
2325
+ readonly holder: string | null;
2326
+ readonly epoch: number;
2327
+ readonly leaseUntil: number | null;
2328
+ readonly note: string | null;
2329
+ readonly createdAt: number;
2330
+ readonly updatedAt: number;
2331
+ };
2332
+ readonly token: string;
2333
+ readonly until: number;
2334
+ } | null;
2335
+ };
2336
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2337
+ readonly type: "swarm.task.created";
2338
+ readonly payload: {
2339
+ readonly callId: string;
2340
+ readonly board: string;
2341
+ readonly task: {
2342
+ readonly id: string;
2343
+ readonly channel: string;
2344
+ readonly text: string;
2345
+ readonly by: string;
2346
+ readonly for: string | null;
2347
+ readonly needs: readonly string[];
2348
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
2349
+ readonly holder: string | null;
2350
+ readonly epoch: number;
2351
+ readonly leaseUntil: number | null;
2352
+ readonly note: string | null;
2353
+ readonly createdAt: number;
2354
+ readonly updatedAt: number;
2355
+ };
2356
+ };
2357
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2358
+ readonly type: "swarm.task.settled";
2359
+ readonly payload: {
2360
+ readonly callId: string;
2361
+ readonly board: string;
2362
+ readonly task: {
2363
+ readonly id: string;
2364
+ readonly channel: string;
2365
+ readonly text: string;
2366
+ readonly by: string;
2367
+ readonly for: string | null;
2368
+ readonly needs: readonly string[];
2369
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
2370
+ readonly holder: string | null;
2371
+ readonly epoch: number;
2372
+ readonly leaseUntil: number | null;
2373
+ readonly note: string | null;
2374
+ readonly createdAt: number;
2375
+ readonly updatedAt: number;
2376
+ };
2377
+ };
2378
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2379
+ readonly type: "swarm.tasks.listed";
2380
+ readonly payload: {
2381
+ readonly callId: string;
2382
+ readonly board: string;
2383
+ readonly tasks: readonly {
2384
+ readonly id: string;
2385
+ readonly channel: string;
2386
+ readonly text: string;
2387
+ readonly by: string;
2388
+ readonly for: string | null;
2389
+ readonly needs: readonly string[];
2390
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
2391
+ readonly holder: string | null;
2392
+ readonly epoch: number;
2393
+ readonly leaseUntil: number | null;
2394
+ readonly note: string | null;
2395
+ readonly createdAt: number;
2396
+ readonly updatedAt: number;
2397
+ }[];
2398
+ };
2399
+ })>>;
2400
+ export declare const labelEffect: NoInfer<import("@swirls/looms/core").LocalEffectDefinition<{
2401
+ readonly callId: string;
2402
+ readonly board: string;
2403
+ readonly as: string;
2404
+ readonly message: string;
2405
+ readonly set?: {
2406
+ readonly [x: string]: string;
2407
+ } | undefined;
2408
+ readonly unset?: readonly string[] | undefined;
2409
+ readonly if?: {
2410
+ readonly [x: string]: string | null;
2411
+ } | undefined;
2412
+ }, BoardsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2413
+ readonly type: "runtime.child.close.requested";
2414
+ readonly payload: {
2415
+ readonly policy: "terminate" | "wait";
2416
+ };
2417
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2418
+ readonly type: "runtime.child.settled";
2419
+ readonly payload: {
2420
+ readonly runId: string;
2421
+ readonly status: "cancelled" | "completed" | "failed";
2422
+ readonly output: Schema.Json;
2423
+ readonly error: string | null;
2424
+ };
2425
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2426
+ readonly type: "runtime.effect.ambiguous";
2427
+ readonly payload: {
2428
+ readonly effectId: string;
2429
+ readonly attempt: number;
2430
+ readonly error: string;
2431
+ };
2432
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2433
+ readonly type: "runtime.effect.attempt.started";
2434
+ readonly payload: {
2435
+ readonly effectId: string;
2436
+ readonly attempt: number;
2437
+ };
2438
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2439
+ readonly type: "runtime.effect.cancel.requested";
2440
+ readonly payload: {
2441
+ readonly effectId: string;
2442
+ readonly attempt: number;
2443
+ readonly deadlineAt: number | null;
2444
+ };
2445
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2446
+ readonly type: "runtime.effect.cancelled";
2447
+ readonly payload: {
2448
+ readonly effectId: string;
2449
+ readonly attempt: number;
2450
+ };
2451
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2452
+ readonly type: "runtime.effect.completed";
2453
+ readonly payload: {
2454
+ readonly effectId: string;
2455
+ readonly attempt: number;
2456
+ };
2457
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2458
+ readonly type: "runtime.effect.dispatch.deferred";
2459
+ readonly payload: {
2460
+ readonly effectId: string;
2461
+ readonly attempt: number;
2462
+ readonly retryAt: number;
2463
+ readonly error: string;
2464
+ readonly try: number;
2465
+ };
2466
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2467
+ readonly type: "runtime.effect.dispatched";
2468
+ readonly payload: {
2469
+ readonly effectId: string;
2470
+ readonly attempt: number;
2471
+ readonly deadlineAt: number | null;
2472
+ };
2473
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2474
+ readonly type: "runtime.effect.failed";
2475
+ readonly payload: {
2476
+ readonly effectId: string;
2477
+ readonly error: string;
2478
+ readonly nonRetryable?: boolean | undefined;
2479
+ readonly retryAfterMs?: number | undefined;
2480
+ };
2481
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2482
+ readonly type: "runtime.effect.heartbeat";
2483
+ readonly payload: {
2484
+ readonly effectId: string;
2485
+ readonly attempt: number;
2486
+ readonly heartbeatAt: number;
2487
+ readonly deadlineAt: number | null;
2488
+ readonly details?: Schema.Json | undefined;
2489
+ };
2490
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2491
+ readonly type: "runtime.effect.queued";
2492
+ readonly payload: {
2493
+ readonly effectId: string;
2494
+ readonly attempt: number;
2495
+ readonly deadlineAt: number | null;
2496
+ };
2497
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2498
+ readonly type: "runtime.effect.retry.scheduled";
2499
+ readonly payload: {
2500
+ readonly effectId: string;
2501
+ readonly attempt: number;
2502
+ readonly nextAttemptAt: number;
2503
+ readonly error: string;
2504
+ };
2505
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2506
+ readonly type: "runtime.effect.timed_out";
2507
+ readonly payload: {
2508
+ readonly effectId: string;
2509
+ readonly attempt: number;
2510
+ readonly timeout: string;
2511
+ };
2512
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2513
+ readonly type: "runtime.effect.worker.started";
2514
+ readonly payload: {
2515
+ readonly effectId: string;
2516
+ readonly attempt: number;
2517
+ readonly deadlineAt: number | null;
2518
+ };
2519
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2520
+ readonly type: "runtime.fork.elided";
2521
+ readonly payload: {
2522
+ readonly type: string;
2523
+ };
2524
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2525
+ readonly type: "runtime.run.cancelled";
2526
+ readonly payload: {
2527
+ readonly reason?: string | undefined;
2528
+ };
2529
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2530
+ readonly type: "runtime.run.completed";
2531
+ readonly payload: {
2532
+ readonly output: Schema.Json;
2533
+ readonly error: string | null;
2534
+ };
2535
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2536
+ readonly type: "runtime.run.forked";
2537
+ readonly payload: {
2538
+ readonly sourceRunId: string;
2539
+ readonly sourceSeq: number;
2540
+ };
2541
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2542
+ readonly type: "runtime.run.launched";
2543
+ readonly payload: {
2544
+ readonly runId: string;
2545
+ readonly kind: string;
2546
+ readonly definitionName: string;
2547
+ readonly definitionVersion: string;
2548
+ readonly effectId: string;
2549
+ readonly close: "terminate" | "wait";
2550
+ };
2551
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2552
+ readonly type: "runtime.run.started";
2553
+ readonly payload: {
2554
+ readonly rootThreadId?: string | undefined;
2555
+ readonly kind: string;
2556
+ readonly definitionName: string;
2557
+ readonly definitionVersion: string;
2558
+ readonly input: Schema.Json;
2559
+ readonly requestedThreadId?: string | null | undefined;
2560
+ readonly launchedBy?: {
2561
+ readonly runId: string;
2562
+ readonly threadId: string;
2563
+ readonly effectId: string;
2564
+ readonly causationId: string;
2565
+ readonly causationSeq: number;
2566
+ } | undefined;
2567
+ readonly attributes?: {
2568
+ readonly [x: string]: string;
2569
+ } | undefined;
2570
+ readonly trace?: {
2571
+ readonly traceparent: string;
2572
+ readonly tracestate?: string | undefined;
2573
+ } | undefined;
2574
+ };
2575
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2576
+ readonly type: "runtime.signal.received";
2577
+ readonly payload: {
2578
+ readonly signalType: string;
2579
+ };
2580
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2581
+ readonly type: "runtime.snapshot.taken";
2582
+ readonly payload: {
2583
+ readonly seq: number;
2584
+ readonly stateHash: string;
2585
+ readonly state?: Schema.Json | undefined;
2586
+ };
2587
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2588
+ readonly type: "runtime.thread.cancel.requested";
2589
+ readonly payload: {
2590
+ readonly threadId: string;
2591
+ };
2592
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2593
+ readonly type: "runtime.thread.cancelled";
2594
+ readonly payload: {
2595
+ readonly threadId: string;
2596
+ readonly reason?: string | undefined;
2597
+ readonly resumeSeq?: number | undefined;
2598
+ };
2599
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2600
+ readonly type: "runtime.thread.completed";
2601
+ readonly payload: {
2602
+ readonly threadId: string;
2603
+ readonly output: Schema.Json;
2604
+ };
2605
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2606
+ readonly type: "runtime.thread.failed";
2607
+ readonly payload: {
2608
+ readonly threadId: string;
2609
+ readonly error: string;
2610
+ };
2611
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2612
+ readonly type: "runtime.thread.started";
2613
+ readonly payload: {
2614
+ readonly threadId: string;
2615
+ readonly kind: string;
2616
+ readonly definitionName: string;
2617
+ readonly definitionVersion: string;
2618
+ readonly input: Schema.Json;
2619
+ readonly parentThreadId: string | null;
2620
+ };
2621
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2622
+ readonly type: "runtime.timer.fired";
2623
+ readonly payload: {
2624
+ readonly timerId: string;
2625
+ readonly waitId: string;
2626
+ };
2627
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2628
+ readonly type: "runtime.timer.set";
2629
+ readonly payload: {
2630
+ readonly timerId: string;
2631
+ readonly waitId: string;
2632
+ readonly wakeAt: number;
2633
+ };
2634
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2635
+ readonly type: "runtime.wait.registered";
2636
+ readonly payload: {
2637
+ readonly waitId: string;
2638
+ readonly threadId?: string | undefined;
2639
+ readonly on: {
2640
+ readonly type: string | readonly string[];
2641
+ readonly match?: Schema.Json | undefined;
2642
+ } | {
2643
+ readonly timerAt: number;
2644
+ };
2645
+ readonly tag?: Schema.Json | undefined;
2646
+ };
2647
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2648
+ readonly type: "runtime.wait.satisfied";
2649
+ readonly payload: {
2650
+ readonly waitId: string;
2651
+ readonly tag?: Schema.Json | undefined;
2652
+ readonly event: {
2653
+ readonly id: string;
2654
+ readonly type: string;
2655
+ readonly payload: Schema.Json;
2656
+ };
2657
+ };
2658
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2659
+ readonly type: "swarm.board.pulled";
2660
+ readonly payload: {
2661
+ readonly board: string;
2662
+ readonly pull: number;
2663
+ readonly cursor: string | null;
2664
+ readonly events: readonly {
2665
+ readonly cursor: string;
2666
+ readonly type: "message.labeled" | "message.posted" | "task.blocked" | "task.canceled" | "task.claimed" | "task.completed" | "task.created" | "task.failed" | "task.ready" | "task.reopened";
2667
+ readonly at: number;
2668
+ readonly by: string;
2669
+ readonly message?: {
2670
+ readonly id: string;
2671
+ readonly channel: string;
2672
+ readonly text: string;
2673
+ readonly by: string;
2674
+ readonly re: string | null;
2675
+ readonly mentions: readonly string[];
2676
+ readonly labels: {
2677
+ readonly [x: string]: string;
2678
+ };
2679
+ readonly createdAt: number;
2680
+ } | undefined;
2681
+ readonly task?: {
2682
+ readonly id: string;
2683
+ readonly channel: string;
2684
+ readonly text: string;
2685
+ readonly by: string;
2686
+ readonly for: string | null;
2687
+ readonly needs: readonly string[];
2688
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
2689
+ readonly holder: string | null;
2690
+ readonly epoch: number;
2691
+ readonly leaseUntil: number | null;
2692
+ readonly note: string | null;
2693
+ readonly createdAt: number;
2694
+ readonly updatedAt: number;
2695
+ } | undefined;
2696
+ }[];
2697
+ readonly more: boolean;
2698
+ readonly nextPullAt: number | null;
2699
+ };
2700
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2701
+ readonly type: "swarm.call.rejected";
2702
+ readonly payload: {
2703
+ readonly callId: string;
2704
+ readonly board: string;
2705
+ readonly code: string;
2706
+ readonly error: string;
2707
+ };
2708
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2709
+ readonly type: "swarm.member.activated";
2710
+ readonly payload: {
2711
+ readonly board: string;
2712
+ readonly member: string;
2713
+ readonly activation: number;
2714
+ readonly runId: string;
2715
+ readonly events: number;
2716
+ readonly at: number;
2717
+ };
2718
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2719
+ readonly type: "swarm.message.labeled";
2720
+ readonly payload: {
2721
+ readonly callId: string;
2722
+ readonly board: string;
2723
+ readonly message: {
2724
+ readonly id: string;
2725
+ readonly channel: string;
2726
+ readonly text: string;
2727
+ readonly by: string;
2728
+ readonly re: string | null;
2729
+ readonly mentions: readonly string[];
2730
+ readonly labels: {
2731
+ readonly [x: string]: string;
2732
+ };
2733
+ readonly createdAt: number;
2734
+ };
2735
+ };
2736
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2737
+ readonly type: "swarm.message.posted";
2738
+ readonly payload: {
2739
+ readonly callId: string;
2740
+ readonly board: string;
2741
+ readonly message: {
2742
+ readonly id: string;
2743
+ readonly channel: string;
2744
+ readonly text: string;
2745
+ readonly by: string;
2746
+ readonly re: string | null;
2747
+ readonly mentions: readonly string[];
2748
+ readonly labels: {
2749
+ readonly [x: string]: string;
2750
+ };
2751
+ readonly createdAt: number;
2752
+ };
2753
+ };
2754
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2755
+ readonly type: "swarm.messages.read";
2756
+ readonly payload: {
2757
+ readonly callId: string;
2758
+ readonly board: string;
2759
+ readonly messages: readonly {
2760
+ readonly id: string;
2761
+ readonly channel: string;
2762
+ readonly text: string;
2763
+ readonly by: string;
2764
+ readonly re: string | null;
2765
+ readonly mentions: readonly string[];
2766
+ readonly labels: {
2767
+ readonly [x: string]: string;
2768
+ };
2769
+ readonly createdAt: number;
2770
+ }[];
2771
+ };
2772
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2773
+ readonly type: "swarm.nudged";
2774
+ readonly payload: {};
2775
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2776
+ readonly type: "swarm.stopped";
2777
+ readonly payload: {};
2778
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2779
+ readonly type: "swarm.task.claimed";
2780
+ readonly payload: {
2781
+ readonly callId: string;
2782
+ readonly board: string;
2783
+ readonly claim: {
2784
+ readonly task: {
2785
+ readonly id: string;
2786
+ readonly channel: string;
2787
+ readonly text: string;
2788
+ readonly by: string;
2789
+ readonly for: string | null;
2790
+ readonly needs: readonly string[];
2791
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
2792
+ readonly holder: string | null;
2793
+ readonly epoch: number;
2794
+ readonly leaseUntil: number | null;
2795
+ readonly note: string | null;
2796
+ readonly createdAt: number;
2797
+ readonly updatedAt: number;
2798
+ };
2799
+ readonly token: string;
2800
+ readonly until: number;
2801
+ } | null;
2802
+ };
2803
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2804
+ readonly type: "swarm.task.created";
2805
+ readonly payload: {
2806
+ readonly callId: string;
2807
+ readonly board: string;
2808
+ readonly task: {
2809
+ readonly id: string;
2810
+ readonly channel: string;
2811
+ readonly text: string;
2812
+ readonly by: string;
2813
+ readonly for: string | null;
2814
+ readonly needs: readonly string[];
2815
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
2816
+ readonly holder: string | null;
2817
+ readonly epoch: number;
2818
+ readonly leaseUntil: number | null;
2819
+ readonly note: string | null;
2820
+ readonly createdAt: number;
2821
+ readonly updatedAt: number;
2822
+ };
2823
+ };
2824
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2825
+ readonly type: "swarm.task.settled";
2826
+ readonly payload: {
2827
+ readonly callId: string;
2828
+ readonly board: string;
2829
+ readonly task: {
2830
+ readonly id: string;
2831
+ readonly channel: string;
2832
+ readonly text: string;
2833
+ readonly by: string;
2834
+ readonly for: string | null;
2835
+ readonly needs: readonly string[];
2836
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
2837
+ readonly holder: string | null;
2838
+ readonly epoch: number;
2839
+ readonly leaseUntil: number | null;
2840
+ readonly note: string | null;
2841
+ readonly createdAt: number;
2842
+ readonly updatedAt: number;
2843
+ };
2844
+ };
2845
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2846
+ readonly type: "swarm.tasks.listed";
2847
+ readonly payload: {
2848
+ readonly callId: string;
2849
+ readonly board: string;
2850
+ readonly tasks: readonly {
2851
+ readonly id: string;
2852
+ readonly channel: string;
2853
+ readonly text: string;
2854
+ readonly by: string;
2855
+ readonly for: string | null;
2856
+ readonly needs: readonly string[];
2857
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
2858
+ readonly holder: string | null;
2859
+ readonly epoch: number;
2860
+ readonly leaseUntil: number | null;
2861
+ readonly note: string | null;
2862
+ readonly createdAt: number;
2863
+ readonly updatedAt: number;
2864
+ }[];
2865
+ };
2866
+ })>>;
2867
+ export declare const createTaskEffect: NoInfer<import("@swirls/looms/core").LocalEffectDefinition<{
2868
+ readonly callId: string;
2869
+ readonly board: string;
2870
+ readonly as: string;
2871
+ readonly channel: string;
2872
+ readonly text: string;
2873
+ readonly for?: string | undefined;
2874
+ readonly needs?: readonly string[] | undefined;
2875
+ }, BoardsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2876
+ readonly type: "runtime.child.close.requested";
2877
+ readonly payload: {
2878
+ readonly policy: "terminate" | "wait";
2879
+ };
2880
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2881
+ readonly type: "runtime.child.settled";
2882
+ readonly payload: {
2883
+ readonly runId: string;
2884
+ readonly status: "cancelled" | "completed" | "failed";
2885
+ readonly output: Schema.Json;
2886
+ readonly error: string | null;
2887
+ };
2888
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2889
+ readonly type: "runtime.effect.ambiguous";
2890
+ readonly payload: {
2891
+ readonly effectId: string;
2892
+ readonly attempt: number;
2893
+ readonly error: string;
2894
+ };
2895
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2896
+ readonly type: "runtime.effect.attempt.started";
2897
+ readonly payload: {
2898
+ readonly effectId: string;
2899
+ readonly attempt: number;
2900
+ };
2901
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2902
+ readonly type: "runtime.effect.cancel.requested";
2903
+ readonly payload: {
2904
+ readonly effectId: string;
2905
+ readonly attempt: number;
2906
+ readonly deadlineAt: number | null;
2907
+ };
2908
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2909
+ readonly type: "runtime.effect.cancelled";
2910
+ readonly payload: {
2911
+ readonly effectId: string;
2912
+ readonly attempt: number;
2913
+ };
2914
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2915
+ readonly type: "runtime.effect.completed";
2916
+ readonly payload: {
2917
+ readonly effectId: string;
2918
+ readonly attempt: number;
2919
+ };
2920
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2921
+ readonly type: "runtime.effect.dispatch.deferred";
2922
+ readonly payload: {
2923
+ readonly effectId: string;
2924
+ readonly attempt: number;
2925
+ readonly retryAt: number;
2926
+ readonly error: string;
2927
+ readonly try: number;
2928
+ };
2929
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2930
+ readonly type: "runtime.effect.dispatched";
2931
+ readonly payload: {
2932
+ readonly effectId: string;
2933
+ readonly attempt: number;
2934
+ readonly deadlineAt: number | null;
2935
+ };
2936
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2937
+ readonly type: "runtime.effect.failed";
2938
+ readonly payload: {
2939
+ readonly effectId: string;
2940
+ readonly error: string;
2941
+ readonly nonRetryable?: boolean | undefined;
2942
+ readonly retryAfterMs?: number | undefined;
2943
+ };
2944
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2945
+ readonly type: "runtime.effect.heartbeat";
2946
+ readonly payload: {
2947
+ readonly effectId: string;
2948
+ readonly attempt: number;
2949
+ readonly heartbeatAt: number;
2950
+ readonly deadlineAt: number | null;
2951
+ readonly details?: Schema.Json | undefined;
2952
+ };
2953
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2954
+ readonly type: "runtime.effect.queued";
2955
+ readonly payload: {
2956
+ readonly effectId: string;
2957
+ readonly attempt: number;
2958
+ readonly deadlineAt: number | null;
2959
+ };
2960
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2961
+ readonly type: "runtime.effect.retry.scheduled";
2962
+ readonly payload: {
2963
+ readonly effectId: string;
2964
+ readonly attempt: number;
2965
+ readonly nextAttemptAt: number;
2966
+ readonly error: string;
2967
+ };
2968
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2969
+ readonly type: "runtime.effect.timed_out";
2970
+ readonly payload: {
2971
+ readonly effectId: string;
2972
+ readonly attempt: number;
2973
+ readonly timeout: string;
2974
+ };
2975
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2976
+ readonly type: "runtime.effect.worker.started";
2977
+ readonly payload: {
2978
+ readonly effectId: string;
2979
+ readonly attempt: number;
2980
+ readonly deadlineAt: number | null;
2981
+ };
2982
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2983
+ readonly type: "runtime.fork.elided";
2984
+ readonly payload: {
2985
+ readonly type: string;
2986
+ };
2987
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2988
+ readonly type: "runtime.run.cancelled";
2989
+ readonly payload: {
2990
+ readonly reason?: string | undefined;
2991
+ };
2992
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2993
+ readonly type: "runtime.run.completed";
2994
+ readonly payload: {
2995
+ readonly output: Schema.Json;
2996
+ readonly error: string | null;
2997
+ };
2998
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
2999
+ readonly type: "runtime.run.forked";
3000
+ readonly payload: {
3001
+ readonly sourceRunId: string;
3002
+ readonly sourceSeq: number;
3003
+ };
3004
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3005
+ readonly type: "runtime.run.launched";
3006
+ readonly payload: {
3007
+ readonly runId: string;
3008
+ readonly kind: string;
3009
+ readonly definitionName: string;
3010
+ readonly definitionVersion: string;
3011
+ readonly effectId: string;
3012
+ readonly close: "terminate" | "wait";
3013
+ };
3014
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3015
+ readonly type: "runtime.run.started";
3016
+ readonly payload: {
3017
+ readonly rootThreadId?: string | undefined;
3018
+ readonly kind: string;
3019
+ readonly definitionName: string;
3020
+ readonly definitionVersion: string;
3021
+ readonly input: Schema.Json;
3022
+ readonly requestedThreadId?: string | null | undefined;
3023
+ readonly launchedBy?: {
3024
+ readonly runId: string;
3025
+ readonly threadId: string;
3026
+ readonly effectId: string;
3027
+ readonly causationId: string;
3028
+ readonly causationSeq: number;
3029
+ } | undefined;
3030
+ readonly attributes?: {
3031
+ readonly [x: string]: string;
3032
+ } | undefined;
3033
+ readonly trace?: {
3034
+ readonly traceparent: string;
3035
+ readonly tracestate?: string | undefined;
3036
+ } | undefined;
3037
+ };
3038
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3039
+ readonly type: "runtime.signal.received";
3040
+ readonly payload: {
3041
+ readonly signalType: string;
3042
+ };
3043
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3044
+ readonly type: "runtime.snapshot.taken";
3045
+ readonly payload: {
3046
+ readonly seq: number;
3047
+ readonly stateHash: string;
3048
+ readonly state?: Schema.Json | undefined;
3049
+ };
3050
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3051
+ readonly type: "runtime.thread.cancel.requested";
3052
+ readonly payload: {
3053
+ readonly threadId: string;
3054
+ };
3055
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3056
+ readonly type: "runtime.thread.cancelled";
3057
+ readonly payload: {
3058
+ readonly threadId: string;
3059
+ readonly reason?: string | undefined;
3060
+ readonly resumeSeq?: number | undefined;
3061
+ };
3062
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3063
+ readonly type: "runtime.thread.completed";
3064
+ readonly payload: {
3065
+ readonly threadId: string;
3066
+ readonly output: Schema.Json;
3067
+ };
3068
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3069
+ readonly type: "runtime.thread.failed";
3070
+ readonly payload: {
3071
+ readonly threadId: string;
3072
+ readonly error: string;
3073
+ };
3074
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3075
+ readonly type: "runtime.thread.started";
3076
+ readonly payload: {
3077
+ readonly threadId: string;
3078
+ readonly kind: string;
3079
+ readonly definitionName: string;
3080
+ readonly definitionVersion: string;
3081
+ readonly input: Schema.Json;
3082
+ readonly parentThreadId: string | null;
3083
+ };
3084
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3085
+ readonly type: "runtime.timer.fired";
3086
+ readonly payload: {
3087
+ readonly timerId: string;
3088
+ readonly waitId: string;
3089
+ };
3090
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3091
+ readonly type: "runtime.timer.set";
3092
+ readonly payload: {
3093
+ readonly timerId: string;
3094
+ readonly waitId: string;
3095
+ readonly wakeAt: number;
3096
+ };
3097
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3098
+ readonly type: "runtime.wait.registered";
3099
+ readonly payload: {
3100
+ readonly waitId: string;
3101
+ readonly threadId?: string | undefined;
3102
+ readonly on: {
3103
+ readonly type: string | readonly string[];
3104
+ readonly match?: Schema.Json | undefined;
3105
+ } | {
3106
+ readonly timerAt: number;
3107
+ };
3108
+ readonly tag?: Schema.Json | undefined;
3109
+ };
3110
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3111
+ readonly type: "runtime.wait.satisfied";
3112
+ readonly payload: {
3113
+ readonly waitId: string;
3114
+ readonly tag?: Schema.Json | undefined;
3115
+ readonly event: {
3116
+ readonly id: string;
3117
+ readonly type: string;
3118
+ readonly payload: Schema.Json;
3119
+ };
3120
+ };
3121
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3122
+ readonly type: "swarm.board.pulled";
3123
+ readonly payload: {
3124
+ readonly board: string;
3125
+ readonly pull: number;
3126
+ readonly cursor: string | null;
3127
+ readonly events: readonly {
3128
+ readonly cursor: string;
3129
+ readonly type: "message.labeled" | "message.posted" | "task.blocked" | "task.canceled" | "task.claimed" | "task.completed" | "task.created" | "task.failed" | "task.ready" | "task.reopened";
3130
+ readonly at: number;
3131
+ readonly by: string;
3132
+ readonly message?: {
3133
+ readonly id: string;
3134
+ readonly channel: string;
3135
+ readonly text: string;
3136
+ readonly by: string;
3137
+ readonly re: string | null;
3138
+ readonly mentions: readonly string[];
3139
+ readonly labels: {
3140
+ readonly [x: string]: string;
3141
+ };
3142
+ readonly createdAt: number;
3143
+ } | undefined;
3144
+ readonly task?: {
3145
+ readonly id: string;
3146
+ readonly channel: string;
3147
+ readonly text: string;
3148
+ readonly by: string;
3149
+ readonly for: string | null;
3150
+ readonly needs: readonly string[];
3151
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
3152
+ readonly holder: string | null;
3153
+ readonly epoch: number;
3154
+ readonly leaseUntil: number | null;
3155
+ readonly note: string | null;
3156
+ readonly createdAt: number;
3157
+ readonly updatedAt: number;
3158
+ } | undefined;
3159
+ }[];
3160
+ readonly more: boolean;
3161
+ readonly nextPullAt: number | null;
3162
+ };
3163
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3164
+ readonly type: "swarm.call.rejected";
3165
+ readonly payload: {
3166
+ readonly callId: string;
3167
+ readonly board: string;
3168
+ readonly code: string;
3169
+ readonly error: string;
3170
+ };
3171
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3172
+ readonly type: "swarm.member.activated";
3173
+ readonly payload: {
3174
+ readonly board: string;
3175
+ readonly member: string;
3176
+ readonly activation: number;
3177
+ readonly runId: string;
3178
+ readonly events: number;
3179
+ readonly at: number;
3180
+ };
3181
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3182
+ readonly type: "swarm.message.labeled";
3183
+ readonly payload: {
3184
+ readonly callId: string;
3185
+ readonly board: string;
3186
+ readonly message: {
3187
+ readonly id: string;
3188
+ readonly channel: string;
3189
+ readonly text: string;
3190
+ readonly by: string;
3191
+ readonly re: string | null;
3192
+ readonly mentions: readonly string[];
3193
+ readonly labels: {
3194
+ readonly [x: string]: string;
3195
+ };
3196
+ readonly createdAt: number;
3197
+ };
3198
+ };
3199
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3200
+ readonly type: "swarm.message.posted";
3201
+ readonly payload: {
3202
+ readonly callId: string;
3203
+ readonly board: string;
3204
+ readonly message: {
3205
+ readonly id: string;
3206
+ readonly channel: string;
3207
+ readonly text: string;
3208
+ readonly by: string;
3209
+ readonly re: string | null;
3210
+ readonly mentions: readonly string[];
3211
+ readonly labels: {
3212
+ readonly [x: string]: string;
3213
+ };
3214
+ readonly createdAt: number;
3215
+ };
3216
+ };
3217
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3218
+ readonly type: "swarm.messages.read";
3219
+ readonly payload: {
3220
+ readonly callId: string;
3221
+ readonly board: string;
3222
+ readonly messages: readonly {
3223
+ readonly id: string;
3224
+ readonly channel: string;
3225
+ readonly text: string;
3226
+ readonly by: string;
3227
+ readonly re: string | null;
3228
+ readonly mentions: readonly string[];
3229
+ readonly labels: {
3230
+ readonly [x: string]: string;
3231
+ };
3232
+ readonly createdAt: number;
3233
+ }[];
3234
+ };
3235
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3236
+ readonly type: "swarm.nudged";
3237
+ readonly payload: {};
3238
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3239
+ readonly type: "swarm.stopped";
3240
+ readonly payload: {};
3241
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3242
+ readonly type: "swarm.task.claimed";
3243
+ readonly payload: {
3244
+ readonly callId: string;
3245
+ readonly board: string;
3246
+ readonly claim: {
3247
+ readonly task: {
3248
+ readonly id: string;
3249
+ readonly channel: string;
3250
+ readonly text: string;
3251
+ readonly by: string;
3252
+ readonly for: string | null;
3253
+ readonly needs: readonly string[];
3254
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
3255
+ readonly holder: string | null;
3256
+ readonly epoch: number;
3257
+ readonly leaseUntil: number | null;
3258
+ readonly note: string | null;
3259
+ readonly createdAt: number;
3260
+ readonly updatedAt: number;
3261
+ };
3262
+ readonly token: string;
3263
+ readonly until: number;
3264
+ } | null;
3265
+ };
3266
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3267
+ readonly type: "swarm.task.created";
3268
+ readonly payload: {
3269
+ readonly callId: string;
3270
+ readonly board: string;
3271
+ readonly task: {
3272
+ readonly id: string;
3273
+ readonly channel: string;
3274
+ readonly text: string;
3275
+ readonly by: string;
3276
+ readonly for: string | null;
3277
+ readonly needs: readonly string[];
3278
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
3279
+ readonly holder: string | null;
3280
+ readonly epoch: number;
3281
+ readonly leaseUntil: number | null;
3282
+ readonly note: string | null;
3283
+ readonly createdAt: number;
3284
+ readonly updatedAt: number;
3285
+ };
3286
+ };
3287
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3288
+ readonly type: "swarm.task.settled";
3289
+ readonly payload: {
3290
+ readonly callId: string;
3291
+ readonly board: string;
3292
+ readonly task: {
3293
+ readonly id: string;
3294
+ readonly channel: string;
3295
+ readonly text: string;
3296
+ readonly by: string;
3297
+ readonly for: string | null;
3298
+ readonly needs: readonly string[];
3299
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
3300
+ readonly holder: string | null;
3301
+ readonly epoch: number;
3302
+ readonly leaseUntil: number | null;
3303
+ readonly note: string | null;
3304
+ readonly createdAt: number;
3305
+ readonly updatedAt: number;
3306
+ };
3307
+ };
3308
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3309
+ readonly type: "swarm.tasks.listed";
3310
+ readonly payload: {
3311
+ readonly callId: string;
3312
+ readonly board: string;
3313
+ readonly tasks: readonly {
3314
+ readonly id: string;
3315
+ readonly channel: string;
3316
+ readonly text: string;
3317
+ readonly by: string;
3318
+ readonly for: string | null;
3319
+ readonly needs: readonly string[];
3320
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
3321
+ readonly holder: string | null;
3322
+ readonly epoch: number;
3323
+ readonly leaseUntil: number | null;
3324
+ readonly note: string | null;
3325
+ readonly createdAt: number;
3326
+ readonly updatedAt: number;
3327
+ }[];
3328
+ };
3329
+ })>>;
3330
+ export declare const listTasksEffect: NoInfer<import("@swirls/looms/core").LocalEffectDefinition<{
3331
+ readonly callId: string;
3332
+ readonly board: string;
3333
+ readonly as: string;
3334
+ readonly channel?: string | undefined;
3335
+ readonly state?: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting" | undefined;
3336
+ readonly for?: string | undefined;
3337
+ }, BoardsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3338
+ readonly type: "runtime.child.close.requested";
3339
+ readonly payload: {
3340
+ readonly policy: "terminate" | "wait";
3341
+ };
3342
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3343
+ readonly type: "runtime.child.settled";
3344
+ readonly payload: {
3345
+ readonly runId: string;
3346
+ readonly status: "cancelled" | "completed" | "failed";
3347
+ readonly output: Schema.Json;
3348
+ readonly error: string | null;
3349
+ };
3350
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3351
+ readonly type: "runtime.effect.ambiguous";
3352
+ readonly payload: {
3353
+ readonly effectId: string;
3354
+ readonly attempt: number;
3355
+ readonly error: string;
3356
+ };
3357
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3358
+ readonly type: "runtime.effect.attempt.started";
3359
+ readonly payload: {
3360
+ readonly effectId: string;
3361
+ readonly attempt: number;
3362
+ };
3363
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3364
+ readonly type: "runtime.effect.cancel.requested";
3365
+ readonly payload: {
3366
+ readonly effectId: string;
3367
+ readonly attempt: number;
3368
+ readonly deadlineAt: number | null;
3369
+ };
3370
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3371
+ readonly type: "runtime.effect.cancelled";
3372
+ readonly payload: {
3373
+ readonly effectId: string;
3374
+ readonly attempt: number;
3375
+ };
3376
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3377
+ readonly type: "runtime.effect.completed";
3378
+ readonly payload: {
3379
+ readonly effectId: string;
3380
+ readonly attempt: number;
3381
+ };
3382
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3383
+ readonly type: "runtime.effect.dispatch.deferred";
3384
+ readonly payload: {
3385
+ readonly effectId: string;
3386
+ readonly attempt: number;
3387
+ readonly retryAt: number;
3388
+ readonly error: string;
3389
+ readonly try: number;
3390
+ };
3391
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3392
+ readonly type: "runtime.effect.dispatched";
3393
+ readonly payload: {
3394
+ readonly effectId: string;
3395
+ readonly attempt: number;
3396
+ readonly deadlineAt: number | null;
3397
+ };
3398
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3399
+ readonly type: "runtime.effect.failed";
3400
+ readonly payload: {
3401
+ readonly effectId: string;
3402
+ readonly error: string;
3403
+ readonly nonRetryable?: boolean | undefined;
3404
+ readonly retryAfterMs?: number | undefined;
3405
+ };
3406
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3407
+ readonly type: "runtime.effect.heartbeat";
3408
+ readonly payload: {
3409
+ readonly effectId: string;
3410
+ readonly attempt: number;
3411
+ readonly heartbeatAt: number;
3412
+ readonly deadlineAt: number | null;
3413
+ readonly details?: Schema.Json | undefined;
3414
+ };
3415
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3416
+ readonly type: "runtime.effect.queued";
3417
+ readonly payload: {
3418
+ readonly effectId: string;
3419
+ readonly attempt: number;
3420
+ readonly deadlineAt: number | null;
3421
+ };
3422
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3423
+ readonly type: "runtime.effect.retry.scheduled";
3424
+ readonly payload: {
3425
+ readonly effectId: string;
3426
+ readonly attempt: number;
3427
+ readonly nextAttemptAt: number;
3428
+ readonly error: string;
3429
+ };
3430
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3431
+ readonly type: "runtime.effect.timed_out";
3432
+ readonly payload: {
3433
+ readonly effectId: string;
3434
+ readonly attempt: number;
3435
+ readonly timeout: string;
3436
+ };
3437
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3438
+ readonly type: "runtime.effect.worker.started";
3439
+ readonly payload: {
3440
+ readonly effectId: string;
3441
+ readonly attempt: number;
3442
+ readonly deadlineAt: number | null;
3443
+ };
3444
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3445
+ readonly type: "runtime.fork.elided";
3446
+ readonly payload: {
3447
+ readonly type: string;
3448
+ };
3449
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3450
+ readonly type: "runtime.run.cancelled";
3451
+ readonly payload: {
3452
+ readonly reason?: string | undefined;
3453
+ };
3454
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3455
+ readonly type: "runtime.run.completed";
3456
+ readonly payload: {
3457
+ readonly output: Schema.Json;
3458
+ readonly error: string | null;
3459
+ };
3460
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3461
+ readonly type: "runtime.run.forked";
3462
+ readonly payload: {
3463
+ readonly sourceRunId: string;
3464
+ readonly sourceSeq: number;
3465
+ };
3466
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3467
+ readonly type: "runtime.run.launched";
3468
+ readonly payload: {
3469
+ readonly runId: string;
3470
+ readonly kind: string;
3471
+ readonly definitionName: string;
3472
+ readonly definitionVersion: string;
3473
+ readonly effectId: string;
3474
+ readonly close: "terminate" | "wait";
3475
+ };
3476
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3477
+ readonly type: "runtime.run.started";
3478
+ readonly payload: {
3479
+ readonly rootThreadId?: string | undefined;
3480
+ readonly kind: string;
3481
+ readonly definitionName: string;
3482
+ readonly definitionVersion: string;
3483
+ readonly input: Schema.Json;
3484
+ readonly requestedThreadId?: string | null | undefined;
3485
+ readonly launchedBy?: {
3486
+ readonly runId: string;
3487
+ readonly threadId: string;
3488
+ readonly effectId: string;
3489
+ readonly causationId: string;
3490
+ readonly causationSeq: number;
3491
+ } | undefined;
3492
+ readonly attributes?: {
3493
+ readonly [x: string]: string;
3494
+ } | undefined;
3495
+ readonly trace?: {
3496
+ readonly traceparent: string;
3497
+ readonly tracestate?: string | undefined;
3498
+ } | undefined;
3499
+ };
3500
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3501
+ readonly type: "runtime.signal.received";
3502
+ readonly payload: {
3503
+ readonly signalType: string;
3504
+ };
3505
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3506
+ readonly type: "runtime.snapshot.taken";
3507
+ readonly payload: {
3508
+ readonly seq: number;
3509
+ readonly stateHash: string;
3510
+ readonly state?: Schema.Json | undefined;
3511
+ };
3512
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3513
+ readonly type: "runtime.thread.cancel.requested";
3514
+ readonly payload: {
3515
+ readonly threadId: string;
3516
+ };
3517
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3518
+ readonly type: "runtime.thread.cancelled";
3519
+ readonly payload: {
3520
+ readonly threadId: string;
3521
+ readonly reason?: string | undefined;
3522
+ readonly resumeSeq?: number | undefined;
3523
+ };
3524
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3525
+ readonly type: "runtime.thread.completed";
3526
+ readonly payload: {
3527
+ readonly threadId: string;
3528
+ readonly output: Schema.Json;
3529
+ };
3530
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3531
+ readonly type: "runtime.thread.failed";
3532
+ readonly payload: {
3533
+ readonly threadId: string;
3534
+ readonly error: string;
3535
+ };
3536
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3537
+ readonly type: "runtime.thread.started";
3538
+ readonly payload: {
3539
+ readonly threadId: string;
3540
+ readonly kind: string;
3541
+ readonly definitionName: string;
3542
+ readonly definitionVersion: string;
3543
+ readonly input: Schema.Json;
3544
+ readonly parentThreadId: string | null;
3545
+ };
3546
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3547
+ readonly type: "runtime.timer.fired";
3548
+ readonly payload: {
3549
+ readonly timerId: string;
3550
+ readonly waitId: string;
3551
+ };
3552
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3553
+ readonly type: "runtime.timer.set";
3554
+ readonly payload: {
3555
+ readonly timerId: string;
3556
+ readonly waitId: string;
3557
+ readonly wakeAt: number;
3558
+ };
3559
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3560
+ readonly type: "runtime.wait.registered";
3561
+ readonly payload: {
3562
+ readonly waitId: string;
3563
+ readonly threadId?: string | undefined;
3564
+ readonly on: {
3565
+ readonly type: string | readonly string[];
3566
+ readonly match?: Schema.Json | undefined;
3567
+ } | {
3568
+ readonly timerAt: number;
3569
+ };
3570
+ readonly tag?: Schema.Json | undefined;
3571
+ };
3572
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3573
+ readonly type: "runtime.wait.satisfied";
3574
+ readonly payload: {
3575
+ readonly waitId: string;
3576
+ readonly tag?: Schema.Json | undefined;
3577
+ readonly event: {
3578
+ readonly id: string;
3579
+ readonly type: string;
3580
+ readonly payload: Schema.Json;
3581
+ };
3582
+ };
3583
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3584
+ readonly type: "swarm.board.pulled";
3585
+ readonly payload: {
3586
+ readonly board: string;
3587
+ readonly pull: number;
3588
+ readonly cursor: string | null;
3589
+ readonly events: readonly {
3590
+ readonly cursor: string;
3591
+ readonly type: "message.labeled" | "message.posted" | "task.blocked" | "task.canceled" | "task.claimed" | "task.completed" | "task.created" | "task.failed" | "task.ready" | "task.reopened";
3592
+ readonly at: number;
3593
+ readonly by: string;
3594
+ readonly message?: {
3595
+ readonly id: string;
3596
+ readonly channel: string;
3597
+ readonly text: string;
3598
+ readonly by: string;
3599
+ readonly re: string | null;
3600
+ readonly mentions: readonly string[];
3601
+ readonly labels: {
3602
+ readonly [x: string]: string;
3603
+ };
3604
+ readonly createdAt: number;
3605
+ } | undefined;
3606
+ readonly task?: {
3607
+ readonly id: string;
3608
+ readonly channel: string;
3609
+ readonly text: string;
3610
+ readonly by: string;
3611
+ readonly for: string | null;
3612
+ readonly needs: readonly string[];
3613
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
3614
+ readonly holder: string | null;
3615
+ readonly epoch: number;
3616
+ readonly leaseUntil: number | null;
3617
+ readonly note: string | null;
3618
+ readonly createdAt: number;
3619
+ readonly updatedAt: number;
3620
+ } | undefined;
3621
+ }[];
3622
+ readonly more: boolean;
3623
+ readonly nextPullAt: number | null;
3624
+ };
3625
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3626
+ readonly type: "swarm.call.rejected";
3627
+ readonly payload: {
3628
+ readonly callId: string;
3629
+ readonly board: string;
3630
+ readonly code: string;
3631
+ readonly error: string;
3632
+ };
3633
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3634
+ readonly type: "swarm.member.activated";
3635
+ readonly payload: {
3636
+ readonly board: string;
3637
+ readonly member: string;
3638
+ readonly activation: number;
3639
+ readonly runId: string;
3640
+ readonly events: number;
3641
+ readonly at: number;
3642
+ };
3643
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3644
+ readonly type: "swarm.message.labeled";
3645
+ readonly payload: {
3646
+ readonly callId: string;
3647
+ readonly board: string;
3648
+ readonly message: {
3649
+ readonly id: string;
3650
+ readonly channel: string;
3651
+ readonly text: string;
3652
+ readonly by: string;
3653
+ readonly re: string | null;
3654
+ readonly mentions: readonly string[];
3655
+ readonly labels: {
3656
+ readonly [x: string]: string;
3657
+ };
3658
+ readonly createdAt: number;
3659
+ };
3660
+ };
3661
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3662
+ readonly type: "swarm.message.posted";
3663
+ readonly payload: {
3664
+ readonly callId: string;
3665
+ readonly board: string;
3666
+ readonly message: {
3667
+ readonly id: string;
3668
+ readonly channel: string;
3669
+ readonly text: string;
3670
+ readonly by: string;
3671
+ readonly re: string | null;
3672
+ readonly mentions: readonly string[];
3673
+ readonly labels: {
3674
+ readonly [x: string]: string;
3675
+ };
3676
+ readonly createdAt: number;
3677
+ };
3678
+ };
3679
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3680
+ readonly type: "swarm.messages.read";
3681
+ readonly payload: {
3682
+ readonly callId: string;
3683
+ readonly board: string;
3684
+ readonly messages: readonly {
3685
+ readonly id: string;
3686
+ readonly channel: string;
3687
+ readonly text: string;
3688
+ readonly by: string;
3689
+ readonly re: string | null;
3690
+ readonly mentions: readonly string[];
3691
+ readonly labels: {
3692
+ readonly [x: string]: string;
3693
+ };
3694
+ readonly createdAt: number;
3695
+ }[];
3696
+ };
3697
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3698
+ readonly type: "swarm.nudged";
3699
+ readonly payload: {};
3700
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3701
+ readonly type: "swarm.stopped";
3702
+ readonly payload: {};
3703
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3704
+ readonly type: "swarm.task.claimed";
3705
+ readonly payload: {
3706
+ readonly callId: string;
3707
+ readonly board: string;
3708
+ readonly claim: {
3709
+ readonly task: {
3710
+ readonly id: string;
3711
+ readonly channel: string;
3712
+ readonly text: string;
3713
+ readonly by: string;
3714
+ readonly for: string | null;
3715
+ readonly needs: readonly string[];
3716
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
3717
+ readonly holder: string | null;
3718
+ readonly epoch: number;
3719
+ readonly leaseUntil: number | null;
3720
+ readonly note: string | null;
3721
+ readonly createdAt: number;
3722
+ readonly updatedAt: number;
3723
+ };
3724
+ readonly token: string;
3725
+ readonly until: number;
3726
+ } | null;
3727
+ };
3728
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3729
+ readonly type: "swarm.task.created";
3730
+ readonly payload: {
3731
+ readonly callId: string;
3732
+ readonly board: string;
3733
+ readonly task: {
3734
+ readonly id: string;
3735
+ readonly channel: string;
3736
+ readonly text: string;
3737
+ readonly by: string;
3738
+ readonly for: string | null;
3739
+ readonly needs: readonly string[];
3740
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
3741
+ readonly holder: string | null;
3742
+ readonly epoch: number;
3743
+ readonly leaseUntil: number | null;
3744
+ readonly note: string | null;
3745
+ readonly createdAt: number;
3746
+ readonly updatedAt: number;
3747
+ };
3748
+ };
3749
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3750
+ readonly type: "swarm.task.settled";
3751
+ readonly payload: {
3752
+ readonly callId: string;
3753
+ readonly board: string;
3754
+ readonly task: {
3755
+ readonly id: string;
3756
+ readonly channel: string;
3757
+ readonly text: string;
3758
+ readonly by: string;
3759
+ readonly for: string | null;
3760
+ readonly needs: readonly string[];
3761
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
3762
+ readonly holder: string | null;
3763
+ readonly epoch: number;
3764
+ readonly leaseUntil: number | null;
3765
+ readonly note: string | null;
3766
+ readonly createdAt: number;
3767
+ readonly updatedAt: number;
3768
+ };
3769
+ };
3770
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3771
+ readonly type: "swarm.tasks.listed";
3772
+ readonly payload: {
3773
+ readonly callId: string;
3774
+ readonly board: string;
3775
+ readonly tasks: readonly {
3776
+ readonly id: string;
3777
+ readonly channel: string;
3778
+ readonly text: string;
3779
+ readonly by: string;
3780
+ readonly for: string | null;
3781
+ readonly needs: readonly string[];
3782
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
3783
+ readonly holder: string | null;
3784
+ readonly epoch: number;
3785
+ readonly leaseUntil: number | null;
3786
+ readonly note: string | null;
3787
+ readonly createdAt: number;
3788
+ readonly updatedAt: number;
3789
+ }[];
3790
+ };
3791
+ })>>;
3792
+ /**
3793
+ * Not retried: a claim that took effect but whose answer was lost would be refused on a second
3794
+ * attempt, and the lease returns the task to the queue on its own.
3795
+ */
3796
+ export declare const claimTaskEffect: NoInfer<import("@swirls/looms/core").LocalEffectDefinition<{
3797
+ readonly callId: string;
3798
+ readonly board: string;
3799
+ readonly as: string;
3800
+ readonly task?: string | undefined;
3801
+ readonly channel?: string | undefined;
3802
+ readonly leaseMs?: number | undefined;
3803
+ }, BoardsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3804
+ readonly type: "runtime.child.close.requested";
3805
+ readonly payload: {
3806
+ readonly policy: "terminate" | "wait";
3807
+ };
3808
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3809
+ readonly type: "runtime.child.settled";
3810
+ readonly payload: {
3811
+ readonly runId: string;
3812
+ readonly status: "cancelled" | "completed" | "failed";
3813
+ readonly output: Schema.Json;
3814
+ readonly error: string | null;
3815
+ };
3816
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3817
+ readonly type: "runtime.effect.ambiguous";
3818
+ readonly payload: {
3819
+ readonly effectId: string;
3820
+ readonly attempt: number;
3821
+ readonly error: string;
3822
+ };
3823
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3824
+ readonly type: "runtime.effect.attempt.started";
3825
+ readonly payload: {
3826
+ readonly effectId: string;
3827
+ readonly attempt: number;
3828
+ };
3829
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3830
+ readonly type: "runtime.effect.cancel.requested";
3831
+ readonly payload: {
3832
+ readonly effectId: string;
3833
+ readonly attempt: number;
3834
+ readonly deadlineAt: number | null;
3835
+ };
3836
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3837
+ readonly type: "runtime.effect.cancelled";
3838
+ readonly payload: {
3839
+ readonly effectId: string;
3840
+ readonly attempt: number;
3841
+ };
3842
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3843
+ readonly type: "runtime.effect.completed";
3844
+ readonly payload: {
3845
+ readonly effectId: string;
3846
+ readonly attempt: number;
3847
+ };
3848
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3849
+ readonly type: "runtime.effect.dispatch.deferred";
3850
+ readonly payload: {
3851
+ readonly effectId: string;
3852
+ readonly attempt: number;
3853
+ readonly retryAt: number;
3854
+ readonly error: string;
3855
+ readonly try: number;
3856
+ };
3857
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3858
+ readonly type: "runtime.effect.dispatched";
3859
+ readonly payload: {
3860
+ readonly effectId: string;
3861
+ readonly attempt: number;
3862
+ readonly deadlineAt: number | null;
3863
+ };
3864
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3865
+ readonly type: "runtime.effect.failed";
3866
+ readonly payload: {
3867
+ readonly effectId: string;
3868
+ readonly error: string;
3869
+ readonly nonRetryable?: boolean | undefined;
3870
+ readonly retryAfterMs?: number | undefined;
3871
+ };
3872
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3873
+ readonly type: "runtime.effect.heartbeat";
3874
+ readonly payload: {
3875
+ readonly effectId: string;
3876
+ readonly attempt: number;
3877
+ readonly heartbeatAt: number;
3878
+ readonly deadlineAt: number | null;
3879
+ readonly details?: Schema.Json | undefined;
3880
+ };
3881
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3882
+ readonly type: "runtime.effect.queued";
3883
+ readonly payload: {
3884
+ readonly effectId: string;
3885
+ readonly attempt: number;
3886
+ readonly deadlineAt: number | null;
3887
+ };
3888
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3889
+ readonly type: "runtime.effect.retry.scheduled";
3890
+ readonly payload: {
3891
+ readonly effectId: string;
3892
+ readonly attempt: number;
3893
+ readonly nextAttemptAt: number;
3894
+ readonly error: string;
3895
+ };
3896
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3897
+ readonly type: "runtime.effect.timed_out";
3898
+ readonly payload: {
3899
+ readonly effectId: string;
3900
+ readonly attempt: number;
3901
+ readonly timeout: string;
3902
+ };
3903
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3904
+ readonly type: "runtime.effect.worker.started";
3905
+ readonly payload: {
3906
+ readonly effectId: string;
3907
+ readonly attempt: number;
3908
+ readonly deadlineAt: number | null;
3909
+ };
3910
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3911
+ readonly type: "runtime.fork.elided";
3912
+ readonly payload: {
3913
+ readonly type: string;
3914
+ };
3915
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3916
+ readonly type: "runtime.run.cancelled";
3917
+ readonly payload: {
3918
+ readonly reason?: string | undefined;
3919
+ };
3920
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3921
+ readonly type: "runtime.run.completed";
3922
+ readonly payload: {
3923
+ readonly output: Schema.Json;
3924
+ readonly error: string | null;
3925
+ };
3926
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3927
+ readonly type: "runtime.run.forked";
3928
+ readonly payload: {
3929
+ readonly sourceRunId: string;
3930
+ readonly sourceSeq: number;
3931
+ };
3932
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3933
+ readonly type: "runtime.run.launched";
3934
+ readonly payload: {
3935
+ readonly runId: string;
3936
+ readonly kind: string;
3937
+ readonly definitionName: string;
3938
+ readonly definitionVersion: string;
3939
+ readonly effectId: string;
3940
+ readonly close: "terminate" | "wait";
3941
+ };
3942
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3943
+ readonly type: "runtime.run.started";
3944
+ readonly payload: {
3945
+ readonly rootThreadId?: string | undefined;
3946
+ readonly kind: string;
3947
+ readonly definitionName: string;
3948
+ readonly definitionVersion: string;
3949
+ readonly input: Schema.Json;
3950
+ readonly requestedThreadId?: string | null | undefined;
3951
+ readonly launchedBy?: {
3952
+ readonly runId: string;
3953
+ readonly threadId: string;
3954
+ readonly effectId: string;
3955
+ readonly causationId: string;
3956
+ readonly causationSeq: number;
3957
+ } | undefined;
3958
+ readonly attributes?: {
3959
+ readonly [x: string]: string;
3960
+ } | undefined;
3961
+ readonly trace?: {
3962
+ readonly traceparent: string;
3963
+ readonly tracestate?: string | undefined;
3964
+ } | undefined;
3965
+ };
3966
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3967
+ readonly type: "runtime.signal.received";
3968
+ readonly payload: {
3969
+ readonly signalType: string;
3970
+ };
3971
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3972
+ readonly type: "runtime.snapshot.taken";
3973
+ readonly payload: {
3974
+ readonly seq: number;
3975
+ readonly stateHash: string;
3976
+ readonly state?: Schema.Json | undefined;
3977
+ };
3978
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3979
+ readonly type: "runtime.thread.cancel.requested";
3980
+ readonly payload: {
3981
+ readonly threadId: string;
3982
+ };
3983
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3984
+ readonly type: "runtime.thread.cancelled";
3985
+ readonly payload: {
3986
+ readonly threadId: string;
3987
+ readonly reason?: string | undefined;
3988
+ readonly resumeSeq?: number | undefined;
3989
+ };
3990
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3991
+ readonly type: "runtime.thread.completed";
3992
+ readonly payload: {
3993
+ readonly threadId: string;
3994
+ readonly output: Schema.Json;
3995
+ };
3996
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
3997
+ readonly type: "runtime.thread.failed";
3998
+ readonly payload: {
3999
+ readonly threadId: string;
4000
+ readonly error: string;
4001
+ };
4002
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4003
+ readonly type: "runtime.thread.started";
4004
+ readonly payload: {
4005
+ readonly threadId: string;
4006
+ readonly kind: string;
4007
+ readonly definitionName: string;
4008
+ readonly definitionVersion: string;
4009
+ readonly input: Schema.Json;
4010
+ readonly parentThreadId: string | null;
4011
+ };
4012
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4013
+ readonly type: "runtime.timer.fired";
4014
+ readonly payload: {
4015
+ readonly timerId: string;
4016
+ readonly waitId: string;
4017
+ };
4018
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4019
+ readonly type: "runtime.timer.set";
4020
+ readonly payload: {
4021
+ readonly timerId: string;
4022
+ readonly waitId: string;
4023
+ readonly wakeAt: number;
4024
+ };
4025
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4026
+ readonly type: "runtime.wait.registered";
4027
+ readonly payload: {
4028
+ readonly waitId: string;
4029
+ readonly threadId?: string | undefined;
4030
+ readonly on: {
4031
+ readonly type: string | readonly string[];
4032
+ readonly match?: Schema.Json | undefined;
4033
+ } | {
4034
+ readonly timerAt: number;
4035
+ };
4036
+ readonly tag?: Schema.Json | undefined;
4037
+ };
4038
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4039
+ readonly type: "runtime.wait.satisfied";
4040
+ readonly payload: {
4041
+ readonly waitId: string;
4042
+ readonly tag?: Schema.Json | undefined;
4043
+ readonly event: {
4044
+ readonly id: string;
4045
+ readonly type: string;
4046
+ readonly payload: Schema.Json;
4047
+ };
4048
+ };
4049
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4050
+ readonly type: "swarm.board.pulled";
4051
+ readonly payload: {
4052
+ readonly board: string;
4053
+ readonly pull: number;
4054
+ readonly cursor: string | null;
4055
+ readonly events: readonly {
4056
+ readonly cursor: string;
4057
+ readonly type: "message.labeled" | "message.posted" | "task.blocked" | "task.canceled" | "task.claimed" | "task.completed" | "task.created" | "task.failed" | "task.ready" | "task.reopened";
4058
+ readonly at: number;
4059
+ readonly by: string;
4060
+ readonly message?: {
4061
+ readonly id: string;
4062
+ readonly channel: string;
4063
+ readonly text: string;
4064
+ readonly by: string;
4065
+ readonly re: string | null;
4066
+ readonly mentions: readonly string[];
4067
+ readonly labels: {
4068
+ readonly [x: string]: string;
4069
+ };
4070
+ readonly createdAt: number;
4071
+ } | undefined;
4072
+ readonly task?: {
4073
+ readonly id: string;
4074
+ readonly channel: string;
4075
+ readonly text: string;
4076
+ readonly by: string;
4077
+ readonly for: string | null;
4078
+ readonly needs: readonly string[];
4079
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
4080
+ readonly holder: string | null;
4081
+ readonly epoch: number;
4082
+ readonly leaseUntil: number | null;
4083
+ readonly note: string | null;
4084
+ readonly createdAt: number;
4085
+ readonly updatedAt: number;
4086
+ } | undefined;
4087
+ }[];
4088
+ readonly more: boolean;
4089
+ readonly nextPullAt: number | null;
4090
+ };
4091
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4092
+ readonly type: "swarm.call.rejected";
4093
+ readonly payload: {
4094
+ readonly callId: string;
4095
+ readonly board: string;
4096
+ readonly code: string;
4097
+ readonly error: string;
4098
+ };
4099
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4100
+ readonly type: "swarm.member.activated";
4101
+ readonly payload: {
4102
+ readonly board: string;
4103
+ readonly member: string;
4104
+ readonly activation: number;
4105
+ readonly runId: string;
4106
+ readonly events: number;
4107
+ readonly at: number;
4108
+ };
4109
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4110
+ readonly type: "swarm.message.labeled";
4111
+ readonly payload: {
4112
+ readonly callId: string;
4113
+ readonly board: string;
4114
+ readonly message: {
4115
+ readonly id: string;
4116
+ readonly channel: string;
4117
+ readonly text: string;
4118
+ readonly by: string;
4119
+ readonly re: string | null;
4120
+ readonly mentions: readonly string[];
4121
+ readonly labels: {
4122
+ readonly [x: string]: string;
4123
+ };
4124
+ readonly createdAt: number;
4125
+ };
4126
+ };
4127
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4128
+ readonly type: "swarm.message.posted";
4129
+ readonly payload: {
4130
+ readonly callId: string;
4131
+ readonly board: string;
4132
+ readonly message: {
4133
+ readonly id: string;
4134
+ readonly channel: string;
4135
+ readonly text: string;
4136
+ readonly by: string;
4137
+ readonly re: string | null;
4138
+ readonly mentions: readonly string[];
4139
+ readonly labels: {
4140
+ readonly [x: string]: string;
4141
+ };
4142
+ readonly createdAt: number;
4143
+ };
4144
+ };
4145
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4146
+ readonly type: "swarm.messages.read";
4147
+ readonly payload: {
4148
+ readonly callId: string;
4149
+ readonly board: string;
4150
+ readonly messages: readonly {
4151
+ readonly id: string;
4152
+ readonly channel: string;
4153
+ readonly text: string;
4154
+ readonly by: string;
4155
+ readonly re: string | null;
4156
+ readonly mentions: readonly string[];
4157
+ readonly labels: {
4158
+ readonly [x: string]: string;
4159
+ };
4160
+ readonly createdAt: number;
4161
+ }[];
4162
+ };
4163
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4164
+ readonly type: "swarm.nudged";
4165
+ readonly payload: {};
4166
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4167
+ readonly type: "swarm.stopped";
4168
+ readonly payload: {};
4169
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4170
+ readonly type: "swarm.task.claimed";
4171
+ readonly payload: {
4172
+ readonly callId: string;
4173
+ readonly board: string;
4174
+ readonly claim: {
4175
+ readonly task: {
4176
+ readonly id: string;
4177
+ readonly channel: string;
4178
+ readonly text: string;
4179
+ readonly by: string;
4180
+ readonly for: string | null;
4181
+ readonly needs: readonly string[];
4182
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
4183
+ readonly holder: string | null;
4184
+ readonly epoch: number;
4185
+ readonly leaseUntil: number | null;
4186
+ readonly note: string | null;
4187
+ readonly createdAt: number;
4188
+ readonly updatedAt: number;
4189
+ };
4190
+ readonly token: string;
4191
+ readonly until: number;
4192
+ } | null;
4193
+ };
4194
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4195
+ readonly type: "swarm.task.created";
4196
+ readonly payload: {
4197
+ readonly callId: string;
4198
+ readonly board: string;
4199
+ readonly task: {
4200
+ readonly id: string;
4201
+ readonly channel: string;
4202
+ readonly text: string;
4203
+ readonly by: string;
4204
+ readonly for: string | null;
4205
+ readonly needs: readonly string[];
4206
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
4207
+ readonly holder: string | null;
4208
+ readonly epoch: number;
4209
+ readonly leaseUntil: number | null;
4210
+ readonly note: string | null;
4211
+ readonly createdAt: number;
4212
+ readonly updatedAt: number;
4213
+ };
4214
+ };
4215
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4216
+ readonly type: "swarm.task.settled";
4217
+ readonly payload: {
4218
+ readonly callId: string;
4219
+ readonly board: string;
4220
+ readonly task: {
4221
+ readonly id: string;
4222
+ readonly channel: string;
4223
+ readonly text: string;
4224
+ readonly by: string;
4225
+ readonly for: string | null;
4226
+ readonly needs: readonly string[];
4227
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
4228
+ readonly holder: string | null;
4229
+ readonly epoch: number;
4230
+ readonly leaseUntil: number | null;
4231
+ readonly note: string | null;
4232
+ readonly createdAt: number;
4233
+ readonly updatedAt: number;
4234
+ };
4235
+ };
4236
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4237
+ readonly type: "swarm.tasks.listed";
4238
+ readonly payload: {
4239
+ readonly callId: string;
4240
+ readonly board: string;
4241
+ readonly tasks: readonly {
4242
+ readonly id: string;
4243
+ readonly channel: string;
4244
+ readonly text: string;
4245
+ readonly by: string;
4246
+ readonly for: string | null;
4247
+ readonly needs: readonly string[];
4248
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
4249
+ readonly holder: string | null;
4250
+ readonly epoch: number;
4251
+ readonly leaseUntil: number | null;
4252
+ readonly note: string | null;
4253
+ readonly createdAt: number;
4254
+ readonly updatedAt: number;
4255
+ }[];
4256
+ };
4257
+ })>>;
4258
+ export declare const settleTaskEffect: NoInfer<import("@swirls/looms/core").LocalEffectDefinition<{
4259
+ readonly callId: string;
4260
+ readonly board: string;
4261
+ readonly as: string;
4262
+ readonly task: string;
4263
+ readonly token: string;
4264
+ readonly outcome: "blocked" | "completed" | "failed" | "released";
4265
+ readonly note?: string | undefined;
4266
+ }, BoardsTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4267
+ readonly type: "runtime.child.close.requested";
4268
+ readonly payload: {
4269
+ readonly policy: "terminate" | "wait";
4270
+ };
4271
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4272
+ readonly type: "runtime.child.settled";
4273
+ readonly payload: {
4274
+ readonly runId: string;
4275
+ readonly status: "cancelled" | "completed" | "failed";
4276
+ readonly output: Schema.Json;
4277
+ readonly error: string | null;
4278
+ };
4279
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4280
+ readonly type: "runtime.effect.ambiguous";
4281
+ readonly payload: {
4282
+ readonly effectId: string;
4283
+ readonly attempt: number;
4284
+ readonly error: string;
4285
+ };
4286
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4287
+ readonly type: "runtime.effect.attempt.started";
4288
+ readonly payload: {
4289
+ readonly effectId: string;
4290
+ readonly attempt: number;
4291
+ };
4292
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4293
+ readonly type: "runtime.effect.cancel.requested";
4294
+ readonly payload: {
4295
+ readonly effectId: string;
4296
+ readonly attempt: number;
4297
+ readonly deadlineAt: number | null;
4298
+ };
4299
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4300
+ readonly type: "runtime.effect.cancelled";
4301
+ readonly payload: {
4302
+ readonly effectId: string;
4303
+ readonly attempt: number;
4304
+ };
4305
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4306
+ readonly type: "runtime.effect.completed";
4307
+ readonly payload: {
4308
+ readonly effectId: string;
4309
+ readonly attempt: number;
4310
+ };
4311
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4312
+ readonly type: "runtime.effect.dispatch.deferred";
4313
+ readonly payload: {
4314
+ readonly effectId: string;
4315
+ readonly attempt: number;
4316
+ readonly retryAt: number;
4317
+ readonly error: string;
4318
+ readonly try: number;
4319
+ };
4320
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4321
+ readonly type: "runtime.effect.dispatched";
4322
+ readonly payload: {
4323
+ readonly effectId: string;
4324
+ readonly attempt: number;
4325
+ readonly deadlineAt: number | null;
4326
+ };
4327
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4328
+ readonly type: "runtime.effect.failed";
4329
+ readonly payload: {
4330
+ readonly effectId: string;
4331
+ readonly error: string;
4332
+ readonly nonRetryable?: boolean | undefined;
4333
+ readonly retryAfterMs?: number | undefined;
4334
+ };
4335
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4336
+ readonly type: "runtime.effect.heartbeat";
4337
+ readonly payload: {
4338
+ readonly effectId: string;
4339
+ readonly attempt: number;
4340
+ readonly heartbeatAt: number;
4341
+ readonly deadlineAt: number | null;
4342
+ readonly details?: Schema.Json | undefined;
4343
+ };
4344
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4345
+ readonly type: "runtime.effect.queued";
4346
+ readonly payload: {
4347
+ readonly effectId: string;
4348
+ readonly attempt: number;
4349
+ readonly deadlineAt: number | null;
4350
+ };
4351
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4352
+ readonly type: "runtime.effect.retry.scheduled";
4353
+ readonly payload: {
4354
+ readonly effectId: string;
4355
+ readonly attempt: number;
4356
+ readonly nextAttemptAt: number;
4357
+ readonly error: string;
4358
+ };
4359
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4360
+ readonly type: "runtime.effect.timed_out";
4361
+ readonly payload: {
4362
+ readonly effectId: string;
4363
+ readonly attempt: number;
4364
+ readonly timeout: string;
4365
+ };
4366
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4367
+ readonly type: "runtime.effect.worker.started";
4368
+ readonly payload: {
4369
+ readonly effectId: string;
4370
+ readonly attempt: number;
4371
+ readonly deadlineAt: number | null;
4372
+ };
4373
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4374
+ readonly type: "runtime.fork.elided";
4375
+ readonly payload: {
4376
+ readonly type: string;
4377
+ };
4378
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4379
+ readonly type: "runtime.run.cancelled";
4380
+ readonly payload: {
4381
+ readonly reason?: string | undefined;
4382
+ };
4383
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4384
+ readonly type: "runtime.run.completed";
4385
+ readonly payload: {
4386
+ readonly output: Schema.Json;
4387
+ readonly error: string | null;
4388
+ };
4389
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4390
+ readonly type: "runtime.run.forked";
4391
+ readonly payload: {
4392
+ readonly sourceRunId: string;
4393
+ readonly sourceSeq: number;
4394
+ };
4395
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4396
+ readonly type: "runtime.run.launched";
4397
+ readonly payload: {
4398
+ readonly runId: string;
4399
+ readonly kind: string;
4400
+ readonly definitionName: string;
4401
+ readonly definitionVersion: string;
4402
+ readonly effectId: string;
4403
+ readonly close: "terminate" | "wait";
4404
+ };
4405
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4406
+ readonly type: "runtime.run.started";
4407
+ readonly payload: {
4408
+ readonly rootThreadId?: string | undefined;
4409
+ readonly kind: string;
4410
+ readonly definitionName: string;
4411
+ readonly definitionVersion: string;
4412
+ readonly input: Schema.Json;
4413
+ readonly requestedThreadId?: string | null | undefined;
4414
+ readonly launchedBy?: {
4415
+ readonly runId: string;
4416
+ readonly threadId: string;
4417
+ readonly effectId: string;
4418
+ readonly causationId: string;
4419
+ readonly causationSeq: number;
4420
+ } | undefined;
4421
+ readonly attributes?: {
4422
+ readonly [x: string]: string;
4423
+ } | undefined;
4424
+ readonly trace?: {
4425
+ readonly traceparent: string;
4426
+ readonly tracestate?: string | undefined;
4427
+ } | undefined;
4428
+ };
4429
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4430
+ readonly type: "runtime.signal.received";
4431
+ readonly payload: {
4432
+ readonly signalType: string;
4433
+ };
4434
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4435
+ readonly type: "runtime.snapshot.taken";
4436
+ readonly payload: {
4437
+ readonly seq: number;
4438
+ readonly stateHash: string;
4439
+ readonly state?: Schema.Json | undefined;
4440
+ };
4441
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4442
+ readonly type: "runtime.thread.cancel.requested";
4443
+ readonly payload: {
4444
+ readonly threadId: string;
4445
+ };
4446
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4447
+ readonly type: "runtime.thread.cancelled";
4448
+ readonly payload: {
4449
+ readonly threadId: string;
4450
+ readonly reason?: string | undefined;
4451
+ readonly resumeSeq?: number | undefined;
4452
+ };
4453
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4454
+ readonly type: "runtime.thread.completed";
4455
+ readonly payload: {
4456
+ readonly threadId: string;
4457
+ readonly output: Schema.Json;
4458
+ };
4459
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4460
+ readonly type: "runtime.thread.failed";
4461
+ readonly payload: {
4462
+ readonly threadId: string;
4463
+ readonly error: string;
4464
+ };
4465
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4466
+ readonly type: "runtime.thread.started";
4467
+ readonly payload: {
4468
+ readonly threadId: string;
4469
+ readonly kind: string;
4470
+ readonly definitionName: string;
4471
+ readonly definitionVersion: string;
4472
+ readonly input: Schema.Json;
4473
+ readonly parentThreadId: string | null;
4474
+ };
4475
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4476
+ readonly type: "runtime.timer.fired";
4477
+ readonly payload: {
4478
+ readonly timerId: string;
4479
+ readonly waitId: string;
4480
+ };
4481
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4482
+ readonly type: "runtime.timer.set";
4483
+ readonly payload: {
4484
+ readonly timerId: string;
4485
+ readonly waitId: string;
4486
+ readonly wakeAt: number;
4487
+ };
4488
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4489
+ readonly type: "runtime.wait.registered";
4490
+ readonly payload: {
4491
+ readonly waitId: string;
4492
+ readonly threadId?: string | undefined;
4493
+ readonly on: {
4494
+ readonly type: string | readonly string[];
4495
+ readonly match?: Schema.Json | undefined;
4496
+ } | {
4497
+ readonly timerAt: number;
4498
+ };
4499
+ readonly tag?: Schema.Json | undefined;
4500
+ };
4501
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4502
+ readonly type: "runtime.wait.satisfied";
4503
+ readonly payload: {
4504
+ readonly waitId: string;
4505
+ readonly tag?: Schema.Json | undefined;
4506
+ readonly event: {
4507
+ readonly id: string;
4508
+ readonly type: string;
4509
+ readonly payload: Schema.Json;
4510
+ };
4511
+ };
4512
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4513
+ readonly type: "swarm.board.pulled";
4514
+ readonly payload: {
4515
+ readonly board: string;
4516
+ readonly pull: number;
4517
+ readonly cursor: string | null;
4518
+ readonly events: readonly {
4519
+ readonly cursor: string;
4520
+ readonly type: "message.labeled" | "message.posted" | "task.blocked" | "task.canceled" | "task.claimed" | "task.completed" | "task.created" | "task.failed" | "task.ready" | "task.reopened";
4521
+ readonly at: number;
4522
+ readonly by: string;
4523
+ readonly message?: {
4524
+ readonly id: string;
4525
+ readonly channel: string;
4526
+ readonly text: string;
4527
+ readonly by: string;
4528
+ readonly re: string | null;
4529
+ readonly mentions: readonly string[];
4530
+ readonly labels: {
4531
+ readonly [x: string]: string;
4532
+ };
4533
+ readonly createdAt: number;
4534
+ } | undefined;
4535
+ readonly task?: {
4536
+ readonly id: string;
4537
+ readonly channel: string;
4538
+ readonly text: string;
4539
+ readonly by: string;
4540
+ readonly for: string | null;
4541
+ readonly needs: readonly string[];
4542
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
4543
+ readonly holder: string | null;
4544
+ readonly epoch: number;
4545
+ readonly leaseUntil: number | null;
4546
+ readonly note: string | null;
4547
+ readonly createdAt: number;
4548
+ readonly updatedAt: number;
4549
+ } | undefined;
4550
+ }[];
4551
+ readonly more: boolean;
4552
+ readonly nextPullAt: number | null;
4553
+ };
4554
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4555
+ readonly type: "swarm.call.rejected";
4556
+ readonly payload: {
4557
+ readonly callId: string;
4558
+ readonly board: string;
4559
+ readonly code: string;
4560
+ readonly error: string;
4561
+ };
4562
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4563
+ readonly type: "swarm.member.activated";
4564
+ readonly payload: {
4565
+ readonly board: string;
4566
+ readonly member: string;
4567
+ readonly activation: number;
4568
+ readonly runId: string;
4569
+ readonly events: number;
4570
+ readonly at: number;
4571
+ };
4572
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4573
+ readonly type: "swarm.message.labeled";
4574
+ readonly payload: {
4575
+ readonly callId: string;
4576
+ readonly board: string;
4577
+ readonly message: {
4578
+ readonly id: string;
4579
+ readonly channel: string;
4580
+ readonly text: string;
4581
+ readonly by: string;
4582
+ readonly re: string | null;
4583
+ readonly mentions: readonly string[];
4584
+ readonly labels: {
4585
+ readonly [x: string]: string;
4586
+ };
4587
+ readonly createdAt: number;
4588
+ };
4589
+ };
4590
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4591
+ readonly type: "swarm.message.posted";
4592
+ readonly payload: {
4593
+ readonly callId: string;
4594
+ readonly board: string;
4595
+ readonly message: {
4596
+ readonly id: string;
4597
+ readonly channel: string;
4598
+ readonly text: string;
4599
+ readonly by: string;
4600
+ readonly re: string | null;
4601
+ readonly mentions: readonly string[];
4602
+ readonly labels: {
4603
+ readonly [x: string]: string;
4604
+ };
4605
+ readonly createdAt: number;
4606
+ };
4607
+ };
4608
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4609
+ readonly type: "swarm.messages.read";
4610
+ readonly payload: {
4611
+ readonly callId: string;
4612
+ readonly board: string;
4613
+ readonly messages: readonly {
4614
+ readonly id: string;
4615
+ readonly channel: string;
4616
+ readonly text: string;
4617
+ readonly by: string;
4618
+ readonly re: string | null;
4619
+ readonly mentions: readonly string[];
4620
+ readonly labels: {
4621
+ readonly [x: string]: string;
4622
+ };
4623
+ readonly createdAt: number;
4624
+ }[];
4625
+ };
4626
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4627
+ readonly type: "swarm.nudged";
4628
+ readonly payload: {};
4629
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4630
+ readonly type: "swarm.stopped";
4631
+ readonly payload: {};
4632
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4633
+ readonly type: "swarm.task.claimed";
4634
+ readonly payload: {
4635
+ readonly callId: string;
4636
+ readonly board: string;
4637
+ readonly claim: {
4638
+ readonly task: {
4639
+ readonly id: string;
4640
+ readonly channel: string;
4641
+ readonly text: string;
4642
+ readonly by: string;
4643
+ readonly for: string | null;
4644
+ readonly needs: readonly string[];
4645
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
4646
+ readonly holder: string | null;
4647
+ readonly epoch: number;
4648
+ readonly leaseUntil: number | null;
4649
+ readonly note: string | null;
4650
+ readonly createdAt: number;
4651
+ readonly updatedAt: number;
4652
+ };
4653
+ readonly token: string;
4654
+ readonly until: number;
4655
+ } | null;
4656
+ };
4657
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4658
+ readonly type: "swarm.task.created";
4659
+ readonly payload: {
4660
+ readonly callId: string;
4661
+ readonly board: string;
4662
+ readonly task: {
4663
+ readonly id: string;
4664
+ readonly channel: string;
4665
+ readonly text: string;
4666
+ readonly by: string;
4667
+ readonly for: string | null;
4668
+ readonly needs: readonly string[];
4669
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
4670
+ readonly holder: string | null;
4671
+ readonly epoch: number;
4672
+ readonly leaseUntil: number | null;
4673
+ readonly note: string | null;
4674
+ readonly createdAt: number;
4675
+ readonly updatedAt: number;
4676
+ };
4677
+ };
4678
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4679
+ readonly type: "swarm.task.settled";
4680
+ readonly payload: {
4681
+ readonly callId: string;
4682
+ readonly board: string;
4683
+ readonly task: {
4684
+ readonly id: string;
4685
+ readonly channel: string;
4686
+ readonly text: string;
4687
+ readonly by: string;
4688
+ readonly for: string | null;
4689
+ readonly needs: readonly string[];
4690
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
4691
+ readonly holder: string | null;
4692
+ readonly epoch: number;
4693
+ readonly leaseUntil: number | null;
4694
+ readonly note: string | null;
4695
+ readonly createdAt: number;
4696
+ readonly updatedAt: number;
4697
+ };
4698
+ };
4699
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
4700
+ readonly type: "swarm.tasks.listed";
4701
+ readonly payload: {
4702
+ readonly callId: string;
4703
+ readonly board: string;
4704
+ readonly tasks: readonly {
4705
+ readonly id: string;
4706
+ readonly channel: string;
4707
+ readonly text: string;
4708
+ readonly by: string;
4709
+ readonly for: string | null;
4710
+ readonly needs: readonly string[];
4711
+ readonly state: "blocked" | "canceled" | "claimed" | "completed" | "failed" | "ready" | "waiting";
4712
+ readonly holder: string | null;
4713
+ readonly epoch: number;
4714
+ readonly leaseUntil: number | null;
4715
+ readonly note: string | null;
4716
+ readonly createdAt: number;
4717
+ readonly updatedAt: number;
4718
+ }[];
4719
+ };
4720
+ })>>;