/** * Thin reader for .cleo/project-info.json. * * The file is written by scaffold.ts (ensureProjectInfo). This module * provides a typed read interface for consumers that need the project-local * identity fields without importing the full scaffold machinery. * * @task T5333 * @task T11008 — resolveProjectByCwd and resolveCanonicalCleoDir added to @cleocode/paths */ /** Fields consumed by logging, audit, and correlation subsystems. */ export interface ProjectInfo { /** 12-char SHA-256 hex of the normalized project path (per-install identity). */ projectHash: string; /** Portable project-local UUID stored with `.cleo/project-info.json`. */ projectId: string; /** Absolute path to the project root directory. */ projectRoot: string; /** Human-readable project name (last segment of projectRoot). */ projectName: string; } /** * Read project-info.json and return a typed ProjectInfo. * * Falls back gracefully when the project-local `projectId` is missing * (pre-T5333 installs) by returning an empty string, allowing callers to * detect and handle the legacy shape. * * @throws {Error} If .cleo/project-info.json does not exist or is invalid JSON. */ export declare function getProjectInfo(cwd?: string): Promise; /** * Synchronous variant for use in hot paths where async is not feasible. * Returns null if the file is missing or unparseable. */ export declare function getProjectInfoSync(cwd?: string): ProjectInfo | null; /** * Update the project name in project-info.json. * Used by `cleo upgrade --name` and programmatic consumers. */ export declare function updateProjectName(cwd: string, name: string): void; //# sourceMappingURL=project-info.d.ts.map