import type { AIDescribeElementResponse, DetailedLocateParam, LocateResultWithDump, Rect, ServiceExtractOption, ServiceExtractParam, ServiceExtractResult, ServiceTaskInfo, UIContext } from '../types';
import type { IModelConfig } from '@midscene/shared/env';
import type { TMultimodalPrompt } from '../common';
export interface LocateOpts {
    context?: UIContext;
}
export type AnyValue<T> = {
    [K in keyof T]: unknown extends T[K] ? any : T[K];
};
interface ServiceOptions {
    taskInfo?: Omit<ServiceTaskInfo, 'durationMs'>;
}
export default class Service {
    contextRetrieverFn: () => Promise<UIContext> | UIContext;
    taskInfo?: Omit<ServiceTaskInfo, 'durationMs'>;
    constructor(context: UIContext | (() => Promise<UIContext> | UIContext), opt?: ServiceOptions);
    locate(query: DetailedLocateParam, opt: LocateOpts, modelConfig: IModelConfig): Promise<LocateResultWithDump>;
    extract<T>(dataDemand: ServiceExtractParam, modelConfig: IModelConfig, opt?: ServiceExtractOption, pageDescription?: string, multimodalPrompt?: TMultimodalPrompt, context?: UIContext): Promise<ServiceExtractResult<T>>;
    describe(target: Rect | [number, number], modelConfig: IModelConfig, opt?: {
        deepLocate?: boolean;
    }): Promise<Pick<AIDescribeElementResponse, 'description'>>;
}
export {};
