feat(heartbeat): improve prompting, suppression, delivery targets and session cleanup

- Rewrite heartbeat prompt to instruct agent to EXECUTE checklist tasks, not echo them
- Simplify suppression: HEARTBEAT_OK present = always suppress, absent = always deliver
- Add delivery targets RPC (heartbeat.targets) for channel/chatId picker
- Sanitize backend errors — never expose raw SQL to client
- Add session cleanup for isolated heartbeat sessions after run
- Cap StaggerOffset at 10% of interval to avoid user-visible delay
- Fix Upsert to persist next_run_at correctly
This commit is contained in:
viettranx committed 2026-03-18 16:37:36 +07:00
1 parent b6f6af01d2
commit 96cfd1bf08
6 files changed
+155 -31

No files matched your search

+1
View File
@@ -92,6 +92,7 @@ const (
MethodHeartbeatLogs = "heartbeat.logs"
MethodHeartbeatChecklistGet = "heartbeat.checklist.get"
MethodHeartbeatChecklistSet = "heartbeat.checklist.set"
MethodHeartbeatTargets = "heartbeat.targets"
)
// Channel instances management