import type { HookFunction, HookRegisterOptions } from "./types"; /** * Register a session-scoped hook. The callback is serialized and sent to the host (Render); * once registered, it runs in the host context even when the extension iframe is not on the current page. * The callback must be self-contained (only use event, hostCommands, callCommand). * Uses options.hookId as a stable dedup key: re-registering with the same hookId replaces the previous hook. */ declare function register(topic: string, callback: HookFunction, options: HookRegisterOptions): string; /** * Unregister a hook by ID. Sends a message to the host to remove the hook. */ declare function unregister(hookId: string): void; export declare const hooks: { register: typeof register; unregister: typeof unregister; }; export type { HookFunction, HookRegisterOptions } from "./types";