fix: tolerate context-likes without user_content or session in record_agent_invocation
Use getattr for ctx.user_content and ctx.session.events when calling _record_agent_metrics so that test doubles, partial migrations, and external embedders that pass minimal InvocationContext-like objects don't crash with AttributeError on the metrics call. Change-Id: I7d54252dd222f3796e6ccdc13d4844a177b65e7d
G
George Weale committed
0775da5ae406b6db04d401b779b3ab72e9a0fc9f
Parent: e16629b