/** * 渠道检测工具 - 跨渠道统一抽象 * 支持: wecom(企微), dingtalk(钉钉), feishu(飞书), terminal * 注:isTerminal/getOutputFormat 等为既有公共 API(供其他模块按需取用), * 当前活跃调用方为 large-file-bridge(isImChannel/detectChannel)。 */ /** * 从 message_received 事件中检测渠道并缓存 * 调用时机: api.on("message_received", ...) */ export declare function detectChannel(event: { channel?: string; originatingChannel?: string; }, sessionKey: string): string; /** * 根据 sessionKey 查询渠道 */ export declare function getChannel(sessionKey: string): string; /** * 是否企微渠道 */ export declare function isWecom(sessionKey: string): boolean; /** * 是否钉钉渠道 */ export declare function isDingtalk(sessionKey: string): boolean; /** * 是否飞书渠道(feishu / lark 两种标识都认) */ export declare function isFeishu(sessionKey: string): boolean; /** * 是否 IM 渠道(企微 / 钉钉 / 飞书——都有文件大小上限,需走链接上传兜底) */ export declare function isImChannel(sessionKey: string): boolean; /** * 是否终端渠道(有 TTY) */ export declare function isTerminal(sessionKey: string): boolean; /** * 获取渠道偏好的输出格式 * wecom/dingtalk → emoji纯文本 * terminal → ASCII艺术 */ export type OutputFormat = "emoji" | "ascii" | "markdown"; export declare function getOutputFormat(sessionKey: string): OutputFormat;