283 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
4c1e000d85 release: v1.7.3
Prepare v1.7.3 notes for reading and book editing, expanded provider and
agent connections, learning records, model streams, and desktop upgrades.

Sync README prose and 11 translations, archive older release notes, and
update the package version. Resolve release lint/type blockers with explicit
parser and capability contracts, compatible Book call forwarding, accurate
auth task types, and quoted SQLite schema identifiers. Cover positional Book
calls and quoted legacy columns; align KB seed tests with visible retrieval
failure reporting. Keep HTTP fixtures independent of host proxies and translate
new Portuguese UI copy.

Release notes: assets/releases/ver1-7-3.md
2026-11-16 02:17:36 +08:00
Bingxi Zhao (Frank)
1ceec47b55 style: trim trailing blank lines in issue regressions 2026-11-15 01:43:44 +08:00
Bingxi Zhao (Frank)
92ce9a27f4 fix(mastery): retain explanations across failed assessment attempts 2026-11-15 01:04:25 +08:00
Bingxi Zhao (Frank)
e81f9c866d fix(mastery): save a standalone reference answer for qualitative practice 2026-11-15 01:00:14 +08:00
Bingxi Zhao (Frank)
be4f36c166 fix(mastery): normalize option arrays and clarify grading evidence
Local dev repairs for #2687, #2691. Regression checks cover reported symptoms and compatibility boundaries.
2026-11-15 00:44:09 +08:00
Bingxi Zhao (Frank)
e0872716f0 fix(runtime): announce input waits and reject oversized history plans
Local dev repairs for #2387, #2433, #2496. Regression checks cover reported symptoms and compatibility boundaries.
2026-11-15 00:44:09 +08:00
Bingxi Zhao (Frank)
461093db5f Merge PR #2657: fix: register fresh mastery questions across conversations
Update the status contract for session_id and prove concurrent retries in a fresh session create only one card while retaining the archived question (139 passed).
2026-11-14 23:11:02 +08:00
Bingxi Zhao (Frank)
ebd0f11083 Merge PR #2605: fix(mastery): let a new reply supersede an ungraded clarification 2026-11-14 22:58:03 +08:00
Bingxi Zhao (Frank)
b1054a2517 Merge PR #2626: fix(mastery): register choice answer by exact option body 2026-11-14 22:58:02 +08:00
Bingxi Zhao (Frank)
97b3d41084 Merge PR #2510: fix(mastery): stop tutoring-memory retries from growing every turn 2026-11-14 22:58:01 +08:00
Bingxi Zhao (Frank)
a76c661bd6 Merge PR #2614: fix(tools): keep web_search/web_fetch mounted in exclusive knowledge turns 2026-11-14 22:52:57 +08:00
maxsheng215-cyber
8f96d48bad fix: register fresh mastery questions across conversations 2026-11-12 16:34:05 -08:00
AleFlyX
635c0394ef fix(mastery): restore the trusted-key requirement for revision
The reserved-name filter closed the injection path, but the revision branch
still fell back to the public `answer` parameter when `_learner_message`
was absent. `answer` is model-authored, so a tool call without the trusted
key could replace a committed learner reply and credit mastery for text
the learner never typed.

Reproduced on the previous head: commit a help request, grade it
(`is_correct: null`, `final: false`), then call with only
`answer="photosynthesis"` — `is_correct: true`, mastery 0.5, and
`user_answer` rewritten.

Revision now requires `_learner_message`. Without it the stored answer
stands and the call re-grades as ungraded, which costs no credit and
rewrites nothing. This guard existed earlier on this branch and was lost
when the schema layer was removed; the regression test is restored with
it.

Note this is the same defect the reviewer reported on the first commit,
which means removing the schema work also removed the protection that had
been added to answer it. Worth remembering when cutting scope: verify what
each removed commit was actually guarding.
2026-11-11 23:36:05 +08:00
JohnnnSinaaa
37eb786bda fix(mastery): register choice answer by exact option body 2026-11-11 02:39:30 -08:00
AleFlyX
c26140abf3 fix(explore): bound the pre-pass connection as well as its reads
Opening the response stream was still unbounded, so a provider that hangs
while connecting parked the turn the same way a mid-stream stall did. The
answer loop bounds both halves (agent_loop.py:886 pairs the create() call with
the same _STREAM_IDLE_TIMEOUT_SECONDS the reader uses); mirror that here.
2026-11-11 18:33:25 +08:00
AleFlyX
13164c8200 fix(explore): bound the pre-pass stream so a stalled CLI cannot park a turn
ContextExplorer._call_llm iterated the provider stream with a bare
``async for``. A provider that connects and then stops yielding frames left
that await pending forever, so ``pre_loop`` never returned, the capability
never finished, and the turn stayed ``running``. The lease kept renewing, so
TurnRecoveryService saw a live owner and never claimed it; only an explicit
cancel freed the turn.

