//#region src/domain/types.d.ts /** * Core type definitions */ type ToolId = "claude" | "codex" | "gemini" | "xling"; type Scope = "user" | "project" | "local" | "system"; type SettingAction = "list" | "edit" | "switch-profile" | "inspect"; type OutputFormat = "json" | "table"; type ConfigValue = string | number | boolean | null | Date | ConfigValue[] | ConfigObject; interface ConfigObject { [key: string]: ConfigValue; } interface CodexProviderInput { id: string; name: string; base_url: string; experimental_bearer_token: string; } interface EditOptions { name?: string; ide?: string; provider?: CodexProviderInput; } interface SwitchOptions { preview?: boolean; backup?: boolean; } interface SettingsFileEntry { filename: string; variant: string; path: string; scope: Scope; active: boolean; exists: boolean; size?: number; lastModified?: Date; } type SettingsListData = { type: "entries"; entries: ConfigObject; filePath: string; } | { type: "files"; files: SettingsFileEntry[]; }; /** * Input payload for settings operations */ interface SettingsPayload { tool: ToolId; scope: Scope; action: SettingAction; profile?: string; name?: string; ide?: string; provider?: CodexProviderInput; format?: OutputFormat; switchOptions?: SwitchOptions; } /** * Result returned by settings operations */ interface SettingsResult { success: boolean; data?: TData; message?: string; filePath?: string; diff?: string; preview?: boolean; } /** * Inspect command result */ interface InspectResult { path: string; exists: boolean; content?: string; size?: number; lastModified?: Date; } /** * Launch-related types */ /** * Launch payload */ interface LaunchPayload { tool: ToolId; yolo?: boolean; args?: string[]; cwd?: string; resume?: boolean; continue?: boolean; settings?: string; } /** * Launch result */ interface LaunchResult { success: boolean; pid?: number; command?: string; message?: string; data?: TData; } /** * Launch command specification */ interface LaunchCommandSpec { executable: string; baseArgs: string[]; yoloArgs?: string[]; envVars?: Record; } //#endregion export { ToolId as _, InspectResult as a, LaunchResult as c, SettingAction as d, SettingsFileEntry as f, SwitchOptions as g, SettingsResult as h, EditOptions as i, OutputFormat as l, SettingsPayload as m, ConfigObject as n, LaunchCommandSpec as o, SettingsListData as p, ConfigValue as r, LaunchPayload as s, CodexProviderInput as t, Scope as u };