diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 15:18:39 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | d0b4e65eeaf71c8215cda347e7546f3abc07b25b (patch) | |
| tree | 05630cc230618e8ab26ff9d3d11771563b80d005 | |
| parent | eeadda6e7db3334e15708de2d7b5396f539c8186 (diff) | |
| download | pardes-d0b4e65eeaf71c8215cda347e7546f3abc07b25b.tar.gz pardes-d0b4e65eeaf71c8215cda347e7546f3abc07b25b.zip | |
The 9P docs find the mount through $NINE_MOUNT, and then the editor is just files
| -rw-r--r-- | .agents/skills/pardes-9p/SKILL.md | 17 | ||||
| -rw-r--r-- | docs/fs.md | 6 | ||||
| -rw-r--r-- | src/fs-help.txt | 2 |
3 files changed, 16 insertions, 9 deletions
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/<pid>/` 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/<pid>/`. Inside a pane, `$PARDES_9P` is that session's socket (`/run/user/1000/pardes-9p-<pid>.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` @@ -62,8 +62,10 @@ private namespace: A `9ns --unix` mount lives in the private namespace of the command it runs, and nothing outside that command sees it. The mount everyone on the machine shares is the registry one, `9ns --mntgen` (default `/mnt/9p`): every running -editor posts itself there, so `/mnt/9p/pardes/<pid>/` is that editor's tree -for any process. A new pane made through `pane/new` is a scratch named +editor posts itself there, so `$NINE_MOUNT/pardes/<pid>/` is that editor's tree +for any process. 9ns exports `$NINE_MOUNT` to everything it starts, so a +script checks that variable to know the mount is there, and takes `<pid>` from +the name of `$PARDES_9P` (`pardes-9p-<pid>.sock`). A new pane made through `pane/new` is a scratch named `<dir>/+New` until it is given a name, and closing a column's last pane leaves such a `+New` in its place (`Delcol` closes the column). diff --git a/src/fs-help.txt b/src/fs-help.txt index 79701628..8948ac78 100644 --- a/src/fs-help.txt +++ b/src/fs-help.txt @@ -16,7 +16,7 @@ pane/<n>/ name body tag ctl addr dot limit data xdata sel dirty mark scroll er appended to its directory's +Errors pane) event look exec, pty/ on terminals; rmdir closes os/, src/ the host filesystem; the editor's own sources (-Dembed-sources=true builds only) -Below, $m is the mount (/mnt/9p/pardes/<pid> via 9ns --mntgen; PARDES_MOUNT in a Tty9p shell): +Below, $m is the mount: $NINE_MOUNT/pardes/<pid> when 9ns --mntgen set $NINE_MOUNT; PARDES_MOUNT in a Tty9p shell. cat $m/index which panes exist n=$(cat $m/pane/new) make a pane, take its serial |
