import { EventEmitter } from 'events'; import type { AurixConfig } from '../agent/Config.js'; import { CronDaemon } from '../agent/CronDaemon.js'; import type { ToolRegistry } from '../tools/Registry.js'; export interface IncomingMessage { platform: string; authorId: string; authorName: string; channelId: string; content: string; replyTo?: string; replyToText?: string; threadId?: string; chatType?: 'dm' | 'group' | 'channel' | 'unknown'; forwardedFrom?: string; attachments?: { type: string; url?: string; filename?: string; }[]; isCallback?: boolean; imageConfig?: { baseUrl: string; apiKey: string; format: 'openai' | 'anthropic'; description?: string; }; } export interface Platform { name: string; connect(): Promise; disconnect(): Promise; send(content: string, channelId: string, replyTo?: string, options?: any): Promise; sendFile?(filePath: string, channelId: string, caption?: string, replyTo?: string): Promise; edit?(content: string, channelId: string, messageId: string, options?: any): Promise; react?(channelId: string, messageId: string, emoji: string): Promise; typing?(channelId: string): Promise; requestImageConfigModal?(channelId: string, userId: string, description?: string): Promise; ackImageGenerationRequest?(channelId: string, userId: string): Promise; getHealth?(): Record; on(event: 'message', handler: (msg: IncomingMessage) => void): this; } export declare class Gateway extends EventEmitter { private platforms; private agents; private config; private registry; private firstTimeUsers; private userDepths; private startTime; private processing; private activeProcessing; private lastContext; private lastUserMessages; private lastAssistantMessages; private cancelledRuns; private activeRuns; private sessionNames; private sessionGoals; private sessionRules; private messageQueue; private pendingOptionValues; private pendingImageConfig; private pendingModelInteractions; private cronDaemon; constructor(config: AurixConfig, registry: ToolRegistry, cronDaemon?: CronDaemon); register(platform: Platform): void; private getAgent; private getUserKey; private getConversationKey; private isShortFollowUp; private buildGatewayGrounding; private isUserAllowed; private getUptime; private normalizeImageEndpoint; private saveImageGenerationConfig; private sendGeneratedImage; private beginTelegramImageSetup; private renderModelInteraction; private startModelInteraction; private finishModelSelection; private consumeModelInteraction; private consumePendingImageConfig; private normalizeCommand; private handleMessage; start(): Promise; stop(): Promise; getPlatforms(): string[]; getLastContext(userKey: string): { platform: string; channelId: string; replyTo?: string; } | undefined; getMostRecentContext(): { userKey: string; platform: string; channelId: string; replyTo?: string; } | null; getAllContexts(): Array<{ userKey: string; platform: string; channelId: string; replyTo?: string; }>; getPlatform(name: string): Platform | undefined; sendFileToUser(userKey: string, filePath: string, caption?: string): Promise; } //# sourceMappingURL=Gateway.d.ts.map