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.cjs CHANGED
@@ -501,7 +501,7 @@ __export(index_exports, {
501
501
  module.exports = __toCommonJS(index_exports);
502
502
 
503
503
  // src/version.generated.ts
504
- var __version__ = "0.23.2";
504
+ var __version__ = "0.23.3";
505
505
 
506
506
  // src/constants.ts
507
507
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -1442,6 +1442,16 @@ var BitfabClaudeAgentHandler = class {
1442
1442
  // src/client.ts
1443
1443
  init_asyncStorage();
1444
1444
 
1445
+ // src/optionalPeer.ts
1446
+ function importOptionalPeer(specifierParts) {
1447
+ const specifier = specifierParts.join("/");
1448
+ return import(
1449
+ /* webpackIgnore: true */
1450
+ /* @vite-ignore */
1451
+ specifier
1452
+ );
1453
+ }
1454
+
1445
1455
  // src/baml.ts
1446
1456
  var cachedBaml = null;
1447
1457
  async function loadBaml() {
@@ -1449,7 +1459,7 @@ async function loadBaml() {
1449
1459
  return cachedBaml;
1450
1460
  }
1451
1461
  try {
1452
- cachedBaml = await import("@boundaryml/baml");
1462
+ cachedBaml = await importOptionalPeer(["@boundaryml", "baml"]);
1453
1463
  return cachedBaml;
1454
1464
  } catch {
1455
1465
  throw new Error(
@@ -2292,7 +2302,10 @@ var BitfabOpenAIAgentHandler = class {
2292
2302
  this.getActiveSpanContext = config.getActiveSpanContext;
2293
2303
  }
2294
2304
  async wrapRun(agent, input, options) {
2295
- const { run } = await import("@openai/agents");
2305
+ const { run } = await importOptionalPeer([
2306
+ "@openai",
2307
+ "agents"
2308
+ ]);
2296
2309
  if (this.getActiveSpanContext?.() != null) {
2297
2310
  return run(
2298
2311
  agent,
@@ -2843,7 +2856,10 @@ async function loadCollectorClass() {
2843
2856
  return cachedCollectorClass;
2844
2857
  }
2845
2858
  try {
2846
- const baml = await import("@boundaryml/baml");
2859
+ const baml = await importOptionalPeer([
2860
+ "@boundaryml",
2861
+ "baml"
2862
+ ]);
2847
2863
  cachedCollectorClass = baml.Collector;
2848
2864
  return cachedCollectorClass;
2849
2865
  } catch {