/** * @license * Copyright 2026 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { Frontmatter, Skill } from './skill.js'; /** * Parses SKILL.md from a raw content string, extracting the YAML frontmatter and the body. * * @param content - The raw content of the SKILL.md file. * @returns An object containing the parsed frontmatter and the remaining markdown body. * @throws {Error} If the content is not properly formatted with YAML frontmatter. */ export declare function parseSkillMdContent(content: string): { frontmatter: Frontmatter; body: string; }; /** * Load a complete skill, including its instructions and resources, from a directory. * * @param skillDir - The path to the directory containing the skill definition. * @returns A promise that resolves to the fully loaded Skill object. */ export declare function loadSkillFromDir(skillDir: string): Promise; /** * Validates a skill directory structure and frontmatter without fully loading all resources. * * @param skillDir - The path to the skill directory to validate. * @returns A promise that resolves to an array of validation error messages, or an empty array if valid. */ export declare function validateSkillDir(skillDir: string): Promise; /** * Loads all skills located within subdirectories of a given base path. * * @param skillsBasePath - The base directory containing individual skill subdirectories. * @returns A promise that resolves to a map of skill names to their corresponding Skill objects. */ export declare function loadAllSkillsInDir(skillsBasePath: string): Promise>; /** * Loads a complete skill directly from in-memory zip file buffer. * * The whole archive is rejected if any member name escapes the extraction * root, and the skill name must be a bare path segment. * * @param zipBuffer - The raw Buffer of the zip file containing the skill. * @returns A Skill object with all components loaded. * @throws {Error} If a member name is a traversal path, if SKILL.md is missing, * or if the skill name is missing or is not a bare path segment. */ export declare function loadSkillFromZipBuffer(zipBuffer: Buffer): Skill;