Commit Graph

2806 Commits

Author SHA1 Message Date
Bingxi Zhao
5c3fd09bac Merge pull request #1856 from dajiaohuang/fix/book-empty-source-drift
fix(book): detect drift when a knowledge source becomes empty
2026-10-19 00:24:07 +08:00
Bingxi Zhao
5a3e644b94 Merge pull request #1840 from dajiaohuang/fix/memory-audit-line-identity
fix(memory): anchor audit edits to the original document view
2026-10-19 00:23:48 +08:00
Bingxi Zhao
078435778c Merge pull request #1854 from dajiaohuang/fix/obsidian-backlink-paths
fix(obsidian): resolve backlinks using canonical note paths
2026-10-19 00:23:37 +08:00
Bingxi Zhao
f2f605523b Merge pull request #1897 from qirh/feat/perplexity-integration-header
feat(search): send X-Pplx-Integration header to Perplexity
2026-10-19 00:23:26 +08:00
Bingxi Zhao
6c693e7b8e Merge pull request #1850 from dajiaohuang/fix/evaluation-search-errors
fix(rag): report native retrieval errors in evaluation
2026-10-19 00:23:09 +08:00
Bingxi Zhao
1aed52fd0d Merge pull request #1814 from dajiaohuang/fix/quiz-judge-attachments
fix(api): materialize saved quiz answer attachments
2026-10-19 00:22:53 +08:00
Bingxi Zhao
b82439042a Merge pull request #1812 from dajiaohuang/fix/co-writer-http-errors
fix(api): preserve Co-Writer model-selection HTTP errors
2026-10-19 00:22:28 +08:00
Bingxi Zhao
853eb2f478 Merge pull request #1808 from dajiaohuang/fix/sdk-capability-contracts
fix(sdk): serialize slotted capability availability
2026-10-19 00:22:01 +08:00
Bingxi Zhao
bb71b53a4b Merge pull request #1842 from dajiaohuang/fix/subagent-stream-lines
fix(subagent): read oversized JSONL frames without truncation
2026-10-19 00:21:50 +08:00
Bingxi Zhao
c99378c389 Merge pull request #1828 from dajiaohuang/fix/codebuddy-authentication-errors
fix(llm): reload CodeBuddy credentials after SDK authentication errors
2026-10-19 00:21:35 +08:00
Bingxi Zhao
5a4159d54c Merge pull request #1852 from dajiaohuang/fix/dingtalk-delivery-retry
fix(channels): propagate failed message deliveries to retry
2026-10-19 00:21:19 +08:00
Bingxi Zhao
31e9080ae5 Merge pull request #1846 from dajiaohuang/fix/partner-turn-stop
fix(partners): cancel live web turns when stopping a partner
2026-10-19 00:21:08 +08:00
Bingxi Zhao
2c4a02f7cc Merge pull request #1830 from dajiaohuang/fix/turn-admission-lease
fix(session): release admission leases after preference failures
2026-10-19 00:20:58 +08:00
Bingxi Zhao
3de64fdd02 Merge pull request #1834 from dajiaohuang/fix/pocketbase-message-cursors
fix(session): preserve opaque PocketBase message cursors
2026-10-19 00:20:34 +08:00
Bingxi Zhao
338b2e02f8 Merge pull request #1836 from dajiaohuang/fix/skill-install-rollback
fix(skills): restore installed skills after replacement failure
2026-10-19 00:20:20 +08:00
Bingxi Zhao
f40c3dfca4 Merge pull request #1818 from dajiaohuang/fix/settings-lock-path
fix(settings): normalize Windows lock path aliases
2026-10-19 00:20:01 +08:00
Bingxi Zhao
06443db9bc Merge pull request #1822 from dajiaohuang/fix/cron-connection-lifetime
fix(storage): close short-lived SQLite connections deterministically
2026-10-19 00:19:44 +08:00
Bingxi Zhao
5d108e54c1 Merge pull request #1820 from dajiaohuang/fix/learning-read-snapshots
fix(learning): keep aggregate reads in one SQLite snapshot
2026-10-19 00:19:22 +08:00
Bingxi Zhao
cef90223f6 Merge pull request #1896 from dajiaohuang/fix/partner-soul-load-errors
fix(web): block persona saves after a failed initial read
2026-10-19 00:19:05 +08:00
Bingxi Zhao
917d9c0078 Merge pull request #1848 from dajiaohuang/fix/custom-soul-preservation
fix(partners): preserve customized legacy persona text
2026-10-19 00:18:44 +08:00
Bingxi Zhao
455111efc0 Merge pull request #1824 from dajiaohuang/fix/catalog-read-errors
fix(config): preserve catalogs after filesystem read failures
2026-10-19 00:18:26 +08:00
Bingxi Zhao
ab45d2aa98 Merge pull request #1980 from rennf93/feat/fastapi-guard-security-middleware
feat(api): optional application-layer security with fastapi-guard (off by default)
2026-10-19 00:17:46 +08:00
Bingxi Zhao
75ee09cf3e Merge pull request #1969 from KKandLL-Forever/fix/solve-fold-keeps-plan
fix(solve): keep the remaining plan in view after each step fold
2026-10-19 00:16:19 +08:00
Bingxi Zhao
2c6d6c3a37 Merge pull request #1963 from Fancie-Personal/perf/bound-inline-attachment-images
perf(documents): bound an inlined raster's long edge before admission
2026-10-19 00:16:04 +08:00
Bingxi Zhao
44e0402a85 Merge pull request #1967 from WLH55/fix/voice-preview-non-json-error
fix(voice): surface the HTTP status when a preview error body is not JSON
2026-10-19 00:15:32 +08:00
Bingxi Zhao
a511efd209 Merge pull request #1986 from MohammadHijjawi97/fix/web-fetch-meta-charset
fix: decode fetched pages with their declared <meta> charset
2026-10-19 00:15:22 +08:00
Bingxi Zhao
bba68cc7a1 Merge pull request #1978 from mayuriphad/fix/responses-tool-strict
fix(llm): keep an explicit strict setting when converting tools for the Responses API
2026-10-19 00:15:12 +08:00
Bingxi Zhao
62d8033d68 Merge pull request #1974 from MohammadHijjawi97/fix/windows-tzdata-usage-statistics
fix: install tzdata so named timezones resolve on Windows
2026-10-19 00:14:58 +08:00
Bingxi Zhao
0fc78ab233 Merge pull request #1985 from 0xTidalBore/fix/doctor-online-resolved-config
fix(doctor): convert resolved LLM config before the online probe
2026-10-19 00:14:42 +08:00
Fancie-Personal
e7c909ec94 perf(documents): bound an inlined raster's long edge before admission
Chat attachments base64-inline every harvested image into one provider
request, and the byte budgets did not bound what a *page-sized* raster costs
there: a scanned A4 page arrives at ~2900x4032 (~600 KB), so a seven-page scan
rode along as ~4.2 MB of body / ~5.6 MB encoded even though the model is served
a raster scaled toward ~1.5k on the long edge anyway.

