provide-terminal 2026-03-22
0.4.0 release: connector registry, CF http_routes split, remove compiled frontend
315 files · 9,704+ · 11,959-

Remove compiled frontend assets from git

36 files changed
  • hijack.js Removed compiled output (852 lines)
  • hijack.html Removed
  • hijack.css Removed
  • hijack-codec.js Removed
  • hijack-page.js Removed
  • hijack-page.css Removed
  • manifest.json Removed
  • terminal.js Removed
  • terminal.css Removed
  • terminal.html Removed
  • server-app.css Removed
  • server-app-components.css Removed
  • server-app-foundation.css Removed
  • server-app-layout.css Removed
  • server-app-views.css Removed
  • server-common.js Removed
  • server-replay-page.js Removed
  • server-session-page.js Removed
  • terminal-page.js Removed
  • terminal-page.css Removed
  • api.js Removed
  • boot.js Removed
  • router.js Removed
  • state.js Removed
  • types.js Removed
  • main-D-UFUT__.js Removed
  • main-DuZ7sYOn.css Removed
  • app-header.js Removed
  • connect-view.js Removed
  • dashboard-view.js Removed
  • operator-view.js Removed
  • replay-view.js Removed
  • session-view.js Removed
  • hijack-widget-host.js Removed
  • ci.yml Added npm run build:frontend step to CI so built assets are generated during CI rather than tracked in git
  • .gitignore Added frontend build output directories to .gitignore
  • All compiled JS/CSS frontend assets (~3000 lines across 25+ files) removed from git tracking. CI workflow now generates them via npm run build:frontend. This eliminates noisy build-artifact commits and ensures the frontend build is always reproducible from source. baseline behavioral
    2 files
    • ci.yml
    • .gitignore

Rename control_stream → control_channel

13 files changed
  • control_channel.py Renamed from control_stream.py; updated module API
  • control_stream.py Removed — replaced by control_channel.py
  • control_ws.py Updated imports
  • websockets.py Updated imports
  • control_channel.py Renamed from control_stream.py
  • control_channel.py Renamed from control_stream.py
  • control_channel_helpers.py Renamed from control_stream_helpers.py
  • test_control_channel_codec.py Renamed from test_control_stream_codec.py
  • test_control_channel_coverage.py Renamed from test_control_stream_coverage.py
  • test_bridge_mutants.py Updated for renamed module
  • test_hub_resume_flow_mutants.py Updated for renamed module
  • test_hub_resume_hello_mutants.py Updated for renamed module
  • test_routes_mutants.py Updated for renamed module
  • control_stream renamed to control_channel throughout — source files, test helpers, test files, and mutation tests. All references updated. decouple behavioral
    2 files
    • control_channel.py
    • control_ws.py

CF http_routes split into module directory

6 files changed
  • __init__.py New package init exposing only route_http
  • _shared.py Shared types and helpers extracted from http_routes.py
  • _hijack.py Hijack routes extracted from http_routes.py
  • _session.py Session routes extracted from http_routes.py
  • _dispatch.py Route dispatch extracted from http_routes.py
  • test_http_routes_coverage3.py Coverage tests for split http_routes
  • The monolithic http_routes.py split into four sub-modules: _shared (types/helpers), _hijack (hijack route handlers), _session (session route handlers), _dispatch (route dispatch). Package init exports only route_http to keep the public surface minimal. decouple internal
    5 files
    • __init__.py
    • _shared.py
    • _hijack.py
    • _session.py
    • _dispatch.py

Connector self-registration registry

9 files changed
  • registry.py New registry module — connectors register themselves by calling @register_connector(connector_type) rather than being listed in a central frozenset+factory
  • __init__.py Updated to use registry; removed hardcoded frozenset and factory
  • shell.py Registers itself via @register_connector
  • ssh.py Registers itself via @register_connector
  • telnet.py Registers itself via @register_connector
  • websocket.py Registers itself via @register_connector
  • registry.py Mirrored in packages/
  • __init__.py Mirrored in packages/
  • test_connectors.py 64-line mutation-killing connector tests
  • Connectors now call @register_connector(connector_type) at module level to self-register with the registry. The central frozenset of connector names and the factory lookup dict have been removed. New connectors can be added without modifying the init file. decouple behavioral
    2 files
    • registry.py
    • __init__.py

