Interface: SessionEventMap
@termwright/driver / SessionEventMap
Interface: SessionEventMap
Section titled “Interface: 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.
Example
Section titled “Example”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();Properties
Section titled “Properties”action
Section titled “action”action:
ActionEvent
Defined in: driver/src/api.ts:1117
One harness or locator action, reported after it finished.
action-start
Section titled “action-start”action-start:
ActionStartedEvent
Defined in: driver/src/api.ts:1119
One harness or locator action, reported immediately before it begins.
app-log
Section titled “app-log”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
Section titled “diagnostic”diagnostic:
SessionDiagnostic
Defined in: driver/src/api.ts:1095
exit:
ExitStatus&object
Defined in: driver/src/api.ts:1113
Type Declaration
Section titled “Type Declaration”timeMs
Section titled “timeMs”
readonlytimeMs:number
input:
object
Defined in: driver/src/api.ts:1096
readonlydata:Uint8Array
readonlykind:"key"|"mouse"|"paste"|"raw"
timeMs
Section titled “timeMs”
readonlytimeMs:number
output
Section titled “output”output:
object
Defined in: driver/src/api.ts:1094
readonlydata:Uint8Array
timeMs
Section titled “timeMs”
readonlytimeMs:number
resize
Section titled “resize”resize:
object
Defined in: driver/src/api.ts:1101
columns
Section titled “columns”
readonlycolumns:number
readonlyrows:number
timeMs
Section titled “timeMs”
readonlytimeMs:number
screen-revision
Section titled “screen-revision”screen-revision:
object
Defined in: driver/src/api.ts:1106
revision
Section titled “revision”
readonlyrevision:number
timeMs
Section titled “timeMs”
readonlytimeMs:number
semantic-revision
Section titled “semantic-revision”semantic-revision:
object
Defined in: driver/src/api.ts:1107
revision
Section titled “revision”
readonlyrevision:number
snapshot
Section titled “snapshot”
readonlysnapshot:SemanticSnapshot
The exact committed tree for this event; never read back from newer state.
timeMs
Section titled “timeMs”
readonlytimeMs:number