import type { JinnConfig, ModelRegistry } from "./types.js"; import { type ClaudeModelDiscovery } from "./claude-models.js"; /** * Model + capability registry — the single source of truth for which engines and * models exist and what they support (effort levels, availability). * * Sources, in precedence order per engine: * 1. Dynamic discovery, refreshed at boot and on config reload into * snapshots that the (synchronous) registry reads. * 2. The optional `models:` block in config.yaml. * 3. Synthesis from `engines..model` (back-compat default). * * `available` reflects whether the engine's binary is actually installed, so the * UI can hide engines you don't have. */ /** Engines registered in this build (mirrors server.ts engine map). */ export declare const ENGINE_NAMES: readonly ["claude", "codex", "antigravity", "grok", "pi", "hermes"]; export type EngineName = (typeof ENGINE_NAMES)[number]; export declare const PTY_VIEW_ENGINE_NAMES: readonly ["claude", "codex", "antigravity", "grok", "hermes"]; export type PtyViewEngineName = (typeof PTY_VIEW_ENGINE_NAMES)[number]; export declare const CODEX_DEFAULT_MODEL = "gpt-5.5"; /** Whether an engine's binary is installed (gates UI visibility). */ export declare function engineAvailable(config: JinnConfig, name: EngineName): boolean; /** Type guard: is `name` one of the known engines? */ export declare function isKnownEngine(name: string): name is EngineName; /** Actionable error message for a session blocked by a missing engine binary. */ export declare function engineUnavailableMessage(config: JinnConfig, name: EngineName): string; /** * Discover Claude's catalog through Claude Code OAuth. This is best-effort and * read-only; it never validates a model by starting a Claude turn. */ export declare function refreshClaudeModels(config: JinnConfig): Promise; export declare function setDiscoveredClaudeModelsForTest(models: ClaudeModelDiscovery | null): void; /** Discover Codex's model catalog (`codex debug models`) and refresh the registry. */ export declare function refreshCodexModels(config: JinnConfig): Promise; /** Discover Antigravity's model catalog (`agy models`) and refresh the registry. */ export declare function refreshAntigravityModels(config: JinnConfig): Promise; /** * Discover Pi's local/custom models (`pi --list-models`) and refresh the registry. * Async — populates a snapshot the synchronous registry reads. Never throws; * degrades to the config/synthesized fallback when Pi is absent or discovery fails. */ export declare function refreshPiModels(config: JinnConfig): Promise; /** * Discover Grok's authenticated model list (`grok models`) and refresh the registry. * Never throws; until discovery succeeds the registry uses Jinn's known Grok model * catalog so the UI still shows the public Grok choices. */ export declare function refreshGrokModels(config: JinnConfig): Promise; /** * Discover Hermes's available model list and refresh the registry. * Never throws; until discovery succeeds the registry uses Jinn's known Hermes model * catalog so the UI still shows the public Hermes choices. */ export declare function refreshHermesModels(config: JinnConfig): Promise; /** Clear the cached registry. Call on config reload / PUT /api/config. */ export declare function invalidateModelRegistry(): void; /** Resolve the registry (cached). Pass the current config; cache is keyed by * invalidation, not by config identity — call invalidateModelRegistry() to refresh. */ export declare function getModelRegistry(config: JinnConfig): ModelRegistry; /** * Valid effort levels for a session's engine+model, from the registry. * Returns [] when the engine/model doesn't support effort (e.g. antigravity) or * the engine is unknown. `modelId` defaults to the engine's default model. */ export declare function effortLevelsForModel(config: JinnConfig, engine: string, modelId?: string): string[]; /** Build the registry without touching the cache (used by getModelRegistry + tests). */ export declare function buildRegistry(config: JinnConfig): ModelRegistry; /** Backward-compat: synthesize a minimal registry from engines..model. */ export declare function synthesizeFromEngineConfig(config: JinnConfig): ModelRegistry; //# sourceMappingURL=models.d.ts.map