fix: dedup request_execution, persistent approval bar, JSON payload
- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user