@bitfab/sdk 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.
@@ -10,10 +10,10 @@ import {
10
10
  toJsonSafe,
11
11
  toJsonSafeReport,
12
12
  warnOnce
13
- } from "./chunk-3PCOUZZP.js";
13
+ } from "./chunk-SAGZ674W.js";
14
14
 
15
15
  // src/version.generated.ts
16
- var __version__ = "0.28.2";
16
+ var __version__ = "0.28.4";
17
17
 
18
18
  // src/constants.ts
19
19
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -322,7 +322,7 @@ var HttpClient = class {
322
322
  }
323
323
  /**
324
324
  * Start a replay session by fetching historical traces.
325
- * Blocking call creates a test run and returns lightweight item references.
325
+ * Blocking call - creates a test run and returns lightweight item references.
326
326
  */
327
327
  async startReplay(traceFunctionKey, limit, traceIds, name, codeChangeDescription, codeChangeFiles, includeDbBranchLease, experimentGroupId, datasetId) {
328
328
  const payload = { traceFunctionKey };
@@ -440,7 +440,7 @@ var HttpClient = class {
440
440
  }
441
441
  /**
442
442
  * Ask the server to materialize a per-trace DB branch lease from a
443
- * captured `dbSnapshotRef`. Blocking the resolver creates a Neon
443
+ * captured `dbSnapshotRef`. Blocking - the resolver creates a Neon
444
444
  * snapshot + preview branch and polls operations to readiness, which
445
445
  * can take seconds.
446
446
  */
@@ -576,7 +576,7 @@ var BitfabClaudeAgentHandler = class {
576
576
  // Synthetic root span (handler-only replay). When an `input` is supplied to
577
577
  // wrapQuery/wrapResponse, the handler emits a root `agent` span carrying that
578
578
  // input, so a handler-instrumented run is replayable WITHOUT an enclosing
579
- // withSpan matching the LangGraph handler, which records the graph input as
579
+ // withSpan - matching the LangGraph handler, which records the graph input as
580
580
  // its root. The prompt is not present anywhere in the message stream, so it
581
581
  // must be handed in explicitly.
582
582
  this.hasRootInput = false;
@@ -850,7 +850,7 @@ var BitfabClaudeAgentHandler = class {
850
850
  * SDK's `wrapResponse` (which wraps `ClaudeSDKClient.receiveResponse()`);
851
851
  * in TypeScript, prefer `wrapQuery` around `query()`.
852
852
  *
853
- * Pass `{ input }` (the prompt) to record a replayable root span see
853
+ * Pass `{ input }` (the prompt) to record a replayable root span - see
854
854
  * `wrapQuery`.
855
855
  */
856
856
  async *wrapResponse(stream, opts) {
@@ -863,8 +863,8 @@ var BitfabClaudeAgentHandler = class {
863
863
  * Tool and subagent spans are captured separately via the hooks injected
864
864
  * by `instrumentOptions` into the `options` passed to `query()`.
865
865
  *
866
- * Pass `{ input }` the prompt (or the serializable args that produced it)
867
- * to make a handler-only run replayable: the handler records a root `agent`
866
+ * Pass `{ input }` - the prompt (or the serializable args that produced it)
867
+ * - to make a handler-only run replayable: the handler records a root `agent`
868
868
  * span with that input, so `replay(key, fn)` can re-feed it. Omit it only
869
869
  * when an enclosing `withSpan` already supplies the replayable root.
870
870
  *
@@ -1970,7 +1970,7 @@ var BitfabOpenAIAgentHandler = class {
1970
1970
  * argument, so `replay(key, fn)` re-feeds it), and the run's `finalOutput`
1971
1971
  * is recorded as the root output. For streaming runs (`{ stream: true }`),
1972
1972
  * the result is handed back immediately and the final output is recorded
1973
- * once the stream completes first-byte latency is untouched.
1973
+ * once the stream completes - first-byte latency is untouched.
1974
1974
  *
1975
1975
  * The process-wide tracing processor (`getOpenAiTracingProcessor`) must still
1976
1976
  * be registered: it captures the LLM/tool/handoff spans that nest beneath
@@ -2058,7 +2058,7 @@ var ReplayEnvironment = class {
2058
2058
  }
2059
2059
  /**
2060
2060
  * Record on the replay context that customer code obtained the branch
2061
- * URL. Only `databaseUrl` and `snapshot()` count `active`, `readOnly`
2061
+ * URL. Only `databaseUrl` and `snapshot()` count - `active`, `readOnly`
2062
2062
  * and friends inspect the lease without exposing the connection string,
2063
2063
  * so they don't prove the replayed code could have connected to the
2064
2064
  * branch.
@@ -2779,7 +2779,7 @@ var Bitfab = class {
2779
2779
  if (this.explicitlyEnabled && !this.apiKeyWarned) {
2780
2780
  this.apiKeyWarned = true;
2781
2781
  console.warn(
2782
- "Bitfab: apiKey is empty \u2014 tracing is disabled. Provide a valid API key to enable tracing."
2782
+ "Bitfab: apiKey is empty - tracing is disabled. Provide a valid API key to enable tracing."
2783
2783
  );
2784
2784
  }
2785
2785
  return void 0;
@@ -3043,7 +3043,7 @@ var Bitfab = class {
3043
3043
  * Wrap a BAML client method to automatically capture prompt and LLM metadata.
3044
3044
  *
3045
3045
  * Creates a BAML Collector, calls the method through a tracked client,
3046
- * then extracts rendered messages and token usage calling setPrompt()
3046
+ * then extracts rendered messages and token usage - calling setPrompt()
3047
3047
  * and addContext() on the current span automatically.
3048
3048
  *
3049
3049
  * The BAML client can be provided in the constructor or passed explicitly:
@@ -3430,7 +3430,7 @@ var Bitfab = class {
3430
3430
  * Get a detached handle to a previously-created trace, looked up by the
3431
3431
  * caller-supplied id (the same id passed at trace creation).
3432
3432
  *
3433
- * The returned handle is not tied to AsyncLocalStorage each method sends
3433
+ * The returned handle is not tied to AsyncLocalStorage - each method sends
3434
3434
  * to the server immediately. Useful for adding context to a trace from a
3435
3435
  * different process or thread than the one that created it.
3436
3436
  *
@@ -3611,7 +3611,7 @@ var Bitfab = class {
3611
3611
  * plain callable: plain callables are wrapped internally so each replayed
3612
3612
  * invocation records a trace tied to the test run. The plain-callable form
3613
3613
  * is how handler-instrumented workflows (LangGraph/LangChain, Claude Agent
3614
- * SDK) replay those record traces under a key with no `withSpan`-wrapped
3614
+ * SDK) replay - those record traces under a key with no `withSpan`-wrapped
3615
3615
  * root in the app.
3616
3616
  *
3617
3617
  * @param traceFunctionKey - The trace function key to replay
@@ -3635,7 +3635,7 @@ var Bitfab = class {
3635
3635
  `Function is wrapped with trace function key '${wrappedKey}' but replay was called with '${traceFunctionKey}'. Pass matching keys, or pass the unwrapped function to replay it under the explicit key.`
3636
3636
  );
3637
3637
  }
3638
- const { replay: doReplay } = await import("./replay-PZKPWKMV.js");
3638
+ const { replay: doReplay } = await import("./replay-3E43G7OC.js");
3639
3639
  return doReplay(
3640
3640
  this.httpClient,
3641
3641
  this.serviceUrl,
@@ -3763,7 +3763,7 @@ var BitfabFunction = class {
3763
3763
  return this.client.getLangGraphCallbackHandler(this.traceFunctionKey);
3764
3764
  }
3765
3765
  /**
3766
- * Alias of {@link getLangGraphCallbackHandler} LangChain and LangGraph
3766
+ * Alias of {@link getLangGraphCallbackHandler} - LangChain and LangGraph
3767
3767
  * share one callback system, so the same bound handler serves both.
3768
3768
  *
3769
3769
  * @returns A LangChain callback handler for this client and key
@@ -3778,7 +3778,7 @@ var BitfabFunction = class {
3778
3778
  * Unlike the other methods on this handle, `wrapBAML` does NOT use the bound
3779
3779
  * key: it opens no span of its own. It enriches the *current* span (via
3780
3780
  * `getCurrentSpan().setPrompt()` / `addContext()`), so call it inside a
3781
- * function wrapped by this handle's `withSpan` the bound key keys that
3781
+ * function wrapped by this handle's `withSpan` - the bound key keys that
3782
3782
  * wrapper, and the BAML prompt/metadata attach to it.
3783
3783
  *
3784
3784
  * @param methodOrClient - Either a BAML method (uses constructor bamlClient) or the BAML client instance
@@ -3860,4 +3860,4 @@ export {
3860
3860
  BitfabFunction,
3861
3861
  finalizers
3862
3862
  };
3863
- //# sourceMappingURL=chunk-NZFPJRD3.js.map
3863
+ //# sourceMappingURL=chunk-3F46BMPM.js.map