//#region src/external-fetch/file-security-errors.d.ts
declare class FileSecurityError extends Error {
  constructor(message: string, options?: ErrorOptions);
}
declare class InvalidExternalFileUrlError extends FileSecurityError {
  constructor(rawUrl: string);
}
declare class BlockedUnsupportedSchemeError extends FileSecurityError {
  constructor(protocol: string);
}
declare class BlockedDisallowedPortError extends FileSecurityError {
  constructor(port: string);
}
declare class BlockedEmbeddedCredentialsError extends FileSecurityError {
  constructor();
}
declare class NoIpResolvedError extends FileSecurityError {
  constructor(hostname: string);
}
declare class BlockedUrlResolvingToPrivateIpError extends FileSecurityError {
  constructor(ip: string);
}
declare class UnableToResolveHostError extends FileSecurityError {
  constructor(hostname: string, options?: ErrorOptions);
}
declare class BlockedConnectionToPrivateIpError extends FileSecurityError {
  constructor(address: string);
}
declare class RedirectMissingLocationError extends FileSecurityError {
  constructor(url: string);
}
declare class TooManyRedirectsError extends FileSecurityError {
  constructor(url: string);
}
declare class FailedToDownloadError extends FileSecurityError {
  constructor(url: string, statusText?: string, options?: ErrorOptions);
}
declare class BlockedExternalFileLargerThanError extends FileSecurityError {
  constructor(maxBytes: number, contentLength: string);
}
declare class BlockedExternalFileExceedingError extends FileSecurityError {
  constructor(maxBytes: number);
}
declare class ExternalFileResponseBodyEmptyError extends FileSecurityError {
  constructor();
}
declare class UnexpectedRedirectStateError extends FileSecurityError {
  constructor(url: string);
}
declare class TimedOutDownloadingError extends FileSecurityError {
  constructor(url: string);
}
declare class BlockedInlineFileExceedingError extends FileSecurityError {
  constructor(maxBytes: number);
}
declare class BlockedInlineUnsupportedFileBytesError extends FileSecurityError {
  constructor(claimedContentType: string);
}
declare class BlockedExternalUnsupportedBytesError extends FileSecurityError {
  constructor(contentType: string);
}
declare class InvalidInlineFileMalformedBase64Error extends FileSecurityError {
  constructor();
}
declare class TextDocumentAttachmentError extends FileSecurityError {
  constructor(message: string, options?: ErrorOptions);
}
declare class InvalidUtf8TextDocumentError extends TextDocumentAttachmentError {
  constructor(options?: ErrorOptions);
}
declare class TextDocumentControlCharacterError extends TextDocumentAttachmentError {
  constructor(options?: ErrorOptions);
}
declare class UnsupportedTextAttachmentSourceError extends TextDocumentAttachmentError {
  constructor(mimeType: string, options?: ErrorOptions);
}
declare class PdfUrlIngestionError extends FileSecurityError {
  readonly sourceUrl: string;
  constructor(sourceUrl: string, options?: ErrorOptions);
}
/**
 * Transient / content-format errors that occur on the *external-fetch* path:
 * the server told us "no" (404/5xx/timeout/DNS), we couldn't ingest the
 * response (empty body), or the auto-fetched file's MIME type isn't one the
 * platform handles (gif, svg, bmp, etc.). Callers may drop the affected file
 * and continue rather than failing the whole request — the user didn't
 * directly upload it, the producer auto-extracted a URL on their behalf.
 *
 * Inline (user-uploaded) byte rejections like `BlockedInlineUnsupportedFileBytesError`
 * remain FATAL: when a user explicitly pastes an unsupported file we should
 * surface that to them, not silently drop. Real security guards (private-IP/SSRF,
 * embedded credentials, disallowed schemes and ports) likewise remain fatal.
 */
declare function isTransientDownloadError(error: unknown): boolean;
//#endregion
export { BlockedConnectionToPrivateIpError, BlockedDisallowedPortError, BlockedEmbeddedCredentialsError, BlockedExternalFileExceedingError, BlockedExternalFileLargerThanError, BlockedExternalUnsupportedBytesError, BlockedInlineFileExceedingError, BlockedInlineUnsupportedFileBytesError, BlockedUnsupportedSchemeError, BlockedUrlResolvingToPrivateIpError, ExternalFileResponseBodyEmptyError, FailedToDownloadError, FileSecurityError, InvalidExternalFileUrlError, InvalidInlineFileMalformedBase64Error, InvalidUtf8TextDocumentError, NoIpResolvedError, PdfUrlIngestionError, RedirectMissingLocationError, TextDocumentAttachmentError, TextDocumentControlCharacterError, TimedOutDownloadingError, TooManyRedirectsError, UnableToResolveHostError, UnexpectedRedirectStateError, UnsupportedTextAttachmentSourceError, isTransientDownloadError };