Skip to content

v0.0.2

Choose a tag to compare

@github-actions github-actions released this 09 Jun 09:31

AgentMux v0.0.2

Worker onboarding and CLI usability release.

Highlights

  • Added local credential caching under the user config directory so Worker and Control devices can reuse exchanged credentials after the first join.
  • Added agentmux worker join as the primary Worker onboarding command. It exchanges a signal, saves the Worker credential, and starts a background Worker by default.
  • Added Worker lifecycle commands:
    • agentmux worker run
    • agentmux worker start
    • agentmux worker stop
    • agentmux worker status
    • agentmux worker logs
  • Added user-level background Worker support:
    • Linux: systemd --user
    • macOS: launchd
    • fallback: detached user process with pid and log files
  • Added agentmux-tui as a dedicated Control TUI entrypoint. It can join once, then open the TUI directly on later runs.
  • Updated /install.sh so generated Worker commands join and start the background Worker, while generated Control commands install and use agentmux-tui.
  • Added tmux availability checks before Worker startup with direct installation guidance.
  • Fixed WSS dialing for public HTTPS hubs without explicit ports. Worker and Control websocket clients now default wss://... to port 443.

CLI Changes

Worker onboarding now uses:

agentmux worker join --hub https://hub.example.com --join 'amx_sig_...' --name "$(hostname)"

After the first successful join:

agentmux worker status
agentmux worker logs
agentmux worker stop
agentmux worker start

Foreground debugging remains available:

agentmux worker run

Control TUI onboarding now uses:

agentmux-tui join --hub https://hub.example.com --join 'amx_sig_...'

After the first successful join:

agentmux-tui

The generic agentmux command can still infer the latest cached credential role:

  • latest worker credential: starts Worker foreground mode
  • latest control credential: opens the Control TUI

Credential Cache

Signal exchange results are stored in:

~/.config/agentmux/credentials.json

The cache stores Hub URL, credential, credential ID, tenant ID, role, device ID, device name, expiration, and update time. Entries are filtered by role and expiration, and newer entries replace older entries for the same Hub, role, and device.

Worker Background Service

agentmux worker join starts a user-level background Worker by default.

On Linux, AgentMux writes a systemd --user unit and runs:

systemctl --user enable --now agentmux-worker.service

On macOS, AgentMux writes a LaunchAgent and loads it with launchctl.

If neither backend is available, AgentMux starts a detached user process and stores pid/log state under:

~/.local/state/agentmux/

The fallback process does not provide automatic restart after reboot; use agentmux worker start to start it again.

tmux Requirement

Worker still depends on tmux as the local session backend in this release. AgentMux now checks for tmux before Worker startup and prints install guidance when it is missing.

Install examples:

sudo apt install tmux
sudo dnf install tmux
sudo pacman -S tmux
brew install tmux

Longer term, AgentMux can add a native PTY session backend so tmux becomes optional. In v0.0.2, tmux remains required because it provides durable local session ownership across Control disconnects.

Install Script

Hub-generated install commands now support the new onboarding shape:

curl -fsSL https://hub.example.com/install.sh | sh -s -- worker --join 'amx_sig_...' --name "$(hostname)"
curl -fsSL https://hub.example.com/install.sh | sh -s -- control --join 'amx_sig_...'

The worker path calls agentmux worker join; the control path installs an agentmux-tui symlink and calls agentmux-tui join.

Fixes

  • Fixed Worker websocket dialing through HTTPS public URLs such as ngrok or Cloudflare Tunnel. wss://hub.example.com now connects to hub.example.com:443; previous builds could incorrectly dial port 80 and fail with TLS handshake errors.
  • Control CLI commands now share the same credential cache path as Control TUI.
  • worker status and worker logs handle missing fallback state files gracefully.

Compatibility Notes

  • Existing explicit token workflows continue to work:
agentmux worker run --hub http://127.0.0.1:8080 --token dev-token
agentmux control app --hub http://127.0.0.1:8080 --token dev-token
  • Existing agentmux worker --join ... remains accepted for compatibility and is treated as a join flow.
  • Release assets remain Unix-focused. Windows is still not published because Worker and terminal attach paths currently depend on tmux and Unix PTY behavior.