Commit Graph

27 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
04040a2c06 release: v1.6.5
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
2026-09-06 13:46:29 +08:00
Bingxi Zhao (Frank)
93df3d48b7 release: v1.6.4
Ship lighter isolated runtimes, richer Books and Mastery flows,
Reading/session polish, and explicit model API capabilities.

Release notes: assets/releases/ver1-6-4.md
2026-09-03 01:38:54 +08:00
Bingxi Zhao (Frank)
6e6e56aedb release: v1.6.3
Ship the breaking front- and back-end runtime and route refactor,
learner and guardian flows, grounded reading, knowledge and parser
updates, and recoverable long-running streams.

Release notes: assets/releases/ver1-6-3.md
2026-09-02 04:09:11 +08:00
Bingxi Zhao (Frank)
96d6df9eb1 release: v1.5.13
Book is the bulk of this one. Compilation outlives the request that
started it, so a bus owned by that request dropped every background event
and "watch your book being written" degraded into a frozen page; the
stream is now owned per book by the process and survives a refresh or a
reconnect. Reading progress is finally recorded — `visited_page_ids` and
`bookmarked_page_ids` had been declared but never written for the life of
the feature — and rolls up into a completion score and weak chapters. A
book can also leave the app now, as one self-contained Markdown document,
with non-ASCII titles surviving the download.

Two scheduling defects that were invisible in production are fixed: the
same page compiled twice concurrently (billed twice, one result
discarded), and a book grinding on through a provider outage until every
chapter was half-generated. The source sweep is bounded and allocated
round-robin rather than spent on the first few knowledge bases, and
retrieval now tells indexed bases from connected pointers, so an Obsidian
vault or a remote IMA library no longer contributes zero while looking
like a source with nothing relevant. Confirming a spine shows a live
per-chapter estimate derived from the Section Architect's own templates.

Also here: three home starter suggestions built from memory recall,
mastery-path handoff moved into one module that changes lease, session
preference, and live turn together, and account-level Tencent IMA
credentials with the per-KB pair still winning.

Notes: assets/releases/ver1-5-13.md

This commit also carries the README prose sync, the eleven translated
READMEs, the release-notes archive sweep, and the version bump. Two gate
fixes ride along: the `Stamped` protocol is declared read-only so the
frozen `EntityStamp` satisfies it, and six GraphRAG adapter tests that
reached a deep `graphrag` import without guarding it now skip like their
four neighbours instead of failing where the extra is not installed.
2026-08-17 11:22:26 +08:00
Bingxi Zhao (Frank)
da6dfa002b feat(memory): add recall — what the learner touched lately, across surfaces
L1 keeps two kinds of record and answering "what happened lately" needs both.
The snapshot knows what exists (sessions, notebook records, quiz attempts,
documents, books) with a label and a timestamp; the trace knows what was done,
of which knowledge-base queries are the one kind holding a question the
learner typed themselves.

``recent`` merges the seven surfaces newest-first; ``recent_queries`` reads
the trace. Both run on stamps — no message body, no document text, no answer
is read — which is what makes them callable outside consolidation.

Two shaping rules earn their place. Undated items are dropped rather than
assumed recent: knowledge bases stamp their *earliest* index time, so one in
daily use would otherwise be filtered out as ancient while claiming to be
inside the window — the trace answers for KBs instead. And a label repeated on
one surface collapses to its newest occurrence, so a session reopened all
afternoon counts once rather than crowding out everything else.
2026-08-17 09:57:55 +08:00
Bingxi Zhao (Frank)
f5b905f535 perf(memory): read snapshot stamps without loading entity content
The chat adapter inlines every message body of every session into each
Entity's ``content``. That is what L2 consolidation needs, and it is the
wrong price for a caller that only wants to know what the sessions are
called — or for the diff, which reads nothing but fingerprints and labels.

Adds ``EntityStamp`` (identity + label + fingerprint + timestamp) and a
per-surface probe that produces stamps directly. ``read_stamps`` uses a
surface's probe when it has one and projects the full read otherwise, so a
surface without a probe is slower rather than unsupported, and a probe that
raises degrades to the full read rather than reporting the surface empty —
which the diff would take for a mass deletion.

