Auto-approve Codex title MCP tool

This commit is contained in:
weishu
2026-06-08 13:44:26 +08:00
parent fa363c2f6c
commit deb05bb783
7 changed files with 84 additions and 5 deletions
@@ -23,6 +23,24 @@ describe('codexMcpConfig', () => {
]);
});
it('builds per-tool approval mode config', () => {
const mcpServers = {
hapi: {
command: 'hapi',
args: ['mcp'],
tools: {
change_title: {
approval_mode: 'approve' as const
}
}
}
};
const args = buildMcpServerConfigArgs(mcpServers);
expect(args).toContain('mcp_servers.hapi.tools.change_title.approval_mode="approve"');
});
it('builds config args for multiple MCP servers', () => {
const mcpServers = {
hapi: { command: 'hapi', args: ['mcp'] },