# Changelog

## libvt 0.0.1a1 (Yet to be released)

<!-- KEEP THIS PLACEHOLDER - DO NOT REMOVE OR MODIFY THIS LINE -->
_Notes on the upcoming release will go here._
<!-- END PLACEHOLDER - ADD NEW CHANGELOG ENTRIES BELOW THIS LINE -->

## libvt 0.0.1a0 (2026-11-22)

Initial pre-alpha release of `libvt`: a pure-Python, zero-dependency virtual
terminal emulator, streaming VT500 byte parser, mode-aware input encoder,
`asyncio` POSIX PTY adapter, and `pytest` plugin.

### What's new

#### Sans-I/O terminal core, two-tier RLE grid, and Unicode 17 width (#2)

{class}`~libvt.terminal.Terminal`, {class}`~libvt.screen.Screen`, and
{class}`~libvt.terminal.Snapshot` emulate primary and `?1049` alternate
screens with zero-based `(row, col)` coordinates, lazy 64-bit inline
viewport attributes, run-length-encoded scrollback history, and
primary-screen soft-wrap resize reflow. Top-level
{func}`~libvt.terminal.render`, {func}`~libvt.terminal.strip`, and
{func}`~libvt.codec.explain` helpers handle common rendering, stripping,
and sequence disassembly tasks, backed by `python -m libvt` CLI
subcommands.

{class}`~libvt.parser.Parser` decodes incremental UTF-8, colon-delimited
ITU T.416 SGR subparameters (`4:3`, `38:2::R:G:B`, `58:5:idx`), `G0`–`G3`
character-set designations (`ESC ( 0` DEC Special Graphics, `SO`/`SI`,
`SS2`/`SS3`), `HPR`/`VPR` (`CSI a` / `CSI e`), `CBT`/`CHT`,
`DECSCA`/`DECSED`/`DECSEL`, `CSI 3 J` / `CSI 22 J`, and `DCS tmux;`
passthrough framing while isolating UTF-8 `0x9C` and `U+009B` bytes from
8-bit `C1` controls (with optional `encoding="latin-1"` 8-bit wire mode).
SHA-256-pinned Unicode 17.0.0 two-stage tables drive East Asian width and
DEC `?2027` UAX #29 grapheme clustering across ZWJ emoji, Regional
Indicator flag pairs, Indic conjuncts, Hangul jamo, and `VS15` / `VS16`
emoji variation sequences. See {doc}`topics/architecture` for details.

#### Synchronized output stepping, Rex `OSC 7501`, and host queries (#2)

{meth}`~libvt.terminal.Terminal.committed`,
{meth}`~libvt.terminal.Terminal.feed_until`, and
{meth}`~libvt.terminal.Terminal.expire_synchronized_output` provide
lazy copy-on-write frame holds and generation-tagged timeout recovery
for DEC mode `?2026` synchronized updates.
{class}`~libvt.terminal.Formatter` exports snapshots to plain text, VT
escape sequences, and span-coalesced HTML with URI scheme allowlisting.

{class}`~libvt.status.ProgramStatusStore` and
{class}`~libvt.status.ProgramStatus` implement the Rex `OSC 7501`
Program Status specification, including hierarchical task identifiers,
ancestor `app` inheritance, urgency ranking, base64 `title`/`msg`
validation, profile- and policy-gated `OSC 7501 ; ?` capability replies,
`OSC 9;4` fallback, and lifecycle pruning alongside `OSC 133` prompt zones,
`OSC 7` RFC 8089 working directory updates, `OSC 52` clipboard writes,
`OSC 10`/`11` and `OSC 110`/`111` dynamic colors, `tmux` `ESC k` window
renames ({class}`~libvt.events.WindowRenamed`), `DA1`/`DA2`, `DSR`,
`DECRQM`, `DECRQSS`, `XTVERSION`, `XTGETTCAP`, and `?2031`/`?996n`
color-scheme queries. Configuration splits cleanly across {class}`~libvt.config.Profile`
(including versioned {meth}`~libvt.config.Profile.tmux` phantom-column
and resize compatibility profiles), {class}`~libvt.config.Policy`, and
{class}`~libvt.config.Limits`. See {doc}`topics/protocols-and-input` for
details.

