Skip to content

feat(runtime-host): add SSH and explicit plaintext transports - #2925

Merged
M4n5ter merged 8 commits into
mainfrom
feat/runtime-host-ssh-plaintext-onboarding
Aug 12, 2026
Merged

M4n5ter merged 8 commits into
mainfrom
feat/runtime-host-ssh-plaintext-onboarding

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 12, 2026 •

Copy link
Copy Markdown
Member
English

Summary

Adds SSH and explicitly enabled plaintext connections for remote Runtime Hosts.

  • SSH uses the system OpenSSH client, supports first-connect prompts in Desktop and TUI, and returns to batch mode for background reconnects
  • Plaintext requires independent Host opt-in and a persisted Client acknowledgement; no transport downgrades automatically
  • Desktop and CLI can create transport-specific Profiles while preserving the existing reconnect, credential, Project, and Host-path boundaries

Refs #2522

Verification

  • Runtime Host and CLI full test suites passed
  • Desktop owner, Profile, SSH terminal, and reconnect tests passed
  • Runtime Host and Desktop main/preload/renderer type checks passed
  • Desktop renderer production build passed
  • A real Desktop-to-remote-Host SSH connection and reconnect were verified; evidence is attached in the PR discussion

Repository-wide typecheck remains blocked by the unchanged packages/ui settledText mismatch.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally — affected checks pass; the unrelated repository baseline failure is noted above

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No
中文

摘要

为 Remote Runtime Host 增加 SSH 和显式启用的明文连接。

  • SSH 使用系统 OpenSSH;Desktop 与 TUI 支持首次连接交互,后台重连使用 batch mode
  • 明文连接要求 Host 独立启用,并由 Client 持久确认风险;任何 transport 都不会自动降级
  • Desktop 与 CLI 可以创建不同 transport 的 Profile,同时保留现有重连、credential、Project 与 Host-path 边界

关联 #2522

验证

  • Runtime Host 与 CLI 全量测试通过
  • Desktop owner、Profile、SSH terminal 与 reconnect 测试通过
  • Runtime Host 与 Desktop main/preload/renderer 类型检查通过
  • Desktop renderer production build 通过
  • 已验证真实 Desktop 通过 SSH 连接 Remote Host 并在断线后重连;证据见 PR 讨论

仓库级 typecheck 仍被未改动的 packages/ui settledText 类型错误阻断。

检查项

  • 测试覆盖本次行为,且会在缺少实现时失败
  • lint、format、typecheck 与受影响测试在本地通过——受影响检查已通过;无关的仓库基线失败见上文

这个 PR 是否改变行为?

  • 是——见上方摘要
  • 否

AI disclosure

OpenAI Codex made substantive contributions under M4n5ter's direction and review. M4n5ter approved the submitted changes.

@M4n5ter

M4n5ter commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

Desktop end-to-end evidence: the app is actively connected to the remote Runtime Host over SSH and lists the Project registered on that Host. The tunnel was then terminated manually; Desktop reconnected with a fresh batch SSH process and removed it on exit.
clipboard

@M4n5ter
M4n5ter force-pushed the feat/runtime-host-ssh-plaintext-onboarding branch from 29a5526 to 328ce18 Compare August 12, 2026 16:02
Remote onboarding needs a secure path for machines already reachable over SSH and an explicit escape hatch for isolated networks. Keep each tunnel connection-scoped under the existing reconnect lifecycle, and require independent Host and Client consent before allowing plaintext WebSockets.\n\nGenerated-by: OpenAI Codex
Trust tunnel readiness only after the owned OpenSSH process confirms its loopback listener, preventing unrelated local listeners from receiving Runtime Host credentials. Keep Desktop SSH prompts recoverable across renderer navigation and use terminal interaction for selected SSH profiles after restart.\n\nGenerated-by: Codex
Make interactive SSH available during Desktop cold start and order terminal snapshots and events with one main-process revision. Preserve canonical request interruption semantics when the tunnel exits, and keep cancelled prompts dismissed despite late PTY output.

Generated-by: Codex
Ask the operating system for an available loopback port instead of guessing inside the dynamic range. Retry only when OpenSSH confirms a local bind conflict, so authentication and host verification failures remain single-attempt errors.

Generated-by: Codex
Reject inherited OpenSSH forwarding while preserving normal aliases and authentication configuration. Keep startup diagnostics available until their owner closes them, and cancel the escalation timer when the SSH child exits.

Generated-by: Codex
Mount only the SSH terminal while a cold-start Host connection is interactive, then start the full application after the Host is ready. Force OpenSSH forwarding to remain enabled for Maka's explicit tunnel while inherited forwards are inspected and rejected.

Generated-by: Codex
Keep the terminal-only cold-start surface inside the same Maka and Astryx locale boundaries required by its dialog, so interactive SSH can render before the full application mounts.

Generated-by: Codex
@M4n5ter
M4n5ter force-pushed the feat/runtime-host-ssh-plaintext-onboarding branch from 328ce18 to 41be521 Compare August 12, 2026 17:31
@M4n5ter
M4n5ter marked this pull request as ready for review August 12, 2026 23:23
Keep the security and lifecycle regressions while sharing repeated SSH test setup. Tighten the remote access guide and remove a redundant decoder assertion so the change remains focused.

Generated-by: Codex
@M4n5ter

M4n5ter commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

I have reviewed and approved the current contents of this PR. It is not expected to affect any existing supported usage: remote Runtime Host was not previously usable end to end, and this PR only completes that remote connection path.

@M4n5ter
M4n5ter merged commit fe154d9 into main Aug 12, 2026
10 of 11 checks passed
@M4n5ter
M4n5ter deleted the feat/runtime-host-ssh-plaintext-onboarding branch August 12, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant