@brizz/sdk 0.1.30 → 0.1.33

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.js CHANGED
@@ -4,9 +4,12 @@ import {
4
4
  Session,
5
5
  SessionTitle,
6
6
  addExternalLink,
7
+ callWithMessageId,
7
8
  callWithMute,
9
+ callWithOrganization,
8
10
  callWithProperties,
9
11
  callWithSessionId,
12
+ callWithUser,
10
13
  detectRuntime,
11
14
  emitEvent,
12
15
  emitEventWithSessionId,
@@ -17,21 +20,31 @@ import {
17
20
  getSpanProcessor,
18
21
  maskAttributes,
19
22
  maskValue,
23
+ recordFeedback,
20
24
  setCurrentSpanCustomProperties,
25
+ setMessageId,
26
+ setOrganization,
27
+ setUser,
21
28
  startSession,
22
29
  startSessionTitle,
30
+ withMessageId,
23
31
  withMute,
32
+ withOrganization,
24
33
  withProperties,
25
- withSessionId
26
- } from "./chunk-6UYAVA5T.js";
34
+ withSessionId,
35
+ withUser
36
+ } from "./chunk-KDFV63CU.js";
37
+ import "./chunk-7SUF4VVI.js";
38
+ import "./chunk-PY6FJBVY.js";
27
39
  import {
28
40
  LogLevel,
29
41
  getLogLevel,
30
42
  logger,
31
43
  setLogLevel
32
- } from "./chunk-3OLW4TOG.js";
33
- import "./chunk-MWX3GIJW.js";
34
- import "./chunk-RORIBZEV.js";
44
+ } from "./chunk-Y4HNUX3Q.js";
45
+ import "./chunk-N4X2B6BC.js";
46
+ import "./chunk-GRRKMMG6.js";
47
+ import "./chunk-3RG5ZIWI.js";
35
48
 
36
49
  // src/internal/instrumentation/auto-init.ts
37
50
  import { registerInstrumentations } from "@opentelemetry/instrumentation";
