pub fn provider_constructs_agent(
p: &ProviderDecl,
is_agent: impl Fn(&str) -> bool,
) -> boolExpand description
#2355: whether a bodied provider’s ops construct one of its context’s own
agents (is_agent). Such a provider takes a deps even with no given:
its agent calls hand this.deps to the agent’s methods, and on Workers the
agent factory reads the Worker’s env from it. Syntactic, so the provider
class, every composer that builds it, and
phase_workers_provider_agent_cross_context agree on the answer; a local
shadowing an agent’s name only costs an unused deps. It matches the
construction shape Agent(key), the one the emitter’s agent_construct
lowers; a new way to reach an agent must be added here too.