import type { Backend } from '../../agent-adapter/types.js'; export interface ProfileEntry { model: string; backend?: Backend; /** Gateway route mode — a logical name resolved by gateway.yaml (e.g. "plan", "api", "anthropic"). * Used for ALL backends to build the gateway URL `/m//`; gateway.yaml owns the * upstream URL + keys for each mode. (For claude the endpoint is "anthropic"; for pi it is the * `provider` below.) */ mode?: string; /** Opaque provider identity used by rate-limit isolation. For backend='pi' it also selects the * PI request protocol and gateway endpoint; PI profiles must declare it explicitly. */ provider?: string; extraEnv?: Record; extraOption?: Record; /** DR-0012: opt into TUI-mode Claude (interactive tmux + jsonl tail). Default 'print' for backward * compatibility. Only meaningful when backend='claude'. Other backends ignore the field. */ claudeBackend?: 'print' | 'tui'; /** Optional thinking level. Backend-native value set, validated against the entry's effective * backend: claude → `--effort` (low/medium/high/xhigh/max), pi → `--thinking` * (off/minimal/low/medium/high/xhigh). Fallback entries do not inherit it. */ thinking?: string; fallback?: ProfileEntry[]; } export interface ProfilesFile { defaultProfile: string; profiles: Record; } export interface ResolvedProfile extends ProfileEntry { name: string; } export interface ResolvedProfileConfig { name: string; model: string; backend: Backend; mode: string | null; /** Opaque rate-limit provider identity; for PI it is also the required request protocol. */ provider: string | null; extraEnv: Record; extraOption: Record; /** DR-0012: resolved claude adapter mode. 'print' (default, uses -p + stream-json) or 'tui' * (interactive Claude under tmux + jsonl tail). Ignored for non-claude backends. */ claudeBackend: 'print' | 'tui'; /** Thinking level (backend-native value). null → nothing is passed to the CLI. */ thinking: string | null; fallback: Array<{ model: string; backend: Backend; mode: string | null; provider: string | null; extraEnv: Record; extraOption: Record; claudeBackend: 'print' | 'tui'; thinking: string | null; }>; } declare function loadProfilesFile(): ProfilesFile; /** * Pure resolver: maps a ProfileEntry's claudeBackend field to one of the two valid modes. * Defaults to 'print' for any non-'tui' value (including missing field). Used at adapter dispatch * time so unknown/legacy values silently fall back to the safe 'print' path. */ export declare function resolveClaudeBackend(p: { claudeBackend?: unknown; }): 'print' | 'tui'; declare function validateProfilesFile(data: unknown): void; declare function listProfiles(): ResolvedProfile[]; declare function getDefaultProfileName(): string; declare function getProfile(name: string | null): ResolvedProfile | null; declare function resolveProfile(name?: string | null): ResolvedProfile; declare function getProfileModel(name?: string | null): string; declare function resolveProfileConfig(name?: string | null): ResolvedProfileConfig; export { loadProfilesFile, listProfiles, getDefaultProfileName, getProfile, resolveProfile, getProfileModel, resolveProfileConfig, validateProfilesFile, };