@introspection-ai/recipes 0.19.3 → 0.21.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/README.md +5 -4
- package/dist/agents.d.ts +17 -1
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +15 -1
- package/dist/agents.js.map +1 -1
- package/dist/child-agent.d.ts +5 -1
- package/dist/child-agent.d.ts.map +1 -1
- package/dist/child-agent.js +34 -1
- package/dist/child-agent.js.map +1 -1
- package/dist/mcp-chunks/{auth-command-3K7V3VCW.js → auth-command-4OEOMU2V.js} +26 -38
- package/dist/mcp-chunks/call-arguments-RPXZJOXL.js +15 -0
- package/dist/mcp-chunks/{call-command-OFPHPFM5.js → call-command-AUEKSBMD.js} +74 -40
- package/dist/mcp-chunks/{chunk-NCXEJ35U.js → chunk-3VLPWGJL.js} +4 -4
- package/dist/mcp-chunks/{chunk-2FSDGCHW.js → chunk-47N2EELW.js} +377 -527
- package/dist/mcp-chunks/{chunk-WWO5WGH5.js → chunk-4NDR45CX.js} +5 -5
- package/dist/mcp-chunks/{chunk-2MEHGB7D.js → chunk-5WGJPYOR.js} +1 -1
- package/dist/mcp-chunks/chunk-6CYJ6RN3.js +12 -0
- package/dist/mcp-chunks/{chunk-XUF6KARU.js → chunk-6DL2C6V5.js} +1 -1
- package/dist/mcp-chunks/{chunk-54EWGONA.js → chunk-6QH47GNE.js} +10 -6
- package/dist/mcp-chunks/{chunk-PKOJCYNA.js → chunk-756YH7S4.js} +2 -2
- package/dist/mcp-chunks/{chunk-C2PQFLWS.js → chunk-7CS27CWE.js} +15 -6
- package/dist/mcp-chunks/{chunk-GIF7LOYU.js → chunk-7KEDX7SE.js} +2 -2
- package/dist/mcp-chunks/{chunk-LNSUME65.js → chunk-AB7MHBEG.js} +29 -13
- package/dist/mcp-chunks/{chunk-NZOIX6XW.js → chunk-ACTRQW5L.js} +2 -2
- package/dist/mcp-chunks/{chunk-7A63PAGP.js → chunk-ADINDBOF.js} +21 -5
- package/dist/mcp-chunks/{chunk-XTL4MHFH.js → chunk-AF74TOWM.js} +11 -7
- package/dist/mcp-chunks/{chunk-KSGYBW3F.js → chunk-AFKE4BTR.js} +72 -22
- package/dist/mcp-chunks/{chunk-YTKRAHO6.js → chunk-DEYKPG4K.js} +4 -4
- package/dist/mcp-chunks/{chunk-SB2UUURE.js → chunk-E4YYMOT2.js} +10 -10
- package/dist/mcp-chunks/{chunk-HAO6PL7Z.js → chunk-HBDCHBJP.js} +7 -7
- package/dist/mcp-chunks/{chunk-QJACOI2W.js → chunk-HDUKEFBI.js} +4 -2
- package/dist/mcp-chunks/{chunk-E6RVTWJY.js → chunk-HHMWZ2FZ.js} +1 -1
- package/dist/mcp-chunks/{chunk-HTZ2URXW.js → chunk-IPH6U7SE.js} +3 -3
- package/dist/mcp-chunks/{chunk-SFREPU3D.js → chunk-J3J3NQ4X.js} +1 -1
- package/dist/mcp-chunks/{chunk-JAKI24KR.js → chunk-J6VOMOKI.js} +1 -1
- package/dist/mcp-chunks/{chunk-H7F5RZXS.js → chunk-JILBFEBD.js} +2 -1
- package/dist/mcp-chunks/{chunk-YPJ5EHXR.js → chunk-K56RW4HB.js} +4 -4
- package/dist/mcp-chunks/{chunk-YCYSQA5V.js → chunk-KMH3PHLA.js} +5 -5
- package/dist/mcp-chunks/{chunk-2JHHONW4.js → chunk-KPXFBRTG.js} +1 -1
- package/dist/mcp-chunks/{chunk-LICH4Q7A.js → chunk-L4CUJJI5.js} +4 -4
- package/dist/mcp-chunks/{chunk-XRGLP3Z2.js → chunk-LC2CCTQN.js} +1 -1
- package/dist/mcp-chunks/{chunk-P3RN22HQ.js → chunk-LJCZWKGJ.js} +3 -2
- package/dist/mcp-chunks/{chunk-F3LL4EBL.js → chunk-MFFE5QSH.js} +1 -1
- package/dist/mcp-chunks/{chunk-64EP2BVO.js → chunk-MOML5C2E.js} +1 -1
- package/dist/mcp-chunks/{chunk-CNDY7WB4.js → chunk-MRXSXBZT.js} +2 -2
- package/dist/mcp-chunks/{chunk-WXBPMFSN.js → chunk-NMFI6AUD.js} +91 -34
- package/dist/mcp-chunks/{chunk-55JIHDU3.js → chunk-NWLOPQT7.js} +1 -1
- package/dist/mcp-chunks/{chunk-DXPHJFSA.js → chunk-OGFFBNIC.js} +4 -4
- package/dist/mcp-chunks/{chunk-7RDLPFIO.js → chunk-PPIXUCYQ.js} +2 -2
- package/dist/mcp-chunks/{chunk-RBVYCKCD.js → chunk-PPOHGQKM.js} +2 -2
- package/dist/mcp-chunks/{chunk-E6T37ED6.js → chunk-PRZCYXVO.js} +2 -2
- package/dist/mcp-chunks/{chunk-ETWN4IIA.js → chunk-Q7ESBNJG.js} +6 -6
- package/dist/mcp-chunks/{chunk-CA5WFJZA.js → chunk-RE4EVQNC.js} +1 -1
- package/dist/mcp-chunks/{chunk-6D6KPSXN.js → chunk-RO2Y34XX.js} +1 -1
- package/dist/mcp-chunks/{chunk-KSMY7PXI.js → chunk-SAK5KCLR.js} +1 -1
- package/dist/mcp-chunks/{chunk-UENXT3NE.js → chunk-SCGMRUKI.js} +1 -1
- package/dist/mcp-chunks/{chunk-3IZQW4H4.js → chunk-SQTXZR56.js} +212 -18
- package/dist/mcp-chunks/{chunk-FWP4RACK.js → chunk-TGJOZDKG.js} +2 -2
- package/dist/mcp-chunks/{chunk-DEUU7WSN.js → chunk-US57PK4B.js} +2 -2
- package/dist/mcp-chunks/{chunk-UHOKCTZT.js → chunk-V4RYLZM5.js} +1 -1
- package/dist/mcp-chunks/{chunk-GFYTST6N.js → chunk-X3FOKZ5C.js} +1 -1
- package/dist/mcp-chunks/{chunk-GSZOK5TS.js → chunk-XK3LRH3Q.js} +3 -3
- package/dist/mcp-chunks/chunk-XVJAASVZ.js +1931 -0
- package/dist/mcp-chunks/{chunk-ZBFZ5UFE.js → chunk-YX2NKW6O.js} +3 -1
- package/dist/mcp-chunks/{chunk-L4VKBFYI.js → chunk-Z7O6NF7X.js} +101 -16
- package/dist/mcp-chunks/{chunk-7DH57OKF.js → chunk-ZKFG37TB.js} +2 -2
- package/dist/mcp-chunks/chunk-ZRZ7C6L3.js +823 -0
- package/dist/mcp-chunks/{chunk-YSPT6F7K.js → chunk-ZZSD2JT7.js} +1 -1
- package/dist/mcp-chunks/{cli-E4P6SZLQ.js → cli-B7WQQUME.js} +70 -69
- package/dist/mcp-chunks/client-4ZHIBB67.js +21 -0
- package/dist/mcp-chunks/{config-command-MWF3RHPQ.js → config-command-FF3JPMOP.js} +27 -27
- package/dist/mcp-chunks/daemon-command-FKW6YELL.js +35 -0
- package/dist/mcp-chunks/{dist-ZIPUENTM.js → dist-V4UB7RTR.js} +547 -402
- package/dist/mcp-chunks/{emit-ts-command-GOVJJ64A.js → emit-ts-command-4X56IZ32.js} +16 -16
- package/dist/mcp-chunks/{generate-cli-runner-L5OQIMEY.js → generate-cli-runner-MIPF73SJ.js} +49 -42
- package/dist/mcp-chunks/{inspect-cli-command-7OMMREPE.js → inspect-cli-command-GX54ZXKR.js} +9 -9
- package/dist/mcp-chunks/{launch-BWXPLPB7.js → launch-E2LWGPZS.js} +1 -1
- package/dist/mcp-chunks/{lifecycle-B5UC65PT.js → lifecycle-TONHXXXJ.js} +1 -1
- package/dist/mcp-chunks/{list-command-ZO4HVFQK.js → list-command-YUGRZO4G.js} +31 -31
- package/dist/mcp-chunks/{output-utils-M3TJ2N4M.js → output-utils-AZY6N2VQ.js} +3 -3
- package/dist/mcp-chunks/{prompt-CH6TK0bC-C7OTKGRD.js → prompt-CH6TK0bC-NSBYYJZH.js} +1 -1
- package/dist/mcp-chunks/{record-command-VD3HUQIC.js → record-command-25DLELA2.js} +5 -5
- package/dist/mcp-chunks/{replay-command-AX6IN7YD.js → replay-command-6SLDG6PC.js} +6 -6
- package/dist/mcp-chunks/{resource-command-JEZ2DW2G.js → resource-command-YVOB4JCU.js} +9 -9
- package/dist/mcp-chunks/{result-utils-3YHYGS45.js → result-utils-ZXB5DM36.js} +3 -3
- package/dist/mcp-chunks/runtime-NOWGTHZ5.js +39 -0
- package/dist/mcp-chunks/{runtime-wrapper-UREU7GC3.js → runtime-wrapper-ZZPAFQE4.js} +6 -6
- package/dist/mcp-chunks/{serve-command-M47YZ6JN.js → serve-command-QYGM2AMB.js} +35 -27
- package/dist/mcp-chunks/{timeouts-THZRYP4B.js → timeouts-P3TBB3AX.js} +5 -3
- package/dist/mcp-chunks/{vault-command-53P7MLCB.js → vault-command-VDMPATIX.js} +58 -12
- package/dist/mcp-chunks/{webapi-PHEQZQKH.js → webapi-BLTNWSB2.js} +68 -60
- package/dist/mcp-daemon.js +30 -28
- package/dist/mcp-run-worker.js +30 -28
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +24 -0
- package/dist/mcp.js.map +1 -1
- package/dist/pi-extension.d.ts +3 -0
- package/dist/pi-extension.d.ts.map +1 -1
- package/dist/pi-extension.js +30 -22
- package/dist/pi-extension.js.map +1 -1
- package/dist/run-controller.d.ts +3 -1
- package/dist/run-controller.d.ts.map +1 -1
- package/dist/run-controller.js +17 -3
- package/dist/run-controller.js.map +1 -1
- package/dist/session.d.ts +3 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +4 -1
- package/dist/session.js.map +1 -1
- package/docs/host-api.md +12 -0
- package/docs/pi-extension.md +18 -5
- package/package.json +20 -16
- package/dist/mcp-chunks/call-arguments-TX3F2TEE.js +0 -15
- package/dist/mcp-chunks/chunk-SRZZQ6TL.js +0 -266
- package/dist/mcp-chunks/client-2EJC4PLL.js +0 -18
- package/dist/mcp-chunks/daemon-command-6CJ26MKI.js +0 -33
- package/dist/mcp-chunks/runtime-HSYVOME7.js +0 -37
- package/dist/recipe-check.d.ts +0 -18
- package/dist/recipe-check.d.ts.map +0 -1
- package/dist/recipe-check.js +0 -263
- package/dist/recipe-check.js.map +0 -1
- package/vendor/introspection-recipe-check/darwin-arm64/introspection-recipe-check +0 -0
- package/vendor/introspection-recipe-check/darwin-x64/introspection-recipe-check +0 -0
- package/vendor/introspection-recipe-check/linux-arm64/introspection-recipe-check +0 -0
- package/vendor/introspection-recipe-check/linux-x64/introspection-recipe-check +0 -0
- package/vendor/introspection-recipe-check/linux-x64-musl/introspection-recipe-check +0 -0
- package/vendor/introspection-recipe-check/win32-x64/introspection-recipe-check.exe +0 -0
- package/vendor/mcp-client/darwin-arm64/mcp-client +0 -0
- package/vendor/mcp-client/darwin-x64/mcp-client +0 -0
- package/vendor/mcp-client/linux-arm64/mcp-client +0 -0
- package/vendor/mcp-client/linux-x64/mcp-client +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
buildToolDoc
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6QH47GNE.js";
|
|
5
5
|
import {
|
|
6
6
|
buildEmbeddedSchemaMap
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LJCZWKGJ.js";
|
|
8
8
|
import {
|
|
9
9
|
parsePositiveInteger
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HDUKEFBI.js";
|
|
11
11
|
import {
|
|
12
12
|
stableJsonStringify
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-V4RYLZM5.js";
|
|
14
14
|
import {
|
|
15
15
|
MCPORTER_VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-J3J3NQ4X.js";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
18
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/generate/flag-parser.js
|
|
19
19
|
function extractGeneratorFlags(args, options = {}) {
|
|
20
20
|
const result = {};
|
|
21
21
|
let index = 0;
|
|
@@ -57,12 +57,12 @@ function extractGeneratorFlags(args, options = {}) {
|
|
|
57
57
|
return result;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
60
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/generate/template.js
|
|
61
61
|
import { realpathSync } from "node:fs";
|
|
62
62
|
import fs2 from "node:fs/promises";
|
|
63
63
|
import path from "node:path";
|
|
64
64
|
|
|
65
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
65
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/generate/fs-helpers.js
|
|
66
66
|
import fs from "node:fs/promises";
|
|
67
67
|
async function markExecutable(filePath) {
|
|
68
68
|
try {
|
|
@@ -93,7 +93,7 @@ function shouldIgnorePosixPermissionError(error) {
|
|
|
93
93
|
return code === "EPERM" || code === "EINVAL" || code === "ENOSYS" || code === "EACCES";
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
96
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/generate/template-help.js
|
|
97
97
|
function renderEmbeddedHelpSource() {
|
|
98
98
|
return `function configureGeneratedCommandHelp(command: Command): void {
|
|
99
99
|
command.configureHelp({
|
|
@@ -207,7 +207,7 @@ function quickStartExamples(): Array<[string, string]> {
|
|
|
207
207
|
`;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
210
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/generate/template.js
|
|
211
211
|
async function writeTemplate(input) {
|
|
212
212
|
const resolvedOutput = input.outputPath ? path.resolve(input.outputPath) : path.resolve(process.cwd(), `${input.serverName}.ts`);
|
|
213
213
|
const runtimeScriptPath = input.runtimeScriptPath ? path.resolve(input.runtimeScriptPath) : resolvedOutput;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/env.js
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
var ENV_DEFAULT_PATTERN = /^\$\{([A-Za-z_][A-Za-z0-9_]*)(?::-|:|-)?([^}]*)\}$/;
|
|
@@ -19,7 +19,7 @@ function expandHome(input) {
|
|
|
19
19
|
}
|
|
20
20
|
return input;
|
|
21
21
|
}
|
|
22
|
-
function resolveEnvValue(raw) {
|
|
22
|
+
function resolveEnvValue(raw, env = process.env) {
|
|
23
23
|
if (typeof raw !== "string") {
|
|
24
24
|
return String(raw);
|
|
25
25
|
}
|
|
@@ -30,21 +30,21 @@ function resolveEnvValue(raw) {
|
|
|
30
30
|
if (!envName) {
|
|
31
31
|
return raw;
|
|
32
32
|
}
|
|
33
|
-
const existing =
|
|
33
|
+
const existing = env[envName];
|
|
34
34
|
if (existing && existing !== "") {
|
|
35
35
|
return existing;
|
|
36
36
|
}
|
|
37
37
|
return defaultValue;
|
|
38
38
|
}
|
|
39
39
|
if (raw.startsWith("$")) {
|
|
40
|
-
return resolveEnvPlaceholders(raw);
|
|
40
|
+
return resolveEnvPlaceholders(raw, env);
|
|
41
41
|
}
|
|
42
42
|
return raw;
|
|
43
43
|
}
|
|
44
|
-
function resolveEnvPlaceholders(value) {
|
|
44
|
+
function resolveEnvPlaceholders(value, env = process.env) {
|
|
45
45
|
if (value.startsWith(ENV_DIRECT_PREFIX)) {
|
|
46
46
|
const envName = value.slice(ENV_DIRECT_PREFIX.length);
|
|
47
|
-
const envValue =
|
|
47
|
+
const envValue = env[envName];
|
|
48
48
|
if (envValue === void 0) {
|
|
49
49
|
throw new Error(`Environment variable '${envName}' is required for MCP header substitution.`);
|
|
50
50
|
}
|
|
@@ -52,7 +52,7 @@ function resolveEnvPlaceholders(value) {
|
|
|
52
52
|
}
|
|
53
53
|
const missing = /* @__PURE__ */ new Set();
|
|
54
54
|
const replaced = value.replace(ENV_INTERPOLATION_PATTERN, (placeholder, envName, fallback) => {
|
|
55
|
-
const envValue =
|
|
55
|
+
const envValue = env[envName];
|
|
56
56
|
if (envValue !== void 0 && envValue !== "") {
|
|
57
57
|
return envValue;
|
|
58
58
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
raceWithTimeout
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q7ESBNJG.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/timeouts.js
|
|
7
7
|
var DEFAULT_LIST_TIMEOUT_MS = 3e4;
|
|
8
8
|
var DEFAULT_CALL_TIMEOUT_MS = 6e4;
|
|
9
9
|
var POSITIVE_INTEGER_PATTERN = /^[1-9]\d*$/;
|
|
10
|
+
var STDOUT_FLUSH_TIMEOUT_MS = 2e3;
|
|
10
11
|
function parsePositiveInteger(raw) {
|
|
11
12
|
if (!raw || !POSITIVE_INTEGER_PATTERN.test(raw)) {
|
|
12
13
|
return void 0;
|
|
@@ -49,6 +50,7 @@ function consumeTimeoutFlag(args, index, options) {
|
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
export {
|
|
53
|
+
STDOUT_FLUSH_TIMEOUT_MS,
|
|
52
54
|
parsePositiveInteger,
|
|
53
55
|
parseTimeout,
|
|
54
56
|
LIST_TIMEOUT_MS,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/record-replay-env.js
|
|
4
4
|
var KEEP_ALIVE_DISABLED_FOR_MODE = "*";
|
|
5
5
|
function buildRecordCommandEnv(sessionName, server) {
|
|
6
6
|
return buildModeEnv({
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
mcporterConfigCandidates
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TGJOZDKG.js";
|
|
5
5
|
import {
|
|
6
6
|
expandHome
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HBDCHBJP.js";
|
|
8
8
|
|
|
9
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
9
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/config/path-discovery.js
|
|
10
10
|
import fsSync from "node:fs";
|
|
11
11
|
import fs from "node:fs/promises";
|
|
12
12
|
import path from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/version.js
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
var MCPORTER_VERSION = (() => {
|
|
6
6
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/identifier-helpers.js
|
|
4
4
|
var AUTO_THRESHOLD_RATIO = 0.3;
|
|
5
5
|
var AUTO_THRESHOLD_MIN = 2;
|
|
6
6
|
function chooseClosestIdentifier(input, candidates) {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/definition-fields.js
|
|
4
4
|
var SHARED_DEFINITION_FIELDS = [
|
|
5
5
|
"auth",
|
|
6
6
|
"tokenCacheDir",
|
|
7
7
|
"clientName",
|
|
8
8
|
"protocolVersion",
|
|
9
|
+
"chromeDevtoolsRelay",
|
|
9
10
|
"oauthClientId",
|
|
10
11
|
"oauthClientSecretEnv",
|
|
11
12
|
"oauthTokenEndpointAuthMethod",
|
|
@@ -12765,7 +12765,7 @@ async function pkceChallenge(length) {
|
|
|
12765
12765
|
};
|
|
12766
12766
|
}
|
|
12767
12767
|
|
|
12768
|
-
// node_modules/.pnpm/eventsource-parser@3.1.
|
|
12768
|
+
// node_modules/.pnpm/eventsource-parser@3.1.1/node_modules/eventsource-parser/dist/index.js
|
|
12769
12769
|
var ParseError = class extends Error {
|
|
12770
12770
|
constructor(message, options) {
|
|
12771
12771
|
super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
|
|
@@ -12869,7 +12869,7 @@ ${value2}`, dataLines++;
|
|
|
12869
12869
|
}
|
|
12870
12870
|
if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {
|
|
12871
12871
|
const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);
|
|
12872
|
-
|
|
12872
|
+
value2.includes("\0") || (id = value2);
|
|
12873
12873
|
return;
|
|
12874
12874
|
}
|
|
12875
12875
|
if (firstCharCode === 58) {
|
|
@@ -12897,7 +12897,7 @@ ${value2}`, dataLines++;
|
|
|
12897
12897
|
${value}`, dataLines++;
|
|
12898
12898
|
break;
|
|
12899
12899
|
case "id":
|
|
12900
|
-
|
|
12900
|
+
value.includes("\0") || (id = value);
|
|
12901
12901
|
break;
|
|
12902
12902
|
case "retry":
|
|
12903
12903
|
/^\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(
|
|
@@ -13238,7 +13238,7 @@ function getBaseURL() {
|
|
|
13238
13238
|
return doc && typeof doc == "object" && "baseURI" in doc && typeof doc.baseURI == "string" ? doc.baseURI : void 0;
|
|
13239
13239
|
}
|
|
13240
13240
|
|
|
13241
|
-
// node_modules/.pnpm/eventsource-parser@3.1.
|
|
13241
|
+
// node_modules/.pnpm/eventsource-parser@3.1.1/node_modules/eventsource-parser/dist/stream.js
|
|
13242
13242
|
var EventSourceParserStream = class extends TransformStream {
|
|
13243
13243
|
constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {
|
|
13244
13244
|
let parser;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
findServerByHttpUrl
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7KEDX7SE.js";
|
|
5
5
|
import {
|
|
6
6
|
persistEphemeralServer,
|
|
7
7
|
resolveEphemeralServer,
|
|
8
8
|
splitCommandLine
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4NDR45CX.js";
|
|
10
10
|
import {
|
|
11
11
|
looksLikeHttpUrl,
|
|
12
12
|
normalizeHttpUrlCandidate
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SCGMRUKI.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
15
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/adhoc-help.js
|
|
16
16
|
var ADHOC_SERVER_HELP_ENTRIES = [
|
|
17
17
|
{ flag: "--http-url <url>", description: "Register an HTTP server for this run." },
|
|
18
18
|
{ flag: "--allow-http", description: "Permit plain http:// URLs with --http-url." },
|
|
@@ -30,7 +30,7 @@ function renderAdhocServerHelpLines(width = 23) {
|
|
|
30
30
|
return ADHOC_SERVER_HELP_ENTRIES.map((entry) => ` ${entry.flag.padEnd(width)}${entry.description}`);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
33
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/ephemeral-target.js
|
|
34
34
|
async function prepareEphemeralServerTarget(options) {
|
|
35
35
|
let target = options.target;
|
|
36
36
|
let spec = options.ephemeral ? { ...options.ephemeral } : void 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/errors.js
|
|
4
4
|
var CliUsageError = class extends Error {
|
|
5
5
|
constructor(message) {
|
|
6
6
|
super(message);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
consumeTimeoutFlag
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HDUKEFBI.js";
|
|
5
5
|
import {
|
|
6
6
|
extractEphemeralServerFlags
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NWLOPQT7.js";
|
|
8
8
|
import {
|
|
9
9
|
consumeOutputFormat
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MFFE5QSH.js";
|
|
11
11
|
|
|
12
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
12
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/list-flags.js
|
|
13
13
|
function extractListFlags(args) {
|
|
14
14
|
let schema = false;
|
|
15
15
|
let timeoutMs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/flag-utils.js
|
|
4
4
|
function extractFlags(args, keys) {
|
|
5
5
|
const flags = {};
|
|
6
6
|
let index = 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/generate/tools.js
|
|
4
4
|
function resolveSchemaType(value) {
|
|
5
5
|
if (value === "integer") {
|
|
6
6
|
return "number";
|
|
@@ -127,7 +127,8 @@ function getDescriptorDefault(descriptor) {
|
|
|
127
127
|
function buildPlaceholder(property, type, enumValues, formatSlug) {
|
|
128
128
|
const normalized = property.replace(/[A-Z]/g, (char) => `-${char.toLowerCase()}`).replace(/_/g, "-");
|
|
129
129
|
if (enumValues && enumValues.length > 0) {
|
|
130
|
-
|
|
130
|
+
const suffix = type === "array" ? ",..." : "";
|
|
131
|
+
return `<${normalized}:${enumValues.join("|")}${suffix}>`;
|
|
131
132
|
}
|
|
132
133
|
switch (type) {
|
|
133
134
|
case "number":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/output-format.js
|
|
4
4
|
function consumeOutputFormat(args, options = {}) {
|
|
5
5
|
const allowed = options.allowed ?? ["auto", "text", "markdown", "json", "raw"];
|
|
6
6
|
const defaultFormat = options.defaultFormat ?? "auto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/network-family-autoselection.js
|
|
4
4
|
import net from "node:net";
|
|
5
5
|
var NODE_DEFAULT_ATTEMPT_TIMEOUT_MS = 250;
|
|
6
6
|
var MCPORTER_ATTEMPT_TIMEOUT_MS = 1500;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
logWarn
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PPOHGQKM.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/output-utils.js
|
|
7
7
|
import fs from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { inspect } from "node:util";
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
configureAutoSelectFamilyAttemptTimeout
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MOML5C2E.js";
|
|
5
5
|
import {
|
|
6
6
|
stableJsonStringify
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-V4RYLZM5.js";
|
|
8
8
|
import {
|
|
9
9
|
createRuntime
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-47N2EELW.js";
|
|
11
11
|
import {
|
|
12
12
|
NON_INTERACTIVE_ELICITATION_HINT,
|
|
13
13
|
createNonInteractiveElicitationResponder
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RE4EVQNC.js";
|
|
15
15
|
import {
|
|
16
16
|
OAuthTimeoutError,
|
|
17
|
+
isOAuthFlowError,
|
|
17
18
|
resolveOAuthTimeoutFromEnv
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import {
|
|
20
|
-
raceWithTimeout
|
|
21
|
-
} from "./chunk-ETWN4IIA.js";
|
|
19
|
+
} from "./chunk-ZRZ7C6L3.js";
|
|
22
20
|
import {
|
|
23
21
|
DEFAULT_REQUEST_TIMEOUT_MSEC,
|
|
24
22
|
SdkErrorCode
|
|
25
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-K56RW4HB.js";
|
|
26
24
|
import {
|
|
27
25
|
launchDaemonDetached
|
|
28
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ZZSD2JT7.js";
|
|
29
27
|
import {
|
|
30
28
|
DaemonClient,
|
|
31
29
|
buildErrorResponse,
|
|
@@ -39,49 +37,63 @@ import {
|
|
|
39
37
|
normalizeConfigLayers,
|
|
40
38
|
resolveDaemonPaths,
|
|
41
39
|
shouldShutdownDaemonForIdle,
|
|
42
|
-
statConfigMtime
|
|
43
|
-
|
|
40
|
+
statConfigMtime,
|
|
41
|
+
waitForDaemonReady
|
|
42
|
+
} from "./chunk-AFKE4BTR.js";
|
|
44
43
|
import {
|
|
44
|
+
DAEMON_OAUTH_FLOW_ERROR_CODE,
|
|
45
45
|
DAEMON_OPERATION_TIMEOUT_CODE,
|
|
46
46
|
DAEMON_PROGRESS_INTERVAL_MS,
|
|
47
47
|
DAEMON_PROTOCOL_VERSION,
|
|
48
48
|
encodeDaemonFrame
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-YX2NKW6O.js";
|
|
50
|
+
import {
|
|
51
|
+
CHROME_DEVTOOLS_RELAY_RUNTIME_IDENTITY_VERSION,
|
|
52
|
+
chromeDevtoolsRelayEnvironmentKeys,
|
|
53
|
+
getChromeDevtoolsRelayDecision,
|
|
54
|
+
resolveChromeDevtoolsRelayRuntimeIdentity
|
|
55
|
+
} from "./chunk-XVJAASVZ.js";
|
|
56
|
+
import {
|
|
57
|
+
suppressBrowserLaunchFromEnv
|
|
58
|
+
} from "./chunk-6CYJ6RN3.js";
|
|
59
|
+
import {
|
|
60
|
+
raceWithTimeout
|
|
61
|
+
} from "./chunk-Q7ESBNJG.js";
|
|
50
62
|
import {
|
|
51
63
|
loadConfigSnapshot
|
|
52
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-Z7O6NF7X.js";
|
|
53
65
|
import {
|
|
54
66
|
isProcessRunning,
|
|
55
67
|
readJsonFile,
|
|
56
68
|
withFileLock,
|
|
57
69
|
writeJsonFile
|
|
58
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-ADINDBOF.js";
|
|
59
71
|
import {
|
|
60
72
|
expandHome
|
|
61
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-HBDCHBJP.js";
|
|
62
74
|
import {
|
|
63
75
|
isKeepAliveServer
|
|
64
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-RO2Y34XX.js";
|
|
65
77
|
|
|
66
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
78
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/daemon-command.js
|
|
67
79
|
import fsPromises from "node:fs/promises";
|
|
68
80
|
import path3 from "node:path";
|
|
69
81
|
|
|
70
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
82
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/daemon/host.js
|
|
71
83
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
72
84
|
import { randomUUID } from "node:crypto";
|
|
73
85
|
import fs from "node:fs/promises";
|
|
74
86
|
import net from "node:net";
|
|
75
87
|
import path2 from "node:path";
|
|
76
88
|
|
|
77
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
89
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/daemon/definition-hash.js
|
|
78
90
|
import { createHash } from "node:crypto";
|
|
79
91
|
function hashDaemonDefinitions(definitions) {
|
|
80
92
|
const sorted = definitions.toSorted((a, b) => a.name.localeCompare(b.name));
|
|
81
93
|
return createHash("sha256").update(stableJsonStringify(sorted)).digest("hex").slice(0, 16);
|
|
82
94
|
}
|
|
83
95
|
|
|
84
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
96
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/daemon/log-context.js
|
|
85
97
|
import fsSync from "node:fs";
|
|
86
98
|
import path from "node:path";
|
|
87
99
|
function createLogContext(options) {
|
|
@@ -94,9 +106,16 @@ function createLogContext(options) {
|
|
|
94
106
|
if (derivedEnabled && options.logPath) {
|
|
95
107
|
try {
|
|
96
108
|
fsSync.mkdirSync(path.dirname(options.logPath), { recursive: true });
|
|
97
|
-
|
|
109
|
+
const writer = fsSync.createWriteStream(options.logPath, {
|
|
98
110
|
flags: "a"
|
|
99
111
|
});
|
|
112
|
+
writer.on("error", (error) => {
|
|
113
|
+
console.warn(`[daemon] Log file write error (${options.logPath}): ${error.message}`);
|
|
114
|
+
if (context.writer === writer) {
|
|
115
|
+
context.writer = void 0;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
context.writer = writer;
|
|
100
119
|
} catch (error) {
|
|
101
120
|
console.warn(`[daemon] Failed to open log file ${options.logPath}: ${error.message}`);
|
|
102
121
|
}
|
|
@@ -144,7 +163,7 @@ function formatError(error) {
|
|
|
144
163
|
return "unknown";
|
|
145
164
|
}
|
|
146
165
|
|
|
147
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
166
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/daemon/host.js
|
|
148
167
|
var daemonRequestNotices = new AsyncLocalStorage();
|
|
149
168
|
async function runDaemonHost(options) {
|
|
150
169
|
configureAutoSelectFamilyAttemptTimeout();
|
|
@@ -159,6 +178,9 @@ async function runDaemonHost(options) {
|
|
|
159
178
|
const { daemonConfig, runtime } = startup;
|
|
160
179
|
const keepAliveDefinitions = runtime.getDefinitions().filter(isKeepAliveServer);
|
|
161
180
|
const definitionHash = hashDaemonDefinitions(keepAliveDefinitions);
|
|
181
|
+
const relayEnvironmentKeys = chromeDevtoolsRelayEnvironmentKeys(keepAliveDefinitions);
|
|
182
|
+
const relayRuntimeIdentity = await resolveChromeDevtoolsRelayRuntimeIdentity(relayEnvironmentKeys);
|
|
183
|
+
const oauthNoBrowser = suppressBrowserLaunchFromEnv();
|
|
162
184
|
if (keepAliveDefinitions.length === 0) {
|
|
163
185
|
throw new Error("No MCP servers require keep-alive; daemon will not start.");
|
|
164
186
|
}
|
|
@@ -250,7 +272,11 @@ async function runDaemonHost(options) {
|
|
|
250
272
|
startedAt,
|
|
251
273
|
logPath: options.logPath ?? null,
|
|
252
274
|
configMtimeMs,
|
|
253
|
-
definitionHash
|
|
275
|
+
definitionHash,
|
|
276
|
+
relayRuntimeIdentityVersion: CHROME_DEVTOOLS_RELAY_RUNTIME_IDENTITY_VERSION,
|
|
277
|
+
relayRuntimeIdentity,
|
|
278
|
+
relayEnvironmentKeys,
|
|
279
|
+
oauthNoBrowser
|
|
254
280
|
}, logContext, shutdown, parsedRequest).finally(() => {
|
|
255
281
|
activeDaemonRequests -= 1;
|
|
256
282
|
lastDaemonActivityAt = Date.now();
|
|
@@ -273,7 +299,7 @@ async function runDaemonHost(options) {
|
|
|
273
299
|
await withFileLock(`${options.metadataPath}.bind`, async () => {
|
|
274
300
|
const live = await probeLiveDaemon(options.socketPath);
|
|
275
301
|
if (live) {
|
|
276
|
-
if (daemonConfigMatches(live, configLayers, options.configPath, configMtimeMs, definitionHash)) {
|
|
302
|
+
if (daemonConfigMatches(live, configLayers, options.configPath, configMtimeMs, definitionHash, CHROME_DEVTOOLS_RELAY_RUNTIME_IDENTITY_VERSION, relayRuntimeIdentity, relayEnvironmentKeys, oauthNoBrowser)) {
|
|
277
303
|
if (!await metadataMatches(options.metadataPath, live)) {
|
|
278
304
|
await writeJsonFile(options.metadataPath, metadataFromStatus(live, configLayers));
|
|
279
305
|
}
|
|
@@ -298,7 +324,11 @@ async function runDaemonHost(options) {
|
|
|
298
324
|
startedAt: Date.now(),
|
|
299
325
|
logPath: options.logPath ?? null,
|
|
300
326
|
configMtimeMs,
|
|
301
|
-
definitionHash
|
|
327
|
+
definitionHash,
|
|
328
|
+
relayRuntimeIdentityVersion: CHROME_DEVTOOLS_RELAY_RUNTIME_IDENTITY_VERSION,
|
|
329
|
+
relayRuntimeIdentity,
|
|
330
|
+
relayEnvironmentKeys,
|
|
331
|
+
oauthNoBrowser
|
|
302
332
|
});
|
|
303
333
|
claimed = true;
|
|
304
334
|
});
|
|
@@ -351,13 +381,29 @@ function metadataFromStatus(status, fallbackConfigLayers) {
|
|
|
351
381
|
startedAt: status.startedAt,
|
|
352
382
|
logPath: status.logPath ?? null,
|
|
353
383
|
configMtimeMs: status.configMtimeMs ?? null,
|
|
354
|
-
definitionHash: status.definitionHash
|
|
384
|
+
definitionHash: status.definitionHash,
|
|
385
|
+
relayRuntimeIdentityVersion: status.relayRuntimeIdentityVersion,
|
|
386
|
+
relayRuntimeIdentity: status.relayRuntimeIdentity,
|
|
387
|
+
relayEnvironmentKeys: status.relayEnvironmentKeys,
|
|
388
|
+
oauthNoBrowser: status.oauthNoBrowser
|
|
355
389
|
};
|
|
356
390
|
}
|
|
357
|
-
function daemonConfigMatches(live, currentLayers, currentConfigPath, currentConfigMtimeMs, currentDefinitionHash) {
|
|
391
|
+
function daemonConfigMatches(live, currentLayers, currentConfigPath, currentConfigMtimeMs, currentDefinitionHash, currentRelayRuntimeIdentityVersion, currentRelayRuntimeIdentity, currentRelayEnvironmentKeys, currentOauthNoBrowser) {
|
|
358
392
|
if (live.definitionHash !== currentDefinitionHash) {
|
|
359
393
|
return false;
|
|
360
394
|
}
|
|
395
|
+
if (live.relayRuntimeIdentityVersion !== currentRelayRuntimeIdentityVersion) {
|
|
396
|
+
return false;
|
|
397
|
+
}
|
|
398
|
+
if (live.relayRuntimeIdentity !== currentRelayRuntimeIdentity) {
|
|
399
|
+
return false;
|
|
400
|
+
}
|
|
401
|
+
if (JSON.stringify(live.relayEnvironmentKeys) !== JSON.stringify(currentRelayEnvironmentKeys)) {
|
|
402
|
+
return false;
|
|
403
|
+
}
|
|
404
|
+
if ((live.oauthNoBrowser ?? false) !== currentOauthNoBrowser) {
|
|
405
|
+
return false;
|
|
406
|
+
}
|
|
361
407
|
const liveLayers = normalizeConfigLayers(live.configLayers && live.configLayers.length > 0 ? live.configLayers : [{ path: live.configPath, mtimeMs: live.configMtimeMs ?? null }]);
|
|
362
408
|
const expectedLayers = normalizeConfigLayers(currentLayers.length > 0 ? currentLayers : [{ path: currentConfigPath, mtimeMs: currentConfigMtimeMs }]);
|
|
363
409
|
if (liveLayers.length !== expectedLayers.length) {
|
|
@@ -529,6 +575,9 @@ function daemonRuntimeErrorCode(error) {
|
|
|
529
575
|
if (error instanceof OAuthTimeoutError || errorCode === SdkErrorCode.RequestTimeout || error instanceof Error && error.message === "Timeout") {
|
|
530
576
|
return DAEMON_OPERATION_TIMEOUT_CODE;
|
|
531
577
|
}
|
|
578
|
+
if (isOAuthFlowError(error)) {
|
|
579
|
+
return DAEMON_OAUTH_FLOW_ERROR_CODE;
|
|
580
|
+
}
|
|
532
581
|
return "runtime_error";
|
|
533
582
|
}
|
|
534
583
|
async function processRequestWithNotices(...args) {
|
|
@@ -706,6 +755,10 @@ async function processRequest(rawPayload, runtime, managedServers, activity, met
|
|
|
706
755
|
configLayers: metadata.configLayers,
|
|
707
756
|
configMtimeMs: metadata.configMtimeMs,
|
|
708
757
|
definitionHash: metadata.definitionHash,
|
|
758
|
+
relayRuntimeIdentityVersion: metadata.relayRuntimeIdentityVersion,
|
|
759
|
+
relayRuntimeIdentity: metadata.relayRuntimeIdentity,
|
|
760
|
+
relayEnvironmentKeys: metadata.relayEnvironmentKeys,
|
|
761
|
+
oauthNoBrowser: metadata.oauthNoBrowser,
|
|
709
762
|
socketPath: metadata.socketPath,
|
|
710
763
|
logPath: metadata.logPath ?? void 0,
|
|
711
764
|
servers: Array.from(managedServers.values()).map((def) => {
|
|
@@ -713,7 +766,8 @@ async function processRequest(rawPayload, runtime, managedServers, activity, met
|
|
|
713
766
|
return {
|
|
714
767
|
name: def.name,
|
|
715
768
|
connected: Boolean(entry?.connected),
|
|
716
|
-
lastUsedAt: entry?.lastUsedAt
|
|
769
|
+
lastUsedAt: entry?.lastUsedAt,
|
|
770
|
+
chromeDevtoolsRelay: getChromeDevtoolsRelayDecision(def.name)
|
|
717
771
|
};
|
|
718
772
|
})
|
|
719
773
|
};
|
|
@@ -746,7 +800,7 @@ function resolveDaemonListToolsAutoAuthorize(params, definition) {
|
|
|
746
800
|
return params.autoAuthorize;
|
|
747
801
|
}
|
|
748
802
|
|
|
749
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
803
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/daemon-command.js
|
|
750
804
|
async function handleDaemonCli(args, options) {
|
|
751
805
|
const subcommand = args.shift();
|
|
752
806
|
if (!subcommand || subcommand === "help" || subcommand === "--help") {
|
|
@@ -845,10 +899,7 @@ async function handleDaemonStart(args, options, client) {
|
|
|
845
899
|
socketPath,
|
|
846
900
|
extraArgs: forwardedArgs
|
|
847
901
|
});
|
|
848
|
-
|
|
849
|
-
if (!ready) {
|
|
850
|
-
throw new Error("Failed to start daemon before timeout expired.");
|
|
851
|
-
}
|
|
902
|
+
await waitForDaemonReady((timeoutMs) => client.status(timeoutMs));
|
|
852
903
|
console.log(`Daemon started for ${keepAlive.length} server(s).`);
|
|
853
904
|
}
|
|
854
905
|
async function handleDaemonRestart(args, options, client) {
|
|
@@ -881,6 +932,12 @@ async function handleDaemonStatus(client) {
|
|
|
881
932
|
const state = server.connected ? "connected" : "idle";
|
|
882
933
|
const lastUsed = server.lastUsedAt ? ` (last used ${new Date(server.lastUsedAt).toISOString()})` : "";
|
|
883
934
|
console.log(`- ${server.name}: ${state}${lastUsed}`);
|
|
935
|
+
if (server.chromeDevtoolsRelay) {
|
|
936
|
+
const relay = server.chromeDevtoolsRelay;
|
|
937
|
+
const endpoint = relay.endpoint ? ` endpoint=${relay.endpoint}` : "";
|
|
938
|
+
const probe = relay.probeDurationMs === void 0 ? "" : ` probe=${relay.probeStatus ?? "no-status"}/${relay.probeDurationMs}ms`;
|
|
939
|
+
console.log(` chrome relay: route=${relay.route} policy=${relay.policy} reason=${relay.reason}${endpoint}${probe}`);
|
|
940
|
+
}
|
|
884
941
|
});
|
|
885
942
|
}
|
|
886
943
|
function consumeFlag(args, flag) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/ephemeral-flags.js
|
|
4
4
|
function extractEphemeralServerFlags(args, options = {}) {
|
|
5
5
|
let spec;
|
|
6
6
|
const ensureSpec = () => {
|