import { E as MeshServiceType } from './types-C9VYURdP.js'; type MeshStreamKind = 'log' | 'event' | 'lifecycle' | 'metric'; type MeshLogStreamName = 'stdout' | 'stderr' | 'system'; interface MeshStreamEnvelope { readonly id: string; readonly app: string; readonly kind: MeshStreamKind; readonly type: string; readonly payload: TPayload; readonly emittedAt: string; readonly source?: string; readonly instanceId?: string; readonly service?: string; } interface MeshLogStreamPayload { readonly stream: MeshLogStreamName; readonly chunk: string; readonly sequence: number; readonly truncated: boolean; readonly serviceType?: MeshServiceType; } interface MeshLifecycleStreamPayload { readonly status: string; readonly message?: string; readonly metadata?: Record; } type MeshStreamHandler = (event: MeshStreamEnvelope) => void | Promise; interface MeshStreamPublisher { publish(event: Omit, 'id' | 'emittedAt' | 'app'> & { readonly app?: string; }): Promise>; publishLog(input: MeshLogPublishInput): Promise | null>; } interface MeshStreamSubscriber { subscribe(types: readonly string[], handler: MeshStreamHandler): Promise<() => Promise | void>; } interface MeshLogPublishInput { readonly instanceId: string; readonly service: string; readonly serviceType?: MeshServiceType; readonly stream: MeshLogStreamName; readonly chunk: Buffer | string; readonly source?: string; } interface MeshStreamSubscribeOptions { readonly kinds?: readonly MeshStreamKind[]; readonly types?: readonly string[]; readonly services?: readonly string[]; readonly instances?: readonly string[]; } export type { MeshLifecycleStreamPayload as M, MeshLogPublishInput as a, MeshLogStreamName as b, MeshLogStreamPayload as c, MeshStreamEnvelope as d, MeshStreamHandler as e, MeshStreamKind as f, MeshStreamPublisher as g, MeshStreamSubscribeOptions as h, MeshStreamSubscriber as i };