import { type ProcessEntry } from './database/processTable.ts'; export interface ServiceConfig { name: string; shell: string; root?: string; enableStdin?: boolean; } export interface LogEvictionConfig { maxLogsPerService?: number; maxRetentionSeconds?: number; } export interface CandleSetupConfig { services?: ServiceConfig[]; logEviction?: LogEvictionConfig; logCollector?: 'node' | 'rust'; } export declare const CONFIG_FILENAMES: readonly [".candle.json", ".candle-setup.json"]; export declare const DEFAULT_CONFIG_FILENAME = ".candle.json"; export declare function findProjectDir(cwd?: string): string; /** * Reads and parses a config file. */ export declare function readConfigFile(configFilePath: string): CandleSetupConfig; /** * Finds the nearest config file in the target directory or above. */ export declare function findConfigFile(currentDir: string): { config: CandleSetupConfig; projectDir: string; configFilename: string; } | null; /** * Validate & typecheck the config file contents. */ export declare function validateConfig(config: CandleSetupConfig): { services: ServiceConfig[]; logEviction?: LogEvictionConfig; logCollector?: "node" | "rust"; }; export declare function isValidRootPath(p: string): boolean; export declare function isValidRelativePath(p: string): boolean; export declare const LOG_EVICTION_DEFAULTS: { readonly maxLogsPerService: 1000; readonly maxRetentionSeconds: number; }; export interface ResolvedLogEvictionConfig { maxLogsPerService: number; maxRetentionSeconds: number; } export declare function getLogEvictionConfig(config?: CandleSetupConfig): ResolvedLogEvictionConfig; export declare function getServiceCwd(service: ServiceConfig, configPath: string): string; export declare function findServiceByName(config: CandleSetupConfig, name: string): ServiceConfig | null; export declare function getAllServiceNames(config: CandleSetupConfig): string[]; interface FoundServiceConfig { serviceConfig: ServiceConfig; projectDir: string; } export declare function getServiceConfigByName(commandName: string, currentDir?: string): FoundServiceConfig; /** * Result from getServiceInfoByName - provides info about a service whether * it's running (from DB) or just configured (from config file). */ export interface ServiceInfo { commandName: string; projectDir: string; /** The running process entry if the service is currently running */ runningProcess?: ProcessEntry; /** The service config if defined in config file */ serviceConfig?: ServiceConfig; } /** * Finds service info by name, checking both running processes (DB) and config file. * * Priority: * 1. If a process with this name is running in the current project, return DB info * 2. Otherwise, look up the service in the config file * * This supports both config-defined services and transient processes. */ export declare function getServiceInfoByName(commandName: string): ServiceInfo; export {}; //# sourceMappingURL=configFile.d.ts.map