From f55e3055a4b85cf3920f5df1e3add3696153169c Mon Sep 17 00:00:00 2001 From: Agando Date: Fri, 23 Oct 2026 18:32:25 +0200 Subject: fix(newos4): grep, head and tail take every path argument (v4.6.67) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Packet 1's multi-path ask was only honoured by wc in v4.6.58 โ€” grep read only args[ai+1] and head/tail only positional[0], so `grep x a b` searched `a`, printed one file's hits, and exited 0. Same silent drop, three more commands. - grep: loops every path; multiple files print `file:line: text`, `-c` prints one count per file, missing files are reported per file and excluded from the summary count; single-file output unchanged - head: every path, `==> file <==` header when more than one; `head f 40` still works - tail: every path with headers; a numeric second positional is still the legacy `tail `; `-f` warns and follows only the first file instead of printing all of them and claiming otherwise Verified live on v4.6.67: grep "bug_id" a b -> a:2 + b:3 + "2 match(es) in 2 file(s)" grep -c "alpha" a b -> one count per file grep "alpha" a missing -> hits from a, per-file error, "in 1 file(s)" head -n 1 a b -> header + first line for each tail -n 1 a b -> header + last line for each tail a 2 -> legacy count still honoured tail -f a b -> warns, follows a only --- help.html | 3 +- main.html | 6 +-- modules/core/core-bundle.js | 103 +++++++++++++++++++++++++++++------------- modules/core/module-fs.js | 103 +++++++++++++++++++++++++++++------------- modules/core/module-loader.js | 2 +- 5 files changed, 148 insertions(+), 69 deletions(-) diff --git a/help.html b/help.html index 00eff18..4de3a9c 100644 --- a/help.html +++ b/help.html @@ -1689,13 +1689,14 @@ listmods

๐Ÿ“‹ Changelog

-
v4.6.57โ€“64 โ€” October 20262026-10-23
+
v4.6.57โ€“66 โ€” October 20262026-10-23
  • No shell โ€” and it now says so โ€” ;, && and || are refused with an explicit message instead of being folded into the command's argv (where wc -l f && grep -c x f returned a plausible wrong number). A | arriving from the AI run_command tool is refused too, because that path bypasses the pipe splitter and degraded the pattern to empty. Documented at the top of the command reference.
  • Multiple paths in wc โ€” wc -c a b printed only a and exited clean. It now prints one line per file plus a total, and reports each missing file separately.
  • ls prints text โ€” it rendered only clickable chips (DOM-only), so any capture โ€” the AI run_command tool, the diagnostics sweep โ€” saw an empty result and reported "directory empty".
  • view_module shows what is deployed โ€” it returned the _mods/<Class>.js edit cache first, unversioned, so after a rebuild it showed pre-fix source while the bundle was new. It now fetches the deployed file and prefixes the version; the cache is a labelled fallback.
  • load_skills searches tokens, not one phrase โ€” the query used to be tested whole against name+description+tags, so "telemetry dashboard" returned 0 while "telemetry" returned 1, and a sentence could never match. Skill bodies were never searched. It now tokenises (stopwords dropped), scores name > description/tags > body, weights by how many tokens matched, keeps a phrase bonus so word order cannot zero a real hit, and reports matchedTokens: 2/3 with each result.
  • +
  • grep, head and tail take several paths โ€” they read only the first path argument and exited clean on the rest, the same silent drop wc had. Multiple files now print file:line: text (grep) or ==> file <== (head/tail), and grep -c prints one count per file. tail -f stays single-file and says so.
  • An invalid grep pattern is an answer, not a crash โ€” it used to throw out of the command handler into the error ledger, which is the ledger that has to stay trustworthy. It now prints grep: invalid pattern: โ€ฆ and returns.
  • Agent status says what it means โ€” four agents showed sleeping with no way to tell "waiting for work" from "never handed a task". They now read parked โ€” NEVER SCHEDULED (0 tasks since โ€ฆ) or waiting for work (3 tasks, last โ€ฆ), plus a dispatch line and a warning when spawning happened but nothing was ever dispatched.
  • A guide you can actually find โ€” guides lists /guides/ newest-first; the help page has a Guides section with the command, the preview/cat hints and links to published guides.
  • diff --git a/main.html b/main.html index 57017c5..8a6ee5d 100644 --- a/main.html +++ b/main.html @@ -1349,13 +1349,13 @@ - + - + - +