fix: dedup request_execution, persistent approval bar, JSON payload
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled

- Add dedup in request_execution: check entities(type,name) uniqueness before
  creating duplicate executions. Returns 'already queued' message to the LLM,
  preventing tool-calling loops.

- Fix createApproval JSON payload: use json.Marshal instead of fmt.Sprintf
  to escape params (could contain unescaped double quotes from JSON config).

- Add ON CONFLICT DO NOTHING to entity/execution inserts for dedup race safety.

- Persistent approval bar at top of Chat.svelte: aggregates pendingApprovals
  from all messages, fixed position (won't scroll away). Approve/deny/approve-all.

- Update SOUL.md: agent must STOP after queuing a gated action.

- Fix ToolCallGroup  reactivity: wasActive = (active).
This commit is contained in:
2026-07-09 23:19:55 +02:00
parent d9683cfe29
commit 9376dc7d89
3 changed files with 111 additions and 8 deletions

View File

@@ -59,6 +59,11 @@ Before calling `request_execution`:
- If `destructive` or `config_mutation`: escalate to operator
- If `reversible_low` with validated pattern: auto-act allowed
**After requesting a gated action that queues for approval: STOP.** Present the
plan to the operator and wait. Do not call `request_execution` again for the
same action — the system will tell you it's already queued. One approval per
action is enough. The operator will approve (or deny) from the chat UI.
## Token efficiency
Use MCP tools over raw queries. MCP responses are already compressed. When