@ctrl-spc/cli 1.2.2 → 1.2.3
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/mcp.js +2 -1
- package/package.json +1 -1
package/dist/mcp.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
2
3
|
import { createServer as createHttpServer } from 'node:http';
|
|
3
4
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
5
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
@@ -1283,7 +1284,7 @@ export function protocolPromptHandler() {
|
|
|
1283
1284
|
// ---------------------------------------------------------------------------
|
|
1284
1285
|
const IDLE_TIMEOUT_MS = 10 * 60 * 1000;
|
|
1285
1286
|
const HEARTBEAT_INTERVAL_MS = 30 * 1000;
|
|
1286
|
-
export const BROKER_VERSION = '
|
|
1287
|
+
export const BROKER_VERSION = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version;
|
|
1287
1288
|
async function readJsonBody(req) {
|
|
1288
1289
|
const chunks = [];
|
|
1289
1290
|
for await (const chunk of req)
|