/** * v1.0.1 — `@` mention syntax for multi-repo intent routing. * * SoloSquad's value prop is "one agent across multiple repos". The PM * already infers target_repo from message content via LLM reasoning, * but inference is lossy and expensive. This module gives the user a * **zero-cost, deterministic override**: any message containing * `@` where `` matches a registered repo gets a stable * marker injected for the PM to honor. * * Pattern source: GitHub Slack app's `@` mention + `/github * subscribe owner/repo` (see `docs/plan/v1.0.1-discord-ready-deprecation.md` * §3 for the alternatives reviewed). Cheap because routing happens at * regex time, before any LLM call. * * Disambiguation from Discord user pings: Discord mentions are * `<@123456789>` (numeric id wrapped in angle brackets). Our pattern * matches `@` and then *intersects with the registered * slug list* — typos and Discord usernames silently drop through and * the message reaches the PM as ordinary text. No false positives. */ export interface MentionResult { /** Mentioned slugs that match a registered repo, in order of appearance, deduped. */ mentioned: string[]; /** Mentions that looked like @something but didn't match any registered slug. */ unknown: string[]; /** * Text to forward to PM. When one or more mentions resolve, a stable * `[target_repo:]` (single) or `[target_repos:,]` (multi) * prefix is prepended so PM SKILL.md can parse it deterministically. * Mentions inside the message are left intact for human readability. */ forwardText: string; } /** * Scan `input` for `@` tokens and resolve them against the org's * `registeredSlugs` list. Caller passes the slug list (cheap directory * listing in `bot/index.ts`); this keeps the parser pure and testable. * * Returns the original text plus a target_repo marker prefix when any * mention resolved. When zero mentions resolve, returns input unchanged. */ export declare function parseMentions(input: string, registeredSlugs: readonly string[]): MentionResult;