Skip to content

Releases: holiber/jabterm

v0.1.5 — Terminal automation events

Choose a tag to compare

@holiber holiber released this 26 Feb 15:32
36aeaa8

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

  • ptyExit event: 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.

  • commandEnd event via shell integration: New opt-in shellIntegration: true option on createJabtermServer(). When enabled, the server injects PROMPT_COMMAND (bash) or precmd (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>)

  • onData callback: New prop onData?: (data: string) => void fires for each chunk of terminal output, enabling reactive patterns (e.g., detecting when a dev server prints its URL).

  • onExit callback: New prop onExit?: (exitCode: number, signal: number | null) => void fires when the PTY process exits.

  • onCommandEnd callback: New prop onCommandEnd?: (exitCode: number) => void fires after each command completes (requires shellIntegration: true on the server).

  • getLastExitCode(): New imperative handle method returning the most recent command exit code, or null if none observed.

  • waitForCommandEnd(timeoutMs?): New imperative handle method returning a Promise<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 quietMs milliseconds of no new output (default: 300ms)
    • Marker mode: resolves when a waitFor substring appears in the output
    • Command mode: resolves on the next commandEnd event (requires shell integration)

    Returns { output: string, exitCode?: number }.

Full Changelog

v0.1.4...v0.1.5

jabtrunner-v0.1.0

Choose a tag to compare

@github-actions github-actions released this 23 Feb 00:27

What's Changed

Full Changelog: v0.1.3...jabtrunner-v0.1.0

v0.1.3

Choose a tag to compare

@cursor cursor released this 21 Feb 23:48
e4ed68e

Fixed

  • Graceful shutdown: close WebSocket clients before killing PTYs (prevents node-pty native crash).
  • close() is idempotent for concurrent callers (shared close promise).
  • CLI supports --port 0 for ephemeral ports.

See CHANGELOG.md and PR #20.

v0.1.2

Choose a tag to compare

@cursor cursor released this 20 Feb 21:53

What's Changed

Full Changelog: v0.1.1...v0.1.2

v0.1.1

Choose a tag to compare

@cursor cursor released this 20 Feb 19:59
  • Remove demo header/buttons from recorded README media\n- Ensure video shows only one terminal and waits for cat output\n- Refresh README screenshots and demo.webm\n- CI/demo now use vim/vi instead of nano\n

v0.1.0

Choose a tag to compare

@holiber holiber released this 20 Feb 17:22

Initial public release of JabTerm.

  • Flattened package layout with jabterm/server and jabterm/react subpath 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