/** * Plugin Loader - Claude Code Native * * Reads plugin directories using Claude's official plugin.json format. * Discovers components by scanning directory structure (not from manifest). * * @module core/plugin-loader * @version 0.6.1 * @see https://docs.claude.com/en/docs/claude-code/plugins */ import type { Plugin, PluginManifest, ValidationResult } from '../types/plugin.js'; /** * PluginLoader - Loads Claude Code plugins from filesystem */ export declare class PluginLoader { constructor(); /** * Load a plugin from directory (Claude Code native) * * @param pluginPath - Absolute path to plugin directory * @returns Loaded plugin with all components * @throws PluginNotFoundError if directory doesn't exist * @throws ManifestValidationError if plugin.json is invalid */ loadFromDirectory(pluginPath: string, options?: { strict?: boolean; }): Promise; /** * Load plugin manifest from .claude-plugin/plugin.json (Claude's official format) * * @param pluginPath - Path to plugin directory * @returns Plugin manifest * @throws ManifestValidationError if plugin.json is invalid */ loadManifest(pluginPath: string): Promise; /** * Validate plugin.json (simple validation, no JSON Schema) * * @param manifest - Manifest object to validate * @returns Validation result with errors/warnings */ validateManifest(manifest: any): ValidationResult; /** * Validate plugin manifest (public API alias for validateManifest) * * @param manifest - Manifest object to validate * @returns Validation result with errors/warnings */ validate(manifest: any): Promise; /** * Get plugin metadata without full load (counts skills/agents/commands) * * @param pluginPath - Absolute path to plugin directory * @returns Plugin metadata with counts */ getMetadata(pluginPath: string): Promise<{ name: string; version: string; description: string; skillCount: number; agentCount: number; commandCount: number; }>; /** * Discover skills by scanning skills/ directory * * @param pluginPath - Path to plugin directory * @returns Array of discovered skills */ private discoverSkills; /** * Discover agents by scanning agents/ directory * * @param pluginPath - Path to plugin directory * @returns Array of discovered agents */ private discoverAgents; /** * Discover commands by scanning commands/ directory * * @param pluginPath - Path to plugin directory * @returns Array of discovered commands */ private discoverCommands; /** * Load test cases from skill directory * * @param skillPath - Path to skill directory * @returns Array of test cases */ private loadTestCases; /** * Extract description from SKILL.md or AGENT.md frontmatter * * @param content - File content * @returns Extracted description */ private extractDescription; /** * Extract capabilities from agent content * * @param content - Agent file content * @returns Array of capability strings */ private extractCapabilities; } //# sourceMappingURL=plugin-loader.d.ts.map