@introspection-ai/recipes 0.18.0 → 0.19.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/inspect.d.ts +1 -0
- package/dist/inspect.d.ts.map +1 -1
- package/dist/inspect.js +3 -0
- package/dist/inspect.js.map +1 -1
- package/dist/mcp-chunks/{auth-command-ZLGYIEUY.js → auth-command-3K7V3VCW.js} +31 -35
- package/dist/mcp-chunks/call-arguments-TX3F2TEE.js +15 -0
- package/dist/mcp-chunks/{call-command-LKTKSYTH.js → call-command-OFPHPFM5.js} +36 -34
- package/dist/mcp-chunks/chunk-2FSDGCHW.js +3299 -0
- package/dist/mcp-chunks/{chunk-BV56DXPW.js → chunk-2JHHONW4.js} +1 -1
- package/dist/mcp-chunks/chunk-2MEHGB7D.js +63 -0
- package/dist/mcp-chunks/chunk-3IZQW4H4.js +929 -0
- package/dist/mcp-chunks/{chunk-MZ2NARG7.js → chunk-54EWGONA.js} +5 -5
- package/dist/mcp-chunks/{chunk-LQQEYD76.js → chunk-55JIHDU3.js} +1 -1
- package/dist/mcp-chunks/chunk-64EP2BVO.js +39 -0
- package/dist/mcp-chunks/{chunk-LS7PMWSR.js → chunk-6D6KPSXN.js} +1 -1
- package/dist/mcp-chunks/{chunk-2XL7MG7R.js → chunk-7A63PAGP.js} +15 -9
- package/dist/mcp-chunks/chunk-7DH57OKF.js +28 -0
- package/dist/mcp-chunks/{chunk-BTLAWHTA.js → chunk-7RDLPFIO.js} +2 -2
- package/dist/mcp-chunks/chunk-C2PQFLWS.js +422 -0
- package/dist/mcp-chunks/chunk-CA5WFJZA.js +197 -0
- package/dist/mcp-chunks/{chunk-LNH5LAJD.js → chunk-CNDY7WB4.js} +2 -2
- package/dist/mcp-chunks/{chunk-UKYNQGNE.js → chunk-DEUU7WSN.js} +34 -8
- package/dist/mcp-chunks/{chunk-LKIBAYKU.js → chunk-DXPHJFSA.js} +25 -35
- package/dist/mcp-chunks/{chunk-J6LYIZXN.js → chunk-E6RVTWJY.js} +1 -1
- package/dist/mcp-chunks/{chunk-7FHEBT5G.js → chunk-E6T37ED6.js} +18 -13
- package/dist/mcp-chunks/chunk-ETWN4IIA.js +57 -0
- package/dist/mcp-chunks/{chunk-YVZKMV5H.js → chunk-F3LL4EBL.js} +1 -1
- package/dist/mcp-chunks/chunk-FWP4RACK.js +42 -0
- package/dist/mcp-chunks/{chunk-6W5QFASN.js → chunk-GFYTST6N.js} +1 -1
- package/dist/mcp-chunks/{chunk-TEUKFFQL.js → chunk-GIF7LOYU.js} +2 -2
- package/dist/mcp-chunks/{chunk-QXJUA3ND.js → chunk-GSZOK5TS.js} +828 -7
- package/dist/mcp-chunks/chunk-H7F5RZXS.js +26 -0
- package/dist/mcp-chunks/{chunk-ECIVB7P4.js → chunk-HAO6PL7Z.js} +2 -37
- package/dist/mcp-chunks/{chunk-WQJZMCJN.js → chunk-HTZ2URXW.js} +5 -3
- package/dist/mcp-chunks/{chunk-BWHIA4PC.js → chunk-JAKI24KR.js} +1 -1
- package/dist/mcp-chunks/{chunk-PWYFKGKG.js → chunk-KSGYBW3F.js} +180 -89
- package/dist/mcp-chunks/{chunk-SJCCBNZ4.js → chunk-KSMY7PXI.js} +1 -1
- package/dist/mcp-chunks/{chunk-2U4BSDC4.js → chunk-L4VKBFYI.js} +48 -29
- package/dist/mcp-chunks/{chunk-LEZSACDE.js → chunk-LICH4Q7A.js} +4 -4
- package/dist/mcp-chunks/{chunk-PIIYJR44.js → chunk-LNSUME65.js} +29 -33
- package/dist/mcp-chunks/{chunk-D3MRAZ6H.js → chunk-LWVFSQYX.js} +13974 -15562
- package/dist/mcp-chunks/{chunk-7KA2VJVZ.js → chunk-NCXEJ35U.js} +10 -5
- package/dist/mcp-chunks/{chunk-5QOSCSQB.js → chunk-NZOIX6XW.js} +2 -2
- package/dist/mcp-chunks/{chunk-XANPGTLI.js → chunk-P3RN22HQ.js} +11 -4
- package/dist/mcp-chunks/{chunk-IABRYROW.js → chunk-PKOJCYNA.js} +3 -3
- package/dist/mcp-chunks/{chunk-BNV3TPE4.js → chunk-QJACOI2W.js} +5 -13
- package/dist/mcp-chunks/{chunk-UNKB4SBV.js → chunk-RBVYCKCD.js} +2 -2
- package/dist/mcp-chunks/{chunk-DHBE7UBH.js → chunk-SB2UUURE.js} +12 -42
- package/dist/mcp-chunks/{chunk-4SQKWYFF.js → chunk-SFREPU3D.js} +1 -1
- package/dist/mcp-chunks/{chunk-BZIQOWE6.js → chunk-SRZZQ6TL.js} +35 -36
- package/dist/mcp-chunks/{chunk-M3TPODXI.js → chunk-UENXT3NE.js} +1 -1
- package/dist/mcp-chunks/chunk-UHOKCTZT.js +37 -0
- package/dist/mcp-chunks/{chunk-E22DYOW5.js → chunk-WWO5WGH5.js} +5 -5
- package/dist/mcp-chunks/{chunk-6XCZGU3G.js → chunk-WXBPMFSN.js} +149 -192
- package/dist/mcp-chunks/{chunk-XQK2JSW4.js → chunk-XRGLP3Z2.js} +14 -2
- package/dist/mcp-chunks/{chunk-L7NTQVYN.js → chunk-XTL4MHFH.js} +28 -10
- package/dist/mcp-chunks/{chunk-N46NEFAF.js → chunk-XUF6KARU.js} +1 -1
- package/dist/mcp-chunks/{chunk-WD6BOD24.js → chunk-YCYSQA5V.js} +23 -4
- package/dist/mcp-chunks/chunk-YPJ5EHXR.js +17394 -0
- package/dist/mcp-chunks/{chunk-NRAJX5E4.js → chunk-YSPT6F7K.js} +3 -3
- package/dist/mcp-chunks/{chunk-7UDVSOOF.js → chunk-YTKRAHO6.js} +54 -46
- package/dist/mcp-chunks/chunk-ZBFZ5UFE.js +67 -0
- package/dist/mcp-chunks/{cli-UV4QJZZM.js → cli-E4P6SZLQ.js} +89 -76
- package/dist/mcp-chunks/client-2EJC4PLL.js +18 -0
- package/dist/mcp-chunks/{config-command-NLAGKID5.js → config-command-MWF3RHPQ.js} +38 -59
- package/dist/mcp-chunks/daemon-command-6CJ26MKI.js +33 -0
- package/dist/mcp-chunks/{dist-LK3SHAMX.js → dist-ZIPUENTM.js} +527 -469
- package/dist/mcp-chunks/{emit-ts-command-VBXVXO6V.js → emit-ts-command-GOVJJ64A.js} +16 -13
- package/dist/mcp-chunks/{generate-cli-runner-6CAZZA3P.js → generate-cli-runner-L5OQIMEY.js} +242 -247
- package/dist/mcp-chunks/{inspect-cli-command-3ZORTOR7.js → inspect-cli-command-7OMMREPE.js} +10 -9
- package/dist/mcp-chunks/{launch-YKRXHXJI.js → launch-BWXPLPB7.js} +1 -1
- package/dist/mcp-chunks/{lifecycle-XVKRHPH3.js → lifecycle-B5UC65PT.js} +1 -1
- package/dist/mcp-chunks/{list-command-2MEGGNFQ.js → list-command-ZO4HVFQK.js} +74 -43
- package/dist/mcp-chunks/{output-utils-NKESLAJ6.js → output-utils-M3TJ2N4M.js} +3 -3
- package/dist/mcp-chunks/{prompt-B1Yc1NPt-VGOTWJMN.js → prompt-CH6TK0bC-C7OTKGRD.js} +1 -3
- package/dist/mcp-chunks/{record-command-YXHTTTT5.js → record-command-VD3HUQIC.js} +5 -4
- package/dist/mcp-chunks/replay-command-AX6IN7YD.js +42 -0
- package/dist/mcp-chunks/{resource-command-OO4NYF5C.js → resource-command-JEZ2DW2G.js} +10 -10
- package/dist/mcp-chunks/{result-utils-MOHHLNM7.js → result-utils-3YHYGS45.js} +4 -4
- package/dist/mcp-chunks/runtime-HSYVOME7.js +37 -0
- package/dist/mcp-chunks/{runtime-wrapper-RPWDIDBF.js → runtime-wrapper-UREU7GC3.js} +7 -3
- package/dist/mcp-chunks/serve-command-M47YZ6JN.js +16018 -0
- package/dist/mcp-chunks/{timeouts-W2XWCCXR.js → timeouts-THZRYP4B.js} +3 -1
- package/dist/mcp-chunks/{vault-command-PIYIUEZL.js → vault-command-53P7MLCB.js} +7 -6
- package/dist/mcp-chunks/webapi-PHEQZQKH.js +3316 -0
- package/dist/mcp-client.js +11 -1
- package/dist/mcp-client.js.map +1 -1
- package/dist/mcp-daemon-client.d.ts.map +1 -1
- package/dist/mcp-daemon-client.js +3 -0
- package/dist/mcp-daemon-client.js.map +1 -1
- package/dist/mcp-daemon-protocol.d.ts +6 -0
- package/dist/mcp-daemon-protocol.d.ts.map +1 -1
- package/dist/mcp-daemon-protocol.js.map +1 -1
- package/dist/mcp-daemon.js +43 -22
- package/dist/mcp-daemon.js.map +1 -1
- package/dist/mcp-run-worker.js +29 -22
- package/dist/mcp-trace-context.d.ts +6 -0
- package/dist/mcp-trace-context.d.ts.map +1 -0
- package/dist/mcp-trace-context.js +31 -0
- package/dist/mcp-trace-context.js.map +1 -0
- package/dist/model-binding.d.ts.map +1 -1
- package/dist/model-binding.js +8 -4
- package/dist/model-binding.js.map +1 -1
- package/dist/pi-extension.d.ts.map +1 -1
- package/dist/pi-extension.js +12 -0
- package/dist/pi-extension.js.map +1 -1
- package/dist/recipe/resolve.d.ts +2 -0
- package/dist/recipe/resolve.d.ts.map +1 -1
- package/dist/recipe/resolve.js +2 -1
- package/dist/recipe/resolve.js.map +1 -1
- package/dist/recipe-agent.d.ts +5 -2
- package/dist/recipe-agent.d.ts.map +1 -1
- package/dist/recipe-agent.js +20 -4
- package/dist/recipe-agent.js.map +1 -1
- package/dist/recipe-model.d.ts +7 -1
- package/dist/recipe-model.d.ts.map +1 -1
- package/dist/recipe-model.js +89 -20
- package/dist/recipe-model.js.map +1 -1
- package/dist/recipe-session.d.ts +14 -0
- package/dist/recipe-session.d.ts.map +1 -0
- package/dist/recipe-session.js +181 -0
- package/dist/recipe-session.js.map +1 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +23 -1
- package/dist/session.js.map +1 -1
- package/docs/agent-composition.md +46 -22
- package/docs/pi-extension.md +9 -3
- package/docs/recipe-format.md +41 -5
- package/package.json +7 -7
- 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/dist/mcp-chunks/call-arguments-LU3W6D3K.js +0 -13
- package/dist/mcp-chunks/chunk-HKRJ6O36.js +0 -1076
- package/dist/mcp-chunks/chunk-NNOEGEUZ.js +0 -17273
- package/dist/mcp-chunks/chunk-P3PSC54P.js +0 -869
- package/dist/mcp-chunks/chunk-TATVT5IT.js +0 -194
- package/dist/mcp-chunks/chunk-YHQUTU6L.js +0 -571
- package/dist/mcp-chunks/client-S7RQUG5U.js +0 -13
- package/dist/mcp-chunks/daemon-command-U242Z6VY.js +0 -26
- package/dist/mcp-chunks/replay-command-25HJ6AQU.js +0 -85
- package/dist/mcp-chunks/runtime-5WJ3G25Y.js +0 -33
- package/dist/mcp-chunks/serve-command-DHXJZMMN.js +0 -3302
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.0/node_modules/mcporter/dist/runtime/elicitation.js
|
|
4
|
+
import readline from "node:readline";
|
|
5
|
+
var NON_INTERACTIVE_ELICITATION_HINT = "Server requested interactive input; run mcporter in a terminal.";
|
|
6
|
+
function createInteractiveElicitationResponder(options = {}) {
|
|
7
|
+
const input = options.input ?? process.stdin;
|
|
8
|
+
const output = options.output ?? process.stderr;
|
|
9
|
+
let declined = false;
|
|
10
|
+
return {
|
|
11
|
+
handler: async (request, context) => {
|
|
12
|
+
const result = await handleInteractiveRequest(request.params, context, input, output);
|
|
13
|
+
if (result.action !== "accept")
|
|
14
|
+
declined = true;
|
|
15
|
+
return result;
|
|
16
|
+
},
|
|
17
|
+
didDecline: () => declined
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function createNonInteractiveElicitationResponder(options = {}) {
|
|
21
|
+
let declined = false;
|
|
22
|
+
return {
|
|
23
|
+
handler: async (request, context) => {
|
|
24
|
+
declined = true;
|
|
25
|
+
options.onDecline?.(request, context);
|
|
26
|
+
return { action: "decline" };
|
|
27
|
+
},
|
|
28
|
+
didDecline: () => declined
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function registerElicitationHandler(client, handler, context) {
|
|
32
|
+
client.setRequestHandler("elicitation/create", async (request) => handler(request, context));
|
|
33
|
+
}
|
|
34
|
+
async function handleInteractiveRequest(params, context, input, output) {
|
|
35
|
+
const rl = readline.createInterface({ input, output, terminal: true });
|
|
36
|
+
try {
|
|
37
|
+
writeLine(output, `
|
|
38
|
+
Server '${sanitizeTerminalText(context.server)}' is requesting input:`);
|
|
39
|
+
writeLine(output, sanitizeTerminalText(params.message));
|
|
40
|
+
if (params.mode === "url")
|
|
41
|
+
return await handleUrlRequest(rl, params, output);
|
|
42
|
+
return await handleFormRequest(rl, params, output);
|
|
43
|
+
} finally {
|
|
44
|
+
rl.close();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function handleUrlRequest(rl, params, output) {
|
|
48
|
+
writeLine(output, `
|
|
49
|
+
Open this URL to continue:
|
|
50
|
+
${sanitizeTerminalText(params.url)}
|
|
51
|
+
`);
|
|
52
|
+
const answer = await ask(rl, "Press Enter when you are done (Ctrl-C to decline): ");
|
|
53
|
+
return answer === void 0 ? { action: "decline" } : { action: "accept" };
|
|
54
|
+
}
|
|
55
|
+
async function handleFormRequest(rl, params, output) {
|
|
56
|
+
const required = new Set(params.requestedSchema.required ?? []);
|
|
57
|
+
const content = {};
|
|
58
|
+
for (const [name, schema] of Object.entries(params.requestedSchema.properties)) {
|
|
59
|
+
const value = await promptForField(rl, output, name, schema, required.has(name));
|
|
60
|
+
if (value.kind === "decline")
|
|
61
|
+
return { action: "decline" };
|
|
62
|
+
if (value.value !== void 0)
|
|
63
|
+
content[name] = value.value;
|
|
64
|
+
}
|
|
65
|
+
return { action: "accept", content };
|
|
66
|
+
}
|
|
67
|
+
async function promptForField(rl, output, name, schema, required) {
|
|
68
|
+
const label = sanitizeTerminalText(schema.title ?? name);
|
|
69
|
+
if (schema.description)
|
|
70
|
+
writeLine(output, sanitizeTerminalText(schema.description));
|
|
71
|
+
const choices = enumChoices(schema);
|
|
72
|
+
const displayChoices = choices.map(sanitizeTerminalText);
|
|
73
|
+
if (displayChoices.length > 0)
|
|
74
|
+
writeLine(output, ` Choices: ${displayChoices.join(", ")}`);
|
|
75
|
+
const defaultValue = "default" in schema ? schema.default : void 0;
|
|
76
|
+
const suffix = `${required ? " (required)" : ""}${defaultValue !== void 0 ? ` [${formatDefault(defaultValue)}]` : ""}: `;
|
|
77
|
+
while (true) {
|
|
78
|
+
const answer = await ask(rl, `${label}${suffix}`);
|
|
79
|
+
if (answer === void 0)
|
|
80
|
+
return { kind: "decline" };
|
|
81
|
+
const trimmed = answer.trim();
|
|
82
|
+
if (trimmed.length === 0) {
|
|
83
|
+
if (defaultValue !== void 0)
|
|
84
|
+
return { kind: "answer", value: defaultValue };
|
|
85
|
+
if (!required)
|
|
86
|
+
return { kind: "answer" };
|
|
87
|
+
writeLine(output, `${label} is required.`);
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
const parsed = parsePrimitive(trimmed, schema, choices);
|
|
91
|
+
if (parsed.ok)
|
|
92
|
+
return { kind: "answer", value: parsed.value };
|
|
93
|
+
writeLine(output, parsed.message);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function parsePrimitive(answer, schema, choices) {
|
|
97
|
+
const displayChoices = choices.map(sanitizeTerminalText);
|
|
98
|
+
if (schema.type === "boolean") {
|
|
99
|
+
const normalized = answer.toLowerCase();
|
|
100
|
+
if (["true", "yes", "y", "1"].includes(normalized))
|
|
101
|
+
return { ok: true, value: true };
|
|
102
|
+
if (["false", "no", "n", "0"].includes(normalized))
|
|
103
|
+
return { ok: true, value: false };
|
|
104
|
+
return { ok: false, message: "Enter yes/no or true/false." };
|
|
105
|
+
}
|
|
106
|
+
if (schema.type === "number" || schema.type === "integer") {
|
|
107
|
+
const value = Number(answer);
|
|
108
|
+
if (!Number.isFinite(value) || schema.type === "integer" && !Number.isInteger(value)) {
|
|
109
|
+
return { ok: false, message: `Enter a valid ${schema.type}.` };
|
|
110
|
+
}
|
|
111
|
+
if (schema.minimum !== void 0 && value < schema.minimum) {
|
|
112
|
+
return { ok: false, message: `Enter a value greater than or equal to ${schema.minimum}.` };
|
|
113
|
+
}
|
|
114
|
+
if (schema.maximum !== void 0 && value > schema.maximum) {
|
|
115
|
+
return { ok: false, message: `Enter a value less than or equal to ${schema.maximum}.` };
|
|
116
|
+
}
|
|
117
|
+
return { ok: true, value };
|
|
118
|
+
}
|
|
119
|
+
if (schema.type === "array") {
|
|
120
|
+
const values = answer.split(",").map((entry) => entry.trim()).filter(Boolean);
|
|
121
|
+
const invalid = values.find((value) => !choices.includes(value));
|
|
122
|
+
return invalid ? { ok: false, message: `Choose comma-separated values from: ${displayChoices.join(", ")}.` } : { ok: true, value: values };
|
|
123
|
+
}
|
|
124
|
+
if (choices.length > 0 && !choices.includes(answer)) {
|
|
125
|
+
return { ok: false, message: `Choose one of: ${displayChoices.join(", ")}.` };
|
|
126
|
+
}
|
|
127
|
+
if ("minLength" in schema && schema.minLength !== void 0 && answer.length < schema.minLength) {
|
|
128
|
+
return { ok: false, message: `Enter at least ${schema.minLength} characters.` };
|
|
129
|
+
}
|
|
130
|
+
if ("maxLength" in schema && schema.maxLength !== void 0 && answer.length > schema.maxLength) {
|
|
131
|
+
return { ok: false, message: `Enter no more than ${schema.maxLength} characters.` };
|
|
132
|
+
}
|
|
133
|
+
return { ok: true, value: answer };
|
|
134
|
+
}
|
|
135
|
+
function enumChoices(schema) {
|
|
136
|
+
if ("enum" in schema && Array.isArray(schema.enum))
|
|
137
|
+
return [...schema.enum];
|
|
138
|
+
if ("oneOf" in schema && Array.isArray(schema.oneOf))
|
|
139
|
+
return schema.oneOf.map((entry) => entry.const);
|
|
140
|
+
if (schema.type === "array") {
|
|
141
|
+
if ("enum" in schema.items && Array.isArray(schema.items.enum))
|
|
142
|
+
return [...schema.items.enum];
|
|
143
|
+
if ("anyOf" in schema.items && Array.isArray(schema.items.anyOf)) {
|
|
144
|
+
return schema.items.anyOf.map((entry) => entry.const);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return [];
|
|
148
|
+
}
|
|
149
|
+
function ask(rl, prompt) {
|
|
150
|
+
return new Promise((resolve) => {
|
|
151
|
+
let settled = false;
|
|
152
|
+
const finish = (value) => {
|
|
153
|
+
if (settled)
|
|
154
|
+
return;
|
|
155
|
+
settled = true;
|
|
156
|
+
rl.off("SIGINT", onInterrupt);
|
|
157
|
+
rl.off("close", onClose);
|
|
158
|
+
resolve(value);
|
|
159
|
+
};
|
|
160
|
+
const onInterrupt = () => finish(void 0);
|
|
161
|
+
const onClose = () => finish(void 0);
|
|
162
|
+
rl.once("SIGINT", onInterrupt);
|
|
163
|
+
rl.once("close", onClose);
|
|
164
|
+
rl.question(prompt, (answer) => finish(answer));
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
function formatDefault(value) {
|
|
168
|
+
return sanitizeTerminalText(Array.isArray(value) ? value.join(", ") : String(value));
|
|
169
|
+
}
|
|
170
|
+
var ANSI_ESCAPE_PATTERN = (
|
|
171
|
+
// eslint-disable-next-line no-control-regex -- Terminal escape bytes are the exact untrusted input being removed.
|
|
172
|
+
/(?:\u001b\][^\u0007]*(?:\u0007|\u001b\\)|\u001b[P^_][\s\S]*?\u001b\\|(?:\u001b\[|\u009b)[0-?]*[ -/]*[@-~]|\u001b[@-_])/gu
|
|
173
|
+
);
|
|
174
|
+
function sanitizeTerminalText(value) {
|
|
175
|
+
const withoutEscapes = value.replace(ANSI_ESCAPE_PATTERN, "");
|
|
176
|
+
let withoutControls = "";
|
|
177
|
+
for (const character of withoutEscapes) {
|
|
178
|
+
const codePoint = character.codePointAt(0) ?? 0;
|
|
179
|
+
if (character === "\r" || character === "\n" || character === " ") {
|
|
180
|
+
withoutControls += " ";
|
|
181
|
+
} else if (codePoint > 31 && (codePoint < 127 || codePoint > 159)) {
|
|
182
|
+
withoutControls += character;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return withoutControls.replace(/ {2,}/gu, " ").trim();
|
|
186
|
+
}
|
|
187
|
+
function writeLine(output, message) {
|
|
188
|
+
output.write(`${message}
|
|
189
|
+
`);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export {
|
|
193
|
+
NON_INTERACTIVE_ELICITATION_HINT,
|
|
194
|
+
createInteractiveElicitationResponder,
|
|
195
|
+
createNonInteractiveElicitationResponder,
|
|
196
|
+
registerElicitationHandler
|
|
197
|
+
};
|
|
@@ -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-RBVYCKCD.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.13.0/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,10 +1,14 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
+
SdkHttpError,
|
|
4
|
+
SseError,
|
|
3
5
|
UnauthorizedError
|
|
4
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YPJ5EHXR.js";
|
|
5
7
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.
|
|
8
|
+
// node_modules/.pnpm/mcporter@0.13.0/node_modules/mcporter/dist/error-classifier.js
|
|
7
9
|
var AUTH_STATUSES = /* @__PURE__ */ new Set([401, 403]);
|
|
10
|
+
var KEYWORD_AUTH_PATTERNS = [/unauthorized/, /invalid_token/, /forbidden/];
|
|
11
|
+
var NUMERIC_AUTH_PATTERNS = [/(?<![0-9a-z_])401(?![0-9a-z_])/i];
|
|
8
12
|
var OFFLINE_PATTERNS = [
|
|
9
13
|
"fetch failed",
|
|
10
14
|
"econnrefused",
|
|
@@ -36,6 +40,20 @@ function analyzeConnectionError(error) {
|
|
|
36
40
|
if (error instanceof UnauthorizedError) {
|
|
37
41
|
return { kind: "auth", rawMessage };
|
|
38
42
|
}
|
|
43
|
+
if (error instanceof SdkHttpError) {
|
|
44
|
+
return {
|
|
45
|
+
kind: AUTH_STATUSES.has(error.status) ? "auth" : "http",
|
|
46
|
+
rawMessage,
|
|
47
|
+
statusCode: error.status
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
if (error instanceof SseError && typeof error.code === "number") {
|
|
51
|
+
return {
|
|
52
|
+
kind: AUTH_STATUSES.has(error.code) ? "auth" : "http",
|
|
53
|
+
rawMessage,
|
|
54
|
+
statusCode: error.code
|
|
55
|
+
};
|
|
56
|
+
}
|
|
39
57
|
const stdio = extractStdioExit(rawMessage);
|
|
40
58
|
if (stdio) {
|
|
41
59
|
return { kind: "stdio-exit", rawMessage, ...stdio };
|
|
@@ -43,15 +61,23 @@ function analyzeConnectionError(error) {
|
|
|
43
61
|
const errorCode = extractErrorCode(error);
|
|
44
62
|
const statusCode = errorCode ?? extractStatusCode(rawMessage);
|
|
45
63
|
const normalized = rawMessage.toLowerCase();
|
|
46
|
-
if (
|
|
47
|
-
|
|
64
|
+
if (statusCode !== void 0) {
|
|
65
|
+
if (AUTH_STATUSES.has(statusCode)) {
|
|
66
|
+
return { kind: "auth", rawMessage, statusCode };
|
|
67
|
+
}
|
|
68
|
+
if (statusCode >= 400) {
|
|
69
|
+
return { kind: "http", rawMessage, statusCode };
|
|
70
|
+
}
|
|
48
71
|
}
|
|
49
|
-
if (
|
|
50
|
-
return { kind: "
|
|
72
|
+
if (matchesAny(KEYWORD_AUTH_PATTERNS, normalized)) {
|
|
73
|
+
return { kind: "auth", rawMessage, statusCode };
|
|
51
74
|
}
|
|
52
75
|
if (OFFLINE_PATTERNS.some((pattern) => normalized.includes(pattern))) {
|
|
53
76
|
return { kind: "offline", rawMessage };
|
|
54
77
|
}
|
|
78
|
+
if (matchesAny(NUMERIC_AUTH_PATTERNS, normalized)) {
|
|
79
|
+
return { kind: "auth", rawMessage, statusCode };
|
|
80
|
+
}
|
|
55
81
|
return { kind: "other", rawMessage };
|
|
56
82
|
}
|
|
57
83
|
function extractMessage(error) {
|
|
@@ -110,8 +136,8 @@ function extractStatusCode(message) {
|
|
|
110
136
|
}
|
|
111
137
|
return void 0;
|
|
112
138
|
}
|
|
113
|
-
function
|
|
114
|
-
return
|
|
139
|
+
function matchesAny(patterns, normalizedMessage) {
|
|
140
|
+
return patterns.some((pattern) => pattern.test(normalizedMessage));
|
|
115
141
|
}
|
|
116
142
|
function extractStdioExit(message) {
|
|
117
143
|
if (!message.toLowerCase().includes("stdio") && !STDIO_EXIT_PATTERN.test(message)) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
pickSharedDefinitionFields
|
|
4
|
+
} from "./chunk-H7F5RZXS.js";
|
|
2
5
|
|
|
3
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.13.0/node_modules/mcporter/dist/cli-metadata.js
|
|
4
7
|
import { spawn } from "node:child_process";
|
|
5
8
|
import fs from "node:fs/promises";
|
|
6
9
|
function metadataPathForArtifact(artifactPath) {
|
|
@@ -61,6 +64,7 @@ function isErrno(error, code) {
|
|
|
61
64
|
return Boolean(error && typeof error === "object" && error.code === code);
|
|
62
65
|
}
|
|
63
66
|
function serializeDefinition(definition) {
|
|
67
|
+
const sharedFields = pickSharedDefinitionFields(definition);
|
|
64
68
|
if (definition.command.kind === "http") {
|
|
65
69
|
return {
|
|
66
70
|
name: definition.name,
|
|
@@ -71,18 +75,7 @@ function serializeDefinition(definition) {
|
|
|
71
75
|
headers: definition.command.headers
|
|
72
76
|
},
|
|
73
77
|
env: definition.env,
|
|
74
|
-
|
|
75
|
-
tokenCacheDir: definition.tokenCacheDir,
|
|
76
|
-
clientName: definition.clientName,
|
|
77
|
-
oauthClientId: definition.oauthClientId,
|
|
78
|
-
oauthClientSecretEnv: definition.oauthClientSecretEnv,
|
|
79
|
-
oauthTokenEndpointAuthMethod: definition.oauthTokenEndpointAuthMethod,
|
|
80
|
-
oauthRedirectUrl: definition.oauthRedirectUrl,
|
|
81
|
-
oauthScope: definition.oauthScope,
|
|
82
|
-
refresh: definition.refresh,
|
|
83
|
-
httpFetch: definition.httpFetch,
|
|
84
|
-
allowedTools: definition.allowedTools,
|
|
85
|
-
blockedTools: definition.blockedTools
|
|
78
|
+
...sharedFields
|
|
86
79
|
};
|
|
87
80
|
}
|
|
88
81
|
return {
|
|
@@ -95,22 +88,24 @@ function serializeDefinition(definition) {
|
|
|
95
88
|
cwd: definition.command.cwd
|
|
96
89
|
},
|
|
97
90
|
env: definition.env,
|
|
98
|
-
|
|
99
|
-
tokenCacheDir: definition.tokenCacheDir,
|
|
100
|
-
clientName: definition.clientName,
|
|
101
|
-
oauthClientId: definition.oauthClientId,
|
|
102
|
-
oauthClientSecretEnv: definition.oauthClientSecretEnv,
|
|
103
|
-
oauthTokenEndpointAuthMethod: definition.oauthTokenEndpointAuthMethod,
|
|
104
|
-
oauthRedirectUrl: definition.oauthRedirectUrl,
|
|
105
|
-
oauthScope: definition.oauthScope,
|
|
106
|
-
refresh: definition.refresh,
|
|
107
|
-
httpFetch: definition.httpFetch,
|
|
108
|
-
allowedTools: definition.allowedTools,
|
|
109
|
-
blockedTools: definition.blockedTools
|
|
91
|
+
...sharedFields
|
|
110
92
|
};
|
|
111
93
|
}
|
|
112
94
|
|
|
113
|
-
// node_modules/.pnpm/mcporter@0.
|
|
95
|
+
// node_modules/.pnpm/mcporter@0.13.0/node_modules/mcporter/dist/cli/generate/tool-selection.js
|
|
96
|
+
function validateToolSelection(includeTools, excludeTools, context) {
|
|
97
|
+
if (includeTools && excludeTools) {
|
|
98
|
+
throw new Error(context.mutuallyExclusiveMessage);
|
|
99
|
+
}
|
|
100
|
+
if (includeTools && includeTools.length === 0) {
|
|
101
|
+
throw new Error("--include-tools requires at least one tool name.");
|
|
102
|
+
}
|
|
103
|
+
if (excludeTools && excludeTools.length === 0) {
|
|
104
|
+
throw new Error("--exclude-tools requires at least one tool name.");
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// node_modules/.pnpm/mcporter@0.13.0/node_modules/mcporter/dist/cli/generate/template-data.js
|
|
114
109
|
function buildGenerateCliCommand(invocation, definition, globalFlags = {}) {
|
|
115
110
|
const tokens = ["mcporter"];
|
|
116
111
|
const configPath = invocation.configPath ?? globalFlags["--config"];
|
|
@@ -168,15 +163,9 @@ function resolveGenerateRequestFromArtifact(parsed, metadata, globalFlags) {
|
|
|
168
163
|
}
|
|
169
164
|
const includeTools = parsed.includeTools ?? invocation.includeTools;
|
|
170
165
|
const excludeTools = parsed.excludeTools ?? invocation.excludeTools;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
if (includeTools && includeTools.length === 0) {
|
|
175
|
-
throw new Error("--include-tools requires at least one tool name.");
|
|
176
|
-
}
|
|
177
|
-
if (excludeTools && excludeTools.length === 0) {
|
|
178
|
-
throw new Error("--exclude-tools requires at least one tool name.");
|
|
179
|
-
}
|
|
166
|
+
validateToolSelection(includeTools, excludeTools, {
|
|
167
|
+
mutuallyExclusiveMessage: "Cannot combine --include-tools and --exclude-tools."
|
|
168
|
+
});
|
|
180
169
|
return {
|
|
181
170
|
serverRef,
|
|
182
171
|
configPath: globalFlags["--config"] ?? invocation.configPath,
|
|
@@ -202,6 +191,7 @@ function shellQuote(value) {
|
|
|
202
191
|
export {
|
|
203
192
|
readCliMetadata,
|
|
204
193
|
serializeDefinition,
|
|
194
|
+
validateToolSelection,
|
|
205
195
|
buildGenerateCliCommand,
|
|
206
196
|
resolveGenerateRequestFromArtifact,
|
|
207
197
|
shellQuote
|
|
@@ -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.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.0/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,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
legacyMcporterDir
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FWP4RACK.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.13.0/node_modules/mcporter/dist/runtime/record-transport.js
|
|
7
7
|
import fs from "node:fs/promises";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
var initializedRecordingPaths = /* @__PURE__ */ new Map();
|
|
@@ -14,24 +14,27 @@ var RecordTransport = class {
|
|
|
14
14
|
onclose;
|
|
15
15
|
onerror;
|
|
16
16
|
onmessage;
|
|
17
|
-
sessionId;
|
|
18
17
|
finishAuth;
|
|
19
18
|
writes = Promise.resolve();
|
|
20
19
|
closeRecorded = false;
|
|
21
20
|
constructor(opts) {
|
|
22
21
|
this.opts = opts;
|
|
23
|
-
|
|
22
|
+
if ("stderr" in opts.inner && "pid" in opts.inner) {
|
|
23
|
+
Object.defineProperties(this, {
|
|
24
|
+
stderr: { get: () => opts.inner.stderr },
|
|
25
|
+
pid: { get: () => opts.inner.pid }
|
|
26
|
+
});
|
|
27
|
+
}
|
|
24
28
|
const finishAuth = opts.inner.finishAuth;
|
|
25
29
|
if (finishAuth) {
|
|
26
|
-
this.finishAuth = (authorizationCode) => finishAuth.call(opts.inner, authorizationCode);
|
|
30
|
+
this.finishAuth = (authorizationCode, iss) => finishAuth.call(opts.inner, authorizationCode, iss);
|
|
27
31
|
}
|
|
28
32
|
}
|
|
29
|
-
get
|
|
30
|
-
|
|
31
|
-
return typeof pid === "number" && pid > 0 ? pid : null;
|
|
33
|
+
get hasPerRequestStream() {
|
|
34
|
+
return this.opts.inner.hasPerRequestStream;
|
|
32
35
|
}
|
|
33
|
-
get
|
|
34
|
-
return this.opts.inner.
|
|
36
|
+
get sessionId() {
|
|
37
|
+
return this.opts.inner.sessionId;
|
|
35
38
|
}
|
|
36
39
|
async start() {
|
|
37
40
|
await initializeRecordingFile(this.opts.recordPath);
|
|
@@ -42,13 +45,12 @@ var RecordTransport = class {
|
|
|
42
45
|
this.opts.inner.onerror = (error) => {
|
|
43
46
|
this.onerror?.(error);
|
|
44
47
|
};
|
|
45
|
-
this.opts.inner.onmessage = (message) => {
|
|
48
|
+
this.opts.inner.onmessage = (message, extra) => {
|
|
46
49
|
void this.appendLine(this.withMeta(message, "recv"));
|
|
47
|
-
this.onmessage?.(message);
|
|
50
|
+
this.onmessage?.(message, extra);
|
|
48
51
|
};
|
|
49
52
|
await this.appendLifecycle("start");
|
|
50
53
|
await this.opts.inner.start();
|
|
51
|
-
this.sessionId = this.opts.inner.sessionId;
|
|
52
54
|
}
|
|
53
55
|
async send(message, options) {
|
|
54
56
|
await this.appendLine(this.withMeta(message, "send"));
|
|
@@ -62,6 +64,9 @@ var RecordTransport = class {
|
|
|
62
64
|
setProtocolVersion(version) {
|
|
63
65
|
this.opts.inner.setProtocolVersion?.(version);
|
|
64
66
|
}
|
|
67
|
+
setSupportedProtocolVersions(versions) {
|
|
68
|
+
this.opts.inner.setSupportedProtocolVersions?.(versions);
|
|
69
|
+
}
|
|
65
70
|
async appendLifecycle(event) {
|
|
66
71
|
await this.appendLine(this.withMeta({
|
|
67
72
|
jsonrpc: "2.0",
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
resolveEnvPlaceholders
|
|
4
|
+
} from "./chunk-HAO6PL7Z.js";
|
|
5
|
+
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.13.0/node_modules/mcporter/dist/runtime/utils.js
|
|
7
|
+
var ENV_PLACEHOLDER_PATTERN = /\$\{[A-Za-z_][A-Za-z0-9_]*(?::-[^}]*)?\}/;
|
|
8
|
+
function resolveCommandArgument(value) {
|
|
9
|
+
if (!value) {
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
if (!value.includes("$")) {
|
|
13
|
+
return value;
|
|
14
|
+
}
|
|
15
|
+
const needsInterpolation = value.startsWith("$env:") || ENV_PLACEHOLDER_PATTERN.test(value);
|
|
16
|
+
if (!needsInterpolation) {
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
return resolveEnvPlaceholders(value);
|
|
20
|
+
}
|
|
21
|
+
function resolveCommandArguments(args) {
|
|
22
|
+
if (args.length === 0) {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
return args.map((arg) => resolveCommandArgument(arg));
|
|
26
|
+
}
|
|
27
|
+
function normalizeTimeout(raw) {
|
|
28
|
+
if (raw == null) {
|
|
29
|
+
return void 0;
|
|
30
|
+
}
|
|
31
|
+
if (!Number.isFinite(raw)) {
|
|
32
|
+
return void 0;
|
|
33
|
+
}
|
|
34
|
+
const coerced = Math.trunc(raw);
|
|
35
|
+
return coerced > 0 ? coerced : void 0;
|
|
36
|
+
}
|
|
37
|
+
function raceWithTimeout(promise, timeoutMs) {
|
|
38
|
+
return new Promise((resolve, reject) => {
|
|
39
|
+
const timer = setTimeout(() => {
|
|
40
|
+
reject(new Error("Timeout"));
|
|
41
|
+
}, timeoutMs);
|
|
42
|
+
promise.then((value) => {
|
|
43
|
+
clearTimeout(timer);
|
|
44
|
+
resolve(value);
|
|
45
|
+
}, (error) => {
|
|
46
|
+
clearTimeout(timer);
|
|
47
|
+
reject(error);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
resolveCommandArgument,
|
|
54
|
+
resolveCommandArguments,
|
|
55
|
+
normalizeTimeout,
|
|
56
|
+
raceWithTimeout
|
|
57
|
+
};
|
|
@@ -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.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.0/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";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
expandHome
|
|
4
|
+
} from "./chunk-HAO6PL7Z.js";
|
|
5
|
+
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.13.0/node_modules/mcporter/dist/paths.js
|
|
7
|
+
import os from "node:os";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
var XDG_HOME_ENV = {
|
|
10
|
+
config: "XDG_CONFIG_HOME",
|
|
11
|
+
data: "XDG_DATA_HOME",
|
|
12
|
+
state: "XDG_STATE_HOME",
|
|
13
|
+
cache: "XDG_CACHE_HOME"
|
|
14
|
+
};
|
|
15
|
+
function legacyMcporterDir() {
|
|
16
|
+
return path.join(os.homedir(), ".mcporter");
|
|
17
|
+
}
|
|
18
|
+
function mcporterDir(kind) {
|
|
19
|
+
const raw = process.env[XDG_HOME_ENV[kind]];
|
|
20
|
+
if (raw && raw.trim().length > 0) {
|
|
21
|
+
const resolved = expandHome(raw.trim());
|
|
22
|
+
if (path.isAbsolute(resolved)) {
|
|
23
|
+
return path.join(resolved, "mcporter");
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return legacyMcporterDir();
|
|
27
|
+
}
|
|
28
|
+
function mcporterConfigCandidates() {
|
|
29
|
+
const base = mcporterDir("config");
|
|
30
|
+
const candidates = [path.join(base, "mcporter.json"), path.join(base, "mcporter.jsonc")];
|
|
31
|
+
if (base !== legacyMcporterDir()) {
|
|
32
|
+
const legacy = legacyMcporterDir();
|
|
33
|
+
candidates.push(path.join(legacy, "mcporter.json"), path.join(legacy, "mcporter.jsonc"));
|
|
34
|
+
}
|
|
35
|
+
return candidates;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
legacyMcporterDir,
|
|
40
|
+
mcporterDir,
|
|
41
|
+
mcporterConfigCandidates
|
|
42
|
+
};
|
|
@@ -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.
|
|
3
|
+
// node_modules/.pnpm/mcporter@0.13.0/node_modules/mcporter/dist/logging.js
|
|
4
4
|
var LOG_LEVEL_ORDER = {
|
|
5
5
|
debug: 10,
|
|
6
6
|
info: 20,
|
|
@@ -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-UENXT3NE.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.13.0/node_modules/mcporter/dist/cli/server-lookup.js
|
|
7
7
|
function findServerByHttpUrl(definitions, urlString) {
|
|
8
8
|
const normalizedTarget = normalizeHttpUrl(urlString);
|
|
9
9
|
if (!normalizedTarget) {
|