@swirls/looms 0.19.0 → 0.19.1

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.
@@ -47,6 +47,7 @@ export function withBlobOffload(store, blobs, options) {
47
47
  .subscribe(runId, subscribeOptions)
48
48
  .pipe(Stream.mapEffect((event) => resolveEnvelope(event, blobs).pipe(Effect.mapError(asEventError)))),
49
49
  listRuns: store.listRuns,
50
+ runSecrets: store.runSecrets,
50
51
  };
51
52
  if (!wrappedSnapshots) {
52
53
  return wrapped;
@@ -7,39 +7,6 @@ export declare const evaluateEffect: NoInfer<import("@swirls/looms/core").LocalE
7
7
  readonly definitionVersion?: string | undefined;
8
8
  readonly input?: Schema.Json | undefined;
9
9
  }, EvaluatorDefinitionsTag | EvaluatorTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
10
- readonly type: "evaluator.evaluated";
11
- readonly payload: {
12
- readonly evaluationId: string;
13
- readonly definitionName?: string | undefined;
14
- readonly answers: {
15
- readonly [x: string]: {
16
- readonly type: "boolean";
17
- readonly value: boolean;
18
- readonly probability: number;
19
- } | {
20
- readonly type: "choice";
21
- readonly value: string;
22
- } | {
23
- readonly type: "score";
24
- readonly value: number;
25
- };
26
- };
27
- readonly route: string;
28
- readonly reason: "model" | "skipped" | "unavailable" | "uncertain";
29
- readonly usage?: {
30
- readonly input: number;
31
- readonly output: number;
32
- } | undefined;
33
- };
34
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
35
- readonly type: "evaluator.requested";
36
- readonly payload: {
37
- readonly evaluationId: string;
38
- readonly definitionName?: string | undefined;
39
- readonly state: string;
40
- readonly model?: string | undefined;
41
- };
42
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
43
10
  readonly type: "runtime.child.close.requested";
44
11
  readonly payload: {
45
12
  readonly policy: "terminate" | "wait";
@@ -285,4 +252,37 @@ export declare const evaluateEffect: NoInfer<import("@swirls/looms/core").LocalE
285
252
  readonly payload: Schema.Json;
286
253
  };
287
254
  };
255
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
256
+ readonly type: "evaluator.evaluated";
257
+ readonly payload: {
258
+ readonly evaluationId: string;
259
+ readonly definitionName?: string | undefined;
260
+ readonly answers: {
261
+ readonly [x: string]: {
262
+ readonly type: "boolean";
263
+ readonly value: boolean;
264
+ readonly probability: number;
265
+ } | {
266
+ readonly type: "choice";
267
+ readonly value: string;
268
+ } | {
269
+ readonly type: "score";
270
+ readonly value: number;
271
+ };
272
+ };
273
+ readonly route: string;
274
+ readonly reason: "model" | "skipped" | "unavailable" | "uncertain";
275
+ readonly usage?: {
276
+ readonly input: number;
277
+ readonly output: number;
278
+ } | undefined;
279
+ };
280
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
281
+ readonly type: "evaluator.requested";
282
+ readonly payload: {
283
+ readonly evaluationId: string;
284
+ readonly definitionName?: string | undefined;
285
+ readonly state: string;
286
+ readonly model?: string | undefined;
287
+ };
288
288
  })>>;
@@ -43,39 +43,6 @@ export declare function evaluator(options?: EvaluatorModuleOptions): import("@sw
43
43
  readonly definitionVersion?: string | undefined;
44
44
  readonly input?: import("effect/Schema").Json | undefined;
45
45
  }, import("./definitions-store").EvaluatorDefinitionsTag | EvaluatorTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
46
- readonly type: "evaluator.evaluated";
47
- readonly payload: {
48
- readonly evaluationId: string;
49
- readonly definitionName?: string | undefined;
50
- readonly answers: {
51
- readonly [x: string]: {
52
- readonly type: "boolean";
53
- readonly value: boolean;
54
- readonly probability: number;
55
- } | {
56
- readonly type: "choice";
57
- readonly value: string;
58
- } | {
59
- readonly type: "score";
60
- readonly value: number;
61
- };
62
- };
63
- readonly route: string;
64
- readonly reason: "model" | "skipped" | "unavailable" | "uncertain";
65
- readonly usage?: {
66
- readonly input: number;
67
- readonly output: number;
68
- } | undefined;
69
- };
70
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
71
- readonly type: "evaluator.requested";
72
- readonly payload: {
73
- readonly evaluationId: string;
74
- readonly definitionName?: string | undefined;
75
- readonly state: string;
76
- readonly model?: string | undefined;
77
- };
78
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
79
46
  readonly type: "runtime.child.close.requested";
