Agents: read-only agent-to-agent observer in the chat card + live agent.message
A new "Observe" button (Eye) sits next to "+ New" in the agent chat header; clicking flips the card into a read-only observer of that agent's conversations with other agents, updating live as messages happen. - frontend: AgentObserver (history from /api/claw-chat/* + live agent.message overlay filtered to the agent, read-only banner, no composer); ClawChatSection toggle + flip. - backend: emit a live agent.message run-event when chat.send succeeds — events.rs AgentMessage variant, chat.send returns to_id, runtime emits in both tool paths, world.rs normalizes agent_message → agent.message SSE. No migration, no new table. Roadmap (not built): group/multi-party rooms; A2A protocol (a2a-rs) adoption. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f1f1f4f862
commit
66c4a80985
@@ -133,6 +133,25 @@ fn normalize_run_event(
|
||||
json!({ "doorId": door_id, "agentId": agent_id, "action": action, "target": category, "summary": action }),
|
||||
));
|
||||
}
|
||||
"agent_message" => {
|
||||
let s = |k: &str| {
|
||||
payload
|
||||
.get(k)
|
||||
.and_then(|v| v.as_str())
|
||||
.unwrap_or("")
|
||||
.to_owned()
|
||||
};
|
||||
out.push((
|
||||
"agent.message",
|
||||
json!({
|
||||
"fromAgentId": agent_id,
|
||||
"toAgentId": s("to_agent_id"),
|
||||
"toName": s("to_name"),
|
||||
"text": s("text"),
|
||||
"threadId": s("thread_id"),
|
||||
}),
|
||||
));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
out
|
||||
|
||||
Reference in New Issue
Block a user