/** * What dshline knows about a Harness skill, and nothing more. * * Every fact here is copied out of one `SkillSummary` the registry already * resolved. Harness owns discovery, duplicate providers, scope precedence, * invocation policy, and loading; this module owns only how those resolved * facts read on a terminal. * * Deliberately free of `@deepseek-ai/*` types: the presentation rules below * are the ones a spec should be able to exercise without a registry, and the * one place that touches the real service is `./catalog.ts`. * @module dshline/skills/model */ /** One effective skill, as this frontend reads it. */ export interface SkillView { /** Kebab-case identifier, exactly as Harness resolved it. */ readonly name: string; /** Short routing description. */ readonly description: string; /** Optional extra routing guidance, shown only in the selected detail. */ readonly whenToUse?: string; /** Whether a human `/name` gesture may invoke it. */ readonly userInvocable: boolean; /** Whether the model's own catalog and loader may see it. */ readonly modelInvocable: boolean; /** Raw discovery source; {@link sourceLabel} turns it into a word. */ readonly source: string; } /** * Present one discovery source. * * An unknown value is passed through rather than bucketed or dropped: the * source type is deliberately open (`| (string & {})`), so a provider Harness * gains tomorrow must read as itself instead of as `custom`. * @param source - the summary's raw source value. * @returns the word to show. */ export declare function sourceLabel(source: string): string; /** * Who may invoke one skill, as one phrase. * @param skill - the skill being described. * @returns the phrase for the detail panel. */ export declare function invocationLabel(skill: SkillView): string; /** One row of the slash menu, in the shape the completion engine consumes. */ export interface SlashCandidate { /** Name without its leading slash. */ readonly name: string; /** The dimmed note beside the name. */ readonly description: string; } /** * The `/` menu: commands, then the skills a leading `/name` can actually reach. * * Commands win a shared name outright, and the loser is dropped rather than * listed twice โ€” offering both would promise a gesture only one of them * receives, since dshline resolves the line against the command registry * before it can ever become a prompt. * @param commands - local and registered commands, already merged by the caller. * @param skills - the effective catalog; only user-invocable entries are offered. * @returns one row per offered name, sorted by name. */ export declare function slashCandidates(commands: readonly SlashCandidate[], skills: readonly SkillView[]): readonly SlashCandidate[]; /** * The note a skill row carries in the slash menu. * * `skill ยท` leads, so the kind is readable before the description is; the * user-only marker rides the same note rather than a badge column, which is * what Harness's own Web menu does with the one line of secondary text it has. * @param skill - the offered skill. * @returns the note text, unescaped and unstyled. */ export declare function skillNote(skill: SkillView): string; /** One row of the `/skills` inspector. */ export interface SkillRow { /** The skill this row describes. */ readonly skill: SkillView; /** * Whether typing this row's name after a slash actually reaches the skill. * * False for a model-only skill and for one whose name a command already * claims โ€” in both cases a `/name` prefix would be a promise the submit path * does not keep. */ readonly launchable: boolean; /** Whether a command of the same name already claims the leading-slash gesture. */ readonly shadowed: boolean; } /** * Turn the effective catalog into inspector rows. * @param skills - every effective skill, including model-only ones. * @param commandNames - every name the command registries already claim. * @returns one row per skill, in the registry's own sorted order. */ export declare function skillRows(skills: readonly SkillView[], commandNames: Iterable): readonly SkillRow[]; /** * Rows matching a typed filter. * * Name and description are matched because both are on screen. `whenToUse` is * matched as well because it is shown for the selected row and costs one more * `includes` โ€” but nothing hidden from every surface is ever matchable. * @param rows - the rows to filter. * @param query - raw filter text. * @returns the matching rows, in their original order. */ export declare function filterSkillRows(rows: readonly SkillRow[], query: string): readonly SkillRow[]; //# sourceMappingURL=model.d.ts.map