import type { ChildProcess } from "node:child_process";

/**
 * Configuration for an MCP server instance
 */
export interface McpServerConfig {
  /** Unique identifier for the server */
  id: string;

  /** Human-readable name for the server */
  name: string;

  /** Description of what the server provides */
  description: string;

  /** Command to execute to start the server */
  command: string;

  /** Optional command-line arguments */
  args?: string[];

  /** Optional environment variables */
  env?: Record<string, string>;
}

/**
 * Status of an MCP server
 */
export type McpServerStatus = "starting" | "running" | "stopped" | "error";

/**
 * Runtime state of an MCP server
 */
export interface McpServer {
  /** Server configuration */
  config: McpServerConfig;

  /** Current status */
  status: McpServerStatus;

  /** Running process (if started) */
  process?: ChildProcess;

  /** Error message (if in error state) */
  error?: string;
}
