/************************** * CLI App Actions * * Opening a project in the browser, Studio, or an IDE. Everything that leaves * the process, spawning commands, opening URLs, touching disk, goes through * the LauncherHost seam, so IDE detection order, the Windows/POSIX split, and * the settings-file bootstrap are all reachable from a test. * * Two adapters justify the seam: the platform host in production, a fake in * tests. **************************/ import type { ProjectInfo } from "./state.js"; export type IDE = "cursor" | "code" | "zed" | "idea" | "webstorm"; export interface ActionResult { success: boolean; message?: string; } /** Everything the launcher needs from the outside world. */ export interface LauncherHost { openUrl(url: string): Promise; /** Whether `command` is on PATH. */ commandExists(command: string): Promise; /** Run `command`; resolves to whether it succeeded. */ run(command: string, args: string[]): Promise; /** Create `path` with `contents` if it does not already exist. */ ensureFile(path: string, contents: string): Promise; homeDir(): string; } export interface Launcher { openInBrowser(project: ProjectInfo, port: number): Promise; openInStudio(project: ProjectInfo): Promise; openInIDE(project: ProjectInfo, ide?: IDE): Promise; openMCPSettings(): Promise; } export declare function createLauncher(host: LauncherHost): Launcher; /** The production host: real processes, real browser, real disk. */ export declare function createPlatformHost(): LauncherHost; //# sourceMappingURL=actions.d.ts.map