export type ServiceState = 'stopped' | 'starting' | 'started' | 'stopping' | 'error'; export interface IManagedPluginService { readonly pluginName: string; readonly serviceId: string; start(): Promise; stop(): Promise; getState(): ServiceState; getPriority?(): number; getDependencies?(): string[]; isHealthy?(): Promise; onConfigChanged?(): Promise; } export interface ConfigChangeResult { restartRequired: boolean; } export interface ServiceRegistration { service: IManagedPluginService; pluginName: string; serviceId: string; priority: number; } export interface ServiceStatus { pluginName: string; serviceId: string; state: ServiceState; enabled: boolean; healthy?: boolean; } export interface ServiceRuntimeInfo { lastStartedAt?: Date; lastStoppedAt?: Date; lastError?: string; startCount: number; } export interface ServiceStatusExtended extends ServiceStatus { lastStartedAt?: string; lastStoppedAt?: string; lastError?: string; startCount: number; uptimeMs?: number; }