@superinterface/server 1.1.6 → 1.1.7

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 (63) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/eslint/.cache_btwyo7 +1 -1
  5. package/.next/fallback-build-manifest.json +2 -2
  6. package/.next/server/app/_not-found.html +1 -1
  7. package/.next/server/app/_not-found.rsc +1 -1
  8. package/.next/server/app/api/workspaces/[workspaceId]/route.js +1 -1
  9. package/.next/server/app/index.html +1 -1
  10. package/.next/server/app/index.rsc +1 -1
  11. package/.next/server/chunks/[root-of-the-server]__0a426407._.js +1 -1
  12. package/.next/server/chunks/[root-of-the-server]__0a426407._.js.map +1 -1
  13. package/.next/server/chunks/[root-of-the-server]__0c1bc5ed._.js +1 -1
  14. package/.next/server/chunks/[root-of-the-server]__0c1bc5ed._.js.map +1 -1
  15. package/.next/server/chunks/[root-of-the-server]__1a7a04d0._.js +1 -1
  16. package/.next/server/chunks/[root-of-the-server]__1a7a04d0._.js.map +1 -1
  17. package/.next/server/chunks/[root-of-the-server]__2945c9e9._.js +1 -1
  18. package/.next/server/chunks/[root-of-the-server]__2945c9e9._.js.map +1 -1
  19. package/.next/server/chunks/[root-of-the-server]__315f084a._.js +1 -1
  20. package/.next/server/chunks/[root-of-the-server]__315f084a._.js.map +1 -1
  21. package/.next/server/chunks/[root-of-the-server]__42ed6203._.js +1 -1
  22. package/.next/server/chunks/[root-of-the-server]__42ed6203._.js.map +1 -1
  23. package/.next/server/chunks/[root-of-the-server]__4c8c04a2._.js +1 -1
  24. package/.next/server/chunks/[root-of-the-server]__4c8c04a2._.js.map +1 -1
  25. package/.next/server/chunks/[root-of-the-server]__4e536bc0._.js +1 -1
  26. package/.next/server/chunks/[root-of-the-server]__4e536bc0._.js.map +1 -1
  27. package/.next/server/chunks/[root-of-the-server]__583a7f1c._.js +1 -1
  28. package/.next/server/chunks/[root-of-the-server]__583a7f1c._.js.map +1 -1
  29. package/.next/server/chunks/[root-of-the-server]__5abf1160._.js +1 -1
  30. package/.next/server/chunks/[root-of-the-server]__5abf1160._.js.map +1 -1
  31. package/.next/server/chunks/[root-of-the-server]__5aedcd8a._.js +1 -1
  32. package/.next/server/chunks/[root-of-the-server]__5aedcd8a._.js.map +1 -1
  33. package/.next/server/chunks/[root-of-the-server]__62d958e7._.js +1 -1
  34. package/.next/server/chunks/[root-of-the-server]__62d958e7._.js.map +1 -1
  35. package/.next/server/chunks/[root-of-the-server]__630959e5._.js +1 -1
  36. package/.next/server/chunks/[root-of-the-server]__630959e5._.js.map +1 -1
  37. package/.next/server/chunks/[root-of-the-server]__83461316._.js +1 -1
  38. package/.next/server/chunks/[root-of-the-server]__83461316._.js.map +1 -1
  39. package/.next/server/chunks/[root-of-the-server]__9a611d42._.js +1 -1
  40. package/.next/server/chunks/[root-of-the-server]__9a611d42._.js.map +1 -1
  41. package/.next/server/chunks/[root-of-the-server]__a9fab3b2._.js +1 -1
  42. package/.next/server/chunks/[root-of-the-server]__a9fab3b2._.js.map +1 -1
  43. package/.next/server/chunks/[root-of-the-server]__b10ec83e._.js +1 -1
  44. package/.next/server/chunks/[root-of-the-server]__b10ec83e._.js.map +1 -1
  45. package/.next/server/chunks/[root-of-the-server]__c1629392._.js +1 -1
  46. package/.next/server/chunks/[root-of-the-server]__c1629392._.js.map +1 -1
  47. package/.next/server/chunks/[root-of-the-server]__e73543af._.js +1 -1
  48. package/.next/server/chunks/[root-of-the-server]__e73543af._.js.map +1 -1
  49. package/.next/server/chunks/[root-of-the-server]__e8127a36._.js +1 -1
  50. package/.next/server/chunks/[root-of-the-server]__e8127a36._.js.map +1 -1
  51. package/.next/server/chunks/c4f00_next_dist_esm_build_templates_app-route_f952d9ab.js +1 -1
  52. package/.next/server/chunks/c4f00_next_dist_esm_build_templates_app-route_f952d9ab.js.map +1 -1
  53. package/.next/server/pages/404.html +1 -1
  54. package/.next/server/pages/500.html +1 -1
  55. package/.next/trace +1 -1
  56. package/dist/app/api/messages/buildRoute.d.ts.map +1 -1
  57. package/dist/app/api/messages/buildRoute.js +1 -3
  58. package/dist/lib/cache/cacheHeaders.d.ts.map +1 -1
  59. package/dist/lib/cache/cacheHeaders.js +1 -1
  60. package/package.json +1 -1
  61. /package/.next/static/{8ere9Febbau5NxxQazJbz → 25Kcgl6uIxdBmkSgq8yP-}/_buildManifest.js +0 -0
  62. /package/.next/static/{8ere9Febbau5NxxQazJbz → 25Kcgl6uIxdBmkSgq8yP-}/_clientMiddlewareManifest.json +0 -0
  63. /package/.next/static/{8ere9Febbau5NxxQazJbz → 25Kcgl6uIxdBmkSgq8yP-}/_ssgManifest.js +0 -0
@@ -15,8 +15,8 @@
15
15
  "ampDevFiles": [],
16
16
  "polyfillFiles": [],
17
17
  "lowPriorityFiles": [
18
- "static/8ere9Febbau5NxxQazJbz/_ssgManifest.js",
19
- "static/8ere9Febbau5NxxQazJbz/_buildManifest.js"
18
+ "static/25Kcgl6uIxdBmkSgq8yP-/_ssgManifest.js",
19
+ "static/25Kcgl6uIxdBmkSgq8yP-/_buildManifest.js"
20
20
  ],
21
21
  "rootMainFiles": [],
22
22
  "ampFirstPages": []
