TerminalProcesses API
Terminal Processes API
import { CodeBoltClient } from '@codebolt/clientsdk';
const client = new CodeBoltClient();
Quick Reference
| Method | Description |
|---|---|
getActiveProcesses | Retrieves all currently active terminal processes. |
stopAllProcesses | Stops all running terminal processes. |
stopProcess | Stops a specific terminal process by its ID. |
Methods
getActiveProcesses
client.terminalProcesses.getActiveProcesses(): Promise<TerminalProcess[]>
Retrieves all currently active terminal processes.
Returns terminal processes that are currently running, including their process IDs, commands, and status information. Use this to monitor what shell operations are in progress.
No parameters.
Returns: Promise<TerminalProcess[]> — A promise that resolves to an array of active TerminalProcess objects
stopAllProcesses
client.terminalProcesses.stopAllProcesses(): Promise<unknown>
Stops all running terminal processes.
Terminates every currently active terminal process in the system. Use this for cleanup operations or when shutting down the platform to ensure no orphaned processes remain.
No parameters.
Returns: Promise<unknown> — A promise that resolves when all processes have been stopped
stopProcess
client.terminalProcesses.stopProcess(processId: string): Promise<unknown>
Stops a specific terminal process by its ID.
Sends a termination signal to the specified terminal process, ending its execution gracefully if possible. The process will be removed from the active process list.
| Parameter | Type | Required | Description |
|---|---|---|---|
processId | string | Yes | The unique identifier of the terminal process to stop |
Returns: Promise<unknown> — A promise that resolves when the process has been stopped