The answer loop already bounds its own reads (``_bounded_stream_chunks``,
90s), but the pre-pass runs before that loop starts, so it never inherited
the bound. Give it the same watchdog: on idle, raise
LLMProviderTransportError, which the existing ``except Exception`` around
``_run_loop`` turns into the single-pass briefing fallback.

Refs #2539 (the third attempt left ``running`` is a separate, pre-existing
bug, not the empty-error-message one this session's other PR fixes).
2026-11-11 18:24:57 +08:00
Harsh
f76de28db9 fix(mastery): count the whole memory request against the history plan
The fold loop counted only each exchange's archive text and always folded
the oldest exchange, so one exchange over the plan was sent whole, and
prior learner memory could push a fitting exchange over it.

Fold the longest prefix of whole exchanges whose complete request fits:
prior memory, the system instruction and the exchanges as _summarize()
serializes them, plus a reserve for the length line. If even the oldest
exchange doesn't fit, send no memory call; the watermark stays and the
exchange stays in exact recall.
2026-11-11 11:32:20 +05:30
evan188199-tech
9782043ab3 fix(tools): keep web_search/web_fetch mounted in exclusive knowledge turns
Exclusive knowledge capabilities (obsidian, marginnote4, subagent) dropped
the whole chat built-in surface, including web_search (still shown on in
settings) and the always-on web_fetch. Add a coexisting_tools declaration
to KnowledgeCapability (default empty; the product KBs declare the web
pair), honoured in compose_enabled_tools' exclusive branch under each
tool's usual gate (user toggle / always-on / conditional flag) and the
partner builtin_whitelist, mirroring the #650 KB coexistence. The
capability's system prompt now also names what actually mounted via
coexisting_tools_block, so the model no longer disclaims mounted tools.

Fixes #2612

Signed-off-by: evan188199-tech <238371241+evan188199-tech@users.noreply.github.com>
2026-11-11 11:18:04 +08:00
AleFlyX
aa6f1dfc0c fix(mastery): let a new reply supersede an ungraded clarification
On a free-text mastery question, a learner's "I don't get it, explain"
was judged ungraded and stored as the interaction's user_answer. Every
later mastery_grade call then preferred that stored reply over the
learner's actual answer — the judge rejected the same help request again
as ungraded, and the question could never be cleared. The gate sat at
mastery 0.0 until the tutor called mastery_skip_question itself.

The committed user_answer is authoritative on purpose: the pause/resume
boundary stores the learner's exact words, and a later model round must
not paraphrase them. It stops being authoritative once the learner has
said something else *and* the stored reply was never ruled on. Revise
through the existing record_question_answer path, which rewrites
user_answer and keeps the superseded attempt in the event log as
assessment.revised.

A repeated, empty, or whitespace-identical reply is not a revision, and
a group interaction is excluded: its child questions keep their own
per-leaf revisable logic.

