/**
 * Config resolution chain.
 *
 * Two-phase design:
 * - Phase 1: resolveLocalConfig() -- env + YAML only, returns database URL,
 *   instance ID, server port (needed before DB is available)
 * - Phase 2: resolveFullConfig() -- merges defaults -> DB -> YAML -> env,
 *   validates with appConfigSchema, returns typed AppConfig
 *
 * Precedence: env var > local YAML > shared DB > defaults
 */
import type { AppConfig, SharedConfig } from './types.js';
/**
 * Phase 1 result: minimal config resolved from local sources only.
 */
export interface LocalPhaseResult {
    /** The raw local config (from YAML + env overlay) */
    local: Record<string, unknown>;
    /** Resolved database URL */
    databaseUrl: string;
    /** Resolved instance ID */
    instanceId: string;
    /** Resolved server port */
    port: number;
    /** Resolved instance mode */
    mode: 'platform' | 'hybrid' | 'independent';
}
/**
 * Phase 1: Resolve local-only config.
 * Loads YAML, applies env overrides for local fields.
 * Returns database URL and instance ID (needed before DB init).
 */
export declare function resolveLocalConfig(configPath?: string): Promise<LocalPhaseResult>;
/**
 * Phase 2: Resolve full config by merging all 4 layers.
 * Precedence: env var > local YAML > shared DB > defaults.
 *
 * @param localConfig - Raw local config object (from Phase 1 or YAML parse)
 * @param dbConfig - Shared config from DB (null if no DB config exists)
 * @param env - Environment variables (defaults to process.env)
 */
export declare function resolveFullConfig(localConfig: Record<string, unknown>, dbConfig: SharedConfig | null, env?: NodeJS.ProcessEnv): AppConfig;
/**
 * Get default values for shared config fields.
 */
export declare function getDefaults(): Partial<SharedConfig>;
//# sourceMappingURL=resolver.d.ts.map