@raindrop-ai/ai-sdk 0.3.0 → 0.3.1

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.
@@ -4,7 +4,7 @@ var async_hooks = require('async_hooks');
4
4
 
5
5
  // src/index.node.ts
6
6
 
7
- // ../core/dist/chunk-YUIXRQWN.js
7
+ // ../core/dist/chunk-3V4MIA75.js
8
8
  function normalizeFeatureFlags(input) {
9
9
  if (Array.isArray(input)) {
10
10
  return Object.fromEntries(input.map((name) => [name, "true"]));
@@ -1136,6 +1136,7 @@ var EventShipper = class {
1136
1136
  }
1137
1137
  };
1138
1138
  var MODEL_USAGE_ATTRIBUTES = {
1139
+ usageSource: "raindrop.usage.source",
1139
1140
  providerName: "gen_ai.provider.name",
1140
1141
  requestModel: "gen_ai.request.model",
1141
1142
  responseModel: "gen_ai.response.model",
@@ -1144,20 +1145,22 @@ var MODEL_USAGE_ATTRIBUTES = {
1144
1145
  reasoningTokens: "gen_ai.usage.reasoning_tokens",
1145
1146
  cacheReadInputTokens: "gen_ai.usage.cache_read_input_tokens",
1146
1147
  cacheWriteInputTokens: "gen_ai.usage.cache_write_input_tokens",
1147
- nonCachedInputTokens: "raindrop.usage.input_tokens.non_cached",
1148
- nonReasoningOutputTokens: "raindrop.usage.output_tokens.non_reasoning",
1149
- reasoningOutputTokens: "raindrop.usage.output_tokens.reasoning",
1150
- cacheReadTokens: "raindrop.usage.input_tokens.cache_read",
1151
- cacheWriteTokens: "raindrop.usage.input_tokens.cache_write"
1152
- };
1148
+ providerReportedCost: "gen_ai.usage.provider_reported_cost"};
1153
1149
  var MODEL_PROVIDER_NAMES = [
1150
+ ["google.vertex.anthropic", "google-vertex"],
1151
+ ["google.vertex_ai", "google-vertex"],
1154
1152
  ["google.vertex", "google-vertex"],
1153
+ ["gcp.vertex_ai", "google-vertex"],
1154
+ ["gcp.gemini", "google"],
1155
+ ["google_vertexai", "google-vertex"],
1155
1156
  ["vertex.anthropic", "google-vertex"],
1156
1157
  ["amazon-bedrock", "amazon-bedrock"],
1158
+ ["aws.bedrock", "amazon-bedrock"],
1157
1159
  ["bedrock", "amazon-bedrock"],
1158
1160
  ["anthropic", "anthropic"],
1159
1161
  ["openai", "openai"],
1160
1162
  ["google", "google"],
1163
+ ["az.ai.openai", "azure"],
1161
1164
  ["azure", "azure"],
1162
1165
  ["openrouter", "openrouter"]
1163
1166
  ];
@@ -1168,60 +1171,20 @@ function canonicalModelProvider(provider) {
1168
1171
  const match = MODEL_PROVIDER_NAMES.find(
1169
1172
  ([family]) => normalizedProvider === family || normalizedProvider.startsWith(`${family}.`)
1170
1173
  );
1171
- return (_a = match == null ? void 0 : match[1]) != null ? _a : provider;
1174
+ return (_a = match == null ? void 0 : match[1]) != null ? _a : normalizedProvider;
1172
1175
  }
1173
1176
  function tokenCount(value) {
1174
1177
  return typeof value === "number" && Number.isSafeInteger(value) && value >= 0 ? value : void 0;
1175
1178
  }
1176
- function exclusiveTokens({
1177
- explicit,
1178
- total,
1179
- parts,
1180
- semantics
1181
- }) {
1182
- if (explicit !== void 0) return explicit;
1183
- if (total === void 0) return void 0;
1184
- if (semantics === "exclusive") return total;
1185
- const observedParts = parts.filter((part) => part !== void 0 && part > 0);
1186
- if (semantics === void 0 && observedParts.length > 0) return void 0;
1187
- const exclusive = total - observedParts.reduce((sum, part) => sum + part, 0);
1188
- return exclusive >= 0 ? exclusive : void 0;
1189
- }
1190
- function buildModelUsageAttributes(usage) {
1191
- const inputTokens = tokenCount(usage.inputTokens);
1192
- const outputTokens = tokenCount(usage.outputTokens);
1193
- const explicitNonCachedInputTokens = tokenCount(usage.nonCachedInputTokens);
1194
- const explicitNonReasoningOutputTokens = tokenCount(usage.nonReasoningOutputTokens);
1195
- const reasoningTokens = tokenCount(usage.reasoningTokens);
1196
- const cacheReadInputTokens = tokenCount(usage.cacheReadInputTokens);
1197
- const cacheWriteInputTokens = tokenCount(usage.cacheWriteInputTokens);
1198
- const nonCachedInputTokens = exclusiveTokens({
1199
- explicit: explicitNonCachedInputTokens,
1200
- total: inputTokens,
1201
- parts: [cacheReadInputTokens, cacheWriteInputTokens],
1202
- semantics: usage.inputTokenSemantics
1203
- });
1204
- const nonReasoningOutputTokens = exclusiveTokens({
1205
- explicit: explicitNonReasoningOutputTokens,
1206
- total: outputTokens,
1207
- parts: [reasoningTokens],
1208
- semantics: usage.outputTokenSemantics
1209
- });
1210
- const exclusivePoolAttributes = nonCachedInputTokens !== void 0 && nonReasoningOutputTokens !== void 0 ? [
1211
- // backend consumes this complete raindrop.* set as one atomic billing-pool contract.
1212
- attrInt(MODEL_USAGE_ATTRIBUTES.nonCachedInputTokens, nonCachedInputTokens),
1213
- attrInt(MODEL_USAGE_ATTRIBUTES.nonReasoningOutputTokens, nonReasoningOutputTokens),
1214
- attrInt(MODEL_USAGE_ATTRIBUTES.reasoningOutputTokens, reasoningTokens),
1215
- attrInt(MODEL_USAGE_ATTRIBUTES.cacheReadTokens, cacheReadInputTokens),
1216
- attrInt(MODEL_USAGE_ATTRIBUTES.cacheWriteTokens, cacheWriteInputTokens)
1217
- ] : [];
1179
+ function buildRawModelUsageAttributes(usage) {
1180
+ const providerReportedCost = typeof usage.providerReportedCost === "number" && Number.isFinite(usage.providerReportedCost) && usage.providerReportedCost >= 0 ? usage.providerReportedCost : void 0;
1218
1181
  return [
1219
- attrInt(MODEL_USAGE_ATTRIBUTES.inputTokens, inputTokens),
1220
- attrInt(MODEL_USAGE_ATTRIBUTES.outputTokens, outputTokens),
1221
- attrInt(MODEL_USAGE_ATTRIBUTES.reasoningTokens, reasoningTokens),
1222
- attrInt(MODEL_USAGE_ATTRIBUTES.cacheReadInputTokens, cacheReadInputTokens),
1223
- attrInt(MODEL_USAGE_ATTRIBUTES.cacheWriteInputTokens, cacheWriteInputTokens),
1224
- ...exclusivePoolAttributes
1182
+ attrInt(MODEL_USAGE_ATTRIBUTES.inputTokens, tokenCount(usage.inputTokens)),
1183
+ attrInt(MODEL_USAGE_ATTRIBUTES.outputTokens, tokenCount(usage.outputTokens)),
1184
+ attrInt(MODEL_USAGE_ATTRIBUTES.reasoningTokens, tokenCount(usage.reasoningTokens)),
1185
+ attrInt(MODEL_USAGE_ATTRIBUTES.cacheReadInputTokens, tokenCount(usage.cacheReadInputTokens)),
1186
+ attrInt(MODEL_USAGE_ATTRIBUTES.cacheWriteInputTokens, tokenCount(usage.cacheWriteInputTokens)),
1187
+ attrDouble(MODEL_USAGE_ATTRIBUTES.providerReportedCost, providerReportedCost)
1225
1188
  ].filter((attribute) => attribute !== void 0);
1226
1189
  }
1227
1190
  var STRING_ALIASES = {
@@ -1885,7 +1848,7 @@ installTracingSuppressionHook();
1885
1848
  // package.json
1886
1849
  var package_default = {
1887
1850
  name: "@raindrop-ai/ai-sdk",
1888
- version: "0.3.0"};
1851
+ version: "0.3.1"};
1889
1852
 
1890
1853
  // src/internal/version.ts
1891
1854
  var libraryName = package_default.name;
@@ -3129,29 +3092,6 @@ function firstTokenCount(...values) {
3129
3092
  }
3130
3093
  return void 0;
3131
3094
  }
3132
- function flatUsageSemantics(provider) {
3133
- const normalizedProvider = typeof provider === "string" ? provider.trim().toLowerCase() : void 0;
3134
- if (normalizedProvider === "anthropic" || (normalizedProvider == null ? void 0 : normalizedProvider.startsWith("anthropic.")) || normalizedProvider === "vertex.anthropic" || (normalizedProvider == null ? void 0 : normalizedProvider.startsWith("vertex.anthropic."))) {
3135
- return {
3136
- inputTokenSemantics: "exclusive",
3137
- outputTokenSemantics: "total"
3138
- };
3139
- }
3140
- if (normalizedProvider === "openai" || (normalizedProvider == null ? void 0 : normalizedProvider.startsWith("openai.")) || normalizedProvider === "azure" || (normalizedProvider == null ? void 0 : normalizedProvider.startsWith("azure."))) {
3141
- return {
3142
- inputTokenSemantics: "total",
3143
- outputTokenSemantics: "total"
3144
- };
3145
- }
3146
- if (normalizedProvider === "google" || (normalizedProvider == null ? void 0 : normalizedProvider.startsWith("google."))) {
3147
- return {
3148
- inputTokenSemantics: "total",
3149
- // Google v5 reports candidate output and thoughts separately.
3150
- outputTokenSemantics: "exclusive"
3151
- };
3152
- }
3153
- return {};
3154
- }
3155
3095
  var CACHE_WRITE_METADATA_KEYS = [
3156
3096
  ["anthropic", "cacheCreationInputTokens"],
3157
3097
  ["openai", "cacheWriteTokens"],
@@ -3168,7 +3108,7 @@ function cacheWriteTokensFromProviderMetadata(providerMetadata) {
3168
3108
  })
3169
3109
  );
