/** * 入站消息:附件筛选、展示正文、@ 判定、MediaPath(s)、UntrustedContext、回复元数据。 */ import type { MsgFileVO, WsMessage, WsMessageContent, WsMessageParams } from "./types.js"; /** 交给 OpenClaw 的结构化附件元数据 */ export interface InboundAttachmentSummary { name?: string; /** IM 人类可读来源,原样透传 */ source?: string; /** IM fileId,业务引用 ID */ refId?: string; format?: string; /** 落盘后的本地路径或原始 https 链接 */ mediaRef?: string; download?: boolean; downloaded: boolean; /** 曾尝试落盘但失败,mediaRef 仍为远程 URL */ downloadDegraded?: boolean; hasContent: boolean; } /** 仍为远程 IM 下载地址(未落盘或落盘失败) */ export declare function isRemoteAttachmentUrl(url: string): boolean; export declare function collectFileItems(msgContent: WsMessageContent | undefined): MsgFileVO[]; export declare function buildInboundDisplayText(msgContent: WsMessageContent | undefined, fileItems: MsgFileVO[]): string; export declare function isActuallyMentioned(msg: WsMessage, params: WsMessageParams, bot: { userId: string; name: string; }, rawTextForLegacy: string): boolean; export declare function mediaFieldsFromFileItems(fileItems: MsgFileVO[]): Record; /** 从 ext 中移除已由 agentContext / GroupSystemPrompt 处理的键,避免重复注入 */ export declare function extForUntrustedContext(msgExt: WsMessageContent["ext"]): Record | undefined; export declare function buildUntrustedContext(msgExt: WsMessageContent["ext"], fileItems: MsgFileVO[]): string[] | undefined; /** 结构化附件列表,写入 inboundCtx.XgImAttachments */ export declare function buildInboundAttachmentsPayload(fileItems: MsgFileVO[]): InboundAttachmentSummary[] | undefined; export declare function buildTargetReplyMeta(params: WsMessageParams): { targetMsgId: string; targetUserId: string; targetUserName: string; previewText: string; }; //# sourceMappingURL=inbound-display.d.ts.map