import { type LogTextMessage } from './element_text'; import type { ConversationLogEntryInput } from './types'; /** getMessageList 返回的适配消息(@satorijs/protocol Message 的本地最小镜像)。 */ export interface BackfillHistoryMessage extends LogTextMessage { id?: string; messageId?: string; timestamp?: number; createdAt?: number; } export interface ConversationBackfillBot { selfId: string; /** * @satorijs/protocol Methods 同形方法(Bot 类型已声明);适配器覆盖 * 不一(OneBot 实测仅返回 data,Milky 返回 data + next 游标), * 故保留运行时特性检测。未实现方缺省即降级为空回填。 */ getMessageList?: (channelId: string, before?: string, direction?: 'before' | 'after' | 'around') => Promise<{ data?: BackfillHistoryMessage[]; prev?: string; next?: string; }>; /** at 目标昵称解析(Bot.getUser 同形);缺省时 at 退 @id。 */ getUser?: (userId: string) => Promise<{ name?: string; } | null>; } export interface ConversationBackfillOptions { channelId: string; warmupCount: number; } /** * 经适配器同形方法 getMessageList 拉取平台历史(分页契约镜像 Character * pullBot:批内时间正序,续读游标 next ?? prev ?? 批首 id——BidiList 契约 * next 为续读方向游标,Milky 实测填 next,OneBot 实测仅返回 data)。 * 缺少平台时间戳或作者 ID 的消息直接丢弃,不补造时间与身份。平台调用 * 失败直接抛出,由注册表保持未预热、下次 warmup 重试; * 成功重拉经去重幂等。 */ export declare const pullConversationBackfill: (bot: ConversationBackfillBot, options: ConversationBackfillOptions) => Promise;