3170
3110
  }
3171
- function extractUsageMetricsFromUsage(usage, provider, providerMetadata) {
3111
+ function extractUsageMetricsFromUsage(usage, _provider, providerMetadata) {
3172
3112
  if (!isRecord(usage)) return {};
3173
3113
  const inputTokenValue = usage["inputTokens"];
3174
3114
  const outputTokenValue = usage["outputTokens"];
@@ -3236,7 +3176,7 @@ function extractUsageMetricsFromUsage(usage, provider, providerMetadata) {
3236
3176
  cacheReadInputTokens,
3237
3177
  cachedInputTokens: cacheReadInputTokens,
3238
3178
  cacheWriteInputTokens,
3239
- ...hasStructuredUsage ? {} : flatUsageSemantics(provider)
3179
+ ...hasStructuredUsage ? { usageSource: "ai-sdk-structured" } : {}
3240
3180
  };
3241
3181
  }
3242
3182
 
@@ -3588,7 +3528,8 @@ var RaindropTelemetryIntegration = class {
3588
3528
  attrInt("ai.usage.totalTokens", usageMetrics.totalTokens),
3589
3529
  attrInt("ai.usage.reasoningTokens", usageMetrics.reasoningTokens),
3590
3530
  attrInt("ai.usage.cachedInputTokens", usageMetrics.cachedInputTokens),
3591
- ...buildModelUsageAttributes(usageMetrics)
3531
+ attrString(MODEL_USAGE_ATTRIBUTES.usageSource, usageMetrics.usageSource),
3532
+ ...buildRawModelUsageAttributes(usageMetrics)
3592
3533
  );
3593
3534
  }
