/** * linkify — auto-tagging layer (Abel's order, 2026-07-16). * * "Always @-tag who you address, human or bot — a plain-text name rings nothing." * Rather than trusting every agent to remember, the MCP enforces it at send time: * * 1. ROSTER CACHE — name→ID map built from users.list, refreshed hourly. * Instant lookups; no per-message round trips. * 2. AUTO-LINKIFY — outgoing text is rewritten before chat.postMessage: * "@Florence" (any casing) and clear ADDRESSING uses of a bare roster name * ("Florence — ...", start-of-line "Hailee:", "hey Monet,") become <@ID>. * Existing <@ID> mentions are left untouched. Conservative on bare names: * only exact roster matches in addressing positions are converted, so prose * like "the florence render" is never mangled. * 3. Callers can inspect what happened via the returned `converted` list * (surfaced in tool results for transparency). * * Pure logic lives here (testable, no I/O except the injected fetcher). */ export interface RosterEntry { id: string; names: string[]; } export interface Roster { byName: Map; builtAt: number; } export declare const ROSTER_TTL_MS: number; /** Build the lookup map. Ambiguous names (two users share it) are DROPPED — * wrong tag is worse than no tag. */ export declare function buildRoster(entries: RosterEntry[]): Roster; export interface LinkifyResult { text: string; converted: Array<{ name: string; id: string; }>; } /** * Rewrite outgoing message text: * - `@Name` → <@ID> (anywhere, case-insensitive) * - `Name` bare → <@ID> only in addressing positions: * start of text/line followed by [,:—-] or space+word, OR * preceded by "hey|hi|hello|thanks|thank you|cc" etc. * Never touches text inside existing <@...> / <#...> / code spans. */ export declare function linkifyMentions(text: string, roster: Roster): LinkifyResult; //# sourceMappingURL=linkify.d.ts.map