mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-21 16:02:20 +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`.
35 lines
1.7 KiB
Bash
Executable File
35 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
# Usage: stamp-version.sh <version>
|
|
# Rewrite the package version in Cargo.toml. Used by the nightly workflow, where
|
|
# every versioned artifact — the binary's CARGO_PKG_VERSION, asset names, the DMG
|
|
# plist, the Inno installer — reads Cargo.toml, so this one edit covers them all.
|
|
# Cargo.lock is left alone: cargo refreshes the root package's own lock entry
|
|
# automatically, without network access.
|
|
#
|
|
# Extracted from the inline step so nightly's several build jobs stamp
|
|
# identically, and so the guard below has exactly one home.
|
|
set -euo pipefail
|
|
|
|
VERSION="$1"
|
|
|
|
awk -v ver="$VERSION" '!done && /^version = /{ $0 = "version = \"" ver "\""; done = 1 } { print }' \
|
|
Cargo.toml > Cargo.toml.tmp
|
|
mv Cargo.toml.tmp Cargo.toml
|
|
|
|
# Fail loudly if the substitution missed. Without this the awk is a silent no-op
|
|
# whenever Cargo.toml's shape changes — e.g. if the root manifest ever becomes a
|
|
# virtual workspace whose members carry `version.workspace = true`, in which case
|
|
# the version to stamp moves to `[workspace.package]`. A nightly that quietly
|
|
# publishes assets named after the *last stable* version is far worse than one
|
|
# that fails here.
|
|
if ! grep -qx "version = \"$VERSION\"" Cargo.toml; then
|
|
echo "::error::stamp-version.sh did not stamp $VERSION into Cargo.toml — the manifest's version line is not where this script expects it"
|
|
exit 1
|
|
fi
|
|
|
|
# Report the line actually stamped, not the first thing that looks like a
|
|
# version: post-crate-split the root package carries `version.workspace = true`
|
|
# and the real value lives further down under [workspace.package], so a naive
|
|
# `grep -m1 '^version'` prints the inherit marker and tells you nothing.
|
|
grep -n "^version = \"$VERSION\"" Cargo.toml
|