/** * Host detection — feat/codex-support Phase 1 * * `forgen install` interactive 의 prerequisite — 사용자 환경에 어떤 host (Claude/Codex) * 가 가용한지 탐지. spec §10 Phase 1 + interview R3. * * 탐지 신호 (각 host 별): * - binary 가 PATH 에 있음 (`which claude` / `which codex`) * - host 디렉토리 존재 (~/.claude/ / ~/.codex/) * - (Codex 만) `~/.codex/auth.json` 존재 (로그인 흔적) * * detect 결과는 *추론* 만. install 강제 안 함. */ import type { HostId } from './trust-layer-intent.js'; export interface HostAvailability { readonly host: HostId; /** binary 가 PATH 에 있음. */ readonly binaryFound: boolean; /** binary 절대경로 (없으면 null). */ readonly binaryPath: string | null; /** host home 디렉토리 존재 (~/.claude/ 또는 ~/.codex/). */ readonly homeExists: boolean; /** host home 절대경로. */ readonly homePath: string; /** Codex 의 경우 auth.json 존재 (로그인 흔적). Claude 는 항상 null. */ readonly authPresent: boolean | null; /** * 종합 판단 — *install 후보로 적합한가*. * - binaryFound 또는 homeExists 중 하나 이상이면 true. * - 둘 다 없으면 false (사용자가 host 를 안 쓸 가능성 높음). */ readonly available: boolean; } export interface HostDetectionResult { readonly claude: HostAvailability; readonly codex: HostAvailability; /** OpenCode (W3-3 P1) — 감지 전용. 설치는 plugin 슬림 착지 후. */ readonly opencode: HostAvailability; /** claude+codex 둘 다 사용 가능 (기존 primary-pair 계약). */ readonly bothAvailable: boolean; /** 하나도 사용 가능하지 않음 (warn). */ readonly noneAvailable: boolean; } export declare function detectAvailableHosts(): HostDetectionResult;