import type { ProfileManifest } from '../../types.js'; export declare const ROOT_PROFILE_ID = "root-00000000"; export declare function profilesRoot(): string; export declare function profileRoot(profileId: string): string; export declare function profileManifestPath(profileId: string): string; export declare function profileMemoryDir(profileId: string): string; export interface ProfileEntry { profileId: string; manifest: ProfileManifest; } /** Every profile with a readable manifest, in directory-listing order. * Enumerates ONLY immediate children of `profilesRoot()` — never recurses, * never trusts a caller-supplied id. A dir whose name doesn't match the * generated id shape, or whose `profile.json` is missing/corrupt, is skipped * rather than crashing the whole listing. */ export declare function listProfiles(): ProfileEntry[]; /** Resolve a CLI operand to its profile — exact id first (checked against the * actually-enumerated dirs, never a blind join), then a unique manifest * `name` match. Ambiguous names fail listing every matching id; no match * fails naming `profile list`/`profile new` as recovery. This is the ONLY * function every command leaf and future runtime consumer (Phase 5/6) should * call to turn a `` operand or `CRTR_PROFILE_ID` into a concrete, * safe profile id. */ export declare function loadProfileManifest(profileIdOrName: string): ProfileEntry; /** Hold the per-profile manifest lock for the duration of `fn`. ALL manifest * mutations (create/rename/add-project/remove-project/delete/last-used) * below run inside this. */ export declare function withProfileManifestLock(profileId: string, fn: () => T): T; export declare function ensureRootProfile(): ProfileEntry; export declare function createProfile(name: string, projects?: string[]): ProfileEntry; export declare function updateProfileLastUsed(profileId: string): ProfileEntry; export declare function renameProfile(profileId: string, name: string): ProfileEntry; export declare function addProfileProject(profileId: string, dir: string): ProfileEntry; export declare function removeProfileProject(profileId: string, dir: string): ProfileEntry; export declare function deleteProfile(profileId: string): void;