@ai-ecoverse/mcpcat 0.30.3 → 0.30.5
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/THIRD_PARTY_NOTICES +1 -1
- package/dist/host/codemode-worker.mjs +14 -7
- package/dist/host/mcpcat.mjs +25 -14
- package/dist/kernel/mcpcat.mjs +31 -15
- package/package.json +9 -4
package/dist/THIRD_PARTY_NOTICES
CHANGED
|
@@ -145,7 +145,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
145
145
|
|
|
146
146
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
147
147
|
|
|
148
|
-
quickjs-wasi@3.6.
|
|
148
|
+
quickjs-wasi@3.6.3
|
|
149
149
|
License: MIT
|
|
150
150
|
Homepage: git://github.com/vercel-labs/quickjs-wasi.git
|
|
151
151
|
----------------------------------------
|
|
@@ -345,7 +345,7 @@ async function restoreExtensions(descriptors, extensionMeta, mainExports, wasiBu
|
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
// node_modules/quickjs-wasi/dist/version.js
|
|
348
|
-
var VERSION = "3.6.
|
|
348
|
+
var VERSION = "3.6.3";
|
|
349
349
|
|
|
350
350
|
// node_modules/quickjs-wasi/dist/index.js
|
|
351
351
|
var __addDisposableResource = function(env, value, async) {
|
|
@@ -1419,6 +1419,17 @@ var QuickJS = class _QuickJS {
|
|
|
1419
1419
|
const vm = this;
|
|
1420
1420
|
vm._ownedHandles.add(resolveHandle);
|
|
1421
1421
|
vm._ownedHandles.add(rejectHandle);
|
|
1422
|
+
let resolved = false;
|
|
1423
|
+
const settle = (resolver, value) => {
|
|
1424
|
+
if (resolved)
|
|
1425
|
+
return;
|
|
1426
|
+
resolved = true;
|
|
1427
|
+
vm.callFunctionRaw(resolver, vm.undefined, value).dispose();
|
|
1428
|
+
vm._ownedHandles.delete(resolveHandle);
|
|
1429
|
+
vm._ownedHandles.delete(rejectHandle);
|
|
1430
|
+
resolveHandle.dispose();
|
|
1431
|
+
rejectHandle.dispose();
|
|
1432
|
+
};
|
|
1422
1433
|
let _settled = null;
|
|
1423
1434
|
return {
|
|
1424
1435
|
handle: promiseHandle,
|
|
@@ -1440,14 +1451,10 @@ var QuickJS = class _QuickJS {
|
|
|
1440
1451
|
return _settled;
|
|
1441
1452
|
},
|
|
1442
1453
|
resolve(value) {
|
|
1443
|
-
|
|
1444
|
-
vm._ownedHandles.delete(resolveHandle);
|
|
1445
|
-
resolveHandle.dispose();
|
|
1454
|
+
settle(resolveHandle, value);
|
|
1446
1455
|
},
|
|
1447
1456
|
reject(value) {
|
|
1448
|
-
|
|
1449
|
-
vm._ownedHandles.delete(rejectHandle);
|
|
1450
|
-
rejectHandle.dispose();
|
|
1457
|
+
settle(rejectHandle, value);
|
|
1451
1458
|
}
|
|
1452
1459
|
};
|
|
1453
1460
|
}
|
package/dist/host/mcpcat.mjs
CHANGED
|
@@ -1858,7 +1858,7 @@ var init_extensions = __esm({
|
|
|
1858
1858
|
var VERSION;
|
|
1859
1859
|
var init_version = __esm({
|
|
1860
1860
|
"node_modules/quickjs-wasi/dist/version.js"() {
|
|
1861
|
-
VERSION = "3.6.
|
|
1861
|
+
VERSION = "3.6.3";
|
|
1862
1862
|
}
|
|
1863
1863
|
});
|
|
1864
1864
|
|
|
@@ -3009,6 +3009,17 @@ var init_dist = __esm({
|
|
|
3009
3009
|
const vm = this;
|
|
3010
3010
|
vm._ownedHandles.add(resolveHandle);
|
|
3011
3011
|
vm._ownedHandles.add(rejectHandle);
|
|
3012
|
+
let resolved = false;
|
|
3013
|
+
const settle = (resolver, value) => {
|
|
3014
|
+
if (resolved)
|
|
3015
|
+
return;
|
|
3016
|
+
resolved = true;
|
|
3017
|
+
vm.callFunctionRaw(resolver, vm.undefined, value).dispose();
|
|
3018
|
+
vm._ownedHandles.delete(resolveHandle);
|
|
3019
|
+
vm._ownedHandles.delete(rejectHandle);
|
|
3020
|
+
resolveHandle.dispose();
|
|
3021
|
+
rejectHandle.dispose();
|
|
3022
|
+
};
|
|
3012
3023
|
let _settled = null;
|
|
3013
3024
|
return {
|
|
3014
3025
|
handle: promiseHandle,
|
|
@@ -3030,14 +3041,10 @@ var init_dist = __esm({
|
|
|
3030
3041
|
return _settled;
|
|
3031
3042
|
},
|
|
3032
3043
|
resolve(value) {
|
|
3033
|
-
|
|
3034
|
-
vm._ownedHandles.delete(resolveHandle);
|
|
3035
|
-
resolveHandle.dispose();
|
|
3044
|
+
settle(resolveHandle, value);
|
|
3036
3045
|
},
|
|
3037
3046
|
reject(value) {
|
|
3038
|
-
|
|
3039
|
-
vm._ownedHandles.delete(rejectHandle);
|
|
3040
|
-
rejectHandle.dispose();
|
|
3047
|
+
settle(rejectHandle, value);
|
|
3041
3048
|
}
|
|
3042
3049
|
};
|
|
3043
3050
|
}
|
|
@@ -19615,10 +19622,14 @@ function remoteHttps(url) {
|
|
|
19615
19622
|
if (protocol !== "https:") return false;
|
|
19616
19623
|
return !(host === "localhost" || host.endsWith(".localhost") || host === "host.slicc.internal" || host === "[::1]" || LOOPBACK_V4.test(host));
|
|
19617
19624
|
}
|
|
19618
|
-
function
|
|
19625
|
+
function corsBlocked(cause, kernel) {
|
|
19626
|
+
if (cause?.detail === "transport") return true;
|
|
19627
|
+
return !kernel.marksTransport && cause?.code === "ECONNREFUSED" && remoteHttps(kernel.url);
|
|
19628
|
+
}
|
|
19629
|
+
function transportHint(err, kernel) {
|
|
19619
19630
|
if (err instanceof TypeError) {
|
|
19620
19631
|
const cause = err.cause;
|
|
19621
|
-
if (
|
|
19632
|
+
if (kernel && corsBlocked(cause, kernel)) {
|
|
19622
19633
|
return `${NETWORK_HINT}: ${err.message}`;
|
|
19623
19634
|
}
|
|
19624
19635
|
if (cause?.code === "ECONNREFUSED" || cause?.code === "ENETUNREACH") {
|
|
@@ -20693,7 +20704,7 @@ async function resolveAuthProvider(platform2, hasAuthHeader, url, target, config
|
|
|
20693
20704
|
}
|
|
20694
20705
|
return { provider, credentialSecrets };
|
|
20695
20706
|
}
|
|
20696
|
-
function classifyConnectionError(err, target, interrupted,
|
|
20707
|
+
function classifyConnectionError(err, target, interrupted, platform2, url) {
|
|
20697
20708
|
if (err instanceof TransportRefusalError) {
|
|
20698
20709
|
const hint = "in seven, reach the host via http://host.slicc.internal:<port>; in tests, enable the transport's hostLoopback";
|
|
20699
20710
|
return {
|
|
@@ -20711,8 +20722,8 @@ function classifyConnectionError(err, target, interrupted, platformKind, url) {
|
|
|
20711
20722
|
if (interrupted) {
|
|
20712
20723
|
return { code: EXIT_INTERRUPTED, kind: "interrupted", msg: "interrupted" };
|
|
20713
20724
|
}
|
|
20714
|
-
const
|
|
20715
|
-
const msg = transportHint(err,
|
|
20725
|
+
const kernel = platform2.kind === "kernel" ? { url, marksTransport: platform2.fetchMarksTransport === true } : void 0;
|
|
20726
|
+
const msg = transportHint(err, kernel) ?? `connection failed: ${err.message}`;
|
|
20716
20727
|
return { code: EXIT_CONNECTION, kind: "connection", msg };
|
|
20717
20728
|
}
|
|
20718
20729
|
function buildRoots(rootArgs, isStdio, cwd) {
|
|
@@ -20899,7 +20910,7 @@ async function runClientVerb(platform2, version, parsed) {
|
|
|
20899
20910
|
);
|
|
20900
20911
|
return EXIT_CONNECTION;
|
|
20901
20912
|
}
|
|
20902
|
-
const e = classifyConnectionError(err, target, interrupted, platform2
|
|
20913
|
+
const e = classifyConnectionError(err, target, interrupted, platform2, resolved.url);
|
|
20903
20914
|
if (e.code === EXIT_INTERRUPTED) {
|
|
20904
20915
|
await platform2.write(2, "mcpcat: interrupted\n");
|
|
20905
20916
|
return termExitCode;
|
|
@@ -21629,5 +21640,5 @@ try {
|
|
|
21629
21640
|
});
|
|
21630
21641
|
} catch {
|
|
21631
21642
|
}
|
|
21632
|
-
var code = await run(platform, "0.30.
|
|
21643
|
+
var code = await run(platform, "0.30.5", args);
|
|
21633
21644
|
process.exit(code);
|
package/dist/kernel/mcpcat.mjs
CHANGED
|
@@ -1479,7 +1479,7 @@ var init_extensions = __esm({
|
|
|
1479
1479
|
var VERSION;
|
|
1480
1480
|
var init_version = __esm({
|
|
1481
1481
|
"node_modules/quickjs-wasi/dist/version.js"() {
|
|
1482
|
-
VERSION = "3.6.
|
|
1482
|
+
VERSION = "3.6.3";
|
|
1483
1483
|
}
|
|
1484
1484
|
});
|
|
1485
1485
|
|
|
@@ -2630,6 +2630,17 @@ var init_dist = __esm({
|
|
|
2630
2630
|
const vm = this;
|
|
2631
2631
|
vm._ownedHandles.add(resolveHandle);
|
|
2632
2632
|
vm._ownedHandles.add(rejectHandle);
|
|
2633
|
+
let resolved = false;
|
|
2634
|
+
const settle = (resolver, value) => {
|
|
2635
|
+
if (resolved)
|
|
2636
|
+
return;
|
|
2637
|
+
resolved = true;
|
|
2638
|
+
vm.callFunctionRaw(resolver, vm.undefined, value).dispose();
|
|
2639
|
+
vm._ownedHandles.delete(resolveHandle);
|
|
2640
|
+
vm._ownedHandles.delete(rejectHandle);
|
|
2641
|
+
resolveHandle.dispose();
|
|
2642
|
+
rejectHandle.dispose();
|
|
2643
|
+
};
|
|
2633
2644
|
let _settled = null;
|
|
2634
2645
|
return {
|
|
2635
2646
|
handle: promiseHandle,
|
|
@@ -2651,14 +2662,10 @@ var init_dist = __esm({
|
|
|
2651
2662
|
return _settled;
|
|
2652
2663
|
},
|
|
2653
2664
|
resolve(value) {
|
|
2654
|
-
|
|
2655
|
-
vm._ownedHandles.delete(resolveHandle);
|
|
2656
|
-
resolveHandle.dispose();
|
|
2665
|
+
settle(resolveHandle, value);
|
|
2657
2666
|
},
|
|
2658
2667
|
reject(value) {
|
|
2659
|
-
|
|
2660
|
-
vm._ownedHandles.delete(rejectHandle);
|
|
2661
|
-
rejectHandle.dispose();
|
|
2668
|
+
settle(rejectHandle, value);
|
|
2662
2669
|
}
|
|
2663
2670
|
};
|
|
2664
2671
|
}
|
|
@@ -19132,10 +19139,14 @@ function remoteHttps(url) {
|
|
|
19132
19139
|
if (protocol !== "https:") return false;
|
|
19133
19140
|
return !(host === "localhost" || host.endsWith(".localhost") || host === "host.slicc.internal" || host === "[::1]" || LOOPBACK_V4.test(host));
|
|
19134
19141
|
}
|
|
19135
|
-
function
|
|
19142
|
+
function corsBlocked(cause, kernel) {
|
|
19143
|
+
if (cause?.detail === "transport") return true;
|
|
19144
|
+
return !kernel.marksTransport && cause?.code === "ECONNREFUSED" && remoteHttps(kernel.url);
|
|
19145
|
+
}
|
|
19146
|
+
function transportHint(err, kernel) {
|
|
19136
19147
|
if (err instanceof TypeError) {
|
|
19137
19148
|
const cause = err.cause;
|
|
19138
|
-
if (
|
|
19149
|
+
if (kernel && corsBlocked(cause, kernel)) {
|
|
19139
19150
|
return `${NETWORK_HINT}: ${err.message}`;
|
|
19140
19151
|
}
|
|
19141
19152
|
if (cause?.code === "ECONNREFUSED" || cause?.code === "ENETUNREACH") {
|
|
@@ -20210,7 +20221,7 @@ async function resolveAuthProvider(platform2, hasAuthHeader, url, target, config
|
|
|
20210
20221
|
}
|
|
20211
20222
|
return { provider, credentialSecrets };
|
|
20212
20223
|
}
|
|
20213
|
-
function classifyConnectionError(err, target, interrupted,
|
|
20224
|
+
function classifyConnectionError(err, target, interrupted, platform2, url) {
|
|
20214
20225
|
if (err instanceof TransportRefusalError) {
|
|
20215
20226
|
const hint = "in seven, reach the host via http://host.slicc.internal:<port>; in tests, enable the transport's hostLoopback";
|
|
20216
20227
|
return {
|
|
@@ -20228,8 +20239,8 @@ function classifyConnectionError(err, target, interrupted, platformKind, url) {
|
|
|
20228
20239
|
if (interrupted) {
|
|
20229
20240
|
return { code: EXIT_INTERRUPTED, kind: "interrupted", msg: "interrupted" };
|
|
20230
20241
|
}
|
|
20231
|
-
const
|
|
20232
|
-
const msg = transportHint(err,
|
|
20242
|
+
const kernel = platform2.kind === "kernel" ? { url, marksTransport: platform2.fetchMarksTransport === true } : void 0;
|
|
20243
|
+
const msg = transportHint(err, kernel) ?? `connection failed: ${err.message}`;
|
|
20233
20244
|
return { code: EXIT_CONNECTION, kind: "connection", msg };
|
|
20234
20245
|
}
|
|
20235
20246
|
function buildRoots(rootArgs, isStdio, cwd) {
|
|
@@ -20416,7 +20427,7 @@ async function runClientVerb(platform2, version, parsed) {
|
|
|
20416
20427
|
);
|
|
20417
20428
|
return EXIT_CONNECTION;
|
|
20418
20429
|
}
|
|
20419
|
-
const e = classifyConnectionError(err, target, interrupted, platform2
|
|
20430
|
+
const e = classifyConnectionError(err, target, interrupted, platform2, resolved.url);
|
|
20420
20431
|
if (e.code === EXIT_INTERRUPTED) {
|
|
20421
20432
|
await platform2.write(2, "mcpcat: interrupted\n");
|
|
20422
20433
|
return termExitCode;
|
|
@@ -20933,6 +20944,10 @@ async function kernelSeal(ctx, request) {
|
|
|
20933
20944
|
await f.close();
|
|
20934
20945
|
}
|
|
20935
20946
|
}
|
|
20947
|
+
function marksTransport(version) {
|
|
20948
|
+
const [major, minor] = (version ?? "").split(".").map(Number);
|
|
20949
|
+
return major > 1 || major === 1 && minor >= 170;
|
|
20950
|
+
}
|
|
20936
20951
|
function createKernelPlatform(ctx, options) {
|
|
20937
20952
|
const encoder2 = new TextEncoder();
|
|
20938
20953
|
return {
|
|
@@ -20960,7 +20975,8 @@ function createKernelPlatform(ctx, options) {
|
|
|
20960
20975
|
async seal(request) {
|
|
20961
20976
|
return kernelSeal(ctx, request);
|
|
20962
20977
|
},
|
|
20963
|
-
packageDir: options?.packageDir
|
|
20978
|
+
packageDir: options?.packageDir,
|
|
20979
|
+
fetchMarksTransport: marksTransport(ctx.kernel?.version)
|
|
20964
20980
|
};
|
|
20965
20981
|
}
|
|
20966
20982
|
|
|
@@ -20976,7 +20992,7 @@ async function main(ctx) {
|
|
|
20976
20992
|
packageDir: "/node_modules/@ai-ecoverse/mcpcat"
|
|
20977
20993
|
});
|
|
20978
20994
|
const args = ctx.argv.slice(1);
|
|
20979
|
-
return run(platform2, "0.30.
|
|
20995
|
+
return run(platform2, "0.30.5", args);
|
|
20980
20996
|
}
|
|
20981
20997
|
export {
|
|
20982
20998
|
main as default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/mcpcat",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.5",
|
|
4
4
|
"description": "A curl for the Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"trust:dry": "npx fledgling sync --dry-run -y --skip-publish"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@ai-ecoverse/slicc-kernel": "1.
|
|
62
|
-
"@ai-ecoverse/slicc-shared-web": "2.13.
|
|
61
|
+
"@ai-ecoverse/slicc-kernel": "1.170.0",
|
|
62
|
+
"@ai-ecoverse/slicc-shared-web": "2.13.4",
|
|
63
63
|
"@biomejs/biome": "2.5.15",
|
|
64
64
|
"@earendil-works/pi-codemode": "1.3.0",
|
|
65
65
|
"@earendil-works/pi-mcp": "1.3.0",
|
|
@@ -68,10 +68,15 @@
|
|
|
68
68
|
"lefthook": "2.2.2",
|
|
69
69
|
"monocart-coverage-reports": "2.13.2",
|
|
70
70
|
"proper-lockfile": "4.1.2",
|
|
71
|
-
"quickjs-wasi": "3.6.
|
|
71
|
+
"quickjs-wasi": "3.6.3",
|
|
72
72
|
"semantic-release": "25.0.9",
|
|
73
73
|
"typescript": "7.0.2"
|
|
74
74
|
},
|
|
75
|
+
"overrides": {
|
|
76
|
+
"@earendil-works/pi-codemode": {
|
|
77
|
+
"quickjs-wasi": "$quickjs-wasi"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
75
80
|
"allowScripts": {
|
|
76
81
|
"esbuild@0.28.2": true
|
|
77
82
|
}
|