import { LoadedConfig } from './ConfigLoader'; import { IAgent } from '../agents/IAgent'; import { McpStrategy } from '../types'; /** * Configuration data loaded from the ruler setup */ export interface RulerConfiguration { config: LoadedConfig; concatenatedRules: string; rulerMcpJson: Record | null; projectRoot: string; } /** * Configuration data for a specific .ruler directory in hierarchical mode */ export interface HierarchicalRulerConfiguration extends RulerConfiguration { rulerDir: string; } export declare function loadNestedConfigurations(projectRoot: string, configPath: string | undefined, localOnly: boolean, resolvedNested: boolean): Promise; /** * Loads configuration for single-directory mode (existing behavior). */ export declare function loadSingleConfiguration(projectRoot: string, configPath: string | undefined, localOnly: boolean): Promise; /** * Processes hierarchical configurations by applying rules to each .ruler directory independently. * Each directory gets its own set of rules and generates its own agent files. * @param agents Array of agents to process * @param configurations Array of hierarchical configurations for each .ruler directory * @param verbose Whether to enable verbose logging * @param dryRun Whether to perform a dry run * @param cliMcpEnabled Whether MCP is enabled via CLI * @param cliMcpStrategy MCP strategy from CLI * @returns Promise resolving to array of generated file paths */ export declare function processHierarchicalConfigurations(agents: IAgent[], configurations: HierarchicalRulerConfiguration[], verbose: boolean, dryRun: boolean, cliMcpEnabled: boolean, cliMcpStrategy?: McpStrategy, backup?: boolean): Promise; /** * Processes a single configuration by applying rules to all selected agents. * All rules are concatenated and applied to generate agent files in the project root. * @param agents Array of agents to process * @param configuration Single ruler configuration with concatenated rules * @param projectRoot Root directory of the project * @param verbose Whether to enable verbose logging * @param dryRun Whether to perform a dry run * @param cliMcpEnabled Whether MCP is enabled via CLI * @param cliMcpStrategy MCP strategy from CLI * @returns Promise resolving to array of generated file paths */ export declare function processSingleConfiguration(agents: IAgent[], configuration: RulerConfiguration, projectRoot: string, verbose: boolean, dryRun: boolean, cliMcpEnabled: boolean, cliMcpStrategy?: McpStrategy, backup?: boolean): Promise; /** * Applies configurations to the selected agents (internal function). * @param agents Array of agents to process * @param concatenatedRules Concatenated rule content * @param rulerMcpJson MCP configuration JSON * @param config Loaded configuration * @param projectRoot Root directory of the project * @param verbose Whether to enable verbose logging * @param dryRun Whether to perform a dry run * @returns Promise resolving to array of generated file paths */ export declare function applyConfigurationsToAgents(agents: IAgent[], concatenatedRules: string, rulerMcpJson: Record | null, config: LoadedConfig, projectRoot: string, verbose: boolean, dryRun: boolean, cliMcpEnabled?: boolean, cliMcpStrategy?: McpStrategy, backup?: boolean): Promise; /** * Updates the .gitignore file with generated paths. * @param projectRoot Root directory of the project * @param generatedPaths Array of generated file paths * @param config Loaded configuration * @param cliGitignoreEnabled CLI gitignore setting * @param dryRun Whether to perform a dry run * @param cliGitignoreLocal CLI toggle for .git/info/exclude usage */ export declare function updateGitignore(projectRoot: string, generatedPaths: string[], config: LoadedConfig, cliGitignoreEnabled: boolean | undefined, dryRun: boolean, cliGitignoreLocal?: boolean): Promise;