From cdba58ccda05d10dd02f9dcb447f624377744b21 Mon Sep 17 00:00:00 2001 From: Agando Date: Fri, 23 Oct 2026 21:22:30 +0200 Subject: fix(newos4): world_model_query default path parses again (v4.6.83-84) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _modelDigest() returned JSON.stringify(...) cut at 4000 chars plus '…(digest truncated)'. The tool then did JSON.parse() on it, so the default detail threw 'Unexpected end of JSON input' every single call; detail:'full' worked only because it returned the object untouched. The digest now returns an OBJECT (_modelSnapshot) and shrinks by reducing list lengths, then by dropping whole sections with an explicit 'omitted' list. The string form is generated at the edge and is always valid JSON. Verified: default call -> no error, 13-key snapshot, facts answered; caps 400/1200/4000 all under cap and parseable; the residual floor at cap 200 is identity fields only. --- help.html | 17 ++++++++++++++ main.html | 6 ++--- modules/core/core-bundle.js | 46 +++++++++++++++++++++++++++++--------- modules/core/module-aiassist.js | 5 ++++- modules/core/module-loader.js | 2 +- modules/core/module-world-model.js | 41 +++++++++++++++++++++++++-------- 6 files changed, 93 insertions(+), 24 deletions(-) diff --git a/help.html b/help.html index acffae6..5bf3543 100644 --- a/help.html +++ b/help.html @@ -1688,6 +1688,23 @@ listmods

📋 Changelog

+
+
v4.6.83–84 — October 2026 + world_model_query
+
    +
  • The first tool the system prompt tells the model to call no longer fails. + world_model_query with the default detail parsed + _modelDigest() as JSON — but that digest was a JSON string cut at 4000 + characters with …(digest truncated) glued on, so it threw + Unexpected end of JSON input every time. detail:"full" worked only + because it returned the object and never parsed anything.
  • +
  • A digest shrinks, it does not break. The model now builds a real + snapshot object and drops list lengths (40 → 20 → 10 → 5 → 3 → 1 → 0), and if still too + large drops whole sections, reporting what it left out in omitted. The string + form is only produced at the edge, and is always parseable.
  • +
+
+
v4.6.82 — October 2026 skill-create parser
diff --git a/main.html b/main.html index 81a87b3..41a7c82 100644 --- a/main.html +++ b/main.html @@ -1349,13 +1349,13 @@ - + - + - +