mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
Route HEARTBEAT writes to workspace DB and broadcast notifications
- Add dedicated "heartbeat" target in memory_write tool so the LLM routes HEARTBEAT.md writes to the database instead of the filesystem - Update tool description to clarify it's database-backed storage - Broadcast heartbeat notifications to all channels when no explicit notify target is configured, instead of silently logging them Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
0ca05e3de3
commit
7fcc2279cc
+13
-5
@@ -212,11 +212,19 @@ impl Agent {
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
// No target configured, just log
|
||||
tracing::info!(
|
||||
"Heartbeat notification (no target configured): {}",
|
||||
&response.content
|
||||
);
|
||||
// No explicit target, broadcast to all channels
|
||||
// for the default user so notifications actually
|
||||
// reach someone instead of vanishing into logs.
|
||||
let results = channels.broadcast_all("default", response).await;
|
||||
for (ch, result) in results {
|
||||
if let Err(e) = result {
|
||||
tracing::warn!(
|
||||
"Failed to broadcast heartbeat to {}: {}",
|
||||
ch,
|
||||
e
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user