injectKaTeX inserted its init script with a string replacement, where "$$"
means "$". The display delimiter became "$", so `$$...$$` stayed raw and
every `$...$` rendered as display math. Replacer functions keep the script
as written.
Widgets often write math after load (step-by-step reveals, slider
readouts), which auto-render never saw. A throttled MutationObserver now
renders it, skipping math already rendered.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found by an adversarial pass over the merged changes.
**A tool call could run under another call's name and arguments.**
``_ToolCallBuffers.add`` registered every buffer under the placeholder
item id ``fc_0``, which providers that omit ``item.id`` all share, and
``response.output_item.done`` looked buffers up by that same placeholder.
A ``done`` event for a call that was never announced therefore resolved to
whichever unrelated call last claimed it. Reproduced: a second call to
``list_kb`` was dispatched as ``delete_kb`` carrying the first call's
``{"kb": "secret"}``. The placeholder is a display fallback, not an
identity — never alias it, never look up by it.
**A blocked CDN froze every HTML visualization.** The iframe height
bridge attached its observers on ``DOMContentLoaded``, but ``injectKaTeX``
adds deferred script tags, and deferred scripts must all run before that
event fires. With jsdelivr unreachable the observers never attached and
every visualization sat at its initial height. The bridge is injected just
before ``</body>``, so it can gate on ``document.body`` instead and attach
before the CDN fetch resolves.
**RAG citations dropped their sources.** ``_extract_rag_citation`` was the
only extractor not handed ``tool_metadata``; it re-parsed ``raw_answer``,
which is the prose shown to the model, not JSON. Every RAG pipeline
normalises its retrieval into ``metadata["sources"]`` — already the shape
``_rag_source_payload`` reads — so prefer it and keep the answer parse as
the fallback. This is the user-visible half of #808 that normalising the
payload alone did not restore.
Also hoist the Gemini "minimal, not none" families beside
``_PROVIDER_DEFAULT_OFF_PATTERNS``, whose docstring calls itself the single
source of truth for exactly this knowledge.
What happens while the answer is still being written. Prose that shared a
round with a tool call vanished into the trace, a truncated generation read as
the model deciding it had finished, and local indexing sat on the event loop
everything else needed.
- DSML tool calls are stripped from the stream incrementally instead of
all-or-nothing. Once a round's content channel showed markup, the rest of it
was diverted to the thinking channel, so any prose around the call left the
answer. DSMLStreamFilter suppresses only the envelope and the invoke blocks;
text before, between and after streams and persists (turn_runtime carries
answer_visible rounds into the assembled answer). An incomplete invoke is
released verbatim by flush, and a 512-char ceiling stops a stray `<` in
ordinary prose from making the live stream wait for a closing bracket.
- DSML parameter decoding consults the declared schema. DeepSeek marks
essentially every parameter string="true", arrays and objects included, so a
container argument reached the tool as a string of JSON. A parameter the
schema types array/object is parsed when the payload actually matches; the
provider's string contract still wins elsewhere. The catalog is kept when a
provider rejects native `tools` and the loop falls back to DSML — exactly
when the parser needs it.
- The round budget is three stages: exploration, a bounded settlement window
(MAX_SETTLEMENT_ROUNDS, tools still available so an already-started
interaction can finish), then one tool-less hard finish. A `length` finish is
an incomplete generation, not a decision to stop: the visible prefix is kept
and a continuation requested, under the same upper bound of exploration + 4.
- Resident memory across the process tree, at GET /api/v1/system/memory and in
the settings strip. runtime/memory_probe.py walks the tree; psutil is
imported lazily with a /proc fallback, so a missing wheel costs the strip and
not the app, and non-admins get {available: false}. The strip drops
LLM/Embedding/Search, which restated what the Models and Chat pages own.
- Local LightRAG indexing runs on a worker thread's own event loop.
RAG-Anything's local backends do synchronous graph merging and JSON
serialization inside async methods, stalling unrelated API and LLM work;
OwnerLoopBridge forwards LLM, vision and embedding calls back to the
request's loop with a copy of the caller's contextvars.
- Mastery works from the persisted question. learning/pending.py projects a
PendingQuestion into the public contract (prompt, type, label/body map) with
the expected answer server-side; ask_user renders that instead of display
data the model re-authored, and registration validates the quiz shape rather
than silently accepting a contradictory one.
- Connected KBs answer honestly about local files (empty listing, explicit 409
where a local file is required) instead of resolving a raw/ directory that
does not exist. resolve_public_output_path replaces is_public_output_path so
the new request-scoped /api/outputs endpoint authorizes and resolves in one
operation and fails closed with no request user. Visualize iframes measure
body content so they shrink as well as grow, and the chat page's model list
is fetched once behind a single-flight hook.
test_forced_finish_still_reports_the_tools_the_turn_carried asserted the old
two-stage budget (exhausted exploration = the next call is the tool-less
finish); it now drives through settlement to reach the real hard finish. Also
syncs the README prose, all ten translations, and the release-notes archive.
- SvgRenderer: <img> data-URI -> sanitized inline DOM. Dependency-free
sanitizeSvg strips script/foreignObject/on*/js-urls and scopes element ids +
url()/href/aria refs so multiple inlined svgs don't collide. Multi-<svg>
content is split into independent figures.
- svg-theme.css: themed class system (t/ts/th, box/node/arr, c-* 9-ramp)
following light/dark via CSS vars and the app Geist font; svg sized width:100%
by viewBox to avoid the 300x150 inline collapse.
- HtmlRenderer: iframe height auto-fit + receives the widget's sendPrompt.
- iframe-html.ts: inject the sendPrompt bridge + a ResizeObserver height report.
Frontend visualize only — the chat page.tsx composer-prefill listener is left in
the working tree alongside the unrelated chat changes there.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>