import { U as UserError } from './errors-BcVE1wZB.js'; import { D as Diagnostic } from './dto-CIYO4YQw.js'; export { D as DirectoryProjectMutationConflictError, a as DirectoryProjectSnapshot, b as DirectoryProjectVersion, c as DirectoryProjectVersionAdapter, d as DirectoryProjectVersionPreview, e as DirectoryProjectVersionService, f as DirectoryProjectVersionStatus, g as DirectorySnapshotFile, h as DirectoryVersionFileChange, P as PreparedDirectoryProjectVersion, i as createDirectoryProjectVersionService } from './directory-BVXQZ3jU.js'; import 'zod'; type ProjectVersionErrorCode = "store_missing" | "store_blocked" | "stale_snapshot" | "invalid_version" | "invalid_source" | "storage_failed"; declare class ProjectVersionError extends UserError { readonly code: ProjectVersionErrorCode; constructor(message: string, code?: ProjectVersionErrorCode); } type ProjectSourceStatus = "clean" | "modified" | "unversioned"; interface ProjectVersionStatus { initialized: boolean; enabled: boolean; store_root: string; config_path: string; head_version: string | null; source_status: ProjectSourceStatus; source_versioned: boolean; write_blockers: string[]; restore_blockers: string[]; } interface ProjectVersion { version_id: string; short_version: string; parent_version: string | null; source_hash: string; message: string; created_by: string; created_at: string; } interface ProjectVersionsPage { versions: ProjectVersion[]; next_cursor: string | null; } interface ProjectVersionPreview { version_id: string; base_head_version: string; base_source_revision: string; before_yaml: string; after_yaml: string; diagnostics: Diagnostic[]; can_restore: boolean; blockers: string[]; } interface PreparedProjectVersion { configPath: string; storeRoot: string; baseHeadVersion: string; source: string; sourceRevision: string; needsVersion: boolean; leaseToken: string; } declare function readProjectVersionSource(configFile: string): Promise<{ configPath: string; source: string; }>; declare function getProjectVersionStatus(configFile: string): Promise; declare function enableProjectVersioning(configFile: string, message?: string): Promise<{ version: ProjectVersion | null; versioning: ProjectVersionStatus; }>; declare function disableProjectVersioning(configFile: string): Promise; declare function listProjectVersions(configFile: string, input?: { cursor?: string; limit?: number; }): Promise; declare function previewProjectVersion(configFile: string, versionId: string): Promise; declare function restoreProjectVersion(configFile: string, versionId: string, base: { headVersion: string; sourceRevision: string; }): Promise; declare function prepareProjectVersion(configFile: string, expectedSource: string): Promise; declare function commitPreparedProjectVersion(prepared: PreparedProjectVersion, message?: string): Promise; declare function releasePreparedProjectVersion(prepared: PreparedProjectVersion | null): Promise; interface ProjectVersionService { readSource(): Promise<{ configPath: string; source: string; }>; status(): Promise; enable(message?: string): Promise<{ version: ProjectVersion | null; versioning: ProjectVersionStatus; }>; disable(): Promise; listVersions(input?: { cursor?: string; limit?: number; }): Promise; previewVersion(versionId: string): Promise; restoreVersion(versionId: string, base: { headVersion: string; sourceRevision: string; }): Promise; prepareVersion(expectedSource: string): Promise; commitPrepared(prepared: PreparedProjectVersion, message?: string): Promise; releasePrepared(prepared: PreparedProjectVersion | null): Promise; } declare function createProjectVersionService(input: { configPath: string; }): ProjectVersionService; export { type PreparedProjectVersion, type ProjectSourceStatus, type ProjectVersion, ProjectVersionError, type ProjectVersionErrorCode, type ProjectVersionPreview, type ProjectVersionService, type ProjectVersionStatus, type ProjectVersionsPage, commitPreparedProjectVersion, createProjectVersionService, disableProjectVersioning, enableProjectVersioning, getProjectVersionStatus, listProjectVersions, prepareProjectVersion, previewProjectVersion, readProjectVersionSource, releasePreparedProjectVersion, restoreProjectVersion };