/** * Inline file bytes reached a SQL write with no durable URL to stand in for * them. Raised only by the `reject` policy; a durable dispatch payload must * carry a reference the worker can re-read, never a placeholder. */ export declare class DurableAttachmentReferenceRequiredError extends Error { readonly code = "attachment_storage_required"; constructor(); } /** * `reject` throws when an attachment has bytes but no durable URL; * `placeholder` keeps a visible `{ type: "file", name, mediaType, omitted: * "inline-bytes" }` stub, for snapshots saved before the upload returned a URL. */ export type InlineBytesPolicy = "reject" | "placeholder"; /** * The one boundary every chat SQL write passes through (thread snapshots, run * events, durable dispatch payloads): inline image/file bytes become their * durable URL when the part carries one, and otherwise follow `policy`. Data * URLs embedded in any other string become a visible `[inline … omitted]`. */ export declare function stripInlineBytes(value: T, policy: InlineBytesPolicy): T; /** `stripInlineBytes` for serialized JSON; skips the parse when no body can be present. */ export declare function stripInlineBytesFromJson(json: string, policy: InlineBytesPolicy): string; /** * Throws with the JSON path of the first inline file body in `value` (an * object, or a JSON string as read back from a SQL column). */ export declare function assertNoInlineImageBytes(value: unknown, label?: string): void;