import { z, ZodObject } from "zod"; export interface CaptchaActionLocation { x: string; y: string; } export declare const CaptchaActionState: { readonly CreatingAction: "creatingAction"; readonly AdjustAction: "adjustAction"; readonly ActionConfirmed: "actionConfirmed"; }; export type CaptchaActionState = typeof CaptchaActionState[keyof typeof CaptchaActionState]; export declare const CaptchaActionTypes: { readonly Click: "click"; readonly Drag: "drag"; readonly Type: "type"; readonly MultiClick: "multiClick"; readonly CaptchaSolved: "captcha_solved"; }; export type CaptchaActionType = typeof CaptchaActionTypes[keyof typeof CaptchaActionTypes]; export interface CaptchaClickAction { action: typeof CaptchaActionTypes.Click; location: CaptchaActionLocation; actionState: CaptchaActionState; } export interface CaptchaMultiClickAction { action: typeof CaptchaActionTypes.MultiClick; locations: { index: number; x: string; y: string; }[]; actionState: CaptchaActionState; } export interface CaptchaDragAction { action: typeof CaptchaActionTypes.Drag; startLocation: CaptchaActionLocation; endLocation: CaptchaActionLocation; actionState: CaptchaActionState; } export interface CaptchaTypeAction { action: typeof CaptchaActionTypes.Type; location: CaptchaActionLocation; value: string; actionState: CaptchaActionState; } export interface CaptchaFinishedAction { action: typeof CaptchaActionTypes.CaptchaSolved; } export type CaptchaAction = CaptchaClickAction | CaptchaMultiClickAction | CaptchaDragAction | CaptchaTypeAction | CaptchaFinishedAction; declare const singleCaptchaActionSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{ action: z.ZodLiteral<"click">; location: z.ZodObject<{ x: z.ZodString; y: z.ZodString; }, "strict", z.ZodTypeAny, { x?: string; y?: string; }, { x?: string; y?: string; }>; actionState: z.ZodEnum<["creatingAction", "adjustAction"]>; }, "strict", z.ZodTypeAny, { action?: "click"; location?: { x?: string; y?: string; }; actionState?: "creatingAction" | "adjustAction"; }, { action?: "click"; location?: { x?: string; y?: string; }; actionState?: "creatingAction" | "adjustAction"; }>, z.ZodObject<{ action: z.ZodLiteral<"multiClick">; locations: z.ZodArray, "many">; actionState: z.ZodEnum<["creatingAction", "adjustAction"]>; }, "strict", z.ZodTypeAny, { action?: "multiClick"; actionState?: "creatingAction" | "adjustAction"; locations?: { x?: string; y?: string; index?: number; }[]; }, { action?: "multiClick"; actionState?: "creatingAction" | "adjustAction"; locations?: { x?: string; y?: string; index?: number; }[]; }>, z.ZodObject<{ action: z.ZodLiteral<"drag">; startLocation: z.ZodObject<{ x: z.ZodString; y: z.ZodString; }, "strict", z.ZodTypeAny, { x?: string; y?: string; }, { x?: string; y?: string; }>; endLocation: z.ZodObject<{ x: z.ZodString; y: z.ZodString; }, "strict", z.ZodTypeAny, { x?: string; y?: string; }, { x?: string; y?: string; }>; actionState: z.ZodEnum<["creatingAction", "adjustAction"]>; }, "strict", z.ZodTypeAny, { action?: "drag"; actionState?: "creatingAction" | "adjustAction"; startLocation?: { x?: string; y?: string; }; endLocation?: { x?: string; y?: string; }; }, { action?: "drag"; actionState?: "creatingAction" | "adjustAction"; startLocation?: { x?: string; y?: string; }; endLocation?: { x?: string; y?: string; }; }>, z.ZodObject<{ action: z.ZodLiteral<"type">; location: z.ZodObject<{ x: z.ZodString; y: z.ZodString; }, "strict", z.ZodTypeAny, { x?: string; y?: string; }, { x?: string; y?: string; }>; value: z.ZodString; actionState: z.ZodEnum<["creatingAction", "adjustAction"]>; }, "strict", z.ZodTypeAny, { value?: string; action?: "type"; location?: { x?: string; y?: string; }; actionState?: "creatingAction" | "adjustAction"; }, { value?: string; action?: "type"; location?: { x?: string; y?: string; }; actionState?: "creatingAction" | "adjustAction"; }>, z.ZodObject<{ action: z.ZodLiteral<"captcha_solved">; }, "strict", z.ZodTypeAny, { action?: "captcha_solved"; }, { action?: "captcha_solved"; }>]>; export type CaptchaActionSchemaType = z.infer; export type WrappedSchema = ZodObject<{ response: z.ZodType; }>; /** * Abstract class for LLM (Language Learning Model) connectors. * * Note: When using a schema, it must be a ZodObject of the form: * z.object({ response: }) */ export declare abstract class LLMConnector { /** * Send a text-only query. * @param prompt The text prompt. * @param schema Optional ZodObject schema for structured output. * @returns The LLM response parsed as type T. */ abstract query(prompt: string, schema?: WrappedSchema): Promise; /** * Send a query with an image. * @param prompt The text prompt. * @param imageBase64 The base64-encoded image data. * @param schema Optional ZodObject schema for structured output. * @returns The LLM response parsed as type T. */ abstract queryWithImage(prompt: string, imageBase64: string, schema?: WrappedSchema): Promise; getCaptchaAction(imageBase64: string, actionHistory?: CaptchaAction[]): Promise; adjustCaptchaActions(imageBase64WithOverlay: string, pendingAction: CaptchaAction, previousActions?: CaptchaAction[]): Promise; private buildPromptForCaptchaAction; private buildPromptForActionAdjustment; } export {}; //# sourceMappingURL=llm-connector.d.ts.map