/**
 * Session Lifecycle Manager - Manages session lifecycle events
 *
 * Handles session start, end, and related lifecycle operations.
 */
import type { SessionStore } from '../../session/index.js';
import type { SessionTracker } from './tracker.js';
import type { LifecycleManager } from '../lifecycle/index.js';
import type { SessionContext } from './session-context.js';
export interface SessionLifecycleEvents {
    onSessionStart?: (context: SessionContext) => void | Promise<void>;
    onSessionEnd?: (context: SessionContext, stats: SessionStats) => void | Promise<void>;
}
export interface SessionStats {
    messageCount: number;
    durationMs?: number;
}
export declare class SessionLifecycleManager {
    private sessionStore;
    private sessionTracker;
    private lifecycleManager;
    private events;
    private sessionStartTimes;
    constructor(sessionStore: SessionStore, sessionTracker: SessionTracker, lifecycleManager: LifecycleManager, events?: SessionLifecycleEvents);
    /**
     * Start a session and emit lifecycle events
     */
    startSession(context: SessionContext): Promise<void>;
    /**
     * End a session and emit lifecycle events
     */
    endSession(context: SessionContext): Promise<void>;
    /**
     * Get the number of messages in a session
     */
    private getMessageCount;
    /**
     * Get the start time for a session
     */
    getSessionStartTime(sessionKey: string): number | undefined;
    /**
     * Check if a session is currently active
     */
    isSessionActive(sessionKey: string): boolean;
}
