export type PluginEventPriority = "urgent" | "normal" | "low"; export interface PluginEventMessage { msgId: string; channel?: string; senderId: string; senderName: string; receiverId?: string; content: string; requireReply: boolean; role?: "system" | "user" | "assistant"; timestamp: string; } export interface PluginEventRecord { plugin: string; event: string; priority: PluginEventPriority; dedupKey?: string; receivedAt: number; message: PluginEventMessage; } export interface PluginEventDrainOptions { maxPerKey?: number; } export interface PluginEventDrainResult { revision: number; events: PluginEventMessage[]; } export declare class PluginEventBuffer { private readonly agentId; private revision; private records; private dedup; private nextSeq; constructor(agentId: string); get currentRevision(): number; push(record: PluginEventRecord): boolean; drain(opts?: PluginEventDrainOptions): PluginEventDrainResult; private dropOldestLowestPriority; private pruneDedup; }