Skip to content

Interface: SessionEventMap

@termwright/driver


@termwright/driver / SessionEventMap

Defined in: driver/src/api.ts:1093

@termwright/driver — PTY + VT sessions, locators, actions and waits.

The normative public API lives in api.ts; this module is the only entry point and re-exports the types from there together with their runtime implementations.

import { launchTerminal } from '@termwright/driver';
const terminal = await launchTerminal({ command: ['node', 'app.js'] });
await terminal.waitForText('Ready');
await terminal.getByRole('button', { name: 'Approve' }).activate();
await terminal.close();

action: ActionEvent

Defined in: driver/src/api.ts:1117

One harness or locator action, reported after it finished.


action-start: ActionStartedEvent

Defined in: driver/src/api.ts:1119

One harness or locator action, reported immediately before it begins.


app-log: AppLogEvent

Defined in: driver/src/api.ts:1115

A line or record from the application own log.


crash: CrashReport

Defined in: driver/src/api.ts:1124

The child died unexpectedly. Emitted before exit, so a listener reacting to the exit can already read TerminalHarness.crashReport.


diagnostic: SessionDiagnostic

Defined in: driver/src/api.ts:1095


exit: ExitStatus & object

Defined in: driver/src/api.ts:1113

readonly timeMs: number


input: object

Defined in: driver/src/api.ts:1096

readonly data: Uint8Array

readonly kind: "key" | "mouse" | "paste" | "raw"

readonly timeMs: number


output: object

Defined in: driver/src/api.ts:1094

readonly data: Uint8Array

readonly timeMs: number


resize: object

Defined in: driver/src/api.ts:1101

readonly columns: number

readonly rows: number

readonly timeMs: number


screen-revision: object

Defined in: driver/src/api.ts:1106

readonly revision: number

readonly timeMs: number


semantic-revision: object

Defined in: driver/src/api.ts:1107

readonly revision: number

readonly snapshot: SemanticSnapshot

The exact committed tree for this event; never read back from newer state.

readonly timeMs: number