mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 19:37:36 +08:00
29 lines
501 B
Python
29 lines
501 B
Python
from __future__ import annotations
|
|
from abc import ABCMeta
|
|
|
|
import typing
|
|
import abc
|
|
|
|
from ..core import app
|
|
from . import context, events
|
|
|
|
|
|
class PluginLoader(metaclass=abc.ABCMeta):
|
|
"""插件加载器抽象类"""
|
|
|
|
ap: app.Application
|
|
|
|
plugins: list[context.RuntimeContainer]
|
|
|
|
def __init__(self, ap: app.Application):
|
|
self.ap = ap
|
|
self.plugins = []
|
|
|
|
async def initialize(self):
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
async def load_plugins(self):
|
|
pass
|
|
|