Commit Graph

9885 Commits

Author SHA1 Message Date
jxxghp
e9f0c693e2 fix(torrent): retry transient downloads and shorten empty-content cooldown 2026-10-10 00:05:22 +08:00
jxxghp
9924e5e7ff fix(workflow): satisfy architecture gates for issue 6931 2026-10-09 23:58:33 +08:00
jxxghp
b2dfde5999 fix(bangumi): use HTTPS for calendar covers 2026-10-09 23:54:47 +08:00
jxxghp
b3581e02df fix(scheduler): preserve dispatched plugin one-shot jobs (#6935) 2026-10-09 21:39:33 +08:00
jxxghp
0115c41459 fix(workflow): 修复添加下载的媒体上下文类型 #6931 2026-10-09 21:33:06 +08:00
jxxghp
ec93101289 Merge pull request #6932 from binyangzhu000-sudo/feat/atlas-cloud-provider 2026-10-09 18:52:23 +08:00
jxxghp
4caa1885ae Merge pull request #6928 from cwd0204/style/ruff-autofix 2026-10-09 18:11:43 +08:00
binyangzhu000-sudo
6d479317c1 feat(llm): 新增 Atlas Cloud provider
Atlas Cloud (https://api.atlascloud.ai/v1) 是 OpenAI 兼容的聚合网关,一个
Key 覆盖 DeepSeek、智谱、月之暗面、通义千问与 MiniMax 等开源权重模型,
形态与 OpenRouter 一致,sort_order 取 50 与 60 之间的 55。

用 openai_provider() 而非 catalog_openai_provider():后者的
model_list_strategy 是 models_dev_only,而 Atlas Cloud 尚未被 models.dev
收录;前者走 openai_compatible,直接读网关自己的 /v1/models。
models_dev_provider_id 保留默认值 atlascloud,这样等 models.dev 收录后
_models_dev_reserved_provider_ids 会认到它,不会再自动生成一个重复条目。

实测:用 discovery 内部同款 AsyncOpenAI 构造调用,models.list() 返回 117
个模型,deepseek-ai/deepseek-v4-flash 的对话正常返回。

Signed-off-by: binyangzhu000-sudo <binyangzhu000@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: binyangzhu000-sudo <binyangzhu000@gmail.com>
2026-10-09 16:03:47 +08:00
InfinityPacer
6034dcc880 fix(workflow): drop shared context on fork and legacy pickle context
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 13:56:35 +08:00
freeman
f3ad81b39e style: apply safe ruff auto-fixes and exempt startup late imports
Run `ruff check app tests scripts --fix` with the configured rule set
(E4/E7/E9/F/I): import sorting (I001), f-strings without placeholders
(F541), lambda/variable/unused-import cleanups that ruff marks safe.
Nine files whose only ruff debt sits next to pre-existing pylint
import-resolution errors (lazy exports, sys.path script imports) or
whose "unused" imports are reached through attribute access by tests are
left untouched so the changed-file pylint gate and the benchmark tests
stay green; their diagnostics remain in the baseline.

app/startup/lifecycle/__init__.py and app/main.py import business
modules after cache composition, import-path and stdio setup on purpose
(the source comments document the contract), so declare E402
per-file-ignores for them instead of adding per-line noqa.

Ruff ratchet watermark drops from 498 to 100; sync the baseline fixture
and the optimization checklist figure.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 13:29:09 +08:00
jxxghp
1c1db41222 Merge pull request #6926 from cwd0204/test/optional-downloader-stubs 2026-10-09 13:05:13 +08:00
jxxghp
233be41b49 Merge pull request #6925 from cwd0204/fix/login-throttle 2026-10-09 13:04:40 +08:00
jxxghp
7bf7e797cd Merge pull request #6923 from cwd0204/fix/cors-wildcard-credentials 2026-10-09 13:03:06 +08:00
jxxghp
68ed09f4e2 Merge pull request #6922 from cwd0204/chore/douban-docstring-apikey 2026-10-09 13:01:23 +08:00
jxxghp
0ed5c9ac05 Merge pull request #6921 from cwd0204/docs/agents-s2l6-stale 2026-10-09 13:00:53 +08:00
freeman
2165475dd0 fix(security): throttle password login after repeated failures
The access-token endpoint accepted unlimited password attempts; the
only existing rate limiters are single-instance helpers for outbound
site requests. Add app/application/security/throttle.py, an in-memory
LoginThrottle keyed by (client address, normalized username) that locks
for 30s after five consecutive failures and doubles the lockout up to
15 minutes. The endpoint answers 429 with Retry-After while locked,
counts only real credential failures (an MFA challenge after a correct
password does not count), and clears the record on success.

X-Forwarded-For is deliberately not trusted because there is no
trusted-proxy setting; behind the bundled nginx all requests share one
address, so the key degrades to per-username throttling, which is the
dimension brute-force protection needs. Sync the dependency snapshot
and architecture metrics for the new module.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 12:01:04 +08:00
jxxghp
54f2daba06 fix(subscribe): stop automatic searches and downloads when paused 2026-10-09 12:00:18 +08:00
freeman
88641d4a7a test: stub optional downloader modules only when they are missing
test_chain_rate_limit.py and test_system_notification_dispatch.py
installed a bare qbittorrentapi/transmission_rpc/psutil ModuleType into
sys.modules at import time with sys.modules.setdefault. When either file
is collected before a test that imports the real package in the same
shard (for example tests/test_downloader_add_failure_message.py and its
TorrentDictionary import), the placeholder wins and collection fails
with "cannot import name ... (unknown location)". Any change to the test
file set reshuffles the six CI shards and can surface this.

Use app.testing.bootstrap.ensure_optional_stub, which keeps the real
module when it is installed, and convert both unittest.TestCase files to
pytest-native functions as the testing guide requires when touching a
TestCase file. Record the resulting lower Ruff watermark.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 11:58:51 +08:00
freeman
0cfb292cef fix(api): disable CORS credentials for wildcard origins
ALLOWED_HOSTS defaults to ["*"] and the CORS middleware always set
allow_credentials=True. Starlette echoes any request Origin with
Access-Control-Allow-Credentials in that combination, which lets every
site make credentialed cross-origin calls. resolve_cors_policy now
returns credentials=False for wildcard origins and keeps credentials
only when explicit origins are configured.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 11:39:12 +08:00
freeman
55d3081497 chore(douban): drop duplicated apikey literal from __post docstring
The POST helper docstring embedded a sample request that repeated the
_api_key2 constant as a hard-coded literal. Keep the key in one place
and describe the request shape instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 11:34:32 +08:00
freeman
32fa9be9ce docs(agents): drop stale S2-L6 temporary-debt wording for rss.py
The direct Adapter imports in application/rss.py were cleared when the
S2-L6 roadmap item was delivered (dependency-policy records zero
direct_adapter_imports). AGENTS.md still described them as an open
temporary debt; state the delivered target instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 11:33:35 +08:00
jxxghp
5db2eea5b4 Merge pull request #6918 from YuHoYe/fix/subscribe-convert-identity-to-tmdb
fix(subscribe): convert douban/bangumi identity to TMDB on subscribe
2026-10-08 21:28:31 +08:00
jxxghp
35d5cac84f fix(subscribe): validate TMDB conversion and sync architecture facts 2026-10-08 21:22:17 +08:00
YuHoYe
d42c217286 fix(subscribe): convert douban/bangumi identity to TMDB on subscribe
识别源为 TMDB 时,手动订阅电视剧或电影若传入豆瓣、Bangumi 等非 TMDB 身份,
订阅链现在会先通过 convert_media_identity 换成 TMDB 整剧身份,再按 TMDB 识别,
与豆瓣想看、豆瓣榜单插件的订阅口径保持一致。

非 TMDB 来源把每一季当作独立条目,标题和年份都是季级的。此前手动订阅只拆出季号、
仍以季条目作为主身份,下载记录与整理随之按季标题生成独立剧集目录,媒体库里出现
多部同名剧。转换失败时沿用原身份,识别源不是 TMDB 时不做转换。
2026-10-08 20:22:02 +08:00
jxxghp
70811b551e feat(music): optionally simplify written lyrics 2026-10-08 18:40:16 +08:00
jxxghp
c8c54f29bb Merge pull request #6915 from Guoyin-Wen/feat/milkie-site-adapter
feat(indexer): 适配 Milkie 站点搜索与连通测试
2026-10-08 18:01:27 +08:00
jxxghp
6758633e01 docs(architecture): sync metrics for Milkie adapter 2026-10-08 17:56:07 +08:00
WenGuoyin
e19076f482 feat(indexer): 适配 Milkie 站点搜索与连通测试
- 新增 MilkieSpider:基于 milkie.cc JSON API(x-milkie-auth 认证)的
  种子搜索与浏览,支持关键字分类收敛、服务端翻页、免费因子与
  媒体类型映射,下载链接按 API Key URL 编码拼接
- 注册 SPIDER_PARSER_CLASSES 与专用搜索参数投影
- SiteChain 新增 milkie.cc 连通性测试,401/403 判定 API Key 失效
- 补充 MilkieSpider 单元测试与同步异步参数一致性用例,同步依赖基线
2026-10-08 17:18:10 +08:00
jxxghp
656e2852f7 fix(indexer): paginate keyword results without server page support
Refs #6911
2026-10-08 13:46:57 +08:00
jxxghp
0cd6b3660f fix(agent): inject host dependencies into protocol factories
Pass the session owner's data context and memory to Web and compatible protocol agent factories. Cover task creation, listing, session reuse and subagent tool injection across the shared entrypoints.

Refs #6910
2026-10-08 13:43:59 +08:00
jxxghp
11303a8e88 fix(transfer): suppress completion events without target items 2026-10-08 13:42:08 +08:00
jxxghp
cf889ba7a0 fix(telegram): report persistent polling failures 2026-10-08 13:23:58 +08:00
jxxghp
97a6dc3fa1 chore(release): bump backend version to v3.1.2-1 2026-10-08 12:05:33 +08:00
jxxghp
f0b34cf9f5 fix(search): restore concurrent progressive manual paging 2026-10-08 11:57:10 +08:00
jxxghp
ed85f763ef Synchronize FRONTEND_VERSION with APP_VERSION 2026-10-08 09:29:02 +08:00
jxxghp
32d37fa8b4 feat(music): preserve per-task CUE recognition policy 2026-10-08 08:51:01 +08:00
jxxghp
6ba8bc027d fix(deps): update audited runtime dependencies 2026-10-08 07:27:25 +08:00
jxxghp
bf6ad15bea 更新 version.py 到 v3.1.2 2026-10-08 07:22:40 +08:00
ChantXu64
e5e2558585 feat(search): 订阅补全逐页搜索、断点续搜与资源页手动分页 (#6907) 2026-10-07 14:40:55 +08:00
jxxghp
230b128b8e fix(agent): exclude history storage from runtime signatures 2026-10-07 13:27:15 +08:00
jxxghp
6c9ebd01f3 fix(agent): close owned LLM clients with their lifecycle
Refs #6901
2026-10-07 09:18:40 +08:00
jxxghp
d22e4785a6 fix(agent): preserve nullable tool schemas outside Gemini 2026-10-07 09:17:33 +08:00
jxxghp
e51fd44964 fix(agent): resolve alternative QQ and Feishu user bindings
Keep strict binding lookup as the default and explicitly match alternative channel identifiers for the Agent API gateway. Reject ambiguous active-user matches and cover single-field bindings with database-backed tests.

Refs #6905
2026-10-07 09:16:33 +08:00
jxxghp
bfe81699bc Merge pull request #6900 from cwd0204/feat/download-save-path-alias 2026-10-06 16:00:12 +08:00
Freeman
4c994c993f docs(download): document directory aliases for save_path
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-06 15:30:29 +08:00
Freeman
4e9e868862 feat(download): accept configured directory names as save_path
validate_download_save_path keeps path-first semantics and falls back to an
exact match on the configured download directory name, returning that
directory's root URI so every download entry point can save by alias.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-06 15:07:24 +08:00
jxxghp
43edef140f fix(indexer): fetch TNode current user before requiring an id (#6895) 2026-10-06 07:40:06 +08:00
jxxghp
a8f71f32a8 fix(jellyfin): include collection members in library queries 2026-10-06 07:32:06 +08:00
InfinityPacer
7e76239c86 fix(agent): reap macOS kernels before retrying group termination 2026-10-06 03:05:16 +08:00
InfinityPacer
8b4b5eb4fe chore(deps): upgrade chardet to 7.6.0 2026-10-06 02:44:02 +08:00