import type { FilePart, ImagePart, TextPart } from "ai";
import { type Attachment, type UploadedAttachment } from "@superblocksteam/library-shared/types";
import { type AiAttachmentLeaseReference } from "@superblocksteam/shared";
export type LeaseResolvableAttachmentPart = (FilePart & {
    superblocksAttachmentMetadata?: AiAttachmentLeaseReference;
}) | (ImagePart & {
    superblocksAttachmentMetadata?: AiAttachmentLeaseReference;
});
export declare const isUploadedAttachment: (attachment: Attachment) => attachment is UploadedAttachment;
/**
 * Canonicalize stable attachment URLs before they enter lease resolution.
 *
 * Server-uploaded attachments commonly use relative `/api/v1/files/content/:id`
 * URLs. We intentionally normalize those against a fixed localhost origin so the
 * same canonical string is used for:
 * - attachment metadata sent over the lease RPC
 * - provider-side cache keys
 * - URL-backed file/image content parts
 *
 * The origin is not semantically important; the server resolves by attachment ID
 * encoded in the pathname.
 */
export declare function toAttachmentUrl(url: string): URL;
export declare function getCanonicalAttachmentUrl(url: string | URL): string;
export declare function getResolvableAttachmentUrl(value: string | URL): string | undefined;
export declare function getAttachmentLeaseMetadata(attachment: UploadedAttachment): AiAttachmentLeaseReference;
export declare function toUploadedAttachmentContentPart(attachment: UploadedAttachment): LeaseResolvableAttachmentPart;
export declare function toUploadedAttachmentReferenceTextPart(attachment: UploadedAttachment, options?: {
    downloadEnabled: boolean;
}): TextPart;
//# sourceMappingURL=uploaded-content-part.d.ts.map