agentp 2.1.0 → 2.1.2

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/README.md CHANGED
@@ -348,15 +348,54 @@ the project found upward from `<directory>` (default: `$PWD`):
348
348
  it, and `Backspace` on an already-empty search also exits it. The same `/`
349
349
  search works in the model/agent pickers and the project switcher.
350
350
  - `Enter` switches (menu stays open). `Space` over a different session enters
351
- **broadcast mode**: Space selects/deselects sessions; `Enter` keeps the list
352
- and switches normally; `ESC`/`q` cancels back to the session list and returns
353
- the TUI to the stored session; deselecting down to a single session selects
354
- that remaining session. New selections open in the TUI for inspection.
355
- Broadcast mode also has `h` help, `d` delete, and `m` to change the model for
356
- every selected session.
351
+ **broadcast mode**: Space selects/deselects sessions; `Enter` switches to the
352
+ cursor session and ends broadcast; `ESC`/`q` cancels back to the session list
353
+ and returns the TUI to the stored session; deselecting down to a single
354
+ session selects that remaining session. Ending broadcast (`Enter`/`ESC`/`q`,
355
+ or any later session switch) clears the stored selection. Reopening `ocmux`
356
+ while a valid selection is stored starts directly in broadcast mode; a stale
357
+ or invalid stored list (fewer than two sessions, or ids that no longer exist)
358
+ is cleared first, so the picker always shows the real state. New selections
359
+ open in the TUI for inspection.
360
+ Broadcast mode also has `h` help, `d` delete, `D` (Shift+d) to delete every
361
+ selected session at once (confirmation in the status bar), and `m` to change
362
+ the model for every selected session. The `Broadcast to sessions: …` line
363
+ caps itself to one row — up to 480 characters of names (or the terminal
364
+ width, whichever is smaller); past that the selection is truncated from the
365
+ beginning with a leading `...`, so the footer never wraps.
357
366
  - `n` create (name input) · `r` rename (edit in place) · `R` set a reminder ·
358
367
  `d` delete (confirm) · `a` switch agent · `m` switch model · `p` project
359
- switcher (inspect-only by default) · `h` help · `q` quit
368
+ switcher (inspect-only by default) · `h` help · `q` quit. The `n`/`r`/`R`
369
+ prompts and the `d` confirmation take over the **status bar**, with their
370
+ essential keys on the right (`Enter: create/rename/save · Esc: cancel`,
371
+ `y: delete · n/Esc: cancel`). While a question is active the bar flips from
372
+ brown to the same **light yellow as the list pointer**, so the change of
373
+ state is obvious at a glance. Deleting the current session adopts the session
374
+ under the cursor as the new current (recorded, refreshed in the TUI, and
375
+ highlighted)
376
+ - **pending-answer awareness**: while the picker is open, ocmux re-checks the
377
+ project every 2 seconds and marks sessions that are waiting on the agent.
378
+ Two independent marker columns: ❓ = pending agent **question** (a form),
379
+ 🔒 = pending **permission** request (each always reserves its slot so rows
380
+ stay aligned). A 🔔 leads the **status bar** when any listed session is
381
+ waiting, and the cursor session's marker columns are pinned to the **top-right
382
+ corner of the info panel**. The same markers appear in the project switcher,
383
+ per session and — when folded — aggregated over the project.
384
+ - `A` answers the pending **question(s)** of the selected session (only when it
385
+ shows a ❓ marker). Answer mode
386
+ lists the form's fields and options: `Space`/`Enter` selects (`(•)`), extra
387
+ rows toggle on multi-select fields, and "Type your own answer" / free-text
388
+ rows open the status-bar input. Fields gated by `when` conditions appear and
389
+ disappear live as you answer their gate. The final **Submit answers** row
390
+ sends the whole form in one request; the server's message shows in the status
391
+ bar on rejection (400), an already-answered form (409) reports and returns to
392
+ the list, and multi-form sessions advance form to form. `h` toggles the
393
+ answer-mode help, `q`/`ESC` cancels without answering.
394
+ - `P` answers the pending **permission request(s)** of the selected session
395
+ (only when it shows a 🔒 marker). Each request is shown with its action,
396
+ resources and optional message; `o`/`1` allow **once**, `a` allow **always**
397
+ (remembered), `r` **reject** — each posts the decision and advances to the
398
+ next pending request (`h` help, `q`/`ESC` leaves them pending).
360
399
  - `m` opens the model list **sorted by provider** with the cursor already on the
361
400
  session's **current model** — also in broadcast mode, where it starts from the
362
401
  cursor session's model, so a bulk change begins where you are
@@ -366,7 +405,14 @@ the project found upward from `<directory>` (default: `$PWD`):
366
405
  - switching updates `.ocmux.json` and refreshes the project's dedicated TUI, or
367
406
  the shared TUI when no live dedicated one exists; silent on success. The file
368
407
  updated is always the one of the project being listed — your own project
369
- unless ocmux was started with `--all-projects`
408
+ unless ocmux was started with `--all-projects`. Opening the picker in a
409
+ project also routes that project's TUI to its stored session (a TUI already
410
+ showing it is left untouched), so running `ocmux` from anywhere switches the
411
+ display even without picking a row
412
+ - when `.ocmux.json`'s server is unreachable but the default server
413
+ (`$OCMUX_SERVER` or `http://localhost:4096`) answers, `ocmux` offers (on a TTY)
414
+ to repoint the project to the default and rewrites `server` in `.ocmux.json`
415
+ if you confirm
370
416
  - new sessions inherit the model of the previously selected session (v2
371
417
  sessions created via the API have no model and won't run a prompt until set)
372
418
 
@@ -376,7 +422,12 @@ prepends a session's reminder to every prompt sent to it.
376
422
  Broadcast selections are stored in `.ocmux.json` as `broadcast`. `agentp`
377
423
  sends a prompt to all selected sessions (waiting for busy sessions to go idle),
378
424
  and prints a labeled answer section for each. Errors/incomplete targets are
379
- reported individually with session name, id, error, and timestamp.
425
+ reported individually with session name, id, error, and timestamp. Leaving
426
+ broadcast mode (`Enter`/`ESC`/`q`) or picking a session in the normal switcher
427
+ removes the stored `broadcast`, so a stale selection never keeps broadcasting.
428
+ Opening `ocmux` reads it back: a valid list opens the picker directly in
429
+ broadcast mode, while a stale or invalid list is cleared and the picker shows
430
+ the (real) normal state.
380
431
 
381
432
  Subcommands:
382
433
 
@@ -387,8 +438,10 @@ Subcommands:
387
438
  - **`tui [--shared] [--server <url>] [dir]`** — register the current tmux pane and run OpenCode
388
439
  in it. Without `--shared`, the pane follows only that project. With
389
440
  `--shared`, it becomes the one fallback TUI for all projects and can reconnect
390
- across server URLs as selections change. Re-registering a slot stops its old
391
- wrapper without destroying the old pane. Closing the TUI unregisters it.
441
+ across server URLs as selections change; `--shared` also starts without a
442
+ `.ocmux.json`, defaulting to the default server. Re-registering a slot stops
443
+ its old wrapper without destroying the old pane. Closing the TUI unregisters
444
+ it.
392
445
  `tui --list` lists live registrations; `tui [--shared] --status` inspects a
393
446
  dedicated/shared slot; `tui [--shared] --detach` unregisters that slot without
394
447
  closing the pane or its current TUI.