jxxghp
a6dbd799d5
refactor(api): 渠道与存储管理端点通用化,端点层零目标特色
...
- schemas 新增公共 ManageRequest(target+action+params) 与 StorageAction 词汇表
- endpoint 层收敛为 POST /notification/manage、/storage/manage 两个通用接口,
不再定义任何渠道/存储特定的名称、参数与响应字段,前端上送参数原样透传
- chain 层 manage_channel/manage_storage 接受字符串标识纯透明转发,
StorageChain 移除全部特色管理方法
- FileManagerModule 新增 storage_manage 统一入口,模块返回归一化为
{success, message, data};wechatclawbot channel_manage 同步归一化,
路由标识兼容枚举名/值/对象
- dashboard 与 agentopsassistant 的用量查询改走 manage_storage(usage)
- 新增 10 项存储契约守护测试,通知侧补充 3 项链透传与字符串路由测试,
API 守护测试对 ManageRequest 开放映射按设计豁免
2026-08-16 07:18:49 +08:00
jxxghp
5b0c631f80
refactor(notification): 建立通知渠道通用管理契约 channel_manage
...
- schemas 层新增 NotificationAction 公共动作词汇表(状态/二维码/退出/连通性/缓存迁移)
- 模块实现统一 channel_manage(channel, action, **params),按渠道名路由,
非本渠道返回 None;动作语义、表单参数解释与临时参数初始化封闭在模块内
- NotificationChain 收敛为单一 manage_channel 纯透明转发,
chain 层不再出现任何渠道名与模块特色
- endpoint 路由路径保持前端兼容,内部统一走通用接口
- 新增 6 项契约守护测试,文档记录通用模式:新渠道接入无需改 chain
2026-08-16 06:35:46 +08:00
jxxghp
6504cb36f5
fix(recognize): 修复识别测试仅传数据源时被成对身份校验误拒,名称识别与临时识别词恢复生效
...
- 8bf2f601 引入的显式身份成对校验把'仅传 media_source'也视为显式身份,识别测试恒传数据源导致直接返回未识别
- 成对约束仅在显式传 media_id 时生效;仅传数据源时保留为请求级识别源约束,按名称在指定数据源内识别
- 字符串来源经 normalize_media_source 规范,meta 自带同源身份(如 {tmdbid=})时优先按身份识别
- 新增 tests/test_recognize_source_selection.py 覆盖 source-only、同源身份采纳与成对拒绝场景
2026-08-16 05:36:40 +08:00
jxxghp
4345fcfa22
refactor(chain): chain 与 module 仅经 run_module 契约互联,实现模块内容封闭
...
- mTorrent 字幕链接解析下沉为 IndexerModule.site_subtitle_links,subtitle 模块自行跳过 API 站点
- TMDB/MusicBrainz 识别缓存管理改为模块方法(tmdb_cache_*/music_cache_*)经 run_module 分发
- WechatClawBot 客户端查找/临时客户端/缓存迁移内聚为 wechatclawbot_* 模块方法,
chain 移除 WechatClawBot 类与 ModuleManager 内省
- LISTENBRAINZ_* 常量迁至 schemas/types.py,模块与链层再导入保持兼容
- TMDbException 升为 schemas/exception.py 跨层契约,vendored 异常保持类身份一致
- 架构守护测试新增 test_chain_does_not_import_module_internals(共 18 项)
- 文档同步:chain->module 仅允许 run_module 分发,直接导入禁止
2026-08-16 05:25:28 +08:00
jxxghp
02f0dd0b9a
refactor(architecture): 修复模块依赖违规并强化架构守护
...
- 字幕编排上移 DownloadChain.download_site_subtitles,SubtitleModule 仅保留站点链接解析
- TransferChain.recommend_name 上移 TV episodes_info 获取,filemanager 模块不再导入 TmdbChain
- endpoint 穿透修复:WXBizMsgCrypt3 迁至 adapters/external/wechat_crypt.py;
music/tmdb 缓存管理、listenbrainz 常量、TMDbException、WechatClawBot 辅助统一经 chain 包装
- RuleParser 与 builtin_rules 合并为 application/filter_rules.py;
fsproxy/fsworker 迁至 adapters/system/
- chain/__init__.py 删除 qbittorrentapi/transmission_rpc 导入,消除后端协议类型泄漏
- 架构守护测试新增三项检查:模块间隔离、入口层穿透、下载器 SDK 泄漏
- 文档同步:05-architecture.md 记录 DB/Oper 聚合例外与迁移文件位置,AGENTS.md 更新所有权表
2026-08-16 04:59:17 +08:00
jxxghp
4858f4652b
fix(runtime): 修复 ConfigReloadMixin 事件处理器因 __name__ 未同步被静默跳过,配置变更不再触发模块重载 ( #6329 )
2026-08-15 21:27:59 +08:00
jxxghp
67968dd0cb
fix(trimemedia): 飞牛影视登录适配新版 v2 协议,密码改用 SHA256 摘要 ( #6328 )
2026-08-15 20:44:19 +08:00
jxxghp
78b0063d4c
fix: 清理音乐刮削结果中 album_type 等字段的尾部空格 ( #6327 )
...
MusicBrainz 和 ListenBrainz 模块从 API 响应中提取 album_type、
secondary_types 时直接使用 dict.get() 取值,未做 strip() 处理,
导致部分结果带有尾部空格(如 'Album '、'Broadcast ')。
修复:
- MusicBrainz 新增 _stripped() 工具方法,3 处 album_type 赋值统一清理
- ListenBrainz 新增 _stripped() 工具方法,_fresh_release_to_info 中清理
- Pydantic schema 层增加 field_validator 作为兜底安全网
- 新增 9 个回归测试覆盖所有场景
2026-08-15 20:35:02 +08:00
jxxghp
dd38c16400
refactor(messaging): 拆分用户交互模块到 application/messaging 层
...
- 新增 application/messaging 交互层:router.py 统一会话优先级与回调分发,
site/subscribe/skill/media/plugin 各交互状态与视图从 Chain 迁出
- MessageChain 改为通过 InteractionRouter 派发文本会话与按钮回调,
新增结构化 callback_data 通道(兼容 CALLBACK: 文本前缀)
- Transfer 失败重试/AI 接管回调归入 TransferChain
- MediaInteractionChain 拆出为 app/chain/interaction.py(旧路径保留兼容别名)
- WebAgent Endpoint 去重,统一使用 agent.py 回调协议函数
- 删除 app/chain/skills.py(交互逻辑并入 SkillInteractionHandler)
- 同步更新架构文档与测试,全量 4476 通过
2026-08-15 16:36:39 +08:00
jxxghp
5a1808592a
fix(transfer): 修复未识别音乐任务登记作业因年份类型校验失败 ( #6325 )
2026-08-15 11:14:10 +08:00
jxxghp
a8dc6e9973
fix(servarr): Seerr 新增剧集订阅缺 tmdbId 或空季列表时无法创建订阅 ( #6315 )
...
Seerr 的 Sonarr 兼容请求体只携带 tvdbId、不携带 tmdbId,且季列表由
lookup 返回的季列表构造;lookup 季列表为空时请求体季列表为空,旧逻辑
直接返回成功但不创建任何订阅,导致 Seerr 显示请求正常而 MP 未收到订阅。
- 新增剧集订阅时按 tvdbId 补全媒体身份,识别失败返回 500 而非静默成功
- 请求体季列表为空时按已识别季集兜底,识别不到季默认第 1 季
- lookup 在 TVDB 无可用季信息时按 TMDB 季集兜底返回季列表
- 新增回归测试覆盖上述场景
2026-08-15 10:56:50 +08:00
jxxghp
96118e73e7
refactor(string): split utilities by responsibility
2026-08-15 08:03:55 +08:00
jxxghp
a2117bafc8
fix(compat): preserve legacy plugin imports
2026-08-15 07:15:03 +08:00
Aqr-K
8a11214a43
refactor(db): 修复异步连接池无界增长,并完成 SQLAlchemy 2.0 迁移与分层归位 ( #6320 )
2026-08-15 06:58:38 +08:00
jxxghp
e28de9cfe1
fix: 修复音乐搜索进度更新
2026-08-14 22:15:17 +08:00
jxxghp
794bcfdfeb
fix(ci): isolate plugin market snapshot generator
2026-08-14 21:29:15 +08:00
jxxghp
d6bf78b63a
feat: 支持音乐识别信息转简体
2026-08-14 21:02:33 +08:00
jxxghp
c580181049
fix(api): keep src/dest fileitem fields in transfer history response
...
TransferHistory schema omitted src_fileitem, dest_fileitem and files which
are emitted by to_dict, so the response_model filter stripped the file
size the frontend reads from src_fileitem.size.
2026-08-14 20:40:02 +08:00
jxxghp
b3509c60bb
fix: support site resources from legacy docker updater
2026-08-14 20:26:51 +08:00
jxxghp
369d7d6448
refactor: reorganize backend module boundaries
2026-08-14 19:53:33 +08:00
jxxghp
fe0b444ceb
fix(test): stub app.infrastructure.sites in subprocess tests for CI
...
CI 无站点二进制模块,子进程测试绕过 conftest 垫片导致
test_manifest_aliases_reuse_real_canonical_modules 与
test_main_script_does_not_shadow_stdlib_platform 失败。
在子进程中复用 ensure_sites_stub,并给垫片补 __spec__。
2026-08-14 18:18:06 +08:00
jxxghp
7b3444c366
refactor backend module architecture
2026-08-14 15:45:38 +08:00
Rayan Salhab
557cc0e2e3
Fix EAC3 audio codec detection ( #6312 )
2026-08-14 11:50:39 +08:00
InfinityPacer
509d671524
test(agent): isolate scheduler in task run test ( #6311 )
2026-08-14 11:50:08 +08:00
InfinityPacer
006b6f6318
fix(auth): support nested feature permissions ( #6310 )
2026-08-14 10:21:27 +08:00
jxxghp
895635c277
fix(db): 假值系统配置落库而非删除记录,布尔开关关闭态可持久化(#6309)
...
SystemConfigOper.set/async_set 原先对假值(False/0/None/空容器)执行删除记录,
读取端以「无记录」表示未配置并回落默认值,导致「挂载盘删除空目录」等布尔开关
关闭后刷新自动弹回开启。现改为假值同样落库更新,显式删除仍走 delete 方法。
2026-08-14 06:59:17 +08:00
jxxghp
87b1caf3ff
fix(agent): grant channel owners admin access
2026-08-14 00:01:37 +08:00
jxxghp
73df2aa331
fix(agent): 工具权限拦截时补齐流式换行,渠道主ID默认管理员权限
2026-08-13 23:15:28 +08:00
InfinityPacer
402543f636
refactor(agent): align policy contracts with runtime ( #6306 )
2026-08-13 22:14:43 +08:00
InfinityPacer
57e7f86f38
feat(agent): record task run history ( #6305 )
2026-08-13 22:13:36 +08:00
jxxghp
86b35bda9a
fix: 优先使用简体音乐关键词搜索
2026-08-13 21:53:18 +08:00
jxxghp
d611891296
fix: 放宽音乐资源标题匹配
2026-08-13 20:57:15 +08:00
jxxghp
23a90991fc
feat: 支持站点音乐分类搜索
2026-08-13 19:45:09 +08:00
InfinityPacer
c86307ddd1
fix: 收口监控测试线程并修复整理历史 lint ( #6304 )
2026-08-13 19:26:05 +08:00
InfinityPacer
3560918e12
fix(agent): bind runtime tasks to app lifespan ( #6303 )
2026-08-13 19:25:52 +08:00
InfinityPacer
e014604b1c
fix: 避免服务重启后重复执行 Agent 定时任务 ( #6302 )
2026-08-13 19:25:11 +08:00
InfinityPacer
dc9f8ef168
chore(agent): raise core LangChain dependency baseline ( #6301 )
2026-08-13 17:59:14 +08:00
InfinityPacer
8dc6774d47
fix(agent): preserve context during request compaction ( #6300 )
2026-08-13 17:58:31 +08:00
InfinityPacer
228de7bd67
fix(agent): compact oversized final model requests ( #6299 )
2026-08-13 17:26:13 +08:00
jxxghp
eebd81a0e4
feat(media): support iqiyi discover source
2026-08-13 15:34:58 +08:00
InfinityPacer
3aed078bbb
fix(agent): bind channel admin identity ( #6294 )
2026-08-13 14:53:59 +08:00
Aqr-K
eeec40cce3
fix(monitor): 消除探测饿死与重试饥饿导致的跨目录连坐 ( #6291 )
2026-08-13 14:00:50 +08:00
InfinityPacer
f979274c07
feat(agent): 增加最终模型请求预算观测 ( #6290 )
2026-08-13 13:52:30 +08:00
InfinityPacer
ce3508730b
fix(agent): 规范化模型窗口 Profile ( #6289 )
2026-08-13 13:51:22 +08:00
jxxghp
d0e06e4b85
chore(database): align v3 migration filenames
2026-08-13 13:47:37 +08:00
jxxghp
b4863a6550
feat(media): support extensible media sources
2026-08-13 13:26:17 +08:00
InfinityPacer
f80562915d
fix(agent): harden secret confirmation failures ( #6287 )
2026-08-13 10:55:02 +08:00
InfinityPacer
527ceff5d1
fix(agent): preserve context when summarization fails ( #6286 )
2026-08-13 10:07:56 +08:00
InfinityPacer
591a1d420d
fix(agent): close secret confirmation delivery gaps ( #6285 )
2026-08-13 08:20:14 +08:00
Aqr-K and Aqr-K
a2e70b443d
fix(monitor,transfer): 修复 FUSE 挂载无响应导致的监控冻死、整理链锁死与漏件 ( #6276 )
...
* wip(v3): 移植监控与整理韧性修复到 v3 基线
包含:监控看门狗隔离/挂载探测、整理队列持久化、文件系统子进程代理、
写入原子化。迁移重挂到 v3 链 8a4c7e1d2f90 -> 7f5c1d2e3a4b -> e3d9f4b7c806。
tmdb 相关测试尚未通过,待定位。
* fix(v3): 修正移植引入的 16 项测试失败
- poller.py:合并时我方保留的行仍用旧变量名 merged_snapshot,而 v3 已统一
改名为 current_snapshot,导致 NameError 被外层 except 吞掉、快照从未保存
- smb.py:采纳 f-string 拆分写法,恢复 Python 3.11 可解析
- dispatcher 测试:历史查重由 _should_skip_by_history 统一承担,mock 点随之调整
- tmdb 缓存测试:补充 v3 新增的 media_source/media_id 字段
- tmdb 重试测试:为 fake 补充 match_multi/async_match_multi
尚余 3 项与 v3 识别流程的连接失败处理有关,待单独判断。
* fix(v3): 测试适配 v3 的 media_source/media_id 重构
v3 将媒体标识从 tmdbid 统一重构为 media_source + media_id,recognize_media
的 tmdbid 参数已被 **kwargs 静默吞掉——传了也不生效,流程会误降级到名称搜索。
tmdb 重试用例改用新参数后恢复正确路径。
同时修正 fake 的 match_multi 语义:真实实现(tmdbapi.match_multi)吞掉所有
异常并返回 None,连接失败与「未找到」在该路径上本就不可区分,fake 需保持一致。
至此移植引入的 19 项失败全部清零。
---------
Co-authored-by: Aqr-K <Aqr-K@users.noreply.github.com >
2026-08-13 08:19:54 +08:00