@@ -80,7 +93,7 @@ function loadGenAIInstrumentations() {
80
93
  function loadMCPInstrumentation() {
81
94
  void (async () => {
82
95
  try {
83
- const { MCPInstrumentation } = await import("./mcp-56TY4LZ5.js");
96
+ const { MCPInstrumentation } = await import("./mcp-XIHWT2AU.js");
84
97
  const mcp = new MCPInstrumentation({ exceptionLogger });
85
98
  registerInstrumentations({ instrumentations: [mcp] });
86
99
  logger.debug("Auto-loaded MCP instrumentation");
@@ -105,22 +118,47 @@ function loadVertexAIInstrumentation() {
105
118
  }
106
119
  })();
107
120
  }
108
- function loadVercelAIInterruptIntegration() {
121
+ function selectTelemetryRegister(ai) {
122
+ const register = ai.registerTelemetry ?? ai.registerTelemetryIntegration;
123
+ return typeof register === "function" ? register : void 0;
124
+ }
125
+ function loadVercelAITelemetry() {
109
126
  void (async () => {
110
127
  try {
111
128
  const ai = await import("ai");
112
- if (typeof ai.registerTelemetryIntegration !== "function") {
129
+ const register = selectTelemetryRegister(ai);
130
+ if (!register) {
113
131
  logger.debug(
114
- "AI SDK present but lacks registerTelemetryIntegration (needs ai@>=6); skipping interrupt bridge"
132
+ "AI SDK present but lacks a telemetry-registration hook (needs ai@>=6); skipping"
115
133
  );
116
134
  return;
117
135
  }
118
- const { createInterruptIntegration } = await import("./interrupt-HDNPDMYY.js");
119
- ai.registerTelemetryIntegration(createInterruptIntegration());
120
- logger.debug("Auto-loaded Vercel AI interrupt bridge");
136
+ const isV7 = typeof ai.registerTelemetry === "function";
137
+ const integrations = [];
138
+ const { createInterruptIntegration } = await import("./interrupt-AOYNN5AB.js");
139
+ integrations.push(createInterruptIntegration());
140
+ let otelCollectorLoaded = false;
141
+ try {
142
+ const otel = await import("@ai-sdk/otel");
143
+ if (typeof otel.LegacyOpenTelemetry === "function") {
144
+ integrations.push(new otel.LegacyOpenTelemetry());
145
+ otelCollectorLoaded = true;
146
+ }
147
+ } catch {
148
+ }
149
+ if (!otelCollectorLoaded) {
150
+ const message = "AI SDK present but @ai-sdk/otel is missing or unusable; install it (npm install @ai-sdk/otel) to capture AI SDK spans on ai@>=7";
151
+ if (isV7) {
152
+ logger.warn(message);
153
+ } else {
154
+ logger.debug(message);
155
+ }
156
+ }
157
+ register(...integrations);
158
+ logger.debug("Auto-loaded Vercel AI telemetry");
121
159
  } catch (error) {
122
160
  logger.debug(
123
- `Vercel AI interrupt bridge not loaded (install ai@>=6 if you want HITL attribution): ${String(error)}`
161
+ `Vercel AI telemetry not loaded (install ai@>=6 to capture AI SDK telemetry): ${String(error)}`
124
162
  );
125
163
  }
126
164
  })();
@@ -130,7 +168,7 @@ function autoInitializeInstrumentations() {
130
168
  const genAIInstrumentations = loadGenAIInstrumentations();
131
169
  loadMCPInstrumentation();
132
170
  loadVertexAIInstrumentation();
133
- loadVercelAIInterruptIntegration();
171
+ loadVercelAITelemetry();
134
172
  logger.info(
135
173
  `Auto-initialization complete: ${genAIInstrumentations.length} GenAI instrumentations`
136
174
  );
@@ -155,9 +193,12 @@ export {
155
193
  SessionTitle,
156
194
  SeverityNumber,
157
195
  addExternalLink,
196
+ callWithMessageId,
158
197
  callWithMute,
198
+ callWithOrganization,
159
199
  callWithProperties,
160
200
  callWithSessionId,
201
+ callWithUser,
161
202
  detectRuntime,
162
203
  emitEvent,
163
204
  emitEventWithSessionId,
@@ -171,11 +212,18 @@ export {
171
212
  logger,
172
213
  maskAttributes,
173
214
  maskValue,
215
+ recordFeedback,
174
216
  setCurrentSpanCustomProperties,
175
217
  setLogLevel,
218
+ setMessageId,
219
+ setOrganization,
220
+ setUser,
176
221
  startSession,
177
222
  startSessionTitle,
223
+ withMessageId,
178
224
  withMute,
225
+ withOrganization,
179
226
  withProperties,
180
- withSessionId
227
+ withSessionId,
228
+ withUser
181
229
  };
@@ -2,8 +2,9 @@ import {
2
2
  InterruptPropagator,
3
3
  _resetInterruptState,
4
4
  createInterruptIntegration
5
- } from "./chunk-MWX3GIJW.js";
6
- import "./chunk-RORIBZEV.js";
5
+ } from "./chunk-N4X2B6BC.js";
6
+ import "./chunk-GRRKMMG6.js";
7
+ import "./chunk-3RG5ZIWI.js";
7
8
  export {
8
9
  InterruptPropagator,
9
10
  _resetInterruptState,
@@ -0,0 +1,12 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+ var _chunkLFLYWZ6Dcjs = require('./chunk-LFLYWZ6D.cjs');
6
+ require('./chunk-LIFLVFK6.cjs');
7
+ require('./chunk-OBGZSXTJ.cjs');
8
+
9
+
10
+
11
+
12
+ exports.InterruptPropagator = _chunkLFLYWZ6Dcjs.InterruptPropagator; exports._resetInterruptState = _chunkLFLYWZ6Dcjs._resetInterruptState; exports.createInterruptIntegration = _chunkLFLYWZ6Dcjs.createInterruptIntegration;
@@ -1,12 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
+ var _chunk3ITCDKTJcjs = require('./chunk-3ITCDKTJ.cjs');
3
4
 
4
- var _chunkJB6MA2RVcjs = require('./chunk-JB6MA2RV.cjs');
5
5
 
6
+ var _chunkWC573FCIcjs = require('./chunk-WC573FCI.cjs');
6
7
 
7
8
 
8
9
 
9
- var _chunkGCORRK6Bcjs = require('./chunk-GCORRK6B.cjs');
10
+
11
+ var _chunkLIFLVFK6cjs = require('./chunk-LIFLVFK6.cjs');
12
+ require('./chunk-OBGZSXTJ.cjs');
10
13
 
11
14
  // src/internal/instrumentation/mcp/instrumentation.ts
12
15
  var _openinferenceinstrumentationmcp = require('@arizeai/openinference-instrumentation-mcp');
@@ -99,7 +102,7 @@ function emitSchemaSpansFromListResponse(result, transportSessionId, tracer) {
99
102
  }
100
103
  function stampSchemaAttributes(span, toolName, transportSessionId, tool) {
101
104
  if (!span.isRecording()) {
102
- _chunkJB6MA2RVcjs.logger.warn(
105
+ _chunkWC573FCIcjs.logger.warn(
103
106
  `Brizz MCP: schema span is not recording; dropping attributes for ${toolName}`
104
107
  );
105
108
  return;
@@ -136,22 +139,22 @@ function stampAndPropagateSession(span, sessionId, baseContext = _api.context.ac
136
139
  }
137
140
  if (span.isRecording()) {
138
141
  try {
139
- span.setAttribute(`${_chunkGCORRK6Bcjs.BRIZZ}.${_chunkGCORRK6Bcjs.SESSION_ID}`, sessionId);
142
+ span.setAttribute(`${_chunkLIFLVFK6cjs.BRIZZ}.${_chunkLIFLVFK6cjs.SESSION_ID}`, sessionId);
140
143
  } catch (error) {
141
- _chunkJB6MA2RVcjs.logger.warn(
144
+ _chunkWC573FCIcjs.logger.warn(
142
145
  `Brizz MCP: failed to stamp session id on span: ${String(error)}`
143
146
  );
144
147
  }
145
148
  }
146
149
  try {
147
- const prev = baseContext.getValue(_chunkGCORRK6Bcjs.PROPERTIES_CONTEXT_KEY);
148
- const merged = prev ? { ...prev, [_chunkGCORRK6Bcjs.SESSION_ID]: sessionId } : { [_chunkGCORRK6Bcjs.SESSION_ID]: sessionId };
150
+ const prev = baseContext.getValue(_chunkLIFLVFK6cjs.PROPERTIES_CONTEXT_KEY);
151
+ const merged = prev ? { ...prev, [_chunkLIFLVFK6cjs.SESSION_ID]: sessionId } : { [_chunkLIFLVFK6cjs.SESSION_ID]: sessionId };
149
152
  return {
150
- context: baseContext.setValue(_chunkGCORRK6Bcjs.PROPERTIES_CONTEXT_KEY, merged),
153
+ context: baseContext.setValue(_chunkLIFLVFK6cjs.PROPERTIES_CONTEXT_KEY, merged),
151
154
  sessionId
152
155
  };
153
156
  } catch (error) {
154
- _chunkJB6MA2RVcjs.logger.warn(`Brizz MCP: failed to attach session context: ${String(error)}`);
157
+ _chunkWC573FCIcjs.logger.warn(`Brizz MCP: failed to attach session context: ${String(error)}`);
155
158
  return { context: baseContext, sessionId };
156
159
  }
157
160
  }
@@ -353,7 +356,7 @@ function patchProtocolPrototype(prototype, tracer) {
353
356
  }
354
357
  const proto = prototype;
355
358
  if (Object.hasOwn(proto, PATCHED_FLAG)) {
356
- _chunkJB6MA2RVcjs.logger.debug("Brizz MCP: Protocol.prototype already patched, skipping");
359
+ _chunkWC573FCIcjs.logger.debug("Brizz MCP: Protocol.prototype already patched, skipping");
357
360
  return false;
358
361
  }
359
362
  const originalRequest = proto["request"];
@@ -361,7 +364,7 @@ function patchProtocolPrototype(prototype, tracer) {
361
364
  if (typeof originalRequest === "function") {
362
365
  proto["request"] = wrapRequest(originalRequest, tracer);
363
366
  } else {
364
- _chunkJB6MA2RVcjs.logger.debug(
367
+ _chunkWC573FCIcjs.logger.debug(
365
368
  "Brizz MCP: Protocol.prototype.request missing \u2014 skipping CLIENT patch"
366
369
  );
367
370
  }
@@ -371,7 +374,7 @@ function patchProtocolPrototype(prototype, tracer) {
371
374
  tracer
372
375
  );
373
376
  } else {
374
- _chunkJB6MA2RVcjs.logger.debug(
377
+ _chunkWC573FCIcjs.logger.debug(
375
378
  "Brizz MCP: Protocol.prototype._onrequest missing \u2014 skipping SERVER patch"
376
379
  );
377
380
  }
@@ -423,7 +426,7 @@ function wrapOnRequest(original, tracer) {
423
426
  try {
424
427
  emitSchemaSpansFromListResponse(result, transportSessionId, tracer);
425
428
  } catch (error) {
426
- _chunkJB6MA2RVcjs.logger.warn(
429
+ _chunkWC573FCIcjs.logger.warn(
427
430
  `Brizz MCP: failed to emit tools/list schema spans: ${String(error)}`
428
431
  );
429
432
  }
@@ -501,7 +504,7 @@ function safeStartClientSpan(tracer, request, protocol) {
501
504
  );
502
505
  return span;
503
506
  } catch (error) {
504
- _chunkJB6MA2RVcjs.logger.debug(`Brizz MCP: failed to open CLIENT span: ${String(error)}`);
507
+ _chunkWC573FCIcjs.logger.debug(`Brizz MCP: failed to open CLIENT span: ${String(error)}`);
505
508
  return null;
506
509
  }
507
510
  }
@@ -519,7 +522,7 @@ function safeStartServerSpan(tracer, request, protocol) {
519
522
  const { context: sessCtx } = stampAndPropagateSession(span, sessionId, parentCtx);
520
523
  return { span, spanCtx: _api.trace.setSpan(sessCtx, span) };
521
524
  } catch (error) {
522
- _chunkJB6MA2RVcjs.logger.debug(`Brizz MCP: failed to open SERVER span: ${String(error)}`);
525
+ _chunkWC573FCIcjs.logger.debug(`Brizz MCP: failed to open SERVER span: ${String(error)}`);
523
526
  return null;
524
527
  }
525
528
  }
@@ -530,7 +533,7 @@ function extractParentContext(request) {
530
533
  return _api.propagation.extract(_api.context.active(), meta);
531
534
  }
532
535
  } catch (error) {
533
- _chunkJB6MA2RVcjs.logger.debug(
536
+ _chunkWC573FCIcjs.logger.debug(
534
537
  `Brizz MCP: failed to extract parent context from _meta: ${String(error)}`
535
538
  );
536
539
  }
@@ -543,7 +546,7 @@ function safeApplyResultAttributes(span, method, value) {
543
546
  try {
544
547
  applyResultAttributes(span, method, value);
545
548
  } catch (error) {
546
- _chunkJB6MA2RVcjs.logger.debug(
549
+ _chunkWC573FCIcjs.logger.debug(
547
550
  `Brizz MCP: failed to apply result attributes: ${String(error)}`
548
551
  );
549
552
  }
@@ -552,7 +555,7 @@ function safeApplyErrorAttributes(span, err) {
552
555
  try {
553
556
  applyErrorAttributes(span, err);
554
557
  } catch (error) {
555
- _chunkJB6MA2RVcjs.logger.debug(
558
+ _chunkWC573FCIcjs.logger.debug(
556
559
  `Brizz MCP: failed to apply error attributes: ${String(error)}`
557
560
  );
558
561
  }
@@ -561,13 +564,13 @@ function safeEnd(span) {
561
564
  try {
562
565
  span.end();
563
566
  } catch (error) {
564
- _chunkJB6MA2RVcjs.logger.debug(`Brizz MCP: failed to end span: ${String(error)}`);
567
+ _chunkWC573FCIcjs.logger.debug(`Brizz MCP: failed to end span: ${String(error)}`);
565
568
  }
566
569
  }
567
570
 
568
571
  // src/internal/instrumentation/mcp/version.ts
569
572
  var INSTRUMENTATION_NAME = "@brizz/sdk/mcp";
570
- var INSTRUMENTATION_VERSION = _chunkJB6MA2RVcjs.getSDKVersion.call(void 0, );
573
+ var INSTRUMENTATION_VERSION = _chunk3ITCDKTJcjs.getSDKVersion.call(void 0, );
571
574
 
572
575
  // src/internal/instrumentation/mcp/instrumentation.ts
573
576
  var PROTOCOL_MODULE_NAME = "@modelcontextprotocol/sdk/shared/protocol.js";
@@ -597,14 +600,14 @@ var MCPInstrumentation = class extends _openinferenceinstrumentationmcp.MCPInstr
597
600
  patchProtocolModule(module) {
598
601
  const proto = _optionalChain([module, 'optionalAccess', _26 => _26.Protocol, 'optionalAccess', _27 => _27.prototype]);
599
602
  if (!proto) {
600
- _chunkJB6MA2RVcjs.logger.debug(
603
+ _chunkWC573FCIcjs.logger.debug(
601
604
  "Brizz MCP: module does not expose Protocol.prototype \u2014 skipping protocol patches"
602
605
  );
603
606
  return;
604
607
  }
605
608
  const ok = patchProtocolPrototype(proto, this.brizzTracer);
606
609
  if (ok) {
607
- _chunkJB6MA2RVcjs.logger.debug("Brizz MCP: patched Protocol.prototype for SERVER+CLIENT spans");
610
+ _chunkWC573FCIcjs.logger.debug("Brizz MCP: patched Protocol.prototype for SERVER+CLIENT spans");
608
611
  }
609
612
  }
610
613
  /**
@@ -617,7 +620,7 @@ var MCPInstrumentation = class extends _openinferenceinstrumentationmcp.MCPInstr
617
620
  * at runtime, and a process reload is the canonical way to detach.
618
621
  */
619
622
  unpatchProtocolModule(_module) {
620
- _chunkJB6MA2RVcjs.logger.debug(
623
+ _chunkWC573FCIcjs.logger.debug(
621
624
  "Brizz MCP: unpatch is a no-op \u2014 reload the process to cleanly detach"
622
625
  );
623
626
  }
@@ -640,7 +643,7 @@ var MCPInstrumentation = class extends _openinferenceinstrumentationmcp.MCPInstr
640
643
  try {
641
644
  base = _nullishCoalesce(super.init(), () => ( []));
642
645
  } catch (error) {
643
- _chunkJB6MA2RVcjs.logger.warn(
646
+ _chunkWC573FCIcjs.logger.warn(
644
647
  `Brizz MCP: base Arize init() failed \u2014 transport context propagation disabled: ${String(error)}`
645
648
  );
646
649
  base = [];
@@ -690,13 +693,13 @@ var MCPInstrumentation = class extends _openinferenceinstrumentationmcp.MCPInstr
690
693
  serverStreamableHTTPModule
691
694
  });
692
695
  } catch (error) {
693
- _chunkJB6MA2RVcjs.logger.warn(`Brizz MCP: Arize manuallyInstrument(...) failed: ${String(error)}`);
696
+ _chunkWC573FCIcjs.logger.warn(`Brizz MCP: Arize manuallyInstrument(...) failed: ${String(error)}`);
694
697
  }
695
698
  if (protocolModule) {
696
699
  try {
697
700
  this.patchProtocolModule(protocolModule);
698
701
  } catch (error) {
699
- _chunkJB6MA2RVcjs.logger.warn(
702
+ _chunkWC573FCIcjs.logger.warn(
700
703
  `Brizz MCP: failed to manually patch Protocol module: ${String(error)}`
701
704
  );
702
705
  }
@@ -1,12 +1,15 @@
1
1
  import {
2
- getSDKVersion,
2
+ getSDKVersion
3
+ } from "./chunk-PY6FJBVY.js";
4
+ import {
3
5
  logger
4
- } from "./chunk-3OLW4TOG.js";
6
+ } from "./chunk-Y4HNUX3Q.js";
5
7
  import {
6
8
  BRIZZ,
7
9
  PROPERTIES_CONTEXT_KEY,
8
10
  SESSION_ID
9
- } from "./chunk-RORIBZEV.js";
11
+ } from "./chunk-GRRKMMG6.js";
12
+ import "./chunk-3RG5ZIWI.js";
10
13
 
11
14
  // src/internal/instrumentation/mcp/instrumentation.ts
12
15
  import { MCPInstrumentation as BaseMCPInstrumentation } from "@arizeai/openinference-instrumentation-mcp";
package/dist/preload.cjs CHANGED
@@ -1,13 +1,16 @@
1
1
  "use strict"; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
3
 
4
- var _chunkNUTJMVD4cjs = require('./chunk-NUTJMVD4.cjs');
4
+ var _chunkWXHBHJRJcjs = require('./chunk-WXHBHJRJ.cjs');
5
+ require('./chunk-UNLNNKZ7.cjs');
6
+ require('./chunk-3ITCDKTJ.cjs');
5
7
 
6
8
 
7
9
 
8
- var _chunkJB6MA2RVcjs = require('./chunk-JB6MA2RV.cjs');
9
- require('./chunk-LTXMCGVQ.cjs');
10
- require('./chunk-GCORRK6B.cjs');
10
+ var _chunkWC573FCIcjs = require('./chunk-WC573FCI.cjs');
11
+ require('./chunk-LFLYWZ6D.cjs');
12
+ require('./chunk-LIFLVFK6.cjs');
13
+ require('./chunk-OBGZSXTJ.cjs');
11
14
 
12
15
  // src/node/loader.ts
13
16
  var _module = require('module'); var _module2 = _interopRequireDefault(_module);
@@ -93,16 +96,16 @@ if (globalThis[LOADER_REGISTERED_KEY] !== true) {
93
96
  }
94
97
 
95
98
  // src/preload.ts
96
- var runtime = _chunkNUTJMVD4cjs.detectRuntime.call(void 0, );
99
+ var runtime = _chunkWXHBHJRJcjs.detectRuntime.call(void 0, );
97
100
  if (runtime.isESM && runtime.supportsLoaderAPI) {
98
101
  maybeRegisterESMLoader();
99
102
  }
100
103
  try {
101
- const logLevel = process.env["BRIZZ_LOG_LEVEL"] || _chunkJB6MA2RVcjs.DEFAULT_LOG_LEVEL.toString();
104
+ const logLevel = process.env["BRIZZ_LOG_LEVEL"] || _chunkWC573FCIcjs.DEFAULT_LOG_LEVEL.toString();
102
105
  if (process.env["BRIZZ_DSN"]) {
103
- _chunkNUTJMVD4cjs.Brizz.initialize({ logLevel, disableNodeSdk: false });
106
+ _chunkWXHBHJRJcjs.Brizz.initialize({ logLevel, disableNodeSdk: false });
104
107
  } else {
105
- _chunkNUTJMVD4cjs.Brizz.initialize({
108
+ _chunkWXHBHJRJcjs.Brizz.initialize({
106
109
  apiKey: process.env["BRIZZ_API_KEY"],
107
110
  baseUrl: process.env["BRIZZ_BASE_URL"],
108
111
  appName: process.env["BRIZZ_APP_NAME"] || process.env["OTEL_SERVICE_NAME"],
@@ -110,7 +113,7 @@ try {
110
113
  disableNodeSdk: false
111
114
  });
112
115
  }
113
- _chunkJB6MA2RVcjs.logger.info(`SDK auto-initialized for ${runtime.isESM ? "ESM" : "CJS"} runtime`);
116
+ _chunkWC573FCIcjs.logger.info(`SDK auto-initialized for ${runtime.isESM ? "ESM" : "CJS"} runtime`);
114
117
  } catch (error) {
115
- _chunkJB6MA2RVcjs.logger.warn("Failed to auto-initialize SDK:", { error });
118
+ _chunkWC573FCIcjs.logger.warn("Failed to auto-initialize SDK:", { error });
116
119
  }
package/dist/preload.js CHANGED
@@ -1,13 +1,16 @@
1
1
  import {
2
2
  Brizz,
3
3
  detectRuntime
4
- } from "./chunk-6UYAVA5T.js";
4
+ } from "./chunk-KDFV63CU.js";
5
+ import "./chunk-7SUF4VVI.js";
6
+ import "./chunk-PY6FJBVY.js";
5
7
  import {
6
8
  DEFAULT_LOG_LEVEL,
7
9
  logger
8
- } from "./chunk-3OLW4TOG.js";
9
- import "./chunk-MWX3GIJW.js";
10
- import "./chunk-RORIBZEV.js";
10
+ } from "./chunk-Y4HNUX3Q.js";
11
+ import "./chunk-N4X2B6BC.js";
12
+ import "./chunk-GRRKMMG6.js";
13
+ import "./chunk-3RG5ZIWI.js";
11
14
 
12
15
  // src/node/loader.ts
13
16
  import module from "module";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brizz/sdk",
3
- "version": "0.1.30",
3
+ "version": "0.1.33",
4
4
  "type": "module",
5
5
  "description": "OpenTelemetry-based observability SDK for AI applications",
6
6
  "keywords": [
@@ -68,6 +68,16 @@
68
68
  "default": "./dist/index.cjs"
69
69
  }
70
70
  },
71
+ "./eve": {
72
+ "import": {
73
+ "types": "./dist/eve.d.ts",
74
+ "default": "./dist/eve.js"
75
+ },
76
+ "require": {
77
+ "types": "./dist/eve.d.cts",
78
+ "default": "./dist/eve.cjs"
79
+ }
80
+ },
71
81
  "./preload": {
72
82
  "import": "./dist/preload.js",
73
83
  "require": "./dist/preload.cjs"
@@ -85,35 +95,37 @@
85
95
  "registry": "https://registry.npmjs.org/"
86
96
  },
87
97
  "devDependencies": {
88
- "@ai-sdk/anthropic": "^3.0.86",
89
- "@ai-sdk/openai": "^3.0.74",
90
- "@arizeai/openinference-instrumentation-mcp": "^0.2.14",
98
+ "@ai-sdk/anthropic": "^4.0.9",
99
+ "@ai-sdk/openai": "^4.0.8",
100
+ "@ai-sdk/otel": "^1.0.17",
101
+ "@arizeai/openinference-instrumentation-mcp": "^0.2.20",
91
102
  "@changesets/changelog-github": "^0.7.0",
92
103
  "@changesets/cli": "^2.30.0",
93
104
  "@eslint/js": "^10.0.1",
94
105
  "@modelcontextprotocol/sdk": "^1.29.0",
95
106
  "@traceloop/instrumentation-vertexai": "^0.27.0",
96
107
  "@types/jest": "^30.0.0",
97
- "@types/node": "^26.0.0",
98
- "@typescript-eslint/eslint-plugin": "^8.62.0",
99
- "@typescript-eslint/parser": "^8.62.0",
100
- "ai": "^6.0.209",
101
- "eslint": "^10.5.0",
108
+ "@types/node": "^26.1.0",
109
+ "@typescript-eslint/eslint-plugin": "^8.63.0",
110
+ "@typescript-eslint/parser": "^8.63.0",
111
+ "ai": "^7.0.17",
112
+ "eslint": "^10.6.0",
102
113
  "eslint-config-prettier": "^10.1.8",
103
114
  "eslint-plugin-import": "^2.32.0",
104
115
  "eslint-plugin-promise": "^7.3.0",
105
- "eslint-plugin-unicorn": "^68.0.0",
116
+ "eslint-plugin-unicorn": "^71.1.0",
106
117
  "jest": "^30.4.2",
107
118
  "jest-environment-jsdom": "^30.4.1",
108
- "openai": "^6.44.0",
109
- "prettier": "^3.8.4",
119
+ "openai": "^6.45.0",
120
+ "prettier": "^3.9.4",
110
121
  "ts-jest": "^29.4.11",
111
122
  "tsup": "^8.5.1",
112
123
  "typescript": "^6.0.3",
113
- "vitest": "^4.1.9",
124
+ "vitest": "^4.1.10",
114
125
  "zod": "^4.4.3"
115
126
  },
116
127
  "peerDependencies": {
128
+ "@ai-sdk/otel": "^1",
117
129
  "@arizeai/openinference-instrumentation-mcp": "^0.2.19",
118
130
  "@langchain/core": "^0.3.0 || ^1.0.0",
119
131
  "@modelcontextprotocol/sdk": "^1.29.0",
@@ -122,6 +134,9 @@
122
134
  "typescript": ">=5.0.0"
123
135
  },
124
136
  "peerDependenciesMeta": {
137
+ "@ai-sdk/otel": {
138
+ "optional": true
139
+ },
125
140
  "@arizeai/openinference-instrumentation-mcp": {
126
141
  "optional": true
127
142
  },
@@ -142,21 +157,21 @@
142
157
  }
143
158
  },
144
159
  "dependencies": {
145
- "@arizeai/openinference-instrumentation-langchain": "^4.0.13",
160
+ "@arizeai/openinference-instrumentation-langchain": "^4.0.14",
146
161
  "@opentelemetry/api": "^1.9.0",
147
- "@opentelemetry/api-logs": "^0.219.0",
148
- "@opentelemetry/core": "^2.8.0",
149
- "@opentelemetry/exporter-logs-otlp-http": "^0.219.0",
150
- "@opentelemetry/exporter-metrics-otlp-http": "^0.219.0",
151
- "@opentelemetry/exporter-trace-otlp-http": "^0.219.0",
152
- "@opentelemetry/exporter-trace-otlp-proto": "^0.219.0",
153
- "@opentelemetry/instrumentation": "^0.219.0",
154
- "@opentelemetry/resources": "^2.8.0",
155
- "@opentelemetry/sdk-logs": "^0.219.0",
156
- "@opentelemetry/sdk-metrics": "^2.8.0",
157
- "@opentelemetry/sdk-trace-base": "^2.8.0",
158
- "@opentelemetry/sdk-trace-node": "^2.8.0",
159
- "@opentelemetry/semantic-conventions": "^1.41.1",
162
+ "@opentelemetry/api-logs": "^0.220.0",
163
+ "@opentelemetry/core": "^2.9.0",
164
+ "@opentelemetry/exporter-logs-otlp-http": "^0.220.0",
165
+ "@opentelemetry/exporter-metrics-otlp-http": "^0.220.0",
166
+ "@opentelemetry/exporter-trace-otlp-http": "^0.220.0",
167
+ "@opentelemetry/exporter-trace-otlp-proto": "^0.220.0",
168
+ "@opentelemetry/instrumentation": "^0.220.0",
169
+ "@opentelemetry/resources": "^2.9.0",
170
+ "@opentelemetry/sdk-logs": "^0.220.0",
171
+ "@opentelemetry/sdk-metrics": "^2.9.0",
172
+ "@opentelemetry/sdk-trace-base": "^2.9.0",
173
+ "@opentelemetry/sdk-trace-node": "^2.9.0",
174
+ "@opentelemetry/semantic-conventions": "^1.42.0",
160
175
  "@traceloop/ai-semantic-conventions": "^0.27.0",
161
176
  "@traceloop/instrumentation-anthropic": "^0.27.0",
162
177
  "@traceloop/instrumentation-bedrock": "^0.27.0",
@@ -167,7 +182,7 @@
167
182
  "@traceloop/instrumentation-pinecone": "^0.27.0",
168
183
  "@traceloop/instrumentation-qdrant": "^0.27.0",
169
184
  "@traceloop/instrumentation-together": "^0.27.0",
170
- "import-in-the-middle": "^3.2.0",
185
+ "import-in-the-middle": "^3.3.1",
171
186
  "pino": "^10.3.1",
172
187
  "pino-pretty": "^13.1.3",
173
188
  "tslib": "^2.8.1"
@@ -1,54 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
- }) : x)(function(x) {
4
- if (typeof require !== "undefined") return require.apply(this, arguments);
5
- throw Error('Dynamic require of "' + x + '" is not supported');
6
- });
7
-
8
- // src/internal/semantic-conventions.ts
9
- var _api = require('@opentelemetry/api');
10
- var BRIZZ = "brizz";
11
- var PROPERTIES = "properties";
12
- var SESSION_ID = "session.id";
13
- var PROPERTIES_CONTEXT_KEY = _api.createContextKey.call(void 0, PROPERTIES);
14
- var SESSION_OBJECT_CONTEXT_KEY = _api.createContextKey.call(void 0, "brizz.session.object");
15
- var SESSION_INPUT = "brizz.session.input";
16
- var SESSION_OUTPUT = "brizz.session.output";
17
- var SESSION_INPUT_CONTEXT = "brizz.session.input.context";
18
- var SESSION_OUTPUT_CONTEXT = "brizz.session.output.context";
19
- var SESSION_SPAN_NAME = "brizz.start_session";
20
- var MUTE_INPUT = "mute.input";
21
- var MUTE_OUTPUT = "mute.output";
22
- var SESSION_TITLE_SPAN_NAME = "brizz.session_title";
23
- var SESSION_TITLE_GENERATION = "session.title_generation";
24
- var SESSION_TITLE = "brizz.session.title";
25
- var INTERRUPT_TOOLS = "brizz.internal.interrupt";
26
- var INTERNAL_EVENT_PREFIX = "brizz.internal.";
27
- var EXTERNAL_LINK_EVENT_NAME = "brizz.internal.external_link";
28
- var EXTERNAL_LINK_URL = "brizz.internal.external_link.url";
29
- var EXTERNAL_LINK_TITLE = "brizz.internal.external_link.title";
30
- var EXTERNAL_LINK_TYPE = "brizz.internal.external_link.type";
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
- exports.__require = __require; exports.BRIZZ = BRIZZ; exports.SESSION_ID = SESSION_ID; exports.PROPERTIES_CONTEXT_KEY = PROPERTIES_CONTEXT_KEY; exports.SESSION_OBJECT_CONTEXT_KEY = SESSION_OBJECT_CONTEXT_KEY; exports.SESSION_INPUT = SESSION_INPUT; exports.SESSION_OUTPUT = SESSION_OUTPUT; exports.SESSION_INPUT_CONTEXT = SESSION_INPUT_CONTEXT; exports.SESSION_OUTPUT_CONTEXT = SESSION_OUTPUT_CONTEXT; exports.SESSION_SPAN_NAME = SESSION_SPAN_NAME; exports.MUTE_INPUT = MUTE_INPUT; exports.MUTE_OUTPUT = MUTE_OUTPUT; exports.SESSION_TITLE_SPAN_NAME = SESSION_TITLE_SPAN_NAME; exports.SESSION_TITLE_GENERATION = SESSION_TITLE_GENERATION; exports.SESSION_TITLE = SESSION_TITLE; exports.INTERRUPT_TOOLS = INTERRUPT_TOOLS; exports.INTERNAL_EVENT_PREFIX = INTERNAL_EVENT_PREFIX; exports.EXTERNAL_LINK_EVENT_NAME = EXTERNAL_LINK_EVENT_NAME; exports.EXTERNAL_LINK_URL = EXTERNAL_LINK_URL; exports.EXTERNAL_LINK_TITLE = EXTERNAL_LINK_TITLE; exports.EXTERNAL_LINK_TYPE = EXTERNAL_LINK_TYPE;
@@ -1,11 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
- var _chunkLTXMCGVQcjs = require('./chunk-LTXMCGVQ.cjs');
6
- require('./chunk-GCORRK6B.cjs');
7
-
8
-
9
-
10
-
11
- exports.InterruptPropagator = _chunkLTXMCGVQcjs.InterruptPropagator; exports._resetInterruptState = _chunkLTXMCGVQcjs._resetInterruptState; exports.createInterruptIntegration = _chunkLTXMCGVQcjs.createInterruptIntegration;