refactor: unify anilist module contracts

This commit is contained in:
jxxghp
2026-08-24 01:45:49 +08:00
parent 903d1d3c4d
commit 488b3667bb
3 changed files with 159 additions and 76 deletions
+120 -76
View File
@@ -2348,79 +2348,91 @@
},
"module_method_specs": {
"anilist_credits": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListMediaPageRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"required_parameters": [
"anilist_id",
"count",
"page"
],
"result_contract": "list[MediaPerson]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
"version": 1
},
"anilist_discover": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListDiscoverArguments",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"result_contract": "list[MediaInfo]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
"version": 1
},
"anilist_info": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListMediaRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"required_parameters": [
"anilist_id"
],
"result_contract": "dict | None",
"result_shape": "mapping",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
"version": 1
},
"anilist_person_credits": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListPersonPageRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"required_parameters": [
"count",
"page",
"person_id"
],
"result_contract": "list[MediaInfo]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
"version": 1
},
"anilist_person_detail": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListPersonRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"required_parameters": [
"person_id"
],
"result_contract": "MediaPerson | None",
"result_shape": "any",
"supports_async": true,
"supports_sync": true,
@@ -2428,48 +2440,58 @@
"version": 1
},
"anilist_popular_this_season": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListPageRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"required_parameters": [
"count",
"page"
],
"result_contract": "list[MediaInfo]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
"version": 1
},
"anilist_recommendations": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListMediaPageRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"required_parameters": [
"anilist_id",
"count",
"page"
],
"result_contract": "list[MediaInfo]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
"version": 1
},
"anilist_trending": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListPageRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"required_parameters": [
"count",
"page"
],
"result_contract": "list[MediaInfo]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
@@ -2495,79 +2517,91 @@
"version": 1
},
"async_anilist_credits": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListMediaPageRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"required_parameters": [
"anilist_id",
"count",
"page"
],
"result_contract": "list[MediaPerson]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
"version": 1
},
"async_anilist_discover": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListDiscoverArguments",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"result_contract": "list[MediaInfo]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
"version": 1
},
"async_anilist_info": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListMediaRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"required_parameters": [
"anilist_id"
],
"result_contract": "dict | None",
"result_shape": "mapping",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
"version": 1
},
"async_anilist_person_credits": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListPersonPageRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"required_parameters": [
"count",
"page",
"person_id"
],
"result_contract": "list[MediaInfo]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
"version": 1
},
"async_anilist_person_detail": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListPersonRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"required_parameters": [
"person_id"
],
"result_contract": "MediaPerson | None",
"result_shape": "any",
"supports_async": true,
"supports_sync": true,
@@ -2575,48 +2609,58 @@
"version": 1
},
"async_anilist_popular_this_season": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListPageRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"required_parameters": [
"count",
"page"
],
"result_contract": "list[MediaInfo]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
"version": 1
},
"async_anilist_recommendations": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListMediaPageRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"required_parameters": [
"anilist_id",
"count",
"page"
],
"result_contract": "list[MediaInfo]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
"version": 1
},
"async_anilist_trending": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "anilist",
"input_contract": "AniListKeywordArguments",
"input_contract": "AniListPageRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "AniListProviderResult",
"result_shape": "any",
"required_parameters": [
"count",
"page"
],
"result_contract": "list[MediaInfo]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",