feat: Core Plugin system — is_core flag, topological sort dependency resolution, deactivation protection
This commit is contained in:
+2
-1
@@ -112,7 +112,7 @@ async def lifespan(app: FastAPI):
|
||||
async_session = async_sessionmaker(get_engine(), expire_on_commit=False)
|
||||
|
||||
async with async_session() as db:
|
||||
for name in registry._plugins:
|
||||
for name in registry.resolve_load_order():
|
||||
plugin = registry.get_plugin(name)
|
||||
if plugin is None:
|
||||
continue
|
||||
@@ -131,6 +131,7 @@ async def lifespan(app: FastAPI):
|
||||
version=plugin.manifest.version,
|
||||
status="installed",
|
||||
active=True,
|
||||
is_core=plugin.manifest.is_core,
|
||||
)
|
||||
db.add(plugin_record)
|
||||
await db.flush()
|
||||
|
||||
Reference in New Issue
Block a user