import { EventEmitter } from 'events'; import { type AppLogEventsSource } from "./internal/app-log-events.js"; /** * Handle for a running log stream subscription (app logs, syslog, or logcat). * * Uses a dedicated WebSocket connection separate from the main signaling connection. * Emits batched log lines every ~500ms when new lines arrive. */ export interface LogStreamEvents { lines: (lines: string[]) => void; line: (line: string) => void; error: (error: Error) => void; close: () => void; } /** * Log stream with a connection of its own, separate from signaling: a WebSocket for syslog and * logcat, and server-sent events for app logs. */ export declare class LogStream extends EventEmitter { private wsUrl; private subscribeMessage; private ws; private subscriptionId; private stopped; private terminateMessageType; private sse; /** * @internal - Either a signaling WebSocket subscription, or the instance's app log * server-sent events (`GET /app-logs/stream`), which emit one line per event. */ constructor(wsUrl: string | AppLogEventsSource, subscribeMessage?: object, terminateMessageType?: string, subscriptionId?: string); on(event: E, listener: LogStreamEvents[E]): this; once(event: E, listener: LogStreamEvents[E]): this; off(event: E, listener: LogStreamEvents[E]): this; /** Stop the log stream and close the dedicated WebSocket connection */ stop(): void; /** @internal - Follow the app log's server-sent events */ private _follow; /** @internal - Establish the dedicated WebSocket connection */ private _connect; } //# sourceMappingURL=log-stream.d.ts.map