freeman
542f893123
fix(plugins): 启动时自愈被旧版本实现遮蔽的插件安装包根 ( #6718 )
2026-09-17 15:57:48 +08:00
jxxghp
0afc5e2349
fix(architecture): 同步模块迁移门禁引用
2026-09-16 07:01:10 +08:00
jxxghp
b99b4fe2c3
chore(architecture): 同步模块路径与质量门禁
2026-09-16 00:12:16 +08:00
Aqr-K
61aa3cd649
refactor(sdk): 插件契约基类迁入 SDK 并由 Compat 承接旧包根符号 ( #6701 )
2026-09-15 07:01:00 +08:00
Aqr-K
6ea1cc9433
fix(plugin): 插件降级重装时拒绝迁移树不认识的库 revision ( #6681 )
2026-09-14 07:01:32 +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
Aqr-K
3d594ecee3
refactor(plugin): 插件配置改走独立通道,SystemConfig 不再按键值分支
...
插件配置此前借用 systemconfig 的 plugin.<实例ID> 单键,为了换表又在
SystemConfigOper 的 set/delete/load_snapshot 里按该前缀开分支。这是反向依赖:
一个对所有键一视同仁的通用键值存储被迫知道「插件」这个概念,读写路径依键值而
异,「这个键落在哪张表」只有读代码才说得清;规范方法按值加特例,也让此后任何新
键都要先确认自己会不会被拦截。
本次把插件配置整条链拆出,形状与本分支日志等级那条链一致:
- SystemConfigOper 整体回退到官方实现,与 f70d7c141 逐字节相同,对所有键一视同仁。
- 配置端口改按实例 ID 寻址:PluginStorage 新增 read_config / write_config /
async_write_config / delete_config,PluginConfigStore 去掉 key_prefix 与 _key,
不再有任何字符串键经过;plugin_exists 存在性规则、空键过滤与 force 语义不变。
- PluginInstanceOper 补齐读取与异步写入原语 get_config_data /
async_save_config_data,同步与异步共用同一份落库决策,避免两条路径对「值未变化
不写」和「建行用哪个源插件」各自分叉。
- _PluginBase 的 get_config / update_config 直连 PluginInstanceOper,方法名、签名、
返回与 docstring 不变;self.systemconfig 保留,插件读 SystemConfigKey 枚举值仍
然合法,插件公开面没有扩大。
插件直接用 SystemConfig 存取自身配置不予支持。它本就不是封装过的插件配置通道,
为它设计兼容或加守卫拦截,等于再把「插件」塞回通用存储里——那正是本次要拆掉的东
西。拆开后 plugin.<ID> 只是一个与插件无关的普通 systemconfig 键:迁移已经把旧的
plugin.* 行搬进插件实例表,读它拿到 None,写它会新增一条谁也不读的 systemconfig
记录,插件配置通道既不读也不写它,两边不会再有任何交叉。
代价是读取从内存快照变成一次按实例 ID 的主键查询。调用点都不在热路径上:宿主侧
只有插件启动/重载、配置表单接口与分身创建三处,插件侧 get_config() 惯例在
init_plugin 里取一次。写入侧没有变化,本来就是一次事务。
回归防线:新增用例断言 SystemConfigOper 对 plugin. 前缀没有任何特殊行为——写进去
就是一行普通 systemconfig 记录,读出来就是刚写的值,不会被路由到插件实例表。
兼容层零改动,三个 alembic 迁移一行未改。
2026-09-13 01:41:57 -04:00
Aqr-K
4dbb8b8204
feat(plugin): 插件配置与实例描述符迁入独立表
...
插件配置此前寄存在 systemconfig 的 plugin.<实例ID> 单键下,实例描述符则整份挤在
PluginInstances 这一个 JSON 键里,两者都不成立:
- plugin.<ID> 是裸字符串 key,而仓库规则本身禁止用裸字符串做 SystemConfig key,
只允许先定义 SystemConfigKey 枚举项;插件 ID 由用户安装决定,永远枚举不出常量。
条目数随安装量增长,混在系统设置表里会把主程序自己的设置项淹掉。
- 那个键存的其实是实例 ID,表里没有任何一列说得出它属于哪个插件,想列出某个插件
的全部实例配置只能靠字符串前缀去猜。
- 实例描述符整份读出再整份写回,改一个分身要重写全部分身。
改为 plugininstance 一实例一行:instance_id 与 source_plugin_id 构成身份,本体与
分身由两者是否相等派生而不设模式列——模式列会是这个等式的冗余副本,两者一旦失步
同一行就会在不同读取口被判成不同角色。展示信息与业务参数同存一行,属于同一个
生命周期,分表只会让建分身、删分身退化成两张表之间的协调问题。
读写路由落在 SystemConfigOper.get/set/delete,而不是在各个调用方各改一处:第三方
插件可能直接用 self.systemconfig.get("plugin.xxx") 读写自己的配置,只改
PluginConfigStore 与 _PluginBase.get_config/update_config 必然漏掉它们。路由只做
前缀识别,插入、更新与空本体行回收都委托 PluginInstanceOper,不在配置层重抄一遍。
PluginInstances 旧键迁移后不删,留作回滚依据,并以
SystemConfigKey.PluginInstancesImported 标志防止重复导入;判据不能是「表当前为空」,
否则用户把分身全部删光后,下次启动会把它们整批导回来。
迁移链:b2d4f6a8c1e3 -> 281965691a20(3.0.34 建表并搬描述符)
-> c4e1a7b9d2f6(3.0.35 加 config_data 并搬 plugin.* 配置)。
依赖基线与启动模块数随两个新模块重算,架构文档与数据库技能表目录同步登记新表。
2026-09-12 17:39:36 -04:00
jxxghp
66d288ffc2
feat(agent): isolate terminal task ownership
2026-09-11 03:12:16 +08:00
jxxghp
20d1aa2b49
feat(agent): align terminal shell and input control semantics
2026-09-10 11:00:24 +08:00
jxxghp
21e154d6d2
feat(agent): deliver browser screenshots as model-visible images
2026-09-10 02:17:01 +08:00
jxxghp
53f7012b6b
feat(music): add AMLL TTML lyrics source
2026-09-09 23:53:30 +08:00
jxxghp
17eaf47c34
refactor(music)!: remove Musixmatch and expose lyrics plugin types
...
BREAKING CHANGE: remove the Musixmatch module and settings without migration. Lyrics providers can use the public music candidate SDK and existing plugin module hook.
2026-09-09 23:04:20 +08:00
InfinityPacer
99c6e0ba6e
docs(workflow): distinguish contributor and maintainer execution ( #6633 )
2026-09-09 21:46:46 +08:00
jxxghp
5fa5b414aa
feat(agent): harden tool outcomes, recovery and discovery
2026-09-09 19:55:21 +08:00
jxxghp
c0ed78e168
feat(agent): strengthen planning, tool discovery and recovery
2026-09-09 19:37:11 +08:00
jxxghp
022dd006a5
fix(transfer): allow manual reorganization after stale task failures
...
Refs #6625
2026-09-09 17:53:24 +08:00
InfinityPacer
b6fe6998eb
refactor(url): centralize HTTP URL validation in UrlUtils
2026-09-09 17:30:03 +08:00
jxxghp
5a214afc19
fix(subscribe): keep scheduled searches progressing across site retries
2026-09-09 16:45:42 +08:00
jxxghp
9e1c25124b
fix(transfer): restore regression and architecture gates
2026-09-09 13:40:35 +08:00
jxxghp
a69c9073cb
feat(transfer): implement recovery commands for discarding corrupt tasks
2026-09-08 23:15:38 +08:00
yanjunpu
83a0e21035
Merge remote-tracking branch 'origin/v3' into codex/manual-source-classification
2026-09-08 22:10:15 +08:00
jxxghp
f9f2601144
fix(transfer): deduplicate recovery failures and system alerts
2026-09-08 14:28:40 +08:00
yanjunpu
78b678a5df
fix(classification): add safe music category defaults
2026-09-08 02:24:49 +08:00
jxxghp
7ccb1d9dee
feat(classification): provide source-aware condition dictionaries
2026-09-07 23:21:25 +08:00
jxxghp
44c41ec476
fix(config): separate auto-update and dev tracking settings for clarity
2026-09-07 13:35:52 +08:00
jxxghp
d5605bb0a1
fix(scheduler): gate release update checks
2026-09-06 21:50:40 +08:00
jxxghp
fba0b6ae67
refactor: 统一音乐与影视的识别搜索匹配流程
2026-09-06 00:48:00 +08:00
jxxghp
71147c1d96
feat(classification): support multi-source media rules
2026-09-03 11:51:18 +08:00
Aqr-K
862ed4d5b8
fix(plugin): 插件 schema 不再回落 public,迁移目录拒绝相对路径
...
PostgreSQL 下 search_path 留了 public 兜底,插件 schema 里不存在的表名会继续
解析到宿主同名表,一条未限定的 DELETE 就能改到宿主数据;解析根收敛为插件自己的
schema,找不到的表名直接报错。
get_database_migrations() 的合同要求绝对路径,此前只校验目录是否存在,相对路径
会按宿主进程的当前工作目录解析成另一条迁移链,改为直接拒绝。
2026-09-02 02:38:18 -04:00
Aqr-K
a4d38e0f12
fix(plugin): 卸载先停后删、销毁全程持锁,PostgreSQL 会话按插件 schema 解析原生 SQL
...
卸载编排改为先停插件再删数据:插件的停机钩子取一次自有库句柄就能把刚删除的数据重新
建出来,注册表因此不再需要销毁墓碑,release 恢复为「只释放连接、保留数据」的单一语义。
停止同时注销插件类,其后的删除一律按 force 执行。
destroy_database 的摘句柄、关连接与删载体全部收进同一把锁:原先在锁外删除载体,并发的
get_database 能在间隙注册一个指向同一载体的新句柄,随后的删除会把它一并抹掉。
PostgreSQL 句柄在派生引擎上注册 begin 监听器,按事务执行 SET LOCAL search_path,让
schema_translate_map 覆盖不到的原生 SQL 同样解析到插件自己的 schema;监听器只挂在
OptionEngine 上,宿主引擎与其它插件的连接不受影响。
2026-09-02 02:14:19 -04:00
Aqr-K
d7c5955031
fix(plugin): 插件自有数据库释放与销毁全程容错,并修正建表去重与 schema 命名
...
release/destroy 统一经 _close_handle 先清线程局部会话再 dispose,两步失败都
只记日志:单个插件的连接池故障不再让 close_database 跳过宿主同步与异步引擎的
释放,release_all_databases 也逐插件隔离。按模型建表对 __table__ 去重,单表
继承的父子类一并声明时不再对同一张表建两次。
卸载编排先删插件数据、后停插件,停机钩子里的 get_database() 会把刚销毁的库
重新建出来:注册表记下已销毁的插件标识,其后的 release 改为再次销毁并清除
标记,ensure 则撤销标记,宿主编排代码不动。PostgreSQL schema 名在归一改写过
标识或超长时追加插件标识哈希并截到 63 字节,My-Plugin、My_Plugin 与
my_plugin 不再折叠到同一个 schema 而在卸载时互相 DROP。
start 的失败分支释放已经建立、却进不了运行态的句柄,整体停止把只登记在
_classes 里的插件一并释放。声明的迁移目录不存在时在建句柄之前抛
FileNotFoundError,不再留下空库;SQLite 迁移 URL 改由引擎渲染;
_get_sqlite_engine 的连接参数下沉到实际使用它的异步分支。
2026-09-02 02:14:19 -04:00
Aqr-K
626d8217ba
feat(plugin): 开放插件自有数据库声明与句柄接口
...
_PluginBase 新增 get_database_models()/get_database_migrations() 声明钩子
与 get_database() 句柄入口,按类名(含分身)解析插件标识;
app/sdk/database.py 导出 plugin_declarative_base 与 PluginDatabaseHandle。
docs/rules/10-data-and-persistent.md 补充 Plugin-Owned Databases 小节,
说明 db_query/db_update 的自动兜底仍绑定宿主会话、需显式传入插件会话。
2026-09-02 02:14:19 -04:00
jxxghp
ef0f4f7ef4
feat(agent): improve Windows shell compatibility
2026-09-01 17:51:15 +08:00
jxxghp
6d4d7331d1
refactor: complete agent skill API contracts
2026-09-01 01:19:45 +08:00
jxxghp
fdba2c7d64
refactor(agent): unify tools behind API gateway and provider skills
2026-08-31 16:57:54 +08:00
jxxghp
046b0b3051
refactor(startup): centralize doh and workflow services
2026-08-30 12:22:18 +08:00
jxxghp
918baf2b69
refactor(startup): centralize resource composition
2026-08-30 12:19:30 +08:00
jxxghp
d50177f45d
refactor(system): 收口系统 API 业务职责
2026-08-30 12:16:54 +08:00
jxxghp
e56d65efbc
refactor(startup): centralize cache composition
2026-08-30 12:13:10 +08:00
jxxghp
a350bae0d0
refactor(plugin): share runtime dependency owners
2026-08-30 12:12:01 +08:00
jxxghp
26a3b1cda4
refactor(startup): centralize chain external ports
2026-08-30 12:07:04 +08:00
jxxghp
f448a7b003
refactor(startup): centralize site access composition
2026-08-30 12:02:49 +08:00
jxxghp
ed94eeda92
refactor(startup): centralize chain network composition
2026-08-30 12:00:43 +08:00
jxxghp
2a7f8551b1
refactor(startup): move domain assembly to composition
2026-08-30 11:52:59 +08:00
jxxghp
f7ca7e5172
ci(architecture): close complexity and concurrency blind spots
2026-08-30 11:40:36 +08:00
jxxghp
0c05956814
refactor(architecture): enforce module naming policy
2026-08-29 22:17:17 +08:00
jxxghp
fb5d7fc593
refactor(torrent): group application capability
2026-08-29 21:28:18 +08:00
jxxghp
2116ccecf9
refactor(startup): enforce symmetric lifecycle cleanup
2026-08-29 18:59:14 +08:00
jxxghp
32cdcfcc2f
refactor(startup): centralize runtime composition
2026-08-29 18:41:31 +08:00