/** * manager-key-source.ts, "where did this value actually come from". * * Split out of manager.ts (line cap) and worth its own file anyway: the whole * daemon-owned-config change exists because nobody could see which store a * setting resolved from, so the tier report is not an incidental debug helper. * * Resolution order, lowest to highest: default < global surface < project * surface < shared tier < daemon tier. */ import type { ConfigKey } from './schema.js'; import type { DaemonOwnedConfigPath } from './config-ownership.js'; /** The tier a resolved config value came from. */ export type ConfigKeyTier = 'daemon' | 'shared' | 'project' | 'global' | 'default'; /** Where a config key's live value resolves from, and which tiers can hold it. */ export interface ConfigKeySource { readonly key: ConfigKey; readonly value: unknown; readonly tier: ConfigKeyTier; /** True when this key resolves from/writes to the surface-root-independent shared tier. */ readonly shareable: boolean; /** The shared-tier settings file path, or null when no shared tier is configured. */ readonly sharedTierPath: string | null; /** True when the daemon owns this key and writes land in the daemon store. */ readonly daemonOwned: boolean; /** The daemon store path, or null when no daemon tier is configured. */ readonly daemonTierPath: string | null; } export interface ConfigKeySourceInput { readonly key: ConfigKey; readonly value: unknown; readonly shareable: boolean; readonly daemonOwned: boolean; readonly sharedTierPath: string | null; readonly daemonTierPath: string | null; readonly projectConfigPath: string | null; readonly configPath: string; /** Keys the last load sourced from the shared tier. */ readonly sharedKeysPresent: ReadonlySet; /** Keys the last load sourced from the daemon store. */ readonly daemonKeysPresent: ReadonlySet; } /** True when the JSON settings file at `path` carries an explicit value for `key`. */ export declare function settingsFileHasKey(path: string, key: ConfigKey): boolean; /** Report which tier a key's live value resolves from. */ export declare function describeKeySource(input: ConfigKeySourceInput): ConfigKeySource; //# sourceMappingURL=manager-key-source.d.ts.map