import type { SKYKOIConfig } from "./types.js"; type WarnState = { warned: boolean; }; export type SessionDefaultsOptions = { warn?: (message: string) => void; warnState?: WarnState; }; export declare function applyMessageDefaults(cfg: SKYKOIConfig): SKYKOIConfig; export declare function applySessionDefaults(cfg: SKYKOIConfig, options?: SessionDefaultsOptions): SKYKOIConfig; export declare function applyTalkApiKey(config: SKYKOIConfig): SKYKOIConfig; export declare function applyModelDefaults(cfg: SKYKOIConfig): SKYKOIConfig; export declare function applyKoiDefaults(cfg: SKYKOIConfig): SKYKOIConfig; export declare function applyLoggingDefaults(cfg: SKYKOIConfig): SKYKOIConfig; export declare function applyContextPruningDefaults(cfg: SKYKOIConfig): SKYKOIConfig; export declare function applyCompactionDefaults(cfg: SKYKOIConfig): SKYKOIConfig; /** * Strip the retired xAI Grok fallback that earlier versions seeded into every * claimed config (a keyless `xai` provider plus a `xai/grok-4.5` smart-lane * fallback, keyed at call time from an org-vended xai key). That direct-to-xAI * escape hatch is retired: models are cloud-vended through the SkyKoi API, and * for anyone without a resolvable key the seed only made every koi context * creation log that it was being omitted from models.json. * * Runs on every load so the whole fleet heals on update with no re-login; the * config file itself heals on its next write. Deliberately narrow — only the * population the seeder itself targeted is touched: * - Devices whose primary is not `skykoi/*` are out of scope entirely (the * seeder was gated the same way; BYOK setups keep primary `xai/grok-4`). * - A provider with a config key, a non-seed baseUrl, or a model set other * than exactly [grok-4.5] is intent, not seed — kept, with its fallbacks. * - XAI_API_KEY in the environment (incl. ~/.skykoi/.env, loaded at boot) * made the seeded fallback genuinely work — that is intent too; kept. * Known sliver: a key that lives ONLY in the auth-profile store behind an * untouched seed shape is invisible here (reading the store on every config * load is not acceptable); such a user re-enables xai by keying the provider * in config or re-running the provider auth flow. * * Everything here keys off POSITIVE identification of the seed. An earlier * version inferred the opposite — "no `providers.xai` block, so any `xai/*` * ref must be junk" — and stripped every such ref with none of the guards * above (the env-key check sat inside the seed test, so an absent provider * skipped it entirely). That deleted refs the seeder never wrote: a config * with no provider block is exactly what `skykoi models fallbacks add * xai/grok-4` produces, so the documented command reported success and then * lost the value on the next load. Absence is not evidence — if we cannot * point at our own seed, we touch nothing. */ export declare function stripSeededXaiFallback(cfg: SKYKOIConfig): SKYKOIConfig; /** * Apply the full defaults pipeline in canonical order. * Use this everywhere instead of manually chaining individual apply* functions * to prevent pipeline drift between code paths (loadConfig, tryRestoreConfigFromBackup, * readConfigFileSnapshot, validateConfigObject). */ export declare function applyAllDefaults(cfg: SKYKOIConfig): SKYKOIConfig; export declare function resetSessionDefaultsWarningForTests(): void; export {};