MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / parsePublishedAgentId

Function parsePublishedAgentId

common/src/util/agent-id-parsing.ts:87–101  ·  view source on GitHub ↗
(fullAgentId: string)

Source from the content-addressed store, hash-verified

85 * If the agent ID is not in the publisher/agent format, return null
86 */
87export 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

Callers 1

getAgentTemplateFunction · 0.90

Calls 1

parseAgentIdFunction · 0.70

Tested by

no test coverage detected