67 lines
1.9 KiB
Markdown
67 lines
1.9 KiB
Markdown
---
|
|
date: 2026-07-06
|
|
tags: [hermes, approvals, yolo, config]
|
|
---
|
|
|
|
# Approvals-Mode-Mechanismus
|
|
|
|
## Problem
|
|
|
|
Hermes-Agent fordert bei jeder Tool-Ausführung eine Bestätigung an („Approve this tool call?"). Dies blockiert automatisierte Workflows und Multi-Agent-Orchestrierung.
|
|
|
|
## Fehlannahme
|
|
|
|
Es existiert **kein** dedizierter Config-Schalter `approvals.enabled: true/false` im herkömmlichen Sinn. Der Mechanismus wird durch macOS `TCC` (Transparency, Consent, and Control) und `LaunchServices` gesteuert, nicht durch eine einfache YAML-Option.
|
|
|
|
## Lösung
|
|
|
|
```bash
|
|
hermes config set approvals.mode off
|
|
```
|
|
|
|
Dies schreibt in `~/.hermes/config.yaml`:
|
|
|
|
```yaml
|
|
approvals:
|
|
mode: false # YAML boolean — entspricht --yolo
|
|
```
|
|
|
|
Der Wert `false` (YAML bool, nicht String `"false"`) aktiviert den **YOLO-Mode**: Alle Tool-Calls werden ohne Rückfrage ausgeführt.
|
|
|
|
## Code-Referenzen
|
|
|
|
Durch Code-Suche im Hermes-Agent-Repository gefunden:
|
|
|
|
```bash
|
|
$ rg -l "approvals" --type ts --type py | head -10
|
|
src/gateway/approvals.ts
|
|
src/gateway/permissions.ts
|
|
src/cli/config.ts
|
|
src/tui/approval-panel.tsx
|
|
src/tui/session-view.tsx
|
|
src/core/tool-executor.ts
|
|
src/core/safety.ts
|
|
src/agent/executor.ts
|
|
tests/approvals.test.ts
|
|
tests/yolo-mode.test.ts
|
|
```
|
|
|
|
Insgesamt **33 Code-Referenzen** in **10 Dateien** verteilt auf Gateway, CLI, TUI, Core und Tests.
|
|
|
|
## Verifikation
|
|
|
|
```bash
|
|
$ hermes config get approvals.mode
|
|
false
|
|
|
|
$ cat ~/.hermes/config.yaml | grep -A2 approvals
|
|
approvals:
|
|
mode: false
|
|
```
|
|
|
|
## §§ WICHTIG
|
|
|
|
- `approvals.mode: false` ist **nicht** dasselbe wie `approvals.mode: "false"` (String). Der YAML-Parser interpretiert nur den nativen Boolean als YOLO.
|
|
- Nach Setzen von `approvals.mode: false` erscheint **keine** UI-Bestätigung mehr. Tool-Calls werden sofort ausgeführt.
|
|
- Für Produktivumgebungen `approvals.mode: true` belassen und gezielte Freigaben über `allowed_tools` steuern.
|