/**
 * Pure resolver for slash-skill invocations in user prompt text.
 *
 * Reproduces the semantics of the original inline block in `ws/handler.ts`
 * exactly:
 *
 *   1. **Prefix-only** — text matches `/^\/([\w-]+)(?:\s+([\s\S]*))?$/` AND
 *      the named skill exists. The whole text is replaced by
 *      `buildSlashSkillPrompt(skill, args)` (which appends the
 *      "ARGUMENTS: x" footer when no `$ARGUMENTS` placeholder is present).
 *      Range = `[0, originalText.length]`.
 *
 *   2. **Inline scan** — regex `(^|\s)\/([\w-]+)/g`; for each match, only
 *      the `/name` token is replaced (no args appended), via
 *      `buildSlashSkillPrompt(skill, "")`. Splices are applied right-to-left
 *      to preserve indices; expansions are recorded left-to-right.
 *
 * The `expanded` field is **snapshotted at invocation time** so replaying a
 * `.jsonl` later renders the same text the agent originally saw, even if
 * SKILL.md has changed on disk.
 */
import { type SlashSkill } from "./slash-skills.js";
import { type PathRewrite } from "./skill-manifest.js";
/** Char range, in UTF-16 code units (matches `String.prototype.slice`). */
export type SkillRange = [number, number];
export interface SkillExpansion {
    /** Slash skill name (without leading `/`). */
    name: string;
    /** Raw arguments string (everything after `/name<space>` for prefix-only; empty for inline). */
    args: string;
    /** Skill source bucket (project / personal / legacy / built-in / custom). */
    source: SlashSkill["source"];
    /** Absolute path to the SKILL.md / command .md file. */
    filePath: string;
    /** UTF-16 char range in `originalText` that the chip replaces. */
    range: SkillRange;
    /** The expanded markdown — snapshotted at invocation time. */
    expanded: string;
}
export interface ResolvedSkills {
    /** The user's original verbatim text. */
    originalText: string;
    /** Text after splicing in expansions — what the model sees. Equals `originalText` when no expansions. */
    modelText: string;
    /** Recorded expansions, in original-text order. */
    expansions: SkillExpansion[];
    /** Names of `/foo` tokens that did not resolve to a known skill. */
    unknown: string[];
}
type StoreLike = {
    get(key: string): string | undefined;
} | undefined;
/**
 * Resolve all slash-skill invocations in `text`. See module doc for the
 * exact semantics. Pure function — no side effects beyond reading skills
 * via the provided store.
 */
export declare function resolveSkillExpansions(text: string, cwd: string, store?: StoreLike, pathRewrite?: PathRewrite): ResolvedSkills;
export {};
//# sourceMappingURL=resolve-skill-expansions.d.ts.map