feat: pre-cache all the plugin manifests before checking updates

This commit is contained in:
Stream
2026-02-04 18:47:47 +08:00
parent 468990cc39
commit d90ad09e7b
4 changed files with 45 additions and 14 deletions

View File

@ -1,4 +1,4 @@
from pydantic import BaseModel, Field, model_validator
from pydantic import BaseModel, Field, computed_field, model_validator
from core.model_runtime.entities.provider_entities import ProviderEntity
from core.plugin.entities.endpoint import EndpointProviderDeclaration
@ -48,3 +48,16 @@ class MarketplacePluginDeclaration(BaseModel):
if "tool" in data and not data["tool"]:
del data["tool"]
return data
class MarketplacePluginSnapshot(BaseModel):
org: str
name: str
latest_version: str
latest_package_identifier: str
latest_package_url: str
@computed_field
@property
def plugin_id(self) -> str:
return self.latest_package_identifier.split(":")[0]