/**
 * Process Management Types
 *
 * Type definitions for process lifecycle management.
 * Used by ProcessRegistry and ProcessManager.
 */

/**
 * Process status states
 */
export type ProcessStatus = 'running' | 'stopped' | 'crashed';

/**
 * Information about a managed process
 */
export interface ProcessInfo {
  /** Unique identifier for the process */
  id: string;
  /** Operating system process ID */
  pid: number;
  /** Command that was executed */
  command: string;
  /** Arguments passed to the command */
  args: string[];
  /** When the process was started */
  startedAt: Date;
  /** Current status of the process */
  status: ProcessStatus;
}

/**
 * Options for spawning a new process
 */
export interface SpawnOptions {
  /** Unique identifier for tracking this process */
  id: string;
  /** Command to execute */
  command: string;
  /** Arguments to pass to the command */
  args?: string[];
  /** Working directory for the process */
  cwd?: string;
  /** Environment variables for the process */
  env?: Record<string, string>;
}
