bitfab 0.23.2 → 0.23.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.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { Agent, AgentInputItem, RunState, NonStreamRunOptions, RunResult, StreamRunOptions, StreamedRunResult, Trace, Span } from '@openai/agents';
1
+ import { Agent, AgentInputItem, RunState, NonStreamRunOptions, RunResult, StreamRunOptions, StreamedRunResult } from '@openai/agents';
2
2
 
3
3
  /**
4
4
  * BAML execution utilities for the Bitfab TypeScript SDK.
@@ -708,7 +708,19 @@ interface ReplayResult<T> {
708
708
  * This module provides utilities for sending external traces (e.g., from OpenAI API calls)
709
709
  * to Bitfab for monitoring and analysis.
710
710
  */
711
-
711
+ interface Trace {
712
+ traceId: string;
713
+ toJSON(): unknown;
714
+ }
715
+ interface Span<_T = any> {
716
+ traceId?: string;
717
+ toJSON(): unknown;
718
+ spanData?: {
719
+ type?: string;
720
+ _input?: unknown;
721
+ _response?: unknown;
722
+ } | null;
723
+ }
712
724
  interface TraceResponse {
713
725
  traceId: string;
714
726
  status: "success";
@@ -1358,7 +1370,7 @@ declare class BitfabFunction {
1358
1370
  /**
1359
1371
  * SDK version from package.json (injected at build time)
1360
1372
  */
1361
- declare const __version__ = "0.23.2";
1373
+ declare const __version__ = "0.23.3";
1362
1374
 
1363
1375
  /**
1364
1376
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Agent, AgentInputItem, RunState, NonStreamRunOptions, RunResult, StreamRunOptions, StreamedRunResult, Trace, Span } from '@openai/agents';
1
+ import { Agent, AgentInputItem, RunState, NonStreamRunOptions, RunResult, StreamRunOptions, StreamedRunResult } from '@openai/agents';
2
2
 
3
3
  /**
4
4
  * BAML execution utilities for the Bitfab TypeScript SDK.
@@ -708,7 +708,19 @@ interface ReplayResult<T> {
708
708
  * This module provides utilities for sending external traces (e.g., from OpenAI API calls)
709
709
  * to Bitfab for monitoring and analysis.
710
710
  */
711
-
711
+ interface Trace {
712
+ traceId: string;
713
+ toJSON(): unknown;
714
+ }
715
+ interface Span<_T = any> {
716
+ traceId?: string;
717
+ toJSON(): unknown;
718
+ spanData?: {
719
+ type?: string;
720
+ _input?: unknown;
721
+ _response?: unknown;
722
+ } | null;
723
+ }
712
724
  interface TraceResponse {
713
725
  traceId: string;
714
726
  status: "success";
@@ -1358,7 +1370,7 @@ declare class BitfabFunction {
1358
1370
  /**
1359
1371
  * SDK version from package.json (injected at build time)
1360
1372
  */
1361
- declare const __version__ = "0.23.2";
1373
+ declare const __version__ = "0.23.3";
1362
1374
 
1363
1375
  /**
1364
1376
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  flushTraces,
24
24
  getCurrentSpan,
25
25
  getCurrentTrace
26
- } from "./chunk-PP5K6RIU.js";
26
+ } from "./chunk-CG6LVLBK.js";
27
27
  import {
28
28
  BitfabError
29
29
  } from "./chunk-EQI6ZJC3.js";
package/dist/node.cjs CHANGED
@@ -515,7 +515,7 @@ registerAsyncLocalStorageClass(
515
515
  );
516
516
 
517
517
  // src/version.generated.ts
518
- var __version__ = "0.23.2";
518
+ var __version__ = "0.23.3";
519
519
 
520
520
  // src/constants.ts
521
521
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -1456,6 +1456,16 @@ var BitfabClaudeAgentHandler = class {
1456
1456
  // src/client.ts
1457
1457
  init_asyncStorage();
1458
1458
 
1459
+ // src/optionalPeer.ts
1460
+ function importOptionalPeer(specifierParts) {
1461
+ const specifier = specifierParts.join("/");
1462
+ return import(
1463
+ /* webpackIgnore: true */
1464
+ /* @vite-ignore */
1465
+ specifier
1466
+ );
1467
+ }
1468
+
1459
1469
  // src/baml.ts
1460
1470
  var cachedBaml = null;
1461
1471
  async function loadBaml() {
@@ -1463,7 +1473,7 @@ async function loadBaml() {
1463
1473
  return cachedBaml;
1464
1474
  }
1465
1475
  try {
1466
- cachedBaml = await import("@boundaryml/baml");
1476
+ cachedBaml = await importOptionalPeer(["@boundaryml", "baml"]);
1467
1477
  return cachedBaml;
1468
1478
  } catch {
1469
1479
  throw new Error(
@@ -2306,7 +2316,10 @@ var BitfabOpenAIAgentHandler = class {
2306
2316
  this.getActiveSpanContext = config.getActiveSpanContext;
2307
2317
  }
2308
2318
  async wrapRun(agent, input, options) {
2309
- const { run } = await import("@openai/agents");
2319
+ const { run } = await importOptionalPeer([
2320
+ "@openai",
2321
+ "agents"
2322
+ ]);
2310
2323
  if (this.getActiveSpanContext?.() != null) {
2311
2324
  return run(
2312
2325
  agent,
@@ -2857,7 +2870,10 @@ async function loadCollectorClass() {
2857
2870
  return cachedCollectorClass;
2858
2871
  }
2859
2872
  try {
2860
- const baml = await import("@boundaryml/baml");
2873
+ const baml = await importOptionalPeer([
2874
+ "@boundaryml",
2875
+ "baml"
2876
+ ]);
2861
2877
  cachedCollectorClass = baml.Collector;
2862
2878
  return cachedCollectorClass;
2863
2879
  } catch {