Fit a candidate to MAX_INLINE_IMAGE_EDGE (1600) before the byte budgets weigh
it, so the budgets measure what will actually ship. An image already within the
bound keeps its bytes and its format; re-encoding is reserved for rasters past
it, at the same jpg_quality (82) the reading viewport's whole-page render
already uses. Every failure path returns the original bytes, and a pixel count
past MAX_INLINE_FIT_PIXELS is refused before Pillow allocates for it.

The reading-area ingest keeps source resolution (max_inline_edge=0) because
those images are written to disk for the reader pane. The PPTX and DOCX
ingests were still on the chat-attachment budget by default, so they now pass
the reading budget like the PDF ingest already did.
2026-10-18 23:36:28 +08:00
0xtidalbore
6af53e2582 fix(doctor): convert resolved LLM config before the online probe
e3ae36f5 switched the probe to complete_with_config(config), which
expects an LLMConfig, but run_diagnostics' default resolver returns the
provider-runtime ResolvedLLMConfig. Every real `deeptutor doctor
--online` therefore failed with:

  'ResolvedLLMConfig' object has no attribute 'get_api_key'

The existing tests injected LLMConfig/SimpleNamespace resolvers, so
the default path was never exercised. Convert through
llm_config_from_resolved (the same helper chat selection uses) and add
a regression test that drives the default resolver.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:06:39 -04:00
Mohammad Hijjawi
630742b6cc fix: decode fetched pages with their declared <meta> charset
web_fetch decoded every response with httpx's response.encoding, which
only reads the Content-Type header and otherwise defaults to UTF-8. Pages
that declare their charset in the markup (common for GBK, Shift_JIS and
EUC-KR sites) came back as replacement characters in the web_fetch tool,
Immersive Reading URL imports and website knowledge-base crawls.

