@agiflowai/one-mcp 0.3.7 → 0.3.8

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_http = require('./http-CKXz9Gp8.cjs');
2
+ const require_http = require('./http-pwzeCOpM.cjs');
3
3
  let node_fs_promises = require("node:fs/promises");
4
4
  let node_path = require("node:path");
5
5
  let liquidjs = require("liquidjs");
@@ -381,7 +381,7 @@ const useToolCommand = new commander.Command("use-tool").description("Execute an
381
381
  let toolArgs = {};
382
382
  try {
383
383
  toolArgs = JSON.parse(options.args);
384
- } catch (error) {
384
+ } catch (_error) {
385
385
  console.error("Error: Invalid JSON in --args");
386
386
  process.exit(1);
387
387
  }
@@ -524,7 +524,7 @@ var mcp_config_yaml_default = "# MCP Server Configuration\n# This file configure
524
524
 
525
525
  //#endregion
526
526
  //#region src/templates/mcp-config.json?raw
527
- var mcp_config_default = "{\n \"_comment\": \"MCP Server Configuration - Use ${VAR_NAME} syntax for environment variable interpolation\",\n \"_instructions\": \"config.instruction: Server's default instruction | instruction: User override (takes precedence)\",\n \"mcpServers\": {\n \"example-server\": {\n \"command\": \"node\",\n \"args\": [\n \"/path/to/mcp-server/build/index.js\"\n ],\n \"env\": {\n \"LOG_LEVEL\": \"info\",\n \"_comment\": \"You can use environment variable interpolation:\",\n \"_example_DATABASE_URL\": \"${DATABASE_URL}\",\n \"_example_API_KEY\": \"${MY_API_KEY}\"\n },\n \"config\": {\n \"instruction\": \"Use this server for...\"\n },\n \"_instruction_override\": \"Optional user override - takes precedence over config.instruction\"\n }\n }\n}\n";
527
+ var mcp_config_default = "{\n \"_comment\": \"MCP Server Configuration - Use ${VAR_NAME} syntax for environment variable interpolation\",\n \"_instructions\": \"config.instruction: Server's default instruction | instruction: User override (takes precedence)\",\n \"mcpServers\": {\n \"example-server\": {\n \"command\": \"node\",\n \"args\": [\"/path/to/mcp-server/build/index.js\"],\n \"env\": {\n \"LOG_LEVEL\": \"info\",\n \"_comment\": \"You can use environment variable interpolation:\",\n \"_example_DATABASE_URL\": \"${DATABASE_URL}\",\n \"_example_API_KEY\": \"${MY_API_KEY}\"\n },\n \"config\": {\n \"instruction\": \"Use this server for...\"\n },\n \"_instruction_override\": \"Optional user override - takes precedence over config.instruction\"\n }\n }\n}\n";
528
528
 
529
529
  //#endregion
530
530
  //#region src/commands/init.ts
@@ -1051,7 +1051,7 @@ const prefetchCommand = new commander.Command("prefetch").description("Pre-downl
1051
1051
 
1052
1052
  //#endregion
1053
1053
  //#region package.json
1054
- var version = "0.3.6";
1054
+ var version = "0.3.7";
1055
1055
 
1056
1056
  //#endregion
1057
1057
  //#region src/cli.ts
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as findConfigFile, i as createServer, l as McpClientManagerService, n as SseTransportHandler, r as StdioTransportHandler, s as SkillService, t as HttpTransportHandler, u as ConfigFetcherService } from "./http-BzTXYfkN.mjs";
2
+ import { c as findConfigFile, i as createServer, l as McpClientManagerService, n as SseTransportHandler, r as StdioTransportHandler, s as SkillService, t as HttpTransportHandler, u as ConfigFetcherService } from "./http-BDeLFFzK.mjs";
3
3
  import { writeFile } from "node:fs/promises";
4
4
  import { resolve } from "node:path";
5
5
  import { Liquid } from "liquidjs";
@@ -381,7 +381,7 @@ const useToolCommand = new Command("use-tool").description("Execute an MCP tool
381
381
  let toolArgs = {};
382
382
  try {
383
383
  toolArgs = JSON.parse(options.args);
384
- } catch (error) {
384
+ } catch (_error) {
385
385
  console.error("Error: Invalid JSON in --args");
386
386
  process.exit(1);
387
387
  }
@@ -524,7 +524,7 @@ var mcp_config_yaml_default = "# MCP Server Configuration\n# This file configure
524
524
 
525
525
  //#endregion
526
526
  //#region src/templates/mcp-config.json?raw
527
- var mcp_config_default = "{\n \"_comment\": \"MCP Server Configuration - Use ${VAR_NAME} syntax for environment variable interpolation\",\n \"_instructions\": \"config.instruction: Server's default instruction | instruction: User override (takes precedence)\",\n \"mcpServers\": {\n \"example-server\": {\n \"command\": \"node\",\n \"args\": [\n \"/path/to/mcp-server/build/index.js\"\n ],\n \"env\": {\n \"LOG_LEVEL\": \"info\",\n \"_comment\": \"You can use environment variable interpolation:\",\n \"_example_DATABASE_URL\": \"${DATABASE_URL}\",\n \"_example_API_KEY\": \"${MY_API_KEY}\"\n },\n \"config\": {\n \"instruction\": \"Use this server for...\"\n },\n \"_instruction_override\": \"Optional user override - takes precedence over config.instruction\"\n }\n }\n}\n";
527
+ var mcp_config_default = "{\n \"_comment\": \"MCP Server Configuration - Use ${VAR_NAME} syntax for environment variable interpolation\",\n \"_instructions\": \"config.instruction: Server's default instruction | instruction: User override (takes precedence)\",\n \"mcpServers\": {\n \"example-server\": {\n \"command\": \"node\",\n \"args\": [\"/path/to/mcp-server/build/index.js\"],\n \"env\": {\n \"LOG_LEVEL\": \"info\",\n \"_comment\": \"You can use environment variable interpolation:\",\n \"_example_DATABASE_URL\": \"${DATABASE_URL}\",\n \"_example_API_KEY\": \"${MY_API_KEY}\"\n },\n \"config\": {\n \"instruction\": \"Use this server for...\"\n },\n \"_instruction_override\": \"Optional user override - takes precedence over config.instruction\"\n }\n }\n}\n";
528
528
 
529
529
  //#endregion
530
530
  //#region src/commands/init.ts
@@ -1051,7 +1051,7 @@ const prefetchCommand = new Command("prefetch").description("Pre-download packag
1051
1051
 
1052
1052
  //#endregion
1053
1053
  //#region package.json
1054
- var version = "0.3.6";
1054
+ var version = "0.3.7";
1055
1055
 
1056
1056
  //#endregion
1057
1057
  //#region src/cli.ts
@@ -136,7 +136,7 @@ function validateUrlSecurity(url, security) {
136
136
  let parsedUrl;
137
137
  try {
138
138
  parsedUrl = new URL(url);
139
- } catch (error) {
139
+ } catch (_error) {
140
140
  throw new Error(`Invalid URL format: ${url}`);
141
141
  }
142
142
  const protocol = parsedUrl.protocol.replace(":", "");
@@ -538,7 +538,7 @@ var RemoteConfigCacheService = class {
538
538
  return true;
539
539
  }
540
540
  return false;
541
- } catch (error) {
541
+ } catch (_error) {
542
542
  await unlink(filePath).catch(() => {});
543
543
  return true;
544
544
  }
@@ -1468,7 +1468,7 @@ var SkillService = class {
1468
1468
  recursive: true,
1469
1469
  signal
1470
1470
  });
1471
- for await (const event of watcher) if (event.filename && event.filename.endsWith("SKILL.md")) {
1471
+ for await (const event of watcher) if (event.filename?.endsWith("SKILL.md")) {
1472
1472
  this.clearCache();
1473
1473
  this.onCacheInvalidated?.();
1474
1474
  }
@@ -1832,7 +1832,7 @@ var DescribeToolsTool = class DescribeToolsTool {
1832
1832
  serverToolsMap.set(client.serverName, filteredTools);
1833
1833
  for (const tool of filteredTools) {
1834
1834
  if (!toolToServers.has(tool.name)) toolToServers.set(tool.name, []);
1835
- toolToServers.get(tool.name).push(client.serverName);
1835
+ toolToServers.get(tool.name)?.push(client.serverName);
1836
1836
  }
1837
1837
  } catch (error) {
1838
1838
  console.error(`Failed to list tools from ${client.serverName}:`, error);
@@ -1962,7 +1962,7 @@ var DescribeToolsTool = class DescribeToolsTool {
1962
1962
  serverToolsMap.set(client.serverName, typedTools);
1963
1963
  for (const tool of typedTools) {
1964
1964
  if (!toolToServers.has(tool.name)) toolToServers.set(tool.name, []);
1965
- toolToServers.get(tool.name).push(client.serverName);
1965
+ toolToServers.get(tool.name)?.push(client.serverName);
1966
1966
  }
1967
1967
  } catch (error) {
1968
1968
  console.error(`Failed to list tools from ${client.serverName}:`, error);
@@ -2266,7 +2266,7 @@ IMPORTANT: Only use tools discovered from describe_tools with id="${this.serverI
2266
2266
  }],
2267
2267
  isError: true
2268
2268
  };
2269
- if (client$1.toolBlacklist && client$1.toolBlacklist.includes(actualToolName)) return {
2269
+ if (client$1.toolBlacklist?.includes(actualToolName)) return {
2270
2270
  content: [{
2271
2271
  type: "text",
2272
2272
  text: `Tool "${actualToolName}" is blacklisted on server "${serverName}" and cannot be executed.`
@@ -2288,7 +2288,7 @@ IMPORTANT: Only use tools discovered from describe_tools with id="${this.serverI
2288
2288
  const matchingServers = [];
2289
2289
  const results = await Promise.all(clients.map(async (client$1) => {
2290
2290
  try {
2291
- if (client$1.toolBlacklist && client$1.toolBlacklist.includes(actualToolName)) return null;
2291
+ if (client$1.toolBlacklist?.includes(actualToolName)) return null;
2292
2292
  if ((await client$1.listTools()).some((t) => t.name === actualToolName)) return client$1.serverName;
2293
2293
  } catch (error) {
2294
2294
  console.error(`Failed to list tools from ${client$1.serverName}:`, error);
@@ -165,7 +165,7 @@ function validateUrlSecurity(url, security) {
165
165
  let parsedUrl;
166
166
  try {
167
167
  parsedUrl = new URL(url);
168
- } catch (error) {
168
+ } catch (_error) {
169
169
  throw new Error(`Invalid URL format: ${url}`);
170
170
  }
171
171
  const protocol = parsedUrl.protocol.replace(":", "");
@@ -567,7 +567,7 @@ var RemoteConfigCacheService = class {
567
567
  return true;
568
568
  }
569
569
  return false;
570
- } catch (error) {
570
+ } catch (_error) {
571
571
  await (0, node_fs_promises.unlink)(filePath).catch(() => {});
572
572
  return true;
573
573
  }
@@ -1497,7 +1497,7 @@ var SkillService = class {
1497
1497
  recursive: true,
1498
1498
  signal
1499
1499
  });
1500
- for await (const event of watcher) if (event.filename && event.filename.endsWith("SKILL.md")) {
1500
+ for await (const event of watcher) if (event.filename?.endsWith("SKILL.md")) {
1501
1501
  this.clearCache();
1502
1502
  this.onCacheInvalidated?.();
1503
1503
  }
@@ -1861,7 +1861,7 @@ var DescribeToolsTool = class DescribeToolsTool {
1861
1861
  serverToolsMap.set(client.serverName, filteredTools);
1862
1862
  for (const tool of filteredTools) {
1863
1863
  if (!toolToServers.has(tool.name)) toolToServers.set(tool.name, []);
1864
- toolToServers.get(tool.name).push(client.serverName);
1864
+ toolToServers.get(tool.name)?.push(client.serverName);
1865
1865
  }
1866
1866
  } catch (error) {
1867
1867
  console.error(`Failed to list tools from ${client.serverName}:`, error);
@@ -1991,7 +1991,7 @@ var DescribeToolsTool = class DescribeToolsTool {
1991
1991
  serverToolsMap.set(client.serverName, typedTools);
1992
1992
  for (const tool of typedTools) {
1993
1993
  if (!toolToServers.has(tool.name)) toolToServers.set(tool.name, []);
1994
- toolToServers.get(tool.name).push(client.serverName);
1994
+ toolToServers.get(tool.name)?.push(client.serverName);
1995
1995
  }
1996
1996
  } catch (error) {
1997
1997
  console.error(`Failed to list tools from ${client.serverName}:`, error);
@@ -2295,7 +2295,7 @@ IMPORTANT: Only use tools discovered from describe_tools with id="${this.serverI
2295
2295
  }],
2296
2296
  isError: true
2297
2297
  };
2298
- if (client$1.toolBlacklist && client$1.toolBlacklist.includes(actualToolName)) return {
2298
+ if (client$1.toolBlacklist?.includes(actualToolName)) return {
2299
2299
  content: [{
2300
2300
  type: "text",
2301
2301
  text: `Tool "${actualToolName}" is blacklisted on server "${serverName}" and cannot be executed.`
@@ -2317,7 +2317,7 @@ IMPORTANT: Only use tools discovered from describe_tools with id="${this.serverI
2317
2317
  const matchingServers = [];
2318
2318
  const results = await Promise.all(clients.map(async (client$1) => {
2319
2319
  try {
2320
- if (client$1.toolBlacklist && client$1.toolBlacklist.includes(actualToolName)) return null;
2320
+ if (client$1.toolBlacklist?.includes(actualToolName)) return null;
2321
2321
  if ((await client$1.listTools()).some((t) => t.name === actualToolName)) return client$1.serverName;
2322
2322
  } catch (error) {
2323
2323
  console.error(`Failed to list tools from ${client$1.serverName}:`, error);
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_http = require('./http-CKXz9Gp8.cjs');
1
+ const require_http = require('./http-pwzeCOpM.cjs');
2
2
 
3
3
  exports.ConfigFetcherService = require_http.ConfigFetcherService;
4
4
  exports.DescribeToolsTool = require_http.DescribeToolsTool;
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { a as UseToolTool, i as createServer, l as McpClientManagerService, n as SseTransportHandler, o as DescribeToolsTool, r as StdioTransportHandler, s as SkillService, t as HttpTransportHandler, u as ConfigFetcherService } from "./http-BzTXYfkN.mjs";
1
+ import { a as UseToolTool, i as createServer, l as McpClientManagerService, n as SseTransportHandler, o as DescribeToolsTool, r as StdioTransportHandler, s as SkillService, t as HttpTransportHandler, u as ConfigFetcherService } from "./http-BDeLFFzK.mjs";
2
2
 
3
3
  export { ConfigFetcherService, DescribeToolsTool, HttpTransportHandler, McpClientManagerService, SkillService, SseTransportHandler, StdioTransportHandler, UseToolTool, createServer };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agiflowai/one-mcp",
3
3
  "description": "One MCP server package",
4
- "version": "0.3.7",
4
+ "version": "0.3.8",
5
5
  "license": "AGPL-3.0",
6
6
  "keywords": [
7
7
  "mcp",
@@ -19,7 +19,7 @@
19
19
  "README.md"
20
20
  ],
21
21
  "dependencies": {
22
- "@modelcontextprotocol/sdk": "1.25.2",
22
+ "@modelcontextprotocol/sdk": "1.26.0",
23
23
  "chalk": "5.6.2",
24
24
  "commander": "14.0.1",
25
25
  "express": "^4.21.2",
@@ -27,7 +27,7 @@
27
27
  "js-yaml": "^4.1.0",
28
28
  "liquidjs": "^10.21.0",
29
29
  "zod": "^3.24.1",
30
- "@agiflowai/aicode-utils": "1.0.13"
30
+ "@agiflowai/aicode-utils": "1.0.14"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/express": "^5.0.0",