80
47
  readonly payload: {
81
48
  readonly policy: "terminate" | "wait";
@@ -321,6 +288,39 @@ export declare function evaluator(options?: EvaluatorModuleOptions): import("@sw
321
288
  readonly payload: import("effect/Schema").Json;
322
289
  };
323
290
  };
291
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
292
+ readonly type: "evaluator.evaluated";
293
+ readonly payload: {
294
+ readonly evaluationId: string;
295
+ readonly definitionName?: string | undefined;
296
+ readonly answers: {
297
+ readonly [x: string]: {
298
+ readonly type: "boolean";
299
+ readonly value: boolean;
300
+ readonly probability: number;
301
+ } | {
302
+ readonly type: "choice";
303
+ readonly value: string;
304
+ } | {
305
+ readonly type: "score";
306
+ readonly value: number;
307
+ };
308
+ };
309
+ readonly route: string;
310
+ readonly reason: "model" | "skipped" | "unavailable" | "uncertain";
311
+ readonly usage?: {
312
+ readonly input: number;
313
+ readonly output: number;
314
+ } | undefined;
315
+ };
316
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
317
+ readonly type: "evaluator.requested";
318
+ readonly payload: {
319
+ readonly evaluationId: string;
320
+ readonly definitionName?: string | undefined;
321
+ readonly state: string;
322
+ readonly model?: string | undefined;
323
+ };
324
324
  })>;
325
325
  }, {
326
326
  evaluator: import("@swirls/looms/core").ThreadDefinition<{
@@ -391,39 +391,6 @@ export declare function evaluator(options?: EvaluatorModuleOptions): import("@sw
391
391
  readonly definitionVersion?: string | undefined;
392
392
  readonly input?: import("effect/Schema").Json | undefined;
393
393
  }, import("./definitions-store").EvaluatorDefinitionsTag | EvaluatorTag, (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
394
- readonly type: "evaluator.evaluated";
395
- readonly payload: {
396
- readonly evaluationId: string;
397
- readonly definitionName?: string | undefined;
398
- readonly answers: {
399
- readonly [x: string]: {
400
- readonly type: "boolean";
401
- readonly value: boolean;
402
- readonly probability: number;
403
- } | {
404
- readonly type: "choice";
405
- readonly value: string;
406
- } | {
407
- readonly type: "score";
408
- readonly value: number;
409
- };
410
- };
411
- readonly route: string;
412
- readonly reason: "model" | "skipped" | "unavailable" | "uncertain";
413
- readonly usage?: {
414
- readonly input: number;
415
- readonly output: number;
416
- } | undefined;
417
- };
418
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
419
- readonly type: "evaluator.requested";
420
- readonly payload: {
421
- readonly evaluationId: string;
422
- readonly definitionName?: string | undefined;
423
- readonly state: string;
424
- readonly model?: string | undefined;
425
- };
426
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
427
394
  readonly type: "runtime.child.close.requested";
428
395
  readonly payload: {
429
396
  readonly policy: "terminate" | "wait";
@@ -669,6 +636,39 @@ export declare function evaluator(options?: EvaluatorModuleOptions): import("@sw
669
636
  readonly payload: import("effect/Schema").Json;
670
637
  };
671
638
  };
639
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
640
+ readonly type: "evaluator.evaluated";
641
+ readonly payload: {
642
+ readonly evaluationId: string;
643
+ readonly definitionName?: string | undefined;
644
+ readonly answers: {
645
+ readonly [x: string]: {
646
+ readonly type: "boolean";
647
+ readonly value: boolean;
648
+ readonly probability: number;
649
+ } | {
650
+ readonly type: "choice";
651
+ readonly value: string;
652
+ } | {
653
+ readonly type: "score";
654
+ readonly value: number;
655
+ };
656
+ };
657
+ readonly route: string;
658
+ readonly reason: "model" | "skipped" | "unavailable" | "uncertain";
659
+ readonly usage?: {
660
+ readonly input: number;
661
+ readonly output: number;
662
+ } | undefined;
663
+ };
664
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
665
+ readonly type: "evaluator.requested";
666
+ readonly payload: {
667
+ readonly evaluationId: string;
668
+ readonly definitionName?: string | undefined;
669
+ readonly state: string;
670
+ readonly model?: string | undefined;
671
+ };
672
672
  })>;
673
673
  };
674
674
  readonly threads: {
@@ -43,11 +43,15 @@ export function withProjectors(store, projectors, options) {
43
43
  });
44
44
  })),
45
45
  read: (runId, readOptions) => store.read(runId, readOptions),
