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
Partners stop being a deployment-wide admin resource and become
per-user: three nested rights (manage / use / neither) replace the
blanket admin gate on the router, each member can build and own their
own, and every person's conversations with a partner stay private to
their account. Grants keep working and now offer only admin-managed
partners. Channel runtime state moves from one directory per channel to
one per partner — copied, not moved, and only when its owner is
unambiguous — so two partners can finally run the same channel.
Around that: a knowledge base can track GitHub repositories and re-sync
their Markdown (#903); Antigravity CLI joins My Agents now that Gemini
CLI is retired (#828); personal WeChat signs in from a QR code drawn in
the browser instead of the server log (#951); a chat account can be
linked to a DeepTutor account with /link; containers re-apply the extras
they declare instead of losing them at compose down (#762); and
`deeptutor doctor` answers whether a workspace is ready to run (#959).
Reliability, largely from community PRs: embeddings survive a
rate-limited provider through key rotation, a retry budget and a global
throttle (#962); MinerU parsing and code execution work on Windows
(#844, #964); indexing fails bounded instead of hanging (#946); MinerU
page-layout blocks stop being indexed as content (#949); voice uploads
carry a MIME the transcription API accepts (#945); and reasoning effort
can be overridden per conversation (#641).
Release plumbing: notes in assets/releases/ver1-5-17.md, v1.5.13
archived, __version__ 1.5.17, README Releases row and all eleven
translations synced.
Two defects found by the release gate and fixed here:
- Six partner routes — the four channel-onboarding endpoints and both
WeChat QR endpoints — kept the _auth-only mount they had inherited
from the blanket admin gate, so any signed-in account could start a
QR login for someone else's partner and write a bot token into its
channel config. All six now declare _MANAGEABLE, and a sweep test
asserts no {partner_id} route is left ungated.
- A configured api_key became `str | list[str]` when key rotation
landed, but ten call sites pass it somewhere that takes one key; a
list would have rendered into an Authorization header verbatim.
keypool.primary_api_key reduces at each boundary.
Gates: pre-commit (all 15 hooks), ruff check + format, pytest
5276 passed, web 605 node tests, docs build.
`docker compose -f docker-compose.dev.yml up` came up with a dead frontend:
the development stage's supervisor program runs `node scripts/dev.mjs`, and
that path does not exist in the image. The stage builds `FROM production`,
whose ./web is `.next/standalone/`, then cherry-picked three files on top.
Verified against a real standalone build — its root holds exactly
`server.js`, `package.json`, a traced `node_modules` and the dist dir. Every
source file and every config is absent, so `scripts/` was only the first
thing to fail; `tsconfig.json`, `tailwind.config.js`, `postcss.config.js`,
`features/`, `types/` and `proxy.ts` were missing too, and the compose mount
list covers none of them either.
So take the builder's web tree wholesale instead of naming files that keep
drifting as web/ grows top-level entries. `--chown` during the copy keeps
node_modules from being re-layered, and the inherited production build is
cleared so `next dev` starts from an empty cache rather than a half-valid
one.
#906 also reported this as two `[program:frontend]` blocks in one supervisor
config, with the fix being to delete the dev.mjs one. That reading is wrong:
the blocks are in different build stages (`FROM production AS development`),
the production image has exactly one and is unaffected, and deleting the dev
block would have made the development image serve a production build with no
hot reload. The production stage is untouched here.
Not build-verified — no Docker daemon available on this machine.
Per-account MCP Services and CLI Apps — the two ways a deployment plugs in
tools DeepTutor never shipped — plus the isolation that makes them safe on a
shared install.
- MCP Services: a 45-entry curated store of hosted servers each account
installs for itself, OAuth 2.1 (PKCE + dynamic client registration) for the
servers that require it, static keys held by reference and resolved in memory
at connect time, stdio refused for self-service. Settings no longer
configures MCP; /settings/mcp redirects to the store.
- CLI Apps: 101 tools snapshotted from the two CLI-Anything registries.
Installs are admin-only, the registry's install_cmd is parsed into an argv we
build rather than executed, npm install scripts are forced off, and 66
first-party entries are pinned to one reviewed commit. Apps land in
data/cli-apps, one environment each, mounted read-only into the runner.
- Credentials that authorise a person move to data/system, the one branch the
exec sandbox never mounts: Codex tokens relocate themselves on first use
(refusing to follow a symlink), per-user MCP configs and keys land beside
them.
- Grants gain a cli_apps whitelist with the same deny-by-default posture as
MCP tools; a per-turn registry view keeps one owner's provider tools out of
the process-global registry and refuses an unauthorised tool at execute, not
just in the manifest.
- The composer reports what filled this turn's context window, a gutter rail
jumps back through long conversations, and the workspace collapses to a
drawer on small screens.
- The composer keeps focus after sending and across tab switches (#720);
released images carry provenance and SBOM attestations (#722).
README prose, all ten translated READMEs, and the docs-site pages that named
Settings → MCP are updated to match. Release notes:
assets/releases/ver1-5-7.md
Removes `user=root` from the [supervisord] section in both production and
development supervisord configs, and rewrites the entrypoint comment to
explain why.
Background: under rootless podman + userns_mode: keep-id, container PID 1
runs as the host user (UID 1000) instead of root. The previous design
explicitly forced supervisord to drop privileges to root (`user=root`),
which works under rootful daemons (PID 1 is root, has CAP_SETUID) but
fails under rootless + keep-id — supervisord sees `user=root` in its
config, tries to setuid(0), lacks CAP_SETUID, and exits with
"Error: Can't drop privilege as nonroot user" (per supervisord
options.py: refuses to drop privileges when not running as root).
Fix: omit `user=` from the [supervisord] section so supervisord inherits
PID 1's UID (root in rootful; UID 1000 in rootless + keep-id). The
backend and frontend programs still drop to the unprivileged deeptutor
user via per-program `user=deeptutor` — setuid(1000) works because
either PID 1 is root (rootful) or PID 1 is already UID 1000 (rootless
keep-id, where the setuid is a no-op). /dev/fd/1,2 ownership matches
PID 1's UID in both runtimes, so supervisord's stdout/stderr writes
succeed without an explicit setuid dance.
Verified locally: clean heredoc indentation; supervisord config parses;
both [supervisord] sections confirmed without `user=root`.
Closes the rootless-podman + read-only-rootfs follow-up to PR #577
(reported by the user after #577 + #586 merged).
feat(docker): make BACKEND_HOST and FRONTEND_HOST env-configurable
Two opt-in env vars (default 0.0.0.0, non-breaking) let host-network
deployments pin uvicorn and Next.js to a specific bind address — e.g.
127.0.0.1 to keep both off the host LAN when running network_mode: host.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#582 made supervisord run as root with per-program user=deeptutor, so the
gosu privilege-drop binary is no longer invoked. Remove the gosu and
libcap2-bin apt packages and the setcap step (a setuid-capable binary that
was left unused == needless attack surface), and refresh the Dockerfile
comments.
Realign the authoritative docs that still described the old gosu model:
- CONTAINERIZATION.md: supervisord runs as root and drops each program to
deeptutor via user=; fix the verification snippet.
- compose.yaml: correct the (now wrong + dangerous) note that cap_drop ALL
is safe — root supervisord NEEDS CAP_SETUID/CAP_SETGID to setuid its
children, so cap_drop ALL would stop the backend/frontend from starting.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The production image's start-backend.sh and start-frontend.sh previously
hard-coded --host 0.0.0.0 (uvicorn) and HOSTNAME (Next.js standalone
default). That's fine for bridge-mode deployments where the port
publish binds to the host, but in network_mode: host the container's
processes bind directly on the host's interfaces — exposing :8001 and
:3782 to the LAN.
This change makes both bind addresses env-configurable:
start-backend.sh: --host ${BACKEND_HOST:-0.0.0.0}
start-frontend.sh: export HOSTNAME=${FRONTEND_HOST:-0.0.0.0}
Defaults preserve the current behavior. Setting
BACKEND_HOST=127.0.0.1 and FRONTEND_HOST=127.0.0.1 in compose.yaml
under a host-mode service gives loopback-only bindings.
Note: setting BACKEND_HOST=127.0.0.1 in bridge mode breaks the
port publish (uvicorn binds inside the container's loopback). Use
this env var only with network_mode: host.
The backend was logging every request (the chatty frontend polling of
/settings, /tools, /knowledge/list, /settings/llm-options, ...) as
`::1:0 - "GET ... 200 OK"`. uvicorn's per-request access log was only disabled
in run_server.py (access_log=False); the `deeptutor start` launcher and the
Docker entrypoints invoked uvicorn directly with it still on, so the 200s
leaked.
- launcher.py + Dockerfile (production start-backend.sh and the dev supervisord
program): add `--no-access-log` so all launch paths match run_server.py.
- Funnel access logging through the existing selective_access_log middleware
(non-200 only), but log via a `deeptutor.access` logger with its own INFO
stdout handler (propagate=False). Previously it used `uvicorn.access`, which
has no handler once uvicorn's access log is off, and the root console handler
runs at WARNING — so non-200s were being silently dropped. Now 200s are quiet
and 4xx/5xx still surface.
- Rewrite the middleware test to capture on the deeptutor.access logger directly
(it no longer propagates to root).
Verified: live server with --no-access-log logs nothing for 200s and prints
`127.0.0.1 - "GET /api/v1/... HTTP/1.1" 404` for a 404. ruff + pytest (2447) green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The PR's relative-path + proxy.ts rewrite design depends on two env vars
(DEEPTUTOR_API_BASE_URL, DEEPTUTOR_AUTH_ENABLED) read server-side by the
Next.js middleware. As submitted they were only set by the Docker entrypoint,
and the auth one read a non-existent auth.json key — so auth enforcement was
silently disabled and the PyPI `deeptutor start` path was unwired.
- Export both vars from render_environment() (the single JSON-backed source of
truth), so the Docker entrypoint AND the `deeptutor start` launcher get them
consistently. DEEPTUTOR_API_BASE_URL falls back to localhost:<backend_port>.
- launcher.py: set both in common_env using the resolved backend_url, so they
track port-conflict reassignment.
- Dockerfile: drop the duplicated, buggy per-var heredocs (one read the wrong
key `auth_enabled` instead of `enabled`, leaving the proxy auth gate always
off); the export_runtime_settings_to_env eval now provides both. Add them to
the env-unset list for hygiene.
- Update the two placeholder tests to assert the new proxy-based design instead
of the removed build-time sed mechanism; add DEEPTUTOR_* coverage in
test_runtime_settings.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
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