Commit Graph
623 Commits
Author SHA1 Message Date
InfinityPacer 627775c090 fix(plugin): 按绑定仓库保留更新候选 (#6474)
* fix(plugin): preserve repository update candidates

* chore(ci): sync architecture ratchet baselines

* chore(ci): align canonical coverage baseline

* chore(ci): align coverage ratchet baseline
2026-08-27 06:56:33 +08:00
jxxghp d234c7132a chore(architecture): reconcile v3 contract baselines 2026-08-26 21:45:30 +08:00
InfinityPacer d24c52ea97 fix(plugin): 按绑定仓库处理插件更新 (#6472) 2026-08-26 21:35:16 +08:00
InfinityPacer 71db425c07 feat(plugin): 建立可信来源准入与安装恢复 (#6462) 2026-08-26 07:52:00 +08:00
jxxghp 33a367ebf9 fix(ci): stabilize event and web agent checks 2026-08-26 07:04:04 +08:00
jxxghp 3ba4027d84 feat(events): expose typed payload snapshots 2026-08-25 22:32:33 +08:00
jxxghp 574c50586e feat(music): 完善歌词与专辑目录整理 2026-08-25 21:02:26 +08:00
jxxghp 605bf8174a feat(filter): 支持音乐优先级规则组 2026-08-25 16:34:07 +08:00
InfinityPacer d58c8d2b17 feat: 完善数据库备份管理与版本读取 (#6450) 2026-08-25 16:05:45 +08:00
jxxghp 84326e20de feat(system): add staged release updates 2026-08-24 17:58:03 +08:00
jxxghp 4a5f8c2e85 fix(schemas): export downloader file contract 2026-08-24 02:17:50 +08:00
jxxghp 52fd495d38 refactor: normalize downloader file contracts 2026-08-24 02:10:04 +08:00
jxxghp 820582ab12 refactor: close plugin shutdown mutation races 2026-08-23 21:55:22 +08:00
jxxghp 7f09927c47 refactor: own shutdown lifecycle boundaries 2026-08-23 20:20:26 +08:00
InfinityPacer c6ffc309d4 fix(persistence): separate retryable rejection errors (#6423) 2026-08-23 20:10:59 +08:00
InfinityPacer 14ec4c6eae test(plugin): verify real cancellation cleanup 2026-08-23 14:26:43 +08:00
InfinityPacer d2b72f5729 fix(database): decouple worker errors from application 2026-08-23 14:26:42 +08:00
jxxghp 677f6a66c2 refactor: complete host module and event contracts 2026-08-22 13:21:52 +08:00
jxxghp c765604b36 feat(notification): add DingTalk robot channel 2026-08-22 12:02:24 +08:00
jxxghp 1a7c3cfff8 feat(media): add native IMDb source module 2026-08-22 11:22:59 +08:00
jxxghp 9273d68aa7 feat(telegram): support rich Agent messages 2026-08-22 10:11:18 +08:00
jxxghp 7b9499fc5b feat(plugin): add virtual plugin instances 2026-08-22 09:40:38 +08:00
jxxghp 820f7e8850 refactor: make download and transfer events durable 2026-08-22 08:03:00 +08:00
jxxghp c5de1c7b1b refactor: make subscription lifecycle events durable 2026-08-22 07:43:41 +08:00
InfinityPacer b9bbc8913c fix: 完善插件恢复与运行态收敛 (#6376) 2026-08-21 18:09:29 +08:00
0069d04b18 feat(download): 支持未识别资源确认下载 (#6356)
* feat(download): 支持未识别资源确认下载

* feat(download): 音乐与影视统一未识别确认下载逻辑

* fix(download): 修正未识别媒体信息构造的类型标注与合集归一

---------

Co-authored-by: liulang <liulang@25qp.cn>
Co-authored-by: jxxghp <jxxghp@gmail.com>
2026-08-19 13:40:47 +08:00
jxxghp a6997d0dac fix: 修复站点用户数据DTO缺少name字段导致种子排序报错 2026-08-18 15:56:40 +08:00
jxxghp dc23977b0c fix: 修复站点用户数据转换并完善媒体来源扩展 2026-08-18 14:50:09 +08:00
jxxghp 5128ae9e1e refactor: 推进后端分层架构治理 2026-08-18 00:29:14 +08:00
jxxghp 77b7960b7d fix(subscribe): 修复历史 note 双重 JSON 编码导致的订阅列表 500
2.0 时代旧代码对 JSON 列显式 json.dumps,导致 note 字段在库里是
字符串而非数组,响应模型按 List[int] 校验失败返回 500。

- 新增 3.0.7 数据迁移,解析并回写字符串型 note 为真正的 JSON 数组
- Subscribe 响应模型增加 note 字符串兼容解析,脏数据按空值处理
2026-08-17 10:56:31 +08:00
jxxghp 76a9223713 fix tests 2026-08-16 19:59:27 +08:00
jxxghp 54f093a099 Merge remote-tracking branch 'origin/v3' into v3
# Conflicts:
#	app/api/endpoints/agent.py
#	app/api/endpoints/anthropic.py
#	app/api/endpoints/openai.py
#	app/chain/__init__.py
#	app/chain/message.py
#	app/chain/site.py
#	app/chain/subscribe.py
#	app/chain/transfer.py
#	app/modules/discord/__init__.py
#	app/modules/qqbot/__init__.py
#	app/modules/slack/__init__.py
#	app/modules/telegram/__init__.py
#	app/modules/wechat/__init__.py
#	app/runtime/extensions/module_manager.py
#	app/runtime/extensions/service_registry.py
#	tests/test_agent_interaction.py
#	tests/test_slash_command_interactions.py
#	tests/test_web_agent_stream.py
2026-08-16 19:44:43 +08:00
jxxghp 240a4dffe6 refactor(schemas): 统一 message/notification 命名边界,旧名收敛至兼容映射表
- notification 域:渠道能力(MessageChannel→NotificationChannel、ChannelCapability* 迁入 notification.py)
- message 域:消息收发(Notification→Message、NotificationType→MessageType、CommingMessage→IncomingMessage、NotificationHistoryItem→MessageHistoryItem、NotificationClear*→MessageClear*)
- Agent 工具契约:send_notification_message→send_message、notification_callback→message_callback
- 源码不保留旧名物理别名,旧导入经 app/runtime/compat/manifest.py SYMBOL_ALIASES 惰性解析
- API 路径与持久化键冻结不变,前端零改动
- 新增兼容守护测试与 docs/rules/07 命名边界规范
2026-08-16 19:32:20 +08:00
InfinityPacer 5b367011c5 refactor(agent): 按需加载 Agent 运行时 (#6336) 2026-08-16 19:25:24 +08:00
jxxghp 7e851dbfa7 refactor(chain): 处理链功能域 mixin 化,清理未使用导入并根治兼容层循环导入
- ChainBase 拆分为 RecognitionMixin/MessageProcessingMixin/NotificationMixin
- TransferChain 拆分为 7 个功能 mixin(_mixins.py),SubscribeChain 音乐订阅域拆出 _music.py
- 斜杠命令交互四件套收敛为 InteractionChainMixin 委托,会话管理器移至 application 层,chain 层不再 re-export
- 模块基础类收敛到 app/modules/_base(notification/mediaserver 语义重命名)
- 清理 app/chain/__init__.py 24 个未使用导入,修正 49 处测试 patch 目标到实际命名空间
- 兼容层 legacy 符号不再并入 __all__,根治 schemas 初始化反向拉起 application.transfer 的循环导入
- 修复 bangumi 集数为字符串时 set_bangumi_info 抛 TypeError
- 新增重复代码等架构门禁测试;capability 清单校验排除下划线内部目录
2026-08-16 16:30:16 +08:00
jxxghp 441ec9475e refactor(api): LLM 提供商管理端点收敛为通用 manage 接口,端点层零特色
- schemas 新增 LlmProviderAction 公共动作词汇表
- LLMProviderManager 新增 provider_manage 统一入口,默认值填充、
  API Key 豁免判断、密钥脱敏与错误归因改写全部下沉封闭,
  不再硬编码 chatgpt/github-copilot 等产品名
- endpoint 收敛为 POST /llm/manage(ManageRequest 透传);
  OAuth 回跳地址由端点按具名回调路由统一构造后注入动作参数,
  /provider-auth/callback/{provider_id} 因浏览器回跳协议约束保留具名路由
- 新增 14 项 provider_manage 契约守护测试,
  替换原针对端点函数的两个旧测试文件
2026-08-16 07:50:16 +08:00
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 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 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 bb63b40213 fix(transfer): 修复音乐整理因缺少 tmdb_id 字段崩溃
MusicInfo 不含 tmdb_id 等 60 个影视专用字段,整理链访问
task.mediainfo.tmdb_id 直接 AttributeError,导致无分类音乐自动
整理全部失败。

源头修复:为 domain 与 schemas 两层 MusicInfo 增加 __getattr__
兜底,缺失字段返回 None,避免下游逐点安全访问;dunder 方法
除外以保持 copy/pickle 钩子探测正常。显式声明 recognize_cache_hit
字段保留 getattr(..., False) 默认值语义。
2026-08-15 10:20:04 +08:00
Aqr-K 8a11214a43 refactor(db): 修复异步连接池无界增长,并完成 SQLAlchemy 2.0 迁移与分层归位 (#6320) 2026-08-15 06:58:38 +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 369d7d6448 refactor: reorganize backend module boundaries 2026-08-14 19:53:33 +08:00
jxxghp 7b3444c366 refactor backend module architecture 2026-08-14 15:45:38 +08:00
InfinityPacer 006b6f6318 fix(auth): support nested feature permissions (#6310) 2026-08-14 10:21:27 +08:00
jxxghp 87b1caf3ff fix(agent): grant channel owners admin access 2026-08-14 00:01:37 +08:00
jxxghp 4de4fa4391 fix: 插件文件夹响应模型兼容新版对象格式
GET /plugin/folders 的响应模型 PluginFoldersData 只能校验旧版
数组格式,前端实际保存的是含展示配置的对象格式,导致建文件夹/
移入插件后刷新时响应校验失败(500),文件夹恢复为空。改为同时
兼容新旧两种格式。
2026-08-13 22:06:22 +08:00
jxxghp eebd81a0e4 feat(media): support iqiyi discover source 2026-08-13 15:34:58 +08:00