/** * HarnessRegistry — central registry for CodingHarness implementations. * * The registry is populated at extension startup and queried at spawn * time to resolve which harness to use for a given agent role. * * Usage: * const registry = new HarnessRegistry(); * registry.register("pi", new PiHarness()); * const harness = registry.get("cmd"); // throws if not found * const harness = registry.getOrUndefined("unknown"); // returns undefined * const names = registry.getAllNames(); // ["pi", "cmd"] */ import type { CodingHarness } from "#src/harness/interface"; export declare class HarnessRegistry { /** Internal map of harness name → harness instance. */ private harnesses; /** * Register a harness implementation under the given name. * * The name should match the `id` property of the harness and the * value used in tmux-pilot.config.yaml's `harness` field. * * @param name - The harness name (e.g. "pi", "cmd") * @param harness - The harness implementation instance * @throws If a harness with the same name is already registered */ register(name: string, harness: CodingHarness): void; /** * Retrieve a harness by name. * * @param name - The harness name to look up * @returns The registered CodingHarness instance * @throws If no harness is registered under the given name */ get(name: string): CodingHarness; /** * Retrieve a harness by name, returning undefined instead of throwing. * * @param name - The harness name to look up * @returns The CodingHarness instance, or undefined if not found */ getOrUndefined(name: string): CodingHarness | undefined; /** * Check if a harness is registered under the given name. */ has(name: string): boolean; /** * Get the names of all registered harnesses. */ getAllNames(): string[]; /** * Get all registered harness instances. */ getAll(): CodingHarness[]; /** * Get the number of registered harnesses. */ get size(): number; /** * Remove a harness from the registry. * * @param name - The harness name to unregister * @returns true if the harness was found and removed, false otherwise */ unregister(name: string): boolean; /** * Remove all harnesses from the registry. */ clear(): void; } //# sourceMappingURL=registry.d.ts.map