@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,20 +1,20 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
__configInternals
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Z7O6NF7X.js";
|
|
5
5
|
import {
|
|
6
6
|
withFileLock,
|
|
7
7
|
writeTextFileAtomic
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ADINDBOF.js";
|
|
9
9
|
import {
|
|
10
10
|
expandHome
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HBDCHBJP.js";
|
|
12
12
|
import {
|
|
13
13
|
canonicalKeepAliveName,
|
|
14
14
|
resolveLifecycle
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RO2Y34XX.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
17
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/adhoc-server.js
|
|
18
18
|
import fs from "node:fs/promises";
|
|
19
19
|
import path from "node:path";
|
|
20
20
|
var TEMP_SOURCE = { kind: "local", path: "<adhoc>" };
|
|
@@ -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/sdk-stdio-logging.js
|
|
4
4
|
var STDIO_LOGS_FORCED = process.env.MCPORTER_STDIO_LOGS === "1";
|
|
5
5
|
var STDIO_TRACE_ENABLED = process.env.MCPORTER_STDIO_TRACE === "1";
|
|
6
6
|
var stdioLogMode = STDIO_LOGS_FORCED ? "always" : "auto";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/oauth-browser-suppression.js
|
|
4
|
+
var TRUE_VALUES = /* @__PURE__ */ new Set(["1", "true", "yes"]);
|
|
5
|
+
function suppressBrowserLaunchFromEnv(env = process.env) {
|
|
6
|
+
const raw = env.MCPORTER_OAUTH_NO_BROWSER;
|
|
7
|
+
return raw !== void 0 && TRUE_VALUES.has(raw.trim().toLowerCase());
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
suppressBrowserLaunchFromEnv
|
|
12
|
+
};
|
|
@@ -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/terminal.js
|
|
4
4
|
var forceColorRaw = process.env.FORCE_COLOR?.toLowerCase();
|
|
5
5
|
var forceDisableColor = forceColorRaw === "0" || forceColorRaw === "false";
|
|
6
6
|
var forceEnableColor = forceColorRaw === "1" || forceColorRaw === "true" || forceColorRaw === "2" || forceColorRaw === "3";
|
|
@@ -2,15 +2,15 @@ import { createRequire as __createRequire } from "node:module"; const require =
|
|
|
2
2
|
import {
|
|
3
3
|
buildFallbackLiteral,
|
|
4
4
|
pickExampleLiteral
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LJCZWKGJ.js";
|
|
6
6
|
import {
|
|
7
7
|
cyanText,
|
|
8
8
|
dimText,
|
|
9
9
|
extraDimText,
|
|
10
10
|
yellowText
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6DL2C6V5.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
13
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/list-signature.js
|
|
14
14
|
function formatFunctionSignature(name, options, outputSchema, formatOptions) {
|
|
15
15
|
const colorize = formatOptions?.colorize !== false;
|
|
16
16
|
const keyword = colorize ? extraDimText("function") : "function";
|
|
@@ -136,7 +136,8 @@ function inferSchemaDisplayType(descriptor) {
|
|
|
136
136
|
function formatTypeAnnotation(option, colorize) {
|
|
137
137
|
let baseType;
|
|
138
138
|
if (option.enumValues && option.enumValues.length > 0) {
|
|
139
|
-
|
|
139
|
+
const union = option.enumValues.map((value) => JSON.stringify(value)).join(" | ");
|
|
140
|
+
baseType = option.type === "array" ? formatEnumArrayType(union, option.enumValues.length) : union;
|
|
140
141
|
} else {
|
|
141
142
|
switch (option.type) {
|
|
142
143
|
case "number":
|
|
@@ -174,6 +175,9 @@ function formatTypeAnnotation(option, colorize) {
|
|
|
174
175
|
}
|
|
175
176
|
return base;
|
|
176
177
|
}
|
|
178
|
+
function formatEnumArrayType(union, memberCount) {
|
|
179
|
+
return memberCount > 1 ? `(${union})[]` : `${union}[]`;
|
|
180
|
+
}
|
|
177
181
|
function formatArrayItemType(type) {
|
|
178
182
|
switch (type) {
|
|
179
183
|
case "string":
|
|
@@ -189,7 +193,7 @@ function formatArrayItemType(type) {
|
|
|
189
193
|
}
|
|
190
194
|
}
|
|
191
195
|
|
|
192
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
196
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/list-doc-comments.js
|
|
193
197
|
var DEFAULT_WRAP_WIDTH = 100;
|
|
194
198
|
function buildDocComment(description, options, opts) {
|
|
195
199
|
const colorize = opts?.colorize !== false;
|
|
@@ -300,7 +304,7 @@ function wrapCommentText(text, width = DEFAULT_WRAP_WIDTH) {
|
|
|
300
304
|
return lines;
|
|
301
305
|
}
|
|
302
306
|
|
|
303
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
307
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/list-detail-helpers.js
|
|
304
308
|
var DEFAULT_MIN_VISIBLE_PARAMS = 5;
|
|
305
309
|
function selectDisplayOptions(options, requiredOnly, minVisible = DEFAULT_MIN_VISIBLE_PARAMS) {
|
|
306
310
|
if (!requiredOnly || options.length <= minVisible) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
buildToolMetadataList
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LJCZWKGJ.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/tool-cache.js
|
|
7
7
|
var runtimeCache = /* @__PURE__ */ new WeakMap();
|
|
8
8
|
function cacheKey(serverName, options) {
|
|
9
9
|
const includeSchema = options.includeSchema !== false;
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
readJsonFile,
|
|
4
4
|
withFileLock,
|
|
5
5
|
writeJsonFile
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ADINDBOF.js";
|
|
7
7
|
import {
|
|
8
8
|
mcporterDir
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TGJOZDKG.js";
|
|
10
10
|
|
|
11
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
11
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/oauth-vault.js
|
|
12
12
|
import crypto from "node:crypto";
|
|
13
13
|
import path from "node:path";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
15
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/oauth-credential-validation.js
|
|
16
16
|
function isRecord(value) {
|
|
17
17
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
18
18
|
}
|
|
@@ -33,7 +33,7 @@ function isStoredOAuthClientInformation(value) {
|
|
|
33
33
|
return isOptionalString(value, "issuer");
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
36
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/oauth-token-generation.js
|
|
37
37
|
import { randomUUID } from "node:crypto";
|
|
38
38
|
import { isDeepStrictEqual } from "node:util";
|
|
39
39
|
var TOKEN_GENERATION_FIELD = "__mcporter_generation";
|
|
@@ -113,7 +113,7 @@ function sameOAuthClientValue(left, right) {
|
|
|
113
113
|
return isDeepStrictEqual(withoutClientGeneration(left), withoutClientGeneration(right));
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
116
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/oauth-vault.js
|
|
117
117
|
function getOAuthVaultPath() {
|
|
118
118
|
return path.join(mcporterDir("data"), "credentials.json");
|
|
119
119
|
}
|
|
@@ -187,6 +187,14 @@ function stringRecord(value) {
|
|
|
187
187
|
}
|
|
188
188
|
return Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === "string"));
|
|
189
189
|
}
|
|
190
|
+
async function vaultCredentialKeys(definition) {
|
|
191
|
+
const key = vaultKeyForDefinition(definition);
|
|
192
|
+
if (definition.command.kind !== "http") {
|
|
193
|
+
return [key];
|
|
194
|
+
}
|
|
195
|
+
const vault = await readVault();
|
|
196
|
+
return [.../* @__PURE__ */ new Set([key, ...legacyOAuthRenameKeys(vault, definition, key)])];
|
|
197
|
+
}
|
|
190
198
|
async function loadVaultEntryForRecovery(definition) {
|
|
191
199
|
const vault = await readVault();
|
|
192
200
|
const key = vaultKeyForDefinition(definition);
|
|
@@ -415,6 +423,7 @@ export {
|
|
|
415
423
|
sameOAuthClientValue,
|
|
416
424
|
getOAuthVaultPath,
|
|
417
425
|
reconcileVaultServerUrl,
|
|
426
|
+
vaultCredentialKeys,
|
|
418
427
|
loadVaultEntryForRecovery,
|
|
419
428
|
saveVaultEntry,
|
|
420
429
|
clearVaultTokensIfMatching,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
normalizeHttpUrl
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SCGMRUKI.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/server-lookup.js
|
|
7
7
|
function findServerByHttpUrl(definitions, urlString) {
|
|
8
8
|
const normalizedTarget = normalizeHttpUrl(urlString);
|
|
9
9
|
if (!normalizedTarget) {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
CliUsageError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KPXFBRTG.js";
|
|
5
5
|
import {
|
|
6
6
|
consumeTimeoutFlag
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HDUKEFBI.js";
|
|
8
8
|
import {
|
|
9
9
|
extractEphemeralServerFlags
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NWLOPQT7.js";
|
|
11
11
|
import {
|
|
12
12
|
splitHttpToolSelector
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SCGMRUKI.js";
|
|
14
14
|
import {
|
|
15
15
|
consumeOutputFormat
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MFFE5QSH.js";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
18
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/call-arguments.js
|
|
19
19
|
import fs from "node:fs";
|
|
20
20
|
|
|
21
21
|
// node_modules/.pnpm/acorn@8.18.0/node_modules/acorn/dist/acorn.mjs
|
|
@@ -5715,7 +5715,7 @@ function parseExpressionAt2(input, pos, options) {
|
|
|
5715
5715
|
return Parser.parseExpressionAt(input, pos, options);
|
|
5716
5716
|
}
|
|
5717
5717
|
|
|
5718
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
5718
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/call-expression-parser.js
|
|
5719
5719
|
var ACORN_OPTIONS = {
|
|
5720
5720
|
ecmaVersion: "latest",
|
|
5721
5721
|
sourceType: "module"
|
|
@@ -5885,7 +5885,7 @@ function isSupportedValue(node) {
|
|
|
5885
5885
|
return type === "Literal" || type === "ArrayExpression" || type === "ObjectExpression" || type === "UnaryExpression";
|
|
5886
5886
|
}
|
|
5887
5887
|
|
|
5888
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
5888
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/call-argument-expression.js
|
|
5889
5889
|
function parseLeadingCallExpression(rawToken) {
|
|
5890
5890
|
try {
|
|
5891
5891
|
return extractHttpCallExpression(rawToken) ?? parseCallExpressionFragment(rawToken);
|
|
@@ -5935,7 +5935,7 @@ function buildCallExpressionUsageError(error) {
|
|
|
5935
5935
|
return new CliUsageError(lines.join("\n"));
|
|
5936
5936
|
}
|
|
5937
5937
|
|
|
5938
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
5938
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/call-argument-values.js
|
|
5939
5939
|
function parseKeyValueToken(token, nextToken) {
|
|
5940
5940
|
const eqIndex = token.indexOf("=");
|
|
5941
5941
|
if (eqIndex !== -1) {
|
|
@@ -6019,12 +6019,12 @@ function warnMissingNamedArgumentValue(key) {
|
|
|
6019
6019
|
console.warn(lines.join(" "));
|
|
6020
6020
|
}
|
|
6021
6021
|
|
|
6022
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
6022
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/call-help.js
|
|
6023
6023
|
var CALL_HELP_ARGUMENT_LINES = [
|
|
6024
6024
|
" key=value / key:value Flag-style named arguments.",
|
|
6025
6025
|
" key=@path Read a UTF-8 string value from a file; use @@ for a literal @.",
|
|
6026
6026
|
` function-call syntax 'server.tool(arg: "value", other: 1)'.`,
|
|
6027
|
-
" --args <json>
|
|
6027
|
+
" --args, --params <json> Provide a JSON object payload.",
|
|
6028
6028
|
" positional values Accepted when schema order is known.",
|
|
6029
6029
|
" -- Treat remaining tokens as literal positional values."
|
|
6030
6030
|
];
|
|
@@ -6045,7 +6045,7 @@ var CALL_HELP_EXAMPLE_LINES = [
|
|
|
6045
6045
|
' mcporter call --stdio "bun run ./server.ts" scrape url=https://example.com'
|
|
6046
6046
|
];
|
|
6047
6047
|
function buildUnknownCallFlagMessage(token) {
|
|
6048
|
-
const argumentName = token.startsWith("--") ? token.slice(2) : token;
|
|
6048
|
+
const argumentName = (token.startsWith("--") ? token.slice(2) : token).split("=", 1)[0];
|
|
6049
6049
|
return [
|
|
6050
6050
|
`Unknown flag '${token}' passed to call command.`,
|
|
6051
6051
|
`If you intended to pass a tool argument, use '${argumentName}=<value>' or --args '{"${argumentName}": ...}'.`,
|
|
@@ -6053,8 +6053,16 @@ function buildUnknownCallFlagMessage(token) {
|
|
|
6053
6053
|
"Run 'mcporter call --help' to see available flags."
|
|
6054
6054
|
].join("\n");
|
|
6055
6055
|
}
|
|
6056
|
+
function buildUnvalidatedCallFlagMessage(token, server, tool) {
|
|
6057
|
+
const argumentName = (token.startsWith("--") ? token.slice(2) : token).split("=", 1)[0];
|
|
6058
|
+
return [
|
|
6059
|
+
`Unable to validate flag '${token}' because ${server}.${tool} did not provide usable tool metadata with an input schema.`,
|
|
6060
|
+
`Use '${argumentName}=<value>' or --args '{"${argumentName}": ...}' to pass this argument without long-flag validation.`,
|
|
6061
|
+
"Run 'mcporter call --help' to see available flags."
|
|
6062
|
+
].join("\n");
|
|
6063
|
+
}
|
|
6056
6064
|
|
|
6057
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
6065
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/call-arguments.js
|
|
6058
6066
|
var FLAG_HANDLERS = {
|
|
6059
6067
|
"--server": handleServerFlag,
|
|
6060
6068
|
"--mcp": handleServerFlag,
|
|
@@ -6067,6 +6075,7 @@ var FLAG_HANDLERS = {
|
|
|
6067
6075
|
"--raw-strings": handleRawStringsFlag,
|
|
6068
6076
|
"--no-coerce": handleNoCoerceFlag,
|
|
6069
6077
|
"--args": handleArgsFlag,
|
|
6078
|
+
"--params": handleParamsFlag,
|
|
6070
6079
|
"--json": handleJsonArgsFlag
|
|
6071
6080
|
};
|
|
6072
6081
|
function parseCallArguments(args) {
|
|
@@ -6247,6 +6256,9 @@ function handleNoCoerceFlag(context) {
|
|
|
6247
6256
|
function handleArgsFlag(context) {
|
|
6248
6257
|
return consumeJsonArgsFlag(context, "--args", "--args requires a JSON value.");
|
|
6249
6258
|
}
|
|
6259
|
+
function handleParamsFlag(context) {
|
|
6260
|
+
return consumeJsonArgsFlag(context, "--params", "--params requires a JSON value.");
|
|
6261
|
+
}
|
|
6250
6262
|
function handleJsonArgsFlag(context) {
|
|
6251
6263
|
return consumeJsonArgsFlag(context, "--json", "--json requires a JSON object value.");
|
|
6252
6264
|
}
|
|
@@ -6283,6 +6295,8 @@ function handleNamedArgumentFlag(context) {
|
|
|
6283
6295
|
context.result.schemaArrayCoercionCandidates ??= {};
|
|
6284
6296
|
context.result.schemaArrayCoercionCandidates[key] = schemaValue;
|
|
6285
6297
|
}
|
|
6298
|
+
context.result.genericLongFlagArguments ??= [];
|
|
6299
|
+
context.result.genericLongFlagArguments.push({ key, token });
|
|
6286
6300
|
context.result.args[key] = value;
|
|
6287
6301
|
return context.index + (eqIndex === -1 ? 2 : 1);
|
|
6288
6302
|
}
|
|
@@ -6333,5 +6347,7 @@ export {
|
|
|
6333
6347
|
CALL_HELP_ARGUMENT_LINES,
|
|
6334
6348
|
CALL_HELP_RUNTIME_FLAG_LINES,
|
|
6335
6349
|
CALL_HELP_EXAMPLE_LINES,
|
|
6350
|
+
buildUnknownCallFlagMessage,
|
|
6351
|
+
buildUnvalidatedCallFlagMessage,
|
|
6336
6352
|
parseCallArguments
|
|
6337
6353
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
analyzeConnectionError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-US57PK4B.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/result-utils.js
|
|
7
7
|
function extractEnvelope(raw) {
|
|
8
8
|
return collectEnvelopeFields(raw, { content: null, structuredContent: null }, 0);
|
|
9
9
|
}
|
|
@@ -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/process-utils.js
|
|
4
4
|
function isProcessRunning(pid) {
|
|
5
5
|
if (!Number.isInteger(pid) || pid <= 0) {
|
|
6
6
|
return false;
|
|
@@ -13,7 +13,7 @@ function isProcessRunning(pid) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
16
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/fs-json.js
|
|
17
17
|
import crypto from "node:crypto";
|
|
18
18
|
import { constants } from "node:fs";
|
|
19
19
|
import fs from "node:fs/promises";
|
|
@@ -24,6 +24,17 @@ var MALFORMED_LOCK_STALE_MS = 1e3;
|
|
|
24
24
|
var MAX_SYMLINK_DEPTH = 40;
|
|
25
25
|
var DEFAULT_ATOMIC_FILE_MODE = 384;
|
|
26
26
|
var localLockTails = /* @__PURE__ */ new Map();
|
|
27
|
+
var FileLockTimeoutError = class extends Error {
|
|
28
|
+
lockPath;
|
|
29
|
+
constructor(lockPath, options) {
|
|
30
|
+
super(`Timed out waiting for file lock ${lockPath}`, options);
|
|
31
|
+
this.name = "FileLockTimeoutError";
|
|
32
|
+
this.lockPath = lockPath;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
function isFileLockTimeoutError(error) {
|
|
36
|
+
return error instanceof FileLockTimeoutError;
|
|
37
|
+
}
|
|
27
38
|
async function readJsonFile(filePath) {
|
|
28
39
|
try {
|
|
29
40
|
const content = await fs.readFile(filePath, "utf8");
|
|
@@ -97,7 +108,7 @@ ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
|
97
108
|
continue;
|
|
98
109
|
}
|
|
99
110
|
if (Date.now() - startedAt > timeoutMs) {
|
|
100
|
-
throw new
|
|
111
|
+
throw new FileLockTimeoutError(lockPath, { cause: error });
|
|
101
112
|
}
|
|
102
113
|
await sleep(LOCK_POLL_MS);
|
|
103
114
|
}
|
|
@@ -146,7 +157,7 @@ async function waitForLocalLock(previous, timeoutMs, key) {
|
|
|
146
157
|
await Promise.race([
|
|
147
158
|
previous,
|
|
148
159
|
new Promise((_, reject) => {
|
|
149
|
-
timer = setTimeout(() => reject(new
|
|
160
|
+
timer = setTimeout(() => reject(new FileLockTimeoutError(`${key}.lock`)), Math.max(0, timeoutMs));
|
|
150
161
|
})
|
|
151
162
|
]);
|
|
152
163
|
} finally {
|
|
@@ -170,6 +181,9 @@ async function resolveAtomicWriteTarget(filePath) {
|
|
|
170
181
|
throw error;
|
|
171
182
|
}
|
|
172
183
|
}
|
|
184
|
+
async function canonicalizeFilePath(filePath) {
|
|
185
|
+
return await resolvePathFollowingSymlinks(path.resolve(filePath));
|
|
186
|
+
}
|
|
173
187
|
async function resolvePathFollowingSymlinks(filePath) {
|
|
174
188
|
let currentPath = await canonicalizeParentDirectory(filePath);
|
|
175
189
|
for (let depth = 0; depth < MAX_SYMLINK_DEPTH; depth += 1) {
|
|
@@ -271,8 +285,10 @@ async function isMalformedLockStale(lockPath) {
|
|
|
271
285
|
|
|
272
286
|
export {
|
|
273
287
|
isProcessRunning,
|
|
288
|
+
isFileLockTimeoutError,
|
|
274
289
|
readJsonFile,
|
|
275
290
|
writeTextFileAtomic,
|
|
276
291
|
writeJsonFile,
|
|
277
|
-
withFileLock
|
|
292
|
+
withFileLock,
|
|
293
|
+
canonicalizeFilePath
|
|
278
294
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
isUnauthorizedError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZKFG37TB.js";
|
|
5
5
|
import {
|
|
6
6
|
ProtocolErrorCode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-K56RW4HB.js";
|
|
8
8
|
import {
|
|
9
|
+
DAEMON_OAUTH_FLOW_ERROR_CODE,
|
|
9
10
|
DAEMON_OPERATION_TIMEOUT_CODE
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YX2NKW6O.js";
|
|
11
12
|
import {
|
|
12
13
|
isKeepAliveServer
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RO2Y34XX.js";
|
|
14
15
|
|
|
15
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
16
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/daemon/runtime-wrapper.js
|
|
16
17
|
function createKeepAliveRuntime(base, options) {
|
|
17
18
|
if (!options.daemonClient || options.keepAliveServers.size === 0) {
|
|
18
19
|
return base;
|
|
@@ -152,8 +153,11 @@ function shouldRestartDaemonServer(error) {
|
|
|
152
153
|
if (!error) {
|
|
153
154
|
return false;
|
|
154
155
|
}
|
|
155
|
-
if (typeof error === "object"
|
|
156
|
-
|
|
156
|
+
if (typeof error === "object") {
|
|
157
|
+
const code2 = error.code;
|
|
158
|
+
if (code2 === DAEMON_OPERATION_TIMEOUT_CODE || code2 === DAEMON_OAUTH_FLOW_ERROR_CODE) {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
157
161
|
}
|
|
158
162
|
if (isUnauthorizedError(error)) {
|
|
159
163
|
return false;
|
|
@@ -4,31 +4,38 @@ import {
|
|
|
4
4
|
DaemonFrameDecoder,
|
|
5
5
|
isDaemonProgressFrame,
|
|
6
6
|
resolveProgressInterval
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YX2NKW6O.js";
|
|
8
|
+
import {
|
|
9
|
+
CHROME_DEVTOOLS_RELAY_RUNTIME_IDENTITY_VERSION,
|
|
10
|
+
resolveChromeDevtoolsRelayRuntimeIdentity
|
|
11
|
+
} from "./chunk-XVJAASVZ.js";
|
|
12
|
+
import {
|
|
13
|
+
suppressBrowserLaunchFromEnv
|
|
14
|
+
} from "./chunk-6CYJ6RN3.js";
|
|
8
15
|
import {
|
|
9
16
|
listConfigLayerPaths
|
|
10
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Z7O6NF7X.js";
|
|
11
18
|
import {
|
|
12
19
|
isProcessRunning,
|
|
13
20
|
withFileLock
|
|
14
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ADINDBOF.js";
|
|
15
22
|
import {
|
|
16
23
|
mcporterDir
|
|
17
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-TGJOZDKG.js";
|
|
18
25
|
import {
|
|
19
26
|
expandHome
|
|
20
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-HBDCHBJP.js";
|
|
21
28
|
import {
|
|
22
29
|
keepAliveIdleTimeout
|
|
23
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-RO2Y34XX.js";
|
|
24
31
|
|
|
25
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
32
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/daemon/client.js
|
|
26
33
|
import crypto, { randomUUID } from "node:crypto";
|
|
27
34
|
import fs2 from "node:fs/promises";
|
|
28
35
|
import net from "node:net";
|
|
29
36
|
import path3 from "node:path";
|
|
30
37
|
|
|
31
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
38
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/daemon/config-layers.js
|
|
32
39
|
import fs from "node:fs/promises";
|
|
33
40
|
import path from "node:path";
|
|
34
41
|
async function statConfigMtime(configPath) {
|
|
@@ -59,7 +66,7 @@ function normalizeConfigLayers(layers) {
|
|
|
59
66
|
return normalized.toSorted((a, b) => a.path < b.path ? -1 : a.path > b.path ? 1 : 0);
|
|
60
67
|
}
|
|
61
68
|
|
|
62
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
69
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/daemon/paths.js
|
|
63
70
|
import path2 from "node:path";
|
|
64
71
|
function resolveBaseDir() {
|
|
65
72
|
const override = process.env.MCPORTER_DAEMON_DIR;
|
|
@@ -85,7 +92,7 @@ function getDaemonLogPath(configKey) {
|
|
|
85
92
|
return path2.join(ensureRunDir(), `daemon-${configKey}.log`);
|
|
86
93
|
}
|
|
87
94
|
|
|
88
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
95
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/daemon/request-utils.js
|
|
89
96
|
function delay(ms) {
|
|
90
97
|
return new Promise((resolve) => {
|
|
91
98
|
setTimeout(resolve, ms);
|
|
@@ -150,7 +157,50 @@ function buildErrorResponse(id, code, error) {
|
|
|
150
157
|
};
|
|
151
158
|
}
|
|
152
159
|
|
|
153
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
160
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/daemon/startup-readiness.js
|
|
161
|
+
var DAEMON_STARTUP_TIMEOUT_MS = 45e3;
|
|
162
|
+
var DAEMON_STARTUP_SLOW_NOTICE_MS = 5e3;
|
|
163
|
+
var DAEMON_STARTUP_POLL_INTERVAL_MS = 100;
|
|
164
|
+
async function waitForDaemonReady(probe, timing = {}) {
|
|
165
|
+
const now = timing.now ?? Date.now;
|
|
166
|
+
const wait = timing.delay ?? delay2;
|
|
167
|
+
const reportSlowStart = timing.reportSlowStart ?? defaultSlowStartReporter;
|
|
168
|
+
const startedAt = now();
|
|
169
|
+
const deadline = startedAt + DAEMON_STARTUP_TIMEOUT_MS;
|
|
170
|
+
let reportedSlowStart = false;
|
|
171
|
+
while (true) {
|
|
172
|
+
const remainingBeforeProbe = deadline - now();
|
|
173
|
+
if (remainingBeforeProbe <= 0) {
|
|
174
|
+
throw daemonStartupTimeoutError();
|
|
175
|
+
}
|
|
176
|
+
const result = await probe(Math.min(DAEMON_STARTUP_POLL_INTERVAL_MS, remainingBeforeProbe));
|
|
177
|
+
if (result !== null) {
|
|
178
|
+
return result;
|
|
179
|
+
}
|
|
180
|
+
const currentTime = now();
|
|
181
|
+
if (currentTime >= deadline) {
|
|
182
|
+
throw daemonStartupTimeoutError();
|
|
183
|
+
}
|
|
184
|
+
if (!reportedSlowStart && currentTime - startedAt >= DAEMON_STARTUP_SLOW_NOTICE_MS) {
|
|
185
|
+
reportedSlowStart = true;
|
|
186
|
+
reportSlowStart();
|
|
187
|
+
}
|
|
188
|
+
await wait(Math.min(DAEMON_STARTUP_POLL_INTERVAL_MS, deadline - currentTime));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
function defaultSlowStartReporter() {
|
|
192
|
+
console.error("[mcporter] Daemon startup is taking longer than usual; Chrome relay discovery can take up to 30 seconds.");
|
|
193
|
+
}
|
|
194
|
+
function daemonStartupTimeoutError() {
|
|
195
|
+
return new Error("MCPorter daemon did not become ready within 45 seconds. Run 'mcporter daemon start --foreground --log' to diagnose startup.");
|
|
196
|
+
}
|
|
197
|
+
function delay2(ms) {
|
|
198
|
+
return new Promise((resolve) => {
|
|
199
|
+
setTimeout(resolve, ms);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/daemon/client.js
|
|
154
204
|
var DEFAULT_DAEMON_TIMEOUT_MS = 3e4;
|
|
155
205
|
var MIN_DAEMON_STATUS_TIMEOUT_MS = 1e3;
|
|
156
206
|
function resolveDaemonPaths(configPath) {
|
|
@@ -187,8 +237,8 @@ var DaemonClient = class {
|
|
|
187
237
|
async closeServer(params) {
|
|
188
238
|
await this.invoke("closeServer", params);
|
|
189
239
|
}
|
|
190
|
-
async status() {
|
|
191
|
-
return await this.readVerifiedStatus();
|
|
240
|
+
async status(timeoutMs) {
|
|
241
|
+
return await this.readVerifiedStatus(timeoutMs);
|
|
192
242
|
}
|
|
193
243
|
async stop() {
|
|
194
244
|
try {
|
|
@@ -263,7 +313,7 @@ var DaemonClient = class {
|
|
|
263
313
|
await this.startingPromise;
|
|
264
314
|
}
|
|
265
315
|
async launchDaemonAndWait() {
|
|
266
|
-
const { launchDaemonDetached } = await import("./launch-
|
|
316
|
+
const { launchDaemonDetached } = await import("./launch-E2LWGPZS.js");
|
|
267
317
|
launchDaemonDetached({
|
|
268
318
|
configPath: this.options.configPath,
|
|
269
319
|
configExplicit: this.options.configExplicit,
|
|
@@ -284,14 +334,7 @@ var DaemonClient = class {
|
|
|
284
334
|
throw new Error("Daemon did not stop before restart could begin.");
|
|
285
335
|
}
|
|
286
336
|
async waitForReady() {
|
|
287
|
-
|
|
288
|
-
while (Date.now() < deadline) {
|
|
289
|
-
if (await this.isResponsive()) {
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
await delay(100);
|
|
293
|
-
}
|
|
294
|
-
throw new Error("Timeout while waiting for MCPorter daemon to start.");
|
|
337
|
+
await waitForDaemonReady((timeoutMs) => this.readVerifiedStatus(timeoutMs));
|
|
295
338
|
}
|
|
296
339
|
async isResponsive(timeoutMs) {
|
|
297
340
|
return await this.readVerifiedStatus(timeoutMs) !== null;
|
|
@@ -334,6 +377,12 @@ var DaemonClient = class {
|
|
|
334
377
|
return "stale";
|
|
335
378
|
}
|
|
336
379
|
}
|
|
380
|
+
if (metadata.relayRuntimeIdentityVersion !== CHROME_DEVTOOLS_RELAY_RUNTIME_IDENTITY_VERSION || !metadata.relayEnvironmentKeys || metadata.relayRuntimeIdentity !== await resolveChromeDevtoolsRelayRuntimeIdentity(metadata.relayEnvironmentKeys, process.env, this.options.chromeDevtoolsRelayIdentity)) {
|
|
381
|
+
return "stale";
|
|
382
|
+
}
|
|
383
|
+
if ((metadata.oauthNoBrowser ?? false) !== suppressBrowserLaunchFromEnv()) {
|
|
384
|
+
return "stale";
|
|
385
|
+
}
|
|
337
386
|
return "fresh";
|
|
338
387
|
}
|
|
339
388
|
async sendRequest(method, params, timeoutOverrideMs) {
|
|
@@ -471,6 +520,7 @@ export {
|
|
|
471
520
|
shouldShutdownDaemonForIdle,
|
|
472
521
|
daemonIdleWatcherInterval,
|
|
473
522
|
buildErrorResponse,
|
|
523
|
+
waitForDaemonReady,
|
|
474
524
|
resolveDaemonPaths,
|
|
475
525
|
DaemonClient
|
|
476
526
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
buildRecordCommandEnv
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HHMWZ2FZ.js";
|
|
5
5
|
import {
|
|
6
6
|
PRIVATE_RECORDING_FILE_MODE,
|
|
7
7
|
ensurePrivateRecordingDir,
|
|
8
8
|
resolveRecordingConfigPath,
|
|
9
9
|
resolveRecordingPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PRZCYXVO.js";
|
|
11
11
|
|
|
12
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
12
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/record-replay-command.js
|
|
13
13
|
import { spawn } from "node:child_process";
|
|
14
14
|
import fs from "node:fs/promises";
|
|
15
15
|
async function writeRecordReplayConfig(parsed, mode) {
|
|
@@ -63,7 +63,7 @@ function buildRecordReplayInstructionEnv(mode, sessionName, server) {
|
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
// node_modules/.pnpm/mcporter@0.13.
|
|
66
|
+
// node_modules/.pnpm/mcporter@0.13.7/node_modules/mcporter/dist/cli/record-command.js
|
|
67
67
|
async function handleRecordCli(args) {
|
|
68
68
|
const parsed = parseRecordArgs(args);
|
|
69
69
|
const recordPath = resolveRecordingPath(parsed.sessionName);
|