export declare function getLogDir(verb: string, projectDir?: string): string; /** * Cleans out old log trace files adhering to an upper boundary limit. * * @param targetDir - Evaluated workspace folder storing logs. * @param prefix - Filter signature indicating matching files. * @param maxHistory - Absolute count of youngest logs to preserve. */ export declare function rotateLogs(targetDir: string, prefix: string, maxHistory?: number): void; export interface BuildStreamRotation { logFile: string; latestLog: string; } /** * Automatically prunes historical build payload output files from the local environment block. * * @param projectDir - Associated workspace to scope clearance into. * @returns The structured paths indicating where the new logs are actively spooling. */ export declare function rotateSpoolerStreams(verb: string, projectDir?: string): BuildStreamRotation; export interface SpoolingBackgroundResult { status: string; message: string; pid?: number; taskId?: string; logPaths?: string[]; } export interface SpoolingForegroundResult { exitCode: number; finalOutput: string; fullLogPath: string; } export type SpoolingResult = SpoolingBackgroundResult | SpoolingForegroundResult; /** * Wraps child process invocation forcing its runtime payload exclusively through * an active offline disk file context instead of active NodeJS stream memory. * * @param command - Core executing binary token. * @param args - CLI arguments string array. * @param options - Operational environment context overriding execution behavior. * @returns A structured result containing either background runtime metadata or foreground process completion details. */ export declare function executeWithSpooling(command: string, args: string[], options: { cwd: string; projectDir?: string; timeout?: number; background?: boolean; activePort?: string; onSuccess?: () => Promise; rootCommandId?: string; artifactType?: "build" | "upload" | "monitor" | "test" | "debug"; }): Promise; /** * Spools a large JSON dataset to disk if it exceeds a specified string length. * Prevents MCP context window blowouts. * * @param toolName - The name of the tool generating the data (used for the cache file name). * @param data - The raw JSON object/array payload. * @param targetDir - The target workspace directory to save the cache file. * @param threshold - The character count threshold above which the data should be spooled (default: 2000). * @returns Either the original data or a string message pointing to the file path. */ export declare function spoolLargeDataset(toolName: string, data: any, targetDir?: string, threshold?: number): string | any; //# sourceMappingURL=spooler.d.ts.map