import { AsyncResponse, Command } from './tool-registry.js';

export { type Command, setRunnerAbortController } from './tool-registry.js';
declare global {
    interface Window {
        __hostHandlers?: Record<string, HostHandler>;
    }
}
type HostHandler<T = unknown, R = unknown> = (params: T) => Promise<R>;
export declare function registerHostHandler<T, R>(action: string, handler: (params: T) => Promise<R>): void;
export declare function registerHostHandlers(handlers: Record<string, HostHandler>): void;
export declare function isValidMainThreadAction(action: string): boolean;
export declare function normalizeParams(action: string, params: unknown): unknown;
export declare function executeMainThreadCommand(command: Command, relaySignal?: AbortSignal): Promise<AsyncResponse>;
export declare function getActiveTabId(): number | null;
export declare function initExtensionListeners(): void;
export declare function removeExtensionListeners(): void;