3594
3535
  this.emitProviderExecutedToolSpans(event, state);
@@ -4536,9 +4477,7 @@ function extractRaindropMetadata(metadata) {
4536
4477
  } catch (e) {
4537
4478
  }
4538
4479
  } else if (featureFlags && typeof featureFlags === "object") {
4539
- result.featureFlags = normalizeFeatureFlags(
4540
- featureFlags
4541
- );
4480
+ result.featureFlags = normalizeFeatureFlags(featureFlags);
4542
4481
  }
4543
4482
  return result;
4544
4483
  }
@@ -4749,12 +4688,7 @@ function setupOperation(params) {
4749
4688
  ...attrsFromTelemetryMetadata(telemetry == null ? void 0 : telemetry.metadata),
4750
4689
  ...attrsFromHeaders(isRecord(arg) ? arg["headers"] : void 0),
4751
4690
  ...attrsFromSettings(arg),
4752
- ...(telemetry == null ? void 0 : telemetry.recordInputs) === false ? [] : [
4753
- attrString(
4754
- "ai.prompt",
4755
- safeJsonWithUint8(normalizePromptAttr(arg))
4756
- )
4757
- ]
4691
+ ...(telemetry == null ? void 0 : telemetry.recordInputs) === false ? [] : [attrString("ai.prompt", safeJsonWithUint8(normalizePromptAttr(arg)))]
4758
4692
  ]
