import { E as ExecutionTask, a as ExecutionTaskProgressOptions, b as ExecutionTaskApply, c as ExecutionDump, B as BaseElement, U as UIContext, I as InsightAction, D as DumpSubscriber, d as InsightTaskInfo, e as InsightOptions, f as DetailedLocateParam, L as LocateResult, g as InsightAssertionResponse, R as Rect, A as AIDescribeElementResponse } from './types-81ea39fa.js';
export { u as AIAssertionResponse, s as AIDataExtractionResponse, q as AIElementCoordinatesResponse, p as AIElementLocatorResponse, r as AIElementResponse, l as AIResponseFormat, t as AISectionLocatorResponse, o as AISingleElementResponse, m as AISingleElementResponseById, n as AISingleElementResponseByPosition, k as AIUsageInfo, V as AgentAssertOpt, x as AgentDescribeElementAtPointResult, T as AgentWaitForOpt, a6 as BaseAgentParserOpt, C as CallAIFn, a5 as Color, G as DumpMeta, O as ElementById, j as ElementTreeNode, y as EnsureObject, a9 as ExecutionRecorderItem, ar as ExecutionTaskAction, aq as ExecutionTaskActionApply, ap as ExecutionTaskInsightAssertion, ao as ExecutionTaskInsightAssertionApply, an as ExecutionTaskInsightAssertionParam, ag as ExecutionTaskInsightDumpLog, ai as ExecutionTaskInsightLocate, ah as ExecutionTaskInsightLocateApply, af as ExecutionTaskInsightLocateOutput, ae as ExecutionTaskInsightLocateParam, am as ExecutionTaskInsightQuery, al as ExecutionTaskInsightQueryApply, ak as ExecutionTaskInsightQueryOutput, aj as ExecutionTaskInsightQueryParam, at as ExecutionTaskPlanning, as as ExecutionTaskPlanningApply, ad as ExecutionTaskReturn, aa as ExecutionTaskType, ab as ExecutorContext, aS as FreeFn, au as GroupedActionDump, J as InsightDump, z as InsightExtractParam, N as LiteUISection, aw as LocateOption, F as LocateResultElement, w as LocateValidatorResult, v as LocatorValidatorOption, i as MidsceneYamlFlowItem, aD as MidsceneYamlFlowItemAIAction, aE as MidsceneYamlFlowItemAIAssert, aI as MidsceneYamlFlowItemAIBoolean, aM as MidsceneYamlFlowItemAIHover, aN as MidsceneYamlFlowItemAIInput, aO as MidsceneYamlFlowItemAIKeyboardPress, aJ as MidsceneYamlFlowItemAILocate, aH as MidsceneYamlFlowItemAINString, aG as MidsceneYamlFlowItemAINumber, aF as MidsceneYamlFlowItemAIQuery, aP as MidsceneYamlFlowItemAIScroll, aL as MidsceneYamlFlowItemAITap, aK as MidsceneYamlFlowItemAIWaitFor, aQ as MidsceneYamlFlowItemEvaluateJavaScript, aR as MidsceneYamlFlowItemSleep, M as MidsceneYamlScript, aB as MidsceneYamlScriptAndroidEnv, aC as MidsceneYamlScriptEnv, az as MidsceneYamlScriptEnvBase, aA as MidsceneYamlScriptWebEnv, h as MidsceneYamlTask, Q as OnTaskStartTip, av as PageType, K as PartialInsightDumpFromSDK, Y as PlanningAIResponse, X as PlanningAction, a1 as PlanningActionParamAssert, a3 as PlanningActionParamError, _ as PlanningActionParamHover, $ as PlanningActionParamInputOrKeyPress, a0 as PlanningActionParamScroll, a2 as PlanningActionParamSleep, Z as PlanningActionParamTap, a4 as PlanningActionParamWaitFor, W as PlanningLocateParam, a8 as PlaywrightParserOpt, P as Point, a7 as PuppeteerParserOpt, ax as ReferenceImage, H as ReportDumpWithAttributes, aU as ScriptPlayerStatusValue, aT as ScriptPlayerTaskStatus, S as Size, ac as TaskCacheInfo, ay as scrollParam } from './types-81ea39fa.js';
import { c as callAiFn } from './llm-planning-6920ac29.js';
export { a as AiAssert, A as AiLocateElement, d as describeUserPage, p as plan } from './llm-planning-6920ac29.js';
export { getVersion } from './utils.js';
export { MIDSCENE_MODEL_NAME, getAIConfig } from '@midscene_spp/shared/env';
import '@midscene_spp/shared/constants';
import 'openai/resources';

declare class Executor {
    name: string;
    tasks: ExecutionTask[];
    status: 'init' | 'pending' | 'running' | 'completed' | 'error';
    onTaskStart?: ExecutionTaskProgressOptions['onTaskStart'];
    constructor(name: string, options?: ExecutionTaskProgressOptions & {
        tasks?: ExecutionTaskApply[];
    });
    private markTaskAsPending;
    append(task: ExecutionTaskApply[] | ExecutionTaskApply): Promise<void>;
    flush(): Promise<any>;
    isInErrorState(): boolean;
    latestErrorTask(): ExecutionTask | null;
    dump(): ExecutionDump;
}

interface LocateOpts {
    context?: UIContext<BaseElement>;
    callAI?: typeof callAiFn<AIElementResponse>;
}
declare class Insight<ElementType extends BaseElement = BaseElement, ContextType extends UIContext<ElementType> = UIContext<ElementType>> {
    contextRetrieverFn: (action: InsightAction) => Promise<ContextType> | ContextType;
    aiVendorFn: (...args: Array<any>) => Promise<any>;
    onceDumpUpdatedFn?: DumpSubscriber;
    taskInfo?: Omit<InsightTaskInfo, 'durationMs'>;
    constructor(context: ContextType | ((action: InsightAction) => Promise<ContextType> | ContextType), opt?: InsightOptions);
    locate(query: DetailedLocateParam, opt?: LocateOpts): Promise<LocateResult>;
    extract<T = any>(input: string): Promise<T>;
    extract<T extends Record<string, string>>(input: T): Promise<Record<keyof T, any>>;
    extract<T extends object>(input: Record<keyof T, string>): Promise<T>;
    assert(assertion: string): Promise<InsightAssertionResponse>;
    describe(target: Rect | [number, number], opt?: {
        deepThink?: boolean;
    }): Promise<Pick<AIDescribeElementResponse, 'description'>>;
}

export { AIDescribeElementResponse, BaseElement, DetailedLocateParam, DumpSubscriber, ExecutionDump, ExecutionTask, ExecutionTaskApply, ExecutionTaskProgressOptions, Executor, Insight, InsightAction, InsightAssertionResponse, InsightOptions, InsightTaskInfo, LocateResult, Rect, UIContext, Insight as default };
