/** * Configuration Utilities * Load and parse ralph.config.cjs files */ /** * Stack configuration in ralph.config.cjs */ export interface StackConfig { framework: { name: string; version?: string; variant?: string; }; packageManager: string; testing: { unit: string; e2e: string; }; styling: string; } /** * Commands configuration in ralph.config.cjs */ export interface CommandsConfig { dev: string; build: string; test: string; lint: string; typecheck: string; } /** * Paths configuration in ralph.config.cjs */ export interface PathsConfig { root: string; prompts: string; guides: string; specs: string; scripts: string; learnings: string; agents: string; } /** * Loop configuration in ralph.config.cjs */ export interface LoopConfig { maxIterations: number; maxE2eAttempts: number; defaultModel: string; planningModel: string; codexModel?: string; codingCli: 'claude' | 'codex'; reviewCli: 'claude' | 'codex'; reviewMode: 'manual' | 'auto' | 'merge'; claudePermissionMode?: 'acceptEdits' | 'bypassPermissions' | 'default' | 'dontAsk' | 'plan' | 'auto'; codexSandbox?: 'read-only' | 'workspace-write' | 'danger-full-access'; codexApprovalPolicy?: 'untrusted' | 'on-failure' | 'on-request' | 'never'; disableMcpInAutomatedRuns?: boolean; } /** * Agent configuration in ralph.config.cjs */ export interface AgentSectionConfig { defaultProvider: string; defaultModel: string; } /** * Full ralph.config.cjs structure */ export interface RalphConfig { name: string; stack: StackConfig; commands: CommandsConfig; paths: PathsConfig; loop: LoopConfig; agent: AgentSectionConfig; } /** * Default configuration values */ export declare const DEFAULT_CONFIG: RalphConfig; /** * Load ralph.config.cjs from a project directory * Returns null if config file doesn't exist */ export declare function loadConfig(projectRoot: string): Promise; /** * Load config with defaults merged in */ export declare function loadConfigWithDefaults(projectRoot: string): Promise; /** * Check if a ralph config exists in the project */ export declare function hasConfig(projectRoot: string): boolean; /** * Get the ralph root directory from config or default */ export declare function getRalphRoot(projectRoot: string): Promise; /** * Get the specs directory from config or default */ export declare function getSpecsDir(projectRoot: string): Promise; /** * Get the scripts directory from config or default */ export declare function getScriptsDir(projectRoot: string): Promise; /** * Get loop settings with defaults */ export declare function getLoopSettings(projectRoot: string): Promise;