- Added plugin base and loader for backend extensibility - Implemented application settings management with config persistence - Created Svelte-based frontend with Dashboard and Settings pages - Added API routes for plugins, tasks, and settings - Updated documentation and specifications - Improved project structure and developer tools
22 lines
738 B
Python
Executable File
22 lines
738 B
Python
Executable File
# [DEF:PluginsRouter:Module]
|
|
# @SEMANTICS: api, router, plugins, list
|
|
# @PURPOSE: Defines the FastAPI router for plugin-related endpoints, allowing clients to list available plugins.
|
|
# @LAYER: UI (API)
|
|
# @RELATION: Depends on the PluginLoader and PluginConfig. It is included by the main app.
|
|
from typing import List
|
|
from fastapi import APIRouter, Depends
|
|
|
|
from ...core.plugin_base import PluginConfig
|
|
from ...dependencies import get_plugin_loader
|
|
|
|
router = APIRouter()
|
|
|
|
@router.get("/", response_model=List[PluginConfig])
|
|
async def list_plugins(
|
|
plugin_loader = Depends(get_plugin_loader)
|
|
):
|
|
"""
|
|
Retrieve a list of all available plugins.
|
|
"""
|
|
return plugin_loader.get_all_plugin_configs()
|
|
# [/DEF] |