Commit Graph
57 Commits
Author SHA1 Message Date
InfinityPacer 3d7fb44dc7 refactor(database): isolate configuration transactions 2026-08-23 02:29:22 +08:00
jxxghp ef6a613eb3 refactor: add dynamic runtime settings compatibility proxy 2026-08-23 02:16:03 +08:00
jxxghp 2c6e8181c2 refactor: keep runtime settings below adapters 2026-08-23 01:45:07 +08:00
jxxghp a001291c0b feat: observe legacy facade method hits 2026-08-23 00:37:03 +08:00
jxxghp dc9433f0de feat: observe legacy module contract hits 2026-08-23 00:11:15 +08:00
jxxghp 1bb6e36e8c refactor: complete runtime configuration migration 2026-08-22 19:07:07 +08:00
jxxghp 1a71e4809f feat: wire host database and extension metrics 2026-08-22 13:22:33 +08:00
jxxghp 7bc5e01afd refactor: expand async and type safety gates 2026-08-22 13:21:52 +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 30ebf98fbb feat(transfer): aggregate failure notifications by media 2026-08-22 11:46:41 +08:00
jxxghp 1a7c3cfff8 feat(media): add native IMDb source module 2026-08-22 11:22:59 +08:00
InfinityPacer a90a0e8597 fix: upgrade web dependencies and stabilize plugin routes (#6383) 2026-08-22 09:47:13 +08:00
jxxghp 7b9499fc5b feat(plugin): add virtual plugin instances 2026-08-22 09:40:38 +08:00
jxxghp 5d9c6c8b19 refactor: expand runtime contracts and debt ratchets 2026-08-22 08:25:36 +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
jxxghp bb0964622b fix: preserve legacy event and db dto contracts 2026-08-21 22:33:21 +08:00
jxxghp 43cccb8ff8 feat: add low-cardinality observation port 2026-08-21 22:15:47 +08:00
jxxghp 47f1ff9cb4 feat: propagate request correlation context 2026-08-21 22:08:33 +08:00
jxxghp 1f656830db docs: add module quality scale 2026-08-21 21:31:42 +08:00
jxxghp c0b31bddb6 refactor: register event delivery contracts 2026-08-21 21:29:52 +08:00
jxxghp b9ad5220ae refactor: define module contract v2 2026-08-21 21:25:35 +08:00
jxxghp dd1c4c3279 refactor: unify database readiness lifecycle 2026-08-21 20:07:07 +08:00
jxxghp d89d29612c refactor: enforce single-worker control plane 2026-08-21 19:40:20 +08:00
InfinityPacer b9bbc8913c fix: 完善插件恢复与运行态收敛 (#6376) 2026-08-21 18:09:29 +08:00
InfinityPacer 2e5cc6c669 fix(plugins): align watcher lifecycle with startup (#6366) 2026-08-20 15:24:15 +08:00
InfinityPacer 23f5d59c74 feat: 使用 uv 锁定主程序依赖并强化插件恢复边界 (#6364) 2026-08-20 12:17:19 +08:00
jxxghp 27ae1b5290 fix: 插件重载窗口期装饰器包装类方法误判直调导致 missing event TypeError
事件绑定解析在 owner_class 为 None 时仅靠限定名区分自由函数与类方法声明,
装饰器包装的方法限定名含 <locals> 被误判为自由函数 unbound 直调,把 event
吞进 self 触发 TypeError。局部作用域限定名无法区分包装方法与局部自由函数,
按调用约定兜底:签名首参为 self/cls 才视为类方法声明跳过执行。
2026-08-20 08:51:37 +08:00
InfinityPacer 2b3766e86e feat: 数据库迁移前自动备份 (#6360) 2026-08-19 18:35:56 +08:00
InfinityPacer f700db5ac8 feat(database): add managed backup and offline restore (#6359) 2026-08-19 17:34:32 +08:00
jxxghp 03ada7eb01 refactor: 收敛 factory 模块级副作用并统一 async 路径进度为异步后端
- 将 configure_token_codec/configure_plugin_routes 移入 create_app(),消除 import 期副作用
- runtime 层新增 AsyncCacheProxy/AsyncTTLCache/AsyncProgressHelper,共享 progress region
- search/system/history/scheduler/dashboard 的事件循环路径切换异步进度后端
- 同步进度回调经事件循环提交或线程池执行,避免阻塞事件循环
2026-08-19 09:11:42 +08:00
jxxghp 282b922f1b fix: 修复批量插件重载窗口期残留 handler 直调导致 missing event TypeError
插件重载 stop 阶段清除 sys.modules 缓存后,若广播事件命中注册表中残留的旧类方法声明,
EventBindingResolver.owner_class 因 inspect.getmodule 返回 None 而解析失败,原实现会
直接返回原始函数并绕过实例绑定,旧签名无 event 参数时抛出 TypeError 并刷屏通知。

- binding.py:owner_class 解析失败时区分类方法声明与自由函数;类方法声明记入
  unresolved 诊断并跳过执行,等待重载完成后新 handler 按标识覆盖自愈;
  自由函数保持直调路径不变。
- 收敛 binding-miss 与新路径的未命中记账逻辑到 _record_unresolved,首次未命中才告警。
- 新增回归测试:模块卸载后残留类方法被跳过、自由函数直调不受影响。

Closes #6351
2026-08-18 21:40:13 +08:00
jxxghp 8d62f33155 fix(plugin): 修复坏插件模块声明击穿模块调度导致接口大面积报错
- projection 只接受映射类型的 get_module 声明,非法值跳过并记日志
- dispatcher 同步/异步路径防御非映射方法表,单个坏插件被隔离
- media 端点改用 application 层插件运行时门面,消除分层违规依赖
- 图片能力测试打桩 models.dev 目录边界,适配仓库内离线目录留空

Closes #6346
2026-08-18 15:53:28 +08:00
jxxghp dc23977b0c fix: 修复站点用户数据转换并完善媒体来源扩展 2026-08-18 14:50:09 +08:00
jxxghp c2a27f7c71 refactor: 收口订阅与插件应用边界 2026-08-18 13:54:17 +08:00
jxxghp 8472bcff43 refactor: 收口 V3 分层架构与插件兼容边界 2026-08-18 13:22:02 +08:00
jxxghp 5128ae9e1e refactor: 推进后端分层架构治理 2026-08-18 00:29:14 +08:00
jxxghp 48d85b798b feat(scheduler): 下载失败冷却记录加入定时清理
新增 DATA_CLEANUP_DOWNLOAD_FAILURE_DAYS 配置项(默认 7 天),
在 _build_cleanup_plans 中增加 downloadfailure 清理计划,
调用已有的 DownloadFailure.delete_expired 删除冷却已过期的记录。
2026-08-17 13:29:42 +08:00
jxxghp eefe1ec931 fix(config): 更新配置成功时返回空字符串消息,修复保存设置 500 错误 2026-08-17 10:34:45 +08:00
jxxghp 134c00fc7f fix(compat): 补齐刮削与规则拆分后的旧路径映射,保持插件导入可用
- app.chain.media 登记 ScrapingChain/ScrapingOption/ScrapingConfig 符号叠加,
  刮削能力拆出 ScrapingChain 后旧模块路径仍可惰性解析
- app.application.filter/filter_rules 映射到收敛后的 app.application.rules
- 补充旧路径模块身份与符号解析测试
2026-08-17 09:06:27 +08:00
jxxghp 1402626a4a refactor(tmdb): 空结果缓存过期时间收敛为设置项 EMPTY_RESULT_CACHE_TTL
- ConfigModel TMDB 配置区新增 EMPTY_RESULT_CACHE_TTL(默认 30 分钟),支持环境变量覆盖
- request/async_request/discover/TmdbCache 统一改读 settings,移除模块级常量与跨模块导入
2026-08-16 21:20:32 +08:00
InfinityPacer 2aca9cc06b fix(runtime): enforce canonical capability entrypoints (#6338) 2026-08-16 21:16:09 +08:00
jxxghp fa06a4ac03 fix(tmdb): 空结果缓存使用独立短 TTL,故障恢复后快速自愈,关闭 #6332
- cached 装饰器新增 empty_ttl/empty_if,空结果按独立短 TTL 写入
- TMDB request/async_request/discover 空结果快照 30 分钟过期
- TmdbCache 未识别负缓存(id=0)同步改用 30 分钟短 TTL,正缓存不变
2026-08-16 20:50:55 +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
jxxghp 5810f6bc2b refactor(application): filter_rules.py 更名 rules.py 并合并 RuleHelper
规则域收敛为单一事实来源 app/application/rules.py:
- filter_rules.py 更名为 rules.py(内置规则集 + RuleParser)
- filter.py 仅含 66 行 RuleHelper(用户规则组配置访问),并入 rules.py
- 同步更新 5 处引用方导入、nettest stub 目标与架构文档
- 兼容映射 app.helper.rule 指向新路径,legacy 导入仍可用
2026-08-16 17:13:51 +08:00
InfinityPacer b8b59ae20a refactor(runtime): activate managed resources on demand (#6334) 2026-08-16 16:44:45 +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
InfinityPacer 24671f8f18 refactor(runtime): lazily activate host modules (#6331) 2026-08-16 16:07:38 +08:00