修复 Codex MCP type 配置并更新发布包
This commit is contained in:
@@ -105,7 +105,6 @@ function createAgentRuntime(deps) {
|
||||
? ccwebMcpServerArgs
|
||||
: [ccwebMcpServerArg];
|
||||
args.push(
|
||||
'-c', 'mcp_servers.ccweb.type="stdio"',
|
||||
'-c', `mcp_servers.ccweb.command=${tomlString(nodePath || 'node')}`,
|
||||
'-c', `mcp_servers.ccweb.args=${tomlStringArray(serverArgs)}`,
|
||||
'-c', `mcp_servers.ccweb.env_vars=${tomlStringArray(envVars)}`,
|
||||
@@ -119,7 +118,7 @@ function createAgentRuntime(deps) {
|
||||
const config = mcpServer?.config && typeof mcpServer.config === 'object' ? mcpServer.config : null;
|
||||
if (!server || !config) return;
|
||||
const prefix = `mcp_servers.${tomlKeySegment(server)}`;
|
||||
for (const key of ['type', 'command', 'args', 'env', 'env_vars', 'url', 'bearer_token_env_var', 'startup_timeout_sec', 'tool_timeout_sec']) {
|
||||
for (const key of ['command', 'args', 'env', 'env_vars', 'url', 'bearer_token_env_var', 'startup_timeout_sec', 'tool_timeout_sec']) {
|
||||
if (!Object.prototype.hasOwnProperty.call(config, key)) continue;
|
||||
args.push('-c', `${prefix}.${key}=${tomlValue(config[key])}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user