You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a native Windows PtyBridge backend using pywinpty/ConPTY while keeping the existing byte-oriented bridge API stable.
Keep POSIX on ptyprocess and move POSIX-only imports behind POSIX code paths.
Update dashboard /api/pty unavailable copy, AGENTS guidance, and targeted PTY/WebSocket tests for Windows.
Root Cause
The dashboard chat PTY bridge was hardcoded as POSIX-only, so native Windows dashboard /chat refused with WSL guidance even though pywinpty is already declared for Windows installs.
Restarted native Windows dashboard on 127.0.0.1:9119; /chat HTML did not contain the old WSL refusal, and /api/pty returned real Hermes TUI ANSI frames over ConPTY with no Chat unavailable banner.
Note
On this Windows checkout, the exact bare pytest command from repo config fails before tests run because pyproject.toml sets --timeout-method=signal, and Windows lacks SIGALRM. The same targets pass with --timeout-method=thread.
Hi @Cosmic-Construct — thanks for taking a swing at this. We're going with #42251 instead because it keeps hermes_cli/pty_bridge.py POSIX-only and puts the ConPTY logic in a sibling win_pty_bridge.py module — that way the public surface /api/pty consumes (spawn / read / write / resize / close / is_available / PtyUnavailableError) is mirrored on both platforms and the POSIX path doesn't grow if sys.platform == "win32" branches. Live-tested on Windows 11 with pywinpty 2.0.15. Closing this in favor of #42251; appreciate the push to get Windows working.
hermes_cli/web_server.py:14175-14193 selects WinPtyBridge on native Windows while retaining the POSIX bridge separately.
hermes_cli/win_pty_bridge.py:57-173 provides the pywinpty/ConPTY spawn, I/O, resize, and teardown implementation.
tests/hermes_cli/test_web_server_pty_import.py:38-60 and tests/hermes_cli/test_win_pty_bridge.py:83-315 cover platform selection and the Windows bridge behavior.
This is an automated hermes-sweeper review. The maintainer discussion already identified #42251 as the preferred sibling-module implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PtyBridgebackend usingpywinpty/ConPTY while keeping the existing byte-oriented bridge API stable.ptyprocessand move POSIX-only imports behind POSIX code paths./api/ptyunavailable copy, AGENTS guidance, and targeted PTY/WebSocket tests for Windows.Root Cause
The dashboard chat PTY bridge was hardcoded as POSIX-only, so native Windows dashboard
/chatrefused with WSL guidance even thoughpywinptyis already declared for Windows installs.Validation
venv\Scripts\python.exe -m pytest tests\hermes_cli\test_pty_bridge.py --timeout-method=thread-> 9 passed, 11 skippedvenv\Scripts\python.exe -m pytest tests\hermes_cli\test_web_server.py::TestPtyWebSocket --timeout-method=thread-> 12 passed, 1 skippedvenv\Scripts\python.exe -m ruff check hermes_cli\pty_bridge.py hermes_cli\web_server.py tests\hermes_cli\test_pty_bridge.py tests\hermes_cli\test_web_server.py-> passed127.0.0.1:9119;/chatHTML did not contain the old WSL refusal, and/api/ptyreturned real Hermes TUI ANSI frames over ConPTY with noChat unavailablebanner.Note
On this Windows checkout, the exact bare pytest command from repo config fails before tests run because
pyproject.tomlsets--timeout-method=signal, and Windows lacksSIGALRM. The same targets pass with--timeout-method=thread.