mcp-deploy 0.1.3 → 0.1.5

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 (103) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +6 -6
  3. package/.next/standalone/.next/build-manifest.json +2 -2
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/server/app/.well-known/oauth-authorization-server/route_client-reference-manifest.js +1 -1
  6. package/.next/standalone/.next/server/app/_global-error/page.js +2 -2
  7. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.html +2 -2
  9. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
  17. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  19. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  20. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  21. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  22. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  23. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  24. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  25. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  26. package/.next/standalone/.next/server/app/api/cloudflare/setup/route_client-reference-manifest.js +1 -1
  27. package/.next/standalone/.next/server/app/api/cloudflare/status/route_client-reference-manifest.js +1 -1
  28. package/.next/standalone/.next/server/app/api/mcps/[slug]/deploy/route.js +1 -1
  29. package/.next/standalone/.next/server/app/api/mcps/[slug]/deploy/route_client-reference-manifest.js +1 -1
  30. package/.next/standalone/.next/server/app/api/mcps/[slug]/remove/route.js +1 -1
  31. package/.next/standalone/.next/server/app/api/mcps/[slug]/remove/route_client-reference-manifest.js +1 -1
  32. package/.next/standalone/.next/server/app/api/mcps/[slug]/route.js +1 -1
  33. package/.next/standalone/.next/server/app/api/mcps/[slug]/route_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/api/mcps/[slug]/secrets/route.js +1 -1
  35. package/.next/standalone/.next/server/app/api/mcps/[slug]/secrets/route_client-reference-manifest.js +1 -1
  36. package/.next/standalone/.next/server/app/api/mcps/[slug]/status/route_client-reference-manifest.js +1 -1
  37. package/.next/standalone/.next/server/app/api/mcps/[slug]/undeploy/route.js +1 -1
  38. package/.next/standalone/.next/server/app/api/mcps/[slug]/undeploy/route_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/api/mcps/add/route.js +1 -1
  40. package/.next/standalone/.next/server/app/api/mcps/add/route_client-reference-manifest.js +1 -1
  41. package/.next/standalone/.next/server/app/api/mcps/check-updates/route_client-reference-manifest.js +1 -1
  42. package/.next/standalone/.next/server/app/api/mcps/route.js +1 -1
  43. package/.next/standalone/.next/server/app/api/mcps/route_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/api/mcps/validate/route_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/api/oauth/approve/route_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/api/oauth/register/route_client-reference-manifest.js +1 -1
  47. package/.next/standalone/.next/server/app/api/oauth/token/route_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/api/test-connection/route_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/index.html +2 -2
  50. package/.next/standalone/.next/server/app/index.rsc +2 -2
  51. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  52. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +2 -2
  53. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  54. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
  55. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  56. package/.next/standalone/.next/server/app/mcps/[slug]/page.js +3 -3
  57. package/.next/standalone/.next/server/app/mcps/[slug]/page_client-reference-manifest.js +1 -1
  58. package/.next/standalone/.next/server/app/oauth/authorize/page.js +1 -1
  59. package/.next/standalone/.next/server/app/oauth/authorize/page_client-reference-manifest.js +1 -1
  60. package/.next/standalone/.next/server/app/oauth/authorize.html +2 -2
  61. package/.next/standalone/.next/server/app/oauth/authorize.rsc +2 -2
  62. package/.next/standalone/.next/server/app/oauth/authorize.segments/_full.segment.rsc +2 -2
  63. package/.next/standalone/.next/server/app/oauth/authorize.segments/_head.segment.rsc +1 -1
  64. package/.next/standalone/.next/server/app/oauth/authorize.segments/_index.segment.rsc +2 -2
  65. package/.next/standalone/.next/server/app/oauth/authorize.segments/_tree.segment.rsc +2 -2
  66. package/.next/standalone/.next/server/app/oauth/authorize.segments/oauth/authorize/__PAGE__.segment.rsc +1 -1
  67. package/.next/standalone/.next/server/app/oauth/authorize.segments/oauth/authorize.segment.rsc +1 -1
  68. package/.next/standalone/.next/server/app/oauth/authorize.segments/oauth.segment.rsc +1 -1
  69. package/.next/standalone/.next/server/app/page.js +2 -2
  70. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/setup/page.js +3 -3
  72. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/setup.html +2 -2
  74. package/.next/standalone/.next/server/app/setup.rsc +2 -2
  75. package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +2 -2
  76. package/.next/standalone/.next/server/app/setup.segments/_head.segment.rsc +1 -1
  77. package/.next/standalone/.next/server/app/setup.segments/_index.segment.rsc +2 -2
  78. package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
  79. package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +1 -1
  80. package/.next/standalone/.next/server/app/setup.segments/setup.segment.rsc +1 -1
  81. package/.next/standalone/.next/server/app-paths-manifest.json +6 -6
  82. package/.next/standalone/.next/server/chunks/142.js +4 -4
  83. package/.next/standalone/.next/server/chunks/471.js +2 -2
  84. package/.next/standalone/.next/server/chunks/817.js +2 -2
  85. package/.next/standalone/.next/server/pages/404.html +2 -2
  86. package/.next/standalone/.next/server/pages/500.html +2 -2
  87. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  88. package/.next/{static/chunks/app/mcps/[slug]/page-8e0aa560f0622f11.js → standalone/.next/static/chunks/app/mcps/[slug]/page-c5385aeb25f58d99.js} +1 -1
  89. package/.next/{static/css/caae8cf5ba26c4c9.css → standalone/.next/static/css/c1d55b213e741a4a.css} +1 -1
  90. package/.next/standalone/package.json +1 -1
  91. package/.next/{standalone/.next/static/chunks/app/mcps/[slug]/page-8e0aa560f0622f11.js → static/chunks/app/mcps/[slug]/page-c5385aeb25f58d99.js} +1 -1
  92. package/.next/{standalone/.next/static/css/caae8cf5ba26c4c9.css → static/css/c1d55b213e741a4a.css} +1 -1
  93. package/package.json +1 -1
  94. package/src/app/api/mcps/[slug]/deploy/route.ts +20 -4
  95. package/src/app/api/mcps/[slug]/route.ts +4 -5
  96. package/src/app/api/mcps/route.ts +4 -5
  97. package/src/app/mcps/[slug]/page.tsx +14 -4
  98. package/src/lib/operations.ts +10 -0
  99. package/src/lib/store.ts +6 -0
  100. /package/.next/standalone/.next/static/{8v7FMKRjROJQw8iEA3azx → 2tKq_bTNyVhd6HGPRRssw}/_buildManifest.js +0 -0
  101. /package/.next/standalone/.next/static/{8v7FMKRjROJQw8iEA3azx → 2tKq_bTNyVhd6HGPRRssw}/_ssgManifest.js +0 -0
  102. /package/.next/static/{8v7FMKRjROJQw8iEA3azx → 2tKq_bTNyVhd6HGPRRssw}/_buildManifest.js +0 -0
  103. /package/.next/static/{8v7FMKRjROJQw8iEA3azx → 2tKq_bTNyVhd6HGPRRssw}/_ssgManifest.js +0 -0
@@ -1,8 +1,8 @@
1
- <!DOCTYPE html><!--8v7FMKRjROJQw8iEA3azx--><html lang="en" data-theme="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/caae8cf5ba26c4c9.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js"/><script src="/_next/static/chunks/4bd1b696-096d35a2bd1da3af.js" async=""></script><script src="/_next/static/chunks/794-37dad9bbc14b04b8.js" async=""></script><script src="/_next/static/chunks/main-app-9463efc72af57a9a.js" async=""></script><script src="/_next/static/chunks/500-5d45efbf86b8d36e.js" async=""></script><script src="/_next/static/chunks/app/layout-16156b2dce91d181.js" async=""></script><script src="/_next/static/chunks/app/page-a51bfb5b5fb2747a.js" async=""></script><title>MCP Deploy</title><meta name="description" content="Deploy and manage MCP servers on Cloudflare Workers"/><script>
1
+ <!DOCTYPE html><!--2tKq_bTNyVhd6HGPRRssw--><html lang="en" data-theme="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/c1d55b213e741a4a.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js"/><script src="/_next/static/chunks/4bd1b696-096d35a2bd1da3af.js" async=""></script><script src="/_next/static/chunks/794-37dad9bbc14b04b8.js" async=""></script><script src="/_next/static/chunks/main-app-9463efc72af57a9a.js" async=""></script><script src="/_next/static/chunks/500-5d45efbf86b8d36e.js" async=""></script><script src="/_next/static/chunks/app/layout-16156b2dce91d181.js" async=""></script><script src="/_next/static/chunks/app/page-a51bfb5b5fb2747a.js" async=""></script><title>MCP Deploy</title><meta name="description" content="Deploy and manage MCP servers on Cloudflare Workers"/><script>
2
2
  (function(){
3
3
  var t = localStorage.getItem("mcp-deploy-theme");
4
4
  if (t === "light" || t === "system") {
5
5
  document.documentElement.setAttribute("data-theme", t);
6
6
  }
7
7
  })();
