UNPKG

donobu

Version:

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

31 lines 1.53 kB
import type { Page } from 'playwright-core'; import type { FlowMetadata } from '../../../models/FlowMetadata'; import type { ProposedToolCall } from '../../../models/ProposedToolCall'; import type { FlowsPersistence } from '../../../persistence/flows/FlowsPersistence'; /** * Handle returned by {@link installRecorder} that allows draining * recorded actions incrementally during a tbd session. */ export interface TbdRecorderHandle { /** * Returns all newly recorded manual interactions since the last drain, * converted to ProposedToolCall objects. Call this before each AI * instruction to preserve chronological ordering. */ drainRecordedActions(): ProposedToolCall[]; } /** * Installs Donobu's standard interaction tracking infrastructure on the * page, using the same browser-side scripts (smart selectors, event * listeners) and server-side handling ({@link PageInteractionTracker}) * that the normal Donobu flow engine uses. * * This ensures: * - High-quality selectors (data-testid, aria-label, text, CSS, XPath) * - Proper keystroke merging (consecutive keys → inputText tool calls) * - No redundant navigation recording (only clicks/keydowns are tracked) * - Actions persist through the normal persistence layer (visible in UI) * - Post-action screenshots are captured automatically */ export declare function installRecorder(page: Page, persistence: FlowsPersistence, flowMetadata: FlowMetadata): Promise<TbdRecorderHandle>; //# sourceMappingURL=actionRecorder.d.ts.map