donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
29 lines • 1.21 kB
TypeScript
import { BrowserContext, Page, Frame } from 'playwright';
import { NamedBindingCallback } from './NamedBindingCallback';
import { DonobuFlow } from '../managers/DonobuFlow';
/**
* Tracks direct user actions that have occurred in the web browser.
* This differs from normal Donobu flows which use GPT to analyze pages and propose actions.
* This tracker records direct user actions for reliable replay and GPT visibility.
*/
export declare class PageInteractionTracker implements NamedBindingCallback {
private readonly donobuFlow;
static readonly NAME = "donobuTrackInteraction";
constructor(donobuFlow: DonobuFlow);
name(): string;
/**
* Handles tracking of page interactions.
*
* Assumes:
* - args is a single-element array with first element being JSON convertible
* - Existence of 'data-donobu-marker' DOM attribute for events with target elements
* - donobuMarker field in payload contains the attribute value if applicable
*/
call(source: {
context: BrowserContext;
page: Page;
frame: Frame;
}, ...args: any[]): Promise<null>;
private createToolCall;
}
//# sourceMappingURL=PageInteractionTracker.d.ts.map