import { type ProductProfile } from "./profile.js"; import type { CodexHookConfig } from "./codex-hook-state.js"; export declare function realCodexHome(): string; /** 通常のCodex CLI。CODEX_BIN、~/.local/bin/codex、PATHの順に探す。 */ export declare function resolveCodexExecutable(): string | null; /** * Codexを起こす時の環境。npm版のCodexは、nodeで動く起動役(1行目が`#!/usr/bin/env node`)で、起こす側のPATHにnodeの場所が * 無いと起きない(exit 127。素のsshの環境、製品の常駐process、アプリ配下のprocessはPATHが細い事がある)。 * このprocessを動かしているnodeの場所を、PATHに無い時だけ頭へ足した写しを返す。既にあれば、並びも中身も変えない。 */ export declare function codexSpawnEnv(env?: NodeJS.ProcessEnv, node?: string, platform?: NodeJS.Platform): NodeJS.ProcessEnv; /** * Desktopが同梱するCodex CLI。2026-09のChatGPT.appは`Contents/Resources/codex`から * `Contents/Resources/codex-cli/CodexCLI.app/Contents/MacOS/codex`へ移した(macbook実測)。 */ export declare function desktopBundledCodex(app: string): string | null; /** macOSの公式Codex Desktopが同梱するCLI。署名と版を確かめる。 */ export declare function findDesktopBinary(): string; export declare function findWindowsCodexCache(resources: string, cache: string): string; /** Windowsの公式Codex Desktop(MSIX)が展開したCLI。 */ export declare function findWindowsCodexBinary(): string; /** Linuxの公式Codex Desktop(deb・rpm)が同梱するCLI。 */ export declare function findLinuxDesktopBinary(candidates?: string[]): string; /** Desktopの無い端末で使う、通常のCodex CLI。 */ export declare function findCliBinary(resolve?: () => string | null): string; export type DesktopBinaryFinder = () => string; export declare function platformDesktopFinder(platform?: NodeJS.Platform): DesktopBinaryFinder; /** * Steerのhookが公式キューを操作するのに使うCodex。公式Desktopの同梱CLIを先に探し、Desktopが無ければ * 通常のCodex CLIを使う(どちらも同じ公式キューとhookを持つ)。 */ export declare function findSteerBinary(desktop?: DesktopBinaryFinder, cli?: () => string): string; export declare function currentCodexDesktopBinary(profile: ProductProfile, config: CodexHookConfig, options?: { directory?: string; find?: DesktopBinaryFinder; exists?: (file: string) => boolean; }): Promise;