DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.
Python ai-agentsai-tutorclawbotcli-tooldeepresearchinteractive-learninglearningmulti-agent-systemsrag
release: v1.5.0
Bingxi Zhao (Frank)df6922bb1bc1
diff --git a/README.md b/README.mdindex d73a8162c..127c5a7a5 100644--- a/README.md+++ b/README.md@@ -48,17 +48,19 @@### π¦ Releases+> **[2026.7.4]** [v1.5.0](https://github.com/HKUDS/DeepTutor/releases/tag/v1.5.0) β LlamaIndex ingestion now honors your **Document Parsing** engine with multimodal image extraction, Partner & Soul ids stay URL-safe for non-Latin names, and optional RAG extras install cleanly on Python 3.14+.+> **[2026.6.30]** [v1.4.15](https://github.com/HKUDS/DeepTutor/releases/tag/v1.4.15) β A native **Mattermost** channel for Partners, plus fixes so Guided Learning multiple-choice questions grade correctly and a configured zero chunk overlap is honored.> **[2026.6.29]** [v1.4.14](https://github.com/HKUDS/DeepTutor/releases/tag/v1.4.14) β Click an assigned partner to chat in one step, Deep Research flags partial reports, LightRAG indexes without MinerU, FAISS handles non-ASCII paths, and PocketBase sessions are isolated per user.+<details>+<summary><b>Past releases (more than 1 week ago)</b></summary>+> **[2026.6.27]** [v1.4.13](https://github.com/HKUDS/DeepTutor/releases/tag/v1.4.13) β Partners support non-Latin names and become assignable to users, logos render after login (#599), tiny knowledge bases retrieve reliably, and containers start cleanly under rootless Podman.> **[2026.6.24]** [v1.4.12](https://github.com/HKUDS/DeepTutor/releases/tag/v1.4.12) β A new **LightRAG Server** retrieval engine, a lightweight **PyMuPDF4LLM** parsing engine, and a FAISS vector backend that makes large knowledge-base retrieval dramatically faster.-<details>-<summary><b>Past releases (more than 1 week ago)</b></summary>-> **[2026.6.23]** [v1.4.11](https://github.com/HKUDS/DeepTutor/releases/tag/v1.4.11) β Native tool calling on every cloud OpenAI-compatible provider, a redesigned admin Users page, LaTeX in quiz options, an honest session-loading spinner, and configurable container host binding.> **[2026.6.21]** [v1.4.10](https://github.com/HKUDS/DeepTutor/releases/tag/v1.4.10) β A self-service **Profile** page with avatars, a rootless-ready container guide with a single-port request-time proxy, and deny-by-default MCP tools for non-admin users.diff --git a/assets/releases/ver1-4-12.md b/assets/releases/past_releases/ver1-4-12.mdsimilarity index 95%rename from assets/releases/ver1-4-12.mdrename to assets/releases/past_releases/ver1-4-12.mdindex 4c70a3e06..def662130 100644--- a/assets/releases/ver1-4-12.md+++ b/assets/releases/past_releases/ver1-4-12.md@@ -2,7 +2,7 @@**Release Date:** 2026.06.24-A knowledge-base release on top of [v1.4.11](past_releases/ver1-4-11.md): a new LightRAG Server+A knowledge-base release on top of [v1.4.11](ver1-4-11.md): a new LightRAG Serverretrieval engine, a lightweight PyMuPDF4LLM parsing engine, and a FAISS vectorbackend that makes large-KB retrieval dramatically faster. Drop-in β existingknowledge bases keep working untouched.diff --git a/assets/releases/ver1-4-13.md b/assets/releases/past_releases/ver1-4-13.mdsimilarity index 100%rename from assets/releases/ver1-4-13.mdrename to assets/releases/past_releases/ver1-4-13.mddiff --git a/assets/releases/past_releases/ver1-4-4.md b/assets/releases/past_releases/ver1-4-4.mdindex 1ea7b6c35..2958be0ae 100644--- a/assets/releases/past_releases/ver1-4-4.md+++ b/assets/releases/past_releases/ver1-4-4.md@@ -2,7 +2,7 @@**Release Date:** 2026.06.13-A focused release on top of [v1.4.3](past_releases/ver1-4-3.md): the skill library opens+A focused release on top of [v1.4.3](ver1-4-3.md): the skill library opensup to the wider Agent-Skills ecosystem β install community skills from[ClawHub](https://clawhub.ai/) with one command β and knowledge-basedocument previews catch up with the chat file viewer. Fully drop-in, nodiff --git a/assets/releases/ver1-4-14.md b/assets/releases/ver1-4-14.mdindex fed21f79f..6ee9cd6d2 100644--- a/assets/releases/ver1-4-14.md+++ b/assets/releases/ver1-4-14.md@@ -2,7 +2,7 @@**Release Date:** 2026.06.29-A fixes-and-polish follow-up to [v1.4.13](ver1-4-13.md): open an assigned partner straight into chat with one click, Deep Research reports flag when a subtopic couldn't be completed, LightRAG indexes without MinerU installed, FAISS handles non-ASCII paths, and PocketBase sessions are isolated per user. Drop-in for the default backend β no migrations.+A fixes-and-polish follow-up to [v1.4.13](past_releases/ver1-4-13.md): open an assigned partner straight into chat with one click, Deep Research reports flag when a subtopic couldn't be completed, LightRAG indexes without MinerU installed, FAISS handles non-ASCII paths, and PocketBase sessions are isolated per user. Drop-in for the default backend β no migrations.## What's Newdiff --git a/assets/releases/ver1-5-0.md b/assets/releases/ver1-5-0.mdnew file mode 100644index 000000000..ae2cdd966--- /dev/null+++ b/assets/releases/ver1-5-0.md@@ -0,0 +1,135 @@+# DeepTutor v1.5.0 Release Notes++**Release Date:** 2026.07.04++v1.5.0 closes out the entire v1.4 line and opens the next. Rather than a single-point delta, this note looks back across the whole arc from [v1.4.0-beta](past_releases/ver1-4-0-beta.md) to today β the release that turned DeepTutor into an agent-native, community-driven tutoring platform. Over these weeks the community sent **36 merged pull requests** and helped us **resolve 53 issues**. Thank you β this release is as much yours as ours.++## Highlights since v1.4.0++- **Partners, born from TutorBot.** TutorBot grew into **Partners**: a production-grade IM pipeline across 15+ channels β Slack, Discord, Telegram, Feishu, WeCom, Zulip, Matrix (with optional E2EE), and a native **Mattermost** channel β with live streaming replies. You can connect your own Partners, or your local **Claude Code / Codex**, under **My Agents** and consult them live mid-chat; each Partner carries its own private memory and its conversations can branch, resume, and replay.+- **One agentic chat engine.** Chat was rebuilt on a single agent loop with **native tool calling on every OpenAI-compatible cloud provider** (and SiliconFlow, MiniMax M3, Qwen, Gemini 2.5+), smooth streaming, and an honest activity header.+- **A real Knowledge Center.** Multiple retrieval engines β LlamaIndex + a **FAISS** vector backend, **LightRAG** (local and standalone-server), **GraphRAG**, **PageIndex**, and linked / Obsidian knowledge bases β behind one console, on a pluggable document-parse layer (text-only, **MinerU**, **Docling**, **markitdown**, **PyMuPDF4LLM**). Large-KB retrieval got dramatically faster.+- **Guided Learning & Mastery Path.** Rebuilt on the chat loop with a per-type mastery gate, a `/learning` dashboard, LaTeX-rendered quizzes, and graded questions that flow into your Question Bank.+- **Multi-user, done properly.** Real per-user isolation, admin grants, a redesigned **User Management** page, a self-service **Profile** page with avatars, deny-by-default MCP tools, and per-user session isolation.+- **Deployment hardening.** Rootless-Podman / read-only-rootfs support, a single-port request-time proxy, env-configurable host binding, and a portable supervisord config.+- **Security lockdown.** The Partner/TutorBot tool sandbox was locked down and a cluster of authorization-bypass, path-traversal, and RCE reports were fixed (see below).+- **Three-layer Memory & richer surfaces.** A top-level Memory workbench (L1/L2/L3) with Partner conversations bridged in, plus continued work on Deep Research, Solve, Visualize (Animator merged in), and Co-Writer.++*In v1.5.0 specifically:* the default LlamaIndex engine now routes ingestion through the shared document-parse layer (so it honors your chosen parsing engine and indexes extracted images as multimodal nodes), Partner and Soul ids are ASCII/URL-safe so non-Latin names stay reachable, and the optional `graphrag` / `rag-lightrag` extras install cleanly on Python 3.14+ (issues #606, and the fixes below).++## Merged pull requests++With gratitude to everyone who sent code:++- #484 β Zulip: content-detection fallback so bots receive @-mentions β @wedone+- #485 β Make `require_auth` async so the user ContextVar reaches the endpoint β @truffle-dev+- #490 β Unblock Gemini 2.5+ and harden the Visualize pipeline β @skinred78+- #493 β Fix SQLite file-descriptor exhaustion β @thelooter+- #500 β Guided Learning feature work β @arlenwoox+- #507 β Harden ExecTool defaults against command injection (#506) β @kagura-agent+- #508 β Fix the GPT-5 token-limit parameter in the init-wizard probe β @lezhimiffyliu+- #509 β Prevent Document nodes from bypassing the chunking pipeline β @washi4+- #513 β Add a Profile button when no profiles exist β @wedone+- #524 β Truncate oversized event payloads in the session response β @xiongjnu+- #528 β Native tool calling for reasoning models on OpenAI-compatible endpoints β @wedone+- #529 β Qwen JSON preamble, force-recompile overview pages, health false positives β @alvinets+- #540 β Preserve math before citation linkification β @thakrarsagar+- #542 β Route the OAuth backend through the native provider β @thakrarsagar+- #543 β Upgrade the MiniMax default model to M3 β @octo-patch+- #549 β Keep `NEXT_PUBLIC_AUTH_ENABLED` out of the minifier constant-fold β @IliaAvdeev+- #550 β Keep sidebar footer items as text when the sidebar is collapsed β @IliaAvdeev+- #558 β Surface bad-login errors inline instead of a silent reload β @IliaAvdeev+- #559 β Accept a username, not just an email, on login and register β @IliaAvdeev+- #568 β Gate LLM features for users without an assigned model β @IliaAvdeev+- #570 β Show only provider-relevant fields in Search settings β @IliaAvdeev+- #571 β Discoverable profile rename and auto-name by provider β @IliaAvdeev+- #572 β Translate the missing English settings-tour steps β @IliaAvdeev+- #573 β User profile page with avatar β @IliaAvdeev+- #577 β Harden the image for rootless Podman with a read-only rootfs β @enihcam+- #578 β Chat-history loading animation β @emmett001+- #579 β Deny MCP tools until explicitly granted (multi-user) β @Hinotoi-agent+- #582 β Run supervisord as root so services start under rootful Docker β @IliaAvdeev+- #583 β Redesign the User Management page (avatars, search, skeletons, confirm dialog) β @IliaAvdeev+- #584 β Enable native tool calls for SiliconFlow β @TyrionH-is-coding+- #585 β Move the Back link to its own row in the page header β @IliaAvdeev+- #586 β Make `BACKEND_HOST` and `FRONTEND_HOST` env-configurable β @enihcam+- #588 β Render LaTeX in quiz options β @ZhouJ-sh+- #593 β Portable supervisord config across rootful + rootless keep-id β @enihcam+- #602 β Preserve a configured zero LlamaIndex chunk overlap β @VectorPeak+- #604 β Fix mastery choice persistence and grading β @spring618++## Resolved issues++**π Security & isolation**+- #506 β ExecTool executed LLM-generated shell commands over the chat WebSocket+- #514 β Authorization bypass in the book-confirmation flow+- #515 β Cross-session authorization bypass in turn regeneration+- #516 β Cross-bot authorization bypass in TutorBot file management+- #517 β Path traversal in the TutorBot filesystem tool+- #518 β Remote code execution via the TutorBot shell tool+- #596 β Sessions were not isolated by user++**π Bug fixes**+- #301 β Guided Learning not working with LM Studio (Docker)+- #472 β Co-Writer responses came back extremely short+- #481 β Non-admin users hit 404 on all session requests (Docker multi-user)+- #487 β A new quiz inherited the previous quiz's answer state+- #489 β Visualize and other capabilities silently truncated on Gemini 2.5 / 3.x+- #494 β `knowledge_learning` router not registered in `main.py`+- #495 β Knowledge extractor JSON-parsing error with DeepSeek+- #496 β `LearningSession` had no metadata field, so agents got empty context+- #497 β `KnowledgePoint` validation rejected LLM-extracted data+- #502 β Docker sed placeholder broke API base-URL validation with a non-default port+- #503 β Unable to communicate with v1.4.0-beta+- #504 β Settings-load failure and zombie `running` turns after container restart (Docker)+- #512 β New user could not create an initial profile via the UI (Docker)+- #520 β Chat input disabled after the first turn; hardcoded URL guard broke deployments+- #521 β Errors while embedding some knowledge-base documents+- #527 β Qwen 3.6 Plus failed to use native tool calling+- #530 β self-signed-certificate error despite `disable_ssl_verify: true`+- #531 β `allow_shell_exec` silently reset to false on every auto-start+- #534 β `allow_shell_exec` could not be persisted+- #536 β Container appeared to crash after idle time+- #537 β Responses were incoherent+- #574 β Partner conversations never reached the Memory system (empty L1)+- #580 β supervisord pidfile CRIT on rootless Podman + keep-id + read-only rootfs+- #587 β Quiz option cards did not render LaTeX formulas+- #594 β Choosing PyMuPDF4LLM as the parser was overridden by MinerU when building a LightRAG KB+- #595 β Deep Research returned a success response even when a block failed+- #599 β Wrong top-left logo/icon after login in multi-user mode+- #603 β Guided Learning choice options were lost and correct answers could be mis-graded+- #605 β v1.4.15 could not be installed with `uv`++**β¨ Features & requests**+- #511 β HTTP API for multi-turn conversations with a specific TutorBot+- #553 β User profile page (account + avatar) and a lighter Admin page+- #555 β Moodle support+- #569 β Feature request+- #576 β Rootless Podman with a read-only rootfs for hardened deployments+- #589 β PyMuPDF4LLM for building knowledge bases+- #590 β Native Mattermost channel for the Partner subsystem+- #591 β Support for a standalone external LightRAG container endpoint++**π¬ Questions & discussions**+- #476 β Does adding a doc to a knowledge base have quadratic complexity?+- #505 β How to register a provider on v1.4.0+- #532 β RAG chat could not return information from the selected knowledge base+- #535 β Can TutorBot do almost everything the main system does, via skills?+- #552 β RAG chat on a 250 MB knowledge base returned nothing+- #565 β Question+- #592 β Should DeepTutor become installable apps?+- #597 β Does a Partner have its own memory?+- #598 β Can non-admin users use and create Partners in multi-user mode?++## Upgrade Notes++Drop-in from any v1.4.x: `pip install -U deeptutor`; Docker users pull `ghcr.io/hkuds/deeptutor:latest`. No migrations β existing knowledge bases, partners, souls, and mastery paths keep working as-is. Two things to know:++- **LlamaIndex re-indexing** now extracts through the engine you pick in **Settings β Document Parsing**, not the old text-only path. Existing indexes are untouched; only a re-index picks up the new engine. If a document doesn't extract, confirm the active engine supports that format (keep it on text-only for the previous behavior).+- **Non-Latin partner/soul ids** only change for newly created entities β anything already on disk keeps its current id.++## Thanks++DeepTutor v1.5.0 is the work of a growing community. Special thanks to everyone who opened an issue, filed a report, or sent a pull request β and in particular to our contributors this cycle: @wedone, @truffle-dev, @skinred78, @thelooter, @arlenwoox, @kagura-agent, @lezhimiffyliu, @washi4, @xiongjnu, @alvinets, @thakrarsagar, @octo-patch, @IliaAvdeev, @enihcam, @emmett001, @Hinotoi-agent, @TyrionH-is-coding, @ZhouJ-sh, @VectorPeak, and @spring618. Read the docs at [deeptutor.info](https://deeptutor.info/).++**Full Changelog**: https://github.com/HKUDS/DeepTutor/compare/v1.4.0-beta...v1.5.0diff --git a/deeptutor/__version__.py b/deeptutor/__version__.pyindex 80e7865a5..d6295c716 100644--- a/deeptutor/__version__.py+++ b/deeptutor/__version__.py@@ -6,6 +6,6 @@ before publishing to PyPI; the web sidebar badge and CLI banner read from thisfile directly."""-__version__ = "1.4.15"+__version__ = "1.5.0"__all__ = ("__version__",)diff --git a/deeptutor/services/partners/manager.py b/deeptutor/services/partners/manager.pyindex c8c0312ba..4f69fe920 100644--- a/deeptutor/services/partners/manager.py+++ b/deeptutor/services/partners/manager.py@@ -111,7 +111,9 @@ def _slugify_id(name: str, *, fallback: str) -> str:return slugif not stripped:return fallback- digest = hashlib.sha1(stripped.encode("utf-8")).hexdigest()[:8]+ # SHA1 here is a content-addressing handle (stable per-name id), not+ # security; ``usedforsecurity=False`` documents that and clears bandit B324.+ digest = hashlib.sha1(stripped.encode("utf-8"), usedforsecurity=False).hexdigest()[:8]return f"{fallback}-{digest}"