import { type ResolveConfigPathsOptions } from "./paths.js"; import { type PolypotConfig, type PolypotConfigInput } from "./schema.js"; import { type PolypotSecrets } from "./secrets.js"; interface ConfigStatus { readonly config: PolypotConfig; readonly exists: boolean; } interface ConfigInputStatus { readonly config: PolypotConfigInput; readonly exists: boolean; readonly filePath: string; readonly rootDir: string; } /** * Read config input from an explicit path without applying defaults. * * @param configPath Config file path. * @returns Parsed config input from the file. */ export declare function readPolypotConfigFileInput(configPath: string): Promise; /** * Read global config and report whether the file exists. * * @param options Options for the operation. * @returns Global config and existence state. */ export declare function readGlobalConfigStatus(options: ResolveConfigPathsOptions): Promise; /** * Read global config, using defaults when it is missing. * * @param options Options for the operation. * @returns Global config with defaults applied. */ export declare function readGlobalConfig(options: ResolveConfigPathsOptions): Promise; /** * Read global config input without applying defaults. * * @param options Options for the operation. * @returns Global config input and existence state. */ export declare function readGlobalConfigInputStatus(options: ResolveConfigPathsOptions): Promise; /** * Read project config and report whether the file exists. * * @param options Options for the operation. * @returns Project config and existence state. */ export declare function readProjectConfigStatus(options: ResolveConfigPathsOptions): Promise; /** * Read project config, using defaults when it is missing. * * @param options Options for the operation. * @returns Project config with defaults applied. */ export declare function readProjectConfig(options: ResolveConfigPathsOptions): Promise; /** * Read project config input without applying defaults. * * @param options Options for the operation. * @returns Project config input and existence state. */ export declare function readProjectConfigInputStatus(options: ResolveConfigPathsOptions): Promise; /** * Check whether any global config files exist. * * @param options Options for the operation. * @returns True when a global config or env file exists. */ export declare function hasGlobalStoreFiles(options: ResolveConfigPathsOptions): Promise; /** * Check whether any project config files exist. * * @param options Options for the operation. * @returns True when a project config or env file exists. */ export declare function hasProjectStoreFiles(options: ResolveConfigPathsOptions): Promise; /** * Write validated global config to YAML. * * @param options Options for the operation. */ export declare function writeGlobalConfig(options: ResolveConfigPathsOptions & { readonly config: PolypotConfigInput; }): Promise; /** * Write validated project config to YAML. * * @param options Options for the operation. */ export declare function writeProjectConfig(options: ResolveConfigPathsOptions & { readonly config: PolypotConfigInput; }): Promise; /** * Read secrets from the global env file. * * @param options Options for the operation. * @returns Secrets loaded from the global env file. */ export declare function readGlobalSecrets(options: ResolveConfigPathsOptions): Promise; /** * Read secrets from the project env file. * * @param options Options for the operation. * @returns Secrets loaded from the project env file. */ export declare function readProjectSecrets(options: ResolveConfigPathsOptions): Promise; /** * Write the OpenAI API key to the global env file. * * @param options Options for the operation. */ export declare function writeGlobalSecrets(options: ResolveConfigPathsOptions & { readonly secrets: Pick; }): Promise; /** * Write the OpenAI API key to the project env file. * * @param options Options for the operation. */ export declare function writeProjectSecrets(options: ResolveConfigPathsOptions & { readonly secrets: Pick; }): Promise; export {};