fixes private model and udb scoping sources

This commit is contained in:
ValueOn AG 2026-06-03 09:36:05 +02:00
parent 244726a716
commit ca276711d6
60 changed files with 425 additions and 15122 deletions

View file

@ -61,7 +61,7 @@ b-reference/
│ ├── automation.md Automation v1 + v2
│ ├── billing.md Billing, Subscriptions
│ ├── voice-google.md Google STT/TTS (VoiceObjects, Streaming-WS, Feature-Mapping)
│ └── features/ trustee.md, commcoach.md, chatbot.md, ...
│ └── features/ trustee.md, commcoach.md, ...
├── ui-nyla/ Frontend-Komponente
│ └── architecture.md Seiten, Komponenten, Hooks, Routing
├── service-llm-private/ Internes LLM

View file

@ -64,16 +64,7 @@ PowerOn ist eine **Multi-Mandanten-Plattform**:
## 3. Feature-Übersicht (`platform-core/modules/features`)
### 3.1 Chatbot
| Aspekt | Inhalt |
|--------|--------|
| **Code** | `chatbot` |
| **Zweck** | KI-gestützter Chat mit Workflows, Tools, Memory |
| **DB** | `poweron_chatbot` |
| **Besonderheiten** | RBAC pro `featureInstanceId`, streaming, Multi-Round, Tools (z. B. Websuche), Event-Manager |
### 3.2 Chatplayground
### 3.1 Chatplayground
| Aspekt | Inhalt |
|--------|--------|
@ -81,7 +72,7 @@ PowerOn ist eine **Multi-Mandanten-Plattform**:
| **Zweck** | Sichere Testumgebung für KI-Chat |
| **Besonderheiten** | Wrapper um `interfaceDbChat` mit Feature-Instanz-Kontext; isolierte Umgebung pro Mandant |
### 3.3 TeamsBot
### 3.2 TeamsBot
| Aspekt | Inhalt |
|--------|--------|
@ -90,7 +81,7 @@ PowerOn ist eine **Multi-Mandanten-Plattform**:
| **DB** | `poweron_teamsbot` |
| **Besonderheiten** | Sessions, Transcripts, Bot-Antworten; System-Bots (mandantenbezogen); Browser-Connector für Interaktionen |
### 3.4 Trustee (BuHa-Integration)
### 3.3 Trustee (BuHa-Integration)
| Aspekt | Inhalt |
|--------|--------|
@ -100,7 +91,7 @@ PowerOn ist eine **Multi-Mandanten-Plattform**:
| **Accounting-Connectors** | Bexio, Abacus, RMA |
| **Besonderheiten** | Feature-eigene Rollen (admin, operate, userreport), RBAC + feature-spezifische Zugriffslogik |
### 3.5 Neutralization (Dokumentbearbeitung mit KI)
### 3.4 Neutralization (Dokumentbearbeitung mit KI)
| Aspekt | Inhalt |
|--------|--------|
@ -109,7 +100,7 @@ PowerOn ist eine **Multi-Mandanten-Plattform**:
| **DB** | `poweron_neutralization` |
| **Besonderheiten** | PDF in-place (PyMuPDF), Platzhalter (z. B. `[name.uuid]`), konfigurierbare Muster; Neutralize Playground |
### 3.6 Automation
### 3.5 Automation
| Aspekt | Inhalt |
|--------|--------|
@ -118,14 +109,14 @@ PowerOn ist eine **Multi-Mandanten-Plattform**:
| **DB** | `poweron_automation` |
| **Besonderheiten** | AutomationDefinition, AutomationTemplate (System + Instanz), Event-Management, Callback-Registry |
### 3.7 RealEstate
### 3.6 RealEstate
| Aspekt | Inhalt |
|--------|--------|
| **Code** | `realestate` |
| **Zweck** | Immobilienverwaltung: Projekte, Parzellen, Dokumente, Kanton/Gemeinde, Geo-Daten |
| **DB** | `poweron_realestate` |
| **Besonderheiten** | BZO-Extraktion, Swiss Topo Scraping, LangGraph |
| **Besonderheiten** | BZO-Extraktion, Swiss Topo Scraping |
---
@ -133,7 +124,7 @@ PowerOn ist eine **Multi-Mandanten-Plattform**:
| Feature | Status | Beschreibung |
|---------|--------|--------------|
| **Chatbot / Playground** | Live | Sichere Umgebung für Nutzer; Chatplayground als abgegrenzte Testinstanz |
| **Chat / Playground** | Live | Sichere Umgebung für Nutzer; Chatplayground als abgegrenzte Testinstanz |
| **Private LLM** | Live | Ollama-basierter Connector (`privatellm`); lokal/on-premise; kein Datenabfluss |
| **BuHa-Integration** | Live | Trustee mit Connectors Bexio, Abacus, RMA; Sync zu Buchhaltungssystemen |
| **TeamsChatbot** | Live | Bot in Teams mit identifiziertem Nutzer; voll protokolliert |
@ -193,7 +184,7 @@ PowerOn ist eine **Multi-Mandanten-Plattform**:
|---------|------|-------|-----|-----------|
| Neutralisierung | Security Default aktiv | — | Policy-Sets pro Workflow | Datenklasse A/B/C definieren |
| Trustee/BuHa | Referenzprozess ERP/Dok-Extraktion | Wiederholbarkeit Onboarding | — | strukturierter Output |
| Chatbot/Playground | — | — | — | bereits produktiv nutzbar |
| Chat/Playground | — | — | — | bereits produktiv nutzbar |
| TeamsBot | — | — | — | authentifizierter User, protokolliert |
| Private LLM | — | — | Fallback-Strategie dokumentieren | für höchste Datenschutzanforderungen |

View file

@ -1,6 +1,6 @@
<!-- status: canonical -->
<!-- lastReviewed: 2026-05-22 -->
<!-- verifiedAgainst: gateway (codebase audit 2026-04-07, post Automation Unification); platform-core/modules/features/teamsbot/service.py (Hybrid Agent Escalation 2026-04-24); Typed Action Architecture Phasen 1-5; featureDataAgent domain hints hook 2026-04-27; central parameterValidation + DatabaseQueryError 2026-04-28; OpenAI temperature contract for GPT-5.x / o-series 2026-04-28; Voice STT speechToText params note 2026-05-10; RAG Consent & Control Unification (Phases A-D) 2026-05-12; Zombie-Killer + Walker-Timeouts 2026-05-14; FeatureDataAgent Query-Repair-Loop + Ontology layer 2026-05-15; UDB DataSource Settings + configurable RAG-Limits 2026-05-17; Cost-Estimate Währung USD→CHF 2026-05-22 -->
<!-- lastReviewed: 2026-06-02 -->
<!-- verifiedAgainst: gateway (codebase audit 2026-04-07, post Automation Unification); platform-core/modules/features/teamsbot/service.py (Hybrid Agent Escalation 2026-04-24); Typed Action Architecture Phasen 1-5; featureDataAgent domain hints hook 2026-04-27; central parameterValidation + DatabaseQueryError 2026-04-28; OpenAI temperature contract for GPT-5.x / o-series 2026-04-28; Voice STT speechToText params note 2026-05-10; RAG Consent & Control Unification (Phases A-D) 2026-05-12; Zombie-Killer + Walker-Timeouts 2026-05-14; FeatureDataAgent Query-Repair-Loop + Ontology layer 2026-05-15; UDB DataSource Settings + configurable RAG-Limits 2026-05-17; Cost-Estimate Währung USD→CHF 2026-05-22; DataSource search-first + adapter scoping/pagination + inline metadata (Outlook/Gmail/SharePoint/OneDrive/Drive/Calendar/Contacts/ClickUp) 2026-06-02 (connectorMsft.py, connectorGoogle.py, connectorInfomaniak.py, connectorClickup.py, _dataSourceTools.py, routeFeatureWorkspace.py) -->
# AI Agent & Knowledge Store
@ -210,12 +210,53 @@ Zusätzlich zu den unten genannten **Kern-Tools** existieren **dynamische Tools*
| Tool | Kurzbeschreibung |
|------|------------------|
| `listConnections` | User-Connections auflisten |
| `browseDataSource` | Externe Quelle durchsuchen |
| `searchDataSource` | Suche in Datenquelle |
| `browseDataSource` | Verzeichnis/Ordner einer Quelle auflisten (oder neueste Items eines Mail-/Kalender-Ordners) |
| `searchDataSource` | **Primäres Tool** für gezielte Abfragen — Query läuft server-seitig in der Quelle |
| `downloadFromDataSource` | Download → FileItem (inkl. Vererbung `neutralize` auf Datei, siehe Invarianten) |
| `uploadToExternal` | Upload zu externer Quelle |
| `sendMail` | E-Mail senden |
#### Search-first-Strategie & Adapter-Effizienz (ab 2026-06)
Externe Quellen können gigabyte- bis terabytegross sein. Damit der Agent
sie **nicht wie ein lokales Dateisystem** behandelt (alles browsen + alles
herunterladen), gelten drei Schichten:
1. **Agent-Steuerung (Prompt + Tool-Beschreibungen):** `buildDataSourceContext`
(`routeFeatureWorkspace.py`) injiziert eine **Search-first-Regel**. Die
Tool-Beschreibungen in `_dataSourceTools.py` deklarieren `searchDataSource`
als primär (inkl. Per-Service-Query-Syntax) und `browseDataSource` als
reines Directory-Listing. So lädt der Agent gezielt statt massenhaft.
2. **Server-seitige Suche + Scoping/Pagination pro Adapter:** Jeder
`ServiceAdapter.search` nutzt die native Such-API der Quelle und scopt auf
den angebundenen Ordner/Label; grosse Ergebnismengen werden paginiert.
| Service | Query-Syntax / Mechanik | Scoping | Pagination |
|---------|-------------------------|---------|-----------|
| Outlook Mail | Graph `$search` (KQL: `from:`, `subject:`); `browse` mit Datumsbereich → `$filter receivedDateTime` | Mail-Ordner | `$top` |
| Gmail | `q=` (`from:`, `after:`/`before:`); Metadaten parallel aufgelöst (kein sequenzielles N+1) | `labelIds` | `maxResults` |
| SharePoint / OneDrive | Graph `drive/root:/<folder>:/search(q=)` (Name + Inhalt) | angebundener Ordner | `@odata.nextLink` |
| Google Drive | `fullText contains` (Name + Inhalt) | `'<folderId>' in parents` | `pageToken` |
| MSFT / Google Calendar | Datumsbereich → `calendarView` bzw. `timeMin`/`timeMax` | Kalender | `$top` / `maxResults` |
| Infomaniak Calendar | Datumsbereich-Filter (auf Vendor-Limit <3 Monate geclampt) statt fixem 90-Tage-Fenster | Kalender | -- |
| ClickUp | `searchTeamTasks` | Team | API-Page |
3. **Strukturierte Metadaten inline (`_dataSourceTools.py`-Formatter):** Damit
der Agent ohne Download entscheiden/antworten kann, rendern die Tool-Outputs
pro Service-Typ die relevanten Felder inline:
| Typ | Inline-Felder | Hinweis im Output |
|-----|---------------|-------------------|
| Mail (`✉️`) | Datum, Absender | "nur Betreff — Download für Volltext" |
| Kalender (`📅`) | Start, Ende, Ort | "keine Einzel-Events downloaden" |
| Kontakte (`👤`) | E-Mail, Telefon, Firma | "vCard nur bei Bedarf downloaden" |
| ClickUp-Tasks (`☑️`) | Status, Assignee, Fälligkeit | "Task-JSON nur für Detail downloaden" |
Die Felder kommen aus `ExternalEntry.metadata`; der Formatter normalisiert
die je Provider unterschiedlichen Keys (z. B. Kontakt-E-Mail: MSFT
`emailAddresses`, Google `emails`, Infomaniak `email`).
**Dokumente / Content-Objekte**
| Tool | Kurzbeschreibung |

View file

@ -18,7 +18,7 @@ Unter `platform-core/modules/` (Kontext-Audit):
| `auth/` | Authentifizierung, CSRF, Token-Refresh-Middleware, JWT |
| `connectors/` | DB-Connector (PostgreSQL), Provider-Subpakete (Microsoft, Google, ClickUp, FTP, Infomaniak), Ticket/Messaging/Geo-Konnektoren. Pro Provider registrieren ServiceAdapter (`OutlookAdapter`, `OneDriveAdapter`, `SharepointAdapter`, `TeamsAdapter`, `CalendarAdapter`, `ContactsAdapter`, `GmailAdapter`, `DriveAdapter`, `KdriveAdapter`, …) die UDB-Services. Adapter-Registry pro Connector ist `_SERVICE_MAP` |
| `datamodels/` | Pydantic-Datenmodelle (u. a. Ai, Billing, Chat, Content, Files, Knowledge, Rbac, Subscription, UiLanguage, Workflow) |
| `features/` | Feature-Module (autonome Domänen): workspace, graphicalEditor, chatbot, commcoach, neutralization, realEstate, trustee, teamsbot |
| `features/` | Feature-Module (autonome Domänen): workspace, graphicalEditor, commcoach, neutralization, realEstate, trustee, teamsbot |
| `interfaces/` | DB-Interfaces (App, Billing, Chat, Knowledge, Management, Subscription), AI-Objects, RBAC, Features, Messaging |
| `migration/` | Daten-Migrationen |
| `routes/` | REST-API-Routen (u. a. Admin, Billing, DataFiles, DataSources, i18n, Security, Store, System) |

View file

@ -39,8 +39,6 @@ Zentrale Steuerung in `platform-core/modules/workflows/workflowManager.py` (gros
- **`WORKFLOW_DYNAMIC`** (`modeDynamic.py`) — zweistufige Aktionsplanung (Stage 1: Aktionswahl + Ressourcen; Stage 2: Parametergenerierung)
- **`WORKFLOW_AUTOMATION`** (`modeAutomation.py`) — sequenzielle Abarbeitung für Automation v1
Zusätzlich definiert `WorkflowModeEnum` den Modus **`WORKFLOW_CHATBOT`** (Chatbot-Feature).
---
## Methoden
@ -56,7 +54,6 @@ Methoden sind Python-Klassen unter `platform-core/modules/workflows/methods/`; d
| `clickup` | `listTasks`, `searchTasks`, `getTask`, `createTask`, `updateTask`, `uploadAttachment` |
| `jira` | `connectJira`, `exportTicketsAsJson`, `importTicketsFromJson`, `mergeTicketData`, `parseCsvContent`, `parseExcelContent`, `createCsvContent`, `createExcelContent` |
| `trustee` | `extractFromFiles`, `processDocuments`, `syncToAccounting`, `refreshAccountingData` (`dynamicMode=True`) |
| `chatbot` | `queryDatabase` |
| `file` | `create` |
*Hinweis:* Ältere Kontext-Dokumente nennen für `context` u.a. `saveContent` / `transformContent`; der aktuelle Gateway-Stand listet die obigen Aktionen (Stand Abgleich Code / Review 2026-04-05).

View file

@ -48,7 +48,6 @@ PostgreSQL (+ pgvector Extension)
| `poweron_workspace` | AI Workspace Feature-Daten | Feature-Interface |
| `poweron_automation` | Automation v1 Workflows, Runs | Feature-Interface |
| `poweron_automation2` | Automation v2 (Graph-Editor) Workflows, Runs | Feature-Interface |
| `poweron_chatbot` | Chatbot Feature-Daten | Feature-Interface |
| `poweron_trustee` | Trustee Feature-Daten | Feature-Interface |
| `poweron_commcoach` | CommCoach Feature-Daten | Feature-Interface |
| `poweron_neutralization` | Neutralisierungs-Daten | Feature-Interface |

View file

@ -49,12 +49,22 @@ Im zentralen AI-Gate (`_neutralizeRequest`):
3. **Indexierung:** `indexFile()` neutralisiert Text-Chunks bei `FileItem.neutralize=True` → Data-at-rest abgesichert.
4. **DataSource-Download / RAG-Indexierung:** `DataSource.neutralize` ist die einzige Quelle für die Neutralisierungs-Policy pro Tree-Element. **Seit 2026-05 (Cascade-Inherit):** `neutralize`, `ragIndexEnabled` und `scope` sind 3-wertig (`null` = vererbt, `True/False` bzw. ein Scope-String = explizit). `null` in der Datenbank bedeutet: Wert vom nächsten Vorfahren-DataSource im Path-Tree übernehmen (longest-prefix wins, gleicher `connectionId` + `sourceType`). Beim Setzen eines expliziten Werts auf einem Parent **kaskadiert das Backend** (`cascadeResetDescendants`) durch alle Descendants und setzt deren explizite Werte für **dieses eine Flag** auf `null` zurück — Descendants die bereits geerbt haben, werden nicht angefasst. Walker konsumieren pre-resolved Werte: `_loadRagEnabledDataSources` (in `subConnectorIngestConsumer.py`) berechnet pro DS via `_inheritFlags.getEffectiveFlag()` den effektiven `ragIndexEnabled`/`neutralize`/`scope` und schreibt das in das Walker-Input-Dict — die Sync-Walker (`subConnectorSync*.py`) bleiben dadurch unverändert und lesen weiter direkt `ds.get("neutralize", False)`. Die Flag-Werte werden zusätzlich auf erzeugte `FileItem`s übernommen. Der frühere `subPolicyResolver` ist auf einen Backward-Compat-Shim auf `getEffectiveFlag` reduziert. **Seit 2026-05-23 (Polymorphic UDB Refactor):** `FeatureDataSource` traegt `neutralize`, `ragIndexEnabled` und `neutralizeFields` (kein `scope`, kein `userId`, kein `workspaceInstanceId` mehr — FDS ist feature-owned, RBAC-gated). Vererbung und Cascade-Reset laufen ueber `_INHERITABLE_FDS_FLAGS = {"neutralize", "ragIndexEnabled"}` mit Coordinate `(featureInstanceId, tableName)`. Flag-Toggles laufen ausschliesslich ueber `POST /api/udb/node/{key}/flag/{flag}` (siehe `b-reference/platform/unified-data-bar.md`); die alten `PATCH /api/datasources/{id}/...`-Routen sind entfallen.
5. **FeatureDataSource (Tabellen-Level):** `_queryFeatureInstance()` setzt bei `neutralize=True` u. a. `requireNeutralization=True` für Sub-Agent-AI-Calls.
6. **FeatureDataSource (Feld-Level):** `neutralizeFields` definiert Spalten, deren Werte in `FeatureDataProvider` mit deterministischen Platzhaltern `[NEUT.<field>.<hash>]` ersetzt werden, bevor Daten den Sub-Agent erreichen. Gleichheits-Vergleiche bleiben möglich (stabiler Hash).
6. **FeatureDataSource (Feld-/Typ-Level, seit 2026-06 A2):** `FeatureDataProvider.finalizeRowsAsync()` wendet eine typ- und vererbungsbewusste Policy pro Tabelle an (`{tableActive, explicitFields}`; `tableActive` = effektives, eigenes ODER geerbtes `neutralize`, via `resolveEffectiveForFds`). Regeln: (1) **Strings** (inkl. JSON/Text) werden **substring-neutralisiert** (Platzhalter im Text, nicht Ganzwert-Hash) sobald für das Feld effektiv (explizit ODER geerbt) — der Feldname wird der lokalen Neutralisierungs-Engine als Typ-Hint (`"<feld>: "`-Prefix) vorangestellt und danach entfernt; (2) **Binary** wird **nie** neutralisiert, sondern **gedroppt**, sobald Neutralisierung greift; (3) **andere Skalare** (number/float/int/date/bool) werden nur bei **explizitem** Feld-Flag (nicht vererbt) als Ganzwert-Platzhalter `[NEUT.<field>.<hash>]` ersetzt. Identifikatoren/System-Spalten (`id`, `*Id`, `sys*`, `_*`) sind ausgenommen. Engine-Ausfall = fail-closed (`[REDACTED]`). Der RAG-Bootstrap (`subFeatureBootstrap._featureBootstrapHandler`) nutzt **dieselbe** `finalizeRowsAsync`-Policy → Query-Pfad und Index-Pfad sind konsistent. (Legacy: reines `neutralizeFields` ohne Policy → weiterhin Ganzwert-Hash via `_neutralizeRowFields`.)
7. **AI-Call:** Bei erzwungener Neutralisierung (`requireNeutralization=True`) schlägt fehlgeschlagene Neutralisierung hart fehl (`RuntimeError` / Blockierung bzw. Entfernen betroffener Message-Teile — kein Durchleiten im Rohzustand).
8. **`_rehydrateResponse()`:** Als Hilfsmethode vorhanden; automatische Rückübersetzung der Modellantwort ist nicht mehr der Standardpfad.
8. **Keine Auto-Rehydration; sichere De-Neutralisierung nur on demand (seit 2026-06 A1):** Die Modellantwort wird **nie** automatisch zurückübersetzt und mit Klartext gespeichert (`_rehydrateResponse` wurde entfernt). De-Neutralisierung erfolgt ausschliesslich explizit über das read-only Agent-Tool `revealDocument`, das Platzhalter `[typ.uuid]` **nur** über das lokale Mapping (`NeutralizationService.resolveText`, kein externes LLM) auflöst und den Klartext als **transienten Einmal-Download** (SSE-SideEvent `revealDownload`) zurückgibt — kein Save, kein Index, keine Chat-Historie (das persistierte ToolResult enthält nur eine Bestätigung).
**Engine-Failsafe (Spezifikation):** Neutralisierung verlangt, Engine nicht verfügbar → nicht weiterverarbeiten; Teilfehler → Teil entfernen, nicht roh weitergeben; fehlendes internes Medienmodell → Medien-Part entfernen.
### Bekannte Klartext-at-rest-Pfade (Audit-Hinweis, A1 2026-06)
Die Rückübersetzung (Denormalisierung) der Modellantwort ist **kein** Klartext-Risiko mehr (keine Auto-Rehydration; `revealDocument` ist transient). Die verbleibenden Stellen, an denen *unneutralisierter* Klartext bewusst at-rest landen kann, sind **vom Neutralisierungs-Flag der Quelle abhängig** und hier dokumentiert, damit sie bei Audits nicht mit der Denormalisierung verwechselt werden:
- **`downloadFromDataSource` (`mainServiceAgent._downloadFromDataSource`):** lädt Roh-Bytes der Quelle. Bei `neutralize=True` greift die Indexierungs-/Download-Policy (Failsafe 4); ohne aktives Flag sind dies bewusst Originaldaten.
- **`writeFile` / `renderDocument`:** agent-komponierter Inhalt wird als Datei persistiert; Neutralisierung richtet sich nach Quelle/Flag, nicht nach diesem Schritt.
- **`RoundMemory.fullData`:** Roh-Tool-Ergebnisse im Agent-Round-Memory (Laufzeit/Persistenz je nach Session).
Diese Pfade sind **kein Bug der A1-Änderung**; eine engere Härtung (z. B. generelles Redigieren von `RoundMemory.fullData`) ist als separates Folge-Ticket zu führen.
## Unified Data Bar — Tree-Endpoint und Flag-Toggling
Vollstaendige Doku: `b-reference/platform/unified-data-bar.md`. Hier nur Bezug zur Neutralisierung:

View file

@ -1,5 +1,5 @@
<!-- status: canonical -->
<!-- lastReviewed: 2026-05-27 -->
<!-- lastReviewed: 2026-06-03 -->
<!-- verifiedAgainst: platform-core/modules/serviceCenter/services/serviceKnowledge/udbNodes.py | _buildTree.py | _inheritFlags.py | platform-core/modules/routes/routeUdb.py | platform-core/modules/datamodels/datamodelFeatureDataSource.py | ui-nyla/src/components/UnifiedDataBar/UdbSourcesProvider.tsx -->
# Unified Data Bar (UDB)
@ -9,7 +9,7 @@ Die UDB ist die zentrale Komponente zur Anzeige und Steuerung **aller** Datenque
Dieses Dokument ist die kanonische Quelle der Wahrheit fuer:
1. das Domain-Modell (welche Node-Typen, wer besitzt was)
2. die Flag-Mechanik (`neutralize` / `scope` / `ragIndexEnabled`, Vererbung, mixed-Aggregation, Cascade-Reset)
2. die Flag-Mechanik (`neutralize` / `ragIndexEnabled`, Vererbung, mixed-Aggregation, Cascade-Reset)
3. die RBAC-Regeln fuer Flag-Aenderungen
4. das API-Schema und den Frontend-Vertrag
@ -60,21 +60,21 @@ flowchart TD
### Vier Node-Familien
| Familie | Subklassen | DB-Record | scope | neutralize | ragIndexEnabled | RBAC zum Editieren |
|---|---|---|---|---|---|---|
| **SyntheticContainer** | `SyntheticContainerNode`, `MandateGroupNode` | nein | | | | nie editierbar |
| **DataSource** | `ConnectionNode`, `ServiceNode`, `FolderNode`, `FileNode` | `DataSource` (`userId`-scoped, optional virtuell) | ja (3-wertig) | ja (3-wertig) | ja (3-wertig) | Owner-of-record (`rec.userId == user`) |
| **FdsRecord** | `FdsWorkspaceNode`, `FdsTableNode`, `FdsRowNode` | `FeatureDataSource` (`featureInstanceId`-scoped) | nein | ja (3-wertig) | ja (3-wertig) | Feature-Admin (`roleLabel.endswith('-admin')` auf der `featureInstanceId`) |
| **FdsField** | `FdsFieldNode` | virtueller Child unter Table, persistiert in `FeatureDataSource.neutralizeFields` | nein | ja (zweiwertig: enthalten in `neutralizeFields` oder nicht) | nein | wie FdsRecord |
| Familie | Subklassen | DB-Record | neutralize | ragIndexEnabled | RBAC zum Editieren |
|---|---|---|---|---|---|
| **SyntheticContainer** | `SyntheticContainerNode`, `MandateGroupNode` | nein | | | nie editierbar |
| **DataSource** | `ConnectionNode`, `ServiceNode`, `FolderNode`, `FileNode` | `DataSource` (`userId`-scoped, optional virtuell) | ja (3-wertig) | ja (3-wertig) | Owner-of-record (`rec.userId == user`) |
| **FdsRecord** | `FdsWorkspaceNode`, `FdsTableNode`, `FdsRowNode` | `FeatureDataSource` (`featureInstanceId`-scoped) | ja (3-wertig) | ja (3-wertig) | Feature-Admin (`roleLabel.endswith('-admin')` auf der `featureInstanceId`) |
| **FdsField** | `FdsFieldNode` | virtueller Child unter Table, persistiert in `FeatureDataSource.neutralizeFields` | ja (zweiwertig: enthalten in `neutralizeFields` oder nicht) | nein | wie FdsRecord |
**Wichtig — Ownership-Trennung:**
- `DataSource` ist **user-privat** (`userId`-scoped). Scope (`personal` | `mandate` | `global`) bestimmt, wer sie zusaetzlich sehen darf. Geteilte Sources erscheinen anderen Usern read-only.
- `DataSource` ist **user-privat** (`userId`-scoped). Personal Sources sind ausschliesslich fuer den Owner sichtbar (kein Scope-Sharing). Die DB-Spalte `scope` ist deprecated (2026-06, Datenschutz) und wird nicht mehr gelesen oder geschrieben. Scope existiert nur noch bei Files (Folder-Files: eigene + geteilte Daten).
- `FeatureDataSource` (FDS) ist **feature-owned** (`featureInstanceId`-scoped). Es gibt keinen `userId`, kein `workspaceInstanceId`, kein `scope`-Feld. Sichtbarkeit ergibt sich aus RBAC auf der Feature-Instanz. Editierbarkeit verlangt Feature-Admin.
## Flag-Mechanik
Drei Flags mit identischer 3-wertiger Semantik (Ausnahme: FdsField, siehe unten):
Zwei Flags mit identischer 3-wertiger Semantik (Ausnahme: FdsField, siehe unten):
- `null` — vererbt vom naechsten expliziten Vorfahren entlang des Path-Trees (longest-prefix wins, gleiche `connectionId` + `sourceType` fuer DS, gleiche `featureInstanceId` + `tableName` fuer FDS).
- `True` / `False` — expliziter Override.
@ -84,7 +84,7 @@ Drei Flags mit identischer 3-wertiger Semantik (Ausnahme: FdsField, siehe unten)
Implementiert in `_inheritFlags.py`:
- `getEffectiveFlag(...)` / `getEffectiveFlagFds(...)` — laufen das Path-Tree hoch und liefern den ersten expliziten Wert (`True`/`False`/scope-string) oder den Default.
- `getEffectiveFlag(...)` / `getEffectiveFlagFds(...)` — laufen das Path-Tree hoch und liefern den ersten expliziten Wert (`True`/`False`) oder den Default.
- `resolveEffectiveForPath(...)` / `resolveEffectiveForFds(...)` — geben das vollstaendige Triplett zurueck plus einen virtuellen Datensatz fuer Pfade ohne eigenen DB-Record.
### Aggregation (mixed)
@ -107,7 +107,7 @@ flowchart TD
Wird ein expliziter Wert auf einem Parent gesetzt, raeumt der Backend (`cascadeResetDescendants` / `cascadeResetDescendantsFds`) **fuer genau dieses Flag** alle expliziten Werte auf Descendant-Records weg (setzt sie auf `null`). Descendants, die bereits geerbt haben, werden nicht angefasst. Der Parent-Wert ist anschliessend die effektive Quelle fuer alle.
Die generische Cascade-Infrastruktur (`_inheritFlags.py`) kennt **nur** die drei Flag-Spalten. Alles darueber hinaus — wie das Aufraumen von `neutralizeFields` — ist Verantwortung der jeweiligen Node-Klasse via dem `_onSetFlag`-Hook in `_FdsFamilyNode`:
Die generische Cascade-Infrastruktur (`_inheritFlags.py`) kennt **nur** die zwei Flag-Spalten. Alles darueber hinaus — wie das Aufraumen von `neutralizeFields` — ist Verantwortung der jeweiligen Node-Klasse via dem `_onSetFlag`-Hook in `_FdsFamilyNode`:
- `FdsTableNode._onSetFlag`: wipe-t die eigene `neutralizeFields`-Liste wenn ein expliziter `neutralize`-Wert gesetzt wird (per-column Overrides werden durch den Tabellen-Wert obsolet).
- `FdsWorkspaceNode._onSetFlag`: wipe-t `neutralizeFields` auf allen Descendant-Tables, damit die Cascade-Invariante auch fuer field-level State gilt.
@ -123,7 +123,7 @@ Felder unter einer FDS-Tabelle (`fdsfld|...`) haben **kein** eigenes Vererbungst
Die Liste kann konstruktionsbedingt nur "explicit True" ausdruecken, kein "explicit False". Ein Tabellen-Toggle wirkt deshalb cascade-reset-mäßig auf alle Felder via Inheritance: der `setFlag`-Pfad wischt `neutralizeFields` bei expliziter Tabellen-Aenderung leer (siehe Cascade-Reset-Abschnitt), sodass alle Felder anschliessend den neuen Tabellen-Wert sehen.
`FdsField` traegt nur `neutralize` (keine `scope`, keine `ragIndexEnabled`). Mixed-Aggregation auf der Tabelle erfolgt korrekt, weil `FdsTableNode.getLogicalChildren(...)` die Felder dynamisch als logische Children einhaengt (`_wireTableFieldsAsLogicalChildren` in `_buildTree.py`); divergierende Field-Walks (einige True via Override, andere False via Inherit) liefern `'mixed'` auf der Tabelle.
`FdsField` traegt nur `neutralize` (kein `ragIndexEnabled`). Mixed-Aggregation auf der Tabelle erfolgt korrekt, weil `FdsTableNode.getLogicalChildren(...)` die Felder dynamisch als logische Children einhaengt (`_wireTableFieldsAsLogicalChildren` in `_buildTree.py`); divergierende Field-Walks (einige True via Override, andere False via Inherit) liefern `'mixed'` auf der Tabelle.
## RBAC fuer Flag-Aenderungen
@ -133,8 +133,6 @@ Implementiert in `UdbNode.canEdit(context, rootIf)`. Pro Subklasse:
- `_DataSourceFamilyNode` (Connection / Service / Folder / File): `rec.userId == context.user.id` wenn ein `DataSource`-Record existiert. Fuer **virtuelle Nodes** (Browse-Folder ohne Record) prueft `canEdit` stattdessen, ob die `UserConnection` dem User gehoert (`_isConnectionOwner`); `setFlag` erstellt dann automatisch einen DataSource-Stub-Record. Geteilte Sources (anderer User) bleiben read-only.
- `_FdsFamilyNode` (FdsWorkspace / FdsTable / FdsRow), `FdsFieldNode`: `_isFeatureAdmin(rootIf, userId, featureInstanceId)` — verlangt eine `FeatureAccessRole` auf der Instanz, deren `Role.roleLabel` mit `-admin` endet (z.B. `workspace-admin`, `trustee-admin`). SysAdmin und PlatformAdmin haben **keine** automatische Erlaubnis (UDB-Edits sind ein Daten-Verantwortungs-Akt, nicht ein Plattform-Operations-Akt).
Globaler Scope (`scope="global"`) setzt zusaetzlich `context.isSysAdmin` voraus; siehe `_validateFlagValue` in `routeUdb.py`.
## Visibility
Visibility (was der User sieht) ist getrennt von Editability (was er aendern darf):
@ -142,11 +140,11 @@ Visibility (was der User sieht) ist getrennt von Editability (was er aendern dar
| Tab / Bereich | Sichtbar fuer den User |
|---|---|
| Chats | Chat-Workflows der Feature-Instanz, in der die UDB eingebettet ist |
| Folders + Files | Eigene Files/Folders + mit dem User geteilte (gemaess `scope`-Attribut der jeweiligen Source); fremde Attribute read-only |
| Personal Sources | Eigene Connections + Sources mit `scope in {mandate, global}` anderer User (read-only) |
| Folders + Files | Eigene Files/Folders + mit dem User geteilte (gemaess `scope`-Attribut der jeweiligen File/Folder); fremde Attribute read-only |
| Personal Sources | Nur eigene Connections + Sources (kein Scope-Sharing; Datenschutz, 2026-06) |
| Feature Data Sources | Alle FDS der Feature-Instanzen im Mandanten, in denen der User RBAC-Zugriff hat |
Die Vererbung folgt **dem Path-Tree der jeweiligen Source**, nicht dem Owner. Sharing aendert daran nichts (die Berechtigungsmatrix der externen Provider — SharePoint, Drive, etc. — bleibt unberuehrt; UDB ueberlagert sie nicht).
Die Vererbung folgt **dem Path-Tree der jeweiligen Source**, nicht dem Owner.
## API
@ -162,21 +160,21 @@ Response: { "nodesByParent": { "__root__": [...], "<key1>": [...], ... } }
```
key, kind, parentKey, label, icon, hasChildren,
dataSourceId, modelType,
effectiveNeutralize, effectiveScope, effectiveRagIndexEnabled,
effectiveNeutralize, effectiveRagIndexEnabled,
supportsRag, canBeAdded,
+ kind-spezifische Carrier (authority, connectionId, service, sourceType,
path, featureInstanceId, featureCode, mandateId, tableName, objectKey,
fieldName, neutralizeFields)
```
Pre-computed effective Werte sind `boolean | "mixed"` bzw. `string | "mixed"`. FDS-Nodes haben keinen `effectiveScope`-Wert. `FdsFieldNode` traegt nur `effectiveNeutralize`.
Pre-computed effective Werte sind `boolean | "mixed"`. `FdsFieldNode` traegt nur `effectiveNeutralize`. `effectiveScope` wird aus Kompatibilitaet immer als `"personal"` serialisiert, aber vom Frontend ignoriert.
### `POST /api/udb/node/{nodeKey}/flag/{flag}`
```
Path: nodeKey ∈ Tree-Keys (URL-encoded; '|' bleibt nach decodieren erhalten)
flag ∈ {neutralize, scope, ragIndexEnabled}
Body: { "value": <bool | "personal" | "mandate" | "featureInstance" | "global" | null> }
flag ∈ {neutralize, ragIndexEnabled}
Body: { "value": <bool | null> }
Response: { "nodeKey", "flag", "value", "effective", "resetDescendantIds" }
```
@ -212,11 +210,11 @@ Ablauf:
- Einziger Cache: `Map<key, UdbBackendNode>` plus expanded-Set.
- `loadChildren(parent)``POST /api/udb/tree/children`.
- `patchScope` / `patchNeutralize` / `patchRagIndex``POST /api/udb/node/{key}/flag/{flag}` mit `{value}`-Body.
- `patchNeutralize` / `patchRagIndex``POST /api/udb/node/{key}/flag/{flag}` mit `{value}`-Body. (`patchScope` ist seit 2026-06 ein No-op; Scope existiert nur noch bei Files.)
- Keine Vererbungs- oder Aggregations-Logik im Frontend.
- Pro Toggle: Spinner auf dem Flag-Button → API-Call → Refetch der betroffenen Parents → Re-Render. Keine optimistic Updates.
- Einheitliches mixed-Symbol fuer alle drei Flags (`◩`, U+25E9).
- Klick auf das mixed-Symbol → setzt explizit `false` (gilt fuer alle drei Flags). Reset auf `null`/inherit erfolgt ausschliesslich durch Parent-Toggle (siehe Cascade-Reset).
- Einheitliches mixed-Symbol fuer alle Flags (`◩`, U+25E9).
- Klick auf das mixed-Symbol → setzt explizit `false` (gilt fuer alle Flags). Reset auf `null`/inherit erfolgt ausschliesslich durch Parent-Toggle (siehe Cascade-Reset).
## Schluessel-Dateien
@ -239,5 +237,5 @@ Ablauf:
- **Backend liefert effective Werte.** Das Frontend rendert sie 1:1. Wenn das UI „falsch“ aussieht, liegt der Fehler im Backend (Builder oder Resolver), nicht in der UI.
- **Eine API pro Verantwortung.** `tree/children` fuer Sichtbarkeit, `node/{k}/flag/{f}` fuer Persistenz. Keine Spezialrouten pro Flag oder pro Kind.
- **Hart-Cut bei Refactors.** Alte Endpoints und alter Frontend-Code werden geloescht, nicht parallel gehalten. Tests werden mitgezogen.
- **FDS hat keinen Scope und kein `userId`.** Wer das einbauen will, baut ein neues, separates Domain-Konzept — keine Vermischung.
- **Kein Scope auf DataSource oder FDS.** Scope wurde 2026-06 aus Datenschutzgruenden von DataSource entfernt (personal sources duerfen nicht gescoped werden). FDS hatte nie Scope. Scope existiert nur noch bei Files (folder-files: eigene + geteilte Daten).
- **Audit ist Pflicht.** Jede `setFlag`-Ausfuehrung schreibt einen `udb_flag_changed`-Eintrag mit `nodeKey`, `flag`, `value`, `resetDescendants`, `nodeKind`.

View file

@ -34,7 +34,6 @@ PowerOn PORTA ist eine Multi-Tenant SaaS-Plattform mit Feature-Store-Modell, AI-
| `workspace` | AI-Agent-Workspace mit Chat, Tools, RAG, Streaming |
| `automation` | Workflow-Automatisierung (v1) |
| `automation2` | Flow-Editor n8n-Style (v2) |
| `chatbot` | Chatbot-Feature |
| `commcoach` | Kommunikations-Coach mit Voice, Dossier, UDB |
| `neutralization` | Datenneutralisierungs-Service und Config |
| `trustee` | Trustee/Treuhand-Feature (Buchhaltung, Positionen) |

View file

@ -14,7 +14,7 @@ Technologie-Stack (Stand UI-Doku): React 19.x, Vite 5.x, TypeScript 5.8.x, React
| Ordner | Inhalt |
|--------|--------|
| `pages/` | Seiten: `admin/`, `basedata/`, `billing/`, `settings/`, `views/` (workspace, commcoach, chatbot, trustee, graphicalEditor, realestate, neutralization, teamsbot) |
| `pages/` | Seiten: `admin/`, `basedata/`, `billing/`, `settings/`, `views/` (workspace, commcoach, trustee, graphicalEditor, realestate, neutralization, teamsbot) |
| `components/` | Wiederverwendbar: FormGenerator (Table, Form, Tree, List, Report), Navigation, UnifiedDataBar, FlowEditor (Graphical Editor), OnboardingAssistant |
| `hooks/` | useApiRequest (useApi.ts), useFiles, useNavigation, useConfirm, usePrompt, useResizablePanels, `useSpeechAudioCapture` (`useVoiceStream`: Mic + WebSocket `/voice-google/stt/stream`, optionale STT-`open`-Parameter), etc. |
| `contexts/` | FileContext, PekContext, ToastContext, WorkflowSelectionContext |

View file

@ -1,220 +0,0 @@
<!-- status: idea -->
<!-- started: 2026-05-30 -->
<!-- component: platform-core | platform -->
# Depoformance Property Match — Backend über PORTA
## Beschreibung und Kontext
Depoformance betreibt mit **Property Match** ein fertiges Frontend für Gewerbeimmobilien-Matching (Supply/Demand), das heute auf Mock-Daten läuft. In ihrer Techdoku (Kap. 11) beschreiben sie, was sie vom „Backend-Team (PowerOn)" brauchen — formuliert in **ihrer** Sprache (generische REST-API, OpenRouter-Proxy, „CI/CD einrichten", JWT-Felder usw.). Sie kennen unser Backend nicht und beschreiben deshalb eine **selbstgebaute Backend-Infrastruktur**.
Dieses Dokument **übersetzt ihre Wünsche in PORTA-Begriffe**: nicht die Schlagworte wörtlich umsetzen, sondern prüfen, was sie fachlich meinen — und es auf vorhandene PORTA-Plattform-Bausteine abbilden. Kernpunkt: **Fast alles, was sie als „muss noch gebaut werden" auflisten, ist in PORTA bereits Plattform-Standard.** Statt eines projektspezifischen Backends bekommen sie die PORTA-Plattform als Backend; ihr Frontend bleibt unverändert und spricht echte PORTA-Endpunkte statt Mock-Provider an.
**Business-Treiber:** Depoformance wird als Partner **nach unserem Standard-Partner-Modell** eingebunden — eigenes UI auf dem PORTA-Backend via API-Vertrag. Kein Sonderfall, sondern der reguläre Partner-Onboarding-Weg.
## Grundprinzip der Übersetzung
| Ihre Formulierung | Was sie meinen | PORTA-Realität |
|---|---|---|
| „Ihr müsst die REST-API für 18 Interfaces bauen" | Sie brauchen persistente, gesicherte CRUD-Endpunkte pro Entität | PORTA hat eine **generische, RBAC-gefilterte CRUD-/Tabellen-Schicht** — Endpunkte entstehen aus dem Datenmodell, werden nicht pro Entität handgeschrieben |
| „OpenRouter-Proxy `POST /api/ai/chat/completions`" | Sie brauchen serverseitigen, abgesicherten Modellzugang | PORTA hat ein **eigenes AI-Gateway** (`serviceAi`) über mehrere Provider — **unser** AI-Service, **kein** OpenRouter |
| „CI/CD müsst ihr entscheiden/einrichten" | Sie wollen Qualitäts-/Deploy-Sicherheit | PORTA hat **automatisierte Tests + Deploy-Pipeline** bereits etabliert — kein Thema für sie |
| „JWT mit `role`/`workspaces`/`organizationId`" | Sie wollen Identität + Mandantentrennung + Rollen | PORTA hat **JWT-Auth + 4-Stufen-RBAC + Mandantentrennung** — wird auf ihre Begriffe gemappt |
## Architektur: dedizierter Partner-Router
Wir bauen für Depoformance einen **eigenen Partner-Router** (z. B. unter `/api/v1/depoformance/*`), der genau die von ihnen benötigten Endpunkte exponiert und intern auf die bestehenden PORTA-Services **durchschleift**. Depoformance sieht nur diesen stabilen Vertrag und kennt unsere internen Routen nicht.
```
Depoformance-App
| Authorization: Bearer <service-token>
v
PORTA Partner-Router /api/v1/depoformance/* (eigene Routendatei)
| schleift durch auf ...
|-- AI -> serviceAi (Modell-Auswahl, Audit, Streaming)
|-- Daten/CRUD -> generische RBAC-CRUD-/Tabellen-Schicht
|-- Datenanbindung-> Konnektoren / serviceWeb / serviceKnowledge / serviceExtraction
|-- Messaging -> serviceMessaging (Mail/Notifications)
```
Vorteile:
- **Stabiler, versionierter Vertrag** — entkoppelt von internen Routenänderungen.
- **Response-Adapter** an genau ihr Format (`{data}` / `{data,total}` / `{code,message}`) an einer Stelle.
- **Pro-Partner Auth, Rate-Limit, Billing-Zuordnung** zentral im Router.
- Wiederverwendbar als Muster für weitere Partner.
## Mapping: Ihre Wünsche (Doku Kap. 11) → PORTA-Fähigkeit
### 11.1 / 11.2 — Persistenz + 18 Provider-Interfaces (CRUD)
Sie wollen pro Entität gespeicherte, abrufbare, gesicherte Daten. In PORTA wird das Property-Match-Domänenmodell als **Feature-Datenmodell** abgebildet (analog zu bestehenden Feature-Modulen wie Trustee/RealEstate). Daraus ergeben sich **automatisch**:
- **CRUD + Pagination**: generische, RBAC-gefilterte Endpunkte (`getRecordsetPaginatedWithRBAC`), `limit`/`offset` (deckt ihren Pagination-Wunsch aus 11.7).
- **Mandantentrennung**: serverseitiger SQL-Filter nach `mandateId` (= ihre `organizationId`), aus dem Token, nicht aus dem Request (deckt Security #2).
- **FK-Auflösung / Labels**, einheitliche Antwortstruktur.
Gruppierung ihrer 18 Interfaces nach PORTA-Baustein:
| Ihre Interfaces | PORTA-Baustein |
|---|---|
| Property, Need, Unit, Match, Inquiry, Offer, Shortlist, Pipeline, Reminder, ReviewQueue | Generische **RBAC-CRUD-Datentabellen** + domänenspezifische Aktions-Endpunkte (`approve`, `moveStage`, `addMessage`, `snooze` …) |
| FutureSignal, LatentNeed, MarktHinweis, MarketIntelligence, SignalPipeline, DataSource | **Datenanbindungen**: Konnektoren, Web-Scraping (`serviceWeb`/Tavily), RAG/semantische Suche (`serviceKnowledge`) → speisen diese „Signal"-Entitäten |
| Dashboard (`getSupplyStats`/`getDemandStats`) | **Aggregations-/Report-Endpunkte** (FormGenerator Report / Dashboard-Aggregation) |
| AIMonitoring (`getOutputs`, `updateReviewStatus`) | **AI-Audit-Log** (AI-Datenfluss-Log) — protokolliert ohnehin jede KI-Ausgabe |
> Domänenspezifische „Spezialmethoden" (z. B. `pipeline.moveStage`, `inquiry.addMessage`) werden als Feature-Endpunkte bzw. Workflow-Aktionen umgesetzt — nicht als handgeschriebene Einzel-APIs.
### 11.3 — Authentifizierung & Session → PORTA Auth + RBAC
PORTA stellt Login/Refresh/Logout/„me" und Session-Mechanik (Token-Refresh, Expiry, Idle-Timeout) bereits bereit. Ihre JWT-Felder werden gemappt:
| Ihr JWT-Feld | PORTA |
|---|---|
| `id` | User-ID |
| `role` (PROPERTY_MANAGER, TENANT, STAFF) | PORTA-Rollen (Mandant- bzw. Feature-Instanz-Rollen) |
| `workspaces` (SUPPLY, DEMAND) | Feature-Zugriff / UI-Sichtbarkeit (RBAC-UI-Items) |
| `organizationId` | `mandateId` (Mandantentrennung) |
Deckt Security #3 (echte Auth, Expiry) und #8 (Session-Mechanik).
### 11.4 — KI-Proxy → unser AI-Service (kein OpenRouter)
Statt OpenRouter bekommen sie **unseren AI-Service** (`serviceAi`): Modell-Auswahl über mehrere Provider (Anthropic, OpenAI, Mistral, Perplexity, Private LLM), Streaming, Billing und **KI-Audit-Log** (Model-ID, Prompt-Hash, User-ID — deckt Security #9), serverseitige Schlüsselhaltung (deckt #4) und Rate-Limiting (deckt #6). Optional steht der **Agent** (Tools, Memory) zur Verfügung.
- **Voller Modellzugang** — sie nutzen die Modelle, wie sie wollen. **Keine Neutralisierung** in diesem Pfad; Datenschutz/Datenminimierung verantwortet Depoformance selbst (bzgl. Security #7 gilt: CH-Datenhaltung garantiert, Provider-DPAs sind unsere).
- Ihre 9 KI-Funktionen (`parseNeed`, `generateMatchExplanation`, `summarizeTradeOffs`, `generateDecisionBrief`, `classifyMarketSignal`, `generateOfferEmail` …) rufen unseren AI-Endpunkt; Output validieren sie wie gehabt frontendseitig (Zod).
### 11.5 — Response-Format
Ihr erwartetes Format (`{data}` / `{data,total}` / `{code,message}`) wird vom PORTA-API-Vertrag bedient (PORTA liefert bereits paginierte `data`+`total`-Antworten; Fehlerhülle wird angeglichen).
### 11.7 — „Offene Punkte" → bereits PORTA-Plattformfunktionen
| Ihr offener Punkt | PORTA |
|---|---|
| Echtzeit-Updates (WebSocket/SSE) | **SSE wird in PORTA bereits eingesetzt** (Dashboard, Live-Sessions) — verfügbar statt Polling |
| Datei-Upload (Dokumente) | **Datei-/Ordner-Verwaltung + Dokument-Extraktion** (`serviceExtraction`: PDF/DOCX/XLSX) vorhanden |
| E-Mail-Versand | **`serviceMessaging`** (E-Mail-Versand) vorhanden — sie erzeugen Text, PORTA versendet |
| Benachrichtigungen | Notifications über `serviceMessaging` |
| Mehrsprachigkeit (i18n) | **DB-basiertes i18n mit AI-Übersetzung** vorhanden |
| Pagination (`limit/offset`) | Standard in der CRUD-Schicht |
| CI/CD | **Automatisierte Tests + Deploy-Pipeline** bereits Standard — kein Thema für sie |
### 11.8 — Deployment / Hosting → PORTA-Infrastruktur (CH)
Backend-REST, PostgreSQL, CORS, HTTPS stellt PORTA bereit; **Datenresidenz CH** garantiert. Ihr Frontend bleibt ein statisches Build und spricht die PORTA-API an.
### 11.9 — Security-Go-Live-Gate (10 Punkte) → weitgehend PORTA-Standard
| # | Anforderung | PORTA |
|---|---|---|
| 1 | Serverseitige Autorisierung pro Endpunkt | RBAC erzwingt das zentral (CRITICAL ✓) |
| 2 | Mandantentrennung aus dem Token | SQL-Filter nach `mandateId` aus dem Token (✓) |
| 3 | Echte Auth, JWT-Expiry, kein Demo-Login | JWT-Auth + Expiry vorhanden (✓) |
| 4 | KI-Key serverseitig | AI-Gateway, Keys serverseitig (✓) |
| 5 | Prompt-Injection-Härtung | im AI-Gateway adressierbar (Delimiter/Längen) |
| 6 | Rate-Limiting KI-Calls | Limiter vorhanden (✓) |
| 7 | Datenschutz/DPA bei KI | CH-Hosting + Provider-DPAs unsererseits; Private LLM für sensible Daten möglich |
| 8 | Session-Mechanik | Token-Refresh/Expiry vorhanden (✓) |
| 9 | KI-Audit-Log | AI-Datenfluss-Log vorhanden (✓) |
| 10 | Transport-/Browser-Härtung | HTTPS/CSP/SameSite/CSRF vorhanden (✓) |
## Was bei Depoformance bleibt
- **Frontend** (alle Seiten, UI-State) — unverändert.
- **Matching-Engine** (scoreCalculator, mustHaveScorer, rankingEngine, tradeOffAnalyzer) — läuft heute im Frontend; bleibt dort (sofern sie es nicht aktiv ins Backend verlagern wollen).
- **Domänenlogik der UI** — Darstellung, Workflows, Validierung im Frontend.
## Was Depoformance einhalten muss (Integrations-Standards)
1. **Authentifizierung gegen PORTA** (Login/Token); Aufrufe mit dem von PORTA ausgestellten Token. Secret nie im Browser-Code.
2. **Server-zu-Server** aus ihrer App; kein direkter Browser-Call gegen PORTA.
3. **Response-/Fehlerformat** und **Pagination** (`limit`/`offset`) gemäss PORTA-Vertrag konsumieren.
4. **Rate-Limits** beachten (429 mit Backoff).
5. **Async**: lange Operationen (Extraktion, Ingestion) als Job-ID → Polling.
6. **Versionierter Vertrag** `/api/v1/...`.
7. **Datenanbindungen spezifizieren** (welche Quellen) — Anbindung läuft über PORTAs Konnektor-Schicht, Datenhaltung CH.
## Billing / Pricing (selbst kalkuliert)
Zwei Komponenten: **einmalige Umsetzung** (Partner-Router + Anbindung) und **laufende API-Nutzung**.
### A) Einmalig — Umsetzung
Kalkulationsbasis: Aufwand für Partner-Router, Auth/Token, AI-Durchschleifung, Daten-/Konnektor-Endpunkte, Response-Adapter, OpenAPI-Doku, Tenant-/Billing-Setup, Tests und Integrationsbegleitung.
| Posten | Aufwand |
|---|---|
| Partner-Router + Auth/Token + Tenant-Setup | ~45 PT |
| AI-Endpunkt(e) durchschleifen (serviceAi) | ~34 PT |
| Daten-/Konnektor-Endpunkte + Response-Adapter | ~68 PT |
| OpenAPI-Doku + Integrationsbegleitung + Tests | ~34 PT |
| **Summe** | **~1621 PT** |
Bei einem Satz von CHF 180/h (8 h/PT = CHF 1'440/PT) ergibt das **CHF 23'00030'000** als T&M-Äquivalent.
> **Fixpreis-Paket Umsetzung: CHF 24'000 einmalig** (Planungssicherheit statt T&M).
> Founding-/Pilot-Option: **CHF 15'000** gegen Referenz/Case-Study.
### B) Laufend — API-Nutzung
| Position | Wert | Begründung |
|---|---|---|
| **API-Grundgebühr** | **CHF 600 / Monat** | Betrieb + Wartung Partner-Router, CH-Hosting, Verfügbarkeit, Support, Vertragspflege |
| inkl. API-Calls (Fair-Use) | bis **100'000 Calls/Monat** | im Grundpreis enthalten |
| API-Calls darüber | **CHF 0.40 / 1'000 Calls** | nutzungsbasiert |
| **AI-Verbrauch** | **pay-as-you-go in CHF**, +15 % Plattformaufschlag auf Modellkosten, Cost-Cap pro Mandant | transparent nach Verbrauch |
**Beispiel-Monat:** Grundgebühr 600 + 50k Calls (inkl.) + AI-Verbrauch CHF 200 + 15 % = **ca. CHF 830 / Monat**.
> Kein User-/Seat-/Subscription-Pricing. Depoformance verrechnet seinen Endkunden eigenständig.
> Alle Preise CHF, exkl. MWST, Vorschlag/freibleibend. Stand 30.05.2026.
## Betroffene Module
- **platform-core:**
- **Partner-Router** `/api/v1/depoformance/*` (eigene Routendatei) — exponiert ihre Endpunkte, schleift intern durch + Response-Adapter auf ihr Format.
- Property-Match **Feature-Datenmodell** + RBAC-Katalog (Entitäten, Aktions-Endpunkte) → nutzt generische CRUD-/Pagination-/RBAC-Schicht.
- AI-Zugang über `serviceAi` (Modell-Auswahl, Audit, Streaming) — **kein** OpenRouter.
- Datenanbindungen via Konnektoren / `serviceWeb` / `serviceKnowledge` / `serviceExtraction`.
- Wiederverwendung: `serviceMessaging` (Mail/Notifications), i18n, SSE, Auth/RBAC, Rate-Limiting, AI-Audit-Log.
- OpenAPI-Doku für den Partner-Router.
- **platform:** Mandant Depoformance + Feature-Instanz; CH-Residenz; Abrechnung (einmalig + API-Nutzung).
- **DB-Migration:** ja (Property-Match-Domänenmodell).
- **ui-nyla:** nicht betroffen.
- **Neutralisierung:** in diesem Pfad bewusst **nicht** aktiv.
## Entscheidungen
| Datum | Entscheidung | Begründung |
|-------|-------------|------------|
| 2026-05-30 | **Dedizierter Partner-Router** `/api/v1/depoformance/*`, der ihre Endpunkte durchschleift | Stabiler Vertrag, entkoppelt von internen Routen, pro-Partner Auth/Rate-Limit/Billing |
| 2026-05-30 | Ihre Wünsche auf PORTA-Plattformbausteine abbilden statt projektspezifisches Backend bauen | Fast alles ist bereits Plattform-Standard |
| 2026-05-30 | **Unser AI-Service statt OpenRouter** | Modell-Auswahl, Billing, Audit, Streaming bereits vorhanden |
| 2026-05-30 | Keine Neutralisierung in diesem Pfad | Freier Modellzugang; Datenschutz verantwortet Depoformance |
| 2026-05-30 | Kein End-User-Management/Subscription über PORTA | Steht nicht in ihrer Doku; ihr UI ist eigenständig |
| 2026-05-30 | **Pricing: einmalig CHF 24'000 + API-Grundgebühr CHF 600/Mo + AI pay-as-you-go** | Einmalaufwand gedeckt, laufend nutzungsbasiert |
| 2026-05-30 | CH-Datenresidenz garantiert | Kundenanforderung |
## Offene Punkte (Produkt-/Business — keine Backend-Technik)
- **Datenhoheit/Umfang**: Welche Entitäten hostet PORTA, was bleibt in ihrer App? Bleibt die **Matching-Engine** im Frontend oder soll sie ins Backend?
- Welche **Datenquellen** sollen angebunden werden (Konnektor-Aufwand)?
- Erwarteter **AI-Verbrauch** + Cost-Cap.
- **Vertragspartner** und **Go-Live-Termin**.
## Aufwand (grob, Richtwert, 1 Dev)
Siehe Kalkulation unter Pricing A) — **~1621 PT** für Partner-Router, AI-Durchschleifung, Daten-/Konnektor-Endpunkte, Response-Adapter, OpenAPI, Tenant-/Billing-Setup und Tests. Umfang skaliert mit dem Domänenanteil, den PORTA hostet (offener Punkt). Vorherige Detail-Schätzung:
- Property-Match-Datenmodell + RBAC-Katalog + Aktions-Endpunkte: ~815 PT (Umfang abhängig vom gehosteten Domänenanteil)
- AI-Zugang als `/api/v1`-Vertrag (Wrapper um `serviceAi`): ~35 PT
- Datenanbindungen produktisieren: ~48 PT
- OpenAPI-Doku + Tenant-/Billing-Setup: ~35 PT
## Links
- Depoformance Techdoku: `pamocreate/projects/poweron/customer-depoformance/Techdoku_Depoformance_Property Match_Mai_2026.pdf`
- Pricing-Grundmodell: `pamocreate/projects/poweron/product-pricing/20-pricing-20260530/20260530-pricing-modelle.md`
- Referenzen: `b-reference/platform-core/architecture.md`, `b-reference/platform/rbac.md`, `b-reference/platform-core/billing.md`, `b-reference/platform/audit.md`, `b-reference/ui-nyla/formgenerator.md`

View file

@ -7,6 +7,13 @@
# AI Reports: Generisches Style-Management, AI-Call-Konfiguration, Inline-Bilder
> **Nachtrag 2026-06-02 (A3-Reconciliation):** Der damalige Entscheid "Theme als reiner
> Prompt-Hint, keine Renderer-Theme-Presets" wurde teilweise revidiert. `documentTheme`
> ist seit 2026-06 als **agent-ueberschreibbare** Preset-Bibliothek (`THEME_PRESETS`/
> `resolveTheme` in `styleDefaults.py`) end-to-end an `renderReport` verkabelt. Presets sind
> Defaults, kein Hard-Mandate: ein explizites `style`-Objekt ueberschreibt einzelne
> Preset-Keys weiterhin. Details: c-work/1-plan/2026-06-po-cleanup-neutralization-docgen.md.
## Beschreibung und Kontext
Drei verzahnte Themen rund um AI-erzeugte Reports und AI-Calls in

View file

@ -0,0 +1,272 @@
<!-- status: done -->
<!-- started: 2026-06-02 -->
<!-- component: gateway | ui-nyla | platform -->
# PO-Cleanup: Chatbot-Entfernung + Neutralisierung (Quellen/Felder & Denormalisierung) + Dokumentengenerierung
## Beschreibung und Kontext
Vier zusammenhaengende Aufraeum-/Verbesserungsarbeiten an der Plattform:
- **A0 (Cleanup, dringend):** Das Feature `chatbot` wird nicht mehr benoetigt und soll **vollstaendig aus dem Code** entfernt werden (UI + Backend: Routen, Interfaces, Datamodels, Methoden, RBAC-/i18n-/Registry-Hooks, Tests). Zusaetzlich: **LangChain/LangGraph komplett entfernen** (Deps + Code) und die verbleibenden Nutzer (`realEstate`-BZO-Extraktion, `ChatStreamingHelper`) auf die **regulaere AI-Service-Nutzung** umstellen, wie alle anderen Nutzer im System. **Wiki nachfuehren:** Chatbot-Komponente in der aktuellen Doku entfernen bzw. ins Archiv verschieben. Scope: **keine DB-Zeilen-Bereinigung** (Feature-/Instanz-Rows, RBAC-Rollen, Drop `poweron_chatbot` separat).
- **A1 (Neutralisierung — Anreicherung/Denormalisierung):** Pruefen, dass denormalisierte (rueckuebersetzte) Inhalte **nie** persistiert werden, und einen sicheren Agent-Pfad bereitstellen, der Platzhalter ausschliesslich lokal (Private-LLM-Mapping) rueckuebersetzt und zum **Download ohne Speicherung** zurueckgibt.
- **A2 (Neutralisierung — Quellen/Felder):** Die Feld-Neutralisierung bei `FeatureDataSource`-Abfragen so korrigieren, dass Datensaetze nicht unbrauchbar werden: Strings immer (substring-basiert) neutralisieren, Binary droppen, andere Typen nur bei explizitem Feld-Flag — vererbungs- und typbewusst.
- **A3 (Dokumentengenerierung):** Dokumente sehen heute alle gleich aus (ein Standard-Style). Typ-spezifisches Styling (z. B. Klageschrift vs. Marketing mit Bildern) ermoeglichen und die Eignung der Renderer fuer **sehr grosse Dokumente** (z. B. 1000-seitiges Word-Buch mit eingebetteten Bildern) klaeren/verbessern.
**Business-Treiber:** Reports/Dokumente sind das sichtbare Endprodukt beim Kunden; Neutralisierung ist Compliance-kritisch (kein Klartext-Leak in Storage). Chatbot-Reste erhoehen Wartungslast und RBAC-/i18n-Rauschen.
**Risiko bei Nicht-Umsetzung:** A0 — toter Code + verwirrende Admin-UI. A1 — Datenschutzrisiko (Klartext im Storage) und ein dokumentierter, aber nicht implementierter Pfad. A2 — neutralisierte DB-Datensaetze sind fuer den Sub-Agent unbrauchbar bzw. inkonsistent gegenueber der UI. A3 — Reports wirken unprofessionell und grosse Dokumente koennen OOM/Timeout verursachen.
**Abhaengigkeiten:** A1 und A2 nutzen dieselbe `NeutralizationService`-Engine; aenderungen an der dokumentierten Invariante in [b-reference/platform/neutralization.md](../../b-reference/platform/neutralization.md) + [e-compliance/neutralisierung-detail.md](../../e-compliance/neutralisierung-detail.md). A3 beruehrt den ADR aus [4-done/2026-04-ai-reports-theming-and-pipeline.md](../4-done/2026-04-ai-reports-theming-and-pipeline.md) (bewusste Entscheidung GEGEN Theme-Presets).
## Fokus und kritische Details
### A0
- Feature-Discovery ist **glob-basiert** (`loadFeatureRouters` / `loadFeatureMainModules` in `modules/system/registry.py`) — Loeschen des Ordners ist boot-sicher; der Loader ueberspringt fehlende Module.
- **`chatbot`-Feature** (`featureCode=chatbot`, LangGraph, DB `poweron_chatbot`, `ChatbotConversation/Message/Document/Log`) ist **klar getrennt** vom generischen Agent-**Chat** (`datamodelChat.py`: `ChatWorkflow/ChatMessage`, Workspace). Letzteres **bleibt**.
- `methodChatbot` ist chatbot-spezifisch und wird entfernt; `methodAi` ist **unabhaengig** und bleibt.
- `WorkflowModeEnum.WORKFLOW_CHATBOT` in `datamodelChat.py` wird ausserhalb der Datei nicht referenziert — Datei bleibt, nur das Enum-Element + `frontend_options`-Eintrag entfernen.
- **LangChain/LangGraph wird komplett entfernt.** Die einzigen Nicht-Chatbot-Nutzer sind:
- `realEstate/bzoExtractionLangGraph.py`: nutzt `langgraph.graph.StateGraph` nur als **triviale Orchestrierung**. `create_bzo_extraction_graph()` ist eine lineare 4-Knoten-Pipeline aus reinen Python-/Regex-Funktionen (`classify_and_assemble` -> `extract_zones_and_tables` -> `extract_rules`) **ohne LLM** -> ersetzbar durch sequenzielle Funktionsaufrufe. `create_bzo_params_extraction_graph()` ist ein **Ein-Knoten-Graph** um `llm_extract_bauzone_params_node`, der den LLM-Call **bereits ueber `ai_service.callAiPlanning(...)`** macht (also schon regulaerer AI-Service) -> Knoten direkt awaiten. Es ist **keine** LangChain-Model-Bridge noetig.
- `serviceCenter/core/serviceStreaming/helpers.py` (`ChatStreamingHelper`): nutzt `langchain_core.messages`; **einzige Konsumenten sind die Chatbot-Module** (mainChatbot/service/chatbot, in A0 entfernt) -> nach A0 unbenutzt, kann mit `helpers.py` + den `serviceStreaming`-Exports entfernt werden.
- `requirements.txt`: `langchain`, `langchain-core`, `langgraph`, `langchain-tavily`, `nest-asyncio` (nur fuer LangGraph) entfernen; `requirements.lock` neu erzeugen.
- `AdminFeatureAccessPage.tsx` traegt die meisten UI-Referenzen (~82) — chirurgisch, nicht Datei loeschen.
### A1
- Reverse-Resolution ist ein **DB-Mapping-Lookup** (`NeutralizationService.resolveText`: `[typ.uuid]` -> `DataNeutralizerAttributes.originalText`), **kein** LLM-Call. Der Private-LLM macht nur die **Vorwaerts**-Erkennung. Das ist der datenschutzsichere Pfad (lokal, deterministisch, kein externes Modell sieht Klartext).
- `_rehydrateResponse()` in `mainServiceAi.py` ist **toter Code** (keine Call-Sites), die Docstrings behaupten aber automatische Rehydration — Chat persistiert die Modell-Antwort **wie geliefert** (kein Re-Save mit Klartext). Doc/Impl-Mismatch.
- Tatsaechliche Klartext-Risiken liegen NICHT bei der Denormalisierung, sondern bei: `downloadFromDataSource` (Roh-Bytes at rest), `writeFile`/`renderDocument` (agent-komponierter Inhalt), `RoundMemory.fullData`.
### A2
- Aktuell: `_neutralizeRowFields` ersetzt den **ganzen Feldwert** durch `[NEUT.<field>.<hash>]`, nur fuer explizit gelistete `neutralizeFields`; die Maskenliste in `_featureSubAgentTools.py` ignoriert **vererbte** `neutralize`-Flags zur Query-Zeit; keine Typ-Verzweigung; Binary wird zu `"<binary N bytes>"` stringifiziert und ggf. gehasht (nicht gedroppt).
- Das ist die **heute dokumentierte** Invariante (neutralization.md Failsafe 5/6) — A2 aendert sie bewusst.
- Substring-Neutralisierung pro String-Zelle via Private-LLM erzeugt Latenz/Kosten bei grossen Result-Sets — Batching + bestehender 5-Min-Result-Cache als Mitigation.
### A3
- JSON-Dokumentmodell + Unified-Style-Schema sind ein **Asset**, nicht das Problem.
- Ursache "alle Dokumente gleich": `resolveStyle(None)` injiziert immer `DEFAULT_STYLE` und reicht es truthy an die Renderer (`mainServiceGeneration.py` ~L410/L475); der Agent setzt `style` selten; `documentTheme` ist **deklariert, aber nicht verkabelt** (`methodAi.py`). Renderer sind in Ordnung — **Orchestrierung** ist die Luecke.
- **ADR-Spannung:** [2026-04-ai-reports-theming-and-pipeline.md](../4-done/2026-04-ai-reports-theming-and-pipeline.md) entschied bewusst GEGEN Theme-Presets/Mandate-CI und FUER "Agent fuellt generischen Style-Block". Der Wunsch nach typ-spezifischem Styling (Klageschrift/Marketing) wird damit nur erreicht, wenn der Agent den Style wirklich treibt. Vorschlag (ADR-konform): Presets als **smarte Defaults**, die der Agent waehlt und ueberschreiben kann — nicht als harte Vorgabe.
- Grosse Dokumente: voll **in-memory**, Bilder als **base64 im JSON**, **kein** Streaming (reportlab `doc.build`, python-docx `Document()`). Das ist der echte Blocker fuer 1000 Seiten + Bilder.
#### A3 Grossdokument-Analyse & Empfehlung (2026-06-02, AC15 — Schritt 1+2 UMGESETZT)
Status: **Schritt 1+2 umgesetzt+getestet; Schritt 3 (HTML-Backend) bewusst geschlossen (nein).** Theming (AC13) ist umgesetzt+getestet.
Konkrete Engpaesse (mit Fundstellen):
- **Ein grosses JSON haelt ALLE Bild-Bytes gleichzeitig.** `_mediaTools._renderDocument` (L110185) loest `file:fileId`-Bilder VOR `renderReport` zu `base64Data` im JSON auf; PDF/DOCX-Renderer (`_renderJsonImage`) lesen ausschliesslich `base64Data`/Data-URI. → Peak-Memory ~ Summe aller Bilder (base64 ≈ +33%).
- **Voll-in-memory Build:** `rendererPdf` baut komplette `story`-Liste + `doc.build` (L198245); `rendererDocx` baut `Document()` und `doc.save` (L122180). Keine Section-/Seiten-Chunking, kein Flush.
Umsetzungsplan (jeweils einzeln testbar):
1. **Lazy File-Ref-Bilder — UMGESETZT 2026-06-02:** Block-Bilder behalten `fileId` statt vorab-`base64Data`. `renderReport(imageResolver=fileId->bytes)` setzt einen Per-Render-Resolver am Renderer (`BaseRenderer._lazyResolveImageBase64`); PDF/DOCX `_renderJsonImage` loesen on-demand auf. `renderDocument` haelt fuer pdf/docx Bilder als Referenz und speist den Resolver aus Knowledge-Chunks/`chat.getFileData`. DOCX: echter Ein-Bild-Speicher (python-docx kopiert Bytes sofort ins Package). PDF: vermeidet base64-Overhead + JSON-Retention; **voll-streamendes PDF (reportlab haelt Image-Flowables bis `doc.build`) erst mit Temp-File-Bildern in Schritt 2**. Tests: `tests/serviceGeneration/test_large_document_render.py` (7 Tests, gruen) — Resolver-Aufrufe == N, Bilder eingebettet, JSON bleibt base64-frei.
2. **Temp-File-Bilder fuer PDF — UMGESETZT 2026-06-02:** PDF nutzt datei-basierte `Image(tmpPath)`-Flowables (`rendererPdf._renderJsonImage` schreibt Bytes in `tempfile.NamedTemporaryFile`, reportlab liest erst beim `doc.build` von Disk; Cleanup in `finally` via `_cleanupTempImageFiles`). Damit sind nicht mehr alle Bild-Bytes gleichzeitig resident — echtes Streaming auch fuer PDF. python-docx bleibt single-`save` (Lib-Grenze), kopiert Bytes aber bereits beim `add_picture` (Ein-Bild-Speicher). Section-Chunking ueber mehrere `doc.build`-Passes wurde NICHT umgesetzt: reportlab braucht die Story fuer eine `SimpleDocTemplate.build` ohnehin komplett, und Text-Flowables sind gegenueber den (jetzt datei-basierten) Bildern vernachlaessigbar — der eigentliche OOM-Treiber ist beseitigt. Tests: `test_pdf_images_are_file_backed_and_cleaned`.
3. **Optionales HTML-first-Backend — ENTSCHIEDEN: nein (2026-06-02):** WeasyPrint/Chrome wird NICHT als Zusatz-Backend eingefuehrt. Begruendung: Lazy- + Temp-File-Bilder beseitigen den Memory-Engpass fuer die unterstuetzten Formate; ADR 2026-04 sprach explizit gegen einen WeasyPrint-Ersatz. Bleibt als optionaler Future-Pfad ohne aktuellen Bedarf.
Bis dahin gilt als Mitigation der bestehende `writeFile`+`renderDocument(sourceFileId=…)`-Pfad (vermeidet riesige Tool-JSONs), und der PDF-Overflow-Guard (`_buildPdfWithOverflowGuard`) verhindert Layout-Abbrueche durch uebergrosse Bilder.
## Ziel und Nicht-Ziele
### Ziel
- **A0:** Keine lebenden `chatbot`-Symbole/Referenzen mehr im Code (Backend + UI); kein LangChain/LangGraph-Import oder -Dep mehr; `realEstate`-BZO-Extraktion + `ChatStreamingHelper`-Pfad auf regulaeren AI-Service/Std-Python umgestellt; aktuelle Wiki-Doku ohne Chatbot-Komponente; Boot, Tests, Build gruen.
- **A1:** Korrekte/ehrliche Doku + neues Agent-Tool, das Platzhalter via lokalem Mapping rueckuebersetzt und **transient** (Download, kein Save/Index/RoundMemory) zurueckgibt; toter Rehydrate-Code entfernt.
- **A2:** Feld-Neutralisierung gemaess Regeln 14 (siehe unten), vererbungs- und typbewusst, konsistent zwischen Query-Pfad und RAG-Bootstrap.
- **A3:** `documentTheme` end-to-end verkabelt + kleine Preset-Bibliothek (agent-ueberschreibbar); Layout-Primitive fuer echte Dokumenttypen; Grossdokument-Pfad (File-Referenz-Bilder + Chunked/Streamed-Render).
### Explizit NICHT
- A0: **keine** DB-Zeilen loeschen, **kein** Drop von `poweron_chatbot`. **z-archive-Inhalte NICHT inhaltlich anpassen** — nur Dokumente ins Archiv verschieben, wo noetig. Keine funktionale Aenderung an der `realEstate`-BZO-Logik (nur Orchestrierung/Imports), keine Aenderung am Extraktions-Ergebnis.
- A1: keine automatische Rehydration der Modell-Antwort wieder einfuehren; kein externer LLM fuer Reverse-Resolution.
- A2: keine Aenderung an der Engine selbst (`NeutralizationService`), nur an Aufruf/Policy in `featureDataProvider`/Sub-Agent-Tool; externe Connector-Quellen (Folder-Level) bleiben unveraendert.
- A3: kein vollstaendiger Renderer-Austausch als Pflicht; HTML-first-Backend nur als **zusaetzliches**, format-waehlbares Backend (Entscheidung offen).
## Betroffene Module
### A0 — Gateway (loeschen)
- `modules/features/chatbot/` (gesamt: mainChatbot, routeFeatureChatbot, interfaceFeatureChatbot, service, chatbot, config, chatbotConstants, `bridges/*`, `__init__`)
- `modules/workflows/methods/methodChatbot/` (methodChatbot, `actions/queryDatabase`, `__init__`)
- `scripts/script_db_init_chatbot.py`
- `tests/demo/test_demo_uc3_chatbot.py`
- `docs/althaus-bot-v2-aufwandsschaetzung.md`, `-fragenkatalog.md`, `-preprocessor-assessment.md`
### A0 — Gateway (chirurgisch)
- `modules/routes/routeSystem.py` (`_getUiObjectsForFeature("chatbot")`-Branch)
- `modules/routes/routeAdminFeatures.py` (Config-Cache-Invalidierung ~L781 + Docstrings)
- `modules/shared/gdprDeletion.py` (Chatbot-Interface-Branch ~L578)
- `modules/interfaces/interfaceRbac.py` (`DATA_OBJECT_NAMESPACE_MAP` Chatbot*-Eintraege + `USER_OWNED_NAMESPACES` "chatbot")
- `modules/shared/i18nRegistry.py` (`mainChatbot` in beiden `_featureModulePaths`-Tupeln)
- `modules/datamodels/datamodelChat.py` (`WORKFLOW_CHATBOT`-Enum + `frontend_options`-Eintrag)
- `tests/unit/methods/test_action_signature_validator.py` (L267), `tests/demo/test_demo_bootstrap.py` (`test_*NoChatbot`), `tests/demo/README.md`
- `scripts/script_migrate_user_uid.py`, `scripts/script_db_export_migration.py` (`poweron_chatbot`/`DB_CHATBOT`)
- Nur Kommentare (kein Verhalten): `modules/aicore/aicoreModelRegistry.py`, `app.py`, `modules/workflows/methods/methodAi/methodAi.py`, `requirements.txt`
### A0 — Frontend (loeschen)
- `src/api/chatbotApi.ts`, `src/hooks/useChatbot.ts`
- `src/pages/views/chatbot/` (ChatbotConversationsView, ChatbotViews.module.css, index)
- `src/pages/admin/ChatbotConfigSection.tsx`
- `work-around/chatbot.ts`
### A0 — Frontend (chirurgisch)
- `src/App.tsx` (Legacy-Redirect `chatbot`)
- `src/pages/FeatureView.tsx` (Import, `ChatbotSettings`, `FEATURE_VIEWS.chatbot`, DEBUG)
- `src/config/pageRegistry.tsx` (Icon-Keys)
- `src/types/mandate.ts` (`FEATURE_VIEW_REGISTRY.chatbot`)
- `src/pages/admin/AdminFeatureAccessPage.tsx` (Import + State/Config-Builder + JSX-Bloecke)
- `src/pages/admin/Admin.module.css` (`.chatbotConfigSection`), `src/styles/pages.module.css` (`.chatbot*`)
- `src/stores/featureStore.tsx`, `src/api/featuresApi.ts` (inkl. Mock-Fallback), `src/hooks/useInstancePermissions.tsx` (DEBUG + Keys)
### A0 — LangChain/LangGraph-Entfernung + Migration (Gateway)
- `modules/features/realEstate/bzoExtractionLangGraph.py` -> umbenennen zu `bzoExtraction.py`: `from langgraph.graph import StateGraph, START, END` entfernen; `create_bzo_extraction_graph()`/`graph.invoke(state)` durch sequenziellen Aufruf (`classify_and_assemble` -> `extract_zones_and_tables` -> `extract_rules`) ersetzen; `create_bzo_params_extraction_graph()`/`graph.ainvoke(state)` durch direktes `await llm_extract_bauzone_params_node(state)` ersetzen (LLM-Call bleibt `ai_service.callAiPlanning`)
- `modules/features/realEstate/mainRealEstate.py` (L281 Import anpassen; Kommentare L2334/L2492/L2546 "LangGraph" entfernen)
- `modules/features/realEstate/routeFeatureRealEstate.py` (Docstrings L709/L790 "LangGraph"), `modules/routes/routeRealEstate.py` (Docstrings L2237/L2243)
- `modules/serviceCenter/core/serviceStreaming/helpers.py` (loeschen — `ChatStreamingHelper`/`langchain_core`), `serviceStreaming/__init__.py` (Export entfernen), `serviceStreaming/mainServiceStreaming.py` (`getChatStreamingHelper()` entfernen)
- `requirements.txt` (langchain/langchain-core/langgraph/langchain-tavily/nest-asyncio entfernen) + `requirements.lock` neu erzeugen
### A0 — Wiki nachfuehren (aktive Doku; z-archive-Inhalte unveraendert)
- Chatbot-Referenzen aus aktiven Docs entfernen: `b-reference/product.md` (Feature-Zeile + Repo-/Tech-Stack), `b-reference/platform/database-architecture.md` (`poweron_chatbot`), `b-reference/platform-core/workflow.md`, `b-reference/platform-core/architecture.md`, `b-reference/platform/platform-diagrams.md`, `b-reference/ui-nyla/architecture.md`, `e-compliance/security-overview.md`, `README.md` (Verweis auf nicht-existentes `features/chatbot.md`)
- LangChain/LangGraph aus Tech-Stack-/Architektur-Doku entfernen, wo erwaehnt (`b-reference/product.md`, `b-reference/platform-core/architecture.md`)
- `a-strategy/roadmap.md`: Chatbot-Erwaehnungen pruefen/streichen (Strategie-Doc — nur wenn als aktive Komponente gefuehrt)
- Falls ein aktives Doc rein Chatbot-spezifisch ist: nach `z-archive/` **verschieben** (keine inhaltliche Aenderung). Aktuell existiert kein dediziertes aktives Chatbot-Reference-Doc -> ueberwiegend chirurgische Entfernung
- `c-work/_CHANGELOG.md`: Eintraege fuer Chatbot-Removal + LangChain-Removal
### A1 — Gateway
- `modules/serviceCenter/services/serviceAgent/coreTools/_mediaTools.py` (neues Tool, z. B. `revealDocument`)
- `modules/serviceCenter/services/serviceAgent/toolboxRegistry.py` (restriktive Toolbox)
- `modules/serviceCenter/services/serviceAi/mainServiceAi.py` (`_rehydrateResponse` entfernen, Docstrings korrigieren)
- `modules/features/neutralization/serviceNeutralization/mainServiceNeutralization.py` (`resolveText` wiederverwenden)
### A2 — Gateway
- `modules/serviceCenter/services/serviceAgent/featureDataProvider.py` (`_neutralizeRowFields`, `_applyFieldNeutralization`, `_serializeRow`)
- `modules/serviceCenter/services/serviceAgent/coreTools/_featureSubAgentTools.py` (Maskenliste-Aufbau)
- `modules/serviceCenter/services/serviceKnowledge/udbNodes.py` (`FdsFieldNode.getEffectiveFlag`), `_inheritFlags.py` (Resolver)
- `modules/serviceCenter/services/serviceKnowledge/subFeatureBootstrap.py` (`_serializeRowToText` angleichen)
### A3 — Gateway
- `modules/serviceCenter/services/serviceGeneration/styleDefaults.py` (`THEME_PRESETS`, `resolveTheme`)
- `modules/serviceCenter/services/serviceGeneration/mainServiceGeneration.py` (Theme-Aufloesung)
- `modules/serviceCenter/services/serviceGeneration/renderers/*` (Layout-Primitive, File-Ref-Bilder, Chunking)
- `modules/serviceCenter/services/serviceAgent/coreTools/_mediaTools.py` (`renderDocument`: Theme/Style aus Intent, `aiService` durchreichen)
- `modules/workflows/methods/methodAi/methodAi.py` + `actions/generateDocument.py` (`documentTheme` durchreichen)
- `modules/datamodels/datamodelJson.py` (Layout-Section-Typen)
### DB-Migration
- A0: **nein** (Code-only; DB-Cleanup separat). A1: **nein**. A2: **nein** (Verhalten, keine Schema-Aenderung). A3: ggf. additive Schema-Erweiterung im JSON-Modell (kein DB-Pflichtfeld).
### Andere Komponenten
- `service-llm-private`, `service-preprocessing`, `service-teams-browser-bot`: **keine** chatbot-spezifischen Anpassungen noetig (A0). A1/A2 nutzen Private-LLM-Ratings (bereits vorhanden).
- Deployment: nach LangChain-Removal Build/Image ohne diese Deps verifizieren (kleinere Image-Size, keine `nest-asyncio`-Patches).
## Entscheidungen
| Datum | Entscheidung | Begruendung |
|-------|-------------|------------|
| 2026-06-02 | A0 nur Code (keine DB/Wiki/Archive) | User-Scope-Entscheid; DB-Cleanup separat |
| 2026-06-02 | `datamodelChat.py` bleibt; nur `WORKFLOW_CHATBOT`-Enum entfernen | Agent-Chat ist unabhaengig vom Chatbot-Feature |
| 2026-06-02 | LangChain/LangGraph komplett entfernen, verbleibende Nutzer migrieren | User-Entscheid; Nutzung ist trivial ersetzbar (realEstate-LLM laeuft schon ueber `callAiPlanning`, `ChatStreamingHelper` nur vom Chatbot genutzt) |
| 2026-06-02 | `bzoExtractionLangGraph.py` -> `bzoExtraction.py`: StateGraph durch sequenzielle Aufrufe ersetzen | Graphen sind lineare/Ein-Knoten-Pipelines; kein Funktionsverlust |
| 2026-06-02 | Aktive Wiki-Doku ohne Chatbot/LangChain; z-archive nur verschieben, nicht anpassen | User-Entscheid (Wiki nachfuehren) |
| 2026-06-02 | A1: Reverse-Resolution bleibt DB-Mapping-Lookup (kein externer LLM) | Datenschutzsicher, deterministisch; "Private LLM" = lokal/intern |
| 2026-06-02 | A1: Neues Tool gibt transient zum Download zurueck, niemals Save/Index/RoundMemory | Klartext darf nicht at-rest landen |
| 2026-06-02 | A1: `_rehydrateResponse` entfernen statt verkabeln | Toter Code + Doc/Impl-Mismatch; Auto-Rehydration ist Datenschutzrisiko |
| 2026-06-02 | A2: String-Zellen substring-neutralisieren (Feldname als Typ-Hint) statt Whole-Value-Hash | Datensaetze bleiben brauchbar; Platzhalter-Typ passend zum Feld |
| 2026-06-02 | A2: Binary droppen statt maskieren | Spez-Regel 2; Binary nie neutralisieren |
| 2026-06-02 | A2: number/date/bool nur bei EXPLIZITEM Feld-Flag (nicht vererbt) | Spez-Regel 3 |
| 2026-06-02 | A2: Query-Maske aus effektivem Flag (Vererbung) statt nur `neutralizeFields`-Liste | UI-Effektivwert = Laufzeitverhalten |
| 2026-06-02 | A3: Presets als agent-ueberschreibbare Defaults (kein Hard-Mandate) | Reconciliation mit 2026-04-ADR |
| 2026-06-02 | A3: Theme-Wahl agent-getrieben via `documentTheme`-Tool-Param (Enum + Beschreibung), kein serverseitiges Auto-Select | ADR-konform (Agent treibt Style); kein zusaetzlicher LLM-Call noetig |
| 2026-06-02 | A3: Layout-Primitive = `cover_page` + `image_grid` (Markdown-Fenced-Bloecke); `letterhead`/`multi-column` zurueckgestellt | Hoechster Nutzen (Klageschrift-Titelseite, Marketing-Bildraster); multi-column ist Page-Template-Thema, nicht Block-Primitive |
| 2026-06-02 | A3: HTML-first-Backend (WeasyPrint/Chrome) — ENTSCHIEDEN: nein | Lazy+Temp-File-Bilder loesen Memory-Engpass; ADR sagte "kein WeasyPrint-Ersatz" |
## Umsetzungs-Checkliste
### A0 — Chatbot entfernen (Code)
- [x] Backend-Verzeichnisse/Dateien loeschen (siehe Betroffene Module)
- [x] Backend chirurgische Edits (routeSystem, routeAdminFeatures, gdprDeletion, interfaceRbac, i18nRegistry, datamodelChat, Tests, Scripts)
- [x] Frontend-Dateien loeschen
- [x] Frontend chirurgische Edits (App, FeatureView, pageRegistry, mandate, AdminFeatureAccessPage, CSS, Stores/Hooks/Api DEBUG+Keys)
- [x] LangChain/LangGraph entfernen + migrieren: `bzoExtractionLangGraph.py` -> `bzoExtraction.py` (StateGraph raus), `mainRealEstate.py`-Import, `ChatStreamingHelper`/`helpers.py` + `serviceStreaming`-Exports entfernen, `requirements.txt`
- [x] Wiki nachfuehren: Chatbot + LangChain aus aktiven b-reference/e-compliance-Docs entfernen; ggf. Doc nach z-archive verschieben; `_CHANGELOG.md`
- [x] Verifikation: Boot ok, `pytest` gruen, `tsc`/`vite build` gruen, keine lebenden `chatbot`/`langchain`/`langgraph`-Referenzen im Code; BZO-Extraktion liefert identisches Ergebnis wie vorher
- [~] `requirements.lock` NICHT noetig (Projekt nutzt nur `requirements.txt`) — Punkt gestrichen (User-Entscheid 2026-06-02)
### A1 — Denormalisierung sicher
- [x] Agent-Tool `revealDocument` (resolveText, mandate/instance-scoped, transient/no-save, `readOnly=True`)
- [x] In restriktiver Toolbox registrieren (`neutralization`-Toolbox, `isDefault=False` -> explizit via `requestToolbox`); RBAC ueber bestehende Neutralisierungs-Feature-Access
- [x] `_rehydrateResponse` entfernen + Docstrings in `callAi`/`callAiStream` korrigieren
- [x] Doku: neutralization.md (Failsafe 8 + Tool), neutralisierung-detail.md
- [x] Leak-Pfade dokumentieren (downloadFromDataSource/RoundMemory) + Folge-Ticket-Hinweis (neutralization.md "Bekannte Klartext-at-rest-Pfade")
### A2 — Feld-Neutralisierung
- [x] `_resolveFieldsToMaskForTable`/`neutralizePolicy` (spiegelt `FdsFieldNode.getEffectiveFlag`)
- [x] Regel 1: String-Zellen substring-neutralisieren via `NeutralizationService` mit Feldname-Typ-Hint
- [x] Regel 2: Binary-Spalten vor Serialisierung droppen
- [x] Regel 3: number/float/int/date/bool nur bei explizitem Feld-Flag
- [x] RAG-Bootstrap `_serializeRowToText` an denselben Resolver/dieselbe Platzhalter-Policy angleichen (`finalizeRowsAsync`/`_neutralizeAndSerializeRows`)
- [x] Doku: neutralization.md Failsafe 5/6 + neutralisierung-detail.md Abschnitt 3
### A3 — Dokumentengenerierung
- [x] `THEME_PRESETS` + `resolveTheme(name)` in `styleDefaults.py` (deep-merge auf DEFAULT_STYLE, agent-ueberschreibbar)
- [x] `documentTheme` end-to-end verkabeln (Node/Action -> `renderReport(documentTheme=...)`)
- [x] `renderDocument`: Theme agent-getrieben via Tool-Param (Enum+Beschreibung); kein serverseitiges Auto-Select (ADR-konform)
- [x] JSON-Layout-Primitive `cover_page` + `image_grid` (Markdown-Fenced-Bloecke) + PDF/DOCX-Handler; `letterhead`/`multi-column` zurueckgestellt
- [x] Grossdokumente: File-Referenz-Bilder statt base64 (Schritt 1) + Temp-File-PDF-Bilder (Schritt 2)
- [x] HTML-first-Backend evaluiert -> ENTSCHIEDEN: nein (nicht benoetigt)
### Querschnitt
- [x] RBAC / Permissions: A0 entfernt Chatbot-RBAC-Objekte/Template-Rollen aus Code; A1 Tool-Zugriff ueber bestehende Neutralisierungs-Rechte
- [x] Neutralisierung betroffen? A1 + A2 = ja (Doku-Update Pflicht — erledigt)
- [x] Navigation / Routing: A0 entfernt Chatbot-Feature-Views/Routen
- [x] Billing-Impact? Nein (A2 nutzt bestehende AI-Call-Billing)
## Akzeptanzkriterien
| # | Kriterium (Given-When-Then) | Prio |
|---|-----------------------------|------|
| 1 | Given Codebase nach A0, When `rg -i chatbot` (ohne wiki/z-archive), Then keine lebenden Symbole/Routen/Interfaces | must |
| 2 | Given Backend-Boot nach A0, When Worker startet, Then keine ImportError, Feature-Registry laedt ohne Chatbot | must |
| 3 | Given UI-Build nach A0, When `vite build`/`tsc`, Then keine dangling Imports/Typfehler | must |
| 1b | Given Codebase nach A0, When `rg -i "langchain|langgraph"` im Code, Then keine Treffer; `requirements.txt` ohne diese Deps | must |
| 1c | Given dieselbe BZO-PDF vor/nach Migration, When `run_extraction`/`run_bzo_params_extraction`, Then identisches `fakten`/`zones`/`rules`-Ergebnis | must |
| 1d | Given aktive Wiki-Doku nach A0, When durchsucht, Then keine Chatbot-Komponente/LangChain im Tech-Stack; z-archive-Inhalte unveraendert | should |
| 4 | Given Datei mit neutralisiertem Inhalt, When Agent `revealDocument(fileId)` aufruft, Then Klartext wird transient zurueckgegeben und NICHTS gespeichert/indexiert | must |
| 5 | Given `revealDocument`, When ausgefuehrt, Then keine externe LLM-API beteiligt (nur DB-Mapping) | must |
| 6 | Given `mainServiceAi.py`, When Code-Review, Then `_rehydrateResponse` ist entfernt und Docstrings korrekt | should |
| 7 | Given FDS-Tabelle mit `neutralize=True` (vererbt, leere `neutralizeFields`), When `queryTable`, Then String-Felder sind substring-neutralisiert (Platzhalter im Text) | must |
| 8 | Given String-Feld "Name"/"Adresse", When neutralisiert, Then Platzhalter-Typ entspricht dem Feldnamen-Hint | should |
| 9 | Given Binary-Spalte bei aktiver Neutralisierung, When `queryTable`, Then Spalte wird gedroppt (nicht maskiert) | must |
| 10 | Given numerisches Feld nur via Vererbung (nicht explizit), When `queryTable`, Then Wert bleibt unveraendert | must |
| 11 | Given numerisches Feld mit explizitem Feld-Flag, When `queryTable`, Then Wert wird neutralisiert | must |
| 12 | Given RAG-Bootstrap einer FDS-Tabelle, When indexiert, Then dieselbe Policy/Platzhalter wie Query-Pfad | should |
| 13 | Given `renderDocument` mit `documentTheme="legal"`, When gerendert, Then typ-spezifischer Style (nicht DEFAULT_STYLE) | must |
| 14 | Given `renderDocument` ohne Theme/Style, When gerendert, Then neutrale Defaults (kein Crash) | must |
| 15 | Given ~1000-seitiges Dokument mit Bildern, When gerendert, Then kein OOM/Timeout (Chunked + File-Ref-Bilder) | must |
## Testplan
| ID | AC | Art | Automatisiert | Repo-Pfad | Status |
|----|----|-----|--------------|-----------|--------|
| T1 | 1,2,1b | smoke | ja | platform-core (boot + `pytest tests/demo`) | pending |
| T2 | 3 | build | ja | ui-nyla (`tsc`, `vite build`) | pending |
| T1b | 1c | regression | ja | platform-core/tests/features/realEstate/test_bzo_extraction_parity.py | pending |
| T3 | 4,5 | integration | offen | `revealDocument` no-persist: durch Tool-Design (transient SSE, kein Save/Index) + Code-Review abgedeckt; dedizierter Integrationstest braucht volle services-Plumbing -> als Folge-Ticket | deferred |
| T4-T6 | 7-11 | unit | ja | platform-core/tests/unit/serviceAgent/test_field_neutralization.py (8 Tests: string/hint/binary-drop/inherited-skip/explicit/failsafe/dedup) | **done** |
| T7 | 12 | unit | ja | platform-core/tests/unit/serviceAgent/test_field_neutralization.py::test_rag_bootstrap_parity_with_query_path (gemeinsame `_neutralizeAndSerializeRows`-Policy; `_serializeRowToText` leakt nicht) | **done** |
| T8 | 13,14 | unit | ja | platform-core/tests/serviceGeneration/test_style_resolver.py (Theme-Presets + Praezedenz) | **done** |
| T9 | 15 | unit | ja | platform-core/tests/serviceGeneration/test_large_document_render.py (8 Tests: PDF/DOCX lazy file-ref, Resolver-Count, JSON base64-frei, **Temp-File-Bilder Schritt 2 + Cleanup**) | **done (Schritt 1+2)** |
| T10 | 13 | unit | ja | platform-core/tests/serviceGeneration/test_layout_primitives.py (8 Tests: cover_page/image_grid Markdown-Parse + PDF/DOCX-Handler) | **done** |
## Links
- Wiki Neutralisierung: [b-reference/platform/neutralization.md](../../b-reference/platform/neutralization.md), [e-compliance/neutralisierung-detail.md](../../e-compliance/neutralisierung-detail.md)
- Wiki AI-Agent/Tools: [b-reference/platform-core/ai-agent.md](../../b-reference/platform-core/ai-agent.md)
- ADR Doc-Theming: [4-done/2026-04-ai-reports-theming-and-pipeline.md](../4-done/2026-04-ai-reports-theming-and-pipeline.md)
- Lokale Renderer-Referenz: `pamocreate/projects/_shared/html_to_pdf.py`, `md_to_pdf.py`
- PR: TBD
- Issue: TBD
## Abschluss
- [x] `b-reference/platform/neutralization.md` aktualisiert (A1 Failsafe 8 + reveal-Tool + Leak-Pfade; A2 Failsafe 5/6)
- [x] `b-reference/platform-core/ai-agent.md` aktualisiert (revealDocument-Tool + neutralization-Toolbox + Doc-Theming/Layout-Primitive)
- [x] `e-compliance/neutralisierung-detail.md` aktualisiert (A1/A2)
- [x] `b-reference/product.md` + Architektur-/DB-/Diagramm-Docs: Chatbot-Komponente + LangChain/LangGraph aus aktiver Doku entfernt (Teil A0)
- [x] `c-work/_CHANGELOG.md` je Change 1 Zeile
- [x] `TOPICS.md` geprueft
- [~] Dokument-Move nach `2-build/`/`z-archive/`: Verschiebung dem User ueberlassen (Arbeit fachlich abgeschlossen)

View file

@ -12,6 +12,29 @@ type: `feat` `fix` `refactor` `docs` `test` `chore` `build` · scope: `platfor
Skip: reine Refactors, Formatting, Lint, Dep-Bumps, Test-only, Wiki-Tippfehler.
## 2026-06-03
- 2026-06-03 | refactor | * | **Scope von DataSource entfernt (Datenschutz)**: Scope-Flag, -Icon und -Funktionalitaet komplett aus der UDB (Sources-Tab) entfernt — persoenliche Datenquellen duerfen nicht gescoped werden. DB-Spalte `DataSource.scope` bleibt als deprecated, wird nicht mehr gelesen/geschrieben. UDB-Backend (`udbNodes.py`, `_inheritFlags.py`, `routeUdb.py`), Frontend (`UdbSourcesProvider.tsx`), Ingest (`subConnectorIngestConsumer.py`), Auth (`routeDataSources.py`) bereinigt. Scope existiert nur noch bei Files (folder-files). Wiki (`unified-data-bar.md`) aktualisiert. Tests angepasst.
## 2026-06-02
- 2026-06-02 | fix | service-llm-private | **Private-LLM-Pricing byte-basiert statt Pauschale**: `aicorePluginPrivateLlm` rechnete Text/Vision/Reasoning pauschal pro Call ab (CHF 0.01/0.10/0.05, `costPer1kTokens=0`, Bytes ignoriert) -> faktisch fast gratis. Neu byte-/tokenbasiert via `_calcPrivatePriceCHF` mit `PRICE_INPUT_PER_1K=0.0075` / `PRICE_OUTPUT_PER_1K=0.0375`; `costPer1kTokens` der bepreisten Modelle entsprechend gesetzt. Embedding via `_calcPrivateEmbedPriceCHF` (`PRICE_EMBED_PER_1K=0.0005`, nur Input) statt gratis. Hintergrund: Depoformance-Angebot (privates CH-Modell muss teurer sein als oeffentliche Modelle).
- 2026-06-02 | feat | platform-core | **Grossdokument: Lazy File-Ref-Bilder (A3/AC15, Schritt 1)**: Block-Bilder koennen jetzt nur eine `fileId` tragen; `renderReport(imageResolver=fileId->bytes)` setzt einen Per-Render-Resolver am Renderer (`BaseRenderer._lazyResolveImageBase64`), den PDF/DOCX `_renderJsonImage` on-demand nutzen. `renderDocument`-Tool haelt fuer pdf/docx Bilder als Referenz (kein base64 mehr im JSON) und uebergibt den Resolver; HTML/Inline/uebrige Formate unveraendert (rueckwaertskompatibel). DOCX bekommt damit echten Ein-Bild-Speicher (python-docx kopiert Bytes sofort ins Package); PDF vermeidet base64-Overhead/JSON-Retention (voll-streamendes PDF via Temp-File-Bilder bleibt als Schritt 2). Tests: tests/serviceGeneration/test_large_document_render.py. (c-work: c-work/1-plan/2026-06-po-cleanup-neutralization-docgen.md)
- 2026-06-02 | feat | platform-core | **documentTheme end-to-end + Preset-Bibliothek (A3)**: `styleDefaults.py` bekommt `THEME_PRESETS` (general/finance/legal/technical/hr/marketing) + `resolveTheme`; `resolveStyle(style, documentTheme)` mergt `DEFAULT_STYLE <- Preset <- explizites style` (explizit gewinnt). `documentTheme` ist jetzt durchverkabelt: `ai.generateDocument` Action -> `callAiContent` -> `_handleDocumentGeneration` -> `documentPath.generateDocument` -> `renderResult` -> `renderReport(documentTheme=...)`; ausserdem im `renderDocument`-Tool (neues `documentTheme`-Schema-Property) und in `methodAi.py` (Param an `ai.generateDocument`, Optionen um `marketing` ergaenzt). Reconciliation mit ADR 2026-04 (Presets als agent-ueberschreibbare Defaults, kein Hard-Mandate). Tests in tests/serviceGeneration/test_style_resolver.py. **Offen:** Grossdokument-Pfad (File-Ref-Bilder + Chunked-Render, AC15) — Entscheidung/Scope siehe Plan. (c-work: c-work/1-plan/2026-06-po-cleanup-neutralization-docgen.md)
- 2026-06-02 | feat | platform-core | **Typ-/vererbungsbewusste Feld-Neutralisierung (A2)**: `FeatureDataProvider` neutralisiert Quelldaten jetzt regelbasiert via `finalizeRowsAsync`/`_neutralizeAndSerializeRows`: Strings substring-neutralisiert wenn effektiv (explizit ODER geerbt, Feldname als Typ-Hint, async+dedupe ueber die lokale Engine), Binary gedroppt, andere Skalare nur bei explizitem Feld-Flag; IDs/System-Spalten ausgenommen, Engine-Ausfall = [REDACTED]. Policy aus `_featureSubAgentTools` via `resolveEffectiveForFds`; RAG-Bootstrap (`subFeatureBootstrap`) nutzt dieselbe Policy (Query-/Index-Paritaet). Unit-Tests in tests/unit/serviceAgent/test_field_neutralization.py (c-work: c-work/1-plan/2026-06-po-cleanup-neutralization-docgen.md)
- 2026-06-02 | feat | * | **Sichere De-Neutralisierung fuer Download (revealDocument)**: Neuer read-only Agent-Tool `revealDocument` loest Platzhalter [typ.uuid] ausschliesslich ueber das private lokale Mapping (resolveText, kein externes LLM) auf und liefert den Klartext als transienten Einmal-Download via SSE-SideEvent `revealDownload`; Klartext wird NICHT gespeichert, indexiert oder in der Chat-Historie abgelegt (persistiertes ToolResult enthaelt nur eine Bestaetigung). Toter `_rehydrateResponse` (nie aufgerufen) aus serviceAi entfernt und callAi/callAiStream-Docstrings korrigiert (keine Rueck-Hydration in Speicher). UI: sseClient + useWorkspace onRevealDownload (base64->Blob->Download->revoke) (c-work: c-work/1-plan/2026-06-po-cleanup-neutralization-docgen.md)
- 2026-06-02 | refactor | * | **Chatbot-Feature komplett entfernt**: Backend (features/chatbot, methodChatbot, Routen, Interfaces, RBAC-Namespaces, datamodelChat WORKFLOW_CHATBOT, DB-/Script-Referenzen) und UI (chatbotApi, useChatbot, views/chatbot, ChatbotConfigSection, Routing, FeatureView, pageRegistry, Stores/Hooks/DEBUG-Logs) entfernt (c-work: c-work/1-plan/2026-06-po-cleanup-neutralization-docgen.md)
- 2026-06-02 | refactor | platform-core | **LangChain/LangGraph entfernt**: ChatStreamingHelper (langchain_core) geloescht; BZO-Extraktion (realEstate) von LangGraph-StateGraph auf direkte sequentielle Funktionsaufrufe migriert (bzoExtractionLangGraph.py -> bzoExtraction.py); langchain/langchain-core/langgraph/langchain-tavily/nest-asyncio aus requirements.txt entfernt (requirements.lock muss via pip-compile neu generiert werden)
- 2026-06-02 | docs | wiki | **Chatbot/LangGraph aus aktiver Doku entfernt**: README, product.md, b-reference (architecture/workflow/diagrams/database), e-compliance/security-overview, a-strategy/roadmap nachgefuehrt (z-archive unveraendert)
- 2026-06-02 | feat | platform-core | **Agent data-source search-first guidance**: Sharpened searchDataSource/browseDataSource tool descriptions (per-service query syntax, anti mass-download) and added a search-first rule to buildDataSourceContext so the agent queries server-side instead of downloading whole sources
- 2026-06-02 | fix | platform-core | **SharePoint/OneDrive/Drive search scoping + pagination**: SharePoint and OneDrive search now scope to the attached folder and follow @odata.nextLink; OneDrive browse paginates; Google Drive search uses fullText contains (name+content) with pageToken pagination and URL-encoded queries
- 2026-06-02 | feat | platform-core | **Outlook mail metadata + date filter**: browse/search expose sender+date inline in the agent tool, browse supports a date-range filter via Graph $filter, and search scopes to the attached folder
- 2026-06-02 | fix | platform-core | **Gmail search metadata + label scoping**: search returns real Subject/From/Date (was 'Message {id}'), scopes to the attached label, and resolves message metadata concurrently to cut the sequential N+1
- 2026-06-02 | feat | platform-core | **Google Calendar date-range fetch**: browse/search use timeMin/timeMax when a date range is given, avoiding full multi-year event listings
- 2026-06-02 | feat | platform-core | **Contacts metadata inline (MSFT/Google/Infomaniak)**: agent tool shows email/phone/company per contact so vCards are only downloaded when the full record is needed
- 2026-06-02 | feat | platform-core | **ClickUp task metadata inline**: agent tool shows status/assignee/due-date per task instead of requiring a JSON download
- 2026-06-02 | feat | platform-core | **Infomaniak Calendar date filter**: events honour an agent-supplied date range (clamped to the vendor <3 month limit) instead of a fixed 90-day window
## 2026-05-31
- 2026-05-31 | fix | ui-nyla | **UDB Sources panel compact**: Reduced tree indent from 24px to 16px, shrunk compact row height to 28px, smaller chevrons/icons/action buttons in compact mode for better label visibility

View file

@ -35,7 +35,8 @@ Am **Punkt der Content-Einspeisung** — dort wo Rohdaten zu verarbeitbarem Cont
| **User-Prompt** (Chat-Eingabe) | Prompt-Text wird durch `processText` neutralisiert, wenn Feature-Instanz oder Workflow es fordern. | `mainServiceAi` prüft Context-Flag / Config |
| **DataSource-Download** | Flag wird auf erstellte `FileItem`s vererbt → bei Extraktion/Indexierung greift das File-Flag automatisch. | `mainServiceAgent._resolveDataSource` / `_downloadFromDataSource` |
| **FeatureDataSource-Abfrage (Tabelle)** | Wenn eine `FeatureDataSource.neutralize=True` hat → Content aus diesem Sub-Agent-Call wird neutralisiert. | `mainServiceAgent._queryFeatureInstance` setzt `requireNeutralization=True` |
| **FeatureDataSource-Abfrage (Feld)** | `FeatureDataSource.neutralizeFields` definiert Spalten, deren Werte in `FeatureDataProvider` mit deterministischen Platzhaltern `[NEUT.<field>.<hash>]` ersetzt werden, bevor Daten den Sub-Agent erreichen. | `featureDataProvider._applyFieldNeutralization` |
| **FeatureDataSource-Abfrage (Feld/Typ, seit 2026-06)** | Typ- und vererbungsbewusst: **Strings** werden substring-neutralisiert sobald effektiv (explizit ODER geerbt, Feldname als Typ-Hint); **Binary** wird gedroppt; **andere Skalare** (number/date/bool) nur bei **explizitem** Feld-Flag als Ganzwert-Platzhalter `[NEUT.<field>.<hash>]`. Identifikatoren/System-Spalten ausgenommen, Engine-Ausfall = `[REDACTED]`. RAG-Bootstrap nutzt dieselbe Policy (Query- und Index-Pfad konsistent). | `featureDataProvider.finalizeRowsAsync` / `_neutralizeAndSerializeRows`; Policy aus `coreTools/_featureSubAgentTools` via `resolveEffectiveForFds` |
| **De-Neutralisierung für Download (seit 2026-06)** | Read-only Agent-Tool `revealDocument` löst Platzhalter **nur** über das lokale Mapping (`resolveText`, kein externes LLM) auf und liefert Klartext als transienten Einmal-Download (SSE `revealDownload`) — kein Save/Index/Historie. | `coreTools/_mediaTools._revealDocument` |
| **Ordner-Neutralisierung** | `FileFolder.neutralize=True` propagiert auf alle enthaltenen Dateien (rekursiv). Neue/verschobene Dateien erben das Flag. Index-Purge + Re-Index wie bei einzelnen Dateien. | `routeDataFiles.updateFolderNeutralize` |
| **Workflow-Aktion `neutralizeData`** | Expliziter Neutralisierungs-Schritt auf bereits extrahierten ContentParts. | Workflow-Config + `NeutralizationConfig.enabled` |

View file

@ -98,7 +98,7 @@ PowerOn ist als Multi-Mandanten-Plattform konzipiert. Jede Organisation, Abteilu
- **Zugehörigkeitsprüfung bei jedem Zugriff:** Bevor ein Nutzer auf Mandantendaten zugreifen kann, prüft die Plattform, ob eine aktive Mitgliedschaft des Nutzers in diesem Mandanten besteht. Ohne nachgewiesene Mitgliedschaft wird der Zugriff verweigert.
- **Kein mandantenübergreifender Datenfluss:** Datenbankabfragen werden automatisch auf den Mandantenkontext gefiltert. Es gibt keinen Mechanismus, der Daten mandantenübergreifend zusammenführt oder exponiert.
- **Feature-Isolation:** Innerhalb eines Mandanten werden Funktionsmodule (z.B. Chatbot, Treuhand, Immobilien) zusätzlich isoliert. Nutzer benötigen für jedes Funktionsmodul eine explizite Zugriffsberechtigung.
- **Feature-Isolation:** Innerhalb eines Mandanten werden Funktionsmodule (z.B. CommCoach, Treuhand, Immobilien) zusätzlich isoliert. Nutzer benötigen für jedes Funktionsmodul eine explizite Zugriffsberechtigung.
### 3.3 Mehrfachmandanten
@ -181,7 +181,7 @@ Jede API-Funktion ist mit individuellen Zugriffslimits versehen, die automatisie
| Anmeldung | 30 Versuche pro Minute |
| Datenexport (DSGVO) | 5 Anfragen pro Minute |
| Kontolöschung | 1 Anfrage pro Stunde |
| Chatbot-Nutzung | 120 Anfragen pro Minute |
| KI-Anfragen | 120 Anfragen pro Minute |
| Datei-Upload | 10 Uploads pro Minute |
### 6.3 Eingabebereinigung
@ -191,7 +191,7 @@ Nutzereingaben werden bereinigt und validiert, bevor sie an KI-Modelle oder Date
### 6.4 SQL-Injection-Schutz
- Alle Datenbankabfragen der Plattform verwenden parametrisierte Abfragen -- der Industriestandard zur Vermeidung von SQL-Injection.
- Der Chatbot-Datenbankzugriff ist zusätzlich auf reine Leseabfragen (SELECT) beschränkt. Schreibende, ändernde oder löschende Operationen sind auf Systemebene blockiert.
- Der KI-gestützte Datenbankzugriff ist zusätzlich auf reine Leseabfragen (SELECT) beschränkt. Schreibende, ändernde oder löschende Operationen sind auf Systemebene blockiert.
### 6.5 Cross-Origin Resource Sharing (CORS)
@ -205,7 +205,7 @@ Transparenz im Umgang mit KI-Diensten ist für datenschutzbewusste Organisatione
### 7.1 Welche Daten werden verarbeitet
Im Rahmen der KI-gestützten Funktionen (Chatbot, Workflow-Verarbeitung, Dokumentenanalyse) können folgende Daten an KI-Dienste übermittelt werden:
Im Rahmen der KI-gestützten Funktionen (KI-Assistent, Workflow-Verarbeitung, Dokumentenanalyse) können folgende Daten an KI-Dienste übermittelt werden:
- Nutzeranfragen und -eingaben
- Dokumentinhalte (bei Dokumentenanalyse)

View file

@ -1,986 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PowerOn Workflow Designer - Platform Level Architecture</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #333;
line-height: 1.6;
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
}
.header {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 15px;
padding: 30px;
margin-bottom: 30px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.header h1 {
color: #2c3e50;
font-size: 2.5em;
margin-bottom: 10px;
text-align: center;
}
.header p {
color: #7f8c8d;
text-align: center;
font-size: 1.2em;
}
.workflow-designer {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 15px;
padding: 20px;
margin-bottom: 30px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.toolbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px;
background: linear-gradient(90deg, #667eea, #764ba2);
border-radius: 10px;
margin-bottom: 20px;
color: white;
}
.toolbar h2 {
font-size: 1.5em;
margin: 0;
}
.toolbar-buttons {
display: flex;
gap: 10px;
}
.btn {
padding: 8px 16px;
border: none;
border-radius: 6px;
cursor: pointer;
font-weight: 500;
transition: all 0.3s ease;
}
.btn-primary {
background: #3498db;
color: white;
}
.btn-success {
background: #27ae60;
color: white;
}
.btn-warning {
background: #f39c12;
color: white;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.main-content {
display: grid;
grid-template-columns: 250px 1fr 300px;
gap: 20px;
height: 600px;
}
.palette {
background: #f8f9fa;
border-radius: 10px;
padding: 20px;
border: 2px solid #e9ecef;
}
.palette h3 {
color: #495057;
margin-bottom: 15px;
font-size: 1.2em;
}
.palette-section {
margin-bottom: 20px;
}
.palette-section h4 {
color: #6c757d;
margin-bottom: 10px;
font-size: 0.9em;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.palette-item {
background: white;
border: 1px solid #dee2e6;
border-radius: 6px;
padding: 8px 12px;
margin-bottom: 8px;
cursor: grab;
transition: all 0.3s ease;
font-size: 0.9em;
}
.palette-item:hover {
background: #e3f2fd;
border-color: #2196f3;
transform: translateX(5px);
}
.palette-item.dragging {
opacity: 0.5;
transform: rotate(5deg);
}
.canvas {
background: white;
border-radius: 10px;
border: 2px solid #e9ecef;
position: relative;
overflow: hidden;
}
.canvas-grid {
background-image:
linear-gradient(rgba(0,0,0,0.1) 1px, transparent 1px),
linear-gradient(90deg, rgba(0,0,0,0.1) 1px, transparent 1px);
background-size: 20px 20px;
width: 100%;
height: 100%;
position: relative;
}
.workflow-node {
position: absolute;
background: white;
border: 2px solid #3498db;
border-radius: 8px;
padding: 15px;
min-width: 150px;
cursor: move;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
}
.workflow-node:hover {
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
transform: translateY(-2px);
}
.workflow-node.task {
border-color: #3498db;
background: linear-gradient(135deg, #3498db, #2980b9);
color: white;
}
.workflow-node.action {
border-color: #e74c3c;
background: linear-gradient(135deg, #e74c3c, #c0392b);
color: white;
}
.workflow-node.condition {
border-color: #f39c12;
background: linear-gradient(135deg, #f39c12, #e67e22);
color: white;
}
.workflow-node.integration {
border-color: #9b59b6;
background: linear-gradient(135deg, #9b59b6, #8e44ad);
color: white;
}
.node-header {
font-weight: bold;
margin-bottom: 5px;
font-size: 0.9em;
}
.node-content {
font-size: 0.8em;
opacity: 0.9;
}
.connection-line {
position: absolute;
background: #3498db;
height: 2px;
transform-origin: left center;
z-index: 1;
}
.properties-panel {
background: #f8f9fa;
border-radius: 10px;
padding: 20px;
border: 2px solid #e9ecef;
}
.properties-panel h3 {
color: #495057;
margin-bottom: 15px;
font-size: 1.2em;
}
.property-group {
margin-bottom: 20px;
}
.property-group h4 {
color: #6c757d;
margin-bottom: 10px;
font-size: 0.9em;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.property-item {
background: white;
border: 1px solid #dee2e6;
border-radius: 6px;
padding: 8px 12px;
margin-bottom: 8px;
font-size: 0.9em;
}
.property-label {
font-weight: 500;
color: #495057;
margin-bottom: 4px;
}
.property-value {
color: #6c757d;
font-family: 'Courier New', monospace;
font-size: 0.8em;
}
.execution-monitor {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 15px;
padding: 20px;
margin-bottom: 30px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.monitor-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.status-indicator {
display: flex;
align-items: center;
gap: 10px;
}
.status-dot {
width: 12px;
height: 12px;
border-radius: 50%;
animation: pulse 2s infinite;
}
.status-dot.running {
background: #27ae60;
}
.status-dot.completed {
background: #3498db;
}
.status-dot.waiting {
background: #f39c12;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
.progress-bar {
width: 100%;
height: 8px;
background: #e9ecef;
border-radius: 4px;
overflow: hidden;
margin: 10px 0;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, #27ae60, #2ecc71);
border-radius: 4px;
transition: width 0.3s ease;
}
.step-list {
margin-top: 20px;
}
.step-item {
background: white;
border: 1px solid #dee2e6;
border-radius: 8px;
padding: 15px;
margin-bottom: 10px;
transition: all 0.3s ease;
}
.step-item:hover {
border-color: #3498db;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.step-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
.step-title {
font-weight: 600;
color: #2c3e50;
}
.step-status {
font-size: 0.8em;
padding: 4px 8px;
border-radius: 4px;
font-weight: 500;
}
.step-status.completed {
background: #d4edda;
color: #155724;
}
.step-status.running {
background: #d1ecf1;
color: #0c5460;
}
.step-status.waiting {
background: #fff3cd;
color: #856404;
}
.step-details {
font-size: 0.85em;
color: #6c757d;
}
.content-section {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 15px;
padding: 30px;
margin-bottom: 30px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.content-section h2 {
color: #2c3e50;
margin-bottom: 20px;
font-size: 1.8em;
}
.content-section h3 {
color: #34495e;
margin: 25px 0 15px 0;
font-size: 1.4em;
}
.content-section p {
margin-bottom: 15px;
line-height: 1.7;
}
.feature-list {
list-style: none;
padding: 0;
}
.feature-list li {
background: #f8f9fa;
border-left: 4px solid #3498db;
padding: 12px 15px;
margin-bottom: 10px;
border-radius: 0 6px 6px 0;
}
.code-block {
background: #2c3e50;
color: #ecf0f1;
padding: 20px;
border-radius: 8px;
font-family: 'Courier New', monospace;
font-size: 0.9em;
overflow-x: auto;
margin: 15px 0;
}
.mermaid {
background: white;
border-radius: 8px;
padding: 20px;
margin: 20px 0;
border: 1px solid #dee2e6;
}
@media (max-width: 1200px) {
.main-content {
grid-template-columns: 200px 1fr 250px;
}
}
@media (max-width: 768px) {
.main-content {
grid-template-columns: 1fr;
grid-template-rows: auto 1fr auto;
}
.palette {
order: 1;
}
.canvas {
order: 2;
height: 400px;
}
.properties-panel {
order: 3;
}
}
</style>
</head>
<body>
<div class="container">
<!-- Header -->
<div class="header">
<h1>🌐 PowerOn Workflow Designer</h1>
<p>Platform Level: Building Custom Workflows for "myWorld"</p>
</div>
<!-- Workflow Designer Interface -->
<div class="workflow-designer">
<div class="toolbar">
<h2>🏠 Document Processing Pipeline</h2>
<div class="toolbar-buttons">
<button class="btn btn-primary">💾 Save</button>
<button class="btn btn-success">▶️ Run</button>
<button class="btn btn-warning">📤 Export</button>
</div>
</div>
<div class="main-content">
<!-- Component Palette -->
<div class="palette">
<h3>📦 Components</h3>
<div class="palette-section">
<h4>🎯 Tasks</h4>
<div class="palette-item" draggable="true">📄 Document Processing</div>
<div class="palette-item" draggable="true">📧 Email Processing</div>
<div class="palette-item" draggable="true">📊 Data Analysis</div>
<div class="palette-item" draggable="true">🔍 Content Analysis</div>
</div>
<div class="palette-section">
<h4>⚡ Actions</h4>
<div class="palette-item" draggable="true">🔗 SharePoint Upload</div>
<div class="palette-item" draggable="true">📤 Send Email</div>
<div class="palette-item" draggable="true">🌐 API Call</div>
<div class="palette-item" draggable="true">💾 Database Save</div>
</div>
<div class="palette-section">
<h4>🔀 Conditions</h4>
<div class="palette-item" draggable="true">❓ If/Then</div>
<div class="palette-item" draggable="true">🔄 Switch</div>
<div class="palette-item" draggable="true">🔄 Loop</div>
</div>
<div class="palette-section">
<h4>🔌 Integrations</h4>
<div class="palette-item" draggable="true">🔗 SharePoint</div>
<div class="palette-item" draggable="true">📧 Outlook</div>
<div class="palette-item" draggable="true">💬 Teams</div>
<div class="palette-item" draggable="true">☁️ OneDrive</div>
</div>
</div>
<!-- Canvas -->
<div class="canvas">
<div class="canvas-grid">
<!-- Sample Workflow Nodes -->
<div class="workflow-node task" style="top: 50px; left: 50px;">
<div class="node-header">📄 Document Processing</div>
<div class="node-content">Extract text from uploaded files</div>
</div>
<div class="workflow-node action" style="top: 50px; left: 300px;">
<div class="node-header">🔗 SharePoint Upload</div>
<div class="node-content">Upload processed files to SP</div>
</div>
<div class="workflow-node action" style="top: 50px; left: 550px;">
<div class="node-header">📤 Send Email</div>
<div class="node-content">Notify team of completion</div>
</div>
<div class="workflow-node condition" style="top: 200px; left: 300px;">
<div class="node-header">❓ Approval Required?</div>
<div class="node-content">Check if approval needed</div>
</div>
<div class="workflow-node integration" style="top: 200px; left: 550px;">
<div class="node-header">💬 Teams Notification</div>
<div class="node-content">Send message to channel</div>
</div>
</div>
</div>
<!-- Properties Panel -->
<div class="properties-panel">
<h3>📋 Properties Panel</h3>
<div class="property-group">
<h4>🏷️ Node Properties</h4>
<div class="property-item">
<div class="property-label">Name:</div>
<div class="property-value">Document Processing Task</div>
</div>
<div class="property-item">
<div class="property-label">Type:</div>
<div class="property-value">Task</div>
</div>
<div class="property-item">
<div class="property-label">Status:</div>
<div class="property-value">Active</div>
</div>
</div>
<div class="property-group">
<h4>⚙️ Parameters</h4>
<div class="property-item">
<div class="property-label">Input:</div>
<div class="property-value">{file}</div>
</div>
<div class="property-item">
<div class="property-label">Output:</div>
<div class="property-value">{extracted_text}</div>
</div>
<div class="property-item">
<div class="property-label">Format:</div>
<div class="property-value">PDF, DOCX, TXT</div>
</div>
<div class="property-item">
<div class="property-label">Timeout:</div>
<div class="property-value">300 seconds</div>
</div>
</div>
<div class="property-group">
<h4>✅ Validation</h4>
<div class="property-item">
<div class="property-label">Retry:</div>
<div class="property-value">3 attempts</div>
</div>
<div class="property-item">
<div class="property-label">Required:</div>
<div class="property-value">Yes</div>
</div>
<div class="property-item">
<div class="property-label">Secure:</div>
<div class="property-value">Yes</div>
</div>
</div>
<div class="property-group">
<h4>🎛️ Actions</h4>
<div style="display: flex; gap: 8px;">
<button class="btn btn-primary" style="flex: 1;">Edit</button>
<button class="btn btn-warning" style="flex: 1;">Delete</button>
</div>
</div>
</div>
</div>
</div>
<!-- Execution Monitor -->
<div class="execution-monitor">
<div class="monitor-header">
<h3>📊 Workflow Execution Monitor</h3>
<div class="status-indicator">
<div class="status-dot running"></div>
<span>Running (Step 2/5)</span>
</div>
</div>
<div class="progress-bar">
<div class="progress-fill" style="width: 40%;"></div>
</div>
<div style="display: flex; justify-content: space-between; margin: 10px 0;">
<span>⏱️ Elapsed Time: 00:01:23</span>
<span>📊 Progress: 40% (2/5 steps completed)</span>
</div>
<div class="step-list">
<div class="step-item">
<div class="step-header">
<span class="step-title">✅ Step 1: Document Upload</span>
<span class="step-status completed">Completed</span>
</div>
<div class="step-details">
📁 File: report.pdf (2.3MB) | ⏱️ Duration: 00:00:05
</div>
</div>
<div class="step-item">
<div class="step-header">
<span class="step-title">🔄 Step 2: Extract Content</span>
<span class="step-status running">Running</span>
</div>
<div class="step-details">
📄 Pages: 15 | 📊 Progress: 60% (9/15 pages processed) | ⏱️ Elapsed: 00:00:45
</div>
</div>
<div class="step-item">
<div class="step-header">
<span class="step-title">⏳ Step 3: Analyze Content</span>
<span class="step-status waiting">Waiting</span>
</div>
<div class="step-details">
🔗 Dependencies: Step 2 completion | 📊 Estimated time: 00:01:30
</div>
</div>
<div class="step-item">
<div class="step-header">
<span class="step-title">⏳ Step 4: Upload to SharePoint</span>
<span class="step-status waiting">Waiting</span>
</div>
<div class="step-details">
🔗 Dependencies: Step 3 completion | 📊 Estimated time: 00:00:20
</div>
</div>
<div class="step-item">
<div class="step-header">
<span class="step-title">⏳ Step 5: Send Email Notification</span>
<span class="step-status waiting">Waiting</span>
</div>
<div class="step-details">
🔗 Dependencies: Step 4 completion | 📊 Estimated time: 00:00:10
</div>
</div>
</div>
</div>
<!-- Platform Overview Content -->
<div class="content-section">
<h2>🎯 Platform Overview</h2>
<p>The chat process architecture provides a powerful foundation for building custom workflows that integrate with enterprise systems like SharePoint, Outlook, and other business applications. This platform enables users to automate their "myWorld" - their personal and professional digital environment.</p>
</div>
<!-- Platform Architecture -->
<div class="content-section">
<h2>🏗️ Platform Architecture</h2>
<p>The platform consists of several key layers that work together to provide a comprehensive workflow automation solution:</p>
<h3>Platform Layer Components:</h3>
<ul class="feature-list">
<li><strong>Workflow Model UI:</strong> Visual builder, template editor, visual editor, and parameter editor</li>
<li><strong>Integration Hub:</strong> SharePoint, Outlook, Web Services, Database, and API connectors</li>
<li><strong>Workflow Engine:</strong> Core engine, task scheduler, variable manager, and condition manager</li>
<li><strong>Business Logic:</strong> Rule engine, action library, and template library</li>
</ul>
<h3>Enterprise Systems Integration:</h3>
<ul class="feature-list">
<li><strong>Microsoft 365:</strong> SharePoint Online, Outlook 365, Teams, OneDrive, Excel Online, Power BI</li>
<li><strong>Custom Systems:</strong> CRM, ERP, HR, Finance, and Legal systems</li>
</ul>
</div>
<!-- Workflow Model UI Components -->
<div class="content-section">
<h2>🎨 Workflow Model UI Components</h2>
<h3>1. Visual Workflow Builder</h3>
<ul class="feature-list">
<li><strong>Drag & Drop Interface:</strong> Visual workflow construction</li>
<li><strong>Node Types:</strong> Tasks, Conditions, Loops, Integrations</li>
<li><strong>Connection Types:</strong> Sequential, Parallel, Conditional</li>
<li><strong>Real-time Preview:</strong> Live workflow simulation</li>
<li><strong>Template Gallery:</strong> Pre-built workflow templates</li>
</ul>
<h3>2. Workflow Template Editor</h3>
<ul class="feature-list">
<li><strong>Parameterized Templates:</strong> Reusable workflow patterns</li>
<li><strong>Variable Substitution:</strong> Dynamic content insertion</li>
<li><strong>Conditional Logic:</strong> If-then-else workflows</li>
<li><strong>Action Libraries:</strong> Pre-built action collections</li>
</ul>
<h3>3. Integration Configuration</h3>
<ul class="feature-list">
<li><strong>Authentication Config:</strong> OAuth 2.0, API keys, certificates</li>
<li><strong>Endpoint Config:</strong> Service URLs, connection settings</li>
<li><strong>Mapping Config:</strong> Data transformation rules</li>
<li><strong>Test Connection:</strong> Validate integration setup</li>
</ul>
</div>
<!-- Custom Workflow Examples -->
<div class="content-section">
<h2>🔧 Custom Workflow Examples</h2>
<h3>1. Document Approval Workflow</h3>
<p>A comprehensive document processing and approval system that integrates multiple enterprise systems.</p>
<div class="code-block">
Document Upload → SharePoint Upload → Extract Metadata → Route to Approver →
Decision Point → Finalize Document → Update SharePoint → Archive Document
</div>
<h3>2. Customer Onboarding Workflow</h3>
<p>Automated customer onboarding process with CRM integration and team collaboration.</p>
<div class="code-block">
New Customer Data → Validate Information → Create CRM Record → Generate Welcome Email →
Setup SharePoint Site → Assign Team Access → Schedule Kickoff Meeting → Send Welcome Package
</div>
<h3>3. Invoice Processing Workflow</h3>
<p>Intelligent invoice processing with OCR, validation, and approval routing.</p>
<div class="code-block">
Invoice Received → OCR Processing → Extract Data → Validate Invoice →
Decision Point → Route for Approval → Manager Approval → Process Payment → Update Accounting
</div>
</div>
<!-- "myWorld" Automation Scenarios -->
<div class="content-section">
<h2>🎯 "myWorld" Automation Scenarios</h2>
<h3>1. Personal Productivity</h3>
<ul class="feature-list">
<li><strong>Email Triage:</strong> Automatically categorize and route emails</li>
<li><strong>Meeting Preparation:</strong> Auto-generate meeting agendas and materials</li>
<li><strong>Document Organization:</strong> Automatic filing and tagging</li>
<li><strong>Task Prioritization:</strong> AI-driven task scheduling</li>
<li><strong>Knowledge Management:</strong> Automatic note organization</li>
</ul>
<h3>2. Team Collaboration</h3>
<ul class="feature-list">
<li><strong>Project Updates:</strong> Automatic status reporting</li>
<li><strong>Team Coordination:</strong> Meeting scheduling and follow-ups</li>
<li><strong>Document Collaboration:</strong> Version control and review processes</li>
<li><strong>Knowledge Sharing:</strong> Automatic documentation updates</li>
<li><strong>Progress Monitoring:</strong> Real-time dashboard updates</li>
</ul>
<h3>3. Business Processes</h3>
<ul class="feature-list">
<li><strong>Lead Management:</strong> CRM integration and follow-up automation</li>
<li><strong>Campaign Management:</strong> Marketing automation and tracking</li>
<li><strong>Employee Onboarding:</strong> HR process automation</li>
<li><strong>Invoice Processing:</strong> Financial workflow automation</li>
<li><strong>Contract Management:</strong> Legal document automation</li>
</ul>
</div>
<!-- Integration Connectors -->
<div class="content-section">
<h2>🔌 Integration Connectors</h2>
<h3>1. SharePoint Connector</h3>
<div class="code-block">
class SharePointConnector:
- uploadDocument(site, library, file)
- createListItem(list, data)
- updateListItem(list, id, data)
- searchDocuments(query)
- createSite(siteName, template)
- managePermissions(site, users, permissions)
</div>
<h3>2. Outlook Connector</h3>
<div class="code-block">
class OutlookConnector:
- sendEmail(recipients, subject, body, attachments)
- createMeeting(attendees, subject, start, end, location)
- processInbox(filters, actions)
- manageCalendar(events, reminders)
- createTask(subject, dueDate, priority)
</div>
<h3>3. Teams Connector</h3>
<div class="code-block">
class TeamsConnector:
- sendMessage(channel, message)
- createChannel(team, channelName)
- scheduleMeeting(team, meeting)
- shareFile(channel, file)
- createPoll(channel, question, options)
</div>
<h3>4. Web Services Connector</h3>
<div class="code-block">
class WebServicesConnector:
- makeAPIRequest(endpoint, method, data)
- handleAuthentication(authType, credentials)
- processResponse(response, mapping)
- handleErrors(error, retryLogic)
- rateLimit(requests, limits)
</div>
</div>
<!-- Platform Benefits -->
<div class="content-section">
<h2>🚀 Platform Benefits</h2>
<h3>1. For End Users</h3>
<ul class="feature-list">
<li><strong>No-Code/Low-Code:</strong> Visual workflow building</li>
<li><strong>Template Library:</strong> Pre-built solutions</li>
<li><strong>Integration Ready:</strong> Connect to existing systems</li>
<li><strong>AI-Powered:</strong> Intelligent automation suggestions</li>
<li><strong>Mobile Friendly:</strong> Work from anywhere</li>
</ul>
<h3>2. For Organizations</h3>
<ul class="feature-list">
<li><strong>Scalable:</strong> Handle complex workflows</li>
<li><strong>Secure:</strong> Enterprise-grade security</li>
<li><strong>Compliant:</strong> Audit trails and governance</li>
<li><strong>Cost Effective:</strong> Reduce manual work</li>
<li><strong>Flexible:</strong> Adapt to changing needs</li>
</ul>
<h3>3. For Developers</h3>
<ul class="feature-list">
<li><strong>Extensible:</strong> Add custom connectors</li>
<li><strong>API-First:</strong> Programmatic access</li>
<li><strong>Plugin Architecture:</strong> Modular development</li>
<li><strong>Testing Tools:</strong> Comprehensive testing framework</li>
<li><strong>Documentation:</strong> Complete API documentation</li>
</ul>
</div>
</div>
<script>
// Drag and drop functionality for palette items
document.addEventListener('DOMContentLoaded', function() {
const paletteItems = document.querySelectorAll('.palette-item');
const canvas = document.querySelector('.canvas-grid');
paletteItems.forEach(item => {
item.addEventListener('dragstart', function(e) {
this.classList.add('dragging');
e.dataTransfer.setData('text/plain', this.textContent);
});
item.addEventListener('dragend', function() {
this.classList.remove('dragging');
});
});
canvas.addEventListener('dragover', function(e) {
e.preventDefault();
});
canvas.addEventListener('drop', function(e) {
e.preventDefault();
const nodeType = e.dataTransfer.getData('text/plain');
const rect = canvas.getBoundingClientRect();
const x = e.clientX - rect.left;
const y = e.clientY - rect.top;
// Create new workflow node
const newNode = document.createElement('div');
newNode.className = 'workflow-node task';
newNode.style.position = 'absolute';
newNode.style.left = x + 'px';
newNode.style.top = y + 'px';
const nodeHeader = document.createElement('div');
nodeHeader.className = 'node-header';
nodeHeader.textContent = nodeType;
const nodeContent = document.createElement('div');
nodeContent.className = 'node-content';
nodeContent.textContent = 'New node created from palette';
newNode.appendChild(nodeHeader);
newNode.appendChild(nodeContent);
canvas.appendChild(newNode);
});
// Make existing nodes draggable
const workflowNodes = document.querySelectorAll('.workflow-node');
workflowNodes.forEach(node => {
node.addEventListener('mousedown', function(e) {
if (e.target === this) {
this.style.cursor = 'grabbing';
const startX = e.clientX - this.offsetLeft;
const startY = e.clientY - this.offsetTop;
function onMouseMove(e) {
this.style.left = (e.clientX - startX) + 'px';
this.style.top = (e.clientY - startY) + 'px';
}
function onMouseUp() {
this.style.cursor = 'grab';
document.removeEventListener('mousemove', onMouseMove);
document.removeEventListener('mouseup', onMouseUp);
}
document.addEventListener('mousemove', onMouseMove.bind(this));
document.addEventListener('mouseup', onMouseUp.bind(this));
}
});
});
});
</script>
</body>
</html>

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -1,114 +0,0 @@
I want to have one centralized procedure to handle all ai calls with documents.
Based on specification below, can you check in the code the current different AI calls in section "AI calls usage in the code"
and formulate the according calls to use centralized ai calls with prompt, documents, options by defining the options for each call and the other parameters to keep current logic.
first show me the calls in the chat.
SPECIFICATION
# AI Calls
Key Features:
- Model selection based on priority (speed/quality/balanced)
- Content compression for large prompts
- Failover between models
- Specialized methods for different operations
Params:
prompt (mandatory)
documents
options{
process_type: Optionen ("image", "text")
operation_type: Optionen ("generate_plan","summarize_data","extract_content","analyse_content","generate_content")
priority: Priorität für Modell-Auswahl ("speed", "quality", "cost", "balanced")
compress_prompt: Ob der Prompt komprimiert werden darf
compress_documents: Ob Dokumente komprimiert werden darf
process_documents_individually: Ob Dokumente einzeln verarbeitet werden dürfen
max_cost: Maximale Kosten für den Call
max_processing_time: Maximale Verarbeitungszeit in Sekunden
max_size_bytes: Maximale Grösse des resultierenden Dokuments
}
Centralized content extraction:
- For extraction this call is done: ServiceCenter.extractContentFromDocument(documents, docPrompt) --> calls DocumentExtraction.processFileData
AI procedure:
1. define docPrompt:
- to deliver content to be used for actionPrompt
- to define output in a text format, all contents as text in a json structure
2. extraction(documents, docPrompt) -> json(contents with the metadata of the original document and file)
3. define callPrompt
- CUSTOM: to define callPrompt with integrating actionPrompt
- to include in the prompt, if target format is not possible to deliver, to deliver another format
- to including resultDocumentFormatRequested in actionPrompt, and resultDocumentFormatDelivered
- to define to deliver result document in resultDocumentFormatDelivered
4. AI(callPrompt + json) -> resultDocumentFormatDelivered
# AI calls usage in the code
## MethodOutlook
emailComposition:
1. define docPrompt:
- to deliver content to be used for actionPrompt
- to define output in a text format, all contents as text in a json structure
2. extraction(documents, docPrompt) -> json(contents with the metadata of the original document and file)
3. define callPrompt
- CUSTOM: to define callPrompt with integrating actionPrompt
- to include in the prompt, if target format is not possible to deliver, to deliver another format
- to including resultDocumentFormatRequested in actionPrompt, and resultDocumentFormatDelivered
- to define to deliver result document in resultDocumentFormatDelivered
4. AI(callPrompt + json) -> resultDocumentFormatDelivered
## MethodAi
callAi:
1. define docPrompt:
- to deliver content to be used for actionPrompt
- to define output in a text format, all contents as text in a json structure
2. extraction(documents, docPrompt) -> json(contents with the metadata of the original document and file)
3. define callPrompt
- CUSTOM: to define callPrompt with integrating actionPrompt
- to include in the prompt, if target format is not possible to deliver, to deliver another format
- to including resultDocumentFormatRequested in actionPrompt, and resultDocumentFormatDelivered
- to define to deliver result document in resultDocumentFormatDelivered
4. AI(callPrompt + json) -> resultDocumentFormatDelivered
## MethodDocument
Generate HTML report:
1. define docPrompt:
- to deliver content to be used for actionPrompt
- to define output in a text format, all contents as text in a json structure
2. extraction(documents, docPrompt) -> json(contents with the metadata of the original document and file)
3. define callPrompt
- CUSTOM: to define callPrompt with integrating actionPrompt
- to include in the prompt, if target format is not possible to deliver, to deliver another format
- to including resultDocumentFormatRequested in actionPrompt, and resultDocumentFormatDelivered
- to define to deliver result document in resultDocumentFormatDelivered
4. AI(callPrompt + json) -> resultDocumentFormatDelivered
Convert documents between formats (CSV, JSON, XML, HTML, Markdown):
--> TO REMOVE, AS INTEGRATED NOW IN THE GENERAL LOGIC IN callPrompt
# Centralized components
## DocumentExtraction
- Extract content from images using AI vision with prompt and file
- Process text content with AI for better extraction with prompt and file
- Handle different document types intelligently --> UNCLEAR
## HandlingTasks
- Generate task plan with complex prompt, no documents
- Generate action plan with complex prompt, no documents
- Validate result with complex prompt, no documents

View file

@ -1,491 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ValueOn/PowerOn PRISM-Strategie 2025-2027</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #333;
overflow: hidden;
}
.presentation-container {
width: 100vw;
height: 100vh;
position: relative;
}
.slide {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 4rem;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
opacity: 0;
transform: translateX(100%);
transition: all 0.5s ease-in-out;
}
.slide.active {
opacity: 1;
transform: translateX(0);
}
.slide-header {
text-align: center;
margin-bottom: 3rem;
}
.slide-title {
font-size: 4rem;
font-weight: 700;
color: #667eea;
margin-bottom: 1rem;
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
.slide-subtitle {
font-size: 1.5rem;
color: #666;
font-weight: 300;
}
.content-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 2rem;
width: 100%;
max-width: 1200px;
}
.strategy-item {
background: white;
padding: 1.5rem;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
border-left: 5px solid #667eea;
transition: transform 0.3s ease;
}
.strategy-item:hover {
transform: translateY(-5px);
}
.strategy-number {
font-size: 1.2rem;
font-weight: 600;
color: #667eea;
margin-bottom: 0.5rem;
}
.strategy-title {
font-size: 1.1rem;
font-weight: 600;
color: #333;
margin-bottom: 1rem;
}
.strategy-content {
font-size: 0.95rem;
line-height: 1.6;
color: #555;
}
.navigation {
position: fixed;
bottom: 2rem;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 1rem;
z-index: 1000;
}
.nav-btn {
background: rgba(255, 255, 255, 0.9);
border: none;
padding: 0.75rem 1.5rem;
border-radius: 25px;
cursor: pointer;
font-weight: 600;
color: #667eea;
transition: all 0.3s ease;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav-btn:hover {
background: #667eea;
color: white;
transform: translateY(-2px);
}
.nav-btn.active {
background: #667eea;
color: white;
}
.slide-counter {
position: fixed;
top: 2rem;
right: 2rem;
background: rgba(255, 255, 255, 0.9);
padding: 0.5rem 1rem;
border-radius: 20px;
font-weight: 600;
color: #667eea;
z-index: 1000;
}
.keyboard-hint {
position: fixed;
bottom: 1rem;
right: 2rem;
background: rgba(255, 255, 255, 0.8);
padding: 0.5rem 1rem;
border-radius: 20px;
font-size: 0.8rem;
color: #666;
z-index: 1000;
}
@media (max-width: 768px) {
.content-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
.slide {
padding: 2rem;
}
.slide-title {
font-size: 2.5rem;
}
}
</style>
</head>
<body>
<div class="presentation-container">
<!-- Slide 1: P - PRECISE -->
<div class="slide active" id="slide-1">
<div class="slide-header">
<h1 class="slide-title">P - PRECISE</h1>
<p class="slide-subtitle">Präzise, messbare und klar definierte Ziele</p>
</div>
<div class="content-grid">
<div class="strategy-item">
<div class="strategy-number">1</div>
<div class="strategy-title">UNTERNEHMENSSTRUKTUR & SPIN-OFF</div>
<div class="strategy-content">ValueOn etabliert PowerOn als Tochtergesellschaft mit Mehrheitsbeteiligung für KI-Produktentwicklung, während ValueOn als Muttergesellschaft die Boutique-Beratungsdienstleistungen fokussiert.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">2</div>
<div class="strategy-title">POWERON PRODUKTSTRATEGIE</div>
<div class="strategy-content">PowerOn entwickelt eine KI-gestützte Business-App mit Fokus auf 60-Sekunden-Videoerstellung für KMU-Unternehmer durch Anbindung an Outlook, SharePoint, Office-Apps und Google Drive.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">3</div>
<div class="strategy-title">CHRIS-COMPANY JOINT VENTURE</div>
<div class="strategy-content">ValueOn erwirbt 50%+ Beteiligung an Chris-Company (Fintech-Plattform) und nutzt deren Fast-Coding/Product-Integration-Expertise für PowerOn-Entwicklung.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">4</div>
<div class="strategy-title">VALUEON BOUTIQUE-BERATUNG</div>
<div class="strategy-content">ValueOn positioniert sich als führende Boutique-Beratung in der deutschsprachigen Schweiz mit Spezialisierung auf Strategieberatung, Corporate Digital Responsibility, Education, Ethik, digitale Transformationsführung, Umsetzungsführung und Lösungsarchitektur im DACH-Raum.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">5</div>
<div class="strategy-title">EDUCATION & DEUTSCHE EXPANSION</div>
<div class="strategy-content">Gründung einer Education-Tochtergesellschaft in Deutschland (September 2025) für KI-Schulungen und Weiterbildungsprogramme im DACH-Raum.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">6</div>
<div class="strategy-title">HEMMSCHWELLEN-REDUKTION & KUNDENAKQUISE</div>
<div class="strategy-content">PowerOn-App dient als "Türöffner" für ValueOn-Beratungsdienstleistungen durch niedrigschwellige KI-Erfahrungen und nahtlose Weiterleitung zu Beratungsangeboten.</div>
</div>
</div>
</div>
<!-- Slide 2: R - REALISTIC -->
<div class="slide" id="slide-2">
<div class="slide-header">
<h1 class="slide-title">R - REALISTIC</h1>
<p class="slide-subtitle">Realistisch erreichbare Ziele und Zeitpläne</p>
</div>
<div class="content-grid">
<div class="strategy-item">
<div class="strategy-number">1</div>
<div class="strategy-title">UNTERNEHMENSSTRUKTUR & SPIN-OFF</div>
<div class="strategy-content">Spin-off erfolgt bis Ende 2025 mit klarer Aufgabentrennung: ValueOn = Beratung/Services, PowerOn = Produktentwicklung/Apps.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">2</div>
<div class="strategy-title">POWERON PRODUKTSTRATEGIE</div>
<div class="strategy-content">MVP-Chatbot Launch bis 31.07.2025 (unverrückbare Deadline), mobile App für iOS/Android bis Q4-2025.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">3</div>
<div class="strategy-title">CHRIS-COMPANY JOINT VENTURE</div>
<div class="strategy-content">Gegenseitige Unterstützung: Chris-Company beschleunigt PowerOn-Entwicklung, ValueOn hilft bei Marktdurchdringung seiner Fintech-Plattform. Fahrplan verlängert.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">4</div>
<div class="strategy-title">VALUEON BOUTIQUE-BERATUNG</div>
<div class="strategy-content">Marktführerschaft in deutschsprachiger Schweiz bis Ende 2027, Expansion nach Deutschland/Österreich ab 2028.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">5</div>
<div class="strategy-title">EDUCATION & DEUTSCHE EXPANSION</div>
<div class="strategy-content">Aufbau auf bestehender ValueOn-Expertise mit lokalem deutschen Marktfokus für Compliance und Kundenvertrauen.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">6</div>
<div class="strategy-title">HEMMSCHWELLEN-REDUKTION & KUNDENAKQUISE</div>
<div class="strategy-content">Freemium-Modell der App generiert Leads, kostenpflichtige Features und Beratungsempfehlungen monetarisieren die Kundenbeziehung.</div>
</div>
</div>
</div>
<!-- Slide 3: I - INCLUSIVE -->
<div class="slide" id="slide-3">
<div class="slide-header">
<h1 class="slide-title">I - INCLUSIVE</h1>
<p class="slide-subtitle">Alle Stakeholder einbezogen und profitierend</p>
</div>
<div class="content-grid">
<div class="strategy-item">
<div class="strategy-number">1</div>
<div class="strategy-title">UNTERNEHMENSSTRUKTUR & SPIN-OFF</div>
<div class="strategy-content">Beide Unternehmen ergänzen sich synergetisch - ValueOn identifiziert Kundenbedürfnisse, PowerOn entwickelt entsprechende KI-Lösungen.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">2</div>
<div class="strategy-title">POWERON PRODUKTSTRATEGIE</div>
<div class="strategy-content">Zielgruppe: KMU-Unternehmer und KI-Interessierte im DACH-Raum mit niedrigschwelligem Zugang zu KI-Tools.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">3</div>
<div class="strategy-title">CHRIS-COMPANY JOINT VENTURE</div>
<div class="strategy-content">Win-Win-Partnerschaft kombiniert technische Expertise (Chris-Company) mit Markt-/Beratungskompetenz (ValueOn).</div>
</div>
<div class="strategy-item">
<div class="strategy-number">4</div>
<div class="strategy-title">VALUEON BOUTIQUE-BERATUNG</div>
<div class="strategy-content">Komplettes Spektrum der digitalen Transformation: von Strategie über Ethik bis zur technischen Umsetzung.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">5</div>
<div class="strategy-title">EDUCATION & DEUTSCHE EXPANSION</div>
<div class="strategy-content">Schulungsangebote für alle Unternehmensgrößen - von Einzelunternehmern bis zu mittelständischen Betrieben.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">6</div>
<div class="strategy-title">HEMMSCHWELLEN-REDUKTION & KUNDENAKQUISE</div>
<div class="strategy-content">Von einfacher App-Nutzung bis zur Vollberatung - durchgängige Customer Journey.</div>
</div>
</div>
</div>
<!-- Slide 4: S - SUCCINCT -->
<div class="slide" id="slide-4">
<div class="slide-header">
<h1 class="slide-title">S - SUCCINCT</h1>
<p class="slide-subtitle">Einfache, verständliche und handlungsorientierte Aussagen</p>
</div>
<div class="content-grid">
<div class="strategy-item">
<div class="strategy-number">1</div>
<div class="strategy-title">UNTERNEHMENSSTRUKTUR & SPIN-OFF</div>
<div class="strategy-content">Mutterhaus ist ValueOn mit Beratung (ValueOn) mit Tochter für Produkte (PowerOn).</div>
</div>
<div class="strategy-item">
<div class="strategy-number">2</div>
<div class="strategy-title">POWERON PRODUKTSTRATEGIE</div>
<div class="strategy-content">"KI für alle" - Einfache Prompts + Eigene Daten = Sofortige Business-Insights.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">3</div>
<div class="strategy-title">CHRIS-COMPANY JOINT VENTURE</div>
<div class="strategy-content">Technologie-Partnerschaft für beschleunigte Produktentwicklung und Marktzugang.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">4</div>
<div class="strategy-title">VALUEON BOUTIQUE-BERATUNG</div>
<div class="strategy-content">Der vertrauensvolle Sparringspartner für verantwortungsvolle digitale Transformation.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">5</div>
<div class="strategy-title">EDUCATION & DEUTSCHE EXPANSION</div>
<div class="strategy-content">KI-Bildung als Brücke zum deutschen Markt.</div>
</div>
<div class="strategy-item">
<div class="strategy-number">6</div>
<div class="strategy-title">HEMMSCHWELLEN-REDUKTION & KUNDENAKQUISE</div>
<div class="strategy-content">App als Akquisetool für Beratungsmandate.</div>
</div>
</div>
</div>
<!-- Slide 5: M - MEASURABLE -->
<div class="slide" id="slide-5">
<div class="slide-header">
<h1 class="slide-title">M - MEASURABLE</h1>
<p class="slide-subtitle">Konkrete, quantifizierbare Kennzahlen</p>
</div>
<div class="content-grid">
<div class="strategy-item">
<div class="strategy-number">1</div>
<div class="strategy-title">UNTERNEHMENSSTRUKTUR & SPIN-OFF</div>
<div class="strategy-content">
• PowerOn-Gründung: bis 30.09.2025<br>
• Rechtliche Trennung der Geschäftsbereiche: bis Q4-2025<br>
• Erste PowerOn-Produktumsätze: ab Q1-2026
</div>
</div>
<div class="strategy-item">
<div class="strategy-number">2</div>
<div class="strategy-title">POWERON PRODUKTSTRATEGIE</div>
<div class="strategy-content">
• MVP-Chatbot: 31.07.2025 (hard deadline)<br>
• Mobile App Launch: 31.12.2025<br>
• 100 aktive Nutzer bis Q2-2026<br>
• App Store/Google Play Verfügbarkeit: Q4-2025
</div>
</div>
<div class="strategy-item">
<div class="strategy-number">3</div>
<div class="strategy-title">CHRIS-COMPANY JOINT VENTURE</div>
<div class="strategy-content">
• Beteiligungsvertrag: bis 30.10.2025<br>
• Erste gemeinsame Produktfeatures: Q1-2026<br>
• Umsatzsteigerung Chris-Company Fintech: +30% bis Q2-2026
</div>
</div>
<div class="strategy-item">
<div class="strategy-number">4</div>
<div class="strategy-title">VALUEON BOUTIQUE-BERATUNG</div>
<div class="strategy-content">
• 5 neue Beratungskunden bis Ende 2025<br>
• Marktführerschaft CH bis 31.12.2027<br>
• 15+ durchgeführte Transformationsprojekte bis 2027
</div>
</div>
<div class="strategy-item">
<div class="strategy-number">5</div>
<div class="strategy-title">EDUCATION & DEUTSCHE EXPANSION</div>
<div class="strategy-content">
• Firmengründung DE: 30.09.2025<br>
• Erste Schulungen: Q4-2025<br>
• 100 teilnehmende Personen bis Q2-2026<br>
• Break-even der DE-Tochter: Q4-2025 / selbsttragend
</div>
</div>
<div class="strategy-item">
<div class="strategy-number">6</div>
<div class="strategy-title">HEMMSCHWELLEN-REDUKTION & KUNDENAKQUISE</div>
<div class="strategy-content">
• 10% der App-Nutzer werden zu Beratungsinteressenten<br>
• 5% der App-Nutzer werden zu zahlenden Beratungskunden<br>
• Conversion-Rate App → Beratung: mindestens 200 Leads bis Ende 2026
</div>
</div>
</div>
</div>
<!-- Navigation -->
<div class="navigation">
<button class="nav-btn active" onclick="goToSlide(1)">P</button>
<button class="nav-btn" onclick="goToSlide(2)">R</button>
<button class="nav-btn" onclick="goToSlide(3)">I</button>
<button class="nav-btn" onclick="goToSlide(4)">S</button>
<button class="nav-btn" onclick="goToSlide(5)">M</button>
</div>
<!-- Slide Counter -->
<div class="slide-counter">
<span id="current-slide">1</span> / 5
</div>
<!-- Keyboard Hint -->
<div class="keyboard-hint">
← → Pfeiltasten zum Navigieren
</div>
</div>
<script>
let currentSlide = 1;
const totalSlides = 5;
function goToSlide(slideNumber) {
// Hide current slide
document.getElementById(`slide-${currentSlide}`).classList.remove('active');
// Show new slide
document.getElementById(`slide-${slideNumber}`).classList.add('active');
// Update navigation buttons
document.querySelectorAll('.nav-btn').forEach((btn, index) => {
btn.classList.toggle('active', index + 1 === slideNumber);
});
// Update slide counter
document.getElementById('current-slide').textContent = slideNumber;
currentSlide = slideNumber;
}
// Keyboard navigation
document.addEventListener('keydown', function(event) {
if (event.key === 'ArrowLeft' && currentSlide > 1) {
goToSlide(currentSlide - 1);
} else if (event.key === 'ArrowRight' && currentSlide < totalSlides) {
goToSlide(currentSlide + 1);
}
});
// Touch/swipe support for mobile
let startX = 0;
let endX = 0;
document.addEventListener('touchstart', function(event) {
startX = event.touches[0].clientX;
});
document.addEventListener('touchend', function(event) {
endX = event.changedTouches[0].clientX;
handleSwipe();
});
function handleSwipe() {
const threshold = 50;
const diff = startX - endX;
if (Math.abs(diff) > threshold) {
if (diff > 0 && currentSlide < totalSlides) {
// Swipe left - next slide
goToSlide(currentSlide + 1);
} else if (diff < 0 && currentSlide > 1) {
// Swipe right - previous slide
goToSlide(currentSlide - 1);
}
}
}
</script>
</body>
</html>

View file

@ -1,557 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PowerOn Functional Overview</title>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background-color: #f8f9fa;
}
.container {
background-color: white;
padding: 40px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
color: #2c3e50;
border-bottom: 3px solid #3498db;
padding-bottom: 10px;
}
h2 {
color: #34495e;
margin-top: 30px;
border-left: 4px solid #3498db;
padding-left: 15px;
}
h3 {
color: #2c3e50;
margin-top: 25px;
}
.mermaid {
text-align: center;
margin: 30px 0;
padding: 20px;
background-color: #f8f9fa;
border-radius: 8px;
border: 1px solid #e9ecef;
}
.use-case-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 25px;
margin: 25px 0;
}
.use-case-card {
background-color: white;
padding: 25px;
border-radius: 8px;
border-left: 4px solid #3498db;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.use-case-card h4 {
margin-top: 0;
color: #2c3e50;
font-size: 1.2em;
}
.benefit-highlight {
background-color: #e8f5e8;
padding: 20px;
border-radius: 8px;
border-left: 4px solid #27ae60;
margin: 20px 0;
}
.challenge-box {
background-color: #fff3cd;
padding: 20px;
border-radius: 8px;
border-left: 4px solid #ffc107;
margin: 20px 0;
}
.workflow-step {
background-color: #f8f9fa;
padding: 15px;
border-radius: 5px;
margin: 10px 0;
border-left: 3px solid #3498db;
}
.agent-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin: 20px 0;
}
.agent-card {
background-color: white;
padding: 20px;
border-radius: 8px;
border: 1px solid #e9ecef;
text-align: center;
}
.agent-card h4 {
color: #2c3e50;
margin-bottom: 10px;
}
.agent-icon {
font-size: 2em;
margin-bottom: 10px;
color: #3498db;
}
.roi-table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
.roi-table th, .roi-table td {
border: 1px solid #ddd;
padding: 12px;
text-align: left;
}
.roi-table th {
background-color: #f8f9fa;
font-weight: bold;
}
.roi-table tr:nth-child(even) {
background-color: #f8f9fa;
}
.testimonial {
background-color: #f8f9fa;
padding: 20px;
border-radius: 8px;
border-left: 4px solid #9b59b6;
margin: 20px 0;
font-style: italic;
}
.testimonial-author {
font-weight: bold;
color: #2c3e50;
margin-top: 10px;
}
ul {
padding-left: 20px;
}
li {
margin-bottom: 8px;
}
.highlight {
background-color: #fff3cd;
padding: 15px;
border-radius: 5px;
border-left: 4px solid #ffc107;
margin: 20px 0;
}
</style>
</head>
<body>
<div class="container">
<h1>PowerOn Functional Overview</h1>
<div class="highlight">
<strong>Document Purpose:</strong> This document provides a functional, product, and customer perspective overview of the PowerOn AI Platform, focusing on business value, use cases, and user experience.
</div>
<h2>1. What is PowerOn?</h2>
<p>PowerOn is a <strong>multi-agent AI platform</strong> that orchestrates specialized AI agents to solve complex business challenges through intelligent collaboration. Unlike traditional single-purpose AI tools, PowerOn coordinates multiple AI specialists working together like an expert team.</p>
<div class="mermaid">
graph TB
subgraph "User Interface"
User[Business User<br/>No Technical Skills Required]
Upload[Upload Documents<br/>PDF, Excel, Images, etc.]
Prompt[Natural Language<br/>Instructions]
end
subgraph "AI Agent Team"
Moderator[AI Moderator<br/>Orchestrates Team]
Researcher[Research Agent<br/>Web Data Collection]
Analyst[Analysis Agent<br/>Data Processing]
Coder[Developer Agent<br/>Code Generation]
Writer[Documentation Agent<br/>Report Creation]
Visualizer[Visualization Agent<br/>Charts & Graphs]
end
subgraph "Output"
Results[Structured Results<br/>Reports, Code, Analysis]
Files[Generated Files<br/>Downloadable Outputs]
Insights[Business Insights<br/>Actionable Intelligence]
end
User --> Upload
User --> Prompt
Upload --> Moderator
Prompt --> Moderator
Moderator --> Researcher
Moderator --> Analyst
Moderator --> Coder
Moderator --> Writer
Moderator --> Visualizer
Researcher --> Results
Analyst --> Results
Coder --> Results
Writer --> Results
Visualizer --> Results
Results --> Files
Results --> Insights
style Moderator fill:#3498db,stroke:#2980b9,stroke-width:3px,color:#fff
style User fill:#2ecc71,stroke:#27ae60,stroke-width:2px,color:#fff
style Results fill:#e74c3c,stroke:#c0392b,stroke-width:2px,color:#fff
</div>
<h2>2. Core Value Proposition</h2>
<div class="challenge-box">
<h3>Modern Business Challenges</h3>
<ul>
<li><strong>Information Overload:</strong> Employees spend 30% of their time searching for information</li>
<li><strong>Resource Constraints:</strong> Shortage of skilled professionals in data analysis and development</li>
<li><strong>Decision Pressure:</strong> Need for fast, informed decisions in volatile markets</li>
<li><strong>Knowledge Management:</strong> Capturing and utilizing distributed company knowledge</li>
<li><strong>Process Efficiency:</strong> Optimizing complex processes and resource allocation</li>
</ul>
</div>
<div class="benefit-highlight">
<h3>How PowerOn Solves These Challenges</h3>
<ul>
<li><strong>Intelligent Orchestration:</strong> Coordinates specialized AI agents instead of isolated AI tools</li>
<li><strong>Accelerated Decision Making:</strong> 73% faster market analysis, 62% time savings in reporting</li>
<li><strong>Democratized AI:</strong> No programming skills required, intuitive interface for all employees</li>
<li><strong>Seamless Integration:</strong> Works with existing data formats, no IT infrastructure changes needed</li>
</ul>
</div>
<h2>3. AI Agent Specialists</h2>
<div class="agent-grid">
<div class="agent-card">
<div class="agent-icon">🔍</div>
<h4>Research Agent</h4>
<p>Collects current data from the internet, performs competitive intelligence, and gathers market insights</p>
</div>
<div class="agent-card">
<div class="agent-icon">📊</div>
<h4>Analysis Agent</h4>
<p>Processes complex datasets, identifies trends and patterns, performs statistical calculations</p>
</div>
<div class="agent-card">
<div class="agent-icon">💻</div>
<h4>Developer Agent</h4>
<p>Generates functional code, creates automation scripts, builds prototypes and applications</p>
</div>
<div class="agent-card">
<div class="agent-icon">📝</div>
<h4>Documentation Agent</h4>
<p>Creates detailed reports, meeting protocols, technical documentation, and summaries</p>
</div>
<div class="agent-card">
<div class="agent-icon">🎨</div>
<h4>Visualization Agent</h4>
<p>Creates charts, graphs, dashboards, and visual representations of data and concepts</p>
</div>
<div class="agent-card">
<div class="agent-icon">🤖</div>
<h4>AI Moderator</h4>
<p>Orchestrates the team, manages workflow, coordinates agent collaboration, and ensures quality</p>
</div>
</div>
<h2>4. User Experience & Workflow</h2>
<div class="mermaid">
sequenceDiagram
participant User as Business User
participant UI as PowerOn Interface
participant Moderator as AI Moderator
participant Agents as AI Agent Team
participant Output as Results
User->>UI: Upload documents & enter prompt
UI->>Moderator: Process user request
Moderator->>Moderator: Analyze requirements
Moderator->>Agents: Activate relevant agents
par Agent Collaboration
Agents->>Agents: Research & data collection
Agents->>Agents: Analysis & processing
Agents->>Agents: Code generation
Agents->>Agents: Report creation
end
Agents->>Moderator: Submit results
Moderator->>Moderator: Quality review & synthesis
Moderator->>Output: Generate final output
Output->>UI: Present structured results
UI->>User: Display results & files
Note over User,Output: User can interact, provide feedback, and continue workflow
</div>
<h3>4.1 Typical User Journey</h3>
<div class="workflow-step">
<strong>Step 1: Input</strong> - User uploads relevant documents (PDFs, Excel files, images) and describes their requirements in natural language
</div>
<div class="workflow-step">
<strong>Step 2: Analysis</strong> - AI Moderator analyzes the request and activates the most relevant specialist agents
</div>
<div class="workflow-step">
<strong>Step 3: Collaboration</strong> - AI agents work together, sharing information and building upon each other's work
</div>
<div class="workflow-step">
<strong>Step 4: Review</strong> - User can review progress, provide feedback, and request adjustments in real-time
</div>
<div class="workflow-step">
<strong>Step 5: Output</strong> - Final results are presented as structured reports, downloadable files, and actionable insights
</div>
<h2>5. Real-World Use Cases & ROI</h2>
<div class="use-case-grid">
<div class="use-case-card">
<h4>Market Research & Competitive Intelligence</h4>
<p><strong>Before:</strong> 3-4 weeks for comprehensive market analysis, 20+ hours for data collection</p>
<p><strong>With PowerOn:</strong> 3-5 days for same analysis depth, automated web data extraction</p>
<p><strong>ROI:</strong> €5,000-8,000 cost savings per analysis</p>
</div>
<div class="use-case-card">
<h4>Document Analysis & Knowledge Extraction</h4>
<p><strong>Before:</strong> Manual review of hundreds of pages by highly qualified staff</p>
<p><strong>With PowerOn:</strong> Automatic extraction of key information, precise summaries</p>
<p><strong>ROI:</strong> 80% reduction in time investment, freeing expert capacity</p>
</div>
<div class="use-case-card">
<h4>Report Automation & Documentation</h4>
<p><strong>Before:</strong> Monotonous, error-prone manual creation of standard reports</p>
<p><strong>With PowerOn:</strong> Template-based automation with intelligent data contextualization</p>
<p><strong>ROI:</strong> 15-20 hours monthly time savings per employee</p>
</div>
<div class="use-case-card">
<h4>Prototyping & Rapid Development</h4>
<p><strong>Before:</strong> Weeks for proof-of-concept solution development</p>
<p><strong>With PowerOn:</strong> Agents generate functional code and visualizations in hours</p>
<p><strong>ROI:</strong> 70% faster development cycles, significantly lower development costs</p>
</div>
</div>
<h3>5.1 Measurable Business Impact</h3>
<table class="roi-table">
<thead>
<tr>
<th>Business Function</th>
<th>Traditional Approach</th>
<th>With PowerOn</th>
<th>Improvement</th>
</tr>
</thead>
<tbody>
<tr>
<td>Market Analysis</td>
<td>3-4 weeks</td>
<td>3-5 days</td>
<td>73% faster</td>
</tr>
<tr>
<td>Report Generation</td>
<td>20+ hours</td>
<td>2-3 hours</td>
<td>62% time savings</td>
</tr>
<tr>
<td>Prototype Development</td>
<td>2-3 weeks</td>
<td>2-3 days</td>
<td>70% faster</td>
</tr>
<tr>
<td>Data Processing</td>
<td>Manual review</td>
<td>Automated extraction</td>
<td>80% efficiency gain</td>
</tr>
</tbody>
</table>
<h2>6. Key Differentiators</h2>
<div class="use-case-grid">
<div class="use-case-card">
<h4>Multi-Agent Orchestration</h4>
<p>Unlike single-purpose AI tools, PowerOn coordinates specialized agents working together as an expert team</p>
</div>
<div class="use-case-card">
<h4>No Technical Skills Required</h4>
<p>Intuitive interface accessible to all employees, democratizing AI capabilities across the organization</p>
</div>
<div class="use-case-card">
<h4>Real-Time Collaboration</h4>
<p>Users can interact with AI agents during the process, provide feedback, and guide the workflow</p>
</div>
<div class="use-case-card">
<h4>Enterprise-Ready</h4>
<p>Multi-tenant architecture, workspace concepts, and comprehensive security for business deployment</p>
</div>
</div>
<h2>7. Implementation & Onboarding</h2>
<div class="benefit-highlight">
<h3>Quick Setup & Easy Adoption</h3>
<ul>
<li><strong>Rapid Deployment:</strong> Operational within 1-2 weeks</li>
<li><strong>Comprehensive Training:</strong> Structured onboarding for all user groups</li>
<li><strong>Dedicated Support:</strong> Personal contact person for your company</li>
<li><strong>Continuous Optimization:</strong> Regular updates and new features</li>
</ul>
</div>
<h3>Integration Capabilities</h3>
<ul>
<li><strong>Microsoft Office Integration:</strong> Works with Outlook, SharePoint, PowerPoint, Excel</li>
<li><strong>File Format Support:</strong> PDF, Word, Excel, PowerPoint, Images, and more</li>
<li><strong>API Access:</strong> RESTful API for custom integrations</li>
<li><strong>Cloud & On-Premise:</strong> Flexible deployment options</li>
</ul>
<h2>8. Security & Compliance</h2>
<div class="use-case-grid">
<div class="use-case-card">
<h4>Data Protection</h4>
<p>Advanced data neutralization, encryption, and anonymization to protect sensitive business information</p>
</div>
<div class="use-case-card">
<h4>Multi-Tenant Architecture</h4>
<p>Secure isolation between different organizations and user groups</p>
</div>
<div class="use-case-card">
<h4>Access Control</h4>
<p>Role-based permissions, user management, and audit trails for compliance</p>
</div>
<div class="use-case-card">
<h4>Enterprise Authentication</h4>
<p>Support for Microsoft, Google, and local authentication systems</p>
</div>
</div>
<h2>9. Future Roadmap</h2>
<div class="mermaid">
graph LR
subgraph "Current Release"
A1[7 Specialized Agents]
A2[Complete Workflow Cycle]
A3[Document Processing]
A4[Interactive Web Research]
A5[Multi-Tenant Architecture]
end
subgraph "In Development"
B1[Expandable Agent Marketplace]
B2[Enhanced Error Handling]
B3[Multi-Model Support]
B4[Advanced Dashboard]
B5[Third-Party API Integration]
end
subgraph "Future Vision"
C1[AI Agent Ecosystem]
C2[Advanced Analytics]
C3[Predictive Capabilities]
C4[Industry-Specific Solutions]
C5[Global Scale Deployment]
end
style A1 fill:#2ecc71,stroke:#27ae60,stroke-width:2px,color:#fff
style B1 fill:#f39c12,stroke:#e67e22,stroke-width:2px,color:#fff
style C1 fill:#9b59b6,stroke:#8e44ad,stroke-width:2px,color:#fff
</div>
<h2>10. Next Steps</h2>
<div class="use-case-grid">
<div class="use-case-card">
<h4>1. Free Demo</h4>
<p>Experience the platform's capabilities in a personal demonstration tailored to your business needs</p>
</div>
<div class="use-case-card">
<h4>2. Proof of Concept</h4>
<p>Test the platform with a specific use case from your organization to validate ROI</p>
</div>
<div class="use-case-card">
<h4>3. Custom Solution</h4>
<p>Develop a tailored implementation plan designed for your specific requirements</p>
</div>
<div class="use-case-card">
<h4>4. Pilot Program</h4>
<p>Start with a small team or department to demonstrate value before full deployment</p>
</div>
</div>
<h2>11. Conclusion</h2>
<div class="highlight">
<p>PowerOn represents a paradigm shift from isolated AI tools to intelligent, collaborative AI ecosystems. By orchestrating specialized AI agents, the platform delivers unprecedented efficiency gains while maintaining the human oversight and creativity essential for business success.</p>
<p><strong>Key Value Propositions:</strong></p>
<ul>
<li>Transform complex business challenges into structured, actionable solutions</li>
<li>Accelerate decision-making processes by 60-80%</li>
<li>Democratize AI capabilities across all organizational levels</li>
<li>Provide measurable ROI through time savings and efficiency gains</li>
<li>Enable seamless integration with existing business processes</li>
</ul>
</div>
<p><em>Document Version: 1.0 | Last Updated: July 2025</em></p>
<p><em>Author: Patrick Motsch, CTO, ValueOn AG</em></p>
<p><em>Confidential Document</em></p>
</div>
<script>
mermaid.initialize({
startOnLoad: true,
theme: 'default',
flowchart: {
useMaxWidth: true,
htmlLabels: true
},
sequence: {
useMaxWidth: true,
diagramMarginX: 50,
diagramMarginY: 10
}
});
</script>
</body>
</html>

View file

@ -1,506 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PowerOn Technical Overview</title>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background-color: #f8f9fa;
}
.container {
background-color: white;
padding: 40px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
color: #2c3e50;
border-bottom: 3px solid #3498db;
padding-bottom: 10px;
}
h2 {
color: #34495e;
margin-top: 30px;
border-left: 4px solid #3498db;
padding-left: 15px;
}
h3 {
color: #2c3e50;
margin-top: 25px;
}
.mermaid {
text-align: center;
margin: 30px 0;
padding: 20px;
background-color: #f8f9fa;
border-radius: 8px;
border: 1px solid #e9ecef;
}
.architecture-section {
background-color: #f8f9fa;
padding: 20px;
border-radius: 8px;
margin: 20px 0;
}
.tech-stack {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin: 20px 0;
}
.tech-card {
background-color: white;
padding: 20px;
border-radius: 8px;
border-left: 4px solid #3498db;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.tech-card h4 {
margin-top: 0;
color: #2c3e50;
}
ul {
padding-left: 20px;
}
li {
margin-bottom: 8px;
}
.highlight {
background-color: #fff3cd;
padding: 15px;
border-radius: 5px;
border-left: 4px solid #ffc107;
margin: 20px 0;
}
.code {
background-color: #f8f9fa;
padding: 10px;
border-radius: 5px;
font-family: 'Courier New', monospace;
border: 1px solid #e9ecef;
}
</style>
</head>
<body>
<div class="container">
<h1>PowerOn Technical Overview</h1>
<div class="highlight">
<strong>Document Purpose:</strong> This document provides a technical overview of the PowerOn AI Platform architecture, focusing on system design, integration points, and technical capabilities.
</div>
<h2>1. System Architecture Overview</h2>
<div class="mermaid">
graph TB
subgraph "Frontend Layer"
UI[Frontend Agents<br/>HTML/JS/CSS]
Login[Authentication<br/>Login/Register]
end
subgraph "API Gateway Layer"
Gateway[REST API Gateway<br/>Flask/Python]
Auth[Security Module<br/>Google/MS/Local Auth]
end
subgraph "Core Services"
Workflow[Workflow Manager<br/>Document Processing]
AI[AI Connectors<br/>OpenAI/Anthropic]
Data[Data Connectors<br/>JSON Database]
end
subgraph "External Integrations"
Office[Microsoft Office<br/>Outlook/SharePoint]
Web[Web Services<br/>Web Crawler]
Code[Development<br/>Code Generation]
end
UI --> Gateway
Login --> Gateway
Gateway --> Auth
Gateway --> Workflow
Gateway --> AI
Gateway --> Data
Workflow --> Office
Workflow --> Web
Workflow --> Code
style Gateway fill:#3498db,stroke:#2980b9,stroke-width:3px,color:#fff
style Workflow fill:#e74c3c,stroke:#c0392b,stroke-width:2px,color:#fff
style AI fill:#2ecc71,stroke:#27ae60,stroke-width:2px,color:#fff
</div>
<h2>2. Core Components</h2>
<h3>2.1 REST API Gateway</h3>
<p>The central orchestrator handling all client requests and routing them to appropriate services:</p>
<ul>
<li><strong>Framework:</strong> Flask (Python)</li>
<li><strong>Authentication:</strong> Multi-provider support (Google, Microsoft, Local)</li>
<li><strong>Routing:</strong> Modular route handlers for different data types</li>
<li><strong>Configuration:</strong> Environment-based config management</li>
</ul>
<h3>2.2 Workflow Management System</h3>
<p>Core business logic engine for document processing and AI agent coordination:</p>
<ul>
<li><strong>Document Processing:</strong> Multi-format document handling</li>
<li><strong>AI Agent Coordination:</strong> Orchestrates multiple AI agents</li>
<li><strong>State Management:</strong> Maintains workflow state and progress</li>
<li><strong>Method Integration:</strong> Connects to external services and tools</li>
</ul>
<h3>2.3 AI Integration Layer</h3>
<p>Unified interface for multiple AI providers:</p>
<ul>
<li><strong>OpenAI Integration:</strong> GPT models via API</li>
<li><strong>Anthropic Integration:</strong> Claude models via API</li>
<li><strong>Neutralization:</strong> Data anonymization and security</li>
<li><strong>Prompt Management:</strong> Centralized prompt templates</li>
</ul>
<h2>3. Data Flow Architecture</h2>
<div class="mermaid">
sequenceDiagram
participant Client as Frontend Client
participant Gateway as API Gateway
participant Auth as Authentication
participant Workflow as Workflow Manager
participant AI as AI Connectors
participant Data as Data Store
participant External as External Services
Client->>Gateway: HTTP Request
Gateway->>Auth: Validate Token
Auth-->>Gateway: Token Valid/Invalid
alt Valid Token
Gateway->>Workflow: Route Request
Workflow->>Data: Retrieve/Store Data
Data-->>Workflow: Data Response
alt AI Processing Required
Workflow->>AI: Process with AI
AI-->>Workflow: AI Response
end
alt External Service Required
Workflow->>External: Call External API
External-->>Workflow: Service Response
end
Workflow-->>Gateway: Processed Response
Gateway-->>Client: HTTP Response
else Invalid Token
Gateway-->>Client: 401 Unauthorized
end
</div>
<h2>4. Interface Architecture</h2>
<div class="mermaid">
graph LR
subgraph "Interface Layer"
AI_Interface[interfaceAiCalls.py<br/>AI Provider Interface]
App_Interface[interfaceAppObjects.py<br/>Application Objects]
Chat_Interface[interfaceChatObjects.py<br/>Chat Management]
Comp_Interface[interfaceComponentObjects.py<br/>Component Management]
end
subgraph "Core Services"
Workflow[Workflow Manager]
AI[AI Connectors]
Data[Data Layer]
end
AI_Interface --> AI
App_Interface --> Workflow
Chat_Interface --> Workflow
Comp_Interface --> Workflow
Workflow --> Data
AI --> Data
style AI_Interface fill:#9b59b6,stroke:#8e44ad,stroke-width:2px,color:#fff
style App_Interface fill:#9b59b6,stroke:#8e44ad,stroke-width:2px,color:#fff
style Chat_Interface fill:#9b59b6,stroke:#8e44ad,stroke-width:2px,color:#fff
style Comp_Interface fill:#9b59b6,stroke:#8e44ad,stroke-width:2px,color:#fff
</div>
<h3>4.1 Interface Specifications</h3>
<div class="tech-stack">
<div class="tech-card">
<h4>interfaceAiCalls.py</h4>
<ul>
<li>Unified AI provider interface</li>
<li>OpenAI and Anthropic integration</li>
<li>Request/response standardization</li>
<li>Error handling and retry logic</li>
</ul>
</div>
<div class="tech-card">
<h4>interfaceAppObjects.py</h4>
<ul>
<li>Application state management</li>
<li>User session handling</li>
<li>Configuration management</li>
<li>System-wide object access</li>
</ul>
</div>
<div class="tech-card">
<h4>interfaceChatObjects.py</h4>
<ul>
<li>Chat session management</li>
<li>Message history tracking</li>
<li>Conversation context</li>
<li>Real-time communication</li>
</ul>
</div>
<div class="tech-card">
<h4>interfaceComponentObjects.py</h4>
<ul>
<li>Component lifecycle management</li>
<li>Plugin system interface</li>
<li>Service discovery</li>
<li>Dependency injection</li>
</ul>
</div>
</div>
<h2>5. Security Architecture</h2>
<div class="mermaid">
graph TB
subgraph "Authentication Layer"
Google[Google OAuth]
MS[Microsoft OAuth]
Local[Local Authentication]
end
subgraph "Security Services"
Auth[Authentication Service]
Token[Token Management]
Neutralizer[Data Neutralizer]
end
subgraph "Data Protection"
Encryption[Data Encryption]
Anonymization[Data Anonymization]
Access[Access Control]
end
Google --> Auth
MS --> Auth
Local --> Auth
Auth --> Token
Token --> Access
Neutralizer --> Anonymization
Access --> Encryption
style Auth fill:#e67e22,stroke:#d35400,stroke-width:2px,color:#fff
style Neutralizer fill:#e67e22,stroke:#d35400,stroke-width:2px,color:#fff
style Encryption fill:#e67e22,stroke:#d35400,stroke-width:2px,color:#fff
</div>
<h2>6. Integration Points</h2>
<h3>6.1 Microsoft Office Integration</h3>
<ul>
<li><strong>Outlook:</strong> Email processing and automation</li>
<li><strong>SharePoint:</strong> Document management and collaboration</li>
<li><strong>PowerPoint:</strong> Presentation generation and editing</li>
<li><strong>Excel:</strong> Data processing and analysis</li>
</ul>
<h3>6.2 Web Services Integration</h3>
<ul>
<li><strong>Web Crawler:</strong> Automated data collection</li>
<li><strong>API Connectors:</strong> Third-party service integration</li>
<li><strong>Real-time Updates:</strong> Live data synchronization</li>
</ul>
<h3>6.3 Development Tools Integration</h3>
<ul>
<li><strong>Code Generation:</strong> AI-powered code creation</li>
<li><strong>Documentation:</strong> Automated documentation generation</li>
<li><strong>Testing:</strong> Automated test case generation</li>
</ul>
<h2>7. Technology Stack</h2>
<div class="tech-stack">
<div class="tech-card">
<h4>Backend</h4>
<ul>
<li><strong>Framework:</strong> Flask (Python)</li>
<li><strong>Database:</strong> JSON-based storage</li>
<li><strong>Authentication:</strong> OAuth 2.0</li>
<li><strong>API:</strong> RESTful architecture</li>
</ul>
</div>
<div class="tech-card">
<h4>Frontend</h4>
<ul>
<li><strong>Framework:</strong> Vanilla JavaScript</li>
<li><strong>UI:</strong> HTML5/CSS3</li>
<li><strong>Icons:</strong> Font Awesome</li>
<li><strong>Styling:</strong> Custom CSS framework</li>
</ul>
</div>
<div class="tech-card">
<h4>AI Services</h4>
<ul>
<li><strong>OpenAI:</strong> GPT models</li>
<li><strong>Anthropic:</strong> Claude models</li>
<li><strong>Processing:</strong> Custom prompt engineering</li>
<li><strong>Security:</strong> Data neutralization</li>
</ul>
</div>
<div class="tech-card">
<h4>Infrastructure</h4>
<ul>
<li><strong>Deployment:</strong> Local/Cloud ready</li>
<li><strong>Configuration:</strong> Environment-based</li>
<li><strong>Logging:</strong> Structured logging</li>
<li><strong>Monitoring:</strong> Built-in health checks</li>
</ul>
</div>
</div>
<h2>8. Scalability Considerations</h2>
<div class="mermaid">
graph TB
subgraph "Current Architecture"
Single[Single Instance<br/>Development Ready]
end
subgraph "Scalable Architecture"
LoadBalancer[Load Balancer]
Gateway1[API Gateway 1]
Gateway2[API Gateway 2]
Gateway3[API Gateway N]
SharedDB[Shared Database]
Cache[Redis Cache]
end
Single --> LoadBalancer
LoadBalancer --> Gateway1
LoadBalancer --> Gateway2
LoadBalancer --> Gateway3
Gateway1 --> SharedDB
Gateway2 --> SharedDB
Gateway3 --> SharedDB
Gateway1 --> Cache
Gateway2 --> Cache
Gateway3 --> Cache
style LoadBalancer fill:#f39c12,stroke:#e67e22,stroke-width:2px,color:#fff
style SharedDB fill:#f39c12,stroke:#e67e22,stroke-width:2px,color:#fff
style Cache fill:#f39c12,stroke:#e67e22,stroke-width:2px,color:#fff
</div>
<h3>8.1 Horizontal Scaling</h3>
<ul>
<li><strong>API Gateway:</strong> Stateless design enables multiple instances</li>
<li><strong>Database:</strong> JSON storage can be replaced with scalable databases</li>
<li><strong>AI Processing:</strong> Queue-based processing for high load</li>
<li><strong>Caching:</strong> Redis integration for performance optimization</li>
</ul>
<h3>8.2 Performance Optimization</h3>
<ul>
<li><strong>Connection Pooling:</strong> Efficient resource management</li>
<li><strong>Async Processing:</strong> Non-blocking operations</li>
<li><strong>Data Compression:</strong> Reduced bandwidth usage</li>
<li><strong>CDN Integration:</strong> Static asset delivery</li>
</ul>
<h2>9. Development and Deployment</h2>
<h3>9.1 Development Environment</h3>
<ul>
<li><strong>Local Development:</strong> Python virtual environment</li>
<li><strong>Configuration:</strong> Environment-specific config files</li>
<li><strong>Testing:</strong> Built-in test suite</li>
<li><strong>Documentation:</strong> Comprehensive code documentation</li>
</ul>
<h3>9.2 Deployment Options</h3>
<ul>
<li><strong>Local Deployment:</strong> Direct Python execution</li>
<li><strong>Container Deployment:</strong> Docker containerization</li>
<li><strong>Cloud Deployment:</strong> AWS/Azure/GCP ready</li>
<li><strong>CI/CD Integration:</strong> Automated deployment pipelines</li>
</ul>
<h2>10. Monitoring and Maintenance</h2>
<h3>10.1 Health Monitoring</h3>
<ul>
<li><strong>System Health:</strong> Built-in health check endpoints</li>
<li><strong>Performance Metrics:</strong> Response time monitoring</li>
<li><strong>Error Tracking:</strong> Comprehensive error logging</li>
<li><strong>Resource Usage:</strong> Memory and CPU monitoring</li>
</ul>
<h3>10.2 Maintenance Procedures</h3>
<ul>
<li><strong>Backup Strategy:</strong> Automated data backups</li>
<li><strong>Update Process:</strong> Version-controlled updates</li>
<li><strong>Rollback Capability:</strong> Quick system restoration</li>
<li><strong>Security Updates:</strong> Regular security patches</li>
</ul>
<h2>11. Conclusion</h2>
<div class="highlight">
<p>The PowerOn AI Platform presents a well-architected solution with clear separation of concerns, modular design, and comprehensive integration capabilities. The system is designed for both immediate deployment and future scalability, with robust security measures and extensive monitoring capabilities.</p>
<p><strong>Key Strengths:</strong></p>
<ul>
<li>Modular architecture enabling easy maintenance and updates</li>
<li>Comprehensive AI integration with multiple providers</li>
<li>Robust security framework with data neutralization</li>
<li>Extensive Microsoft Office integration</li>
<li>Scalable design supporting future growth</li>
</ul>
</div>
<p><em>Document Version: 3.0 | Last Updated: July 2025</em></p>
<p><em>Author: Patrick Motsch, CTO, ValueOn AG</em></p>
<p><em>Confidential Document</em></p>
</div>
<script>
mermaid.initialize({
startOnLoad: true,
theme: 'default',
flowchart: {
useMaxWidth: true,
htmlLabels: true
},
sequence: {
useMaxWidth: true,
diagramMarginX: 50,
diagramMarginY: 10
}
});
</script>
</body>
</html>

View file

@ -1,203 +0,0 @@
# Azure Speech Services - Required Permissions
## Overview
The Azure Speech Services connector requires specific permissions to access Azure Cognitive Services APIs. This document outlines the required permissions and setup.
## Required Azure Services
### 1. Azure Speech Services
- **Service**: Speech Services (Cognitive Services)
- **API Endpoints**:
- Speech-to-Text: `https://{region}.stt.speech.microsoft.com`
- Text-to-Speech: `https://{region}.tts.speech.microsoft.com`
### 2. Azure Translator
- **Service**: Translator (Cognitive Services)
- **API Endpoint**: `https://api.cognitive.microsofttranslator.com`
## Required Permissions
### Microsoft Graph API Permissions
The user's Microsoft connection must have the following permissions:
1. **Cognitive Services User** (Application Permission)
- Scope: `https://cognitiveservices.azure.com/.default`
- Description: Access to Azure Cognitive Services
2. **Speech Services** (Application Permission)
- Scope: `https://speech.cognitiveservices.azure.com/.default`
- Description: Access to Azure Speech Services
3. **Translator Services** (Application Permission)
- Scope: `https://cognitiveservices.azure.com/.default`
- Description: Access to Azure Translator Services
### Alternative: Resource-Specific Permissions
If using resource-specific permissions:
1. **Speech Services Resource**
- Permission: `SpeechServices.ReadWrite`
- Description: Read and write access to Speech Services
2. **Translator Resource**
- Permission: `Translator.ReadWrite`
- Description: Read and write access to Translator Services
## Azure Resource Setup
### 1. Create Azure Speech Services Resource
```bash
# Using Azure CLI
az cognitiveservices account create \
--name "poweron-speech" \
--resource-group "poweron-rg" \
--location "westeurope" \
--kind "SpeechServices" \
--sku "S0"
```
### 2. Create Azure Translator Resource
```bash
# Using Azure CLI
az cognitiveservices account create \
--name "poweron-translator" \
--resource-group "poweron-rg" \
--location "westeurope" \
--kind "TextTranslation" \
--sku "S1"
```
### 3. Get Access Keys
```bash
# Get Speech Services key
az cognitiveservices account keys list \
--name "poweron-speech" \
--resource-group "poweron-rg"
# Get Translator key
az cognitiveservices account keys list \
--name "poweron-translator" \
--resource-group "poweron-rg"
```
## Authentication Methods
### 1. Access Key Authentication (Current Implementation)
- Uses `Ocp-Apim-Subscription-Key` header
- Requires access keys from Azure portal
- Suitable for server-to-server authentication
### 2. Azure AD Authentication (Recommended for Production)
- Uses Bearer token authentication
- More secure and scalable
- Requires Azure AD app registration
## Implementation Details
### Current Implementation
The connector currently uses access key authentication:
```python
headers = {
"Ocp-Apim-Subscription-Key": self.access_token,
"Ocp-Apim-Subscription-Region": self.region
}
```
### Future Enhancement: Azure AD Authentication
For production use, consider implementing Azure AD authentication:
```python
# Get token from Azure AD
token = await get_azure_ad_token(
client_id="your-app-id",
client_secret="your-app-secret",
tenant_id="your-tenant-id",
scope="https://cognitiveservices.azure.com/.default"
)
headers = {
"Authorization": f"Bearer {token}",
"Ocp-Apim-Subscription-Region": self.region
}
```
## Supported Features
### Speech-to-Text (STT)
- **Languages**: 100+ languages supported
- **Formats**: WAV, MP3, FLAC, OGG
- **Quality**: Standard and Neural voices
- **Real-time**: Streaming support available
### Text-to-Speech (TTS)
- **Voices**: 400+ neural voices
- **Languages**: 140+ languages
- **Formats**: MP3, WAV, OGG, FLAC
- **SSML**: Full SSML support
### Translation
- **Languages**: 100+ languages
- **Real-time**: Streaming translation
- **Custom**: Custom translation models
- **Batch**: Batch translation support
## Error Handling
### Common Error Codes
- **401 Unauthorized**: Invalid access key or expired token
- **403 Forbidden**: Insufficient permissions
- **429 Too Many Requests**: Rate limit exceeded
- **500 Internal Server Error**: Service unavailable
### Rate Limits
- **Speech-to-Text**: 20 requests per second
- **Text-to-Speech**: 20 requests per second
- **Translation**: 2,000,000 characters per month (free tier)
## Security Considerations
1. **Access Key Rotation**: Regularly rotate access keys
2. **Network Security**: Use HTTPS only
3. **Data Privacy**: Audio data is processed in Azure
4. **Compliance**: Ensure GDPR/CCPA compliance
5. **Monitoring**: Enable Azure Monitor for usage tracking
## Cost Optimization
### Pricing Tiers
- **Free Tier**: 5 hours STT, 5 hours TTS per month
- **Standard Tier**: Pay-per-use pricing
- **Enterprise**: Volume discounts available
### Best Practices
1. **Caching**: Cache TTS results for repeated text
2. **Compression**: Use compressed audio formats
3. **Batching**: Batch multiple requests when possible
4. **Monitoring**: Track usage and costs
## Troubleshooting
### Common Issues
1. **Invalid Region**: Ensure region matches resource location
2. **Expired Keys**: Check key expiration and rotation
3. **Quota Exceeded**: Monitor usage and upgrade if needed
4. **Network Issues**: Check firewall and proxy settings
### Debug Mode
Enable debug logging to troubleshoot issues:
```python
import logging
logging.getLogger('connectorAzureSpeech').setLevel(logging.DEBUG)
```
## Next Steps
1. **Set up Azure resources** with required permissions
2. **Configure access keys** in the application
3. **Test connection** using the health check endpoint
4. **Monitor usage** and costs
5. **Implement caching** for better performance
6. **Add error handling** for production use

View file

@ -1,245 +0,0 @@
# Azure Voice Services Integration
## Übersicht
Diese Implementierung bietet Azure Speech Services Integration für zwei Hauptfunktionen:
1. **Realtime Dolmetscher**: Sprache → Text (übersetzt)
2. **Konversation**: Frage → Antwort in Voice
## Architektur
### Backend (Gateway)
- **Route**: `gateway/modules/routes/routeVoiceAzure.py`
- **Connector**: `gateway/modules/connectors/connectorAzureSpeech.py`
- **Integration**: In `gateway/app.py` eingebunden
### Frontend (Frontend Agents)
- **Module**: `frontend_agents/public/js/modules/voiceMain.js`
- **HTML**: `frontend_agents/public/htmlparts/part_voiceMain.html`
- **API**: Erweitert in `frontend_agents/public/js/shared/apiCalls.js`
- **Navigation**: Integriert in `frontend_agents/public/js/shared/globalState.js`
## API Endpunkte
### Voice Services
- `GET /api/voice/settings` - Verfügbare Sprachen und Stimmen
- `POST /api/voice/speech-to-text` - Sprache zu Text
- `POST /api/voice/text-to-speech` - Text zu Sprache
- `POST /api/voice/translate` - Text übersetzen
- `POST /api/voice/conversation` - Konversation mit Voice-Antwort
- `POST /api/voice/realtime-interpreter` - Realtime Dolmetscher
- `GET /api/voice/health` - Verbindungsstatus
### Streaming Services (Neu!)
- `POST /api/voice/stream/speech-to-text` - Streaming Sprache zu Text
- `POST /api/voice/stream/text-to-speech` - Streaming Text zu Sprache
- `POST /api/voice/stream/realtime-interpreter` - Streaming Realtime Dolmetscher
### WebSocket Real-time Services (Neu!) ⭐
- `WS /api/voice/ws/realtime-interpreter` - Echte Real-time Übersetzung mit Live-Mikrofon
- `WS /api/voice/ws/speech-to-text` - Echte Real-time Speech-to-Text mit Live-Mikrofon
- `WS /api/voice/ws/text-to-speech` - Real-time Text-to-Speech Streaming
- `GET /api/voice/ws/status` - WebSocket Verbindungsstatus
### Subscription Management (Neu!)
- `GET /api/voice/connections` - Microsoft Verbindungen mit Speech Key Status
- `POST /api/voice/subscription` - Azure Speech Services Subscription Key setzen
- `GET /api/voice/subscription` - Aktuelle Subscription Information abrufen
## Authentifizierung
Die Voice Services nutzen Azure Speech Services Subscription Keys für die Authentifizierung:
### Setup Prozess:
1. **Microsoft Account verbinden**: User muss zuerst eine Microsoft Connection erstellen
2. **Azure Speech Services Subscription erstellen**:
- Azure Portal → Cognitive Services → Speech
- Subscription Key und Region notieren
3. **Subscription Key konfigurieren**:
- `POST /api/voice/subscription` mit Subscription Key und Region
- System testet automatisch die Gültigkeit des Keys
4. **Verwendung**: Azure Speech Services werden mit dem konfigurierten Key aufgerufen
### Fallback:
- Falls kein Subscription Key konfiguriert ist, wird der Microsoft Access Token als Fallback verwendet
- Dies funktioniert nur für Entwicklung/Testing, nicht für Produktion
## Frontend Features
### Realtime Dolmetscher Tab
- Mikrofon-Aufnahme Button
- Original Text Anzeige
- Übersetzter Text Anzeige
- Echtzeit-Verarbeitung
### Konversation Tab
- Chat-Interface
- Voice-Input Button
- Voice-Output Wiedergabe
- Konversationshistorie
### Einstellungen Tab
- Spracheinstellungen (STT/TTS)
- Stimmen-Auswahl
- Übersetzungsoptionen
- Verbindungstest
## Verwendung
1. **Microsoft Account verbinden**: User muss zuerst eine Microsoft Connection erstellen
2. **Voice Module öffnen**: Über Navigation → Verwaltung → Voice Services
3. **Einstellungen konfigurieren**: Sprache, Stimme, Übersetzung
4. **Services nutzen**: Dolmetscher oder Konversation
## Technische Details
### Audio Format
- Input: WAV, 16kHz, Mono
- Output: MP3, 16kHz, 128kbps
### Unterstützte Sprachen
- Deutsch (de-DE)
- English (en-US, en-GB)
- Französisch (fr-FR)
- Spanisch (es-ES)
- Weitere über Azure verfügbar
### Stimmen
- Neural Voices (hohe Qualität)
- Männlich/Weiblich verfügbar
- Sprachenspezifisch
## Production Implementation
Die Azure Voice Services sind jetzt vollständig implementiert mit:
### ✅ Implementierte Features
1. **Echte Azure Speech Services API Integration**
- Speech-to-Text (STT) mit Azure Cognitive Services
- Text-to-Speech (TTS) mit Azure Neural Voices
- Translation Services mit Azure Translator
2. **Audio Format Handling**
- Unterstützung für WAV, MP3, OGG Formate
- Automatische Format-Validierung
- Audio-Konvertierung für optimale Qualität
3. **Robuste Error Handling**
- Spezifische Fehlermeldungen für verschiedene HTTP-Status-Codes
- Retry-Logik mit exponentieller Backoff
- Timeout-Handling für langsame Verbindungen
4. **Rate Limiting**
- 20 Requests pro Minute pro Service
- Automatische Reset-Funktionalität
- Benutzerfreundliche Fehlermeldungen
5. **AI Integration**
- Intelligente Konversationsantworten
- Mehrsprachige Unterstützung (Deutsch/Englisch)
- Erweiterbare Response-Logik
6. **Umfassendes Logging**
- Detaillierte Fehlerprotokollierung
- Performance-Monitoring
- Debug-Informationen für Audio-Formate
7. **Audio Streaming Support** ⭐ **NEU!**
- Real-time Audio-Verarbeitung in Chunks
- Server-Sent Events (SSE) für Live-Updates
- Streaming Text-to-Speech für bessere Performance
- Chunked Audio-Upload für große Dateien
- Reduzierte Latenz bei Voice-Interaktionen
8. **WebSocket Real-time Services** ⭐ **NEU!**
- Echte Live-Mikrofon-Integration
- Bidirektionale Echtzeit-Kommunikation
- Real-time Audio-Streaming ohne Datei-Upload
- Live-Übersetzung während des Sprechens
- WebSocket-basierte Verbindungsverwaltung
- Automatische Wiederverbindung bei Verbindungsabbruch
### 🔧 Konfiguration
**Azure Speech Services Setup:**
1. Azure Speech Services Resource erstellen
2. Subscription Key in der Datenbank speichern
3. Region konfigurieren (Standard: westeurope)
**Unterstützte Audio-Formate:**
- **STT Input:** WAV (16kHz), MP3, OGG
- **TTS Output:** MP3 (verschiedene Qualitäten), PCM
**Rate Limits:**
- Speech-to-Text: 20 requests/minute
- Text-to-Speech: 20 requests/minute
- Translation: 20 requests/minute
## Subscription Key Setup Beispiel
### 1. Subscription Key setzen:
```bash
curl -X POST "https://your-api.com/api/voice/subscription" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"subscription_key": "your-azure-speech-subscription-key",
"region": "westeurope"
}'
```
### 2. Subscription Status prüfen:
```bash
curl -X GET "https://your-api.com/api/voice/subscription" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
```
### 3. Verbindungen mit Speech Key Status anzeigen:
```bash
curl -X GET "https://your-api.com/api/voice/connections" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
```
## WebSocket Real-time Usage Beispiel
### 1. JavaScript WebSocket Client:
```javascript
// Real-time Interpreter
const client = new VoiceWebSocketClient();
await client.connectRealtimeInterpreter('user123', 'de-DE', 'en-US');
// Callbacks setzen
client.onTranslationResult = (result) => {
console.log('Original:', result.original_text);
console.log('Translated:', result.translated_text);
};
// Recording starten
await client.startRecording();
```
### 2. WebSocket Verbindung:
```javascript
const ws = new WebSocket('ws://localhost:8000/api/voice/ws/realtime-interpreter?user_id=user123&from_language=de-DE&to_language=en-US');
ws.onmessage = (event) => {
const message = JSON.parse(event.data);
if (message.type === 'translation_result') {
// Live-Übersetzung anzeigen
displayTranslation(message.original_text, message.translated_text);
}
};
```
### 🚀 Nächste Schritte
1. **Azure OpenAI Integration** für erweiterte Konversation
2. ✅ **Audio Streaming** für bessere Performance - **IMPLEMENTIERT!**
3. ✅ **Subscription Key Management** - **IMPLEMENTIERT!**
4. ✅ **WebSocket Real-time Services** - **IMPLEMENTIERT!**
5. **Voice Cloning** mit Custom Neural Voices
6. **Advanced Audio Processing** mit Noise Reduction
7. **Audio Quality Enhancement** mit Noise Reduction und Echo Cancellation
8. **Multi-user WebSocket Rooms** für Gruppen-Übersetzung

View file

@ -1,629 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ValueOn/PowerOn Strategische Themen 2025-2027</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #333;
overflow: hidden;
}
.presentation-container {
width: 100vw;
height: 100vh;
position: relative;
padding-bottom: 90px;
overflow-y: auto;
}
.slide {
width: 100%;
min-height: 100vh;
position: absolute;
left: 0;
top: 0;
overflow-y: auto;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 4rem;
padding-bottom: 2.5rem;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
opacity: 0;
transform: translateX(100%);
transition: all 0.5s ease-in-out;
}
.slide.active {
opacity: 1;
transform: translateX(0);
}
.slide-header {
text-align: center;
margin-bottom: 3rem;
}
.slide-title {
font-size: 3.5rem;
font-weight: 700;
color: #667eea;
margin-bottom: 1rem;
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
.slide-subtitle {
font-size: 1.3rem;
color: #666;
font-weight: 300;
}
.prism-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 2rem;
width: 100%;
max-width: 1200px;
}
.prism-item {
background: white;
padding: 2rem;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
border-left: 5px solid #667eea;
transition: transform 0.3s ease;
}
.prism-item:hover {
transform: translateY(-5px);
}
.prism-letter {
font-size: 2.5rem;
font-weight: 700;
color: #667eea;
margin-bottom: 0.5rem;
}
.prism-title {
font-size: 1.3rem;
font-weight: 600;
color: #333;
margin-bottom: 1rem;
}
.prism-content {
font-size: 1rem;
line-height: 1.6;
color: #555;
}
.navigation {
position: fixed;
bottom: 2rem;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 1rem;
z-index: 1000;
}
.nav-btn {
background: rgba(255, 255, 255, 0.9);
border: none;
padding: 0.75rem 1.5rem;
border-radius: 25px;
cursor: pointer;
font-weight: 600;
color: #667eea;
transition: all 0.3s ease;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav-btn:hover {
background: #667eea;
color: white;
transform: translateY(-2px);
}
.nav-btn.active {
background: #667eea;
color: white;
}
.slide-counter {
position: fixed;
top: 2rem;
right: 2rem;
background: rgba(255, 255, 255, 0.9);
padding: 0.5rem 1rem;
border-radius: 20px;
font-weight: 600;
color: #667eea;
z-index: 1000;
}
.keyboard-hint {
position: fixed;
bottom: 1rem;
right: 2rem;
background: rgba(255, 255, 255, 0.8);
padding: 0.5rem 1rem;
border-radius: 20px;
font-size: 0.8rem;
color: #666;
z-index: 1000;
}
@media (max-width: 768px) {
.prism-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
.slide {
padding: 2rem;
}
.slide-title {
font-size: 2.5rem;
}
}
</style>
</head>
<body>
<div class="presentation-container">
<!-- Slide 1: UNTERNEHMENSSTRUKTUR & SPIN-OFF -->
<div class="slide active" id="slide-1">
<div class="slide-header">
<h1 class="slide-title">UNTERNEHMENSSTRUKTUR & SPIN-OFF</h1>
<p class="slide-subtitle">ValueOn etabliert PowerOn als 100%-Tochtergesellschaft</p>
</div>
<div class="prism-grid">
<div class="prism-item">
<div class="prism-letter">P</div>
<div class="prism-title">PRECISE</div>
<div class="prism-content">ValueOn etabliert PowerOn als Tochtergesellschaft mit Mehrheitsbeteiligung für KI-Produktentwicklung, während ValueOn als Muttergesellschaft die Boutique-Beratungsdienstleistungen fokussiert.</div>
</div>
<div class="prism-item">
<div class="prism-letter">R</div>
<div class="prism-title">REALISTIC</div>
<div class="prism-content">Spin-off erfolgt bis Ende 2025 mit klarer Aufgabentrennung: ValueOn = Beratung/Services, PowerOn = Produktentwicklung/Apps.</div>
</div>
<div class="prism-item">
<div class="prism-letter">I</div>
<div class="prism-title">INCLUSIVE</div>
<div class="prism-content">Beide Unternehmen ergänzen sich synergetisch - ValueOn identifiziert Kundenbedürfnisse, PowerOn entwickelt entsprechende KI-Lösungen.</div>
</div>
<div class="prism-item">
<div class="prism-letter">S</div>
<div class="prism-title">SUCCINCT</div>
<div class="prism-content">Mutterhaus ist ValueOn mit Beratung (ValueOn) mit Tochter für Produkte (PowerOn).</div>
</div>
<div class="prism-item">
<div class="prism-letter">M</div>
<div class="prism-title">MEASURABLE</div>
<div class="prism-content">
• PowerOn-Gründung: bis 30.09.2025<br>
• Rechtliche Trennung der Geschäftsbereiche: bis Q4-2025<br>
• Erste PowerOn-Produktumsätze: ab Q1-2026
</div>
</div>
</div>
</div>
<!-- Slide 2: POWERON PRODUKTSTRATEGIE -->
<div class="slide" id="slide-2">
<div class="slide-header">
<h1 class="slide-title">POWERON PRODUKTSTRATEGIE</h1>
<p class="slide-subtitle">KI-gestützte Business-Apps für KMU-Unternehmer</p>
</div>
<div class="prism-grid">
<div class="prism-item">
<div class="prism-letter">P</div>
<div class="prism-title">PRECISE</div>
<div class="prism-content">PowerOn entwickelt eine KI-gestützte Business-App mit Fokus auf 60-Sekunden-Videoerstellung für KMU-Unternehmer durch Anbindung an Outlook, SharePoint, Office-Apps und Google Drive.</div>
</div>
<div class="prism-item">
<div class="prism-letter">R</div>
<div class="prism-title">REALISTIC</div>
<div class="prism-content">MVP-Chatbot Launch bis 31.07.2025 (unverrückbare Deadline), mobile App für iOS/Android bis Q4-2025.</div>
</div>
<div class="prism-item">
<div class="prism-letter">I</div>
<div class="prism-title">INCLUSIVE</div>
<div class="prism-content">Zielgruppe: KMU-Unternehmer und KI-Interessierte im DACH-Raum mit niedrigschwelligem Zugang zu KI-Tools.</div>
</div>
<div class="prism-item">
<div class="prism-letter">S</div>
<div class="prism-title">SUCCINCT</div>
<div class="prism-content">"KI für alle" - Einfache Prompts + Eigene Daten = Sofortige Business-Insights.</div>
</div>
<div class="prism-item">
<div class="prism-letter">M</div>
<div class="prism-title">MEASURABLE</div>
<div class="prism-content">
• MVP-Chatbot: 31.07.2025 (hard deadline)<br>
• Mobile App Launch: 31.12.2025<br>
• 100 aktive Nutzer bis Q2-2026<br>
• App Store/Google Play Verfügbarkeit: Q4-2025
</div>
</div>
</div>
</div>
<!-- Slide 3: CHRIS-COMPANY JOINT VENTURE -->
<div class="slide" id="slide-3">
<div class="slide-header">
<h1 class="slide-title">CHRIS-COMPANY JOINT VENTURE</h1>
<p class="slide-subtitle">Technologie-Partnerschaft für beschleunigte Entwicklung</p>
</div>
<div class="prism-grid">
<div class="prism-item">
<div class="prism-letter">P</div>
<div class="prism-title">PRECISE</div>
<div class="prism-content">ValueOn erwirbt 50%+ Beteiligung an Chris-Company (Fintech-Plattform) und nutzt deren Fast-Coding/Product-Integration-Expertise für PowerOn-Entwicklung.</div>
</div>
<div class="prism-item">
<div class="prism-letter">R</div>
<div class="prism-title">REALISTIC</div>
<div class="prism-content">Gegenseitige Unterstützung: Chris-Company beschleunigt PowerOn-Entwicklung, ValueOn hilft bei Marktdurchdringung seiner Fintech-Plattform. Fahrplan verlängert.</div>
</div>
<div class="prism-item">
<div class="prism-letter">I</div>
<div class="prism-title">INCLUSIVE</div>
<div class="prism-content">Win-Win-Partnerschaft kombiniert technische Expertise (Chris-Company) mit Markt-/Beratungskompetenz (ValueOn).</div>
</div>
<div class="prism-item">
<div class="prism-letter">S</div>
<div class="prism-title">SUCCINCT</div>
<div class="prism-content">Technologie-Partnerschaft für beschleunigte Produktentwicklung und Marktzugang.</div>
</div>
<div class="prism-item">
<div class="prism-letter">M</div>
<div class="prism-title">MEASURABLE</div>
<div class="prism-content">
• Beteiligungsvertrag: bis 30.10.2025<br>
• Erste gemeinsame Produktfeatures: Q1-2026<br>
• Umsatzsteigerung Chris-Company Fintech: +30% bis Q2-2026
</div>
</div>
</div>
</div>
<!-- Slide 4: VALUEON BOUTIQUE-BERATUNG -->
<div class="slide" id="slide-4">
<div class="slide-header">
<h1 class="slide-title">VALUEON BOUTIQUE-BERATUNG</h1>
<p class="slide-subtitle">Führende Boutique-Beratung im DACH-Raum</p>
</div>
<div class="prism-grid">
<div class="prism-item">
<div class="prism-letter">P</div>
<div class="prism-title">PRECISE</div>
<div class="prism-content">ValueOn positioniert sich als führende Boutique-Beratung in der deutschsprachigen Schweiz mit Spezialisierung auf Strategieberatung, Corporate Digital Responsibility, Education, Ethik, digitale Transformationsführung, Umsetzungsführung und Lösungsarchitektur im DACH-Raum.</div>
</div>
<div class="prism-item">
<div class="prism-letter">R</div>
<div class="prism-title">REALISTIC</div>
<div class="prism-content">Marktführerschaft in deutschsprachiger Schweiz bis Ende 2027, Expansion nach Deutschland/Österreich ab 2028.</div>
</div>
<div class="prism-item">
<div class="prism-letter">I</div>
<div class="prism-title">INCLUSIVE</div>
<div class="prism-content">Komplettes Spektrum der digitalen Transformation: von Strategie über Ethik bis zur technischen Umsetzung.</div>
</div>
<div class="prism-item">
<div class="prism-letter">S</div>
<div class="prism-title">SUCCINCT</div>
<div class="prism-content">Der vertrauensvolle Sparringspartner für verantwortungsvolle digitale Transformation.</div>
</div>
<div class="prism-item">
<div class="prism-letter">M</div>
<div class="prism-title">MEASURABLE</div>
<div class="prism-content">
• 5 neue Beratungskunden bis Ende 2025<br>
• Marktführerschaft CH bis 31.12.2027<br>
• 15+ durchgeführte Transformationsprojekte bis 2027
</div>
</div>
</div>
</div>
<!-- Slide 5: EDUCATION & DEUTSCHE EXPANSION -->
<div class="slide" id="slide-5">
<div class="slide-header">
<h1 class="slide-title">EDUCATION & DEUTSCHE EXPANSION</h1>
<p class="slide-subtitle">KI-Bildung als Brücke zum deutschen Markt</p>
</div>
<div class="prism-grid">
<div class="prism-item">
<div class="prism-letter">P</div>
<div class="prism-title">PRECISE</div>
<div class="prism-content">Gründung einer Education-Tochtergesellschaft in Deutschland (September 2025) für KI-Schulungen und Weiterbildungsprogramme im DACH-Raum.</div>
</div>
<div class="prism-item">
<div class="prism-letter">R</div>
<div class="prism-title">REALISTIC</div>
<div class="prism-content">Aufbau auf bestehender ValueOn-Expertise mit lokalem deutschen Marktfokus für Compliance und Kundenvertrauen.</div>
</div>
<div class="prism-item">
<div class="prism-letter">I</div>
<div class="prism-title">INCLUSIVE</div>
<div class="prism-content">Schulungsangebote für alle Unternehmensgrößen - von Einzelunternehmern bis zu mittelständischen Betrieben.</div>
</div>
<div class="prism-item">
<div class="prism-letter">S</div>
<div class="prism-title">SUCCINCT</div>
<div class="prism-content">KI-Bildung als Brücke zum deutschen Markt.</div>
</div>
<div class="prism-item">
<div class="prism-letter">M</div>
<div class="prism-title">MEASURABLE</div>
<div class="prism-content">
• Firmengründung DE: 30.09.2025<br>
• Erste Schulungen: Q4-2025<br>
• 100 teilnehmende Personen bis Q2-2026<br>
• Break-even der DE-Tochter: Q4-2025 / selbsttragend
</div>
</div>
</div>
</div>
<!-- Slide 6: HEMMSCHWELLEN-REDUKTION & KUNDENAKQUISE -->
<div class="slide" id="slide-6">
<div class="slide-header">
<h1 class="slide-title">HEMMSCHWELLEN-REDUKTION & KUNDENAKQUISE</h1>
<p class="slide-subtitle">App als Akquisetool für Beratungsmandate</p>
</div>
<div class="prism-grid">
<div class="prism-item">
<div class="prism-letter">P</div>
<div class="prism-title">PRECISE</div>
<div class="prism-content">PowerOn-App dient als "Türöffner" für ValueOn-Beratungsdienstleistungen durch niedrigschwellige KI-Erfahrungen und nahtlose Weiterleitung zu Beratungsangeboten.</div>
</div>
<div class="prism-item">
<div class="prism-letter">R</div>
<div class="prism-title">REALISTIC</div>
<div class="prism-content">Freemium-Modell der App generiert Leads, kostenpflichtige Features und Beratungsempfehlungen monetarisieren die Kundenbeziehung.</div>
</div>
<div class="prism-item">
<div class="prism-letter">I</div>
<div class="prism-title">INCLUSIVE</div>
<div class="prism-content">Von einfacher App-Nutzung bis zur Vollberatung - durchgängige Customer Journey.</div>
</div>
<div class="prism-item">
<div class="prism-letter">S</div>
<div class="prism-title">SUCCINCT</div>
<div class="prism-content">App als Akquisetool für Beratungsmandate.</div>
</div>
<div class="prism-item">
<div class="prism-letter">M</div>
<div class="prism-title">MEASURABLE</div>
<div class="prism-content">
• 10% der App-Nutzer werden zu Beratungsinteressenten<br>
• 5% der App-Nutzer werden zu zahlenden Beratungskunden<br>
• Conversion-Rate App → Beratung: mindestens 200 Leads bis Ende 2026
</div>
</div>
</div>
</div>
<!-- Management Summary Slide -->
<div class="slide" id="slide-0">
<div class="slide-header">
<h1 class="slide-title">Management Summary</h1>
<p class="slide-subtitle">Überblick, Werte, Team & Roadmap</p>
</div>
<div style="max-width:1200px;width:100%;margin:0 auto;">
<!-- Vision -->
<h2>Vision</h2>
<p style="font-size:1.2rem;margin-bottom:1.5rem;">Wir gestalten die Zukunft der KMU-Beratung durch eine KI-getriebene Ökosystem-Plattform, die Innovation, Zusammenarbeit und nachhaltigen Erfolg für Führungskräfte in der Schweiz und Deutschland ermöglicht.</p>
<!-- Mission -->
<h2>Mission</h2>
<ul style="margin-bottom:1.5rem;">
<li><b>ValueOn:</b> Wir befähigen KMU-Führungskräfte durch innovative Beratung, nachhaltige Strategien und partnerschaftliche Zusammenarbeit, die Chancen der Digitalisierung zu nutzen.</li>
<li><b>PowerOn:</b> Wir entwickeln KI-gestützte Tools und Plattformen, die Unternehmen helfen, schneller, intelligenter und kundenorientierter zu agieren.</li>
</ul>
<!-- Core Values -->
<h2>Core Values</h2>
<ul style="columns:2;-webkit-columns:2;-moz-columns:2;margin-bottom:1.5rem;">
<li>Vertrauen & Integrität</li>
<li>Partnerschaft & Co-Creation</li>
<li>Innovation & Neugier</li>
<li>Nachhaltigkeit</li>
<li>Exzellenz & Qualität</li>
<li>Empowerment</li>
<li>Transparenz</li>
</ul>
<!-- Team & Kapazitäten -->
<h2>Team & Kapazitäten</h2>
<table style="width:100%;border-collapse:collapse;margin-bottom:1.5rem;">
<thead>
<tr style="background:#f3f4f6;">
<th style="padding:8px;border:1px solid #e5e7eb;">Rolle</th>
<th style="padding:8px;border:1px solid #e5e7eb;">Anzahl</th>
<th style="padding:8px;border:1px solid #e5e7eb;">Verantwortlichkeiten</th>
</tr>
</thead>
<tbody>
<tr><td style="padding:8px;border:1px solid #e5e7eb;">Strategie & Leadership</td><td style="padding:8px;border:1px solid #e5e7eb;">0.5</td><td style="padding:8px;border:1px solid #e5e7eb;">Steuerung, Vision, Beteiligungen, Partnerschaften</td></tr>
<tr><td style="padding:8px;border:1px solid #e5e7eb;">KI & Tech Lead</td><td style="padding:8px;border:1px solid #e5e7eb;">1</td><td style="padding:8px;border:1px solid #e5e7eb;">Aufbau PowerOn-AI, Toolentwicklung, Tech-Scouting</td></tr>
<tr><td style="padding:8px;border:1px solid #e5e7eb;">Beratung & Projektleitung</td><td style="padding:8px;border:1px solid #e5e7eb;">6.5</td><td style="padding:8px;border:1px solid #e5e7eb;">Kundenprojekte, Co-Creation, Feedbacksystem</td></tr>
<tr><td style="padding:8px;border:1px solid #e5e7eb;">Marketing & Community</td><td style="padding:8px;border:1px solid #e5e7eb;">0.25</td><td style="padding:8px;border:1px solid #e5e7eb;">Thought Leadership, Events, Plattformkommunikation</td></tr>
<tr><td style="padding:8px;border:1px solid #e5e7eb;">Operations & Finance</td><td style="padding:8px;border:1px solid #e5e7eb;">0.25</td><td style="padding:8px;border:1px solid #e5e7eb;">Controlling, Ressourcenplanung, Beteiligungscontrolling</td></tr>
<tr><td style="padding:8px;border:1px solid #e5e7eb;">Externe Expert:innen</td><td style="padding:8px;border:1px solid #e5e7eb;">15</td><td style="padding:8px;border:1px solid #e5e7eb;">Schulungen, Venture-Coaching, Research im Bereich KI</td></tr>
</tbody>
</table>
<!-- Roadmap (detailliert, Q2/2024Q4/2026, je eine Zeile pro Quartal und IMD-Bereich) -->
<h2>Roadmap (Q2/2024 Q4/2026)</h2>
<div style="overflow-x:auto;">
<table style="width:100%;border-collapse:collapse;font-size:0.95rem;">
<thead>
<tr style="background:#f3f4f6;">
<th style="padding:6px;border:1px solid #e5e7eb;">Quartal</th>
<th style="padding:6px;border:1px solid #e5e7eb;">IMD-Bereich</th>
<th style="padding:6px;border:1px solid #e5e7eb;">Vorhanden</th>
<th style="padding:6px;border:1px solid #e5e7eb;">Benötigt</th>
<th style="padding:6px;border:1px solid #e5e7eb;">Gap / To Do</th>
</tr>
</thead>
<tbody>
<!-- Q2/2024 -->
<tr><td>Q2/2024</td><td>Go-to-Market</td><td>Beratungsangebot, 1 KI-Prototyp</td><td>Digitales Produkt, Vertriebskanal</td><td>Go-to-Market-Strategie finalisieren, Vertriebspartner gewinnen</td></tr>
<tr><td>Q2/2024</td><td>Engagement</td><td>Erste Kundenkontakte, Feedbackgespräche</td><td>Community-Event, Partnernetzwerk</td><td>Event planen, Partner identifizieren</td></tr>
<tr><td>Q2/2024</td><td>Operations</td><td>Basis-IT, manuelle Prozesse</td><td>Automatisierung, IT-Skalierung</td><td>Prozessanalyse, Automatisierungspotenziale identifizieren</td></tr>
<tr><td>Q2/2024</td><td>Organization</td><td>Kernteam, Rollenverteilung</td><td>Neue Strukturen, Incentivesystem</td><td>Organisationsstruktur prüfen, Incentives definieren</td></tr>
<!-- Q3/2024 -->
<tr><td>Q3/2024</td><td>Go-to-Market</td><td>Go-to-Market-Strategie, Vertriebspartner</td><td>Erstes digitales Produkt, Pricing-Modell</td><td>Produkt-Launch vorbereiten, Preismodell entwickeln</td></tr>
<tr><td>Q3/2024</td><td>Engagement</td><td>Community-Event, Partnernetzwerk</td><td>Kundenbindungsprogramm, Feedbacksystem</td><td>Programm aufsetzen, Feedbacksystem digitalisieren</td></tr>
<tr><td>Q3/2024</td><td>Operations</td><td>Automatisierungspotenziale bekannt</td><td>Automatisierte Prozesse, IT-Skalierung</td><td>Automatisierung umsetzen, IT erweitern</td></tr>
<tr><td>Q3/2024</td><td>Organization</td><td>Strukturvorschlag, Incentivesystem</td><td>Onboarding-Prozess, Change Management</td><td>Onboarding entwickeln, Change-Plan erstellen</td></tr>
<!-- Q4/2024 -->
<tr><td>Q4/2024</td><td>Go-to-Market</td><td>Produkt-Launch, Preismodell</td><td>Marketingkampagne, Vertriebsausbau</td><td>Kampagne starten, Vertriebsteam schulen</td></tr>
<tr><td>Q4/2024</td><td>Engagement</td><td>Kundenbindungsprogramm, Feedbacksystem</td><td>Community-Wachstum, Partner-Events</td><td>Events durchführen, Community ausbauen</td></tr>
<tr><td>Q4/2024</td><td>Operations</td><td>Automatisierte Prozesse, IT-Skalierung</td><td>Monitoring, Prozessoptimierung</td><td>Monitoring einführen, Prozesse optimieren</td></tr>
<tr><td>Q4/2024</td><td>Organization</td><td>Onboarding-Prozess, Change-Plan</td><td>Wachstum, neue Rollen</td><td>Neue Rollen besetzen, Team erweitern</td></tr>
<!-- Q1/2025 -->
<tr><td>Q1/2025</td><td>Go-to-Market</td><td>Marketingkampagne, Vertriebsteam</td><td>Neue Zielgruppen, Upselling</td><td>Zielgruppenanalyse, Upselling-Strategie</td></tr>
<tr><td>Q1/2025</td><td>Engagement</td><td>Community-Wachstum, Partner-Events</td><td>Digitale Plattform, Interaktionsformate</td><td>Plattform entwickeln, Formate testen</td></tr>
<tr><td>Q1/2025</td><td>Operations</td><td>Monitoring, Prozessoptimierung</td><td>Skalierung, neue Tools</td><td>Tools evaluieren, Skalierung vorbereiten</td></tr>
<tr><td>Q1/2025</td><td>Organization</td><td>Wachstum, neue Rollen</td><td>Leadership-Entwicklung, Kulturwandel</td><td>Leadership-Programm starten, Kulturmaßnahmen</td></tr>
<!-- Q2/2025 -->
<tr><td>Q2/2025</td><td>Go-to-Market</td><td>Neue Zielgruppen, Upselling</td><td>Internationalisierung, neue Kanäle</td><td>Marktanalyse, Kanäle aufbauen</td></tr>
<tr><td>Q2/2025</td><td>Engagement</td><td>Digitale Plattform, Interaktionsformate</td><td>Personalisierung, Data Analytics</td><td>Analytics einführen, Personalisierung testen</td></tr>
<tr><td>Q2/2025</td><td>Operations</td><td>Skalierung, neue Tools</td><td>Automatisierung weiterer Prozesse</td><td>Prozesse identifizieren, Automatisierung umsetzen</td></tr>
<tr><td>Q2/2025</td><td>Organization</td><td>Leadership-Entwicklung, Kulturwandel</td><td>Neue Incentives, Diversity</td><td>Incentives anpassen, Diversity fördern</td></tr>
<!-- Q3/2025 -->
<tr><td>Q3/2025</td><td>Go-to-Market</td><td>Internationalisierung, neue Kanäle</td><td>Neue Produkte, Partnerprogramme</td><td>Produktentwicklung, Partner gewinnen</td></tr>
<tr><td>Q3/2025</td><td>Engagement</td><td>Personalisierung, Data Analytics</td><td>Community-Features, Gamification</td><td>Features entwickeln, Gamification testen</td></tr>
<tr><td>Q3/2025</td><td>Operations</td><td>Automatisierung weiterer Prozesse</td><td>KI-Integration, Prozessinnovation</td><td>KI-Lösungen evaluieren, Innovation fördern</td></tr>
<tr><td>Q3/2025</td><td>Organization</td><td>Neue Incentives, Diversity</td><td>Agilität, neue Führungsmodelle</td><td>Agile Methoden einführen, Führungskräfte schulen</td></tr>
<!-- Q4/2025 -->
<tr><td>Q4/2025</td><td>Go-to-Market</td><td>Neue Produkte, Partnerprogramme</td><td>Skalierung, neue Märkte</td><td>Markteintritt vorbereiten, Skalierung planen</td></tr>
<tr><td>Q4/2025</td><td>Engagement</td><td>Community-Features, Gamification</td><td>Feedback-Loop, Community-Management</td><td>Feedbacksystem ausbauen, Community-Manager einstellen</td></tr>
<tr><td>Q4/2025</td><td>Operations</td><td>KI-Integration, Prozessinnovation</td><td>IT-Sicherheit, Compliance</td><td>Sicherheitskonzept erstellen, Compliance prüfen</td></tr>
<tr><td>Q4/2025</td><td>Organization</td><td>Agilität, neue Führungsmodelle</td><td>Wachstum, Nachfolgeplanung</td><td>Nachfolge identifizieren, Wachstum steuern</td></tr>
<!-- Q1/2026 -->
<tr><td>Q1/2026</td><td>Go-to-Market</td><td>Skalierung, neue Märkte</td><td>Neue Vertriebspartner, Expansion</td><td>Partner akquirieren, Expansion umsetzen</td></tr>
<tr><td>Q1/2026</td><td>Engagement</td><td>Feedback-Loop, Community-Management</td><td>Community-Analytics, Engagement-Programme</td><td>Analytics ausbauen, Programme starten</td></tr>
<tr><td>Q1/2026</td><td>Operations</td><td>IT-Sicherheit, Compliance</td><td>Cloud-Optimierung, neue Tools</td><td>Cloud-Lösungen evaluieren, Tools einführen</td></tr>
<tr><td>Q1/2026</td><td>Organization</td><td>Wachstum, Nachfolgeplanung</td><td>Leadership-Programme, Employer Branding</td><td>Programme entwickeln, Branding stärken</td></tr>
<!-- Q2/2026 -->
<tr><td>Q2/2026</td><td>Go-to-Market</td><td>Neue Vertriebspartner, Expansion</td><td>Produktdiversifikation, neue Märkte</td><td>Produkte entwickeln, Märkte analysieren</td></tr>
<tr><td>Q2/2026</td><td>Engagement</td><td>Community-Analytics, Engagement-Programme</td><td>Neue Formate, internationale Community</td><td>Formate testen, Internationalisierung fördern</td></tr>
<tr><td>Q2/2026</td><td>Operations</td><td>Cloud-Optimierung, neue Tools</td><td>KI-gestützte Prozesse, Automatisierung</td><td>KI-Prozesse einführen, Automatisierung ausbauen</td></tr>
<tr><td>Q2/2026</td><td>Organization</td><td>Leadership-Programme, Employer Branding</td><td>Neue Rollen, Talentakquise</td><td>Rollen definieren, Talente gewinnen</td></tr>
<!-- Q3/2026 -->
<tr><td>Q3/2026</td><td>Go-to-Market</td><td>Produktdiversifikation, neue Märkte</td><td>Neue Geschäftsmodelle, Partnerschaften</td><td>Modelle entwickeln, Partnerschaften schließen</td></tr>
<tr><td>Q3/2026</td><td>Engagement</td><td>Neue Formate, internationale Community</td><td>Community-Expansion, neue Kanäle</td><td>Expansion planen, Kanäle aufbauen</td></tr>
<tr><td>Q3/2026</td><td>Operations</td><td>KI-gestützte Prozesse, Automatisierung</td><td>Prozessoptimierung, Innovation</td><td>Optimierung umsetzen, Innovation fördern</td></tr>
<tr><td>Q3/2026</td><td>Organization</td><td>Neue Rollen, Talentakquise</td><td>Wachstum, Nachfolgeplanung</td><td>Wachstum steuern, Nachfolge sichern</td></tr>
<!-- Q4/2026 -->
<tr><td>Q4/2026</td><td>Go-to-Market</td><td>Neue Geschäftsmodelle, Partnerschaften</td><td>Ökosystem-Integration, Thought Leadership</td><td>Ökosystem aufbauen, Leadership stärken</td></tr>
<tr><td>Q4/2026</td><td>Engagement</td><td>Community-Expansion, neue Kanäle</td><td>Community-Leadership, neue Events</td><td>Leadership-Programme, Events durchführen</td></tr>
<tr><td>Q4/2026</td><td>Operations</td><td>Prozessoptimierung, Innovation</td><td>Nachhaltigkeit, Resilienz</td><td>Nachhaltigkeit integrieren, Resilienz stärken</td></tr>
<tr><td>Q4/2026</td><td>Organization</td><td>Wachstum, Nachfolgeplanung</td><td>Langfristige Strukturen, Unternehmenskultur</td><td>Strukturen festigen, Kultur verankern</td></tr>
</tbody>
</table>
</div>
<p style="font-size:0.9rem;color:#888;margin-top:1rem;">* Die Roadmap wird laufend weiterentwickelt und an die strategischen Ziele angepasst.</p>
</div>
</div>
<!-- Navigation -->
<div class="navigation">
<button class="nav-btn active" onclick="goToSlide(1)">1</button>
<button class="nav-btn" onclick="goToSlide(2)">2</button>
<button class="nav-btn" onclick="goToSlide(3)">3</button>
<button class="nav-btn" onclick="goToSlide(4)">4</button>
<button class="nav-btn" onclick="goToSlide(5)">5</button>
<button class="nav-btn" onclick="goToSlide(6)">6</button>
<button class="nav-btn" onclick="goToSlide(0)">MS</button>
</div>
<!-- Slide Counter -->
<div class="slide-counter">
<span id="current-slide">1</span> / 7
</div>
<!-- Keyboard Hint -->
<div class="keyboard-hint">
← → Pfeiltasten zum Navigieren
</div>
</div>
<script>
let currentSlide = 1;
const totalSlides = 7;
function goToSlide(slideNumber) {
// Hide current slide
document.getElementById(`slide-${currentSlide}`).classList.remove('active');
// Show new slide
document.getElementById(`slide-${slideNumber}`).classList.add('active');
// Update navigation buttons
document.querySelectorAll('.nav-btn').forEach((btn, index) => {
btn.classList.toggle('active', index + 1 === slideNumber);
});
// Update slide counter
document.getElementById('current-slide').textContent = slideNumber;
currentSlide = slideNumber;
}
// Keyboard navigation
document.addEventListener('keydown', function(event) {
if (event.key === 'ArrowLeft' && currentSlide > 1) {
goToSlide(currentSlide - 1);
} else if (event.key === 'ArrowRight' && currentSlide < totalSlides) {
goToSlide(currentSlide + 1);
}
});
// Touch/swipe support for mobile
let startX = 0;
let endX = 0;
document.addEventListener('touchstart', function(event) {
startX = event.touches[0].clientX;
});
document.addEventListener('touchend', function(event) {
endX = event.changedTouches[0].clientX;
handleSwipe();
});
function handleSwipe() {
const threshold = 50;
const diff = startX - endX;
if (Math.abs(diff) > threshold) {
if (diff > 0 && currentSlide < totalSlides) {
// Swipe left - next slide
goToSlide(currentSlide + 1);
} else if (diff < 0 && currentSlide > 1) {
// Swipe right - previous slide
goToSlide(currentSlide - 1);
}
}
}
</script>
</body>
</html>

View file

@ -1,298 +0,0 @@
# User Editable Fields Overview
This document provides a comprehensive overview of all fields that users can edit across all Pydantic models in the PowerOn system, excluding protected system fields (id and fields starting with _).
## Protected System Fields (Not Editable by Users)
The following field types are automatically protected and cannot be modified by users:
- **ID Fields**: All `id` fields (primary keys)
- **System Fields**: All fields starting with `_` (underscore)
- **Read-Only Fields**: Fields marked with `frontend_readonly=True`
## interfaceAppModel.py
### Mandate
**Table**: `Mandate`
**Editable Fields**:
- `name` (text, required) - Name of the mandate
- `language` (select, required) - Default language (de, en, fr, it)
- `enabled` (checkbox, optional) - Whether mandate is enabled
**Protected Fields**: `id`
### UserConnection
**Table**: `UserConnection`
**Editable Fields**:
- `externalUsername` (text, optional) - Username in external system
- `externalEmail` (email, optional) - Email in external system
- `status` (select, optional) - Connection status (active, inactive, expired, pending)
**Protected Fields**: `id`, `userId`, `authority`, `externalId`, `connectedAt`, `lastChecked`, `expiresAt`, `tokenStatus`, `tokenExpiresAt`
### User
**Table**: `User`
**Editable Fields**:
- `username` (text, required) - Username for login
- `email` (email, required) - Email address
- `fullName` (text, optional) - Full name
- `language` (select, required) - Preferred language (de, en, fr, it)
- `enabled` (checkbox, optional) - Whether user is enabled
- `privilege` (select, required) - Permission level (user, admin, sysadmin)
**Protected Fields**: `id`, `authenticationAuthority`, `mandateId`
### UserInDB
**Table**: `UserInDB` (extends User)
**Editable Fields**: Same as User
**Additional Protected Fields**: `hashedPassword`
### Token
**Table**: `Token`
**Editable Fields**: None (all fields are system-managed)
**Protected Fields**: `id`, `userId`, `authority`, `connectionId`, `tokenAccess`, `tokenType`, `expiresAt`, `tokenRefresh`, `createdAt`
### AuthEvent
**Table**: `AuthEvent`
**Editable Fields**: None (all fields are system-managed)
**Protected Fields**: `id`, `userId`, `eventType`, `timestamp`, `ipAddress`, `userAgent`, `success`, `details`
### SystemTable
**Table**: `SystemTable`
**Editable Fields**: None (all fields are system-managed)
**Protected Fields**: `table_name`, `initial_id`
## interfaceComponentModel.py
### FileItem
**Table**: `FileItem`
**Editable Fields**:
- `fileName` (text, required) - Name of the file
**Protected Fields**: `id`, `mandateId`, `mimeType`, `fileHash`, `fileSize`, `creationDate`
### FilePreview
**Table**: `FilePreview` (transient model)
**Editable Fields**: None (all fields are computed/display-only)
**Protected Fields**: `content`, `mimeType`, `fileName`, `isText`, `encoding`, `size`
### FileData
**Table**: `FileData`
**Editable Fields**: None (all fields are system-managed)
**Protected Fields**: `id`, `data`, `base64Encoded`
### Prompt
**Table**: `Prompt`
**Editable Fields**:
- `content` (textarea, required) - Content of the prompt
- `name` (text, required) - Name of the prompt
**Protected Fields**: `id`, `mandateId`
## interfaceChatModel.py
### ActionDocument
**Table**: `ActionDocument` (transient model)
**Editable Fields**: None (all fields are system-generated)
**Protected Fields**: `documentName`, `documentData`, `mimeType`
### ActionResult
**Table**: `ActionResult` (transient model)
**Editable Fields**: None (all fields are system-generated)
**Protected Fields**: `success`, `error`, `documents`, `resultLabel`
### UserInputRequest
**Table**: `UserInputRequest` (transient model)
**Editable Fields**:
- `prompt` (text, required) - Prompt for the user
- `listFileId` (list, optional) - List of file IDs
- `userLanguage` (text, optional) - User's preferred language
**Protected Fields**: None
### ContentMetadata
**Table**: `ContentMetadata` (transient model)
**Editable Fields**: None (all fields are system-computed)
**Protected Fields**: `size`, `pages`, `error`, `width`, `height`, `colorMode`, `fps`, `durationSec`, `mimeType`, `base64Encoded`
### ContentItem
**Table**: `ContentItem` (transient model)
**Editable Fields**: None (all fields are system-generated)
**Protected Fields**: `label`, `data`, `metadata`
### ChatDocument
**Table**: `ChatDocument`
**Editable Fields**: None (all fields are system-managed)
**Protected Fields**: `id`, `messageId`, `fileId`, `fileName`, `fileSize`, `mimeType`, `roundNumber`, `taskNumber`, `actionNumber`, `actionId`
### DocumentExchange
**Table**: `DocumentExchange` (transient model)
**Editable Fields**: None (all fields are system-generated)
**Protected Fields**: `documentsLabel`, `documents`
### ExtractedContent
**Table**: `ExtractedContent` (transient model)
**Editable Fields**: None (all fields are system-generated)
**Protected Fields**: `id`, `contents`
### TaskAction
**Table**: `TaskAction`
**Editable Fields**:
- `execParameters` (dict, optional) - Action parameters
- `userMessage` (text, optional) - User-friendly message
**Protected Fields**: `id`, `execMethod`, `execAction`, `execResultLabel`, `expectedDocumentFormats`, `status`, `error`, `retryCount`, `retryMax`, `processingTime`, `timestamp`, `result`, `resultDocuments`
### TaskResult
**Table**: `TaskResult` (transient model)
**Editable Fields**: None (all fields are system-generated)
**Protected Fields**: `taskId`, `status`, `success`, `feedback`, `error`
### TaskItem
**Table**: `TaskItem`
**Editable Fields**:
- `userInput` (text, required) - User input that triggered the task
- `rollbackOnFailure` (boolean, optional) - Whether to rollback on failure
- `dependencies` (list, optional) - List of task IDs this task depends on
- `feedback` (text, optional) - Task feedback message
**Protected Fields**: `id`, `workflowId`, `status`, `error`, `startedAt`, `finishedAt`, `actionList`, `retryCount`, `retryMax`, `processingTime`, `resultLabels`
### ChatStat
**Table**: `ChatStat`
**Editable Fields**: None (all fields are system-computed)
**Protected Fields**: `id`, `workflowId`, `messageId`, `processingTime`, `tokenCount`, `bytesSent`, `bytesReceived`, `successRate`, `errorCount`
### ChatLog
**Table**: `ChatLog`
**Editable Fields**: None (all fields are system-generated)
**Protected Fields**: `id`, `workflowId`, `message`, `type`, `timestamp`, `status`, `progress`, `performance`
### ChatMessage
**Table**: `ChatMessage`
**Editable Fields**:
- `message` (text, optional) - Message content
- `role` (text, required) - Role of the message sender
- `status` (text, required) - Status of the message (first, step, last)
- `success` (boolean, optional) - Whether message processing was successful
**Protected Fields**: `id`, `workflowId`, `parentMessageId`, `documents`, `documentsLabel`, `sequenceNr`, `publishedAt`, `stats`, `actionId`, `actionMethod`, `actionName`, `roundNumber`, `taskNumber`, `actionNumber`, `taskProgress`, `actionProgress`
### ChatWorkflow
**Table**: `ChatWorkflow`
**Editable Fields**:
- `status` (select, optional) - Current status (running, completed, stopped, error)
- `name` (text, required) - Name of the workflow
**Protected Fields**: `id`, `mandateId`, `currentRound`, `currentTask`, `currentAction`, `totalTasks`, `totalActions`, `lastActivity`, `startedAt`, `logs`, `messages`, `stats`, `tasks`
### TaskStep
**Table**: `TaskStep` (transient model)
**Editable Fields**:
- `objective` (text, required) - Task objective
- `dependencies` (list, optional) - List of dependencies
- `success_criteria` (list, optional) - List of success criteria
- `estimated_complexity` (text, optional) - Estimated complexity
- `userMessage` (text, optional) - User-friendly message
**Protected Fields**: `id`
### TaskHandover
**Table**: `TaskHandover` (transient model)
**Editable Fields**: None (all fields are system-generated)
**Protected Fields**: `taskId`, `sourceTask`, `inputDocuments`, `outputDocuments`, `context`, `previousResults`, `improvements`, `workflowSummary`, `messageHistory`, `timestamp`, `handoverType`
### TaskContext
**Table**: `TaskContext` (transient model)
**Editable Fields**: None (all fields are system-managed)
**Protected Fields**: All fields are system-managed
### ReviewContext
**Table**: `ReviewContext` (transient model)
**Editable Fields**: None (all fields are system-managed)
**Protected Fields**: All fields are system-managed
### ReviewResult
**Table**: `ReviewResult` (transient model)
**Editable Fields**:
- `userMessage` (text, optional) - User-friendly message
**Protected Fields**: `status`, `reason`, `improvements`, `quality_score`, `missing_outputs`, `met_criteria`, `unmet_criteria`, `confidence`
### TaskPlan
**Table**: `TaskPlan` (transient model)
**Editable Fields**:
- `overview` (text, required) - Plan overview
- `userMessage` (text, optional) - User-friendly message
**Protected Fields**: `tasks`
### WorkflowResult
**Table**: `WorkflowResult` (transient model)
**Editable Fields**: None (all fields are system-computed)
**Protected Fields**: `status`, `completed_tasks`, `total_tasks`, `execution_time`, `final_results_count`, `error`, `phase`
### AiResult
**Table**: `AiResult` (transient model)
**Editable Fields**: None (all fields are system-generated)
**Protected Fields**: `filename`, `mimetype`, `content`
### CentralizedAiResponse
**Table**: `CentralizedAiResponse` (transient model)
**Editable Fields**: None (all fields are system-generated)
**Protected Fields**: `aiResults`, `success`, `error`
## Summary by Table Type
### Fully User-Editable Tables
- **Mandate**: 3 editable fields
- **User**: 6 editable fields
- **FileItem**: 1 editable field
- **Prompt**: 2 editable fields
- **ChatMessage**: 4 editable fields
- **ChatWorkflow**: 2 editable fields
### Partially User-Editable Tables
- **UserConnection**: 3 editable fields (out of 11 total)
- **TaskAction**: 2 editable fields (out of 13 total)
- **TaskItem**: 4 editable fields (out of 12 total)
### System-Managed Tables (No User Editable Fields)
- **Token**, **AuthEvent**, **SystemTable**
- **FilePreview**, **FileData**, **ContentMetadata**, **ContentItem**
- **ChatDocument**, **DocumentExchange**, **ExtractedContent**
- **TaskResult**, **ChatStat**, **ChatLog**
- **TaskHandover**, **TaskContext**, **ReviewContext**
- **WorkflowResult**, **AiResult**, **CentralizedAiResponse**
### Transient/Display-Only Tables
- **ActionDocument**, **ActionResult**, **UserInputRequest**
- **TaskStep**, **ReviewResult**, **TaskPlan**
## RBAC Implementation Notes
When implementing the RBAC system, focus on the **Fully User-Editable Tables** and **Partially User-Editable Tables** as these are where users will need different permission levels for different operations.
The **System-Managed Tables** should generally have read-only access for most users, with only system administrators having full access.
The **Transient Tables** are typically used for data transfer and don't need persistent storage permissions.

View file

@ -1,462 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Key Management - Praktische Umsetzung & Werkzeuge</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
line-height: 1.6;
color: #333;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background: #f5f5f5;
}
h1 {
color: #2c3e50;
border-bottom: 3px solid #3498db;
padding-bottom: 10px;
}
h2 {
color: #34495e;
margin-top: 30px;
border-bottom: 2px solid #ecf0f1;
padding-bottom: 8px;
}
h3 {
color: #7f8c8d;
margin-top: 20px;
}
.architecture-box {
background: white;
border: 1px solid #ddd;
border-radius: 8px;
padding: 20px;
margin: 20px 0;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.highlight {
background: #fff3cd;
padding: 15px;
border-left: 4px solid #ffc107;
margin: 20px 0;
}
.info-box {
background: #d1ecf1;
border: 1px solid #bee5eb;
border-radius: 5px;
padding: 15px;
margin: 20px 0;
}
.security-note {
background: #f8d7da;
border: 1px solid #f5c6cb;
border-radius: 5px;
padding: 15px;
margin: 20px 0;
}
.process-flow {
background: #e7f3ff;
border: 1px solid #b3d9ff;
border-radius: 5px;
padding: 15px;
margin: 20px 0;
}
.warning-box {
background: #fff3cd;
border: 1px solid #ffeeba;
border-radius: 5px;
padding: 15px;
margin: 20px 0;
border-left: 4px solid #ffc107;
}
.success-box {
background: #d4edda;
border: 1px solid #c3e6cb;
border-radius: 5px;
padding: 15px;
margin: 20px 0;
}
.workflow-step {
background: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 5px;
padding: 15px;
margin: 15px 0;
border-left: 4px solid #6c757d;
}
.workflow-step h4 {
margin-top: 0;
color: #495057;
}
ul, ol {
margin: 10px 0;
padding-left: 30px;
}
li {
margin: 5px 0;
}
.file-structure {
background: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 5px;
padding: 15px;
margin: 15px 0;
font-family: monospace;
}
.tool-description {
background: #e8f5e8;
border: 1px solid #c3e6cb;
border-radius: 5px;
padding: 15px;
margin: 15px 0;
}
.tool-description h4 {
margin-top: 0;
color: #155724;
}
.code-example {
background: #2c3e50;
color: #ecf0f1;
padding: 15px;
border-radius: 5px;
overflow-x: auto;
font-family: 'Courier New', monospace;
}
</style>
</head>
<body>
<h1>Key Management - Praktische Umsetzung & Werkzeuge</h1>
<div class="architecture-box">
<h2>1. Kern-Anforderungen & Prinzipien</h2>
<div class="security-note">
<h3>🔒 Grundprinzipien</h3>
<ul>
<li><strong>Keine Plain-Text Keys im Code:</strong> Keys werden nur verschlüsselt gespeichert</li>
<li><strong>Lokale Entwicklung:</strong> Keys können lokal ohne Internetzugang entschlüsselt werden</li>
<li><strong>Absolute Dev/Prod Trennung:</strong> Keine Überschneidung zwischen Development und Production</li>
<li><strong>Minimaler Aufwand:</strong> Neue Keys direkt im Code erfassen können</li>
<li><strong>Keine Provider-Abhängigkeit:</strong> Master Keys werden bei uns gespeichert</li>
</ul>
</div>
<h3>1.1 File-Struktur</h3>
<div class="file-structure">
repository/
├── config.ini # Generische Konfiguration
├── .env # Instanz-spezifische Umgebungsvariablen
├── .env.development # Development-spezifische Keys
├── .env.production # Production-spezifische Keys
└── src/
└── utils/
└── config.py # getConfig() Funktion
</div>
<h3>1.2 Key-Format</h3>
<div class="info-box">
<h4>Verschlüsselte Keys haben folgendes Format:</h4>
<ul>
<li><strong>Development Keys:</strong> <code>DEV_ENC:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...</code></li>
<li><strong>Production Keys:</strong> <code>PROD_ENC:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...</code></li>
<li><strong>Metadata:</strong> <code>PROD_ENC:encrypted_value|LIMIT:1000/hour|TRACK:true</code></li>
</ul>
</div>
</div>
<div class="architecture-box">
<h2>2. Master Key Management</h2>
<h3>2.1 Master Key Storage - Eigene V-Domäne</h3>
<div class="info-box">
<h4>Master Keys werden bei uns gespeichert:</h4>
<ul>
<li><strong>Development Master Key:</strong> Lokal auf Entwickler-Maschine (~/.keytool/dev-master.key)</li>
<li><strong>Production Master Key:</strong> Auf eigener V-Domäne (z.B. keys.internal.company.com)</li>
<li><strong>Keine Cloud-Provider:</strong> Vollständige Kontrolle über Key-Storage</li>
<li><strong>HSM-Backed:</strong> Hardware Security Module für Production Keys</li>
</ul>
</div>
<h3>2.2 Master Key Nutzung für Decryption</h3>
<div class="process-flow">
<h4>Workflow für Key-Decryption:</h4>
<ol>
<li><strong>Key-Format erkennen:</strong> DEV_ENC: oder PROD_ENC: Prefix parsen</li>
<li><strong>Master Key laden:</strong> Entsprechenden Master Key aus Storage laden</li>
<li><strong>Environment-Check:</strong> Sicherstellen, dass Key in richtiger Umgebung entschlüsselt wird</li>
<li><strong>Decryption:</strong> Key mit Master Key entschlüsseln</li>
<li><strong>Metadata parsen:</strong> Limits und Tracking-Informationen extrahieren</li>
</ol>
</div>
<h3>2.3 Environment-Separation</h3>
<div class="security-note">
<h4>🔐 Strikte Trennung:</h4>
<ul>
<li><strong>Development:</strong> Kann nur DEV_ENC: Keys entschlüsseln</li>
<li><strong>Production:</strong> Kann nur PROD_ENC: Keys entschlüsseln</li>
<li><strong>Cross-Decryption:</strong> Wird blockiert - Security Feature</li>
<li><strong>Automatische Erkennung:</strong> Environment wird automatisch erkannt</li>
</ul>
</div>
</div>
<div class="architecture-box">
<h2>3. Encryption Tool - Lokale Nutzung</h2>
<h3>3.1 Tool-Funktionalität</h3>
<div class="tool-description">
<h4>Das Encryption Tool bietet:</h4>
<ul>
<li><strong>Lokale Nutzung:</strong> Funktioniert ohne Internetzugang</li>
<li><strong>Automatische File-Auswahl:</strong> Repository, Instanz, Key-Name auswählen</li>
<li><strong>Copy/Paste Integration:</strong> Key direkt einfügen und verschlüsseln</li>
<li><strong>Automatisches Speichern:</strong> Verschlüsselter Key wird im richtigen File gespeichert</li>
<li><strong>Environment-Aware:</strong> Erkennt automatisch ob DEV oder PROD</li>
</ul>
</div>
<h3>3.2 Tool-Workflow</h3>
<div class="workflow-step">
<h4>Schritt 1: Repository & Instanz auswählen</h4>
<p>Tool zeigt verfügbare Repositories und deren Instanzen an</p>
</div>
<div class="workflow-step">
<h4>Schritt 2: Key-Name definieren</h4>
<p>Neuen Key-Namen eingeben (z.B. API_KEY_CUSTOMER_001)</p>
</div>
<div class="workflow-step">
<h4>Schritt 3: Plain-Text Key einfügen</h4>
<p>Key per Copy/Paste einfügen</p>
</div>
<div class="workflow-step">
<h4>Schritt 4: Automatische Verschlüsselung</h4>
<p>Tool verschlüsselt Key und speichert ihn im richtigen File</p>
</div>
<h3>3.3 Tool-Integration</h3>
<div class="info-box">
<h4>Integration in den Entwickler-Workflow:</h4>
<ul>
<li><strong>Command Line Tool:</strong> <code>keytool encrypt --repo=repo-name --instance=dev --key=API_KEY --value=plaintext</code></li>
<li><strong>IDE Integration:</strong> Plugin für VS Code/IntelliJ</li>
<li><strong>Git Hooks:</strong> Automatische Validierung vor Commit</li>
<li><strong>CI/CD Integration:</strong> Automatische Key-Validierung bei Deployment</li>
</ul>
</div>
</div>
<div class="architecture-box">
<h2>4. getConfig() Funktion - Praktische Umsetzung</h2>
<h3>4.1 Funktionalität</h3>
<div class="info-box">
<h4>Die getConfig() Funktion:</h4>
<ul>
<li><strong>Config Loading:</strong> Lädt config.ini und .env Files beim App-Start</li>
<li><strong>Automatische Decryption:</strong> Entschlüsselt alle verschlüsselten Keys</li>
<li><strong>Environment Detection:</strong> Erkennt automatisch Development/Production</li>
<li><strong>Variable Access:</strong> Stellt entschlüsselte Keys als Variablen zur Verfügung</li>
<li><strong>Metadata Handling:</strong> Verarbeitet Limits und Tracking-Informationen</li>
</ul>
</div>
<h3>4.2 Implementierungs-Logik</h3>
<div class="process-flow">
<h4>getConfig() Workflow:</h4>
<ol>
<li><strong>File Loading:</strong> config.ini und .env Files laden</li>
<li><strong>Environment Detection:</strong> Dev/Prod automatisch erkennen</li>
<li><strong>Master Key Loading:</strong> Entsprechenden Master Key laden</li>
<li><strong>Key Scanning:</strong> Alle verschlüsselten Keys identifizieren</li>
<li><strong>Decryption:</strong> Keys mit Master Key entschlüsseln</li>
<li><strong>Metadata Parsing:</strong> Limits und Tracking-Informationen extrahieren</li>
<li><strong>Variable Setup:</strong> Entschlüsselte Keys als Variablen verfügbar machen</li>
</ol>
</div>
<h3>4.3 Usage im Code</h3>
<div class="code-example">
# In der Anwendung
from utils.config import getConfig
config = getConfig()
# Zugriff auf entschlüsselte Keys
api_key = config.get('API_KEY_CUSTOMER_001')
db_password = config.get('DB_PASSWORD')
# Mit Customer-Context
customer_api_key = config.get('API_KEY', customer_id='CUSTOMER_001')
</div>
</div>
<div class="architecture-box">
<h2>5. Repository & Instanz Management</h2>
<h3>5.1 Multi-Repository Struktur</h3>
<div class="info-box">
<h4>Verwaltung vieler Repositories:</h4>
<ul>
<li><strong>Zentrale Registry:</strong> Alle Repositories und Instanzen werden zentral verwaltet</li>
<li><strong>Instanz-spezifische .env Files:</strong> Jede Instanz hat eigene .env Datei</li>
<li><strong>Automatische Synchronisation:</strong> Keys werden automatisch zwischen Repositories synchronisiert</li>
<li><strong>Versionierung:</strong> Alle Key-Änderungen werden versioniert</li>
</ul>
</div>
<h3>5.2 Instanz-spezifische Konfiguration</h3>
<div class="file-structure">
repository/
├── .env.development # Development Keys
├── .env.staging # Staging Keys
├── .env.production # Production Keys
└── .env.local # Lokale Override Keys
</div>
<h3>5.3 Deployment-Integration</h3>
<div class="process-flow">
<h4>Automatisches Deployment:</h4>
<ol>
<li><strong>Code auf GitHub main:</strong> Trigger für automatisches Deployment</li>
<li><strong>Key-Validierung:</strong> Alle Keys werden auf Gültigkeit geprüft</li>
<li><strong>Environment-Matching:</strong> Richtige .env Files werden für Ziel-Umgebung geladen</li>
<li><strong>Key-Decryption:</strong> Keys werden in Ziel-Umgebung entschlüsselt</li>
<li><strong>App-Start:</strong> Anwendung startet mit entschlüsselten Keys</li>
</ol>
</div>
</div>
<div class="architecture-box">
<h2>6. Sicherheits-Features</h2>
<h3>6.1 Key-Validierung</h3>
<div class="security-note">
<h4>🔒 Automatische Sicherheits-Checks:</h4>
<ul>
<li><strong>Plain-Text Detection:</strong> Blockiert Commits mit unverschlüsselten Keys</li>
<li><strong>Environment-Mismatch:</strong> Verhindert PROD Keys in DEV Umgebung</li>
<li><strong>Key-Rotation:</strong> Automatische Warnung bei veralteten Keys</li>
<li><strong>Usage-Tracking:</strong> Überwachung von Key-Nutzung (nur Production)</li>
</ul>
</div>
<h3>6.2 Git Integration</h2>
<div class="info-box">
<h4>Git Hooks und CI/CD:</h4>
<ul>
<li><strong>Pre-commit Hook:</strong> Prüft auf Plain-Text Keys</li>
<li><strong>Pre-push Hook:</strong> Validiert Key-Format und Environment</li>
<li><strong>CI/CD Pipeline:</strong> Automatische Key-Validierung bei jedem Build</li>
<li><strong>Deployment Check:</strong> Verhindert Deployment mit ungültigen Keys</li>
</ul>
</div>
</div>
<div class="architecture-box">
<h2>7. Praktische Implementierung</h2>
<h3>7.1 Tool-Setup</h3>
<div class="workflow-step">
<h4>Entwickler-Setup:</h4>
<ol>
<li><strong>Master Key generieren:</strong> Lokalen Development Master Key erstellen</li>
<li><strong>Tool installieren:</strong> Encryption Tool lokal installieren</li>
<li><strong>Repository registrieren:</strong> Lokale Repositories im Tool registrieren</li>
<li><strong>Test-Key erstellen:</strong> Ersten verschlüsselten Key erstellen</li>
</ol>
</div>
<h3>7.2 Täglicher Workflow</h3>
<div class="process-flow">
<h4>Entwickler-Alltag:</h4>
<ol>
<li><strong>Neuen Key benötigen:</strong> API Key für neuen Customer</li>
<li><strong>Tool starten:</strong> Encryption Tool öffnen</li>
<li><strong>Kontext wählen:</strong> Repository, Instanz, Key-Name auswählen</li>
<li><strong>Key einfügen:</strong> Plain-Text Key per Copy/Paste einfügen</li>
<li><strong>Automatische Verschlüsselung:</strong> Tool verschlüsselt und speichert</li>
<li><strong>Code verwenden:</strong> getConfig() kann Key sofort nutzen</li>
</ol>
</div>
<h3>7.3 Key-Rotation</h3>
<div class="success-box">
<h4>✨ Einfache Key-Rotation:</h4>
<ul>
<li><strong>Automatische Erkennung:</strong> Tool erkennt Keys die rotiert werden müssen</li>
<li><strong>One-Command Rotation:</strong> Alle Keys einer Instanz mit einem Befehl rotieren</li>
<li><strong>Grace Period:</strong> Alte Keys bleiben 24h gültig für Übergang</li>
<li><strong>Automatische Benachrichtigung:</strong> Team wird über Rotation informiert</li>
</ul>
</div>
</div>
<div class="architecture-box">
<h2>8. Monitoring & Alerts</h2>
<h3>8.1 Key-Monitoring</h3>
<div class="info-box">
<h4>Überwachung der Keys:</h4>
<ul>
<li><strong>Key-Age:</strong> Tage bis zur Rotation</li>
<li><strong>Usage-Patterns:</strong> Wie oft werden Keys verwendet</li>
<li><strong>Environment-Mismatches:</strong> PROD Keys in DEV Umgebung</li>
<li><strong>Plain-Text Detection:</strong> Unverschlüsselte Keys im Code</li>
</ul>
</div>
<h3>8.2 Alert-System</h3>
<div class="warning-box">
<h4>Automatische Benachrichtigungen:</h4>
<ul>
<li><strong>Rotation Due:</strong> Key muss in 7 Tagen rotiert werden</li>
<li><strong>Security Violation:</strong> PROD Key in DEV Umgebung</li>
<li><strong>Plain-Text Alert:</strong> Unverschlüsselter Key im Code gefunden</li>
<li><strong>Usage Anomaly:</strong> Ungewöhnliche Key-Nutzung</li>
</ul>
</div>
</div>
<div class="architecture-box">
<h2>9. Zusammenfassung der Werkzeuge</h2>
<div class="tool-description">
<h3>9.1 Encryption Tool</h3>
<ul>
<li><strong>Zweck:</strong> Neue Keys verschlüsseln und in richtige Files speichern</li>
<li><strong>Input:</strong> Repository, Instanz, Key-Name, Plain-Text Key</li>
<li><strong>Output:</strong> Verschlüsselter Key im richtigen .env File</li>
<li><strong>Lokale Nutzung:</strong> Funktioniert ohne Internetzugang</li>
</ul>
</div>
<div class="tool-description">
<h3>9.2 getConfig() Funktion</h3>
<ul>
<li><strong>Zweck:</strong> Config Files laden und Keys entschlüsseln</li>
<li><strong>Input:</strong> config.ini und .env Files</li>
<li><strong>Output:</strong> Entschlüsselte Keys als Variablen</li>
<li><strong>Integration:</strong> Wird beim App-Start aufgerufen</li>
</ul>
</div>
<div class="tool-description">
<h3>9.3 Master Key Storage</h3>
<ul>
<li><strong>Development:</strong> Lokal auf Entwickler-Maschine</li>
<li><strong>Production:</strong> Auf eigener V-Domäne</li>
<li><strong>Keine Provider:</strong> Vollständige Kontrolle</li>
<li><strong>Environment-Separation:</strong> Absolute Trennung Dev/Prod</li>
</ul>
</div>
</div>
</body>
</html>

View file

@ -1,110 +0,0 @@
flowchart TD
%% Externe Entitäten
USER((Benutzer))
AI_PROVIDER((AI-Provider\nOpenAI/Anthropic))
WEB((Internet/\nWebseiten))
%% Hauptprozesse
AUTH[Authentifizierung]
WS_MANAGE[Workspace-\nVerwaltung]
AGENT_MANAGE[Agenten-\nVerwaltung]
FILE_MANAGE[Datei-\nVerwaltung]
PROMPT_MANAGE[Prompt-\nVerwaltung]
WF_INIT[Workflow-\nInitialisierung]
WF_EXEC[Workflow-\nAusführung]
MOD_CYCLE[Moderator-\nZyklus]
AGENT_EXEC[Agenten-\nAusführung]
WEB_SCRAPE[Web-\nScraping]
USER_INTERACT[Benutzer-\nInteraktion]
RESULT_COLLECT[Ergebnis-\nSammlung]
%% Datenspeicher
DB_USERS[(Benutzer-\nDatenbank)]
DB_MANDATE[(Mandanten-\nDatenbank)]
DB_WS[(Workspace-\nDatenbank)]
DB_AGENTS[(Agenten-\nDatenbank)]
DB_FILES[(Datei-\nDatenbank)]
DB_PROMPTS[(Prompts-\nDatenbank)]
DB_WORKFLOWS[(Workflow-\nDatenbank)]
FILE_SYSTEM[(Datei-\nSystem)]
%% Datenflüsse - Authentifizierung und Basisdaten
USER -->|Login-Daten| AUTH
AUTH -->|Token| USER
AUTH -->|Benutzerinfo lesen/schreiben| DB_USERS
AUTH -->|Mandanteninfo lesen| DB_MANDATE
%% Workspace-Management
USER -->|Workspace erstellen/bearbeiten| WS_MANAGE
WS_MANAGE -->|Workspace-Daten lesen/schreiben| DB_WS
WS_MANAGE -->|Workspace-Info| USER
%% Agenten-Management
USER -->|Agenten konfigurieren| AGENT_MANAGE
AGENT_MANAGE -->|Agenten-Daten lesen/schreiben| DB_AGENTS
AGENT_MANAGE -->|Agenten-Info| USER
%% Datei-Management
USER -->|Dateien hochladen| FILE_MANAGE
FILE_MANAGE -->|Metadaten speichern| DB_FILES
FILE_MANAGE -->|Dateien speichern| FILE_SYSTEM
FILE_MANAGE -->|Datei-Info| USER
%% Prompt-Management
USER -->|Prompts erstellen/bearbeiten| PROMPT_MANAGE
PROMPT_MANAGE -->|Prompts lesen/schreiben| DB_PROMPTS
PROMPT_MANAGE -->|Prompt-Info| USER
%% Workflow-Ausführung - Initialisierung
USER -->|Workflow starten| WF_INIT
WF_INIT -->|Workflow-Meta lesen/schreiben| DB_WORKFLOWS
WF_INIT -->|Ausgewählte Agenten lesen| DB_AGENTS
WF_INIT -->|Ausgewählte Dateien lesen| DB_FILES
WF_INIT -->|Dateiinhalte lesen| FILE_SYSTEM
WF_INIT -->|Prompt| DB_PROMPTS
WF_INIT -->|Workflow-Status| USER
%% Workflow-Ausführung - Hauptprozess
WF_INIT -->|Workflow-Kontext| WF_EXEC
WF_EXEC -->|Moderator aktivieren| MOD_CYCLE
MOD_CYCLE -->|Agentenauswahl| AGENT_EXEC
AGENT_EXEC -->|Anfrage| AI_PROVIDER
AI_PROVIDER -->|Antwort| AGENT_EXEC
%% Web-Scraping-Integration
AGENT_EXEC -->|Web-Recherche anfordern| WEB_SCRAPE
WEB_SCRAPE -->|Suchanfragen| WEB
WEB -->|Webinhalte| WEB_SCRAPE
WEB_SCRAPE -->|Extrahierte Informationen| AGENT_EXEC
%% Benutzerinteraktion während Workflow
MOD_CYCLE -->|Benutzereingabe anfordern| USER_INTERACT
USER_INTERACT -->|Anfrage| USER
USER -->|Antwort/zusätzliche Dateien| USER_INTERACT
USER_INTERACT -->|Benutzerinput| MOD_CYCLE
%% Ergebnissammlung und -speicherung
AGENT_EXEC -->|Agentenergebnisse| RESULT_COLLECT
USER_INTERACT -->|Benutzereingaben| RESULT_COLLECT
RESULT_COLLECT -->|Ergebnisse speichern| DB_WORKFLOWS
RESULT_COLLECT -->|Logs speichern| DB_WORKFLOWS
RESULT_COLLECT -->|Workflow-Status aktualisieren| DB_WORKFLOWS
RESULT_COLLECT -->|Ergebnisse anzeigen| USER
%% Workflow-Steuerung
MOD_CYCLE -->|Nächster Zyklus| MOD_CYCLE
MOD_CYCLE -->|Workflow abschließen| RESULT_COLLECT
USER -->|Workflow stoppen| WF_EXEC
%% Stile
classDef entity fill:#68A7AD,stroke:#376B6D,stroke-width:2px,color:white
classDef process fill:#99C4C8,stroke:#5E8B8F,stroke-width:1px
classDef store fill:#E5CB9F,stroke:#BA9C6F,stroke-width:1px
classDef mainProcess fill:#F5A7A7,stroke:#F07272,stroke-width:2px,color:white
class USER,AI_PROVIDER,WEB entity
class AUTH,WS_MANAGE,AGENT_MANAGE,FILE_MANAGE,PROMPT_MANAGE process
class WF_INIT,MOD_CYCLE,AGENT_EXEC,WEB_SCRAPE,USER_INTERACT,RESULT_COLLECT mainProcess
class WF_EXEC mainProcess
class DB_USERS,DB_MANDATE,DB_WS,DB_AGENTS,DB_FILES,DB_PROMPTS,DB_WORKFLOWS,FILE_SYSTEM store

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 KiB

View file

@ -1,53 +0,0 @@
---
config:
layout: fixed
---
flowchart TB
subgraph subGraph0["Frontend Layer"]
UI["Benutzeroberfläche (JS/HTML/CSS)"]
UIM["UI-Module"]
GST["Globaler Zustand"]
end
subgraph subGraph1["API Layer"]
FAPI["FastAPI Backend"]
AMOD["API-Module & Router"]
AUTH["Authentifizierung & Autorisierung"]
end
subgraph subGraph2["Core Services Layer"]
GW["Gateway Interface"]
LDOM["LucyDOM Interface"]
AGS["Agent Service"]
end
subgraph subGraph3["External Connectors"]
AI["AI Connectors\n(OpenAI/Anthropic)"]
WS["Web Scraping\nConnector"]
end
subgraph subGraph4["Data Layer"]
DB["JSON-Datenbank"]
FS["Dateisystem"]
end
UI <--> UIM & FAPI
UIM <--> GST
FAPI <--> AMOD
AMOD <--> AUTH & GW & LDOM & AGS
GW <--> DB
LDOM <--> DB
AGS <--> DB & AI & WS & FS
UI:::frontendClass
UIM:::frontendClass
GST:::frontendClass
FAPI:::apiClass
AMOD:::apiClass
AUTH:::apiClass
GW:::coreClass
LDOM:::coreClass
AGS:::coreClass
AI:::connectorClass
WS:::connectorClass
DB:::dataClass
FS:::dataClass
classDef frontendClass fill:#D6EAF8,stroke:#2E86C1,stroke-width:2px
classDef apiClass fill:#D5F5E3,stroke:#239B56,stroke-width:2px
classDef coreClass fill:#FCF3CF,stroke:#D4AC0D,stroke-width:2px
classDef connectorClass fill:#F5EEF8,stroke:#8E44AD,stroke-width:2px
classDef dataClass fill:#FADBD8,stroke:#C0392B,stroke-width:2px

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 KiB

View file

@ -1,181 +0,0 @@
%% Mermaid component diagram for PowerOn architecture
%% Generated based on current code in frontend_agents and gateway
%% Each box uses <br> for line breaks and shows the path to the module
%% Subgraph titles use underscores
%% Connectors are lines only, no text
flowchart TD
%% --- FRONTEND ---
subgraph Frontend [Frontend_<br>frontend_agents/public/js/]
subgraph Workflow [Workflow_<br>frontend_agents/public/js/modules/]
workflowCoordination["workflowCoordination.js<br>js/modules/workflowCoordination.js"]
workflowUi["workflowUi.js<br>js/modules/workflowUi.js"]
workflowData["workflowData.js<br>js/modules/workflowData.js"]
workflow["workflow.js<br>js/modules/workflow.js"]
workflowUtils["workflowUtils.js<br>js/modules/workflowUtils.js"]
end
subgraph Administration [Administration_<br>frontend_agents/public/js/modules/]
users["users.js<br>js/modules/users.js"]
prompts["prompts.js<br>js/modules/prompts.js"]
mandates["mandates.js<br>js/modules/mandates.js"]
files["files.js<br>js/modules/files.js"]
end
subgraph Shared [Shared_<br>frontend_agents/public/js/shared/]
navigation["navigation.js<br>js/shared/navigation.js"]
globalState["globalState.js<br>js/shared/globalState.js"]
msftCalls["msftCalls.js<br>js/shared/msftCalls.js"]
config["config.js<br>js/shared/config.js"]
moduleLoader["moduleLoader.js<br>js/shared/moduleLoader.js"]
utils["utils.js<br>js/shared/utils.js"]
end
subgraph SharedTools_ [SharedTools_<br>frontend_agents/public/js/shared/]
apiCalls["apiCalls.js<br>js/shared/apiCalls.js"]
end
subgraph Shared_Form [Shared_Form<br>frontend_agents/public/js/shared/]
formGeneric["formGeneric.js<br>js/shared/formGeneric.js"]
end
subgraph Security [Security_<br>frontend_agents/public/js/security/]
login["login.js<br>js/security/login.js"]
register["register.js<br>js/security/register.js"]
auth["auth.js<br>js/security/auth.js"]
end
main["main.js<br>js/main.js"]
end
%% --- GATEWAY/BACKEND ---
subgraph Gateway [Gateway_<br>gateway/]
app["app.py<br>gateway/app.py"]
subgraph Workflow_Modules [Workflow_<br>gateway/modules/]
workflowManager["workflowManager.py<br>modules/workflowManager.py"]
workflowAgentsRegistry["workflowAgentsRegistry.py<br>modules/workflowAgentsRegistry.py"]
documentProcessor["documentProcessor.py<br>modules/documentProcessor.py"]
end
subgraph Shared_Modules [Shared_<br>gateway/modules/]
mimeUtils["mimeUtils.py<br>modules/mimeUtils.py"]
defAttributes["defAttributes.py<br>modules/defAttributes.py"]
configuration["configuration.py<br>modules/configuration.py"]
authPy["auth.py<br>modules/auth.py"]
end
subgraph Agents [Agents_<br>gateway/modules/]
agentAnalyst["agentAnalyst.py<br>modules/agentAnalyst.py"]
agentWebcrawler["agentWebcrawler.py<br>modules/agentWebcrawler.py"]
agentCoach["agentCoach.py<br>modules/agentCoach.py"]
agentCoder["agentCoder.py<br>modules/agentCoder.py"]
agentDocumentation["agentDocumentation.py<br>modules/agentDocumentation.py"]
agentEmail["agentEmail.py<br>modules/agentEmail.py"]
end
subgraph Interfaces [Interfaces_<br>gateway/modules/]
gatewayInterface["gatewayInterface.py<br>modules/gatewayInterface.py"]
gatewayModel["gatewayModel.py<br>modules/gatewayModel.py"]
lucydomInterface["lucydomInterface.py<br>modules/lucydomInterface.py"]
lucydomModel["lucydomModel.py<br>modules/lucydomModel.py"]
end
subgraph Connectors [Connectors_<br>gateway/connectors/]
connectorAiOpenai["connectorAiOpenai.py<br>connectors/connectorAiOpenai.py"]
connectorAiAnthropic["connectorAiAnthropic.py<br>connectors/connectorAiAnthropic.py"]
connectorDbJson["connectorDbJson.py<br>connectors/connectorDbJson.py"]
end
subgraph Routes [Routes_<br>gateway/routes/]
routeGeneral["routeGeneral.py<br>routes/routeGeneral.py"]
routeUsers["routeUsers.py<br>routes/routeUsers.py"]
routeFiles["routeFiles.py<br>routes/routeFiles.py"]
routeMsft["routeMsft.py<br>routes/routeMsft.py"]
routeWorkflows["routeWorkflows.py<br>routes/routeWorkflows.py"]
routeMandates["routeMandates.py<br>routes/routeMandates.py"]
routeAttributes["routeAttributes.py<br>routes/routeAttributes.py"]
routePrompts["routePrompts.py<br>routes/routePrompts.py"]
end
end
%% --- CONNECTIONS ---
main --> navigation
main --> globalState
main --> login
main --> register
main --> msftCalls
main --> config
navigation --> moduleLoader
moduleLoader --> workflow
moduleLoader --> users
moduleLoader --> prompts
moduleLoader --> mandates
moduleLoader --> files
users --> formGeneric
prompts --> formGeneric
mandates --> formGeneric
files --> formGeneric
formGeneric --> apiCalls
apiCalls -.-> app
app --> routeGeneral
app --> routeUsers
app --> routeFiles
app --> routeMsft
app --> routeWorkflows
app --> routeMandates
app --> routeAttributes
app --> routePrompts
workflow --> workflowCoordination
workflow --> workflowUi
workflow --> workflowData
workflow --> workflowUtils
workflowManager --> workflowAgentsRegistry
workflowManager --> documentProcessor
workflowAgentsRegistry --> agentAnalyst
workflowAgentsRegistry --> agentWebcrawler
workflowAgentsRegistry --> agentCoach
workflowAgentsRegistry --> agentCoder
workflowAgentsRegistry --> agentDocumentation
workflowAgentsRegistry --> agentEmail
%% --- BACKEND ROUTE TO MODULE CONNECTIONS ---
routeWorkflows --> lucydomInterface
routeWorkflows --> lucydomModel
routeWorkflows --> workflowManager
routeUsers --> gatewayInterface
routeUsers --> gatewayModel
routePrompts --> lucydomInterface
routePrompts --> lucydomModel
routeMsft --> lucydomInterface
routeMandates --> gatewayInterface
routeMandates --> gatewayModel
routeGeneral --> gatewayInterface
routeGeneral --> gatewayModel
routeFiles --> lucydomInterface
routeFiles --> lucydomModel
routeAttributes --> gatewayModel
routeAttributes --> lucydomModel
routeAttributes --> defAttributes
lucydomInterface --> lucydomModel
lucydomInterface --> configuration
lucydomInterface --> mimeUtils
gatewayInterface --> gatewayModel
%% --- FRONTEND SHARED TOOLS CONNECTIONS ---
main --> apiCalls
auth --> apiCalls
workflowUi --> apiCalls
workflowData --> apiCalls
workflow --> apiCalls
users --> apiCalls
prompts --> apiCalls
mandates --> apiCalls
files --> apiCalls
formGeneric --> apiCalls
navigation --> msftCalls
workflowUi --> msftCalls
workflowUi --> utils
workflow --> utils
files --> utils
msftCalls --> utils
users --> utils
prompts --> utils
mandates --> utils
formGeneric --> utils
main --> utils
%% --- BACKEND CONNECTORS ---
lucydomInterface --> connectorAiOpenai
lucydomInterface --> connectorAiAnthropic
lucydomInterface --> connectorDbJson
gatewayInterface --> connectorDbJson

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 KiB

View file

@ -1,477 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PowerOn System Documentation</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
color: #333;
}
.container {
max-width: 1200px;
margin: 0 auto;
background: white;
padding: 30px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
color: #2c3e50;
border-bottom: 3px solid #3498db;
padding-bottom: 10px;
margin-bottom: 30px;
}
h2 {
color: #34495e;
border-bottom: 2px solid #ecf0f1;
padding-bottom: 8px;
margin-top: 40px;
margin-bottom: 20px;
}
h3 {
color: #2c3e50;
margin-top: 25px;
margin-bottom: 15px;
}
h4 {
color: #34495e;
margin-top: 20px;
margin-bottom: 10px;
}
.code-block {
background-color: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 4px;
padding: 15px;
margin: 15px 0;
font-family: 'Courier New', monospace;
overflow-x: auto;
}
.code-inline {
background-color: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 3px;
padding: 2px 6px;
font-family: 'Courier New', monospace;
font-size: 0.9em;
}
.warning {
background-color: #fff3cd;
border: 1px solid #ffeaa7;
border-radius: 4px;
padding: 15px;
margin: 15px 0;
border-left: 4px solid #f39c12;
}
.success {
background-color: #d4edda;
border: 1px solid #c3e6cb;
border-radius: 4px;
padding: 15px;
margin: 15px 0;
border-left: 4px solid #28a745;
}
.info {
background-color: #d1ecf1;
border: 1px solid #bee5eb;
border-radius: 4px;
padding: 15px;
margin: 15px 0;
border-left: 4px solid #17a2b8;
}
.table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
.table th, .table td {
border: 1px solid #ddd;
padding: 12px;
text-align: left;
}
.table th {
background-color: #f8f9fa;
font-weight: 600;
}
.table tr:nth-child(even) {
background-color: #f8f9fa;
}
.nav-toc {
background-color: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 4px;
padding: 20px;
margin: 20px 0;
}
.nav-toc ul {
list-style-type: none;
padding-left: 0;
}
.nav-toc li {
margin: 8px 0;
}
.nav-toc a {
color: #3498db;
text-decoration: none;
}
.nav-toc a:hover {
text-decoration: underline;
}
.phase-status {
display: inline-block;
padding: 4px 8px;
border-radius: 4px;
font-size: 0.8em;
font-weight: bold;
text-transform: uppercase;
}
.phase-completed {
background-color: #d4edda;
color: #155724;
}
.phase-in-progress {
background-color: #fff3cd;
color: #856404;
}
.phase-not-started {
background-color: #f8d7da;
color: #721c24;
}
</style>
</head>
<body>
<div class="container">
<h1>PowerOn System Documentation</h1>
<div class="nav-toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#timestamp-architecture">1. Timestamp & Datetime Architecture</a></li>
<li><a href="#system-overview">2. System Overview</a></li>
<li><a href="#development-guidelines">3. Development Guidelines</a></li>
<li><a href="#api-standards">4. API Standards</a></li>
<li><a href="#testing-standards">5. Testing Standards</a></li>
</ul>
</div>
<section id="timestamp-architecture">
<h2>1. Timestamp & Datetime Architecture</h2>
<div class="info">
<strong>Status:</strong> <span class="phase-status phase-completed">COMPLETED</span>
<strong>Last Updated:</strong> 2025-01-21
<strong>Scope:</strong> Entire codebase (Gateway + Frontend Agents)
</div>
<h3>1.1 Overview</h3>
<p>
PowerOn implements a unified timestamp architecture that ensures consistency across all modules,
APIs, and frontend components. The system uses <strong>float UTC timestamps</strong> as the single
source of truth for all temporal data, eliminating timezone confusion and format inconsistencies.
</p>
<h3>1.2 Core Design Principles</h3>
<h4>Single Source of Truth: UTC Timestamps</h4>
<ul>
<li><strong>ALL</strong> timestamp fields use <code class="code-inline">float</code> type representing UTC seconds since epoch</li>
<li><strong>NO</strong> mixed types (datetime, str, float) for the same field type</li>
<li><strong>NO</strong> ISO string timestamps in data models or API responses</li>
<li><strong>ONLY</strong> system-level fields (<code class="code-inline">_createdAt</code>, <code class="code-inline">_modifiedAt</code>) remain as ISO strings</li>
</ul>
<h4>Consistent Data Flow Architecture</h4>
<div class="code-block">
Database ←→ Models ←→ API Endpoints ←→ Frontend
↓ ↓ ↓ ↓
Float Float Float Float
UTC UTC UTC UTC
</div>
<h4>Frontend-Backend Contract</h4>
<ul>
<li><strong>Backend Sends:</strong> Float UTC timestamps (e.g., <code class="code-inline">1705852800.0</code>)</li>
<li><strong>Frontend Receives:</strong> Float UTC timestamps</li>
<li><strong>Frontend Displays:</strong> Local timezone converted from UTC</li>
<li><strong>Frontend Sends Back:</strong> Float UTC timestamps (if sending timestamps)</li>
</ul>
<h3>1.3 Technical Implementation Standards</h3>
<h4>Backend (Python) Standards</h4>
<div class="code-block">
# ✅ CORRECT - Use UTC timestamp functions
from modules.shared.timezoneUtils import get_utc_timestamp, create_expiration_timestamp
# For current time
current_time = get_utc_timestamp() # Returns float
# For expiration times
expires_at = create_expiration_timestamp(3600) # 1 hour from now
# For model fields
class UserConnection(BaseModel):
connectedAt: float = Field(default_factory=get_utc_timestamp)
expiresAt: Optional[float] = None
</div>
<h4>Frontend (JavaScript) Standards</h4>
<div class="code-block">
// ✅ CORRECT - Expect float UTC timestamps
import { isExpiredUtc, formatUtcForDisplay } from '../shared/timezoneUtils.js';
// Check expiration (expects float)
if (isExpiredUtc(connection.expiresAt)) {
// Handle expired token
}
// Display in local timezone (expects float)
const localTime = formatUtcForDisplay(connection.connectedAt);
</div>
<h4>API Response Standards</h4>
<div class="code-block">
// ✅ CORRECT - All timestamp fields as float
{
"id": "conn_123",
"connectedAt": 1705852800.0,
"expiresAt": 1705856400.0,
"lastChecked": 1705852800.0
}
// ❌ WRONG - Mixed types or ISO strings
{
"id": "conn_123",
"connectedAt": "2024-01-21T12:00:00Z", // ISO string
"expiresAt": 1705856400.0, // Float
"lastChecked": "2024-01-21T12:00:00Z" // ISO string
}
</div>
<h3>1.4 Database Schema Standards</h3>
<h4>Timestamp Field Types</h4>
<div class="code-block">
-- ✅ CORRECT - All timestamp fields as FLOAT/DOUBLE
CREATE TABLE connections (
id VARCHAR(255) PRIMARY KEY,
connectedAt DOUBLE NOT NULL, -- UTC timestamp in seconds
expiresAt DOUBLE, -- UTC timestamp in seconds
lastChecked DOUBLE NOT NULL -- UTC timestamp in seconds
);
-- ❌ WRONG - Mixed types
CREATE TABLE connections (
id VARCHAR(255) PRIMARY KEY,
connectedAt DATETIME, -- Datetime type
expiresAt DOUBLE, -- Float type
lastChecked VARCHAR(255) -- String type
);
</div>
<h4>System Fields (Keep as-is)</h4>
<div class="code-block">
-- ✅ CORRECT - System fields remain as strings
CREATE TABLE connections (
id VARCHAR(255) PRIMARY KEY,
connectedAt DOUBLE NOT NULL, -- User data: float UTC
_createdAt VARCHAR(255), -- System data: ISO string
_modifiedAt VARCHAR(255) -- System data: ISO string
);
</div>
<h3>1.5 Model Field Standards</h3>
<p>All timestamp fields in Pydantic models must follow these standards:</p>
<div class="code-block">
class UserConnection(BaseModel, ModelMixin):
"""Data model for a user's connection to an external service"""
id: str = Field(default_factory=lambda: str(uuid.uuid4()), description="Unique ID of the connection")
userId: str = Field(description="ID of the user this connection belongs to")
authority: AuthAuthority = Field(description="Authentication authority")
externalId: str = Field(description="User ID in the external system")
externalUsername: str = Field(description="Username in the external system")
externalEmail: Optional[EmailStr] = Field(None, description="Email in the external system")
status: ConnectionStatus = Field(default=ConnectionStatus.ACTIVE, description="Connection status")
connectedAt: float = Field(default_factory=get_utc_timestamp, description="When the connection was established (UTC timestamp in seconds)")
lastChecked: float = Field(default_factory=get_utc_timestamp, description="When the connection was last verified (UTC timestamp in seconds)")
expiresAt: Optional[float] = Field(None, description="When the connection expires (UTC timestamp in seconds)")
</div>
<div class="warning">
<strong>⚠️ Critical Rule:</strong> All timestamp fields MUST include "UTC timestamp in seconds" in their description
for consistency and documentation purposes.
</div>
<h3>1.6 Direct Float Storage</h3>
<p>The system now stores all timestamp fields directly as float values in the database:</p>
<div class="code-block">
def to_dict(self) -> Dict[str, Any]:
"""
Convert a Pydantic model to a dictionary.
Handles both Pydantic v1 and v2.
All timestamp fields remain as float values.
Returns:
Dict[str, Any]: Dictionary representation of the model
"""
# Get the raw dictionary
if hasattr(self, 'model_dump'):
data: Dict[str, Any] = self.model_dump() # Pydantic v2
else:
data: Dict[str, Any] = self.dict() # Pydantic v1
# All fields (including timestamps) remain in their original format
# No conversions needed - timestamps are already float
return data
</div>
<p><strong>Key Benefits:</strong></p>
<ul>
<li><strong>No unnecessary conversions</strong> between float and string</li>
<li><strong>Direct database storage</strong> as float values</li>
<li><strong>Consistent data types</strong> across the entire system</li>
<li><strong>Better performance</strong> without string parsing</li>
</ul>
<h3>1.7 Utility Functions</h3>
<h4>Backend Utilities (Python)</h4>
<div class="code-block">
from modules.shared.timezoneUtils import get_utc_timestamp, create_expiration_timestamp
# Get current UTC timestamp
current_time = get_utc_timestamp() # Returns float
# Create expiration timestamp (seconds from now)
expires_in_1_hour = create_expiration_timestamp(3600)
expires_in_1_day = create_expiration_timestamp(86400)
# Get UTC datetime object
utc_now = get_utc_now() # Returns datetime object in UTC
</div>
<h4>Frontend Utilities (JavaScript)</h4>
<div class="code-block">
import {
isExpiredUtc,
formatUtcForDisplay,
getExpiresInSeconds,
normalizeTimestamp
} from '../shared/timezoneUtils.js';
// Check if timestamp is expired
if (isExpiredUtc(connection.expiresAt)) {
console.log('Connection expired');
}
// Format for display (converts to local timezone)
const displayTime = formatUtcForDisplay(connection.connectedAt);
// Get seconds until expiration
const secondsLeft = getExpiresInSeconds(connection.expiresAt);
// Normalize any timestamp format to float (backward compatibility)
const normalized = normalizeTimestamp(connection.lastChecked);
</div>
<h3>1.8 Migration Rules</h3>
<p>When converting existing timestamp data to the new format:</p>
<div class="code-block">
def migrate_timestamp_field(value):
"""Migrate any timestamp format to float UTC timestamp"""
if isinstance(value, float):
return value # Already float, assume UTC
elif isinstance(value, str):
if value.endswith('Z') or 'T' in value:
# ISO string format
dt = datetime.fromisoformat(value.replace('Z', '+00:00'))
return dt.timestamp()
else:
# Try parsing as float
return float(value)
elif isinstance(value, datetime):
# Convert to UTC timestamp
return value.timestamp()
else:
raise ValueError(f"Cannot migrate timestamp: {value}")
</div>
<h3>1.9 Implementation Status</h3>
<table class="table">
<thead>
<tr>
<th>Component</th>
<th>Status</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr>
<td>Backend Models</td>
<td><span class="phase-status phase-completed">COMPLETED</span></td>
<td>11 models, 15 timestamp fields standardized as float</td>
</tr>
<tr>
<td>Backend APIs</td>
<td><span class="phase-status phase-completed">COMPLETED</span></td>
<td>All endpoints return float timestamps</td>
</tr>
<tr>
<td>Frontend Modules</td>
<td><span class="phase-status phase-completed">COMPLETED</span></td>
<td>All utilities expect float timestamps</td>
</tr>
<tr>
<td>Database Storage</td>
<td><span class="phase-status phase-completed">COMPLETED</span></td>
<td>All timestamps stored as float (no string conversion)</td>
</tr>
<tr>
<td>Testing & Validation</td>
<td><span class="phase-status phase-completed">COMPLETED</span></td>
<td>24 tests passing, all functionality verified</td>
</tr>
</tbody>
</table>
</section>
<section id="system-overview">
<h2>2. System Overview</h2>
<p>This section will contain the overall system architecture documentation.</p>
</section>
<section id="development-guidelines">
<h2>3. Development Guidelines</h2>
<p>This section will contain coding standards and best practices.</p>
</section>
<section id="api-standards">
<h2>4. API Standards</h2>
<p>This section will contain API design and response format standards.</p>
</section>
<section id="testing-standards">
<h2>5. Testing Standards</h2>
<p>This section will contain testing methodologies and standards.</p>
</section>
<footer style="margin-top: 50px; padding-top: 20px; border-top: 1px solid #eee; color: #666; text-align: center;">
<p>PowerOn System Documentation - Last Updated: 2025-01-21</p>
</footer>
</div>
</body>
</html>

View file

@ -1,117 +0,0 @@
# Current process
A: GENERIC START
mainServiceAi.py
├── callAiDocuments(prompt, documents, options, outputFormat, title)
│ └── SubCoreAi.callAiDocuments()
│ ├── documents provided?
│ │ └── SubDocumentProcessing.callAiText(prompt, documents, options)
│ │ └── processDocumentsPerChunk(documents, prompt, options)
B: MODEL DATA gathering
│ │ ├── _getModelCapabilitiesForContent(prompt, documents, options) [MODEL SELECTION FOR CHUNKING]
│ │ │ ├── modelRegistry.getAvailableModels()
│ │ │ ├── model_selector.selectModel(prompt, "", options, availableModels)
│ │ │ └── Returns: {maxContextBytes, textChunkSize, imageChunkSize}
│ │ │
C: GENERIC EXTRTACTION without AI, without need for model data
│ │ └── extractionService.extractContent(documents, extractionOptions)
│ │ └── For each document in documents:
│ │ └── runExtraction(extractorRegistry, chunkerRegistry, documentBytes, fileName, mimeType, options)
│ │ ├── extractorRegistry.resolve(mimeType, fileName) [FORMAT-SPECIFIC EXTRACTOR]
│ │ │ └── extractor.extract(documentBytes, options) [PDF, HTML, JSON, etc.]
│ │ │ └── Returns: List[ContentPart] (text, table, image, structure, container, binary)
│ │ │
│ │ └── poolAndLimit(parts, chunkerRegistry, options) [CHUNKING CORE - USES MODEL DATA]
│ │ ├── Uses: maxSize from options (derived from model context length)
│ │ ├── For each part that exceeds maxSize:
D: CHUNKING, requires model data
│ │ │ └── chunkerRegistry.resolve(part.typeGroup).chunk(part, options)
│ │ │ ├── TextChunker.chunk() → Uses textChunkSize from options
│ │ │ ├── ImageChunker.chunk() → Uses imageChunkSize from options
│ │ │ ├── TableChunker.chunk() → Uses textChunkSize from options
│ │ │ └── StructureChunker.chunk() → Uses textChunkSize from options
E: Generic part
│ │ └── Returns: List[ContentPart] with chunks marked as metadata["chunk"] = True
│ │
│ │ └── _processChunksWithMapping(extractionResult, prompt, options)
F: HERE CHUNKING NEEDED FOR AI CALLS
│ │ └── For each chunk in parallel (with concurrency control):
G: Idea
│ │ ├── Image chunks:
│ │ │ └── SubCoreAi.readImage(prompt, imageData, mimeType, options) [AI CALL]
│ │ │ └── interfaceAiObjects.callImage() [FALLBACK MODEL SELECTION]
│ │ │
│ │ ├── Container/Binary chunks:
│ │ │ └── aiObjects.call(AiCallRequest) [AI CALL]
│ │ │ └── interfaceAiObjects.call() [FALLBACK MODEL SELECTION]
│ │ │
│ │ └── Text/Table/Structure chunks:
│ │ └── aiObjects.call(AiCallRequest) [AI CALL]
│ │ └── interfaceAiObjects.call() [FALLBACK MODEL SELECTION]
│ │ ├── model_selector.getFallbackModels() [GET PRIORITIZED MODEL LIST]
│ │ ├── Try each model in sequence until success:
│ │ │ ├── _callWithModel(model, prompt, context, temperature, maxTokens, inputBytes)
│ │ │ ├── If fails → try next model in fallback list
│ │ │ └── If all fail → return error
│ │ └── Returns: AiCallResponse with content, modelName, priceCHF, etc.
H: GENERIC MERGING WITHOUT AI
│ │
│ │ └── _mergeChunkResults(chunkResults, options)
│ │ └── Returns: Merged text result
│ │
# Idea to review:
- not to mix content extraction to parts and chunking. to separate those two steps into pure extraction --> parts AND chunking parts -> chunks
- in step C only to do extraction without chunking, but for each part to have the meta information ready for potential chunking (should already be the case). So poolAndLimit not to run here. We just extract the content parts.
- in step F to loop over the parts, not the chunks
- now to handle the chunking inside the ai calls (SubCoreAi.readImage -> interfaceAiObjects.callImage() and aiObjects.call(AiCallRequest) --> interfaceAiObjects.call()) by giving one more attribute to the options "contentTypeGroup" which can be resolved to a chunker by chunkerRegistry.resolve(part.contentTypeGroup).chunk(part, options) --> like this we produce chunks only if needed, when model is known. So for each fallback round, new chunking can be done according to the models size. before the fallback loop to store the original content part to be able to make fresh chunking for each calling round.
# Process concept to handle the chunking inside the ai calls:
The architecture for interfaceAiObjects.call + interfaceAiObjects.callImage changes as follows.
## interfaceAiObjects.call (with one contentPart)
1. models to get with model_selector.getFallbackModels()
2. processedContentPartChunks[] to initialize empty
3. pipelineContentPartChunks: to add one chunk, the contentPart
4. set model fail counter for each model to 0. Set model index to 1 (first model in the list). maxModelErrors to set to 10
5. LOOP over models:
5.1. if a model has > maxModelErrors then to remove the model from the list. if no model on the list anymore to break up. if model index counter > max model index to set it back to model index 1
5.2. models selection: to select currentModel based on model index --> now we have model data
5.3. pooling: pool chunkItems in pipelineContentPartChunks[] to use models size; the pooling logic from poolAndLimit() function to reduce ai calls. Pooled items replace the single items in pipelineContentPartChunks[]
5.4. chunking: if chunkItem size bigger than models maxSize: to produce chunks for the chunkItem, then replace the chunkItem in pipelineContentPartChunks[] with the new chunks
5.5. processing: process chunkItem's in pipelineContentPartChunks and write each processed extraction into processedContentPartChunks and remove chunkItem in pipelineContentPartChunks. This to loop until model fails (to increment model fail counter for the model, to increment model index number, then next loop) or no items anymore (to exit LOOP).
6. Returns: AiCallResponse with content, modelName, priceCHF, etc. based on the delivered data in processedContentPartChunks
# Task
Can you review this new process concept critically. Is the logic correct. Some logic mistakes? - Something missing? Dataflow is clear?

View file

@ -1,456 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PowerOn AI Platform - Komponenten & Fortschritt</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
margin: 0;
padding: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}
.container {
max-width: 1400px;
margin: 0 auto;
background: white;
padding: 30px;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
h1 {
color: #2c3e50;
text-align: center;
border-bottom: 3px solid #3498db;
padding-bottom: 15px;
margin-bottom: 30px;
font-size: 2.5em;
}
h2 {
color: #34495e;
margin-top: 40px;
border-left: 4px solid #3498db;
padding-left: 15px;
font-size: 1.8em;
}
.chart-section {
margin: 40px 0;
padding: 20px;
background: #f8f9fa;
border-radius: 10px;
border: 1px solid #e9ecef;
}
.chart-container {
position: relative;
height: 500px;
margin: 20px 0;
}
.summary-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin: 30px 0;
}
.summary-card {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 25px;
border-radius: 12px;
text-align: center;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
transition: transform 0.3s ease;
}
.summary-card:hover {
transform: translateY(-5px);
}
.summary-number {
font-size: 3em;
font-weight: bold;
margin-bottom: 10px;
}
.summary-label {
font-size: 1.1em;
opacity: 0.9;
}
.status-legend {
display: flex;
justify-content: center;
gap: 30px;
margin: 30px 0;
flex-wrap: wrap;
}
.legend-item {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 15px;
border-radius: 20px;
font-weight: 500;
}
.legend-color {
width: 20px;
height: 20px;
border-radius: 50%;
}
.complete { background: #27ae60; }
.in-progress { background: #f39c12; }
.pending { background: #e74c3c; }
.legend-item.complete { background: rgba(39, 174, 96, 0.1); color: #27ae60; }
.legend-item.in-progress { background: rgba(243, 156, 18, 0.1); color: #f39c12; }
.legend-item.pending { background: rgba(231, 76, 60, 0.1); color: #e74c3c; }
.details-section {
margin: 40px 0;
padding: 25px;
background: white;
border-radius: 10px;
border: 2px solid #e9ecef;
}
.component-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin-top: 20px;
}
.component-item {
padding: 15px;
border-radius: 8px;
border-left: 4px solid;
background: #f8f9fa;
}
.component-item.complete { border-left-color: #27ae60; }
.component-item.in-progress { border-left-color: #f39c12; }
.component-item.pending { border-left-color: #e74c3c; }
.component-name {
font-weight: bold;
margin-bottom: 5px;
}
.component-status {
font-size: 0.9em;
opacity: 0.8;
}
.progress-indicator {
width: 100%;
height: 8px;
background: #ecf0f1;
border-radius: 4px;
margin-top: 8px;
overflow: hidden;
}
.progress-bar {
height: 100%;
border-radius: 4px;
transition: width 0.3s ease;
}
.progress-bar.complete { background: #27ae60; }
.progress-bar.in-progress { background: #f39c12; }
.progress-bar.pending { background: #e74c3c; }
</style>
</head>
<body>
<div class="container">
<h1>🚀 PowerOn AI Platform</h1>
<h2>Komponenten & Fortschritt Übersicht</h2>
<!-- Summary Statistics -->
<div class="summary-grid">
<div class="summary-card">
<div class="summary-number">85%</div>
<div class="summary-label">Gesamtfortschritt</div>
</div>
<div class="summary-card">
<div class="summary-number">8</div>
<div class="summary-label">Methoden implementiert</div>
</div>
<div class="summary-card">
<div class="summary-number">5</div>
<div class="summary-label">Hauptkomponenten</div>
</div>
<div class="summary-card">
<div class="summary-number">4</div>
<div class="summary-label">Release-Phasen</div>
</div>
</div>
<!-- Status Legend -->
<div class="status-legend">
<div class="legend-item complete">
<div class="legend-color complete"></div>
<span>Abgeschlossen (100%)</span>
</div>
<div class="legend-item in-progress">
<div class="legend-color in-progress"></div>
<span>In Bearbeitung (60-90%)</span>
</div>
<div class="legend-item pending">
<div class="legend-color pending"></div>
<span>Ausstehend (0-60%)</span>
</div>
</div>
<!-- Main Chart -->
<div class="chart-section">
<h2>📊 Komponenten-Fortschritt</h2>
<div class="chart-container">
<canvas id="componentsChart"></canvas>
</div>
</div>
<!-- Detailed Component Status -->
<div class="details-section">
<h2>🔍 Detaillierter Komponenten-Status</h2>
<div class="component-list">
<div class="component-item complete">
<div class="component-name">Backend-Implementierung</div>
<div class="component-status">100% abgeschlossen</div>
<div class="progress-indicator">
<div class="progress-bar complete" style="width: 100%"></div>
</div>
<ul style="margin-top: 10px; font-size: 0.9em;">
<li>8 Methoden implementiert</li>
<li>ServiceCenter erstellt</li>
<li>Document Processing</li>
<li>Workflow Management</li>
</ul>
</div>
<div class="component-item in-progress">
<div class="component-name">Frontend-UI</div>
<div class="component-status">90% abgeschlossen</div>
<div class="progress-indicator">
<div class="progress-bar in-progress" style="width: 90%"></div>
</div>
<ul style="margin-top: 10px; font-size: 0.9em;">
<li>Workflow-UI implementiert</li>
<li>User Connectors</li>
<li>Login-System</li>
<li>Real-time Updates fehlen</li>
</ul>
</div>
<div class="component-item in-progress">
<div class="component-name">Modul-Testing</div>
<div class="component-status">80% abgeschlossen</div>
<div class="progress-indicator">
<div class="progress-bar in-progress" style="width: 80%"></div>
</div>
<ul style="margin-top: 10px; font-size: 0.9em;">
<li>Workflow-Tests implementiert</li>
<li>Methoden-Signaturen validiert</li>
<li>Dokumentenübergabe getestet</li>
<li>End-to-End Tests fehlen</li>
</ul>
</div>
<div class="component-item pending">
<div class="component-name">Workflow-Testing</div>
<div class="component-status">40% abgeschlossen</div>
<div class="progress-indicator">
<div class="progress-bar pending" style="width: 40%"></div>
</div>
<ul style="margin-top: 10px; font-size: 0.9em;">
<li>Task-Erstellung implementiert</li>
<li>Action-Execution-System vorhanden</li>
<li>Workflow-Ausführung in Bearbeitung</li>
<li>Handover-Testing ausstehend</li>
</ul>
</div>
<div class="component-item pending">
<div class="component-name">Sicherheit & Validierung</div>
<div class="component-status">20% abgeschlossen</div>
<div class="progress-indicator">
<div class="progress-bar pending" style="width: 20%"></div>
</div>
<ul style="margin-top: 10px; font-size: 0.9em;">
<li>Grundlegende Authentifizierung</li>
<li>Input Validation ausstehend</li>
<li>Session-Management ausstehend</li>
<li>Data Protection ausstehend</li>
</ul>
</div>
</div>
</div>
<!-- Methods Chart -->
<div class="chart-section">
<h2>🔧 Methoden-Implementierung</h2>
<div class="chart-container">
<canvas id="methodsChart"></canvas>
</div>
</div>
</div>
<script>
// Main Components Chart
const componentsCtx = document.getElementById('componentsChart').getContext('2d');
const componentsChart = new Chart(componentsCtx, {
type: 'bar',
data: {
labels: [
'Backend-Implementierung',
'Frontend-UI',
'Modul-Testing',
'Workflow-Testing',
'Sicherheit & Validierung'
],
datasets: [{
label: 'Fortschritt (%)',
data: [100, 90, 80, 40, 20],
backgroundColor: [
'#27ae60', // Complete
'#f39c12', // In Progress
'#f39c12', // In Progress
'#e74c3c', // Pending
'#e74c3c' // Pending
],
borderColor: [
'#229954',
'#e67e22',
'#e67e22',
'#c0392b',
'#c0392b'
],
borderWidth: 2,
borderRadius: 8,
borderSkipped: false,
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
display: false
},
title: {
display: true,
text: 'Komponenten-Fortschritt in Prozent',
font: {
size: 16,
weight: 'bold'
}
}
},
scales: {
y: {
beginAtZero: true,
max: 100,
ticks: {
callback: function(value) {
return value + '%';
}
},
grid: {
color: 'rgba(0,0,0,0.1)'
}
},
x: {
grid: {
display: false
},
ticks: {
maxRotation: 45,
minRotation: 45
}
}
},
animation: {
duration: 2000,
easing: 'easeInOutQuart'
}
}
});
// Methods Chart
const methodsCtx = document.getElementById('methodsChart').getContext('2d');
const methodsChart = new Chart(methodsCtx, {
type: 'bar',
data: {
labels: [
'Web-Recherche',
'SharePoint',
'PowerPoint',
'Outlook',
'Operator',
'Dokumente',
'Code',
'Excel'
],
datasets: [{
label: 'Implementierungsstatus',
data: [100, 100, 100, 100, 100, 100, 100, 100],
backgroundColor: '#27ae60',
borderColor: '#229954',
borderWidth: 2,
borderRadius: 6,
borderSkipped: false,
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
display: false
},
title: {
display: true,
text: 'Alle 8 Methoden sind vollständig implementiert',
font: {
size: 16,
weight: 'bold'
}
}
},
scales: {
y: {
beginAtZero: true,
max: 100,
ticks: {
callback: function(value) {
return value + '%';
}
},
grid: {
color: 'rgba(0,0,0,0.1)'
}
},
x: {
grid: {
display: false
},
ticks: {
maxRotation: 45,
minRotation: 45
}
}
},
animation: {
duration: 1500,
easing: 'easeInOutQuart'
}
}
});
// Add hover effects to summary cards
document.querySelectorAll('.summary-card').forEach(card => {
card.addEventListener('mouseenter', function() {
this.style.transform = 'translateY(-8px) scale(1.02)';
});
card.addEventListener('mouseleave', function() {
this.style.transform = 'translateY(0) scale(1)';
});
});
// Add click effects to component items
document.querySelectorAll('.component-item').forEach(item => {
item.addEventListener('click', function() {
this.style.transform = 'scale(0.98)';
setTimeout(() => {
this.style.transform = 'scale(1)';
}, 150);
});
});
</script>
</body>
</html>

View file

@ -1,25 +0,0 @@
# PowerOn AI Platform: Kurze Kapitelzusammenfassungen
## 1. Systemzweck und Wertversprechen
PowerOn adressiert die Herausforderung der Automatisierung komplexer Geschäftsprozesse durch einen innovativen Multi-Agent-KI-Ansatz. Unsere Plattform positioniert sich an der Schnittstelle von KI, Business Process Automation und Enterprise Knowledge Management mit einem kombinierten Marktvolumen von über 250 Milliarden Dollar bis 2025. Der Wettbewerbsvorteil liegt in unserer proprietären Multi-Agent-Technologie, der Modellunabhängigkeit ohne Vendor Lock-in, der Enterprise-Ready-Architektur und der modularen Anpassungsfähigkeit, die kontinuierliche Verbesserungen ermöglicht.
## 2. Architektur und Agentensystem
Die PowerOn Plattform basiert auf einer modularen Architektur mit klarer Trennung zwischen Frontend und Backend. Das Backend orchestriert über das Gateway-Interface, LucyDOM-Interface und den Agent-Service das Zusammenspiel aller Komponenten. Das Frontend bietet mit modernen JavaScript-Technologien eine responsive, intuitive Benutzeroberfläche. Herzstück ist unser hierarchisches Multi-Agent-System: Der Initialisierungs-Agent analysiert Anfragen, der Moderator/Organisator koordiniert spezialisierte Agenten (Entwickler, Webscraper, Datenanalysten, Textgeneratoren und Visualisierer), die parallel arbeiten und so komplexe Aufgaben effizient bewältigen.
## 3. Workflow-Demonstration
Der PowerOn Workflow ist ein nahtloser Prozess: Nutzer wählen Agenten und Dateien aus und formulieren einen Prompt. Der Organisator-Agent analysiert die Aufgabe und erstellt einen strukturierten Arbeitsplan. Die spezialisierten Agenten arbeiten parallel an ihren Aufgaben, während der Nutzer bei Bedarf direkt interagieren kann. Dieses Feature ermöglicht einen dynamischen, iterativen Arbeitsablauf ohne Neustart des Prozesses. Am Ende werden alle Ergebnisse aggregiert, strukturiert und gespeichert, sodass der Nutzer sowohl das Endergebnis als auch Einblick in den Analyseprozess erhält.
## 4. Skalierbarkeit und Vernetzungspotenzial
PowerOn ist auf Skalierbarkeit ausgelegt. Die Multi-Tenant-Architektur gewährleistet Datentrennung bei effizienter Ressourcennutzung, während die Modellunabhängigkeit Flexibilität bei der Nutzung verschiedener KI-Anbieter bietet. Umfassende REST-APIs ermöglichen nahtlose Integration in Unternehmenslandschaften. Unser hybrides Geschäftsmodell kombiniert Abonnements mit nutzungsbasierter Abrechnung, was vorhersehbare Einnahmen und Wachstumspotenzial bietet. Nach Erreichen der Skalierung erwarten wir Bruttomargen von 75-85%, da die Hauptkosten in der Entwicklung liegen, während die laufenden Betriebskosten vergleichsweise gering bleiben.
## 5. Roadmap: Nächste Schritte und Integration
Unsere Roadmap folgt einer dreistufigen Strategie: Kurzfristig (12 Monate) fokussieren wir auf die Markteinführung der Core-Plattform mit 3-5 Schlüsselreferenzkunden und der Entwicklung branchenspezifischer Templates. Mittelfristig (24 Monate) erweitern wir die Plattform um einen Agentenmarktplatz, integrieren proprietäre Unternehmensmodelle und beginnen mit der internationalen Expansion. Langfristig (36+ Monate) entwickeln wir spezialisierte Branchenlösungen und positionieren PowerOn als zentrale KI-Middleware für Unternehmen. Prioritäre Integrationsbereiche sind ERP/CRM-Systeme, Cloud-Speicherdienste, Business Intelligence Tools und ein SDK für kundenspezifische Integrationen.
## 6. Nächste Schritte
Unser Finanzierungsziel von 2,5 Millionen CHF deckt vier kritische Bereiche ab: Abschluss der Produktentwicklung, Aufbau eines schlagkräftigen Verkaufs- und Marketingteams, Sicherung strategischer Partnerschaften und eine 18-monatige Runway bis zur Profitabilität. Wir prognostizieren im dritten Jahr einen wiederkehrenden Umsatz von 4,5 Millionen CHF bei etwa 150 Unternehmenskunden. Die unmittelbaren Meilensteine sind: Abschluss der Core-Entwicklung (Q2 2025), geschlossene Beta mit drei Pilotkunden (Q3 2025) und offizieller Marktstart (Q4 2025).

View file

@ -1,705 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PowerOn AI Platform - Was Sie als Benutzer machen können</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.header {
text-align: center;
color: white;
margin-bottom: 40px;
}
.header h1 {
font-size: 3rem;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.header p {
font-size: 1.2rem;
opacity: 0.9;
}
.content-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 25px;
margin-bottom: 40px;
}
.card {
background: white;
border-radius: 15px;
padding: 25px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
transition: transform 0.3s ease, box-shadow 0.3s ease;
position: relative;
overflow: hidden;
word-wrap: break-word;
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, #667eea, #764ba2);
}
.card h2 {
color: #2c3e50;
margin-bottom: 20px;
font-size: 1.8rem;
display: flex;
align-items: center;
gap: 15px;
}
.card h2::before {
content: '';
width: 40px;
height: 40px;
border-radius: 50%;
background: linear-gradient(135deg, #667eea, #764ba2);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 1.2rem;
font-weight: bold;
}
.card:nth-child(1) h2::before { content: '🔌'; }
.card:nth-child(2) h2::before { content: '🛡️'; }
.card:nth-child(3) h2::before { content: '🎤'; }
.card:nth-child(4) h2::before { content: '📋'; }
.card:nth-child(5) h2::before { content: '🤖'; }
.card:nth-child(6) h2::before { content: '📊'; }
.feature-list {
list-style: none;
margin-top: 20px;
}
.feature-list li {
padding: 8px 0;
border-bottom: 1px solid #f0f0f0;
display: flex;
align-items: flex-start;
gap: 10px;
flex-wrap: wrap;
}
.feature-list li:last-child {
border-bottom: none;
}
.feature-list li::before {
content: '✓';
color: #27ae60;
font-weight: bold;
font-size: 1.2rem;
}
.status-badge {
display: inline-block;
padding: 4px 12px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: bold;
margin-left: 10px;
white-space: nowrap;
flex-shrink: 0;
}
.status-available {
background: #d4edda;
color: #155724;
}
.status-planned {
background: #fff3cd;
color: #856404;
}
.status-beta {
background: #cce5ff;
color: #004085;
}
.highlight-box {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
padding: 30px;
border-radius: 15px;
margin: 40px 0;
text-align: center;
}
.highlight-box h2 {
font-size: 2.5rem;
margin-bottom: 15px;
}
.highlight-box p {
font-size: 1.2rem;
opacity: 0.9;
}
.workflow-example {
background: #f8f9fa;
border-left: 4px solid #667eea;
padding: 20px;
margin: 20px 0;
border-radius: 0 10px 10px 0;
}
.chat-flow {
background: white;
border-radius: 15px;
padding: 25px;
margin: 30px 0;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.chat-flow h3 {
color: #2c3e50;
margin-bottom: 20px;
text-align: center;
font-size: 1.8rem;
}
.chat-steps {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin-top: 20px;
}
.chat-step {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
padding: 20px;
border-radius: 10px;
text-align: center;
position: relative;
}
.chat-step::after {
content: '→';
position: absolute;
right: -15px;
top: 50%;
transform: translateY(-50%);
font-size: 1.5rem;
color: #667eea;
background: white;
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.chat-step:last-child::after {
display: none;
}
.chat-step h4 {
margin-bottom: 10px;
font-size: 1.2rem;
}
.chat-step p {
font-size: 0.9rem;
opacity: 0.9;
}
@media (max-width: 768px) {
.chat-steps {
grid-template-columns: 1fr;
}
.chat-step::after {
display: none;
}
}
.workflow-example h3 {
color: #2c3e50;
margin-bottom: 15px;
}
.workflow-steps {
list-style: none;
counter-reset: step-counter;
}
.workflow-steps li {
counter-increment: step-counter;
padding: 10px 0;
display: flex;
align-items: center;
gap: 15px;
}
.workflow-steps li::before {
content: counter(step-counter);
background: #667eea;
color: white;
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 0.9rem;
}
.workflow-diagram {
background: white;
border-radius: 15px;
padding: 30px;
margin: 30px 0;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.workflow-diagram h3 {
color: #2c3e50;
margin-bottom: 25px;
text-align: center;
font-size: 1.8rem;
}
.workflow-flow {
display: flex;
flex-direction: column;
gap: 20px;
}
.workflow-phase {
display: flex;
align-items: center;
gap: 20px;
padding: 15px;
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
border-radius: 10px;
position: relative;
}
.workflow-phase::after {
content: '↓';
position: absolute;
bottom: -25px;
left: 50%;
transform: translateX(-50%);
font-size: 1.5rem;
color: #667eea;
background: white;
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.workflow-phase:last-child::after {
display: none;
}
.phase-number {
background: rgba(255,255,255,0.2);
color: white;
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 1.2rem;
flex-shrink: 0;
}
.phase-content {
flex: 1;
}
.phase-title {
font-size: 1.3rem;
font-weight: bold;
margin-bottom: 5px;
}
.phase-description {
font-size: 0.9rem;
opacity: 0.9;
}
.workflow-details {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin-top: 30px;
}
.detail-card {
background: #f8f9fa;
border-radius: 10px;
padding: 20px;
border-left: 4px solid #667eea;
}
.detail-card h4 {
color: #2c3e50;
margin-bottom: 10px;
font-size: 1.1rem;
}
.detail-card ul {
list-style: none;
padding: 0;
margin: 0;
}
.detail-card li {
padding: 5px 0;
display: flex;
align-items: center;
gap: 8px;
}
.detail-card li::before {
content: '•';
color: #667eea;
font-weight: bold;
font-size: 1.2rem;
}
@media (max-width: 768px) {
.workflow-flow {
gap: 15px;
}
.workflow-phase {
flex-direction: column;
text-align: center;
gap: 10px;
}
.workflow-phase::after {
display: none;
}
.workflow-details {
grid-template-columns: 1fr;
}
}
.footer {
text-align: center;
color: white;
margin-top: 40px;
padding: 20px;
opacity: 0.8;
}
@media (max-width: 768px) {
.header h1 {
font-size: 2rem;
}
.content-grid {
grid-template-columns: 1fr;
}
.card {
padding: 20px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>PowerOn AI Platform</h1>
<p>Entdecken Sie die Möglichkeiten der Multi-Agent-KI-Plattform</p>
</div>
<div class="content-grid">
<!-- MyConnectors -->
<div class="card">
<h2>MyConnectors - Externe Systeme</h2>
<p>Nahtlose Integration bestehender Systeme:</p>
<ul class="feature-list">
<li><strong>SharePoint:</strong> Dokumente & Listen <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Outlook:</strong> E-Mails & Kalender <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Google Drive:</strong> Cloud-Synchronisation <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>OneDrive:</strong> Microsoft Cloud <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Dropbox/Slack/Teams:</strong> Erweiterte Integration <span class="status-badge status-planned">Geplant</span></li>
</ul>
</div>
<!-- Neutralizer -->
<div class="card">
<h2>Neutralizer - DSGVO-konforme Datenverarbeitung</h2>
<p>Zentrales Element für sichere Datenverarbeitung:</p>
<ul class="feature-list">
<li><strong>Automatische Anonymisierung:</strong> Personenbezogene Daten erkennen & ersetzen</li>
<li><strong>Multi-Format:</strong> TXT, JSON, CSV, Excel, Word, XML</li>
<li><strong>Mehrsprachig:</strong> DE, EN, FR, IT</li>
<li><strong>Intelligente Mustererkennung:</strong> E-Mails, Telefonnummern, Adressen</li>
<li><strong>Mapping-System:</strong> Konsistente Ersetzung</li>
<li><strong>Compliance:</strong> DSGVO, ISO 27001 konform</li>
</ul>
</div>
<!-- Voice Interfaces -->
<div class="card">
<h2>Voice-to-Text & Text-to-Voice</h2>
<p>Natürliche Sprachinteraktion:</p>
<ul class="feature-list">
<li><strong>Voice-to-Text:</strong> Sprachaufnahmen → Text <span class="status-badge status-planned">Geplant</span></li>
<li><strong>Text-to-Voice:</strong> KI-Antworten als Sprache <span class="status-badge status-planned">Geplant</span></li>
<li><strong>Mehrsprachig:</strong> DE, EN, FR, IT</li>
<li><strong>Echtzeit-Verarbeitung:</strong> Sofortige Umwandlung</li>
<li><strong>Voice Commands:</strong> Sprachgesteuerte Steuerung</li>
<li><strong>Accessibility:</strong> Barrierefreie Bedienung</li>
</ul>
</div>
<!-- Task Planning -->
<div class="card">
<h2>Taskpläne & Actionpläne</h2>
<p>Manuelle Erstellung von Arbeitsabläufen:</p>
<ul class="feature-list">
<li><strong>Chatbot-Design:</strong> Konversationsabläufe gestalten <span class="status-badge status-planned">Geplant</span></li>
<li><strong>Workflow-Builder:</strong> Drag & Drop Interface</li>
<li><strong>Conditional Logic:</strong> Wenn-Dann-Bedingungen</li>
<li><strong>Template-System:</strong> Wiederverwendbare Vorlagen</li>
<li><strong>Versionierung:</strong> Änderungen verfolgen</li>
<li><strong>Kollaboration:</strong> Team-basierte Entwicklung</li>
</ul>
</div>
<!-- Multi-Agent System -->
<div class="card">
<h2>Multi-Agent Workflow System</h2>
<p>Spezialisierte KI-Agenten arbeiten zusammen:</p>
<ul class="feature-list">
<li><strong>Initialisierungs-Agent:</strong> Aufgabenanalyse & Planung <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Organisator-Agent:</strong> Koordination & Ressourcenverwaltung <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Entwickler-Agent:</strong> Code-Generierung & -Optimierung <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Webscraper-Agent:</strong> Online-Recherche & Datenextraktion <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Datenanalyst-Agent:</strong> Statistische Auswertungen <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Textgenerator-Agent:</strong> Content-Erstellung <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Visualisierer-Agent:</strong> Grafiken & Diagramme <span class="status-badge status-available">Verfügbar</span></li>
</ul>
</div>
<!-- Advanced Features -->
<div class="card">
<h2>Erweiterte Funktionen</h2>
<p>Professionelle Enterprise-Features:</p>
<ul class="feature-list">
<li><strong>Multi-Tenant:</strong> Mandantenbasierte Datenisolierung <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Workspace-Management:</strong> Projektbasierte Organisation <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>API-Integration:</strong> REST-API für externe Systeme <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Audit-Logging:</strong> Vollständige Aktivitätsprotokollierung <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Backup & Recovery:</strong> Automatische Datensicherung <span class="status-badge status-available">Verfügbar</span></li>
<li><strong>Performance-Monitoring:</strong> Echtzeit-Systemüberwachung <span class="status-badge status-beta">Beta</span></li>
<li><strong>Scalability:</strong> Horizontale Skalierung <span class="status-badge status-planned">Geplant</span></li>
</ul>
</div>
</div>
<div class="highlight-box">
<h2>Der Neutralizer als zentrales Element</h2>
<p>Der DSGVO-konforme Daten-Neutralisierer ist das Herzstück der PowerOn Plattform.
Er sorgt dafür, dass alle sensiblen Daten automatisch erkannt und anonymisiert werden,
bevor sie von KI-Agenten verarbeitet werden. Dies ermöglicht eine sichere und
rechtskonforme Nutzung der Plattform in regulierten Umgebungen.</p>
</div>
<div class="chat-flow">
<h3>Workflow-Ablauf schematisch (gemäß managerChat.py)</h3>
<div class="chat-steps">
<div class="chat-step">
<h4>1. Phase: Task Planning</h4>
<p>High-Level Task Planning mit AI-basierter Aufgabenanalyse</p>
</div>
<div class="chat-step">
<h4>2. Phase: Action Definition</h4>
<p>Task Definition und Action Generation für spezifische Schritte</p>
</div>
<div class="chat-step">
<h4>3. Phase: Action Execution</h4>
<p>Ausführung aller Actions mit Retry-Mechanismus</p>
</div>
<div class="chat-step">
<h4>4. Phase: Task Review</h4>
<p>Review und Quality Assessment der Task-Completion</p>
</div>
<div class="chat-step">
<h4>5. Phase: Task Handover</h4>
<p>State Management und Vorbereitung für nächste Tasks</p>
</div>
</div>
</div>
<div class="workflow-diagram">
<h3>Detaillierter Workflow-Ablauf</h3>
<div class="workflow-flow">
<div class="workflow-phase">
<div class="phase-number">1</div>
<div class="phase-content">
<div class="phase-title">Unified Workflow Execution</div>
<div class="phase-description">Startet mit UserInputRequest und ChatWorkflow</div>
</div>
</div>
<div class="workflow-phase">
<div class="phase-number">2</div>
<div class="phase-content">
<div class="phase-title">Task Planning</div>
<div class="phase-description">AI erstellt TaskPlan mit 2-4 Tasks basierend auf User Request</div>
</div>
</div>
<div class="workflow-phase">
<div class="phase-number">3</div>
<div class="phase-content">
<div class="phase-title">Task Execution Loop</div>
<div class="phase-description">Für jeden Task wird der 5-Phasen-Prozess durchlaufen</div>
</div>
</div>
<div class="workflow-phase">
<div class="phase-number">4</div>
<div class="phase-content">
<div class="phase-title">Action Generation</div>
<div class="phase-description">AI generiert spezifische Actions für jeden Task</div>
</div>
</div>
<div class="workflow-phase">
<div class="phase-number">5</div>
<div class="phase-content">
<div class="phase-title">Action Validation</div>
<div class="phase-description">Jede Action wird mit AI-basierter Validierung ausgeführt</div>
</div>
</div>
<div class="workflow-phase">
<div class="phase-number">6</div>
<div class="phase-content">
<div class="phase-title">State Management</div>
<div class="phase-description">TaskExecutionState verwaltet Retry-Logik und Verbesserungen</div>
</div>
</div>
<div class="workflow-phase">
<div class="phase-number">7</div>
<div class="phase-content">
<div class="phase-title">Circuit Breaker</div>
<div class="phase-description">Intelligente AI-Routing zwischen Advanced und Basic AI</div>
</div>
</div>
<div class="workflow-phase">
<div class="phase-number">8</div>
<div class="phase-content">
<div class="phase-title">Document Processing</div>
<div class="phase-description">Enhanced Dokumentverarbeitung mit MIME-Type Detection</div>
</div>
</div>
<div class="workflow-phase">
<div class="phase-number">9</div>
<div class="phase-content">
<div class="phase-title">Result Review</div>
<div class="phase-description">AI-basierte Qualitätsbewertung und Next-Step-Entscheidung</div>
</div>
</div>
<div class="workflow-phase">
<div class="phase-number">10</div>
<div class="phase-content">
<div class="phase-title">Workflow Completion</div>
<div class="phase-description">WorkflowResult mit Metriken und Status</div>
</div>
</div>
</div>
<div class="workflow-details">
<div class="detail-card">
<h4>AI-Integration</h4>
<ul>
<li>Advanced AI für komplexe Tasks</li>
<li>Basic AI für einfache Tasks</li>
<li>Circuit Breaker Pattern</li>
<li>Intelligente Fallback-Mechanismen</li>
</ul>
</div>
<div class="detail-card">
<h4>State Management</h4>
<ul>
<li>TaskExecutionState für Retry-Logik</li>
<li>Verbesserungen basierend auf Fehlern</li>
<li>Partielle Ergebnisse speichern</li>
<li>Failure Pattern Analysis</li>
</ul>
</div>
<div class="detail-card">
<h4>Document Processing</h4>
<ul>
<li>Enhanced MIME-Type Detection</li>
<li>Multi-Format Support</li>
<li>Automatische Metadaten-Extraktion</li>
<li>Content Validation</li>
</ul>
</div>
<div class="detail-card">
<h4>Quality Assurance</h4>
<ul>
<li>AI-basierte Action Validation</li>
<li>Result Review mit Qualitätsmetriken</li>
<li>Automatische Verbesserungsvorschläge</li>
<li>Confidence Scoring</li>
</ul>
</div>
</div>
</div>
<div class="footer">
<p>&copy; 2025 PowerOn AI Platform - Multi-Agent-KI-Plattform für Enterprise-Anwendungen</p>
</div>
</div>
</body>
</html>

View file

@ -1,285 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Enterprise Suite - Preise</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 20px;
min-height: 100vh;
}
.container {
max-width: 210mm;
margin: 0 auto;
background: white;
border-radius: 20px;
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
overflow: hidden;
height: 297mm;
display: flex;
flex-direction: column;
}
.header {
background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
color: white;
padding: 30px;
text-align: center;
}
.header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
font-weight: 700;
}
.header p {
font-size: 1.1rem;
opacity: 0.9;
}
.pricing-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
padding: 40px;
flex: 1;
}
.plan {
background: #f8f9fa;
border-radius: 15px;
padding: 25px;
text-align: center;
position: relative;
border: 3px solid transparent;
transition: all 0.3s ease;
}
.plan:hover {
transform: translateY(-5px);
box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.plan.popular {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border-color: #FFD700;
transform: scale(1.05);
}
.plan.popular::before {
content: "BELIEBTESTE WAHL";
position: absolute;
top: -15px;
left: 50%;
transform: translateX(-50%);
background: #FFD700;
color: #2C3E50;
padding: 8px 20px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: bold;
}
.plan h3 {
font-size: 1.5rem;
margin-bottom: 15px;
font-weight: 600;
}
.price {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 5px;
}
.period {
font-size: 0.9rem;
opacity: 0.7;
margin-bottom: 20px;
}
.features {
list-style: none;
margin-bottom: 25px;
text-align: left;
}
.features li {
padding: 8px 0;
position: relative;
padding-left: 25px;
font-size: 0.9rem;
}
.features li::before {
content: "✓";
position: absolute;
left: 0;
color: #27AE60;
font-weight: bold;
}
.plan.popular .features li::before {
color: #FFD700;
}
.setup-fee {
background: #e74c3c;
color: white;
padding: 8px 15px;
border-radius: 20px;
font-size: 0.8rem;
display: inline-block;
margin-bottom: 15px;
}
.cta-button {
background: #2C3E50;
color: white;
border: none;
padding: 12px 25px;
border-radius: 25px;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
width: 100%;
}
.cta-button:hover {
background: #34495E;
transform: translateY(-2px);
}
.plan.popular .cta-button {
background: white;
color: #667eea;
}
.plan.popular .cta-button:hover {
background: #f8f9fa;
}
.footer {
background: #2C3E50;
color: white;
padding: 25px;
text-align: center;
}
.footer-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
margin-bottom: 20px;
}
.footer h4 {
margin-bottom: 10px;
color: #FFD700;
}
.footer p {
font-size: 0.9rem;
opacity: 0.9;
}
.contact {
border-top: 1px solid #34495E;
padding-top: 15px;
font-size: 0.9rem;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>PowerOn</h1>
<p>Integrierte AI Plattform für DeineDaten - E-Mail, Kalender & SharePoint Integration</p>
</div>
<div class="pricing-grid">
<div class="plan">
<h3>Starter</h3>
<div class="price">CHF 1'190</div>
<div class="period">pro Monat</div>
<div class="setup-fee">Setup: CHF 7'900</div>
<ul class="features">
<li>1'000 AI-Abfragen/Monat</li>
<li>E-Mail Integration</li>
<li>Basis-Dashboard</li>
<li>E-Mail Support</li>
<li>Professional Services: CHF 195/h</li>
<li><strong>Einsparung: &lt;1 FTE/Jahr</strong></li>
</ul>
<button class="cta-button">Jetzt starten</button>
</div>
<div class="plan popular">
<h3>Professional</h3>
<div class="price">CHF 3'990</div>
<div class="period">pro Monat</div>
<div class="setup-fee">Setup: CHF 14'900</div>
<ul class="features">
<li>20'000 AI-Abfragen/Monat</li>
<li>Vollständige SharePoint Integration</li>
<li>Advanced Analytics</li>
<li>Custom Workflows</li>
<li>Priority Support</li>
<li>Professional Services: CHF 195/h</li>
<li><strong>Einsparung: 1-3 FTE/Jahr</strong></li>
</ul>
<button class="cta-button">Empfohlen</button>
</div>
<div class="plan">
<h3>Enterprise</h3>
<div class="price">CHF 7'990</div>
<div class="period">pro Monat</div>
<div class="setup-fee">Setup: CHF 19'900</div>
<ul class="features">
<li>50'000 AI-Abfragen/Monat</li>
<li>Google Workspace Integration</li>
<li>Dedicated Server Option</li>
<li>White-Label Lösung</li>
<li>24/7 Support</li>
<li>Professional Services: CHF 195/h</li>
<li><strong>Einsparung: 12+ FTE/Jahr</strong></li>
</ul>
<button class="cta-button">CHF 3.25/Min</button>
</div>
</div>
<div class="footer">
<div class="footer-grid">
<div>
<h4>Zusätzliche Abfragen</h4>
<p>CHF 0.20 pro zusätzliche AI-Abfrage bei Überschreitung des Kontingents</p>
</div>
<div>
<h4>Jahresrabatt</h4>
<p>15% Rabatt bei Jahresvertrag<br>25% Rabatt bei 3-Jahres-Vertrag</p>
</div>
<div>
<h4>Compliance & Sicherheit</h4>
<p>DSGVO-konform<br>Swiss Cloud Hosting verfügbar</p>
</div>
</div>
<div class="contact">
<strong>Kontakt:</strong> sales@poweron.ch | +41 44 123 45 67 | Kostenlose Demo verfügbar
</div>
</div>
</div>
</body>
</html>

View file

@ -1,585 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PowerOn AI Platform - Release Status Chart</title>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
}
.container {
max-width: 1200px;
margin: 0 auto;
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
color: #2c3e50;
text-align: center;
border-bottom: 3px solid #3498db;
padding-bottom: 10px;
}
h2 {
color: #34495e;
margin-top: 40px;
border-left: 4px solid #3498db;
padding-left: 15px;
}
h3 {
color: #7f8c8d;
margin-top: 30px;
}
.chart-container {
margin: 30px 0;
padding: 20px;
background: #f8f9fa;
border-radius: 8px;
border: 1px solid #e9ecef;
}
.chart-title {
font-weight: bold;
color: #495057;
margin-bottom: 15px;
text-align: center;
}
.status-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin: 30px 0;
}
.status-card {
background: white;
padding: 20px;
border-radius: 8px;
border-left: 4px solid #3498db;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.status-card.complete {
border-left-color: #27ae60;
}
.status-card.in-progress {
border-left-color: #f39c12;
}
.status-card.pending {
border-left-color: #e74c3c;
}
.progress-bar {
width: 100%;
height: 20px;
background: #ecf0f1;
border-radius: 10px;
overflow: hidden;
margin: 10px 0;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, #3498db, #2980b9);
transition: width 0.3s ease;
}
.progress-fill.complete {
background: linear-gradient(90deg, #27ae60, #229954);
}
.progress-fill.in-progress {
background: linear-gradient(90deg, #f39c12, #e67e22);
}
.progress-fill.pending {
background: linear-gradient(90deg, #e74c3c, #c0392b);
}
.legend {
display: flex;
justify-content: center;
gap: 20px;
margin: 20px 0;
flex-wrap: wrap;
}
.legend-item {
display: flex;
align-items: center;
gap: 5px;
}
.legend-color {
width: 20px;
height: 20px;
border-radius: 3px;
}
.legend-color.complete { background: #27ae60; }
.legend-color.in-progress { background: #f39c12; }
.legend-color.pending { background: #e74c3c; }
.summary-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
margin: 30px 0;
}
.stat-card {
background: white;
padding: 20px;
border-radius: 8px;
text-align: center;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.stat-number {
font-size: 2em;
font-weight: bold;
color: #3498db;
}
.stat-label {
color: #7f8c8d;
margin-top: 5px;
}
</style>
</head>
<body>
<div class="container">
<h1>🚀 PowerOn AI Platform - Release Status Chart</h1>
<h2>Methodenbasierter AI-Agenten-Chat</h2>
<!-- Summary Statistics -->
<div class="summary-stats">
<div class="stat-card">
<div class="stat-number">85%</div>
<div class="stat-label">Gesamtfortschritt</div>
</div>
<div class="stat-card">
<div class="stat-number">8</div>
<div class="stat-label">Methoden implementiert</div>
</div>
<div class="stat-card">
<div class="stat-number">171</div>
<div class="stat-label">Tage seit Projektstart</div>
</div>
<div class="stat-card">
<div class="stat-number">4</div>
<div class="stat-label">Release-Phasen</div>
</div>
</div>
<!-- Legend -->
<div class="legend">
<div class="legend-item">
<div class="legend-color complete"></div>
<span>Abgeschlossen (100%)</span>
</div>
<div class="legend-item">
<div class="legend-color in-progress"></div>
<span>In Bearbeitung (60-90%)</span>
</div>
<div class="legend-item">
<div class="legend-color pending"></div>
<span>Ausstehend (0-60%)</span>
</div>
</div>
<!-- Component Status -->
<h2>📊 Komponenten-Status</h2>
<div class="status-grid">
<div class="status-card complete">
<h3>Backend-Implementierung</h3>
<div class="progress-bar">
<div class="progress-fill complete" style="width: 100%"></div>
</div>
<p><strong>100% abgeschlossen</strong></p>
<ul>
<li>8 Methoden implementiert</li>
<li>ServiceCenter erstellt</li>
<li>Document Processing</li>
<li>Workflow Management</li>
</ul>
</div>
<div class="status-card in-progress">
<h3>Frontend-UI</h3>
<div class="progress-bar">
<div class="progress-fill in-progress" style="width: 90%"></div>
</div>
<p><strong>90% abgeschlossen</strong></p>
<ul>
<li>UI stabilisiert</li>
<li>User Connectors</li>
<li>Workflow UI Module</li>
<li>Real-time Updates (10%)</li>
</ul>
</div>
<div class="status-card in-progress">
<h3>Modul-Testing</h3>
<div class="progress-bar">
<div class="progress-fill in-progress" style="width: 80%"></div>
</div>
<p><strong>80% abgeschlossen</strong></p>
<ul>
<li>Modul Tests</li>
<li>Methoden-Signaturen</li>
<li>Dokumentenübergabe</li>
<li>Workflow Tests (60%)</li>
</ul>
</div>
<div class="status-card pending">
<h3>Security & Deployment</h3>
<div class="progress-bar">
<div class="progress-fill pending" style="width: 40%"></div>
</div>
<p><strong>40% abgeschlossen</strong></p>
<ul>
<li>Input Validation</li>
<li>Authentication</li>
<li>Documentation</li>
<li>Deployment Setup</li>
</ul>
</div>
</div>
<!-- Gantt Chart -->
<h2>📅 Release Roadmap</h2>
<div class="chart-container">
<div class="chart-title">PowerOn AI Platform - Release Timeline</div>
<div class="mermaid">
gantt
title PowerOn AI Platform - Release Roadmap
dateFormat YYYY-MM-DD
section Backend
Methoden-Implementierung :done, m1, 2025-04-01, 2025-04-15
ServiceCenter :done, sc, after m1, 15d
Document Processing :done, dp, after sc, 15d
Workflow Management :done, wm, after dp, 15d
section Frontend
UI Stabilisierung :done, ui, after wm, 15d
User Connectors :done, uc, after ui, 15d
Workflow UI Module :done, wui, after uc, 15d
section Testing
Modul Testing :done, mt, after wui, 15d
Workflow Testing :active, wt, 2025-06-01, 2025-06-30
Integration Testing :it, after wt, 15d
section Release
Security Validation :sec, after it, 15d
Documentation :doc, after sec, 15d
Deployment :dep, after doc, 15d
</div>
</div>
<!-- System Architecture -->
<h2>🏗️ System-Architektur</h2>
<div class="chart-container">
<div class="chart-title">Komponenten-Übersicht</div>
<div class="mermaid">
graph TB
subgraph "Frontend Layer"
UI[Workflow UI]
UC[User Connectors]
WC[Workflow Coordination]
end
subgraph "Backend Layer"
WM[Workflow Manager]
CM[Chat Manager]
DM[Document Manager]
end
subgraph "Service Layer"
SC[Service center]
AI[AI Interface]
DB[Database Interface]
end
subgraph "Method Layer"
WEB[Web Method]
SP[SharePoint Method]
PP[PowerPoint Method]
OL[Outlook Method]
OP[Operator Method]
DOC[Document Method]
COD[Coder Method]
EX[Excel Method]
end
subgraph "External Services"
OPENAI[OpenAI API]
ANTHROPIC[Anthropic API]
MSFT[Microsoft Graph]
GOOGLE[Google APIs]
end
UI --> WM
UC --> WM
WC --> WM
WM --> CM
WM --> DM
CM --> SC
DM --> SC
SC --> AI
SC --> DB
SC --> WEB
SC --> SP
SC --> PP
SC --> OL
SC --> OP
SC --> DOC
SC --> COD
SC --> EX
AI --> OPENAI
AI --> ANTHROPIC
SP --> MSFT
OL --> MSFT
PP --> MSFT
UC --> GOOGLE
style UI fill:#e3f2fd
style WM fill:#f3e5f5
style SC fill:#e8f5e8
style WEB fill:#fff3e0
style SP fill:#fff3e0
style PP fill:#fff3e0
style OL fill:#fff3e0
style OP fill:#fff3e0
style DOC fill:#fff3e0
style COD fill:#fff3e0
style EX fill:#fff3e0
</div>
</div>
<!-- Workflow Process -->
<h2>🔄 Workflow-Prozess</h2>
<div class="chart-container">
<div class="chart-title">Methodenbasierter AI-Agenten-Chat Ablauf</div>
<div class="mermaid">
flowchart TD
A[User Input] --> B{Workflow existiert?}
B -->|Nein| C[Neuen Workflow erstellen]
B -->|Ja| D[Workflow fortsetzen]
C --> E[ServiceCenter initialisieren]
D --> E
E --> F[Task erstellen]
F --> G[Actions ausführen]
G --> H{Action erfolgreich?}
H -->|Nein| I[Error Handling]
H -->|Ja| J[Ergebnis verarbeiten]
I --> K[Retry Logic]
K --> G
J --> L{Weitere Tasks?}
L -->|Ja| M[Nächsten Task identifizieren]
L -->|Nein| N[Workflow abschließen]
M --> F
N --> O[Ergebnis an User]
O --> P[Workflow Status: Completed]
style A fill:#e1f5fe
style P fill:#c8e6c9
style I fill:#ffcdd2
</div>
</div>
<!-- Progress Metrics -->
<h2>📈 Fortschritt nach Komponenten</h2>
<div class="chart-container">
<div class="chart-title">Fertigstellung in Prozent</div>
<div class="mermaid">
xychart-beta
title "Fertigstellung nach Komponenten"
x-axis [Backend, Frontend, Testing, Security, Documentation, Deployment]
y-axis "Prozent" 0 --> 100
bar [100, 90, 80, 70, 40, 30]
</div>
</div>
<!-- Release Phases -->
<h2>🚀 Release-Phasen</h2>
<div class="chart-container">
<div class="chart-title">4-Phasen Release-Plan</div>
<div class="mermaid">
gantt
title Release Timeline
dateFormat YYYY-MM-DD
section Phase 1: Workflow Testing
Task Execution Testing :wt1, 2025-06-01, 10d
Action Handover Testing :wt2, after wt1, 10d
Performance Testing :wt3, after wt2, 10d
section Phase 2: Frontend Integration
Real-time Updates :fi1, after wt3, 15d
Error Handling :fi2, after fi1, 15d
UI/UX Improvements :fi3, after fi2, 15d
section Phase 3: Security & Validation
Input Validation :sv1, after fi3, 15d
Authentication Testing :sv2, after sv1, 15d
Data Protection :sv3, after sv2, 15d
section Phase 4: Deployment & Documentation
API Documentation :dd1, after sv3, 15d
User Guide :dd2, after dd1, 15d
Deployment Setup :dd3, after dd2, 15d
</div>
</div>
<!-- Priority Matrix -->
<h2>🎯 Prioritäten-Matrix</h2>
<div class="chart-container">
<div class="chart-title">Release-Prioritäten nach Aufwand und Auswirkung</div>
<div class="mermaid">
graph LR
subgraph "Hoher Aufwand, Hohe Auswirkung"
A[Workflow Testing]
B[Security Validation]
end
subgraph "Niedriger Aufwand, Hohe Auswirkung"
C[Real-time Updates]
D[Error Handling]
end
subgraph "Niedriger Aufwand, Niedrige Auswirkung"
E[Documentation]
F[UI Improvements]
end
subgraph "Hoher Aufwand, Niedrige Auswirkung"
G[Performance Optimization]
H[Mobile Responsive]
end
style A fill:#ffcdd2
style B fill:#ffcdd2
style C fill:#c8e6c9
style D fill:#c8e6c9
style E fill:#fff3e0
style F fill:#fff3e0
style G fill:#e1f5fe
style H fill:#e1f5fe
</div>
</div>
<!-- Risk Assessment -->
<h2>⚠️ Risiko-Bewertung</h2>
<div class="chart-container">
<div class="chart-title">Risiko-Matrix nach Kategorien</div>
<div class="mermaid">
graph LR
subgraph "Niedriges Risiko"
A[Documentation]
B[UI Improvements]
end
subgraph "Mittleres Risiko"
C[Security Validation]
D[Performance Testing]
end
subgraph "Hohes Risiko"
E[Workflow Testing]
F[Integration Testing]
end
style A fill:#c8e6c9
style B fill:#c8e6c9
style C fill:#fff3e0
style D fill:#fff3e0
style E fill:#ffcdd2
style F fill:#ffcdd2
</div>
</div>
<!-- Next Steps -->
<h2>🎯 Nächste Schritte</h2>
<div class="chart-container">
<div class="chart-title">Release Journey Roadmap</div>
<div class="mermaid">
journey
title Release Journey
section Aktueller Stand
Workflow Testing: 5: Team
Frontend Integration: 4: Team
Security Validation: 3: Team
section Diese Woche
Task Execution Testing: 5: Team
Action Handover Testing: 4: Team
Real-time Updates: 3: Team
section Nächste Woche
Integration Testing: 5: Team
Security Testing: 4: Team
Documentation: 3: Team
section Release Week
Final Testing: 5: Team
Deployment: 4: Team
Go-Live: 5: Team
</div>
</div>
<!-- Detailed Breakdown -->
<h2>🔍 Detaillierte Aufschlüsselung</h2>
<div class="status-grid">
<div class="status-card">
<h3>Backend Components (100%)</h3>
<div class="mermaid">
pie title Backend Fertigstellung
"Methoden-Implementierung" : 25
"ServiceCenter" : 20
"Document Processing" : 25
"Workflow Management" : 30
</div>
</div>
<div class="status-card">
<h3>Frontend Components (90%)</h3>
<div class="mermaid">
pie title Frontend Fertigstellung
"UI Stabilisierung" : 35
"User Connectors" : 25
"Workflow UI Module" : 30
"Real-time Updates" : 10
</div>
</div>
<div class="status-card">
<h3>Testing Status (80%)</h3>
<div class="mermaid">
pie title Testing Fertigstellung
"Modul Testing" : 40
"Workflow Testing" : 35
"Integration Testing" : 15
"Performance Testing" : 10
</div>
</div>
</div>
<div style="text-align: center; margin-top: 40px; padding: 20px; background: #f8f9fa; border-radius: 8px;">
<p><strong>📊 Diese Charts werden automatisch aktualisiert und spiegeln den aktuellen Stand des methodenbasierten AI-Agenten-Chat-Systems wider.</strong></p>
<p><em>Erstellt: $(date) | Version: 1.0.0 | Status: Pre-Release Testing</em></p>
</div>
</div>
<script>
// Initialize Mermaid
mermaid.initialize({
startOnLoad: true,
theme: 'default',
flowchart: {
useMaxWidth: true,
htmlLabels: true
},
gantt: {
useMaxWidth: true
}
});
</script>
</body>
</html>

View file

@ -1,261 +0,0 @@
# PowerOn AI Platform - Release Status Report
## Methodenbasierter AI-Agenten-Chat
**Erstellt:** $(date)
**Version:** 1.0.0
**Status:** Pre-Release Testing
---
## 📊 **EXECUTIVE SUMMARY**
Das methodenbasierte AI-Agenten-Chat-System ist zu **85% fertiggestellt** und befindet sich in der finalen Testphase. Die Kernfunktionalität ist implementiert, UI stabilisiert und alle Methoden sind funktionsfähig.
---
## ✅ **ERLEDIGTE KOMPONENTEN**
### **Backend-Implementierung (100% abgeschlossen)**
#### **1. Methoden-Implementierung**
Alle 8 spezialisierten Methoden sind vollständig implementiert:
| Methode | Datei | Status | Beschreibung |
|---------|-------|--------|--------------|
| **Web-Recherche** | `methodWeb.py` | ✅ | Web-Scraping, Suchmaschinen-Integration |
| **SharePoint** | `methodSharepoint.py` | ✅ | Dokumenten-Management, Suche, Schreiben |
| **PowerPoint** | `methodPowerpoint.py` | ✅ | Präsentations-Analyse, -Erstellung, -Konvertierung |
| **Outlook** | `methodOutlook.py` | ✅ | E-Mail-Verwaltung, Ordner-Management |
| **Operator** | `methodOperator.py` | ✅ | Workflow-Koordination, Agenten-Orchestrierung |
| **Dokumente** | `methodDocument.py` | ✅ | Dateiverarbeitung, Inhalts-Extraktion |
| **Code** | `methodCoder.py` | ✅ | Code-Analyse, -Generierung, -Refactoring |
| **Excel** | `methodExcel.py` | ✅ | Datenanalyse, -Visualisierung, -Berichterstattung |
#### **2. ServiceCenter-Objekt**
- ✅ **Zentrale Service-Container-Klasse** implementiert
- ✅ **Dynamische Methoden-Entdeckung** via Reflection
- ✅ **Einheitliche Schnittstelle** für alle Services
- ✅ **Dokumenten-Management** integriert
- ✅ **AI-Call-Interface** verfügbar
#### **3. Document Extraction mit Chunks**
- ✅ **Umfassende Dateiverarbeitung** in `documentExtraction.py`
- ✅ **Unterstützung für:** PDF, Office-Dokumente, Bilder, JSON, XML, CSV
- ✅ **AI-basierte Inhalts-Extraktion** mit Prompt-System
- ✅ **Intelligentes Chunking** für große Dokumente
- ✅ **Base64-Encoding** für Binärdaten
#### **4. Services**
- ✅ **`serviceValueonChat.py`** - Hauptkoordinator
- ✅ **`managerChat.py`** - Chat-Management mit AI-Integration
- ✅ **Task-basierte Ausführung** implementiert
### **Frontend-Implementierung (90% abgeschlossen)**
#### **1. UI stabilisiert mit User Connectors**
- ✅ **`connections.js`** - Verbindungsverwaltung für MSFT/Google
- ✅ **`login.js`** - Getrennte Login-Logik für verschiedene Authentifizierungsmethoden
- ✅ **Splitting zwischen Login und Connection-Management** implementiert
#### **2. Workflow-UI-Module**
| Modul | Datei | Zeilen | Status | Beschreibung |
|-------|-------|--------|--------|--------------|
| **Hauptkoordinator** | `workflow.js` | 818 | ✅ | Workflow-Orchestrierung |
| **UI-Komponenten** | `workflowUi.js` | 1602 | ✅ | Benutzeroberfläche |
| **Koordinationslogik** | `workflowCoordination.js` | 738 | ✅ | State Management |
| **Datenmanagement** | `workflowData.js` | 560 | ✅ | Datenhandling |
| **Hilfsfunktionen** | `workflowUtils.js` | 480 | ✅ | Utilities |
### **Modul-Testing (80% abgeschlossen)**
- ✅ **`test_workflow.py`** - Workflow-Tests implementiert
- ✅ **`test_method_signatures.py`** - Methoden-Signaturen validiert
- ✅ **`test_document_handover.py`** - Dokumentenübergabe getestet
---
## 🔄 **AKTUELLER STATUS: Workflow-Testing**
### **Schritt 1: Task Manager und Actions Call inklusive Handovers**
- ✅ **Task-Erstellung** implementiert und getestet
- ✅ **Action-Execution-System** vorhanden und funktionsfähig
- 🔄 **IN BEARBEITUNG**: Workflow-Ausführung und Handover-Testing
- ⏳ **AUSSTEHEND**: Vollständige End-to-End Workflow-Tests
---
## ❌ **NOCH OFFENE PUNKTE**
### **Kritische Punkte (Release-Blocker)**
1. **Workflow-Testing vervollständigen**
- Task Execution Testing
- Action Handover Testing
- Error Handling in Workflow-Kette
- Performance Testing mit großen Dokumenten
### **Wichtige Punkte (Sollte vor Release)**
2. **Frontend-Integration vervollständigen**
- Real-time Updates während Workflow-Ausführung
- Progress Indicators für lange Tasks
- Benutzerfreundliche Fehleranzeige
- Mobile Responsive Design
3. **Sicherheit und Validierung**
- Input Validation für alle User-Inputs
- Session-Management Testing
- Berechtigungsprüfung für alle Endpunkte
- Data Protection für sensible Daten
### **Nice-to-Have (Nach Release)**
4. **Performance-Optimierung**
- Intelligentes Caching
- Hintergrundverarbeitung für lange Tasks
- Memory und CPU-Optimierung
- Database Query-Optimierung
---
## 📋 **DETAILLIERTE RELEASE-CHECKLISTE**
### **Phase 1: Workflow-Testing**
- [ ] **Task Execution Testing**
- [ ] Vollständige Workflow-Ausführung testen
- [ ] Alle 8 Methoden in verschiedenen Kombinationen
- [ ] Fehlerbehandlung bei Methoden-Ausfällen
- [ ] Timeout-Handling für lange Operationen
- [ ] **Action Handover Testing**
- [ ] Übergabe zwischen Tasks validieren
- [ ] Datenpersistierung zwischen Schritten
- [ ] State Management bei Workflow-Unterbrechungen
- [ ] Recovery nach Fehlern
- [ ] **Performance Testing**
- [ ] Große Dokumente (PDF, Excel, PowerPoint)
- [ ] Komplexe Workflows mit mehreren Agenten
- [ ] Gleichzeitige Workflows
- [ ] Memory-Leak-Tests
### **Phase 2: Frontend-Integration**
- [ ] **Real-time Updates**
- [ ] Live-Updates während Workflow-Ausführung
- [ ] WebSocket-Integration für Echtzeit-Updates
- [ ] Progress-Bars für einzelne Tasks
- [ ] Status-Updates in UI
- [ ] **Error Handling**
- [ ] Benutzerfreundliche Fehleranzeige
- [ ] Retry-Mechanismen
- [ ] Fallback-Strategien
- [ ] Logging für Debugging
- [ ] **UI/UX Verbesserungen**
- [ ] Mobile Responsive Design
- [ ] Accessibility-Features
- [ ] Keyboard-Navigation
- [ ] Loading-States
### **Phase 3: Sicherheit & Validierung**
- [ ] **Input Validation**
- [ ] Alle User-Inputs validieren
- [ ] File-Upload-Sicherheit
- [ ] SQL-Injection-Schutz
- [ ] XSS-Schutz
- [ ] **Authentication & Authorization**
- [ ] Session-Management testen
- [ ] Token-Validierung
- [ ] Berechtigungsprüfung für alle Endpunkte
- [ ] Multi-Tenant-Isolation
- [ ] **Data Protection**
- [ ] Sensible Daten verschlüsseln
- [ ] Audit-Logging
- [ ] Data Retention Policies
- [ ] GDPR-Compliance
### **Phase 4: Deployment & Dokumentation**
- [ ] **API-Dokumentation**
- [ ] Vollständige API-Docs erstellen
- [ ] OpenAPI/Swagger-Specification
- [ ] Code-Beispiele
- [ ] Error-Code-Dokumentation
- [ ] **User Guide**
- [ ] Benutzerhandbuch für Workflow-Erstellung
- [ ] Video-Tutorials
- [ ] Best Practices
- [ ] Troubleshooting Guide
- [ ] **Deployment**
- [ ] Automatisierte Deployment-Pipeline
- [ ] Environment-Konfiguration
- [ ] Health-Checks
- [ ] Monitoring-Setup
---
## 🎯 **NÄCHSTE SOFORTIGE SCHRITTE**
### **Diese Woche (Priorität 1)**
1. **Workflow-Testing abschließen**
- Task Execution Testing vervollständigen
- Action Handover Testing
- Error Handling verbessern
2. **Frontend-Integration**
- Real-time Updates implementieren
- Progress Indicators hinzufügen
- Error Display verbessern
### **Nächste Woche (Priorität 2)**
3. **Sicherheit & Validierung**
- Input Validation
- Authentication Testing
- Data Protection
4. **Deployment-Vorbereitung**
- Dokumentation erstellen
- Deployment-Scripts
- Monitoring-Setup
---
## 🚀 **RELEASE-KRITERIEN**
### **Must-Have (Release-Blocker)**
- [ ] Alle Workflow-Tests erfolgreich
- [ ] Frontend-Integration funktionsfähig
- [ ] Sicherheitsvalidierung bestanden
- [ ] Performance-Kriterien erfüllt
### **Should-Have (Sollte vor Release)**
- [ ] Vollständige Dokumentation
- [ ] User Guide erstellt
- [ ] Monitoring implementiert
- [ ] Error Handling robust
### **Could-Have (Nach Release)**
- [ ] Performance-Optimierung
- [ ] Erweiterte Features
- [ ] Mobile App
- [ ] API für Drittanbieter
---
## 📞 **KONTAKT & ESCALATION**
**Projektleiter:** [Name]
**Technischer Leiter:** [Name]
**QA-Leiter:** [Name]
**Escalation-Path:**
1. Team Lead
2. Technical Lead
3. Project Manager
4. CTO
---
*Dieser Bericht wird täglich aktualisiert und spiegelt den aktuellen Stand des methodenbasierten AI-Agenten-Chat-Systems wider.*

View file

@ -1,176 +0,0 @@
# PowerOn Frontend Architektur & Spezifikation
## 1. Funktionsumfang des Frontends
Das Frontend der PowerOn-Plattform bietet folgende Kernfunktionen:
- **Multi-Agent Chat-Workflow**: Interaktive Chat-Oberfläche für die Steuerung von Workflows mit mehreren KI-Agenten.
- **Datei-Upload & -Verwaltung**: Nutzer können Dateien hochladen, anhängen, einsehen und herunterladen.
- **Prompt-Verwaltung**: Verwaltung und Nutzung von Prompt-Vorlagen für wiederkehrende Aufgaben.
- **Log- und Statusanzeige**: Fortschrittsanzeige, Fehler- und Statusmeldungen für Workflows.
- **Benutzer- und Mandantenverwaltung**: Admin-Funktionen zur Verwaltung von Usern und Mandanten.
- **Dynamische Datentabellen**: CRUD-Operationen (Create, Read, Update, Delete) für beliebige Entitäten über generische Tabellen und Formulare.
- **Authentifizierung**: Login via klassischem Account oder Microsoft-Account.
## 2. Struktur des Frontends
Das Frontend ist modular aufgebaut und besteht aus folgenden Hauptmodulen und -bereichen:
- **js/main.js**: Einstiegspunkt, Initialisierung der App und Navigation.
- **js/shared/**: Gemeinsame Module für State-Management, API-Calls, Navigation, Utilities, Authentifizierung, Formulargenerierung.
- **globalState.js**: Zentrale State-Verwaltung und Navigation.
- **apiCalls.js**: Konsolidierte Schnittstelle für Backend-Kommunikation.
- **formGeneric.js**: Generisches Modul für CRUD-Tabellen und Formulare.
- **msftCalls.js**: Microsoft-Authentifizierung und Status.
- **navigation.js**: Dynamische Navigation und Menü-Rendering.
- **utils.js**: Hilfsfunktionen (z.B. Toasts, UI-Feedback).
- **js/modules/**: Feature-spezifische Module (z.B. prompts.js, users.js, files.js).
- **public/htmlparts/**: HTML-Teile und Stylesheets für Layout, Navigation, Workflow, Formulare.
- **public/docu/**: Dokumentation und Spezifikationen.
## 3. Kommunikation mit dem Backend
Die gesamte Kommunikation mit dem Backend erfolgt konsolidiert über das Modul **apiCalls.js**. Dieses Modul bietet Funktionen für alle relevanten API-Endpunkte:
- **Workflows**: Starten, Fortsetzen, Stoppen, Status, Logs, Nachrichten, Löschen
- **Dateien**: Upload, Download, Löschen, Anhängen/Entfernen an Nachrichten
- **Prompts**: CRUD-Operationen für Prompt-Vorlagen
- **User/Mandanten**: Verwaltung von Benutzern und Mandanten
- **Generische Entitäten**: CRUD für beliebige Datentabellen
Alle API-Aufrufe sind asynchron und liefern Promises zurück. Fehlerbehandlung und Statusmeldungen werden zentral im Modul und über UI-Feedback (Toasts) gehandhabt.
## 4. Workflow-States (State Machine)
Die States eines Workflows sind in den Dateien @doc_statemachine_backend.md und @doc_statemachine_frontend.md ausführlich beschrieben. Die wichtigsten States sind:
- **null**: Kein Workflow aktiv
- **running**: Workflow läuft, Polling aktiv
- **completed**: Workflow abgeschlossen, UI bereit für neue Eingabe
- **failed**: Fehler aufgetreten, UI zeigt Fehler und Retry-Option
- **stopped**: Workflow wurde gestoppt, UI bietet Fortsetzen/Reset
Transitions und State-Änderungen werden sowohl im Backend als auch im Frontend synchronisiert und über Polling-Mechanismen aktuell gehalten.
## 5. Administrierung von Usern, Mandanten und Datentabellen
Die Administration erfolgt konsolidiert über das generische Modul **formGeneric.js**:
- **User- und Mandantenverwaltung**: CRUD-Tabellen und Formulare für Benutzer und Mandanten, inklusive Rechteverwaltung.
- **Datentabellen**: Beliebige Entitäten (z.B. Prompts, Dateien, Workflows) können als Tabelle mit Formularen verwaltet werden.
- **Features**:
- Tabellenansicht mit Filter, Sortierung, Pagination, Massenaktionen
- Formulare für Erstellen/Bearbeiten mit dynamischer Feldgenerierung
- Validierung und Transformation der Formulardaten
- Externe Buttons für "+ Neuen ... erstellen" können einfach angebunden werden
- Felder, die mit "_" beginnen oder Zeitstempel wie "created_at" werden automatisch ausgeblendet
## 6. Implementierung & Datenstruktur für das formGeneric Modul
**Hinweis:** Die folgenden Beispiele und Erklärungen beziehen sich exemplarisch auf die Tabelle **"prompt"**. Das Prinzip ist jedoch für alle mit formGeneric verwalteten Entitäten identisch.
### Was macht das Modul formGeneric?
Das Modul **formGeneric.js** stellt eine generische Lösung für die Verwaltung beliebiger Datentabellen im Frontend bereit. Es übernimmt:
- Das Laden, Anzeigen, Erstellen, Bearbeiten und Löschen (CRUD) von Datensätzen
- Die dynamische Generierung von Tabellen und Formularen anhand der gelieferten Datenstruktur
- Die Filterung, Sortierung, Paginierung und Massenaktionen in der Tabellenansicht
- Die Validierung und Transformation von Formulardaten (optional)
- Die Anbindung externer Buttons (z.B. "+ Neuen Prompt erstellen")
- Die automatische Ausblendung von Feldern, die mit "_" beginnen oder Zeitstempel wie "created_at" enthalten
- Die Berücksichtigung von Berechtigungen: Felder wie `_hideEdit`, `_hideDelete`, `_hideView` steuern, ob die jeweiligen Aktionen für einen Datensatz im UI angezeigt werden
- Die Rendering-Logik: Längere Felder wie "content" oder "description" werden als Textarea dargestellt, boolesche Felder als Checkbox, numerische Felder als Zahlenfeld
- Die dynamische Anpassung an die Datenstruktur: Die Felder werden aus dem ersten Element der Datenliste abgeleitet
### Immer vorhandene/unterstützte Parameter (pro Datensatz)
- **id**: Eindeutige ID des Datensatzes (wird immer angezeigt)
- **_**-Felder: Interne Felder, die mit "_" beginnen, werden in Tabellen und Formularen ausgeblendet
- **createdAt, updatedAt, created_at**: Zeitstempel werden automatisch ausgeblendet
- **_hideEdit, _hideDelete, _hideView**: Steuern, ob die jeweiligen Aktionen (Bearbeiten, Löschen, Anzeigen) im UI für diesen Datensatz angezeigt werden
- **Weitere Felder**: Werden dynamisch als Spalten und Formularfelder generiert, sofern sie nicht explizit ausgeschlossen sind
### Integration
Das Modul wird wie folgt initialisiert:
```js
window.genericEntityModule.init(globalState, {
entityType: 'prompt', // oder 'user', 'mandate', ...
apiEndpoint: {
get: api.getPrompts,
create: api.createPrompt,
update: api.updatePrompt,
delete: api.deletePrompt
},
listContainerId: 'prompts-list',
addButtonId: 'add-prompt-btn',
transformFormData: function(formData) { /* optional */ },
onItemCreated: function(item) { /* optional */ },
onItemUpdated: function(item) { /* optional */ },
onItemDeleted: function(id) { /* optional */ }
});
```
### Erwartete Datenstruktur (aus der Route/API)
Das Modul erwartet, dass die API-Endpoints Objekte mit folgender Struktur liefern (Beispiel Prompt):
```json
{
"id": 123,
"name": "Prompt-Name",
"description": "Beschreibung",
"content": "Prompt-Inhalt",
"createdAt": "2024-05-11T12:34:56Z",
"updatedAt": "2024-05-11T12:34:56Z",
"_internal": "...", // wird ignoriert
"_hideEdit": false, // steuert Bearbeiten-Button
"_hideDelete": false, // steuert Löschen-Button
"_hideView": false // steuert Anzeigen-Button
}
```
- Felder mit "_" am Anfang sowie Zeitstempel wie "createdAt", "updatedAt", "created_at" werden automatisch in Tabellen und Formularen ausgeblendet.
- Die Felder werden dynamisch aus dem ersten Element der Datenliste generiert.
- Für längere Felder wie "content" oder "description" wird automatisch ein Textarea verwendet.
- Checkboxen für boolesche Felder, Zahlenfelder für numerische Werte.
- Die Sichtbarkeit von Aktionen (Bearbeiten, Löschen, Anzeigen) wird pro Datensatz über die _hide*-Felder gesteuert.
### Erweiterbarkeit
- Das Modul kann für beliebige Entitäten verwendet werden, solange die API die Standard-CRUD-Methoden bereitstellt.
- Zusätzliche Aktionen (z.B. "Vorschau", "Spezial-Buttons") können über die Option `getItemActions` ergänzt werden.
- Die UI ist vollständig dynamisch und passt sich der gelieferten Datenstruktur an.
---
## 7. Workflow-UI: Darstellung und Datenfluss
Das Workflow-Modul im Frontend bildet die zentrale Chat- und Prozessansicht ab. Die wichtigsten UI-Elemente und deren Datenquellen sind:
- **Chatbereich**: Zeigt alle Nachrichten (user, agent, system) als Chat-Bubbles an. Die Nachrichten werden aus dem Backend über `/api/workflows/{workflowId}/messages` geladen und enthalten:
- `content`: Text der Nachricht
- `role`: user, assistant, agentName
- `documents`: Anhänge (Dateien, die angezeigt oder heruntergeladen werden können)
- `timestamp`, `status` (first, step, last)
- **Logpanel**: Zeigt den Fortschritt und Status des Workflows an. Die Logs werden aus `/api/workflows/{workflowId}/logs` geladen und enthalten:
- `message`: Logtext
- `progress`: Fortschritt (0-100%)
- `type`: info, warning, error
- `agentName`, `timestamp`
- **Prompt-Eingabe**: Textfeld für Nutzereingaben, Datei-Upload-Bereich, Start/Send-Button, Stop-Button
- **Dateianhänge**: Hochgeladene Dateien werden im UI angezeigt und können entfernt werden. Die Metadaten kommen aus `/api/files/upload` und den Nachrichtenobjekten.
- **Statusanzeige**: Zeigt den aktuellen Workflow-Status (running, completed, failed, stopped) an, basierend auf `/api/workflows/{workflowId}/status`.
- **Polling-Mechanismus**: Das Frontend pollt periodisch die Status-, Log- und Nachrichtenendpunkte, um die UI aktuell zu halten. Neue Nachrichten und Logs werden automatisch ergänzt.
- **Fehler- und Abschlusszustände**: Bei Fehlern oder Abschluss werden entsprechende UI-Elemente (z.B. Retry, Reset, neue Eingabe) angezeigt.
**Datenfluss:**
- Nach Start eines Workflows werden alle relevanten Daten (Nachrichten, Logs, Status) regelmäßig vom Backend geladen und im UI aktualisiert.
- Die Zuordnung von Nachrichten, Logs und Dateien erfolgt über IDs und Statusfelder.
- Die UI ist so gestaltet, dass sie den aktuellen Stand des Workflows und alle relevanten Aktionen für den Nutzer transparent darstellt.
---
**Letzte Aktualisierung:** 2024-05-11

View file

@ -1,717 +0,0 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PowerOn AI Platform - Status Update</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
margin: 0;
padding: 20px;
background: #f5f5f5;
color: #333;
}
.container {
max-width: 1200px;
margin: 0 auto;
background: white;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
overflow: hidden;
}
.header {
background: #2c3e50;
color: white;
padding: 30px;
text-align: center;
}
.header h1 {
margin: 0;
font-size: 2.5em;
font-weight: 300;
}
.header .subtitle {
font-size: 1.2em;
opacity: 0.9;
margin-top: 10px;
}
.progress-bar {
background: rgba(255,255,255,0.2);
height: 8px;
border-radius: 4px;
margin: 20px 0;
overflow: hidden;
}
.progress-fill {
background: #27ae60;
height: 100%;
width: 90%;
border-radius: 4px;
transition: width 0.3s ease;
}
.content {
padding: 40px;
}
.status-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
margin: 30px 0;
}
.status-card {
background: #f8f9fa;
border-radius: 6px;
padding: 25px;
border-left: 4px solid #6c757d;
transition: box-shadow 0.2s ease;
}
.status-card:hover {
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.status-card.completed {
border-left-color: #28a745;
}
.status-card.in-progress {
border-left-color: #ffc107;
}
.status-card.pending {
border-left-color: #dc3545;
}
.card-header {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.status-icon {
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 15px;
font-size: 20px;
color: white;
}
.status-icon.completed { background: #28a745; }
.status-icon.in-progress { background: #ffc107; }
.status-icon.pending { background: #dc3545; }
.card-title {
font-size: 1.3em;
font-weight: 600;
margin: 0;
}
.card-content {
color: #666;
line-height: 1.5;
}
.timeline {
margin: 40px 0;
}
.timeline h3 {
color: #2c3e50;
border-bottom: 2px solid #ecf0f1;
padding-bottom: 10px;
}
.timeline-item {
display: flex;
align-items: center;
margin: 20px 0;
padding: 15px;
background: #f8f9fa;
border-radius: 8px;
}
.timeline-marker {
width: 20px;
height: 20px;
border-radius: 50%;
margin-right: 20px;
flex-shrink: 0;
}
.timeline-marker.completed { background: #28a745; }
.timeline-marker.current { background: #ffc107; }
.timeline-marker.future { background: #6c757d; }
.timeline-content {
flex: 1;
}
.timeline-title {
font-weight: 600;
margin-bottom: 5px;
}
.timeline-description {
color: #666;
font-size: 0.9em;
}
.go-live-criteria {
background: #f8f9fa;
border: 1px solid #dee2e6;
border-radius: 6px;
padding: 25px;
margin: 30px 0;
}
.criteria-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin-top: 20px;
}
.criteria-item {
display: flex;
align-items: center;
padding: 10px;
background: white;
border-radius: 8px;
}
.criteria-checkbox {
width: 20px;
height: 20px;
margin-right: 15px;
border: 2px solid #28a745;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: bold;
}
.criteria-checkbox.completed {
background: #28a745;
}
.criteria-checkbox.pending {
background: #dc3545;
}
.footer {
background: #f8f9fa;
padding: 30px;
text-align: center;
color: #6c757d;
}
.highlight {
background: #f8f9fa;
padding: 20px;
border-radius: 6px;
margin: 20px 0;
border-left: 4px solid #6c757d;
}
.highlight h3 {
margin-top: 0;
color: #2c3e50;
}
/* Tab Styles */
.tabs {
display: flex;
border-bottom: 2px solid #dee2e6;
margin-bottom: 30px;
}
.tab {
padding: 15px 25px;
background: #f8f9fa;
border: none;
cursor: pointer;
font-size: 1.1em;
font-weight: 500;
color: #6c757d;
border-bottom: 3px solid transparent;
transition: all 0.2s ease;
}
.tab:hover {
background: #e9ecef;
color: #495057;
}
.tab.active {
background: white;
color: #2c3e50;
border-bottom-color: #2c3e50;
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
/* Flow Diagram Styles */
.flow-diagram {
background: white;
border: 1px solid #dee2e6;
border-radius: 6px;
padding: 25px;
margin: 20px 0;
}
.flow-step {
display: flex;
align-items: center;
margin: 15px 0;
padding: 15px;
background: #f8f9fa;
border-radius: 6px;
border-left: 4px solid #6c757d;
}
.flow-number {
width: 30px;
height: 30px;
background: #2c3e50;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
margin-right: 20px;
flex-shrink: 0;
}
.flow-description {
flex: 1;
}
.flow-title {
font-weight: 600;
margin-bottom: 5px;
color: #2c3e50;
}
.flow-details {
color: #666;
font-size: 0.9em;
}
/* Method Grid Styles */
.method-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 20px;
margin: 20px 0;
}
.method-card {
background: white;
border: 1px solid #dee2e6;
border-radius: 6px;
padding: 20px;
border-left: 4px solid #6c757d;
}
.method-card h4 {
margin: 0 0 10px 0;
color: #2c3e50;
font-size: 1.1em;
}
.method-card ul {
margin: 0;
padding-left: 20px;
color: #666;
font-size: 0.9em;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>🚀 PowerOn AI Platform</h1>
<div class="subtitle">Status Update - 10 Minuten Übersicht</div>
<div class="progress-bar">
<div class="progress-fill"></div>
</div>
<div style="font-size: 1.1em; margin-top: 10px;">
<strong>90% Fertigstellung</strong> - System funktionsfähig, finale Testphase<br>
<span style="font-size: 0.9em; opacity: 0.8;">Die letzten 10% beanspruchen 4-6 Wochen</span>
</div>
</div>
<div class="content">
<!-- Tab Navigation -->
<div class="tabs">
<button class="tab active" onclick="showTab('summary')">📊 Summary</button>
<button class="tab" onclick="showTab('details')">🔍 Details</button>
<button class="tab" onclick="showTab('outlook')">🚀 Ausblick</button>
</div>
<!-- Summary Tab -->
<div id="summary" class="tab-content active">
<div class="highlight">
<h3>🎯 Executive Summary</h3>
<p>Das methodenbasierte AI-Agenten-Chat-System ist zu <strong>90% fertiggestellt</strong> und befindet sich in der finalen Testphase. Die Kernfunktionalität ist implementiert, UI stabilisiert und alle Methoden sind funktionsfähig. Das System ist technisch bereit - wir optimieren nur noch die Stabilität und Performance für den Produktiveinsatz.</p>
</div>
<div class="status-grid">
<div class="status-card completed">
<div class="card-header">
<div class="status-icon completed"></div>
<h3 class="card-title">Backend (Gateway)</h3>
</div>
<div class="card-content">
<strong>100% abgeschlossen</strong><br>
• 8 spezialisierte Methoden implementiert<br>
• Workflow-Management mit Task-Orchestrierung<br>
• ServiceCenter für dynamische Methoden-Entdeckung<br>
• Vollständige API mit allen Routen<br>
• Multi-Provider AI-Integration
</div>
</div>
<div class="status-card completed">
<div class="card-header">
<div class="status-icon completed"></div>
<h3 class="card-title">Frontend</h3>
</div>
<div class="card-content">
<strong>95% abgeschlossen</strong><br>
<strong>JavaScript-Frontend:</strong> Pilot-Version (95% fertig)<br>
<strong>React-Frontend:</strong> Laufend nachgezogen<br>
• 11 spezialisierte Module<br>
• Workflow-UI (1.700+ Zeilen)<br>
• Responsive Design<br>
• MSFT/Google OAuth Integration
</div>
</div>
<div class="status-card in-progress">
<div class="card-header">
<div class="status-icon in-progress">🔄</div>
<h3 class="card-title">Workflow-Testing</h3>
</div>
<div class="card-content">
<strong>80% abgeschlossen</strong><br>
• Task-Erstellung ✅<br>
• Action-Execution ✅<br>
• IN BEARBEITUNG: End-to-End Workflows<br>
• AUSSTEHEND: Performance-Tests<br>
<br>
<strong>Kernthemen zu lösen:</strong><br>
• Reibungsloser Handover von Dokumenten zwischen Schritten<br>
• Stabilität der dynamischen Methoden (KI-gesteuert)
</div>
</div>
<div class="status-card pending">
<div class="card-header">
<div class="status-icon pending"></div>
<h3 class="card-title">Go-Live Vorbereitung</h3>
</div>
<div class="card-content">
<strong>30% abgeschlossen</strong><br>
• Sicherheitsvalidierung<br>
• Performance-Optimierung<br>
• Dokumentation<br>
• Deployment-Pipeline
</div>
</div>
</div>
<div class="timeline">
<h3>📅 Verbleibende Schritte zum Go-Live (6 Wochen)</h3>
<div class="timeline-item">
<div class="timeline-marker current"></div>
<div class="timeline-content">
<div class="timeline-title">Woche 1-2 (Kritisch)</div>
<div class="timeline-description">
1. <strong>Workflow-Testing abschließen</strong> - End-to-End-Tests vervollständigen<br>
2. <strong>Frontend-Finish</strong> - State Machine, Prompt in laufenden Chat, Multiple User Connections Microsoft/Google robust
</div>
</div>
</div>
<div class="timeline-item">
<div class="timeline-marker future"></div>
<div class="timeline-content">
<div class="timeline-title">Woche 3</div>
<div class="timeline-description">
3. <strong>Sicherheitsvalidierung</strong> - Input Validation, Authentication<br>
4. <strong>Performance-Optimierung</strong><br>
5. <strong>Dokumentation</strong> - API-Docs, User Guide
</div>
</div>
</div>
<div class="timeline-item">
<div class="timeline-marker future"></div>
<div class="timeline-content">
<div class="timeline-title">Woche 4</div>
<div class="timeline-description">
6. <strong>End-to-End Integration Tests</strong> - Vollständige Workflow-Ketten<br>
7. <strong>Performance & Stabilität</strong> - Produktions-System stabilisieren
</div>
</div>
</div>
<div class="timeline-item">
<div class="timeline-marker future"></div>
<div class="timeline-content">
<div class="timeline-title">Woche 5-6 (User Tests im ValueOn Team)</div>
<div class="timeline-description">
8. <strong>Test "Bewerbungsdossiers prüfen"</strong> und Chatbot "Produktedaten"<br>
9. <strong>Go-Live</strong>
</div>
</div>
</div>
</div>
<div class="go-live-criteria">
<h3>🎯 Go-Live-Kriterien</h3>
<div class="criteria-grid">
<div class="criteria-item">
<div class="criteria-checkbox completed"></div>
<span>Alle Methoden funktionsfähig</span>
</div>
<div class="criteria-item">
<div class="criteria-checkbox completed"></div>
<span>Workflow-Engine stabil</span>
</div>
<div class="criteria-item">
<div class="criteria-checkbox completed"></div>
<span>Frontend-Integration abgeschlossen</span>
</div>
<div class="criteria-item">
<div class="criteria-checkbox pending">!</div>
<span>Workflow-Tests erfolgreich</span>
</div>
<div class="criteria-item">
<div class="criteria-checkbox pending">!</div>
<span>Sicherheitsvalidierung bestanden</span>
</div>
<div class="criteria-item">
<div class="criteria-checkbox pending">!</div>
<span>Performance-Kriterien erfüllt</span>
</div>
</div>
</div>
<div class="highlight">
<h3>⏱️ Zeitplan (6 Wochen)</h3>
<ul style="margin: 0; padding-left: 20px;">
<li><strong>Woche 1-2:</strong> Workflow-Testing & Frontend-Finish (State Machine, Chat, Connections)</li>
<li><strong>Woche 3:</strong> Sicherheit, Performance & Dokumentation</li>
<li><strong>Woche 4:</strong> Finale Tests & Produktions-System stabilisieren</li>
<li><strong>Woche 5-6:</strong> User Tests im ValueOn Team & Go-Live</li>
<li><strong>Go-Live aktuelle Prognose:</strong> <strong>Ende September 2025</strong></li>
</ul>
</div>
</div>
<!-- Details Tab -->
<div id="details" class="tab-content">
<div class="highlight">
<h3>🔍 Technische Details</h3>
<p>Detaillierte Übersicht über die implementierten Komponenten und deren Funktionalität.</p>
</div>
<div class="flow-diagram">
<h3>🔄 Chat-Workflow Ablauf</h3>
<div class="flow-step">
<div class="flow-number">1</div>
<div class="flow-description">
<div class="flow-title">User Input & Prompt</div>
<div class="flow-details">Benutzer gibt Anfrage ein, wählt Agenten und lädt Dokumente hoch</div>
</div>
</div>
<div class="flow-step">
<div class="flow-number">2</div>
<div class="flow-description">
<div class="flow-title">Task Plan Generation</div>
<div class="flow-details">AI erstellt strukturierten Arbeitsplan mit spezifischen Tasks</div>
</div>
</div>
<div class="flow-step">
<div class="flow-number">3</div>
<div class="flow-description">
<div class="flow-title">Document Extraction</div>
<div class="flow-details">Automatische Extraktion und Chunking von Dokumenten (PDF, Office, etc.)</div>
</div>
</div>
<div class="flow-step">
<div class="flow-number">4</div>
<div class="flow-description">
<div class="flow-title">Action Execution</div>
<div class="flow-details">Spezialisierte Methoden führen Tasks aus (Web, SharePoint, AI, etc.)</div>
</div>
</div>
<div class="flow-step">
<div class="flow-number">5</div>
<div class="flow-description">
<div class="flow-title">Document Generation</div>
<div class="flow-details">Erstellung neuer Dokumente basierend auf den Ergebnissen</div>
</div>
</div>
<div class="flow-step">
<div class="flow-number">6</div>
<div class="flow-description">
<div class="flow-title">Result Aggregation</div>
<div class="flow-details">Zusammenführung aller Ergebnisse und Handover zwischen Schritten</div>
</div>
</div>
</div>
<div class="highlight">
<h3>🏗️ ServiceCenter Übersicht</h3>
<p>Das ServiceCenter ist die zentrale Komponente für die dynamische Methoden-Entdeckung und -Ausführung:</p>
<ul>
<li><strong>Dynamische Methoden-Entdeckung:</strong> Reflection-basierte Erkennung aller verfügbaren Services</li>
<li><strong>Einheitliche Schnittstelle:</strong> Standardisierte API für alle Methoden</li>
<li><strong>Dokumenten-Management:</strong> Zentrale Verwaltung von Uploads, Extraktion und Chunking</li>
<li><strong>AI-Call-Interface:</strong> Integration mit verschiedenen AI-Providern (OpenAI, Anthropic, lokale Modelle)</li>
<li><strong>Task-Orchestrierung:</strong> Koordination der Ausführung von komplexen Workflows</li>
</ul>
</div>
<div class="highlight">
<h3>⚙️ Verfügbare Methoden & Actions</h3>
<div class="method-grid">
<div class="method-card">
<h4>🌐 Web-Recherche</h4>
<ul>
<li>Web-Scraping</li>
<li>Suchmaschinen-Integration</li>
<li>Content-Extraktion</li>
</ul>
</div>
<div class="method-card">
<h4>📁 SharePoint</h4>
<ul>
<li>Dokumenten-Management</li>
<li>Suche & Indexierung</li>
<li>Schreib-Operationen</li>
</ul>
</div>
<div class="method-card">
<h4>📧 Outlook</h4>
<ul>
<li>E-Mail-Verwaltung</li>
<li>Ordner-Management</li>
<li>Kalender-Integration</li>
</ul>
</div>
<div class="method-card">
<h4>📄 Dokumente</h4>
<ul>
<li>PDF, Office, Bilder</li>
<li>AI-basierte Extraktion</li>
<li>Intelligentes Chunking</li>
</ul>
</div>
<div class="method-card">
<h4>🤖 AI-Integration</h4>
<ul>
<li>Multi-Provider Support</li>
<li>Prompt-Engineering</li>
<li>Kontext-basierte Antworten</li>
</ul>
</div>
<div class="method-card">
<h4>📊 Excel-Verarbeitung</h4>
<ul>
<li>Datenanalyse</li>
<li>Visualisierung</li>
<li>Berichterstattung</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Outlook Tab -->
<div id="outlook" class="tab-content">
<div class="highlight">
<h3>🚀 Zukünftige Entwicklungen</h3>
<p>Roadmap für die nächsten Entwicklungsphasen nach dem Go-Live.</p>
</div>
<div class="status-grid">
<div class="status-card pending">
<div class="card-header">
<div class="status-icon pending">🔮</div>
<h3 class="card-title">Workflow Manager</h3>
</div>
<div class="card-content">
<strong>Phase 2 (Q4 2025)</strong><br>
• Workflow Modellierung<br>
• Visueller Workflow-Designer<br>
• Template-Bibliothek
</div>
</div>
<div class="status-card pending">
<div class="card-header">
<div class="status-icon pending">🔗</div>
<h3 class="card-title">Kunden-Integration</h3>
</div>
<div class="card-content">
<strong>Phase 3 (Q1 2026)</strong><br>
• Voice Integration mit SPITCH<br>
• Nahtlose Integration in Kundensysteme<br>
• My-Connectors für ERP/CRM<br>
• Business Intelligence Tools
</div>
</div>
<div class="status-card pending">
<div class="card-header">
<div class="status-icon pending"></div>
<h3 class="card-title">Automatisierung</h3>
</div>
<div class="card-content">
<strong>Phase 4 (Q2 2026)</strong><br>
• Automatisierte Workflows mit Triggers<br>
• Event Handler Integration<br>
• Scheduled Tasks<br>
• Proaktive Benachrichtigungen
</div>
</div>
<div class="status-card pending">
<div class="card-header">
<div class="status-icon pending">🌍</div>
<h3 class="card-title">Skalierung</h3>
</div>
<div class="card-content">
<strong>Phase 5 (Q3+4 2026)</strong><br>
• Multi-Tenant Architektur<br>
• Internationale Expansion<br>
• Agenten-Marktplatz<br>
• Branchenspezifische Lösungen
</div>
</div>
</div>
<div class="highlight">
<h3>🎯 My-Connectors Vision</h3>
<p>Die My-Connectors werden es Kunden ermöglichen, PowerOn nahtlos in ihre bestehenden Systeme zu integrieren:</p>
<ul>
<li><strong>ERP/CRM Integration:</strong> Direkte Verbindung zu SAP, Salesforce, Microsoft Dynamics</li>
<li><strong>Cloud-Services:</strong> Integration mit AWS, Azure, Google Cloud</li>
<li><strong>Datenbanken:</strong> Verbindung zu SQL, NoSQL, Graph-Datenbanken</li>
<li><strong>API-Management:</strong> Einheitliche Schnittstelle für alle externen Systeme</li>
<li><strong>Custom Connectors:</strong> Kundenspezifische Integrationen über SDK</li>
</ul>
</div>
</div>
</div>
<div class="footer">
<p><strong>PowerOn AI Platform</strong> - Methodenbasierter Multi-Agent AI-Chat</p>
<p>Status aktualisiert: August 2025 | Version: 2.1.0 | Patrick Motsch</p>
</div>
</div>
<script>
function showTab(tabName) {
// Hide all tab contents
const tabContents = document.querySelectorAll('.tab-content');
tabContents.forEach(content => {
content.classList.remove('active');
});
// Remove active class from all tabs
const tabs = document.querySelectorAll('.tab');
tabs.forEach(tab => {
tab.classList.remove('active');
});
// Show selected tab content
document.getElementById(tabName).classList.add('active');
// Add active class to clicked tab
event.target.classList.add('active');
}
</script>
</body>
</html>

View file

@ -1,740 +0,0 @@
# PowerOn Automation Unification — Business Specification
**Version:** 2.0
**Datum:** 2026-04-05
**Status:** Draft
---
## 1. Executive Summary
PowerOn enthält heute drei teilweise überlappende Systeme für die Automatisierung von Workflows. Die Ziel-Architektur konsolidiert diese zu einer einheitlichen Platform mit klaren Grenzen zwischen Services, Features und Shared Libraries.
**Leitprinzipien:**
- Keine Migration von Altdaten — Automation v1 ist nicht produktiv, wird nicht migriert
- Automation v1 bleibt bestehen, bis es durch das neue Feature abgelöst ist
- Klare Datenmodelle mit definierten State Machines als stabile, erweiterbare Grundlage
- Klare Trennung von Mandant/Feature/Feature-Instanz und zugehöriger RBAC-Logik
- Skalierbare AI-Tool-Architektur mit Toolboxes und Sub-Agents für 50100+ Tools
---
## 2. Ist-Analyse
### 2.1 Drei bestehende Systeme
| System | Modell | Stärke | Schwäche |
|--------|--------|--------|----------|
| **Automation v1** | Template + Cron + Placeholders | Stabiles, bewährtes Scheduling mit Callback-basiertem Sync, inkrementeller Job-Registrierung, Execution-Logs | Kein visuelles Editing, kein Branching, starres Template-Modell |
| **Automation2** | Graph-Editor (n8n-style) + Run/Task-Modell | Visuelles Modellieren, Branching, Loops, Human-in-the-loop, Pause/Resume, diverse Node-Typen | Kein AI-Chat im Editor, kein UDB-Zugang, Scheduler-Sync weniger robust als v1 |
| **AI Workspace** | Chat-driven AI Agent mit Tools | Natural-language Interaktion, 40+ Core Tools + Action Tools, Streaming, RAG | Kein persistiertes Workflow-Modell, kein Scheduling |
### 2.2 Wer nutzt die Method/Action Library?
Die `workflows/methods/` Library (methodAi, methodOutlook, methodSharepoint, etc.) ist bereits die de facto gemeinsame Basis. Alle Systeme nutzen `ActionExecutor.executeAction()`:
| Consumer | Pfad zur Action Library |
|----------|------------------------|
| **Workspace AI Agent** | `ActionToolAdapter` registriert `dynamicMode=True` Actions als Agent-Tools → LLM wählt Tool → `ActionExecutor` |
| **Automation2 Graph Engine** | `ActionNodeExecutor` liest `_method`/`_action` aus Node-Definition → `ActionExecutor` |
| **Automation v1** | `WorkflowProcessor``modeAutomation``ActionExecutor` |
| **Workspace Dynamic Mode** | `WorkflowProcessor``modeDynamic` → AI plant Tasks → `ActionExecutor` |
### 2.3 Wer nutzt die AI Tools?
| Tool-Typ | Registrierung | Nutzung |
|----------|--------------|---------|
| **Core Tools** (40: readFile, webSearch, sendMail, etc.) | `_registerCoreTools()` | Workspace Agent, CommCoach Agent |
| **Action Tools** (dynamicMode Actions) | `ActionToolAdapter.registerAll()` | Workspace Agent (toolSet-übergreifend) |
| **Graph Node Types** (ai.prompt, email.checkEmail, etc.) | `STATIC_NODE_TYPES` in `nodeDefinitions/` | Automation2 `executeGraph` |
**Benötigen die AI Tools die Method/Actions?** Ja, direkt. `ActionToolAdapter` transformiert jede `dynamicMode=True` Action in ein Agent-Tool. Und die Automation2-Nodes mappen über `_method`/`_action` auf dieselbe Library.
### 2.4 Identifizierte Inkonsistenzen
| # | Inkonsistenz |
|---|-------------|
| **I-1** | Zwei Datenmodelle: `AutomationDefinition` (v1) vs `Automation2Workflow` (v2) — kein gemeinsames Workflow-Konzept |
| **I-2** | Zwei Datenbanken: `poweron_automation` vs `poweron_automation2` |
| **I-3** | Zwei Scheduler: v1 (inkrementell, callback `automation.changed`) vs v2 (full wipe + re-register, callback `automation2.workflow.changed`) |
| **I-4** | Zwei Execution Engines: `WorkflowManager` + `WorkflowProcessor` vs `executionEngine.executeGraph` |
| **I-5** | Kein AI-Chat im Graphical Editor |
| **I-6** | `WorkspaceInput` ist nicht als wiederverwendbare Komponente extrahiert |
| **I-7** | UDB nur in Workspace und CommCoach, nicht im Graphical Editor |
| **I-8** | AI Tools skalieren nicht: 50+ Tools ohne Gruppierungslogik, alle werden dem LLM gleichzeitig exponiert |
---
## 3. Ziel-Architektur
### 3.1 Vier Säulen
```
┌──────────────────────────────────────────────────────────────────────┐
│ POWERON UNIFIED PLATFORM │
│ │
│ ┌─────────────┐ ┌──────────────────────┐ ┌──────────────────┐ │
│ │ AI Service │ │ Graphical Editor │ │ Automation │ │
│ │ (Säule 1) │ │ (Säule 2) │ │ Scheduler │ │
│ │ │ │ │ │ (Säule 3) │ │
│ │ • AI Gateway │ │ • Visual Flow Builder │ │ │ │
│ │ • Agent Loop │ │ • Node Palette │ │ • Cron Engine │ │
│ │ • Toolboxes │ │ • AI Chat Sidebar │ │ • Event Trigger │ │
│ │ • Sub-Agents │ │ • UDB Integration │ │ • Webhook Entry │ │
│ │ • Streaming │ │ • Tracing/Debug Log │ │ • Run History │ │
│ │ • Failover │ │ • Test Runner │ │ • Monitoring │ │
│ │ • Neutraliz. │ │ • Version Management │ │ • Notifications │ │
│ └──────┬───────┘ └──────────┬─────────────┘ └────────┬─────────┘ │
│ │ │ │ │
│ ┌──────▼──────────────────────▼───────────────────────────▼─────────┐ │
│ │ SÄULE 4: UNIFIED ACTION LIBRARY (Toolboxes) │ │
│ │ │ │
│ │ Toolbox "ai" │ Toolbox "email" │ Toolbox "files" │ │
│ │ ───────────── │ ────────────── │ ────────────── │ │
│ │ ai.process │ outlook.readEmails │ context.extract │ │
│ │ ai.webResearch │ outlook.searchEmails │ context.neutralize │ │
│ │ ai.summarize │ outlook.draftEmail │ file.create │ │
│ │ ai.translate │ outlook.sendDraft │ context.transform │ │
│ │ ai.generate │ │ │ │
│ │ │ │ │ │
│ │ Toolbox "sharepoint"│ Toolbox "clickup" │ Toolbox "jira" │ │
│ │ ─────────────────── │ ────────────── │ ───────────── │ │
│ │ sharepoint.findDoc │ clickup.searchTasks │ jira.connect │ │
│ │ sharepoint.readDocs │ clickup.createTask │ jira.exportTickets │ │
│ │ sharepoint.upload │ clickup.updateTask │ jira.importTickets │ │
│ │ ... │ ... │ ... │ │
│ │ │ │
│ │ Toolbox "trustee" │ Toolbox "chatbot" │ [future toolboxes] │ │
│ │ ────────────────── │ ────────────── │ │ │
│ │ trustee.extract │ chatbot.queryDB │ slack.sendMessage │ │
│ │ trustee.process │ │ teams.postChannel │ │
│ │ trustee.syncAcctng │ │ google.readDrive │ │
│ └───────────────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────────┘
```
### 3.2 Säule 1: AI Service (besteht, zu erweitern um Toolbox-Architektur)
**Status:** Kern bereit (`serviceAi` + `serviceAgent` + `aicore`).
**Erweiterung: Toolbox-Architektur für 50100+ Tools** → siehe Abschnitt 5.
### 3.3 Säule 2: Graphical Editor (Feature "graphicalEditor")
**Status:** Basis vorhanden (Automation2FlowEditor), zu erweitern.
**Funktionalität:**
1. **Visual Flow Builder** (besteht): Canvas, Nodes, Connections, Branching, Loops
2. **Node Palette** (besteht): Abgeleitet aus Toolbox-Registry — jede Toolbox-Action kann als Node exponiert werden
3. **AI Chat Sidebar** (neu): Agent mit Toolbox `"workflow"` für Graph-Manipulation
4. **UDB Integration** (neu): UnifiedDataBar im Editor
5. **Tracing/Debug Log** (zu erweitern): RunStepLog mit Input-Snapshot, Duration, Error pro Node
6. **Test Runner** (zu erweitern): Visual Highlighting, Step-by-Step, AI-assisted Debugging
7. **Version Management** (neu): Draft/Published Lifecycle
### 3.4 Säule 3: Automation Scheduler (zu konsolidieren)
**Status:** v1-Scheduling hat bewährte Patterns, die direkt in v2 übernommen werden.
**Von v1 übernehmen:**
- Inkrementeller Sync (nur geänderte Jobs registrieren/entfernen, nicht full wipe)
- Persistierter Job-Handle (`eventId`) auf dem Workflow für Debugging
- `automation.changed` Callback-Pattern für reaktive Synchronisation
- Handler lädt Workflow neu und prüft `active` vor Execution
- Execution-Logs als Audit Trail (capped auf 50 Einträge)
- Creator-User Tracking via `sysCreatedBy` für Execution-Kontext
**Von v2 beibehalten:**
- `IntervalTrigger` für einfache Wiederholungen
- Main-Loop-Bridging (`call_soon_threadsafe`) für Thread-Safety
- Delayed Startup Sync (5s) für DB-Readiness
- Striktes Cron-Parsing (5/6 Felder)
### 3.5 Säule 4: Unified Action Library mit Toolboxes
**Status:** Infrastruktur besteht (`workflows/methods/` + `methodDiscovery` + `ActionExecutor`). Zu erweitern um Toolbox-Konzept.
→ Detailliert in Abschnitt 5.
---
## 4. Mandant/Feature/RBAC-Architektur
### 4.1 Hierarchie
```
System (PowerOn Platform)
├── System Template Rollen (isSystemRole=true, mandateId=null, featureCode=null)
│ "admin", "user", "viewer"
│ → kopiert bei Mandant-Erstellung via copySystemRolesToMandate()
├── Feature Template Rollen (isSystemRole=false, mandateId=null, featureCode=X)
│ "workspace-admin", "workspace-user", "workspace-viewer"
│ "graphicalEditor-admin", "graphicalEditor-user", ...
│ → kopiert bei Feature-Instanz-Erstellung via _copyTemplateRoles()
├── Mandant (Tenant)
│ ├── Mandate-Rollen (kopiert von System Templates)
│ │ mandateId=X, featureInstanceId=null, featureCode=null
│ │ "admin", "user", "viewer"
│ │ └── UserMandateRole ← UserMandate ← User
│ │
│ ├── Feature-Instanz A (z.B. "AI Workspace Produktion")
│ │ ├── Feature-Instanz-Rollen (kopiert von Feature Templates)
│ │ │ mandateId=X, featureInstanceId=Y, featureCode="workspace"
│ │ │ "workspace-admin", "workspace-user", "workspace-viewer"
│ │ │ └── FeatureAccessRole ← FeatureAccess ← User
│ │ └── Daten (Workflows, Files, Chats, ...)
│ │
│ ├── Feature-Instanz B (z.B. "Graphical Editor Dev")
│ │ ├── Feature-Instanz-Rollen (kopiert von Feature Templates)
│ │ │ mandateId=X, featureInstanceId=Z, featureCode="graphicalEditor"
│ │ │ "graphicalEditor-admin", "graphicalEditor-user", ...
│ │ └── Daten (Workflows, Runs, Tasks, ...)
│ │
│ └── Feature-Instanz C (z.B. "Trustee Buchhaltung")
│ ├── Feature-Instanz-Rollen
│ └── Daten (Positionen, Belege, ...)
└── Feature Catalog (Global)
├── Feature "workspace" (code, label, icon)
├── Feature "graphicalEditor" (code, label, icon)
├── Feature "trustee" (code, label, icon)
└── ...
```
### 4.2 Zwei getrennte Template-Rollen-Systeme
Es gibt **zwei getrennte** Template-Systeme — diese sind **nicht** dieselben:
**System Template Rollen (für Mandanten)**
| Feld | Wert |
|------|------|
| `isSystemRole` | `true` |
| `mandateId` | `null` |
| `featureInstanceId` | `null` |
| `featureCode` | `null` |
| `roleLabel` | `"admin"`, `"user"`, `"viewer"` |
| Kopier-Mechanismus | `copySystemRolesToMandate()` in `interfaceBootstrap.py` |
| Ausgelöst bei | Mandant-Erstellung |
| Ziel-Rolle | `mandateId=X`, `featureInstanceId=null`, `isSystemRole=false` + kopierte AccessRules |
**Feature Template Rollen (für Feature-Instanzen)**
| Feld | Wert |
|------|------|
| `isSystemRole` | `false` |
| `mandateId` | `null` |
| `featureInstanceId` | `null` |
| `featureCode` | z.B. `"workspace"`, `"automation2"` |
| `roleLabel` | z.B. `"workspace-admin"`, `"workspace-user"`, `"workspace-viewer"` |
| Kopier-Mechanismus | `_copyTemplateRoles()` in `interfaceFeatures.py` |
| Ausgelöst bei | Feature-Instanz-Erstellung |
| Ziel-Rolle | `mandateId=X`, `featureInstanceId=Y`, `isSystemRole=false` + kopierte AccessRules |
**Wichtig:** Templates werden **nur bei Erstellung** kopiert. Spätere Änderungen werden **nicht** automatisch propagiert. (Ausnahme: `_syncTemplateRolesToDb()` synct neue UI-Objekte auf bestehende Mandate-Rollen mit gleichem `roleLabel`.)
### 4.3 RBAC-Resolution (Priority-System)
| Rollen-Typ | Scope | RBAC Priority |
|------------|-------|---------------|
| **Global/Template** | `mandateId=null, featureInstanceId=null` | 1 (niedrigste) |
| **Mandate-Rolle** | `mandateId=X, featureInstanceId=null` | 2 |
| **Instanz-Rolle** | `mandateId=X, featureInstanceId=Y` | 3 (höchste) |
**Resolution:**
1. Lade Mandate-Rollen (via `UserMandate``UserMandateRole`)
2. Lade Feature-Instanz-Rollen (via `FeatureAccess``FeatureAccessRole`)
3. Lade `AccessRules` für alle gefundenen Rollen
4. **Höchste Priorität gewinnt** bei DATA-Permissions (Instanz schlägt Mandant schlägt Global)
5. **View wird OR-verknüpft** über alle Rollen der höchsten Prioritätsstufe
6. **Item-Spezifität** innerhalb einer Stufe: exact > prefix > generic
### 4.3 AccessRule-Kontexte
| Kontext | Item-Beispiel | Prüft |
|---------|---------------|-------|
| `UI` | `ui.feature.graphicalEditor.editor` | Seitenleiste, Navigation, Buttons |
| `RESOURCE` | `resource.feature.graphicalEditor.execute` | Ausführungsberechtigungen |
| `DATA` | Auto-generiert aus Tabellenname + featureCode | CRUD auf Datenbank-Ebene |
### 4.4 Feature-Container-Pattern
Jedes Feature folgt einem einheitlichen Container-Pattern:
```
features/<featureName>/
├── main<FeatureName>.py ◄── Feature-Definition
│ ├── FEATURE_CODE = "<featureName>"
│ ├── UI_OBJECTS = [...] ◄── RBAC UI-Objekte
│ ├── RESOURCE_OBJECTS = [...] ◄── RBAC Resource-Objekte
│ ├── TEMPLATE_ROLES = [...] ◄── Rollen-Templates mit AccessRules
│ ├── REQUIRED_SERVICES = [...] ◄── Service-Dependencies
│ ├── registerFeature(catalog) ◄── Registriert Objekte + synct Rollen
│ └── getFeatureDefinition() ◄── Katalog-Metadaten
├── routeFeature<FeatureName>.py ◄── FastAPI Router (HTTP)
│ └── router = APIRouter(prefix="/api/<featureName>")
├── interfaceFeature<FeatureName>.py ◄── DB-Interface (CRUD + RBAC)
│ └── getInterface(user, mandateId, featureInstanceId)
├── datamodelFeature<FeatureName>.py ◄── Pydantic-Modelle
└── [optional] service<Name>/ ◄── Feature-spezifische Services
└── mainService<Name>.py
```
**Automatische Discovery:** `registry.py` scannt `features/*/routeFeature*.py` und `features/*/main*.py`. Routers werden automatisch gemountet, Features automatisch im Katalog registriert. Kein manuelles Wiring nötig.
---
## 5. AI-Tool-Architektur: Toolboxes und Sub-Agents
### 5.1 Problem: Tool-Explosion
Aktuell werden ~50 Tools dem LLM in einem einzigen Prompt exponiert. Bei 100+ Tools:
- LLM-Context wird überladen → schlechtere Tool-Auswahl
- Irrelevante Tools für den aktuellen Kontext → Confusion und Halluzinationen
- Keine Feature-isolierte Tool-Bereitstellung
### 5.2 Konzept: Toolboxes
Eine **Toolbox** ist eine thematisch gebündelte Gruppe von Tools mit einem klaren Scope. Toolboxes ersetzen das bisherige flache `_CORE_ONLY_TOOLS`-Set.
```
Toolbox-Registry
├── Toolbox "core" (immer verfügbar)
│ ├── readFile, listFiles, searchInFileContent
│ ├── writeFile, deleteFile, renameFile, copyFile
│ ├── listFolders, createFolder, deleteFolder
│ ├── webSearch, readUrl
│ └── detectLanguage, translateText
├── Toolbox "ai" (AI-Operationen)
│ ├── summarizeContent, describeImage
│ ├── generateImage, textToSpeech, speechToText
│ ├── renderDocument, createChart, executeCode
│ └── neutralizeData
├── Toolbox "datasources" (Externe Verbindungen)
│ ├── listConnections, browseDataSource, searchDataSource
│ ├── downloadFromDataSource, uploadToExternal
│ └── browseContainer, readContentObjects, extractContainerItem
├── Toolbox "email" (Outlook-Integration)
│ ├── sendMail
│ └── outlook.readEmails, outlook.searchEmails, outlook.draftEmail
├── Toolbox "sharepoint" (SharePoint-Integration)
│ └── sharepoint.findDoc, sharepoint.read, sharepoint.upload, ...
├── Toolbox "clickup" (ClickUp-Integration)
│ └── clickup.searchTasks, clickup.createTask, ...
├── Toolbox "jira" (Jira-Integration)
│ └── jira.connect, jira.exportTickets, ...
├── Toolbox "workflow" (Graph-Manipulation für Editor-Chat)
│ ├── readWorkflowGraph, addNode, removeNode
│ ├── connectNodes, setNodeParameter
│ ├── listAvailableNodeTypes, validateGraph
│ └── listWorkflowHistory, readWorkflowMessages
├── Toolbox "trustee" (Feature-spezifisch)
│ └── trustee.extract, trustee.process, trustee.syncAccounting
└── Toolbox "chatbot" (Feature-spezifisch)
└── chatbot.queryDatabase
```
### 5.3 Toolbox-Bereitstellung: Initiales Set + dynamische Eskalation
**Kern-Idee:** Der Agent startet mit einem kompakten, eingeschränkten Tool-Set. Er kennt aber den **Katalog aller verfügbaren Toolboxes**. Wenn er für eine Aufgabe Spezial-Tools braucht, kann er eine Toolbox **anfordern** — und bekommt sie in der nächsten Runde bereitgestellt.
**Warum nicht alle Tools sofort?**
- Bei 50100+ Tools wird der LLM-Context überladen → schlechtere Tool-Auswahl
- Irrelevante Tools führen zu Confusion und Halluzinationen
- Die meisten Interaktionen brauchen nur 1015 Core-Tools
**Mechanismus: `requestToolbox` Meta-Tool**
```
Runde 1:
Tools: core (readFile, webSearch, ...) + requestToolbox
System-Prompt enthält: "Verfügbare Toolboxes: email, sharepoint, clickup,
jira, workflow, ai, datasources, trustee, ..."
User: "Lies meine letzten Emails und fasse sie zusammen"
LLM: → requestToolbox("email") [braucht Email-Tools]
Runde 2:
Tools: core + email (sendMail, outlook_readEmails, outlook_searchEmails, ...)
+ requestToolbox
LLM: → outlook_readEmails(connectionRef, folder="Inbox", limit=10)
Runde 3:
LLM: → (Text-Antwort mit Zusammenfassung)
→ COMPLETED
```
**`requestToolbox` Tool-Definition:**
```python
{
"name": "requestToolbox",
"description": "Request additional specialized tools for the current task. "
"Call this when you need capabilities beyond your current tools.",
"parameters": {
"type": "object",
"properties": {
"toolboxId": {
"type": "string",
"description": "ID of the toolbox to activate",
"enum": [...] # Dynamisch: nur verfügbare Toolboxes
},
"reason": {
"type": "string",
"description": "Why you need this toolbox"
}
},
"required": ["toolboxId"]
}
}
```
**AgentConfig:**
```python
class AgentConfig(BaseModel):
maxRounds: int = 25
maxCostCHF: Optional[float] = None
initialToolboxes: List[str] = ["core"] # Initiales Set
availableToolboxes: List[str] = [] # Was angefordert werden darf
temperature: Optional[float] = None
```
**Konfiguration pro Feature:**
| Feature | `initialToolboxes` | `availableToolboxes` (anforderbar) |
|---------|--------------------|------------------------------------|
| **Workspace** | `["core"]` | `["ai", "datasources", "email", "sharepoint", "clickup", "jira", "workflow"]` — gefiltert nach User-Connections |
| **Graphical Editor Chat** | `["core", "workflow"]` | `["ai"]` |
| **CommCoach** | `["core"]` | `[]` (keine Eskalation erlaubt) |
| **Chatbot** | `["core"]` | `[]` |
**Vorteile:**
- **Lean Context:** Die meisten Chats brauchen nur Core-Tools → schnellere, präzisere Antworten
- **Selbst-navigierend:** LLM entscheidet selbst, wann Spezial-Tools nötig sind
- **Kontrolliert:** `availableToolboxes` limitiert, was der Agent anfordern darf (RBAC)
- **Skaliert:** 100+ Tools kein Problem — der LLM sieht immer nur was er gerade braucht
- **Transparent:** `requestToolbox("email", reason="User fragt nach Emails")` ist nachvollziehbar im Tracing
**Automatische Toolbox-Verfügbarkeit basierend auf Connections:**
Welche Toolboxes in `availableToolboxes` erscheinen, hängt von den aktiven User-Connections ab. Hat der User keine Outlook-Verbindung, erscheint `"email"` gar nicht in der Liste — der Agent kann sie auch nicht anfordern.
### 5.4 Sub-Agents (Feature Data Agents)
Für datenintensive Features mit eigenem Schema (z.B. Trustee Buchhaltung) existiert bereits das Sub-Agent-Pattern:
```
User Prompt im Workspace
Main Agent (Toolboxes: core, ai, datasources, ...)
├── Tool: queryFeatureInstance("trustee", instanceId, question)
│ │
│ ▼
│ Sub-Agent (Feature Data Agent)
│ Eigene ToolRegistry: browseTable, queryTable
│ Eigenes System-Prompt mit Schema-Wissen
│ Limitiert: maxRounds=5, maxCost=0.10 CHF
│ │
│ ▼
│ Antwort zurück an Main Agent
├── Tool: readFile(fileId)
│ (Core Tool, direkt)
└── Tool: outlook_readEmails(connectionRef)
(Action Tool, direkt)
```
**Empfehlung: Sub-Agent-Pattern ausweiten auf:**
- **Trustee** (besteht): browseTable, queryTable auf Buchhaltungsdaten
- **Workflow** (neu): Graph-Manipulation als Sub-Agent im Editor-Chat
- **Future Features** mit eigenem Datenmodell: Gleicher Pattern
**Vorteil:** Der Main Agent bleibt schlank. Feature-spezifisches Datenwissen ist im Sub-Agent gekapselt. Der LLM des Main Agents sieht nur ein einzelnes Tool (`queryFeatureInstance`) statt 10+ tabellenspezifische Tools.
### 5.5 State Machine: AI Agent Run (mit Toolbox-Eskalation)
```
┌──────────┐
│ IDLE │
└────┬─────┘
│ runAgent(prompt, initialToolboxes, availableToolboxes)
┌──────────┐
┌────►│ THINKING │◄──────────────────────────────────┐
│ └────┬─────┘ │
│ │ │
│ ├── LLM Response (Text only) ──────────────┼──► COMPLETED
│ │ │
│ └── LLM Response (ToolCalls) │
│ │ │
│ ▼ │
│ ┌────────────────────┐ │
│ │ EXECUTING_TOOLS │ │
│ └────┬───────────────┘ │
│ │ │
│ ├── requestToolbox(id) ───┐ │
│ │ ▼ │
│ │ ┌─────────────────────┐ │
│ │ │ TOOLBOX_ESCALATION │ │
│ │ │ Toolbox wird aktiviert│ │
│ │ │ Tools der nächsten │ │
│ │ │ Runde erweitert │ │
│ │ └──────────┬──────────┘ │
│ │ │ │
│ ├── Sub-Agent call ───┐ │ │
│ │ ▼ │ │
│ │ ┌──────────────┐│ │
│ │ │SUB_AGENT_CALL ││ │
│ │ └──────┬───────┘│ │
│ │ │ │ │
│ ├── Regular tools ─┼────────┼────────────────┘
│ │ (results → next round)
│ maxRounds / maxCost reached
┌──────────┐
│ COMPLETED │ (oder FAILED / CANCELLED)
└──────────┘
```
---
## 6. Use Cases
### UC-1: Datenquellen einbinden → besteht, keine Änderung
### UC-2: AI Workspace mit UDB → besteht, keine Änderung
### UC-3: Workflow im Workspace erstellen/bearbeiten
**Beschreibung:** User beschreibt im Workspace-Chat einen gewünschten Workflow → Agent nutzt Toolbox `"workflow"` → generiert Graph → speichert als Draft → User öffnet im Graphical Editor.
**Voraussetzung:** Die `"workflow"` Toolbox muss im Workspace aktivierbar sein. Die Tools validieren jeden Graph-Mutationsschritt:
- `addNode(type, parameters)` → prüft: existiert der Node-Typ? Sind die Parameter valide?
- `connectNodes(source, target)` → prüft: sind die I/O-Typen kompatibel? Keine Zyklen?
- `validateGraph()` → vollständige Validierung inkl. Trigger-Prüfung
### UC-4: AI Chat im Graphical Editor
**Beschreibung:** Der Graphical Editor hat eine Sidebar mit Chat. Der Agent nutzt Toolbox `"workflow"` mit speziellem System-Prompt, der den aktuellen Graph kennt. Er kann Nodes hinzufügen, entfernen, umkonfigurieren und den Graph erklären.
**Architektur:** Gleicher `serviceAgent.runAgent()` Pfad wie Workspace, aber:
- Anderes ToolSet: `toolboxes: ["core", "workflow"]`
- System-Prompt enthält den aktuellen Graph als Kontext
- Frontend: Extrahierte `ChatBar`-Komponente + `ChatStream`
### UC-5: Workflow testen mit Tracing Log
**Beschreibung:** User klickt "Test Run" → Graph wird ausgeführt → jeder Node wird visuell hervorgehoben (Status-Farben) → Tracing Log zeigt pro Node: Input, Output, Dauer, Fehler.
**Bei Fehlern:** User bespricht den Fehler im AI Chat → Agent liest den RunStepLog und schlägt Korrekturen vor.
**Technisch:**
- `RunStepLog` pro Node mit Timestamps, Input-Snapshot, Duration, Error-Stack
- SSE/WebSocket für Live-Updates des Node-Status
- Run-Modes: "Full Run" und "Step-by-Step" (Pause nach jedem Node)
### UC-6: Workflow automatisieren (Scheduler)
**Beschreibung:** User konfiguriert Schedule im Editor (via trigger.schedule Node oder Invocation) → konsolidierter Scheduler registriert Cron-Job → Run-History wird persistiert → bei Fehlern Notifications.
---
## 7. State Machines
### 7.1 Workflow Lifecycle
```
┌───────┐
create ──►│ DRAFT │◄──── edit (neuer graph)
└───┬───┘
│ publish
┌───────────┐
unpublish│ PUBLISHED │◄──── edit → erzeugt neuen Draft,
│ └───────────┘ Published bleibt aktiv
│ │
│ │ archive (manuell oder nach Deaktivierung)
│ ▼
│ ┌───────────┐
│ │ ARCHIVED │
│ └───────────┘
│ │
└───────┘ re-publish (aus Archiv zurückholen)
```
**Regeln:**
- Ein Workflow hat genau **eine** published Version (oder keine)
- Scheduled Runs nutzen immer die published Version
- Edit erzeugt immer einen neuen Draft — die published Version bleibt stabil
- Archive ist reversibel
### 7.2 WorkflowRun Lifecycle
```
┌─────────┐
executeGraph──►│ RUNNING │
└────┬────┘
┌────────────────┼────────────────┐
│ │ │
▼ ▼ ▼
┌─────────┐ ┌──────────┐ ┌────────┐
│ PAUSED │ │COMPLETED │ │ FAILED │
└────┬────┘ └──────────┘ └────────┘
│ resume (human task complete / email received)
┌─────────┐
│ RUNNING │ (Weiter ab pausiertem Node)
└────┬────┘
├──► COMPLETED
├──► FAILED
├──► PAUSED (nächster Input-Node)
└──► CANCELLED (manuell abgebrochen)
```
**Pause-Gründe:**
- `input.*` Node → HumanTask erstellt → wartet auf User-Eingabe
- `email.checkEmail` → wartet auf neue Email (Background Poller)
### 7.3 HumanTask Lifecycle
```
┌─────────┐
│ PENDING │ (erstellt bei Pause)
└────┬────┘
├── User completes → COMPLETED (Run wird resumed)
├── User cancels → CANCELLED (Run wird cancelled)
└── Timeout → EXPIRED (Run failsafe: cancel oder default)
```
### 7.4 Scheduler Job Lifecycle
```
┌─────────────┐
│ UNREGISTERED │ (Workflow exists, kein Schedule)
└──────┬──────┘
│ activate + publish mit schedule invocation
┌─────────────┐
│ REGISTERED │ (APScheduler Job aktiv, eventId gesetzt)
└──────┬──────┘
├── Cron fires → executeGraph → WorkflowRun
├── Workflow deactivated → UNREGISTERED (Job entfernt, eventId=null)
├── Schedule geändert → Job replaced (replaceExisting=true)
└── Workflow gelöscht → UNREGISTERED (Job entfernt)
```
---
## 8. Empfehlungen und offene Punkte
### 8.1 Starke Konzepte (umsetzen)
| Konzept | Bewertung |
|---------|-----------|
| **Toolbox-Architektur** | Skaliert von 50 auf 100+ Tools ohne LLM-Überlastung. Klare Isolierung pro Thema. |
| **Sub-Agents pro Feature** | Bewährtes Pattern (Trustee), erweiterbar. Hält Main Agent schlank. |
| **Validierungs-Layer für Workflow-Modellierung** | Graph-Mutation nur über validierte Tools. LLM kann keinen inkonsistenten Graph erzeugen. |
| **v1-Scheduling-Patterns in v2 übernehmen** | Inkrementeller Sync ist robuster als Full-Wipe. Execution-Logs sind essentiell für Audit. |
| **State Machines als Grundlage** | Klare Zustände, klare Übergänge. Erweiterbar ohne Breaking Changes. |
### 8.2 Was User brauchen, um das als zentrales Arbeitsinstrument zu nutzen
| User Need | Feature | Priorität |
|-----------|---------|-----------|
| **Schneller Einstieg** | Workflow-Templates für häufige Use Cases (z.B. "Email-Attachment → AI Analyse → SharePoint Upload") | Hoch |
| **Vertrauen** | Tracing Log + Test Runner — User muss sehen, was der Workflow tut | Hoch |
| **Effizienz** | AI-gestützte Workflow-Erstellung per Chat | Hoch |
| **Fehlertoleranz** | Retry-Policies, Pause/Resume, klare Fehlermeldungen | Hoch |
| **Kontext** | UDB im Editor — Zugriff auf Files/Sources bei der Konfiguration | Hoch |
| **Zusammenarbeit** | Workflows teilen im Mandant, Rollen-basierter Zugriff | Mittel |
| **Monitoring** | Dashboard: laufende Automationen, nächste Runs, Fehlerrate, Kosten | Mittel |
| **Flexibilität** | Custom Script Nodes (Python-Sandbox), AI Decision Nodes | Mittel |
| **Mobile** | Notifications + Approval-Tasks per Mobile | Phase 2 |
### 8.3 Offene Architektur-Fragen
| Frage | Empfehlung |
|-------|------------|
| **Toolbox-Selektion: statisch oder dynamisch?** | Hybrid: Basis-Toolboxes pro Feature statisch konfiguriert, Connection-basierte Toolboxes dynamisch aktiviert. |
| **Sub-Agent Tiefe: verschachtelt?** | Maximal 1 Level tief. Main Agent → Sub-Agent. Kein Sub-Sub-Agent (zu komplex, unkontrollierbar). |
| **Graph-Execution und WorkflowManager: zusammenführen?** | Nein, getrennt lassen. `executeGraph` für den Graphical Editor, `WorkflowManager` bleibt für den dynamischen Workspace-Modus. Verschiedene Orchestrierungsmodelle. |
| **Feature-Code: `automation2` → `graphicalEditor`?** | Ja, Rename in Phase 1. Klarer Name für User und Entwickler. |
---
## 9. Phasen-Plan
### Phase 1: Foundation
- Unified Workflow Datenmodell (Workflow + WorkflowVersion + WorkflowRun + RunStepLog + HumanTask)
- Toolbox-Registry implementieren (Ablösung `_CORE_ONLY_TOOLS`)
- ChatBar-Komponente extrahieren
- Feature Rename: `automation2``graphicalEditor`
- Scheduler konsolidieren (v1 Patterns in v2 Engine)
### Phase 2: Editor Enhancement
- AI Chat Sidebar im Editor (Toolbox `"workflow"` + Graph-Manipulation-Tools)
- UDB Integration im Editor
- WorkflowVersion Lifecycle (Draft/Published)
- Enhanced RunStepLog + Visual Tracing
### Phase 3: Productization
- Workflow Templates / Marketplace
- Monitoring Dashboard
- Retry Policies pro Node
- Notifications bei Scheduler-Fehlern
- Automation v1 Feature entfernen (wird nicht mehr benötigt)
### Phase 4: Advanced
- AI Decision Node (`ai.decide`)
- Custom Script Node (Python Sandbox)
- Dynamische Toolbox-Aktivierung basierend auf Connections
- Sub-Agent Pattern für weitere Features
---
## 10. Glossar
| Begriff | Definition |
|---------|-----------|
| **Toolbox** | Thematisch gebündelte Gruppe von AI-Tools, die kontextabhängig aktiviert werden |
| **Sub-Agent** | Spezialisierter Mini-Agent mit eigener Tool-Registry, aufgerufen vom Main Agent |
| **Workflow** | Persistiertes Automatisierungsmodell mit Graph-Struktur |
| **WorkflowVersion** | Immutable Snapshot eines Workflow-Graphen (draft, published, archived) |
| **WorkflowRun** | Einzelne Ausführung einer WorkflowVersion |
| **RunStepLog** | Detaillierter Log pro Node-Execution innerhalb eines Runs |
| **HumanTask** | Aufgabe für menschliche Eingabe, erstellt bei Pause eines Runs |
| **Node** | Ausführungsschritt im Graph (Trigger, Action, Flow-Control, Input/Human) |
| **Method** | Integrations-Kategorie (z.B. methodOutlook) mit mehreren Actions |
| **Action** | Spezifische Operation innerhalb einer Method (z.B. outlook.readEmails) |
| **Invocation** | Entry-Point für einen Workflow (Manual, Schedule, Webhook, Form, Event) |
| **UDB** | Unified Data Bar — Multi-Tab-Panel für Chats, Files und Sources |
| **ChatBar** | Wiederverwendbare Prompt-Input-Komponente |
| **Feature Container** | Einheitliches Verzeichnis-Pattern für ein Feature (main, route, interface, datamodel) |

View file

@ -1,994 +0,0 @@
# PowerOn Automation Unification — Datenmodell & Architektur
**Version:** 2.0
**Datum:** 2026-04-05
**Referenz:** [Automation Business Spec](./automation-business-spec.md)
---
## 1. Plattform-Architektur: Schichten
```
┌──────────────────────────────────────────────────────────────────┐
│ FRONTEND (React/TS) │
│ │
│ Shared Components: ChatBar, ChatStream, UnifiedDataBar, │
│ FlowEditor, FormGenerator, FolderTree │
│ │
│ Feature Pages: WorkspacePage, GraphicalEditorPage, │
│ CommcoachDossierView, ChatbotView, ... │
└──────────────────────────────┬────────────────────────────────────┘
│ HTTP/SSE/WebSocket
┌──────────────────────────────▼────────────────────────────────────┐
│ GATEWAY (FastAPI) │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ Layer 1: FEATURES (Feature-Instanz-gebunden) │ │
│ │ │ │
│ │ features/workspace/ features/graphicalEditor/ │ │
│ │ features/commcoach/ features/chatbot/ │ │
│ │ features/trustee/ features/realEstate/ │ │
│ │ features/neutralization/ features/teamsbot/ │ │
│ └──────────────────────────┬──────────────────────────────────┘ │
│ │ nutzt │
│ ┌──────────────────────────▼──────────────────────────────────┐ │
│ │ Layer 2: SERVICES (Feature-unabhängig, pro Request) │ │
│ │ │ │
│ │ serviceAgent serviceAi serviceKnowledge serviceBilling │ │
│ │ serviceChat serviceExtraction serviceGeneration │ │
│ │ serviceMessaging serviceWeb serviceSubscription │ │
│ └──────────────────────────┬──────────────────────────────────┘ │
│ │ nutzt │
│ ┌──────────────────────────▼──────────────────────────────────┐ │
│ │ Layer 3: SHARED INFRASTRUCTURE │ │
│ │ │ │
│ │ workflows/methods/ (Unified Action Library / Toolboxes)│ │
│ │ workflows/processing/ (ActionExecutor, methodDiscovery) │ │
│ │ workflows/automation2/ (Graph Execution Engine) │ │
│ │ interfaces/ (DB-Abstraktion + RBAC) │ │
│ │ aicore/ (Provider Plugins + Model Selector) │ │
│ │ datamodels/ (Pydantic Models) │ │
│ │ security/ (RBAC Engine) │ │
│ │ shared/ (Utilities, eventManagement) │ │
│ └─────────────────────────────────────────────────────────────┘ │
└───────────────────────────────────────────────────────────────────┘
```
---
## 2. Feature-Container-Pattern (Ist-Zustand, bewährt)
### 2.1 Verzeichnisstruktur
```
features/<featureName>/
├── main<FeatureName>.py ◄── Feature-Definition + Registrierung
│ FEATURE_CODE: str Feature-Identifikator
│ UI_OBJECTS: List[Dict] RBAC-fähige UI-Objekte
│ RESOURCE_OBJECTS: List[Dict] RBAC-fähige Resource-Objekte
│ TEMPLATE_ROLES: List[Dict] Rollen-Templates mit AccessRules
│ REQUIRED_SERVICES: List[Dict] Service-Dependencies (optional)
│ registerFeature(catalog) → bool Registriert Objekte, synct Rollen in DB
│ getFeatureDefinition() → Dict Katalog-Metadaten (Label, Icon)
│ get<Feature>Services(user, ...) → Hub Service-Hub-Factory (optional)
├── routeFeature<FeatureName>.py ◄── HTTP API
│ router = APIRouter(prefix="/api/<featureName>")
│ [templateRouter] = APIRouter(...) Zusätzliche Router (optional)
├── interfaceFeature<FeatureName>.py ◄── Datenbankzugriff
<Feature>Objects CRUD + RBAC-Filterung
│ getInterface(user, mandateId, featureInstanceId) → Singleton
├── datamodelFeature<FeatureName>.py ◄── Pydantic-Datenmodelle
│ class <Model>(PowerOnModel): ... Feature-spezifische Entitäten
├── nodeDefinitions/ (optional) ◄── Graph-Node-Typen (für graphicalEditor)
│ triggers.py, flow.py, ai.py, ...
└── service<Name>/ (optional) ◄── Feature-interne Services
└── mainService<Name>.py
```
### 2.2 Automatische Discovery
```python
# system/registry.py — Kein manuelles Wiring nötig
discoverFeatureContainers()
# Scannt features/*/routeFeature*.py → Liste von Feature-Dirs
loadFeatureRouters(app)
# Importiert routeFeature*.py, mountet router + *Router
loadFeatureMainModules()
# Importiert main*.py, cached
registerAllFeaturesInCatalog(catalogService)
# Für jedes main-Module:
# getFeatureDefinition() → catalogService.registerFeatureDefinition()
# registerFeature() → UI/Resource-Objekte + Template-Rollen sync
```
### 2.3 Service-Hub-Wiring
```python
# serviceHub/__init__.py — Dynamisches Service-Wiring
class ServiceHub:
def __init__(self, user, workflow, mandateId, featureInstanceId):
# ServiceCenterContext erstellen
self._serviceCenterContext = ServiceCenterContext(...)
# Core Interfaces laden
self.interfaceDbApp = getAppInterface(user, mandateId)
self.interfaceDbChat = getChatInterface(user, mandateId, featureInstanceId)
# Feature-Interfaces dynamisch laden (glob features/*/interfaceFeature*.py)
self._loadFeatureInterfaces()
# Feature-Services dynamisch laden (glob features/*/service*/mainService*.py)
self._loadFeatureServices()
def __getattr__(self, name):
# Lazy: shared services via getService(name, context) bei Erstzugriff
```
---
## 3. RBAC-Architektur
### 3.1 Zwei getrennte Template-Rollen-Systeme
**WICHTIG:** Es gibt zwei getrennte Template-Systeme — diese sind **nicht** dieselben:
```
┌────────────────────────────────────────────────────────────────────┐
│ TEMPLATE-ROLLEN (Global) │
│ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ System Templates (für Mandanten) Priority 1 │ │
│ │ isSystemRole=true, mandateId=null, featureCode=null │ │
│ │ │ │
│ │ "admin" → Mandant-Administration │ │
│ │ "user" → Standard-User │ │
│ │ "viewer" → Nur-Lesen │ │
│ │ │ │
│ │ → kopiert bei Mandant-Erstellung (copySystemRolesToMandate)│ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Feature Templates (für Feature-Instanzen) Priority 1 │ │
│ │ isSystemRole=false, mandateId=null, featureCode="workspace"│ │
│ │ │ │
│ │ "workspace-admin" → alle UI/RESOURCE/DATA Rechte │ │
│ │ "workspace-user" → eingeschränkte DATA Rechte │ │
│ │ "workspace-viewer" → nur View │ │
│ │ │ │
│ │ → kopiert bei Feature-Instanz-Erstellung (_copyTemplateRoles)│ │
│ └──────────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────┐
│ MANDATE-ROLLEN Priority 2 │
│ mandateId=X, featureInstanceId=null, featureCode=null │
│ │
│ "admin" (kopiert von System Template) │
│ "user" (kopiert von System Template) │
│ "viewer" (kopiert von System Template) │
│ → zugewiesen via UserMandate → UserMandateRole │
└────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────┐
│ INSTANZ-ROLLEN Priority 3 │
│ mandateId=X, featureInstanceId=Y, featureCode="workspace" │
│ │
│ "workspace-admin" (kopiert von Feature Template) │
│ "workspace-user" (kopiert von Feature Template) │
│ "workspace-viewer" (kopiert von Feature Template) │
│ → zugewiesen via FeatureAccess → FeatureAccessRole │
└────────────────────────────────────────────────────────────────────┘
```
### 3.2 Datenmodell RBAC
```python
class Role(PowerOnModel):
# Scope bestimmt die Priorität:
mandateId: Optional[str] # null = Global/Template
featureInstanceId: Optional[str] # null = nicht Instanz-spezifisch
featureCode: Optional[str] # z.B. "workspace", "graphicalEditor"
roleLabel: str # z.B. "workspace-admin"
isSystemRole: bool # System-Rollen nicht löschbar
class AccessRule(PowerOnModel):
roleId: str # FK → Role
context: AccessRuleContext # DATA | UI | RESOURCE
item: Optional[str] # null=generic, oder spezifisch
view: bool
read: Optional[AccessLevel] # "n" | "o" | "m" | "a"
create: Optional[AccessLevel]
update: Optional[AccessLevel]
delete: Optional[AccessLevel]
class AccessLevel(str, Enum):
NONE = "n" # kein Zugriff
OWN = "o" # nur eigene Records
MANDATE = "m" # alle Records im Mandant
ALL = "a" # alle Records (System-Admin)
```
### 3.3 User-Zuweisung
```
User ──► UserMandate ──► UserMandateRole ──► Role (Mandate-Scope)
User ──► FeatureAccess ──► FeatureAccessRole ──► Role (Instanz-Scope)
```
```python
class UserMandate(PowerOnModel):
userId: str
mandateId: str
class UserMandateRole(PowerOnModel):
userMandateId: str # FK → UserMandate
roleId: str # FK → Role (mandateId=X, featureInstanceId=null)
class FeatureAccess(PowerOnModel):
userId: str
featureInstanceId: str
enabled: bool
class FeatureAccessRole(PowerOnModel):
featureAccessId: str # FK → FeatureAccess
roleId: str # FK → Role (mandateId=X, featureInstanceId=Y)
```
### 3.4 Resolution-Algorithmus
```
1. Sammle roleIds:
- Mandate-Rollen: UserMandate → UserMandateRole → roleId
- Instanz-Rollen: FeatureAccess → FeatureAccessRole → roleId
2. Lade AccessRules für alle roleIds (context + item filter)
3. Bestimme Priorität pro Rolle:
- Priority 3: role.featureInstanceId gesetzt (Instanz)
- Priority 2: role.mandateId gesetzt (Mandant)
- Priority 1: beides null (Global/Template)
4. DATA-Permissions: Nur Rules der HÖCHSTEN Priorität zählen
View: OR über alle Rules der höchsten Priorität
Item-Spezifität: exact > prefix > generic (innerhalb Priorität)
5. SQL WHERE Clause: buildRbacWhereClause(permissions, user, table)
```
---
## 4. Unified Workflow Datenmodell
### 4.1 Entitäten
```python
# Ziel: datamodels/datamodelWorkflowUnified.py oder
# features/graphicalEditor/datamodelFeatureGraphicalEditor.py
class WorkflowStatus(str, Enum):
DRAFT = "draft"
PUBLISHED = "published"
ARCHIVED = "archived"
class Workflow(PowerOnModel):
"""Workflow-Metadaten und Ownership."""
id: str
mandateId: str
featureInstanceId: str
label: str
description: Optional[str]
tags: List[str] = []
isTemplate: bool = False
templateSourceId: Optional[str] # geklont von diesem Template
currentVersionId: Optional[str] # aktive/published Version
active: bool = True # Scheduler-enabled
eventId: Optional[str] # APScheduler Job-ID (v1-Pattern)
class WorkflowVersion(PowerOnModel):
"""Immutable Snapshot eines Workflow-Graphen."""
id: str
workflowId: str # FK → Workflow
versionNumber: int # auto-increment
status: WorkflowStatus # draft | published | archived
graph: Dict[str, Any] # { nodes: [...], connections: [...] }
invocations: List[Dict[str, Any]] # Entry-Points (manual, schedule, webhook, form)
publishedAt: Optional[float]
publishedBy: Optional[str]
```
### 4.2 State Machine: WorkflowVersion.status
```
┌───────┐
create ───►│ DRAFT │◄─── edit (graph mutation via API oder AI Tools)
└───┬───┘
│ publish
┌───────────┐
unpublish─►│ PUBLISHED │
(→ DRAFT) └─────┬─────┘
│ archive
┌───────────┐
│ ARCHIVED │──► re-publish (→ PUBLISHED)
└───────────┘
Invariante: Pro Workflow maximal 1 Version mit status=PUBLISHED.
Scheduler nutzt immer die PUBLISHED Version.
```
### 4.3 Run-Modell
```python
class RunStatus(str, Enum):
PENDING = "pending"
RUNNING = "running"
PAUSED = "paused"
COMPLETED = "completed"
FAILED = "failed"
CANCELLED = "cancelled"
class WorkflowRun(PowerOnModel):
"""Einzelne Ausführung einer WorkflowVersion."""
id: str
workflowId: str # FK → Workflow
versionId: str # FK → WorkflowVersion
status: RunStatus
trigger: Dict[str, Any] # { type: "manual"|"schedule"|"webhook"|..., metadata }
startedAt: float
completedAt: Optional[float]
nodeOutputs: Dict[str, Any] # Outputs pro Node-ID
currentNodeId: Optional[str] # Paused bei diesem Node
resumeContext: Dict[str, Any] # Kontext für Resume
error: Optional[str] # Top-Level Fehler
costTokens: Optional[int] # Aggregierte Token-Kosten
costCredits: Optional[float] # Aggregierte Credit-Kosten
```
### 4.4 State Machine: WorkflowRun.status
```
┌─────────┐
executeGraph──►│ RUNNING │
└────┬────┘
┌────────────────┼────────────────┐
│ │ │
▼ ▼ ▼
┌────────┐ ┌──────────┐ ┌────────┐
│ PAUSED │ │COMPLETED │ │ FAILED │
└───┬────┘ └──────────┘ └────────┘
│ resume(taskResult | emailReceived)
┌─────────┐
│ RUNNING │───► COMPLETED | FAILED | PAUSED | CANCELLED
└─────────┘
Pause-Gründe:
- input.* Node → HumanTask erstellt
- email.checkEmail → EmailWait (Background Poller)
Cancel:
- Manuell durch User
- Timeout bei HumanTask (expiresAt)
```
### 4.5 RunStepLog und HumanTask
```python
class StepStatus(str, Enum):
RUNNING = "running"
COMPLETED = "completed"
FAILED = "failed"
SKIPPED = "skipped"
class RunStepLog(PowerOnModel):
"""Detaillierter Log pro Node-Execution."""
id: str
runId: str # FK → WorkflowRun
nodeId: str # Node-ID im Graph
nodeType: str # z.B. "ai.prompt", "email.checkEmail"
status: StepStatus
inputSnapshot: Dict[str, Any] # Parameters + Upstream-Daten bei Execution
output: Optional[Dict[str, Any]] # Node-Output
error: Optional[str]
startedAt: float
completedAt: Optional[float]
durationMs: Optional[int]
tokensUsed: Optional[int] # AI-Calls in diesem Step
retryCount: int = 0
class TaskStatus(str, Enum):
PENDING = "pending"
COMPLETED = "completed"
CANCELLED = "cancelled"
EXPIRED = "expired"
class HumanTask(PowerOnModel):
"""Aufgabe für menschliche Eingabe bei Pause."""
id: str
runId: str # FK → WorkflowRun
workflowId: str # FK → Workflow (Convenience-FK)
nodeId: str
nodeType: str # input.approval, input.form, etc.
config: Dict[str, Any] # Node-Parameter (Formular-Felder, Approval-Text)
assigneeId: str
status: TaskStatus
result: Optional[Dict[str, Any]]
expiresAt: Optional[float] # Timeout
```
### 4.6 State Machine: HumanTask.status
```
┌─────────┐
│ PENDING │ (erstellt bei Run-Pause)
└────┬────┘
├── complete(result) → COMPLETED (Run wird resumed mit result)
├── cancel() → CANCELLED (Run wird cancelled)
└── expiresAt passed → EXPIRED (Run wird cancelled oder Default)
```
### 4.7 ER-Diagramm
```
┌──────────────────┐ ┌──────────────────────┐
│ Workflow │ 1───N │ WorkflowVersion │
├──────────────────┤ ├──────────────────────┤
│ id │ │ id │
│ mandateId │ │ workflowId (FK) │
│ featureInstanceId│ │ versionNumber │
│ label │ │ status │
│ description │ │ graph {} │
│ tags [] │ │ invocations [] │
│ isTemplate │ │ publishedAt │
│ currentVersionId ├───1──►│ publishedBy │
│ active │ └──────────┬───────────┘
│ eventId │ │ 1:N
└──────────────────┘ ┌──────────▼───────────┐
│ WorkflowRun │
├──────────────────────┤
│ id │
│ workflowId (FK) │
│ versionId (FK) │
│ status │
│ trigger {} │
│ startedAt │
│ completedAt │
│ nodeOutputs {} │
│ currentNodeId │
│ resumeContext {} │
│ error │
│ costTokens │
│ costCredits │
└──────────┬───────────┘
1:N │ │ 1:N
┌─────────────┘ └──────────┐
▼ ▼
┌──────────────────┐ ┌──────────────────┐
│ RunStepLog │ │ HumanTask │
├──────────────────┤ ├──────────────────┤
│ id │ │ id │
│ runId (FK) │ │ runId (FK) │
│ nodeId │ │ workflowId (FK) │
│ nodeType │ │ nodeId │
│ status │ │ nodeType │
│ inputSnapshot {} │ │ config {} │
│ output {} │ │ assigneeId │
│ error │ │ status │
│ startedAt │ │ result {} │
│ completedAt │ │ expiresAt │
│ durationMs │ └──────────────────┘
│ tokensUsed │
│ retryCount │
└──────────────────┘
```
---
## 5. AI-Tool-Architektur: Toolbox-Datenmodell
### 5.1 Toolbox-Definition
```python
# Ziel: serviceCenter/services/serviceAgent/toolboxRegistry.py
class ToolboxDefinition(BaseModel):
"""Definition einer thematischen Tool-Gruppe."""
id: str # z.B. "core", "email", "sharepoint", "workflow"
label: Dict[str, str] # Multilingual: {"en": "Email", "de": "E-Mail"}
description: str
featureCode: Optional[str] # null = Feature-unabhängig, "trustee" = Feature-spezifisch
tools: List[str] # Tool-Namen in dieser Toolbox
isDefault: bool = False # Immer aktiv (z.B. "core")
requiresConnection: Optional[str] # "outlook", "sharepoint" → auto-aktiviert bei Connection
class ToolboxRegistry:
"""Verwaltet Toolboxes und deren Zuordnung zu Tools."""
_toolboxes: Dict[str, ToolboxDefinition]
_toolRegistry: ToolRegistry # Referenz auf die bestehende ToolRegistry
def registerToolbox(self, toolbox: ToolboxDefinition): ...
def getActiveToolboxes(
self,
featureCode: str,
userConnections: List[str], # Aktive Connection-Typen des Users
explicitToolboxes: List[str], # Explizit aktivierte Toolboxes
) -> List[str]: ...
def getToolsForToolboxes(
self,
activeToolboxIds: List[str],
) -> List[ToolDefinition]: ...
```
### 5.2 AgentConfig (erweitert mit Eskalation)
```python
class AgentConfig(BaseModel):
maxRounds: int = 25
maxCostCHF: Optional[float] = None
initialToolboxes: List[str] = ["core"] # Tools bei Runde 1
availableToolboxes: List[str] = [] # Via requestToolbox anforderbar
temperature: Optional[float] = None
```
### 5.3 Dynamische Toolbox-Eskalation
**Kern-Idee:** Der Agent startet mit einem kompakten Initial-Set (`initialToolboxes`). Er kennt den Katalog aller `availableToolboxes`. Wenn er Spezial-Tools braucht, ruft er `requestToolbox(id)` auf — die Tools werden in der nächsten Runde bereitgestellt.
```
Runde 1:
Aktive Tools: core (readFile, webSearch, ...) + requestToolbox
System-Prompt: "Verfügbare Toolboxes: email, sharepoint, ai, ..."
User: "Lies meine letzten Emails und fasse sie zusammen"
LLM: → requestToolbox("email")
Runde 2:
Aktive Tools: core + email (outlook_readEmails, ...) + requestToolbox
LLM: → outlook_readEmails(connectionRef, folder="Inbox")
Runde 3:
LLM: → (Text-Antwort mit Zusammenfassung) → COMPLETED
```
**requestToolbox Meta-Tool:**
```python
{
"name": "requestToolbox",
"description": "Request specialized tools for the current task.",
"parameters": {
"toolboxId": {
"type": "string",
"enum": [...] # Dynamisch: nur availableToolboxes
},
"reason": {"type": "string"}
}
}
```
### 5.4 Toolbox-Registrierung (Architektur)
```
App Startup
├── _registerCoreTools(registry) → 40 Core-Tools in ToolRegistry
├── ActionToolAdapter.registerAll(registry) → dynamicMode Actions als Tools
└── ToolboxRegistry.registerAll()
├── Toolbox "core" → readFile, listFiles, webSearch, ... (isDefault=true)
├── Toolbox "ai" → summarizeContent, generateImage, ...
├── Toolbox "datasources" → browseDataSource, downloadFromDataSource, ...
├── Toolbox "email" → sendMail, outlook_readEmails, ... (requiresConnection="outlook")
├── Toolbox "sharepoint" → sharepoint_findDocumentPath, ... (requiresConnection="sharepoint")
├── Toolbox "clickup" → clickup_searchTasks, ... (requiresConnection="clickup")
├── Toolbox "jira" → jira_connectJira, ... (requiresConnection="jira")
├── Toolbox "workflow" → readWorkflowGraph, addNode, connectNodes, ...
├── Toolbox "trustee" → trustee_extractFromFiles, ... (featureCode="trustee")
└── Toolbox "chatbot" → chatbot_queryDatabase, ... (featureCode="chatbot")
Per Agent-Run:
├── Feature-Instanz Config → initialToolboxes + availableToolboxes
├── User Connections → filtert availableToolboxes (nur was User nutzen kann)
├── Runde 1: getToolsForToolboxes(initialToolboxes) + requestToolbox
└── Nach requestToolbox("email"):
Runde 2+: getToolsForToolboxes(initialToolboxes + ["email"]) + requestToolbox
```
### 5.5 Sub-Agent-Architektur
```python
# Bestehendes Pattern: featureDataAgent.py
# Aufruf-Kette:
# Main Agent → Tool "queryFeatureInstance" → _queryFeatureInstance()
# → runFeatureDataAgent(question, featureInstanceId, ...)
# → Eigene ToolRegistry (browseTable, queryTable)
# → runAgentLoop(prompt, registry, config=AgentConfig(maxRounds=5))
# → Antwort zurück → ToolResult → Main Agent
```
**Sub-Agents sind komplementär zu Toolboxes:**
- **Toolbox-Eskalation:** Agent bekommt Tools direkt und nutzt sie selbst (z.B. Email-Tools)
- **Sub-Agent:** Agent delegiert an spezialisierten Mini-Agent mit eigenem Wissen (z.B. Trustee DB-Schema)
Faustregel: Toolbox wenn die Tools generisch sind. Sub-Agent wenn Feature-spezifisches Kontext-/Schema-Wissen nötig ist.
### 5.6 Toolbox-Zuordnung pro Feature
| Feature | `initialToolboxes` | `availableToolboxes` (anforderbar) |
|---------|--------------------|------------------------------------|
| **Workspace** | `["core"]` | `["ai", "datasources", "email", "sharepoint", "clickup", "jira"]` — gefiltert nach User-Connections |
| **Graphical Editor Chat** | `["core", "workflow"]` | `["ai"]` |
| **CommCoach** | `["core"]` | `[]` (keine Eskalation) |
| **Chatbot** | (Eigenes Tool-System) | — |
---
## 6. Graph-Struktur und Node-Definitionen
### 6.1 Graph-Schema (innerhalb WorkflowVersion.graph)
```json
{
"nodes": [
{
"id": "node-uuid",
"type": "trigger.schedule",
"position": { "x": 100, "y": 200 },
"parameters": {
"cronExpression": "0 8 * * 1-5"
}
},
{
"id": "node-uuid-2",
"type": "ai.prompt",
"position": { "x": 300, "y": 200 },
"parameters": {
"prompt": "Analysiere die Emails und erstelle eine Zusammenfassung"
}
}
],
"connections": [
{
"source": "node-uuid",
"target": "node-uuid-2",
"sourceOutput": 0,
"targetInput": 0
}
]
}
```
### 6.2 Node-Definition-Schema
```python
# Jede Node-Definition ist ein Dict mit folgender Struktur:
{
"id": "ai.prompt", # Unique Node-Type-ID
"category": "ai", # Kategorie (für Palette-Gruppierung)
"label": {"en": "Prompt", "de": "Prompt"}, # Multilingual
"description": {"en": "...", "de": "..."},
"parameters": [
{
"name": "prompt",
"type": "string",
"required": True,
"description": {"en": "AI prompt", "de": "KI-Prompt"}
}
],
"inputs": 1, # Anzahl Eingänge
"outputs": 1, # Anzahl Ausgänge
"meta": {"icon": "mdi-robot", "color": "#9C27B0"},
# Interne Felder (nicht an Frontend exponiert):
"_method": "ai", # Method für ActionExecutor
"_action": "process", # Action für ActionExecutor
"_paramMap": {"prompt": "aiPrompt"}, # Parameter-Mapping Node → Action
}
```
### 6.3 Node-Type zu Method/Action Mapping
| Node Type | `_method` | `_action` | `_paramMap` |
|-----------|-----------|-----------|-------------|
| `trigger.manual` | — | — | — (TriggerExecutor) |
| `trigger.schedule` | — | — | — (TriggerExecutor) |
| `trigger.form` | — | — | — (TriggerExecutor) |
| `flow.ifElse` | — | — | — (FlowExecutor) |
| `flow.switch` | — | — | — (FlowExecutor) |
| `flow.loop` | — | — | — (FlowExecutor) |
| `input.*` | — | — | — (InputExecutor → HumanTask) |
| `ai.prompt` | `ai` | `process` | `prompt→aiPrompt` |
| `ai.webResearch` | `ai` | `webResearch` | `query→prompt` |
| `ai.summarizeDocument` | `ai` | `summarizeDocument` | — |
| `ai.translateDocument` | `ai` | `translateDocument` | `targetLanguage→targetLanguage` |
| `ai.generateDocument` | `ai` | `generateDocument` | `prompt→prompt` |
| `email.checkEmail` | `outlook` | `readEmails` | `connectionId→connectionReference` |
| `email.searchEmail` | `outlook` | `searchEmails` | `connectionId→connectionReference` |
| `email.draftEmail` | `outlook` | `composeAndDraft...` | `connectionId→connectionReference` |
| `sharepoint.*` | `sharepoint` | entsprechend | `connectionId→connectionReference` |
| `clickup.*` | `clickup` | entsprechend | `connectionId→connectionReference` |
| `file.create` | `file` | `create` | `template→template` |
### 6.4 Execution-Routing
```
executeGraph(graph, services, ...)
├── parseGraph() → nodes, connections, nodeIds
├── validateGraph() → Konsistenzprüfung
├── topoSort(nodes, connectionMap) → geordnete Node-Liste
└── Pro Node:
├── nodeType.startsWith("trigger.") → TriggerExecutor
│ → runEnvelope passthrough
├── nodeType.startsWith("flow.") → FlowExecutor
│ → ifElse: evaluiert Bedingung, setzt active path
│ → switch: evaluiert Match, setzt active path
│ → loop: iteriert mit _loopState
├── nodeType.startsWith("input.") → InputExecutor
│ → erstellt HumanTask
│ → setzt Run auf PAUSED
│ → raise PauseForHumanTaskError
└── nodeType.startsWith("ai." | "email." | "sharepoint." | ...) → ActionNodeExecutor
├── _getNodeDefinition(nodeType) → _method, _action, _paramMap
├── Parameter-Mapping (Node-Params → Action-Params)
├── Upstream-Daten mergen (documents von vorherigen Nodes)
└── ActionExecutor.executeAction(method, action, params)
```
---
## 7. Scheduler-Architektur (konsolidiert)
### 7.1 Konsolidierter Scheduler (Ziel)
```python
# Ziel: workflows/scheduler/mainScheduler.py
# Übernimmt die besten Patterns aus v1 und v2
class WorkflowScheduler:
"""Konsolidierter Scheduler für Workflow-Automationen."""
def start(self, eventUser):
"""Startup: Initial Sync + Delayed Sync + Callback Registration."""
eventManager.start()
self._syncScheduledWorkflows(eventUser)
self._registerDelayedSync(eventUser, delaySeconds=5)
callbackRegistry.register("workflow.changed",
lambda _: self._syncScheduledWorkflows(eventUser))
def stop(self, eventUser):
"""Shutdown: Cleanup."""
pass # APScheduler handles job cleanup
def _syncScheduledWorkflows(self, eventUser):
"""Inkrementeller Sync (v1-Pattern)."""
workflows = self._getAllSchedulableWorkflows()
for wf in workflows:
jobId = f"workflow.{wf.id}"
if wf.active and wf.currentVersionId:
# Register/Replace Job
version = self._getPublishedVersion(wf.currentVersionId)
cronKwargs = self._extractSchedule(version)
if cronKwargs:
handler = self._createHandler(wf, version, eventUser)
eventManager.registerCron(
jobId=jobId,
func=handler,
cronKwargs=cronKwargs,
replaceExisting=True # v1-Pattern: atomic replace
)
# Persist eventId on Workflow (v1-Pattern: debugging)
if wf.eventId != jobId:
self._updateEventId(wf.id, jobId)
else:
# Deactivated: Remove Job + Clear eventId
self._removeJob(jobId)
if wf.eventId:
self._updateEventId(wf.id, None)
def _createHandler(self, wf, version, eventUser):
"""Handler: Reload + Active-Check + Execute (v1-Pattern)."""
async def handler():
# Reload Workflow (v1-Pattern: Zustand könnte sich geändert haben)
current = self._getWorkflow(wf.id)
if not current or not current.active:
return
# Execute published version
services = self._buildServices(current, eventUser)
result = await executeGraph(
graph=version.graph,
services=services,
workflowId=current.id,
...
)
# Execution Log (v1-Pattern: capped audit trail)
self._appendExecutionLog(current.id, result)
# Thread-Bridge (v2-Pattern)
return self._wrapAsync(handler)
```
### 7.2 Scheduler State Machine
```
Workflow.active=false ──► UNREGISTERED (kein APScheduler Job)
│ activate + published version mit schedule invocation
Workflow.active=true ──► REGISTERED (eventId gesetzt, Job aktiv)
├── Cron fires → handler() → executeGraph → WorkflowRun
├── Workflow deactivated → remove job → UNREGISTERED (eventId=null)
├── Schedule geändert → replaceExisting=true → REGISTERED (neuer Trigger)
└── Workflow gelöscht → remove job → (Workflow gelöscht)
```
---
## 8. Backend Code-Struktur (Ziel)
```
gateway/modules/
├── features/
│ ├── graphicalEditor/ ◄── NEUES FEATURE (ersetzt automation2)
│ │ ├── mainGraphicalEditor.py
│ │ │ FEATURE_CODE = "graphicalEditor"
│ │ │ UI_OBJECTS = [
│ │ │ "ui.feature.graphicalEditor.editor",
│ │ │ "ui.feature.graphicalEditor.workflows",
│ │ │ "ui.feature.graphicalEditor.tasks",
│ │ │ ]
│ │ │ RESOURCE_OBJECTS = [
│ │ │ "resource.feature.graphicalEditor.execute",
│ │ │ "resource.feature.graphicalEditor.schedule",
│ │ │ ]
│ │ │ TEMPLATE_ROLES = [
│ │ │ "graphicalEditor-admin",
│ │ │ "graphicalEditor-user",
│ │ │ "graphicalEditor-viewer",
│ │ │ ]
│ │ │
│ │ ├── routeFeatureGraphicalEditor.py
│ │ │ router prefix: /api/workflows
│ │ │ Endpoints: CRUD Workflows, Versions, Execute, Runs, Tasks, NodeTypes, Chat
│ │ │
│ │ ├── interfaceFeatureGraphicalEditor.py
│ │ │ DB: poweron_workflows (oder poweron_automation2 renamed)
│ │ │ Tables: Workflow, WorkflowVersion, WorkflowRun, RunStepLog, HumanTask
│ │ │
│ │ ├── datamodelFeatureGraphicalEditor.py
│ │ │ Workflow, WorkflowVersion, WorkflowRun, RunStepLog, HumanTask
│ │ │ WorkflowStatus, RunStatus, StepStatus, TaskStatus (State Machines)
│ │ │
│ │ └── nodeDefinitions/
│ │ triggers.py, flow.py, input.py, ai.py, email.py, sharepoint.py, clickup.py, file.py
│ │
│ ├── workspace/ ◄── BLEIBT (AI Chat mit UDB)
│ ├── automation/ ◄── BLEIBT bis Ablösung durch graphicalEditor
│ ├── commcoach/ ◄── BLEIBT
│ ├── chatbot/ ◄── BLEIBT
│ ├── trustee/ ◄── BLEIBT
│ └── ...
├── serviceCenter/services/
│ ├── serviceAgent/
│ │ ├── mainServiceAgent.py ◄── Core Tools + Toolbox-Tagging
│ │ ├── agentLoop.py ◄── Toolbox-Filtering statt toolSet
│ │ ├── toolRegistry.py ◄── BLEIBT
│ │ ├── toolboxRegistry.py ◄── NEU: Toolbox-Verwaltung
│ │ ├── actionToolAdapter.py ◄── BLEIBT (+ Toolbox-Zuordnung)
│ │ ├── featureDataAgent.py ◄── BLEIBT (Sub-Agent Pattern)
│ │ └── datamodelAgent.py ◄── toolboxes: List[str] statt toolSet
│ └── ...
├── workflows/
│ ├── methods/ ◄── BLEIBT (Unified Action Library)
│ ├── processing/ ◄── BLEIBT (ActionExecutor, methodDiscovery)
│ ├── automation2/ ◄── Graph Engine BLEIBT (execution, executors, graphUtils)
│ ├── scheduler/ ◄── NEU (konsolidierter Scheduler)
│ │ └── mainScheduler.py
│ ├── automation/ ◄── BLEIBT bis Ablösung
│ └── workflowManager.py ◄── BLEIBT (für Workspace Dynamic Mode)
└── ...
```
---
## 9. Frontend Code-Struktur (Ziel)
```
frontend_nyla/src/
├── components/ ◄── SHARED COMPONENTS
│ ├── ChatBar/ ◄── NEU (extrahiert aus WorkspaceInput)
│ │ ├── ChatBar.tsx Props: onSend, onStop, onVoice,
│ │ │ fileAttachments, showProviderSelector,
│ │ │ showVoice, placeholder
│ │ ├── ChatBar.module.css
│ │ └── index.ts
│ │
│ ├── ChatStream/ ◄── NEU (extrahiert aus workspace/ChatStream)
│ │ ├── ChatStream.tsx SSE-driven message stream, wiederverwendbar
│ │ └── index.ts
│ │
│ ├── UnifiedDataBar/ ◄── BLEIBT
│ │
│ ├── FlowEditor/ ◄── RENAMED von Automation2FlowEditor
│ │ ├── editor/
│ │ │ ├── FlowEditor.tsx + AI Chat Panel (ChatBar + ChatStream)
│ │ │ ├── FlowCanvas.tsx + Visual Run Tracing
│ │ │ ├── EditorChatPanel.tsx ◄── NEU
│ │ │ └── ...
│ │ └── ...
│ │
│ └── ...
├── pages/views/
│ ├── workspace/
│ │ ├── WorkspacePage.tsx Nutzt ChatBar, ChatStream, UDB
│ │ └── ...
│ │
│ ├── graphicalEditor/ ◄── RENAMED von automation2
│ │ ├── GraphicalEditorPage.tsx FlowEditor + UDB + ChatPanel
│ │ ├── WorkflowsListPage.tsx
│ │ └── TasksPage.tsx
│ │
│ └── ...
├── api/
│ ├── workflowApi.ts ◄── Konsolidiert (ersetzt automationApi + automation2Api)
│ └── ...
└── ...
```
---
## 10. Zusammenfassung: Architektur-Prinzipien
| Prinzip | Umsetzung |
|---------|-----------|
| **Feature-Container-Pattern** | Jedes Feature folgt dem gleichen Verzeichnis-Pattern mit automatischer Discovery. Kein manuelles Wiring. |
| **RBAC auf zwei Ebenen** | Mandate-Rollen (generell) + Instanz-Rollen (feature-spezifisch). Höchste Priorität gewinnt. |
| **State Machines als Grundlage** | WorkflowVersion, WorkflowRun, HumanTask und Scheduler haben klar definierte Zustände und Übergänge. |
| **Unified Action Library** | Eine Method/Action-Library für alle Consumers (Agent Tools, Graph Nodes, Workflow Processor). |
| **Toolboxes statt flache Tool-Liste** | Thematisch gruppierte Tools, kontextabhängig aktiviert. Skaliert auf 100+ Tools. |
| **Sub-Agents für Feature-Daten** | Main Agent bleibt schlank. Feature-spezifisches Wissen in dedizierten Sub-Agents. |
| **Keine Migration** | Direkte Implementierung auf Automation2-Basis. v1 bleibt bis Ablösung. |
| **Scheduler konsolidiert** | Beste Patterns aus v1 (inkrementell, eventId, reload+check) und v2 (interval, thread-bridge). |

View file

@ -1,263 +0,0 @@
---
name: Cursor-Style Chat Feature MVP
overview: Integration eines Cursor-artigen File-Editing-Chat-Features als neues Feature "codeeditor" im Gateway und der Nyla UI. Nutzt aicore-Modelle direkt, Chat-Datenmodelle vom Chatplayground, SSE-Streaming vom Chatbot-Feature. Nur Text-Dokumente (Markdown, JSON, YAML, Code). Dateien werden hochgeladen (kein SharePoint), spaeter mit virtuellen Folder-Tags strukturiert. Apply erzeugt neue lokale Dokument-Versionen.
todos:
- id: extend-workflow-mode
content: WorkflowModeEnum um WORKFLOW_CODEEDITOR erweitern in datamodelChat.py + FileContext/FileEditProposal Models
status: pending
- id: backend-feature-scaffold
content: "Feature-Scaffold: mainCodeeditor.py (Registrierung) + routeFeatureCodeeditor.py (Endpoints, Vorlage: chatplayground)"
status: pending
- id: file-context-manager
content: "fileContextManager.py: Hochgeladene Text-Dateien laden, Workspace-Snapshot erstellen (kein SharePoint)"
status: pending
- id: prompt-assembly
content: "promptAssembly.py: Cursor-artiger System Prompt Builder mit Datei-Kontext und Format-Instruktionen"
status: pending
- id: response-parser
content: "responseParser.py: AI-Antwort in Document-Segmente parsen (text, code_block, file_edit, etc.)"
status: pending
- id: frontend-feature-register
content: "FeatureView.tsx: codeeditor Views registrieren, CodeEditorPage + FileBrowserPanel + DiffPreviewPanel erstellen"
status: pending
- id: frontend-hooks
content: "useCodeEditor.ts Hook: Erweitert Playground-Pattern um File-Selection und Edit-Management"
status: pending
isProject: false
---
# MVP: Cursor-Style File-Editing Chat Feature ("CodeEditor")
## Professionelle Einschaetzung
### Kernfrage: aicore-Modelle direkt oder ueber Chat-Komponente?
**Empfehlung: Die bestehenden aicore-Modelle direkt nutzen** (nicht ueber eine externe Cursor-Chat-Komponente).
Begruendung:
- Die aicore-Infrastruktur (`aicoreModelRegistry`, `aicoreModelSelector`, Plugin-System) ist bereits produktionsreif mit Failover, Billing, RBAC und Multi-Provider-Support
- Eine externe Cursor-Komponente wuerde eine Abhaengigkeit schaffen, die schwer zu kontrollieren ist
- Der Mehrwert liegt nicht im LLM-Aufruf (den beherrscht aicore), sondern in der **Prompt-Orchestrierung** (System Prompt + Context + Tool Definitions) und dem **Response Parsing** (Antwort in Dokument-Segmente zerlegen)
- Der neue "Cursor-Style" Layer wird **auf aicore aufgebaut**, nicht neben oder statt aicore
### Was vom Chatplayground uebernommen werden kann
Sehr viel -- die Grundarchitektur ist ideal:
- **ChatWorkflow** Datenmodell: 1:1 wiederverwendbar (neuer `workflowMode: "CodeEditor"`)
- **ChatMessage** + **ChatDocument**: Vollstaendig wiederverwendbar fuer Chat-Verlauf und Datei-Referenzen
- **Polling-Mechanismus** (`getUnifiedChatData` mit `afterTimestamp`): Sofort nutzbar
- **SSE-Infrastruktur** (aus Chatbot-Feature): Kann fuer Echtzeit-Streaming aktiviert werden
- **PlaygroundPage UI-Pattern**: Resizable Two-Column Layout, Messages-Komponente, File-Upload, Input-Footer
- **Route-Pattern** (`routeFeatureChatplayground.py`): Als Vorlage fuer neue Feature-Route
- **Feature-Registrierung**: `VIEW_COMPONENTS` Registry in `FeatureView.tsx`, Backend `mainChatplayground.py`
### Was NEU gebaut werden muss
1. **File-Context-Manager** (Backend): Hochgeladene Text-Dateien als "Workspace" laden und als Kontext bereitstellen (kein SharePoint, spaeter virtuelle Folder-Tags)
2. **Prompt Assembly Service** (Backend): System Prompt mit File-Kontext und Cursor-artigen Instruktionen zusammenbauen
3. **Response Document Parser** (Backend): AI-Antwort in typisierte Dokument-Segmente zerlegen (text, code_block, file_edit, etc.)
4. **Diff-Preview UI** (Frontend): Text-Aenderungen als Diff anzeigen mit Accept/Reject
5. **File-List Panel** (Frontend): Hochgeladene Dateien auflisten und als Kontext auswaehlen (spaeter: virtuelle Folder-Tags)
6. **SSE-Integration** (Backend+Frontend): Echtzeit-Streaming ueber bestehende EventManager-Infrastruktur
---
## Architektur
```mermaid
flowchart TB
subgraph ui [Nyla UI - Frontend]
CodeEditorPage["CodeEditorPage\n(neue View)"]
FileList["FileListPanel\n(hochgeladene Dateien)"]
ChatPanel["ChatPanel\n(Messages + SSE)"]
DiffPreview["DiffPreviewPanel\n(Text-Diffs)"]
CodeEditorPage --> FileList
CodeEditorPage --> ChatPanel
CodeEditorPage --> DiffPreview
end
subgraph gw [Gateway - Backend]
Route["routeFeatureCodeeditor.py\n(FastAPI Endpoints)"]
SSE["SSE Stream Endpoint\n(EventManager)"]
FileCtx["fileContextManager.py\n(Text-Dateien laden)"]
PromptAsm["promptAssembly.py\n(System Prompt Builder)"]
RespParse["responseParser.py\n(Document Segmentation)"]
Route --> FileCtx
Route --> PromptAsm
PromptAsm --> AiService["serviceAi\n(bestehend)"]
AiService --> AiCore["aicore\n(ModelRegistry + Plugins)"]
RespParse --> Route
RespParse --> SSE
end
subgraph data [Datenspeicher]
DB["Gateway DB\n(interfaceDbComponent)\nHochgeladene Dateien"]
end
ChatPanel -->|"POST /api/codeeditor/.../start"| Route
ChatPanel -->|"GET .../stream (SSE)"| SSE
FileList -->|"GET .../files"| Route
DiffPreview -->|"POST .../apply"| Route
FileCtx --> DB
```
---
## MVP Scope: Konkrete Implementierung
### Backend: Gateway
**1. Neues Feature `codeeditor`**
- Datei: `gateway/modules/features/codeeditor/mainCodeeditor.py`
- Registrierung analog zu `mainChatplayground.py` (RBAC, Feature-Config)
**2. Routes**
- Datei: `gateway/modules/features/codeeditor/routeFeatureCodeeditor.py`
- Kopie von `routeFeatureChatplayground.py` als Basis, erweitert um:
| Endpoint | Methode | Beschreibung |
| -------------------------------------- | ------- | ---------------------------------------------------------- |
| `/{instanceId}/start` | POST | Workflow starten (nutzt `chatStart` mit mode `CodeEditor`) |
| `/{instanceId}/{workflowId}/stop` | POST | Workflow stoppen |
| `/{instanceId}/{workflowId}/stream` | GET | SSE-Stream fuer Echtzeit-Updates (Messages, Logs, Edits) |
| `/{instanceId}/{workflowId}/chatData` | GET | Fallback-Polling fuer Chat-Daten |
| `/{instanceId}/workflows` | GET | Workflows auflisten |
| `/{instanceId}/files` | GET | Hochgeladene Text-Dateien auflisten |
| `/{instanceId}/files/{fileId}/content` | GET | Text-Datei-Inhalt laden |
| `/{instanceId}/{workflowId}/apply` | POST | Aenderung als neue Dokument-Version speichern |
**3. WorkflowMode Erweiterung**
- Datei: `gateway/modules/datamodels/datamodelChat.py`
- Neuer Enum-Wert: `WORKFLOW_CODEEDITOR = "CodeEditor"` in `WorkflowModeEnum`
**4. File Context Manager**
- Datei: `gateway/modules/features/codeeditor/fileContextManager.py`
- Laedt hochgeladene Text-Dateien aus Gateway DB (`interfaceDbComponent`)
- Unterstuetzte Formate: `.md`, `.txt`, `.json`, `.yaml`, `.yml`, `.xml`, `.csv`, `.py`, `.js`, `.ts`, `.html`, `.css`, `.sql`
- Baut einen "Workspace-Snapshot": Dateiliste + Inhalte der vom User ausgewaehlten Dateien
- Validiert MIME-Types (nur text-basierte Dateien akzeptieren)
- Spaeter erweiterbar: virtuelle Folder-Tags pro Datei fuer Strukturierung
**5. Prompt Assembly**
- Datei: `gateway/modules/features/codeeditor/promptAssembly.py`
- Baut System Prompt nach Cursor-Muster (dokumentiert in `wiki/cursor-doc/doc_cursor_ai_agent_architecture.md`)
- Injiziert: Datei-Kontexte, Benutzer-Instruktionen, Antwort-Format-Vorgaben
- Nutzt `aiService.callAiContent()` oder `interfaceAiObjects.callWithTextContext()` als LLM-Aufruf
**6. Response Document Parser**
- Datei: `gateway/modules/features/codeeditor/responseParser.py`
- Parst AI-Antwort in typisierte Segmente: `text`, `code_block`, `code_reference`, `file_edit`
- Speichert Segmente als erweiterte `ChatMessage` Eintraege (mit `actionMethod: "codeeditor"`)
- Spezifikation: `wiki/cursor-doc/doc_cursor_response_json_structure.md`
### Frontend: Nyla UI
**7. Feature-Registrierung**
- Datei: `frontend_nyla/src/pages/FeatureView.tsx`
- Neuer Eintrag in `VIEW_COMPONENTS`:
```typescript
codeeditor: {
editor: CodeEditorPage,
workflows: WorkflowsPage, // wiederverwendet
}
```
**8. CodeEditorPage**
- Datei: `frontend_nyla/src/pages/views/codeeditor/CodeEditorPage.tsx`
- Drei-Panel-Layout (File-Browser links, Chat mitte, Diff-Preview rechts)
- Nutzt bestehende `Messages` Komponente, `useResizablePanels`, `usePlayground`-Pattern
**9. File List Panel**
- Datei: `frontend_nyla/src/components/CodeEditor/FileListPanel.tsx`
- Flache Liste der hochgeladenen Text-Dateien mit Checkbox-Auswahl
- Upload-Button fuer neue Dateien (Drag & Drop wiederverwendet aus Playground)
- Ausgewaehlte Dateien werden als Kontext an den Chat gesendet (analog `listFileId`)
- Spaeter erweiterbar: virtuelle Folder-Tags als Gruppierung
**10. Diff Preview Panel**
- Datei: `frontend_nyla/src/components/CodeEditor/DiffPreviewPanel.tsx`
- Zeigt `file_edit` Segmente aus der AI-Antwort als Text-Diff an
- Accept/Reject Buttons pro Aenderung
- Accept erzeugt neue Dokument-Version (POST `/{instanceId}/{workflowId}/apply`)
- MVP: einfacher Side-by-Side Text-Diff (kein vollstaendiger Code-Editor noetig)
**11. Hooks**
- Datei: `frontend_nyla/src/hooks/useCodeEditor.ts`
- Erweitert `useDashboardInputForm` Pattern um:
- `selectedFiles: string[]` (ausgewaehlte Kontext-Dateien)
- `pendingEdits: FileEdit[]` (vorgeschlagene Aenderungen)
- `applyEdit(editId)` / `rejectEdit(editId)` Aktionen
### Datenmodell-Erweiterungen
**12. Neue Pydantic Models** (in bestehendem `datamodelChat.py` oder eigenem File)
```python
class FileContext(BaseModel):
fileId: str
fileName: str
content: Optional[str] = None
mimeType: str
tags: List[str] = Field(default_factory=list) # virtuelle Folder-Tags (spaeter)
class FileEditProposal(BaseModel):
id: str = Field(default_factory=lambda: str(uuid.uuid4()))
fileId: str # Referenz auf bestehende Datei
fileName: str
operation: str # "edit" | "create"
oldContent: Optional[str] = None
newContent: str
diffSummary: Optional[str] = None # Kurzbeschreibung der Aenderung
status: str = "pending" # "pending" | "accepted" | "rejected"
class FileVersion(BaseModel):
id: str = Field(default_factory=lambda: str(uuid.uuid4()))
sourceFileId: str # Original-Datei
editProposalId: str # Referenz auf akzeptiertes FileEditProposal
newFileId: str # Neue Datei-Version in DB
createdAt: float = Field(default_factory=getUtcTimestamp)
```
---
## Entschiedene Design-Entscheide
1. **Datenquelle**: Hochgeladene Dateien im System (kein SharePoint). Spaeter: virtuelle Folder-Tags pro Datei fuer Strukturierung
2. **Dateitypen**: Nur Text-basierte Dokumente (Markdown, JSON, YAML, Code, etc.)
3. **Apply-Mechanismus**: Erzeugt neue lokale Dokument-Version in der DB (keine externe Synchronisation)
4. **Streaming**: SSE ueber bestehende `EventManager`-Infrastruktur aus dem Chatbot-Feature
---
## SSE-Integration (Details)
Nutzt die bestehende Infrastruktur aus `gateway/modules/features/chatbot/streaming/events.py`:
- **EventManager** Singleton: `get_event_manager()` - verwaltet async Queues pro Workflow
- **Event-Emission**: In `interfaceDbChat.createMessage()` und `createLog()` bereits eingebaut
- **Neuer SSE-Endpoint**: `GET /api/codeeditor/{instanceId}/{workflowId}/stream`
- **Event-Typen fuer CodeEditor**:
- `chatdata` (bestehend): Messages, Logs, Stats
- `file_edit` (neu): FileEditProposal Events fuer Echtzeit-Diff-Updates
- `file_version` (neu): Neue Datei-Version erstellt (nach Apply)
- **Frontend**: `useCodeEditor` Hook oeffnet `EventSource` statt Polling
- **Fallback**: `chatData` Polling-Endpoint bleibt als Fallback verfuegbar

File diff suppressed because it is too large Load diff

View file

@ -1,206 +0,0 @@
<!-- status: obsolete -->
<!-- archivedFrom: c-work/4-done/2026-04-graph-editor-node-config-fixes.md -->
<!-- archivedAt: 2026-04-23 -->
<!-- started: 2026-04-23 -->
<!-- obsoletedAt: 2026-04-23 -->
<!-- supersededBy: c-work/1-plan/2026-04-typed-generic-handover.md -->
<!-- component: gateway | frontend-nyla -->
<!-- relatedTo: c-work/4-done/2026-04-generic-graph-editor.md, c-work/4-done/2026-04-pwg-pilot-mietzinsbestaetigung-workflow.md -->
> **Obsolet — ersetzt durch [`c-work/1-plan/2026-04-typed-generic-handover.md`](../1-plan/2026-04-typed-generic-handover.md).**
>
> Dieser Plan behandelte die Symptome (Connection-Inheritance-Service, Wire-Source-Badge, attachmentBuilder-Alias) als Workarounds um den heuristischen `_wireHandover` herum. Die Diskussion vom 20260423 hat ergeben, dass das Modell selbst nicht trägt: der „Push"-Handover via `INPUT_EXTRACTORS` ist generisch nicht beherrschbar. Der Nachfolge-Plan ersetzt das durch ein **Pick-not-Push** Modell mit reichhaltigen statischen Schemas, harter Type-Validierung und expliziten DataRefs als einzigem Bindungs-Mechanismus. Drei Punkte aus diesem Plan (3-Modus `ConnectionPicker`, `attachmentBuilder` Renderer-Alias, FrontendType-Audit) wurden in den Nachfolger als Phase 6 übernommen.
# Graph-Editor: Connection-UX, Wire-Handover und Feld-Rendering bereinigen (obsolet)
## Beschreibung und Kontext
Der Graphical Editor (`graphicalEditor`-Feature) ist seit dem Generic-Graph-Editor-Refactor (`c-work/4-done/2026-04-generic-graph-editor.md`) auf typisierte Ports + Wire-Handover umgestellt. Beim Pilot-Workflow PWG Mietzinsbestaetigung (`local/temp/pwg-pilot-jahresmietzinsbestätigung.workflow (1).json`) zeigen sich vier konkrete Schwachstellen, die das User-Erlebnis im Editor brechen:
1. **Connection wird pro Node neu erfragt.** Im PWG-Workflow ist `n2.sharepoint.listFiles` mit `connection:msft:p.motsch@valueon.ch` konfiguriert. `n4.sharepoint.downloadFile` und `n10.email.draftEmail` haben dieselbe Authority (`msft`), aber `connectionReference: ""`. Der `_wireHandover` in `gateway/modules/workflows/automation2/executors/actionNodeExecutor.py` propagiert nur Port-Schema-Felder (`documents`, `emails`, ...) via `INPUT_EXTRACTORS` (`gateway/modules/features/graphicalEditor/portTypes.py`). `connectionReference` wird nirgends weitergereicht. Folge: jede Node fragt erneut nach Connection.
2. **`ConnectionPicker` immer als Dropdown.** `frontend_nyla/src/components/FlowEditor/nodes/frontendTypeRenderers/index.tsx` (`ConnectionPicker`, Z. 153198) rendert immer `<select>` und einen Hilfstext, wenn keine Connection da ist — aber **keinen Link** auf die User-Connections-Seite, und auch bei genau **einer** Connection bleibt es ein Dropdown statt einer Direktanzeige.
3. **Nicht alle Felder rendern sauber.** `email.draftEmail.attachments` deklariert `frontendType: attachmentBuilder` (`gateway/modules/features/graphicalEditor/nodeDefinitions/email.py:88`). In `FRONTEND_TYPE_RENDERERS` (`frontendTypeRenderers/index.tsx:608633`) gibt es **keinen** `attachmentBuilder`-Renderer → Fallback auf `TextInput`, das den JSON-Array stringifiziert anzeigt. `clickupList` / `clickupTask` mappen auf einen generischen `FolderPicker` (Plain-Textfeld), nicht auf einen echten ClickUp-Picker.
4. **Handovers zwischen Nodes sind nicht klar.** In der Property-Panel-Ansicht (`NodeConfigPanel.tsx`) ist die "Datenfluss"-Sektion in `<details>` versteckt und zeigt nur abstrakte Port-Schemas (`DocumentList`, `AiResult`). Es ist für den User unsichtbar, **welcher Parameter** automatisch via Wire befüllt wird, **aus welchem Upstream-Node** und mit welchem Feld. Dadurch entsteht der Eindruck, der User müsse alles selbst eingeben.
**Business-Treiber:** PWG-Pilot startet im Sommer 2026. Editor-UX muss verständlich sein, sonst kostet die Demo-Vorführung beim Kunden Vertrauen. Auch jeder weitere Workflow-Bauer (intern + Customer Onboarding) profitiert sofort.
**Risiko bei Nicht-Umsetzung:** PWG-Pilot-User (und Demo-Publikum) erlebt den Editor als „alles muss ich von Hand eintragen" und „Das System weiss nicht, dass ich nur einen Outlook habe". Schwer zu verkaufen.
**Abhaengigkeiten:** keine externen. Greift in bereits ausgelieferte (done) Komponenten ein:
- `c-work/4-done/2026-04-generic-graph-editor.md` (Typed-Port-System, Wire-Handover-Mechanik)
- `c-work/4-done/2026-04-pwg-pilot-mietzinsbestaetigung-workflow.md` (Pilot-Workflow + `email.draftEmail.attachments`)
## Fokus und kritische Details
- **Connection-Inheritance ist Greenfield-Erweiterung der Wire-Handover-Mechanik.** Der bestehende `_wireHandover` in `actionNodeExecutor.py` arbeitet auf der **direkten Vorgaenger-Node** und nur fuer Schema-Felder. Connection-Inheritance braucht einen anderen Algorithmus: **transitive Suche nach Authority** durch den Upstream-Pfad — aktuell verwendet noch keiner so etwas. Fragil: wenn mehrere Upstream-Pfade unterschiedliche Authorities ihrer User-Connection nutzen (z.B. `flow.merge` mit Outlook + ClickUp), darf nichts blind uebernommen werden.
- **Frontend- und Backend-Inheritance muessen konsistent sein.** Wenn das Frontend per Default einen Wert fuer `connectionReference` setzt (Auto-Fill), wird er beim Save persistiert und ist genauso explizit wie eine User-Wahl. Backend-Fallback ("wenn leer, suche Upstream") ist die zweite Verteidigungslinie fuer alte/manuell editierte Workflows. **Beides bauen, aber Frontend ist Hauptmechanismus** — sonst sieht der User auf dem Canvas nicht, dass die Node "weiss, was sie tun wird".
- **`ConnectionPicker` braucht 3 Modi.** Code muss klar zwischen den Faellen unterscheiden — kein Dropdown wenn 0 oder 1 Connection. Bei 0 Connections: Link auf `/profile/connections` (siehe `ConnectionsPage.tsx`) mit Authority-Vorausfilter und Rueckkehr-URL.
- **`attachmentBuilder` muss entweder echt gebaut oder zu `json` redirected werden.** Im Pilot-Plan (`c-work/4-done/2026-04-pwg-pilot-mietzinsbestaetigung-workflow.md`, Sub-Task 4b) wurde explizit "NICHT NÖTIG" entschieden — aber dann muss der Fallback wenigstens **`JsonEditor`** sein (kompakter Editor mit Syntax-Hint), nicht ein 1-zeiliges Text-Field. Pragmatisch: Alias `attachmentBuilder → json` registrieren, damit kein zweiter Renderer noetig ist.
- **`clickupList` / `clickupTask` Stubs** koennen separat gefixt werden (eigene Iteration), sind kein Blocker fuer den PWG-Pilot. Hier nur als bekannt-Stub markieren und auf `text` mit Hinweis "ClickUp-Picker tbd" mappen.
- **Datenfluss-Sichtbarkeit muss inline pro Parameter rendern**, nicht in einem versteckten `<details>`-Block. Pro Parameter, der per `INPUT_EXTRACTORS` aus dem Upstream-Output befuellbar ist, ein Badge `🔗 Wire: {srcNode} → {schemaField}`. Pro `connectionReference` mit gefundenem Upstream-Match: Badge `🔗 uebernommen aus {srcNode}`.
- **Keine Node-Type-spezifische Logik im Frontend.** Alle Inheritance-Regeln per Daten gesteuert: Backend liefert pro Parameter eine Liste `wireSources: [{nodeId, fieldPath, schema}]`, das Frontend rendert generisch. Sonst wird der Renderer wieder zu einer Sammlung von Spezialfaellen.
## Ziel und Nicht-Ziele
**Ziel:**
- Beim Anlegen einer neuen Node mit `connectionReference`-Parameter wird die Connection **automatisch vorbelegt**, wenn entweder (a) der User genau **eine** Connection mit passender `authority` hat oder (b) ein Upstream-Pfad bereits eine `connectionReference` derselben `authority` verwendet.
- `ConnectionPicker` zeigt 3 Zustaende:
- **0 Connections (passende Authority):** Link "Verbindung anlegen" -> `/profile/connections?authority=msft&returnTo=...`.
- **1 Connection:** Direktanzeige `[msft] p.motsch@valueon.ch` mit kleinem "Aendern"-Link, der das Dropdown sichtbar macht.
- **>1 Connections:** Dropdown wie heute.
- Backend-Fallback: ist beim Run `connectionReference` leer und es gibt **eindeutig** einen Upstream-Wert mit derselben Authority, wird er verwendet (und im `AutoStepLog.inputSnapshot` markiert: `"connectionReference_inferredFrom": "n2"`).
- `attachmentBuilder`-Felder rendern als `JsonEditor` (Alias-Mapping), bis ein dedizierter Builder gebaut wird — nicht mehr als 1-zeiliges Text-Field.
- Im Property-Panel sieht der User pro Parameter, ob er via Wire befuellt wird (Badge mit Quell-Node + Feldname). `connectionReference`-Parameter zeigen "uebernommen aus {nodeId}" wenn auto-inferred.
- API liefert pro Node-Inspector-Aufruf zusaetzlich eine `wireSources`-Map: pro Parameter-Name eine Liste der moeglichen/aktiven Wire-Quellen (basierend auf Graph + `INPUT_EXTRACTORS`).
**Explizit NICHT:**
- Keine Aenderung am Wire-Handover-Algorithmus fuer Schema-Felder (`documents`, `emails`, ...). Der bleibt wie er ist.
- Keine neuer Picker fuer `clickupList`/`clickupTask`. Diese bleiben als „bekannte Luecken" markiert; eigene Iteration.
- Kein dedizierter `AttachmentBuilder`-Renderer. Alias auf `JsonEditor` reicht. Wird in einer Folgeiteration nachgereicht, wenn Mehrnode-Cases das verlangen.
- Keine Migration alter Workflows. Wer leere `connectionReference` hat, profitiert ab sofort vom Backend-Fallback; wer eine fixierte (auch falsche) hat, behaelt sie.
- Keine Aenderung an der RBAC-/Permission-Schicht. User sieht nur Connections, die er ohnehin sehen darf (`getUserConnections(userId)` ist bereits user-scoped).
- Keine Persistenz der Inferenz-Entscheidung in der Workflow-DB. Inferenz ist immer Run-Time-Heuristik (Frontend setzt explizit, Backend faellt nur defensiv zurueck).
## Betroffene Module
- **Gateway:**
- `gateway/modules/workflows/automation2/executors/actionNodeExecutor.py` — neuer Helper `_inferConnectionFromUpstream(nodeDef, inputSources, nodeOutputs, allNodes, params)`, vor `_resolveConnectionParam` aufgerufen.
- `gateway/modules/features/graphicalEditor/routeFeatureGraphicalEditor.py``node-types`-Endpoint bzw. ein neuer `wire-sources`-Endpoint (oder Integration in `GET /{instanceId}/workflows/{workflowId}/wire-sources?nodeId=...`) liefert pro Node-Parameter die moeglichen Wire-Quellen.
- `gateway/modules/features/graphicalEditor/wireSourcesService.py` (NEU, klein) — Pure-Helper `computeWireSources(graph, nodeId)` der pro Parameter listet, woher Wire/Connection-Inheritance kommen koennten.
- **Frontend:**
- `frontend_nyla/src/components/FlowEditor/nodes/frontendTypeRenderers/index.tsx``ConnectionPicker` ueberarbeiten (3 Modi), `attachmentBuilder`-Alias auf `JsonEditor`, `clickupList`/`clickupTask` mit Hint-Text.
- `frontend_nyla/src/components/FlowEditor/editor/NodeConfigPanel.tsx` — pro Parameter Wire-Source-Badge inline rendern; "Datenfluss"-Sektion umbauen oder entfernen, wenn alles inline gezeigt wird.
- `frontend_nyla/src/components/FlowEditor/editor/Automation2FlowEditor.tsx` (oder dort, wo eine neue Node erzeugt wird) — Frontend-Auto-Fill: bei Add-Node mit `connectionReference`-Param + 1 passende Connection → vorbelegen; oder Upstream-Pfad scannen und passende `connectionReference` uebernehmen.
- `frontend_nyla/src/api/workflowApi.ts` — neue Wrapper fuer `wire-sources`-Endpoint.
- **DB-Migration:** **nein**.
- **Andere:** `wiki/b-reference/gateway/automation.md` Ergaenzung "Connection-Inheritance" und "Wire-Sources-API" am Ende der Iteration (siehe Abschluss).
## Entscheidungen
| Datum | Entscheidung | Begruendung |
|-------|-------------|-------------|
| 2026-04-23 | Connection-Inheritance: Frontend Auto-Fill (primaer) + Backend Run-Time Fallback (defensiv) | UI muss zeigen "ich weiss, welche Connection" — nur Backend-Fallback waere unsichtbar; nur Frontend laesst alte/importierte Workflows leer |
| 2026-04-23 | Authority-Match-Regel: gleiche `frontendOptions.authority` UND gleiche Connection im Upstream-Pfad UND eindeutig (kein Konflikt) | Konservativ: lieber unausgefuellt lassen als falsche Connection einsetzen |
| 2026-04-23 | `ConnectionPicker`: 0 Connections → Link auf `/profile/connections?authority=...` | Einheitlich mit dem bestehenden `ConnectionsPage.tsx`; Filter fuer den schnellen Anlege-Pfad |
| 2026-04-23 | `attachmentBuilder``JsonEditor` als Alias (nicht eigener Renderer) | Pilot-Plan hat Builder explizit gestrichen; Alias verhindert kaputten 1-zeiligen Text-Fallback |
| 2026-04-23 | `clickupList`/`clickupTask` bleiben Stubs — Hint-Text "ClickUp-Picker tbd" | Nicht im Scope dieser Iteration; eigene Folge-Iteration |
| 2026-04-23 | Wire-Source-Anzeige inline pro Parameter, nicht in `<details>` | Sichtbarkeit ist der Hauptpunkt des Issues — alles, was hinter Click verborgen ist, gilt nicht als geloest |
| 2026-04-23 | `wireSources` als Server-berechnetes Datum (kein Frontend-Re-Implement der Extractor-Logik) | Single Source of Truth; vermeidet Drift zwischen FE/BE Extractor-Mappings |
## Umsetzungs-Checkliste
### Phase 1 — Connection-Inheritance Backend
- [ ] `gateway/modules/features/graphicalEditor/wireSourcesService.py` (NEU): Pure-Helper, der fuer eine Node alle Upstream-Nodes (transitiv via `connections`) liefert. Pro Connection-Authority-Konflikt → kein Vorschlag (`None`); sonst die einzige passende `connectionReference`.
- [ ] `gateway/modules/workflows/automation2/executors/actionNodeExecutor.py`: neuer Helper `_inferConnectionFromUpstream(nodeDef, context, params)` ruft den oben gebauten Service. Wird vor `_resolveConnectionParam` aufgerufen, nur wenn `connectionReference` leer und der Parameter `authority` gesetzt ist.
- [ ] In `AutoStepLog.inputSnapshot` zusaetzliches Feld `connectionReference_inferredFrom: <nodeId>` schreiben, wenn der Fallback griff. Nutzt das bestehende Step-Logging (`workflows/automation2/executionEngine.py`).
- [ ] Unit-Test `gateway/tests/unit/graphicalEditor/test_wireSourcesService.py`:
- Linear: 3 Nodes, n1 hat msft-Connection, n3 erbt.
- Konflikt: n1 hat msft-User-A, n2 hat msft-User-B (per merge-Pfad), n3 darf nichts erben.
- Keine Authority im Param → kein Vorschlag.
- Loop-Body-Node erbt von Loop-Header-Vorgaenger (durchgereicht).
### Phase 2 — Wire-Sources API
- [ ] `gateway/modules/features/graphicalEditor/routeFeatureGraphicalEditor.py`: neuer Endpoint `POST /{instanceId}/wire-sources` mit Body `{ graph: { nodes, connections }, nodeId }` → Response `{ parameters: { <paramName>: [{ srcNodeId, srcField, schema, kind: "wire"|"connection" }] } }`. POST damit Editor-Drafts (noch nicht persistiert) abfragen koennen.
- [ ] Zugriffspruefung wie bei `node-types` (`_validateInstanceAccess`).
- [ ] Unit/API-Test `gateway/tests/integration/graphicalEditor/test_wire_sources.py` mit dem PWG-Pilot-Workflow als Fixture.
### Phase 3 — `ConnectionPicker` 3-Modus-UX
- [ ] `frontend_nyla/src/components/FlowEditor/nodes/frontendTypeRenderers/index.tsx` `ConnectionPicker`:
- Zustaende ableiten aus `connections.length`.
- 0: Kontext-Link `<a href="/profile/connections?authority=${authority}">Verbindung anlegen</a>`. (Pruefen: existiert die `ConnectionsPage.tsx`-Route mit `authority`-Query-Filter? Falls nein, in Phase 3 trivial ergaenzen.)
- 1: Direkt-Anzeige `[<authority>] <label>`, kleines `Aendern`-Link blendet ein `<select>` ein (lokaler State `expanded`); Save-Klick auf andere Option setzt direkt. Wenn `value` leer ist, wird die einzige Connection als Default sofort `onChange` gefeuert (Auto-Save).
- >1: aktuelles Dropdown bleibt.
- [ ] Frontend-Helper `useAutomation2DataFlow` (oder analog) liefert `wireSources` aus dem neuen Endpoint; bei `connectionReference` mit gefundenem Vorschlag wird der Vorschlag als Default genommen.
- [ ] Klein-Refactor: `connections`-Loading aus `ConnectionPicker` in einen geteilten Hook `useUserConnections(authority)` ziehen, damit auch `Automation2FlowEditor.tsx` (Add-Node-Auto-Fill) ihn nutzen kann ohne erneuten Fetch.
- [ ] Manueller UI-Smoke-Test gegen jede der 3 Branches dokumentieren.
### Phase 4 — Frontend Auto-Fill bei Add-Node und beim Wire
- [ ] `Automation2FlowEditor.tsx` (oder dem Add-Node-Code-Pfad): wenn neue Node erzeugt wird, die einen `connectionReference`-Parameter mit `frontendOptions.authority` hat → `wireSources`-API aufrufen (oder lokal `useUserConnections(authority)`) und `params.connectionReference = inferredOrSingle`.
- [ ] Wenn Edge gezogen wird (`onConnectionsChange`), automatisch `wireSources` neu auffrischen → Downstream-Nodes aktualisieren ggf. ihre Default-`connectionReference`. **Nicht** ueberschreiben, wenn der User bereits einen abweichenden Wert gesetzt hat (verifiziert via `wasUserSet`-Flag im Node-State oder: nur setzen wenn `connectionReference === ""`).
- [ ] Test (manuell, dokumentiert): Workflow PWG laden → n4/n10 sollten beim Oeffnen automatisch die msft-Connection aus n2 anzeigen.
### Phase 5 — Wire-Source-Badge im Property-Panel
- [ ] `frontend_nyla/src/components/FlowEditor/editor/NodeConfigPanel.tsx`:
- Pro Parameter, der in `wireSources[paramName]` mindestens einen Eintrag hat: kleiner Badge unter dem Label `🔗 {srcLabel}.{srcField}` (Tooltip: Schema). Wenn der Wert aktuell leer ist, den Badge in Vordergrund-Farbe rendern (= "wird live befuellt"). Wenn der User einen expliziten Wert hat, schwaecher (= "Override aktiv").
- Fuer `connectionReference` mit Vorschlag: Badge `🔗 uebernommen aus {srcNode}`.
- Bestehender `<details>`-Block "Datenfluss" wird **schlanker**: zeigt nur noch die Port-Schemas (Eingabe / Ausgabe) als Referenz, nicht mehr als zentrale Erklaerung — die zentrale Erklaerung steht jetzt inline.
- [ ] Smoke-Test gegen den PWG-Pilot: Klick durch jede Node, Badges zeigen plausible Quellen.
### Phase 6 — `attachmentBuilder` Alias + Renderer-Audit
- [ ] In `frontendTypeRenderers/index.tsx` `FRONTEND_TYPE_RENDERERS` ergaenzen: `attachmentBuilder: JsonEditor` (oder ein Wrapper mit Hint `Felder: contentRef | csvFromVariable | base64Content`).
- [ ] Pruefen: gibt es weitere im Backend genutzte `frontendType`-Werte ohne Renderer? (Aktueller Stand: nein — `attachmentBuilder` ist die einzige Luecke; `clickupList`/`clickupTask` zeigen aktuell `FolderPicker`-Stub.)
- [ ] Im fallthrough `?? FRONTEND_TYPE_RENDERERS.text`: Console-Warning `[FlowEditor] Missing renderer for frontendType=... (param=...)` damit zukuenftige Luecken sichtbar werden.
### Querschnitt
- [ ] **API-Endpunkte:** ja, 1 neuer (`POST /{instanceId}/wire-sources`).
- [ ] **DB-Schema / Migration:** **nein**.
- [ ] **Frontend-Komponenten:** `ConnectionPicker` + `NodeConfigPanel` + Add-Node-Pfad in `Automation2FlowEditor`.
- [ ] **RBAC / Permissions:** unveraendert; `wire-sources`-API bleibt instanz-scoped.
- [ ] **Neutralisierung betroffen?** Nein — keine sensiblen Daten ausserhalb der bestehenden Pfade.
- [ ] **Navigation / Routing:** `/profile/connections?authority=...` Filter pruefen / ggf. ergaenzen.
- [ ] **Billing-Impact?** Nein.
## Akzeptanzkriterien
| # | Kriterium (Given-When-Then) | Prio |
|---|----------------------------|------|
| 1 | Given User mit genau **einer** msft-Connection, When eine neue `email.draftEmail`-Node hinzugefuegt wird, Then ist `connectionReference` automatisch vorbelegt mit dieser Connection (kein Klick noetig). | must |
| 2 | Given Workflow mit n2 (msft-Connection gesetzt) → n4 (msft, leer) → n10 (msft, leer), When der User n4 oder n10 oeffnet, Then zeigt der `ConnectionPicker` die uebernommene Connection inkl. Badge `🔗 uebernommen aus n2`. | must |
| 3 | Given User ohne msft-Connection, When `email.draftEmail`-Node oeffnet, Then zeigt `ConnectionPicker` einen Link "Verbindung anlegen" auf `/profile/connections?authority=msft` (kein leeres Dropdown). | must |
| 4 | Given User mit 3 msft-Connections, When `sharepoint.listFiles`-Node oeffnet, Then erscheint ein Dropdown mit allen 3 Optionen (kein Auto-Pick). | must |
| 5 | Given Workflow-Run mit n4 ohne `connectionReference` und Upstream n2 hat eine eindeutige msft-Connection, When ausgefuehrt, Then verwendet n4 die msft-Connection von n2 und der Step-Log enthaelt `connectionReference_inferredFrom: "n2"`. | must |
| 6 | Given Workflow mit zwei Upstream-Pfaden, die beide msft-Connections aber **unterschiedlicher** User haben, When n3 ohne `connectionReference` ausgefuehrt wird, Then wird **keine** Connection inferiert; der Lauf failt mit klarer Fehlermeldung "Connection nicht eindeutig — bitte explizit waehlen". | should |
| 7 | Given `email.draftEmail.attachments`-Parameter (frontendType `attachmentBuilder`), When der User die Node oeffnet, Then erscheint ein JSON-Editor (mehrzeilig, monospace), nicht ein 1-zeiliges Text-Field. | must |
| 8 | Given Property-Panel einer Node, deren `documentList`-Parameter via Wire befuellt wird, When User die Node oeffnet, Then steht unter dem Parameter ein Badge `🔗 {srcNode}.documents` (sichtbar ohne `<details>` zu oeffnen). | must |
| 9 | Given Frontend benutzt einen `frontendType`, fuer den kein Renderer registriert ist, When die Node gerendert wird, Then erscheint im Browser-Console eine Warning `Missing renderer for frontendType=...`. | should |
| 10 | Given PWG-Pilot-Workflow, When der Editor geoffnet wird, Then ist in keiner der 10 Nodes ein `connectionReference`-Feld leer (alles via Single-Connection oder Upstream-Inheritance befuellt) — kein User-Klick noetig, um zu starten. | must |
## Testplan
| ID | AC | Art | Automatisiert | Repo-Pfad | Status |
|----|----|-----|--------------|-----------|--------|
| T1 | 5, 6 | unit | ja | `gateway/tests/unit/graphicalEditor/test_wireSourcesService.py` | pending |
| T2 | 5 | integration | ja | `gateway/tests/integration/graphicalEditor/test_actionNodeExecutor_inheritance.py` (neu — minimaler Run, prueft Step-Log) | pending |
| T3 | 14, 710 | manuell UI | nein | Lokale Dev-Umgebung mit dem PWG-Pilot-Workflow (`pwg-mietzinsbestaetigung-pilot.workflow.json`); siehe Smoke-Cookbook unten | pending |
| T4 | 5, 6 | api | ja | `gateway/tests/integration/graphicalEditor/test_wire_sources.py` | pending |
| T5 | 9 | manuell | nein | DevTools-Console waehrend T3 mitlesen | pending |
### Smoke-Test-Kochbuch
1. PWG-Demo laden (`POST /api/admin/demoConfigs/pwg-demo-2026/load`); Login `pwg.demo`.
2. **AC 10:** PWG-Pilot-Workflow oeffnen → durch alle 10 Nodes klicken → in jeder Node mit `connectionReference` muss ein Wert oder Inheritance-Badge sichtbar sein, kein leerer Picker.
3. **AC 1:** Neue `email.draftEmail`-Node aus der Palette ziehen → sofort vorbelegt.
4. **AC 3:** Test-User ohne msft-Connection (zweiter Demo-User?) — `email.draftEmail`-Node hinzufuegen → Link statt Dropdown.
5. **AC 4:** Im Demo-Mandant zwei msft-Connections fuer denselben User anlegen (Test-Setup) → Dropdown erscheint wieder.
6. **AC 7:** `email.draftEmail.attachments`-Feld ansehen → JSON-Editor, nicht 1-zeilig.
7. **AC 8:** Beliebige Mid-Pipeline-Node oeffnen → Wire-Badges sichtbar.
8. **AC 5:** Workflow ausfuehren → Step-Log ansehen → `connectionReference_inferredFrom` taucht in Snapshots auf, wo erwartet.
## Links
- Vorgaenger-Plan: `wiki/c-work/4-done/2026-04-generic-graph-editor.md` (Typed Ports, Wire-Handover-Mechanik)
- Vorgaenger-Plan: `wiki/c-work/4-done/2026-04-pwg-pilot-mietzinsbestaetigung-workflow.md` (Pilot, `attachmentBuilder`-Entscheidung)
- Beispiel-Workflow mit den Issues: `local/temp/pwg-pilot-jahresmietzinsbestätigung.workflow (1).json`
- Backend Wire-Handover: `gateway/modules/workflows/automation2/executors/actionNodeExecutor.py`, `gateway/modules/features/graphicalEditor/portTypes.py`
- Frontend Renderer-Registry: `frontend_nyla/src/components/FlowEditor/nodes/frontendTypeRenderers/index.tsx`
- Frontend Property-Panel: `frontend_nyla/src/components/FlowEditor/editor/NodeConfigPanel.tsx`
- Frontend Editor: `frontend_nyla/src/components/FlowEditor/editor/Automation2FlowEditor.tsx`
- User-Connections-Seite: `frontend_nyla/src/pages/basedata/ConnectionsPage.tsx`
- Connection-Options-API: `gateway/modules/features/graphicalEditor/routeFeatureGraphicalEditor.py` (`get_user_connection_options`)
- PR: ...
- Issue: ...
## Abschluss
- [ ] `wiki/b-reference/gateway/automation.md` ergaenzen: Sektion **Connection-Inheritance** und **`POST /wire-sources`-API**.
- [ ] `wiki/b-reference/frontend-nyla/architecture.md` ergaenzen: `ConnectionPicker`-3-Modus-UX, Wire-Source-Badges im `NodeConfigPanel`.
- [ ] `wiki/TOPICS.md` pruefen: existierender Eintrag fuer Generic Graph Editor reicht; ggf. „Connection-Inheritance" als Subzeile.
- [ ] Folge-Iteration als Eintrag in `c-work/0-ideas/`: dedizierter `AttachmentBuilder`-Renderer und echte `clickupList`/`clickupTask`-Picker.
- [ ] Dieses Dokument → `c-work/2-build/` verschieben sobald Phase 1 startet.

View file

@ -1,254 +0,0 @@
<!-- status: superseded -->
<!-- lastUpdated: 2026-04-24 -->
<!-- lastReviewed: 2026-04-25 -->
<!-- archivedOn: 2026-04-25 -->
<!-- supersededBy: b-reference/gateway/workflow.md (Typed Action Architecture) -->
<!-- related: c-work/4-done/2026-04-typed-action-architecture.md, c-work/4-done/2026-04-typed-action-followups.md -->
# Node-Typisierungs-Audit (Stand 2026-04-24)
> **ARCHIVIERT 2026-04-25.** Die 4 Defekt-Muster sind durch die
> [Typed Action Architecture](../../b-reference/gateway/workflow.md)
> und ihre [Folge-Schritte](../c-work/2026-04-typed-action-followups.md)
> strukturell beseitigt. Bug-Restbestand (Trustee/Redmine-Adapter noch nicht
> migriert) wurde in `c-work/4-done/2026-04-feature-instance-ref-adapter-migration.md`
> erledigt. Diese Seite bleibt nur als historische Faktenbasis erhalten.
Quelle: `gateway/modules/features/graphicalEditor/nodeDefinitions/*.py`
manuell ausgelesen aus 12 Node-Definition-Dateien (53 Nodes total).
## Frage des Audits
> Haben die Nodes eine klare Logik, welche Input-Attribute mit welchem
> Format-Typ (Str, Float, UserConnection, FeatureInstanceId,
> TrusteeDatabaseObject, etc.) erforderlich sind, und ist die Ausgabe
> pro Node klar definiert?
## Antwort
**Nein.** Nur **9 von 53 Nodes** sind sauber typisiert.
| Status | Anzahl | Bedeutung |
|---|---|---|
| ✓ Klar | 9 / 53 | Input-Typen + Output-Typ klar definiert ueber Katalog-Schemas |
| ⚠ Pseudo-Typen | 21 / 53 | Funktioniert, aber `type: "string"` mit Frontend-Magic statt typisierter Schema-Typ |
| ✗ Defekt | 23 / 53 | Pflicht-Param `hidden` ODER Output ist generisches `ActionResult` ODER beides |
## Score pro Modul
| Modul | Total | ✓ | ⚠ | ✗ | Haeufigster Defekt |
|---|---|---|---|---|---|
| `trustee.*` | 5 | 0 | 0 | 5 | `featureInstanceId:string,hidden` + Output `ActionResult` |
| `redmine.*` | 6 | 0 | 0 | 6 | `featureInstanceId:string,hidden` + Output `ActionResult` |
| `sharepoint.*` | 6 | 0 | 6 | 0 | Pseudo `connectionReference` + Folder-/File-Refs |
| `clickup.*` | 6 | 0 | 6 | 0 | Pseudo `connectionReference` + List-/Team-Refs |
| `email.*` | 3 | 0 | 2 | 1 | Pseudo `connectionReference`; `draftEmail` Output `ActionResult` (statt existierendem `EmailDraft`) |
| `ai.*` | 8 | 3 | 4 | 1 | `ai.prompt` mit `documentList:hidden` + `context:hidden`; Wildcard-`accepts` |
| `input.*` | 7 | 6 | 1 | 0 | sauber; `input.review` mit Pseudo-`contentRef` |
| `flow.*` | 4 | 1 | 3 | 0 | `condition`/`value`/`items` als Pseudo-strings |
| `triggers.*` | 3 | 2 | 1 | 0 | `trigger.schedule.cron:string` |
| `data.*` | 3 | 2 | 1 | 0 | `data.filter.condition` Pseudo + Wildcard-`accepts` |
| `file.*` | 1 | 0 | 0 | 1 | `context:string,hidden` Pflicht-Inhalt nicht pickbar |
| `context.*` | 1 | 1 | 0 | 0 | sauber |
| **Summe** | 53 | 9 | 21 | 23 | |
## Vier wiederkehrende Defekt-Muster
### Muster 1 — `featureInstanceId: string, hidden` als Pflicht-Param
**Vorkommen:** 11x (5 trustee + 6 redmine)
**Code heute:**
```python
{"name": "featureInstanceId", "type": "string", "required": True,
"frontendType": "hidden", "description": t("Trustee Feature-Instanz-ID")},
```
**Konsequenz:** User kann den Pflicht-Param nicht setzen. Engine raet
ihn aus `WorkflowFeatureContext` oder Session — bricht still bei
Mehr-Mandant-Setups.
**Soll:**
```python
{"name": "target", "type": "FeatureInstanceRef[trustee]", "required": True,
"ui": {"label": "Trustee-System"}},
```
mit neuem Katalog-Typ in `portTypes.py`:
```python
"FeatureInstanceRef": PortSchema(name="FeatureInstanceRef", fields=[
PortField(name="featureCode", type="str", description="trustee | redmine | clickup | ..."),
PortField(name="id", type="str", description="FeatureInstance.id"),
PortField(name="label", type="str", required=False),
]),
```
Picker-Optionen kommen vom neuen Endpoint `/options/featureInstance?featureCode=trustee&mandateId=…` (analog zu `user.connection`).
---
### Muster 2 — `connectionReference: string, frontendType: userConnection`
**Vorkommen:** 15x (6 sharepoint + 6 clickup + 3 email)
**Code heute:**
```python
{"name": "connectionReference", "type": "string", "required": True,
"frontendType": "userConnection",
"frontendOptions": {"authority": "msft"},
"description": t("SharePoint-Verbindung")},
```
**Konsequenz:** Type ist string — der Picker im Backend kennt das
Konzept "ConnectionRef" nicht. Adapter im Frontend macht einen
Spezialfall fuer `frontendType: "userConnection"`. Wenn ein Folge-Node
auch eine Connection braucht, kann der Output keiner Vorgaenger-Node
sie liefern, weil Connection nirgends als Output deklariert ist.
**Soll:**
```python
{"name": "connection", "type": "ConnectionRef[msft]", "required": True,
"ui": {"label": "SharePoint-Verbindung"}},
```
`ConnectionRef` existiert bereits im Katalog — wird heute aber nur
implizit benutzt (im `DocumentList.connection`-Subfeld). Mit
`ConnectionRef[authority]` als Discriminator wird die Authority
deterministisch gefiltert.
---
### Muster 3 — Output `ActionResult` statt typed Schema
**Vorkommen:** 17x
| Node | Heute | Soll-Schema |
|---|---|---|
| `trustee.refreshAccountingData` | `ActionResult` | `TrusteeRefreshResult { syncCounts, dateRange, errors }` |
| `trustee.processDocuments` | `ActionResult` | `TrusteeProcessResult { documents: List[Document], errors: List[ProcessError] }` |
| `trustee.syncToAccounting` | `ActionResult` | `TrusteeSyncResult { synced: int, failed: int, journalLines: List[JournalLine] }` |
| `trustee.queryData` | `ActionResult` | `QueryResult { rows, columns, count }` (Schema **existiert** im Katalog!) |
| `email.draftEmail` | `ActionResult` | `EmailDraft { subject, body, to, cc, attachments, connection }` (Schema **existiert** im Katalog!) |
| `redmine.readTicket` | `ActionResult` | `RedmineTicket { id, subject, status, tracker, assignee, ... }` (neu) |
| `redmine.listTickets` | `ActionResult` | `RedmineTicketList { tickets: List[RedmineTicket], count, filters }` (neu) |
| `redmine.createTicket` | `ActionResult` | `RedmineTicket` |
| `redmine.updateTicket` | `ActionResult` | `RedmineTicket` |
| `redmine.getStats` | `ActionResult` | `RedmineStats { kpis, throughput, statusDistribution, backlog }` (neu) |
| `redmine.runSync` | `ActionResult` | `TrusteeRefreshResult`-aehnlich oder bleibt `ActionResult` (fire-and-forget) |
| `sharepoint.uploadFile` | `ActionResult` | `SharePointFileRef` (Upload-Ziel als Ref) oder bleibt |
| `sharepoint.copyFile` | `ActionResult` | `SharePointFileRef` (neue Datei-Position) |
| `clickup.uploadAttachment` | `ActionResult` | `TaskAttachmentRef` (neu) oder bleibt |
| `file.create` | `DocumentList` | OK, bleibt (1 Document drin) |
**Konsequenz heute:** Folge-Nodes koennen keine spezifischen Felder
pickrn. Workflow-Bauer muss raten, was im `data: Dict`-Black-Box ist.
**Soll:** Pro Action ein typisiertes Schema im Katalog. `ActionResult`
bleibt nur fuer echte fire-and-forget-Aktionen (z.B. `runSync`).
---
### Muster 4 — Wildcard-`accepts` mit ≥ 4 Typen inkl. `Transit`
**Vorkommen:** 8x
| Node | Heute `accepts` | Problem |
|---|---|---|
| `trustee.extractFromFiles` | `[DocumentList, Transit, AiResult, LoopItem, ActionResult]` | Was wenn `AiResult` reinkommt? Heuristik im Engine raet, was wo befuellt wird |
| `ai.prompt` | `[DocumentList, AiResult, TextResult, Transit, LoopItem, ActionResult]` | Pflicht-Param `documentList:hidden` wird aus dem Wire heuristisch befuellt |
| `email.draftEmail` | `[EmailDraft, AiResult, Transit, ConsolidateResult, DocumentList]` | Wie wird `subject/body/to` aus `AiResult` oder `ConsolidateResult` abgeleitet? |
| `flow.loop` | `[Transit, UdmDocument, EmailList, DocumentList, FileList, TaskList, ActionResult]` | Loop ueber `ActionResult`? Was iteriert dann? |
| `data.filter` | `[AggregateResult, FileList, TaskList, EmailList, DocumentList, UdmDocument, UdmNodeList]` | OK — alle sind Listen-aehnlich, aber kein Pflicht-Output-Schema |
| `ai.summarize/translate/convert` | `[DocumentList, Transit]` | `Transit` als generisches "irgendwas" |
| `data.aggregate` | `[Transit, AiResult, LoopItem]` | Loop-Body Output kann alles sein |
| `data.consolidate` | `[AggregateResult, Transit]` | `Transit` |
**Konsequenz:** Wires bringen "irgendwas" vorbei, Backend muss
heuristisch zuordnen. Keine deterministische Validierung im Frontend
oder Backend moeglich.
**Soll:** `accepts` enthaelt **exakt** den Schema-Typ, der vom
Pflicht-Input-Param erwartet wird. Wenn mehrere Modi existieren (z.B.
`flow.loop` ueber Liste oder Dokument), wird das ueber ein typisiertes
**Union** im Katalog ausgedrueckt — nicht ueber eine Wildcard-Liste.
---
## Schemas die im Katalog existieren aber nirgends benutzt werden
Diese sind heute schon im `PORT_TYPE_CATALOG` deklariert, werden aber
von keiner Node-Definition als Output verwendet:
| Schema | Sollte Output sein von | Aktuell Output |
|---|---|---|
| `EmailDraft` | `email.draftEmail` | `ActionResult` |
| `QueryResult` | `trustee.queryData` | `ActionResult` |
| `TaskItem` (alleinstehend, nicht List) | `clickup.getTask` | `TaskResult` (OK, aber inkonsistent) |
| `UdmPage`, `UdmBlock`, `UdmNodeList` | sind nur `accepts`-Eintraege fuer `data.filter`, kein Producer | — |
**Konsequenz:** Schon das Aktivieren der existierenden Schemas wuerde
2 der ✗-Faelle ohne neue Katalog-Eintraege loesen.
---
## Schemas die fehlen und neu gebraucht werden
| Schema | Brauchen wir fuer |
|---|---|
| `FeatureInstanceRef` (mit Discriminator) | 11x — alle trustee + redmine Nodes |
| `ConnectionRef[authority]`-Discriminator | 15x — sharepoint + clickup + email |
| `TrusteeRefreshResult` | `trustee.refreshAccountingData` |
| `TrusteeProcessResult` | `trustee.processDocuments` |
| `TrusteeSyncResult` | `trustee.syncToAccounting` |
| `RedmineTicket` | `redmine.readTicket/createTicket/updateTicket` |
| `RedmineTicketList` | `redmine.listTickets` |
| `RedmineStats` | `redmine.getStats` |
| `JournalLine`, `Account`, `Tenant` | Drill-Down in Trustee-Outputs |
| `ProcessError` | Fehler-Listen in `*Result`-Schemas |
| `CronExpression` | `trigger.schedule` |
| `ConditionExpression` | `flow.ifElse`, `data.filter` |
| `PromptTemplateRef` | optional — wenn Prompt-Library kommt |
Total: **~13 neue Katalog-Schemas**, davon 2 mit Discriminator
(`FeatureInstanceRef`, `ConnectionRef`).
---
## Pflicht-Param-Konzepte die heute als `frontendType` versteckt sind
Diese laufen heute als Frontend-only-Magic mit `type: "string"` und
`frontendType: "<custom>"`. Sie sollten echte Katalog-Typen werden:
| `frontendType` | Vorkommen | Soll-Katalog-Typ |
|---|---|---|
| `userConnection` | 15x | `ConnectionRef[authority]` |
| `sharepointFolder` | 4x | `SharePointFolderRef` (existiert!) |
| `sharepointFile` | 3x | `SharePointFileRef` (existiert!) |
| `clickupList` | 3x | `ClickUpListRef` (neu) |
| `hidden` (als Pflicht) | 11x | meist `FeatureInstanceRef`, manchmal `DataRef`-Kontext-Param |
| `dataRef` | 2x (kuerzlich gefixt) | typed Param mit `accepts` matchend |
| `fieldBuilder` | 2x | OK — bleibt UI-Hint, Output-Schema dynamisch |
| `attachmentBuilder` | 1x | `List[AttachmentSpec]` (neu) |
| `condition`, `filterExpression`, `caseList` | 4x | `ConditionExpression` |
| `cron` | 1x | `CronExpression` |
---
## Folgerung fuer den Architektur-Plan
Diese Audit-Daten bestaetigen den Plan
[`2026-04-typed-action-architecture.md`](../3-validate/2026-04-typed-action-architecture.md):
1. **Schicht 1** (Katalog) muss zuerst um ~13 Schemas erweitert werden.
2. **Schicht 2** (Methods/Actions) muss `WorkflowActionParameter.type`
auf Katalog-Typen umstellen — beseitigt automatisch Muster 1
(`hidden`-Pflicht-Params).
3. **Schicht 3** (Adapter) ersetzt das parallele
`frontendType`-Schatten-System durch echte Typen — beseitigt
Muster 2 (Pseudo-`connectionReference`).
4. **Outputs typisieren** beseitigt Muster 3 (Output
`ActionResult`-Black-Box).
5. **`accepts` strikt** beseitigt Muster 4 (Wildcards).
Der Aufwand ist nicht trivial, aber er beseitigt **alle 4
Defekt-Muster** in einem Refactor — kein einzelner Workaround.

File diff suppressed because it is too large Load diff

View file

@ -35,3 +35,27 @@ Benchmark STT v2 (e.g. Chirp / Chirp 2) for `de-DE` vs current v1 `latest_short`
- Billing hooks (`calculateSttCostCHF`) must use measured duration (see streaming `result_end_time`), not compressed byte heuristics.
- `google-cloud-speech==2.21.0` includes `speech_v2` module — no dependency upgrade needed.
- Chirp 2 is v2-only and requires regional endpoint (`{location}-speech.googleapis.com`).
## Results
Einfacher Test.
Ergebnis
4b05925a-00df-41e0-8842-1ee587a3ca26.weba (282 KB) — de-DE
v1 — latest_long
Modell: latest_long
Latenz: 7303 ms
Konfidenz: 64.5%
Alternativen: 1
Recording auf Schwyzerdütsch, aber das schafft zu übersetzen will das Modell schlauer ist und welches Modell besser ist schon alles verschiedene Sprachen mache können wir auch auf Deutsch auf Hochdeutsch weiter sprechen und fassen wir doch zusammen, was ich jetzt alles erzählt habe.
v2 — chirp_2
Modell: chirp_2
Latenz: 2426.9 ms
Konfidenz: 75.4%
Alternativen: 1
Region: europe-west4
Mir teste heute mal Recording auf Schweizer Deutsch, ob er das schafft zum Übersetzen, ob das Modell schlauer ist und ob das Modell besser ist. Zum Haus finde aber verschiedene Sprachen kann machen, können wir auch hoch auf Hochdeutsch weiter sprechen und fassen wir doch zusammen, was ich jetzt alles erzählt habe.
Langes Meeting