Commit Graph

80 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
1fe74df0ed fix(notebook): decouple evidence from chat sessions (#1519) 2026-09-21 14:50:02 +08:00
Bingxi Zhao (Frank)
a84a191861 fix(learning): make qualitative evidence replay idempotent 2026-09-21 12:50:01 +08:00
Bingxi Zhao (Frank)
0fff9246c0 fix(mastery): bind repairs to exact question evidence 2026-09-21 12:45:43 +08:00
Bingxi Zhao (Frank)
01da2757bd fix(learning): complete adaptive linked evidence flow 2026-09-21 10:35:22 +08:00
Bingxi Zhao (Frank)
087ec1e393 style(mastery): format state integrity changes 2026-09-21 10:24:25 +08:00
Gao-Chenkai
33fa74b5b6 fix(mastery): keep learning evidence bound to objective identity
Replace no longer reuses positional IDs for unrelated waypoints, invalid
questions can be voided or re-keyed, and defer advances the route without
faking mastery.

Fixes #1527

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 10:23:53 +08:00
Bingxi Zhao (Frank)
da856ad670 release: v1.6.9
Ship folder-based workspaces and data migration, daily practice, redesigned
provider and model settings, and streaming conversation improvements.
Synchronize README translations and document the archive/permanent-delete
upgrade behavior in assets/releases/ver1-6-9.md.

Reduce initial JavaScript by deduplicating English resources and loading
animation features after hydration. Keep the existing route size budgets.
Update regression fixtures and browser audits for scoped URLs and the new
settings and learning interfaces.
2026-09-21 02:30:40 +08:00
Bingxi Zhao (Frank)
20d2596f44 Merge branch 'codex/question-pr-1475' into codex/question-pr-1504 2026-09-19 16:13:22 +08:00
Bingxi Zhao (Frank)
d9bd49834b fix(learning): scope retry quality to the current question attempt 2026-09-19 16:12:57 +08:00
Gao-Chenkai
3eb831d108 feat(learning): persist cross-surface Focus-Check in Question Bank
Route Mastery, Book, and Immersive Reading attempts through one review record so reading quizzes are server-graded, retryable, and show the learner's pick next to the reference answer.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-17 21:21:15 +08:00
Gao-Chenkai
96b6cb89d3 Merge origin/dev into feat/issue-1471-adaptive-srs-mvp 2026-09-15 21:32:25 +08:00
Gao-Chenkai
a448e8743c fix: keep adaptive SRS UI compatible with base tests 2026-09-15 21:31:20 +08:00
Gao-Chenkai
21cd2bb23f feat: complete adaptive SRS persistence and review UI 2026-09-15 21:00:01 +08:00
Bingxi Zhao (Frank)
897fce52f2 fix(mastery): say which gate a number is being read against
Two surfaces reported quiz accuracy as if it were progress toward a gate that
never reads it.

`mastery_assess` aimed at a quantitative objective is refused outright, naming
the tools that do apply. The mirror direction was silent: posing a question at
a concept objective registered it like any other, so a tutor could work an
objective its questions cannot open and never be told. That direction stays
allowed — a question is a fair way to probe a concept before teaching it — but
it now says what grading the answer will and will not do.

The objective detail panel drew `mastery` as a progress bar for every gate.
On a qualitative one that is quiz accuracy, so an objective could show a full
bar next to an outline dot that was correctly still hollow. A boolean gate now
reads all-or-nothing, and says plainly that practice questions are not what
opens it.
2026-09-14 15:15:54 +08:00
Bingxi Zhao (Frank)
10f643dafe fix(mastery): stop sending the tutor back to quiz a gate no quiz can clear
A concept or design objective clears on `mastery_assess` alone: quiz accuracy
lands in `mastery_levels`, which the qualitative gate never reads. Grading a
correct answer on one of those objectives nevertheless told the tutor to teach
the gap and pose the next question with `mastery_quiz` — an instruction to
loop forever on an objective no question can open. The conversation then
narrates progress it never recorded, while the study screen's outline rail,
reading the aggregate correctly, never moves. That mismatch is what learners
report as "the outline doesn't refresh".

The reading the tutor had to work from could not have corrected it either: a
qualitative objective answered right reports mastery 1.0 against threshold
1.0 with `mastered` false, and `next` is the path-wide cursor, so it often
names some other objective entirely.

Grading now branches on the gate it just consulted — pointing at
`mastery_assess` for qualitative objectives and leaving the quantitative
advice untouched — and reports which gate the mastery number was read
against.
2026-09-14 15:04:57 +08:00
Bingxi Zhao (Frank)
2ad1d45d18 fix(mastery): stop a review session offering to start the topic it is teaching
Clicking "start review" opened a session whose first reply was a card
offering to start a session on that same topic. Clicking it opened another,
which offered the card again — one conversation per click, all on one topic,
some bound to no topic at all (#1412). Those conversations begin with nothing
to quiz against, so they answer in prose; that is the other half of the same
report (#1411).

The generator is a premise the tool states as fact. `mastery_new_session`
stays mounted inside a mastery session on purpose — sending the learner to a
*different* topic mid-course is a real thing to want — and its hand-off
instruction tells the model not to tutor the topic here, because "the mastery
tutor picks up on the other side". Inside that topic's own session there is no
other side, and nothing in the tool's result said so, so the model kept
proposing the trip it was already on.

The turn knows which topic it is tutoring; the tool did not. Binding it the
way the mastery tools already get `_mastery_path_id` lets the tool answer for
itself: a hand-off aimed at the topic this conversation *is* gets refused, with
the instruction to teach the lesson here. A hand-off to any other topic is
untouched, and so is `mastery_open_session` — returning to an older
conversation on the same topic is not a loop.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 02:02:53 +08:00
NoxsMedia
86aa5d0edf fix: restore formatting and deterministic CI checks 2026-09-07 10:20:03 +00:00
Bingxi Zhao (Frank)
04040a2c06 release: v1.6.5
Ship a content workspace you choose, one exec tool for every language,
Mastery Path modes that gate its tools, and Settings that grades
readiness instead of listing faults.

Release notes: assets/releases/ver1-6-5.md
2026-09-06 13:46:29 +08:00
evan188199-tech
db24303eb0 feat(learning): add visual learning board (#1194)
Co-authored-by: XZH <cto@xzh.ai>
2026-09-03 15:34:00 +08:00
Bingxi Zhao (Frank)
93df3d48b7 release: v1.6.4
Ship lighter isolated runtimes, richer Books and Mastery flows,
Reading/session polish, and explicit model API capabilities.

Release notes: assets/releases/ver1-6-4.md
2026-09-03 01:38:54 +08:00
Bingxi Zhao (Frank)
6e6e56aedb release: v1.6.3
Ship the breaking front- and back-end runtime and route refactor,
learner and guardian flows, grounded reading, knowledge and parser
updates, and recoverable long-running streams.

Release notes: assets/releases/ver1-6-3.md
2026-09-02 04:09:11 +08:00
Bingxi Zhao (Frank)
fc39543bc0 feat: integrate frontend backend and canonical routes 2026-09-01 22:24:29 +08:00
Bingxi Zhao (Frank)
542204d2df Merge pull request #1081 from evan188199-tech/codex/assessment-history
# Conflicts:
#	deeptutor/api/routers/question_notebook.py
#	deeptutor/services/session/sqlite_store.py
#	web/components/space/question-bank/useQuestionBank.ts
#	web/locales/en/app.json
#	web/locales/zh/app.json
2026-08-31 19:51:48 +08:00
Bingxi Zhao (Frank)
ce7c2dc2dc release: v1.6.1 — one key, one navigator, one sidebar you arrange
Model configuration was one layer replicated seven times: every service
stored its own profile with its own credentials, so a single OpenRouter
key had to be pasted into five separate pages. This release splits that
in two — a **connection** holds one vendor credential and links it down
to every service that vendor can serve, and a **task model** takes the
calls nobody asks for (naming a conversation, writing the composer's
starting points) off the model picked for actual reasoning. Both are
opt-in; existing per-service profiles resolve exactly as before.

Around that: Settings drops the card grid for a persistent searchable
navigator whose landing page answers "what state am I in" instead of
repeating the directory; Mastery Path files study conversations under
their topic and opens them in the tutor rather than dropping them on
/home; the sidebar folds features into More and reorders by drag; the
reading companion is rebuilt from /home's own chat components; and the
LightRAG engine talks to the SDK directly, so its extra no longer drags
MinerU in transitively.

Also back-merges PR #1041 (Anthropic SDK 1.x temperature via extra_body)
and PR #741 (owner-only auth secret/token files), which had been merged
straight into main and never flowed back to dev.

Release notes: assets/releases/ver1-6-1.md
Gates: pre-commit 15/15, ruff clean, pytest 5802 passed, web 450 node
tests, eslint 0 errors, docs build clean.
2026-08-30 13:19:42 +08:00
Bingxi Zhao (Frank)
d67fc1d515 fix(mastery): hand a topic's materials to the tutor that teaches it
A mastery topic's sources were consumed exactly once — to ground outline
generation — and then never seen again. Tutoring carried none of them, while
the tutor's own system prompt claimed to "teach from the learner's own
materials". Asked "can you see the materials I gave you?", the tutor answered
"I can see them!" and cited a framework it had only ever read in a module name.

Express topic materials in the vocabulary the chat runtime already speaks: an
Attached-Sources-style manifest plus a {source_id: full_text} index. Filling
those two values on a mastery turn is enough — ExploreContextCapability
activates on a non-empty source_index and runs its read_source investigation
before the tutor's first LLM call. No new tool, no new loop, no change to any
other capability.

Books are split per chapter: a whole book cannot be one tool result, and a
chapter is the unit one knowledge point needs. Knowledge bases are listed but
carry no id — they are searched with rag, not read. Materials that cannot be
loaded are listed as unavailable rather than dropped, because being able to
name what it does not have is what stops the tutor inventing it.

Verified on a live turn against a real book: the tutor now calls
read_source(bk-...-ch_...) and answers with the six real chapters; pointed at
an unreadable book it says so and offers the knowledge base instead.
2026-08-30 02:51:02 +08:00
Bingxi Zhao (Frank)
fc0be68d6f wip: course / partner groups in progress 2026-08-29 22:29:53 +08:00
Bingxi Zhao (Frank)
d790419548 Merge remote-tracking branch 'origin/dev' into dev 2026-08-29 19:14:40 +08:00
XZH
9f64cde3f9 fix(assessment): use mastery point names 2026-08-28 20:54:48 -07:00
Bingxi Zhao (Frank)
5df28a0dc8 fix(mastery): read the module tree models actually emit
mastery_build rejected everything that was not exactly
[{name, knowledge_points: [{name, type}]}]. Smaller and local models
routinely answer with 'objectives' instead of 'modules', 'title' or
'description' instead of 'name', bare strings instead of knowledge-point
objects, or a flat objective list with no module layer at all. Each of
those was dropped by a silent 'continue', so the path saved empty, never
appeared in Learning Space, and the learner saw no error (#1019).

Normalize the shape before validating it, and make the one remaining
failure state the expected schema instead of just refusing.
2026-08-29 11:37:27 +08:00
Bingxi Zhao
8e1a6656c5 Merge pull request #1023 from evan188199-tech/codex/fix/mastery-skip-tool 2026-08-29 11:32:09 +08:00
Bingxi Zhao (Frank)
d57d2983ef feat(mastery): complete v2 learning workflows 2026-08-28 14:58:43 +08:00
ZQR1101
81e5ff8e3d fix(tools): decode unicode escapes in ask_user payloads
Models sometimes emit literal \\uXXXX runs in ask_user and mastery_quiz tool args. Decode dense non-ASCII runs when building learner-facing payloads so cards do not leak escapes (#973).
2026-08-28 13:21:08 +08:00
Bingxi Zhao (Frank)
3f8644d6e9 fix(mastery): persist v2 metadata for migrated topics 2026-08-28 00:16:39 +08:00
Bingxi Zhao (Frank)
1b5ad913d4 feat(mastery): ship atlas and guided study journeys 2026-08-28 00:09:44 +08:00
Bingxi Zhao (Frank)
3f2a70f168 feat(mastery): add v2 topic backend and archive migration 2026-08-27 23:10:15 +08:00
XZH
f5e4b7cd48 fix(mastery): add explicit question recovery exit 2026-08-26 18:57:06 -07:00
Bingxi Zhao (Frank)
8525527836 fix(mastery): require explicit choice answer intent 2026-08-26 01:33:31 +08:00
ZQR1101
85602ca161 fix(mastery): don't freeze choice gates on clarifying composer text
Composer clarifying questions on a choice card were persisted as the formal
answer, after which mastery_grade could never map them to an option and the
gate stalled. Skip unreadable commits and allow a later readable pick to
recover already-stuck interactions.
2026-08-26 01:31:31 +08:00
Bingxi Zhao (Frank)
bd80a4d28a release: v1.5.17
Partners stop being a deployment-wide admin resource and become
per-user: three nested rights (manage / use / neither) replace the
blanket admin gate on the router, each member can build and own their
own, and every person's conversations with a partner stay private to
their account. Grants keep working and now offer only admin-managed
partners. Channel runtime state moves from one directory per channel to
one per partner — copied, not moved, and only when its owner is
unambiguous — so two partners can finally run the same channel.

Around that: a knowledge base can track GitHub repositories and re-sync
their Markdown (#903); Antigravity CLI joins My Agents now that Gemini
CLI is retired (#828); personal WeChat signs in from a QR code drawn in
the browser instead of the server log (#951); a chat account can be
linked to a DeepTutor account with /link; containers re-apply the extras
they declare instead of losing them at compose down (#762); and
`deeptutor doctor` answers whether a workspace is ready to run (#959).

Reliability, largely from community PRs: embeddings survive a
rate-limited provider through key rotation, a retry budget and a global
throttle (#962); MinerU parsing and code execution work on Windows
(#844, #964); indexing fails bounded instead of hanging (#946); MinerU
page-layout blocks stop being indexed as content (#949); voice uploads
carry a MIME the transcription API accepts (#945); and reasoning effort
can be overridden per conversation (#641).

Release plumbing: notes in assets/releases/ver1-5-17.md, v1.5.13
archived, __version__ 1.5.17, README Releases row and all eleven
translations synced.

Two defects found by the release gate and fixed here:

- Six partner routes — the four channel-onboarding endpoints and both
  WeChat QR endpoints — kept the _auth-only mount they had inherited
  from the blanket admin gate, so any signed-in account could start a
  QR login for someone else's partner and write a bot token into its
  channel config. All six now declare _MANAGEABLE, and a sweep test
  asserts no {partner_id} route is left ungated.
- A configured api_key became `str | list[str]` when key rotation
  landed, but ten call sites pass it somewhere that takes one key; a
  list would have rendered into an Authorization header verbatim.
  keypool.primary_api_key reduces at each boundary.

Gates: pre-commit (all 15 hooks), ruff check + format, pytest
5276 passed, web 605 node tests, docs build.
2026-08-25 02:24:35 +08:00
pederbe
1e99da1a93 fix: reject duplicate mastery quiz options (#956) 2026-08-24 16:51:36 +08:00
Bingxi Zhao (Frank)
b71aef2b5b feat(mastery): carry explanation and difficulty into the question bank
A mastery attempt reached the bank as a bare right/wrong, reviewable
only as a score. mastery_quiz now takes both fields, held server-side
like expected_answer so neither leaks onto the card being answered, and
the sync writes them through. An unrecognised difficulty is dropped
rather than rejected — a mislabelled badge must not cost the learner a
question.
2026-08-20 01:29:55 +08:00
Bingxi Zhao (Frank)
96d6df9eb1 release: v1.5.13
Book is the bulk of this one. Compilation outlives the request that
started it, so a bus owned by that request dropped every background event
and "watch your book being written" degraded into a frozen page; the
stream is now owned per book by the process and survives a refresh or a
reconnect. Reading progress is finally recorded — `visited_page_ids` and
`bookmarked_page_ids` had been declared but never written for the life of
the feature — and rolls up into a completion score and weak chapters. A
book can also leave the app now, as one self-contained Markdown document,
with non-ASCII titles surviving the download.

Two scheduling defects that were invisible in production are fixed: the
same page compiled twice concurrently (billed twice, one result
discarded), and a book grinding on through a provider outage until every
chapter was half-generated. The source sweep is bounded and allocated
round-robin rather than spent on the first few knowledge bases, and
retrieval now tells indexed bases from connected pointers, so an Obsidian
vault or a remote IMA library no longer contributes zero while looking
like a source with nothing relevant. Confirming a spine shows a live
per-chapter estimate derived from the Section Architect's own templates.

Also here: three home starter suggestions built from memory recall,
mastery-path handoff moved into one module that changes lease, session
preference, and live turn together, and account-level Tencent IMA
credentials with the per-KB pair still winning.

Notes: assets/releases/ver1-5-13.md

This commit also carries the README prose sync, the eleven translated
READMEs, the release-notes archive sweep, and the version bump. Two gate
fixes ride along: the `Stamped` protocol is declared read-only so the
frozen `EntityStamp` satisfies it, and six GraphRAG adapter tests that
reached a deep `graphrag` import without guarding it now skip like their
four neighbours instead of failing where the extra is not installed.
2026-08-17 11:22:26 +08:00
Bingxi Zhao (Frank)
94a6edd563 feat(mastery): harden path state and turn recovery 2026-08-17 09:57:55 +08:00
Bingxi Zhao
8560157d5a fix: schedule qualitative mastery reviews (#840)
Create first-interval review state for concept/design mastery, advance only due reviews, and keep early duplicate assessments idempotent.
2026-08-16 23:35:52 +08:00
Bingxi Zhao (Frank)
712d4137f0 feat: DSML streaming robustness, memory observability, and mastery pending questions
Work in progress carried over from earlier sessions, committed together.

Chat / DSML:
- Tolerate partial and malformed tool-call tags mid-stream, with a character
  ceiling so a stray "<" cannot make the live stream wait forever for its
  closing bracket.
- Narration rounds can now mark their prose as visible, so a DSML round that
  keeps the text surrounding a call has it persisted as part of the answer.

Runtime observability:
- New deeptutor/runtime/memory_probe.py reports resident memory across the
  process tree, exposed at /api/v1/system/memory and surfaced in the settings
  status strip. psutil is a soft dependency, imported lazily with a /proc
  fallback, so a missing wheel costs the strip and not the app.

Mastery:
- New deeptutor/learning/pending.py projects a persisted PendingQuestion into
  the smaller public contract safe to hand the tutor model, and owns the
  multiple-choice translations shared by registration and grading.

LightRAG:
- New pipelines/lightrag/worker.py moves local indexing onto a worker thread's
  own event loop, so RAG-Anything's synchronous graph merging stops stalling
  unrelated API and LLM work.

Also: request-scoped output artifact delivery (api/routers/outputs.py),
partner runtime and path_service adjustments, and CLI chat renderer updates.
2026-08-09 02:31:44 +08:00
wayblink
be14c3ef23 feat: separate UI and model response languages (#758)
* feat: separate UI and model response languages

* refactor(settings): keep one owner for the interface.json language rules

The legacy migration — a file written before the UI/response split
inherits its single language into both fields — had been duplicated into
both readers of interface.json, as had the theme/language defaults. Two
copies of a migration rule drift.

Move the rule into resolve_languages() in the module that owns the file,
have the router compose its superset of defaults on top of the service's,
and cover the agreement with a test that reads one legacy file through
both paths. The helper also drops the separate key-presence check:
_normalize_language already falls back to its default for missing, null
and unrecognized values alike.

* fix: keep the language bootstrap single and local-choice-first

Merging dev surfaced three collisions this branch had not seen:

- The new bootstrap fetched /settings/ui unconditionally and overwrote
  writeStoredLanguage on every mount, undoing #730's rule that a choice
  made in this browser is the more specific signal and must win. Folded it
  into the existing guarded effect so one fetch serves both language
  fields and neither can clobber a local selection.
- apiFetch/apiUrl ended up imported twice in AppShellContext, which git
  merged without a conflict and tsc rejects outright.
- Three tests still stubbed get_ui_language at call sites that now ask for
  get_response_language: the question router's stand-in module and two
  mastery_path patches (renamed the zh case to say response language).

* fix(api): include response_language in the pre-session UI read

The bootstrap adopts both languages from this one endpoint, so leaving
response_language out of the projection meant a fresh browser always
inherited the interface locale and never saw the saved output-language
preference. It belongs with the other two: all three are the visitor's
own presentation choices, none describe the deployment.

---------

Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
2026-08-07 03:13:04 +08:00
Bingxi Zhao (Frank)
591329322d fix(i18n): stop collapsing every non-English language to Chinese (#712)
`parse_language()` ended in a bare `return "zh"`, so ja/ko/fr/de/ru/ar
all resolved to Chinese. Book prose normalized its code correctly while
quiz, Deep Research and Mastery Path went through this parser — which is
why a Japanese book came back with Chinese quizzes.

Delegate to the existing `normalize_language()` instead of keeping a
second, weaker implementation, and pass unknown codes through. What makes
the model answer in a language is the directive built from the code, not
the prompt file, so no new locale resources are needed.

Two fallback chains assumed the result was zh or en and had to follow:

* `PromptManager` now tries `[code, base locale, "en"]`, so "zh-tw" reuses
  the Chinese files and "ja" lands on English rather than Chinese. The
  chains for zh and en are unchanged.
* Mastery Path's `[lang, "zh" if lang != "zh" else "en"]` gets the same
  treatment, and its notebook prompts now append the shared language
  directive — without it a Japanese learner would only have traded
  Chinese output for English.

An unconfigured language still defaults to "zh", so deployments that
never set one keep the behaviour they shipped with.

Reported with an exact root-cause analysis by @takeshi-o.
2026-07-27 21:24:00 +08:00
whm
5d7647002e fix: restore recency weighting in compute_mastery (#618) 2026-07-12 16:36:02 +08:00
Bingxi Zhao (Frank)
4fab448977 minor fix & new channel 2026-06-30 22:11:40 +08:00
R-Turing
943e9fb7e8 fix mastery choice persistence and grading 2026-06-30 20:52:47 +08:00