export interface SlackMessageTextInput { blocks?: unknown; text?: string; } export declare function slackVisibleMessageText(input: SlackMessageTextInput): string | undefined; /** * Apply blocks→visible text before routing/decide so mention detection and the * final inbox item share one canonical representation. No Slack API fetch. */ export declare function withCanonicalSlackVisibleText(input: T): T; /** * True when the event **addresses** `userId` as a Slack mention entity. * * 1. Scan blocks per protocol: `rich_text` → `user` entities; mrkdwn sources → * `<@U…>` tokens outside code (`markdown` blocks + nested `{ type: "mrkdwn" }`). * 2. If blocks produced any visible structured text and no structured mention was * found, return false — never regex the canonical rendering (covers plain_text * section/header, rich_text literals, image alt, future structured types). * 3. Scan top-level fallback only when blocks supplied no renderable body * (e.g. actions/controls-only). */ export declare function slackEventMentionsUserId(input: SlackMessageTextInput, userId: string | undefined): boolean; /** Mention tokens in mrkdwn outside inline/fenced code (`<@U…>` only). */ export declare function slackTextMentionsUserId(text: string | undefined, userId: string | undefined): boolean; export declare function slackMessageTextFromBlocks(blocks: unknown): string | undefined; //# sourceMappingURL=message-text.d.ts.map