(fullAgentId: string)
| 85 | * If the agent ID is not in the publisher/agent format, return null |
| 86 | */ |
| 87 | export function parsePublishedAgentId(fullAgentId: string): { |
| 88 | publisherId: string |
| 89 | agentId: string |
| 90 | version?: string |
| 91 | } | null { |
| 92 | const { publisherId, agentId, version } = parseAgentId(fullAgentId) |
| 93 | if (!publisherId || !agentId) { |
| 94 | return null |
| 95 | } |
| 96 | return { |
| 97 | publisherId, |
| 98 | agentId, |
| 99 | version, |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * Normalizes an agent ID for lookup by accepting underscores as aliases for |
no test coverage detected