kojee-mcp 0.2.0 → 0.2.1
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.
|
@@ -532,6 +532,11 @@ var ToolRegistry = class {
|
|
|
532
532
|
const result = await this.gateway.sendRpc("tools/list", {
|
|
533
533
|
include_schema: true
|
|
534
534
|
});
|
|
535
|
+
const maybeError = result;
|
|
536
|
+
if (maybeError.isError) {
|
|
537
|
+
const msg = maybeError.content?.[0]?.text ?? "unknown error";
|
|
538
|
+
throw new Error(`Gateway rejected tools/list: ${msg}`);
|
|
539
|
+
}
|
|
535
540
|
const toolList = result?.tools;
|
|
536
541
|
if (!toolList || !Array.isArray(toolList)) {
|
|
537
542
|
console.error("[tools] No tools returned from gateway");
|
|
@@ -648,6 +653,10 @@ async function startProxy(config) {
|
|
|
648
653
|
`[kojee-mcp] Ready \u2014 ${registry.toolCount} tools available from ${config.url}`
|
|
649
654
|
);
|
|
650
655
|
const server = createMcpServer(registry);
|
|
656
|
+
process.stdin.on("end", () => {
|
|
657
|
+
console.error("[kojee-mcp] stdin closed, exiting");
|
|
658
|
+
process.exit(0);
|
|
659
|
+
});
|
|
651
660
|
await startMcpServer(server);
|
|
652
661
|
}
|
|
653
662
|
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED