import { IStreamLogger } from '../PSAgentLogger'; import { SkillContent, SkillInstallationOptions, SkillMetadata, SkillSourcesObject } from './types'; /** * Gets the slingshot directories for both workspace and user levels. * Creates the directories if they don't exist. * @param {string} repoRoot - The root directory of the repository (not used in current implementation but can be useful for future enhancements) * @returns {Object} Object containing workspaceLevelSlingshotDir and userLevelSlingshotDir paths */ export default function getSlingshotDirectories(repoRoot: string): { workspaceLevelSlingshotDir: string | null; userLevelSlingshotDir: string | null; }; /** * Validates skill name for security (prevents path traversal) */ export declare function validateSkillName(skillName: string): boolean; /** * Validates skill source URL for security (prevents command injection) */ export declare function validateSkillSource(source: string): boolean; /** * Ensures skills directory exists */ export declare function ensureSkillsDirectory(skillsPath: string): Promise; /** * Gets the path to a skill's SKILL.md file * Skills are stored in the .agents/skills subdirectory as created by npx skills CLI */ export declare function getSkillFilePath(skillsPath: string, skillName: string): string; /** * Checks if a skill exists locally */ export declare function skillExists(skillsPath: string, skillName: string): boolean; /** * Reads skill content and parses frontmatter using skillParser */ export declare function readSkillContent(skillsPath: string, skillName: string): Promise; /** * Scans a directory for installed skills and returns metadata */ export declare function scanInstalledSkills(skillsPath: string): Promise>; /** * Normalizes skill source URLs to handle common formatting issues */ export declare function normalizeSkillSource(source: string): string; /** * Extract skill name from source URL */ export declare function extractSkillName(source: string): string; /** * Install a skill using npx skills command (simplified) */ export declare function installSkill(options: SkillInstallationOptions): Promise; /** * Converts skill metadata to XML format for system prompts */ export declare function convertSkillsToSystemPromptXml(skills: SkillMetadata[]): string; /** * Get skills XML from a skills directory scan */ export declare function getSkillsSystemPromptFromDirectory(skillsPath: string): Promise; /** * Setup skills directory and get system prompt * Accepts skill sources as an object mapping skill names to source configurations */ export declare function setupSkillsAndGetPrompt(skillsPath: string, sources?: SkillSourcesObject, log?: IStreamLogger): Promise;