zswarm 0.2.2 → 0.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zswarm",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "type": "module",
5
5
  "description": "Coordinate CLI agent crews in Zellij panes",
6
6
  "engines": {
@@ -23,8 +23,8 @@
23
23
  "skills"
24
24
  ],
25
25
  "dependencies": {
26
- "@zswarm/cli": "0.2.2",
27
- "@zswarm/mcp": "0.1.12"
26
+ "@zswarm/cli": "0.2.4",
27
+ "@zswarm/mcp": "0.1.14"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public"
@@ -57,7 +57,7 @@ pane's title when `ZELLIJ_PANE_ID` / `ZSWARM_SELF_PANE` is visible, else
57
57
  1. Target **pane ids or names** from `list` — do not invent transports.
58
58
  2. Keep the session + pane ID returned by `spawn`. Use names once `alias.observed` is true; retry observation before creating a duplicate.
59
59
  3. Prefer `send` + `wait` over polling. Prefer `tail` over repeated `dump`.
60
- 4. Check `submitted` on `send`; `false` means the peer never got it.
60
+ 4. Check `submitted` on `send`: `false` is still in the composer, `"unverified"` is inconclusive (the screen changed while the body is not visible — never a resend), and `"not-delivered"` means nothing landed (safe to resend). `--confirm` never pastes the body twice.
61
61
  5. Prefer `diff` / `checkpoint` over reading a worktree by hand.
62
62
  6. Zellij terminal panes only — not IDE side-panel chats.
63
63
  7. Same host as Zellij, or `ZSWARM_SSH` / `ZSWARM_SERVE`. Linux/macOS SSH is
@@ -5,7 +5,7 @@ MCP: `zswarm({ op, ... })`. CLI: `zswarm <op>`. Same surface.
5
5
  | op | Purpose |
6
6
  |----|---------|
7
7
  | `list` | Terminal panes (id, title, command, tab); `verbose` adds cwd/flags |
8
- | `send` | Paste body + Enter (`to` = id / title / command). `from` labels `[zswarm from=…]` (default: `ZSWARM_FROM`, else the sending pane's title, else `swarm`). `submit`: `auto` (default; Codex panes default to `double-enter`) / `double-enter` / `none`. Result `submitted: true\|false\|"unverified"`. `expect` refuses unless the screen already shows that substring |
8
+ | `send` | Paste body + Enter (`to` = id / title / command). `from` labels `[zswarm from=…]` (default: `ZSWARM_FROM`, else the sending pane's title, else `swarm`). `submit`: `auto` (default; Codex panes default to `double-enter`) / `double-enter` / `none`. `submitted`: `true` (accepted and running) \| `"queued"` (accepted behind a running turn) \| `false` (still in the composer, not submitted) \| `"unverified"` (inconclusive) \| `"not-delivered"` (the pane was unchanged apart from the composer; op fails `not_delivered`, resend is safe). Settle (`--settle-ms`, default 300) and pane-observe (`--observe-ms`, default 1000) budgets scale up to 5x on a slow Zellij, explicit flags win. `--confirm` re-pastes only on `not-delivered` (Enter when still in the composer, an extra dump on `unverified`) and never pastes twice. `expect` refuses unless the screen already shows that substring `ifIdle: true` (`--if-idle`) refuses a live-leased pane (`pane_leased`) or a harness that shows it is working (`pane_busy`; OpenCode's progress bar, Claude Code's `esc to interrupt`) instead of sending. |
9
9
  | `dump` | Full-screen read; capped at 8000 chars (tail) — expensive vs `tail` |
10
10
  | `tail` | Incremental read since last cursor; `reset: true` returns the whole screen |
11
11
  | `wait` | Block until quiet or `match`; returns `reason` + a 2000-char tail. Bus holds one pipe for the wait |
@@ -28,14 +28,20 @@ MCP: `zswarm({ op, ... })`. CLI: `zswarm <op>`. Same surface.
28
28
  | `unworktree` | Remove a worktree (`path` or `branch`; `worktree` aliases `branch`) |
29
29
  | `diff` | What a peer changed in its worktree |
30
30
  | `checkpoint` | Commit a peer worktree (`message`); clean tree is not an error |
31
- | `sessions` | Live Zellij session names |
31
+ | `sessions` | Zellij session names; `--exited` for resurrectable ones, `--prune-exited [--older-than 7d] [--dry-run]` deletes them |
32
32
  | `bus` | Event-bus status; `install: true` loads the plugin, `clear: true` forgets it |
33
33
  | `serve` | Listen for remote zswarm (`--listen`). `--install` / `--clear` installs/removes a service (Windows logon task, Linux systemd user unit, macOS launchd job). MCP cannot listen; set `ZSWARM_SERVE` on the client. See [remote.md](remote.md) |
34
34
  | `doctor` | Inspect-only route/SSH/serve/Zellij/bus diagnostics |
35
35
 
36
36
  `submit=auto` retries Enter if the paste is still sitting in a TUI composer.
37
37
  `submit=double-enter` always sends the extra Enter; `submit=none` skips the check.
38
- Check `submitted` — a queued composer used to report success.
38
+ Check `submitted`: `true` is submitted, `"queued"` is accepted but waiting behind a
39
+ running turn (Claude Code shows "Press up to edit queued messages"), `false` is still
40
+ in the composer, `"unverified"` means the screen changed but the body is not visible
41
+ (never a resend), and `"not-delivered"` means the pane was unchanged apart from the
42
+ composer — the op fails `not_delivered` so a caller can resend. `--confirm` never
43
+ pastes the body twice.
44
+ A queued composer now reports `"queued"`, not success.
39
45
 
40
46
  **Breaking:** `spawn`'s boolean `tab` is now `newTab`; `tab` is a tab **name**.
41
47
 
@@ -81,6 +87,12 @@ CLI: `send --body-file PATH` reads a local UTF-8 file before remote forwarding;
81
87
  body. Newlines are preserved. MCP uses `body`, never its protocol stdin. Paste
82
88
  still uses argv, so reference a shared file for very large handoffs.
83
89
 
90
+ CLI `zswarm relay` leases its target pane until the relay reaches a final
91
+ status (a lease whose relay is gone is stale and taken over). A second relay to
92
+ a leased pane fails `pane_leased` unless `--queue` waits for the lease or
93
+ `--force` shares it; `relay --list` / `--leases` show the holders.
94
+ `send --if-idle` refuses a leased (`pane_leased`) or busy (`pane_busy`) pane.
95
+
84
96
  For menus: wait for a match and check `reason`, perform one
85
97
  `keys --expect TEXT --key Enter`, then wait for the resulting state. `expect`
86
98
  also applies to `chars` and `interrupt`. It is a fresh case-insensitive screen
@@ -116,6 +116,10 @@ For frequent status polling, prefer serve beside Zellij with an SSH tunnel. Use
116
116
 
117
117
  `zswarm host install|doctor`, `zswarm crew up|status|down`, `zswarm relay`
118
118
  (hand a remote pane work, get a message in a local pane when a done line
119
- appears; `zswarm relay --wait ID` is the pull path) and `zswarm slot`
120
- (shared build slots) set up and keep a remote crew running. See
121
- docs/hosts.md in the zswarm repo.
119
+ appears; `zswarm relay --wait ID` is the pull path, `--list` shows
120
+ running and finished relays, `--leases` lists current pane leases,
121
+ `--cancel ID` stops one) and `zswarm slot` (shared build slots) set up and
122
+ keep a remote crew running. A relay leases its target pane until it ends; a
123
+ second relay (or `send --if-idle`) refuses a leased pane with `pane_leased`
124
+ (`--queue` waits, `--force` shares the lease, a stale lease is taken over).
125
+ See docs/hosts.md in the zswarm repo.