<feed xmlns='http://www.w3.org/2005/Atom'>
<title>newos4/modules/ext/console.js, branch main</title>
<subtitle>newOS4 - the browser terminal that runs WebX11 user spaces</subtitle>
<id>https://newos.webx11.duckdns.org/newos4/atom?h=main</id>
<link rel='self' href='https://newos.webx11.duckdns.org/newos4/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/'/>
<updated>2026-10-29T11:29:14+00:00</updated>
<entry>
<title>fix(newos4): js keeps its string literals — dispatcher forwards the raw command line (v4.6.130)</title>
<updated>2026-10-29T11:29:14+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-29T11:29:14+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=12968861b81c6aef3ca15488476db0b33fbf8104'/>
<id>urn:sha1:12968861b81c6aef3ca15488476db0b33fbf8104</id>
<content type='text'>
_parseArgs() treats quote characters as delimiters and drops them, so every string literal in a
js expression died before eval: `js "abc".toUpperCase()` reached the module as
`abc.toUpperCase()` → ReferenceError: abc is not defined. Same for `js import('fs')` →
`import(fs)`. Found while verifying the v4.6.128 console fix
(plan 2026-10-29_112000-newos4-parseargs-strips-js-string-literals.md).

- terminal.js: checkAndRun() records the untokenised line (`_currentRaw`), _dispatch() forwards it,
  dispatchCommand(cmd, args, rawText) passes it to the module. Security classification still runs
  on the tokenised form, and pipes/AI/script-runner calls pass nothing, so they behave as before.
- console.js: `js` evaluates _expr(args, rawText) — the raw remainder. `node -e` deliberately does
  NOT: the tokenizer already keeps `'…'` inside `"…"`, and the raw form would hand eval the string
  literal `"import('fs')"` instead of the import (caught by the live probe, not by review).
  js-run keeps tokenised paths.
- modules/test/test-parse-args.js: tokenizer table (records the deletion as the current contract),
  dispatcher plumbing asserts, _expr cases, and the user-visible paths. 27 assertions.
- module-loader.js + main.html + bundle: v4.6.130 (129 was minted, then console.js changed again —
  re-minting so no cached client keeps the intermediate).

Verification
  node modules/test/test-parse-args.js        -&gt; 27/27 pass
  same file against HEAD sources (git show HEAD:...)  -&gt; TypeError: _expr is not a function (RED)
  scripts/lint-no-undef.py terminal.js console.js     -&gt; clean, 122 cross-file globals
  core-bundle.js rebuilt from HEAD sources + this patch in /tmp/iso (the working tree carries
  another session's uncommitted ollama-manager.js `_httpError`); diff vs HEAD bundle = 14 lines,
  all mine. critical-ext-bundle.js byte-identical.
  Live page v4.6.130 (real executeCommand, output captured):
    js "abc".toUpperCase()        -&gt; ABC
    js 'a b'.split(' ').length    -&gt; 2
    js JSON.stringify({a:1})      -&gt; {"a":1}
    js 6*7                        -&gt; 42
    js import('fs')               -&gt; red "Failed to resolve module specifier 'fs'" + Node-builtin hint
    node -e "import('fs')"        -&gt; same error + hint (was printing the expression as a string)
    echo "two words"              -&gt; two words
    js-run /nope.js               -&gt; js-run: /nope.js: No such file
    unhandledrejection count      -&gt; 0

The sibling's parked terminal.js hunk (BillingModule registry entry) was stashed for this commit and
is restored in the working tree afterwards; it is not part of this change.
</content>
</entry>
<entry>
<title>fix(newos4): js console handles promise rejections + Node-builtin hint (v4.6.128)</title>
<updated>2026-10-29T11:13:33+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-10-29T11:13:33+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=5178cea00a841b5fa57db2235b5163e271c8a762'/>
<id>urn:sha1:5178cea00a841b5fa57db2235b5163e271c8a762</id>
<content type='text'>
evalJS() evaluated the expression bare and printed JSON.stringify(result), so a
rejected thenable (e.g. `js import('fs')`) became `{}` on screen while the rejection
escaped to window.onunhandledrejection and was auto-filed as a runtime bug report
(RPT-20261028-172211-9c7f2adb, cluster 480x). evalJSFile() already had .then/.catch —
the asymmetry was the defect.

- modules/ext/console.js: thenable branch in evalJS() awaits and catches; new
  _printError() is the single error sink for all four catch paths and appends a hint
  when a bare specifier fails to resolve ("'fs' is a Node built-in; the browser has no
  Node — use the VFS (ls/cat/run, terminal.fs) instead").
- help.html: js / js-run rows say "browser only — no Node built-ins".
- module-loader.js + main.html: v4.6.128.

Verification (/tmp/test-console-fs.js, 11 asserts, new Function harness over the module):
  GREEN 11/11 — rejection prints one red error + hint, no unhandledRejection; resolved
  thenable prints its value; sync value/throw unchanged; js-run file + missing file OK.
  RED 4/11 against .bkp-console-20261029_121243/console.js — A1/A2/A3 print `{}`,
  A4/G2 leak "Failed to resolve module specifier 'fs'".
  node --check modules/ext/console.js → OK.
console.js is loaded separately via extKeys (not in critical-ext-bundle.js), so no bundle
rebuild — proven by `grep -c JSConsoleModule modules/ext/critical-ext-bundle.js` = 0.

Consumes STEER-20261028-195043-8084. Plan: .hermes/plans/2026-10-29_063000-newos4-js-console-fs-specifier.md
</content>
</entry>
<entry>
<title>auto: 2026-06-18_18:00 changes</title>
<updated>2026-06-18T16:00:54+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-06-18T16:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=0eca39021874a673933ebb82b973002b682e7a4b'/>
<id>urn:sha1:0eca39021874a673933ebb82b973002b682e7a4b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>auto: 2026-06-18_06:00 changes</title>
<updated>2026-06-18T04:00:40+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-06-18T04:00:40+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=fba6df22dae297c89fa0df065628dddded66c69c'/>
<id>urn:sha1:fba6df22dae297c89fa0df065628dddded66c69c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>auto: 2026-06-10_06:00 changes</title>
<updated>2026-06-10T04:00:30+00:00</updated>
<author>
<name>Agando</name>
<email>roduccomm@gmail.com</email>
</author>
<published>2026-06-10T04:00:30+00:00</published>
<link rel='alternate' type='text/html' href='https://newos.webx11.duckdns.org/newos4/commit/?id=39b2df36ee5ccea52558d0537bfee87058558e94'/>
<id>urn:sha1:39b2df36ee5ccea52558d0537bfee87058558e94</id>
<content type='text'>
</content>
</entry>
</feed>
