/**
 * SettingsResolver — single read-side entry point. Implements the
 * precedence chain:
 *
 *   bootstrap     → env > default        (env-only; no store layer)
 *   workspace-*   → store > default      (env is NOT consulted at resolve time)
 *   user-*        → handled by auth.db readers (not this module)
 *
 * Env values for workspace-* keys are read ONCE by the first-run importer
 * and mirrored into the store on cold boot; after that, the store is
 * canonical. This avoids the "env shadows store" confusion that the UI
 * banner used to apologise for — if a user updates ANTHROPIC_API_KEY in
 * Railway after the importer has run, the change is silently ignored
 * until they update via the UI or CLI.
 *
 * Studiograph is single-workspace-per-process: the deployment IS the
 * workspace, so there is no separate "instance" tier and no scope
 * cascade. The old `'store-workspace'` and `'store-instance'` source
 * values collapse to a single `'store'`.
 */
import type { SecretStore } from './SecretStore.js';
import type { SettingsStore } from './SettingsStore.js';
export type ResolutionSource = 'env' | 'store' | 'default' | 'unset';
export interface ResolvedValue<T = unknown> {
    value: T | undefined;
    source: ResolutionSource;
    /** Set when source === 'env' — which alias actually matched. */
    envAlias?: string;
}
/**
 * Reserved for forward compatibility. There is no scope cascade in v1 —
 * the process IS the workspace — but the type stays around to keep call
 * sites diff-free in case a future feature introduces sub-tenant scoping
 * inside a single workspace.
 */
export interface ResolverContext {
}
export interface ResolverDeps {
    secrets: SecretStore;
    settings: SettingsStore;
}
export declare class SettingsResolver {
    private readonly deps;
    constructor(deps: ResolverDeps);
    /**
     * Resolve a key by canonical name. Returns the parsed value plus the
     * source that won. Caller is responsible for handling `undefined` —
     * the resolver does not throw on missing values.
     */
    resolveWithSource<T = unknown>(name: string, ctx?: ResolverContext): ResolvedValue<T>;
    resolve<T = unknown>(name: string, ctx?: ResolverContext): T | undefined;
    private resolveDef;
    private readFromStore;
}
