summaryrefslogtreecommitdiff
path: root/docs/typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 18:43:09 -0300
committerGabriel Schneider <[email protected]>2026-11-17 18:43:24 -0300
commit484841325bb35b0bb7c55f7980178388c4e39c71 (patch)
treeb1a674c1f310e9e2befae9a9b3f0a2294e8c8568 /docs/typ
parentb23665597fcfd486e8f15942da25ce5708b77226 (diff)
downloadpardes-484841325bb35b0bb7c55f7980178388c4e39c71.tar.gz
pardes-484841325bb35b0bb7c55f7980178388c4e39c71.zip
docs: the manual and the notes made true about how pardes runs: next-daemon.md's opening says what is built and points at the new page, and its design's lines that went otherwise (a supervisor, subreaper, spawner and 9P root; every session a child of the daemon; the stub passing its terminal, no fork; the join's fork child; one socket; /n/<host>) are marked so; the guide's closed terminal (only while the daemon keeps it) and closed window (it ends the session unless it has clients), and its daemon that kept all of it; the reference's /sessions (client lines), bare attach (as a client), another machine's attach (built: HOST:NAME), three clients not four; building.typ's replica paragraph (no ping-only session, no platform in the hash); macos.md's Attach word and src/detached/, both gone; next-daemon.md's window client font and touchpad, both built since
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'docs/typ')
-rw-r--r--docs/typ/building.typ15
-rw-r--r--docs/typ/guide.typ11
-rw-r--r--docs/typ/reference.typ19
3 files changed, 29 insertions, 16 deletions
diff --git a/docs/typ/building.typ b/docs/typ/building.typ
index 6b0e812a..9026aa4f 100644
--- a/docs/typ/building.typ
+++ b/docs/typ/building.typ
@@ -344,14 +344,17 @@ own process, ended by its hangup.
A replica (a client running its own copy of the core, phase 5 of
`docs/next-daemon.md`) connects to `pardes-replica.sock`, a stream socket
beside it that `ssh -L` can forward. `src/wire.zig` is its
-protocol (version 14): fixed-width little-endian fields, a 5-byte header
+protocol (its `version`): fixed-width little-endian fields, a 5-byte header
(tag, then a u32 length), the hello, a ping, the input events. The hello
names a session and carries the client's semantics hash (the protocol,
-release, commit, platform, build options and every dependency's hash); the
-daemon refuses another build's, or a session nobody has, in words, and
-hands an accepted connection to its session (`SCM_RIGHTS`), which welcomes
-it and from then on is the one it talks to. Today the session answers
-pings and nothing more.
+release, commit, build options, every dependency's hash and the tape's
+shape; the terminal's build and the window's share one, so either joins
+the other's sessions); the daemon refuses another build's, or a session
+nobody has, in words, and hands an accepted connection to its session
+(`SCM_RIGHTS`), which welcomes it and from then on is the one it talks
+to: the session sends the dump the client loads, then each step's tape and
+its terminals' screens, and the client sends its inputs
+(`src/replica.zig`; #doc("running") draws it).
#word("Upgrade") (`src/upgrade.zig`) execs the path the session was started
from, at a step boundary, after asking it `--version`: the session's dump
diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ
index 6a50eef1..c78b8149 100644
--- a/docs/typ/guide.typ
+++ b/docs/typ/guide.typ
@@ -360,7 +360,9 @@ pardes --kill=work end it and its shells (--kill-all: every one)
#word("Detach") (#key("SPC s D")) lets the terminal or the window go and
leaves the session running, its panes, shells and files kept; so does a
-terminal that closes. `pardes --attach` takes it back in any terminal,
+terminal that closes, while the daemon (below) is there. A window that
+closes ends its session, unless the session has clients.
+`pardes --attach` takes it back in any terminal,
`pardes-gui --attach` a window session's window: a terminal session takes
a terminal, a window session a window. Attached already, it takes another
view: each terminal or window has its own columns, focus, cursors and
@@ -369,8 +371,11 @@ two takes the size of the one that last typed into it. #word("Detach") in
one lets only that one go. A session is named by `--9p=` or
`--detach=`, else its pid. A session killed outright leaves its shells
running; #word("Adopt") in another takes them in as terminal panes, what
-they showed gone. One `pardes --daemon` per user keeps all of it, and
-leaves once nothing is kept. After a rebuild, #word("Upgrade")
+they showed gone. One `pardes --daemon` per user lists the sessions and
+holds their shells' terminals open; the first session starts it, it is
+nobody's parent, and it leaves once it holds nothing. Which processes
+run, and what survives what, is in #doc("running").
+After a rebuild, #word("Upgrade")
(#key("SPC s U")) moves a running session onto the pardes now installed
where it was started from, in place: its text and undo, its views, its
terminals with their running shells, and its terminals and windows come
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ
index db4f9c77..dff79859 100644
--- a/docs/typ/reference.typ
+++ b/docs/typ/reference.typ
@@ -1010,8 +1010,10 @@ at 200, ending in `…`. Control characters become spaces.
(#doc("building", section: "listeners")).
- #file("/sessions"): what the pardes daemon keeps, as `pardes --ps`
shows it, a record a line: `daemon <pid>`, then `session <pid> tty|gui
- attached|detached <name>` with a `shell <pid>` line for each shell it
- holds, then `orphan <pid>` for each shell no session holds. Any of the
+ attached|detached <name>` (attached: it has a terminal or window of its
+ own) with a `client <pid>` line for each of its clients and a
+ `shell <pid>` line for each shell it holds, then `orphan <pid>` for each
+ shell no session holds. Any of the
names attaches (`pardes --attach=<name>`, either kind). Read fails `no
pardes daemon answers` with none, or one too old to list (Upgrade it).
- #file("/os/"): existing regular files take read, write and truncation to
@@ -1339,11 +1341,14 @@ to its end before the write is answered, and one that finds nothing fails,
each says so and exits 1. Bare `--detach` names the session after its pid; bare
`--attach` needs exactly one detached session of its kind (a terminal's
for `pardes`, a window's for `pardes-gui`), or with none detached the
- only session of that kind; a second `--detach=NAME`
+ only session of that kind, joined as a client (with none of that kind,
+ the only session there is); a second `--detach=NAME`
while NAME runs (a plain session is named by its pid) says so in words
and exits 1. A session attached already is joined as a client, as one of
- the other kind or on another machine is (`--attach=SOCKET:NAME`, its own
- process, listed under the session by `--ps`), up to four clients: each
+ the other kind is, and one on another machine (`--attach=HOST:NAME`, over
+ `ssh -L`; `--attach=SOCKET:NAME` through a socket forwarded already): its
+ own process, listed under the session by `--ps`, up to three clients
+ (four views at once, the session's own among them): each
terminal or window its own layout, focus, cursors, selections, modes,
scroll and jumps, over the panes, texts, tags, terminals, messages and
registers they share. A terminal pane shown in two takes the size of the
@@ -1352,8 +1357,8 @@ to its end before the write is answered, and one that finds nothing fails,
terminal closing, lets that client go and leaves the others. With none
attached, `size C R` sets the screen, messages clear by the clock, and a
pty reports its size in pixels at the last cell size (8×16 before any),
- as CSI 14, 16 and 18 t do. Attaching from another machine is gone until
- the replicated clients (docs/next-daemon.md, phase 5).
+ as CSI 14, 16 and 18 t do. Each way of running, and what survives
+ what: #doc("running").
- *Config.* The startup file is `$XDG_CONFIG_HOME/pardes/init` when that is
absolute, else `~/.config/pardes/init` (macOS:
`~/Library/Application Support/pardes/init`). A line that fails is a