mirror of
https://github.com/JackChen-me/open-multi-agent.git
synced 2026-10-19 01:29:57 -05:00
The field was public and typed but never read, so a caller who set `maxConcurrency: 3` on a team typechecked cleanly, got no warning, and ran at the orchestrator's value (5 by default). The class JSDoc example demonstrated the dead field, and 22 examples copied it. Wire it to the pool that runs the team. The team cap intersects with `OrchestratorConfig.maxConcurrency` rather than replacing it: the smaller of the two wins, so a team can narrow the pool for its own runs but never widen it past the orchestrator ceiling. This covers all three `buildPool` call sites, each of which already has the team in scope. An unusable cap reports an `INVALID_TEAM_MAX_CONCURRENCY` warning on `onProgress` and falls back to the orchestrator value, which is what those configs already did while the field was ignored. Rejecting them would make this a breaking change under the definition in RELEASING.md, and a value computed from the environment is a realistic way to arrive at `NaN`. The check still cannot be left to `Semaphore`, which rejects only values below 1 and would let `NaN` through to a pool that never grants a slot. Every in-repo example sets the team cap equal to its orchestrator cap, so their behavior is unchanged.