Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

fix: prepare modular installs and align dev documentation

Bingxi Zhao (Frank)e99d632de5cd
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5ec9cc774..bea4c70ba 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -114,8 +114,10 @@ repos:
hooks:
- id: mypy
args: [--ignore-missing-imports, --no-error-summary, --no-strict-optional]
- exclude: ^(tests/|scripts/|deeptutor/agents/|deeptutor/services/rag/|deeptutor/api/routers/)
+ # Separate distribution build roots each have their own setup module.
+ exclude: ^(tests/|scripts/|packaging/[^/]+/setup\.py$|deeptutor/agents/|deeptutor/services/rag/|deeptutor/api/routers/)
additional_dependencies:
- types-PyYAML
- types-requests
- types-croniter
+ - types-python-dateutil
diff --git a/Dockerfile b/Dockerfile
index 2688849dc..759d2935a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -75,7 +75,9 @@ WORKDIR /app
# Install system dependencies
# Note: libgl1 and libglib2.0-0 are required for OpenCV (used by mineru)
# Rust is required for building tiktoken and other packages without pre-built wheels
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN sed -i 's|http://deb.debian.org|https://deb.debian.org|g' /etc/apt/sources.list.d/debian.sources \
+ && apt-get -o Acquire::Retries=3 update \
+ && apt-get -o Acquire::Retries=3 install -y --no-install-recommends \
curl \
git \
build-essential \
@@ -135,7 +137,9 @@ WORKDIR /app
# Office previews convert documents to PDF in the main app. Writer, Calc and
# Impress cover DOCX, XLSX and PPTX; Noto CJK preserves Chinese text and
# Liberation supplies common Latin font substitutes in the rendered pages.
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN sed -i 's|http://deb.debian.org|https://deb.debian.org|g' /etc/apt/sources.list.d/debian.sources \
+ && apt-get -o Acquire::Retries=3 update \
+ && apt-get -o Acquire::Retries=3 install -y --no-install-recommends \
curl \
ca-certificates \
bash \
@@ -161,6 +165,9 @@ RUN ln -sf /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
&& node --version && npm --version
# Copy Python packages from builder stage
+# Replace the base image's package tree instead of merging dist-info from
+# different pip/setuptools versions into one environment.
+RUN rm -rf /usr/local/lib/python3.11/site-packages
COPY --from=python-base /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=python-base /usr/local/bin /usr/local/bin
@@ -175,7 +182,7 @@ COPY --from=frontend-builder /app/web/public/ ./web/public/
COPY deeptutor/ ./deeptutor/
COPY deeptutor_cli/ ./deeptutor_cli/
COPY scripts/ ./scripts/
-COPY pyproject.toml ./
+COPY pyproject.toml build_metadata.py ./
COPY requirements/ ./requirements/
COPY requirements.txt ./
diff --git a/MANIFEST.in b/MANIFEST.in
index c0e1e8c51..5ed730fc0 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,8 +1,8 @@
recursive-include deeptutor_web *
recursive-include deeptutor_web/.next *
-include build_support.py setup.py
+include build_metadata.py build_support.py setup.py
recursive-include deeptutor *.py *.json *.yaml *.yml *.md *.ts *.tsx *.js *.mjs *.sh *.j2
recursive-include deeptutor_cli *.py *.json *.yaml
include scripts/build_modules.py scripts/check_minimal_install.py scripts/check_module_install.py scripts/sync_module_requirements.py
-recursive-include packaging *.toml
+recursive-include packaging *.toml *.py
diff --git a/README.md b/README.md
index ab3eeb371..d11d4a6d3 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@
</p>
<p align="center">
-<a href="https://www.star-history.com/hkuds/deeptutor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/badge?repo=HKUDS/DeepTutor&amp;type=trending&amp;theme=dark"><source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/badge?repo=HKUDS/DeepTutor&amp;type=trending"><img alt="GitHub Trending Repository of the Day" src="https://api.star-history.com/badge?repo=HKUDS/DeepTutor&amp;type=trending" height="55"></picture></a>&#32;<a href="https://trendshift.io/repositories/17099"><img src="https://trendshift.io/api/badge/trendshift/repositories/17099/daily" alt="HKUDS/DeepTutor | Trendshift" width="250" height="55"></a>&#32;<a href="https://www.star-history.com/hkuds/deeptutor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/badge?repo=HKUDS/DeepTutor&amp;theme=dark"><source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/badge?repo=HKUDS/DeepTutor"><img alt="Star History Rank" src="https://api.star-history.com/badge?repo=HKUDS/DeepTutor" width="185" height="55"></picture></a>
+<a href="https://www.star-history.com/hkuds/deeptutor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/badge?repo=HKUDS/DeepTutor&amp;type=trending&amp;theme=dark" /><source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/badge?repo=HKUDS/DeepTutor&amp;type=trending" /><img alt="GitHub Trending Repository of the Day" src="https://api.star-history.com/badge?repo=HKUDS/DeepTutor&amp;type=trending" height="55" /></picture></a>&#32;<a href="https://trendshift.io/repositories/17099"><img src="https://trendshift.io/api/badge/trendshift/repositories/17099/daily" alt="HKUDS/DeepTutor | Trendshift" width="250" height="55"></a>&#32;<a href="https://www.star-history.com/hkuds/deeptutor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/badge?repo=HKUDS/DeepTutor&amp;theme=dark"><source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/badge?repo=HKUDS/DeepTutor"><img alt="Star History Rank" src="https://api.star-history.com/badge?repo=HKUDS/DeepTutor" width="185" height="55"></picture></a>
</p>
<p align="center">
@@ -324,7 +324,7 @@ shown as **best effort** in Workspace settings.
<details>
<summary><b>Option 1 — Install From PyPI</b> · full local Web app + CLI, no clone required</summary>
-**Upcoming modular release:** use `deeptutor[full]` for the Web app and CLI, or `deeptutor` for core chat. The split packages are not yet published; current PyPI 1.6.15 uses the previous layout. To try modular installation now, build [local wheels](docs-for-dev/MODULES.md). Needs **Python 3.11–3.14** and a **Node.js 20+** runtime on PATH (the packaged Next.js standalone server is spawned by `deeptutor start`).
+**Upcoming 1.7.0 modular release:** use `deeptutor[full]` for the Web app and CLI, or `deeptutor` for core chat. The commands below apply after publication; current PyPI 1.6.15 uses the previous layout. To try current `dev`, use the source instructions below or build [local wheels](docs-for-dev/MODULES.md). Needs **Python 3.11–3.14** and a **Node.js 20+** runtime on PATH (the packaged Next.js standalone server is spawned by `deeptutor start`).
```bash
mkdir -p my-deeptutor && cd my-deeptutor
@@ -335,6 +335,8 @@ deeptutor start # starts backend + frontend; keep the terminal open
`deeptutor init` prompts for backend port (default `8001`), frontend port (default `3782`), LLM provider / base URL / API key / model, an optional embedding provider for Knowledge Base / RAG, and an optional search provider for Web Search.
+**Upgrading to the upcoming 1.7.0:** stop the app and back up your runtime home. After publication, use `python -m pip install --upgrade "deeptutor[full]==1.7.0"`, then `python -m pip check` and `deeptutor module list`. If the legacy `deeptutor-cli` package is installed, first run `python -m pip uninstall deeptutor-cli`, then run the upgrade command (optionally adding `deeptutor-cli==1.7.0`). The old CLI owns shared Python files, so upgrading it in the same transaction can delete the new core. Uninstalling the package leaves your runtime-home data intact. Keep the same `DEEPTUTOR_HOME` and existing settings. In 1.7.0, bare `pip install -U deeptutor` selects core only; use `[full]` to request the full-app installation profile. Before publication, follow the [local wheel upgrade instructions](docs-for-dev/MODULES.md#upgrade-from-1615).
+
After `deeptutor start`, open the frontend URL printed in the terminal — by default [http://127.0.0.1:3782](http://127.0.0.1:3782). Press `Ctrl+C` in that terminal to stop both backend and frontend. Skipping `deeptutor init` is fine for a quick trial; the app boots with default ports and empty model settings, configure them later in **Settings → Providers** and **Language models**.
**Browser microphone transcription:** OpenAI-compatible STT adapters forward browser audio to the provider without local conversion. The native DashScope and Volcengine STT adapters convert browser WebM/Opus to 16 kHz WAV and require an `ffmpeg` executable on DeepTutor's `PATH`. A canonical 16 kHz mono PCM WAV bypasses this conversion. For Windows PyPI installations using either native adapter, install FFmpeg, add its `bin` directory to the service's `PATH`, then restart DeepTutor. Conversion failures appear below the chat input.
@@ -347,7 +349,7 @@ After `deeptutor start`, open the frontend URL printed in the terminal — by de
For development against a checkout. Use **Python 3.11–3.14** and **Node.js 22 LTS** to match CI and Docker.
```bash
-git clone https://github.com/HKUDS/DeepTutor.git
+git clone --branch dev https://github.com/HKUDS/DeepTutor.git
cd DeepTutor
# Create a venv (macOS/Linux). Windows PowerShell:
@@ -381,15 +383,15 @@ python -m pip install --upgrade pip
<summary><b>Optional install extras</b> — RAG engines / dev / partners / matrix / math-animator</summary>
```bash
-pip install -e ".[rag-lightrag]" # Built-in LightRAG engine (exact supported SDK)
-pip install -e ".[graphrag]" # Microsoft GraphRAG engine (Python 3.11–3.13)
-pip install -e ".[dev]" # tests/lint tools
-pip install -e ".[partners]" # Partner IM channel SDKs
-pip install -e ".[video-learning]" # captions for reading/video-learning
-pip install -e ".[matrix]" # Matrix channel without E2EE/libolm
-pip install -e ".[matrix-e2e]" # Matrix E2EE; requires libolm
-pip install -e ".[math-animator]" # Manim addon; requires LaTeX/ffmpeg/system libs
-pip install -e ".[edge-tts]" # Optional free speech provider and video-lesson narration
+python scripts/install_extras.py rag-lightrag # Built-in LightRAG engine (exact supported SDK)
+python scripts/install_extras.py graphrag # Microsoft GraphRAG engine (Python 3.11–3.13)
+python scripts/install_extras.py dev # tests/lint tools
+python scripts/install_extras.py partners # Partner IM channel SDKs
+python scripts/install_extras.py video-learning # captions for reading/video-learning
+python scripts/install_extras.py matrix # Matrix channel without E2EE/libolm
+python scripts/install_extras.py matrix-e2e # Matrix E2EE; requires libolm
+python scripts/install_extras.py math-animator # Manim addon; requires LaTeX/ffmpeg/system libs
+python scripts/install_extras.py edge-tts # Optional free speech provider and video-lesson narration
```
**Video Lesson:** choose Video Lesson in chat or run `deeptutor run video_lesson "Explain a concept"`. The backend needs Node.js 22+ and npm. First use downloads pinned Remotion packages and a WebAssembly JavaScript interpreter; Docker is not required. Frame checks run inside the interpreter with no host filesystem, credentials, network or process APIs, under memory and execution limits. Cancellation stops the build process. Local and container deployments use the same execution path, with no unsandboxed fallback. The resulting lesson plays in the browser, with captions when optional narration is unavailable.
@@ -513,10 +515,10 @@ Docker Desktop (macOS/Windows) usually resolves `host.docker.internal` without `
<details>
<summary><b>Option 4 — CLI Only</b> · no Web UI, from a source checkout</summary>
-When you do not need the Web UI, install the core from this checkout. Add feature modules separately as needed.
+When you do not need the Web UI, use the CLI from this checkout and skip Node/npm. Source exposes all checked-in modules and needs their Python dependencies. For a minimal installation after the modular release is published, use the core `deeptutor` wheel and add feature modules separately.
```bash
-git clone https://github.com/HKUDS/DeepTutor.git
+git clone --branch dev https://github.com/HKUDS/DeepTutor.git
cd DeepTutor
# Create a venv (macOS/Linux). Windows PowerShell:
@@ -524,7 +526,8 @@ cd DeepTutor
python3 -m venv .venv-cli && source .venv-cli/bin/activate
python -m pip install --upgrade pip
-python -m pip install -e .
+python -m pip install -r requirements/full.txt
+python -m pip install -e . --no-deps
deeptutor init --cli
deeptutor chat
```
@@ -536,9 +539,9 @@ deeptutor chat
```bash
deeptutor chat # interactive REPL
-deeptutor chat --capability deep_solve --tool rag --kb my-kb
+deeptutor chat --capability deep_solve --kb my-kb
deeptutor run chat "Explain Fourier transform"
-deeptutor run deep_solve "Solve x^2 = 4" --tool rag --kb my-kb
+deeptutor run deep_solve "Solve x^2 = 4" --kb my-kb
deeptutor kb create my-kb --doc textbook.pdf
deeptutor memory show
deeptutor config show
@@ -546,7 +549,7 @@ deeptutor config show
</details>
-The local `deeptutor-cli` install ships no Web assets or server dependencies. Keep the source checkout around — the editable install points to it. To add the Web app later, install the PyPI package (Option 1) and run `deeptutor init` + `deeptutor start` from the same workspace.
+This source install includes server dependencies but skips frontend setup. Keep the checkout around — the editable install points to it. To add the Web UI later, install Node.js 22 LTS, run `npm ci --legacy-peer-deps` in `web/`, then run `deeptutor init` and `deeptutor start` from the project root.
</details>
@@ -712,7 +715,7 @@ User-toggleable tools are `brainstorm`, `web_search`, `paper_search`, `zotero_se
Context comes in two kinds: **sticky session context** (capability, workspace or course, tools, knowledge bases, persona, model, and Reading / Mastery state) persists across turns; **one-time references** (files, chat history, books, reading sections, notebooks, selected question-bank entries, imported agents) come from the `+` menu for a single turn. The voice button only transcribes the current message.
-Home keeps **Chat**, **Ask Questions**, **Quiz**, and **Visualize** one click away; **Research** for cited reports and **Solve** for worked reasoning sit under *More Capabilities*. **Learning → New learning**, above All learning, opens a dedicated page for Books, **Mastery Path**, **Immersive Reading**, and **Practice**. Its **Customize page** control hides or restores learning methods without changing existing records; unavailable modules remain excluded. Reading brings documents, video, and audio together with verified citations, saved notes, natural read-aloud from source passages / study guidance / vocabulary / quiz / translation actions, and notebook capture.
+With the full profile, Home keeps **Chat**, **Ask Questions**, **Quiz**, **Visualize**, and **Video Lesson** one click away; **Research** for cited reports and **Solve** for worked reasoning sit under *More Capabilities*. **Learning → New learning**, above All learning, opens a dedicated page for Books, **Mastery Path**, **Immersive Reading**, and **Practice**. Its **Customize page** control hides or restores learning methods without changing existing records; unavailable modules remain excluded. Reading brings documents, video, and audio together with verified citations, saved notes, natural read-aloud from source passages / study guidance / vocabulary / quiz / translation actions, and notebook capture.
</details>
@@ -857,7 +860,7 @@ Native LightRAG queries and incremental indexing require the embedding configura
<img src="assets/figs/web-1.4.6+/learning-space/00-overview.png" alt="DeepTutor Learning Space hub" width="900">
</div>
-Learning Space is the library, organization, and personalization layer. **Conversations & Materials** holds Chat History, notebooks with movable records and Markdown export, and a question bank with answers and explanations. Start **Practice** from a question-bank selection or Personalized Learning for review sessions, mistake tracking, and scheduled repetition. **Personalization** holds personas, skills (`SKILL.md` playbooks), one-click **MCP Services**, and **CLI Apps** from the [CLI-Anything](https://github.com/HKUDS/CLI-Anything) catalog, each with an on-demand usage guide. The separate **My Courses** workspace groups subject conversations and tutor threads; each asset is offered only in the workflows that support it.
+**Resources** groups Chat History, **Favorites** with movable records and Markdown export, the **Learning journal**, Knowledge Center, and a question bank with answers and explanations. Start **Practice** from a question-bank selection or **Learning → Practice** for review sessions, mistake tracking, and scheduled repetition. The separate **Personalization** page holds personas, skills (`SKILL.md` playbooks), one-click **MCP Services**, and **CLI Apps** from the [CLI-Anything](https://github.com/HKUDS/CLI-Anything) catalog, each with an on-demand usage guide. **Learning** groups books, mastery paths, reading collections, and their tutor conversations; each asset is offered only in the workflows that support it.
<div align="center">
<img src="assets/figs/web-1.4.6+/learning-space/07-%20download%20skills%20from%20eduhub.png" alt="Import skills from EduHub" width="900">
@@ -898,7 +901,7 @@ Settings is the operational control plane, opening on **General** for interface
**MiniMax speech** — in Settings → Voice, choose MiniMax for text-to-speech and select `speech-2.8-hd`. Configure a MiniMax API key and explicitly select a system voice or enter a custom voice ID. The API base defaults to `https://api.minimax.io/v1`; for the China region use `https://api.minimaxi.com/v1`. Read-aloud and voice previews use the native speech endpoint, with MP3, WAV, FLAC or PCM output, sample rate, speed and language controls. See the [MiniMax speech API](https://platform.minimax.io/docs/api-reference/speech-t2a-http) for voice IDs and account availability.
-**Video Learning** under Settings → Learning & conversation configures YouTube captions and Invidious access for Reading. To use Invidious, set its administrator-managed backend API origin (for example `http://127.0.0.1:3000`) and browser-accessible public origin, test the connection, select Invidious, and save. **Browse Invidious** in Reading's add-material dialog searches videos and accesses connected subscriptions and playlists. YouTube playback uses the official privacy-enhanced player; missing captions remain visible and limit the tutor's evidence without blocking native playback. Install `.[video-learning]` for the default YouTube caption loader. Existing Watching links migrate into Reading with conversation history, compatible transcripts, notes, and progress preserved; new timestamp notes are Reading annotations. Bilibili uses its own playback and caption path.
+**Video Learning** under Settings → Learning & conversation configures YouTube captions and Invidious access for Reading. To use Invidious, set its administrator-managed backend API origin (for example `http://127.0.0.1:3000`) and browser-accessible public origin, test the connection, select Invidious, and save. **Browse Invidious** in Reading's add-material dialog searches videos and accesses connected subscriptions and playlists. YouTube playback uses the official privacy-enhanced player; missing captions remain visible and limit the tutor's evidence without blocking native playback. In a source checkout, run `python scripts/install_extras.py video-learning` for the default YouTube caption loader. Existing Watching links migrate into Reading with conversation history, compatible transcripts, notes, and progress preserved; new timestamp notes are Reading annotations. Bilibili uses its own playback and caption path.
<div align="center">
<img src="assets/figs/web-1.4.6+/settings/01-appearance%20settings.png" alt="DeepTutor appearance settings and themes" width="900">
@@ -952,7 +955,7 @@ The **first registered user becomes admin** and owns model catalogs, provider cr
**Enable it:** turn auth on in `data/user/settings/auth.json`, restart `deeptutor start`, register the first admin at `/register`, then add users from `/admin/users` and assign models, KBs, skills, partners, tool/MCP/CLI-app policy, and code-execution access through grants; configure shared books under each user's **Book access** panel.
-For split private/public origins, set `auth.private_login_hosts` (or `AUTH_PRIVATE_LOGIN_HOSTS`) to the private frontend hosts that may show password sign-in and registration. The frontend forwards the incoming HTTP `Host` to the backend as its frontend-host assertion. Preserve the browser's `Host` through your reverse proxy, and make the public ingress reject requests naming a private host; do not expose a raw Next.js port that accepts arbitrary `Host` values. HTTP `Host` can be forged by a direct client, so private-host authorization depends on that ingress boundary. The backend accepts frontend-host assertions only from loopback by default. If the Web frontend connects from another container or host, set `AUTH_TRUSTED_FRONTEND_PROXY_IPS` to that frontend proxy's exact IP address on the backend process (comma-separated for more than one). Keep the backend API private to the frontend proxy and do not include general client networks in this list. Loopback is always allowed; when the list is non-empty, an authenticated user on a private origin can open **Profile → Public device sign-in** and create a short-lived, host-bound pairing link for an HTTPS public origin. The public `/handoff` page exchanges the one-time code for an equally short JWE ticket in a POST body, consumes the ticket once, and receives the normal HttpOnly session cookie.
+For split private/public origins, set `auth.private_login_hosts` (or `AUTH_PRIVATE_LOGIN_HOSTS`) to the private frontend hosts that may show password sign-in and registration. The frontend forwards the incoming HTTP `Host` to the backend as its frontend-host assertion. Preserve the browser's `Host` through your reverse proxy, and make the public ingress reject requests naming a private host; do not expose a raw Next.js port that accepts arbitrary `Host` values. HTTP `Host` can be forged by a direct client, so private-host authorization depends on that ingress boundary. The backend accepts frontend-host assertions only from loopback by default. If the Web frontend connects from another container or host, set `AUTH_TRUSTED_FRONTEND_PROXY_IPS` to that frontend proxy's exact IP address on the backend process (comma-separated for more than one). This replaces the defaults; include `127.0.0.1,::1` if local frontend connections are also needed. Keep the backend API private to the frontend proxy and do not include general client networks in this list. When `private_login_hosts` is non-empty, an authenticated user on a private origin can open **Profile → Public device sign-in** and create a short-lived, host-bound pairing link for an HTTPS public origin. The public `/handoff` page exchanges the one-time code for an equally short JWE ticket in a POST body, consumes the ticket once, and receives the normal HttpOnly session cookie.
> PocketBase stays a single-user integration — keep `integrations.pocketbase_url` blank for multi-user deployments unless you've wired up an external user store.
@@ -969,14 +972,14 @@ One `deeptutor` binary, two ways in: an interactive **REPL** for people who live
```bash
deeptutor chat # interactive REPL
-deeptutor chat --capability deep_solve --kb my-kb --tool rag
-deeptutor run chat "Explain the Fourier transform" --tool rag --kb textbook
-deeptutor run chat "Find recent work beyond this material" --kb textbook --tool knowledge_frontier
+deeptutor chat --capability deep_solve --kb my-kb
+deeptutor run chat "Explain the Fourier transform" --kb textbook
+deeptutor run chat "Find recent work beyond this material" --kb textbook
deeptutor run deep_research "Survey 2026 papers on RAG" \
--config mode=report --config depth=standard
```
-Core workspace management is here too — knowledge bases (`kb`), sessions (`session`), partners (`partner`), skills (`skill`), notebooks, memory, and config; course and session organization remain in the Web app. Full list below.
+`--kb` supplies context for automatic RAG and Knowledge Frontier tools; Frontier needs both knowledge and research modules. `--tool` selects user-toggleable tools. Enabled modules also provide KB, session, partner, skill, notebook, memory, and config commands.
</details>
@@ -1003,6 +1006,8 @@ The repo ships a root [`SKILL.md`](SKILL.md) — a compact handover doc for the
<details>
<summary><b>Command reference</b></summary>
+The table covers the full installation and optional add-ons; commands and capabilities require their modules to be enabled. Core provides `chat` and `ask_questions`.
+
| Command | Description |
|:---|:---|
| `deeptutor init [--non-interactive] [--home PATH]` | Run the setup wizard, or create missing defaults without prompts |
@@ -1047,13 +1052,14 @@ Copilot-specific Responses compatibility is applied at dispatch without rewritin
<details>
<summary><b>CLI-only distribution</b></summary>
-The core supplies CLI and SDK; `deeptutor-cli` is a compatibility metapackage. Install core from this checkout:
+The core wheel supplies CLI and SDK; `deeptutor-cli` is a compatibility metapackage. Source exposes all checked-in modules, so install their Python dependencies and skip frontend setup for CLI use:
```bash
-python -m pip install -e .
+python -m pip install -r requirements/full.txt
+python -m pip install -e . --no-deps
```
-The core owns chat, the shared turn runtime, CLI, and SDK. Optional distributions contribute tools, capabilities, API routes, background services, and navigation. Modules share one Python environment and must match the core version. `deeptutor[full]` selects the common app modules at installation; it does not prevent removing individual features later.
+For a minimal installation, use the core wheel. Optional distributions contribute tools, capabilities, API routes, background services, and navigation. Modules share one Python environment and must match the core version. `deeptutor[full]` selects the common app modules at installation; individual features can still be removed later.
Stop DeepTutor (`Ctrl+C` in its terminal), then use the same Python environment and `DEEPTUTOR_HOME`:
@@ -1066,7 +1072,7 @@ deeptutor module enable research # restore it and required modules
deeptutor module install solve # install the matching module and dependencies
deeptutor module uninstall solve --dry-run # inspect the plan and dependency blockers
deeptutor module uninstall solve # remove only this module's distribution
-deeptutor start # restart the Web app
+deeptutor chat # restart the CLI; use start for an installed Web app
```
Examples: `solve`, `research`, `questions`, `knowledge`, `parsing`, `reading`, `mastery`, `books`, `memory`, `notebook`, and `partners`. Dependents block removal; core cannot be removed through the module command. Disabling or uninstalling preserves settings, conversations, knowledge bases, and generated files. Shared third-party dependencies are retained.
diff --git a/SKILL.md b/SKILL.md
index f93dd83cf..12e738baa 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -23,7 +23,7 @@ Use this skill when the user wants to:
## Prerequisites
- Python 3.11–3.14
-- DeepTutor installed: `pip install deeptutor` for the packaged full Web app, `pip install -e .` for a full source checkout, or `pip install -e ./packaging/deeptutor-cli` for CLI-only from source. Full source installs also need Node.js 22 LTS and `npm ci --legacy-peer-deps` in `web/`.
+- For the upcoming modular release, `pip install "deeptutor[full]"` installs the packaged Web app; bare `deeptutor` (or the `deeptutor-cli` compatibility alias) installs core CLI/SDK only. Before publication, use source or local wheels. Source installs require `pip install -r requirements/full.txt` followed by `pip install -e . --no-deps`; add Node.js 22 LTS and `npm ci --legacy-peer-deps` in `web/` for the Web UI. See the setup guide for upgrading from 1.6.15 without changing the runtime home.
- Run `deeptutor init` for first-time interactive setup. It walks a guided wizard (ports → LLM → embedding → search → review) and writes the same settings as the Web Settings page under `data/user/settings`. Add `--cli` to skip the ports step for CLI-only use, or `--home <path>` to target a specific workspace.
## Agent Setup
diff --git a/artifacts/notes/block-audit/insertion-checks.json b/artifacts/notes/block-audit/insertion-checks.json
index 38f67b803..fc28e7732 100644
--- a/artifacts/notes/block-audit/insertion-checks.json
+++ b/artifacts/notes/block-audit/insertion-checks.json
@@ -511,4 +511,4 @@
},
"text": "Workspace tasksTableBoardList复习傅里叶变换Add"
}
-]
\ No newline at end of file
+]
diff --git a/artifacts/notes/block-audit/mobile-320-check.json b/artifacts/notes/block-audit/mobile-320-check.json
index f1ef6397e..b5122fc2a 100644
--- a/artifacts/notes/block-audit/mobile-320-check.json
+++ b/artifacts/notes/block-audit/mobile-320-check.json
@@ -1 +1 @@
-{"previewHeight":98,"previewScrollable":true,"selectedFullyVisible":true}
\ No newline at end of file
+{"previewHeight":98,"previewScrollable":true,"selectedFullyVisible":true}
diff --git a/artifacts/notes/block-audit/narrow-checks.json b/artifacts/notes/block-audit/narrow-checks.json
index 751377ecd..62777213a 100644
--- a/artifacts/notes/block-audit/narrow-checks.json
+++ b/artifacts/notes/block-audit/narrow-checks.json
@@ -749,4 +749,4 @@
"y": 627.6953125
}
}
-]
\ No newline at end of file
+]
diff --git a/artifacts/notes/block-audit/preview-checks.json b/artifacts/notes/block-audit/preview-checks.json
index ccf97c5c3..3f9490587 100644
--- a/artifacts/notes/block-audit/preview-checks.json
+++ b/artifacts/notes/block-audit/preview-checks.json
@@ -799,4 +799,4 @@
"text": "Fourier transformPodcast · 3:240:00 / 3:24From signals to frequencies.",
"title": "Podcast"
}
-]
\ No newline at end of file
+]
diff --git a/artifacts/notes/favorites-audit/fixture.json b/artifacts/notes/favorites-audit/fixture.json
index b802c228a..fa7a92195 100644
--- a/artifacts/notes/favorites-audit/fixture.json
+++ b/artifacts/notes/favorites-audit/fixture.json
@@ -105,4 +105,4 @@
"new_page_note_id": "ab03bf4a11c2",
"legacy_note_id": "0c2d24985c4f",
"legacy_content": "# 原有标题\n\n保留 **加粗** 与 $E=mc^2$。\n\n| 条目 | 数值 |\n| --- | --- |\n| A | 1 |\n\n$$\nx^2+y^2=1\n$$\n\n原文末尾校验。"
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-audit/legacy_note_id.json b/artifacts/notes/favorites-audit/legacy_note_id.json
index 7dbf1240c..8d38f6060 100644
--- a/artifacts/notes/favorites-audit/legacy_note_id.json
+++ b/artifacts/notes/favorites-audit/legacy_note_id.json
@@ -206,4 +206,4 @@
"applied_suggestion_ids": [],
"created_at": 1792242251.730655,
"updated_at": 1792242361.0827892
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-audit/main-reopened-note.json b/artifacts/notes/favorites-audit/main-reopened-note.json
index 59098e675..92dfe661e 100644
--- a/artifacts/notes/favorites-audit/main-reopened-note.json
+++ b/artifacts/notes/favorites-audit/main-reopened-note.json
@@ -1 +1 @@
-{"id":"a8efdf7eee87","title":"收藏夹 · 多类型与来源验收","content":"## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。\n\n[Source](/notebooks/83d7e5c6?record=22754e42)\n\n## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。\n\n[Source](/notebooks/83d7e5c6?record=22754e42)\n\n# 研究问题\n水在环境中如何循环?\n\n## 证据\n| 过程 | 能量 |\n| --- | --- |\n| 蒸发 | 吸热 |\n| 凝结 | 放热 |\n\n## 结论\n水循环依靠太阳能驱动。\n\n## 资料边界\n这是交互验收用的简短研究资料。\n\n[Source](/notebooks/83d7e5c6?record=0f1dfc6c)\n\n# 题目\n水循环的三个主要阶段是什么?\n\n- A. 蒸发、凝结和降水\n- B. 燃烧、熔化和结晶\n\n## 答案\n**A**。水从液态蒸发,水汽凝结,随后形成降水。\n\n[Source](/notebooks/83d7e5c6?record=9ca5160e)\n\n# 题目\n水池原有 10 L 水,蒸发 2 L 后剩余多少?\n\n## 解答\n$10-2=8$ L。\n\n先确定初始量,再减去蒸发量。\n\n[Source](/notebooks/83d7e5c6?record=f5034ee1)\n\n# 原文摘录\n> 水是生命活动的重要介质。\n\n## 阅读批注\n关注水的比热容和相变。\n\n## 延伸思考\n海洋如何调节温度?\n\n[Source](/notebooks/83d7e5c6?record=6024a065)\n\n# 视频学习\n00:00 学习开始\n00:01 观察水循环\n\n## 笔记\n通过播放进度核对时间点。\n\n[Source](/notebooks/83d7e5c6?record=ad7c3961)\n\n# 核心概念\n水循环包含三种变化。\n\n## 我的观察\n雨后水洼逐渐缩小。\n\n## 下一步\n记录每日水位。\n\n[Source](/notebooks/83d7e5c6?record=f8892445)\n\n## User\n怎样记住水循环?\n\n## Assistant\n想象一滴水旅行:**升空、成云、落雨**。\n\n[Source](/notebooks/83d7e5c6?record=17b3249c)\n\n# 学习目标\n理解水的状态变化。\n\n## 第一步\n观察杯壁水滴。\n\n## 反思\n为什么水滴出现在外壁?\n\n[Source](/notebooks/83d7e5c6?record=ba719159)","blocks":[{"id":"536a1283e1d14e9ab2e5fd6d2d268b7a","type":"clip","props":{"title":"水循环 · 已整理的收藏","markdown":"## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。","sourceUrl":"/notebooks/83d7e5c6?record=22754e42","sourceId":"22754e42","favoriteType":"","summary":"","metadata":"{}","expanded":false},"children":[]},{"id":"35e811bc-e6a2-409f-bb67-73ce5cb27ee9","type":"clip","props":{"title":"水循环 · 已整理的收藏","markdown":"## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。","sourceUrl":"/notebooks/83d7e5c6?record=22754e42","sourceId":"22754e42","favoriteType":"chat","summary":"验收备注:保留原文,供笔记本引用;移动后仍可返回来源。","metadata":"{\"source\":\"chat\",\"capability\":\"chat\",\"ui_language\":\"zh\",\"session_id\":\"unified_1792239246535_e22c126e\",\"total_message_count\":2,\"message_count\":2,\"selected_message_indexes\":[0,1]}","expanded":true},"children":[]},{"id":"399f4b0b-d879-4420-92cd-e6a9e68e30e0","type":"clip","props":{"title":"研究 · 水循环证据","markdown":"# 研究问题\n水在环境中如何循环?\n\n## 证据\n| 过程 | 能量 |\n| --- | --- |\n| 蒸发 | 吸热 |\n| 凝结 | 放热 |\n\n## 结论\n水循环依靠太阳能驱动。\n\n## 资料边界\n这是交互验收用的简短研究资料。","sourceUrl":"/notebooks/83d7e5c6?record=0f1dfc6c","sourceId":"0f1dfc6c","favoriteType":"research","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":true},"children":[]},{"id":"2c9e9660-026b-44fd-abac-4f34adf5e42a","type":"clip","props":{"title":"题目 · 三阶段复习","markdown":"# 题目\n水循环的三个主要阶段是什么?\n\n- A. 蒸发、凝结和降水\n- B. 燃烧、熔化和结晶\n\n## 答案\n**A**。水从液态蒸发,水汽凝结,随后形成降水。","sourceUrl":"/notebooks/83d7e5c6?record=9ca5160e","sourceId":"9ca5160e","favoriteType":"question","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":true},"children":[]},{"id":"fc314ab5-6270-4484-b605-aef2af8c8cd7","type":"clip","props":{"title":"解题 · 水量守恒","markdown":"# 题目\n水池原有 10 L 水,蒸发 2 L 后剩余多少?\n\n## 解答\n$10-2=8$ L。\n\n先确定初始量,再减去蒸发量。","sourceUrl":"/notebooks/83d7e5c6?record=f5034ee1","sourceId":"f5034ee1","favoriteType":"solve","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":false},"children":[]},{"id":"6a29410b-bfb5-406d-8bf2-d69451af7eb0","type":"clip","props":{"title":"阅读 · 摘录与批注","markdown":"# 原文摘录\n> 水是生命活动的重要介质。\n\n## 阅读批注\n关注水的比热容和相变。\n\n## 延伸思考\n海洋如何调节温度?","sourceUrl":"/notebooks/83d7e5c6?record=6024a065","sourceId":"6024a065","favoriteType":"reading","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":false},"children":[]},{"id":"da009dd0-0718-4e5a-a7f2-65d90a6c2546","type":"clip","props":{"title":"视频 · 时间点学习","markdown":"# 视频学习\n00:00 学习开始\n00:01 观察水循环\n\n## 笔记\n通过播放进度核对时间点。","sourceUrl":"/notebooks/83d7e5c6?record=ad7c3961","sourceId":"ad7c3961","favoriteType":"video_learning","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{\"video_url\":\"/api/documents/46c793263607/assets/2987657e75cb40bba8c0d49208c609e6.mp4?dt_workspace=\"}","expanded":true},"children":[]},{"id":"e0e07e3a-02bd-4276-9e30-86c6faa32dd0","type":"clip","props":{"title":"笔记 · 整理材料","markdown":"# 核心概念\n水循环包含三种变化。\n\n## 我的观察\n雨后水洼逐渐缩小。\n\n## 下一步\n记录每日水位。","sourceUrl":"/notebooks/83d7e5c6?record=f8892445","sourceId":"f8892445","favoriteType":"co_writer","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":false},"children":[]},{"id":"18bb1ac6-4be3-47ad-ba8a-78726f0b3b27","type":"clip","props":{"title":"伙伴 · 学习对话","markdown":"## User\n怎样记住水循环?\n\n## Assistant\n想象一滴水旅行:**升空、成云、落雨**。","sourceUrl":"/notebooks/83d7e5c6?record=17b3249c","sourceId":"17b3249c","favoriteType":"tutorbot","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{\"partner_name\":\"学习伙伴\"}","expanded":false},"children":[]},{"id":"aa0040fc-75a5-47df-a2f5-7ee1cd26fe3e","type":"clip","props":{"title":"引导学习 · 逐步理解","markdown":"# 学习目标\n理解水的状态变化。\n\n## 第一步\n观察杯壁水滴。\n\n## 反思\n为什么水滴出现在外壁?","sourceUrl":"/notebooks/83d7e5c6?record=ba719159","sourceId":"ba719159","favoriteType":"chat","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{\"source\":\"chat\",\"capability\":\"mastery_path\"}","expanded":false},"children":[]}],"schema_version":1,"revision":8,"parent_id":null,"icon":"","cover":"","pinned":false,"applied_suggestion_ids":[],"created_at":1792239955.009933,"updated_at":1792241590.059096}
\ No newline at end of file
+{"id":"a8efdf7eee87","title":"收藏夹 · 多类型与来源验收","content":"## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。\n\n[Source](/notebooks/83d7e5c6?record=22754e42)\n\n## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。\n\n[Source](/notebooks/83d7e5c6?record=22754e42)\n\n# 研究问题\n水在环境中如何循环?\n\n## 证据\n| 过程 | 能量 |\n| --- | --- |\n| 蒸发 | 吸热 |\n| 凝结 | 放热 |\n\n## 结论\n水循环依靠太阳能驱动。\n\n## 资料边界\n这是交互验收用的简短研究资料。\n\n[Source](/notebooks/83d7e5c6?record=0f1dfc6c)\n\n# 题目\n水循环的三个主要阶段是什么?\n\n- A. 蒸发、凝结和降水\n- B. 燃烧、熔化和结晶\n\n## 答案\n**A**。水从液态蒸发,水汽凝结,随后形成降水。\n\n[Source](/notebooks/83d7e5c6?record=9ca5160e)\n\n# 题目\n水池原有 10 L 水,蒸发 2 L 后剩余多少?\n\n## 解答\n$10-2=8$ L。\n\n先确定初始量,再减去蒸发量。\n\n[Source](/notebooks/83d7e5c6?record=f5034ee1)\n\n# 原文摘录\n> 水是生命活动的重要介质。\n\n## 阅读批注\n关注水的比热容和相变。\n\n## 延伸思考\n海洋如何调节温度?\n\n[Source](/notebooks/83d7e5c6?record=6024a065)\n\n# 视频学习\n00:00 学习开始\n00:01 观察水循环\n\n## 笔记\n通过播放进度核对时间点。\n\n[Source](/notebooks/83d7e5c6?record=ad7c3961)\n\n# 核心概念\n水循环包含三种变化。\n\n## 我的观察\n雨后水洼逐渐缩小。\n\n## 下一步\n记录每日水位。\n\n[Source](/notebooks/83d7e5c6?record=f8892445)\n\n## User\n怎样记住水循环?\n\n## Assistant\n想象一滴水旅行:**升空、成云、落雨**。\n\n[Source](/notebooks/83d7e5c6?record=17b3249c)\n\n# 学习目标\n理解水的状态变化。\n\n## 第一步\n观察杯壁水滴。\n\n## 反思\n为什么水滴出现在外壁?\n\n[Source](/notebooks/83d7e5c6?record=ba719159)","blocks":[{"id":"536a1283e1d14e9ab2e5fd6d2d268b7a","type":"clip","props":{"title":"水循环 · 已整理的收藏","markdown":"## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。","sourceUrl":"/notebooks/83d7e5c6?record=22754e42","sourceId":"22754e42","favoriteType":"","summary":"","metadata":"{}","expanded":false},"children":[]},{"id":"35e811bc-e6a2-409f-bb67-73ce5cb27ee9","type":"clip","props":{"title":"水循环 · 已整理的收藏","markdown":"## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。","sourceUrl":"/notebooks/83d7e5c6?record=22754e42","sourceId":"22754e42","favoriteType":"chat","summary":"验收备注:保留原文,供笔记本引用;移动后仍可返回来源。","metadata":"{\"source\":\"chat\",\"capability\":\"chat\",\"ui_language\":\"zh\",\"session_id\":\"unified_1792239246535_e22c126e\",\"total_message_count\":2,\"message_count\":2,\"selected_message_indexes\":[0,1]}","expanded":true},"children":[]},{"id":"399f4b0b-d879-4420-92cd-e6a9e68e30e0","type":"clip","props":{"title":"研究 · 水循环证据","markdown":"# 研究问题\n水在环境中如何循环?\n\n## 证据\n| 过程 | 能量 |\n| --- | --- |\n| 蒸发 | 吸热 |\n| 凝结 | 放热 |\n\n## 结论\n水循环依靠太阳能驱动。\n\n## 资料边界\n这是交互验收用的简短研究资料。","sourceUrl":"/notebooks/83d7e5c6?record=0f1dfc6c","sourceId":"0f1dfc6c","favoriteType":"research","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":true},"children":[]},{"id":"2c9e9660-026b-44fd-abac-4f34adf5e42a","type":"clip","props":{"title":"题目 · 三阶段复习","markdown":"# 题目\n水循环的三个主要阶段是什么?\n\n- A. 蒸发、凝结和降水\n- B. 燃烧、熔化和结晶\n\n## 答案\n**A**。水从液态蒸发,水汽凝结,随后形成降水。","sourceUrl":"/notebooks/83d7e5c6?record=9ca5160e","sourceId":"9ca5160e","favoriteType":"question","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":true},"children":[]},{"id":"fc314ab5-6270-4484-b605-aef2af8c8cd7","type":"clip","props":{"title":"解题 · 水量守恒","markdown":"# 题目\n水池原有 10 L 水,蒸发 2 L 后剩余多少?\n\n## 解答\n$10-2=8$ L。\n\n先确定初始量,再减去蒸发量。","sourceUrl":"/notebooks/83d7e5c6?record=f5034ee1","sourceId":"f5034ee1","favoriteType":"solve","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":false},"children":[]},{"id":"6a29410b-bfb5-406d-8bf2-d69451af7eb0","type":"clip","props":{"title":"阅读 · 摘录与批注","markdown":"# 原文摘录\n> 水是生命活动的重要介质。\n\n## 阅读批注\n关注水的比热容和相变。\n\n## 延伸思考\n海洋如何调节温度?","sourceUrl":"/notebooks/83d7e5c6?record=6024a065","sourceId":"6024a065","favoriteType":"reading","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":false},"children":[]},{"id":"da009dd0-0718-4e5a-a7f2-65d90a6c2546","type":"clip","props":{"title":"视频 · 时间点学习","markdown":"# 视频学习\n00:00 学习开始\n00:01 观察水循环\n\n## 笔记\n通过播放进度核对时间点。","sourceUrl":"/notebooks/83d7e5c6?record=ad7c3961","sourceId":"ad7c3961","favoriteType":"video_learning","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{\"video_url\":\"/api/documents/46c793263607/assets/2987657e75cb40bba8c0d49208c609e6.mp4?dt_workspace=\"}","expanded":true},"children":[]},{"id":"e0e07e3a-02bd-4276-9e30-86c6faa32dd0","type":"clip","props":{"title":"笔记 · 整理材料","markdown":"# 核心概念\n水循环包含三种变化。\n\n## 我的观察\n雨后水洼逐渐缩小。\n\n## 下一步\n记录每日水位。","sourceUrl":"/notebooks/83d7e5c6?record=f8892445","sourceId":"f8892445","favoriteType":"co_writer","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":false},"children":[]},{"id":"18bb1ac6-4be3-47ad-ba8a-78726f0b3b27","type":"clip","props":{"title":"伙伴 · 学习对话","markdown":"## User\n怎样记住水循环?\n\n## Assistant\n想象一滴水旅行:**升空、成云、落雨**。","sourceUrl":"/notebooks/83d7e5c6?record=17b3249c","sourceId":"17b3249c","favoriteType":"tutorbot","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{\"partner_name\":\"学习伙伴\"}","expanded":false},"children":[]},{"id":"aa0040fc-75a5-47df-a2f5-7ee1cd26fe3e","type":"clip","props":{"title":"引导学习 · 逐步理解","markdown":"# 学习目标\n理解水的状态变化。\n\n## 第一步\n观察杯壁水滴。\n\n## 反思\n为什么水滴出现在外壁?","sourceUrl":"/notebooks/83d7e5c6?record=ba719159","sourceId":"ba719159","favoriteType":"chat","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{\"source\":\"chat\",\"capability\":\"mastery_path\"}","expanded":false},"children":[]}],"schema_version":1,"revision":8,"parent_id":null,"icon":"","cover":"","pinned":false,"applied_suggestion_ids":[],"created_at":1792239955.009933,"updated_at":1792241590.059096}
diff --git a/artifacts/notes/favorites-audit/new_page_note_id.json b/artifacts/notes/favorites-audit/new_page_note_id.json
index 0644ac5dd..7857b2fa1 100644
--- a/artifacts/notes/favorites-audit/new_page_note_id.json
+++ b/artifacts/notes/favorites-audit/new_page_note_id.json
@@ -28,4 +28,4 @@
"applied_suggestion_ids": [],
"created_at": 1792242057.559506,
"updated_at": 1792242109.330133
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-audit/note-after-insert.json b/artifacts/notes/favorites-audit/note-after-insert.json
index 59098e675..92dfe661e 100644
--- a/artifacts/notes/favorites-audit/note-after-insert.json
+++ b/artifacts/notes/favorites-audit/note-after-insert.json
@@ -1 +1 @@
-{"id":"a8efdf7eee87","title":"收藏夹 · 多类型与来源验收","content":"## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。\n\n[Source](/notebooks/83d7e5c6?record=22754e42)\n\n## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。\n\n[Source](/notebooks/83d7e5c6?record=22754e42)\n\n# 研究问题\n水在环境中如何循环?\n\n## 证据\n| 过程 | 能量 |\n| --- | --- |\n| 蒸发 | 吸热 |\n| 凝结 | 放热 |\n\n## 结论\n水循环依靠太阳能驱动。\n\n## 资料边界\n这是交互验收用的简短研究资料。\n\n[Source](/notebooks/83d7e5c6?record=0f1dfc6c)\n\n# 题目\n水循环的三个主要阶段是什么?\n\n- A. 蒸发、凝结和降水\n- B. 燃烧、熔化和结晶\n\n## 答案\n**A**。水从液态蒸发,水汽凝结,随后形成降水。\n\n[Source](/notebooks/83d7e5c6?record=9ca5160e)\n\n# 题目\n水池原有 10 L 水,蒸发 2 L 后剩余多少?\n\n## 解答\n$10-2=8$ L。\n\n先确定初始量,再减去蒸发量。\n\n[Source](/notebooks/83d7e5c6?record=f5034ee1)\n\n# 原文摘录\n> 水是生命活动的重要介质。\n\n## 阅读批注\n关注水的比热容和相变。\n\n## 延伸思考\n海洋如何调节温度?\n\n[Source](/notebooks/83d7e5c6?record=6024a065)\n\n# 视频学习\n00:00 学习开始\n00:01 观察水循环\n\n## 笔记\n通过播放进度核对时间点。\n\n[Source](/notebooks/83d7e5c6?record=ad7c3961)\n\n# 核心概念\n水循环包含三种变化。\n\n## 我的观察\n雨后水洼逐渐缩小。\n\n## 下一步\n记录每日水位。\n\n[Source](/notebooks/83d7e5c6?record=f8892445)\n\n## User\n怎样记住水循环?\n\n## Assistant\n想象一滴水旅行:**升空、成云、落雨**。\n\n[Source](/notebooks/83d7e5c6?record=17b3249c)\n\n# 学习目标\n理解水的状态变化。\n\n## 第一步\n观察杯壁水滴。\n\n## 反思\n为什么水滴出现在外壁?\n\n[Source](/notebooks/83d7e5c6?record=ba719159)","blocks":[{"id":"536a1283e1d14e9ab2e5fd6d2d268b7a","type":"clip","props":{"title":"水循环 · 已整理的收藏","markdown":"## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。","sourceUrl":"/notebooks/83d7e5c6?record=22754e42","sourceId":"22754e42","favoriteType":"","summary":"","metadata":"{}","expanded":false},"children":[]},{"id":"35e811bc-e6a2-409f-bb67-73ce5cb27ee9","type":"clip","props":{"title":"水循环 · 已整理的收藏","markdown":"## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。","sourceUrl":"/notebooks/83d7e5c6?record=22754e42","sourceId":"22754e42","favoriteType":"chat","summary":"验收备注:保留原文,供笔记本引用;移动后仍可返回来源。","metadata":"{\"source\":\"chat\",\"capability\":\"chat\",\"ui_language\":\"zh\",\"session_id\":\"unified_1792239246535_e22c126e\",\"total_message_count\":2,\"message_count\":2,\"selected_message_indexes\":[0,1]}","expanded":true},"children":[]},{"id":"399f4b0b-d879-4420-92cd-e6a9e68e30e0","type":"clip","props":{"title":"研究 · 水循环证据","markdown":"# 研究问题\n水在环境中如何循环?\n\n## 证据\n| 过程 | 能量 |\n| --- | --- |\n| 蒸发 | 吸热 |\n| 凝结 | 放热 |\n\n## 结论\n水循环依靠太阳能驱动。\n\n## 资料边界\n这是交互验收用的简短研究资料。","sourceUrl":"/notebooks/83d7e5c6?record=0f1dfc6c","sourceId":"0f1dfc6c","favoriteType":"research","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":true},"children":[]},{"id":"2c9e9660-026b-44fd-abac-4f34adf5e42a","type":"clip","props":{"title":"题目 · 三阶段复习","markdown":"# 题目\n水循环的三个主要阶段是什么?\n\n- A. 蒸发、凝结和降水\n- B. 燃烧、熔化和结晶\n\n## 答案\n**A**。水从液态蒸发,水汽凝结,随后形成降水。","sourceUrl":"/notebooks/83d7e5c6?record=9ca5160e","sourceId":"9ca5160e","favoriteType":"question","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":true},"children":[]},{"id":"fc314ab5-6270-4484-b605-aef2af8c8cd7","type":"clip","props":{"title":"解题 · 水量守恒","markdown":"# 题目\n水池原有 10 L 水,蒸发 2 L 后剩余多少?\n\n## 解答\n$10-2=8$ L。\n\n先确定初始量,再减去蒸发量。","sourceUrl":"/notebooks/83d7e5c6?record=f5034ee1","sourceId":"f5034ee1","favoriteType":"solve","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":false},"children":[]},{"id":"6a29410b-bfb5-406d-8bf2-d69451af7eb0","type":"clip","props":{"title":"阅读 · 摘录与批注","markdown":"# 原文摘录\n> 水是生命活动的重要介质。\n\n## 阅读批注\n关注水的比热容和相变。\n\n## 延伸思考\n海洋如何调节温度?","sourceUrl":"/notebooks/83d7e5c6?record=6024a065","sourceId":"6024a065","favoriteType":"reading","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":false},"children":[]},{"id":"da009dd0-0718-4e5a-a7f2-65d90a6c2546","type":"clip","props":{"title":"视频 · 时间点学习","markdown":"# 视频学习\n00:00 学习开始\n00:01 观察水循环\n\n## 笔记\n通过播放进度核对时间点。","sourceUrl":"/notebooks/83d7e5c6?record=ad7c3961","sourceId":"ad7c3961","favoriteType":"video_learning","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{\"video_url\":\"/api/documents/46c793263607/assets/2987657e75cb40bba8c0d49208c609e6.mp4?dt_workspace=\"}","expanded":true},"children":[]},{"id":"e0e07e3a-02bd-4276-9e30-86c6faa32dd0","type":"clip","props":{"title":"笔记 · 整理材料","markdown":"# 核心概念\n水循环包含三种变化。\n\n## 我的观察\n雨后水洼逐渐缩小。\n\n## 下一步\n记录每日水位。","sourceUrl":"/notebooks/83d7e5c6?record=f8892445","sourceId":"f8892445","favoriteType":"co_writer","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":false},"children":[]},{"id":"18bb1ac6-4be3-47ad-ba8a-78726f0b3b27","type":"clip","props":{"title":"伙伴 · 学习对话","markdown":"## User\n怎样记住水循环?\n\n## Assistant\n想象一滴水旅行:**升空、成云、落雨**。","sourceUrl":"/notebooks/83d7e5c6?record=17b3249c","sourceId":"17b3249c","favoriteType":"tutorbot","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{\"partner_name\":\"学习伙伴\"}","expanded":false},"children":[]},{"id":"aa0040fc-75a5-47df-a2f5-7ee1cd26fe3e","type":"clip","props":{"title":"引导学习 · 逐步理解","markdown":"# 学习目标\n理解水的状态变化。\n\n## 第一步\n观察杯壁水滴。\n\n## 反思\n为什么水滴出现在外壁?","sourceUrl":"/notebooks/83d7e5c6?record=ba719159","sourceId":"ba719159","favoriteType":"chat","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{\"source\":\"chat\",\"capability\":\"mastery_path\"}","expanded":false},"children":[]}],"schema_version":1,"revision":8,"parent_id":null,"icon":"","cover":"","pinned":false,"applied_suggestion_ids":[],"created_at":1792239955.009933,"updated_at":1792241590.059096}
\ No newline at end of file
+{"id":"a8efdf7eee87","title":"收藏夹 · 多类型与来源验收","content":"## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。\n\n[Source](/notebooks/83d7e5c6?record=22754e42)\n\n## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。\n\n[Source](/notebooks/83d7e5c6?record=22754e42)\n\n# 研究问题\n水在环境中如何循环?\n\n## 证据\n| 过程 | 能量 |\n| --- | --- |\n| 蒸发 | 吸热 |\n| 凝结 | 放热 |\n\n## 结论\n水循环依靠太阳能驱动。\n\n## 资料边界\n这是交互验收用的简短研究资料。\n\n[Source](/notebooks/83d7e5c6?record=0f1dfc6c)\n\n# 题目\n水循环的三个主要阶段是什么?\n\n- A. 蒸发、凝结和降水\n- B. 燃烧、熔化和结晶\n\n## 答案\n**A**。水从液态蒸发,水汽凝结,随后形成降水。\n\n[Source](/notebooks/83d7e5c6?record=9ca5160e)\n\n# 题目\n水池原有 10 L 水,蒸发 2 L 后剩余多少?\n\n## 解答\n$10-2=8$ L。\n\n先确定初始量,再减去蒸发量。\n\n[Source](/notebooks/83d7e5c6?record=f5034ee1)\n\n# 原文摘录\n> 水是生命活动的重要介质。\n\n## 阅读批注\n关注水的比热容和相变。\n\n## 延伸思考\n海洋如何调节温度?\n\n[Source](/notebooks/83d7e5c6?record=6024a065)\n\n# 视频学习\n00:00 学习开始\n00:01 观察水循环\n\n## 笔记\n通过播放进度核对时间点。\n\n[Source](/notebooks/83d7e5c6?record=ad7c3961)\n\n# 核心概念\n水循环包含三种变化。\n\n## 我的观察\n雨后水洼逐渐缩小。\n\n## 下一步\n记录每日水位。\n\n[Source](/notebooks/83d7e5c6?record=f8892445)\n\n## User\n怎样记住水循环?\n\n## Assistant\n想象一滴水旅行:**升空、成云、落雨**。\n\n[Source](/notebooks/83d7e5c6?record=17b3249c)\n\n# 学习目标\n理解水的状态变化。\n\n## 第一步\n观察杯壁水滴。\n\n## 反思\n为什么水滴出现在外壁?\n\n[Source](/notebooks/83d7e5c6?record=ba719159)","blocks":[{"id":"536a1283e1d14e9ab2e5fd6d2d268b7a","type":"clip","props":{"title":"水循环 · 已整理的收藏","markdown":"## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。","sourceUrl":"/notebooks/83d7e5c6?record=22754e42","sourceId":"22754e42","favoriteType":"","summary":"","metadata":"{}","expanded":false},"children":[]},{"id":"35e811bc-e6a2-409f-bb67-73ce5cb27ee9","type":"clip","props":{"title":"水循环 · 已整理的收藏","markdown":"## User\n请记录水循环的三个阶段,供收藏夹流程验收。\n\n## Assistant\n## 水循环原始资料\n\n水循环包括 **蒸发、凝结和降水**。\n\n1. 太阳加热水面,液态水变成水汽。\n2. 水汽冷却凝结成云。\n3. 云滴增大后形成降水。\n\n> 原文校验:这段内容在收藏和引用后应保持不变。","sourceUrl":"/notebooks/83d7e5c6?record=22754e42","sourceId":"22754e42","favoriteType":"chat","summary":"验收备注:保留原文,供笔记本引用;移动后仍可返回来源。","metadata":"{\"source\":\"chat\",\"capability\":\"chat\",\"ui_language\":\"zh\",\"session_id\":\"unified_1792239246535_e22c126e\",\"total_message_count\":2,\"message_count\":2,\"selected_message_indexes\":[0,1]}","expanded":true},"children":[]},{"id":"399f4b0b-d879-4420-92cd-e6a9e68e30e0","type":"clip","props":{"title":"研究 · 水循环证据","markdown":"# 研究问题\n水在环境中如何循环?\n\n## 证据\n| 过程 | 能量 |\n| --- | --- |\n| 蒸发 | 吸热 |\n| 凝结 | 放热 |\n\n## 结论\n水循环依靠太阳能驱动。\n\n## 资料边界\n这是交互验收用的简短研究资料。","sourceUrl":"/notebooks/83d7e5c6?record=0f1dfc6c","sourceId":"0f1dfc6c","favoriteType":"research","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":true},"children":[]},{"id":"2c9e9660-026b-44fd-abac-4f34adf5e42a","type":"clip","props":{"title":"题目 · 三阶段复习","markdown":"# 题目\n水循环的三个主要阶段是什么?\n\n- A. 蒸发、凝结和降水\n- B. 燃烧、熔化和结晶\n\n## 答案\n**A**。水从液态蒸发,水汽凝结,随后形成降水。","sourceUrl":"/notebooks/83d7e5c6?record=9ca5160e","sourceId":"9ca5160e","favoriteType":"question","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":true},"children":[]},{"id":"fc314ab5-6270-4484-b605-aef2af8c8cd7","type":"clip","props":{"title":"解题 · 水量守恒","markdown":"# 题目\n水池原有 10 L 水,蒸发 2 L 后剩余多少?\n\n## 解答\n$10-2=8$ L。\n\n先确定初始量,再减去蒸发量。","sourceUrl":"/notebooks/83d7e5c6?record=f5034ee1","sourceId":"f5034ee1","favoriteType":"solve","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":false},"children":[]},{"id":"6a29410b-bfb5-406d-8bf2-d69451af7eb0","type":"clip","props":{"title":"阅读 · 摘录与批注","markdown":"# 原文摘录\n> 水是生命活动的重要介质。\n\n## 阅读批注\n关注水的比热容和相变。\n\n## 延伸思考\n海洋如何调节温度?","sourceUrl":"/notebooks/83d7e5c6?record=6024a065","sourceId":"6024a065","favoriteType":"reading","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":false},"children":[]},{"id":"da009dd0-0718-4e5a-a7f2-65d90a6c2546","type":"clip","props":{"title":"视频 · 时间点学习","markdown":"# 视频学习\n00:00 学习开始\n00:01 观察水循环\n\n## 笔记\n通过播放进度核对时间点。","sourceUrl":"/notebooks/83d7e5c6?record=ad7c3961","sourceId":"ad7c3961","favoriteType":"video_learning","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{\"video_url\":\"/api/documents/46c793263607/assets/2987657e75cb40bba8c0d49208c609e6.mp4?dt_workspace=\"}","expanded":true},"children":[]},{"id":"e0e07e3a-02bd-4276-9e30-86c6faa32dd0","type":"clip","props":{"title":"笔记 · 整理材料","markdown":"# 核心概念\n水循环包含三种变化。\n\n## 我的观察\n雨后水洼逐渐缩小。\n\n## 下一步\n记录每日水位。","sourceUrl":"/notebooks/83d7e5c6?record=f8892445","sourceId":"f8892445","favoriteType":"co_writer","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{}","expanded":false},"children":[]},{"id":"18bb1ac6-4be3-47ad-ba8a-78726f0b3b27","type":"clip","props":{"title":"伙伴 · 学习对话","markdown":"## User\n怎样记住水循环?\n\n## Assistant\n想象一滴水旅行:**升空、成云、落雨**。","sourceUrl":"/notebooks/83d7e5c6?record=17b3249c","sourceId":"17b3249c","favoriteType":"tutorbot","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{\"partner_name\":\"学习伙伴\"}","expanded":false},"children":[]},{"id":"aa0040fc-75a5-47df-a2f5-7ee1cd26fe3e","type":"clip","props":{"title":"引导学习 · 逐步理解","markdown":"# 学习目标\n理解水的状态变化。\n\n## 第一步\n观察杯壁水滴。\n\n## 反思\n为什么水滴出现在外壁?","sourceUrl":"/notebooks/83d7e5c6?record=ba719159","sourceId":"ba719159","favoriteType":"chat","summary":"交互验收:展开原文、返回来源、保存重开。","metadata":"{\"source\":\"chat\",\"capability\":\"mastery_path\"}","expanded":false},"children":[]}],"schema_version":1,"revision":8,"parent_id":null,"icon":"","cover":"","pinned":false,"applied_suggestion_ids":[],"created_at":1792239955.009933,"updated_at":1792241590.059096}
diff --git a/artifacts/notes/favorites-audit/note-before-reopen.json b/artifacts/notes/favorites-audit/note-before-reopen.json
index a83d585d9..ad822fae7 100644
--- a/artifacts/notes/favorites-audit/note-before-reopen.json
+++ b/artifacts/notes/favorites-audit/note-before-reopen.json
@@ -24,4 +24,4 @@
"applied_suggestion_ids": [],
"created_at": 1792239955.009933,
"updated_at": 1792239956.522229
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-audit/persisted-types.json b/artifacts/notes/favorites-audit/persisted-types.json
index 310ca0979..8652ced92 100644
--- a/artifacts/notes/favorites-audit/persisted-types.json
+++ b/artifacts/notes/favorites-audit/persisted-types.json
@@ -163,4 +163,4 @@
"applied_suggestion_ids": [],
"created_at": 1792239955.009933,
"updated_at": 1792241590.059096
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-audit/saved-favorite.json b/artifacts/notes/favorites-audit/saved-favorite.json
index 0971d2eaf..258075c22 100644
--- a/artifacts/notes/favorites-audit/saved-favorite.json
+++ b/artifacts/notes/favorites-audit/saved-favorite.json
@@ -30,4 +30,4 @@
],
"color": "#6366F1",
"icon": "book"
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-audit/ui-checks.json b/artifacts/notes/favorites-audit/ui-checks.json
index b23aca0a4..a7ac2111b 100644
--- a/artifacts/notes/favorites-audit/ui-checks.json
+++ b/artifacts/notes/favorites-audit/ui-checks.json
@@ -148,4 +148,4 @@
"expanded": "true"
}
]
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-structure/after-reopen.json b/artifacts/notes/favorites-structure/after-reopen.json
index 89e434ca5..de440a060 100644
--- a/artifacts/notes/favorites-structure/after-reopen.json
+++ b/artifacts/notes/favorites-structure/after-reopen.json
@@ -248,4 +248,4 @@
"applied_suggestion_ids": [],
"created_at": 1792246032.045156,
"updated_at": 1792246989.5201962
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-structure/baseline.json b/artifacts/notes/favorites-structure/baseline.json
index c1519c203..0665d898c 100644
--- a/artifacts/notes/favorites-structure/baseline.json
+++ b/artifacts/notes/favorites-structure/baseline.json
@@ -157,4 +157,4 @@
"applied_suggestion_ids": [],
"created_at": 1792246032.045156,
"updated_at": 1792246194.9272041
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-structure/before-reopen.json b/artifacts/notes/favorites-structure/before-reopen.json
index 89e434ca5..de440a060 100644
--- a/artifacts/notes/favorites-structure/before-reopen.json
+++ b/artifacts/notes/favorites-structure/before-reopen.json
@@ -248,4 +248,4 @@
"applied_suggestion_ids": [],
"created_at": 1792246032.045156,
"updated_at": 1792246989.5201962
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-structure/cross-level.json b/artifacts/notes/favorites-structure/cross-level.json
index 0a53f2b1e..d2ecc9732 100644
--- a/artifacts/notes/favorites-structure/cross-level.json
+++ b/artifacts/notes/favorites-structure/cross-level.json
@@ -202,4 +202,4 @@
"applied_suggestion_ids": [],
"created_at": 1792246032.045156,
"updated_at": 1792246696.4202812
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-structure/fixture.json b/artifacts/notes/favorites-structure/fixture.json
index d3ac70a9c..ea888b8c1 100644
--- a/artifacts/notes/favorites-structure/fixture.json
+++ b/artifacts/notes/favorites-structure/fixture.json
@@ -39,4 +39,4 @@
"applied_suggestion_ids": [],
"created_at": 1792246032.045156,
"updated_at": 1792246032.045156
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-structure/source-checks.json b/artifacts/notes/favorites-structure/source-checks.json
index 91c9abc53..442b5d7f8 100644
--- a/artifacts/notes/favorites-structure/source-checks.json
+++ b/artifacts/notes/favorites-structure/source-checks.json
@@ -44,4 +44,4 @@
"name": "聊天 水循环 · 移动改名后原文",
"expanded": "true"
}
-]
\ No newline at end of file
+]
diff --git a/artifacts/notes/favorites-structure/sources.json b/artifacts/notes/favorites-structure/sources.json
index d5b86f946..e77078d71 100644
--- a/artifacts/notes/favorites-structure/sources.json
+++ b/artifacts/notes/favorites-structure/sources.json
@@ -125,4 +125,4 @@
],
"color": "#6366F1",
"icon": "book"
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/favorites-structure/verification.json b/artifacts/notes/favorites-structure/verification.json
index 6e003cd7d..c2d5860fa 100644
--- a/artifacts/notes/favorites-structure/verification.json
+++ b/artifacts/notes/favorites-structure/verification.json
@@ -38,4 +38,4 @@
"production_persistence": "full block tree equals before-reopen snapshot"
},
"url": "http://127.0.0.1:3784/co-writer/60b5f3fff04b?dt_workspace="
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/media-learning-audit/fixtures/unsupported.txt b/artifacts/notes/media-learning-audit/fixtures/unsupported.txt
index 378665be1..866ca7c01 100644
--- a/artifacts/notes/media-learning-audit/fixtures/unsupported.txt
+++ b/artifacts/notes/media-learning-audit/fixtures/unsupported.txt
@@ -1 +1 @@
-Unsupported upload format test
\ No newline at end of file
+Unsupported upload format test
diff --git a/artifacts/notes/review-structure-audit/before-final-approval.json b/artifacts/notes/review-structure-audit/before-final-approval.json
index 948bebc10..dfe6d32ca 100644
--- a/artifacts/notes/review-structure-audit/before-final-approval.json
+++ b/artifacts/notes/review-structure-audit/before-final-approval.json
@@ -119,4 +119,4 @@
],
"created_at": 1792230264.74371,
"updated_at": 1792231096.8046741
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/review-structure-audit/final-page.json b/artifacts/notes/review-structure-audit/final-page.json
index 804718ddc..9416677c7 100644
--- a/artifacts/notes/review-structure-audit/final-page.json
+++ b/artifacts/notes/review-structure-audit/final-page.json
@@ -124,4 +124,4 @@
],
"created_at": 1792230264.74371,
"updated_at": 1792231849.009674
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/review-structure-audit/fixture.json b/artifacts/notes/review-structure-audit/fixture.json
index 0f15051bb..fa8da8206 100644
--- a/artifacts/notes/review-structure-audit/fixture.json
+++ b/artifacts/notes/review-structure-audit/fixture.json
@@ -197,4 +197,4 @@
"created_at": 1792229652.5904179
}
]
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/review-structure-audit/retest.json b/artifacts/notes/review-structure-audit/retest.json
index 3fe3c93bd..df9174609 100644
--- a/artifacts/notes/review-structure-audit/retest.json
+++ b/artifacts/notes/review-structure-audit/retest.json
@@ -1,4 +1,4 @@
{
"id": "019a3693d633",
"child": "172333a49228"
-}
\ No newline at end of file
+}
diff --git a/artifacts/notes/review-structure-audit/verification.json b/artifacts/notes/review-structure-audit/verification.json
index 28a96f3b4..bb1bcc8f2 100644
--- a/artifacts/notes/review-structure-audit/verification.json
+++ b/artifacts/notes/review-structure-audit/verification.json
@@ -37,4 +37,4 @@
"final-reopened.jpg",
"parent-child-inline.jpg"
]
-}
\ No newline at end of file
+}
diff --git a/build_metadata.py b/build_metadata.py
new file mode 100644
index 000000000..a9f9157ea
--- /dev/null
+++ b/build_metadata.py
@@ -0,0 +1,65 @@
+"""Versioned package metadata shared by source and official wheel builds.
+
+Keep this module standard-library-only: setuptools loads it before installing
+runtime dependencies, and Docker also uses it to resolve source extras.
+"""
+
+import ast
+import json
+from pathlib import Path
+import tomllib
+
+ROOT = Path(__file__).resolve().parent
+
+
+def project_version(root: Path = ROOT) -> str:
+ source = ast.parse((root / "deeptutor/__version__.py").read_text(encoding="utf-8"))
+ for node in source.body:
+ if isinstance(node, ast.Assign) and any(
+ isinstance(target, ast.Name) and target.id == "__version__" for target in node.targets
+ ):
+ return str(ast.literal_eval(node.value))
+ raise ValueError("Missing DeepTutor version")
+
+
+def optional_dependencies(root: Path = ROOT) -> dict[str, list[str]]:
+ data = tomllib.loads((root / "pyproject.toml").read_text(encoding="utf-8"))
+ templates = data["tool"]["deeptutor"]["optional-dependencies"]
+ version = project_version(root)
+ return {name: [raw.format(version=version) for raw in rows] for name, rows in templates.items()}
+
+
+def source_optional_dependencies(root: Path = ROOT) -> dict[str, list[str]]:
+ """Source deployments already own module code; install only its dependencies.
+
+ Installing a feature wheel over a Docker/source tree would add a second
+ code owner and require the unreleased version to exist on PyPI.
+ """
+ extras = optional_dependencies(root)
+ modules = {
+ path.stem: json.loads(path.read_text(encoding="utf-8"))
+ for path in (root / "deeptutor/modules/manifests").glob("*.json")
+ }
+ distributions = {row["distribution"]: name for name, row in modules.items()}
+
+ def expand_module(name: str) -> list[str]:
+ row = modules[name]
+ return [
+ *row["requirements"],
+ *(raw for dep in row["requires"] for raw in expand_module(dep)),
+ ]
+
+ def expand_extra(name: str) -> list[str]:
+ result = []
+ for raw in extras[name]:
+ package = raw.split("==", 1)[0]
+ if package in distributions:
+ result.extend(expand_module(distributions[package]))
+ elif package.startswith("deeptutor["):
+ for dep in package[len("deeptutor[") : -1].split(","):
+ result.extend(expand_extra(dep))
+ else:
+ result.append(raw)
+ return list(dict.fromkeys(result))
+
+ return {name: expand_extra(name) for name in extras}
diff --git a/deeptutor/api/router_loader.py b/deeptutor/api/router_loader.py
index 8d15fbc7d..9b5bdd7cf 100644
--- a/deeptutor/api/router_loader.py
+++ b/deeptutor/api/router_loader.py
@@ -64,7 +64,7 @@ class DeferredRouter(BaseRoute):
return self.loaded
def matches(self, scope: dict) -> tuple[Match, dict]:
- partial = (Match.NONE, {})
+ partial: tuple[Match, dict] = (Match.NONE, {})
for route in self.patterns:
match, child = route.matches(scope)
if match == Match.FULL:
@@ -133,7 +133,7 @@ class RouterLoader:
self.app.include_router(router, **options)
def expand(self) -> None:
- routes = []
+ routes: list[BaseRoute] = []
for route in self.app.router.routes:
routes.extend(route.load().routes if isinstance(route, DeferredRouter) else [route])
self.app.router.routes[:] = routes
diff --git a/deeptutor/app/container.py b/deeptutor/app/container.py
index 76c8c6afe..c3bd187b4 100644
--- a/deeptutor/app/container.py
+++ b/deeptutor/app/container.py
@@ -100,7 +100,7 @@ class ApplicationContainer:
)
self._recovery_services: dict[str, TurnRecoveryService] = {}
self._started = False
- self._module_lease = None
+ self._module_lease: contextlib.AbstractContextManager | None = None
@classmethod
def build(cls) -> "ApplicationContainer":
diff --git a/deeptutor/modules/catalog.py b/deeptutor/modules/catalog.py
index fc21469ad..dffa5be37 100644
--- a/deeptutor/modules/catalog.py
+++ b/deeptutor/modules/catalog.py
@@ -79,7 +79,9 @@ def manifests() -> dict[str, dict[str, Any]]:
@cache
def source_checkout() -> bool:
root = Path(__file__).resolve().parents[2]
- return (root / ".git").exists() and (root / "pyproject.toml").is_file()
+ # Docker and source archives deliberately omit Git metadata. Published
+ # wheels contain neither the project file nor the source build script.
+ return (root / "pyproject.toml").is_file() and (root / "scripts/build_modules.py").is_file()
def state_path() -> Path:
diff --git a/deeptutor/modules/lifecycle.py b/deeptutor/modules/lifecycle.py
index 46dc4a97d..9586075f3 100644
--- a/deeptutor/modules/lifecycle.py
+++ b/deeptutor/modules/lifecycle.py
@@ -108,7 +108,8 @@ def plan(action: str, name: str) -> dict:
target = _canonical(manifests()[name]["distribution"])
for distribution in metadata.distributions():
- package = distribution.metadata.get("Name", "")
+ headers = distribution.metadata
+ package = headers["Name"] if "Name" in headers else ""
if _canonical(package) == target:
continue
for raw in distribution.requires or ():
diff --git a/deeptutor/multi_user/knowledge_access.py b/deeptutor/multi_user/knowledge_access.py
index bb4c84a49..daa6528bc 100644
--- a/deeptutor/multi_user/knowledge_access.py
+++ b/deeptutor/multi_user/knowledge_access.py
@@ -232,10 +232,10 @@ def list_visible_knowledge_bases() -> list[dict[str, Any]]:
if library_request.get():
viewer = library_viewer.get()
- catalog = knowledge_catalog()
+ catalog_rows = knowledge_catalog()
if viewer is None:
- return catalog
- return [item for item in catalog if item["workspace_id"] == viewer]
+ return catalog_rows
+ return [item for item in catalog_rows if item["workspace_id"] == viewer]
selected = current_resources().knowledge_bases
if selected is None:
own = _list_visible_knowledge_bases()
diff --git a/deeptutor/runtime/orchestrator.py b/deeptutor/runtime/orchestrator.py
index 2105d1cc8..4e31e3168 100644
--- a/deeptutor/runtime/orchestrator.py
+++ b/deeptutor/runtime/orchestrator.py
@@ -15,6 +15,7 @@ from typing import Any, AsyncIterator
import uuid
from deeptutor.capabilities.protocol import AGENT_OUTPUT, EVENT_METADATA
+from deeptutor.core.capability_protocol import TurnCapability
from deeptutor.core.context import UnifiedContext
from deeptutor.core.stream import StreamEvent, StreamEventType
from deeptutor.events.event_bus import Event, EventType, get_event_bus
@@ -99,6 +100,7 @@ class ChatOrchestrator:
yield event
return
+ capability: TurnCapability | None
if context.runtime.answer_by:
# The turn belongs to someone else: a partner or a connected agent
# answers in place of the selected mode. Not a registry entry —
diff --git a/deeptutor/runtime/process.py b/deeptutor/runtime/process.py
index b64380227..50e6857b0 100644
--- a/deeptutor/runtime/process.py
+++ b/deeptutor/runtime/process.py
@@ -5,6 +5,7 @@ from __future__ import annotations
import os
import signal
import subprocess
+import time
def kill_process_tree(pid: int) -> None:
@@ -14,12 +15,22 @@ def kill_process_tree(pid: int) -> None:
Windows Process.kill() alone leaves build and renderer children running.
"""
if os.name != "nt":
- try:
- os.killpg(pid, signal.SIGKILL)
- except ProcessLookupError:
- pass
+ for attempt in range(5):
+ try:
+ os.killpg(pid, signal.SIGKILL)
+ return
+ except ProcessLookupError:
+ return
+ except PermissionError:
+ # macOS can briefly report EPERM (even for signal 0) while
+ # reaping a group. Retry only briefly; persistent permission
+ # failures must still reach the caller, never imply cleanup.
+ if attempt == 4:
+ raise
+ time.sleep(0.01)
return
- result = subprocess.run(
+ # Fixed Windows utility and argument list; no shell or caller-supplied executable.
+ result = subprocess.run( # nosec B607
["taskkill", "/PID", str(pid), "/T", "/F"],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
diff --git a/deeptutor/services/calendar/layers.py b/deeptutor/services/calendar/layers.py
index 4f2085810..da00e7321 100644
--- a/deeptutor/services/calendar/layers.py
+++ b/deeptutor/services/calendar/layers.py
@@ -77,13 +77,14 @@ def read_layers(workspace_id, start, end, tzid):
# The database is already workspace-scoped; match PracticeStore’s live-entry filter.
scope = "(n.session_id IS NULL OR s.deleted_at IS NULL)"
with practice.connect() as db:
+ # SQL fragments are local constants; both time bounds use parameters.
for row in db.execute(
- f"SELECT {_DUE_AT_SQL} AS due FROM notebook_entries n LEFT JOIN sessions s ON s.id=n.session_id LEFT JOIN practice_review_state r ON r.entry_id=n.id WHERE {scope} AND {_DUE_AT_SQL}>=? AND {_DUE_AT_SQL}<?",
+ f"SELECT {_DUE_AT_SQL} AS due FROM notebook_entries n LEFT JOIN sessions s ON s.id=n.session_id LEFT JOIN practice_review_state r ON r.entry_id=n.id WHERE {scope} AND {_DUE_AT_SQL}>=? AND {_DUE_AT_SQL}<?", # nosec B608
(lo, hi),
):
review(row[0]).practice += 1
for row in db.execute(
- f"SELECT e.reviewed_at FROM practice_review_events e JOIN notebook_entries n ON n.id=e.entry_id LEFT JOIN sessions s ON s.id=n.session_id WHERE {scope} AND e.reviewed_at>=? AND e.reviewed_at<?",
+ f"SELECT e.reviewed_at FROM practice_review_events e JOIN notebook_entries n ON n.id=e.entry_id LEFT JOIN sessions s ON s.id=n.session_id WHERE {scope} AND e.reviewed_at>=? AND e.reviewed_at<?", # nosec B608
(lo, hi),
):
footprint(row[0]).practice_reviews += 1
diff --git a/deeptutor/services/calendar/recurrence.py b/deeptutor/services/calendar/recurrence.py
index 88d1b0c33..bfd1f195d 100644
--- a/deeptutor/services/calendar/recurrence.py
+++ b/deeptutor/services/calendar/recurrence.py
@@ -18,7 +18,8 @@ from datetime import date, datetime, time, timedelta, timezone
import re
from zoneinfo import ZoneInfo, ZoneInfoNotFoundError
-from dateutil.rrule import rrule, rrulestr
+from dateutil.rrule import rrule as RecurrenceRule
+from dateutil.rrule import rruleset, rrulestr
UTC_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
WALL_FORMAT = "%Y-%m-%dT%H:%M:%S"
@@ -261,7 +262,7 @@ class Timing:
self.dtstart, self.tzid, self.start_fold
)
- def rule(self) -> rrule | None:
+ def rule(self) -> RecurrenceRule | rruleset | None:
if not self.rrule:
return None
return rrulestr("RRULE:" + self.rrule, dtstart=self.first)
diff --git a/deeptutor/services/llm/provider_factory.py b/deeptutor/services/llm/provider_factory.py
index 44ce9b8ae..998477d93 100644
--- a/deeptutor/services/llm/provider_factory.py
+++ b/deeptutor/services/llm/provider_factory.py
@@ -81,6 +81,7 @@ def _build_runtime_provider(
# These profiles attach SDK-specific prompt caching or model rewrites.
if spec and (spec.supports_prompt_caching or spec.strip_model_prefix):
native = False
+ provider: LLMProvider
if native:
from deeptutor.services.llm.provider_core.typescript_provider import TypeScriptProvider
diff --git a/deeptutor/services/session/sqlite_store.py b/deeptutor/services/session/sqlite_store.py
index d39839348..a47c37235 100644
--- a/deeptutor/services/session/sqlite_store.py
+++ b/deeptutor/services/session/sqlite_store.py
@@ -4189,7 +4189,8 @@ class SQLiteSessionStore:
return [
dict(row)
for row in conn.execute(
- "SELECT id, substr(question, 1, 160) AS question, created_at, updated_at "
+ # Only a fixed table alias is substituted into the local predicate.
+ "SELECT id, substr(question, 1, 160) AS question, created_at, updated_at " # nosec B608
"FROM notebook_entries WHERE "
+ _NOT_RECYCLED_ENTRY_SQL.format(entries="notebook_entries")
+ " ORDER BY updated_at DESC, id DESC"
diff --git a/deeptutor/services/session/turns/executor.py b/deeptutor/services/session/turns/executor.py
index ea538e76d..1ddaea8c8 100644
--- a/deeptutor/services/session/turns/executor.py
+++ b/deeptutor/services/session/turns/executor.py
@@ -73,6 +73,7 @@ class TurnExecutor:
_lock: asyncio.Lock
_executions: dict[str, _TurnExecution]
_reply_queues: dict[str, asyncio.Queue[dict[str, Any] | None]]
+ _inboxes: dict[str, TurnInbox]
def _create_context_builder(self, *, tutoring: bool = False) -> Any: ...
diff --git a/deeptutor_cli/README.md b/deeptutor_cli/README.md
index 05955b711..75ee60630 100644
--- a/deeptutor_cli/README.md
+++ b/deeptutor_cli/README.md
@@ -7,28 +7,32 @@ Agent-first 的命令行界面。两条核心路径:
## 安装
+以下描述即将发布的 1.7.0 模块化布局;拆分包发布前请使用源码或 [本地 wheels](../docs-for-dev/MODULES.md)。发布后,`pip install deeptutor` 安装最小聊天 CLI,`deeptutor-cli` 是它的兼容别名,RAG 等功能按模块添加。
+
```bash
-# 仅 CLI(本地源码安装,含 RAG / 文档解析 / 各家 LLM provider SDK)
+# 从源码使用 CLI(包含各功能模块的 Python 依赖,不安装前端)
git clone https://github.com/HKUDS/DeepTutor.git
cd DeepTutor
python3 -m venv .venv-cli
source .venv-cli/bin/activate
python -m pip install --upgrade pip
-python -m pip install -e ./packaging/deeptutor-cli
+python -m pip install -r requirements/full.txt
+python -m pip install -e . --no-deps
deeptutor init --cli
# CLI + Web/API 服务
-pip install deeptutor
+pip install "deeptutor[full]"
deeptutor init
# 源码开发
-pip install -e .
+pip install -r requirements/full.txt
+pip install -e . --no-deps
deeptutor init
# 可选附加组件
-pip install -e ".[partners]" # Partners 渠道 SDK + MCP 客户端
-pip install -e ".[math-animator]" # 数学动画(另需系统 LaTeX/ffmpeg)
-pip install -e ".[all]" # 全部依赖(含开发工具)
+python scripts/install_extras.py partners # Partners 渠道 SDK + MCP 客户端
+python scripts/install_extras.py math-animator # 数学动画(另需系统 LaTeX/ffmpeg)
+python scripts/install_extras.py all # 全部依赖(含开发工具)
```
`deeptutor init --cli` 和普通 `deeptutor init` 使用同一套 `data/user/settings/` 配置目录;区别是 `--cli` 不询问 Web 后端/前端端口,仍会创建 `system.json`、`auth.json`、`integrations.json`、`model_catalog.json`、`main.yaml` 和 `agents.yaml`,并继续询问 LLM 配置。Embedding 配置默认跳过;如果要使用 `deeptutor kb ...` 或 RAG,请在向导里选择配置 embedding,或稍后编辑 `data/user/settings/model_catalog.json`。
@@ -39,12 +43,17 @@ Windows PowerShell 可使用:
py -3.11 -m venv .venv-cli
.\.venv-cli\Scripts\Activate.ps1
python -m pip install --upgrade pip
-python -m pip install -e ./packaging/deeptutor-cli
+python -m pip install -r requirements/full.txt
+python -m pip install -e . --no-deps
deeptutor init --cli
```
---
+## 从 1.6.15 CLI 升级
+
+停止程序并备份 runtime home 后,先运行 `python -m pip uninstall deeptutor-cli`,再安装 `deeptutor-cli==1.7.0`(完整 Web 应用安装 `deeptutor[full]==1.7.0`)。旧 CLI 包拥有共享代码,直接升级会在卸载旧包时删掉新核心;先卸载可避免这一冲突,且不会删除用户数据。保持原 `DEEPTUTOR_HOME`,安装后运行 `python -m pip check` 和 `deeptutor module list`。拆分包发布前使用本地 wheelhouse 的 `--find-links` 参数。
+
## `run` — 执行 Capability
统一入口,单次执行任意 capability。Agent 只需掌握这一个命令。
@@ -161,7 +170,7 @@ deeptutor chat [options]
deeptutor serve [--host 0.0.0.0] [--port 8001] [--reload]
```
-`deeptutor serve` 需要完整 Web/API 依赖;如果你是通过本地 `./packaging/deeptutor-cli` 安装的 CLI-only 包,请先卸载本地 CLI 包并切换到 `pip install -U deeptutor`。
+`deeptutor serve` 需要 server 模块。wheel 安装可在停止服务后运行 `deeptutor module install server`;完整 Web 应用使用 `pip install -U "deeptutor[full]"`。源码安装使用 `requirements/full.txt`。
---
diff --git a/docs-for-dev/MODULES.md b/docs-for-dev/MODULES.md
index c9b27ba2c..1b8c4f58e 100644
--- a/docs-for-dev/MODULES.md
+++ b/docs-for-dev/MODULES.md
@@ -28,6 +28,10 @@ require a wheel environment, so they never delete tracked source files. Source
requirements are generated by `python scripts/sync_module_requirements.py`.
Use `--check` in CI to detect drift. `requirements/core.txt` and `server.txt`
are minimal; `full.txt` supplies the ordinary complete source/Docker runtime.
+Source archives and Docker images are recognized by the project file and module
+build script, without requiring `.git`. Optional source dependencies can be
+added with `python scripts/install_extras.py <extra>`; this resolves module
+requirements without installing duplicate feature wheels over the source tree.
## Independent wheel installation
@@ -54,6 +58,30 @@ requires assets produced by `scripts/prepare_web_package.py` for `deeptutor star
a source development server uses the checkout's `web/` directory. Build and
release automation prepares Web assets before building the wheel family.
+## Upgrade from 1.6.15
+
+Stop the old process and back up its runtime home. Build the candidate wheels
+with packaged Web assets first. In a disposable copy of the old environment,
+upgrade with `python -m pip install --upgrade --find-links dist/modules
+"deeptutor[full]==<candidate-version>"`. If the legacy `deeptutor-cli` is
+installed, first uninstall it with `python -m pip uninstall deeptutor-cli`,
+then run the upgrade command, optionally adding the new compatibility alias.
+The legacy CLI owns the same Python files as the new core: pip installs its
+new core dependency before removing the old CLI, which deletes the new files.
+Removing the old CLI first avoids this collision and retains runtime-home data.
+For CLI-only migration, install `deeptutor-cli==<candidate-version>` after that
+uninstall. Use the exact candidate version to avoid resolving an
+older published release. Keep `DEEPTUTOR_HOME` unchanged, run `pip check`,
+inspect `deeptutor module list`, and exercise chat, persisted sessions and Web
+startup before upgrading the real environment. Never test against the only copy
+of user data. The bare core upgrade does not retain the old full-app profile.
+
+`deeptutor/__version__.py` is the version source for all builds, including the
+source CLI compatibility package. Extras are templates in
+`tool.deeptutor.optional-dependencies`; both setuptools and the module builder
+resolve their internal pins to that version. A release bump must not leave
+dependencies pointing at the previous module family.
+
## Ownership and assembly
`deeptutor/modules/manifests/*.json` is the authoritative catalog. Each manifest
diff --git a/docs-for-user/AGENT_SETUP.md b/docs-for-user/AGENT_SETUP.md
index e72d79ad3..450cd3938 100644
--- a/docs-for-user/AGENT_SETUP.md
+++ b/docs-for-user/AGENT_SETUP.md
@@ -35,7 +35,8 @@ cd DeepTutor
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
-python -m pip install -e .
+python -m pip install -r requirements/full.txt
+python -m pip install -e . --no-deps
cd web
npm ci --legacy-peer-deps
cd ..
@@ -47,12 +48,32 @@ Windows, use a supported `py -3.X` and `.venv\Scripts\Activate.ps1`. If shell
state does not persist between tool calls, invoke the environment's Python
and `deeptutor` by absolute path and pass environment variables to each process.
-For CLI-only, replace the editable install with
-`python -m pip install -e ./packaging/deeptutor-cli` and skip Node/npm. CLI-only
-is currently installed from source. A packaged full app can use
-`python -m pip install deeptutor` without cloning; it includes Web assets. Check
-that installed version's `--help`: the non-interactive commands below are
-available in the checkout containing this guide and releases that include it.
+For CLI use from source, keep the Python installation above and skip Node/npm.
+A source tree exposes all checked-in modules, so it still needs their Python
+dependencies. For a minimal packaged CLI, install `deeptutor`; `deeptutor-cli`
+is a compatibility alias for the same core. Add feature modules as needed.
+
+The upcoming 1.7.0 package layout uses `python -m pip install "deeptutor[full]"`
+for the complete Web app. Bare `deeptutor` contains core chat, CLI and SDK;
+it does not contain the server or Web assets. Until the split packages are
+published, use the source flow above or the local wheels described in
+[Modules](../docs-for-dev/MODULES.md).
+
+When upgrading from 1.6.15, stop DeepTutor, back up the existing runtime home,
+and keep using the same `DEEPTUTOR_HOME`. Once 1.7.0 is published, run
+`python -m pip install --upgrade "deeptutor[full]==1.7.0"`, then
+`python -m pip check` and `deeptutor module list` before restarting.
+If the legacy `deeptutor-cli` package is installed, uninstall it **before**
+installing the new packages: `python -m pip uninstall deeptutor-cli`. Its old
+wheel owns shared Python files, and a one-command upgrade can remove the newly
+installed core. This does not remove runtime-home data. You can then add
+`deeptutor-cli==1.7.0` to the installation command for the new metadata-only
+compatibility alias. For CLI-only migration, install `deeptutor-cli==1.7.0`
+after removing the old CLI, and add any feature modules you need.
+
+Upgrading bare `deeptutor` no longer installs the full app. Do not reset
+settings or change the runtime-home directory during this upgrade.
+
## 3. Initialize without prompts
diff --git a/packaging/deeptutor-cli/pyproject.toml b/packaging/deeptutor-cli/pyproject.toml
index 8dc597715..7c3b94249 100644
--- a/packaging/deeptutor-cli/pyproject.toml
+++ b/packaging/deeptutor-cli/pyproject.toml
@@ -3,9 +3,8 @@ requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "deeptutor-cli"
-version = "1.6.15"
+dynamic = ["version", "dependencies"]
description = "Compatibility install for the minimal DeepTutor CLI"
requires-python = ">=3.11,<3.15"
-dependencies = ["deeptutor==1.6.15"]
[tool.setuptools]
packages = []
diff --git a/packaging/deeptutor-cli/setup.py b/packaging/deeptutor-cli/setup.py
new file mode 100644
index 000000000..875bd247c
--- /dev/null
+++ b/packaging/deeptutor-cli/setup.py
@@ -0,0 +1,22 @@
+"""Build the source compatibility package against the repository's version."""
+
+from email.parser import Parser
+from pathlib import Path
+import sys
+
+from setuptools import setup
+
+HERE = Path(__file__).resolve().parent
+ROOT = HERE.parents[1]
+if (ROOT / "build_metadata.py").is_file():
+ sys.path.insert(0, str(ROOT))
+ from build_metadata import project_version
+
+ version = project_version(ROOT)
+else:
+ # An extracted CLI sdist has no repository parent. Its metadata was
+ # generated from the version source when the archive was built.
+ version = Parser().parsestr((HERE / "PKG-INFO").read_text(encoding="utf-8"))["Version"]
+ if not version:
+ raise ValueError("Missing CLI source distribution version")
+setup(version=version, install_requires=[f"deeptutor=={version}"])
diff --git a/pyproject.toml b/pyproject.toml
index 011dea258..47f1b39c6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "deeptutor"
-dynamic = ["version"]
+dynamic = ["version", "optional-dependencies"]
description = "An agent-native intelligent learning companion with multi-agent collaboration and RAG"
# Python 3.14 is supported by the core app now that compiled base dependencies
# such as FAISS publish compatible wheels. Keep a forward cap so a future
@@ -48,48 +48,48 @@ dependencies = [
[project.scripts]
deeptutor = "deeptutor_cli.main:main"
-[project.optional-dependencies]
+[tool.deeptutor.optional-dependencies]
# Optional modules own their code and dependencies. Full is an installation profile.
cli = []
codebuddy = ["codebuddy-agent-sdk>=0.3,<0.4"]
-video-learning = ["deeptutor-reading==1.6.15"]
+video-learning = ["deeptutor-reading=={version}"]
edge-tts = ["edge-tts>=7.0,<8.0"]
-video-lesson = ["deeptutor-video-lesson==1.6.15", "edge-tts>=7.0,<8.0"]
-server = ["deeptutor-server==1.6.15"]
-partners = ["deeptutor-partners==1.6.15"]
-parse-markitdown = ["deeptutor-parser-markitdown==1.6.15"]
-parse-docling = ["deeptutor-parser-docling==1.6.15"]
-parse-pymupdf4llm = ["deeptutor-parser-pymupdf4llm==1.6.15"]
-parse-liteparse = ["deeptutor-parser-liteparse==1.6.15"]
-parse = ["deeptutor[parse-markitdown]", "deeptutor[parse-docling]", "deeptutor[parse-pymupdf4llm]", "deeptutor[parse-liteparse]"]
-tutorbot = ["deeptutor[partners]"]
+video-lesson = ["deeptutor-video-lesson=={version}", "edge-tts>=7.0,<8.0"]
+server = ["deeptutor-server=={version}"]
+partners = ["deeptutor-partners=={version}"]
+parse-markitdown = ["deeptutor-parser-markitdown=={version}"]
+parse-docling = ["deeptutor-parser-docling=={version}"]
+parse-pymupdf4llm = ["deeptutor-parser-pymupdf4llm=={version}"]
+parse-liteparse = ["deeptutor-parser-liteparse=={version}"]
+parse = ["deeptutor[parse-markitdown]=={version}", "deeptutor[parse-docling]=={version}", "deeptutor[parse-pymupdf4llm]=={version}", "deeptutor[parse-liteparse]=={version}"]
+tutorbot = ["deeptutor[partners]=={version}"]
matrix = ["matrix-nio>=0.25.2,<1.0.0", "mistune>=3.0.0,<4.0.0", "nh3>=0.2.18,<1.0.0"]
-matrix-e2e = ["deeptutor[matrix]", "matrix-nio[e2e]>=0.25.2,<1.0.0"]
-math-animator = ["deeptutor-renderer-manim==1.6.15"]
+matrix-e2e = ["deeptutor[matrix]=={version}", "matrix-nio[e2e]>=0.25.2,<1.0.0"]
+math-animator = ["deeptutor-renderer-manim=={version}"]
graphrag = ["graphrag>=3.0.1,<4.0.0; python_version < '3.14'"]
rag-lightrag = ["lightrag-hku==1.5.7"]
rag-rerank = ["sentence-transformers>=3.0.0,<6.0.0; python_version < '3.14'"]
guard = ["fastapi-guard>=8.1.1,<9.0.0"]
-dev = ["deeptutor[server]", "pytest>=7.0.0", "pytest-asyncio>=0.23.0", "pre-commit>=3.0.0", "safety<3.0.0", "bandit>=1.8.0", "import-linter>=2.1.0,<3.0.0", "python-docx>=1.1.0", "openpyxl>=3.1.0", "python-pptx>=1.0.0", "pypdf>=4.0.0", "defusedxml>=0.7.1"]
-all = ["deeptutor[full,math-animator,dev]"]
-audio-overview = ["deeptutor-audio-overview==1.6.15"]
-solve = ["deeptutor-solve==1.6.15"]
-reading = ["deeptutor-reading==1.6.15"]
-memory = ["deeptutor-memory==1.6.15"]
-providers = ["deeptutor-providers==1.6.15"]
-questions = ["deeptutor-questions==1.6.15"]
-notebook = ["deeptutor-notebook==1.6.15"]
-web = ["deeptutor-web==1.6.15"]
-parsing = ["deeptutor-parsing==1.6.15"]
-books = ["deeptutor-books==1.6.15"]
-research = ["deeptutor-research==1.6.15"]
-visualize = ["deeptutor-visualize==1.6.15"]
-renderer-manim = ["deeptutor-renderer-manim==1.6.15"]
-calendar = ["deeptutor-calendar==1.6.15"]
-knowledge = ["deeptutor-knowledge==1.6.15"]
-co-writer = ["deeptutor-co-writer==1.6.15"]
-mastery = ["deeptutor-mastery==1.6.15"]
-full = ["deeptutor-audio-overview==1.6.15", "deeptutor-solve==1.6.15", "deeptutor-server==1.6.15", "deeptutor-reading==1.6.15", "deeptutor-partners==1.6.15", "deeptutor-memory==1.6.15", "deeptutor-providers==1.6.15", "deeptutor-questions==1.6.15", "deeptutor-notebook==1.6.15", "deeptutor-web==1.6.15", "deeptutor-video-lesson==1.6.15", "deeptutor-parsing==1.6.15", "deeptutor-books==1.6.15", "deeptutor-research==1.6.15", "deeptutor-visualize==1.6.15", "deeptutor-calendar==1.6.15", "deeptutor-knowledge==1.6.15", "deeptutor-co-writer==1.6.15", "deeptutor-mastery==1.6.15"]
+dev = ["deeptutor[server]=={version}", "pytest>=7.0.0", "pytest-asyncio>=0.23.0", "pre-commit>=3.0.0", "safety<3.0.0", "bandit>=1.8.0", "import-linter>=2.1.0,<3.0.0", "python-docx>=1.1.0", "openpyxl>=3.1.0", "python-pptx>=1.0.0", "pypdf>=4.0.0", "defusedxml>=0.7.1"]
+all = ["deeptutor[full,math-animator,dev]=={version}"]
+audio-overview = ["deeptutor-audio-overview=={version}"]
+solve = ["deeptutor-solve=={version}"]
+reading = ["deeptutor-reading=={version}"]
+memory = ["deeptutor-memory=={version}"]
+providers = ["deeptutor-providers=={version}"]
+questions = ["deeptutor-questions=={version}"]
+notebook = ["deeptutor-notebook=={version}"]
+web = ["deeptutor-web=={version}"]
+parsing = ["deeptutor-parsing=={version}"]
+books = ["deeptutor-books=={version}"]
+research = ["deeptutor-research=={version}"]
+visualize = ["deeptutor-visualize=={version}"]
+renderer-manim = ["deeptutor-renderer-manim=={version}"]
+calendar = ["deeptutor-calendar=={version}"]
+knowledge = ["deeptutor-knowledge=={version}"]
+co-writer = ["deeptutor-co-writer=={version}"]
+mastery = ["deeptutor-mastery=={version}"]
+full = ["deeptutor-audio-overview=={version}", "deeptutor-solve=={version}", "deeptutor-server=={version}", "deeptutor-reading=={version}", "deeptutor-partners=={version}", "deeptutor-memory=={version}", "deeptutor-providers=={version}", "deeptutor-questions=={version}", "deeptutor-notebook=={version}", "deeptutor-web=={version}", "deeptutor-video-lesson=={version}", "deeptutor-parsing=={version}", "deeptutor-books=={version}", "deeptutor-research=={version}", "deeptutor-visualize=={version}", "deeptutor-calendar=={version}", "deeptutor-knowledge=={version}", "deeptutor-co-writer=={version}", "deeptutor-mastery=={version}"]
[tool.setuptools]
include-package-data = true
diff --git a/scripts/build_modules.py b/scripts/build_modules.py
index 0fa999fd0..172ef77c7 100644
--- a/scripts/build_modules.py
+++ b/scripts/build_modules.py
@@ -15,11 +15,11 @@ import shutil
import subprocess
import sys
import tempfile
-import tomllib
import zipfile
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT))
+from build_metadata import optional_dependencies, project_version
from build_support import owner
@@ -28,10 +28,7 @@ def build(output: Path, selected: list[str]) -> list[Path]:
path.stem: json.loads(path.read_text())
for path in (ROOT / "deeptutor/modules/manifests").glob("*.json")
}
- version_ns = {}
- exec((ROOT / "deeptutor/__version__.py").read_text(), version_ns)
- version = version_ns["__version__"]
- project = tomllib.loads((ROOT / "pyproject.toml").read_text())["project"]
+ version = project_version(ROOT)
names = selected or [*modules, "cli"]
output.mkdir(parents=True, exist_ok=True)
files = [
@@ -86,7 +83,7 @@ namespaces = true
if name == "core":
config += '\n[project.scripts]\ndeeptutor = "deeptutor_cli.main:main"\n'
config += "\n[project.optional-dependencies]\n"
- for key, values in project["optional-dependencies"].items():
+ for key, values in optional_dependencies(ROOT).items():
config += f"{json.dumps(key)} = {json.dumps(values)}\n"
for group, entries in (module or {}).get("entry_points", {}).items():
config += f"\n[project.entry-points.{json.dumps(group)}]\n"
diff --git a/scripts/check_minimal_install.py b/scripts/check_minimal_install.py
index 8d1387f97..438116ecc 100644
--- a/scripts/check_minimal_install.py
+++ b/scripts/check_minimal_install.py
@@ -10,6 +10,7 @@ import argparse
import asyncio
import importlib.abc
import importlib.machinery
+import json
import os
from pathlib import Path
import sys
@@ -19,14 +20,17 @@ parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--source-core", action="store_true")
parser.add_argument("--capability", default="chat")
parser.add_argument("--home", type=Path)
+parser.add_argument("--full", action="store_true", help="Allow the full application's capabilities")
+parser.add_argument("--save-replay", type=Path, help="Save a durable turn to verify after upgrade")
+parser.add_argument("--verify-replay", type=Path, help="Replay a turn saved before the upgrade")
args = parser.parse_args()
runtime_home = tempfile.TemporaryDirectory(prefix="deeptutor-core-smoke-")
os.environ["DEEPTUTOR_HOME"] = str(args.home) if args.home else runtime_home.name
if args.source_core:
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
-from deeptutor.modules import catalog
-
if args.source_core:
+ from deeptutor.modules import catalog
+
catalog.installed = lambda name: name == "core"
class BlockOptional(importlib.abc.MetaPathFinder):
@@ -59,9 +63,19 @@ from deeptutor.app import DeepTutorApp
async def main():
app = DeepTutorApp()
try:
+ if args.verify_replay:
+ saved = json.loads(args.verify_replay.read_text())
+ assert await app.get_session(saved["session_id"]) is not None
+ replay = [item async for item in app.stream_turn(saved["turn_id"])]
+ assert [
+ [e["seq"], e["type"], e["content"]]
+ for e in replay
+ if e["seq"] <= saved["terminal_seq"]
+ ] == saved["events"]
+ print("Pre-upgrade session and durable turn replay: OK")
contracts = {row["name"] for row in app.get_capability_contracts()}
assert {"chat", "ask_questions", args.capability} <= contracts
- if args.capability == "chat":
+ if args.capability == "chat" and not args.full:
assert contracts == {"chat", "ask_questions"}, contracts
session, turn = await app.start_turn(
{"content": "Hello", "capability": args.capability, "tools": []}
@@ -83,13 +97,27 @@ async def main():
assert [
(e["seq"], e["type"], e["content"]) for e in replay if e["seq"] <= terminal["seq"]
] == [(e["seq"], e["type"], e["content"]) for e in events if e["seq"] <= terminal["seq"]]
+ if args.save_replay:
+ args.save_replay.write_text(
+ json.dumps(
+ {
+ "session_id": session["id"],
+ "turn_id": turn["id"],
+ "terminal_seq": terminal["seq"],
+ "events": [
+ [e["seq"], e["type"], e["content"]]
+ for e in events
+ if e["seq"] <= terminal["seq"]
+ ],
+ }
+ )
+ )
print("Core chat, durable session and replay: OK")
finally:
await app.container.close()
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
-import json
import threading
diff --git a/scripts/install_extras.py b/scripts/install_extras.py
index 3b8afabd4..0271f5fde 100644
--- a/scripts/install_extras.py
+++ b/scripts/install_extras.py
@@ -47,6 +47,13 @@ def load_extras(pyproject: Path) -> dict[str, list[str]]:
"""``{extra: [requirement, …]}`` as declared by the project."""
with open(pyproject, "rb") as handle:
data = tomllib.load(handle)
+ if "optional-dependencies" in data.get("tool", {}).get("deeptutor", {}):
+ # This script runs directly in containers, so the repository root is
+ # not necessarily already on sys.path.
+ sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+ from build_metadata import source_optional_dependencies
+
+ return source_optional_dependencies(pyproject.resolve().parent)
optional = data.get("project", {}).get("optional-dependencies", {})
return {
str(name): [str(req) for req in reqs]
diff --git a/setup.py b/setup.py
index 21f5946db..d8efa1e69 100644
--- a/setup.py
+++ b/setup.py
@@ -6,6 +6,7 @@ import sys
from setuptools import setup
sys.path.insert(0, str(Path(__file__).resolve().parent))
+from build_metadata import optional_dependencies
from build_support import CoreBuildPy
-setup(cmdclass={"build_py": CoreBuildPy})
+setup(cmdclass={"build_py": CoreBuildPy}, extras_require=optional_dependencies())
diff --git a/tests/cli/test_docs_contract.py b/tests/cli/test_docs_contract.py
index a778c7ac9..95b391818 100644
--- a/tests/cli/test_docs_contract.py
+++ b/tests/cli/test_docs_contract.py
@@ -82,6 +82,7 @@ def test_documented_deeptutor_subcommands_exist() -> None:
"init",
"kb",
"memory",
+ "module",
"notebook",
"partner",
"plugin",
diff --git a/tests/modules/test_render_cancellation.py b/tests/modules/test_render_cancellation.py
index 700a6dd6e..4d73924d5 100644
--- a/tests/modules/test_render_cancellation.py
+++ b/tests/modules/test_render_cancellation.py
@@ -8,6 +8,29 @@ from types import SimpleNamespace
import pytest
[email protected]("group_exists", [False, True])
+def test_cleanup_rechecks_group_after_permission_race(monkeypatch, group_exists):
+ from deeptutor.runtime import process
+
+ calls = []
+
+ def killpg(pid, signal):
+ calls.append((pid, signal))
+ if group_exists or len(calls) == 1:
+ raise PermissionError("group changed during signal")
+ raise ProcessLookupError("group already reaped")
+
+ monkeypatch.setattr(process, "os", SimpleNamespace(name="posix", killpg=killpg))
+ monkeypatch.setattr(process.time, "sleep", lambda _: None)
+ if group_exists:
+ with pytest.raises(PermissionError):
+ process.kill_process_tree(12345)
+ else:
+ process.kill_process_tree(12345)
+ assert len(calls) == (5 if group_exists else 2)
+ assert all(call == (12345, process.signal.SIGKILL) for call in calls)
+
+
@pytest.mark.parametrize("returncode", [0, 128])
def test_windows_cleanup_targets_the_entire_owned_tree(monkeypatch, returncode):
from deeptutor.runtime import process
diff --git a/tests/modules/test_source_distribution.py b/tests/modules/test_source_distribution.py
new file mode 100644
index 000000000..9c16aa7f6
--- /dev/null
+++ b/tests/modules/test_source_distribution.py
@@ -0,0 +1,30 @@
+"""Source exports and Docker retain modules without Git or wheel metadata."""
+
+from importlib.metadata import PackageNotFoundError
+
+from deeptutor.modules import catalog
+
+
+def test_exported_source_enables_modules_without_git(tmp_path, monkeypatch):
+ (tmp_path / "pyproject.toml").touch()
+ (tmp_path / "scripts").mkdir()
+ (tmp_path / "scripts/build_modules.py").touch()
+ monkeypatch.setattr(catalog, "__file__", str(tmp_path / "deeptutor/modules/catalog.py"))
+ monkeypatch.setattr(catalog, "selection", lambda: {})
+
+ def no_wheel(name):
+ raise PackageNotFoundError(name)
+
+ monkeypatch.setattr(catalog.metadata, "distribution", no_wheel)
+ catalog.source_checkout.cache_clear()
+ try:
+ assert catalog.source_checkout()
+ assert all(catalog.module_enabled(name) for name in catalog.manifests())
+ assert not catalog.module_enabled("server", selected={"server": False})
+ # A wheel installation must still require actual distribution metadata.
+ (tmp_path / "scripts/build_modules.py").unlink()
+ catalog.source_checkout.cache_clear()
+ assert not catalog.source_checkout()
+ assert not catalog.installed("server")
+ finally:
+ catalog.source_checkout.cache_clear()
diff --git a/tests/test_packaging_metadata.py b/tests/test_packaging_metadata.py
index ec4fd9b66..2b56d2bf1 100644
--- a/tests/test_packaging_metadata.py
+++ b/tests/test_packaging_metadata.py
@@ -6,6 +6,7 @@ import tomllib
from packaging.requirements import Requirement
import pytest
+from build_metadata import optional_dependencies, project_version, source_optional_dependencies
from deeptutor.__version__ import __version__
from deeptutor.modules.catalog import manifests
from scripts.sync_module_requirements import generated
@@ -20,7 +21,8 @@ def project(path="pyproject.toml"):
def test_core_and_cli_have_one_code_owner():
assert project()["dependencies"] == manifests()["core"]["requirements"]
cli = tomllib.loads((ROOT / "packaging/deeptutor-cli/pyproject.toml").read_text())
- assert cli["project"]["dependencies"] == [f"deeptutor=={__version__}"]
+ assert set(cli["project"]["dynamic"]) == {"version", "dependencies"}
+ assert project_version() == __version__
assert cli["tool"]["setuptools"]["packages"] == []
assert "scripts" not in cli["project"]
for spec in (project(), cli["project"]):
@@ -86,6 +88,37 @@ def test_windows_parser_worker_dependency_is_scoped():
def test_optional_sdk_constraints_remain_intact():
- extras = project()["optional-dependencies"]
+ extras = optional_dependencies()
assert extras["rag-lightrag"] == ["lightrag-hku==1.5.7"]
assert extras["graphrag"] == ["graphrag>=3.0.1,<4.0.0; python_version < '3.14'"]
+
+
+def test_next_release_pins_every_internal_dependency_to_the_new_version(tmp_path):
+ import shutil
+
+ shutil.copy(ROOT / "pyproject.toml", tmp_path)
+ (tmp_path / "deeptutor").mkdir()
+ (tmp_path / "deeptutor/__version__.py").write_text('__version__ = "9.8.7rc1"\n')
+ extras = optional_dependencies(tmp_path)
+ internal = [
+ Requirement(raw)
+ for rows in extras.values()
+ for raw in rows
+ if Requirement(raw).name.startswith("deeptutor")
+ ]
+ assert internal
+ assert all(str(requirement.specifier) == "==9.8.7rc1" for requirement in internal)
+ assert set(Requirement(raw).name for raw in extras["full"]) == {
+ row["distribution"]
+ for name, row in manifests().items()
+ if name not in {"core", "renderer-manim"} and not name.startswith("parser-")
+ }
+
+
+def test_source_extras_install_dependencies_without_module_wheels():
+ extras = source_optional_dependencies()
+ assert not any(
+ Requirement(raw).name.startswith("deeptutor") for rows in extras.values() for raw in rows
+ )
+ assert "manim>=0.19.0" in extras["math-animator"]
+ assert set(manifests()["partners"]["requirements"]) <= set(extras["partners"])
diff --git a/tests/tools/test_office_artifact_execution.py b/tests/tools/test_office_artifact_execution.py
index d9f3d5b5b..64a1d83d1 100644
--- a/tests/tools/test_office_artifact_execution.py
+++ b/tests/tools/test_office_artifact_execution.py
@@ -233,9 +233,7 @@ def test_docx_xlsx_dependencies_cover_pip_source_cli_and_docker() -> None:
core = tomllib.loads((root / "pyproject.toml").read_text())["project"]
cli = tomllib.loads((root / "packaging/deeptutor-cli/pyproject.toml").read_text())["project"]
- from deeptutor.__version__ import __version__
-
- assert cli["dependencies"] == [f"deeptutor=={__version__}"]
+ assert "dependencies" in cli["dynamic"]
def requirements(path):
lines = []
diff --git a/web/features/chat/components/ChatWorkspace.tsx b/web/features/chat/components/ChatWorkspace.tsx
index eb98ca54d..9f324bb87 100644
--- a/web/features/chat/components/ChatWorkspace.tsx
+++ b/web/features/chat/components/ChatWorkspace.tsx
@@ -48,7 +48,7 @@ import StarterSuggestions from "@/components/chat/home/StarterSuggestions";
// clicking a chip becomes a single CSS class flip, no chunk fetch + double
// render. The heavy renderers inside still load lazily.
import FilePreviewDrawer from "@/components/chat/preview/FilePreviewDrawer";
-import { buildSessionActivity } from "@/components/chat/home/SessionActivityPanel";
+import { buildSessionActivity } from "@/lib/session-activity";
import Tooltip from "@/shared/ui/Tooltip";
import SessionViewerPanel, {
type SessionViewerPanelHandle,
@@ -3092,4 +3092,3 @@ function SubagentTabWatcher({
}, [messages, viewerPanelRef]);
return null;
}
-
diff --git a/web/public/provider-icons/microsoft-color.svg b/web/public/provider-icons/microsoft-color.svg
index 4d95a08eb..b6616acad 100644
--- a/web/public/provider-icons/microsoft-color.svg
+++ b/web/public/provider-icons/microsoft-color.svg
@@ -1 +1 @@
-<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Azure</title><path d="M11.49 2H2v9.492h9.492V2h-.002z" fill="#F25022"></path><path d="M22 2h-9.492v9.492H22V2z" fill="#7FBA00"></path><path d="M11.49 12.508H2V22h9.492v-9.492h-.002z" fill="#00A4EF"></path><path d="M22 12.508h-9.492V22H22v-9.492z" fill="#FFB900"></path></svg>
\ No newline at end of file
+<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Azure</title><path d="M11.49 2H2v9.492h9.492V2h-.002z" fill="#F25022"></path><path d="M22 2h-9.492v9.492H22V2z" fill="#7FBA00"></path><path d="M11.49 12.508H2V22h9.492v-9.492h-.002z" fill="#00A4EF"></path><path d="M22 12.508h-9.492V22H22v-9.492z" fill="#FFB900"></path></svg>
diff --git a/web/tests/page-sections.spec.ts b/web/tests/page-sections.spec.ts
index a31d850ce..cf41320aa 100644
--- a/web/tests/page-sections.spec.ts
+++ b/web/tests/page-sections.spec.ts
@@ -62,7 +62,7 @@ describe('page sections', () => {
it('applies the same gates as the sidebar shelves', () => {
const learning = sections(['books']).find(section => section.id === 'learning')!
- expect(learning.pages.map(page => page.label)).toEqual(['navigation.allLearning', 'Books'])
+ expect(learning.pages.map(page => page.label)).toEqual(['navigation.createLearning', 'navigation.allLearning', 'Books'])
// Capability-gated resources stay hidden until the backend registers them.
const resources = sections().find(section => section.id === 'resources')!
expect(resources.pages.some(page => page.href === '/whisper')).toBe(false)