Prepare v1.7.3 notes for reading and book editing, expanded provider and
agent connections, learning records, model streams, and desktop upgrades.
Sync README prose and 11 translations, archive older release notes, and
update the package version. Resolve release lint/type blockers with explicit
parser and capability contracts, compatible Book call forwarding, accurate
auth task types, and quoted SQLite schema identifiers. Cover positional Book
calls and quoted legacy columns; align KB seed tests with visible retrieval
failure reporting. Keep HTTP fixtures independent of host proxies and translate
new Portuguese UI copy.
Release notes: assets/releases/ver1-7-3.md
The mastery sessions composer submits with capability=mastery_path;
apply_learning_policy rejects it for any learner policy because the
capability vocabulary only knows chat and immersive_reading, and grant
writes validate against the same set. Extend the vocabulary so a grant
can admit mastery turns (see #2638).
The /learning area (mastery paths, practice) is reachable by learner
accounts, but the grantable surface vocabulary could not express it,
leaving deployments in a half-open state (see issue #2638).
An account granted a model other than the deployment active one got an
option list with no flagged default, so the chat composer fell back to
"Select model" while the turn path already pinned the first granted
model. Flag that same option so both agree (#2438).
Creating an account through the admin UI means the administrator picks the
password, so the owner starts life with a secret someone else knows. Nothing
in the UI said so: the password form existed, but nobody was sent to it.
- identity: accounts carry must_change_password, set on admin creation and
cleared once the owner changes the password themselves
- POST /login returns the flag so the client can act on it right away
- GET /profile exposes it for the profile page
- web: after login, a flagged account goes straight to /profile, which shows
why; the banner disappears once the change succeeds
Backend tests cover both directions: a successful change clears the flag, a
failed one (wrong current password) leaves it alone.
Adds a `claude_code` LLM provider that runs turns through the local Claude
Code CLI via `claude-agent-sdk`, so DeepTutor can use the account signed in
with `claude /login` (including a Claude subscription) without an Anthropic
API key.
- One long-lived Claude Code process per DeepTutor session, mirroring the
CodeBuddy SDK provider's owner-task pattern.
- Claude Code's built-in tools, settings, CLAUDE.md and hooks are disabled;
DeepTutor tools are exposed through an in-process SDK MCP server and tool
calls are returned to DeepTutor's dispatcher.
- Tool turns end via max_turns=1 and are drained instead of interrupted, so
the transcript does not record an interrupted request.
- System messages become Claude's real system prompt.
- Optional extra: `pip install deeptutor[claude-code]`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Align the five remaining two-value gate idioms with the "only 'admin'
elevates" invariant that #1556 now documents: self-service learner-profile
access (_require_local_learner), the admin-managed learner-profile
GET/PUT target checks, the identity-layer set_learner_profile writer, and
device-credential activation (_active_account) admit every non-admin role
instead of only "user".
While the admitted vocabulary is still {"admin", "user"} this is
behavior-preserving; once "teacher"/"student" exist, ordinary accounts
keep learner profiles and device logins instead of being silently
excluded. Admins stay excluded everywhere, including admins carrying a
learner preset.
Tests: a teacher with a learner preset manages their own profile through
the self-service endpoints and via an admin actor; admins (even with a
learner preset) stay rejected at the self-service, admin-managed,
storage, and device-credential layers; a device credential issued for a
teacher logs in and reports the teacher role, while issuance for an admin
still fails closed.
Extend the role vocabulary admitted by the single source of truth
(VALID_ROLES + normalize_role + the Role literal) that #1556 introduced.
Authorization stays least-privilege: only "admin" elevates, defaults are
unchanged, unknown values still degrade to "user", and the diff is fully
revertible one line per value. Capability wiring for the new roles stays
deployment policy; "parent" is deliberately out of scope.
Tests: parametrized passthrough over the four documented roles, set_role
round-trip for the new values, non-elevation assertions, and a "parent"
negative control proving the whitelist decides.
- models.py: add VALID_ROLES + normalize_role as the single source of truth
- identity.py: route _canonical_record/_migrate_legacy_users/load_users/set_role through normalize_role
- context.py: token payload role mapping via normalize_role
- services/auth.py + api/routers/auth.py: set_role guards validate against VALID_ROLES
- tests/multi_user/test_role_normalization.py: 16 tests, first set_role coverage in repo
Zero behavior change: legal roles pass through; unknown values keep the
same least-privilege degrade path; only guard error strings derived from
sorted(VALID_ROLES) differ.
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.
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