import type { BrowserActions } from "./actions.js";
/**
 * Structured result of a browser action dispatch. The LLM-facing interface
 * still receives only `.text` (via `dispatchBrowserAction`), but internal
 * callers — ScriptRunner, logging, skill generation — read `ok` directly
 * instead of inferring failure from string prefixes.
 */
export interface BrowserActionResult {
    ok: boolean;
    text: string;
    action: string;
    /** True when the result includes a [verification failed] tag from `expect`. */
    expectationFailed?: boolean;
}
/**
 * Centralized failure detection. Any prefix added by an action method that
 * means "this didn't work" should appear here. Kept in one place so we
 * don't drift as actions add new error shapes.
 */
export declare function isFailureText(text: string): boolean;
/**
 * Same as `dispatchBrowserAction` but returns the structured result. Use
 * this from internal callers that need to know whether an action succeeded
 * without re-running the failure-prefix regex themselves.
 */
export declare function dispatchBrowserActionDetailed(actions: BrowserActions, action: string, args: Record<string, unknown>): Promise<BrowserActionResult>;
/**
 * Shared browser action dispatcher.
 * Routes top-level actions and act interaction kinds to BrowserActions methods.
 * Used by agent.ts, task-runner.ts, and script-runner.ts.
 */
export declare function dispatchBrowserAction(actions: BrowserActions, action: string, args: Record<string, unknown>): Promise<string>;
