Commit Graph

9901 Commits

Author SHA1 Message Date
jxxghp
f03b5fb74c fix(workflow): accept RSS domain context when adding downloads (#6947) 2026-10-10 17:51:24 +08:00
jxxghp
2b415cc1b9 fix(cli): unwrap MCP REST tool responses 2026-10-10 17:00:56 +08:00
jxxghp
5b19d31bb5 Merge pull request #6941 from pyss56/fix/agent-media-type
fix(api): accept agent media type values (movie/tv/music) to avoid HTTP 500
2026-10-10 12:44:49 +08:00
jxxghp
a26e8dc0eb Merge remote-tracking branch 'origin/v3' into codex/pr-6941-agent-media-type 2026-10-10 12:39:03 +08:00
jxxghp
cdb8d9df71 fix(api): sync v3 and complete agent media type compatibility 2026-10-10 12:22:57 +08:00
jxxghp
b663825fe7 fix(plugin): recover dependencies without disabled constraints
Keep enabled host and clone sources in dependency recovery. Fall back to per-plugin requests while retaining ready and recovered manifest constraints, preserving original sources and cancellation ownership.

Refs #6943
2026-10-10 12:20:13 +08:00
jxxghp
bb29451222 fix: isolate unhandled durable transfer failures 2026-10-10 12:17:07 +08:00
pavel2
0d62815a0f fix(api): accept agent media type values
9 处裸构造 MediaType(x) 改为 MediaType.from_agent(x) or MediaType(x),与 search.py/site.py 既有写法一致。智能体按 API 入参规约传入 movie/tv/music 时不再抛 ValueError 返回 500,中文原生枚举值仍走原分支,无行为变化。

涉及:media.py detail、tmdb.py(3)、douban.py(2)、mediaserver.py not_exists、subscribe.py create_subscribe、transfer.py _execute_manual_transfer。
2026-10-10 09:56:47 +08:00
jxxghp
736b6686c3 test: mock media singleton instance at search boundary 2026-10-10 08:48:46 +08:00
jxxghp
4f3424dcdb test: align release contract and isolate search media mocks 2026-10-10 08:42:54 +08:00
jxxghp
63e30e453b ci: preserve manual release summaries and raw changelog 2026-10-10 08:37:30 +08:00
jxxghp
d7db4cfc0b fix(plugin): serialize package swaps with imports (#6939) 2026-10-10 07:42:37 +08:00
jxxghp
24c2a30107 build(release): publish v3.1.3 2026-10-10 07:33:17 +08:00
jxxghp
8811825ee8 fix(search): separate retry timestamp types 2026-10-10 07:04:32 +08:00
jxxghp
828f66e771 fix(search): ignore expired scan retry times 2026-10-10 06:59:33 +08:00
jxxghp
1ed458eda7 fix(download): remove deleted source from matching downloader 2026-10-10 06:58:04 +08:00
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