@ai-ecoverse/mcpcat 0.15.8 → 0.15.9
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/host/mcpcat.mjs +11 -5
- package/dist/kernel/mcpcat.mjs +11 -5
- package/package.json +4 -3
package/dist/host/mcpcat.mjs
CHANGED
|
@@ -12828,9 +12828,12 @@ function concat(chunks) {
|
|
|
12828
12828
|
return out;
|
|
12829
12829
|
}
|
|
12830
12830
|
var KILL_GRACE_MS = 2e3;
|
|
12831
|
+
var SIGNAL_EXIT = { SIGINT: 130, SIGTERM: 143, SIGHUP: 129 };
|
|
12831
12832
|
async function trapShutdown(platform2, handler) {
|
|
12832
12833
|
await Promise.all(
|
|
12833
|
-
["SIGINT", "SIGTERM", "SIGHUP"].map(
|
|
12834
|
+
["SIGINT", "SIGTERM", "SIGHUP"].map(
|
|
12835
|
+
(sig) => platform2.onSignal?.(sig, () => handler(sig))
|
|
12836
|
+
)
|
|
12834
12837
|
);
|
|
12835
12838
|
}
|
|
12836
12839
|
async function killInflight() {
|
|
@@ -13042,10 +13045,13 @@ function createToolExecutor(platform2, clis, allTools, childEnv, options, serveC
|
|
|
13042
13045
|
async function discoverWithSignal(platform2, commands, childEnv, cwd) {
|
|
13043
13046
|
const clis = [];
|
|
13044
13047
|
let earlyShutdown = false;
|
|
13048
|
+
let shutdownExit = SIGNAL_EXIT.SIGTERM;
|
|
13045
13049
|
let inflightDone;
|
|
13046
13050
|
const earlyAbort = new AbortController();
|
|
13047
|
-
const onShutdown = () => {
|
|
13051
|
+
const onShutdown = (sig) => {
|
|
13052
|
+
if (earlyShutdown) return;
|
|
13048
13053
|
earlyShutdown = true;
|
|
13054
|
+
shutdownExit = SIGNAL_EXIT[sig];
|
|
13049
13055
|
earlyAbort.abort();
|
|
13050
13056
|
inflightDone = killInflight();
|
|
13051
13057
|
};
|
|
@@ -13055,13 +13061,13 @@ async function discoverWithSignal(platform2, commands, childEnv, cwd) {
|
|
|
13055
13061
|
const cli = await discoverCli(platform2, cmd.path, cmd.name, childEnv, cwd, earlyAbort.signal);
|
|
13056
13062
|
clis.push(cli);
|
|
13057
13063
|
} catch (err) {
|
|
13058
|
-
if (earlyShutdown) return { exitCode:
|
|
13064
|
+
if (earlyShutdown) return { exitCode: shutdownExit, inflightDone };
|
|
13059
13065
|
await platform2.write(2, `mcpcat serve: ${err.message}
|
|
13060
13066
|
`);
|
|
13061
13067
|
return { exitCode: 2 };
|
|
13062
13068
|
}
|
|
13063
13069
|
}
|
|
13064
|
-
if (earlyShutdown) return { exitCode:
|
|
13070
|
+
if (earlyShutdown) return { exitCode: shutdownExit, inflightDone };
|
|
13065
13071
|
return { clis };
|
|
13066
13072
|
}
|
|
13067
13073
|
async function resolveBearer(platform2, options) {
|
|
@@ -16957,5 +16963,5 @@ try {
|
|
|
16957
16963
|
});
|
|
16958
16964
|
} catch {
|
|
16959
16965
|
}
|
|
16960
|
-
var code = await run(platform, "0.15.
|
|
16966
|
+
var code = await run(platform, "0.15.9", args);
|
|
16961
16967
|
process.exit(code);
|
package/dist/kernel/mcpcat.mjs
CHANGED
|
@@ -12449,9 +12449,12 @@ function concat(chunks) {
|
|
|
12449
12449
|
return out;
|
|
12450
12450
|
}
|
|
12451
12451
|
var KILL_GRACE_MS = 2e3;
|
|
12452
|
+
var SIGNAL_EXIT = { SIGINT: 130, SIGTERM: 143, SIGHUP: 129 };
|
|
12452
12453
|
async function trapShutdown(platform2, handler) {
|
|
12453
12454
|
await Promise.all(
|
|
12454
|
-
["SIGINT", "SIGTERM", "SIGHUP"].map(
|
|
12455
|
+
["SIGINT", "SIGTERM", "SIGHUP"].map(
|
|
12456
|
+
(sig) => platform2.onSignal?.(sig, () => handler(sig))
|
|
12457
|
+
)
|
|
12455
12458
|
);
|
|
12456
12459
|
}
|
|
12457
12460
|
async function killInflight() {
|
|
@@ -12663,10 +12666,13 @@ function createToolExecutor(platform2, clis, allTools, childEnv, options, serveC
|
|
|
12663
12666
|
async function discoverWithSignal(platform2, commands, childEnv, cwd) {
|
|
12664
12667
|
const clis = [];
|
|
12665
12668
|
let earlyShutdown = false;
|
|
12669
|
+
let shutdownExit = SIGNAL_EXIT.SIGTERM;
|
|
12666
12670
|
let inflightDone;
|
|
12667
12671
|
const earlyAbort = new AbortController();
|
|
12668
|
-
const onShutdown = () => {
|
|
12672
|
+
const onShutdown = (sig) => {
|
|
12673
|
+
if (earlyShutdown) return;
|
|
12669
12674
|
earlyShutdown = true;
|
|
12675
|
+
shutdownExit = SIGNAL_EXIT[sig];
|
|
12670
12676
|
earlyAbort.abort();
|
|
12671
12677
|
inflightDone = killInflight();
|
|
12672
12678
|
};
|
|
@@ -12676,13 +12682,13 @@ async function discoverWithSignal(platform2, commands, childEnv, cwd) {
|
|
|
12676
12682
|
const cli = await discoverCli(platform2, cmd.path, cmd.name, childEnv, cwd, earlyAbort.signal);
|
|
12677
12683
|
clis.push(cli);
|
|
12678
12684
|
} catch (err) {
|
|
12679
|
-
if (earlyShutdown) return { exitCode:
|
|
12685
|
+
if (earlyShutdown) return { exitCode: shutdownExit, inflightDone };
|
|
12680
12686
|
await platform2.write(2, `mcpcat serve: ${err.message}
|
|
12681
12687
|
`);
|
|
12682
12688
|
return { exitCode: 2 };
|
|
12683
12689
|
}
|
|
12684
12690
|
}
|
|
12685
|
-
if (earlyShutdown) return { exitCode:
|
|
12691
|
+
if (earlyShutdown) return { exitCode: shutdownExit, inflightDone };
|
|
12686
12692
|
return { clis };
|
|
12687
12693
|
}
|
|
12688
12694
|
async function resolveBearer(platform2, options) {
|
|
@@ -16678,7 +16684,7 @@ async function main(ctx) {
|
|
|
16678
16684
|
packageDir: "/node_modules/@ai-ecoverse/mcpcat"
|
|
16679
16685
|
});
|
|
16680
16686
|
const args = ctx.argv.slice(1);
|
|
16681
|
-
return run(platform2, "0.15.
|
|
16687
|
+
return run(platform2, "0.15.9", args);
|
|
16682
16688
|
}
|
|
16683
16689
|
export {
|
|
16684
16690
|
main as default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/mcpcat",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.9",
|
|
4
4
|
"description": "A curl for the Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -56,14 +56,15 @@
|
|
|
56
56
|
"trust:dry": "npx fledgling sync --dry-run -y --skip-publish"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@ai-ecoverse/slicc-bios": "1.
|
|
60
|
-
"@ai-ecoverse/slicc-kernel": "1.
|
|
59
|
+
"@ai-ecoverse/slicc-bios": "1.2.0",
|
|
60
|
+
"@ai-ecoverse/slicc-kernel": "1.97.0",
|
|
61
61
|
"@ai-ecoverse/slicc-shared-web": "1.20.0",
|
|
62
62
|
"@biomejs/biome": "2.5.15",
|
|
63
63
|
"@earendil-works/pi-codemode": "1.2.0",
|
|
64
64
|
"@earendil-works/pi-mcp": "1.2.0",
|
|
65
65
|
"@types/node": "26.6.5",
|
|
66
66
|
"esbuild": "0.28.2",
|
|
67
|
+
"kernel-cert-new": "npm:@ai-ecoverse/slicc-kernel@1.97.0",
|
|
67
68
|
"monocart-coverage-reports": "2.13.2",
|
|
68
69
|
"proper-lockfile": "4.1.2",
|
|
69
70
|
"quickjs-wasi": "3.6.2",
|