export { isCreditsLimitErrorCode } from "../agent/engine/error-detail.js"; export declare const BUILDER_SPACE_SETTINGS_URL = "https://builder.io/account/space?utm_source=agent-native&utm_medium=product&utm_campaign=onboarding&utm_content=space_settings"; export declare const NEW_CHAT_ACTION_HREF = "agent-native:new-chat"; /** * A 401 says the credential this request carried was refused. It does NOT say * whose credential it was, and the reader is frequently someone with no saved * key to fix: the rejected credential can be a workspace or deployment one they * cannot see. The previous copy named the reader's own "saved provider key" as * the cause and sent everyone to Settings, which is why one shared credential * cost two days of chasing key configuration. * * Say only what the 401 actually proves, and name the recovery that now exists: * a rejected credential is fingerprinted and skipped on the next attempt * (`recordProviderCredentialAuthFailure`), so retrying reaches for a different * one instead of replaying this failure. */ export declare const PROVIDER_CREDENTIAL_REJECTED_MESSAGE = "The provider rejected the credential used for this request; it is skipped on the next attempt. Retry, or update your provider key if it keeps failing."; export declare const SERVER_AUTHORED_CREDENTIAL_CODES: ReadonlySet; export declare const CHAT_REQUEST_TOO_LARGE_MESSAGE = "This request exceeded the server's size limit (HTTP 413). Start a new chat or remove large attachments or references, then retry."; export declare const CHAT_CAPABILITY_UNAVAILABLE_MESSAGE = "We couldn't send your message right now. Please try again shortly."; export declare const CHAT_CAPABILITY_UNSUPPORTED_MESSAGE = "This app can't safely retry your saved prompt yet. Update the app, then try again."; export declare function formatChatErrorText(errorMessage: string, upgradeUrl?: string, errorCode?: string): string; export interface NormalizedChatError { message: string; details?: string; } type ErrorTranslate = (key: string, options?: Record) => string; export declare function localizeKnownChatErrorText(text: string, t: ErrorTranslate): string; export declare function isProviderAuthenticationError(text: string, errorCode?: string): boolean; export declare function normalizeChatError(errorMessage: string, errorCode?: string): NormalizedChatError;