export const CONFIG_DIR_NAME = '.dimcode'
export const APP_DIR_NAME = 'dimcode'
export const STATE_DIR_NAME = 'state'

export type McpServerSettings
  = | McpHttpSettings
    | McpSseSettings
    | McpStdioSettings

export type McpHttpSettings = Readonly<{
  id: string
  name: string
  transport: 'http'
  url: string
  auth?: {
    type: 'bearer'
    token: string
  }
  headers?: Record<string, string>
  requestTimeoutMs?: number
  enabled?: boolean
}>

export type McpSseSettings = Readonly<{
  id: string
  name: string
  transport: 'sse'
  url: string
  auth?: {
    type: 'bearer'
    token: string
  }
  headers?: Record<string, string>
  requestTimeoutMs?: number
  enabled?: boolean
}>

export type McpStdioSettings = Readonly<{
  id: string
  name: string
  transport: 'stdio'
  command: string
  args: readonly string[]
  env?: Record<string, string>
  cwd?: string
  autoRestart?: boolean
  requestTimeoutMs?: number
  restartDelayMs?: number
  maxRestarts?: number
  restartWindowMs?: number
  enabled?: boolean
}>
