(card: AgentCard, fallbackUrl: string)
| 371 | } |
| 372 | |
| 373 | export function agentCardOutput(card: AgentCard, fallbackUrl: string): A2AAgentCardOutput { |
| 374 | const iface = card.supportedInterfaces.at(0) |
| 375 | return { |
| 376 | name: card.name, |
| 377 | description: card.description, |
| 378 | url: iface?.url ?? fallbackUrl, |
| 379 | version: card.version, |
| 380 | protocolVersion: iface?.protocolVersion ?? '', |
| 381 | capabilities: { |
| 382 | streaming: card.capabilities?.streaming ?? false, |
| 383 | pushNotifications: card.capabilities?.pushNotifications ?? false, |
| 384 | extendedAgentCard: card.capabilities?.extendedAgentCard ?? false, |
| 385 | }, |
| 386 | skills: card.skills.map((skill) => ({ |
| 387 | id: skill.id, |
| 388 | name: skill.name, |
| 389 | description: skill.description, |
| 390 | })), |
| 391 | defaultInputModes: card.defaultInputModes, |
| 392 | defaultOutputModes: card.defaultOutputModes, |
| 393 | } |
| 394 | } |
no outgoing calls
no test coverage detected