mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-16 13:00:39 -07:00
1.6 KiB
1.6 KiB
Milestone 3 Sub-plan: Connectivity & Persistence
1. Objective
Enable the "Teleport" experience by allowing users to securely connect to their remote workspaces with persistent terminal sessions.
2. Tasks
Task 3.1: SSH Tunneling Logic (IAP)
Implement the mechanism to securely tunnel SSH traffic through Google Identity-Aware Proxy.
- Implement
SSHServiceinpackages/core/src/services/sshService.ts. - Logic to execute
gcloud compute ssh --tunnel-through-iap. - Handle SSH key generation and OS Login checks.
Task 3.2: Workspace Connect Command
Implement the primary wsr connect <id> command.
- Add
workspace connectsubcommand topackages/cli/src/commands/workspace/connect.ts. - Logic to fetch instance details (name, zone) from the Hub before connecting.
- Pass necessary SSH flags (Agent Forwarding, Environment variables).
Task 3.3: Persistence Integration (shpool)
Ensure the remote session survives disconnects.
- Update
remoteCli.tsto wrap the shell inshpool attach. - Verify
shpooldaemon is running correctly via the container entrypoint. - Logic to handle terminal resizing across local/remote.
3. Verification & Success Criteria
- Connect:
gemini wsr connect [ID]successfully drops the user into a remote shell. - Persistence: User can disconnect (Ctrl+C or close terminal), reconnect, and find their previous state intact.
- Security: Connection only works for the workspace owner and requires a valid
gcloudsession.
4. Next Steps
- Implement Task 3.1: Create the
SSHServicein the core package.