/** * Which coding platforms `monomind init` writes by default (#420): the ones * installed on this machine, found by their CLI on PATH or their user config * directory under $HOME. Read-only — no process is spawned, nothing is * written. Claude Code is the fallback when nothing is found. * * @module @monomind/cli/init/detect-platforms */ import type { PlatformId } from '../platform-adapters/types.js'; import type { InitOptions } from './types.js'; /** The platforms plain `init` can target, in the order it lists them. */ export declare const INIT_PLATFORMS: readonly ['claude', 'antigravity', 'opencode', 'kimi', 'codex']; export type InitPlatform = (typeof INIT_PLATFORMS)[number]; export declare const INIT_PLATFORM_LABELS: Record; export interface DetectOptions { /** PATH to search (default: process.env.PATH). */ pathEnv?: string; /** Home directory (default: os.homedir()). */ homeDir?: string; /** Environment for the config-dir variables (default: process.env). */ env?: Readonly>; /** Windows executable extensions are tried when this is 'win32'. */ platform?: NodeJS.Platform; } export interface DetectedPlatform { id: InitPlatform; /** What found it, e.g. `claude on PATH` or `~/.codex`. */ via: string[]; } /** Installed init platforms, in INIT_PLATFORMS order. */ export declare function detectInstalledPlatforms(opts?: DetectOptions): DetectedPlatform[]; /** `detected` plus the project's own platforms, in INIT_PLATFORMS order. */ export declare function withProjectPlatforms(detected: DetectedPlatform[], inProject: readonly InitPlatform[]): DetectedPlatform[]; /** How `init` arrived at its platform list, for the summary line. */ export interface PlatformChoice { source: 'detected' | 'fallback' | 'explicit'; platforms: PlatformId[]; detected: DetectedPlatform[]; /** `--skip-claude`: leave Claude Code out of the "Not written" hint (#525). */ skipClaude?: boolean; } /** The default selection: what is installed, else Claude Code alone. */ export declare function chooseDefaultPlatforms(detected: DetectedPlatform[]): PlatformChoice; /** * The platforms an existing project already has on disk, judged by the files * `init` writes for each one. A plain `init` (no platform flags) adds these * to the detected ones, so `init --force` refreshes every platform a project * has, installed here or not. */ export declare function platformsInProject(targetDir: string): InitPlatform[]; /** The one-line summaries init prints about its platform choice. */ export declare function describePlatformChoice(choice: PlatformChoice): string[]; /** * Point `options` at `platforms`: the adapter selection plus the legacy * component switches the writers read. Without Claude Code, the Claude-only * components are turned off. */ export declare function applyPlatformSelection(options: InitOptions, platforms: readonly PlatformId[]): void; //# sourceMappingURL=detect-platforms.d.ts.map