fascicle 0.5.0 → 0.6.3

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/dist/index.js CHANGED
@@ -1,8 +1,9 @@
1
+ import { n as http_logger, r as filesystem_logger, t as tee_logger } from "./tee-D_Qh_vfY.js";
1
2
  import { createHash, randomUUID } from "node:crypto";
2
3
  import { z } from "zod";
3
4
  import { mkdir, open, readFile, readdir, stat, writeFile } from "node:fs/promises";
4
5
  import { dirname, join, resolve } from "node:path";
5
- import { appendFileSync, createReadStream, existsSync, mkdirSync, mkdtempSync, statSync, watch, writeFileSync } from "node:fs";
6
+ import { createReadStream, existsSync, mkdtempSync, statSync, watch, writeFileSync } from "node:fs";
6
7
  import { tmpdir } from "node:os";
7
8
  import { spawn } from "node:child_process";
8
9
  import { generateText, stepCountIs, streamText, tool } from "ai";
@@ -408,6 +409,18 @@ var aborted_error = class extends Error {
408
409
  if (metadata.tool_call_in_flight !== void 0) this.tool_call_in_flight = metadata.tool_call_in_flight;
409
410
  }
410
411
  };
412
+ /**
413
+ * Control-flow signals are not application failures. `suspended_error` is a
414
+ * human-approval gate pausing the run for later resume; `aborted_error` is
415
+ * cancellation. Resilience composers (`retry`, `fallback`) must rethrow these
416
+ * rather than retry past a suspend or run a backup under an aborted context.
417
+ *
418
+ * Kept internal to @repo/core: not re-exported by index.ts, so it does not
419
+ * widen the public surface.
420
+ */
421
+ function is_control_flow_error(err) {
422
+ return err instanceof suspended_error || err instanceof aborted_error;
423
+ }
411
424
  //#endregion
412
425
  //#region packages/core/src/streaming.ts
413
426
  const STREAMING_HIGH_WATER_MARK = 1e4;
@@ -543,6 +556,39 @@ function resolve_span_label(flow, fallback) {
543
556
  const display = flow.config?.["display_name"];
544
557
  return typeof display === "string" && display.length > 0 ? display : fallback;
545
558
  }
559
+ /**
560
+ * Register the standard span-wrapping dispatch handler for a composer kind.
561
+ *
562
+ * Every composer wraps `flow.run` in a span identically; this centralizes that
563
+ * boilerplate and threads span parentage: the span opens with the current
564
+ * `ctx.parent_span_id` as its parent, and `flow.run` receives a child context
565
+ * whose `parent_span_id` is this span. Children dispatched from within
566
+ * (including concurrent ones under `parallel`/`map`, which spread the context)
567
+ * therefore nest correctly instead of leaving `parent_span_id` unpopulated.
568
+ */
569
+ function register_traced_kind(kind) {
570
+ register_kind(kind, async (flow, input, ctx) => {
571
+ const label = resolve_span_label(flow, kind);
572
+ const span_meta = { id: flow.id };
573
+ if (ctx.parent_span_id !== void 0) span_meta["parent_span_id"] = ctx.parent_span_id;
574
+ const span_id = ctx.trajectory.start_span(label, span_meta);
575
+ const child_ctx = {
576
+ ...ctx,
577
+ parent_span_id: span_id
578
+ };
579
+ try {
580
+ const out = await flow.run(input, child_ctx);
581
+ ctx.trajectory.end_span(span_id, { id: flow.id });
582
+ return out;
583
+ } catch (err) {
584
+ ctx.trajectory.end_span(span_id, {
585
+ id: flow.id,
586
+ error: err instanceof Error ? err.message : String(err)
587
+ });
588
+ throw err;
589
+ }
590
+ });
591
+ }
546
592
  const active_runs = /* @__PURE__ */ new Set();
547
593
  let signal_handler_installed = false;
548
594
  let sigint_handler = null;
@@ -573,40 +619,38 @@ const noop_logger = {
573
619
  end_span: () => {}
574
620
  };
575
621
  /**
576
- * Wrap a logger so every emitted event automatically carries `run_id`.
622
+ * Wrap a logger so every emitted event automatically carries `run_id` and a
623
+ * `ts` (epoch milliseconds) stamped at emission.
577
624
  *
578
- * Studios and other downstream consumers can multiplex events across runs
579
- * by reading this field. Callers may still set their own `run_id` on a record;
580
- * we don't overwrite it.
625
+ * Studios and other downstream consumers multiplex events across runs by
626
+ * `run_id` and reconstruct real timing from `ts` instead of fabricating it at
627
+ * ingest. Either field already present on an event or its meta is preserved;
628
+ * we never overwrite a caller-supplied value.
581
629
  */
