export interface SkillModelConfig { provider?: string; model: string; } export interface SkillFrontmatter { name: string; description: string; version?: string; author?: string; tags?: string[]; allowedTools?: string[]; priority?: number; args?: string[]; model?: SkillModelConfig; } export interface Skill { name: string; description: string; version: string; author?: string; tags: string[]; allowedTools?: string[]; priority: number; basePath: string; source: string; frontmatter: SkillFrontmatter; filePath: string; } export interface SkillMetadata { name: string; description: string; version: string; tags: string[]; allowedTools?: string[]; } export interface SkillRegistry { get(name: string): Skill | undefined; getAll(): Skill[]; getMetadata(): SkillMetadata[]; getBody(name: string): Promise; } /** Default maximum skill body size in characters (~8k tokens at 4 chars/token). */ export declare const DEFAULT_SKILL_BODY_MAX_CHARS = 32000; /** Default warning threshold in characters (~2k tokens at 4 chars/token). */ export declare const DEFAULT_SKILL_BODY_WARN_CHARS = 8000; /** * Resolved skill body limits from environment variables. * Falls back to defaults if not set or unparsable. */ export declare function getSkillBodyLimits(): { maxChars: number; warnChars: number; }; /** Result of applying skill body size limits. */ export interface TruncationResult { /** The (possibly truncated) body */ body: string; /** Whether truncation was applied */ truncated: boolean; /** Original body size in characters */ originalChars: number; /** Estimated original token count (chars / 4) */ originalTokenEstimate: number; /** Final body size in characters */ finalChars: number; /** Estimated final token count (chars / 4) */ finalTokenEstimate: number; } /** * Enforce size limits on a skill body. * Truncates with a clear marker if the body exceeds maxChars. * Fail-soft: never throws, always returns a usable body. */ export declare function limitSkillBody(body: string, maxChars?: number, warnChars?: number): TruncationResult;