/** * When the model may discover and load skills on its own. * * `explicit` (the default) keeps model-invocable skills out of the system prompt and opens them * only for a user turn that asks for a skill. `auto` is the upstream behavior: every * model-invocable skill is advertised on every turn. Explicit invocation (`/skill:name`, * `$name`) and skills an agent or chain config names are never gated. */ export type SkillInvocationMode = "explicit" | "auto"; export interface SkillInvocationPolicy { mode: SkillInvocationMode; /** Skills advertised on every turn even in `explicit` mode. */ alwaysAvailable: string[]; } /** What one user turn asked for. */ export interface SkillRequest { /** The user asked for a skill this turn. */ open: boolean; /** Known skill names the user named with `$name` or `/skill:name`. */ requested: string[]; } export interface SkillInvocationState extends SkillInvocationPolicy, SkillRequest { } /** Appended wherever skill instructions reach the model. */ export declare const SKILL_PRECEDENCE_NOTE = "Explicit user requirements (colors, materials, layout, copy, references, constraints) override this skill's defaults, bans, and personas. Apply the skill only to choices the user left open."; /** A closed request: nothing asked for. */ export declare const NO_SKILL_REQUEST: SkillRequest; /** Does this user text ask for a skill? The word "skill" or a known `$name`/`/skill:name` opens it. */ export declare function detectSkillRequest(text: string, knownSkillNames: Iterable): SkillRequest; /** A queued steer or follow-up can open the current request but never closes it. */ export declare function mergeSkillRequests(current: SkillRequest, next: SkillRequest): SkillRequest; export declare function normalizeSkillInvocationPolicy(input: { mode?: unknown; alwaysAvailable?: unknown; } | undefined): SkillInvocationPolicy; /** Whether the model may discover this skill now. Callers filter model-ineligible skills first. */ export declare function isSkillModelVisible(state: SkillInvocationState, name: string): boolean; /** The system prompt is per session, not per turn: it lists only what every turn may use. */ export declare function isSkillAlwaysAdvertised(policy: SkillInvocationPolicy, name: string): boolean;