fascicle 0.17.3 → 0.17.4
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 +10 -0
- package/dist/AGENTS.md +7 -7
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/agents.d.ts +1 -1
- package/dist/agents.js +1 -1
- package/dist/{core-Dwir3pkb.js → core-Bfzt55Fl.js} +68 -43
- package/dist/core-Bfzt55Fl.js.map +1 -0
- package/dist/diagram_bin.js +1 -1
- package/dist/{engine-DPPqAVdZ.js → engine-CbVdzplI.js} +131 -50
- package/dist/engine-CbVdzplI.js.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +3 -3
- package/dist/{invoke-DF7YLovL.js → invoke-x5SNh9DV.js} +3 -3
- package/dist/{invoke-DF7YLovL.js.map → invoke-x5SNh9DV.js.map} +1 -1
- package/dist/{leading_system-DJvuhESU.js → leading_system-C23TJ9OQ.js} +52 -22
- package/dist/leading_system-C23TJ9OQ.js.map +1 -0
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/stdio.js +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +3 -3
- package/dist/{types-C7pO0jLq.d.ts → types-C23S11Kk.d.ts} +26 -1
- package/dist/viewer.js +1 -1
- package/package.json +1 -1
- package/dist/core-Dwir3pkb.js.map +0 -1
- package/dist/engine-DPPqAVdZ.js.map +0 -1
- package/dist/leading_system-DJvuhESU.js.map +0 -1
package/dist/diagram_bin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as is_step, k as describe } from "./core-Bfzt55Fl.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as validate_schema, D as wait_with_abort, E as compute_backoff, S as format_schema_issues, T as failure_meta, j as aborted_error } from "./core-Bfzt55Fl.js";
|
|
2
2
|
import { n as is_record$1 } from "./records-1HU7mWXf.js";
|
|
3
|
-
import { A as
|
|
3
|
+
import { A as schema_validation_error, C as on_chunk_error, D as provider_not_configured_error, E as provider_error, M as tool_error, N as turn_timeout_error, O as provider_required_error, S as model_required_error, T as provider_capability_error, _ as translate_effort_to_sdk_reasoning, a as invoke_http_turn, b as engine_disposed_error, c as network_failure, d as split_assistant_parts, f as default_normalize_usage, g as resolve_transport, h as normalize_local_usage, i as error_body_message, j as tool_approval_denied_error, k as rate_limit_error, l as parse_tool_call_arguments, m as missing_peer_error, n as consume_framed_stream, p as load_optional_peer, r as create_line_splitter, s as map_messages_by_role, t as split_leading_system_run, u as read_dialect_init, v as claude_cli_error, w as provider_auth_error, x as incomplete_generation_error, y as engine_config_error } from "./leading_system-C23TJ9OQ.js";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { mkdtempSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { tmpdir } from "node:os";
|
|
@@ -414,8 +414,8 @@ function decompose_total_cost(total_cost_usd, usage) {
|
|
|
414
414
|
//#endregion
|
|
415
415
|
//#region src/engine/retry.ts
|
|
416
416
|
const DEFAULT_RETRY = {
|
|
417
|
-
max_attempts:
|
|
418
|
-
initial_delay_ms:
|
|
417
|
+
max_attempts: 4,
|
|
418
|
+
initial_delay_ms: 1e3,
|
|
419
419
|
max_delay_ms: 3e4,
|
|
420
420
|
retry_on: [
|
|
421
421
|
"rate_limit",
|
|
@@ -465,40 +465,60 @@ function to_abort_error(reason) {
|
|
|
465
465
|
return new aborted_error("aborted", { reason });
|
|
466
466
|
}
|
|
467
467
|
/**
|
|
468
|
+
* The message a typed error carries: `lead`, which says what this layer did,
|
|
469
|
+
* then the status when the failure had one, then the provider's own message
|
|
470
|
+
* when it had one, as in `provider_5xx after 4 attempts (status 503): Service
|
|
471
|
+
* Unavailable`. The lead comes first so the message reads the same whether
|
|
472
|
+
* or not the provider said anything.
|
|
473
|
+
*/
|
|
474
|
+
function compose_message(lead, status, message) {
|
|
475
|
+
return `${lead}${status === void 0 ? "" : ` (status ${status})`}${message === void 0 ? "" : `: ${message}`}`;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
468
478
|
* Build the `rate_limit_error` for a 429 that this layer won't retry again.
|
|
469
479
|
* Prefers the failing attempt's own `Retry-After`, falling back to the most
|
|
470
|
-
* recent one a prior attempt carried (`last_rate_limit_after`), and
|
|
471
|
-
*
|
|
480
|
+
* recent one a prior attempt carried (`last_rate_limit_after`), and keeps the
|
|
481
|
+
* failure's original error as its `cause`.
|
|
472
482
|
*/
|
|
473
|
-
function build_rate_limit_error(retryable, attempt, last_rate_limit_after,
|
|
474
|
-
const metadata = {
|
|
483
|
+
function build_rate_limit_error(retryable, attempt, last_rate_limit_after, lead) {
|
|
484
|
+
const metadata = {
|
|
485
|
+
attempts: attempt,
|
|
486
|
+
cause: retryable.cause
|
|
487
|
+
};
|
|
475
488
|
if (retryable.retry_after_ms !== void 0) metadata.retry_after_ms = retryable.retry_after_ms;
|
|
476
489
|
else if (last_rate_limit_after !== void 0) metadata.retry_after_ms = last_rate_limit_after;
|
|
477
490
|
if (retryable.status !== void 0) metadata.status = retryable.status;
|
|
478
|
-
return new rate_limit_error(retryable.message
|
|
491
|
+
return new rate_limit_error(compose_message(lead, retryable.status, retryable.message), metadata);
|
|
479
492
|
}
|
|
480
493
|
/**
|
|
481
494
|
* Build the `provider_error` for a 5xx, network, or timeout failure that this
|
|
482
|
-
* layer won't retry again
|
|
483
|
-
* 5xx carries status/body. The failure's
|
|
495
|
+
* layer won't retry again, after `attempt` failures in all. Timeout collapses
|
|
496
|
+
* onto the `network` cause; only 5xx carries status/body. The failure's
|
|
497
|
+
* original error is its `cause`.
|
|
484
498
|
*/
|
|
485
|
-
function build_provider_error(retryable,
|
|
486
|
-
const metadata = {
|
|
499
|
+
function build_provider_error(retryable, attempt, lead) {
|
|
500
|
+
const metadata = {
|
|
501
|
+
cause_kind: retryable.kind === "provider_5xx" ? "provider_5xx" : "network",
|
|
502
|
+
attempts: attempt,
|
|
503
|
+
cause: retryable.cause
|
|
504
|
+
};
|
|
505
|
+
let status;
|
|
487
506
|
if (retryable.kind === "provider_5xx") {
|
|
488
|
-
|
|
507
|
+
status = retryable.status;
|
|
508
|
+
if (status !== void 0) metadata.status = status;
|
|
489
509
|
if (retryable.body !== void 0) metadata.body = retryable.body;
|
|
490
510
|
}
|
|
491
|
-
return new provider_error(retryable.message
|
|
511
|
+
return new provider_error(compose_message(lead, status, retryable.message), metadata);
|
|
492
512
|
}
|
|
493
513
|
/**
|
|
494
514
|
* Map a classified failure that this layer won't retry again onto the error
|
|
495
515
|
* it rejects with: `rate_limit_error` for 429s, `provider_error` for
|
|
496
|
-
* everything else, after `attempt` failures in all. `
|
|
497
|
-
*
|
|
516
|
+
* everything else, after `attempt` failures in all. `lead` opens the message
|
|
517
|
+
* and says why this layer stopped.
|
|
498
518
|
*/
|
|
499
|
-
function build_typed_error(retryable, attempt, last_rate_limit_after,
|
|
500
|
-
if (retryable.kind === "rate_limit") return build_rate_limit_error(retryable, attempt, last_rate_limit_after,
|
|
501
|
-
return build_provider_error(retryable,
|
|
519
|
+
function build_typed_error(retryable, attempt, last_rate_limit_after, lead) {
|
|
520
|
+
if (retryable.kind === "rate_limit") return build_rate_limit_error(retryable, attempt, last_rate_limit_after, lead);
|
|
521
|
+
return build_provider_error(retryable, attempt, lead);
|
|
502
522
|
}
|
|
503
523
|
/**
|
|
504
524
|
* The error for a failure whose kind `retry_on` leaves out. One that's
|
|
@@ -510,13 +530,14 @@ function build_typed_error(retryable, attempt, last_rate_limit_after, fallback)
|
|
|
510
530
|
*/
|
|
511
531
|
function build_left_out_error(err, retryable, attempt, last_rate_limit_after) {
|
|
512
532
|
if (err instanceof Error) return err;
|
|
513
|
-
return build_typed_error(retryable, attempt, last_rate_limit_after, `${retryable.kind}
|
|
533
|
+
return build_typed_error(retryable, attempt, last_rate_limit_after, `${retryable.kind} left out of retry_on`);
|
|
514
534
|
}
|
|
515
535
|
/**
|
|
516
|
-
* The
|
|
536
|
+
* The lead of an exhausted failure's message, which counts its attempts.
|
|
517
537
|
*/
|
|
518
|
-
function
|
|
519
|
-
|
|
538
|
+
function exhaustion_lead(retryable, attempt) {
|
|
539
|
+
const attempts = attempt === 1 ? "1 attempt" : `${attempt} attempts`;
|
|
540
|
+
return retryable.kind === "rate_limit" ? `rate limited after ${attempts}` : `${retryable.kind} after ${attempts}`;
|
|
520
541
|
}
|
|
521
542
|
/**
|
|
522
543
|
* The server's `Retry-After`, in milliseconds, that a 429 or a 5xx carried,
|
|
@@ -572,13 +593,15 @@ function build_attempt_info(retryable, attempt, delay_ms) {
|
|
|
572
593
|
* An aborted `abort` signal interrupts a pending backoff wait and throws
|
|
573
594
|
* `aborted_error`. Returns the value from the last successful `fn()` call. On
|
|
574
595
|
* exhaustion, throws `rate_limit_error` (for 429s) or `provider_error` (for
|
|
575
|
-
* 5xx/network/timeout)
|
|
596
|
+
* 5xx/network/timeout), counting the attempts, with the last failure's
|
|
597
|
+
* original error as its `cause` and a message that says how many attempts it
|
|
598
|
+
* took before the status and the provider's own message.
|
|
576
599
|
*
|
|
577
600
|
* A failure whose kind `retry_on` leaves out isn't retried. It's rethrown as
|
|
578
601
|
* it is when it's already an `Error`, and a plain record becomes the
|
|
579
602
|
* `rate_limit_error` or `provider_error` that exhaustion would throw for its
|
|
580
|
-
* kind, counting every failure so far in `attempts`, with
|
|
581
|
-
*
|
|
603
|
+
* kind, counting every failure so far in `attempts`, with a message that
|
|
604
|
+
* says `retry_on` leaves its kind out.
|
|
582
605
|
*
|
|
583
606
|
* `on_retry` fires once per retried failure, just before its backoff wait.
|
|
584
607
|
* It does NOT fire for a first attempt that succeeds, a non-retryable
|
|
@@ -603,7 +626,7 @@ async function retry_with_policy(fn, policy = DEFAULT_RETRY, abort, on_retry) {
|
|
|
603
626
|
if (retryable === void 0) throw err;
|
|
604
627
|
attempt += 1;
|
|
605
628
|
if (!is_retryable(retryable.kind, policy)) throw build_left_out_error(err, retryable, attempt, last_rate_limit_after);
|
|
606
|
-
if (attempt >= policy.max_attempts) throw build_typed_error(retryable, attempt, last_rate_limit_after,
|
|
629
|
+
if (attempt >= policy.max_attempts) throw build_typed_error(retryable, attempt, last_rate_limit_after, exhaustion_lead(retryable, attempt));
|
|
607
630
|
const backoff = next_backoff(retryable, backoff_policy, attempt);
|
|
608
631
|
last_rate_limit_after = carry_rate_limit_after(retryable, backoff, last_rate_limit_after);
|
|
609
632
|
on_retry?.(build_attempt_info(retryable, attempt, backoff.delay));
|
|
@@ -674,19 +697,32 @@ function build_retryable_signal(err, kind) {
|
|
|
674
697
|
return base;
|
|
675
698
|
}
|
|
676
699
|
/**
|
|
700
|
+
* Read the retryable shape for a recognized `kind`, or `undefined` for any
|
|
701
|
+
* other.
|
|
702
|
+
*/
|
|
703
|
+
function read_retryable(err) {
|
|
704
|
+
const kind = read_string$1(err, "kind");
|
|
705
|
+
if (kind === "rate_limit") return build_retryable_rate_limit(err);
|
|
706
|
+
if (kind === "provider_5xx") return build_retryable_5xx(err);
|
|
707
|
+
if (kind === "network" || kind === "timeout") return build_retryable_signal(err, kind);
|
|
708
|
+
}
|
|
709
|
+
/**
|
|
677
710
|
* Classify a thrown value into a `RetryableError`, or `undefined` if it
|
|
678
711
|
* does not carry one of the recognized retryable `kind`s.
|
|
679
712
|
*
|
|
680
713
|
* Providers throw plain objects tagged with `kind` (set by
|
|
681
714
|
* `classify_provider_error` in generate.ts); this reads that shape back out
|
|
682
|
-
* field by field rather than trusting it wholesale.
|
|
715
|
+
* field by field rather than trusting it wholesale. The failure's `cause` is
|
|
716
|
+
* what a typed error hands back as its own: the original error that a plain
|
|
717
|
+
* record names as its `cause`, or the thrown value itself when it is already
|
|
718
|
+
* an `Error`, such as `turn_timeout_error`.
|
|
683
719
|
*/
|
|
684
720
|
function classify_retryable(err) {
|
|
685
721
|
if (err === null || typeof err !== "object") return void 0;
|
|
686
|
-
const
|
|
687
|
-
if (
|
|
688
|
-
|
|
689
|
-
|
|
722
|
+
const retryable = read_retryable(err);
|
|
723
|
+
if (retryable === void 0) return void 0;
|
|
724
|
+
retryable.cause = err instanceof Error ? err : Reflect.get(err, "cause");
|
|
725
|
+
return retryable;
|
|
690
726
|
}
|
|
691
727
|
//#endregion
|
|
692
728
|
//#region src/engine/providers/sse_native.ts
|
|
@@ -4497,8 +4533,19 @@ function start_generate_span(trajectory, meta) {
|
|
|
4497
4533
|
return trajectory.start_span("engine.generate", { ...meta });
|
|
4498
4534
|
}
|
|
4499
4535
|
/**
|
|
4536
|
+
* The meta an engine span ends with when its call throws: the message as
|
|
4537
|
+
* `error`, and the status, attempts, cause kind, and `Retry-After` that a
|
|
4538
|
+
* typed provider error carries (see `failure_meta`).
|
|
4539
|
+
*/
|
|
4540
|
+
function error_span_meta(err) {
|
|
4541
|
+
return {
|
|
4542
|
+
error: err instanceof Error ? err.message : String(err),
|
|
4543
|
+
...failure_meta(err)
|
|
4544
|
+
};
|
|
4545
|
+
}
|
|
4546
|
+
/**
|
|
4500
4547
|
* Close the `engine.generate` span with usage, finish reason, resolved model,
|
|
4501
|
-
* or the error
|
|
4548
|
+
* or the error meta on failure. `step_count` and `tool_call_count` are the
|
|
4502
4549
|
* call-level totals (model turns and tool executions in the call), the
|
|
4503
4550
|
* span-attribute analog of the GenAI semconv agent metrics
|
|
4504
4551
|
* `inference_calls` / `tool_calls`.
|
|
@@ -6648,8 +6695,7 @@ async function invoke_turn(config, memory, step_index, step_span) {
|
|
|
6648
6695
|
});
|
|
6649
6696
|
return turn;
|
|
6650
6697
|
} catch (err) {
|
|
6651
|
-
|
|
6652
|
-
end_step_span(config.trajectory, step_span, { error: message });
|
|
6698
|
+
end_step_span(config.trajectory, step_span, error_span_meta(err));
|
|
6653
6699
|
throw err;
|
|
6654
6700
|
}
|
|
6655
6701
|
}
|
|
@@ -7252,15 +7298,43 @@ function resolve_error_status(err) {
|
|
|
7252
7298
|
return typeof status_alt === "number" ? status_alt : void 0;
|
|
7253
7299
|
}
|
|
7254
7300
|
/**
|
|
7255
|
-
*
|
|
7256
|
-
*
|
|
7301
|
+
* The provider's own message: the one a JSON `responseBody` carries, when the
|
|
7302
|
+
* AI SDK attached one, over the error's `message`. A provider package renders
|
|
7303
|
+
* that message from the body, and `@ai-sdk/amazon-bedrock` renders a Bedrock
|
|
7304
|
+
* 503's `{ message }` as `undefined: <message>`, since the body has no
|
|
7305
|
+
* `type`. A native adapter's message already names the provider and the
|
|
7306
|
+
* status it read, so it stays as it is.
|
|
7257
7307
|
*/
|
|
7258
|
-
function
|
|
7308
|
+
function provider_message(err) {
|
|
7309
|
+
const body = Reflect.get(err, "responseBody");
|
|
7310
|
+
const from_body = typeof body === "string" ? error_body_message(body) : void 0;
|
|
7311
|
+
if (from_body !== void 0) return from_body;
|
|
7259
7312
|
const message = Reflect.get(err, "message");
|
|
7260
|
-
|
|
7313
|
+
return typeof message === "string" ? message : void 0;
|
|
7314
|
+
}
|
|
7315
|
+
/**
|
|
7316
|
+
* Copy the provider's message onto a classification record when there is one,
|
|
7317
|
+
* and the thrown error itself as its `cause`, so the typed error that
|
|
7318
|
+
* retry_with_policy throws in the end still holds it. Returns the same record
|
|
7319
|
+
* for chaining.
|
|
7320
|
+
*/
|
|
7321
|
+
function with_error_source(err, out) {
|
|
7322
|
+
const message = provider_message(err);
|
|
7323
|
+
if (message !== void 0) out["message"] = message;
|
|
7324
|
+
out["cause"] = err;
|
|
7261
7325
|
return out;
|
|
7262
7326
|
}
|
|
7263
7327
|
/**
|
|
7328
|
+
* The body of the failed response: the AI SDK's `responseBody`, or else the
|
|
7329
|
+
* `body` a native adapter attaches, when either is a string.
|
|
7330
|
+
*/
|
|
7331
|
+
function response_body(err) {
|
|
7332
|
+
const sdk_body = Reflect.get(err, "responseBody");
|
|
7333
|
+
if (typeof sdk_body === "string") return sdk_body;
|
|
7334
|
+
const body = Reflect.get(err, "body");
|
|
7335
|
+
return typeof body === "string" ? body : void 0;
|
|
7336
|
+
}
|
|
7337
|
+
/**
|
|
7264
7338
|
* Parse a `Retry-After` value off the error's `responseHeaders`, if present.
|
|
7265
7339
|
*/
|
|
7266
7340
|
function retry_after_from_error(err) {
|
|
@@ -7271,15 +7345,18 @@ function retry_after_from_error(err) {
|
|
|
7271
7345
|
}
|
|
7272
7346
|
/**
|
|
7273
7347
|
* Build the classification for a retryable status (`rate_limit` for a 429,
|
|
7274
|
-
* `provider_5xx` for a 5xx), attaching the message and a
|
|
7275
|
-
* when
|
|
7276
|
-
* so a server's wait
|
|
7348
|
+
* `provider_5xx` for a 5xx), attaching the message, the response body, and a
|
|
7349
|
+
* parsed `Retry-After` when each is present, and the error as its `cause`.
|
|
7350
|
+
* HTTP defines the header for a 503 as well as a 429, so a server's wait
|
|
7351
|
+
* counts on both.
|
|
7277
7352
|
*/
|
|
7278
7353
|
function classify_status(err, kind, status) {
|
|
7279
|
-
const out =
|
|
7354
|
+
const out = with_error_source(err, {
|
|
7280
7355
|
kind,
|
|
7281
7356
|
status
|
|
7282
7357
|
});
|
|
7358
|
+
const body = response_body(err);
|
|
7359
|
+
if (body !== void 0) out["body"] = body;
|
|
7283
7360
|
const retry_after_ms = retry_after_from_error(err);
|
|
7284
7361
|
if (retry_after_ms !== void 0) out["retry_after_ms"] = retry_after_ms;
|
|
7285
7362
|
return out;
|
|
@@ -7299,7 +7376,7 @@ function has_network_code(value) {
|
|
|
7299
7376
|
*/
|
|
7300
7377
|
function classify_network_error(err) {
|
|
7301
7378
|
if (!has_network_code(err) && !has_network_code(Reflect.get(err, "cause"))) return void 0;
|
|
7302
|
-
return
|
|
7379
|
+
return with_error_source(err, { kind: "network" });
|
|
7303
7380
|
}
|
|
7304
7381
|
/**
|
|
7305
7382
|
* Classify a thrown provider error into the shape `retry_with_policy`
|
|
@@ -7308,7 +7385,8 @@ function classify_network_error(err) {
|
|
|
7308
7385
|
* Passes through anything that already carries a recognized `kind`.
|
|
7309
7386
|
* Otherwise inspects `statusCode`/`status`: 429 becomes `rate_limit` and 5xx
|
|
7310
7387
|
* becomes `provider_5xx`, each reading `Retry-After` off `responseHeaders`
|
|
7311
|
-
* when present, and a known network
|
|
7388
|
+
* and the body off `responseBody` or `body` when present, and a known network
|
|
7389
|
+
* error code (`ECONNRESET`, `ETIMEDOUT`,
|
|
7312
7390
|
* `ENOTFOUND`, `ECONNREFUSED`, or undici's `UND_ERR_HEADERS_TIMEOUT`,
|
|
7313
7391
|
* `UND_ERR_BODY_TIMEOUT`, and `UND_ERR_SOCKET`), on the error or on its
|
|
7314
7392
|
* `cause`, becomes `network`. Anything else passes through unclassified,
|
|
@@ -7396,7 +7474,10 @@ function retry_turn(call_once, args, stamp, retry_policy, classify, turn_timeout
|
|
|
7396
7474
|
});
|
|
7397
7475
|
if (has_streamed()) {
|
|
7398
7476
|
const message = err instanceof Error ? err.message : String(err);
|
|
7399
|
-
throw new provider_error(`stream interrupted: ${message}`, {
|
|
7477
|
+
throw new provider_error(`stream interrupted: ${message}`, {
|
|
7478
|
+
cause_kind: "unknown",
|
|
7479
|
+
cause: err
|
|
7480
|
+
});
|
|
7400
7481
|
}
|
|
7401
7482
|
if (deadline.timed_out()) throw new turn_timeout_error(turn_timeout_ms ?? 0, args.step_index);
|
|
7402
7483
|
if (err instanceof aborted_error) throw err;
|
|
@@ -7739,7 +7820,7 @@ async function build_ai_sdk_transport(cfg) {
|
|
|
7739
7820
|
const provider_options = combined_provider_options !== void 0 && Object.keys(combined_provider_options).length > 0 ? combined_provider_options : void 0;
|
|
7740
7821
|
let ai_sdk_invoke_mod;
|
|
7741
7822
|
try {
|
|
7742
|
-
ai_sdk_invoke_mod = await import("./invoke-
|
|
7823
|
+
ai_sdk_invoke_mod = await import("./invoke-x5SNh9DV.js");
|
|
7743
7824
|
} catch (err) {
|
|
7744
7825
|
throw missing_peer_error("ai", err);
|
|
7745
7826
|
}
|
|
@@ -8100,7 +8181,7 @@ async function generate(opts_in, engine) {
|
|
|
8100
8181
|
result.timing = call_timing(started_at);
|
|
8101
8182
|
return result;
|
|
8102
8183
|
} catch (err) {
|
|
8103
|
-
end_generate_span(trajectory, generate_span,
|
|
8184
|
+
end_generate_span(trajectory, generate_span, error_span_meta(err));
|
|
8104
8185
|
throw err;
|
|
8105
8186
|
}
|
|
8106
8187
|
}
|
|
@@ -8376,4 +8457,4 @@ function create_engine(config) {
|
|
|
8376
8457
|
//#endregion
|
|
8377
8458
|
export { to_json_schema as n, create_engine as t };
|
|
8378
8459
|
|
|
8379
|
-
//# sourceMappingURL=engine-
|
|
8460
|
+
//# sourceMappingURL=engine-CbVdzplI.js.map
|