@jiggai/kitchen 0.1.11 → 0.2.0

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 (1083) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +21 -0
  3. package/.next/build-manifest.json +6 -6
  4. package/.next/prerender-manifest.json +11 -6
  5. package/.next/routes-manifest.json +146 -0
  6. package/.next/server/app/_global-error/page/build-manifest.json +4 -4
  7. package/.next/server/app/_global-error/page.js +3 -3
  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 +2 -2
  12. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  14. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next/server/app/_not-found/page/build-manifest.json +4 -4
  18. package/.next/server/app/_not-found/page.js +10 -9
  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 +5 -5
  23. package/.next/server/app/_not-found.segments/_full.segment.rsc +5 -5
  24. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  26. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  27. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  28. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  29. package/.next/server/app/agents/[agentId]/page/build-manifest.json +4 -4
  30. package/.next/server/app/agents/[agentId]/page.js +8 -8
  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/identity/route.js +1 -1
  42. package/.next/server/app/api/agents/identity/route.js.nft.json +1 -1
  43. package/.next/server/app/api/agents/route.js +1 -1
  44. package/.next/server/app/api/agents/route.js.nft.json +1 -1
  45. package/.next/server/app/api/agents/skills/install/route.js +1 -1
  46. package/.next/server/app/api/agents/skills/install/route.js.nft.json +1 -1
  47. package/.next/server/app/api/agents/skills/route.js +1 -1
  48. package/.next/server/app/api/agents/skills/route.js.nft.json +1 -1
  49. package/.next/server/app/api/agents/update/route.js +1 -1
  50. package/.next/server/app/api/agents/update/route.js.nft.json +1 -1
  51. package/.next/server/app/api/channels/bindings/route.js +1 -1
  52. package/.next/server/app/api/channels/bindings/route.js.nft.json +1 -1
  53. package/.next/server/app/api/cron/delete/route.js +1 -1
  54. package/.next/server/app/api/cron/delete/route.js.nft.json +1 -1
  55. package/.next/server/app/api/cron/job/route.js +1 -1
  56. package/.next/server/app/api/cron/job/route.js.nft.json +1 -1
  57. package/.next/server/app/api/cron/jobs/route.js +1 -1
  58. package/.next/server/app/api/cron/jobs/route.js.nft.json +1 -1
  59. package/.next/server/app/api/cron/recipe-installed/route.js +1 -1
  60. package/.next/server/app/api/cron/recipe-installed/route.js.nft.json +1 -1
  61. package/.next/server/app/api/gateway/restart/route.js +1 -1
  62. package/.next/server/app/api/gateway/restart/route.js.nft.json +1 -1
  63. package/.next/server/app/api/goals/[id]/promote/route.js +1 -1
  64. package/.next/server/app/api/goals/[id]/promote/route.js.nft.json +1 -1
  65. package/.next/server/app/api/goals/[id]/route.js +1 -1
  66. package/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
  67. package/.next/server/app/api/goals/route.js +1 -1
  68. package/.next/server/app/api/goals/route.js.nft.json +1 -1
  69. package/.next/server/app/api/ids/check/route.js +1 -1
  70. package/.next/server/app/api/ids/check/route.js.nft.json +1 -1
  71. package/.next/server/app/api/marketplace/recipes/[slug]/route.js +1 -1
  72. package/.next/server/app/api/marketplace/recipes/[slug]/route.js.nft.json +1 -1
  73. package/.next/server/app/api/marketplace/recipes/route.js +1 -1
  74. package/.next/server/app/api/marketplace/recipes/route.js.nft.json +1 -1
  75. package/.next/server/app/api/recipes/[id]/route.js +1 -1
  76. package/.next/server/app/api/recipes/[id]/route.js.nft.json +1 -1
  77. package/.next/server/app/api/recipes/clone/route.js +1 -1
  78. package/.next/server/app/api/recipes/clone/route.js.nft.json +1 -1
  79. package/.next/server/app/api/recipes/custom-team/route/app-paths-manifest.json +3 -0
  80. package/.next/server/app/api/recipes/custom-team/route/build-manifest.json +11 -0
  81. package/.next/server/app/api/recipes/custom-team/route/server-reference-manifest.json +4 -0
  82. package/.next/server/app/api/recipes/custom-team/route.js +6 -0
  83. package/.next/server/app/api/recipes/custom-team/route.js.map +5 -0
  84. package/.next/server/app/api/recipes/custom-team/route.js.nft.json +1 -0
  85. package/.next/server/app/api/recipes/custom-team/route_client-reference-manifest.js +2 -0
  86. package/.next/server/app/api/recipes/delete/route.js +1 -1
  87. package/.next/server/app/api/recipes/delete/route.js.nft.json +1 -1
  88. package/.next/server/app/api/recipes/route.js +1 -1
  89. package/.next/server/app/api/recipes/route.js.nft.json +1 -1
  90. package/.next/server/app/api/recipes/team-agents/route.js +1 -1
  91. package/.next/server/app/api/recipes/team-agents/route.js.nft.json +1 -1
  92. package/.next/server/app/api/scaffold/route.js +1 -2
  93. package/.next/server/app/api/scaffold/route.js.nft.json +1 -1
  94. package/.next/server/app/api/settings/cron-installation/route.js +1 -1
  95. package/.next/server/app/api/settings/cron-installation/route.js.nft.json +1 -1
  96. package/.next/server/app/api/skills/available/route.js +1 -1
  97. package/.next/server/app/api/skills/available/route.js.nft.json +1 -1
  98. package/.next/server/app/api/swarms/start/route/app-paths-manifest.json +3 -0
  99. package/.next/server/app/api/swarms/start/route/build-manifest.json +11 -0
  100. package/.next/server/app/api/swarms/start/route/server-reference-manifest.json +4 -0
  101. package/.next/server/app/api/swarms/start/route.js +6 -0
  102. package/.next/server/app/api/swarms/start/route.js.map +5 -0
  103. package/.next/server/app/api/swarms/start/route.js.nft.json +1 -0
  104. package/.next/server/app/api/swarms/start/route_client-reference-manifest.js +2 -0
  105. package/.next/server/app/api/swarms/status/route/app-paths-manifest.json +3 -0
  106. package/.next/server/app/api/swarms/status/route/build-manifest.json +11 -0
  107. package/.next/server/app/api/swarms/status/route/server-reference-manifest.json +4 -0
  108. package/.next/server/app/api/swarms/status/route.js +6 -0
  109. package/.next/server/app/api/swarms/status/route.js.map +5 -0
  110. package/.next/server/app/api/swarms/status/route.js.nft.json +1 -0
  111. package/.next/server/app/api/swarms/status/route_client-reference-manifest.js +2 -0
  112. package/.next/server/app/api/teams/[teamId]/tickets/assign/route/app-paths-manifest.json +3 -0
  113. package/.next/server/app/api/teams/[teamId]/tickets/assign/route/build-manifest.json +11 -0
  114. package/.next/server/app/api/teams/[teamId]/tickets/assign/route/server-reference-manifest.json +4 -0
  115. package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js +6 -0
  116. package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.map +5 -0
  117. package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.nft.json +1 -0
  118. package/.next/server/app/api/teams/[teamId]/tickets/assign/route_client-reference-manifest.js +2 -0
  119. package/.next/server/app/api/teams/[teamId]/tickets/assignees/route/app-paths-manifest.json +3 -0
  120. package/.next/server/app/api/teams/[teamId]/tickets/assignees/route/build-manifest.json +11 -0
  121. package/.next/server/app/api/teams/[teamId]/tickets/assignees/route/server-reference-manifest.json +4 -0
  122. package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js +6 -0
  123. package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js.map +5 -0
  124. package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js.nft.json +1 -0
  125. package/.next/server/app/api/teams/[teamId]/tickets/assignees/route_client-reference-manifest.js +2 -0
  126. package/.next/server/app/api/teams/[teamId]/tickets/delete/route/app-paths-manifest.json +3 -0
  127. package/.next/server/app/api/teams/[teamId]/tickets/delete/route/build-manifest.json +11 -0
  128. package/.next/server/app/api/teams/[teamId]/tickets/delete/route/server-reference-manifest.json +4 -0
  129. package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js +6 -0
  130. package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.map +5 -0
  131. package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.nft.json +1 -0
  132. package/.next/server/app/api/teams/[teamId]/tickets/delete/route_client-reference-manifest.js +2 -0
  133. package/.next/server/app/api/teams/[teamId]/tickets/move/route/app-paths-manifest.json +3 -0
  134. package/.next/server/app/api/teams/[teamId]/tickets/move/route/build-manifest.json +11 -0
  135. package/.next/server/app/api/teams/[teamId]/tickets/move/route/server-reference-manifest.json +4 -0
  136. package/.next/server/app/api/teams/[teamId]/tickets/move/route.js +6 -0
  137. package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.map +5 -0
  138. package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.nft.json +1 -0
  139. package/.next/server/app/api/teams/[teamId]/tickets/move/route_client-reference-manifest.js +2 -0
  140. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route/app-paths-manifest.json +3 -0
  141. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route/build-manifest.json +11 -0
  142. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route/server-reference-manifest.json +4 -0
  143. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js +6 -0
  144. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.map +5 -0
  145. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.nft.json +1 -0
  146. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route_client-reference-manifest.js +2 -0
  147. package/.next/server/app/api/teams/file/route.js +1 -1
  148. package/.next/server/app/api/teams/file/route.js.nft.json +1 -1
  149. package/.next/server/app/api/teams/files/route.js +1 -1
  150. package/.next/server/app/api/teams/files/route.js.nft.json +1 -1
  151. package/.next/server/app/api/teams/memory/route/app-paths-manifest.json +3 -0
  152. package/.next/server/app/api/teams/memory/route/build-manifest.json +11 -0
  153. package/.next/server/app/api/teams/memory/route/server-reference-manifest.json +4 -0
  154. package/.next/server/app/api/teams/memory/route.js +6 -0
  155. package/.next/server/app/api/teams/memory/route.js.map +5 -0
  156. package/.next/server/app/api/teams/memory/route.js.nft.json +1 -0
  157. package/.next/server/app/api/teams/memory/route_client-reference-manifest.js +2 -0
  158. package/.next/server/app/api/teams/meta/route.js +1 -1
  159. package/.next/server/app/api/teams/meta/route.js.nft.json +1 -1
  160. package/.next/server/app/api/teams/orchestrator/install/route/app-paths-manifest.json +3 -0
  161. package/.next/server/app/api/teams/orchestrator/install/route/build-manifest.json +11 -0
  162. package/.next/server/app/api/teams/orchestrator/install/route/server-reference-manifest.json +4 -0
  163. package/.next/server/app/api/teams/orchestrator/install/route.js +6 -0
  164. package/.next/server/app/api/teams/orchestrator/install/route.js.map +5 -0
  165. package/.next/server/app/api/teams/orchestrator/install/route.js.nft.json +1 -0
  166. package/.next/server/app/api/teams/orchestrator/install/route_client-reference-manifest.js +2 -0
  167. package/.next/server/app/api/teams/orchestrator/route/app-paths-manifest.json +3 -0
  168. package/.next/server/app/api/teams/orchestrator/route/build-manifest.json +11 -0
  169. package/.next/server/app/api/teams/orchestrator/route/server-reference-manifest.json +4 -0
  170. package/.next/server/app/api/teams/orchestrator/route.js +6 -0
  171. package/.next/server/app/api/teams/orchestrator/route.js.map +5 -0
  172. package/.next/server/app/api/teams/orchestrator/route.js.nft.json +1 -0
  173. package/.next/server/app/api/teams/orchestrator/route_client-reference-manifest.js +2 -0
  174. package/.next/server/app/api/teams/remove-team/route.js +2 -1
  175. package/.next/server/app/api/teams/remove-team/route.js.nft.json +1 -1
  176. package/.next/server/app/api/teams/skills/install/route.js +1 -1
  177. package/.next/server/app/api/teams/skills/install/route.js.nft.json +1 -1
  178. package/.next/server/app/api/teams/skills/route.js +1 -1
  179. package/.next/server/app/api/teams/skills/route.js.nft.json +1 -1
  180. package/.next/server/app/api/teams/workflow-runs/route/app-paths-manifest.json +3 -0
  181. package/.next/server/app/api/teams/workflow-runs/route/build-manifest.json +11 -0
  182. package/.next/server/app/api/teams/workflow-runs/route/server-reference-manifest.json +4 -0
  183. package/.next/server/app/api/teams/workflow-runs/route.js +7 -0
  184. package/.next/server/app/api/teams/workflow-runs/route.js.map +5 -0
  185. package/.next/server/app/api/teams/workflow-runs/route.js.nft.json +1 -0
  186. package/.next/server/app/api/teams/workflow-runs/route_client-reference-manifest.js +2 -0
  187. package/.next/server/app/api/teams/workflow-templates/route/app-paths-manifest.json +3 -0
  188. package/.next/server/app/api/teams/workflow-templates/route/build-manifest.json +11 -0
  189. package/.next/server/app/api/teams/workflow-templates/route/server-reference-manifest.json +4 -0
  190. package/.next/server/app/api/teams/workflow-templates/route.js +6 -0
  191. package/.next/server/app/api/teams/workflow-templates/route.js.map +5 -0
  192. package/.next/server/app/api/teams/workflow-templates/route.js.nft.json +1 -0
  193. package/.next/server/app/api/teams/workflow-templates/route_client-reference-manifest.js +2 -0
  194. package/.next/server/app/api/teams/workflows/route/app-paths-manifest.json +3 -0
  195. package/.next/server/app/api/teams/workflows/route/build-manifest.json +11 -0
  196. package/.next/server/app/api/teams/workflows/route/server-reference-manifest.json +4 -0
  197. package/.next/server/app/api/teams/workflows/route.js +6 -0
  198. package/.next/server/app/api/teams/workflows/route.js.map +5 -0
  199. package/.next/server/app/api/teams/workflows/route.js.nft.json +1 -0
  200. package/.next/server/app/api/teams/workflows/route_client-reference-manifest.js +2 -0
  201. package/.next/server/app/api/tickets/assign/route/app-paths-manifest.json +3 -0
  202. package/.next/server/app/api/tickets/assign/route/build-manifest.json +11 -0
  203. package/.next/server/app/api/tickets/assign/route/server-reference-manifest.json +4 -0
  204. package/.next/server/app/api/tickets/assign/route.js +6 -0
  205. package/.next/server/app/api/tickets/assign/route.js.map +5 -0
  206. package/.next/server/app/api/tickets/assign/route.js.nft.json +1 -0
  207. package/.next/server/app/api/tickets/assign/route_client-reference-manifest.js +2 -0
  208. package/.next/server/app/api/tickets/assignees/route/app-paths-manifest.json +3 -0
  209. package/.next/server/app/api/tickets/assignees/route/build-manifest.json +11 -0
  210. package/.next/server/app/api/tickets/assignees/route/server-reference-manifest.json +4 -0
  211. package/.next/server/app/api/tickets/assignees/route.js +6 -0
  212. package/.next/server/app/api/tickets/assignees/route.js.map +5 -0
  213. package/.next/server/app/api/tickets/assignees/route.js.nft.json +1 -0
  214. package/.next/server/app/api/tickets/assignees/route_client-reference-manifest.js +2 -0
  215. package/.next/server/app/api/tickets/move/route.js +1 -1
  216. package/.next/server/app/api/tickets/move/route.js.nft.json +1 -1
  217. package/.next/server/app/channels/page/build-manifest.json +4 -4
  218. package/.next/server/app/channels/page.js +8 -8
  219. package/.next/server/app/channels/page.js.nft.json +1 -1
  220. package/.next/server/app/channels/page_client-reference-manifest.js +1 -1
  221. package/.next/server/app/channels.html +2 -2
  222. package/.next/server/app/channels.rsc +6 -6
  223. package/.next/server/app/channels.segments/_full.segment.rsc +6 -6
  224. package/.next/server/app/channels.segments/_head.segment.rsc +1 -1
  225. package/.next/server/app/channels.segments/_index.segment.rsc +3 -3
  226. package/.next/server/app/channels.segments/_tree.segment.rsc +2 -2
  227. package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +2 -2
  228. package/.next/server/app/channels.segments/channels.segment.rsc +1 -1
  229. package/.next/server/app/cron-jobs/page/build-manifest.json +4 -4
  230. package/.next/server/app/cron-jobs/page.js +8 -8
  231. package/.next/server/app/cron-jobs/page.js.nft.json +1 -1
  232. package/.next/server/app/cron-jobs/page_client-reference-manifest.js +1 -1
  233. package/.next/server/app/cron-jobs.html +1 -1
  234. package/.next/server/app/cron-jobs.rsc +7 -7
  235. package/.next/server/app/cron-jobs.segments/_full.segment.rsc +7 -7
  236. package/.next/server/app/cron-jobs.segments/_head.segment.rsc +1 -1
  237. package/.next/server/app/cron-jobs.segments/_index.segment.rsc +3 -3
  238. package/.next/server/app/cron-jobs.segments/_tree.segment.rsc +2 -2
  239. package/.next/server/app/cron-jobs.segments/cron-jobs/__PAGE__.segment.rsc +3 -3
  240. package/.next/server/app/cron-jobs.segments/cron-jobs.segment.rsc +1 -1
  241. package/.next/server/app/goals/[id]/page/build-manifest.json +4 -4
  242. package/.next/server/app/goals/[id]/page.js +8 -8
  243. package/.next/server/app/goals/[id]/page.js.nft.json +1 -1
  244. package/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  245. package/.next/server/app/goals/new/page/build-manifest.json +4 -4
  246. package/.next/server/app/goals/new/page.js +8 -8
  247. package/.next/server/app/goals/new/page.js.nft.json +1 -1
  248. package/.next/server/app/goals/new/page_client-reference-manifest.js +1 -1
  249. package/.next/server/app/goals/new.html +2 -2
  250. package/.next/server/app/goals/new.rsc +6 -6
  251. package/.next/server/app/goals/new.segments/_full.segment.rsc +6 -6
  252. package/.next/server/app/goals/new.segments/_head.segment.rsc +1 -1
  253. package/.next/server/app/goals/new.segments/_index.segment.rsc +3 -3
  254. package/.next/server/app/goals/new.segments/_tree.segment.rsc +2 -2
  255. package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +2 -2
  256. package/.next/server/app/goals/new.segments/goals/new.segment.rsc +1 -1
  257. package/.next/server/app/goals/new.segments/goals.segment.rsc +1 -1
  258. package/.next/server/app/goals/page/build-manifest.json +4 -4
  259. package/.next/server/app/goals/page.js +8 -8
  260. package/.next/server/app/goals/page.js.nft.json +1 -1
  261. package/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  262. package/.next/server/app/goals.html +1 -1
  263. package/.next/server/app/goals.rsc +6 -6
  264. package/.next/server/app/goals.segments/_full.segment.rsc +6 -6
  265. package/.next/server/app/goals.segments/_head.segment.rsc +1 -1
  266. package/.next/server/app/goals.segments/_index.segment.rsc +3 -3
  267. package/.next/server/app/goals.segments/_tree.segment.rsc +2 -2
  268. package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +2 -2
  269. package/.next/server/app/goals.segments/goals.segment.rsc +1 -1
  270. package/.next/server/app/manifest.webmanifest/route/app-paths-manifest.json +3 -0
  271. package/.next/server/app/manifest.webmanifest/route/build-manifest.json +11 -0
  272. package/.next/server/app/manifest.webmanifest/route/server-reference-manifest.json +4 -0
  273. package/.next/server/app/manifest.webmanifest/route.js +6 -0
  274. package/.next/server/app/manifest.webmanifest/route.js.map +5 -0
  275. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -0
  276. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +2 -0
  277. package/.next/server/app/manifest.webmanifest.body +1 -0
  278. package/.next/server/app/manifest.webmanifest.meta +1 -0
  279. package/.next/server/app/page/build-manifest.json +4 -4
  280. package/.next/server/app/page.js +10 -9
  281. package/.next/server/app/page.js.nft.json +1 -1
  282. package/.next/server/app/page_client-reference-manifest.js +1 -1
  283. package/.next/server/app/recipes/[id]/page/build-manifest.json +4 -4
  284. package/.next/server/app/recipes/[id]/page.js +10 -9
  285. package/.next/server/app/recipes/[id]/page.js.nft.json +1 -1
  286. package/.next/server/app/recipes/[id]/page_client-reference-manifest.js +1 -1
  287. package/.next/server/app/recipes/page/build-manifest.json +4 -4
  288. package/.next/server/app/recipes/page.js +9 -9
  289. package/.next/server/app/recipes/page.js.nft.json +1 -1
  290. package/.next/server/app/recipes/page_client-reference-manifest.js +1 -1
  291. package/.next/server/app/settings/page/build-manifest.json +4 -4
  292. package/.next/server/app/settings/page.js +8 -8
  293. package/.next/server/app/settings/page.js.nft.json +1 -1
  294. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  295. package/.next/server/app/settings.html +1 -1
  296. package/.next/server/app/settings.rsc +6 -6
  297. package/.next/server/app/settings.segments/_full.segment.rsc +6 -6
  298. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  299. package/.next/server/app/settings.segments/_index.segment.rsc +3 -3
  300. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  301. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
  302. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  303. package/.next/server/app/teams/[teamId]/page/build-manifest.json +4 -4
  304. package/.next/server/app/teams/[teamId]/page.js +10 -9
  305. package/.next/server/app/teams/[teamId]/page.js.nft.json +1 -1
  306. package/.next/server/app/teams/[teamId]/page_client-reference-manifest.js +1 -1
  307. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/app-paths-manifest.json +3 -0
  308. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/build-manifest.json +17 -0
  309. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/next-font-manifest.json +11 -0
  310. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/react-loadable-manifest.json +1 -0
  311. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/server-reference-manifest.json +4 -0
  312. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js +18 -0
  313. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.map +5 -0
  314. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.nft.json +1 -0
  315. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page_client-reference-manifest.js +2 -0
  316. package/.next/server/app/teams/[teamId]/tickets/page/app-paths-manifest.json +3 -0
  317. package/.next/server/app/teams/[teamId]/tickets/page/build-manifest.json +17 -0
  318. package/.next/server/app/teams/[teamId]/tickets/page/next-font-manifest.json +11 -0
  319. package/.next/server/app/teams/[teamId]/tickets/page/react-loadable-manifest.json +1 -0
  320. package/.next/server/app/teams/[teamId]/tickets/page/server-reference-manifest.json +4 -0
  321. package/.next/server/app/teams/[teamId]/tickets/page.js +18 -0
  322. package/.next/server/app/teams/[teamId]/tickets/page.js.map +5 -0
  323. package/.next/server/app/teams/[teamId]/tickets/page.js.nft.json +1 -0
  324. package/.next/server/app/teams/[teamId]/tickets/page_client-reference-manifest.js +2 -0
  325. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/app-paths-manifest.json +3 -0
  326. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/build-manifest.json +17 -0
  327. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/next-font-manifest.json +11 -0
  328. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/react-loadable-manifest.json +1 -0
  329. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/server-reference-manifest.json +4 -0
  330. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js +19 -0
  331. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.map +5 -0
  332. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -0
  333. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page_client-reference-manifest.js +2 -0
  334. package/.next/server/app/teams/[teamId]/workflows/page/app-paths-manifest.json +3 -0
  335. package/.next/server/app/teams/[teamId]/workflows/page/build-manifest.json +17 -0
  336. package/.next/server/app/teams/[teamId]/workflows/page/next-font-manifest.json +11 -0
  337. package/.next/server/app/teams/[teamId]/workflows/page/react-loadable-manifest.json +1 -0
  338. package/.next/server/app/teams/[teamId]/workflows/page/server-reference-manifest.json +4 -0
  339. package/.next/server/app/teams/[teamId]/workflows/page.js +20 -0
  340. package/.next/server/app/teams/[teamId]/workflows/page.js.map +5 -0
  341. package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -0
  342. package/.next/server/app/teams/[teamId]/workflows/page_client-reference-manifest.js +2 -0
  343. package/.next/server/app/tickets/[ticket]/page/build-manifest.json +4 -4
  344. package/.next/server/app/tickets/[ticket]/page.js +8 -8
  345. package/.next/server/app/tickets/[ticket]/page.js.nft.json +1 -1
  346. package/.next/server/app/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  347. package/.next/server/app/tickets/page/build-manifest.json +4 -4
  348. package/.next/server/app/tickets/page.js +8 -8
  349. package/.next/server/app/tickets/page.js.nft.json +1 -1
  350. package/.next/server/app/tickets/page_client-reference-manifest.js +1 -1
  351. package/.next/server/app-paths-manifest.json +21 -0
  352. package/.next/server/chunks/[root-of-the-server]__04d535a1._.js +3 -0
  353. package/.next/server/chunks/[root-of-the-server]__04d535a1._.js.map +1 -0
  354. package/.next/server/chunks/[root-of-the-server]__0554d494._.js +3 -0
  355. package/.next/server/chunks/[root-of-the-server]__0554d494._.js.map +1 -0
  356. package/.next/server/chunks/[root-of-the-server]__05f5e243._.js +3 -0
  357. package/.next/server/chunks/[root-of-the-server]__05f5e243._.js.map +1 -0
  358. package/.next/server/chunks/[root-of-the-server]__0e5f94e2._.js +3 -0
  359. package/.next/server/chunks/[root-of-the-server]__0e5f94e2._.js.map +1 -0
  360. package/.next/server/chunks/[root-of-the-server]__107d374d._.js +3 -0
  361. package/.next/server/chunks/[root-of-the-server]__107d374d._.js.map +1 -0
  362. package/.next/server/chunks/[root-of-the-server]__1106aaf7._.js +8 -0
  363. package/.next/server/chunks/[root-of-the-server]__1106aaf7._.js.map +1 -0
  364. package/.next/server/chunks/[root-of-the-server]__1805932c._.js +3 -0
  365. package/.next/server/chunks/[root-of-the-server]__1805932c._.js.map +1 -0
  366. package/.next/server/chunks/[root-of-the-server]__26c618a3._.js +3 -0
  367. package/.next/server/chunks/[root-of-the-server]__26c618a3._.js.map +1 -0
  368. package/.next/server/chunks/[root-of-the-server]__2fa553db._.js +3 -0
  369. package/.next/server/chunks/[root-of-the-server]__2fa553db._.js.map +1 -0
  370. package/.next/server/chunks/[root-of-the-server]__392e585d._.js +18 -0
  371. package/.next/server/chunks/[root-of-the-server]__392e585d._.js.map +1 -0
  372. package/.next/server/chunks/[root-of-the-server]__3cddf0a5._.js +3 -0
  373. package/.next/server/chunks/[root-of-the-server]__3cddf0a5._.js.map +1 -0
  374. package/.next/server/chunks/[root-of-the-server]__3f7058b4._.js +3 -0
  375. package/.next/server/chunks/[root-of-the-server]__3f7058b4._.js.map +1 -0
  376. package/.next/server/chunks/[root-of-the-server]__477c3d5b._.js +3 -0
  377. package/.next/server/chunks/[root-of-the-server]__477c3d5b._.js.map +1 -0
  378. package/.next/server/chunks/[root-of-the-server]__47eb3111._.js +3 -0
  379. package/.next/server/chunks/[root-of-the-server]__47eb3111._.js.map +1 -0
  380. package/.next/server/chunks/[root-of-the-server]__4898071c._.js +2 -2
  381. package/.next/server/chunks/[root-of-the-server]__59a6cf09._.js +3 -0
  382. package/.next/server/chunks/[root-of-the-server]__59a6cf09._.js.map +1 -0
  383. package/.next/server/chunks/[root-of-the-server]__5ea38a67._.js +3 -0
  384. package/.next/server/chunks/[root-of-the-server]__5ea38a67._.js.map +1 -0
  385. package/.next/server/chunks/[root-of-the-server]__6629e914._.js +3 -0
  386. package/.next/server/chunks/[root-of-the-server]__6629e914._.js.map +1 -0
  387. package/.next/server/chunks/[root-of-the-server]__667c3a2d._.js +3 -0
  388. package/.next/server/chunks/[root-of-the-server]__667c3a2d._.js.map +1 -0
  389. package/.next/server/chunks/[root-of-the-server]__691a8e5d._.js +6 -0
  390. package/.next/server/chunks/[root-of-the-server]__691a8e5d._.js.map +1 -0
  391. package/.next/server/chunks/[root-of-the-server]__698cf062._.js +3 -0
  392. package/.next/server/chunks/[root-of-the-server]__698cf062._.js.map +1 -0
  393. package/.next/server/chunks/[root-of-the-server]__69be1758._.js +3 -0
  394. package/.next/server/chunks/[root-of-the-server]__69be1758._.js.map +1 -0
  395. package/.next/server/chunks/[root-of-the-server]__6d8e7b75._.js +6 -0
  396. package/.next/server/chunks/[root-of-the-server]__6d8e7b75._.js.map +1 -0
  397. package/.next/server/chunks/[root-of-the-server]__6e5826c5._.js +3 -0
  398. package/.next/server/chunks/[root-of-the-server]__6e5826c5._.js.map +1 -0
  399. package/.next/server/chunks/[root-of-the-server]__795578f0._.js +3 -0
  400. package/.next/server/chunks/[root-of-the-server]__795578f0._.js.map +1 -0
  401. package/.next/server/chunks/[root-of-the-server]__7a331e51._.js +8 -0
  402. package/.next/server/chunks/[root-of-the-server]__7a331e51._.js.map +1 -0
  403. package/.next/server/chunks/[root-of-the-server]__7e46fb06._.js +3 -0
  404. package/.next/server/chunks/[root-of-the-server]__7e46fb06._.js.map +1 -0
  405. package/.next/server/chunks/[root-of-the-server]__864a08dd._.js +10 -0
  406. package/.next/server/chunks/[root-of-the-server]__864a08dd._.js.map +1 -0
  407. package/.next/server/chunks/[root-of-the-server]__8a811a30._.js +3 -0
  408. package/.next/server/chunks/[root-of-the-server]__8a811a30._.js.map +1 -0
  409. package/.next/server/chunks/[root-of-the-server]__8e27e9f7._.js +8 -0
  410. package/.next/server/chunks/[root-of-the-server]__8e27e9f7._.js.map +1 -0
  411. package/.next/server/chunks/[root-of-the-server]__8ea22d0a._.js +3 -0
  412. package/.next/server/chunks/[root-of-the-server]__8ea22d0a._.js.map +1 -0
  413. package/.next/server/chunks/[root-of-the-server]__904a6d9f._.js +3 -0
  414. package/.next/server/chunks/[root-of-the-server]__904a6d9f._.js.map +1 -0
  415. package/.next/server/chunks/[root-of-the-server]__a12dc320._.js +3 -0
  416. package/.next/server/chunks/[root-of-the-server]__a12dc320._.js.map +1 -0
  417. package/.next/server/chunks/[root-of-the-server]__a6ade549._.js +3 -0
  418. package/.next/server/chunks/[root-of-the-server]__a6ade549._.js.map +1 -0
  419. package/.next/server/chunks/[root-of-the-server]__abcda400._.js +6 -0
  420. package/.next/server/chunks/[root-of-the-server]__abcda400._.js.map +1 -0
  421. package/.next/server/chunks/[root-of-the-server]__b002764e._.js +3 -0
  422. package/.next/server/chunks/[root-of-the-server]__b002764e._.js.map +1 -0
  423. package/.next/server/chunks/[root-of-the-server]__bc3630f4._.js +3 -0
  424. package/.next/server/chunks/[root-of-the-server]__bc3630f4._.js.map +1 -0
  425. package/.next/server/chunks/[root-of-the-server]__befb8c19._.js +3 -0
  426. package/.next/server/chunks/[root-of-the-server]__befb8c19._.js.map +1 -0
  427. package/.next/server/chunks/[root-of-the-server]__bf608f29._.js +3 -0
  428. package/.next/server/chunks/{[root-of-the-server]__be5f57b2._.js.map → [root-of-the-server]__bf608f29._.js.map} +1 -1
  429. package/.next/server/chunks/{[root-of-the-server]__74b80ca4._.js → [root-of-the-server]__c63a9f28._.js} +2 -2
  430. package/.next/server/chunks/[root-of-the-server]__c86c0469._.js +3 -0
  431. package/.next/server/chunks/[root-of-the-server]__c86c0469._.js.map +1 -0
  432. package/.next/server/chunks/[root-of-the-server]__c9e4c772._.js +3 -0
  433. package/.next/server/chunks/[root-of-the-server]__c9e4c772._.js.map +1 -0
  434. package/.next/server/chunks/[root-of-the-server]__cbe01b74._.js +3 -0
  435. package/.next/server/chunks/[root-of-the-server]__cbe01b74._.js.map +1 -0
  436. package/.next/server/chunks/[root-of-the-server]__ce9cfa39._.js +3 -0
  437. package/.next/server/chunks/[root-of-the-server]__ce9cfa39._.js.map +1 -0
  438. package/.next/server/chunks/[root-of-the-server]__d924e5ac._.js +3 -0
  439. package/.next/server/chunks/[root-of-the-server]__d924e5ac._.js.map +1 -0
  440. package/.next/server/chunks/[root-of-the-server]__e40409a2._.js +3 -0
  441. package/.next/server/chunks/[root-of-the-server]__e40409a2._.js.map +1 -0
  442. package/.next/server/chunks/[root-of-the-server]__e6fa5823._.js +3 -0
  443. package/.next/server/chunks/[root-of-the-server]__e6fa5823._.js.map +1 -0
  444. package/.next/server/chunks/[root-of-the-server]__e8bfeaba._.js +3 -0
  445. package/.next/server/chunks/[root-of-the-server]__e8bfeaba._.js.map +1 -0
  446. package/.next/server/chunks/[root-of-the-server]__e8f8017b._.js +3 -0
  447. package/.next/server/chunks/[root-of-the-server]__e8f8017b._.js.map +1 -0
  448. package/.next/server/chunks/[root-of-the-server]__ee5cefd8._.js +3 -0
  449. package/.next/server/chunks/[root-of-the-server]__ee5cefd8._.js.map +1 -0
  450. package/.next/server/chunks/[root-of-the-server]__ef60acef._.js +3 -0
  451. package/.next/server/chunks/[root-of-the-server]__ef60acef._.js.map +1 -0
  452. package/.next/server/chunks/[root-of-the-server]__fdda9176._.js +3 -0
  453. package/.next/server/chunks/{[root-of-the-server]__a6ac3ddf._.js.map → [root-of-the-server]__fdda9176._.js.map} +1 -1
  454. package/.next/server/chunks/[root-of-the-server]__fec14c75._.js +3 -0
  455. package/.next/server/chunks/[root-of-the-server]__fec14c75._.js.map +1 -0
  456. package/.next/server/chunks/[root-of-the-server]__fef7183d._.js +3 -0
  457. package/.next/server/chunks/[root-of-the-server]__fef7183d._.js.map +1 -0
  458. package/.next/server/chunks/_next-internal_server_app_api_recipes_custom-team_route_actions_861b1489.js +3 -0
  459. package/.next/server/chunks/_next-internal_server_app_api_swarms_start_route_actions_b79e9029.js +3 -0
  460. package/.next/server/chunks/_next-internal_server_app_api_swarms_start_route_actions_b79e9029.js.map +1 -0
  461. package/.next/server/chunks/_next-internal_server_app_api_swarms_status_route_actions_54826df0.js +3 -0
  462. package/.next/server/chunks/_next-internal_server_app_api_swarms_status_route_actions_54826df0.js.map +1 -0
  463. package/.next/server/chunks/_next-internal_server_app_api_teams_[teamId]_tickets_move_route_actions_b47d8708.js +3 -0
  464. package/.next/server/chunks/_next-internal_server_app_api_teams_[teamId]_tickets_move_route_actions_b47d8708.js.map +1 -0
  465. package/.next/server/chunks/_next-internal_server_app_api_teams_memory_route_actions_5b7dc699.js +3 -0
  466. package/.next/server/chunks/_next-internal_server_app_api_teams_memory_route_actions_5b7dc699.js.map +1 -0
  467. package/.next/server/chunks/_next-internal_server_app_api_teams_orchestrator_install_route_actions_49b6602b.js +3 -0
  468. package/.next/server/chunks/_next-internal_server_app_api_teams_orchestrator_install_route_actions_49b6602b.js.map +1 -0
  469. package/.next/server/chunks/_next-internal_server_app_api_teams_orchestrator_route_actions_1949c463.js +3 -0
  470. package/.next/server/chunks/_next-internal_server_app_api_teams_orchestrator_route_actions_1949c463.js.map +1 -0
  471. package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-runs_route_actions_8327ac7d.js +3 -0
  472. package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-runs_route_actions_8327ac7d.js.map +1 -0
  473. package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-templates_route_actions_87b51d57.js +3 -0
  474. package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-templates_route_actions_87b51d57.js.map +1 -0
  475. package/.next/server/chunks/_next-internal_server_app_api_teams_workflows_route_actions_43dd6e07.js +3 -0
  476. package/.next/server/chunks/_next-internal_server_app_api_teams_workflows_route_actions_43dd6e07.js.map +1 -0
  477. package/.next/server/chunks/_next-internal_server_app_api_tickets_assign_route_actions_629cc773.js +3 -0
  478. package/.next/server/chunks/_next-internal_server_app_api_tickets_assign_route_actions_629cc773.js.map +1 -0
  479. package/.next/server/chunks/_next-internal_server_app_api_tickets_assignees_route_actions_64d3d63e.js +3 -0
  480. package/.next/server/chunks/_next-internal_server_app_api_tickets_assignees_route_actions_64d3d63e.js.map +1 -0
  481. package/.next/server/chunks/_next-internal_server_app_manifest_webmanifest_route_actions_1bff3fca.js +3 -0
  482. package/.next/server/chunks/_next-internal_server_app_manifest_webmanifest_route_actions_1bff3fca.js.map +1 -0
  483. package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_assign_route_actions_50521c46.js +3 -0
  484. package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_assign_route_actions_50521c46.js.map +1 -0
  485. package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_assignees_route_actions_75675d78.js +3 -0
  486. package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_assignees_route_actions_75675d78.js.map +1 -0
  487. package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_delete_route_actions_9d6ca9f4.js +3 -0
  488. package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_delete_route_actions_9d6ca9f4.js.map +1 -0
  489. package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_move-to-goals_route_actions_760612ca.js +3 -0
  490. package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_move-to-goals_route_actions_760612ca.js.map +1 -0
  491. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js +16 -0
  492. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js.map +1 -0
  493. package/.next/server/chunks/ssr/[root-of-the-server]__0d4cb2ba._.js +3 -0
  494. package/.next/server/chunks/ssr/[root-of-the-server]__285ae6b7._.js +3 -0
  495. package/.next/server/chunks/ssr/{[root-of-the-server]__46e08d44._.js.map → [root-of-the-server]__285ae6b7._.js.map} +1 -1
  496. package/.next/server/chunks/ssr/[root-of-the-server]__28f5d174._.js +3 -0
  497. package/.next/server/chunks/ssr/[root-of-the-server]__28f5d174._.js.map +1 -0
  498. package/.next/server/chunks/ssr/[root-of-the-server]__2bef6884._.js +3 -0
  499. package/.next/server/chunks/ssr/{[root-of-the-server]__15600e29._.js.map → [root-of-the-server]__2bef6884._.js.map} +1 -1
  500. package/.next/server/chunks/ssr/[root-of-the-server]__37c705d4._.js +3 -0
  501. package/.next/server/chunks/ssr/[root-of-the-server]__37c705d4._.js.map +1 -0
  502. package/.next/server/chunks/ssr/[root-of-the-server]__3ec61b25._.js +3 -0
  503. package/.next/server/chunks/ssr/[root-of-the-server]__3ec61b25._.js.map +1 -0
  504. package/.next/server/chunks/ssr/[root-of-the-server]__3efd25c4._.js +3 -0
  505. package/.next/server/chunks/ssr/{[root-of-the-server]__2a6f1e3e._.js.map → [root-of-the-server]__3efd25c4._.js.map} +1 -1
  506. package/.next/server/chunks/ssr/[root-of-the-server]__44d2d5fa._.js +3 -0
  507. package/.next/server/chunks/ssr/[root-of-the-server]__44d2d5fa._.js.map +1 -0
  508. package/.next/server/chunks/ssr/[root-of-the-server]__49281b4c._.js +3 -0
  509. package/.next/server/chunks/ssr/[root-of-the-server]__49281b4c._.js.map +1 -0
  510. package/.next/server/chunks/ssr/[root-of-the-server]__4c4391c1._.js +3 -0
  511. package/.next/server/chunks/ssr/[root-of-the-server]__4c4391c1._.js.map +1 -0
  512. package/.next/server/chunks/ssr/[root-of-the-server]__4c6592ca._.js +3 -0
  513. package/.next/server/chunks/ssr/[root-of-the-server]__4c6592ca._.js.map +1 -0
  514. package/.next/server/chunks/ssr/[root-of-the-server]__682758bd._.js +3 -0
  515. package/.next/server/chunks/ssr/[root-of-the-server]__682758bd._.js.map +1 -0
  516. package/.next/server/chunks/ssr/[root-of-the-server]__6bd48d33._.js +1 -1
  517. package/.next/server/chunks/ssr/[root-of-the-server]__6bd48d33._.js.map +1 -1
  518. package/.next/server/chunks/ssr/[root-of-the-server]__78972f52._.js +3 -0
  519. package/.next/server/chunks/ssr/[root-of-the-server]__78972f52._.js.map +1 -0
  520. package/.next/server/chunks/ssr/{[root-of-the-server]__e2e52c6e._.js → [root-of-the-server]__78cdd31e._.js} +2 -2
  521. package/.next/server/chunks/ssr/[root-of-the-server]__92524828._.js +3 -0
  522. package/.next/server/chunks/ssr/{[root-of-the-server]__247198dc._.js.map → [root-of-the-server]__92524828._.js.map} +1 -1
  523. package/.next/server/chunks/ssr/[root-of-the-server]__9a7d79aa._.js +3 -0
  524. package/.next/server/chunks/ssr/[root-of-the-server]__9a7d79aa._.js.map +1 -0
  525. package/.next/server/chunks/ssr/[root-of-the-server]__9e1ab064._.js +3 -0
  526. package/.next/server/chunks/ssr/[root-of-the-server]__9e1ab064._.js.map +1 -0
  527. package/.next/server/chunks/ssr/[root-of-the-server]__ad654f09._.js +3 -0
  528. package/.next/server/chunks/ssr/[root-of-the-server]__ad654f09._.js.map +1 -0
  529. package/.next/server/chunks/ssr/[root-of-the-server]__b2617fbf._.js +3 -0
  530. package/.next/server/chunks/ssr/{[root-of-the-server]__fd669584._.js.map → [root-of-the-server]__b2617fbf._.js.map} +1 -1
  531. package/.next/server/chunks/ssr/[root-of-the-server]__b5f65083._.js +3 -0
  532. package/.next/server/chunks/ssr/[root-of-the-server]__b5f65083._.js.map +1 -0
  533. package/.next/server/chunks/ssr/{[root-of-the-server]__4c6cc96d._.js → [root-of-the-server]__de18d058._.js} +2 -2
  534. package/.next/server/chunks/ssr/{[root-of-the-server]__4c6cc96d._.js.map → [root-of-the-server]__de18d058._.js.map} +1 -1
  535. package/.next/server/chunks/ssr/{[root-of-the-server]__7180d770._.js → [root-of-the-server]__e364449b._.js} +2 -2
  536. package/.next/server/chunks/ssr/[root-of-the-server]__e364449b._.js.map +1 -0
  537. package/.next/server/chunks/ssr/[root-of-the-server]__e5d416d5._.js +3 -0
  538. package/.next/server/chunks/ssr/{[root-of-the-server]__3ad3e5b1._.js.map → [root-of-the-server]__e5d416d5._.js.map} +1 -1
  539. package/.next/server/chunks/ssr/[root-of-the-server]__e94ab521._.js +3 -0
  540. package/.next/server/chunks/ssr/[root-of-the-server]__e94ab521._.js.map +1 -0
  541. package/.next/server/chunks/ssr/{[root-of-the-server]__b9356576._.js → [root-of-the-server]__f62d412e._.js} +2 -2
  542. package/.next/server/chunks/ssr/{[root-of-the-server]__b9356576._.js.map → [root-of-the-server]__f62d412e._.js.map} +1 -1
  543. package/.next/server/chunks/ssr/[root-of-the-server]__f8a2f82d._.js +3 -0
  544. package/.next/server/chunks/ssr/[root-of-the-server]__f8a2f82d._.js.map +1 -0
  545. package/.next/server/chunks/ssr/[root-of-the-server]__fbe5ff69._.js +3 -0
  546. package/.next/server/chunks/ssr/{[root-of-the-server]__3575e6da._.js.map → [root-of-the-server]__fbe5ff69._.js.map} +1 -1
  547. package/.next/server/chunks/ssr/_018dfe6b._.js +27 -0
  548. package/.next/server/chunks/ssr/_018dfe6b._.js.map +1 -0
  549. package/.next/server/chunks/ssr/{_8c45edba._.js → _0bdae23a._.js} +3 -3
  550. package/.next/server/chunks/ssr/_0bdae23a._.js.map +1 -0
  551. package/.next/server/chunks/ssr/{_d27483a1._.js → _19aa68d3._.js} +3 -3
  552. package/.next/server/chunks/ssr/_19aa68d3._.js.map +1 -0
  553. package/.next/server/chunks/ssr/{_25e6aab8._.js → _347e2d56._.js} +3 -3
  554. package/.next/server/chunks/ssr/_347e2d56._.js.map +1 -0
  555. package/.next/server/chunks/ssr/_3c9015dc._.js +4 -0
  556. package/.next/server/chunks/ssr/_3c9015dc._.js.map +1 -0
  557. package/.next/server/chunks/ssr/_41ca4e70._.js +3 -0
  558. package/.next/server/chunks/ssr/_41ca4e70._.js.map +1 -0
  559. package/.next/server/chunks/ssr/{node_modules_next_dist_12287b3d._.js → _49fb12c2._.js} +3 -3
  560. package/.next/server/chunks/ssr/_49fb12c2._.js.map +1 -0
  561. package/.next/server/chunks/ssr/{_3c8b2df6._.js → _536983a4._.js} +3 -3
  562. package/.next/server/chunks/ssr/_536983a4._.js.map +1 -0
  563. package/.next/server/chunks/ssr/_5443093b._.js +3 -0
  564. package/.next/server/chunks/ssr/_5443093b._.js.map +1 -0
  565. package/.next/server/chunks/ssr/{_cd23c5af._.js → _5b282394._.js} +3 -3
  566. package/.next/server/chunks/ssr/_5b282394._.js.map +1 -0
  567. package/.next/server/chunks/ssr/{_6e70b5a4._.js → _5cc24343._.js} +3 -3
  568. package/.next/server/chunks/ssr/_5cc24343._.js.map +1 -0
  569. package/.next/server/chunks/ssr/_67830ad6._.js +3 -0
  570. package/.next/server/chunks/ssr/_67830ad6._.js.map +1 -0
  571. package/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_68c68167.js → _7eac37fb._.js} +3 -3
  572. package/.next/server/chunks/ssr/_7eac37fb._.js.map +1 -0
  573. package/.next/server/chunks/ssr/{_92140ca3._.js → _802ee40f._.js} +3 -3
  574. package/.next/server/chunks/ssr/{_25e6aab8._.js.map → _802ee40f._.js.map} +1 -1
  575. package/.next/server/chunks/ssr/{_8c8207c1._.js → _8062e992._.js} +3 -3
  576. package/.next/server/chunks/ssr/_8062e992._.js.map +1 -0
  577. package/.next/server/chunks/ssr/{_0808c2b9._.js → _99994c05._.js} +3 -3
  578. package/.next/server/chunks/ssr/_99994c05._.js.map +1 -0
  579. package/.next/server/chunks/ssr/{_b5e9afcc._.js → _aafc99aa._.js} +3 -3
  580. package/.next/server/chunks/ssr/_aafc99aa._.js.map +1 -0
  581. package/.next/server/chunks/ssr/{_39e6e769._.js → _b7f3caf7._.js} +3 -3
  582. package/.next/server/chunks/ssr/_b7f3caf7._.js.map +1 -0
  583. package/.next/server/chunks/ssr/_c2041f88._.js +4 -0
  584. package/.next/server/chunks/ssr/_c2041f88._.js.map +1 -0
  585. package/.next/server/chunks/ssr/_d2e9dda9._.js +4 -0
  586. package/.next/server/chunks/ssr/_d2e9dda9._.js.map +1 -0
  587. package/.next/server/chunks/ssr/{_3158c108._.js → _f4d8af3b._.js} +3 -3
  588. package/.next/server/chunks/ssr/_f4d8af3b._.js.map +1 -0
  589. package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_tickets_[ticket]_page_actions_25ad633d.js +3 -0
  590. package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_tickets_[ticket]_page_actions_25ad633d.js.map +1 -0
  591. package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_tickets_page_actions_dffb2525.js +3 -0
  592. package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_tickets_page_actions_dffb2525.js.map +1 -0
  593. package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_workflows_page_actions_3defde35.js +3 -0
  594. package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_workflows_page_actions_3defde35.js.map +1 -0
  595. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +3 -0
  596. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -0
  597. package/.next/server/chunks/ssr/ce889_server_app_teams_[teamId]_workflows_[workflowId]_page_actions_880cbbc3.js +3 -0
  598. package/.next/server/chunks/ssr/ce889_server_app_teams_[teamId]_workflows_[workflowId]_page_actions_880cbbc3.js.map +1 -0
  599. package/.next/server/chunks/ssr/node_modules_ea845e5f._.js +3 -0
  600. package/.next/server/chunks/ssr/node_modules_ea845e5f._.js.map +1 -0
  601. package/.next/server/chunks/ssr/{_da6f800e._.js → node_modules_next_aefa2538._.js} +2 -2
  602. package/.next/server/chunks/ssr/node_modules_next_aefa2538._.js.map +1 -0
  603. package/.next/server/chunks/ssr/node_modules_next_dist_8a37abed._.js +4 -0
  604. package/.next/server/chunks/ssr/node_modules_next_dist_8a37abed._.js.map +1 -0
  605. package/.next/server/chunks/ssr/{node_modules_next_dist_client_components_9774470f._.js → node_modules_next_dist_client_components_2fffaa3a._.js} +2 -2
  606. package/.next/server/chunks/ssr/{node_modules_next_dist_client_components_9774470f._.js.map → node_modules_next_dist_client_components_2fffaa3a._.js.map} +1 -1
  607. package/.next/server/chunks/ssr/{_68793c1f._.js → node_modules_next_dist_esm_build_templates_app-page_b5ef32b4.js} +3 -3
  608. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_b5ef32b4.js.map +1 -0
  609. package/.next/server/chunks/ssr/src_13139e3d._.js +3 -0
  610. package/.next/server/chunks/ssr/src_13139e3d._.js.map +1 -0
  611. package/.next/server/chunks/ssr/src_2a73b867._.js +3 -0
  612. package/.next/server/chunks/ssr/src_2a73b867._.js.map +1 -0
  613. package/.next/server/chunks/ssr/src_2dbb3b7f._.js +3 -0
  614. package/.next/server/chunks/ssr/src_2dbb3b7f._.js.map +1 -0
  615. package/.next/server/chunks/ssr/src_417bc4a6._.js +3 -0
  616. package/.next/server/chunks/ssr/src_417bc4a6._.js.map +1 -0
  617. package/.next/server/chunks/ssr/src_59477309._.js +3 -0
  618. package/.next/server/chunks/ssr/src_59477309._.js.map +1 -0
  619. package/.next/server/chunks/ssr/src_79d55c05._.js +3 -0
  620. package/.next/server/chunks/ssr/src_79d55c05._.js.map +1 -0
  621. package/.next/server/chunks/ssr/src_app_HomeClient_tsx_f9f7568d._.js +1 -1
  622. package/.next/server/chunks/ssr/src_app_HomeClient_tsx_f9f7568d._.js.map +1 -1
  623. package/.next/server/chunks/ssr/src_app_agents_[agentId]_agent-editor_tsx_f85bbe65._.js +1 -1
  624. package/.next/server/chunks/ssr/src_app_agents_[agentId]_agent-editor_tsx_f85bbe65._.js.map +1 -1
  625. package/.next/server/chunks/ssr/src_app_global-error_tsx_aa661ba4._.js +3 -0
  626. package/.next/server/chunks/ssr/src_app_global-error_tsx_aa661ba4._.js.map +1 -0
  627. package/.next/server/chunks/ssr/src_app_not-found_tsx_3f23d179._.js +3 -0
  628. package/.next/server/chunks/ssr/src_app_not-found_tsx_3f23d179._.js.map +1 -0
  629. package/.next/server/chunks/ssr/src_app_recipes_[id]_RecipeEditor_index_tsx_98393217._.js +3 -0
  630. package/.next/server/chunks/ssr/src_app_recipes_[id]_RecipeEditor_index_tsx_98393217._.js.map +1 -0
  631. package/.next/server/chunks/ssr/src_app_recipes_recipes-client_tsx_8ed3ca94._.js +1 -1
  632. package/.next/server/chunks/ssr/src_app_recipes_recipes-client_tsx_8ed3ca94._.js.map +1 -1
  633. package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_index_tsx_e68e9cbc._.js +12 -0
  634. package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_index_tsx_e68e9cbc._.js.map +1 -0
  635. package/.next/server/chunks/ssr/src_app_tickets_TicketsBoardClient_tsx_5e156ef3._.js +1 -1
  636. package/.next/server/chunks/ssr/src_app_tickets_TicketsBoardClient_tsx_5e156ef3._.js.map +1 -1
  637. package/.next/server/chunks/ssr/src_e54f24fb._.js +3 -0
  638. package/.next/server/chunks/ssr/src_e54f24fb._.js.map +1 -0
  639. package/.next/server/middleware-build-manifest.js +4 -4
  640. package/.next/server/next-font-manifest.js +1 -1
  641. package/.next/server/next-font-manifest.json +16 -0
  642. package/.next/server/pages/404.html +1 -1
  643. package/.next/server/pages/500.html +2 -2
  644. package/.next/static/chunks/0edab8a24d59a626.js +2 -0
  645. package/.next/static/chunks/11da0a52793b005a.js +1 -0
  646. package/.next/static/chunks/150338287c7dae30.js +1 -0
  647. package/.next/static/chunks/236ef28eb649c432.js +1 -0
  648. package/.next/static/chunks/3e1fe6be993c61fb.js +1 -0
  649. package/.next/static/chunks/55a88f2071ebe766.js +1 -0
  650. package/.next/static/chunks/5cf42ef49ad071af.js +10 -0
  651. package/.next/static/chunks/62e0c437eb8fc2da.js +1 -0
  652. package/.next/static/chunks/{82abf2d65f5428ae.js → 68a088aa49e6124a.js} +3 -3
  653. package/.next/static/chunks/7bb0aafbf73524bf.js +1 -0
  654. package/.next/static/chunks/8d359fbce4ebb835.js +1 -0
  655. package/.next/static/chunks/9197ecb9606557f3.js +1 -0
  656. package/.next/static/chunks/93719e85369dd453.js +1 -0
  657. package/.next/static/chunks/b244476ded155cf9.css +3 -0
  658. package/.next/static/chunks/c75e00652e6b7d85.js +1 -0
  659. package/.next/static/chunks/c84580993f22c17a.js +1 -0
  660. package/.next/static/chunks/d73a47fc8def319c.js +1 -0
  661. package/.next/static/chunks/daa78a9d669e23f5.js +1 -0
  662. package/.next/static/chunks/db4da5ee45033817.js +1 -0
  663. package/.next/static/chunks/e8021fea9aee6b63.js +1 -0
  664. package/.next/static/chunks/e854e56ea8cb6236.js +1 -0
  665. package/.next/static/chunks/ffff6b5105288d2c.js +1 -0
  666. package/.next/static/chunks/{turbopack-ae1340e658f67df8.js → turbopack-0236a74c4f471967.js} +1 -1
  667. package/README.md +22 -1
  668. package/openclaw/index.ts +133 -26
  669. package/openclaw.plugin.json +9 -1
  670. package/package.json +24 -3
  671. package/public/android-chrome-192x192.png +0 -0
  672. package/public/android-chrome-512x512.png +0 -0
  673. package/public/apple-touch-icon.png +0 -0
  674. package/public/chef.jpg +0 -0
  675. package/public/favicon-16x16.png +0 -0
  676. package/public/favicon-32x32.png +0 -0
  677. package/public/favicon.ico +0 -0
  678. package/src/app/HomeClient.tsx +8 -9
  679. package/src/app/agents/[agentId]/agent-editor-tabs.tsx +298 -0
  680. package/src/app/agents/[agentId]/agent-editor.tsx +200 -428
  681. package/src/app/api/__tests__/agents-add-route.test.ts +143 -0
  682. package/src/app/api/__tests__/agents-file-route.test.ts +117 -0
  683. package/src/app/api/__tests__/agents-files-route.test.ts +61 -0
  684. package/src/app/api/__tests__/agents-id-route.test.ts +104 -0
  685. package/src/app/api/__tests__/agents-identity-route.test.ts +92 -0
  686. package/src/app/api/__tests__/agents-route.test.ts +54 -0
  687. package/src/app/api/__tests__/agents-skills-install-route.test.ts +131 -0
  688. package/src/app/api/__tests__/agents-skills-route.test.ts +64 -0
  689. package/src/app/api/__tests__/agents-update-route.test.ts +95 -0
  690. package/src/app/api/__tests__/channels-bindings-route.test.ts +143 -0
  691. package/src/app/api/__tests__/cron-delete-route.test.ts +93 -0
  692. package/src/app/api/__tests__/cron-job-route.test.ts +78 -0
  693. package/src/app/api/__tests__/cron-jobs-route.test.ts +116 -0
  694. package/src/app/api/__tests__/cron-recipe-installed-route.test.ts +114 -0
  695. package/src/app/api/__tests__/gateway-restart-route.test.ts +36 -0
  696. package/src/app/api/__tests__/goals-promote-route.test.ts +200 -0
  697. package/src/app/api/__tests__/goals-route.test.ts +184 -0
  698. package/src/app/api/__tests__/ids-check-route.test.ts +188 -0
  699. package/src/app/api/__tests__/marketplace-recipes-route.test.ts +123 -0
  700. package/src/app/api/__tests__/recipes-clone-route.test.ts +221 -0
  701. package/src/app/api/__tests__/recipes-delete-route.test.ts +248 -0
  702. package/src/app/api/__tests__/recipes-id-route.test.ts +166 -0
  703. package/src/app/api/__tests__/recipes-route.test.ts +57 -0
  704. package/src/app/api/__tests__/recipes-team-agents-route.test.ts +135 -0
  705. package/src/app/api/__tests__/scaffold-route.test.ts +173 -0
  706. package/src/app/api/__tests__/settings-cron-installation-route.test.ts +82 -0
  707. package/src/app/api/__tests__/skills-available-route.test.ts +47 -0
  708. package/src/app/api/__tests__/swarms-start-route.test.ts +79 -0
  709. package/src/app/api/__tests__/swarms-status-route.test.ts +42 -0
  710. package/src/app/api/__tests__/teams-file-route.test.ts +129 -0
  711. package/src/app/api/__tests__/teams-files-route.test.ts +57 -0
  712. package/src/app/api/__tests__/teams-meta-route.test.ts +113 -0
  713. package/src/app/api/__tests__/teams-orchestrator-install-route.test.ts +66 -0
  714. package/src/app/api/__tests__/teams-orchestrator-route.test.ts +59 -0
  715. package/src/app/api/__tests__/teams-remove-team-route.test.ts +122 -0
  716. package/src/app/api/__tests__/teams-skills-install-route.test.ts +78 -0
  717. package/src/app/api/__tests__/teams-skills-route.test.ts +73 -0
  718. package/src/app/api/__tests__/teams-workflow-runs-route.test.ts +85 -0
  719. package/src/app/api/__tests__/teams-workflows-route.test.ts +110 -0
  720. package/src/app/api/__tests__/tickets-move-route.test.ts +60 -0
  721. package/src/app/api/agents/[id]/route.ts +33 -29
  722. package/src/app/api/agents/add/route.ts +38 -33
  723. package/src/app/api/agents/file/route.ts +14 -27
  724. package/src/app/api/agents/files/route.ts +7 -62
  725. package/src/app/api/agents/route.ts +3 -10
  726. package/src/app/api/agents/skills/install/route.ts +2 -14
  727. package/src/app/api/agents/skills/route.ts +6 -18
  728. package/src/app/api/channels/bindings/route.ts +6 -15
  729. package/src/app/api/cron/__tests__/helpers.test.ts +164 -0
  730. package/src/app/api/cron/delete/route.ts +4 -63
  731. package/src/app/api/cron/helpers.ts +172 -0
  732. package/src/app/api/cron/jobs/route.ts +24 -113
  733. package/src/app/api/cron/recipe-installed/route.ts +6 -4
  734. package/src/app/api/gateway/restart/route.ts +2 -1
  735. package/src/app/api/goals/[id]/promote/route.ts +10 -43
  736. package/src/app/api/goals/[id]/route.ts +10 -16
  737. package/src/app/api/goals/route.ts +3 -6
  738. package/src/app/api/ids/check/route.ts +18 -26
  739. package/src/app/api/marketplace/recipes/[slug]/route.ts +2 -2
  740. package/src/app/api/recipes/[id]/route.ts +3 -9
  741. package/src/app/api/recipes/clone/route.ts +3 -38
  742. package/src/app/api/recipes/custom-team/route.ts +193 -0
  743. package/src/app/api/recipes/delete/helpers.ts +65 -0
  744. package/src/app/api/recipes/delete/route.ts +11 -78
  745. package/src/app/api/recipes/team-agents/__tests__/helpers.test.ts +156 -0
  746. package/src/app/api/recipes/team-agents/helpers.ts +151 -0
  747. package/src/app/api/recipes/team-agents/route.ts +27 -125
  748. package/src/app/api/scaffold/__tests__/helpers.test.ts +186 -0
  749. package/src/app/api/scaffold/helpers.ts +214 -0
  750. package/src/app/api/scaffold/route.ts +40 -274
  751. package/src/app/api/settings/cron-installation/route.ts +3 -2
  752. package/src/app/api/skills/available/route.ts +2 -1
  753. package/src/app/api/swarms/start/route.ts +100 -0
  754. package/src/app/api/swarms/status/route.ts +31 -0
  755. package/src/app/api/teams/[teamId]/tickets/assign/route.ts +105 -0
  756. package/src/app/api/teams/[teamId]/tickets/assignees/route.ts +27 -0
  757. package/src/app/api/teams/[teamId]/tickets/delete/route.ts +55 -0
  758. package/src/app/api/teams/[teamId]/tickets/move/route.ts +70 -0
  759. package/src/app/api/teams/[teamId]/tickets/move-to-goals/route.ts +56 -0
  760. package/src/app/api/teams/file/route.ts +26 -47
  761. package/src/app/api/teams/files/route.ts +13 -45
  762. package/src/app/api/teams/memory/route.ts +250 -0
  763. package/src/app/api/teams/meta/route.ts +16 -35
  764. package/src/app/api/teams/orchestrator/install/route.ts +129 -0
  765. package/src/app/api/teams/orchestrator/route.ts +216 -0
  766. package/src/app/api/teams/remove-team/route.ts +7 -15
  767. package/src/app/api/teams/skills/install/route.ts +2 -13
  768. package/src/app/api/teams/skills/route.ts +6 -17
  769. package/src/app/api/teams/workflow-runs/route.ts +534 -0
  770. package/src/app/api/teams/workflow-templates/route.ts +71 -0
  771. package/src/app/api/teams/workflows/route.ts +55 -0
  772. package/src/app/api/tickets/assign/route.ts +94 -0
  773. package/src/app/api/tickets/assignees/route.ts +24 -0
  774. package/src/app/api/tickets/move/route.ts +31 -0
  775. package/src/app/channels/channels-client.tsx +48 -47
  776. package/src/app/cron-jobs/cron-jobs-client.tsx +11 -14
  777. package/src/app/cron-jobs/page.tsx +1 -1
  778. package/src/app/global-error.tsx +50 -0
  779. package/src/app/goals/[id]/goal-editor.tsx +74 -179
  780. package/src/app/goals/goals-client.tsx +30 -39
  781. package/src/app/goals/new/page.tsx +45 -124
  782. package/src/app/layout.tsx +8 -0
  783. package/src/app/manifest.ts +15 -0
  784. package/src/app/not-found.tsx +8 -0
  785. package/src/app/page.tsx +4 -31
  786. package/src/app/recipes/CreateAgentModal.tsx +98 -153
  787. package/src/app/recipes/CreateCustomTeamModal.tsx +375 -0
  788. package/src/app/recipes/CreateModalShell.tsx +55 -0
  789. package/src/app/recipes/CreateTeamModal.tsx +54 -105
  790. package/src/app/recipes/[id]/RecipeEditor/RecipeEditorCreateModal.tsx +72 -0
  791. package/src/app/recipes/[id]/RecipeEditor/RecipeEditorPanel.tsx +216 -0
  792. package/src/app/recipes/[id]/RecipeEditor/index.tsx +271 -0
  793. package/src/app/recipes/[id]/RecipeEditor/recipe-editor-utils.ts +46 -0
  794. package/src/app/recipes/[id]/RecipeEditor/types.ts +52 -0
  795. package/src/app/recipes/[id]/page.tsx +4 -18
  796. package/src/app/recipes/page.tsx +9 -2
  797. package/src/app/recipes/recipes-client.tsx +266 -156
  798. package/src/app/settings/page.tsx +1 -1
  799. package/src/app/settings/settings-client.tsx +11 -10
  800. package/src/app/teams/[teamId]/CloneTeamModal.tsx +77 -111
  801. package/src/app/teams/[teamId]/OrchestratorPanel.tsx +255 -0
  802. package/src/app/teams/[teamId]/OrchestratorSetupModal.tsx +184 -0
  803. package/src/app/teams/[teamId]/PublishChangesModal.tsx +21 -42
  804. package/src/app/teams/[teamId]/page.tsx +27 -49
  805. package/src/app/teams/[teamId]/team-editor/TeamAgentsTab.tsx +145 -0
  806. package/src/app/teams/[teamId]/team-editor/TeamCronTab.tsx +72 -0
  807. package/src/app/teams/[teamId]/team-editor/TeamFilesTab.tsx +74 -0
  808. package/src/app/teams/[teamId]/team-editor/TeamMemoryTab.tsx +349 -0
  809. package/src/app/teams/[teamId]/team-editor/TeamRecipeTab.tsx +151 -0
  810. package/src/app/teams/[teamId]/team-editor/TeamSkillsTab.tsx +68 -0
  811. package/src/app/teams/[teamId]/team-editor/index.tsx +558 -0
  812. package/src/app/teams/[teamId]/team-editor/team-editor-data.ts +255 -0
  813. package/src/app/teams/[teamId]/team-editor/team-editor-utils.ts +78 -0
  814. package/src/app/teams/[teamId]/team-editor/types.ts +34 -0
  815. package/src/app/teams/[teamId]/tickets/[ticket]/page.tsx +35 -0
  816. package/src/app/teams/[teamId]/tickets/page.tsx +15 -0
  817. package/src/app/teams/[teamId]/workflows/[workflowId]/WorkflowCanvas.tsx +111 -0
  818. package/src/app/teams/[teamId]/workflows/[workflowId]/page.tsx +27 -0
  819. package/src/app/teams/[teamId]/workflows/[workflowId]/workflows-editor-client.tsx +1608 -0
  820. package/src/app/teams/[teamId]/workflows/page.tsx +40 -0
  821. package/src/app/teams/[teamId]/workflows/workflows-client.tsx +494 -0
  822. package/src/app/tickets/TicketDetailClient.tsx +147 -0
  823. package/src/app/tickets/TicketsBoardClient.tsx +11 -57
  824. package/src/app/tickets/[ticket]/TicketAssignControl.tsx +112 -0
  825. package/src/app/tickets/[ticket]/page.tsx +13 -21
  826. package/src/app/tickets/page.tsx +5 -2
  827. package/src/components/AppShell.tsx +252 -31
  828. package/src/{app/cron-jobs/DeleteCronJobModal.tsx → components/ConfirmationModal.tsx} +35 -17
  829. package/src/components/DeleteEntityModal.tsx +41 -0
  830. package/src/components/ErrorBoundary.tsx +70 -0
  831. package/src/components/FileListWithOptionalToggle.tsx +86 -0
  832. package/src/components/GoalFormFields.tsx +163 -0
  833. package/src/components/ScaffoldOverlay.tsx +7 -10
  834. package/src/components/ToastProvider.tsx +22 -18
  835. package/src/components/__tests__/ConfirmationModal.test.tsx +109 -0
  836. package/src/components/__tests__/ErrorBoundary.test.tsx +39 -0
  837. package/src/components/__tests__/FileListWithOptionalToggle.test.tsx +109 -0
  838. package/src/components/__tests__/GoalFormFields.test.tsx +117 -0
  839. package/src/components/delete-modals.tsx +59 -0
  840. package/src/components/icons.tsx +12 -10
  841. package/src/lib/__tests__/agent-workspace.test.ts +44 -0
  842. package/src/lib/__tests__/agents.test.ts +36 -0
  843. package/src/lib/__tests__/api-route-helpers.test.ts +188 -0
  844. package/src/lib/__tests__/cron.test.ts +45 -0
  845. package/src/lib/__tests__/editor-utils.test.ts +38 -0
  846. package/src/lib/__tests__/errors.test.ts +15 -0
  847. package/src/lib/__tests__/exec.test.ts +13 -0
  848. package/src/lib/__tests__/fetch-json.test.ts +118 -0
  849. package/src/lib/__tests__/gateway.test.ts +234 -0
  850. package/src/lib/__tests__/goal-promote.test.ts +39 -0
  851. package/src/lib/__tests__/goals-client.test.ts +26 -0
  852. package/src/lib/__tests__/goals.test.ts +275 -0
  853. package/src/lib/__tests__/json.test.ts +15 -0
  854. package/src/lib/__tests__/kitchen-api.test.ts +32 -0
  855. package/src/lib/__tests__/marketplace.test.ts +116 -0
  856. package/src/lib/__tests__/openclaw.test.ts +129 -0
  857. package/src/lib/__tests__/paths.test.ts +136 -0
  858. package/src/lib/__tests__/poll.test.ts +26 -0
  859. package/src/lib/__tests__/recipe-clone.test.ts +85 -0
  860. package/src/lib/__tests__/recipe-team-agents.test.ts +70 -0
  861. package/src/lib/__tests__/recipes.test.ts +199 -0
  862. package/src/lib/__tests__/scaffold-client.test.ts +106 -0
  863. package/src/lib/__tests__/scaffold.test.ts +64 -0
  864. package/src/lib/__tests__/slugify.test.ts +23 -0
  865. package/src/lib/__tests__/tickets.test.ts +158 -0
  866. package/src/lib/__tests__/type-guards.test.ts +18 -0
  867. package/src/lib/__tests__/use-slugified-id.test.tsx +120 -0
  868. package/src/lib/agents.ts +17 -0
  869. package/src/lib/api-route-helpers.ts +157 -0
  870. package/src/lib/cron.ts +40 -0
  871. package/src/lib/editor-utils.ts +18 -0
  872. package/src/lib/errors.ts +7 -0
  873. package/src/lib/exec.ts +4 -0
  874. package/src/lib/fetch-json.ts +29 -0
  875. package/src/lib/gateway.ts +5 -1
  876. package/src/lib/goal-promote.ts +27 -0
  877. package/src/lib/goals-client.ts +69 -0
  878. package/src/lib/goals.ts +22 -3
  879. package/src/lib/json.ts +10 -0
  880. package/src/lib/openclaw.ts +28 -13
  881. package/src/lib/paths.ts +12 -0
  882. package/src/lib/poll.ts +18 -0
  883. package/src/lib/recipe-clone.ts +42 -0
  884. package/src/lib/recipe-team-agents.ts +30 -0
  885. package/src/lib/recipes.ts +47 -0
  886. package/src/lib/scaffold-client.ts +31 -0
  887. package/src/lib/scaffold.ts +37 -0
  888. package/src/lib/slugify.ts +25 -0
  889. package/src/lib/swarms.ts +25 -0
  890. package/src/lib/tickets.ts +81 -25
  891. package/src/lib/type-guards.ts +3 -0
  892. package/src/lib/use-slugified-id.ts +35 -0
  893. package/src/lib/workflows/README.md +11 -0
  894. package/src/lib/workflows/__tests__/storage.test.ts +129 -0
  895. package/src/lib/workflows/__tests__/validate.test.ts +92 -0
  896. package/src/lib/workflows/api-handlers.ts +35 -0
  897. package/src/lib/workflows/readdir.ts +23 -0
  898. package/src/lib/workflows/runs-storage.ts +59 -0
  899. package/src/lib/workflows/runs-types.ts +42 -0
  900. package/src/lib/workflows/storage.ts +70 -0
  901. package/src/lib/workflows/templates/index.ts +1 -0
  902. package/src/lib/workflows/templates/marketing-cadence-v1.ts +142 -0
  903. package/src/lib/workflows/types.ts +48 -0
  904. package/src/lib/workflows/validate.ts +92 -0
  905. package/.next/server/app/tickets.html +0 -1
  906. package/.next/server/app/tickets.meta +0 -15
  907. package/.next/server/app/tickets.rsc +0 -19
  908. package/.next/server/app/tickets.segments/_full.segment.rsc +0 -19
  909. package/.next/server/app/tickets.segments/_head.segment.rsc +0 -6
  910. package/.next/server/app/tickets.segments/_index.segment.rsc +0 -6
  911. package/.next/server/app/tickets.segments/_tree.segment.rsc +0 -4
  912. package/.next/server/app/tickets.segments/tickets/__PAGE__.segment.rsc +0 -8
  913. package/.next/server/app/tickets.segments/tickets.segment.rsc +0 -4
  914. package/.next/server/chunks/[root-of-the-server]__055885ce._.js +0 -3
  915. package/.next/server/chunks/[root-of-the-server]__055885ce._.js.map +0 -1
  916. package/.next/server/chunks/[root-of-the-server]__0c01c5c7._.js +0 -10
  917. package/.next/server/chunks/[root-of-the-server]__0c01c5c7._.js.map +0 -1
  918. package/.next/server/chunks/[root-of-the-server]__1398a33a._.js +0 -3
  919. package/.next/server/chunks/[root-of-the-server]__1398a33a._.js.map +0 -1
  920. package/.next/server/chunks/[root-of-the-server]__159c002b._.js +0 -8
  921. package/.next/server/chunks/[root-of-the-server]__159c002b._.js.map +0 -1
  922. package/.next/server/chunks/[root-of-the-server]__20c60fb7._.js +0 -3
  923. package/.next/server/chunks/[root-of-the-server]__20c60fb7._.js.map +0 -1
  924. package/.next/server/chunks/[root-of-the-server]__2588560d._.js +0 -6
  925. package/.next/server/chunks/[root-of-the-server]__2588560d._.js.map +0 -1
  926. package/.next/server/chunks/[root-of-the-server]__27293e91._.js +0 -3
  927. package/.next/server/chunks/[root-of-the-server]__27293e91._.js.map +0 -1
  928. package/.next/server/chunks/[root-of-the-server]__29c85a51._.js +0 -3
  929. package/.next/server/chunks/[root-of-the-server]__29c85a51._.js.map +0 -1
  930. package/.next/server/chunks/[root-of-the-server]__29fa8108._.js +0 -3
  931. package/.next/server/chunks/[root-of-the-server]__29fa8108._.js.map +0 -1
  932. package/.next/server/chunks/[root-of-the-server]__2bd44067._.js +0 -3
  933. package/.next/server/chunks/[root-of-the-server]__2bd44067._.js.map +0 -1
  934. package/.next/server/chunks/[root-of-the-server]__2dd1afff._.js +0 -3
  935. package/.next/server/chunks/[root-of-the-server]__2dd1afff._.js.map +0 -1
  936. package/.next/server/chunks/[root-of-the-server]__401ab759._.js +0 -3
  937. package/.next/server/chunks/[root-of-the-server]__401ab759._.js.map +0 -1
  938. package/.next/server/chunks/[root-of-the-server]__422c7160._.js +0 -3
  939. package/.next/server/chunks/[root-of-the-server]__422c7160._.js.map +0 -1
  940. package/.next/server/chunks/[root-of-the-server]__4670294e._.js +0 -3
  941. package/.next/server/chunks/[root-of-the-server]__4670294e._.js.map +0 -1
  942. package/.next/server/chunks/[root-of-the-server]__4eda99a9._.js +0 -3
  943. package/.next/server/chunks/[root-of-the-server]__4eda99a9._.js.map +0 -1
  944. package/.next/server/chunks/[root-of-the-server]__54478298._.js +0 -8
  945. package/.next/server/chunks/[root-of-the-server]__54478298._.js.map +0 -1
  946. package/.next/server/chunks/[root-of-the-server]__6dbdb384._.js +0 -3
  947. package/.next/server/chunks/[root-of-the-server]__6dbdb384._.js.map +0 -1
  948. package/.next/server/chunks/[root-of-the-server]__94d68aa3._.js +0 -3
  949. package/.next/server/chunks/[root-of-the-server]__94d68aa3._.js.map +0 -1
  950. package/.next/server/chunks/[root-of-the-server]__9ecbb339._.js +0 -3
  951. package/.next/server/chunks/[root-of-the-server]__9ecbb339._.js.map +0 -1
  952. package/.next/server/chunks/[root-of-the-server]__a27f8405._.js +0 -3
  953. package/.next/server/chunks/[root-of-the-server]__a27f8405._.js.map +0 -1
  954. package/.next/server/chunks/[root-of-the-server]__a6ac3ddf._.js +0 -3
  955. package/.next/server/chunks/[root-of-the-server]__b11231a9._.js +0 -3
  956. package/.next/server/chunks/[root-of-the-server]__b11231a9._.js.map +0 -1
  957. package/.next/server/chunks/[root-of-the-server]__b59b3cdd._.js +0 -3
  958. package/.next/server/chunks/[root-of-the-server]__b59b3cdd._.js.map +0 -1
  959. package/.next/server/chunks/[root-of-the-server]__b5c2b370._.js +0 -3
  960. package/.next/server/chunks/[root-of-the-server]__b5c2b370._.js.map +0 -1
  961. package/.next/server/chunks/[root-of-the-server]__b955e35a._.js +0 -3
  962. package/.next/server/chunks/[root-of-the-server]__b955e35a._.js.map +0 -1
  963. package/.next/server/chunks/[root-of-the-server]__be5f57b2._.js +0 -3
  964. package/.next/server/chunks/[root-of-the-server]__c4ff0427._.js +0 -3
  965. package/.next/server/chunks/[root-of-the-server]__c4ff0427._.js.map +0 -1
  966. package/.next/server/chunks/[root-of-the-server]__c4ffbb03._.js +0 -3
  967. package/.next/server/chunks/[root-of-the-server]__c4ffbb03._.js.map +0 -1
  968. package/.next/server/chunks/[root-of-the-server]__d737ca42._.js +0 -3
  969. package/.next/server/chunks/[root-of-the-server]__d737ca42._.js.map +0 -1
  970. package/.next/server/chunks/[root-of-the-server]__df7df3ac._.js +0 -3
  971. package/.next/server/chunks/[root-of-the-server]__df7df3ac._.js.map +0 -1
  972. package/.next/server/chunks/[root-of-the-server]__dfca6557._.js +0 -3
  973. package/.next/server/chunks/[root-of-the-server]__dfca6557._.js.map +0 -1
  974. package/.next/server/chunks/[root-of-the-server]__e6184ba3._.js +0 -3
  975. package/.next/server/chunks/[root-of-the-server]__e6184ba3._.js.map +0 -1
  976. package/.next/server/chunks/[root-of-the-server]__ed0323e9._.js +0 -8
  977. package/.next/server/chunks/[root-of-the-server]__ed0323e9._.js.map +0 -1
  978. package/.next/server/chunks/[root-of-the-server]__f585823b._.js +0 -6
  979. package/.next/server/chunks/[root-of-the-server]__f585823b._.js.map +0 -1
  980. package/.next/server/chunks/[root-of-the-server]__ff940674._.js +0 -3
  981. package/.next/server/chunks/[root-of-the-server]__ff940674._.js.map +0 -1
  982. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_5a9305ea.js +0 -6
  983. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_5a9305ea.js.map +0 -1
  984. package/.next/server/chunks/src_lib_d2210cbf._.js +0 -3
  985. package/.next/server/chunks/src_lib_d2210cbf._.js.map +0 -1
  986. package/.next/server/chunks/ssr/[externals]__c37e9f91._.js +0 -3
  987. package/.next/server/chunks/ssr/[root-of-the-server]__15600e29._.js +0 -3
  988. package/.next/server/chunks/ssr/[root-of-the-server]__247198dc._.js +0 -3
  989. package/.next/server/chunks/ssr/[root-of-the-server]__2a6f1e3e._.js +0 -3
  990. package/.next/server/chunks/ssr/[root-of-the-server]__346f79e5._.js +0 -3
  991. package/.next/server/chunks/ssr/[root-of-the-server]__346f79e5._.js.map +0 -1
  992. package/.next/server/chunks/ssr/[root-of-the-server]__3575e6da._.js +0 -3
  993. package/.next/server/chunks/ssr/[root-of-the-server]__3ad3e5b1._.js +0 -3
  994. package/.next/server/chunks/ssr/[root-of-the-server]__3bc7ad0a._.js +0 -3
  995. package/.next/server/chunks/ssr/[root-of-the-server]__4393e897._.js +0 -3
  996. package/.next/server/chunks/ssr/[root-of-the-server]__4393e897._.js.map +0 -1
  997. package/.next/server/chunks/ssr/[root-of-the-server]__46e08d44._.js +0 -3
  998. package/.next/server/chunks/ssr/[root-of-the-server]__491e06fa._.js +0 -3
  999. package/.next/server/chunks/ssr/[root-of-the-server]__491e06fa._.js.map +0 -1
  1000. package/.next/server/chunks/ssr/[root-of-the-server]__507d2fc9._.js +0 -3
  1001. package/.next/server/chunks/ssr/[root-of-the-server]__507d2fc9._.js.map +0 -1
  1002. package/.next/server/chunks/ssr/[root-of-the-server]__5d24d429._.js +0 -3
  1003. package/.next/server/chunks/ssr/[root-of-the-server]__5d24d429._.js.map +0 -1
  1004. package/.next/server/chunks/ssr/[root-of-the-server]__7180d770._.js.map +0 -1
  1005. package/.next/server/chunks/ssr/[root-of-the-server]__82ce3aee._.js +0 -3
  1006. package/.next/server/chunks/ssr/[root-of-the-server]__82ce3aee._.js.map +0 -1
  1007. package/.next/server/chunks/ssr/[root-of-the-server]__8d24c9c3._.js +0 -3
  1008. package/.next/server/chunks/ssr/[root-of-the-server]__8d24c9c3._.js.map +0 -1
  1009. package/.next/server/chunks/ssr/[root-of-the-server]__a457c799._.js +0 -3
  1010. package/.next/server/chunks/ssr/[root-of-the-server]__a457c799._.js.map +0 -1
  1011. package/.next/server/chunks/ssr/[root-of-the-server]__bc3b27b0._.js +0 -3
  1012. package/.next/server/chunks/ssr/[root-of-the-server]__bc3b27b0._.js.map +0 -1
  1013. package/.next/server/chunks/ssr/[root-of-the-server]__f75a61bf._.js +0 -3
  1014. package/.next/server/chunks/ssr/[root-of-the-server]__f75a61bf._.js.map +0 -1
  1015. package/.next/server/chunks/ssr/[root-of-the-server]__fd669584._.js +0 -3
  1016. package/.next/server/chunks/ssr/_0808c2b9._.js.map +0 -1
  1017. package/.next/server/chunks/ssr/_1aad1d9b._.js +0 -24
  1018. package/.next/server/chunks/ssr/_1aad1d9b._.js.map +0 -1
  1019. package/.next/server/chunks/ssr/_3158c108._.js.map +0 -1
  1020. package/.next/server/chunks/ssr/_39e6e769._.js.map +0 -1
  1021. package/.next/server/chunks/ssr/_3c8b2df6._.js.map +0 -1
  1022. package/.next/server/chunks/ssr/_5070929e._.js +0 -3
  1023. package/.next/server/chunks/ssr/_5070929e._.js.map +0 -1
  1024. package/.next/server/chunks/ssr/_68793c1f._.js.map +0 -1
  1025. package/.next/server/chunks/ssr/_6e70b5a4._.js.map +0 -1
  1026. package/.next/server/chunks/ssr/_8c45edba._.js.map +0 -1
  1027. package/.next/server/chunks/ssr/_8c8207c1._.js.map +0 -1
  1028. package/.next/server/chunks/ssr/_92140ca3._.js.map +0 -1
  1029. package/.next/server/chunks/ssr/_b5e9afcc._.js.map +0 -1
  1030. package/.next/server/chunks/ssr/_cd23c5af._.js.map +0 -1
  1031. package/.next/server/chunks/ssr/_d27483a1._.js.map +0 -1
  1032. package/.next/server/chunks/ssr/_da6f800e._.js.map +0 -1
  1033. package/.next/server/chunks/ssr/d4b1c_modules_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_6ef9314a.js +0 -3
  1034. package/.next/server/chunks/ssr/d4b1c_modules_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_6ef9314a.js.map +0 -1
  1035. package/.next/server/chunks/ssr/node_modules_next_dist_12287b3d._.js.map +0 -1
  1036. package/.next/server/chunks/ssr/node_modules_next_dist_852965c2._.js +0 -3
  1037. package/.next/server/chunks/ssr/node_modules_next_dist_852965c2._.js.map +0 -1
  1038. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js +0 -3
  1039. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js.map +0 -1
  1040. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_ece394eb.js +0 -3
  1041. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_ece394eb.js.map +0 -1
  1042. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_68c68167.js.map +0 -1
  1043. package/.next/server/chunks/ssr/src_app_channels_channels-client_tsx_8c8be116._.js +0 -3
  1044. package/.next/server/chunks/ssr/src_app_channels_channels-client_tsx_8c8be116._.js.map +0 -1
  1045. package/.next/server/chunks/ssr/src_app_goals_[id]_goal-editor_tsx_7df8193f._.js +0 -3
  1046. package/.next/server/chunks/ssr/src_app_goals_[id]_goal-editor_tsx_7df8193f._.js.map +0 -1
  1047. package/.next/server/chunks/ssr/src_app_goals_goals-client_tsx_a45eeff4._.js +0 -3
  1048. package/.next/server/chunks/ssr/src_app_goals_goals-client_tsx_a45eeff4._.js.map +0 -1
  1049. package/.next/server/chunks/ssr/src_app_goals_new_page_tsx_8f749229._.js +0 -3
  1050. package/.next/server/chunks/ssr/src_app_goals_new_page_tsx_8f749229._.js.map +0 -1
  1051. package/.next/server/chunks/ssr/src_app_recipes_[id]_RecipeEditor_tsx_c6d38350._.js +0 -3
  1052. package/.next/server/chunks/ssr/src_app_recipes_[id]_RecipeEditor_tsx_c6d38350._.js.map +0 -1
  1053. package/.next/server/chunks/ssr/src_app_settings_settings-client_tsx_279084f8._.js +0 -3
  1054. package/.next/server/chunks/ssr/src_app_settings_settings-client_tsx_279084f8._.js.map +0 -1
  1055. package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_tsx_2900b91d._.js +0 -12
  1056. package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_tsx_2900b91d._.js.map +0 -1
  1057. package/.next/static/chunks/10cbf02e6fc36465.js +0 -2
  1058. package/.next/static/chunks/1ce21af6dfb18ee3.js +0 -1
  1059. package/.next/static/chunks/40f7fde35327d214.js +0 -1
  1060. package/.next/static/chunks/54beb791bcc086ae.js +0 -1
  1061. package/.next/static/chunks/55866d57aa2c7a9c.js +0 -1
  1062. package/.next/static/chunks/6a7862e37c616cc3.js +0 -1
  1063. package/.next/static/chunks/817ae077ec8c6255.js +0 -1
  1064. package/.next/static/chunks/8484c54dc9a377e8.js +0 -10
  1065. package/.next/static/chunks/8662fcc3cdff66f3.js +0 -1
  1066. package/.next/static/chunks/99208ebf7e47471d.js +0 -1
  1067. package/.next/static/chunks/a4e69b85b74277a7.css +0 -3
  1068. package/.next/static/chunks/a9ed074e89b16a5e.js +0 -1
  1069. package/.next/static/chunks/c6dfa918cafb6c0c.js +0 -1
  1070. package/.next/static/chunks/d1c5f764e5fd615a.js +0 -1
  1071. package/.next/static/chunks/d4ce2f908d8c4dea.js +0 -1
  1072. package/.next/static/chunks/de9e30e86ef31e72.js +0 -1
  1073. package/src/app/recipes/DeleteRecipeModal.tsx +0 -62
  1074. package/src/app/recipes/[id]/RecipeEditor.tsx +0 -697
  1075. package/src/app/teams/[teamId]/DeleteTeamModal.tsx +0 -54
  1076. package/src/app/teams/[teamId]/team-editor.tsx +0 -1195
  1077. /package/.next/server/chunks/{[root-of-the-server]__74b80ca4._.js.map → [root-of-the-server]__c63a9f28._.js.map} +0 -0
  1078. /package/.next/server/chunks/{ssr/[externals]__c37e9f91._.js.map → _next-internal_server_app_api_recipes_custom-team_route_actions_861b1489.js.map} +0 -0
  1079. /package/.next/server/chunks/ssr/{[root-of-the-server]__3bc7ad0a._.js.map → [root-of-the-server]__0d4cb2ba._.js.map} +0 -0
  1080. /package/.next/server/chunks/ssr/{[root-of-the-server]__e2e52c6e._.js.map → [root-of-the-server]__78cdd31e._.js.map} +0 -0
  1081. /package/.next/static/{N9RkFGiZEAkG3RdK_y3XE → z9yFlFZ5f_hw9mm0nfMJl}/_buildManifest.js +0 -0
  1082. /package/.next/static/{N9RkFGiZEAkG3RdK_y3XE → z9yFlFZ5f_hw9mm0nfMJl}/_clientMiddlewareManifest.json +0 -0
  1083. /package/.next/static/{N9RkFGiZEAkG3RdK_y3XE → z9yFlFZ5f_hw9mm0nfMJl}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/errors.ts","../../../src/lib/kitchen-api.ts","../../../src/lib/openclaw.ts","../../../src/app/api/teams/orchestrator/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\";\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\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\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 = String(res.stdout ?? \"\");\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\n\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 path from \"node:path\";\nimport { NextResponse } from \"next/server\";\n\nimport { errorMessage } from \"@/lib/errors\";\nimport { getKitchenApi } from \"@/lib/kitchen-api\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\n\ntype AgentListItem = {\n id: string;\n identityName?: string;\n workspace?: string;\n};\n\ntype TmuxSession = {\n name: string;\n attached: boolean;\n windows?: number;\n created?: string;\n};\n\ntype GitWorktree = {\n path: string;\n branch?: string;\n sha?: string;\n};\n\nasync function listAgents(): Promise<AgentListItem[]> {\n const res = await runOpenClaw([\"agents\", \"list\", \"--json\"]);\n if (!res.ok) throw new Error(res.stderr || \"Failed to list agents\");\n return JSON.parse(res.stdout) as AgentListItem[];\n}\n\nfunction pickOrchestratorAgentId(teamId: string, agents: AgentListItem[]) {\n const candidates = [\n `${teamId}-swarm-orchestrator`,\n `${teamId}-orchestrator`,\n \"swarm-orchestrator\",\n \"orchestrator\",\n ];\n\n for (const id of candidates) {\n const match = agents.find((a) => a.id === id);\n if (match) return match;\n }\n\n // Heuristic fallback: any agent id containing \"orchestrator\" whose workspace path mentions the teamId.\n const heuristic = agents.find((a) => {\n const id = String(a.id ?? \"\");\n const ws = String(a.workspace ?? \"\");\n return id.includes(\"orchestrator\") && (ws.includes(`/workspace-${teamId}`) || ws.includes(teamId));\n });\n return heuristic ?? null;\n}\n\nasync function runCommand(argv: string[], timeoutMs = 8000) {\n const api = getKitchenApi();\n const res = (await api.runtime.system.runCommandWithTimeout(argv, { timeoutMs })) as {\n stdout?: unknown;\n stderr?: unknown;\n };\n return { stdout: String(res.stdout ?? \"\"), stderr: String(res.stderr ?? \"\") };\n}\n\nfunction parseTmuxList(stdout: string): TmuxSession[] {\n const lines = stdout\n .split(\"\\n\")\n .map((l) => l.trimEnd())\n .filter(Boolean);\n\n // Expected format:\n // name\\tattached\\twindows\\tcreated\n return lines.map((line) => {\n const [name, attached, windows, created] = line.split(\"\\t\");\n return {\n name: String(name ?? \"\").trim(),\n attached: String(attached ?? \"0\").trim() === \"1\",\n windows: windows ? Number(windows) : undefined,\n created: created ? String(created) : undefined,\n };\n });\n}\n\nfunction parseWorktreePorcelain(stdout: string): GitWorktree[] {\n // `git worktree list --porcelain` is a list of blocks separated by blank lines.\n const blocks = stdout\n .split(/\\n\\s*\\n/g)\n .map((b) => b.trim())\n .filter(Boolean);\n\n return blocks\n .map((block) => {\n const wt: GitWorktree = { path: \"\" };\n for (const rawLine of block.split(\"\\n\")) {\n const line = rawLine.trim();\n if (line.startsWith(\"worktree \")) wt.path = line.slice(\"worktree \".length).trim();\n else if (line.startsWith(\"HEAD \")) wt.sha = line.slice(\"HEAD \".length).trim();\n else if (line.startsWith(\"branch \")) wt.branch = line.slice(\"branch \".length).trim();\n }\n return wt.path ? wt : null;\n })\n .filter((x): x is GitWorktree => Boolean(x));\n}\n\nasync function firstExistingJsonFile(absCandidates: string[]) {\n for (const p of absCandidates) {\n try {\n const stat = await fs.stat(p);\n if (stat.isFile()) return p;\n } catch {\n // ignore\n }\n }\n return null;\n}\n\nexport async function GET(req: Request) {\n const { searchParams } = new URL(req.url);\n const teamId = String(searchParams.get(\"teamId\") ?? \"\").trim();\n if (!teamId) return NextResponse.json({ ok: false, error: \"teamId is required\" }, { status: 400 });\n\n try {\n const agents = await listAgents();\n const match = pickOrchestratorAgentId(teamId, agents);\n\n if (!match || !match.workspace) {\n return NextResponse.json({\n ok: true,\n teamId,\n present: false,\n reason:\n \"No orchestrator agent detected. Expected an agent id like <teamId>-swarm-orchestrator (or swarm-orchestrator).\",\n });\n }\n\n const workspace = match.workspace;\n\n // tmux sessions (best-effort)\n let tmuxSessions: TmuxSession[] = [];\n try {\n const { stdout } = await runCommand([\n \"tmux\",\n \"ls\",\n \"-F\",\n \"#S\\t#{session_attached}\\t#{session_windows}\\t#{session_created_string}\",\n ]);\n tmuxSessions = parseTmuxList(stdout);\n } catch {\n tmuxSessions = [];\n }\n\n // git worktrees (best-effort)\n let worktrees: GitWorktree[] = [];\n try {\n const { stdout } = await runCommand([\"git\", \"-C\", workspace, \"worktree\", \"list\", \"--porcelain\"], 12000);\n worktrees = parseWorktreePorcelain(stdout);\n } catch {\n worktrees = [];\n }\n\n // active tasks (best-effort)\n const activeTasksPath = await firstExistingJsonFile([\n path.join(workspace, \"active-tasks.json\"),\n path.join(workspace, \".clawdbot\", \"active-tasks.json\"),\n path.join(workspace, \"notes\", \"active-tasks.json\"),\n ]);\n\n let activeTasksSummary: { path: string; taskCount?: number; rawType?: string } | null = null;\n if (activeTasksPath) {\n try {\n const raw = await fs.readFile(activeTasksPath, \"utf8\");\n const parsed = JSON.parse(raw) as unknown;\n if (Array.isArray(parsed)) {\n activeTasksSummary = { path: activeTasksPath, taskCount: parsed.length, rawType: \"array\" };\n } else if (parsed && typeof parsed === \"object\") {\n const obj = parsed as { tasks?: unknown };\n const tasks = Array.isArray(obj.tasks) ? obj.tasks : null;\n activeTasksSummary = {\n path: activeTasksPath,\n taskCount: tasks ? tasks.length : undefined,\n rawType: \"object\",\n };\n } else {\n activeTasksSummary = { path: activeTasksPath, rawType: typeof parsed };\n }\n } catch {\n activeTasksSummary = { path: activeTasksPath };\n }\n }\n\n const settingsPaths = [\n path.join(workspace, \".env\"),\n path.join(workspace, \".clawdbot\", \"README.md\"),\n path.join(workspace, \".clawdbot\", \"CONVENTIONS.md\"),\n path.join(workspace, \".clawdbot\", \"PROMPT_TEMPLATE.md\"),\n path.join(workspace, \".clawdbot\", \"TEMPLATE.md\"),\n ];\n\n return NextResponse.json({\n ok: true,\n teamId,\n present: true,\n agent: {\n id: match.id,\n identityName: match.identityName,\n workspace,\n },\n tmuxSessions,\n worktrees,\n activeTasksSummary,\n settingsPaths,\n });\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/teams/orchestrator/route\",\n pathname: \"/api/teams/orchestrator\",\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/teams/orchestrator/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/teams/orchestrator/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,ypCCIO,SAAS,IACd,IAAM,EAAO,WAA6D,iBAAiB,CAC3F,GAAI,CAAC,EACH,GADQ,GACF,AAAI,MACR,gIAGJ,OAAO,CACT,qDClBA,IAAA,EAAA,EAAA,CAAA,CAAA,OAiCO,eAAe,EAAY,CAAc,EAC9C,IAAM,EAAM,CAAA,EAAA,EAAA,aAAA,AAAa,IACzB,GAAI,CACF,IAAM,EAAO,MAAM,EAAI,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,cAAe,EAAK,CAAE,CAAE,UAAW,IAAO,GAQjG,EAAS,OAAO,EAAI,MAAM,EAAI,IAC9B,EAAS,OAAO,EAAI,MAAM,EAAI,IAC9B,EA5BoB,AAA5B,SA4BmB,CA5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,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,3 @@
