/** * Helpers behind `gsk init-pi`. * * The server returns one bundle carrying both Pi config documents: * `{ models: <~/.pi/agent/models.json>, settings: <~/.pi/agent/settings.json>, * genspark: }`. Pi shares `models.json` with the user's own * custom providers and `settings.json` with every other setting, so we MERGE * (upsert the two Genspark providers / set the default model) instead of * overwriting — unlike `init-opencode`, whose single file is entirely ours. * Pure functions so they can be unit-tested from `dist/`. */ export interface PiConfigBundle { models?: { providers?: Record; }; settings?: Record; genspark?: Record; } /** Pi's global agent dir (`~/.pi/agent`) — where models.json/settings.json live. */ export declare function defaultPiAgentDir(): string; /** Expand a leading `~` and resolve an `-o/--out` dir; default = Pi's agent dir. */ export declare function resolvePiAgentDir(out?: string): string; /** Merge the bundle's providers into an existing models.json (upsert by name). */ export declare function mergePiModelsConfig(existing: unknown, bundle: PiConfigBundle): Record; /** Merge defaultProvider/defaultModel into an existing settings.json. */ export declare function mergePiSettingsConfig(existing: unknown, bundle: PiConfigBundle): Record; /** Parse a JSON file that may not exist; empty/missing = `{}`. Throws on bad JSON. */ export declare function readJsonIfExists(filePath: string): unknown; export declare function writeJsonFile(filePath: string, value: unknown, mode?: number): void; //# sourceMappingURL=pi-config.d.ts.map