import type { SpawnAgentInput } from "../types.js"; import type { DriverContext, SpawnCommand, SupportedPlatform } from "./types.js"; /** * Probe whether a binary resolves on PATH. Uses `command -v` (POSIX) or * `where` (Windows). Wrapped in try/catch because both exit non-zero on miss. */ export declare function defaultHasBinary(name: string): boolean; /** Default driver context uses real PATH probing + env var resolution. */ export declare function defaultDriverContext(platform?: SupportedPlatform): DriverContext; /** Result shape returned to the caller (src/tools/spawn.ts). */ export interface SpawnDispatchResult { ok: boolean; driverName: string; platform: string; /** On dry-run, the literal command that WOULD have launched. */ dryRunCommand?: { exec: string; args: string[]; }; /** On failure, a user-actionable error message. */ error?: string; } /** * Build-only path — used by tests to assert on the command object without * actually spawning. Throws if no driver can handle the current platform. * * v2.6.1: the `token` parameter from v2.1 Phase 4j has been removed. The * spawned terminal's SessionStart hook now resolves identity from the * per-instance file vault. Callers that previously passed undefined should * drop the slot; the legacy 2nd-positional `token` slot is gone (was a * silent-no-op for callers that always passed undefined post-v2.6.1). */ export declare function buildSpawnCommand(input: SpawnAgentInput, _legacyTokenSlot?: undefined, ctx?: DriverContext, platformTag?: SupportedPlatform | NodeJS.Platform, briefFilePath?: string): SpawnCommand; /** * Full spawn path: build the command, honor RELAY_SPAWN_DRY_RUN, else * child_process.spawn(detached, stdio ignored, unref). * * v2.6.1: the `token` parameter is now a legacy positional placeholder * (`undefined`-only). Identity flows through the file vault, not env. */ export declare function spawnAgent(input: SpawnAgentInput, _legacyTokenSlot?: undefined, ctx?: DriverContext, platformTag?: SupportedPlatform | NodeJS.Platform, briefFilePath?: string): SpawnDispatchResult; //# sourceMappingURL=dispatcher.d.ts.map