@swirls/looms 0.19.1 → 0.20.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.
- package/CHANGELOG.md +8 -0
- package/dist/agent/module.d.ts +727 -727
- package/dist/evaluator/effects.d.ts +33 -33
- package/dist/evaluator/module.d.ts +66 -66
- package/dist/projectors/event-log.d.ts +7 -3
- package/dist/projectors/event-log.js +42 -9
- package/dist/projectors/replica/columns.d.ts +10 -3
- package/dist/projectors/replica/columns.js +22 -7
- package/dist/projectors/replica/drizzle.d.ts +9 -242
- package/dist/projectors/replica/drizzle.js +19 -6
- package/dist/projectors/replica/migrations.d.ts +8 -1
- package/dist/projectors/replica/migrations.js +26 -2
- package/dist/projectors/replica/postgres.d.ts +3 -2
- package/dist/projectors/replica/postgres.js +1 -1
- package/dist/projectors/replica/sqlite-migrations.js +19 -1
- package/dist/projectors/replica/sqlite.d.ts +3 -2
- package/dist/projectors/replica/sqlite.js +13 -4
- package/dist/schedule/effects.d.ts +18 -18
- package/package.json +1 -1
package/dist/agent/module.d.ts
CHANGED
|
@@ -282,252 +282,6 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
|
|
|
282
282
|
readonly alreadyCompacted?: boolean | undefined;
|
|
283
283
|
readonly consumedSteerMessageIds?: readonly string[] | undefined;
|
|
284
284
|
}, import("./definitions-store").AgentDefinitionsTag | LlmTag, (Omit<EventInput, "payload" | "type"> & {
|
|
285
|
-
readonly type: "runtime.child.close.requested";
|
|
286
|
-
readonly payload: {
|
|
287
|
-
readonly policy: "terminate" | "wait";
|
|
288
|
-
};
|
|
289
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
290
|
-
readonly type: "runtime.child.settled";
|
|
291
|
-
readonly payload: {
|
|
292
|
-
readonly runId: string;
|
|
293
|
-
readonly status: "cancelled" | "completed" | "failed";
|
|
294
|
-
readonly output: import("effect/Schema").Json;
|
|
295
|
-
readonly error: string | null;
|
|
296
|
-
};
|
|
297
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
298
|
-
readonly type: "runtime.effect.ambiguous";
|
|
299
|
-
readonly payload: {
|
|
300
|
-
readonly effectId: string;
|
|
301
|
-
readonly attempt: number;
|
|
302
|
-
readonly error: string;
|
|
303
|
-
};
|
|
304
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
305
|
-
readonly type: "runtime.effect.attempt.started";
|
|
306
|
-
readonly payload: {
|
|
307
|
-
readonly effectId: string;
|
|
308
|
-
readonly attempt: number;
|
|
309
|
-
};
|
|
310
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
311
|
-
readonly type: "runtime.effect.cancel.requested";
|
|
312
|
-
readonly payload: {
|
|
313
|
-
readonly effectId: string;
|
|
314
|
-
readonly attempt: number;
|
|
315
|
-
readonly deadlineAt: number | null;
|
|
316
|
-
};
|
|
317
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
318
|
-
readonly type: "runtime.effect.cancelled";
|
|
319
|
-
readonly payload: {
|
|
320
|
-
readonly effectId: string;
|
|
321
|
-
readonly attempt: number;
|
|
322
|
-
};
|
|
323
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
324
|
-
readonly type: "runtime.effect.completed";
|
|
325
|
-
readonly payload: {
|
|
326
|
-
readonly effectId: string;
|
|
327
|
-
readonly attempt: number;
|
|
328
|
-
};
|
|
329
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
330
|
-
readonly type: "runtime.effect.dispatch.deferred";
|
|
331
|
-
readonly payload: {
|
|
332
|
-
readonly effectId: string;
|
|
333
|
-
readonly attempt: number;
|
|
334
|
-
readonly retryAt: number;
|
|
335
|
-
readonly error: string;
|
|
336
|
-
readonly try: number;
|
|
337
|
-
};
|
|
338
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
339
|
-
readonly type: "runtime.effect.dispatched";
|
|
340
|
-
readonly payload: {
|
|
341
|
-
readonly effectId: string;
|
|
342
|
-
readonly attempt: number;
|
|
343
|
-
readonly deadlineAt: number | null;
|
|
344
|
-
};
|
|
345
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
346
|
-
readonly type: "runtime.effect.failed";
|
|
347
|
-
readonly payload: {
|
|
348
|
-
readonly effectId: string;
|
|
349
|
-
readonly error: string;
|
|
350
|
-
readonly nonRetryable?: boolean | undefined;
|
|
351
|
-
readonly retryAfterMs?: number | undefined;
|
|
352
|
-
};
|
|
353
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
354
|
-
readonly type: "runtime.effect.heartbeat";
|
|
355
|
-
readonly payload: {
|
|
356
|
-
readonly effectId: string;
|
|
357
|
-
readonly attempt: number;
|
|
358
|
-
readonly heartbeatAt: number;
|
|
359
|
-
readonly deadlineAt: number | null;
|
|
360
|
-
readonly details?: import("effect/Schema").Json | undefined;
|
|
361
|
-
};
|
|
362
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
363
|
-
readonly type: "runtime.effect.queued";
|
|
364
|
-
readonly payload: {
|
|
365
|
-
readonly effectId: string;
|
|
366
|
-
readonly attempt: number;
|
|
367
|
-
readonly deadlineAt: number | null;
|
|
368
|
-
};
|
|
369
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
370
|
-
readonly type: "runtime.effect.retry.scheduled";
|
|
371
|
-
readonly payload: {
|
|
372
|
-
readonly effectId: string;
|
|
373
|
-
readonly attempt: number;
|
|
374
|
-
readonly nextAttemptAt: number;
|
|
375
|
-
readonly error: string;
|
|
376
|
-
};
|
|
377
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
378
|
-
readonly type: "runtime.effect.timed_out";
|
|
379
|
-
readonly payload: {
|
|
380
|
-
readonly effectId: string;
|
|
381
|
-
readonly attempt: number;
|
|
382
|
-
readonly timeout: string;
|
|
383
|
-
};
|
|
384
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
385
|
-
readonly type: "runtime.effect.worker.started";
|
|
386
|
-
readonly payload: {
|
|
387
|
-
readonly effectId: string;
|
|
388
|
-
readonly attempt: number;
|
|
389
|
-
readonly deadlineAt: number | null;
|
|
390
|
-
};
|
|
391
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
392
|
-
readonly type: "runtime.fork.elided";
|
|
393
|
-
readonly payload: {
|
|
394
|
-
readonly type: string;
|
|
395
|
-
};
|
|
396
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
397
|
-
readonly type: "runtime.run.cancelled";
|
|
398
|
-
readonly payload: {
|
|
399
|
-
readonly reason?: string | undefined;
|
|
400
|
-
};
|
|
401
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
402
|
-
readonly type: "runtime.run.completed";
|
|
403
|
-
readonly payload: {
|
|
404
|
-
readonly output: import("effect/Schema").Json;
|
|
405
|
-
readonly error: string | null;
|
|
406
|
-
};
|
|
407
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
408
|
-
readonly type: "runtime.run.forked";
|
|
409
|
-
readonly payload: {
|
|
410
|
-
readonly sourceRunId: string;
|
|
411
|
-
readonly sourceSeq: number;
|
|
412
|
-
};
|
|
413
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
414
|
-
readonly type: "runtime.run.launched";
|
|
415
|
-
readonly payload: {
|
|
416
|
-
readonly runId: string;
|
|
417
|
-
readonly kind: string;
|
|
418
|
-
readonly definitionName: string;
|
|
419
|
-
readonly definitionVersion: string;
|
|
420
|
-
readonly effectId: string;
|
|
421
|
-
readonly close: "terminate" | "wait";
|
|
422
|
-
};
|
|
423
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
424
|
-
readonly type: "runtime.run.started";
|
|
425
|
-
readonly payload: {
|
|
426
|
-
readonly rootThreadId?: string | undefined;
|
|
427
|
-
readonly kind: string;
|
|
428
|
-
readonly definitionName: string;
|
|
429
|
-
readonly definitionVersion: string;
|
|
430
|
-
readonly input: import("effect/Schema").Json;
|
|
431
|
-
readonly requestedThreadId?: string | null | undefined;
|
|
432
|
-
readonly launchedBy?: {
|
|
433
|
-
readonly runId: string;
|
|
434
|
-
readonly threadId: string;
|
|
435
|
-
readonly effectId: string;
|
|
436
|
-
readonly causationId: string;
|
|
437
|
-
readonly causationSeq: number;
|
|
438
|
-
} | undefined;
|
|
439
|
-
readonly attributes?: {
|
|
440
|
-
readonly [x: string]: string;
|
|
441
|
-
} | undefined;
|
|
442
|
-
readonly trace?: {
|
|
443
|
-
readonly traceparent: string;
|
|
444
|
-
readonly tracestate?: string | undefined;
|
|
445
|
-
} | undefined;
|
|
446
|
-
};
|
|
447
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
448
|
-
readonly type: "runtime.signal.received";
|
|
449
|
-
readonly payload: {
|
|
450
|
-
readonly signalType: string;
|
|
451
|
-
};
|
|
452
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
453
|
-
readonly type: "runtime.snapshot.taken";
|
|
454
|
-
readonly payload: {
|
|
455
|
-
readonly seq: number;
|
|
456
|
-
readonly stateHash: string;
|
|
457
|
-
readonly state?: import("effect/Schema").Json | undefined;
|
|
458
|
-
};
|
|
459
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
460
|
-
readonly type: "runtime.thread.cancel.requested";
|
|
461
|
-
readonly payload: {
|
|
462
|
-
readonly threadId: string;
|
|
463
|
-
};
|
|
464
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
465
|
-
readonly type: "runtime.thread.cancelled";
|
|
466
|
-
readonly payload: {
|
|
467
|
-
readonly threadId: string;
|
|
468
|
-
readonly reason?: string | undefined;
|
|
469
|
-
readonly resumeSeq?: number | undefined;
|
|
470
|
-
};
|
|
471
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
472
|
-
readonly type: "runtime.thread.completed";
|
|
473
|
-
readonly payload: {
|
|
474
|
-
readonly threadId: string;
|
|
475
|
-
readonly output: import("effect/Schema").Json;
|
|
476
|
-
};
|
|
477
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
478
|
-
readonly type: "runtime.thread.failed";
|
|
479
|
-
readonly payload: {
|
|
480
|
-
readonly threadId: string;
|
|
481
|
-
readonly error: string;
|
|
482
|
-
};
|
|
483
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
484
|
-
readonly type: "runtime.thread.started";
|
|
485
|
-
readonly payload: {
|
|
486
|
-
readonly threadId: string;
|
|
487
|
-
readonly kind: string;
|
|
488
|
-
readonly definitionName: string;
|
|
489
|
-
readonly definitionVersion: string;
|
|
490
|
-
readonly input: import("effect/Schema").Json;
|
|
491
|
-
readonly parentThreadId: string | null;
|
|
492
|
-
};
|
|
493
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
494
|
-
readonly type: "runtime.timer.fired";
|
|
495
|
-
readonly payload: {
|
|
496
|
-
readonly timerId: string;
|
|
497
|
-
readonly waitId: string;
|
|
498
|
-
};
|
|
499
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
500
|
-
readonly type: "runtime.timer.set";
|
|
501
|
-
readonly payload: {
|
|
502
|
-
readonly timerId: string;
|
|
503
|
-
readonly waitId: string;
|
|
504
|
-
readonly wakeAt: number;
|
|
505
|
-
};
|
|
506
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
507
|
-
readonly type: "runtime.wait.registered";
|
|
508
|
-
readonly payload: {
|
|
509
|
-
readonly waitId: string;
|
|
510
|
-
readonly threadId?: string | undefined;
|
|
511
|
-
readonly on: {
|
|
512
|
-
readonly type: string | readonly string[];
|
|
513
|
-
readonly match?: import("effect/Schema").Json | undefined;
|
|
514
|
-
} | {
|
|
515
|
-
readonly timerAt: number;
|
|
516
|
-
};
|
|
517
|
-
readonly tag?: import("effect/Schema").Json | undefined;
|
|
518
|
-
};
|
|
519
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
520
|
-
readonly type: "runtime.wait.satisfied";
|
|
521
|
-
readonly payload: {
|
|
522
|
-
readonly waitId: string;
|
|
523
|
-
readonly tag?: import("effect/Schema").Json | undefined;
|
|
524
|
-
readonly event: {
|
|
525
|
-
readonly id: string;
|
|
526
|
-
readonly type: string;
|
|
527
|
-
readonly payload: import("effect/Schema").Json;
|
|
528
|
-
};
|
|
529
|
-
};
|
|
530
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
531
285
|
readonly type: "agent.context.compacted";
|
|
532
286
|
readonly payload: {
|
|
533
287
|
readonly turn: number;
|
|
@@ -810,19 +564,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
|
|
|
810
564
|
readonly input: number;
|
|
811
565
|
readonly output: number;
|
|
812
566
|
};
|
|
813
|
-
})
|
|
814
|
-
executeTool: import("@swirls/looms/core").LocalEffectDefinition<{
|
|
815
|
-
readonly turn: number;
|
|
816
|
-
readonly definitionName?: string | undefined;
|
|
817
|
-
readonly definitionVersion: string;
|
|
818
|
-
readonly toolCall: {
|
|
819
|
-
readonly id: string;
|
|
820
|
-
readonly name: string;
|
|
821
|
-
readonly arguments: import("effect/Schema").Json;
|
|
822
|
-
};
|
|
823
|
-
readonly input?: import("effect/Schema").Json | undefined;
|
|
824
|
-
readonly depth?: number | undefined;
|
|
825
|
-
}, import("./definitions-store").AgentDefinitionsTag, (Omit<EventInput, "payload" | "type"> & {
|
|
567
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
826
568
|
readonly type: "runtime.child.close.requested";
|
|
827
569
|
readonly payload: {
|
|
828
570
|
readonly policy: "terminate" | "wait";
|
|
@@ -1068,7 +810,19 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
|
|
|
1068
810
|
readonly payload: import("effect/Schema").Json;
|
|
1069
811
|
};
|
|
1070
812
|
};
|
|
1071
|
-
})
|
|
813
|
+
})>;
|
|
814
|
+
executeTool: import("@swirls/looms/core").LocalEffectDefinition<{
|
|
815
|
+
readonly turn: number;
|
|
816
|
+
readonly definitionName?: string | undefined;
|
|
817
|
+
readonly definitionVersion: string;
|
|
818
|
+
readonly toolCall: {
|
|
819
|
+
readonly id: string;
|
|
820
|
+
readonly name: string;
|
|
821
|
+
readonly arguments: import("effect/Schema").Json;
|
|
822
|
+
};
|
|
823
|
+
readonly input?: import("effect/Schema").Json | undefined;
|
|
824
|
+
readonly depth?: number | undefined;
|
|
825
|
+
}, import("./definitions-store").AgentDefinitionsTag, (Omit<EventInput, "payload" | "type"> & {
|
|
1072
826
|
readonly type: "agent.context.compacted";
|
|
1073
827
|
readonly payload: {
|
|
1074
828
|
readonly turn: number;
|
|
@@ -1351,480 +1105,480 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
|
|
|
1351
1105
|
readonly input: number;
|
|
1352
1106
|
readonly output: number;
|
|
1353
1107
|
};
|
|
1354
|
-
})
|
|
1355
|
-
|
|
1356
|
-
agent: import("@swirls/looms/core").ThreadDefinition<import("./types").AgentState>;
|
|
1357
|
-
'agent-session': import("@swirls/looms/core").ThreadDefinition<import("./types").AgentSessionState>;
|
|
1358
|
-
}, {
|
|
1359
|
-
conversation: import("@swirls/looms/core").ProjectionDefinition<{
|
|
1360
|
-
readonly lines: {
|
|
1361
|
-
readonly role: "assistant" | "system" | "tool" | "user";
|
|
1362
|
-
readonly content: string;
|
|
1363
|
-
readonly attachments?: readonly {
|
|
1364
|
-
readonly id: string;
|
|
1365
|
-
readonly mediaType: string;
|
|
1366
|
-
readonly name?: string | undefined;
|
|
1367
|
-
readonly size?: number | undefined;
|
|
1368
|
-
readonly url?: string | undefined;
|
|
1369
|
-
}[] | undefined;
|
|
1370
|
-
readonly toolCallId?: string | undefined;
|
|
1371
|
-
readonly name?: string | undefined;
|
|
1372
|
-
readonly toolCalls?: {
|
|
1373
|
-
readonly id: string;
|
|
1374
|
-
readonly name: string;
|
|
1375
|
-
readonly arguments: import("effect/Schema").Json;
|
|
1376
|
-
}[] | undefined;
|
|
1377
|
-
}[];
|
|
1378
|
-
}>;
|
|
1379
|
-
tokenUsage: import("@swirls/looms/core").ProjectionDefinition<{
|
|
1380
|
-
readonly input: number;
|
|
1381
|
-
readonly output: number;
|
|
1382
|
-
}>;
|
|
1383
|
-
turnActivity: import("@swirls/looms/core").ProjectionDefinition<{
|
|
1384
|
-
readonly rootThreadId: string | null;
|
|
1385
|
-
readonly active: boolean;
|
|
1386
|
-
}>;
|
|
1387
|
-
}, import("effect/Context").Service.Any, {
|
|
1388
|
-
userMessage: import("@swirls/looms/core").SignalDefinition<{
|
|
1389
|
-
readonly content: string;
|
|
1390
|
-
readonly attachments?: readonly {
|
|
1391
|
-
readonly id: string;
|
|
1392
|
-
readonly mediaType: string;
|
|
1393
|
-
readonly name?: string | undefined;
|
|
1394
|
-
readonly size?: number | undefined;
|
|
1395
|
-
readonly url?: string | undefined;
|
|
1396
|
-
}[] | undefined;
|
|
1397
|
-
}, Omit<EventInput, "payload" | "type"> & {
|
|
1398
|
-
readonly type: "agent.message.received";
|
|
1108
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1109
|
+
readonly type: "runtime.child.close.requested";
|
|
1399
1110
|
readonly payload: {
|
|
1400
|
-
readonly
|
|
1401
|
-
readonly role: "assistant" | "system" | "tool" | "user";
|
|
1402
|
-
readonly content: string;
|
|
1403
|
-
readonly attachments?: readonly {
|
|
1404
|
-
readonly id: string;
|
|
1405
|
-
readonly mediaType: string;
|
|
1406
|
-
readonly name?: string | undefined;
|
|
1407
|
-
readonly size?: number | undefined;
|
|
1408
|
-
readonly url?: string | undefined;
|
|
1409
|
-
}[] | undefined;
|
|
1410
|
-
readonly toolCallId?: string | undefined;
|
|
1411
|
-
readonly name?: string | undefined;
|
|
1412
|
-
readonly toolCalls?: {
|
|
1413
|
-
readonly id: string;
|
|
1414
|
-
readonly name: string;
|
|
1415
|
-
readonly arguments: import("effect/Schema").Json;
|
|
1416
|
-
}[] | undefined;
|
|
1417
|
-
};
|
|
1111
|
+
readonly policy: "terminate" | "wait";
|
|
1418
1112
|
};
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
readonly content: string;
|
|
1422
|
-
readonly attachments?: readonly {
|
|
1423
|
-
readonly id: string;
|
|
1424
|
-
readonly mediaType: string;
|
|
1425
|
-
readonly name?: string | undefined;
|
|
1426
|
-
readonly size?: number | undefined;
|
|
1427
|
-
readonly url?: string | undefined;
|
|
1428
|
-
}[] | undefined;
|
|
1429
|
-
readonly interrupt?: boolean | undefined;
|
|
1430
|
-
}, Omit<EventInput, "payload" | "type"> & {
|
|
1431
|
-
readonly type: "agent.steered";
|
|
1113
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1114
|
+
readonly type: "runtime.child.settled";
|
|
1432
1115
|
readonly payload: {
|
|
1433
|
-
readonly
|
|
1434
|
-
readonly
|
|
1435
|
-
readonly
|
|
1436
|
-
|
|
1437
|
-
readonly content: string;
|
|
1438
|
-
readonly attachments?: readonly {
|
|
1439
|
-
readonly id: string;
|
|
1440
|
-
readonly mediaType: string;
|
|
1441
|
-
readonly name?: string | undefined;
|
|
1442
|
-
readonly size?: number | undefined;
|
|
1443
|
-
readonly url?: string | undefined;
|
|
1444
|
-
}[] | undefined;
|
|
1445
|
-
readonly toolCallId?: string | undefined;
|
|
1446
|
-
readonly name?: string | undefined;
|
|
1447
|
-
readonly toolCalls?: {
|
|
1448
|
-
readonly id: string;
|
|
1449
|
-
readonly name: string;
|
|
1450
|
-
readonly arguments: import("effect/Schema").Json;
|
|
1451
|
-
}[] | undefined;
|
|
1452
|
-
};
|
|
1453
|
-
readonly interrupt?: boolean | undefined;
|
|
1116
|
+
readonly runId: string;
|
|
1117
|
+
readonly status: "cancelled" | "completed" | "failed";
|
|
1118
|
+
readonly output: import("effect/Schema").Json;
|
|
1119
|
+
readonly error: string | null;
|
|
1454
1120
|
};
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
readonly type: "agent.turn.stopped";
|
|
1458
|
-
readonly payload: {};
|
|
1459
|
-
}>;
|
|
1460
|
-
submitAgentMessage: import("@swirls/looms/core").SignalDefinition<{
|
|
1461
|
-
readonly messageId: string;
|
|
1462
|
-
readonly text: string;
|
|
1463
|
-
readonly attachments?: readonly {
|
|
1464
|
-
readonly id: string;
|
|
1465
|
-
readonly mediaType: string;
|
|
1466
|
-
readonly name?: string | undefined;
|
|
1467
|
-
readonly size?: number | undefined;
|
|
1468
|
-
readonly url?: string | undefined;
|
|
1469
|
-
}[] | undefined;
|
|
1470
|
-
readonly delivery?: "followUp" | "nextTurn" | "steer" | undefined;
|
|
1471
|
-
readonly activeChildThreadId?: string | undefined;
|
|
1472
|
-
}, Omit<EventInput, "payload" | "type"> & {
|
|
1473
|
-
readonly type: "agent.session.message.submitted";
|
|
1121
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1122
|
+
readonly type: "runtime.effect.ambiguous";
|
|
1474
1123
|
readonly payload: {
|
|
1475
|
-
readonly
|
|
1476
|
-
readonly
|
|
1477
|
-
readonly
|
|
1478
|
-
readonly id: string;
|
|
1479
|
-
readonly mediaType: string;
|
|
1480
|
-
readonly name?: string | undefined;
|
|
1481
|
-
readonly size?: number | undefined;
|
|
1482
|
-
readonly url?: string | undefined;
|
|
1483
|
-
}[] | undefined;
|
|
1484
|
-
readonly delivery?: "followUp" | "nextTurn" | "steer" | undefined;
|
|
1485
|
-
readonly activeChildThreadId?: string | undefined;
|
|
1124
|
+
readonly effectId: string;
|
|
1125
|
+
readonly attempt: number;
|
|
1126
|
+
readonly error: string;
|
|
1486
1127
|
};
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
readonly
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
payload: {
|
|
1493
|
-
threadId: string;
|
|
1128
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1129
|
+
readonly type: "runtime.effect.attempt.started";
|
|
1130
|
+
readonly payload: {
|
|
1131
|
+
readonly effectId: string;
|
|
1132
|
+
readonly attempt: number;
|
|
1494
1133
|
};
|
|
1495
|
-
} | (Omit<EventInput, "payload" | "type"> & {
|
|
1496
|
-
readonly type: "
|
|
1497
|
-
readonly payload: {};
|
|
1498
|
-
}))[]>;
|
|
1499
|
-
agentSessionMessageEvents: import("@swirls/looms/core").SignalDefinition<{
|
|
1500
|
-
readonly messageId: string;
|
|
1501
|
-
readonly text: string;
|
|
1502
|
-
readonly attachments?: readonly {
|
|
1503
|
-
readonly id: string;
|
|
1504
|
-
readonly mediaType: string;
|
|
1505
|
-
readonly name?: string | undefined;
|
|
1506
|
-
readonly size?: number | undefined;
|
|
1507
|
-
readonly url?: string | undefined;
|
|
1508
|
-
}[] | undefined;
|
|
1509
|
-
readonly delivery?: "followUp" | "nextTurn" | "steer" | undefined;
|
|
1510
|
-
readonly activeChildThreadId?: string | undefined;
|
|
1511
|
-
}, ((Omit<EventInput, "payload" | "type"> & {
|
|
1512
|
-
readonly type: "agent.session.message.submitted";
|
|
1134
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1135
|
+
readonly type: "runtime.effect.cancel.requested";
|
|
1513
1136
|
readonly payload: {
|
|
1514
|
-
readonly
|
|
1515
|
-
readonly
|
|
1516
|
-
readonly
|
|
1517
|
-
readonly id: string;
|
|
1518
|
-
readonly mediaType: string;
|
|
1519
|
-
readonly name?: string | undefined;
|
|
1520
|
-
readonly size?: number | undefined;
|
|
1521
|
-
readonly url?: string | undefined;
|
|
1522
|
-
}[] | undefined;
|
|
1523
|
-
readonly delivery?: "followUp" | "nextTurn" | "steer" | undefined;
|
|
1524
|
-
readonly activeChildThreadId?: string | undefined;
|
|
1137
|
+
readonly effectId: string;
|
|
1138
|
+
readonly attempt: number;
|
|
1139
|
+
readonly deadlineAt: number | null;
|
|
1525
1140
|
};
|
|
1526
1141
|
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1527
|
-
readonly type: "
|
|
1142
|
+
readonly type: "runtime.effect.cancelled";
|
|
1528
1143
|
readonly payload: {
|
|
1529
|
-
readonly
|
|
1530
|
-
readonly
|
|
1531
|
-
readonly message: {
|
|
1532
|
-
readonly role: "assistant" | "system" | "tool" | "user";
|
|
1533
|
-
readonly content: string;
|
|
1534
|
-
readonly attachments?: readonly {
|
|
1535
|
-
readonly id: string;
|
|
1536
|
-
readonly mediaType: string;
|
|
1537
|
-
readonly name?: string | undefined;
|
|
1538
|
-
readonly size?: number | undefined;
|
|
1539
|
-
readonly url?: string | undefined;
|
|
1540
|
-
}[] | undefined;
|
|
1541
|
-
readonly toolCallId?: string | undefined;
|
|
1542
|
-
readonly name?: string | undefined;
|
|
1543
|
-
readonly toolCalls?: {
|
|
1544
|
-
readonly id: string;
|
|
1545
|
-
readonly name: string;
|
|
1546
|
-
readonly arguments: import("effect/Schema").Json;
|
|
1547
|
-
}[] | undefined;
|
|
1548
|
-
};
|
|
1549
|
-
readonly interrupt?: boolean | undefined;
|
|
1144
|
+
readonly effectId: string;
|
|
1145
|
+
readonly attempt: number;
|
|
1550
1146
|
};
|
|
1551
|
-
})
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
readonly
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
readonly
|
|
1578
|
-
readonly
|
|
1579
|
-
readonly
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
readonly
|
|
1588
|
-
readonly
|
|
1147
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1148
|
+
readonly type: "runtime.effect.completed";
|
|
1149
|
+
readonly payload: {
|
|
1150
|
+
readonly effectId: string;
|
|
1151
|
+
readonly attempt: number;
|
|
1152
|
+
};
|
|
1153
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1154
|
+
readonly type: "runtime.effect.dispatch.deferred";
|
|
1155
|
+
readonly payload: {
|
|
1156
|
+
readonly effectId: string;
|
|
1157
|
+
readonly attempt: number;
|
|
1158
|
+
readonly retryAt: number;
|
|
1159
|
+
readonly error: string;
|
|
1160
|
+
readonly try: number;
|
|
1161
|
+
};
|
|
1162
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1163
|
+
readonly type: "runtime.effect.dispatched";
|
|
1164
|
+
readonly payload: {
|
|
1165
|
+
readonly effectId: string;
|
|
1166
|
+
readonly attempt: number;
|
|
1167
|
+
readonly deadlineAt: number | null;
|
|
1168
|
+
};
|
|
1169
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1170
|
+
readonly type: "runtime.effect.failed";
|
|
1171
|
+
readonly payload: {
|
|
1172
|
+
readonly effectId: string;
|
|
1173
|
+
readonly error: string;
|
|
1174
|
+
readonly nonRetryable?: boolean | undefined;
|
|
1175
|
+
readonly retryAfterMs?: number | undefined;
|
|
1176
|
+
};
|
|
1177
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1178
|
+
readonly type: "runtime.effect.heartbeat";
|
|
1179
|
+
readonly payload: {
|
|
1180
|
+
readonly effectId: string;
|
|
1181
|
+
readonly attempt: number;
|
|
1182
|
+
readonly heartbeatAt: number;
|
|
1183
|
+
readonly deadlineAt: number | null;
|
|
1184
|
+
readonly details?: import("effect/Schema").Json | undefined;
|
|
1185
|
+
};
|
|
1186
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1187
|
+
readonly type: "runtime.effect.queued";
|
|
1188
|
+
readonly payload: {
|
|
1189
|
+
readonly effectId: string;
|
|
1190
|
+
readonly attempt: number;
|
|
1191
|
+
readonly deadlineAt: number | null;
|
|
1192
|
+
};
|
|
1193
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1194
|
+
readonly type: "runtime.effect.retry.scheduled";
|
|
1195
|
+
readonly payload: {
|
|
1196
|
+
readonly effectId: string;
|
|
1197
|
+
readonly attempt: number;
|
|
1198
|
+
readonly nextAttemptAt: number;
|
|
1199
|
+
readonly error: string;
|
|
1200
|
+
};
|
|
1201
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1202
|
+
readonly type: "runtime.effect.timed_out";
|
|
1203
|
+
readonly payload: {
|
|
1204
|
+
readonly effectId: string;
|
|
1205
|
+
readonly attempt: number;
|
|
1206
|
+
readonly timeout: string;
|
|
1207
|
+
};
|
|
1208
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1209
|
+
readonly type: "runtime.effect.worker.started";
|
|
1210
|
+
readonly payload: {
|
|
1211
|
+
readonly effectId: string;
|
|
1212
|
+
readonly attempt: number;
|
|
1213
|
+
readonly deadlineAt: number | null;
|
|
1214
|
+
};
|
|
1215
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1216
|
+
readonly type: "runtime.fork.elided";
|
|
1217
|
+
readonly payload: {
|
|
1218
|
+
readonly type: string;
|
|
1219
|
+
};
|
|
1220
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1221
|
+
readonly type: "runtime.run.cancelled";
|
|
1222
|
+
readonly payload: {
|
|
1223
|
+
readonly reason?: string | undefined;
|
|
1224
|
+
};
|
|
1225
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1226
|
+
readonly type: "runtime.run.completed";
|
|
1227
|
+
readonly payload: {
|
|
1228
|
+
readonly output: import("effect/Schema").Json;
|
|
1229
|
+
readonly error: string | null;
|
|
1230
|
+
};
|
|
1231
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1232
|
+
readonly type: "runtime.run.forked";
|
|
1233
|
+
readonly payload: {
|
|
1234
|
+
readonly sourceRunId: string;
|
|
1235
|
+
readonly sourceSeq: number;
|
|
1236
|
+
};
|
|
1237
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1238
|
+
readonly type: "runtime.run.launched";
|
|
1239
|
+
readonly payload: {
|
|
1240
|
+
readonly runId: string;
|
|
1241
|
+
readonly kind: string;
|
|
1242
|
+
readonly definitionName: string;
|
|
1243
|
+
readonly definitionVersion: string;
|
|
1244
|
+
readonly effectId: string;
|
|
1245
|
+
readonly close: "terminate" | "wait";
|
|
1246
|
+
};
|
|
1247
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1248
|
+
readonly type: "runtime.run.started";
|
|
1249
|
+
readonly payload: {
|
|
1250
|
+
readonly rootThreadId?: string | undefined;
|
|
1251
|
+
readonly kind: string;
|
|
1252
|
+
readonly definitionName: string;
|
|
1253
|
+
readonly definitionVersion: string;
|
|
1254
|
+
readonly input: import("effect/Schema").Json;
|
|
1255
|
+
readonly requestedThreadId?: string | null | undefined;
|
|
1256
|
+
readonly launchedBy?: {
|
|
1589
1257
|
readonly runId: string;
|
|
1590
|
-
readonly
|
|
1591
|
-
readonly output: import("effect/Schema").Json;
|
|
1592
|
-
readonly error: string | null;
|
|
1593
|
-
};
|
|
1594
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1595
|
-
readonly type: "runtime.effect.ambiguous";
|
|
1596
|
-
readonly payload: {
|
|
1597
|
-
readonly effectId: string;
|
|
1598
|
-
readonly attempt: number;
|
|
1599
|
-
readonly error: string;
|
|
1600
|
-
};
|
|
1601
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1602
|
-
readonly type: "runtime.effect.attempt.started";
|
|
1603
|
-
readonly payload: {
|
|
1604
|
-
readonly effectId: string;
|
|
1605
|
-
readonly attempt: number;
|
|
1606
|
-
};
|
|
1607
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1608
|
-
readonly type: "runtime.effect.cancel.requested";
|
|
1609
|
-
readonly payload: {
|
|
1610
|
-
readonly effectId: string;
|
|
1611
|
-
readonly attempt: number;
|
|
1612
|
-
readonly deadlineAt: number | null;
|
|
1613
|
-
};
|
|
1614
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1615
|
-
readonly type: "runtime.effect.cancelled";
|
|
1616
|
-
readonly payload: {
|
|
1617
|
-
readonly effectId: string;
|
|
1618
|
-
readonly attempt: number;
|
|
1619
|
-
};
|
|
1620
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1621
|
-
readonly type: "runtime.effect.completed";
|
|
1622
|
-
readonly payload: {
|
|
1623
|
-
readonly effectId: string;
|
|
1624
|
-
readonly attempt: number;
|
|
1625
|
-
};
|
|
1626
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1627
|
-
readonly type: "runtime.effect.dispatch.deferred";
|
|
1628
|
-
readonly payload: {
|
|
1629
|
-
readonly effectId: string;
|
|
1630
|
-
readonly attempt: number;
|
|
1631
|
-
readonly retryAt: number;
|
|
1632
|
-
readonly error: string;
|
|
1633
|
-
readonly try: number;
|
|
1634
|
-
};
|
|
1635
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1636
|
-
readonly type: "runtime.effect.dispatched";
|
|
1637
|
-
readonly payload: {
|
|
1638
|
-
readonly effectId: string;
|
|
1639
|
-
readonly attempt: number;
|
|
1640
|
-
readonly deadlineAt: number | null;
|
|
1641
|
-
};
|
|
1642
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1643
|
-
readonly type: "runtime.effect.failed";
|
|
1644
|
-
readonly payload: {
|
|
1645
|
-
readonly effectId: string;
|
|
1646
|
-
readonly error: string;
|
|
1647
|
-
readonly nonRetryable?: boolean | undefined;
|
|
1648
|
-
readonly retryAfterMs?: number | undefined;
|
|
1649
|
-
};
|
|
1650
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1651
|
-
readonly type: "runtime.effect.heartbeat";
|
|
1652
|
-
readonly payload: {
|
|
1653
|
-
readonly effectId: string;
|
|
1654
|
-
readonly attempt: number;
|
|
1655
|
-
readonly heartbeatAt: number;
|
|
1656
|
-
readonly deadlineAt: number | null;
|
|
1657
|
-
readonly details?: import("effect/Schema").Json | undefined;
|
|
1658
|
-
};
|
|
1659
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1660
|
-
readonly type: "runtime.effect.queued";
|
|
1661
|
-
readonly payload: {
|
|
1662
|
-
readonly effectId: string;
|
|
1663
|
-
readonly attempt: number;
|
|
1664
|
-
readonly deadlineAt: number | null;
|
|
1665
|
-
};
|
|
1666
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1667
|
-
readonly type: "runtime.effect.retry.scheduled";
|
|
1668
|
-
readonly payload: {
|
|
1669
|
-
readonly effectId: string;
|
|
1670
|
-
readonly attempt: number;
|
|
1671
|
-
readonly nextAttemptAt: number;
|
|
1672
|
-
readonly error: string;
|
|
1673
|
-
};
|
|
1674
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1675
|
-
readonly type: "runtime.effect.timed_out";
|
|
1676
|
-
readonly payload: {
|
|
1677
|
-
readonly effectId: string;
|
|
1678
|
-
readonly attempt: number;
|
|
1679
|
-
readonly timeout: string;
|
|
1680
|
-
};
|
|
1681
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1682
|
-
readonly type: "runtime.effect.worker.started";
|
|
1683
|
-
readonly payload: {
|
|
1258
|
+
readonly threadId: string;
|
|
1684
1259
|
readonly effectId: string;
|
|
1685
|
-
readonly
|
|
1686
|
-
readonly
|
|
1260
|
+
readonly causationId: string;
|
|
1261
|
+
readonly causationSeq: number;
|
|
1262
|
+
} | undefined;
|
|
1263
|
+
readonly attributes?: {
|
|
1264
|
+
readonly [x: string]: string;
|
|
1265
|
+
} | undefined;
|
|
1266
|
+
readonly trace?: {
|
|
1267
|
+
readonly traceparent: string;
|
|
1268
|
+
readonly tracestate?: string | undefined;
|
|
1269
|
+
} | undefined;
|
|
1270
|
+
};
|
|
1271
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1272
|
+
readonly type: "runtime.signal.received";
|
|
1273
|
+
readonly payload: {
|
|
1274
|
+
readonly signalType: string;
|
|
1275
|
+
};
|
|
1276
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1277
|
+
readonly type: "runtime.snapshot.taken";
|
|
1278
|
+
readonly payload: {
|
|
1279
|
+
readonly seq: number;
|
|
1280
|
+
readonly stateHash: string;
|
|
1281
|
+
readonly state?: import("effect/Schema").Json | undefined;
|
|
1282
|
+
};
|
|
1283
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1284
|
+
readonly type: "runtime.thread.cancel.requested";
|
|
1285
|
+
readonly payload: {
|
|
1286
|
+
readonly threadId: string;
|
|
1287
|
+
};
|
|
1288
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1289
|
+
readonly type: "runtime.thread.cancelled";
|
|
1290
|
+
readonly payload: {
|
|
1291
|
+
readonly threadId: string;
|
|
1292
|
+
readonly reason?: string | undefined;
|
|
1293
|
+
readonly resumeSeq?: number | undefined;
|
|
1294
|
+
};
|
|
1295
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1296
|
+
readonly type: "runtime.thread.completed";
|
|
1297
|
+
readonly payload: {
|
|
1298
|
+
readonly threadId: string;
|
|
1299
|
+
readonly output: import("effect/Schema").Json;
|
|
1300
|
+
};
|
|
1301
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1302
|
+
readonly type: "runtime.thread.failed";
|
|
1303
|
+
readonly payload: {
|
|
1304
|
+
readonly threadId: string;
|
|
1305
|
+
readonly error: string;
|
|
1306
|
+
};
|
|
1307
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1308
|
+
readonly type: "runtime.thread.started";
|
|
1309
|
+
readonly payload: {
|
|
1310
|
+
readonly threadId: string;
|
|
1311
|
+
readonly kind: string;
|
|
1312
|
+
readonly definitionName: string;
|
|
1313
|
+
readonly definitionVersion: string;
|
|
1314
|
+
readonly input: import("effect/Schema").Json;
|
|
1315
|
+
readonly parentThreadId: string | null;
|
|
1316
|
+
};
|
|
1317
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1318
|
+
readonly type: "runtime.timer.fired";
|
|
1319
|
+
readonly payload: {
|
|
1320
|
+
readonly timerId: string;
|
|
1321
|
+
readonly waitId: string;
|
|
1322
|
+
};
|
|
1323
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1324
|
+
readonly type: "runtime.timer.set";
|
|
1325
|
+
readonly payload: {
|
|
1326
|
+
readonly timerId: string;
|
|
1327
|
+
readonly waitId: string;
|
|
1328
|
+
readonly wakeAt: number;
|
|
1329
|
+
};
|
|
1330
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1331
|
+
readonly type: "runtime.wait.registered";
|
|
1332
|
+
readonly payload: {
|
|
1333
|
+
readonly waitId: string;
|
|
1334
|
+
readonly threadId?: string | undefined;
|
|
1335
|
+
readonly on: {
|
|
1336
|
+
readonly type: string | readonly string[];
|
|
1337
|
+
readonly match?: import("effect/Schema").Json | undefined;
|
|
1338
|
+
} | {
|
|
1339
|
+
readonly timerAt: number;
|
|
1687
1340
|
};
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1341
|
+
readonly tag?: import("effect/Schema").Json | undefined;
|
|
1342
|
+
};
|
|
1343
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1344
|
+
readonly type: "runtime.wait.satisfied";
|
|
1345
|
+
readonly payload: {
|
|
1346
|
+
readonly waitId: string;
|
|
1347
|
+
readonly tag?: import("effect/Schema").Json | undefined;
|
|
1348
|
+
readonly event: {
|
|
1349
|
+
readonly id: string;
|
|
1691
1350
|
readonly type: string;
|
|
1351
|
+
readonly payload: import("effect/Schema").Json;
|
|
1692
1352
|
};
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
readonly
|
|
1708
|
-
readonly
|
|
1709
|
-
};
|
|
1710
|
-
|
|
1711
|
-
readonly
|
|
1712
|
-
readonly
|
|
1713
|
-
readonly
|
|
1714
|
-
readonly
|
|
1715
|
-
readonly
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
readonly
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
readonly type: "runtime.thread.cancel.requested";
|
|
1758
|
-
readonly payload: {
|
|
1759
|
-
readonly threadId: string;
|
|
1760
|
-
};
|
|
1761
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1762
|
-
readonly type: "runtime.thread.cancelled";
|
|
1763
|
-
readonly payload: {
|
|
1764
|
-
readonly threadId: string;
|
|
1765
|
-
readonly reason?: string | undefined;
|
|
1766
|
-
readonly resumeSeq?: number | undefined;
|
|
1767
|
-
};
|
|
1768
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1769
|
-
readonly type: "runtime.thread.completed";
|
|
1770
|
-
readonly payload: {
|
|
1771
|
-
readonly threadId: string;
|
|
1772
|
-
readonly output: import("effect/Schema").Json;
|
|
1773
|
-
};
|
|
1774
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1775
|
-
readonly type: "runtime.thread.failed";
|
|
1776
|
-
readonly payload: {
|
|
1777
|
-
readonly threadId: string;
|
|
1778
|
-
readonly error: string;
|
|
1779
|
-
};
|
|
1780
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1781
|
-
readonly type: "runtime.thread.started";
|
|
1782
|
-
readonly payload: {
|
|
1783
|
-
readonly threadId: string;
|
|
1784
|
-
readonly kind: string;
|
|
1785
|
-
readonly definitionName: string;
|
|
1786
|
-
readonly definitionVersion: string;
|
|
1787
|
-
readonly input: import("effect/Schema").Json;
|
|
1788
|
-
readonly parentThreadId: string | null;
|
|
1789
|
-
};
|
|
1790
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1791
|
-
readonly type: "runtime.timer.fired";
|
|
1792
|
-
readonly payload: {
|
|
1793
|
-
readonly timerId: string;
|
|
1794
|
-
readonly waitId: string;
|
|
1795
|
-
};
|
|
1796
|
-
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1797
|
-
readonly type: "runtime.timer.set";
|
|
1798
|
-
readonly payload: {
|
|
1799
|
-
readonly timerId: string;
|
|
1800
|
-
readonly waitId: string;
|
|
1801
|
-
readonly wakeAt: number;
|
|
1353
|
+
};
|
|
1354
|
+
})>;
|
|
1355
|
+
}, {
|
|
1356
|
+
agent: import("@swirls/looms/core").ThreadDefinition<import("./types").AgentState>;
|
|
1357
|
+
'agent-session': import("@swirls/looms/core").ThreadDefinition<import("./types").AgentSessionState>;
|
|
1358
|
+
}, {
|
|
1359
|
+
conversation: import("@swirls/looms/core").ProjectionDefinition<{
|
|
1360
|
+
readonly lines: {
|
|
1361
|
+
readonly role: "assistant" | "system" | "tool" | "user";
|
|
1362
|
+
readonly content: string;
|
|
1363
|
+
readonly attachments?: readonly {
|
|
1364
|
+
readonly id: string;
|
|
1365
|
+
readonly mediaType: string;
|
|
1366
|
+
readonly name?: string | undefined;
|
|
1367
|
+
readonly size?: number | undefined;
|
|
1368
|
+
readonly url?: string | undefined;
|
|
1369
|
+
}[] | undefined;
|
|
1370
|
+
readonly toolCallId?: string | undefined;
|
|
1371
|
+
readonly name?: string | undefined;
|
|
1372
|
+
readonly toolCalls?: {
|
|
1373
|
+
readonly id: string;
|
|
1374
|
+
readonly name: string;
|
|
1375
|
+
readonly arguments: import("effect/Schema").Json;
|
|
1376
|
+
}[] | undefined;
|
|
1377
|
+
}[];
|
|
1378
|
+
}>;
|
|
1379
|
+
tokenUsage: import("@swirls/looms/core").ProjectionDefinition<{
|
|
1380
|
+
readonly input: number;
|
|
1381
|
+
readonly output: number;
|
|
1382
|
+
}>;
|
|
1383
|
+
turnActivity: import("@swirls/looms/core").ProjectionDefinition<{
|
|
1384
|
+
readonly rootThreadId: string | null;
|
|
1385
|
+
readonly active: boolean;
|
|
1386
|
+
}>;
|
|
1387
|
+
}, import("effect/Context").Service.Any, {
|
|
1388
|
+
userMessage: import("@swirls/looms/core").SignalDefinition<{
|
|
1389
|
+
readonly content: string;
|
|
1390
|
+
readonly attachments?: readonly {
|
|
1391
|
+
readonly id: string;
|
|
1392
|
+
readonly mediaType: string;
|
|
1393
|
+
readonly name?: string | undefined;
|
|
1394
|
+
readonly size?: number | undefined;
|
|
1395
|
+
readonly url?: string | undefined;
|
|
1396
|
+
}[] | undefined;
|
|
1397
|
+
}, Omit<EventInput, "payload" | "type"> & {
|
|
1398
|
+
readonly type: "agent.message.received";
|
|
1399
|
+
readonly payload: {
|
|
1400
|
+
readonly message: {
|
|
1401
|
+
readonly role: "assistant" | "system" | "tool" | "user";
|
|
1402
|
+
readonly content: string;
|
|
1403
|
+
readonly attachments?: readonly {
|
|
1404
|
+
readonly id: string;
|
|
1405
|
+
readonly mediaType: string;
|
|
1406
|
+
readonly name?: string | undefined;
|
|
1407
|
+
readonly size?: number | undefined;
|
|
1408
|
+
readonly url?: string | undefined;
|
|
1409
|
+
}[] | undefined;
|
|
1410
|
+
readonly toolCallId?: string | undefined;
|
|
1411
|
+
readonly name?: string | undefined;
|
|
1412
|
+
readonly toolCalls?: {
|
|
1413
|
+
readonly id: string;
|
|
1414
|
+
readonly name: string;
|
|
1415
|
+
readonly arguments: import("effect/Schema").Json;
|
|
1416
|
+
}[] | undefined;
|
|
1802
1417
|
};
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1418
|
+
};
|
|
1419
|
+
}>;
|
|
1420
|
+
steer: import("@swirls/looms/core").SignalDefinition<{
|
|
1421
|
+
readonly content: string;
|
|
1422
|
+
readonly attachments?: readonly {
|
|
1423
|
+
readonly id: string;
|
|
1424
|
+
readonly mediaType: string;
|
|
1425
|
+
readonly name?: string | undefined;
|
|
1426
|
+
readonly size?: number | undefined;
|
|
1427
|
+
readonly url?: string | undefined;
|
|
1428
|
+
}[] | undefined;
|
|
1429
|
+
readonly interrupt?: boolean | undefined;
|
|
1430
|
+
}, Omit<EventInput, "payload" | "type"> & {
|
|
1431
|
+
readonly type: "agent.steered";
|
|
1432
|
+
readonly payload: {
|
|
1433
|
+
readonly turn: number;
|
|
1434
|
+
readonly messageId?: string | undefined;
|
|
1435
|
+
readonly message: {
|
|
1436
|
+
readonly role: "assistant" | "system" | "tool" | "user";
|
|
1437
|
+
readonly content: string;
|
|
1438
|
+
readonly attachments?: readonly {
|
|
1439
|
+
readonly id: string;
|
|
1440
|
+
readonly mediaType: string;
|
|
1441
|
+
readonly name?: string | undefined;
|
|
1442
|
+
readonly size?: number | undefined;
|
|
1443
|
+
readonly url?: string | undefined;
|
|
1444
|
+
}[] | undefined;
|
|
1445
|
+
readonly toolCallId?: string | undefined;
|
|
1446
|
+
readonly name?: string | undefined;
|
|
1447
|
+
readonly toolCalls?: {
|
|
1448
|
+
readonly id: string;
|
|
1449
|
+
readonly name: string;
|
|
1450
|
+
readonly arguments: import("effect/Schema").Json;
|
|
1451
|
+
}[] | undefined;
|
|
1815
1452
|
};
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1453
|
+
readonly interrupt?: boolean | undefined;
|
|
1454
|
+
};
|
|
1455
|
+
}>;
|
|
1456
|
+
stopAgentTurn: import("@swirls/looms/core").SignalDefinition<undefined, Omit<EventInput, "payload" | "type"> & {
|
|
1457
|
+
readonly type: "agent.turn.stopped";
|
|
1458
|
+
readonly payload: {};
|
|
1459
|
+
}>;
|
|
1460
|
+
submitAgentMessage: import("@swirls/looms/core").SignalDefinition<{
|
|
1461
|
+
readonly messageId: string;
|
|
1462
|
+
readonly text: string;
|
|
1463
|
+
readonly attachments?: readonly {
|
|
1464
|
+
readonly id: string;
|
|
1465
|
+
readonly mediaType: string;
|
|
1466
|
+
readonly name?: string | undefined;
|
|
1467
|
+
readonly size?: number | undefined;
|
|
1468
|
+
readonly url?: string | undefined;
|
|
1469
|
+
}[] | undefined;
|
|
1470
|
+
readonly delivery?: "followUp" | "nextTurn" | "steer" | undefined;
|
|
1471
|
+
readonly activeChildThreadId?: string | undefined;
|
|
1472
|
+
}, Omit<EventInput, "payload" | "type"> & {
|
|
1473
|
+
readonly type: "agent.session.message.submitted";
|
|
1474
|
+
readonly payload: {
|
|
1475
|
+
readonly messageId: string;
|
|
1476
|
+
readonly text: string;
|
|
1477
|
+
readonly attachments?: readonly {
|
|
1478
|
+
readonly id: string;
|
|
1479
|
+
readonly mediaType: string;
|
|
1480
|
+
readonly name?: string | undefined;
|
|
1481
|
+
readonly size?: number | undefined;
|
|
1482
|
+
readonly url?: string | undefined;
|
|
1483
|
+
}[] | undefined;
|
|
1484
|
+
readonly delivery?: "followUp" | "nextTurn" | "steer" | undefined;
|
|
1485
|
+
readonly activeChildThreadId?: string | undefined;
|
|
1486
|
+
};
|
|
1487
|
+
}>;
|
|
1488
|
+
cancelAgentTurn: import("@swirls/looms/core").SignalDefinition<{
|
|
1489
|
+
readonly childThreadId: string;
|
|
1490
|
+
}, ({
|
|
1491
|
+
type: 'runtime.thread.cancel.requested';
|
|
1492
|
+
payload: {
|
|
1493
|
+
threadId: string;
|
|
1494
|
+
};
|
|
1495
|
+
} | (Omit<EventInput, "payload" | "type"> & {
|
|
1496
|
+
readonly type: "agent.session.cancel.requested";
|
|
1497
|
+
readonly payload: {};
|
|
1498
|
+
}))[]>;
|
|
1499
|
+
agentSessionMessageEvents: import("@swirls/looms/core").SignalDefinition<{
|
|
1500
|
+
readonly messageId: string;
|
|
1501
|
+
readonly text: string;
|
|
1502
|
+
readonly attachments?: readonly {
|
|
1503
|
+
readonly id: string;
|
|
1504
|
+
readonly mediaType: string;
|
|
1505
|
+
readonly name?: string | undefined;
|
|
1506
|
+
readonly size?: number | undefined;
|
|
1507
|
+
readonly url?: string | undefined;
|
|
1508
|
+
}[] | undefined;
|
|
1509
|
+
readonly delivery?: "followUp" | "nextTurn" | "steer" | undefined;
|
|
1510
|
+
readonly activeChildThreadId?: string | undefined;
|
|
1511
|
+
}, ((Omit<EventInput, "payload" | "type"> & {
|
|
1512
|
+
readonly type: "agent.session.message.submitted";
|
|
1513
|
+
readonly payload: {
|
|
1514
|
+
readonly messageId: string;
|
|
1515
|
+
readonly text: string;
|
|
1516
|
+
readonly attachments?: readonly {
|
|
1517
|
+
readonly id: string;
|
|
1518
|
+
readonly mediaType: string;
|
|
1519
|
+
readonly name?: string | undefined;
|
|
1520
|
+
readonly size?: number | undefined;
|
|
1521
|
+
readonly url?: string | undefined;
|
|
1522
|
+
}[] | undefined;
|
|
1523
|
+
readonly delivery?: "followUp" | "nextTurn" | "steer" | undefined;
|
|
1524
|
+
readonly activeChildThreadId?: string | undefined;
|
|
1525
|
+
};
|
|
1526
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
1527
|
+
readonly type: "agent.steered";
|
|
1528
|
+
readonly payload: {
|
|
1529
|
+
readonly turn: number;
|
|
1530
|
+
readonly messageId?: string | undefined;
|
|
1531
|
+
readonly message: {
|
|
1532
|
+
readonly role: "assistant" | "system" | "tool" | "user";
|
|
1533
|
+
readonly content: string;
|
|
1534
|
+
readonly attachments?: readonly {
|
|
1822
1535
|
readonly id: string;
|
|
1823
|
-
readonly
|
|
1824
|
-
readonly
|
|
1825
|
-
|
|
1536
|
+
readonly mediaType: string;
|
|
1537
|
+
readonly name?: string | undefined;
|
|
1538
|
+
readonly size?: number | undefined;
|
|
1539
|
+
readonly url?: string | undefined;
|
|
1540
|
+
}[] | undefined;
|
|
1541
|
+
readonly toolCallId?: string | undefined;
|
|
1542
|
+
readonly name?: string | undefined;
|
|
1543
|
+
readonly toolCalls?: {
|
|
1544
|
+
readonly id: string;
|
|
1545
|
+
readonly name: string;
|
|
1546
|
+
readonly arguments: import("effect/Schema").Json;
|
|
1547
|
+
}[] | undefined;
|
|
1826
1548
|
};
|
|
1827
|
-
|
|
1549
|
+
readonly interrupt?: boolean | undefined;
|
|
1550
|
+
};
|
|
1551
|
+
}))[]>;
|
|
1552
|
+
}, {}> & {
|
|
1553
|
+
readonly effects: {
|
|
1554
|
+
callLLM: import("@swirls/looms/core").LocalEffectDefinition<{
|
|
1555
|
+
readonly turn: number;
|
|
1556
|
+
readonly messageTurn?: number | undefined;
|
|
1557
|
+
readonly definitionName?: string | undefined;
|
|
1558
|
+
readonly definitionVersion: string;
|
|
1559
|
+
readonly messages?: readonly {
|
|
1560
|
+
readonly role: "assistant" | "system" | "tool" | "user";
|
|
1561
|
+
readonly content: string;
|
|
1562
|
+
readonly attachments?: readonly {
|
|
1563
|
+
readonly id: string;
|
|
1564
|
+
readonly mediaType: string;
|
|
1565
|
+
readonly name?: string | undefined;
|
|
1566
|
+
readonly size?: number | undefined;
|
|
1567
|
+
readonly url?: string | undefined;
|
|
1568
|
+
}[] | undefined;
|
|
1569
|
+
readonly toolCallId?: string | undefined;
|
|
1570
|
+
readonly name?: string | undefined;
|
|
1571
|
+
readonly toolCalls?: {
|
|
1572
|
+
readonly id: string;
|
|
1573
|
+
readonly name: string;
|
|
1574
|
+
readonly arguments: import("effect/Schema").Json;
|
|
1575
|
+
}[] | undefined;
|
|
1576
|
+
}[] | undefined;
|
|
1577
|
+
readonly input?: import("effect/Schema").Json | undefined;
|
|
1578
|
+
readonly structuredOutput?: import("effect/Schema").Json | undefined;
|
|
1579
|
+
readonly alreadyCompacted?: boolean | undefined;
|
|
1580
|
+
readonly consumedSteerMessageIds?: readonly string[] | undefined;
|
|
1581
|
+
}, import("./definitions-store").AgentDefinitionsTag | LlmTag, (Omit<EventInput, "payload" | "type"> & {
|
|
1828
1582
|
readonly type: "agent.context.compacted";
|
|
1829
1583
|
readonly payload: {
|
|
1830
1584
|
readonly turn: number;
|
|
@@ -2107,19 +1861,7 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
|
|
|
2107
1861
|
readonly input: number;
|
|
2108
1862
|
readonly output: number;
|
|
2109
1863
|
};
|
|
2110
|
-
})
|
|
2111
|
-
executeTool: import("@swirls/looms/core").LocalEffectDefinition<{
|
|
2112
|
-
readonly turn: number;
|
|
2113
|
-
readonly definitionName?: string | undefined;
|
|
2114
|
-
readonly definitionVersion: string;
|
|
2115
|
-
readonly toolCall: {
|
|
2116
|
-
readonly id: string;
|
|
2117
|
-
readonly name: string;
|
|
2118
|
-
readonly arguments: import("effect/Schema").Json;
|
|
2119
|
-
};
|
|
2120
|
-
readonly input?: import("effect/Schema").Json | undefined;
|
|
2121
|
-
readonly depth?: number | undefined;
|
|
2122
|
-
}, import("./definitions-store").AgentDefinitionsTag, (Omit<EventInput, "payload" | "type"> & {
|
|
1864
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2123
1865
|
readonly type: "runtime.child.close.requested";
|
|
2124
1866
|
readonly payload: {
|
|
2125
1867
|
readonly policy: "terminate" | "wait";
|
|
@@ -2365,7 +2107,19 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
|
|
|
2365
2107
|
readonly payload: import("effect/Schema").Json;
|
|
2366
2108
|
};
|
|
2367
2109
|
};
|
|
2368
|
-
})
|
|
2110
|
+
})>;
|
|
2111
|
+
executeTool: import("@swirls/looms/core").LocalEffectDefinition<{
|
|
2112
|
+
readonly turn: number;
|
|
2113
|
+
readonly definitionName?: string | undefined;
|
|
2114
|
+
readonly definitionVersion: string;
|
|
2115
|
+
readonly toolCall: {
|
|
2116
|
+
readonly id: string;
|
|
2117
|
+
readonly name: string;
|
|
2118
|
+
readonly arguments: import("effect/Schema").Json;
|
|
2119
|
+
};
|
|
2120
|
+
readonly input?: import("effect/Schema").Json | undefined;
|
|
2121
|
+
readonly depth?: number | undefined;
|
|
2122
|
+
}, import("./definitions-store").AgentDefinitionsTag, (Omit<EventInput, "payload" | "type"> & {
|
|
2369
2123
|
readonly type: "agent.context.compacted";
|
|
2370
2124
|
readonly payload: {
|
|
2371
2125
|
readonly turn: number;
|
|
@@ -2648,6 +2402,252 @@ export declare function agent(options?: AgentModuleOptions): import("@swirls/loo
|
|
|
2648
2402
|
readonly input: number;
|
|
2649
2403
|
readonly output: number;
|
|
2650
2404
|
};
|
|
2405
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2406
|
+
readonly type: "runtime.child.close.requested";
|
|
2407
|
+
readonly payload: {
|
|
2408
|
+
readonly policy: "terminate" | "wait";
|
|
2409
|
+
};
|
|
2410
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2411
|
+
readonly type: "runtime.child.settled";
|
|
2412
|
+
readonly payload: {
|
|
2413
|
+
readonly runId: string;
|
|
2414
|
+
readonly status: "cancelled" | "completed" | "failed";
|
|
2415
|
+
readonly output: import("effect/Schema").Json;
|
|
2416
|
+
readonly error: string | null;
|
|
2417
|
+
};
|
|
2418
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2419
|
+
readonly type: "runtime.effect.ambiguous";
|
|
2420
|
+
readonly payload: {
|
|
2421
|
+
readonly effectId: string;
|
|
2422
|
+
readonly attempt: number;
|
|
2423
|
+
readonly error: string;
|
|
2424
|
+
};
|
|
2425
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2426
|
+
readonly type: "runtime.effect.attempt.started";
|
|
2427
|
+
readonly payload: {
|
|
2428
|
+
readonly effectId: string;
|
|
2429
|
+
readonly attempt: number;
|
|
2430
|
+
};
|
|
2431
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2432
|
+
readonly type: "runtime.effect.cancel.requested";
|
|
2433
|
+
readonly payload: {
|
|
2434
|
+
readonly effectId: string;
|
|
2435
|
+
readonly attempt: number;
|
|
2436
|
+
readonly deadlineAt: number | null;
|
|
2437
|
+
};
|
|
2438
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2439
|
+
readonly type: "runtime.effect.cancelled";
|
|
2440
|
+
readonly payload: {
|
|
2441
|
+
readonly effectId: string;
|
|
2442
|
+
readonly attempt: number;
|
|
2443
|
+
};
|
|
2444
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2445
|
+
readonly type: "runtime.effect.completed";
|
|
2446
|
+
readonly payload: {
|
|
2447
|
+
readonly effectId: string;
|
|
2448
|
+
readonly attempt: number;
|
|
2449
|
+
};
|
|
2450
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2451
|
+
readonly type: "runtime.effect.dispatch.deferred";
|
|
2452
|
+
readonly payload: {
|
|
2453
|
+
readonly effectId: string;
|
|
2454
|
+
readonly attempt: number;
|
|
2455
|
+
readonly retryAt: number;
|
|
2456
|
+
readonly error: string;
|
|
2457
|
+
readonly try: number;
|
|
2458
|
+
};
|
|
2459
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2460
|
+
readonly type: "runtime.effect.dispatched";
|
|
2461
|
+
readonly payload: {
|
|
2462
|
+
readonly effectId: string;
|
|
2463
|
+
readonly attempt: number;
|
|
2464
|
+
readonly deadlineAt: number | null;
|
|
2465
|
+
};
|
|
2466
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2467
|
+
readonly type: "runtime.effect.failed";
|
|
2468
|
+
readonly payload: {
|
|
2469
|
+
readonly effectId: string;
|
|
2470
|
+
readonly error: string;
|
|
2471
|
+
readonly nonRetryable?: boolean | undefined;
|
|
2472
|
+
readonly retryAfterMs?: number | undefined;
|
|
2473
|
+
};
|
|
2474
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2475
|
+
readonly type: "runtime.effect.heartbeat";
|
|
2476
|
+
readonly payload: {
|
|
2477
|
+
readonly effectId: string;
|
|
2478
|
+
readonly attempt: number;
|
|
2479
|
+
readonly heartbeatAt: number;
|
|
2480
|
+
readonly deadlineAt: number | null;
|
|
2481
|
+
readonly details?: import("effect/Schema").Json | undefined;
|
|
2482
|
+
};
|
|
2483
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2484
|
+
readonly type: "runtime.effect.queued";
|
|
2485
|
+
readonly payload: {
|
|
2486
|
+
readonly effectId: string;
|
|
2487
|
+
readonly attempt: number;
|
|
2488
|
+
readonly deadlineAt: number | null;
|
|
2489
|
+
};
|
|
2490
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2491
|
+
readonly type: "runtime.effect.retry.scheduled";
|
|
2492
|
+
readonly payload: {
|
|
2493
|
+
readonly effectId: string;
|
|
2494
|
+
readonly attempt: number;
|
|
2495
|
+
readonly nextAttemptAt: number;
|
|
2496
|
+
readonly error: string;
|
|
2497
|
+
};
|
|
2498
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2499
|
+
readonly type: "runtime.effect.timed_out";
|
|
2500
|
+
readonly payload: {
|
|
2501
|
+
readonly effectId: string;
|
|
2502
|
+
readonly attempt: number;
|
|
2503
|
+
readonly timeout: string;
|
|
2504
|
+
};
|
|
2505
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2506
|
+
readonly type: "runtime.effect.worker.started";
|
|
2507
|
+
readonly payload: {
|
|
2508
|
+
readonly effectId: string;
|
|
2509
|
+
readonly attempt: number;
|
|
2510
|
+
readonly deadlineAt: number | null;
|
|
2511
|
+
};
|
|
2512
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2513
|
+
readonly type: "runtime.fork.elided";
|
|
2514
|
+
readonly payload: {
|
|
2515
|
+
readonly type: string;
|
|
2516
|
+
};
|
|
2517
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2518
|
+
readonly type: "runtime.run.cancelled";
|
|
2519
|
+
readonly payload: {
|
|
2520
|
+
readonly reason?: string | undefined;
|
|
2521
|
+
};
|
|
2522
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2523
|
+
readonly type: "runtime.run.completed";
|
|
2524
|
+
readonly payload: {
|
|
2525
|
+
readonly output: import("effect/Schema").Json;
|
|
2526
|
+
readonly error: string | null;
|
|
2527
|
+
};
|
|
2528
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2529
|
+
readonly type: "runtime.run.forked";
|
|
2530
|
+
readonly payload: {
|
|
2531
|
+
readonly sourceRunId: string;
|
|
2532
|
+
readonly sourceSeq: number;
|
|
2533
|
+
};
|
|
2534
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2535
|
+
readonly type: "runtime.run.launched";
|
|
2536
|
+
readonly payload: {
|
|
2537
|
+
readonly runId: string;
|
|
2538
|
+
readonly kind: string;
|
|
2539
|
+
readonly definitionName: string;
|
|
2540
|
+
readonly definitionVersion: string;
|
|
2541
|
+
readonly effectId: string;
|
|
2542
|
+
readonly close: "terminate" | "wait";
|
|
2543
|
+
};
|
|
2544
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2545
|
+
readonly type: "runtime.run.started";
|
|
2546
|
+
readonly payload: {
|
|
2547
|
+
readonly rootThreadId?: string | undefined;
|
|
2548
|
+
readonly kind: string;
|
|
2549
|
+
readonly definitionName: string;
|
|
2550
|
+
readonly definitionVersion: string;
|
|
2551
|
+
readonly input: import("effect/Schema").Json;
|
|
2552
|
+
readonly requestedThreadId?: string | null | undefined;
|
|
2553
|
+
readonly launchedBy?: {
|
|
2554
|
+
readonly runId: string;
|
|
2555
|
+
readonly threadId: string;
|
|
2556
|
+
readonly effectId: string;
|
|
2557
|
+
readonly causationId: string;
|
|
2558
|
+
readonly causationSeq: number;
|
|
2559
|
+
} | undefined;
|
|
2560
|
+
readonly attributes?: {
|
|
2561
|
+
readonly [x: string]: string;
|
|
2562
|
+
} | undefined;
|
|
2563
|
+
readonly trace?: {
|
|
2564
|
+
readonly traceparent: string;
|
|
2565
|
+
readonly tracestate?: string | undefined;
|
|
2566
|
+
} | undefined;
|
|
2567
|
+
};
|
|
2568
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2569
|
+
readonly type: "runtime.signal.received";
|
|
2570
|
+
readonly payload: {
|
|
2571
|
+
readonly signalType: string;
|
|
2572
|
+
};
|
|
2573
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2574
|
+
readonly type: "runtime.snapshot.taken";
|
|
2575
|
+
readonly payload: {
|
|
2576
|
+
readonly seq: number;
|
|
2577
|
+
readonly stateHash: string;
|
|
2578
|
+
readonly state?: import("effect/Schema").Json | undefined;
|
|
2579
|
+
};
|
|
2580
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2581
|
+
readonly type: "runtime.thread.cancel.requested";
|
|
2582
|
+
readonly payload: {
|
|
2583
|
+
readonly threadId: string;
|
|
2584
|
+
};
|
|
2585
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2586
|
+
readonly type: "runtime.thread.cancelled";
|
|
2587
|
+
readonly payload: {
|
|
2588
|
+
readonly threadId: string;
|
|
2589
|
+
readonly reason?: string | undefined;
|
|
2590
|
+
readonly resumeSeq?: number | undefined;
|
|
2591
|
+
};
|
|
2592
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2593
|
+
readonly type: "runtime.thread.completed";
|
|
2594
|
+
readonly payload: {
|
|
2595
|
+
readonly threadId: string;
|
|
2596
|
+
readonly output: import("effect/Schema").Json;
|
|
2597
|
+
};
|
|
2598
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2599
|
+
readonly type: "runtime.thread.failed";
|
|
2600
|
+
readonly payload: {
|
|
2601
|
+
readonly threadId: string;
|
|
2602
|
+
readonly error: string;
|
|
2603
|
+
};
|
|
2604
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2605
|
+
readonly type: "runtime.thread.started";
|
|
2606
|
+
readonly payload: {
|
|
2607
|
+
readonly threadId: string;
|
|
2608
|
+
readonly kind: string;
|
|
2609
|
+
readonly definitionName: string;
|
|
2610
|
+
readonly definitionVersion: string;
|
|
2611
|
+
readonly input: import("effect/Schema").Json;
|
|
2612
|
+
readonly parentThreadId: string | null;
|
|
2613
|
+
};
|
|
2614
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2615
|
+
readonly type: "runtime.timer.fired";
|
|
2616
|
+
readonly payload: {
|
|
2617
|
+
readonly timerId: string;
|
|
2618
|
+
readonly waitId: string;
|
|
2619
|
+
};
|
|
2620
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2621
|
+
readonly type: "runtime.timer.set";
|
|
2622
|
+
readonly payload: {
|
|
2623
|
+
readonly timerId: string;
|
|
2624
|
+
readonly waitId: string;
|
|
2625
|
+
readonly wakeAt: number;
|
|
2626
|
+
};
|
|
2627
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2628
|
+
readonly type: "runtime.wait.registered";
|
|
2629
|
+
readonly payload: {
|
|
2630
|
+
readonly waitId: string;
|
|
2631
|
+
readonly threadId?: string | undefined;
|
|
2632
|
+
readonly on: {
|
|
2633
|
+
readonly type: string | readonly string[];
|
|
2634
|
+
readonly match?: import("effect/Schema").Json | undefined;
|
|
2635
|
+
} | {
|
|
2636
|
+
readonly timerAt: number;
|
|
2637
|
+
};
|
|
2638
|
+
readonly tag?: import("effect/Schema").Json | undefined;
|
|
2639
|
+
};
|
|
2640
|
+
}) | (Omit<EventInput, "payload" | "type"> & {
|
|
2641
|
+
readonly type: "runtime.wait.satisfied";
|
|
2642
|
+
readonly payload: {
|
|
2643
|
+
readonly waitId: string;
|
|
2644
|
+
readonly tag?: import("effect/Schema").Json | undefined;
|
|
2645
|
+
readonly event: {
|
|
2646
|
+
readonly id: string;
|
|
2647
|
+
readonly type: string;
|
|
2648
|
+
readonly payload: import("effect/Schema").Json;
|
|
2649
|
+
};
|
|
2650
|
+
};
|
|
2651
2651
|
})>;
|
|
2652
2652
|
};
|
|
2653
2653
|
readonly threads: {
|