4759
4693
  }) : void 0;
4760
4694
  const rootParentForChildren = rootSpan ? { traceIdB64: rootSpan.ids.traceIdB64, spanIdB64: rootSpan.ids.spanIdB64 } : inheritedParent;
@@ -5104,7 +5038,10 @@ function wrapAISDK(aiSDK, deps) {
5104
5038
  }
5105
5039
  const useNative = deps.options.nativeTelemetry === true;
5106
5040
  if (useNative) {
5107
- const wrapTimeCtx = resolveContext(deps.options.context, { operation: "wrap", args: void 0 });
5041
+ const wrapTimeCtx = resolveContext(deps.options.context, {
5042
+ operation: "wrap",
5043
+ args: void 0
5044
+ });
5108
5045
  const integration = new RaindropTelemetryIntegration({
5109
5046
  traceShipper: deps.traceShipper,
5110
5047
  eventShipper: deps.eventShipper,
@@ -5349,7 +5286,13 @@ function wrapAgentGenerate(generate, instance, agentSettings, className, aiSDK,
5349
5286
  ...(telemetry == null ? void 0 : telemetry.recordInputs) === false ? [] : [
5350
5287
  attrString(
5351
5288
  "ai.prompt",
5352
- safeJsonWithUint8(normalizePromptAttr({ system: (_d = mergedArgs["system"]) != null ? _d : mergedArgs["instructions"], prompt: mergedArgs["prompt"], messages: mergedArgs["messages"] }))
5289
+ safeJsonWithUint8(
5290
+ normalizePromptAttr({
5291
+ system: (_d = mergedArgs["system"]) != null ? _d : mergedArgs["instructions"],
5292
+ prompt: mergedArgs["prompt"],
5293
+ messages: mergedArgs["messages"]
5294
+ })
5295
+ )
5353
5296
  )
5354
5297
  ]
5355
5298
  ]
@@ -5563,7 +5506,13 @@ function wrapAgentStream(stream, instance, agentSettings, className, aiSDK, deps
5563
5506
  ...(telemetry == null ? void 0 : telemetry.recordInputs) === false ? [] : [
5564
5507
  attrString(
5565
5508
  "ai.prompt",
5566
- safeJsonWithUint8(normalizePromptAttr({ system: (_d = mergedArgs["system"]) != null ? _d : mergedArgs["instructions"], prompt: mergedArgs["prompt"], messages: mergedArgs["messages"] }))
5509
+ safeJsonWithUint8(
5510
+ normalizePromptAttr({
5511
+ system: (_d = mergedArgs["system"]) != null ? _d : mergedArgs["instructions"],
5512
+ prompt: mergedArgs["prompt"],
5513
+ messages: mergedArgs["messages"]
5514
+ })
5515
+ )
5567
5516
  )
5568
5517
  ]
5569
5518
  ]
@@ -5940,9 +5889,19 @@ function wrapModel(args, aiSDK, outerOperationId, ctx) {
5940
5889
  for (const part of content) {
5941
5890
  if (isRecord(part)) {
5942
5891
  if ((part["type"] === "reasoning" || part["type"] === "thinking") && typeof ((_a = part["text"]) != null ? _a : part["thinking"]) === "string") {
5943
- sendLocalDebuggerLiveEvent({ traceId, type: "reasoning_delta", content: (_b = part["text"]) != null ? _b : part["thinking"], metadata: liveMeta });
5892
+ sendLocalDebuggerLiveEvent({
5893
+ traceId,
5894
+ type: "reasoning_delta",
5895
+ content: (_b = part["text"]) != null ? _b : part["thinking"],
5896
+ metadata: liveMeta
5897
+ });
5944
5898
  } else if (part["type"] === "text" && typeof part["text"] === "string") {
5945
- sendLocalDebuggerLiveEvent({ traceId, type: "text_delta", content: part["text"], metadata: liveMeta });
5899
+ sendLocalDebuggerLiveEvent({
5900
+ traceId,
5901
+ type: "text_delta",
5902
+ content: part["text"],
5903
+ metadata: liveMeta
5904
+ });
5946
5905
  }
5947
5906
  }
5948
5907
  }
@@ -6023,7 +5982,10 @@ function wrapModel(args, aiSDK, outerOperationId, ctx) {
6023
5982
  attributes: [
6024
5983
  ...((_a = ctx.telemetry) == null ? void 0 : _a.recordOutputs) === false ? [] : [
6025
5984
  attrString("ai.response.finishReason", finishReason),
6026
- attrString("ai.response.text", activeText.length ? capText2(activeText) : void 0),
5985
+ attrString(
5986
+ "ai.response.text",
5987
+ activeText.length ? capText2(activeText) : void 0
5988
+ ),
6027
5989
  attrString(
6028
5990
  "ai.response.toolCalls",
6029
5991
  safeJsonWithUint8(toolCallsLocal.length ? toolCallsLocal : void 0)
@@ -6041,7 +6003,8 @@ function wrapModel(args, aiSDK, outerOperationId, ctx) {
6041
6003
  ...finishReason ? [attrStringArray("gen_ai.response.finish_reasons", [finishReason])] : [],
6042
6004
  attrString("gen_ai.response.id", responseId),
6043
6005
  attrString(MODEL_USAGE_ATTRIBUTES.responseModel, finalResponseModelId),
6044
- ...buildModelUsageAttributes(usageMetrics),
6006
+ attrString(MODEL_USAGE_ATTRIBUTES.usageSource, usageMetrics.usageSource),
6007
+ ...buildRawModelUsageAttributes(usageMetrics),
6045
6008
  ...msToFirstChunk !== void 0 ? [attrInt("ai.stream.msToFirstChunk", msToFirstChunk)] : [],
6046
6009
  ...msToFinish !== void 0 ? [attrInt("ai.stream.msToFinish", msToFinish)] : [],
6047
6010
  ...avgOutTokensPerSecond !== void 0 ? [attrDouble("ai.stream.avgOutputTokensPerSecond", avgOutTokensPerSecond)] : [],
@@ -6095,19 +6058,44 @@ function wrapModel(args, aiSDK, outerOperationId, ctx) {
6095
6058
  if ("providerMetadata" in value) providerMetadata = value["providerMetadata"];
6096
6059
  if (localDebuggerEnabled() && ctx.rootParentForChildren) {
6097
6060
  const traceId = ctx.rootParentForChildren.traceIdB64;
6098
- const liveMeta = getLocalDebuggerMetadata({ ...ctx.context, eventId: ctx.eventId });
6061
+ const liveMeta = getLocalDebuggerMetadata({
6062
+ ...ctx.context,
6063
+ eventId: ctx.eventId
6064
+ });
6099
6065
  if (type === "text-delta") {
6100
6066
  const text = typeof value["delta"] === "string" ? value["delta"] : typeof value["textDelta"] === "string" ? value["textDelta"] : typeof value["text"] === "string" ? value["text"] : void 0;
6101
- if (typeof text === "string" && text) sendLocalDebuggerLiveEvent({ traceId, type: "text_delta", content: text, metadata: liveMeta });
6067
+ if (typeof text === "string" && text)
6068
+ sendLocalDebuggerLiveEvent({
6069
+ traceId,
6070
+ type: "text_delta",
6071
+ content: text,
6072
+ metadata: liveMeta
6073
+ });
6102
6074
  } else if (type === "reasoning" || type === "reasoning-delta") {
6103
6075
  const text = typeof value["delta"] === "string" ? value["delta"] : typeof value["text"] === "string" ? value["text"] : typeof value["thinking"] === "string" ? value["thinking"] : void 0;
6104
- if (typeof text === "string" && text) sendLocalDebuggerLiveEvent({ traceId, type: "reasoning_delta", content: text, metadata: liveMeta });
6076
+ if (typeof text === "string" && text)
6077
+ sendLocalDebuggerLiveEvent({
6078
+ traceId,
6079
+ type: "reasoning_delta",
6080
+ content: text,
6081
+ metadata: liveMeta
6082
+ });
6105
6083
  } else if (type === "tool-call") {
6106
6084
  const toolName = typeof value["toolName"] === "string" ? value["toolName"] : "tool";
6107
- sendLocalDebuggerLiveEvent({ traceId, type: "tool_start", content: toolName, metadata: { ...liveMeta, args: value["args"] } });
6085
+ sendLocalDebuggerLiveEvent({
6086
+ traceId,
6087
+ type: "tool_start",
6088
+ content: toolName,
6089
+ metadata: { ...liveMeta, args: value["args"] }
6090
+ });
6108
6091
  } else if (type === "tool-result") {
6109
6092
  const toolName = typeof value["toolName"] === "string" ? value["toolName"] : "tool";
6110
- sendLocalDebuggerLiveEvent({ traceId, type: "tool_result", content: toolName, metadata: { ...liveMeta, result: value["result"] } });
6093
+ sendLocalDebuggerLiveEvent({
6094
+ traceId,
6095
+ type: "tool_result",
6096
+ content: toolName,
6097
+ metadata: { ...liveMeta, result: value["result"] }
6098
+ });
6111
6099
  }
6112
6100
  }
6113
6101
  }
@@ -6187,11 +6175,7 @@ function endDoGenerateSpan(span, result, modelInfo, ctx) {
6187
6175
  } else {
6188
6176
  responseTimestampIso = (/* @__PURE__ */ new Date()).toISOString();
6189
6177
  }
6190
- const usageMetrics = extractUsageMetricsFromUsage(
6191
- usage,
6192
- modelInfo.provider,
6193
- providerMetadata
6194
- );
6178
+ const usageMetrics = extractUsageMetricsFromUsage(usage, modelInfo.provider, providerMetadata);
6195
6179
  const { inputTokens, outputTokens } = usageMetrics;
6196
6180
  ctx.traceShipper.endSpan(span, {
6197
6181
  attributes: [
@@ -6212,7 +6196,8 @@ function endDoGenerateSpan(span, result, modelInfo, ctx) {
6212
6196
  ...finishReason ? [attrStringArray("gen_ai.response.finish_reasons", [finishReason])] : [],
6213
6197
  attrString("gen_ai.response.id", responseId),
6214
6198
  attrString(MODEL_USAGE_ATTRIBUTES.responseModel, responseModelId),
6215
- ...buildModelUsageAttributes(usageMetrics)
6199
+ attrString(MODEL_USAGE_ATTRIBUTES.usageSource, usageMetrics.usageSource),
6200
+ ...buildRawModelUsageAttributes(usageMetrics)
6216
6201
  ]
6217
6202
  });
6218
6203
  }
@@ -1,4 +1,4 @@
1
- export { DEFAULT_MAX_TEXT_FIELD_CHARS, DEFAULT_REDACT_ATTRIBUTE_KEYS, DEFAULT_SECRET_KEY_NAMES, DETACHED_MODE, HANDOFF_ATTRIBUTE_PREFIXES, HANDOFF_ATTRIBUTE_SUFFIXES, HANDOFF_TERMINAL_CANCELLED, HANDOFF_TERMINAL_PROPERTY_KEY, REDACTED_PLACEHOLDER, RaindropTelemetryIntegration, SUBAGENT_ABORTED_OUTPUT, SUBAGENT_AGENT_ROLE, SUBAGENT_CANCELLED_OUTPUT, TOOL_EVENTS_ALLOW, TRUNCATION_MARKER, _resetParentToolContextStorage, _resetRaindropCallMetadataStorage, _resetWarnedMissingUserId, boundedStringify, capText, clearParentToolContext, createRaindropAISDK, currentSpan, defaultTransformSpan, enterParentToolContext, eventMetadata, eventMetadataFromChatRequest, fromHeaders, getContextManager, getCurrentParentToolContext, getCurrentRaindropCallMetadata, normalizeFeatureFlags, raindrop, readRaindropCallMetadataFromArgs, redactJsonAttributeValue, redactSecretsInObject, resetUnresolvedCarrierWarning, runWithParentToolContext, runWithRaindropCallMetadata, toHeaders, toLangSmithHeaders, withCurrent } from './chunk-GMY7QXIQ.mjs';
1
+ export { DEFAULT_MAX_TEXT_FIELD_CHARS, DEFAULT_REDACT_ATTRIBUTE_KEYS, DEFAULT_SECRET_KEY_NAMES, DETACHED_MODE, HANDOFF_ATTRIBUTE_PREFIXES, HANDOFF_ATTRIBUTE_SUFFIXES, HANDOFF_TERMINAL_CANCELLED, HANDOFF_TERMINAL_PROPERTY_KEY, REDACTED_PLACEHOLDER, RaindropTelemetryIntegration, SUBAGENT_ABORTED_OUTPUT, SUBAGENT_AGENT_ROLE, SUBAGENT_CANCELLED_OUTPUT, TOOL_EVENTS_ALLOW, TRUNCATION_MARKER, _resetParentToolContextStorage, _resetRaindropCallMetadataStorage, _resetWarnedMissingUserId, boundedStringify, capText, clearParentToolContext, createRaindropAISDK, currentSpan, defaultTransformSpan, enterParentToolContext, eventMetadata, eventMetadataFromChatRequest, fromHeaders, getContextManager, getCurrentParentToolContext, getCurrentRaindropCallMetadata, normalizeFeatureFlags, raindrop, readRaindropCallMetadataFromArgs, redactJsonAttributeValue, redactSecretsInObject, resetUnresolvedCarrierWarning, runWithParentToolContext, runWithRaindropCallMetadata, toHeaders, toLangSmithHeaders, withCurrent } from './chunk-SGSAYTKI.mjs';
2
2
  import { AsyncLocalStorage } from 'async_hooks';
3
3
 
4
4
  globalThis.RAINDROP_ASYNC_LOCAL_STORAGE = AsyncLocalStorage;