export declare class SceneGraphDebugCommandController { host: string; constructor(host: string, port?: number); private connection; private shellPrompt; private echoLines; timeout: number; execTimeout: number; private port; private maxBufferLength; private logger; connect(options?: { execTimeout?: number; timeout?: number; }): Promise; private removeConnection; /** * executes the different bsprof commands used for brightscript profiling. * @param {('pause'|'resume'|'status')} option Pause, resume, or get BS profiling status. */ bsprof(option: 'pause' | 'resume' | 'status'): Promise; /** * Prints the current memory and CPU utilization of a channel (RAM usage is reported in KibiBytes [KiB]). The channel manifest must include the run_as_process=1 attribute to use this command. * * If an interval is provided the device repeats the command the specified number of seconds and outputs the results to port 8085. * (Available since Roku OS 10.0) * @param {{ interval: number }} [options] logging interval in seconds. 0 will stop interval logging. */ chanperf(options?: { interval: number; }): Promise; /** * Clear all caches that can affect channel launch time. */ clearLaunchCaches(): Promise; /** * Displays frames-per-second and free memory on-screen. Leverage this tool to optimize your channel UI. It presents a 1-second moving average of the current frame rate. * @param {('off'|'on'|'toggle')} option */ fpsDisplay(option: 'off' | 'on' | 'toggle'): Promise; /** * Provides a snapshot of the amount of in-use and free memory on the device. */ free(): Promise; /** * Generate a new developer key. */ genkey(): Promise; /** * Displays the current set of images loaded into texture memory. */ loadedTextures(): Promise; /** * Enable, disable, or checks the status of console logging of thread rendezvous. * @param {('status'|'off'|'on')} option */ logrendezvous(option: 'status' | 'off' | 'on'): Promise; /** * Show list of all installed plugins. */ plugins(): Promise; /** * Simulate a keypress. * @param {string[]} keys A list of keys to press in sequence */ press(keys: string[]): Promise; /** * Prints a list of assets loaded into texture memory and the amount of free, used, and maximum available memory on your device, respectively. * Starting with Roku OS 9.3, the name of each bitmap is included. */ r2d2Bitmaps(): Promise; /** * Removes the indicated channel from the local device, as well as from all devices linked to the same Roku account. For example, if a channel has a channel id of "987654_cf9a", then the following command would remove it: remove_plugin 987654_cf9a * * The list of available channel ids can be seen with the 'plugins' command. The local device must be linked to a Roku account. * * To use this command, the local device must be linked to a Roku account. Channels are not removed on another device until it synchronizes with the Roku Channel Store (for example, via an automatic check for updates). * (Available since Roku OS 10.0) * * @param {string} channelId */ removePlugin(channelId: string): Promise; /** * Prints every existing node created by the currently running channel. * As of Roku OS 10.0, this prints the number of 'osref' references to the node (held in the Roku platform) and 'bscref' references (held in the channel application). * The 'bcsref' count includes references from "m." variable and local variables. Child references and field references do not increase 'bscref' counts. * * The 'osref' count also includes child references and references from Roku SceneGraph interface fields. For example, for any node with a parent, the parent will count as one 'osref' on the child. * Additionally, any field of type 'node', 'nodearray', or 'assocarray' will add one 'osref' to each node referenced from within that field. * These could be in variables local to a function, arrays, or associative arrays, including a component global m or an associative array field of a node. * * The reported 'osref' count may vary from release to release of Roku OS; the information here is provided only to give a sense of the kinds of items that the count includes. * The 'bscref' count provides a more relevant and accurate indication of the resources that the channel itself controls. * * The sgnodes all, sgnodes roots, and sgnodes node_ID commands are similar to the getAll() , getRoots() , getRootsMeta(), and getAllMeta() ifSGNodeChildren methods, which can be called on any SceneGraph node. * * @param {string} id This can be 'all', 'roots', or the id of node(s) in your channel. */ sgnodes(id: string): Promise; /** * Provides basic node operation performance metrics. This command tracks all node operations by a thread, whether it's being created or an operation on an existing node, and whether it involves a rendezvous. * @param {('start'|'clear'|'report'|'stop')} action start - enables counting, clear - resets counters to zero, report - prints current counts with rendezvous as a percentage, stop - disables counting. */ sgperf(action: 'start' | 'clear' | 'report' | 'stop'): Promise; /** * Show the current developer key */ showkey(): Promise; /** * Send a literal text sequence. * @param text string to be sent to the device. */ type(text: string): Promise; /** * Changes the number of brightscript warnings displayed on application install. * @param warningLimit maximum number of warnings to show */ brightscriptWarnings(warningLimit: number): Promise; /** * Send any custom command to the SceneGraph debug server. * * If this command is called and there is no active connection with the device we will attempt to connect. * In this case once the command has been executed we will then close the connection. * @param {string} command command to be run. */ exec(command: string, options?: { execTimeout?: number; timeout?: number; }): Promise; /** * Closes the socket connection to the device */ end(): Promise; /** * Returns a simple starting object used for responses * @private */ private getBlankResponseObject; } export interface SceneGraphCommandResponse { command: string; error?: SceneGraphCommandError; result: { rawResponse: string; data?: any; }; } interface SceneGraphCommandError { message: string; type: 'socket' | 'device'; data?: T; } export {};