@superinterface/server 1.0.40 → 1.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/eslint/.cache_btwyo7 +1 -1
  5. package/.next/fallback-build-manifest.json +2 -2
  6. package/.next/server/app/_not-found.html +1 -1
  7. package/.next/server/app/_not-found.rsc +1 -1
  8. package/.next/server/app/index.html +1 -1
  9. package/.next/server/app/index.rsc +1 -1
  10. package/.next/server/chunks/[root-of-the-server]__441cee00._.js +1 -1
  11. package/.next/server/chunks/[root-of-the-server]__441cee00._.js.map +1 -1
  12. package/.next/server/chunks/[root-of-the-server]__eb816e13._.js +1 -1
  13. package/.next/server/chunks/[root-of-the-server]__eb816e13._.js.map +1 -1
  14. package/.next/server/pages/404.html +1 -1
  15. package/.next/server/pages/500.html +1 -1
  16. package/.next/trace +1 -1
  17. package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/buildRoute.d.ts.map +1 -1
  18. package/dist/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/buildRoute.js +1 -12
  19. package/dist/app/api/assistants/[assistantId]/mcp-servers/buildRoute.d.ts.map +1 -1
  20. package/dist/app/api/assistants/[assistantId]/mcp-servers/buildRoute.js +1 -12
  21. package/dist/lib/mcpServers/mcpServerSchema.d.ts +38 -38
  22. package/dist/lib/mcpServers/mcpServerSchema.d.ts.map +1 -1
  23. package/dist/lib/mcpServers/mcpServerSchema.js +11 -3
  24. package/package.json +1 -1
  25. /package/.next/static/{wuIqo1AC4IH0KlhrbfHcA → 3oLvS6zqEM3JjzXyiTqF1}/_buildManifest.js +0 -0
  26. /package/.next/static/{wuIqo1AC4IH0KlhrbfHcA → 3oLvS6zqEM3JjzXyiTqF1}/_clientMiddlewareManifest.json +0 -0
  27. /package/.next/static/{wuIqo1AC4IH0KlhrbfHcA → 3oLvS6zqEM3JjzXyiTqF1}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/cache/cacheHeaders.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/apiKeys/getApiKey.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/misc/isJSON.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/mcpServers/serializeApiMcpServer.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/mcpServers/mcpServerSchema.ts","turbopack:///[project]/supercorp/superinterface/node_modules/next/dist/esm/build/templates/app-route.js","turbopack:///[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/mcp-servers/route.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/mcp-servers/buildRoute.ts"],"sourcesContent":["export const cacheHeaders = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',\n 'Access-Control-Allow-Headers': 'Content-Type',\n}\n","import { ApiKeyType, ApiKey, type PrismaClient } from '@prisma/client'\nimport { validate } from 'uuid'\n\nexport const getApiKey = async ({\n authorization,\n type,\n prisma,\n}: {\n authorization: string | null\n type: ApiKeyType\n prisma: PrismaClient\n}): Promise<ApiKey | null> => {\n if (!authorization) {\n return null\n }\n\n const [, apiKeyValue] = authorization.split('Bearer ')\n\n if (!validate(apiKeyValue)) {\n return null\n }\n\n return prisma.apiKey.findFirst({\n where: { type, value: apiKeyValue },\n })\n}\n","export const isJSON = (value: string) => {\n try {\n JSON.parse(value)\n return true\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) {\n return false\n }\n}\n","import type { Prisma, SseTransport, HttpTransport } from '@prisma/client'\n\nconst serializeApiSseTransport = ({\n sseTransport,\n}: {\n sseTransport: SseTransport\n}) => ({\n id: sseTransport.id,\n url: sseTransport.url,\n headers: sseTransport.headers,\n createdAt: sseTransport.createdAt.toISOString(),\n updatedAt: sseTransport.updatedAt.toISOString(),\n})\n\nconst serializeApiHttpTransport = ({\n httpTransport,\n}: {\n httpTransport: HttpTransport\n}) => ({\n id: httpTransport.id,\n url: httpTransport.url,\n headers: httpTransport.headers,\n createdAt: httpTransport.createdAt.toISOString(),\n updatedAt: httpTransport.updatedAt.toISOString(),\n})\n\nexport const serializeApiMcpServer = ({\n mcpServer,\n}: {\n mcpServer: Prisma.McpServerGetPayload<{\n include: {\n sseTransport: true\n httpTransport: true\n }\n }>\n}) => ({\n id: mcpServer.id,\n name: mcpServer.name,\n description: mcpServer.description,\n transportType: mcpServer.transportType,\n sseTransport: mcpServer.sseTransport\n ? serializeApiSseTransport({\n sseTransport: mcpServer.sseTransport,\n })\n : null,\n httpTransport: mcpServer.httpTransport\n ? serializeApiHttpTransport({\n httpTransport: mcpServer.httpTransport,\n })\n : null,\n createdAt: mcpServer.createdAt.toISOString(),\n updatedAt: mcpServer.updatedAt.toISOString(),\n})\n","import { z } from 'zod'\nimport { TransportType } from '@prisma/client'\nimport { isJSON } from '@/lib/misc/isJSON'\n\nconst stdioTransportSchema = z.object({\n command: z.string().min(1),\n args: z.string().min(1),\n})\n\nconst sseTransportSchema = z.object({\n url: z.string().min(1).url(),\n headers: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst httpTransportSchema = z.object({\n url: z.string().min(1).url(),\n headers: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst optionalTrimmedString = z.string().trim().min(1).optional().nullable()\n\nexport const baseSchema = z.object({\n name: optionalTrimmedString,\n description: optionalTrimmedString,\n transportType: z\n .nativeEnum(TransportType)\n .refine((t) => t !== TransportType.STDIO, {\n message: `transportType cannot be ${TransportType.STDIO}`,\n }),\n sseTransport: sseTransportSchema.nullable().optional(),\n httpTransport: httpTransportSchema.nullable().optional(),\n})\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const superRefine = (values: any, ctx: any) => {\n if (values.transportType === TransportType.STDIO) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `Transport type ${TransportType.STDIO} is not allowed.`,\n })\n\n const result = stdioTransportSchema.safeParse(values.stdioTransport)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['stdioTransport', ...issue.path],\n }),\n )\n } else if (values.transportType === TransportType.SSE) {\n const result = sseTransportSchema.safeParse(values.sseTransport)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['sseTransport', ...issue.path],\n }),\n )\n } else if (values.transportType === TransportType.HTTP) {\n const result = httpTransportSchema.safeParse(values.httpTransport)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['httpTransport', ...issue.path],\n }),\n )\n }\n}\n\nexport const mcpServerSchema = baseSchema.superRefine(superRefine)\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/assistants/[assistantId]/mcp-servers/route\",\n pathname: \"/api/assistants/[assistantId]/mcp-servers\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/mcp-servers/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n let srcPage = \"/api/assistants/[assistantId]/mcp-servers/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isRevalidate = isIsr && !supportsDynamicResponse;\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n isRevalidate,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${req.url}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isRevalidate,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${req.url}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isRevalidate,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { prisma } from '@/lib/prisma'\nimport { buildGET, buildOPTIONS, buildPOST } from './buildRoute'\n\nexport const GET = buildGET({ prisma })\n\nexport const POST = buildPOST({ prisma })\n\nexport const OPTIONS = buildOPTIONS()\n","import { type NextRequest, NextResponse } from 'next/server'\nimport { ApiKeyType, TransportType, type PrismaClient } from '@prisma/client'\nimport { headers } from 'next/headers'\nimport { cacheHeaders } from '@/lib/cache/cacheHeaders'\nimport { getApiKey } from '@/lib/apiKeys/getApiKey'\nimport { serializeApiMcpServer } from '@/lib/mcpServers/serializeApiMcpServer'\nimport { mcpServerSchema } from '@/lib/mcpServers/mcpServerSchema'\n\ntype RouteProps = {\n params: Promise<{ assistantId: string }>\n}\n\nconst normalizeOptionalString = (value: string | null | undefined) => {\n if (value === undefined) return undefined\n if (value === null) return null\n return value.trim()\n}\n\nexport const buildGET =\n ({ prisma }: { prisma: PrismaClient }) =>\n async (_request: NextRequest, props: RouteProps) => {\n const { assistantId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n type: ApiKeyType.PRIVATE,\n authorization,\n prisma,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const assistant = await prisma.assistant.findFirst({\n where: {\n id: assistantId,\n workspaceId: privateApiKey.workspaceId,\n },\n include: {\n mcpServers: {\n include: {\n stdioTransport: true,\n sseTransport: true,\n httpTransport: true,\n },\n orderBy: {\n createdAt: 'desc',\n },\n },\n },\n })\n\n if (!assistant) {\n return NextResponse.json({ error: 'No assistant found' }, { status: 400 })\n }\n\n return NextResponse.json(\n {\n mcpServers: assistant.mcpServers.map((mcpServer) =>\n serializeApiMcpServer({\n mcpServer,\n }),\n ),\n },\n { headers: cacheHeaders },\n )\n }\n\nexport const buildPOST =\n ({ prisma }: { prisma: PrismaClient }) =>\n async (request: NextRequest, props: RouteProps) => {\n const { assistantId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n authorization,\n type: ApiKeyType.PRIVATE,\n prisma,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const body = await request.json()\n const parsed = mcpServerSchema.safeParse(body)\n\n if (!parsed.success) {\n return NextResponse.json({ error: 'Invalid payload' }, { status: 400 })\n }\n\n const { transportType, sseTransport, httpTransport, name, description } =\n parsed.data\n const normalizedName = normalizeOptionalString(name)\n const normalizedDescription = normalizeOptionalString(description)\n\n const workspaceId = privateApiKey.workspaceId\n\n const assistant = await prisma.assistant.findFirst({\n where: { id: assistantId, workspaceId },\n })\n\n if (!assistant) {\n return NextResponse.json({ error: 'No assistant found' }, { status: 400 })\n }\n\n const mcpServer = await prisma.mcpServer.create({\n data: {\n transportType,\n ...(transportType === TransportType.SSE\n ? {\n sseTransport: {\n create: {\n url: sseTransport!.url,\n headers: JSON.parse(sseTransport!.headers),\n },\n },\n }\n : {}),\n ...(transportType === TransportType.HTTP\n ? {\n httpTransport: {\n create: {\n url: httpTransport!.url,\n headers: JSON.parse(httpTransport!.headers),\n },\n },\n }\n : {}),\n ...(normalizedName !== undefined ? { name: normalizedName } : {}),\n ...(normalizedDescription !== undefined\n ? { description: normalizedDescription }\n : {}),\n assistant: {\n connect: {\n id: assistantId,\n workspaceId,\n },\n },\n },\n include: {\n stdioTransport: true,\n sseTransport: true,\n httpTransport: true,\n },\n })\n\n return NextResponse.json(\n {\n mcpServer: serializeApiMcpServer({ mcpServer }),\n },\n { headers: cacheHeaders },\n )\n }\n\nexport const buildOPTIONS = () => () =>\n NextResponse.json(\n {},\n {\n headers: cacheHeaders,\n },\n )\n"],"names":[],"mappings":"6jCAAO,IAAM,EAAe,CAC1B,8BAA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O,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAI,GAAG,CAAA,CAAE,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAcV,GAbI,AAAE,CAAD,YAAgB,EAAA,eAAe,EAChC,CADmC,KAC7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,cAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[5]}
