import { M as MeshRegistry } from './types-Dkbb4iqE.js'; import { E as MeshServiceType, P as NormalizedMeshConfig, q as MeshInstanceRecord } from './types-C9VYURdP.js'; import { g as MeshStreamPublisher } from './types-CijKzcAX.js'; interface MeshNodeOptions { readonly app: string; readonly service: string; readonly serviceType?: MeshServiceType; readonly nodeId?: string; readonly internalUrl?: string; readonly port?: number; readonly host?: string; readonly registry?: MeshRegistry | { type: 'file'; stateDir: string; } | { type: 'redis'; url: string; secret?: string; keyPrefix?: string; }; readonly secret?: string; readonly heartbeatIntervalMs?: number; readonly ttlMs?: number; readonly metadata?: Record; readonly stream?: MeshStreamPublisher | NormalizedMeshConfig; } interface MeshNodeSignalHandlerOptions { readonly onDrain?: () => Promise | void; readonly onStop?: () => Promise | void; readonly exit?: boolean; } declare class MeshNode { private readonly options; private readonly registry; private readonly id; private heartbeat; private readonly streamPublisher; private record; private stopping; constructor(options: MeshNodeOptions); start(): Promise; drain(): Promise; stop(): Promise; emit(type: string, payload: TPayload): Promise; log(stream: 'stdout' | 'stderr' | 'system', chunk: string | Buffer): Promise; installSignalHandlers(options?: MeshNodeSignalHandlerOptions): void; private gracefulSignalStop; private buildRecord; private resolveStream; private resolveRegistry; } declare function createMeshNode(options: MeshNodeOptions): MeshNode; export { MeshNode as M, type MeshNodeOptions as a, type MeshNodeSignalHandlerOptions as b, createMeshNode as c };