@mu-crew/muster 0.0.0-stage → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,228 @@
1
+ # Changelog
2
+
3
+ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
4
+ versions follow [SemVer](https://semver.org/).
5
+
6
+ ## [Unreleased]
7
+
8
+ ## [3.0.0] - 2026-11-29
9
+
10
+ ### Changed (breaking)
11
+
12
+ - **Renamed to muster.** The picker is `muster` (was `tsesh`): the binary
13
+ `bin/muster`, the TPM entry point `muster.tmux`, the repo
14
+ `mu-crew/muster`, and the npm package `@mu-crew/muster`. The `TSESH_*`
15
+ environment variables are `MUSTER_*`, the tmux options `@tsesh_key_*` are
16
+ `@muster_key_*`, and the state directory is `$XDG_STATE_HOME/muster`.
17
+ - **Config moved** to `~/.config/muster/config.toml`. The old
18
+ `~/.config/tsesh/config.toml` and `~/.config/tmux/tms.toml` are still read,
19
+ with a warning to move them.
20
+ - **TPM:** change `@plugin 'mu-crew/tmux-session-picker'` to
21
+ `@plugin 'mu-crew/muster'`, and point any `tsesh` binding at `muster`.
22
+
23
+ ### Added
24
+
25
+ - **npm:** `npm install -g @mu-crew/muster` puts `muster` on PATH. The
26
+ script is one Python file (3.11+) with no third-party dependencies.
27
+
28
+ ## [2.1.0] - 2026-11-29
29
+
30
+ ### Added
31
+
32
+ - **Rex.** tsesh runs in a Rex pane as it does in tmux, and lists this
33
+ machine's Rex sessions (`■`) next to the tmux ones when a Rex.app is
34
+ connected. Enter shows a Rex session in Rex.app; from Rex, a tmux session
35
+ opens in a new Rex tab and a new directory or pinned session becomes a Rex
36
+ session named after it, with its `startup` and `split`. Rex rows preview
37
+ their windows and focused pane, and `ctrl-x` kills them. See
38
+ [docs/rex.md](docs/rex.md).
39
+ - Showing a Rex session works while other machines' Rex.apps are attached to
40
+ this machine's server. A session is shown only in the Rex.app running here
41
+ (its process is `Rex.app`, not sshd): Rex refuses an untargeted select while
42
+ several app clients are connected, so tsesh aims it there. A Rex.app that is
43
+ not on this machine is never used, and Rex rows are listed only when one is.
44
+ `$REX_CLIENT` still names a client explicitly.
45
+ - The agents view has a `mux` column (`tmux` or `rex`), and the all view's
46
+ attention rows name the multiplexer.
47
+ - From a Rex pane, `murmur jump` to a tmux agent lands on its new tab, also
48
+ with murmur 3.1.0 and 3.1.1, which do not do that themselves.
49
+ - `ctrl-x` on a crashed agent dismisses the crash (`murmur clear --target`,
50
+ murmur with `clear --target`). Only this host's crashes clear; on a live
51
+ or remote agent it does nothing. Session rows still kill.
52
+
53
+ ## [2.0.1] - 2026-11-27
54
+
55
+ ### Fixed
56
+
57
+ - The agents view said "murmur too old for the agent view" with murmur 3,
58
+ which also reports Rex panes (`server.kind` `rex`, pane ids `block:...`).
59
+ One such pane rejected the whole snapshot. Rex panes are now listed and
60
+ reached with `murmur jump`; tmux pane ids must still be `%N`.
61
+
62
+ ## [2.0.0] - 2026-11-26
63
+
64
+ ### Changed
65
+
66
+ - **Native vtmux OSC 7501 session and window state.** `tsesh` now reads
67
+ `#{session_program_state}` in `list-sessions -F` and `#{window_program_state}`
68
+ in the session preview instead of `@murmur_session_state` / `@murmur_window_state`
69
+ (requires vtmux >= 3.8-rc3 with `set -s vtmux-program-status on`). On vanilla
70
+ tmux 3.8, native session state is blank while the picker, zoxide, root-dir,
71
+ kill and last-session continue to work; stay on murmur 2.x (`release/2.x`) if
72
+ you need local state on stock tmux.
73
+ - Session state merge with cached murmur snapshots now orders
74
+ `crashed > blocked > error > working > waiting > done > idle` so native
75
+ `blocked` is never downgraded by a cached snapshot.
76
+
77
+ ## [1.0.3] - 2026-11-21
78
+
79
+ ### Fixed
80
+
81
+ - Enter on a row reached through a view key failed with "gone since the
82
+ picker opened". This hit crew agents (mu delegates) after `ctrl-g`, and rows
83
+ of another view after `ctrl-s` or `ctrl-f`. 1.0.2 checked every choice
84
+ against the opening view, which lacks those rows. Only a choice from the
85
+ cached rows is checked now. Rows from a reload are fresh already.
86
+
87
+ ## [1.0.2] - 2026-11-20
88
+
89
+ ### Changed
90
+
91
+ - The popup opens on the rows that the last open of the same view left
92
+ behind, then swaps in a fresh list. The wait for murmur and tmux no longer
93
+ delays the first paint. If you press Enter before the fresh list arrives,
94
+ the popup closes and tsesh looks the row up again in a fresh list, so it
95
+ never acts on stale rows. The cache is kept per view, tmux server, popup
96
+ width and tsesh version, in `$XDG_STATE_HOME/tsesh/views/`.
97
+ - On a cached open, the picker builds the fresh list itself while fzf shows
98
+ the cache, and hands it over through fzf's `--listen` socket (a unix socket
99
+ in the picker's private temporary directory). The tmux call that finds the
100
+ invoking pane now runs after fzf starts. A view key or `ctrl-x` pressed
101
+ before the handover keeps its own list.
102
+
103
+ ## [1.0.1] - 2026-11-20
104
+
105
+ ### Changed
106
+
107
+ - The picker opens faster: it starts fewer processes, and murmur's snapshot
108
+ read now overlaps the tmux calls.
109
+ - Sessions and windows come from one tmux call instead of two.
110
+ - The agents view no longer runs `murmur jump --help` on every open. A
111
+ snapshot with `jump_target` already shows that `murmur jump` exists (both
112
+ came in murmur 2.3.0).
113
+ - The background `murmur collect` runs at a lower priority, and only when
114
+ some peer was last fetched over 20 seconds ago or is stale.
115
+
116
+ ## [1.0.0] - 2026-11-19
117
+
118
+ ### Changed (breaking)
119
+
120
+ - Picker keymap reworked. Views are now `all` (`ctrl-a`), `sessions`
121
+ (`ctrl-s`, pinned plus live) and `find` (`ctrl-f`). The pinned-only (`ctrl-c`),
122
+ live-only (`ctrl-t`) and zoxide-only (`ctrl-x`) views are gone, so `ctrl-c`
123
+ aborts again (`ctrl-x` now kills a session, see Added). `--mode` takes
124
+ `all`, `sessions`, `find` or `agents`; the old values `default`, `tmux` and
125
+ `zoxide` are rejected.
126
+ - The picker header now lists `tab`/`shift-tab` and `enter` too.
127
+
128
+ ### Changed
129
+
130
+ - The preview is faster: a live session's preview takes one tmux call instead
131
+ of five, and the built-in directory listing runs without a login shell. A
132
+ `preview_command` set in the config still runs in `sh -l`.
133
+
134
+ ### Added
135
+
136
+ - `tsesh last` shows "tsesh: no previous session" in tmux when there is none.
137
+
138
+ - `ctrl-x` in the picker kills the highlighted session and redraws the view.
139
+ It ignores agent, zoxide, find and not-running pinned rows and refuses the
140
+ session the client is in, with a tmux message. It targets the session by its
141
+ tmux id, so names like `$0`, `-x`, `a.b` or ones with outer spaces kill that
142
+ session and no other. Also available as
143
+ `tsesh kill --kind=tmux --session-id='$N'`.
144
+ - `tsesh --version`.
145
+ - murmur's `error` and `waiting` agent states, with murmur's glyphs. `error`
146
+ counts as needing attention.
147
+
148
+ - With a current murmur: per-state agent counts on session rows, and attention
149
+ agents as rows at the top of the all view. Enter selects the agent's pane or
150
+ hands off to `murmur jump`. Probed by feature, falls back to
151
+ `@murmur_session_state` without murmur. The picker row gained `host`,
152
+ `pane`, `jump_target` and `here` fields, and the state column is wider.
153
+
154
+ - The picker key now runs through `run-shell` and passes `--client`, so a
155
+ failure is shown on the client that opened the picker.
156
+
157
+ - Agents view: `prefix a` (`@tsesh_key_agents`), `ctrl-g` in the picker or
158
+ `--mode agents` lists murmur's agents with state, name, workstream, host and
159
+ age, per-state counts in the prompt, and murmur's session notice in the
160
+ header. `ctrl-g` again toggles crew agents; the toggle survives view
161
+ switches. Works outside tmux; Enter jumps through `murmur jump` unless the
162
+ picker runs inside the agent's tmux server. An empty view, a missing murmur
163
+ and a too-old murmur are said in the header.
164
+ - `◆` marks the invoking client's session and agent pane, `◇` sessions
165
+ attached by another client. The legend lists `^g`.
166
+ - The view keys are fzf `transform` bindings (`tsesh fzf-action`); each view
167
+ sets its own header and prompt.
168
+
169
+ - Live session rows count windows and panes (`3w 5p`, blank for a pinned
170
+ session that is not running).
171
+ - Live session rows show the active pane's directory, with a dim `+N` for
172
+ windows in other directories; zoxide and scan rows for a directory a live
173
+ session already covers are dropped; the session preview lists every window.
174
+
175
+ - The picker fits its columns to the popup width: preview right, below or
176
+ hidden (`ctrl-/` toggles it), a name column of 16 to 40 cells, paths cut at
177
+ the start, counts and then paths dropped on narrow lists, a key legend that
178
+ wraps, and a new layout on resize. Widths count terminal cells (CJK names
179
+ stay aligned). Needs fzf 0.46+.
180
+
181
+ - Live sessions sort by last activity, newest first; pinned sessions keep
182
+ their config order.
183
+
184
+ - `tsesh --help` describes each command.
185
+
186
+ ### Fixed
187
+
188
+ - A live session's preview names the session and its attached clients again
189
+ on its first line; on recent tmux that line was blank.
190
+ - Sourcing `tsesh.tmux` again releases a key it bound before when its option
191
+ changed or became `""`; keys the user rebound are left alone. The bindings
192
+ work from a plugin directory with spaces, quotes, `#` or `$` in its path.
193
+
194
+ - Picker rows escape backslashes, tabs and line breaks in every field, so a
195
+ pinned path or startup command holding a tab no longer shifts the fields
196
+ after it.
197
+ - Switching sessions from the popup moves the client that opened it.
198
+ - Closing the picker with `esc` (or Enter on no match) exits 0, so tmux no
199
+ longer prints "returned 130" over the pane.
200
+
201
+ - A new session for a directory no longer lands in another directory's session
202
+ when their names sanitize alike (`a.b` and `a_b`); the second is suffixed
203
+ `-2`. A directory reuses the live session rooted at it, found by real path or
204
+ by the path as given, including paths with spaces, `#`, `,`, `}`, newlines
205
+ and other odd bytes.
206
+ - Startup keys and splits no longer fail on tmux's default `base-index 0`.
207
+ - tmux failures print a message instead of a Python traceback.
208
+ - Attaching outside tmux honors the isolated socket variables.
209
+ - A pathless row no longer runs the preview command in the picker's cwd.
210
+ - `~` abbreviates only the real home prefix (`/home/me2/x` stays as is).
211
+ - Errors in a `[[sessions]]` entry name `config.toml`, not the session's path.
212
+ - The picker lists sessions once when the server is up; the `find` fallback
213
+ prunes blacklisted directories and treats blacklist entries literally.
214
+ - `ruff check .` and `ruff format --check .` now cover `bin/tsesh`.
215
+
216
+ ### Development
217
+
218
+ - ruff and ty are pinned in `pyproject.toml` and `uv.lock`; the gate runs
219
+ `uv run --frozen` ruff, ty and the tests. `TSESH_FAST=1` skips the live tmux
220
+ and fzf tests for a fast gate, and test runs leave no tmux servers behind.
221
+
222
+ ### Documented
223
+
224
+ - A session restored by tmux at server start skips its configured `startup`
225
+ and `split`.
226
+ - A symlink retargeted after its session was created still reaches that
227
+ session when connected through the same symlink string.
228
+
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Martin Trojer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,105 @@
1
- # Temporary Holding Version
1
+ # muster
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `muster` is a session picker for tmux and [Rex](https://www.superlogical.com/rex).
4
+ One fzf popup lists pinned sessions, live tmux and Rex sessions, zoxide
5
+ directories and a directory scan. Pick a row and muster switches to that
6
+ session, creating it in the directory first if needed. With
7
+ [murmur](https://github.com/mu-crew/murmur), the same popup also lists coding
8
+ agents and jumps to them.
9
+
10
+ What you get:
11
+
12
+ - one popup for pinned sessions, live sessions, zoxide and a scan under `$HOME`
13
+ - session reuse by directory (real path), with name collisions kept apart
14
+ - jump to the last session, or a session rooted at the current pane's directory
15
+ - kill a session from the picker
16
+ - with murmur: each session's agent state (`crashed`, `error`, `blocked`,
17
+ `done`, `working`, `waiting`; `idle` is only counted), attention rows and an
18
+ agents view
19
+ - with Rex: the same picker in a Rex pane, Rex sessions next to tmux ones,
20
+ and Enter crossing between them (a tmux session opens in a Rex tab, a new
21
+ project becomes a named Rex session)
22
+
23
+ What it is not:
24
+
25
+ - not a tmux session manager or restorer: it creates and switches sessions,
26
+ and leaves saving and restoring them to your tmux setup
27
+ - not a replacement for murmur's state collection: it only reads what murmur
28
+ publishes
29
+ - no agent control beyond jumping to an agent
30
+ - no runtime dependencies beyond tmux, fzf and Python; murmur and Rex are
31
+ optional
32
+
33
+ On vtmux >= 3.8-rc3 (`set -s vtmux-program-status on`) the state column is
34
+ native, read from `#{session_program_state}`. On vanilla tmux 3.8, which drops
35
+ OSC 7501, the picker, zoxide, root-dir, kill and last-session all work; the
36
+ state column is blank and local agents do not appear in `prefix a`. murmur 3.0
37
+ sees no local panes there; murmur 2.x (branch `release/2.x`) is the clean out.
38
+
39
+ ## Install
40
+
41
+ Needs tmux 3.2+, Python 3.11+ and [fzf](https://github.com/junegunn/fzf) 0.46+.
42
+ [zoxide](https://github.com/ajeetdsouza/zoxide), [fd](https://github.com/sharkdp/fd)
43
+ and [eza](https://github.com/eza-community/eza) are used when present.
44
+ With npm, the `muster` command goes on PATH (for Rex panes and scripts too):
45
+
46
+ ```sh
47
+ npm install -g @mu-crew/muster
48
+ ```
49
+
50
+ With [TPM](https://github.com/tmux-plugins/tpm), which binds the keys:
51
+
52
+ ```tmux
53
+ set -g @plugin 'mu-crew/muster'
54
+ ```
55
+
56
+ Without TPM, clone the repo and add
57
+ `run-shell ~/path/to/muster/muster.tmux` to `~/.tmux.conf`.
58
+ Releases are git tags; pin one with
59
+ `set -g @plugin 'mu-crew/muster#vX.Y.Z'`.
60
+
61
+ ## Keys
62
+
63
+ | Key | Does |
64
+ | --- | --- |
65
+ | `prefix s` | Picker popup (`@muster_key_pick`) |
66
+ | `prefix a` | Picker popup, agents view (`@muster_key_agents`) |
67
+ | `prefix g` | Last session (`@muster_key_last`) |
68
+ | `prefix T` | Session rooted at the current pane's directory (`@muster_key_root`) |
69
+ | `ctrl-a` / `ctrl-s` / `ctrl-f` | All / sessions / find view |
70
+ | `ctrl-g` | Agents view; again: show or hide crew agents |
71
+ | `ctrl-x` | Kill the highlighted tmux or Rex session (not the tmux session you are in); on an agent, dismiss its crash |
72
+ | `ctrl-/` | Show or hide the preview |
73
+ | `tab` / `shift-tab` | Down / up |
74
+ | `enter` | Switch to the row (creating the session if needed) or jump to the agent |
75
+ | `esc` / `ctrl-c` | Abort |
76
+
77
+ Set an option to move a key, or to `""` to unbind it.
78
+
79
+ ## Rex
80
+
81
+ Run `muster pick-and-connect` in a Rex pane, or bind it in a floating layer:
82
+ [mu-crew/dotfiles](https://github.com/mu-crew/dotfiles) does that with
83
+ `cmd+b s` (picker) and `cmd+b a` or `cmd+j` (agents), matching `prefix s` and
84
+ `prefix a`. Rex sessions are listed only when a Rex.app is connected to this
85
+ machine's Rex server, since nothing else can show one. Details are in
86
+ [docs/rex.md](docs/rex.md).
87
+
88
+ ## More
89
+
90
+ - [docs/keys-and-views.md](docs/keys-and-views.md): keys, options, views, row
91
+ markers and the command line
92
+ - [docs/agents.md](docs/agents.md): murmur integration, agent rows, the agents
93
+ view, safety rules and `--client`
94
+ - [docs/config.md](docs/config.md): `config.toml`, environment variables,
95
+ layout and columns, preview, theme
96
+ - [docs/sessions.md](docs/sessions.md): session rows, reuse by path, name
97
+ collisions, kill, last, server lifetime
98
+ - [docs/rex.md](docs/rex.md): Rex session rows, what Enter does from tmux and
99
+ from Rex, agents, opening muster in Rex
100
+ - [docs/development.md](docs/development.md): gates, uv pins, tests, releasing
101
+ - [CHANGELOG.md](CHANGELOG.md) and [RELEASING.md](RELEASING.md)
102
+
103
+ ---
104
+
105
+ Part of [mu-crew](https://github.com/mu-crew). Written mostly by AI coding agents, with a human reviewing what ships, and built for running them.