Add Mosh support for terminal connections#2
Open
danielaustralia1 wants to merge 1 commit into
Open
Conversation
Mosh keeps the terminal tab alive through network changes, IP roaming, and sleep/wake — useful when connecting to a home inference machine from a laptop on the go. All other app features (files, sessions, skills, discovery) continue to use SSH as before. - ConnectionProfile gains prefersMosh: Bool (default false, backward-compatible) - MoshSupport utility detects mosh binary at common Homebrew paths and via `which` - SSHTransport.moshArguments() builds mosh invocation, routing custom port via --ssh flag - TerminalSession selects executable and arguments at init based on prefersMosh and mosh availability - TerminalViewHost uses session.executablePath and session.terminalArguments instead of hardcoded /usr/bin/ssh - ConnectionEditorSheet gains a Terminal panel with a Mosh toggle; shows a Homebrew install hint when mosh is not found Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
|
I’m going to hold off on merging it for now, mostly for product-direction reasons rather than because the idea is bad. Hermes Desktop is intentionally built around a single direct SSH connection model, and I want to be careful about adding a second transport story just for the terminal while everything else remains SSH-based. That keeps the app simpler to reason about, document, and support. So I’d like to leave this open while I think more about whether Mosh belongs in the product at all. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
moshisn't found on the MacUse case
Connecting to a home PC running inference from a laptop that moves between networks. SSH terminal sessions drop on every network change; Mosh reconnects transparently.
Changes
Models/ConnectionProfile.swiftprefersMosh: Bool = false— optional, backward-compatible JSON decodeUtilities/MoshSupport.swiftmoshbinary at Homebrew paths and viawhichServices/SSH/SSHTransport.swiftmoshArguments(for:)— buildsmosh [--ssh=ssh -p N] user@hostServices/Terminal/TerminalSession.swiftprefersMoshand availabilityServices/Terminal/TerminalViewHost.swiftsession.executablePath/session.terminalArgumentsinstead of hardcoded/usr/bin/sshViews/Connections/ConnectionEditorSheet.swiftmoshnot foundRequirements
moshmust be installed on the Mac (brew install mosh)mosh-servermust be installed on the remote host (apt install mosh/brew install mosh)🤖 Generated with Claude Code