feat: add recovery key support for E2EE agents, including configuration and documentation updates
This commit is contained in:
@@ -95,6 +95,7 @@ matrix:
|
||||
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
|
||||
recovery_key_env: SSSS_RECOVERY_KEY_<ID_UPPER> # env var con base58 recovery key
|
||||
```
|
||||
|
||||
**Al crear un nuevo agente con E2EE:**
|
||||
@@ -102,9 +103,23 @@ matrix:
|
||||
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 ...`
|
||||
5. Ejecutar `cmd/verify` con `--store` y `--pickle-key` del agente:
|
||||
```bash
|
||||
./bin/verify --homeserver "$MATRIX_HOMESERVER" --username "<id>" \
|
||||
--password "$MATRIX_PASSWORD_<AGENT>" --token "$MATRIX_TOKEN_<AGENT>" \
|
||||
--store "./agents/<id>/data/crypto/" --pickle-key "$PICKLE_KEY_<AGENT>"
|
||||
```
|
||||
6. Guardar el recovery key en `.env` (con comillas por los espacios):
|
||||
```bash
|
||||
SSSS_RECOVERY_KEY_<ID_UPPER>="EsXX YYYY ZZZZ ..."
|
||||
```
|
||||
7. Añadir `recovery_key_env` al config.yaml:
|
||||
```yaml
|
||||
encryption:
|
||||
recovery_key_env: SSSS_RECOVERY_KEY_<ID_UPPER>
|
||||
```
|
||||
|
||||
Ver `docs/e2ee.md` para documentación completa de E2EE.
|
||||
**Sin el recovery key**, el agente arranca pero los mensajes muestran "Encrypted by a device not verified by its owner".
|
||||
|
||||
### 3. `agents/<agent-id>/prompts/system.md` — System prompt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user