@hasna/domains 0.0.11 → 0.0.12
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/cli/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/http.d.ts +2 -1
- package/dist/mcp/http.d.ts.map +1 -1
- package/dist/mcp/index.js +15 -10
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -19207,7 +19207,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
19207
19207
|
|
|
19208
19208
|
// node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js
|
|
19209
19209
|
var require_dist_cjs41 = __commonJS((exports) => {
|
|
19210
|
-
var __dirname = "/
|
|
19210
|
+
var __dirname = "/Users/hasna/Workspace/hasna/opensource/open-domains/node_modules/@aws-sdk/util-user-agent-node/dist-cjs";
|
|
19211
19211
|
var node_os = __require("os");
|
|
19212
19212
|
var node_process = __require("process");
|
|
19213
19213
|
var utilConfigProvider = require_dist_cjs33();
|
package/dist/index.js
CHANGED
|
@@ -15823,7 +15823,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
15823
15823
|
|
|
15824
15824
|
// node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js
|
|
15825
15825
|
var require_dist_cjs41 = __commonJS((exports) => {
|
|
15826
|
-
var __dirname = "/
|
|
15826
|
+
var __dirname = "/Users/hasna/Workspace/hasna/opensource/open-domains/node_modules/@aws-sdk/util-user-agent-node/dist-cjs";
|
|
15827
15827
|
var node_os = __require("os");
|
|
15828
15828
|
var node_process = __require("process");
|
|
15829
15829
|
var utilConfigProvider = require_dist_cjs33();
|
package/dist/mcp/http.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
export declare const MCP_HTTP_HOST = "127.0.0.1";
|
|
3
3
|
export declare const MCP_SERVER_NAME = "domains";
|
|
4
|
-
export declare const DEFAULT_MCP_HTTP_PORT =
|
|
4
|
+
export declare const DEFAULT_MCP_HTTP_PORT = 8859;
|
|
5
5
|
export declare function isHttpMode(argv: readonly string[]): boolean;
|
|
6
|
+
export declare function isStdioMode(argv: readonly string[]): boolean;
|
|
6
7
|
export declare function resolveMcpHttpPort(argv: readonly string[]): number;
|
|
7
8
|
export declare function mcpHealthJson(): {
|
|
8
9
|
status: string;
|
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,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAE3D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CASlE;AAED,wBAAgB,aAAa,IAAI;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAEhE;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,OAAO,EACZ,WAAW,EAAE,MAAM,SAAS,GAC3B,OAAO,CAAC,QAAQ,CAAC,CAOnB;AAED,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,SAAS,EAC5B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC,CAmB7C;AAED,wBAAgB,yBAAyB,IAAI,IAAI,CAAG"}
|
|
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,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,eAAe,YAAY,CAAC;AACzC,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAE3D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAE5D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CASlE;AAED,wBAAgB,aAAa,IAAI;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAEhE;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,OAAO,EACZ,WAAW,EAAE,MAAM,SAAS,GAC3B,OAAO,CAAC,QAAQ,CAAC,CAOnB;AAED,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,SAAS,EAC5B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC,CAmB7C;AAED,wBAAgB,yBAAyB,IAAI,IAAI,CAAG"}
|
package/dist/mcp/index.js
CHANGED
|
@@ -16073,7 +16073,7 @@ var require_package = __commonJS((exports, module) => {
|
|
|
16073
16073
|
|
|
16074
16074
|
// node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js
|
|
16075
16075
|
var require_dist_cjs41 = __commonJS((exports) => {
|
|
16076
|
-
var __dirname = "/
|
|
16076
|
+
var __dirname = "/Users/hasna/Workspace/hasna/opensource/open-domains/node_modules/@aws-sdk/util-user-agent-node/dist-cjs";
|
|
16077
16077
|
var node_os = __require("os");
|
|
16078
16078
|
var node_process = __require("process");
|
|
16079
16079
|
var utilConfigProvider = require_dist_cjs33();
|
|
@@ -31202,6 +31202,7 @@ __export(exports_http, {
|
|
|
31202
31202
|
resolveMcpHttpPort: () => resolveMcpHttpPort,
|
|
31203
31203
|
resetMcpHttpStateForTests: () => resetMcpHttpStateForTests,
|
|
31204
31204
|
mcpHealthJson: () => mcpHealthJson,
|
|
31205
|
+
isStdioMode: () => isStdioMode,
|
|
31205
31206
|
isHttpMode: () => isHttpMode,
|
|
31206
31207
|
handleMcpHttpRequest: () => handleMcpHttpRequest,
|
|
31207
31208
|
MCP_SERVER_NAME: () => MCP_SERVER_NAME,
|
|
@@ -31212,6 +31213,9 @@ import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/
|
|
|
31212
31213
|
function isHttpMode(argv) {
|
|
31213
31214
|
return argv.includes("--http") || process.env["MCP_HTTP"] === "1";
|
|
31214
31215
|
}
|
|
31216
|
+
function isStdioMode(argv) {
|
|
31217
|
+
return argv.includes("--stdio") || process.env["MCP_STDIO"] === "1";
|
|
31218
|
+
}
|
|
31215
31219
|
function resolveMcpHttpPort(argv) {
|
|
31216
31220
|
const portIndex = argv.indexOf("--port");
|
|
31217
31221
|
if (portIndex >= 0 && argv[portIndex + 1]) {
|
|
@@ -31253,7 +31257,7 @@ async function startHttpServer(buildServer, port) {
|
|
|
31253
31257
|
return { port: server.port, stop: () => server.stop(true) };
|
|
31254
31258
|
}
|
|
31255
31259
|
function resetMcpHttpStateForTests() {}
|
|
31256
|
-
var MCP_HTTP_HOST = "127.0.0.1", MCP_SERVER_NAME = "domains", DEFAULT_MCP_HTTP_PORT =
|
|
31260
|
+
var MCP_HTTP_HOST = "127.0.0.1", MCP_SERVER_NAME = "domains", DEFAULT_MCP_HTTP_PORT = 8859;
|
|
31257
31261
|
var init_http = () => {};
|
|
31258
31262
|
|
|
31259
31263
|
// src/mcp/index.ts
|
|
@@ -38916,16 +38920,17 @@ function buildServer() {
|
|
|
38916
38920
|
}
|
|
38917
38921
|
async function main() {
|
|
38918
38922
|
const argv = process.argv.slice(2);
|
|
38919
|
-
|
|
38920
|
-
|
|
38921
|
-
const
|
|
38922
|
-
await
|
|
38923
|
-
|
|
38923
|
+
const { isStdioMode: isStdioMode2 } = await Promise.resolve().then(() => (init_http(), exports_http));
|
|
38924
|
+
if (isStdioMode2(argv)) {
|
|
38925
|
+
const transport = new StdioServerTransport;
|
|
38926
|
+
await buildServer().connect(transport);
|
|
38927
|
+
console.error("domains MCP server running on stdio");
|
|
38924
38928
|
return;
|
|
38925
38929
|
}
|
|
38926
|
-
const
|
|
38927
|
-
|
|
38928
|
-
|
|
38930
|
+
const { resolveMcpHttpPort: resolveMcpHttpPort2, startHttpServer: startHttpServer2 } = await Promise.resolve().then(() => (init_http(), exports_http));
|
|
38931
|
+
const port = resolveMcpHttpPort2(argv);
|
|
38932
|
+
await startHttpServer2(buildServer, port);
|
|
38933
|
+
await new Promise(() => {});
|
|
38929
38934
|
}
|
|
38930
38935
|
if (import.meta.main) {
|
|
38931
38936
|
main().catch((error) => {
|