import type { AuthStorage } from "@gajae-code/ai/core"; import { ModelRegistry } from "../../config/model-registry"; import { Settings } from "../../config/settings"; export interface SdkHostModelResolveContext { cwd?: string; } /** Registry loader owned by the SDK host, not by machine-facing adapters. */ export type SdkHostModelRegistryLoader = (context?: SdkHostModelResolveContext) => ModelRegistry | Promise; /** * Builds an offline model resolver for a single SDK host process. * * The registry is reused, but refreshed for every validation so additions and * removals made while the broker is alive are observed without network I/O. */ export declare function createSdkHostModelRegistryLoader(discoverStorage: () => Promise, modelsPath?: string, loadSettings?: (context?: SdkHostModelResolveContext) => Promise>): SdkHostModelRegistryLoader; export type SdkHostModelResolution = { ok: true; model: string | null; } | { ok: false; reason: "unknown_model"; model: string; error: string; }; export type SdkHostModelResolver = (raw: unknown, context?: SdkHostModelResolveContext) => Promise; /** Resolve the explicit model pin at the SDK host boundary. */ export declare function resolveSdkHostModel(raw: unknown, loadRegistry: SdkHostModelRegistryLoader, context?: SdkHostModelResolveContext): Promise; /** Default resolver used by the SDK broker host. */ export declare function createDefaultSdkHostModelResolver(agentDir: string): SdkHostModelResolver;