/** * HarnessAdapter registry: enumeration and id-based lookup over a fixed set * of adapter descriptors. Separate from SessionManager's adapter map * (Partial>) which carries the actual * spawn/resume/doctor implementations — this registry is the source of truth * for what harnesses exist, their mode (embedded vs external), and their * per-harness metadata (installMcpPrompt, detectInstalled). * * Adding an external harness = one descriptor file + one HARNESS_ADAPTER_INFOS * line. An embedded harness that can be spawned as a session additionally * requires a runtime adapter and an entry in SPAWNABLE_HARNESS_KINDS * (shared/types.ts) — see adapter.ts for the full checklist. */ import { HarnessError } from "../errors.js"; import type { HarnessAdapterInfo } from "./adapter.js"; /** Every built-in adapter descriptor, in presentation order. */ export declare const HARNESS_ADAPTER_INFOS: readonly HarnessAdapterInfo[]; /** Thrown by registry lookups when no adapter has the requested id. */ export declare class UnknownHarnessAdapterError extends HarnessError { constructor(id: string, knownIds: readonly string[]); } /** Read-only view over the adapter registry. */ export interface HarnessAdapterRegistry { /** All adapters, in registration order. The array is frozen. */ list(): readonly HarnessAdapterInfo[]; /** * The adapter with the given id. Accepts any string (ids often come from * config files or HTTP bodies) and throws {@link UnknownHarnessAdapterError} * when nothing matches. */ get(id: string): HarnessAdapterInfo; } /** * Build a registry from an adapter list. Duplicate ids are a programming * error and throw at construction time rather than at lookup time. */ export declare function createHarnessAdapterRegistry(adapters: readonly HarnessAdapterInfo[]): HarnessAdapterRegistry; /** All registered adapter descriptors, in registration order. */ export declare function listHarnessAdapters(): readonly HarnessAdapterInfo[]; /** Resolve an adapter descriptor by id. Throws {@link UnknownHarnessAdapterError}. */ export declare function getHarnessAdapter(id: string): HarnessAdapterInfo; //# sourceMappingURL=registry.d.ts.map