import type { CrowdyAgentMode, CrowdyAgentToolInvocationV1, CrowdyAgentToolResultV1 } from './types.js'; import { CrowdyAgentToolRegistry } from './registry.js'; export interface CrowdyAgentBrowserToolContextV1 { readonly invocation: CrowdyAgentToolInvocationV1; readonly signal: AbortSignal; } export type CrowdyAgentBrowserToolHandlerV1 = (argumentsValue: Readonly>, context: CrowdyAgentBrowserToolContextV1) => unknown | Promise; export type CrowdyAgentBrowserToolHandlersV1 = Readonly>; export interface CrowdyAgentBrowserDispatcherOptionsV1 { readonly registry: CrowdyAgentToolRegistry; readonly handlers: CrowdyAgentBrowserToolHandlersV1; readonly getSessionId?: () => string | null; readonly getClientEpoch: () => string | null; readonly getContextVersion: () => string; readonly getMode?: () => CrowdyAgentMode; readonly now?: () => number; readonly maxRememberedCalls?: number; } /** * Exact browser tool router with execute-once semantics. It has no fallback * executor: unknown names, raw SDK access, and missing handlers fail closed. */ export declare class CrowdyAgentBrowserToolDispatcher { private readonly options; private readonly records; private readonly active; private readonly now; constructor(options: CrowdyAgentBrowserDispatcherOptionsV1); dispatch(invocation: CrowdyAgentToolInvocationV1): Promise; has(toolCallId: string): boolean; /** Abort pending browser work during human or context preemption. */ cancelActive(): void; /** * Cache lifetime is the attached session. Call only after that session is * closed or fenced; clearing during a live session could repeat an effect. */ clearClosedSession(): void; private execute; private validateEnvelope; } //# sourceMappingURL=browser-dispatcher.d.ts.map