import type { BSDebugDiagnostic } from '../CompileErrorProcessor'; import type { LaunchConfiguration } from '../LaunchConfiguration'; import type { ChanperfData } from '../ChanperfTracker'; import type { RendezvousHistory } from '../RendezvousTracker'; import type { ProjectStagingInfo } from '../managers/ProjectManager'; export declare class CustomEvent { constructor(body: T); /** * The body (payload) of the event. */ body: T; /** * The name of the event. This name is how the client identifies the type of event and how to handle it */ event: string; /** * The type of ProtocolMessage. Hardcoded to 'event' for all custom events */ type: string; seq: number; } /** * Emitted when compile errors were encountered during the current debug session, * usually during the initial sideload process as the Roku is compiling the app. */ export declare class DiagnosticsEvent extends CustomEvent<{ diagnostics: BSDebugDiagnostic[]; }> { constructor(diagnostics: BSDebugDiagnostic[]); } /** * Is the object a `DiagnosticsEvent` */ export declare function isDiagnosticsEvent(event: any): event is DiagnosticsEvent; /** * A line of log ouptut from the Roku device */ export declare class LogOutputEvent extends CustomEvent<{ line: string; }> { constructor(line: string); } /** * Is the object a `LogOutputEvent` */ export declare function isLogOutputEvent(event: any): event is LogOutputEvent; /** * Log output from the debug server. These are logs emitted from NodeJS from the various RokuCommunity tools */ export declare class DebugServerLogOutputEvent extends CustomEvent<{ line: string; }> { constructor(line: string); } /** * Is the object a `DebugServerLogOutputEvent` */ export declare function isDebugServerLogOutputEvent(event: any): event is DebugServerLogOutputEvent; /** * Emitted when a rendezvous has occurred. Contains the full history of rendezvous since the start of the current debug session */ export declare class RendezvousEvent extends CustomEvent { constructor(output: RendezvousHistory); } /** * Is the object a `RendezvousEvent` */ export declare function isRendezvousEvent(event: any): event is RendezvousEvent; /** * Emitted anytime the debug session receives chanperf data. */ export declare class ChanperfEvent extends CustomEvent { constructor(output: ChanperfData); } /** * Is the object a `ChanperfEvent` */ export declare function isChanperfEvent(event: any): event is ChanperfEvent; /** * Emitted when the launch sequence first starts. This is right after the debug session receives the `launch` request, * which happens before any zipping, sideloading, etc. */ export declare class LaunchStartEvent extends CustomEvent { constructor(launchConfiguration: LaunchConfiguration); } /** * Is the object a `LaunchStartEvent` */ export declare function isLaunchStartEvent(event: any): event is LaunchStartEvent; /** * Emitted once the channel has been sideloaded to the channel and the session is ready to start actually debugging. */ export declare class ChannelPublishedEvent extends CustomEvent<{ launchConfiguration: LaunchConfiguration; }> { constructor(launchConfiguration: LaunchConfiguration); } /** * Is the object a `ChannelPublishedEvent` */ export declare function isChannelPublishedEvent(event: any): event is ChannelPublishedEvent; export type ProfileType = 'trace' | 'heapSnapshot'; export interface ProfilingEnabledEventData { /** * List of profiling types that have been enabled and are available to be started. This is typically determined by what the Roku device and current firmware version support, as well as what the user has enabled via ECP. Note that just because a profiling type is listed here doesn't necessarily mean it will be able to start successfully, but if a type is not listed here then it definitely won't be able to start */ types: ProfileType[]; } /** * Emitted when profiling has been enabled on the system. Typically profiling must be * enabled via ECP first before the channel launches. */ export declare class ProfilingEnabledEvent extends CustomEvent { constructor(data: ProfilingEnabledEventData); } export declare function isProfilingEnabledEvent(event: any): event is ProfilingEnabledEvent; export interface ProfilingStartEventData { type: ProfileType; } /** * Emitted when profiling has started */ export declare class ProfilingStartEvent extends CustomEvent { constructor(data: ProfilingStartEventData); } export declare function isProfilingStartEvent(event: any): event is ProfilingStartEvent; export interface ProfilingStopEventData { type: ProfileType; result: string; } /** * Emitted when profiling has stopped (either due to completion or an error). * Contains the type of profiling that was being done, and .result contains what was produced * during that session (often a file path) */ export declare class ProfilingStopEvent extends CustomEvent { constructor(data: ProfilingStopEventData); } export declare function isProfilingStopEvent(event: any): event is ProfilingStopEvent; export interface ProfilingErrorEventData { error: { message: string; stack?: string; }; } /** * Emitted anytime there's an error realted to profiling. These should typically be * presented to the user in a toast or some other non-intrusive way */ export declare class ProfilingErrorEvent extends CustomEvent { constructor(data: ProfilingErrorEventData); } export declare function isProfilingErrorEvent(event: any): event is ProfilingErrorEvent; /** * Event that asks the client to execute a command. */ export declare class CustomRequestEvent extends CustomEvent { constructor(body: R); } /** * Is the object a `CustomRequestEvent` */ export declare function isCustomRequestEvent(event: any): event is CustomRequestEvent; export declare function isExecuteTaskCustomRequest(event: any): event is CustomRequestEvent<{ task: string; }>; export declare function isShowPopupMessageCustomRequest(event: any): event is CustomRequestEvent<{ message: string; severity: 'error' | 'warn' | 'info'; modal: boolean; actions: string[]; }>; export declare function isProcessStagingDirCustomRequest(event: any): event is CustomRequestEvent<{ projects: ProjectStagingInfo[]; }>; export interface ProcessCrashEventData { type: 'uncaughtException' | 'unhandledRejection'; message: string; stack?: string; /** * Optional extra diagnostic data provided by the debugger. Keys are human-readable labels; * values are serialized as JSON when displayed to the user. */ additionalInfo?: { clientName?: string; rokuDebugVersion?: string; ecpMode?: string; developerMode?: boolean; firmware?: string; protocolVersion?: string; protocolEnabled?: boolean; }; } /** * Emitted when the debug adapter process encounters an uncaught exception or unhandled rejection. * The client should display an error to the user and terminate the debug session. */ export declare class ProcessCrashEvent extends CustomEvent { constructor(data: ProcessCrashEventData); } export declare function isProcessCrashEvent(event: any): event is ProcessCrashEvent; export declare enum ClientToServerCustomEventName { customRequestEventResponse = "customRequestEventResponse" } export declare enum StoppedEventReason { step = "step", breakpoint = "breakpoint", exception = "exception", pause = "pause", entry = "entry", goto = "goto", functionBreakpoint = "function breakpoint", dataBreakpoint = "data breakpoint", instructionBreakpoint = "instruction breakpoint" }