feat(ai): serveur MCP Streamable HTTP + confirmations two-step (#79 phase E)
CI / lint (push) Successful in 1m3s
CI / security (push) Successful in 41s
CI / test (push) Successful in 1m20s
CI / build (push) Successful in 1m19s
CI / e2e (push) Successful in 10m56s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
CI / lint (push) Successful in 1m3s
CI / security (push) Successful in 41s
CI / test (push) Successful in 1m20s
CI / build (push) Successful in 1m19s
CI / e2e (push) Successful in 10m56s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
This commit is contained in:
@@ -14,6 +14,19 @@ et [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
### Ajouté
|
||||
|
||||
- **#79 Phase E — Serveur MCP (Streamable HTTP)** — nouvel endpoint `/mcp` exposant ObsiGate à des
|
||||
clients MCP externes (Claude Desktop, Cursor…) via le SDK Python `mcp==1.9.4`. Les deux fronts
|
||||
(assistant in-app et MCP) consomment la même couche d'outils. **Tools** : outils de lecture/recherche
|
||||
directs ; outils d'écriture/destructifs en **two-step `propose_<tool>` / `apply_<tool>`** avec
|
||||
**jeton JWT signé, usage unique et TTL** (`OBSIGATE_MCP_CONFIRMATION_TTL`, défaut 300 s) et
|
||||
blacklist de JTI persistée (`data/mcp_used_tokens.json`, anti-rejeu). **Resources** :
|
||||
`vault://<name>` et `vault://<name>/<path>` (lecture seule, secrets redactés). **Prompts** :
|
||||
`summarize-directory`, `generate-note`, `find-related`. Auth `Authorization: Bearer <JWT>` →
|
||||
`get_current_user` ; permissions et toggle destructif par vault (`aiDestructiveTools`) appliqués.
|
||||
Nouveaux modules `backend/mcp/server.py` et `backend/mcp/confirmations.py` ; dépendances
|
||||
`mcp==1.9.4` + `sse-starlette==2.1.3` (compatibles FastAPI 0.110 / starlette 0.37). Tests :
|
||||
`tests/test_mcp.py` (13 tests).
|
||||
|
||||
- **#79 Phase D — Catalogue d'outils mutations + confirmations two-step** — 11 nouveaux outils IA
|
||||
destructifs ou d'écriture exposés par la couche partagée (`backend/tools/service.py`) :
|
||||
`create_file`, `create_directory`, `edit_file`, `append_to_file`, `rename_file`,
|
||||
|
||||
Reference in New Issue
Block a user