(publisherId: string)
| 26 | import { logger } from '@/util/logger' |
| 27 | |
| 28 | async 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 | |
| 40 | export async function POST(request: NextRequest) { |
| 41 | try { |