/** * Gateway Plugin Loader * * Discovers and loads gateway plugins from ~/.mama/plugins/ * Each plugin is a directory with: * - plugin.json (manifest) * - index.ts or index.js (entry point) */ import type { PluginManifest, LoadedPlugin, Gateway, AgentLoopInterface, MessageSource } from './types.js'; /** * Plugin loader configuration */ export interface PluginLoaderConfig { /** Plugin directory (default: ~/.mama/plugins) */ pluginsDir?: string; /** Gateway configurations from main config */ gatewayConfigs?: Record; /** Agent loop instance */ agentLoop?: AgentLoopInterface; } /** * Plugin Loader class */ export declare class PluginLoader { private readonly pluginsDir; private readonly gatewayConfigs; private readonly agentLoop?; private readonly plugins; private readonly messageHandlers; constructor(config?: PluginLoaderConfig); /** * Discover all plugins in the plugins directory */ discover(): Promise; /** * Check if a plugin is enabled in config */ private isPluginEnabled; /** * Load and register a plugin */ loadPlugin(pluginId: string): Promise; /** * Load all discovered plugins */ loadAll(): Promise; /** * Create the API object for a plugin */ private createPluginApi; /** * Create a logger for a plugin */ private createLogger; /** * Get all loaded gateways */ getGateways(): Gateway[]; /** * Get a specific gateway by source ID */ getGateway(source: MessageSource): Gateway | undefined; /** * Get all discovered plugins */ getPlugins(): LoadedPlugin[]; /** * Stop all gateways */ stopAll(): Promise; } /** * Create a plugin loader instance */ export declare function createPluginLoader(config?: PluginLoaderConfig): PluginLoader; //# sourceMappingURL=plugin-loader.d.ts.map