fix(mac): keep remote control tunnel alive

This commit is contained in:
Peter Steinberger
2025-12-12 18:44:44 +00:00
parent 7d37195c1a
commit 8086c66ab8
2 changed files with 135 additions and 3 deletions

View File

@@ -289,9 +289,10 @@ actor PortGuardian {
let expectedCommands = ["node", "clawdis", "tsx", "pnpm", "bun"]
switch mode {
case .remote:
if port == 18788 {
return cmd.contains("ssh") && cmd.contains("18788")
}
// Remote mode expects an SSH tunnel for the gateway WebSocket port.
if port == 18789 { return cmd.contains("ssh") }
// WebChat assets may be served locally (Clawdis) or forwarded via an older SSH tunnel.
if port == 18788 { return cmd.contains("clawdis") || cmd.contains("ssh") }
return false
case .local:
return expectedCommands.contains { cmd.contains($0) }