From 2eec7a5c7ab9b724a718ece8b1ffc434677068ac Mon Sep 17 00:00:00 2001 From: Agando Date: Fri, 23 Oct 2026 17:53:39 +0200 Subject: fix(newos4): refuse shell composition, wc takes multiple paths (v4.6.58) Packet 1 and 3 (silent wrong answers from a shell-less terminal). - detectComposition() in the security gate refuses ; && || | before dispatch. `;` used to fail loudly, but `&&`/`||` folded the right-hand side into the left command's argv (wc -l f && grep -c x f returned "42 42"), and a `|` arriving from the AI run_command tool bypassed splitPipe entirely and degraded the pattern to empty -- which matches every line. Operators inside quotes are untouched. - wc accepts multiple paths: one line per file plus a total, per-file errors for missing paths. `wc -c a b` used to print only `a` and exit 0. - help.html: "There is no shell" callout at the top of the command reference, plus the v4.6.57/58 changelog entry. Verified live on v4.6.58 by replaying the exact call sequence used by both paths: interactive `wc -c a b` -> "14 a / 10 b / 24 total"; `&&` and `;` refused; `echo "a && b"` still echoes; AI run_command semantics with `|` and `&&` refused; single command and multi-file wc still return real output. --- help.html | 23 ++++++++++++++ main.html | 6 ++-- modules/core/core-bundle.js | 74 +++++++++++++++++++++++++++++++++++-------- modules/core/module-fs.js | 48 ++++++++++++++++++++-------- modules/core/module-loader.js | 2 +- modules/core/terminal.js | 26 +++++++++++++++ 6 files changed, 147 insertions(+), 32 deletions(-) diff --git a/help.html b/help.html index 9a9a363..86816d7 100644 --- a/help.html +++ b/help.html @@ -484,6 +484,18 @@ diff a.txt b.txt

๐Ÿ“– Full Command Reference

+
+ โš ๏ธ There is no shell. The terminal splits your line into argv and hands it to + one command โ€” it does not interpret ;, &&, || or + redirection. Those are now refused with an explicit message instead of being folded + into the command's arguments (which used to produce a plausible wrong answer): + wc -l a && grep -c x a โ†’ refused; run two commands. + A single cmd | cmd pipeline works in the interactive terminal (not in the AI + run_command tool). wc, grep and friends take + one path per call unless documented otherwise โ€” wc -c a b now + prints a line per file plus a total. +
+

System

@@ -1659,6 +1671,17 @@ listmods

๐Ÿ“‹ Changelog

+
+
v4.6.57/58 โ€” 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.
  • +
  • Predictor arithmetic โ€” the stored field named mape held a sum, so any JSON consumer read a mean that was n times too large (now errorSum); errorPct is stored raw and clamped only at render (a 475ร— miss used to be flattened to 500%); predictions are floored at 1 s and floor-hits are not scored, because one 0.079 s aborted run was rounding the next prediction to 0 s.
  • +
+
+
v4.6.56 โ€” October 20262026-10-23
    diff --git a/main.html b/main.html index 8f9811e..5c2bf8f 100644 --- a/main.html +++ b/main.html @@ -1349,13 +1349,13 @@ - + - + - +
CommandDescriptionExample