pub fn declared_env(agent: &Agent, defaults: &[String]) -> Vec<String>Expand description
Resolves the environment an agent needs: its own CLI’s credentials and its MCP servers’.
Collected across every server the agent declares, because they are all started inside the one
child process and share its environment, and combined with what the agent named for itself.
defaults covers the credential every agent’s CLI needs; it adds to the agent’s own list
rather than being overridden by it, because the two answer different questions — “what does
this CLI need to start” and “what may this particular agent hold”.