refactor: type storage value contracts

This commit is contained in:
jxxghp
2026-08-24 01:35:42 +08:00
parent e359bbace9
commit bb80c10a0b
3 changed files with 67 additions and 23 deletions
+48 -23
View File
@@ -2476,16 +2476,19 @@
"version": 1
},
"any_files": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "storage",
"input_contract": "StorageKeywordArguments",
"input_contract": "StorageAnyFilesRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "StorageProviderResult",
"result_shape": "any",
"required_parameters": [
"extensions",
"fileitem"
],
"result_contract": "bool | None",
"result_shape": "boolean",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
@@ -3576,15 +3579,18 @@
"version": 1
},
"create_folder": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "storage",
"input_contract": "StorageKeywordArguments",
"input_contract": "StorageCreateFolderRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "StorageProviderResult",
"required_parameters": [
"fileitem",
"name"
],
"result_contract": "FileItem | None",
"result_shape": "any",
"supports_async": true,
"supports_sync": true,
@@ -3592,16 +3598,18 @@
"version": 1
},
"delete_file": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "storage",
"input_contract": "StorageKeywordArguments",
"input_contract": "StorageDeleteRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "StorageProviderResult",
"result_shape": "any",
"required_parameters": [
"fileitem"
],
"result_contract": "bool | None",
"result_shape": "boolean",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
@@ -4405,16 +4413,18 @@
"version": 1
},
"media_files": {
"aggregation": "legacy",
"aggregation": "ordered_list_merge",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "storage",
"input_contract": "StorageKeywordArguments",
"input_contract": "MediaFilesRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "StorageProviderResult",
"result_shape": "any",
"required_parameters": [
"mediainfo"
],
"result_contract": "list[FileItem]",
"result_shape": "list",
"supports_async": true,
"supports_sync": true,
"timeout_policy": "caller_budget",
@@ -5707,15 +5717,30 @@
"version": 1
},
"transfer": {
"aggregation": "legacy",
"aggregation": "first_non_empty",
"error_policy": "isolate_provider",
"execution": "sync_or_async",
"family": "storage",
"input_contract": "StorageKeywordArguments",
"input_contract": "TransferRequest",
"plugin_short_circuit": true,
"public_to_plugins": true,
"required_parameters": [],
"result_contract": "StorageProviderResult",
"required_parameters": [
"episodes_info",
"fileitem",
"library_category_folder",
"library_type_folder",
"mediainfo",
"meta",
"preview",
"scrape",
"source_oper",
"target_directory",
"target_oper",
"target_path",
"target_storage",
"transfer_type"
],
"result_contract": "TransferInfo | None",
"result_shape": "any",
"supports_async": true,
"supports_sync": true,