Nested ask_user option and multi_select fields repeated what the
top-level description already says; the option label/description rule
is now stated once in the options description. The cron and
learning_update descriptions drop sentences that their parameter
descriptions repeat. Types, required fields and enums are unchanged.
Refs #2975
CallToolTool answered every unforwarded call with "load it first". That
was wrong for a tool already in tools[] (an MCP tool, a built-in) and for
malformed arguments, and for the former it sent the model round in a
loop. DeferredToolLoader.proxy_refusal now names the reason (missing
name, call_tool itself, already in the tool list, proxy off, unknown,
not loaded) and proxy_arguments checks the arguments: an object, or a
string holding valid JSON for one; anything else is refused. The
pipeline's _resolve_proxied_tool_calls and CallToolTool both go through
proxy_call_refusal, so the message matches the decision.
Setup tools loaded through load_tools are proxied. Opening setup mode
later left them proxied: not in tools[], no rules (already loaded), and
a note that never mentioned call_tool. An opened mode's tools are now
made native, like mastery's outline tools; a setup turn whose tools are
still proxied gets a hint to reach them through call_tool.
Also: call_tool is mounted only when the loader has built-in/capability
tools to proxy; its manifest order no longer duplicates load_tools'; a
forwarded call without an id is not marked for renaming.
Refs #2972
load_tools appended the loaded schema to the end of tools[]. tools[] is the
first thing in the provider's prompt-cache key, so the next request of the
same turn re-processed the system prompt and the whole history.
When the turn mounts the new call_tool builtin, load_tools now returns the
loaded tools' definitions in its result and leaves tools[] alone; the loop
forwards each call_tool call to the named tool before dispatch, so the tool
runs with its own argument checks, injected kwargs and trace, while the
history keeps the model's own call. Tools loaded this way stay proxied for
the session (loaded_tools.json gains proxied_tools). Runtime loads that must
land in tools[] pass native=True; the TypeScript engine keeps the old
behaviour.
* fix(pptx): resolve font fallback in PDF previews and exports
* test: match host path semantics in the PPTX preview fixture
---------
Co-authored-by: Qiuner <wdst3635@163.com>
Native requests no longer send the text manifest, whose when_to_use and
input_format hints held a few constraints the schemas did not: paper_search
takes at most 3 English words, reason's usage condition, a non-empty rag
query, and not inventing a Zotero user ID or passing an API key the user
did not supply. The rest of the hints were already in the schemas (ask_user's
12-character header included).
Refs #2973
When the numbered page exceeded the 128k-character budget, read_file cut
the text mid-page but still reported the requested range: the hint
pointed past lines that were never shown, or claimed the end of the
file. Stop at the last whole line that fits and base the continuation
offset on it.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Declare document-scope support at the pipeline contract and reject unsupported scoped queries before rewrite/retrieval; verify empty scopes also fail closed (29 retrieval tests and 10 service tests passed).
Addresses Air R1/R2 review blockers on top of the opened PR head:
Settings GET/PUT /api/settings/web-fetch with UI control; DeepSeek fetch
uses identity encoding, raw bytes, and capacity checks before buffer extend;
provider-branding treats `local` as generic.
Air Codex R3 on MacBook Air: READY.
source_path alone is a document scope, not a visual request: an ordinary
text query with no page, figure, region or asset_id selector now stays on
the text retrieval path, restricted to that one document, instead of
entering exact-source visual inspection and failing reference_required.
- RAGTool routes source_path-only queries to a scoped semantic search that
verifies the source exists (and its source_hash when given), forwards
document_keys to the backend, and never falls back to a whole-KB search:
a backend that cannot enforce the scope, or a document with no matching
passage, fails explicitly (source_scope_unsupported /
source_scope_no_match) with foreign passages withheld.
- LlamaIndex scoped retrieval now recognises plain-text documents, which
carry only file_path metadata, by their raw-relative position — never by
bare basename, so sub/notes.txt does not leak into a notes.txt scope —
and admits nodes without a page_status.
- Tool schema description and en/zh prompt hints state the contract;
selector-contract tests cover the scoped text path and a new suite
covers raw-relative scope matching.
Add a FETCH_PROVIDERS spec table next to SEARCH_PROVIDERS and a
deeptutor/services/fetch/providers registry, mirroring the search-provider
shape: local (the unchanged in-process extractor, default) and deepseek
(POST /v1/tools/fetch, Bearer auth; key from kwargs > env > DeepSeek chat
profile).
fetch_url_as_markdown gains backend=None -> DEEPTUTOR_FETCH_BACKEND ->
local. The scheme/SSRF gate runs before any remote backend so a private
URL is never handed to a third party. Retryable backend failures
(401/402/403/408/429/5xx, network, missing key) fall back to the local
extractor; 400/404/413 and an empty body are hard failures. Remote
outcomes keep the requested URL for citations; the crawler/KB site sync
stay local. All tests mock HTTP offline.
extract_questions_with_llm raises ValueError("LLM returned empty or None
response") when the completion is None, but its except handler then sliced
result_text[:500] — None[:500] — raising TypeError and masking the intended
error. A None completion is a realistic provider outcome (content filter,
transient empty response) in the exam-mimic question pipeline.
Build the preview from (result_text or "") so the handler reports the clean
ValueError.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- The Add model panel now asks for a model ID (prefilled from provider
defaults and discovered models) and keeps Continue disabled until it is
filled, so an unusable row can no longer reach the draft.
- The model editor marks a blank ID as required, explains it inline, and
blocks "Set as default" until it is fixed.
- Apply now names the first incomplete model and opens the page and row
that can repair it, instead of failing with a message pointing nowhere.
- Add/selection state lives in the URL, so refreshing no longer swaps the
add panel for the list (or vice versa).
- Backend guidance points at the current page names (Language models /
Embedding models / Search) instead of the removed Catalog page.
- Regression tests cover the add flow, URL state, editor validation, and
the Apply preflight; new i18n keys for en/zh/de/pl/fr/uk.
Co-Authored-By: Claude <noreply@anthropic.com>
_split_command_args toggled its in-string state with a single-char check
(current[-1] != '\\'), so a real closing quote preceded by an escaped
backslash (\\") was misread as escaped. The parser stayed in-string, swallowed
the following comma separators, and returned the whole remainder as one
argument — e.g. Text["a\\", 1, 2] was reported as an unterminated string and
its scalar-to-point repair was lost. Track escaping with a flag that flips on
each unescaped backslash so an even run closes the string.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove course pages, APIs and the course_study capability. Add anchored note
threads and reviewed learning-block generation, queued and withdrawable chat
messages, quote attachments, side chats, and the calendar/favorites/navigation
updates.
Keep preview's existing backend architecture. Wire the new features through
its Python application and existing chat engine, retain legacy selected-text
requests, persist mid-turn messages in replay, and restore note context when
regenerating. Leave stored user data intact.
Validate frontend contracts, dependency boundaries, types, 1290 node tests,
840 rendered tests, lint, localization and the production build. Exercise
session/notes/API regressions, 53 chat-engine tests and 20 Python/native
integration tests with isolated runtime data.
web_fetch decoded every response with httpx's response.encoding, which
only reads the Content-Type header and otherwise defaults to UTF-8. Pages
that declare their charset in the markup (common for GBK, Shift_JIS and
EUC-KR sites) came back as replacement characters in the web_fetch tool,
Immersive Reading URL imports and website knowledge-base crawls.
Pick the charset the way a browser does: byte-order mark, then the
Content-Type charset, then a <meta> declaration in the first 1024 bytes,
then UTF-8. Labels such as gb2312 and iso-8859-1 decode as their
superset encodings (gb18030, cp1252), matching the WHATWG Encoding
standard.
Add rich text and learning blocks, media uploads, page trees, and revisioned notebook storage. Present AI suggestions at their target blocks with durable accept and dismiss actions.
Unify saved outputs as Favorites with typed expandable blocks, stable source links, atomic batch insertion, nesting, dragging, and undo/redo.
Validation: 99 frontend tests and 99 backend tests pass in an isolated snapshot, along with TypeScript, scoped ESLint, dependency architecture, and locale parity checks.
Optional selectors are now advertised as nullable, page is one-based with
minimum 1, and region is four coordinates bounded to 0..1 with omitted/null
meaning the full page. At the tool boundary a legacy empty region counts as
omission instead of switching to visual routing, and malformed page/region
selectors fail visibly with a correctable message instead of being clamped
or rerouted to replacement evidence.
Bind original visual sources and keys to supported tasks; verify accepted model pixels, preserve cues/assistance and canonical attempts, keep uncertainty ungraded, expose challenge/repair, and separate required visual evidence from generic text mastery.
Expose inspectable extraction coverage, retain structured provenance, resolve bilingual figure and table references without similarity substitution, and provide bounded local page/region fallback with source identity checks.