/**
 * Skill Trigger Extractor
 *
 * Extracts activation trigger keywords from SKILL.md and AGENT.md files.
 * These triggers enable automatic skill activation based on user prompts.
 *
 * Enhanced in v1.1.0:
 * - Added domain term extraction (api, backend, frontend, etc.)
 * - Word tokenization from compound phrases
 * - Improved matching for natural language prompts
 *
 * @module core/plugins/skill-trigger-extractor
 * @version 1.1.0
 */
/**
 * Extracted trigger data from a skill or agent
 */
export interface ExtractedTriggers {
    /** Skill or agent name */
    name: string;
    /** Parent plugin name */
    plugin: string;
    /** Type: skill or agent */
    type: 'skill' | 'agent';
    /** Description from frontmatter */
    description: string;
    /** Extracted trigger keywords (normalized) */
    triggers: string[];
    /** Path to the source file */
    path: string;
}
/**
 * Skill triggers index structure
 */
export interface SkillTriggersIndex {
    /** Inverted index: keyword → skill/agent names */
    keywords: Record<string, string[]>;
    /** Skills/agents metadata */
    skills: Record<string, SkillMetadata>;
    /** Generation timestamp */
    generatedAt: string;
    /** Total skill count */
    skillCount: number;
    /** Total keyword count */
    keywordCount: number;
}
/**
 * Metadata for a skill in the index
 */
export interface SkillMetadata {
    /** Parent plugin name */
    plugin: string;
    /** Type: skill or agent */
    type: 'skill' | 'agent';
    /** Trigger keywords */
    triggers: string[];
    /** Short description (first 150 chars) */
    description: string;
    /** Full qualified name for invocation */
    fqn: string;
}
/**
 * SkillTriggerExtractor - Extract activation triggers from plugin skills
 */
export declare class SkillTriggerExtractor {
    /**
     * Extract triggers from a single SKILL.md or AGENT.md content
     *
     * @param content - File content
     * @param name - Skill/agent name
     * @param plugin - Parent plugin name
     * @param type - 'skill' or 'agent'
     * @param filePath - Path to the file
     * @returns Extracted triggers
     */
    extractFromContent(content: string, name: string, plugin: string, type: 'skill' | 'agent', filePath: string): ExtractedTriggers;
    /**
     * Extract description from YAML frontmatter
     *
     * Handles both single-line and multi-line YAML formats:
     * - Single: description: Some text here
     * - Multi-line: description: >-
     *               First line
     *               Second line continues
     *
     * @param content - File content
     * @returns Description string
     */
    private extractDescription;
    /**
     * Extract trigger keywords from content and description
     *
     * Looks for:
     * 1. "Activates for:" sections in description
     * 2. Keywords in YAML frontmatter
     * 3. Technology names and patterns in the description
     * 4. Domain terms (api, backend, frontend, etc.)
     * 5. Tokenized words from compound phrases
     *
     * @param content - Full file content
     * @param description - Extracted description
     * @returns Array of normalized trigger keywords
     */
    extractTriggerKeywords(content: string, description: string): string[];
    /**
     * Tokenize compound keywords into individual meaningful words
     *
     * @param keywords - Array of compound keywords
     * @returns Array of individual meaningful tokens
     */
    private tokenizeKeywords;
    /**
     * Extract domain-specific terms from text
     * These are common software development domain terms that may not be
     * specific technology names but are important for matching
     *
     * @param text - Text to extract from
     * @returns Array of domain terms
     */
    private extractDomainTerms;
    /**
     * Parse a keyword list from comma/or separated string
     *
     * @param text - Keyword list text
     * @returns Array of normalized keywords
     */
    private parseKeywordList;
    /**
     * Extract technology terms from text
     *
     * @param text - Text to extract from
     * @returns Array of technology terms
     */
    private extractTechnologyTerms;
    /**
     * Check if a term is a strong technology term (not generic)
     *
     * @param term - Term to check
     * @returns True if strong technology term
     */
    private isStrongTechnologyTerm;
    /**
     * Check if word is a stop word (common words to ignore)
     *
     * @param word - Word to check
     * @returns True if stop word
     */
    private isStopWord;
    /**
     * Scan a component directory (skills or agents) and extract triggers
     */
    private scanComponentDir;
    /**
     * Scan all plugins and extract triggers
     *
     * @param pluginsDir - Path to plugins directory
     * @returns Array of extracted triggers
     */
    scanAllPlugins(pluginsDir: string): Promise<ExtractedTriggers[]>;
    /**
     * Build the skill triggers index from extracted triggers
     *
     * @param triggers - Array of extracted triggers
     * @returns Skill triggers index
     */
    buildIndex(triggers: ExtractedTriggers[]): SkillTriggersIndex;
    /**
     * Match a user prompt against the trigger index
     *
     * @param prompt - User prompt
     * @param index - Skill triggers index
     * @returns Array of matched skill FQNs sorted by relevance
     */
    matchPrompt(prompt: string, index: SkillTriggersIndex): Array<{
        fqn: string;
        score: number;
        matchedKeywords: string[];
    }>;
}
//# sourceMappingURL=skill-trigger-extractor.d.ts.map