Clone utility for ADK agent structs.
Mirrors Python ADK's BaseAgent.clone():
- Deep copies sub_agents recursively
- Shallow copies list fields (new list, same element references)
- Resets parent_agent to nil on the cloned root
- Wires parent_agent on cloned sub_agents to point at the new clone
- Validates update keys exist on the struct
- Disallows updating
parent_agentdirectly
Summary
Functions
Clone an agent with optional field overrides.