/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */ /** * Plugins domain state, tracks all plugins through their lifecycle, * configuration, and health status. */ /** States for the plugin lifecycle machine. */ export type PluginLifecycleState = 'discovered' | 'loading' | 'loaded' | 'active' | 'degraded' | 'error' | 'unloading' | 'disabled'; /** Runtime record for a single plugin. */ export interface RuntimePlugin { /** Plugin name (filesystem identifier). */ name: string; /** Plugin display name. */ displayName: string; /** Plugin version string. */ version: string; /** Plugin description. */ description: string; /** Optional author. */ author?: string | undefined; /** Current lifecycle state. */ status: PluginLifecycleState; /** Whether the plugin is enabled in persistent config. */ enabled: boolean; /** Whether the plugin is currently active and providing tools/hooks. */ active: boolean; /** Number of tools contributed by this plugin. */ toolCount: number; /** Error message if status === 'error' | 'degraded'. */ error?: string | undefined; /** Epoch ms when the plugin was last loaded. */ loadedAt?: number | undefined; /** Epoch ms when the plugin encountered its last error. */ errorAt?: number | undefined; /** Plugin-specific configuration record. */ config: Record; /** Number of hook invocations this session. */ hookInvocations: number; } /** * PluginDomainState, all plugin lifecycle state. */ export interface PluginDomainState { /** Monotonic revision counter; increments on every mutation. */ revision: number; /** Timestamp of last mutation (Date.now()). */ lastUpdatedAt: number; /** Subsystem that triggered the last mutation. */ source: string; /** All plugins keyed by plugin name. */ plugins: Map; /** Names of currently active plugins. */ activePluginNames: string[]; /** Names of plugins that encountered errors. */ erroredPluginNames: string[]; /** Total number of plugins discovered. */ totalDiscovered: number; /** Total number of plugins currently active. */ totalActive: number; /** Total tools contributed by all active plugins. */ totalToolsContributed: number; /** Whether the initial plugin load has completed. */ initialLoadComplete: boolean; /** Whether a reload is in progress. */ reloadInProgress: boolean; } /** * Returns the default initial state for the plugins domain. */ export declare function createInitialPluginsState(): PluginDomainState; //# sourceMappingURL=plugins.d.ts.map