import type { VendorAdapter } from '../runtime/vendor-adapter.js'; /** Serializable adapter record (the on-disk shape). */ export interface AdapterRecord { readonly id: string; readonly displayName: string; /** Binary name or absolute path to invoke for compact. */ readonly binary: string; /** Extra args appended after the compact verb. */ readonly args?: string[]; } export interface PersistedAdapterRegistry { readonly version: 1; readonly adapters: AdapterRecord[]; } export interface RegisterOptions { /** Overwrite an existing record with the same id. Defaults to false * to prevent silent overwrites of user customizations. */ readonly force?: boolean; } /** In-memory + on-disk adapter registry. The registry holds USER * adapters (those registered via `peaks adapter register`); built-in * adapters live in RuntimeService and are NOT registered here. */ export declare class AdapterRegistry { private readonly records; /** Register a new adapter. When an adapter with the same id already * exists, returns the existing record unless `force: true`. */ register(record: AdapterRecord, opts?: RegisterOptions): { record: AdapterRecord; created: boolean; }; /** Resolve a registered adapter by id, materializing it as a * runnable VendorAdapter. Returns undefined when not registered. */ resolve(id: string): VendorAdapter | undefined; /** List registered adapter records (serializable form). */ list(): AdapterRecord[]; /** Remove a registered adapter. Returns true if it existed. */ unregister(id: string): boolean; /** Persist the current registry to disk as JSON. Writes atomically * (write to `.tmp` then rename) so a crash mid-write does * not corrupt the registry file. */ persist(file: string): void; /** Load a registry from disk. Missing file = empty registry. * Corrupt file = throw (caller decides whether to bail or * fall back to empty). */ load(file: string): void; /** Default location for the on-disk registry file. */ static defaultFile(projectRoot: string): string; }