import { type SlackRawFile } from '../slack/slack.helper.js'; import type { SlackInboxItem } from '../../shared/inbox.js'; import type { SlackUserProfile } from '../slack/profiles.js'; export interface SlackSurface { id: string; channelId: string; channelName?: string; kind: 'channel' | 'dm' | 'thread'; teamId: string; threadTs?: string; visibility: 'private' | 'public'; } export interface SlackMessageEnvelope { team_id?: string; } export interface SlackRawMessageEvent { attachments?: unknown[]; blocks?: unknown; bot_id?: string; channel?: string; channel_type?: string; files?: SlackRawFile[]; subtype?: string; team?: string; text?: string; thread_ts?: string; ts?: string; type?: string; user?: string; } export interface RoutableSlackMessage extends SlackRawMessageEvent { channel: string; text: string; ts: string; type: 'app_mention' | 'message'; user: string; } /** * Observable for the local observed-conversation journal — broader than runtime * routability. Captures userless `bot_message` (bot_id only) and file-only posts * without requiring a human `user`. Wake routing still uses isRoutableSlackMessage. */ export interface ObservableSlackMessage extends SlackRawMessageEvent { channel: string; ts: string; type: 'app_mention' | 'message'; /** At least one of user / bot_id is present (enforced by the predicate). */ bot_id?: string; user?: string; } export declare function isObservableSlackMessage(event: SlackRawMessageEvent): event is ObservableSlackMessage; export declare function isRoutableSlackMessage(event: SlackRawMessageEvent): event is RoutableSlackMessage; export declare function slackEventTeamId(envelope: SlackMessageEnvelope | undefined, event: SlackRawMessageEvent): string; export declare function normalizeSlackMessage(input: { attachments?: unknown[]; attentionSuggestion?: string; envelope?: SlackMessageEnvelope; channelName?: string; event: RoutableSlackMessage; permalink?: string; text?: string; userProfile?: SlackUserProfile; }): SlackInboxItem; export declare function isSlackEvent(event: unknown): event is SlackInboxItem; export declare function slackSurfaceDisplayRef(surface: SlackSurface): string; export declare function slackSurfaceForEvent(event: SlackInboxItem): SlackSurface; //# sourceMappingURL=slack-events.d.ts.map