/** * Project Profile Management for Babysitter SDK * * Provides functions to read, write, merge, and render project profiles. * Project profiles are stored at `{projectRoot}/.a5c/project-profile.json` * with a companion human-readable markdown file alongside. * * All file operations are synchronous for CJS compatibility. * Writes use an atomic temp-file-then-rename strategy to prevent corruption. */ import { ProjectProfile } from "./types"; export { mergeProjectProfile } from "./projectProfileMerge"; export { renderProjectProfileMarkdown } from "./projectProfileRender"; /** * Returns the directory for storing the project profile. * * Defaults to `{cwd}/.a5c/` if no project root is specified. * * @param projectRoot - Absolute path to the project root. Defaults to `process.cwd()`. * @returns Absolute path to the project profile directory */ export declare function getProjectProfileDir(projectRoot?: string): string; /** * Reads the project profile from disk. * * Returns `null` if the profile file does not exist or contains * malformed JSON. Does not throw on missing or corrupt files. * * @param projectRoot - Absolute path to the project root. Defaults to `process.cwd()`. * @returns The parsed project profile, or `null` if unavailable */ export declare function readProjectProfile(projectRoot?: string): ProjectProfile | null; /** * Writes a project profile to disk atomically. * * Creates the profile directory recursively if it does not exist. * Uses a temporary file with rename to prevent partial writes. * Also writes a companion markdown summary file for human readability. * * @param profile - The complete project profile to persist * @param projectRoot - Absolute path to the project root. Defaults to `process.cwd()`. */ export declare function writeProjectProfile(profile: ProjectProfile, projectRoot?: string): void; /** * Deep-merges partial updates into an existing project profile. * * Merge strategy: * - **Scalars** (strings, numbers, booleans): overwritten by the update value * - **Objects**: spread-merged (shallow merge per nested object) * - **Arrays with identifiable items** (having `id`, `name`, or similar fields): * deduplicated by that key, with update items taking precedence * - **Arrays of primitives**: deduplicated by value * - `updatedAt` is set to the current ISO timestamp * - `version` is incremented by 1 * * @param existing - The current project profile * @param updates - Partial profile fields to merge in * @returns A new merged project profile (does not mutate inputs) */ /** * Creates a new project profile with sensible defaults. * * @param projectName - Name of the project * @returns A complete project profile with default values */ export declare function createDefaultProjectProfile(projectName: string): ProjectProfile; //# sourceMappingURL=projectProfile.d.ts.map