@justanothermldude/mcp-exec 1.7.8 → 1.7.9

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/index.js CHANGED
@@ -198,7 +198,7 @@ function isGetToolSchemaInput(args2) {
198
198
  __name(isGetToolSchemaInput, "isGetToolSchemaInput");
199
199
 
200
200
  // dist/tools/execute-with-wrappers.js
201
- import { listServers as listServers4 } from "@justanothermldude/mcp-exec-core";
201
+ import { listServers as listServers4, getServerConfig as getServerConfig2 } from "@justanothermldude/mcp-exec-core";
202
202
 
203
203
  // dist/tools/tool-catalog.js
204
204
  import { readFileSync, writeFileSync, mkdirSync } from "fs";
@@ -1774,7 +1774,6 @@ function createExecuteWithWrappersHandler(pool, config = {}) {
1774
1774
  }
1775
1775
  __name(stopActiveBridge, "stopActiveBridge");
1776
1776
  async function executeWithWrappersHandler(args2) {
1777
- const TOOLS_FETCH_TIMEOUT_MS = 15e3;
1778
1777
  const { code, wrappers, timeout_ms = DEFAULT_TIMEOUT_MS } = args2;
1779
1778
  if (!code || typeof code !== "string") {
1780
1779
  return {
@@ -1816,10 +1815,12 @@ function createExecuteWithWrappersHandler(pool, config = {}) {
1816
1815
  try {
1817
1816
  connection = await pool.getConnection(serverName);
1818
1817
  const conn = connection;
1818
+ const serverConfig = getServerConfig2(serverName);
1819
+ const toolsFetchTimeoutMs = serverConfig?.timeout ?? 15e3;
1819
1820
  const tools = await new Promise((resolve, reject) => {
1820
1821
  const timeoutHandle = setTimeout(() => {
1821
- reject(new Error(`Timed out fetching tools from server '${serverName}' after ${TOOLS_FETCH_TIMEOUT_MS}ms`));
1822
- }, TOOLS_FETCH_TIMEOUT_MS);
1822
+ reject(new Error(`Timed out fetching tools from server '${serverName}' after ${toolsFetchTimeoutMs}ms`));
1823
+ }, toolsFetchTimeoutMs);
1823
1824
  conn.getTools().then((result2) => {
1824
1825
  clearTimeout(timeoutHandle);
1825
1826
  resolve(result2);
@@ -2000,9 +2001,9 @@ function createMcpExecServer(pool, config = {}) {
2000
2001
  __name(createMcpExecServer, "createMcpExecServer");
2001
2002
 
2002
2003
  // dist/index.js
2003
- import { ServerPool, createConnection, getServerConfig as getServerConfig2, loadServerManifest as loadServerManifest2, cleanupOrphanedProcesses } from "@justanothermldude/mcp-exec-core";
2004
+ import { ServerPool, createConnection, getServerConfig as getServerConfig3, loadServerManifest as loadServerManifest2, cleanupOrphanedProcesses } from "@justanothermldude/mcp-exec-core";
2004
2005
  var APP_NAME = "mcp-exec";
2005
- var VERSION2 = "1.7.7";
2006
+ var VERSION2 = "1.7.9";
2006
2007
  var defaultExecutor = null;
2007
2008
  function getDefaultExecutor() {
2008
2009
  if (!defaultExecutor) {
@@ -2056,7 +2057,7 @@ async function main() {
2056
2057
  }
2057
2058
  loadServerManifest2();
2058
2059
  const connectionFactory = /* @__PURE__ */ __name(async (serverId) => {
2059
- const config = getServerConfig2(serverId);
2060
+ const config = getServerConfig3(serverId);
2060
2061
  if (!config) {
2061
2062
  throw new Error(`Server config not found: ${serverId}`);
2062
2063
  }
@@ -1,4 +1,4 @@
1
- import { listServers } from '@justanothermldude/mcp-exec-core';
1
+ import { listServers, getServerConfig } from '@justanothermldude/mcp-exec-core';
2
2
  import { generateServerModule, generateMcpDictionaryFromMap, generateFieldGuard, sanitizeIdentifier } from '../codegen/index.js';
3
3
  import { SandboxExecutor } from '../sandbox/index.js';
4
4
  import { MCPBridge } from '../bridge/index.js';
@@ -200,7 +200,6 @@ export function createExecuteWithWrappersHandler(pool, config = {}) {
200
200
  * Execute code with wrappers handler - generates wrappers, composes code, and executes
201
201
  */
202
202
  async function executeWithWrappersHandler(args) {
203
- const TOOLS_FETCH_TIMEOUT_MS = 15000;
204
203
  const { code, wrappers, timeout_ms = DEFAULT_TIMEOUT_MS } = args;
205
204
  // Validate input
206
205
  if (!code || typeof code !== 'string') {
@@ -248,11 +247,14 @@ export function createExecuteWithWrappersHandler(pool, config = {}) {
248
247
  // Get connection for this server
249
248
  connection = await pool.getConnection(serverName);
250
249
  const conn = connection;
250
+ // Get per-server timeout from config (default to 15s)
251
+ const serverConfig = getServerConfig(serverName);
252
+ const toolsFetchTimeoutMs = serverConfig?.timeout ?? 15000;
251
253
  // Fetch tools from the server with proper timeout cleanup
252
254
  const tools = await new Promise((resolve, reject) => {
253
255
  const timeoutHandle = setTimeout(() => {
254
- reject(new Error(`Timed out fetching tools from server '${serverName}' after ${TOOLS_FETCH_TIMEOUT_MS}ms`));
255
- }, TOOLS_FETCH_TIMEOUT_MS);
256
+ reject(new Error(`Timed out fetching tools from server '${serverName}' after ${toolsFetchTimeoutMs}ms`));
257
+ }, toolsFetchTimeoutMs);
256
258
  conn.getTools().then((result) => { clearTimeout(timeoutHandle); resolve(result); }, (err) => { clearTimeout(timeoutHandle); reject(err); });
257
259
  });
258
260
  // Cache tools to disk for catalog embedding in tool description
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justanothermldude/mcp-exec",
3
- "version": "1.7.8",
3
+ "version": "1.7.9",
4
4
  "description": "MCP execution utilities for sandboxed code execution with OS-level isolation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",