修复 Codex MCP type 配置并更新发布包

This commit is contained in:
shiyue
2026-10-08 14:55:58 +08:00
parent caf8947cd9
commit 747771a048
17 changed files with 181 additions and 4 deletions

View File

@@ -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])}`);
}