1
+ {"version":3,"sources":["turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/cache/cacheHeaders.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/apiKeys/getApiKey.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/misc/isJSON.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/mcpServers/serializeApiMcpServer.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/mcpServers/mcpServerSchema.ts","turbopack:///[project]/supercorp/superinterface/node_modules/next/dist/esm/build/templates/app-route.js","turbopack:///[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/mcp-servers/route.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/mcp-servers/buildRoute.ts"],"sourcesContent":["export const cacheHeaders = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',\n 'Access-Control-Allow-Headers': 'Content-Type',\n}\n","import { ApiKeyType, ApiKey, type PrismaClient } from '@prisma/client'\nimport { validate } from 'uuid'\n\nexport const getApiKey = async ({\n authorization,\n type,\n prisma,\n}: {\n authorization: string | null\n type: ApiKeyType\n prisma: PrismaClient\n}): Promise<ApiKey | null> => {\n if (!authorization) {\n return null\n }\n\n const [, apiKeyValue] = authorization.split('Bearer ')\n\n if (!validate(apiKeyValue)) {\n return null\n }\n\n return prisma.apiKey.findFirst({\n where: { type, value: apiKeyValue },\n })\n}\n","export const isJSON = (value: string) => {\n try {\n JSON.parse(value)\n return true\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) {\n return false\n }\n}\n","import type { Prisma, SseTransport, HttpTransport } from '@prisma/client'\n\nconst serializeApiSseTransport = ({\n sseTransport,\n}: {\n sseTransport: SseTransport\n}) => ({\n id: sseTransport.id,\n url: sseTransport.url,\n headers: sseTransport.headers,\n createdAt: sseTransport.createdAt.toISOString(),\n updatedAt: sseTransport.updatedAt.toISOString(),\n})\n\nconst serializeApiHttpTransport = ({\n httpTransport,\n}: {\n httpTransport: HttpTransport\n}) => ({\n id: httpTransport.id,\n url: httpTransport.url,\n headers: httpTransport.headers,\n createdAt: httpTransport.createdAt.toISOString(),\n updatedAt: httpTransport.updatedAt.toISOString(),\n})\n\nexport const serializeApiMcpServer = ({\n mcpServer,\n}: {\n mcpServer: Prisma.McpServerGetPayload<{\n include: {\n sseTransport: true\n httpTransport: true\n }\n }>\n}) => ({\n id: mcpServer.id,\n name: mcpServer.name,\n description: mcpServer.description,\n transportType: mcpServer.transportType,\n sseTransport: mcpServer.sseTransport\n ? serializeApiSseTransport({\n sseTransport: mcpServer.sseTransport,\n })\n : null,\n httpTransport: mcpServer.httpTransport\n ? serializeApiHttpTransport({\n httpTransport: mcpServer.httpTransport,\n })\n : null,\n createdAt: mcpServer.createdAt.toISOString(),\n updatedAt: mcpServer.updatedAt.toISOString(),\n})\n","import { z } from 'zod'\nimport { TransportType } from '@prisma/client'\nimport { isJSON } from '@/lib/misc/isJSON'\n\nconst stdioTransportSchema = z.object({\n command: z.string().min(1),\n args: z.string().min(1),\n})\n\nconst sseTransportSchema = z.object({\n url: z.string().min(1).url(),\n headers: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst httpTransportSchema = z.object({\n url: z.string().min(1).url(),\n headers: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst optionalNameString = z\n .string()\n .min(1)\n .regex(/^[a-zA-Z0-9-]+$/, {\n message: 'Name can only include letters, numbers, and hyphens.',\n })\n .optional()\n .nullable()\n\nconst optionalDescriptionString = z.string().min(1).optional().nullable()\n\nexport const baseSchema = z.object({\n name: optionalNameString,\n description: optionalDescriptionString,\n transportType: z\n .nativeEnum(TransportType)\n .refine((t) => t !== TransportType.STDIO, {\n message: `transportType cannot be ${TransportType.STDIO}`,\n }),\n sseTransport: sseTransportSchema.nullable().optional(),\n httpTransport: httpTransportSchema.nullable().optional(),\n})\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const superRefine = (values: any, ctx: any) => {\n if (values.transportType === TransportType.STDIO) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `Transport type ${TransportType.STDIO} is not allowed.`,\n })\n\n const result = stdioTransportSchema.safeParse(values.stdioTransport)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['stdioTransport', ...issue.path],\n }),\n )\n } else if (values.transportType === TransportType.SSE) {\n const result = sseTransportSchema.safeParse(values.sseTransport)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['sseTransport', ...issue.path],\n }),\n )\n } else if (values.transportType === TransportType.HTTP) {\n const result = httpTransportSchema.safeParse(values.httpTransport)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['httpTransport', ...issue.path],\n }),\n )\n }\n}\n\nexport const mcpServerSchema = baseSchema.superRefine(superRefine)\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/assistants/[assistantId]/mcp-servers/route\",\n pathname: \"/api/assistants/[assistantId]/mcp-servers\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/mcp-servers/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n let srcPage = \"/api/assistants/[assistantId]/mcp-servers/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isRevalidate = isIsr && !supportsDynamicResponse;\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n isRevalidate,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${req.url}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isRevalidate,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${req.url}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isRevalidate,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { prisma } from '@/lib/prisma'\nimport { buildGET, buildOPTIONS, buildPOST } from './buildRoute'\n\nexport const GET = buildGET({ prisma })\n\nexport const POST = buildPOST({ prisma })\n\nexport const OPTIONS = buildOPTIONS()\n","import { type NextRequest, NextResponse } from 'next/server'\nimport { ApiKeyType, TransportType, type PrismaClient } from '@prisma/client'\nimport { headers } from 'next/headers'\nimport { cacheHeaders } from '@/lib/cache/cacheHeaders'\nimport { getApiKey } from '@/lib/apiKeys/getApiKey'\nimport { serializeApiMcpServer } from '@/lib/mcpServers/serializeApiMcpServer'\nimport { mcpServerSchema } from '@/lib/mcpServers/mcpServerSchema'\n\ntype RouteProps = {\n params: Promise<{ assistantId: string }>\n}\n\nexport const buildGET =\n ({ prisma }: { prisma: PrismaClient }) =>\n async (_request: NextRequest, props: RouteProps) => {\n const { assistantId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n type: ApiKeyType.PRIVATE,\n authorization,\n prisma,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const assistant = await prisma.assistant.findFirst({\n where: {\n id: assistantId,\n workspaceId: privateApiKey.workspaceId,\n },\n include: {\n mcpServers: {\n include: {\n stdioTransport: true,\n sseTransport: true,\n httpTransport: true,\n },\n orderBy: {\n createdAt: 'desc',\n },\n },\n },\n })\n\n if (!assistant) {\n return NextResponse.json({ error: 'No assistant found' }, { status: 400 })\n }\n\n return NextResponse.json(\n {\n mcpServers: assistant.mcpServers.map((mcpServer) =>\n serializeApiMcpServer({\n mcpServer,\n }),\n ),\n },\n { headers: cacheHeaders },\n )\n }\n\nexport const buildPOST =\n ({ prisma }: { prisma: PrismaClient }) =>\n async (request: NextRequest, props: RouteProps) => {\n const { assistantId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n authorization,\n type: ApiKeyType.PRIVATE,\n prisma,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const body = await request.json()\n const parsed = mcpServerSchema.safeParse(body)\n\n if (!parsed.success) {\n return NextResponse.json({ error: 'Invalid payload' }, { status: 400 })\n }\n\n const { transportType, sseTransport, httpTransport, name, description } =\n parsed.data\n\n const workspaceId = privateApiKey.workspaceId\n\n const assistant = await prisma.assistant.findFirst({\n where: { id: assistantId, workspaceId },\n })\n\n if (!assistant) {\n return NextResponse.json({ error: 'No assistant found' }, { status: 400 })\n }\n\n const mcpServer = await prisma.mcpServer.create({\n data: {\n transportType,\n ...(transportType === TransportType.SSE\n ? {\n sseTransport: {\n create: {\n url: sseTransport!.url,\n headers: JSON.parse(sseTransport!.headers),\n },\n },\n }\n : {}),\n ...(transportType === TransportType.HTTP\n ? {\n httpTransport: {\n create: {\n url: httpTransport!.url,\n headers: JSON.parse(httpTransport!.headers),\n },\n },\n }\n : {}),\n ...(name !== undefined ? { name } : {}),\n ...(description !== undefined ? { description } : {}),\n assistant: {\n connect: {\n id: assistantId,\n workspaceId,\n },\n },\n },\n include: {\n stdioTransport: true,\n sseTransport: true,\n httpTransport: true,\n },\n })\n\n return NextResponse.json(\n {\n mcpServer: serializeApiMcpServer({ mcpServer }),\n },\n { headers: cacheHeaders },\n )\n }\n\nexport const buildOPTIONS = () => () =>\n NextResponse.json(\n {},\n {\n headers: cacheHeaders,\n },\n )\n"],"names":[],"mappings":"6jCAAO,IAAM,EAAe,CAC1B,8BAA+B,IAC/B,+BAAgC,kCAChC,+BAAgC,cAClC,mDCHA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEO,IAAM,EAAY,MAAO,CAC9B,eAAa,MACb,CAAI,QACJ,CAAM,CAKP,IACC,GAAI,CAAC,EACH,OAAO,KAGT,CAJoB,EAId,EAAG,EAAY,CAAG,EAAc,KAAK,CAAC,iBAEvC,AAAL,AAAK,CAAA,EAAA,CAAD,CAAC,QAAQ,AAAR,EAAS,GAIP,EAAO,MAAM,CAAC,EAJO,OAIE,CAAC,CAC7B,MAAO,MAAE,EAAM,MAAO,CAAY,CACpC,GALS,IAMX,gDCzBO,IAAM,EAAS,AAAC,IACrB,GAAI,CAEF,OADA,KAAK,KAAK,CAAC,IACJ,CAET,CAAE,MAAO,EAAG,CACV,OAAO,CACT,CACF,0ECkBO,IAAM,EAAwB,CAAC,WACpC,CAAS,CAQV,GAAK,CAAC,CACL,GAAI,EAAU,EAAE,CAChB,KAAM,EAAU,IAAI,CACpB,YAAa,EAAU,WAAW,CAClC,cAAe,EAAU,aAAa,CACtC,aAAc,EAAU,YAAY,CAChC,CAvC2B,CAAC,cAChC,CAAY,CAGb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"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/76a8a50dbf44f000.js"/><script src="/_next/static/chunks/079ce3572ffa07f6.js" async=""></script><script src="/_next/static/chunks/4649e58e35bcde4b.js" async=""></script><script src="/_next/static/chunks/turbopack-11882cf18a9eb231.js" async=""></script><script src="/_next/static/chunks/03d938d038bc30e3.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/76a8a50dbf44f000.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[96352,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n3:I[17753,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n4:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"OutletBoundary\"]\n6:I[33159,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"AsyncMetadataOutlet\"]\n8:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"ViewportBoundary\"]\na:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[25098,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"wuIqo1AC4IH0KlhrbfHcA\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/03d938d038bc30e3.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
1
+ <!DOCTYPE html><!--3oLvS6zqEM3JjzXyiTqF1--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/76a8a50dbf44f000.js"/><script src="/_next/static/chunks/079ce3572ffa07f6.js" async=""></script><script src="/_next/static/chunks/4649e58e35bcde4b.js" async=""></script><script src="/_next/static/chunks/turbopack-11882cf18a9eb231.js" async=""></script><script src="/_next/static/chunks/03d938d038bc30e3.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/76a8a50dbf44f000.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[96352,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n3:I[17753,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n4:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"OutletBoundary\"]\n6:I[33159,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"AsyncMetadataOutlet\"]\n8:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"ViewportBoundary\"]\na:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[25098,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"3oLvS6zqEM3JjzXyiTqF1\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/03d938d038bc30e3.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/a6dad97d9634a72d.js"></script><script src="/_next/static/chunks/22bca0be24d1dbb3.js" defer=""></script><script src="/_next/static/chunks/bd1a5816a611d718.js" defer=""></script><script src="/_next/static/chunks/turbopack-3bdbb570d8566903.js" defer=""></script><script src="/_next/static/chunks/e57ec661e9850a31.js" defer=""></script><script src="/_next/static/chunks/turbopack-67ff8c1c5b1ad9a8.js" defer=""></script><script src="/_next/static/wuIqo1AC4IH0KlhrbfHcA/_ssgManifest.js" defer=""></script><script src="/_next/static/wuIqo1AC4IH0KlhrbfHcA/_buildManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"wuIqo1AC4IH0KlhrbfHcA","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/a6dad97d9634a72d.js"></script><script src="/_next/static/chunks/22bca0be24d1dbb3.js" defer=""></script><script src="/_next/static/chunks/bd1a5816a611d718.js" defer=""></script><script src="/_next/static/chunks/turbopack-3bdbb570d8566903.js" defer=""></script><script src="/_next/static/chunks/e57ec661e9850a31.js" defer=""></script><script src="/_next/static/chunks/turbopack-67ff8c1c5b1ad9a8.js" defer=""></script><script src="/_next/static/3oLvS6zqEM3JjzXyiTqF1/_ssgManifest.js" defer=""></script><script src="/_next/static/3oLvS6zqEM3JjzXyiTqF1/_buildManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"3oLvS6zqEM3JjzXyiTqF1","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
package/.next/trace CHANGED
@@ -1 +1 @@
1
- [{"name":"generate-buildid","duration":126,"timestamp":682252296127,"id":4,"parentId":1,"tags":{},"startTime":1760573766609,"traceId":"9ca6badc1dfd1c2e"},{"name":"load-custom-routes","duration":182,"timestamp":682252296302,"id":5,"parentId":1,"tags":{},"startTime":1760573766609,"traceId":"9ca6badc1dfd1c2e"},{"name":"create-dist-dir","duration":962,"timestamp":682252327361,"id":6,"parentId":1,"tags":{},"startTime":1760573766640,"traceId":"9ca6badc1dfd1c2e"},{"name":"create-pages-mapping","duration":107,"timestamp":682252367489,"id":7,"parentId":1,"tags":{},"startTime":1760573766680,"traceId":"9ca6badc1dfd1c2e"},{"name":"collect-app-files","duration":2785,"timestamp":682252367617,"id":8,"parentId":1,"tags":{},"startTime":1760573766680,"traceId":"9ca6badc1dfd1c2e"},{"name":"create-app-mapping","duration":849,"timestamp":682252370420,"id":9,"parentId":1,"tags":{},"startTime":1760573766683,"traceId":"9ca6badc1dfd1c2e"},{"name":"create-app-layouts","duration":188,"timestamp":682252371286,"id":10,"parentId":1,"tags":{},"startTime":1760573766684,"traceId":"9ca6badc1dfd1c2e"},{"name":"collect-default-files","duration":6052,"timestamp":682252380815,"id":12,"parentId":1,"tags":{},"startTime":1760573766694,"traceId":"9ca6badc1dfd1c2e"},{"name":"generate-route-types","duration":31044,"timestamp":682252371828,"id":11,"parentId":1,"tags":{},"startTime":1760573766685,"traceId":"9ca6badc1dfd1c2e"},{"name":"public-dir-conflict-check","duration":887,"timestamp":682252403195,"id":13,"parentId":1,"tags":{},"startTime":1760573766716,"traceId":"9ca6badc1dfd1c2e"},{"name":"generate-routes-manifest","duration":1239,"timestamp":682252404189,"id":14,"parentId":1,"tags":{},"startTime":1760573766717,"traceId":"9ca6badc1dfd1c2e"},{"name":"run-turbopack-compiler","duration":7127427,"timestamp":682252409756,"id":16,"parentId":1,"tags":{},"startTime":1760573766723,"traceId":"9ca6badc1dfd1c2e"},{"name":"verify-and-lint","duration":1826439,"timestamp":682259552380,"id":19,"parentId":1,"tags":{},"startTime":1760573773865,"traceId":"9ca6badc1dfd1c2e"},{"name":"verify-typescript-setup","duration":4595228,"timestamp":682259550018,"id":18,"parentId":1,"tags":{},"startTime":1760573773863,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-static-error-page","duration":2373,"timestamp":682264158119,"id":22,"parentId":21,"tags":{},"startTime":1760573778471,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":4140,"timestamp":682264204131,"id":23,"parentId":21,"tags":{"page":"/_app"},"startTime":1760573778517,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":1999,"timestamp":682264206283,"id":25,"parentId":21,"tags":{"page":"/_document"},"startTime":1760573778519,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":2897,"timestamp":682264205386,"id":24,"parentId":21,"tags":{"page":"/_error"},"startTime":1760573778518,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":207167,"timestamp":682264212324,"id":50,"parentId":26,"tags":{},"startTime":1760573778525,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":213205,"timestamp":682264206325,"id":26,"parentId":21,"tags":{"page":"/_not-found"},"startTime":1760573778519,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":241175,"timestamp":682264217598,"id":51,"parentId":28,"tags":{},"startTime":1760573778531,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":252332,"timestamp":682264206521,"id":28,"parentId":21,"tags":{"page":"/api/api-keys"},"startTime":1760573778519,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":273498,"timestamp":682264219134,"id":54,"parentId":42,"tags":{},"startTime":1760573778532,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":285562,"timestamp":682264207122,"id":42,"parentId":21,"tags":{"page":"/api/providers"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":273774,"timestamp":682264219047,"id":53,"parentId":33,"tags":{},"startTime":1760573778532,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":285938,"timestamp":682264206908,"id":33,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":275522,"timestamp":682264220861,"id":59,"parentId":35,"tags":{},"startTime":1760573778534,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":289460,"timestamp":682264206956,"id":35,"parentId":21,"tags":{"page":"/api/assistants"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":287834,"timestamp":682264219188,"id":55,"parentId":45,"tags":{},"startTime":1760573778532,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":299939,"timestamp":682264207138,"id":45,"parentId":21,"tags":{"page":"/api/tasks"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":298880,"timestamp":682264218825,"id":52,"parentId":30,"tags":{},"startTime":1760573778532,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":311202,"timestamp":682264206571,"id":30,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":304065,"timestamp":682264228407,"id":63,"parentId":46,"tags":{},"startTime":1760573778541,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":325360,"timestamp":682264207143,"id":46,"parentId":21,"tags":{"page":"/api/threads/runs/submit-client-tool-outputs"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":335425,"timestamp":682264228567,"id":64,"parentId":47,"tags":{},"startTime":1760573778542,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":356984,"timestamp":682264207147,"id":47,"parentId":21,"tags":{"page":"/api/workspaces/[workspaceId]"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":339275,"timestamp":682264228892,"id":65,"parentId":48,"tags":{},"startTime":1760573778542,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":361040,"timestamp":682264207152,"id":48,"parentId":21,"tags":{"page":"/api/workspaces"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":343302,"timestamp":682264229795,"id":66,"parentId":27,"tags":{},"startTime":1760573778543,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":366638,"timestamp":682264206482,"id":27,"parentId":21,"tags":{"page":"/api/api-keys/[apiKeyId]"},"startTime":1760573778519,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":351364,"timestamp":682264229826,"id":67,"parentId":29,"tags":{},"startTime":1760573778543,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":374723,"timestamp":682264206547,"id":29,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions/[functionId]"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":356878,"timestamp":682264229829,"id":68,"parentId":32,"tags":{},"startTime":1760573778543,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":379892,"timestamp":682264206842,"id":32,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers/[mcpServerId]"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":359516,"timestamp":682264229832,"id":69,"parentId":34,"tags":{},"startTime":1760573778543,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":382455,"timestamp":682264206935,"id":34,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":365063,"timestamp":682264229834,"id":70,"parentId":41,"tags":{},"startTime":1760573778543,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":387832,"timestamp":682264207117,"id":41,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":382145,"timestamp":682264229837,"id":71,"parentId":43,"tags":{},"startTime":1760573778543,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":404886,"timestamp":682264207127,"id":43,"parentId":21,"tags":{"page":"/api/tasks/[taskId]"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":384995,"timestamp":682264229938,"id":72,"parentId":31,"tags":{},"startTime":1760573778543,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":408350,"timestamp":682264206604,"id":31,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/initial-messages"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":403821,"timestamp":682264232113,"id":73,"parentId":49,"tags":{},"startTime":1760573778545,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":428829,"timestamp":682264207157,"id":49,"parentId":21,"tags":{"page":"/"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":556239,"timestamp":682264220312,"id":57,"parentId":39,"tags":{},"startTime":1760573778533,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":569512,"timestamp":682264207105,"id":39,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/assistants"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":580137,"timestamp":682264220259,"id":56,"parentId":36,"tags":{},"startTime":1760573778533,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":593452,"timestamp":682264206975,"id":36,"parentId":21,"tags":{"page":"/api/files/[fileId]/contents"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":580085,"timestamp":682264220363,"id":58,"parentId":40,"tags":{},"startTime":1760573778533,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":593342,"timestamp":682264207112,"id":40,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/models"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":598269,"timestamp":682264221040,"id":60,"parentId":37,"tags":{},"startTime":1760573778534,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":612414,"timestamp":682264207083,"id":37,"parentId":21,"tags":{"page":"/api/files"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":612912,"timestamp":682264228228,"id":62,"parentId":44,"tags":{},"startTime":1760573778541,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":634044,"timestamp":682264207133,"id":44,"parentId":21,"tags":{"page":"/api/tasks/callback"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"is-page-static","duration":647439,"timestamp":682264226277,"id":61,"parentId":38,"tags":{},"startTime":1760573778539,"traceId":"9ca6badc1dfd1c2e"},{"name":"check-page","duration":666646,"timestamp":682264207099,"id":38,"parentId":21,"tags":{"page":"/api/messages"},"startTime":1760573778520,"traceId":"9ca6badc1dfd1c2e"},{"name":"static-check","duration":716195,"timestamp":682264157574,"id":21,"parentId":1,"tags":{},"startTime":1760573778471,"traceId":"9ca6badc1dfd1c2e"},{"name":"generate-required-server-files","duration":270,"timestamp":682264874976,"id":75,"parentId":1,"tags":{},"startTime":1760573779188,"traceId":"9ca6badc1dfd1c2e"},{"name":"write-routes-manifest","duration":694,"timestamp":682264883530,"id":77,"parentId":1,"tags":{},"startTime":1760573779197,"traceId":"9ca6badc1dfd1c2e"},{"name":"load-dotenv","duration":22,"timestamp":682264898518,"id":80,"parentId":79,"tags":{},"startTime":1760573779211,"traceId":"9ca6badc1dfd1c2e"},{"name":"run-export-path-map","duration":261,"timestamp":682265021506,"id":81,"parentId":79,"tags":{},"startTime":1760573779334,"traceId":"9ca6badc1dfd1c2e"},{"name":"next-export","duration":1091411,"timestamp":682264897967,"id":79,"parentId":1,"tags":{},"startTime":1760573779211,"traceId":"9ca6badc1dfd1c2e"},{"name":"move-exported-app-not-found-","duration":7970,"timestamp":682265990386,"id":82,"parentId":78,"tags":{},"startTime":1760573780303,"traceId":"9ca6badc1dfd1c2e"},{"name":"move-exported-page","duration":40776,"timestamp":682265998459,"id":83,"parentId":78,"tags":{},"startTime":1760573780311,"traceId":"9ca6badc1dfd1c2e"},{"name":"static-generation","duration":1477574,"timestamp":682264892820,"id":78,"parentId":1,"tags":{},"startTime":1760573779206,"traceId":"9ca6badc1dfd1c2e"},{"name":"write-routes-manifest","duration":9435,"timestamp":682266370611,"id":84,"parentId":1,"tags":{},"startTime":1760573780684,"traceId":"9ca6badc1dfd1c2e"},{"name":"node-file-trace-build","duration":3804506,"timestamp":682264877642,"id":76,"parentId":1,"tags":{"isTurbotrace":"false"},"startTime":1760573779191,"traceId":"9ca6badc1dfd1c2e"},{"name":"apply-include-excludes","duration":280,"timestamp":682268682162,"id":85,"parentId":1,"tags":{},"startTime":1760573782995,"traceId":"9ca6badc1dfd1c2e"},{"name":"print-tree-view","duration":2218,"timestamp":682268682780,"id":86,"parentId":1,"tags":{},"startTime":1760573782996,"traceId":"9ca6badc1dfd1c2e"},{"name":"telemetry-flush","duration":31,"timestamp":682268685008,"id":87,"parentId":1,"tags":{},"startTime":1760573782998,"traceId":"9ca6badc1dfd1c2e"},{"name":"next-build","duration":16659647,"timestamp":682252025396,"id":1,"tags":{"buildMode":"default","isTurboBuild":"true","version":"15.5.4","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1760573766338,"traceId":"9ca6badc1dfd1c2e"}]
1
+ [{"name":"generate-buildid","duration":121,"timestamp":684694827401,"id":4,"parentId":1,"tags":{},"startTime":1760576209166,"traceId":"e328a8a8f211bf1c"},{"name":"load-custom-routes","duration":159,"timestamp":684694827568,"id":5,"parentId":1,"tags":{},"startTime":1760576209166,"traceId":"e328a8a8f211bf1c"},{"name":"create-dist-dir","duration":735,"timestamp":684694860056,"id":6,"parentId":1,"tags":{},"startTime":1760576209198,"traceId":"e328a8a8f211bf1c"},{"name":"create-pages-mapping","duration":205,"timestamp":684694936150,"id":7,"parentId":1,"tags":{},"startTime":1760576209275,"traceId":"e328a8a8f211bf1c"},{"name":"collect-app-files","duration":10998,"timestamp":684694936392,"id":8,"parentId":1,"tags":{},"startTime":1760576209275,"traceId":"e328a8a8f211bf1c"},{"name":"create-app-mapping","duration":903,"timestamp":684694947418,"id":9,"parentId":1,"tags":{},"startTime":1760576209286,"traceId":"e328a8a8f211bf1c"},{"name":"create-app-layouts","duration":184,"timestamp":684694948340,"id":10,"parentId":1,"tags":{},"startTime":1760576209287,"traceId":"e328a8a8f211bf1c"},{"name":"collect-default-files","duration":10758,"timestamp":684694949837,"id":12,"parentId":1,"tags":{},"startTime":1760576209288,"traceId":"e328a8a8f211bf1c"},{"name":"generate-route-types","duration":41710,"timestamp":684694948838,"id":11,"parentId":1,"tags":{},"startTime":1760576209287,"traceId":"e328a8a8f211bf1c"},{"name":"public-dir-conflict-check","duration":2673,"timestamp":684694990766,"id":13,"parentId":1,"tags":{},"startTime":1760576209329,"traceId":"e328a8a8f211bf1c"},{"name":"generate-routes-manifest","duration":2217,"timestamp":684694993635,"id":14,"parentId":1,"tags":{},"startTime":1760576209332,"traceId":"e328a8a8f211bf1c"},{"name":"run-turbopack-compiler","duration":8160625,"timestamp":684695010863,"id":16,"parentId":1,"tags":{},"startTime":1760576209349,"traceId":"e328a8a8f211bf1c"},{"name":"verify-and-lint","duration":1875284,"timestamp":684703198546,"id":19,"parentId":1,"tags":{},"startTime":1760576217537,"traceId":"e328a8a8f211bf1c"},{"name":"verify-typescript-setup","duration":5006800,"timestamp":684703193051,"id":18,"parentId":1,"tags":{},"startTime":1760576217532,"traceId":"e328a8a8f211bf1c"},{"name":"check-static-error-page","duration":2077,"timestamp":684708215569,"id":22,"parentId":21,"tags":{},"startTime":1760576222554,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":2575,"timestamp":684708279175,"id":23,"parentId":21,"tags":{"page":"/_app"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":2082,"timestamp":684708279679,"id":25,"parentId":21,"tags":{"page":"/_document"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":2143,"timestamp":684708279619,"id":24,"parentId":21,"tags":{"page":"/_error"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":295215,"timestamp":684708286744,"id":53,"parentId":27,"tags":{},"startTime":1760576222625,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":302388,"timestamp":684708279743,"id":27,"parentId":21,"tags":{"page":"/api/api-keys/[apiKeyId]"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":295478,"timestamp":684708286780,"id":54,"parentId":29,"tags":{},"startTime":1760576222625,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":302505,"timestamp":684708279764,"id":29,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions/[functionId]"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":307776,"timestamp":684708286817,"id":57,"parentId":41,"tags":{},"startTime":1760576222625,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":314716,"timestamp":684708279902,"id":41,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":313011,"timestamp":684708286825,"id":58,"parentId":43,"tags":{},"startTime":1760576222625,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":319951,"timestamp":684708279911,"id":43,"parentId":21,"tags":{"page":"/api/tasks/[taskId]"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":324703,"timestamp":684708286799,"id":55,"parentId":32,"tags":{},"startTime":1760576222625,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":331690,"timestamp":684708279846,"id":32,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers/[mcpServerId]"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":332797,"timestamp":684708286808,"id":56,"parentId":34,"tags":{},"startTime":1760576222625,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":339764,"timestamp":684708279869,"id":34,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":331782,"timestamp":684708303751,"id":62,"parentId":35,"tags":{},"startTime":1760576222642,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":355702,"timestamp":684708279874,"id":35,"parentId":21,"tags":{"page":"/api/assistants"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":340740,"timestamp":684708304235,"id":63,"parentId":33,"tags":{},"startTime":1760576222643,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":365139,"timestamp":684708279862,"id":33,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":368943,"timestamp":684708304252,"id":64,"parentId":45,"tags":{},"startTime":1760576222643,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":393307,"timestamp":684708279921,"id":45,"parentId":21,"tags":{"page":"/api/tasks"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":374309,"timestamp":684708304346,"id":65,"parentId":42,"tags":{},"startTime":1760576222643,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":398804,"timestamp":684708279907,"id":42,"parentId":21,"tags":{"page":"/api/providers"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":378488,"timestamp":684708304352,"id":66,"parentId":30,"tags":{},"startTime":1760576222643,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":403093,"timestamp":684708279771,"id":30,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":383539,"timestamp":684708304421,"id":67,"parentId":47,"tags":{},"startTime":1760576222643,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":408056,"timestamp":684708279930,"id":47,"parentId":21,"tags":{"page":"/api/workspaces/[workspaceId]"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":392005,"timestamp":684708304460,"id":68,"parentId":46,"tags":{},"startTime":1760576222643,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":416565,"timestamp":684708279925,"id":46,"parentId":21,"tags":{"page":"/api/threads/runs/submit-client-tool-outputs"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":412376,"timestamp":684708304494,"id":69,"parentId":26,"tags":{},"startTime":1760576222643,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":437205,"timestamp":684708279694,"id":26,"parentId":21,"tags":{"page":"/_not-found"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":416333,"timestamp":684708304544,"id":70,"parentId":48,"tags":{},"startTime":1760576222643,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":440990,"timestamp":684708279934,"id":48,"parentId":21,"tags":{"page":"/api/workspaces"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":422724,"timestamp":684708304626,"id":71,"parentId":31,"tags":{},"startTime":1760576222643,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":447598,"timestamp":684708279781,"id":31,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/initial-messages"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":426820,"timestamp":684708304664,"id":72,"parentId":28,"tags":{},"startTime":1760576222643,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":451788,"timestamp":684708279756,"id":28,"parentId":21,"tags":{"page":"/api/api-keys"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":421176,"timestamp":684708314691,"id":73,"parentId":49,"tags":{},"startTime":1760576222653,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":455974,"timestamp":684708279939,"id":49,"parentId":21,"tags":{"page":"/"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":505963,"timestamp":684708286255,"id":52,"parentId":40,"tags":{},"startTime":1760576222625,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":512392,"timestamp":684708279898,"id":40,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/models"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":520287,"timestamp":684708286222,"id":51,"parentId":39,"tags":{},"startTime":1760576222625,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":526673,"timestamp":684708279893,"id":39,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/assistants"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":562165,"timestamp":684708286047,"id":50,"parentId":36,"tags":{},"startTime":1760576222625,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":568360,"timestamp":684708279879,"id":36,"parentId":21,"tags":{"page":"/api/files/[fileId]/contents"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":570431,"timestamp":684708286879,"id":59,"parentId":37,"tags":{},"startTime":1760576222625,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":577456,"timestamp":684708279884,"id":37,"parentId":21,"tags":{"page":"/api/files"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":589287,"timestamp":684708301149,"id":61,"parentId":44,"tags":{},"startTime":1760576222640,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":610554,"timestamp":684708279916,"id":44,"parentId":21,"tags":{"page":"/api/tasks/callback"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"is-page-static","duration":599744,"timestamp":684708293259,"id":60,"parentId":38,"tags":{},"startTime":1760576222632,"traceId":"e328a8a8f211bf1c"},{"name":"check-page","duration":613135,"timestamp":684708279889,"id":38,"parentId":21,"tags":{"page":"/api/messages"},"startTime":1760576222618,"traceId":"e328a8a8f211bf1c"},{"name":"static-check","duration":678008,"timestamp":684708215031,"id":21,"parentId":1,"tags":{},"startTime":1760576222554,"traceId":"e328a8a8f211bf1c"},{"name":"generate-required-server-files","duration":277,"timestamp":684708893351,"id":75,"parentId":1,"tags":{},"startTime":1760576223232,"traceId":"e328a8a8f211bf1c"},{"name":"write-routes-manifest","duration":42312,"timestamp":684708898858,"id":77,"parentId":1,"tags":{},"startTime":1760576223237,"traceId":"e328a8a8f211bf1c"},{"name":"load-dotenv","duration":14,"timestamp":684709042259,"id":80,"parentId":79,"tags":{},"startTime":1760576223381,"traceId":"e328a8a8f211bf1c"},{"name":"run-export-path-map","duration":280,"timestamp":684709058460,"id":81,"parentId":79,"tags":{},"startTime":1760576223397,"traceId":"e328a8a8f211bf1c"},{"name":"next-export","duration":940027,"timestamp":684709041781,"id":79,"parentId":1,"tags":{},"startTime":1760576223380,"traceId":"e328a8a8f211bf1c"},{"name":"move-exported-app-not-found-","duration":244067,"timestamp":684709982883,"id":82,"parentId":78,"tags":{},"startTime":1760576224321,"traceId":"e328a8a8f211bf1c"},{"name":"move-exported-page","duration":39767,"timestamp":684710227271,"id":83,"parentId":78,"tags":{},"startTime":1760576224566,"traceId":"e328a8a8f211bf1c"},{"name":"static-generation","duration":1551150,"timestamp":684709038146,"id":78,"parentId":1,"tags":{},"startTime":1760576223377,"traceId":"e328a8a8f211bf1c"},{"name":"write-routes-manifest","duration":105651,"timestamp":684710589561,"id":84,"parentId":1,"tags":{},"startTime":1760576224928,"traceId":"e328a8a8f211bf1c"},{"name":"node-file-trace-build","duration":4193645,"timestamp":684708894931,"id":76,"parentId":1,"tags":{"isTurbotrace":"false"},"startTime":1760576223233,"traceId":"e328a8a8f211bf1c"},{"name":"apply-include-excludes","duration":292,"timestamp":684713088592,"id":85,"parentId":1,"tags":{},"startTime":1760576227427,"traceId":"e328a8a8f211bf1c"},{"name":"print-tree-view","duration":4128,"timestamp":684713089440,"id":86,"parentId":1,"tags":{},"startTime":1760576227428,"traceId":"e328a8a8f211bf1c"},{"name":"telemetry-flush","duration":39,"timestamp":684713093584,"id":87,"parentId":1,"tags":{},"startTime":1760576227432,"traceId":"e328a8a8f211bf1c"},{"name":"next-build","duration":18656576,"timestamp":684694437050,"id":1,"tags":{"buildMode":"default","isTurboBuild":"true","version":"15.5.4","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1760576208775,"traceId":"e328a8a8f211bf1c"}]
@@ -1 +1 @@
1
- {"version":3,"file":"buildRoute.d.ts","sourceRoot":"","sources":["../../../../../../../src/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/buildRoute.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7E,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAO5D,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC9D,CAAA;AA6BD,eAAO,MAAM,QAAQ,GAClB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;GAoD9C,CAAA;AAEH,eAAO,MAAM,UAAU,GACpB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;GAkG7C,CAAA;AAEH,eAAO,MAAM,WAAW,GACrB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;GAwD9C,CAAA;AAEH,eAAO,MAAM,YAAY,8BAMtB,CAAA"}
1
+ {"version":3,"file":"buildRoute.d.ts","sourceRoot":"","sources":["../../../../../../../src/app/api/assistants/[assistantId]/mcp-servers/[mcpServerId]/buildRoute.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7E,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAO5D,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC9D,CAAA;AAuBD,eAAO,MAAM,QAAQ,GAClB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;GAoD9C,CAAA;AAEH,eAAO,MAAM,UAAU,GACpB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;GA8F7C,CAAA;AAEH,eAAO,MAAM,WAAW,GACrB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;GAwD9C,CAAA;AAEH,eAAO,MAAM,YAAY,8BAMtB,CAAA"}
@@ -6,13 +6,6 @@ import { getApiKey } from '../../../../../../lib/apiKeys/getApiKey';
6
6
  import { validate } from 'uuid';
7
7
  import { serializeApiMcpServer } from '../../../../../../lib/mcpServers/serializeApiMcpServer';
8
8
  import { mcpServerSchema } from '../../../../../../lib/mcpServers/mcpServerSchema';
9
- const normalizeOptionalString = (value) => {
10
- if (value === undefined)
11
- return undefined;
12
- if (value === null)
13
- return null;
14
- return value.trim();
15
- };
16
9
  const validateIds = ({ assistantId, mcpServerId, }) => {
17
10
  if (!validate(assistantId)) {
18
11
  return NextResponse.json({ error: 'Invalid assistant id' }, { status: 400 });
@@ -84,8 +77,6 @@ export const buildPATCH = ({ prisma }) => async (request, props) => {
84
77
  return NextResponse.json({ error: 'Invalid payload' }, { status: 400 });
85
78
  }
86
79
  const { transportType, sseTransport, httpTransport, name, description } = parsed.data;
87
- const normalizedName = normalizeOptionalString(name);
88
- const normalizedDescription = normalizeOptionalString(description);
89
80
  const mcpServer = await prisma.mcpServer.findFirst({
90
81
  where: {
91
82
  id: mcpServerId,
@@ -102,9 +93,7 @@ export const buildPATCH = ({ prisma }) => async (request, props) => {
102
93
  where: {
103
94
  id: mcpServerId,
104
95
  },
105
- data: Object.assign(Object.assign(Object.assign(Object.assign({ transportType }, (normalizedName !== undefined ? { name: normalizedName } : {})), (normalizedDescription !== undefined
106
- ? { description: normalizedDescription }
107
- : {})), (transportType === TransportType.SSE
96
+ data: Object.assign(Object.assign(Object.assign(Object.assign({ transportType }, (name !== undefined ? { name } : {})), (description !== undefined ? { description } : {})), (transportType === TransportType.SSE
108
97
  ? {
109
98
  sseTransport: {
110
99
  update: {
@@ -1 +1 @@
1
- {"version":3,"file":"buildRoute.d.ts","sourceRoot":"","sources":["../../../../../../src/app/api/assistants/[assistantId]/mcp-servers/buildRoute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAO7E,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACzC,CAAA;AAQD,eAAO,MAAM,QAAQ,GAClB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;GAuD9C,CAAA;AAEH,eAAO,MAAM,SAAS,GACnB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;GA2F7C,CAAA;AAEH,eAAO,MAAM,YAAY,8BAMtB,CAAA"}
1
+ {"version":3,"file":"buildRoute.d.ts","sourceRoot":"","sources":["../../../../../../src/app/api/assistants/[assistantId]/mcp-servers/buildRoute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAO7E,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,QAAQ,GAClB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;GAuD9C,CAAA;AAEH,eAAO,MAAM,SAAS,GACnB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW,EAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;GAuF7C,CAAA;AAEH,eAAO,MAAM,YAAY,8BAMtB,CAAA"}
@@ -5,13 +5,6 @@ import { cacheHeaders } from '../../../../../lib/cache/cacheHeaders';
5
5
  import { getApiKey } from '../../../../../lib/apiKeys/getApiKey';
6
6
  import { serializeApiMcpServer } from '../../../../../lib/mcpServers/serializeApiMcpServer';
7
7
  import { mcpServerSchema } from '../../../../../lib/mcpServers/mcpServerSchema';
8
- const normalizeOptionalString = (value) => {
9
- if (value === undefined)
10
- return undefined;
11
- if (value === null)
12
- return null;
13
- return value.trim();
14
- };
15
8
  export const buildGET = ({ prisma }) => async (_request, props) => {
16
9
  const { assistantId } = await props.params;
17
10
  const headersList = await headers();
@@ -75,8 +68,6 @@ export const buildPOST = ({ prisma }) => async (request, props) => {
75
68
  return NextResponse.json({ error: 'Invalid payload' }, { status: 400 });
76
69
  }
77
70
  const { transportType, sseTransport, httpTransport, name, description } = parsed.data;
78
- const normalizedName = normalizeOptionalString(name);
79
- const normalizedDescription = normalizeOptionalString(description);
80
71
  const workspaceId = privateApiKey.workspaceId;
81
72
  const assistant = await prisma.assistant.findFirst({
82
73
  where: { id: assistantId, workspaceId },
@@ -103,9 +94,7 @@ export const buildPOST = ({ prisma }) => async (request, props) => {
103
94
  },
104
95
  },
105
96
  }
106
- : {})), (normalizedName !== undefined ? { name: normalizedName } : {})), (normalizedDescription !== undefined
107
- ? { description: normalizedDescription }
108
- : {})), { assistant: {
97
+ : {})), (name !== undefined ? { name } : {})), (description !== undefined ? { description } : {})), { assistant: {
109
98
  connect: {
110
99
  id: assistantId,
111
100
  workspaceId,
@@ -11,46 +11,46 @@ export declare const baseSchema: z.ZodObject<{
11
11
  url: z.ZodString;
12
12
  headers: z.ZodEffects<z.ZodString, string, string>;
13
13
  }, "strip", z.ZodTypeAny, {
14
- headers: string;
15
14
  url: string;
16
- }, {
17
15
  headers: string;
16
+ }, {
18
17
  url: string;
18
+ headers: string;
19
19
  }>>>;
20
20
  httpTransport: z.ZodOptional<z.ZodNullable<z.ZodObject<{
21
21
  url: z.ZodString;
22
22
  headers: z.ZodEffects<z.ZodString, string, string>;
23
23
  }, "strip", z.ZodTypeAny, {
24
- headers: string;
25
24
  url: string;
26
- }, {
27
25
  headers: string;
26
+ }, {
28
27
  url: string;
28
+ headers: string;
29
29
  }>>>;
30
30
  }, "strip", z.ZodTypeAny, {
31
31
  transportType: "SSE" | "HTTP";
32
32
  name?: string | null | undefined;
33
- httpTransport?: {
34
- headers: string;
35
- url: string;
36
- } | null | undefined;
33
+ description?: string | null | undefined;
37
34
  sseTransport?: {
35
+ url: string;
38
36
  headers: string;
37
+ } | null | undefined;
38
+ httpTransport?: {
39
39
  url: string;
40
+ headers: string;
40
41
  } | null | undefined;
41
- description?: string | null | undefined;
42
42
  }, {
43
43
  transportType: "STDIO" | "SSE" | "HTTP";
44
44
  name?: string | null | undefined;
45
- httpTransport?: {
46
- headers: string;
47
- url: string;
48
- } | null | undefined;
45
+ description?: string | null | undefined;
49
46
  sseTransport?: {
47
+ url: string;
50
48
  headers: string;
49
+ } | null | undefined;
50
+ httpTransport?: {
51
51
  url: string;
52
+ headers: string;
52
53
  } | null | undefined;
53
- description?: string | null | undefined;
54
54
  }>;
55
55
  export declare const superRefine: (values: any, ctx: any) => void;
56
56
  export declare const mcpServerSchema: z.ZodEffects<z.ZodObject<{
@@ -65,69 +65,69 @@ export declare const mcpServerSchema: z.ZodEffects<z.ZodObject<{
65
65
  url: z.ZodString;
66
66
  headers: z.ZodEffects<z.ZodString, string, string>;
67
67
  }, "strip", z.ZodTypeAny, {
68
- headers: string;
69
68
  url: string;
70
- }, {
71
69
  headers: string;
70
+ }, {
72
71
  url: string;
72
+ headers: string;
73
73
  }>>>;
74
74
  httpTransport: z.ZodOptional<z.ZodNullable<z.ZodObject<{
75
75
  url: z.ZodString;
76
76
  headers: z.ZodEffects<z.ZodString, string, string>;
77
77
  }, "strip", z.ZodTypeAny, {
78
- headers: string;
79
78
  url: string;
80
- }, {
81
79
  headers: string;
80
+ }, {
82
81
  url: string;
82
+ headers: string;
83
83
  }>>>;
84
84
  }, "strip", z.ZodTypeAny, {
85
85
  transportType: "SSE" | "HTTP";
86
86
  name?: string | null | undefined;
87
- httpTransport?: {
88
- headers: string;
89
- url: string;
90
- } | null | undefined;
87
+ description?: string | null | undefined;
91
88
  sseTransport?: {
89
+ url: string;
92
90
  headers: string;
91
+ } | null | undefined;
92
+ httpTransport?: {
93
93
  url: string;
94
+ headers: string;
94
95
  } | null | undefined;
95
- description?: string | null | undefined;
96
96
  }, {
97
97
  transportType: "STDIO" | "SSE" | "HTTP";
98
98
  name?: string | null | undefined;
99
- httpTransport?: {
100
- headers: string;
101
- url: string;
102
- } | null | undefined;
99
+ description?: string | null | undefined;
103
100
  sseTransport?: {
101
+ url: string;
104
102
  headers: string;
103
+ } | null | undefined;
104
+ httpTransport?: {
105
105
  url: string;
106
+ headers: string;
106
107
  } | null | undefined;
107
- description?: string | null | undefined;
108
108
  }>, {
109
109
  transportType: "SSE" | "HTTP";
110
110
  name?: string | null | undefined;
111
- httpTransport?: {
112
- headers: string;
113
- url: string;
114
- } | null | undefined;
111
+ description?: string | null | undefined;
115
112
  sseTransport?: {
113
+ url: string;
116
114
  headers: string;
115
+ } | null | undefined;
116
+ httpTransport?: {
117
117
  url: string;
118
+ headers: string;
118
119
  } | null | undefined;
119
- description?: string | null | undefined;
120
120
  }, {
121
121
  transportType: "STDIO" | "SSE" | "HTTP";
122
122
  name?: string | null | undefined;
123
- httpTransport?: {
124
- headers: string;
125
- url: string;
126
- } | null | undefined;
123
+ description?: string | null | undefined;
127
124
  sseTransport?: {
125
+ url: string;
128
126
  headers: string;
127
+ } | null | undefined;
128
+ httpTransport?: {
129
129
  url: string;
130
+ headers: string;
130
131
  } | null | undefined;
131
- description?: string | null | undefined;
132
132
  }>;
133
133
  //# sourceMappingURL=mcpServerSchema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcpServerSchema.d.ts","sourceRoot":"","sources":["../../../src/lib/mcpServers/mcpServerSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAyBvB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUrB,CAAA;AAGF,eAAO,MAAM,WAAW,GAAI,QAAQ,GAAG,EAAE,KAAK,GAAG,SAwChD,CAAA;AAED,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAsC,CAAA"}
1
+ {"version":3,"file":"mcpServerSchema.d.ts","sourceRoot":"","sources":["../../../src/lib/mcpServers/mcpServerSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAkCvB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUrB,CAAA;AAGF,eAAO,MAAM,WAAW,GAAI,QAAQ,GAAG,EAAE,KAAK,GAAG,SAwChD,CAAA;AAED,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAsC,CAAA"}