export declare const HERDR_DEFAULT_TIMEOUT_MS = 5000; export interface HerdrWireRequest { id: string; method: string; params: Record; } export interface HerdrSocketIdentity { device: string; inode: string; ctimeNs: string; ownerUid?: number; } export interface HerdrRequestOptions { expectedSocketIdentity?: HerdrSocketIdentity; } export type HerdrRequestFunction = (socketPath: string, request: HerdrWireRequest, options?: HerdrRequestOptions) => Promise; /** A structured Herdr API rejection received after a complete request. */ export declare class HerdrApiError extends Error { readonly code: string; readonly requestId: string; constructor(code: string, message: string, requestId: string); } /** * Raw socket failure with an explicit dispatch boundary. * * `definitelyNotSent` is true only when the Unix socket never connected or * the request was rejected locally before any socket write was attempted. */ export declare class HerdrTransportError extends Error { readonly definitelyNotSent: boolean; constructor(message: string, definitelyNotSent: boolean, options?: { cause?: unknown; }); } /** Send one newline-delimited JSON request over a Herdr Unix-domain socket. */ export declare function requestHerdrUnixSocket(socketPath: string, request: HerdrWireRequest, options?: { timeoutMs?: number; maxResponseBytes?: number; expectedSocketIdentity?: HerdrSocketIdentity; }): Promise; /** Resolve immutable filesystem identity for one owner-local Herdr socket. */ export declare function readHerdrSocketIdentity(socketPath: string): HerdrSocketIdentity; export declare function sameHerdrSocketIdentity(left: HerdrSocketIdentity, right: HerdrSocketIdentity): boolean;