import { AthenaChatMention, AthenaChatUser } from './types.js'; export type AthenaRichBodyFormat = "markdown" | "plain"; /** Structural mention exactly as it appears on the wire. */ export interface AthenaRichBodyMention { length: number; offset: number; user_id: string; } /** `body_json` payload understood by the Athena chat gateway. */ export interface AthenaRichBodyV1 { format: AthenaRichBodyFormat; mentions?: AthenaRichBodyMention[]; v: 1; } /** * Resolves `@handle` text against a participant list into structural mentions. * * Unknown handles are skipped rather than guessed, so a typo never addresses * the wrong person. */ export declare function resolveMentionsFromText(text: string, users: readonly AthenaChatUser[]): AthenaChatMention[]; /** Builds the `body_json` payload for `client.chat.room.message.send`. */ export declare function buildAthenaRichBody(input: { format?: AthenaRichBodyFormat; mentions?: readonly AthenaChatMention[]; }): AthenaRichBodyV1; /** Type guard for a well-formed `AthenaRichBodyV1` payload. */ export declare function isAthenaRichBodyV1(value: unknown): value is AthenaRichBodyV1; /** * Reads mentions and the body format back off `body_json`. * * Malformed or absent payloads degrade to plain markdown with no mentions * rather than throwing, because a single bad message must not blank the thread. */ export declare function parseAthenaRichBody(value: unknown): { format: AthenaRichBodyFormat; mentions: AthenaChatMention[]; }; export type AthenaChatTextSegment = { type: "text"; value: string; } | { type: "mention"; userId: string; value: string; }; /** * Splits message text into plain and mention segments using stored offsets. * * Overlapping or out-of-range mentions are discarded so a corrupt payload can * never slice the text incorrectly. */ export declare function segmentMentionText(text: string, mentions: readonly AthenaChatMention[]): AthenaChatTextSegment[];