aboutsummaryrefslogtreecommitdiff
path: root/modules/core/module-aiassist.js
Commit message (Collapse)AuthorAgeFilesLines
* feat(newos4): world-model-ask answers with the LLM, grounded in the model ↵Agando2026-10-221-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | (v4.6.50) `world-model-ask` was a 10-keyword lookup: any real question returned "Unknown query. Try: modules, skills, ...". The documented example ("what changed since yesterday") compared nothing — it restated the current snapshot. - _modelDigest(): whitelisted snapshot (measured 942-965 chars on fixtures, ~3.3 KB live) + recent error sample + changesSinceLastSnapshot - _buildAskPrompt(): "answer only from this JSON, never invent numbers, name the command that would produce missing data" - ask(): connects Ollama on demand, answers via chat(), falls back to the facts path with a visible warning; --facts keeps the instant lookup - _diffSincePrev(): keeps one previous snapshot in /system/world-model.prev.json so "what changed" is a real diff (files 136 -> 140) - world_model_query tool returns the snapshot (digest or detail:full) instead of ten canned strings; no nested LLM call inside a tool call - help text now says what it does; node test modules/test/test-world-model-ask.js (11 assertions, runs the real class) Verified live v4.6.50: facts "Loaded 46 modules" | LLM "The snapshot does not contain information regarding the cause of memory growth ... use world-model-refresh" | diff "files 136 -> 140" | tool snapshot 3,334 bytes.
* fix(newos4): coreutils flags + loop-guard arg key, both found by the agent's ↵Agando2026-10-221-5/+12
| | | | | | | | | | | | | | | | | | | | live run (v4.6.49) Agent session surfaced two real defects: 1. The A4 prompt told it to use grep -n / sed -n 'N,Mp' / wc -l / head -N — none of those flags parsed: grep treated '-n' as the pattern (6/6 variants failed), wc read '-l' as a filename, head looked for a file named '-2', sed had no range parser. Fixed the tools, not just the text: grep now accepts -n/-i/-c/-v/-l (line numbers were already printed), wc accepts -l/-w/-c, head accepts -N and -n N, sed accepts Np and N,Mp, tail no longer prints a blank line for a trailing newline. Prompt re-ranked to the working forms. 2. Loop guard keyed calls by tool name plus the raw arguments field. When arguments was already an object (parsed upstream), the key became 'run_command:[object Object]', collapsing distinct batched commands into one signature and producing false "called 3x" warnings. Now the key is JSON.stringify(arguments) whenever it is not a string (3 sites: sig, _sigR, _sigD). Verified live v4.6.49: grep -n/-c, wc -l, head -2, sed -n '2,3p', tail -n 1 all correct.
* fix(newos4): GLM review follow-ups for AI read/context (v4.6.47)Agando2026-10-211-23/+70
| | | | | | | | | | | | | - loop guard: a mutation unblocks the replay but no longer erases the repeat counter (identical mutating calls could loop forever) - tool traces are per agent tag, flushed in a catch as well as on success, ring-buffered (first 2 + last 10) so verification reads survive - read_file notes are metadata only (path/range/next_offset); no file bodies, no secrets, and web_search/web_fetch output is excluded from durable context (injection surface) - trace is role:'system' (was 'assistant' — the model re-read it as its own answer) - surrogate-safe pagination, 500 floor / 16000 cap, prompt limits aligned - prompt now names checks that exist in the in-page terminal (test, grep -n, wc -l) - compressed summary capped at 4000 chars; denied-destructive tool result carries tool_call_id
* feat(newos4): AI paged file reads, durable tool traces, 12k context budget, ↵Agando2026-10-211-24/+82
| | | | | | | | | | read/tool/verify prompt rules (v4.6.46) - read_file: offset/limit + JSON {total_chars,truncated,next_offset} (was a hard 8000-char cut with no resume) - tool results now leave a per-turn trace that is persisted into session context and survives compression - maxContextTokens 2000 -> 12000; compression keeps 8 exchanges and 400 chars/msg - system prompt: page big files, prefer grep -n / sed -n / head, re-read + verify after every edit - verified in the live browser: 30k file pages 0->8000->16000, prompt section present, v4.6.46 served
* newOS4 v4.6.34: running tool ledger in the prompt (D4)Agando2026-10-181-0/+16
|
* newOS4 v4.6.33: progress-based turn budget (D3)Agando2026-10-181-0/+22
|
* newOS4 v4.6.31: tool-result memo cache with epoch invalidation (D2)Agando2026-10-181-1/+35
|
* newOS4 v4.6.30: per-agent session isolation (D1)Agando2026-10-181-5/+15
|
* newOS4 v4.6.29: progress-aware loop guard + agent attributionAgando2026-10-181-21/+91
|
* fix: sequential safe-tool execution — parallel fan-out corrupted ↵Agando2026-09-291-4/+7
| | | | print-capture attribution + shadow diff pairing
* newOS4 v4.6.15: reentrant print-capture stack, AI tail -f block, read-only ↵Agando2026-09-291-17/+16
| | | | sed in safeRead, security test harness (21 checks)
* fix: regex captures full command name + suggestion in unknown-cmd tool errorAgando2026-09-291-1/+1
|
* fix: parse per-call captured output for unknown-cmd error (race-free under ↵Agando2026-09-291-4/+4
| | | | Promise.all)
* newOS4 v4.6.14: race-safe AI loop guard (depth counter), cover _capture* ↵Agando2026-09-291-6/+15
| | | | entry points, structured JSON tool error
* newOS4 v4.6.13: typo suggestion bar (one-tap fix), consistent unknown-cmd ↵Agando2026-09-291-1/+4
| | | | messages, AI loop guard
* auto: 2026-07-09_06:00 changesAgando2026-07-091-26/+908
|
* auto: 2026-07-02_06:00 changesAgando2026-07-021-15/+318
|
* auto: 2026-06-25_06:00 changesAgando2026-06-251-22/+502
|
* auto: 2026-06-24_06:01 changesAgando2026-06-241-1/+26
|
* auto: 2026-06-23_18:00 changesAgando2026-06-231-7/+14
|
* auto: 2026-06-23_06:00 changesAgando2026-06-231-0/+2
|
* auto: 2026-06-22_18:00 changesAgando2026-06-221-2/+7
|
* auto: 2026-06-18_18:00 changesAgando2026-06-181-13/+33
|
* auto: 2026-06-18_06:00 changesAgando2026-06-181-5/+26
|
* auto: 2026-06-17_06:01 changesAgando2026-06-171-7/+189
|
* auto: 2026-06-16_06:00 changesAgando2026-06-161-1/+6
|
* auto: 2026-06-13_18:00 changesAgando2026-06-131-9/+115
|
* auto: 2026-06-13_06:00 changesAgando2026-06-131-4/+4
|
* auto: 2026-06-10_18:00 changesAgando2026-06-101-9/+37
|
* auto: 2026-06-10_06:00 changesAgando2026-06-101-44/+75
|
* auto: 2026-06-09_06:00 changesAgando2026-06-091-105/+28
|
* auto: 2026-06-08_18:00 changesAgando2026-06-081-0/+10
|
* auto: 2026-06-07_18:00 changesAgando2026-06-071-13/+59
|
* auto: 2026-06-06_06:00 changesAgando2026-06-061-64/+439
|
* auto: 2026-06-05_18:01 changesAgando2026-06-051-2/+46
|
* auto: 2026-06-04_06:00 changesAgando2026-06-041-13/+195
|
* auto: 2026-06-02_18:00 changesAgando2026-06-021-1/+73
|
* auto: 2026-06-02_06:00 changesAgando2026-06-021-2/+2
|
* auto: 2026-06-01_18:00 changesAgando2026-06-011-1/+77
|
* auto: 2026-06-01_06:00 changesAgando2026-06-011-4/+6
|
* auto: 2026-05-31_06:00 changesAgando2026-05-311-10/+37
|
* auto: 2026-05-30_06:00 changesAgando2026-05-301-97/+16
|
* auto: 2026-05-29_18:01 changesAgando2026-05-291-3/+103
|
* auto: 2026-05-29_06:01 changesAgando2026-05-291-60/+61
|
* auto: 2026-05-27_06:00 changesAgando2026-05-271-10/+39
|
* auto: 2026-05-26_06:00 changesAgando2026-05-261-0/+23
|
* auto: 2026-05-25_18:02 changesAgando2026-05-251-0/+1435