Commit Graph

9 Commits

Author SHA1 Message Date
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)
fc39543bc0 feat: integrate frontend backend and canonical routes 2026-09-01 22:24:29 +08:00
Bingxi Zhao
51d7c9a8b5 fix: stream large knowledge uploads through web (#868)
Route knowledge-base create and upload requests around Next Proxy body cloning and stream multipart data directly to FastAPI. Preserve authentication/content headers, strip hop-by-hop transport headers, and retain all backend validation limits.

Adds matcher and streaming contract regression coverage.
2026-08-17 00:04:21 +08:00
Bingxi Zhao (Frank)
9af5f890f4 fix(runtime): spell the server-side backend address as the IPv4 loopback everywhere
#784 fixed the launcher, but the same address is rendered on two other paths
that kept "localhost": the Docker entrypoint (render_environment) and the
last-resort default in web/proxy.ts. On a dual-stack host that name resolves
to ::1 first while uvicorn binds 0.0.0.0 (IPv4 only), so every rewritten
/api/* request fails to connect — the launcher and container paths are meant
to stay in sync, and after #784 they no longer did.

Also disambiguates the two same-named _optional_positive_int helpers added by
#774: catalog's drops junk from a live API response, contracts' rejects it as
cache corruption. Same name, opposite behaviour — the strict one is now
_require_optional_positive_int and says why it differs.
2026-08-06 19:30:49 +08:00
TyrionH-is-coding
1117e6fe93 fix(codex-auth): guide remote Codex OAuth loopback callbacks (#716)
For a remote or containerized deployment the browser's localhost is the
user's workstation while the OAuth listener runs on the server, so a
reverse proxy cannot deliver http://localhost:1455/auth/callback to that
private listener and Codex sign-in could never complete.

Keep the listener loopback-only and forward just the exact browser
callback path through the Web origin to a state-validating broker. The
settings card and CLI now show the real callback address, the SSH tunnel
command, an explicit authorize action and a countdown, and survive a page
reload; the deployment docs cover the Docker host-port and reverse-proxy
caveats.

The listener stays bound to loopback and ports 1455/1457 are never
published; the Web bridge rewrites only /auth/callback; the broker
requires an active operation and a constant-time state match; callback
responses are no-store HTML that never echo the code or state; PKCE and
the token exchange are unchanged. Binding the listener with
start_serving=False also closes a window where a connection could be
accepted before the callback object existed.
2026-07-28 19:20:27 +08:00
Bingxi Zhao (Frank)
9983c0a3d1 fix: partners & multi-user 2026-06-27 18:27:16 +08:00
enihcam
46681b572c feat(docker): harden image for rootless/RO rootfs + drop runtime sed
The frontend no longer bakes the backend URL into the bundle at build
time and mutates it with sed on every container start. Instead:

  * web/lib/api.ts: apiUrl and wsUrl become one-line pass-throughs, so
    the browser fetches relative paths through the frontend
    (:3782/api/...). All existing call sites keep working unchanged.
  * web/proxy.ts: catches /api/* and /ws/* and rewrites them to
    DEEPTUTOR_API_BASE_URL at request time, reading
    DEEPTUTOR_AUTH_ENABLED for the auth-redirect check.
  * web/lib/auth.ts: switches from NEXT_PUBLIC_AUTH_ENABLED (build-time)
    to DEEPTUTOR_AUTH_ENABLED (set by the entrypoint on every start).
  * Dockerfile: drops the .env.local placeholder block, the sed -i in
    start-frontend.sh, and the runtime API-base fallback chain. Adds
    gosu, bakes a non-root 'deeptutor' user (UID 1000), and has the
    entrypoint chown /app/data and export DEEPTUTOR_API_BASE_URL and
    DEEPTUTOR_AUTH_ENABLED from data/user/settings/*.json on every
    start. supervisord is now invoked under 'gosu deeptutor'.
  * web/tests/api-resolve-base.test.ts: deleted (its 8 tests reference
    resolveBase / isApiBasePlaceholder, both gone; apiUrl/wsUrl are
    now pass-throughs so the rest is meaningless). The auth-redirect
    test is updated to prime DEEPTUTOR_AUTH_ENABLED instead.
2026-06-17 21:40:58 +08:00
Bingxi Zhao (Frank)
452de66729 release: v1.4.3 — TutorBot→Partners, single-loop Chat, real multi-user isolation
The biggest cut since v1.4.0:

- Partners: TutorBot renamed and rebuilt on the product chat agent loop —
  production IM pipeline (retry/dedup/coalescing, per-channel delivery),
  live streaming on Telegram/Discord/Feishu, new WeCom AI Bot channel
  (15 connectors), web-chat attachments, soul template library + editor.
  Automatic non-destructive migration from data/tutorbot/; HTTP API moved
  to /api/v1/partners.
- Chat: single exploring agent loop with native tool calling; Activity
  header with collapsible thinking/tool trace.
- Multi-user: per-user grants v2 (tools/MCP/exec), data/users + data/system
  layout with automatic migration, runner mounts only the user workspace.
- Visualize: inline themed SVG, structured prompts, local validate+repair
  replacing the LLM review round.
- Co-writer Mermaid diagrams + selection RAG/web; file viewer docx/xlsx
  previews; MinerU cloud parsing backend; office skills on by default;
  CLI chat renderer rewrite.
- Docs rebuilt at deeptutor.info: per-channel setup guides (en+zh),
  refreshed screenshots.
- Pre-commit clean sweep: defusedxml for SVG validation, usedforsecurity
  flags on content hashes, mypy fixes, types-croniter stub.

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

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 17:17:43 +08:00
whf
97d6976f34 Block 23: loading feedback, module picker, git cleanup
Issue 1: Add waitingForLLM state — show spinner with
'Generating diagnostic questions...' text while waiting for LLM
response after WS connect, instead of silent 'Ready to start learning'.

Issue 2: Module picker — when multiple modules exist and none
selected, show module selection cards before auto-connecting WS.
Single-module books still auto-start. ModuleTree clickable after.

Issue 3: Git rm middleware.ts, git add proxy.ts (Next.js 16 compat).

92/92 tests passing.
2026-05-18 21:56:40 +08:00