import { type BrowserActionInput, type BrowserControlResult, type BrowserRiskLevel } from '@xopcai/browser-control-contract'; export interface BrowserHostBlockedEvent { action: string; code: string; message: string; origin?: string; url?: string; at: number; } export interface BrowserHostTakeoverEvent { browserSessionId: string; reason: string; url: string; at: number; } export interface BrowserHostArtifact { kind: 'screenshot' | 'download'; path: string; origin?: string; filename?: string; capturedAt: number; } export interface BrowserHostFacts { browserSessionId?: string; driverKind?: 'playwright' | 'extension' | 'desktop'; visitedOrigins: string[]; finalUrl?: string; actionsExecuted: number; riskCounts: Record; blockedEvents: BrowserHostBlockedEvent[]; takeoverRequests: BrowserHostTakeoverEvent[]; artifacts: BrowserHostArtifact[]; latestScreenshotPath?: string; consoleErrorCount: number; failedRequestCount: number; } /** * Host-owned audit ledger recording objective browser facts independently of * untrusted web page content or subagent self-reports. */ export declare class BrowserHostFactsLedger { private readonly entries; /** Start a fresh audit window for a delegated run while keeping session identity. */ beginAudit(taskKey: string): void; recordAction(taskKey: string, params: { sessionId: string; driverKind: 'playwright' | 'extension' | 'desktop'; input: BrowserActionInput; result: BrowserControlResult; }): void; recordTakeover(taskKey: string, event: { browserSessionId: string; reason: string; url: string; }): void; recordArtifact(taskKey: string, artifact: Omit & { capturedAt?: number; }): void; snapshot(taskKey: string): BrowserHostFacts | undefined; clear(taskKey: string): void; clearAll(): void; private ensureEntry; } /** Format host-verified browser facts for parent agent cross-verification. */ export declare function formatBrowserHostFacts(facts: BrowserHostFacts): string;