From d0b4e65eeaf71c8215cda347e7546f3abc07b25b Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 15:18:39 -0300 Subject: The 9P docs find the mount through $NINE_MOUNT, and then the editor is just files --- .agents/skills/pardes-9p/SKILL.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to '.agents') diff --git a/.agents/skills/pardes-9p/SKILL.md b/.agents/skills/pardes-9p/SKILL.md index 8903a609..e708d005 100644 --- a/.agents/skills/pardes-9p/SKILL.md +++ b/.agents/skills/pardes-9p/SKILL.md @@ -13,24 +13,29 @@ relative to that root unless linked. ## Find the session through the mount -This machine keeps a FUSE mount of every posted session under `/mnt/9p`: -`/mnt/9p/pardes//` is one session's served root. Inside a pane, +Check `$NINE_MOUNT` first. `9ns --mntgen` sets it for every process it starts +(an interactive shell on this machine runs inside one), so a set `$NINE_MOUNT` +means the posted-9P registry is mounted there, usually `/mnt/9p`, and each +running editor is a directory `$NINE_MOUNT/pardes//`. Inside a pane, `$PARDES_9P` is that session's socket (`/run/user/1000/pardes-9p-.sock`), -so its pid is the directory to use, and `$PARDES_PANE` is the calling pane's -serial: +which names the directory, and `$PARDES_PANE` is the calling pane's serial: ```sh -m=/mnt/9p/pardes/$(basename "$PARDES_9P" .sock | sed 's/^pardes-9p-//') +[ -n "$NINE_MOUNT" ] || echo 'no 9P mount: use the Python client below' +s=${PARDES_9P##*/pardes-9p-}; m=$NINE_MOUNT/pardes/${s%.sock} cat "$m/index" cat "$m/pane/$PARDES_PANE/body" ``` +From there the editor is files: `cat`, `echo >`, `ls` and shell scripts are +the whole interface, and nothing below needs more than they do. + Entries for dead sessions stay listed and answer `Input/output error` on any access, so name the session you mean rather than globbing or taking the newest. `cat "$m/index"` is the cheapest liveness check, and `cat "$m/status"` reports the `pid`, `version` and `panes` of a session new enough to serve it. -`/mnt/9p/pardes` is the registry of posted sessions, mounted once for the +`$NINE_MOUNT/pardes` is the registry of posted sessions, mounted once for the machine. It is not the per-pane kernel mount the `Tty9p` builtin makes, which gives one pane's shell `$PARDES_MOUNT`; see [docs/v9fs.md](../../../docs/v9fs.md) for that. Either mountpoint serves the same tree. A `9ns --unix SOCKET -- cmd` -- cgit v1.3