import type { OpenClawConfig as ClawdbotConfig } from "openclaw/plugin-sdk/config-contracts"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime"; import type { MeetMediaInfo } from "./types.js"; /** * 根据文件扩展名推断 MIME 类型 * 支持常见图片格式,包括现代格式如 avif, webp, heic */ export declare function inferContentTypeFromFileName(fileName: string): string | undefined; /** * 获取最终的 contentType * 如果原始 contentType 缺失或为通用二进制流,则根据文件名推断 */ export declare function resolveContentType(fileName: string, originalContentType?: string): string; export declare function extractAtIds(text: string): { text: string; atIds: number[]; }; export declare function mergeAtIds(explicitAtIds?: number[], extractedAtIds?: number[]): number[]; export declare function resolveMeetThreadTarget(sessionInfo: T, threadId?: string): T | (T & { threadId?: number; }); export type SendMessageMeetOpts = { cfg: ClawdbotConfig; to: string; text: string; accountId?: string; threadId?: string; source?: string; replyToMessageId?: string; atIds?: number[]; /** Optional runtime for consistent logging. If not provided, debug logs stay silent. */ runtime?: { log?: RuntimeEnv["log"]; error?: RuntimeEnv["error"]; }; }; export declare function sendMessageMeet(opts: SendMessageMeetOpts): Promise<{ messageId: string; chatId: string; }>; export type SendMediaMeetOpts = { cfg: ClawdbotConfig; to: string; threadId?: string; source?: string; text?: string; mediaUrl: string; mediaLocalRoots?: readonly string[]; accountId?: string; /** 上传进度回调 */ onProgress?: (progress: { percent: string; loaded: number; total: number; speedPerSecond: string; }) => void; /** Optional runtime for consistent logging. If not provided, debug logs stay silent. */ runtime?: { log?: RuntimeEnv["log"]; error?: RuntimeEnv["error"]; }; }; export declare function sendMediaMeet(opts: SendMediaMeetOpts): Promise<{ messageId: string; chatId: string; }>; export declare function resolveMeetMedia(mediaUrl: string, opts?: { cfg?: ClawdbotConfig; accountId?: string; mediaLocalRoots?: readonly string[]; }): Promise; export declare function getMessageMeet(opts: { cfg: ClawdbotConfig; messageId: string; accountId?: string; }): Promise<{ content: string; } | null>;