feat: implement end-to-end encryption (E2EE) support for agents with configuration and documentation updates

This commit is contained in:
2026-03-05 00:06:32 +00:00
parent 1e5103eb70
commit 54fe479792
11 changed files with 227 additions and 21 deletions
+19
View File
@@ -86,6 +86,25 @@ matrix:
- Token: `MATRIX_TOKEN_<ID_UPPER>` donde ID se convierte a mayúsculas y guiones a underscores
- Ejemplo: `asistente-2``MATRIX_TOKEN_ASISTENTE2`
- Password: `MATRIX_PASSWORD_<ID_UPPER>` con la misma convención
- Pickle key E2EE: `PICKLE_KEY_<ID_UPPER>` — clave fija hex de 32 bytes
**Sección encryption en config.yaml:**
```yaml
encryption:
enabled: true
store_path: "./agents/<agent-id>/data/crypto/" # SIEMPRE por agente, nunca compartida
pickle_key_env: PICKLE_KEY_<ID_UPPER> # env var con clave hex
trust_mode: tofu
```
**Al crear un nuevo agente con E2EE:**
1. Generar pickle key: `openssl rand -hex 32`
2. Añadir a `.env`: `PICKLE_KEY_<ID_UPPER>=<hex>`
3. Añadir a `.env.example`: `PICKLE_KEY_<ID_UPPER>=`
4. Usar `store_path` propio del agente (no compartir entre agentes)
5. Tras arrancar, verificar cross-signing: `go run -tags goolm ./cmd/verify ...`
Ver `docs/e2ee.md` para documentación completa de E2EE.
### 3. `agents/<agent-id>/prompts/system.md` — System prompt