Skip to content

Expose complete PTY request metadata - #7

Merged
blaubaer merged 1 commit into
mainfrom
migrate/from-origin/pr131
Sep 2, 2026
Merged

Expose complete PTY request metadata#7
blaubaer merged 1 commit into
mainfrom
migrate/from-origin/pr131

Conversation

@blaubaer

@blaubaer blaubaer commented Sep 2, 2026

Copy link
Copy Markdown
Member

Exposes complete PTY request metadata without allocating or configuring an operating-system PTY.

  • adds Pty.TerminalModes and pixel dimensions to Window
  • strictly parses complete RFC 4254 pty-req and window-change payloads
  • preserves unspecified initial dimensions and merges zero-valued window updates
  • isolates terminal-mode maps at callback and session API boundaries
  • keeps terminal modes metadata-only and leaves existing I/O behavior unchanged

This reimplements and extends the ideas from gliderlabs/ssh#131 by @elfgzp and gliderlabs/ssh#210 by @aymanbagabas, which credits Maisem Ali and Tailscale#4154. Neither upstream patch was cherry-picked; this version fixes malformed-input, opcode-boundary, map-aliasing, 32-bit conversion, and test-coverage gaps.

Breaking API note for this v0.x module: unkeyed Window and Pty literals must use named fields, and Pty is no longer comparable because it contains a map.

Verified with the full test suite, race detector, Linux/386 tests, Windows cross-build, go vet, golangci-lint, and all example modules.

@blaubaer
blaubaer merged commit d2100e6 into main Sep 2, 2026
16 checks passed
@blaubaer
blaubaer deleted the migrate/from-origin/pr131 branch September 2, 2026 11:47
@blaubaer blaubaer self-assigned this Sep 2, 2026
@blaubaer blaubaer added the enhancement New feature or request label Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant