import type { StorageSelection } from "./provider.js"; export declare const STORAGE_ENV = "ATOMIC_STORAGE"; export declare const SESSIONS_STORAGE_ENV = "ATOMIC_SESSIONS_STORAGE"; export declare const WORKFLOWS_JOURNAL_ENV = "ATOMIC_WORKFLOWS_JOURNAL"; export declare const WORKFLOW_JOURNAL_PATH_ENV = "ATOMIC_WORKFLOW_JOURNAL_PATH"; export type StorageDomain = "sessions" | "journal"; export type StorageFlag = "--storage" | "--storage-file"; export interface StorageFlagArgument { readonly flag: StorageFlag; readonly value: string; } /** A storage selection chosen by the launching process rather than by settings. */ export interface ProcessStorageChoice { readonly selection: StorageSelection; readonly source: "cli" | "env"; readonly field: string; } /** * Record this process's `--storage` or `--storage-file` selection, or clear it with `undefined`. * A relative `--storage-file` path resolves against `cwd`. */ export declare function setCliStorageSelection(argument: StorageFlagArgument | undefined, cwd?: string): void; /** Check every set storage variable, whether or not any selection uses it. */ export declare function validateProcessStorage(agentDir: string): void; /** * The process-level storage selection for one domain: `--storage`/`--storage-file`, then the domain * variable or its legacy path variable, then `ATOMIC_STORAGE`. `undefined` leaves the choice to settings. * Every set storage variable is validated, whichever one applies. */ export declare function selectProcessStorage(domain: StorageDomain, agentDir: string, cwd?: string): ProcessStorageChoice | undefined; /** Whether the launching process selected this domain's storage, without validating the selection. */ export declare function hasProcessStorageSelection(domain: StorageDomain): boolean; /** * The shared `storage` selection this process was launched with, as the `ATOMIC_STORAGE` value a child process it * spawns should receive: `--storage`/`--storage-file`, then `ATOMIC_STORAGE`. `undefined` leaves the choice to * settings. Validated when it was recorded or when this process started, not again here. */ export declare function processSharedStorageSelection(): string | undefined; //# sourceMappingURL=process-selection.d.ts.map