provide-terminal 2026-03-09
Cloudflare WebSocket Protocol implemented, proxy terminal page added, and test suite reorganized into feature-based subdirectories
115 files · 5,581+ · 360-

CFWebSocket Protocol

11 files changed
  • ws_helpers.py CFWebSocket protocol helpers extracted
  • session_runtime.py Session runtime updated with CFWebSocket protocol
  • http_routes.py Proxy terminal page endpoint added
  • app.py Server app updated with proxy terminal page
  • config.py Config updated for CFWebSocket and proxy terminal
  • gateway.py Gateway updated for CFWebSocket protocol
  • bridge.py Bridge updated for CFWebSocket
  • connections.py Hub connections updated
  • core.py Hub core updated
  • browser_handlers.py Browser handlers updated for CFWebSocket
  • websockets.py WS routes updated for CFWebSocket protocol
  • Cloudflare WebSocket Protocol implementation added, enabling WebSocket connections through CF Workers without the standard HTTP upgrade path. interface behavioral
    3 files
    • ws_helpers.py
    • session_runtime.py
    • http_routes.py
  • Proxy terminal page added for browser-based terminal access through the CF Worker. instantiate behavioral
    3 files
    • app.py
    • config.py
    • registry.py
  • UX improvements to connection handling and reconnection flows. decouple behavioral
    2 files
    • bridge.py
    • websockets.py

Test Organization

28 files changed
  • __init__.py ANSI tests package init
  • test_ansi.py ANSI tests moved to ansi/ subdirectory
  • test_ansi_upgrade.py ANSI upgrade tests moved
  • __init__.py CLI tests package init
  • test_cli.py CLI tests moved to cli/
  • __init__.py E2E tests package init
  • test_live_hub_ws.py Live hub WS tests moved to e2e/
  • test_ssh_gateway.py SSH gateway tests moved to e2e/
  • test_telnet_gateway.py Telnet gateway tests moved to e2e/
  • __init__.py Hijack tests package init
  • test_acquire_atomic.py Acquire atomic tests moved to hijack/
  • test_base.py Hijack base tests moved
  • test_bridge.py Bridge tests moved
  • test_hub.py Hub tests moved
  • __init__.py Playwright tests package init
  • conftest.py Playwright conftest moved
  • test_example.py Playwright example tests moved
  • test_hijack.py Playwright hijack tests moved
  • test_server.py Playwright server tests moved
  • test_terminal_proxy.py Playwright terminal proxy tests moved
  • __init__.py Server tests package init
  • test_api.py Server API tests moved to server/
  • test_app.py Server app tests moved
  • test_auth.py Server auth tests moved
  • test_config.py Server config tests moved
  • __init__.py Transport tests package init
  • test_telnet.py Telnet tests moved to transports/
  • test_websocket.py WebSocket tests moved
  • Test suite reorganized from flat layout into feature-based subdirectories matching the source module hierarchy: ansi/, cli/, e2e/, hijack/, playwright/, proxy/, server/, terminal/, transports/. qualify architectural
    5 files
    • __init__.py
    • __init__.py
    • __init__.py
    • __init__.py
    • __init__.py

Cyclomatic Complexity Reduction

5 files changed
  • core.py Helpers extracted to reduce cyclomatic complexity
  • ownership.py Ownership helpers extracted
  • polling.py Polling helpers extracted
  • session_logger.py Session logger helpers extracted
  • telnet.py Telnet helpers extracted
  • Helper functions extracted from complex methods to bring xenon complexity scores within policy limits. decouple internal
    5 files
    • core.py
    • ownership.py
    • polling.py
    • session_logger.py
    • telnet.py

Coverage Additions

5 files changed
  • test_terminal_proxy.py Tests for the new proxy terminal page
  • test_ws_regression_disconnect.py Tests for WS disconnect resume scenario
  • test_branch_coverage.py CF branch coverage tests
  • test_http_routes_coverage2.py CF HTTP routes additional coverage
  • test_session_runtime_coverage.py CF session runtime coverage
  • Coverage added for the new uterm proxy terminal page. qualify internal
    1 file
    • test_terminal_proxy.py
  • Coverage added for WS disconnect resume and telnet subnegotiation edge cases. qualify internal
    2 files
    • test_ws_regression_disconnect.py
    • test_telnet_negotiate.py