import type { AbstractAgent } from "@ag-ui/client"; import type { ConversationStore, AgentSession, ReplyTarget as BotReplyTarget } from "@copilotkit/channels-core"; import type { DiscordAttachmentRef, FileDeliveryConfig } from "./download-files.js"; /** A single Discord message, normalized for history reconstruction. */ export interface DiscordHistoryMessage { id: string; content: string; authorId?: string; authorIsBot?: boolean; attachments: DiscordAttachmentRef[]; } /** * Backed entirely by the Discord channel: every turn pulls the current * channel/thread history, translates it into the AG-UI message shape, and hands * a fresh agent to the turn-runner with its `messages` set to that history. * Mirrors bot-slack's store — the platform is the durable storage, so the * bridge keeps no separate per-conversation state. The inbound (triggering) * message is part of the reconstructed history, so the app passes NO prompt. */ export declare class DiscordConversationStore implements ConversationStore { private deps; readonly seedsInboundTurn = true; constructor(deps: { /** Channel history, OLDEST→NEWEST. */ fetchHistory: (channelId: string) => Promise; /** The bot's own user id (lazily resolved after `ready`). */ botUserId: () => string; /** Inbound-file handling tunables (size caps, fetch impl, …). */ filesConfig?: FileDeliveryConfig; }); /** * Build a fresh AgentSession for this conversation by fetching its Discord * history and translating it into the AG-UI message shape. Rebuilt every * turn (no in-memory cache) — the Discord channel is the source of truth. */ getOrCreate(conversationKey: string, _replyTarget: BotReplyTarget, makeAgent: (threadId: string) => AbstractAgent): Promise; /** * Fetch the channel history (oldest→newest) and translate it into AG-UI * messages, folding the bot's chunked replies into a single assistant turn, * skipping the bot's own stream placeholders, stripping mention tokens from * user text, and turning a user message's uploaded files into multimodal * content (bot-slack parity). */ private reconstruct; } //# sourceMappingURL=conversation-store.d.ts.map