@fileverse/api 0.0.7 → 0.0.8

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/index.js CHANGED
@@ -18549,6 +18549,12 @@ var startServer = async () => {
18549
18549
  await startWorker(concurrency);
18550
18550
  logger.info("Inline worker started");
18551
18551
  }
18552
+ app_default.use((req, _res, next) => {
18553
+ if (req.method === "POST" && req.path === "/" && req.body?.jsonrpc) {
18554
+ req.url = "/mcp";
18555
+ }
18556
+ next();
18557
+ });
18552
18558
  app_default.use("/mcp", createMcpRouter({ serverUrl: `http://localhost:${port}`, apiKey }));
18553
18559
  logger.info("MCP HTTP transport mounted at /mcp");
18554
18560
  server = app_default.listen(port, ip, async () => {