import type { TraceProcessorService } from '../services/traceProcessorService';
export interface DetectedFocusApp {
    packageName: string;
    totalDurationNs: number;
    switchCount: number;
}
export interface FocusAppDetectionResult {
    apps: DetectedFocusApp[];
    primaryApp?: string;
    method: 'battery_stats' | 'oom_adj' | 'frame_timeline' | 'none';
}
/**
 * Detect foreground ("focus") apps from a Perfetto trace using cross-source SQL.
 *
 * Tier 1: android_battery_stats_event_slices — most reliable, tracks `battery_stats.top`
 * Tier 2: android_oom_adj_intervals — fallback, score <= 0 means foreground
 * Tier 3: FrameTimeline upid/layer evidence — useful when focus stats are absent
 */
export declare function detectFocusApps(traceProcessorService: TraceProcessorService, traceId: string): Promise<FocusAppDetectionResult>;
/** Human-readable duration for system prompt (e.g. "2.3s", "145ms") */
export declare function formatDurationNs(ns: number): string;
//# sourceMappingURL=focusAppDetector.d.ts.map