import type { CaptureCheckpoint, CapturePageIdentity, InteractiveElement, IsolatedElement, ValidatedSessionProfile } from "./types.js"; export interface ScreenshotPageRunInput { url: string; prompt: string; pageId: string | null; } export interface ScreenshotVariantExecution { key: string; lang: string; theme: "light" | "dark"; pages: ScreenshotPageRunInput[]; } export interface DeterministicNavigationCandidate { description: string; selectors: string[]; } export interface SelectorMemoryScopeContext { pageId?: string | null; pageIdentity?: CapturePageIdentity | null; pageUrl?: string | null; } export declare function getUrlOrigin(value: string | null | undefined): string | null; export declare function urlMatchesCaptureTarget(currentUrl: string | null | undefined, targetUrl: string): boolean; export declare function urlsShareOrigin(left: string | null | undefined, right: string | null | undefined): boolean; export declare function resolveCaptureResumeUrl(params: { pageIndex: number; currentUrl?: string | null; cursorResumeUrl?: string | null; checkpoints: Array>; pageId: string | null; pageUrl: string; sessionProfile?: ValidatedSessionProfile; }): string; export declare function shouldNormalizeDialogsBeforeTargetReuse(params: { currentDialogCount: number | null | undefined; pageIdentity?: Pick | null; }): boolean; export declare function buildScreenshotVariantPlan(params: { langs: string[]; themes: Array<"light" | "dark">; pages: ScreenshotPageRunInput[]; }): ScreenshotVariantExecution[]; export interface ResolvedIsolatedElementAssignment { element: IsolatedElement; pageId: string; explicit: boolean; score: number; } export declare function resolveIsolatedElementAssignments(params: { elements: IsolatedElement[]; pageRuns: ScreenshotPageRunInput[]; }): ResolvedIsolatedElementAssignment[]; export declare function describeScreenshotVariantPlan(plan: ScreenshotVariantExecution[]): string; export declare function shouldReuseLivePageState(params: { pageIndex: number; presetRootUrl: string; pageUrl: string; currentUrl?: string | null; isAuthenticated: boolean; }): boolean; export declare function shouldUseSequentialPageHandoff(params: { pageIndex: number; currentUrl?: string | null; pageUrl: string; previousPageId?: string | null; pageId?: string | null; previousPrompt?: string; pagePrompt: string; }): boolean; export declare function buildSequentialHandoffArtifacts(actions: Array<{ action: string; success: boolean; stateChanged?: boolean; params: Record; }>): { selectorHints: string[]; selectorMemory: Record; }; export declare function buildTargetNavigationArtifacts(params: { selectorMemory?: Record; pageUrl: string; pageId?: string | null; prompt: string; }): { navigationHints: string[]; selectorMemory: Record; }; export declare function buildDeterministicNavigationPlan(params: { selectorMemory?: Record; pageUrl: string; pageId?: string | null; prompt: string; }): DeterministicNavigationCandidate[]; export declare function buildVisibleControlNavigationPlan(params: { interactiveElements?: InteractiveElement[]; pageId?: string | null; prompt: string; }): DeterministicNavigationCandidate[]; export declare function shouldAttemptSequentialReadyCheck(params: { currentUrl?: string | null; pageUrl: string; previousPageId?: string | null; pageId?: string | null; previousPrompt?: string; pagePrompt: string; }): boolean; export declare function shouldUseLiveStateFastPath(params: { bootstrapMode: "reused_live_state" | "fresh_navigation" | "sequential_handoff"; currentUrl?: string | null; pageUrl: string; previousPageId?: string | null; pageId?: string | null; previousPrompt?: string; pagePrompt: string; }): boolean; export declare function deriveRunSharedAuthProfile(profile: ValidatedSessionProfile | undefined): ValidatedSessionProfile | undefined; export declare function buildSessionBootstrapProfile(params: { runAuthProfile?: ValidatedSessionProfile; persistedVariantProfile?: ValidatedSessionProfile; requestedLang: string; requestedTheme: "light" | "dark"; startUrl?: string; }): { profile?: ValidatedSessionProfile; source: "run_shared_auth" | "persisted_variant" | "none"; }; export declare function buildSelectorMemoryScopeKeys(context?: SelectorMemoryScopeContext): string[]; export declare function scopeSelectorMemoryUpdates(updates: T[], context?: SelectorMemoryScopeContext): T[]; export declare function resolveScopedSelectorMemory(memory: Record | undefined, context?: SelectorMemoryScopeContext): Record; export declare function mergeSelectorMemory(...sources: Array | undefined>): Record; export declare function applySelectorMemoryUpdates(current: Record, updates: Array<{ stepSignature: string; selector: string; success: boolean; }>): Record;