/**
 * Byte storage seam. The kernel stores a `contentRef` (an opaque object key) on a
 * MessagePart; the actual bytes live behind this port. Dev binds LocalDiskStorage;
 * prod swaps to S3/R2/Supabase Storage with zero changes to the media service or app.
 */
export interface StoragePort {
  put(objectKey: string, data: Buffer, mime: string): Promise<{ sizeBytes: number; checksumSha256: string }>;
  get(objectKey: string): Promise<{ data: Buffer; mime: string; sizeBytes: number } | null>;
  remove(objectKey: string): Promise<void>;
}

export const STORAGE_PORT = Symbol('STORAGE_PORT');
