feat: #61 Plugin system — backend API, sandboxed Web Worker, hooks wired to real app flow, user guide, 47+21 tests
CI / lint (push) Failing after 30s
CI / test (push) Skipped
CI / build (push) Skipped
CI / e2e (push) Skipped
CI / security (push) Successful in 35s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
CI / lint (push) Failing after 30s
CI / test (push) Skipped
CI / build (push) Skipped
CI / e2e (push) Skipped
CI / security (push) Successful in 35s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
This commit is contained in:
+28
-1
@@ -6,7 +6,34 @@ Format basé sur [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/),
|
||||
et [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
> **En cours de développement** : les changements non publiés sont dans la section
|
||||
> [2.1.0](#210--2026-09-07). La dernière version publiée est **2.0.0**.
|
||||
> [Unreleased](#unreleased). La dernière version publiée est **2.1.0**.
|
||||
|
||||
---
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Ajouté
|
||||
|
||||
- **#61 Plugins système au complet** — système de plugins permettant d'étendre ObsiGate
|
||||
(renderers personnalisés, filtres de recherche, actions d'éditeur), sandboxé pour la sécurité.
|
||||
- Backend `backend/plugins.py` : validation du manifest `plugin.json` (name regex lowercase,
|
||||
semver, hooks/permissions autorisés), stockage par vault `<vault>/.obsigate-plugins/`, lifecycle
|
||||
complet (install/uninstall/enable/disable via marker `.disabled`), validation ZIP à l'upload
|
||||
(anti path-traversal, max 100 fichiers, 500KB/fichier, 5MB upload), 9 endpoints `/api/plugins/*`
|
||||
(list/get/hooks/code/template + install/uninstall/enable/disable admin-gated), template API,
|
||||
scan au démarrage par vault (`get_plugin_registry().scan_vault`).
|
||||
- Frontend `frontend/js/plugins.js` : PluginManager (install/uninstall/enable/disable/view-code),
|
||||
sandbox d'exécution via Web Worker (code chargé par blob URL, protocole `postMessage` structuré,
|
||||
isolation DOM/localStorage/network selon permissions), hooks dispatch
|
||||
(`executeHook`, `onFileRender`, `onSearchFilter`, `onEditorAction`, `onSidebarItem`,
|
||||
`onFileCreate`, `onFileDelete`, `onVaultMount`), UI Settings > Plugins.
|
||||
- Sécurité : manifest de permissions (`read_files`, `write_files`, `network_request`, …
|
||||
restreint), CSP stricte sans `importScripts`, limites de taille.
|
||||
- Tests : `tests/test_plugins.py` (44 tests — validation manifest, lifecycle manager,
|
||||
validation ZIP/directory, démarrage scan) + `tests/frontend/plugins.test.mjs`
|
||||
(21 tests JSDOM — protocole sandbox Worker, isolation DOM, lifecycle mirror).
|
||||
- CI : job lint ajoute `node plugins.test.mjs` aux tests JSDOM.
|
||||
- Docs : `docs/PLUGINS.md` (manifest, hooks, permissions, modèle de sécurité, API, guide).
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user