/** * `$skill-name` mention scanning for pi. * * pi-skills-mention never rewrites the user's prompt: the text pi stores and * displays is exactly what the user typed (so `/fuck`-style recovery, rewind * and re-editing keep working on the original `$skill` mentions). Instead we * *scan* the input for known `$skill` mentions and the extension injects the * skill contents as a separate custom message when the agent starts. * * Matching rules (kept predictable and safe): * - A mention is a `$` immediately followed by `[a-z0-9-]+`. * - Resolve greedily to the *longest* known skill name that is a prefix * (`$code-review-module` prefers `code-review-module` over `code-review`). * - Unknown tokens (`$PATH`, `$HOME`, `$(cmd)`) are ignored. * - `$$name` is the escape hatch — never treated as a mention. */ import type { MentionSkill } from "./skill-registry.js"; /** * Scan `input` for known `$skill` mentions. Returns the mentioned skills in * first-mention order, deduplicated. The input text itself is never modified. */ export declare function scanMentions(input: string, skills: Map): MentionSkill[];