import type { BrowserFileSystem } from "@volter/browser-runtime"; import type { RemoteRuntime } from "./client.js"; /** Directory names that a lockfile or a build reproduces; never archived, never mirrored. */ export declare const DEPENDENCY_DIRECTORIES: readonly string[]; /** Every dependency directory under `root`, at any depth, as absolute paths. */ export declare function dependencyExclusions(filesystem: BrowserFileSystem, root: string, names?: readonly string[]): Set; /** The command that reproduces the dependency tree from what the project carries, or undefined. */ export declare function installCommand(filesystem: BrowserFileSystem, root: string): string | undefined; export interface MoveResult { bytes: number; entries: number; fileBytes: number; integrity: string; excluded: string[]; install: string | undefined; ms: number; } /** Local to remote: archive everything but dependency trees, import it, and say how to reproduce them. */ export declare function moveWorkspace(local: BrowserFileSystem, remote: RemoteRuntime, { root, exclude }?: { root?: string; exclude?: ReadonlySet; }): Promise; /** Remote to local: archive everything but dependency trees and merge it in; the local tree keeps its own dependencies. */ export declare function returnWorkspace(remote: RemoteRuntime, local: BrowserFileSystem, { root, excludeNames }?: { root?: string; excludeNames?: readonly string[]; }): Promise<{ bytes: number; entries: number; integrity: string; ms: number; }>; export interface MirrorEvent { direction: "to-remote" | "to-local"; kind: "write" | "delete"; path: string; } export interface MirrorStats { toRemote: number; toLocal: number; suppressed: number; } /** * Keeps a local filesystem and a remote sandbox the same while both may * change. Writes and deletes on either side are applied to the other; a change * that is the echo of something this mirror just applied is recognised by * path and content and dropped, so the two sides never ping-pong. */ export declare function mirrorWorkspace(local: BrowserFileSystem, remote: RemoteRuntime, { root, exclude, onEvent }?: { root?: string; exclude?: ReadonlySet; onEvent?: (event: MirrorEvent) => void; }): { stop(): void; readonly stats: MirrorStats; }; //# sourceMappingURL=transfer.d.ts.map