import type { ExtractFormat, ScreenshotResult } from "./read.js"; import type { AgentSession } from "./session.js"; export interface FetchPageOptions { url: string; format?: ExtractFormat; selector?: string; maxChars?: number; /** Wait for this text to appear before reading, for pages that fill in late. */ waitForText?: string; } export interface FetchPageResult { url: string; title: string; format: ExtractFormat; text: string; truncated: boolean; waitTimedOut?: boolean; /** Set when the page looks like a block, bot check, login wall or error page instead of real content. */ blocked?: string; } export interface ScreenshotPageOptions { url: string; fullPage?: boolean; quality?: number; waitForText?: string; } export interface ScreenshotPageResult { url: string; title: string; image: ScreenshotResult; waitTimedOut?: boolean; blocked?: string; } /** Names what a page that is not real content looks like, or returns undefined. * A hint for the agent, never a decision: real pages can mention these words. */ export declare function detectBlockedPage(page: { url: string; title: string; text: string; }, opts?: { scoped?: boolean; }): string | undefined; /** Loads a url in an open session and returns its content in one step. */ export declare function fetchPage(agent: AgentSession, opts: FetchPageOptions): Promise; /** Loads a url in an open session and screenshots it in one step. */ export declare function screenshotPage(agent: AgentSession, opts: ScreenshotPageOptions): Promise; //# sourceMappingURL=one-shot.d.ts.map