@ai-ecoverse/mcpcat 0.11.0 → 0.12.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 +8 -2
- package/dist/host/mcpcat.mjs +16 -4
- package/dist/kernel/mcpcat.mjs +16 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
A curl for the Model Context Protocol. One command that talks to any MCP server from a shell, and turns any shell command into an MCP server.
|
|
4
4
|
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
curl -fsSL https://github.com/ai-ecoverse/mcpcat/releases/latest/download/install.sh | sh
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or via npm:
|
|
12
|
+
|
|
5
13
|
```sh
|
|
6
14
|
npm install -g @ai-ecoverse/mcpcat
|
|
7
|
-
mcpcat --version
|
|
8
|
-
mcpcat --help
|
|
9
15
|
```
|
|
10
16
|
|
|
11
17
|
mcpcat runs natively on macOS, Linux and Windows (Node ≥ 24), and inside Sliccy Seven as a kernel program, with the same flags, the same output and the same config file in both places.
|
package/dist/host/mcpcat.mjs
CHANGED
|
@@ -8643,13 +8643,16 @@ async function createSandbox(platform2, tools, globals, timeoutMs) {
|
|
|
8643
8643
|
return new InlineCodemodeSandbox2({ tools, globals, timeoutMs, wasm });
|
|
8644
8644
|
}
|
|
8645
8645
|
const { CodemodeSandbox: CodemodeSandbox2, loadQuickJSWasm: loadQuickJSWasm2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports));
|
|
8646
|
-
const
|
|
8646
|
+
const getSeaDir = globalThis.__mcpcat_get_sea_asset_dir;
|
|
8647
|
+
const seaDir = getSeaDir?.();
|
|
8648
|
+
const wasmPath = seaDir ? `${seaDir}/quickjs.wasm` : await resolveWasmPath(platform2);
|
|
8649
|
+
const workerUrl = seaDir ? new URL(`file://${seaDir}/codemode-worker.mjs`) : new URL("./codemode-worker.mjs", import.meta.url);
|
|
8647
8650
|
return new CodemodeSandbox2({
|
|
8648
8651
|
tools,
|
|
8649
8652
|
globals,
|
|
8650
8653
|
timeoutMs,
|
|
8651
8654
|
wasm: loadQuickJSWasm2(wasmPath),
|
|
8652
|
-
workerUrl
|
|
8655
|
+
workerUrl
|
|
8653
8656
|
});
|
|
8654
8657
|
}
|
|
8655
8658
|
async function resolveWasmPath(platform2) {
|
|
@@ -14087,11 +14090,20 @@ async function runClientVerb(platform2, version, parsed) {
|
|
|
14087
14090
|
return EXIT_AUTH;
|
|
14088
14091
|
}
|
|
14089
14092
|
const msg = transportHint(err) ?? `connection failed: ${err.message}`;
|
|
14093
|
+
if (interrupted) {
|
|
14094
|
+
await platform2.write(2, "mcpcat: interrupted\n");
|
|
14095
|
+
return EXIT_INTERRUPTED;
|
|
14096
|
+
}
|
|
14090
14097
|
await writeErr(platform2, parsed.jsonOutput, "connection", msg);
|
|
14091
14098
|
return EXIT_CONNECTION;
|
|
14092
14099
|
}
|
|
14093
14100
|
try {
|
|
14094
|
-
|
|
14101
|
+
const code2 = await runVerb(platform2, parsed, conn, onProgress);
|
|
14102
|
+
if (interrupted) {
|
|
14103
|
+
await platform2.write(2, "mcpcat: interrupted\n");
|
|
14104
|
+
return EXIT_INTERRUPTED;
|
|
14105
|
+
}
|
|
14106
|
+
return code2;
|
|
14095
14107
|
} catch (err) {
|
|
14096
14108
|
if (interrupted) {
|
|
14097
14109
|
await platform2.write(2, "mcpcat: interrupted\n");
|
|
@@ -14315,5 +14327,5 @@ function createHostPlatform() {
|
|
|
14315
14327
|
// src/host.ts
|
|
14316
14328
|
var platform = createHostPlatform();
|
|
14317
14329
|
var args = process.argv.slice(2);
|
|
14318
|
-
var code = await run(platform, "0.
|
|
14330
|
+
var code = await run(platform, "0.12.0", args);
|
|
14319
14331
|
process.exit(code);
|
package/dist/kernel/mcpcat.mjs
CHANGED
|
@@ -8256,13 +8256,16 @@ async function createSandbox(platform2, tools, globals, timeoutMs) {
|
|
|
8256
8256
|
return new InlineCodemodeSandbox2({ tools, globals, timeoutMs, wasm });
|
|
8257
8257
|
}
|
|
8258
8258
|
const { CodemodeSandbox: CodemodeSandbox2, loadQuickJSWasm: loadQuickJSWasm2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports));
|
|
8259
|
-
const
|
|
8259
|
+
const getSeaDir = globalThis.__mcpcat_get_sea_asset_dir;
|
|
8260
|
+
const seaDir = getSeaDir?.();
|
|
8261
|
+
const wasmPath = seaDir ? `${seaDir}/quickjs.wasm` : await resolveWasmPath(platform2);
|
|
8262
|
+
const workerUrl = seaDir ? new URL(`file://${seaDir}/codemode-worker.mjs`) : new URL("./codemode-worker.mjs", import.meta.url);
|
|
8260
8263
|
return new CodemodeSandbox2({
|
|
8261
8264
|
tools,
|
|
8262
8265
|
globals,
|
|
8263
8266
|
timeoutMs,
|
|
8264
8267
|
wasm: loadQuickJSWasm2(wasmPath),
|
|
8265
|
-
workerUrl
|
|
8268
|
+
workerUrl
|
|
8266
8269
|
});
|
|
8267
8270
|
}
|
|
8268
8271
|
async function resolveWasmPath(platform2) {
|
|
@@ -13700,11 +13703,20 @@ async function runClientVerb(platform2, version, parsed) {
|
|
|
13700
13703
|
return EXIT_AUTH;
|
|
13701
13704
|
}
|
|
13702
13705
|
const msg = transportHint(err) ?? `connection failed: ${err.message}`;
|
|
13706
|
+
if (interrupted) {
|
|
13707
|
+
await platform2.write(2, "mcpcat: interrupted\n");
|
|
13708
|
+
return EXIT_INTERRUPTED;
|
|
13709
|
+
}
|
|
13703
13710
|
await writeErr(platform2, parsed.jsonOutput, "connection", msg);
|
|
13704
13711
|
return EXIT_CONNECTION;
|
|
13705
13712
|
}
|
|
13706
13713
|
try {
|
|
13707
|
-
|
|
13714
|
+
const code = await runVerb(platform2, parsed, conn, onProgress);
|
|
13715
|
+
if (interrupted) {
|
|
13716
|
+
await platform2.write(2, "mcpcat: interrupted\n");
|
|
13717
|
+
return EXIT_INTERRUPTED;
|
|
13718
|
+
}
|
|
13719
|
+
return code;
|
|
13708
13720
|
} catch (err) {
|
|
13709
13721
|
if (interrupted) {
|
|
13710
13722
|
await platform2.write(2, "mcpcat: interrupted\n");
|
|
@@ -13843,7 +13855,7 @@ async function main(ctx) {
|
|
|
13843
13855
|
packageDir: "/node_modules/@ai-ecoverse/mcpcat"
|
|
13844
13856
|
});
|
|
13845
13857
|
const args = ctx.argv.slice(1);
|
|
13846
|
-
return run(platform2, "0.
|
|
13858
|
+
return run(platform2, "0.12.0", args);
|
|
13847
13859
|
}
|
|
13848
13860
|
export {
|
|
13849
13861
|
main as default
|