/**
 * Skill Loader
 *
 * Enhanced skill loading from multiple directories with
 * support for global, project, and agent-specific skills.
 */
import type { Skill } from './skill-manager.js';
import { type SkillRequirements, type EligibilityResult } from './eligibility.js';
/**
 * Skill source type
 */
export type SkillSource = 'builtin' | 'global' | 'project' | 'agent';
/**
 * Loaded skill with metadata
 */
export interface LoadedSkill extends Skill {
    /** Source of the skill */
    source: SkillSource;
    /** Path to skill directory (if loaded from file) */
    path?: string;
    /** Agent ID (for agent-specific skills) */
    agentId?: string;
    /** Load timestamp */
    loadedAt: number;
    /** Skill requirements */
    requires?: SkillRequirements;
    /** Whether skill is eligible to run */
    eligible: boolean;
    /** Eligibility check result */
    eligibilityResult?: EligibilityResult;
}
/**
 * Skill loader configuration
 */
export interface SkillLoaderConfig {
    /** Global skills directory */
    globalDir: string;
    /** Project skills directory */
    projectDir: string;
    /** Whether to load global skills */
    loadGlobal: boolean;
    /** Whether to load project skills */
    loadProject: boolean;
    /** Whether to merge duplicates (project overrides global) */
    mergeDuplicates: boolean;
    /** Whether to check eligibility when loading */
    checkEligibility: boolean;
    /** Whether to skip ineligible skills */
    skipIneligible: boolean;
}
/**
 * Default skill loader configuration
 */
export declare const DEFAULT_SKILL_LOADER_CONFIG: SkillLoaderConfig;
/**
 * Loads skills from multiple directories
 *
 * @deprecated Use the SKILL.md system instead (SkillRegistry from './registry.js').
 * See src/skills/MIGRATION.md for migration guide.
 */
export declare class SkillLoader {
    private config;
    private skills;
    private agentSkillsDir;
    constructor(config?: Partial<SkillLoaderConfig>);
    /**
     * Load skills from all configured directories
     */
    loadAll(): Promise<LoadedSkill[]>;
    /**
     * Load skills from a directory
     */
    loadFromDirectory(dir: string, source: SkillSource, agentId?: string): Promise<LoadedSkill[]>;
    /**
     * Parse a SKILL.md file
     */
    private parseSkillFile;
    /**
     * Parse YAML array from string
     */
    private parseYamlArray;
    /**
     * Register agent-specific skills directory
     */
    registerAgentSkillsDir(agentId: string, dir: string): void;
    /**
     * Unregister agent-specific skills directory
     */
    unregisterAgentSkillsDir(agentId: string): void;
    /**
     * Get all loaded skills
     */
    getSkills(): LoadedSkill[];
    /**
     * Get skill by name
     */
    getSkill(name: string): LoadedSkill | undefined;
    /**
     * Get skills for an agent (includes global, project, and agent-specific)
     */
    getSkillsForAgent(agentId: string): LoadedSkill[];
    /**
     * Get skills by source
     */
    getSkillsBySource(source: SkillSource): LoadedSkill[];
    /**
     * Filter skills by agent type capabilities
     */
    filterSkillsByCapabilities(skills: LoadedSkill[], allowedTools: string[]): LoadedSkill[];
    /**
     * Create skill directory structure
     */
    ensureSkillDirs(): Promise<void>;
    /**
     * Get only eligible skills
     */
    getEligibleSkills(): LoadedSkill[];
    /**
     * Get ineligible skills with their reasons
     */
    getIneligibleSkills(): Array<{
        skill: LoadedSkill;
        reasons: string[];
    }>;
    /**
     * Re-check eligibility for all loaded skills
     */
    recheckEligibility(): void;
    /**
     * Get statistics
     */
    getStats(): {
        total: number;
        eligible: number;
        ineligible: number;
        bySource: Record<SkillSource, number>;
        byAgent: Record<string, number>;
    };
    /**
     * Clear all loaded skills
     */
    clear(): void;
}
/**
 * Get or create SkillLoader singleton
 */
export declare function getSkillLoader(config?: Partial<SkillLoaderConfig>): SkillLoader;
/**
 * Reset SkillLoader singleton
 */
export declare function resetSkillLoader(): void;
