aboutsummaryrefslogtreecommitdiff
path: root/modules/core/terminal.js
Commit message (Collapse)AuthorAgeFilesLines
* fix(newos4): one error counter for errors/dashboard/world-model (v4.6.61)Agando2026-10-231-0/+32
| | | | | | | | | | | | | | | | | | | | | Packet 2 (three surfaces, three answers). Measured first: `errors` scanned /logs/current.log for [ERROR] lines, but that file only ever receives explicit terminal.log('ERROR', ...) calls -- exactly one call site in the whole app -- so it read 0. The dashboard added DebugSupervisor._errorDB plus failed tool calls (18), and the world model read the debug DB alone (11). - terminal.countErrors() / countLogErrors(): the single counter, exposed on the one object all three surfaces already hold - `errors` prints the canonical total with its breakdown, the entry list (hash, count, severity, message), and reports the log scan separately as a mirror - dashboard health.errors and health.errorBreakdown derive from it - world model telemetry.recentErrors derives from it, plus errorsBySource - terminal.log('ERROR', ...) now also records into DebugSupervisor, so the log is a human-readable mirror of one store instead of a second store almost nobody wrote Verified live on v4.6.61: with a seeded debug entry + failed tool call, all three report 2; a single log('ERROR') call moves debug 1->2 and the total by exactly 1 (the mirror line is counted once, in the log, and reported separately).
* fix(newos4): refuse shell composition, wc takes multiple paths (v4.6.58)Agando2026-10-231-0/+26
| | | | | | | | | | | | | | | | | | | 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.
* fix(newos4): empty-pipeline crash, stacks in reports, frame in digest + ↵Agando2026-10-231-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | dashboard (v4.6.55) Root cause: splitPipe() splits on every '|', so `help |`, `| wc -l`, `a || b` produced a stage with no argv and executePipeChain() called parts[0].toLowerCase() on undefined — 989 occurrences, first filed 2026-10-20, unfixable from the report because bug reports dropped the stack that named executePipeChain:3955. Same unguarded read existed in _classify(). - terminal.js: _classify() returns an inert classification for empty argv; executePipeChain() parses each stage once, filters stages with no argv (so the last real stage stays final), warns only when the whole pipeline is empty. Last-stage test now compares against the filtered length. - module-system.js: `bug` diagnostics include the stack (10 frames, 1200 chars); auto-filed reports carry it too — they are the majority of the inbox and were previously message-only. - report.php: per-stack 2 KB cap; fingerprint pinned to message/source/count so adding `stack` cannot break dedupe against reports filed before today. - ingest.php: first_frame() parsed once on ingest, stored as `frame` on each signature. - newos4-triage.py: FRAME| line with the first application frame. - dashboard.php: frame under each Top Errors row. - modules/test/test-pipe-guard.js: ordering tripwire (guard must precede the parts[0] read). Verified: test RED exit=1 -> GREEN exit=0; browser matrix on v4.6.55 (help |, | wc -l, echo hi || echo bye, ls | | wc -l, |) -> 0 new error signatures, "|" warns; auto-filed report now carries stack (RPT-...f3e31124, archived after the probe); frame = modules/core/core-bundle.js:3955:42; maintain OK; skill audit 7/7.
* fix(newos4): dashboard shows the real world model and stops dying after 10 s ↵Agando2026-10-221-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (v4.6.51) Two defects, both verified live before/after: 1. The World Model panel always said "Not synthesized yet". The page had a renderer for data.worldModel and _collectDashboardData() never set it -- the model was right there in WorldModelModule._model. Now collected and mapped to the renderer's exact keys (model has modules.loaded/skills.count/memory.nodes, the page reads modules/skills/memoryNodes), plus changesSinceLastSnapshot and the recent-error sample, with an honest "not synthesized" fallback. 2. The page discarded any payload older than 10 s and its own 5 s auto-refresh then showed "Cannot connect to newOS4". Stale payloads are now rendered with their age ("Data as of 1:20:14 AM - 3m ago"), labelled amber past 5 min. Also: the Refresh button wrote a localStorage key nobody read -> the terminal now listens for it and re-collects (page says "No terminal tab answered" when no terminal tab is open); storage events repaint instantly; the dead /api/dashboard fetch (404 on all three paths, 5 s stall) is gone; `dashboard --watch` / `--stop` re-collects every 5 s; header says the data is this browser's instance. Verified v4.6.51: panel rows "Synthesized 34s ago / v4.6.51 / 46-22 / 136-3 / 1 nodes 0 edges / OK / none recorded"; 130 s-old payload still renders with "- 3m ago" and no banner (previously "Cannot connect"); storage event moves the footer 13s -> 0s; watch timer advances the payload, --stop clears it; mobile 360/390 px all OK; 0 console errors.
* newOS4: interactive AI course (terminal module, portal, atlas, telemetry, ↵Agando2026-10-181-2/+10
| | | | daily maintenance+cron) + free store card
* newOS4 v4.6.15: reentrant print-capture stack, AI tail -f block, read-only ↵Agando2026-09-291-3/+22
| | | | sed in safeRead, security test harness (21 checks)
* fix: parse per-call captured output for unknown-cmd error (race-free under ↵Agando2026-09-291-3/+0
| | | | Promise.all)
* newOS4 v4.6.14: race-safe AI loop guard (depth counter), cover _capture* ↵Agando2026-09-291-2/+7
| | | | entry points, structured JSON tool error
* newOS4 v4.6.13: typo suggestion bar (one-tap fix), consistent unknown-cmd ↵Agando2026-09-291-13/+41
| | | | messages, AI loop guard
* newOS4: Ctrl+C/Esc stops tail -f follow; security whitelist gains sedAgando2026-09-291-7/+22
|
* fix: add kanban to packages.json, update cache version to 2026-07-29Agando2026-07-291-1/+1
|
* auto: 2026-07-09_06:00 changesAgando2026-07-091-58/+233
|
* auto: 2026-06-24_06:01 changesAgando2026-06-241-0/+55
|
* auto: 2026-06-23_18:00 changesAgando2026-06-231-0/+2
|
* auto: 2026-06-23_06:00 changesAgando2026-06-231-24/+144
|
* auto: 2026-06-22_18:00 changesAgando2026-06-221-5/+5
|
* auto: 2026-06-18_18:00 changesAgando2026-06-181-10/+32
|
* auto: 2026-06-18_06:00 changesAgando2026-06-181-1/+15
|
* auto: 2026-06-17_06:01 changesAgando2026-06-171-39/+58
|
* auto: 2026-06-16_06:00 changesAgando2026-06-161-2/+11
|
* auto: 2026-06-14_06:00 changesAgando2026-06-141-30/+81
|
* auto: 2026-06-13_18:00 changesAgando2026-06-131-13/+47
|
* auto: 2026-06-10_18:00 changesAgando2026-06-101-16/+54
|
* auto: 2026-06-10_06:00 changesAgando2026-06-101-3/+3
|
* auto: 2026-06-09_18:00 changesAgando2026-06-091-1/+1
|
* auto: 2026-06-09_06:00 changesAgando2026-06-091-7/+30
|
* auto: 2026-06-08_18:00 changesAgando2026-06-081-3/+3
|
* auto: 2026-06-07_18:00 changesAgando2026-06-071-1/+1
|
* auto: 2026-06-06_18:01 changesAgando2026-06-061-2/+6
|
* auto: 2026-06-06_06:00 changesAgando2026-06-061-11/+339
|
* auto: 2026-06-05_18:01 changesAgando2026-06-051-0/+4
|
* auto: 2026-06-04_06:00 changesAgando2026-06-041-1/+4
|
* auto: 2026-06-02_18:00 changesAgando2026-06-021-2/+5
|
* auto: 2026-06-02_06:00 changesAgando2026-06-021-46/+71
|
* auto: 2026-06-01_18:00 changesAgando2026-06-011-6/+64
|
* auto: 2026-06-01_06:00 changesAgando2026-06-011-14/+44
|
* auto: 2026-05-31_06:00 changesAgando2026-05-311-10/+87
|
* auto: 2026-05-30_06:00 changesAgando2026-05-301-3/+62
|
* auto: 2026-05-29_18:01 changesAgando2026-05-291-1/+129
|
* auto: 2026-05-28_18:00 changesAgando2026-05-281-7/+19
|
* auto: 2026-05-28_06:02 changesAgando2026-05-281-0/+50
|
* auto: 2026-05-27_06:00 changesAgando2026-05-271-114/+338
|
* auto: 2026-05-26_06:00 changesAgando2026-05-261-7/+18
|
* auto: 2026-05-25_18:02 changesAgando2026-05-251-0/+1362