Pick the charset the way a browser does: byte-order mark, then the
Content-Type charset, then a <meta> declaration in the first 1024 bytes,
then UTF-8. Labels such as gb2312 and iso-8859-1 decode as their
superset encodings (gb18030, cp1252), matching the WHATWG Encoding
standard.
2026-10-17 23:30:55 +01:00
mayuriphad
b41968ef97 fix(llm): keep an explicit strict setting when converting tools for the Responses API
Signed-off-by: mayuriphad <mayuriphad656@gmail.com>
2026-10-16 23:38:52 +05:30
Renn F
53fa3627d9 fix(api): disable the ssrf category and qualify guard behaviour notes
Browsers send the page URL as Referer, and guard-core 4.4.0 flags
localhost and LAN addresses in it as ssrf, which returned 400 for every
UI request. Pass every detection category except ssrf, with tests for
local-address Referers (200) and an attack pattern in a Referer (400).

Say that system.json gains the disabled security_guard block on the next
load instead of claiming nothing changes, document the IPv4-mapped peer
caveat of guard-core 4.4.0 with the mapped-form workaround, fix the
session handoff line citation, and drop the launch-flag test that
duplicates tests/runtime/test_uvicorn_launch_flags.py.

Add tests for the mapped-form workaround and for the access log
recording a guard rejection through the real application stack.
2026-10-16 17:21:34 +02:00
Renn F
86b3633ca2 feat(api): exempt loopback from the guard rate limit by default
The bundled frontend proxy drops X-Forwarded-For and does not add the
browser address, so every browser reaches the backend as loopback and
would share one rate-limit bucket. Add `security_guard.exempt_ips`
(default 127.0.0.1 and ::1, DEEPTUTOR_GUARD_EXEMPT_IPS) passed to
SecurityConfig. It skips the rate limit only; the denylist, bans and the
attack-pattern scan still apply, and loopback requests that carry
X-Forwarded-For are still limited as the forwarded client.

Document that an allowlist must list loopback for the bundled frontend,
and qualify engine behaviour statements with the engine versions they
were verified on.
2026-10-16 16:38:15 +02:00
Renn F
dbd270cfdb feat(api): add opt-in fastapi-guard request screening
Add an off-by-default `security_guard` setting (system.json, with
DEEPTUTOR_GUARD_* deployment overrides) that mounts fastapi-guard's
pure-ASGI middleware in front of the routers: per-address rate limit,
IP allow/deny lists, ban list and an attack-pattern scan of path, query
and headers. Request bodies, WebSocket handshakes, Redis, CORS and
security headers are left alone.

The guard is added before the access-log and CORS middlewares so CORS
stays outermost and 429/403 responses carry CORS headers. When disabled
the package is never imported. When enabled without the package the
backend fails at startup with an install hint. fastapi-guard ships as
the optional `guard` extra (requirements/guard.txt, DEEPTUTOR_EXTRAS).
2026-10-16 16:24:52 +02:00
Mohammad Hijjawi
13ac7b5df6 fix: install tzdata so named timezones resolve on Windows
Windows has no system IANA database, so zoneinfo needs the tzdata
package. Without it ZoneInfo("UTC") raises ZoneInfoNotFoundError on a
fresh install, and /api/settings/usage answers 400 "Invalid timezone"
for every browser timezone, which leaves the Usage statistics panel on
"Unable to load usage statistics." Practice review scheduling,
practice analytics and timezone-aware cron schedules fail the same way.

