/** * Configuration engine for CLEO V2. * * Resolution priority: CLI flags > Environment vars > Project config > Global config > Defaults * * @epic T4454 * @task T4458 * @task T067 */ import type { CleoConfig, ResolvedValue } from '@cleocode/contracts'; /** * Load and merge configuration from all sources. * Priority: defaults < global config < project config < environment vars * * @deprecated Use `resolveCleoConfig` from `@cleocode/core/config/registry` instead. * The new resolver is driven by the ConfigManifest contract (T9876) and is the * SSoT for cascade resolution. Tracked for rewire under T9879. */ export declare function loadConfig(cwd?: string): Promise; /** * Get a single config value with source tracking. * Returns the value and which source it came from. * * @deprecated Use `getConfigValue` from `@cleocode/core/config/registry` instead. * The registry helper resolves over the ConfigManifest cascade (T9876). The * ResolvedValue source-tracking shape is being reconsidered under T9879 — * callers that need provenance should follow that thread. */ export declare function getConfigValue(path: string, cwd?: string): Promise>; /** * Get a raw config value from the project config file only (no cascade). * Returns undefined if the key is not found. * Used by the engine layer for simple key lookups without source tracking. * * @deprecated Use `getConfigValue` from `@cleocode/core/config/registry` with * `scope: 'project'` instead. Tracked for rewire under T9879. * @task T4789 */ export declare function getRawConfigValue(key: string, cwd?: string): Promise; /** * Get the full raw project config (no cascade). * Returns null if no config file exists. * * @deprecated Use `resolveCleoConfig` from `@cleocode/core/config/registry` * with `scope: 'project'` instead. Returns `{}` for missing files rather * than `null`. Tracked for rewire under T9879. * @task T4789 */ export declare function getRawConfig(cwd?: string): Promise | null>; /** * Parse a string value into its appropriate JS type. * Handles booleans, null, integers, floats, and JSON. * @task T4789 */ export declare function parseConfigValue(value: unknown): unknown; /** * Set a config value in the project or global config file (dot-notation supported). * Creates intermediate objects as needed. Parses string values into * appropriate types (boolean, number, null, JSON). * @task T4789 * @task T4795 */ export declare function setConfigValue(key: string, value: unknown, cwd?: string, opts?: { global?: boolean; }): Promise<{ key: string; value: unknown; scope: 'project' | 'global'; }>; /** Valid preset names. */ export type StrictnessPreset = 'strict' | 'standard' | 'minimal'; /** A preset definition: the config keys it sets and a human description. */ export interface PresetDefinition { /** Short summary of what this preset enforces. */ description: string; /** Flat dot-notation key/value pairs applied to project config. */ values: Record; } /** * All three strictness presets. * * strict — block on missing AC, require sessions, enforce lifecycle pipeline * standard — warn on missing AC, optional sessions, advisory pipeline * minimal — no AC checking, no session requirement, lifecycle off */ export declare const STRICTNESS_PRESETS: Record; /** Result of applying a preset. */ export interface ApplyPresetResult { preset: StrictnessPreset; description: string; applied: Record; scope: 'project' | 'global'; } /** * Apply a strictness preset to the project (or global) config. * Merges preset values over existing config — keys not covered by the preset * are preserved unchanged. * Idempotent: applying the same preset twice yields the same config. * * @task T067 */ export declare function applyStrictnessPreset(preset: StrictnessPreset, cwd?: string, opts?: { global?: boolean; }): Promise; /** * List all available presets with their descriptions and values. * Used by the CLI help output. * * @task T067 */ export declare function listStrictnessPresets(): Array<{ name: StrictnessPreset; description: string; values: Record; }>; //# sourceMappingURL=config.d.ts.map