/** * Files this runner produced on the computer, reported to the Melaya desktop * app (contract ComputerRunnerFileMessage, { type: "computer.file" }) so * computer control can open them or pick them in a file dialog by handle. * * Only inside the desktop app (hostChannel.isHosted()); under `npx` every * function here is a no-op. The path goes to the app's main process over the * parentPort and never to the server: the app turns it into an opaque handle. * * Sources: Assistant turn output files (after assistantFiles.ts accepted them) * and pipeline outputs written to MELAYA_OUTPUT_DIR during a run. Browser * downloads are denied by the browser bridge (acceptDownloads: false), so there * is nothing to report from there. */ /** At most this many files per run, so a tool that writes thousands of files cannot flood the host. */ export declare const MAX_REPORTED_PER_RUN = 25; /** Report one file. Returns true when a message was sent. */ export declare function reportHostFile(path: string, origin: "download" | "output"): boolean; /** * Files in `dir` (and one level of sub-folders) modified at or after `sinceMs`, * newest first, capped. Pure apart from reading the folder. */ export declare function filesWrittenSince(dir: string, sinceMs: number, max?: number): string[]; /** After a run: report the outputs it wrote. No-op outside the desktop app. */ export declare function reportOutputsSince(dir: string | undefined, sinceMs: number): number;