@introspection-ai/recipes 0.35.0 → 0.36.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/mcp-chunks/{auth-command-SDTBVC2R.js → auth-command-GMMLBU24.js} +23 -23
- package/dist/mcp-chunks/call-arguments-WSURHOLV.js +16 -0
- package/dist/mcp-chunks/{call-command-WOZT2DLX.js → call-command-2VF6IKAZ.js} +33 -33
- package/dist/mcp-chunks/{chunk-WQBESOWG.js → chunk-22WCLO4D.js} +7 -6
- package/dist/mcp-chunks/{chunk-2IO3FXZJ.js → chunk-2JTXIMGE.js} +1 -1
- package/dist/mcp-chunks/{chunk-SVCKS5MW.js → chunk-347GOMV4.js} +5 -5
- package/dist/mcp-chunks/{chunk-IR5SMKTP.js → chunk-35LLRCRA.js} +303 -128
- package/dist/mcp-chunks/{chunk-EIXFNLU6.js → chunk-3AAF3FSI.js} +1 -1
- package/dist/mcp-chunks/{chunk-TKZA4MPW.js → chunk-4PN2J74H.js} +4 -4
- package/dist/mcp-chunks/{chunk-FWWPRZ37.js → chunk-4U4BUXQD.js} +16 -16
- package/dist/mcp-chunks/{chunk-XDARNDP3.js → chunk-5OO6WVPL.js} +1 -1
- package/dist/mcp-chunks/{chunk-4IXQQER3.js → chunk-5UK2JLTN.js} +5 -5
- package/dist/mcp-chunks/{chunk-M7VINGHY.js → chunk-6TIU2CDB.js} +7 -7
- package/dist/mcp-chunks/{chunk-VRTH73R5.js → chunk-6XC5JJWD.js} +73 -36
- package/dist/mcp-chunks/{chunk-OURSGEZX.js → chunk-7BVYBZ4J.js} +8 -8
- package/dist/mcp-chunks/{chunk-HM26TIPK.js → chunk-7IVXKYTI.js} +42 -22
- package/dist/mcp-chunks/{chunk-CO4CYU5W.js → chunk-ANNJGB6F.js} +62 -32
- package/dist/mcp-chunks/{chunk-TL7V3OBY.js → chunk-BIVX2WFX.js} +3 -3
- package/dist/mcp-chunks/{chunk-JRU5LZJQ.js → chunk-C4TJGC4F.js} +1 -1
- package/dist/mcp-chunks/{chunk-7X3JHUMH.js → chunk-CN5KSNWG.js} +1 -1
- package/dist/mcp-chunks/{chunk-UXI26V4F.js → chunk-D2SZ7KRY.js} +1 -1
- package/dist/mcp-chunks/{chunk-VWNF5PIF.js → chunk-D65GOMYV.js} +2 -2
- package/dist/mcp-chunks/{chunk-27XDYSXJ.js → chunk-DBNBEWRX.js} +4 -1
- package/dist/mcp-chunks/{chunk-P3S4OJPI.js → chunk-DUBQHYW4.js} +9 -9
- package/dist/mcp-chunks/{chunk-FMYP6JXX.js → chunk-ENBJFQ6H.js} +1 -1
- package/dist/mcp-chunks/{chunk-YTO7DITJ.js → chunk-FLUF2FRN.js} +3 -3
- package/dist/mcp-chunks/{chunk-IJTZ2ZRM.js → chunk-HFHIY5TO.js} +4 -4
- package/dist/mcp-chunks/{chunk-35JUFDQI.js → chunk-HI6VG5LR.js} +2 -2
- package/dist/mcp-chunks/{chunk-7OQUF6V6.js → chunk-IHOU2BEL.js} +2 -2
- package/dist/mcp-chunks/{chunk-7CI6DKEP.js → chunk-IMXPLUKE.js} +20 -20
- package/dist/mcp-chunks/{chunk-UHXTAPEC.js → chunk-LISNXOIQ.js} +1 -1
- package/dist/mcp-chunks/{chunk-ASFI5AJK.js → chunk-LRGMFF5S.js} +7 -7
- package/dist/mcp-chunks/{chunk-ALLS7CUV.js → chunk-LUVLTUKR.js} +1 -1
- package/dist/mcp-chunks/{chunk-SONMFI3S.js → chunk-LZUKBEQZ.js} +12 -12
- package/dist/mcp-chunks/{chunk-FQAJT6U2.js → chunk-O2C3HXGS.js} +1 -1
- package/dist/mcp-chunks/{chunk-EIF7GALA.js → chunk-OI3RTQXY.js} +1 -1
- package/dist/mcp-chunks/{chunk-CRX2G22W.js → chunk-OSTHIELS.js} +1 -1
- package/dist/mcp-chunks/{chunk-R636HUNL.js → chunk-P5YLK5G2.js} +17 -12
- package/dist/mcp-chunks/{chunk-YGRORKGT.js → chunk-QDFL757K.js} +99 -74
- package/dist/mcp-chunks/{chunk-DUJ5WAHC.js → chunk-QNZGFUKC.js} +2 -2
- package/dist/mcp-chunks/{chunk-GJ7DWMRT.js → chunk-R4OYHQ4V.js} +1 -1
- package/dist/mcp-chunks/{chunk-7ZZZ7MR2.js → chunk-RHXZKYM7.js} +1 -1
- package/dist/mcp-chunks/{chunk-POYT6GCW.js → chunk-RKQC2EE6.js} +2 -2
- package/dist/mcp-chunks/{chunk-43QNQO5C.js → chunk-RZZO3ZD4.js} +4 -4
- package/dist/mcp-chunks/{chunk-FUKRLUU7.js → chunk-SS7V7GVT.js} +4 -4
- package/dist/mcp-chunks/{chunk-FVZKQMZS.js → chunk-TYL2NVXI.js} +2 -2
- package/dist/mcp-chunks/{chunk-TDBM2UIR.js → chunk-U5QZHPCC.js} +10 -1
- package/dist/mcp-chunks/{chunk-6XBQDCGX.js → chunk-UQUM7ICD.js} +36 -17
- package/dist/mcp-chunks/{chunk-JQCSGX6E.js → chunk-VWPKJFK4.js} +2 -5
- package/dist/mcp-chunks/{chunk-AHDUZPNI.js → chunk-WXNGATQ7.js} +1 -1
- package/dist/mcp-chunks/{chunk-VCPUZFU7.js → chunk-YFCNRWLV.js} +2 -2
- package/dist/mcp-chunks/{chunk-IWXEOLJL.js → chunk-YPSODIQX.js} +18 -18
- package/dist/mcp-chunks/{chunk-CMDB57MS.js → chunk-YWFQPA4D.js} +2 -2
- package/dist/mcp-chunks/{chunk-YM7ZVYI2.js → chunk-ZI5XYM4C.js} +23 -7
- package/dist/mcp-chunks/{chunk-UYG7PAN2.js → chunk-ZJWZY54X.js} +2 -2
- package/dist/mcp-chunks/{chunk-ZLV5S5UP.js → chunk-ZXIF7MKN.js} +2 -2
- package/dist/mcp-chunks/{cli-67GWFF4R.js → cli-4OQD3H4N.js} +77 -70
- package/dist/mcp-chunks/client-LXKCCVMT.js +31 -0
- package/dist/mcp-chunks/{config-command-3IKIRWMW.js → config-command-72TCIWPV.js} +63 -36
- package/dist/mcp-chunks/daemon-command-QHS3ACBM.js +31 -0
- package/dist/mcp-chunks/{dist-YL3LFKVP.js → dist-74UCKZK5.js} +95 -69
- package/dist/mcp-chunks/{emit-ts-command-YWKROLL2.js → emit-ts-command-KD4ON2SE.js} +34 -22
- package/dist/mcp-chunks/{generate-cli-runner-CZEVY2Y7.js → generate-cli-runner-HWGI6HPL.js} +55 -49
- package/dist/mcp-chunks/generated-daemon-runtime-7ORS5KBR.js +31 -0
- package/dist/mcp-chunks/{inspect-cli-command-5Y2LORK5.js → inspect-cli-command-FT5JSB7V.js} +9 -9
- package/dist/mcp-chunks/{launch-43TA3HYF.js → launch-AHLKP2VM.js} +1 -1
- package/dist/mcp-chunks/{lifecycle-BY2ILXTB.js → lifecycle-BJDITFWN.js} +1 -1
- package/dist/mcp-chunks/{list-command-7RU7NNAV.js → list-command-YKF7RN6Y.js} +30 -30
- package/dist/mcp-chunks/{output-utils-2R3SA6KR.js → output-utils-LYB5IJRD.js} +3 -3
- package/dist/mcp-chunks/{prompt-CH6TK0bC-GKQOEUY4.js → prompt-CH6TK0bC-B3USYOND.js} +1 -1
- package/dist/mcp-chunks/{record-command-ROIRRNFS.js → record-command-MJW3Z5E5.js} +5 -5
- package/dist/mcp-chunks/{replay-command-Y2MYVQTL.js → replay-command-5ZHBUOLE.js} +6 -6
- package/dist/mcp-chunks/{resource-command-VUV7AYYQ.js → resource-command-L4I24AX5.js} +9 -9
- package/dist/mcp-chunks/{result-utils-5U7NVXDZ.js → result-utils-5WRI66KV.js} +3 -3
- package/dist/mcp-chunks/runtime-IKWDQLZF.js +38 -0
- package/dist/mcp-chunks/{runtime-wrapper-3BVFTSWJ.js → runtime-wrapper-WFMNIHD5.js} +3 -3
- package/dist/mcp-chunks/{serve-command-BXLQWHFW.js → serve-command-KNCSJUXS.js} +185 -78
- package/dist/mcp-chunks/{timeouts-6GL2F44N.js → timeouts-2ZHGSB3R.js} +3 -3
- package/dist/mcp-chunks/{vault-command-JCMW3DQA.js → vault-command-7EDL45AA.js} +4 -4
- package/dist/mcp-chunks/{webapi-UMWFGMQV.js → webapi-NNCZGUMZ.js} +46 -46
- package/dist/mcp-daemon.js +27 -27
- package/dist/mcp-run-worker.js +27 -27
- package/dist/pi-extension.d.ts.map +1 -1
- package/dist/pi-extension.js +8 -1
- package/dist/pi-extension.js.map +1 -1
- package/docs/slack.md +6 -0
- package/package.json +10 -10
- package/dist/mcp-chunks/call-arguments-ER7NWEPS.js +0 -16
- package/dist/mcp-chunks/client-MQMNAYYW.js +0 -31
- package/dist/mcp-chunks/daemon-command-OMOZ5MP7.js +0 -31
- package/dist/mcp-chunks/generated-daemon-runtime-SRFULTIT.js +0 -31
- package/dist/mcp-chunks/runtime-Q4SCCOQE.js +0 -38
|
@@ -3368,7 +3368,7 @@ function useColor() {
|
|
|
3368
3368
|
// node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
|
|
3369
3369
|
var program = new Command();
|
|
3370
3370
|
|
|
3371
|
-
// node_modules/.pnpm/mcporter@0.
|
|
3371
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/cli/generate/tools.js
|
|
3372
3372
|
function resolveSchemaType(value) {
|
|
3373
3373
|
if (value === "integer") {
|
|
3374
3374
|
return "number";
|
|
@@ -3450,6 +3450,7 @@ function extractOptions(tool) {
|
|
|
3450
3450
|
required: requiredList.includes(property),
|
|
3451
3451
|
type,
|
|
3452
3452
|
arrayItemType,
|
|
3453
|
+
strictBooleanArray: arrayItemType === "boolean" && hasOnlyBooleanArrayItems(descriptor),
|
|
3453
3454
|
placeholder,
|
|
3454
3455
|
exampleValue,
|
|
3455
3456
|
enumValues,
|
|
@@ -3610,6 +3611,9 @@ function pickExampleLiteral(option) {
|
|
|
3610
3611
|
if (option.type === "number" || option.type === "boolean" || option.type === "object") {
|
|
3611
3612
|
return option.exampleValue;
|
|
3612
3613
|
}
|
|
3614
|
+
if (option.type === "string") {
|
|
3615
|
+
return JSON.stringify(option.exampleValue);
|
|
3616
|
+
}
|
|
3613
3617
|
try {
|
|
3614
3618
|
const parsed = JSON.parse(option.exampleValue);
|
|
3615
3619
|
if (typeof parsed === "number" || typeof parsed === "boolean") {
|
|
@@ -3672,6 +3676,11 @@ function inferType(descriptor) {
|
|
|
3672
3676
|
function isArraySchema(record) {
|
|
3673
3677
|
return inferType(record) === "array";
|
|
3674
3678
|
}
|
|
3679
|
+
function hasOnlyBooleanArrayItems(descriptor) {
|
|
3680
|
+
const items = descriptor.items;
|
|
3681
|
+
const type = items?.type;
|
|
3682
|
+
return type === "boolean" || Array.isArray(type) && type.length > 0 && type.every((entry) => entry === "boolean");
|
|
3683
|
+
}
|
|
3675
3684
|
function inferArrayItemType(descriptor) {
|
|
3676
3685
|
if (!descriptor || typeof descriptor !== "object") {
|
|
3677
3686
|
return "unknown";
|
|
@@ -1,22 +1,22 @@
|
|
|
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-22WCLO4D.js";
|
|
5
5
|
import {
|
|
6
6
|
buildEmbeddedSchemaMap,
|
|
7
7
|
toCliOptionKey
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-U5QZHPCC.js";
|
|
9
9
|
import {
|
|
10
10
|
parsePositiveInteger
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-D65GOMYV.js";
|
|
12
12
|
import {
|
|
13
13
|
stableJsonStringify
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-R4OYHQ4V.js";
|
|
15
15
|
import {
|
|
16
16
|
MCPORTER_VERSION
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YPSODIQX.js";
|
|
18
18
|
|
|
19
|
-
// node_modules/.pnpm/mcporter@0.
|
|
19
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/cli/generate/flag-parser.js
|
|
20
20
|
function extractGeneratorFlags(args, options = {}) {
|
|
21
21
|
const result = {};
|
|
22
22
|
let index = 0;
|
|
@@ -58,12 +58,12 @@ function extractGeneratorFlags(args, options = {}) {
|
|
|
58
58
|
return result;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
// node_modules/.pnpm/mcporter@0.
|
|
61
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/cli/generate/template.js
|
|
62
62
|
import { realpathSync } from "node:fs";
|
|
63
63
|
import fs2 from "node:fs/promises";
|
|
64
64
|
import path from "node:path";
|
|
65
65
|
|
|
66
|
-
// node_modules/.pnpm/mcporter@0.
|
|
66
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/cli/generate/fs-helpers.js
|
|
67
67
|
import fs from "node:fs/promises";
|
|
68
68
|
async function markExecutable(filePath) {
|
|
69
69
|
try {
|
|
@@ -94,7 +94,7 @@ function shouldIgnorePosixPermissionError(error) {
|
|
|
94
94
|
return code === "EPERM" || code === "EINVAL" || code === "ENOSYS" || code === "EACCES";
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
// node_modules/.pnpm/mcporter@0.
|
|
97
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/cli/generate/template-help.js
|
|
98
98
|
function renderEmbeddedHelpSource() {
|
|
99
99
|
return `function configureGeneratedCommandHelp(command: Command): void {
|
|
100
100
|
command.configureHelp({
|
|
@@ -208,7 +208,7 @@ function quickStartExamples(): Array<[string, string]> {
|
|
|
208
208
|
`;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
// node_modules/.pnpm/mcporter@0.
|
|
211
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/cli/generate/template.js
|
|
212
212
|
async function writeTemplate(input) {
|
|
213
213
|
const resolvedOutput = input.outputPath ? path.resolve(input.outputPath) : path.resolve(process.cwd(), `${input.serverName}.ts`);
|
|
214
214
|
const runtimeScriptPath = input.runtimeScriptPath ? path.resolve(input.runtimeScriptPath) : resolvedOutput;
|
|
@@ -293,8 +293,8 @@ const artifactKind = determineArtifactKind();
|
|
|
293
293
|
const program = new Command();
|
|
294
294
|
program.name(embeddedName);
|
|
295
295
|
program.description(embeddedDescription);
|
|
296
|
-
program.option('-t, --timeout <ms>', 'Call timeout in milliseconds',
|
|
297
|
-
program.
|
|
296
|
+
program.option('-t, --timeout <ms>', 'Call timeout in milliseconds', parseTimeoutArgument, ${timeoutMs});
|
|
297
|
+
program.addOption(new Option('-o, --output <format>', 'Output format: text|markdown|json|raw').choices(['text', 'markdown', 'json', 'raw']).default('text'));
|
|
298
298
|
const commandSignatures: Record<string, string> = ${signatureMapLiteral};
|
|
299
299
|
program.configureHelp({
|
|
300
300
|
commandTerm(cmd) {
|
|
@@ -390,13 +390,16 @@ function defineOption(flags: string, description: string, parser?: (value: strin
|
|
|
390
390
|
return option;
|
|
391
391
|
}
|
|
392
392
|
|
|
393
|
-
function parseArrayOption(value: string, itemType: 'string' | 'number' | 'boolean' | 'json') {
|
|
393
|
+
function parseArrayOption(value: string, itemType: 'string' | 'number' | 'boolean' | 'json', strictBooleanArray = false) {
|
|
394
394
|
const trimmed = value.trim();
|
|
395
395
|
if (trimmed.startsWith('[')) {
|
|
396
396
|
const parsed = JSON.parse(trimmed);
|
|
397
397
|
if (!Array.isArray(parsed)) {
|
|
398
398
|
throw new Error('Expected a JSON array.');
|
|
399
399
|
}
|
|
400
|
+
if (strictBooleanArray && !parsed.every((entry) => typeof entry === 'boolean')) {
|
|
401
|
+
throw new Error('Expected a boolean array.');
|
|
402
|
+
}
|
|
400
403
|
return parsed;
|
|
401
404
|
}
|
|
402
405
|
if (itemType === 'json') {
|
|
@@ -411,11 +414,27 @@ function parseArrayOption(value: string, itemType: 'string' | 'number' | 'boolea
|
|
|
411
414
|
return values.map((entry) => parseFiniteNumber(entry));
|
|
412
415
|
}
|
|
413
416
|
if (itemType === 'boolean') {
|
|
414
|
-
return values.map((entry) => entry
|
|
417
|
+
return values.map((entry) => parseBoolean(entry));
|
|
415
418
|
}
|
|
416
419
|
return values;
|
|
417
420
|
}
|
|
418
421
|
|
|
422
|
+
function parseBoolean(value: string): boolean {
|
|
423
|
+
const trimmed = value.trim();
|
|
424
|
+
if (trimmed !== 'true' && trimmed !== 'false') {
|
|
425
|
+
throw new Error('Expected a boolean (true or false).');
|
|
426
|
+
}
|
|
427
|
+
return trimmed === 'true';
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
function parseTimeoutArgument(value: string): number {
|
|
431
|
+
const parsed = Number(value);
|
|
432
|
+
if (!/^[1-9][0-9]*$/.test(value) || !Number.isFinite(parsed)) {
|
|
433
|
+
throw new Error('Timeout must be a positive integer (milliseconds).');
|
|
434
|
+
}
|
|
435
|
+
return parsed;
|
|
436
|
+
}
|
|
437
|
+
|
|
419
438
|
function parseFiniteNumber(value: string): number {
|
|
420
439
|
const trimmed = value.trim();
|
|
421
440
|
const parsed = Number(trimmed);
|
|
@@ -610,7 +629,7 @@ function renderToolCommand(tool, defaultTimeout, serverName, existingDoc) {
|
|
|
610
629
|
const source = propertyAccess("cmdOpts", toCliOptionKey(option.cliName));
|
|
611
630
|
return `if (${source} !== undefined) ${propertyAccess("args", option.property)} = ${source};`;
|
|
612
631
|
}).join("\n ");
|
|
613
|
-
const requiredChecks = tool.options.filter((option) => option.required).map((option) => ({ option, camelCaseProp: toCliOptionKey(option.cliName) }));
|
|
632
|
+
const requiredChecks = tool.options.filter((option) => option.required && option.defaultValue === void 0).map((option) => ({ option, camelCaseProp: toCliOptionKey(option.cliName) }));
|
|
614
633
|
const requiredValidation = requiredChecks.length > 0 ? `const missingRequired = [${requiredChecks.map(({ option, camelCaseProp }) => `{ value: ${propertyAccess("cmdOpts", camelCaseProp)}, flag: ${JSON.stringify(`--${option.cliName}`)} }`).join(", ")}].filter((entry) => entry.value === undefined || (typeof entry.value === 'string' && entry.value.trim() === '')).map((entry) => entry.flag);
|
|
615
634
|
if (missingRequired.length > 0) {
|
|
616
635
|
throw new Error('Missing required option' + (missingRequired.length === 1 ? '' : 's') + ': ' + missingRequired.join(', '));
|
|
@@ -692,7 +711,7 @@ function optionParser(option) {
|
|
|
692
711
|
case "number":
|
|
693
712
|
return "(value) => parseFiniteNumber(value)";
|
|
694
713
|
case "boolean":
|
|
695
|
-
return "(value) => value
|
|
714
|
+
return "(value) => parseBoolean(value)";
|
|
696
715
|
case "object":
|
|
697
716
|
return "(value) => JSON.parse(value)";
|
|
698
717
|
case "array":
|
|
@@ -700,7 +719,7 @@ function optionParser(option) {
|
|
|
700
719
|
case "number":
|
|
701
720
|
return "(value) => parseArrayOption(value, 'number')";
|
|
702
721
|
case "boolean":
|
|
703
|
-
return
|
|
722
|
+
return `(value) => parseArrayOption(value, 'boolean', ${option.strictBooleanArray === true})`;
|
|
704
723
|
case "object":
|
|
705
724
|
return "(value) => parseArrayOption(value, 'json')";
|
|
706
725
|
default:
|
|
@@ -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.15.0/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_]*)(?::-|:|-)?([^}]*)\}$/;
|
|
@@ -37,10 +37,7 @@ function resolveEnvValue(raw, env = process.env) {
|
|
|
37
37
|
}
|
|
38
38
|
return defaultValue;
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
return resolveEnvPlaceholders(raw, env);
|
|
42
|
-
}
|
|
43
|
-
return raw;
|
|
40
|
+
return resolveEnvPlaceholders(raw, env);
|
|
44
41
|
}
|
|
45
42
|
function resolveEnvPlaceholders(value, env = process.env) {
|
|
46
43
|
rejectUnsupportedBracedEnvPlaceholder(value);
|
|
@@ -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.15.0/node_modules/mcporter/dist/definition-fields.js
|
|
4
4
|
var SHARED_DEFINITION_FIELDS = [
|
|
5
5
|
"auth",
|
|
6
6
|
"tokenCacheDir",
|
|
@@ -2,9 +2,9 @@ import { createRequire as __createRequire } from "node:module"; const require =
|
|
|
2
2
|
import {
|
|
3
3
|
logInfo,
|
|
4
4
|
logWarn
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YWFQPA4D.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/mcporter@0.
|
|
7
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/cli/runtime-debug.js
|
|
8
8
|
var DEBUG_HANG = process.env.MCPORTER_DEBUG_HANG === "1";
|
|
9
9
|
function describeHandle(handle) {
|
|
10
10
|
if (!handle || typeof handle !== "object" && typeof handle !== "function") {
|
|
@@ -1,9 +1,9 @@
|
|
|
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.15.0/node_modules/mcporter/package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "mcporter",
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "0.15.0",
|
|
7
7
|
description: "TypeScript runtime and CLI for connecting to configured Model Context Protocol servers.",
|
|
8
8
|
keywords: [
|
|
9
9
|
"cli",
|
|
@@ -43,34 +43,34 @@ var package_default = {
|
|
|
43
43
|
},
|
|
44
44
|
dependencies: {
|
|
45
45
|
"@iarna/toml": "^2.2.5",
|
|
46
|
-
"@modelcontextprotocol/client": "^2.
|
|
47
|
-
"@modelcontextprotocol/server": "^2.
|
|
48
|
-
acorn: "^8.
|
|
46
|
+
"@modelcontextprotocol/client": "^2.3.1",
|
|
47
|
+
"@modelcontextprotocol/server": "^2.3.1",
|
|
48
|
+
acorn: "^8.19.0",
|
|
49
49
|
commander: "^15.0.0",
|
|
50
50
|
"es-toolkit": "^1.52.0",
|
|
51
51
|
"jsonc-parser": "^3.3.1",
|
|
52
52
|
ora: "^9.4.1",
|
|
53
|
-
rolldown: "1.2.
|
|
54
|
-
zod: "^4.6.
|
|
53
|
+
rolldown: "1.2.13",
|
|
54
|
+
zod: "^4.6.7"
|
|
55
55
|
},
|
|
56
56
|
devDependencies: {
|
|
57
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
57
|
+
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
58
58
|
"@types/estree": "^1.0.9",
|
|
59
59
|
"@types/express": "^5.0.6",
|
|
60
|
-
"@types/node": "^26.6.
|
|
60
|
+
"@types/node": "^26.6.5",
|
|
61
61
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
62
|
-
"@vitest/coverage-v8": "^5.0.
|
|
63
|
-
"bun-types": "^1.4.
|
|
62
|
+
"@vitest/coverage-v8": "^5.0.4",
|
|
63
|
+
"bun-types": "^1.4.3",
|
|
64
64
|
"cross-env": "^10.1.0",
|
|
65
|
-
express: "^5.
|
|
66
|
-
oxfmt: "^0.
|
|
67
|
-
oxlint: "^1.
|
|
68
|
-
"oxlint-tsgolint": "^7.0.
|
|
65
|
+
express: "^5.3.0",
|
|
66
|
+
oxfmt: "^0.73.0",
|
|
67
|
+
oxlint: "^1.88.0",
|
|
68
|
+
"oxlint-tsgolint": "^7.0.2004",
|
|
69
69
|
rimraf: "^6.1.3",
|
|
70
70
|
tsx: "^4.23.15",
|
|
71
71
|
typescript: "npm:@typescript/typescript6@^6.0.2",
|
|
72
|
-
vite: "8.3.
|
|
73
|
-
vitest: "^5.0.
|
|
72
|
+
vite: "8.3.4",
|
|
73
|
+
vitest: "^5.0.4"
|
|
74
74
|
},
|
|
75
75
|
bundleDependencies: [
|
|
76
76
|
"@modelcontextprotocol/client"
|
|
@@ -119,7 +119,7 @@ var package_default = {
|
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
|
|
122
|
-
// node_modules/.pnpm/mcporter@0.
|
|
122
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/version.js
|
|
123
123
|
var MCPORTER_VERSION = package_default.version;
|
|
124
124
|
|
|
125
125
|
export {
|
|
@@ -2,9 +2,9 @@ import { createRequire as __createRequire } from "node:module"; const require =
|
|
|
2
2
|
import {
|
|
3
3
|
createPrefixedConsoleLogger,
|
|
4
4
|
resolveLogLevelFromEnv
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-C4TJGC4F.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/mcporter@0.
|
|
7
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/cli/logger-context.js
|
|
8
8
|
var activeLogLevel = resolveLogLevelFromEnv();
|
|
9
9
|
var activeLogger = createPrefixedConsoleLogger("mcporter", activeLogLevel);
|
|
10
10
|
function getActiveLogLevel() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
pickSharedDefinitionFields
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WXNGATQ7.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/cli-metadata.js
|
|
7
7
|
import { spawn } from "node:child_process";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
function metadataPathForArtifact(artifactPath) {
|
|
@@ -31,9 +31,11 @@ async function readCliMetadata(artifactPath) {
|
|
|
31
31
|
throw embeddedError;
|
|
32
32
|
}
|
|
33
33
|
async function readMetadataFromCli(artifactPath) {
|
|
34
|
+
const interpreter = process.platform === "win32" ? await readGeneratedInterpreter(artifactPath).catch(() => void 0) : void 0;
|
|
34
35
|
return await new Promise((resolve, reject) => {
|
|
35
|
-
const child = spawn(artifactPath, ["__mcporter_inspect"], {
|
|
36
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
36
|
+
const child = spawn(interpreter ?? artifactPath, [...interpreter ? [artifactPath] : [], "__mcporter_inspect"], {
|
|
37
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
38
|
+
windowsHide: true
|
|
37
39
|
});
|
|
38
40
|
let stdout = "";
|
|
39
41
|
let stderr = "";
|
|
@@ -60,11 +62,25 @@ async function readMetadataFromCli(artifactPath) {
|
|
|
60
62
|
});
|
|
61
63
|
});
|
|
62
64
|
}
|
|
65
|
+
async function readGeneratedInterpreter(artifactPath) {
|
|
66
|
+
const file = await fs.open(artifactPath, "r");
|
|
67
|
+
try {
|
|
68
|
+
const header = Buffer.alloc(64);
|
|
69
|
+
const { bytesRead } = await file.read(header, 0, header.length, 0);
|
|
70
|
+
return /^#!\/usr\/bin\/env (node|bun)\r?\n/.exec(header.toString("utf8", 0, bytesRead))?.[1];
|
|
71
|
+
} finally {
|
|
72
|
+
await file.close();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
63
75
|
function isErrno(error, code) {
|
|
64
76
|
return Boolean(error && typeof error === "object" && error.code === code);
|
|
65
77
|
}
|
|
66
78
|
function serializeDefinition(definition) {
|
|
67
|
-
const sharedFields =
|
|
79
|
+
const sharedFields = {
|
|
80
|
+
...pickSharedDefinitionFields(definition),
|
|
81
|
+
lifecycle: definition.lifecycle,
|
|
82
|
+
logging: definition.logging
|
|
83
|
+
};
|
|
68
84
|
if (definition.command.kind === "http") {
|
|
69
85
|
return {
|
|
70
86
|
name: definition.name,
|
|
@@ -92,7 +108,7 @@ function serializeDefinition(definition) {
|
|
|
92
108
|
};
|
|
93
109
|
}
|
|
94
110
|
|
|
95
|
-
// node_modules/.pnpm/mcporter@0.
|
|
111
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/cli/generate/tool-selection.js
|
|
96
112
|
function validateToolSelection(includeTools, excludeTools, context) {
|
|
97
113
|
if (includeTools && excludeTools) {
|
|
98
114
|
throw new Error(context.mutuallyExclusiveMessage);
|
|
@@ -105,7 +121,7 @@ function validateToolSelection(includeTools, excludeTools, context) {
|
|
|
105
121
|
}
|
|
106
122
|
}
|
|
107
123
|
|
|
108
|
-
// node_modules/.pnpm/mcporter@0.
|
|
124
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/cli/generate/template-data.js
|
|
109
125
|
function buildGenerateCliCommand(invocation, definition, globalFlags = {}) {
|
|
110
126
|
const tokens = ["mcporter"];
|
|
111
127
|
const configPath = invocation.configPath ?? globalFlags["--config"];
|
|
@@ -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-U5QZHPCC.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.15.0/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;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
expandHome
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VWPKJFK4.js";
|
|
5
5
|
|
|
6
|
-
// node_modules/.pnpm/mcporter@0.
|
|
6
|
+
// node_modules/.pnpm/mcporter@0.15.0/node_modules/mcporter/dist/paths.js
|
|
7
7
|
import os from "node:os";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
var XDG_HOME_ENV = {
|