修复 ccweb MCP 启动与重载并重新打包
This commit is contained in:
@@ -37,6 +37,16 @@ function createAgentRuntime(deps) {
|
||||
256 * 1024,
|
||||
{ min: 4096 },
|
||||
);
|
||||
const CCWEB_MCP_STARTUP_TIMEOUT_SEC = readRuntimePositiveIntEnv(
|
||||
'CC_WEB_CODEX_APP_MCP_STARTUP_TIMEOUT_SEC',
|
||||
30,
|
||||
{ min: 10, max: 300 },
|
||||
);
|
||||
const CCWEB_MCP_TOOL_TIMEOUT_SEC = readRuntimePositiveIntEnv(
|
||||
'CC_WEB_CODEX_MCP_TOOL_TIMEOUT_SEC',
|
||||
60,
|
||||
{ min: 10, max: 600 },
|
||||
);
|
||||
const RUNTIME_TRUNCATED_HEAD = '[cc-web: 前文过长,已保留尾部以保护服务稳定性]\n';
|
||||
|
||||
function keepTail(value, maxLen) {
|
||||
@@ -99,8 +109,8 @@ function createAgentRuntime(deps) {
|
||||
'-c', `mcp_servers.ccweb.command=${tomlString(nodePath || 'node')}`,
|
||||
'-c', `mcp_servers.ccweb.args=${tomlStringArray(serverArgs)}`,
|
||||
'-c', `mcp_servers.ccweb.env_vars=${tomlStringArray(envVars)}`,
|
||||
'-c', 'mcp_servers.ccweb.startup_timeout_sec=10',
|
||||
'-c', 'mcp_servers.ccweb.tool_timeout_sec=60'
|
||||
'-c', `mcp_servers.ccweb.startup_timeout_sec=${CCWEB_MCP_STARTUP_TIMEOUT_SEC}`,
|
||||
'-c', `mcp_servers.ccweb.tool_timeout_sec=${CCWEB_MCP_TOOL_TIMEOUT_SEC}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user