import { type ProcessLog } from '../logs/processLogs.ts'; interface LaunchStatus { startLogId: number; } type ShowPastLogsBehavior = 'show_logs_from_previous_launch' | 'only_show_after_recent_launch'; interface LatestExecutionLogFilterOptions { /** * What to do if no recent launch event is found in the logs: * - 'show_logs_from_previous_launch': Show all logs anyway (useful for `logs` and `watch` commands) * - 'only_show_after_recent_launch': Only show logs after finding a start event (useful for `run`) */ showPastLogsBehavior: ShowPastLogsBehavior; } /** * AfterProcessStartLogFilter * * Filters logs to only show logs from the most recent process launch for each command. * This ensures that when a process has been run multiple times, only the latest run's * logs are shown. * * Usage: * 1. First call checkLatestLaunchStatus(logs) with the existing recent logs. * 2. Call filter(logs) to get only logs from the most recent launch */ export declare class LatestExecutionLogFilter { recentCommandLaunch: Map; private showPastLogsBehavior; constructor(options: LatestExecutionLogFilterOptions); /** * Analyze logs to determine the latest launch status for each command. * Logs should be in chronological order (oldest first). * * This method scans logs to find the most recent launch status for each command. */ checkLatestLaunchStatus(logs: ProcessLog[]): void; /** * Filter logs to only include logs from the most recent launch for each command. * Only includes logs with id >= the startLogId determined by checkLatestLaunchStatus. * * Behavior when no start event is found depends on ifRecentLaunchNotFound option: * - 'show_existing_logs': Include all logs (for viewing historical output) * - 'only_show_after_recent_launch': Exclude logs until a start event is found */ filter(logs: ProcessLog[]): ProcessLog[]; } export {}; //# sourceMappingURL=LatestExecutionLogFilter.d.ts.map