interface ActiveWindow {
    title: string;
    owner: string;
    path?: string;
    pid?: number;
}
export interface ProductivityRecord {
    timestamp: string;
    application: string;
    windowTitle: string;
    path?: string;
    category: string;
    productivityScore: 'productive' | 'neutral' | 'unproductive';
    duration: number;
    idle: boolean;
    switches?: number;
}
export interface ActivityEvent {
    timestamp: string;
    type: string;
    details: any;
}
export interface ScreenshotRecord {
    timestamp: string;
    mimeType: string;
    imageBase64: string;
    width?: number;
    height?: number;
    application?: string;
    windowTitle?: string;
    isForeground: boolean;
}
export declare class ProductivityCollector {
    private currentApp;
    private currentTitle;
    private currentPath;
    private appStartTime;
    private pendingSessionSwitchCount;
    private lastCpuSecByPid;
    private records;
    private events;
    private lastActivityTime;
    private lastIdleState;
    private idleThreshold;
    private segmentDurationMs;
    private productivityRules;
    private trackingMode;
    private trackActiveWindow;
    private trackKeystrokesActivity;
    private trackKeystrokesLog;
    private trackMouseActivity;
    private trackBrowserUrls;
    private trackBrowserTitles;
    private trackNetworkTraffic;
    private trackScreenshots;
    private screenshotIntervalSeconds;
    private lastScreenshotAt;
    private lastScreenshotFailureLogAt;
    private lastScreenshotFailureEventAt;
    private lastScreenshotFailureReason;
    private screenshots;
    private windowsScreenshotHelperExe;
    private windowsScreenshotHelperBuildAttemptAt;
    private readonly windowsScreenshotHelperVersion;
    private privacyAnonUsers;
    private privacyBlurTitles;
    private privacyExcludeUrls;
    /** Called when server pushes a config update with tenant tracking settings */
    applyTrackingConfig(cfg: {
        tracking_mode?: string;
        track_active_window?: number | boolean;
        track_keystrokes_activity?: number | boolean;
        track_keystrokes_log?: number | boolean;
        track_mouse_activity?: number | boolean;
        track_browser_urls?: number | boolean;
        track_browser_titles?: number | boolean;
        track_network_traffic?: number | boolean;
        track_screenshots?: number | boolean;
        screenshot_interval_seconds?: number;
        privacy_anon_users?: number | boolean;
        privacy_blur_titles?: number | boolean;
        privacy_exclude_urls?: number | boolean;
    }): void;
    getTrackingMode(): string;
    isTrackNetworkTraffic(): boolean;
    isTrackBrowserUrls(): boolean;
    isTrackBrowserTitles(): boolean;
    collectActiveWindow(): Promise<void>;
    private flushCurrentAppSlice;
    private recordScreenshotFailureEvent;
    private getActiveWindow;
    private getActiveWindowWindows;
    /**
     * Parse `tasklist /V /FO CSV /NH` output.
     * Columns: "Image Name","PID","Session Name","Session#","Mem Usage","Status","User Name","CPU Time","Window Title"
     * We pick the row with the highest CPU time among those with a non-N/A window title
     * in an interactive session (Session# > 0).
     */
    private parseTasklistOutput;
    private getActiveWindowMac;
    private getActiveWindowLinux;
    private captureScreenshot;
    private inferImageMimeType;
    private readImageDimensions;
    private captureScreenshotLinux;
    private ensureWindowsScreenshotHelper;
    private buildWindowsScreenshotHelperCommand;
    private buildWindowsScreenshotInlineCommand;
    private captureScreenshotWindows;
    private captureScreenshotWindowsViaTask;
    /**
     * Get user idle time in milliseconds using OS-level APIs.
     * On Windows, uses query user/quser idle-time output.
     * This detects mouse/keyboard/touch inactivity at the OS level.
     */
    private getIdleTime;
    private getIdleTimeWindows;
    private getIdleTimeWindowsFallback;
    private getIdleTimeMac;
    private getIdleTimeLinux;
    private categorize;
    private score;
    captureScreenshotForRemote(activeWindow?: ActiveWindow | null): Promise<ScreenshotRecord | null>;
    getLastScreenshotFailureReason(): string;
    updateRules(rules: Record<string, 'productive' | 'neutral' | 'unproductive'>): void;
    flushRecords(): ProductivityRecord[];
    flushEvents(): ActivityEvent[];
    flushScreenshots(): ScreenshotRecord[];
    recordIdleEvent(isIdle: boolean): void;
    getLastInputState(): {
        lastActivityTime: number;
        isIdle: boolean;
        idleSinceMs: number;
    };
    recordURLVisit(url: string, title: string, browser: string): void;
}
export {};
//# sourceMappingURL=productivity.d.ts.map