@raindrop-ai/ai-sdk 0.0.7 → 0.0.8

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.
@@ -84,7 +84,7 @@ async function postJson(url, body, headers, opts) {
84
84
  // package.json
85
85
  var package_default = {
86
86
  name: "@raindrop-ai/ai-sdk",
87
- version: "0.0.7"};
87
+ version: "0.0.8"};
88
88
 
89
89
  // src/internal/version.ts
90
90
  var libraryName = package_default.name;
@@ -2548,6 +2548,7 @@ function startDoStreamSpan(operationId, options, modelInfo, parent, ctx) {
2548
2548
  });
2549
2549
  }
2550
2550
  function resolveContext(context, info) {
2551
+ if (context === void 0) return {};
2551
2552
  return typeof context === "function" ? context(info) : context;
2552
2553
  }
2553
2554
  function wrapOnFinish(args, onFinish) {
@@ -2654,7 +2655,7 @@ function createRaindropAISDK(opts) {
2654
2655
  return {
2655
2656
  wrap(aiSDK, options) {
2656
2657
  return wrapAISDK(aiSDK, {
2657
- options,
2658
+ options: options != null ? options : {},
2658
2659
  eventShipper,
2659
2660
  traceShipper
2660
2661
  });
package/dist/index.d.mts CHANGED
@@ -217,7 +217,7 @@ type EventPatch = {
217
217
  timestamp?: string;
218
218
  };
219
219
  type RaindropAISDKClient = {
220
- wrap<T extends object>(aiSDK: T, options: WrapAISDKOptions): T;
220
+ wrap<T extends object>(aiSDK: T, options?: WrapAISDKOptions): T;
221
221
  events: {
222
222
  patch(eventId: string, patch: EventPatch): Promise<void>;
223
223
  addAttachments(eventId: string, attachments: Attachment[]): Promise<void>;
package/dist/index.d.ts CHANGED
@@ -217,7 +217,7 @@ type EventPatch = {
217
217
  timestamp?: string;
218
218
  };
219
219
  type RaindropAISDKClient = {
220
- wrap<T extends object>(aiSDK: T, options: WrapAISDKOptions): T;
220
+ wrap<T extends object>(aiSDK: T, options?: WrapAISDKOptions): T;
221
221
  events: {
222
222
  patch(eventId: string, patch: EventPatch): Promise<void>;
223
223
  addAttachments(eventId: string, attachments: Attachment[]): Promise<void>;
package/dist/index.js CHANGED
@@ -86,7 +86,7 @@ async function postJson(url, body, headers, opts) {
86
86
  // package.json
87
87
  var package_default = {
88
88
  name: "@raindrop-ai/ai-sdk",
89
- version: "0.0.7"};
89
+ version: "0.0.8"};
90
90
 
91
91
  // src/internal/version.ts
92
92
  var libraryName = package_default.name;
@@ -2550,6 +2550,7 @@ function startDoStreamSpan(operationId, options, modelInfo, parent, ctx) {
2550
2550
  });
2551
2551
  }
2552
2552
  function resolveContext(context, info) {
2553
+ if (context === void 0) return {};
2553
2554
  return typeof context === "function" ? context(info) : context;
2554
2555
  }
2555
2556
  function wrapOnFinish(args, onFinish) {
@@ -2656,7 +2657,7 @@ function createRaindropAISDK(opts) {
2656
2657
  return {
2657
2658
  wrap(aiSDK, options) {
2658
2659
  return wrapAISDK(aiSDK, {
2659
- options,
2660
+ options: options != null ? options : {},
2660
2661
  eventShipper,
2661
2662
  traceShipper
2662
2663
  });
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { _resetWarnedMissingUserId, createRaindropAISDK, currentSpan, eventMetadata, getContextManager, withCurrent } from './chunk-6ICSE4FE.mjs';
1
+ export { _resetWarnedMissingUserId, createRaindropAISDK, currentSpan, eventMetadata, getContextManager, withCurrent } from './chunk-NFWQZOEK.mjs';
@@ -90,7 +90,7 @@ async function postJson(url, body, headers, opts) {
90
90
  // package.json
91
91
  var package_default = {
92
92
  name: "@raindrop-ai/ai-sdk",
93
- version: "0.0.7"};
93
+ version: "0.0.8"};
94
94
 
95
95
  // src/internal/version.ts
96
96
  var libraryName = package_default.name;
@@ -2554,6 +2554,7 @@ function startDoStreamSpan(operationId, options, modelInfo, parent, ctx) {
2554
2554
  });
2555
2555
  }
2556
2556
  function resolveContext(context, info) {
2557
+ if (context === void 0) return {};
2557
2558
  return typeof context === "function" ? context(info) : context;
2558
2559
  }
2559
2560
  function wrapOnFinish(args, onFinish) {
@@ -2660,7 +2661,7 @@ function createRaindropAISDK(opts) {
2660
2661
  return {
2661
2662
  wrap(aiSDK, options) {
2662
2663
  return wrapAISDK(aiSDK, {
2663
- options,
2664
+ options: options != null ? options : {},
2664
2665
  eventShipper,
2665
2666
  traceShipper
2666
2667
  });
@@ -1,4 +1,4 @@
1
- export { _resetWarnedMissingUserId, createRaindropAISDK, currentSpan, eventMetadata, getContextManager, withCurrent } from './chunk-6ICSE4FE.mjs';
1
+ export { _resetWarnedMissingUserId, createRaindropAISDK, currentSpan, eventMetadata, getContextManager, withCurrent } from './chunk-NFWQZOEK.mjs';
2
2
  import { AsyncLocalStorage } from 'async_hooks';
3
3
 
4
4
  globalThis.RAINDROP_ASYNC_LOCAL_STORAGE = AsyncLocalStorage;
@@ -90,7 +90,7 @@ async function postJson(url, body, headers, opts) {
90
90
  // package.json
91
91
  var package_default = {
92
92
  name: "@raindrop-ai/ai-sdk",
93
- version: "0.0.7"};
93
+ version: "0.0.8"};
94
94
 
95
95
  // src/internal/version.ts
96
96
  var libraryName = package_default.name;
@@ -2554,6 +2554,7 @@ function startDoStreamSpan(operationId, options, modelInfo, parent, ctx) {
2554
2554
  });
2555
2555
  }
2556
2556
  function resolveContext(context, info) {
2557
+ if (context === void 0) return {};
2557
2558
  return typeof context === "function" ? context(info) : context;
2558
2559
  }
2559
2560
  function wrapOnFinish(args, onFinish) {
@@ -2660,7 +2661,7 @@ function createRaindropAISDK(opts) {
2660
2661
  return {
2661
2662
  wrap(aiSDK, options) {
2662
2663
  return wrapAISDK(aiSDK, {
2663
- options,
2664
+ options: options != null ? options : {},
2664
2665
  eventShipper,
2665
2666
  traceShipper
2666
2667
  });
@@ -1,4 +1,4 @@
1
- export { _resetWarnedMissingUserId, createRaindropAISDK, currentSpan, eventMetadata, getContextManager, withCurrent } from './chunk-6ICSE4FE.mjs';
1
+ export { _resetWarnedMissingUserId, createRaindropAISDK, currentSpan, eventMetadata, getContextManager, withCurrent } from './chunk-NFWQZOEK.mjs';
2
2
  import { AsyncLocalStorage } from 'async_hooks';
3
3
 
4
4
  if (!globalThis.RAINDROP_ASYNC_LOCAL_STORAGE) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raindrop-ai/ai-sdk",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Standalone Vercel AI SDK integration for Raindrop (events + OTLP/HTTP JSON traces, no OTEL runtime)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",