@jiggai/kitchen 0.3.10 → 0.3.12

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 (338) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error.html +2 -2
  5. package/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/server/app/_not-found/page.js +1 -1
  12. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  13. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/_not-found.html +1 -1
  15. package/.next/server/app/_not-found.rsc +4 -4
  16. package/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
  17. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  19. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  22. package/.next/server/app/agents/[agentId]/page.js +1 -1
  23. package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -1
  24. package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/agents/add/route.js.nft.json +1 -1
  26. package/.next/server/app/api/agents/file/route.js.nft.json +1 -1
  27. package/.next/server/app/api/agents/files/route.js.nft.json +1 -1
  28. package/.next/server/app/api/agents/skills/install/route.js.nft.json +1 -1
  29. package/.next/server/app/api/agents/skills/route.js.nft.json +1 -1
  30. package/.next/server/app/api/agents/update/route.js.nft.json +1 -1
  31. package/.next/server/app/api/cron/delete/route.js.nft.json +1 -1
  32. package/.next/server/app/api/cron/jobs/route.js.nft.json +1 -1
  33. package/.next/server/app/api/cron/recipe-installed/route.js.nft.json +1 -1
  34. package/.next/server/app/api/cron/worker/route.js.nft.json +1 -1
  35. package/.next/server/app/api/goals/[id]/promote/route.js.nft.json +1 -1
  36. package/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
  37. package/.next/server/app/api/goals/route.js.nft.json +1 -1
  38. package/.next/server/app/api/ids/check/route.js.nft.json +1 -1
  39. package/.next/server/app/api/recipes/[id]/route.js.nft.json +1 -1
  40. package/.next/server/app/api/recipes/clone/route.js.nft.json +1 -1
  41. package/.next/server/app/api/recipes/custom-team/route.js.nft.json +1 -1
  42. package/.next/server/app/api/recipes/delete/route.js.nft.json +1 -1
  43. package/.next/server/app/api/recipes/local-agent-catalog/route.js.nft.json +1 -1
  44. package/.next/server/app/api/recipes/team-agents/route.js.nft.json +1 -1
  45. package/.next/server/app/api/scaffold/route.js.nft.json +1 -1
  46. package/.next/server/app/api/settings/cron-installation/route.js.nft.json +1 -1
  47. package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.nft.json +1 -1
  48. package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js.nft.json +1 -1
  49. package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js.nft.json +1 -1
  50. package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.nft.json +1 -1
  51. package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.nft.json +1 -1
  52. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.nft.json +1 -1
  53. package/.next/server/app/api/teams/file/route.js.nft.json +1 -1
  54. package/.next/server/app/api/teams/files/route.js.nft.json +1 -1
  55. package/.next/server/app/api/teams/memory/route.js.nft.json +1 -1
  56. package/.next/server/app/api/teams/meta/route.js.nft.json +1 -1
  57. package/.next/server/app/api/teams/orchestrator/route.js.nft.json +1 -1
  58. package/.next/server/app/api/teams/remove-team/route.js.nft.json +1 -1
  59. package/.next/server/app/api/teams/skills/install/route.js.nft.json +1 -1
  60. package/.next/server/app/api/teams/skills/route.js.nft.json +1 -1
  61. package/.next/server/app/api/teams/workflow-runs/route.js.nft.json +1 -1
  62. package/.next/server/app/api/teams/workflow-templates/route.js.nft.json +1 -1
  63. package/.next/server/app/api/teams/workflows/route.js.nft.json +1 -1
  64. package/.next/server/app/api/tickets/assign/route.js.nft.json +1 -1
  65. package/.next/server/app/api/tickets/assignees/route.js.nft.json +1 -1
  66. package/.next/server/app/api/tickets/move/route.js.nft.json +1 -1
  67. package/.next/server/app/channels/page.js +1 -1
  68. package/.next/server/app/channels/page.js.nft.json +1 -1
  69. package/.next/server/app/channels/page_client-reference-manifest.js +1 -1
  70. package/.next/server/app/channels.html +2 -2
  71. package/.next/server/app/channels.rsc +5 -5
  72. package/.next/server/app/channels.segments/_full.segment.rsc +5 -5
  73. package/.next/server/app/channels.segments/_head.segment.rsc +1 -1
  74. package/.next/server/app/channels.segments/_index.segment.rsc +3 -3
  75. package/.next/server/app/channels.segments/_tree.segment.rsc +2 -2
  76. package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +2 -2
  77. package/.next/server/app/channels.segments/channels.segment.rsc +1 -1
  78. package/.next/server/app/cron-jobs/page.js +1 -1
  79. package/.next/server/app/cron-jobs/page.js.nft.json +1 -1
  80. package/.next/server/app/cron-jobs/page_client-reference-manifest.js +1 -1
  81. package/.next/server/app/goals/[id]/page.js +1 -1
  82. package/.next/server/app/goals/[id]/page.js.nft.json +1 -1
  83. package/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  84. package/.next/server/app/goals/new/page.js +1 -1
  85. package/.next/server/app/goals/new/page.js.nft.json +1 -1
  86. package/.next/server/app/goals/new/page_client-reference-manifest.js +1 -1
  87. package/.next/server/app/goals/new.html +2 -2
  88. package/.next/server/app/goals/new.rsc +5 -5
  89. package/.next/server/app/goals/new.segments/_full.segment.rsc +5 -5
  90. package/.next/server/app/goals/new.segments/_head.segment.rsc +1 -1
  91. package/.next/server/app/goals/new.segments/_index.segment.rsc +3 -3
  92. package/.next/server/app/goals/new.segments/_tree.segment.rsc +2 -2
  93. package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +2 -2
  94. package/.next/server/app/goals/new.segments/goals/new.segment.rsc +1 -1
  95. package/.next/server/app/goals/new.segments/goals.segment.rsc +1 -1
  96. package/.next/server/app/goals/page.js +1 -1
  97. package/.next/server/app/goals/page.js.nft.json +1 -1
  98. package/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  99. package/.next/server/app/goals.html +1 -1
  100. package/.next/server/app/goals.rsc +5 -5
  101. package/.next/server/app/goals.segments/_full.segment.rsc +5 -5
  102. package/.next/server/app/goals.segments/_head.segment.rsc +1 -1
  103. package/.next/server/app/goals.segments/_index.segment.rsc +3 -3
  104. package/.next/server/app/goals.segments/_tree.segment.rsc +2 -2
  105. package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +2 -2
  106. package/.next/server/app/goals.segments/goals.segment.rsc +1 -1
  107. package/.next/server/app/page.js +3 -3
  108. package/.next/server/app/page.js.nft.json +1 -1
  109. package/.next/server/app/page_client-reference-manifest.js +1 -1
  110. package/.next/server/app/recipes/[id]/page.js +4 -4
  111. package/.next/server/app/recipes/[id]/page.js.nft.json +1 -1
  112. package/.next/server/app/recipes/[id]/page_client-reference-manifest.js +1 -1
  113. package/.next/server/app/recipes/page.js +3 -3
  114. package/.next/server/app/recipes/page.js.nft.json +1 -1
  115. package/.next/server/app/recipes/page_client-reference-manifest.js +1 -1
  116. package/.next/server/app/runs/page.js +4 -4
  117. package/.next/server/app/runs/page.js.nft.json +1 -1
  118. package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  119. package/.next/server/app/settings/page.js +1 -1
  120. package/.next/server/app/settings/page.js.nft.json +1 -1
  121. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  122. package/.next/server/app/settings.html +1 -1
  123. package/.next/server/app/settings.rsc +5 -5
  124. package/.next/server/app/settings.segments/_full.segment.rsc +5 -5
  125. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  126. package/.next/server/app/settings.segments/_index.segment.rsc +3 -3
  127. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  128. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
  129. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  130. package/.next/server/app/teams/[teamId]/page.js +4 -4
  131. package/.next/server/app/teams/[teamId]/page.js.nft.json +1 -1
  132. package/.next/server/app/teams/[teamId]/page_client-reference-manifest.js +1 -1
  133. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js +3 -3
  134. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js.nft.json +1 -1
  135. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page_client-reference-manifest.js +1 -1
  136. package/.next/server/app/teams/[teamId]/runs/page.js +1 -1
  137. package/.next/server/app/teams/[teamId]/runs/page.js.nft.json +1 -1
  138. package/.next/server/app/teams/[teamId]/runs/page_client-reference-manifest.js +1 -1
  139. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js +1 -1
  140. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.nft.json +1 -1
  141. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  142. package/.next/server/app/teams/[teamId]/tickets/page.js +2 -2
  143. package/.next/server/app/teams/[teamId]/tickets/page.js.nft.json +1 -1
  144. package/.next/server/app/teams/[teamId]/tickets/page_client-reference-manifest.js +1 -1
  145. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js +4 -4
  146. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -1
  147. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
  148. package/.next/server/app/teams/[teamId]/workflows/page.js +3 -3
  149. package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -1
  150. package/.next/server/app/teams/[teamId]/workflows/page_client-reference-manifest.js +1 -1
  151. package/.next/server/app/tickets/[ticket]/page.js +1 -1
  152. package/.next/server/app/tickets/[ticket]/page.js.nft.json +1 -1
  153. package/.next/server/app/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  154. package/.next/server/app/tickets/page.js +2 -2
  155. package/.next/server/app/tickets/page.js.nft.json +1 -1
  156. package/.next/server/app/tickets/page_client-reference-manifest.js +1 -1
  157. package/.next/server/chunks/[root-of-the-server]__01863a8b._.js +1 -1
  158. package/.next/server/chunks/[root-of-the-server]__01863a8b._.js.map +1 -1
  159. package/.next/server/chunks/[root-of-the-server]__04f289da._.js +1 -1
  160. package/.next/server/chunks/[root-of-the-server]__04f289da._.js.map +1 -1
  161. package/.next/server/chunks/[root-of-the-server]__05f5e243._.js +1 -1
  162. package/.next/server/chunks/[root-of-the-server]__05f5e243._.js.map +1 -1
  163. package/.next/server/chunks/[root-of-the-server]__0c4fc3d3._.js +1 -1
  164. package/.next/server/chunks/[root-of-the-server]__0c4fc3d3._.js.map +1 -1
  165. package/.next/server/chunks/[root-of-the-server]__1311d7a3._.js +1 -1
  166. package/.next/server/chunks/[root-of-the-server]__1311d7a3._.js.map +1 -1
  167. package/.next/server/chunks/[root-of-the-server]__1c6c2e43._.js +1 -1
  168. package/.next/server/chunks/[root-of-the-server]__1c6c2e43._.js.map +1 -1
  169. package/.next/server/chunks/[root-of-the-server]__3cfdf0b3._.js +2 -2
  170. package/.next/server/chunks/[root-of-the-server]__3cfdf0b3._.js.map +1 -1
  171. package/.next/server/chunks/[root-of-the-server]__3fdbc43e._.js +1 -1
  172. package/.next/server/chunks/[root-of-the-server]__3fdbc43e._.js.map +1 -1
  173. package/.next/server/chunks/[root-of-the-server]__453333f5._.js +1 -1
  174. package/.next/server/chunks/[root-of-the-server]__453333f5._.js.map +1 -1
  175. package/.next/server/chunks/[root-of-the-server]__47eb3111._.js +1 -1
  176. package/.next/server/chunks/[root-of-the-server]__47eb3111._.js.map +1 -1
  177. package/.next/server/chunks/[root-of-the-server]__502825d0._.js +1 -1
  178. package/.next/server/chunks/[root-of-the-server]__502825d0._.js.map +1 -1
  179. package/.next/server/chunks/[root-of-the-server]__50fe6ff8._.js +1 -1
  180. package/.next/server/chunks/[root-of-the-server]__50fe6ff8._.js.map +1 -1
  181. package/.next/server/chunks/[root-of-the-server]__51198e25._.js +1 -1
  182. package/.next/server/chunks/[root-of-the-server]__51198e25._.js.map +1 -1
  183. package/.next/server/chunks/[root-of-the-server]__542a081b._.js +1 -1
  184. package/.next/server/chunks/[root-of-the-server]__542a081b._.js.map +1 -1
  185. package/.next/server/chunks/[root-of-the-server]__5ceff0f3._.js +1 -1
  186. package/.next/server/chunks/[root-of-the-server]__5ceff0f3._.js.map +1 -1
  187. package/.next/server/chunks/[root-of-the-server]__5ea38a67._.js +1 -1
  188. package/.next/server/chunks/[root-of-the-server]__5ea38a67._.js.map +1 -1
  189. package/.next/server/chunks/[root-of-the-server]__698cf062._.js +1 -1
  190. package/.next/server/chunks/[root-of-the-server]__698cf062._.js.map +1 -1
  191. package/.next/server/chunks/[root-of-the-server]__69be1758._.js +1 -1
  192. package/.next/server/chunks/[root-of-the-server]__69be1758._.js.map +1 -1
  193. package/.next/server/chunks/[root-of-the-server]__69c45937._.js +1 -1
  194. package/.next/server/chunks/[root-of-the-server]__69c45937._.js.map +1 -1
  195. package/.next/server/chunks/[root-of-the-server]__6f4e90a0._.js +1 -1
  196. package/.next/server/chunks/[root-of-the-server]__6f4e90a0._.js.map +1 -1
  197. package/.next/server/chunks/[root-of-the-server]__7459129e._.js +1 -1
  198. package/.next/server/chunks/[root-of-the-server]__7459129e._.js.map +1 -1
  199. package/.next/server/chunks/[root-of-the-server]__7a331e51._.js +1 -1
  200. package/.next/server/chunks/[root-of-the-server]__7a331e51._.js.map +1 -1
  201. package/.next/server/chunks/[root-of-the-server]__7bf889c1._.js +1 -1
  202. package/.next/server/chunks/[root-of-the-server]__7bf889c1._.js.map +1 -1
  203. package/.next/server/chunks/[root-of-the-server]__864a08dd._.js +2 -2
  204. package/.next/server/chunks/[root-of-the-server]__864a08dd._.js.map +1 -1
  205. package/.next/server/chunks/[root-of-the-server]__89605574._.js +1 -1
  206. package/.next/server/chunks/[root-of-the-server]__89605574._.js.map +1 -1
  207. package/.next/server/chunks/[root-of-the-server]__8e27e9f7._.js +3 -3
  208. package/.next/server/chunks/[root-of-the-server]__8e27e9f7._.js.map +1 -1
  209. package/.next/server/chunks/[root-of-the-server]__95ddb81a._.js +1 -1
  210. package/.next/server/chunks/[root-of-the-server]__95ddb81a._.js.map +1 -1
  211. package/.next/server/chunks/[root-of-the-server]__99b12bcb._.js +1 -1
  212. package/.next/server/chunks/[root-of-the-server]__99b12bcb._.js.map +1 -1
  213. package/.next/server/chunks/[root-of-the-server]__9d0ea07b._.js +1 -1
  214. package/.next/server/chunks/[root-of-the-server]__9d0ea07b._.js.map +1 -1
  215. package/.next/server/chunks/[root-of-the-server]__a49c534d._.js +1 -1
  216. package/.next/server/chunks/[root-of-the-server]__a49c534d._.js.map +1 -1
  217. package/.next/server/chunks/[root-of-the-server]__a74a32d5._.js +1 -1
  218. package/.next/server/chunks/[root-of-the-server]__a74a32d5._.js.map +1 -1
  219. package/.next/server/chunks/[root-of-the-server]__b002764e._.js +1 -1
  220. package/.next/server/chunks/[root-of-the-server]__b002764e._.js.map +1 -1
  221. package/.next/server/chunks/[root-of-the-server]__b64936a3._.js +1 -1
  222. package/.next/server/chunks/[root-of-the-server]__b64936a3._.js.map +1 -1
  223. package/.next/server/chunks/[root-of-the-server]__bbdb6dcb._.js +2 -2
  224. package/.next/server/chunks/[root-of-the-server]__bbdb6dcb._.js.map +1 -1
  225. package/.next/server/chunks/[root-of-the-server]__bccfb2c0._.js +1 -1
  226. package/.next/server/chunks/[root-of-the-server]__bccfb2c0._.js.map +1 -1
  227. package/.next/server/chunks/[root-of-the-server]__d924e5ac._.js +1 -1
  228. package/.next/server/chunks/[root-of-the-server]__d924e5ac._.js.map +1 -1
  229. package/.next/server/chunks/[root-of-the-server]__e063a986._.js +1 -1
  230. package/.next/server/chunks/[root-of-the-server]__e063a986._.js.map +1 -1
  231. package/.next/server/chunks/[root-of-the-server]__e40409a2._.js +1 -1
  232. package/.next/server/chunks/[root-of-the-server]__e40409a2._.js.map +1 -1
  233. package/.next/server/chunks/[root-of-the-server]__e478ef0d._.js +1 -1
  234. package/.next/server/chunks/[root-of-the-server]__e478ef0d._.js.map +1 -1
  235. package/.next/server/chunks/[root-of-the-server]__fef7183d._.js +1 -1
  236. package/.next/server/chunks/[root-of-the-server]__fef7183d._.js.map +1 -1
  237. package/.next/server/chunks/[root-of-the-server]__ff69832c._.js +1 -1
  238. package/.next/server/chunks/[root-of-the-server]__ff69832c._.js.map +1 -1
  239. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js +1 -1
  240. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js.map +1 -1
  241. package/.next/server/chunks/ssr/[root-of-the-server]__02e6ccaa._.js +3 -0
  242. package/.next/server/chunks/ssr/[root-of-the-server]__02e6ccaa._.js.map +1 -0
  243. package/.next/server/chunks/ssr/[root-of-the-server]__0df430db._.js +3 -0
  244. package/.next/server/chunks/ssr/{[root-of-the-server]__76f9757d._.js.map → [root-of-the-server]__0df430db._.js.map} +1 -1
  245. package/.next/server/chunks/ssr/[root-of-the-server]__162d7d9d._.js +3 -0
  246. package/.next/server/chunks/ssr/[root-of-the-server]__162d7d9d._.js.map +1 -0
  247. package/.next/server/chunks/ssr/[root-of-the-server]__17b046ea._.js +3 -0
  248. package/.next/server/chunks/ssr/[root-of-the-server]__17b046ea._.js.map +1 -0
  249. package/.next/server/chunks/ssr/[root-of-the-server]__255506f2._.js +3 -0
  250. package/.next/server/chunks/ssr/[root-of-the-server]__255506f2._.js.map +1 -0
  251. package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js +3 -0
  252. package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js.map +1 -0
  253. package/.next/server/chunks/ssr/[root-of-the-server]__471bc2e7._.js +1 -1
  254. package/.next/server/chunks/ssr/[root-of-the-server]__471bc2e7._.js.map +1 -1
  255. package/.next/server/chunks/ssr/[root-of-the-server]__49281b4c._.js +1 -1
  256. package/.next/server/chunks/ssr/[root-of-the-server]__49281b4c._.js.map +1 -1
  257. package/.next/server/chunks/ssr/[root-of-the-server]__4981f370._.js +3 -0
  258. package/.next/server/chunks/ssr/[root-of-the-server]__4981f370._.js.map +1 -0
  259. package/.next/server/chunks/ssr/[root-of-the-server]__4c66998a._.js +3 -0
  260. package/.next/server/chunks/ssr/[root-of-the-server]__4c66998a._.js.map +1 -0
  261. package/.next/server/chunks/ssr/[root-of-the-server]__8756d76d._.js +3 -0
  262. package/.next/server/chunks/ssr/[root-of-the-server]__8756d76d._.js.map +1 -0
  263. package/.next/server/chunks/ssr/[root-of-the-server]__8a588fad._.js +3 -0
  264. package/.next/server/chunks/ssr/[root-of-the-server]__8a588fad._.js.map +1 -0
  265. package/.next/server/chunks/ssr/[root-of-the-server]__9a7d79aa._.js +1 -1
  266. package/.next/server/chunks/ssr/[root-of-the-server]__9a7d79aa._.js.map +1 -1
  267. package/.next/server/chunks/ssr/[root-of-the-server]__ad4e8478._.js +3 -0
  268. package/.next/server/chunks/ssr/[root-of-the-server]__ad4e8478._.js.map +1 -0
  269. package/.next/server/chunks/ssr/[root-of-the-server]__c777e326._.js +3 -0
  270. package/.next/server/chunks/ssr/[root-of-the-server]__c777e326._.js.map +1 -0
  271. package/.next/server/chunks/ssr/_018dfe6b._.js +1 -1
  272. package/.next/server/chunks/ssr/_018dfe6b._.js.map +1 -1
  273. package/.next/server/chunks/ssr/{node_modules_next_10fb6ad9._.js → _7f9e89d2._.js} +2 -2
  274. package/.next/server/chunks/ssr/_7f9e89d2._.js.map +1 -0
  275. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +1 -1
  276. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -1
  277. package/.next/server/chunks/ssr/src_59477309._.js +1 -1
  278. package/.next/server/chunks/ssr/src_59477309._.js.map +1 -1
  279. package/.next/server/chunks/ssr/src_app_HomeClient_tsx_f9f7568d._.js +1 -1
  280. package/.next/server/chunks/ssr/src_app_HomeClient_tsx_f9f7568d._.js.map +1 -1
  281. package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js +3 -0
  282. package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js.map +1 -0
  283. package/.next/server/chunks/ssr/src_lib_errors_ts_f440efeb._.js +3 -0
  284. package/.next/server/chunks/ssr/src_lib_errors_ts_f440efeb._.js.map +1 -0
  285. package/.next/server/pages/404.html +1 -1
  286. package/.next/server/pages/500.html +2 -2
  287. package/.next/server/server-reference-manifest.js +1 -1
  288. package/.next/server/server-reference-manifest.json +1 -1
  289. package/.next/static/chunks/3e0d3a43014c0ad2.css +3 -0
  290. package/.next/static/chunks/43d0024279c6160e.js +1 -0
  291. package/.next/static/chunks/{ecdc9465f0e4d954.js → 4d4876ec71727e38.js} +1 -1
  292. package/.next/static/chunks/4f5e02a609758a0b.js +1 -0
  293. package/.next/static/chunks/5e3b1d0f61a651bf.js +1 -0
  294. package/.next/static/chunks/be12a66bd736fad8.js +1 -0
  295. package/.next/static/chunks/f179280598d329b2.js +1 -0
  296. package/openclaw.plugin.json +1 -1
  297. package/package.json +1 -1
  298. package/public/images/clawkitchen/home.png +0 -0
  299. package/public/images/clawkitchen/recipes.png +0 -0
  300. package/public/images/clawkitchen/runs.png +0 -0
  301. package/public/images/clawkitchen/team.png +0 -0
  302. package/public/images/clawkitchen/tickets.png +0 -0
  303. package/public/images/clawkitchen/workflows.png +0 -0
  304. package/.next/server/chunks/ssr/[root-of-the-server]__1d65fddf._.js +0 -3
  305. package/.next/server/chunks/ssr/[root-of-the-server]__1d65fddf._.js.map +0 -1
  306. package/.next/server/chunks/ssr/[root-of-the-server]__28f5d174._.js +0 -3
  307. package/.next/server/chunks/ssr/[root-of-the-server]__28f5d174._.js.map +0 -1
  308. package/.next/server/chunks/ssr/[root-of-the-server]__450d6006._.js +0 -3
  309. package/.next/server/chunks/ssr/[root-of-the-server]__450d6006._.js.map +0 -1
  310. package/.next/server/chunks/ssr/[root-of-the-server]__6bd48d33._.js +0 -3
  311. package/.next/server/chunks/ssr/[root-of-the-server]__6bd48d33._.js.map +0 -1
  312. package/.next/server/chunks/ssr/[root-of-the-server]__76f9757d._.js +0 -3
  313. package/.next/server/chunks/ssr/[root-of-the-server]__78972f52._.js +0 -3
  314. package/.next/server/chunks/ssr/[root-of-the-server]__78972f52._.js.map +0 -1
  315. package/.next/server/chunks/ssr/[root-of-the-server]__9ffebe91._.js +0 -3
  316. package/.next/server/chunks/ssr/[root-of-the-server]__9ffebe91._.js.map +0 -1
  317. package/.next/server/chunks/ssr/[root-of-the-server]__a26db919._.js +0 -3
  318. package/.next/server/chunks/ssr/[root-of-the-server]__a26db919._.js.map +0 -1
  319. package/.next/server/chunks/ssr/[root-of-the-server]__afaa71fe._.js +0 -3
  320. package/.next/server/chunks/ssr/[root-of-the-server]__afaa71fe._.js.map +0 -1
  321. package/.next/server/chunks/ssr/[root-of-the-server]__b577b475._.js +0 -3
  322. package/.next/server/chunks/ssr/[root-of-the-server]__b577b475._.js.map +0 -1
  323. package/.next/server/chunks/ssr/[root-of-the-server]__e94ab521._.js +0 -3
  324. package/.next/server/chunks/ssr/[root-of-the-server]__e94ab521._.js.map +0 -1
  325. package/.next/server/chunks/ssr/[root-of-the-server]__fb6781d4._.js +0 -3
  326. package/.next/server/chunks/ssr/[root-of-the-server]__fb6781d4._.js.map +0 -1
  327. package/.next/server/chunks/ssr/node_modules_next_10fb6ad9._.js.map +0 -1
  328. package/.next/server/chunks/ssr/src_e54f24fb._.js +0 -3
  329. package/.next/server/chunks/ssr/src_e54f24fb._.js.map +0 -1
  330. package/.next/static/chunks/42b3230688d0834c.js +0 -1
  331. package/.next/static/chunks/7495459fdf300bf9.js +0 -1
  332. package/.next/static/chunks/821af975ccc1f8d5.js +0 -1
  333. package/.next/static/chunks/be874907adf946fd.js +0 -1
  334. package/.next/static/chunks/e397a21bf5f13650.js +0 -1
  335. package/.next/static/chunks/f5d0d403c0fecb7f.css +0 -3
  336. /package/.next/static/{0PWp2TzSmiSf_Pf9YHES- → hUvZJdetkFjI4DzH44gs9}/_buildManifest.js +0 -0
  337. /package/.next/static/{0PWp2TzSmiSf_Pf9YHES- → hUvZJdetkFjI4DzH44gs9}/_clientMiddlewareManifest.json +0 -0
  338. /package/.next/static/{0PWp2TzSmiSf_Pf9YHES- → hUvZJdetkFjI4DzH44gs9}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},44355,e=>{"use strict";var t=e.i(43476),r=e.i(74080);function s({open:e,onClose:s,title:a,children:o,error:i,confirmLabel:l,confirmBusyLabel:n,onConfirm:c,confirmDisabled:d,busy:m,confirmButtonClassName:x}){if(!e)return null;let u=m??!1,p=u&&n?n:l,h="confirmation-modal-title";return(0,r.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:s,"aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":h,children:(0,t.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,t.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-glass-strong)] p-5 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("h2",{id:h,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:a}),o,i?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:i}):null,(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:s,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Cancel"}),(0,t.jsx)("button",{type:"button",disabled:(d??!1)||u,onClick:c,className:x??"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[var(--ck-accent-red-hover)] disabled:opacity-50",children:p})]})]})})})]}),document.body)}e.s(["ConfirmationModal",()=>s])},54510,e=>{"use strict";var t=e.i(43476),r=e.i(44355);function s({open:e,onClose:s,title:a,entityLabel:o,bodyText:i,onConfirm:l,busy:n,error:c}){return(0,t.jsx)(r.ConfirmationModal,{open:e,onClose:s,title:a,confirmLabel:"Delete",confirmBusyLabel:"Deleting…",onConfirm:l,busy:n,error:c??void 0,children:(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[a," ",(0,t.jsx)("code",{className:"font-mono",children:o}),"? ",i]})})}function a(e){return function(r){let a=r[e.entityLabelKey];return(0,t.jsx)(s,{open:r.open,onClose:r.onClose,title:e.title,entityLabel:a,bodyText:e.bodyText,onConfirm:r.onConfirm,busy:r.busy,error:r.error})}}let o=a({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),i=a({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),l=a({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),n=a({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});e.s(["DeleteAgentModal",0,o,"DeleteCronJobModal",0,n,"DeleteRecipeModal",0,l,"DeleteTeamModal",0,i],54510)},72532,e=>{"use strict";var t=e.i(43476);function r({title:e,files:r,loading:s,showOptionalFiles:a,onShowOptionalChange:o,selectedFileName:i,onSelectFile:l,renderItemExtra:n}){let c=a?r:r.filter(e=>e.required||!e.missing);return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:e}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:e=>o(e.target.checked)}),"Show optional"]})]}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"Default view hides optional missing files to reduce noise."}),(0,t.jsxs)("ul",{className:"mt-3 space-y-1",children:[s?(0,t.jsx)("li",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"Loading…"}):null,c.map(e=>{var r;let s;return(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>l(e.name),className:(r=e.name,s="w-full rounded-[var(--ck-radius-sm)] px-3 py-2 text-left text-sm",i===r?`${s} bg-white/10 text-[color:var(--ck-text-primary)]`:`${s} text-[color:var(--ck-text-secondary)] hover:bg-white/5`),children:[(0,t.jsx)("span",{className:e.required?"text-[color:var(--ck-text-primary)]":"text-[color:var(--ck-text-secondary)]",children:e.name}),(0,t.jsx)("span",{className:"ml-2 text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:e.required?"required":"optional"}),e.missing?(0,t.jsx)("span",{className:"ml-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"missing"}):null]}),n?.(e)]})},e.name)})]})]})}e.s(["FileListWithOptionalToggle",()=>r])},92140,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(22016),a=e.i(18566),o=e.i(42771),i=e.i(82310);function l(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function n({teamId:e,llmTaskEnabled:n}){let c=(0,a.useRouter)(),[d,m]=(0,r.useState)([]),[x,u]=(0,r.useState)(!0),[p,h]=(0,r.useState)(!1),[v,f]=(0,r.useState)(""),[b,y]=(0,r.useState)(""),[w,k]=(0,r.useState)({}),[j,g]=(0,r.useState)({}),[N,C]=(0,r.useState)(""),[S,I]=(0,r.useState)(""),[A,R]=(0,r.useState)(null),[$,T]=(0,r.useState)(""),[U,L]=(0,r.useState)(""),[M,D]=(0,r.useState)(!1),E=(0,r.useCallback)(async t=>{let r=!!t?.quiet;f(""),r||u(!0);try{let t=await (0,o.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}`,{cache:"no-store"});if(!t.ok)throw Error("Failed to load workflows");let r=(Array.isArray(t.files)?t.files:[]).map(e=>e.endsWith(".workflow.json")?e.slice(0,-14):null).filter(e=>!!e);m(r.map(e=>({id:e,name:e})))}catch(e){f((0,i.errorMessage)(e))}finally{r||u(!1)}},[e]);async function q(){h(!0);try{await E({quiet:!0})}finally{h(!1)}}async function J(t){if(confirm(`Delete workflow “${t}”? This removes the .workflow.json file from the team workspace.`)){f("");try{let r=await (0,o.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`,{method:"DELETE"});if(!r.ok)throw Error(r.error||"Failed to delete workflow");await E({quiet:!0}),b===t&&(y(""),C(""),R(null))}catch(e){f((0,i.errorMessage)(e))}}}async function O(t){g(e=>({...e,[t]:!0})),T("");try{let r=await (0,o.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}`,{cache:"no-store"});if(!r.ok)throw Error(r.error||"Failed to load runs");let s=Array.isArray(r.runIds)?r.runIds.map(e=>String(e||"").trim()).filter(Boolean):Array.isArray(r.files)?r.files.map(e=>"string"==typeof e&&e.endsWith(".run.json")?e.slice(0,-9):null).filter(e=>!!e):[];k(e=>({...e,[t]:s}))}catch(e){T((0,i.errorMessage)(e)),k(e=>({...e,[t]:[]}))}finally{g(e=>({...e,[t]:!1}))}}async function B(t,r){I(t),C(r),R(null),T(""),L("");try{let s=await (0,o.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}&runId=${encodeURIComponent(r)}`,{cache:"no-store"});if(!s.ok)throw Error(s.error||"Failed to load run");let a=l(s.run)?s.run:null;if(!a)throw Error("Invalid run format");R({id:String(a.id??r),status:"string"==typeof a.status?a.status:void 0,startedAt:"string"==typeof a.startedAt?a.startedAt:void 0,finishedAt:"string"==typeof a.finishedAt?String(a.finishedAt):void 0,meta:a.meta,memoryUsed:a.memoryUsed,approval:a.approval,raw:a})}catch(e){T((0,i.errorMessage)(e)),R(null)}}async function K(t){if(confirm(`Add workflow from template “${t}”?`)){f("");try{let r=await (0,o.fetchJson)("/api/teams/workflow-templates",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,templateId:t})});if(!r.ok)throw Error(r.error||"Failed to apply template");let s=String(r.workflowId??"").trim();if(!s)throw Error("Template applied but workflowId missing");await E({quiet:!0}),c.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(s)}`)}catch(e){f((0,i.errorMessage)(e))}}}(0,r.useEffect)(()=>{E()},[E]);let F=(0,r.useMemo)(()=>{if(!A)return[];let e=A.memoryUsed??(l(A.meta)?A.meta.memoryUsed:void 0);return Array.isArray(e)?e.map(e=>l(e)?e:null).filter(Boolean).map(e=>({ts:String(e.ts??"").trim(),author:String(e.author??"").trim(),type:String(e.type??"").trim(),content:String(e.content??"").trim(),source:e.source})).filter(e=>e.ts&&e.author&&e.type&&e.content):[]},[A]);if(x)return(0,t.jsx)("div",{className:"ck-glass p-4",children:"Loading workflows…"});let P=!1===n?(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-amber-500/30 bg-amber-500/10 p-4 text-sm",children:[(0,t.jsx)("div",{className:"font-medium text-amber-200",children:"LLM support is not enabled"}),(0,t.jsxs)("div",{className:"mt-1 text-[color:var(--ck-text-secondary)]",children:["Workflow LLM nodes require the optional built-in ",(0,t.jsx)("code",{className:"px-1",children:"llm-task"})," plugin."]}),(0,t.jsxs)("div",{className:"mt-2 text-[color:var(--ck-text-secondary)]",children:["Enable it with: ",(0,t.jsx)("code",{className:"px-1",children:"openclaw plugins enable llm-task"})," then run"," ",(0,t.jsx)("code",{className:"px-1",children:"openclaw gateway restart"}),"."]}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"If you’re doing a non-interactive install, keep this command in your setup docs as a fallback."})]}):null;return(0,t.jsxs)("div",{className:"ck-glass p-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:"Workflows (file-first)"}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:["Stored in ",(0,t.jsx)("code",{children:"shared-context/workflows/<id>.workflow.json"})," inside the team workspace."]}),P,(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-start gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let t=`new-${Date.now()}`;c.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(t)}?draft=1`)},className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)]",children:"Add workflow"}),(0,t.jsx)("button",{type:"button",onClick:()=>void K("marketing-cadence-v1"),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Add example template"}),(0,t.jsx)("button",{type:"button",onClick:q,disabled:p,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:p?"Refreshing…":"Refresh"})]})]}),v?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-4 text-sm text-red-100",children:v}):null,0===d.length?(0,t.jsx)("p",{className:"mt-4 text-sm text-[color:var(--ck-text-secondary)]",children:"No workflows yet."}):(0,t.jsx)("ul",{className:"mt-4 divide-y divide-white/10 overflow-hidden rounded-[var(--ck-radius-sm)] border border-white/10",children:d.map(r=>{let a=b===r.id,o=w[r.id]??[],n=!!j[r.id];return(0,t.jsxs)("li",{className:"bg-white/5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[(0,t.jsxs)("button",{type:"button",onClick:async()=>{let e=a?"":r.id;y(e),C(""),R(null),T(""),e&&await O(e)},className:"min-w-0 flex-1 text-left",children:[(0,t.jsx)("div",{className:"truncate text-sm font-medium text-[color:var(--ck-text-primary)]",children:r.name||r.id}),(0,t.jsx)("div",{className:"truncate text-xs text-[color:var(--ck-text-tertiary)]",children:r.id}),(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:["Click to ",a?"collapse":"expand"," run details"]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)(s.default,{href:`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(r.id)}`,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Edit"}),(0,t.jsx)("button",{type:"button",onClick:()=>void J(r.id),className:"rounded-[var(--ck-radius-sm)] border border-[color:rgba(255,59,48,0.45)] bg-[color:rgba(255,59,48,0.08)] px-3 py-1.5 text-sm font-medium text-[color:var(--ck-accent-red)] transition-colors hover:bg-[color:rgba(255,59,48,0.12)]",children:"Delete"})]})]}),a?(0,t.jsxs)("div",{className:"border-t border-white/10 bg-black/20 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Runs"}),(0,t.jsx)("button",{type:"button",disabled:n,onClick:()=>void O(r.id),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:n?"Loading…":"Refresh runs"})]}),$?(0,t.jsx)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100",children:$}):null,(0,t.jsxs)("div",{className:"mt-2 grid grid-cols-1 gap-3 lg:grid-cols-2",children:[(0,t.jsx)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2",children:o.length?(0,t.jsx)("div",{className:"space-y-1",children:o.slice(0,8).map(e=>{let s=N===e;return(0,t.jsx)("button",{type:"button",onClick:()=>void B(r.id,e),className:s?"w-full rounded-[var(--ck-radius-sm)] bg-white/10 px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-primary)]":"w-full rounded-[var(--ck-radius-sm)] px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-secondary)] hover:bg-white/5",children:(0,t.jsx)("span",{className:"font-mono",children:e})},e)})}):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"No runs yet."})}),(0,t.jsx)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-3",children:A?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Run detail"}),(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:A.id}),A.status?(0,t.jsxs)("span",{children:[" • ",A.status]}):null]})]}),(0,t.jsxs)("div",{className:"border-t border-white/10 pt-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Approval"}),(()=>{let r=A.approval;if(!l(r))return(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"(No approval info recorded.)"});let s=String(r.state??"").trim(),a="string"==typeof r.requestedAt?r.requestedAt:"",o="string"==typeof r.decidedAt?r.decidedAt:"",n="string"==typeof r.decidedBy?r.decidedBy:"",c="string"==typeof r.note?r.note:"",d=l(r.outbound)?r.outbound:null,m="pending"===s||"waiting_for_approval"===A.status;return(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2 text-[11px] text-[color:var(--ck-text-secondary)]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"state"}),": ",(0,t.jsx)("span",{className:"font-mono text-[color:var(--ck-text-primary)]",children:s||"(unknown)"})]}),a?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"requestedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:a})]}):null,o?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"decidedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:o})]}):null,n?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"decidedBy"}),": ",(0,t.jsx)("span",{className:"font-mono",children:n})]}):null,c?(0,t.jsx)("div",{className:"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]",children:c}):null,d?(0,t.jsxs)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 text-[10px]",children:[(0,t.jsx)("div",{className:"text-[color:var(--ck-text-tertiary)]",children:"Outbound"}),(0,t.jsx)("pre",{className:"mt-1 overflow-auto whitespace-pre-wrap",children:JSON.stringify(d,null,2)})]}):null]}),m?(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"approval note (optional)"}),(0,t.jsx)("textarea",{value:U,onChange:e=>L(e.target.value),rows:3,className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"e.g. Ship it / please tweak hook"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:[{action:"approve",label:"Approve"},{action:"request_changes",label:"Request changes"},{action:"cancel",label:"Cancel"}].map(r=>(0,t.jsx)("button",{type:"button",disabled:M,onClick:async()=>{if(S&&N&&confirm(`${r.label} run ${N}?`)){D(!0),T("");try{let t=await fetch("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflowId:S,runId:N,action:r.action,note:U||void 0,decidedBy:"ClawKitchen UI"})}),s=await t.json();if(!t.ok||!s.ok)throw Error(s.error||"Failed to apply approval action");await B(S,N)}catch(e){T((0,i.errorMessage)(e))}finally{D(!1)}}},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:r.label},r.action))})]}):null]})})()]}),(0,t.jsxs)("div",{className:"border-t border-white/10 pt-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Memory used in this run"}),F.length?(0,t.jsx)("div",{className:"mt-2 space-y-2",children:F.slice(0,20).map((e,r)=>(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2",children:[(0,t.jsxs)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:e.ts})," • ",(0,t.jsx)("span",{className:"font-mono",children:e.type})," • ",(0,t.jsx)("span",{className:"font-mono",children:e.author})]}),(0,t.jsx)("div",{className:"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]",children:e.content}),void 0!==e.source?(0,t.jsx)("pre",{className:"mt-2 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 text-[10px] text-[color:var(--ck-text-secondary)]",children:JSON.stringify(e.source,null,2)}):null]},`${e.ts}-${r}`))}):(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["(None recorded yet.)",(0,t.jsxs)("div",{className:"mt-1",children:["Next step: have the workflow runner write an explicit ",(0,t.jsx)("span",{className:"font-mono",children:"memoryUsed[]"})," list into the run file."]})]})]})]}):N?(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"Loading run…"}):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Select a run to see details."})})]})]}):null]},r.id)})})]})}e.s(["default",()=>n])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},36288,e=>{"use strict";var t=e.i(43476),r=e.i(22016),s=e.i(18566),a=e.i(71645),o=e.i(76972),n=e.i(82310),c=e.i(42771);let l=new Set(["lead","dev","qa","tester","agent","system"]);function i({teamId:e,ticket:r,currentOwner:o}){let n=(0,s.useRouter)(),[c,l]=(0,a.useState)([]),[i,d]=(0,a.useState)(o??""),[m,x]=(0,a.useState)(!1),[u,b]=(0,a.useState)(null);(0,a.useEffect)(()=>{let t=!1;return(async()=>{try{let r=e?`/api/teams/${encodeURIComponent(e)}/tickets/assignees`:"/api/tickets/assignees",s=await fetch(r,{cache:"no-store"}),a=await s.json();if(t)return;l(Array.isArray(a.assignees)?a.assignees:[])}catch{if(t)return;l([])}})(),()=>{t=!0}},[]);let h=(0,a.useMemo)(()=>{let e=new Set(c);return o&&e.add(o),Array.from(e).sort()},[c,o]);async function p(){x(!0),b(null);try{let t=e?`/api/teams/${encodeURIComponent(e)}/tickets/assign`:"/api/tickets/assign",s=await fetch(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:r,assignee:i})}),a=await s.json();if(!s.ok)return void b(a.error||"Assign failed");n.refresh()}catch{b("Assign failed")}finally{x(!1)}}return(0,t.jsxs)("div",{className:"ck-glass p-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-tertiary)]",children:"Assignee"}),(0,t.jsxs)("select",{className:"rounded-md border border-white/10 bg-black/20 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]",value:i,onChange:e=>d(e.target.value),children:[(0,t.jsx)("option",{value:"",disabled:!0,children:"Select…"}),h.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),(0,t.jsx)("button",{type:"button",onClick:p,disabled:m||!i||i===(o??""),className:"rounded-md bg-emerald-600 px-3 py-2 text-sm font-semibold text-white hover:bg-emerald-500 disabled:cursor-not-allowed disabled:opacity-50",children:m?"Assigning…":"Assign"}),o?(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:["Currently: ",o]}):null]}),u?(0,t.jsx)("div",{className:"mt-2 text-xs text-red-300",children:u}):null]})}function d(e,t){return t||0==e.trim().length}function m(e){let m=(0,s.useRouter)(),x=(0,o.useToast)(),[u,b]=(0,a.useTransition)(),[h,p]=(0,a.useState)(null),[k,v]=(0,a.useState)(null),f=(0,a.useMemo)(()=>(function(e){let t=function(e){let t=/^## Comments\s*$/gim.exec(e);if(!t)return null;let r=t.index+t[0].length,s=e.slice(r).search(/^##\s+/m),a=-1===s?e.length:r+s;return{start:r,end:a}}(e);if(!t)return[];let r=e.slice(t.start,t.end).replace(/^\s+/,"").split("\n"),s=[],a=null,o=/^- \*\*(.+?)\*\*\s+—\s+(.*)$/;for(let e of r){let t=e.replace(/\r$/,""),r=t.match(o);if(r){a&&s.push({...a,body:a.body.trimEnd()});let e=r[1].trim(),t=r[2].trim(),o=t.indexOf(":"),n=(o>=0?t.slice(0,o):t).trim()||"unknown",c=o>=0?t.slice(o+1).trimStart():"",i=function(e){let t=e?.trim()||"unknown",r=t.match(/^(.*?)\s*\((.*?)\)\s*$/);if(r){let e=r[1].trim()||"unknown",s=r[2].trim();return{name:e,role:s&&s.toLowerCase()!=e.toLowerCase()?s:void 0,raw:t}}for(let e of[" — "," - "," | "]){if(!t.includes(e))continue;let[r,s]=t.split(e).map(e=>e.trim()).filter(Boolean);if(!r||!s)break;let a=l.has(r.toLowerCase()),o=l.has(s.toLowerCase());if(a&&!o)return{name:s,role:r,raw:t};return{name:r,role:s,raw:t}}return{name:t,raw:t}}(n);a={timestamp:e,authorName:i.name,authorRole:i.role,authorRaw:i.raw,body:c?c+"\n":""};continue}a&&(a.body+=t.replace(/^\s{0,2}/,"")+"\n")}return a&&s.push({...a,body:a.body.trimEnd()}),s})(e.markdown),[e.markdown]),[g,y]=(0,a.useState)(""),[j,w]=(0,a.useState)("");async function N(){p(null),await (0,c.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/move-to-goals`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId})})}async function C(){p(null),await (0,c.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/delete`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId})})}async function S(t){p(null),await (0,c.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/move`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId,to:t})})}async function T(){p(null);let t=j.trim();if(!t)throw Error("Comment cannot be empty.");await (0,c.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/comment`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId,author:g.trim()||void 0,comment:t})}),w(""),x.push({kind:"success",message:"Comment added."}),m.refresh()}return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(r.default,{href:e.backHref??"/tickets",className:"text-sm font-medium hover:underline",children:"← Back"}),(0,t.jsx)("span",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:e.file})]}),h?(0,t.jsx)("div",{className:"ck-glass border border-[color:var(--ck-border-strong)] p-3 text-sm text-[color:var(--ck-text-primary)]",children:h}):null,(0,t.jsxs)("div",{className:"ck-glass p-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"Ticket"}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("span",{children:"Status"}),(0,t.jsxs)("select",{className:"rounded border border-[color:var(--ck-border-subtle)] bg-black/20 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",disabled:u,value:e.stage,onChange:t=>{let r=t.target.value;if(r!==e.stage){if("done"===r&&!window.confirm("Mark this ticket done? This will move the file to work/done and add an audit comment."))return;b(()=>{S(r).then(()=>{x.push({kind:"success",message:`Status updated to ${r}.`}),m.refresh()}).catch(e=>p((0,n.errorMessage)(e)))})}},children:[(0,t.jsx)("option",{value:"backlog",children:"backlog"}),(0,t.jsx)("option",{value:"in-progress",children:"in-progress"}),(0,t.jsx)("option",{value:"testing",children:"testing"}),(0,t.jsx)("option",{value:"done",children:"done"})]})]}),(0,t.jsx)("button",{className:"rounded border border-[color:var(--ck-border-subtle)] px-3 py-1.5 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:border-[color:var(--ck-border-strong)]",onClick:()=>v({kind:"goals"}),disabled:u,children:"Move to Goals"}),(0,t.jsx)("button",{className:"rounded border border-[color:var(--ck-accent-red)] bg-[color:var(--ck-accent-red-soft)] px-3 py-1.5 text-xs font-medium text-[color:var(--ck-accent-red)] hover:bg-[color:var(--ck-accent-red-soft-strong)]",onClick:()=>v({kind:"delete"}),disabled:u,children:"Delete Ticket"})]})]}),void 0!==e.currentOwner?(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(i,{teamId:e.teamId,ticket:e.ticketId,currentOwner:e.currentOwner??null})}):null,(0,t.jsxs)("div",{className:"mt-6 border-t border-[color:var(--ck-border-subtle)] pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"Comments"}),(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:f.length})]}),f.length?(0,t.jsx)("div",{className:"mt-3 space-y-3",children:f.map((e,r)=>(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] bg-black/10 p-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-primary)]",children:e.authorName}),e.authorRole?(0,t.jsx)("div",{className:"rounded border border-[color:var(--ck-border-subtle)] bg-black/10 px-1.5 py-0.5 text-[10px] font-medium text-[color:var(--ck-text-tertiary)]",children:e.authorRole}):null]}),(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:e.timestamp})]}),(0,t.jsx)("div",{className:"mt-2 whitespace-pre-wrap break-words text-sm leading-6 text-[color:var(--ck-text-secondary)]",children:e.body})]},`${e.timestamp}-${r}`))}):(0,t.jsx)("div",{className:"mt-3 text-sm text-[color:var(--ck-text-secondary)]",children:"No comments yet."}),(0,t.jsxs)("div",{className:"mt-4 border-t border-[color:var(--ck-border-subtle)] pt-4",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"Add comment"}),(0,t.jsxs)("div",{className:"mt-3 grid gap-3",children:[(0,t.jsxs)("div",{className:"grid gap-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",htmlFor:"ck-comment-author",children:"Author (optional)"}),(0,t.jsx)("input",{id:"ck-comment-author",value:g,onChange:e=>y(e.target.value),placeholder:"unknown",className:"w-full rounded border border-[color:var(--ck-border-subtle)] bg-black/20 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] outline-none focus:border-[color:var(--ck-border-strong)]",disabled:u})]}),(0,t.jsxs)("div",{className:"grid gap-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",htmlFor:"ck-comment-body",children:"Comment"}),(0,t.jsx)("textarea",{id:"ck-comment-body",value:j,onChange:e=>w(e.target.value),rows:4,className:"w-full rounded border border-[color:var(--ck-border-subtle)] bg-black/20 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] outline-none focus:border-[color:var(--ck-border-strong)]",disabled:u})]}),(0,t.jsx)("div",{className:"flex items-center justify-end",children:(0,t.jsx)("button",{type:"button","aria-busy":u,className:"rounded-[var(--ck-radius-sm)] bg-[color:var(--ck-accent)] px-3 py-2 text-xs font-semibold text-black transition hover:brightness-110 active:brightness-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--ck-border-strong)] focus-visible:ring-offset-2 focus-visible:ring-offset-black/30 disabled:cursor-not-allowed disabled:border disabled:border-[color:var(--ck-border-subtle)] disabled:bg-[color:var(--ck-bg-glass)] disabled:text-[color:var(--ck-text-tertiary)]",onClick:()=>{b(()=>{T().catch(e=>p((0,n.errorMessage)(e)))})},disabled:d(j,u),children:u?"Posting…":"Post comment"})})]})]})]})]}),(0,t.jsx)("div",{className:"ck-glass p-6",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words text-sm leading-6 text-[color:var(--ck-text-primary)]",children:e.markdown})}),k?(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,t.jsxs)("div",{className:"ck-glass w-full max-w-lg rounded-[var(--ck-radius-md)] border border-[color:var(--ck-border-strong)] p-4",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"goals"===k.kind?"Move to Goals":"Delete ticket"}),(0,t.jsx)("div",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"goals"===k.kind?(0,t.jsxs)(t.Fragment,{children:["This will move the ticket out of the work lanes into ",(0,t.jsx)("code",{children:"work/goals/"})," so it won’t be picked up by automation."]}):(0,t.jsx)(t.Fragment,{children:"This will permanently remove the ticket markdown file. Assignment stubs (if any) will be archived."})}),(0,t.jsxs)("div",{className:"mt-4 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{className:"rounded border border-[color:var(--ck-border-subtle)] px-3 py-1.5 text-xs text-[color:var(--ck-text-secondary)]",onClick:()=>v(null),disabled:u,children:"Cancel"}),(0,t.jsx)("button",{className:"delete"===k.kind?"rounded bg-[color:var(--ck-accent-red)] px-3 py-1.5 text-xs font-medium text-white":"rounded bg-[color:var(--ck-accent)] px-3 py-1.5 text-xs font-medium text-black",onClick:()=>{let t=k.kind;v(null),b(()=>{("goals"===t?N():C()).then(()=>{x.push({kind:"success",message:"delete"===t?"Ticket deleted.":"Moved to Goals."}),"delete"===t?m.push(e.backHref??"/tickets"):m.refresh()}).catch(e=>p((0,n.errorMessage)(e)))})},disabled:u,children:"Confirm"})]})]})}):null]})}e.s(["TicketDetailClient",()=>m,"isPostCommentDisabled",()=>d],36288)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54523,e=>{"use strict";var t=e.i(43476),s=e.i(22016),r=e.i(71645),a=e.i(65046);function l({agents:e,teamNames:l,appVersion:c}){let o=(0,a.useSelectedTeamId)()||"all",i=(0,r.useMemo)(()=>{let t=new Map;for(let s of e){let e=function(e){if(!e)return null;let t=e.split("/").filter(Boolean).find(e=>e.startsWith("workspace-"))??"";return t&&t.slice(10)||null}(s.workspace)??"personal";if("all"!==o&&e!==o)continue;let r=t.get(e)??[];r.push(s),t.set(e,r)}return Array.from(t.keys()).sort((e,t)=>"personal"===e?1:"personal"===t?-1:e.localeCompare(t)).map(e=>{let s,r,a="personal"===e?"Personal / Unassigned":(s=e.endsWith("-team")?e.slice(0,-5):e,l[e]||l[s]||((r=s.replace(/[-_]+/g," ").replace(/\s+/g," ").trim())?r.split(" ").map(e=>/^(ai|api|cli|ui|ux|sre|qa|devops)$/i.test(e)?e.toUpperCase():e.slice(0,1).toUpperCase()+e.slice(1)).join(" "):s));return{key:e,title:a,subtitle:"personal"===e?null:`workspace-${e}`,agents:(t.get(e)??[]).slice().sort((e,t)=>e.id.localeCompare(t.id)),isTeam:"personal"!==e}})},[e,o,l]);return(0,t.jsxs)("div",{className:"ck-glass w-full p-6 sm:p-8",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{className:"text-3xl font-semibold tracking-tight",children:["ClawKitchen"," ",(0,t.jsxs)("span",{className:"text-sm align-middle text-[color:var(--ck-text-secondary)]",children:["(",c,"-beta)"]})]}),(0,t.jsx)("p",{className:"mt-2 max-w-prose text-[color:var(--ck-text-secondary)]",children:"Installed agents on this machine, grouped by team workspace when available."})]}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-2 sm:items-end",children:[(0,t.jsx)(s.default,{href:"/recipes?createCustomTeam=1",className:"rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:var(--ck-bg-glass-strong)]",children:"Create team"}),(0,t.jsx)(s.default,{href:"/recipes",className:"text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:text-[color:var(--ck-text-primary)]",children:"Recipes"}),(0,t.jsx)(s.default,{href:"/tickets",className:"text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:text-[color:var(--ck-text-primary)]",children:"Tickets"}),(0,t.jsx)(s.default,{href:"/channels",className:"text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:text-[color:var(--ck-text-primary)]",children:"Channels / Bindings"}),(0,t.jsx)(s.default,{href:"/settings",className:"text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:text-[color:var(--ck-text-primary)]",children:"Settings"})]})]}),(0,t.jsx)("div",{className:"mt-8 space-y-8",children:i.map(e=>(0,t.jsxs)("section",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h2",{className:"truncate text-lg font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:e.title}),e.subtitle?(0,t.jsx)("div",{className:"mt-0.5 truncate text-xs text-[color:var(--ck-text-secondary)]",children:e.subtitle}):null]}),e.isTeam?(0,t.jsx)(s.default,{href:`/teams/${encodeURIComponent(e.key)}`,className:"rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:var(--ck-bg-glass-strong)]",children:"Edit"}):null]}),(0,t.jsx)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:e.agents.map(e=>(0,t.jsxs)(s.default,{href:`/agents/${encodeURIComponent(e.id)}`,className:"ck-glass block px-4 py-3 transition-colors hover:bg-[color:var(--ck-bg-glass-strong)]",children:[(0,t.jsx)("div",{className:"truncate font-medium text-[color:var(--ck-text-primary)]",children:e.identityName||e.id}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-secondary)]",children:[e.id,e.isDefault?" • default":""]}),e.model?(0,t.jsx)("div",{className:"mt-1 truncate text-xs text-[color:var(--ck-text-tertiary)]",children:e.model}):null]},e.id))})]},e.key))}),(0,t.jsxs)("p",{className:"mt-10 text-xs text-[color:var(--ck-text-tertiary)]",children:["Note: Team detection currently uses the convention ",(0,t.jsx)("code",{children:"~/.openclaw/workspace-<teamId>"}),"."]})]})}e.s(["default",()=>l])}]);
@@ -2,7 +2,7 @@
2
2
  "id": "kitchen",
3
3
  "name": "ClawKitchen",
4
4
  "description": "Local UI for managing OpenClaw recipes, teams, agents, cron jobs, and skills.",
5
- "version": "0.3.10",
5
+ "version": "0.3.12",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiggai/kitchen",
3
- "version": "0.3.10",
3
+ "version": "0.3.12",
4
4
  "private": false,
5
5
  "openclaw": {
6
6
  "extensions": [
@@ -1,3 +0,0 @@
1
- module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12057,(a,b,c)=>{b.exports=a.x("node:util",()=>require("node:util"))},69264,a=>{a.n(a.i(54832))},50645,a=>{a.n(a.i(27572))},17537,a=>{a.n(a.i(3363))},13718,a=>{a.n(a.i(85523))},18198,a=>{a.n(a.i(45518))},5365,(a,b,c)=>{b.exports=a.x("process",()=>require("process"))},874,(a,b,c)=>{b.exports=a.x("buffer",()=>require("buffer"))},790,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js <module evaluation>"))},84707,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js"))},97647,a=>{"use strict";a.i(790);var b=a.i(84707);a.n(b)},95936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return i},useLinkStatus:function(){return h.useLinkStatus}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(64240),g=a.r(7997),h=f._(a.r(97647));function i(a){let b=a.legacyBehavior,c="string"==typeof a.children||"number"==typeof a.children||"string"==typeof a.children?.type,d=a.children?.type?.$$typeof===Symbol.for("react.client.reference");return!b||c||d||(a.children?.type?.$$typeof===Symbol.for("react.lazy")?console.error("Using a Lazy Component as a direct child of `<Link legacyBehavior>` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's `<a>` tag."):console.error("Using a Server Component as a direct child of `<Link legacyBehavior>` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's `<a>` tag.")),(0,g.jsx)(h.default,{...a})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},83643,a=>{"use strict";var b=a.i(74533);let c=(0,a.i(12057).promisify)(b.execFile);function d(a){return"string"==typeof a.stdout?a.stdout:a.stdout&&"object"==typeof a.stdout&&"toString"in a.stdout?String(a.stdout.toString()):""}function e(a,b){return"string"==typeof a.stderr?a.stderr:a.stderr&&"object"==typeof a.stderr&&"toString"in a.stderr?String(a.stderr.toString()):"string"==typeof a.message?a.message:String(b)}async function f(a){try{let b=await c("openclaw",a,{timeout:12e4,windowsHide:!0,maxBuffer:0xa00000});return{ok:!0,exitCode:0,stdout:String(b.stdout??""),stderr:String(b.stderr??"")}}catch(b){let a="number"==typeof b.code?b.code:1;return{ok:!1,exitCode:a,stdout:d(b),stderr:e(b,b)}}}async function g(a){if("cron"===a[0])return f(a);let b=function(){let a=globalThis.__clawkitchen_api;if(!a)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return a}();try{let c=await b.runtime.system.runCommandWithTimeout(["openclaw",...a],{timeoutMs:12e4}),d=String(c.stdout??""),e=String(c.stderr??""),f="number"==typeof c.exitCode?c.exitCode:"number"==typeof c.code?c.code:"number"==typeof c.status?c.status:0;if(0!==f)return{ok:!1,exitCode:f,stdout:d,stderr:e};return{ok:!0,exitCode:0,stdout:d,stderr:e}}catch(b){let a="number"==typeof b.code?b.code:1;return{ok:!1,exitCode:a,stdout:d(b),stderr:e(b,b)}}}a.s(["runOpenClaw",()=>g],83643)},94510,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/recipes/[id]/RecipeEditor/index.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/recipes/[id]/RecipeEditor/index.tsx <module evaluation>","default")},87732,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/recipes/[id]/RecipeEditor/index.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/recipes/[id]/RecipeEditor/index.tsx","default")},62485,a=>{"use strict";a.i(94510);var b=a.i(87732);a.n(b)},79604,a=>{"use strict";var b=a.i(7997),c=a.i(95936),d=a.i(18558),e=a.i(15629),f=a.i(62485);async function g(a){let b=await (0,e.listRecipes)();return b.find(b=>b.id===a)?.kind??null}async function h({params:a}){(0,d.unstable_noStore)();let{id:e}=await a;return await g(e),(0,b.jsxs)("main",{className:"min-h-screen p-8",children:[(0,b.jsx)("div",{className:"mx-auto mb-4 max-w-6xl",children:(0,b.jsx)(c.default,{href:"/recipes",className:"text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:text-[color:var(--ck-text-primary)]",children:"← Back to recipes"})}),(0,b.jsx)(f.default,{recipeId:e})]})}a.s(["default",()=>h,"dynamic",0,"force-dynamic","revalidate",0,0])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__1d65fddf._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/next/dist/client/app-dir/link.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/client/app-dir/link.tsx","../../../../node_modules/next/src/client/app-dir/link.react-server.tsx","../../../../src/lib/kitchen-api.ts","../../../../src/lib/openclaw.ts","../../../../src/app/recipes/%5Bid%5D/RecipeEditor/index.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/recipes/%5Bid%5D/page.tsx"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/client/app-dir/link.js\"));\n","'use client'\n\nimport React, { createContext, useContext, useOptimistic, useRef } from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\nimport type { PENDING_LINK_STATUS } from '../components/links'\nimport {\n IDLE_LINK_STATUS,\n mountLinkInstance,\n onNavigationIntent,\n unmountLinkForCurrentNavigation,\n unmountPrefetchableInstance,\n type LinkInstance,\n} from '../components/links'\nimport { isLocalURL } from '../../shared/lib/router/utils/is-local-url'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n} from '../components/segment-cache/types'\nimport { errorOnce } from '../../shared/lib/utils/error-once'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * **Required**. The path or URL to navigate to. It can also be an object (similar to `URL`).\n *\n * @example\n * ```tsx\n * // Navigate to /dashboard:\n * <Link href=\"/dashboard\">Dashboard</Link>\n *\n * // Navigate to /about?name=test:\n * <Link href={{ pathname: '/about', query: { name: 'test' } }}>\n * About\n * </Link>\n * ```\n *\n * @remarks\n * - For external URLs, use a fully qualified URL such as `https://...`.\n * - In the App Router, dynamic routes must not include bracketed segments in `href`.\n */\n href: Url\n\n /**\n * @deprecated v10.0.0: `href` props pointing to a dynamic route are\n * automatically resolved and no longer require the `as` prop.\n */\n as?: Url\n\n /**\n * Replace the current `history` state instead of adding a new URL into the stack.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" replace>\n * About (replaces the history state)\n * </Link>\n * ```\n */\n replace?: boolean\n\n /**\n * Whether to override the default scroll behavior. If `true`, Next.js attempts to maintain\n * the scroll position if the newly navigated page is still visible. If not, it scrolls to the top.\n *\n * If `false`, Next.js will not modify the scroll behavior at all.\n *\n * @defaultValue `true`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" scroll={false}>\n * No auto scroll\n * </Link>\n * ```\n */\n scroll?: boolean\n\n /**\n * Update the path of the current page without rerunning data fetching methods\n * like `getStaticProps`, `getServerSideProps`, or `getInitialProps`.\n *\n * @remarks\n * `shallow` only applies to the Pages Router. For the App Router, see the\n * [following documentation](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#using-the-native-history-api).\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/blog\" shallow>\n * Shallow navigation\n * </Link>\n * ```\n */\n shallow?: boolean\n\n /**\n * Forces `Link` to pass its `href` to the child component. Useful if the child is a custom\n * component that wraps an `<a>` tag, or if you're using certain styling libraries.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" passHref legacyBehavior>\n * <MyStyledAnchor>Dashboard</MyStyledAnchor>\n * </Link>\n * ```\n */\n passHref?: boolean\n\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`.\n *\n * @remarks\n * Prefetching is only enabled in production.\n *\n * - In the **App Router**:\n * - `\"auto\"`, `null`, `undefined` (default): Prefetch behavior depends on static vs dynamic routes:\n * - Static routes: fully prefetched\n * - Dynamic routes: partial prefetch to the nearest segment with a `loading.js`\n * - `true`: Always prefetch the full route and data.\n * - `false`: Disable prefetching on both viewport and hover.\n * - In the **Pages Router**:\n * - `true` (default): Prefetches the route and data in the background on viewport or hover.\n * - `false`: Prefetch only on hover, not on viewport.\n *\n * @defaultValue `true` (Pages Router) or `null` (App Router)\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" prefetch={false}>\n * Dashboard\n * </Link>\n * ```\n */\n prefetch?: boolean | 'auto' | null\n\n /**\n * (unstable) Switch to a full prefetch on hover. Effectively the same as\n * updating the prefetch prop to `true` in a mouse event.\n */\n unstable_dynamicOnHover?: boolean\n\n /**\n * The active locale is automatically prepended in the Pages Router. `locale` allows for providing\n * a different locale, or can be set to `false` to opt out of automatic locale behavior.\n *\n * @remarks\n * Note: locale only applies in the Pages Router and is ignored in the App Router.\n *\n * @example\n * ```tsx\n * // Use the 'fr' locale:\n * <Link href=\"/about\" locale=\"fr\">\n * About (French)\n * </Link>\n *\n * // Disable locale prefix:\n * <Link href=\"/about\" locale={false}>\n * About (no locale prefix)\n * </Link>\n * ```\n */\n locale?: string | false\n\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n\n /**\n * Optional event handler for when the mouse pointer is moved onto the `<Link>`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<Omit<InternalLinkProps, 'locale'>>\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n href: string,\n as: string,\n linkInstanceRef: React.RefObject<LinkInstance | null>,\n replace?: boolean,\n scroll?: boolean,\n onNavigate?: OnNavigateEventHandler\n): void {\n if (typeof window !== 'undefined') {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n const { dispatchNavigateAction } =\n require('../components/app-router-instance') as typeof import('../components/app-router-instance')\n\n React.startTransition(() => {\n dispatchNavigateAction(\n as || href,\n replace ? 'replace' : 'push',\n scroll ?? true,\n linkInstanceRef.current\n )\n })\n }\n}\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide\n * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation. This is the primary way to navigate between routes in Next.js.\n *\n * @remarks\n * - Prefetching is only enabled in production.\n *\n * @see https://nextjs.org/docs/app/api-reference/components/link\n */\nexport default function LinkComponent(\n props: LinkProps & {\n children: React.ReactNode\n ref: React.Ref<HTMLAnchorElement>\n }\n) {\n const [linkStatus, setOptimisticLinkStatus] = useOptimistic(IDLE_LINK_STATUS)\n\n let children: React.ReactNode\n\n const linkInstanceRef = useRef<LinkInstance | null>(null)\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n onNavigate,\n ref: forwardedRef,\n unstable_dynamicOnHover,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n const fetchStrategy =\n prefetchProp !== false\n ? getFetchStrategyFromPrefetchProp(prefetchProp)\n : // TODO: it makes no sense to assign a fetchStrategy when prefetching is disabled.\n FetchStrategy.PPR\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n unstable_dynamicOnHover: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior' ||\n key === 'unstable_dynamicOnHover'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof hrefProp === 'string') {\n href = hrefProp\n } else if (\n typeof hrefProp === 'object' &&\n typeof hrefProp.pathname === 'string'\n ) {\n href = hrefProp.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in <Link> while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n const { href, as } = React.useMemo(() => {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }, [hrefProp, asProp])\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if ((children as any)?.$$typeof === Symbol.for('react.lazy')) {\n throw new Error(\n `\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n // Use a callback ref to attach an IntersectionObserver to the anchor tag on\n // mount. In the future we will also use this to keep track of all the\n // currently mounted <Link> instances, e.g. so we can re-prefetch them after\n // a revalidation or refresh.\n const observeLinkVisibilityOnMount = React.useCallback(\n (element: HTMLAnchorElement | SVGAElement) => {\n if (router !== null) {\n linkInstanceRef.current = mountLinkInstance(\n element,\n href,\n router,\n fetchStrategy,\n prefetchEnabled,\n setOptimisticLinkStatus\n )\n }\n\n return () => {\n if (linkInstanceRef.current) {\n unmountLinkForCurrentNavigation(linkInstanceRef.current)\n linkInstanceRef.current = null\n }\n unmountPrefetchableInstance(element)\n }\n },\n [prefetchEnabled, href, router, fetchStrategy, setOptimisticLinkStatus]\n )\n\n const mergedRef = useMergedRef(observeLinkVisibilityOnMount, childRef)\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: mergedRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n if (e.defaultPrevented) {\n return\n }\n linkClicked(e, href, as, linkInstanceRef, replace, scroll, onNavigate)\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled) {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the basePath.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n childProps.href = addBasePath(as)\n }\n\n let link: React.ReactNode\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n link = React.cloneElement(child, childProps)\n } else {\n link = (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n\n return (\n <LinkStatusContext.Provider value={linkStatus}>\n {link}\n </LinkStatusContext.Provider>\n )\n}\n\nconst LinkStatusContext = createContext<\n typeof PENDING_LINK_STATUS | typeof IDLE_LINK_STATUS\n>(IDLE_LINK_STATUS)\n\nexport const useLinkStatus = () => {\n return useContext(LinkStatusContext)\n}\n\nfunction getFetchStrategyFromPrefetchProp(\n prefetchProp: Exclude<LinkProps['prefetch'], undefined | false>\n): PrefetchTaskFetchStrategy {\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n if (prefetchProp === true) {\n return FetchStrategy.Full\n }\n\n // `null` or `\"auto\"`: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport.\n // This will also include invalid prop values that don't match the types specified here.\n // (although those should've been filtered out by prop validation in dev)\n prefetchProp satisfies null | 'auto'\n return FetchStrategy.PPR\n } else {\n return prefetchProp === null || prefetchProp === 'auto'\n ? // We default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n FetchStrategy.PPR\n : // In the old implementation without runtime prefetches, `prefetch={true}` forces all dynamic data to be prefetched.\n // To preserve backwards-compatibility, anything other than `false`, `null`, or `\"auto\"` results in a full prefetch.\n // (although invalid values should've been filtered out by prop validation in dev)\n FetchStrategy.Full\n }\n}\n","import type { ComponentProps } from 'react'\nimport ClientLinkComponent, { type LinkProps, useLinkStatus } from './link'\n\nexport default function LinkComponent(\n props: ComponentProps<typeof ClientLinkComponent>\n) {\n const isLegacyBehavior = props.legacyBehavior\n const childIsHostComponent =\n typeof props.children === 'string' ||\n typeof props.children === 'number' ||\n typeof (props.children as any)?.type === 'string'\n const childIsClientComponent =\n (props.children as any)?.type?.$$typeof ===\n Symbol.for('react.client.reference')\n\n if (isLegacyBehavior && !childIsHostComponent && !childIsClientComponent) {\n if ((props.children as any)?.type?.$$typeof === Symbol.for('react.lazy')) {\n console.error(\n `Using a Lazy Component as a direct child of \\`<Link legacyBehavior>\\` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n } else {\n console.error(\n `Using a Server Component as a direct child of \\`<Link legacyBehavior>\\` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n }\n\n return <ClientLinkComponent {...props} />\n}\n\nexport { type LinkProps, useLinkStatus }\n","// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { getKitchenApi } from \"@/lib/kitchen-api\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst execFileAsync = promisify(execFile);\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nfunction extractStdout(err: { stdout?: unknown }): string {\n if (typeof err.stdout === \"string\") return err.stdout;\n if (err.stdout && typeof err.stdout === \"object\" && \"toString\" in err.stdout) {\n return String((err.stdout as { toString: () => string }).toString());\n }\n return \"\";\n}\n\nfunction resolveExitCode(res: { exitCode?: unknown; code?: unknown; status?: unknown }): number {\n if (typeof res.exitCode === \"number\") return res.exitCode;\n if (typeof res.code === \"number\") return res.code;\n if (typeof res.status === \"number\") return res.status;\n return 0;\n}\n\nfunction extractStderr(err: { stderr?: unknown; message?: unknown }, fallback: unknown): string {\n if (typeof err.stderr === \"string\") return err.stderr;\n if (err.stderr && typeof err.stderr === \"object\" && \"toString\" in err.stderr) {\n return String((err.stderr as { toString: () => string }).toString());\n }\n if (typeof err.message === \"string\") return err.message;\n return String(fallback);\n}\n\nasync function runOpenClawLocal(args: string[]): Promise<OpenClawExecResult> {\n try {\n const res = await execFileAsync(\"openclaw\", args, {\n timeout: 120000,\n windowsHide: true,\n maxBuffer: 10 * 1024 * 1024,\n });\n\n return {\n ok: true,\n exitCode: 0,\n stdout: String(res.stdout ?? \"\"),\n stderr: String(res.stderr ?? \"\"),\n };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // In some Kitchen runtime contexts, `api.runtime.system.runCommandWithTimeout`\n // is executed with a restricted allowlist that does not include the `cron` tool,\n // causing `openclaw cron ...` to fail with \"Tool not available: cron\".\n //\n // Cron routes need to work in the gateway-run Kitchen environment, so for cron\n // specifically we prefer a local exec (host OpenClaw).\n if (args[0] === \"cron\") return runOpenClawLocal(args);\n\n const api = getKitchenApi();\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = String(res.stdout ?? \"\");\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/src/app/recipes/[id]/RecipeEditor/index.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/recipes/[id]/RecipeEditor/index.tsx\",\n \"default\",\n);\n","import Link from \"next/link\";\nimport { unstable_noStore as noStore } from \"next/cache\";\n\nimport { listRecipes } from \"@/lib/recipes\";\nimport RecipeEditor from \"./RecipeEditor\";\n\nexport const dynamic = \"force-dynamic\";\nexport const revalidate = 0;\n\nasync function getKind(id: string): Promise<\"agent\" | \"team\" | null> {\n const recipes = await listRecipes();\n return recipes.find((r) => r.id === id)?.kind ?? null;\n}\n\nexport default async function RecipePage({ params }: { params: Promise<{ id: string }> }) {\n noStore();\n\n const { id } = await params;\n await getKind(id); // Resolved for future redirect logic; kept for cache consistency\n\n // NOTE: We do NOT redirect team recipes to /teams/<id>.\n // /recipes/<id> is the recipe editor/preview surface; /teams/<id> is the installed team editor.\n\n return (\n <main className=\"min-h-screen p-8\">\n <div className=\"mx-auto mb-4 max-w-6xl\">\n <Link\n href=\"/recipes\"\n className=\"text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:text-[color:var(--ck-text-primary)]\"\n >\n ← Back to recipes\n </Link>\n </div>\n <RecipeEditor recipeId={id} />\n </main>\n );\n}\n"],"names":["LinkComponent","useLinkStatus","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","href","as","linkInstanceRef","replace","scroll","onNavigate","window","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","isLocalURL","preventDefault","location","isDefaultPrevented","dispatchNavigateAction","require","React","startTransition","current","formatStringOrUrl","urlObjOrString","formatUrl","props","linkStatus","setOptimisticLinkStatus","useOptimistic","IDLE_LINK_STATUS","children","useRef","hrefProp","asProp","childrenProp","prefetch","prefetchProp","passHref","shallow","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","ref","forwardedRef","unstable_dynamicOnHover","restProps","a","router","useContext","AppRouterContext","prefetchEnabled","fetchStrategy","getFetchStrategyFromPrefetchProp","FetchStrategy","PPR","process","env","NODE_ENV","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","locale","warnOnce","pathname","hasDynamicSegment","split","some","segment","startsWith","endsWith","useMemo","resolvedHref","child","$$typeof","Symbol","for","console","warn","Children","only","err","type","childRef","observeLinkVisibilityOnMount","useCallback","element","mountLinkInstance","unmountLinkForCurrentNavigation","unmountPrefetchableInstance","mergedRef","useMergedRef","childProps","defaultPrevented","upgradeToDynamicPrefetch","onNavigationIntent","__NEXT_LINK_NO_TOUCH_START","undefined","isAbsoluteUrl","addBasePath","link","errorOnce","cloneElement","LinkStatusContext","Provider","value","createContext","__NEXT_CACHE_COMPONENTS","Full","isLegacyBehavior","childIsHostComponent","childIsClientComponent","error","ClientLinkComponent"],"mappings":"6yBACA,GAAM,yBAAE,CAAuB,CAAE,CAAA,EAAA,CAAA,CAAA,OAEjC,EAAsB,CA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,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAY,CAAA,CAAC,SAAU,MAG9B,kCA9BuB,+BACG","ignoreList":[0,2,5]}
@@ -1,3 +0,0 @@
1
- module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},69264,a=>{a.n(a.i(54832))},50645,a=>{a.n(a.i(27572))},17537,a=>{a.n(a.i(3363))},13718,a=>{a.n(a.i(85523))},18198,a=>{a.n(a.i(45518))},37941,a=>{"use strict";var b=a.i(12714),c=a.i(60526),d=a.i(50227);function e(a){return a.includes("/")||a.includes("\\")}function f(a,b="development-team"){let g=e(b)?b:function(a){if(!/^[a-z0-9][a-z0-9-]{1,63}$/.test(a))throw Error(`Invalid teamId "${a}"`);return d.default.join(c.default.homedir(),".openclaw",`workspace-${a}`)}(b);return d.default.join(g,{backlog:"work/backlog","in-progress":"work/in-progress",testing:"work/testing",done:"work/done"}[a])}async function g(a="development-team"){let c,h=e(a)?(c=d.default.basename(a)).startsWith("workspace-")?c.slice(10):c:a,i=[];for(let c of["backlog","in-progress","testing","done"]){let e=[];try{e=await b.default.readdir(f(c,a))}catch{e=[]}for(let g of e){if(!g.endsWith(".md"))continue;let e=function(a){let b=a.match(/^(\d{4})-/);return b?Number(b[1]):null}(g);if(null==e)continue;let j=d.default.join(f(c,a),g),[k,l]=await Promise.all([b.default.readFile(j,"utf8"),b.default.stat(j)]),m=function(a){let b=a.split("\n")[0]??"",c=b.startsWith("# ")?b.slice(2).trim():"",d=c.indexOf(" ");if(d>0){let a=c.slice(d+1).trim();if(a)return a}let e=c.replace(/^\d{4}-/,"").replace(/[-_]+/g," ").replace(/\s+/g," ").trim(),f=new Set(["api","cli","ui","ux","gpu","cpu","npm","pr","ci","cd","json","yaml","md"]),g=e?e.split(" ").filter(Boolean).map(a=>{let b=a.toLowerCase();return f.has(b)?a.toUpperCase():b.startsWith("v")&&/^\d/.test(b.slice(1))||/^[\d.]+$/.test(a)?a:a.slice(0,1).toUpperCase()+a.slice(1)}).join(" "):"";return g||c||"(untitled)"}(k),n=function(a,b){let c=RegExp(`^${b}:\\s*(.*)$`,"mi"),d=a.match(c);return d?.[1]?.trim()||null}(k,"Owner"),o=l.mtime.toISOString(),p=(Date.now()-l.mtimeMs)/36e5;i.push({teamId:h,number:e,id:g.replace(/\.md$/,""),title:m,owner:n,stage:c,file:j,updatedAt:o,ageHours:p})}}return i.sort((a,b)=>a.number-b.number),i}async function h(a,b="development-team"){let c=await g(b),d=a.trim(),e=d.match(/^\d+$/)?c.find(a=>a.number===Number(d)):null;return c.find(a=>a.id===d)??e??null}async function i(a,c){let d=await h(c,a);return d?{teamId:d.teamId,id:d.id,file:d.file,markdown:await b.default.readFile(d.file,"utf8"),owner:d.owner,stage:d.stage}:null}a.s(["getTicketMarkdown",()=>i,"listTickets",()=>g])},55468,a=>{"use strict";a.s(["TicketsBoardClient",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call TicketsBoardClient() from the server but TicketsBoardClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/tickets/TicketsBoardClient.tsx <module evaluation>","TicketsBoardClient")},46566,a=>{"use strict";a.s(["TicketsBoardClient",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call TicketsBoardClient() from the server but TicketsBoardClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/tickets/TicketsBoardClient.tsx","TicketsBoardClient")},26306,a=>{"use strict";a.i(55468);var b=a.i(46566);a.n(b)},119,a=>{"use strict";var b=a.i(7997),c=a.i(26306),d=a.i(37941);async function e({params:a}){let{teamId:e}=await a,f=await (0,d.listTickets)(e);return(0,b.jsx)(c.TicketsBoardClient,{tickets:f,basePath:`/teams/${encodeURIComponent(e)}/tickets`,selectedTeamId:e})}a.s(["default",()=>e,"dynamic",0,"force-dynamic"])}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__28f5d174._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/lib/tickets.ts","../../../../src/app/tickets/TicketsBoardClient.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/teams/%5BteamId%5D/tickets/page.tsx"],"sourcesContent":["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 teamId: string;\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 helper for older non-team-scoped code paths.\n * Prefer passing explicit teamId into APIs instead.\n */\nexport function getTeamWorkspaceDir(teamId?: string): string {\n if (teamId) return teamWorkspace(teamId);\n return process.env.CK_TEAM_WORKSPACE_DIR ?? teamWorkspace(process.env.CK_TEAM_ID ?? \"development-team\");\n}\n\nexport function stageDir(stage: TicketStage, teamIdOrDir: 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(teamIdOrDir) ? teamIdOrDir : teamWorkspace(teamIdOrDir);\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\nfunction teamIdFromTeamDir(teamDir: string): string {\n const base = path.basename(teamDir);\n if (base.startsWith(\"workspace-\")) return base.slice(\"workspace-\".length);\n return base;\n}\n\nexport async function discoverTeamIds(): Promise<string[]> {\n // Convention: ~/.openclaw/workspace-<teamId>\n const root = path.join(os.homedir(), \".openclaw\");\n let entries: string[] = [];\n try {\n entries = await fs.readdir(root);\n } catch {\n return [];\n }\n\n return entries\n .filter((e) => e.startsWith(\"workspace-\"))\n .map((e) => e.slice(\"workspace-\".length))\n .filter((id) => Boolean(id) && id !== \"workspace\")\n .sort();\n}\n\n/**\n * List tickets for a specific team (recommended).\n * - listTickets(\"development-team\")\n * - listTickets(teamWorkspaceDir)\n */\nexport async function listTickets(teamIdOrDir: string = \"development-team\"): Promise<TicketSummary[]> {\n const teamId = isPathLike(teamIdOrDir) ? teamIdFromTeamDir(teamIdOrDir) : teamIdOrDir;\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 teamId,\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 * List tickets across all discovered teams (used for /tickets?team=all).\n */\nexport async function listAllTeamsTickets(): Promise<TicketSummary[]> {\n const teamIds = await discoverTeamIds();\n const all: TicketSummary[] = [];\n\n for (const teamId of teamIds) {\n all.push(...(await listTickets(teamId)));\n }\n\n all.sort((a, b) => (a.teamId === b.teamId ? a.number - b.number : a.teamId.localeCompare(b.teamId)));\n return all;\n}\n\n/**\n * Back-compat helper used by some API routes.\n */\nexport async function getTicketByIdOrNumber(ticketIdOrNumber: string, teamIdOrDir: string = \"development-team\") {\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)\n */\nexport async function getTicketMarkdown(\n teamId: string,\n ticketIdOrNumber: string,\n): Promise<{ teamId: string; id: string; file: string; markdown: string; owner: string | null; stage: TicketStage } | null> {\n const hit = await getTicketByIdOrNumber(ticketIdOrNumber, teamId);\n if (!hit) return null;\n\n return {\n teamId: hit.teamId,\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","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const TicketsBoardClient = registerClientReference(\n function() { throw new Error(\"Attempted to call TicketsBoardClient() from the server but TicketsBoardClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/tickets/TicketsBoardClient.tsx\",\n \"TicketsBoardClient\",\n);\n","import { TicketsBoardClient } from \"@/app/tickets/TicketsBoardClient\";\nimport { listTickets } from \"@/lib/tickets\";\n\nexport const dynamic = \"force-dynamic\";\n\nexport default async function TeamTicketsPage({\n params,\n}: {\n params: Promise<{ teamId: string }>;\n}) {\n const { teamId } = await params;\n const tickets = await listTickets(teamId);\n\n return (\n <TicketsBoardClient\n tickets={tickets}\n basePath={`/teams/${encodeURIComponent(teamId)}/tickets`}\n selectedTeamId={teamId}\n />\n );\n}\n"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,EAAI,KAAK,CAChB,MAAO,EAAI,KAAK,AAClB,EATiB,IAUnB,gHCjOO,IAAM,EAAqB,CAAA,EAAA,AADlC,EAAA,CAAA,CAAA,OACkC,uBAAA,AAAuB,EACrD,WAAa,MAAM,AAAI,MAAM,kPAAoP,EACjR,uEACA,gFAHG,IAAM,EAAqB,CAAA,EADlC,AACkC,EADlC,CAAA,CAAA,OACkC,uBAAA,AAAuB,EACrD,WAAa,MAAM,AAAI,MAAM,kPAAoP,EACjR,mDACA,uHCLJ,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAIe,eAAe,EAAgB,QAC5C,CAAM,CAGP,EACC,GAAM,QAAE,CAAM,CAAE,CAAG,MAAM,EACnB,EAAU,MAAM,CAAA,EAAA,EAAA,WAAA,AAAW,EAAC,GAElC,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,kBAAkB,CAAA,CACjB,QAAS,EACT,SAAU,CAAC,OAAO,EAAE,mBAAmB,GAAQ,QAAQ,CAAC,CACxD,eAAgB,GAGtB,kCAjBuB","ignoreList":[1]}
@@ -1,3 +0,0 @@
1
- module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12057,(a,b,c)=>{b.exports=a.x("node:util",()=>require("node:util"))},69264,a=>{a.n(a.i(54832))},50645,a=>{a.n(a.i(27572))},17537,a=>{a.n(a.i(3363))},13718,a=>{a.n(a.i(85523))},18198,a=>{a.n(a.i(45518))},5365,(a,b,c)=>{b.exports=a.x("process",()=>require("process"))},874,(a,b,c)=>{b.exports=a.x("buffer",()=>require("buffer"))},790,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js <module evaluation>"))},84707,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js"))},97647,a=>{"use strict";a.i(790);var b=a.i(84707);a.n(b)},95936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return i},useLinkStatus:function(){return h.useLinkStatus}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(64240),g=a.r(7997),h=f._(a.r(97647));function i(a){let b=a.legacyBehavior,c="string"==typeof a.children||"number"==typeof a.children||"string"==typeof a.children?.type,d=a.children?.type?.$$typeof===Symbol.for("react.client.reference");return!b||c||d||(a.children?.type?.$$typeof===Symbol.for("react.lazy")?console.error("Using a Lazy Component as a direct child of `<Link legacyBehavior>` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's `<a>` tag."):console.error("Using a Server Component as a direct child of `<Link legacyBehavior>` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's `<a>` tag.")),(0,g.jsx)(h.default,{...a})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},83643,a=>{"use strict";var b=a.i(74533);let c=(0,a.i(12057).promisify)(b.execFile);function d(a){return"string"==typeof a.stdout?a.stdout:a.stdout&&"object"==typeof a.stdout&&"toString"in a.stdout?String(a.stdout.toString()):""}function e(a,b){return"string"==typeof a.stderr?a.stderr:a.stderr&&"object"==typeof a.stderr&&"toString"in a.stderr?String(a.stderr.toString()):"string"==typeof a.message?a.message:String(b)}async function f(a){try{let b=await c("openclaw",a,{timeout:12e4,windowsHide:!0,maxBuffer:0xa00000});return{ok:!0,exitCode:0,stdout:String(b.stdout??""),stderr:String(b.stderr??"")}}catch(b){let a="number"==typeof b.code?b.code:1;return{ok:!1,exitCode:a,stdout:d(b),stderr:e(b,b)}}}async function g(a){if("cron"===a[0])return f(a);let b=function(){let a=globalThis.__clawkitchen_api;if(!a)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return a}();try{let c=await b.runtime.system.runCommandWithTimeout(["openclaw",...a],{timeoutMs:12e4}),d=String(c.stdout??""),e=String(c.stderr??""),f="number"==typeof c.exitCode?c.exitCode:"number"==typeof c.code?c.code:"number"==typeof c.status?c.status:0;if(0!==f)return{ok:!1,exitCode:f,stdout:d,stderr:e};return{ok:!0,exitCode:0,stdout:d,stderr:e}}catch(b){let a="number"==typeof b.code?b.code:1;return{ok:!1,exitCode:a,stdout:d(b),stderr:e(b,b)}}}a.s(["runOpenClaw",()=>g],83643)},30095,88241,a=>{"use strict";var b=a.i(12714),c=a.i(50227),d=a.i(28215);let e=c.default.join("shared-context","workflows");function f(a){let b=String(a??"").trim();if(!b)throw Error("workflow id is required");if(!/^[a-z0-9][a-z0-9-]{0,62}$/.test(b))throw Error("Invalid workflow id. Use lowercase letters, numbers, and dashes (max 63 chars), e.g. marketing-cadence-v1");return b}async function g(a){let b=await (0,d.getTeamWorkspaceDir)(a);return c.default.join(b,e)}async function h(a,d){let e=f(d),h=await g(a),i=c.default.join(h,`${e}.workflow.json`),j=JSON.parse(await b.default.readFile(i,"utf8"));return{ok:!0,path:i,workflow:j}}a.s(["assertSafeWorkflowId",()=>f,"readWorkflow",()=>h],88241);let i=c.default.join("shared-context","workflow-runs");async function j(a,b){f(b);let e=await (0,d.getTeamWorkspaceDir)(a);return c.default.join(e,i)}function k(a){return`${a}.run.json`}async function l(a,d,e){let g=f(d),h=function(a){let b=String(a??"").trim();if(!b)throw Error("run id is required");if(!/^[A-Za-z0-9][A-Za-z0-9-]{0,120}$/.test(b))throw Error("Invalid run id. Use letters, numbers, and dashes.");return b}(e),i=await j(a,g),l=c.default.join(i,h,"run.json");try{let d=await b.default.readFile(l,"utf8"),e=JSON.parse(d),f=n(a,g,e,h);if(Array.isArray(f.nodes)&&f.nodes.length){let a=c.default.join(i,h,"node-outputs"),d=[];try{d=await b.default.readdir(a)}catch{d=[]}let e=new Map;for(let b of d.slice().sort()){let d=b.match(/-([^/]+)\.json$/);if(!d)continue;let f=d[1];if(!f)continue;let g=e.get(f)??[];g.push(c.default.join(a,b)),e.set(f,g)}await Promise.all(f.nodes.map(async a=>{if(!a||"object"!=typeof a||void 0!==a.output)return;let c=e.get(a.nodeId);if(!c||!c.length)return;let d=c.shift();if(d)try{let c=await b.default.readFile(d,"utf8");a.output=JSON.parse(c)}catch{}}))}return{ok:!0,path:l,run:f}}catch(a){if(!(a&&"object"==typeof a&&"ENOENT"===a.code))throw a}let m=c.default.join(i,k(h));try{let c=await b.default.readFile(m,"utf8"),d=JSON.parse(c);return{ok:!0,path:m,run:n(a,g,d,h)}}catch(d){if(d&&"object"==typeof d&&"ENOENT"===d.code){let d=c.default.join(i,g,k(h)),e=JSON.parse(await b.default.readFile(d,"utf8"));return{ok:!0,path:d,run:n(a,g,e,h)}}throw d}}async function m(a){let e=await (0,d.getTeamWorkspaceDir)(a),f=c.default.join(e,i),g=[];try{for(let d of(await b.default.readdir(f,{withFileTypes:!0})).filter(a=>a.isDirectory()).map(a=>a.name).sort()){let e=c.default.join(f,d,"run.json");try{let[c,f]=await Promise.all([b.default.readFile(e,"utf8"),b.default.stat(e)]),h=n(a,"(unknown)",JSON.parse(c),d);g.push({workflowId:h.workflowId,runId:h.id,status:h.status,startedAt:h.startedAt,endedAt:h.endedAt,updatedAt:f.mtime?new Date(f.mtime).toISOString():void 0,path:e})}catch{}}}catch(a){if(!(a&&"object"==typeof a&&"ENOENT"===a.code))throw a}try{for(let d of(await b.default.readdir(f)).filter(a=>a.endsWith(".run.json")).sort()){let e=d.replace(/\.run\.json$/i,""),h=c.default.join(f,d);try{let[c,d]=await Promise.all([b.default.readFile(h,"utf8"),b.default.stat(h)]),f=n(a,"(unknown)",JSON.parse(c),e);g.push({workflowId:f.workflowId,runId:f.id,status:f.status,startedAt:f.startedAt,endedAt:f.endedAt,updatedAt:d.mtime?new Date(d.mtime).toISOString():void 0,path:h})}catch{g.push({workflowId:"(unknown)",runId:e,path:h})}}}catch(a){if(!(a&&"object"==typeof a&&"ENOENT"===a.code))throw a}try{for(let a of(await b.default.readdir(f,{withFileTypes:!0})).filter(a=>a.isDirectory()).map(a=>a.name).sort()){let d=c.default.join(f,a),e=[];try{e=(await b.default.readdir(d)).filter(a=>a.endsWith(".run.json")).sort()}catch(a){if(a&&"object"==typeof a&&"ENOENT"===a.code)continue;throw a}for(let f of e){let e=f.replace(/\.run\.json$/i,""),h=c.default.join(d,f);try{let[c,d]=await Promise.all([b.default.readFile(h,"utf8"),b.default.stat(h)]),f=JSON.parse(c);g.push({workflowId:a,runId:e,status:f.status,startedAt:"string"==typeof f.startedAt?f.startedAt:void 0,endedAt:"string"==typeof f.endedAt?f.endedAt:void 0,updatedAt:d.mtime?new Date(d.mtime).toISOString():void 0,path:h})}catch{g.push({workflowId:a,runId:e,path:h})}}}}catch(a){if(!(a&&"object"==typeof a&&"ENOENT"===a.code))throw a}let h=new Map;for(let a of g){let b=`${a.workflowId}:${a.runId}`,d=h.get(b);if(!d){h.set(b,a);continue}let e=a=>{let b=0;return a.status&&(b+=2),a.startedAt&&(b+=1),a.endedAt&&(b+=1),a.updatedAt&&(b+=1),a.path.endsWith(`${c.default.sep}run.json`)&&(b+=2),b};e(a)>=e(d)&&h.set(b,a)}let j=Array.from(h.values());return j.sort((a,b)=>String(b.updatedAt??b.startedAt??"").localeCompare(String(a.updatedAt??a.startedAt??""))),{ok:!0,dir:f,runs:j}}function n(a,b,d,e){if(d&&"object"==typeof d&&"clawkitchen.workflow-run.v1"===d.schema)return d;if(d&&"object"==typeof d&&"runId"in d&&"workflow"in d){let f=d.workflow&&"object"==typeof d.workflow?d.workflow:{},g="string"==typeof f.file?f.file:"",h=g?c.default.basename(g).replace(/\.workflow\.json$/i,""):"",i="string"==typeof f.id&&f.id?f.id:h||b,j=String(d.status??""),k="awaiting_approval"===j?"waiting_for_approval":"completed"===j?"success":"rejected"===j||"error"===j?"error":"canceled"===j?"canceled":"running",l=Array.isArray(d.nodeResults)?d.nodeResults.map(a=>{if(!a||"object"!=typeof a)return null;let b="string"==typeof a.nodeId?a.nodeId:"";if(!b)return null;let c=String(a.status??"pending"),d="awaiting_approval"===c?"waiting":"completed"===c?"success":"error"===c?"error":c,e=["pending","running","waiting","success","error","skipped"].includes(d)?d:"pending",f="string"==typeof a.error?a.error:a.error&&"object"==typeof a.error&&"message"in a.error?{message:String(a.error.message??"")}:void 0,g="string"==typeof a.startedAt?a.startedAt:void 0,h="string"==typeof a.endedAt?a.endedAt:void 0;return{nodeId:b,status:e,...g?{startedAt:g}:{},...h?{endedAt:h}:{},...void 0!==a.output?{output:a.output}:{},...void 0!==f?{error:f}:{}}}).filter(a=>null!==a):void 0;return{schema:"clawkitchen.workflow-run.v1",id:"string"==typeof d.runId?d.runId:e,workflowId:i,teamId:a,startedAt:"string"==typeof d.createdAt?d.createdAt:new Date().toISOString(),endedAt:("success"===k||"error"===k||"canceled"===k)&&"string"==typeof d.updatedAt?d.updatedAt:void 0,status:k,summary:"Executed by workflow runner",nodes:l}}return{schema:"clawkitchen.workflow-run.v1",id:e,workflowId:b,teamId:a,startedAt:new Date().toISOString(),status:"error",summary:"Malformed run file"}}a.s(["listAllWorkflowRuns",()=>m,"readWorkflowRun",()=>l],30095)},74176,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/teams/[teamId]/runs/runs-client.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/teams/[teamId]/runs/runs-client.tsx <module evaluation>","default")},86488,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/teams/[teamId]/runs/runs-client.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/teams/[teamId]/runs/runs-client.tsx","default")},4587,a=>{"use strict";a.i(74176);var b=a.i(86488);a.n(b)},52211,a=>{"use strict";var b=a.i(7997),c=a.i(95936),d=a.i(18558),e=a.i(4587),f=a.i(15629),g=a.i(30095),h=a.i(88241);async function i({searchParams:i}){(0,d.unstable_noStore)();let j=await i,k=String((Array.isArray(j.team)?j.team[0]:j.team)??"").trim();if(!k){let{listLocalTeamIds:c}=await a.A(40614),d=(await a.A(10972)).default,e=await c(),h=(await Promise.all(e.map(async a=>{let b=await (0,f.getTeamDisplayName)(a),{runs:c}=await (0,g.listAllWorkflowRuns)(a);return c.map(c=>({teamId:a,teamName:b,workflowId:c.workflowId,runId:c.runId,status:c.status,startedAt:c.startedAt,endedAt:c.endedAt,updatedAt:c.updatedAt}))}))).flat().sort((a,b)=>String(b.updatedAt||b.endedAt||b.startedAt||"").localeCompare(String(a.updatedAt||a.endedAt||a.startedAt||"")));return(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Runs"}),(0,b.jsx)("div",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:"Showing workflow runs across all local teams. Use the team dropdown to filter."})]}),(0,b.jsx)(d,{rows:h})]})}let l=await (0,f.getTeamDisplayName)(k),{runs:m}=await (0,g.listAllWorkflowRuns)(k),n=Array.from(new Set(m.map(a=>a.workflowId).filter(Boolean))).sort(),o={};return await Promise.all(n.map(async a=>{try{let{workflow:b}=await (0,h.readWorkflow)(k,a);o[a]={id:b.id,name:b.name}}catch{o[a]={id:a}}})),(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Runs"}),(0,b.jsxs)("div",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:[l||k," · ",(0,b.jsx)("span",{className:"font-mono",children:k})]})]}),(0,b.jsx)("div",{className:"flex items-center gap-3",children:(0,b.jsx)(c.default,{href:`/teams/${encodeURIComponent(k)}/workflows`,className:"text-sm font-medium text-[color:var(--ck-text-secondary)] hover:underline",children:"Workflows →"})})]}),(0,b.jsx)(e.default,{teamId:k,initialRuns:m,workflows:o})]})}a.s(["default",()=>i,"dynamic",0,"force-dynamic","revalidate",0,0])},40614,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_teams_ts_65688e72._.js"].map(b=>a.l(b))).then(()=>b(90377)))},10972,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_app_runs_AllRunsClient_tsx_5e59b500._.js"].map(b=>a.l(b))).then(()=>b(65228)))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__450d6006._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/next/dist/client/app-dir/link.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/client/app-dir/link.tsx","../../../../node_modules/next/src/client/app-dir/link.react-server.tsx","../../../../src/lib/kitchen-api.ts","../../../../src/lib/openclaw.ts","../../../../src/lib/workflows/runs-storage.ts","../../../../src/lib/workflows/readdir.ts","../../../../src/lib/workflows/storage.ts","../../../../src/app/teams/%5BteamId%5D/runs/runs-client.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/runs/page.tsx"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/client/app-dir/link.js\"));\n","'use client'\n\nimport React, { createContext, useContext, useOptimistic, useRef } from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\nimport type { PENDING_LINK_STATUS } from '../components/links'\nimport {\n IDLE_LINK_STATUS,\n mountLinkInstance,\n onNavigationIntent,\n unmountLinkForCurrentNavigation,\n unmountPrefetchableInstance,\n type LinkInstance,\n} from '../components/links'\nimport { isLocalURL } from '../../shared/lib/router/utils/is-local-url'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n} from '../components/segment-cache/types'\nimport { errorOnce } from '../../shared/lib/utils/error-once'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * **Required**. The path or URL to navigate to. It can also be an object (similar to `URL`).\n *\n * @example\n * ```tsx\n * // Navigate to /dashboard:\n * <Link href=\"/dashboard\">Dashboard</Link>\n *\n * // Navigate to /about?name=test:\n * <Link href={{ pathname: '/about', query: { name: 'test' } }}>\n * About\n * </Link>\n * ```\n *\n * @remarks\n * - For external URLs, use a fully qualified URL such as `https://...`.\n * - In the App Router, dynamic routes must not include bracketed segments in `href`.\n */\n href: Url\n\n /**\n * @deprecated v10.0.0: `href` props pointing to a dynamic route are\n * automatically resolved and no longer require the `as` prop.\n */\n as?: Url\n\n /**\n * Replace the current `history` state instead of adding a new URL into the stack.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" replace>\n * About (replaces the history state)\n * </Link>\n * ```\n */\n replace?: boolean\n\n /**\n * Whether to override the default scroll behavior. If `true`, Next.js attempts to maintain\n * the scroll position if the newly navigated page is still visible. If not, it scrolls to the top.\n *\n * If `false`, Next.js will not modify the scroll behavior at all.\n *\n * @defaultValue `true`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" scroll={false}>\n * No auto scroll\n * </Link>\n * ```\n */\n scroll?: boolean\n\n /**\n * Update the path of the current page without rerunning data fetching methods\n * like `getStaticProps`, `getServerSideProps`, or `getInitialProps`.\n *\n * @remarks\n * `shallow` only applies to the Pages Router. For the App Router, see the\n * [following documentation](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#using-the-native-history-api).\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/blog\" shallow>\n * Shallow navigation\n * </Link>\n * ```\n */\n shallow?: boolean\n\n /**\n * Forces `Link` to pass its `href` to the child component. Useful if the child is a custom\n * component that wraps an `<a>` tag, or if you're using certain styling libraries.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" passHref legacyBehavior>\n * <MyStyledAnchor>Dashboard</MyStyledAnchor>\n * </Link>\n * ```\n */\n passHref?: boolean\n\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`.\n *\n * @remarks\n * Prefetching is only enabled in production.\n *\n * - In the **App Router**:\n * - `\"auto\"`, `null`, `undefined` (default): Prefetch behavior depends on static vs dynamic routes:\n * - Static routes: fully prefetched\n * - Dynamic routes: partial prefetch to the nearest segment with a `loading.js`\n * - `true`: Always prefetch the full route and data.\n * - `false`: Disable prefetching on both viewport and hover.\n * - In the **Pages Router**:\n * - `true` (default): Prefetches the route and data in the background on viewport or hover.\n * - `false`: Prefetch only on hover, not on viewport.\n *\n * @defaultValue `true` (Pages Router) or `null` (App Router)\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" prefetch={false}>\n * Dashboard\n * </Link>\n * ```\n */\n prefetch?: boolean | 'auto' | null\n\n /**\n * (unstable) Switch to a full prefetch on hover. Effectively the same as\n * updating the prefetch prop to `true` in a mouse event.\n */\n unstable_dynamicOnHover?: boolean\n\n /**\n * The active locale is automatically prepended in the Pages Router. `locale` allows for providing\n * a different locale, or can be set to `false` to opt out of automatic locale behavior.\n *\n * @remarks\n * Note: locale only applies in the Pages Router and is ignored in the App Router.\n *\n * @example\n * ```tsx\n * // Use the 'fr' locale:\n * <Link href=\"/about\" locale=\"fr\">\n * About (French)\n * </Link>\n *\n * // Disable locale prefix:\n * <Link href=\"/about\" locale={false}>\n * About (no locale prefix)\n * </Link>\n * ```\n */\n locale?: string | false\n\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n\n /**\n * Optional event handler for when the mouse pointer is moved onto the `<Link>`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<Omit<InternalLinkProps, 'locale'>>\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n href: string,\n as: string,\n linkInstanceRef: React.RefObject<LinkInstance | null>,\n replace?: boolean,\n scroll?: boolean,\n onNavigate?: OnNavigateEventHandler\n): void {\n if (typeof window !== 'undefined') {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n const { dispatchNavigateAction } =\n require('../components/app-router-instance') as typeof import('../components/app-router-instance')\n\n React.startTransition(() => {\n dispatchNavigateAction(\n as || href,\n replace ? 'replace' : 'push',\n scroll ?? true,\n linkInstanceRef.current\n )\n })\n }\n}\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide\n * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation. This is the primary way to navigate between routes in Next.js.\n *\n * @remarks\n * - Prefetching is only enabled in production.\n *\n * @see https://nextjs.org/docs/app/api-reference/components/link\n */\nexport default function LinkComponent(\n props: LinkProps & {\n children: React.ReactNode\n ref: React.Ref<HTMLAnchorElement>\n }\n) {\n const [linkStatus, setOptimisticLinkStatus] = useOptimistic(IDLE_LINK_STATUS)\n\n let children: React.ReactNode\n\n const linkInstanceRef = useRef<LinkInstance | null>(null)\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n onNavigate,\n ref: forwardedRef,\n unstable_dynamicOnHover,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n const fetchStrategy =\n prefetchProp !== false\n ? getFetchStrategyFromPrefetchProp(prefetchProp)\n : // TODO: it makes no sense to assign a fetchStrategy when prefetching is disabled.\n FetchStrategy.PPR\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n unstable_dynamicOnHover: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior' ||\n key === 'unstable_dynamicOnHover'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof hrefProp === 'string') {\n href = hrefProp\n } else if (\n typeof hrefProp === 'object' &&\n typeof hrefProp.pathname === 'string'\n ) {\n href = hrefProp.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in <Link> while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n const { href, as } = React.useMemo(() => {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }, [hrefProp, asProp])\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if ((children as any)?.$$typeof === Symbol.for('react.lazy')) {\n throw new Error(\n `\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n // Use a callback ref to attach an IntersectionObserver to the anchor tag on\n // mount. In the future we will also use this to keep track of all the\n // currently mounted <Link> instances, e.g. so we can re-prefetch them after\n // a revalidation or refresh.\n const observeLinkVisibilityOnMount = React.useCallback(\n (element: HTMLAnchorElement | SVGAElement) => {\n if (router !== null) {\n linkInstanceRef.current = mountLinkInstance(\n element,\n href,\n router,\n fetchStrategy,\n prefetchEnabled,\n setOptimisticLinkStatus\n )\n }\n\n return () => {\n if (linkInstanceRef.current) {\n unmountLinkForCurrentNavigation(linkInstanceRef.current)\n linkInstanceRef.current = null\n }\n unmountPrefetchableInstance(element)\n }\n },\n [prefetchEnabled, href, router, fetchStrategy, setOptimisticLinkStatus]\n )\n\n const mergedRef = useMergedRef(observeLinkVisibilityOnMount, childRef)\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: mergedRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n if (e.defaultPrevented) {\n return\n }\n linkClicked(e, href, as, linkInstanceRef, replace, scroll, onNavigate)\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled) {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the basePath.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n childProps.href = addBasePath(as)\n }\n\n let link: React.ReactNode\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n link = React.cloneElement(child, childProps)\n } else {\n link = (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n\n return (\n <LinkStatusContext.Provider value={linkStatus}>\n {link}\n </LinkStatusContext.Provider>\n )\n}\n\nconst LinkStatusContext = createContext<\n typeof PENDING_LINK_STATUS | typeof IDLE_LINK_STATUS\n>(IDLE_LINK_STATUS)\n\nexport const useLinkStatus = () => {\n return useContext(LinkStatusContext)\n}\n\nfunction getFetchStrategyFromPrefetchProp(\n prefetchProp: Exclude<LinkProps['prefetch'], undefined | false>\n): PrefetchTaskFetchStrategy {\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n if (prefetchProp === true) {\n return FetchStrategy.Full\n }\n\n // `null` or `\"auto\"`: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport.\n // This will also include invalid prop values that don't match the types specified here.\n // (although those should've been filtered out by prop validation in dev)\n prefetchProp satisfies null | 'auto'\n return FetchStrategy.PPR\n } else {\n return prefetchProp === null || prefetchProp === 'auto'\n ? // We default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n FetchStrategy.PPR\n : // In the old implementation without runtime prefetches, `prefetch={true}` forces all dynamic data to be prefetched.\n // To preserve backwards-compatibility, anything other than `false`, `null`, or `\"auto\"` results in a full prefetch.\n // (although invalid values should've been filtered out by prop validation in dev)\n FetchStrategy.Full\n }\n}\n","import type { ComponentProps } from 'react'\nimport ClientLinkComponent, { type LinkProps, useLinkStatus } from './link'\n\nexport default function LinkComponent(\n props: ComponentProps<typeof ClientLinkComponent>\n) {\n const isLegacyBehavior = props.legacyBehavior\n const childIsHostComponent =\n typeof props.children === 'string' ||\n typeof props.children === 'number' ||\n typeof (props.children as any)?.type === 'string'\n const childIsClientComponent =\n (props.children as any)?.type?.$$typeof ===\n Symbol.for('react.client.reference')\n\n if (isLegacyBehavior && !childIsHostComponent && !childIsClientComponent) {\n if ((props.children as any)?.type?.$$typeof === Symbol.for('react.lazy')) {\n console.error(\n `Using a Lazy Component as a direct child of \\`<Link legacyBehavior>\\` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n } else {\n console.error(\n `Using a Server Component as a direct child of \\`<Link legacyBehavior>\\` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n }\n\n return <ClientLinkComponent {...props} />\n}\n\nexport { type LinkProps, useLinkStatus }\n","// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { getKitchenApi } from \"@/lib/kitchen-api\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst execFileAsync = promisify(execFile);\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nfunction extractStdout(err: { stdout?: unknown }): string {\n if (typeof err.stdout === \"string\") return err.stdout;\n if (err.stdout && typeof err.stdout === \"object\" && \"toString\" in err.stdout) {\n return String((err.stdout as { toString: () => string }).toString());\n }\n return \"\";\n}\n\nfunction resolveExitCode(res: { exitCode?: unknown; code?: unknown; status?: unknown }): number {\n if (typeof res.exitCode === \"number\") return res.exitCode;\n if (typeof res.code === \"number\") return res.code;\n if (typeof res.status === \"number\") return res.status;\n return 0;\n}\n\nfunction extractStderr(err: { stderr?: unknown; message?: unknown }, fallback: unknown): string {\n if (typeof err.stderr === \"string\") return err.stderr;\n if (err.stderr && typeof err.stderr === \"object\" && \"toString\" in err.stderr) {\n return String((err.stderr as { toString: () => string }).toString());\n }\n if (typeof err.message === \"string\") return err.message;\n return String(fallback);\n}\n\nasync function runOpenClawLocal(args: string[]): Promise<OpenClawExecResult> {\n try {\n const res = await execFileAsync(\"openclaw\", args, {\n timeout: 120000,\n windowsHide: true,\n maxBuffer: 10 * 1024 * 1024,\n });\n\n return {\n ok: true,\n exitCode: 0,\n stdout: String(res.stdout ?? \"\"),\n stderr: String(res.stderr ?? \"\"),\n };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // In some Kitchen runtime contexts, `api.runtime.system.runCommandWithTimeout`\n // is executed with a restricted allowlist that does not include the `cron` tool,\n // causing `openclaw cron ...` to fail with \"Tool not available: cron\".\n //\n // Cron routes need to work in the gateway-run Kitchen environment, so for cron\n // specifically we prefer a local exec (host OpenClaw).\n if (args[0] === \"cron\") return runOpenClawLocal(args);\n\n const api = getKitchenApi();\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = String(res.stdout ?? \"\");\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n","import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { getTeamWorkspaceDir } from \"@/lib/paths\";\nimport { readdirFiles } from \"@/lib/workflows/readdir\";\nimport { assertSafeWorkflowId } from \"@/lib/workflows/storage\";\nimport type { WorkflowRunFileV1, WorkflowRunNodeResultV1 } from \"@/lib/workflows/runs-types\";\n\nconst RUNS_DIR = path.join(\"shared-context\", \"workflow-runs\");\n\n/**\n * Back-compat:\n * - Legacy Kitchen layout: shared-context/workflow-runs/<workflowId>/*.run.json\n * - Runner layout (preferred): shared-context/workflow-runs/*.run.json\n */\nconst LEGACY_PER_WORKFLOW_LAYOUT = true;\n\nexport function assertSafeRunId(runId: string) {\n const id = String(runId ?? \"\").trim();\n if (!id) throw new Error(\"run id is required\");\n\n // Accept both Kitchen-style run ids (lowercase) and runner ids that include ISO timestamps (T/Z).\n // We still keep it conservative: only letters/numbers/dashes.\n if (!/^[A-Za-z0-9][A-Za-z0-9-]{0,120}$/.test(id)) {\n throw new Error(\"Invalid run id. Use letters, numbers, and dashes.\"\n );\n }\n return id;\n}\n\nexport async function getWorkflowRunsDir(teamId: string, workflowId: string) {\n // Validate workflowId (we no longer use it for the directory name).\n void assertSafeWorkflowId(workflowId);\n const teamDir = await getTeamWorkspaceDir(teamId);\n return path.join(teamDir, RUNS_DIR);\n}\n\nexport function workflowRunFileName(runId: string) {\n return `${runId}.run.json`;\n}\n\nexport async function listWorkflowRuns(teamId: string, workflowId: string) {\n const wfId = assertSafeWorkflowId(workflowId);\n const dir = await getWorkflowRunsDir(teamId, wfId);\n\n const runIds: string[] = [];\n\n // Preferred: runner directory-per-run layout: shared-context/workflow-runs/<runId>/run.json\n try {\n const entries = await fs.readdir(dir, { withFileTypes: true });\n const runDirs = entries.filter((e) => e.isDirectory()).map((e) => e.name).sort();\n\n for (const runId of runDirs) {\n const p = path.join(dir, runId, \"run.json\");\n try {\n const raw = await fs.readFile(p, \"utf8\");\n const parsed = JSON.parse(raw) as unknown;\n const normalized = normalizeRunFile(teamId, wfId, parsed, runId);\n if (normalized.workflowId === wfId) runIds.push(runId);\n } catch {\n // ignore\n }\n }\n } catch {\n // ignore\n }\n\n // Legacy: flat *.run.json at root\n try {\n const { files } = await readdirFiles(dir, \".run.json\", true);\n for (const f of files) {\n const runId = f.replace(/\\.run\\.json$/i, \"\");\n try {\n const raw = await fs.readFile(path.join(dir, f), \"utf8\");\n const parsed = JSON.parse(raw) as unknown;\n const normalized = normalizeRunFile(teamId, wfId, parsed, runId);\n if (normalized.workflowId === wfId) runIds.push(runId);\n } catch {\n // ignore\n }\n }\n } catch {\n // ignore\n }\n\n // Back-compat: legacy per-workflow directory.\n if (LEGACY_PER_WORKFLOW_LAYOUT) {\n try {\n const legacyDir = path.join(dir, wfId);\n const { files } = await readdirFiles(legacyDir, \".run.json\", true);\n for (const f of files) runIds.push(f.replace(/\\.run\\.json$/i, \"\"));\n } catch {\n // ignore\n }\n }\n\n const uniq = Array.from(new Set(runIds)).sort().reverse();\n return { ok: true as const, dir, runIds: uniq };\n}\n\nexport async function readWorkflowRun(teamId: string, workflowId: string, runId: string) {\n const wfId = assertSafeWorkflowId(workflowId);\n const rId = assertSafeRunId(runId);\n const dir = await getWorkflowRunsDir(teamId, wfId);\n\n // Preferred (runner) layout: shared-context/workflow-runs/<runId>/run.json\n const pRunner = path.join(dir, rId, \"run.json\");\n try {\n const raw = await fs.readFile(pRunner, \"utf8\");\n const parsed = JSON.parse(raw) as unknown;\n const run = normalizeRunFile(teamId, wfId, parsed, rId);\n\n // Runner stores rich node outputs as files under:\n // workflow-runs/<runId>/node-outputs/*-<nodeId>.json\n // Normalize by hydrating node.output from those files when missing.\n if (Array.isArray(run.nodes) && run.nodes.length) {\n const outputsDir = path.join(dir, rId, \"node-outputs\");\n let files: string[] = [];\n try {\n files = await fs.readdir(outputsDir);\n } catch {\n files = [];\n }\n\n // Multiple output files may exist for the same nodeId when a workflow executes a node\n // more than once. Preserve ordering by assigning outputs sequentially per nodeId.\n //\n // NOTE: Runner output filenames are typically prefixed with a sortable counter (e.g. 001-<nodeId>.json).\n // We rely on lexicographic order of filenames within node-outputs.\n const byNodeId = new Map<string, string[]>();\n for (const f of files.slice().sort()) {\n const m = f.match(/-([^/]+)\\.json$/);\n if (!m) continue;\n const nodeId = m[1];\n if (!nodeId) continue;\n const existing = byNodeId.get(nodeId) ?? [];\n existing.push(path.join(outputsDir, f));\n byNodeId.set(nodeId, existing);\n }\n\n await Promise.all(\n run.nodes.map(async (n) => {\n if (!n || typeof n !== \"object\") return;\n // Only hydrate if output is truly missing.\n if (typeof n.output !== \"undefined\") return;\n\n const arr = byNodeId.get(n.nodeId);\n if (!arr || !arr.length) return;\n\n const pOut = arr.shift();\n if (!pOut) return;\n\n try {\n const outRaw = await fs.readFile(pOut, \"utf8\");\n n.output = JSON.parse(outRaw) as unknown;\n } catch {\n // ignore\n }\n })\n );\n }\n\n return { ok: true as const, path: pRunner, run };\n } catch (err: unknown) {\n // fallthrough\n if (!(err && typeof err === \"object\" && (err as { code?: unknown }).code === \"ENOENT\")) throw err;\n }\n\n // Legacy flat layout: shared-context/workflow-runs/<runId>.run.json\n const p0 = path.join(dir, workflowRunFileName(rId));\n try {\n const raw = await fs.readFile(p0, \"utf8\");\n const parsed = JSON.parse(raw) as unknown;\n return { ok: true as const, path: p0, run: normalizeRunFile(teamId, wfId, parsed, rId) };\n } catch (err: unknown) {\n if (LEGACY_PER_WORKFLOW_LAYOUT && err && typeof err === \"object\" && (err as { code?: unknown }).code === \"ENOENT\") {\n const legacy = path.join(dir, wfId, workflowRunFileName(rId));\n const raw = await fs.readFile(legacy, \"utf8\");\n const parsed = JSON.parse(raw) as unknown;\n return { ok: true as const, path: legacy, run: normalizeRunFile(teamId, wfId, parsed, rId) };\n }\n throw err;\n }\n}\n\nexport async function writeWorkflowRun(teamId: string, workflowId: string, run: WorkflowRunFileV1) {\n const wfId = assertSafeWorkflowId(workflowId);\n const rId = assertSafeRunId(run.id);\n const dir = await getWorkflowRunsDir(teamId, wfId);\n await fs.mkdir(dir, { recursive: true });\n\n // Default layout: write to shared-context/workflow-runs/<runId>.run.json\n //\n // IMPORTANT: that filename may already be occupied by a runner-owned run log (different schema).\n // In that case, keep the runner log intact and write the Kitchen run file to the legacy\n // per-workflow directory shared-context/workflow-runs/<workflowId>/<runId>.run.json.\n const p0 = path.join(dir, workflowRunFileName(rId));\n\n let p = p0;\n try {\n const raw = await fs.readFile(p0, \"utf8\");\n const existing = JSON.parse(raw) as unknown;\n const isRunnerLog =\n Boolean(existing) &&\n typeof existing === \"object\" &&\n !Array.isArray(existing) &&\n \"runId\" in (existing as Record<string, unknown>) &&\n !(\"schema\" in (existing as Record<string, unknown>));\n\n if (isRunnerLog && LEGACY_PER_WORKFLOW_LAYOUT) {\n const legacyDir = path.join(dir, wfId);\n await fs.mkdir(legacyDir, { recursive: true });\n p = path.join(legacyDir, workflowRunFileName(rId));\n }\n } catch {\n // ignore read/parse errors; we'll write to p0\n }\n\n const toWrite: WorkflowRunFileV1 = {\n ...run,\n schema: \"clawkitchen.workflow-run.v1\",\n id: rId,\n workflowId: wfId,\n teamId,\n };\n await fs.writeFile(p, JSON.stringify(toWrite, null, 2) + \"\\n\", \"utf8\");\n return { ok: true as const, path: p };\n}\n\nexport type WorkflowRunSummary = {\n workflowId: string;\n runId: string;\n status?: WorkflowRunFileV1[\"status\"];\n startedAt?: string;\n endedAt?: string;\n /** ISO timestamp derived from file mtime (best-effort) */\n updatedAt?: string;\n /** Absolute path to the run file on disk (server-side only) */\n path: string;\n};\n\nexport async function listAllWorkflowRuns(teamId: string): Promise<{ ok: true; dir: string; runs: WorkflowRunSummary[] }> {\n const teamDir = await getTeamWorkspaceDir(teamId);\n const dir = path.join(teamDir, RUNS_DIR);\n\n const runs: WorkflowRunSummary[] = [];\n\n // Preferred: runner directory-per-run layout:\n // shared-context/workflow-runs/<runId>/run.json\n try {\n const entries = await fs.readdir(dir, { withFileTypes: true });\n const runDirs = entries.filter((e) => e.isDirectory()).map((e) => e.name).sort();\n\n for (const runId of runDirs) {\n const full = path.join(dir, runId, \"run.json\");\n try {\n const [raw, st] = await Promise.all([fs.readFile(full, \"utf8\"), fs.stat(full)]);\n const normalized = normalizeRunFile(teamId, \"(unknown)\", JSON.parse(raw) as unknown, runId);\n runs.push({\n workflowId: normalized.workflowId,\n runId: normalized.id,\n status: normalized.status,\n startedAt: normalized.startedAt,\n endedAt: normalized.endedAt,\n updatedAt: st.mtime ? new Date(st.mtime).toISOString() : undefined,\n path: full,\n });\n } catch {\n // ignore missing run.json/parse errors; keep going\n }\n }\n } catch (err: unknown) {\n if (!(err && typeof err === \"object\" && (err as { code?: unknown }).code === \"ENOENT\")) throw err;\n }\n\n // Legacy: flat run files at root: shared-context/workflow-runs/<runId>.run.json\n try {\n const entries = (await fs.readdir(dir)).filter((n) => n.endsWith(\".run.json\")).sort();\n for (const fileName of entries) {\n const runId = fileName.replace(/\\.run\\.json$/i, \"\");\n const full = path.join(dir, fileName);\n try {\n const [raw, st] = await Promise.all([fs.readFile(full, \"utf8\"), fs.stat(full)]);\n const normalized = normalizeRunFile(teamId, \"(unknown)\", JSON.parse(raw) as unknown, runId);\n runs.push({\n workflowId: normalized.workflowId,\n runId: normalized.id,\n status: normalized.status,\n startedAt: normalized.startedAt,\n endedAt: normalized.endedAt,\n updatedAt: st.mtime ? new Date(st.mtime).toISOString() : undefined,\n path: full,\n });\n } catch {\n runs.push({ workflowId: \"(unknown)\", runId, path: full });\n }\n }\n } catch (err: unknown) {\n if (!(err && typeof err === \"object\" && (err as { code?: unknown }).code === \"ENOENT\")) throw err;\n }\n\n // Back-compat: legacy per-workflow directory.\n if (LEGACY_PER_WORKFLOW_LAYOUT) {\n try {\n const entries = await fs.readdir(dir, { withFileTypes: true });\n const wfDirs = entries.filter((e) => e.isDirectory()).map((e) => e.name).sort();\n\n for (const workflowId of wfDirs) {\n const wfDir = path.join(dir, workflowId);\n let entries2: string[] = [];\n try {\n entries2 = (await fs.readdir(wfDir)).filter((n) => n.endsWith(\".run.json\")).sort();\n } catch (err: unknown) {\n if (err && typeof err === \"object\" && (err as { code?: unknown }).code === \"ENOENT\") continue;\n throw err;\n }\n\n for (const fileName of entries2) {\n const runId = fileName.replace(/\\.run\\.json$/i, \"\");\n const full = path.join(wfDir, fileName);\n try {\n const [raw, st] = await Promise.all([fs.readFile(full, \"utf8\"), fs.stat(full)]);\n const parsed = JSON.parse(raw) as Partial<WorkflowRunFileV1>;\n runs.push({\n workflowId,\n runId,\n status: parsed.status as WorkflowRunFileV1[\"status\"],\n startedAt: typeof parsed.startedAt === \"string\" ? parsed.startedAt : undefined,\n endedAt: typeof parsed.endedAt === \"string\" ? parsed.endedAt : undefined,\n updatedAt: st.mtime ? new Date(st.mtime).toISOString() : undefined,\n path: full,\n });\n } catch {\n runs.push({ workflowId, runId, path: full });\n }\n }\n }\n } catch (err: unknown) {\n if (!(err && typeof err === \"object\" && (err as { code?: unknown }).code === \"ENOENT\")) throw err;\n }\n }\n\n // Deduplicate across layouts. It's possible for the same logical run to appear in multiple places\n // (runner dir-per-run + legacy flat/per-workflow layouts). Prefer the richest record.\n const byKey = new Map<string, WorkflowRunSummary>();\n for (const r of runs) {\n const key = `${r.workflowId}:${r.runId}`;\n const prev = byKey.get(key);\n if (!prev) {\n byKey.set(key, r);\n continue;\n }\n\n const score = (x: WorkflowRunSummary) => {\n let s = 0;\n if (x.status) s += 2;\n if (x.startedAt) s += 1;\n if (x.endedAt) s += 1;\n if (x.updatedAt) s += 1;\n // Prefer runner dir-per-run run.json over legacy .run.json files.\n if (x.path.endsWith(`${path.sep}run.json`)) s += 2;\n return s;\n };\n\n if (score(r) >= score(prev)) byKey.set(key, r);\n }\n\n const deduped = Array.from(byKey.values());\n deduped.sort((a, b) => String(b.updatedAt ?? b.startedAt ?? \"\").localeCompare(String(a.updatedAt ?? a.startedAt ?? \"\")));\n return { ok: true as const, dir, runs: deduped };\n}\n\nfunction normalizeRunFile(teamId: string, workflowId: string, parsed: unknown, runIdFallback: string): WorkflowRunFileV1 {\n // Kitchen schema\n if (parsed && typeof parsed === \"object\" && (parsed as { schema?: unknown }).schema === \"clawkitchen.workflow-run.v1\") {\n return parsed as WorkflowRunFileV1;\n }\n\n // Runner schema (RunLog from ClawRecipes). Convert to Kitchen's display schema.\n if (parsed && typeof parsed === \"object\" && \"runId\" in parsed && \"workflow\" in parsed) {\n const o = parsed as {\n runId?: unknown;\n createdAt?: unknown;\n updatedAt?: unknown;\n status?: unknown;\n workflow?: { id?: unknown; file?: unknown };\n nodeResults?: unknown;\n };\n\n const wfObj = o.workflow && typeof o.workflow === \"object\" ? o.workflow : {};\n const file = typeof wfObj.file === \"string\" ? wfObj.file : \"\";\n const inferredWfId = file ? path.basename(file).replace(/\\.workflow\\.json$/i, \"\") : \"\";\n const wfId = typeof wfObj.id === \"string\" && wfObj.id ? wfObj.id : inferredWfId || workflowId;\n\n const statusRaw = String(o.status ?? \"\");\n const status: WorkflowRunFileV1[\"status\"] =\n statusRaw === \"awaiting_approval\"\n ? \"waiting_for_approval\"\n : statusRaw === \"completed\"\n ? \"success\"\n : statusRaw === \"rejected\"\n ? \"error\"\n : statusRaw === \"error\"\n ? \"error\"\n : statusRaw === \"canceled\"\n ? \"canceled\"\n : \"running\";\n\n const nodes = Array.isArray(o.nodeResults)\n ? o.nodeResults\n .map((nr) => {\n if (!nr || typeof nr !== \"object\") return null;\n const r = nr as {\n nodeId?: unknown;\n status?: unknown;\n startedAt?: unknown;\n endedAt?: unknown;\n output?: unknown;\n error?: unknown;\n };\n const nodeId = typeof r.nodeId === \"string\" ? r.nodeId : \"\";\n if (!nodeId) return null;\n\n const st = String(r.status ?? \"pending\");\n const mapped =\n st === \"awaiting_approval\"\n ? \"waiting\"\n : st === \"completed\"\n ? \"success\"\n : st === \"error\"\n ? \"error\"\n : st;\n\n const allowed = [\"pending\", \"running\", \"waiting\", \"success\", \"error\", \"skipped\"] as const;\n const status = (allowed as readonly string[]).includes(mapped) ? (mapped as (typeof allowed)[number]) : \"pending\";\n\n const error =\n typeof r.error === \"string\"\n ? r.error\n : r.error && typeof r.error === \"object\" && \"message\" in r.error\n ? { message: String((r.error as { message?: unknown }).message ?? \"\") }\n : undefined;\n\n const startedAt = typeof r.startedAt === \"string\" ? r.startedAt : undefined;\n const endedAt = typeof r.endedAt === \"string\" ? r.endedAt : undefined;\n\n return {\n nodeId,\n status,\n ...(startedAt ? { startedAt } : {}),\n ...(endedAt ? { endedAt } : {}),\n ...(typeof r.output !== \"undefined\" ? { output: r.output } : {}),\n ...(typeof error !== \"undefined\" ? { error } : {}),\n } satisfies WorkflowRunNodeResultV1;\n })\n .filter((x): x is WorkflowRunNodeResultV1 => x !== null)\n : undefined;\n\n return {\n schema: \"clawkitchen.workflow-run.v1\",\n id: typeof o.runId === \"string\" ? o.runId : runIdFallback,\n workflowId: wfId,\n teamId,\n startedAt: typeof o.createdAt === \"string\" ? o.createdAt : new Date().toISOString(),\n endedAt:\n status === \"success\" || status === \"error\" || status === \"canceled\"\n ? typeof o.updatedAt === \"string\"\n ? o.updatedAt\n : undefined\n : undefined,\n status,\n summary: \"Executed by workflow runner\",\n nodes,\n };\n }\n\n // Unknown schema; keep a placeholder so UI can still render.\n return {\n schema: \"clawkitchen.workflow-run.v1\",\n id: runIdFallback,\n workflowId,\n teamId,\n startedAt: new Date().toISOString(),\n status: \"error\",\n summary: \"Malformed run file\",\n };\n}","import fs from \"node:fs/promises\";\n\n/** Reads dir with optional suffix filter and reverse sort. Returns { ok, dir, files } or { ok, dir, files: [] } on ENOENT. */\nexport async function readdirFiles(\n dir: string,\n suffix: string,\n reverse = false\n): Promise<{ ok: true; dir: string; files: string[] }> {\n try {\n const entries = await fs.readdir(dir, { withFileTypes: true });\n let files = entries\n .filter((e) => e.isFile() && e.name.endsWith(suffix))\n .map((e) => e.name)\n .sort();\n if (reverse) files = files.reverse();\n return { ok: true as const, dir, files };\n } catch (err: unknown) {\n if (err && typeof err === \"object\" && (err as { code?: unknown }).code === \"ENOENT\") {\n return { ok: true as const, dir, files: [] as string[] };\n }\n throw err;\n }\n}\n","import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { getTeamWorkspaceDir } from \"@/lib/paths\";\nimport { readdirFiles } from \"@/lib/workflows/readdir\";\nimport type { WorkflowFileV1 } from \"@/lib/workflows/types\";\n\nconst WORKFLOWS_DIR = path.join(\"shared-context\", \"workflows\");\n\nexport function workflowFileName(workflowId: string) {\n return `${workflowId}.workflow.json`;\n}\n\nexport function assertSafeWorkflowId(workflowId: string) {\n const id = String(workflowId ?? \"\").trim();\n if (!id) throw new Error(\"workflow id is required\");\n if (!/^[a-z0-9][a-z0-9-]{0,62}$/.test(id)) {\n throw new Error(\n \"Invalid workflow id. Use lowercase letters, numbers, and dashes (max 63 chars), e.g. marketing-cadence-v1\"\n );\n }\n return id;\n}\n\nexport async function getTeamWorkflowsDir(teamId: string) {\n const teamDir = await getTeamWorkspaceDir(teamId);\n return path.join(teamDir, WORKFLOWS_DIR);\n}\n\nexport async function listWorkflows(teamId: string) {\n const dir = await getTeamWorkflowsDir(teamId);\n return readdirFiles(dir, \".workflow.json\");\n}\n\nexport async function readWorkflow(teamId: string, workflowId: string) {\n const id = assertSafeWorkflowId(workflowId);\n const dir = await getTeamWorkflowsDir(teamId);\n const p = path.join(dir, workflowFileName(id));\n const raw = await fs.readFile(p, \"utf8\");\n const parsed = JSON.parse(raw) as WorkflowFileV1;\n return { ok: true as const, path: p, workflow: parsed };\n}\n\nexport async function writeWorkflow(teamId: string, workflow: WorkflowFileV1) {\n const id = assertSafeWorkflowId(workflow.id);\n const dir = await getTeamWorkflowsDir(teamId);\n await fs.mkdir(dir, { recursive: true });\n const p = path.join(dir, workflowFileName(id));\n const toWrite: WorkflowFileV1 = {\n ...workflow,\n schema: \"clawkitchen.workflow.v1\",\n id,\n };\n await fs.writeFile(p, JSON.stringify(toWrite, null, 2) + \"\\n\", \"utf8\");\n return { ok: true as const, path: p };\n}\n\nexport async function deleteWorkflow(teamId: string, workflowId: string) {\n const id = assertSafeWorkflowId(workflowId);\n const dir = await getTeamWorkflowsDir(teamId);\n const p = path.join(dir, workflowFileName(id));\n try {\n await fs.unlink(p);\n } catch (err: unknown) {\n if (err && typeof err === \"object\" && (err as { code?: unknown }).code === \"ENOENT\") {\n return { ok: true as const, path: p, existed: false as const };\n }\n throw err;\n }\n return { ok: true as const, path: p, existed: true as const };\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/src/app/teams/[teamId]/runs/runs-client.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/teams/[teamId]/runs/runs-client.tsx\",\n \"default\",\n);\n","import Link from \"next/link\";\nimport { unstable_noStore as noStore } from \"next/cache\";\n\nimport RunsClient from \"@/app/teams/[teamId]/runs/runs-client\";\nimport { getTeamDisplayName } from \"@/lib/recipes\";\nimport { listAllWorkflowRuns } from \"@/lib/workflows/runs-storage\";\nimport { readWorkflow } from \"@/lib/workflows/storage\";\n\nexport const dynamic = \"force-dynamic\";\nexport const revalidate = 0;\n\nexport default async function RunsPage({\n searchParams,\n}: {\n searchParams: Promise<Record<string, string | string[] | undefined>>;\n}) {\n // Runs are live + file-backed; never serve cached HTML.\n noStore();\n\n const sp = await searchParams;\n const team = Array.isArray(sp.team) ? sp.team[0] : sp.team;\n const teamId = String(team ?? \"\").trim();\n\n if (!teamId) {\n const { listLocalTeamIds } = await import(\"@/lib/teams\");\n const AllRunsClient = (await import(\"@/app/runs/AllRunsClient\")).default;\n\n const teamIds = await listLocalTeamIds();\n\n const rowsNested = await Promise.all(\n teamIds.map(async (tId) => {\n const teamName = await getTeamDisplayName(tId);\n const { runs } = await listAllWorkflowRuns(tId);\n return runs.map((r) => ({\n teamId: tId,\n teamName,\n workflowId: r.workflowId,\n runId: r.runId,\n status: r.status,\n startedAt: r.startedAt,\n endedAt: r.endedAt,\n updatedAt: r.updatedAt,\n }));\n })\n );\n\n const rows = rowsNested.flat().sort((a, b) => String(b.updatedAt || b.endedAt || b.startedAt || \"\").localeCompare(String(a.updatedAt || a.endedAt || a.startedAt || \"\")));\n\n return (\n <div className=\"flex flex-col gap-4\">\n <div>\n <h1 className=\"text-2xl font-semibold tracking-tight\">Runs</h1>\n <div className=\"mt-1 text-sm text-[color:var(--ck-text-secondary)]\">\n Showing workflow runs across all local teams. Use the team dropdown to filter.\n </div>\n </div>\n\n <AllRunsClient rows={rows} />\n </div>\n );\n }\n\n const name = await getTeamDisplayName(teamId);\n const { runs } = await listAllWorkflowRuns(teamId);\n\n const wfIds = Array.from(new Set(runs.map((r) => r.workflowId).filter(Boolean))).sort();\n const workflows: Record<string, { id: string; name?: string }> = {};\n await Promise.all(\n wfIds.map(async (id) => {\n try {\n const { workflow } = await readWorkflow(teamId, id);\n workflows[id] = { id: workflow.id, name: workflow.name };\n } catch {\n workflows[id] = { id };\n }\n })\n );\n\n return (\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex flex-wrap items-start justify-between gap-4\">\n <div>\n <h1 className=\"text-2xl font-semibold tracking-tight\">Runs</h1>\n <div className=\"mt-1 text-sm text-[color:var(--ck-text-secondary)]\">\n {name || teamId} · <span className=\"font-mono\">{teamId}</span>\n </div>\n </div>\n\n <div className=\"flex items-center gap-3\">\n <Link\n href={`/teams/${encodeURIComponent(teamId)}/workflows`}\n className=\"text-sm font-medium text-[color:var(--ck-text-secondary)] hover:underline\"\n >\n Workflows →\n </Link>\n </div>\n </div>\n\n <RunsClient teamId={teamId} initialRuns={runs} workflows={workflows} />\n </div>\n );\n}\n"],"names":["LinkComponent","useLinkStatus","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","href","as","linkInstanceRef","replace","scroll","onNavigate","window","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","isLocalURL","preventDefault","location","isDefaultPrevented","dispatchNavigateAction","require","React","startTransition","current","formatStringOrUrl","urlObjOrString","formatUrl","props","linkStatus","setOptimisticLinkStatus","useOptimistic","IDLE_LINK_STATUS","children","useRef","hrefProp","asProp","childrenProp","prefetch","prefetchProp","passHref","shallow","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","ref","forwardedRef","unstable_dynamicOnHover","restProps","a","router","useContext","AppRouterContext","prefetchEnabled","fetchStrategy","getFetchStrategyFromPrefetchProp","FetchStrategy","PPR","process","env","NODE_ENV","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","locale","warnOnce","pathname","hasDynamicSegment","split","some","segment","startsWith","endsWith","useMemo","resolvedHref","child","$$typeof","Symbol","for","console","warn","Children","only","err","type","childRef","observeLinkVisibilityOnMount","useCallback","element","mountLinkInstance","unmountLinkForCurrentNavigation","unmountPrefetchableInstance","mergedRef","useMergedRef","childProps","defaultPrevented","upgradeToDynamicPrefetch","onNavigationIntent","__NEXT_LINK_NO_TOUCH_START","undefined","isAbsoluteUrl","addBasePath","link","errorOnce","cloneElement","LinkStatusContext","Provider","value","createContext","__NEXT_CACHE_COMPONENTS","Full","isLegacyBehavior","childIsHostComponent","childIsClientComponent","error","ClientLinkComponent"],"mappings":"6yBACA,GAAM,yBAAE,CAAuB,CAAE,CAAA,EAAA,CAAA,CAAA,OAEjC,EAAsB,CAAC,CAAC,EAAwB,iGAFhD,GAAM,yBAAE,CAAuB,CAAE,CAAA,EAAA,CAAA,CAAA,OAEjC,EAAsB,CAAC,CAAC,EAAwB,2MEAhD,OAyBC,CAAA,kBAzBuBA,GA2BCC,aAAa,CAAA,kBAAbA,EAAAA,aAAa,2GA7B6B,CAAA,CAAA,IAAA,IAEpD,SAASD,EACtBuC,CAAiD,EAEjD,IAAMkG,EAAmBlG,EAAMmB,cAAc,CACvCgF,EACsB,UAA1B,OAAOnG,EAAMK,QAAQ,EACK,UAA1B,OAAOL,EAAMK,QAAQ,EACoB,UAAzC,OAAQL,EAAMK,QAAQ,EAAUkE,KAC5B6B,EACHpG,EAAMK,QAAQ,EAAUkE,MAAMR,WAC/BC,OAAOC,GAAG,CAAC,0BAcb,OAZIiC,AAYJ,GAZyBC,GAAyBC,IAC3CpG,CAWP,CAXaK,QAAQ,AADG,EACOkE,KADkB,CACZR,EADqC,SACxBC,OAAOC,GAAG,CAAC,cACzDC,CADwE,OAChEmC,KAAK,CACX,CAAC,8NAGHnC,CAHkO,CAAC,MAG3NmC,KAAK,CACX,CAAC,2MAKA,AAL2M,CAAC,EAK5M,EAAA,GAAA,EAACC,EAAAA,OAAmB,CAAA,C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EAAA,GAAA,EAAC,EAAA,OAAU,CAAA,CAAC,OAAQ,EAAQ,YAAa,EAAM,UAAW,MAGhE,kCA7FuB,+BACG","ignoreList":[0,2,8]}
@@ -1,3 +0,0 @@
1
- module.exports=[89578,a=>{a.v({className:"geist_a71539c9-module__T19VSG__className",variable:"geist_a71539c9-module__T19VSG__variable"})},35214,a=>{a.v({className:"geist_mono_8d43a2aa-module__8Li5zG__className",variable:"geist_mono_8d43a2aa-module__8Li5zG__variable"})},17917,a=>{"use strict";a.s(["AppShell",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call AppShell() from the server but AppShell is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/AppShell.tsx <module evaluation>","AppShell")},43297,a=>{"use strict";a.s(["AppShell",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call AppShell() from the server but AppShell is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/AppShell.tsx","AppShell")},56935,a=>{"use strict";a.i(17917);var b=a.i(43297);a.n(b)},27572,a=>{"use strict";var b=a.i(7997),c=a.i(89578);let d={className:c.default.className,style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"}};null!=c.default.variable&&(d.variable=c.default.variable);var e=a.i(35214);let f={className:e.default.className,style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"}};null!=e.default.variable&&(f.variable=e.default.variable);var g=a.i(56935);function h({children:a}){return(0,b.jsxs)("html",{lang:"en",suppressHydrationWarning:!0,children:[(0,b.jsx)("head",{children:(0,b.jsx)("script",{dangerouslySetInnerHTML:{__html:"(function(){try{var t=localStorage.getItem('ck-theme');var theme=(t==='light')?'light':'dark';document.documentElement.dataset.theme=theme;}catch(e){document.documentElement.dataset.theme='dark';}})();"}})}),(0,b.jsx)("body",{suppressHydrationWarning:!0,className:`${d.variable} ${f.variable} antialiased`,children:(0,b.jsx)(g.AppShell,{children:a})})]})}a.s(["default",()=>h,"metadata",0,{title:"Claw Kitchen",description:"Local-first UI for authoring ClawRecipes recipes and scaffolding agents/teams.",icons:{icon:[{url:"/favicon.ico",sizes:"any"},{url:"/favicon-16x16.png",sizes:"16x16",type:"image/png"},{url:"/favicon-32x32.png",sizes:"32x32",type:"image/png"}],apple:"/apple-touch-icon.png"}}],27572)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__6bd48d33._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["turbopack:///[next]/internal/font/google/geist_a71539c9.module.css [app-rsc] (css module)","turbopack:///[next]/internal/font/google/geist_mono_8d43a2aa.module.css [app-rsc] (css module)","../../../../src/components/AppShell.tsx/__nextjs-internal-proxy.mjs","turbopack:///[next]/internal/font/google/geist_a71539c9.js","turbopack:///[next]/internal/font/google/geist_mono_8d43a2aa.js","../../../../src/app/layout.tsx"],"sourcesContent":["__turbopack_context__.v({\n \"className\": \"geist_a71539c9-module__T19VSG__className\",\n \"variable\": \"geist_a71539c9-module__T19VSG__variable\",\n});\n","__turbopack_context__.v({\n \"className\": \"geist_mono_8d43a2aa-module__8Li5zG__className\",\n \"variable\": \"geist_mono_8d43a2aa-module__8Li5zG__variable\",\n});\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const AppShell = registerClientReference(\n function() { throw new Error(\"Attempted to call AppShell() from the server but AppShell is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/components/AppShell.tsx\",\n \"AppShell\",\n);\n","import cssModule from \"@vercel/turbopack-next/internal/font/google/cssmodule.module.css?{%22path%22:%22layout.tsx%22,%22import%22:%22Geist%22,%22arguments%22:[{%22variable%22:%22--font-geist-sans%22,%22subsets%22:[%22latin%22]}],%22variableName%22:%22geistSans%22}\";\nconst fontData = {\n className: cssModule.className,\n style: {\n fontFamily: \"'Geist', 'Geist Fallback'\",\n fontStyle: \"normal\",\n\n },\n};\n\nif (cssModule.variable != null) {\n fontData.variable = cssModule.variable;\n}\n\nexport default fontData;\n","import cssModule from \"@vercel/turbopack-next/internal/font/google/cssmodule.module.css?{%22path%22:%22layout.tsx%22,%22import%22:%22Geist_Mono%22,%22arguments%22:[{%22variable%22:%22--font-geist-mono%22,%22subsets%22:[%22latin%22]}],%22variableName%22:%22geistMono%22}\";\nconst fontData = {\n className: cssModule.className,\n style: {\n fontFamily: \"'Geist Mono', 'Geist Mono Fallback'\",\n fontStyle: \"normal\",\n\n },\n};\n\nif (cssModule.variable != null) {\n fontData.variable = cssModule.variable;\n}\n\nexport default fontData;\n","import type { Metadata } from \"next\";\nimport { Geist, Geist_Mono } from \"next/font/google\";\nimport \"./globals.css\";\nimport { AppShell } from \"@/components/AppShell\";\n\nconst geistSans = Geist({\n variable: \"--font-geist-sans\",\n subsets: [\"latin\"],\n});\n\nconst geistMono = Geist_Mono({\n variable: \"--font-geist-mono\",\n subsets: [\"latin\"],\n});\n\nexport const metadata: Metadata = {\n title: \"Claw Kitchen\",\n description: \"Local-first UI for authoring ClawRecipes recipes and scaffolding agents/teams.\",\n icons: {\n icon: [\n { url: \"/favicon.ico\", sizes: \"any\" },\n { url: \"/favicon-16x16.png\", sizes: \"16x16\", type: \"image/png\" },\n { url: \"/favicon-32x32.png\", sizes: \"32x32\", type: \"image/png\" },\n ],\n apple: \"/apple-touch-icon.png\",\n },\n};\n\nexport default function RootLayout({\n children,\n}: Readonly<{\n children: React.ReactNode;\n}>) {\n return (\n <html lang=\"en\" suppressHydrationWarning>\n <head>\n {/* Prevent theme flash: set data-theme before first paint */}\n <script\n dangerouslySetInnerHTML={{\n __html:\n \"(function(){try{var t=localStorage.getItem('ck-theme');var theme=(t==='light')?'light':'dark';document.documentElement.dataset.theme=theme;}catch(e){document.documentElement.dataset.theme='dark';}})();\",\n }}\n />\n </head>\n <body\n suppressHydrationWarning\n className={`${geistSans.variable} ${geistMono.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