You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Emit typed notification events for OSC 9, Kitty OSC 99, and OSC 777 #31
For 0.1.0, Terminal._handle_osc() consumes desktop notification sequences (OSC 9 ; <msg> outside 9;4 progress and 9;9 cwd, Kitty OSC 99 ; <meta> ; <payload>, and rxvt-unicode / VTE OSC 777 ; notify ; <title> ; <body>) silently without emitting UnhandledSequence. Typed notification Event dataclasses and Kitty OSC 99 multi-chunk reassembly are deferred to 0.2.0.
Motivation
CLI build tools, test runners, and coding agents emit OSC 9, OSC 777;notify, or Kitty OSC 99 (i=, d=0/1, p=title/body, base64 e=1, query a=query) to notify users when long commands finish. Exposing a unified bounded notification Event lets headless runners and multiplexers assert or forward notifications without parsing raw OSC bytes themselves.
Proposal
Invariants
The invariants below are load-bearing; everything under Intent is open.
Notification text fields are sanitized via sanitize_terminal_text(), accounted for by UTF-8 byte length in _event_byte_cost(), and capped by Limits (including bounded chunk reassembly for OSC 99d=0 continuations).
OSC 9;4 progress reporting and OSC 9;9 working-directory updates continue routing to ProgramStatusStore and _update_cwd() without ambiguity.
Intent (non-binding)
Target 0.2.0: add a Notification member to the Event union carrying protocol source ("osc9", "osc99", "osc777"), notification_id, title, and body, gated by a Policy flag (allow_notifications: bool = True, capability query reply opt-in).
Not doing
Invoking OS desktop notification daemons (libnotify, osascript, WinRT) from libvt.
Activity