Commit Graph
1157 Commits
Author SHA1 Message Date
InfinityPacer cc8e4bc510 fix(agent): map closed database worker to 503 2026-08-23 11:44:18 +08:00
InfinityPacer e0f70fa920 fix(agent): close chat lifecycle safely 2026-08-23 11:44:18 +08:00
InfinityPacer 0ba4a7e5e3 fix(agent): close async chat persistence lifecycle 2026-08-23 11:44:18 +08:00
InfinityPacer f560c19d65 fix(agent): keep chat reads on native async path 2026-08-23 11:43:07 +08:00
InfinityPacer 21ce70fbfc refactor(agent): route chat persistence through database worker 2026-08-23 11:43:07 +08:00
InfinityPacer bb2a5d38c8 fix(workflow): route async cache deletion through database worker 2026-08-23 11:14:31 +08:00
InfinityPacer fc677a2bba feat(database): bound async configuration writes 2026-08-23 02:29:40 +08:00
InfinityPacer 3d7fb44dc7 refactor(database): isolate configuration transactions 2026-08-23 02:29:22 +08:00
jxxghp a59f1b928a feat: make subscribe reports durable 2026-08-23 00:25:23 +08:00
jxxghp 3c8cb513bb fix: await durable subscribe deletion reports 2026-08-23 00:07:52 +08:00
jxxghp e602c23668 refactor: clear public entrypoint complexity debt 2026-08-22 23:28:30 +08:00
jxxghp 56cb7294eb refactor: extract cache network and compatibility entrypoints 2026-08-22 23:13:59 +08:00
jxxghp 1bb6e36e8c refactor: complete runtime configuration migration 2026-08-22 19:07:07 +08:00
jxxghp be18cace1f refactor: finish transactional runtime migration 2026-08-22 15:18:16 +08:00
jxxghp 996a1a0705 refactor: expand api and chain config snapshots 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
InfinityPacer 9cc2bdbce1 fix: 避免 Web Agent 语音转写阻塞事件循环 (#6389) 2026-08-22 13:16:15 +08:00
jxxghp 508bf0bc38 fix(ci): restore lint and architecture gates 2026-08-22 10:23:18 +08:00
InfinityPacer 1c07333909 fix: 收敛 Agent 会话队列与 worker 关闭 (#6386) 2026-08-22 10:09:01 +08:00
jxxghp 7b9499fc5b feat(plugin): add virtual plugin instances 2026-08-22 09:40:38 +08:00
jxxghp 97d2dcd7fb fix(ci): align architecture and pylint gates 2026-08-22 08:50:25 +08:00
jxxghp 5d9c6c8b19 refactor: expand runtime contracts and debt ratchets 2026-08-22 08:25:36 +08:00
jxxghp c5de1c7b1b refactor: make subscription lifecycle events durable 2026-08-22 07:43:41 +08:00
jxxghp 1b253510e1 ci: block new async blocking calls 2026-08-21 22:29:19 +08:00
jxxghp 9df599f502 refactor: split api dependencies by domain 2026-08-21 21:09:57 +08:00
jxxghp 773ea8cb9b refactor: introduce typed host runtime 2026-08-21 20:56:25 +08:00
jxxghp b598b516d5 refactor: migrate high-risk write transactions 2026-08-21 20:46:57 +08:00
InfinityPacer b9bbc8913c fix: 完善插件恢复与运行态收敛 (#6376) 2026-08-21 18:09:29 +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
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 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 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 5d0bacabd5 fix(dashboard): 修复首页存储空间显示为 0
仪表板 _build_storage 原先仅按 library_storage 选取存储,用户只配置
本地下载目录而未填媒体库存储时存储集合为空,直接返回 0;而设置页经
LocalStorage.usage 同时统计下载目录与媒体库目录,故显示正常。

改为汇总下载目录的 storage 与媒体库目录的 library_storage,与 usage
口径对齐。存储名用 set 去重,同一存储只查询一次;磁盘层面 space_usage
已按 st_dev / Btrfs FSID 去重,相同磁盘的不同目录不会重复累加。

closes #6268
2026-08-17 17:34:34 +08:00
InfinityPacer 3ebbec3317 perf(startup): reduce readiness work (#6341) 2026-08-17 11:32:04 +08:00
jxxghp d7e610e656 feat(agent): 新增 apply_patch 多文件补丁编辑工具
参考 Codex apply_patch 设计,支持单次调用对多个文本文件执行新增、
更新和删除:补丁以 *** Begin Patch / *** End Patch 包裹,Update 段
用 @@ 分隔 hunk,上下文行须与当前内容精确一致;先整体校验全部文件
操作,通过后才逐个原子写盘,并以校验期 sha256 防止并发修改。

- 工具描述与系统提示词明确 apply_patch / edit_file / write_file 分工:
  跨多文件或增删文件用 apply_patch,单文件单处替换用 edit_file
- 注册进工具工厂与 ALWAYS_INCLUDE 列表,加入策略 inventory 与
  MCP 隐藏列表,流式回调归类为 file_write
- 同步 create-moviepilot-plugin / publish-moviepilot-plugin /
  create-moviepilot-skill 技能的 allowed-tools 与版本
- 新增 tests/test_agent_apply_patch.py 覆盖解析、多文件应用、
  整体拒绝、权限边界与版本冲突场景
2026-08-17 08:01:59 +08:00
InfinityPacer ca99af10f1 fix(auth): preserve bcrypt password compatibility (#6339) 2026-08-17 06:13:18 +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 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
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
jxxghp 98276a68a8 fix(api): 修复LLM manage端点目录查询返回列表无法透过Dict响应模型校验导致设置页500 2026-08-16 08:27:21 +08:00
jxxghp cd5b85eb6c fix(api): 修复LLM manage端点在空target时url_for报Must not be empty导致设置页500 2026-08-16 08:11:45 +08:00
jxxghp 7d0cf76d9c fix(storage): 修复通用管理契约下存储页报未知错误
- usage 动作返回的 StorageUsage pydantic 模型无法透过
  Response[Dict[str, Any]] 开放映射校验导致 500,统一转为 dict
- support_transtype 返回值恢复 transtype 包装结构,与前端期望一致
- 空结果(无用量/无整理方式)恢复成功空结构语义,
  不再因 bool(结果) 被前端客户端当作业务失败弹窗
- dashboard 用量聚合改为 dict 取值;新增响应校验与空结果回归测试
2026-08-16 07:50:29 +08:00