v1.0.0 to v1.0.0

51 added, 71 removed. Audit A to A.

---
name: plugin-system
version: 1.0.0
type: tool
author: BACH Team
created: 2026-02-21
updated: 2026-03-12
- description: >
- Generisches Plugin-System fuer Python-Anwendungen. Auto-Discovery,
- Validierung, Fehlertoleranz. Zero Dependencies (nur Python stdlib).
+ description: Generic plugin system for Python applications. Auto-discovery, validation, fault tolerance. Zero dependencies (Python stdlib only).
- # Kompatibilitaet
standalone: true
anthropic_compatible: true
bach_compatible: true
bach_origin: true
-
- # Kategorisierung
category: dev
tags: [plugin, framework, extensibility, cli, architecture]
language: de
status: active
-
- # Abhaengigkeiten
- dependencies:
- tools: []
- services: []
- protocols: []
- python: []
-
- # Provenance
- provenance:
- origin: "bach"
- origin_path: "MODULAR_AGENTS/plugins"
- origin_version: "1.0.0"
- origin_repo: "github.com/ellmos-ai/bach"
- last_sync_from_origin: "2026-03-12"
- last_sync_to_origin: null
- local_changes_since_sync: false
+ dependencies: {'tools': [], 'services': [], 'protocols': [], 'python': []}
+ provenance: {'origin': 'bach', 'origin_path': 'MODULAR_AGENTS/plugins', 'origin_version': '1.0.0', 'origin_repo': 'github.com/ellmos-ai/bach', 'last_sync_from_origin': '2026-03-12', 'last_sync_to_origin': None, 'local_changes_since_sync': False}
---
- <img src="banner.png" width="100%" alt="plugin-system banner">
+ > **Deutsch** — Offizielle Deutsch-Version / Documento Oficial en Deutsch.
- # Plugin System
- Fehlertolerantes Plugin-System fuer Python-CLI-Anwendungen.
- Ein fehlerhaftes Plugin stoppt niemals den Rest der Anwendung.
+ # Plugin System (Deutsch)
- ## Kernfeatures
+ Fault-tolerant plugin system for Python CLI applications.
+ A faulty plugin never stops the rest of the application.
- - **Auto-Discovery:** Findet Plugins automatisch in einem Verzeichnis
- - **Validierung:** Prueft `name`, `version`, `execute()` auf jeder Plugin-Klasse
- - **Fehlertoleranz:** Defekte Plugins werden geloggt aber nicht geladen
- - **Zero Dependencies:** Nur Python-Standardbibliothek
+ ## Core Features
- ## Dateien
+ - **Auto-Discovery:** Automatically finds plugins in a directory
+ - **Validation:** Checks `name`, `version`, `execute()` on each plugin class
+ - **Fault Tolerance:** Defective plugins are logged but not loaded
+ - **Zero Dependencies:** Python standard library only
+ ## Files
+
```
scripts/
- plugin_system.py Kern: PluginBase (ABC) + PluginManager
- cli_demo.py Demo-CLI mit argparse
- test_plugin_system.py 16+ Unit-Tests
+ plugin_system.py Core: PluginBase (ABC) + PluginManager
+ cli_demo.py Demo CLI with argparse
+ test_plugin_system.py 16+ unit tests
examples/
- hello.py Hello-World Plugin
- calculator.py Rechner-Plugin
- systeminfo.py System-Info Plugin
+ hello.py Hello World plugin
+ calculator.py Calculator plugin
+ systeminfo.py System Info plugin
```
- ## Schnellstart
+ ## Quick Start
- ### 1. Plugin erstellen
+ ### 1. Create a Plugin
```python
from plugin_system import PluginBase
- class MeinPlugin(PluginBase):
- name = "MeinPlugin"
+ class MyPlugin(PluginBase):
+ name = "MyPlugin"
version = "1.0.0"
def execute(self, *args, **kwargs):
- return {"status": "ok", "message": "Hallo!"}
+ return {"status": "ok", "message": "Hello!"}
```
- ### 2. PluginManager nutzen
+ ### 2. Use PluginManager
```python
from plugin_system import PluginManager
- manager = PluginManager(plugins_dir="./meine_plugins")
+ manager = PluginManager(plugins_dir="./my_plugins")
plugins = manager.discover_plugins()
- # Alle Plugins auflisten
+ # List all plugins (Deutsch)
manager.list_plugins()
- # Plugin ausfuehren
- success, result = manager.execute_plugin("MeinPlugin", param="wert")
+ # Execute a plugin (Deutsch)
+ success, result = manager.execute_plugin("MyPlugin", param="value")
if success:
print(result)
```
- ### 3. In eigene App integrieren
+ ### 3. Integrate into Your App
```python
- class MeineApp:
+ class MyApp:
def __init__(self):
self.plugins = PluginManager("./plugins")
self.plugins.discover_plugins()
def run_command(self, command, **params):
success, result = self.plugins.execute_plugin(command, **params)
return result if success else None
```
- ## Plugin-Interface
+ ## Plugin Interface
- Jedes Plugin muss:
+ Every plugin must:
- | Anforderung | Details |
+ | Requirement | Details |
|-------------|---------|
- | `PluginBase` erben | `from plugin_system import PluginBase` |
- | `name` setzen | Klassenattribut, nicht leer |
- | `version` setzen | Klassenattribut, Semantic Versioning |
- | `execute()` implementieren | Beliebige `*args, **kwargs` |
+ | Inherit `PluginBase` | `from plugin_system import PluginBase` |
+ | Set `name` | Class attribute, non-empty |
+ | Set `version` | Class attribute, semantic versioning |
+ | Implement `execute()` | Arbitrary `*args, **kwargs` |
- ## Fehlertoleranz
+ ## Fault Tolerance
- | Fehlertyp | Verhalten |
- |-----------|-----------|
- | SyntaxError im Plugin | Plugin wird uebersprungen, Rest laedt |
- | Fehlende Attribute | Plugin wird als `is_valid=False` markiert |
- | Exception in `execute()` | Gibt `(False, error_message)` zurueck |
- | Kein Plugin im Verzeichnis | Leere Liste, kein Crash |
+ | Error Type | Behavior |
+ |-----------|----------|
+ | SyntaxError in plugin | Plugin is skipped, rest loads |
+ | Missing attributes | Plugin is marked as `is_valid=False` |
+ | Exception in `execute()` | Returns `(False, error_message)` |
+ | No plugin in directory | Empty list, no crash |
- ## Changelog
+ ## Änderungsprotokoll
### 1.0.0 (2026-03-12)
- - Migration aus MODULAR_AGENTS/plugins in Skillbibliothek
+ - Migration from MODULAR_AGENTS/plugins to skill library
- PluginBase ABC + PluginManager
- - 3 Beispiel-Plugins (Hello, Calculator, SystemInfo)
- - 16+ Unit-Tests
- - CLI-Demo mit argparse
-
+ - 3 example plugins (Hello, Calculator, SystemInfo)
+ - 16+ unit tests
+ - CLI demo with argparse