Skip to content

Add Teleport servers that connect through tsh - #11

Open
giraypultar wants to merge 3 commits into
veithly:devfrom
giraypultar:teleport-tsh-servers
Open

giraypultar wants to merge 3 commits into
veithly:devfrom
giraypultar:teleport-tsh-servers

Conversation

@giraypultar

Copy link
Copy Markdown

Depends on #10 (this branch contains the CLI server add/delete commit from #10; once #10 merges this PR will show only the Teleport commits).

Saved servers can now be SSH or Teleport. Teleport sessions spawn tsh ssh as the PTY, file/exec operations wrap tsh scp/tsh ssh, and import reads tsh status plus tsh ls.

  • CLI add/import and the GUI Add/Edit dialogs accept a required proxy; login/MFA stays with tsh login
  • New src-tauri/src/teleport module wrapping tsh for shell, file and exec operations
  • Storage schema/sync updated for the new server type; OpenSSH/PuTTY/Tabby importers updated accordingly
  • Follow-up commit quotes remote ls paths and passes tsh argument slices by reference so vibeshell-desktop links

Headless installs can now register servers with `vibeshell servers add
user@host[:port]` and remove them with `vibeshell servers delete`, without
opening the desktop UI. Optional flags cover the Add Server dialog fields
(jump host, agent forwarding, post-login command, group, tags). Passwords
come from SSH_PASSWORD or VIBESHELL_PASSWORD; keys from --identity.
Saved servers can be SSH or Teleport. Teleport sessions spawn `tsh ssh` as
the PTY, file/exec operations wrap `tsh scp`/`tsh ssh`, and import reads
`tsh status` plus `tsh ls`. CLI add/import and the GUI Add/Edit dialogs
accept a required proxy; login/MFA stays with `tsh login`.
Quote remote ls paths and pass tsh argument slices by reference so
vibeshell-desktop links.
@veithly
veithly changed the base branch from master to dev September 18, 2026 03:30

@veithly veithly left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Teleport integration is a worthwhile direction. This PR is stacked on #10 and now targets dev, but the current transport implementation changes several safety contracts, so it is not included in 1.1.0 yet. Please resolve #10 first and rebase this work onto the current shared-session architecture.

Blocking items from the current diff:

  1. Bound tsh process execution, cancellation and captured output. Synchronous Command.output() has no timeout/output cap, and writing all stdin before draining stdout/stderr can deadlock. Use concurrently drained bounded streams and propagate actual process failure.
  2. Preserve file-operation contracts. The cat-based write/create paths must honor overwrite=false with exclusive creation; they must not overwrite an existing destination silently.
  3. Preserve binary-read and directory semantics. The binary response needs the expected encoding and real size/truncation fields, not lossy text with binary=true and size=0. The ls fallback trims valid filenames and labels directories as files; either implement a lossless compatible protocol or return an explicit unsupported error.
  4. Do not implement directory Sync as unconditional recursive scp while ignoring excluded paths, nested gitignore rules and delete_extra. The returned transfer counts/bytes must reflect actual work rather than fixed success placeholders. Unsupported sync modes should fail clearly until implemented.
  5. Drive session connected/disconnected state from verified connection/process lifecycle rather than spawn success or fixed sleeps. Integrate owner-process routing, quick exec/plugin paths and teardown, with tests for authentication failure, EOF and cancellation.

Please add transport-level regression fixtures for overwrite protection, binary data, Unicode/whitespace paths, ignored-file retention and process I/O limits. Existing tests are valuable, but they do not establish these transport guarantees. I am requesting changes rather than merging or closing the contribution.

@veithly

veithly commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Re-reviewed on 2026-09-29 at b81e609. There are no new commits since the previous review, the branch still includes #10, and it conflicts with current dev. The earlier process-I/O, lifecycle, binary/file overwrite and sync-contract blockers remain; no merge is being performed.

A smaller first revision focused on authenticated session lifecycle, ownership and explicitly reported transport capabilities would be easier to validate. Use concurrent bounded process I/O with timeout/cancellation, and drive connection state from actual authentication/EOF rather than spawn success or sleeps. File/sync operations may return an explicit unsupported error until they satisfy the normal contracts; lossy text, trimmed ls output and recursive scp are not substitutes for those contracts.

#17 adds a concrete implementation/test plan in docs/ISSUE_TRIAGE_2026-09.md. Resolve #10 first, then cover GUI/daemon ownership, quick/plugin exec, auth failure, EOF, cancellation, binary bytes, whitespace/Unicode paths, overwrite refusal and ignored-file retention. This remains open with changes requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants