_build_skills_manifest joined the two parts of _build_skill_context back
into one string; since skills became a runtime snapshot nothing calls it
except a test, which now checks _build_skill_context directly.
Refs #2973
_migrate_legacy_tutorbot used the raw legacy directory name as the new
partner_id. Every other creation path slugifies the id with
slugify_partner_id, because ids ride in /partners/<id> URLs and must be
ASCII/URL-safe. A legacy bot whose directory name is non-ASCII (e.g. a CJK
name) was therefore migrated under an un-slugged id, leaving it unreachable —
the "Partner not found" symptom in #2166.
Slugify the id, keeping the display name and soul_origin provenance as the
original. Migration stays idempotent across the old layout: an entry already
migrated under either its slug or its raw name is skipped.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- add the 760 English keys missing from the French catalog and translate 229 values still copied from English\n- make a partner's empty reply language (Auto) follow the account model output language instead of hardcoding English\n- label Auto with the configured language and offer every supported response language in the picker\n- localize the Feishu thinking notice for every supported response language\n- add French catalog, picker and partner runtime regression tests
Keep learner-facing explanations visible across finish checks, persistence, and replay. Remove mastery prose heuristics and prioritize learner objections.
Coordinate service shutdown and descendant cleanup, and preserve video lesson identity and playable results across chat completion and reload.
Ship the reading, listening, question-bank, parsing, and provider updates
summarized in assets/releases/ver1-6-13.md.
Make speech timeouts configurable, report actionable synthesis failures,
and keep chat attachments discoverable in their selected workspace while
preserving earlier uploads and URLs. Keep reply playback cancellation and
single-audio ownership intact.
Sync README prose and all eleven translations, update the stable install
note, and archive release notes older than one week. Repair stale reading
test fixtures and spawned test imports, and clear the Partner type error.
Validation: 9252 Python tests and 8 subtests passed (28 skipped); 518 web
unit tests, 1253 Node tests, and 62 browser audits passed. Pre-commit, ruff,
typecheck, contracts, architecture, i18n, production build, route budgets,
and the docs build passed.
The channel trailed the model by up to 20s and finished long after the WebUI.
Every sync SDK call opened a fresh connection (DNS + TCP + TLS ≈2s per call)
and the serial outbound lane paid it per message.
- route lark-oapi's sync calls through one keep-alive session per worker
thread: measured 2.03s → 0.68s per call (0.55s warm)
- create the streaming card carrying its first text instead of pushing that
text in a second API call
- ask CardKit for a printable pace (streaming_config) instead of the platform
default of one character per 70ms
- stop retrying card creation on every delta; after three failures the reply
falls back to a regular card instead of dribbling out
- throttle stream edits to 1s so the lane stays ahead of the model
- make group threading configurable, and always reply flat in single chats
- post a brief "thinking…" notice while the model reasons and retract it once
the answer starts: reasoning events never reach a channel, so such a turn
used to look dead
- close the SDK WebSocket client on stop, so a reload cannot leave a second
listener subscribed to the same app
A partner has one outbound lane and every channel send is a blocking HTTP
round trip, so a fast model filled the queue faster than Feishu could post:
readers kept receiving an answer long after the turn had finished.
- share the dispatcher's delta/progress coalescing with the live router and
keep message order through a pending queue
- merge queued narration and tool hints, which otherwise cost one API call
each
- retry ordinary messages with the configured budget, but never hold the lane
behind backoff sleeps for stream frames, which self-heal
- keep the lane alive when a single message fails, and follow a channel
reload
- stamp publish time on the bus and warn when delivery waits too long, so a
trailing reply is visible in the logs
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.
The docstring still said qrcode ships with the partners extra — the fact
this PR itself changes. Reword it to match the degradation test's
docstring: a trimmed deployment may still lack it, and missing it must
degrade, not fail.
Bind mastery drafts before their opening turn and preserve stored session modes.
Track chat duration from submission through terminal completion. Run async reading
extensions on their event loop and allow retries after cancellable timeouts.
Allow first uploads into empty LlamaIndex knowledge bases, preserve Telegram
thread routing, parse embedding Retry-After dates, and enforce robots rules and
host pacing during documentation crawls, including redirects.
Fixes#1461Fixes#1458Fixes#1451Fixes#1448Fixes#1392Fixes#1429
Refs #1435, #1412
Reuses contributions from PRs #1462, #1452 and #1403.
Co-authored-by: sjagadee <srini.jagadeesh@gmail.com>
Co-authored-by: AoHanBei <dongaohan21@gmail.com>
Co-authored-by: Gao-Chenkai <DevChenkai@outlook.com>
Every round already streamed its text to the reader. The loop then took it
back: a round that called tools was marked narration, and the client moved
that prose out of the answer and into a collapsed block pinned to the top of
the message. The reader watched a sentence appear and vanish, and what was
left was an answer with no account of how it was reached.
That behaviour came from one field doing two jobs. ``call_role`` said both
where the turn was and whether the text counted, so "more work follows" and
"hide this" could not be told apart — and three separate exceptions had grown
to say "actually, show this one" for DSML, truncation and mastery.
Split the two facts. ``call_role`` keeps the phase. A new ``answer_visible``
carries visibility, true for every ordinary round, false only where a
capability's finish guard retracts a round it rejected. The three exceptions
disappear with the default they were fighting.
The client then lays the message out in the order it was written: the sentence
that introduced a step, the step's own row beneath it, what the next round
said below that. A settled turn is restored from an event preview that carries
no text, so tool calls now record how much of the answer had been written when
they ran, and the stored body is laid back out around them.
The prompt asks for the commentary this depends on, and says the closing
answer should not replay it.
Ship the v1.6.5 feedback sweep: answers that could not submit now
arrive, a copy button reports what actually happened, partners can use
connected knowledge bases, Codex sign-in finishes inside Docker, and the
home route is 100KB lighter.
Release notes: assets/releases/ver1-6-6.md
One partner serving three study groups plus DMs rendered as a flat list
where every row looked like a private chat: the only label is the
opening message, which in a group is one student's question (#1229). The
data was never lost — sessions are already one file per chat — it just
never reached the list.
The channels state the kind of conversation on the inbound event and
DeepTutor was dropping it: Feishu sends ``chat_type`` ("group" / "p2p"),
Slack and Mattermost send ``channel_type``. Delivery is the only moment
this is known for certain, so the turn records it, and the summary reads
it back. No prefix sniffing, no lookup on the read path, and nothing has
to import a channel to render a list.
``conversation_scope`` is the single place those three vocabularies
become the two words a reader cares about. A channel that says nothing —
or says something new — yields no label at all, and the row renders as
it always did; a list that guesses is worse than one that stays quiet.
Sessions written before this carry no origin and are likewise unlabelled
rather than marked "unknown".
This is the distinction the report called the minimal useful fix.
Resolving a Feishu group's *name* through the chats API, which is what
it asked for first, is left out on purpose: it needs a call and a cache
I cannot exercise against a real tenant here.
The regenerated contract picks up ``/api/knowledge-bases/delete`` as
well — the committed schema was already behind by that route before this
change, and the file is generated, so it comes back whole.
#1261 taught `_copy_knowledge_base` that a pointer KB has no folder to copy,
which is right and is what the reported WeKnora case needed. It also made
three kinds assignable that had previously failed for want of a folder, and
left the other half of the feature unbuilt.
Obsidian, MarginNote and subagent KBs are each driven by an *exclusive*
`KnowledgeCapability`: when one is in a turn's KB selection it replaces the
entire tool surface. A partner passes ALL of its knowledge bases as that
selection on every turn, so a single assigned vault would silently seize
every partner turn, and a `subagent` entry with `agent_kind: partner` would
let a partner consult another partner — or itself. They are refused now, by
the set that already names them (`NON_RETRIEVABLE_KB_TYPES`), with a message
that says why instead of a bare FileNotFoundError.
The rest is the half that made a successful assignment look like a failed
one. `list_assets` scanned directories, so a pointer KB was invisible in the
partner's library — and therefore never in `excluded`, so the picker kept
offering it and the user kept assigning it to no visible effect.
`remove_asset` returned False when the folder was missing, which the router
turns into a 404, so it could not be un-assigned either. Both now treat the
folder and the config row as independent, because for a pointer KB only the
row exists.
The two existing connected-KB tests used `obsidian` as their sample, which
this change refuses; they use `weknora` now — the kind actually reported, and
one a partner may legitimately hold.
Provisioning reached across modules for `KnowledgeBaseManager.config` and
`_save_config()`, which put a partner-workspace concern inside the manager's
private state. `register_connected_entry` states the operation instead: adopt
an entry that already exists, refuse anything that is not a pointer KB, and
report whether it was new so provisioning stays idempotent the way the
copytree branch is.
_copy_knowledge_base assumed every knowledge base has a data/knowledge_bases/<name>/
folder to copytree. Connected/pointer KBs (Obsidian, linked, ...) are registered in
kb_config.json only and never have such a folder by design, so assigning one to a
Partner always raised FileNotFoundError.
Branch on is_connected_kb() and register the same pointer entry in the partner
scope's own kb_config.json instead of copying.
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
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.
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.
* fix: sync partner tool list with global chat tool toggles
When a user disables a toggleable tool (web_search, brainstorm,
paper_search, reason) in Settings → Chat → Tools, partners
must respect that choice in both the Mind tool picker and at
runtime. Previously the picker showed the full USER_TOGGLEABLE_TOOL_NAMES
pool and defaulted every tool to enabled, and the runtime intersected
only with the partner's own config — so a globally-disabled tool could
still be picked and executed inside a partner.
Changes:
- deeptutor/agents/_shared/tool_composition.py
Add admin_enabled_optional_tools() that reads the admin's
interface.json directly (partners run in a synthetic scope, so
get_enabled_optional_tools() would read the wrong settings file).
Fails open to the full toggleable set on missing/unreadable file.
- deeptutor/api/utils/tool_options.py
build_tool_options() now filters the tools list against
admin_enabled_optional_tools(), so globally-disabled tools do not
appear in the Mind step picker and are excluded from the default
'select all' set.
- deeptutor/services/partners/runtime.py
_resolved_enabled_tools() intersects the partner's configured
(or defaulted) whitelist with admin_enabled_optional_tools(), so a
globally-disabled tool can never run inside a partner turn.
- tests/services/partners/test_partner_runtime.py
Three new tests covering: explicit config intersection, default
config intersection, and fail-open on missing admin settings.
- tests/api/test_partners_router.py
New test verifying tool-options endpoint honors global chat toggles.
Closes: Partner tool picker and runtime drift from global chat tool switches
* fix(pre-commit): apply ruff import sorting
* fix: scope optional tool filtering to partner surfaces
---------
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
Work in progress carried over from earlier sessions, committed together.
Chat / DSML:
- Tolerate partial and malformed tool-call tags mid-stream, with a character
ceiling so a stray "<" cannot make the live stream wait forever for its
closing bracket.
- Narration rounds can now mark their prose as visible, so a DSML round that
keeps the text surrounding a call has it persisted as part of the answer.
Runtime observability:
- New deeptutor/runtime/memory_probe.py reports resident memory across the
process tree, exposed at /api/v1/system/memory and surfaced in the settings
status strip. psutil is a soft dependency, imported lazily with a /proc
fallback, so a missing wheel costs the strip and not the app.
Mastery:
- New deeptutor/learning/pending.py projects a persisted PendingQuestion into
the smaller public contract safe to hand the tutor model, and owns the
multiple-choice translations shared by registration and grading.
LightRAG:
- New pipelines/lightrag/worker.py moves local indexing onto a worker thread's
own event loop, so RAG-Anything's synchronous graph merging stops stalling
unrelated API and LLM work.
Also: request-scoped output artifact delivery (api/routers/outputs.py),
partner runtime and path_service adjustments, and CLI chat renderer updates.