Phase 3: proactive heartbeat — EventBridge 30min rule, heartbeat-runner Lambda, HEARTBEAT_OK suppression
This commit is contained in:
@@ -262,6 +262,10 @@ def handler(event, context):
|
||||
# Flush any remaining text
|
||||
print(f'[agent-runner] stream done buffer={len(text_buffer)} bot_token_set={bool(bot_token)}')
|
||||
if text_buffer.strip() and bot_token:
|
||||
# Suppress heartbeat OK responses
|
||||
if text_buffer.strip().upper().startswith('HEARTBEAT_OK'):
|
||||
print(f'[agent-runner] heartbeat suppressed for {actor_id}')
|
||||
return
|
||||
print(f'[agent-runner] flushing {len(text_buffer)}c to {chat_id}')
|
||||
send_telegram_direct(str(chat_id), bot_token, text_buffer.strip())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user