/**
 * Human-like interaction primitives for browser automation.
 *
 * Implements Bezier mouse movement, humanized clicking, per-character typing
 * with random delays, and wheel-based scrolling with acceleration/deceleration.
 *
 * Ported from brocli's human.rs — all input is dispatched via CDP Input domain
 * through Playwright's CDPSession, bypassing Playwright's high-level API to
 * produce more realistic event patterns.
 */
import type { Page } from 'playwright-core';
/** All tunable parameters for human-like behavior. */
export interface HumanConfig {
    typingDelayMs: number;
    typingDelaySpreadMs: number;
    typingPauseChance: number;
    typingPauseRangeMs: [number, number];
    keyHoldMs: [number, number];
    mouseStepsDivisor: number;
    mouseMinSteps: number;
    mouseMaxSteps: number;
    mouseWobbleMax: number;
    mouseOvershootChance: number;
    mouseOvershootPx: [number, number];
    mouseBurstSize: [number, number];
    mouseBurstPauseMs: [number, number];
    clickAimDelayMs: [number, number];
    clickHoldMs: [number, number];
    clickInputXRange: [number, number];
    scrollDeltaBase: [number, number];
    scrollDeltaVariance: number;
    scrollPauseFastMs: [number, number];
    scrollPauseSlowMs: [number, number];
    scrollAccelSteps: [number, number];
    scrollDecelSteps: [number, number];
    scrollOvershootChance: number;
    scrollOvershootPx: [number, number];
    scrollSettleDelayMs: [number, number];
    initialCursorX: [number, number];
    initialCursorY: [number, number];
}
export type HumanPreset = 'default' | 'careful';
export declare function resolveHumanConfig(preset?: HumanPreset): HumanConfig;
interface Point {
    x: number;
    y: number;
}
/** Generate a human-like mouse path from start to end using cubic Bezier with wobble. */
export declare function generateMousePath(start: Point, end: Point, cfg: HumanConfig): Point[];
export type TypeAction = {
    kind: 'char';
    ch: string;
    holdMs: number;
} | {
    kind: 'delay';
    ms: number;
} | {
    kind: 'pause';
    ms: number;
};
/** Generate a plan of typing actions for a given text. */
export declare function generateTypingPlan(text: string, cfg: HumanConfig): TypeAction[];
export type ScrollAction = {
    kind: 'wheel';
    deltaY: number;
} | {
    kind: 'pause';
    ms: number;
};
/** Generate a scroll plan to move totalDelta pixels vertically. */
export declare function generateScrollPlan(totalDelta: number, cfg: HumanConfig): ScrollAction[];
/** Humanized click on a CSS selector. */
export declare function humanizedClick(page: Page, selector: string, preset?: HumanPreset): Promise<void>;
/** Humanized fill: click the field, clear, type character by character. */
export declare function humanizedFill(page: Page, selector: string, value: string, preset?: HumanPreset): Promise<void>;
/** Humanized key press with hold delay. */
export declare function humanizedPress(page: Page, key: string, preset?: HumanPreset): Promise<void>;
/** Humanized scroll by deltaY pixels using wheel events. */
export declare function humanizedScroll(page: Page, deltaY: number, preset?: HumanPreset): Promise<void>;
export {};
