/** * 面向 IM 的确认错误文案:仅白名单翻译或透传上游原文;不编造「没有生成回复」等结论。 */ import type { NoReplyCause, TerminalState } from "./inbound-terminal-state.js"; export type TerminalMessageContext = { /** 原始错误信息(分类前),用于确认映射或透传 */ errorMessage?: string; noReplyCause?: NoReplyCause; /** * @deprecated 首包超时不对用户发文案;仅日志可能仍带此字段。 */ timeoutCause?: FirstReplyTimeoutCause; }; /** 首条回复超时日志粗分(不对 IM 发终态话术) */ export type FirstReplyTimeoutCause = "never_started" | "in_progress" | "ended_without_http_reply"; export declare function isAttachmentBlockedErrorMessage(message: string): boolean; export declare function isWebSocketNotReadyErrorMessage(message: string): boolean; export declare function isContextOverflowErrorMessage(message: string): boolean; export declare function isNasVolumeErrorMessage(message: string): boolean; /** * 上游错误 → IM 正文:确认白名单译人话,否则透传截断原文;无内容则空串。 */ export declare function formatConfirmedUpstreamErrorForIm(raw: string): string; /** * 终态 HTTP 文案:仅 delivery_failed / 确认错误等;no_reply / timeout / compaction 返回空(不发)。 */ export declare function buildTerminalUserMessage(state: TerminalState, context?: TerminalMessageContext): string; /** * 出站发文件失败时,将技术错误转为用户可读说明(不含实现细节与操作建议)。 */ export declare function formatUserFacingMediaDeliverError(err: unknown, mediaRefs?: string[]): string; //# sourceMappingURL=user-facing-errors.d.ts.map