@bitfab/sdk 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.cjs CHANGED
@@ -492,7 +492,7 @@ __export(index_exports, {
492
492
  module.exports = __toCommonJS(index_exports);
493
493
 
494
494
  // src/version.generated.ts
495
- var __version__ = "0.23.2";
495
+ var __version__ = "0.23.3";
496
496
 
497
497
  // src/constants.ts
498
498
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -1433,6 +1433,16 @@ var BitfabClaudeAgentHandler = class {
1433
1433
  // src/client.ts
1434
1434
  init_asyncStorage();
1435
1435
 
1436
+ // src/optionalPeer.ts
1437
+ function importOptionalPeer(specifierParts) {
1438
+ const specifier = specifierParts.join("/");
1439
+ return import(
1440
+ /* webpackIgnore: true */
1441
+ /* @vite-ignore */
1442
+ specifier
1443
+ );
1444
+ }
1445
+
1436
1446
  // src/baml.ts
1437
1447
  var cachedBaml = null;
1438
1448
  async function loadBaml() {
@@ -1440,7 +1450,7 @@ async function loadBaml() {
1440
1450
  return cachedBaml;
1441
1451
  }
1442
1452
  try {
1443
- cachedBaml = await import("@boundaryml/baml");
1453
+ cachedBaml = await importOptionalPeer(["@boundaryml", "baml"]);
1444
1454
  return cachedBaml;
1445
1455
  } catch {
1446
1456
  throw new Error(
@@ -2283,7 +2293,10 @@ var BitfabOpenAIAgentHandler = class {
2283
2293
  this.getActiveSpanContext = config.getActiveSpanContext;
2284
2294
  }
2285
2295
  async wrapRun(agent, input, options) {
2286
- const { run } = await import("@openai/agents");
2296
+ const { run } = await importOptionalPeer([
2297
+ "@openai",
2298
+ "agents"
2299
+ ]);
2287
2300
  if (this.getActiveSpanContext?.() != null) {
2288
2301
  return run(
2289
2302
  agent,
@@ -2834,7 +2847,10 @@ async function loadCollectorClass() {
2834
2847
  return cachedCollectorClass;
2835
2848
  }
2836
2849
  try {
2837
- const baml = await import("@boundaryml/baml");
2850
+ const baml = await importOptionalPeer([
2851
+ "@boundaryml",
2852
+ "baml"
2853
+ ]);
2838
2854
  cachedCollectorClass = baml.Collector;
2839
2855
  return cachedCollectorClass;
2840
2856
  } catch {