1
+ module.exports=[40317,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},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 o(){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 i(){let e=await o();return n.default.join(e,"recipes")}async function s(){let e=await o();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 u(e,t){return n.default.resolve(e,"..",`workspace-${t}`)}function c(e){let t=e.replace(/\\/g,"/");if(!t||t.startsWith("/")||t.includes(".."))throw Error("Invalid file name");return t}async function d(){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",()=>c,"getBuiltinRecipesDir",()=>d,"getTeamWorkspaceDir",()=>l,"getWorkspaceDir",()=>o,"getWorkspaceGoalsDir",()=>s,"getWorkspaceRecipesDir",()=>i,"readOpenClawConfig",()=>a,"teamDirFromBaseWorkspace",()=>u])},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);async function r(e){let r=(0,t.getKitchenApi)();try{let t=await r.runtime.system.runCommandWithTimeout(["openclaw",...e],{timeoutMs:12e4}),n=String(t.stdout??""),a=String(t.stderr??""),o="number"==typeof t.exitCode?t.exitCode:"number"==typeof t.code?t.code:"number"==typeof t.status?t.status:0;if(0!==o)return{ok:!1,exitCode:o,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:"string"==typeof t.stdout?t.stdout:t.stdout&&"object"==typeof t.stdout&&"toString"in t.stdout?String(t.stdout.toString()):"",stderr:"string"==typeof t.stderr?t.stderr:t.stderr&&"object"==typeof t.stderr&&"toString"in t.stderr?String(t.stderr.toString()):"string"==typeof t.message?t.message:String(t)}}}e.s(["runOpenClaw",()=>r])},76509,e=>{"use strict";var t=e.i(7367);async function r(){let e=await (0,t.readOpenClawConfig)(),r=e.gateway?.port??18789,n=e.gateway?.auth?.token;if(!n)throw Error("Missing gateway token (gateway.auth.token in ~/.openclaw/openclaw.json)");return{baseUrl:`http://127.0.0.1:${r}`,token:n}}async function n(e){let{baseUrl:t,token:n}=await r(),a=await fetch(`${t}/tools/invoke`,{method:"POST",headers:{"content-type":"application/json",authorization:`Bearer ${n}`},body:JSON.stringify(e)}),o=await a.json();if(!a.ok||!o.ok)throw Error("object"==typeof o.error&&o.error?.message||("string"==typeof o.error?o.error:null)||`tools/invoke failed (${a.status})`);return o.result}function a(e){return e?.find(e=>"text"===e.type)?.text}async function o(){let e=await n({tool:"gateway",args:{action:"config.get",raw:"{}"}}),t=a(e?.content);if(!t)throw Error("gateway config.get: missing text payload");let r=JSON.parse(t),o=String(r?.result?.raw??""),i=String(r?.result?.hash??"");if(!o)throw Error("gateway config.get: missing result.raw");if(!i)throw Error("gateway config.get: missing result.hash");return{raw:o,hash:i}}async function i(e,t){let{hash:r}=await o();return n({tool:"gateway",args:{action:"config.patch",raw:JSON.stringify(e,null,2),baseHash:r,note:t??"ClawKitchen settings update",restartDelayMs:1e3}})}e.s(["gatewayConfigGet",()=>o,"gatewayConfigPatch",()=>i,"getContentText",()=>a,"toolsInvoke",()=>n])},8884,e=>{"use strict";var t=e.i(12714),r=e.i(50227),n=e.i(5003);function a(e,t,r,n){for(let o of Object.values(e))if(o&&!o.orphaned){var a;let e=String(o.installedCronId??"").trim();e&&n.set(e,{kind:r,id:t,label:t,href:"team"===(a={kind:r,id:t}).kind?`/teams/${encodeURIComponent(a.id)}`:`/agents/${encodeURIComponent(a.id)}`})}}async function o(e){try{let o=await (0,n.runOpenClaw)(["config","get","agents.list","--no-color"]);if(!o.ok)return;for(let n of JSON.parse(String(o.stdout??"[]"))){let o=String(n.id??""),i=String(n.workspace??"");if(!o||!i)continue;let s=r.default.join(i,"notes","cron-jobs.json");try{let r=await t.default.readFile(s,"utf8"),n=JSON.parse(r);a(n.entries??{},o,"agent",e)}catch{}}}catch{}}async function i(e){let n=new Map,i=r.default.resolve(e,"..");for(let e of(await t.default.readdir(i,{withFileTypes:!0}))){if(!e.isDirectory()||!e.name.startsWith("workspace-"))continue;let o=e.name.replace(/^workspace-/,""),s=r.default.join(i,e.name,"team.json"),l=r.default.join(i,e.name,"notes","cron-jobs.json");try{await t.default.stat(s)}catch{continue}try{let e=await t.default.readFile(l,"utf8"),r=JSON.parse(e);a(r.entries??{},o,"team",n)}catch{}}return await o(n),n}async function s(e){try{let r=await t.default.readFile(e,"utf8"),n=JSON.parse(r).entries??{};return Object.values(n).filter(e=>!e.orphaned).map(e=>String(e.installedCronId??"").trim()).filter(Boolean)}catch{return[]}}function l(e,t){return e.map(e=>{let r=String(e.id??""),n=r?t.get(r):void 0;return n?{...e,scope:n}:e})}async function u(e,r,n){try{let a=await t.default.readFile(r,"utf8"),o=JSON.parse(a);if(!o||1!==o.version||!o.entries)return null;let i=!1,s=[];for(let[t,r]of Object.entries(o.entries))String(r?.installedCronId??"").trim()!==e||r.orphaned||(o.entries[t]={...r,orphaned:!0},i=!0,s.push(t));if(!i)return null;return await t.default.writeFile(r,JSON.stringify(o,null,2)+"\n","utf8"),{teamId:n,mappingPath:r,keys:s}}catch{return null}}async function c(e,n){let a=[],o=r.default.resolve(n,"..");for(let n of(await t.default.readdir(o,{withFileTypes:!0}))){if(!n.isDirectory()||!n.name.startsWith("workspace-"))continue;let i=n.name.replace(/^workspace-/,""),s=r.default.join(o,n.name,"team.json"),l=r.default.join(o,n.name,"notes","cron-jobs.json");try{await t.default.stat(s)}catch{continue}let c=await u(e,l,i);c&&a.push(c)}return a}async function d(e){let t=await e({tool:"gateway",args:{action:"config.get",raw:"{}"}}),r=t?.content?.find(e=>"text"===e.type)?.text??"",n=r?JSON.parse(r):null,a=String(n?.result?.raw??""),o=a?JSON.parse(a):null;return String(o?.agents?.defaults?.workspace??"").trim()}e.s(["buildIdToScopeMap",()=>i,"enrichJobsWithScope",()=>l,"getBaseWorkspaceFromGateway",()=>d,"getInstalledIdsForTeam",()=>s,"markOrphanedInTeamWorkspaces",()=>c])},71417,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),o=e.i(61916),i=e.i(74677),s=e.i(69741),l=e.i(16795),u=e.i(87718),c=e.i(95169),d=e.i(47587),p=e.i(66012),f=e.i(70101),g=e.i(26937),h=e.i(10372),w=e.i(93695);e.i(52474);var y=e.i(220),m=e.i(50227),x=e.i(89171),v=e.i(76509),j=e.i(7367),R=e.i(40317),b=e.i(8884);async function S(e){try{let t=new URL(e.url),r=String(t.searchParams.get("teamId")??"").trim(),n=await (0,v.toolsInvoke)({tool:"cron",args:{action:"list",includeDisabled:!0}}),a=n?.content?.find(e=>"text"===e.type)?.text,o=n?.content?.find(e=>"json"===e.type&&e.json)?.json,i=o&&"object"==typeof o?o:a&&a.trim()?JSON.parse(a):{jobs:[]},s=Array.isArray(i.jobs)?i.jobs:[],l=String((await (0,j.readOpenClawConfig)()).agents?.defaults?.workspace??"").trim(),u=l?await (0,b.buildIdToScopeMap)(l):new Map,c=(0,b.enrichJobsWithScope)(s,u);if(!r)return x.NextResponse.json({ok:!0,jobs:c});let d=await (0,j.getTeamWorkspaceDir)(r),p=m.default.join(d,"notes","cron-jobs.json"),f=await (0,b.getInstalledIdsForTeam)(p),g=c.filter(e=>f.includes(String(e.id??"")));return x.NextResponse.json({ok:!0,jobs:g,teamId:r,provenancePath:p,installedIds:f})}catch(t){let e=(0,R.errorMessage)(t);return x.NextResponse.json({ok:!1,error:e},{status:500})}}e.s(["GET",()=>S],46311);var C=e.i(46311);let k=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/cron/jobs/route",pathname:"/api/cron/jobs",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/cron/jobs/route.ts",nextConfigOutput:"standalone",userland:C}),{workAsyncStorage:E,workUnitAsyncStorage:O,serverHooks:N}=k;function T(){return(0,n.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:O})}async function A(e,t,n){k.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/cron/jobs/route";m=m.replace(/\/index$/,"")||"/";let x=await k.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!x)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:v,params:j,nextConfig:R,parsedUrl:b,isDraftMode:S,prerenderManifest:C,routerServerContext:E,isOnDemandRevalidate:O,revalidateOnlyGenerated:N,resolvedPathname:T,clientReferenceManifest:A,serverActionsManifest:I}=x,P=(0,s.normalizeAppPath)(m),D=!!(C.dynamicRoutes[P]||C.routes[T]),q=async()=>((null==E?void 0:E.render404)?await E.render404(e,t,b,!1):t.end("This page could not be found"),null);if(D&&!S){let e=!!C.routes[T],t=C.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(R.experimental.adapterPath)return await q();throw new w.NoFallbackError}}let _=null;!D||k.isDev||S||(_="/index"===(_=T)?"/":_);let F=!0===k.isDev||!D,M=D&&!F;I&&A&&(0,i.setManifestsSingleton)({page:m,clientReferenceManifest:A,serverActionsManifest:I});let U=e.method||"GET",H=(0,o.getTracer)(),$=H.getActiveScopeSpan(),W={params:j,prerenderManifest:C,renderOpts:{experimental:{authInterrupts:!!R.experimental.authInterrupts},cacheComponents:!!R.cacheComponents,supportsDynamicResponse:F,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:R.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>k.onRequestError(e,t,n,a,E)},sharedContext:{buildId:v}},J=new l.NodeNextRequest(e),K=new l.NodeNextResponse(t),B=u.NextRequestAdapter.fromNodeNextRequest(J,(0,u.signalFromNodeResponse)(t));try{let i=async e=>k.handle(B,W).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.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=`${U} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${U} ${m}`)}),s=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var o,l;let u=async({previousCacheEntry:r})=>{try{if(!s&&O&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(a);e.fetchMetrics=W.renderOpts.fetchMetrics;let l=W.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let u=W.renderOpts.collectedTags;if(!D)return await (0,p.sendResponse)(J,K,o,W.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(o.headers);u&&(t[h.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,n=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:W.renderOpts.collectedExpire;return{value:{kind:y.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await k.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:O})},!1,E),t}},c=await k.handleResponse({req:e,nextConfig:R,cacheKey:_,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:N,responseGenerator:u,waitUntil:n.waitUntil,isMinimalMode:s});if(!D)return null;if((null==c||null==(o=c.value)?void 0:o.kind)!==y.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==c||null==(l=c.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",O?"REVALIDATED":c.isMiss?"MISS":c.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let w=(0,f.fromNodeOutgoingHttpHeaders)(c.value.headers);return s&&D||w.delete(h.NEXT_CACHE_TAGS_HEADER),!c.cacheControl||t.getHeader("Cache-Control")||w.get("Cache-Control")||w.set("Cache-Control",(0,g.getCacheControlHeader)(c.cacheControl)),await (0,p.sendResponse)(J,K,new Response(c.value.body,{headers:w,status:c.value.status||200})),null};$?await l($):await H.withPropagatedContext(e.headers,()=>H.trace(c.BaseServerSpan.handleRequest,{spanName:`${U} ${m}`,kind:o.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},l))}catch(t){if(t instanceof w.NoFallbackError||await k.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:O})},!1,E),D)throw t;return await (0,p.sendResponse)(J,K,new Response(null,{status:500})),null}}e.s(["handler",()=>A,"patchFetch",()=>T,"routeModule",()=>k,"serverHooks",()=>N,"workAsyncStorage",()=>E,"workUnitAsyncStorage",()=>O],71417)}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__ce9cfa39._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/errors.ts","../../../src/lib/paths.ts","../../../src/lib/kitchen-api.ts","../../../src/lib/openclaw.ts","../../../src/lib/gateway.ts","../../../src/app/api/cron/helpers.ts","../../../src/app/api/cron/jobs/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","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};\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 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 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","// 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\";\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\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\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 = String(res.stdout ?? \"\");\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\n\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 { readOpenClawConfig } from \"@/lib/paths\";\n\ntype ToolsInvokeRequest = {\n tool: string;\n action?: string;\n args?: Record<string, unknown>;\n sessionKey?: string;\n dryRun?: boolean;\n};\n\ntype ToolsInvokeResponse = {\n ok: boolean;\n result?: unknown;\n error?: { message?: string } | string;\n};\n\ntype GatewayConfigGetResult = {\n path: string;\n exists: boolean;\n raw: string;\n hash: string;\n};\n\ntype ToolTextEnvelope = {\n ok: boolean;\n result: GatewayConfigGetResult;\n};\n\nasync function getGatewayBaseUrlAndToken() {\n // ClawKitchen runs in-process with the OpenClaw Gateway (as a plugin), so we can read\n // the gateway port/token from the loaded config.\n const cfg = await readOpenClawConfig();\n const port = cfg.gateway?.port ?? 18789;\n const token = cfg.gateway?.auth?.token;\n if (!token) throw new Error(\"Missing gateway token (gateway.auth.token in ~/.openclaw/openclaw.json)\");\n\n const baseUrl = `http://127.0.0.1:${port}`;\n return { baseUrl, token };\n}\n\nexport async function toolsInvoke<T = unknown>(req: ToolsInvokeRequest): Promise<T> {\n const { baseUrl, token } = await getGatewayBaseUrlAndToken();\n\n const res = await fetch(`${baseUrl}/tools/invoke`, {\n method: \"POST\",\n headers: {\n \"content-type\": \"application/json\",\n authorization: `Bearer ${token}`,\n },\n body: JSON.stringify(req),\n });\n\n const json = (await res.json()) as ToolsInvokeResponse;\n if (!res.ok || !json.ok) {\n const msg =\n (typeof json.error === \"object\" && json.error?.message) ||\n (typeof json.error === \"string\" ? json.error : null) ||\n `tools/invoke failed (${res.status})`;\n throw new Error(msg);\n }\n\n return json.result as T;\n}\n\nexport function getContentText(content: Array<{ type: string; text?: string }> | undefined): string | undefined {\n return content?.find((c) => c.type === \"text\")?.text;\n}\n\nexport async function gatewayConfigGet(): Promise<{ raw: string; hash: string }> {\n const toolResult = await toolsInvoke<{ content: Array<{ type: string; text?: string }> }>({\n tool: \"gateway\",\n args: { action: \"config.get\", raw: \"{}\" },\n });\n\n const text = getContentText(toolResult?.content);\n if (!text) throw new Error(\"gateway config.get: missing text payload\");\n\n const parsed = JSON.parse(text) as ToolTextEnvelope;\n const raw = String(parsed?.result?.raw ?? \"\");\n const hash = String(parsed?.result?.hash ?? \"\");\n if (!raw) throw new Error(\"gateway config.get: missing result.raw\");\n if (!hash) throw new Error(\"gateway config.get: missing result.hash\");\n return { raw, hash };\n}\n\nexport async function gatewayConfigPatch(patch: unknown, note?: string) {\n const { hash } = await gatewayConfigGet();\n const raw = JSON.stringify(patch, null, 2);\n\n return toolsInvoke({\n tool: \"gateway\",\n args: {\n action: \"config.patch\",\n raw,\n baseHash: hash,\n note: note ?? \"ClawKitchen settings update\",\n restartDelayMs: 1000,\n },\n });\n}\n","import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\n\nexport type CronScope = { kind: \"team\" | \"agent\"; id: string; label: string; href: string };\n\nfunction hrefForScope(scope: { kind: \"team\" | \"agent\"; id: string }) {\n return scope.kind === \"team\" ? `/teams/${encodeURIComponent(scope.id)}` : `/agents/${encodeURIComponent(scope.id)}`;\n}\n\ntype CronEntry = { installedCronId?: unknown; orphaned?: unknown };\n\nfunction addEntriesToScopeMap(\n entries: Record<string, CronEntry>,\n scopeId: string,\n kind: \"team\" | \"agent\",\n idToScope: Map<string, CronScope>\n): void {\n for (const v of Object.values(entries)) {\n if (v && !Boolean(v.orphaned)) {\n const id = String(v.installedCronId ?? \"\").trim();\n if (id) idToScope.set(id, { kind, id: scopeId, label: scopeId, href: hrefForScope({ kind, id: scopeId }) });\n }\n }\n}\n\nasync function collectAgentScopes(idToScope: Map<string, CronScope>): Promise<void> {\n try {\n const cfgText = await runOpenClaw([\"config\", \"get\", \"agents.list\", \"--no-color\"]);\n if (!cfgText.ok) return;\n const list = JSON.parse(String(cfgText.stdout ?? \"[]\")) as Array<{ id?: unknown; workspace?: unknown }>;\n for (const a of list) {\n const agentId = String(a.id ?? \"\");\n const workspace = String(a.workspace ?? \"\");\n if (!agentId || !workspace) continue;\n const cronPath = path.join(workspace, \"notes\", \"cron-jobs.json\");\n try {\n const raw = await fs.readFile(cronPath, \"utf8\");\n const json = JSON.parse(raw) as { entries?: Record<string, CronEntry> };\n addEntriesToScopeMap(json.entries ?? {}, agentId, \"agent\", idToScope);\n } catch {\n // ignore\n }\n }\n } catch {\n // ignore\n }\n}\n\nexport async function buildIdToScopeMap(baseWorkspace: string): Promise<Map<string, CronScope>> {\n const idToScope = new Map<string, CronScope>();\n const baseHome = path.resolve(baseWorkspace, \"..\");\n const entries = await fs.readdir(baseHome, { withFileTypes: true });\n\n for (const ent of entries) {\n if (!ent.isDirectory() || !ent.name.startsWith(\"workspace-\")) continue;\n const scopeId = ent.name.replace(/^workspace-/, \"\");\n const teamJsonPath = path.join(baseHome, ent.name, \"team.json\");\n const teamNotesCronPath = path.join(baseHome, ent.name, \"notes\", \"cron-jobs.json\");\n try {\n await fs.stat(teamJsonPath);\n } catch {\n continue;\n }\n try {\n const raw = await fs.readFile(teamNotesCronPath, \"utf8\");\n const json = JSON.parse(raw) as { entries?: Record<string, CronEntry> };\n addEntriesToScopeMap(json.entries ?? {}, scopeId, \"team\", idToScope);\n } catch {\n // ignore\n }\n }\n\n await collectAgentScopes(idToScope);\n return idToScope;\n}\n\nexport async function getInstalledIdsForTeam(provenancePath: string): Promise<string[]> {\n try {\n const text = await fs.readFile(provenancePath, \"utf8\");\n const json = JSON.parse(text) as { entries?: Record<string, { installedCronId?: unknown; orphaned?: unknown }> };\n const entries = json.entries ?? {};\n return Object.values(entries)\n .filter((e) => !Boolean(e.orphaned))\n .map((e) => String(e.installedCronId ?? \"\").trim())\n .filter(Boolean);\n } catch {\n return [];\n }\n}\n\nexport function enrichJobsWithScope(\n jobs: unknown[],\n idToScope: Map<string, CronScope>\n): Array<unknown & { scope?: CronScope }> {\n return jobs.map((j) => {\n const id = String((j as { id?: unknown }).id ?? \"\");\n const scope = id ? idToScope.get(id) : undefined;\n return (scope ? { ...(j as object), scope } : j) as unknown & { scope?: CronScope };\n });\n}\n\ntype MappingStateV1 = {\n version: 1;\n entries: Record<string, { installedCronId: string; orphaned?: boolean }>;\n};\n\nasync function markOrphanedInOneMapping(\n id: string,\n mappingPath: string,\n teamId: string\n): Promise<{ teamId: string; mappingPath: string; keys: string[] } | null> {\n try {\n const rawMapping = await fs.readFile(mappingPath, \"utf8\");\n const mapping = JSON.parse(rawMapping) as MappingStateV1;\n if (!mapping || mapping.version !== 1 || !mapping.entries) return null;\n\n let changed = false;\n const keys: string[] = [];\n for (const [k, v] of Object.entries(mapping.entries)) {\n if (String(v?.installedCronId ?? \"\").trim() === id && !v.orphaned) {\n mapping.entries[k] = { ...v, orphaned: true };\n changed = true;\n keys.push(k);\n }\n }\n if (!changed) return null;\n await fs.writeFile(mappingPath, JSON.stringify(mapping, null, 2) + \"\\n\", \"utf8\");\n return { teamId, mappingPath, keys };\n } catch {\n return null;\n }\n}\n\nexport async function markOrphanedInTeamWorkspaces(\n id: string,\n baseWorkspace: string\n): Promise<Array<{ teamId: string; mappingPath: string; keys: string[] }>> {\n const orphanedIn: Array<{ teamId: string; mappingPath: string; keys: string[] }> = [];\n const baseHome = path.resolve(baseWorkspace, \"..\");\n const entries = await fs.readdir(baseHome, { withFileTypes: true });\n\n for (const ent of entries) {\n if (!ent.isDirectory() || !ent.name.startsWith(\"workspace-\")) continue;\n const teamId = ent.name.replace(/^workspace-/, \"\");\n const teamJsonPath = path.join(baseHome, ent.name, \"team.json\");\n const mappingPath = path.join(baseHome, ent.name, \"notes\", \"cron-jobs.json\");\n try {\n await fs.stat(teamJsonPath);\n } catch {\n continue;\n }\n const result = await markOrphanedInOneMapping(id, mappingPath, teamId);\n if (result) orphanedIn.push(result);\n }\n\n return orphanedIn;\n}\n\nexport async function getBaseWorkspaceFromGateway(\n toolsInvoke: (opts: { tool: string; args?: Record<string, unknown> }) => Promise<unknown>\n): Promise<string> {\n const cfg = (await toolsInvoke({\n tool: \"gateway\",\n args: { action: \"config.get\", raw: \"{}\" },\n })) as { content?: Array<{ type: string; text?: string }> };\n const cfgText = cfg?.content?.find((c) => c.type === \"text\")?.text ?? \"\";\n const env = cfgText ? (JSON.parse(cfgText) as { result?: { raw?: string } }) : null;\n const raw = String(env?.result?.raw ?? \"\");\n const parsedRaw = raw ? (JSON.parse(raw) as { agents?: { defaults?: { workspace?: string } } }) : null;\n return String(parsedRaw?.agents?.defaults?.workspace ?? \"\").trim();\n}\n","import path from \"node:path\";\nimport { NextResponse } from \"next/server\";\nimport { toolsInvoke } from \"@/lib/gateway\";\nimport { readOpenClawConfig, getTeamWorkspaceDir } from \"@/lib/paths\";\nimport { errorMessage } from \"@/lib/errors\";\nimport { buildIdToScopeMap, getInstalledIdsForTeam, enrichJobsWithScope } from \"../helpers\";\n\ntype CronToolResult = { content: Array<{ type: string; text?: string }> };\n\nexport async function GET(req: Request) {\n try {\n const url = new URL(req.url);\n const teamId = String(url.searchParams.get(\"teamId\") ?? \"\").trim();\n\n const result = await toolsInvoke<CronToolResult>({\n tool: \"cron\",\n args: { action: \"list\", includeDisabled: true },\n });\n\n // Tool responses may come back as either:\n // - {type:\"text\", text:\"{...}\"} (stringified JSON)\n // - {type:\"json\", json:{...}} (already-parsed)\n const text = result?.content?.find((c) => c.type === \"text\")?.text;\n const jsonPayload = (result?.content as Array<{ type: string; text?: string; json?: unknown }> | undefined)?.find(\n (c) => c.type === \"json\" && c.json,\n )?.json;\n\n const parsed = ((): { jobs?: unknown[] } => {\n if (jsonPayload && typeof jsonPayload === \"object\") return jsonPayload as { jobs?: unknown[] };\n if (text && text.trim()) return JSON.parse(text) as { jobs?: unknown[] };\n return { jobs: [] };\n })();\n\n const jobs = Array.isArray(parsed.jobs) ? parsed.jobs : [];\n\n const baseWorkspace = String((await readOpenClawConfig()).agents?.defaults?.workspace ?? \"\").trim();\n const idToScope = baseWorkspace ? await buildIdToScopeMap(baseWorkspace) : new Map();\n const enriched = enrichJobsWithScope(jobs, idToScope);\n\n if (!teamId) return NextResponse.json({ ok: true, jobs: enriched });\n\n const teamDir = await getTeamWorkspaceDir(teamId);\n const provenancePath = path.join(teamDir, \"notes\", \"cron-jobs.json\");\n const installedIds = await getInstalledIdsForTeam(provenancePath);\n const filtered = enriched.filter((j) => installedIds.includes(String((j as { id?: unknown }).id ?? \"\")));\n\n return NextResponse.json({ ok: true, jobs: filtered, teamId, provenancePath, installedIds });\n } catch (e: unknown) {\n const msg = errorMessage(e);\n return NextResponse.json({ ok: false, error: msg }, { 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/jobs/route\",\n pathname: \"/api/cron/jobs\",\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/jobs/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/jobs/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 s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Y,EAAK,EAAD,AAAK,SAAS,CAAC,kBAAqB,EAAD,AAAS,GAAG,CAAC,kBAAkB,AAC7F,EAAQ,GAAG,CAAC,gBAAiB,CAAA,EAAA,EAAA,qBAAA,AAAqB,EAAC,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,CAClC,qBACA,sBACJ,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":[7]}
@@ -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"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},40317,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},26837,e=>{"use strict";var t=e.i(12714),r=e.i(60526),n=e.i(50227);function a(e){return e.includes("/")||e.includes("\\")}function i(e){if(!/^[a-z0-9][a-z0-9-]{1,63}$/.test(e))throw Error(`Invalid teamId "${e}"`);return n.default.join(r.default.homedir(),".openclaw",`workspace-${e}`)}function s(){return process.env.CK_TEAM_WORKSPACE_DIR??i("development-team")}function o(e,t="development-team"){let r=a(t)?t:i(t);return n.default.join(r,{backlog:"work/backlog","in-progress":"work/in-progress",testing:"work/testing",done:"work/done"}[e])}async function l(e="development-team"){let r=[];for(let a of["backlog","in-progress","testing","done"]){let i=[];try{i=await t.default.readdir(o(a,e))}catch{i=[]}for(let s of i){if(!s.endsWith(".md"))continue;let i=function(e){let t=e.match(/^(\d{4})-/);return t?Number(t[1]):null}(s);if(null==i)continue;let l=n.default.join(o(a,e),s),[d,u]=await Promise.all([t.default.readFile(l,"utf8"),t.default.stat(l)]),c=function(e){let t=e.split("\n")[0]??"",r=t.startsWith("# ")?t.slice(2).trim():"",n=r.indexOf(" ");if(n>0){let e=r.slice(n+1).trim();if(e)return e}let a=r.replace(/^\d{4}-/,"").replace(/[-_]+/g," ").replace(/\s+/g," ").trim(),i=new Set(["api","cli","ui","ux","gpu","cpu","npm","pr","ci","cd","json","yaml","md"]),s=a?a.split(" ").filter(Boolean).map(e=>{let t=e.toLowerCase();return i.has(t)?e.toUpperCase():t.startsWith("v")&&/^\d/.test(t.slice(1))||/^[\d.]+$/.test(e)?e:e.slice(0,1).toUpperCase()+e.slice(1)}).join(" "):"";return s||r||"(untitled)"}(d),p=function(e,t){let r=RegExp(`^${t}:\\s*(.*)$`,"mi"),n=e.match(r);return n?.[1]?.trim()||null}(d,"Owner"),f=u.mtime.toISOString(),m=(Date.now()-u.mtimeMs)/36e5;r.push({number:i,id:s.replace(/\.md$/,""),title:c,owner:p,stage:a,file:l,updatedAt:f,ageHours:m})}}return r.sort((e,t)=>e.number-t.number),r}async function d(e,t="development-team"){let r=await l(t),n=e.trim(),a=n.match(/^\d+$/)?r.find(e=>e.number===Number(n)):null;return r.find(e=>e.id===n)??a??null}async function u(e,t){return d(t,e)}async function c(e,r){let n=a(r)?e:r,i=a(r)?r:e,s=await d(n,i);return s?{id:s.id,file:s.file,markdown:await t.default.readFile(s.file,"utf8"),owner:s.owner,stage:s.stage}:null}e.s(["getTeamWorkspaceDir",()=>s,"getTicketByIdOrNumber",()=>d,"getTicketMarkdown",()=>c,"listTickets",()=>l,"resolveTicket",()=>u,"stageDir",()=>o,"teamWorkspace",()=>i])},92399,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),i=e.i(61916),s=e.i(74677),o=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),m=e.i(26937),h=e.i(10372),x=e.i(93695);e.i(52474);var g=e.i(220),w=e.i(12714),v=e.i(50227),R=e.i(89171),k=e.i(40317),E=e.i(26837);async function y(e,t){try{let{teamId:n}=await t.params,a=await e.json(),i=String(a.ticket??"").trim();if(!i)return R.NextResponse.json({ok:!1,error:"Missing ticket"},{status:400});let s=await (0,E.resolveTicket)(n,i);if(!s)return R.NextResponse.json({ok:!1,error:`Ticket not found: ${i}`},{status:404});await w.default.unlink(s.file);let o=v.default.join((0,E.teamWorkspace)(n),"work/assignments"),l=v.default.join(o,"deleted");await w.default.mkdir(l,{recursive:!0});let d=[];try{var r;let e=await w.default.readdir(o),t=`${(r=s.number,String(r).padStart(4,"0"))}-assigned-`;for(let r of e){if(!r.startsWith(t)||!r.endsWith(".md"))continue;let e=v.default.join(o,r),n=v.default.join(l,r);await w.default.rename(e,n),d.push(r)}}catch{}return R.NextResponse.json({ok:!0,archivedAssignments:d})}catch(e){return R.NextResponse.json({ok:!1,error:(0,k.errorMessage)(e)},{status:500})}}e.s(["POST",()=>y],92281);var C=e.i(92281);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/teams/[teamId]/tickets/delete/route",pathname:"/api/teams/[teamId]/tickets/delete",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/teams/[teamId]/tickets/delete/route.ts",nextConfigOutput:"standalone",userland:C}),{workAsyncStorage:T,workUnitAsyncStorage:A,serverHooks:j}=b;function N(){return(0,n.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:A})}async function S(e,t,n){b.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/teams/[teamId]/tickets/delete/route";w=w.replace(/\/index$/,"")||"/";let v=await b.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:R,params:k,nextConfig:E,parsedUrl:y,isDraftMode:C,prerenderManifest:T,routerServerContext:A,isOnDemandRevalidate:j,revalidateOnlyGenerated:N,resolvedPathname:S,clientReferenceManifest:O,serverActionsManifest:P}=v,I=(0,o.normalizeAppPath)(w),_=!!(T.dynamicRoutes[I]||T.routes[S]),q=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,y,!1):t.end("This page could not be found"),null);if(_&&!C){let e=!!T.routes[S],t=T.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await q();throw new x.NoFallbackError}}let $=null;!_||b.isDev||C||($="/index"===($=S)?"/":$);let M=!0===b.isDev||!_,U=_&&!M;P&&O&&(0,s.setManifestsSingleton)({page:w,clientReferenceManifest:O,serverActionsManifest:P});let D=e.method||"GET",H=(0,i.getTracer)(),W=H.getActiveScopeSpan(),F={params:k,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:M,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>b.onRequestError(e,t,n,a,A)},sharedContext:{buildId:R}},K=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),L=d.NextRequestAdapter.fromNodeNextRequest(K,(0,d.signalFromNodeResponse)(t));try{let s=async e=>b.handle(L,F).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.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=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${w}`)}),o=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var i,l;let d=async({previousCacheEntry:r})=>{try{if(!o&&j&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(a);e.fetchMetrics=F.renderOpts.fetchMetrics;let l=F.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=F.renderOpts.collectedTags;if(!_)return await (0,p.sendResponse)(K,B,i,F.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!==F.renderOpts.collectedRevalidate&&!(F.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&F.renderOpts.collectedRevalidate,n=void 0===F.renderOpts.collectedExpire||F.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:F.renderOpts.collectedExpire;return{value:{kind:g.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 b.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:j})},!1,A),t}},u=await b.handleResponse({req:e,nextConfig:E,cacheKey:$,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:j,revalidateOnlyGenerated:N,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:o});if(!_)return null;if((null==u||null==(i=u.value)?void 0:i.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});o||t.setHeader("x-nextjs-cache",j?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let x=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return o&&_||x.delete(h.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||x.get("Cache-Control")||x.set("Cache-Control",(0,m.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(K,B,new Response(u.value.body,{headers:x,status:u.value.status||200})),null};W?await l(W):await H.withPropagatedContext(e.headers,()=>H.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},l))}catch(t){if(t instanceof x.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:j})},!1,A),_)throw t;return await (0,p.sendResponse)(K,B,new Response(null,{status:500})),null}}e.s(["handler",()=>S,"patchFetch",()=>N,"routeModule",()=>b,"serverHooks",()=>j,"workAsyncStorage",()=>T,"workUnitAsyncStorage",()=>A],92399)}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__d924e5ac._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/errors.ts","../../../src/lib/tickets.ts","../../../src/app/api/teams/%5BteamId%5D/tickets/delete/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","import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nexport type TicketStage = \"backlog\" | \"in-progress\" | \"testing\" | \"done\";\n\nexport interface TicketSummary {\n number: number;\n id: string;\n title: string;\n owner: string | null;\n stage: TicketStage;\n file: string;\n updatedAt: string; // ISO\n ageHours: number;\n}\n\nfunction assertSafeTeamId(teamId: string) {\n // Conservative: matches OpenClaw team ids like \"development-team\".\n if (!/^[a-z0-9][a-z0-9-]{1,63}$/.test(teamId)) {\n throw new Error(`Invalid teamId \"${teamId}\"`);\n }\n}\n\nfunction isPathLike(s: string) {\n return s.includes(\"/\") || s.includes(\"\\\\\");\n}\n\nexport function teamWorkspace(teamId: string) {\n assertSafeTeamId(teamId);\n return path.join(os.homedir(), \".openclaw\", `workspace-${teamId}`);\n}\n\n/**\n * Back-compat for older non-team-scoped routes.\n * Prefer passing explicit teamId into APIs instead.\n */\nexport function getTeamWorkspaceDir(): string {\n return process.env.CK_TEAM_WORKSPACE_DIR ?? teamWorkspace(\"development-team\");\n}\n\nexport function stageDir(stage: TicketStage, teamOrDir: string = \"development-team\") {\n const map: Record<TicketStage, string> = {\n backlog: \"work/backlog\",\n \"in-progress\": \"work/in-progress\",\n testing: \"work/testing\",\n done: \"work/done\",\n };\n\n const base = isPathLike(teamOrDir) ? teamOrDir : teamWorkspace(teamOrDir);\n return path.join(base, map[stage]);\n}\n\nexport function parseTitle(md: string) {\n // Ticket markdown files typically start with: # 0033-some-slug\n const firstLine = md.split(\"\\n\")[0] ?? \"\";\n const header = firstLine.startsWith(\"# \") ? firstLine.slice(2).trim() : \"\";\n\n // If header is like: \"<id> <title...>\" keep the explicit title portion.\n const firstSpace = header.indexOf(\" \");\n if (firstSpace > 0) {\n const afterSpace = header.slice(firstSpace + 1).trim();\n if (afterSpace) return afterSpace;\n }\n\n // Otherwise derive from the slug: strip leading number + hyphen, then de-kebab.\n const derivedRaw = header\n .replace(/^\\d{4}-/, \"\")\n .replace(/[-_]+/g, \" \")\n .replace(/\\s+/g, \" \")\n .trim();\n\n const ACRONYMS = new Set([\"api\", \"cli\", \"ui\", \"ux\", \"gpu\", \"cpu\", \"npm\", \"pr\", \"ci\", \"cd\", \"json\", \"yaml\", \"md\"]);\n const titleCase = (s: string) =>\n s\n .split(\" \")\n .filter(Boolean)\n .map((w) => {\n const lower = w.toLowerCase();\n if (ACRONYMS.has(lower)) return w.toUpperCase();\n if (lower.startsWith(\"v\") && /^\\d/.test(lower.slice(1))) return w; // version-like\n if (/^[\\d.]+$/.test(w)) return w; // numbers/semver\n return w.slice(0, 1).toUpperCase() + w.slice(1);\n })\n .join(\" \");\n\n const derived = derivedRaw ? titleCase(derivedRaw) : \"\";\n\n if (derived) return derived;\n return header || \"(untitled)\";\n}\n\nfunction parseField(md: string, field: string): string | null {\n const re = new RegExp(`^${field}:\\\\s*(.*)$`, \"mi\");\n const m = md.match(re);\n return m?.[1]?.trim() || null;\n}\n\nexport function parseNumberFromFilename(filename: string): number | null {\n const m = filename.match(/^(\\d{4})-/);\n if (!m) return null;\n return Number(m[1]);\n}\n\n/**\n * List tickets.\n * - Preferred: listTickets(\"development-team\")\n * - Back-compat: listTickets(getTeamWorkspaceDir())\n */\nexport async function listTickets(teamIdOrDir: string = \"development-team\"): Promise<TicketSummary[]> {\n const stages: TicketStage[] = [\"backlog\", \"in-progress\", \"testing\", \"done\"];\n const all: TicketSummary[] = [];\n\n for (const stage of stages) {\n let files: string[] = [];\n try {\n files = await fs.readdir(stageDir(stage, teamIdOrDir));\n } catch {\n files = [];\n }\n\n for (const f of files) {\n if (!f.endsWith(\".md\")) continue;\n const number = parseNumberFromFilename(f);\n if (number == null) continue;\n\n const file = path.join(stageDir(stage, teamIdOrDir), f);\n const [md, stat] = await Promise.all([fs.readFile(file, \"utf8\"), fs.stat(file)]);\n\n const title = parseTitle(md);\n const owner = parseField(md, \"Owner\");\n const updatedAt = stat.mtime.toISOString();\n const ageHours = (Date.now() - stat.mtimeMs) / (1000 * 60 * 60);\n\n all.push({\n number,\n id: f.replace(/\\.md$/, \"\"),\n title,\n owner,\n stage,\n file,\n updatedAt,\n ageHours,\n });\n }\n }\n\n all.sort((a, b) => a.number - b.number);\n return all;\n}\n\n/**\n * Back-compat helper used by some API routes.\n */\nexport async function getTicketByIdOrNumber(\n ticketIdOrNumber: string,\n teamIdOrDir: string = \"development-team\",\n): Promise<TicketSummary | null> {\n const tickets = await listTickets(teamIdOrDir);\n const normalized = ticketIdOrNumber.trim();\n\n const byNumber = normalized.match(/^\\d+$/) ? tickets.find((t) => t.number === Number(normalized)) : null;\n const byId = tickets.find((t) => t.id === normalized);\n return byId ?? byNumber ?? null;\n}\n\nexport async function resolveTicket(teamId: string, ticketIdOrNumber: string): Promise<TicketSummary | null> {\n return getTicketByIdOrNumber(ticketIdOrNumber, teamId);\n}\n\n/**\n * getTicketMarkdown(teamId, ticketIdOrNumber) OR getTicketMarkdown(ticketIdOrNumber, teamDir)\n */\nexport async function getTicketMarkdown(\n a: string,\n b: string,\n): Promise<{ id: string; file: string; markdown: string; owner: string | null; stage: TicketStage } | null> {\n // Detect call signature.\n const ticketIdOrNumber = isPathLike(b) ? a : b;\n const teamIdOrDir = isPathLike(b) ? b : a;\n\n const hit = await getTicketByIdOrNumber(ticketIdOrNumber, teamIdOrDir);\n if (!hit) return null;\n\n return {\n id: hit.id,\n file: hit.file,\n markdown: await fs.readFile(hit.file, \"utf8\"),\n owner: hit.owner,\n stage: hit.stage,\n };\n}\n","import fs from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport { NextResponse } from \"next/server\";\n\nimport { errorMessage } from \"@/lib/errors\";\nimport { resolveTicket, teamWorkspace } from \"@/lib/tickets\";\n\nfunction pad4(n: number) {\n return String(n).padStart(4, \"0\");\n}\n\nexport async function POST(req: Request, ctx: { params: Promise<{ teamId: string }> }) {\n try {\n const { teamId } = await ctx.params;\n const body = await req.json();\n const ticket = String(body.ticket ?? \"\").trim();\n\n if (!ticket) {\n return NextResponse.json({ ok: false, error: \"Missing ticket\" }, { status: 400 });\n }\n\n const hit = await resolveTicket(teamId, ticket);\n if (!hit) {\n return NextResponse.json({ ok: false, error: `Ticket not found: ${ticket}` }, { status: 404 });\n }\n\n // Remove ticket file.\n await fs.unlink(hit.file);\n\n // Archive any assignment stubs (safer than deleting outright).\n const assignmentsDir = path.join(teamWorkspace(teamId), \"work/assignments\");\n const deletedDir = path.join(assignmentsDir, \"deleted\");\n await fs.mkdir(deletedDir, { recursive: true });\n\n const moved: string[] = [];\n try {\n const files = await fs.readdir(assignmentsDir);\n const prefix = `${pad4(hit.number)}-assigned-`;\n for (const f of files) {\n if (!f.startsWith(prefix) || !f.endsWith(\".md\")) continue;\n const from = path.join(assignmentsDir, f);\n const to = path.join(deletedDir, f);\n await fs.rename(from, to);\n moved.push(f);\n }\n } catch {\n // ignore\n }\n\n return NextResponse.json({ ok: true, archivedAssignments: moved });\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/teams/[teamId]/tickets/delete/route\",\n pathname: \"/api/teams/[teamId]/tickets/delete\",\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/teams/[teamId]/tickets/delete/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/teams/[teamId]/tickets/delete/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":"4sCAIO,SAAS,EAAa,CAAU,EACrC,OAAO,aAAa,MAAQ,EAAE,OAAO,CAAG,OAAO,EACjD,qDCNA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAsBA,SAAS,EAAW,CAAS,EAC3B,OAAO,EAAE,QAAQ,CAAC,MAAQ,EAAE,QAAQ,CAAC,KACvC,CAEO,SAAS,EAAc,CAAc,EAT1C,GAAI,CAAC,4BAA4B,IAAI,CAAC,AAUrB,GATf,MAD6C,AACvC,AAAI,MAAM,CAAC,gBAAgB,EAAE,EAAO,CAAC,CAAC,EAU9C,OAAO,EAAA,OAAI,CAAC,IAAI,CAAC,EAAA,OAAE,CAAC,OAAO,GAAI,YAAa,CAAC,UAAU,EAAE,EAAA,CAAQ,CACnE,CAMO,SAAS,IACd,OAAO,QAAQ,GAAG,CAAC,qBAAqB,EAAI,EAAc,mBAC5D,CAEO,SAAS,EAAS,CAAkB,CAAE,EAAoB,kBAAkB,EAQjF,IAAM,EAAO,EAAW,GAAa,EAAY,EAAc,GAC/D,OAAO,EAAA,OAAI,CAAC,IAAI,CAAC,EAAM,AARkB,CACvC,QAAS,eACT,cAAe,mBACf,QAAS,eACT,KAAM,WACR,CAG0B,CAAC,EAAM,CACnC,CA0DO,eAAe,EAAY,EAAsB,kBAAkB,EAExE,IAAM,EAAuB,EAAE,CAE/B,IAAK,IAAM,IAHmB,CAAC,IAGX,MAHsB,cAAe,UAAW,OAAO,CAG/C,CAC1B,IAAI,EAAkB,E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AAc,CAAC,kBAAqB,EAAD,AAAS,GAAG,CAAC,kBAAkB,AAC7F,EAAQ,GAAG,CAAC,gBAAiB,CAAA,EAAA,EAAA,qBAAA,AAAqB,EAAC,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,CAChC,UACA,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":[3]}
@@ -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"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},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),s=e.i(50227);async function a(){let e=s.default.join(r.default.homedir(),".openclaw","openclaw.json");return JSON.parse(await t.default.readFile(e,"utf8"))}async function n(){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 n();return s.default.join(e,"recipes")}async function i(){let e=await n();return s.default.join(e,"notes","goals")}async function l(e){let t=r.default.homedir();if(!t)throw Error("Could not resolve home directory");return s.default.join(t,".openclaw",`workspace-${e}`)}function u(e,t){return s.default.resolve(e,"..",`workspace-${t}`)}function p(e){let t=e.replace(/\\/g,"/");if(!t||t.startsWith("/")||t.includes(".."))throw Error("Invalid file name");return t}async function d(){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 s.default.join(t,"recipes","default")}e.s(["assertSafeRelativeFileName",()=>p,"getBuiltinRecipesDir",()=>d,"getTeamWorkspaceDir",()=>l,"getWorkspaceDir",()=>n,"getWorkspaceGoalsDir",()=>i,"getWorkspaceRecipesDir",()=>o,"readOpenClawConfig",()=>a,"teamDirFromBaseWorkspace",()=>u])},70820,e=>{"use strict";var t=e.i(47909),r=e.i(74017),s=e.i(96250),a=e.i(59756),n=e.i(61916),o=e.i(74677),i=e.i(69741),l=e.i(16795),u=e.i(87718),p=e.i(95169),d=e.i(47587),c=e.i(66012),h=e.i(70101),m=e.i(26937),f=e.i(10372),x=e.i(93695);e.i(52474);var g=e.i(220),w=e.i(12714),R=e.i(50227),y=e.i(89171),v=e.i(7367);function E(e){return/^[a-z0-9][a-z0-9_-]{1,62}$/.test(e)}function N(e){let t=e.replace(/\r\n/g,"\n").trimEnd();return t?/^[A-Za-z0-9 _.,:;()\[\]{}\-+/@]+$/.test(t)&&!/[:#\n]/.test(t)?t:JSON.stringify(t):'""'}async function k(e){let t=await e.json(),r=!!t.dryRun,s=String(t.recipeId??t.teamId??"").trim(),a=String(t.teamId??s).trim(),n="string"==typeof t.name?t.name.trim():"",o="string"==typeof t.description?t.description.trim():"",i=Array.isArray(t.roles)?t.roles:[];if(!s)return y.NextResponse.json({ok:!1,error:"recipeId is required"},{status:400});if(!a)return y.NextResponse.json({ok:!1,error:"teamId is required"},{status:400});if(!E(s))return y.NextResponse.json({ok:!1,error:"Invalid recipeId. Use lowercase letters/numbers with - or _ (2-63 chars)."},{status:400});if(!E(a))return y.NextResponse.json({ok:!1,error:"Invalid teamId. Use lowercase letters/numbers with - or _ (2-63 chars)."},{status:400});if(!a.endsWith("-team"))return y.NextResponse.json({ok:!1,error:"teamId must end with -team"},{status:400});if(i.length<1)return y.NextResponse.json({ok:!1,error:"Select at least one role/agent"},{status:400});let l=i.map(e=>({roleId:String(e.roleId??"").trim(),displayName:"string"==typeof e.displayName?e.displayName.trim():""})).filter(e=>e.roleId);if(l.length<1)return y.NextResponse.json({ok:!1,error:"Each selected agent must have a roleId"},{status:400});let u=new Set;for(let e of l){if(!E(e.roleId))return y.NextResponse.json({ok:!1,error:`Invalid roleId: ${e.roleId}. Use lowercase letters/numbers with - or _.`},{status:400});if(u.has(e.roleId))return y.NextResponse.json({ok:!1,error:`Duplicate roleId: ${e.roleId}`},{status:400});u.add(e.roleId)}let p=await (0,v.getWorkspaceRecipesDir)(),d=R.default.join(p,`${s}.md`);try{return await w.default.access(d),y.NextResponse.json({ok:!1,error:`Recipe already exists: ${s}`},{status:409})}catch{}let c=[];for(let e of(c.push("---"),c.push(`id: ${s}`),c.push(`name: ${N(n||s)}`),c.push("version: 0.1.0"),o&&c.push(`description: ${N(o)}`),c.push("kind: team"),c.push("requiredSkills: []"),c.push("team:"),c.push(` teamId: ${a}`),c.push("agents:"),l))c.push(` - role: ${e.roleId}`),e.displayName&&c.push(` name: ${N(e.displayName)}`),c.push(" tools:"),c.push(" profile: coding"),c.push(" allow:"),c.push(" - group:fs"),c.push(" - group:web"),c.push(" - group:runtime"),c.push(" deny:"),c.push(" - exec");for(let e of(c.push("templates:"),l)){let t=e.roleId;c.push(` ${t}.soul: |`),c.push(" # SOUL.md"),c.push(" "),c.push(` Role: ${t}`),c.push(" "),c.push(` ${t}.agents: |`),c.push(" # AGENTS.md"),c.push(" "),c.push(` You are the ${t} role in team ${a}.`),c.push(" "),c.push(` ${t}.tools: |`),c.push(" # TOOLS.md"),c.push(" "),c.push(" - (empty)"),c.push(" "),c.push(` ${t}.status: |`),c.push(" # STATUS.md"),c.push(" "),c.push(" - (empty)"),c.push(" "),c.push(` ${t}.notes: |`),c.push(" # NOTES.md"),c.push(" "),c.push(" - (empty)"),c.push("")}c.push("files:"),c.push(" - path: SOUL.md"),c.push(" template: soul"),c.push(" mode: createOnly"),c.push(" - path: AGENTS.md"),c.push(" template: agents"),c.push(" mode: createOnly"),c.push(" - path: TOOLS.md"),c.push(" template: tools"),c.push(" mode: createOnly"),c.push(" - path: STATUS.md"),c.push(" template: status"),c.push(" mode: createOnly"),c.push(" - path: NOTES.md"),c.push(" template: notes"),c.push(" mode: createOnly"),c.push("---"),c.push(""),c.push("# Custom team recipe"),c.push(""),c.push("Generated by ClawKitchen Custom Team Builder."),c.push("");let h=c.join("\n");return r?y.NextResponse.json({ok:!0,dryRun:!0,recipeId:s,teamId:a,filePath:d,md:h}):(await w.default.writeFile(d,h,"utf8"),y.NextResponse.json({ok:!0,recipeId:s,teamId:a,filePath:d}))}e.s(["POST",()=>k],65231);var C=e.i(65231);let I=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/recipes/custom-team/route",pathname:"/api/recipes/custom-team",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/recipes/custom-team/route.ts",nextConfigOutput:"standalone",userland:C}),{workAsyncStorage:S,workUnitAsyncStorage:j,serverHooks:O}=I;function T(){return(0,s.patchFetch)({workAsyncStorage:S,workUnitAsyncStorage:j})}async function A(e,t,s){I.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/recipes/custom-team/route";w=w.replace(/\/index$/,"")||"/";let R=await I.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:y,params:v,nextConfig:E,parsedUrl:N,isDraftMode:k,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:j,revalidateOnlyGenerated:O,resolvedPathname:T,clientReferenceManifest:A,serverActionsManifest:b}=R,$=(0,i.normalizeAppPath)(w),q=!!(C.dynamicRoutes[$]||C.routes[T]),P=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,N,!1):t.end("This page could not be found"),null);if(q&&!k){let e=!!C.routes[T],t=C.dynamicRoutes[$];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await P();throw new x.NoFallbackError}}let _=null;!q||I.isDev||k||(_="/index"===(_=T)?"/":_);let U=!0===I.isDev||!q,D=q&&!U;b&&A&&(0,o.setManifestsSingleton)({page:w,clientReferenceManifest:A,serverActionsManifest:b});let H=e.method||"GET",F=(0,n.getTracer)(),M=F.getActiveScopeSpan(),W={params:v,prerenderManifest:C,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,a)=>I.onRequestError(e,t,s,a,S)},sharedContext:{buildId:y}},K=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),B=u.NextRequestAdapter.fromNodeNextRequest(K,(0,u.signalFromNodeResponse)(t));try{let o=async e=>I.handle(B,W).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.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 s=r.get("next.route");if(s){let t=`${H} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t)}else e.updateName(`${H} ${w}`)}),i=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var n,l;let u=async({previousCacheEntry:r})=>{try{if(!i&&j&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await o(a);e.fetchMetrics=W.renderOpts.fetchMetrics;let l=W.renderOpts.pendingWaitUntil;l&&s.waitUntil&&(s.waitUntil(l),l=void 0);let u=W.renderOpts.collectedTags;if(!q)return await (0,c.sendResponse)(K,L,n,W.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);u&&(t[f.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,s=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:W.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await I.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:j})},!1,S),t}},p=await I.handleResponse({req:e,nextConfig:E,cacheKey:_,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:j,revalidateOnlyGenerated:O,responseGenerator:u,waitUntil:s.waitUntil,isMinimalMode:i});if(!q)return null;if((null==p||null==(n=p.value)?void 0:n.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(l=p.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",j?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),k&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let x=(0,h.fromNodeOutgoingHttpHeaders)(p.value.headers);return i&&q||x.delete(f.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||x.get("Cache-Control")||x.set("Cache-Control",(0,m.getCacheControlHeader)(p.cacheControl)),await (0,c.sendResponse)(K,L,new Response(p.value.body,{headers:x,status:p.value.status||200})),null};M?await l(M):await F.withPropagatedContext(e.headers,()=>F.trace(p.BaseServerSpan.handleRequest,{spanName:`${H} ${w}`,kind:n.SpanKind.SERVER,attributes:{"http.method":H,"http.target":e.url}},l))}catch(t){if(t instanceof x.NoFallbackError||await I.onRequestError(e,t,{routerKind:"App Router",routePath:$,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:j})},!1,S),q)throw t;return await (0,c.sendResponse)(K,L,new Response(null,{status:500})),null}}e.s(["handler",()=>A,"patchFetch",()=>T,"routeModule",()=>I,"serverHooks",()=>O,"workAsyncStorage",()=>S,"workUnitAsyncStorage",()=>j],70820)}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__e40409a2._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/paths.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/api/recipes/custom-team/route.ts"],"sourcesContent":["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};\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 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 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 { 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/recipes/custom-team/route\",\n pathname: \"/api/recipes/custom-team\",\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/recipes/custom-team/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/recipes/custom-team/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 fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { NextResponse } from \"next/server\";\nimport { getWorkspaceRecipesDir } from \"@/lib/paths\";\n\nfunction isValidId(id: string) {\n // Keep consistent with common recipe/team id expectations.\n return /^[a-z0-9][a-z0-9_-]{1,62}$/.test(id);\n}\n\nfunction yamlEscape(s: string) {\n // Minimal YAML escaping for simple strings.\n const trimmed = s.replace(/\\r\\n/g, \"\\n\").trimEnd();\n if (!trimmed) return \"\\\"\\\"\";\n // If it's a safe bare string, keep it readable.\n if (/^[A-Za-z0-9 _.,:;()\\[\\]{}\\-+/@]+$/.test(trimmed) && !/[:#\\n]/.test(trimmed)) {\n return trimmed;\n }\n return JSON.stringify(trimmed);\n}\n\nexport async function POST(req: Request) {\n const body = (await req.json()) as {\n dryRun?: boolean;\n recipeId?: string;\n teamId?: string;\n name?: string;\n description?: string;\n roles?: Array<{ roleId?: string; displayName?: string }>;\n };\n\n const dryRun = !!body.dryRun;\n const recipeId = String(body.recipeId ?? body.teamId ?? \"\").trim();\n const teamId = String(body.teamId ?? recipeId).trim();\n const name = typeof body.name === \"string\" ? body.name.trim() : \"\";\n const description = typeof body.description === \"string\" ? body.description.trim() : \"\";\n const roles = Array.isArray(body.roles) ? body.roles : [];\n\n if (!recipeId) return NextResponse.json({ ok: false, error: \"recipeId is required\" }, { status: 400 });\n if (!teamId) return NextResponse.json({ ok: false, error: \"teamId is required\" }, { status: 400 });\n if (!isValidId(recipeId)) {\n return NextResponse.json(\n { ok: false, error: \"Invalid recipeId. Use lowercase letters/numbers with - or _ (2-63 chars).\" },\n { status: 400 },\n );\n }\n if (!isValidId(teamId)) {\n return NextResponse.json(\n { ok: false, error: \"Invalid teamId. Use lowercase letters/numbers with - or _ (2-63 chars).\" },\n { status: 400 },\n );\n }\n if (!teamId.endsWith(\"-team\")) {\n return NextResponse.json(\n { ok: false, error: \"teamId must end with -team\" },\n { status: 400 },\n );\n }\n\n if (roles.length < 1) {\n return NextResponse.json({ ok: false, error: \"Select at least one role/agent\" }, { status: 400 });\n }\n\n const normalizedRoles = roles\n .map((r) => ({\n roleId: String(r.roleId ?? \"\").trim(),\n displayName: typeof r.displayName === \"string\" ? r.displayName.trim() : \"\",\n }))\n .filter((r) => r.roleId);\n\n if (normalizedRoles.length < 1) {\n return NextResponse.json({ ok: false, error: \"Each selected agent must have a roleId\" }, { status: 400 });\n }\n\n const roleSet = new Set<string>();\n for (const r of normalizedRoles) {\n if (!isValidId(r.roleId)) {\n return NextResponse.json(\n { ok: false, error: `Invalid roleId: ${r.roleId}. Use lowercase letters/numbers with - or _.` },\n { status: 400 },\n );\n }\n if (roleSet.has(r.roleId)) {\n return NextResponse.json({ ok: false, error: `Duplicate roleId: ${r.roleId}` }, { status: 400 });\n }\n roleSet.add(r.roleId);\n }\n\n const dir = await getWorkspaceRecipesDir();\n const filePath = path.join(dir, `${recipeId}.md`);\n\n try {\n await fs.access(filePath);\n return NextResponse.json({ ok: false, error: `Recipe already exists: ${recipeId}` }, { status: 409 });\n } catch {\n // ok\n }\n\n const lines: string[] = [];\n lines.push(\"---\");\n lines.push(`id: ${recipeId}`);\n lines.push(`name: ${yamlEscape(name || recipeId)}`);\n lines.push(`version: 0.1.0`);\n if (description) lines.push(`description: ${yamlEscape(description)}`);\n lines.push(\"kind: team\");\n lines.push(\"requiredSkills: []\");\n lines.push(\"team:\");\n lines.push(` teamId: ${teamId}`);\n lines.push(\"agents:\");\n\n for (const r of normalizedRoles) {\n lines.push(` - role: ${r.roleId}`);\n if (r.displayName) lines.push(` name: ${yamlEscape(r.displayName)}`);\n lines.push(\" tools:\");\n lines.push(\" profile: coding\");\n lines.push(\" allow:\");\n lines.push(\" - group:fs\");\n lines.push(\" - group:web\");\n lines.push(\" - group:runtime\");\n lines.push(\" deny:\");\n lines.push(\" - exec\");\n }\n\n lines.push(\"templates:\");\n\n for (const r of normalizedRoles) {\n const roleId = r.roleId;\n\n lines.push(` ${roleId}.soul: |`);\n lines.push(` # SOUL.md`);\n lines.push(` `);\n lines.push(` Role: ${roleId}`);\n lines.push(` `);\n\n lines.push(` ${roleId}.agents: |`);\n lines.push(` # AGENTS.md`);\n lines.push(` `);\n lines.push(` You are the ${roleId} role in team ${teamId}.`);\n lines.push(` `);\n\n lines.push(` ${roleId}.tools: |`);\n lines.push(` # TOOLS.md`);\n lines.push(` `);\n lines.push(` - (empty)`);\n lines.push(` `);\n\n lines.push(` ${roleId}.status: |`);\n lines.push(` # STATUS.md`);\n lines.push(` `);\n lines.push(` - (empty)`);\n lines.push(` `);\n\n lines.push(` ${roleId}.notes: |`);\n lines.push(` # NOTES.md`);\n lines.push(` `);\n lines.push(` - (empty)`);\n lines.push(\"\");\n }\n\n lines.push(\"files:\");\n lines.push(\" - path: SOUL.md\");\n lines.push(\" template: soul\");\n lines.push(\" mode: createOnly\");\n lines.push(\" - path: AGENTS.md\");\n lines.push(\" template: agents\");\n lines.push(\" mode: createOnly\");\n lines.push(\" - path: TOOLS.md\");\n lines.push(\" template: tools\");\n lines.push(\" mode: createOnly\");\n lines.push(\" - path: STATUS.md\");\n lines.push(\" template: status\");\n lines.push(\" mode: createOnly\");\n lines.push(\" - path: NOTES.md\");\n lines.push(\" template: notes\");\n lines.push(\" mode: createOnly\");\n\n lines.push(\"---\");\n lines.push(\"\");\n lines.push(\"# Custom team recipe\");\n lines.push(\"\");\n lines.push(\"Generated by ClawKitchen Custom Team Builder.\");\n lines.push(\"\");\n\n const md = lines.join(\"\\n\");\n\n if (dryRun) {\n return NextResponse.json({ ok: true, dryRun: true, recipeId, teamId, filePath, md });\n }\n\n await fs.writeFile(filePath, md, \"utf8\");\n\n return NextResponse.json({ ok: true, recipeId, teamId, filePath });\n}\n"],"names":[],"mappings":"2sCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAiBO,eAAe,IACpB,IAAM,EAAI,EAAA,OAAI,CAAC,IAAI,CAAC,EAAA,OAAE,CAAC,OAAO,GAAI,YAAa,iBAE/C,OAAO,KAAK,KAAK,CAAC,AADL,MAAM,EAAA,OAAE,CAAC,QAAQ,CAAC,EAAG,QAEpC,CAEO,eAAe,IACpB,IAAM,EAAM,MAAM,IACZ,EAAK,EAAI,MAAM,EAAE,UAAU,UACjC,GAAI,CAAC,EAAI,MAAM,AAAI,MAAM,qEACzB,OAAO,CACT,CAEO,eAAe,IACpB,IAAM,EAAK,MAAM,IACjB,OAAO,EAAA,OAAI,CAAC,IAAI,CAAC,EAAI,UACvB,CAEO,eAAe,IACpB,IAAM,EAAK,MAAM,IACjB,OAAO,EAAA,OAAI,CAAC,IAAI,CAAC,EAAI,QAAS,QAChC,CAEO,eAAe,EAAoB,CAAc,EACtD,IAAM,EAAO,EAAA,OAAE,CAAC,OAAO,GACvB,GAAI,CAAC,EAAM,MAAM,AAAI,MAAM,oCAC3B,OAAO,EAAA,OAAI,CAAC,IAAI,CAAC,EAAM,YAAa,CAAC,UAAU,EAAE,EAAA,CAAQ,CAC3D,CAGO,SAAS,EAAyB,CAAqB,CAAE,CAAc,EAC5E,OAAO,EAAA,OAAI,CAAC,OAAO,CAAC,EAAe,KAAM,CAAC,UAAU,EAAE,EAAA,CAAQ,CAChE,CAGO,SAAS,EAA2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KjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[1]}
@@ -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"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},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 s(){let e=await i();return n.default.join(e,"recipes")}async function o(){let e=await i();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 u(e,t){return n.default.resolve(e,"..",`workspace-${t}`)}function d(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",()=>d,"getBuiltinRecipesDir",()=>c,"getTeamWorkspaceDir",()=>l,"getWorkspaceDir",()=>i,"getWorkspaceGoalsDir",()=>o,"getWorkspaceRecipesDir",()=>s,"readOpenClawConfig",()=>a,"teamDirFromBaseWorkspace",()=>u])},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);async function r(e){let r=(0,t.getKitchenApi)();try{let t=await r.runtime.system.runCommandWithTimeout(["openclaw",...e],{timeoutMs:12e4}),n=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:"string"==typeof t.stdout?t.stdout:t.stdout&&"object"==typeof t.stdout&&"toString"in t.stdout?String(t.stdout.toString()):"",stderr:"string"==typeof t.stderr?t.stderr:t.stderr&&"object"==typeof t.stderr&&"toString"in t.stderr?String(t.stderr.toString()):"string"==typeof t.message?t.message:String(t)}}}e.s(["runOpenClaw",()=>r])},5365,(e,t,r)=>{t.exports=e.x("process",()=>require("process"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},72915,e=>{"use strict";var t=e.i(12714),r=e.i(50227),n=e.i(23008),a=e.i(5003),i=e.i(7367);function s(e){if(!e.startsWith("---\n"))throw Error("Recipe markdown must start with YAML frontmatter (---)");let t=e.indexOf("\n---\n",4);if(-1===t)throw Error("Recipe frontmatter not terminated (---)");let r=e.slice(4,t+1),a=n.default.parse(r);if(!a?.id)throw Error("Recipe frontmatter must include id");return a.id}async function o(){let e=await (0,a.runOpenClaw)(["recipes","list"]);if(!e.ok)return[];try{return JSON.parse(e.stdout)}catch{return[]}}async function l(e){return(await o()).find(t=>t.id===e)??null}async function u(e){let t="builtin"===e.source?await (0,i.getBuiltinRecipesDir)():await (0,i.getWorkspaceRecipesDir)();return r.default.join(t,`${e.id}.md`)}async function d(e,n){await t.default.mkdir(r.default.dirname(e),{recursive:!0}),await t.default.writeFile(e,n,"utf8")}e.s(["findRecipeById",()=>l,"parseFrontmatterId",()=>s,"resolveRecipePath",()=>u,"writeRecipeFile",()=>d])},64965,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),i=e.i(61916),s=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(26937),w=e.i(10372),x=e.i(93695);e.i(52474);var R=e.i(220),g=e.i(66680),m=e.i(89171),y=e.i(5003),v=e.i(72915);async function E(e,{params:t}){var r;let{id:n}=await t,a=await (0,v.findRecipeById)(n);if(!a)return m.NextResponse.json({error:`Recipe not found: ${n}`},{status:404});let i=await (0,y.runOpenClaw)(["recipes","show",n]),s=await (0,v.resolveRecipePath)(a).catch(()=>null),o=(r=i.stdout,g.default.createHash("sha256").update(r,"utf8").digest("hex"));return m.NextResponse.json({recipe:{...a,content:i.stdout,filePath:s},recipeHash:o,stderr:i.stderr})}async function C(e,{params:t}){let r,{id:n}=await t,a=await e.json();if("string"!=typeof a.content)return m.NextResponse.json({error:"Missing content"},{status:400});try{r=(0,v.parseFrontmatterId)(a.content)}catch(e){return m.NextResponse.json({error:e.message},{status:400})}if(r!==n)return m.NextResponse.json({error:`Frontmatter id (${r}) must match URL id (${n})`},{status:400});let i=await (0,v.findRecipeById)(n);if(!i)return m.NextResponse.json({error:`Recipe not found: ${n}`},{status:404});if("builtin"===i.source)return m.NextResponse.json({error:`Recipe ${n} is builtin and cannot be modified`},{status:403});let s=await (0,v.resolveRecipePath)(i);return await (0,v.writeRecipeFile)(s,a.content),m.NextResponse.json({ok:!0,filePath:s})}e.s(["GET",()=>E,"PUT",()=>C],89749);var b=e.i(89749);let k=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/recipes/[id]/route",pathname:"/api/recipes/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/recipes/[id]/route.ts",nextConfigOutput:"standalone",userland:b}),{workAsyncStorage:j,workUnitAsyncStorage:N,serverHooks:A}=k;function S(){return(0,n.patchFetch)({workAsyncStorage:j,workUnitAsyncStorage:N})}async function P(e,t,n){k.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/recipes/[id]/route";g=g.replace(/\/index$/,"")||"/";let m=await k.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!m)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:y,params:v,nextConfig:E,parsedUrl:C,isDraftMode:b,prerenderManifest:j,routerServerContext:N,isOnDemandRevalidate:A,revalidateOnlyGenerated:S,resolvedPathname:P,clientReferenceManifest:T,serverActionsManifest:O}=m,q=(0,o.normalizeAppPath)(g),_=!!(j.dynamicRoutes[q]||j.routes[P]),I=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,C,!1):t.end("This page could not be found"),null);if(_&&!b){let e=!!j.routes[P],t=j.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await I();throw new x.NoFallbackError}}let D=null;!_||k.isDev||b||(D="/index"===(D=P)?"/":D);let H=!0===k.isDev||!_,U=_&&!H;O&&T&&(0,s.setManifestsSingleton)({page:g,clientReferenceManifest:T,serverActionsManifest:O});let F=e.method||"GET",$=(0,i.getTracer)(),M=$.getActiveScopeSpan(),K={params:v,prerenderManifest:j,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:H,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>k.onRequestError(e,t,n,a,N)},sharedContext:{buildId:y}},B=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),L=u.NextRequestAdapter.fromNodeNextRequest(B,(0,u.signalFromNodeResponse)(t));try{let s=async e=>k.handle(L,K).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=`${F} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${F} ${g}`)}),o=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var i,l;let u=async({previousCacheEntry:r})=>{try{if(!o&&A&&S&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(a);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let u=K.renderOpts.collectedTags;if(!_)return await (0,p.sendResponse)(B,W,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);u&&(t[w.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=w.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=w.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:R.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 k.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,N),t}},d=await k.handleResponse({req:e,nextConfig:E,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:j,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:S,responseGenerator:u,waitUntil:n.waitUntil,isMinimalMode:o});if(!_)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==R.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",A?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let x=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return o&&_||x.delete(w.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||x.get("Cache-Control")||x.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(B,W,new Response(d.value.body,{headers:x,status:d.value.status||200})),null};M?await l(M):await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${g}`,kind:i.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},l))}catch(t){if(t instanceof x.NoFallbackError||await k.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,N),_)throw t;return await (0,p.sendResponse)(B,W,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>S,"routeModule",()=>k,"serverHooks",()=>A,"workAsyncStorage",()=>j,"workUnitAsyncStorage",()=>N],64965)}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__e6fa5823._.js.map