@jiggai/kitchen 0.3.28 → 0.3.30

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 (650) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +11 -0
  3. package/.next/build-manifest.json +5 -5
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +76 -0
  6. package/.next/server/app/_global-error/page/build-manifest.json +3 -3
  7. package/.next/server/app/_global-error/page.js +2 -2
  8. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  9. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/_global-error.html +2 -2
  11. package/.next/server/app/_global-error.rsc +8 -8
  12. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  13. package/.next/server/app/_global-error.segments/_full.segment.rsc +8 -8
  14. package/.next/server/app/_global-error.segments/_head.segment.rsc +4 -4
  15. package/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  16. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next/server/app/_not-found/page/build-manifest.json +3 -3
  18. package/.next/server/app/_not-found/page.js +2 -2
  19. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  20. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/_not-found.html +1 -1
  22. package/.next/server/app/_not-found.rsc +11 -11
  23. package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
  24. package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  25. package/.next/server/app/_not-found.segments/_index.segment.rsc +5 -5
  26. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  27. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  28. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  29. package/.next/server/app/agents/[agentId]/page/build-manifest.json +3 -3
  30. package/.next/server/app/agents/[agentId]/page.js +2 -2
  31. package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -1
  32. package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/agents/[id]/route.js +1 -1
  34. package/.next/server/app/api/agents/[id]/route.js.nft.json +1 -1
  35. package/.next/server/app/api/agents/add/route.js +1 -1
  36. package/.next/server/app/api/agents/add/route.js.nft.json +1 -1
  37. package/.next/server/app/api/agents/file/route.js +1 -1
  38. package/.next/server/app/api/agents/file/route.js.nft.json +1 -1
  39. package/.next/server/app/api/agents/files/route.js +1 -1
  40. package/.next/server/app/api/agents/files/route.js.nft.json +1 -1
  41. package/.next/server/app/api/agents/skills/install/route.js.nft.json +1 -1
  42. package/.next/server/app/api/agents/skills/route.js +1 -1
  43. package/.next/server/app/api/agents/skills/route.js.nft.json +1 -1
  44. package/.next/server/app/api/agents/update/route.js +1 -1
  45. package/.next/server/app/api/agents/update/route.js.nft.json +1 -1
  46. package/.next/server/app/api/channels/bindings/route.js +1 -1
  47. package/.next/server/app/api/channels/bindings/route.js.nft.json +1 -1
  48. package/.next/server/app/api/cron/add/route/app-paths-manifest.json +3 -0
  49. package/.next/server/app/api/cron/add/route/build-manifest.json +11 -0
  50. package/.next/server/app/api/cron/add/route/server-reference-manifest.json +4 -0
  51. package/.next/server/app/api/cron/add/route.js +6 -0
  52. package/.next/server/app/api/cron/add/route.js.map +5 -0
  53. package/.next/server/app/api/cron/add/route.js.nft.json +1 -0
  54. package/.next/server/app/api/cron/add/route_client-reference-manifest.js +2 -0
  55. package/.next/server/app/api/cron/delete/route.js +1 -1
  56. package/.next/server/app/api/cron/delete/route.js.nft.json +1 -1
  57. package/.next/server/app/api/cron/edit/route/app-paths-manifest.json +3 -0
  58. package/.next/server/app/api/cron/edit/route/build-manifest.json +11 -0
  59. package/.next/server/app/api/cron/edit/route/server-reference-manifest.json +4 -0
  60. package/.next/server/app/api/cron/edit/route.js +6 -0
  61. package/.next/server/app/api/cron/edit/route.js.map +5 -0
  62. package/.next/server/app/api/cron/edit/route.js.nft.json +1 -0
  63. package/.next/server/app/api/cron/edit/route_client-reference-manifest.js +2 -0
  64. package/.next/server/app/api/cron/jobs/route.js.nft.json +1 -1
  65. package/.next/server/app/api/cron/recipe-installed/route.js +1 -1
  66. package/.next/server/app/api/cron/recipe-installed/route.js.nft.json +1 -1
  67. package/.next/server/app/api/cron/worker/route.js +1 -1
  68. package/.next/server/app/api/cron/worker/route.js.nft.json +1 -1
  69. package/.next/server/app/api/goals/[id]/promote/route.js +1 -1
  70. package/.next/server/app/api/goals/[id]/promote/route.js.nft.json +1 -1
  71. package/.next/server/app/api/goals/[id]/route.js +1 -1
  72. package/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
  73. package/.next/server/app/api/goals/route.js +1 -1
  74. package/.next/server/app/api/goals/route.js.nft.json +1 -1
  75. package/.next/server/app/api/ids/check/route.js +1 -1
  76. package/.next/server/app/api/ids/check/route.js.nft.json +1 -1
  77. package/.next/server/app/api/marketplace/recipes/[slug]/route.js +1 -1
  78. package/.next/server/app/api/marketplace/recipes/[slug]/route.js.nft.json +1 -1
  79. package/.next/server/app/api/marketplace/recipes/route.js +1 -1
  80. package/.next/server/app/api/marketplace/recipes/route.js.nft.json +1 -1
  81. package/.next/server/app/api/plugins/[pluginId]/[...path]/route/app-paths-manifest.json +3 -0
  82. package/.next/server/app/api/plugins/[pluginId]/[...path]/route/build-manifest.json +11 -0
  83. package/.next/server/app/api/plugins/[pluginId]/[...path]/route/server-reference-manifest.json +4 -0
  84. package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js +7 -0
  85. package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js.map +5 -0
  86. package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js.nft.json +1 -0
  87. package/.next/server/app/api/plugins/[pluginId]/[...path]/route_client-reference-manifest.js +2 -0
  88. package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route/app-paths-manifest.json +3 -0
  89. package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route/build-manifest.json +11 -0
  90. package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route/server-reference-manifest.json +4 -0
  91. package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js +7 -0
  92. package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js.map +5 -0
  93. package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js.nft.json +1 -0
  94. package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route_client-reference-manifest.js +2 -0
  95. package/.next/server/app/api/plugins/route/app-paths-manifest.json +3 -0
  96. package/.next/server/app/api/plugins/route/build-manifest.json +11 -0
  97. package/.next/server/app/api/plugins/route/server-reference-manifest.json +4 -0
  98. package/.next/server/app/api/plugins/route.js +7 -0
  99. package/.next/server/app/api/plugins/route.js.map +5 -0
  100. package/.next/server/app/api/plugins/route.js.nft.json +1 -0
  101. package/.next/server/app/api/plugins/route_client-reference-manifest.js +2 -0
  102. package/.next/server/app/api/plugins/test/route/app-paths-manifest.json +3 -0
  103. package/.next/server/app/api/plugins/test/route/build-manifest.json +11 -0
  104. package/.next/server/app/api/plugins/test/route/server-reference-manifest.json +4 -0
  105. package/.next/server/app/api/plugins/test/route.js +7 -0
  106. package/.next/server/app/api/plugins/test/route.js.map +5 -0
  107. package/.next/server/app/api/plugins/test/route.js.nft.json +1 -0
  108. package/.next/server/app/api/plugins/test/route_client-reference-manifest.js +2 -0
  109. package/.next/server/app/api/recipes/[id]/route.js +1 -1
  110. package/.next/server/app/api/recipes/[id]/route.js.nft.json +1 -1
  111. package/.next/server/app/api/recipes/clone/route.js +1 -1
  112. package/.next/server/app/api/recipes/clone/route.js.nft.json +1 -1
  113. package/.next/server/app/api/recipes/custom-team/route.js +1 -1
  114. package/.next/server/app/api/recipes/custom-team/route.js.nft.json +1 -1
  115. package/.next/server/app/api/recipes/delete/route.js.nft.json +1 -1
  116. package/.next/server/app/api/recipes/local-agent-catalog/route.js +1 -1
  117. package/.next/server/app/api/recipes/local-agent-catalog/route.js.nft.json +1 -1
  118. package/.next/server/app/api/recipes/team-agents/route.js +1 -1
  119. package/.next/server/app/api/recipes/team-agents/route.js.nft.json +1 -1
  120. package/.next/server/app/api/scaffold/route.js +1 -1
  121. package/.next/server/app/api/scaffold/route.js.nft.json +1 -1
  122. package/.next/server/app/api/settings/cron-installation/route.js +1 -1
  123. package/.next/server/app/api/settings/cron-installation/route.js.nft.json +1 -1
  124. package/.next/server/app/api/settings/model-options/route/app-paths-manifest.json +3 -0
  125. package/.next/server/app/api/settings/model-options/route/build-manifest.json +11 -0
  126. package/.next/server/app/api/settings/model-options/route/server-reference-manifest.json +4 -0
  127. package/.next/server/app/api/settings/model-options/route.js +6 -0
  128. package/.next/server/app/api/settings/model-options/route.js.map +5 -0
  129. package/.next/server/app/api/settings/model-options/route.js.nft.json +1 -0
  130. package/.next/server/app/api/settings/model-options/route_client-reference-manifest.js +2 -0
  131. package/.next/server/app/api/skills/available/route.js +1 -1
  132. package/.next/server/app/api/skills/available/route.js.nft.json +1 -1
  133. package/.next/server/app/api/swarms/start/route.js +3 -3
  134. package/.next/server/app/api/swarms/start/route.js.nft.json +1 -1
  135. package/.next/server/app/api/swarms/status/route.js +1 -1
  136. package/.next/server/app/api/swarms/status/route.js.nft.json +1 -1
  137. package/.next/server/app/api/teams/[teamId]/media-providers/route/app-paths-manifest.json +3 -0
  138. package/.next/server/app/api/teams/[teamId]/media-providers/route/build-manifest.json +11 -0
  139. package/.next/server/app/api/teams/[teamId]/media-providers/route/server-reference-manifest.json +4 -0
  140. package/.next/server/app/api/teams/[teamId]/media-providers/route.js +6 -0
  141. package/.next/server/app/api/teams/[teamId]/media-providers/route.js.map +5 -0
  142. package/.next/server/app/api/teams/[teamId]/media-providers/route.js.nft.json +1 -0
  143. package/.next/server/app/api/teams/[teamId]/media-providers/route_client-reference-manifest.js +2 -0
  144. package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js +1 -1
  145. package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.nft.json +1 -1
  146. package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js +3 -3
  147. package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js.nft.json +1 -1
  148. package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js +1 -1
  149. package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js.nft.json +1 -1
  150. package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js +1 -1
  151. package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.nft.json +1 -1
  152. package/.next/server/app/api/teams/[teamId]/tickets/move/route.js +1 -1
  153. package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.nft.json +1 -1
  154. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js +1 -1
  155. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.nft.json +1 -1
  156. package/.next/server/app/api/teams/file/route.js +1 -1
  157. package/.next/server/app/api/teams/file/route.js.nft.json +1 -1
  158. package/.next/server/app/api/teams/files/route.js +1 -1
  159. package/.next/server/app/api/teams/files/route.js.nft.json +1 -1
  160. package/.next/server/app/api/teams/memory/route.js +2 -1
  161. package/.next/server/app/api/teams/memory/route.js.nft.json +1 -1
  162. package/.next/server/app/api/teams/meta/route.js +1 -1
  163. package/.next/server/app/api/teams/meta/route.js.nft.json +1 -1
  164. package/.next/server/app/api/teams/orchestrator/install/route.js +1 -1
  165. package/.next/server/app/api/teams/orchestrator/install/route.js.nft.json +1 -1
  166. package/.next/server/app/api/teams/orchestrator/route.js +1 -1
  167. package/.next/server/app/api/teams/orchestrator/route.js.nft.json +1 -1
  168. package/.next/server/app/api/teams/remove-team/route.js +1 -1
  169. package/.next/server/app/api/teams/remove-team/route.js.nft.json +1 -1
  170. package/.next/server/app/api/teams/skills/install/route.js +1 -1
  171. package/.next/server/app/api/teams/skills/install/route.js.nft.json +1 -1
  172. package/.next/server/app/api/teams/skills/route.js +1 -1
  173. package/.next/server/app/api/teams/skills/route.js.nft.json +1 -1
  174. package/.next/server/app/api/teams/workflow-deliverables/file/route/app-paths-manifest.json +3 -0
  175. package/.next/server/app/api/teams/workflow-deliverables/file/route/build-manifest.json +11 -0
  176. package/.next/server/app/api/teams/workflow-deliverables/file/route/server-reference-manifest.json +4 -0
  177. package/.next/server/app/api/teams/workflow-deliverables/file/route.js +6 -0
  178. package/.next/server/app/api/teams/workflow-deliverables/file/route.js.map +5 -0
  179. package/.next/server/app/api/teams/workflow-deliverables/file/route.js.nft.json +1 -0
  180. package/.next/server/app/api/teams/workflow-deliverables/file/route_client-reference-manifest.js +2 -0
  181. package/.next/server/app/api/teams/workflow-deliverables/route/app-paths-manifest.json +3 -0
  182. package/.next/server/app/api/teams/workflow-deliverables/route/build-manifest.json +11 -0
  183. package/.next/server/app/api/teams/workflow-deliverables/route/server-reference-manifest.json +4 -0
  184. package/.next/server/app/api/teams/workflow-deliverables/route.js +6 -0
  185. package/.next/server/app/api/teams/workflow-deliverables/route.js.map +5 -0
  186. package/.next/server/app/api/teams/workflow-deliverables/route.js.nft.json +1 -0
  187. package/.next/server/app/api/teams/workflow-deliverables/route_client-reference-manifest.js +2 -0
  188. package/.next/server/app/api/teams/workflow-runs/route.js +1 -1
  189. package/.next/server/app/api/teams/workflow-runs/route.js.nft.json +1 -1
  190. package/.next/server/app/api/teams/workflow-templates/route.js +1 -1
  191. package/.next/server/app/api/teams/workflow-templates/route.js.nft.json +1 -1
  192. package/.next/server/app/api/teams/workflows/route.js +1 -1
  193. package/.next/server/app/api/teams/workflows/route.js.nft.json +1 -1
  194. package/.next/server/app/api/tickets/assign/route.js +1 -1
  195. package/.next/server/app/api/tickets/assign/route.js.nft.json +1 -1
  196. package/.next/server/app/api/tickets/assignees/route.js +1 -1
  197. package/.next/server/app/api/tickets/assignees/route.js.nft.json +1 -1
  198. package/.next/server/app/api/tickets/move/route.js +1 -1
  199. package/.next/server/app/api/tickets/move/route.js.nft.json +1 -1
  200. package/.next/server/app/channels/page/build-manifest.json +3 -3
  201. package/.next/server/app/channels/page.js +2 -2
  202. package/.next/server/app/channels/page.js.nft.json +1 -1
  203. package/.next/server/app/channels/page_client-reference-manifest.js +1 -1
  204. package/.next/server/app/channels.html +2 -2
  205. package/.next/server/app/channels.rsc +12 -12
  206. package/.next/server/app/channels.segments/_full.segment.rsc +12 -12
  207. package/.next/server/app/channels.segments/_head.segment.rsc +4 -4
  208. package/.next/server/app/channels.segments/_index.segment.rsc +5 -5
  209. package/.next/server/app/channels.segments/_tree.segment.rsc +2 -2
  210. package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +3 -3
  211. package/.next/server/app/channels.segments/channels.segment.rsc +3 -3
  212. package/.next/server/app/cron-jobs/page/build-manifest.json +3 -3
  213. package/.next/server/app/cron-jobs/page.js +2 -2
  214. package/.next/server/app/cron-jobs/page.js.nft.json +1 -1
  215. package/.next/server/app/cron-jobs/page_client-reference-manifest.js +1 -1
  216. package/.next/server/app/goals/[id]/page/build-manifest.json +3 -3
  217. package/.next/server/app/goals/[id]/page.js +2 -2
  218. package/.next/server/app/goals/[id]/page.js.nft.json +1 -1
  219. package/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  220. package/.next/server/app/goals/new/page/build-manifest.json +3 -3
  221. package/.next/server/app/goals/new/page.js +2 -2
  222. package/.next/server/app/goals/new/page.js.nft.json +1 -1
  223. package/.next/server/app/goals/new/page_client-reference-manifest.js +1 -1
  224. package/.next/server/app/goals/new.html +2 -2
  225. package/.next/server/app/goals/new.rsc +13 -13
  226. package/.next/server/app/goals/new.segments/_full.segment.rsc +13 -13
  227. package/.next/server/app/goals/new.segments/_head.segment.rsc +4 -4
  228. package/.next/server/app/goals/new.segments/_index.segment.rsc +5 -5
  229. package/.next/server/app/goals/new.segments/_tree.segment.rsc +2 -2
  230. package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +4 -4
  231. package/.next/server/app/goals/new.segments/goals/new.segment.rsc +3 -3
  232. package/.next/server/app/goals/new.segments/goals.segment.rsc +3 -3
  233. package/.next/server/app/goals/page/build-manifest.json +3 -3
  234. package/.next/server/app/goals/page.js +2 -2
  235. package/.next/server/app/goals/page.js.nft.json +1 -1
  236. package/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  237. package/.next/server/app/goals.html +1 -1
  238. package/.next/server/app/goals.rsc +12 -12
  239. package/.next/server/app/goals.segments/_full.segment.rsc +12 -12
  240. package/.next/server/app/goals.segments/_head.segment.rsc +4 -4
  241. package/.next/server/app/goals.segments/_index.segment.rsc +5 -5
  242. package/.next/server/app/goals.segments/_tree.segment.rsc +2 -2
  243. package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +3 -3
  244. package/.next/server/app/goals.segments/goals.segment.rsc +3 -3
  245. package/.next/server/app/page/build-manifest.json +3 -3
  246. package/.next/server/app/page.js +4 -4
  247. package/.next/server/app/page.js.nft.json +1 -1
  248. package/.next/server/app/page_client-reference-manifest.js +1 -1
  249. package/.next/server/app/recipes/[id]/page/build-manifest.json +3 -3
  250. package/.next/server/app/recipes/[id]/page.js +4 -4
  251. package/.next/server/app/recipes/[id]/page.js.nft.json +1 -1
  252. package/.next/server/app/recipes/[id]/page_client-reference-manifest.js +1 -1
  253. package/.next/server/app/recipes/page/build-manifest.json +3 -3
  254. package/.next/server/app/recipes/page.js +2 -2
  255. package/.next/server/app/recipes/page.js.nft.json +1 -1
  256. package/.next/server/app/recipes/page_client-reference-manifest.js +1 -1
  257. package/.next/server/app/runs/page/build-manifest.json +3 -3
  258. package/.next/server/app/runs/page.js +6 -5
  259. package/.next/server/app/runs/page.js.nft.json +1 -1
  260. package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  261. package/.next/server/app/settings/page/build-manifest.json +3 -3
  262. package/.next/server/app/settings/page.js +2 -2
  263. package/.next/server/app/settings/page.js.nft.json +1 -1
  264. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  265. package/.next/server/app/settings.html +1 -1
  266. package/.next/server/app/settings.rsc +12 -12
  267. package/.next/server/app/settings.segments/_full.segment.rsc +12 -12
  268. package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  269. package/.next/server/app/settings.segments/_index.segment.rsc +5 -5
  270. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  271. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +3 -3
  272. package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  273. package/.next/server/app/teams/[teamId]/deliverables/page/app-paths-manifest.json +3 -0
  274. package/.next/server/app/teams/[teamId]/deliverables/page/build-manifest.json +17 -0
  275. package/.next/server/app/teams/[teamId]/deliverables/page/next-font-manifest.json +11 -0
  276. package/.next/server/app/teams/[teamId]/deliverables/page/react-loadable-manifest.json +1 -0
  277. package/.next/server/app/teams/[teamId]/deliverables/page/server-reference-manifest.json +4 -0
  278. package/.next/server/app/teams/[teamId]/deliverables/page.js +21 -0
  279. package/.next/server/app/teams/[teamId]/deliverables/page.js.map +5 -0
  280. package/.next/server/app/teams/[teamId]/deliverables/page.js.nft.json +1 -0
  281. package/.next/server/app/teams/[teamId]/deliverables/page_client-reference-manifest.js +2 -0
  282. package/.next/server/app/teams/[teamId]/page/build-manifest.json +3 -3
  283. package/.next/server/app/teams/[teamId]/page.js +4 -4
  284. package/.next/server/app/teams/[teamId]/page.js.nft.json +1 -1
  285. package/.next/server/app/teams/[teamId]/page_client-reference-manifest.js +1 -1
  286. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page/build-manifest.json +3 -3
  287. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js +6 -5
  288. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js.nft.json +1 -1
  289. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page_client-reference-manifest.js +1 -1
  290. package/.next/server/app/teams/[teamId]/runs/page/build-manifest.json +3 -3
  291. package/.next/server/app/teams/[teamId]/runs/page.js +2 -2
  292. package/.next/server/app/teams/[teamId]/runs/page.js.nft.json +1 -1
  293. package/.next/server/app/teams/[teamId]/runs/page_client-reference-manifest.js +1 -1
  294. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/build-manifest.json +3 -3
  295. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js +3 -3
  296. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.nft.json +1 -1
  297. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  298. package/.next/server/app/teams/[teamId]/tickets/page/build-manifest.json +3 -3
  299. package/.next/server/app/teams/[teamId]/tickets/page.js +3 -3
  300. package/.next/server/app/teams/[teamId]/tickets/page.js.nft.json +1 -1
  301. package/.next/server/app/teams/[teamId]/tickets/page_client-reference-manifest.js +1 -1
  302. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/build-manifest.json +3 -3
  303. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js +2 -2
  304. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -1
  305. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
  306. package/.next/server/app/teams/[teamId]/workflows/page/build-manifest.json +3 -3
  307. package/.next/server/app/teams/[teamId]/workflows/page.js +4 -4
  308. package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -1
  309. package/.next/server/app/teams/[teamId]/workflows/page_client-reference-manifest.js +1 -1
  310. package/.next/server/app/tickets/[ticket]/page/build-manifest.json +3 -3
  311. package/.next/server/app/tickets/[ticket]/page.js +3 -3
  312. package/.next/server/app/tickets/[ticket]/page.js.nft.json +1 -1
  313. package/.next/server/app/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  314. package/.next/server/app/tickets/page/build-manifest.json +3 -3
  315. package/.next/server/app/tickets/page.js +3 -3
  316. package/.next/server/app/tickets/page.js.nft.json +1 -1
  317. package/.next/server/app/tickets/page_client-reference-manifest.js +1 -1
  318. package/.next/server/app-paths-manifest.json +11 -0
  319. package/.next/server/chunks/[root-of-the-server]__00a30f40._.js +3 -0
  320. package/.next/server/chunks/[root-of-the-server]__00a30f40._.js.map +1 -0
  321. package/.next/server/chunks/[root-of-the-server]__04f289da._.js +1 -1
  322. package/.next/server/chunks/[root-of-the-server]__04f289da._.js.map +1 -1
  323. package/.next/server/chunks/{[root-of-the-server]__26c618a3._.js → [root-of-the-server]__0883634a._.js} +2 -2
  324. package/.next/server/chunks/[root-of-the-server]__08b4c8f2._.js +1 -1
  325. package/.next/server/chunks/[root-of-the-server]__08b4c8f2._.js.map +1 -1
  326. package/.next/server/chunks/[root-of-the-server]__0bea0f71._.js +3 -0
  327. package/.next/server/chunks/[root-of-the-server]__0bea0f71._.js.map +1 -0
  328. package/.next/server/chunks/{[root-of-the-server]__fef7183d._.js → [root-of-the-server]__0f55461f._.js} +2 -2
  329. package/.next/server/chunks/[root-of-the-server]__1311d7a3._.js +1 -1
  330. package/.next/server/chunks/[root-of-the-server]__1311d7a3._.js.map +1 -1
  331. package/.next/server/chunks/[root-of-the-server]__1480ffda._.js +3 -0
  332. package/.next/server/chunks/[root-of-the-server]__1480ffda._.js.map +1 -0
  333. package/.next/server/chunks/[root-of-the-server]__17124952._.js +4 -0
  334. package/.next/server/chunks/[root-of-the-server]__17124952._.js.map +1 -0
  335. package/.next/server/chunks/[root-of-the-server]__18423bab._.js +1 -1
  336. package/.next/server/chunks/[root-of-the-server]__18423bab._.js.map +1 -1
  337. package/.next/server/chunks/[root-of-the-server]__1873f417._.js +3 -0
  338. package/.next/server/chunks/[root-of-the-server]__1873f417._.js.map +1 -0
  339. package/.next/server/chunks/{[root-of-the-server]__05f5e243._.js → [root-of-the-server]__1f1e62ac._.js} +2 -2
  340. package/.next/server/chunks/{[root-of-the-server]__864a08dd._.js → [root-of-the-server]__20b1f42d._.js} +2 -2
  341. package/.next/server/chunks/[root-of-the-server]__21ad9eeb._.js +3 -0
  342. package/.next/server/chunks/[root-of-the-server]__21ad9eeb._.js.map +1 -0
  343. package/.next/server/chunks/[root-of-the-server]__2c207e60._.js +3 -0
  344. package/.next/server/chunks/[root-of-the-server]__2c207e60._.js.map +1 -0
  345. package/.next/server/chunks/{[root-of-the-server]__69be1758._.js → [root-of-the-server]__2dd1afff._.js} +2 -2
  346. package/.next/server/chunks/[root-of-the-server]__3021a250._.js +3 -0
  347. package/.next/server/chunks/[root-of-the-server]__3021a250._.js.map +1 -0
  348. package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js +1 -1
  349. package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js.map +1 -1
  350. package/.next/server/chunks/[root-of-the-server]__343776df._.js +3 -0
  351. package/.next/server/chunks/[root-of-the-server]__343776df._.js.map +1 -0
  352. package/.next/server/chunks/[root-of-the-server]__35ec765d._.js +13 -0
  353. package/.next/server/chunks/[root-of-the-server]__35ec765d._.js.map +1 -0
  354. package/.next/server/chunks/[root-of-the-server]__392e585d._.js +2 -2
  355. package/.next/server/chunks/[root-of-the-server]__3b2d0020._.js +3 -0
  356. package/.next/server/chunks/[root-of-the-server]__3b2d0020._.js.map +1 -0
  357. package/.next/server/chunks/[root-of-the-server]__3bfad714._.js +6 -0
  358. package/.next/server/chunks/[root-of-the-server]__3bfad714._.js.map +1 -0
  359. package/.next/server/chunks/[root-of-the-server]__3c92e5aa._.js +3 -0
  360. package/.next/server/chunks/[root-of-the-server]__3c92e5aa._.js.map +1 -0
  361. package/.next/server/chunks/[root-of-the-server]__3d15e850._.js +3 -0
  362. package/.next/server/chunks/[root-of-the-server]__3d15e850._.js.map +1 -0
  363. package/.next/server/chunks/[root-of-the-server]__3f648b9b._.js +3 -0
  364. package/.next/server/chunks/[root-of-the-server]__3f648b9b._.js.map +1 -0
  365. package/.next/server/chunks/[root-of-the-server]__482575d2._.js +3 -0
  366. package/.next/server/chunks/[root-of-the-server]__482575d2._.js.map +1 -0
  367. package/.next/server/chunks/[root-of-the-server]__4898071c._.js +4 -4
  368. package/.next/server/chunks/{[root-of-the-server]__bbdb6dcb._.js → [root-of-the-server]__4ee12514._.js} +3 -3
  369. package/.next/server/chunks/[root-of-the-server]__4ee12514._.js.map +1 -0
  370. package/.next/server/chunks/[root-of-the-server]__55defc7c._.js +3 -0
  371. package/.next/server/chunks/[root-of-the-server]__55defc7c._.js.map +1 -0
  372. package/.next/server/chunks/{[root-of-the-server]__698cf062._.js → [root-of-the-server]__5aa1dc93._.js} +2 -2
  373. package/.next/server/chunks/{[root-of-the-server]__b002764e._.js → [root-of-the-server]__5c5990a6._.js} +2 -2
  374. package/.next/server/chunks/{[root-of-the-server]__7a331e51._.js → [root-of-the-server]__603cb0fa._.js} +3 -3
  375. package/.next/server/chunks/[root-of-the-server]__6131b7e2._.js +3 -0
  376. package/.next/server/chunks/[root-of-the-server]__6131b7e2._.js.map +1 -0
  377. package/.next/server/chunks/{[root-of-the-server]__d924e5ac._.js → [root-of-the-server]__636919a0._.js} +2 -2
  378. package/.next/server/chunks/[root-of-the-server]__663e79ff._.js +3 -0
  379. package/.next/server/chunks/[root-of-the-server]__663e79ff._.js.map +1 -0
  380. package/.next/server/chunks/[root-of-the-server]__69c065ce._.js +3 -0
  381. package/.next/server/chunks/[root-of-the-server]__69c065ce._.js.map +1 -0
  382. package/.next/server/chunks/{[root-of-the-server]__c63a9f28._.js → [root-of-the-server]__74b80ca4._.js} +2 -2
  383. package/.next/server/chunks/[root-of-the-server]__74e2a9ba._.js +3 -0
  384. package/.next/server/chunks/[root-of-the-server]__74e2a9ba._.js.map +1 -0
  385. package/.next/server/chunks/[root-of-the-server]__7bdf9f6e._.js +3 -0
  386. package/.next/server/chunks/[root-of-the-server]__7bdf9f6e._.js.map +1 -0
  387. package/.next/server/chunks/[root-of-the-server]__7e12b9f4._.js +3 -0
  388. package/.next/server/chunks/[root-of-the-server]__7e12b9f4._.js.map +1 -0
  389. package/.next/server/chunks/[root-of-the-server]__813dd669._.js +3 -0
  390. package/.next/server/chunks/[root-of-the-server]__813dd669._.js.map +1 -0
  391. package/.next/server/chunks/{[root-of-the-server]__5ceff0f3._.js → [root-of-the-server]__87875179._.js} +3 -3
  392. package/.next/server/chunks/[root-of-the-server]__87875179._.js.map +1 -0
  393. package/.next/server/chunks/{[root-of-the-server]__5ea38a67._.js → [root-of-the-server]__8f8e110f._.js} +2 -2
  394. package/.next/server/chunks/[root-of-the-server]__91d0cce1._.js +3 -0
  395. package/.next/server/chunks/[root-of-the-server]__91d0cce1._.js.map +1 -0
  396. package/.next/server/chunks/{[root-of-the-server]__e40409a2._.js → [root-of-the-server]__9853b72d._.js} +2 -2
  397. package/.next/server/chunks/{[root-of-the-server]__95ddb81a._.js → [root-of-the-server]__9dba20b3._.js} +2 -2
  398. package/.next/server/chunks/{[root-of-the-server]__ff69832c._.js → [root-of-the-server]__9e96d37b._.js} +2 -2
  399. package/.next/server/chunks/{[root-of-the-server]__8e27e9f7._.js → [root-of-the-server]__aba68368._.js} +3 -3
  400. package/.next/server/chunks/[root-of-the-server]__aed4e4f2._.js +3 -0
  401. package/.next/server/chunks/[root-of-the-server]__aed4e4f2._.js.map +1 -0
  402. package/.next/server/chunks/[root-of-the-server]__b457b884._.js +22 -0
  403. package/.next/server/chunks/[root-of-the-server]__b457b884._.js.map +1 -0
  404. package/.next/server/chunks/[root-of-the-server]__b6cff26d._.js +3 -0
  405. package/.next/server/chunks/[root-of-the-server]__b6cff26d._.js.map +1 -0
  406. package/.next/server/chunks/{[root-of-the-server]__bf608f29._.js → [root-of-the-server]__be5f57b2._.js} +2 -2
  407. package/.next/server/chunks/[root-of-the-server]__c15c5141._.js +3 -0
  408. package/.next/server/chunks/[root-of-the-server]__c15c5141._.js.map +1 -0
  409. package/.next/server/chunks/[root-of-the-server]__c1b0d50e._.js +4 -0
  410. package/.next/server/chunks/[root-of-the-server]__c1b0d50e._.js.map +1 -0
  411. package/.next/server/chunks/[root-of-the-server]__c50e4bc4._.js +3 -0
  412. package/.next/server/chunks/[root-of-the-server]__c50e4bc4._.js.map +1 -0
  413. package/.next/server/chunks/[root-of-the-server]__c5e88cbb._.js +1 -1
  414. package/.next/server/chunks/[root-of-the-server]__c5e88cbb._.js.map +1 -1
  415. package/.next/server/chunks/[root-of-the-server]__cc0860cb._.js +3 -0
  416. package/.next/server/chunks/[root-of-the-server]__cc0860cb._.js.map +1 -0
  417. package/.next/server/chunks/{[root-of-the-server]__8ea22d0a._.js → [root-of-the-server]__d302afb4._.js} +2 -2
  418. package/.next/server/chunks/[root-of-the-server]__d4a8660e._.js +3 -0
  419. package/.next/server/chunks/[root-of-the-server]__d4a8660e._.js.map +1 -0
  420. package/.next/server/chunks/[root-of-the-server]__da7df58d._.js +3 -0
  421. package/.next/server/chunks/[root-of-the-server]__da7df58d._.js.map +1 -0
  422. package/.next/server/chunks/[root-of-the-server]__e478ef0d._.js +1 -1
  423. package/.next/server/chunks/[root-of-the-server]__e478ef0d._.js.map +1 -1
  424. package/.next/server/chunks/[root-of-the-server]__e9acbabd._.js +3 -0
  425. package/.next/server/chunks/[root-of-the-server]__e9acbabd._.js.map +1 -0
  426. package/.next/server/chunks/{[root-of-the-server]__47eb3111._.js → [root-of-the-server]__e9d9d570._.js} +2 -2
  427. package/.next/server/chunks/[root-of-the-server]__f408c708._.js +2 -2
  428. package/.next/server/chunks/{[root-of-the-server]__59a6cf09._.js → [root-of-the-server]__f45ceefb._.js} +2 -2
  429. package/.next/server/chunks/[root-of-the-server]__f4cbadf7._.js +1 -1
  430. package/.next/server/chunks/[root-of-the-server]__f4cbadf7._.js.map +1 -1
  431. package/.next/server/chunks/[root-of-the-server]__f5cd81f1._.js +3 -0
  432. package/.next/server/chunks/[root-of-the-server]__f5cd81f1._.js.map +1 -0
  433. package/.next/server/chunks/{[root-of-the-server]__3cfdf0b3._.js → [root-of-the-server]__f994dc62._.js} +3 -3
  434. package/.next/server/chunks/[root-of-the-server]__f994dc62._.js.map +1 -0
  435. package/.next/server/chunks/_next-internal_server_app_api_cron_add_route_actions_f9053a93.js +3 -0
  436. package/.next/server/chunks/_next-internal_server_app_api_cron_add_route_actions_f9053a93.js.map +1 -0
  437. package/.next/server/chunks/_next-internal_server_app_api_cron_edit_route_actions_3b551424.js +3 -0
  438. package/.next/server/chunks/_next-internal_server_app_api_cron_edit_route_actions_3b551424.js.map +1 -0
  439. package/.next/server/chunks/_next-internal_server_app_api_plugins_route_actions_0aabd6b3.js +3 -0
  440. package/.next/server/chunks/_next-internal_server_app_api_plugins_route_actions_0aabd6b3.js.map +1 -0
  441. package/.next/server/chunks/_next-internal_server_app_api_plugins_test_route_actions_8babbe5c.js +3 -0
  442. package/.next/server/chunks/_next-internal_server_app_api_plugins_test_route_actions_8babbe5c.js.map +1 -0
  443. package/.next/server/chunks/_next-internal_server_app_api_settings_model-options_route_actions_bccf115a.js +3 -0
  444. package/.next/server/chunks/_next-internal_server_app_api_settings_model-options_route_actions_bccf115a.js.map +1 -0
  445. package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-deliverables_route_actions_9de4298b.js +3 -0
  446. package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-deliverables_route_actions_9de4298b.js.map +1 -0
  447. package/.next/server/chunks/ce889_server_app_api_plugins_[pluginId]_[___path]_route_actions_471be8ce.js +3 -0
  448. package/.next/server/chunks/ce889_server_app_api_plugins_[pluginId]_[___path]_route_actions_471be8ce.js.map +1 -0
  449. package/.next/server/chunks/ce889_server_app_api_plugins_[pluginId]_tabs_[tabId]_route_actions_9420efec.js +3 -0
  450. package/.next/server/chunks/ce889_server_app_api_plugins_[pluginId]_tabs_[tabId]_route_actions_9420efec.js.map +1 -0
  451. package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_media-providers_route_actions_1ea823f1.js +3 -0
  452. package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_media-providers_route_actions_1ea823f1.js.map +1 -0
  453. package/.next/server/chunks/ce889_server_app_api_teams_workflow-deliverables_file_route_actions_332fd6ea.js +3 -0
  454. package/.next/server/chunks/ce889_server_app_api_teams_workflow-deliverables_file_route_actions_332fd6ea.js.map +1 -0
  455. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js +1 -1
  456. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js.map +1 -1
  457. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_3a1b29e4.js +3 -0
  458. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_3a1b29e4.js.map +1 -0
  459. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_f5680d9e.js +1 -1
  460. package/.next/server/chunks/node_modules_yaml_dist_49c13b35._.js +4 -4
  461. package/.next/server/chunks/node_modules_yaml_dist_49c13b35._.js.map +1 -1
  462. package/.next/server/chunks/ssr/[root-of-the-server]__0a5cb3ca._.js +3 -0
  463. package/.next/server/chunks/ssr/[root-of-the-server]__0a5cb3ca._.js.map +1 -0
  464. package/.next/server/chunks/ssr/[root-of-the-server]__177cec74._.js +3 -0
  465. package/.next/server/chunks/ssr/[root-of-the-server]__177cec74._.js.map +1 -0
  466. package/.next/server/chunks/ssr/[root-of-the-server]__195421b7._.js +12 -0
  467. package/.next/server/chunks/ssr/[root-of-the-server]__195421b7._.js.map +1 -0
  468. package/.next/server/chunks/ssr/{[root-of-the-server]__17b046ea._.js → [root-of-the-server]__388bae11._.js} +2 -2
  469. package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js +1 -1
  470. package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js.map +1 -1
  471. package/.next/server/chunks/ssr/[root-of-the-server]__51e26a01._.js +3 -0
  472. package/.next/server/chunks/ssr/{[root-of-the-server]__4c66998a._.js.map → [root-of-the-server]__51e26a01._.js.map} +1 -1
  473. package/.next/server/chunks/ssr/[root-of-the-server]__6b6b7595._.js +3 -0
  474. package/.next/server/chunks/ssr/[root-of-the-server]__6b6b7595._.js.map +1 -0
  475. package/.next/server/chunks/ssr/{[root-of-the-server]__2db9d262._.js → [root-of-the-server]__8f9585b9._.js} +2 -2
  476. package/.next/server/chunks/ssr/{[root-of-the-server]__2db9d262._.js.map → [root-of-the-server]__8f9585b9._.js.map} +1 -1
  477. package/.next/server/chunks/ssr/{[root-of-the-server]__9a7d79aa._.js → [root-of-the-server]__997aa62c._.js} +2 -2
  478. package/.next/server/chunks/ssr/{[root-of-the-server]__0df430db._.js → [root-of-the-server]__9e400864._.js} +2 -2
  479. package/.next/server/chunks/ssr/{[root-of-the-server]__8a588fad._.js → [root-of-the-server]__a6348eaa._.js} +2 -2
  480. package/.next/server/chunks/ssr/{[root-of-the-server]__49281b4c._.js → [root-of-the-server]__af792402._.js} +2 -2
  481. package/.next/server/chunks/ssr/{[root-of-the-server]__68c20e8e._.js → [root-of-the-server]__b5aa14b8._.js} +2 -2
  482. package/.next/server/chunks/ssr/{[root-of-the-server]__68c20e8e._.js.map → [root-of-the-server]__b5aa14b8._.js.map} +1 -1
  483. package/.next/server/chunks/ssr/{[root-of-the-server]__8756d76d._.js → [root-of-the-server]__b8998a21._.js} +2 -2
  484. package/.next/server/chunks/ssr/{[root-of-the-server]__c777e326._.js → [root-of-the-server]__df23886e._.js} +2 -2
  485. package/.next/server/chunks/ssr/{[root-of-the-server]__02e6ccaa._.js → [root-of-the-server]__e9bd9b71._.js} +2 -2
  486. package/.next/server/chunks/ssr/_018dfe6b._.js +2 -2
  487. package/.next/server/chunks/ssr/_2d8d7232._.js +3 -0
  488. package/.next/server/chunks/ssr/_2d8d7232._.js.map +1 -0
  489. package/.next/server/chunks/ssr/_7f9e89d2._.js +1 -1
  490. package/.next/server/chunks/ssr/_7f9e89d2._.js.map +1 -1
  491. package/.next/server/chunks/ssr/_8538617d._.js +3 -0
  492. package/.next/server/chunks/ssr/_8538617d._.js.map +1 -0
  493. package/.next/server/chunks/ssr/_a506fcf8._.js +3 -0
  494. package/.next/server/chunks/ssr/_a506fcf8._.js.map +1 -0
  495. package/.next/server/chunks/ssr/_deb7a691._.js +5 -0
  496. package/.next/server/chunks/ssr/_deb7a691._.js.map +1 -0
  497. package/.next/server/chunks/ssr/_ec0b0b83._.js +4 -0
  498. package/.next/server/chunks/ssr/_ec0b0b83._.js.map +1 -0
  499. package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_deliverables_page_actions_f44ae7c7.js +3 -0
  500. package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_deliverables_page_actions_f44ae7c7.js.map +1 -0
  501. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +1 -1
  502. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -1
  503. package/.next/server/chunks/ssr/d4b1c_modules_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_6ef9314a.js +3 -0
  504. package/.next/server/chunks/ssr/d4b1c_modules_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_6ef9314a.js.map +1 -0
  505. package/.next/server/chunks/ssr/node_modules_next_dist_1038a5b9._.js +10 -0
  506. package/.next/server/chunks/ssr/{[root-of-the-server]__4fd003c7._.js.map → node_modules_next_dist_1038a5b9._.js.map} +1 -1
  507. package/.next/server/chunks/ssr/node_modules_next_dist_25a30daf._.js +1 -1
  508. package/.next/server/chunks/ssr/node_modules_next_dist_25a30daf._.js.map +1 -1
  509. package/.next/server/chunks/ssr/node_modules_yaml_dist_18db9ed7._.js +2 -2
  510. package/.next/server/chunks/ssr/src_app_cron-jobs_cron-jobs-client_tsx_ec91a73d._.js +3 -0
  511. package/.next/server/chunks/ssr/src_app_cron-jobs_cron-jobs-client_tsx_ec91a73d._.js.map +1 -0
  512. package/.next/server/middleware-build-manifest.js +3 -3
  513. package/.next/server/next-font-manifest.js +1 -1
  514. package/.next/server/next-font-manifest.json +4 -0
  515. package/.next/server/pages/404.html +1 -1
  516. package/.next/server/pages/500.html +2 -2
  517. package/.next/server/server-reference-manifest.js +1 -1
  518. package/.next/server/server-reference-manifest.json +1 -1
  519. package/.next/static/chunks/{d2be314c3ece3fbe.js → 0bd6498bda341889.js} +1 -1
  520. package/.next/static/chunks/{c27f767f683b017a.js → 410dc851d0e3033d.js} +1 -1
  521. package/.next/static/chunks/{2ad8e6acac0ede2c.js → 4e38b3f280ced64c.js} +1 -1
  522. package/.next/static/chunks/{236ef28eb649c432.js → 4f2b8a07ace7e02b.js} +1 -1
  523. package/.next/static/chunks/57ad5290f7e92ffd.css +3 -0
  524. package/.next/static/chunks/{e854e56ea8cb6236.js → 87879d67a1601ee0.js} +1 -1
  525. package/.next/static/chunks/8a919077b73862da.js +1 -0
  526. package/.next/static/chunks/9906444fb1191bb4.js +1 -0
  527. package/.next/static/chunks/{43d0024279c6160e.js → a625725b4cd85ea3.js} +1 -1
  528. package/.next/static/chunks/{3e1fe6be993c61fb.js → ac32974713c57cb3.js} +1 -1
  529. package/.next/static/chunks/{f2f58a7e93290fbb.js → aebc3b6d791f68d2.js} +1 -1
  530. package/.next/static/chunks/{e083bcf4a197beae.js → b83c1ca03c3b8c6d.js} +1 -1
  531. package/.next/static/chunks/{e7bbb90aada90fdf.js → bdb7ebd88ea13111.js} +1 -1
  532. package/.next/static/chunks/bfcfbe145220d365.js +1 -0
  533. package/.next/static/chunks/c0d9f53d91cc65c5.js +10 -0
  534. package/.next/static/chunks/{36aff6bd42d53c8b.js → c0e2f959abc4cc13.js} +1 -1
  535. package/.next/static/chunks/{62e0c437eb8fc2da.js → c822e53f79a492c7.js} +1 -1
  536. package/.next/static/chunks/{fd0cb4d03fd17cf6.js → ce6b2024d13b4333.js} +1 -1
  537. package/.next/static/chunks/d13249af74d111cf.js +3 -0
  538. package/.next/static/chunks/{4a6dcf80b293d7a4.js → d16f64ca3a8ed208.js} +1 -1
  539. package/.next/static/chunks/{c84580993f22c17a.js → d6e1b7307a9274ce.js} +1 -1
  540. package/.next/static/chunks/d7541a171116ec9c.js +1 -0
  541. package/.next/static/chunks/{93719e85369dd453.js → e03137fd069b1514.js} +1 -1
  542. package/.next/static/chunks/{db4da5ee45033817.js → e10faa9296c8b246.js} +1 -1
  543. package/.next/static/chunks/ec24877f7b7f82c5.js +3 -0
  544. package/.next/static/chunks/{f179280598d329b2.js → ff3bbb5df40b2cc4.js} +1 -1
  545. package/.next/static/chunks/{turbopack-0236a74c4f471967.js → turbopack-dbf3078dbf5863bd.js} +1 -1
  546. package/openclaw.plugin.json +1 -1
  547. package/package.json +11 -2
  548. package/tsconfig.json +2 -1
  549. package/.next/server/chunks/[root-of-the-server]__01863a8b._.js +0 -3
  550. package/.next/server/chunks/[root-of-the-server]__01863a8b._.js.map +0 -1
  551. package/.next/server/chunks/[root-of-the-server]__0c4fc3d3._.js +0 -3
  552. package/.next/server/chunks/[root-of-the-server]__0c4fc3d3._.js.map +0 -1
  553. package/.next/server/chunks/[root-of-the-server]__150bf0bf._.js +0 -4
  554. package/.next/server/chunks/[root-of-the-server]__150bf0bf._.js.map +0 -1
  555. package/.next/server/chunks/[root-of-the-server]__1c6c2e43._.js +0 -3
  556. package/.next/server/chunks/[root-of-the-server]__1c6c2e43._.js.map +0 -1
  557. package/.next/server/chunks/[root-of-the-server]__3cfdf0b3._.js.map +0 -1
  558. package/.next/server/chunks/[root-of-the-server]__3fdbc43e._.js +0 -3
  559. package/.next/server/chunks/[root-of-the-server]__3fdbc43e._.js.map +0 -1
  560. package/.next/server/chunks/[root-of-the-server]__4079fa2b._.js +0 -3
  561. package/.next/server/chunks/[root-of-the-server]__4079fa2b._.js.map +0 -1
  562. package/.next/server/chunks/[root-of-the-server]__453333f5._.js +0 -3
  563. package/.next/server/chunks/[root-of-the-server]__453333f5._.js.map +0 -1
  564. package/.next/server/chunks/[root-of-the-server]__502825d0._.js +0 -13
  565. package/.next/server/chunks/[root-of-the-server]__502825d0._.js.map +0 -1
  566. package/.next/server/chunks/[root-of-the-server]__50fe6ff8._.js +0 -3
  567. package/.next/server/chunks/[root-of-the-server]__50fe6ff8._.js.map +0 -1
  568. package/.next/server/chunks/[root-of-the-server]__51198e25._.js +0 -3
  569. package/.next/server/chunks/[root-of-the-server]__51198e25._.js.map +0 -1
  570. package/.next/server/chunks/[root-of-the-server]__542a081b._.js +0 -3
  571. package/.next/server/chunks/[root-of-the-server]__542a081b._.js.map +0 -1
  572. package/.next/server/chunks/[root-of-the-server]__5ceff0f3._.js.map +0 -1
  573. package/.next/server/chunks/[root-of-the-server]__63715de8._.js +0 -3
  574. package/.next/server/chunks/[root-of-the-server]__63715de8._.js.map +0 -1
  575. package/.next/server/chunks/[root-of-the-server]__69c45937._.js +0 -3
  576. package/.next/server/chunks/[root-of-the-server]__69c45937._.js.map +0 -1
  577. package/.next/server/chunks/[root-of-the-server]__6caa8f2d._.js +0 -3
  578. package/.next/server/chunks/[root-of-the-server]__6caa8f2d._.js.map +0 -1
  579. package/.next/server/chunks/[root-of-the-server]__6f4e90a0._.js +0 -3
  580. package/.next/server/chunks/[root-of-the-server]__6f4e90a0._.js.map +0 -1
  581. package/.next/server/chunks/[root-of-the-server]__7459129e._.js +0 -3
  582. package/.next/server/chunks/[root-of-the-server]__7459129e._.js.map +0 -1
  583. package/.next/server/chunks/[root-of-the-server]__7bf889c1._.js +0 -3
  584. package/.next/server/chunks/[root-of-the-server]__7bf889c1._.js.map +0 -1
  585. package/.next/server/chunks/[root-of-the-server]__89605574._.js +0 -3
  586. package/.next/server/chunks/[root-of-the-server]__89605574._.js.map +0 -1
  587. package/.next/server/chunks/[root-of-the-server]__99b12bcb._.js +0 -3
  588. package/.next/server/chunks/[root-of-the-server]__99b12bcb._.js.map +0 -1
  589. package/.next/server/chunks/[root-of-the-server]__9d0ea07b._.js +0 -3
  590. package/.next/server/chunks/[root-of-the-server]__9d0ea07b._.js.map +0 -1
  591. package/.next/server/chunks/[root-of-the-server]__a49c534d._.js +0 -3
  592. package/.next/server/chunks/[root-of-the-server]__a49c534d._.js.map +0 -1
  593. package/.next/server/chunks/[root-of-the-server]__a74a32d5._.js +0 -3
  594. package/.next/server/chunks/[root-of-the-server]__a74a32d5._.js.map +0 -1
  595. package/.next/server/chunks/[root-of-the-server]__b64936a3._.js +0 -3
  596. package/.next/server/chunks/[root-of-the-server]__b64936a3._.js.map +0 -1
  597. package/.next/server/chunks/[root-of-the-server]__bbdb6dcb._.js.map +0 -1
  598. package/.next/server/chunks/[root-of-the-server]__bccfb2c0._.js +0 -6
  599. package/.next/server/chunks/[root-of-the-server]__bccfb2c0._.js.map +0 -1
  600. package/.next/server/chunks/[root-of-the-server]__e063a986._.js +0 -3
  601. package/.next/server/chunks/[root-of-the-server]__e063a986._.js.map +0 -1
  602. package/.next/server/chunks/ssr/[root-of-the-server]__162d7d9d._.js +0 -3
  603. package/.next/server/chunks/ssr/[root-of-the-server]__162d7d9d._.js.map +0 -1
  604. package/.next/server/chunks/ssr/[root-of-the-server]__255506f2._.js +0 -3
  605. package/.next/server/chunks/ssr/[root-of-the-server]__255506f2._.js.map +0 -1
  606. package/.next/server/chunks/ssr/[root-of-the-server]__4c66998a._.js +0 -3
  607. package/.next/server/chunks/ssr/[root-of-the-server]__4fd003c7._.js +0 -10
  608. package/.next/server/chunks/ssr/_d9520bea._.js +0 -3
  609. package/.next/server/chunks/ssr/_d9520bea._.js.map +0 -1
  610. package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js +0 -3
  611. package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js.map +0 -1
  612. package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_index_tsx_e68e9cbc._.js +0 -12
  613. package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_index_tsx_e68e9cbc._.js.map +0 -1
  614. package/.next/static/chunks/33959503ed1ef5fe.css +0 -3
  615. package/.next/static/chunks/474635d658546626.js +0 -1
  616. package/.next/static/chunks/4d4876ec71727e38.js +0 -1
  617. package/.next/static/chunks/579cd9be685abc65.js +0 -1
  618. package/.next/static/chunks/5e3b1d0f61a651bf.js +0 -1
  619. package/.next/static/chunks/a719c5f36ffeec2a.js +0 -10
  620. package/.next/static/chunks/ca07f0194f384207.js +0 -1
  621. /package/.next/server/chunks/{[root-of-the-server]__26c618a3._.js.map → [root-of-the-server]__0883634a._.js.map} +0 -0
  622. /package/.next/server/chunks/{[root-of-the-server]__fef7183d._.js.map → [root-of-the-server]__0f55461f._.js.map} +0 -0
  623. /package/.next/server/chunks/{[root-of-the-server]__05f5e243._.js.map → [root-of-the-server]__1f1e62ac._.js.map} +0 -0
  624. /package/.next/server/chunks/{[root-of-the-server]__864a08dd._.js.map → [root-of-the-server]__20b1f42d._.js.map} +0 -0
  625. /package/.next/server/chunks/{[root-of-the-server]__69be1758._.js.map → [root-of-the-server]__2dd1afff._.js.map} +0 -0
  626. /package/.next/server/chunks/{[root-of-the-server]__698cf062._.js.map → [root-of-the-server]__5aa1dc93._.js.map} +0 -0
  627. /package/.next/server/chunks/{[root-of-the-server]__b002764e._.js.map → [root-of-the-server]__5c5990a6._.js.map} +0 -0
  628. /package/.next/server/chunks/{[root-of-the-server]__7a331e51._.js.map → [root-of-the-server]__603cb0fa._.js.map} +0 -0
  629. /package/.next/server/chunks/{[root-of-the-server]__d924e5ac._.js.map → [root-of-the-server]__636919a0._.js.map} +0 -0
  630. /package/.next/server/chunks/{[root-of-the-server]__c63a9f28._.js.map → [root-of-the-server]__74b80ca4._.js.map} +0 -0
  631. /package/.next/server/chunks/{[root-of-the-server]__5ea38a67._.js.map → [root-of-the-server]__8f8e110f._.js.map} +0 -0
  632. /package/.next/server/chunks/{[root-of-the-server]__e40409a2._.js.map → [root-of-the-server]__9853b72d._.js.map} +0 -0
  633. /package/.next/server/chunks/{[root-of-the-server]__95ddb81a._.js.map → [root-of-the-server]__9dba20b3._.js.map} +0 -0
  634. /package/.next/server/chunks/{[root-of-the-server]__ff69832c._.js.map → [root-of-the-server]__9e96d37b._.js.map} +0 -0
  635. /package/.next/server/chunks/{[root-of-the-server]__8e27e9f7._.js.map → [root-of-the-server]__aba68368._.js.map} +0 -0
  636. /package/.next/server/chunks/{[root-of-the-server]__bf608f29._.js.map → [root-of-the-server]__be5f57b2._.js.map} +0 -0
  637. /package/.next/server/chunks/{[root-of-the-server]__8ea22d0a._.js.map → [root-of-the-server]__d302afb4._.js.map} +0 -0
  638. /package/.next/server/chunks/{[root-of-the-server]__47eb3111._.js.map → [root-of-the-server]__e9d9d570._.js.map} +0 -0
  639. /package/.next/server/chunks/{[root-of-the-server]__59a6cf09._.js.map → [root-of-the-server]__f45ceefb._.js.map} +0 -0
  640. /package/.next/server/chunks/ssr/{[root-of-the-server]__17b046ea._.js.map → [root-of-the-server]__388bae11._.js.map} +0 -0
  641. /package/.next/server/chunks/ssr/{[root-of-the-server]__9a7d79aa._.js.map → [root-of-the-server]__997aa62c._.js.map} +0 -0
  642. /package/.next/server/chunks/ssr/{[root-of-the-server]__0df430db._.js.map → [root-of-the-server]__9e400864._.js.map} +0 -0
  643. /package/.next/server/chunks/ssr/{[root-of-the-server]__8a588fad._.js.map → [root-of-the-server]__a6348eaa._.js.map} +0 -0
  644. /package/.next/server/chunks/ssr/{[root-of-the-server]__49281b4c._.js.map → [root-of-the-server]__af792402._.js.map} +0 -0
  645. /package/.next/server/chunks/ssr/{[root-of-the-server]__8756d76d._.js.map → [root-of-the-server]__b8998a21._.js.map} +0 -0
  646. /package/.next/server/chunks/ssr/{[root-of-the-server]__c777e326._.js.map → [root-of-the-server]__df23886e._.js.map} +0 -0
  647. /package/.next/server/chunks/ssr/{[root-of-the-server]__02e6ccaa._.js.map → [root-of-the-server]__e9bd9b71._.js.map} +0 -0
  648. /package/.next/static/{xL1Ph-1X9rdYxDgzULIJA → O_6k_lqrD6rgSIl4YQjxa}/_buildManifest.js +0 -0
  649. /package/.next/static/{xL1Ph-1X9rdYxDgzULIJA → O_6k_lqrD6rgSIl4YQjxa}/_clientMiddlewareManifest.json +0 -0
  650. /package/.next/static/{xL1Ph-1X9rdYxDgzULIJA → O_6k_lqrD6rgSIl4YQjxa}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/kitchen-api.ts","../../../src/lib/openclaw.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/api/cron/job/route.ts"],"sourcesContent":["// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { getKitchenApi } from \"@/lib/kitchen-api\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst execFileAsync = promisify(execFile);\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nfunction extractStdout(err: { stdout?: unknown }): string {\n if (typeof err.stdout === \"string\") return err.stdout;\n if (err.stdout && typeof err.stdout === \"object\" && \"toString\" in err.stdout) {\n return String((err.stdout as { toString: () => string }).toString());\n }\n return \"\";\n}\n\nfunction resolveExitCode(res: { exitCode?: unknown; code?: unknown; status?: unknown }): number {\n if (typeof res.exitCode === \"number\") return res.exitCode;\n if (typeof res.code === \"number\") return res.code;\n if (typeof res.status === \"number\") return res.status;\n return 0;\n}\n\nfunction extractStderr(err: { stderr?: unknown; message?: unknown }, fallback: unknown): string {\n if (typeof err.stderr === \"string\") return err.stderr;\n if (err.stderr && typeof err.stderr === \"object\" && \"toString\" in err.stderr) {\n return String((err.stderr as { toString: () => string }).toString());\n }\n if (typeof err.message === \"string\") return err.message;\n return String(fallback);\n}\n\n/**\n * Strip non-JSON diagnostic lines from stdout.\n *\n * OpenClaw may print plugin/doctor/diagnostic lines to stdout before the\n * actual JSON payload (e.g. \"[doctor] ...\", \"[plugins] ...\", \"🦞 OpenClaw ...\").\n * This breaks callers that do JSON.parse(stdout).\n *\n * If stdout looks like it contains a JSON payload with leading noise, strip the\n * noise lines. Otherwise return as-is (non-JSON commands like `config get` may\n * return plain text).\n */\nfunction sanitizeStdout(raw: string): string {\n const trimmed = raw.trim();\n if (!trimmed) return raw;\n\n // Fast path: already starts with JSON\n const firstChar = trimmed[0];\n if (firstChar === \"[\" || firstChar === \"{\" || firstChar === '\"') return raw;\n\n // Look for the first line starting with a JSON token\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{\"]/.test(l));\n if (jsonStartIdx > 0) {\n // Verify the remainder is valid JSON before stripping\n const candidate = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n JSON.parse(candidate);\n return candidate;\n } catch {\n // Not valid JSON after stripping — return original\n }\n }\n\n return raw;\n}\n\nasync function runOpenClawLocal(args: string[], options: { sanitizeStdout?: boolean } = {}): Promise<OpenClawExecResult> {\n const { sanitizeStdout: shouldSanitize = true } = options;\n \n try {\n const isWindows = process.platform === \"win32\";\n const res = await execFileAsync(\"openclaw\", args, {\n timeout: 120000,\n windowsHide: true,\n maxBuffer: 10 * 1024 * 1024,\n // Windows requires shell:true to resolve executables on PATH via PATHEXT.\n // Without it, execFile throws ENOENT even when openclaw is installed globally.\n ...(isWindows ? { shell: true } : {}),\n });\n\n const rawStdout = String(res.stdout ?? \"\");\n \n return {\n ok: true,\n exitCode: 0,\n stdout: shouldSanitize ? sanitizeStdout(rawStdout) : rawStdout,\n stderr: String(res.stderr ?? \"\"),\n };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n\n/**\n * Extract a JSON payload from stdout that may contain non-JSON diagnostic lines\n * (e.g. [doctor], [plugins], [recipes] log lines before the actual JSON).\n * Returns the parsed value or null if no JSON found.\n */\nexport function extractJson<T = unknown>(stdout: string): T | null {\n const trimmed = stdout.trim();\n if (!trimmed) return null;\n\n // Fast path: pure JSON\n try {\n return JSON.parse(trimmed) as T;\n } catch {\n // fall through\n }\n\n // Find the first line starting with [ or { (JSON array/object)\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{]/.test(l));\n if (jsonStartIdx >= 0) {\n const jsonSlice = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n return JSON.parse(jsonSlice) as T;\n } catch {\n // fall through\n }\n }\n\n // Last resort: find the last JSON block (scan from end)\n for (let i = lines.length - 1; i >= 0; i--) {\n if (/^\\s*[\\]}]/.test(lines[i])) {\n // Walk backward to find the matching open\n for (let j = i; j >= 0; j--) {\n if (/^\\s*[[\\{]/.test(lines[j])) {\n try {\n return JSON.parse(lines.slice(j, i + 1).join(\"\\n\")) as T;\n } catch {\n // continue searching\n }\n }\n }\n }\n }\n\n return null;\n}\n\n/**\n * Run OpenClaw without stdout sanitization (for raw text output like recipe markdown)\n */\nexport async function runOpenClawRaw(args: string[]): Promise<OpenClawExecResult> {\n // Always use local exec for raw content to avoid Kitchen runtime restrictions\n return runOpenClawLocal(args, { sanitizeStdout: false });\n}\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // In some Kitchen runtime contexts, `api.runtime.system.runCommandWithTimeout`\n // is executed with a restricted allowlist that does not include the `cron` tool,\n // causing `openclaw cron ...` to fail with \"Tool not available: cron\".\n //\n // Cron routes need to work in the gateway-run Kitchen environment, so for cron\n // specifically we prefer a local exec (host OpenClaw).\n if (args[0] === \"cron\") return runOpenClawLocal(args);\n\n const api = getKitchenApi();\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = sanitizeStdout(String(res.stdout ?? \"\"));\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\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 { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\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 = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/cron/job/route\",\n pathname: \"/api/cron/job\",\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]/src/app/api/cron/job/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 if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/cron/job/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, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\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 if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\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 isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\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 authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, 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} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && 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 const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, 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 isMinimalMode\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 (!isMinimalMode) {\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 (!(isMinimalMode && 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, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n 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} ${srcPage}`,\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 const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\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 { NextResponse } from \"next/server\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\n\nexport async function POST(req: Request) {\n const body = (await req.json()) as { id?: string; action?: string };\n const id = String(body.id ?? \"\").trim();\n const action = String(body.action ?? \"\").trim();\n\n if (!id) return NextResponse.json({ ok: false, error: \"id is required\" }, { status: 400 });\n if (![\"enable\", \"disable\", \"run\"].includes(action)) {\n return NextResponse.json({ ok: false, error: \"action must be enable|disable|run\" }, { status: 400 });\n }\n\n if (action === \"run\") {\n const result = await runOpenClaw([\"cron\", \"run\", id, \"--json\"]);\n if (!result.ok) return NextResponse.json({ ok: false, error: result.stderr || result.stdout }, { status: 500 });\n return NextResponse.json({ ok: true, action, id, result });\n }\n\n const result = await runOpenClaw([\"cron\", action, id]);\n if (!result.ok) return NextResponse.json({ ok: false, error: result.stderr || result.stdout }, { status: 500 });\n return NextResponse.json({ ok: true, action, id, result });\n}\n"],"names":[],"mappings":"m/BAUO,SAAS,IACd,IAAM,EAAO,WAA6D,iBAAiB,CAC3F,GAAI,CAAC,EACH,GADQ,GACF,AAAI,MACR,gIAGJ,OAAO,CACT,iNClBA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAGA,IAAM,EAAgB,CAAA,EAAA,AAFtB,EAAA,CAAA,CAAA,OAEsB,SAAA,AAAS,EAAC,EAAA,QAAQ,EASxC,SAAS,EAAc,CAAyB,QAC9C,AAAI,AAAsB,UAAU,OAAzB,EAAI,MAAM,CAA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AAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,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":[2]}
