bitfab 0.13.4 → 0.13.5

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.
@@ -8,7 +8,7 @@ import {
8
8
  getReplayContext,
9
9
  isAsyncStorageInitDone,
10
10
  serializeValue
11
- } from "./chunk-SKJWF5VX.js";
11
+ } from "./chunk-BVFST7Q3.js";
12
12
 
13
13
  // src/claudeAgentSdk.ts
14
14
  function nowIso() {
@@ -2137,7 +2137,8 @@ var Bitfab = class {
2137
2137
  }
2138
2138
  const currentStack = getSpanStack();
2139
2139
  const parentContext = currentStack[currentStack.length - 1];
2140
- const traceId = parentContext?.traceId ?? crypto.randomUUID();
2140
+ const replayCtxForTraceId = parentContext ? null : getReplayContext();
2141
+ const traceId = parentContext?.traceId ?? replayCtxForTraceId?.traceId ?? crypto.randomUUID();
2141
2142
  const spanId = crypto.randomUUID();
2142
2143
  const parentSpanId = parentContext?.spanId ?? null;
2143
2144
  const isRootSpan = parentSpanId === null;
@@ -2454,7 +2455,7 @@ var Bitfab = class {
2454
2455
  * @returns ReplayResult with items, testRunId, and testRunUrl
2455
2456
  */
2456
2457
  async replay(traceFunctionKey, fn, options) {
2457
- const { replay: doReplay } = await import("./replay-HGU5YAOK.js");
2458
+ const { replay: doReplay } = await import("./replay-CLQKO7U7.js");
2458
2459
  return doReplay(
2459
2460
  this.httpClient,
2460
2461
  this.serviceUrl,
@@ -2530,4 +2531,4 @@ export {
2530
2531
  Bitfab,
2531
2532
  BitfabFunction
2532
2533
  };
2533
- //# sourceMappingURL=chunk-XUW46356.js.map
2534
+ //# sourceMappingURL=chunk-4IHJJRMU.js.map