export type OpenCodeHostGeneration = "v1" | "v2"; export type OpenCodeHostRuntime = "bun" | "node"; export interface OpenCodeHostEvidence { generation: OpenCodeHostGeneration; executable: string; version: string | null; runtime: OpenCodeHostRuntime; modernV1: boolean; } export interface OpenCodeHostDetection { status: OpenCodeHostGeneration | "ambiguous" | "unknown"; generations: OpenCodeHostGeneration[]; evidence: OpenCodeHostEvidence[]; } export interface HostGenerationDependencies { path?: string; platform?: NodeJS.Platform; findExecutable?: (name: "opencode" | "opencode2") => string | null; probeV1Version?: (executable: string) => string | null; } interface SpawnResult { status: number | null; stdout?: string | Buffer | null; error?: Error; } export interface V1VersionProbeOptions { env?: NodeJS.ProcessEnv; operatorHome?: string; tempParent?: string; spawn?: (executable: string, args: string[], options: { cwd: string; encoding: "utf8"; env: NodeJS.ProcessEnv; stdio: ["ignore", "pipe", "pipe"]; timeout: number; }) => SpawnResult; } export declare function findExecutableOnPath(name: "opencode" | "opencode2", pathValue?: string, platform?: NodeJS.Platform): string | null; /** * Run the V1 version probe in disposable host roots. CI can enable the strict * operator canary used by the load matrix, while production tolerates writes * from an OpenCode process that is already using the live operator store. */ export declare function probeOpenCodeV1Version(executable: string, options?: V1VersionProbeOptions): string | null; export declare function detectOpenCodeHostGeneration(dependencies?: HostGenerationDependencies): OpenCodeHostDetection; export declare function formatHostGenerations(detection: OpenCodeHostDetection): string; export {}; //# sourceMappingURL=host-generation.d.ts.map