/** * Runner registry — static metadata for every AgentRunner runtime id * (runner-specs.ts merged with runner-features.ts). Shared by `agent exec` * (error taxonomy: no-runner vs missing-binary, §3.4) and `agent scan` * (installed detection + version probe, §6) of doc/agent-exec-protocol.md. * * Binary names and env overrides MUST mirror the `_CLI_BIN` lookups in * each orgrt/*-runner.ts — a mismatch here means scan reports a runner as * installed when its runner would spawn a different binary (or vice versa). */ import type { AgentRunner } from './agent-runner.js'; import { type ClaudeCodeInfo } from './claude-sdk.js'; import { type RunnerFeatures } from './runner-features.js'; import { type Approvals, type NativeSandbox, type SandboxMode, type SandboxReport } from './runner-sandbox.js'; import { type RunnerSpec } from './runner-specs.js'; import { type VersionSource } from './version-probe.js'; export type { RunnerSpec }; export declare const RUNNER_SPECS: RunnerSpec[]; export declare function runnerSpec(id: string): RunnerSpec | undefined; /** * A runtime id for a name a user types: the id itself, else the one runtime * whose CLI binary has that name (`agy` → antigravity). Ambiguous binaries * (`qwen`, `pi`) keep their own id, so they never reach the lookup. */ export declare function resolveRuntimeAlias(name: string): string; export declare function isKnownRuntime(id: string): boolean; /** * Resolve a runner for `agent exec --runtime `. * * Distinct from daemon.ts's resolveRunner: unknown ids are a protocol * `no-runner` error (the id has no implementation), while 'claude' — for * which resolveRunner returns undefined as the implicit default path — * resolves to the shared defaultClaudeRunner. Dynamic import keeps the * Claude Agent SDK out of this module's static graph (scan must stay light). */ export declare function resolveExecRunner(id: string): Promise; export interface ScanEntry { claude_code?: ClaudeCodeInfo; id: string; installed: boolean; /** Presence is independent from availability of a supported execution transport. */ execution_supported: boolean; execution_unsupported_reason: string | null; binary: string | null; version: string | null; /** Where `version` came from; null when not installed (rev 11, #337). */ version_source: VersionSource | null; install_hint: string; /** `install_hint` in a shape a caller can execute safely (rev 9). */ install: InstallRecipe; /** The runtime's own sign-in command, when it has one (rev 9). */ login_hint: string | null; /** Mirrors `RunnerSpec.streamsIncrementally` — see its doc comment. */ streams_incrementally: boolean; /** #355. Mirrors `RunnerSpec.supportsFullAccess` — see its doc comment. */ full_access: boolean; /** #388 (rev 21): the `--access` values this runtime accepts. */ access_modes: Array<'scoped' | 'read' | 'full'>; /** #389 (rev 22): `--tools stdio` caller tools work on this runtime. */ caller_tools: boolean; /** #389 (rev 22): caller tools also work together with `--access full`. */ caller_tools_with_full_access: boolean; /** #396 (rev 23): the native sandbox / approvals of a default (scoped, no * `--sandbox`, no org git level) turn, and the `--sandbox` values accepted. */ native_sandbox: NativeSandbox; approvals: Approvals; sandbox_modes: SandboxMode[]; /** #482 (rev 26): what each accepted `--sandbox` mode reports on a * scoped turn — the start event's native_sandbox/approvals for it. */ sandbox_mode_reports: Partial>; /** Mirrors `RunnerSpec.toolActivityFidelity` (#357) — see its doc comment. */ tool_activity_fidelity: 'full' | 'start-only' | 'none'; /** Rev 13 service flags — mirror `RunnerFeatures` (runner-features.ts). */ resume: boolean; effort: boolean; max_turns: boolean; reports_cost: boolean; init_target: RunnerFeatures['initTarget']; } import { type InstallRecipe, installRecipe } from './runner-install-recipe.js'; export { type InstallRecipe, installRecipe }; /** Resolve a binary honoring the runner's `_CLI_BIN` override. */ export declare function resolveBinary(spec: RunnerSpec, env: NodeJS.ProcessEnv): string | null; /** Absolute binary path if findable on PATH (or the override if it exists). */ export declare function locateBinary(bin: string, env: NodeJS.ProcessEnv): string | null; export interface ScanOptions { /** Env used for PATH + `_CLI_BIN` overrides (default process.env). */ env?: NodeJS.ProcessEnv; /** Per-binary `--version` probe timeout (default 5s). */ versionTimeoutMs?: number; /** Skip version detection (binary-presence scan only). */ skipVersionProbe?: boolean; /** * Run `--version` (in a scratch HOME) for every installed runtime whose * install metadata has no version, not only the side-effect-free ones. */ probe?: boolean; } /** * Detect every known runtime, in parallel. Exit-0-always by contract — * detection, not a test. Auth is deliberately NOT probed (§6): logins are * too heterogeneous; auth failures surface at exec time. Read-only unless * `probe` is set: see version-probe.ts for when a binary is run (#337). */ export declare function scanInstalled(opts?: ScanOptions): Promise<{ v: number; agents: ScanEntry[]; }>; //# sourceMappingURL=runner-registry.d.ts.map