/**
 * Auth Session Manager
 *
 * Tracks active OAuth sessions and provides cancellation capability.
 * Used to properly terminate in-progress OAuth flows from UI.
 */
/// <reference types="node" />
/// <reference types="node" />
import { EventEmitter } from 'events';
import { ChildProcess } from 'child_process';
export interface ActiveAuthSession {
    sessionId: string;
    provider: string;
    startedAt: number;
    process?: ChildProcess;
}
export declare const authSessionEvents: EventEmitter<[never]>;
/**
 * Register an active OAuth session
 */
export declare function registerAuthSession(sessionId: string, provider: string, process?: ChildProcess): void;
/**
 * Update session with process reference (if registered before spawn)
 */
export declare function attachProcessToSession(sessionId: string, process: ChildProcess): void;
/**
 * Unregister an auth session (on completion or cancellation)
 */
export declare function unregisterAuthSession(sessionId: string): void;
/**
 * Cancel an active OAuth session
 * Returns true if session was found and killed
 */
export declare function cancelAuthSession(sessionId: string): boolean;
/**
 * Get active session by session ID
 */
export declare function getActiveSession(sessionId: string): ActiveAuthSession | null;
/**
 * Get active session for a provider (most recent by startedAt)
 */
export declare function getActiveSessionForProvider(provider: string): ActiveAuthSession | null;
/**
 * Check if there's an active session for provider
 */
export declare function hasActiveSession(provider: string): boolean;
/**
 * Cancel all sessions for a provider
 */
export declare function cancelAllSessionsForProvider(provider: string): number;
//# sourceMappingURL=auth-session-manager.d.ts.map