rrce-workflow 0.2.30 → 0.2.32
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 +9 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1175,7 +1175,7 @@ import {
|
|
|
1175
1175
|
ListPromptsRequestSchema,
|
|
1176
1176
|
GetPromptRequestSchema
|
|
1177
1177
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
1178
|
-
async function startMCPServer() {
|
|
1178
|
+
async function startMCPServer(options = {}) {
|
|
1179
1179
|
try {
|
|
1180
1180
|
logger.info("Starting MCP Server...");
|
|
1181
1181
|
process.on("uncaughtException", (error) => {
|
|
@@ -1197,8 +1197,12 @@ async function startMCPServer() {
|
|
|
1197
1197
|
registerResourceHandlers(mcpServer);
|
|
1198
1198
|
registerToolHandlers(mcpServer);
|
|
1199
1199
|
registerPromptHandlers(mcpServer);
|
|
1200
|
-
|
|
1201
|
-
|
|
1200
|
+
if (!options.interactive) {
|
|
1201
|
+
const transport = new StdioServerTransport();
|
|
1202
|
+
await mcpServer.connect(transport);
|
|
1203
|
+
} else {
|
|
1204
|
+
logger.info("Running in interactive mode (Stdio transport detached)");
|
|
1205
|
+
}
|
|
1202
1206
|
serverState = { running: true, port: config.server.port, pid: process.pid };
|
|
1203
1207
|
const exposed = getExposedProjects().map((p) => p.name).join(", ");
|
|
1204
1208
|
logger.info(`RRCE MCP Hub started (pid: ${process.pid})`, { exposedProjects: exposed });
|
|
@@ -1844,7 +1848,7 @@ var init_App = __esm({
|
|
|
1844
1848
|
const status = getMCPServerStatus();
|
|
1845
1849
|
if (!status.running) {
|
|
1846
1850
|
try {
|
|
1847
|
-
const res = await startMCPServer();
|
|
1851
|
+
const res = await startMCPServer({ interactive: true });
|
|
1848
1852
|
setServerInfo((prev) => ({ ...prev, running: true, port: res.port, pid: res.pid }));
|
|
1849
1853
|
} catch (e) {
|
|
1850
1854
|
setLogs((prev) => [...prev, `Error starting server: ${e}`]);
|
|
@@ -1901,7 +1905,7 @@ var init_App = __esm({
|
|
|
1901
1905
|
if (input === "r") {
|
|
1902
1906
|
setLogs((prev) => [...prev, "[INFO] Config reload requested..."]);
|
|
1903
1907
|
}
|
|
1904
|
-
});
|
|
1908
|
+
}, { isActive: true });
|
|
1905
1909
|
const termHeight = process.stdout.rows || 24;
|
|
1906
1910
|
const logHeight = Math.max(5, termHeight - 12);
|
|
1907
1911
|
return /* @__PURE__ */ jsx6(
|