MCPcopy
hub / github.com/cursor/cookbook / GET

Function GET

sdk/agent-kanban/src/app/api/agents/[agentId]/artifacts/route.ts:7–20  ·  view source on GitHub ↗
(
  request: Request,
  { params }: { params: Promise<{ agentId: string }> }
)

Source from the content-addressed store, hash-verified

5export const dynamic = "force-dynamic"
6
7export async function GET(
8 request: Request,
9 { params }: { params: Promise<{ agentId: string }> }
10) {
11 try {
12 const session = await requireSession(request)
13 const { agentId } = await params
14 return Response.json({
15 artifacts: await listArtifactsForAgent(session.apiKey, agentId),
16 })
17 } catch (error) {
18 return jsonError(error, "Failed to list agent artifacts.")
19 }
20}

Callers

nothing calls this directly

Calls 3

requireSessionFunction · 0.90
listArtifactsForAgentFunction · 0.90
jsonErrorFunction · 0.90

Tested by

no test coverage detected