export type GoCommandLock = { readonly device: number; readonly generation: string; readonly inode: number; readonly owner: GoLockOwner; readonly path: string; }; export type GoLockOwner = { readonly pid: number; readonly token: string; }; export type GoLockRecord = { readonly generation: string; readonly owner: GoLockOwner; readonly schemaVersion: "ph-go-lock.2"; }; export type GoLegacyLockRecord = { readonly legacy: true; readonly owner: GoLockOwner; }; export type GoParsedLockRecord = GoLegacyLockRecord | GoLockRecord; export type GoLockSnapshot = { readonly kind: "missing"; } | { readonly device: number; readonly generation: string; readonly inode: number; readonly kind: "regular"; readonly raw: string; readonly record: GoParsedLockRecord | undefined; } | { readonly kind: "unsafe"; }; export type GoLockPublishOptions = { readonly onBeforePublish?: () => void; }; export declare class GoCommandLockLostError extends Error { constructor(); } export declare function isGoLockOwner(value: unknown): value is GoLockOwner; export declare function lockPath(projectDir: string): string; export declare function recoveryClaimPath(projectDir: string, generation: string, owner?: GoLockOwner): string; export declare function readGoLockSnapshot(path: string): GoLockSnapshot; export declare function snapshotMatches(left: Extract, right: GoLockSnapshot): boolean; export declare function processIsRunning(pid: number): boolean; export declare function writeLockRecord(path: string, record: GoLockRecord, options?: GoLockPublishOptions): GoCommandLock;