/**
 * The provider handle capability the shutdown registry needs.
 * Structural so handles of any session-options generic register without
 * variance friction.
 */
export interface ShutdownCapableSandboxHandle {
    onRuntimeShutdown(): Promise<void>;
}
/**
 * Registers a live sandbox handle for shutdown tracking. A later handle
 * for the same provider and durable session replaces the previous entry.
 */
export declare function trackActiveSandboxHandle(input: {
    readonly providerName: string;
    readonly handle: ShutdownCapableSandboxHandle;
    readonly sessionId: string;
}): void;
/**
 * Stops every tracked sandbox by invoking its runtime-shutdown hook in
 * parallel, then clears the registry. Failures are logged and never
 * thrown so one misbehaving sandbox cannot block server shutdown.
 */
export declare function shutdownActiveSandboxHandles(input?: {
    readonly log?: (message: string) => void;
}): Promise<void>;
/** Returns the number of tracked handles. Exposed for tests and logging. */
export declare function countActiveSandboxHandles(): number;
export declare function clearActiveSandboxHandlesForTest(): void;
