Track remaining multi-agent v2 tools in analytics (#40585)

## What changed

- Record collaboration tool analytics for `send_message`, `followup_task`,
  `interrupt_agent`, and `list_agents`, including receiver attribution, duration,
  failures, and interrupted calls.
- Include these calls in per-turn subagent tool counts while keeping the existing
  `subAgentActivity` output unchanged and omitting additional public collaborator
  tool items.
- Extend the collaboration tool schemas with the new tool variants and the
  `interrupted` terminal status.

## Testing

- Add an app-server integration test covering successful and failed calls,
  receiver attribution, duration, prompt omission, activity items, and turn
  counts.

GitOrigin-RevId: e73eaa05c508261e5fc97e7d08d7881a31e04e22
This commit is contained in:
jif authored and copyberry committed 2026-08-25 10:17:03 +00:00
1 parent d52478c52e
commit 4fa6ad1730
38 files changed
+472 -45

No files matched your search

@@ -158,6 +158,10 @@ fn activity_summary(item: &ThreadItem) -> Option<String> {
}
ThreadItem::CollabAgentToolCall { tool, .. } => {
let action = match tool {
CollabAgentTool::SendMessage
| CollabAgentTool::FollowupTask
| CollabAgentTool::InterruptAgent
| CollabAgentTool::ListAgents => return None,
CollabAgentTool::SpawnAgent => "Spawned an agent",
CollabAgentTool::SendInput => "Sent input to an agent",
CollabAgentTool::ResumeAgent => "Resumed an agent",