Spaces:
Sleeping
Sleeping
File size: 565 Bytes
0f336cf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | from typing import Any, Dict, List
from database.db import DatabaseManager
from schemas.models import RegisterPluginRequest
class PluginManager:
"""Dynamic Plugin Registry for Colony Extensions."""
def __init__(self, db: DatabaseManager):
self.db = db
async def register_plugin(self, req: RegisterPluginRequest) -> str:
return await self.db.save_plugin(req.name, req.version, req.description, req.entry_point, req.permissions)
async def list_plugins(self) -> List[Dict[str, Any]]:
return await self.db.get_all_plugins()
|