import { EventEmitter } from 'events';
export interface ExtensionManifest {
    name: string;
    version: string;
    description: string;
    author?: string;
    type: 'channel' | 'tool' | 'provider' | 'integration';
    entryPoint: string;
    configSchema?: Record<string, {
        type: string;
        required?: boolean;
        default?: unknown;
        description?: string;
    }>;
    dependencies?: string[];
}
export interface ExtensionInstance {
    manifest: ExtensionManifest;
    path: string;
    status: 'loaded' | 'active' | 'error' | 'disabled';
    error?: string;
    loadedAt?: number;
}
export interface ExtensionLifecycle {
    onLoad?(): Promise<void>;
    onActivate?(config: Record<string, unknown>): Promise<void>;
    onDeactivate?(): Promise<void>;
    onDispose?(): Promise<void>;
}
export declare class ExtensionLoader extends EventEmitter {
    private extensions;
    private lifecycles;
    private searchPaths;
    constructor(searchPaths?: string[]);
    static parseManifest(dir: string): ExtensionManifest | null;
    discover(): ExtensionManifest[];
    load(name: string): ExtensionInstance | {
        error: string;
    };
    loadAll(): ExtensionInstance[];
    activate(name: string, config?: Record<string, unknown>): Promise<boolean>;
    deactivate(name: string): Promise<boolean>;
    get(name: string): ExtensionInstance | undefined;
    list(type?: ExtensionManifest['type']): ExtensionInstance[];
    validateConfig(name: string, config: Record<string, unknown>): {
        valid: boolean;
        errors: string[];
    };
    checkDependencies(name: string): {
        satisfied: boolean;
        missing: string[];
    };
    dispose(): Promise<void>;
}
