import { type BlobWritten } from './blob-store.js'; /** Read a resource payload at this branch, then its retained ancestors. */ export declare function readResourceBlob(service: string, key: string, root?: string): Promise; /** Write a resource payload on this branch (a stored object's bytes), where a read finds it first. */ export declare function writeResourceBlob(service: string, key: string, bytes: Uint8Array, root?: string): Promise; /** Write a resource payload on this branch from a body as it arrives (a model's weights, an upload's bytes), kept only * when `accept` holds for its size and SHA-256 (the blob seam's `writeBlobStream`). True when kept. */ export declare function writeResourceBlobStream(service: string, key: string, body: ReadableStream | AsyncIterable, accept: (written: BlobWritten) => boolean, root?: string): Promise; /** Remove this branch's copy of a resource payload; an ancestor's stays its own (the row that named it is what a * deletion ends). */ export declare function removeResourceBlob(service: string, key: string, root?: string): Promise; /** A service's resources dir at this branch, then at each retained ancestor's: where a read resolves a payload, and * what a listing that mints ids covers, so a branch serves bytes its parent received and never re-mints a parent's id. */ export declare function resourceChain(service: string, root?: string): string[]; /** Where a resource blob's key is kept under a resources directory. A key is a relative path, its parts joined by '/'. * On Windows a part may hold a character no file name can: a ':' there names an NTFS stream of the file before it, so * `asset:` wrote into a stream of a file named `asset` and the store's rename failed (EINVAL). There each of * `<>:"|?*`, a control character and '%' itself is written as %XX, one name per key; elsewhere the key is the path. */ export declare function resourceBlobFile(dir: string, key: string): string; /** The key a file under a resources directory holds: resourceBlobFile's inverse, its parts joined by '/'. */ export declare function resourceBlobKey(dir: string, path: string): string; /** Size of a resource payload at this branch or its ancestors, or null. */ export declare function resourceBlobSize(service: string, key: string, root?: string): Promise; /** A byte range of a resource payload at this branch or its ancestors (a ranged read where the * store has one), or null when absent. */ export declare function readResourceBlobRange(service: string, key: string, start: number, endInclusive: number, root?: string): Promise;