mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
Split the framework-free half of tty7 into `tty7-core` and add a headless
`tty7-server` built on it, so a workspace's filesystem, git and session state
can live on another machine while the GUI stays where it is.
- `crates/tty7-core`: wire protocol, session daemon, PTY, native SSH engine and
the domain model, with no gpui dependency. Module paths are unchanged.
- `crates/tty7-server`: the same daemon with no GUI attached, linked fully
static against musl and pushed onto the remote box. One dependency, on
purpose — a second one the GUI also needs belongs in core.
- `Host` trait + `HostId`/`HostRegistry`: every fs/git/watch call a workspace
makes goes through the machine it belongs to. `LocalHost` answers on this
box, `RemoteHost` over a routed control connection.
- `ui::host_ops`: the GUI's single door to a `Host`. Host calls block, so all
of them run on the background executor with the result landed on the UI
thread; de-duplication, staleness and error reporting live here rather than
at each call site. Enforced by a CI grep.
- Connect flow: home page → pick a configured SSH host → the machine's own
workspace list → a window bound to one workspace on it. Workspace switcher
groups by machine, this computer included.
- CI: static musl builds of `tty7-server` for x86_64/aarch64 via
cargo-zigbuild, a host-boundary grep, and version stamping factored out of
the nightly workflow. Both new jobs are non-required so branch protection
does not wedge open PRs.
Design and the interface contract it was built to are in
`docs/2026-07-27-remote-workspace-{design,impl-contract}.md`.
16 lines
756 B
Rust
16 lines
756 B
Rust
//! The persistent terminal daemon, as the GUI sees it.
|
|
//!
|
|
//! The daemon itself — PTY ownership, replay rings, fan-out, the wire protocol,
|
|
//! the native SSH engine — moved wholesale into `tty7-core` when the headless
|
|
//! `tty7-server` needed to run exactly the same code on a machine with no
|
|
//! display. Nothing about it was GUI-shaped to begin with (it has never
|
|
//! referenced gpui, `terminal`, or `ui`), so the move was a relocation, not a
|
|
//! rewrite.
|
|
//!
|
|
//! This re-export keeps the GUI's call sites reading `crate::daemon::protocol`,
|
|
//! `crate::daemon::spawn::ensure_running`, and so on, exactly as before. The
|
|
//! client-side terminal that talks the protocol is still
|
|
//! `terminal::remote::RemoteTerminal`.
|
|
|
|
pub use tty7_core::daemon::*;
|