Interface: LaunchOptions
@termwright/driver / LaunchOptions
Interface: LaunchOptions
Section titled “Interface: LaunchOptions”Defined in: driver/src/api.ts:87
@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();Extended by
Section titled “Extended by”Properties
Section titled “Properties”artifactSecurity?
Section titled “artifactSecurity?”
readonlyoptionalartifactSecurity?:ArtifactSecurityPolicy
Defined in: driver/src/api.ts:135
One policy for every artifact boundary. Defaults to secure redacted.
columns?
Section titled “columns?”
readonlyoptionalcolumns?:number
Defined in: driver/src/api.ts:113
command
Section titled “command”
readonlycommand: readonlystring[]
Defined in: driver/src/api.ts:88
readonlyoptionalcwd?:string
Defined in: driver/src/api.ts:89
debug?
Section titled “debug?”
readonlyoptionaldebug?:boolean
Defined in: driver/src/api.ts:97
Streams a live log of API calls, waits, revisions and diagnostics to
stderr. Also enabled by TERMWRIGHT_DEBUG=1 (=all adds raw PTY traffic).
readonlyoptionalenv?:Readonly<Record<string,string>>
Defined in: driver/src/api.ts:90
envMode?
Section titled “envMode?”
readonlyoptionalenvMode?:EnvMode
Defined in: driver/src/api.ts:92
Defaults to 'replace': a test process’s secrets are not the child’s.
readonlyoptionallogs?: readonlyAppLogSource[]
Defined in: driver/src/api.ts:103
Log files to follow for the lifetime of the session. A file that does not exist yet is waited for; one that already exists is followed from its current end, so a session never replays a previous run.
operationBudget?
Section titled “operationBudget?”
readonlyoptionaloperationBudget?:OperationBudget
Defined in: driver/src/api.ts:132
recording?
Section titled “recording?”
readonlyoptionalrecording?:RecordingOptions
Defined in: driver/src/api.ts:133
requiredCapabilities?
Section titled “requiredCapabilities?”
readonlyoptionalrequiredCapabilities?: readonly ("semantic-tree"|"stable-identity"|"intended-geometry"|"clipped-geometry"|"painted-region"|"pointer-geometry"|"pointer-hit-testing"|"focus"|"scroll"|"render-order"|"action-strategies"|"keyboard-input"|"pointer-input"|"focus-input"|"paired-revisions")[]
Defined in: driver/src/api.ts:146
Capabilities that must be present in the frozen session contract.
Launch waits for negotiation and throws CapabilityUnavailableError
before returning a harness when any requirement is missing.
readonlyoptionalrows?:number
Defined in: driver/src/api.ts:114
scrollbackLines?
Section titled “scrollbackLines?”
readonlyoptionalscrollbackLines?:number
Defined in: driver/src/api.ts:130
semanticFrameQueueCapacity?
Section titled “semanticFrameQueueCapacity?”
readonlyoptionalsemanticFrameQueueCapacity?:number
Defined in: driver/src/api.ts:129
Negotiated ceiling for semantic frames in flight between a framework probe and the driver. Defaults to 32 and is capped at 256. Compatible probes may use it as their publication budget; a full queue still fails closed instead of dropping or retrying a semantic revision.
semanticNegotiationMs?
Section titled “semanticNegotiationMs?”
readonlyoptionalsemanticNegotiationMs?:number
Defined in: driver/src/api.ts:122
Maximum time to discover an optional semantic adapter. Defaults to 2,000
ms for generic auto-detection. A peer accepted within that window keeps
its own bounded hello deadline; peers first seen afterwards are refused.
When requiredCapabilities is non-empty, the default discovery budget is
the larger of 2,000 ms and the session ready timeout.
shellIntegration?
Section titled “shellIntegration?”
readonlyoptionalshellIntegration?:"external"|"termwright-posix"|"termwright-powershell"
Defined in: driver/src/api.ts:140
Termwright-managed modes instrument an interactive shell with exact
command markers. Test authors should normally use terminal.openShell().
terminalProfile?
Section titled “terminalProfile?”
readonlyoptionalterminalProfile?:TerminalProfileId
Defined in: driver/src/api.ts:112
Terminal profile: which width tables and which of the switches terminals
disagree on this session uses. The built-in ids are 'default' and
'cjk-wide'.
It is recorded with the session so a replay, a screenshot and the runner pane can count characters exactly as the live session did.
timeouts?
Section titled “timeouts?”
readonlyoptionaltimeouts?:TimeoutClasses
Defined in: driver/src/api.ts:131