Independent maintainer review approved for 257c5e62. Windows Python 3.12 pre-commit 15/15, targeted Windows and WSL Linux regressions passed; latest HEAD CI has no failures.
Add SearchApi (searchapi.io) as a web-search provider, following the Serply
shape: one key, three modes (search -> google, news -> google_news,
scholar -> google_scholar) behind a single GET endpoint selected by the
`engine` parameter. Rows are plain SERP results, so consolidation still
writes the answer and Scholar rows render through the shared academic
template via the `searchapi_scholar` -> `serper_scholar` mapping.
- Key travels only as `Authorization: Bearer`, never in the URL; requests
carry `Accept: application/json` and `User-Agent: DeepTutor`.
- Google retired `num` for web and news results, so those are cut
client-side with `max_results`; Scholar still honors `num` (capped at 20).
- News sends `link=resolved` so links point at the publisher instead of a
Google redirect, and prefers `iso_date` over the relative `date`.
- Scholar maps `publication`, `inline_links.cited_by.total`, `resource.link`
and `data_cid` onto the Serper attribute keys; a dead `javascript:` PDF
badge is dropped.
- Non-200 raises with the API's `error` message; a non-JSON body raises too.
- Spec table entry (`requires_api_key=True, soft_fallback=False`), registry
import, consolidation mapping and `deeptutor init` wizard entry reading
`SEARCHAPI_API_KEY` / `SEARCH_API_KEY`.
- Nine tests mirroring the Serply block, with fixtures shaped after live
responses from each engine.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Engine-level search provider backed by DeepSeek's /v1/tools/search endpoint,
distinct from the model-side web_search tool mapping: works with any
configured LLM. Rows carry no model-written answer, so consolidation still
supplies it.
- providers/deepseek.py: Bearer auth, count capped 1-50, need_content
default False (page Markdown kept in SearchResult.content only when
requested), summary preferred over snippet as the model-facing blurb,
authority/rerank_score in attributes, proxy honored, base_url used
verbatim with the documented endpoint as fallback. No new dependency.
- SEARCH_PROVIDERS: label DeepSeek, requires_api_key=True,
soft_fallback=False (billed per request; a missing key raises instead
of landing on DuckDuckGo).
- Init wizard entry with DEEPSEEK_API_KEY/SEARCH_API_KEY env keys, keeping
the wizard set equal to the backend table.
- TracePresentation PROVIDER_LABELS: deepseek -> DeepSeek (titleCase would
render "Deepseek").
- Tests: row mapping, 401/402/429 paths, missing key fails before network,
and the base_url/proxy/max_results contract via _NEW_PROVIDERS.
`session show --format json`, `notebook show --format json` and
`notebook create` passed json.dumps() output to console.print(), which
treats a plain string as Rich text: long lines were wrapped inside JSON
strings (invalid JSON), [bracketed] text was dropped, a stray closing
tag such as [/INST] raised MarkupError, and :name: codes became emoji.
Use console.print_json() as the kb, config and doctor commands already
do, and turn off emoji codes in the `run --format json` NDJSON stream,
which already disabled markup and wrapping.
`notebook add-md` and `replace-md` read the file with read_text(encoding="utf-8"),
so a markdown file in another encoding (e.g. a Windows-authored cp1252/latin-1
file) aborted the command with an uncaught UnicodeDecodeError traceback instead
of the clean CLI errors these commands raise for other problems.
Read the bytes and decode through FileTypeRouter.decode_bytes, the shared
fallback-encoding chain the rest of the app already uses for text input (as in
`deeptutor notebook`'s sibling `kb` command).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
In the interactive chat REPL, `/notebook add <ref>` passed the ref straight to
_parse_notebook_refs, which raises typer.BadParameter on an empty notebook id
(e.g. `/notebook add :`). The REPL loop does not guard the _apply_command call,
so the exception propagated out and terminated the whole session — while every
other command (bad /config, unparsable shlex input, etc.) just prints a notice
and keeps the session alive.
Catch BadParameter at the `/notebook add` site, print the message, and continue.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On Windows, piped or redirected output uses the ANSI code page, and a
character outside it (an emoji or check mark in a model reply, CJK text
on a cp1252 system, a CJK notebook name, the Chinese help of skill login)
raised UnicodeEncodeError: the command exited 1 and the rest of its
output was lost. deeptutor run --format json stopped after three events.
main() now calls the launcher's _relax_console_encoding(), which
deeptutor start has used since #702: the streams keep their encoding and
characters it cannot represent are written as "?".
Keep learner-facing explanations visible across finish checks, persistence, and replay. Remove mastery prose heuristics and prioritize learner objections.
Coordinate service shutdown and descendant cleanup, and preserve video lesson identity and playable results across chat completion and reload.
- kb eval gains --rewrite [off|standalone] to force the query-rewrite layer per run (omit to defer to settings), so the same QA set can be scored with the layer on and off for a like-for-like diff.
- kb eval-diff BASELINE CANDIDATE reads two saved --save reports and prints per-metric and per-case movement (rich table, or --format json), quantifying whether a retrieval change helped.
Ship original-source visual practice, recoverable indexing, unified video
Reading, scientific research tools, managed plugins, and a learning journal
as summarized in assets/releases/ver1-6-14.md.
Improve provider setup and protocol-aware endpoints. Restore missing
localized setup and Ukrainian UI text, keep plugin loading in the plugin
layer, harden research XML parsing, and repair isolated test fixtures and
type-checking errors found by the release gate.
Sync README prose and all eleven translations, bump the package version,
and update the stable release announcement.
Validation: 10180 Python tests and 8 subtests passed (28 skipped); 1303
Node tests passed on Node 22; 24 provider UI tests passed. All pre-commit
hooks, ruff, translation checks, documentation checks, and docs build passed.
Adapt the Phase 1 foundation from PR #1309 and complete scoped API lifecycle, pre-import approval, artifact-bound revocation, recovery, bounded workers and frontend isolation. Keep the stronger ecosystem roadmap explicit in the RFC.
Co-authored-by: XZH <cto@xzh.ai>
* fix: log singleton reset failures instead of swallowing them
_reset_runtime_singletons() (deeptutor_cli/init_cmd.py and
deeptutor/runtime/launcher.py) swallowed every exception while dropping
cached PathService/RuntimeSettings/ModelCatalog singletons. A failed
PathService reset leaves the previous home's cached paths in place, so
deeptutor init --home / launcher start silently keep writing into the
old workspace. Log PathService failures at ERROR and cache-clear
failures at WARNING so the misdirection is observable.
* fix(launcher): log handoff failure when mark_failed fails too
_handoff_pending_update wrapped the fallback store.mark_failed in a bare
'except Exception: pass'. When the handoff itself failed and recording
the failure failed again (corrupt state, IO error), the launcher shut
down with no persistent trace of either error. Keep the minimal fix:
emit a fallback log naming the update job, the handoff error and the
recording error before returning False.
* fix(update): log and skip recovery when job state is unreadable
The update worker's recovery path wrapped store.load() in a bare
except-pass: with a corrupt state.json the failed-update bookkeeping and
the app restore were skipped silently, leaving the job stuck and no
trace in worker.log. Load failures now append a durable record (load
error plus the original failure) to the store log and skip the round
without touching the damaged state.
* test(codebuddy): make credential fixture expiry relative to now
test_load_credentials_parses_session wrote a hard-coded expiresAt of
1791055241000 (2026-10-03 15:40:41 UTC) and asserted is_expired() is
False. Once that instant passed the assertion flipped, so the test now
fails on every Python version for every branch.
Derive expiresAt / refreshExpiresAt from time.time() so the fixture
always describes a live session, and assert against the value written.
---------
Co-authored-by: XZH <cto@xzh.ai>
Ship folder-based workspaces and data migration, daily practice, redesigned
provider and model settings, and streaming conversation improvements.
Synchronize README translations and document the archive/permanent-delete
upgrade behavior in assets/releases/ver1-6-9.md.
Reduce initial JavaScript by deduplicating English resources and loading
animation features after hydration. Keep the existing route size budgets.
Update regression fixtures and browser audits for scoped URLs and the new
settings and learning interfaces.
* feat(sessions): add recycle bin for deleted chats
Implements soft-delete for chat sessions so users can restore
accidentally deleted conversations from a recycle bin.
Backend:
- Schema migration adds deleted_at REAL column to sessions
- delete_session becomes a soft-delete (sets deleted_at timestamp)
- New store methods: restore_session, purge_session, list_deleted_sessions
- Session list queries exclude soft-deleted sessions
- API endpoints: GET /sessions/recycle-bin, POST /{id}/restore,
DELETE /{id}/purge (purge triggers attachment/mastery cleanup)
Frontend:
- RecycleBinSection: collapsible sidebar section listing deleted
sessions with Restore and Delete permanently actions
- Wired into SidebarShell via recycleBinSlot prop
- API client functions for list, restore, and purge
- en/zh translations for all recycle-bin UI strings
Tests: 6 backend tests covering the soft-delete lifecycle
* style: apply ruff format to sqlite_store
* fix(sessions): preserve recycled chat artifacts
* feat(sessions): fold #1444's backend into this recycle bin
#1444 built the same feature from the other end. This PR had the SQLite
column, the routes and the sidebar UI; #1444 had the protocol declarations,
the PocketBase implementation and the CLI wording. Neither shipped alone —
this one left multi-user deployments answering AttributeError on
/recycle-bin, and #1444 built a bin nobody could see. Closes#1444; its
backend is here.
Kept from here: one `deleted_at` column. #1444 carried `is_deleted` beside it
in both backends, and `deleted_at IS NOT NULL` already says everything the
boolean did — PocketBase now derives the outward `is_deleted` field from the
timestamp instead of storing it twice.
Taken from #1444: the naming, which turns out to fix the residual both PRs
shipped with. `delete_session` keeps meaning what every existing caller
already meant by it — remove the row — so `reading.py`'s two internal
cleanups need no patch: a deleted reading workspace still takes its sessions
with it instead of depositing them in a learner's bin, where restoring one
would resurrect a session pointing at a workspace that no longer exists. The
chat surface's delete is a separate, explicitly named `soft_delete_session`,
and `hard_delete_session` empties the bin. Both backends agree, and the
protocol declares all five so a backend cannot silently lack one again.
`test_entries_cascade_on_session_purge` becomes two tests, because there are
now two deletions worth pinning: one the bin can undo, and one that skips it
and cascades immediately.
Co-Authored-By: sjagadee <srini.jagadeesh@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---------
Co-authored-by: XZH <cto@xzh.ai>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
Co-authored-by: sjagadee <srini.jagadeesh@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Ship a content workspace you choose, one exec tool for every language,
Mastery Path modes that gate its tools, and Settings that grades
readiness instead of listing faults.
Release notes: assets/releases/ver1-6-5.md