runWithSubagentScope<R> function
Runs body with id published as the enclosing subagent identity.
Nested scopes shadow outer ones; the value is visible to every callback
executed within body's async chain (tool executions included).
Implementation
R runWithSubagentScope<R>(String id, R Function() body) =>
runZoned(body, zoneValues: {subagentIdZoneKey: id});