|
| 1 | +# Remote tmux discovery over SSH (future) |
| 2 | + |
| 3 | +## Goal |
| 4 | +- Support optional discovery of remote tmux sessions over SSH for workflows that run terminals such as Ghostty or iTerm2 while hopping across machines. |
| 5 | + |
| 6 | +## Why |
| 7 | +- Local tmux-only discovery misses sessions on remote hosts reached through SSH. |
| 8 | +- Operators need one place to see candidate tmux targets without manually checking each host. |
| 9 | + |
| 10 | +## Scope (proposed) |
| 11 | +- Add opt-in remote scan capability (disabled by default). |
| 12 | +- Discover tmux sessions/windows/panes on selected hosts only. |
| 13 | +- Merge remote results with local discovery output while preserving host identity. |
| 14 | + |
| 15 | +## Config ideas |
| 16 | +- `remote_scan.enabled` (bool; default `false`) |
| 17 | +- `remote_scan.hosts` (allowlist of hosts) |
| 18 | +- `remote_scan.exclude_hosts` (denylist override) |
| 19 | +- `remote_scan.interval_seconds` (scan cadence) |
| 20 | +- `remote_scan.timeout_seconds` (per-host timeout) |
| 21 | +- `remote_scan.max_concurrency` (parallel SSH fanout limit) |
| 22 | +- `remote_scan.hosts[].enabled` (per-host on/off) |
| 23 | +- `remote_scan.hosts[].ssh_user` / `remote_scan.hosts[].ssh_port` |
| 24 | + |
| 25 | +## Safety and cost controls |
| 26 | +- Keep scans off unless explicitly enabled. |
| 27 | +- Use non-interactive SSH defaults (`BatchMode=yes`) to avoid hangs. |
| 28 | +- Bound time and concurrency to reduce network/host load. |
| 29 | +- Log per-host latency/failures for observability. |
| 30 | + |
| 31 | +## UX notes |
| 32 | +- Show discovered targets with host prefix (for example `host-a:session.window.pane`). |
| 33 | +- Provide clear indicators for unreachable hosts and skipped hosts. |
| 34 | +- Offer command flags to temporarily disable remote scanning even when configured. |
| 35 | + |
| 36 | +## Non-goals (initial) |
| 37 | +- Automatic host discovery across the entire network. |
| 38 | +- Credential provisioning/secret management beyond standard SSH setup. |
| 39 | + |
| 40 | +## Acceptance criteria (future implementation) |
| 41 | +- Remote scanning can be enabled/disabled globally and per host. |
| 42 | +- Only allowlisted hosts are scanned. |
| 43 | +- Discovery remains responsive under timeout/concurrency caps. |
| 44 | +- Tests cover config parsing, host filtering, and failure/timeouts. |
0 commit comments