/**
 * Native Session Discovery - Discovers and tracks native CLI tool sessions
 * Supports Gemini, Qwen, and Codex session formats
 */
export interface NativeSession {
    sessionId: string;
    tool: string;
    filePath: string;
    projectHash?: string;
    createdAt: Date;
    updatedAt: Date;
}
export interface SessionDiscoveryOptions {
    workingDir?: string;
    limit?: number;
    afterTimestamp?: Date;
}
/**
 * Calculate project hash (same algorithm as Gemini/Qwen)
 * Note: Gemini/Qwen use the absolute path AS-IS without normalization
 * On Windows, this means using backslashes and original case
 */
export declare function calculateProjectHash(projectDir: string): string;
/**
 * Base session discoverer interface
 */
declare abstract class SessionDiscoverer {
    abstract tool: string;
    abstract basePath: string;
    /**
     * Get all sessions for a project
     */
    abstract getSessions(options?: SessionDiscoveryOptions): NativeSession[];
    /**
     * Get the latest session
     */
    getLatestSession(options?: SessionDiscoveryOptions): NativeSession | null;
    /**
     * Find session by ID
     */
    abstract findSessionById(sessionId: string): NativeSession | null;
    /**
     * Track new session created during execution
     * @param beforeTimestamp - Filter sessions created after this time
     * @param workingDir - Project working directory
     * @param prompt - Optional prompt content for precise matching (fallback)
     */
    trackNewSession(beforeTimestamp: Date, workingDir: string, prompt?: string): Promise<NativeSession | null>;
    /**
     * Match session by prompt content
     * Searches for the prompt in session's user messages
     */
    matchSessionByPrompt(sessions: NativeSession[], prompt: string): NativeSession | null;
    /**
     * Extract first user message from session file
     * Override in subclass for tool-specific format
     */
    abstract extractFirstUserMessage(filePath: string): string | null;
}
/**
 * Get session discoverer for a tool
 */
export declare function getDiscoverer(tool: string): SessionDiscoverer | null;
/**
 * Get latest native session for a tool
 */
export declare function getLatestNativeSession(tool: string, workingDir?: string): NativeSession | null;
/**
 * Find native session by ID
 */
export declare function findNativeSessionById(tool: string, sessionId: string): NativeSession | null;
/**
 * Track new session created during execution
 * @param tool - CLI tool name (gemini, qwen, codex, claude)
 * @param beforeTimestamp - Filter sessions created after this time
 * @param workingDir - Project working directory
 * @param prompt - Optional prompt for precise matching in parallel execution
 */
export declare function trackNewSession(tool: string, beforeTimestamp: Date, workingDir: string, prompt?: string): Promise<NativeSession | null>;
/**
 * Get all sessions for a tool
 */
export declare function getNativeSessions(tool: string, options?: SessionDiscoveryOptions): NativeSession[];
/**
 * Check if a tool supports native resume
 * Note: codex is excluded because `codex resume` requires a TTY (terminal)
 * which doesn't work in spawn() context. Codex uses prompt-concat mode instead.
 */
export declare function supportsNativeResume(tool: string): boolean;
/**
 * Get native resume command arguments for a tool
 */
export declare function getNativeResumeArgs(tool: string, sessionId: string | 'latest'): string[];
/**
 * Get base path for a tool's sessions
 */
export declare function getToolSessionPath(tool: string): string | null;
export {};
//# sourceMappingURL=native-session-discovery.d.ts.map