/**
 * Skills Registry Module
 *
 * A ClawHub-like registry for discovering, installing, and managing skills.
 */
import { EventEmitter } from 'events';
export interface SkillManifest {
    /** Skill unique name (e.g., '@author/skill-name') */
    name: string;
    /** Version (semver) */
    version: string;
    /** Display name */
    displayName: string;
    /** Description */
    description: string;
    /** Author info */
    author: {
        name: string;
        email?: string;
        url?: string;
    };
    /** Homepage URL */
    homepage?: string;
    /** Repository URL */
    repository?: string;
    /** License */
    license: string;
    /** Keywords for search */
    keywords: string[];
    /** Dependencies (other skills) */
    dependencies?: Record<string, string>;
    /** Platform requirements */
    platforms?: string[];
    /** Required tools/binaries */
    requirements?: {
        bins?: string[];
        env?: string[];
        nodeVersion?: string;
    };
    /** Entry point */
    main: string;
    /** Skill category */
    category: SkillCategory;
    /** Is verified/official */
    verified?: boolean;
    /** Icon URL */
    icon?: string;
}
export type SkillCategory = 'development' | 'productivity' | 'communication' | 'data' | 'security' | 'automation' | 'integration' | 'utility' | 'other';
export interface SkillVersion {
    /** Version string */
    version: string;
    /** Release date */
    releasedAt: Date;
    /** Changelog */
    changelog?: string;
    /** Download URL */
    downloadUrl: string;
    /** Checksum */
    checksum: string;
    /** Size in bytes */
    size: number;
    /** Deprecated */
    deprecated?: boolean;
    /** Deprecation message */
    deprecationMessage?: string;
}
export interface InstalledSkill {
    /** Skill manifest */
    manifest: SkillManifest;
    /** Installation path */
    installPath: string;
    /** Installed at */
    installedAt: Date;
    /** Updated at */
    updatedAt?: Date;
    /** Is enabled */
    enabled: boolean;
    /** Configuration */
    config?: Record<string, unknown>;
}
export interface SkillSearchResult {
    /** Skill name */
    name: string;
    /** Display name */
    displayName: string;
    /** Description */
    description: string;
    /** Latest version */
    latestVersion: string;
    /** Author name */
    author: string;
    /** Download count */
    downloads: number;
    /** Star count */
    stars: number;
    /** Is verified */
    verified: boolean;
    /** Category */
    category: SkillCategory;
    /** Keywords */
    keywords: string[];
    /** Updated at */
    updatedAt: Date;
}
export interface RegistryConfig {
    /** Registry URL */
    registryUrl: string;
    /** Installation directory */
    installDir: string;
    /** Enable auto-updates */
    autoUpdate: boolean;
    /** Update check interval (ms) */
    updateCheckIntervalMs: number;
    /** Cache TTL (ms) */
    cacheTTLMs: number;
    /** Allow unverified skills */
    allowUnverified: boolean;
}
export declare const DEFAULT_REGISTRY_CONFIG: RegistryConfig;
export interface RegistryEvents {
    'skill-install': (skill: InstalledSkill) => void;
    'skill-uninstall': (name: string) => void;
    'skill-update': (skill: InstalledSkill, oldVersion: string) => void;
    'skill-enable': (name: string) => void;
    'skill-disable': (name: string) => void;
    'search-complete': (results: SkillSearchResult[]) => void;
    'update-available': (name: string, currentVersion: string, newVersion: string) => void;
    'error': (error: Error) => void;
}
export declare class SkillsRegistry extends EventEmitter {
    private config;
    private installedSkills;
    private searchCache;
    private updateCheckTimer;
    private mockRegistry;
    constructor(config?: Partial<RegistryConfig>);
    private initializeMockRegistry;
    /**
     * Search for skills
     */
    search(query: string, options?: {
        category?: SkillCategory;
        verified?: boolean;
        limit?: number;
        offset?: number;
    }): Promise<SkillSearchResult[]>;
    /**
     * Get skill details
     */
    getSkillDetails(name: string): Promise<SkillSearchResult | null>;
    /**
     * Get skill versions
     */
    getVersions(name: string): Promise<SkillVersion[]>;
    /**
     * Get featured/popular skills
     */
    getFeatured(): Promise<SkillSearchResult[]>;
    /**
     * Get skills by category
     */
    getByCategory(category: SkillCategory): Promise<SkillSearchResult[]>;
    /**
     * Install a skill
     */
    install(name: string, version?: string): Promise<InstalledSkill>;
    /**
     * Uninstall a skill
     */
    uninstall(name: string): Promise<boolean>;
    /**
     * Update a skill
     */
    update(name: string, version?: string): Promise<InstalledSkill | null>;
    /**
     * Update all skills
     */
    updateAll(): Promise<InstalledSkill[]>;
    /**
     * Get installed skills
     */
    getInstalled(): InstalledSkill[];
    /**
     * Get installed skill by name
     */
    getInstalledSkill(name: string): InstalledSkill | undefined;
    /**
     * Check if skill is installed
     */
    isInstalled(name: string): boolean;
    /**
     * Enable a skill
     */
    enable(name: string): boolean;
    /**
     * Disable a skill
     */
    disable(name: string): boolean;
    /**
     * Get enabled skills
     */
    getEnabled(): InstalledSkill[];
    /**
     * Configure a skill
     */
    configure(name: string, config: Record<string, unknown>): boolean;
    /**
     * Check for updates
     */
    checkForUpdates(): Promise<Array<{
        name: string;
        current: string;
        latest: string;
    }>>;
    /**
     * Start auto-update checking
     */
    startAutoUpdateCheck(): void;
    /**
     * Stop auto-update checking
     */
    stopAutoUpdateCheck(): void;
    /**
     * Get configuration
     */
    getConfig(): RegistryConfig;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<RegistryConfig>): void;
    /**
     * Clear search cache
     */
    clearCache(): void;
    /**
     * Get statistics
     */
    getStats(): {
        installedCount: number;
        enabledCount: number;
        cacheEntries: number;
        isAutoUpdating: boolean;
    };
    /**
     * Shutdown
     */
    shutdown(): void;
}
export declare function getSkillsRegistry(config?: Partial<RegistryConfig>): SkillsRegistry;
export declare function resetSkillsRegistry(): void;
