/** * cleo-os Harness Registry. * * Layering (ADR-069 D002): the harness is the top of the Workflow layer. * Workflow MAY use Conduit (Messaging) for inter-agent DMs; Conduit MUST * NOT know about the harness (ADR-069 D002). Reverse imports from * `packages/core/src/conduit/` into `packages/cleo-os/` are forbidden. * * @see ADR-069 (CLEO Coordination Layers) * * Centralises construction and lookup of {@link HarnessAdapter} implementations * available in cleo-os. Adding a new harness means: * * 1. Implement {@link HarnessAdapter} in a subdirectory under `harnesses/`. * 2. Add an entry to {@link HARNESS_REGISTRY} below. * 3. Export the adapter class from the subdirectory's `index.ts`. * * @packageDocumentation */ import type { HarnessAdapter } from './pi-coding-agent/types.js'; /** * Metadata entry for a registered harness adapter. * * @public */ export interface HarnessRegistryEntry { /** Short stable identifier matching {@link HarnessAdapter.id}. */ id: string; /** Human-readable display name. */ name: string; /** Factory function that creates a fresh adapter instance. */ create: () => HarnessAdapter; } /** * Look up a harness adapter by ID. * * @param id - Harness adapter ID (e.g. `"pi-coding-agent"`). * @returns The registry entry, or `undefined` when not found. * * @example * ```typescript * const entry = getHarnessEntry('pi-coding-agent'); * const adapter = entry?.create(); * ``` * * @public */ export declare function getHarnessEntry(id: string): HarnessRegistryEntry | undefined; /** * Create a fresh instance of the harness adapter with the given ID. * * @param id - Harness adapter ID. * @returns A new {@link HarnessAdapter} instance, or `null` when the ID is * not registered. * * @public */ export declare function createHarness(id: string): HarnessAdapter | null; /** * Return all registered harness adapter entries. * * @returns Array of all registry entries, in insertion order. * * @public */ export declare function listHarnesses(): HarnessRegistryEntry[]; export { PiCodingAgentAdapter } from './pi-coding-agent/adapter.js'; export type { HarnessAdapter } from './pi-coding-agent/types.js'; //# sourceMappingURL=index.d.ts.map