donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
47 lines • 1.66 kB
TypeScript
import type { ElementHandle } from 'playwright';
import { z } from 'zod/v4';
import type { ToolCallContext } from '../models/ToolCallContext';
import { ReplayableInteraction } from './ReplayableInteraction';
export declare const ScrollPageCoreSchema: z.ZodObject<{
direction: z.ZodEnum<{
UP: "UP";
DOWN: "DOWN";
LEFT: "LEFT";
RIGHT: "RIGHT";
}>;
maxScroll: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export declare const ScrollPageNonGptSchema: z.ZodObject<{
direction: z.ZodEnum<{
UP: "UP";
DOWN: "DOWN";
LEFT: "LEFT";
RIGHT: "RIGHT";
}>;
maxScroll: 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 ScrollPageGptSchema: z.ZodObject<{
direction: z.ZodEnum<{
UP: "UP";
DOWN: "DOWN";
LEFT: "LEFT";
RIGHT: "RIGHT";
}>;
maxScroll: z.ZodOptional<z.ZodBoolean>;
whyThisAnnotation: z.ZodString;
annotation: z.ZodString;
rationale: z.ZodString;
}, z.core.$strip>;
export declare class ScrollPageTool extends ReplayableInteraction<typeof ScrollPageCoreSchema, typeof ScrollPageNonGptSchema, typeof ScrollPageGptSchema> {
static readonly NAME = "scrollPage";
constructor();
invoke(_context: ToolCallContext, parameters: z.infer<typeof ScrollPageCoreSchema>, handles: {
target: ElementHandle<HTMLElement | SVGElement>;
label?: ElementHandle<HTMLElement>;
}): Promise<string>;
}
//# sourceMappingURL=ScrollPageTool.d.ts.map