export declare enum ResourceType {
    SESSION = "session",
    TIMER = "timer",
    INTERVAL = "interval",
    FILE_HANDLE = "file_handle",
    MEMORY = "memory"
}
interface TrackedResource {
    id: string;
    type: ResourceType;
    sessionID?: string;
    createdAt: number;
    metadata?: Record<string, unknown>;
    cleanup: () => Promise<void> | void;
}
/**
 * Centralized tracker for all resources that need explicit cleanup.
 * Ensures that resources tied to a specific session are cleaned up when the session ends.
 */
export declare class ResourceTracker {
    private static _instance;
    private resources;
    private sessionResources;
    private constructor();
    static getInstance(): ResourceTracker;
    /**
     * Start tracking a resource.
     */
    track(resource: TrackedResource): void;
    /**
     * Release a specific resource by ID.
     */
    release(id: string): Promise<boolean>;
    /**
     * Release all resources associated with a specific sessionID.
     */
    releaseAllForSession(sessionID: string): Promise<number>;
    /**
     * Release all resources of a specific type.
     */
    releaseByType(type: ResourceType): Promise<number>;
    /**
     * Periodic GC for stale resources (e.g. leaked timers).
     */
    cleanupStale(maxAgeMs: number): Promise<number>;
    /**
     * Shutdown the tracker and release all managed resources.
     */
    shutdown(): Promise<void>;
    /**
     * Get current resource statistics.
     */
    getStats(): {
        total: number;
        byType: Record<string, number>;
        bySessions: number;
    };
}
export declare function trackTimer(timer: NodeJS.Timeout, sessionID?: string): string;
export declare function trackInterval(interval: NodeJS.Timeout, sessionID?: string): string;
export {};
