Local patches#3361
Conversation
…ersion In --dev mode connserver logs to stderr, which is merged into the same pipe the conn controller parses for the 'wsh version' line. Those [PID:...]-prefixed log lines can race ahead of the version line over SSH (stdout and stderr are delivered on independent channels), causing 'unexpected version format' and a failed connection. Skip dev-log lines until the real version line is read. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds a stdio upstream transport for the SSH conn controller, mirroring the mechanism the WSL path already uses (wshutil.HandleStdIOClient): the connserver RPC link is carried over the SSH session's stdin/stdout instead of a forwarded socket, so no listening socket/port is opened on the remote and the SSH channel itself is the auth boundary (no JWT exchange). A relay goroutine feeds the ConnMonitor on each line so health does not flip to 'degraded'. Selected via the RouterTransport setting (default stdio); the domain-socket path remains for the non-stdio case. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Local-only escape hatch: carry the connserver upstream RPC over a reverse-forwarded loopback TCP port instead of a Unix domain socket, selected with WAVETERM_ROUTER_TRANSPORT=tcp. Works around SSH servers that create the forwarded Unix socket with the wrong owner (e.g. Tailscale SSH creates it root:root 0600). stdio is the default and preferred transport; this is kept only as a fallback and is not intended for upstream. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add term_send_command tool that sends a shell command to an open terminal widget via ControllerInputCommand (the same PTY write path used by keystrokes). Requires user approval before execution. Optionally waits 2s and returns the first 50 lines of scrollback so the AI can report the result inline. Also enable the existing (commented-out) term_command_output tool which returns the output of the last completed command when shell integration is active. Replace the system prompt language that told the model it "cannot execute shell commands" (factually wrong with the new tool registered) with accurate capability description: use term_send_command when a terminal is open; ask the user to open one if not. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughThis PR introduces configurable upstream routing modes for connserver and enables AI-powered terminal command execution. On the connserver side, a new TCP router mode is added alongside the existing stdio mode, controlled by an environment variable and command-line flags. The TCP mode extracts a target address from a JWT token, establishes a TCP connection, performs RPC-based authentication, and forwards traffic through the connection. On the AI side, a new term_send_command tool allows the AI assistant to execute shell commands in open terminal widgets and fetch output, with updated system prompt guidance to prefer tool-based execution over manual copy-paste when terminals are available. Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
No description provided.