import { type RpcConnectionOptions } from "./connection-handler.ts";
import type { SessionEventWriter } from "./session-event-writer.ts";
import type { RpcSessionEntry } from "./session-registry.ts";
/** A session-owned adapter around the classic command and extension-UI wiring. */
export interface RpcSessionBinding {
    handle(command: object): Promise<void>;
    setClientCapabilities?(capabilities: readonly string[]): void;
    cancelPendingExtensionUiRequests?(): void;
    /** A connection of the shared host left this session (`close_session`, a dropped or detached connection). */
    connectionDetached?(connectionId: string): void;
    /** `prompt` calls this binding started that have not settled, preflight included. */
    pendingPrompts?(): readonly Promise<unknown>[];
    dispose(): Promise<void>;
}
/**
 * Creates the extension UI bridge and subscriptions within the entry's provider
 * scope. The classic handler remains the single source of command semantics.
 */
export declare function createRpcSessionBinding(sessionId: string, entry: RpcSessionEntry, writer: SessionEventWriter, requestClose: () => void, options?: Pick<RpcConnectionOptions, "capabilities" | "clientInfo" | "connectionRoles">): Promise<RpcSessionBinding>;
//# sourceMappingURL=session-binding.d.ts.map