/** * Slack Connector * * Single-agent Bolt App instance for Slack integration. * Uses Socket Mode for connection (no public URL needed). * * Key design: * - ONE connector per agent (matching Discord's pattern) * - Channel-based conversations (channelId as session key) * - Hourglass emoji reaction as typing indicator */ import { EventEmitter } from "node:events"; import type { IChatSessionManager } from "@herdctl/chat"; import type { ISlackConnector, SlackConnectorEventMap, SlackConnectorEventName, SlackConnectorOptions, SlackConnectorState, SlackFileUploadParams } from "./types.js"; export declare class SlackConnector extends EventEmitter implements ISlackConnector { readonly agentName: string; readonly sessionManager: IChatSessionManager; private readonly botToken; private readonly appToken; private readonly channels; private readonly dmConfig; private readonly logger; private app; private commandHandler; private status; private connectedAt; private disconnectedAt; private reconnectAttempts; private lastError; private botUserId; private botUsername; private messagesReceived; private messagesSent; private messagesIgnored; constructor(options: SlackConnectorOptions); connect(): Promise; disconnect(): Promise; isConnected(): boolean; getState(): SlackConnectorState; uploadFile(params: SlackFileUploadParams): Promise<{ fileId: string; }>; private registerEventHandlers; /** * Check if a DM is allowed based on DM config (enabled, allowlist, blocklist). * Returns true if the DM should be processed, false if it was filtered. * Emits messageIgnored events when filtered. */ private checkDMAccess; /** * Try to execute a prefix command. Returns true if a command was handled. */ private tryExecuteCommand; private buildMessageEvent; emit(event: K, payload: SlackConnectorEventMap[K]): boolean; on(event: K, listener: (payload: SlackConnectorEventMap[K]) => void): this; once(event: K, listener: (payload: SlackConnectorEventMap[K]) => void): this; off(event: K, listener: (payload: SlackConnectorEventMap[K]) => void): this; } //# sourceMappingURL=slack-connector.d.ts.map