provide-terminal 2026-03-12
MCP server, HijackClient REST client, WebSocket connector, and auth hardening
76 files · 8,417+ · 380-

MCP server for terminal control

3 files changed
  • __init__.py MCP package init (7 lines)
  • cli.py CLI entry point for the MCP server (58 lines)
  • server.py Full MCP server exposing terminal hijack operations as MCP tools (332 lines)
  • src/provide/terminal/mcp/server.py (332 lines): full MCP server exposing terminal hijack operations as MCP tools. interface behavioral
    3 files
    • server.py
    • cli.py
    • __init__.py

HijackClient REST client and MCP tool bindings

3 files changed
  • __init__.py Client package init
  • hijack.py Typed REST client for the hijack control plane (333 lines)
  • mcp_tools.py Generic MCP tool bindings wrapping the REST client (137 lines)
  • src/provide/terminal/client/hijack.py (333 lines): typed REST client for the hijack control plane. src/provide/terminal/client/mcp_tools.py (137 lines): generic MCP tool bindings wrapping the REST client. interface behavioral
    2 files
    • hijack.py
    • mcp_tools.py

WebSocket connector for the server-side connection registry

3 files changed
  • __init__.py Connectors package init
  • websocket.py New WebSocket connector for the server-side connection registry (174 lines)
  • io.py I/O module additions
  • src/provide/terminal/server/connectors/websocket.py (174 lines): new WebSocket connector for the server-side connection registry. interface behavioral
    2 files
    • websocket.py
    • __init__.py

Auth hardening with scoped bearer tokens and CF page-level JWT

5 files changed
  • auth.py Scoped worker bearer tokens and JWT extraction logic
  • app.py App-level auth wiring for page-level JWT
  • config.py Cloudflare auth config
  • session_runtime.py Durable Object session runtime with auth
  • entry.py Cloudflare entry point with auth enforcement
  • Worker-scoped bearer tokens instead of global tokens. Cloudflare page-level JWT for browser sessions. harden behavioral
    3 files
    • auth.py
    • app.py
    • entry.py

API walkthrough script

1 file changed
  • walkthrough.py End-to-end walkthrough script exercising the full REST API lifecycle (433 lines)
  • scripts/walkthrough.py (433 lines): end-to-end walkthrough script exercising the full REST API lifecycle — start, connect, hijack, send commands, disconnect. specify behavioral
    1 file
    • walkthrough.py

Test suites for new client, MCP, and server components

12 files changed
  • __init__.py Client tests package
  • test_hijack_client.py HijackClient tests (533 lines)
  • test_mcp_tools.py MCP tools tests (189 lines)
  • __init__.py MCP tests package
  • test_mcp_regression.py MCP regression tests
  • test_mcp_server.py MCP server tests
  • test_connectors_websocket.py WebSocket connector tests (315 lines)
  • test_auth.py Auth server tests
  • test_coverage3.py Additional coverage tests
  • test_security_late.py Late-binding security tests (84 lines)
  • test_io.py I/O module tests (407 lines)
  • test_routes_coverage.py Hijack routes coverage tests
  • tests/client/test_hijack_client.py (533 lines), tests/client/test_mcp_tools.py (189 lines). tests/mcp/test_mcp_server.py, tests/server/test_connectors_websocket.py (315 lines), tests/server/test_security_late.py (84 lines), tests/test_io.py (407 lines). qualify internal
    6 files
    • test_hijack_client.py
    • test_mcp_tools.py
    • test_mcp_server.py
    • test_connectors_websocket.py
    • test_security_late.py
    • test_io.py

CI, tooling, and Cloudflare infrastructure updates

14 files changed
  • ci.yml CI workflow updates
  • deploy-cf.yml Cloudflare deployment workflow
  • .pre-commit-config.yaml Pre-commit config updates
  • max-loc-baseline.json LOC baseline updated
  • release-governance.md Release governance documentation
  • release_governance_check.sh Release governance check script
  • verify_package_artifacts.py Package artifacts verification script
  • conftest.py Cloudflare tests conftest
  • test_alarm.py Alarm tests
  • test_auth_jwt.py Auth JWT tests
  • test_security_hardening.py Security hardening tests
  • test_session_runtime_unit.py Session runtime unit tests
  • app-header.ts App header TS source
  • terminal.ts Terminal TS source
  • CI workflow updates, Cloudflare deploy workflow added, pre-commit config updated, release governance documentation and check script added. baseline internal
    5 files
    • ci.yml
    • deploy-cf.yml
    • .pre-commit-config.yaml
    • release-governance.md
    • release_governance_check.sh