import type { ClusterLogger } from './types.js'; /** The file, relative to the daemon state directory. */ export declare const CLUSTER_NODE_ID_FILENAME = "cluster-node-id"; /** True when `value` is a well-formed node id and nothing else. */ export declare function isValidNodeId(value: unknown): value is string; export interface ResolveNodeIdOptions { /** Daemon state directory; the id file is created inside it. */ readonly stateDirectory: string; readonly logger?: ClusterLogger | undefined; } export interface ResolvedNodeIdentity { readonly nodeId: string; readonly filePath: string; /** True when this call minted the id rather than reading an existing one. */ readonly created: boolean; /** Set when an existing file was present but unusable. */ readonly replacedReason?: string | undefined; } /** * Read the persisted node id, or mint and persist one. * * A failure to WRITE is not fatal either: the process gets a usable in-memory * id for this run and the reason is logged. Losing identity stability across a * restart degrades a tiebreak; refusing to run would take inbound messaging * down entirely, which is far worse. */ export declare function resolveNodeIdentity(options: ResolveNodeIdOptions): ResolvedNodeIdentity; //# sourceMappingURL=identity.d.ts.map