release: nexus btpanel session fix and app-v2

This commit is contained in:
Codex Release Bot
2026-07-08 22:31:31 +08:00
commit 1933f0af6e
2457 changed files with 350105 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
"""WebSSH terminal DATA payload encoding (ANSI-safe base64)."""
import base64
from server.api.webssh import WEBSSH_PTY_ENV, _terminal_payload_b64
def test_pty_env_has_color_term():
assert WEBSSH_PTY_ENV["TERM"] == "xterm-256color"
assert WEBSSH_PTY_ENV["COLORTERM"] == "truecolor"
assert WEBSSH_PTY_ENV["FORCE_COLOR"] == "1"
def test_terminal_payload_b64_preserves_ansi_escapes():
raw = "\x1b[31mred\x1b[32mgreen\x1b[0m\n"
b64 = _terminal_payload_b64(raw)
decoded = base64.b64decode(b64)
assert decoded == raw.encode("utf-8")
def test_terminal_payload_b64_from_bytes():
raw = b"\x1b[33myellow\x1b[0m"
b64 = _terminal_payload_b64(raw)
assert base64.b64decode(b64) == raw