@@ -1 +1 @@
1
- <!DOCTYPE html><!--8ere9Febbau5NxxQazJbz--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/76a8a50dbf44f000.js"/><script src="/_next/static/chunks/079ce3572ffa07f6.js" async=""></script><script src="/_next/static/chunks/4649e58e35bcde4b.js" async=""></script><script src="/_next/static/chunks/turbopack-11882cf18a9eb231.js" async=""></script><script src="/_next/static/chunks/03d938d038bc30e3.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/76a8a50dbf44f000.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[96352,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n3:I[17753,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n4:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"OutletBoundary\"]\n6:I[33159,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"AsyncMetadataOutlet\"]\n8:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"ViewportBoundary\"]\na:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[25098,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"8ere9Febbau5NxxQazJbz\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/03d938d038bc30e3.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
1
+ <!DOCTYPE html><!--25Kcgl6uIxdBmkSgq8yP_--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/76a8a50dbf44f000.js"/><script src="/_next/static/chunks/079ce3572ffa07f6.js" async=""></script><script src="/_next/static/chunks/4649e58e35bcde4b.js" async=""></script><script src="/_next/static/chunks/turbopack-11882cf18a9eb231.js" async=""></script><script src="/_next/static/chunks/03d938d038bc30e3.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/76a8a50dbf44f000.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[96352,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n3:I[17753,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n4:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"OutletBoundary\"]\n6:I[33159,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"AsyncMetadataOutlet\"]\n8:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"ViewportBoundary\"]\na:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[25098,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"25Kcgl6uIxdBmkSgq8yP-\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/03d938d038bc30e3.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
@@ -7,7 +7,7 @@
7
7
  a:I[51035,["/_next/static/chunks/03d938d038bc30e3.js"],"MetadataBoundary"]
8
8
  b:"$Sreact.suspense"
9
9
  d:I[25098,["/_next/static/chunks/03d938d038bc30e3.js"],"default"]
10
- 0:{"P":null,"b":"8ere9Febbau5NxxQazJbz","p":"","c":["","_not-found"],"i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","script","script-0",{"src":"/_next/static/chunks/03d938d038bc30e3.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":["/_not-found",["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$L5",["$","$L6",null,{"promise":"$@7"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],[["$","$L8",null,{"children":"$L9"}],null],["$","$La",null,{"children":["$","div",null,{"hidden":true,"children":["$","$b",null,{"fallback":null,"children":"$Lc"}]}]}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"s":false,"S":true}
10
+ 0:{"P":null,"b":"25Kcgl6uIxdBmkSgq8yP-","p":"","c":["","_not-found"],"i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","script","script-0",{"src":"/_next/static/chunks/03d938d038bc30e3.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":["/_not-found",["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$L5",["$","$L6",null,{"promise":"$@7"}]]}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],[["$","$L8",null,{"children":"$L9"}],null],["$","$La",null,{"children":["$","div",null,{"hidden":true,"children":["$","$b",null,{"fallback":null,"children":"$Lc"}]}]}]]}],false]],"m":"$undefined","G":["$d","$undefined"],"s":false,"S":true}
11
11
  9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
12
12
  5:null
13
13
  7:{"metadata":[],"error":null,"digest":"$undefined"}
@@ -1,8 +1,8 @@
1
1
  var R=require("../../../../chunks/[turbopack]_runtime.js")("server/app/api/workspaces/[workspaceId]/route.js")
2
2
  R.c("server/chunks/[root-of-the-server]__83461316._.js")
3
3
  R.c("server/chunks/c4f00_next_548686f3._.js")
4
- R.c("server/chunks/[root-of-the-server]__281d6920._.js")
5
4
  R.c("server/chunks/c4f00_zod_v3_external_33a7ba6d.js")
5
+ R.c("server/chunks/[root-of-the-server]__281d6920._.js")
6
6
  R.m(71952)
7
7
  R.m(84916)
8
8
  module.exports=R.m(84916).exports
@@ -1 +1 @@
1
- <!DOCTYPE html><!--8ere9Febbau5NxxQazJbz--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/76a8a50dbf44f000.js"/><script src="/_next/static/chunks/079ce3572ffa07f6.js" async=""></script><script src="/_next/static/chunks/4649e58e35bcde4b.js" async=""></script><script src="/_next/static/chunks/turbopack-11882cf18a9eb231.js" async=""></script><script src="/_next/static/chunks/03d938d038bc30e3.js" async=""></script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div>@superinterface/server is running.</div><!--$--><!--/$--><script src="/_next/static/chunks/76a8a50dbf44f000.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[96352,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n3:I[17753,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n4:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"OutletBoundary\"]\n6:I[33159,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"AsyncMetadataOutlet\"]\n8:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"ViewportBoundary\"]\na:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[25098,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"8ere9Febbau5NxxQazJbz\",\"p\":\"\",\"c\":[\"\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/03d938d038bc30e3.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"div\",null,{\"children\":\"@superinterface/server is running.\"}],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
1
+ <!DOCTYPE html><!--25Kcgl6uIxdBmkSgq8yP_--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/76a8a50dbf44f000.js"/><script src="/_next/static/chunks/079ce3572ffa07f6.js" async=""></script><script src="/_next/static/chunks/4649e58e35bcde4b.js" async=""></script><script src="/_next/static/chunks/turbopack-11882cf18a9eb231.js" async=""></script><script src="/_next/static/chunks/03d938d038bc30e3.js" async=""></script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div>@superinterface/server is running.</div><!--$--><!--/$--><script src="/_next/static/chunks/76a8a50dbf44f000.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[96352,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n3:I[17753,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n4:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"OutletBoundary\"]\n6:I[33159,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"AsyncMetadataOutlet\"]\n8:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"ViewportBoundary\"]\na:I[51035,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"MetadataBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[25098,[\"/_next/static/chunks/03d938d038bc30e3.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"25Kcgl6uIxdBmkSgq8yP-\",\"p\":\"\",\"c\":[\"\",\"\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/03d938d038bc30e3.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"div\",null,{\"children\":\"@superinterface/server is running.\"}],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
@@ -7,7 +7,7 @@
7
7
  a:I[51035,["/_next/static/chunks/03d938d038bc30e3.js"],"MetadataBoundary"]
8
8
  b:"$Sreact.suspense"
9
9
  d:I[25098,["/_next/static/chunks/03d938d038bc30e3.js"],"default"]
10
- 0:{"P":null,"b":"8ere9Febbau5NxxQazJbz","p":"","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","script","script-0",{"src":"/_next/static/chunks/03d938d038bc30e3.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","div",null,{"children":"@superinterface/server is running."}],null,["$","$L4",null,{"children":["$L5",["$","$L6",null,{"promise":"$@7"}]]}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$L8",null,{"children":"$L9"}],null],["$","$La",null,{"children":["$","div",null,{"hidden":true,"children":["$","$b",null,{"fallback":null,"children":"$Lc"}]}]}]]}],false]],"m":"$undefined","G":["$d",[]],"s":false,"S":true}
10
+ 0:{"P":null,"b":"25Kcgl6uIxdBmkSgq8yP-","p":"","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","script","script-0",{"src":"/_next/static/chunks/03d938d038bc30e3.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","div",null,{"children":"@superinterface/server is running."}],null,["$","$L4",null,{"children":["$L5",["$","$L6",null,{"promise":"$@7"}]]}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,[["$","$L8",null,{"children":"$L9"}],null],["$","$La",null,{"children":["$","div",null,{"hidden":true,"children":["$","$b",null,{"fallback":null,"children":"$Lc"}]}]}]]}],false]],"m":"$undefined","G":["$d",[]],"s":false,"S":true}
11
11
  9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
12
12
  5:null
13
13
  7:{"metadata":[],"error":null,"digest":"$undefined"}
@@ -1,3 +1,3 @@
1
- module.exports=[18622,(e,a,r)=>{a.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,a,r)=>{a.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,a,r)=>{a.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,a,r)=>{a.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},20635,(e,a,r)=>{a.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},93695,(e,a,r)=>{a.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},30611,e=>{"use strict";e.s(["cacheHeaders",()=>a]);let a={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, PUT, DELETE, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}},88122,e=>{"use strict";e.s(["getApiKey",()=>r]);var a=e.i(55897);let r=async({authorization:e,type:r,prisma:t})=>{if(!e)return null;let[,n]=e.split("Bearer ");return(0,a.validate)(n)?t.apiKey.findFirst({where:{type:r,value:n}}):null}},65074,e=>{"use strict";e.s(["TaskScheduleConflictError",()=>r,"ValidationError",()=>a]);class a extends Error{static defaultMessage="Validation failed.";constructor(e=a.defaultMessage){super(e),this.name=this.constructor.name}}class r extends a{static defaultMessage="Tasks sharing a key and thread must be scheduled at least 15 minutes apart.";constructor(e=r.defaultMessage){super(e)}}},67083,e=>{"use strict";e.s(["isJSON",()=>a]);let a=e=>{try{return JSON.parse(e),!0}catch(e){return!1}}},20460,74787,64538,e=>{"use strict";e.s(["serializeApiFunction",()=>r],20460);var a=e.i(29173);let r=({fn:e})=>({id:e.id,openapiSpec:e.openapiSpec,handler:(({handler:e})=>({type:e.type,...e.type===a.HandlerType.REQUEST?{requestHandler:{url:e.requestHandler.url,method:e.requestHandler.method,headers:e.requestHandler.headers,body:e.requestHandler.body}}:{},...e.type===a.HandlerType.FIRECRAWL?{firecrawlHandler:{type:e.firecrawlHandler.type,apiKey:e.firecrawlHandler.apiKey,body:e.firecrawlHandler.body}}:{},...e.type===a.HandlerType.REPLICATE?{replicateHandler:{type:e.replicateHandler.type,apiKey:e.replicateHandler.apiKey,identifier:e.replicateHandler.identifier,body:e.replicateHandler.body}}:{},...e.type===a.HandlerType.CLIENT_TOOL?{clientToolHandler:{type:e.clientToolHandler.type,name:e.clientToolHandler.name,arguments:e.clientToolHandler.arguments}}:{},...e.type===a.HandlerType.ASSISTANT?{assistantHandler:{assistantId:e.assistantHandler.assistantId}}:{},...e.type===a.HandlerType.LIST_TASKS?{listTasksHandler:{keyTemplate:e.listTasksHandler.keyTemplate}}:{},...e.type===a.HandlerType.CREATE_TASK?{createTaskHandler:{keyTemplate:e.createTaskHandler.keyTemplate}}:{},...e.type===a.HandlerType.UPDATE_TASK?{updateTaskHandler:{keyTemplate:e.updateTaskHandler.keyTemplate}}:{},...e.type===a.HandlerType.DELETE_TASK?{deleteTaskHandler:{keyTemplate:e.deleteTaskHandler.keyTemplate}}:{}}))({handler:e.handler}),createdAt:e.createdAt.toISOString(),updatedAt:e.updatedAt.toISOString()});e.s(["functionSchema",()=>u],74787);var t=e.i(13669),n=e.i(67083);let s=t.z.object({method:t.z.nativeEnum(a.MethodType),url:t.z.string().min(1).url(),headers:t.z.string().min(1).refine(n.isJSON,{message:"Must be a valid JSON string."}),body:t.z.string().min(1).refine(n.isJSON,{message:"Must be a valid JSON string."})}),l=t.z.object({type:t.z.nativeEnum(a.FirecrawlHandlerType),apiKey:t.z.string().min(1),body:t.z.string().min(1).refine(n.isJSON,{message:"Must be a valid JSON string."})}),i=t.z.object({assistantId:t.z.string().min(1)}),d=t.z.object({type:t.z.nativeEnum(a.ReplicateHandlerType),identifier:t.z.string().min(1),apiKey:t.z.string().min(1),body:t.z.string().min(1).refine(n.isJSON,{message:"Must be a valid JSON string."})}),o=t.z.object({type:t.z.nativeEnum(a.ClientToolHandlerType),name:t.z.string().min(1),arguments:t.z.string().min(1).refine(n.isJSON,{message:"Must be a valid JSON string."})}),p=t.z.object({keyTemplate:t.z.string()}),u=t.z.object({openapiSpec:t.z.string().min(1).refine(n.isJSON,{message:"Must be a valid JSON string."}),handler:t.z.object({type:t.z.nativeEnum(a.HandlerType),requestHandler:s.nullable().optional(),firecrawlHandler:l.nullable().optional(),assistantHandler:i.nullable().optional(),replicateHandler:d.nullable().optional(),clientToolHandler:o.nullable().optional(),createTaskHandler:p.nullable().optional(),listTasksHandler:p.nullable().optional(),updateTaskHandler:p.nullable().optional(),deleteTaskHandler:p.nullable().optional()})}).superRefine((e,r)=>{if(e.handler.type===a.HandlerType.REQUEST){let a=s.safeParse(e.handler.requestHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","requestHandler",...e.path]}))}if(e.handler.type===a.HandlerType.FIRECRAWL){let a=l.safeParse(e.handler.firecrawlHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","firecrawlHandler",...e.path]}))}if(e.handler.type===a.HandlerType.ASSISTANT){let a=i.safeParse(e.handler.assistantHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","assistantHandler",...e.path]}))}if(e.handler.type===a.HandlerType.REPLICATE){let a=d.safeParse(e.handler.replicateHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","replicateHandler",...e.path]}))}if(e.handler.type===a.HandlerType.CLIENT_TOOL){let a=o.safeParse(e.handler.clientToolHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","clientToolHandler",...e.path]}))}if(e.handler.type===a.HandlerType.CREATE_TASK){let a=p.safeParse(e.handler.createTaskHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","createTaskHandler",...e.path]}))}if(e.handler.type===a.HandlerType.LIST_TASKS){let a=p.safeParse(e.handler.listTasksHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","listTasksHandler",...e.path]}))}if(e.handler.type===a.HandlerType.UPDATE_TASK){let a=p.safeParse(e.handler.updateTaskHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","updateTaskHandler",...e.path]}))}if(e.handler.type===a.HandlerType.DELETE_TASK){let a=p.safeParse(e.handler.deleteTaskHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","deleteTaskHandler",...e.path]}))}});e.s(["handlerPrismaInput",()=>h],64538);var c=e.i(65074);let h=async({parsedInput:e,action:r,assistant:t,prisma:n})=>{if(e.handler.type===a.HandlerType.REQUEST){if(!e.handler.requestHandler)throw new c.ValidationError("Request handler is required.");return{requestHandler:{[r]:{method:e.handler.requestHandler.method,url:e.handler.requestHandler.url,headers:JSON.parse(e.handler.requestHandler.headers),body:JSON.parse(e.handler.requestHandler.body)}}}}if(e.handler.type===a.HandlerType.FIRECRAWL){if(!e.handler.firecrawlHandler)throw new c.ValidationError("Firecrawl handler is required.");return{firecrawlHandler:{[r]:{type:e.handler.firecrawlHandler.type,apiKey:e.handler.firecrawlHandler.apiKey,body:JSON.parse(e.handler.firecrawlHandler.body)}}}}if(e.handler.type===a.HandlerType.ASSISTANT){if(!e.handler.assistantHandler)throw new c.ValidationError("Assistant handler is required.");let a=await n.assistant.findFirst({where:{id:e.handler.assistantHandler.assistantId,workspaceId:t.workspaceId}});if(!a)throw new c.ValidationError("Assistant not found.");return{assistantHandler:{[r]:{assistantId:a.id}}}}if(e.handler.type===a.HandlerType.REPLICATE){if(!e.handler.replicateHandler)throw new c.ValidationError("Replicate handler is required.");return{replicateHandler:{[r]:{type:e.handler.replicateHandler.type,apiKey:e.handler.replicateHandler.apiKey,identifier:e.handler.replicateHandler.identifier,body:JSON.parse(e.handler.replicateHandler.body)}}}}if(e.handler.type===a.HandlerType.CLIENT_TOOL){if(!e.handler.clientToolHandler)throw new c.ValidationError("Client tool handler is required.");return{clientToolHandler:{[r]:{type:e.handler.clientToolHandler.type,name:e.handler.clientToolHandler.name,arguments:JSON.parse(e.handler.clientToolHandler.arguments)}}}}else if(e.handler.type===a.HandlerType.CREATE_TASK){if(!e.handler.createTaskHandler)throw new c.ValidationError("Task handler is required.");return{createTaskHandler:{[r]:{keyTemplate:e.handler.createTaskHandler.keyTemplate}}}}else if(e.handler.type===a.HandlerType.LIST_TASKS){if(!e.handler.listTasksHandler)throw new c.ValidationError("Task handler is required.");return{listTasksHandler:{[r]:{keyTemplate:e.handler.listTasksHandler.keyTemplate}}}}else if(e.handler.type===a.HandlerType.UPDATE_TASK){if(!e.handler.updateTaskHandler)throw new c.ValidationError("Task handler is required.");return{updateTaskHandler:{[r]:{keyTemplate:e.handler.updateTaskHandler.keyTemplate}}}}else if(e.handler.type===a.HandlerType.DELETE_TASK){if(!e.handler.deleteTaskHandler)throw new c.ValidationError("Task handler is required.");return{deleteTaskHandler:{[r]:{keyTemplate:e.handler.deleteTaskHandler.keyTemplate}}}}else throw new c.ValidationError("Handler type not supported.")}},27812,e=>{"use strict";e.s([])},87336,e=>{"use strict";e.s(["handler",()=>M,"patchFetch",()=>_,"routeModule",()=>q,"serverHooks",()=>z,"workAsyncStorage",()=>j,"workUnitAsyncStorage",()=>K],87336);var a=e.i(5865),r=e.i(43877),t=e.i(77767),n=e.i(92562),s=e.i(66256),l=e.i(5270),i=e.i(90231),d=e.i(82677),o=e.i(51081),p=e.i(89822),u=e.i(9124),c=e.i(39147),h=e.i(40568),T=e.i(87188),y=e.i(93695);e.i(57132);var f=e.i(80739);e.s(["DELETE",()=>C,"GET",()=>N,"OPTIONS",()=>O,"PATCH",()=>b],80989);var H=e.i(24493),m=e.i(11053),E=e.i(29173),w=e.i(49493),k=e.i(30611),R=e.i(88122),g=e.i(55897),x=e.i(20460),A=e.i(74787),S=e.i(64538);async function v(e){let{fn:a,parsedInput:r,include:t,prisma:n}=e;return n.$transaction(async e=>(await e.handler.deleteMany({where:{functionId:a.id}}),e.function.update({where:{id:a.id},data:{openapiSpec:JSON.parse(r.openapiSpec),handler:{create:{type:r.handler.type,...await (0,S.handlerPrismaInput)({parsedInput:r,action:"create",assistant:a.assistant,prisma:e})}}},include:t})))}let I=({assistantId:e,functionId:a})=>(0,g.validate)(e)?(0,g.validate)(a)?null:w.NextResponse.json({error:"Invalid function id"},{status:400}):w.NextResponse.json({error:"Invalid assistant id"},{status:400}),N=(({prisma:e})=>async(a,r)=>{let{assistantId:t,functionId:n}=await r.params,s=(await (0,m.headers)()).get("authorization");if(!s)return w.NextResponse.json({error:"No authorization header found"},{status:400});let l=await (0,R.getApiKey)({type:E.ApiKeyType.PRIVATE,authorization:s,prisma:e});if(!l)return w.NextResponse.json({error:"Invalid api key"},{status:400});let i=I({assistantId:t,functionId:n});if(i)return i;let d=await e.function.findFirst({where:{id:n,assistant:{id:t,workspaceId:l.workspaceId}},include:{handler:{include:{requestHandler:!0,firecrawlHandler:!0,replicateHandler:!0,clientToolHandler:!0,assistantHandler:!0,createTaskHandler:!0,listTasksHandler:!0,updateTaskHandler:!0,deleteTaskHandler:!0}}}});return d?w.NextResponse.json({function:(0,x.serializeApiFunction)({fn:d})},{headers:k.cacheHeaders}):w.NextResponse.json({error:"No function found"},{status:400})})({prisma:H.prisma}),b=(({prisma:e})=>async(a,r)=>{let{assistantId:t,functionId:n}=await r.params,s=(await (0,m.headers)()).get("authorization");if(!s)return w.NextResponse.json({error:"No authorization header found"},{status:400});let l=await (0,R.getApiKey)({authorization:s,type:E.ApiKeyType.PRIVATE,prisma:e});if(!l)return w.NextResponse.json({error:"Invalid api key"},{status:400});let i=I({assistantId:t,functionId:n});if(i)return i;let d=await a.json(),o=A.functionSchema.safeParse(d);if(!o.success)return w.NextResponse.json({error:"Invalid payload"},{status:400});let p=await e.function.findFirst({where:{id:n,assistant:{id:t,workspaceId:l.workspaceId}},include:{assistant:!0}});if(!p)return w.NextResponse.json({error:"No function found"},{status:400});let u=await v({fn:p,parsedInput:o.data,include:{handler:{include:{requestHandler:!0,firecrawlHandler:!0,replicateHandler:!0,clientToolHandler:!0,assistantHandler:!0,createTaskHandler:!0,listTasksHandler:!0,updateTaskHandler:!0,deleteTaskHandler:!0}}},prisma:e});return w.NextResponse.json({function:(0,x.serializeApiFunction)({fn:u})},{headers:k.cacheHeaders})})({prisma:H.prisma}),C=(({prisma:e})=>async(a,r)=>{let{assistantId:t,functionId:n}=await r.params,s=(await (0,m.headers)()).get("authorization");if(!s)return w.NextResponse.json({error:"No authorization header found"},{status:400});let l=await (0,R.getApiKey)({authorization:s,type:E.ApiKeyType.PRIVATE,prisma:e});if(!l)return w.NextResponse.json({error:"Invalid api key"},{status:400});let i=I({assistantId:t,functionId:n});if(i)return i;let d=await e.function.findFirst({where:{id:n,assistant:{id:t,workspaceId:l.workspaceId}}});if(!d)return w.NextResponse.json({error:"No function found"},{status:400});let o=await e.function.delete({where:{id:d.id},include:{handler:{include:{requestHandler:!0,firecrawlHandler:!0,replicateHandler:!0,clientToolHandler:!0,assistantHandler:!0,createTaskHandler:!0,listTasksHandler:!0,updateTaskHandler:!0,deleteTaskHandler:!0}}}});return w.NextResponse.json({mcpServer:(0,x.serializeApiFunction)({fn:o})},{headers:k.cacheHeaders})})({prisma:H.prisma}),O=()=>w.NextResponse.json({},{headers:k.cacheHeaders});var P=e.i(80989);let q=new a.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/assistants/[assistantId]/functions/[functionId]/route",pathname:"/api/assistants/[assistantId]/functions/[functionId]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/functions/[functionId]/route.ts",nextConfigOutput:"",userland:P}),{workAsyncStorage:j,workUnitAsyncStorage:K,serverHooks:z}=q;function _(){return(0,t.patchFetch)({workAsyncStorage:j,workUnitAsyncStorage:K})}async function M(e,a,t){var H;let m="/api/assistants/[assistantId]/functions/[functionId]/route";m=m.replace(/\/index$/,"")||"/";let E=await q.prepare(e,a,{srcPage:m,multiZoneDraftMode:!1});if(!E)return a.statusCode=400,a.end("Bad Request"),null==t.waitUntil||t.waitUntil.call(t,Promise.resolve()),null;let{buildId:w,params:k,nextConfig:R,isDraftMode:g,prerenderManifest:x,routerServerContext:A,isOnDemandRevalidate:S,revalidateOnlyGenerated:v,resolvedPathname:I}=E,N=(0,l.normalizeAppPath)(m),b=!!(x.dynamicRoutes[N]||x.routes[I]);if(b&&!g){let e=!!x.routes[I],a=x.dynamicRoutes[N];if(a&&!1===a.fallback&&!e)throw new y.NoFallbackError}let C=null;!b||q.isDev||g||(C="/index"===(C=I)?"/":C);let O=!0===q.isDev||!b,P=b&&!O,j=e.method||"GET",K=(0,s.getTracer)(),z=K.getActiveScopeSpan(),_={params:k,prerenderManifest:x,renderOpts:{experimental:{cacheComponents:!!R.experimental.cacheComponents,authInterrupts:!!R.experimental.authInterrupts},supportsDynamicResponse:O,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:null==(H=R.experimental)?void 0:H.cacheLife,isRevalidate:P,waitUntil:t.waitUntil,onClose:e=>{a.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(a,r,t)=>q.onRequestError(e,a,t,A)},sharedContext:{buildId:w}},M=new i.NodeNextRequest(e),L=new i.NodeNextResponse(a),U=d.NextRequestAdapter.fromNodeNextRequest(M,(0,d.signalFromNodeResponse)(a));try{let l=async r=>q.handle(U,_).finally(()=>{if(!r)return;r.setAttributes({"http.status_code":a.statusCode,"next.rsc":!1});let t=K.getRootSpanAttributes();if(!t)return;if(t.get("next.span_type")!==o.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${t.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=t.get("next.route");if(n){let e=`${j} ${n}`;r.setAttributes({"next.route":n,"http.route":n,"next.span_name":e}),r.updateName(e)}else r.updateName(`${j} ${e.url}`)}),i=async s=>{var i,d;let o=async({previousCacheEntry:r})=>{try{if(!(0,n.getRequestMeta)(e,"minimalMode")&&S&&v&&!r)return a.statusCode=404,a.setHeader("x-nextjs-cache","REVALIDATED"),a.end("This page could not be found"),null;let i=await l(s);e.fetchMetrics=_.renderOpts.fetchMetrics;let d=_.renderOpts.pendingWaitUntil;d&&t.waitUntil&&(t.waitUntil(d),d=void 0);let o=_.renderOpts.collectedTags;if(!b)return await (0,u.sendResponse)(M,L,i,_.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),a=(0,c.toNodeOutgoingHttpHeaders)(i.headers);o&&(a[T.NEXT_CACHE_TAGS_HEADER]=o),!a["content-type"]&&e.type&&(a["content-type"]=e.type);let r=void 0!==_.renderOpts.collectedRevalidate&&!(_.renderOpts.collectedRevalidate>=T.INFINITE_CACHE)&&_.renderOpts.collectedRevalidate,t=void 0===_.renderOpts.collectedExpire||_.renderOpts.collectedExpire>=T.INFINITE_CACHE?void 0:_.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:a},cacheControl:{revalidate:r,expire:t}}}}catch(a){throw(null==r?void 0:r.isStale)&&await q.onRequestError(e,a,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isRevalidate:P,isOnDemandRevalidate:S})},A),a}},y=await q.handleResponse({req:e,nextConfig:R,cacheKey:C,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:x,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:v,responseGenerator:o,waitUntil:t.waitUntil});if(!b)return null;if((null==y||null==(i=y.value)?void 0:i.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==y||null==(d=y.value)?void 0:d.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,n.getRequestMeta)(e,"minimalMode")||a.setHeader("x-nextjs-cache",S?"REVALIDATED":y.isMiss?"MISS":y.isStale?"STALE":"HIT"),g&&a.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let H=(0,c.fromNodeOutgoingHttpHeaders)(y.value.headers);return(0,n.getRequestMeta)(e,"minimalMode")&&b||H.delete(T.NEXT_CACHE_TAGS_HEADER),!y.cacheControl||a.getHeader("Cache-Control")||H.get("Cache-Control")||H.set("Cache-Control",(0,h.getCacheControlHeader)(y.cacheControl)),await (0,u.sendResponse)(M,L,new Response(y.value.body,{headers:H,status:y.value.status||200})),null};z?await i(z):await K.withPropagatedContext(e.headers,()=>K.trace(o.BaseServerSpan.handleRequest,{spanName:`${j} ${e.url}`,kind:s.SpanKind.SERVER,attributes:{"http.method":j,"http.target":e.url}},i))}catch(a){if(a instanceof y.NoFallbackError||await q.onRequestError(e,a,{routerKind:"App Router",routePath:N,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isRevalidate:P,isOnDemandRevalidate:S})}),b)throw a;return await (0,u.sendResponse)(M,L,new Response(null,{status:500})),null}}}];
1
+ module.exports=[18622,(e,a,r)=>{a.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,a,r)=>{a.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,a,r)=>{a.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,a,r)=>{a.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},20635,(e,a,r)=>{a.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},93695,(e,a,r)=>{a.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},30611,e=>{"use strict";e.s(["cacheHeaders",()=>a]);let a={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, PUT, DELETE, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Authorization, X-Requested-With, Accept"}},88122,e=>{"use strict";e.s(["getApiKey",()=>r]);var a=e.i(55897);let r=async({authorization:e,type:r,prisma:t})=>{if(!e)return null;let[,n]=e.split("Bearer ");return(0,a.validate)(n)?t.apiKey.findFirst({where:{type:r,value:n}}):null}},65074,e=>{"use strict";e.s(["TaskScheduleConflictError",()=>r,"ValidationError",()=>a]);class a extends Error{static defaultMessage="Validation failed.";constructor(e=a.defaultMessage){super(e),this.name=this.constructor.name}}class r extends a{static defaultMessage="Tasks sharing a key and thread must be scheduled at least 15 minutes apart.";constructor(e=r.defaultMessage){super(e)}}},67083,e=>{"use strict";e.s(["isJSON",()=>a]);let a=e=>{try{return JSON.parse(e),!0}catch(e){return!1}}},20460,74787,64538,e=>{"use strict";e.s(["serializeApiFunction",()=>r],20460);var a=e.i(29173);let r=({fn:e})=>({id:e.id,openapiSpec:e.openapiSpec,handler:(({handler:e})=>({type:e.type,...e.type===a.HandlerType.REQUEST?{requestHandler:{url:e.requestHandler.url,method:e.requestHandler.method,headers:e.requestHandler.headers,body:e.requestHandler.body}}:{},...e.type===a.HandlerType.FIRECRAWL?{firecrawlHandler:{type:e.firecrawlHandler.type,apiKey:e.firecrawlHandler.apiKey,body:e.firecrawlHandler.body}}:{},...e.type===a.HandlerType.REPLICATE?{replicateHandler:{type:e.replicateHandler.type,apiKey:e.replicateHandler.apiKey,identifier:e.replicateHandler.identifier,body:e.replicateHandler.body}}:{},...e.type===a.HandlerType.CLIENT_TOOL?{clientToolHandler:{type:e.clientToolHandler.type,name:e.clientToolHandler.name,arguments:e.clientToolHandler.arguments}}:{},...e.type===a.HandlerType.ASSISTANT?{assistantHandler:{assistantId:e.assistantHandler.assistantId}}:{},...e.type===a.HandlerType.LIST_TASKS?{listTasksHandler:{keyTemplate:e.listTasksHandler.keyTemplate}}:{},...e.type===a.HandlerType.CREATE_TASK?{createTaskHandler:{keyTemplate:e.createTaskHandler.keyTemplate}}:{},...e.type===a.HandlerType.UPDATE_TASK?{updateTaskHandler:{keyTemplate:e.updateTaskHandler.keyTemplate}}:{},...e.type===a.HandlerType.DELETE_TASK?{deleteTaskHandler:{keyTemplate:e.deleteTaskHandler.keyTemplate}}:{}}))({handler:e.handler}),createdAt:e.createdAt.toISOString(),updatedAt:e.updatedAt.toISOString()});e.s(["functionSchema",()=>u],74787);var t=e.i(13669),n=e.i(67083);let s=t.z.object({method:t.z.nativeEnum(a.MethodType),url:t.z.string().min(1).url(),headers:t.z.string().min(1).refine(n.isJSON,{message:"Must be a valid JSON string."}),body:t.z.string().min(1).refine(n.isJSON,{message:"Must be a valid JSON string."})}),l=t.z.object({type:t.z.nativeEnum(a.FirecrawlHandlerType),apiKey:t.z.string().min(1),body:t.z.string().min(1).refine(n.isJSON,{message:"Must be a valid JSON string."})}),i=t.z.object({assistantId:t.z.string().min(1)}),d=t.z.object({type:t.z.nativeEnum(a.ReplicateHandlerType),identifier:t.z.string().min(1),apiKey:t.z.string().min(1),body:t.z.string().min(1).refine(n.isJSON,{message:"Must be a valid JSON string."})}),o=t.z.object({type:t.z.nativeEnum(a.ClientToolHandlerType),name:t.z.string().min(1),arguments:t.z.string().min(1).refine(n.isJSON,{message:"Must be a valid JSON string."})}),p=t.z.object({keyTemplate:t.z.string()}),u=t.z.object({openapiSpec:t.z.string().min(1).refine(n.isJSON,{message:"Must be a valid JSON string."}),handler:t.z.object({type:t.z.nativeEnum(a.HandlerType),requestHandler:s.nullable().optional(),firecrawlHandler:l.nullable().optional(),assistantHandler:i.nullable().optional(),replicateHandler:d.nullable().optional(),clientToolHandler:o.nullable().optional(),createTaskHandler:p.nullable().optional(),listTasksHandler:p.nullable().optional(),updateTaskHandler:p.nullable().optional(),deleteTaskHandler:p.nullable().optional()})}).superRefine((e,r)=>{if(e.handler.type===a.HandlerType.REQUEST){let a=s.safeParse(e.handler.requestHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","requestHandler",...e.path]}))}if(e.handler.type===a.HandlerType.FIRECRAWL){let a=l.safeParse(e.handler.firecrawlHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","firecrawlHandler",...e.path]}))}if(e.handler.type===a.HandlerType.ASSISTANT){let a=i.safeParse(e.handler.assistantHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","assistantHandler",...e.path]}))}if(e.handler.type===a.HandlerType.REPLICATE){let a=d.safeParse(e.handler.replicateHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","replicateHandler",...e.path]}))}if(e.handler.type===a.HandlerType.CLIENT_TOOL){let a=o.safeParse(e.handler.clientToolHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","clientToolHandler",...e.path]}))}if(e.handler.type===a.HandlerType.CREATE_TASK){let a=p.safeParse(e.handler.createTaskHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","createTaskHandler",...e.path]}))}if(e.handler.type===a.HandlerType.LIST_TASKS){let a=p.safeParse(e.handler.listTasksHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","listTasksHandler",...e.path]}))}if(e.handler.type===a.HandlerType.UPDATE_TASK){let a=p.safeParse(e.handler.updateTaskHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","updateTaskHandler",...e.path]}))}if(e.handler.type===a.HandlerType.DELETE_TASK){let a=p.safeParse(e.handler.deleteTaskHandler);if(a.success)return;a.error.issues.forEach(e=>r.addIssue({...e,path:["handler","deleteTaskHandler",...e.path]}))}});e.s(["handlerPrismaInput",()=>h],64538);var c=e.i(65074);let h=async({parsedInput:e,action:r,assistant:t,prisma:n})=>{if(e.handler.type===a.HandlerType.REQUEST){if(!e.handler.requestHandler)throw new c.ValidationError("Request handler is required.");return{requestHandler:{[r]:{method:e.handler.requestHandler.method,url:e.handler.requestHandler.url,headers:JSON.parse(e.handler.requestHandler.headers),body:JSON.parse(e.handler.requestHandler.body)}}}}if(e.handler.type===a.HandlerType.FIRECRAWL){if(!e.handler.firecrawlHandler)throw new c.ValidationError("Firecrawl handler is required.");return{firecrawlHandler:{[r]:{type:e.handler.firecrawlHandler.type,apiKey:e.handler.firecrawlHandler.apiKey,body:JSON.parse(e.handler.firecrawlHandler.body)}}}}if(e.handler.type===a.HandlerType.ASSISTANT){if(!e.handler.assistantHandler)throw new c.ValidationError("Assistant handler is required.");let a=await n.assistant.findFirst({where:{id:e.handler.assistantHandler.assistantId,workspaceId:t.workspaceId}});if(!a)throw new c.ValidationError("Assistant not found.");return{assistantHandler:{[r]:{assistantId:a.id}}}}if(e.handler.type===a.HandlerType.REPLICATE){if(!e.handler.replicateHandler)throw new c.ValidationError("Replicate handler is required.");return{replicateHandler:{[r]:{type:e.handler.replicateHandler.type,apiKey:e.handler.replicateHandler.apiKey,identifier:e.handler.replicateHandler.identifier,body:JSON.parse(e.handler.replicateHandler.body)}}}}if(e.handler.type===a.HandlerType.CLIENT_TOOL){if(!e.handler.clientToolHandler)throw new c.ValidationError("Client tool handler is required.");return{clientToolHandler:{[r]:{type:e.handler.clientToolHandler.type,name:e.handler.clientToolHandler.name,arguments:JSON.parse(e.handler.clientToolHandler.arguments)}}}}else if(e.handler.type===a.HandlerType.CREATE_TASK){if(!e.handler.createTaskHandler)throw new c.ValidationError("Task handler is required.");return{createTaskHandler:{[r]:{keyTemplate:e.handler.createTaskHandler.keyTemplate}}}}else if(e.handler.type===a.HandlerType.LIST_TASKS){if(!e.handler.listTasksHandler)throw new c.ValidationError("Task handler is required.");return{listTasksHandler:{[r]:{keyTemplate:e.handler.listTasksHandler.keyTemplate}}}}else if(e.handler.type===a.HandlerType.UPDATE_TASK){if(!e.handler.updateTaskHandler)throw new c.ValidationError("Task handler is required.");return{updateTaskHandler:{[r]:{keyTemplate:e.handler.updateTaskHandler.keyTemplate}}}}else if(e.handler.type===a.HandlerType.DELETE_TASK){if(!e.handler.deleteTaskHandler)throw new c.ValidationError("Task handler is required.");return{deleteTaskHandler:{[r]:{keyTemplate:e.handler.deleteTaskHandler.keyTemplate}}}}else throw new c.ValidationError("Handler type not supported.")}},27812,e=>{"use strict";e.s([])},87336,e=>{"use strict";e.s(["handler",()=>M,"patchFetch",()=>_,"routeModule",()=>P,"serverHooks",()=>K,"workAsyncStorage",()=>j,"workUnitAsyncStorage",()=>z],87336);var a=e.i(5865),r=e.i(43877),t=e.i(77767),n=e.i(92562),s=e.i(66256),l=e.i(5270),i=e.i(90231),d=e.i(82677),o=e.i(51081),p=e.i(89822),u=e.i(9124),c=e.i(39147),h=e.i(40568),T=e.i(87188),y=e.i(93695);e.i(57132);var f=e.i(80739);e.s(["DELETE",()=>C,"GET",()=>N,"OPTIONS",()=>O,"PATCH",()=>b],80989);var H=e.i(24493),m=e.i(11053),E=e.i(29173),w=e.i(49493),k=e.i(30611),R=e.i(88122),g=e.i(55897),A=e.i(20460),x=e.i(74787),S=e.i(64538);async function v(e){let{fn:a,parsedInput:r,include:t,prisma:n}=e;return n.$transaction(async e=>(await e.handler.deleteMany({where:{functionId:a.id}}),e.function.update({where:{id:a.id},data:{openapiSpec:JSON.parse(r.openapiSpec),handler:{create:{type:r.handler.type,...await (0,S.handlerPrismaInput)({parsedInput:r,action:"create",assistant:a.assistant,prisma:e})}}},include:t})))}let I=({assistantId:e,functionId:a})=>(0,g.validate)(e)?(0,g.validate)(a)?null:w.NextResponse.json({error:"Invalid function id"},{status:400}):w.NextResponse.json({error:"Invalid assistant id"},{status:400}),N=(({prisma:e})=>async(a,r)=>{let{assistantId:t,functionId:n}=await r.params,s=(await (0,m.headers)()).get("authorization");if(!s)return w.NextResponse.json({error:"No authorization header found"},{status:400});let l=await (0,R.getApiKey)({type:E.ApiKeyType.PRIVATE,authorization:s,prisma:e});if(!l)return w.NextResponse.json({error:"Invalid api key"},{status:400});let i=I({assistantId:t,functionId:n});if(i)return i;let d=await e.function.findFirst({where:{id:n,assistant:{id:t,workspaceId:l.workspaceId}},include:{handler:{include:{requestHandler:!0,firecrawlHandler:!0,replicateHandler:!0,clientToolHandler:!0,assistantHandler:!0,createTaskHandler:!0,listTasksHandler:!0,updateTaskHandler:!0,deleteTaskHandler:!0}}}});return d?w.NextResponse.json({function:(0,A.serializeApiFunction)({fn:d})},{headers:k.cacheHeaders}):w.NextResponse.json({error:"No function found"},{status:400})})({prisma:H.prisma}),b=(({prisma:e})=>async(a,r)=>{let{assistantId:t,functionId:n}=await r.params,s=(await (0,m.headers)()).get("authorization");if(!s)return w.NextResponse.json({error:"No authorization header found"},{status:400});let l=await (0,R.getApiKey)({authorization:s,type:E.ApiKeyType.PRIVATE,prisma:e});if(!l)return w.NextResponse.json({error:"Invalid api key"},{status:400});let i=I({assistantId:t,functionId:n});if(i)return i;let d=await a.json(),o=x.functionSchema.safeParse(d);if(!o.success)return w.NextResponse.json({error:"Invalid payload"},{status:400});let p=await e.function.findFirst({where:{id:n,assistant:{id:t,workspaceId:l.workspaceId}},include:{assistant:!0}});if(!p)return w.NextResponse.json({error:"No function found"},{status:400});let u=await v({fn:p,parsedInput:o.data,include:{handler:{include:{requestHandler:!0,firecrawlHandler:!0,replicateHandler:!0,clientToolHandler:!0,assistantHandler:!0,createTaskHandler:!0,listTasksHandler:!0,updateTaskHandler:!0,deleteTaskHandler:!0}}},prisma:e});return w.NextResponse.json({function:(0,A.serializeApiFunction)({fn:u})},{headers:k.cacheHeaders})})({prisma:H.prisma}),C=(({prisma:e})=>async(a,r)=>{let{assistantId:t,functionId:n}=await r.params,s=(await (0,m.headers)()).get("authorization");if(!s)return w.NextResponse.json({error:"No authorization header found"},{status:400});let l=await (0,R.getApiKey)({authorization:s,type:E.ApiKeyType.PRIVATE,prisma:e});if(!l)return w.NextResponse.json({error:"Invalid api key"},{status:400});let i=I({assistantId:t,functionId:n});if(i)return i;let d=await e.function.findFirst({where:{id:n,assistant:{id:t,workspaceId:l.workspaceId}}});if(!d)return w.NextResponse.json({error:"No function found"},{status:400});let o=await e.function.delete({where:{id:d.id},include:{handler:{include:{requestHandler:!0,firecrawlHandler:!0,replicateHandler:!0,clientToolHandler:!0,assistantHandler:!0,createTaskHandler:!0,listTasksHandler:!0,updateTaskHandler:!0,deleteTaskHandler:!0}}}});return w.NextResponse.json({mcpServer:(0,A.serializeApiFunction)({fn:o})},{headers:k.cacheHeaders})})({prisma:H.prisma}),O=()=>w.NextResponse.json({},{headers:k.cacheHeaders});var q=e.i(80989);let P=new a.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/assistants/[assistantId]/functions/[functionId]/route",pathname:"/api/assistants/[assistantId]/functions/[functionId]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/functions/[functionId]/route.ts",nextConfigOutput:"",userland:q}),{workAsyncStorage:j,workUnitAsyncStorage:z,serverHooks:K}=P;function _(){return(0,t.patchFetch)({workAsyncStorage:j,workUnitAsyncStorage:z})}async function M(e,a,t){var H;let m="/api/assistants/[assistantId]/functions/[functionId]/route";m=m.replace(/\/index$/,"")||"/";let E=await P.prepare(e,a,{srcPage:m,multiZoneDraftMode:!1});if(!E)return a.statusCode=400,a.end("Bad Request"),null==t.waitUntil||t.waitUntil.call(t,Promise.resolve()),null;let{buildId:w,params:k,nextConfig:R,isDraftMode:g,prerenderManifest:A,routerServerContext:x,isOnDemandRevalidate:S,revalidateOnlyGenerated:v,resolvedPathname:I}=E,N=(0,l.normalizeAppPath)(m),b=!!(A.dynamicRoutes[N]||A.routes[I]);if(b&&!g){let e=!!A.routes[I],a=A.dynamicRoutes[N];if(a&&!1===a.fallback&&!e)throw new y.NoFallbackError}let C=null;!b||P.isDev||g||(C="/index"===(C=I)?"/":C);let O=!0===P.isDev||!b,q=b&&!O,j=e.method||"GET",z=(0,s.getTracer)(),K=z.getActiveScopeSpan(),_={params:k,prerenderManifest:A,renderOpts:{experimental:{cacheComponents:!!R.experimental.cacheComponents,authInterrupts:!!R.experimental.authInterrupts},supportsDynamicResponse:O,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:null==(H=R.experimental)?void 0:H.cacheLife,isRevalidate:q,waitUntil:t.waitUntil,onClose:e=>{a.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(a,r,t)=>P.onRequestError(e,a,t,x)},sharedContext:{buildId:w}},M=new i.NodeNextRequest(e),L=new i.NodeNextResponse(a),U=d.NextRequestAdapter.fromNodeNextRequest(M,(0,d.signalFromNodeResponse)(a));try{let l=async r=>P.handle(U,_).finally(()=>{if(!r)return;r.setAttributes({"http.status_code":a.statusCode,"next.rsc":!1});let t=z.getRootSpanAttributes();if(!t)return;if(t.get("next.span_type")!==o.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${t.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=t.get("next.route");if(n){let e=`${j} ${n}`;r.setAttributes({"next.route":n,"http.route":n,"next.span_name":e}),r.updateName(e)}else r.updateName(`${j} ${e.url}`)}),i=async s=>{var i,d;let o=async({previousCacheEntry:r})=>{try{if(!(0,n.getRequestMeta)(e,"minimalMode")&&S&&v&&!r)return a.statusCode=404,a.setHeader("x-nextjs-cache","REVALIDATED"),a.end("This page could not be found"),null;let i=await l(s);e.fetchMetrics=_.renderOpts.fetchMetrics;let d=_.renderOpts.pendingWaitUntil;d&&t.waitUntil&&(t.waitUntil(d),d=void 0);let o=_.renderOpts.collectedTags;if(!b)return await (0,u.sendResponse)(M,L,i,_.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),a=(0,c.toNodeOutgoingHttpHeaders)(i.headers);o&&(a[T.NEXT_CACHE_TAGS_HEADER]=o),!a["content-type"]&&e.type&&(a["content-type"]=e.type);let r=void 0!==_.renderOpts.collectedRevalidate&&!(_.renderOpts.collectedRevalidate>=T.INFINITE_CACHE)&&_.renderOpts.collectedRevalidate,t=void 0===_.renderOpts.collectedExpire||_.renderOpts.collectedExpire>=T.INFINITE_CACHE?void 0:_.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:a},cacheControl:{revalidate:r,expire:t}}}}catch(a){throw(null==r?void 0:r.isStale)&&await P.onRequestError(e,a,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isRevalidate:q,isOnDemandRevalidate:S})},x),a}},y=await P.handleResponse({req:e,nextConfig:R,cacheKey:C,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:v,responseGenerator:o,waitUntil:t.waitUntil});if(!b)return null;if((null==y||null==(i=y.value)?void 0:i.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==y||null==(d=y.value)?void 0:d.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,n.getRequestMeta)(e,"minimalMode")||a.setHeader("x-nextjs-cache",S?"REVALIDATED":y.isMiss?"MISS":y.isStale?"STALE":"HIT"),g&&a.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let H=(0,c.fromNodeOutgoingHttpHeaders)(y.value.headers);return(0,n.getRequestMeta)(e,"minimalMode")&&b||H.delete(T.NEXT_CACHE_TAGS_HEADER),!y.cacheControl||a.getHeader("Cache-Control")||H.get("Cache-Control")||H.set("Cache-Control",(0,h.getCacheControlHeader)(y.cacheControl)),await (0,u.sendResponse)(M,L,new Response(y.value.body,{headers:H,status:y.value.status||200})),null};K?await i(K):await z.withPropagatedContext(e.headers,()=>z.trace(o.BaseServerSpan.handleRequest,{spanName:`${j} ${e.url}`,kind:s.SpanKind.SERVER,attributes:{"http.method":j,"http.target":e.url}},i))}catch(a){if(a instanceof y.NoFallbackError||await P.onRequestError(e,a,{routerKind:"App Router",routePath:N,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isRevalidate:q,isOnDemandRevalidate:S})}),b)throw a;return await (0,u.sendResponse)(M,L,new Response(null,{status:500})),null}}}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__0a426407._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/cache/cacheHeaders.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/apiKeys/getApiKey.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/errors/index.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/misc/isJSON.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/handlers/serializeApiHandler.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/functions/serializeApiFunction.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/functions/functionSchema.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/handlers/handlerPrismaInput.tsx","turbopack:///[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/functions/[functionId]/route.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/functions/[functionId]/buildRoute.ts","turbopack:///[project]/supercorp/superinterface/node_modules/next/dist/esm/build/templates/app-route.js","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/functions/updateFunction.ts"],"sourcesContent":["export const cacheHeaders = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',\n 'Access-Control-Allow-Headers': 'Content-Type',\n}\n","import { ApiKeyType, ApiKey, type PrismaClient } from '@prisma/client'\nimport { validate } from 'uuid'\n\nexport const getApiKey = async ({\n authorization,\n type,\n prisma,\n}: {\n authorization: string | null\n type: ApiKeyType\n prisma: PrismaClient\n}): Promise<ApiKey | null> => {\n if (!authorization) {\n return null\n }\n\n const [, apiKeyValue] = authorization.split('Bearer ')\n\n if (!validate(apiKeyValue)) {\n return null\n }\n\n return prisma.apiKey.findFirst({\n where: { type, value: apiKeyValue },\n })\n}\n","export class ValidationError extends Error {\n static defaultMessage = 'Validation failed.'\n\n constructor(message: string = ValidationError.defaultMessage) {\n super(message)\n this.name = this.constructor.name\n }\n}\n\nexport class TaskScheduleConflictError extends ValidationError {\n static defaultMessage =\n 'Tasks sharing a key and thread must be scheduled at least 15 minutes apart.'\n\n constructor(message: string = TaskScheduleConflictError.defaultMessage) {\n super(message)\n }\n}\n\nexport const publicErrors = [ValidationError, TaskScheduleConflictError]\n","export const isJSON = (value: string) => {\n try {\n JSON.parse(value)\n return true\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) {\n return false\n }\n}\n","import { Prisma, HandlerType } from '@prisma/client'\n\nexport const serializeApiHandler = ({\n handler,\n}: {\n handler: Prisma.HandlerGetPayload<{\n include: {\n requestHandler: true\n firecrawlHandler: true\n replicateHandler: true\n clientToolHandler: true\n assistantHandler: true\n createTaskHandler: true\n listTasksHandler: true\n updateTaskHandler: true\n deleteTaskHandler: true\n }\n }>\n}) => ({\n type: handler.type,\n ...(handler.type === HandlerType.REQUEST\n ? {\n requestHandler: {\n url: handler.requestHandler!.url,\n method: handler.requestHandler!.method,\n headers: handler.requestHandler!.headers,\n body: handler.requestHandler!.body,\n },\n }\n : {}),\n ...(handler.type === HandlerType.FIRECRAWL\n ? {\n firecrawlHandler: {\n type: handler.firecrawlHandler!.type,\n apiKey: handler.firecrawlHandler!.apiKey,\n body: handler.firecrawlHandler!.body,\n },\n }\n : {}),\n ...(handler.type === HandlerType.REPLICATE\n ? {\n replicateHandler: {\n type: handler.replicateHandler!.type,\n apiKey: handler.replicateHandler!.apiKey,\n identifier: handler.replicateHandler!.identifier,\n body: handler.replicateHandler!.body,\n },\n }\n : {}),\n ...(handler.type === HandlerType.CLIENT_TOOL\n ? {\n clientToolHandler: {\n type: handler.clientToolHandler!.type,\n name: handler.clientToolHandler!.name,\n arguments: handler.clientToolHandler!.arguments,\n },\n }\n : {}),\n ...(handler.type === HandlerType.ASSISTANT\n ? {\n assistantHandler: {\n assistantId: handler.assistantHandler!.assistantId,\n },\n }\n : {}),\n ...(handler.type === HandlerType.LIST_TASKS\n ? {\n listTasksHandler: {\n keyTemplate: handler.listTasksHandler!.keyTemplate,\n },\n }\n : {}),\n ...(handler.type === HandlerType.CREATE_TASK\n ? {\n createTaskHandler: {\n keyTemplate: handler.createTaskHandler!.keyTemplate,\n },\n }\n : {}),\n ...(handler.type === HandlerType.UPDATE_TASK\n ? {\n updateTaskHandler: {\n keyTemplate: handler.updateTaskHandler!.keyTemplate,\n },\n }\n : {}),\n ...(handler.type === HandlerType.DELETE_TASK\n ? {\n deleteTaskHandler: {\n keyTemplate: handler.deleteTaskHandler!.keyTemplate,\n },\n }\n : {}),\n})\n","import { Prisma } from '@prisma/client'\nimport { serializeApiHandler } from '@/lib/handlers/serializeApiHandler'\n\nexport const serializeApiFunction = ({\n fn,\n}: {\n fn: Prisma.FunctionGetPayload<{\n include: {\n handler: {\n include: {\n requestHandler: true\n firecrawlHandler: true\n replicateHandler: true\n clientToolHandler: true\n assistantHandler: true\n createTaskHandler: true\n listTasksHandler: true\n updateTaskHandler: true\n deleteTaskHandler: true\n }\n }\n }\n }>\n}) => ({\n id: fn.id,\n openapiSpec: fn.openapiSpec,\n handler: serializeApiHandler({\n handler: fn.handler!,\n }),\n createdAt: fn.createdAt.toISOString(),\n updatedAt: fn.updatedAt.toISOString(),\n})\n","import {\n HandlerType,\n MethodType,\n FirecrawlHandlerType,\n ReplicateHandlerType,\n ClientToolHandlerType,\n} from '@prisma/client'\nimport { z } from 'zod'\nimport { isJSON } from '@/lib/misc/isJSON'\n\nconst requestHandlerSchema = z.object({\n method: z.nativeEnum(MethodType),\n url: z.string().min(1).url(),\n headers: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n body: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst firecrawlHandlerSchema = z.object({\n type: z.nativeEnum(FirecrawlHandlerType),\n apiKey: z.string().min(1),\n body: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst assistantHandlerSchema = z.object({\n assistantId: z.string().min(1),\n})\n\nconst replicateHandlerSchema = z.object({\n type: z.nativeEnum(ReplicateHandlerType),\n identifier: z.string().min(1),\n apiKey: z.string().min(1),\n body: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst clientToolHandlerSchema = z.object({\n type: z.nativeEnum(ClientToolHandlerType),\n name: z.string().min(1),\n arguments: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst taskHandlerSchema = z.object({\n keyTemplate: z.string(),\n})\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const superRefine = (values: any, ctx: any) => {\n if (values.handler.type === HandlerType.REQUEST) {\n const result = requestHandlerSchema.safeParse(values.handler.requestHandler)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'requestHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.FIRECRAWL) {\n const result = firecrawlHandlerSchema.safeParse(\n values.handler.firecrawlHandler,\n )\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'firecrawlHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.ASSISTANT) {\n const result = assistantHandlerSchema.safeParse(\n values.handler.assistantHandler,\n )\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'assistantHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.REPLICATE) {\n const result = replicateHandlerSchema.safeParse(\n values.handler.replicateHandler,\n )\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'replicateHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.CLIENT_TOOL) {\n const result = clientToolHandlerSchema.safeParse(\n values.handler.clientToolHandler,\n )\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'clientToolHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.CREATE_TASK) {\n const result = taskHandlerSchema.safeParse(values.handler.createTaskHandler)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'createTaskHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.LIST_TASKS) {\n const result = taskHandlerSchema.safeParse(values.handler.listTasksHandler)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'listTasksHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.UPDATE_TASK) {\n const result = taskHandlerSchema.safeParse(values.handler.updateTaskHandler)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'updateTaskHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.DELETE_TASK) {\n const result = taskHandlerSchema.safeParse(values.handler.deleteTaskHandler)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'deleteTaskHandler', ...issue.path],\n }),\n )\n }\n}\n\nexport const baseSchema = z.object({\n openapiSpec: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n handler: z.object({\n type: z.nativeEnum(HandlerType),\n requestHandler: requestHandlerSchema.nullable().optional(),\n firecrawlHandler: firecrawlHandlerSchema.nullable().optional(),\n assistantHandler: assistantHandlerSchema.nullable().optional(),\n replicateHandler: replicateHandlerSchema.nullable().optional(),\n clientToolHandler: clientToolHandlerSchema.nullable().optional(),\n createTaskHandler: taskHandlerSchema.nullable().optional(),\n listTasksHandler: taskHandlerSchema.nullable().optional(),\n updateTaskHandler: taskHandlerSchema.nullable().optional(),\n deleteTaskHandler: taskHandlerSchema.nullable().optional(),\n }),\n})\n\nexport const functionSchema = baseSchema.superRefine(superRefine)\n","import { HandlerType, type PrismaClient } from '@prisma/client'\nimport type { Assistant } from '@prisma/client'\nimport type { HandlerInput } from '@/types'\nimport { ValidationError } from '@/lib/errors'\n\nexport const handlerPrismaInput = async ({\n parsedInput,\n action,\n assistant,\n prisma,\n}: {\n parsedInput: {\n handler: HandlerInput\n }\n action: 'create' | 'update'\n assistant: Assistant\n prisma: PrismaClient\n}) => {\n if (parsedInput.handler.type === HandlerType.REQUEST) {\n if (!parsedInput.handler.requestHandler)\n throw new ValidationError('Request handler is required.')\n\n return {\n requestHandler: {\n [action]: {\n method: parsedInput.handler.requestHandler.method,\n url: parsedInput.handler.requestHandler.url,\n headers: JSON.parse(parsedInput.handler.requestHandler.headers),\n body: JSON.parse(parsedInput.handler.requestHandler.body),\n },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.FIRECRAWL) {\n if (!parsedInput.handler.firecrawlHandler)\n throw new ValidationError('Firecrawl handler is required.')\n\n return {\n firecrawlHandler: {\n [action]: {\n type: parsedInput.handler.firecrawlHandler.type,\n apiKey: parsedInput.handler.firecrawlHandler.apiKey,\n body: JSON.parse(parsedInput.handler.firecrawlHandler.body),\n },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.ASSISTANT) {\n if (!parsedInput.handler.assistantHandler)\n throw new ValidationError('Assistant handler is required.')\n\n const handlerAssistant = await prisma.assistant.findFirst({\n where: {\n id: parsedInput.handler.assistantHandler.assistantId,\n workspaceId: assistant.workspaceId,\n },\n })\n\n if (!handlerAssistant) throw new ValidationError('Assistant not found.')\n\n return {\n assistantHandler: {\n [action]: {\n assistantId: handlerAssistant.id,\n },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.REPLICATE) {\n if (!parsedInput.handler.replicateHandler)\n throw new ValidationError('Replicate handler is required.')\n\n return {\n replicateHandler: {\n [action]: {\n type: parsedInput.handler.replicateHandler.type,\n apiKey: parsedInput.handler.replicateHandler.apiKey,\n identifier: parsedInput.handler.replicateHandler.identifier,\n body: JSON.parse(parsedInput.handler.replicateHandler.body),\n },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.CLIENT_TOOL) {\n if (!parsedInput.handler.clientToolHandler)\n throw new ValidationError('Client tool handler is required.')\n\n return {\n clientToolHandler: {\n [action]: {\n type: parsedInput.handler.clientToolHandler.type,\n name: parsedInput.handler.clientToolHandler.name,\n arguments: JSON.parse(\n parsedInput.handler.clientToolHandler.arguments,\n ),\n },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.CREATE_TASK) {\n if (!parsedInput.handler.createTaskHandler)\n throw new ValidationError('Task handler is required.')\n\n const keyTemplate = parsedInput.handler.createTaskHandler.keyTemplate\n\n return {\n createTaskHandler: {\n [action]: { keyTemplate },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.LIST_TASKS) {\n if (!parsedInput.handler.listTasksHandler)\n throw new ValidationError('Task handler is required.')\n\n const keyTemplate = parsedInput.handler.listTasksHandler.keyTemplate\n\n return {\n listTasksHandler: {\n [action]: { keyTemplate },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.UPDATE_TASK) {\n if (!parsedInput.handler.updateTaskHandler)\n throw new ValidationError('Task handler is required.')\n\n const keyTemplate = parsedInput.handler.updateTaskHandler.keyTemplate\n\n return {\n updateTaskHandler: {\n [action]: { keyTemplate },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.DELETE_TASK) {\n if (!parsedInput.handler.deleteTaskHandler)\n throw new ValidationError('Task handler is required.')\n\n const keyTemplate = parsedInput.handler.deleteTaskHandler.keyTemplate\n\n return {\n deleteTaskHandler: {\n [action]: { keyTemplate },\n },\n }\n } else {\n throw new ValidationError('Handler type not supported.')\n }\n}\n","import { prisma } from '@/lib/prisma'\nimport { buildDELETE, buildGET, buildOPTIONS, buildPATCH } from './buildRoute'\n\nexport const GET = buildGET({ prisma })\n\nexport const PATCH = buildPATCH({ prisma })\n\nexport const DELETE = buildDELETE({ prisma })\n\nexport const OPTIONS = buildOPTIONS()\n","import { headers } from 'next/headers'\nimport { ApiKeyType, type PrismaClient } from '@prisma/client'\nimport { NextResponse, type NextRequest } from 'next/server'\nimport { cacheHeaders } from '@/lib/cache/cacheHeaders'\nimport { getApiKey } from '@/lib/apiKeys/getApiKey'\nimport { validate } from 'uuid'\nimport { serializeApiFunction } from '@/lib/functions/serializeApiFunction'\nimport { functionSchema } from '@/lib/functions/functionSchema'\nimport { updateFunction } from '@/lib/functions/updateFunction'\n\ntype RouteProps = {\n params: Promise<{ assistantId: string; functionId: string }>\n}\n\nconst ensureIdsValid = ({\n assistantId,\n functionId,\n}: {\n assistantId: string\n functionId: string\n}) => {\n if (!validate(assistantId)) {\n return NextResponse.json({ error: 'Invalid assistant id' }, { status: 400 })\n }\n\n if (!validate(functionId)) {\n return NextResponse.json({ error: 'Invalid function id' }, { status: 400 })\n }\n\n return null\n}\n\nexport const buildGET =\n ({ prisma }: { prisma: PrismaClient }) =>\n async (_request: NextRequest, props: RouteProps) => {\n const { assistantId, functionId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n type: ApiKeyType.PRIVATE,\n authorization,\n prisma,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const validationError = ensureIdsValid({ assistantId, functionId })\n if (validationError) return validationError\n\n const fn = await prisma.function.findFirst({\n where: {\n id: functionId,\n assistant: {\n id: assistantId,\n workspaceId: privateApiKey.workspaceId,\n },\n },\n include: {\n handler: {\n include: {\n requestHandler: true,\n firecrawlHandler: true,\n replicateHandler: true,\n clientToolHandler: true,\n assistantHandler: true,\n createTaskHandler: true,\n listTasksHandler: true,\n updateTaskHandler: true,\n deleteTaskHandler: true,\n },\n },\n },\n })\n\n if (!fn) {\n return NextResponse.json({ error: 'No function found' }, { status: 400 })\n }\n\n return NextResponse.json(\n {\n function: serializeApiFunction({ fn }),\n },\n { headers: cacheHeaders },\n )\n }\n\nexport const buildPATCH =\n ({ prisma }: { prisma: PrismaClient }) =>\n async (request: NextRequest, props: RouteProps) => {\n const { assistantId, functionId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n authorization,\n type: ApiKeyType.PRIVATE,\n prisma,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const validationError = ensureIdsValid({ assistantId, functionId })\n if (validationError) return validationError\n\n const body = await request.json()\n\n const parsed = functionSchema.safeParse(body)\n\n if (!parsed.success) {\n return NextResponse.json({ error: 'Invalid payload' }, { status: 400 })\n }\n\n const fn = await prisma.function.findFirst({\n where: {\n id: functionId,\n assistant: {\n id: assistantId,\n workspaceId: privateApiKey.workspaceId,\n },\n },\n include: {\n assistant: true,\n },\n })\n\n if (!fn) {\n return NextResponse.json({ error: 'No function found' }, { status: 400 })\n }\n\n const updatedFunction = await updateFunction({\n fn,\n parsedInput: parsed.data,\n include: {\n handler: {\n include: {\n requestHandler: true,\n firecrawlHandler: true,\n replicateHandler: true,\n clientToolHandler: true,\n assistantHandler: true,\n createTaskHandler: true,\n listTasksHandler: true,\n updateTaskHandler: true,\n deleteTaskHandler: true,\n },\n },\n },\n prisma,\n })\n\n return NextResponse.json(\n {\n function: serializeApiFunction({ fn: updatedFunction }),\n },\n { headers: cacheHeaders },\n )\n }\n\nexport const buildDELETE =\n ({ prisma }: { prisma: PrismaClient }) =>\n async (_request: NextRequest, props: RouteProps) => {\n const { assistantId, functionId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n authorization,\n type: ApiKeyType.PRIVATE,\n prisma,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const validationError = ensureIdsValid({ assistantId, functionId })\n if (validationError) return validationError\n\n const fn = await prisma.function.findFirst({\n where: {\n id: functionId,\n assistant: {\n id: assistantId,\n workspaceId: privateApiKey.workspaceId,\n },\n },\n })\n\n if (!fn) {\n return NextResponse.json({ error: 'No function found' }, { status: 400 })\n }\n\n const deletedFunction = await prisma.function.delete({\n where: { id: fn.id },\n include: {\n handler: {\n include: {\n requestHandler: true,\n firecrawlHandler: true,\n replicateHandler: true,\n clientToolHandler: true,\n assistantHandler: true,\n createTaskHandler: true,\n listTasksHandler: true,\n updateTaskHandler: true,\n deleteTaskHandler: true,\n },\n },\n },\n })\n\n return NextResponse.json(\n {\n mcpServer: serializeApiFunction({ fn: deletedFunction }),\n },\n { headers: cacheHeaders },\n )\n }\n\nexport const buildOPTIONS = () => () =>\n NextResponse.json(\n {},\n {\n headers: cacheHeaders,\n },\n )\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/assistants/[assistantId]/functions/[functionId]/route\",\n pathname: \"/api/assistants/[assistantId]/functions/[functionId]\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/functions/[functionId]/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n let srcPage = \"/api/assistants/[assistantId]/functions/[functionId]/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isRevalidate = isIsr && !supportsDynamicResponse;\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n isRevalidate,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${req.url}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isRevalidate,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${req.url}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isRevalidate,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import type { Prisma, PrismaClient } from '@prisma/client'\nimport type { HandlerInput } from '@/types'\nimport { handlerPrismaInput } from '@/lib/handlers/handlerPrismaInput'\n\nexport async function updateFunction<\n TInclude extends Prisma.FunctionInclude,\n>(params: {\n fn: Prisma.FunctionGetPayload<{\n include: {\n assistant: true\n }\n }>\n parsedInput: { openapiSpec: string; handler: HandlerInput }\n include: TInclude\n prisma: PrismaClient\n}): Promise<Prisma.FunctionGetPayload<{ include: TInclude }>> {\n const { fn, parsedInput, include, prisma } = params\n\n return prisma.$transaction(async (tx) => {\n await tx.handler.deleteMany({\n where: { functionId: fn.id },\n })\n\n return tx.function.update({\n where: { id: fn.id },\n data: {\n openapiSpec: JSON.parse(parsedInput.openapiSpec),\n handler: {\n create: {\n type: parsedInput.handler.type,\n ...(await handlerPrismaInput({\n parsedInput,\n action: 'create',\n assistant: fn.assistant,\n prisma: tx as unknown as PrismaClient,\n })),\n },\n },\n },\n include,\n })\n })\n}\n"],"names":[],"mappings":"6jCAAO,IAAM,EAAe,CAC1B,8BAA+B,IAC/B,+BAAgC,kCAChC,+BAAgC,cAClC,mDCHA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEO,IAAM,EAAY,MAAO,eAC9B,CAAa,MACb,CAAI,QACJ,CAAM,CAKP,IACC,GAAI,CAAC,EACH,OAAO,KAGT,CAJoB,EAId,EAAG,EAAY,CAAG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,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAcV,GAbI,AAAE,CAAD,YAAgB,EAAA,eAAe,EAChC,CADmC,KAC7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,cAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[10]}
1
+ {"version":3,"sources":["turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/cache/cacheHeaders.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/apiKeys/getApiKey.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/errors/index.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/misc/isJSON.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/handlers/serializeApiHandler.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/functions/serializeApiFunction.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/functions/functionSchema.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/handlers/handlerPrismaInput.tsx","turbopack:///[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/functions/[functionId]/route.ts","turbopack:///[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/functions/[functionId]/buildRoute.ts","turbopack:///[project]/supercorp/superinterface/node_modules/next/dist/esm/build/templates/app-route.js","turbopack:///[project]/supercorp/superinterface/packages/server/src/lib/functions/updateFunction.ts"],"sourcesContent":["export const cacheHeaders = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',\n 'Access-Control-Allow-Headers':\n 'Content-Type, Authorization, X-Requested-With, Accept',\n}\n","import { ApiKeyType, ApiKey, type PrismaClient } from '@prisma/client'\nimport { validate } from 'uuid'\n\nexport const getApiKey = async ({\n authorization,\n type,\n prisma,\n}: {\n authorization: string | null\n type: ApiKeyType\n prisma: PrismaClient\n}): Promise<ApiKey | null> => {\n if (!authorization) {\n return null\n }\n\n const [, apiKeyValue] = authorization.split('Bearer ')\n\n if (!validate(apiKeyValue)) {\n return null\n }\n\n return prisma.apiKey.findFirst({\n where: { type, value: apiKeyValue },\n })\n}\n","export class ValidationError extends Error {\n static defaultMessage = 'Validation failed.'\n\n constructor(message: string = ValidationError.defaultMessage) {\n super(message)\n this.name = this.constructor.name\n }\n}\n\nexport class TaskScheduleConflictError extends ValidationError {\n static defaultMessage =\n 'Tasks sharing a key and thread must be scheduled at least 15 minutes apart.'\n\n constructor(message: string = TaskScheduleConflictError.defaultMessage) {\n super(message)\n }\n}\n\nexport const publicErrors = [ValidationError, TaskScheduleConflictError]\n","export const isJSON = (value: string) => {\n try {\n JSON.parse(value)\n return true\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (e) {\n return false\n }\n}\n","import { Prisma, HandlerType } from '@prisma/client'\n\nexport const serializeApiHandler = ({\n handler,\n}: {\n handler: Prisma.HandlerGetPayload<{\n include: {\n requestHandler: true\n firecrawlHandler: true\n replicateHandler: true\n clientToolHandler: true\n assistantHandler: true\n createTaskHandler: true\n listTasksHandler: true\n updateTaskHandler: true\n deleteTaskHandler: true\n }\n }>\n}) => ({\n type: handler.type,\n ...(handler.type === HandlerType.REQUEST\n ? {\n requestHandler: {\n url: handler.requestHandler!.url,\n method: handler.requestHandler!.method,\n headers: handler.requestHandler!.headers,\n body: handler.requestHandler!.body,\n },\n }\n : {}),\n ...(handler.type === HandlerType.FIRECRAWL\n ? {\n firecrawlHandler: {\n type: handler.firecrawlHandler!.type,\n apiKey: handler.firecrawlHandler!.apiKey,\n body: handler.firecrawlHandler!.body,\n },\n }\n : {}),\n ...(handler.type === HandlerType.REPLICATE\n ? {\n replicateHandler: {\n type: handler.replicateHandler!.type,\n apiKey: handler.replicateHandler!.apiKey,\n identifier: handler.replicateHandler!.identifier,\n body: handler.replicateHandler!.body,\n },\n }\n : {}),\n ...(handler.type === HandlerType.CLIENT_TOOL\n ? {\n clientToolHandler: {\n type: handler.clientToolHandler!.type,\n name: handler.clientToolHandler!.name,\n arguments: handler.clientToolHandler!.arguments,\n },\n }\n : {}),\n ...(handler.type === HandlerType.ASSISTANT\n ? {\n assistantHandler: {\n assistantId: handler.assistantHandler!.assistantId,\n },\n }\n : {}),\n ...(handler.type === HandlerType.LIST_TASKS\n ? {\n listTasksHandler: {\n keyTemplate: handler.listTasksHandler!.keyTemplate,\n },\n }\n : {}),\n ...(handler.type === HandlerType.CREATE_TASK\n ? {\n createTaskHandler: {\n keyTemplate: handler.createTaskHandler!.keyTemplate,\n },\n }\n : {}),\n ...(handler.type === HandlerType.UPDATE_TASK\n ? {\n updateTaskHandler: {\n keyTemplate: handler.updateTaskHandler!.keyTemplate,\n },\n }\n : {}),\n ...(handler.type === HandlerType.DELETE_TASK\n ? {\n deleteTaskHandler: {\n keyTemplate: handler.deleteTaskHandler!.keyTemplate,\n },\n }\n : {}),\n})\n","import { Prisma } from '@prisma/client'\nimport { serializeApiHandler } from '@/lib/handlers/serializeApiHandler'\n\nexport const serializeApiFunction = ({\n fn,\n}: {\n fn: Prisma.FunctionGetPayload<{\n include: {\n handler: {\n include: {\n requestHandler: true\n firecrawlHandler: true\n replicateHandler: true\n clientToolHandler: true\n assistantHandler: true\n createTaskHandler: true\n listTasksHandler: true\n updateTaskHandler: true\n deleteTaskHandler: true\n }\n }\n }\n }>\n}) => ({\n id: fn.id,\n openapiSpec: fn.openapiSpec,\n handler: serializeApiHandler({\n handler: fn.handler!,\n }),\n createdAt: fn.createdAt.toISOString(),\n updatedAt: fn.updatedAt.toISOString(),\n})\n","import {\n HandlerType,\n MethodType,\n FirecrawlHandlerType,\n ReplicateHandlerType,\n ClientToolHandlerType,\n} from '@prisma/client'\nimport { z } from 'zod'\nimport { isJSON } from '@/lib/misc/isJSON'\n\nconst requestHandlerSchema = z.object({\n method: z.nativeEnum(MethodType),\n url: z.string().min(1).url(),\n headers: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n body: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst firecrawlHandlerSchema = z.object({\n type: z.nativeEnum(FirecrawlHandlerType),\n apiKey: z.string().min(1),\n body: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst assistantHandlerSchema = z.object({\n assistantId: z.string().min(1),\n})\n\nconst replicateHandlerSchema = z.object({\n type: z.nativeEnum(ReplicateHandlerType),\n identifier: z.string().min(1),\n apiKey: z.string().min(1),\n body: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst clientToolHandlerSchema = z.object({\n type: z.nativeEnum(ClientToolHandlerType),\n name: z.string().min(1),\n arguments: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n})\n\nconst taskHandlerSchema = z.object({\n keyTemplate: z.string(),\n})\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const superRefine = (values: any, ctx: any) => {\n if (values.handler.type === HandlerType.REQUEST) {\n const result = requestHandlerSchema.safeParse(values.handler.requestHandler)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'requestHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.FIRECRAWL) {\n const result = firecrawlHandlerSchema.safeParse(\n values.handler.firecrawlHandler,\n )\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'firecrawlHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.ASSISTANT) {\n const result = assistantHandlerSchema.safeParse(\n values.handler.assistantHandler,\n )\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'assistantHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.REPLICATE) {\n const result = replicateHandlerSchema.safeParse(\n values.handler.replicateHandler,\n )\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'replicateHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.CLIENT_TOOL) {\n const result = clientToolHandlerSchema.safeParse(\n values.handler.clientToolHandler,\n )\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'clientToolHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.CREATE_TASK) {\n const result = taskHandlerSchema.safeParse(values.handler.createTaskHandler)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'createTaskHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.LIST_TASKS) {\n const result = taskHandlerSchema.safeParse(values.handler.listTasksHandler)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'listTasksHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.UPDATE_TASK) {\n const result = taskHandlerSchema.safeParse(values.handler.updateTaskHandler)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'updateTaskHandler', ...issue.path],\n }),\n )\n }\n\n if (values.handler.type === HandlerType.DELETE_TASK) {\n const result = taskHandlerSchema.safeParse(values.handler.deleteTaskHandler)\n\n if (result.success) return\n\n result.error.issues.forEach((issue) =>\n ctx.addIssue({\n ...issue,\n path: ['handler', 'deleteTaskHandler', ...issue.path],\n }),\n )\n }\n}\n\nexport const baseSchema = z.object({\n openapiSpec: z.string().min(1).refine(isJSON, {\n message: 'Must be a valid JSON string.',\n }),\n handler: z.object({\n type: z.nativeEnum(HandlerType),\n requestHandler: requestHandlerSchema.nullable().optional(),\n firecrawlHandler: firecrawlHandlerSchema.nullable().optional(),\n assistantHandler: assistantHandlerSchema.nullable().optional(),\n replicateHandler: replicateHandlerSchema.nullable().optional(),\n clientToolHandler: clientToolHandlerSchema.nullable().optional(),\n createTaskHandler: taskHandlerSchema.nullable().optional(),\n listTasksHandler: taskHandlerSchema.nullable().optional(),\n updateTaskHandler: taskHandlerSchema.nullable().optional(),\n deleteTaskHandler: taskHandlerSchema.nullable().optional(),\n }),\n})\n\nexport const functionSchema = baseSchema.superRefine(superRefine)\n","import { HandlerType, type PrismaClient } from '@prisma/client'\nimport type { Assistant } from '@prisma/client'\nimport type { HandlerInput } from '@/types'\nimport { ValidationError } from '@/lib/errors'\n\nexport const handlerPrismaInput = async ({\n parsedInput,\n action,\n assistant,\n prisma,\n}: {\n parsedInput: {\n handler: HandlerInput\n }\n action: 'create' | 'update'\n assistant: Assistant\n prisma: PrismaClient\n}) => {\n if (parsedInput.handler.type === HandlerType.REQUEST) {\n if (!parsedInput.handler.requestHandler)\n throw new ValidationError('Request handler is required.')\n\n return {\n requestHandler: {\n [action]: {\n method: parsedInput.handler.requestHandler.method,\n url: parsedInput.handler.requestHandler.url,\n headers: JSON.parse(parsedInput.handler.requestHandler.headers),\n body: JSON.parse(parsedInput.handler.requestHandler.body),\n },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.FIRECRAWL) {\n if (!parsedInput.handler.firecrawlHandler)\n throw new ValidationError('Firecrawl handler is required.')\n\n return {\n firecrawlHandler: {\n [action]: {\n type: parsedInput.handler.firecrawlHandler.type,\n apiKey: parsedInput.handler.firecrawlHandler.apiKey,\n body: JSON.parse(parsedInput.handler.firecrawlHandler.body),\n },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.ASSISTANT) {\n if (!parsedInput.handler.assistantHandler)\n throw new ValidationError('Assistant handler is required.')\n\n const handlerAssistant = await prisma.assistant.findFirst({\n where: {\n id: parsedInput.handler.assistantHandler.assistantId,\n workspaceId: assistant.workspaceId,\n },\n })\n\n if (!handlerAssistant) throw new ValidationError('Assistant not found.')\n\n return {\n assistantHandler: {\n [action]: {\n assistantId: handlerAssistant.id,\n },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.REPLICATE) {\n if (!parsedInput.handler.replicateHandler)\n throw new ValidationError('Replicate handler is required.')\n\n return {\n replicateHandler: {\n [action]: {\n type: parsedInput.handler.replicateHandler.type,\n apiKey: parsedInput.handler.replicateHandler.apiKey,\n identifier: parsedInput.handler.replicateHandler.identifier,\n body: JSON.parse(parsedInput.handler.replicateHandler.body),\n },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.CLIENT_TOOL) {\n if (!parsedInput.handler.clientToolHandler)\n throw new ValidationError('Client tool handler is required.')\n\n return {\n clientToolHandler: {\n [action]: {\n type: parsedInput.handler.clientToolHandler.type,\n name: parsedInput.handler.clientToolHandler.name,\n arguments: JSON.parse(\n parsedInput.handler.clientToolHandler.arguments,\n ),\n },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.CREATE_TASK) {\n if (!parsedInput.handler.createTaskHandler)\n throw new ValidationError('Task handler is required.')\n\n const keyTemplate = parsedInput.handler.createTaskHandler.keyTemplate\n\n return {\n createTaskHandler: {\n [action]: { keyTemplate },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.LIST_TASKS) {\n if (!parsedInput.handler.listTasksHandler)\n throw new ValidationError('Task handler is required.')\n\n const keyTemplate = parsedInput.handler.listTasksHandler.keyTemplate\n\n return {\n listTasksHandler: {\n [action]: { keyTemplate },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.UPDATE_TASK) {\n if (!parsedInput.handler.updateTaskHandler)\n throw new ValidationError('Task handler is required.')\n\n const keyTemplate = parsedInput.handler.updateTaskHandler.keyTemplate\n\n return {\n updateTaskHandler: {\n [action]: { keyTemplate },\n },\n }\n } else if (parsedInput.handler.type === HandlerType.DELETE_TASK) {\n if (!parsedInput.handler.deleteTaskHandler)\n throw new ValidationError('Task handler is required.')\n\n const keyTemplate = parsedInput.handler.deleteTaskHandler.keyTemplate\n\n return {\n deleteTaskHandler: {\n [action]: { keyTemplate },\n },\n }\n } else {\n throw new ValidationError('Handler type not supported.')\n }\n}\n","import { prisma } from '@/lib/prisma'\nimport { buildDELETE, buildGET, buildOPTIONS, buildPATCH } from './buildRoute'\n\nexport const GET = buildGET({ prisma })\n\nexport const PATCH = buildPATCH({ prisma })\n\nexport const DELETE = buildDELETE({ prisma })\n\nexport const OPTIONS = buildOPTIONS()\n","import { headers } from 'next/headers'\nimport { ApiKeyType, type PrismaClient } from '@prisma/client'\nimport { NextResponse, type NextRequest } from 'next/server'\nimport { cacheHeaders } from '@/lib/cache/cacheHeaders'\nimport { getApiKey } from '@/lib/apiKeys/getApiKey'\nimport { validate } from 'uuid'\nimport { serializeApiFunction } from '@/lib/functions/serializeApiFunction'\nimport { functionSchema } from '@/lib/functions/functionSchema'\nimport { updateFunction } from '@/lib/functions/updateFunction'\n\ntype RouteProps = {\n params: Promise<{ assistantId: string; functionId: string }>\n}\n\nconst ensureIdsValid = ({\n assistantId,\n functionId,\n}: {\n assistantId: string\n functionId: string\n}) => {\n if (!validate(assistantId)) {\n return NextResponse.json({ error: 'Invalid assistant id' }, { status: 400 })\n }\n\n if (!validate(functionId)) {\n return NextResponse.json({ error: 'Invalid function id' }, { status: 400 })\n }\n\n return null\n}\n\nexport const buildGET =\n ({ prisma }: { prisma: PrismaClient }) =>\n async (_request: NextRequest, props: RouteProps) => {\n const { assistantId, functionId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n type: ApiKeyType.PRIVATE,\n authorization,\n prisma,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const validationError = ensureIdsValid({ assistantId, functionId })\n if (validationError) return validationError\n\n const fn = await prisma.function.findFirst({\n where: {\n id: functionId,\n assistant: {\n id: assistantId,\n workspaceId: privateApiKey.workspaceId,\n },\n },\n include: {\n handler: {\n include: {\n requestHandler: true,\n firecrawlHandler: true,\n replicateHandler: true,\n clientToolHandler: true,\n assistantHandler: true,\n createTaskHandler: true,\n listTasksHandler: true,\n updateTaskHandler: true,\n deleteTaskHandler: true,\n },\n },\n },\n })\n\n if (!fn) {\n return NextResponse.json({ error: 'No function found' }, { status: 400 })\n }\n\n return NextResponse.json(\n {\n function: serializeApiFunction({ fn }),\n },\n { headers: cacheHeaders },\n )\n }\n\nexport const buildPATCH =\n ({ prisma }: { prisma: PrismaClient }) =>\n async (request: NextRequest, props: RouteProps) => {\n const { assistantId, functionId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n authorization,\n type: ApiKeyType.PRIVATE,\n prisma,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const validationError = ensureIdsValid({ assistantId, functionId })\n if (validationError) return validationError\n\n const body = await request.json()\n\n const parsed = functionSchema.safeParse(body)\n\n if (!parsed.success) {\n return NextResponse.json({ error: 'Invalid payload' }, { status: 400 })\n }\n\n const fn = await prisma.function.findFirst({\n where: {\n id: functionId,\n assistant: {\n id: assistantId,\n workspaceId: privateApiKey.workspaceId,\n },\n },\n include: {\n assistant: true,\n },\n })\n\n if (!fn) {\n return NextResponse.json({ error: 'No function found' }, { status: 400 })\n }\n\n const updatedFunction = await updateFunction({\n fn,\n parsedInput: parsed.data,\n include: {\n handler: {\n include: {\n requestHandler: true,\n firecrawlHandler: true,\n replicateHandler: true,\n clientToolHandler: true,\n assistantHandler: true,\n createTaskHandler: true,\n listTasksHandler: true,\n updateTaskHandler: true,\n deleteTaskHandler: true,\n },\n },\n },\n prisma,\n })\n\n return NextResponse.json(\n {\n function: serializeApiFunction({ fn: updatedFunction }),\n },\n { headers: cacheHeaders },\n )\n }\n\nexport const buildDELETE =\n ({ prisma }: { prisma: PrismaClient }) =>\n async (_request: NextRequest, props: RouteProps) => {\n const { assistantId, functionId } = await props.params\n\n const headersList = await headers()\n const authorization = headersList.get('authorization')\n if (!authorization) {\n return NextResponse.json(\n { error: 'No authorization header found' },\n { status: 400 },\n )\n }\n\n const privateApiKey = await getApiKey({\n authorization,\n type: ApiKeyType.PRIVATE,\n prisma,\n })\n\n if (!privateApiKey) {\n return NextResponse.json({ error: 'Invalid api key' }, { status: 400 })\n }\n\n const validationError = ensureIdsValid({ assistantId, functionId })\n if (validationError) return validationError\n\n const fn = await prisma.function.findFirst({\n where: {\n id: functionId,\n assistant: {\n id: assistantId,\n workspaceId: privateApiKey.workspaceId,\n },\n },\n })\n\n if (!fn) {\n return NextResponse.json({ error: 'No function found' }, { status: 400 })\n }\n\n const deletedFunction = await prisma.function.delete({\n where: { id: fn.id },\n include: {\n handler: {\n include: {\n requestHandler: true,\n firecrawlHandler: true,\n replicateHandler: true,\n clientToolHandler: true,\n assistantHandler: true,\n createTaskHandler: true,\n listTasksHandler: true,\n updateTaskHandler: true,\n deleteTaskHandler: true,\n },\n },\n },\n })\n\n return NextResponse.json(\n {\n mcpServer: serializeApiFunction({ fn: deletedFunction }),\n },\n { headers: cacheHeaders },\n )\n }\n\nexport const buildOPTIONS = () => () =>\n NextResponse.json(\n {},\n {\n headers: cacheHeaders,\n },\n )\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/assistants/[assistantId]/functions/[functionId]/route\",\n pathname: \"/api/assistants/[assistantId]/functions/[functionId]\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/supercorp/superinterface/packages/server/src/app/api/assistants/[assistantId]/functions/[functionId]/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n let srcPage = \"/api/assistants/[assistantId]/functions/[functionId]/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isRevalidate = isIsr && !supportsDynamicResponse;\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n isRevalidate,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${req.url}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isRevalidate,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${req.url}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isRevalidate,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import type { Prisma, PrismaClient } from '@prisma/client'\nimport type { HandlerInput } from '@/types'\nimport { handlerPrismaInput } from '@/lib/handlers/handlerPrismaInput'\n\nexport async function updateFunction<\n TInclude extends Prisma.FunctionInclude,\n>(params: {\n fn: Prisma.FunctionGetPayload<{\n include: {\n assistant: true\n }\n }>\n parsedInput: { openapiSpec: string; handler: HandlerInput }\n include: TInclude\n prisma: PrismaClient\n}): Promise<Prisma.FunctionGetPayload<{ include: TInclude }>> {\n const { fn, parsedInput, include, prisma } = params\n\n return prisma.$transaction(async (tx) => {\n await tx.handler.deleteMany({\n where: { functionId: fn.id },\n })\n\n return tx.function.update({\n where: { id: fn.id },\n data: {\n openapiSpec: JSON.parse(parsedInput.openapiSpec),\n handler: {\n create: {\n type: parsedInput.handler.type,\n ...(await handlerPrismaInput({\n parsedInput,\n action: 'create',\n assistant: fn.assistant,\n prisma: tx as unknown as PrismaClient,\n })),\n },\n },\n },\n include,\n })\n })\n}\n"],"names":[],"mappings":"6jCAAO,IAAM,EAAe,CAC1B,8BAA+B,IAC/B,+BAAgC,kCAChC,+BACE,uDACJ,mDCJA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEO,IAAM,EAAY,MAAO,eAC9B,CAAa,MACb,CAAI,QACJ,CAAM,CAKP,IACC,GAAI,CAAC,EACH,OAAO,KAGT,C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