import { type Config } from './config.js'; export type ValueSource = 'cli' | 'env' | 'config.yaml' | 'default'; export interface RuntimeConfig { cfg: Config; port: number; dataDir: string; configDir: string; /** Where each resolved value came from — surfaced by `reinstall` so users * can see WHY the daemon is using a given directory/port. */ sources: { port: ValueSource; dataDir: ValueSource; }; /** True when ASTRA_MEMORY_ISOLATED=1 gated this resolution. Surfaced so * callers (serve.ts) can enforce a second, independent sync-disable guard * on top of cfg.sync.enabled. */ isolated: boolean; } export interface RuntimeOverrides { port?: number; dataDir?: string; } /** * ASTRA_MEMORY_ISOLATED=1 — testing/eval isolation switch (see * scripts/eval/longmemeval/README.md's "Isolation" section for the hazard * this closes: a daemon spawned with only ASTRA_MEMORY_DATADIR overridden * still inherited the real %APPDATA%\Astramem config dir, including a * `sync.json` paired to a live production tenant, and would have * sync-shipped synthetic data there). * * When set, resolution below never reads the real OS config dir at all — no * config.yaml merge, no sync.json pairing merge — and sync is forced off * regardless of any value either of those files would otherwise have * carried. This is a SECOND, independent guard alongside the existing * technique of redirecting APPDATA/HOME/XDG_*_HOME to a sandbox * (tests/smoke/helpers/daemon.ts, scripts/eval/longmemeval/lib/spawn-daemon.ts) * — it protects a caller that sets only ASTRA_MEMORY_DATADIR and forgets (or * cannot, e.g. a shared box) to also redirect the OS dirs. */ export declare function resolveRuntimeConfig(overrides?: RuntimeOverrides): RuntimeConfig;