/** * Messaging — Shared type definitions */ import type { RawPushMessage } from '../tim/client.js'; /** * A raw message from any source (push or history). * Push messages come from TIM SDK events. */ export type RawMessage = RawPushMessage; /** * A batch of messages ready for agent processing. * Built by the WindowAggregator when flush conditions are met. */ export interface ChannelDelta { channelId: string; channelName: string; messageCount: number; participants: string[]; hasMention: boolean; urgency: number; messages: RawMessage[]; source: string; flushReason: string; } /** * SDK message format for fetchMessages (see tim/messages.ts). */ export interface HistoryMessage { id: string; from: string; text: string; time: number; seq?: number; }