* Convert AgentConfig + MemberProfile to Agent format
(config: AgentConfig, profile: MemberProfile)
| 160 | * Convert AgentConfig + MemberProfile to Agent format |
| 161 | */ |
| 162 | private configToAgent(config: AgentConfig, profile: MemberProfile): Agent { |
| 163 | return { |
| 164 | name: config.name || profile.display_name, |
| 165 | url: config.url, |
| 166 | type: (config.type as AgentType) || "buying", |
| 167 | protocol: "mcp", |
| 168 | description: profile.description || "", |
| 169 | mcp_endpoint: config.url, |
| 170 | contact: { |
| 171 | name: profile.display_name, |
| 172 | email: profile.contact_email || "", |
| 173 | website: profile.contact_website || "", |
| 174 | }, |
| 175 | added_date: profile.created_at.toISOString().split("T")[0], |
| 176 | }; |
| 177 | } |
| 178 | |
| 179 | /** |
| 180 | * Convert DiscoveredAgent to Agent format |
no outgoing calls
no test coverage detected