@brizz/sdk 0.1.57 → 0.1.59
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 +52 -3
- package/dist/chunk-4QNEI7VZ.cjs +984 -0
- package/dist/{chunk-DCXOK7PX.cjs → chunk-5QZM5EVP.cjs} +8 -8
- package/dist/{chunk-O2IBZJOJ.cjs → chunk-6QXPHZEO.cjs} +4 -4
- package/dist/chunk-EZCNPWKM.js +984 -0
- package/dist/{chunk-7PRTTYWM.js → chunk-GABRGNAU.js} +1 -1
- package/dist/{chunk-GUKWVI53.js → chunk-GISL4K6Z.js} +27 -1
- package/dist/{chunk-RV7JIIDG.cjs → chunk-NF52RMLW.cjs} +27 -1
- package/dist/{chunk-42KYS2LU.js → chunk-ZGX52S4U.js} +2 -2
- package/dist/index.cjs +280 -966
- package/dist/index.js +238 -924
- package/dist/interrupt-36U5562Z.cjs +12 -0
- package/dist/{interrupt-UKJK5WOA.js → interrupt-6BSXUK3O.js} +2 -2
- package/dist/{mcp-FBTQYIOL.js → mcp-TTECBPGZ.js} +4 -3
- package/dist/{mcp-WHXEBLRI.cjs → mcp-UPBKSTB7.cjs} +19 -18
- package/dist/session.cjs +78 -0
- package/dist/session.js +78 -0
- package/dist/types/cjs/index.d.ts +2 -2
- package/dist/types/cjs/internal/error-type.d.ts +1 -0
- package/dist/types/cjs/internal/instrumentation/mcp/semantic-conventions.d.ts +1 -1
- package/dist/types/cjs/internal/instrumentation/typesafe.d.ts +0 -8
- package/dist/types/cjs/internal/log/emit.d.ts +8 -0
- package/dist/types/cjs/internal/log/logging.d.ts +2 -2
- package/dist/types/cjs/internal/semantic-conventions.d.ts +13 -0
- package/dist/types/cjs/internal/serialization.d.ts +2 -0
- package/dist/types/cjs/internal/trace/decision-call.d.ts +24 -0
- package/dist/types/cjs/internal/trace/index.d.ts +2 -0
- package/dist/types/cjs/internal/trace/session.d.ts +2 -1
- package/dist/types/cjs/session.d.ts +6 -0
- package/dist/types/esm/index.d.ts +2 -2
- package/dist/types/esm/internal/error-type.d.ts +1 -0
- package/dist/types/esm/internal/instrumentation/mcp/semantic-conventions.d.ts +1 -1
- package/dist/types/esm/internal/instrumentation/typesafe.d.ts +0 -8
- package/dist/types/esm/internal/log/emit.d.ts +8 -0
- package/dist/types/esm/internal/log/logging.d.ts +2 -2
- package/dist/types/esm/internal/semantic-conventions.d.ts +13 -0
- package/dist/types/esm/internal/serialization.d.ts +2 -0
- package/dist/types/esm/internal/trace/decision-call.d.ts +24 -0
- package/dist/types/esm/internal/trace/index.d.ts +2 -0
- package/dist/types/esm/internal/trace/session.d.ts +2 -1
- package/dist/types/esm/session.d.ts +6 -0
- package/package.json +29 -18
- package/dist/interrupt-BYLSBXTV.cjs +0 -12
|
@@ -5,11 +5,11 @@ var _chunkWC573FCIcjs = require('./chunk-WC573FCI.cjs');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkNF52RMLWcjs = require('./chunk-NF52RMLW.cjs');
|
|
9
9
|
|
|
10
10
|
// src/internal/version.ts
|
|
11
11
|
function getSDKVersion() {
|
|
12
|
-
return "0.1.
|
|
12
|
+
return "0.1.59";
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
// src/internal/instrumentation/mcp/session.ts
|
|
@@ -42,8 +42,8 @@ function resolveSessionId(protocol, baseContext) {
|
|
|
42
42
|
return fromTransport;
|
|
43
43
|
}
|
|
44
44
|
try {
|
|
45
|
-
const bound = baseContext.getValue(
|
|
46
|
-
if (_optionalChain([bound, 'optionalAccess', _3 => _3[
|
|
45
|
+
const bound = baseContext.getValue(_chunkNF52RMLWcjs.PROPERTIES_CONTEXT_KEY);
|
|
46
|
+
if (_optionalChain([bound, 'optionalAccess', _3 => _3[_chunkNF52RMLWcjs.SESSION_ID]])) {
|
|
47
47
|
return void 0;
|
|
48
48
|
}
|
|
49
49
|
} catch (e) {
|
|
@@ -57,7 +57,7 @@ function stampAndPropagateSession(span, sessionId, baseContext = _api.context.ac
|
|
|
57
57
|
}
|
|
58
58
|
const properties = {};
|
|
59
59
|
if (sessionId) {
|
|
60
|
-
properties[
|
|
60
|
+
properties[_chunkNF52RMLWcjs.SESSION_ID] = sessionId;
|
|
61
61
|
}
|
|
62
62
|
if (intent) {
|
|
63
63
|
properties[INTENT_PROPERTY] = intent;
|
|
@@ -65,17 +65,17 @@ function stampAndPropagateSession(span, sessionId, baseContext = _api.context.ac
|
|
|
65
65
|
if (span.isRecording()) {
|
|
66
66
|
for (const [key, value] of Object.entries(properties)) {
|
|
67
67
|
try {
|
|
68
|
-
span.setAttribute(`${
|
|
68
|
+
span.setAttribute(`${_chunkNF52RMLWcjs.BRIZZ}.${key}`, value);
|
|
69
69
|
} catch (error) {
|
|
70
70
|
_chunkWC573FCIcjs.logger.warn(`Brizz MCP: failed to stamp ${key} on span: ${String(error)}`);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
try {
|
|
75
|
-
const prev = baseContext.getValue(
|
|
75
|
+
const prev = baseContext.getValue(_chunkNF52RMLWcjs.PROPERTIES_CONTEXT_KEY);
|
|
76
76
|
const merged = prev ? { ...prev, ...properties } : properties;
|
|
77
77
|
return {
|
|
78
|
-
context: baseContext.setValue(
|
|
78
|
+
context: baseContext.setValue(_chunkNF52RMLWcjs.PROPERTIES_CONTEXT_KEY, merged),
|
|
79
79
|
sessionId: _nullishCoalesce(sessionId, () => ( null))
|
|
80
80
|
};
|
|
81
81
|
} catch (error) {
|
|
@@ -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
|
|
3
|
+
var _chunkNF52RMLWcjs = require('./chunk-NF52RMLW.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(
|
|
81
|
+
span.setAttribute(_chunkNF52RMLWcjs.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(
|
|
97
|
+
span.setAttribute(_chunkNF52RMLWcjs.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(
|
|
107
|
+
span.setAttribute(_chunkNF52RMLWcjs.INTERRUPT_TOOLS, JSON.stringify(names));
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
onEnd() {
|