@hasna/recordings 0.1.21 → 0.1.22
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/http.d.ts +2 -1
- package/dist/mcp/http.d.ts.map +1 -1
- package/dist/mcp/index.js +7 -7
- package/package.json +1 -1
package/dist/mcp/http.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
export declare const DEFAULT_MCP_HTTP_PORT =
|
|
2
|
+
export declare const DEFAULT_MCP_HTTP_PORT = 8873;
|
|
3
3
|
export declare const MCP_HTTP_HOST = "127.0.0.1";
|
|
4
4
|
export declare function isHttpMode(args: string[]): boolean;
|
|
5
|
+
export declare function isStdioMode(args: string[]): boolean;
|
|
5
6
|
export declare function resolveMcpHttpPort(args: string[]): number;
|
|
6
7
|
export declare function handleMcpRequest(req: Request, buildServer: () => McpServer): Promise<Response>;
|
|
7
8
|
export declare function startMcpHttpServer(options: {
|
package/dist/mcp/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/mcp/http.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAC1C,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAElD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAQzD;AAED,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,OAAO,EACZ,WAAW,EAAE,MAAM,SAAS,GAC3B,OAAO,CAAC,QAAQ,CAAC,CAOnB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,SAAS,CAAC;CAC9B,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,CAoB/B"}
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/mcp/http.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAC1C,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAElD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAEnD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAQzD;AAED,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,OAAO,EACZ,WAAW,EAAE,MAAM,SAAS,GAC3B,OAAO,CAAC,QAAQ,CAAC,CAOnB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,SAAS,CAAC;CAC9B,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,CAoB/B"}
|
package/dist/mcp/index.js
CHANGED
|
@@ -92,10 +92,10 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
92
92
|
|
|
93
93
|
// src/mcp/http.ts
|
|
94
94
|
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
|
|
95
|
-
var DEFAULT_MCP_HTTP_PORT =
|
|
95
|
+
var DEFAULT_MCP_HTTP_PORT = 8873;
|
|
96
96
|
var MCP_HTTP_HOST = "127.0.0.1";
|
|
97
|
-
function
|
|
98
|
-
return args.includes("--
|
|
97
|
+
function isStdioMode(args) {
|
|
98
|
+
return args.includes("--stdio") || process.env.MCP_STDIO === "1";
|
|
99
99
|
}
|
|
100
100
|
function resolveMcpHttpPort(args) {
|
|
101
101
|
const portIdx = args.indexOf("--port");
|
|
@@ -15416,12 +15416,12 @@ Params: none`
|
|
|
15416
15416
|
}
|
|
15417
15417
|
async function main() {
|
|
15418
15418
|
const args = process.argv.slice(2);
|
|
15419
|
-
if (
|
|
15420
|
-
|
|
15419
|
+
if (isStdioMode(args)) {
|
|
15420
|
+
const transport = new StdioServerTransport;
|
|
15421
|
+
await buildServer().connect(transport);
|
|
15421
15422
|
return;
|
|
15422
15423
|
}
|
|
15423
|
-
|
|
15424
|
-
await buildServer().connect(transport);
|
|
15424
|
+
startMcpHttpServer({ name: "recordings", port: resolveMcpHttpPort(args), buildServer });
|
|
15425
15425
|
}
|
|
15426
15426
|
if (import.meta.main) {
|
|
15427
15427
|
await main();
|
package/package.json
CHANGED