#### Mode-aware input encoding, `asyncio` PTY bridge, and pytest plugin (#2)

{class}`~libvt.input.KeyEvent`, {class}`~libvt.input.MouseEvent`,
{class}`~libvt.input.FocusEvent`, and {class}`~libvt.input.PasteEvent`
encode outbound PTY bytes against active terminal modes, including
per-screen Kitty `CSI u` keyboard stacks (`>u`, `<u`, `=u`, `?u`), `SGR`
and `SGR-Pixel` mouse tracking (`?1006`, `?1016`), and fail-closed
bracketed paste validation raising {exc}`~libvt.exc.UnsafePasteError`.

{class}`~libvt.aio.AsyncTerminalStream` and {func}`~libvt.aio.open_pty`
connect sans-I/O terminals to `asyncio` streams and controlling POSIX
pseudo-terminals (`TIOCSCTTY` and `tty_mode`) without importing `asyncio`
or `pty` on `import libvt`. The `pytest11` plugin provides
protocol-typed `vt_terminal`, `vt_factory`, `vt_parser`, `vt_recorder`,
and `vt_pty` fixtures alongside {func}`~libvt.testing.assert_screen`,
{func}`~libvt.testing.assert_screen_box`,
{exc}`~libvt.exc.TerminalTimeoutError` stream diagnostics, and
{class}`~libvt.terminal.FlightRecorder` ring buffers. See
{doc}`topics/sync-and-asyncio` for details.

#### Incremental sync deltas, `tmux` capture reconstruction, and graphics (#13–#20)

{meth}`~libvt.terminal.Terminal.sync_token` and
{meth}`~libvt.terminal.Terminal.changes_since` emit non-destructive
multi-consumer {class}`~libvt.terminal.ScreenDelta` updates across both
`"committed"` (`?2026`-held) and `"working"` views, paired with
{meth}`~libvt.terminal.ScreenDelta.apply_lines`,
{meth}`~libvt.terminal.ScreenDelta.apply_rows`, and `O(1)` copy-on-write
{attr}`~libvt.terminal.Snapshot.history` sequence views.

{func}`~libvt.tmux.decode_tmux_capture`,
{class}`~libvt.tmux.TmuxPaneMetadata`, and
{func}`~libvt.tmux.unescape_tmux_control_output` reconstruct live
{class}`~libvt.terminal.Terminal` and {class}`~libvt.terminal.Snapshot`
state from `tmux capture-pane` (handling bare `SO`/`SI` ACS borders,
`GRID_FLAG_TAB` tabstops, `-F` / `-J` soft wraps, phantom-column
`pending_wrap`, and `-a` saved primary screens).
{mod}`libvt.graphics` tracks zero-dependency `SIXEL` and Kitty `APC G`
image metadata ({class}`~libvt.graphics.ImageMeta`) and monotonic
`abs_row` grid placements ({class}`~libvt.graphics.ImagePlacement` and
{meth}`~libvt.graphics.ImagePlacement.occupies_abs`) resolved alongside
{class}`~libvt.events.PromptZone` anchors via
{meth}`~libvt.terminal.Snapshot.at_abs` and
{meth}`~libvt.terminal.Snapshot.viewport_row`.
{exc}`~libvt.exc.TerminalTimeoutError` attaches multi-line viewport and
flight-recorder diagnostics via PEP 678 `__notes__` while keeping
`str(exc)` single-line.

### Documentation

- Add Architecture Decision Records `0001`–`0010` documenting clean-room
  provenance, sans-I/O layering, two-tier RLE storage, Unicode 17
  clustering, protocol semantics, input safety, and `asyncio`/pytest
  boundaries in {doc}`project/adr/index` (#2).
