| 1 | package main |
| 2 | |
| 3 | import "reasonix/internal/event" |
| 4 | |
| 5 | // RecordSubagentLifecycle consumes content-free child lifecycle telemetry. |
| 6 | // ToolResult already carries the live card metadata; this side channel only |
| 7 | // contributes scrubbed status/error buckets to anonymous desktop diagnostics. |
| 8 | func (s *tabEventSink) RecordSubagentLifecycle(info event.SubagentLifecycleInfo) { |
| 9 | if s == nil { |
| 10 | return |
| 11 | } |
| 12 | _, app := s.binding() |
| 13 | if app == nil { |
| 14 | return |
| 15 | } |
| 16 | if metrics := app.metrics.Load(); metrics != nil { |
| 17 | metrics.observeSubagentLifecycle(info) |
| 18 | metrics.persist() |
| 19 | } |
| 20 | } |
| 21 |