@brizz/sdk 0.1.32 → 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/README.md CHANGED
@@ -497,6 +497,51 @@ import { callWithSessionId } from '@brizz/sdk';
497
497
  await callWithSessionId('session-123', processUserWorkflow, null, 'user-456');
498
498
  ```
499
499
 
500
+ ### Identifying Users, Organizations & Messages
501
+
502
+ Attach the end-user, their organization, and a per-message id with typed setters. Call them inside a session — they apply to the turn's spans:
503
+
504
+ ```typescript
505
+ import { startSession, setUser, setOrganization, setMessageId } from '@brizz/sdk';
506
+
507
+ await startSession(sessionId, async () => {
508
+ setUser({ id: user.id, email: user.email, role: user.role, plan: user.plan });
509
+ setOrganization({ id: org.id, name: org.name, plan: org.plan, domain: org.domain });
510
+ setMessageId(message.id); // your own id, to reference this message later
511
+
512
+ return agent.run(prompt);
513
+ });
514
+ ```
515
+
516
+ Only `id` is required. Each field maps to its own attribute (`brizz.user.id`, `brizz.organization.plan`, `brizz.message.id`, …). For anything beyond the named fields, pass a `traits` record — each entry becomes `brizz.user.<key>` / `brizz.organization.<key>`:
517
+
518
+ ```typescript
519
+ setUser({ id: user.id, traits: { department: 'sales', signup_source: 'referral' } });
520
+ setOrganization({ id: org.id, traits: { industry: 'fintech' } });
521
+ ```
522
+
523
+ The same setters are available on the session object (`session.setUser(...)`) and as scoped wrappers (`callWithUser` / `withUser`).
524
+
525
+ ### Recording Feedback
526
+
527
+ Capture an end-user's reaction to a specific reply — a 👍/👎, a rating, a reason. Pair it with the message id you set on the turn:
528
+
529
+ ```typescript
530
+ import { startSession, setMessageId, recordFeedback } from '@brizz/sdk';
531
+
532
+ await startSession(sessionId, async () => {
533
+ setMessageId(message.id); // the id you'll reference this reply by
534
+ const reply = await agent.run(prompt);
535
+ recordFeedback('thumbs_up'); // defaults to the current message
536
+ });
537
+ ```
538
+
539
+ Only `type` is required; `score`, `reason`, `comment`, and `source` are optional, and `traits` adds free-form `brizz.feedback.<key>` entries. Feedback is anchored by `messageId` and/or `sessionId`, so you can send it later — even minutes or days after the reply — by passing the id(s) explicitly:
540
+
541
+ ```typescript
542
+ recordFeedback('thumbs_down', { messageId: message.id, sessionId, reason: 'inaccurate' });
543
+ ```
544
+
500
545
  ### Custom Properties
501
546
 
502
547
  Add custom properties to telemetry context:
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/internal/version.ts
2
2
  function getSDKVersion() {
3
- return "0.1.32";
3
+ return "0.1.33";
4
4
  }
5
5
 
6
6
 
@@ -12,6 +12,16 @@ var SESSION_OUTPUT_CONTEXT = "brizz.session.output.context";
12
12
  var SESSION_SPAN_NAME = "brizz.start_session";
13
13
  var MUTE_INPUT = "mute.input";
14
14
  var MUTE_OUTPUT = "mute.output";
15
+ var USER_ID = "user.id";
16
+ var USER_EMAIL = "user.email";
17
+ var USER_NAME = "user.name";
18
+ var USER_ROLE = "user.role";
19
+ var USER_PLAN = "user.plan";
20
+ var ORGANIZATION_ID = "organization.id";
21
+ var ORGANIZATION_NAME = "organization.name";
22
+ var ORGANIZATION_PLAN = "organization.plan";
23
+ var ORGANIZATION_DOMAIN = "organization.domain";
24
+ var MESSAGE_ID = "message.id";
15
25
  var SESSION_TITLE_SPAN_NAME = "brizz.session_title";
16
26
  var SESSION_TITLE_GENERATION = "session.title_generation";
17
27
  var SESSION_TITLE = "brizz.session.title";
@@ -21,6 +31,13 @@ var EXTERNAL_LINK_EVENT_NAME = "brizz.internal.external_link";
21
31
  var EXTERNAL_LINK_URL = "brizz.internal.external_link.url";
22
32
  var EXTERNAL_LINK_TITLE = "brizz.internal.external_link.title";
23
33
  var EXTERNAL_LINK_TYPE = "brizz.internal.external_link.type";
34
+ var FEEDBACK_EVENT_NAME = "brizz.feedback";
35
+ var FEEDBACK_TYPE = "brizz.feedback.type";
36
+ var FEEDBACK_SCORE = "brizz.feedback.score";
37
+ var FEEDBACK_REASON = "brizz.feedback.reason";
38
+ var FEEDBACK_COMMENT = "brizz.feedback.comment";
39
+ var FEEDBACK_SOURCE = "brizz.feedback.source";
40
+ var FEEDBACK_ATTR_PREFIX = "brizz.feedback.";
24
41
 
25
42
  export {
26
43
  BRIZZ,
@@ -34,6 +51,16 @@ export {
34
51
  SESSION_SPAN_NAME,
35
52
  MUTE_INPUT,
36
53
  MUTE_OUTPUT,
54
+ USER_ID,
55
+ USER_EMAIL,
56
+ USER_NAME,
57
+ USER_ROLE,
58
+ USER_PLAN,
59
+ ORGANIZATION_ID,
60
+ ORGANIZATION_NAME,
61
+ ORGANIZATION_PLAN,
62
+ ORGANIZATION_DOMAIN,
63
+ MESSAGE_ID,
37
64
  SESSION_TITLE_SPAN_NAME,
38
65
  SESSION_TITLE_GENERATION,
39
66
  SESSION_TITLE,
@@ -42,5 +69,12 @@ export {
42
69
  EXTERNAL_LINK_EVENT_NAME,
43
70
  EXTERNAL_LINK_URL,
44
71
  EXTERNAL_LINK_TITLE,
45
- EXTERNAL_LINK_TYPE
72
+ EXTERNAL_LINK_TYPE,
73
+ FEEDBACK_EVENT_NAME,
74
+ FEEDBACK_TYPE,
75
+ FEEDBACK_SCORE,
76
+ FEEDBACK_REASON,
77
+ FEEDBACK_COMMENT,
78
+ FEEDBACK_SOURCE,
79
+ FEEDBACK_ATTR_PREFIX
46
80
  };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-7SUF4VVI.js";
5
5
  import {
6
6
  getSDKVersion
7
- } from "./chunk-6M3CBP2N.js";
7
+ } from "./chunk-PY6FJBVY.js";
8
8
  import {
9
9
  DEFAULT_LOG_LEVEL,
10
10
  logger,
@@ -13,16 +13,28 @@ import {
13
13
  } from "./chunk-Y4HNUX3Q.js";
14
14
  import {
15
15
  InterruptPropagator
16
- } from "./chunk-LTLONC6I.js";
16
+ } from "./chunk-N4X2B6BC.js";
17
17
  import {
18
18
  BRIZZ,
19
19
  EXTERNAL_LINK_EVENT_NAME,
20
20
  EXTERNAL_LINK_TITLE,
21
21
  EXTERNAL_LINK_TYPE,
22
22
  EXTERNAL_LINK_URL,
23
+ FEEDBACK_ATTR_PREFIX,
24
+ FEEDBACK_COMMENT,
25
+ FEEDBACK_EVENT_NAME,
26
+ FEEDBACK_REASON,
27
+ FEEDBACK_SCORE,
28
+ FEEDBACK_SOURCE,
29
+ FEEDBACK_TYPE,
23
30
  INTERNAL_EVENT_PREFIX,
31
+ MESSAGE_ID,
24
32
  MUTE_INPUT,
25
33
  MUTE_OUTPUT,
34
+ ORGANIZATION_DOMAIN,
35
+ ORGANIZATION_ID,
36
+ ORGANIZATION_NAME,
37
+ ORGANIZATION_PLAN,
26
38
  PROPERTIES_CONTEXT_KEY,
27
39
  SESSION_ID,
28
40
  SESSION_INPUT,
@@ -33,8 +45,13 @@ import {
33
45
  SESSION_SPAN_NAME,
34
46
  SESSION_TITLE,
35
47
  SESSION_TITLE_GENERATION,
36
- SESSION_TITLE_SPAN_NAME
37
- } from "./chunk-VGMJ3KUM.js";
48
+ SESSION_TITLE_SPAN_NAME,
49
+ USER_EMAIL,
50
+ USER_ID,
51
+ USER_NAME,
52
+ USER_PLAN,
53
+ USER_ROLE
54
+ } from "./chunk-GRRKMMG6.js";
38
55
  import {
39
56
  __require
40
57
  } from "./chunk-3RG5ZIWI.js";
@@ -144,7 +161,7 @@ var InstrumentationRegistry = class _InstrumentationRegistry {
144
161
  const mcpModules = this.manualModules.mcp;
145
162
  void (async () => {
146
163
  try {
147
- const { MCPInstrumentation } = await import("./mcp-3YERODPL.js");
164
+ const { MCPInstrumentation } = await import("./mcp-XIHWT2AU.js");
148
165
  const instrumentation = new MCPInstrumentation({ exceptionLogger });
149
166
  instrumentation.manuallyInstrument(mcpModules);
150
167
  logger.debug("Manual instrumentation enabled for MCP");
@@ -914,6 +931,136 @@ function withProperties(properties, fn, thisArg) {
914
931
  );
915
932
  };
916
933
  }
934
+ function propagatePropertiesImperatively(properties) {
935
+ try {
936
+ const manager = context2;
937
+ const mgr = manager._getContextManager?.();
938
+ const store = mgr?._asyncLocalStorage;
939
+ if (!store || typeof store.enterWith !== "function") {
940
+ return;
941
+ }
942
+ const base = context2.active();
943
+ const prev = base.getValue(PROPERTIES_CONTEXT_KEY);
944
+ const merged = prev ? { ...prev, ...properties } : properties;
945
+ store.enterWith(base.setValue(PROPERTIES_CONTEXT_KEY, merged));
946
+ } catch {
947
+ }
948
+ }
949
+ function setUser(user) {
950
+ const properties = { [USER_ID]: user.id };
951
+ if (user.email !== void 0) {
952
+ properties[USER_EMAIL] = user.email;
953
+ }
954
+ if (user.name !== void 0) {
955
+ properties[USER_NAME] = user.name;
956
+ }
957
+ if (user.role !== void 0) {
958
+ properties[USER_ROLE] = user.role;
959
+ }
960
+ if (user.plan !== void 0) {
961
+ properties[USER_PLAN] = user.plan;
962
+ }
963
+ if (user.traits) {
964
+ for (const [key, value] of Object.entries(user.traits)) {
965
+ const k = `user.${key}`;
966
+ if (properties[k] === void 0) {
967
+ properties[k] = value;
968
+ }
969
+ }
970
+ }
971
+ setCurrentSpanCustomProperties(properties);
972
+ propagatePropertiesImperatively(properties);
973
+ }
974
+ function setOrganization(org) {
975
+ const properties = { [ORGANIZATION_ID]: org.id };
976
+ if (org.name !== void 0) {
977
+ properties[ORGANIZATION_NAME] = org.name;
978
+ }
979
+ if (org.plan !== void 0) {
980
+ properties[ORGANIZATION_PLAN] = org.plan;
981
+ }
982
+ if (org.domain !== void 0) {
983
+ properties[ORGANIZATION_DOMAIN] = org.domain;
984
+ }
985
+ if (org.traits) {
986
+ for (const [key, value] of Object.entries(org.traits)) {
987
+ const k = `organization.${key}`;
988
+ if (properties[k] === void 0) {
989
+ properties[k] = value;
990
+ }
991
+ }
992
+ }
993
+ setCurrentSpanCustomProperties(properties);
994
+ propagatePropertiesImperatively(properties);
995
+ }
996
+ function setMessageId(id) {
997
+ const properties = { [MESSAGE_ID]: id };
998
+ setCurrentSpanCustomProperties(properties);
999
+ propagatePropertiesImperatively(properties);
1000
+ }
1001
+ function userProperties(user) {
1002
+ const properties = { [USER_ID]: user.id };
1003
+ if (user.email !== void 0) {
1004
+ properties[USER_EMAIL] = user.email;
1005
+ }
1006
+ if (user.name !== void 0) {
1007
+ properties[USER_NAME] = user.name;
1008
+ }
1009
+ if (user.role !== void 0) {
1010
+ properties[USER_ROLE] = user.role;
1011
+ }
1012
+ if (user.plan !== void 0) {
1013
+ properties[USER_PLAN] = user.plan;
1014
+ }
1015
+ if (user.traits) {
1016
+ for (const [key, value] of Object.entries(user.traits)) {
1017
+ const k = `user.${key}`;
1018
+ if (properties[k] === void 0) {
1019
+ properties[k] = value;
1020
+ }
1021
+ }
1022
+ }
1023
+ return properties;
1024
+ }
1025
+ function organizationProperties(org) {
1026
+ const properties = { [ORGANIZATION_ID]: org.id };
1027
+ if (org.name !== void 0) {
1028
+ properties[ORGANIZATION_NAME] = org.name;
1029
+ }
1030
+ if (org.plan !== void 0) {
1031
+ properties[ORGANIZATION_PLAN] = org.plan;
1032
+ }
1033
+ if (org.domain !== void 0) {
1034
+ properties[ORGANIZATION_DOMAIN] = org.domain;
1035
+ }
1036
+ if (org.traits) {
1037
+ for (const [key, value] of Object.entries(org.traits)) {
1038
+ const k = `organization.${key}`;
1039
+ if (properties[k] === void 0) {
1040
+ properties[k] = value;
1041
+ }
1042
+ }
1043
+ }
1044
+ return properties;
1045
+ }
1046
+ function callWithUser(user, fn, thisArg, ...args) {
1047
+ return callWithProperties(userProperties(user), fn, thisArg, ...args);
1048
+ }
1049
+ function withUser(user, fn, thisArg) {
1050
+ return withProperties(userProperties(user), fn, thisArg);
1051
+ }
1052
+ function callWithOrganization(org, fn, thisArg, ...args) {
1053
+ return callWithProperties(organizationProperties(org), fn, thisArg, ...args);
1054
+ }
1055
+ function withOrganization(org, fn, thisArg) {
1056
+ return withProperties(organizationProperties(org), fn, thisArg);
1057
+ }
1058
+ function callWithMessageId(id, fn, thisArg, ...args) {
1059
+ return callWithProperties({ [MESSAGE_ID]: id }, fn, thisArg, ...args);
1060
+ }
1061
+ function withMessageId(id, fn, thisArg) {
1062
+ return withProperties({ [MESSAGE_ID]: id }, fn, thisArg);
1063
+ }
917
1064
  function muteProperties(options) {
918
1065
  const { input = true, output = true } = options;
919
1066
  const properties = {};
@@ -1002,6 +1149,55 @@ var Session = class {
1002
1149
  this.span.setAttribute(`${BRIZZ}.${key}`, value);
1003
1150
  }
1004
1151
  }
1152
+ /**
1153
+ * Set end-user identity on the session span: `brizz.user.id` and, when
1154
+ * provided, `brizz.user.email` / `brizz.user.name`. Undefined fields are omitted.
1155
+ *
1156
+ * @param user - User identity (`id` required; `email` / `name` optional)
1157
+ */
1158
+ setUser(user) {
1159
+ if (user.traits) {
1160
+ for (const [key, value] of Object.entries(user.traits)) {
1161
+ this.span.setAttribute(`${BRIZZ}.user.${key}`, value);
1162
+ }
1163
+ }
1164
+ this.span.setAttribute(`${BRIZZ}.${USER_ID}`, user.id);
1165
+ if (user.email !== void 0) {
1166
+ this.span.setAttribute(`${BRIZZ}.${USER_EMAIL}`, user.email);
1167
+ }
1168
+ if (user.name !== void 0) {
1169
+ this.span.setAttribute(`${BRIZZ}.${USER_NAME}`, user.name);
1170
+ }
1171
+ if (user.role !== void 0) {
1172
+ this.span.setAttribute(`${BRIZZ}.${USER_ROLE}`, user.role);
1173
+ }
1174
+ if (user.plan !== void 0) {
1175
+ this.span.setAttribute(`${BRIZZ}.${USER_PLAN}`, user.plan);
1176
+ }
1177
+ }
1178
+ /**
1179
+ * Set organization identity on the session span: `brizz.organization.id` and,
1180
+ * when provided, `brizz.organization.name`. Undefined fields are omitted.
1181
+ *
1182
+ * @param org - Organization identity (`id` required; `name` optional)
1183
+ */
1184
+ setOrganization(org) {
1185
+ if (org.traits) {
1186
+ for (const [key, value] of Object.entries(org.traits)) {
1187
+ this.span.setAttribute(`${BRIZZ}.organization.${key}`, value);
1188
+ }
1189
+ }
1190
+ this.span.setAttribute(`${BRIZZ}.${ORGANIZATION_ID}`, org.id);
1191
+ if (org.name !== void 0) {
1192
+ this.span.setAttribute(`${BRIZZ}.${ORGANIZATION_NAME}`, org.name);
1193
+ }
1194
+ if (org.plan !== void 0) {
1195
+ this.span.setAttribute(`${BRIZZ}.${ORGANIZATION_PLAN}`, org.plan);
1196
+ }
1197
+ if (org.domain !== void 0) {
1198
+ this.span.setAttribute(`${BRIZZ}.${ORGANIZATION_DOMAIN}`, org.domain);
1199
+ }
1200
+ }
1005
1201
  /**
1006
1202
  * Attach an external link (URL) to this session.
1007
1203
  *
@@ -1043,6 +1239,10 @@ function resolveSessionIdFromContext() {
1043
1239
  const props = context2.active().getValue(PROPERTIES_CONTEXT_KEY);
1044
1240
  return props?.[SESSION_ID];
1045
1241
  }
1242
+ function resolveMessageIdFromContext() {
1243
+ const props = context2.active().getValue(PROPERTIES_CONTEXT_KEY);
1244
+ return props?.[MESSAGE_ID];
1245
+ }
1046
1246
  function emitExternalLink(sessionId, url, title, linkType) {
1047
1247
  try {
1048
1248
  emitEventWithSessionId(sessionId, EXTERNAL_LINK_EVENT_NAME, {
@@ -1064,6 +1264,52 @@ function addExternalLink(url, options) {
1064
1264
  }
1065
1265
  emitExternalLink(sessionId, url, options?.title, options?.linkType);
1066
1266
  }
1267
+ function recordFeedback(type, options) {
1268
+ const attributes = { [FEEDBACK_TYPE]: type };
1269
+ if (options?.score !== void 0) {
1270
+ attributes[FEEDBACK_SCORE] = options.score;
1271
+ }
1272
+ if (options?.reason !== void 0) {
1273
+ attributes[FEEDBACK_REASON] = options.reason;
1274
+ }
1275
+ if (options?.comment !== void 0) {
1276
+ attributes[FEEDBACK_COMMENT] = options.comment;
1277
+ }
1278
+ if (options?.source !== void 0) {
1279
+ attributes[FEEDBACK_SOURCE] = options.source;
1280
+ }
1281
+ if (options?.traits) {
1282
+ for (const [key, value] of Object.entries(options.traits)) {
1283
+ const k = `${FEEDBACK_ATTR_PREFIX}${key}`;
1284
+ if (attributes[k] === void 0) {
1285
+ attributes[k] = value;
1286
+ }
1287
+ }
1288
+ }
1289
+ const messageId = options?.messageId ?? resolveMessageIdFromContext();
1290
+ const sessionId = options?.sessionId ?? resolveSessionIdFromContext();
1291
+ if (messageId === void 0 && sessionId === void 0) {
1292
+ logger.warn(
1293
+ "recordFeedback called with no resolvable message id or session id; the feedback cannot be attributed to a message or conversation. Pass options.messageId / options.sessionId or call inside a startSession/callWithMessageId scope."
1294
+ );
1295
+ }
1296
+ const anchor = {};
1297
+ if (messageId !== void 0) {
1298
+ anchor[MESSAGE_ID] = messageId;
1299
+ }
1300
+ if (sessionId !== void 0) {
1301
+ anchor[SESSION_ID] = sessionId;
1302
+ }
1303
+ try {
1304
+ if (Object.keys(anchor).length === 0) {
1305
+ emitEvent(FEEDBACK_EVENT_NAME, attributes);
1306
+ } else {
1307
+ callWithProperties(anchor, () => emitEvent(FEEDBACK_EVENT_NAME, attributes));
1308
+ }
1309
+ } catch (error) {
1310
+ logger.warn("recordFeedback: failed to emit feedback event", error);
1311
+ }
1312
+ }
1067
1313
  function startSession(sessionId, callback, extraProperties, options) {
1068
1314
  const isTitle = options?.mode === "title";
1069
1315
  const spanName = isTitle ? SESSION_TITLE_SPAN_NAME : SESSION_SPAN_NAME;
@@ -1922,6 +2168,15 @@ export {
1922
2168
  setCurrentSpanCustomProperties,
1923
2169
  callWithProperties,
1924
2170
  withProperties,
2171
+ setUser,
2172
+ setOrganization,
2173
+ setMessageId,
2174
+ callWithUser,
2175
+ withUser,
2176
+ callWithOrganization,
2177
+ withOrganization,
2178
+ callWithMessageId,
2179
+ withMessageId,
1925
2180
  callWithMute,
1926
2181
  withMute,
1927
2182
  withSessionId,
@@ -1930,6 +2185,7 @@ export {
1930
2185
  SessionTitle,
1931
2186
  getActiveSession,
1932
2187
  addExternalLink,
2188
+ recordFeedback,
1933
2189
  startSession,
1934
2190
  startSessionTitle,
1935
2191
  DEFAULT_PII_PATTERNS,
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkOZCOXBB7cjs = require('./chunk-OZCOXBB7.cjs');
3
+ var _chunkLIFLVFK6cjs = require('./chunk-LIFLVFK6.cjs');
4
4
 
5
5
  // src/internal/instrumentation/vercel-ai/interrupt.ts
6
6
  var _api = require('@opentelemetry/api');
@@ -78,7 +78,7 @@ function createInterruptIntegration() {
78
78
  return;
79
79
  }
80
80
  const value = JSON.stringify(names);
81
- span.setAttribute(_chunkOZCOXBB7cjs.INTERRUPT_TOOLS, value);
81
+ span.setAttribute(_chunkLIFLVFK6cjs.INTERRUPT_TOOLS, value);
82
82
  setPending(span.spanContext().spanId, value);
83
83
  };
84
84
  return {
@@ -94,7 +94,7 @@ var InterruptPropagator = class {
94
94
  const parentSpanId = _optionalChain([span, 'access', _ => _.parentSpanContext, 'optionalAccess', _2 => _2.spanId]);
95
95
  const stashed = parentSpanId && pendingByParentSpanId.get(parentSpanId);
96
96
  if (stashed) {
97
- span.setAttribute(_chunkOZCOXBB7cjs.INTERRUPT_TOOLS, stashed);
97
+ span.setAttribute(_chunkLIFLVFK6cjs.INTERRUPT_TOOLS, stashed);
98
98
  pendingByParentSpanId.delete(parentSpanId);
99
99
  return;
100
100
  }
@@ -104,7 +104,7 @@ var InterruptPropagator = class {
104
104
  const scoped = parsePromptToolNames(span.attributes["ai.prompt.tools"]);
105
105
  const names = scoped === null ? [...needsApprovalToolNames] : scoped.filter((n) => needsApprovalToolNames.has(n));
106
106
  if (names.length > 0) {
107
- span.setAttribute(_chunkOZCOXBB7cjs.INTERRUPT_TOOLS, JSON.stringify(names));
107
+ span.setAttribute(_chunkLIFLVFK6cjs.INTERRUPT_TOOLS, JSON.stringify(names));
108
108
  }
109
109
  }
110
110
  onEnd() {
@@ -0,0 +1,80 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/internal/semantic-conventions.ts
2
+ var _api = require('@opentelemetry/api');
3
+ var BRIZZ = "brizz";
4
+ var PROPERTIES = "properties";
5
+ var SESSION_ID = "session.id";
6
+ var PROPERTIES_CONTEXT_KEY = _api.createContextKey.call(void 0, PROPERTIES);
7
+ var SESSION_OBJECT_CONTEXT_KEY = _api.createContextKey.call(void 0, "brizz.session.object");
8
+ var SESSION_INPUT = "brizz.session.input";
9
+ var SESSION_OUTPUT = "brizz.session.output";
10
+ var SESSION_INPUT_CONTEXT = "brizz.session.input.context";
11
+ var SESSION_OUTPUT_CONTEXT = "brizz.session.output.context";
12
+ var SESSION_SPAN_NAME = "brizz.start_session";
13
+ var MUTE_INPUT = "mute.input";
14
+ var MUTE_OUTPUT = "mute.output";
15
+ var USER_ID = "user.id";
16
+ var USER_EMAIL = "user.email";
17
+ var USER_NAME = "user.name";
18
+ var USER_ROLE = "user.role";
19
+ var USER_PLAN = "user.plan";
20
+ var ORGANIZATION_ID = "organization.id";
21
+ var ORGANIZATION_NAME = "organization.name";
22
+ var ORGANIZATION_PLAN = "organization.plan";
23
+ var ORGANIZATION_DOMAIN = "organization.domain";
24
+ var MESSAGE_ID = "message.id";
25
+ var SESSION_TITLE_SPAN_NAME = "brizz.session_title";
26
+ var SESSION_TITLE_GENERATION = "session.title_generation";
27
+ var SESSION_TITLE = "brizz.session.title";
28
+ var INTERRUPT_TOOLS = "brizz.internal.interrupt";
29
+ var INTERNAL_EVENT_PREFIX = "brizz.internal.";
30
+ var EXTERNAL_LINK_EVENT_NAME = "brizz.internal.external_link";
31
+ var EXTERNAL_LINK_URL = "brizz.internal.external_link.url";
32
+ var EXTERNAL_LINK_TITLE = "brizz.internal.external_link.title";
33
+ var EXTERNAL_LINK_TYPE = "brizz.internal.external_link.type";
34
+ var FEEDBACK_EVENT_NAME = "brizz.feedback";
35
+ var FEEDBACK_TYPE = "brizz.feedback.type";
36
+ var FEEDBACK_SCORE = "brizz.feedback.score";
37
+ var FEEDBACK_REASON = "brizz.feedback.reason";
38
+ var FEEDBACK_COMMENT = "brizz.feedback.comment";
39
+ var FEEDBACK_SOURCE = "brizz.feedback.source";
40
+ var FEEDBACK_ATTR_PREFIX = "brizz.feedback.";
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+ 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.USER_ID = USER_ID; exports.USER_EMAIL = USER_EMAIL; exports.USER_NAME = USER_NAME; exports.USER_ROLE = USER_ROLE; exports.USER_PLAN = USER_PLAN; exports.ORGANIZATION_ID = ORGANIZATION_ID; exports.ORGANIZATION_NAME = ORGANIZATION_NAME; exports.ORGANIZATION_PLAN = ORGANIZATION_PLAN; exports.ORGANIZATION_DOMAIN = ORGANIZATION_DOMAIN; exports.MESSAGE_ID = MESSAGE_ID; 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; exports.FEEDBACK_EVENT_NAME = FEEDBACK_EVENT_NAME; exports.FEEDBACK_TYPE = FEEDBACK_TYPE; exports.FEEDBACK_SCORE = FEEDBACK_SCORE; exports.FEEDBACK_REASON = FEEDBACK_REASON; exports.FEEDBACK_COMMENT = FEEDBACK_COMMENT; exports.FEEDBACK_SOURCE = FEEDBACK_SOURCE; exports.FEEDBACK_ATTR_PREFIX = FEEDBACK_ATTR_PREFIX;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  INTERRUPT_TOOLS
3
- } from "./chunk-VGMJ3KUM.js";
3
+ } from "./chunk-GRRKMMG6.js";
4
4
 
5
5
  // src/internal/instrumentation/vercel-ai/interrupt.ts
6
6
  import { trace } from "@opentelemetry/api";
@@ -1,6 +1,6 @@
1
1
  // src/internal/version.ts
2
2
  function getSDKVersion() {
3
- return "0.1.32";
3
+ return "0.1.33";
4
4
  }
5
5
 
6
6
  export {