summaryrefslogtreecommitdiff
path: root/.agents
diff options
context:
space:
mode:
Diffstat (limited to '.agents')
-rw-r--r--.agents/skills/pardes-9p/SKILL.md17
1 files changed, 11 insertions, 6 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`