feat: make tmux-orchestrate work over SSH and forwarded sockets #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/tmux-orchestrate-ssh"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
When pi runs as
tmux -> ssh -> pi,$TMUXis not set on the remote host, sotmux-orchestratepreviously stopped with "not inside tmux". There is no tmuxserver on the remote side to control either.
Solution
The skill now detects the topology and works in three modes:
$TMUXpoints at a live server (local tmux, or a remote tmux youare already inside). Behaviour is unchanged: children are windows next to the
parent.
RemoteForward. The remote agent controls the local tmux over the existingconnection, so children are local windows that
sshback to the current hostand keep working in the remote repository. Completion is signalled through a
marker file, because the child has no bridge.
in a private
tmux -L pi-XXXXserver here; the skill prints the attachcommand so the user can watch, and shuts the server down at the end.
A per-run wrapper (
~/.pi-tmux) pins-S/-L/ the default server, becauseexported variables do not survive between tool calls.
Other details:
pi-XXXXwindow namesare preserved; each child window is pinned with
automatic-rename offandallow-rename off.@N/%N.π - <cwd>pane title, which also travelsthrough ssh.
ClearAllForwardings=yesso they do notsteal the forwarded socket from the orchestrator.
kill-serveris allowed only for the private-Lserver created by theorchestration.
Testing
Validated locally with a socket relay: detection for all three modes, the
wrapper, window creation/rename/targeting, title readiness,
wait-for,new-session/kill-serverlifecycle of the private server, and the exactsnippets from the skill.
Reverting: this SSH design is not the desired approach.
Pull request closed