import type { WorkspaceMutationSnapshot } from './cli-add-types.js'; import type { WorkspaceProject } from '../workspace/workspace-project.js'; /** * Resolve the primary PHP bootstrap file for an official workspace. * * @param workspace Workspace metadata that provides `packageName` and `projectDir`. * @returns Absolute path to `.php` in the workspace root. */ export declare function getWorkspaceBootstrapPath(workspace: WorkspaceProject): string; /** * Apply a text transform to an existing file only when the contents change. */ export declare function patchFile(filePath: string, transform: (source: string) => string): Promise; /** * Read a file when it exists and otherwise return `null`. */ export declare function readOptionalFile(filePath: string): Promise; /** * Restore a file to its captured source, deleting it when the snapshot was `null`. */ export declare function restoreOptionalFile(filePath: string, source: string | null): Promise; /** * Capture the current contents of a set of workspace files for rollback. */ export declare function snapshotWorkspaceFiles(filePaths: string[]): Promise; /** * Undo a partially applied workspace mutation from a captured snapshot. */ export declare function rollbackWorkspaceMutation(snapshot: WorkspaceMutationSnapshot): Promise;