Repository navigation
Releases: holiber/jabterm
Release list
v0.1.5 — Terminal automation events
What's New
Terminal automation events (#27)
This release adds structured events and helpers for terminal automation workflows — making it possible to reliably detect command success/failure, react to output, and execute send-and-wait patterns without fragile regex parsing.
Server
-
ptyExitevent: The server now sends a{ type: "ptyExit", exitCode, signal }WebSocket message before closing the connection when the PTY process exits. Previously, clients only received a close code (1000 vs 1011) with no structured exit information. -
commandEndevent via shell integration: New opt-inshellIntegration: trueoption oncreateJabtermServer(). When enabled, the server injectsPROMPT_COMMAND(bash) orprecmd(zsh) hooks that emit OSC 633 escape sequences after each command. The server intercepts these sequences, strips them from the terminal output (so xterm never sees them), and sends{ type: "commandEnd", exitCode }structured messages to the client.
const server = createJabtermServer({
port: 3223,
shellIntegration: true, // opt-in, default: false
});React Component (<JabTerm>)
-
onDatacallback: New proponData?: (data: string) => voidfires for each chunk of terminal output, enabling reactive patterns (e.g., detecting when a dev server prints its URL). -
onExitcallback: New proponExit?: (exitCode: number, signal: number | null) => voidfires when the PTY process exits. -
onCommandEndcallback: New proponCommandEnd?: (exitCode: number) => voidfires after each command completes (requiresshellIntegration: trueon the server). -
getLastExitCode(): New imperative handle method returning the most recent command exit code, ornullif none observed. -
waitForCommandEnd(timeoutMs?): New imperative handle method returning aPromise<number>that resolves with the next command's exit code. -
writeAndWait(input, options?): New imperative handle method that sends input and resolves when one of three conditions is met:- Quiet mode (default): resolves after
quietMsmilliseconds of no new output (default: 300ms) - Marker mode: resolves when a
waitForsubstring appears in the output - Command mode: resolves on the next
commandEndevent (requires shell integration)
Returns
{ output: string, exitCode?: number }. - Quiet mode (default): resolves after
Full Changelog
jabtrunner-v0.1.0
What's Changed
Full Changelog: v0.1.3...jabtrunner-v0.1.0
v0.1.3
v0.1.2
v0.1.1
v0.1.0
Initial public release of JabTerm.
- Flattened package layout with
jabterm/serverandjabterm/reactsubpath exports - Added end-to-end terminal demo video (echo, nano, mc) and updated README/docs assets
- Added CI automation for screenshots and demo video updates