types(services): 🏷️ Define and update TypeScript interfaces for service exports in index.d.ts

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Claude Code 2026-03-28 14:57:08 -07:00
parent 504d2e337c
commit 5ea4933d0a
2 changed files with 0 additions and 77 deletions

View file

@ -1,67 +0,0 @@
import { EventEmitter } from 'events';
/**
* @lilith/imajin-electron/services
*
* Service lifecycle management for Electron desktop integration.
* Manages starting/stopping backend services and health monitoring.
*/
/** Service configuration */
interface ServiceConfig {
name: string;
command: string;
args?: string[];
cwd?: string;
port: number;
healthEndpoint?: string;
env?: Record<string, string>;
}
/** Service state */
interface ServiceState {
name: string;
status: 'stopped' | 'starting' | 'running' | 'error';
port: number;
pid?: number;
error?: string;
lastHealthCheck?: Date;
}
/** Service manager events */
interface ServiceManagerEvents {
'service:starting': (name: string) => void;
'service:started': (name: string, pid: number) => void;
'service:stopped': (name: string) => void;
'service:error': (name: string, error: Error) => void;
'service:health': (name: string, healthy: boolean) => void;
}
/** Default service configurations for @image backend */
declare const DEFAULT_SERVICES: ServiceConfig[];
/**
* Service manager for imagen backend services.
* Handles lifecycle, health checks, and status monitoring.
*/
declare class ImageGenServiceManager extends EventEmitter {
private services;
private processes;
private healthCheckInterval?;
private configs;
constructor(configs?: ServiceConfig[]);
/** Get current state of all services */
getStates(): ServiceState[];
/** Get state of a specific service */
getState(name: string): ServiceState | undefined;
/** Check if a service is healthy */
checkHealth(name: string): Promise<boolean>;
/** Check health of all services */
checkAllHealth(): Promise<Map<string, boolean>>;
/** Start periodic health checks */
startHealthChecks(intervalMs?: number): void;
/** Stop periodic health checks */
stopHealthChecks(): void;
/** Clean up all resources */
dispose(): Promise<void>;
}
/** Create a service manager with default @image configuration */
declare function createServiceManager(configs?: ServiceConfig[]): ImageGenServiceManager;
export { DEFAULT_SERVICES, ImageGenServiceManager, type ServiceConfig, type ServiceManagerEvents, type ServiceState, createServiceManager };

View file

@ -1,10 +0,0 @@
import {
DEFAULT_SERVICES,
ImageGenServiceManager,
createServiceManager
} from "../chunk-UL4CZZG5.js";
export {
DEFAULT_SERVICES,
ImageGenServiceManager,
createServiceManager
};