import { EventEmitter } from 'events';
export interface PluginManifest {
    name: string;
    version: string;
    description?: string;
    author?: string;
    entry?: string;
    tools?: PluginToolDef[];
    hooks?: Record<string, string>;
    dependencies?: string[];
    config?: PluginConfigDef[];
}
export interface PluginToolDef {
    name: string;
    description: string;
    parameters: Record<string, any>;
    handler: string;
    toolset?: string;
    emoji?: string;
    is_async?: boolean;
}
export interface PluginConfigDef {
    key: string;
    description: string;
    type?: string;
    default?: any;
    required?: boolean;
}
export interface PluginInstance {
    manifest: PluginManifest;
    dir: string;
    module: any | null;
    enabled: boolean;
    loadedAt: string | null;
    error: string | null;
    registeredTools: string[];
}
export type HookName = 'on_session_start' | 'on_session_end' | 'on_turn_start' | 'on_turn_end' | 'on_response' | 'on_tool_call' | 'on_error' | 'on_message_received' | 'on_message_sent';
export declare class PluginSystem extends EventEmitter {
    private _plugins;
    private _hooks;
    private _pluginsDir;
    constructor();
    discover(): string[];
    loadPlugin(name: string): Promise<boolean>;
    loadAll(): Promise<string[]>;
    private _registerPluginTools;
    private _registerPluginHooks;
    invokeHook(hookName: HookName, data: any): Promise<any[]>;
    getPlugin(name: string): PluginInstance | undefined;
    getAllPlugins(): PluginInstance[];
    getEnabledPlugins(): PluginInstance[];
    enablePlugin(name: string): Promise<boolean>;
    disablePlugin(name: string): boolean;
    unloadPlugin(name: string): Promise<boolean>;
    private _topologicalSort;
    shutdown(): Promise<void>;
}
export declare function getPluginSystem(): PluginSystem;
export declare function discoverPlugins(): string[];
export declare function loadPlugins(): Promise<string[]>;
export declare function getPluginContext(): PluginSystem;
export declare function invokeHook(hookName: HookName, data: any): Promise<any[]>;
//# sourceMappingURL=plugin-system.d.ts.map