Commit Graph

37 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
171b1cc2d2 release: v1.4.4 — ClawHub skill hub, real KB document previews
A focused cut on top of v1.4.3:

- Skill hub: install community skills from ClawHub (and any compatible
  registry via settings/skill_hubs.json) — provider abstraction in
  services/skill/hub.py, new `deeptutor skill search/install/list/remove`
  CLI, admin-only install endpoint for multi-user (install ≠ assign).
  Every import runs a security gate: hub verdict check, zip-slip/zip-bomb
  guards, text/script suffix whitelist, `always:` frontmatter stripped,
  provenance recorded in .hub-lock.json.
- KB previews: new /knowledge/{kb}/file-preview-text/{filename} endpoint
  serving extracted plain text; KB Files tab renders real in-browser
  DOCX/XLSX previews; DOCX previewer scales pages to fit narrow panels.
- Markdown previews allow safe raster data:image URLs on <img src>
  (react-markdown strips all data: URLs by default); script-capable
  schemes stay blocked.
- All ten localized READMEs re-synced with the English README.
- Docs (deeptutor.info): `deeptutor skill` reference, hub-install notes on
  Space and multi-user pages, KB file routes in the server API table
  (en + zh).
- CLI docs contract test updated for partner/skill subcommands.

Release notes: assets/releases/ver1-4-4.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-13 03:58:28 +08:00
Bingxi Zhao (Frank)
6d4dd15d78 update 2026-06-11 20:15:48 +08:00
Bingxi Zhao (Frank)
46093e5e2b update msg 2026-06-11 20:03:34 +08:00
Bingxi Zhao (Frank)
da1061910b feat(partners): production IM infra — retry/dedup/coalescing, per-channel delivery flags, stream-delta protocol, slack/telegram connection fixes
- manager: exponential-backoff retry (send_max_retries), origin-scoped
  duplicate suppression, _stream_delta coalescing, per-channel
  send_progress/send_tool_hints gating (global AND channel override)
- base: send_delta/supports_streaming protocol, _wants_stream injection
- runner: live stream segments per loop round (turn_id:call_id), narration
  rounds freeze on completion, final reply marked _streamed when delivered
- telegram: split API/polling HTTPX pools (pool exhaustion fix), trim
  legacy nanobot command menu, raise on send failure for manager retry
- slack: Socket Mode handshake timeout + WSS diagnostics, send raises
- schema: DeliveryOverrides/StreamingSupport mixins on channel configs
- partners/network.py: strict SSRF validator for channel media downloads
- icons: correct WeCom mark (TDesign outline, official brand palette)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 17:43:08 +08:00
Bingxi Zhao (Frank)
b2ce70db69 Merge pull request #500: Guided Learning (mastery-based tutoring subsystem)
New self-contained deeptutor/learning/ subsystem (models, storage, service,
scheduler, grading) + 12-stage guided_learning capability, REST router, and
web learning pages, with 164 tests.

Conflict resolutions:
- services/llm/factory.py: kept dev's stream runner (allow_image_fallback
  multimodal path); dropped the PR's incidental 300s asyncio.wait_for wrapper
  and its now-orphaned TimeoutError handler / unused logger — the blanket
  timeout is unrelated to guided learning, dev already has consumer-side
  timeouts, and 300s would truncate long legitimate streams (book/research).
- web/components/sidebar/WorkspaceSidebar.tsx: kept dev's structure, added a
  useCallback handleNewChat that cancels any in-flight streaming turn before
  newSession() (mirrors handleDeleteSession) and wired it to onNewChat.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 13:44:05 +08:00
