Skip to content

Add worker-backed tmux to a-Shell mini - #1134

Open
demrom wants to merge 30 commits into
holzschu:masterfrom
demrom:feature/tmux-local
Open

demrom wants to merge 30 commits into
holzschu:masterfrom
demrom:feature/tmux-local

Conversation

@demrom

@demrom demrom commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Depends on #1090, which includes #1089. This PR's own changes are 04db79a (nested-worker requests and shared-container admission) and 0c59f8d (tmux). After #1090 lands, I rebase this branch so the diff contains only those changes.

Run tmux new -s t in the mini app to create local shell panes. This embeds tmux 3.8 with libevent 2.1.13 and uses the shell worker pool for its server, clients and pane commands. Detaching leaves sessions running. They end when their last pane exits, kill-server runs or the app terminates. The port uses ios_system logical terminals and the existing shared App Group for Unix sockets.

The build recipe verifies the official source archives and produces device and arm64 Simulator frameworks; build and package them before opening the mini target in Xcode. The mini target embeds the host, engine and acceptance frameworks and registers tmux, tmux-native and tmux-acceptance. The public CLI fixture checks three panes, pipelines, ordinary Vim, resize, detach/reattach, respawn, interruption and repeated invocation.

The qualification build omits unavailable baseline embeds, including blink and Python. Before the respawn and host-argument fixes, the 10-worker Simulator build passed the full three-pane fixture, Vim, resize, detach/reattach, interruption, socket checks and 20 repeated command rounds with no descriptor growth. The earlier three-worker Simulator run passed one pane, detach/reattach, resize, kill-server and a clear error when a fourth worker was requested. On the final device build with three workers, startup, a pane command, detach/reattach, resize to 111x43, kill-server, a clear fourth-worker capacity error and an ordinary command afterward passed. Twelve live-pane respawns and 20 attach/detach cycles with a concurrent host command producer also passed, with no duplicated arguments. Start new tmux servers from an app terminal; commands running inside tmux or Herdr panes can attach to an existing server but cannot start one.

Runtime dependencies include ios_system#201, ios_system#202, the native lifecycle and worker ownership changes, the command-environment snapshot fix, and the Dash socket/foreground-input and login-profile changes. Background jobs, daemonization and arbitrary POSIX processes remain unsupported.

Refs #125, #781.

demrom added 23 commits October 18, 2026 19:33
…Settings

The host runs min(worker_limit setting, hw.physicalcpu, bundled ShellWorkerCount) workers at once and returns ENOSPC beyond that. ShellWorkers/generate-targets.sh (POSIX sh and awk, like the other scripts of the repo) keeps the extension targets and the Settings list in line with ShellWorkerCount. The new Settings strings are localized in the existing Root.strings files. tests/worker-pool.m gains a limit check.
@demrom
demrom marked this pull request as ready for review October 26, 2026 06:46
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.

1 participant