@elizaos/server 1.5.11-alpha.5 → 1.5.11-alpha.6

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.
Files changed (2) hide show
  1. package/dist/index.js +481 -209
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -27454,7 +27454,7 @@ import express30 from "express";
27454
27454
  // package.json
27455
27455
  var package_default = {
27456
27456
  name: "@elizaos/server",
27457
- version: "1.5.11-alpha.5",
27457
+ version: "1.5.11-alpha.6",
27458
27458
  description: "ElizaOS Server - Core server infrastructure for ElizaOS agents",
27459
27459
  publishConfig: {
27460
27460
  access: "public",
@@ -29011,7 +29011,7 @@ var DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
29011
29011
  var GLOBAL_OBJ = globalThis;
29012
29012
 
29013
29013
  // ../../node_modules/@sentry/core/build/esm/utils/version.js
29014
- var SDK_VERSION = "10.12.0";
29014
+ var SDK_VERSION = "10.13.0";
29015
29015
 
29016
29016
  // ../../node_modules/@sentry/core/build/esm/carrier.js
29017
29017
  function getMainCarrier() {
@@ -30797,7 +30797,7 @@ function getActiveSpan() {
30797
30797
  function showSpanDropWarning() {
30798
30798
  if (!hasShownSpanDropWarning) {
30799
30799
  consoleSandbox(() => {
30800
- console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.");
30800
+ console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.");
30801
30801
  });
30802
30802
  hasShownSpanDropWarning = true;
30803
30803
  }
@@ -30832,6 +30832,50 @@ function hasSpansEnabled(maybeOptions) {
30832
30832
  return !!options && (options.tracesSampleRate != null || !!options.tracesSampler);
30833
30833
  }
30834
30834
 
30835
+ // ../../node_modules/@sentry/core/build/esm/utils/should-ignore-span.js
30836
+ function logIgnoredSpan(droppedSpan) {
30837
+ debug.log(`Ignoring span ${droppedSpan.op} - ${droppedSpan.description} because it matches \`ignoreSpans\`.`);
30838
+ }
30839
+ function shouldIgnoreSpan(span, ignoreSpans) {
30840
+ if (!ignoreSpans?.length || !span.description) {
30841
+ return false;
30842
+ }
30843
+ for (const pattern of ignoreSpans) {
30844
+ if (isStringOrRegExp(pattern)) {
30845
+ if (isMatchingPattern(span.description, pattern)) {
30846
+ DEBUG_BUILD && logIgnoredSpan(span);
30847
+ return true;
30848
+ }
30849
+ continue;
30850
+ }
30851
+ if (!pattern.name && !pattern.op) {
30852
+ continue;
30853
+ }
30854
+ const nameMatches = pattern.name ? isMatchingPattern(span.description, pattern.name) : true;
30855
+ const opMatches = pattern.op ? span.op && isMatchingPattern(span.op, pattern.op) : true;
30856
+ if (nameMatches && opMatches) {
30857
+ DEBUG_BUILD && logIgnoredSpan(span);
30858
+ return true;
30859
+ }
30860
+ }
30861
+ return false;
30862
+ }
30863
+ function reparentChildSpans(spans, dropSpan) {
30864
+ const droppedSpanParentId = dropSpan.parent_span_id;
30865
+ const droppedSpanId = dropSpan.span_id;
30866
+ if (!droppedSpanParentId) {
30867
+ return;
30868
+ }
30869
+ for (const span of spans) {
30870
+ if (span.parent_span_id === droppedSpanId) {
30871
+ span.parent_span_id = droppedSpanParentId;
30872
+ }
30873
+ }
30874
+ }
30875
+ function isStringOrRegExp(value) {
30876
+ return typeof value === "string" || value instanceof RegExp;
30877
+ }
30878
+
30835
30879
  // ../../node_modules/@sentry/core/build/esm/constants.js
30836
30880
  var DEFAULT_ENVIRONMENT = "production";
30837
30881
 
@@ -31189,45 +31233,6 @@ function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn) {
31189
31233
  };
31190
31234
  }
31191
31235
 
31192
- // ../../node_modules/@sentry/core/build/esm/utils/should-ignore-span.js
31193
- function shouldIgnoreSpan(span, ignoreSpans) {
31194
- if (!ignoreSpans?.length || !span.description) {
31195
- return false;
31196
- }
31197
- for (const pattern of ignoreSpans) {
31198
- if (isStringOrRegExp(pattern)) {
31199
- if (isMatchingPattern(span.description, pattern)) {
31200
- return true;
31201
- }
31202
- continue;
31203
- }
31204
- if (!pattern.name && !pattern.op) {
31205
- continue;
31206
- }
31207
- const nameMatches = pattern.name ? isMatchingPattern(span.description, pattern.name) : true;
31208
- const opMatches = pattern.op ? span.op && isMatchingPattern(span.op, pattern.op) : true;
31209
- if (nameMatches && opMatches) {
31210
- return true;
31211
- }
31212
- }
31213
- return false;
31214
- }
31215
- function reparentChildSpans(spans, dropSpan) {
31216
- const droppedSpanParentId = dropSpan.parent_span_id;
31217
- const droppedSpanId = dropSpan.span_id;
31218
- if (!droppedSpanParentId) {
31219
- return;
31220
- }
31221
- for (const span of spans) {
31222
- if (span.parent_span_id === droppedSpanId) {
31223
- span.parent_span_id = droppedSpanParentId;
31224
- }
31225
- }
31226
- }
31227
- function isStringOrRegExp(value) {
31228
- return typeof value === "string" || value instanceof RegExp;
31229
- }
31230
-
31231
31236
  // ../../node_modules/@sentry/core/build/esm/envelope.js
31232
31237
  function _enhanceEventWithSdkInfo(event, newSdkInfo) {
31233
31238
  if (!newSdkInfo) {
@@ -31584,7 +31589,7 @@ function sendSpanEnvelope(envelope) {
31584
31589
  }
31585
31590
 
31586
31591
  // ../../node_modules/@sentry/core/build/esm/utils/handleCallbackErrors.js
31587
- function handleCallbackErrors(fn, onError, onFinally = () => {}) {
31592
+ function handleCallbackErrors(fn, onError, onFinally = () => {}, onSuccess = () => {}) {
31588
31593
  let maybePromiseResult;
31589
31594
  try {
31590
31595
  maybePromiseResult = fn();
@@ -31593,12 +31598,13 @@ function handleCallbackErrors(fn, onError, onFinally = () => {}) {
31593
31598
  onFinally();
31594
31599
  throw e;
31595
31600
  }
31596
- return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally);
31601
+ return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally, onSuccess);
31597
31602
  }
31598
- function maybeHandlePromiseRejection(value, onError, onFinally) {
31603
+ function maybeHandlePromiseRejection(value, onError, onFinally, onSuccess) {
31599
31604
  if (isThenable(value)) {
31600
31605
  return value.then((res) => {
31601
31606
  onFinally();
31607
+ onSuccess(res);
31602
31608
  return res;
31603
31609
  }, (e) => {
31604
31610
  onError(e);
@@ -31607,6 +31613,7 @@ function maybeHandlePromiseRejection(value, onError, onFinally) {
31607
31613
  });
31608
31614
  }
31609
31615
  onFinally();
31616
+ onSuccess(value);
31610
31617
  return value;
31611
31618
  }
31612
31619
 
@@ -32707,23 +32714,21 @@ class Client {
32707
32714
  getTransport() {
32708
32715
  return this._transport;
32709
32716
  }
32710
- flush(timeout) {
32717
+ async flush(timeout) {
32711
32718
  const transport = this._transport;
32712
- if (transport) {
32713
- this.emit("flush");
32714
- return this._isClientDoneProcessing(timeout).then((clientFinished) => {
32715
- return transport.flush(timeout).then((transportFlushed) => clientFinished && transportFlushed);
32716
- });
32717
- } else {
32718
- return resolvedSyncPromise(true);
32719
+ if (!transport) {
32720
+ return true;
32719
32721
  }
32722
+ this.emit("flush");
32723
+ const clientFinished = await this._isClientDoneProcessing(timeout);
32724
+ const transportFlushed = await transport.flush(timeout);
32725
+ return clientFinished && transportFlushed;
32720
32726
  }
32721
- close(timeout) {
32722
- return this.flush(timeout).then((result) => {
32723
- this.getOptions().enabled = false;
32724
- this.emit("close");
32725
- return result;
32726
- });
32727
+ async close(timeout) {
32728
+ const result = await this.flush(timeout);
32729
+ this.getOptions().enabled = false;
32730
+ this.emit("close");
32731
+ return result;
32727
32732
  }
32728
32733
  getEventProcessors() {
32729
32734
  return this._eventProcessors;
@@ -32785,13 +32790,11 @@ class Client {
32785
32790
  }
32786
32791
  }
32787
32792
  on(hook, callback) {
32788
- const hooks = this._hooks[hook] = this._hooks[hook] || [];
32789
- hooks.push(callback);
32793
+ const hookCallbacks = this._hooks[hook] = this._hooks[hook] || new Set;
32794
+ const uniqueCallback = (...args) => callback(...args);
32795
+ hookCallbacks.add(uniqueCallback);
32790
32796
  return () => {
32791
- const cbIndex = hooks.indexOf(callback);
32792
- if (cbIndex > -1) {
32793
- hooks.splice(cbIndex, 1);
32794
- }
32797
+ hookCallbacks.delete(uniqueCallback);
32795
32798
  };
32796
32799
  }
32797
32800
  emit(hook, ...rest) {
@@ -32800,16 +32803,18 @@ class Client {
32800
32803
  callbacks.forEach((callback) => callback(...rest));
32801
32804
  }
32802
32805
  }
32803
- sendEnvelope(envelope) {
32806
+ async sendEnvelope(envelope) {
32804
32807
  this.emit("beforeEnvelope", envelope);
32805
32808
  if (this._isEnabled() && this._transport) {
32806
- return this._transport.send(envelope).then(null, (reason) => {
32809
+ try {
32810
+ return await this._transport.send(envelope);
32811
+ } catch (reason) {
32807
32812
  DEBUG_BUILD && debug.error("Error while sending envelope:", reason);
32808
32813
  return {};
32809
- });
32814
+ }
32810
32815
  }
32811
32816
  DEBUG_BUILD && debug.error("Transport disabled");
32812
- return resolvedSyncPromise({});
32817
+ return {};
32813
32818
  }
32814
32819
  _setupIntegrations() {
32815
32820
  const { integrations } = this._options;
@@ -32840,23 +32845,16 @@ class Client {
32840
32845
  this.captureSession(session);
32841
32846
  }
32842
32847
  }
32843
- _isClientDoneProcessing(timeout) {
32844
- return new SyncPromise((resolve) => {
32845
- let ticked = 0;
32846
- const tick = 1;
32847
- const interval = setInterval(() => {
32848
- if (this._numProcessing == 0) {
32849
- clearInterval(interval);
32850
- resolve(true);
32851
- } else {
32852
- ticked += tick;
32853
- if (timeout && ticked >= timeout) {
32854
- clearInterval(interval);
32855
- resolve(false);
32856
- }
32857
- }
32858
- }, tick);
32859
- });
32848
+ async _isClientDoneProcessing(timeout) {
32849
+ let ticked = 0;
32850
+ while (!timeout || ticked < timeout) {
32851
+ await new Promise((resolve) => setTimeout(resolve, 1));
32852
+ if (!this._numProcessing) {
32853
+ return true;
32854
+ }
32855
+ ticked++;
32856
+ }
32857
+ return false;
32860
32858
  }
32861
32859
  _isEnabled() {
32862
32860
  return this.getOptions().enabled !== false && this._transport !== undefined;
@@ -33167,7 +33165,7 @@ function createLogEnvelope(logs, metadata, tunnel, dsn) {
33167
33165
  return createEnvelope(headers, [createLogContainerEnvelopeItem(logs)]);
33168
33166
  }
33169
33167
 
33170
- // ../../node_modules/@sentry/core/build/esm/logs/exports.js
33168
+ // ../../node_modules/@sentry/core/build/esm/logs/internal.js
33171
33169
  function _INTERNAL_flushLogsBuffer(client, maybeLogBuffer) {
33172
33170
  const logBuffer = maybeLogBuffer ?? _INTERNAL_getLogBuffer(client) ?? [];
33173
33171
  if (logBuffer.length === 0) {
@@ -33568,7 +33566,7 @@ function createTransport(options, makeRequest, buffer = makePromiseBuffer(option
33568
33566
  }
33569
33567
  });
33570
33568
  if (filteredEnvelopeItems.length === 0) {
33571
- return resolvedSyncPromise({});
33569
+ return Promise.resolve({});
33572
33570
  }
33573
33571
  const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems);
33574
33572
  const recordEnvelopeLoss = (reason) => {
@@ -33591,7 +33589,7 @@ function createTransport(options, makeRequest, buffer = makePromiseBuffer(option
33591
33589
  if (error2 === SENTRY_BUFFER_FULL_ERROR) {
33592
33590
  DEBUG_BUILD && debug.error("Skipped sending event because buffer is full.");
33593
33591
  recordEnvelopeLoss("queue_overflow");
33594
- return resolvedSyncPromise({});
33592
+ return Promise.resolve({});
33595
33593
  } else {
33596
33594
  throw error2;
33597
33595
  }
@@ -35061,6 +35059,9 @@ function getFinalOperationName(methodPath) {
35061
35059
  if (methodPath.includes("models")) {
35062
35060
  return "models";
35063
35061
  }
35062
+ if (methodPath.includes("chat")) {
35063
+ return "chat";
35064
+ }
35064
35065
  return methodPath.split(".").pop() || "unknown";
35065
35066
  }
35066
35067
  function getSpanOperation2(methodPath) {
@@ -35088,18 +35089,6 @@ function setTokenUsageAttributes2(span, promptTokens, completionTokens, cachedIn
35088
35089
  }
35089
35090
  }
35090
35091
 
35091
- // ../../node_modules/@sentry/core/build/esm/utils/anthropic-ai/constants.js
35092
- var ANTHROPIC_AI_INTEGRATION_NAME = "Anthropic_AI";
35093
- var ANTHROPIC_AI_INSTRUMENTED_METHODS = [
35094
- "messages.create",
35095
- "messages.stream",
35096
- "messages.countTokens",
35097
- "models.get",
35098
- "completions.create",
35099
- "models.retrieve",
35100
- "beta.messages.create"
35101
- ];
35102
-
35103
35092
  // ../../node_modules/@sentry/core/build/esm/utils/anthropic-ai/streaming.js
35104
35093
  function isErrorEvent3(event, span) {
35105
35094
  if ("type" in event && typeof event.type === "string") {
@@ -35249,6 +35238,18 @@ async function* instrumentStream2(stream, span, recordOutputs) {
35249
35238
  }
35250
35239
  }
35251
35240
 
35241
+ // ../../node_modules/@sentry/core/build/esm/utils/anthropic-ai/constants.js
35242
+ var ANTHROPIC_AI_INTEGRATION_NAME = "Anthropic_AI";
35243
+ var ANTHROPIC_AI_INSTRUMENTED_METHODS = [
35244
+ "messages.create",
35245
+ "messages.stream",
35246
+ "messages.countTokens",
35247
+ "models.get",
35248
+ "completions.create",
35249
+ "models.retrieve",
35250
+ "beta.messages.create"
35251
+ ];
35252
+
35252
35253
  // ../../node_modules/@sentry/core/build/esm/utils/anthropic-ai/utils.js
35253
35254
  function shouldInstrument2(methodPath) {
35254
35255
  return ANTHROPIC_AI_INSTRUMENTED_METHODS.includes(methodPath);
@@ -35367,19 +35368,8 @@ function addResponseAttributes2(span, response, recordOutputs) {
35367
35368
  }
35368
35369
  addMetadataAttributes(span, response);
35369
35370
  }
35370
- function getRecordingOptionsFromIntegration() {
35371
- const scope = getCurrentScope();
35372
- const client = scope.getClient();
35373
- const integration = client?.getIntegrationByName(ANTHROPIC_AI_INTEGRATION_NAME);
35374
- const shouldRecordInputsAndOutputs = integration ? Boolean(client?.getOptions().sendDefaultPii) : false;
35375
- return {
35376
- recordInputs: integration?.options?.recordInputs ?? shouldRecordInputsAndOutputs,
35377
- recordOutputs: integration?.options?.recordOutputs ?? shouldRecordInputsAndOutputs
35378
- };
35379
- }
35380
35371
  function instrumentMethod2(originalMethod, methodPath, context, options) {
35381
35372
  return async function instrumentedMethod(...args) {
35382
- const finalOptions = options || getRecordingOptionsFromIntegration();
35383
35373
  const requestAttributes = extractRequestAttributes2(args, methodPath);
35384
35374
  const model = requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? "unknown";
35385
35375
  const operationName = getFinalOperationName(methodPath);
@@ -35393,11 +35383,11 @@ function instrumentMethod2(originalMethod, methodPath, context, options) {
35393
35383
  attributes: requestAttributes
35394
35384
  }, async (span) => {
35395
35385
  try {
35396
- if (finalOptions.recordInputs && params) {
35386
+ if (options.recordInputs && params) {
35397
35387
  addPrivateRequestAttributes(span, params);
35398
35388
  }
35399
35389
  const result = await originalMethod.apply(context, args);
35400
- return instrumentStream2(result, span, finalOptions.recordOutputs ?? false);
35390
+ return instrumentStream2(result, span, options.recordOutputs ?? false);
35401
35391
  } catch (error2) {
35402
35392
  span.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" });
35403
35393
  captureException(error2, {
@@ -35418,15 +35408,11 @@ function instrumentMethod2(originalMethod, methodPath, context, options) {
35418
35408
  name: `${operationName} ${model}`,
35419
35409
  op: getSpanOperation2(methodPath),
35420
35410
  attributes: requestAttributes
35421
- }, async (span) => {
35422
- try {
35423
- if (finalOptions.recordInputs && args[0] && typeof args[0] === "object") {
35424
- addPrivateRequestAttributes(span, args[0]);
35425
- }
35426
- const result = await originalMethod.apply(context, args);
35427
- addResponseAttributes2(span, result, finalOptions.recordOutputs);
35428
- return result;
35429
- } catch (error2) {
35411
+ }, (span) => {
35412
+ if (options.recordInputs && params) {
35413
+ addPrivateRequestAttributes(span, params);
35414
+ }
35415
+ return handleCallbackErrors(() => originalMethod.apply(context, args), (error2) => {
35430
35416
  captureException(error2, {
35431
35417
  mechanism: {
35432
35418
  handled: false,
@@ -35436,8 +35422,7 @@ function instrumentMethod2(originalMethod, methodPath, context, options) {
35436
35422
  }
35437
35423
  }
35438
35424
  });
35439
- throw error2;
35440
- }
35425
+ }, () => {}, (result) => addResponseAttributes2(span, result, options.recordOutputs));
35441
35426
  });
35442
35427
  };
35443
35428
  }
@@ -35459,8 +35444,195 @@ function createDeepProxy2(target, currentPath = "", options) {
35459
35444
  }
35460
35445
  });
35461
35446
  }
35462
- function instrumentAnthropicAiClient(client, options) {
35463
- return createDeepProxy2(client, "", options);
35447
+ function instrumentAnthropicAiClient(anthropicAiClient, options) {
35448
+ const sendDefaultPii = Boolean(getClient()?.getOptions().sendDefaultPii);
35449
+ const _options = {
35450
+ recordInputs: sendDefaultPii,
35451
+ recordOutputs: sendDefaultPii,
35452
+ ...options
35453
+ };
35454
+ return createDeepProxy2(anthropicAiClient, "", _options);
35455
+ }
35456
+ // ../../node_modules/@sentry/core/build/esm/utils/google-genai/constants.js
35457
+ var GOOGLE_GENAI_INTEGRATION_NAME = "Google_GenAI";
35458
+ var GOOGLE_GENAI_INSTRUMENTED_METHODS = ["models.generateContent", "chats.create", "sendMessage"];
35459
+ var GOOGLE_GENAI_SYSTEM_NAME = "google_genai";
35460
+ var CHATS_CREATE_METHOD = "chats.create";
35461
+ var CHAT_PATH = "chat";
35462
+
35463
+ // ../../node_modules/@sentry/core/build/esm/utils/google-genai/utils.js
35464
+ function shouldInstrument3(methodPath) {
35465
+ if (GOOGLE_GENAI_INSTRUMENTED_METHODS.includes(methodPath)) {
35466
+ return true;
35467
+ }
35468
+ const methodName = methodPath.split(".").pop();
35469
+ return GOOGLE_GENAI_INSTRUMENTED_METHODS.includes(methodName);
35470
+ }
35471
+
35472
+ // ../../node_modules/@sentry/core/build/esm/utils/google-genai/index.js
35473
+ function extractModel(params, context) {
35474
+ if ("model" in params && typeof params.model === "string") {
35475
+ return params.model;
35476
+ }
35477
+ if (context && typeof context === "object") {
35478
+ const contextObj = context;
35479
+ if ("model" in contextObj && typeof contextObj.model === "string") {
35480
+ return contextObj.model;
35481
+ }
35482
+ if ("modelVersion" in contextObj && typeof contextObj.modelVersion === "string") {
35483
+ return contextObj.modelVersion;
35484
+ }
35485
+ }
35486
+ return "unknown";
35487
+ }
35488
+ function extractConfigAttributes(config) {
35489
+ const attributes = {};
35490
+ if ("temperature" in config && typeof config.temperature === "number") {
35491
+ attributes[GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE] = config.temperature;
35492
+ }
35493
+ if ("topP" in config && typeof config.topP === "number") {
35494
+ attributes[GEN_AI_REQUEST_TOP_P_ATTRIBUTE] = config.topP;
35495
+ }
35496
+ if ("topK" in config && typeof config.topK === "number") {
35497
+ attributes[GEN_AI_REQUEST_TOP_K_ATTRIBUTE] = config.topK;
35498
+ }
35499
+ if ("maxOutputTokens" in config && typeof config.maxOutputTokens === "number") {
35500
+ attributes[GEN_AI_REQUEST_MAX_TOKENS_ATTRIBUTE] = config.maxOutputTokens;
35501
+ }
35502
+ if ("frequencyPenalty" in config && typeof config.frequencyPenalty === "number") {
35503
+ attributes[GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE] = config.frequencyPenalty;
35504
+ }
35505
+ if ("presencePenalty" in config && typeof config.presencePenalty === "number") {
35506
+ attributes[GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE] = config.presencePenalty;
35507
+ }
35508
+ return attributes;
35509
+ }
35510
+ function extractRequestAttributes3(args, methodPath, context) {
35511
+ const attributes = {
35512
+ [GEN_AI_SYSTEM_ATTRIBUTE]: GOOGLE_GENAI_SYSTEM_NAME,
35513
+ [GEN_AI_OPERATION_NAME_ATTRIBUTE]: getFinalOperationName(methodPath),
35514
+ [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ai.google_genai"
35515
+ };
35516
+ if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) {
35517
+ const params = args[0];
35518
+ attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = extractModel(params, context);
35519
+ if ("config" in params && typeof params.config === "object" && params.config) {
35520
+ Object.assign(attributes, extractConfigAttributes(params.config));
35521
+ }
35522
+ } else {
35523
+ attributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] = extractModel({}, context);
35524
+ }
35525
+ return attributes;
35526
+ }
35527
+ function addPrivateRequestAttributes2(span, params) {
35528
+ if ("contents" in params) {
35529
+ span.setAttributes({ [GEN_AI_REQUEST_MESSAGES_ATTRIBUTE]: JSON.stringify(params.contents) });
35530
+ }
35531
+ if ("message" in params) {
35532
+ span.setAttributes({ [GEN_AI_REQUEST_MESSAGES_ATTRIBUTE]: JSON.stringify(params.message) });
35533
+ }
35534
+ if ("history" in params) {
35535
+ span.setAttributes({ [GEN_AI_REQUEST_MESSAGES_ATTRIBUTE]: JSON.stringify(params.history) });
35536
+ }
35537
+ }
35538
+ function addResponseAttributes3(span, response, recordOutputs) {
35539
+ if (!response || typeof response !== "object")
35540
+ return;
35541
+ if (response.usageMetadata && typeof response.usageMetadata === "object") {
35542
+ const usage = response.usageMetadata;
35543
+ if (typeof usage.promptTokenCount === "number") {
35544
+ span.setAttributes({
35545
+ [GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE]: usage.promptTokenCount
35546
+ });
35547
+ }
35548
+ if (typeof usage.candidatesTokenCount === "number") {
35549
+ span.setAttributes({
35550
+ [GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE]: usage.candidatesTokenCount
35551
+ });
35552
+ }
35553
+ if (typeof usage.totalTokenCount === "number") {
35554
+ span.setAttributes({
35555
+ [GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE]: usage.totalTokenCount
35556
+ });
35557
+ }
35558
+ }
35559
+ if (recordOutputs && Array.isArray(response.candidates) && response.candidates.length > 0) {
35560
+ const responseTexts = response.candidates.map((candidate) => {
35561
+ if (candidate.content?.parts && Array.isArray(candidate.content.parts)) {
35562
+ return candidate.content.parts.map((part) => typeof part.text === "string" ? part.text : "").filter((text) => text.length > 0).join("");
35563
+ }
35564
+ return "";
35565
+ }).filter((text) => text.length > 0);
35566
+ if (responseTexts.length > 0) {
35567
+ span.setAttributes({
35568
+ [GEN_AI_RESPONSE_TEXT_ATTRIBUTE]: responseTexts.join("")
35569
+ });
35570
+ }
35571
+ }
35572
+ }
35573
+ function instrumentMethod3(originalMethod, methodPath, context, options) {
35574
+ const isSyncCreate = methodPath === CHATS_CREATE_METHOD;
35575
+ const run = (...args) => {
35576
+ const requestAttributes = extractRequestAttributes3(args, methodPath, context);
35577
+ const model = requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? "unknown";
35578
+ const operationName = getFinalOperationName(methodPath);
35579
+ return startSpan({
35580
+ name: isSyncCreate ? `${operationName} ${model} create` : `${operationName} ${model}`,
35581
+ op: getSpanOperation2(methodPath),
35582
+ attributes: requestAttributes
35583
+ }, (span) => {
35584
+ if (options.recordInputs && args[0] && typeof args[0] === "object") {
35585
+ addPrivateRequestAttributes2(span, args[0]);
35586
+ }
35587
+ return handleCallbackErrors(() => originalMethod.apply(context, args), (error2) => {
35588
+ captureException(error2, {
35589
+ mechanism: { handled: false, type: "auto.ai.google_genai", data: { function: methodPath } }
35590
+ });
35591
+ }, () => {}, (result) => {
35592
+ if (!isSyncCreate) {
35593
+ addResponseAttributes3(span, result, options.recordOutputs);
35594
+ }
35595
+ });
35596
+ });
35597
+ };
35598
+ return run;
35599
+ }
35600
+ function createDeepProxy3(target, currentPath = "", options) {
35601
+ return new Proxy(target, {
35602
+ get: (t, prop, receiver) => {
35603
+ const value = Reflect.get(t, prop, receiver);
35604
+ const methodPath = buildMethodPath2(currentPath, String(prop));
35605
+ if (typeof value === "function" && shouldInstrument3(methodPath)) {
35606
+ if (methodPath === CHATS_CREATE_METHOD) {
35607
+ const instrumentedMethod = instrumentMethod3(value, methodPath, t, options);
35608
+ return function instrumentedAndProxiedCreate(...args) {
35609
+ const result = instrumentedMethod(...args);
35610
+ if (result && typeof result === "object") {
35611
+ return createDeepProxy3(result, CHAT_PATH, options);
35612
+ }
35613
+ return result;
35614
+ };
35615
+ }
35616
+ return instrumentMethod3(value, methodPath, t, options);
35617
+ }
35618
+ if (typeof value === "function") {
35619
+ return value.bind(t);
35620
+ }
35621
+ if (value && typeof value === "object") {
35622
+ return createDeepProxy3(value, methodPath, options);
35623
+ }
35624
+ return value;
35625
+ }
35626
+ });
35627
+ }
35628
+ function instrumentGoogleGenAIClient(client, options) {
35629
+ const sendDefaultPii = Boolean(getClient()?.getOptions().sendDefaultPii);
35630
+ const _options = {
35631
+ recordInputs: sendDefaultPii,
35632
+ recordOutputs: sendDefaultPii,
35633
+ ...options
35634
+ };
35635
+ return createDeepProxy3(client, "", _options);
35464
35636
  }
35465
35637
  // ../../node_modules/@sentry/core/build/esm/utils/breadcrumb-log-level.js
35466
35638
  function getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {
@@ -35474,6 +35646,35 @@ function getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {
35474
35646
  return;
35475
35647
  }
35476
35648
  }
35649
+ // ../../node_modules/@sentry/core/build/esm/utils/exports.js
35650
+ function replaceExports(exports, exportName, wrappedConstructor) {
35651
+ const original = exports[exportName];
35652
+ if (typeof original !== "function") {
35653
+ return;
35654
+ }
35655
+ try {
35656
+ exports[exportName] = wrappedConstructor;
35657
+ } catch (error2) {
35658
+ Object.defineProperty(exports, exportName, {
35659
+ value: wrappedConstructor,
35660
+ writable: true,
35661
+ configurable: true,
35662
+ enumerable: true
35663
+ });
35664
+ }
35665
+ if (exports.default === original) {
35666
+ try {
35667
+ exports.default = wrappedConstructor;
35668
+ } catch (error2) {
35669
+ Object.defineProperty(exports, "default", {
35670
+ value: wrappedConstructor,
35671
+ writable: true,
35672
+ configurable: true,
35673
+ enumerable: true
35674
+ });
35675
+ }
35676
+ }
35677
+ }
35477
35678
  // ../../node_modules/@sentry/core/build/esm/utils/node-stack-trace.js
35478
35679
  function filenameIsInApp(filename, isNative = false) {
35479
35680
  const isInternal = isNative || filename && !filename.startsWith("/") && !filename.match(/^[A-Z]:/) && !filename.startsWith(".") && !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//);
@@ -35601,6 +35802,9 @@ class LRUMap {
35601
35802
  return values;
35602
35803
  }
35603
35804
  }
35805
+ // ../../node_modules/@sentry/node-core/build/esm/debug-build.js
35806
+ var DEBUG_BUILD2 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
35807
+
35604
35808
  // ../../node_modules/@sentry/node-core/build/esm/otel/instrument.js
35605
35809
  var import_instrumentation = __toESM(require_src6(), 1);
35606
35810
  var INSTRUMENTED = {};
@@ -35676,9 +35880,6 @@ var import_core40 = __toESM(require_src3(), 1);
35676
35880
  var import_instrumentation2 = __toESM(require_src6(), 1);
35677
35881
  import { subscribe, unsubscribe } from "node:diagnostics_channel";
35678
35882
 
35679
- // ../../node_modules/@sentry/node-core/build/esm/debug-build.js
35680
- var DEBUG_BUILD2 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
35681
-
35682
35883
  // ../../node_modules/@sentry/node-core/build/esm/utils/getRequestUrl.js
35683
35884
  function getRequestUrl(requestOptions) {
35684
35885
  const protocol = requestOptions.protocol || "";
@@ -37492,7 +37693,8 @@ var instrumentSentryHttp = generateInstrumentOnce(`${INTEGRATION_NAME6}.sentry`,
37492
37693
  var httpIntegration = defineIntegration((options = {}) => {
37493
37694
  const dropSpansForIncomingRequestStatusCodes = options.dropSpansForIncomingRequestStatusCodes ?? [
37494
37695
  [401, 404],
37495
- [300, 399]
37696
+ [301, 303],
37697
+ [305, 399]
37496
37698
  ];
37497
37699
  return {
37498
37700
  name: INTEGRATION_NAME6,
@@ -37507,20 +37709,27 @@ var httpIntegration = defineIntegration((options = {}) => {
37507
37709
  processEvent(event) {
37508
37710
  if (event.type === "transaction") {
37509
37711
  const statusCode = event.contexts?.trace?.data?.["http.response.status_code"];
37510
- if (typeof statusCode === "number" && dropSpansForIncomingRequestStatusCodes.some((code) => {
37511
- if (typeof code === "number") {
37512
- return code === statusCode;
37712
+ if (typeof statusCode === "number") {
37713
+ const shouldDrop = shouldFilterStatusCode(statusCode, dropSpansForIncomingRequestStatusCodes);
37714
+ if (shouldDrop) {
37715
+ DEBUG_BUILD2 && debug.log("Dropping transaction due to status code", statusCode);
37716
+ return null;
37513
37717
  }
37514
- const [min, max] = code;
37515
- return statusCode >= min && statusCode <= max;
37516
- })) {
37517
- return null;
37518
37718
  }
37519
37719
  }
37520
37720
  return event;
37521
37721
  }
37522
37722
  };
37523
37723
  });
37724
+ function shouldFilterStatusCode(statusCode, dropForStatusCodes) {
37725
+ return dropForStatusCodes.some((code) => {
37726
+ if (typeof code === "number") {
37727
+ return code === statusCode;
37728
+ }
37729
+ const [min, max] = code;
37730
+ return statusCode >= min && statusCode <= max;
37731
+ });
37732
+ }
37524
37733
  // ../../node_modules/@sentry/node-core/build/esm/integrations/node-fetch/SentryNodeFetchInstrumentation.js
37525
37734
  var import_api5 = __toESM(require_src(), 1);
37526
37735
  var import_core44 = __toESM(require_src3(), 1);
@@ -37873,7 +38082,9 @@ var PLATFORM_NAMES = {
37873
38082
  freebsd: "FreeBSD",
37874
38083
  openbsd: "OpenBSD",
37875
38084
  sunos: "SunOS",
37876
- win32: "Windows"
38085
+ win32: "Windows",
38086
+ ohos: "OpenHarmony",
38087
+ android: "Android"
37877
38088
  };
37878
38089
  var LINUX_DISTROS = [
37879
38090
  { name: "fedora-release", distros: ["Fedora"] },
@@ -38308,7 +38519,7 @@ function functionNamesMatch(a, b) {
38308
38519
  }
38309
38520
 
38310
38521
  // ../../node_modules/@sentry/node-core/build/esm/integrations/local-variables/local-variables-async.js
38311
- var base64WorkerScript = "LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjEyLjAgKGEzYTA3MGIpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQ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uY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";
38312
38523
  function log2(...args) {
38313
38524
  debug.log("[LocalVariables]", ...args);
38314
38525
  }
@@ -39580,7 +39791,7 @@ class NodeClient extends ServerRuntimeClient {
39580
39791
  }
39581
39792
  return super.flush(timeout);
39582
39793
  }
39583
- close(timeout) {
39794
+ async close(timeout) {
39584
39795
  if (this._clientReportInterval) {
39585
39796
  clearInterval(this._clientReportInterval);
39586
39797
  }
@@ -39590,7 +39801,11 @@ class NodeClient extends ServerRuntimeClient {
39590
39801
  if (this._logOnExitFlushListener) {
39591
39802
  process.off("beforeExit", this._logOnExitFlushListener);
39592
39803
  }
39593
- return super.close(timeout).then((allEventsSent) => this.traceProvider ? this.traceProvider.shutdown().then(() => allEventsSent) : allEventsSent);
39804
+ const allEventsSent = await super.close(timeout);
39805
+ if (this.traceProvider) {
39806
+ await this.traceProvider.shutdown();
39807
+ }
39808
+ return allEventsSent;
39594
39809
  }
39595
39810
  startClientReportTracking() {
39596
39811
  const clientOptions = this.getOptions();
@@ -39768,6 +39983,9 @@ function updateScopeFromEnvVariables() {
39768
39983
  function addOriginToSpan2(span, origin) {
39769
39984
  span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);
39770
39985
  }
39986
+ // ../../node_modules/@sentry/node/build/esm/debug-build.js
39987
+ var DEBUG_BUILD4 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
39988
+
39771
39989
  // ../../node_modules/@sentry/node/build/esm/integrations/http.js
39772
39990
  var INTEGRATION_NAME18 = "Http";
39773
39991
  var INSTRUMENTATION_NAME2 = "@opentelemetry_sentry-patched/instrumentation-http";
@@ -39802,7 +40020,8 @@ function _shouldUseOtelHttpInstrumentation(options, clientOptions = {}) {
39802
40020
  var httpIntegration2 = defineIntegration((options = {}) => {
39803
40021
  const dropSpansForIncomingRequestStatusCodes = options.dropSpansForIncomingRequestStatusCodes ?? [
39804
40022
  [401, 404],
39805
- [300, 399]
40023
+ [301, 303],
40024
+ [305, 399]
39806
40025
  ];
39807
40026
  return {
39808
40027
  name: INTEGRATION_NAME18,
@@ -39824,14 +40043,12 @@ var httpIntegration2 = defineIntegration((options = {}) => {
39824
40043
  processEvent(event) {
39825
40044
  if (event.type === "transaction") {
39826
40045
  const statusCode = event.contexts?.trace?.data?.["http.response.status_code"];
39827
- if (typeof statusCode === "number" && dropSpansForIncomingRequestStatusCodes.some((code) => {
39828
- if (typeof code === "number") {
39829
- return code === statusCode;
40046
+ if (typeof statusCode === "number") {
40047
+ const shouldDrop = shouldFilterStatusCode2(statusCode, dropSpansForIncomingRequestStatusCodes);
40048
+ if (shouldDrop) {
40049
+ DEBUG_BUILD4 && debug.log("Dropping transaction due to status code", statusCode);
40050
+ return null;
39830
40051
  }
39831
- const [min, max] = code;
39832
- return statusCode >= min && statusCode <= max;
39833
- })) {
39834
- return null;
39835
40052
  }
39836
40053
  }
39837
40054
  return event;
@@ -39865,6 +40082,15 @@ function getConfigWithDefaults(options = {}) {
39865
40082
  };
39866
40083
  return instrumentationConfig;
39867
40084
  }
40085
+ function shouldFilterStatusCode2(statusCode, dropForStatusCodes) {
40086
+ return dropForStatusCodes.some((code) => {
40087
+ if (typeof code === "number") {
40088
+ return code === statusCode;
40089
+ }
40090
+ const [min, max] = code;
40091
+ return statusCode >= min && statusCode <= max;
40092
+ });
40093
+ }
39868
40094
 
39869
40095
  // ../../node_modules/@sentry/node/build/esm/integrations/node-fetch.js
39870
40096
  var import_instrumentation_undici = __toESM(require_src11(), 1);
@@ -39921,11 +40147,6 @@ function getConfigWithDefaults2(options = {}) {
39921
40147
 
39922
40148
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/express.js
39923
40149
  var import_instrumentation_express = __toESM(require_src12(), 1);
39924
-
39925
- // ../../node_modules/@sentry/node/build/esm/debug-build.js
39926
- var DEBUG_BUILD4 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
39927
-
39928
- // ../../node_modules/@sentry/node/build/esm/integrations/tracing/express.js
39929
40150
  var INTEGRATION_NAME20 = "Express";
39930
40151
  function requestHook(span) {
39931
40152
  addOriginToSpan2(span, "auto.http.otel.express");
@@ -43001,36 +43222,32 @@ class SentryVercelAiInstrumentation extends import_instrumentation11.Instrumenta
43001
43222
  this._isPatched = true;
43002
43223
  this._callbacks.forEach((callback) => callback());
43003
43224
  this._callbacks = [];
43004
- function generatePatch(originalMethod) {
43005
- return (...args) => {
43006
- const existingExperimentalTelemetry = args[0].experimental_telemetry || {};
43007
- const isEnabled3 = existingExperimentalTelemetry.isEnabled;
43008
- const client = getCurrentScope().getClient();
43009
- const integration = client?.getIntegrationByName(INTEGRATION_NAME39);
43010
- const integrationOptions = integration?.options;
43011
- const shouldRecordInputsAndOutputs = integration ? Boolean(client?.getOptions().sendDefaultPii) : false;
43012
- const { recordInputs, recordOutputs } = determineRecordingSettings(integrationOptions, existingExperimentalTelemetry, isEnabled3, shouldRecordInputsAndOutputs);
43013
- args[0].experimental_telemetry = {
43014
- ...existingExperimentalTelemetry,
43015
- isEnabled: isEnabled3 !== undefined ? isEnabled3 : true,
43016
- recordInputs,
43017
- recordOutputs
43018
- };
43019
- return handleCallbackErrors(() => {
43020
- const result = originalMethod.apply(this, args);
43021
- if (isThenable(result)) {
43022
- result.then(checkResultForToolErrors, () => {});
43023
- return result;
43024
- }
43025
- checkResultForToolErrors(result);
43026
- return result;
43027
- }, (error2) => {
43028
- if (error2 && typeof error2 === "object") {
43029
- addNonEnumerableProperty(error2, "_sentry_active_span", getActiveSpan());
43030
- }
43031
- });
43032
- };
43033
- }
43225
+ const generatePatch = (originalMethod) => {
43226
+ return new Proxy(originalMethod, {
43227
+ apply: (target, thisArg, args) => {
43228
+ const existingExperimentalTelemetry = args[0].experimental_telemetry || {};
43229
+ const isEnabled3 = existingExperimentalTelemetry.isEnabled;
43230
+ const client = getClient();
43231
+ const integration = client?.getIntegrationByName(INTEGRATION_NAME39);
43232
+ const integrationOptions = integration?.options;
43233
+ const shouldRecordInputsAndOutputs = integration ? Boolean(client?.getOptions().sendDefaultPii) : false;
43234
+ const { recordInputs, recordOutputs } = determineRecordingSettings(integrationOptions, existingExperimentalTelemetry, isEnabled3, shouldRecordInputsAndOutputs);
43235
+ args[0].experimental_telemetry = {
43236
+ ...existingExperimentalTelemetry,
43237
+ isEnabled: isEnabled3 !== undefined ? isEnabled3 : true,
43238
+ recordInputs,
43239
+ recordOutputs
43240
+ };
43241
+ return handleCallbackErrors(() => Reflect.apply(target, thisArg, args), (error2) => {
43242
+ if (error2 && typeof error2 === "object") {
43243
+ addNonEnumerableProperty(error2, "_sentry_active_span", getActiveSpan());
43244
+ }
43245
+ }, () => {}, (result) => {
43246
+ checkResultForToolErrors(result);
43247
+ });
43248
+ }
43249
+ });
43250
+ };
43034
43251
  if (Object.prototype.toString.call(moduleExports) === "[object Module]") {
43035
43252
  for (const method of INSTRUMENTED_METHODS2) {
43036
43253
  moduleExports[method] = generatePatch(moduleExports[method]);
@@ -43092,10 +43309,10 @@ class SentryOpenAiInstrumentation extends import_instrumentation13.Instrumentati
43092
43309
  const Original = exports.OpenAI;
43093
43310
  const WrappedOpenAI = function(...args) {
43094
43311
  const instance = Reflect.construct(Original, args);
43095
- const scopeClient = getCurrentScope().getClient();
43096
- const integration = scopeClient?.getIntegrationByName(OPENAI_INTEGRATION_NAME);
43312
+ const client = getClient();
43313
+ const integration = client?.getIntegrationByName(OPENAI_INTEGRATION_NAME);
43097
43314
  const integrationOpts = integration?.options;
43098
- const defaultPii = Boolean(scopeClient?.getOptions().sendDefaultPii);
43315
+ const defaultPii = Boolean(client?.getOptions().sendDefaultPii);
43099
43316
  const { recordInputs, recordOutputs } = determineRecordingSettings2(integrationOpts, defaultPii);
43100
43317
  return instrumentOpenAiClient(instance, {
43101
43318
  recordInputs,
@@ -43154,11 +43371,6 @@ var openAIIntegration = defineIntegration(_openAiIntegration);
43154
43371
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/anthropic-ai/instrumentation.js
43155
43372
  var import_instrumentation15 = __toESM(require_src6(), 1);
43156
43373
  var supportedVersions2 = [">=0.19.2 <1.0.0"];
43157
- function determineRecordingSettings3(integrationOptions, defaultEnabled) {
43158
- const recordInputs = integrationOptions?.recordInputs ?? defaultEnabled;
43159
- const recordOutputs = integrationOptions?.recordOutputs ?? defaultEnabled;
43160
- return { recordInputs, recordOutputs };
43161
- }
43162
43374
 
43163
43375
  class SentryAnthropicAiInstrumentation extends import_instrumentation15.InstrumentationBase {
43164
43376
  constructor(config2 = {}) {
@@ -43170,13 +43382,13 @@ class SentryAnthropicAiInstrumentation extends import_instrumentation15.Instrume
43170
43382
  }
43171
43383
  _patch(exports) {
43172
43384
  const Original = exports.Anthropic;
43385
+ const config2 = this.getConfig();
43173
43386
  const WrappedAnthropic = function(...args) {
43174
43387
  const instance = Reflect.construct(Original, args);
43175
- const scopeClient = getCurrentScope().getClient();
43176
- const integration = scopeClient?.getIntegrationByName(ANTHROPIC_AI_INTEGRATION_NAME);
43177
- const integrationOpts = integration?.options;
43178
- const defaultPii = Boolean(scopeClient?.getOptions().sendDefaultPii);
43179
- const { recordInputs, recordOutputs } = determineRecordingSettings3(integrationOpts, defaultPii);
43388
+ const client = getClient();
43389
+ const defaultPii = Boolean(client?.getOptions().sendDefaultPii);
43390
+ const recordInputs = config2.recordInputs ?? defaultPii;
43391
+ const recordOutputs = config2.recordOutputs ?? defaultPii;
43180
43392
  return instrumentAnthropicAiClient(instance, {
43181
43393
  recordInputs,
43182
43394
  recordOutputs
@@ -43219,24 +43431,83 @@ class SentryAnthropicAiInstrumentation extends import_instrumentation15.Instrume
43219
43431
  }
43220
43432
 
43221
43433
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/anthropic-ai/index.js
43222
- var instrumentAnthropicAi = generateInstrumentOnce(ANTHROPIC_AI_INTEGRATION_NAME, () => new SentryAnthropicAiInstrumentation({}));
43434
+ var instrumentAnthropicAi = generateInstrumentOnce(ANTHROPIC_AI_INTEGRATION_NAME, (options) => new SentryAnthropicAiInstrumentation(options));
43223
43435
  var _anthropicAIIntegration = (options = {}) => {
43224
43436
  return {
43225
43437
  name: ANTHROPIC_AI_INTEGRATION_NAME,
43226
43438
  options,
43227
43439
  setupOnce() {
43228
- instrumentAnthropicAi();
43440
+ instrumentAnthropicAi(options);
43229
43441
  }
43230
43442
  };
43231
43443
  };
43232
43444
  var anthropicAIIntegration = defineIntegration(_anthropicAIIntegration);
43233
43445
 
43446
+ // ../../node_modules/@sentry/node/build/esm/integrations/tracing/google-genai/instrumentation.js
43447
+ var import_instrumentation17 = __toESM(require_src6(), 1);
43448
+ var supportedVersions3 = [">=0.10.0 <2"];
43449
+
43450
+ class SentryGoogleGenAiInstrumentation extends import_instrumentation17.InstrumentationBase {
43451
+ constructor(config2 = {}) {
43452
+ super("@sentry/instrumentation-google-genai", SDK_VERSION, config2);
43453
+ }
43454
+ init() {
43455
+ const module = new import_instrumentation17.InstrumentationNodeModuleDefinition("@google/genai", supportedVersions3, (exports) => this._patch(exports), (exports) => exports, [
43456
+ new import_instrumentation17.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs", supportedVersions3, (exports) => this._patch(exports), (exports) => exports)
43457
+ ]);
43458
+ return module;
43459
+ }
43460
+ _patch(exports) {
43461
+ const Original = exports.GoogleGenAI;
43462
+ const config2 = this.getConfig();
43463
+ if (typeof Original !== "function") {
43464
+ return exports;
43465
+ }
43466
+ const WrappedGoogleGenAI = function(...args) {
43467
+ const instance = Reflect.construct(Original, args);
43468
+ const client = getClient();
43469
+ const defaultPii = Boolean(client?.getOptions().sendDefaultPii);
43470
+ const typedConfig = config2;
43471
+ const recordInputs = typedConfig?.recordInputs ?? defaultPii;
43472
+ const recordOutputs = typedConfig?.recordOutputs ?? defaultPii;
43473
+ return instrumentGoogleGenAIClient(instance, {
43474
+ recordInputs,
43475
+ recordOutputs
43476
+ });
43477
+ };
43478
+ Object.setPrototypeOf(WrappedGoogleGenAI, Original);
43479
+ Object.setPrototypeOf(WrappedGoogleGenAI.prototype, Original.prototype);
43480
+ for (const key of Object.getOwnPropertyNames(Original)) {
43481
+ if (!["length", "name", "prototype"].includes(key)) {
43482
+ const descriptor = Object.getOwnPropertyDescriptor(Original, key);
43483
+ if (descriptor) {
43484
+ Object.defineProperty(WrappedGoogleGenAI, key, descriptor);
43485
+ }
43486
+ }
43487
+ }
43488
+ replaceExports(exports, "GoogleGenAI", WrappedGoogleGenAI);
43489
+ return exports;
43490
+ }
43491
+ }
43492
+
43493
+ // ../../node_modules/@sentry/node/build/esm/integrations/tracing/google-genai/index.js
43494
+ var instrumentGoogleGenAI = generateInstrumentOnce(GOOGLE_GENAI_INTEGRATION_NAME, (options) => new SentryGoogleGenAiInstrumentation(options));
43495
+ var _googleGenAIIntegration = (options = {}) => {
43496
+ return {
43497
+ name: GOOGLE_GENAI_INTEGRATION_NAME,
43498
+ setupOnce() {
43499
+ instrumentGoogleGenAI(options);
43500
+ }
43501
+ };
43502
+ };
43503
+ var googleGenAIIntegration = defineIntegration(_googleGenAIIntegration);
43504
+
43234
43505
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js
43235
- var import_instrumentation18 = __toESM(require_src6(), 1);
43506
+ var import_instrumentation20 = __toESM(require_src6(), 1);
43236
43507
 
43237
43508
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/firebase/otel/patches/firestore.js
43238
43509
  var import_api18 = __toESM(require_src(), 1);
43239
- var import_instrumentation17 = __toESM(require_src6(), 1);
43510
+ var import_instrumentation19 = __toESM(require_src6(), 1);
43240
43511
  var import_semantic_conventions7 = __toESM(require_src2(), 1);
43241
43512
  import * as net2 from "node:net";
43242
43513
  function patchFirestore(tracer, firestoreSupportedVersions, wrap, unwrap, config2) {
@@ -43245,7 +43516,7 @@ function patchFirestore(tracer, firestoreSupportedVersions, wrap, unwrap, config
43245
43516
  const configFirestoreSpanCreationHook = config2.firestoreSpanCreationHook;
43246
43517
  if (typeof configFirestoreSpanCreationHook === "function") {
43247
43518
  firestoreSpanCreationHook = (span) => {
43248
- import_instrumentation17.safeExecuteInTheMiddle(() => configFirestoreSpanCreationHook(span), (error2) => {
43519
+ import_instrumentation19.safeExecuteInTheMiddle(() => configFirestoreSpanCreationHook(span), (error2) => {
43249
43520
  if (!error2) {
43250
43521
  return;
43251
43522
  }
@@ -43253,7 +43524,7 @@ function patchFirestore(tracer, firestoreSupportedVersions, wrap, unwrap, config
43253
43524
  }, true);
43254
43525
  };
43255
43526
  }
43256
- const moduleFirestoreCJS = new import_instrumentation17.InstrumentationNodeModuleDefinition("@firebase/firestore", firestoreSupportedVersions, (moduleExports) => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook));
43527
+ const moduleFirestoreCJS = new import_instrumentation19.InstrumentationNodeModuleDefinition("@firebase/firestore", firestoreSupportedVersions, (moduleExports) => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook));
43257
43528
  const files = [
43258
43529
  "@firebase/firestore/dist/lite/index.node.cjs.js",
43259
43530
  "@firebase/firestore/dist/lite/index.node.mjs.js",
@@ -43261,7 +43532,7 @@ function patchFirestore(tracer, firestoreSupportedVersions, wrap, unwrap, config
43261
43532
  "@firebase/firestore/dist/lite/index.cjs.js"
43262
43533
  ];
43263
43534
  for (const file of files) {
43264
- moduleFirestoreCJS.files.push(new import_instrumentation17.InstrumentationNodeModuleFile(file, firestoreSupportedVersions, (moduleExports) => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook), (moduleExports) => unwrapMethods(moduleExports, unwrap)));
43535
+ moduleFirestoreCJS.files.push(new import_instrumentation19.InstrumentationNodeModuleFile(file, firestoreSupportedVersions, (moduleExports) => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook), (moduleExports) => unwrapMethods(moduleExports, unwrap)));
43265
43536
  }
43266
43537
  return moduleFirestoreCJS;
43267
43538
  }
@@ -43275,7 +43546,7 @@ function wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationH
43275
43546
  }
43276
43547
  function unwrapMethods(moduleExports, unwrap) {
43277
43548
  for (const method of ["addDoc", "getDocs", "setDoc", "deleteDoc"]) {
43278
- if (import_instrumentation17.isWrapped(moduleExports[method])) {
43549
+ if (import_instrumentation19.isWrapped(moduleExports[method])) {
43279
43550
  unwrap(moduleExports, method);
43280
43551
  }
43281
43552
  }
@@ -43327,7 +43598,7 @@ function patchSetDoc(tracer, firestoreSpanCreationHook) {
43327
43598
  }
43328
43599
  function executeContextWithSpan(span, callback) {
43329
43600
  return import_api18.context.with(import_api18.trace.setSpan(import_api18.context.active(), span), () => {
43330
- return import_instrumentation17.safeExecuteInTheMiddle(() => {
43601
+ return import_instrumentation19.safeExecuteInTheMiddle(() => {
43331
43602
  return callback();
43332
43603
  }, (err) => {
43333
43604
  if (err) {
@@ -43405,7 +43676,7 @@ function addAttributes(span, reference) {
43405
43676
  var DefaultFirebaseInstrumentationConfig = {};
43406
43677
  var firestoreSupportedVersions = [">=3.0.0 <5"];
43407
43678
 
43408
- class FirebaseInstrumentation extends import_instrumentation18.InstrumentationBase {
43679
+ class FirebaseInstrumentation extends import_instrumentation20.InstrumentationBase {
43409
43680
  constructor(config2 = DefaultFirebaseInstrumentationConfig) {
43410
43681
  super("@sentry/instrumentation-firebase", SDK_VERSION, config2);
43411
43682
  }
@@ -43463,7 +43734,8 @@ function getAutoPerformanceIntegrations() {
43463
43734
  openAIIntegration(),
43464
43735
  postgresJsIntegration(),
43465
43736
  firebaseIntegration(),
43466
- anthropicAIIntegration()
43737
+ anthropicAIIntegration(),
43738
+ googleGenAIIntegration()
43467
43739
  ];
43468
43740
  }
43469
43741
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/server",
3
- "version": "1.5.11-alpha.5",
3
+ "version": "1.5.11-alpha.6",
4
4
  "description": "ElizaOS Server - Core server infrastructure for ElizaOS agents",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -44,7 +44,7 @@
44
44
  "dev": "bun run build.ts --watch"
45
45
  },
46
46
  "devDependencies": {
47
- "@elizaos/client": "1.5.11-alpha.5",
47
+ "@elizaos/client": "1.5.11-alpha.6",
48
48
  "@types/node": "^24.0.1",
49
49
  "prettier": "3.5.3",
50
50
  "tsx": "4.19.4",
@@ -52,10 +52,10 @@
52
52
  "which": "^4.0.0",
53
53
  "ws": "^8.18.0"
54
54
  },
55
- "gitHead": "2010d06bf26e15784055763513682492d1d51f4c",
55
+ "gitHead": "17eb2ae71c14317a799bfb90b6e0c57ffc813269",
56
56
  "dependencies": {
57
- "@elizaos/core": "1.5.11-alpha.5",
58
- "@elizaos/plugin-sql": "1.5.11-alpha.5",
57
+ "@elizaos/core": "1.5.11-alpha.6",
58
+ "@elizaos/plugin-sql": "1.5.11-alpha.6",
59
59
  "@sentry/node": "^10.11.0",
60
60
  "@types/express": "^5.0.2",
61
61
  "@types/helmet": "^4.0.0",