refactor: 收口 V3 分层架构与插件兼容边界

This commit is contained in:
jxxghp
2026-08-18 13:22:02 +08:00
parent cca99bd421
commit 8472bcff43
274 changed files with 10730 additions and 6130 deletions
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -4831,7 +4831,7 @@
},
"schema_version": 2,
"source": {
"head": "68340c0884c3aff4ee027c9c94ce25d096871aa5",
"head": "aa107b44a49bcaaa9f87d078fbf88da1971f722c",
"python_file_count": 231,
"repository": "MoviePilot-Plugins",
"roots": [
+256 -116
View File
@@ -151,9 +151,9 @@
"app.core.security": {
"introduced": "v3.0.0",
"is_package": false,
"owner": "application",
"replacement": "app.application.security.access",
"target": "app.application.security.access"
"owner": "sdk",
"replacement": "app.sdk.security",
"target": "app.sdk.security"
},
"app.db.agentchat_oper": {
"introduced": "v3.0.0",
@@ -510,7 +510,7 @@
"is_package": false,
"owner": "runtime",
"replacement": "app.sdk.services",
"target": "app.runtime.extensions.service_registry"
"target": "app.sdk.services"
},
"app.helper.sites": {
"introduced": "v3.0.0",
@@ -589,6 +589,13 @@
"replacement": "app.sdk.logging",
"target": "app.sdk.logging"
},
"app.runtime.extensions.service_registry": {
"introduced": "v3.0.0",
"is_package": false,
"owner": "sdk",
"replacement": "app.sdk.services",
"target": "app.sdk.services"
},
"app.utils.coalesce": {
"introduced": "v3.0.0",
"is_package": false,
@@ -1165,7 +1172,7 @@
},
{
"caller": "app.chain.transfer",
"line": 608
"line": 616
},
{
"caller": "app.db.oper.transferpending",
@@ -1277,7 +1284,7 @@
"producers": [
{
"caller": "app.agent.orchestrator",
"line": 1272
"line": 1277
}
]
},
@@ -1363,7 +1370,7 @@
"producers": [
{
"caller": "app.api.deps",
"line": 230
"line": 384
}
]
},
@@ -1385,7 +1392,7 @@
"producers": [
{
"caller": "app.chain.download",
"line": 1052
"line": 1056
}
]
},
@@ -1394,7 +1401,7 @@
"producers": [
{
"caller": "app.chain.download",
"line": 1419
"line": 1423
}
]
},
@@ -1403,11 +1410,11 @@
"producers": [
{
"caller": "app.chain.transfer",
"line": 1094
"line": 1102
},
{
"caller": "app.chain.transfer",
"line": 1110
"line": 1118
}
]
},
@@ -1416,7 +1423,7 @@
"producers": [
{
"caller": "app.chain.subscribe",
"line": 2786
"line": 2824
}
]
},
@@ -1425,11 +1432,11 @@
"producers": [
{
"caller": "app.chain.subscribe",
"line": 3524
"line": 3567
},
{
"caller": "app.chain.subscribe",
"line": 3546
"line": 3589
}
]
},
@@ -1487,7 +1494,7 @@
"producers": [
{
"caller": "app.agent.orchestrator",
"line": 865
"line": 870
}
]
},
@@ -1496,7 +1503,7 @@
"producers": [
{
"caller": "app.chain.transfer",
"line": 388
"line": 396
}
]
},
@@ -1505,7 +1512,7 @@
"producers": [
{
"caller": "app.chain.transfer",
"line": 267
"line": 275
}
]
},
@@ -1539,7 +1546,7 @@
},
{
"caller": "app.startup.agent_initializer",
"line": 91
"line": 107
}
],
"producers": []
@@ -1549,7 +1556,7 @@
"producers": [
{
"caller": "app.chain.download",
"line": 1240
"line": 1244
}
]
},
@@ -1558,7 +1565,7 @@
"producers": [
{
"caller": "app.chain.download",
"line": 2085
"line": 2089
}
]
},
@@ -1566,13 +1573,13 @@
"consumers": [
{
"caller": "app.chain.download",
"line": 2069
"line": 2073
}
],
"producers": [
{
"caller": "app.api.deps",
"line": 216
"line": 370
}
]
},
@@ -1611,11 +1618,11 @@
"producers": [
{
"caller": "app.chain._transfer",
"line": 460
"line": 464
},
{
"caller": "app.chain._transfer",
"line": 635
"line": 639
}
]
},
@@ -1648,12 +1655,7 @@
"line": 1046
}
],
"producers": [
{
"caller": "app.runtime.extensions.plugin_manager",
"line": 756
}
]
"producers": []
},
"EventType.PluginTriggered": {
"consumers": [],
@@ -1667,17 +1669,13 @@
},
{
"caller": "app.chain.subscribe",
"line": 3001
"line": 3044
}
],
"producers": [
{
"caller": "app.api.deps",
"line": 133
},
{
"caller": "app.api.endpoints.site",
"line": 199
"line": 216
}
]
},
@@ -1686,11 +1684,11 @@
"producers": [
{
"caller": "app.chain.site",
"line": 74
"line": 75
},
{
"caller": "app.chain.site",
"line": 163
"line": 164
}
]
},
@@ -1698,15 +1696,15 @@
"consumers": [
{
"caller": "app.chain.site",
"line": 586
"line": 587
},
{
"caller": "app.chain.site",
"line": 628
"line": 629
},
{
"caller": "app.chain.site",
"line": 650
"line": 651
}
],
"producers": [
@@ -1716,11 +1714,11 @@
},
{
"caller": "app.api.deps",
"line": 128
"line": 211
},
{
"caller": "app.chain.site",
"line": 566
"line": 567
}
]
},
@@ -1729,11 +1727,11 @@
"producers": [
{
"caller": "app.chain.subscribe",
"line": 996
"line": 1034
},
{
"caller": "app.chain.subscribe",
"line": 1200
"line": 1238
}
]
},
@@ -1742,7 +1740,7 @@
"producers": [
{
"caller": "app.chain.subscribe",
"line": 2824
"line": 2862
}
]
},
@@ -1755,7 +1753,7 @@
},
{
"caller": "app.api.deps",
"line": 64
"line": 87
}
]
},
@@ -1768,15 +1766,15 @@
},
{
"caller": "app.api.endpoints.subscribe",
"line": 333
"line": 296
},
{
"caller": "app.api.endpoints.subscribe",
"line": 366
"line": 329
},
{
"caller": "app.api.endpoints.subscribe",
"line": 444
"line": 389
}
]
},
@@ -1785,7 +1783,7 @@
"producers": [
{
"caller": "app.chain.transfer",
"line": 374
"line": 382
}
]
},
@@ -1794,7 +1792,7 @@
"producers": [
{
"caller": "app.chain.transfer",
"line": 253
"line": 261
}
]
},
@@ -1803,11 +1801,11 @@
"producers": [
{
"caller": "app.chain",
"line": 136
"line": 137
},
{
"caller": "app.chain",
"line": 162
"line": 163
},
{
"caller": "app.runtime.events",
@@ -1824,7 +1822,7 @@
"producers": [
{
"caller": "app.chain.transfer",
"line": 360
"line": 368
}
]
},
@@ -1833,7 +1831,7 @@
"producers": [
{
"caller": "app.chain.transfer",
"line": 239
"line": 247
}
]
},
@@ -1870,7 +1868,7 @@
]
}
},
"producer_count": 68
"producer_count": 66
},
"run_module": {
"call_count": 259,
@@ -2026,7 +2024,7 @@
"async_bangumi_info": [
{
"caller": "app.chain",
"line": 455,
"line": 456,
"mode": "async"
},
{
@@ -2076,7 +2074,7 @@
"async_douban_info": [
{
"caller": "app.chain",
"line": 392,
"line": 393,
"mode": "async"
}
],
@@ -2132,7 +2130,7 @@
"async_match_doubaninfo": [
{
"caller": "app.chain",
"line": 265,
"line": 266,
"mode": "async"
}
],
@@ -2146,7 +2144,7 @@
"async_match_tmdbinfo": [
{
"caller": "app.chain",
"line": 307,
"line": 308,
"mode": "async"
}
],
@@ -2189,7 +2187,7 @@
"async_obtain_images": [
{
"caller": "app.chain",
"line": 329,
"line": 330,
"mode": "async"
}
],
@@ -2213,42 +2211,42 @@
"async_refresh_torrents": [
{
"caller": "app.chain",
"line": 687,
"line": 688,
"mode": "async"
}
],
"async_search_collections": [
{
"caller": "app.chain",
"line": 561,
"line": 562,
"mode": "async"
}
],
"async_search_medias": [
{
"caller": "app.chain",
"line": 509,
"line": 510,
"mode": "async"
}
],
"async_search_persons": [
{
"caller": "app.chain",
"line": 535,
"line": 536,
"mode": "async"
}
],
"async_search_subtitles": [
{
"caller": "app.chain",
"line": 645,
"line": 646,
"mode": "async"
}
],
"async_search_torrents": [
{
"caller": "app.chain",
"line": 628,
"line": 629,
"mode": "async"
}
],
@@ -2293,7 +2291,7 @@
"async_tmdb_info": [
{
"caller": "app.chain",
"line": 437,
"line": 438,
"mode": "async"
}
],
@@ -2451,7 +2449,7 @@
"bangumi_info": [
{
"caller": "app.chain",
"line": 447,
"line": 448,
"mode": "sync"
},
{
@@ -2491,7 +2489,7 @@
"clear_cache": [
{
"caller": "app.chain",
"line": 1043,
"line": 1044,
"mode": "sync"
}
],
@@ -2526,7 +2524,7 @@
"douban_info": [
{
"caller": "app.chain",
"line": 372,
"line": 373,
"mode": "sync"
}
],
@@ -2575,14 +2573,14 @@
"download": [
{
"caller": "app.chain",
"line": 732,
"line": 733,
"mode": "sync"
}
],
"download_added": [
{
"caller": "app.chain",
"line": 756,
"line": 757,
"mode": "sync"
}
],
@@ -2781,7 +2779,7 @@
"filter_torrents": [
{
"caller": "app.chain",
"line": 704,
"line": 705,
"mode": "sync"
}
],
@@ -2816,14 +2814,14 @@
"get_search_page_size": [
{
"caller": "app.chain",
"line": 573,
"line": 574,
"mode": "sync"
}
],
"get_torrent_trackers": [
{
"caller": "app.chain",
"line": 950,
"line": 951,
"mode": "sync"
}
],
@@ -2844,14 +2842,14 @@
"list_torrents": [
{
"caller": "app.chain",
"line": 778,
"line": 779,
"mode": "sync"
}
],
"load_category_config": [
{
"caller": "app.chain",
"line": 1019,
"line": 1020,
"mode": "sync"
}
],
@@ -2872,7 +2870,7 @@
"match_doubaninfo": [
{
"caller": "app.chain",
"line": 237,
"line": 238,
"mode": "sync"
}
],
@@ -2886,28 +2884,28 @@
"match_tmdbinfo": [
{
"caller": "app.chain",
"line": 289,
"line": 290,
"mode": "sync"
}
],
"media_category": [
{
"caller": "app.chain",
"line": 1013,
"line": 1014,
"mode": "sync"
}
],
"media_exists": [
{
"caller": "app.chain",
"line": 980,
"line": 981,
"mode": "sync"
}
],
"media_files": [
{
"caller": "app.chain",
"line": 990,
"line": 991,
"mode": "sync"
}
],
@@ -3003,14 +3001,14 @@
"message_parser": [
{
"caller": "app.chain",
"line": 471,
"line": 472,
"mode": "sync"
}
],
"metadata_img": [
{
"caller": "app.chain",
"line": 1004,
"line": 1005,
"mode": "sync"
}
],
@@ -3164,14 +3162,14 @@
"obtain_images": [
{
"caller": "app.chain",
"line": 319,
"line": 320,
"mode": "sync"
}
],
"obtain_specific_image": [
{
"caller": "app.chain",
"line": 349,
"line": 350,
"mode": "sync"
}
],
@@ -3195,40 +3193,40 @@
"recommend_name": [
{
"caller": "app.chain._transfer",
"line": 668,
"line": 672,
"mode": "sync"
},
{
"caller": "app.chain._transfer",
"line": 675,
"line": 679,
"mode": "sync"
}
],
"refresh_torrents": [
{
"caller": "app.chain",
"line": 666,
"line": 667,
"mode": "sync"
}
],
"refresh_userdata": [
{
"caller": "app.chain.site",
"line": 68,
"line": 69,
"mode": "sync"
}
],
"register_commands": [
{
"caller": "app.chain",
"line": 1031,
"line": 1032,
"mode": "sync"
}
],
"remove_torrents": [
{
"caller": "app.chain",
"line": 860,
"line": 861,
"mode": "sync"
}
],
@@ -3242,28 +3240,28 @@
"save_category_config": [
{
"caller": "app.chain",
"line": 1025,
"line": 1026,
"mode": "sync"
}
],
"scheduler_job": [
{
"caller": "app.chain",
"line": 1037,
"line": 1038,
"mode": "sync"
}
],
"search_collections": [
{
"caller": "app.chain",
"line": 548,
"line": 549,
"mode": "sync"
}
],
"search_medias": [
{
"caller": "app.chain",
"line": 496,
"line": 497,
"mode": "sync"
}
],
@@ -3292,21 +3290,21 @@
"search_persons": [
{
"caller": "app.chain",
"line": 522,
"line": 523,
"mode": "sync"
}
],
"search_subtitles": [
{
"caller": "app.chain",
"line": 609,
"line": 610,
"mode": "sync"
}
],
"search_torrents": [
{
"caller": "app.chain",
"line": 592,
"line": 593,
"mode": "sync"
}
],
@@ -3327,14 +3325,14 @@
"set_torrents_tag": [
{
"caller": "app.chain",
"line": 899,
"line": 900,
"mode": "sync"
}
],
"site_subtitle_links": [
{
"caller": "app.chain.download",
"line": 567,
"line": 571,
"mode": "sync"
}
],
@@ -3348,14 +3346,14 @@
"start_torrents": [
{
"caller": "app.chain",
"line": 876,
"line": 877,
"mode": "sync"
}
],
"stop_torrents": [
{
"caller": "app.chain",
"line": 887,
"line": 888,
"mode": "sync"
}
],
@@ -3404,7 +3402,7 @@
"tmdb_episodes": [
{
"caller": "app.chain._transfer",
"line": 661,
"line": 665,
"mode": "sync"
},
{
@@ -3423,7 +3421,7 @@
"tmdb_info": [
{
"caller": "app.chain",
"line": 425,
"line": 426,
"mode": "sync"
}
],
@@ -3500,21 +3498,21 @@
"torrent_files": [
{
"caller": "app.chain",
"line": 965,
"line": 966,
"mode": "sync"
}
],
"transfer": [
{
"caller": "app.chain",
"line": 821,
"line": 822,
"mode": "sync"
}
],
"transfer_completed": [
{
"caller": "app.chain",
"line": 845,
"line": 846,
"mode": "sync"
}
],
@@ -3549,14 +3547,14 @@
"tvdb_info": [
{
"caller": "app.chain",
"line": 405,
"line": 406,
"mode": "sync"
}
],
"tvdb_slug": [
{
"caller": "app.chain",
"line": 413,
"line": 414,
"mode": "sync"
}
],
@@ -3570,7 +3568,7 @@
"update_torrent": [
{
"caller": "app.chain",
"line": 926,
"line": 927,
"mode": "sync"
}
],
@@ -3591,7 +3589,7 @@
"webhook_parser": [
{
"caller": "app.chain",
"line": 485,
"line": 486,
"mode": "sync"
}
]
@@ -3976,6 +3974,148 @@
"target": "app.runtime.extensions.plugin_manager.PluginManager"
}
],
"app.sdk.security": [
{
"kind": "import",
"name": "ALGORITHM",
"target": "app.application.security.token.ALGORITHM"
},
{
"kind": "import",
"name": "BCRYPT_PASSWORD_MAX_BYTES",
"target": "app.application.security.token.BCRYPT_PASSWORD_MAX_BYTES"
},
{
"kind": "import",
"name": "BCRYPT_ROUNDS",
"target": "app.application.security.token.BCRYPT_ROUNDS"
},
{
"kind": "import",
"name": "PasswordTooLongError",
"target": "app.application.security.token.PasswordTooLongError"
},
{
"kind": "import",
"name": "TokenValidationError",
"target": "app.application.security.token.TokenValidationError"
},
{
"kind": "import",
"name": "aes_decrypt",
"target": "app.application.security.token.aes_decrypt"
},
{
"kind": "import",
"name": "aes_encrypt",
"target": "app.application.security.token.aes_encrypt"
},
{
"kind": "import",
"name": "anthropic_api_key_header",
"target": "app.adapters.web.security.access.anthropic_api_key_header"
},
{
"kind": "import",
"name": "api_key_header",
"target": "app.adapters.web.security.access.api_key_header"
},
{
"kind": "import",
"name": "api_key_query",
"target": "app.adapters.web.security.access.api_key_query"
},
{
"kind": "import",
"name": "api_token_query",
"target": "app.adapters.web.security.access.api_token_query"
},
{
"kind": "import",
"name": "create_access_token",
"target": "app.application.security.token.create_access_token"
},
{
"kind": "import",
"name": "decode_access_token",
"target": "app.application.security.token.decode_access_token"
},
{
"kind": "import",
"name": "decrypt",
"target": "app.application.security.token.decrypt"
},
{
"kind": "import",
"name": "encrypt_message",
"target": "app.application.security.token.encrypt_message"
},
{
"kind": "import",
"name": "get_password_hash",
"target": "app.application.security.token.get_password_hash"
},
{
"kind": "import",
"name": "hash_sha256",
"target": "app.application.security.token.hash_sha256"
},
{
"kind": "import",
"name": "nexusphp_encrypt",
"target": "app.application.security.token.nexusphp_encrypt"
},
{
"kind": "import",
"name": "oauth2_scheme_manual_error",
"target": "app.adapters.web.security.access.oauth2_scheme_manual_error"
},
{
"kind": "import",
"name": "openai_bearer_scheme",
"target": "app.adapters.web.security.access.openai_bearer_scheme"
},
{
"kind": "import",
"name": "resource_token_cookie",
"target": "app.adapters.web.security.access.resource_token_cookie"
},
{
"kind": "import",
"name": "set_or_refresh_resource_token_cookie",
"target": "app.adapters.web.security.access.set_or_refresh_resource_token_cookie"
},
{
"kind": "import",
"name": "set_superuser_token_payload_provider",
"target": "app.adapters.web.security.access.set_superuser_token_payload_provider"
},
{
"kind": "import",
"name": "verify_apikey",
"target": "app.adapters.web.security.access.verify_apikey"
},
{
"kind": "import",
"name": "verify_apitoken",
"target": "app.adapters.web.security.access.verify_apitoken"
},
{
"kind": "import",
"name": "verify_password",
"target": "app.application.security.token.verify_password"
},
{
"kind": "import",
"name": "verify_resource_token",
"target": "app.adapters.web.security.access.verify_resource_token"
},
{
"kind": "import",
"name": "verify_token",
"target": "app.adapters.web.security.access.verify_token"
}
],
"app.sdk.services": [
{
"kind": "import",
@@ -4010,12 +4150,12 @@
{
"kind": "import",
"name": "ServiceBaseHelper",
"target": "app.runtime.extensions.service_registry.ServiceBaseHelper"
"target": "app.application.service.ServiceBaseHelper"
},
{
"kind": "import",
"name": "ServiceConfigHelper",
"target": "app.runtime.extensions.service_registry.ServiceConfigHelper"
"target": "app.runtime.extensions.service_config.ServiceConfigHelper"
},
{
"kind": "import",