import type { BrowserVisual } from '@xopcai/browser-control-contract'; /** * Returns an error reason if the file path targets a known sensitive credential, * private key, or xopc state file that must never be uploaded by browser automation. */ export declare function isSensitiveUploadPath(filePath: string): string | null; /** * Isolated per-task upload staging sandbox. * Staged files live outside the workspace and are automatically wiped on * cross-origin navigation or browser session close. */ export declare class BrowserUploadStaging { private readonly rootDir; constructor(baseDir: string); getTaskUploadDir(taskKey: string): string; getTaskArtifactsDir(taskKey: string): string; getTaskDownloadsDir(taskKey: string): string; /** Persist a visual screenshot artifact for auditability and parent review. */ saveScreenshotArtifact(taskKey: string, visual: BrowserVisual, revision: number): string; isPathInTaskUploads(taskKey: string, filePath: string): boolean; /** * Explicitly copy an authorized source file into the task's upload staging dir. * Rejects sensitive files and paths outside `allowedSourceRoots`. */ stageFile(taskKey: string, sourcePath: string, allowedSourceRoots: string[], targetFilename?: string): string; /** Wipe staged uploads for a task (e.g., on cross-origin navigation or close). */ clearTaskUploads(taskKey: string): void; } export declare function isPathWithinAllowedRoots(filePath: string, roots: string[]): boolean;