import type { WorkspaceBackend, WorkspaceReservation, ManifestWriteResult } from "./workspace_sync.js"; /** The broker surface this backend needs (RunnerControlClient satisfies it). */ export interface WorkspaceBrokerTransport { workspaceReserve(totalBytes: number): Promise; workspaceManifestRead(): Promise<{ manifest: string | null; generation: string | null; }>; workspaceManifestWrite(manifest: string, expected: string | null, totalBytes: number): Promise; workspacePacksExist(digests: readonly string[]): Promise; workspacePackUrls(op: "put" | "get", digests: readonly string[]): Promise>; workspacePacksDelete(digests: readonly string[]): Promise; uploadBytes(url: string, headers: Record, body: Uint8Array): Promise; downloadBytes(url: string): Promise; } export declare class BrokerWorkspaceBackend implements WorkspaceBackend { private readonly broker; /** The scope's live footprint, carried from the reserve so the manifest write can record what * actually landed rather than re-deriving it. */ private lastReservedBytes; constructor(broker: WorkspaceBrokerTransport); reserve(totalBytes: number): Promise; readManifest(): Promise<{ bytes: Uint8Array | null; generation: string | null; }>; writeManifest(bytes: Uint8Array, expected: string | null): Promise; existingPacks(digests: readonly string[]): Promise>; writePack(digest: string, bytes: Uint8Array): Promise; readPack(digest: string): Promise; deletePacks(digests: readonly string[]): Promise; }