Only ``chat`` gets a probe: every other adapter reads a bounded amount, and
each probe is a standing obligation to match its full reader expression by
expression. The chat probe's fingerprint deliberately picks the last message
under ``created_at ASC, id ASC`` via a window function rather than MAX(id);
the two diverge on backfilled rows, and a probe-driven refresh would then
disagree with a content-driven one about what changed.
2026-08-17 09:57:55 +08:00
Bingxi Zhao
4f06aaa070 fix: isolate Partner data per user (#621)
Keep Partner configuration and assets shared while isolating authenticated users’ sessions, relationship memory, search, and media paths. Preserve legacy admin/IM behavior and enforce assignment checks at every access boundary.
2026-08-16 23:00:41 +08:00
Bingxi Zhao (Frank)
3a19752a44 release: v1.5.3
Maintenance release on top of v1.5.2.

- Themeable code blocks: Settings → Appearance gains a Code blocks panel
  (syntax theme, line numbers, wrapping) applied across chat, Book, and
  Co-Writer.
- My Agents connects four more coding CLIs — Gemini, Kimi, opencode, and
  MiMo Code — alongside Claude Code and Codex.
- Atlas Cloud joins as an LLM provider (34 bindings total); DashScope text
  embeddings route correctly and encoding_format is omitted for strict
  OpenAI-compatible gateways.
- Reliability sweep: RAG coexists with an exclusive knowledge capability
  (#650), DeepSeek DSML tool-call parsing (#666), autoscroll release (#649),
  idempotent write_memory (#647), seeded persona presets (#659), plus Book
  WebSocket streaming, partner filename/split fixes, Visualize fences, and
  CLI UTF-8 input hardening.
- Packaging: cap requires-python to >=3.11,<3.14 so pip refuses 3.14 with a
  readable message instead of a failed source build (#664).

Release notes: assets/releases/ver1-5-3.md
2026-07-24 03:06:58 +08:00
Bingxi Zhao (Frank)
630041a1cd fix(memory): make write_memory preference add idempotent (#647)
preferences.md is never auto-consolidated, so a repeated identical
write_memory add persisted forever as a duplicate — common in long,
tool-driven mastery turns. write_preference now short-circuits a
duplicate add to a no-op that reports the existing entry, and the tool
returns an explicit 'already saved' signal to the model.
2026-07-24 00:42:28 +08:00
Bingxi Zhao
b0ec5daba5 Merge pull request #646 from santhreal/fix/update-facts-raw-decode-dev
fix(memory): parse update facts JSON with raw_decode
2026-07-23 22:26:55 +08:00
santhreal
eee0431fff fix(memory): parse update facts JSON with raw_decode
Trailing prose with braces made the greedy rfind slice invalid, so
_parse_facts silently dropped valid facts. Decode the first object.
2026-07-18 17:26:33 -07:00
santhreal
69582220ef fix(memory): parse line-edit JSON with raw_decode
Trailing prose containing braces made the greedy rfind slice invalid,
so parse_edits_payload silently dropped valid edits. Decode the first
JSON value like math_animator.
2026-07-18 17:23:57 -07:00
Bingxi Zhao (Frank)
1bf11d13e7 prepare 1.4.7 2026-06-18 00:22:48 +08:00
Bingxi Zhao (Frank)
c9d387e2b6 super super great great update 2026-06-17 00:56:27 +08:00
Bingxi Zhao (Frank)
46093e5e2b update msg 2026-06-11 20:03:34 +08:00
Bingxi Zhao (Frank)
6153d8c092 release: v1.4.0 — release notes, version bump, repo hygiene
- Add assets/releases/ver1-4-0.md covering deltas since v1.4.0-beta
  (reasoning_effort normalization, tool-schema fallback, restart-safe
  turn runtime, frontend placeholder hardening, CLI chat REPL config).
- Bump deeptutor/__version__ to 1.4.0.
- Update README Releases section: v1.4.0 at top, install opt-in note
  updated for stable.
- Fix pre-existing pre-commit failures so the v1.4.0 cut runs clean:
  bandit B324 (mark _sha1 as non-security), mypy no-redef in
  document.py / line_doc.py, mypy arg-type/assignment in
  snapshot/adapters.py, mypy assignment + arg-type in
  services/memory/settings.py, mypy func-returns-value on
  set.add idiom in deeptutor_cli/init_wizard.py.
- Apply ruff format / prettier sweep across the repo.
- Remove stale workspace + i18n env example + playwright captures
  already cleaned locally; ignore .playwright-cli/ going forward.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 21:09:22 +08:00
Bingxi Zhao (Frank)
2b7242081f feat(memory): three-layer memory subsystem (L1/L2/L3) with workbench
Replaces the flat single-blob memory page with a structured store:
- L1 captures raw run traces; L2 holds normalized document records;
  L3 holds curated slots per surface (chat, notebook, book, TutorBot).
- New consolidator pipeline (chunker, guards, parse, references, runs,
  modes, line-doc, meta) turns traces into versioned line-oriented
  documents with stable ids and snapshot history.
- Per-user isolation flows through PathService; the store API is
  stateless.

UI ships a dedicated /memory workbench with graph / L1 / L2 / L3 /
resolve subpages, plus a reusable MemorySection embedded where the
legacy panel lived.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:02:32 +08:00
iwedo
a581549e12 fix(multi-user): 修复旧版会话管理器的路径捕获问题,实现完整的数据隔离
核心修改:
- BaseSessionManager: path_service/sessions_file 改为 @property 延迟解析
- chat.py/solve.py: 移除模块级单例,WebSocket 端点添加手动认证
- BookStorage/BookEngine: path_service 延迟解析 + get_book_storage/engine 按路径缓存
- TutorBotManager: path_service 延迟解析 + 修复硬编码 data/tutorbot 路径
- MemoryService: _path_service 改为 @property 延迟解析

修复原理:延迟解析确保路径在请求时(用户上下文已设置)才解析;
按路径缓存确保不同用户获得不同实例,同一用户复用实例。

TutorBot 现在按用户隔离到 multi-user/<uid>/tutorbot/ 而非共享的 data/tutorbot/
2026-05-12 15:32:23 +08:00
Bingxi Zhao (Frank)
2c4769a96f prepare v1.3.8 release
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-08 02:36:24 +08:00
Bingxi Zhao (Frank)
5c31f0dee6 Merge remote-tracking branch 'origin/main' into multi-user
# Conflicts:
#	deeptutor/knowledge/manager.py
#	deeptutor/services/memory/service.py
#	pyproject.toml
#	requirements/server.txt
#	web/app/(workspace)/agents/page.tsx
2026-05-04 17:12:06 +08:00
Bingxi Zhao (Frank)
255738d991 prepare v1.3.3 release
Document v1.3.3 and include the latest Space context, memory, RAG, provider, and session stability updates for release.

Made-with: Cursor
2026-04-30 23:41:58 +08:00
Bingxi Zhao (Frank)
a069b6ebf0 chore: prepare v1.3.2 release
Embedding endpoint URLs are now transparent end-to-end: Settings shows the
exact URL DeepTutor will POST to, legacy `/v1`-style bases are migrated to
full `/embeddings` / `/api/embed` URLs, the embedding client rejects
known-provider misconfigurations early, and OpenRouter routes through the
same exact-URL HTTP adapter as other providers.

LlamaIndex RAG now refreshes embedding state before initialize/search/add,
validates persisted vectors before retrieval, and reports invalid indexes
with `needs_reindex: true` instead of raw NumPy/`NoneType` errors.

Memory refresh strips `<think>` / `<thinking>` blocks from reasoning-model
output before writing PROFILE.md / SUMMARY.md, and existing memory files
self-repair on read.

Also fixes a Deep Solve runtime regression where `MainSolver` still passed
a stale `attachments` keyword to `SolverAgent.process()`.

Adds release notes (assets/releases/ver1-3-2.md) and updates README.

Made-with: Cursor
2026-04-29 20:44:05 +08:00
Bingxi Zhao (Frank)
28e225ee0e chore: prepare v1.3.1 release
Stability release after v1.3.0 covering safer RAG/KB routing, stronger
embedding validation, more reliable Docker/TutorBot restarts, Web UX
fixes, and Windows/encoding hardening. See assets/releases/ver1-3-1.md
for the full notes.

Made-with: Cursor
2026-04-28 12:00:11 +08:00
Bingxi Zhao (Frank)
77f29cbcc7 fix lint 2026-04-23 19:29:16 +08:00
xor_xe
6ca2ecd64f feat: add optional PocketBase integration for auth and session storage
Introduces PocketBase as an optional sidecar for authentication and
session/KB storage, activated only when POCKETBASE_URL is set in .env.
Falls back to the existing SQLite/JSON backend when not configured.

Backend:
- SessionStoreProtocol (typing.Protocol) + get_session_store() factory
- PocketBaseSessionStore: JSONL write-ahead buffer, batch-flush on turn end
- pocketbase_client.py: singleton admin client, 60s in-memory token cache
- auth.py: additive PocketBase path (email-based login/register)
- CORS: explicit origins instead of wildcard (wildcard+credentials fails)
- WebSocket: validate token at connect time when AUTH_ENABLED

Infrastructure:
- docker-compose: pocketbase service with healthcheck + depends_on
- scripts/pb_setup.py: idempotent PocketBase collection bootstrap
- requirements/server.txt: pocketbase>=0.12.0

Frontend:
- Register/login: username field -> email field for PocketBase mode
- auth.ts: normalise FastAPI 422 errors to plain strings
- agents page: guard bots.map() against non-array responses
- settings page: graceful fetch error handling
- *.env.local added to .gitignore

Docs: README PocketBase sidecar setup section added
2026-04-17 21:42:29 +04:00
Bingxi Zhao (Frank)
c15e22a4b3 chore: stable fix, add tutorbot 2026-03-20 20:27:17 +08:00
Bingxi Zhao (Frank)
9c18bf0705 codebase cleanup and decoupled, introduce cli operation 2026-03-13 20:42:16 +08:00