Preload script — the only bridge between the sandboxed renderer and the main process. Runs with Node access but contextIsolation on, and exposes three frozen API objects on window:
window.terminalAPI— raw PTY/SSH byte flow (provided by the terminal lib's exposeTerminalBridge):sendInput,resize,onData,onExit;window.windowAPI— see WindowAPI;window.sessionAPI— see SessionAPI.
Everything the renderer can ask the main process to do is enumerated here.
Type Definitions
ProfilesAPI
Saved-session (PuTTY "Saved Sessions") persistence.
- object
| Name | Type | Description |
|---|---|---|
list | function | List all saved profiles. |
save | function | Upsert by |
delete | function | Remove by |
SessionAPI
Session configuration & lifecycle exposed to the renderer.
- object
| Name | Type | Description |
|---|---|---|
detectShells | function | Local shells found on this machine. |
browseDir | function | Pick a start directory (dialog); |
browseKey | function | Pick a private-key file (dialog); |
open | function | Open a session and wire it to the terminal. |
close | function | Dispose the active session. |
profiles | ProfilesAPI | Saved-session persistence. |
onOpenProfile | function | Register a callback invoked with a saved-session name when the app is asked to open one (Windows jump-list entry or |
WindowAPI
Frameless title-bar controls.
- object
| Name | Type | Description |
|---|---|---|
setTitleBarTheme | function | Recolour the native window-control overlay for the dark ( |