export type PathKind = "config" | "data" | "state" | "cache"; export interface PathsResolverOptions { app: string; internal?: boolean; platform?: string; home?: string; env?: Record; } export declare function dataDir(options: PathsResolverOptions): string; /** Env var name for the exact-app data-dir alias that follows the wave convention. */ export declare const HASNA_LOOPS_DATA_DIR_ENV = "HASNA_LOOPS_DATA_DIR"; /** * The effective user home, mirroring the pre-existing loops resolution * (`HOME` || `os.homedir()`). Read at call time because the daemon/CLI tests * switch `$HOME` mid-process and bun's `os.homedir()` does not follow that * switch. */ export declare function effectiveHome(): string; /** * Pre-XDG default home: `~/.hasna/loops`. Resolved at call time (not module * load) so switching `$HOME` mid-process keeps working. */ export declare function legacyHomeDir(): string; /** * The @hasna/paths-resolved data home for loops (XDG / macOS home layout). * The home override mirrors the pre-existing `$HOME`-first resolution so the * resolver follows the same home the legacy path does. */ export declare function resolverHome(): string; /** * Whether the resolver (XDG) home should be adopted as the loops data home. * The resolver home is adopted only when the operator has set `HASNA_DATA_HOME` * (the data-kind override — a deliberate opt-in to the XDG layout) or the * store has already been physically migrated there (`loops.db` exists). A * machine that only redirects another kind (e.g. cache to tmpfs) must NOT have * its data home moved, and a live store at the legacy home must never become * invisible on upgrade. */ export declare function adoptResolverHome(resolved: string, env?: NodeJS.ProcessEnv): boolean; /** * The exact-app override root, when set: the shipped `LOOPS_DATA_DIR` wins; * `HASNA_LOOPS_DATA_DIR` is the wave-convention alias. */ export declare function exactLoopsDataDir(): string | undefined; /** * Effective loops data home: an exact-app override (`LOOPS_DATA_DIR`, then the * `HASNA_LOOPS_DATA_DIR` alias) wins unconditionally; otherwise the resolver * (XDG) data home once adopted; otherwise the legacy `~/.hasna/loops` default. */ export declare function getLoopsDataDir(): string;