import { spawnSync, type ChildProcess, type SpawnOptions, type SpawnSyncOptionsWithStringEncoding, type SpawnSyncReturns } from 'child_process'; type ExistsSyncLike = (path: string) => boolean; type SpawnLike = (command: string, args: string[], options: SpawnOptions) => ChildProcess; type SpawnSyncLike = typeof spawnSync; export type SpawnErrorKind = 'missing' | 'blocked' | 'error'; export interface PlatformCommandSpec { command: string; args: string[]; resolvedPath?: string; } export interface ProbedPlatformCommand { spec: PlatformCommandSpec; result: SpawnSyncReturns; } export interface SpawnedPlatformCommand { spec: PlatformCommandSpec; child: ChildProcess; } export declare function classifySpawnError(error: NodeJS.ErrnoException | undefined | null): SpawnErrorKind | null; export declare function resolveCommandPathForPlatform(command: string, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv, existsImpl?: ExistsSyncLike): string | null; export declare function resolveTmuxBinaryForPlatform(platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv, existsImpl?: ExistsSyncLike): string | null; /** * Detects whether OMX is running under cmux, whose `tmux` binary is a shim * (`~/.cmuxterm/.../tmux` -> `cmux __tmux-compat`) that does not implement * tmux's `split-window -e KEY=VALUE` environment option. Under cmux the `-e` * flags leak into the spawned pane's shell command, so pane-spawn callers must * deliver env vars without relying on `-e`. cmux exports these socket env vars * for every session it manages, which is a stable runtime marker. */ export declare function isRunningUnderCmux(env?: NodeJS.ProcessEnv): boolean; export declare function buildPlatformCommandSpec(command: string, args: string[], platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv, existsImpl?: ExistsSyncLike): PlatformCommandSpec; export declare function spawnPlatformCommandSync(command: string, args: string[], options?: SpawnSyncOptionsWithStringEncoding, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv, existsImpl?: ExistsSyncLike, spawnImpl?: SpawnSyncLike): ProbedPlatformCommand; export declare function spawnPlatformCommand(command: string, args: string[], options?: SpawnOptions, platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv, existsImpl?: ExistsSyncLike, spawnImpl?: SpawnLike): SpawnedPlatformCommand; export {}; //# sourceMappingURL=platform-command.d.ts.map