( definitions: readonly AgentDefinition[], )
| 231 | } |
| 232 | |
| 233 | export function agentProfilesForDefinitions( |
| 234 | definitions: readonly AgentDefinition[], |
| 235 | ): [AgentProfile, ...AgentProfile[]] { |
| 236 | const profiles = definitions.map((definition) => definition.profile); |
| 237 | if (profiles.length === 0) throw new Error('At least one agent definition is required'); |
| 238 | if (new Set(profiles).size !== profiles.length) { |
| 239 | throw new Error('Agent definitions must have unique profiles'); |
| 240 | } |
| 241 | return profiles as [AgentProfile, ...AgentProfile[]]; |
| 242 | } |
| 243 | |
| 244 | export function requireAgentDefinitionByProfile( |
| 245 | definitions: readonly AgentDefinition[], |
no outgoing calls
no test coverage detected