agent: add CLI session shim and remote install/repair with Tailscale#139
Open
AndreyMay wants to merge 1 commit intomodem-dev:mainfrom
Open
agent: add CLI session shim and remote install/repair with Tailscale#139AndreyMay wants to merge 1 commit intomodem-dev:mainfrom
AndreyMay wants to merge 1 commit intomodem-dev:mainfrom
Conversation
Greptile SummaryThis PR delivers CLI-backed dev-agent support and remote install/repair workflows, enabling control-agent to spawn ephemeral dev agents using Claude Code or Codex CLIs instead of only the pi runtime. Major changes include CLI session shim providing Unix socket RPC compatibility, remote operations module with checkpointed workflows for Hetzner and existing hosts, optional Tailscale integration, control-agent scripts for CLI backend lifecycle, and comprehensive test coverage with 500+ new test lines. Implementation uses curl with bash pattern for remote bootstrap (hardcoded to trusted sources), SSH with StrictHostKeyChecking accept-new for automated provisioning, and state files stored with restrictive permissions. Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[baudbot remote install] --> B{Mode?}
B -->|hetzner| C[Provision Hetzner Server]
B -->|host| D[Use Existing Host]
C --> E[Create SSH Key]
D --> E
E --> F[Wait SSH Reachable]
F --> G[Run Bootstrap Script]
G --> H[Run baudbot install]
H --> I[Run Doctor Check]
I --> J{Tailscale?}
J -->|enabled| K[Install Tailscale]
K --> L[Tailscale Up]
L --> M[Wait for Running State]
J -->|skip| N[Mark Complete]
M --> N
N --> O[Save Checkpoint]
P[control-agent] --> Q[Spawn CLI Dev Agent]
Q --> R[Launch tmux Session]
R --> S[Start CLI Session Shim]
S --> T[Create Unix Socket]
P --> U[send_to_session RPC]
U --> T
T --> V[Forward to tmux via send-keys]
V --> W[CLI Agent Processes]
W --> X[Capture tmux Output]
X --> Y[Return via turn_end Event]
Y --> P
Last reviewed commit: 216220d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This PR delivers two major operator/runtime improvements:
send_to_session/list_sessionssemantics.baudbot remotemodule for checkpointed remote install/repair workflows (Hetzner + existing hosts), including optional Tailscale setup for secure instance access.Included changes
CLI dev-agent parity layer
pi/extensions/cli-session-shim.mjspi/skills/control-agent/scripts/pi/skills/dev-agent-cli/Remote operations module
baudbot remotecommand wired throughbin/baudbotbin/remote.shbin/lib/remote-common.shbin/lib/remote-ssh.shbin/lib/remote-hetzner.sh~/.baudbot/remote/targets/<target>.jsontailscale_connected--tailscale,--no-tailscale,--tailscale-auth-keyTest coverage and docs
README.md,docs/operations.md,CONFIGURATION.mdChecklist
npm test)npm run lint)bin/security-audit.sh --deep) — if touching security code