import type { MessagingBot, ConversationEvent, MessagingEventHandler, MessagingInfo } from "../../adapter.js"; import type { EventsWatcher } from "../../events.js"; import type { ChannelStore } from "../../store.js"; import type { SlackChannel, SlackUser } from "./types.js"; /** * Build a Slack context block whose text is capped at the mrkdwn limit. * Used for muted diagnostics and ephemeral command responses. */ export declare function buildMrkdwnContextBlock(text: string): object; export type { SlackChannel, SlackEvent, SlackUser } from "./types.js"; export declare class SlackMessagingBot implements MessagingBot { private socketClient; private webClient; private handler; private workingDir; private store; private botUserId; private botId; private teamId; private ownMentionRegex; private startupTs; private users; private channels; private queues; private eventsWatcher; private createContext; constructor(handler: MessagingEventHandler, config: { appToken: string; botToken: string; workingDir: string; store: ChannelStore; }); setEventsWatcher(watcher: EventsWatcher): void; start(): Promise; getUser(userId: string): SlackUser | undefined; getChannel(channelId: string): SlackChannel | undefined; getAllUsers(): SlackUser[]; getAllChannels(): SlackChannel[]; private stripOwnMention; postMessage(channel: string, text: string): Promise; postEphemeral(channel: string, user: string, text: string, threadTs?: string): Promise; postEphemeralBlocks(channel: string, user: string, text: string, blocks: object[], threadTs?: string): Promise; postMessageBlocks(channel: string, text: string, blocks: object[]): Promise; postPrivate(conversationId: string, userId: string, text: string): Promise; postPrivateDiagnostic(conversationId: string, userId: string, text: string, options?: { style?: "muted" | "error"; }): Promise; openDirectMessage(userId: string): Promise; updateMessage(channel: string, ts: string, text: string): Promise; startMessageStream(channel: string, text: string, threadTs?: string, recipientUserId?: string): Promise; appendMessageStream(channel: string, ts: string, text: string): Promise; stopMessageStream(channel: string, ts: string): Promise; deleteMessage(channel: string, ts: string): Promise; /** Set the status for an assistant thread (shows "thinking" state) */ setAssistantStatus(channel: string, threadTs: string, status: string): Promise; postInThread(channel: string, threadTs: string, text: string): Promise; postInThreadBlocks(channel: string, threadTs: string, text: string, blocks: object[]): Promise; uploadFile(channel: string, filePath: string, title?: string, threadTs?: string): Promise; logToFile(channel: string, entry: object): void; logBotResponse(channel: string, text: string, ts: string, threadTs?: string, slackBlocks?: object[]): void; getMessagingInfo(): MessagingInfo; /** * Enqueue an event for processing. Always queues (no "already working" rejection). * Returns true if enqueued, false if queue is full (max 5). */ enqueueEvent(event: ConversationEvent): boolean; private getQueue; private resolveQueueKey; private hasKnownThreadSession; private processSlackMessageIntake; private buildHomeView; private resolveStopTarget; private isStopText; private createCommandAdapters; private buildSlashCommandEvent; private routeSlashLoginCommand; private routeSlashNewCommand; private routeSlashModelCommand; private routeSlashSessionCommand; private routeSlashAdminCommand; private setupEventHandlers; private handleAppMention; private handleMessageEvent; private handleSlashCommand; private handleAppHomeOpened; private handleBlockAction; private handleSlackInteraction; /** * Log a user message to log.jsonl after attachments are ready. */ private logUserMessage; private logExternalMessagingBotMessage; private getExistingTimestamps; private backfillChannel; private backfillAllChannels; private fetchUsers; private fetchChannels; } //# sourceMappingURL=bot.d.ts.map