Declare tzdata on every install surface (root package, deeptutor-cli
package, requirements/cli.txt) and guard it in the packaging metadata
tests.

Closes #1907
2026-10-15 14:06:27 +01:00
wangkai
a40c6469fb fix(solve): keep the remaining plan in view after each step fold
solve_finish_step folds the finished step's tool chatter, and the same cut
dropped the solve_plan result and the step's own `next` pointer, leaving the
model only "[S1] ... — done.". Pass SolveSession.progress_text() as the
checkpoint state so every fold keeps the current plan (done / next / todo) in
view, including after a replan, and the persisted model turn carries it into
follow-up turns.

Closes #1968
2026-10-15 13:00:06 +08:00
wangkai
87a0317255 feat(agent-loop): let a context checkpoint carry replaceable state
A checkpoint may now carry an optional `state` next to `summary`. The fold
keeps appending summaries before the boundary as before and places `state`
in one system message after it, so the next fold replaces the state instead
of stacking stale copies. Checkpoints without `state` behave exactly as before.
2026-10-15 13:00:03 +08:00
dajiaohuang
149343c414 fix(storage): close SQLite connections after helper operations 2026-10-15 12:08:30 +08:00
Wen Li Hong
9a80d3477f fix(voice): surface the HTTP status when a preview error body is not JSON
A reverse proxy can replace the backend's JSON error with an HTML page;
VoicePreviewPanel parsed the error body unconditionally, so the settings
page showed the raw JSON syntax error ("Unexpected token '<'...") from
#1951 instead of anything actionable. Parse the body defensively and fall
back to a localized 'Voice preview failed (HTTP <status>).' message that
keeps the HTTP status visible. Adds the message to the locales that
already translate the voice preview strings and a regression test.
2026-10-15 11:51:22 +08:00
Bingxi Zhao
e60fb15828 Merge pull request #1906 from idealistichacker/fix/activity-panel-return
fix(web): add visible return from activity panel
2026-10-15 03:30:41 +08:00
Bingxi Zhao
a63851df5b Merge pull request #1942 from lorenzozanee/fix/epub-folder-drag-zip
fix(reading): accept browser-zipped EPUB folder uploads
2026-10-15 03:25:10 +08:00
Bingxi Zhao
0e784d5080 Merge pull request #1910 from YizukiAme/codex/fix-1909-image-compaction
fix(session): budget projected image replay before compaction
2026-10-15 03:23:49 +08:00
Bingxi Zhao
8d1f21b7f6 Merge pull request #1924 from Fancie-Personal/fix/agent-loop-preserve-multimodal-instruction
fix(agent-loop): keep content parts when appending a loop directive
2026-10-15 03:23:33 +08:00
Bingxi Zhao
63621137a4 Merge pull request #1911 from Owaid0723666/feat/add-onomeo-provider
feat(providers): add onomeo as an OpenAI-compatible gateway
2026-10-15 03:23:16 +08:00
Bingxi Zhao
a4d46ca76f Merge pull request #1950 from Lamber-maybe/fix/close-background-sqlite-connections
fix: close cron and web-source SQLite connections
2026-10-15 03:22:59 +08:00
Bingxi Zhao
969614b111 Merge pull request #1899 from georgelichen/fix/chat-composer-empty-kb-option
fix(chat): keep knowledge base resource option accessible when empty
2026-10-15 03:18:07 +08:00
Bingxi Zhao
5ed0f63705 Merge pull request #1931 from evan188199-tech/fix/rag-selector-contract-1928
fix(rag): align tool selector contract with execution (#1928)
2026-10-15 03:17:47 +08:00
Bingxi Zhao
9e0168430f Merge pull request #1948 from yepyhun/contrib/nullable-required-arguments
fix(agentic): accept explicitly supplied schema-valid null arguments
2026-10-15 03:17:28 +08:00