summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.agents/skills/pardes-9p/SKILL.md14
-rw-r--r--docs/fs.md20
2 files changed, 23 insertions, 11 deletions
diff --git a/.agents/skills/pardes-9p/SKILL.md b/.agents/skills/pardes-9p/SKILL.md
index 1bb825fe..7f33937f 100644
--- a/.agents/skills/pardes-9p/SKILL.md
+++ b/.agents/skills/pardes-9p/SKILL.md
@@ -65,11 +65,13 @@ $m/pane/<n>/pty/run write one line, read `exit N` + its output, or `busy` / `e
$m/log recent events, then EOF: new|del|rename|save <serial> <name>, msg <serial|-> <text>,
run <serial> <line>, exit <serial> <N|?>, send <from> <to> <repl-id>,
ask <serial> <what> <choices>, answer <serial> <choice|->, changed <serial>
- [reloaded|deleted], newcol|delcol <serial>, restored|restoredcol <old> <new>,
+ [reloaded|deleted] (under unsaved edits; a clean reload; gone from disk),
+ unsaved <serial> <name> (each pane a refusal is about), newcol|delcol <serial>, restored|restoredcol <old> <new>,
dump|restore <path>, err <serial|-> <file>: <why>
(exec 3<>$m/log; echo follow >&3; cat <&3 replays what is there, then waits for new
ones; `echo follow new` waits for new ones only; tail -f does not wait;
- while read -r line <&3; do ...; done loses nothing within a session: a Restore
+ while read -r line <&3; do ...; done loses nothing within a session (through
+ FUSE, `read -t` never times out: use `timeout N` around the loop): a Restore
hangs every connection up, so dial again, and restart a 9ns mount)
$m/screen the rendered screen as JSON, frozen per open
$m/listeners this session's dial addresses
@@ -90,7 +92,8 @@ $m/ctl the settings, one a line as a write takes them; write a setting or
on its right, its panes going below that column's own, in order, and needs such a column);
a pane's builtins (Del, Save f, Collapse, which folds that pane, and the
column word Delcol, which closes that pane's column) go to $m/pane/<n>/ctl
-$m/commands every builtin: `Word`, `Word arg`, then `root` or `pane` (which ctl takes it)
+$m/commands every builtin: `Word`, `Word arg`, then `root`, `pane` or `both` (which ctl takes
+ it), a setting's values comma-joined, then ` -- ` and one sentence of what it does
$m/layout one line per column (16 columns at most: Newcol past that fails, no space for a column): serial index x width current|notcurrent empty|full pane-serials...; active <serial>
$m/tag the workspace tag (> replaces, >> appends, one line); $m/col/<serial>/tag a column's (serials stay, as panes' do)
$m/tagexec a word as a click in the workspace tag (pane/<n>/tagexec: in that pane's tag); every exec
@@ -384,8 +387,9 @@ and 32 screen/terminal-history snapshot handles.
A file's qid version is the pane's revision for `body`, `data` and `xdata`, so
`stat` sees an edit land without reading the text; it stays zero elsewhere.
-Stat sizes are real, and for `log`, `event` and `pty/data` report the length of
-the record a read would answer — zero when nothing is waiting.
+Stat sizes are real: for `event` and `pty/data` the length of the record a read
+would answer (zero when nothing is waiting), for `log` the whole ring, the text
+an open would freeze now.
## Terminal input and screen observations
diff --git a/docs/fs.md b/docs/fs.md
index 8e70af3e..6b393918 100644
--- a/docs/fs.md
+++ b/docs/fs.md
@@ -350,7 +350,10 @@ same tree without leaving the process.
(`LookWord list` on the root ctl lists every place in a `+Search` pane
instead, as pardes did before; `LookWord search` is the default). In a
terminal, which has no dot to go on from, a plain word is always listed
- in a `+Search` pane, its rows naming the terminal as `@p<serial>:<line>`,
+ in a `+Search` pane, its rows naming the terminal as
+ `@p<serial>:<line>:<cols>`, the columns a range, `@p3:12:5-9` (bytes 5
+ through 9 of logical line 12, 1-based, both ends in), which a look of the
+ row selects,
and look reads that pane back.
- a line written to `exec` is a middle click: a command word from
`src/builtins.zig` (`Save`, `Del`, `New`, `Newcol`, `Mount NAME DIAL`,
@@ -728,7 +731,8 @@ scratch, opens its prompt for a path, answered `answer <path>` or `answer
`answer <serial> <choice|->` when it is answered, by key or ctl, `-` for
taken back or for its pane closing with the question standing,
`changed <serial>` when a pane's file changed on disk under its unsaved
-edits (below), `unsaved <serial> <name>` for each pane an Exit, Restore,
+edits (below), `changed <serial> reloaded` when a pane with none reloaded
+it, and `changed <serial> deleted` when it was deleted or moved away, `unsaved <serial> <name>` for each pane an Exit, Restore,
Del or Delcol refuses over (before that write's `err`), and `save <serial> <name>`,
`dump <path>` when a Dump is written and `restore <path>` in a Restore's
new log after its panes' `new`s (a relative Restore path is looked for in
@@ -751,9 +755,9 @@ between words, and ends in an ellipsis, `…`, as an `err`'s reason is past
200; its serial is the pane it ran at, `-` when the keyboard was on a
column or workspace tag, or the line came to the root's ctl, `/tagexec` or
a column's ctl or exec), and `err <serial|->
-<file>: <why>` (the serial the pane's whose file it is, and for the root's
-`exec` and `look` the pane the line ran at, `err 3 exec: ...`; `-` for
-another root file) for every write or truncation the tree refused or that
+<file>: <why>` (the serial is that of the pane whose file it is, and for
+the root's `exec` and `look` the pane the line ran at, `err 3 exec: ...`;
+`-` for another root file) for every write or truncation the tree refused or that
failed -- through a mount a shell sees only the errno its kernel mapped the
reply to, usually `Invalid argument`, and this is the reason (`err 3 addr:
no match for regexp`). A record said again word for word, straight after
@@ -893,7 +897,11 @@ longer than a read comes in pieces, so a shell's `read` loop works: `exec
3<>$m/log; echo follow >&3; while read -r line <&3; do ...; done`. bash's
`read` takes a chunk, keeps one line and seeks back to just past it; a
followed log, `event` and `pty/data` answer a read at an offset inside
-their last answer from that answer again, so no record is lost. `tail -f`
+their last answer from that answer again, so no record is lost. Through a
+FUSE mount (9ns --mntgen) bash's `read -t` does not time out on a followed
+file: the read waits in the mount, where its timer cannot cut it; wrap the
+loop in `timeout N`, or read with `cat` in the background and poll what it
+wrote. `tail -f`
never writes `follow`, so it sees nothing new: use the follow open instead. `/screen` returns JSON with
`cols`, `rows`, `cursor`, a `styles` table, and row-major `cells` of
`[grapheme, style_index]`. Each open freezes one frame until close. A