lezhimiffyliu
1218236004 Fix GPT-5 token limit parameter in init wizard probe (#508) 2026-05-27 20:21:33 +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)
ca7916bc57 fix: docs, docker deployment & official web 2026-05-22 20:19:32 +08:00
unknown
77b24725c5 merge: upstream/dev into feature/guided-learning
Resolved 8 conflicts:
- agentic_pipeline.py: keep `import asyncio` (ours)
- deep_question.py: accept upstream's removal of answer_now fast-path
  (refactored into agentic engine in upstream 23ca302); drop dead
  helpers _parse_answer_now_json, _collect_cost_summary, and the
  legacy _run_mimic_mode overload
- pocketbase_store.py, WorkspaceSidebar.tsx, en/zh app.json: keep ours
- playground/page.tsx: keep ours (apiFetch + RESEARCH_SOURCE_OPTIONS),
  also remove pre-existing duplicate top-of-file block left over from
  the earlier a8801f9 merge; add `type ResearchSource` import
- reporting_agent.py: accept upstream's deletion
2026-05-21 23:26:53 +08:00
Bingxi Zhao (Frank)
2c1b8e56b2 release(1.4.0-beta): docs, version bump, CLI init wizard, packaging
- __version__.py bumped to 1.4.0-beta; pyproject.toml adds the
  ``deeptutor`` package-data globs so prompt YAMLs / capability
  prompts / Markdown templates ship in the PyPI wheel.
- New assets/releases/ver1-4-0-beta.md covers Auto Mode, Memory v2,
  agentic-engine rewrite, chat + LlamaIndex RAG refactor, new chat
  tools, Visualize+Animator merge, settings split, capabilities
  unification, multi-user / Zulip fixes, env/launcher rewrite.
- README.md adds the v1.4.0-beta entry at the top of the release
  notes; v1.3.0 rolls into the collapsed past-releases block.
- deeptutor_cli gains init_wizard.py (interactive provider menu,
  env-var auto-detect, live model-list fetch with curated fallback,
  optional connectivity probe) and a shared _tool_result helper;
  chat / common / config_cmd / init_cmd / provider_cmd updated to
  match.
- Removed legacy scripts/ helpers (_cli_kit, audit_prompts,
  check_install, generate_roster, migrate_kb, migrate_user_data,
  sync_prompts_from_en, test_embedding, test_llm_api) -- replaced by
  CLI subcommands or no longer relevant.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:08:50 +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
whf
a8801f929a merge: guided-learning-v2 into feature/guided-learning (target dev)
Resolved 10 conflicts:
- api/main.py: kept dev CORS config
- unified_ws.py: kept dev auth flow (ws_require_auth)
- builtin_capabilities.py: added guided_learning + auto capabilities
- pocketbase_store.py: merged both additions
- ChatMessages, WorkspaceSidebar, chat/playground pages: merged both additions
- en/zh app.json: added comma, validated JSON
2026-05-21 13:18:41 +08:00
unknown
6934db4a91 perf: unified LLM/RAG timeout, per-stage degradation, and code cleanup
- Add stage_failure_counts/stage_failure_notes to LearningProgress for persistent failure tracking
- Wrap RAG retrieval with 10s independent timeout in _call_llm_impl
- Add _call_llm_with_timeout (default 60s) and _call_llm_with_degradation (bounded retry + skip)
- Apply degradation to all 12 stage handlers with stage-specific fallback paths
- Extract _run_interactive_quiz_loop shared helper for practice/practice_quiz
- Extract StructuredStageContent component from page.tsx
- Add TypeError to JSON parse except clauses across 7 files
- Simplify _record_attempt_and_update_mastery to single save exit
- Move import logging to module top in service.py
2026-05-21 00:07:31 +08:00
Bingxi Zhao (Frank)
1596807242 refactor chat capability & RAG pipeline(llamaindex) 2026-05-13 21:36:07 +08:00
Bingxi Zhao (Frank)
3d5c3a1eb5 improve chat 2026-05-12 02:20:30 +08:00
Bingxi Zhao (Frank)
85779c846b refactor env settings and installation 2026-05-11 12:59:56 +08:00
Bingxi Zhao (Frank)
72bcdd77d8 prepare v1.3.9 release 2026-05-09 02:53:14 +08:00
Xinyu Du
2b9bf9a4f1 feat: add deeptutor start command to launch backend and frontend together
Add a `start` CLI command that delegates to scripts/start_web.py so users
can launch the full web app with a single command instead of manually
running `python scripts/start_web.py`.
2026-05-06 01:51:45 +08:00
Bingxi Zhao (Frank)
824bf778df fix: lint & logging system 2026-05-01 01:39:08 +08:00
Bingxi Zhao (Frank)
7fce54d98a chore: prepare v1.3.0 release
Made-with: Cursor
2026-04-27 21:09:25 +08:00
Bingxi Zhao (Frank)
162a3f9dc4 fix: missing pip 2026-04-26 21:52:53 +08:00
Albert Zheng
ecb1a9349a feat(cli): add add-md and replace-md commands to notebook group
deeptutor notebook add-md <notebook_id> <file> [--title T] [--type TYPE]
  Read a markdown file and add it as a record to a notebook.

deeptutor notebook replace-md <notebook_id> <record_id> <file>
  Replace an existing record's output with content from a markdown file.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-24 20:23:53 +08:00
Bingxi Zhao (Frank)
77f29cbcc7 fix lint 2026-04-23 19:29:16 +08:00
Srinivas R Kulkarni
6735adf32c fix : Tutorbot websocket resilience and CLI config parsing edge case (#354)
Handle blank --config-json safely, auto-start bots on websocket connect, guard botId route param usage in UI,
and add regression tests for CLI/router/web param normalization.`
2026-04-22 17:05:51 +08:00
Roman Barlos
0f6c81b732 feat(chat): regenerate last response (CLI, WebSocket, Web UI) (#349)
Rebased onto dev (post-#348) and resolved two UI conflicts (`web/app/(workspace)/chat/[[...sessionId]]/page.tsx` drops the now-dead `replaySnapshot` helper; `web/components/chat/home/ChatMessages.tsx` switches the last-assistant action button from the old `RotateCcw`/Retry to `RefreshCcw`/Regenerate). Smoke tests green (199 passed) and all required checks pass.

Merging: adds a `regenerate` capability wired through CLI (`/regenerate` · `/retry`), WebSocket (`type: "regenerate"`), and Web UI (per-message Regenerate button). Backend rolls back the trailing assistant via `SQLiteSessionStore.delete_message`, reuses `start_turn` through `_persist_user_message=False` / `_regenerate=True`, skips `memory_service.refresh_from_turn` on regeneration, and surfaces non-fatal `regenerate_busy` / `nothing_to_regenerate` errors. Also includes empty-response diagnostics in `_stage_responding`. 18 new tests.
2026-04-21 00:14:58 +08:00
Bingxi Zhao (Frank)
593ddba3fb feat(co-writer): add multi-doc co-writer workspace with backend storage
- Add co-writer storage module and API router for document persistence
- Restructure co-writer page to per-doc routing ([docId]) with sidebar recent list
- Wire CoWriterRecent into sidebar shell and AppShellContext
- Tidy notebook prompts, facade, path service, and builtin tools wiring
- Refresh tests (add missing __init__.py, drop obsolete app_facade test)
- Add favicon/apple-touch-icon assets and minor i18n cleanup

Made-with: Cursor
2026-04-20 19:46:41 +08:00
Bingxi Zhao (Frank)
2745e8bde9 feat(book): introduce book capability and restructure guide/co_writer modules
- Add new `deeptutor/book/` module with multi-agent pipeline
  (ideation, spine, page planner, source explorer, synthesizer)
  and rich block system (text, code, figure, quiz, flash cards,
  callout, deep dive, timeline, animation, concept graph, etc.)
- Add `/api/routers/book.py` and `deeptutor_cli/book.py` entry points
- Add web UI under `web/app/(workspace)/book/` with sidebar,
  chat panel, page reader, spine editor, progress timeline, and
  block renderers
- Move `deeptutor/agents/co_writer` -> `deeptutor/co_writer` and
  `deeptutor/agents/guide` -> `deeptutor/guide` (then remove guide
  entirely now superseded by book)
- Remove legacy guide UI, hooks, types, and API router
- Update visualize agents/prompts, notebook service, prompt manager,
  session turn runtime, and shared services to support new flows
- Refresh chat composer, sidebar, notebook selector, and locales

Made-with: Cursor
2026-04-20 00:33:33 +08:00
Bingxi Zhao (Frank)
100576da69 release: v1.1.2 — schema-driven channels, secret masking, RAG simplification, KB-consistency hardening
* TutorBot Channels tab is now schema-driven across every built-in & plugin channel
  (GET /api/v1/tutorbot/channels/schema), with per-field secret reveal toggles.
* Channel secrets are masked end-to-end; raw values only surface via the explicit
  ?include_secrets=true edit-form route. PATCH validates ChannelsConfig at the API
  boundary and returns 422 on bad payloads. reload_channels is serialised by an
  asyncio.Lock and records last_reload_error for the UI.
* Collapsed services/rag/ to a single LlamaIndex pipeline: removed ~2.6k lines of
  unused components/* + pipeline.py + types.py + utils/ + parsers/. rag_provider
  is now a stub; legacy values silently coerce to llamaindex.
* Centralised file routing into services/rag/file_routing.py (FileTypeRouter /
  DocumentType / FileClassification); dropped per-provider extension helpers.
* Defensive RAG/KB consistency: deep_solve / deep_research strip rag/kb when no
  KB is attached; SolveToolRuntime + ResearchPipeline + DecomposeAgent
  short-circuit instead of falling back to non-existent default KBs (DE-all,
  ai_textbook).
* Externalised AgenticChatPipeline prompts into agentic_chat.yaml (zh + en).
* Added Thai README (#337).
* New test modules: file_routing, knowledge_base_config, channel_schema,
  channel_secrets, rag_consistency, research_pipeline_rag.

Full notes: assets/releases/ver1-1-2.md

Made-with: Cursor
2026-04-18 11:33:53 +08:00
Bingxi Zhao
4892a889a2 Merge pull request #262 from LocNguyenSGU/fix/issue-261-copilot-login-docs
docs: clarify github copilot provider login semantics
2026-04-08 20:13:50 +08:00
Bingxi Zhao (Frank)
5960fbc0f7 refactor: remove litellm dependency, align provider architecture
- Replace litellm with native openai + anthropic SDKs across both
  services and tutorbot layers
- Add 5 new providers: mistral, stepfun, xiaomi_mimo, qianfan, ovms
- Add `backend` field to ProviderSpec for SDK routing
- New TutorBot OpenAICompatProvider (openai SDK) and AnthropicProvider
  (anthropic SDK), replacing LiteLLMProvider
- Rewrite services/llm/executors.py to use openai SDK directly
- Remove litellm from factory.py routing, token_tracker, provider_cmd
- Auto-fallback to streaming for tool-call format errors (fixes #265)
- Settings UI: provider dropdown with auto base-url fill
- Clean up litellm from requirements/cli.txt and pyproject.toml

Made-with: Cursor
2026-04-08 19:59:44 +08:00
Bingxi Zhao (Frank)
b750f5b19f refactor: use ProactorEventLoop policy instead of subprocess.run fallback
Instead of replacing asyncio.create_subprocess_exec with subprocess.run
(which loses real-time streaming and cancellation), fix the root cause:
set WindowsProactorEventLoopPolicy before uvicorn starts so that
create_subprocess_exec works correctly on Windows.

This preserves the original async streaming renderer while fixing
Windows compatibility at the event loop level.

Made-with: Cursor
2026-04-08 12:07:33 +08:00
LocNguyenSGU
077762bde8 docs: clarify github copilot provider login semantics 2026-04-07 23:24:56 +07:00
Bingxi Zhao (Frank)
c15e22a4b3 chore: stable fix, add tutorbot 2026-03-20 20:27:17 +08:00
Bingxi Zhao (Frank)
e11db5001b fix: improv cli 2026-03-15 00:04:34 +08:00
Bingxi Zhao (Frank)
9e8cea8294 fix: update embeddings config & provide perplexity search 2026-03-14 00:37:52 +08:00
Bingxi Zhao (Frank)
f3779138ae fix: remove lightrag and unify llm & search config 2026-03-13 23:48:49 +08:00
Bingxi Zhao (Frank)
9c18bf0705 codebase cleanup and decoupled, introduce cli operation 2026-03-13 20:42:16 +08:00