@superinterface/server 1.0.36 → 1.0.37

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 (83) 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/assistants/[assistantId]/functions/[functionId]/route.js +2 -2
  9. package/.next/server/app/api/assistants/[assistantId]/functions/[functionId]/route.js.nft.json +1 -1
  10. package/.next/server/app/api/assistants/[assistantId]/functions/route.js +2 -2
  11. package/.next/server/app/api/assistants/[assistantId]/functions/route.js.nft.json +1 -1
  12. package/.next/server/app/api/messages/route.js +3 -3
  13. package/.next/server/app/api/messages/route.js.nft.json +1 -1
  14. package/.next/server/app/api/tasks/[taskId]/route.js +2 -2
  15. package/.next/server/app/api/tasks/[taskId]/route.js.nft.json +1 -1
  16. package/.next/server/app/api/tasks/callback/route.js +5 -5
  17. package/.next/server/app/api/tasks/callback/route.js.nft.json +1 -1
  18. package/.next/server/app/api/tasks/route.js +2 -2
  19. package/.next/server/app/api/tasks/route.js.nft.json +1 -1
  20. package/.next/server/app/index.html +1 -1
  21. package/.next/server/app/index.rsc +1 -1
  22. package/.next/server/chunks/[root-of-the-server]__0a426407._.js +3 -0
  23. package/.next/server/chunks/[root-of-the-server]__0a426407._.js.map +1 -0
  24. package/.next/server/chunks/[root-of-the-server]__1a7a04d0._.js +3 -0
  25. package/.next/server/chunks/[root-of-the-server]__1a7a04d0._.js.map +1 -0
  26. package/.next/server/chunks/[root-of-the-server]__29b43490._.js +3 -3
  27. package/.next/server/chunks/[root-of-the-server]__29b43490._.js.map +1 -1
  28. package/.next/server/chunks/{[root-of-the-server]__ed6cf593._.js → [root-of-the-server]__3a25f63d._.js} +4 -4
  29. package/.next/server/chunks/[root-of-the-server]__3a25f63d._.js.map +1 -0
  30. package/.next/server/chunks/{[root-of-the-server]__13c6bd62._.js → [root-of-the-server]__4d829477._.js} +4 -4
  31. package/.next/server/chunks/[root-of-the-server]__4d829477._.js.map +1 -0
  32. package/.next/server/chunks/{[root-of-the-server]__b9a334c3._.js → [root-of-the-server]__6169c901._.js} +4 -4
  33. package/.next/server/chunks/[root-of-the-server]__6169c901._.js.map +1 -0
  34. package/.next/server/chunks/[root-of-the-server]__630959e5._.js +3 -0
  35. package/.next/server/chunks/[root-of-the-server]__630959e5._.js.map +1 -0
  36. package/.next/server/chunks/[root-of-the-server]__6317294d._.js +3 -0
  37. package/.next/server/chunks/[root-of-the-server]__6317294d._.js.map +1 -0
  38. package/.next/server/chunks/{[root-of-the-server]__72b72b9e._.js → [root-of-the-server]__a6d26a37._.js} +2 -2
  39. package/.next/server/chunks/[root-of-the-server]__a6d26a37._.js.map +1 -0
  40. package/.next/server/chunks/[root-of-the-server]__a9fab3b2._.js +3 -0
  41. package/.next/server/chunks/[root-of-the-server]__a9fab3b2._.js.map +1 -0
  42. package/.next/server/chunks/[root-of-the-server]__dd176cb5._.js +3 -3
  43. package/.next/server/chunks/[root-of-the-server]__dd176cb5._.js.map +1 -1
  44. package/.next/server/pages/404.html +1 -1
  45. package/.next/server/pages/500.html +1 -1
  46. package/.next/trace +1 -1
  47. package/dist/app/api/tasks/[taskId]/buildRoute.d.ts.map +1 -1
  48. package/dist/app/api/tasks/[taskId]/buildRoute.js +21 -0
  49. package/dist/app/api/tasks/buildRoute.d.ts.map +1 -1
  50. package/dist/app/api/tasks/buildRoute.js +18 -1
  51. package/dist/lib/errors/index.d.ts +4 -0
  52. package/dist/lib/errors/index.d.ts.map +1 -1
  53. package/dist/lib/errors/index.js +7 -1
  54. package/dist/lib/functions/handleFunction/tasks/handleCreateTask.d.ts.map +1 -1
  55. package/dist/lib/functions/handleFunction/tasks/handleCreateTask.js +27 -4
  56. package/dist/lib/functions/handleFunction/tasks/handleUpdateTask.d.ts.map +1 -1
  57. package/dist/lib/functions/handleFunction/tasks/handleUpdateTask.js +51 -7
  58. package/dist/lib/tasks/ensureTaskSchedule.d.ts +13 -0
  59. package/dist/lib/tasks/ensureTaskSchedule.d.ts.map +1 -0
  60. package/dist/lib/tasks/ensureTaskSchedule.js +15 -0
  61. package/dist/lib/tasks/getTaskScheduleConflict.d.ts +22 -0
  62. package/dist/lib/tasks/getTaskScheduleConflict.d.ts.map +1 -0
  63. package/dist/lib/tasks/getTaskScheduleConflict.js +49 -0
  64. package/package.json +5 -2
  65. package/scripts/cleanupTaskConflicts.ts +218 -0
  66. package/scripts/runTests.ts +26 -0
  67. package/.next/server/chunks/[root-of-the-server]__13c6bd62._.js.map +0 -1
  68. package/.next/server/chunks/[root-of-the-server]__25ee13bc._.js +0 -3
  69. package/.next/server/chunks/[root-of-the-server]__25ee13bc._.js.map +0 -1
  70. package/.next/server/chunks/[root-of-the-server]__29635e8e._.js +0 -3
  71. package/.next/server/chunks/[root-of-the-server]__29635e8e._.js.map +0 -1
  72. package/.next/server/chunks/[root-of-the-server]__464a4377._.js +0 -3
  73. package/.next/server/chunks/[root-of-the-server]__464a4377._.js.map +0 -1
  74. package/.next/server/chunks/[root-of-the-server]__5d09614a._.js +0 -3
  75. package/.next/server/chunks/[root-of-the-server]__5d09614a._.js.map +0 -1
  76. package/.next/server/chunks/[root-of-the-server]__72b72b9e._.js.map +0 -1
  77. package/.next/server/chunks/[root-of-the-server]__b9a334c3._.js.map +0 -1
  78. package/.next/server/chunks/[root-of-the-server]__ed6cf593._.js.map +0 -1
  79. package/.next/server/chunks/[root-of-the-server]__f845ef25._.js +0 -3
  80. package/.next/server/chunks/[root-of-the-server]__f845ef25._.js.map +0 -1
  81. /package/.next/static/{umwU4D-6dg7tl5DCOW1vq → a3KG4O2A5sJO2AvvW4J1L}/_buildManifest.js +0 -0
  82. /package/.next/static/{umwU4D-6dg7tl5DCOW1vq → a3KG4O2A5sJO2AvvW4J1L}/_clientMiddlewareManifest.json +0 -0
  83. /package/.next/static/{umwU4D-6dg7tl5DCOW1vq → a3KG4O2A5sJO2AvvW4J1L}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><!--umwU4D_6dg7tl5DCOW1vq--><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\":\"umwU4D-6dg7tl5DCOW1vq\",\"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><!--a3KG4O2A5sJO2AvvW4J1L--><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\":\"a3KG4O2A5sJO2AvvW4J1L\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/03d938d038bc30e3.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$L5\",[\"$\",\"$L6\",null,{\"promise\":\"$@7\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],null],[\"$\",\"$La\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"fallback\":null,\"children\":\"$Lc\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$d\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n5:null\n"])</script><script>self.__next_f.push([1,"7:{\"metadata\":[],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"c:\"$7:metadata\"\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/a6dad97d9634a72d.js"></script><script src="/_next/static/chunks/22bca0be24d1dbb3.js" defer=""></script><script src="/_next/static/chunks/bd1a5816a611d718.js" defer=""></script><script src="/_next/static/chunks/turbopack-3bdbb570d8566903.js" defer=""></script><script src="/_next/static/chunks/e57ec661e9850a31.js" defer=""></script><script src="/_next/static/chunks/turbopack-67ff8c1c5b1ad9a8.js" defer=""></script><script src="/_next/static/umwU4D-6dg7tl5DCOW1vq/_ssgManifest.js" defer=""></script><script src="/_next/static/umwU4D-6dg7tl5DCOW1vq/_buildManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"umwU4D-6dg7tl5DCOW1vq","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><title data-next-head="">500: Internal Server Error</title><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/a6dad97d9634a72d.js"></script><script src="/_next/static/chunks/22bca0be24d1dbb3.js" defer=""></script><script src="/_next/static/chunks/bd1a5816a611d718.js" defer=""></script><script src="/_next/static/chunks/turbopack-3bdbb570d8566903.js" defer=""></script><script src="/_next/static/chunks/e57ec661e9850a31.js" defer=""></script><script src="/_next/static/chunks/turbopack-67ff8c1c5b1ad9a8.js" defer=""></script><script src="/_next/static/a3KG4O2A5sJO2AvvW4J1L/_ssgManifest.js" defer=""></script><script src="/_next/static/a3KG4O2A5sJO2AvvW4J1L/_buildManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"a3KG4O2A5sJO2AvvW4J1L","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
package/.next/trace CHANGED
@@ -1 +1 @@
1
- [{"name":"generate-buildid","duration":130,"timestamp":488995247932,"id":4,"parentId":1,"tags":{},"startTime":1760380508895,"traceId":"727dc3e1fc02d7bf"},{"name":"load-custom-routes","duration":167,"timestamp":488995248109,"id":5,"parentId":1,"tags":{},"startTime":1760380508895,"traceId":"727dc3e1fc02d7bf"},{"name":"create-dist-dir","duration":3127,"timestamp":488995329738,"id":6,"parentId":1,"tags":{},"startTime":1760380508977,"traceId":"727dc3e1fc02d7bf"},{"name":"create-pages-mapping","duration":134,"timestamp":488995490530,"id":7,"parentId":1,"tags":{},"startTime":1760380509138,"traceId":"727dc3e1fc02d7bf"},{"name":"collect-app-files","duration":9468,"timestamp":488995490688,"id":8,"parentId":1,"tags":{},"startTime":1760380509138,"traceId":"727dc3e1fc02d7bf"},{"name":"create-app-mapping","duration":3098,"timestamp":488995500178,"id":9,"parentId":1,"tags":{},"startTime":1760380509147,"traceId":"727dc3e1fc02d7bf"},{"name":"create-app-layouts","duration":187,"timestamp":488995503296,"id":10,"parentId":1,"tags":{},"startTime":1760380509151,"traceId":"727dc3e1fc02d7bf"},{"name":"collect-default-files","duration":10558,"timestamp":488995506298,"id":12,"parentId":1,"tags":{},"startTime":1760380509154,"traceId":"727dc3e1fc02d7bf"},{"name":"generate-route-types","duration":27901,"timestamp":488995503783,"id":11,"parentId":1,"tags":{},"startTime":1760380509151,"traceId":"727dc3e1fc02d7bf"},{"name":"public-dir-conflict-check","duration":585,"timestamp":488995531788,"id":13,"parentId":1,"tags":{},"startTime":1760380509179,"traceId":"727dc3e1fc02d7bf"},{"name":"generate-routes-manifest","duration":1314,"timestamp":488995532532,"id":14,"parentId":1,"tags":{},"startTime":1760380509180,"traceId":"727dc3e1fc02d7bf"},{"name":"run-turbopack-compiler","duration":6593750,"timestamp":488995541320,"id":16,"parentId":1,"tags":{},"startTime":1760380509189,"traceId":"727dc3e1fc02d7bf"},{"name":"verify-and-lint","duration":2216495,"timestamp":489002174803,"id":19,"parentId":1,"tags":{},"startTime":1760380515822,"traceId":"727dc3e1fc02d7bf"},{"name":"verify-typescript-setup","duration":5736078,"timestamp":489002171329,"id":18,"parentId":1,"tags":{},"startTime":1760380515819,"traceId":"727dc3e1fc02d7bf"},{"name":"check-static-error-page","duration":12077,"timestamp":489007942582,"id":22,"parentId":21,"tags":{},"startTime":1760380521590,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":1819,"timestamp":489008079921,"id":23,"parentId":21,"tags":{"page":"/_app"},"startTime":1760380521727,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":1307,"timestamp":489008080443,"id":25,"parentId":21,"tags":{"page":"/_document"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":1365,"timestamp":489008080385,"id":24,"parentId":21,"tags":{"page":"/_error"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":634472,"timestamp":489008088246,"id":50,"parentId":31,"tags":{},"startTime":1760380521735,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":643268,"timestamp":489008080617,"id":31,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/initial-messages"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":635276,"timestamp":489008088832,"id":52,"parentId":33,"tags":{},"startTime":1760380521736,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":643513,"timestamp":489008080642,"id":33,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":639983,"timestamp":489008089031,"id":55,"parentId":28,"tags":{},"startTime":1760380521736,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":648637,"timestamp":489008080527,"id":28,"parentId":21,"tags":{"page":"/api/api-keys"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":650249,"timestamp":489008088912,"id":53,"parentId":42,"tags":{},"startTime":1760380521736,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":659090,"timestamp":489008080690,"id":42,"parentId":21,"tags":{"page":"/api/providers"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":675819,"timestamp":489008088793,"id":51,"parentId":30,"tags":{},"startTime":1760380521736,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":684101,"timestamp":489008080541,"id":30,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":679522,"timestamp":489008089449,"id":60,"parentId":26,"tags":{},"startTime":1760380521737,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":688568,"timestamp":489008080458,"id":26,"parentId":21,"tags":{"page":"/_not-found"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":706628,"timestamp":489008089411,"id":59,"parentId":35,"tags":{},"startTime":1760380521737,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":715453,"timestamp":489008080656,"id":35,"parentId":21,"tags":{"page":"/api/assistants"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":726642,"timestamp":489008090435,"id":63,"parentId":46,"tags":{},"startTime":1760380521738,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":736418,"timestamp":489008080710,"id":46,"parentId":21,"tags":{"page":"/api/threads/runs/submit-client-tool-outputs"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":741017,"timestamp":489008090885,"id":64,"parentId":27,"tags":{},"startTime":1760380521738,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":752166,"timestamp":489008080511,"id":27,"parentId":21,"tags":{"page":"/api/api-keys/[apiKeyId]"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":765362,"timestamp":489008091173,"id":65,"parentId":29,"tags":{},"startTime":1760380521738,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":776061,"timestamp":489008080535,"id":29,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions/[functionId]"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":776195,"timestamp":489008088948,"id":54,"parentId":45,"tags":{},"startTime":1760380521736,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":784489,"timestamp":489008080705,"id":45,"parentId":21,"tags":{"page":"/api/tasks"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":783552,"timestamp":489008091190,"id":66,"parentId":32,"tags":{},"startTime":1760380521738,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":794164,"timestamp":489008080630,"id":32,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers/[mcpServerId]"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":788417,"timestamp":489008091203,"id":68,"parentId":41,"tags":{},"startTime":1760380521738,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":798981,"timestamp":489008080686,"id":41,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":859690,"timestamp":489008091197,"id":67,"parentId":34,"tags":{},"startTime":1760380521738,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":870289,"timestamp":489008080650,"id":34,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":872919,"timestamp":489008091342,"id":70,"parentId":47,"tags":{},"startTime":1760380521739,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":883576,"timestamp":489008080715,"id":47,"parentId":21,"tags":{"page":"/api/workspaces/[workspaceId]"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":922229,"timestamp":489008091459,"id":71,"parentId":48,"tags":{},"startTime":1760380521739,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":933020,"timestamp":489008080719,"id":48,"parentId":21,"tags":{"page":"/api/workspaces"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":946599,"timestamp":489008091209,"id":69,"parentId":43,"tags":{},"startTime":1760380521738,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":957152,"timestamp":489008080695,"id":43,"parentId":21,"tags":{"page":"/api/tasks/[taskId]"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":1004454,"timestamp":489008089340,"id":57,"parentId":39,"tags":{},"startTime":1760380521737,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":1013154,"timestamp":489008080676,"id":39,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/assistants"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":1000520,"timestamp":489008096087,"id":73,"parentId":49,"tags":{},"startTime":1760380521743,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":1015928,"timestamp":489008080724,"id":49,"parentId":21,"tags":{"page":"/"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":1007359,"timestamp":489008089348,"id":58,"parentId":40,"tags":{},"startTime":1760380521737,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":1016049,"timestamp":489008080681,"id":40,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/models"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":1077985,"timestamp":489008089328,"id":56,"parentId":36,"tags":{},"startTime":1760380521737,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":1086683,"timestamp":489008080661,"id":36,"parentId":21,"tags":{"page":"/api/files/[fileId]/contents"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":1114320,"timestamp":489008090144,"id":62,"parentId":38,"tags":{},"startTime":1760380521737,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":1123854,"timestamp":489008080671,"id":38,"parentId":21,"tags":{"page":"/api/messages"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":1127173,"timestamp":489008089493,"id":61,"parentId":37,"tags":{},"startTime":1760380521737,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":1136030,"timestamp":489008080666,"id":37,"parentId":21,"tags":{"page":"/api/files"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"is-page-static","duration":1184931,"timestamp":489008093902,"id":72,"parentId":44,"tags":{},"startTime":1760380521742,"traceId":"727dc3e1fc02d7bf"},{"name":"check-page","duration":1198157,"timestamp":489008080700,"id":44,"parentId":21,"tags":{"page":"/api/tasks/callback"},"startTime":1760380521728,"traceId":"727dc3e1fc02d7bf"},{"name":"static-check","duration":1336890,"timestamp":489007941991,"id":21,"parentId":1,"tags":{},"startTime":1760380521589,"traceId":"727dc3e1fc02d7bf"},{"name":"generate-required-server-files","duration":242,"timestamp":489009279536,"id":75,"parentId":1,"tags":{},"startTime":1760380522927,"traceId":"727dc3e1fc02d7bf"},{"name":"write-routes-manifest","duration":1202,"timestamp":489009324083,"id":77,"parentId":1,"tags":{},"startTime":1760380522971,"traceId":"727dc3e1fc02d7bf"},{"name":"load-dotenv","duration":101,"timestamp":489009388568,"id":80,"parentId":79,"tags":{},"startTime":1760380523036,"traceId":"727dc3e1fc02d7bf"},{"name":"run-export-path-map","duration":321,"timestamp":489009567090,"id":81,"parentId":79,"tags":{},"startTime":1760380523214,"traceId":"727dc3e1fc02d7bf"},{"name":"next-export","duration":1122973,"timestamp":489009387832,"id":79,"parentId":1,"tags":{},"startTime":1760380523035,"traceId":"727dc3e1fc02d7bf"},{"name":"move-exported-app-not-found-","duration":2337,"timestamp":489010512011,"id":82,"parentId":78,"tags":{},"startTime":1760380524159,"traceId":"727dc3e1fc02d7bf"},{"name":"move-exported-page","duration":26859,"timestamp":489010514459,"id":83,"parentId":78,"tags":{},"startTime":1760380524162,"traceId":"727dc3e1fc02d7bf"},{"name":"static-generation","duration":1215468,"timestamp":489009371563,"id":78,"parentId":1,"tags":{},"startTime":1760380523019,"traceId":"727dc3e1fc02d7bf"},{"name":"write-routes-manifest","duration":436163,"timestamp":489010587306,"id":84,"parentId":1,"tags":{},"startTime":1760380524235,"traceId":"727dc3e1fc02d7bf"},{"name":"node-file-trace-build","duration":4921194,"timestamp":489009285043,"id":76,"parentId":1,"tags":{"isTurbotrace":"false"},"startTime":1760380522932,"traceId":"727dc3e1fc02d7bf"},{"name":"apply-include-excludes","duration":343,"timestamp":489014206279,"id":85,"parentId":1,"tags":{},"startTime":1760380527853,"traceId":"727dc3e1fc02d7bf"},{"name":"print-tree-view","duration":2273,"timestamp":489014207044,"id":86,"parentId":1,"tags":{},"startTime":1760380527854,"traceId":"727dc3e1fc02d7bf"},{"name":"telemetry-flush","duration":28,"timestamp":489014209326,"id":87,"parentId":1,"tags":{},"startTime":1760380527856,"traceId":"727dc3e1fc02d7bf"},{"name":"next-build","duration":19333651,"timestamp":488994875707,"id":1,"tags":{"buildMode":"default","isTurboBuild":"true","version":"15.5.4","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1760380508523,"traceId":"727dc3e1fc02d7bf"}]
1
+ [{"name":"generate-buildid","duration":124,"timestamp":560760140202,"id":4,"parentId":1,"tags":{},"startTime":1760452274038,"traceId":"6f58f81ae21fde51"},{"name":"load-custom-routes","duration":160,"timestamp":560760140374,"id":5,"parentId":1,"tags":{},"startTime":1760452274038,"traceId":"6f58f81ae21fde51"},{"name":"create-dist-dir","duration":679,"timestamp":560760186080,"id":6,"parentId":1,"tags":{},"startTime":1760452274084,"traceId":"6f58f81ae21fde51"},{"name":"create-pages-mapping","duration":127,"timestamp":560760259606,"id":7,"parentId":1,"tags":{},"startTime":1760452274157,"traceId":"6f58f81ae21fde51"},{"name":"collect-app-files","duration":2735,"timestamp":560760259755,"id":8,"parentId":1,"tags":{},"startTime":1760452274158,"traceId":"6f58f81ae21fde51"},{"name":"create-app-mapping","duration":889,"timestamp":560760262506,"id":9,"parentId":1,"tags":{},"startTime":1760452274160,"traceId":"6f58f81ae21fde51"},{"name":"create-app-layouts","duration":199,"timestamp":560760263416,"id":10,"parentId":1,"tags":{},"startTime":1760452274161,"traceId":"6f58f81ae21fde51"},{"name":"collect-default-files","duration":1708,"timestamp":560760264762,"id":12,"parentId":1,"tags":{},"startTime":1760452274163,"traceId":"6f58f81ae21fde51"},{"name":"generate-route-types","duration":13761,"timestamp":560760263912,"id":11,"parentId":1,"tags":{},"startTime":1760452274162,"traceId":"6f58f81ae21fde51"},{"name":"public-dir-conflict-check","duration":356,"timestamp":560760277738,"id":13,"parentId":1,"tags":{},"startTime":1760452274176,"traceId":"6f58f81ae21fde51"},{"name":"generate-routes-manifest","duration":1405,"timestamp":560760278216,"id":14,"parentId":1,"tags":{},"startTime":1760452274176,"traceId":"6f58f81ae21fde51"},{"name":"run-turbopack-compiler","duration":10712781,"timestamp":560760282806,"id":16,"parentId":1,"tags":{},"startTime":1760452274181,"traceId":"6f58f81ae21fde51"},{"name":"verify-and-lint","duration":2293963,"timestamp":560771038660,"id":19,"parentId":1,"tags":{},"startTime":1760452284937,"traceId":"6f58f81ae21fde51"},{"name":"verify-typescript-setup","duration":7871455,"timestamp":560771034608,"id":18,"parentId":1,"tags":{},"startTime":1760452284933,"traceId":"6f58f81ae21fde51"},{"name":"check-static-error-page","duration":7206,"timestamp":560778925402,"id":22,"parentId":21,"tags":{},"startTime":1760452292823,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":2039,"timestamp":560779036009,"id":23,"parentId":21,"tags":{"page":"/_app"},"startTime":1760452292934,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":1344,"timestamp":560779036715,"id":25,"parentId":21,"tags":{"page":"/_document"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":1415,"timestamp":560779036645,"id":24,"parentId":21,"tags":{"page":"/_error"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":389986,"timestamp":560779043979,"id":55,"parentId":35,"tags":{},"startTime":1760452292942,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":397077,"timestamp":560779036935,"id":35,"parentId":21,"tags":{"page":"/api/assistants"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":395445,"timestamp":560779043821,"id":53,"parentId":42,"tags":{},"startTime":1760452292942,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":402361,"timestamp":560779036978,"id":42,"parentId":21,"tags":{"page":"/api/providers"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":399519,"timestamp":560779043861,"id":54,"parentId":45,"tags":{},"startTime":1760452292942,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":406407,"timestamp":560779036996,"id":45,"parentId":21,"tags":{"page":"/api/tasks"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":434024,"timestamp":560779043715,"id":52,"parentId":33,"tags":{},"startTime":1760452292942,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":440854,"timestamp":560779036921,"id":33,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":434250,"timestamp":560779043564,"id":51,"parentId":30,"tags":{},"startTime":1760452292941,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":441002,"timestamp":560779036820,"id":30,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":435429,"timestamp":560779042433,"id":50,"parentId":31,"tags":{},"startTime":1760452292940,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":440974,"timestamp":560779036893,"id":31,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/initial-messages"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":435611,"timestamp":560779056587,"id":62,"parentId":48,"tags":{},"startTime":1760452292955,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":455209,"timestamp":560779037013,"id":48,"parentId":21,"tags":{"page":"/api/workspaces"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":439672,"timestamp":560779056716,"id":63,"parentId":47,"tags":{},"startTime":1760452292955,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":459434,"timestamp":560779037008,"id":47,"parentId":21,"tags":{"page":"/api/workspaces/[workspaceId]"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":458968,"timestamp":560779045080,"id":60,"parentId":46,"tags":{},"startTime":1760452292943,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":467072,"timestamp":560779037003,"id":46,"parentId":21,"tags":{"page":"/api/threads/runs/submit-client-tool-outputs"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":458473,"timestamp":560779060360,"id":65,"parentId":27,"tags":{},"startTime":1760452292958,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":482070,"timestamp":560779036788,"id":27,"parentId":21,"tags":{"page":"/api/api-keys/[apiKeyId]"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":475607,"timestamp":560779060056,"id":64,"parentId":26,"tags":{},"startTime":1760452292958,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":499013,"timestamp":560779036730,"id":26,"parentId":21,"tags":{"page":"/_not-found"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":486814,"timestamp":560779060367,"id":66,"parentId":29,"tags":{},"startTime":1760452292958,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":510396,"timestamp":560779036813,"id":29,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/functions/[functionId]"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":489620,"timestamp":560779060372,"id":68,"parentId":32,"tags":{},"startTime":1760452292958,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":513102,"timestamp":560779036907,"id":32,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]/mcp-servers/[mcpServerId]"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":500269,"timestamp":560779060370,"id":67,"parentId":34,"tags":{},"startTime":1760452292958,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":523738,"timestamp":560779036928,"id":34,"parentId":21,"tags":{"page":"/api/assistants/[assistantId]"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":505901,"timestamp":560779060376,"id":70,"parentId":41,"tags":{},"startTime":1760452292958,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":529331,"timestamp":560779036973,"id":41,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":510853,"timestamp":560779060426,"id":71,"parentId":28,"tags":{},"startTime":1760452292958,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":534854,"timestamp":560779036804,"id":28,"parentId":21,"tags":{"page":"/api/api-keys"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":536964,"timestamp":560779060374,"id":69,"parentId":43,"tags":{},"startTime":1760452292958,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":560385,"timestamp":560779036984,"id":43,"parentId":21,"tags":{"page":"/api/tasks/[taskId]"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":545362,"timestamp":560779086687,"id":73,"parentId":49,"tags":{},"startTime":1760452292985,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":595057,"timestamp":560779037018,"id":49,"parentId":21,"tags":{"page":"/"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":682340,"timestamp":560779045003,"id":59,"parentId":40,"tags":{},"startTime":1760452292943,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":690408,"timestamp":560779036965,"id":40,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/models"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":693092,"timestamp":560779044039,"id":56,"parentId":37,"tags":{},"startTime":1760452292942,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":700214,"timestamp":560779036946,"id":37,"parentId":21,"tags":{"page":"/api/files"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":703500,"timestamp":560779044993,"id":58,"parentId":39,"tags":{},"startTime":1760452292943,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":711562,"timestamp":560779036959,"id":39,"parentId":21,"tags":{"page":"/api/providers/[modelProviderId]/assistants"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":734101,"timestamp":560779044972,"id":57,"parentId":36,"tags":{},"startTime":1760452292943,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":742161,"timestamp":560779036940,"id":36,"parentId":21,"tags":{"page":"/api/files/[fileId]/contents"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":747087,"timestamp":560779055680,"id":61,"parentId":38,"tags":{},"startTime":1760452292954,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":765843,"timestamp":560779036951,"id":38,"parentId":21,"tags":{"page":"/api/messages"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"is-page-static","duration":762878,"timestamp":560779078251,"id":72,"parentId":44,"tags":{},"startTime":1760452292976,"traceId":"6f58f81ae21fde51"},{"name":"check-page","duration":804165,"timestamp":560779036991,"id":44,"parentId":21,"tags":{"page":"/api/tasks/callback"},"startTime":1760452292935,"traceId":"6f58f81ae21fde51"},{"name":"static-check","duration":919830,"timestamp":560778921354,"id":21,"parentId":1,"tags":{},"startTime":1760452292819,"traceId":"6f58f81ae21fde51"},{"name":"generate-required-server-files","duration":759,"timestamp":560779841524,"id":75,"parentId":1,"tags":{},"startTime":1760452293739,"traceId":"6f58f81ae21fde51"},{"name":"write-routes-manifest","duration":3282,"timestamp":560779859213,"id":77,"parentId":1,"tags":{},"startTime":1760452293757,"traceId":"6f58f81ae21fde51"},{"name":"load-dotenv","duration":15,"timestamp":560780058984,"id":80,"parentId":79,"tags":{},"startTime":1760452293957,"traceId":"6f58f81ae21fde51"},{"name":"run-export-path-map","duration":273,"timestamp":560780077819,"id":81,"parentId":79,"tags":{},"startTime":1760452293976,"traceId":"6f58f81ae21fde51"},{"name":"next-export","duration":704169,"timestamp":560780058472,"id":79,"parentId":1,"tags":{},"startTime":1760452293956,"traceId":"6f58f81ae21fde51"},{"name":"move-exported-app-not-found-","duration":2743,"timestamp":560780763718,"id":82,"parentId":78,"tags":{},"startTime":1760452294662,"traceId":"6f58f81ae21fde51"},{"name":"move-exported-page","duration":6303,"timestamp":560780766568,"id":83,"parentId":78,"tags":{},"startTime":1760452294665,"traceId":"6f58f81ae21fde51"},{"name":"static-generation","duration":765657,"timestamp":560780052702,"id":78,"parentId":1,"tags":{},"startTime":1760452293951,"traceId":"6f58f81ae21fde51"},{"name":"write-routes-manifest","duration":6974,"timestamp":560780818573,"id":84,"parentId":1,"tags":{},"startTime":1760452294717,"traceId":"6f58f81ae21fde51"},{"name":"node-file-trace-build","duration":4545522,"timestamp":560779854987,"id":76,"parentId":1,"tags":{"isTurbotrace":"false"},"startTime":1760452293753,"traceId":"6f58f81ae21fde51"},{"name":"apply-include-excludes","duration":355,"timestamp":560784400583,"id":85,"parentId":1,"tags":{},"startTime":1760452298299,"traceId":"6f58f81ae21fde51"},{"name":"print-tree-view","duration":3200,"timestamp":560784401624,"id":86,"parentId":1,"tags":{},"startTime":1760452298300,"traceId":"6f58f81ae21fde51"},{"name":"telemetry-flush","duration":80,"timestamp":560784404838,"id":87,"parentId":1,"tags":{},"startTime":1760452298303,"traceId":"6f58f81ae21fde51"},{"name":"next-build","duration":24688403,"timestamp":560759716522,"id":1,"tags":{"buildMode":"default","isTurboBuild":"true","version":"15.5.4","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1760452273614,"traceId":"6f58f81ae21fde51"}]
@@ -1 +1 @@
1
- {"version":3,"file":"buildRoute.d.ts","sourceRoot":"","sources":["../../../../../src/app/api/tasks/[taskId]/buildRoute.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAiB5D,KAAK,UAAU,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAA;AA4CzD,eAAO,MAAM,QAAQ,GAClB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU,mCAyB9C,CAAA;AAEH,eAAO,MAAM,UAAU,GACpB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW,EAAE,OAAO,UAAU,mCAwD7C,CAAA;AAEH,eAAO,MAAM,WAAW,GACrB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU,mCA6B9C,CAAA;AAEH,eAAO,MAAM,YAAY,8BAMtB,CAAA"}
1
+ {"version":3,"file":"buildRoute.d.ts","sourceRoot":"","sources":["../../../../../src/app/api/tasks/[taskId]/buildRoute.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAmB5D,KAAK,UAAU,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAA;AA4CzD,eAAO,MAAM,QAAQ,GAClB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU,mCAyB9C,CAAA;AAEH,eAAO,MAAM,UAAU,GACpB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW,EAAE,OAAO,UAAU,mCA4E7C,CAAA;AAEH,eAAO,MAAM,WAAW,GACrB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,UAAU,WAAW,EAAE,OAAO,UAAU,mCA6B9C,CAAA;AAEH,eAAO,MAAM,YAAY,8BAMtB,CAAA"}
@@ -9,6 +9,8 @@ import { validateSchedule } from '../../../../lib/tasks/validateSchedule';
9
9
  import { getApiKey } from '../../../../lib/apiKeys/getApiKey';
10
10
  import { scheduleTask } from '../../../../lib/tasks/scheduleTask';
11
11
  import { cancelScheduledTask } from '../../../../lib/tasks/cancelScheduledTask';
12
+ import { ensureTaskSchedule } from '../../../../lib/tasks/ensureTaskSchedule';
13
+ import { TaskScheduleConflictError } from '../../../../lib/errors';
12
14
  const updateTaskSchema = z.object({
13
15
  title: z.string().optional(),
14
16
  message: z.string().optional(),
@@ -61,6 +63,7 @@ export const buildGET = ({ prisma }) => async (_request, props) => {
61
63
  return NextResponse.json({ task: serializeTask({ task }) }, { headers: cacheHeaders });
62
64
  };
63
65
  export const buildPATCH = ({ prisma }) => async (request, props) => {
66
+ var _a, _b;
64
67
  const { taskId } = await props.params;
65
68
  const authorized = await authorize({ prisma });
66
69
  if (authorized instanceof NextResponse)
@@ -91,6 +94,24 @@ export const buildPATCH = ({ prisma }) => async (request, props) => {
91
94
  : {})), (parsed.data.schedule !== undefined
92
95
  ? { schedule: parsed.data.schedule }
93
96
  : {})), (parsed.data.key !== undefined ? { key: parsed.data.key } : {}));
97
+ const keyToUse = (_a = parsed.data.key) !== null && _a !== void 0 ? _a : existingTask.key;
98
+ const scheduleToUse = (_b = parsed.data.schedule) !== null && _b !== void 0 ? _b : existingTask.schedule;
99
+ try {
100
+ await ensureTaskSchedule({
101
+ prisma,
102
+ threadId: existingTask.threadId,
103
+ key: keyToUse,
104
+ schedule: scheduleToUse,
105
+ excludeTaskId: existingTask.id,
106
+ });
107
+ }
108
+ catch (error) {
109
+ if (error instanceof TaskScheduleConflictError) {
110
+ return NextResponse.json({ error: error.message }, { status: 400 });
111
+ }
112
+ throw error;
113
+ }
114
+ await cancelScheduledTask({ task: existingTask });
94
115
  const task = await prisma.task.update({
95
116
  where: { id: existingTask.id },
96
117
  data: updateData,
@@ -1 +1 @@
1
- {"version":3,"file":"buildRoute.d.ts","sourceRoot":"","sources":["../../../../src/app/api/tasks/buildRoute.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAQ5D,eAAO,MAAM,QAAQ,GAClB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW;;;;;;;;;;;;;GAoC1B,CAAA;AAEH,eAAO,MAAM,SAAS,GACnB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW;;;;;;;;;;;;;GAiE1B,CAAA;AAEH,eAAO,MAAM,YAAY,8BAMtB,CAAA"}
1
+ {"version":3,"file":"buildRoute.d.ts","sourceRoot":"","sources":["../../../../src/app/api/tasks/buildRoute.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAU5D,eAAO,MAAM,QAAQ,GAClB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW;;;;;;;;;;;;;GAoC1B,CAAA;AAEH,eAAO,MAAM,SAAS,GACnB,YAAY;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,MAC9B,SAAS,WAAW;;;;;;;;;;;;;GAiF1B,CAAA;AAEH,eAAO,MAAM,YAAY,8BAMtB,CAAA"}
@@ -7,6 +7,8 @@ import { serializeTask } from '../../../lib/tasks/serializeTask';
7
7
  import { validateSchedule } from '../../../lib/tasks/validateSchedule';
8
8
  import { getApiKey } from '../../../lib/apiKeys/getApiKey';
9
9
  import { scheduleTask } from '../../../lib/tasks/scheduleTask';
10
+ import { ensureTaskSchedule } from '../../../lib/tasks/ensureTaskSchedule';
11
+ import { TaskScheduleConflictError } from '../../../lib/errors';
10
12
  export const buildGET = ({ prisma }) => async (request) => {
11
13
  const headersList = await headers();
12
14
  const authorization = headersList.get('authorization');
@@ -64,6 +66,21 @@ export const buildPOST = ({ prisma }) => async (request) => {
64
66
  if (!thread) {
65
67
  return NextResponse.json({ error: 'Thread not found' }, { status: 400 });
66
68
  }
69
+ const key = (_a = parsed.data.key) !== null && _a !== void 0 ? _a : '';
70
+ try {
71
+ await ensureTaskSchedule({
72
+ prisma,
73
+ threadId: thread.id,
74
+ key,
75
+ schedule,
76
+ });
77
+ }
78
+ catch (error) {
79
+ if (error instanceof TaskScheduleConflictError) {
80
+ return NextResponse.json({ error: error.message }, { status: 400 });
81
+ }
82
+ throw error;
83
+ }
67
84
  const task = await prisma.task.create({
68
85
  data: {
69
86
  title,
@@ -72,7 +89,7 @@ export const buildPOST = ({ prisma }) => async (request) => {
72
89
  thread: {
73
90
  connect: { id: thread.id },
74
91
  },
75
- key: (_a = parsed.data.key) !== null && _a !== void 0 ? _a : '',
92
+ key,
76
93
  },
77
94
  });
78
95
  await scheduleTask({ task, prisma });
@@ -2,5 +2,9 @@ export declare class ValidationError extends Error {
2
2
  static defaultMessage: string;
3
3
  constructor(message?: string);
4
4
  }
5
+ export declare class TaskScheduleConflictError extends ValidationError {
6
+ static defaultMessage: string;
7
+ constructor(message?: string);
8
+ }
5
9
  export declare const publicErrors: (typeof ValidationError)[];
6
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/errors/index.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAgB,SAAQ,KAAK;IACxC,MAAM,CAAC,cAAc,SAAuB;gBAEhC,OAAO,GAAE,MAAuC;CAI7D;AAED,eAAO,MAAM,YAAY,4BAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/errors/index.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAgB,SAAQ,KAAK;IACxC,MAAM,CAAC,cAAc,SAAuB;gBAEhC,OAAO,GAAE,MAAuC;CAI7D;AAED,qBAAa,yBAA0B,SAAQ,eAAe;IAC5D,MAAM,CAAC,cAAc,SAC0D;gBAEnE,OAAO,GAAE,MAAiD;CAGvE;AAED,eAAO,MAAM,YAAY,4BAA+C,CAAA"}
@@ -5,4 +5,10 @@ export class ValidationError extends Error {
5
5
  }
6
6
  }
7
7
  ValidationError.defaultMessage = 'Validation failed.';
8
- export const publicErrors = [ValidationError];
8
+ export class TaskScheduleConflictError extends ValidationError {
9
+ constructor(message = TaskScheduleConflictError.defaultMessage) {
10
+ super(message);
11
+ }
12
+ }
13
+ TaskScheduleConflictError.defaultMessage = 'Tasks sharing a key and thread must be scheduled at least 15 minutes apart.';
14
+ export const publicErrors = [ValidationError, TaskScheduleConflictError];
@@ -1 +1 @@
1
- {"version":3,"file":"handleCreateTask.d.ts","sourceRoot":"","sources":["../../../../../src/lib/functions/handleFunction/tasks/handleCreateTask.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,MAAM,EACN,YAAY,EACb,MAAM,gBAAgB,CAAA;AAQvB,eAAO,MAAM,gBAAgB,GAAU,uDAMpC;IACD,WAAW,EAAE,iBAAiB,CAAA;IAC9B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAA;IACjE,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,YAAY,CAAA;CACrB;;;EAsCA,CAAA"}
1
+ {"version":3,"file":"handleCreateTask.d.ts","sourceRoot":"","sources":["../../../../../src/lib/functions/handleFunction/tasks/handleCreateTask.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,MAAM,EACN,YAAY,EACb,MAAM,gBAAgB,CAAA;AAUvB,eAAO,MAAM,gBAAgB,GAAU,uDAMpC;IACD,WAAW,EAAE,iBAAiB,CAAA;IAC9B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAA;IACjE,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,YAAY,CAAA;CACrB;;;EA6DA,CAAA"}
@@ -4,13 +4,17 @@ import { createTaskToolSchema } from '../../../../lib/tasks/schemas';
4
4
  import { parseTaskToolArgs } from '../../../../lib/tasks/parseTaskToolArgs';
5
5
  import { getTaskToolKey } from '../../../../lib/tasks/getTaskToolKey';
6
6
  import { scheduleTask } from '../../../../lib/tasks/scheduleTask';
7
+ import { ensureTaskSchedule } from '../../../../lib/tasks/ensureTaskSchedule';
8
+ import { TaskScheduleConflictError } from '../../../../lib/errors';
7
9
  export const handleCreateTask = async ({ taskHandler, toolCall, assistant, thread, prisma, }) => {
8
10
  const parsedArgs = parseTaskToolArgs({ toolCall, assistant, thread, prisma });
9
- if (!parsedArgs.ok)
11
+ if (!parsedArgs.ok) {
10
12
  return { tool_call_id: toolCall.id, output: parsedArgs.error };
13
+ }
11
14
  const check = createTaskToolSchema.safeParse(parsedArgs.args);
12
- if (!check.success)
15
+ if (!check.success) {
13
16
  return { tool_call_id: toolCall.id, output: check.error.toString() };
17
+ }
14
18
  const args = check.data;
15
19
  const { ok, key, error } = await getTaskToolKey({
16
20
  thread,
@@ -18,18 +22,37 @@ export const handleCreateTask = async ({ taskHandler, toolCall, assistant, threa
18
22
  keyTemplate: taskHandler.keyTemplate,
19
23
  prisma,
20
24
  });
21
- if (!ok)
25
+ if (!ok) {
22
26
  return { tool_call_id: toolCall.id, output: error };
27
+ }
23
28
  if (!validateSchedule(args.schedule)) {
24
29
  return { tool_call_id: toolCall.id, output: 'Invalid schedule.' };
25
30
  }
31
+ const taskKey = key !== null && key !== void 0 ? key : '';
32
+ try {
33
+ await ensureTaskSchedule({
34
+ prisma,
35
+ threadId: thread.id,
36
+ key: taskKey,
37
+ schedule: args.schedule,
38
+ });
39
+ }
40
+ catch (error) {
41
+ if (error instanceof TaskScheduleConflictError) {
42
+ return {
43
+ tool_call_id: toolCall.id,
44
+ output: error.message,
45
+ };
46
+ }
47
+ throw error;
48
+ }
26
49
  const task = await prisma.task.create({
27
50
  data: {
28
51
  title: args.title,
29
52
  message: args.message,
30
53
  schedule: args.schedule,
31
54
  threadId: thread.id,
32
- key: key !== null && key !== void 0 ? key : '',
55
+ key: taskKey,
33
56
  },
34
57
  });
35
58
  await scheduleTask({ task, prisma });
@@ -1 +1 @@
1
- {"version":3,"file":"handleUpdateTask.d.ts","sourceRoot":"","sources":["../../../../../src/lib/functions/handleFunction/tasks/handleUpdateTask.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,MAAM,EACN,YAAY,EACb,MAAM,gBAAgB,CAAA;AAQvB,eAAO,MAAM,gBAAgB,GAAU,uDAMpC;IACD,WAAW,EAAE,iBAAiB,CAAA;IAC9B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAA;IACjE,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,YAAY,CAAA;CACrB;;;EAkDA,CAAA"}
1
+ {"version":3,"file":"handleUpdateTask.d.ts","sourceRoot":"","sources":["../../../../../src/lib/functions/handleFunction/tasks/handleUpdateTask.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAC3B,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,MAAM,EACN,YAAY,EACb,MAAM,gBAAgB,CAAA;AAWvB,eAAO,MAAM,gBAAgB,GAAU,uDAMpC;IACD,WAAW,EAAE,iBAAiB,CAAA;IAC9B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAA;IACjE,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,YAAY,CAAA;CACrB;;;EAmGA,CAAA"}
@@ -4,14 +4,19 @@ import { updateTaskSchema } from '../../../../lib/tasks/schemas';
4
4
  import { parseTaskToolArgs } from '../../../../lib/tasks/parseTaskToolArgs';
5
5
  import { getTaskToolKey } from '../../../../lib/tasks/getTaskToolKey';
6
6
  import { scheduleTask } from '../../../../lib/tasks/scheduleTask';
7
+ import { cancelScheduledTask } from '../../../../lib/tasks/cancelScheduledTask';
8
+ import { ensureTaskSchedule } from '../../../../lib/tasks/ensureTaskSchedule';
9
+ import { TaskScheduleConflictError } from '../../../../lib/errors';
7
10
  export const handleUpdateTask = async ({ taskHandler, toolCall, assistant, thread, prisma, }) => {
8
- var _a;
11
+ var _a, _b, _c, _d;
9
12
  const parsedArgs = parseTaskToolArgs({ toolCall, assistant, thread, prisma });
10
- if (!parsedArgs.ok)
13
+ if (!parsedArgs.ok) {
11
14
  return { tool_call_id: toolCall.id, output: parsedArgs.error };
15
+ }
12
16
  const check = updateTaskSchema.safeParse(parsedArgs.args);
13
- if (!check.success)
17
+ if (!check.success) {
14
18
  return { tool_call_id: toolCall.id, output: check.error.toString() };
19
+ }
15
20
  const args = check.data;
16
21
  const { ok, key, error } = await getTaskToolKey({
17
22
  thread,
@@ -19,22 +24,61 @@ export const handleUpdateTask = async ({ taskHandler, toolCall, assistant, threa
19
24
  keyTemplate: taskHandler.keyTemplate,
20
25
  prisma,
21
26
  });
22
- if (!ok)
27
+ if (!ok) {
23
28
  return { tool_call_id: toolCall.id, output: error };
29
+ }
24
30
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
31
  const updateData = {};
26
- if (args.title !== undefined)
32
+ if (args.title !== undefined) {
27
33
  updateData.title = args.title;
28
- if (args.message !== undefined)
34
+ }
35
+ if (args.message !== undefined) {
29
36
  updateData.message = args.message;
37
+ }
30
38
  if (args.schedule !== undefined) {
31
39
  if (!validateSchedule(args.schedule)) {
32
40
  return { tool_call_id: toolCall.id, output: 'Invalid schedule.' };
33
41
  }
34
42
  updateData.schedule = args.schedule;
35
43
  }
36
- if (args.key !== undefined)
44
+ if (args.key !== undefined) {
37
45
  updateData.key = (_a = args.key) !== null && _a !== void 0 ? _a : '';
46
+ }
47
+ const existingTask = await prisma.task.findFirst({
48
+ where: {
49
+ id: args.taskId,
50
+ key,
51
+ thread: {
52
+ assistant: {
53
+ workspaceId: assistant.workspaceId,
54
+ },
55
+ },
56
+ },
57
+ });
58
+ if (!existingTask) {
59
+ return { tool_call_id: toolCall.id, output: 'Task not found.' };
60
+ }
61
+ const finalKey = (_c = (_b = args.key) !== null && _b !== void 0 ? _b : existingTask.key) !== null && _c !== void 0 ? _c : '';
62
+ const finalSchedule = (_d = args.schedule) !== null && _d !== void 0 ? _d : existingTask.schedule;
63
+ try {
64
+ await ensureTaskSchedule({
65
+ prisma,
66
+ threadId: existingTask.threadId,
67
+ key: finalKey,
68
+ schedule: finalSchedule,
69
+ excludeTaskId: existingTask.id,
70
+ });
71
+ }
72
+ catch (error) {
73
+ if (error instanceof TaskScheduleConflictError) {
74
+ return {
75
+ tool_call_id: toolCall.id,
76
+ output: error.message,
77
+ };
78
+ }
79
+ throw error;
80
+ }
81
+ await cancelScheduledTask({ task: existingTask });
38
82
  const task = await prisma.task.update({
39
83
  where: {
40
84
  id: args.taskId,
@@ -0,0 +1,13 @@
1
+ import type { PrismaClient } from '@prisma/client';
2
+ import { TaskScheduleConflictStatus } from './getTaskScheduleConflict';
3
+ export declare const ensureTaskSchedule: ({ prisma, threadId, key, schedule, excludeTaskId, }: {
4
+ prisma: PrismaClient;
5
+ threadId: string;
6
+ key: string;
7
+ schedule: PrismaJson.TaskSchedule | null | undefined;
8
+ excludeTaskId?: string;
9
+ }) => Promise<{
10
+ status: TaskScheduleConflictStatus.NONE;
11
+ conflictingTaskId?: undefined;
12
+ }>;
13
+ //# sourceMappingURL=ensureTaskSchedule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensureTaskSchedule.d.ts","sourceRoot":"","sources":["../../../src/lib/tasks/ensureTaskSchedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,EAEL,0BAA0B,EAC3B,MAAM,2BAA2B,CAAA;AAElC,eAAO,MAAM,kBAAkB,GAAU,qDAMtC;IACD,MAAM,EAAE,YAAY,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,UAAU,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,CAAA;IACpD,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;;;EAcA,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { TaskScheduleConflictError } from '../../lib/errors';
2
+ import { getTaskScheduleConflict, TaskScheduleConflictStatus, } from './getTaskScheduleConflict';
3
+ export const ensureTaskSchedule = async ({ prisma, threadId, key, schedule, excludeTaskId, }) => {
4
+ const taskScheduleConflict = await getTaskScheduleConflict({
5
+ prisma,
6
+ threadId,
7
+ key,
8
+ schedule,
9
+ excludeTaskId,
10
+ });
11
+ if (taskScheduleConflict.status === TaskScheduleConflictStatus.CONFLICT) {
12
+ throw new TaskScheduleConflictError();
13
+ }
14
+ return taskScheduleConflict;
15
+ };
@@ -0,0 +1,22 @@
1
+ import type { PrismaClient } from '@prisma/client';
2
+ export declare const FIFTEEN_MINUTES_IN_MS: number;
3
+ export declare enum TaskScheduleConflictStatus {
4
+ NONE = "none",
5
+ CONFLICT = "conflict"
6
+ }
7
+ type ScheduleLike = PrismaJson.TaskSchedule | null | undefined;
8
+ export declare const getTaskScheduleConflict: ({ prisma, threadId, key, schedule, excludeTaskId, }: {
9
+ prisma: PrismaClient;
10
+ threadId: string;
11
+ key: string;
12
+ schedule: ScheduleLike;
13
+ excludeTaskId?: string;
14
+ }) => Promise<{
15
+ status: TaskScheduleConflictStatus.NONE;
16
+ conflictingTaskId?: undefined;
17
+ } | {
18
+ status: TaskScheduleConflictStatus.CONFLICT;
19
+ conflictingTaskId: string;
20
+ }>;
21
+ export {};
22
+ //# sourceMappingURL=getTaskScheduleConflict.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTaskScheduleConflict.d.ts","sourceRoot":"","sources":["../../../src/lib/tasks/getTaskScheduleConflict.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAIlD,eAAO,MAAM,qBAAqB,QAAiB,CAAA;AAEnD,oBAAY,0BAA0B;IACpC,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED,KAAK,YAAY,GAAG,UAAU,CAAC,YAAY,GAAG,IAAI,GAAG,SAAS,CAAA;AAW9D,eAAO,MAAM,uBAAuB,GAAU,qDAM3C;IACD,MAAM,EAAE,YAAY,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,YAAY,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;;;;;;EAiCA,CAAA"}
@@ -0,0 +1,49 @@
1
+ import dayjs from 'dayjs';
2
+ import utc from 'dayjs/plugin/utc';
3
+ dayjs.extend(utc);
4
+ export const FIFTEEN_MINUTES_IN_MS = 15 * 60 * 1000;
5
+ export var TaskScheduleConflictStatus;
6
+ (function (TaskScheduleConflictStatus) {
7
+ TaskScheduleConflictStatus["NONE"] = "none";
8
+ TaskScheduleConflictStatus["CONFLICT"] = "conflict";
9
+ })(TaskScheduleConflictStatus || (TaskScheduleConflictStatus = {}));
10
+ const getScheduleStart = ({ schedule }) => {
11
+ if (!schedule || typeof schedule !== 'object')
12
+ return null;
13
+ const start = schedule.start;
14
+ if (typeof start !== 'string')
15
+ return null;
16
+ const parsed = dayjs(start).utc();
17
+ if (!parsed.isValid())
18
+ return null;
19
+ return parsed;
20
+ };
21
+ export const getTaskScheduleConflict = async ({ prisma, threadId, key, schedule, excludeTaskId, }) => {
22
+ const target = getScheduleStart({ schedule });
23
+ if (!target) {
24
+ return { status: TaskScheduleConflictStatus.NONE };
25
+ }
26
+ const tasks = await prisma.task.findMany({
27
+ where: Object.assign({ threadId,
28
+ key }, (excludeTaskId ? { id: { not: excludeTaskId } } : {})),
29
+ select: {
30
+ id: true,
31
+ schedule: true,
32
+ },
33
+ });
34
+ for (const task of tasks) {
35
+ const existing = getScheduleStart({
36
+ schedule: task.schedule,
37
+ });
38
+ if (!existing)
39
+ continue;
40
+ const diffMs = Math.abs(existing.diff(target));
41
+ if (diffMs < FIFTEEN_MINUTES_IN_MS) {
42
+ return {
43
+ status: TaskScheduleConflictStatus.CONFLICT,
44
+ conflictingTaskId: task.id,
45
+ };
46
+ }
47
+ }
48
+ return { status: TaskScheduleConflictStatus.NONE };
49
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superinterface/server",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superinterface-server": "./bin/index.cjs"
@@ -141,7 +141,9 @@
141
141
  "start": "next start",
142
142
  "prisma:migrate": "npx prisma migrate dev",
143
143
  "lint": "eslint",
144
- "cli": "tsx scripts/cli.ts"
144
+ "cli": "tsx scripts/cli.ts",
145
+ "test": "node --import tsx scripts/runTests.ts",
146
+ "tasks:audit": "tsx scripts/cleanupTaskConflicts.ts"
145
147
  },
146
148
  "dependencies": {
147
149
  "@anthropic-ai/sdk": "^0.65.0",
@@ -178,6 +180,7 @@
178
180
  "@types/node": "^20",
179
181
  "@types/react": "^19",
180
182
  "@types/react-dom": "^19",
183
+ "next-test-api-route-handler": "^5.0.3",
181
184
  "eslint": "^9",
182
185
  "eslint-config-next": "15.5.4",
183
186
  "next": "15.5.4",