bitfab 0.28.2 → 0.28.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/dist/index.d.cts CHANGED
@@ -137,7 +137,7 @@ interface ActiveSpanContext$2 {
137
137
  * Bitfab spans with proper parent-child hierarchy.
138
138
  *
139
139
  * The TypeScript Claude Agent SDK exposes a single `query()` entry point (there
140
- * is no `ClaudeSDKClient` class that exists only in the Python SDK). Wrap the
140
+ * is no `ClaudeSDKClient` class - that exists only in the Python SDK). Wrap the
141
141
  * `query()` async iterator with `wrapQuery`; tool and subagent spans come from
142
142
  * the hooks injected by `instrumentOptions`.
143
143
  *
@@ -221,7 +221,7 @@ declare class BitfabClaudeAgentHandler {
221
221
  * SDK's `wrapResponse` (which wraps `ClaudeSDKClient.receiveResponse()`);
222
222
  * in TypeScript, prefer `wrapQuery` around `query()`.
223
223
  *
224
- * Pass `{ input }` (the prompt) to record a replayable root span see
224
+ * Pass `{ input }` (the prompt) to record a replayable root span - see
225
225
  * `wrapQuery`.
226
226
  */
227
227
  wrapResponse(stream: AsyncIterable<unknown>, opts?: {
@@ -233,8 +233,8 @@ declare class BitfabClaudeAgentHandler {
233
233
  * Tool and subagent spans are captured separately via the hooks injected
234
234
  * by `instrumentOptions` into the `options` passed to `query()`.
235
235
  *
236
- * Pass `{ input }` the prompt (or the serializable args that produced it)
237
- * to make a handler-only run replayable: the handler records a root `agent`
236
+ * Pass `{ input }` - the prompt (or the serializable args that produced it)
237
+ * - to make a handler-only run replayable: the handler records a root `agent`
238
238
  * span with that input, so `replay(key, fn)` can re-feed it. Omit it only
239
239
  * when an enclosing `withSpan` already supplies the replayable root.
240
240
  *
@@ -445,7 +445,7 @@ declare class BitfabLangGraphCallbackHandler {
445
445
  *
446
446
  * 1. A process-wide `TracingProcessor` (see `getOpenAiTracingProcessor` /
447
447
  * `BitfabOpenAITracingProcessor`) registered once with `addTraceProcessor`.
448
- * It captures everything *inside* a run LLM calls, tool calls, handoffs
448
+ * It captures everything *inside* a run - LLM calls, tool calls, handoffs -
449
449
  * as Bitfab spans.
450
450
  * 2. This handler's `wrapRun`, which owns the *root*. The processor never sees
451
451
  * the caller's input (the SDK's trace events don't carry it), so a
@@ -516,7 +516,7 @@ declare class BitfabOpenAIAgentHandler {
516
516
  * argument, so `replay(key, fn)` re-feeds it), and the run's `finalOutput`
517
517
  * is recorded as the root output. For streaming runs (`{ stream: true }`),
518
518
  * the result is handed back immediately and the final output is recorded
519
- * once the stream completes first-byte latency is untouched.
519
+ * once the stream completes - first-byte latency is untouched.
520
520
  *
521
521
  * The process-wide tracing processor (`getOpenAiTracingProcessor`) must still
522
522
  * be registered: it captures the LLM/tool/handoff spans that nest beneath
@@ -542,7 +542,7 @@ declare class BitfabOpenAIAgentHandler {
542
542
  * even when the SDK runs items in parallel.
543
543
  *
544
544
  * Internally, the resolved per-item state is a `DbBranchLease` (see
545
- * replayContext.ts) that's the SDK ↔ server protocol term. We expose
545
+ * replayContext.ts) - that's the SDK ↔ server protocol term. We expose
546
546
  * its useful fields directly here so customer code never sees the word.
547
547
  */
548
548
  interface ReplayEnvironmentSnapshot {
@@ -576,7 +576,7 @@ declare class ReplayEnvironment {
576
576
  snapshot(): ReplayEnvironmentSnapshot | null;
577
577
  /**
578
578
  * Record on the replay context that customer code obtained the branch
579
- * URL. Only `databaseUrl` and `snapshot()` count `active`, `readOnly`
579
+ * URL. Only `databaseUrl` and `snapshot()` count - `active`, `readOnly`
580
580
  * and friends inspect the lease without exposing the connection string,
581
581
  * so they don't prove the replayed code could have connected to the
582
582
  * branch.
@@ -623,9 +623,9 @@ interface ReplayOptions {
623
623
  codeChangeFiles?: CodeChangeFile[];
624
624
  /**
625
625
  * Mock strategy for child spans during replay.
626
- * - "none": everything runs real code (default)
626
+ * - "marked": only spans tagged with { mockOnReplay: true } in SpanOptions are mocked (default)
627
+ * - "none": everything runs real code
627
628
  * - "all": every child withSpan returns historical output
628
- * - "marked": only spans tagged with { mockOnReplay: true } in SpanOptions are mocked
629
629
  */
630
630
  mock?: MockStrategy;
631
631
  /**
@@ -968,7 +968,7 @@ interface CurrentSpan {
968
968
  * A detached handle to a previously-created trace, looked up by its
969
969
  * caller-supplied id (the same id passed when the trace was started).
970
970
  *
971
- * Unlike `getCurrentTrace()`, this handle is not tied to AsyncLocalStorage
971
+ * Unlike `getCurrentTrace()`, this handle is not tied to AsyncLocalStorage -
972
972
  * each method sends to the server immediately. Useful for adding context
973
973
  * to a trace from a different process, request, or thread (e.g. a forked
974
974
  * agent that wants to annotate the original conversation's trace).
@@ -1102,7 +1102,7 @@ interface SpanOptions {
1102
1102
  * ignored outside replay and under the "all"/"none" strategies.
1103
1103
  *
1104
1104
  * Use this for child spans that are expensive (paid LLM/API calls),
1105
- * slow, or non-deterministic the root function still runs real code,
1105
+ * slow, or non-deterministic - the root function still runs real code,
1106
1106
  * only the marked descendants return their recorded output.
1107
1107
  */
1108
1108
  mockOnReplay?: boolean;
@@ -1324,7 +1324,7 @@ declare class Bitfab {
1324
1324
  * Wrap a BAML client method to automatically capture prompt and LLM metadata.
1325
1325
  *
1326
1326
  * Creates a BAML Collector, calls the method through a tracked client,
1327
- * then extracts rendered messages and token usage calling setPrompt()
1327
+ * then extracts rendered messages and token usage - calling setPrompt()
1328
1328
  * and addContext() on the current span automatically.
1329
1329
  *
1330
1330
  * The BAML client can be provided in the constructor or passed explicitly:
@@ -1385,7 +1385,7 @@ declare class Bitfab {
1385
1385
  * Get a detached handle to a previously-created trace, looked up by the
1386
1386
  * caller-supplied id (the same id passed at trace creation).
1387
1387
  *
1388
- * The returned handle is not tied to AsyncLocalStorage each method sends
1388
+ * The returned handle is not tied to AsyncLocalStorage - each method sends
1389
1389
  * to the server immediately. Useful for adding context to a trace from a
1390
1390
  * different process or thread than the one that created it.
1391
1391
  *
@@ -1443,7 +1443,7 @@ declare class Bitfab {
1443
1443
  * plain callable: plain callables are wrapped internally so each replayed
1444
1444
  * invocation records a trace tied to the test run. The plain-callable form
1445
1445
  * is how handler-instrumented workflows (LangGraph/LangChain, Claude Agent
1446
- * SDK) replay those record traces under a key with no `withSpan`-wrapped
1446
+ * SDK) replay - those record traces under a key with no `withSpan`-wrapped
1447
1447
  * root in the app.
1448
1448
  *
1449
1449
  * @param traceFunctionKey - The trace function key to replay
@@ -1571,7 +1571,7 @@ declare class BitfabFunction {
1571
1571
  */
1572
1572
  getLangGraphCallbackHandler(): BitfabLangGraphCallbackHandler;
1573
1573
  /**
1574
- * Alias of {@link getLangGraphCallbackHandler} LangChain and LangGraph
1574
+ * Alias of {@link getLangGraphCallbackHandler} - LangChain and LangGraph
1575
1575
  * share one callback system, so the same bound handler serves both.
1576
1576
  *
1577
1577
  * @returns A LangChain callback handler for this client and key
@@ -1584,7 +1584,7 @@ declare class BitfabFunction {
1584
1584
  * Unlike the other methods on this handle, `wrapBAML` does NOT use the bound
1585
1585
  * key: it opens no span of its own. It enriches the *current* span (via
1586
1586
  * `getCurrentSpan().setPrompt()` / `addContext()`), so call it inside a
1587
- * function wrapped by this handle's `withSpan` the bound key keys that
1587
+ * function wrapped by this handle's `withSpan` - the bound key keys that
1588
1588
  * wrapper, and the BAML prompt/metadata attach to it.
1589
1589
  *
1590
1590
  * @param methodOrClient - Either a BAML method (uses constructor bamlClient) or the BAML client instance
@@ -1603,7 +1603,7 @@ declare class BitfabFunction {
1603
1603
  /**
1604
1604
  * SDK version from package.json (injected at build time)
1605
1605
  */
1606
- declare const __version__ = "0.28.2";
1606
+ declare const __version__ = "0.28.4";
1607
1607
 
1608
1608
  /**
1609
1609
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -137,7 +137,7 @@ interface ActiveSpanContext$2 {
137
137
  * Bitfab spans with proper parent-child hierarchy.
138
138
  *
139
139
  * The TypeScript Claude Agent SDK exposes a single `query()` entry point (there
140
- * is no `ClaudeSDKClient` class that exists only in the Python SDK). Wrap the
140
+ * is no `ClaudeSDKClient` class - that exists only in the Python SDK). Wrap the
141
141
  * `query()` async iterator with `wrapQuery`; tool and subagent spans come from
142
142
  * the hooks injected by `instrumentOptions`.
143
143
  *
@@ -221,7 +221,7 @@ declare class BitfabClaudeAgentHandler {
221
221
  * SDK's `wrapResponse` (which wraps `ClaudeSDKClient.receiveResponse()`);
222
222
  * in TypeScript, prefer `wrapQuery` around `query()`.
223
223
  *
224
- * Pass `{ input }` (the prompt) to record a replayable root span see
224
+ * Pass `{ input }` (the prompt) to record a replayable root span - see
225
225
  * `wrapQuery`.
226
226
  */
227
227
  wrapResponse(stream: AsyncIterable<unknown>, opts?: {
@@ -233,8 +233,8 @@ declare class BitfabClaudeAgentHandler {
233
233
  * Tool and subagent spans are captured separately via the hooks injected
234
234
  * by `instrumentOptions` into the `options` passed to `query()`.
235
235
  *
236
- * Pass `{ input }` the prompt (or the serializable args that produced it)
237
- * to make a handler-only run replayable: the handler records a root `agent`
236
+ * Pass `{ input }` - the prompt (or the serializable args that produced it)
237
+ * - to make a handler-only run replayable: the handler records a root `agent`
238
238
  * span with that input, so `replay(key, fn)` can re-feed it. Omit it only
239
239
  * when an enclosing `withSpan` already supplies the replayable root.
240
240
  *
@@ -445,7 +445,7 @@ declare class BitfabLangGraphCallbackHandler {
445
445
  *
446
446
  * 1. A process-wide `TracingProcessor` (see `getOpenAiTracingProcessor` /
447
447
  * `BitfabOpenAITracingProcessor`) registered once with `addTraceProcessor`.
448
- * It captures everything *inside* a run LLM calls, tool calls, handoffs
448
+ * It captures everything *inside* a run - LLM calls, tool calls, handoffs -
449
449
  * as Bitfab spans.
450
450
  * 2. This handler's `wrapRun`, which owns the *root*. The processor never sees
451
451
  * the caller's input (the SDK's trace events don't carry it), so a
@@ -516,7 +516,7 @@ declare class BitfabOpenAIAgentHandler {
516
516
  * argument, so `replay(key, fn)` re-feeds it), and the run's `finalOutput`
517
517
  * is recorded as the root output. For streaming runs (`{ stream: true }`),
518
518
  * the result is handed back immediately and the final output is recorded
519
- * once the stream completes first-byte latency is untouched.
519
+ * once the stream completes - first-byte latency is untouched.
520
520
  *
521
521
  * The process-wide tracing processor (`getOpenAiTracingProcessor`) must still
522
522
  * be registered: it captures the LLM/tool/handoff spans that nest beneath
@@ -542,7 +542,7 @@ declare class BitfabOpenAIAgentHandler {
542
542
  * even when the SDK runs items in parallel.
543
543
  *
544
544
  * Internally, the resolved per-item state is a `DbBranchLease` (see
545
- * replayContext.ts) that's the SDK ↔ server protocol term. We expose
545
+ * replayContext.ts) - that's the SDK ↔ server protocol term. We expose
546
546
  * its useful fields directly here so customer code never sees the word.
547
547
  */
548
548
  interface ReplayEnvironmentSnapshot {
@@ -576,7 +576,7 @@ declare class ReplayEnvironment {
576
576
  snapshot(): ReplayEnvironmentSnapshot | null;
577
577
  /**
578
578
  * Record on the replay context that customer code obtained the branch
579
- * URL. Only `databaseUrl` and `snapshot()` count `active`, `readOnly`
579
+ * URL. Only `databaseUrl` and `snapshot()` count - `active`, `readOnly`
580
580
  * and friends inspect the lease without exposing the connection string,
581
581
  * so they don't prove the replayed code could have connected to the
582
582
  * branch.
@@ -623,9 +623,9 @@ interface ReplayOptions {
623
623
  codeChangeFiles?: CodeChangeFile[];
624
624
  /**
625
625
  * Mock strategy for child spans during replay.
626
- * - "none": everything runs real code (default)
626
+ * - "marked": only spans tagged with { mockOnReplay: true } in SpanOptions are mocked (default)
627
+ * - "none": everything runs real code
627
628
  * - "all": every child withSpan returns historical output
628
- * - "marked": only spans tagged with { mockOnReplay: true } in SpanOptions are mocked
629
629
  */
630
630
  mock?: MockStrategy;
631
631
  /**
@@ -968,7 +968,7 @@ interface CurrentSpan {
968
968
  * A detached handle to a previously-created trace, looked up by its
969
969
  * caller-supplied id (the same id passed when the trace was started).
970
970
  *
971
- * Unlike `getCurrentTrace()`, this handle is not tied to AsyncLocalStorage
971
+ * Unlike `getCurrentTrace()`, this handle is not tied to AsyncLocalStorage -
972
972
  * each method sends to the server immediately. Useful for adding context
973
973
  * to a trace from a different process, request, or thread (e.g. a forked
974
974
  * agent that wants to annotate the original conversation's trace).
@@ -1102,7 +1102,7 @@ interface SpanOptions {
1102
1102
  * ignored outside replay and under the "all"/"none" strategies.
1103
1103
  *
1104
1104
  * Use this for child spans that are expensive (paid LLM/API calls),
1105
- * slow, or non-deterministic the root function still runs real code,
1105
+ * slow, or non-deterministic - the root function still runs real code,
1106
1106
  * only the marked descendants return their recorded output.
1107
1107
  */
1108
1108
  mockOnReplay?: boolean;
@@ -1324,7 +1324,7 @@ declare class Bitfab {
1324
1324
  * Wrap a BAML client method to automatically capture prompt and LLM metadata.
1325
1325
  *
1326
1326
  * Creates a BAML Collector, calls the method through a tracked client,
1327
- * then extracts rendered messages and token usage calling setPrompt()
1327
+ * then extracts rendered messages and token usage - calling setPrompt()
1328
1328
  * and addContext() on the current span automatically.
1329
1329
  *
1330
1330
  * The BAML client can be provided in the constructor or passed explicitly:
@@ -1385,7 +1385,7 @@ declare class Bitfab {
1385
1385
  * Get a detached handle to a previously-created trace, looked up by the
1386
1386
  * caller-supplied id (the same id passed at trace creation).
1387
1387
  *
1388
- * The returned handle is not tied to AsyncLocalStorage each method sends
1388
+ * The returned handle is not tied to AsyncLocalStorage - each method sends
1389
1389
  * to the server immediately. Useful for adding context to a trace from a
1390
1390
  * different process or thread than the one that created it.
1391
1391
  *
@@ -1443,7 +1443,7 @@ declare class Bitfab {
1443
1443
  * plain callable: plain callables are wrapped internally so each replayed
1444
1444
  * invocation records a trace tied to the test run. The plain-callable form
1445
1445
  * is how handler-instrumented workflows (LangGraph/LangChain, Claude Agent
1446
- * SDK) replay those record traces under a key with no `withSpan`-wrapped
1446
+ * SDK) replay - those record traces under a key with no `withSpan`-wrapped
1447
1447
  * root in the app.
1448
1448
  *
1449
1449
  * @param traceFunctionKey - The trace function key to replay
@@ -1571,7 +1571,7 @@ declare class BitfabFunction {
1571
1571
  */
1572
1572
  getLangGraphCallbackHandler(): BitfabLangGraphCallbackHandler;
1573
1573
  /**
1574
- * Alias of {@link getLangGraphCallbackHandler} LangChain and LangGraph
1574
+ * Alias of {@link getLangGraphCallbackHandler} - LangChain and LangGraph
1575
1575
  * share one callback system, so the same bound handler serves both.
1576
1576
  *
1577
1577
  * @returns A LangChain callback handler for this client and key
@@ -1584,7 +1584,7 @@ declare class BitfabFunction {
1584
1584
  * Unlike the other methods on this handle, `wrapBAML` does NOT use the bound
1585
1585
  * key: it opens no span of its own. It enriches the *current* span (via
1586
1586
  * `getCurrentSpan().setPrompt()` / `addContext()`), so call it inside a
1587
- * function wrapped by this handle's `withSpan` the bound key keys that
1587
+ * function wrapped by this handle's `withSpan` - the bound key keys that
1588
1588
  * wrapper, and the BAML prompt/metadata attach to it.
1589
1589
  *
1590
1590
  * @param methodOrClient - Either a BAML method (uses constructor bamlClient) or the BAML client instance
@@ -1603,7 +1603,7 @@ declare class BitfabFunction {
1603
1603
  /**
1604
1604
  * SDK version from package.json (injected at build time)
1605
1605
  */
1606
- declare const __version__ = "0.28.2";
1606
+ declare const __version__ = "0.28.4";
1607
1607
 
1608
1608
  /**
1609
1609
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -23,12 +23,12 @@ import {
23
23
  flushTraces,
24
24
  getCurrentSpan,
25
25
  getCurrentTrace
26
- } from "./chunk-NZFPJRD3.js";
26
+ } from "./chunk-3F46BMPM.js";
27
27
  import {
28
28
  BITFAB_PROGRESS_PREFIX,
29
29
  BitfabError,
30
30
  reportReplayProgress
31
- } from "./chunk-3PCOUZZP.js";
31
+ } from "./chunk-SAGZ674W.js";
32
32
  export {
33
33
  BITFAB_PROGRESS_PREFIX,
34
34
  Bitfab,
package/dist/node.cjs CHANGED
@@ -49,7 +49,7 @@ function registerAsyncLocalStorageClass(cls) {
49
49
  function assertAsyncStorageRegistered() {
50
50
  if (!AsyncLocalStorageClass) {
51
51
  console.warn(
52
- "Bitfab: AsyncLocalStorage not available \u2014 nested span context will not propagate."
52
+ "Bitfab: AsyncLocalStorage not available - nested span context will not propagate."
53
53
  );
54
54
  }
55
55
  }
@@ -407,10 +407,25 @@ async function processItem(httpClient, serverItem, fn, testRunId, mockStrategy,
407
407
  }
408
408
  let mockTree;
409
409
  if (mockStrategy === "all" || mockStrategy === "marked") {
410
- const treeResponse = await httpClient.getSpanTree(
411
- serverItem.externalSpanId
412
- );
413
- mockTree = buildMockTree(treeResponse.root);
410
+ try {
411
+ const treeResponse = await httpClient.getSpanTree(
412
+ serverItem.externalSpanId
413
+ );
414
+ if (treeResponse.root) {
415
+ mockTree = buildMockTree(treeResponse.root);
416
+ } else if (mockStrategy === "all") {
417
+ throw new BitfabError(
418
+ `Replay mock strategy "all" requires a span tree root for source span ${serverItem.externalSpanId}.`
419
+ );
420
+ } else {
421
+ mockTree = void 0;
422
+ }
423
+ } catch (e) {
424
+ if (mockStrategy === "all") {
425
+ throw e;
426
+ }
427
+ mockTree = void 0;
428
+ }
414
429
  }
415
430
  const maybePromise = runWithReplayContext(
416
431
  {
@@ -516,7 +531,7 @@ async function replay(httpClient, serviceUrl, traceFunctionKey, fn, options) {
516
531
  options?.experimentGroupId,
517
532
  options?.datasetId
518
533
  );
519
- const mockStrategy = options?.mock ?? "none";
534
+ const mockStrategy = options?.mock ?? "marked";
520
535
  const maxConcurrency = options?.maxConcurrency ?? 10;
521
536
  const tasks = serverItems.map(
522
537
  (serverItem) => () => processItem(
@@ -667,7 +682,7 @@ registerAsyncLocalStorageClass(
667
682
  );
668
683
 
669
684
  // src/version.generated.ts
670
- var __version__ = "0.28.2";
685
+ var __version__ = "0.28.4";
671
686
 
672
687
  // src/constants.ts
673
688
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -980,7 +995,7 @@ var HttpClient = class {
980
995
  }
981
996
  /**
982
997
  * Start a replay session by fetching historical traces.
983
- * Blocking call creates a test run and returns lightweight item references.
998
+ * Blocking call - creates a test run and returns lightweight item references.
984
999
  */
985
1000
  async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetId) {
986
1001
  const payload = { traceFunctionKey };
@@ -1098,7 +1113,7 @@ var HttpClient = class {
1098
1113
  }
1099
1114
  /**
1100
1115
  * Ask the server to materialize a per-trace DB branch lease from a
1101
- * captured `dbSnapshotRef`. Blocking the resolver creates a Neon
1116
+ * captured `dbSnapshotRef`. Blocking - the resolver creates a Neon
1102
1117
  * snapshot + preview branch and polls operations to readiness, which
1103
1118
  * can take seconds.
1104
1119
  */
@@ -1238,7 +1253,7 @@ var BitfabClaudeAgentHandler = class {
1238
1253
  // Synthetic root span (handler-only replay). When an `input` is supplied to
1239
1254
  // wrapQuery/wrapResponse, the handler emits a root `agent` span carrying that
1240
1255
  // input, so a handler-instrumented run is replayable WITHOUT an enclosing
1241
- // withSpan matching the LangGraph handler, which records the graph input as
1256
+ // withSpan - matching the LangGraph handler, which records the graph input as
1242
1257
  // its root. The prompt is not present anywhere in the message stream, so it
1243
1258
  // must be handed in explicitly.
1244
1259
  this.hasRootInput = false;
@@ -1512,7 +1527,7 @@ var BitfabClaudeAgentHandler = class {
1512
1527
  * SDK's `wrapResponse` (which wraps `ClaudeSDKClient.receiveResponse()`);
1513
1528
  * in TypeScript, prefer `wrapQuery` around `query()`.
1514
1529
  *
1515
- * Pass `{ input }` (the prompt) to record a replayable root span see
1530
+ * Pass `{ input }` (the prompt) to record a replayable root span - see
1516
1531
  * `wrapQuery`.
1517
1532
  */
1518
1533
  async *wrapResponse(stream, opts) {
@@ -1525,8 +1540,8 @@ var BitfabClaudeAgentHandler = class {
1525
1540
  * Tool and subagent spans are captured separately via the hooks injected
1526
1541
  * by `instrumentOptions` into the `options` passed to `query()`.
1527
1542
  *
1528
- * Pass `{ input }` the prompt (or the serializable args that produced it)
1529
- * to make a handler-only run replayable: the handler records a root `agent`
1543
+ * Pass `{ input }` - the prompt (or the serializable args that produced it)
1544
+ * - to make a handler-only run replayable: the handler records a root `agent`
1530
1545
  * span with that input, so `replay(key, fn)` can re-feed it. Omit it only
1531
1546
  * when an enclosing `withSpan` already supplies the replayable root.
1532
1547
  *
@@ -2638,7 +2653,7 @@ var BitfabOpenAIAgentHandler = class {
2638
2653
  * argument, so `replay(key, fn)` re-feeds it), and the run's `finalOutput`
2639
2654
  * is recorded as the root output. For streaming runs (`{ stream: true }`),
2640
2655
  * the result is handed back immediately and the final output is recorded
2641
- * once the stream completes first-byte latency is untouched.
2656
+ * once the stream completes - first-byte latency is untouched.
2642
2657
  *
2643
2658
  * The process-wide tracing processor (`getOpenAiTracingProcessor`) must still
2644
2659
  * be registered: it captures the LLM/tool/handoff spans that nest beneath
@@ -2731,7 +2746,7 @@ var ReplayEnvironment = class {
2731
2746
  }
2732
2747
  /**
2733
2748
  * Record on the replay context that customer code obtained the branch
2734
- * URL. Only `databaseUrl` and `snapshot()` count `active`, `readOnly`
2749
+ * URL. Only `databaseUrl` and `snapshot()` count - `active`, `readOnly`
2735
2750
  * and friends inspect the lease without exposing the connection string,
2736
2751
  * so they don't prove the replayed code could have connected to the
2737
2752
  * branch.
@@ -3456,7 +3471,7 @@ var Bitfab = class {
3456
3471
  if (this.explicitlyEnabled && !this.apiKeyWarned) {
3457
3472
  this.apiKeyWarned = true;
3458
3473
  console.warn(
3459
- "Bitfab: apiKey is empty \u2014 tracing is disabled. Provide a valid API key to enable tracing."
3474
+ "Bitfab: apiKey is empty - tracing is disabled. Provide a valid API key to enable tracing."
3460
3475
  );
3461
3476
  }
3462
3477
  return void 0;
@@ -3720,7 +3735,7 @@ var Bitfab = class {
3720
3735
  * Wrap a BAML client method to automatically capture prompt and LLM metadata.
3721
3736
  *
3722
3737
  * Creates a BAML Collector, calls the method through a tracked client,
3723
- * then extracts rendered messages and token usage calling setPrompt()
3738
+ * then extracts rendered messages and token usage - calling setPrompt()
3724
3739
  * and addContext() on the current span automatically.
3725
3740
  *
3726
3741
  * The BAML client can be provided in the constructor or passed explicitly:
@@ -4107,7 +4122,7 @@ var Bitfab = class {
4107
4122
  * Get a detached handle to a previously-created trace, looked up by the
4108
4123
  * caller-supplied id (the same id passed at trace creation).
4109
4124
  *
4110
- * The returned handle is not tied to AsyncLocalStorage each method sends
4125
+ * The returned handle is not tied to AsyncLocalStorage - each method sends
4111
4126
  * to the server immediately. Useful for adding context to a trace from a
4112
4127
  * different process or thread than the one that created it.
4113
4128
  *
@@ -4288,7 +4303,7 @@ var Bitfab = class {
4288
4303
  * plain callable: plain callables are wrapped internally so each replayed
4289
4304
  * invocation records a trace tied to the test run. The plain-callable form
4290
4305
  * is how handler-instrumented workflows (LangGraph/LangChain, Claude Agent
4291
- * SDK) replay those record traces under a key with no `withSpan`-wrapped
4306
+ * SDK) replay - those record traces under a key with no `withSpan`-wrapped
4292
4307
  * root in the app.
4293
4308
  *
4294
4309
  * @param traceFunctionKey - The trace function key to replay
@@ -4440,7 +4455,7 @@ var BitfabFunction = class {
4440
4455
  return this.client.getLangGraphCallbackHandler(this.traceFunctionKey);
4441
4456
  }
4442
4457
  /**
4443
- * Alias of {@link getLangGraphCallbackHandler} LangChain and LangGraph
4458
+ * Alias of {@link getLangGraphCallbackHandler} - LangChain and LangGraph
4444
4459
  * share one callback system, so the same bound handler serves both.
4445
4460
  *
4446
4461
  * @returns A LangChain callback handler for this client and key
@@ -4455,7 +4470,7 @@ var BitfabFunction = class {
4455
4470
  * Unlike the other methods on this handle, `wrapBAML` does NOT use the bound
4456
4471
  * key: it opens no span of its own. It enriches the *current* span (via
4457
4472
  * `getCurrentSpan().setPrompt()` / `addContext()`), so call it inside a
4458
- * function wrapped by this handle's `withSpan` the bound key keys that
4473
+ * function wrapped by this handle's `withSpan` - the bound key keys that
4459
4474
  * wrapper, and the BAML prompt/metadata attach to it.
4460
4475
  *
4461
4476
  * @param methodOrClient - Either a BAML method (uses constructor bamlClient) or the BAML client instance