import type { ConnectivityTestResult, DeviceAction, ExecutionDump } from '@midscene/core';
import { type PlaygroundRuntimeInfo } from '../runtime-metadata';
import type { AgentFactory, ExecutionOptions, FormValue, PlaygroundAgent } from '../types';
import { BasePlaygroundAdapter } from './base';
export declare class LocalExecutionAdapter extends BasePlaygroundAdapter {
    private agent;
    private agentFactory?;
    private dumpUpdateCallback?;
    private progressCallback?;
    private readonly _id;
    private currentRequestId?;
    constructor(agent?: PlaygroundAgent, agentFactory?: AgentFactory);
    get id(): string;
    onDumpUpdate(callback: (dump: string, executionDump?: ExecutionDump) => void): void;
    setProgressCallback(callback: (tip: string) => void): void;
    parseStructuredParams(action: DeviceAction<unknown>, params: Record<string, unknown>, options: ExecutionOptions): Promise<unknown[]>;
    formatErrorMessage(error: any): string;
    getActionSpace(context?: unknown): Promise<DeviceAction<unknown>[]>;
    checkStatus(): Promise<boolean>;
    overrideConfig(aiConfig: Record<string, unknown>): Promise<void>;
    runConnectivityTest(): Promise<ConnectivityTestResult>;
    /**
     * Safely detaches the Chrome debugger without destroying the agent.
     * This removes the "Debugger attached" banner from the browser window
     * while keeping the agent instance intact for potential reuse.
     * Called on errors to improve user experience by cleaning up the UI.
     */
    private detachDebuggerSafely;
    executeAction(actionType: string, value: FormValue, options: ExecutionOptions): Promise<unknown>;
    /**
     * Recreate agent instance using the factory function.
     * Called automatically when executeAction is called.
     */
    private recreateAgent;
    cancelTask(_requestId: string): Promise<{
        error?: string;
        success?: boolean;
        dump?: ExecutionDump | null;
        reportHTML?: string | null;
    }>;
    /**
     * Get current execution data without resetting
     * This allows retrieving dump and report when execution is stopped
     */
    getCurrentExecutionData(): Promise<{
        dump: ExecutionDump | null;
        reportHTML: string | null;
    }>;
    getInterfaceInfo(): Promise<{
        type: string;
        description?: string;
        size?: {
            width: number;
            height: number;
        };
        actionTypes?: string[];
    } | null>;
    getRuntimeInfo(): Promise<PlaygroundRuntimeInfo | null>;
}