46
+ readStream: store.readStream
47
+ ? (runId, readOptions) => store.readStream(runId, readOptions)
48
+ : undefined,
46
49
  tail: (runId) => store.tail(runId),
47
50
  bounds: store.bounds ? (runId) => store.bounds(runId) : undefined,
48
51
  trim: store.trim ? (runId, beforeSeq) => store.trim(runId, beforeSeq) : undefined,
49
52
  subscribe: (runId, subscribeOptions) => store.subscribe(runId, subscribeOptions),
50
53
  listRuns: store.listRuns,
54
+ runSecrets: store.runSecrets,
51
55
  };
52
56
  const snapshots = snapshotStoreOf(store);
53
57
  return snapshots ? withSnapshotStore(wrapped, snapshots) : wrapped;
@@ -332,6 +332,15 @@ export declare const planEffect: NoInfer<import("@swirls/looms/core").LocalEffec
332
332
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
333
333
  readonly type: "schedule.paused";
334
334
  readonly payload: {};
335
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
336
+ readonly type: "schedule.resumed";
337
+ readonly payload: {};
338
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
339
+ readonly type: "schedule.retired";
340
+ readonly payload: {};
341
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
342
+ readonly type: "schedule.triggered";
343
+ readonly payload: {};
335
344
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
336
345
  readonly type: "schedule.planned";
337
346
  readonly payload: {
@@ -355,12 +364,6 @@ export declare const planEffect: NoInfer<import("@swirls/looms/core").LocalEffec
355
364
  readonly payload: {
356
365
  readonly reason: string;
357
366
  };
358
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
359
- readonly type: "schedule.resumed";
360
- readonly payload: {};
361
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
362
- readonly type: "schedule.retired";
363
- readonly payload: {};
364
367
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
365
368
  readonly type: "schedule.skipped";
366
369
  readonly payload: {
@@ -371,9 +374,6 @@ export declare const planEffect: NoInfer<import("@swirls/looms/core").LocalEffec
371
374
  readonly manual: boolean;
372
375
  readonly triggerId?: string | undefined;
373
376
  };
374
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
375
- readonly type: "schedule.triggered";
376
- readonly payload: {};
377
377
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
378
378
  readonly type: "schedule.updated";
379
379
  readonly payload: {
@@ -683,6 +683,15 @@ export declare const fireEffect: NoInfer<import("@swirls/looms/core").LocalEffec
683
683
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
684
684
  readonly type: "schedule.paused";
685
685
  readonly payload: {};
686
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
687
+ readonly type: "schedule.resumed";
688
+ readonly payload: {};
689
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
690
+ readonly type: "schedule.retired";
691
+ readonly payload: {};
692
+ }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
693
+ readonly type: "schedule.triggered";
694
+ readonly payload: {};
686
695
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
687
696
  readonly type: "schedule.planned";
688
697
  readonly payload: {
@@ -706,12 +715,6 @@ export declare const fireEffect: NoInfer<import("@swirls/looms/core").LocalEffec
706
715
  readonly payload: {
707
716
  readonly reason: string;
708
717
  };
709
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
710
- readonly type: "schedule.resumed";
711
- readonly payload: {};
712
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
713
- readonly type: "schedule.retired";
714
- readonly payload: {};
715
718
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
716
719
  readonly type: "schedule.skipped";
717
720
  readonly payload: {
@@ -722,9 +725,6 @@ export declare const fireEffect: NoInfer<import("@swirls/looms/core").LocalEffec
722
725
  readonly manual: boolean;
723
726
  readonly triggerId?: string | undefined;
724
727
  };
725
- }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
726
- readonly type: "schedule.triggered";
727
- readonly payload: {};
728
728
  }) | (Omit<import("@swirls/looms/core").EventInput, "payload" | "type"> & {
729
729
  readonly type: "schedule.updated";
730
730
  readonly payload: {
@@ -74,6 +74,7 @@ export function createFaultInjectingEventStore(source, before) {
74
74
  tail: (runId) => inject('tail', runId).pipe(Effect.andThen(source.tail(runId))),
75
75
  subscribe: source.subscribe,
76
76
  listRuns: inject('listRuns', null).pipe(Effect.andThen(source.listRuns)),
77
+ runSecrets: source.runSecrets,
77
78
  };
78
79
  if (source.bounds) {
79
80
  store.bounds = (runId) => inject('bounds', runId).pipe(Effect.andThen(source.bounds(runId)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swirls/looms",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Pluggable event-sourced runtime for durable agents and workflows",
5
5
  "homepage": "https://github.com/ByteSliceHQ/looms#readme",
6
6
  "bugs": {