import type { Config } from "./config-types.js"; /** * `llm-relay lanes --probe` — ask each `cli` lane's own tool what it serves. * * ⚠ The spawn boundary (amended by owner decision 2026-08-29, docs/history/quota-reprobe-design-2026-08-29.md): * the REQUEST PATH never runs a `cli` lane's command — a lane's quota is client-bound, it runs its * own tool loop, and it returns only final text, so a relay that shelled out mid-request could * never return the `tool_use` blocks an HTTP turn owes its caller. Outside the request path there * are exactly TWO spawn sites: this operator-invoked probe, and the background lane cadence * (`lane-cadence.ts`) that keeps rosters fresh and re-tests recorded quota deaths — background * metadata polling is the relay's job, exactly as the ping loop already does for HTTP. Nothing * here is reachable from `handle()`, and the request path reads only the CACHED manifest. * * Discovery is not symmetric (docs/history/lane-discovery.md): * codex — `codex debug models` returns JSON including per-model `supported_reasoning_levels`, * so both the id and the effort argument are validated with no API call spent. * agy — `agy models` returns `idlabel` and states nothing about flags, so its argument * facts can only be learned from an observed rejection. */ export interface LaneProbeResult { lane: string; ok: boolean; via: string; modelCount: number; error?: string; } /** * Quote ONE argument for the Windows shell-fallback line. `args.join(" ")` is the exact defect * the dispatch renderer's comment warns about ("a task containing a space ... broke out"), and it * bit again here on 2026-08-30: the quota probe's prompt reached codex as seven separate tokens * (`error: unexpected argument 'with' found`). The fallback is unavoidable — Node refuses to * execFile a `.cmd` shim without a shell — so every token is quoted, embedded quotes escaped. */ export declare function quoteCmdArg(arg: string): string; /** * Distinct `cli` lanes the configured ladders actually reference, mapped to the lane's OWN * binary. Recognition sees through wrapper commands (`laneOfRung`), and the value is the matched * lane binary rather than `rung.command` — probing `pwsh models` would probe the wrapper, not * the lane. `windowsHide` above is what makes the direct binary safe to spawn console-less. */ export declare function laneCommands(cfg: Config): Map; export declare function probeLanes(cfg: Config, path?: string): Promise;