UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

41 lines 1.75 kB
import type { ElementHandle } from 'playwright'; import { z } from 'zod/v4'; import type { ToolCallContext } from '../models/ToolCallContext'; import { ReplayableInteraction } from './ReplayableInteraction'; export declare const InputTextCoreSchema: z.ZodObject<{ text: z.ZodString; append: z.ZodOptional<z.ZodBoolean>; finalizeWithSubmit: z.ZodOptional<z.ZodBoolean>; }, z.core.$strip>; export declare const InputTextNonGptSchema: z.ZodObject<{ text: z.ZodString; append: z.ZodOptional<z.ZodBoolean>; finalizeWithSubmit: z.ZodOptional<z.ZodBoolean>; selector: z.ZodObject<{ element: z.ZodArray<z.ZodString>; frame: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, z.core.$strip>; }, z.core.$strip>; export declare const InputTextGptSchema: z.ZodObject<{ text: z.ZodString; append: z.ZodOptional<z.ZodBoolean>; finalizeWithSubmit: z.ZodOptional<z.ZodBoolean>; whyThisAnnotation: z.ZodString; annotation: z.ZodString; rationale: z.ZodString; }, z.core.$strip>; export declare class InputTextTool extends ReplayableInteraction<typeof InputTextCoreSchema, typeof InputTextNonGptSchema, typeof InputTextGptSchema> { static readonly NAME = "inputText"; constructor(); invoke(context: ToolCallContext, parameters: z.infer<typeof InputTextCoreSchema>, handles: { target: ElementHandle<HTMLElement | SVGElement>; label?: ElementHandle<HTMLElement | SVGElement>; }): Promise<string>; /** * Returns true when the segment is a single character that Playwright's * keyboard.press() can handle: printable ASCII (space through tilde). */ private static isKeyboardPressable; private clearField; } //# sourceMappingURL=InputTextTool.d.ts.map