Repository navigation
0.1.2: Bounded cursor-position queries
Adds bounded cursor-position queries for applications that anchor inline terminal interfaces.
TerminalSession.requestCursorPosition(timeoutMilliseconds:)returns an ID and completes through the existingpollorTerminalEventsreader.- Typed outcomes cover a zero-based position, timeout, and cancellation. Only one query may be pending; async timeouts complete without keyboard input.
- Fragmented replies are decoded without exposing terminal reports as typed text or creating a second input reader.
- Cursor reports are advisory because the ANSI protocol has no request token. Applications retain ownership of viewport anchoring and output recovery.
Validation: 30 unit tests, formatting, standard PTY smoke, and cursor-query PTY smoke passed on macOS with Swift 6.4. The PTY check covers fragments, interleaved keyboard/resize, idle timeout, and mode restoration. Linux and a terminal-emulator compatibility matrix were not run for this release.