import { type PartnerOutboundAttachment } from '../channel-message.js'; export interface AttachmentDelivery { id: string; companionId: string; sessionId: string; name: string; mediaType: string; kind: 'image' | 'file'; size: number; hash: string; channel: 'pending' | 'sent' | 'failed' | 'none'; channelRouteId?: string; createdAt?: number; } interface AttachmentSnapshotOwner { companionId: string; sessionId: string; turn: number | string; channel: boolean; channelRouteId?: string; } /** Explicit immutable deliveries, separate from mutable workspace files and board state. */ export declare class AttachmentDeliveryService { private readonly root; private readonly db; private readonly privateRoot?; private grouped; private queues; private closed; private shards; releaseOwner(id: string): void; removeOwner(id: string): Promise; private constructor(); get limitMiB(): number; setLimitMiB(value: number): void; /** Metadata only; no content hashing or loading all file bytes for the settings page. */ storedEntries(): Promise>; /** Caller holds the storage queue and has rechecked pending deliveries/task references. */ removeStored(item: AttachmentDelivery): Promise; static openPartitioned(root: string, privateRoot: (id: string) => string): Promise; private directory; private database; private existingDatabase; importExisting(item: AttachmentDelivery, data: Buffer): Promise; static open(root: string): Promise; static openGrouped(root: string): Promise; serial(sessionId: string, work: () => Promise): Promise; get(id: string): AttachmentDelivery | undefined; private save; prepare(input: AttachmentSnapshotOwner & { cwd: string; path: string; }, signal: AbortSignal): Promise; private prepareSnapshot; bytes(item: AttachmentDelivery): Promise; /** Use the immutable delivery snapshot, never a different companion's workspace path. */ outbound(item: AttachmentDelivery): Promise; deliver(item: AttachmentDelivery, send: (file: PartnerOutboundAttachment) => Promise): Promise; private deliverSnapshot; freeze(): Promise; close(): void; } export {}; //# sourceMappingURL=service.d.ts.map