This is the free-text half of #1004, which only covered choice cards.
Closes #2595.
2026-11-10 21:57:52 +08:00
Harsh
4ddaf9c0aa fix(mastery): stop tutoring-memory retries from growing every turn
A failed tutoring-memory call keeps the watermark, so the next turn
retried with the same backlog plus the newest exchange, and the call
grew without limit (#2496). Fold in only the oldest whole exchanges
that fit one history plan, at least one, and leave the rest
unsummarized so the watermark moves only past what was covered.

Related to #2496
2026-11-07 10:40:37 +05:30
Bingxi Zhao (Frank)
f7041045f3 Merge #2430 visual placeholder handling on the shared tool schema contract 2026-11-06 02:04:52 +08:00
Bingxi Zhao (Frank)
bff6530376 Merge #2325 from BenjiAvH 2026-11-06 01:56:40 +08:00
Bingxi Zhao (Frank)
8b14aa5ffe Merge #2402 from KKandLL-Forever 2026-11-06 01:56:25 +08:00
Bingxi Zhao (Frank)
7f933a25a0 Merge #2392 from x-labb 2026-11-06 01:56:25 +08:00
Bairan Zhang
a9705b3cc7 fix(mastery): read a source-less placeholder visual as absent
An endpoint that makes optional properties required forces the model to
send visual even for a text card, with every source left blank.
prepare_visual always rejects an unnamed source, so mastery_quiz failed
on every call and no answer card appeared (#2427).

Treat a visual whose sources name no knowledge base, asset, path, hash
or figure as absent, for single cards and group leaves, as #2170 does
for blank resume ids and empty groups. A visual naming any source still
goes through prepare_visual unchanged.
2026-11-04 20:38:45 +08:00
wangkai
26e3a4b52c fix: reject mismatched mastery card replay receipts 2026-11-03 10:53:45 +08:00
x-labb
15c79b4356 fix(mastery): stop retrying a truncated tutoring memory on every turn 2026-11-02 18:44:34 +01:00
Benjamin Schwing
1a00aa9b5c fix(mastery): continue with next after mastery_assess clears a gate
mastery_assess returned mastered and next but no instruction, unlike
mastery_grade. After a passing explanation the tutor tended to end the
turn on an announcement of the next topic, leaving the learner nothing
to answer.

Add an instruction to the final mastery_assess payload: when mastered,
confirm briefly and continue with next in the same reply (or say the
path is complete); when not mastered, explain the gap and ask again.
The clarification (non-final) result is unchanged. One matching sentence
in the en/zh mastery loop prompt.

Fixes #2323
2026-11-01 18:51:26 +00:00
LucianVane
c1fe11b899 fix(mastery): grade a clarification together with the explanation it completes
When mastery_assess asks for clarification, keep the explanation for that
objective in the session. The next assessment grades the earlier explanation
plus the clarification instead of the short reply alone.

Fixes #2249
2026-10-31 23:55:11 +08:00
Bingxi Zhao
e2625fcd57 Merge pull request #2170 from maxsheng215-cyber/fix/codex-optional-tool-arguments
fix: preserve optional Codex tool arguments for mastery quizzes
2026-10-31 18:28:02 +08:00
Eapp1e
de8b935df3 fix(capabilities): escape LIKE wildcards in the MarginNote store
search() and linked_objects() fed the caller's text straight into a LIKE
pattern without an ESCAPE clause, so "%" matched every object, "_" matched
every object with a character, and linked_objects("100%") also linked the
object that stores 1000.

Escape the value once and declare ESCAPE '\' on every clause, matching
the other LIKE call sites in the repository.

Signed-off-by: Eapp1e <163811520+Eapp1e@users.noreply.github.com>
2026-10-30 17:40:50 +00:00
我也有友人账
d24648d5ed fix: preserve optional Codex tool arguments for mastery quizzes 2026-10-29 11:42:59 -07:00
Bingxi Zhao (Frank)
e495fd6002 Merge origin/dev and reconcile creation contracts and replay tests 2026-10-29 18:13:47 +08:00
Bingxi Zhao (Frank)
01d7c0ed55 feat: add conversational creation drafts and refresh local dev UI 2026-10-29 18:11:52 +08:00
Bingxi Zhao (Frank)
d09a4d3a4f Merge pull request #2028: configurable review strategies 2026-10-29 01:04:33 +08:00
Bingxi Zhao (Frank)
9aadac3e3b merge: integrate current dev with modular installation 2026-10-28 01:23:48 +08:00
Bingxi Zhao (Frank)
fbab59acbf feat: modularize installation and enforce feature dependency boundaries 2026-10-28 01:02:29 +08:00
Bingxi Zhao
90cc9349be Merge pull request #2051 from cgycorey/fix/mastery-revise-inactive-arguments
fix(mastery): read idle placeholder arguments as omission (#2047)
2026-10-28 00:19:46 +08:00
Bingxi Zhao
be11014b94 Merge pull request #2085 from ZealerG/fix/mastery-history-prefix
fix(mastery): keep shared history prefixes stable for prompt caching
2026-10-27 23:59:53 +08:00
Bingxi Zhao
c663700aeb Merge pull request #2000 from drakeo338/claude/1993-fix
fix(mastery): show the picked option's text next to its letter in the grade seed
2026-10-27 23:57:51 +08:00
Bingxi Zhao
b0ae5ede22 Merge pull request #2016 from KKandLL-Forever/fix/solve-plan-respects-replan-budget
fix(solve): refuse a second solve_plan so replans stay budgeted
2026-10-27 23:57:12 +08:00
Bingxi Zhao (Frank)
ef04a48a92 Merge remote-tracking branch 'origin/dev' into HEAD 2026-10-27 22:05:45 +08:00
Bingxi Zhao (Frank)
2e1972f4b1 Merge remote-tracking branch 'origin/dev' into HEAD 2026-10-27 21:41:28 +08:00
Bingxi Zhao (Frank)
e9968b8e2d Merge remote-tracking branch 'origin/dev' into HEAD 2026-10-27 21:41:12 +08:00
Bingxi Zhao (Frank)
aa33202c07 Merge remote-tracking branch 'origin/dev' into HEAD 2026-10-27 21:40:05 +08:00
Bingxi Zhao (Frank)
4205da1651 Merge remote-tracking branch 'origin/dev' into HEAD 2026-10-27 21:39:47 +08:00
Bingxi Zhao (Frank)
e347c0c2e0 fix: preserve tutoring replies and stabilize preview runtime
Keep learner-facing explanations visible across finish checks, persistence, and replay. Remove mastery prose heuristics and prioritize learner objections.

Coordinate service shutdown and descendant cleanup, and preserve video lesson identity and playable results across chat completion and reload.
2026-10-27 17:58:46 +08:00
ZealerG
75d73c24bd fix(mastery): keep shared history prefixes stable for prompt caching 2026-10-27 13:29:03 +08:00
Bingxi Zhao (Frank)
6bbcc00c55 Merge dev into preview, preserving preview features
Integrate dev fixes with preview's Python/TypeScript schedulers, chat queue, learning navigation, and live turn persistence.
2026-10-27 01:16:58 +08:00
Bingxi Zhao (Frank)
28c11e2ae8 feat: update notes, chat interactions and workspace UI on preview
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.
2026-10-26 22:13:34 +08:00