@introspection-ai/recipes 0.36.1 → 0.37.0
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/agents.d.ts.map +1 -1
- package/dist/agents.js +46 -11
- package/dist/agents.js.map +1 -1
- package/dist/ask-user-question.d.ts +82 -0
- package/dist/ask-user-question.d.ts.map +1 -0
- package/dist/ask-user-question.js +314 -0
- package/dist/ask-user-question.js.map +1 -0
- package/dist/child/agent-completions.d.ts +2 -1
- package/dist/child/agent-completions.d.ts.map +1 -1
- package/dist/child/agent-completions.js +4 -3
- package/dist/child/agent-completions.js.map +1 -1
- package/dist/connector-tools.d.ts.map +1 -1
- package/dist/connector-tools.js +10 -2
- package/dist/connector-tools.js.map +1 -1
- package/dist/documents/index.d.ts +6 -0
- package/dist/documents/index.d.ts.map +1 -0
- package/dist/documents/index.js +3 -0
- package/dist/documents/index.js.map +1 -0
- package/dist/documents/module.d.ts +51 -0
- package/dist/documents/module.d.ts.map +1 -0
- package/dist/documents/module.js +116 -0
- package/dist/documents/module.js.map +1 -0
- package/dist/documents/tools.d.ts +40 -0
- package/dist/documents/tools.d.ts.map +1 -0
- package/dist/documents/tools.js +327 -0
- package/dist/documents/tools.js.map +1 -0
- package/dist/documents/types.d.ts +144 -0
- package/dist/documents/types.d.ts.map +1 -0
- package/dist/documents/types.js +10 -0
- package/dist/documents/types.js.map +1 -0
- package/dist/extensions.d.ts +2 -0
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +3 -0
- package/dist/extensions.js.map +1 -1
- package/dist/interaction-tui.d.ts +1 -1
- package/dist/interaction-tui.d.ts.map +1 -1
- package/dist/interaction-tui.js +2 -2
- package/dist/interaction-tui.js.map +1 -1
- package/dist/mcp-chunks/{auth-command-GMMLBU24.js → auth-command-M7TQE3AL.js} +26 -23
- package/dist/mcp-chunks/call-arguments-GCXZA4HC.js +16 -0
- package/dist/mcp-chunks/{call-command-2VF6IKAZ.js → call-command-7LD7UEFK.js} +33 -33
- package/dist/mcp-chunks/{chunk-TYL2NVXI.js → chunk-2AKSS7WR.js} +2 -2
- package/dist/mcp-chunks/{chunk-LZUKBEQZ.js → chunk-2YV72LUA.js} +12 -12
- package/dist/mcp-chunks/{chunk-2JTXIMGE.js → chunk-3ETUDW7N.js} +1 -1
- package/dist/mcp-chunks/{chunk-5UK2JLTN.js → chunk-3FRLDHVD.js} +5 -5
- package/dist/mcp-chunks/{chunk-ENBJFQ6H.js → chunk-3HSC6NHZ.js} +1 -1
- package/dist/mcp-chunks/{chunk-IHOU2BEL.js → chunk-3LENTPGE.js} +2 -2
- package/dist/mcp-chunks/{chunk-ZJWZY54X.js → chunk-3P3KGT4H.js} +2 -2
- package/dist/mcp-chunks/{chunk-IMXPLUKE.js → chunk-3SXP4S2A.js} +2 -2
- package/dist/mcp-chunks/{chunk-22WCLO4D.js → chunk-5Z6WSV5D.js} +5 -5
- package/dist/mcp-chunks/{chunk-QNZGFUKC.js → chunk-63L6SHK3.js} +2 -2
- package/dist/mcp-chunks/{chunk-OI3RTQXY.js → chunk-66VSGFXA.js} +1 -1
- package/dist/mcp-chunks/{chunk-DUBQHYW4.js → chunk-6O42UGLI.js} +9 -9
- package/dist/mcp-chunks/{chunk-R4OYHQ4V.js → chunk-6P3KAQ5N.js} +1 -1
- package/dist/mcp-chunks/{chunk-5OO6WVPL.js → chunk-7U5NSQ5T.js} +1 -1
- package/dist/mcp-chunks/{chunk-O2C3HXGS.js → chunk-B6S43WID.js} +1 -1
- package/dist/mcp-chunks/{chunk-VWPKJFK4.js → chunk-BHXCAVFP.js} +1 -1
- package/dist/mcp-chunks/{chunk-WXNGATQ7.js → chunk-BUOGKTKK.js} +2 -1
- package/dist/mcp-chunks/{chunk-4U4BUXQD.js → chunk-CXST5CVH.js} +33 -17
- package/dist/mcp-chunks/{chunk-YWFQPA4D.js → chunk-DU4SDPEV.js} +2 -2
- package/dist/mcp-chunks/{chunk-ZI5XYM4C.js → chunk-E76ZUBOJ.js} +4 -4
- package/dist/mcp-chunks/{chunk-D2SZ7KRY.js → chunk-ELHS763C.js} +1 -1
- package/dist/mcp-chunks/{chunk-RHXZKYM7.js → chunk-F2X4Y2TQ.js} +1 -1
- package/dist/mcp-chunks/{chunk-6XC5JJWD.js → chunk-GTETFUPQ.js} +28 -25
- package/dist/mcp-chunks/{chunk-UQUM7ICD.js → chunk-GZ53GNFP.js} +10 -10
- package/dist/mcp-chunks/{chunk-LUVLTUKR.js → chunk-H5PBSJP3.js} +1 -1
- package/dist/mcp-chunks/{chunk-FLUF2FRN.js → chunk-HNQSUT44.js} +3 -3
- package/dist/mcp-chunks/{chunk-CN5KSNWG.js → chunk-I6UFV7RW.js} +1 -1
- package/dist/mcp-chunks/{chunk-OSTHIELS.js → chunk-IRARVOUM.js} +1 -1
- package/dist/mcp-chunks/{webapi-NNCZGUMZ.js → chunk-IRSL7JRH.js} +255 -249
- package/dist/mcp-chunks/{chunk-ZXIF7MKN.js → chunk-IWCVZ46B.js} +2 -2
- package/dist/mcp-chunks/{chunk-RZZO3ZD4.js → chunk-JEHI2YU4.js} +3 -3
- package/dist/mcp-chunks/{chunk-ANNJGB6F.js → chunk-JTPTAO4M.js} +13 -13
- package/dist/mcp-chunks/{chunk-U5QZHPCC.js → chunk-KJ5FPQF6.js} +1 -1
- package/dist/mcp-chunks/{chunk-7IVXKYTI.js → chunk-L2MSWQDL.js} +1 -1
- package/dist/mcp-chunks/{chunk-DBNBEWRX.js → chunk-MEQXX43K.js} +1 -1
- package/dist/mcp-chunks/{chunk-3AAF3FSI.js → chunk-MHUMLEBO.js} +1 -1
- package/dist/mcp-chunks/{chunk-HFHIY5TO.js → chunk-N2U2FODH.js} +4 -4
- package/dist/mcp-chunks/{chunk-YFCNRWLV.js → chunk-N6YUOYDS.js} +2 -2
- package/dist/mcp-chunks/{chunk-C4TJGC4F.js → chunk-O3RTM5HD.js} +1 -1
- package/dist/mcp-chunks/{chunk-35LLRCRA.js → chunk-O7SIXJM6.js} +1308 -912
- package/dist/mcp-chunks/{chunk-QDFL757K.js → chunk-PSE442BC.js} +91 -77
- package/dist/mcp-chunks/{chunk-YPSODIQX.js → chunk-QNXOIF5U.js} +15 -14
- package/dist/mcp-chunks/{chunk-RKQC2EE6.js → chunk-RUF27IUF.js} +2 -2
- package/dist/mcp-chunks/{chunk-SS7V7GVT.js → chunk-S2F7DDP5.js} +4 -4
- package/dist/mcp-chunks/{chunk-D65GOMYV.js → chunk-TC2JPBFB.js} +2 -2
- package/dist/mcp-chunks/{chunk-7BVYBZ4J.js → chunk-THRMUZZD.js} +39 -14
- package/dist/mcp-chunks/{chunk-P5YLK5G2.js → chunk-UFV6SVQG.js} +11 -11
- package/dist/mcp-chunks/{chunk-LISNXOIQ.js → chunk-US63Y6XE.js} +1 -1
- package/dist/mcp-chunks/{chunk-BIVX2WFX.js → chunk-UVEZNUN3.js} +285 -322
- package/dist/mcp-chunks/{chunk-HI6VG5LR.js → chunk-UVRJ3AAD.js} +2 -2
- package/dist/mcp-chunks/{chunk-6TIU2CDB.js → chunk-V42T3QNK.js} +456 -64
- package/dist/mcp-chunks/{chunk-347GOMV4.js → chunk-WDWSA7RL.js} +4 -4
- package/dist/mcp-chunks/{chunk-4PN2J74H.js → chunk-WQL7FJQ3.js} +4 -4
- package/dist/mcp-chunks/{chunk-LRGMFF5S.js → chunk-ZEA3Y5ZD.js} +7 -7
- package/dist/mcp-chunks/{cli-4OQD3H4N.js → cli-IYD7Y7MO.js} +67 -67
- package/dist/mcp-chunks/client-5MNBV3Z7.js +32 -0
- package/dist/mcp-chunks/{config-command-72TCIWPV.js → config-command-6DXILFNO.js} +129 -34
- package/dist/mcp-chunks/daemon-command-V3B3EMXD.js +32 -0
- package/dist/mcp-chunks/{dist-74UCKZK5.js → dist-Q7WSCBBK.js} +74 -55
- package/dist/mcp-chunks/{emit-ts-command-KD4ON2SE.js → emit-ts-command-NDCDFDRM.js} +17 -17
- package/dist/mcp-chunks/{generate-cli-runner-HWGI6HPL.js → generate-cli-runner-PW5WJ7KI.js} +136 -92
- package/dist/mcp-chunks/generated-daemon-runtime-3C4NWGAU.js +32 -0
- package/dist/mcp-chunks/{inspect-cli-command-FT5JSB7V.js → inspect-cli-command-4MGF5CPP.js} +9 -9
- package/dist/mcp-chunks/{launch-AHLKP2VM.js → launch-UG7IH27P.js} +1 -1
- package/dist/mcp-chunks/{lifecycle-BJDITFWN.js → lifecycle-QBYGUHQ3.js} +1 -1
- package/dist/mcp-chunks/{list-command-YKF7RN6Y.js → list-command-SDITI3ZM.js} +36 -35
- package/dist/mcp-chunks/{output-utils-LYB5IJRD.js → output-utils-YTMZTA7J.js} +3 -3
- package/dist/mcp-chunks/{prompt-CH6TK0bC-B3USYOND.js → prompt-DkftHXS7-N7UENQ4C.js} +1 -1
- package/dist/mcp-chunks/{record-command-MJW3Z5E5.js → record-command-JGTMATYI.js} +5 -5
- package/dist/mcp-chunks/{replay-command-5ZHBUOLE.js → replay-command-S2VAC4RW.js} +6 -6
- package/dist/mcp-chunks/{resource-command-L4I24AX5.js → resource-command-SRFQQROJ.js} +9 -9
- package/dist/mcp-chunks/{result-utils-5WRI66KV.js → result-utils-JASGNHXK.js} +3 -3
- package/dist/mcp-chunks/runtime-RMI3XCYJ.js +39 -0
- package/dist/mcp-chunks/{runtime-wrapper-WFMNIHD5.js → runtime-wrapper-7HYO3NM5.js} +3 -3
- package/dist/mcp-chunks/{serve-command-KNCSJUXS.js → serve-command-UF5SVREV.js} +1111 -697
- package/dist/mcp-chunks/{timeouts-2ZHGSB3R.js → timeouts-BJWDJEMH.js} +3 -3
- package/dist/mcp-chunks/{vault-command-7EDL45AA.js → vault-command-EYOIFWEY.js} +5 -4
- package/dist/mcp-chunks/webapi-WMMA3OEC.js +82 -0
- package/dist/mcp-daemon.js +28 -27
- package/dist/mcp-run-worker.js +28 -27
- package/dist/pi-extension.d.ts.map +1 -1
- package/dist/pi-extension.js +6 -0
- package/dist/pi-extension.js.map +1 -1
- package/dist/recipe/package.d.ts +7 -0
- package/dist/recipe/package.d.ts.map +1 -1
- package/dist/recipe/package.js +69 -0
- package/dist/recipe/package.js.map +1 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +6 -0
- package/dist/session.js.map +1 -1
- package/docs/agent-composition.md +8 -0
- package/docs/documents.md +249 -0
- package/docs/index.md +1 -0
- package/docs/interactions.md +76 -8
- package/docs/mcp-configuration.md +10 -5
- package/docs/recipe-format.md +69 -1
- package/package.json +10 -6
- package/dist/mcp-chunks/call-arguments-WSURHOLV.js +0 -16
- package/dist/mcp-chunks/client-LXKCCVMT.js +0 -31
- package/dist/mcp-chunks/daemon-command-QHS3ACBM.js +0 -31
- package/dist/mcp-chunks/generated-daemon-runtime-7ORS5KBR.js +0 -31
- package/dist/mcp-chunks/runtime-IKWDQLZF.js +0 -38
|
@@ -2,81 +2,30 @@ import { createRequire as __createRequire } from "node:module"; const require =
|
|
|
2
2
|
import {
|
|
3
3
|
createCallResult,
|
|
4
4
|
describeConnectionIssue
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3SXP4S2A.js";
|
|
6
6
|
import {
|
|
7
7
|
createRuntime
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PSE442BC.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
11
|
-
|
|
12
|
-
return Symbol.for(description);
|
|
13
|
-
}
|
|
14
|
-
var BaseContext = class _BaseContext {
|
|
15
|
-
/**
|
|
16
|
-
* Construct a new context which inherits values from an optional parent context.
|
|
17
|
-
*
|
|
18
|
-
* @param parentContext a context from which to inherit values
|
|
19
|
-
*/
|
|
20
|
-
constructor(parentContext) {
|
|
21
|
-
const self2 = this;
|
|
22
|
-
self2._currentContext = parentContext ? new Map(parentContext) : /* @__PURE__ */ new Map();
|
|
23
|
-
self2.getValue = (key) => self2._currentContext.get(key);
|
|
24
|
-
self2.setValue = (key, value) => {
|
|
25
|
-
const context2 = new _BaseContext(self2._currentContext);
|
|
26
|
-
context2._currentContext.set(key, value);
|
|
27
|
-
return context2;
|
|
28
|
-
};
|
|
29
|
-
self2.deleteValue = (key) => {
|
|
30
|
-
const context2 = new _BaseContext(self2._currentContext);
|
|
31
|
-
context2._currentContext.delete(key);
|
|
32
|
-
return context2;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
var ROOT_CONTEXT = new BaseContext();
|
|
37
|
-
|
|
38
|
-
// node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js
|
|
39
|
-
var NoopContextManager = class {
|
|
40
|
-
active() {
|
|
41
|
-
return ROOT_CONTEXT;
|
|
42
|
-
}
|
|
43
|
-
with(_context, fn, thisArg, ...args) {
|
|
44
|
-
return fn.call(thisArg, ...args);
|
|
45
|
-
}
|
|
46
|
-
bind(_context, target) {
|
|
47
|
-
return target;
|
|
48
|
-
}
|
|
49
|
-
enable() {
|
|
50
|
-
return this;
|
|
51
|
-
}
|
|
52
|
-
disable() {
|
|
53
|
-
return this;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
// node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/version.js
|
|
58
|
-
var VERSION = "1.9.1";
|
|
10
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/version.mjs
|
|
11
|
+
var VERSION = "1.10.0";
|
|
59
12
|
|
|
60
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
13
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/internal/semver.mjs
|
|
61
14
|
var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
62
15
|
function _makeCompatibilityCheck(ownVersion) {
|
|
63
16
|
const acceptedVersions = /* @__PURE__ */ new Set([ownVersion]);
|
|
64
17
|
const rejectedVersions = /* @__PURE__ */ new Set();
|
|
65
18
|
const myVersionMatch = ownVersion.match(re);
|
|
66
|
-
if (!myVersionMatch)
|
|
67
|
-
return () => false;
|
|
68
|
-
}
|
|
19
|
+
if (!myVersionMatch) return () => false;
|
|
69
20
|
const ownVersionParsed = {
|
|
70
21
|
major: +myVersionMatch[1],
|
|
71
22
|
minor: +myVersionMatch[2],
|
|
72
23
|
patch: +myVersionMatch[3],
|
|
73
24
|
prerelease: myVersionMatch[4]
|
|
74
25
|
};
|
|
75
|
-
if (ownVersionParsed.prerelease != null) {
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
};
|
|
79
|
-
}
|
|
26
|
+
if (ownVersionParsed.prerelease != null) return function isExactmatch(globalVersion) {
|
|
27
|
+
return globalVersion === ownVersion;
|
|
28
|
+
};
|
|
80
29
|
function _reject(v) {
|
|
81
30
|
rejectedVersions.add(v);
|
|
82
31
|
return false;
|
|
@@ -86,58 +35,50 @@ function _makeCompatibilityCheck(ownVersion) {
|
|
|
86
35
|
return true;
|
|
87
36
|
}
|
|
88
37
|
return function isCompatible2(globalVersion) {
|
|
89
|
-
if (acceptedVersions.has(globalVersion))
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
if (rejectedVersions.has(globalVersion)) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
38
|
+
if (acceptedVersions.has(globalVersion)) return true;
|
|
39
|
+
if (rejectedVersions.has(globalVersion)) return false;
|
|
95
40
|
const globalVersionMatch = globalVersion.match(re);
|
|
96
|
-
if (!globalVersionMatch)
|
|
97
|
-
return _reject(globalVersion);
|
|
98
|
-
}
|
|
41
|
+
if (!globalVersionMatch) return _reject(globalVersion);
|
|
99
42
|
const globalVersionParsed = {
|
|
100
43
|
major: +globalVersionMatch[1],
|
|
101
44
|
minor: +globalVersionMatch[2],
|
|
102
45
|
patch: +globalVersionMatch[3],
|
|
103
46
|
prerelease: globalVersionMatch[4]
|
|
104
47
|
};
|
|
105
|
-
if (globalVersionParsed.prerelease != null)
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
if (ownVersionParsed.major !== globalVersionParsed.major) {
|
|
109
|
-
return _reject(globalVersion);
|
|
110
|
-
}
|
|
48
|
+
if (globalVersionParsed.prerelease != null) return _reject(globalVersion);
|
|
49
|
+
if (ownVersionParsed.major !== globalVersionParsed.major) return _reject(globalVersion);
|
|
111
50
|
if (ownVersionParsed.major === 0) {
|
|
112
|
-
if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch)
|
|
113
|
-
return _accept(globalVersion);
|
|
114
|
-
}
|
|
51
|
+
if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) return _accept(globalVersion);
|
|
115
52
|
return _reject(globalVersion);
|
|
116
53
|
}
|
|
117
|
-
if (ownVersionParsed.minor <= globalVersionParsed.minor)
|
|
118
|
-
return _accept(globalVersion);
|
|
119
|
-
}
|
|
54
|
+
if (ownVersionParsed.minor <= globalVersionParsed.minor) return _accept(globalVersion);
|
|
120
55
|
return _reject(globalVersion);
|
|
121
56
|
};
|
|
122
57
|
}
|
|
123
58
|
var isCompatible = _makeCompatibilityCheck(VERSION);
|
|
124
59
|
|
|
125
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
60
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/internal/global-utils.mjs
|
|
126
61
|
var major = VERSION.split(".")[0];
|
|
127
62
|
var GLOBAL_OPENTELEMETRY_API_KEY = /* @__PURE__ */ Symbol.for(`opentelemetry.js.api.${major}`);
|
|
128
63
|
var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
64
|
+
function _makeGlobalApi() {
|
|
65
|
+
return Object.defineProperty({}, "version", {
|
|
66
|
+
value: VERSION,
|
|
67
|
+
enumerable: true,
|
|
68
|
+
writable: false,
|
|
69
|
+
configurable: false
|
|
70
|
+
});
|
|
71
|
+
}
|
|
129
72
|
function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
130
|
-
var
|
|
131
|
-
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (
|
|
132
|
-
version: VERSION
|
|
133
|
-
};
|
|
73
|
+
var _global$GLOBAL_OPENTE;
|
|
74
|
+
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_global$GLOBAL_OPENTE = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _global$GLOBAL_OPENTE !== void 0 ? _global$GLOBAL_OPENTE : _makeGlobalApi();
|
|
134
75
|
if (!allowOverride && api[type]) {
|
|
135
|
-
const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
|
|
76
|
+
const err = /* @__PURE__ */ new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
|
|
136
77
|
diag.error(err.stack || err.message);
|
|
137
78
|
return false;
|
|
138
79
|
}
|
|
139
|
-
if (api.version !==
|
|
140
|
-
const err = new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`);
|
|
80
|
+
if (api.version !== "1.10.0") {
|
|
81
|
+
const err = /* @__PURE__ */ new Error(`@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`);
|
|
141
82
|
diag.error(err.stack || err.message);
|
|
142
83
|
return false;
|
|
143
84
|
}
|
|
@@ -145,23 +86,23 @@ function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
|
145
86
|
diag.debug(`@opentelemetry/api: Registered a global for ${type} v${VERSION}.`);
|
|
146
87
|
return true;
|
|
147
88
|
}
|
|
89
|
+
var _compatibleGlobalApi;
|
|
148
90
|
function getGlobal(type) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
if (
|
|
152
|
-
return;
|
|
91
|
+
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
92
|
+
if (api == null) return;
|
|
93
|
+
if (api !== _compatibleGlobalApi) {
|
|
94
|
+
if (!api.version || !isCompatible(api.version)) return;
|
|
95
|
+
_compatibleGlobalApi = api;
|
|
153
96
|
}
|
|
154
|
-
return
|
|
97
|
+
return api[type];
|
|
155
98
|
}
|
|
156
99
|
function unregisterGlobal(type, diag) {
|
|
157
100
|
diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${VERSION}.`);
|
|
158
101
|
const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
159
|
-
if (api)
|
|
160
|
-
delete api[type];
|
|
161
|
-
}
|
|
102
|
+
if (api) delete api[type];
|
|
162
103
|
}
|
|
163
104
|
|
|
164
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
105
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/diag/ComponentLogger.mjs
|
|
165
106
|
var DiagComponentLogger = class {
|
|
166
107
|
constructor(props) {
|
|
167
108
|
this._namespace = props.namespace || "DiagComponentLogger";
|
|
@@ -184,89 +125,65 @@ var DiagComponentLogger = class {
|
|
|
184
125
|
};
|
|
185
126
|
function logProxy(funcName, namespace, args) {
|
|
186
127
|
const logger = getGlobal("diag");
|
|
187
|
-
if (!logger)
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
128
|
+
if (!logger) return;
|
|
190
129
|
return logger[funcName](namespace, ...args);
|
|
191
130
|
}
|
|
192
131
|
|
|
193
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
194
|
-
var DiagLogLevel;
|
|
195
|
-
(function(DiagLogLevel2) {
|
|
196
|
-
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
197
|
-
DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
|
|
198
|
-
DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
|
|
199
|
-
DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
|
|
200
|
-
DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
|
|
201
|
-
DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
|
|
202
|
-
DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
|
|
203
|
-
})(DiagLogLevel || (DiagLogLevel = {}));
|
|
204
|
-
|
|
205
|
-
// node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js
|
|
132
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/diag/internal/logLevelLogger.mjs
|
|
206
133
|
function createLogLevelDiagLogger(maxLevel, logger) {
|
|
207
|
-
if (maxLevel <
|
|
208
|
-
|
|
209
|
-
} else if (maxLevel > DiagLogLevel.ALL) {
|
|
210
|
-
maxLevel = DiagLogLevel.ALL;
|
|
211
|
-
}
|
|
134
|
+
if (maxLevel < 0) maxLevel = 0;
|
|
135
|
+
else if (maxLevel > 9999) maxLevel = 9999;
|
|
212
136
|
logger = logger || {};
|
|
213
137
|
function _filterFunc(funcName, theLevel) {
|
|
214
138
|
const theFunc = logger[funcName];
|
|
215
|
-
if (typeof theFunc === "function" && maxLevel >= theLevel)
|
|
216
|
-
return theFunc.bind(logger);
|
|
217
|
-
}
|
|
139
|
+
if (typeof theFunc === "function" && maxLevel >= theLevel) return theFunc.bind(logger);
|
|
218
140
|
return function() {
|
|
219
141
|
};
|
|
220
142
|
}
|
|
221
143
|
return {
|
|
222
|
-
error: _filterFunc("error",
|
|
223
|
-
warn: _filterFunc("warn",
|
|
224
|
-
info: _filterFunc("info",
|
|
225
|
-
debug: _filterFunc("debug",
|
|
226
|
-
verbose: _filterFunc("verbose",
|
|
144
|
+
error: _filterFunc("error", 30),
|
|
145
|
+
warn: _filterFunc("warn", 50),
|
|
146
|
+
info: _filterFunc("info", 60),
|
|
147
|
+
debug: _filterFunc("debug", 70),
|
|
148
|
+
verbose: _filterFunc("verbose", 80)
|
|
227
149
|
};
|
|
228
150
|
}
|
|
229
151
|
|
|
230
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
152
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/api/diag.mjs
|
|
231
153
|
var API_NAME = "diag";
|
|
232
|
-
var DiagAPI = class
|
|
154
|
+
var DiagAPI = class DiagAPI2 {
|
|
233
155
|
/** Get the singleton instance of the DiagAPI API */
|
|
234
156
|
static instance() {
|
|
235
|
-
if (!this._instance)
|
|
236
|
-
this._instance = new _DiagAPI();
|
|
237
|
-
}
|
|
157
|
+
if (!this._instance) this._instance = new DiagAPI2();
|
|
238
158
|
return this._instance;
|
|
239
159
|
}
|
|
240
160
|
/**
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
161
|
+
* Private internal constructor
|
|
162
|
+
* @private
|
|
163
|
+
*/
|
|
244
164
|
constructor() {
|
|
245
165
|
function _logProxy(funcName) {
|
|
246
166
|
return function(...args) {
|
|
247
167
|
const logger = getGlobal("diag");
|
|
248
|
-
if (!logger)
|
|
249
|
-
return;
|
|
168
|
+
if (!logger) return;
|
|
250
169
|
return logger[funcName](...args);
|
|
251
170
|
};
|
|
252
171
|
}
|
|
253
172
|
const self2 = this;
|
|
254
|
-
const setLogger = (logger, optionsOrLogLevel = { logLevel:
|
|
255
|
-
var
|
|
173
|
+
const setLogger = (logger, optionsOrLogLevel = { logLevel: 60 }) => {
|
|
174
|
+
var _optionsOrLogLevel$lo;
|
|
256
175
|
if (logger === self2) {
|
|
257
|
-
|
|
258
|
-
|
|
176
|
+
var _err$stack;
|
|
177
|
+
const err = /* @__PURE__ */ new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
178
|
+
self2.error((_err$stack = err.stack) !== null && _err$stack !== void 0 ? _err$stack : err.message);
|
|
259
179
|
return false;
|
|
260
180
|
}
|
|
261
|
-
if (typeof optionsOrLogLevel === "number") {
|
|
262
|
-
optionsOrLogLevel = {
|
|
263
|
-
logLevel: optionsOrLogLevel
|
|
264
|
-
};
|
|
265
|
-
}
|
|
181
|
+
if (typeof optionsOrLogLevel === "number") optionsOrLogLevel = { logLevel: optionsOrLogLevel };
|
|
266
182
|
const oldLogger = getGlobal("diag");
|
|
267
|
-
const newLogger = createLogLevelDiagLogger((
|
|
183
|
+
const newLogger = createLogLevelDiagLogger((_optionsOrLogLevel$lo = optionsOrLogLevel.logLevel) !== null && _optionsOrLogLevel$lo !== void 0 ? _optionsOrLogLevel$lo : 60, logger);
|
|
268
184
|
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
269
|
-
|
|
185
|
+
var _Error$stack;
|
|
186
|
+
const stack = (_Error$stack = (/* @__PURE__ */ new Error()).stack) !== null && _Error$stack !== void 0 ? _Error$stack : "<failed to generate stacktrace>";
|
|
270
187
|
oldLogger.warn(`Current logger will be overwritten from ${stack}`);
|
|
271
188
|
newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
|
|
272
189
|
}
|
|
@@ -287,54 +204,137 @@ var DiagAPI = class _DiagAPI {
|
|
|
287
204
|
}
|
|
288
205
|
};
|
|
289
206
|
|
|
290
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
207
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/context/context.mjs
|
|
208
|
+
function createContextKey(description) {
|
|
209
|
+
return Symbol.for(description);
|
|
210
|
+
}
|
|
211
|
+
var ROOT_CONTEXT = new class BaseContext {
|
|
212
|
+
/**
|
|
213
|
+
* Construct a new context which inherits values from an optional parent context.
|
|
214
|
+
*
|
|
215
|
+
* @param parentContext a context from which to inherit values
|
|
216
|
+
*/
|
|
217
|
+
constructor(parentContext) {
|
|
218
|
+
const self2 = this;
|
|
219
|
+
self2._currentContext = parentContext ? new Map(parentContext) : /* @__PURE__ */ new Map();
|
|
220
|
+
self2.getValue = (key) => self2._currentContext.get(key);
|
|
221
|
+
self2.setValue = (key, value) => {
|
|
222
|
+
const context2 = new BaseContext(self2._currentContext);
|
|
223
|
+
context2._currentContext.set(key, value);
|
|
224
|
+
return context2;
|
|
225
|
+
};
|
|
226
|
+
self2.deleteValue = (key) => {
|
|
227
|
+
const context2 = new BaseContext(self2._currentContext);
|
|
228
|
+
context2._currentContext.delete(key);
|
|
229
|
+
return context2;
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
}();
|
|
233
|
+
|
|
234
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/context/NoopContextManager.mjs
|
|
235
|
+
var NoopContextManager = class {
|
|
236
|
+
active() {
|
|
237
|
+
return ROOT_CONTEXT;
|
|
238
|
+
}
|
|
239
|
+
with(_context, fn, thisArg, ...args) {
|
|
240
|
+
return fn.call(thisArg, ...args);
|
|
241
|
+
}
|
|
242
|
+
bind(_context, target) {
|
|
243
|
+
return target;
|
|
244
|
+
}
|
|
245
|
+
enable() {
|
|
246
|
+
return this;
|
|
247
|
+
}
|
|
248
|
+
disable() {
|
|
249
|
+
return this;
|
|
250
|
+
}
|
|
251
|
+
/** @experimental This API is experimental and may change in minor releases without prior notice. */
|
|
252
|
+
attach(_context) {
|
|
253
|
+
return { dispose() {
|
|
254
|
+
} };
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/api/context.mjs
|
|
291
259
|
var API_NAME2 = "context";
|
|
292
260
|
var NOOP_CONTEXT_MANAGER = new NoopContextManager();
|
|
293
|
-
var
|
|
261
|
+
var NOOP_TOKEN = Object.freeze({ dispose: () => {
|
|
262
|
+
} });
|
|
263
|
+
var ContextAPI = class ContextAPI2 {
|
|
294
264
|
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
295
265
|
constructor() {
|
|
266
|
+
this._attachUnsupportedWarned = false;
|
|
296
267
|
}
|
|
297
268
|
/** Get the singleton instance of the Context API */
|
|
298
269
|
static getInstance() {
|
|
299
|
-
if (!this._instance)
|
|
300
|
-
this._instance = new _ContextAPI();
|
|
301
|
-
}
|
|
270
|
+
if (!this._instance) this._instance = new ContextAPI2();
|
|
302
271
|
return this._instance;
|
|
303
272
|
}
|
|
304
273
|
/**
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
274
|
+
* Set the current context manager.
|
|
275
|
+
*
|
|
276
|
+
* @returns true if the context manager was successfully registered, else false
|
|
277
|
+
*/
|
|
309
278
|
setGlobalContextManager(contextManager) {
|
|
310
279
|
return registerGlobal(API_NAME2, contextManager, DiagAPI.instance());
|
|
311
280
|
}
|
|
312
281
|
/**
|
|
313
|
-
|
|
314
|
-
|
|
282
|
+
* Get the currently active context
|
|
283
|
+
*/
|
|
315
284
|
active() {
|
|
316
285
|
return this._getContextManager().active();
|
|
317
286
|
}
|
|
318
287
|
/**
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
288
|
+
* Execute a function with an active context
|
|
289
|
+
*
|
|
290
|
+
* @param context context to be active during function execution
|
|
291
|
+
* @param fn function to execute in a context
|
|
292
|
+
* @param thisArg optional receiver to be used for calling fn
|
|
293
|
+
* @param args optional arguments forwarded to fn
|
|
294
|
+
*/
|
|
326
295
|
with(context2, fn, thisArg, ...args) {
|
|
327
296
|
return this._getContextManager().with(context2, fn, thisArg, ...args);
|
|
328
297
|
}
|
|
329
298
|
/**
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
299
|
+
* Bind a context to a target function or event emitter
|
|
300
|
+
*
|
|
301
|
+
* @param context context to bind to the event emitter or function. Defaults to the currently active context
|
|
302
|
+
* @param target function or event emitter to bind
|
|
303
|
+
*/
|
|
335
304
|
bind(context2, target) {
|
|
336
305
|
return this._getContextManager().bind(context2, target);
|
|
337
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* Imperatively sets `context` as active, returning a {@link ContextManagementToken} whose
|
|
309
|
+
* {@link ContextManagementToken.dispose} restores the previous context.
|
|
310
|
+
*
|
|
311
|
+
* This is a delicate, low-level API - prefer {@link with}/{@link bind}, which
|
|
312
|
+
* restore context automatically. Use `attach` only to bridge callback
|
|
313
|
+
* boundaries that `with` cannot wrap. Call `token.dispose()` when the
|
|
314
|
+
* operation is done.
|
|
315
|
+
*
|
|
316
|
+
* **Caveat for async functions:** If called inside an async function before
|
|
317
|
+
* the first `await`, the context change may leak into the caller's context
|
|
318
|
+
* and remain active there. Prefer {@link with} for async code.
|
|
319
|
+
*
|
|
320
|
+
* Support is best-effort and varies by the active ContextManager (see
|
|
321
|
+
* {@link ContextManager.attach}); if it does not implement `attach`, this logs
|
|
322
|
+
* a warning and returns a no-op token.
|
|
323
|
+
*
|
|
324
|
+
* @param context The Context to attach
|
|
325
|
+
* @returns A {@link ContextManagementToken} whose dispose() restores the previous Context
|
|
326
|
+
* @since 1.10.0
|
|
327
|
+
* @experimental This API is experimental and may change in minor releases without prior notice.
|
|
328
|
+
*/
|
|
329
|
+
attach(context2) {
|
|
330
|
+
const contextManager = this._getContextManager();
|
|
331
|
+
if (contextManager.attach) return contextManager.attach(context2);
|
|
332
|
+
if (!this._attachUnsupportedWarned) {
|
|
333
|
+
this._attachUnsupportedWarned = true;
|
|
334
|
+
DiagAPI.instance().warn("The current ContextManager does not implement attach(). The context will not be attached. Use a ContextManager that supports attach() (e.g. AsyncLocalStorageContextManager) or use with()/bind() instead.");
|
|
335
|
+
}
|
|
336
|
+
return NOOP_TOKEN;
|
|
337
|
+
}
|
|
338
338
|
_getContextManager() {
|
|
339
339
|
return getGlobal(API_NAME2) || NOOP_CONTEXT_MANAGER;
|
|
340
340
|
}
|
|
@@ -345,43 +345,32 @@ var ContextAPI = class _ContextAPI {
|
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
347
|
|
|
348
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
348
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/context-api.mjs
|
|
349
349
|
var context = ContextAPI.getInstance();
|
|
350
350
|
|
|
351
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
352
|
-
var TraceFlags;
|
|
353
|
-
(function(TraceFlags2) {
|
|
354
|
-
TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
|
|
355
|
-
TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
|
|
356
|
-
})(TraceFlags || (TraceFlags = {}));
|
|
357
|
-
|
|
358
|
-
// node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js
|
|
351
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/invalid-span-constants.mjs
|
|
359
352
|
var INVALID_SPANID = "0000000000000000";
|
|
360
353
|
var INVALID_TRACEID = "00000000000000000000000000000000";
|
|
361
354
|
var INVALID_SPAN_CONTEXT = {
|
|
362
355
|
traceId: INVALID_TRACEID,
|
|
363
356
|
spanId: INVALID_SPANID,
|
|
364
|
-
traceFlags:
|
|
357
|
+
traceFlags: 0
|
|
365
358
|
};
|
|
366
359
|
|
|
367
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
360
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/NonRecordingSpan.mjs
|
|
368
361
|
var NonRecordingSpan = class {
|
|
369
362
|
constructor(spanContext = INVALID_SPAN_CONTEXT) {
|
|
370
363
|
this._spanContext = spanContext;
|
|
371
364
|
}
|
|
372
|
-
// Returns a SpanContext.
|
|
373
365
|
spanContext() {
|
|
374
366
|
return this._spanContext;
|
|
375
367
|
}
|
|
376
|
-
// By default does nothing
|
|
377
368
|
setAttribute(_key, _value) {
|
|
378
369
|
return this;
|
|
379
370
|
}
|
|
380
|
-
// By default does nothing
|
|
381
371
|
setAttributes(_attributes) {
|
|
382
372
|
return this;
|
|
383
373
|
}
|
|
384
|
-
// By default does nothing
|
|
385
374
|
addEvent(_name, _attributes) {
|
|
386
375
|
return this;
|
|
387
376
|
}
|
|
@@ -391,49 +380,22 @@ var NonRecordingSpan = class {
|
|
|
391
380
|
addLinks(_links) {
|
|
392
381
|
return this;
|
|
393
382
|
}
|
|
394
|
-
// By default does nothing
|
|
395
383
|
setStatus(_status) {
|
|
396
384
|
return this;
|
|
397
385
|
}
|
|
398
|
-
// By default does nothing
|
|
399
386
|
updateName(_name) {
|
|
400
387
|
return this;
|
|
401
388
|
}
|
|
402
|
-
// By default does nothing
|
|
403
389
|
end(_endTime) {
|
|
404
390
|
}
|
|
405
|
-
// isRecording always returns false for NonRecordingSpan.
|
|
406
391
|
isRecording() {
|
|
407
392
|
return false;
|
|
408
393
|
}
|
|
409
|
-
// By default does nothing
|
|
410
394
|
recordException(_exception, _time) {
|
|
411
395
|
}
|
|
412
396
|
};
|
|
413
397
|
|
|
414
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
415
|
-
var SPAN_KEY = createContextKey("OpenTelemetry Context Key SPAN");
|
|
416
|
-
function getSpan(context2) {
|
|
417
|
-
return context2.getValue(SPAN_KEY) || void 0;
|
|
418
|
-
}
|
|
419
|
-
function getActiveSpan() {
|
|
420
|
-
return getSpan(ContextAPI.getInstance().active());
|
|
421
|
-
}
|
|
422
|
-
function setSpan(context2, span) {
|
|
423
|
-
return context2.setValue(SPAN_KEY, span);
|
|
424
|
-
}
|
|
425
|
-
function deleteSpan(context2) {
|
|
426
|
-
return context2.deleteValue(SPAN_KEY);
|
|
427
|
-
}
|
|
428
|
-
function setSpanContext(context2, spanContext) {
|
|
429
|
-
return setSpan(context2, new NonRecordingSpan(spanContext));
|
|
430
|
-
}
|
|
431
|
-
function getSpanContext(context2) {
|
|
432
|
-
var _a;
|
|
433
|
-
return (_a = getSpan(context2)) === null || _a === void 0 ? void 0 : _a.spanContext();
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
// node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js
|
|
398
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/spancontext-utils.mjs
|
|
437
399
|
var isHex = new Uint8Array([
|
|
438
400
|
0,
|
|
439
401
|
0,
|
|
@@ -540,19 +502,16 @@ var isHex = new Uint8Array([
|
|
|
540
502
|
1
|
|
541
503
|
]);
|
|
542
504
|
function isValidHex(id, length) {
|
|
543
|
-
if (typeof id !== "string" || id.length !== length)
|
|
544
|
-
return false;
|
|
505
|
+
if (typeof id !== "string" || id.length !== length) return false;
|
|
545
506
|
let r = 0;
|
|
546
|
-
for (let i = 0; i < id.length; i += 4)
|
|
547
|
-
r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
548
|
-
}
|
|
507
|
+
for (let i = 0; i < id.length; i += 4) r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
549
508
|
return r === length;
|
|
550
509
|
}
|
|
551
510
|
function isValidTraceId(traceId) {
|
|
552
|
-
return isValidHex(traceId, 32) && traceId !==
|
|
511
|
+
return isValidHex(traceId, 32) && traceId !== "00000000000000000000000000000000";
|
|
553
512
|
}
|
|
554
513
|
function isValidSpanId(spanId) {
|
|
555
|
-
return isValidHex(spanId, 16) && spanId !==
|
|
514
|
+
return isValidHex(spanId, 16) && spanId !== "0000000000000000";
|
|
556
515
|
}
|
|
557
516
|
function isSpanContextValid(spanContext) {
|
|
558
517
|
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
@@ -561,31 +520,45 @@ function wrapSpanContext(spanContext) {
|
|
|
561
520
|
return new NonRecordingSpan(spanContext);
|
|
562
521
|
}
|
|
563
522
|
|
|
564
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
523
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/context-utils.mjs
|
|
524
|
+
var SPAN_KEY = createContextKey("OpenTelemetry Context Key SPAN");
|
|
525
|
+
function getSpan(context2) {
|
|
526
|
+
return context2.getValue(SPAN_KEY) || void 0;
|
|
527
|
+
}
|
|
528
|
+
function getActiveSpan() {
|
|
529
|
+
return getSpan(ContextAPI.getInstance().active());
|
|
530
|
+
}
|
|
531
|
+
function setSpan(context2, span) {
|
|
532
|
+
return context2.setValue(SPAN_KEY, span);
|
|
533
|
+
}
|
|
534
|
+
function deleteSpan(context2) {
|
|
535
|
+
return context2.deleteValue(SPAN_KEY);
|
|
536
|
+
}
|
|
537
|
+
function setSpanContext(context2, spanContext) {
|
|
538
|
+
return setSpan(context2, new NonRecordingSpan(spanContext));
|
|
539
|
+
}
|
|
540
|
+
function getSpanContext(context2) {
|
|
541
|
+
var _getSpan;
|
|
542
|
+
return (_getSpan = getSpan(context2)) === null || _getSpan === void 0 ? void 0 : _getSpan.spanContext();
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/NoopTracer.mjs
|
|
565
546
|
var contextApi = ContextAPI.getInstance();
|
|
566
547
|
var NoopTracer = class {
|
|
567
|
-
// startSpan starts a noop span.
|
|
568
548
|
startSpan(name, options, context2 = contextApi.active()) {
|
|
569
|
-
|
|
570
|
-
if (root) {
|
|
571
|
-
return new NonRecordingSpan();
|
|
572
|
-
}
|
|
549
|
+
if (Boolean(options === null || options === void 0 ? void 0 : options.root)) return new NonRecordingSpan();
|
|
573
550
|
const parentFromContext = context2 && getSpanContext(context2);
|
|
574
|
-
if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext))
|
|
575
|
-
|
|
576
|
-
} else {
|
|
577
|
-
return new NonRecordingSpan();
|
|
578
|
-
}
|
|
551
|
+
if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) return new NonRecordingSpan(parentFromContext);
|
|
552
|
+
else return new NonRecordingSpan();
|
|
579
553
|
}
|
|
580
554
|
startActiveSpan(name, arg2, arg3, arg4) {
|
|
555
|
+
var _ctx;
|
|
581
556
|
let opts;
|
|
582
557
|
let ctx;
|
|
583
558
|
let fn;
|
|
584
|
-
if (arguments.length < 2)
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
fn = arg2;
|
|
588
|
-
} else if (arguments.length === 3) {
|
|
559
|
+
if (arguments.length < 2) return;
|
|
560
|
+
else if (arguments.length === 2) fn = arg2;
|
|
561
|
+
else if (arguments.length === 3) {
|
|
589
562
|
opts = arg2;
|
|
590
563
|
fn = arg3;
|
|
591
564
|
} else {
|
|
@@ -593,7 +566,7 @@ var NoopTracer = class {
|
|
|
593
566
|
ctx = arg3;
|
|
594
567
|
fn = arg4;
|
|
595
568
|
}
|
|
596
|
-
const parentContext = ctx !== null &&
|
|
569
|
+
const parentContext = (_ctx = ctx) !== null && _ctx !== void 0 ? _ctx : contextApi.active();
|
|
597
570
|
const span = this.startSpan(name, opts, parentContext);
|
|
598
571
|
const contextWithSpanSet = setSpan(parentContext, span);
|
|
599
572
|
return contextApi.with(contextWithSpanSet, fn, void 0, span);
|
|
@@ -603,7 +576,7 @@ function isSpanContext(spanContext) {
|
|
|
603
576
|
return spanContext !== null && typeof spanContext === "object" && "spanId" in spanContext && typeof spanContext["spanId"] === "string" && "traceId" in spanContext && typeof spanContext["traceId"] === "string" && "traceFlags" in spanContext && typeof spanContext["traceFlags"] === "number";
|
|
604
577
|
}
|
|
605
578
|
|
|
606
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
579
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/ProxyTracer.mjs
|
|
607
580
|
var NOOP_TRACER = new NoopTracer();
|
|
608
581
|
var ProxyTracer = class {
|
|
609
582
|
constructor(provider, name, version, options) {
|
|
@@ -620,60 +593,21 @@ var ProxyTracer = class {
|
|
|
620
593
|
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
621
594
|
}
|
|
622
595
|
/**
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
596
|
+
* Try to get a tracer from the proxy tracer provider.
|
|
597
|
+
* If the proxy tracer provider has no delegate, return a noop tracer.
|
|
598
|
+
*/
|
|
626
599
|
_getTracer() {
|
|
627
|
-
if (this._delegate)
|
|
628
|
-
return this._delegate;
|
|
629
|
-
}
|
|
600
|
+
if (this._delegate) return this._delegate;
|
|
630
601
|
const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
631
|
-
if (!tracer)
|
|
632
|
-
return NOOP_TRACER;
|
|
633
|
-
}
|
|
602
|
+
if (!tracer) return NOOP_TRACER;
|
|
634
603
|
this._delegate = tracer;
|
|
635
604
|
return this._delegate;
|
|
636
605
|
}
|
|
637
606
|
};
|
|
638
607
|
|
|
639
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
640
|
-
var NoopTracerProvider = class {
|
|
641
|
-
getTracer(_name, _version, _options) {
|
|
642
|
-
return new NoopTracer();
|
|
643
|
-
}
|
|
644
|
-
};
|
|
645
|
-
|
|
646
|
-
// node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js
|
|
647
|
-
var NOOP_TRACER_PROVIDER = new NoopTracerProvider();
|
|
648
|
-
var ProxyTracerProvider = class {
|
|
649
|
-
/**
|
|
650
|
-
* Get a {@link ProxyTracer}
|
|
651
|
-
*/
|
|
652
|
-
getTracer(name, version, options) {
|
|
653
|
-
var _a;
|
|
654
|
-
return (_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options);
|
|
655
|
-
}
|
|
656
|
-
getDelegate() {
|
|
657
|
-
var _a;
|
|
658
|
-
return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
|
|
659
|
-
}
|
|
660
|
-
/**
|
|
661
|
-
* Set the delegate tracer provider
|
|
662
|
-
*/
|
|
663
|
-
setDelegate(delegate) {
|
|
664
|
-
this._delegate = delegate;
|
|
665
|
-
}
|
|
666
|
-
getDelegateTracer(name, version, options) {
|
|
667
|
-
var _a;
|
|
668
|
-
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
|
|
669
|
-
}
|
|
670
|
-
};
|
|
671
|
-
|
|
672
|
-
// node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/trace/internal/tracestate-validators.js
|
|
608
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/internal/tracestate-validators.mjs
|
|
673
609
|
var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
674
|
-
var
|
|
675
|
-
var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
676
|
-
var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
610
|
+
var VALID_KEY_REGEX = new RegExp(`^(?:${`[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`}|${`[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`})$`);
|
|
677
611
|
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
678
612
|
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
679
613
|
function validateKey(key) {
|
|
@@ -683,22 +617,27 @@ function validateValue(value) {
|
|
|
683
617
|
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
684
618
|
}
|
|
685
619
|
|
|
686
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
620
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/internal/tracestate-impl.mjs
|
|
687
621
|
var MAX_TRACE_STATE_ITEMS = 32;
|
|
688
622
|
var MAX_TRACE_STATE_LEN = 512;
|
|
689
623
|
var LIST_MEMBERS_SEPARATOR = ",";
|
|
690
624
|
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
691
|
-
var TraceStateImpl = class
|
|
625
|
+
var TraceStateImpl = class TraceStateImpl2 {
|
|
692
626
|
constructor(rawTraceState) {
|
|
693
627
|
this._internalState = /* @__PURE__ */ new Map();
|
|
694
|
-
if (rawTraceState)
|
|
695
|
-
this._parse(rawTraceState);
|
|
628
|
+
if (rawTraceState) this._parse(rawTraceState);
|
|
696
629
|
}
|
|
697
630
|
set(key, value) {
|
|
631
|
+
const currValue = this._internalState.get(key);
|
|
632
|
+
let newLength = this.serialize().length;
|
|
633
|
+
if (typeof currValue === "string") newLength += value.length - currValue.length;
|
|
634
|
+
else {
|
|
635
|
+
if (this._internalState.size >= MAX_TRACE_STATE_ITEMS) return this;
|
|
636
|
+
newLength += key.length + value.length + (this._internalState.size > 0 ? 2 : 1);
|
|
637
|
+
}
|
|
638
|
+
if (newLength > MAX_TRACE_STATE_LEN) return this;
|
|
698
639
|
const traceState = this._clone();
|
|
699
|
-
if (traceState._internalState.has(key))
|
|
700
|
-
traceState._internalState.delete(key);
|
|
701
|
-
}
|
|
640
|
+
if (traceState._internalState.has(key)) traceState._internalState.delete(key);
|
|
702
641
|
traceState._internalState.set(key, value);
|
|
703
642
|
return traceState;
|
|
704
643
|
}
|
|
@@ -717,44 +656,70 @@ var TraceStateImpl = class _TraceStateImpl {
|
|
|
717
656
|
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
718
657
|
}
|
|
719
658
|
_parse(rawTraceState) {
|
|
720
|
-
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
721
|
-
return;
|
|
659
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN) return;
|
|
722
660
|
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
|
|
723
661
|
const listMember = part.trim();
|
|
724
662
|
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
725
663
|
if (i !== -1) {
|
|
726
664
|
const key = listMember.slice(0, i);
|
|
727
665
|
const value = listMember.slice(i + 1, part.length);
|
|
728
|
-
if (validateKey(key) && validateValue(value))
|
|
729
|
-
agg.set(key, value);
|
|
730
|
-
} else {
|
|
731
|
-
}
|
|
666
|
+
if (validateKey(key) && validateValue(value)) agg.set(key, value);
|
|
732
667
|
}
|
|
733
668
|
return agg;
|
|
734
669
|
}, /* @__PURE__ */ new Map());
|
|
735
|
-
if (this._internalState.size > MAX_TRACE_STATE_ITEMS)
|
|
736
|
-
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
737
|
-
}
|
|
670
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
738
671
|
}
|
|
739
|
-
// @ts-expect-error TS6133 Accessed in tests only.
|
|
740
672
|
_keys() {
|
|
741
673
|
return Array.from(this._internalState.keys()).reverse();
|
|
742
674
|
}
|
|
743
675
|
_clone() {
|
|
744
|
-
const traceState = new
|
|
676
|
+
const traceState = new TraceStateImpl2();
|
|
745
677
|
traceState._internalState = new Map(this._internalState);
|
|
746
678
|
return traceState;
|
|
747
679
|
}
|
|
748
680
|
};
|
|
749
681
|
|
|
750
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
682
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/internal/utils.mjs
|
|
751
683
|
function createTraceState(rawTraceState) {
|
|
752
684
|
return new TraceStateImpl(rawTraceState);
|
|
753
685
|
}
|
|
754
686
|
|
|
755
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
687
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/NoopTracerProvider.mjs
|
|
688
|
+
var NoopTracerProvider = class {
|
|
689
|
+
getTracer(_name, _version, _options) {
|
|
690
|
+
return new NoopTracer();
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace/ProxyTracerProvider.mjs
|
|
695
|
+
var NOOP_TRACER_PROVIDER = new NoopTracerProvider();
|
|
696
|
+
var ProxyTracerProvider = class {
|
|
697
|
+
/**
|
|
698
|
+
* Get a {@link ProxyTracer}
|
|
699
|
+
*/
|
|
700
|
+
getTracer(name, version, options) {
|
|
701
|
+
var _this$getDelegateTrac;
|
|
702
|
+
return (_this$getDelegateTrac = this.getDelegateTracer(name, version, options)) !== null && _this$getDelegateTrac !== void 0 ? _this$getDelegateTrac : new ProxyTracer(this, name, version, options);
|
|
703
|
+
}
|
|
704
|
+
getDelegate() {
|
|
705
|
+
var _this$_delegate;
|
|
706
|
+
return (_this$_delegate = this._delegate) !== null && _this$_delegate !== void 0 ? _this$_delegate : NOOP_TRACER_PROVIDER;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Set the delegate tracer provider
|
|
710
|
+
*/
|
|
711
|
+
setDelegate(delegate) {
|
|
712
|
+
this._delegate = delegate;
|
|
713
|
+
}
|
|
714
|
+
getDelegateTracer(name, version, options) {
|
|
715
|
+
var _this$_delegate2;
|
|
716
|
+
return (_this$_delegate2 = this._delegate) === null || _this$_delegate2 === void 0 ? void 0 : _this$_delegate2.getTracer(name, version, options);
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/api/trace.mjs
|
|
756
721
|
var API_NAME3 = "trace";
|
|
757
|
-
var TraceAPI = class
|
|
722
|
+
var TraceAPI = class TraceAPI2 {
|
|
758
723
|
/** Empty private constructor prevents end users from constructing a new instance of the API */
|
|
759
724
|
constructor() {
|
|
760
725
|
this._proxyTracerProvider = new ProxyTracerProvider();
|
|
@@ -769,32 +734,28 @@ var TraceAPI = class _TraceAPI {
|
|
|
769
734
|
}
|
|
770
735
|
/** Get the singleton instance of the Trace API */
|
|
771
736
|
static getInstance() {
|
|
772
|
-
if (!this._instance)
|
|
773
|
-
this._instance = new _TraceAPI();
|
|
774
|
-
}
|
|
737
|
+
if (!this._instance) this._instance = new TraceAPI2();
|
|
775
738
|
return this._instance;
|
|
776
739
|
}
|
|
777
740
|
/**
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
741
|
+
* Set the current global tracer.
|
|
742
|
+
*
|
|
743
|
+
* @returns true if the tracer provider was successfully registered, else false
|
|
744
|
+
*/
|
|
782
745
|
setGlobalTracerProvider(provider) {
|
|
783
746
|
const success = registerGlobal(API_NAME3, this._proxyTracerProvider, DiagAPI.instance());
|
|
784
|
-
if (success)
|
|
785
|
-
this._proxyTracerProvider.setDelegate(provider);
|
|
786
|
-
}
|
|
747
|
+
if (success) this._proxyTracerProvider.setDelegate(provider);
|
|
787
748
|
return success;
|
|
788
749
|
}
|
|
789
750
|
/**
|
|
790
|
-
|
|
791
|
-
|
|
751
|
+
* Returns the global tracer provider.
|
|
752
|
+
*/
|
|
792
753
|
getTracerProvider() {
|
|
793
754
|
return getGlobal(API_NAME3) || this._proxyTracerProvider;
|
|
794
755
|
}
|
|
795
756
|
/**
|
|
796
|
-
|
|
797
|
-
|
|
757
|
+
* Returns a tracer from the global tracer provider.
|
|
758
|
+
*/
|
|
798
759
|
getTracer(name, version) {
|
|
799
760
|
return this.getTracerProvider().getTracer(name, version);
|
|
800
761
|
}
|
|
@@ -805,7 +766,7 @@ var TraceAPI = class _TraceAPI {
|
|
|
805
766
|
}
|
|
806
767
|
};
|
|
807
768
|
|
|
808
|
-
// node_modules/.pnpm/@opentelemetry+api@1.
|
|
769
|
+
// node_modules/.pnpm/@opentelemetry+api@1.10.0/node_modules/@opentelemetry/api/dist/trace-api.mjs
|
|
809
770
|
var trace = TraceAPI.getInstance();
|
|
810
771
|
|
|
811
772
|
// src/mcp/cli/command-context.ts
|
|
@@ -1307,6 +1268,8 @@ var RESOURCE_KEYS = [
|
|
|
1307
1268
|
var PI_KEYS = /* @__PURE__ */ new Set([
|
|
1308
1269
|
...RESOURCE_KEYS,
|
|
1309
1270
|
"channels",
|
|
1271
|
+
"documents",
|
|
1272
|
+
"evals",
|
|
1310
1273
|
"mcp",
|
|
1311
1274
|
"runtime"
|
|
1312
1275
|
]);
|
|
@@ -1593,7 +1556,7 @@ function loadMcporterCli() {
|
|
|
1593
1556
|
if (mcporterCliPromise) return mcporterCliPromise;
|
|
1594
1557
|
const previousDisableAutorun = process.env.MCPORTER_DISABLE_AUTORUN;
|
|
1595
1558
|
process.env.MCPORTER_DISABLE_AUTORUN = "1";
|
|
1596
|
-
mcporterCliPromise = import("./cli-
|
|
1559
|
+
mcporterCliPromise = import("./cli-IYD7Y7MO.js").finally(() => {
|
|
1597
1560
|
if (previousDisableAutorun === void 0) {
|
|
1598
1561
|
delete process.env.MCPORTER_DISABLE_AUTORUN;
|
|
1599
1562
|
} else {
|