1
+ {"version":3,"sources":["../../../src/lib/kitchen-api.ts","../../../src/lib/openclaw.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/api/cron/job/route.ts"],"sourcesContent":["// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { getKitchenApi } from \"@/lib/kitchen-api\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst execFileAsync = promisify(execFile);\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nfunction extractStdout(err: { stdout?: unknown }): string {\n if (typeof err.stdout === \"string\") return err.stdout;\n if (err.stdout && typeof err.stdout === \"object\" && \"toString\" in err.stdout) {\n return String((err.stdout as { toString: () => string }).toString());\n }\n return \"\";\n}\n\nfunction resolveExitCode(res: { exitCode?: unknown; code?: unknown; status?: unknown }): number {\n if (typeof res.exitCode === \"number\") return res.exitCode;\n if (typeof res.code === \"number\") return res.code;\n if (typeof res.status === \"number\") return res.status;\n return 0;\n}\n\nfunction extractStderr(err: { stderr?: unknown; message?: unknown }, fallback: unknown): string {\n if (typeof err.stderr === \"string\") return err.stderr;\n if (err.stderr && typeof err.stderr === \"object\" && \"toString\" in err.stderr) {\n return String((err.stderr as { toString: () => string }).toString());\n }\n if (typeof err.message === \"string\") return err.message;\n return String(fallback);\n}\n\n/**\n * Strip non-JSON diagnostic lines from stdout.\n *\n * OpenClaw may print plugin/doctor/diagnostic lines to stdout before the\n * actual JSON payload (e.g. \"[doctor] ...\", \"[plugins] ...\", \"🦞 OpenClaw ...\").\n * This breaks callers that do JSON.parse(stdout).\n *\n * If stdout looks like it contains a JSON payload with leading noise, strip the\n * noise lines. Otherwise return as-is (non-JSON commands like `config get` may\n * return plain text).\n */\nfunction sanitizeStdout(raw: string): string {\n const trimmed = raw.trim();\n if (!trimmed) return raw;\n\n // Fast path: already starts with JSON\n const firstChar = trimmed[0];\n if (firstChar === \"[\" || firstChar === \"{\" || firstChar === '\"') return raw;\n\n // Look for the first line starting with a JSON token\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{\"]/.test(l));\n if (jsonStartIdx > 0) {\n // Verify the remainder is valid JSON before stripping\n const candidate = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n JSON.parse(candidate);\n return candidate;\n } catch {\n // Not valid JSON after stripping — return original\n }\n }\n\n return raw;\n}\n\nasync function runOpenClawLocal(args: string[], options: { sanitizeStdout?: boolean } = {}): Promise<OpenClawExecResult> {\n const { sanitizeStdout: shouldSanitize = true } = options;\n \n try {\n const isWindows = process.platform === \"win32\";\n const res = await execFileAsync(\"openclaw\", args, {\n timeout: 120000,\n windowsHide: true,\n maxBuffer: 10 * 1024 * 1024,\n // Windows requires shell:true to resolve executables on PATH via PATHEXT.\n // Without it, execFile throws ENOENT even when openclaw is installed globally.\n ...(isWindows ? { shell: true } : {}),\n });\n\n const rawStdout = String(res.stdout ?? \"\");\n \n return {\n ok: true,\n exitCode: 0,\n stdout: shouldSanitize ? sanitizeStdout(rawStdout) : rawStdout,\n stderr: String(res.stderr ?? \"\"),\n };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n\n/**\n * Extract a JSON payload from stdout that may contain non-JSON diagnostic lines\n * (e.g. [doctor], [plugins], [recipes] log lines before the actual JSON).\n * Returns the parsed value or null if no JSON found.\n */\nexport function extractJson<T = unknown>(stdout: string): T | null {\n const trimmed = stdout.trim();\n if (!trimmed) return null;\n\n // Fast path: pure JSON\n try {\n return JSON.parse(trimmed) as T;\n } catch {\n // fall through\n }\n\n // Find the first line starting with [ or { (JSON array/object)\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{]/.test(l));\n if (jsonStartIdx >= 0) {\n const jsonSlice = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n return JSON.parse(jsonSlice) as T;\n } catch {\n // fall through\n }\n }\n\n // Last resort: find the last JSON block (scan from end)\n for (let i = lines.length - 1; i >= 0; i--) {\n if (/^\\s*[\\]}]/.test(lines[i])) {\n // Walk backward to find the matching open\n for (let j = i; j >= 0; j--) {\n if (/^\\s*[[\\{]/.test(lines[j])) {\n try {\n return JSON.parse(lines.slice(j, i + 1).join(\"\\n\")) as T;\n } catch {\n // continue searching\n }\n }\n }\n }\n }\n\n return null;\n}\n\n/**\n * Run OpenClaw without stdout sanitization (for raw text output like recipe markdown)\n */\nexport async function runOpenClawRaw(args: string[]): Promise<OpenClawExecResult> {\n // Always use local exec for raw content to avoid Kitchen runtime restrictions\n return runOpenClawLocal(args, { sanitizeStdout: false });\n}\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // In some Kitchen runtime contexts, `api.runtime.system.runCommandWithTimeout`\n // is executed with a restricted allowlist that does not include the `cron` tool,\n // causing `openclaw cron ...` to fail with \"Tool not available: cron\".\n //\n // Cron routes need to work in the gateway-run Kitchen environment, so for cron\n // specifically we prefer a local exec (host OpenClaw).\n if (args[0] === \"cron\") return runOpenClawLocal(args);\n\n // Workflow runner/worker commands are long-running orchestration processes that\n // acquire locks and claims. The runtime command wrapper (runCommandWithTimeout)\n // has a 120s hard timeout that can kill these mid-execution, orphaning locks and\n // leaving runs stuck in waiting_workers. Route them through local exec instead.\n if (\n args[0] === \"recipes\" &&\n args[1] === \"workflows\" &&\n [\"runner-once\", \"runner-tick\", \"worker-tick\"].includes(args[2])\n ) {\n return runOpenClawLocal(args);\n }\n\n const api = getKitchenApi();\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = sanitizeStdout(String(res.stdout ?? \"\"));\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\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 { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\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 = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/cron/job/route\",\n pathname: \"/api/cron/job\",\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]/src/app/api/cron/job/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 if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/cron/job/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, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\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 if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\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 isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\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 authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, 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} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && 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 const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, 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 isMinimalMode\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 (!isMinimalMode) {\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 (!(isMinimalMode && 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, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n 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} ${srcPage}`,\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 const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\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 { NextResponse } from \"next/server\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\n\nexport async function POST(req: Request) {\n const body = (await req.json()) as { id?: string; action?: string };\n const id = String(body.id ?? \"\").trim();\n const action = String(body.action ?? \"\").trim();\n\n if (!id) return NextResponse.json({ ok: false, error: \"id is required\" }, { status: 400 });\n if (![\"enable\", \"disable\", \"run\"].includes(action)) {\n return NextResponse.json({ ok: false, error: \"action must be enable|disable|run\" }, { status: 400 });\n }\n\n if (action === \"run\") {\n const result = await runOpenClaw([\"cron\", \"run\", id, \"--json\"]);\n if (!result.ok) return NextResponse.json({ ok: false, error: result.stderr || result.stdout }, { status: 500 });\n return NextResponse.json({ ok: true, action, id, result });\n }\n\n const result = await runOpenClaw([\"cron\", action, id]);\n if (!result.ok) return NextResponse.json({ ok: false, error: result.stderr || result.stdout }, { status: 500 });\n return NextResponse.json({ ok: true, action, id, result });\n}\n"],"names":[],"mappings":"m/BAUO,SAAS,IACd,IAAM,EAAO,WAA6D,iBAAiB,CAC3F,GAAI,CAAC,EACH,GADQ,GACF,AAAI,MACR,gIAGJ,OAAO,CACT,iNClBA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAGA,IAAM,EAAgB,CAAA,EAAA,AAFtB,EAAA,CAAA,CAAA,OAEsB,SAAA,AAAS,EAAC,EAAA,QAAQ,EASxC,SAAS,EAAc,CAAyB,QAC9C,AAA0B,UAAtB,AAAgC,OAAzB,EAAI,MAAM,CAAsB,EAAI,MAAM,CACjD,EAAI,MAAM,EAA0B,UAAtB,OAAO,EAAI,MAAM,EAAiB,aAAc,EAAI,MAAM,CACnE,CADqE,MAC7D,EAAI,MAAM,CAAgC,QAAQ,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AAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,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":[2]}
@@ -0,0 +1,3 @@
1
+ module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.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,t,r)=>{t.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,t,r)=>{t.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,t,r)=>{t.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"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},12057,(e,t,r)=>{t.exports=e.x("node:util",()=>require("node:util"))},59494,e=>{"use strict";function t(){let e=globalThis.__clawkitchen_api;if(!e)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return e}e.s(["getKitchenApi",()=>t])},5003,e=>{"use strict";var t=e.i(59494),r=e.i(74533);let n=(0,e.i(12057).promisify)(r.execFile);function a(e){return"string"==typeof e.stdout?e.stdout:e.stdout&&"object"==typeof e.stdout&&"toString"in e.stdout?String(e.stdout.toString()):""}function s(e,t){return"string"==typeof e.stderr?e.stderr:e.stderr&&"object"==typeof e.stderr&&"toString"in e.stderr?String(e.stderr.toString()):"string"==typeof e.message?e.message:String(t)}function i(e){let t=e.trim();if(!t)return e;let r=t[0];if("["===r||"{"===r||'"'===r)return e;let n=t.split("\n"),a=n.findIndex(e=>/^\s*[[\{"]/.test(e));if(a>0){let e=n.slice(a).join("\n");try{return JSON.parse(e),e}catch{}}return e}async function o(e,t={}){let{sanitizeStdout:r=!0}=t;try{process.platform;let t=await n("openclaw",e,{timeout:12e4,windowsHide:!0,maxBuffer:0xa00000}),a=String(t.stdout??"");return{ok:!0,exitCode:0,stdout:r?i(a):a,stderr:String(t.stderr??"")}}catch(t){let e="number"==typeof t.code?t.code:1;return{ok:!1,exitCode:e,stdout:a(t),stderr:s(t,t)}}}function l(e){let t=e.trim();if(!t)return null;try{return JSON.parse(t)}catch{}let r=t.split("\n"),n=r.findIndex(e=>/^\s*[[\{]/.test(e));if(n>=0){let e=r.slice(n).join("\n");try{return JSON.parse(e)}catch{}}for(let e=r.length-1;e>=0;e--)if(/^\s*[\]}]/.test(r[e])){for(let t=e;t>=0;t--)if(/^\s*[[\{]/.test(r[t]))try{return JSON.parse(r.slice(t,e+1).join("\n"))}catch{}}return null}async function u(e){return o(e,{sanitizeStdout:!1})}async function d(e){if("cron"===e[0]||"recipes"===e[0]&&"workflows"===e[1]&&["runner-once","runner-tick","worker-tick"].includes(e[2]))return o(e);let r=(0,t.getKitchenApi)();try{let t=await r.runtime.system.runCommandWithTimeout(["openclaw",...e],{timeoutMs:12e4}),n=i(String(t.stdout??"")),a=String(t.stderr??""),s="number"==typeof t.exitCode?t.exitCode:"number"==typeof t.code?t.code:"number"==typeof t.status?t.status:0;if(0!==s)return{ok:!1,exitCode:s,stdout:n,stderr:a};return{ok:!0,exitCode:0,stdout:n,stderr:a}}catch(t){let e="number"==typeof t.code?t.code:1;return{ok:!1,exitCode:e,stdout:a(t),stderr:s(t,t)}}}e.s(["extractJson",()=>l,"runOpenClaw",()=>d,"runOpenClawRaw",()=>u])},11628,e=>{"use strict";var t=e.i(50227);function r(e){let r=e.replace(/\\/g,"/").match(/^(.*\/workspace-([^\/]+))\/roles\/([^\/]+)\/?$/);if(!r)return{kind:"other"};let n=r[1],a=r[2],s=r[3],i=t.default.join(n,"roles",s);return{kind:"teamRole",teamDir:n,teamId:a,roleDir:i,role:s}}e.s(["parseTeamRoleWorkspace",()=>r])},86045,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),s=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),h=e.i(54468),x=e.i(10372),g=e.i(93695);e.i(52474);var m=e.i(220),w=e.i(12714),R=e.i(50227),y=e.i(89171),v=e.i(5003),C=e.i(11628);async function E(e){try{let{stdout:t}=await (0,v.runOpenClaw)(["agents","list","--json"]),r=JSON.parse(t).find(t=>t.id===e);return r?.workspace?String(r.workspace):null}catch{return null}}async function k(e){let t=R.default.join(e.teamDir,".trash","roles"),r=new Date().toISOString().replace(/[:.]/g,"-"),n=R.default.join(t,`${e.role}-${r}`);try{await w.default.mkdir(t,{recursive:!0}),await w.default.rename(e.roleDir,n)}catch{try{await w.default.rm(e.roleDir,{recursive:!0,force:!0})}catch{}}}async function S(e,{params:t}){try{let{id:e}=await t,r=String(e??"").trim();if(!r)return y.NextResponse.json({ok:!1,error:"agent id is required"},{status:400});let n=await E(r),a=await (0,v.runOpenClaw)(["agents","delete",r,"--force","--json"]);if(!a.ok)return y.NextResponse.json({ok:!1,error:`Failed to delete agent: ${r}`,stderr:a.stderr||void 0,stdout:a.stdout||void 0},{status:500});let s=null;try{s=JSON.parse(a.stdout)}catch{s=null}if(n){let e=(0,C.parseTeamRoleWorkspace)(n);"teamRole"===e.kind&&await k(e)}return y.NextResponse.json({ok:!0,result:s??a.stdout})}catch(e){return y.NextResponse.json({ok:!1,error:"Failed to delete agent",message:e instanceof Error?e.message:String(e)},{status:500})}}e.s(["DELETE",()=>S],25625);var b=e.i(25625);let N=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/agents/[id]/route",pathname:"/api/agents/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agents/[id]/route.ts",nextConfigOutput:"standalone",userland:b}),{workAsyncStorage:O,workUnitAsyncStorage:A,serverHooks:j}=N;function T(){return(0,n.patchFetch)({workAsyncStorage:O,workUnitAsyncStorage:A})}async function q(e,t,n){N.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/agents/[id]/route";w=w.replace(/\/index$/,"")||"/";let R=await N.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:y,params:v,nextConfig:C,parsedUrl:E,isDraftMode:k,prerenderManifest:S,routerServerContext:b,isOnDemandRevalidate:O,revalidateOnlyGenerated:A,resolvedPathname:j,clientReferenceManifest:T,serverActionsManifest:q}=R,_=(0,o.normalizeAppPath)(w),P=!!(S.dynamicRoutes[_]||S.routes[j]),I=async()=>((null==b?void 0:b.render404)?await b.render404(e,t,E,!1):t.end("This page could not be found"),null);if(P&&!k){let e=!!S.routes[j],t=S.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(C.experimental.adapterPath)return await I();throw new g.NoFallbackError}}let D=null;!P||N.isDev||k||(D="/index"===(D=j)?"/":D);let H=!0===N.isDev||!P,U=P&&!H;q&&T&&(0,i.setManifestsSingleton)({page:w,clientReferenceManifest:T,serverActionsManifest:q});let M=e.method||"GET",$=(0,s.getTracer)(),K=$.getActiveScopeSpan(),F={params:v,prerenderManifest:S,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:H,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:C.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>N.onRequestError(e,t,n,a,b)},sharedContext:{buildId:y}},J=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),L=u.NextRequestAdapter.fromNodeNextRequest(J,(0,u.signalFromNodeResponse)(t));try{let i=async e=>N.handle(L,F).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${w}`)}),o=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var s,l;let u=async({previousCacheEntry:r})=>{try{if(!o&&O&&A&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=F.renderOpts.fetchMetrics;let l=F.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let u=F.renderOpts.collectedTags;if(!P)return await (0,p.sendResponse)(J,B,s,F.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(s.headers);u&&(t[x.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==F.renderOpts.collectedRevalidate&&!(F.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&F.renderOpts.collectedRevalidate,n=void 0===F.renderOpts.collectedExpire||F.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:F.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await N.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:O})},!1,b),t}},d=await N.handleResponse({req:e,nextConfig:C,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:A,responseGenerator:u,waitUntil:n.waitUntil,isMinimalMode:o});if(!P)return null;if((null==d||null==(s=d.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",O?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),k&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let g=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return o&&P||g.delete(x.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||g.get("Cache-Control")||g.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(J,B,new Response(d.value.body,{headers:g,status:d.value.status||200})),null};K?await l(K):await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${M} ${w}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await N.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:O})},!1,b),P)throw t;return await (0,p.sendResponse)(J,B,new Response(null,{status:500})),null}}e.s(["handler",()=>q,"patchFetch",()=>T,"routeModule",()=>N,"serverHooks",()=>j,"workAsyncStorage",()=>O,"workUnitAsyncStorage",()=>A],86045)}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__343776df._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/kitchen-api.ts","../../../src/lib/openclaw.ts","../../../src/lib/agent-workspace.ts","../../../src/app/api/agents/%5Bid%5D/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { getKitchenApi } from \"@/lib/kitchen-api\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst execFileAsync = promisify(execFile);\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nfunction extractStdout(err: { stdout?: unknown }): string {\n if (typeof err.stdout === \"string\") return err.stdout;\n if (err.stdout && typeof err.stdout === \"object\" && \"toString\" in err.stdout) {\n return String((err.stdout as { toString: () => string }).toString());\n }\n return \"\";\n}\n\nfunction resolveExitCode(res: { exitCode?: unknown; code?: unknown; status?: unknown }): number {\n if (typeof res.exitCode === \"number\") return res.exitCode;\n if (typeof res.code === \"number\") return res.code;\n if (typeof res.status === \"number\") return res.status;\n return 0;\n}\n\nfunction extractStderr(err: { stderr?: unknown; message?: unknown }, fallback: unknown): string {\n if (typeof err.stderr === \"string\") return err.stderr;\n if (err.stderr && typeof err.stderr === \"object\" && \"toString\" in err.stderr) {\n return String((err.stderr as { toString: () => string }).toString());\n }\n if (typeof err.message === \"string\") return err.message;\n return String(fallback);\n}\n\n/**\n * Strip non-JSON diagnostic lines from stdout.\n *\n * OpenClaw may print plugin/doctor/diagnostic lines to stdout before the\n * actual JSON payload (e.g. \"[doctor] ...\", \"[plugins] ...\", \"🦞 OpenClaw ...\").\n * This breaks callers that do JSON.parse(stdout).\n *\n * If stdout looks like it contains a JSON payload with leading noise, strip the\n * noise lines. Otherwise return as-is (non-JSON commands like `config get` may\n * return plain text).\n */\nfunction sanitizeStdout(raw: string): string {\n const trimmed = raw.trim();\n if (!trimmed) return raw;\n\n // Fast path: already starts with JSON\n const firstChar = trimmed[0];\n if (firstChar === \"[\" || firstChar === \"{\" || firstChar === '\"') return raw;\n\n // Look for the first line starting with a JSON token\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{\"]/.test(l));\n if (jsonStartIdx > 0) {\n // Verify the remainder is valid JSON before stripping\n const candidate = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n JSON.parse(candidate);\n return candidate;\n } catch {\n // Not valid JSON after stripping — return original\n }\n }\n\n return raw;\n}\n\nasync function runOpenClawLocal(args: string[], options: { sanitizeStdout?: boolean } = {}): Promise<OpenClawExecResult> {\n const { sanitizeStdout: shouldSanitize = true } = options;\n \n try {\n const isWindows = process.platform === \"win32\";\n const res = await execFileAsync(\"openclaw\", args, {\n timeout: 120000,\n windowsHide: true,\n maxBuffer: 10 * 1024 * 1024,\n // Windows requires shell:true to resolve executables on PATH via PATHEXT.\n // Without it, execFile throws ENOENT even when openclaw is installed globally.\n ...(isWindows ? { shell: true } : {}),\n });\n\n const rawStdout = String(res.stdout ?? \"\");\n \n return {\n ok: true,\n exitCode: 0,\n stdout: shouldSanitize ? sanitizeStdout(rawStdout) : rawStdout,\n stderr: String(res.stderr ?? \"\"),\n };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n\n/**\n * Extract a JSON payload from stdout that may contain non-JSON diagnostic lines\n * (e.g. [doctor], [plugins], [recipes] log lines before the actual JSON).\n * Returns the parsed value or null if no JSON found.\n */\nexport function extractJson<T = unknown>(stdout: string): T | null {\n const trimmed = stdout.trim();\n if (!trimmed) return null;\n\n // Fast path: pure JSON\n try {\n return JSON.parse(trimmed) as T;\n } catch {\n // fall through\n }\n\n // Find the first line starting with [ or { (JSON array/object)\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{]/.test(l));\n if (jsonStartIdx >= 0) {\n const jsonSlice = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n return JSON.parse(jsonSlice) as T;\n } catch {\n // fall through\n }\n }\n\n // Last resort: find the last JSON block (scan from end)\n for (let i = lines.length - 1; i >= 0; i--) {\n if (/^\\s*[\\]}]/.test(lines[i])) {\n // Walk backward to find the matching open\n for (let j = i; j >= 0; j--) {\n if (/^\\s*[[\\{]/.test(lines[j])) {\n try {\n return JSON.parse(lines.slice(j, i + 1).join(\"\\n\")) as T;\n } catch {\n // continue searching\n }\n }\n }\n }\n }\n\n return null;\n}\n\n/**\n * Run OpenClaw without stdout sanitization (for raw text output like recipe markdown)\n */\nexport async function runOpenClawRaw(args: string[]): Promise<OpenClawExecResult> {\n // Always use local exec for raw content to avoid Kitchen runtime restrictions\n return runOpenClawLocal(args, { sanitizeStdout: false });\n}\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // In some Kitchen runtime contexts, `api.runtime.system.runCommandWithTimeout`\n // is executed with a restricted allowlist that does not include the `cron` tool,\n // causing `openclaw cron ...` to fail with \"Tool not available: cron\".\n //\n // Cron routes need to work in the gateway-run Kitchen environment, so for cron\n // specifically we prefer a local exec (host OpenClaw).\n if (args[0] === \"cron\") return runOpenClawLocal(args);\n\n // Workflow runner/worker commands are long-running orchestration processes that\n // acquire locks and claims. The runtime command wrapper (runCommandWithTimeout)\n // has a 120s hard timeout that can kill these mid-execution, orphaning locks and\n // leaving runs stuck in waiting_workers. Route them through local exec instead.\n if (\n args[0] === \"recipes\" &&\n args[1] === \"workflows\" &&\n [\"runner-once\", \"runner-tick\", \"worker-tick\"].includes(args[2])\n ) {\n return runOpenClawLocal(args);\n }\n\n const api = getKitchenApi();\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = sanitizeStdout(String(res.stdout ?? \"\"));\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n","import path from \"node:path\";\n\nexport function parseTeamRoleWorkspace(ws: string):\n | { kind: \"teamRole\"; teamDir: string; teamId: string; roleDir: string; role: string }\n | { kind: \"other\" } {\n const normalized = ws.replace(/\\\\/g, \"/\");\n const m = normalized.match(/^(.*\\/workspace-([^\\/]+))\\/roles\\/([^\\/]+)\\/?$/);\n if (!m) return { kind: \"other\" };\n const teamDir = m[1];\n const teamId = m[2];\n const role = m[3];\n const roleDir = path.join(teamDir, \"roles\", role);\n return { kind: \"teamRole\", teamDir, teamId, roleDir, role };\n}\n","import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { NextResponse } from \"next/server\";\n\nimport { runOpenClaw } from \"@/lib/openclaw\";\nimport { parseTeamRoleWorkspace } from \"@/lib/agent-workspace\";\n\nasync function resolveAgentWorkspace(agentId: string): Promise<string | null> {\n try {\n const { stdout } = await runOpenClaw([\"agents\", \"list\", \"--json\"]);\n const list = JSON.parse(stdout) as Array<{ id: string; workspace?: string }>;\n const agent = list.find((a) => a.id === agentId);\n return agent?.workspace ? String(agent.workspace) : null;\n } catch {\n return null;\n }\n}\n\nasync function moveTeamRoleToTrashOrRemove(info: {\n teamDir: string;\n role: string;\n roleDir: string;\n}): Promise<void> {\n const trashDir = path.join(info.teamDir, \".trash\", \"roles\");\n const ts = new Date().toISOString().replace(/[:.]/g, \"-\");\n const dst = path.join(trashDir, `${info.role}-${ts}`);\n try {\n await fs.mkdir(trashDir, { recursive: true });\n await fs.rename(info.roleDir, dst);\n } catch {\n try {\n await fs.rm(info.roleDir, { recursive: true, force: true });\n } catch {\n // ignore\n }\n }\n}\n\nexport async function DELETE(_req: Request, { params }: { params: Promise<{ id: string }> }) {\n try {\n const { id } = await params;\n const agentId = String(id ?? \"\").trim();\n if (!agentId) return NextResponse.json({ ok: false, error: \"agent id is required\" }, { status: 400 });\n\n const workspace = await resolveAgentWorkspace(agentId);\n\n const result = await runOpenClaw([\"agents\", \"delete\", agentId, \"--force\", \"--json\"]);\n if (!result.ok) {\n return NextResponse.json(\n {\n ok: false,\n error: `Failed to delete agent: ${agentId}`,\n stderr: result.stderr || undefined,\n stdout: result.stdout || undefined,\n },\n { status: 500 },\n );\n }\n\n let parsed: unknown = null;\n try {\n parsed = JSON.parse(result.stdout);\n } catch {\n parsed = null;\n }\n\n if (workspace) {\n const info = parseTeamRoleWorkspace(workspace);\n if (info.kind === \"teamRole\") await moveTeamRoleToTrashOrRemove(info);\n }\n\n return NextResponse.json({ ok: true, result: parsed ?? result.stdout });\n } catch (err: unknown) {\n return NextResponse.json(\n {\n ok: false,\n error: \"Failed to delete agent\",\n message: err instanceof Error ? err.message : String(err),\n },\n { status: 500 },\n );\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 { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\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 = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/agents/[id]/route\",\n pathname: \"/api/agents/[id]\",\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]/src/app/api/agents/[id]/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 if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/agents/[id]/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, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\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 if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\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 isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\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 authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, 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} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && 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 const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, 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 isMinimalMode\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 (!isMinimalMode) {\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 (!(isMinimalMode && 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, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n 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} ${srcPage}`,\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 const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\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"],"names":[],"mappings":"uyCAUO,SAAS,IACd,IAAM,EAAO,WAA6D,iBAAiB,CAC3F,GAAI,CAAC,EACH,GADQ,GACF,AAAI,MACR,gIAGJ,OAAO,CACT,qDClBA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAGA,IAAM,EAAgB,CAAA,EAFtB,AAEsB,EAFtB,CAAA,CAAA,OAEsB,SAAA,AAAS,EAAC,EAAA,QAAQ,EASxC,SAAS,EAAc,CAAyB,QAC9C,AAA0B,UAAtB,AAAgC,OAAzB,EAAI,MAAM,CAAsB,EAAI,MAAM,CACjD,EAAI,MAAM,EAA0B,UAAtB,OAAO,EAAI,MAAM,EAAiB,aAAc,EAAI,MAAM,CACnE,CADqE,MAC7D,EAAI,MAAM,CAAgC,QAAQ,IAE5D,EACT,CASA,SAAS,EAAc,CAA4C,CAAE,CAAiB,QACpF,AAA0B,UAAtB,AAAgC,OAAzB,EAAI,MAAM,CAAsB,EAAI,MAAM,CACjD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I,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,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":[4]}
@@ -0,0 +1,13 @@
1
+ module.exports=[40317,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},12057,(e,t,r)=>{t.exports=e.x("node:util",()=>require("node:util"))},59494,e=>{"use strict";function t(){let e=globalThis.__clawkitchen_api;if(!e)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return e}e.s(["getKitchenApi",()=>t])},5003,e=>{"use strict";var t=e.i(59494),r=e.i(74533);let n=(0,e.i(12057).promisify)(r.execFile);function a(e){return"string"==typeof e.stdout?e.stdout:e.stdout&&"object"==typeof e.stdout&&"toString"in e.stdout?String(e.stdout.toString()):""}function i(e,t){return"string"==typeof e.stderr?e.stderr:e.stderr&&"object"==typeof e.stderr&&"toString"in e.stderr?String(e.stderr.toString()):"string"==typeof e.message?e.message:String(t)}function o(e){let t=e.trim();if(!t)return e;let r=t[0];if("["===r||"{"===r||'"'===r)return e;let n=t.split("\n"),a=n.findIndex(e=>/^\s*[[\{"]/.test(e));if(a>0){let e=n.slice(a).join("\n");try{return JSON.parse(e),e}catch{}}return e}async function s(e,t={}){let{sanitizeStdout:r=!0}=t;try{process.platform;let t=await n("openclaw",e,{timeout:12e4,windowsHide:!0,maxBuffer:0xa00000}),a=String(t.stdout??"");return{ok:!0,exitCode:0,stdout:r?o(a):a,stderr:String(t.stderr??"")}}catch(t){let e="number"==typeof t.code?t.code:1;return{ok:!1,exitCode:e,stdout:a(t),stderr:i(t,t)}}}function l(e){let t=e.trim();if(!t)return null;try{return JSON.parse(t)}catch{}let r=t.split("\n"),n=r.findIndex(e=>/^\s*[[\{]/.test(e));if(n>=0){let e=r.slice(n).join("\n");try{return JSON.parse(e)}catch{}}for(let e=r.length-1;e>=0;e--)if(/^\s*[\]}]/.test(r[e])){for(let t=e;t>=0;t--)if(/^\s*[[\{]/.test(r[t]))try{return JSON.parse(r.slice(t,e+1).join("\n"))}catch{}}return null}async function d(e){return s(e,{sanitizeStdout:!1})}async function u(e){if("cron"===e[0]||"recipes"===e[0]&&"workflows"===e[1]&&["runner-once","runner-tick","worker-tick"].includes(e[2]))return s(e);let r=(0,t.getKitchenApi)();try{let t=await r.runtime.system.runCommandWithTimeout(["openclaw",...e],{timeoutMs:12e4}),n=o(String(t.stdout??"")),a=String(t.stderr??""),i="number"==typeof t.exitCode?t.exitCode:"number"==typeof t.code?t.code:"number"==typeof t.status?t.status:0;if(0!==i)return{ok:!1,exitCode:i,stdout:n,stderr:a};return{ok:!0,exitCode:0,stdout:n,stderr:a}}catch(t){let e="number"==typeof t.code?t.code:1;return{ok:!1,exitCode:e,stdout:a(t),stderr:i(t,t)}}}e.s(["extractJson",()=>l,"runOpenClaw",()=>u,"runOpenClawRaw",()=>d])},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.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,t,r)=>{t.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,t,r)=>{t.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,t,r)=>{t.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"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},7367,e=>{"use strict";var t=e.i(12714),r=e.i(60526),n=e.i(50227);async function a(){let e=n.default.join(r.default.homedir(),".openclaw","openclaw.json");return JSON.parse(await t.default.readFile(e,"utf8"))}async function i(){let e=await a(),t=e.agents?.defaults?.workspace;if(!t)throw Error("agents.defaults.workspace is not set in ~/.openclaw/openclaw.json");return t}async function o(){let e=await i();return n.default.join(e,"recipes")}async function s(){let e=await i(),r=n.default.join(e,"goals");try{if((await t.default.stat(r)).isDirectory())return r}catch{}return n.default.join(e,"notes","goals")}async function l(e){let t=r.default.homedir();if(!t)throw Error("Could not resolve home directory");return n.default.join(t,".openclaw",`workspace-${e}`)}function d(e,t){return"main"===t?n.default.resolve(e):n.default.resolve(e,"..",`workspace-${t}`)}function u(e){let t=e.replace(/\\/g,"/");if(!t||t.startsWith("/")||t.includes(".."))throw Error("Invalid file name");return t}async function c(){let e=await a(),t=e.plugins?.installs?.recipes?.installPath||e.plugins?.installs?.recipes?.sourcePath||e.plugins?.load?.paths?.[0];if(!t)throw Error("Could not determine recipes plugin install path from ~/.openclaw/openclaw.json");return n.default.join(t,"recipes","default")}e.s(["assertSafeRelativeFileName",()=>u,"getBuiltinRecipesDir",()=>c,"getTeamWorkspaceDir",()=>l,"getWorkspaceDir",()=>i,"getWorkspaceGoalsDir",()=>s,"getWorkspaceRecipesDir",()=>o,"readOpenClawConfig",()=>a,"teamDirFromBaseWorkspace",()=>d])},64121,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),i=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),w=e.i(54468),h=e.i(10372),g=e.i(93695);e.i(52474);var m=e.i(220),x=e.i(12714),y=e.i(50227),k=e.i(89171),R=e.i(5003),v=e.i(7367),C=e.i(40317);async function S(e){try{let t=await x.default.readFile(e,"utf8"),r=JSON.parse(t);if(!r||1!==r.version||!r.entries)return{version:1,entries:{}};return r}catch{return{version:1,entries:{}}}}async function E(e,t){await x.default.mkdir(y.default.dirname(e),{recursive:!0}),await x.default.writeFile(e,JSON.stringify(t,null,2)+"\n","utf8")}function j(e){return y.default.join(e,"notes","cron-jobs.json")}async function I(e){let t=await (0,v.getTeamWorkspaceDir)(e),r=y.default.join(t,"shared-context","workflows"),n=[];try{n=(await x.default.readdir(r)).filter(e=>e.endsWith(".workflow.json"))}catch{return[]}let a=[];for(let e of n)try{let t=await x.default.readFile(y.default.join(r,e),"utf8"),n=JSON.parse(t);for(let e of Array.isArray(n.nodes)?n.nodes:[]){let t=String(e.type??"");if("start"===t||"end"===t)continue;let r=e.config,n=r&&"object"==typeof r&&!Array.isArray(r)?r:{},i=String(n.agentId??"").trim();i&&a.push(i)}}catch{}return Array.from(new Set(a))}async function b(e,t){let r=j(await (0,v.getTeamWorkspaceDir)(e)),n=`team:${e}:recipe:workflow-worker:cron:${t}`,a=Date.now(),i=await S(r),o=i.entries[n];if(o&&o.installedCronId&&!o.orphaned)return await (0,R.runOpenClaw)(["cron","enable",String(o.installedCronId)]),{alreadyInstalled:!0,installedCronId:String(o.installedCronId),mappingPath:r,key:n};let s=`workflow-worker:${e}:${t}`,l=`Workflow worker tick (${t}).
2
+
3
+ Run exactly one shell command using the exec tool.
4
+
5
+ Command:
6
+ bash -lc 'openclaw recipes workflows worker-tick --team-id ${e} --agent-id ${t} --limit 5 --worker-id cron'
7
+
8
+ Rules:
9
+ - Execute with exec and wait for completion.
10
+ - If it succeeds, respond exactly: NO_REPLY
11
+ - If it fails, respond with one short error line.`,d=await (0,R.runOpenClaw)(["cron","add","--agent","main","--cron","*/15 * * * *","--name",s,"--description","Workflow worker cron (Kitchen)","--message",l,"--no-deliver","--json"]);if(!d.ok)throw Error(d.stderr||d.stdout||"Failed to add cron");let u=JSON.parse(String(d.stdout??"{}")),c=String(u?.id??u?.job?.id??"").trim();if(!c)throw Error("Cron add succeeded but did not return id");return i.entries[n]={installedCronId:c,updatedAtMs:a},await E(r,i),{alreadyInstalled:!1,installedCronId:c,mappingPath:r,key:n}}async function N(e){let t=j(await (0,v.getTeamWorkspaceDir)(e)),r=`team:${e}:recipe:workflow-runner:cron:main`,n=await S(t),a=n.entries[r];if(a&&!a.orphaned)return{alreadyInstalled:!0,installedCronId:a.installedCronId,mappingPath:t,key:r};let i=`workflow-runner-tick:${e}`,o=`Runner tick (workflow executor): openclaw recipes workflows runner-tick --team-id ${e} --concurrency 4 --lease-seconds 900`,s=JSON.parse((await (0,R.runOpenClaw)(["cron","add","--name",i,"--agent","main","--session","isolated","--cron","*/15 * * * *","--tz","America/New_York","--no-deliver","--message",o,"--model","anthropic/claude-sonnet-4-20250514","--timeout-seconds","900","--json"])).stdout).id,l=Date.now();return n.entries[r]={installedCronId:s,updatedAtMs:l},await E(t,n),{alreadyInstalled:!1,installedCronId:s,mappingPath:t,key:r}}async function O(e){try{let t=await e.json(),r=String(t.action??"").trim(),n=String(t.teamId??"").trim(),a=String(t.agentId??"").trim();if(!n)return k.NextResponse.json({ok:!1,error:"teamId is required"},{status:400});if("install"===r){if(!a)return k.NextResponse.json({ok:!1,error:"agentId is required"},{status:400});let e=await b(n,a);return k.NextResponse.json({ok:!0,action:r,teamId:n,agentId:a,...e})}if("reconcile"===r){let e=await (0,v.getTeamWorkspaceDir)(n),t=j(e),a=await I(n),i=[];for(let e of a){let t=await b(n,e);i.push({agentId:e,installedCronId:t.installedCronId,alreadyInstalled:t.alreadyInstalled})}let o=null;if(a.length>0){let e=await N(n);o={agentId:"main",installedCronId:e.installedCronId,alreadyInstalled:e.alreadyInstalled}}let s=[],l=await S(t),d=`team:${n}:recipe:workflow-worker:cron:`,u=!1;for(let[e,t]of Object.entries(l.entries)){if(!e.startsWith(d))continue;let r=e.slice(d.length);if(!a.includes(r)&&t&&!t.orphaned){let n=String(t.installedCronId??"").trim();n&&await (0,R.runOpenClaw)(["cron","disable",n]),l.entries[e]={...t,orphaned:!0,updatedAtMs:Date.now()},s.push({agentId:r,installedCronId:n,key:e}),u=!0}}return u&&await E(t,l),k.NextResponse.json({ok:!0,action:r,teamId:n,requiredAgentIds:a,installed:i,runnerInstalled:o,disabled:s})}return k.NextResponse.json({ok:!1,error:"action must be install|reconcile"},{status:400})}catch(e){return k.NextResponse.json({ok:!1,error:(0,C.errorMessage)(e)},{status:500})}}e.s(["POST",()=>O],53396);var A=e.i(53396);let T=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/cron/worker/route",pathname:"/api/cron/worker",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/cron/worker/route.ts",nextConfigOutput:"standalone",userland:A}),{workAsyncStorage:P,workUnitAsyncStorage:q,serverHooks:D}=T;function _(){return(0,n.patchFetch)({workAsyncStorage:P,workUnitAsyncStorage:q})}async function $(e,t,n){T.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let x="/api/cron/worker/route";x=x.replace(/\/index$/,"")||"/";let y=await T.prepare(e,t,{srcPage:x,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:k,params:R,nextConfig:v,parsedUrl:C,isDraftMode:S,prerenderManifest:E,routerServerContext:j,isOnDemandRevalidate:I,revalidateOnlyGenerated:b,resolvedPathname:N,clientReferenceManifest:O,serverActionsManifest:A}=y,P=(0,s.normalizeAppPath)(x),q=!!(E.dynamicRoutes[P]||E.routes[N]),D=async()=>((null==j?void 0:j.render404)?await j.render404(e,t,C,!1):t.end("This page could not be found"),null);if(q&&!S){let e=!!E.routes[N],t=E.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(v.experimental.adapterPath)return await D();throw new g.NoFallbackError}}let _=null;!q||T.isDev||S||(_="/index"===(_=N)?"/":_);let $=!0===T.isDev||!q,H=q&&!$;A&&O&&(0,o.setManifestsSingleton)({page:x,clientReferenceManifest:O,serverActionsManifest:A});let M=e.method||"GET",W=(0,i.getTracer)(),F=W.getActiveScopeSpan(),U={params:R,prerenderManifest:E,renderOpts:{experimental:{authInterrupts:!!v.experimental.authInterrupts},cacheComponents:!!v.cacheComponents,supportsDynamicResponse:$,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:v.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>T.onRequestError(e,t,n,a,j)},sharedContext:{buildId:k}},K=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),B=d.NextRequestAdapter.fromNodeNextRequest(K,(0,d.signalFromNodeResponse)(t));try{let o=async e=>T.handle(B,U).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=W.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${x}`)}),s=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var i,l;let d=async({previousCacheEntry:r})=>{try{if(!s&&I&&b&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await o(a);e.fetchMetrics=U.renderOpts.fetchMetrics;let l=U.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=U.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(K,J,i,U.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);d&&(t[h.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,n=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await T.onRequestError(e,t,{routerKind:"App Router",routePath:x,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:I})},!1,j),t}},u=await T.handleResponse({req:e,nextConfig:v,cacheKey:_,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:E,isRoutePPREnabled:!1,isOnDemandRevalidate:I,revalidateOnlyGenerated:b,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:s});if(!q)return null;if((null==u||null==(i=u.value)?void 0:i.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",I?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let g=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&q||g.delete(h.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||g.get("Cache-Control")||g.set("Cache-Control",(0,w.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(K,J,new Response(u.value.body,{headers:g,status:u.value.status||200})),null};F?await l(F):await W.withPropagatedContext(e.headers,()=>W.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${x}`,kind:i.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await T.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:I})},!1,j),q)throw t;return await (0,p.sendResponse)(K,J,new Response(null,{status:500})),null}}e.s(["handler",()=>$,"patchFetch",()=>_,"routeModule",()=>T,"serverHooks",()=>D,"workAsyncStorage",()=>P,"workUnitAsyncStorage",()=>q],64121)}];
12
+
13
+ //# sourceMappingURL=%5Broot-of-the-server%5D__35ec765d._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/errors.ts","../../../src/lib/kitchen-api.ts","../../../src/lib/openclaw.ts","../../../src/lib/paths.ts","../../../src/app/api/cron/worker/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Extracts a string message from an unknown error value.\n * Used consistently across API routes and client components.\n */\nexport function errorMessage(e: unknown): string {\n return e instanceof Error ? e.message : String(e);\n}\n","// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { getKitchenApi } from \"@/lib/kitchen-api\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst execFileAsync = promisify(execFile);\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nfunction extractStdout(err: { stdout?: unknown }): string {\n if (typeof err.stdout === \"string\") return err.stdout;\n if (err.stdout && typeof err.stdout === \"object\" && \"toString\" in err.stdout) {\n return String((err.stdout as { toString: () => string }).toString());\n }\n return \"\";\n}\n\nfunction resolveExitCode(res: { exitCode?: unknown; code?: unknown; status?: unknown }): number {\n if (typeof res.exitCode === \"number\") return res.exitCode;\n if (typeof res.code === \"number\") return res.code;\n if (typeof res.status === \"number\") return res.status;\n return 0;\n}\n\nfunction extractStderr(err: { stderr?: unknown; message?: unknown }, fallback: unknown): string {\n if (typeof err.stderr === \"string\") return err.stderr;\n if (err.stderr && typeof err.stderr === \"object\" && \"toString\" in err.stderr) {\n return String((err.stderr as { toString: () => string }).toString());\n }\n if (typeof err.message === \"string\") return err.message;\n return String(fallback);\n}\n\n/**\n * Strip non-JSON diagnostic lines from stdout.\n *\n * OpenClaw may print plugin/doctor/diagnostic lines to stdout before the\n * actual JSON payload (e.g. \"[doctor] ...\", \"[plugins] ...\", \"🦞 OpenClaw ...\").\n * This breaks callers that do JSON.parse(stdout).\n *\n * If stdout looks like it contains a JSON payload with leading noise, strip the\n * noise lines. Otherwise return as-is (non-JSON commands like `config get` may\n * return plain text).\n */\nfunction sanitizeStdout(raw: string): string {\n const trimmed = raw.trim();\n if (!trimmed) return raw;\n\n // Fast path: already starts with JSON\n const firstChar = trimmed[0];\n if (firstChar === \"[\" || firstChar === \"{\" || firstChar === '\"') return raw;\n\n // Look for the first line starting with a JSON token\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{\"]/.test(l));\n if (jsonStartIdx > 0) {\n // Verify the remainder is valid JSON before stripping\n const candidate = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n JSON.parse(candidate);\n return candidate;\n } catch {\n // Not valid JSON after stripping — return original\n }\n }\n\n return raw;\n}\n\nasync function runOpenClawLocal(args: string[], options: { sanitizeStdout?: boolean } = {}): Promise<OpenClawExecResult> {\n const { sanitizeStdout: shouldSanitize = true } = options;\n \n try {\n const isWindows = process.platform === \"win32\";\n const res = await execFileAsync(\"openclaw\", args, {\n timeout: 120000,\n windowsHide: true,\n maxBuffer: 10 * 1024 * 1024,\n // Windows requires shell:true to resolve executables on PATH via PATHEXT.\n // Without it, execFile throws ENOENT even when openclaw is installed globally.\n ...(isWindows ? { shell: true } : {}),\n });\n\n const rawStdout = String(res.stdout ?? \"\");\n \n return {\n ok: true,\n exitCode: 0,\n stdout: shouldSanitize ? sanitizeStdout(rawStdout) : rawStdout,\n stderr: String(res.stderr ?? \"\"),\n };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n\n/**\n * Extract a JSON payload from stdout that may contain non-JSON diagnostic lines\n * (e.g. [doctor], [plugins], [recipes] log lines before the actual JSON).\n * Returns the parsed value or null if no JSON found.\n */\nexport function extractJson<T = unknown>(stdout: string): T | null {\n const trimmed = stdout.trim();\n if (!trimmed) return null;\n\n // Fast path: pure JSON\n try {\n return JSON.parse(trimmed) as T;\n } catch {\n // fall through\n }\n\n // Find the first line starting with [ or { (JSON array/object)\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{]/.test(l));\n if (jsonStartIdx >= 0) {\n const jsonSlice = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n return JSON.parse(jsonSlice) as T;\n } catch {\n // fall through\n }\n }\n\n // Last resort: find the last JSON block (scan from end)\n for (let i = lines.length - 1; i >= 0; i--) {\n if (/^\\s*[\\]}]/.test(lines[i])) {\n // Walk backward to find the matching open\n for (let j = i; j >= 0; j--) {\n if (/^\\s*[[\\{]/.test(lines[j])) {\n try {\n return JSON.parse(lines.slice(j, i + 1).join(\"\\n\")) as T;\n } catch {\n // continue searching\n }\n }\n }\n }\n }\n\n return null;\n}\n\n/**\n * Run OpenClaw without stdout sanitization (for raw text output like recipe markdown)\n */\nexport async function runOpenClawRaw(args: string[]): Promise<OpenClawExecResult> {\n // Always use local exec for raw content to avoid Kitchen runtime restrictions\n return runOpenClawLocal(args, { sanitizeStdout: false });\n}\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // In some Kitchen runtime contexts, `api.runtime.system.runCommandWithTimeout`\n // is executed with a restricted allowlist that does not include the `cron` tool,\n // causing `openclaw cron ...` to fail with \"Tool not available: cron\".\n //\n // Cron routes need to work in the gateway-run Kitchen environment, so for cron\n // specifically we prefer a local exec (host OpenClaw).\n if (args[0] === \"cron\") return runOpenClawLocal(args);\n\n // Workflow runner/worker commands are long-running orchestration processes that\n // acquire locks and claims. The runtime command wrapper (runCommandWithTimeout)\n // has a 120s hard timeout that can kill these mid-execution, orphaning locks and\n // leaving runs stuck in waiting_workers. Route them through local exec instead.\n if (\n args[0] === \"recipes\" &&\n args[1] === \"workflows\" &&\n [\"runner-once\", \"runner-tick\", \"worker-tick\"].includes(args[2])\n ) {\n return runOpenClawLocal(args);\n }\n\n const api = getKitchenApi();\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = sanitizeStdout(String(res.stdout ?? \"\"));\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n","import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\ntype OpenClawConfig = {\n agents?: { defaults?: { workspace?: string } };\n gateway?: { port?: number; auth?: { token?: string } };\n tools?: {\n agentToAgent?: {\n enabled?: boolean;\n allow?: string[];\n };\n };\n plugins?: {\n installs?: { recipes?: { installPath?: string; sourcePath?: string } };\n load?: { paths?: string[] };\n };\n // OpenClaw message routing bindings (used for HITL approvals, etc.)\n bindings?: unknown[];\n};\n\nexport async function readOpenClawConfig(): Promise<OpenClawConfig> {\n const p = path.join(os.homedir(), \".openclaw\", \"openclaw.json\");\n const text = await fs.readFile(p, \"utf8\");\n return JSON.parse(text) as OpenClawConfig;\n}\n\nexport async function getWorkspaceDir() {\n const cfg = await readOpenClawConfig();\n const ws = cfg.agents?.defaults?.workspace;\n if (!ws) throw new Error(\"agents.defaults.workspace is not set in ~/.openclaw/openclaw.json\");\n return ws;\n}\n\nexport async function getWorkspaceRecipesDir() {\n const ws = await getWorkspaceDir();\n return path.join(ws, \"recipes\");\n}\n\nexport async function getWorkspaceGoalsDir() {\n const ws = await getWorkspaceDir();\n\n // Back-compat: some installs keep goals at <workspace>/goals.\n // Prefer that when present, otherwise fall back to <workspace>/notes/goals.\n const direct = path.join(ws, \"goals\");\n try {\n const st = await fs.stat(direct);\n if (st.isDirectory()) return direct;\n } catch {\n // ignore\n }\n\n return path.join(ws, \"notes\", \"goals\");\n}\n\nexport async function getTeamWorkspaceDir(teamId: string) {\n const home = os.homedir();\n if (!home) throw new Error(\"Could not resolve home directory\");\n return path.join(home, \".openclaw\", `workspace-${teamId}`);\n}\n\n/** Team workspace dir derived from agents.defaults.workspace (sibling: .. / workspace-{teamId}) */\nexport function teamDirFromBaseWorkspace(baseWorkspace: string, teamId: string) {\n // Special-case: treat \"main\" as the personal workspace (agents.defaults.workspace).\n // This lets Kitchen expose a selectable \"main\" scope without creating a separate\n // ~/.openclaw/workspace-main folder.\n if (teamId === \"main\") return path.resolve(baseWorkspace);\n return path.resolve(baseWorkspace, \"..\", `workspace-${teamId}`);\n}\n\n/** Rejects path traversal and empty names; returns normalized name. */\nexport function assertSafeRelativeFileName(name: string): string {\n const n = name.replace(/\\\\/g, \"/\");\n if (!n || n.startsWith(\"/\") || n.includes(\"..\")) throw new Error(\"Invalid file name\");\n return n;\n}\n\nexport async function getBuiltinRecipesDir() {\n const cfg = await readOpenClawConfig();\n const p =\n cfg.plugins?.installs?.recipes?.installPath ||\n cfg.plugins?.installs?.recipes?.sourcePath ||\n cfg.plugins?.load?.paths?.[0];\n if (!p) throw new Error(\"Could not determine recipes plugin install path from ~/.openclaw/openclaw.json\");\n return path.join(p, \"recipes\", \"default\");\n}\n","import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { NextResponse } from \"next/server\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\nimport { getTeamWorkspaceDir } from \"@/lib/paths\";\nimport { errorMessage } from \"@/lib/errors\";\n\n// ---------------------------------------------------------------------------\n// Provenance format — matches ClawRecipes CronMappingStateV1 so both systems\n// read/write the same file and never create duplicates.\n// ---------------------------------------------------------------------------\ntype MappingStateV1 = {\n version: 1;\n entries: Record<string, {\n installedCronId: string;\n specHash?: string;\n orphaned?: boolean;\n updatedAtMs?: number;\n }>;\n};\n\n/**\n * Provenance key — matches the format used by ClawRecipes cron-utils.cronKey()\n * for team-scoped cron jobs. Using the same key format means recipe-installed\n * crons and Kitchen-installed crons share a single namespace and cannot collide.\n */\nfunction workerKey(teamId: string, agentId: string) {\n return `team:${teamId}:recipe:workflow-worker:cron:${agentId}`;\n}\n\nfunction runnerKey(teamId: string) {\n return `team:${teamId}:recipe:workflow-runner:cron:main`;\n}\n\nfunction cronName(teamId: string, agentId: string) {\n return `workflow-worker:${teamId}:${agentId}`;\n}\n\nfunction buildWorkerMessage(teamId: string, agentId: string) {\n return `Workflow worker tick (${agentId}).\\n\\nRun exactly one shell command using the exec tool.\\n\\nCommand:\\nbash -lc 'openclaw recipes workflows worker-tick --team-id ${teamId} --agent-id ${agentId} --limit 5 --worker-id cron'\\n\\nRules:\\n- Execute with exec and wait for completion.\\n- If it succeeds, respond exactly: NO_REPLY\\n- If it fails, respond with one short error line.`;\n}\n\n// ---------------------------------------------------------------------------\n// Single provenance file: <teamDir>/notes/cron-jobs.json\n// ---------------------------------------------------------------------------\n\nasync function readMapping(mappingPath: string): Promise<MappingStateV1> {\n try {\n const raw = await fs.readFile(mappingPath, \"utf8\");\n const parsed = JSON.parse(raw) as MappingStateV1;\n if (!parsed || parsed.version !== 1 || !parsed.entries) return { version: 1, entries: {} };\n return parsed;\n } catch {\n return { version: 1, entries: {} };\n }\n}\n\nasync function writeMapping(mappingPath: string, mapping: MappingStateV1): Promise<void> {\n await fs.mkdir(path.dirname(mappingPath), { recursive: true });\n await fs.writeFile(mappingPath, JSON.stringify(mapping, null, 2) + \"\\n\", \"utf8\");\n}\n\nfunction teamMappingPath(teamDir: string): string {\n return path.join(teamDir, \"notes\", \"cron-jobs.json\");\n}\n\nasync function listTeamWorkflowAgentIds(teamId: string): Promise<string[]> {\n const teamDir = await getTeamWorkspaceDir(teamId);\n const workflowsDir = path.join(teamDir, \"shared-context\", \"workflows\");\n let files: string[] = [];\n try {\n files = (await fs.readdir(workflowsDir)).filter((f) => f.endsWith(\".workflow.json\"));\n } catch {\n return [];\n }\n\n const agentIds: string[] = [];\n for (const f of files) {\n try {\n const raw = await fs.readFile(path.join(workflowsDir, f), \"utf8\");\n const wf = JSON.parse(raw) as { nodes?: Array<{ type?: unknown; config?: unknown }> };\n const nodes = Array.isArray(wf.nodes) ? wf.nodes : [];\n for (const n of nodes) {\n const t = String((n as { type?: unknown }).type ?? \"\");\n if (t === \"start\" || t === \"end\") continue;\n const cfg = (n as { config?: unknown }).config;\n const o = cfg && typeof cfg === \"object\" && !Array.isArray(cfg) ? (cfg as Record<string, unknown>) : {};\n const agentId = String(o.agentId ?? \"\").trim();\n if (agentId) agentIds.push(agentId);\n }\n } catch {\n // ignore invalid workflow files\n }\n }\n return Array.from(new Set(agentIds));\n}\n\nasync function installWorkerCron(teamId: string, agentId: string): Promise<{\n alreadyInstalled: boolean;\n installedCronId: string;\n mappingPath: string;\n key: string;\n}> {\n const teamDir = await getTeamWorkspaceDir(teamId);\n const mp = teamMappingPath(teamDir);\n const key = workerKey(teamId, agentId);\n const now = Date.now();\n\n const mapping = await readMapping(mp);\n const existing = mapping.entries[key];\n if (existing && existing.installedCronId && !existing.orphaned) {\n await runOpenClaw([\"cron\", \"enable\", String(existing.installedCronId)]);\n return { alreadyInstalled: true, installedCronId: String(existing.installedCronId), mappingPath: mp, key };\n }\n\n const name = cronName(teamId, agentId);\n const description = \"Workflow worker cron (Kitchen)\";\n const message = buildWorkerMessage(teamId, agentId);\n\n // Worker crons must run as agentId \"main\" so they have exec tool access\n // to invoke the CLI. The --agent-id flag in the worker-tick command itself\n // determines which agent's queue is drained.\n const add = await runOpenClaw([\n \"cron\",\n \"add\",\n \"--agent\",\n \"main\",\n \"--cron\",\n \"*/15 * * * *\",\n \"--name\",\n name,\n \"--description\",\n description,\n \"--message\",\n message,\n \"--no-deliver\",\n \"--json\",\n ]);\n if (!add.ok) throw new Error(add.stderr || add.stdout || \"Failed to add cron\");\n\n const parsed = JSON.parse(String(add.stdout ?? \"{}\")) as { id?: unknown; job?: { id?: unknown } };\n const installedCronId = String(parsed?.id ?? parsed?.job?.id ?? \"\").trim();\n if (!installedCronId) throw new Error(\"Cron add succeeded but did not return id\");\n\n mapping.entries[key] = { installedCronId, updatedAtMs: now };\n await writeMapping(mp, mapping);\n\n return { alreadyInstalled: false, installedCronId, mappingPath: mp, key };\n}\n\nasync function installRunnerCron(teamId: string): Promise<{\n alreadyInstalled: boolean;\n installedCronId: string;\n mappingPath: string;\n key: string;\n}> {\n const teamDir = await getTeamWorkspaceDir(teamId);\n const mp = teamMappingPath(teamDir);\n const key = runnerKey(teamId);\n const mapping = await readMapping(mp);\n\n // Check if already installed\n const existing = mapping.entries[key];\n if (existing && !existing.orphaned) {\n return { alreadyInstalled: true, installedCronId: existing.installedCronId, mappingPath: mp, key };\n }\n\n // Install new runner-tick cron\n const cronName = `workflow-runner-tick:${teamId}`;\n const message = `Runner tick (workflow executor): openclaw recipes workflows runner-tick --team-id ${teamId} --concurrency 4 --lease-seconds 900`;\n \n const result = await runOpenClaw([\n \"cron\", \"add\",\n \"--name\", cronName,\n \"--agent\", \"main\",\n \"--session\", \"isolated\", \n \"--cron\", \"*/15 * * * *\",\n \"--tz\", \"America/New_York\",\n \"--no-deliver\",\n \"--message\", message,\n \"--model\", \"anthropic/claude-sonnet-4-20250514\",\n \"--timeout-seconds\", \"900\",\n \"--json\"\n ]);\n\n const cronData = JSON.parse(result.stdout) as { id: string };\n const installedCronId = cronData.id;\n const now = Date.now();\n\n mapping.entries[key] = { installedCronId, updatedAtMs: now };\n await writeMapping(mp, mapping);\n\n return { alreadyInstalled: false, installedCronId, mappingPath: mp, key };\n}\n\nexport async function POST(req: Request) {\n try {\n const body = (await req.json()) as { action?: string; teamId?: string; agentId?: string };\n const action = String(body.action ?? \"\").trim();\n const teamId = String(body.teamId ?? \"\").trim();\n const agentId = String(body.agentId ?? \"\").trim();\n\n if (!teamId) return NextResponse.json({ ok: false, error: \"teamId is required\" }, { status: 400 });\n\n if (action === \"install\") {\n if (!agentId) return NextResponse.json({ ok: false, error: \"agentId is required\" }, { status: 400 });\n const res = await installWorkerCron(teamId, agentId);\n return NextResponse.json({ ok: true, action, teamId, agentId, ...res });\n }\n\n if (action === \"reconcile\") {\n const teamDir = await getTeamWorkspaceDir(teamId);\n const mp = teamMappingPath(teamDir);\n const requiredAgentIds = await listTeamWorkflowAgentIds(teamId);\n\n // Install worker-tick crons for each agent\n const installed: Array<{ agentId: string; installedCronId: string; alreadyInstalled: boolean }> = [];\n for (const a of requiredAgentIds) {\n const res = await installWorkerCron(teamId, a);\n installed.push({ agentId: a, installedCronId: res.installedCronId, alreadyInstalled: res.alreadyInstalled });\n }\n\n // Install runner-tick cron for the team (only if there are workflows with agents)\n let runnerInstalled = null;\n if (requiredAgentIds.length > 0) {\n const runnerRes = await installRunnerCron(teamId);\n runnerInstalled = {\n agentId: \"main\",\n installedCronId: runnerRes.installedCronId,\n alreadyInstalled: runnerRes.alreadyInstalled\n };\n }\n\n // Disable orphaned entries for this team in the single team mapping.\n const disabled: Array<{ agentId: string; installedCronId: string; key: string }> = [];\n const mapping = await readMapping(mp);\n const keyPrefix = `team:${teamId}:recipe:workflow-worker:cron:`;\n let changed = false;\n for (const [k, v] of Object.entries(mapping.entries)) {\n if (!k.startsWith(keyPrefix)) continue;\n const agentInKey = k.slice(keyPrefix.length);\n if (requiredAgentIds.includes(agentInKey)) continue;\n if (v && !v.orphaned) {\n const id = String(v.installedCronId ?? \"\").trim();\n if (id) await runOpenClaw([\"cron\", \"disable\", id]);\n mapping.entries[k] = { ...v, orphaned: true, updatedAtMs: Date.now() };\n disabled.push({ agentId: agentInKey, installedCronId: id, key: k });\n changed = true;\n }\n }\n if (changed) await writeMapping(mp, mapping);\n\n return NextResponse.json({ \n ok: true, \n action, \n teamId, \n requiredAgentIds, \n installed, \n runnerInstalled,\n disabled \n });\n }\n\n return NextResponse.json({ ok: false, error: \"action must be install|reconcile\" }, { status: 400 });\n } catch (e: unknown) {\n return NextResponse.json({ ok: false, error: errorMessage(e) }, { status: 500 });\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 { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\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 = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/cron/worker/route\",\n pathname: \"/api/cron/worker\",\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]/src/app/api/cron/worker/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 if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/cron/worker/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, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\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 if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\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 isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\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 authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, 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} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && 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 const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, 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 isMinimalMode\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 (!isMinimalMode) {\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 (!(isMinimalMode && 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, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n 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} ${srcPage}`,\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 const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\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"],"names":[],"mappings":"uCAIO,SAAS,EAAa,CAAU,EACrC,OAAO,aAAa,MAAQ,EAAE,OAAO,CAAG,OAAO,EACjD,iNCIO,SAAS,IACd,IAAM,EAAO,WAA6D,iBAAiB,CAC3F,GAAI,CAAC,EACH,GADQ,GACF,AAAI,MACR,gIAGJ,OAAO,CACT,qDClBA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAGA,IAAM,EAAgB,CAAA,EAAA,AAFtB,EAAA,CAAA,CAAA,OAEsB,SAAA,AAAS,EAAC,EAAA,QAAQ,EASxC,SAAS,EAAc,CAAyB,QACpB,AAA1B,UAAoC,AAAhC,OAAO,EAAI,MAAM,CAAsB,EAAI,MAAM,CACjD,EAAI,MAAM,EAA0B,UAAtB,OAAO,EAAI,MAAM,EAAiB,aAAc,EAAI,MAAM,CACnE,CADqE,MAC7D,EAAI,MAAM,CAAgC,QAAQ,IAE5D,EACT,CASA,SAAS,EAAc,CAA4C,CAAE,CAAiB,QAC1D,AAA1B,UAAoC,AAAhC,OAAO,EAAI,MAAM,CAAsB,EAAI,MAAM,CACjD,EAAI,MAAM,EAA0B,UAAtB,OAAO,EAAI,MAAM,EAAiB,aAAc,EAAI,MAAM,CACnE,CADqE,MAC7D,EAAI,MAAM,CAAgC,QAAQ,IAExC,UAAU,AAAjC,OAAO,EAAI,OAAO,CAAsB,EAAI,OAAO,CAChD,OAAO,EAChB,CAaA,SAAS,EAAe,CAAW,EACjC,IAAM,EAAU,EAAI,IAAI,GACxB,GAAI,CAAC,EAAS,OAAO,EAGrB,IAAM,EAAY,CAAO,CAAC,EAAE,CAC5B,GAAI,AAAc,SAAqB,MAAd,GAAqB,AAAc,QAAK,OAAO,E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AAArB,EAAsB,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[5]}
@@ -1,4 +1,4 @@
1
- module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.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,t,r)=>{t.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,t,r)=>{t.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,t,r)=>{t.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"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},70943,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={getOrigin:function(){return s},resolveArray:function(){return a},resolveAsArrayOrUndefined:function(){return o}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});function a(e){return Array.isArray(e)?e:[e]}function o(e){if(null!=e)return a(e)}function s(e){let t;if("string"==typeof e)try{t=(e=new URL(e)).origin}catch{}return t}},73853,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={resolveManifest:function(){return l},resolveRobots:function(){return o},resolveRouteData:function(){return d},resolveSitemap:function(){return s}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let a=e.r(70943);function o(e){let t="";for(let r of Array.isArray(e.rules)?e.rules:[e.rules]){for(let e of(0,a.resolveArray)(r.userAgent||["*"]))t+=`User-Agent: ${e}
1
+ module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.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,t,r)=>{t.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,t,r)=>{t.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,t,r)=>{t.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"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},70943,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={getOrigin:function(){return s},resolveArray:function(){return a},resolveAsArrayOrUndefined:function(){return o}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});function a(e){return Array.isArray(e)?e:[e]}function o(e){if(null!=e)return a(e)}function s(e){let t;if("string"==typeof e)try{t=(e=new URL(e)).origin}catch{}return t}},82930,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={resolveManifest:function(){return l},resolveRobots:function(){return o},resolveRouteData:function(){return d},resolveSitemap:function(){return s}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let a=e.r(70943);function o(e){let t="";for(let r of Array.isArray(e.rules)?e.rules:[e.rules]){for(let e of(0,a.resolveArray)(r.userAgent||["*"]))t+=`User-Agent: ${e}
2
2
  `;if(r.allow)for(let e of(0,a.resolveArray)(r.allow))t+=`Allow: ${e}
3
3
  `;if(r.disallow)for(let e of(0,a.resolveArray)(r.disallow))t+=`Disallow: ${e}
4
4
  `;r.crawlDelay&&(t+=`Crawl-delay: ${r.crawlDelay}
@@ -13,6 +13,6 @@ module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry
13
13
  `].filter(Boolean).join("\n");if(l.lastModified){let e=l.lastModified instanceof Date?l.lastModified.toISOString():l.lastModified;i+=`<lastmod>${e}</lastmod>
14
14
  `}l.changeFrequency&&(i+=`<changefreq>${l.changeFrequency}</changefreq>
15
15
  `),"number"==typeof l.priority&&(i+=`<priority>${l.priority}</priority>
16
- `),i+="</url>\n"}return i+"</urlset>\n"}function l(e){return JSON.stringify(e)}function d(e,t){return"robots"===t?o(e):"sitemap"===t?s(e):"manifest"===t?l(e):""}},22945,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),i=e.i(59756),a=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),v=e.i(26937),m=e.i(10372),h=e.i(93695);e.i(52474);var g=e.i(220),x=e.i(89171);function y(){return{name:"Claw Kitchen",short_name:"Claw Kitchen",description:"Local-first UI for authoring ClawRecipes recipes and scaffolding agents/teams.",start_url:"/",display:"standalone",icons:[{src:"/android-chrome-192x192.png",sizes:"192x192",type:"image/png"},{src:"/android-chrome-512x512.png",sizes:"512x512",type:"image/png"}]}}e.s(["default",()=>y],7718);var w=e.i(73853);async function R(){let e=await y(),t=(0,w.resolveRouteData)(e,"manifest");return new x.NextResponse(t,{headers:{"Content-Type":"application/manifest+json","Cache-Control":"public, max-age=0, must-revalidate"}})}e.s(["GET",()=>R],38813),e.i(38813),e.i(7718),e.s(["GET",()=>R],89300);var _=e.i(89300);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/manifest.webmanifest/route",pathname:"/manifest.webmanifest",filename:"manifest--route-entry",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/manifest--route-entry.js",nextConfigOutput:"standalone",userland:_}),{workAsyncStorage:E,workUnitAsyncStorage:A,serverHooks:$}=b;function C(){return(0,n.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:A})}async function O(e,t,n){b.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let x="/manifest.webmanifest/route";x=x.replace(/\/index$/,"")||"/";let y=await b.prepare(e,t,{srcPage:x,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,params:R,nextConfig:_,parsedUrl:E,isDraftMode:A,prerenderManifest:$,routerServerContext:C,isOnDemandRevalidate:O,revalidateOnlyGenerated:q,resolvedPathname:T,clientReferenceManifest:P,serverActionsManifest:j}=y,N=(0,s.normalizeAppPath)(x),k=!!($.dynamicRoutes[N]||$.routes[T]),S=async()=>((null==C?void 0:C.render404)?await C.render404(e,t,E,!1):t.end("This page could not be found"),null);if(k&&!A){let e=!!$.routes[T],t=$.dynamicRoutes[N];if(t&&!1===t.fallback&&!e){if(_.experimental.adapterPath)return await S();throw new h.NoFallbackError}}let U=null;!k||b.isDev||A||(U="/index"===(U=T)?"/":U);let D=!0===b.isDev||!k,M=k&&!D;j&&P&&(0,o.setManifestsSingleton)({page:x,clientReferenceManifest:P,serverActionsManifest:j});let H=e.method||"GET",I=(0,a.getTracer)(),F=I.getActiveScopeSpan(),K={params:R,prerenderManifest:$,renderOpts:{experimental:{authInterrupts:!!_.experimental.authInterrupts},cacheComponents:!!_.cacheComponents,supportsDynamicResponse:D,incrementalCache:(0,i.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:_.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,i)=>b.onRequestError(e,t,n,i,C)},sharedContext:{buildId:w}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let o=async e=>b.handle(G,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=I.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${H} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${H} ${x}`)}),s=!!(0,i.getRequestMeta)(e,"minimalMode"),l=async i=>{var a,l;let d=async({previousCacheEntry:r})=>{try{if(!s&&O&&q&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(i);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!k)return await (0,p.sendResponse)(L,B,a,K.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(a.headers);d&&(t[m.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:x,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:O})},!1,C),t}},u=await b.handleResponse({req:e,nextConfig:_,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:$,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:q,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:s});if(!k)return null;if((null==u||null==(a=u.value)?void 0:a.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",O?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let h=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&k||h.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||h.get("Cache-Control")||h.set("Cache-Control",(0,v.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(L,B,new Response(u.value.body,{headers:h,status:u.value.status||200})),null};F?await l(F):await I.withPropagatedContext(e.headers,()=>I.trace(u.BaseServerSpan.handleRequest,{spanName:`${H} ${x}`,kind:a.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},l))}catch(t){if(t instanceof h.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:N,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:O})},!1,C),k)throw t;return await (0,p.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>O,"patchFetch",()=>C,"routeModule",()=>b,"serverHooks",()=>$,"workAsyncStorage",()=>E,"workUnitAsyncStorage",()=>A],22945)}];
16
+ `),i+="</url>\n"}return i+"</urlset>\n"}function l(e){return JSON.stringify(e)}function d(e,t){return"robots"===t?o(e):"sitemap"===t?s(e):"manifest"===t?l(e):""}},22945,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),i=e.i(59756),a=e.i(61916),o=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),v=e.i(54468),m=e.i(10372),h=e.i(93695);e.i(52474);var g=e.i(220),x=e.i(89171);function y(){return{name:"Claw Kitchen",short_name:"Claw Kitchen",description:"Local-first UI for authoring ClawRecipes recipes and scaffolding agents/teams.",start_url:"/",display:"standalone",icons:[{src:"/android-chrome-192x192.png",sizes:"192x192",type:"image/png"},{src:"/android-chrome-512x512.png",sizes:"512x512",type:"image/png"}]}}e.s(["default",()=>y],7718);var w=e.i(82930);async function R(){let e=await y(),t=(0,w.resolveRouteData)(e,"manifest");return new x.NextResponse(t,{headers:{"Content-Type":"application/manifest+json","Cache-Control":"public, max-age=0, must-revalidate"}})}e.s(["GET",()=>R],38813),e.i(38813),e.i(7718),e.s(["GET",()=>R],89300);var _=e.i(89300);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/manifest.webmanifest/route",pathname:"/manifest.webmanifest",filename:"manifest--route-entry",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/manifest--route-entry.js",nextConfigOutput:"standalone",userland:_}),{workAsyncStorage:E,workUnitAsyncStorage:A,serverHooks:$}=b;function C(){return(0,n.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:A})}async function O(e,t,n){b.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let x="/manifest.webmanifest/route";x=x.replace(/\/index$/,"")||"/";let y=await b.prepare(e,t,{srcPage:x,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,params:R,nextConfig:_,parsedUrl:E,isDraftMode:A,prerenderManifest:$,routerServerContext:C,isOnDemandRevalidate:O,revalidateOnlyGenerated:q,resolvedPathname:T,clientReferenceManifest:P,serverActionsManifest:j}=y,N=(0,s.normalizeAppPath)(x),k=!!($.dynamicRoutes[N]||$.routes[T]),S=async()=>((null==C?void 0:C.render404)?await C.render404(e,t,E,!1):t.end("This page could not be found"),null);if(k&&!A){let e=!!$.routes[T],t=$.dynamicRoutes[N];if(t&&!1===t.fallback&&!e){if(_.experimental.adapterPath)return await S();throw new h.NoFallbackError}}let U=null;!k||b.isDev||A||(U="/index"===(U=T)?"/":U);let D=!0===b.isDev||!k,M=k&&!D;j&&P&&(0,o.setManifestsSingleton)({page:x,clientReferenceManifest:P,serverActionsManifest:j});let H=e.method||"GET",I=(0,a.getTracer)(),F=I.getActiveScopeSpan(),K={params:R,prerenderManifest:$,renderOpts:{experimental:{authInterrupts:!!_.experimental.authInterrupts},cacheComponents:!!_.cacheComponents,supportsDynamicResponse:D,incrementalCache:(0,i.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:_.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,i)=>b.onRequestError(e,t,n,i,C)},sharedContext:{buildId:w}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let o=async e=>b.handle(G,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=I.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${H} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${H} ${x}`)}),s=!!(0,i.getRequestMeta)(e,"minimalMode"),l=async i=>{var a,l;let d=async({previousCacheEntry:r})=>{try{if(!s&&O&&q&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(i);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!k)return await (0,p.sendResponse)(L,B,a,K.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(a.headers);d&&(t[m.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:x,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:O})},!1,C),t}},u=await b.handleResponse({req:e,nextConfig:_,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:$,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:q,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:s});if(!k)return null;if((null==u||null==(a=u.value)?void 0:a.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",O?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let h=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&k||h.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||h.get("Cache-Control")||h.set("Cache-Control",(0,v.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(L,B,new Response(u.value.body,{headers:h,status:u.value.status||200})),null};F?await l(F):await I.withPropagatedContext(e.headers,()=>I.trace(u.BaseServerSpan.handleRequest,{spanName:`${H} ${x}`,kind:a.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},l))}catch(t){if(t instanceof h.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:N,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:O})},!1,C),k)throw t;return await (0,p.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>O,"patchFetch",()=>C,"routeModule",()=>b,"serverHooks",()=>$,"workAsyncStorage",()=>E,"workUnitAsyncStorage",()=>A],22945)}];
17
17
 
18
18
  //# sourceMappingURL=%5Broot-of-the-server%5D__392e585d._.js.map