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>
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.
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
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
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.
The Mastery Path sidebar, composer and progress ring, in four changes.
Study conversations are filed under their topic. They were already ordinary
chat sessions carrying `mastery_path_id`, so the sidebar had everything it
needed and used none of it: they sat loose among the recents, and a click
opened them on /home, which drops the outline, the waypoint header and the
tutor's own composer. `lib/mastery-session.ts` answers both questions in one
place, because a sidebar that files a conversation under a heading and then
navigates somewhere else is worse than one that does neither. Grouped
conversations are exempt from the eight-row cut on recents: a heading that
says "4" while listing two of them is worse than a slightly longer list.
The composer placeholder is written by the task model. "Ask your tutor about
X" was the third appearance of that waypoint on screen and proposed nothing,
and a learner who is stuck is stuck on what to ask. So it offers one question
the tutor's last message did not already answer, and Tab takes it. It is a
question and never an answer -- on a mastery path the learner produces the
understanding, so anything not ending in a question mark is dropped. Nothing
waits on the call: the static placeholder stands until a hint arrives, and a
failure just leaves it standing.
`/topics/index` exists because the sidebar refreshes on every stream end and
`/topics` answers with each path's whole knowledge map and source excerpts.
It is declared above `/topics/{path_id}`, which matches any single segment.
The connected-agent and persona chips reach every surface sharing the
composer. StandaloneComposer already filtered subagents out of the knowledge
picker, commented "they are their own composer control" -- and then never
mounted that control, so a connected agent was unreachable from Mastery Path,
Immersive Reading and quiz follow-ups alike. Owning the split once lifts all
three, and keeps them on the same composer the chat page renders.
The progress ring stops competing with the card it sits on. A bare "7" is an
id or a step number, not a measurement; `--primary` is what buttons and links
are, and the card is itself one; and a 2.5px round cap at low percentages
reads as a stuck spinner. Ink hairline, a real unit, and `--primary` kept for
the one moment it means something.
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.
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.
Guided Learning is rebuilt on the chat agent loop: the bespoke stage
machine is gone, replaced by a tutor chat driving a hard, per-type mastery
gate, with the /learning page reworked into a status dashboard. Existing
learning progress loads unchanged.
A new loop-plugin framework (deeptutor/loop_plugins/) makes the chat loop
extensible — mastery is the first plugin, contributing its tools, system
block, and server-owned kwargs without the pipeline hard-coding it — and
the loop gains context-checkpoint folding. Partner Chat/Archive
conversations gain Markdown export + save-to-notebook (one shared
serializer), and every chat turn now signals done the moment the answer is
saved so the composer/clock free up before title generation.
Bump __version__ to 1.4.5, add assets/releases/ver1-4-5.md, archive notes
older than two weeks into past_releases/ (fixing the one cross-link that
crosses the boundary), and add the README release row.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Security/correctness:
- Stop leaking diagnostic answers: persist a _sanitize_diagnostic() snapshot
(drops top-level answers + inline answer keys) into progress.diagnostic,
which is returned verbatim by the /progress endpoints. Grading is unaffected
(authoritative answers live in LearningStore).
- _safe_json_parse + generate_from_notebook now use the shared fence-stripping
parse_json_response instead of bare json.loads, so the common fenced/lightly
-malformed LLM output is recovered instead of silently dropped / 500'd.
Decoupling:
- unified_ws change_module: move module lookup + PRETEST reset into
LearningService.switch_module(); router keeps only the WS ordering
(module_changed before cancel) and no longer imports learning.models.
- unified_ws check_active_turn: use new public TurnRuntimeManager
.has_live_execution() instead of reaching into _lock/_executions.
- redo endpoint: LearningStore.clear_questions() instead of poking _questions_path.
- remove unused StreamEventType.USER_INPUT enum; document the WS message types.
Stability:
- LearningStore: question read-modify-write (save_question_answers/_meta),
delete(), and clear_questions() now hold _cas_lock — consistent concurrency
model; _atomic_write_text cleans up its temp file on failure.
Cleanliness/clarity:
- router: shared _validate_book_id() (9 endpoints) + _parse_modules()
(init/replace); _classify_error drops unused expected_answer param.
- guided_learning: hoist logging/RAGService imports + module logger; move tuning
constants to class top; ContextVar declared after imports.
- storage: hoist json import (7 inline copies removed).
- pocketbase_store: move _VALID_ID/_validate_id below the import block.
- rename misleading mastered_pct -> avg_mastery_pct (service + web consumers).
Frontend:
- learning [bookId] page uses lib fetchProgress (apiFetch -> auth redirect)
instead of a raw credentials fetch; track/clear the retry + auto-advance
timers on unmount; drop dead currentStage state + ModuleTree prop.
- learning-api: remove orphaned submitAnswer + AnswerRequest.
- CreateModuleDialog: use the static bookApi import; reset manualBookId to ''
to match initial state; learning list page: stop shadowing the t() translator.
Conflict-resolution carryover: dropped the PR's incidental 300s factory timeout
(kept dev's stream runner).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fetchProgress catch block logs warning instead of silently swallowing.
Submit button protected by submittingRef to prevent double-sends.
Four hardcoded English strings replaced with i18n keys.
fetchAllProgress adapted to new {summaries, errors} API format.
book/page.tsx updated for new fetchAllProgress return type.
P2-4, P2-5, P2-6
Backend: list_progress() derives display name from first module name,
falling back to book_id for empty-module books.
Frontend: ProgressSummary gains 'name' field, card heading uses
card.name || card.book_id instead of raw book_id.
Tests: 2 new negative tests (name from module, empty-module fallback).
92/92 passing.