8
- </script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="bg-surface-page text-fg min-h-screen antialiased"><div hidden=""><!--$--><!--/$--></div><nav class="border-b border-edge bg-surface/50 backdrop-blur-sm fixed top-0 inset-x-0 z-50"><div class="max-w-5xl mx-auto px-6 py-4 flex items-center justify-between"><a class="text-lg font-semibold tracking-tight" href="/"><span class="text-accent-fg">MCP</span> Deploy</a><div class="flex gap-6 text-sm"><a class="font-medium transition-colors pb-0.5 text-fg border-b-2 border-accent-fg" href="/">Dashboard</a><a class="font-medium transition-colors pb-0.5 text-fg-muted hover:text-fg" href="/setup">Settings</a></div></div></nav><main class="max-w-5xl mx-auto px-6 py-8 pt-16"><div class="space-y-8"><div class="flex items-center justify-between"><div><h1 class="text-2xl font-bold mb-1">MCP Servers</h1><p class="text-fg-muted text-sm">Manage your Model Context Protocol servers on Cloudflare Workers.</p></div><div class="flex items-center gap-2"><button class="px-4 py-2 bg-surface-raised hover:bg-surface-overlay disabled:opacity-50 text-fg-secondary text-sm font-medium rounded-lg transition-colors flex items-center gap-2 border border-edge-subtle"><svg class="w-4 h-4 " fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path></svg>Check for Updates</button><button class="px-4 py-2 bg-accent hover:bg-accent-hover text-white text-sm font-medium rounded-lg transition-colors flex items-center gap-2"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg>Add MCP</button></div></div><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div class="border border-edge rounded-xl p-6 bg-surface animate-pulse"><div class="flex items-start justify-between mb-3"><div class="h-5 w-32 bg-surface-overlay rounded"></div><div class="h-5 w-16 bg-surface-overlay rounded-full"></div></div><div class="space-y-2 mb-4"><div class="h-3 w-full bg-surface-raised rounded"></div><div class="h-3 w-2/3 bg-surface-raised rounded"></div></div><div class="flex items-center justify-between"><div class="h-3 w-16 bg-surface-raised rounded"></div><div class="h-3 w-24 bg-surface-raised rounded"></div></div></div><div class="border border-edge rounded-xl p-6 bg-surface animate-pulse"><div class="flex items-start justify-between mb-3"><div class="h-5 w-32 bg-surface-overlay rounded"></div><div class="h-5 w-16 bg-surface-overlay rounded-full"></div></div><div class="space-y-2 mb-4"><div class="h-3 w-full bg-surface-raised rounded"></div><div class="h-3 w-2/3 bg-surface-raised rounded"></div></div><div class="flex items-center justify-between"><div class="h-3 w-16 bg-surface-raised rounded"></div><div class="h-3 w-24 bg-surface-raised rounded"></div></div></div><button class="border-2 border-dashed border-edge-subtle hover:border-fg-disabled rounded-xl p-8 flex flex-col items-center justify-center transition-colors group"><div class="w-12 h-12 rounded-full bg-surface-raised group-hover:bg-surface-overlay flex items-center justify-center mb-3 transition-colors"><svg class="w-6 h-6 text-fg-faint group-hover:text-fg-muted" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg></div><span class="text-sm text-fg-faint group-hover:text-fg-muted font-medium">Add MCP from GitHub</span></button></div></div><!--$--><!--/$--></main><script src="/_next/static/chunks/webpack-9ca43f4ce1bb8938.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[8946,[\"500\",\"static/chunks/500-5d45efbf86b8d36e.js\",\"558\",\"static/chunks/app/layout-16156b2dce91d181.js\"],\"ThemeProvider\"]\n3:I[8500,[\"500\",\"static/chunks/500-5d45efbf86b8d36e.js\",\"558\",\"static/chunks/app/layout-16156b2dce91d181.js\"],\"\"]\n4:I[2240,[\"500\",\"static/chunks/500-5d45efbf86b8d36e.js\",\"558\",\"static/chunks/app/layout-16156b2dce91d181.js\"],\"NavLinks\"]\n5:I[7121,[],\"\"]\n6:I[4581,[],\"\"]\n7:I[1304,[],\"ClientPageRoot\"]\n8:I[6268,[\"500\",\"static/chunks/500-5d45efbf86b8d36e.js\",\"974\",\"static/chunks/app/page-a51bfb5b5fb2747a.js\"],\"default\"]\nb:I[484,[],\"OutletBoundary\"]\nc:\"$Sreact.suspense\"\ne:I[484,[],\"ViewportBoundary\"]\n10:I[484,[],\"MetadataBoundary\"]\n12:I[7123,[],\"\"]\n:HL[\"/_next/static/css/caae8cf5ba26c4c9.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"8v7FMKRjROJQw8iEA3azx\",\"c\":[\"\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/caae8cf5ba26c4c9.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"data-theme\":\"dark\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n(function(){\\n var t = localStorage.getItem(\\\"mcp-deploy-theme\\\");\\n if (t === \\\"light\\\" || t === \\\"system\\\") {\\n document.documentElement.setAttribute(\\\"data-theme\\\", t);\\n }\\n})();\\n\"}}],false]}],[\"$\",\"body\",null,{\"className\":\"bg-surface-page text-fg min-h-screen antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"nav\",null,{\"className\":\"border-b border-edge bg-surface/50 backdrop-blur-sm fixed top-0 inset-x-0 z-50\",\"children\":[\"$\",\"div\",null,{\"className\":\"max-w-5xl mx-auto px-6 py-4 flex items-center justify-between\",\"children\":[[\"$\",\"$L3\",null,{\"href\":\"/\",\"className\":\"text-lg font-semibold tracking-tight\",\"children\":[[\"$\",\"span\",null,{\"className\":\"text-accent-fg\",\"children\":\"MCP\"}],\" Deploy\"]}],[\"$\",\"$L4\",null,{}]]}]}],[\"$\",\"main\",null,{\"className\":\"max-w-5xl mx-auto px-6 py-8 pt-16\",\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",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\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L7\",null,{\"Component\":\"$8\",\"serverProvidedParams\":{\"searchParams\":{},\"params\":{},\"promises\":[\"$@9\",\"$@a\"]}}],null,[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$c\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@d\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Le\",null,{\"children\":\"$Lf\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L10\",null,{\"children\":[\"$\",\"$c\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L11\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$12\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:{}\na:\"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params\"\n"])</script><script>self.__next_f.push([1,"f:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"d:null\n11:[[\"$\",\"title\",\"0\",{\"children\":\"MCP Deploy\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Deploy and manage MCP servers on Cloudflare Workers\"}]]\n"])</script></body></html>
8
+ </script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="bg-surface-page text-fg min-h-screen antialiased"><div hidden=""><!--$--><!--/$--></div><nav class="border-b border-edge bg-surface/50 backdrop-blur-sm fixed top-0 inset-x-0 z-50"><div class="max-w-5xl mx-auto px-6 py-4 flex items-center justify-between"><a class="text-lg font-semibold tracking-tight" href="/"><span class="text-accent-fg">MCP</span> Deploy</a><div class="flex gap-6 text-sm"><a class="font-medium transition-colors pb-0.5 text-fg border-b-2 border-accent-fg" href="/">Dashboard</a><a class="font-medium transition-colors pb-0.5 text-fg-muted hover:text-fg" href="/setup">Settings</a></div></div></nav><main class="max-w-5xl mx-auto px-6 py-8 pt-16"><div class="space-y-8"><div class="flex items-center justify-between"><div><h1 class="text-2xl font-bold mb-1">MCP Servers</h1><p class="text-fg-muted text-sm">Manage your Model Context Protocol servers on Cloudflare Workers.</p></div><div class="flex items-center gap-2"><button class="px-4 py-2 bg-surface-raised hover:bg-surface-overlay disabled:opacity-50 text-fg-secondary text-sm font-medium rounded-lg transition-colors flex items-center gap-2 border border-edge-subtle"><svg class="w-4 h-4 " fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"></path></svg>Check for Updates</button><button class="px-4 py-2 bg-accent hover:bg-accent-hover text-white text-sm font-medium rounded-lg transition-colors flex items-center gap-2"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg>Add MCP</button></div></div><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div class="border border-edge rounded-xl p-6 bg-surface animate-pulse"><div class="flex items-start justify-between mb-3"><div class="h-5 w-32 bg-surface-overlay rounded"></div><div class="h-5 w-16 bg-surface-overlay rounded-full"></div></div><div class="space-y-2 mb-4"><div class="h-3 w-full bg-surface-raised rounded"></div><div class="h-3 w-2/3 bg-surface-raised rounded"></div></div><div class="flex items-center justify-between"><div class="h-3 w-16 bg-surface-raised rounded"></div><div class="h-3 w-24 bg-surface-raised rounded"></div></div></div><div class="border border-edge rounded-xl p-6 bg-surface animate-pulse"><div class="flex items-start justify-between mb-3"><div class="h-5 w-32 bg-surface-overlay rounded"></div><div class="h-5 w-16 bg-surface-overlay rounded-full"></div></div><div class="space-y-2 mb-4"><div class="h-3 w-full bg-surface-raised rounded"></div><div class="h-3 w-2/3 bg-surface-raised rounded"></div></div><div class="flex items-center justify-between"><div class="h-3 w-16 bg-surface-raised rounded"></div><div class="h-3 w-24 bg-surface-raised rounded"></div></div></div><button class="border-2 border-dashed border-edge-subtle hover:border-fg-disabled rounded-xl p-8 flex flex-col items-center justify-center transition-colors group"><div class="w-12 h-12 rounded-full bg-surface-raised group-hover:bg-surface-overlay flex items-center justify-center mb-3 transition-colors"><svg class="w-6 h-6 text-fg-faint group-hover:text-fg-muted" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg></div><span class="text-sm text-fg-faint group-hover:text-fg-muted font-medium">Add MCP from GitHub</span></button></div></div><!--$--><!--/$--></main><script src="/_next/static/chunks/webpack-9ca43f4ce1bb8938.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[8946,[\"500\",\"static/chunks/500-5d45efbf86b8d36e.js\",\"558\",\"static/chunks/app/layout-16156b2dce91d181.js\"],\"ThemeProvider\"]\n3:I[8500,[\"500\",\"static/chunks/500-5d45efbf86b8d36e.js\",\"558\",\"static/chunks/app/layout-16156b2dce91d181.js\"],\"\"]\n4:I[2240,[\"500\",\"static/chunks/500-5d45efbf86b8d36e.js\",\"558\",\"static/chunks/app/layout-16156b2dce91d181.js\"],\"NavLinks\"]\n5:I[7121,[],\"\"]\n6:I[4581,[],\"\"]\n7:I[1304,[],\"ClientPageRoot\"]\n8:I[6268,[\"500\",\"static/chunks/500-5d45efbf86b8d36e.js\",\"974\",\"static/chunks/app/page-a51bfb5b5fb2747a.js\"],\"default\"]\nb:I[484,[],\"OutletBoundary\"]\nc:\"$Sreact.suspense\"\ne:I[484,[],\"ViewportBoundary\"]\n10:I[484,[],\"MetadataBoundary\"]\n12:I[7123,[],\"\"]\n:HL[\"/_next/static/css/c1d55b213e741a4a.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"2tKq_bTNyVhd6HGPRRssw\",\"c\":[\"\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/c1d55b213e741a4a.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"data-theme\":\"dark\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n(function(){\\n var t = localStorage.getItem(\\\"mcp-deploy-theme\\\");\\n if (t === \\\"light\\\" || t === \\\"system\\\") {\\n document.documentElement.setAttribute(\\\"data-theme\\\", t);\\n }\\n})();\\n\"}}],false]}],[\"$\",\"body\",null,{\"className\":\"bg-surface-page text-fg min-h-screen antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[[\"$\",\"nav\",null,{\"className\":\"border-b border-edge bg-surface/50 backdrop-blur-sm fixed top-0 inset-x-0 z-50\",\"children\":[\"$\",\"div\",null,{\"className\":\"max-w-5xl mx-auto px-6 py-4 flex items-center justify-between\",\"children\":[[\"$\",\"$L3\",null,{\"href\":\"/\",\"className\":\"text-lg font-semibold tracking-tight\",\"children\":[[\"$\",\"span\",null,{\"className\":\"text-accent-fg\",\"children\":\"MCP\"}],\" Deploy\"]}],[\"$\",\"$L4\",null,{}]]}]}],[\"$\",\"main\",null,{\"className\":\"max-w-5xl mx-auto px-6 py-8 pt-16\",\"children\":[\"$\",\"$L5\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L6\",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\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L7\",null,{\"Component\":\"$8\",\"serverProvidedParams\":{\"searchParams\":{},\"params\":{},\"promises\":[\"$@9\",\"$@a\"]}}],null,[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$c\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@d\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Le\",null,{\"children\":\"$Lf\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L10\",null,{\"children\":[\"$\",\"$c\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L11\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$12\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:{}\na:\"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params\"\n"])</script><script>self.__next_f.push([1,"f:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"d:null\n11:[[\"$\",\"title\",\"0\",{\"children\":\"MCP Deploy\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Deploy and manage MCP servers on Cloudflare Workers\"}]]\n"])</script></body></html>
@@ -11,8 +11,8 @@ c:"$Sreact.suspense"
11
11
  e:I[484,[],"ViewportBoundary"]
12
12
  10:I[484,[],"MetadataBoundary"]
13
13
  12:I[7123,[],""]
14
- :HL["/_next/static/css/caae8cf5ba26c4c9.css","style"]
15
- 0:{"P":null,"b":"8v7FMKRjROJQw8iEA3azx","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/caae8cf5ba26c4c9.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","data-theme":"dark","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n(function(){\n var t = localStorage.getItem(\"mcp-deploy-theme\");\n if (t === \"light\" || t === \"system\") {\n document.documentElement.setAttribute(\"data-theme\", t);\n }\n})();\n"}}],false]}],["$","body",null,{"className":"bg-surface-page text-fg min-h-screen antialiased","children":["$","$L2",null,{"children":[["$","nav",null,{"className":"border-b border-edge bg-surface/50 backdrop-blur-sm fixed top-0 inset-x-0 z-50","children":["$","div",null,{"className":"max-w-5xl mx-auto px-6 py-4 flex items-center justify-between","children":[["$","$L3",null,{"href":"/","className":"text-lg font-semibold tracking-tight","children":[["$","span",null,{"className":"text-accent-fg","children":"MCP"}]," Deploy"]}],["$","$L4",null,{}]]}]}],["$","main",null,{"className":"max-w-5xl mx-auto px-6 py-8 pt-16","children":["$","$L5",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",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":[["$","$1","c",{"children":[["$","$L7",null,{"Component":"$8","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@9","$@a"]}}],null,["$","$Lb",null,{"children":["$","$c",null,{"name":"Next.MetadataOutlet","children":"$@d"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Le",null,{"children":"$Lf"}],["$","div",null,{"hidden":true,"children":["$","$L10",null,{"children":["$","$c",null,{"name":"Next.Metadata","children":"$L11"}]}]}],null]}],false]],"m":"$undefined","G":["$12",[]],"S":true}
14
+ :HL["/_next/static/css/c1d55b213e741a4a.css","style"]
15
+ 0:{"P":null,"b":"2tKq_bTNyVhd6HGPRRssw","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/c1d55b213e741a4a.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","data-theme":"dark","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n(function(){\n var t = localStorage.getItem(\"mcp-deploy-theme\");\n if (t === \"light\" || t === \"system\") {\n document.documentElement.setAttribute(\"data-theme\", t);\n }\n})();\n"}}],false]}],["$","body",null,{"className":"bg-surface-page text-fg min-h-screen antialiased","children":["$","$L2",null,{"children":[["$","nav",null,{"className":"border-b border-edge bg-surface/50 backdrop-blur-sm fixed top-0 inset-x-0 z-50","children":["$","div",null,{"className":"max-w-5xl mx-auto px-6 py-4 flex items-center justify-between","children":[["$","$L3",null,{"href":"/","className":"text-lg font-semibold tracking-tight","children":[["$","span",null,{"className":"text-accent-fg","children":"MCP"}]," Deploy"]}],["$","$L4",null,{}]]}]}],["$","main",null,{"className":"max-w-5xl mx-auto px-6 py-8 pt-16","children":["$","$L5",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",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":[["$","$1","c",{"children":[["$","$L7",null,{"Component":"$8","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@9","$@a"]}}],null,["$","$Lb",null,{"children":["$","$c",null,{"name":"Next.MetadataOutlet","children":"$@d"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Le",null,{"children":"$Lf"}],["$","div",null,{"hidden":true,"children":["$","$L10",null,{"children":["$","$c",null,{"name":"Next.Metadata","children":"$L11"}]}]}],null]}],false]],"m":"$undefined","G":["$12",[]],"S":true}
16
16
  9:{}
17
17
  a:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
18
18
  f:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
@@ -3,7 +3,7 @@
3
3
  3:I[6268,["500","static/chunks/500-5d45efbf86b8d36e.js","974","static/chunks/app/page-a51bfb5b5fb2747a.js"],"default"]
4
4
  6:I[484,[],"OutletBoundary"]
5
5
  7:"$Sreact.suspense"
6
- 0:{"buildId":"8v7FMKRjROJQw8iEA3azx","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false}
6
+ 0:{"buildId":"2tKq_bTNyVhd6HGPRRssw","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false}
7
7
  4:{}
8
8
  5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
9
9
  8:null
@@ -11,8 +11,8 @@ c:"$Sreact.suspense"
11
11
  e:I[484,[],"ViewportBoundary"]
12
12
  10:I[484,[],"MetadataBoundary"]
13
13
  12:I[7123,[],""]
14
- :HL["/_next/static/css/caae8cf5ba26c4c9.css","style"]
15
- 0:{"P":null,"b":"8v7FMKRjROJQw8iEA3azx","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/caae8cf5ba26c4c9.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","data-theme":"dark","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n(function(){\n var t = localStorage.getItem(\"mcp-deploy-theme\");\n if (t === \"light\" || t === \"system\") {\n document.documentElement.setAttribute(\"data-theme\", t);\n }\n})();\n"}}],false]}],["$","body",null,{"className":"bg-surface-page text-fg min-h-screen antialiased","children":["$","$L2",null,{"children":[["$","nav",null,{"className":"border-b border-edge bg-surface/50 backdrop-blur-sm fixed top-0 inset-x-0 z-50","children":["$","div",null,{"className":"max-w-5xl mx-auto px-6 py-4 flex items-center justify-between","children":[["$","$L3",null,{"href":"/","className":"text-lg font-semibold tracking-tight","children":[["$","span",null,{"className":"text-accent-fg","children":"MCP"}]," Deploy"]}],["$","$L4",null,{}]]}]}],["$","main",null,{"className":"max-w-5xl mx-auto px-6 py-8 pt-16","children":["$","$L5",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",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":[["$","$1","c",{"children":[["$","$L7",null,{"Component":"$8","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@9","$@a"]}}],null,["$","$Lb",null,{"children":["$","$c",null,{"name":"Next.MetadataOutlet","children":"$@d"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Le",null,{"children":"$Lf"}],["$","div",null,{"hidden":true,"children":["$","$L10",null,{"children":["$","$c",null,{"name":"Next.Metadata","children":"$L11"}]}]}],null]}],false]],"m":"$undefined","G":["$12",[]],"S":true}
14
+ :HL["/_next/static/css/c1d55b213e741a4a.css","style"]
15
+ 0:{"P":null,"b":"2tKq_bTNyVhd6HGPRRssw","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/c1d55b213e741a4a.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","data-theme":"dark","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n(function(){\n var t = localStorage.getItem(\"mcp-deploy-theme\");\n if (t === \"light\" || t === \"system\") {\n document.documentElement.setAttribute(\"data-theme\", t);\n }\n})();\n"}}],false]}],["$","body",null,{"className":"bg-surface-page text-fg min-h-screen antialiased","children":["$","$L2",null,{"children":[["$","nav",null,{"className":"border-b border-edge bg-surface/50 backdrop-blur-sm fixed top-0 inset-x-0 z-50","children":["$","div",null,{"className":"max-w-5xl mx-auto px-6 py-4 flex items-center justify-between","children":[["$","$L3",null,{"href":"/","className":"text-lg font-semibold tracking-tight","children":[["$","span",null,{"className":"text-accent-fg","children":"MCP"}]," Deploy"]}],["$","$L4",null,{}]]}]}],["$","main",null,{"className":"max-w-5xl mx-auto px-6 py-8 pt-16","children":["$","$L5",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",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":[["$","$1","c",{"children":[["$","$L7",null,{"Component":"$8","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@9","$@a"]}}],null,["$","$Lb",null,{"children":["$","$c",null,{"name":"Next.MetadataOutlet","children":"$@d"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Le",null,{"children":"$Lf"}],["$","div",null,{"hidden":true,"children":["$","$L10",null,{"children":["$","$c",null,{"name":"Next.Metadata","children":"$L11"}]}]}],null]}],false]],"m":"$undefined","G":["$12",[]],"S":true}
16
16
  9:{}
17
17
  a:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
18
18
  f:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
@@ -2,4 +2,4 @@
2
2
  2:I[484,[],"ViewportBoundary"]
3
3
  3:I[484,[],"MetadataBoundary"]
4
4
  4:"$Sreact.suspense"
5
- 0:{"buildId":"8v7FMKRjROJQw8iEA3azx","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"MCP Deploy"}],["$","meta","1",{"name":"description","content":"Deploy and manage MCP servers on Cloudflare Workers"}]]}]}]}],null]}],"loading":null,"isPartial":false}
5
+ 0:{"buildId":"2tKq_bTNyVhd6HGPRRssw","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"MCP Deploy"}],["$","meta","1",{"name":"description","content":"Deploy and manage MCP servers on Cloudflare Workers"}]]}]}]}],null]}],"loading":null,"isPartial":false}
@@ -4,5 +4,5 @@
4
4
  4:I[2240,["500","static/chunks/500-5d45efbf86b8d36e.js","558","static/chunks/app/layout-16156b2dce91d181.js"],"NavLinks"]
5
5
  5:I[7121,[],""]
6
6
  6:I[4581,[],""]
7
- :HL["/_next/static/css/caae8cf5ba26c4c9.css","style"]
8
- 0:{"buildId":"8v7FMKRjROJQw8iEA3azx","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/caae8cf5ba26c4c9.css","precedence":"next"}]],["$","html",null,{"lang":"en","data-theme":"dark","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n(function(){\n var t = localStorage.getItem(\"mcp-deploy-theme\");\n if (t === \"light\" || t === \"system\") {\n document.documentElement.setAttribute(\"data-theme\", t);\n }\n})();\n"}}],false]}],["$","body",null,{"className":"bg-surface-page text-fg min-h-screen antialiased","children":["$","$L2",null,{"children":[["$","nav",null,{"className":"border-b border-edge bg-surface/50 backdrop-blur-sm fixed top-0 inset-x-0 z-50","children":["$","div",null,{"className":"max-w-5xl mx-auto px-6 py-4 flex items-center justify-between","children":[["$","$L3",null,{"href":"/","className":"text-lg font-semibold tracking-tight","children":[["$","span",null,{"className":"text-accent-fg","children":"MCP"}]," Deploy"]}],["$","$L4",null,{}]]}]}],["$","main",null,{"className":"max-w-5xl mx-auto px-6 py-8 pt-16","children":["$","$L5",null,{"parallelRouterKey":"children","template":["$","$L6",null,{}],"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."}]}]]}]}]],[]]}]}]]}]}]]}]]}],"loading":null,"isPartial":false}
7
+ :HL["/_next/static/css/c1d55b213e741a4a.css","style"]
8
+ 0:{"buildId":"2tKq_bTNyVhd6HGPRRssw","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/c1d55b213e741a4a.css","precedence":"next"}]],["$","html",null,{"lang":"en","data-theme":"dark","suppressHydrationWarning":true,"children":[["$","head",null,{"children":[["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n(function(){\n var t = localStorage.getItem(\"mcp-deploy-theme\");\n if (t === \"light\" || t === \"system\") {\n document.documentElement.setAttribute(\"data-theme\", t);\n }\n})();\n"}}],false]}],["$","body",null,{"className":"bg-surface-page text-fg min-h-screen antialiased","children":["$","$L2",null,{"children":[["$","nav",null,{"className":"border-b border-edge bg-surface/50 backdrop-blur-sm fixed top-0 inset-x-0 z-50","children":["$","div",null,{"className":"max-w-5xl mx-auto px-6 py-4 flex items-center justify-between","children":[["$","$L3",null,{"href":"/","className":"text-lg font-semibold tracking-tight","children":[["$","span",null,{"className":"text-accent-fg","children":"MCP"}]," Deploy"]}],["$","$L4",null,{}]]}]}],["$","main",null,{"className":"max-w-5xl mx-auto px-6 py-8 pt-16","children":["$","$L5",null,{"parallelRouterKey":"children","template":["$","$L6",null,{}],"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."}]}]]}]}]],[]]}]}]]}]}]]}]]}],"loading":null,"isPartial":false}
@@ -1,2 +1,2 @@
1
- :HL["/_next/static/css/caae8cf5ba26c4c9.css","style"]
2
- 0:{"buildId":"8v7FMKRjROJQw8iEA3azx","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
1
+ :HL["/_next/static/css/c1d55b213e741a4a.css","style"]
2
+ 0:{"buildId":"2tKq_bTNyVhd6HGPRRssw","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
@@ -1,9 +1,9 @@
1
- (()=>{var a={};a.id=526,a.ids=[526],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},1135:()=>{},1758:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(7943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/app/mcps/[slug]/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/app/mcps/[slug]/page.tsx","default")},2094:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>D.a,__next_app__:()=>L,handler:()=>N,routeModule:()=>M});var d=c(7553),e=c(4006),f=c(7798),g=c(4775),h=c(9373),i=c(3461),j=c(1020),k=c(6349),l=c(4365),m=c(6023),n=c(3747),o=c(4235),p=c(3938),q=c(261),r=c(6758),s=c(7243),t=c(6713),u=c(7527),v=c(2820),w=c(8216),x=c(7929),y=c(9551),z=c(9125),A=c(6439),B=c(7068),C=c(5547),D=c.n(C),E=c(1287),F=c(1494),G=c(722),H=c(753),I=c(3954),J={};for(let a in E)0>["default","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(J[a]=()=>E[a]);c.d(b,J);let K={children:["",{children:["mcps",{children:["[slug]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,1758)),"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/app/mcps/[slug]/page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,6537)),"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/app/layout.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,5547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,5091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,5270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,8193,23)),"next/dist/client/components/builtin/unauthorized.js"]}]}.children,L={require:c,loadChunk:()=>Promise.resolve()},M=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/mcps/[slug]/page",pathname:"/mcps/[slug]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:K},distDir:".next",relativeProjectDir:""});async function N(a,b,d){var C;M.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let J=!!(0,h.getRequestMeta)(a,"minimalMode"),O="/mcps/[slug]/page";"/index"===O&&(O="/");let P=await M.prepare(a,b,{srcPage:O,multiZoneDraftMode:!1});if(!P)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Q,query:R,params:S,pageIsDynamic:T,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,serverActionsManifest:X,clientReferenceManifest:Y,subresourceIntegrityManifest:Z,prerenderManifest:$,isDraftMode:_,resolvedPathname:aa,revalidateOnlyGenerated:ab,routerServerContext:ac,nextConfig:ad,parsedUrl:ae,interceptionRoutePatterns:af,deploymentId:ag}=P,ah=(0,q.normalizeAppPath)(O),{isOnDemandRevalidate:ai}=P,aj=ad.experimental.ppr&&!ad.cacheComponents&&(0,I.isInterceptionRouteAppPath)(aa)?null:M.match(aa,$),ak=!!$.routes[aa],al=a.headers["user-agent"]||"",am=(0,t.getBotType)(al),an=(0,p.isHtmlBotRequest)(a),ao=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[s.NEXT_ROUTER_PREFETCH_HEADER],ap=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[s.RSC_HEADER],aq=(0,r.getIsPossibleServerAction)(a),ar=(0,m.checkIsAppPPREnabled)(ad.experimental.ppr);if(!(0,h.getRequestMeta)(a,"postponed")&&ar&&"1"===a.headers[x.NEXT_RESUME_HEADER]&&"POST"===a.method){let b=[];for await(let c of a)b.push(c);let c=Buffer.concat(b).toString("utf8");(0,h.addRequestMeta)(a,"postponed",c)}let as=ar&&(null==(C=$.routes[ah]??$.dynamicRoutes[ah])?void 0:C.renderingMode)==="PARTIALLY_STATIC",at=!1,au=!1,av=as?(0,h.getRequestMeta)(a,"postponed"):void 0,aw=as&&ap&&!ao;J&&(aw=aw&&!!av);let ax=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ay=(!an||!as)&&(!al||(0,p.shouldServeStreamingMetadata)(al,ad.htmlLimitedBots)),az=!!((aj||ak||$.routes[ah])&&!(an&&as)),aA=as&&!0===ad.cacheComponents,aB=!0===M.isDev||!az||"string"==typeof av||(aA&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aw&&!J:aw),aC=an&&as,aD=null;_||!az||aB||aq||av||aw||(aD=aa);let aE=aD;!aE&&M.isDev&&(aE=aa),M.isDev||_||!az||!ap||aw||(0,k.d)(a.headers);let aF={...E,tree:K,GlobalError:D(),handler:N,routeModule:M,__next_app__:L};X&&Y&&(0,o.setManifestsSingleton)({page:O,clientReferenceManifest:Y,serverActionsManifest:X});let aG=a.method||"GET",aH=(0,g.getTracer)(),aI=aH.getActiveScopeSpan(),aJ=async()=>((null==ac?void 0:ac.render404)?await ac.render404(a,b,ae,!1):b.end("This page could not be found"),null);try{let f=M.getVaryHeader(aa,af);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return M.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aH.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aG} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aG} ${O}`)})},m=(0,h.getRequestMeta)(a,"incrementalCache"),o=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let l={query:R,params:S,page:ah,sharedContext:{buildId:Q},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aF,Component:(0,j.T)(aF),params:S,routeModule:M,page:O,postponed:f,shouldWaitOnAllReady:aC,serveStreamingMetadata:ay,supportsDynamicResponse:"string"==typeof f||aB,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,subresourceIntegrityManifest:Z,setCacheStatus:null==ac?void 0:ac.setCacheStatus,setIsrStatus:null==ac?void 0:ac.setIsrStatus,setReactDebugChannel:null==ac?void 0:ac.setReactDebugChannel,sendErrorsToBrowser:null==ac?void 0:ac.sendErrorsToBrowser,dir:c(3873).join(process.cwd(),M.relativeProjectDir),isDraftMode:_,botType:am,isOnDemandRevalidate:ai,isPossibleServerAction:aq,assetPrefix:ad.assetPrefix,nextConfigOutput:ad.output,crossOrigin:ad.crossOrigin,trailingSlash:ad.trailingSlash,images:ad.images,previewProps:$.preview,deploymentId:ag,enableTainting:ad.experimental.taint,htmlLimitedBots:ad.htmlLimitedBots,reactMaxHeadersLength:ad.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:m,cacheLifeProfiles:ad.cacheLife,basePath:ad.basePath,serverActions:ad.experimental.serverActions,...at||au?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:at}:{},cacheComponents:!!ad.cacheComponents,experimental:{isRoutePPREnabled:as,expireTime:ad.expireTime,staleTimes:ad.experimental.staleTimes,dynamicOnHover:!!ad.experimental.dynamicOnHover,inlineCss:!!ad.experimental.inlineCss,authInterrupts:!!ad.experimental.authInterrupts,clientTraceMetadata:ad.experimental.clientTraceMetadata||[],clientParamParsingOrigins:ad.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,B.parseMaxPostponedStateSize)(ad.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>M.onRequestError(a,b,d,e,ac),err:(0,h.getRequestMeta)(a,"invokeError"),dev:M.isDev}};at&&(l.renderOpts.nextExport=!0,l.renderOpts.supportsDynamicResponse=!1,l.renderOpts.isDebugDynamicAccesses=at),i&&(l.renderOpts.supportsDynamicResponse=!1);let n=await k(e,l),{metadata:o}=n,{cacheControl:p,headers:q={},fetchTags:r,fetchMetrics:s}=o;if(r&&(q[x.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,az&&(null==p?void 0:p.revalidate)===0&&!M.isDev&&!as){let a=o.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${aa}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
2
- see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:u.CachedRouteKind.APP_PAGE,html:n,headers:q,rscData:o.flightData,postponed:o.postponed,status:o.statusCode,segmentData:o.segmentData},cacheControl:p}},p=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i,forceStaticRender:j=!1})=>{let k,l=!1===M.isDev,q=c||b.writableEnded;if(ai&&ab&&!f&&!J)return(null==ac?void 0:ac.render404)?await ac.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(aj&&(k=(0,v.parseFallbackField)(aj.fallback)),k===v.FallbackMode.PRERENDER&&(0,t.isBot)(al)&&(!as||an)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ai=!0),ai&&(k!==v.FallbackMode.NOT_FOUND||f)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),!J&&k!==v.FallbackMode.BLOCKING_STATIC_RENDER&&aE&&!q&&!_&&T&&(l||!ak)){if((l||aj)&&k===v.FallbackMode.NOT_FOUND){if(ad.experimental.adapterPath)return await aJ();throw new A.NoFallbackError}if(as&&(ad.cacheComponents?!aw:!ap)){let b=l&&"string"==typeof(null==aj?void 0:aj.fallback)?aj.fallback:ah,c=l&&(null==aj?void 0:aj.fallbackRouteParams)?(0,n.createOpaqueFallbackRouteParams)(aj.fallbackRouteParams):au?(0,n.getFallbackRouteParams)(ah,M):null,f=await M.handleResponse({cacheKey:b,req:a,nextConfig:ad,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:$,isRoutePPREnabled:as,responseGenerator:async()=>o({span:i,postponed:void 0,fallbackRouteParams:c,forceStaticRender:!1}),waitUntil:d.waitUntil,isMinimalMode:J});if(null===f)return null;if(f)return delete f.cacheControl,f}}let r=ai||g||!av?void 0:av;if(aA&&!J&&m&&aw&&!j){let b=await m.get(aa,{kind:u.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===u.CachedRouteKind.APP_PAGE&&(r=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,H.scheduleOnNextTick)(async()=>{let b=M.getResponseCache(a);try{await b.revalidate(aa,m,as,!1,a=>p({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if(at&&void 0!==r)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:u.CachedRouteKind.PAGES,html:w.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let s=l&&(null==aj?void 0:aj.fallbackRouteParams)&&(0,h.getRequestMeta)(a,"renderFallbackShell")?(0,n.createOpaqueFallbackRouteParams)(aj.fallbackRouteParams):au?(0,n.getFallbackRouteParams)(ah,M):null;return o({span:i,postponed:r,fallbackRouteParams:s,forceStaticRender:j})},q=async c=>{var f,g,i,j,k;let l,m=await M.handleResponse({cacheKey:aD,responseGenerator:a=>p({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ai,isRoutePPREnabled:as,req:a,nextConfig:ad,prerenderManifest:$,waitUntil:d.waitUntil,isMinimalMode:J});if(_&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),M.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!m){if(aD)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=m.value)?void 0:f.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=m.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let n="string"==typeof m.value.postponed;az&&!aw&&(!n||ao)&&(J||b.setHeader("x-nextjs-cache",ai?"REVALIDATED":m.isMiss?"MISS":m.isStale?"STALE":"HIT"),b.setHeader(s.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=m;if(av)l={revalidate:0,expire:void 0};else if(aw)l={revalidate:0,expire:void 0};else if(!M.isDev)if(_)l={revalidate:0,expire:void 0};else if(az){if(m.cacheControl)if("number"==typeof m.cacheControl.revalidate){if(m.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${m.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:m.cacheControl.revalidate,expire:(null==(j=m.cacheControl)?void 0:j.expire)??ad.expireTime}}else l={revalidate:x.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(m.cacheControl=l,"string"==typeof ax&&(null==q?void 0:q.kind)===u.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[x.NEXT_CACHE_TAGS_HEADER];J&&az&&c&&"string"==typeof c&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(ax);return void 0!==d?(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.fromStatic(d,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl}):(b.statusCode=204,(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl}))}let r=aA?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r(m,{url:(0,h.getRequestMeta)(a,"initURL")??a.url}))return null;if(q.headers){let a={...q.headers};for(let[c,d]of(J&&az||delete a[x.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let t=null==(g=q.headers)?void 0:g[x.NEXT_CACHE_TAGS_HEADER];if(J&&az&&t&&"string"==typeof t&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,t),!q.status||ap&&as||(b.statusCode=q.status),!J&&q.status&&F.RedirectStatusCode[q.status]&&ap&&(b.statusCode=200),n&&!aw&&b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"1"),ap&&!_){if(void 0===q.rscData){if(q.html.contentType!==s.RSC_CONTENT_TYPE_HEADER)if(ad.cacheComponents)return b.statusCode=404,(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl});else throw Object.defineProperty(new G.InvariantError(`Expected RSC response, got ${q.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:q.html,cacheControl:m.cacheControl})}return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.fromStatic(q.rscData,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl})}let v=q.html;if(!n||J||ap)return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:m.cacheControl});if(at)return v.push(new ReadableStream({start(a){a.enqueue(y.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}});let A=new TransformStream;return v.push(A.readable),o({span:c,postponed:q.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(A.writable)}).catch(a=>{A.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}})};if(!aI)return await aH.withPropagatedContext(a.headers,()=>aH.trace(i.BaseServerSpan.handleRequest,{spanName:`${aG} ${O}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aG,"http.target":a.url}},q));await q(aI)}catch(b){throw b instanceof A.NoFallbackError||await M.onRequestError(a,b,{routerKind:"App Router",routePath:O,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:az,isOnDemandRevalidate:ai})},!1,ac),b}}},2532:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,5547,23)),Promise.resolve().then(c.t.bind(c,5098,23)),Promise.resolve().then(c.t.bind(c,7644,23)),Promise.resolve().then(c.t.bind(c,3859,23)),Promise.resolve().then(c.t.bind(c,8099,23)),Promise.resolve().then(c.t.bind(c,6237,23)),Promise.resolve().then(c.t.bind(c,8562,23)),Promise.resolve().then(c.t.bind(c,6675,23))},3033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3873:a=>{"use strict";a.exports=require("path")},3954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},4103:(a,b,c)=>{"use strict";c.d(b,{W:()=>e});var d=c(8249);function e({status:a}){let b={deployed:"bg-success-mid/15 text-success border-success-mid/30",failed:"bg-danger-mid/15 text-danger border-danger-mid/30",not_deployed:"bg-fg-faint/15 text-fg-muted border-fg-faint/30"},c="deployed"===a?(0,d.jsxs)("span",{className:"relative flex h-1.5 w-1.5",children:[(0,d.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-success opacity-30"}),(0,d.jsx)("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-success"})]}):(0,d.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${"failed"===a?"bg-danger":"bg-fg-muted"}`});return(0,d.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium border ${b[a]??b.not_deployed}`,children:[c,{deployed:"Deployed",failed:"Failed",not_deployed:"Not Deployed"}[a]??"Unknown"]})}},4401:(a,b,c)=>{Promise.resolve().then(c.bind(c,7841))},5178:(a,b,c)=>{"use strict";c.d(b,{ThemeProvider:()=>e});var d=c(7943);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call ThemeProvider() from the server but ThemeProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/components/ThemeProvider.tsx","ThemeProvider");(0,d.registerClientReference)(function(){throw Error("Attempted to call useTheme() from the server but useTheme is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/components/ThemeProvider.tsx","useTheme")},5896:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,3318,23)),Promise.resolve().then(c.bind(c,7086)),Promise.resolve().then(c.bind(c,5178))},6392:(a,b,c)=>{"use strict";c.d(b,{D:()=>h,ThemeProvider:()=>g});var d=c(8249),e=c(7484);let f=(0,e.createContext)(void 0);function g({children:a}){let[b,c]=(0,e.useState)("dark"),[g,h]=(0,e.useState)("dark");return(0,d.jsx)(f.Provider,{value:{theme:b,resolvedTheme:g,setTheme:a=>{c(a),h("system"===a?"dark":a),localStorage.setItem("mcp-deploy-theme",a),document.documentElement.setAttribute("data-theme",a)}},children:a})}function h(){let a=(0,e.useContext)(f);if(!a)throw Error("useTheme must be used within ThemeProvider");return a}},6439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},6487:()=>{},6537:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>k,metadata:()=>i});var d=c(5735),e=c(3059),f=c.n(e),g=c(5178),h=c(7086);c(1135);let i={title:"MCP Deploy",description:"Deploy and manage MCP servers on Cloudflare Workers"},j=`
1
+ (()=>{var a={};a.id=526,a.ids=[526],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1135:()=>{},1758:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(7943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/app/mcps/[slug]/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/app/mcps/[slug]/page.tsx","default")},2094:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>D.a,__next_app__:()=>L,handler:()=>N,routeModule:()=>M});var d=c(7553),e=c(4006),f=c(7798),g=c(4775),h=c(9373),i=c(3461),j=c(1020),k=c(6349),l=c(4365),m=c(6023),n=c(3747),o=c(4235),p=c(3938),q=c(261),r=c(6758),s=c(7243),t=c(6713),u=c(7527),v=c(2820),w=c(8216),x=c(7929),y=c(9551),z=c(9125),A=c(6439),B=c(7068),C=c(5547),D=c.n(C),E=c(1287),F=c(1494),G=c(722),H=c(753),I=c(3954),J={};for(let a in E)0>["default","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(J[a]=()=>E[a]);c.d(b,J);let K={children:["",{children:["mcps",{children:["[slug]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,1758)),"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/app/mcps/[slug]/page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,6537)),"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/app/layout.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,5547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,5091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,5270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,8193,23)),"next/dist/client/components/builtin/unauthorized.js"]}]}.children,L={require:c,loadChunk:()=>Promise.resolve()},M=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/mcps/[slug]/page",pathname:"/mcps/[slug]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:K},distDir:".next",relativeProjectDir:""});async function N(a,b,d){var C;M.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let J=!!(0,h.getRequestMeta)(a,"minimalMode"),O="/mcps/[slug]/page";"/index"===O&&(O="/");let P=await M.prepare(a,b,{srcPage:O,multiZoneDraftMode:!1});if(!P)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Q,query:R,params:S,pageIsDynamic:T,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,serverActionsManifest:X,clientReferenceManifest:Y,subresourceIntegrityManifest:Z,prerenderManifest:$,isDraftMode:_,resolvedPathname:aa,revalidateOnlyGenerated:ab,routerServerContext:ac,nextConfig:ad,parsedUrl:ae,interceptionRoutePatterns:af,deploymentId:ag}=P,ah=(0,q.normalizeAppPath)(O),{isOnDemandRevalidate:ai}=P,aj=ad.experimental.ppr&&!ad.cacheComponents&&(0,I.isInterceptionRouteAppPath)(aa)?null:M.match(aa,$),ak=!!$.routes[aa],al=a.headers["user-agent"]||"",am=(0,t.getBotType)(al),an=(0,p.isHtmlBotRequest)(a),ao=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[s.NEXT_ROUTER_PREFETCH_HEADER],ap=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[s.RSC_HEADER],aq=(0,r.getIsPossibleServerAction)(a),ar=(0,m.checkIsAppPPREnabled)(ad.experimental.ppr);if(!(0,h.getRequestMeta)(a,"postponed")&&ar&&"1"===a.headers[x.NEXT_RESUME_HEADER]&&"POST"===a.method){let b=[];for await(let c of a)b.push(c);let c=Buffer.concat(b).toString("utf8");(0,h.addRequestMeta)(a,"postponed",c)}let as=ar&&(null==(C=$.routes[ah]??$.dynamicRoutes[ah])?void 0:C.renderingMode)==="PARTIALLY_STATIC",at=!1,au=!1,av=as?(0,h.getRequestMeta)(a,"postponed"):void 0,aw=as&&ap&&!ao;J&&(aw=aw&&!!av);let ax=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ay=(!an||!as)&&(!al||(0,p.shouldServeStreamingMetadata)(al,ad.htmlLimitedBots)),az=!!((aj||ak||$.routes[ah])&&!(an&&as)),aA=as&&!0===ad.cacheComponents,aB=!0===M.isDev||!az||"string"==typeof av||(aA&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aw&&!J:aw),aC=an&&as,aD=null;_||!az||aB||aq||av||aw||(aD=aa);let aE=aD;!aE&&M.isDev&&(aE=aa),M.isDev||_||!az||!ap||aw||(0,k.d)(a.headers);let aF={...E,tree:K,GlobalError:D(),handler:N,routeModule:M,__next_app__:L};X&&Y&&(0,o.setManifestsSingleton)({page:O,clientReferenceManifest:Y,serverActionsManifest:X});let aG=a.method||"GET",aH=(0,g.getTracer)(),aI=aH.getActiveScopeSpan(),aJ=async()=>((null==ac?void 0:ac.render404)?await ac.render404(a,b,ae,!1):b.end("This page could not be found"),null);try{let f=M.getVaryHeader(aa,af);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return M.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aH.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aG} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aG} ${O}`)})},m=(0,h.getRequestMeta)(a,"incrementalCache"),o=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let l={query:R,params:S,page:ah,sharedContext:{buildId:Q},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aF,Component:(0,j.T)(aF),params:S,routeModule:M,page:O,postponed:f,shouldWaitOnAllReady:aC,serveStreamingMetadata:ay,supportsDynamicResponse:"string"==typeof f||aB,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,subresourceIntegrityManifest:Z,setCacheStatus:null==ac?void 0:ac.setCacheStatus,setIsrStatus:null==ac?void 0:ac.setIsrStatus,setReactDebugChannel:null==ac?void 0:ac.setReactDebugChannel,sendErrorsToBrowser:null==ac?void 0:ac.sendErrorsToBrowser,dir:c(3873).join(process.cwd(),M.relativeProjectDir),isDraftMode:_,botType:am,isOnDemandRevalidate:ai,isPossibleServerAction:aq,assetPrefix:ad.assetPrefix,nextConfigOutput:ad.output,crossOrigin:ad.crossOrigin,trailingSlash:ad.trailingSlash,images:ad.images,previewProps:$.preview,deploymentId:ag,enableTainting:ad.experimental.taint,htmlLimitedBots:ad.htmlLimitedBots,reactMaxHeadersLength:ad.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:m,cacheLifeProfiles:ad.cacheLife,basePath:ad.basePath,serverActions:ad.experimental.serverActions,...at||au?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:at}:{},cacheComponents:!!ad.cacheComponents,experimental:{isRoutePPREnabled:as,expireTime:ad.expireTime,staleTimes:ad.experimental.staleTimes,dynamicOnHover:!!ad.experimental.dynamicOnHover,inlineCss:!!ad.experimental.inlineCss,authInterrupts:!!ad.experimental.authInterrupts,clientTraceMetadata:ad.experimental.clientTraceMetadata||[],clientParamParsingOrigins:ad.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,B.parseMaxPostponedStateSize)(ad.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>M.onRequestError(a,b,d,e,ac),err:(0,h.getRequestMeta)(a,"invokeError"),dev:M.isDev}};at&&(l.renderOpts.nextExport=!0,l.renderOpts.supportsDynamicResponse=!1,l.renderOpts.isDebugDynamicAccesses=at),i&&(l.renderOpts.supportsDynamicResponse=!1);let n=await k(e,l),{metadata:o}=n,{cacheControl:p,headers:q={},fetchTags:r,fetchMetrics:s}=o;if(r&&(q[x.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,az&&(null==p?void 0:p.revalidate)===0&&!M.isDev&&!as){let a=o.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${aa}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
2
+ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:u.CachedRouteKind.APP_PAGE,html:n,headers:q,rscData:o.flightData,postponed:o.postponed,status:o.statusCode,segmentData:o.segmentData},cacheControl:p}},p=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i,forceStaticRender:j=!1})=>{let k,l=!1===M.isDev,q=c||b.writableEnded;if(ai&&ab&&!f&&!J)return(null==ac?void 0:ac.render404)?await ac.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(aj&&(k=(0,v.parseFallbackField)(aj.fallback)),k===v.FallbackMode.PRERENDER&&(0,t.isBot)(al)&&(!as||an)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ai=!0),ai&&(k!==v.FallbackMode.NOT_FOUND||f)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),!J&&k!==v.FallbackMode.BLOCKING_STATIC_RENDER&&aE&&!q&&!_&&T&&(l||!ak)){if((l||aj)&&k===v.FallbackMode.NOT_FOUND){if(ad.experimental.adapterPath)return await aJ();throw new A.NoFallbackError}if(as&&(ad.cacheComponents?!aw:!ap)){let b=l&&"string"==typeof(null==aj?void 0:aj.fallback)?aj.fallback:ah,c=l&&(null==aj?void 0:aj.fallbackRouteParams)?(0,n.createOpaqueFallbackRouteParams)(aj.fallbackRouteParams):au?(0,n.getFallbackRouteParams)(ah,M):null,f=await M.handleResponse({cacheKey:b,req:a,nextConfig:ad,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:$,isRoutePPREnabled:as,responseGenerator:async()=>o({span:i,postponed:void 0,fallbackRouteParams:c,forceStaticRender:!1}),waitUntil:d.waitUntil,isMinimalMode:J});if(null===f)return null;if(f)return delete f.cacheControl,f}}let r=ai||g||!av?void 0:av;if(aA&&!J&&m&&aw&&!j){let b=await m.get(aa,{kind:u.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===u.CachedRouteKind.APP_PAGE&&(r=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,H.scheduleOnNextTick)(async()=>{let b=M.getResponseCache(a);try{await b.revalidate(aa,m,as,!1,a=>p({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if(at&&void 0!==r)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:u.CachedRouteKind.PAGES,html:w.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let s=l&&(null==aj?void 0:aj.fallbackRouteParams)&&(0,h.getRequestMeta)(a,"renderFallbackShell")?(0,n.createOpaqueFallbackRouteParams)(aj.fallbackRouteParams):au?(0,n.getFallbackRouteParams)(ah,M):null;return o({span:i,postponed:r,fallbackRouteParams:s,forceStaticRender:j})},q=async c=>{var f,g,i,j,k;let l,m=await M.handleResponse({cacheKey:aD,responseGenerator:a=>p({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ai,isRoutePPREnabled:as,req:a,nextConfig:ad,prerenderManifest:$,waitUntil:d.waitUntil,isMinimalMode:J});if(_&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),M.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!m){if(aD)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=m.value)?void 0:f.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=m.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let n="string"==typeof m.value.postponed;az&&!aw&&(!n||ao)&&(J||b.setHeader("x-nextjs-cache",ai?"REVALIDATED":m.isMiss?"MISS":m.isStale?"STALE":"HIT"),b.setHeader(s.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=m;if(av)l={revalidate:0,expire:void 0};else if(aw)l={revalidate:0,expire:void 0};else if(!M.isDev)if(_)l={revalidate:0,expire:void 0};else if(az){if(m.cacheControl)if("number"==typeof m.cacheControl.revalidate){if(m.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${m.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:m.cacheControl.revalidate,expire:(null==(j=m.cacheControl)?void 0:j.expire)??ad.expireTime}}else l={revalidate:x.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(m.cacheControl=l,"string"==typeof ax&&(null==q?void 0:q.kind)===u.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[x.NEXT_CACHE_TAGS_HEADER];J&&az&&c&&"string"==typeof c&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(ax);return void 0!==d?(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.fromStatic(d,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl}):(b.statusCode=204,(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl}))}let r=aA?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r(m,{url:(0,h.getRequestMeta)(a,"initURL")??a.url}))return null;if(q.headers){let a={...q.headers};for(let[c,d]of(J&&az||delete a[x.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let t=null==(g=q.headers)?void 0:g[x.NEXT_CACHE_TAGS_HEADER];if(J&&az&&t&&"string"==typeof t&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,t),!q.status||ap&&as||(b.statusCode=q.status),!J&&q.status&&F.RedirectStatusCode[q.status]&&ap&&(b.statusCode=200),n&&!aw&&b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"1"),ap&&!_){if(void 0===q.rscData){if(q.html.contentType!==s.RSC_CONTENT_TYPE_HEADER)if(ad.cacheComponents)return b.statusCode=404,(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl});else throw Object.defineProperty(new G.InvariantError(`Expected RSC response, got ${q.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:q.html,cacheControl:m.cacheControl})}return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.fromStatic(q.rscData,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl})}let v=q.html;if(!n||J||ap)return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:m.cacheControl});if(at)return v.push(new ReadableStream({start(a){a.enqueue(y.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}});let A=new TransformStream;return v.push(A.readable),o({span:c,postponed:q.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(A.writable)}).catch(a=>{A.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}})};if(!aI)return await aH.withPropagatedContext(a.headers,()=>aH.trace(i.BaseServerSpan.handleRequest,{spanName:`${aG} ${O}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aG,"http.target":a.url}},q));await q(aI)}catch(b){throw b instanceof A.NoFallbackError||await M.onRequestError(a,b,{routerKind:"App Router",routePath:O,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:az,isOnDemandRevalidate:ai})},!1,ac),b}}},2532:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,5547,23)),Promise.resolve().then(c.t.bind(c,5098,23)),Promise.resolve().then(c.t.bind(c,7644,23)),Promise.resolve().then(c.t.bind(c,3859,23)),Promise.resolve().then(c.t.bind(c,8099,23)),Promise.resolve().then(c.t.bind(c,6237,23)),Promise.resolve().then(c.t.bind(c,8562,23)),Promise.resolve().then(c.t.bind(c,6675,23))},3033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3406:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},3873:a=>{"use strict";a.exports=require("path")},3954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},4103:(a,b,c)=>{"use strict";c.d(b,{W:()=>e});var d=c(8249);function e({status:a}){let b={deployed:"bg-success-mid/15 text-success border-success-mid/30",failed:"bg-danger-mid/15 text-danger border-danger-mid/30",not_deployed:"bg-fg-faint/15 text-fg-muted border-fg-faint/30"},c="deployed"===a?(0,d.jsxs)("span",{className:"relative flex h-1.5 w-1.5",children:[(0,d.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-success opacity-30"}),(0,d.jsx)("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-success"})]}):(0,d.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${"failed"===a?"bg-danger":"bg-fg-muted"}`});return(0,d.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium border ${b[a]??b.not_deployed}`,children:[c,{deployed:"Deployed",failed:"Failed",not_deployed:"Not Deployed"}[a]??"Unknown"]})}},4401:(a,b,c)=>{Promise.resolve().then(c.bind(c,7841))},5178:(a,b,c)=>{"use strict";c.d(b,{ThemeProvider:()=>e});var d=c(7943);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call ThemeProvider() from the server but ThemeProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/components/ThemeProvider.tsx","ThemeProvider");(0,d.registerClientReference)(function(){throw Error("Attempted to call useTheme() from the server but useTheme is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/components/ThemeProvider.tsx","useTheme")},5896:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,3318,23)),Promise.resolve().then(c.bind(c,7086)),Promise.resolve().then(c.bind(c,5178))},6392:(a,b,c)=>{"use strict";c.d(b,{D:()=>h,ThemeProvider:()=>g});var d=c(8249),e=c(7484);let f=(0,e.createContext)(void 0);function g({children:a}){let[b,c]=(0,e.useState)("dark"),[g,h]=(0,e.useState)("dark");return(0,d.jsx)(f.Provider,{value:{theme:b,resolvedTheme:g,setTheme:a=>{c(a),h("system"===a?"dark":a),localStorage.setItem("mcp-deploy-theme",a),document.documentElement.setAttribute("data-theme",a)}},children:a})}function h(){let a=(0,e.useContext)(f);if(!a)throw Error("useTheme must be used within ThemeProvider");return a}},6439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},6487:()=>{},6537:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>k,metadata:()=>i});var d=c(5735),e=c(3059),f=c.n(e),g=c(5178),h=c(7086);c(1135);let i={title:"MCP Deploy",description:"Deploy and manage MCP servers on Cloudflare Workers"},j=`
3
3
  (function(){
4
4
  var t = localStorage.getItem("mcp-deploy-theme");
5
5
  if (t === "light" || t === "system") {
6
6
  document.documentElement.setAttribute("data-theme", t);
7
7
  }
8
8
  })();
9
- `;function k({children:a}){return(0,d.jsxs)("html",{lang:"en","data-theme":"dark",suppressHydrationWarning:!0,children:[(0,d.jsxs)("head",{children:[(0,d.jsx)("script",{dangerouslySetInnerHTML:{__html:j}}),!1]}),(0,d.jsx)("body",{className:"bg-surface-page text-fg min-h-screen antialiased",children:(0,d.jsxs)(g.ThemeProvider,{children:[(0,d.jsx)("nav",{className:"border-b border-edge bg-surface/50 backdrop-blur-sm fixed top-0 inset-x-0 z-50",children:(0,d.jsxs)("div",{className:"max-w-5xl mx-auto px-6 py-4 flex items-center justify-between",children:[(0,d.jsxs)(f(),{href:"/",className:"text-lg font-semibold tracking-tight",children:[(0,d.jsx)("span",{className:"text-accent-fg",children:"MCP"})," Deploy"]}),(0,d.jsx)(h.NavLinks,{})]})}),(0,d.jsx)("main",{className:"max-w-5xl mx-auto px-6 py-8 pt-16",children:a})]})})]})}},6713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},7068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},7086:(a,b,c)=>{"use strict";c.d(b,{NavLinks:()=>d});let d=(0,c(7943).registerClientReference)(function(){throw Error("Attempted to call NavLinks() from the server but NavLinks is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/components/NavLinks.tsx","NavLinks")},7164:(a,b,c)=>{"use strict";c.d(b,{NavLinks:()=>i});var d=c(8249),e=c(2116),f=c.n(e),g=c(9099);let h=[{href:"/",label:"Dashboard"},{href:"/setup",label:"Settings"}];function i(){let a=(0,g.usePathname)();return(0,d.jsx)("div",{className:"flex gap-6 text-sm",children:h.map(({href:b,label:c})=>{let e="/"===b?"/"===a:a.startsWith(b);return(0,d.jsx)(f(),{href:b,className:`font-medium transition-colors pb-0.5 ${e?"text-fg border-b-2 border-accent-fg":"text-fg-muted hover:text-fg"}`,children:c},b)})})}},7841:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>n});var d=c(8249),e=c(7484),f=c(9099),g=c(4103);function h({open:a}){return a?(0,d.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}):(0,d.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})})}function i({className:a="w-3 h-3 inline-block ml-0.5"}){return(0,d.jsxs)("svg",{className:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,d.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,d.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,d.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function j({slug:a,fields:b,configuredKeys:c,enabledPlatforms:f}){let g=b.filter(a=>!!a.required||!a.forPlatform||!f||f.includes(a.forPlatform)),[j,k]=(0,e.useState)({}),[l,m]=(0,e.useState)({}),[n,o]=(0,e.useState)({}),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)({}),[x,y]=(0,e.useState)(c),[z,A]=(0,e.useState)(null),B=(0,e.useRef)(new Set);async function C(b){if(confirm("Are you sure you want to clear this value? This will remove it from Cloudflare.")){s(b),A(null);try{let c=await fetch(`/api/mcps/${a}/secrets`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({deleteKeys:[b]})}),d=await c.json();c.ok?(A({type:"success",text:"Cleared successfully"}),y(x.filter(a=>a!==b)),o({...n,[b]:!1})):A({type:"error",text:d.error??"Failed to delete"})}catch{A({type:"error",text:"Failed to connect to server"})}finally{s(null)}}}async function D(a,c=!1){if(!a.test)return;let d=j[a.key];if(!d?.trim()){c||w({...v,[a.key]:{success:!1,message:"Enter a value first"}});return}u(a.key),w({...v,[a.key]:void 0});try{let c={};for(let a of b)j[a.key]?.trim()&&(c[a.key]=j[a.key]);let e=await fetch("/api/test-connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({spec:a.test,value:d,allValues:c})}),f=await e.json();w({...v,[a.key]:{success:f.success,message:f.success?f.message??"Connection successful":f.error??"Test failed"}})}catch{w({...v,[a.key]:{success:!1,message:"Failed to test connection"}})}finally{u(null)}}let E=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;async function F(b){b.preventDefault(),q(!0),A(null);let c={};for(let[a,b]of Object.entries(j))b.trim()&&(c[a]=b.trim());if(0===Object.keys(c).length){A({type:"error",text:"No changes to save."}),q(!1);return}for(let a of g){let b=c[a.key];if("email"===a.type&&b&&!E.test(b)){A({type:"error",text:`${a.label}: enter a valid email address`}),q(!1);return}}try{let b=await fetch(`/api/mcps/${a}/secrets`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({secrets:c})}),d=await b.json();b.ok?(A({type:"success",text:"Saved successfully"}),k({}),o({}),y([...new Set([...x,...d.updatedKeys])])):A({type:"error",text:d.error??"Failed to update"})}catch{A({type:"error",text:"Failed to connect to server"})}finally{q(!1)}}return 0===g.length?null:(0,d.jsxs)("form",{onSubmit:F,className:"space-y-4",children:[g.map(b=>{let c=x.includes(b.key),e=n[b.key]||!c,f=!!b.test,g=!!j[b.key]?.trim();return(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"flex items-center gap-2 text-sm font-medium text-fg-secondary mb-1.5",children:[b.label,b.required?(0,d.jsx)("span",{className:"text-accent-fg text-xs",children:"required"}):(0,d.jsx)("span",{className:"text-fg-faint text-xs",children:"optional"})]}),b.helpText&&(0,d.jsxs)("p",{className:"text-xs text-fg-faint mb-2",children:[b.helpText,b.helpUrl&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:b.helpUrl,target:"_blank",rel:"noopener noreferrer",className:"text-accent-fg hover:underline",children:["Get key ",(0,d.jsx)(i,{})]})]})]}),c&&!e?(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("div",{className:"flex-1 px-4 py-2.5 bg-surface-raised/50 border border-success-mid/30 rounded-lg text-sm text-fg-muted font-mono",children:"••••••••••••"}),(0,d.jsx)("button",{type:"button",onClick:()=>{var a;return a=b.key,void o({...n,[a]:!0})},className:"px-4 py-2.5 bg-surface-overlay hover:bg-edge-subtle text-fg-secondary text-sm font-medium rounded-lg transition-colors whitespace-nowrap",children:"Change"}),(0,d.jsx)("button",{type:"button",onClick:()=>C(b.key),disabled:r===b.key,className:"px-4 py-2.5 bg-danger-mid/10 hover:bg-danger-mid/20 border border-danger-mid/30 text-danger text-sm font-medium rounded-lg transition-colors whitespace-nowrap disabled:opacity-50",children:r===b.key?"Clearing...":"Clear"})]}):(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsxs)("div",{className:"relative flex-1",children:[(0,d.jsx)("input",{type:"password"!==b.type||l[b.key]?"text":"password",id:`${a}-update-${b.key}`,name:`${a}-update-${b.key}`,autoComplete:"off","data-1p-ignore":!0,"data-lpignore":"true",value:j[b.key]??"",onChange:a=>{var c,d;let e;return c=b.key,d=a.target.value,e=j[c]??"",void((Math.abs(d.length-e.length)>5||!d)&&(B.current.delete(c),v[c]&&w({...v,[c]:void 0})),k({...j,[c]:d}))},onBlur:()=>{let a;return a=j[b.key],void(b.test&&a?.trim()&&!B.current.has(b.key)&&(B.current.add(b.key),D(b,!0)))},placeholder:b.placeholder,className:`w-full px-4 py-2.5 bg-surface-raised border border-edge-subtle rounded-lg text-sm text-fg placeholder-fg-faint focus:outline-none focus:border-accent-edge focus:ring-1 focus:ring-accent-edge${"password"===b.type?" pr-10":""}`}),"password"===b.type&&(0,d.jsx)("button",{type:"button",onClick:()=>m({...l,[b.key]:!l[b.key]}),className:"absolute right-3 top-1/2 -translate-y-1/2 text-fg-faint hover:text-fg-secondary transition-colors",children:(0,d.jsx)(h,{open:l[b.key]??!1})})]}),f&&g&&(0,d.jsx)("button",{type:"button",onClick:()=>D(b),disabled:t===b.key,className:"px-4 py-2.5 bg-surface-overlay hover:bg-edge-subtle disabled:bg-surface-raised disabled:text-fg-disabled text-fg-secondary text-sm font-medium rounded-lg transition-colors whitespace-nowrap",children:t===b.key?"Testing...":"Test"}),c&&e&&(0,d.jsx)("button",{type:"button",onClick:()=>{o({...n,[b.key]:!1}),k({...j,[b.key]:""}),w({...v,[b.key]:void 0})},className:"px-4 py-2.5 bg-surface-overlay hover:bg-edge-subtle text-fg-muted text-sm font-medium rounded-lg transition-colors whitespace-nowrap",children:"Cancel"})]}),v[b.key]&&(0,d.jsxs)("p",{className:`text-xs mt-2 ${v[b.key].success?"text-success":"text-danger"}`,children:[v[b.key].success?"✓":"✗"," ",v[b.key].message]})]},b.key)}),z&&(0,d.jsx)("p",{className:`text-sm rounded-lg px-4 py-2 ${"success"===z.type?"text-success bg-success-mid/10 border border-success-mid/20":"text-danger bg-danger-mid/10 border border-danger-mid/20"}`,children:z.text}),Object.values(j).some(a=>a?.trim())&&(0,d.jsx)("button",{type:"submit",disabled:p,className:"px-6 py-2.5 bg-accent hover:bg-accent-hover disabled:opacity-50 disabled:cursor-not-allowed text-white text-sm font-medium rounded-lg transition-colors",children:p?"Saving...":"Save Changes"})]})}function k({fields:a,values:b,onChange:c}){return 0===a.length?null:(0,d.jsx)("div",{className:"space-y-4",children:a.map(a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-fg-secondary mb-1.5",children:a.label}),a.helpText&&(0,d.jsx)("p",{className:"text-xs text-fg-faint mb-2",children:a.helpText}),"multiselect"===a.type&&a.options?(0,d.jsx)(l,{field:a,value:b[a.key]??a.default??"",onChange:d=>c({...b,[a.key]:d})}):"select"===a.type&&a.options?(0,d.jsx)("select",{value:b[a.key]??a.default??"",onChange:d=>c({...b,[a.key]:d.target.value}),className:"w-full px-4 py-2.5 bg-surface-raised border border-edge-subtle rounded-lg text-sm text-fg focus:outline-none focus:border-accent-edge focus:ring-1 focus:ring-accent-edge",children:a.options.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value))}):(0,d.jsx)("input",{type:"text",value:b[a.key]??a.default??"",onChange:d=>c({...b,[a.key]:d.target.value}),className:"w-full px-4 py-2.5 bg-surface-raised border border-edge-subtle rounded-lg text-sm text-fg focus:outline-none focus:border-accent-edge focus:ring-1 focus:ring-accent-edge"})]},a.key))})}function l({field:a,value:b,onChange:c}){let[f,g]=(0,e.useState)(new Set(b.split(",").filter(Boolean)));return(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:a.options?.map(a=>(0,d.jsx)("button",{type:"button",onClick:()=>{var b;let d;return b=a.value,void((d=new Set(f)).has(b)?d.delete(b):d.add(b),g(d),c(Array.from(d).join(",")))},className:`px-3 py-1.5 rounded-lg text-sm border transition-colors ${f.has(a.value)?"bg-accent-edge/15 border-accent-edge/40 text-accent-fg":"bg-surface-raised border-edge-subtle text-fg-muted hover:border-fg-disabled"}`,children:a.label},a.value))})}function m({mcpUrl:a,mcpUrlWithToken:b,bearerToken:c,slug:f,authMode:g="bearer",oauthPassword:i}){let[j,k]=(0,e.useState)("ui"),[l,m]=(0,e.useState)(!1),[n,o]=(0,e.useState)(!1),[p,q]=(0,e.useState)(!1),r="bearer"===g?b:a,s=JSON.stringify("bearer"===g?{mcpServers:{[f]:{command:"npx",args:["mcp-remote",a,"--header","Authorization:${AUTH_HEADER}"],env:{AUTH_HEADER:`Bearer ${c??""}`}}}}:{mcpServers:{[f]:{command:"npx",args:["mcp-remote",a]}}},null,2);async function t(a){try{await navigator.clipboard.writeText(a)}catch{let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),document.body.removeChild(b)}m(!0),setTimeout(()=>m(!1),2e3)}async function u(){if(i){try{await navigator.clipboard.writeText(i)}catch{let a=document.createElement("textarea");a.value=i,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a)}q(!0),setTimeout(()=>q(!1),2e3)}}let v=i&&"oauth"===g&&(0,d.jsxs)("div",{className:"mt-3 pt-3 border-t border-edge-subtle/50",children:[(0,d.jsx)("p",{className:"text-xs text-fg-faint mb-2",children:"OAuth password"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("div",{className:"relative flex-1",children:[(0,d.jsx)("div",{className:"w-full px-4 py-2.5 pr-10 bg-surface-raised border border-edge-subtle rounded-lg text-sm text-fg font-mono break-all",children:n?i:"•".repeat(24)}),(0,d.jsx)("button",{onClick:()=>o(!n),className:"absolute right-3 top-1/2 -translate-y-1/2 text-fg-faint hover:text-fg-secondary transition-colors",title:n?"Hide password":"Show password",children:(0,d.jsx)(h,{open:n})})]}),(0,d.jsx)("button",{onClick:u,className:"px-3 py-2.5 bg-surface-overlay hover:bg-edge-subtle rounded-lg text-xs text-fg-secondary transition-colors shrink-0",children:p?"Copied!":"Copy"})]})]});return(0,d.jsxs)("div",{className:"border border-edge rounded-xl overflow-hidden",children:[(0,d.jsx)("div",{className:"flex border-b border-edge",children:[{id:"ui",label:"Claude Desktop UI"},{id:"json",label:"JSON Config"}].map(a=>(0,d.jsx)("button",{onClick:()=>k(a.id),className:`px-4 py-2.5 text-xs font-medium transition-colors ${j===a.id?"bg-surface-raised text-accent-fg border-b-2 border-accent-fg":"text-fg-faint hover:text-fg-secondary"}`,children:a.label},a.id))}),(0,d.jsxs)("div",{className:"p-4",children:["ui"===j&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("p",{className:"text-sm text-fg-muted",children:["Go to"," ",(0,d.jsx)("strong",{children:"Settings → Connectors → Add custom connector"})," ","and paste this URL:"]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("code",{className:"flex-1 px-3 py-2 bg-surface-raised border border-edge-subtle rounded-lg text-sm text-accent-fg break-all",children:r}),(0,d.jsx)("button",{onClick:()=>t(r),className:"px-3 py-2 bg-surface-overlay hover:bg-edge-subtle rounded-lg text-xs text-fg-secondary transition-colors shrink-0",children:l?"Copied!":"Copy"})]}),"bearer"===g&&(0,d.jsx)("p",{className:"text-xs text-fg-faint",children:"Your bearer token is embedded in the URL. Keep it private."}),"oauth"===g&&(0,d.jsxs)("p",{className:"text-xs text-fg-faint",children:["After adding the connector, click ",(0,d.jsx)("strong",{children:"Configure"})," when prompted. Enter the password below in the authorization dialog."]}),"open"===g&&(0,d.jsx)("p",{className:"text-xs text-danger",children:"This MCP is deployed without authentication. Anyone with the URL can access it."}),v]}),"json"===j&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("p",{className:"text-sm text-fg-muted",children:["Add to your"," ",(0,d.jsx)("code",{className:"text-accent-fg",children:"claude_desktop_config.json"}),":"]}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("pre",{className:"px-4 py-3 bg-surface-raised rounded-lg text-xs text-fg-secondary overflow-x-auto",children:s}),(0,d.jsx)("button",{onClick:()=>t(s),className:"absolute top-2 right-2 px-2 py-1 bg-surface-overlay hover:bg-edge-subtle rounded text-xs text-fg-muted transition-colors",children:l?"Copied!":"Copy"})]}),"bearer"===g&&(0,d.jsxs)("p",{className:"text-xs text-fg-faint",children:["Uses ",(0,d.jsx)("code",{children:"mcp-remote"})," with bearer token authentication."]}),"oauth"===g&&(0,d.jsx)("p",{className:"text-xs text-fg-faint",children:"On first connect, your browser will open for OAuth authorization. Enter the password below when prompted."}),"open"===g&&(0,d.jsx)("p",{className:"text-xs text-danger",children:"This MCP is open. No authentication headers are sent."}),v]})]})]})}function n({params:a}){let b,c,l,n,o,p,{slug:q}=(0,e.use)(a),r=(0,f.useRouter)(),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(!0),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)({}),[E,F]=(0,e.useState)({}),[G,H]=(0,e.useState)({}),[I,J]=(0,e.useState)({}),[K,L]=(0,e.useState)(null),[M,N]=(0,e.useState)({}),[O,P]=(0,e.useState)("bearer"),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(null),[Y,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(!1),aa=(0,e.useRef)(new Set);async function ab(a,b=!1){if(!a.test)return;let c=E[a.key];if(!c?.trim()){b||J({...I,[a.key]:{success:!1,message:"Enter a value first"}});return}J({...I,[a.key]:void 0});try{let b={};for(let a of s?.secrets??[])E[a.key]?.trim()&&(b[a.key]=E[a.key]);let d=await fetch("/api/test-connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({spec:a.test,value:c,allValues:b})}),e=await d.json();J({...I,[a.key]:{success:e.success,message:e.success?e.message??"Connection successful":e.error??"Test failed"}})}catch{J({...I,[a.key]:{success:!1,message:"Failed to test connection"}})}}async function ac(){if(ae||function(){let a={};for(let b of ag){let c=E[b.key]?.trim()??"";b.required&&!c?a[b.key]=`${b.label} is required`:"email"===b.type&&c&&!ah.test(c)&&(a[b.key]="Enter a valid email address")}return N(a),0===Object.keys(a).length}()){if(Q&&ae){let a="oauth"===O?"OAuth password":"bearer token";if(!confirm(`This will regenerate your ${a} and invalidate existing connections. Continue?`))return}x(!0),B(null),z(null),T(!1);try{let a=await fetch(`/api/mcps/${q}/deploy`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({secrets:E,config:C,authMode:O,...Q&&"bearer"===O?{regenerateToken:!0}:{},...Q&&"oauth"===O?{regenerateOAuthPassword:!0}:{}})}),b=await a.json();if(a.ok){z(b),Q&&T(!0);let a=await fetch(`/api/mcps/${q}`).then(a=>a.json());t(a),R(!1)}else B(b.error??"Deployment failed")}catch{B("Failed to connect to server")}finally{x(!1)}}}async function ad(){V(!0),X(null);try{await fetch("/api/mcps/check-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slugs:[q]})});let a=await fetch(`/api/mcps/${q}`).then(a=>a.json());t(a),X(a.updateAvailable?"Update available!":"Already up to date"),setTimeout(()=>X(null),3e3)}catch{}finally{V(!1)}}if(u)return(0,d.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,d.jsx)("div",{className:"text-fg-faint",children:"Loading..."})});if(!s)return(0,d.jsx)("div",{className:"text-center py-20",children:(0,d.jsx)("p",{className:"text-fg-faint",children:"MCP not found."})});let ae=s.deployment?.status==="deployed",af=new Set((C.ENABLED_PLATFORMS||"").split(",").filter(Boolean)),ag=(s.secrets??[]).filter(a=>!!a.required||!a.forPlatform||af.has(a.forPlatform)),ah=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,ai=!ae&&ag.some(a=>a.required&&!E[a.key]?.trim());return(0,d.jsxs)("div",{className:"space-y-8",children:[(0,d.jsx)("div",{className:"flex items-start justify-between",children:(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,d.jsx)("h1",{className:"text-2xl font-bold",children:s.name}),(0,d.jsx)(g.W,{status:s.deployment?.status??"not_deployed"})]}),(0,d.jsx)("p",{className:"text-fg-muted text-sm",children:s.description}),(0,d.jsxs)("div",{className:"flex items-center gap-4 mt-2 text-xs text-fg-faint",children:[(0,d.jsxs)("span",{children:["v",s.version]}),(0,d.jsxs)("button",{onClick:ad,disabled:U,className:"inline-flex items-center gap-1.5 px-3 py-1 bg-surface-raised hover:bg-surface-overlay border border-edge-subtle rounded-lg text-xs text-fg-secondary transition-colors disabled:opacity-50",children:[(0,d.jsx)("svg",{className:`w-3 h-3 ${U?"animate-spin":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),U?"Checking...":"Check for updates"]}),W&&(0,d.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ${"Update available!"===W?"bg-success-mid/10 text-success":"bg-surface-overlay/50 text-fg-muted"}`,children:W}),s.githubRepo&&(0,d.jsxs)("a",{href:`https://github.com/${s.githubRepo}`,target:"_blank",rel:"noopener noreferrer",className:"text-accent-fg hover:underline",children:["Source ",(0,d.jsx)(i,{})]})]})]})}),ae&&K&&(0,d.jsx)("div",{className:`border rounded-xl p-4 ${K.healthy?"border-success-mid/30 bg-success-mid/5":"border-danger-mid/30 bg-danger-mid/5"}`,children:(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,d.jsx)("span",{className:`w-2 h-2 rounded-full ${K.healthy?"bg-success":"bg-danger"}`}),(0,d.jsx)("span",{className:K.healthy?"text-success":"text-danger",children:K.healthy?"Healthy":"Unhealthy"}),s.deployment?.workerUrl&&(0,d.jsx)("span",{className:"text-fg-faint ml-2",children:s.deployment.workerUrl})]})}),s.updateAvailable&&s.deployedVersion&&s.latestVersion&&(0,d.jsx)("div",{className:"border border-info-mid/30 bg-info-mid/5 rounded-xl p-4",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"w-8 h-8 rounded-full bg-info-mid/20 flex items-center justify-center",children:(0,d.jsx)("svg",{className:"w-4 h-4 text-info",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium text-info",children:"Update Available"}),(0,d.jsxs)("p",{className:"text-xs text-fg-muted",children:[s.deployedVersion," → ",s.latestVersion]})]})]}),(0,d.jsx)("button",{onClick:ac,disabled:w,className:"px-4 py-2 bg-info-mid/20 hover:bg-info-mid/30 border border-info-mid/30 text-info text-sm font-medium rounded-lg transition-colors",children:w?"Updating...":"Update Now"})]})}),s.deployment?.status==="failed"&&s.deployment.error&&(0,d.jsx)("div",{className:"border border-danger-mid/30 bg-danger-mid/5 rounded-xl p-4",children:(0,d.jsxs)("p",{className:"text-sm text-danger",children:["Last deployment failed: ",s.deployment.error]})}),(s.config??[]).length>0&&(0,d.jsxs)("div",{className:"border border-edge rounded-xl p-6 bg-surface/80",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Configuration"}),(0,d.jsx)(k,{fields:s.config,values:C,onChange:D})]}),!ae&&ag.length>0&&(0,d.jsxs)("div",{className:"border border-edge rounded-xl p-6 bg-surface/80",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"API Keys"}),(0,d.jsx)("div",{className:"space-y-4",children:ag.map(a=>(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"flex items-center gap-2 text-sm font-medium text-fg-secondary mb-1.5",children:[a.label,a.required?(0,d.jsx)("span",{className:"text-accent-fg text-xs",children:"required"}):(0,d.jsx)("span",{className:"text-fg-faint text-xs",children:"optional"})]}),a.helpText&&(0,d.jsxs)("p",{className:"text-xs text-fg-faint mb-2",children:[a.helpText,a.helpUrl&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:a.helpUrl,target:"_blank",rel:"noopener noreferrer",className:"text-accent-fg hover:underline",children:["Get key ",(0,d.jsx)(i,{})]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:(0,d.jsxs)("div",{className:"relative flex-1",children:[(0,d.jsx)("input",{type:"password"!==a.type||G[a.key]?"text":"password",id:`${q}-${a.key}`,name:`${q}-${a.key}`,autoComplete:"off","data-1p-ignore":!0,"data-lpignore":"true",value:E[a.key]??"",onChange:b=>{var c,d;let e;return c=a.key,d=b.target.value,e=E[c]??"",void((Math.abs(d.length-e.length)>5||!d)&&(aa.current.delete(c),I[c]&&J({...I,[c]:void 0})),M[c]&&N(a=>{let b={...a};return delete b[c],b}),F({...E,[c]:d}))},onBlur:()=>{let b;return b=E[a.key],void(a.test&&b?.trim()&&!aa.current.has(a.key)&&function(a){if(!a.test||!E[a.key]?.trim())return!1;for(let b of[...a.test.url.match(/\{\{([^}]+)\}\}/g)?.map(a=>a.slice(2,-2))??[],...Object.values(a.test.headers??{}).join("").match(/\{\{([^}]+)\}\}/g)?.map(a=>a.slice(2,-2))??[]].filter(a=>"value"!==a))if(!E[b]?.trim())return!1;return!0}(a)&&(aa.current.add(a.key),ab(a,!0)))},placeholder:a.placeholder,className:`w-full px-4 py-2.5 pr-10 bg-surface-raised border rounded-lg text-sm text-fg placeholder-fg-faint focus:outline-none focus:ring-1 ${M[a.key]?"border-danger-mid focus:border-danger-mid focus:ring-danger-mid":"border-edge-subtle focus:border-accent-edge focus:ring-accent-edge"}`}),"password"===a.type&&(0,d.jsx)("button",{type:"button",onClick:()=>H({...G,[a.key]:!G[a.key]}),className:"absolute right-3 top-1/2 -translate-y-1/2 text-fg-faint hover:text-fg-secondary transition-colors",children:(0,d.jsx)(h,{open:G[a.key]??!1})})]})}),I[a.key]&&(0,d.jsxs)("p",{className:`text-xs mt-2 ${I[a.key].success?"text-success":"text-danger"}`,children:[I[a.key].success?"✓":"✗"," ",I[a.key].message]}),M[a.key]&&(0,d.jsx)("p",{className:"text-xs mt-1.5 text-danger",children:M[a.key]})]},a.key))})]}),ae&&(s.secrets??[]).length>0&&(0,d.jsxs)("div",{className:"border border-edge rounded-xl p-6 bg-surface/80",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Update Secrets"}),(0,d.jsx)("p",{className:"text-sm text-fg-muted mb-4",children:"Update API keys without redeploying. Leave fields blank to keep existing values."}),(0,d.jsx)(j,{slug:q,fields:s.secrets,configuredKeys:s.configuredSecrets,enabledPlatforms:Array.from(af)})]}),(0,d.jsxs)("div",{className:"border border-edge rounded-xl p-6 bg-surface/80",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:ae?"Redeploy":"Deploy"}),(0,d.jsx)("p",{className:"text-sm text-fg-muted mt-1",children:ae?"Redeploy with the latest bundle and configuration.":"Deploy this MCP server to your Cloudflare Workers account."}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-fg-secondary mb-2",children:"Authentication"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsxs)("select",{value:O,onChange:a=>P(a.target.value),className:"w-full appearance-none px-4 py-2.5 pr-10 bg-surface-raised border border-edge-subtle rounded-lg text-sm text-fg focus:outline-none focus:border-accent-edge focus:ring-1 focus:ring-accent-edge",children:[(0,d.jsx)("option",{value:"bearer",children:"Bearer token (default)"}),(0,d.jsx)("option",{value:"oauth",children:"OAuth 2.1 (password protected)"}),(0,d.jsx)("option",{value:"open",children:"Open (no authentication)"})]}),(0,d.jsx)("svg",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-fg-muted",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),"oauth"===O&&(0,d.jsx)("p",{className:"text-xs text-fg-faint mt-2",children:"OAuth requires a password prompt during authorization. Bearer tokens are not accepted."}),"open"===O&&(0,d.jsx)("p",{className:"text-xs text-danger mt-2",children:"Warning: Anyone with the URL can access this MCP."})]}),ae&&"open"!==O&&(0,d.jsx)("div",{className:"mt-4 pt-4 border-t border-edge",children:(0,d.jsxs)("label",{className:"flex items-center gap-3 cursor-pointer group",children:[(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{type:"checkbox",checked:Q,onChange:a=>R(a.target.checked),className:"sr-only peer"}),(0,d.jsx)("div",{className:"w-9 h-5 bg-surface-overlay rounded-full peer-checked:bg-warning transition-colors"}),(0,d.jsx)("div",{className:"absolute top-0.5 left-0.5 w-4 h-4 bg-surface-page shadow-sm rounded-full peer-checked:translate-x-4 transition-transform"})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("p",{className:"text-sm font-medium text-fg-secondary group-hover:text-fg transition-colors",children:["Regenerate ","oauth"===O?"OAuth password":"bearer token"]}),(0,d.jsx)("p",{className:"text-xs text-fg-faint",children:"Invalidates existing connections. Use if compromised."})]})]})}),(0,d.jsx)("div",{className:"mt-5 flex items-center justify-end gap-3",children:(0,d.jsx)("button",{onClick:ac,disabled:w||ai,className:`px-6 py-2.5 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Q&&ae?"bg-warning hover:bg-warning-hover":"bg-accent hover:bg-accent-hover"}`,children:w?"Deploying...":Q&&ae?"Regenerate & redeploy":ae?"Redeploy":"Deploy to Cloudflare"})}),A&&(0,d.jsx)("p",{className:"mt-4 text-sm text-danger bg-danger-mid/10 border border-danger-mid/20 rounded-lg px-4 py-2",children:A})]}),y&&(0,d.jsx)("div",{className:"border border-success-mid/30 bg-success-mid/5 rounded-xl p-4",children:(0,d.jsx)("p",{className:"text-sm text-success",children:S&&"oauth"===y.authMode?"OAuth password regenerated. Update your client connections.":S?"Bearer token regenerated. Update your client connections.":`Successfully deployed to ${y.workerUrl}`})}),(b=y?.oauthPassword??s.credentials?.oauthPassword,c=y?.bearerToken??s.credentials?.bearerToken??null,l=y?.authMode??s.deployment?.authMode??"bearer",n=y?.workerUrl??s.deployment?.workerUrl,o=y?.mcpUrl??(n?`${n}/mcp`:null),p=y?.mcpUrlWithToken??(c&&n?`${n}/mcp/t/${c}`:o),ae||y?(0,d.jsx)("div",{className:"space-y-4",children:o&&(0,d.jsxs)("div",{className:"border border-edge rounded-xl p-6 bg-surface/80",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Connect to Claude"}),(0,d.jsx)(m,{mcpUrl:o,mcpUrlWithToken:p??o,bearerToken:c,slug:q,authMode:l,oauthPassword:b})]})}):null),(0,d.jsxs)("div",{className:"border border-danger-mid/20 rounded-xl p-6 bg-danger-mid/5",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-danger mb-4",children:"Danger Zone"}),(0,d.jsxs)("div",{className:"space-y-4",children:[ae&&(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm text-fg-secondary",children:"Undeploy"}),(0,d.jsx)("p",{className:"text-xs text-fg-faint mt-1",children:"Take the worker offline. You can redeploy later."})]}),(0,d.jsx)("button",{onClick:async()=>{if(confirm("This will delete the deployed worker. You can redeploy later. Continue?")){_(!0);try{let a=await fetch(`/api/mcps/${q}/undeploy`,{method:"DELETE"});if(a.ok){let a=await fetch(`/api/mcps/${q}`).then(a=>a.json());t(a),L(null),z(null)}else{let b=await a.json();alert(b.error??"Failed to undeploy")}}catch{alert("Failed to connect to server")}finally{_(!1)}}},disabled:$,className:"px-4 py-2 bg-danger-dark/50 hover:bg-danger-dark/70 border border-danger-strong/50 rounded-lg text-sm text-danger transition-colors shrink-0 disabled:opacity-50",children:$?"Undeploying...":"Undeploy"})]}),ae&&(0,d.jsx)("div",{className:"border-t border-danger-mid/10"}),(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm text-fg-secondary",children:"Remove"}),(0,d.jsx)("p",{className:"text-xs text-fg-faint mt-1",children:"Undeploy the worker and permanently remove this MCP from the dashboard."})]}),(0,d.jsx)("button",{onClick:async()=>{if(confirm("This will permanently remove this MCP from the dashboard. Continue?")){Z(!0);try{let a=await fetch(`/api/mcps/${q}/remove`,{method:"DELETE"});if(a.ok)r.push("/");else{let b=await a.json();alert(b.error??"Failed to remove MCP")}}catch{alert("Failed to connect to server")}finally{Z(!1)}}},disabled:Y,className:"px-4 py-2 bg-danger-dark/50 hover:bg-danger-dark/70 border border-danger-strong/50 rounded-lg text-sm text-danger transition-colors shrink-0 disabled:opacity-50",children:Y?"Removing...":"Remove"})]})]})]})]})}},7953:(a,b,c)=>{Promise.resolve().then(c.bind(c,1758))},8335:()=>{},8354:a=>{"use strict";a.exports=require("util")},8918:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,1921,23))},9121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},9166:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,5547,23))},9294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9332:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,1921,23)),Promise.resolve().then(c.t.bind(c,440,23)),Promise.resolve().then(c.t.bind(c,4342,23)),Promise.resolve().then(c.t.bind(c,2265,23)),Promise.resolve().then(c.t.bind(c,5421,23)),Promise.resolve().then(c.t.bind(c,1335,23)),Promise.resolve().then(c.t.bind(c,664,23)),Promise.resolve().then(c.bind(c,4661))},9448:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,2116,23)),Promise.resolve().then(c.bind(c,7164)),Promise.resolve().then(c.bind(c,6392))}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[445,471,704],()=>b(b.s=2094));module.exports=c})();
9
+ `;function k({children:a}){return(0,d.jsxs)("html",{lang:"en","data-theme":"dark",suppressHydrationWarning:!0,children:[(0,d.jsxs)("head",{children:[(0,d.jsx)("script",{dangerouslySetInnerHTML:{__html:j}}),!1]}),(0,d.jsx)("body",{className:"bg-surface-page text-fg min-h-screen antialiased",children:(0,d.jsxs)(g.ThemeProvider,{children:[(0,d.jsx)("nav",{className:"border-b border-edge bg-surface/50 backdrop-blur-sm fixed top-0 inset-x-0 z-50",children:(0,d.jsxs)("div",{className:"max-w-5xl mx-auto px-6 py-4 flex items-center justify-between",children:[(0,d.jsxs)(f(),{href:"/",className:"text-lg font-semibold tracking-tight",children:[(0,d.jsx)("span",{className:"text-accent-fg",children:"MCP"})," Deploy"]}),(0,d.jsx)(h.NavLinks,{})]})}),(0,d.jsx)("main",{className:"max-w-5xl mx-auto px-6 py-8 pt-16",children:a})]})})]})}},6713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},7068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},7086:(a,b,c)=>{"use strict";c.d(b,{NavLinks:()=>d});let d=(0,c(7943).registerClientReference)(function(){throw Error("Attempted to call NavLinks() from the server but NavLinks is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/vibes/Documents/Development/Projects/agent-suite/mcp-deploy/src/components/NavLinks.tsx","NavLinks")},7164:(a,b,c)=>{"use strict";c.d(b,{NavLinks:()=>i});var d=c(8249),e=c(2116),f=c.n(e),g=c(9099);let h=[{href:"/",label:"Dashboard"},{href:"/setup",label:"Settings"}];function i(){let a=(0,g.usePathname)();return(0,d.jsx)("div",{className:"flex gap-6 text-sm",children:h.map(({href:b,label:c})=>{let e="/"===b?"/"===a:a.startsWith(b);return(0,d.jsx)(f(),{href:b,className:`font-medium transition-colors pb-0.5 ${e?"text-fg border-b-2 border-accent-fg":"text-fg-muted hover:text-fg"}`,children:c},b)})})}},7841:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>n});var d=c(8249),e=c(7484),f=c(9099),g=c(4103);function h({open:a}){return a?(0,d.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}):(0,d.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})})}function i({className:a="w-3 h-3 inline-block ml-0.5"}){return(0,d.jsxs)("svg",{className:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[(0,d.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,d.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,d.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function j({slug:a,fields:b,configuredKeys:c,enabledPlatforms:f}){let g=b.filter(a=>!!a.required||!a.forPlatform||!f||f.includes(a.forPlatform)),[j,k]=(0,e.useState)({}),[l,m]=(0,e.useState)({}),[n,o]=(0,e.useState)({}),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)({}),[x,y]=(0,e.useState)(c),[z,A]=(0,e.useState)(null),B=(0,e.useRef)(new Set);async function C(b){if(confirm("Are you sure you want to clear this value? This will remove it from Cloudflare.")){s(b),A(null);try{let c=await fetch(`/api/mcps/${a}/secrets`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({deleteKeys:[b]})}),d=await c.json();c.ok?(A({type:"success",text:"Cleared successfully"}),y(x.filter(a=>a!==b)),o({...n,[b]:!1})):A({type:"error",text:d.error??"Failed to delete"})}catch{A({type:"error",text:"Failed to connect to server"})}finally{s(null)}}}async function D(a,c=!1){if(!a.test)return;let d=j[a.key];if(!d?.trim()){c||w({...v,[a.key]:{success:!1,message:"Enter a value first"}});return}u(a.key),w({...v,[a.key]:void 0});try{let c={};for(let a of b)j[a.key]?.trim()&&(c[a.key]=j[a.key]);let e=await fetch("/api/test-connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({spec:a.test,value:d,allValues:c})}),f=await e.json();w({...v,[a.key]:{success:f.success,message:f.success?f.message??"Connection successful":f.error??"Test failed"}})}catch{w({...v,[a.key]:{success:!1,message:"Failed to test connection"}})}finally{u(null)}}let E=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;async function F(b){b.preventDefault(),q(!0),A(null);let c={};for(let[a,b]of Object.entries(j))b.trim()&&(c[a]=b.trim());if(0===Object.keys(c).length){A({type:"error",text:"No changes to save."}),q(!1);return}for(let a of g){let b=c[a.key];if("email"===a.type&&b&&!E.test(b)){A({type:"error",text:`${a.label}: enter a valid email address`}),q(!1);return}}try{let b=await fetch(`/api/mcps/${a}/secrets`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({secrets:c})}),d=await b.json();b.ok?(A({type:"success",text:"Saved successfully"}),k({}),o({}),y([...new Set([...x,...d.updatedKeys])])):A({type:"error",text:d.error??"Failed to update"})}catch{A({type:"error",text:"Failed to connect to server"})}finally{q(!1)}}return 0===g.length?null:(0,d.jsxs)("form",{onSubmit:F,className:"space-y-4",children:[g.map(b=>{let c=x.includes(b.key),e=n[b.key]||!c,f=!!b.test,g=!!j[b.key]?.trim();return(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"flex items-center gap-2 text-sm font-medium text-fg-secondary mb-1.5",children:[b.label,b.required?(0,d.jsx)("span",{className:"text-accent-fg text-xs",children:"required"}):(0,d.jsx)("span",{className:"text-fg-faint text-xs",children:"optional"})]}),b.helpText&&(0,d.jsxs)("p",{className:"text-xs text-fg-faint mb-2",children:[b.helpText,b.helpUrl&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:b.helpUrl,target:"_blank",rel:"noopener noreferrer",className:"text-accent-fg hover:underline",children:["Get key ",(0,d.jsx)(i,{})]})]})]}),c&&!e?(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("div",{className:"flex-1 px-4 py-2.5 bg-surface-raised/50 border border-success-mid/30 rounded-lg text-sm text-fg-muted font-mono",children:"••••••••••••"}),(0,d.jsx)("button",{type:"button",onClick:()=>{var a;return a=b.key,void o({...n,[a]:!0})},className:"px-4 py-2.5 bg-surface-overlay hover:bg-edge-subtle text-fg-secondary text-sm font-medium rounded-lg transition-colors whitespace-nowrap",children:"Change"}),(0,d.jsx)("button",{type:"button",onClick:()=>C(b.key),disabled:r===b.key,className:"px-4 py-2.5 bg-danger-mid/10 hover:bg-danger-mid/20 border border-danger-mid/30 text-danger text-sm font-medium rounded-lg transition-colors whitespace-nowrap disabled:opacity-50",children:r===b.key?"Clearing...":"Clear"})]}):(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsxs)("div",{className:"relative flex-1",children:[(0,d.jsx)("input",{type:"password"!==b.type||l[b.key]?"text":"password",id:`${a}-update-${b.key}`,name:`${a}-update-${b.key}`,autoComplete:"off","data-1p-ignore":!0,"data-lpignore":"true",value:j[b.key]??"",onChange:a=>{var c,d;let e;return c=b.key,d=a.target.value,e=j[c]??"",void((Math.abs(d.length-e.length)>5||!d)&&(B.current.delete(c),v[c]&&w({...v,[c]:void 0})),k({...j,[c]:d}))},onBlur:()=>{let a;return a=j[b.key],void(b.test&&a?.trim()&&!B.current.has(b.key)&&(B.current.add(b.key),D(b,!0)))},placeholder:b.placeholder,className:`w-full px-4 py-2.5 bg-surface-raised border border-edge-subtle rounded-lg text-sm text-fg placeholder-fg-faint focus:outline-none focus:border-accent-edge focus:ring-1 focus:ring-accent-edge${"password"===b.type?" pr-10":""}`}),"password"===b.type&&(0,d.jsx)("button",{type:"button",onClick:()=>m({...l,[b.key]:!l[b.key]}),className:"absolute right-3 top-1/2 -translate-y-1/2 text-fg-faint hover:text-fg-secondary transition-colors",children:(0,d.jsx)(h,{open:l[b.key]??!1})})]}),f&&g&&(0,d.jsx)("button",{type:"button",onClick:()=>D(b),disabled:t===b.key,className:"px-4 py-2.5 bg-surface-overlay hover:bg-edge-subtle disabled:bg-surface-raised disabled:text-fg-disabled text-fg-secondary text-sm font-medium rounded-lg transition-colors whitespace-nowrap",children:t===b.key?"Testing...":"Test"}),c&&e&&(0,d.jsx)("button",{type:"button",onClick:()=>{o({...n,[b.key]:!1}),k({...j,[b.key]:""}),w({...v,[b.key]:void 0})},className:"px-4 py-2.5 bg-surface-overlay hover:bg-edge-subtle text-fg-muted text-sm font-medium rounded-lg transition-colors whitespace-nowrap",children:"Cancel"})]}),v[b.key]&&(0,d.jsxs)("p",{className:`text-xs mt-2 ${v[b.key].success?"text-success":"text-danger"}`,children:[v[b.key].success?"✓":"✗"," ",v[b.key].message]})]},b.key)}),z&&(0,d.jsx)("p",{className:`text-sm rounded-lg px-4 py-2 ${"success"===z.type?"text-success bg-success-mid/10 border border-success-mid/20":"text-danger bg-danger-mid/10 border border-danger-mid/20"}`,children:z.text}),Object.values(j).some(a=>a?.trim())&&(0,d.jsx)("button",{type:"submit",disabled:p,className:"px-6 py-2.5 bg-accent hover:bg-accent-hover disabled:opacity-50 disabled:cursor-not-allowed text-white text-sm font-medium rounded-lg transition-colors",children:p?"Saving...":"Save Changes"})]})}function k({fields:a,values:b,onChange:c}){return 0===a.length?null:(0,d.jsx)("div",{className:"space-y-4",children:a.map(a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-fg-secondary mb-1.5",children:a.label}),a.helpText&&(0,d.jsx)("p",{className:"text-xs text-fg-faint mb-2",children:a.helpText}),"multiselect"===a.type&&a.options?(0,d.jsx)(l,{field:a,value:b[a.key]??a.default??"",onChange:d=>c({...b,[a.key]:d})}):"select"===a.type&&a.options?(0,d.jsx)("select",{value:b[a.key]??a.default??"",onChange:d=>c({...b,[a.key]:d.target.value}),className:"w-full px-4 py-2.5 bg-surface-raised border border-edge-subtle rounded-lg text-sm text-fg focus:outline-none focus:border-accent-edge focus:ring-1 focus:ring-accent-edge",children:a.options.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value))}):(0,d.jsx)("input",{type:"text",value:b[a.key]??a.default??"",onChange:d=>c({...b,[a.key]:d.target.value}),className:"w-full px-4 py-2.5 bg-surface-raised border border-edge-subtle rounded-lg text-sm text-fg focus:outline-none focus:border-accent-edge focus:ring-1 focus:ring-accent-edge"})]},a.key))})}function l({field:a,value:b,onChange:c}){let[f,g]=(0,e.useState)(new Set(b.split(",").filter(Boolean)));return(0,d.jsx)("div",{className:"flex flex-wrap gap-2",children:a.options?.map(a=>(0,d.jsx)("button",{type:"button",onClick:()=>{var b;let d;return b=a.value,void((d=new Set(f)).has(b)?d.delete(b):d.add(b),g(d),c(Array.from(d).join(",")))},className:`px-3 py-1.5 rounded-lg text-sm border transition-colors ${f.has(a.value)?"bg-accent-edge/15 border-accent-edge/40 text-accent-fg":"bg-surface-raised border-edge-subtle text-fg-muted hover:border-fg-disabled"}`,children:a.label},a.value))})}function m({mcpUrl:a,mcpUrlWithToken:b,bearerToken:c,slug:f,authMode:g="bearer",oauthPassword:i}){let[j,k]=(0,e.useState)("ui"),[l,m]=(0,e.useState)(!1),[n,o]=(0,e.useState)(!1),[p,q]=(0,e.useState)(!1),r="bearer"===g?b:a,s=JSON.stringify("bearer"===g?{mcpServers:{[f]:{command:"npx",args:["mcp-remote",a,"--header","Authorization:${AUTH_HEADER}"],env:{AUTH_HEADER:`Bearer ${c??""}`}}}}:{mcpServers:{[f]:{command:"npx",args:["mcp-remote",a]}}},null,2);async function t(a){try{await navigator.clipboard.writeText(a)}catch{let b=document.createElement("textarea");b.value=a,b.style.position="fixed",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),document.body.removeChild(b)}m(!0),setTimeout(()=>m(!1),2e3)}async function u(){if(i){try{await navigator.clipboard.writeText(i)}catch{let a=document.createElement("textarea");a.value=i,a.style.position="fixed",a.style.opacity="0",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a)}q(!0),setTimeout(()=>q(!1),2e3)}}let v=i&&"oauth"===g&&(0,d.jsxs)("div",{className:"mt-3 pt-3 border-t border-edge-subtle/50",children:[(0,d.jsx)("p",{className:"text-xs text-fg-faint mb-2",children:"OAuth password"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("div",{className:"relative flex-1",children:[(0,d.jsx)("div",{className:"w-full px-4 py-2.5 pr-10 bg-surface-raised border border-edge-subtle rounded-lg text-sm text-fg font-mono break-all",children:n?i:"•".repeat(24)}),(0,d.jsx)("button",{onClick:()=>o(!n),className:"absolute right-3 top-1/2 -translate-y-1/2 text-fg-faint hover:text-fg-secondary transition-colors",title:n?"Hide password":"Show password",children:(0,d.jsx)(h,{open:n})})]}),(0,d.jsx)("button",{onClick:u,className:"px-3 py-2.5 bg-surface-overlay hover:bg-edge-subtle rounded-lg text-xs text-fg-secondary transition-colors shrink-0",children:p?"Copied!":"Copy"})]})]});return(0,d.jsxs)("div",{className:"border border-edge rounded-xl overflow-hidden",children:[(0,d.jsx)("div",{className:"flex border-b border-edge",children:[{id:"ui",label:"Claude Desktop UI"},{id:"json",label:"JSON Config"}].map(a=>(0,d.jsx)("button",{onClick:()=>k(a.id),className:`px-4 py-2.5 text-xs font-medium transition-colors ${j===a.id?"bg-surface-raised text-accent-fg border-b-2 border-accent-fg":"text-fg-faint hover:text-fg-secondary"}`,children:a.label},a.id))}),(0,d.jsxs)("div",{className:"p-4",children:["ui"===j&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("p",{className:"text-sm text-fg-muted",children:["Go to"," ",(0,d.jsx)("strong",{children:"Settings → Connectors → Add custom connector"})," ","and paste this URL:"]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("code",{className:"flex-1 px-3 py-2 bg-surface-raised border border-edge-subtle rounded-lg text-sm text-accent-fg break-all",children:r}),(0,d.jsx)("button",{onClick:()=>t(r),className:"px-3 py-2 bg-surface-overlay hover:bg-edge-subtle rounded-lg text-xs text-fg-secondary transition-colors shrink-0",children:l?"Copied!":"Copy"})]}),"bearer"===g&&(0,d.jsx)("p",{className:"text-xs text-fg-faint",children:"Your bearer token is embedded in the URL. Keep it private."}),"oauth"===g&&(0,d.jsxs)("p",{className:"text-xs text-fg-faint",children:["After adding the connector, click ",(0,d.jsx)("strong",{children:"Configure"})," when prompted. Enter the password below in the authorization dialog."]}),"open"===g&&(0,d.jsx)("p",{className:"text-xs text-danger",children:"This MCP is deployed without authentication. Anyone with the URL can access it."}),v]}),"json"===j&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsxs)("p",{className:"text-sm text-fg-muted",children:["Add to your"," ",(0,d.jsx)("code",{className:"text-accent-fg",children:"claude_desktop_config.json"}),":"]}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("pre",{className:"px-4 py-3 bg-surface-raised rounded-lg text-xs text-fg-secondary overflow-x-auto",children:s}),(0,d.jsx)("button",{onClick:()=>t(s),className:"absolute top-2 right-2 px-2 py-1 bg-surface-overlay hover:bg-edge-subtle rounded text-xs text-fg-muted transition-colors",children:l?"Copied!":"Copy"})]}),"bearer"===g&&(0,d.jsxs)("p",{className:"text-xs text-fg-faint",children:["Uses ",(0,d.jsx)("code",{children:"mcp-remote"})," with bearer token authentication."]}),"oauth"===g&&(0,d.jsx)("p",{className:"text-xs text-fg-faint",children:"On first connect, your browser will open for OAuth authorization. Enter the password below when prompted."}),"open"===g&&(0,d.jsx)("p",{className:"text-xs text-danger",children:"This MCP is open. No authentication headers are sent."}),v]})]})]})}function n({params:a}){let b,c,l,n,o,p,{slug:q}=(0,e.use)(a),r=(0,f.useRouter)(),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(!0),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)({}),[E,F]=(0,e.useState)({}),[G,H]=(0,e.useState)({}),[I,J]=(0,e.useState)({}),[K,L]=(0,e.useState)(null),[M,N]=(0,e.useState)({}),[O,P]=(0,e.useState)("bearer"),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(null),[Y,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(!1),aa=(0,e.useRef)(new Set);async function ab(a,b=!1){if(!a.test)return;let c=E[a.key];if(!c?.trim()){b||J({...I,[a.key]:{success:!1,message:"Enter a value first"}});return}J({...I,[a.key]:void 0});try{let b={};for(let a of s?.secrets??[])E[a.key]?.trim()&&(b[a.key]=E[a.key]);let d=await fetch("/api/test-connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({spec:a.test,value:c,allValues:b})}),e=await d.json();J({...I,[a.key]:{success:e.success,message:e.success?e.message??"Connection successful":e.error??"Test failed"}})}catch{J({...I,[a.key]:{success:!1,message:"Failed to test connection"}})}}async function ac(){if(ae||function(){let a={};for(let b of ag){let c=E[b.key]?.trim()??"";b.required&&!c?a[b.key]=`${b.label} is required`:"email"===b.type&&c&&!ah.test(c)&&(a[b.key]="Enter a valid email address")}return N(a),0===Object.keys(a).length}()){if(Q&&ae){let a="oauth"===O?"OAuth password":"bearer token";if(!confirm(`This will regenerate your ${a} and invalidate existing connections. Continue?`))return}x(!0),B(null),z(null),T(!1);try{let a=await fetch(`/api/mcps/${q}/deploy`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({secrets:E,config:Object.fromEntries(Object.entries(C).filter(([,a])=>""!==a)),authMode:O,...Q&&"bearer"===O?{regenerateToken:!0}:{},...Q&&"oauth"===O?{regenerateOAuthPassword:!0}:{}})}),b=await a.json();if(a.ok){z(b),Q&&T(!0);let a=await fetch(`/api/mcps/${q}`).then(a=>a.json());t(a),R(!1)}else B(b.error??"Deployment failed")}catch{B("Failed to connect to server")}finally{x(!1)}}}async function ad(){V(!0),X(null);try{await fetch("/api/mcps/check-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slugs:[q]})});let a=await fetch(`/api/mcps/${q}`).then(a=>a.json());t(a),X(a.updateAvailable?"Update available!":"Already up to date"),setTimeout(()=>X(null),3e3)}catch{}finally{V(!1)}}if(u)return(0,d.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,d.jsx)("div",{className:"text-fg-faint",children:"Loading..."})});if(!s)return(0,d.jsx)("div",{className:"text-center py-20",children:(0,d.jsx)("p",{className:"text-fg-faint",children:"MCP not found."})});let ae=s.deployment?.status==="deployed",af=new Set((C.ENABLED_PLATFORMS||"").split(",").filter(Boolean)),ag=(s.secrets??[]).filter(a=>!!a.required||!a.forPlatform||af.has(a.forPlatform)),ah=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,ai=!ae&&ag.some(a=>a.required&&!E[a.key]?.trim());return(0,d.jsxs)("div",{className:"space-y-8",children:[(0,d.jsx)("div",{className:"flex items-start justify-between",children:(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,d.jsx)("h1",{className:"text-2xl font-bold",children:s.name}),(0,d.jsx)(g.W,{status:s.deployment?.status??"not_deployed"})]}),(0,d.jsx)("p",{className:"text-fg-muted text-sm",children:s.description}),(0,d.jsxs)("div",{className:"flex items-center gap-4 mt-2 text-xs text-fg-faint",children:[(0,d.jsxs)("span",{children:["v",s.version]}),(0,d.jsxs)("button",{onClick:ad,disabled:U,className:"inline-flex items-center gap-1.5 px-3 py-1 bg-surface-raised hover:bg-surface-overlay border border-edge-subtle rounded-lg text-xs text-fg-secondary transition-colors disabled:opacity-50",children:[(0,d.jsx)("svg",{className:`w-3 h-3 ${U?"animate-spin":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),U?"Checking...":"Check for updates"]}),W&&(0,d.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ${"Update available!"===W?"bg-success-mid/10 text-success":"bg-surface-overlay/50 text-fg-muted"}`,children:W}),s.githubRepo&&(0,d.jsxs)("a",{href:`https://github.com/${s.githubRepo}`,target:"_blank",rel:"noopener noreferrer",className:"text-accent-fg hover:underline",children:["Source ",(0,d.jsx)(i,{})]})]})]})}),ae&&K&&(0,d.jsx)("div",{className:`border rounded-xl p-4 ${K.healthy?"border-success-mid/30 bg-success-mid/5":"border-danger-mid/30 bg-danger-mid/5"}`,children:(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,d.jsx)("span",{className:`w-2 h-2 rounded-full ${K.healthy?"bg-success":"bg-danger"}`}),(0,d.jsx)("span",{className:K.healthy?"text-success":"text-danger",children:K.healthy?"Healthy":"Unhealthy"}),s.deployment?.workerUrl&&(0,d.jsx)("span",{className:"text-fg-faint ml-2",children:s.deployment.workerUrl})]})}),s.updateAvailable&&s.deployedVersion&&s.latestVersion&&(0,d.jsx)("div",{className:"border border-info-mid/30 bg-info-mid/5 rounded-xl p-4",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"w-8 h-8 rounded-full bg-info-mid/20 flex items-center justify-center",children:(0,d.jsx)("svg",{className:"w-4 h-4 text-info",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium text-info",children:"Update Available"}),(0,d.jsxs)("p",{className:"text-xs text-fg-muted",children:[s.deployedVersion??s.version," → ",s.latestVersion]})]})]}),(0,d.jsx)("button",{onClick:ac,disabled:w,className:"px-4 py-2 bg-info-mid/20 hover:bg-info-mid/30 border border-info-mid/30 text-info text-sm font-medium rounded-lg transition-colors disabled:opacity-60",children:w?(0,d.jsxs)("span",{className:"flex items-center gap-2",children:[(0,d.jsxs)("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[(0,d.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),(0,d.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Updating…"]}):"Update Now"})]})}),s.deployment?.status==="failed"&&s.deployment.error&&(0,d.jsx)("div",{className:"border border-danger-mid/30 bg-danger-mid/5 rounded-xl p-4",children:(0,d.jsxs)("p",{className:"text-sm text-danger",children:["Last deployment failed: ",s.deployment.error]})}),(s.config??[]).length>0&&(0,d.jsxs)("div",{className:"border border-edge rounded-xl p-6 bg-surface/80",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Configuration"}),(0,d.jsx)(k,{fields:s.config,values:C,onChange:D})]}),!ae&&ag.length>0&&(0,d.jsxs)("div",{className:"border border-edge rounded-xl p-6 bg-surface/80",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"API Keys"}),(0,d.jsx)("div",{className:"space-y-4",children:ag.map(a=>(0,d.jsxs)("div",{children:[(0,d.jsxs)("label",{className:"flex items-center gap-2 text-sm font-medium text-fg-secondary mb-1.5",children:[a.label,a.required?(0,d.jsx)("span",{className:"text-accent-fg text-xs",children:"required"}):(0,d.jsx)("span",{className:"text-fg-faint text-xs",children:"optional"})]}),a.helpText&&(0,d.jsxs)("p",{className:"text-xs text-fg-faint mb-2",children:[a.helpText,a.helpUrl&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("a",{href:a.helpUrl,target:"_blank",rel:"noopener noreferrer",className:"text-accent-fg hover:underline",children:["Get key ",(0,d.jsx)(i,{})]})]})]}),(0,d.jsx)("div",{className:"flex gap-2",children:(0,d.jsxs)("div",{className:"relative flex-1",children:[(0,d.jsx)("input",{type:"password"!==a.type||G[a.key]?"text":"password",id:`${q}-${a.key}`,name:`${q}-${a.key}`,autoComplete:"off","data-1p-ignore":!0,"data-lpignore":"true",value:E[a.key]??"",onChange:b=>{var c,d;let e;return c=a.key,d=b.target.value,e=E[c]??"",void((Math.abs(d.length-e.length)>5||!d)&&(aa.current.delete(c),I[c]&&J({...I,[c]:void 0})),M[c]&&N(a=>{let b={...a};return delete b[c],b}),F({...E,[c]:d}))},onBlur:()=>{let b;return b=E[a.key],void(a.test&&b?.trim()&&!aa.current.has(a.key)&&function(a){if(!a.test||!E[a.key]?.trim())return!1;for(let b of[...a.test.url.match(/\{\{([^}]+)\}\}/g)?.map(a=>a.slice(2,-2))??[],...Object.values(a.test.headers??{}).join("").match(/\{\{([^}]+)\}\}/g)?.map(a=>a.slice(2,-2))??[]].filter(a=>"value"!==a))if(!E[b]?.trim())return!1;return!0}(a)&&(aa.current.add(a.key),ab(a,!0)))},placeholder:a.placeholder,className:`w-full px-4 py-2.5 pr-10 bg-surface-raised border rounded-lg text-sm text-fg placeholder-fg-faint focus:outline-none focus:ring-1 ${M[a.key]?"border-danger-mid focus:border-danger-mid focus:ring-danger-mid":"border-edge-subtle focus:border-accent-edge focus:ring-accent-edge"}`}),"password"===a.type&&(0,d.jsx)("button",{type:"button",onClick:()=>H({...G,[a.key]:!G[a.key]}),className:"absolute right-3 top-1/2 -translate-y-1/2 text-fg-faint hover:text-fg-secondary transition-colors",children:(0,d.jsx)(h,{open:G[a.key]??!1})})]})}),I[a.key]&&(0,d.jsxs)("p",{className:`text-xs mt-2 ${I[a.key].success?"text-success":"text-danger"}`,children:[I[a.key].success?"✓":"✗"," ",I[a.key].message]}),M[a.key]&&(0,d.jsx)("p",{className:"text-xs mt-1.5 text-danger",children:M[a.key]})]},a.key))})]}),ae&&(s.secrets??[]).length>0&&(0,d.jsxs)("div",{className:"border border-edge rounded-xl p-6 bg-surface/80",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Update Secrets"}),(0,d.jsx)("p",{className:"text-sm text-fg-muted mb-4",children:"Update API keys without redeploying. Leave fields blank to keep existing values."}),(0,d.jsx)(j,{slug:q,fields:s.secrets,configuredKeys:s.configuredSecrets,enabledPlatforms:Array.from(af)})]}),(0,d.jsxs)("div",{className:"border border-edge rounded-xl p-6 bg-surface/80",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:ae?"Redeploy":"Deploy"}),(0,d.jsx)("p",{className:"text-sm text-fg-muted mt-1",children:ae?"Redeploy with the latest bundle and configuration.":"Deploy this MCP server to your Cloudflare Workers account."}),(0,d.jsxs)("div",{className:"mt-5",children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-fg-secondary mb-2",children:"Authentication"}),(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsxs)("select",{value:O,onChange:a=>P(a.target.value),className:"w-full appearance-none px-4 py-2.5 pr-10 bg-surface-raised border border-edge-subtle rounded-lg text-sm text-fg focus:outline-none focus:border-accent-edge focus:ring-1 focus:ring-accent-edge",children:[(0,d.jsx)("option",{value:"bearer",children:"Bearer token (default)"}),(0,d.jsx)("option",{value:"oauth",children:"OAuth 2.1 (password protected)"}),(0,d.jsx)("option",{value:"open",children:"Open (no authentication)"})]}),(0,d.jsx)("svg",{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-fg-muted",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),"oauth"===O&&(0,d.jsx)("p",{className:"text-xs text-fg-faint mt-2",children:"OAuth requires a password prompt during authorization. Bearer tokens are not accepted."}),"open"===O&&(0,d.jsx)("p",{className:"text-xs text-danger mt-2",children:"Warning: Anyone with the URL can access this MCP."})]}),ae&&"open"!==O&&(0,d.jsx)("div",{className:"mt-4 pt-4 border-t border-edge",children:(0,d.jsxs)("label",{className:"flex items-center gap-3 cursor-pointer group",children:[(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{type:"checkbox",checked:Q,onChange:a=>R(a.target.checked),className:"sr-only peer"}),(0,d.jsx)("div",{className:"w-9 h-5 bg-surface-overlay rounded-full peer-checked:bg-warning transition-colors"}),(0,d.jsx)("div",{className:"absolute top-0.5 left-0.5 w-4 h-4 bg-surface-page shadow-sm rounded-full peer-checked:translate-x-4 transition-transform"})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("p",{className:"text-sm font-medium text-fg-secondary group-hover:text-fg transition-colors",children:["Regenerate ","oauth"===O?"OAuth password":"bearer token"]}),(0,d.jsx)("p",{className:"text-xs text-fg-faint",children:"Invalidates existing connections. Use if compromised."})]})]})}),(0,d.jsx)("div",{className:"mt-5 flex items-center justify-end gap-3",children:(0,d.jsx)("button",{onClick:ac,disabled:w||ai,className:`px-6 py-2.5 text-white text-sm font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Q&&ae?"bg-warning hover:bg-warning-hover":"bg-accent hover:bg-accent-hover"}`,children:w?"Deploying...":Q&&ae?"Regenerate & redeploy":ae?"Redeploy":"Deploy to Cloudflare"})}),A&&(0,d.jsx)("p",{className:"mt-4 text-sm text-danger bg-danger-mid/10 border border-danger-mid/20 rounded-lg px-4 py-2",children:A})]}),y&&(0,d.jsx)("div",{className:"border border-success-mid/30 bg-success-mid/5 rounded-xl p-4",children:(0,d.jsx)("p",{className:"text-sm text-success",children:S&&"oauth"===y.authMode?"OAuth password regenerated. Update your client connections.":S?"Bearer token regenerated. Update your client connections.":`Successfully deployed to ${y.workerUrl}`})}),(b=y?.oauthPassword??s.credentials?.oauthPassword,c=y?.bearerToken??s.credentials?.bearerToken??null,l=y?.authMode??s.deployment?.authMode??"bearer",n=y?.workerUrl??s.deployment?.workerUrl,o=y?.mcpUrl??(n?`${n}/mcp`:null),p=y?.mcpUrlWithToken??(c&&n?`${n}/mcp/t/${c}`:o),ae||y?(0,d.jsx)("div",{className:"space-y-4",children:o&&(0,d.jsxs)("div",{className:"border border-edge rounded-xl p-6 bg-surface/80",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Connect to Claude"}),(0,d.jsx)(m,{mcpUrl:o,mcpUrlWithToken:p??o,bearerToken:c,slug:q,authMode:l,oauthPassword:b})]})}):null),(0,d.jsxs)("div",{className:"border border-danger-mid/20 rounded-xl p-6 bg-danger-mid/5",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold text-danger mb-4",children:"Danger Zone"}),(0,d.jsxs)("div",{className:"space-y-4",children:[ae&&(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm text-fg-secondary",children:"Undeploy"}),(0,d.jsx)("p",{className:"text-xs text-fg-faint mt-1",children:"Take the worker offline. You can redeploy later."})]}),(0,d.jsx)("button",{onClick:async()=>{if(confirm("This will delete the deployed worker. You can redeploy later. Continue?")){_(!0);try{let a=await fetch(`/api/mcps/${q}/undeploy`,{method:"DELETE"});if(a.ok){let a=await fetch(`/api/mcps/${q}`).then(a=>a.json());t(a),L(null),z(null)}else{let b=await a.json();alert(b.error??"Failed to undeploy")}}catch{alert("Failed to connect to server")}finally{_(!1)}}},disabled:$,className:"px-4 py-2 bg-danger-dark/50 hover:bg-danger-dark/70 border border-danger-strong/50 rounded-lg text-sm text-danger transition-colors shrink-0 disabled:opacity-50",children:$?"Undeploying...":"Undeploy"})]}),ae&&(0,d.jsx)("div",{className:"border-t border-danger-mid/10"}),(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm text-fg-secondary",children:"Remove"}),(0,d.jsx)("p",{className:"text-xs text-fg-faint mt-1",children:"Undeploy the worker and permanently remove this MCP from the dashboard."})]}),(0,d.jsx)("button",{onClick:async()=>{if(confirm("This will permanently remove this MCP from the dashboard. Continue?")){Z(!0);try{let a=await fetch(`/api/mcps/${q}/remove`,{method:"DELETE"});if(a.ok)r.push("/");else{let b=await a.json();alert(b.error??"Failed to remove MCP")}}catch{alert("Failed to connect to server")}finally{Z(!1)}}},disabled:Y,className:"px-4 py-2 bg-danger-dark/50 hover:bg-danger-dark/70 border border-danger-strong/50 rounded-lg text-sm text-danger transition-colors shrink-0 disabled:opacity-50",children:Y?"Removing...":"Remove"})]})]})]})]})}},7953:(a,b,c)=>{Promise.resolve().then(c.bind(c,1758))},8335:()=>{},8354:a=>{"use strict";a.exports=require("util")},8918:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,1921,23))},9121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},9166:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,5547,23))},9294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9332:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,1921,23)),Promise.resolve().then(c.t.bind(c,440,23)),Promise.resolve().then(c.t.bind(c,4342,23)),Promise.resolve().then(c.t.bind(c,2265,23)),Promise.resolve().then(c.t.bind(c,5421,23)),Promise.resolve().then(c.t.bind(c,1335,23)),Promise.resolve().then(c.t.bind(c,664,23)),Promise.resolve().then(c.bind(c,4661))},9448:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,2116,23)),Promise.resolve().then(c.bind(c,7164)),Promise.resolve().then(c.bind(c,6392))}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[445,471,704],()=>b(b.s=2094));module.exports=c})();