Commit Graph

1360 Commits

Author SHA1 Message Date
jxxghp
22704e9224 fix(api): allow dedicated identifier writes 2026-10-05 13:01:42 +08:00
jxxghp
8c101b0096 Merge pull request #6883 from MiCat-S/fix/message-verify-log-token 2026-10-04 19:22:09 +08:00
LIN student
4416e278aa fix(message): 回调验证日志不再输出 token
消息回调验证入口 GET /api/v1/message/ 以 INFO 级别记录请求参数,其中的
token 就是 verify_apitoken 校验用的 API_TOKEN。日志经常被直接贴出来排查
问题,因此去掉这个字段,其余排查用参数保持不变。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 19:01:22 +08:00
LIN student
3bdf09dc6f fix(site): 非超级管理员读取订阅站点和域名详情时不返回认证字段
/site/rss 与 /site/domain/{site_url} 只依赖 verify_token,直接返回完整的
Site 模型,其中包含 cookie、apikey、token、rss。同模块的 /site/agent 已经
对非超级管理员剔除这些字段,/site/ 列表也要求 manage 权限,两个接口与之
不一致。

前端订阅编辑和工作流「获取种子」动作只用到站点的 id、name、is_active,
因此非超级管理员改为复用 _project_agent_site(include_secrets=False) 投影,
超级管理员保持原有完整字段。

