import type { Config } from '@xopcai/xopc/config/schema.js'; import type { ChannelPluginInitOptions } from '@xopcai/xopc/channels/plugin-types.js'; import type { MessageBus } from '@xopcai/xopc/infra/bus/index.js'; import type { SlackRuntimeCaches } from '../state/caches.js'; import type { SlackAuthIdentity } from './client.js'; import { type SlackAssistantEventCallbacks } from '../inbound/assistant-view.js'; import type { SlackInboundEventInput } from '../inbound/message-pipeline.js'; export interface SlackEventDispatcherDeps { getConfig: () => Config; bus: MessageBus; host: NonNullable; caches: SlackRuntimeCaches; processMessageEvent: (input: SlackInboundEventInput) => Promise; assistantCallbacks?: SlackAssistantEventCallbacks; onStopChannelThread?: (channelId: string, threadTs?: string) => void; onObserveHumanParticipant?: (params: { accountId: string; userId: string; teamId?: string; channelId: string; threadTs?: string; }) => void; } /** * Verify `event_callback` envelope ownership (matching appId, teamId for workspace installs, * and authorized bot/user installation). */ export declare function verifySlackEventCallbackEnvelope(params: { payload: Record; identity: SlackAuthIdentity; expectedAppId?: string; postAs: 'bot' | 'user'; }): { ok: boolean; teamId?: string; eventId?: string; appId?: string; }; export declare function createSlackEventDispatcher(deps: SlackEventDispatcherDeps): { dispatch: (params: { accountId: string; kind: "events_api" | "interactive" | "slash_commands"; payload: Record; identity: SlackAuthIdentity; appId?: string; }) => Promise; };