import type { HTMLElement } from "linkedom";
import type { ElementHandle, ImageFormat } from "puppeteer-core";
import type { Transport } from "./tab-protocol.js";
declare global {
    interface Element extends HTMLElement {
    }
    function getComputedStyle(element: Element): Record<string, unknown>;
    var innerWidth: number;
    var innerHeight: number;
    var document: {
        elementFromPoint(x: number, y: number): Element | null;
    };
}
export interface OpTimeouts {
    /** Largest per-op deadline allowed — strictly below the cell budget. */
    budgetBound: number;
    /** Ceiling for quick page reads. */
    quickOpMs: number;
    /** Ceiling for interactive actions + default for waits. */
    actionOpMs: number;
}
/** Resolve the per-op fail-fast ceilings for a given cell budget. */
export declare function resolveOpTimeouts(cellTimeoutMs: number): OpTimeouts;
/**
 * Effective timeout for a wait helper (`waitFor*`). A positive explicit `{ timeout }` is
 * honored but clamped to the cell budget so it still fails fast + named; raising the tool
 * `timeout` raises that cap, so a longer budget stays meaningful. No `{ timeout }` → the
 * action ceiling. Puppeteer's `{ timeout: 0 }` / `Infinity` ("disable") maps to the largest
 * bounded wait (`budgetBound`) — the harness never permits an unbounded wait. Garbage input
 * (negative, `NaN`) falls back to the action ceiling rather than the longest wait.
 */
export declare function resolveWaitTimeout(cellTimeoutMs: number, explicit?: number): number;
interface ScreenshotOptions {
    selector?: string;
    fullPage?: boolean;
    save?: string;
    silent?: boolean;
}
export declare function normalizeSelector(selector: string): string;
export interface InflightOp {
    label: string;
    startedAt: number;
}
/** Human-readable label for a screenshot op, used in op tracking + timeout errors. */
export declare function describeScreenshot(opts?: ScreenshotOptions): string;
/** Map an explicit save path's extension to a puppeteer capture format (default png). */
export declare function imageFormatForPath(filePath: string): ImageFormat;
/** Summarize still-running helpers (oldest first) so a cell timeout names what stalled. */
export declare function describeInflight(inflight: Map<number, InflightOp>): string;
export declare class WorkerCore {
    #private;
    constructor(transport: Transport);
    nextElementId(): number;
    cacheElement(id: number, handle: ElementHandle): void;
}
export {};