read_rss_sites 的返回标注由 List[dict] 改为实际的 Site 或投影字典,site.py
的 mypy 债务减少 2(return-value、type-arg 各 1),已固化低水位并同步文档
指标。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 19:01:22 +08:00
jxxghp
03a285a2a6 fix(wechat): proxy douban notification images 2026-10-04 16:19:58 +08:00
jxxghp
1eacd10cd6 refactor(transfer): keep queue projections in transfer endpoint module 2026-10-02 22:10:16 +08:00
jxxghp
1ba2f28c94 chore(transfer): remove unrelated fork sync changes 2026-10-02 22:08:10 +08:00
jxxghp
b33053e10f Merge remote-tracking branch 'origin/v3' into codex/optimize-pr-6849
# Conflicts:
#	docs/architecture-overview.md
#	docs/refactor/optimization-checklist.md
#	tests/fixtures/architecture/dependency-baseline.json
2026-10-02 22:06:27 +08:00
Cat
eb76fcafd6 fix(notification): 限制实时消息队列积压并在 SSE 重连后一次推送 (#6862) 2026-10-02 21:32:18 +08:00
jxxghp
5f596484b4 fix(classification): prepare policy-specific facts and refine defaults 2026-10-02 14:14:09 +08:00
jxxghp
cc114337de fix(agent): forward tool messages to OpenAI stream 2026-10-01 14:52:26 +08:00
ranzhigg
0c9d8c9208 Merge upstream v3 into transfer queue PR 2026-10-01 12:51:06 +08:00
ranzhigg
56cf6fefe0 perf(transfer): bound queue snapshots for batch imports 2026-10-01 12:45:31 +08:00
jxxghp
8e9c9b41e1 fix(api): allow slashes in rule group names 2026-09-30 23:31:55 +08:00
InfinityPacer
08123fa5cf perf(api): share default error-response fields across routes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 17:47:51 +08:00
jxxghp
47d51c3630 feat(agent): align history recall with Hermes SQLite FTS5 2026-09-30 16:28:39 +08:00
jxxghp
8fbf1cbe54 feat(music): honor explicitly selected release editions 2026-09-30 14:46:48 +08:00
jxxghp
104d8028e8 feat(music): expose recognition evidence and release groups in transfer previews 2026-09-30 14:11:07 +08:00
InfinityPacer
4bd7e3dc04 perf(webpush): send Web Push with http-ece and py-vapid instead of pywebpush
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 13:20:00 +08:00
jxxghp
54591ac50e feat(music): bound recognition requests and make lookup caches recoverable 2026-09-30 05:15:14 +08:00
jxxghp
b4175a4f88 fix(image): cache site allowlist and include custom image hosts 2026-09-30 01:09:32 +08:00
jxxghp
8c46c9bee8 fix(image): allow configured site domains in image proxy 2026-09-30 00:53:37 +08:00
jxxghp
6cdd4dbc66 fix(subscribe): resolve cross-source video status without premiere year 2026-09-28 16:59:30 +08:00
jxxghp
3428aed490 fix(transfer): keep automatic music selection per file 2026-09-24 14:48:41 +08:00
jxxghp
1d84d17dc4 feat(system): add protocol-aware network checks 2026-09-24 12:25:45 +08:00
jxxghp
5d620b0cbe feat(media): support episode groups in manual scraping 2026-09-24 08:23:35 +08:00
LS
c68288e897 feat(security): 图片代理自动信任已启用的媒体服务器主机 (#6769)
在局域网部署 Emby/Jellyfin/Plex 的用户,此前需要手动维护
SECURITY_IMAGE_DOMAINS(整表覆盖,会随版本默认值漂移)和
IMAGE_PROXY_ALLOWED_PRIVATE_RANGES,未签名的媒体服务器图片 URL
才能通过图片代理。

- is_safe_image_url_async 新增可选参数 trusted_hosts:URL 的 netloc
  (含端口)或 hostname 精确命中时直接放行,不受私网拦截限制;
  默认 None,现有调用方行为不变。
- fetch_image(覆盖 /img 与 /cache/image)从已启用媒体服务器的
  host / play_host 计算受信主机;读取配置失败时返回空集合,不影响代理。

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-23 16:34:25 +08:00
InfinityPacer
19e062c178 feat(plugin): attribute free-threaded GIL fallback to plugins (#6767)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 13:12:02 +08:00
InfinityPacer
0238351071 fix(plugin): v3t 下不再隐藏不兼容插件,改为提示不支持 (#6760)
* feat(plugin): surface v3t incompatibility instead of hiding plugins

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* chore(architecture): refresh dependency baseline after plugin gate split

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(plugin): keep runtime-incompatible plugins out of startup sync

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(plugin): annotate runtime compatibility ports without bare dict

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 00:35:20 +08:00
moviepilot-codex[bot]
d96f00113c feat: add GitHub Token device authorization 2026-09-21 18:30:15 +08:00
moviepilot-codex[bot]
c0f7141e26 fix(plugin): invalidate federation static resource cache (#6748) 2026-09-21 16:24:38 +08:00
jxxghp
67ae166a54 fix(servarr): restore subscription repository async contract 2026-09-18 22:13:33 +08:00
jxxghp
2e2a037eb8 fix(subscribe): align fork response model with returned id 2026-09-18 12:24:58 +08:00
jxxghp
4e9a64c0f0 refactor(application): 按模块子目录统一文件命名 2026-09-15 23:57:06 +08:00
jxxghp
71fffde878 feat(agent): 完善系统设置机器可读合同 2026-09-15 13:11:29 +08:00
jxxghp
37ea8ba14d fix(subscribe): support cross-source video status lookup 2026-09-15 11:31:04 +08:00
jxxghp
ee6393974a feat: 内置 Bangumi 数据与图片代理 2026-09-15 07:42:18 +08:00
jxxghp
ebddeee23b feat(subscribe): accumulate music album track progress 2026-09-14 19:35:04 +08:00
jxxghp
1cb1f02f19 fix(auth): normalize site authentication parameters 2026-09-14 13:24:14 +08:00
jxxghp
f17b331a78 fix(auth): satisfy mypy initialization settings typing 2026-09-14 08:27:15 +08:00
jxxghp
1e416882c0 fix(auth): lock configured superuser during initialization 2026-09-14 07:58:36 +08:00
Aqr-K
5e232ca14d fix(plugin): 安装记录大小写不敏感查询、游标物化,site 端点改从 Application 取 (#6682)
* fix(plugin): 安装 journal 按大小写不敏感列出事务记录

create 用 func.lower 判定同一物理插件并据此拒绝重复占位,list 却还是等值过滤。
判据分叉后,恢复流程查不到那条被 create 认定为未收尾的 journal,会认为没有待恢复
事务,而新事务又永远被同一行挡住。list 改用与 create 相同的 func.lower 判据。

* fix(plugin): 批量读插件身份时在事务内物化游标

list_by_plugin_ids 无会话调用时由组合根另开短事务,会话在 lambda 返回后立即关闭,
外层再 list() 消费惰性游标会撞上 "identity map is no longer valid",一行都读不到。
补上 .all(),让行在事务内取完。

* refactor(api): site 端点从 Application 取插件路由刷新

register_plugin_api 的唯一拥有者是 app.application.plugin.routes,
dependencies/plugin.py、scheduler/reconcile.py 与 initializers/plugins.py 都已从那里
取用,只剩 site 端点还在向 plugin 端点横向借。改为同一来源,并加门禁锁住这条判据。

依赖基线相应下降一条边(8650 -> 8649:site 不再到达 app.api.endpoints 与
app.api.endpoints.plugin,改为到达 app.application.plugin.routes),mypy 低水位同步
下降一条 attr-defined,两处文档数字随之更新。

---------

Co-authored-by: jxxghp <jxxghp@gmail.com>
2026-09-14 07:18:50 +08:00
Aqr-K
57fb96fc3c feat(plugin): 分身后缀可留空自动分配,并支持按后缀恢复已停用的分身 (#6673) 2026-09-14 07:00:31 +08:00
Aqr-K
5fd04505c1 feat(plugin): 分身彻底清理,并按包含性校验收口插件数据目录解析 (#6671) 2026-09-13 21:05:04 +08:00
Aqr-K
d44480d739 Merge pull request #6666 from Aqr-K/feat/plugin-instance-target-enablement
feat(plugin): 插件实例默认调用目标与启停,未指定实例时不再兜底取第一个
2026-09-13 16:37:27 +08:00
jxxghp
c60949ffff Merge branch 'v3' into feat/plugin-instance-config-logging 2026-09-13 14:30:42 +08:00
jxxghp
8072b7d78f Refactor application architecture and compatibility boundaries 2026-09-13 12:53:00 +08:00
Aqr-K
e47d7defe7 feat(plugin): 插件本体与分身可各自设置独立日志等级
全局日志等级是一个开关,调试单个插件时只能整体下调。一旦下调,被调试插件那几行
日志会淹没在其他几十个插件与宿主自身的 DEBUG 输出里,找不出来;不下调又什么都
看不见。插件实例数量只会继续增长,这个矛盾不会自己消失。

因此把等级下放到实例:plugininstance 行加 log_level / log_expires_at 两列,本体与
分身共用同一张表、同一套语义。等级落在实例自己那一行而不是另起一张按实例 ID 索引
的表——它和业务参数一样是用户按实例设置的东西,同一个生命周期,实例被删时应当随行
一起消失。清除覆盖后若本体行只剩一对身份列,整行按 carries_only_identity 回收,与
清空业务参数同一规则。

覆盖带失效时间,因为它是调试设置不是长期配置:开了 DEBUG 忘记关,下次谁也想不起
某个插件为什么一直在刷日志。过期判定在读取时惰性执行并就地清理,不另起后台线程去
扫一张最多几十条的表。expires_at 在写入侧先归一到 UTC 再分发给缓存与落盘两处:客户端
提交的时间可能不带时区,两处各按进程时区折算一次,就会与读取口返回的 UTC 值差出一个
时区,表现为「提交的失效时刻和读回来的对不上」。

运行期用 ContextVar 在宿主自己控制的四类调用点绑定当前实例——构造与 init_plugin、
事件处理器、定时服务回调、插件声明的 HTTP 端点——而不是沿用 logger() 已有的栈帧内省。
内省认的是栈顶的模块与类,插件通过宿主公共方法转发调用时栈顶是宿主而不是发起调用的
插件,会把日志记到错误的来源上;分身更甚:分身共享源码,类的 __qualname__ 保持源类名
不变,内省根本分不出是哪一个分身在打日志。内省结果继续只用于文件路由,不参与等级判定。

等级过滤必须排在全局等级判定之前。官方现状是先按全局等级短路、之后才做内省,先短路
就会把实例调低的等级挡在门外,后面再怎么识别来源都看不到这条日志。

回调在注册时被捕获、稍后才由调度器或 FastAPI 调用,那时已经不在任何绑定作用域内,
故这两处改用 wrap_for_plugin_instance 把绑定包进回调自身;同一实例重复包装直接返回
原对象,避免插件缓存声明时包装链随重载次数无限增长。

进程内覆盖表按实例 ID 常驻,删分身时必须一并清掉:只删库里那一行的话,同一进程内用
相同后缀重建的分身会继承上一个分身的等级,界面显示「跟随全局」而实际仍按旧等级输出。
进程重启后反向从库预热缓存。

迁移链在 F1 之后追加:c4e1a7b9d2f6(3.0.35)-> 487f7e681955(3.0.36 加两列)。

顺带补了 agent 策略里缺失的 media.classification.policy.get 的 template 字段说明:
少了它,api_mcp_schema.json 与技能文档的两个生成脚本都跑不起来。
2026-09-12 19:05:05 -04:00
jxxghp
4d4327e25a fix(site): report unauthenticated userdata refresh failures 2026-09-12 21:19:58 +08:00
jxxghp
1ba4d087c5 fix: scope subscription maintenance by media type 2026-09-12 20:56:05 +08:00