* fix(pptx): resolve font fallback in PDF previews and exports
* test: match host path semantics in the PPTX preview fixture
---------
Co-authored-by: Qiuner <wdst3635@163.com>
The dev extra still pinned safety<3.0.0, but Safety was already dropped
from .pre-commit-config.yaml ("Replaced Safety with pip-audit due to
version 3.x breakdown") and nothing else runs it. safety 2.3.5 requires
packaging<22, while DeepTutor requires packaging>=24.2.
scripts/install_extras.py passes only the missing extras to pip, so pip
does not weigh DeepTutor's own requirements. The documented setup step
`python scripts/install_extras.py dev` therefore downgraded packaging
from 26.3 to 21.3, broke deeptutor's and litellm's requirements
(pip check), and held pytest at 8.4.2, because pytest 9 needs
packaging>=24.
Drop the unused pin from pyproject.toml and requirements/dev.txt, which
must stay in sync.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Persist and restore token expiry across runtime restarts. Discover the
protected resource and bound authorization server before refreshing saved
grants, preserve issuer bindings, and retain SDK discovery fallbacks.
Require MCP 1.30 in module and packaging metadata, and update the existing
dependency-floor assertion.
Co-Authored-By: GPT-6.1 Sol High
The writer now returns a narration line per scene. The host speaks each one
with Edge's free read-aloud voices, times the captions from the sentence
boundaries, and inlines the audio into the lesson page. edge-tts is an optional
extra (video-lesson); without it, or when the service fails, the scene keeps
captions timed from an estimated speaking rate and plays silently.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Edge's online voices need no account or API key, so they give read-aloud a
working default before anyone sets up a paid speech provider. The adapter
streams mp3 through the edge-tts package (a new optional extra), maps the
speed setting onto Edge's rate, and voice discovery lists Edge's public voices.
It is not an official API and may be rate limited; the settings note says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add an off-by-default `security_guard` setting (system.json, with
DEEPTUTOR_GUARD_* deployment overrides) that mounts fastapi-guard's
pure-ASGI middleware in front of the routers: per-address rate limit,
IP allow/deny lists, ban list and an attack-pattern scan of path, query
and headers. Request bodies, WebSocket handshakes, Redis, CORS and
security headers are left alone.
The guard is added before the access-log and CORS middlewares so CORS
stays outermost and 429/403 responses carry CORS headers. When disabled
the package is never imported. When enabled without the package the
backend fails at startup with an install hint. fastapi-guard ships as
the optional `guard` extra (requirements/guard.txt, DEEPTUTOR_EXTRAS).
Windows has no system IANA database, so zoneinfo needs the tzdata
package. Without it ZoneInfo("UTC") raises ZoneInfoNotFoundError on a
fresh install, and /api/settings/usage answers 400 "Invalid timezone"
for every browser timezone, which leaves the Usage statistics panel on
"Unable to load usage statistics." Practice review scheduling,
practice analytics and timezone-aware cron schedules fail the same way.
Declare tzdata on every install surface (root package, deeptutor-cli
package, requirements/cli.txt) and guard it in the packaging metadata
tests.
Closes#1907
Adapt the Phase 1 foundation from PR #1309 and complete scoped API lifecycle, pre-import approval, artifact-bound revocation, recovery, bounded workers and frontend isolation. Keep the stronger ecosystem roadmap explicit in the RFC.
Co-authored-by: XZH <cto@xzh.ai>
Partner QR onboarding (WeChat, WeCom, Feishu) renders its code server-side,
so `qrcode` is the only thing between an operator and a scannable code. It was
reachable only through the `partners` extra, which means the documented first
step — `pip install -e .` — produces a Channels page whose "Scan to connect"
button silently yields nothing: `render_qr_svg` swallows the ImportError and
returns an empty string, and `_qr_data_url` returns None. Neither the UI nor
the logs say a word, so the failure reads as a broken feature rather than a
missing extra.
The package is pure Python, holds no compiled or system dependencies, and every
scan-based channel needs it, so it belongs in the core set — the same call
already made for `mcp` in issue #792.
- pyproject.toml: move `qrcode` from the `partners` extra into core
- requirements/cli.txt: mirror it, since that file images the core deps
- requirements/partners.txt: drop it; it now arrives via `-r server.txt`
- tests: reword the degradation test, which now guards trimmed deployments
rather than the default install
The lazy-import fallback itself is kept on purpose: a build assembled without
the full requirement set must still serve a usable page carrying the raw scan
payload.
* fix(cli): declare standalone runtime dependencies
* style: satisfy ruff format in the packaging metadata test
`ruff format --check .` is a CI gate and wanted the `open("rb")` call on one
line (99 chars). This was the only red check; every test job passed.
---------
Co-authored-by: Frank <bingxizhao@novix.science>
Adds PageIndex OSS as a knowledge-base type and moves PageIndex retrieval from traditional RAG to reasoning-based retrieval: a small workflow-owned agent loop reads the document tree instead of going through the built-in MCP server, which this removes.
The `mcp` client was declared only under the `partners` extra, but the MCP
connection manager and the built-in PageIndex MCP server are core: the manager
overlays a reserved `pageindex` entry onto the config whenever a PageIndex API
key is set, on any turn. A plain `pip install deeptutor` therefore had no `mcp`,
so the connection task raised ModuleNotFoundError, never resolved the caller's
ready future, and every turn stalled for the full 15s connect timeout before
reporting the one cause that was not responsible: "connect timed out after 15s".
Declare `mcp>=1.26.0,<2.0.0` as a core dependency of both published
distributions and drop it from the `partners` extra, which now inherits it.
Mirror the move in requirements/ (cli.txt gains it, partners.txt inherits it
via server.txt).
Also import `mcp` inside `_run_server`'s guarded block rather than above it. At
function scope the import raised before anything could fail `ready`, which is
what turned a permanent, instantly-knowable error into a timeout plus an
orphaned "Task exception was never retrieved". Inside the block the real cause
reaches the caller immediately.
Closes#792
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.
Add Zulip as a new messaging channel for DeepTutor tutorbot.
Features:
- Private message and stream message support
- Event queue API (register/get_events/deregister) for reliable message listening
- Three-layer infinite loop protection (max_message_id, own message filter, dedup)
- File upload/download with configurable timeout and retry
- Permission control via allow_from (supports both user_id and email)
- Stream group policy: mention (respond only when mentioned) / open (respond to all)
- KaTeX/LaTeX bidirectional conversion for math formulas
- Typing indicator support for private chats (Zulip native API)
Technical highlights:
- Uses call_endpoint with custom timeout instead of send_message/upload_file
(default 15s timeout causes ReadTimeout on file uploads)
- Sync-async bridging via run_in_executor and run_coroutine_threadsafe
- Automatic event queue re-registration on BAD_EVENT_QUEUE_ID error
Tests: 88 unit tests covering all core functionality