Register ushell as first-class connector; add E2E tests

3 files changed
  • test_app_ushell.py 152-line E2E test suite for ushell connector type
  • test_shell_connector.py 143-line tests for the undef-shell ShellConnector
  • _connector.py Updated ShellConnector for first-class integration
  • ushell (undef.shell) is now a registered connector_type in the server registry, enabling the terminal server to accept undef-shell connections the same way as SSH, telnet, and websocket connectors. E2E tests verify full session lifecycle through the ushell connector. instantiate behavioral
    2 files
    • test_app_ushell.py
    • test_shell_connector.py

CF Access service token support for E2E tests

4 files changed
  • jwt.py Added service token authentication path
  • test_coverage_jwt.py 379-line coverage tests for JWT and service token auth
  • test_coverage_entry_registry.py 455-line coverage tests for entry/registry
  • test_coverage_session_runtime.py 142-line tests for session runtime
  • CF Access service token authentication added to jwt.py, allowing E2E tests to authenticate against live Cloudflare deployments using a service token (CF-Access-Client-Id/Secret headers) rather than requiring a human-issued JWT. All 14 real_cf E2E tests now pass. instantiate behavioral
    1 file
    • jwt.py

Agent heartbeat expiry fixes

2 files changed
  • _monitor.py Expire blocked agents on heartbeat timeout; expire recovering agents on manager restart
  • _monitor.py Mirrored in packages/
  • Agents stuck in blocked state are now expired when a heartbeat timeout fires, preventing leaked sessions from accumulating. Recovering agents are expired on manager restart rather than being left in an indeterminate state. kill_agent falls back to PID when the process object is not tracked. harden behavioral
    1 file
    • _monitor.py

Vendor undef.shell and workers SDK into CF python_modules

6 files changed
  • __init__.py Workers runtime SDK package — 66 lines
  • _workers.py Workers runtime SDK implementation — 1418 lines
  • py.typed Marker file
  • workflows.py Workflows API stubs
  • _connector.py Vendored undef.shell ShellConnector for Pyodide worker
  • test_ushell_vendor_guard.py Guard test ensuring vendored undef.shell tree matches source
  • Vendored the Cloudflare Workers Python runtime SDK (~1500 lines) into python_modules/ for Pyodide. Added undef.shell to python_modules/ for CF worker use. A vendor guard test verifies the vendored copy stays in sync with the source package. baseline behavioral
    3 files
    • __init__.py
    • _workers.py
    • _connector.py

Detection module refactor: extract input_type

5 files changed
  • input_type.py New module: auto_detect_input_type() extracted from detector.py
  • __init__.py Updated exports
  • detector.py Reduced — auto_detect_input_type moved out
  • input_type.py Mirrored in packages/
  • test_extractor_validate.py 143-line test for extractor validate internals
  • auto_detect_input_type() extracted from detector.py into its own input_type module, matching the single-responsibility split already done with extractor and saver. Corresponding tests split: validate internals moved to test_extractor_validate.py. decouple internal
    2 files
    • input_type.py
    • detector.py

0.4.0 release and dependency updates

12 files changed
  • VERSION Bumped to 0.4.0
  • VERSION Updated
  • pyproject.toml Updated dependencies and test paths
  • uv.lock Lockfile update for 0.4.0 and dependency changes
  • uv.lock CF package lockfile update
  • uv.lock Shell package lockfile
  • pyproject.toml Added dev dependency additions
  • HANDOFF.md Updated with session context
  • 2026-03-22-codebase-hygiene.md Codebase hygiene implementation plan document
  • conftest.py Root conftest updates
  • _example_session.py Example session script updates
  • memray_gateway_stress.py Memray gateway stress script updates
  • Bumped undef-terminal to 0.4.0 and updated uv.lock across all packages. The undef-shell symlink (src/undef/shell pointing to packages/undef-shell/src/undef/shell) was removed as it broke Windows compatibility and was made redundant by the vendored CF python_modules. baseline internal
    3 files
    • VERSION
    • pyproject.toml
    • uv.lock