/** * Claude Code Configuration Builder * * Utility for building ProcessConfig specific to Claude Code CLI. * Provides type-safe configuration for Claude Code's flags and options. * * @module execution-engine/agents/claude */ import type { ProcessConfig } from "../../process/types.js"; /** * MCP server configuration object */ export interface McpServerConfig { command: string; args?: string[]; env?: Record; } /** * MCP configuration (JSON object or file path) */ export type McpConfig = { mcpServers: Record; } | string; /** * Configuration options specific to Claude Code CLI */ export interface ClaudeCodeConfig { /** * Path to Claude Code CLI executable * @default 'claude' */ claudePath?: string; /** * Working directory for the process */ workDir: string; /** * Run in non-interactive print mode * @default false */ print?: boolean; /** * Output format (stream-json recommended for parsing) * @default 'text' */ outputFormat?: "stream-json" | "json" | "text"; /** * Enable verbose output (required for stream-json with print mode) * @default false */ verbose?: boolean; /** * Skip permission prompts * @default false */ dangerouslySkipPermissions?: boolean; /** * Permission mode setting */ permissionMode?: string; /** * MCP server configurations (JSON objects or file paths) * Can be a single config or array of configs * @example * ```typescript * mcpConfig: { * mcpServers: { * filesystem: { * command: 'npx', * args: ['-y', '@modelcontextprotocol/server-filesystem', '/path'] * } * } * } * ``` */ mcpConfig?: McpConfig | McpConfig[]; /** * Only use MCP servers from mcpConfig, ignore all other MCP configurations * @default false */ strictMcpConfig?: boolean; /** * Plugin directories to load for this session * Can be a single directory or array of directories * @example * ```typescript * pluginDir: './my-plugins' * // or * pluginDir: ['./plugins1', './plugins2'] * ``` */ pluginDir?: string | string[]; /** * Specify available tools from built-in set * Use empty string to disable all tools, 'default' for all tools, * or specify tool names (only works with print mode) * @example * ```typescript * tools: ['Bash', 'Edit', 'Read'] * // or * tools: '' // disable all tools * ``` */ tools?: string | string[]; /** * Allowed tool names (whitelist) * Can use patterns like "Bash(git:*)" * @example * ```typescript * allowedTools: ['Bash(git:*)', 'Edit', 'Read'] * ``` */ allowedTools?: string | string[]; /** * Disallowed tool names (blacklist) * Can use patterns like "Bash(rm:*)" * @example * ```typescript * disallowedTools: ['Bash(rm:*)', 'Write'] * ``` */ disallowedTools?: string | string[]; /** * Environment variables to pass to the process */ env?: Record; /** * Maximum execution time in milliseconds */ timeout?: number; /** * Maximum idle time before cleanup (pool only) */ idleTimeout?: number; /** * Retry configuration for failed spawns */ retry?: { maxAttempts: number; backoffMs: number; }; /** * Prompt to send to Claude Code */ prompt?: string; } export declare function buildClaudeConfig(config: ClaudeCodeConfig): ProcessConfig; //# sourceMappingURL=config-builder.d.ts.map