@agimon-ai/mcp-proxy 0.4.10 → 0.4.11
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.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const require_src = require('./src-
|
|
2
|
+
const require_src = require('./src-DwErnAUn.cjs');
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_fs_promises = require("node:fs/promises");
|
|
5
5
|
let node_path = require("node:path");
|
|
@@ -740,13 +740,28 @@ async function startSseTransport(serverOptions, config) {
|
|
|
740
740
|
async function resolveStdioHttpEndpoint(config, options, resolvedConfigPath) {
|
|
741
741
|
const repositoryPath = getRegistryRepositoryPath();
|
|
742
742
|
if (config.port !== void 0) return new URL(`http://${config.host ?? DEFAULT_HOST}:${config.port}${MCP_ENDPOINT_PATH}`);
|
|
743
|
-
const
|
|
743
|
+
const portRegistry = createPortRegistryService();
|
|
744
|
+
const result = await portRegistry.getPort({
|
|
744
745
|
repositoryPath,
|
|
745
746
|
serviceName: PORT_REGISTRY_SERVICE_HTTP,
|
|
746
747
|
serviceType: PORT_REGISTRY_SERVICE_TYPE,
|
|
747
748
|
environment: getRegistryEnvironment()
|
|
748
749
|
});
|
|
749
|
-
if (result.success && result.record)
|
|
750
|
+
if (result.success && result.record) {
|
|
751
|
+
const host = config.host ?? result.record.host;
|
|
752
|
+
const endpoint = new URL(`http://${host}:${result.record.port}${MCP_ENDPOINT_PATH}`);
|
|
753
|
+
try {
|
|
754
|
+
const healthUrl = `http://${host}:${result.record.port}/health`;
|
|
755
|
+
if ((await fetch(healthUrl)).ok) return endpoint;
|
|
756
|
+
} catch {}
|
|
757
|
+
await portRegistry.releasePort({
|
|
758
|
+
repositoryPath,
|
|
759
|
+
serviceName: PORT_REGISTRY_SERVICE_HTTP,
|
|
760
|
+
serviceType: PORT_REGISTRY_SERVICE_TYPE,
|
|
761
|
+
environment: getRegistryEnvironment(),
|
|
762
|
+
force: true
|
|
763
|
+
});
|
|
764
|
+
}
|
|
750
765
|
const runtime = await prestartHttpRuntime({
|
|
751
766
|
host: config.host ?? DEFAULT_HOST,
|
|
752
767
|
config: options.config || resolvedConfigPath,
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { D as findConfigFile, E as generateServerId, T as DefinitionsCacheService, _ as StopServerService, d as version, f as StdioHttpTransportHandler, h as HttpTransportHandler, m as SseTransportHandler, n as createServer, o as createProxyIoCContainer, p as StdioTransportHandler, r as createSessionServer, t as TRANSPORT_MODE, u as initializeSharedServices, v as RuntimeStateService } from "./src-
|
|
2
|
+
import { D as findConfigFile, E as generateServerId, T as DefinitionsCacheService, _ as StopServerService, d as version, f as StdioHttpTransportHandler, h as HttpTransportHandler, m as SseTransportHandler, n as createServer, o as createProxyIoCContainer, p as StdioTransportHandler, r as createSessionServer, t as TRANSPORT_MODE, u as initializeSharedServices, v as RuntimeStateService } from "./src-Cp1GdSlN.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { access, writeFile } from "node:fs/promises";
|
|
5
5
|
import path, { join, resolve } from "node:path";
|
|
@@ -739,13 +739,28 @@ async function startSseTransport(serverOptions, config) {
|
|
|
739
739
|
async function resolveStdioHttpEndpoint(config, options, resolvedConfigPath) {
|
|
740
740
|
const repositoryPath = getRegistryRepositoryPath();
|
|
741
741
|
if (config.port !== void 0) return new URL(`http://${config.host ?? DEFAULT_HOST}:${config.port}${MCP_ENDPOINT_PATH}`);
|
|
742
|
-
const
|
|
742
|
+
const portRegistry = createPortRegistryService();
|
|
743
|
+
const result = await portRegistry.getPort({
|
|
743
744
|
repositoryPath,
|
|
744
745
|
serviceName: PORT_REGISTRY_SERVICE_HTTP,
|
|
745
746
|
serviceType: PORT_REGISTRY_SERVICE_TYPE,
|
|
746
747
|
environment: getRegistryEnvironment()
|
|
747
748
|
});
|
|
748
|
-
if (result.success && result.record)
|
|
749
|
+
if (result.success && result.record) {
|
|
750
|
+
const host = config.host ?? result.record.host;
|
|
751
|
+
const endpoint = new URL(`http://${host}:${result.record.port}${MCP_ENDPOINT_PATH}`);
|
|
752
|
+
try {
|
|
753
|
+
const healthUrl = `http://${host}:${result.record.port}/health`;
|
|
754
|
+
if ((await fetch(healthUrl)).ok) return endpoint;
|
|
755
|
+
} catch {}
|
|
756
|
+
await portRegistry.releasePort({
|
|
757
|
+
repositoryPath,
|
|
758
|
+
serviceName: PORT_REGISTRY_SERVICE_HTTP,
|
|
759
|
+
serviceType: PORT_REGISTRY_SERVICE_TYPE,
|
|
760
|
+
environment: getRegistryEnvironment(),
|
|
761
|
+
force: true
|
|
762
|
+
});
|
|
763
|
+
}
|
|
749
764
|
const runtime = await prestartHttpRuntime({
|
|
750
765
|
host: config.host ?? DEFAULT_HOST,
|
|
751
766
|
config: options.config || resolvedConfigPath,
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as SearchListToolsTool, D as findConfigFile, E as generateServerId, S as UseToolTool, T as DefinitionsCacheService, _ as StopServerService, a as createProxyContainer, b as createProxyLogger, c as createStdioHttpTransportHandler, f as StdioHttpTransportHandler, g as SkillService, h as HttpTransportHandler, i as createHttpTransportHandler, l as createStdioTransportHandler, m as SseTransportHandler, n as createServer, p as StdioTransportHandler, r as createSessionServer, s as createSseTransportHandler, t as TRANSPORT_MODE, u as initializeSharedServices, v as RuntimeStateService, w as DescribeToolsTool, x as ConfigFetcherService, y as McpClientManagerService } from "./src-
|
|
1
|
+
import { C as SearchListToolsTool, D as findConfigFile, E as generateServerId, S as UseToolTool, T as DefinitionsCacheService, _ as StopServerService, a as createProxyContainer, b as createProxyLogger, c as createStdioHttpTransportHandler, f as StdioHttpTransportHandler, g as SkillService, h as HttpTransportHandler, i as createHttpTransportHandler, l as createStdioTransportHandler, m as SseTransportHandler, n as createServer, p as StdioTransportHandler, r as createSessionServer, s as createSseTransportHandler, t as TRANSPORT_MODE, u as initializeSharedServices, v as RuntimeStateService, w as DescribeToolsTool, x as ConfigFetcherService, y as McpClientManagerService } from "./src-Cp1GdSlN.mjs";
|
|
2
2
|
|
|
3
3
|
export { ConfigFetcherService, DefinitionsCacheService, DescribeToolsTool, HttpTransportHandler, McpClientManagerService, RuntimeStateService, SearchListToolsTool, SkillService, SseTransportHandler, StdioHttpTransportHandler, StdioTransportHandler, StopServerService, TRANSPORT_MODE, UseToolTool, createHttpTransportHandler, createProxyContainer, createProxyLogger, createServer, createSessionServer, createSseTransportHandler, createStdioHttpTransportHandler, createStdioTransportHandler, findConfigFile, generateServerId, initializeSharedServices };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/mcp-proxy",
|
|
3
3
|
"description": "MCP proxy server package",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.11",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"mcp",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"js-yaml": "^4.1.0",
|
|
28
28
|
"liquidjs": "^10.21.0",
|
|
29
29
|
"zod": "^3.24.1",
|
|
30
|
-
"@agimon-ai/foundation-process-registry": "0.2.
|
|
31
|
-
"@agimon-ai/log-sink-mcp": "0.2.
|
|
32
|
-
"@agimon-ai/foundation-port-registry": "0.2.
|
|
30
|
+
"@agimon-ai/foundation-process-registry": "0.2.9",
|
|
31
|
+
"@agimon-ai/log-sink-mcp": "0.2.13",
|
|
32
|
+
"@agimon-ai/foundation-port-registry": "0.2.13"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/express": "^5.0.0",
|