feat(M5): Plugin-MiniApps — dms, mail, wiki, graph_rag, automation (#363)
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
- 5 Manifest-Beiträge (MiniAppContribution): dms_folders (dms:read), mail_unread (mail:read), wiki_recent (wiki:read), graph_overview (graph:read), automation_status (automation:read) — je settings_schema max_items, order 60-100 - 5 Frontend-Widgets auf bestehenden API-Clients (keine neuen Backend-Endpoints): DmsFoldersWidget, MailUnreadWidget, WikiRecentWidget, GraphOverviewWidget, AutomationStatusWidget - MiniAppHost-Registry +5; tsc clean, build OK - Tests: M5 7/7 (TDD rot->gruen), Backend-Regression 53/53, Vitest 22/22
This commit is contained in:
@@ -19,6 +19,7 @@ from app.plugins.manifest import (
|
||||
FrontendMenuItem,
|
||||
FrontendPageRoute,
|
||||
FrontendSettingsPage,
|
||||
MiniAppContribution,
|
||||
PluginManifest,
|
||||
PluginRouteDef,
|
||||
)
|
||||
@@ -63,6 +64,25 @@ class AutomationPlugin(BasePlugin):
|
||||
"workflow.timeout",
|
||||
],
|
||||
migrations=["0001_initial.sql", "0002_agent_subtasks.sql", "0003_skill_definitions.sql", "0004_run_steps_phase_f.sql"],
|
||||
miniapps=[
|
||||
MiniAppContribution(
|
||||
app_id="automation_status",
|
||||
name="Automationen",
|
||||
icon="Workflow",
|
||||
description="Aktive und inaktive Automations-Definitionen auf einen Blick.",
|
||||
permission="automation:read",
|
||||
settings_schema={
|
||||
"fields": [
|
||||
{"name": "max_items", "label": "Max. Einträge", "type": "number", "default": 6},
|
||||
]
|
||||
},
|
||||
col_span=2,
|
||||
row_span=1,
|
||||
hosts=["chat", "dashboard", "window"],
|
||||
component="@/components/dashboard/AutomationStatusWidget",
|
||||
order=100,
|
||||
),
|
||||
],
|
||||
permissions=[
|
||||
"automation:read",
|
||||
"automation:write",
|
||||
|
||||
@@ -6,6 +6,7 @@ from app.plugins.base import BasePlugin
|
||||
from app.plugins.manifest import (
|
||||
FrontendMenuItem,
|
||||
FrontendPageRoute,
|
||||
MiniAppContribution,
|
||||
PluginManifest,
|
||||
PluginRouteDef,
|
||||
)
|
||||
@@ -29,6 +30,25 @@ class DmsPlugin(BasePlugin):
|
||||
],
|
||||
events=[],
|
||||
migrations=["0001_initial.sql"],
|
||||
miniapps=[
|
||||
MiniAppContribution(
|
||||
app_id="dms_folders",
|
||||
name="DMS-Ordner",
|
||||
icon="FolderOpen",
|
||||
description="Ordnerübersicht des Dokumentenmanagements mit Dateizählern.",
|
||||
permission="dms:read",
|
||||
settings_schema={
|
||||
"fields": [
|
||||
{"name": "max_items", "label": "Max. Ordner", "type": "number", "default": 6},
|
||||
]
|
||||
},
|
||||
col_span=2,
|
||||
row_span=1,
|
||||
hosts=["chat", "dashboard", "window"],
|
||||
component="@/components/dashboard/DmsFoldersWidget",
|
||||
order=60,
|
||||
),
|
||||
],
|
||||
permissions=[
|
||||
"dms:read",
|
||||
"dms:write",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from app.plugins.base import BasePlugin
|
||||
from app.plugins.manifest import PluginManifest, PluginRouteDef
|
||||
from app.plugins.manifest import MiniAppContribution, PluginManifest, PluginRouteDef
|
||||
|
||||
|
||||
class GraphRAGPlugin(BasePlugin):
|
||||
@@ -24,6 +24,25 @@ class GraphRAGPlugin(BasePlugin):
|
||||
],
|
||||
events=[],
|
||||
migrations=["0001_initial.sql"],
|
||||
miniapps=[
|
||||
MiniAppContribution(
|
||||
app_id="graph_overview",
|
||||
name="Wissens-Graph",
|
||||
icon="Share2",
|
||||
description="Beziehungsübersicht des Knowledge-Graphs.",
|
||||
permission="graph:read",
|
||||
settings_schema={
|
||||
"fields": [
|
||||
{"name": "max_items", "label": "Max. Beziehungen", "type": "number", "default": 6},
|
||||
]
|
||||
},
|
||||
col_span=2,
|
||||
row_span=1,
|
||||
hosts=["chat", "dashboard", "window"],
|
||||
component="@/components/dashboard/GraphOverviewWidget",
|
||||
order=90,
|
||||
),
|
||||
],
|
||||
permissions=[
|
||||
"graph:read",
|
||||
"graph:write",
|
||||
|
||||
@@ -12,6 +12,7 @@ from app.plugins.manifest import (
|
||||
FrontendMenuItem,
|
||||
FrontendPageRoute,
|
||||
FrontendSettingsPage,
|
||||
MiniAppContribution,
|
||||
PluginManifest,
|
||||
PluginRouteDef,
|
||||
)
|
||||
@@ -138,6 +139,25 @@ class MailPlugin(BasePlugin):
|
||||
],
|
||||
events=[],
|
||||
migrations=["0001_initial.sql", "0006_flag_type.sql", "0007_sync_queue.sql", "0008_sync_queue_deleted_at.sql", "0009_remove_mail_soft_delete.sql", "0010_add_deleted_at.sql"],
|
||||
miniapps=[
|
||||
MiniAppContribution(
|
||||
app_id="mail_unread",
|
||||
name="Postfach-Status",
|
||||
icon="Mail",
|
||||
description="Ungelesene E-Mails je Konto und Ordner.",
|
||||
permission="mail:read",
|
||||
settings_schema={
|
||||
"fields": [
|
||||
{"name": "max_items", "label": "Max. Ordner", "type": "number", "default": 6},
|
||||
]
|
||||
},
|
||||
col_span=2,
|
||||
row_span=1,
|
||||
hosts=["chat", "dashboard", "window"],
|
||||
component="@/components/dashboard/MailUnreadWidget",
|
||||
order=70,
|
||||
),
|
||||
],
|
||||
permissions=["mail:read", "mail:send", "mail:config", "mail:share", "mail:write", "mail:delete"],
|
||||
menu_items=[
|
||||
FrontendMenuItem(label_key='nav.mail', label='E-Mail', path='/mail', icon='Mail', order=30, permission='mail:read'),
|
||||
|
||||
@@ -4,7 +4,13 @@ from __future__ import annotations
|
||||
import logging
|
||||
|
||||
from app.plugins.base import BasePlugin
|
||||
from app.plugins.manifest import FrontendMenuItem, FrontendPageRoute, PluginManifest, PluginRouteDef
|
||||
from app.plugins.manifest import (
|
||||
FrontendMenuItem,
|
||||
FrontendPageRoute,
|
||||
MiniAppContribution,
|
||||
PluginManifest,
|
||||
PluginRouteDef,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -19,6 +25,25 @@ class WikiPlugin(BasePlugin):
|
||||
routes=[
|
||||
PluginRouteDef(path="/api/v1/wiki", module="app.plugins.builtins.wiki.routes", router_attr="router"),
|
||||
],
|
||||
miniapps=[
|
||||
MiniAppContribution(
|
||||
app_id="wiki_recent",
|
||||
name="Wiki-Neuigkeiten",
|
||||
icon="BookOpen",
|
||||
description="Zuletzt aktualisierte Wiki-Artikel.",
|
||||
permission="wiki:read",
|
||||
settings_schema={
|
||||
"fields": [
|
||||
{"name": "max_items", "label": "Max. Artikel", "type": "number", "default": 5},
|
||||
]
|
||||
},
|
||||
col_span=2,
|
||||
row_span=1,
|
||||
hosts=["chat", "dashboard", "window"],
|
||||
component="@/components/dashboard/WikiRecentWidget",
|
||||
order=80,
|
||||
),
|
||||
],
|
||||
permissions=["wiki:read", "wiki:write", "wiki:delete", "wiki:admin"],
|
||||
menu_items=[FrontendMenuItem(label_key="wiki.menu.wiki", label="Wiki", path="/wiki", icon="BookOpen", permission="wiki:read")],
|
||||
page_routes=[FrontendPageRoute(path="/wiki", component="@/pages/Wiki", permission="wiki:read")],
|
||||
|
||||
Reference in New Issue
Block a user