/** * Log Analyzer Runner -- Programmatic API for the log analyzer CLI. * * Extracts the core logic from the analyze-logs bin script so that it can be * invoked programmatically (e.g. from a Next.js route handler or test) without * process.exit / dotenv / argv coupling. */ export interface AnalyzerRunnerConfig { /** Analyze a specific session */ sessionId?: string; /** Watch for new sessions and analyze as they complete */ follow?: boolean; /** Poll interval in milliseconds (default: 5000) */ interval?: number; /** Show what would be created without creating issues */ dryRun?: boolean; /** Cleanup old logs based on retention policy */ cleanup?: boolean; /** Show detailed analysis output */ verbose?: boolean; /** Base directory for logs (default: {gitRoot}/.agent-logs or AGENT_LOGS_DIR env) */ logsDir?: string; /** Git root for default paths (default: auto-detect) */ gitRoot?: string; } export interface AnalyzerResult { sessionsAnalyzed: number; totalErrors: number; totalPatterns: number; issuesCreated: number; issuesUpdated: number; } /** Detect the git repository root. Falls back to cwd. */ export declare function getGitRoot(): string; export declare function printSummary(stats: AnalyzerResult, dryRun: boolean): void; /** * Run the log analyzer programmatically. * * For one-shot mode (default) the returned promise resolves with the analysis * result once all sessions have been processed. * * For follow mode (`config.follow = true`) the analyzer keeps running until * the optional `signal` is aborted. When the signal fires the current poll * cycle finishes and the accumulated stats are returned. */ export declare function runLogAnalyzer(config?: AnalyzerRunnerConfig, signal?: AbortSignal): Promise; //# sourceMappingURL=analyze-logs-runner.d.ts.map