MCPcopy
hub / github.com/CodebuffAI/codebuff / getPublishedAgentIds

Function getPublishedAgentIds

web/src/app/api/agents/publish/route.ts:28–38  ·  view source on GitHub ↗
(publisherId: string)

Source from the content-addressed store, hash-verified

26import { logger } from '@/util/logger'
27
28async function getPublishedAgentIds(publisherId: string) {
29 const agents = await db
30 .select({
31 id: schema.agentConfig.id,
32 version: schema.agentConfig.version,
33 })
34 .from(schema.agentConfig)
35 .where(eq(schema.agentConfig.publisher_id, publisherId))
36
37 return new Set(agents.map((a) => `${publisherId}/${a.id}@${a.version}`))
38}
39
40export async function POST(request: NextRequest) {
41 try {

Callers 1

POSTFunction · 0.85

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected