import { type NativeAtomicWriteOptions } from './native-atomic-file.js'; import { type NativePortableHistoryEntry, type NativePortableState, type NativePortableWorkspace } from './native-portable-types.js'; export declare class NativePortableStateVersionConflictError extends Error { readonly expectedStateVersion: number; readonly actualStateVersion: number; readonly code = "native-state-version-conflict"; constructor(expectedStateVersion: number, actualStateVersion: number); } export declare function parseNativePortableState(value: unknown): NativePortableState; export declare function createNativePortableState(options: { name: string; language: 'en' | 'zh-CN'; workspace?: NativePortableWorkspace; createdAt?: string | Date; nextAction?: string | null; }): NativePortableState; export declare function appendNativePortableHistory(state: NativePortableState, entry: NativePortableHistoryEntry): NativePortableState; export declare function readNativePortableState(file: string): Promise; export declare function writeNativePortableState(file: string, state: NativePortableState, options?: NativeAtomicWriteOptions): Promise; /** * Compare and atomically replace a portable state document. Integration callers * still hold Native's project mutation lock so the same guarantee spans processes. */ export declare function compareAndSwapNativePortableState(options: { file: string; expectedStateVersion: number; next: NativePortableState; containedRoot?: string; }): Promise; //# sourceMappingURL=native-portable-state.d.ts.map