import express from 'express';
export type AssistantSessionStatus = 'pending' | 'running' | 'awaiting_user' | 'completed' | 'failed' | 'quota_exceeded';
export interface ManagedAssistantSession {
    sessionId: string;
    status: AssistantSessionStatus;
    createdAt: number;
    lastActivityAt: number;
    sseClients: express.Response[];
    error?: string;
}
export interface SessionCleanupOptions<T extends ManagedAssistantSession> {
    terminalMaxIdleMs: number;
    nonTerminalMaxIdleMs: number;
    now?: number;
    shouldCleanup?: (sessionId: string, session: T, context: {
        now: number;
        idleMs: number;
        isTerminal: boolean;
        isAbandonedNonTerminal: boolean;
    }) => boolean;
    onCleanup?: (sessionId: string, session: T) => void;
}
/**
 * Thin application service for assistant session lifecycle and in-memory state.
 * Routes/controllers should avoid direct Map manipulation.
 */
export declare class AssistantApplicationService<T extends ManagedAssistantSession> {
    private readonly sessions;
    getSession(sessionId: string): T | undefined;
    setSession(sessionId: string, session: T): void;
    deleteSession(sessionId: string): boolean;
    entries(): IterableIterator<[string, T]>;
    touchSession(sessionId: string): T | undefined;
    addSseClient(sessionId: string, client: express.Response): T | undefined;
    removeSseClient(sessionId: string, client: express.Response): T | undefined;
    markSessionFailed(sessionId: string, errorMessage: string): T | undefined;
    cleanupIdleSessions(options: SessionCleanupOptions<T>): string[];
}
//# sourceMappingURL=assistantApplicationService.d.ts.map