import { ServerError } from '../../utility/errors/hdbError.ts';
import type { ModelBackend } from './types.ts';
/**
 * Process-wide model backend registry.
 *
 * Stores logical-name → backend-instance mappings for embedding and
 * generative kinds. Boot wiring populates the registry via
 * `setEmbedding(...)` / `setGenerative(...)`; the `Models` facade reads it
 * via `resolveEmbedding(...)` / `resolveGenerative(...)`.
 *
 * Module-scope state is intentional — one registry per Harper process,
 * mirroring `contextStorage` at `resources/transaction.ts:6`. Translating
 * a YAML `models:` config block into registry entries (the bootstrapper
 * step) lands in Phase 2 alongside the first real backend.
 */
type ModelKind = 'embedding' | 'generative';
/** Map `logicalName` to a backend for embedding calls. Re-set replaces. */
export declare function setEmbedding(logicalName: string, backend: ModelBackend): void;
/** Map `logicalName` to a backend for generative calls. Re-set replaces. */
export declare function setGenerative(logicalName: string, backend: ModelBackend): void;
/**
 * Resolve the embedding backend mapped to `logicalName` (default: `'default'`).
 * Throws `ModelBackendNotFoundError` if no backend is mapped.
 */
export declare function resolveEmbedding(logicalName?: string): ModelBackend;
/**
 * Resolve the generative backend mapped to `logicalName` (default: `'default'`).
 * Throws `ModelBackendNotFoundError` if no backend is mapped.
 */
export declare function resolveGenerative(logicalName?: string): ModelBackend;
/** Remove all registrations. Test-only hygiene. */
export declare function clearRegistry(): void;
export declare class ModelBackendNotFoundError extends ServerError {
    constructor(kind: ModelKind, logicalName: string);
}
export {};
