From 1f731da28bd9983cc414839bd32372d183438164 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 20 Nov 2026 14:33:20 -0300 Subject: pair: `kept`, whole (P36): a session's state the daemon hears is one of attached, detached, pair, kept (daemon.State, its hello's and `state` word, numbered as the daemon's record said its bool), a `new --detach` (and the bare `--detach`) under PARDES_PAIR kept from birth, a pair's session `pair` until a Detach typed in any client makes it kept (daemon.keepSession, never cleared), an Upgrade carrying it (the record's `state` word), and Peers.kept deleted: a client's close ends the session only while it is `pair` (Peers.leave), the end condition no longer asks Options.pair but for the daemonless pair; `pardes ps` says `(tty)` of a pair's session not kept and `(tty, kept)` of a kept one, an own-path session's line unchanged (`(tty, has a frontend)`, `(tty, detached)`), and a bare attach takes any session without a frontend; test/daemon.py `pair_rows` rewritten (a `new --detach` kept, its clients ended by HUP and TERM: runs on; a pair `(tty)` across an Upgrade, its Detach `(tty, kept)` across another, its clients ended by TERM, KILL, HUP: runs on), `pair` and `gui_pair` read the new line, and gui_pair closes a window client of a `new --detach` session: it runs on; on the base `--pair` fails at "the client listed" (ps said `(tty, detached)`), here it passes (load 5-8), shell-test's record and bare-attach tests 32/32 and 9/9 Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- docs/typ/command-line.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/typ/command-line.txt b/docs/typ/command-line.txt index 0ced145f..2f7753e4 100644 --- a/docs/typ/command-line.txt +++ b/docs/typ/command-line.txt @@ -39,10 +39,12 @@ The old spellings --ps, --attach[=NAME], --kill=NAME, --kill-all, -h and == pardes help ps What the per-user daemon lists: each session with its name, pid, kind -(tty or gui) and whether it has a frontend of its own or is detached; -under it its clients and its shells; then the shells no session holds, -which Adopt takes. /sessions is the same list, read from inside a -session (where a session with a frontend says attached). +(tty or gui) and whether it has a frontend of its own or is detached +(under PARDES_PAIR: kept, or nothing when its last client's close +ends it); under it its clients and its shells; then the shells no +session holds, which Adopt takes. /sessions is the same list, read +from inside a session (where a session with a frontend says +attached, and a pair's not kept says pair). Usage: pardes ps -- cgit v1.3