File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 "mcpServers" : {
33 "evolver-proxy" : {
44 "command" : " /opt/homebrew/opt/node@22/bin/node" ,
5- "args" : [" ./mcp/evolver-proxy.mjs" ],
5+ "args" : [
6+ " ./mcp/evolver-proxy.mjs"
7+ ],
68 "cwd" : " ." ,
79 "env" : {
810 "EVOMAP_PROXY_PORT" : " 19820" ,
911 "EVOMAP_MCP_PROXY_TIMEOUT_MS" : " 45000" ,
1012 "EVOMAP_MCP_PROXY_HEALTH_TIMEOUT_MS" : " 2000" ,
1113 "NO_PROXY" : " 127.0.0.1,localhost" ,
1214 "no_proxy" : " 127.0.0.1,localhost" ,
13- "A2A_HUB_URL" : " https://evomap.ai"
15+ "A2A_HUB_URL" : " https://evomap.ai" ,
16+ "EVOMAP_MCP_IDLE_EXIT_MS" : " 0"
1417 }
1518 }
1619 }
Original file line number Diff line number Diff line change @@ -25,14 +25,21 @@ const PROXY_FETCH_TIMEOUT_MS = Number(process.env.EVOMAP_MCP_PROXY_TIMEOUT_MS) |
2525const PROXY_HEALTH_TIMEOUT_MS = Number ( process . env . EVOMAP_MCP_PROXY_HEALTH_TIMEOUT_MS ) || 2_000 ;
2626const PROXY_AUTOSTART = String ( process . env . EVOMAP_MCP_PROXY_AUTOSTART || '1' ) !== '0' ;
2727const PROXY_START_TIMEOUT_MS = Number ( process . env . EVOMAP_MCP_PROXY_START_TIMEOUT_MS ) || 15_000 ;
28- const MCP_IDLE_EXIT_MS = Number ( process . env . EVOMAP_MCP_IDLE_EXIT_MS ) || 5 * 60_000 ;
28+ const MCP_IDLE_EXIT_MS = parseNumberEnv ( ' EVOMAP_MCP_IDLE_EXIT_MS' , 5 * 60_000 ) ;
2929const MAX_FRAME_BYTES = Number ( process . env . EVOMAP_MCP_MAX_FRAME_BYTES ) || 16 * 1024 * 1024 ;
3030let proxyStartPromise = null ;
3131const CODEX_GUIDANCE_START = '<!-- evolver-codex-guidance:start -->' ;
3232const CODEX_GUIDANCE_END = '<!-- evolver-codex-guidance:end -->' ;
3333
3434function log ( ...a ) { process . stderr . write ( '[evolver-proxy-mcp] ' + a . join ( ' ' ) + '\n' ) ; }
3535
36+ function parseNumberEnv ( name , fallback ) {
37+ const raw = process . env [ name ] ;
38+ if ( raw === undefined || raw === '' ) return fallback ;
39+ const value = Number ( raw ) ;
40+ return Number . isFinite ( value ) ? value : fallback ;
41+ }
42+
3643function codexGuidanceSection ( language ) {
3744 if ( language === 'zh' ) {
3845 return `${ CODEX_GUIDANCE_START }
You can’t perform that action at this time.
0 commit comments