@introspection-ai/recipes 0.27.4 → 0.29.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 +34 -0
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +87 -0
- package/dist/agents.js.map +1 -1
- package/dist/child/agent.d.ts +5 -0
- package/dist/child/agent.d.ts.map +1 -1
- package/dist/child/agent.js +19 -8
- package/dist/child/agent.js.map +1 -1
- package/dist/child/session.d.ts +31 -4
- package/dist/child/session.d.ts.map +1 -1
- package/dist/child/session.js +65 -3
- package/dist/child/session.js.map +1 -1
- package/dist/mcp-chunks/{auth-command-GQFV6QYP.js → auth-command-SDTBVC2R.js} +22 -21
- package/dist/mcp-chunks/call-arguments-ER7NWEPS.js +16 -0
- package/dist/mcp-chunks/{call-command-LMAREWKD.js → call-command-WOZT2DLX.js} +33 -32
- package/dist/mcp-chunks/{chunk-5B7GRMUK.js → chunk-27XDYSXJ.js} +1 -1
- package/dist/mcp-chunks/{chunk-FONFU4G5.js → chunk-2IO3FXZJ.js} +1 -1
- package/dist/mcp-chunks/{chunk-O4JIUOWF.js → chunk-35JUFDQI.js} +2 -2
- package/dist/mcp-chunks/{chunk-UYJZJXC2.js → chunk-43QNQO5C.js} +3 -3
- package/dist/mcp-chunks/{chunk-LIEFPSSB.js → chunk-4IXQQER3.js} +5 -5
- package/dist/mcp-chunks/{chunk-O2VOMKAS.js → chunk-6XBQDCGX.js} +10 -10
- package/dist/mcp-chunks/{chunk-S2YF442K.js → chunk-7CI6DKEP.js} +2 -2
- package/dist/mcp-chunks/{chunk-H7ARMBV7.js → chunk-7OQUF6V6.js} +26 -10
- package/dist/mcp-chunks/{chunk-S6GJ42I2.js → chunk-7X3JHUMH.js} +1 -1
- package/dist/mcp-chunks/{chunk-D6B2M5V7.js → chunk-7ZZZ7MR2.js} +1 -1
- package/dist/mcp-chunks/{chunk-WHJUDBPR.js → chunk-AHDUZPNI.js} +2 -1
- package/dist/mcp-chunks/{chunk-QALB3DRW.js → chunk-ALLS7CUV.js} +1 -1
- package/dist/mcp-chunks/{chunk-6RG6AD5X.js → chunk-ASFI5AJK.js} +17 -11
- package/dist/mcp-chunks/{chunk-LQIE4PKL.js → chunk-CMDB57MS.js} +2 -2
- package/dist/mcp-chunks/{chunk-HZ2SX5U6.js → chunk-CO4CYU5W.js} +11 -11
- package/dist/mcp-chunks/{chunk-TUQGOYK6.js → chunk-CRX2G22W.js} +1 -1
- package/dist/mcp-chunks/{chunk-UKM35J67.js → chunk-DUJ5WAHC.js} +2 -2
- package/dist/mcp-chunks/{chunk-RIHPVCGI.js → chunk-EIF7GALA.js} +1 -1
- package/dist/mcp-chunks/{chunk-QJNF3A3F.js → chunk-EIXFNLU6.js} +1 -1
- package/dist/mcp-chunks/{chunk-77BZYP72.js → chunk-FMYP6JXX.js} +1 -1
- package/dist/mcp-chunks/{chunk-LXHPDKEF.js → chunk-FQAJT6U2.js} +1 -1
- package/dist/mcp-chunks/{chunk-7WL4TMON.js → chunk-FUKRLUU7.js} +4 -4
- package/dist/mcp-chunks/{chunk-L6OOGZVA.js → chunk-FVZKQMZS.js} +21 -7
- package/dist/mcp-chunks/{chunk-RZIJUJGL.js → chunk-FWWPRZ37.js} +31 -40
- package/dist/mcp-chunks/{chunk-KQCLM7R7.js → chunk-GJ7DWMRT.js} +1 -1
- package/dist/mcp-chunks/{chunk-LCBDVFVA.js → chunk-HM26TIPK.js} +1 -1
- package/dist/mcp-chunks/{chunk-JVYCENPP.js → chunk-IJTZ2ZRM.js} +4 -4
- package/dist/mcp-chunks/{chunk-S5F3HEZZ.js → chunk-IR5SMKTP.js} +425 -445
- package/dist/mcp-chunks/{chunk-7PFJCLXL.js → chunk-IWXEOLJL.js} +20 -16
- package/dist/mcp-chunks/{chunk-D6SVCPN6.js → chunk-JQCSGX6E.js} +1 -1
- package/dist/mcp-chunks/{chunk-P463YBJM.js → chunk-JRU5LZJQ.js} +1 -1
- package/dist/mcp-chunks/{chunk-XNHGMWN2.js → chunk-M7VINGHY.js} +9 -7
- package/dist/mcp-chunks/{chunk-IF6LRV3J.js → chunk-OURSGEZX.js} +8 -8
- package/dist/mcp-chunks/{chunk-H4KL74PV.js → chunk-P3S4OJPI.js} +9 -9
- package/dist/mcp-chunks/{chunk-P3UVILEW.js → chunk-POYT6GCW.js} +29 -5
- package/dist/mcp-chunks/{chunk-5BMCVE2J.js → chunk-R636HUNL.js} +17 -13
- package/dist/mcp-chunks/{chunk-TYYSBILI.js → chunk-SONMFI3S.js} +70 -28
- package/dist/mcp-chunks/{chunk-I6UMKX5E.js → chunk-SVCKS5MW.js} +4 -4
- package/dist/mcp-chunks/{chunk-NQW3ES2G.js → chunk-TDBM2UIR.js} +1 -1
- package/dist/mcp-chunks/{chunk-VJIAHZZG.js → chunk-TKZA4MPW.js} +4 -4
- package/dist/mcp-chunks/{chunk-2P2HVZ3G.js → chunk-UHXTAPEC.js} +1 -1
- package/dist/mcp-chunks/{chunk-CLR6DJV3.js → chunk-UXI26V4F.js} +1 -1
- package/dist/mcp-chunks/{chunk-UIPG6W7N.js → chunk-UYG7PAN2.js} +2 -2
- package/dist/mcp-chunks/{chunk-2HOMVWSA.js → chunk-VCPUZFU7.js} +2 -2
- package/dist/mcp-chunks/{chunk-FBVRU4Y3.js → chunk-VRTH73R5.js} +40 -33
- package/dist/mcp-chunks/{chunk-KOWNVUL2.js → chunk-VWNF5PIF.js} +2 -2
- package/dist/mcp-chunks/{chunk-MJFZM5EV.js → chunk-WQBESOWG.js} +22 -5
- package/dist/mcp-chunks/chunk-XDARNDP3.js +25 -0
- package/dist/mcp-chunks/{chunk-OSYB5GNF.js → chunk-XUJQ6U6M.js} +3 -3
- package/dist/mcp-chunks/{chunk-PJCMJ65D.js → chunk-YGRORKGT.js} +226 -101
- package/dist/mcp-chunks/{chunk-C2VLY7ED.js → chunk-YM7ZVYI2.js} +4 -4
- package/dist/mcp-chunks/{chunk-6QZQZXDJ.js → chunk-YTO7DITJ.js} +3 -3
- package/dist/mcp-chunks/{chunk-UHO6KIUJ.js → chunk-ZLV5S5UP.js} +2 -2
- package/dist/mcp-chunks/{cli-JI7MEAAX.js → cli-67GWFF4R.js} +69 -68
- package/dist/mcp-chunks/client-MQMNAYYW.js +31 -0
- package/dist/mcp-chunks/{config-command-GRZLKD3R.js → config-command-3IKIRWMW.js} +41 -27
- package/dist/mcp-chunks/daemon-command-OMOZ5MP7.js +31 -0
- package/dist/mcp-chunks/{dist-USMCQ22V.js → dist-YL3LFKVP.js} +219 -202
- package/dist/mcp-chunks/{emit-ts-command-7VLESP7H.js → emit-ts-command-YWKROLL2.js} +84 -70
- package/dist/mcp-chunks/{generate-cli-runner-SSW2B72K.js → generate-cli-runner-CZEVY2Y7.js} +51 -48
- package/dist/mcp-chunks/generated-daemon-runtime-SRFULTIT.js +31 -0
- package/dist/mcp-chunks/{inspect-cli-command-NCGCMOIS.js → inspect-cli-command-5Y2LORK5.js} +9 -9
- package/dist/mcp-chunks/{launch-NBONSPNK.js → launch-43TA3HYF.js} +1 -1
- package/dist/mcp-chunks/{lifecycle-CXAKUCN4.js → lifecycle-BY2ILXTB.js} +1 -1
- package/dist/mcp-chunks/{list-command-5T4UF4PF.js → list-command-7RU7NNAV.js} +56 -43
- package/dist/mcp-chunks/{output-utils-YFTWQZ5V.js → output-utils-2R3SA6KR.js} +3 -3
- package/dist/mcp-chunks/{prompt-CH6TK0bC-6DI4RA4E.js → prompt-CH6TK0bC-GKQOEUY4.js} +1 -1
- package/dist/mcp-chunks/{record-command-TE5O7WBL.js → record-command-ROIRRNFS.js} +5 -5
- package/dist/mcp-chunks/{replay-command-QCUL5ASR.js → replay-command-Y2MYVQTL.js} +6 -6
- package/dist/mcp-chunks/{resource-command-XMGF7EAK.js → resource-command-VUV7AYYQ.js} +9 -9
- package/dist/mcp-chunks/{result-utils-HKB42M7Y.js → result-utils-5U7NVXDZ.js} +3 -3
- package/dist/mcp-chunks/runtime-Q4SCCOQE.js +38 -0
- package/dist/mcp-chunks/{runtime-wrapper-MI3HF45J.js → runtime-wrapper-3BVFTSWJ.js} +3 -3
- package/dist/mcp-chunks/{serve-command-5HV3ZE25.js → serve-command-BXLQWHFW.js} +8969 -1147
- package/dist/mcp-chunks/{timeouts-YBFBTLV2.js → timeouts-6GL2F44N.js} +3 -3
- package/dist/mcp-chunks/{vault-command-FC2PD5U6.js → vault-command-JCMW3DQA.js} +4 -4
- package/dist/mcp-chunks/{webapi-IFUPO72B.js → webapi-UMWFGMQV.js} +46 -46
- package/dist/mcp-daemon.js +27 -26
- package/dist/mcp-run-worker.js +27 -26
- package/dist/pi-extension.d.ts.map +1 -1
- package/dist/pi-extension.js +22 -19
- package/dist/pi-extension.js.map +1 -1
- package/dist/recipe/model.d.ts.map +1 -1
- package/dist/recipe/model.js +25 -1
- package/dist/recipe/model.js.map +1 -1
- package/dist/run-controller.d.ts +10 -3
- package/dist/run-controller.d.ts.map +1 -1
- package/dist/run-controller.js +23 -11
- package/dist/run-controller.js.map +1 -1
- package/dist/session.d.ts +13 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +15 -9
- package/dist/session.js.map +1 -1
- package/docs/agent-composition.md +27 -6
- package/docs/host-api.md +32 -4
- package/docs/mcp-configuration.md +12 -3
- package/docs/pi-extension.md +7 -4
- package/docs/recipe-format.md +14 -5
- package/package.json +11 -11
- package/dist/mcp-chunks/call-arguments-VT7JLNJY.js +0 -16
- package/dist/mcp-chunks/client-QU7ABSNB.js +0 -30
- package/dist/mcp-chunks/daemon-command-3266CYHO.js +0 -30
- package/dist/mcp-chunks/generated-daemon-runtime-7CFVWLC7.js +0 -30
- package/dist/mcp-chunks/runtime-3X2XVS6X.js +0 -37
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
stableJsonStringify
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GJ7DWMRT.js";
|
|
5
5
|
import {
|
|
6
6
|
NON_INTERACTIVE_ELICITATION_HINT,
|
|
7
7
|
createNonInteractiveElicitationResponder,
|
|
8
8
|
registerElicitationHandler
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7ZZZ7MR2.js";
|
|
10
10
|
import {
|
|
11
11
|
RecordTransport,
|
|
12
12
|
resolveRecordingPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FVZKQMZS.js";
|
|
14
14
|
import {
|
|
15
15
|
OAuthTimeoutError,
|
|
16
16
|
connectWithAuth,
|
|
@@ -20,25 +20,25 @@ import {
|
|
|
20
20
|
isUnauthorizedError,
|
|
21
21
|
maybeEnableOAuth,
|
|
22
22
|
resolveOAuthTimeoutFromEnv
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SONMFI3S.js";
|
|
24
24
|
import {
|
|
25
25
|
readCachedAccessToken
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OURSGEZX.js";
|
|
27
27
|
import {
|
|
28
28
|
withRuntimeEnvironment
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-M7VINGHY.js";
|
|
30
30
|
import {
|
|
31
31
|
createPrefixedConsoleLogger,
|
|
32
32
|
resolveLogLevelFromEnv
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-JRU5LZJQ.js";
|
|
34
34
|
import {
|
|
35
35
|
STDIO_TRACE_ENABLED,
|
|
36
36
|
flushStdioLogs,
|
|
37
37
|
ignoreStdioEmitterError
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-2IO3FXZJ.js";
|
|
39
39
|
import {
|
|
40
40
|
MCPORTER_VERSION
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-IWXEOLJL.js";
|
|
42
42
|
import {
|
|
43
43
|
ChromeDevtoolsRelayDiscoveryError,
|
|
44
44
|
ChromeDevtoolsRelayRequiredError,
|
|
@@ -56,25 +56,29 @@ import {
|
|
|
56
56
|
resolveCommandArgument,
|
|
57
57
|
resolveCommandArguments,
|
|
58
58
|
rewriteChromeDevtoolsArgsForRelay
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-P3S4OJPI.js";
|
|
60
60
|
import {
|
|
61
61
|
loadServerDefinitions,
|
|
62
62
|
normalizeServerEntry,
|
|
63
63
|
readConfigFile
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-FWWPRZ37.js";
|
|
65
|
+
import {
|
|
66
|
+
isRecord
|
|
67
|
+
} from "./chunk-XDARNDP3.js";
|
|
65
68
|
import {
|
|
66
69
|
pathExists
|
|
67
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-43QNQO5C.js";
|
|
68
71
|
import {
|
|
69
72
|
mcporterConfigCandidates
|
|
70
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-ZLV5S5UP.js";
|
|
71
74
|
import {
|
|
72
75
|
resolveEnvPlaceholders
|
|
73
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-JQCSGX6E.js";
|
|
74
77
|
import {
|
|
75
78
|
analyzeConnectionError
|
|
76
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-35JUFDQI.js";
|
|
77
80
|
import {
|
|
81
|
+
AjvJsonSchemaValidator,
|
|
78
82
|
Client,
|
|
79
83
|
DEFAULT_REQUEST_TIMEOUT_MSEC,
|
|
80
84
|
ProtocolErrorCode,
|
|
@@ -86,16 +90,16 @@ import {
|
|
|
86
90
|
StreamableHTTPClientTransport,
|
|
87
91
|
serializeMessage,
|
|
88
92
|
specTypeSchemas
|
|
89
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-IR5SMKTP.js";
|
|
90
94
|
import {
|
|
91
95
|
__commonJS,
|
|
92
96
|
__require,
|
|
93
97
|
__toESM
|
|
94
98
|
} from "./chunk-LRKZP7DJ.js";
|
|
95
99
|
|
|
96
|
-
// node_modules/.pnpm/
|
|
100
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/isexe/windows.js
|
|
97
101
|
var require_windows = __commonJS({
|
|
98
|
-
"node_modules/.pnpm/
|
|
102
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/isexe/windows.js"(exports, module) {
|
|
99
103
|
module.exports = isexe;
|
|
100
104
|
isexe.sync = sync;
|
|
101
105
|
var fs7 = __require("fs");
|
|
@@ -133,9 +137,9 @@ var require_windows = __commonJS({
|
|
|
133
137
|
}
|
|
134
138
|
});
|
|
135
139
|
|
|
136
|
-
// node_modules/.pnpm/
|
|
140
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/isexe/mode.js
|
|
137
141
|
var require_mode = __commonJS({
|
|
138
|
-
"node_modules/.pnpm/
|
|
142
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/isexe/mode.js"(exports, module) {
|
|
139
143
|
module.exports = isexe;
|
|
140
144
|
isexe.sync = sync;
|
|
141
145
|
var fs7 = __require("fs");
|
|
@@ -166,9 +170,9 @@ var require_mode = __commonJS({
|
|
|
166
170
|
}
|
|
167
171
|
});
|
|
168
172
|
|
|
169
|
-
// node_modules/.pnpm/
|
|
173
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/isexe/index.js
|
|
170
174
|
var require_isexe = __commonJS({
|
|
171
|
-
"node_modules/.pnpm/
|
|
175
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/isexe/index.js"(exports, module) {
|
|
172
176
|
var fs7 = __require("fs");
|
|
173
177
|
var core;
|
|
174
178
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
@@ -221,9 +225,9 @@ var require_isexe = __commonJS({
|
|
|
221
225
|
}
|
|
222
226
|
});
|
|
223
227
|
|
|
224
|
-
// node_modules/.pnpm/
|
|
228
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/which/which.js
|
|
225
229
|
var require_which = __commonJS({
|
|
226
|
-
"node_modules/.pnpm/
|
|
230
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/which/which.js"(exports, module) {
|
|
227
231
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
228
232
|
var path7 = __require("path");
|
|
229
233
|
var COLON = isWindows ? ";" : ":";
|
|
@@ -317,9 +321,9 @@ var require_which = __commonJS({
|
|
|
317
321
|
}
|
|
318
322
|
});
|
|
319
323
|
|
|
320
|
-
// node_modules/.pnpm/
|
|
324
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/path-key/index.js
|
|
321
325
|
var require_path_key = __commonJS({
|
|
322
|
-
"node_modules/.pnpm/
|
|
326
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/path-key/index.js"(exports, module) {
|
|
323
327
|
"use strict";
|
|
324
328
|
var pathKey = (options = {}) => {
|
|
325
329
|
const environment = options.env || process.env;
|
|
@@ -334,9 +338,9 @@ var require_path_key = __commonJS({
|
|
|
334
338
|
}
|
|
335
339
|
});
|
|
336
340
|
|
|
337
|
-
// node_modules/.pnpm/
|
|
341
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
338
342
|
var require_resolveCommand = __commonJS({
|
|
339
|
-
"node_modules/.pnpm/
|
|
343
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
340
344
|
"use strict";
|
|
341
345
|
var path7 = __require("path");
|
|
342
346
|
var which = require_which();
|
|
@@ -376,9 +380,9 @@ var require_resolveCommand = __commonJS({
|
|
|
376
380
|
}
|
|
377
381
|
});
|
|
378
382
|
|
|
379
|
-
// node_modules/.pnpm/
|
|
383
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/cross-spawn/lib/util/escape.js
|
|
380
384
|
var require_escape = __commonJS({
|
|
381
|
-
"node_modules/.pnpm/
|
|
385
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
|
|
382
386
|
"use strict";
|
|
383
387
|
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
384
388
|
function escapeCommand(arg) {
|
|
@@ -401,17 +405,17 @@ var require_escape = __commonJS({
|
|
|
401
405
|
}
|
|
402
406
|
});
|
|
403
407
|
|
|
404
|
-
// node_modules/.pnpm/
|
|
408
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/shebang-regex/index.js
|
|
405
409
|
var require_shebang_regex = __commonJS({
|
|
406
|
-
"node_modules/.pnpm/
|
|
410
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/shebang-regex/index.js"(exports, module) {
|
|
407
411
|
"use strict";
|
|
408
412
|
module.exports = /^#!(.*)/;
|
|
409
413
|
}
|
|
410
414
|
});
|
|
411
415
|
|
|
412
|
-
// node_modules/.pnpm/
|
|
416
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/shebang-command/index.js
|
|
413
417
|
var require_shebang_command = __commonJS({
|
|
414
|
-
"node_modules/.pnpm/
|
|
418
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/shebang-command/index.js"(exports, module) {
|
|
415
419
|
"use strict";
|
|
416
420
|
var shebangRegex = require_shebang_regex();
|
|
417
421
|
module.exports = (string = "") => {
|
|
@@ -429,9 +433,9 @@ var require_shebang_command = __commonJS({
|
|
|
429
433
|
}
|
|
430
434
|
});
|
|
431
435
|
|
|
432
|
-
// node_modules/.pnpm/
|
|
436
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/cross-spawn/lib/util/readShebang.js
|
|
433
437
|
var require_readShebang = __commonJS({
|
|
434
|
-
"node_modules/.pnpm/
|
|
438
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
|
|
435
439
|
"use strict";
|
|
436
440
|
var fs7 = __require("fs");
|
|
437
441
|
var shebangCommand = require_shebang_command();
|
|
@@ -451,9 +455,9 @@ var require_readShebang = __commonJS({
|
|
|
451
455
|
}
|
|
452
456
|
});
|
|
453
457
|
|
|
454
|
-
// node_modules/.pnpm/
|
|
458
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/cross-spawn/lib/parse.js
|
|
455
459
|
var require_parse = __commonJS({
|
|
456
|
-
"node_modules/.pnpm/
|
|
460
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
457
461
|
"use strict";
|
|
458
462
|
var path7 = __require("path");
|
|
459
463
|
var resolveCommand = require_resolveCommand();
|
|
@@ -513,9 +517,9 @@ var require_parse = __commonJS({
|
|
|
513
517
|
}
|
|
514
518
|
});
|
|
515
519
|
|
|
516
|
-
// node_modules/.pnpm/
|
|
520
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/cross-spawn/lib/enoent.js
|
|
517
521
|
var require_enoent = __commonJS({
|
|
518
|
-
"node_modules/.pnpm/
|
|
522
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/cross-spawn/lib/enoent.js"(exports, module) {
|
|
519
523
|
"use strict";
|
|
520
524
|
var isWin = process.platform === "win32";
|
|
521
525
|
function notFoundError(original, syscall) {
|
|
@@ -563,9 +567,9 @@ var require_enoent = __commonJS({
|
|
|
563
567
|
}
|
|
564
568
|
});
|
|
565
569
|
|
|
566
|
-
// node_modules/.pnpm/
|
|
570
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/cross-spawn/index.js
|
|
567
571
|
var require_cross_spawn = __commonJS({
|
|
568
|
-
"node_modules/.pnpm/
|
|
572
|
+
"node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/cross-spawn/index.js"(exports, module) {
|
|
569
573
|
"use strict";
|
|
570
574
|
var cp = __require("child_process");
|
|
571
575
|
var parse = require_parse();
|
|
@@ -590,7 +594,7 @@ var require_cross_spawn = __commonJS({
|
|
|
590
594
|
}
|
|
591
595
|
});
|
|
592
596
|
|
|
593
|
-
// node_modules/.pnpm/mcporter@0.
|
|
597
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/daemon/connection-identity.js
|
|
594
598
|
import { createHash } from "node:crypto";
|
|
595
599
|
import fs from "node:fs/promises";
|
|
596
600
|
import path from "node:path";
|
|
@@ -681,16 +685,16 @@ function isExistingChromeDefinition(definition, env) {
|
|
|
681
685
|
return [definition.name, command, ...args].some((value) => /chrome[-_]devtools(?:[-_]mcp)?/i.test(value)) && isExistingChromeDevtoolsCommand(command, args);
|
|
682
686
|
}
|
|
683
687
|
|
|
684
|
-
// node_modules/.pnpm/mcporter@0.
|
|
688
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/daemon/browser-owner.js
|
|
685
689
|
import os3 from "node:os";
|
|
686
690
|
import path4 from "node:path";
|
|
687
691
|
|
|
688
|
-
// node_modules/.pnpm/mcporter@0.
|
|
692
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/daemon/paths.js
|
|
689
693
|
import fs3 from "node:fs/promises";
|
|
690
694
|
import { constants } from "node:fs";
|
|
691
695
|
import { createHash as createHash2 } from "node:crypto";
|
|
692
696
|
|
|
693
|
-
// node_modules/.pnpm/mcporter@0.
|
|
697
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/chrome-devtools-relay-handoff.js
|
|
694
698
|
import { spawnSync } from "node:child_process";
|
|
695
699
|
import { randomBytes } from "node:crypto";
|
|
696
700
|
import fs2 from "node:fs";
|
|
@@ -763,7 +767,8 @@ $directory = New-Object System.IO.DirectoryInfo -ArgumentList @($target)
|
|
|
763
767
|
$stage = 'create'
|
|
764
768
|
$directory.Create($security)
|
|
765
769
|
$stage = 'acl-read'
|
|
766
|
-
|
|
770
|
+
# Audit information is unused and requires SeSecurityPrivilege.
|
|
771
|
+
$check = $directory.GetAccessControl([System.Security.AccessControl.AccessControlSections]::Access -bor [System.Security.AccessControl.AccessControlSections]::Owner)
|
|
767
772
|
$rules = @($check.GetAccessRules($true, $true, [System.Security.Principal.SecurityIdentifier]))
|
|
768
773
|
$ownerSid = $check.GetOwner([System.Security.Principal.SecurityIdentifier]).Value
|
|
769
774
|
$stage = 'acl-verify'
|
|
@@ -920,7 +925,7 @@ if (targetPath?.includes('chrome-devtools-mcp')) {
|
|
|
920
925
|
`;
|
|
921
926
|
}
|
|
922
927
|
|
|
923
|
-
// node_modules/.pnpm/mcporter@0.
|
|
928
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/daemon/paths.js
|
|
924
929
|
import os2 from "node:os";
|
|
925
930
|
import path3 from "node:path";
|
|
926
931
|
function daemonBaseDir() {
|
|
@@ -1019,7 +1024,7 @@ function getDaemonLogPath(_configKey) {
|
|
|
1019
1024
|
return path3.join(daemonRunDir(), "user.log");
|
|
1020
1025
|
}
|
|
1021
1026
|
|
|
1022
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1027
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/daemon/browser-owner.js
|
|
1023
1028
|
var BrowserOwnerConflict = class extends Error {
|
|
1024
1029
|
code = "browser_owner_conflict";
|
|
1025
1030
|
constructor(reason) {
|
|
@@ -1136,7 +1141,7 @@ var BrowserOwner = class {
|
|
|
1136
1141
|
}
|
|
1137
1142
|
};
|
|
1138
1143
|
|
|
1139
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1144
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/daemon/transport-authority.js
|
|
1140
1145
|
var authority = /* @__PURE__ */ Symbol("broker transport authority");
|
|
1141
1146
|
function authorizeBrokerDefinition(definition, validateRequest) {
|
|
1142
1147
|
Object.defineProperty(definition, authority, { value: { validateRequest }, enumerable: true });
|
|
@@ -1153,7 +1158,7 @@ function assertChromeBrokerAuthority(definition) {
|
|
|
1153
1158
|
}
|
|
1154
1159
|
}
|
|
1155
1160
|
|
|
1156
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1161
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime-process-utils.js
|
|
1157
1162
|
import { execFile } from "node:child_process";
|
|
1158
1163
|
import { setTimeout as delay } from "node:timers/promises";
|
|
1159
1164
|
async function captureTransportProcessTree(transport) {
|
|
@@ -1325,7 +1330,7 @@ async function listDescendantPidsWindows(rootPid) {
|
|
|
1325
1330
|
}
|
|
1326
1331
|
function execFileAsync(command, args) {
|
|
1327
1332
|
return new Promise((resolve, reject) => {
|
|
1328
|
-
execFile(command, args, { encoding: "utf8" }, (error, stdout, stderr) => {
|
|
1333
|
+
execFile(command, args, { encoding: "utf8", windowsHide: true }, (error, stdout, stderr) => {
|
|
1329
1334
|
if (error) {
|
|
1330
1335
|
reject(error);
|
|
1331
1336
|
return;
|
|
@@ -1371,7 +1376,7 @@ async function waitForTreeExit(pids, durationMs) {
|
|
|
1371
1376
|
}
|
|
1372
1377
|
}
|
|
1373
1378
|
|
|
1374
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1379
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime/errors.js
|
|
1375
1380
|
var NON_FATAL_MCP_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
1376
1381
|
ProtocolErrorCode.InvalidRequest,
|
|
1377
1382
|
ProtocolErrorCode.MethodNotFound,
|
|
@@ -1393,7 +1398,7 @@ function protocolErrorCode(error) {
|
|
|
1393
1398
|
return typeof error.code === "number" ? error.code : void 0;
|
|
1394
1399
|
}
|
|
1395
1400
|
|
|
1396
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1401
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime/replay-transport.js
|
|
1397
1402
|
import fs4 from "node:fs";
|
|
1398
1403
|
import { isDeepStrictEqual } from "node:util";
|
|
1399
1404
|
var CLIENT_IDENTITY_META_KEYS = [
|
|
@@ -1615,23 +1620,29 @@ function formatReplayRemainder(server, expectedSends) {
|
|
|
1615
1620
|
return `Replay ended for server '${server}' with ${count} recorded ${requestText} still unused; next expected recv ${expectedText}.`;
|
|
1616
1621
|
}
|
|
1617
1622
|
|
|
1618
|
-
// node_modules/.pnpm
|
|
1623
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/node_modules/@modelcontextprotocol/client/dist/stdio.mjs
|
|
1619
1624
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
1620
1625
|
import process2 from "node:process";
|
|
1621
1626
|
import { PassThrough } from "node:stream";
|
|
1622
1627
|
var DEFAULT_INHERITED_ENV_VARS = process2.platform === "win32" ? [
|
|
1623
1628
|
"APPDATA",
|
|
1629
|
+
"COMSPEC",
|
|
1624
1630
|
"HOMEDRIVE",
|
|
1625
1631
|
"HOMEPATH",
|
|
1626
1632
|
"LOCALAPPDATA",
|
|
1627
1633
|
"PATH",
|
|
1634
|
+
"PATHEXT",
|
|
1628
1635
|
"PROCESSOR_ARCHITECTURE",
|
|
1636
|
+
"PROGRAMDATA",
|
|
1637
|
+
"PROGRAMFILES",
|
|
1638
|
+
"PROGRAMFILES(X86)",
|
|
1639
|
+
"PROGRAMW6432",
|
|
1629
1640
|
"SYSTEMDRIVE",
|
|
1630
1641
|
"SYSTEMROOT",
|
|
1631
1642
|
"TEMP",
|
|
1632
1643
|
"USERNAME",
|
|
1633
1644
|
"USERPROFILE",
|
|
1634
|
-
"
|
|
1645
|
+
"WINDIR"
|
|
1635
1646
|
] : [
|
|
1636
1647
|
"HOME",
|
|
1637
1648
|
"LOGNAME",
|
|
@@ -1821,13 +1832,14 @@ var StdioClientTransport = class {
|
|
|
1821
1832
|
}
|
|
1822
1833
|
};
|
|
1823
1834
|
|
|
1824
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1835
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/chrome-devtools-compat.js
|
|
1825
1836
|
import fs6 from "node:fs";
|
|
1837
|
+
import { randomBytes as randomBytes2 } from "node:crypto";
|
|
1826
1838
|
import os4 from "node:os";
|
|
1827
1839
|
import path6 from "node:path";
|
|
1828
1840
|
import { fileURLToPath, pathToFileURL as pathToFileURL2 } from "node:url";
|
|
1829
1841
|
|
|
1830
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1842
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/chrome-devtools-auto-connect-patch.js
|
|
1831
1843
|
import fs5 from "node:fs";
|
|
1832
1844
|
import path5 from "node:path";
|
|
1833
1845
|
var MARKER = "MCPORTER_DEVTOOLS_TIMEOUT_PATCH";
|
|
@@ -1914,20 +1926,20 @@ ${helper}`);
|
|
|
1914
1926
|
}
|
|
1915
1927
|
}
|
|
1916
1928
|
|
|
1917
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1929
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/chrome-devtools-compat.js
|
|
1918
1930
|
var FALLBACK_PATCH_FILENAME = "mcporter-chrome-devtools-auto-connect-patch.js";
|
|
1919
1931
|
function applyChromeDevtoolsCompat(env, command, args) {
|
|
1920
1932
|
if (!shouldApplyChromeDevtoolsCompat(command, args, env)) {
|
|
1921
1933
|
return { env, applied: false };
|
|
1922
1934
|
}
|
|
1923
|
-
const
|
|
1924
|
-
if (!
|
|
1935
|
+
const patch = resolveChromeDevtoolsCompatPatch();
|
|
1936
|
+
if (!patch) {
|
|
1925
1937
|
return { env, applied: false };
|
|
1926
1938
|
}
|
|
1927
|
-
const importFlag = `--import=${pathToFileURL2(patchPath).href}`;
|
|
1939
|
+
const importFlag = `--import=${pathToFileURL2(patch.patchPath).href}`;
|
|
1928
1940
|
const existingOptions = env.NODE_OPTIONS?.trim();
|
|
1929
1941
|
if (existingOptions?.includes(importFlag)) {
|
|
1930
|
-
return { env, applied: true,
|
|
1942
|
+
return { env, applied: true, ...patch };
|
|
1931
1943
|
}
|
|
1932
1944
|
return {
|
|
1933
1945
|
env: {
|
|
@@ -1935,7 +1947,7 @@ function applyChromeDevtoolsCompat(env, command, args) {
|
|
|
1935
1947
|
NODE_OPTIONS: existingOptions ? `${existingOptions} ${importFlag}` : importFlag
|
|
1936
1948
|
},
|
|
1937
1949
|
applied: true,
|
|
1938
|
-
|
|
1950
|
+
...patch
|
|
1939
1951
|
};
|
|
1940
1952
|
}
|
|
1941
1953
|
function shouldApplyChromeDevtoolsCompat(command, args, env = process.env) {
|
|
@@ -1944,10 +1956,10 @@ function shouldApplyChromeDevtoolsCompat(command, args, env = process.env) {
|
|
|
1944
1956
|
}
|
|
1945
1957
|
return resolveChromeDevtoolsAutoConnectCommand(command, args).enabled;
|
|
1946
1958
|
}
|
|
1947
|
-
function
|
|
1959
|
+
function resolveChromeDevtoolsCompatPatch(candidates = defaultChromeDevtoolsPatchCandidates(), fallbackDir = os4.tmpdir()) {
|
|
1948
1960
|
const existing = candidates.find((candidate) => fs6.existsSync(candidate));
|
|
1949
1961
|
if (existing) {
|
|
1950
|
-
return existing;
|
|
1962
|
+
return { patchPath: existing };
|
|
1951
1963
|
}
|
|
1952
1964
|
return writeFallbackPatch(fallbackDir);
|
|
1953
1965
|
}
|
|
@@ -1959,16 +1971,27 @@ function defaultChromeDevtoolsPatchCandidates() {
|
|
|
1959
1971
|
];
|
|
1960
1972
|
}
|
|
1961
1973
|
function writeFallbackPatch(fallbackDir) {
|
|
1962
|
-
|
|
1974
|
+
let directory;
|
|
1963
1975
|
try {
|
|
1964
|
-
|
|
1965
|
-
|
|
1976
|
+
if (process.platform === "win32") {
|
|
1977
|
+
const candidate = path6.join(fallbackDir, `mcporter-chrome-devtools-${randomBytes2(16).toString("hex")}`);
|
|
1978
|
+
ensureWindowsPrivateDirectory(candidate);
|
|
1979
|
+
directory = candidate;
|
|
1980
|
+
} else {
|
|
1981
|
+
directory = fs6.mkdtempSync(path6.join(fallbackDir, "mcporter-chrome-devtools-"));
|
|
1982
|
+
}
|
|
1983
|
+
const patchPath = path6.join(directory, FALLBACK_PATCH_FILENAME);
|
|
1984
|
+
fs6.writeFileSync(patchPath, renderChromeDevtoolsAutoConnectPatchSource(), { mode: 384, flag: "wx" });
|
|
1985
|
+
const ownedDirectory = directory;
|
|
1986
|
+
return { patchPath, close: () => fs6.rmSync(ownedDirectory, { recursive: true, force: true }) };
|
|
1966
1987
|
} catch {
|
|
1988
|
+
if (directory)
|
|
1989
|
+
fs6.rmSync(directory, { recursive: true, force: true });
|
|
1967
1990
|
return void 0;
|
|
1968
1991
|
}
|
|
1969
1992
|
}
|
|
1970
1993
|
|
|
1971
|
-
// node_modules/.pnpm/mcporter@0.
|
|
1994
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime/cached-auth.js
|
|
1972
1995
|
function hasAuthorizationHeader(headers) {
|
|
1973
1996
|
return Boolean(headers && Object.keys(headers).some((key) => key.toLowerCase() === "authorization"));
|
|
1974
1997
|
}
|
|
@@ -2031,7 +2054,7 @@ async function applyCachedAuthIfAvailable(definition, logger, allowCachedAuth) {
|
|
|
2031
2054
|
}
|
|
2032
2055
|
}
|
|
2033
2056
|
|
|
2034
|
-
// node_modules/.pnpm/mcporter@0.
|
|
2057
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime-header-utils.js
|
|
2035
2058
|
function materializeHeaders(headers, serverName, env = process.env) {
|
|
2036
2059
|
if (!headers) {
|
|
2037
2060
|
return void 0;
|
|
@@ -2048,7 +2071,7 @@ function materializeHeaders(headers, serverName, env = process.env) {
|
|
|
2048
2071
|
return resolved;
|
|
2049
2072
|
}
|
|
2050
2073
|
|
|
2051
|
-
// node_modules/.pnpm/mcporter@0.
|
|
2074
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime/node-http-fetch.js
|
|
2052
2075
|
import http from "node:http";
|
|
2053
2076
|
import https from "node:https";
|
|
2054
2077
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
@@ -2090,7 +2113,8 @@ async function nodeHttp1FetchWithRedirects(input, init, redirectCount) {
|
|
|
2090
2113
|
const client = url.protocol === "https:" ? https : http;
|
|
2091
2114
|
const request = client.request(url, {
|
|
2092
2115
|
method: init.method ?? "GET",
|
|
2093
|
-
headers
|
|
2116
|
+
headers,
|
|
2117
|
+
signal: init.signal ?? void 0
|
|
2094
2118
|
}, (response) => {
|
|
2095
2119
|
const responseHeaders = new Headers();
|
|
2096
2120
|
for (const [key, value] of Object.entries(response.headers)) {
|
|
@@ -2133,11 +2157,6 @@ async function nodeHttp1FetchWithRedirects(input, init, redirectCount) {
|
|
|
2133
2157
|
headers: responseHeaders
|
|
2134
2158
|
}));
|
|
2135
2159
|
});
|
|
2136
|
-
const abort = () => {
|
|
2137
|
-
request.destroy(new DOMException("The operation was aborted.", "AbortError"));
|
|
2138
|
-
};
|
|
2139
|
-
init.signal?.addEventListener("abort", abort, { once: true });
|
|
2140
|
-
request.once("close", () => init.signal?.removeEventListener("abort", abort));
|
|
2141
2160
|
request.once("error", reject);
|
|
2142
2161
|
if (body !== void 0) {
|
|
2143
2162
|
request.write(body);
|
|
@@ -2207,7 +2226,7 @@ async function materializeRequestBody(body) {
|
|
|
2207
2226
|
throw new TypeError("node-http1 fetch does not support streaming request bodies.");
|
|
2208
2227
|
}
|
|
2209
2228
|
|
|
2210
|
-
// node_modules/.pnpm/mcporter@0.
|
|
2229
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime/http-transport.js
|
|
2211
2230
|
function extractTransportStatusCode(error) {
|
|
2212
2231
|
if (!error || typeof error !== "object")
|
|
2213
2232
|
return void 0;
|
|
@@ -2427,7 +2446,66 @@ async function connectSseFallbackTransport(client, definition, command, transpor
|
|
|
2427
2446
|
}
|
|
2428
2447
|
}
|
|
2429
2448
|
|
|
2430
|
-
// node_modules/.pnpm/mcporter@0.
|
|
2449
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime/schema-validator.js
|
|
2450
|
+
var schemaMaps = /* @__PURE__ */ new Set([
|
|
2451
|
+
"$defs",
|
|
2452
|
+
"definitions",
|
|
2453
|
+
"properties",
|
|
2454
|
+
"patternProperties",
|
|
2455
|
+
"dependentSchemas",
|
|
2456
|
+
"dependencies"
|
|
2457
|
+
]);
|
|
2458
|
+
var subschemas = /* @__PURE__ */ new Set([
|
|
2459
|
+
"additionalProperties",
|
|
2460
|
+
"unevaluatedProperties",
|
|
2461
|
+
"propertyNames",
|
|
2462
|
+
"items",
|
|
2463
|
+
"additionalItems",
|
|
2464
|
+
"unevaluatedItems",
|
|
2465
|
+
"contains",
|
|
2466
|
+
"contentSchema",
|
|
2467
|
+
"allOf",
|
|
2468
|
+
"anyOf",
|
|
2469
|
+
"oneOf",
|
|
2470
|
+
"prefixItems",
|
|
2471
|
+
"not",
|
|
2472
|
+
"if",
|
|
2473
|
+
"then",
|
|
2474
|
+
"else"
|
|
2475
|
+
]);
|
|
2476
|
+
function normalizeSchema(schema) {
|
|
2477
|
+
if (!isRecord(schema))
|
|
2478
|
+
return schema;
|
|
2479
|
+
return Object.fromEntries(Object.entries(schema).flatMap(([key, value]) => {
|
|
2480
|
+
if (key === "format" && (value === "uint32" || value === "uint64"))
|
|
2481
|
+
return [];
|
|
2482
|
+
if (schemaMaps.has(key) && isRecord(value)) {
|
|
2483
|
+
return [
|
|
2484
|
+
[key, Object.fromEntries(Object.entries(value).map(([name, child]) => [name, normalizeSchema(child)]))]
|
|
2485
|
+
];
|
|
2486
|
+
}
|
|
2487
|
+
if (subschemas.has(key)) {
|
|
2488
|
+
return [[key, Array.isArray(value) ? value.map(normalizeSchema) : normalizeSchema(value)]];
|
|
2489
|
+
}
|
|
2490
|
+
return [[key, value]];
|
|
2491
|
+
}));
|
|
2492
|
+
}
|
|
2493
|
+
function createOutputSchemaValidator() {
|
|
2494
|
+
const validator = new AjvJsonSchemaValidator();
|
|
2495
|
+
const normalizedSchemas = /* @__PURE__ */ new WeakMap();
|
|
2496
|
+
return {
|
|
2497
|
+
getValidator(schema) {
|
|
2498
|
+
let normalized = normalizedSchemas.get(schema);
|
|
2499
|
+
if (!normalized) {
|
|
2500
|
+
normalized = normalizeSchema(schema);
|
|
2501
|
+
normalizedSchemas.set(schema, normalized);
|
|
2502
|
+
}
|
|
2503
|
+
return validator.getValidator(normalized);
|
|
2504
|
+
}
|
|
2505
|
+
};
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2508
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime/stdio-transport.js
|
|
2431
2509
|
var McporterStdioTransport = class extends StdioClientTransport {
|
|
2432
2510
|
parameters;
|
|
2433
2511
|
meta;
|
|
@@ -2540,7 +2618,7 @@ var McporterStdioTransport = class extends StdioClientTransport {
|
|
|
2540
2618
|
}
|
|
2541
2619
|
};
|
|
2542
2620
|
|
|
2543
|
-
// node_modules/.pnpm/mcporter@0.
|
|
2621
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime/transport.js
|
|
2544
2622
|
function shouldUseModeForServer(definition, serverFilter) {
|
|
2545
2623
|
return !serverFilter || serverFilter === definition.name;
|
|
2546
2624
|
}
|
|
@@ -2577,6 +2655,7 @@ function shouldRetryStdioAsLegacy(error, definition) {
|
|
|
2577
2655
|
function createClient(definition, clientInfo, options = {}) {
|
|
2578
2656
|
const mode = options.forceLegacy ? "legacy" : resolveNegotiationMode(definition);
|
|
2579
2657
|
const clientOptions = {
|
|
2658
|
+
jsonSchemaValidator: createOutputSchemaValidator(),
|
|
2580
2659
|
capabilities: { elicitation: { form: {}, url: {} } },
|
|
2581
2660
|
listMaxPages: LIST_MAX_PAGES,
|
|
2582
2661
|
versionNegotiation: {
|
|
@@ -2633,6 +2712,7 @@ async function createStdioClientContext(client, definition, logger, options) {
|
|
|
2633
2712
|
let processTree;
|
|
2634
2713
|
const captureProcesses = () => processTree ??= captureTransportProcessTree(rawTransport);
|
|
2635
2714
|
let onProxyClosed;
|
|
2715
|
+
let compat;
|
|
2636
2716
|
try {
|
|
2637
2717
|
if (activeProxy) {
|
|
2638
2718
|
try {
|
|
@@ -2654,7 +2734,7 @@ async function createStdioClientContext(client, definition, logger, options) {
|
|
|
2654
2734
|
}
|
|
2655
2735
|
}
|
|
2656
2736
|
const transportEnv = handoff?.env ?? mergedEnv;
|
|
2657
|
-
|
|
2737
|
+
compat = applyChromeDevtoolsCompat(transportEnv, command, commandArgs);
|
|
2658
2738
|
if (compat.applied) {
|
|
2659
2739
|
logger.info(`Injecting chrome-devtools-mcp --autoConnect compatibility patch from ${compat.patchPath}.`);
|
|
2660
2740
|
}
|
|
@@ -2668,11 +2748,15 @@ async function createStdioClientContext(client, definition, logger, options) {
|
|
|
2668
2748
|
redactDiagnostics: isBrokerDefinition(definition),
|
|
2669
2749
|
lifetime: activeProxy?.signal,
|
|
2670
2750
|
prepareClose: activeProxy ? async () => void await captureProcesses() : void 0,
|
|
2671
|
-
cleanup: activeProxy ? async () => {
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2751
|
+
cleanup: activeProxy || compat.close ? async () => {
|
|
2752
|
+
try {
|
|
2753
|
+
if (onProxyClosed)
|
|
2754
|
+
activeProxy?.signal.removeEventListener("abort", onProxyClosed);
|
|
2755
|
+
await handoff?.close();
|
|
2756
|
+
await activeProxy?.close();
|
|
2757
|
+
} finally {
|
|
2758
|
+
compat?.close?.();
|
|
2759
|
+
}
|
|
2676
2760
|
} : void 0
|
|
2677
2761
|
});
|
|
2678
2762
|
} catch (error) {
|
|
@@ -2680,6 +2764,7 @@ async function createStdioClientContext(client, definition, logger, options) {
|
|
|
2680
2764
|
});
|
|
2681
2765
|
await activeProxy?.close().catch(() => {
|
|
2682
2766
|
});
|
|
2767
|
+
compat?.close?.();
|
|
2683
2768
|
throw error;
|
|
2684
2769
|
}
|
|
2685
2770
|
let transport;
|
|
@@ -2758,7 +2843,7 @@ async function createClientContext(definition, logger, clientInfo, options = {})
|
|
|
2758
2843
|
});
|
|
2759
2844
|
}
|
|
2760
2845
|
|
|
2761
|
-
// node_modules/.pnpm/mcporter@0.
|
|
2846
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime/connection-cache.js
|
|
2762
2847
|
var RuntimeConnectionCache = class {
|
|
2763
2848
|
definitions;
|
|
2764
2849
|
options;
|
|
@@ -2770,6 +2855,7 @@ var RuntimeConnectionCache = class {
|
|
|
2770
2855
|
serverGenerations = /* @__PURE__ */ new Map();
|
|
2771
2856
|
retirementPromises = /* @__PURE__ */ new Map();
|
|
2772
2857
|
lastConnectionInfo = /* @__PURE__ */ new Map();
|
|
2858
|
+
uncachedInFlight = /* @__PURE__ */ new Set();
|
|
2773
2859
|
constructor(definitions, options) {
|
|
2774
2860
|
this.definitions = definitions;
|
|
2775
2861
|
this.options = options;
|
|
@@ -2870,6 +2956,12 @@ var RuntimeConnectionCache = class {
|
|
|
2870
2956
|
retired.push(cached);
|
|
2871
2957
|
}
|
|
2872
2958
|
}
|
|
2959
|
+
for (const entry of this.uncachedInFlight) {
|
|
2960
|
+
if (entry.server === normalized) {
|
|
2961
|
+
this.uncachedInFlight.delete(entry);
|
|
2962
|
+
retired.push(entry);
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2873
2965
|
this.activeClientKeys.delete(normalized);
|
|
2874
2966
|
if (retired.length > 0) {
|
|
2875
2967
|
const retirement = this.trackRetirement(normalized, this.closeCachedEntries(retired));
|
|
@@ -2899,6 +2991,7 @@ var RuntimeConnectionCache = class {
|
|
|
2899
2991
|
const servers = /* @__PURE__ */ new Set([
|
|
2900
2992
|
...this.definitions.keys(),
|
|
2901
2993
|
...[...this.clients.values()].map((entry) => entry.server),
|
|
2994
|
+
...[...this.uncachedInFlight.values()].map((entry) => entry.server),
|
|
2902
2995
|
...this.connectionSetupTails.keys()
|
|
2903
2996
|
]);
|
|
2904
2997
|
for (const server of servers) {
|
|
@@ -3000,7 +3093,9 @@ var RuntimeConnectionCache = class {
|
|
|
3000
3093
|
}
|
|
3001
3094
|
}).then((context) => {
|
|
3002
3095
|
contextRef.current = context;
|
|
3003
|
-
this.
|
|
3096
|
+
if (this.serverGeneration(normalized) === generation && !abortController.signal.aborted) {
|
|
3097
|
+
this.lastConnectionInfo.set(normalized, connectionInfoFromClient(context.client));
|
|
3098
|
+
}
|
|
3004
3099
|
return context;
|
|
3005
3100
|
});
|
|
3006
3101
|
if (useCache) {
|
|
@@ -3010,9 +3105,9 @@ var RuntimeConnectionCache = class {
|
|
|
3010
3105
|
this.contextCachePromises.set(context, contextPromise);
|
|
3011
3106
|
return context;
|
|
3012
3107
|
});
|
|
3013
|
-
let
|
|
3014
|
-
|
|
3015
|
-
const stillCached = this.clients.get(cacheKey)?.promise ===
|
|
3108
|
+
let connection2;
|
|
3109
|
+
connection2 = contextPromise.then((context) => {
|
|
3110
|
+
const stillCached = this.clients.get(cacheKey)?.promise === connection2;
|
|
3016
3111
|
if (this.serverGeneration(normalized) !== generation || !stillCached) {
|
|
3017
3112
|
this.contextCacheKeys.delete(context);
|
|
3018
3113
|
this.contextCachePromises.delete(context);
|
|
@@ -3023,7 +3118,7 @@ var RuntimeConnectionCache = class {
|
|
|
3023
3118
|
this.activeClientKeys.set(normalized, cacheKey);
|
|
3024
3119
|
this.clients.set(cacheKey, {
|
|
3025
3120
|
server: normalized,
|
|
3026
|
-
promise:
|
|
3121
|
+
promise: connection2,
|
|
3027
3122
|
contextPromise,
|
|
3028
3123
|
allowCachedAuth: ignoresAuthCachePolicy ? effectiveAllowCachedAuth : cacheAllowCachedAuth,
|
|
3029
3124
|
disableOAuth: ignoresAuthCachePolicy ? disableOAuth : cacheDisableOAuth,
|
|
@@ -3032,9 +3127,9 @@ var RuntimeConnectionCache = class {
|
|
|
3032
3127
|
contextRef
|
|
3033
3128
|
});
|
|
3034
3129
|
try {
|
|
3035
|
-
return await
|
|
3130
|
+
return await connection2;
|
|
3036
3131
|
} catch (error) {
|
|
3037
|
-
const ownsCacheEntry = this.clients.get(cacheKey)?.promise ===
|
|
3132
|
+
const ownsCacheEntry = this.clients.get(cacheKey)?.promise === connection2;
|
|
3038
3133
|
if (ownsCacheEntry) {
|
|
3039
3134
|
this.clients.delete(cacheKey);
|
|
3040
3135
|
if (this.activeClientKeys.get(normalized) === cacheKey && previousActiveKey && this.clients.has(previousActiveKey)) {
|
|
@@ -3048,8 +3143,29 @@ var RuntimeConnectionCache = class {
|
|
|
3048
3143
|
releaseConnectionSetup?.();
|
|
3049
3144
|
}
|
|
3050
3145
|
}
|
|
3146
|
+
const connection = contextPromise.then((context) => {
|
|
3147
|
+
if (this.serverGeneration(normalized) !== generation || abortController.signal.aborted) {
|
|
3148
|
+
throw new Error(`Connection setup for MCP server '${normalized}' was superseded.`);
|
|
3149
|
+
}
|
|
3150
|
+
return context;
|
|
3151
|
+
});
|
|
3152
|
+
const entry = {
|
|
3153
|
+
server: normalized,
|
|
3154
|
+
promise: connection,
|
|
3155
|
+
contextPromise,
|
|
3156
|
+
allowCachedAuth: ignoresAuthCachePolicy ? effectiveAllowCachedAuth : cacheAllowCachedAuth,
|
|
3157
|
+
disableOAuth: ignoresAuthCachePolicy ? disableOAuth : cacheDisableOAuth,
|
|
3158
|
+
abortController,
|
|
3159
|
+
transportRef,
|
|
3160
|
+
contextRef
|
|
3161
|
+
};
|
|
3162
|
+
this.uncachedInFlight.add(entry);
|
|
3163
|
+
const forget = () => {
|
|
3164
|
+
this.uncachedInFlight.delete(entry);
|
|
3165
|
+
};
|
|
3166
|
+
void connection.then(forget, forget);
|
|
3051
3167
|
releaseConnectionSetup?.();
|
|
3052
|
-
return
|
|
3168
|
+
return connection;
|
|
3053
3169
|
}
|
|
3054
3170
|
// close tears down transports (and OAuth sessions) for a single server or all servers.
|
|
3055
3171
|
async close(server) {
|
|
@@ -3057,25 +3173,32 @@ var RuntimeConnectionCache = class {
|
|
|
3057
3173
|
const normalized = server.trim();
|
|
3058
3174
|
this.bumpServerGeneration(normalized);
|
|
3059
3175
|
const entries2 = [...this.clients.entries()].filter(([, cached]) => cached.server === normalized);
|
|
3176
|
+
const uncached2 = [...this.uncachedInFlight].filter((cached) => cached.server === normalized);
|
|
3060
3177
|
if (entries2.length === 0) {
|
|
3061
3178
|
this.activeClientKeys.delete(normalized);
|
|
3062
3179
|
}
|
|
3063
3180
|
for (const [key] of entries2) {
|
|
3064
3181
|
this.clients.delete(key);
|
|
3065
3182
|
}
|
|
3183
|
+
for (const entry of uncached2) {
|
|
3184
|
+
this.uncachedInFlight.delete(entry);
|
|
3185
|
+
}
|
|
3066
3186
|
this.activeClientKeys.delete(normalized);
|
|
3067
|
-
|
|
3068
|
-
|
|
3187
|
+
const toClose = [...entries2.map(([, cached]) => cached), ...uncached2];
|
|
3188
|
+
if (toClose.length > 0) {
|
|
3189
|
+
void this.trackRetirement(normalized, this.closeCachedEntries(toClose));
|
|
3069
3190
|
}
|
|
3070
3191
|
await this.awaitRetirements(normalized);
|
|
3071
3192
|
return;
|
|
3072
3193
|
}
|
|
3073
3194
|
this.bumpAllServerGenerations();
|
|
3074
3195
|
const entries = [...this.clients.entries()];
|
|
3196
|
+
const uncached = [...this.uncachedInFlight];
|
|
3075
3197
|
this.clients.clear();
|
|
3198
|
+
this.uncachedInFlight.clear();
|
|
3076
3199
|
this.activeClientKeys.clear();
|
|
3077
3200
|
const byServer = /* @__PURE__ */ new Map();
|
|
3078
|
-
for (const [,
|
|
3201
|
+
for (const cached of [...entries.map(([, entry]) => entry), ...uncached]) {
|
|
3079
3202
|
const serverEntries = byServer.get(cached.server) ?? [];
|
|
3080
3203
|
serverEntries.push(cached);
|
|
3081
3204
|
byServer.set(cached.server, serverEntries);
|
|
@@ -3090,6 +3213,8 @@ var RuntimeConnectionCache = class {
|
|
|
3090
3213
|
}
|
|
3091
3214
|
async closeCachedEntries(entries) {
|
|
3092
3215
|
for (const cached of entries) {
|
|
3216
|
+
void this.contextPromiseFor(cached).catch(() => {
|
|
3217
|
+
});
|
|
3093
3218
|
cached.abortController?.abort();
|
|
3094
3219
|
}
|
|
3095
3220
|
const results = await Promise.allSettled(entries.map(async (cached) => {
|
|
@@ -3309,7 +3434,7 @@ function connectionInfoFromClient(client) {
|
|
|
3309
3434
|
};
|
|
3310
3435
|
}
|
|
3311
3436
|
|
|
3312
|
-
// node_modules/.pnpm/mcporter@0.
|
|
3437
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/tool-filters.js
|
|
3313
3438
|
function validateToolFilters(name, filter) {
|
|
3314
3439
|
if (filter.allowedTools !== void 0 && filter.blockedTools !== void 0) {
|
|
3315
3440
|
throw new Error(`Server '${name}' cannot specify both allowedTools and blockedTools.`);
|
|
@@ -3331,7 +3456,7 @@ function filterTools(tools, filter) {
|
|
|
3331
3456
|
return tools.filter((tool) => isToolAllowed(tool.name, filter));
|
|
3332
3457
|
}
|
|
3333
3458
|
|
|
3334
|
-
// node_modules/.pnpm/mcporter@0.
|
|
3459
|
+
// node_modules/.pnpm/mcporter@0.14.2/node_modules/mcporter/dist/runtime.js
|
|
3335
3460
|
var PACKAGE_NAME = "mcporter";
|
|
3336
3461
|
var OAUTH_CODE_TIMEOUT_MS = resolveOAuthTimeoutFromEnv();
|
|
3337
3462
|
var MAX_RESOURCE_LIST_PAGES = 100;
|