The engine-prerequisite line rendered via t() ends at "…Markdown
formats.", but the en/zh locale keys carried an extra "Chat retrieval
only." clause. The lookup missed, so both locales fell back to the
English source and the zh translation never rendered.
Drop the trailing clause from the locale keys (and the matching zh
value) rather than adding it to the source: search() still returns
document outlines to programmatic callers, so retrieval is not
chat-only.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PageIndex deprecated its REST retrieval endpoint; deep retrieval is now
agentic through the hosted PageIndex MCP server, while search() serves
programmatic callers with real document tree outlines.
- New built-in "pageindex" MCP server entry, code-injected at manager load
when an API key is configured (never persisted to mcp.json; user-defined
entry wins; hot-reloads on key change). remove_document is blocked via a
new MCPServerConfig.disabled_tools blocklist.
- Chat turns with a PageIndex KB attached get the server's tools preloaded
under a narrowed implicit grant (KB access = permission), plus a system
prompt block listing the KB's file -> doc_id manifest with usage notes.
The rag tool's kb_name enum excludes PageIndex KBs (a pure-PageIndex
conversation doesn't mount rag), so the agent reads those docs via MCP.
- PageIndexPipeline.search() now returns each document's tree outline
(titles / pages / summaries) fetched over REST (GET /doc/{id}/?summary=true)
as honest structural context for programmatic callers (book, co-writer,
seed, CLI). No new error_type; existing not_configured / retrieval_error /
needs_reindex semantics are unchanged. The dead REST retrieval client
methods are deleted. Existing KBs need no migration.
- SUPPORTED_EXTENSIONS now mirrors POST /doc/: pdf, md, markdown, txt, docx,
doc, pptx, ppt, xlsx, xls, csv (zip stays a local container); frontend
format list + copy updated (en/zh).
Knowledge Center: remove a single raw document from a knowledge base —
even one stuck in an error state — instead of deleting and rebuilding
the whole base. A file that failed to parse (e.g. one over the cloud
parser's page limit) can now be dropped in place, with replace/retry.
- backend: remove_raw_document() decoupled from DocumentAdder (needs no
ready index) + DELETE /{kb_name}/files/{filename:path}; shared
_read_metadata / _write_metadata / _raw_hash_key helpers so indexing
and removal agree on the hash key. Connected/legacy KBs still rejected.
- web: deleteKbFile() API, per-file delete in the Files tab, and
error-state KBs unlocked for drop / upload-replacement / retry.
- release notes ver1-5-1.md (old notes archived to past_releases/),
__version__ bump to 1.5.1, README Releases row + one-week fold.
- README KB prose + all 10 translations synced; docs knowledge page
updated separately in site/.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The message edit textarea previously only submitted on Ctrl/Cmd+Enter,
so both Enter and Shift+Enter inserted newlines. Align it with the
composer behavior: Enter submits, Shift+Enter inserts a newline. Also
guard against IME composition to avoid accidental submissions while
selecting candidates.
Co-Authored-By: Claude <noreply@anthropic.com>
Fixes-and-polish follow-up to v1.4.13: open an assigned partner straight
into chat, Deep Research flags partial reports, LightRAG indexes without
MinerU, FAISS handles non-ASCII paths, and PocketBase sessions are isolated
per user. Drop-in for the default backend — no migrations.
- Partners: a non-admin clicking an assigned partner now connects it as an
agent and opens a fresh chat targeting it (?agent=<name> preselect on the
home page); admins still drill into the management page.
- Deep Research: blocks that raise or exhaust their iteration budget are
surfaced — a warning notice plus partial / failed_block_count /
failed_block_titles in the result envelope — so a report no longer looks
like a clean success (#595).
- LightRAG: skip RAG-Anything's one-time install check on its default parser
(mineru); DeepTutor feeds pre-parsed content, so indexing proceeds
regardless of the chosen parse engine (#594).
- FAISS: persist/load the index through a Python byte stream so non-ASCII
paths (Chinese KB names, C:\Users\张三) work on Windows; on-disk format
unchanged and cross-readable with stock FAISS.
- PocketBase: every session is stamped with and filtered by user_id, with
messages/turns reachable only through the owning session, mirroring the
SQLite per-user-file isolation (#596).
- Release notes (ver1-4-14.md, older notes archived to past_releases/),
version bump to 1.4.14, README Releases row + one-week fold. README prose
+ translations already in sync; docs PocketBase caveat updated separately
in the site/ repo.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
LightRAG Server retrieval engine, PyMuPDF4LLM document parsing, and a
FAISS vector backend that makes large knowledge-base retrieval far faster.
Drop-in — existing knowledge bases keep working; re-index to move onto FAISS.
- LightRAG Server: connect a KB to a standalone LightRAG server over HTTP
(no local index); per-KB server URL + optional API key, always available.
- PyMuPDF4LLM: lightweight, image-capable parsing engine (no CUDA, no model
downloads); background install from Settings → Document Parsing.
- FAISS: faiss-cpu + llama-index-vector-stores-faiss as core deps, lazy
import with graceful SimpleVectorStore fallback (issue #552).
- Release notes (ver1-4-12.md), version bump to 1.4.12, README prose +
Releases row, and all 10 translated READMEs synced.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rework of the #578 loading overlay:
- Replace the simulated rAF percentage bar (which climbed to a fake 99%
over ~24s, unrelated to real load progress) with an honest indeterminate
spinner + 'Loading conversation…' message and an 8s 'Still loading…' hint.
- Collapse the null/loading/complete state machine to a single boolean and
drop the artificial 400ms completion delay, so the conversation appears
the moment the fetch resolves.
- Fix a stray ')' in the cancel button's className that voided its hover
color, and remove the now-redundant width-transition/rAF conflict.
- Drop the dead 'server is taking too long' locale key (no timeout path
uses it).
The AbortSignal plumbing (getSession/loadSession + cancel button) and the
Strict-Mode-safe initial-load ref are kept as-is.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat: loading overlay for chat-history navigation
Shows a clear loading indicator (with cancel) while a session is fetched
from chat history, replacing the misleading welcome-screen flash. Threads
an AbortSignal through getSession/loadSession so the load is cancelable.
Followed by a rework that swaps the simulated progress bar for an honest
indeterminate spinner and drops the artificial completion delay.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
MarkdownRenderer (with enableMath) renders a block-level <div><p> root;
nesting it in a <span> inside the option <button> is invalid HTML and
trips React's validateDOMNesting. Use a <div> to match the four sibling
MarkdownRenderer call sites in this file. The serif/prose option text is
intentional — it matches the question stem, which also renders via
MarkdownRenderer.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fix: render LaTeX in quiz multiple-choice options (#587)
Routes option labels through MarkdownRenderer + KaTeX, matching the
question stem. Followed by a fixup that wraps the renderer in a <div>
(not a <span>) to keep the block-level renderer output valid inside the
option button.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat: redesign admin User Management page (avatars, search, skeleton, confirm dialog)
Part 2 of #553. Adds per-row UserAvatar, live username search backed by a
pure filterUsersByQuery helper (unit-tested), skeleton loading, richer
empty/no-match states, and a focus-managed ConfirmDialog replacing the
window.confirm() prompts for delete/promote/demote. Frontend-only; no
auth/permission paths touched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Follow-up refinements on top of #579 (deny MCP tools until explicitly
granted), tightening decoupling and front/back consistency:
- Decouple: extract the duplicated `metadata.source == "partner"` check
(deferred-tools, exec gate, tool composition, cron owner routing) into a
single `AgenticChatPipeline._is_partner_turn` helper, so the partner
authority-via-metadata contract has one definition instead of four
inline copies.
- Frontend parity: the backend now denies MCP for non-admin users when the
grant omits `mcp_tools`, but GrantEditor still showed `null` as
"Default · all" / "all MCP". Make ModeSwitch's default-mode label
caller-supplied, label the MCP section "Default · none" / "no MCP", and
add a one-line rationale so admins are not misled into granting nothing.
Built-in optional tools keep `null = all`; only MCP tools fail closed.
Tests: ruff clean; pytest multi_user/mcp/partners/chat (545 passed);
web tsc + eslint clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Follow-up nits on the #573 profile/avatar work:
- UserAvatar: validate an icon marker's icon/color against the known sets and
fall back to the deterministic avatar for unknown values. The backend
_ICON_MARKER_RE accepts any [a-z0-9-] color, so a hand-set marker like
"icon⭐bogus" previously rendered an invisible avatar
(AVATAR_COLORS[unknown] === undefined).
- ProfileLink: pass role to UserAvatar so admins get the amber ring in the
sidebar, matching the "amber ring at every size" intent.
- useAuthStatus: share one in-flight /api/v1/auth/status request across the
hook's consumers (sidebar Admin/Logout/Profile links) so a page load makes a
single call instead of one per consumer; cleared once settled so a later
mount (after login/logout) refetches.
Verified: tsc, eslint, web node tests (142).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Self-service /profile page (account info, icon/image avatar, sign out)
implementing the profile half of #553. Contributed by @IliaAvdeev.
Integration performed during merge onto current dev:
- Migrate ProfileLink and the profile page off the removed AUTH_ENABLED
build-time export to runtime auth status (auth.ts was refactored on dev
by #577). ProfileLink reads the full status via fetchAuthStatus (it needs
username/avatar, which the useAuthStatus hook does not expose); the page
gates on status.enabled.
- Resolve en/zh locale conflicts as a union of dev and PR keys.
- Honor EXIF orientation in createImageBitmap so the primary decode path
matches the <img> fallback.
- Drop an unreachable AUTH_ENABLED render guard in the profile page.
Verified locally: tsc, eslint, ruff, web node tests (142), pytest
tests/multi_user (81 passed).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two gaps in the PR's frontend changes:
1. Client auth awareness was permanently false. api.ts/auth.ts read
process.env.DEEPTUTOR_AUTH_ENABLED in browser code, but Next.js only inlines
NEXT_PUBLIC_ vars into the bundle — so the Sign-out / Admin affordances never
rendered and apiFetch's 401 -> /login redirect never fired when auth was on.
Resolve auth state at runtime from the backend instead: fetchAuthStatus()
records it via setRuntimeAuthEnabled(), and components observe it through the
new useAuthStatus() hook. Works on Docker (read-only rootfs), PyPI, and dev
with no build-time baking. (The server-side gate in proxy.ts is unaffected.)
2. KB document uploads >10MB were truncated. All /api/* now flows through the
proxy, whose body buffer defaults to 10MB while the backend accepts 100MB
(DocumentValidator.MAX_FILE_SIZE). Raise experimental.proxyClientMaxBodySize
to 110MB so uploads aren't silently cut off.
Adds a regression test that a 401 does NOT redirect when auth is disabled.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Settings polish and a Mastery -> Question Bank link:
- Search settings show only the connection fields the selected provider uses
- Connection profiles can be renamed and auto-name after their provider
- Graded Mastery Path questions sync into the session Question Bank
- Fix untranslated Settings-tour Tools step (en/zh) + guard test
- Refresh README / translated READMEs for the current v1.4.6+ UI
Bump __version__ to 1.4.9, add assets/releases/ver1-4-9.md, restore the
v1.4.7/v1.4.8 README rows dropped by an earlier docs-update commit, and
compress every README release row to <=30 words.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Partners become consultable agents and gain their own memory.
- My Agents now lists your Partners next to local Claude Code / Codex;
connect one and the turn runs on `consult_subagent` against the
partner's own chat loop, streaming its trace live. Every consult in a
DeepTutor chat threads into one archived partner session.
- Partners get a split memory model via three always-on tools that
replace chat's read_memory/write_memory on partner turns:
partner_read (owner shared + own), partner_memorize (own only),
partner_search (own history). The per-Partner memory toggles are gone.
- A `partner:` history reference resolves a partner transcript
(admin-only) into a DeepTutor chat as third-party context.
Release-prep fixes for a clean CI parity run:
- partner.py: replace mypy-misparsed `# type:` dict-entry comments with
a proper variable annotation.
- claude_models.py: `# nosec B606 B607` on the PATH-resolved `os.execvp`
in the forked PTY child (no shell; pre-existed since v1.4.7).
Bump __version__ to 1.4.8, add assets/releases/ver1-4-8.md, README row.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The frontend no longer bakes the backend URL into the bundle at build
time and mutates it with sed on every container start. Instead:
* web/lib/api.ts: apiUrl and wsUrl become one-line pass-throughs, so
the browser fetches relative paths through the frontend
(:3782/api/...). All existing call sites keep working unchanged.
* web/proxy.ts: catches /api/* and /ws/* and rewrites them to
DEEPTUTOR_API_BASE_URL at request time, reading
DEEPTUTOR_AUTH_ENABLED for the auth-redirect check.
* web/lib/auth.ts: switches from NEXT_PUBLIC_AUTH_ENABLED (build-time)
to DEEPTUTOR_AUTH_ENABLED (set by the entrypoint on every start).
* Dockerfile: drops the .env.local placeholder block, the sed -i in
start-frontend.sh, and the runtime API-base fallback chain. Adds
gosu, bakes a non-root 'deeptutor' user (UID 1000), and has the
entrypoint chown /app/data and export DEEPTUTOR_API_BASE_URL and
DEEPTUTOR_AUTH_ENABLED from data/user/settings/*.json on every
start. supervisord is now invoked under 'gosu deeptutor'.
* web/tests/api-resolve-base.test.ts: deleted (its 8 tests reference
resolveBase / isApiBasePlaceholder, both gone; apiUrl/wsUrl are
now pass-throughs so the rest is meaningless). The auth-redirect
test is updated to prime DEEPTUTOR_AUTH_ENABLED instead.
A broad consolidation release across four product surfaces.
- Learning Space: Space becomes a learning dashboard; My Agents imports
local Claude Code / Codex chat history into resumable agents (with an
objective explore_context briefing so the tutor never role-plays the
user); Memory is promoted to a top-level /memory route; Partner
conversations flow into Memory; EduHub skills install inline.
- Knowledge Center: /knowledge rebuilt as a console with per-engine
detail pages; GraphRAG / PageIndex / LightRAG engines join LlamaIndex;
linked-KB read-only mounts; Obsidian live-vault capability.
- Settings: pluggable document parsing (MinerU / Docling / MarkItDown)
with a content-addressed cache and MinerU cloud/local backends; voice
TTS/STT; image & video generation; rebuilt settings navigation.
- Platform: per-user capability gating by assigned model; Solve rebuilt
on the chat loop with a per-step gate and mid-run failure fallback;
username login + inline errors; CLI skill publish/update; picker
polish; math-before-citation render fix.
Docs were split out to a standalone site, so site/ is now landing-page
only. Bumps __version__ to 1.4.6 and adds assets/releases/ver1-4-6.md.
Folds in mypy fixes surfaced by pre-commit (mineru/local Path typing,
knowledge/manager no-redef, explore_context token kwargs, CLI
set_dist_tag capability probe) plus prettier reformatting of
previously-committed web files.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>