Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Multiplex — a spatial SSH terminal built around remote **tmux** (with herdr
as an optional second backend); visionOS-first, iPadOS alongside. The deck is
as an optional second backend, and Rex sessions shown, attached and created);
visionOS-first, iPadOS alongside. The deck is
a fleet-wide monitor wall: every host probes concurrently, every session
renders as a live capture-pane tile, and each attach opens its own terminal
window (a scene on visionOS / Stage Manager on iPad). Product tour:
Expand Down Expand Up @@ -62,10 +63,12 @@ One UIKit scene runtime (`MultiplexSceneDelegate` +
ornament API needs a View): a classic Deck window + N terminal windows, or
one adaptive single-window Shell. A terminal window is ordered tabs, each a
`TerminalRoute`; `TerminalWorkspace` owns the tab controllers so merge/split
move live shells. `ConnectionHub` runs one probe connection per host (one
exec round-trip per monitored backend, ~5 s); `TerminalFocusArbiter` is the
app-wide single owner of keyboard focus; hosts + secrets sync via iCloud
Keychain. Full annotated component map: `docs/agents/architecture.md`.
move live shells. A tab is one emulator, except on a backend that hands its
panes out one stream each (Rex): that tab draws the panes itself.
`ConnectionHub` runs one probe connection per host (one exec round-trip per
monitored backend, ~5 s); `TerminalFocusArbiter` is the app-wide single
owner of keyboard focus; hosts + secrets sync via iCloud Keychain. Full
annotated component map: `docs/agents/architecture.md`.

Layer rule: **Views → Services → Models**; Models have no UIKit/SwiftTerm
imports. `TmuxProbe`, `TerminalRoute`, and the models are pure and are where
Expand All @@ -89,12 +92,15 @@ approaches. Don't re-litigate a recorded decision without new facts.
and tab moves, keyboard avoidance, secret fields, held-backspace filler.
- `links-and-viewers.md` — link/path confirmation, ⌗ viewport, ▤ file viewer.
- `backends-and-probe.md` — tmux invocation facts, mixed tmux+herdr hosts,
the herdr adaptation, session creation (setup scripts, per-host tmux conf,
systemd-run), file attach/drop.
the herdr adaptation, the Rex adaptation (probe, attach, panes, mint), session creation
(setup scripts, per-host tmux conf, systemd-run), file attach/drop.
- `agent-helpers.md` — CLI-agent detection, helper chips, launch model
override, keychain-locked tip, HISTORY/jump.
- `lifecycle-and-attention.md` — disabled hosts, session resume, keep screen on, background
keep-alive + `BGAppRefreshTask`, attention alerts and notification rules.
- `panes.md` — native panes: the pane tree, the paned transport seam, one
emulator per pane, focus and keyboard rules, what a second backend (tmux
control mode, herdr) would have to do.
- `mosh.md` — the clean-room mosh transport.
- `bind-host.md` — Bind Host flow + `mpx` CLI distribution.
- `sync-and-widgets.md` — iCloud Keychain sync, widgets/Shortcuts/external
Expand Down
17 changes: 13 additions & 4 deletions Multiplex/Design/Chassis.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,20 @@ enum UIKitChassis {
}
/// `bezel` for a session tile, tinted when the tile has to say which
/// multiplexer it came from. Only a MIXED host reaches the tinted branch
/// — see `TallyPalette.herdrBezel`.
/// — see `TallyPalette.herdrBezel`. tmux keeps the plain bezel: it is
/// the tile every other backend is told apart from.
static func tileBezel(backend: Host.SessionBackend, tinted: Bool) -> UIColor {
guard tinted, backend == .herdr else { return bezel }
return GlassPrototype.enabled
? GlassPrototype.herdrStrata : TallyPalette.herdrBezel
guard tinted else { return bezel }
switch backend {
case .tmux:
return bezel
case .herdr:
return GlassPrototype.enabled
? GlassPrototype.herdrStrata : TallyPalette.herdrBezel
case .rex:
return GlassPrototype.enabled
? GlassPrototype.rexStrata : TallyPalette.rexBezel
}
}
static var bezelHi: UIColor {
GlassPrototype.enabled ? GlassPrototype.line : TallyPalette.bezelHi
Expand Down
8 changes: 8 additions & 0 deletions Multiplex/Design/GlassPrototype.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ enum GlassPrototype {
static let herdrStrataMaterial = UIColor(
red: 203 / 255, green: 166 / 255, blue: 247 / 255, alpha: 0.10
)
/// The strata step in Rex's cool blue (`TallyPalette.rexBezel` carries
/// the rationale) — the same one-step lift as the mauve above.
static let rexStrataMaterial = UIColor(
red: 137 / 255, green: 196 / 255, blue: 255 / 255, alpha: 0.09
)
/// Hairlines and resting borders (replaces `bezelHi`).
static let lineMaterial = UIColor(white: 1, alpha: 0.11)
/// Active borders (lit spine segment, active tab). Part of the frozen
Expand Down Expand Up @@ -116,6 +121,9 @@ enum GlassPrototype {
static let herdrStrata = material(
herdrStrataMaterial, fallback: TallyPalette.herdrBezel
)
static let rexStrata = material(
rexStrataMaterial, fallback: TallyPalette.rexBezel
)
static let line = material(lineMaterial, fallback: TallyPalette.bezelHi)
static let lineHi = material(lineHiMaterial, fallback: TallyPalette.bezelHi)
static let screenGlass = material(screenGlassMaterial, fallback: TallyPalette.screen)
Expand Down
8 changes: 8 additions & 0 deletions Multiplex/Design/Theme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ enum TallyPalette {
/// which is also what pins the blue > red > green ordering that makes it
/// violet rather than merely cool).
static let herdrBezel = UIColor(light: 0xF6F0FF, dark: 0x2C2833)
/// `bezel` for a Rex tile, under the same gate and the same rule: a
/// different TINT at `bezel`'s own lightness (within 1/255 in both
/// polarities), never a raised tile. Rex publishes no palette to borrow,
/// so the hue is chosen for the one job it has — to be unmistakable
/// beside tmux's neutral bezel and herdr's mauve. A cool blue: blue over
/// green over red, where mauve runs blue over red over green
/// (`testTheRexWashMatchesBezelsLightnessAndIsNotMauve` pins both).
static let rexBezel = UIColor(light: 0xEAF4FF, dark: 0x1F2A33)

static let tally = UIColor(light: 0xC13439, dark: 0xE5484D)
static let caution = UIColor(light: 0x966618, dark: 0xE0A33E)
Expand Down
Loading
Loading