export interface ProfileEntry { model: string; backend?: string; /** 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; /** PI `--provider` (protocol family, e.g. "anthropic", "openai-codex"). Only meaningful for * backend='pi'; defaults to "anthropic" when omitted. Decoupled from `mode`: `mode` selects the * gateway route, `provider` selects the PI request protocol + the gateway endpoint segment. */ 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'; fallback?: ProfileEntry[]; } export interface ProfilesFile { defaultProfile: string; profiles: Record; } export interface ResolvedProfile extends ProfileEntry { name: string; } export interface ResolvedProfileConfig { name: string; model: string; backend: string; mode: string | null; /** PI `--provider` (protocol). null → adapter defaults to "anthropic". Ignored for non-pi backends. */ 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'; fallback: Array<{ model: string; backend: string; mode: string | null; provider: string | null; extraEnv: Record; extraOption: Record; claudeBackend: 'print' | 'tui'; }>; } 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, };