582
- function stamp_run_id(inner, run_id) {
630
+ function decorate_logger(inner, run_id) {
631
+ const stamp_meta = (meta) => {
632
+ const out = { ...meta };
633
+ if (!("run_id" in out)) out["run_id"] = run_id;
634
+ if (!("ts" in out)) out["ts"] = Date.now();
635
+ return out;
636
+ };
583
637
  return {
584
638
  record: (event) => {
585
- if ("run_id" in event) {
639
+ if ("run_id" in event && "ts" in event) {
586
640
  inner.record(event);
587
641
  return;
588
642
  }
643
+ const extra = {};
644
+ if (!("run_id" in event)) extra["run_id"] = run_id;
645
+ if (!("ts" in event)) extra["ts"] = Date.now();
589
646
  inner.record({
590
647
  ...event,
591
- run_id
592
- });
593
- },
594
- start_span: (name, meta) => {
595
- if (meta && "run_id" in meta) return inner.start_span(name, meta);
596
- return inner.start_span(name, {
597
- ...meta,
598
- run_id
648
+ ...extra
599
649
  });
600
650
  },
651
+ start_span: (name, meta) => inner.start_span(name, stamp_meta(meta)),
601
652
  end_span: (id, meta) => {
602
- if (meta && "run_id" in meta) {
603
- inner.end_span(id, meta);
604
- return;
605
- }
606
- inner.end_span(id, {
607
- ...meta,
608
- run_id
609
- });
653
+ inner.end_span(id, stamp_meta(meta));
610
654
  }
611
655
  };
612
656
  }
@@ -626,21 +670,33 @@ function prepend_path(err, id) {
626
670
  const next = Array.isArray(existing) ? [id, ...existing.filter((v) => typeof v === "string")] : [id];
627
671
  Reflect.set(err, "path", next);
628
672
  }
673
+ /**
674
+ * Throw the abort reason if the context has been cancelled. Composers that
675
+ * iterate over children (`sequence`, `scope`, `loop`) call this between steps
676
+ * so a pending abort is honored before the next child starts, not only when a
677
+ * downstream dispatch happens to observe it.
678
+ */
679
+ function throw_if_aborted$2(ctx) {
680
+ if (!ctx.abort.aborted) return;
681
+ const reason = ctx.abort.reason;
682
+ throw reason instanceof Error ? reason : new aborted_error("aborted", { reason });
683
+ }
629
684
  function start_run(flow, input, options, high_water_mark) {
630
685
  const install_signal_handlers = options.install_signal_handlers !== false;
631
686
  const base_logger = options.trajectory ?? noop_logger;
632
687
  const streaming = high_water_mark !== null;
633
688
  const controller = new AbortController();
634
689
  const run_id = randomUUID();
635
- let logger = stamp_run_id(base_logger, run_id);
636
690
  let stream_events = empty_async_iterable();
637
691
  let close_stream = null;
692
+ let inner = base_logger;
638
693
  if (streaming) {
639
- const channel = create_streaming_channel(logger, high_water_mark);
640
- logger = channel.logger;
694
+ const channel = create_streaming_channel(base_logger, high_water_mark);
695
+ inner = channel.logger;
641
696
  stream_events = channel.events;
642
697
  close_stream = channel.close;
643
698
  }
699
+ const logger = decorate_logger(inner, run_id);
644
700
  const cleanup = create_cleanup_registry(logger);
645
701
  const ctx = {
646
702
  run_id,
@@ -746,20 +802,7 @@ function step(id_or_fn, maybe_fn, meta) {
746
802
  run: maybe_fn
747
803
  };
748
804
  }
749
- register_kind("step", async (flow, input, ctx) => {
750
- const span_id = ctx.trajectory.start_span("step", { id: flow.id });
751
- try {
752
- const output = await flow.run(input, ctx);
753
- ctx.trajectory.end_span(span_id, { id: flow.id });
754
- return output;
755
- } catch (err) {
756
- ctx.trajectory.end_span(span_id, {
757
- id: flow.id,
758
- error: err instanceof Error ? err.message : String(err)
759
- });
760
- throw err;
761
- }
762
- });
805
+ register_traced_kind("step");
763
806
  //#endregion
764
807
  //#region packages/core/src/describe.ts
765
808
  /**
@@ -927,7 +970,10 @@ function sequence(children, options) {
927
970
  const children_ref = children;
928
971
  const run_fn = async (input, ctx) => {
929
972
  let acc = input;
930
- for (const child of children_ref) acc = await dispatch_step(child, acc, ctx);
973
+ for (const child of children_ref) {
974
+ throw_if_aborted$2(ctx);
975
+ acc = await dispatch_step(child, acc, ctx);
976
+ }
931
977
  return acc;
932
978
  };
933
979
  const config_meta = options?.name === void 0 ? void 0 : { display_name: options.name };
@@ -939,21 +985,7 @@ function sequence(children, options) {
939
985
  run: run_fn
940
986
  };
941
987
  }
942
- register_kind("sequence", async (flow, input, ctx) => {
943
- const label = resolve_span_label(flow, "sequence");
944
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
945
- try {
946
- const out = await flow.run(input, ctx);
947
- ctx.trajectory.end_span(span_id, { id: flow.id });
948
- return out;
949
- } catch (err) {
950
- ctx.trajectory.end_span(span_id, {
951
- id: flow.id,
952
- error: err instanceof Error ? err.message : String(err)
953
- });
954
- throw err;
955
- }
956
- });
988
+ register_traced_kind("sequence");
957
989
  //#endregion
958
990
  //#region packages/core/src/parallel.ts
959
991
  /**
@@ -968,6 +1000,11 @@ register_kind("sequence", async (flow, input, ctx) => {
968
1000
  * abort the composer awaits all in-flight children (success, failure, or
969
1001
  * aborted) before rethrowing `ctx.abort.reason`. This matches the
970
1002
  * "agent-pattern" composer contract in spec.md §6.8.
1003
+ *
1004
+ * When several children fail, a `suspended_error` is preferred over an
1005
+ * application error so a human-approval gate inside a branch stays resumable
1006
+ * rather than being masked by a sibling's failure. Otherwise the first error
1007
+ * in declared order propagates.
971
1008
  */
972
1009
  let parallel_counter = 0;
973
1010
  function next_id$9() {
@@ -1013,7 +1050,23 @@ function parallel(members, options) {
1013
1050
  const reason = ctx.abort.reason;
1014
1051
  throw reason instanceof Error ? reason : new aborted_error("aborted", { reason });
1015
1052
  }
1016
- for (const s of settled) if (s.status === "err") throw s.err;
1053
+ let first_err;
1054
+ let has_err = false;
1055
+ let suspended;
1056
+ let has_suspended = false;
1057
+ for (const s of settled) {
1058
+ if (s.status !== "err") continue;
1059
+ if (!has_err) {
1060
+ first_err = s.err;
1061
+ has_err = true;
1062
+ }
1063
+ if (!has_suspended && s.err instanceof suspended_error) {
1064
+ suspended = s.err;
1065
+ has_suspended = true;
1066
+ }
1067
+ }
1068
+ if (has_suspended) throw suspended;
1069
+ if (has_err) throw first_err;
1017
1070
  const out = {};
1018
1071
  for (const s of settled) if (s.status === "ok") out[s.key] = s.value;
1019
1072
  return out;
@@ -1031,21 +1084,7 @@ function parallel(members, options) {
1031
1084
  run: run_fn
1032
1085
  };
1033
1086
  }
1034
- register_kind("parallel", async (flow, input, ctx) => {
1035
- const label = resolve_span_label(flow, "parallel");
1036
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1037
- try {
1038
- const out = await flow.run(input, ctx);
1039
- ctx.trajectory.end_span(span_id, { id: flow.id });
1040
- return out;
1041
- } catch (err) {
1042
- ctx.trajectory.end_span(span_id, {
1043
- id: flow.id,
1044
- error: err instanceof Error ? err.message : String(err)
1045
- });
1046
- throw err;
1047
- }
1048
- });
1087
+ register_traced_kind("parallel");
1049
1088
  //#endregion
1050
1089
  //#region packages/core/src/branch.ts
1051
1090
  /**
@@ -1082,21 +1121,7 @@ function branch(config) {
1082
1121
  run: run_fn
1083
1122
  };
1084
1123
  }
1085
- register_kind("branch", async (flow, input, ctx) => {
1086
- const label = resolve_span_label(flow, "branch");
1087
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1088
- try {
1089
- const out = await flow.run(input, ctx);
1090
- ctx.trajectory.end_span(span_id, { id: flow.id });
1091
- return out;
1092
- } catch (err) {
1093
- ctx.trajectory.end_span(span_id, {
1094
- id: flow.id,
1095
- error: err instanceof Error ? err.message : String(err)
1096
- });
1097
- throw err;
1098
- }
1099
- });
1124
+ register_traced_kind("branch");
1100
1125
  //#endregion
1101
1126
  //#region packages/core/src/map.ts
1102
1127
  /**
@@ -1184,21 +1209,7 @@ function map(config) {
1184
1209
  run: run_fn
1185
1210
  };
1186
1211
  }
1187
- register_kind("map", async (flow, input, ctx) => {
1188
- const label = resolve_span_label(flow, "map");
1189
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1190
- try {
1191
- const out = await flow.run(input, ctx);
1192
- ctx.trajectory.end_span(span_id, { id: flow.id });
1193
- return out;
1194
- } catch (err) {
1195
- ctx.trajectory.end_span(span_id, {
1196
- id: flow.id,
1197
- error: err instanceof Error ? err.message : String(err)
1198
- });
1199
- throw err;
1200
- }
1201
- });
1212
+ register_traced_kind("map");
1202
1213
  //#endregion
1203
1214
  //#region packages/core/src/pipe.ts
1204
1215
  /**
@@ -1229,30 +1240,21 @@ function pipe(inner, fn, options) {
1229
1240
  run: run_fn
1230
1241
  };
1231
1242
  }
1232
- register_kind("pipe", async (flow, input, ctx) => {
1233
- const label = resolve_span_label(flow, "pipe");
1234
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1235
- try {
1236
- const out = await flow.run(input, ctx);
1237
- ctx.trajectory.end_span(span_id, { id: flow.id });
1238
- return out;
1239
- } catch (err) {
1240
- ctx.trajectory.end_span(span_id, {
1241
- id: flow.id,
1242
- error: err instanceof Error ? err.message : String(err)
1243
- });
1244
- throw err;
1245
- }
1246
- });
1243
+ register_traced_kind("pipe");
1247
1244
  //#endregion
1248
1245
  //#region packages/core/src/retry.ts
1249
1246
  /**
1250
1247
  * retry: re-run on failure.
1251
1248
  *
1252
1249
  * `retry(inner, { max_attempts, backoff_ms?, on_error? })` runs `inner`. If it
1253
- * throws, retries up to `max_attempts - 1` more times with exponential backoff
1254
- * (`backoff_ms * 2^(attempt-1)`). `on_error` is called on every failure. The
1255
- * last error is rethrown if all attempts fail.
1250
+ * throws an application error, retries up to `max_attempts - 1` more times with
1251
+ * exponential backoff (`backoff_ms * 2^(attempt-1)`). `on_error` is called on
1252
+ * every such failure. The last error is rethrown if all attempts fail.
1253
+ *
1254
+ * Control-flow signals (`suspended_error`, `aborted_error`) are not failures:
1255
+ * they propagate immediately without consuming an attempt, firing `on_error`,
1256
+ * or scheduling a backoff. A suspend's `on()` side effect therefore runs once
1257
+ * per run, not once per attempt.
1256
1258
  *
1257
1259
  * Cancellation / cleanup (constraints.md §5.2, spec.md §6.8): cleanup handlers
1258
1260
  * registered by the inner step accumulate across attempts. The parent
@@ -1300,6 +1302,7 @@ function retry(inner, config) {
1300
1302
  try {
1301
1303
  return await dispatch_step(inner, input, ctx);
1302
1304
  } catch (err) {
1305
+ if (is_control_flow_error(err)) throw err;
1303
1306
  last_err = err;
1304
1307
  if (on_error) on_error(err, attempt);
1305
1308
  if (attempt >= max_attempts) break;
@@ -1322,29 +1325,18 @@ function retry(inner, config) {
1322
1325
  run: run_fn
1323
1326
  };
1324
1327
  }
1325
- register_kind("retry", async (flow, input, ctx) => {
1326
- const label = resolve_span_label(flow, "retry");
1327
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1328
- try {
1329
- const out = await flow.run(input, ctx);
1330
- ctx.trajectory.end_span(span_id, { id: flow.id });
1331
- return out;
1332
- } catch (err) {
1333
- ctx.trajectory.end_span(span_id, {
1334
- id: flow.id,
1335
- error: err instanceof Error ? err.message : String(err)
1336
- });
1337
- throw err;
1338
- }
1339
- });
1328
+ register_traced_kind("retry");
1340
1329
  //#endregion
1341
1330
  //#region packages/core/src/fallback.ts
1342
1331
  /**
1343
1332
  * fallback: primary-or-backup.
1344
1333
  *
1345
- * `fallback(primary, backup)` runs `primary`. If it throws, runs `backup`
1346
- * with the same input. If `backup` also throws, the `backup` error
1347
- * propagates. See spec.md §5.8.
1334
+ * `fallback(primary, backup)` runs `primary`. If it throws an application
1335
+ * error, runs `backup` with the same input. If `backup` also throws, the
1336
+ * `backup` error propagates. Control-flow signals (`suspended_error`,
1337
+ * `aborted_error`) are not failures: they propagate instead of triggering the
1338
+ * backup, so a human-approval gate is never silently bypassed and the backup
1339
+ * never runs under an aborted context. See spec.md §5.8.
1348
1340
  */
1349
1341
  let fallback_counter = 0;
1350
1342
  function next_id$4() {
@@ -1356,7 +1348,8 @@ function fallback(primary, backup, options) {
1356
1348
  const run_fn = async (input, ctx) => {
1357
1349
  try {
1358
1350
  return await dispatch_step(primary, input, ctx);
1359
- } catch {
1351
+ } catch (err) {
1352
+ if (is_control_flow_error(err)) throw err;
1360
1353
  return dispatch_step(backup, input, ctx);
1361
1354
  }
1362
1355
  };
@@ -1369,21 +1362,7 @@ function fallback(primary, backup, options) {
1369
1362
  run: run_fn
1370
1363
  };
1371
1364
  }
1372
- register_kind("fallback", async (flow, input, ctx) => {
1373
- const label = resolve_span_label(flow, "fallback");
1374
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1375
- try {
1376
- const out = await flow.run(input, ctx);
1377
- ctx.trajectory.end_span(span_id, { id: flow.id });
1378
- return out;
1379
- } catch (err) {
1380
- ctx.trajectory.end_span(span_id, {
1381
- id: flow.id,
1382
- error: err instanceof Error ? err.message : String(err)
1383
- });
1384
- throw err;
1385
- }
1386
- });
1365
+ register_traced_kind("fallback");
1387
1366
  //#endregion
1388
1367
  //#region packages/core/src/timeout.ts
1389
1368
  /**
@@ -1450,21 +1429,7 @@ function timeout(inner, ms, options) {
1450
1429
  run: run_fn
1451
1430
  };
1452
1431
  }
1453
- register_kind("timeout", async (flow, input, ctx) => {
1454
- const label = resolve_span_label(flow, "timeout");
1455
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1456
- try {
1457
- const out = await flow.run(input, ctx);
1458
- ctx.trajectory.end_span(span_id, { id: flow.id });
1459
- return out;
1460
- } catch (err) {
1461
- ctx.trajectory.end_span(span_id, {
1462
- id: flow.id,
1463
- error: err instanceof Error ? err.message : String(err)
1464
- });
1465
- throw err;
1466
- }
1467
- });
1432
+ register_traced_kind("timeout");
1468
1433
  //#endregion
1469
1434
  //#region packages/core/src/loop.ts
1470
1435
  /**
@@ -1491,11 +1456,6 @@ function next_id$2(name) {
1491
1456
  loop_counter += 1;
1492
1457
  return `${name ?? "loop"}_${loop_counter}`;
1493
1458
  }
1494
- function throw_if_aborted$2(ctx) {
1495
- if (!ctx.abort.aborted) return;
1496
- const reason = ctx.abort.reason;
1497
- throw reason instanceof Error ? reason : new aborted_error("aborted", { reason });
1498
- }
1499
1459
  function loop(config) {
1500
1460
  const { init, body, guard, finish, name } = config;
1501
1461
  const rounds_limit = Math.max(1, Math.floor(config.max_rounds));
@@ -1534,21 +1494,7 @@ function loop(config) {
1534
1494
  run: run_fn
1535
1495
  };
1536
1496
  }
1537
- register_kind("loop", async (flow, input, ctx) => {
1538
- const label = resolve_span_label(flow, "loop");
1539
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1540
- try {
1541
- const out = await flow.run(input, ctx);
1542
- ctx.trajectory.end_span(span_id, { id: flow.id });
1543
- return out;
1544
- } catch (err) {
1545
- ctx.trajectory.end_span(span_id, {
1546
- id: flow.id,
1547
- error: err instanceof Error ? err.message : String(err)
1548
- });
1549
- throw err;
1550
- }
1551
- });
1497
+ register_traced_kind("loop");
1552
1498
  //#endregion
1553
1499
  //#region packages/core/src/compose.ts
1554
1500
  /**
@@ -1583,21 +1529,7 @@ function compose(name, inner) {
1583
1529
  run: run_fn
1584
1530
  };
1585
1531
  }
1586
- register_kind("compose", async (flow, input, ctx) => {
1587
- const label = resolve_span_label(flow, "compose");
1588
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1589
- try {
1590
- const out = await flow.run(input, ctx);
1591
- ctx.trajectory.end_span(span_id, { id: flow.id });
1592
- return out;
1593
- } catch (err) {
1594
- ctx.trajectory.end_span(span_id, {
1595
- id: flow.id,
1596
- error: err instanceof Error ? err.message : String(err)
1597
- });
1598
- throw err;
1599
- }
1600
- });
1532
+ register_traced_kind("compose");
1601
1533
  //#endregion
1602
1534
  //#region packages/core/src/checkpoint.ts
1603
1535
  /**
@@ -1651,21 +1583,7 @@ function checkpoint(inner, config) {
1651
1583
  run: run_fn
1652
1584
  };
1653
1585
  }
1654
- register_kind("checkpoint", async (flow, input, ctx) => {
1655
- const label = resolve_span_label(flow, "checkpoint");
1656
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1657
- try {
1658
- const out = await flow.run(input, ctx);
1659
- ctx.trajectory.end_span(span_id, { id: flow.id });
1660
- return out;
1661
- } catch (err) {
1662
- ctx.trajectory.end_span(span_id, {
1663
- id: flow.id,
1664
- error: err instanceof Error ? err.message : String(err)
1665
- });
1666
- throw err;
1667
- }
1668
- });
1586
+ register_traced_kind("checkpoint");
1669
1587
  //#endregion
1670
1588
  //#region packages/core/src/suspend.ts
1671
1589
  /**
@@ -1717,21 +1635,7 @@ function suspend(config) {
1717
1635
  run: run_fn
1718
1636
  };
1719
1637
  }
1720
- register_kind("suspend", async (flow, input, ctx) => {
1721
- const label = resolve_span_label(flow, "suspend");
1722
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1723
- try {
1724
- const out = await flow.run(input, ctx);
1725
- ctx.trajectory.end_span(span_id, { id: flow.id });
1726
- return out;
1727
- } catch (err) {
1728
- ctx.trajectory.end_span(span_id, {
1729
- id: flow.id,
1730
- error: err instanceof Error ? err.message : String(err)
1731
- });
1732
- throw err;
1733
- }
1734
- });
1638
+ register_traced_kind("suspend");
1735
1639
  //#endregion
1736
1640
  //#region packages/core/src/scope.ts
1737
1641
  /**
@@ -1779,7 +1683,10 @@ function scope(children, options) {
1779
1683
  state: local
1780
1684
  };
1781
1685
  let acc = input;
1782
- for (const child of children_ref) acc = await dispatch_step(child, acc, scope_ctx);
1686
+ for (const child of children_ref) {
1687
+ throw_if_aborted$2(scope_ctx);
1688
+ acc = await dispatch_step(child, acc, scope_ctx);
1689
+ }
1783
1690
  return acc;
1784
1691
  };
1785
1692
  const config_meta = options?.name === void 0 ? void 0 : { display_name: options.name };
@@ -1826,51 +1733,9 @@ function use(keys, fn, options) {
1826
1733
  run: run_fn
1827
1734
  };
1828
1735
  }
1829
- register_kind("scope", async (flow, input, ctx) => {
1830
- const label = resolve_span_label(flow, "scope");
1831
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1832
- try {
1833
- const out = await flow.run(input, ctx);
1834
- ctx.trajectory.end_span(span_id, { id: flow.id });
1835
- return out;
1836
- } catch (err) {
1837
- ctx.trajectory.end_span(span_id, {
1838
- id: flow.id,
1839
- error: err instanceof Error ? err.message : String(err)
1840
- });
1841
- throw err;
1842
- }
1843
- });
1844
- register_kind("stash", async (flow, input, ctx) => {
1845
- const label = resolve_span_label(flow, "stash");
1846
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1847
- try {
1848
- const out = await flow.run(input, ctx);
1849
- ctx.trajectory.end_span(span_id, { id: flow.id });
1850
- return out;
1851
- } catch (err) {
1852
- ctx.trajectory.end_span(span_id, {
1853
- id: flow.id,
1854
- error: err instanceof Error ? err.message : String(err)
1855
- });
1856
- throw err;
1857
- }
1858
- });
1859
- register_kind("use", async (flow, input, ctx) => {
1860
- const label = resolve_span_label(flow, "use");
1861
- const span_id = ctx.trajectory.start_span(label, { id: flow.id });
1862
- try {
1863
- const out = await flow.run(input, ctx);
1864
- ctx.trajectory.end_span(span_id, { id: flow.id });
1865
- return out;
1866
- } catch (err) {
1867
- ctx.trajectory.end_span(span_id, {
1868
- id: flow.id,
1869
- error: err instanceof Error ? err.message : String(err)
1870
- });
1871
- throw err;
1872
- }
1873
- });
1736
+ register_traced_kind("scope");
1737
+ register_traced_kind("stash");
1738
+ register_traced_kind("use");
1874
1739
  //#endregion
1875
1740
  //#region packages/core/src/step_kinds.ts
1876
1741
  /**
@@ -1950,7 +1815,7 @@ const trajectory_event_schema = z.union([
1950
1815
  ]);
1951
1816
  //#endregion
1952
1817
  //#region packages/core/src/version.ts
1953
- const version = "0.5.0";
1818
+ const version = "0.6.3";
1954
1819
  //#endregion
1955
1820
  //#region packages/core/src/index.ts
1956
1821
  /**
@@ -2599,171 +2464,6 @@ function tournament(config) {
2599
2464
  return compose(config.name ?? "tournament", inner);
2600
2465
  }
2601
2466
  //#endregion
2602
- //#region packages/observability/src/filesystem.ts
2603
- /**
2604
- * Filesystem JSONL trajectory logger.
2605
- *
2606
- * Appends one JSON object per line to a configured output file. `start_span`
2607
- * and `end_span` each emit a line; `record` emits a line with the event as
2608
- * written. Hierarchical span ids are tracked via an in-memory stack: when
2609
- * `start_span` fires, the innermost still-open span's id is attached as
2610
- * `parent_span_id` on the new span's record. This is best-effort for
2611
- * concurrent children (two siblings spawned from the same parent will see
2612
- * whichever opened most recently as their parent until proper async-context
2613
- * propagation is wired). Two concurrent `run(...)` calls that pass distinct
2614
- * logger instances (constructed with distinct `output_path`s) share nothing.
2615
- *
2616
- * Paths are accepted at construction; the logger never reads `process.env`.
2617
- */
2618
- function filesystem_logger(options) {
2619
- const { output_path } = options;
2620
- mkdirSync(dirname(output_path), { recursive: true });
2621
- const stack = [];
2622
- const write_line = (event) => {
2623
- appendFileSync(output_path, `${JSON.stringify(event)}\n`);
2624
- };
2625
- const start_span = (name, meta) => {
2626
- const span_id = `${name}:${randomUUID().slice(0, 8)}`;
2627
- const parent_span_id = stack.length > 0 ? stack[stack.length - 1] : void 0;
2628
- const event = {
2629
- kind: "span_start",
2630
- span_id,
2631
- name,
2632
- ...meta
2633
- };
2634
- if (parent_span_id !== void 0) event["parent_span_id"] = parent_span_id;
2635
- write_line(event);
2636
- stack.push(span_id);
2637
- return span_id;
2638
- };
2639
- const end_span = (id, meta) => {
2640
- write_line({
2641
- kind: "span_end",
2642
- span_id: id,
2643
- ...meta
2644
- });
2645
- const idx = stack.lastIndexOf(id);
2646
- if (idx !== -1) stack.splice(idx, 1);
2647
- };
2648
- const record = (event) => {
2649
- write_line({ ...event });
2650
- };
2651
- return {
2652
- record,
2653
- start_span,
2654
- end_span
2655
- };
2656
- }
2657
- //#endregion
2658
- //#region packages/observability/src/http.ts
2659
- /**
2660
- * HTTP push trajectory logger.
2661
- *
2662
- * Conforms to `TrajectoryLogger`. POSTs each event as a single line of
2663
- * newline-delimited JSON to a configured URL. Pairs naturally with the
2664
- * fascicle viewer's `/api/ingest` endpoint, but is a generic adapter — the
2665
- * receiver can be anything that accepts NDJSON over HTTP.
2666
- *
2667
- * Failure policy: drop on transport error and invoke the optional `on_error`
2668
- * callback. Never throws, never blocks the user's flow on a dev tool being
2669
- * up. The flow always wins; the viewer is best-effort.
2670
- *
2671
- * Hierarchical span ids are tracked in-process, mirroring `filesystem_logger`
2672
- * so the wire format is identical.
2673
- */
2674
- const default_fetch = async (url, init) => {
2675
- const res = await fetch(url, init);
2676
- return {
2677
- ok: res.ok,
2678
- status: res.status
2679
- };
2680
- };
2681
- function http_logger(options) {
2682
- const { url, on_error } = options;
2683
- const send = options.fetch ?? default_fetch;
2684
- const stack = [];
2685
- const post = (event) => {
2686
- send(url, {
2687
- method: "POST",
2688
- headers: { "content-type": "application/x-ndjson" },
2689
- body: `${JSON.stringify(event)}\n`
2690
- }).then((res) => {
2691
- if (!res.ok && on_error) on_error(/* @__PURE__ */ new Error(`http_logger: POST ${url} -> ${res.status}`));
2692
- }).catch((err) => {
2693
- if (on_error) on_error(err);
2694
- });
2695
- };
2696
- const start_span = (name, meta) => {
2697
- const span_id = `${name}:${randomUUID().slice(0, 8)}`;
2698
- const parent_span_id = stack.length > 0 ? stack[stack.length - 1] : void 0;
2699
- const event = {
2700
- kind: "span_start",
2701
- span_id,
2702
- name,
2703
- ...meta
2704
- };
2705
- if (parent_span_id !== void 0) event["parent_span_id"] = parent_span_id;
2706
- post(event);
2707
- stack.push(span_id);
2708
- return span_id;
2709
- };
2710
- const end_span = (id, meta) => {
2711
- post({
2712
- kind: "span_end",
2713
- span_id: id,
2714
- ...meta
2715
- });
2716
- const idx = stack.lastIndexOf(id);
2717
- if (idx !== -1) stack.splice(idx, 1);
2718
- };
2719
- const record = (event) => {
2720
- post({ ...event });
2721
- };
2722
- return {
2723
- record,
2724
- start_span,
2725
- end_span
2726
- };
2727
- }
2728
- //#endregion
2729
- //#region packages/observability/src/tee.ts
2730
- function tee_logger(...loggers) {
2731
- if (loggers.length === 0) throw new Error("tee_logger: at least one logger required");
2732
- const id_map = /* @__PURE__ */ new Map();
2733
- const safe_each = (fn) => {
2734
- for (let i = 0; i < loggers.length; i += 1) {
2735
- const l = loggers[i];
2736
- if (l === void 0) continue;
2737
- try {
2738
- fn(l, i);
2739
- } catch {}
2740
- }
2741
- };
2742
- return {
2743
- record: (event) => {
2744
- safe_each((l) => l.record(event));
2745
- },
2746
- start_span: (name, meta) => {
2747
- const ids = [];
2748
- safe_each((l) => {
2749
- ids.push(l.start_span(name, meta));
2750
- });
2751
- const canonical = ids[0] ?? `${name}:tee`;
2752
- if (loggers.length > 1) id_map.set(canonical, ids);
2753
- return canonical;
2754
- },
2755
- end_span: (id, meta) => {
2756
- const ids = id_map.get(id);
2757
- if (ids === void 0) {
2758
- safe_each((l) => l.end_span(id, meta));
2759
- return;
2760
- }
2761
- id_map.delete(id);
2762
- safe_each((l, idx) => l.end_span(ids[idx] ?? id, meta));
2763
- }
2764
- };
2765
- }
2766
- //#endregion
2767
2467
  //#region packages/composites/src/bench.ts
2768
2468
  /**
2769
2469
  * bench: run a flow against a fixture set, score each result, return a report.
@@ -3205,7 +2905,7 @@ function validate_report(value, path) {
3205
2905
  }
3206
2906
  //#endregion
3207
2907
  //#region packages/engine/src/version.ts
3208
- const version$1 = "0.5.0";
2908
+ const version$1 = "0.6.3";
3209
2909
  //#endregion
3210
2910
  //#region packages/engine/src/errors.ts
3211
2911
  var rate_limit_error = class extends Error {
@@ -3745,7 +3445,7 @@ function translate_anthropic_effort(effort) {
3745
3445
  return {
3746
3446
  provider_options: { anthropic: { thinking: {
3747
3447
  type: "enabled",
3748
- budget_tokens: budget
3448
+ budgetTokens: budget
3749
3449
  } } },
3750
3450
  effort_ignored: false
3751
3451
  };
@@ -3832,11 +3532,11 @@ const create_openai_adapter = (init) => {
3832
3532
  //#endregion
3833
3533
  //#region packages/engine/src/providers/google.ts
3834
3534
  const GOOGLE_THINKING_BUDGET = {
3835
- low: "low",
3836
- medium: "medium",
3837
- high: "high",
3838
- xhigh: "high",
3839
- max: "high"
3535
+ low: 1024,
3536
+ medium: 8192,
3537
+ high: 24576,
3538
+ xhigh: 32768,
3539
+ max: 32768
3840
3540
  };
3841
3541
  function translate_google_effort(effort) {
3842
3542
  if (effort === "none") return {
@@ -4204,7 +3904,7 @@ function build_bwrap_args(binary, sandbox) {
4204
3904
  if (allowlist.length > 0) {
4205
3905
  args.push("--share-net");
4206
3906
  for (const host of allowlist) args.push("--setenv", "CLAUDE_CLI_NET_ALLOW", host);
4207
- }
3907
+ } else args.push("--unshare-net");
4208
3908
  const write_paths = sandbox.additional_write_paths ?? [];
4209
3909
  for (const p of write_paths) args.push("--bind", p, p);
4210
3910
  args.push("--");
@@ -4973,6 +4673,7 @@ function tool_call_record(step_index, call, results, now) {
4973
4673
  }
4974
4674
  function build_generate_result(input) {
4975
4675
  const { parsed, resolved } = input;
4676
+ if (parsed.is_error) throw new claude_cli_error("result_error", parsed.final_text.length > 0 ? parsed.final_text : "claude_cli returned an error result");
4976
4677
  const turns = normalize_turns(parsed);
4977
4678
  const now = Date.now();
4978
4679
  const turn_usages = turns.map((t) => ({
@@ -5166,6 +4867,57 @@ function record_tool_call(trajectory, meta) {
5166
4867
  ...event
5167
4868
  });
5168
4869
  }
4870
+ /**
4871
+ * Record a resolved tool call's result. `record_tool_call` captures the request
4872
+ * (input); without this event a successful tool's output never reaches the
4873
+ * trajectory, leaving the run record blind to what tools actually returned.
4874
+ */
4875
+ function record_tool_result(trajectory, meta) {
4876
+ if (trajectory === void 0) return;
4877
+ const event = {
4878
+ kind: "tool_result",
4879
+ step_index: meta.step_index,
4880
+ name: meta.name,
4881
+ tool_call_id: meta.tool_call_id,
4882
+ duration_ms: meta.duration_ms
4883
+ };
4884
+ if (meta.error !== void 0) event["error"] = meta.error;
4885
+ else event["output"] = meta.output;
4886
+ trajectory.record({
4887
+ kind: "tool_result",
4888
+ ...event
4889
+ });
4890
+ }
4891
+ /**
4892
+ * Wrap a logger so engine events carry a `ts` (epoch milliseconds) even when
4893
+ * generate is called directly with a caller-supplied logger rather than through
4894
+ * the core runner. When the logger is already runner-decorated, the existing
4895
+ * `ts` is preserved. Private to the engine to avoid widening the public surface.
4896
+ */
4897
+ function stamp_ts(meta) {
4898
+ const out = { ...meta };
4899
+ if (!("ts" in out)) out["ts"] = Date.now();
4900
+ return out;
4901
+ }
4902
+ function with_timestamps(inner) {
4903
+ if (inner === void 0) return void 0;
4904
+ return {
4905
+ record: (event) => {
4906
+ if ("ts" in event) {
4907
+ inner.record(event);
4908
+ return;
4909
+ }
4910
+ inner.record({
4911
+ ...event,
4912
+ ts: Date.now()
4913
+ });
4914
+ },
4915
+ start_span: (name, meta) => inner.start_span(name, stamp_ts(meta)),
4916
+ end_span: (id, meta) => {
4917
+ inner.end_span(id, stamp_ts(meta));
4918
+ }
4919
+ };
4920
+ }
5169
4921
  function record_cost(trajectory, step_index, cost, source) {
5170
4922
  if (trajectory === void 0) return;
5171
4923
  const event = {
@@ -5378,7 +5130,7 @@ function create_claude_cli_adapter(init) {
5378
5130
  async generate(opts, resolved) {
5379
5131
  if (disposed) throw new engine_disposed_error();
5380
5132
  if (opts.abort?.aborted === true) throw new aborted_error("aborted", { reason: opts.abort.reason });
5381
- const trajectory = opts.trajectory;
5133
+ const trajectory = with_timestamps(opts.trajectory);
5382
5134
  const call_opts = extract_call_opts(opts);
5383
5135
  const option_ignored = create_option_ignored_dedup(trajectory);
5384
5136
  if (opts.max_steps !== void 0) option_ignored.emit("max_steps", PROVIDER_NAME);
@@ -6083,6 +5835,13 @@ async function run_tool_loop(config) {
6083
5835
  });
6084
5836
  await dispatch_tool_result_chunk(config.dispatch_chunk, step_index, raw_call.id, output);
6085
5837
  }
5838
+ for (const r of step_tool_records) record_tool_result(config.trajectory, {
5839
+ step_index,
5840
+ name: r.name,
5841
+ tool_call_id: r.id,
5842
+ duration_ms: r.duration_ms,
5843
+ ...r.error !== void 0 ? { error: r.error } : { output: r.output }
5844
+ });
6086
5845
  for (const m of tool_results_to_feed) config.messages.push(m);
6087
5846
  const turn_finish_reason = would_exceed_after ? "max_steps" : turn.finish_reason;
6088
5847
  const step_record = {
@@ -6262,6 +6021,39 @@ function to_sdk_messages(messages) {
6262
6021
  }
6263
6022
  return out;
6264
6023
  }
6024
+ /**
6025
+ * Hoist a leading run of system messages out of the SDK message list into the
6026
+ * AI SDK's top-level `system` option.
6027
+ *
6028
+ * Passing a `role: 'system'` entry inside `messages` makes the AI SDK treat it
6029
+ * as potentially attacker-controlled: it warns on every call (and newer `ai`
6030
+ * versions throw unless `allowSystemInMessages` is set). fascicle's system
6031
+ * content is the developer's own prompt, and the SDK's own recommendation is to
6032
+ * deliver it through the top-level `system` option, which removes the warning
6033
+ * at its source rather than suppressing it.
6034
+ *
6035
+ * Only the *leading* run is hoisted (fascicle's only shape: one or more system
6036
+ * messages, then the conversation). A system message that appears after a
6037
+ * non-system message keeps its position rather than being silently reordered to
6038
+ * the top, and the original list is returned untouched when hoisting would leave
6039
+ * `messages` empty, since the SDK rejects an empty messages array.
6040
+ */
6041
+ function split_leading_system(messages) {
6042
+ let run_end = 0;
6043
+ const system_parts = [];
6044
+ while (run_end < messages.length) {
6045
+ const m = messages[run_end];
6046
+ if (m?.role !== "system") break;
6047
+ system_parts.push(m.content);
6048
+ run_end += 1;
6049
+ }
6050
+ const rest = messages.slice(run_end);
6051
+ if (system_parts.length === 0 || rest.length === 0) return { messages: [...messages] };
6052
+ return {
6053
+ system: system_parts.join("\n\n"),
6054
+ messages: rest
6055
+ };
6056
+ }
6265
6057
  function to_sdk_tools(tools) {
6266
6058
  if (tools.length === 0) return void 0;
6267
6059
  const entries = {};
@@ -6434,7 +6226,7 @@ async function generate(opts_in, engine) {
6434
6226
  const adapter = engine.adapters.get(target.provider);
6435
6227
  if (adapter === void 0) throw new provider_not_configured_error(target.provider);
6436
6228
  if (adapter.kind === "subprocess") return adapter.generate(opts, target);
6437
- const trajectory = opts.trajectory;
6229
+ const trajectory = with_timestamps(opts.trajectory);
6438
6230
  const on_chunk_provided = opts.on_chunk !== void 0;
6439
6231
  const tools_list = opts.tools ?? [];
6440
6232
  if (opts.schema !== void 0 && !adapter.supports("schema")) throw new provider_capability_error(target.provider, "schema");
@@ -6443,7 +6235,8 @@ async function generate(opts_in, engine) {
6443
6235
  const effort = opts.effort ?? engine.default_effort;
6444
6236
  const effort_translation = adapter.translate_effort(effort);
6445
6237
  if (effort !== "none" && effort_translation.effort_ignored) record_effort_ignored(trajectory, target.model_id);
6446
- const provider_options = Object.keys(effort_translation.provider_options).length > 0 ? effort_translation.provider_options : void 0;
6238
+ const combined_provider_options = merge_provider_options(effort_translation.provider_options, opts.provider_options);
6239
+ const provider_options = combined_provider_options !== void 0 && Object.keys(combined_provider_options).length > 0 ? combined_provider_options : void 0;
6447
6240
  const abort = opts.abort ?? new AbortController().signal;
6448
6241
  const max_steps = opts.max_steps ?? engine.default_max_steps;
6449
6242
  const tool_error_policy = opts.tool_error_policy ?? engine.default_tool_error_policy ?? "feed_back";
@@ -6493,12 +6286,14 @@ async function generate(opts_in, engine) {
6493
6286
  };
6494
6287
  if (args.abort.aborted) internal_controller.abort(args.abort.reason);
6495
6288
  else args.abort.addEventListener("abort", cancel_on_user_abort, { once: true });
6289
+ const { system: hoisted_system, messages: sdk_messages } = split_leading_system(to_sdk_messages(args.messages));
6496
6290
  const base_params = {
6497
6291
  model,
6498
- messages: to_sdk_messages(args.messages),
6292
+ messages: sdk_messages,
6499
6293
  abortSignal: internal_controller.signal,
6500
6294
  stopWhen: stepCountIs(1)
6501
6295
  };
6296
+ if (hoisted_system !== void 0) base_params.system = hoisted_system;
6502
6297
  if (sdk_tools !== void 0) base_params.tools = sdk_tools;
6503
6298
  if (provider_options !== void 0) base_params.providerOptions = provider_options;
6504
6299
  if (opts.temperature !== void 0) base_params.temperature = opts.temperature;
@@ -6769,6 +6564,38 @@ function create_engine(config) {
6769
6564
  * plumbing. Cost events flow out via ctx.trajectory per the engine's own
6770
6565
  * emission rules (constraints §5.3).
6771
6566
  */
6567
+ /**
6568
+ * Wrap the run's trajectory so the engine's own spans (engine.generate and its
6569
+ * step spans) nest under the model_call step rather than floating. The wrapper
6570
+ * keeps a private span stack seeded with the model_call step's id, so nesting
6571
+ * is correct and concurrency-safe even when several model_calls run together
6572
+ * under `parallel`/`map` (each invocation builds its own wrapper). A
6573
+ * caller-supplied `parent_span_id` is never overridden.
6574
+ */
6575
+ function engine_trajectory(inner, root_parent) {
6576
+ const stack = root_parent !== void 0 ? [root_parent] : [];
6577
+ return {
6578
+ record: (event) => {
6579
+ inner.record(event);
6580
+ },
6581
+ start_span: (name, meta) => {
6582
+ const has_parent = meta !== void 0 && "parent_span_id" in meta;
6583
+ const parent = stack.length > 0 ? stack[stack.length - 1] : void 0;
6584
+ const next_meta = has_parent || parent === void 0 ? meta : {
6585
+ ...meta,
6586
+ parent_span_id: parent
6587
+ };
6588
+ const id = inner.start_span(name, next_meta);
6589
+ stack.push(id);
6590
+ return id;
6591
+ },
6592
+ end_span: (id, meta) => {
6593
+ inner.end_span(id, meta);
6594
+ const idx = stack.lastIndexOf(id);
6595
+ if (idx !== -1) stack.splice(idx, 1);
6596
+ }
6597
+ };
6598
+ }
6772
6599
  function stable_signature(input) {
6773
6600
  const payload = JSON.stringify({
6774
6601
  model: input.model ?? null,
@@ -6812,7 +6639,7 @@ function model_call(cfg) {
6812
6639
  }]
6813
6640
  }] : [...input],
6814
6641
  abort: ctx.abort,
6815
- trajectory: ctx.trajectory
6642
+ trajectory: engine_trajectory(ctx.trajectory, ctx.parent_span_id)
6816
6643
  };
6817
6644
  if (cfg.model !== void 0) opts.model = cfg.model;
6818
6645
  if (cfg.provider !== void 0) opts.provider = cfg.provider;
@@ -7414,6 +7241,6 @@ function wrap_handle(server, tail, host, port) {
7414
7241
  };
7415
7242
  }
7416
7243
  //#endregion
7417
- export { STEP_KINDS, aborted_error, adversarial, bench, branch, checkpoint, compose, consensus, version as core_version, create_engine, custom_event_schema, describe, describe_cycle_error, emit_event_schema, engine_config_error, version$1 as engine_version, ensemble, ensemble_step, fallback, flow_schema, forward_standard_env, improve, is_step_kind, judge_equals, judge_llm, judge_with, learn, loop, map, model_call, model_not_found_error, normalize_score, on_chunk_error, parallel, pipe, provider_capability_error, provider_error, provider_not_configured_error, rate_limit_error, read_baseline, regression_compare, resume_validation_error, retry, run, run_viewer_cli, schema_validation_error, scope, sequence, span_end_event_schema, span_start_event_schema, start_viewer, stash, step, suspend, suspended_error, timeout, timeout_error, tool_approval_denied_error, tool_error, tournament, trajectory_event_schema, use, write_baseline };
7244
+ export { STEP_KINDS, aborted_error, adversarial, bench, branch, checkpoint, claude_cli_error, compose, consensus, version as core_version, create_engine, custom_event_schema, describe, describe_cycle_error, emit_event_schema, engine_config_error, engine_disposed_error, version$1 as engine_version, ensemble, ensemble_step, fallback, flow_schema, forward_standard_env, improve, is_step_kind, judge_equals, judge_llm, judge_with, learn, loop, map, model_call, model_family_unavailable_error, model_not_found_error, normalize_score, on_chunk_error, parallel, pipe, provider_auth_error, provider_capability_error, provider_error, provider_not_configured_error, rate_limit_error, read_baseline, regression_compare, resume_validation_error, retry, run, run_viewer_cli, schema_validation_error, scope, sequence, span_end_event_schema, span_start_event_schema, start_viewer, stash, step, suspend, suspended_error, timeout, timeout_error, tool_approval_denied_error, tool_error, tournament, trajectory_event_schema, use, write_baseline };
7418
7245
 
7419
7246
  //# sourceMappingURL=index.js.map