Repository navigation
v0.3.0
tmag 0.3.0 adds a local, owner-authorized HTTP API and notification command hooks while keeping tmux as the entry point.
Local HTTP API
tmag serveexposes one local instance through the independently versionedtmag/http/v1contract.prefix + M-ropens it in a tmux window; closing the window stops it.- Clients can inspect sessions, subscribe to resumable SSE updates, read replies and requests, and send prompts, interrupt turns or answer approvals through the existing control gates.
- The listener binds loopback. Remote deployments provide encrypted transport and explicitly configure public hosts and browser origins. Web/mobile interfaces and multi-machine gateways are maintained as independent clients.
Owner credentials
tmag auth issue,pair,listandrevokemanage independently revocable bearer credentials. All credentials represent the same owner.- The persistent store keeps verification digests and metadata, independently of boot/PID session realms. Set
TMAG_AUTH_DIRseparately for independent deployments sharing a home directory. - Pairing invitations are short-lived and single-use. Revocation closes existing subscriptions; already admitted control operations finish within their timeout. Proven agent tools retain their agent authority and cannot issue owner credentials.
Notifications and reliability
@tmag-notifyruns a configured notification command when an agent waits for the owner or finishes a turn, including sessions without panes. It exports metadata only and runs separately from the hook with a bounded lifetime.- Shell variables and literal escapes in notification commands are preserved on tmux 3.4, whose option display adds an extra escaping layer.
tmag watchexits when its reader disconnects, including quiet SSH streams.- End-to-end contract tests verify that rebuilding state from the event stream agrees with
tmag list --jsonthroughout control scenarios.
The existing tmag/v1 CLI/state contract is preserved; owner control events add an optional credential id.
Updating
Update the TPM plugin with prefix + U, then connect/update the agent plugins with prefix + M-a. In Codex, approve the updated hooks with /hooks when prompted.