@jiggai/kitchen 0.3.33 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (570) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +4 -0
  3. package/.next/build-manifest.json +5 -5
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.js +4 -4
  6. package/.next/required-server-files.json +4 -4
  7. package/.next/routes-manifest.json +24 -0
  8. package/.next/server/app/_global-error/page/build-manifest.json +3 -3
  9. package/.next/server/app/_global-error/page.js +2 -2
  10. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  11. package/.next/server/app/_global-error.html +2 -2
  12. package/.next/server/app/_global-error.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  18. package/.next/server/app/_not-found/page/build-manifest.json +3 -3
  19. package/.next/server/app/_not-found/page.js +2 -2
  20. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  21. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  22. package/.next/server/app/_not-found.html +1 -1
  23. package/.next/server/app/_not-found.rsc +5 -5
  24. package/.next/server/app/_not-found.segments/_full.segment.rsc +5 -5
  25. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  26. package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  27. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  28. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  29. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  30. package/.next/server/app/agents/[agentId]/page/build-manifest.json +3 -3
  31. package/.next/server/app/agents/[agentId]/page.js +2 -2
  32. package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -1
  33. package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/agents/[id]/route.js +1 -1
  35. package/.next/server/app/api/agents/[id]/route.js.nft.json +1 -1
  36. package/.next/server/app/api/agents/add/route.js.nft.json +1 -1
  37. package/.next/server/app/api/agents/file/route.js.nft.json +1 -1
  38. package/.next/server/app/api/agents/files/route.js.nft.json +1 -1
  39. package/.next/server/app/api/agents/route.js +1 -1
  40. package/.next/server/app/api/agents/route.js.nft.json +1 -1
  41. package/.next/server/app/api/agents/skills/install/route.js.nft.json +1 -1
  42. package/.next/server/app/api/agents/skills/route.js.nft.json +1 -1
  43. package/.next/server/app/api/agents/update/route.js.nft.json +1 -1
  44. package/.next/server/app/api/channels/bindings/route.js +1 -1
  45. package/.next/server/app/api/channels/bindings/route.js.nft.json +1 -1
  46. package/.next/server/app/api/cron/bulk/route/app-paths-manifest.json +3 -0
  47. package/.next/server/app/api/cron/bulk/route/build-manifest.json +11 -0
  48. package/.next/server/app/api/cron/bulk/route/server-reference-manifest.json +4 -0
  49. package/.next/server/app/api/cron/bulk/route.js +6 -0
  50. package/.next/server/app/api/cron/bulk/route.js.map +5 -0
  51. package/.next/server/app/api/cron/bulk/route.js.nft.json +1 -0
  52. package/.next/server/app/api/cron/bulk/route_client-reference-manifest.js +2 -0
  53. package/.next/server/app/api/cron/delete/route.js.nft.json +1 -1
  54. package/.next/server/app/api/cron/jobs/route.js.nft.json +1 -1
  55. package/.next/server/app/api/cron/recipe-installed/route.js.nft.json +1 -1
  56. package/.next/server/app/api/cron/worker/route.js +2 -1
  57. package/.next/server/app/api/cron/worker/route.js.nft.json +1 -1
  58. package/.next/server/app/api/goals/[id]/promote/route.js.nft.json +1 -1
  59. package/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
  60. package/.next/server/app/api/goals/route.js.nft.json +1 -1
  61. package/.next/server/app/api/ids/check/route.js.nft.json +1 -1
  62. package/.next/server/app/api/manifest/route/app-paths-manifest.json +3 -0
  63. package/.next/server/app/api/manifest/route/build-manifest.json +11 -0
  64. package/.next/server/app/api/manifest/route/server-reference-manifest.json +4 -0
  65. package/.next/server/app/api/manifest/route.js +6 -0
  66. package/.next/server/app/api/manifest/route.js.map +5 -0
  67. package/.next/server/app/api/manifest/route.js.nft.json +1 -0
  68. package/.next/server/app/api/manifest/route_client-reference-manifest.js +2 -0
  69. package/.next/server/app/api/marketplace/recipes/[slug]/route.js +1 -1
  70. package/.next/server/app/api/marketplace/recipes/[slug]/route.js.nft.json +1 -1
  71. package/.next/server/app/api/marketplace/recipes/route.js +1 -1
  72. package/.next/server/app/api/marketplace/recipes/route.js.nft.json +1 -1
  73. package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js +2 -2
  74. package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js.nft.json +1 -1
  75. package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js +1 -1
  76. package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js.nft.json +1 -1
  77. package/.next/server/app/api/plugins/route.js +1 -1
  78. package/.next/server/app/api/plugins/route.js.nft.json +1 -1
  79. package/.next/server/app/api/plugins/test/route.js +1 -1
  80. package/.next/server/app/api/plugins/test/route.js.nft.json +1 -1
  81. package/.next/server/app/api/recipes/[id]/route.js.nft.json +1 -1
  82. package/.next/server/app/api/recipes/clone/route.js.nft.json +1 -1
  83. package/.next/server/app/api/recipes/custom-team/route.js.nft.json +1 -1
  84. package/.next/server/app/api/recipes/delete/route.js.nft.json +1 -1
  85. package/.next/server/app/api/recipes/local-agent-catalog/route.js.nft.json +1 -1
  86. package/.next/server/app/api/recipes/route.js +1 -1
  87. package/.next/server/app/api/recipes/route.js.nft.json +1 -1
  88. package/.next/server/app/api/recipes/team-agents/route.js.nft.json +1 -1
  89. package/.next/server/app/api/scaffold/route.js.nft.json +1 -1
  90. package/.next/server/app/api/settings/cron-installation/route.js.nft.json +1 -1
  91. package/.next/server/app/api/settings/model-options/route.js +1 -1
  92. package/.next/server/app/api/settings/model-options/route.js.nft.json +1 -1
  93. package/.next/server/app/api/swarms/start/route.js +1 -1
  94. package/.next/server/app/api/swarms/start/route.js.nft.json +1 -1
  95. package/.next/server/app/api/swarms/status/route.js +1 -1
  96. package/.next/server/app/api/swarms/status/route.js.nft.json +1 -1
  97. package/.next/server/app/api/teams/[teamId]/media-providers/route.js +1 -1
  98. package/.next/server/app/api/teams/[teamId]/media-providers/route.js.nft.json +1 -1
  99. package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.nft.json +1 -1
  100. package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js.nft.json +1 -1
  101. package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js.nft.json +1 -1
  102. package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.nft.json +1 -1
  103. package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.nft.json +1 -1
  104. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.nft.json +1 -1
  105. package/.next/server/app/api/teams/file/route.js.nft.json +1 -1
  106. package/.next/server/app/api/teams/files/route.js.nft.json +1 -1
  107. package/.next/server/app/api/teams/list/route/app-paths-manifest.json +3 -0
  108. package/.next/server/app/api/teams/list/route/build-manifest.json +11 -0
  109. package/.next/server/app/api/teams/list/route/server-reference-manifest.json +4 -0
  110. package/.next/server/app/api/teams/list/route.js +6 -0
  111. package/.next/server/app/api/teams/list/route.js.map +5 -0
  112. package/.next/server/app/api/teams/list/route.js.nft.json +1 -0
  113. package/.next/server/app/api/teams/list/route_client-reference-manifest.js +2 -0
  114. package/.next/server/app/api/teams/memory/route.js.nft.json +1 -1
  115. package/.next/server/app/api/teams/meta/route.js.nft.json +1 -1
  116. package/.next/server/app/api/teams/orchestrator/route.js +1 -1
  117. package/.next/server/app/api/teams/orchestrator/route.js.nft.json +1 -1
  118. package/.next/server/app/api/teams/remove-team/route.js.nft.json +1 -1
  119. package/.next/server/app/api/teams/skills/install/route.js.nft.json +1 -1
  120. package/.next/server/app/api/teams/skills/route.js.nft.json +1 -1
  121. package/.next/server/app/api/teams/workflow-deliverables/file/route.js +1 -1
  122. package/.next/server/app/api/teams/workflow-deliverables/file/route.js.nft.json +1 -1
  123. package/.next/server/app/api/teams/workflow-deliverables/route.js.nft.json +1 -1
  124. package/.next/server/app/api/teams/workflow-runs/route.js.nft.json +1 -1
  125. package/.next/server/app/api/teams/workflow-templates/route.js.nft.json +1 -1
  126. package/.next/server/app/api/teams/workflow-triggers/route/app-paths-manifest.json +3 -0
  127. package/.next/server/app/api/teams/workflow-triggers/route/build-manifest.json +11 -0
  128. package/.next/server/app/api/teams/workflow-triggers/route/server-reference-manifest.json +4 -0
  129. package/.next/server/app/api/teams/workflow-triggers/route.js +6 -0
  130. package/.next/server/app/api/teams/workflow-triggers/route.js.map +5 -0
  131. package/.next/server/app/api/teams/workflow-triggers/route.js.nft.json +1 -0
  132. package/.next/server/app/api/teams/workflow-triggers/route_client-reference-manifest.js +2 -0
  133. package/.next/server/app/api/teams/workflows/route.js.nft.json +1 -1
  134. package/.next/server/app/api/tickets/assign/route.js.nft.json +1 -1
  135. package/.next/server/app/api/tickets/assignees/route.js.nft.json +1 -1
  136. package/.next/server/app/api/tickets/move/route.js.nft.json +1 -1
  137. package/.next/server/app/channels/page/build-manifest.json +3 -3
  138. package/.next/server/app/channels/page.js +2 -2
  139. package/.next/server/app/channels/page.js.nft.json +1 -1
  140. package/.next/server/app/channels/page_client-reference-manifest.js +1 -1
  141. package/.next/server/app/channels.html +2 -2
  142. package/.next/server/app/channels.rsc +6 -6
  143. package/.next/server/app/channels.segments/_full.segment.rsc +6 -6
  144. package/.next/server/app/channels.segments/_head.segment.rsc +1 -1
  145. package/.next/server/app/channels.segments/_index.segment.rsc +3 -3
  146. package/.next/server/app/channels.segments/_tree.segment.rsc +2 -2
  147. package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +2 -2
  148. package/.next/server/app/channels.segments/channels.segment.rsc +1 -1
  149. package/.next/server/app/cron-jobs/page/build-manifest.json +3 -3
  150. package/.next/server/app/cron-jobs/page.js +2 -2
  151. package/.next/server/app/cron-jobs/page.js.nft.json +1 -1
  152. package/.next/server/app/cron-jobs/page_client-reference-manifest.js +1 -1
  153. package/.next/server/app/goals/[id]/page/build-manifest.json +3 -3
  154. package/.next/server/app/goals/[id]/page.js +2 -2
  155. package/.next/server/app/goals/[id]/page.js.nft.json +1 -1
  156. package/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
  157. package/.next/server/app/goals/new/page/build-manifest.json +3 -3
  158. package/.next/server/app/goals/new/page.js +2 -2
  159. package/.next/server/app/goals/new/page.js.nft.json +1 -1
  160. package/.next/server/app/goals/new/page_client-reference-manifest.js +1 -1
  161. package/.next/server/app/goals/new.html +2 -2
  162. package/.next/server/app/goals/new.rsc +6 -6
  163. package/.next/server/app/goals/new.segments/_full.segment.rsc +6 -6
  164. package/.next/server/app/goals/new.segments/_head.segment.rsc +1 -1
  165. package/.next/server/app/goals/new.segments/_index.segment.rsc +3 -3
  166. package/.next/server/app/goals/new.segments/_tree.segment.rsc +2 -2
  167. package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +2 -2
  168. package/.next/server/app/goals/new.segments/goals/new.segment.rsc +1 -1
  169. package/.next/server/app/goals/new.segments/goals.segment.rsc +1 -1
  170. package/.next/server/app/goals/page/build-manifest.json +3 -3
  171. package/.next/server/app/goals/page.js +2 -2
  172. package/.next/server/app/goals/page.js.nft.json +1 -1
  173. package/.next/server/app/goals/page_client-reference-manifest.js +1 -1
  174. package/.next/server/app/goals.html +1 -1
  175. package/.next/server/app/goals.rsc +6 -6
  176. package/.next/server/app/goals.segments/_full.segment.rsc +6 -6
  177. package/.next/server/app/goals.segments/_head.segment.rsc +1 -1
  178. package/.next/server/app/goals.segments/_index.segment.rsc +3 -3
  179. package/.next/server/app/goals.segments/_tree.segment.rsc +2 -2
  180. package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +2 -2
  181. package/.next/server/app/goals.segments/goals.segment.rsc +1 -1
  182. package/.next/server/app/page/build-manifest.json +3 -3
  183. package/.next/server/app/page.js +4 -4
  184. package/.next/server/app/page.js.nft.json +1 -1
  185. package/.next/server/app/page_client-reference-manifest.js +1 -1
  186. package/.next/server/app/recipes/[id]/page/build-manifest.json +3 -3
  187. package/.next/server/app/recipes/[id]/page.js +4 -4
  188. package/.next/server/app/recipes/[id]/page.js.nft.json +1 -1
  189. package/.next/server/app/recipes/[id]/page_client-reference-manifest.js +1 -1
  190. package/.next/server/app/recipes/page/build-manifest.json +3 -3
  191. package/.next/server/app/recipes/page.js +4 -4
  192. package/.next/server/app/recipes/page.js.nft.json +1 -1
  193. package/.next/server/app/recipes/page_client-reference-manifest.js +1 -1
  194. package/.next/server/app/runs/page/build-manifest.json +3 -3
  195. package/.next/server/app/runs/page.js +5 -7
  196. package/.next/server/app/runs/page.js.nft.json +1 -1
  197. package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  198. package/.next/server/app/settings/page/build-manifest.json +3 -3
  199. package/.next/server/app/settings/page.js +2 -2
  200. package/.next/server/app/settings/page.js.nft.json +1 -1
  201. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  202. package/.next/server/app/settings.html +1 -1
  203. package/.next/server/app/settings.rsc +6 -6
  204. package/.next/server/app/settings.segments/_full.segment.rsc +6 -6
  205. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  206. package/.next/server/app/settings.segments/_index.segment.rsc +3 -3
  207. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  208. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
  209. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  210. package/.next/server/app/teams/[teamId]/deliverables/page/build-manifest.json +3 -3
  211. package/.next/server/app/teams/[teamId]/deliverables/page.js +5 -5
  212. package/.next/server/app/teams/[teamId]/deliverables/page.js.nft.json +1 -1
  213. package/.next/server/app/teams/[teamId]/deliverables/page_client-reference-manifest.js +1 -1
  214. package/.next/server/app/teams/[teamId]/page/build-manifest.json +3 -3
  215. package/.next/server/app/teams/[teamId]/page.js +5 -6
  216. package/.next/server/app/teams/[teamId]/page.js.nft.json +1 -1
  217. package/.next/server/app/teams/[teamId]/page_client-reference-manifest.js +1 -1
  218. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page/build-manifest.json +3 -3
  219. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js +5 -6
  220. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js.nft.json +1 -1
  221. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page_client-reference-manifest.js +1 -1
  222. package/.next/server/app/teams/[teamId]/runs/page/build-manifest.json +3 -3
  223. package/.next/server/app/teams/[teamId]/runs/page.js +2 -2
  224. package/.next/server/app/teams/[teamId]/runs/page.js.nft.json +1 -1
  225. package/.next/server/app/teams/[teamId]/runs/page_client-reference-manifest.js +1 -1
  226. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/build-manifest.json +3 -3
  227. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js +2 -2
  228. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.nft.json +1 -1
  229. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  230. package/.next/server/app/teams/[teamId]/tickets/page/build-manifest.json +3 -3
  231. package/.next/server/app/teams/[teamId]/tickets/page.js +2 -2
  232. package/.next/server/app/teams/[teamId]/tickets/page.js.nft.json +1 -1
  233. package/.next/server/app/teams/[teamId]/tickets/page_client-reference-manifest.js +1 -1
  234. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/build-manifest.json +3 -3
  235. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js +5 -5
  236. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -1
  237. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
  238. package/.next/server/app/teams/[teamId]/workflows/page/build-manifest.json +3 -3
  239. package/.next/server/app/teams/[teamId]/workflows/page.js +5 -5
  240. package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -1
  241. package/.next/server/app/teams/[teamId]/workflows/page_client-reference-manifest.js +1 -1
  242. package/.next/server/app/tickets/[ticket]/page/build-manifest.json +3 -3
  243. package/.next/server/app/tickets/[ticket]/page.js +2 -2
  244. package/.next/server/app/tickets/[ticket]/page.js.nft.json +1 -1
  245. package/.next/server/app/tickets/[ticket]/page_client-reference-manifest.js +1 -1
  246. package/.next/server/app/tickets/page/build-manifest.json +3 -3
  247. package/.next/server/app/tickets/page.js +2 -2
  248. package/.next/server/app/tickets/page.js.nft.json +1 -1
  249. package/.next/server/app/tickets/page_client-reference-manifest.js +1 -1
  250. package/.next/server/app-paths-manifest.json +4 -0
  251. package/.next/server/chunks/[externals]_node:fs_ddf6f167._.js +3 -0
  252. package/.next/server/chunks/[externals]_node:fs_ddf6f167._.js.map +1 -0
  253. package/.next/server/chunks/[root-of-the-server]__00a30f40._.js +1 -1
  254. package/.next/server/chunks/[root-of-the-server]__03c5f2a6._.js +3 -0
  255. package/.next/server/chunks/[root-of-the-server]__03c5f2a6._.js.map +1 -0
  256. package/.next/server/chunks/[root-of-the-server]__04f289da._.js +1 -1
  257. package/.next/server/chunks/[root-of-the-server]__08b4c8f2._.js +1 -1
  258. package/.next/server/chunks/[root-of-the-server]__0b2c557c._.js +3 -0
  259. package/.next/server/chunks/[root-of-the-server]__0b2c557c._.js.map +1 -0
  260. package/.next/server/chunks/[root-of-the-server]__0f55461f._.js +1 -1
  261. package/.next/server/chunks/[root-of-the-server]__1311d7a3._.js +1 -1
  262. package/.next/server/chunks/[root-of-the-server]__1480ffda._.js +1 -1
  263. package/.next/server/chunks/{[root-of-the-server]__be5f57b2._.js → [root-of-the-server]__17fa6089._.js} +2 -2
  264. package/.next/server/chunks/[root-of-the-server]__1873f417._.js +1 -1
  265. package/.next/server/chunks/[root-of-the-server]__1d4f6506._.js +3 -0
  266. package/.next/server/chunks/[root-of-the-server]__1d4f6506._.js.map +1 -0
  267. package/.next/server/chunks/[root-of-the-server]__1f18c0c4._.js +3 -0
  268. package/.next/server/chunks/[root-of-the-server]__1f18c0c4._.js.map +1 -0
  269. package/.next/server/chunks/[root-of-the-server]__1f1e62ac._.js +1 -1
  270. package/.next/server/chunks/[root-of-the-server]__20b1f42d._.js +1 -1
  271. package/.next/server/chunks/[root-of-the-server]__21ad9eeb._.js +1 -1
  272. package/.next/server/chunks/[root-of-the-server]__2c207e60._.js +1 -1
  273. package/.next/server/chunks/[root-of-the-server]__2dd1afff._.js +1 -1
  274. package/.next/server/chunks/[root-of-the-server]__3021a250._.js +1 -1
  275. package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js +1 -1
  276. package/.next/server/chunks/[root-of-the-server]__392e585d._.js +2 -2
  277. package/.next/server/chunks/[root-of-the-server]__3bfad714._.js +1 -1
  278. package/.next/server/chunks/[root-of-the-server]__3d15e850._.js +1 -1
  279. package/.next/server/chunks/[root-of-the-server]__3f648b9b._.js +1 -1
  280. package/.next/server/chunks/[root-of-the-server]__482575d2._.js +1 -1
  281. package/.next/server/chunks/[root-of-the-server]__4898071c._.js +4 -4
  282. package/.next/server/chunks/[root-of-the-server]__497e7a9d._.js +22 -0
  283. package/.next/server/chunks/[root-of-the-server]__497e7a9d._.js.map +1 -0
  284. package/.next/server/chunks/[root-of-the-server]__4ee12514._.js +1 -1
  285. package/.next/server/chunks/[root-of-the-server]__55defc7c._.js +1 -1
  286. package/.next/server/chunks/{[root-of-the-server]__74b80ca4._.js → [root-of-the-server]__5792c29e._.js} +2 -2
  287. package/.next/server/chunks/[root-of-the-server]__5aa1dc93._.js +1 -1
  288. package/.next/server/chunks/[root-of-the-server]__5c5990a6._.js +1 -1
  289. package/.next/server/chunks/[root-of-the-server]__603cb0fa._.js +1 -1
  290. package/.next/server/chunks/[root-of-the-server]__6131b7e2._.js +1 -1
  291. package/.next/server/chunks/[root-of-the-server]__6131b7e2._.js.map +1 -1
  292. package/.next/server/chunks/[root-of-the-server]__636919a0._.js +1 -1
  293. package/.next/server/chunks/[root-of-the-server]__653d42f0._.js +3 -0
  294. package/.next/server/chunks/[root-of-the-server]__653d42f0._.js.map +1 -0
  295. package/.next/server/chunks/[root-of-the-server]__663e79ff._.js +1 -1
  296. package/.next/server/chunks/{[root-of-the-server]__0883634a._.js → [root-of-the-server]__68a21bb1._.js} +2 -2
  297. package/.next/server/chunks/{[root-of-the-server]__0883634a._.js.map → [root-of-the-server]__68a21bb1._.js.map} +1 -1
  298. package/.next/server/chunks/[root-of-the-server]__69c065ce._.js +1 -1
  299. package/.next/server/chunks/[root-of-the-server]__6e463e5f._.js +3 -0
  300. package/.next/server/chunks/[root-of-the-server]__6e463e5f._.js.map +1 -0
  301. package/.next/server/chunks/{[root-of-the-server]__c1b0d50e._.js → [root-of-the-server]__7194dfe2._.js} +3 -3
  302. package/.next/server/chunks/{[root-of-the-server]__f45ceefb._.js → [root-of-the-server]__7347e39f._.js} +2 -2
  303. package/.next/server/chunks/{[root-of-the-server]__f45ceefb._.js.map → [root-of-the-server]__7347e39f._.js.map} +1 -1
  304. package/.next/server/chunks/[root-of-the-server]__74e2a9ba._.js +1 -1
  305. package/.next/server/chunks/[root-of-the-server]__7bdf9f6e._.js +1 -1
  306. package/.next/server/chunks/[root-of-the-server]__7bdf9f6e._.js.map +1 -1
  307. package/.next/server/chunks/[root-of-the-server]__7e12b9f4._.js +1 -1
  308. package/.next/server/chunks/[root-of-the-server]__87875179._.js +1 -1
  309. package/.next/server/chunks/{[root-of-the-server]__17124952._.js → [root-of-the-server]__89f2190c._.js} +3 -3
  310. package/.next/server/chunks/[root-of-the-server]__8f8e110f._.js +1 -1
  311. package/.next/server/chunks/[root-of-the-server]__91d0cce1._.js +1 -1
  312. package/.next/server/chunks/[root-of-the-server]__91d0cce1._.js.map +1 -1
  313. package/.next/server/chunks/[root-of-the-server]__937b40e2._.js +3 -0
  314. package/.next/server/chunks/[root-of-the-server]__937b40e2._.js.map +1 -0
  315. package/.next/server/chunks/[root-of-the-server]__9853b72d._.js +1 -1
  316. package/.next/server/chunks/[root-of-the-server]__9dba20b3._.js +1 -1
  317. package/.next/server/chunks/[root-of-the-server]__9e96d37b._.js +1 -1
  318. package/.next/server/chunks/[root-of-the-server]__aba68368._.js +1 -1
  319. package/.next/server/chunks/[root-of-the-server]__aed4e4f2._.js +1 -1
  320. package/.next/server/chunks/[root-of-the-server]__b6cff26d._.js +1 -1
  321. package/.next/server/chunks/{[root-of-the-server]__0bea0f71._.js → [root-of-the-server]__b986660c._.js} +2 -2
  322. package/.next/server/chunks/{[root-of-the-server]__0bea0f71._.js.map → [root-of-the-server]__b986660c._.js.map} +1 -1
  323. package/.next/server/chunks/{[root-of-the-server]__343776df._.js → [root-of-the-server]__bbed0e46._.js} +2 -2
  324. package/.next/server/chunks/[root-of-the-server]__c15c5141._.js +1 -1
  325. package/.next/server/chunks/[root-of-the-server]__c50e4bc4._.js +1 -1
  326. package/.next/server/chunks/[root-of-the-server]__cc0860cb._.js +1 -1
  327. package/.next/server/chunks/[root-of-the-server]__cc3ea05b._.js +3 -0
  328. package/.next/server/chunks/[root-of-the-server]__cc3ea05b._.js.map +1 -0
  329. package/.next/server/chunks/[root-of-the-server]__d302afb4._.js +1 -1
  330. package/.next/server/chunks/[root-of-the-server]__d4a8660e._.js +1 -1
  331. package/.next/server/chunks/[root-of-the-server]__e1432bba._.js +3 -0
  332. package/.next/server/chunks/[root-of-the-server]__e1432bba._.js.map +1 -0
  333. package/.next/server/chunks/[root-of-the-server]__e478ef0d._.js +1 -1
  334. package/.next/server/chunks/[root-of-the-server]__e9acbabd._.js +1 -1
  335. package/.next/server/chunks/[root-of-the-server]__e9d9d570._.js +1 -1
  336. package/.next/server/chunks/[root-of-the-server]__f408c708._.js +2 -2
  337. package/.next/server/chunks/[root-of-the-server]__f4cbadf7._.js +1 -1
  338. package/.next/server/chunks/[root-of-the-server]__f5cd81f1._.js +1 -1
  339. package/.next/server/chunks/[root-of-the-server]__f85b5a70._.js +3 -0
  340. package/.next/server/chunks/[root-of-the-server]__f85b5a70._.js.map +1 -0
  341. package/.next/server/chunks/[root-of-the-server]__f994dc62._.js +1 -1
  342. package/.next/server/chunks/[root-of-the-server]__fb22e719._.js +3 -0
  343. package/.next/server/chunks/[root-of-the-server]__fb22e719._.js.map +1 -0
  344. package/.next/server/chunks/_next-internal_server_app_api_cron_bulk_route_actions_30f8adb9.js +3 -0
  345. package/.next/server/chunks/_next-internal_server_app_api_cron_bulk_route_actions_30f8adb9.js.map +1 -0
  346. package/.next/server/chunks/_next-internal_server_app_api_manifest_route_actions_7f7622ff.js +3 -0
  347. package/.next/server/chunks/_next-internal_server_app_api_manifest_route_actions_7f7622ff.js.map +1 -0
  348. package/.next/server/chunks/_next-internal_server_app_api_teams_list_route_actions_5aa8c937.js +3 -0
  349. package/.next/server/chunks/_next-internal_server_app_api_teams_list_route_actions_5aa8c937.js.map +1 -0
  350. package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-triggers_route_actions_e86e3b38.js +3 -0
  351. package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-triggers_route_actions_e86e3b38.js.map +1 -0
  352. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js +1 -1
  353. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js.map +1 -1
  354. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_3a1b29e4.js +1 -1
  355. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_cb6ddb24.js +13 -0
  356. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_cb6ddb24.js.map +1 -0
  357. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_f5680d9e.js +1 -1
  358. package/.next/server/chunks/node_modules_yaml_dist_49c13b35._.js +1 -1
  359. package/.next/server/chunks/node_modules_yaml_dist_49c13b35._.js.map +1 -1
  360. package/.next/server/chunks/ssr/[root-of-the-server]__195421b7._.js +2 -2
  361. package/.next/server/chunks/ssr/[root-of-the-server]__195421b7._.js.map +1 -1
  362. package/.next/server/chunks/ssr/[root-of-the-server]__2a657095._.js +3 -0
  363. package/.next/server/chunks/ssr/[root-of-the-server]__2a657095._.js.map +1 -0
  364. package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js +1 -1
  365. package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js.map +1 -1
  366. package/.next/server/chunks/ssr/[root-of-the-server]__3f55f975._.js +3 -0
  367. package/.next/server/chunks/ssr/[root-of-the-server]__3f55f975._.js.map +1 -0
  368. package/.next/server/chunks/ssr/[root-of-the-server]__471bc2e7._.js +1 -1
  369. package/.next/server/chunks/ssr/[root-of-the-server]__471bc2e7._.js.map +1 -1
  370. package/.next/server/chunks/ssr/[root-of-the-server]__4d24c088._.js +3 -0
  371. package/.next/server/chunks/ssr/[root-of-the-server]__4d24c088._.js.map +1 -0
  372. package/.next/server/chunks/ssr/[root-of-the-server]__6390ce9c._.js +3 -0
  373. package/.next/server/chunks/ssr/[root-of-the-server]__6390ce9c._.js.map +1 -0
  374. package/.next/server/chunks/ssr/[root-of-the-server]__7b8cdea5._.js +3 -0
  375. package/.next/server/chunks/ssr/[root-of-the-server]__7b8cdea5._.js.map +1 -0
  376. package/.next/server/chunks/ssr/[root-of-the-server]__7d21617d._.js +3 -0
  377. package/.next/server/chunks/ssr/[root-of-the-server]__7d21617d._.js.map +1 -0
  378. package/.next/server/chunks/ssr/[root-of-the-server]__8135c9d5._.js +3 -0
  379. package/.next/server/chunks/ssr/[root-of-the-server]__8135c9d5._.js.map +1 -0
  380. package/.next/server/chunks/ssr/{node_modules_next_dist_1038a5b9._.js → [root-of-the-server]__8e8f535b._.js} +2 -2
  381. package/.next/server/chunks/ssr/{node_modules_next_dist_1038a5b9._.js.map → [root-of-the-server]__8e8f535b._.js.map} +1 -1
  382. package/.next/server/chunks/ssr/[root-of-the-server]__92524828._.js +1 -1
  383. package/.next/server/chunks/ssr/[root-of-the-server]__92524828._.js.map +1 -1
  384. package/.next/server/chunks/ssr/[root-of-the-server]__997aa62c._.js +1 -1
  385. package/.next/server/chunks/ssr/[root-of-the-server]__997aa62c._.js.map +1 -1
  386. package/.next/server/chunks/ssr/[root-of-the-server]__9db1df87._.js +3 -0
  387. package/.next/server/chunks/ssr/[root-of-the-server]__9db1df87._.js.map +1 -0
  388. package/.next/server/chunks/ssr/[root-of-the-server]__9e1ab064._.js +1 -1
  389. package/.next/server/chunks/ssr/[root-of-the-server]__9e1ab064._.js.map +1 -1
  390. package/.next/server/chunks/ssr/[root-of-the-server]__a2e3966f._.js +3 -0
  391. package/.next/server/chunks/ssr/[root-of-the-server]__a2e3966f._.js.map +1 -0
  392. package/.next/server/chunks/ssr/[root-of-the-server]__af792402._.js +1 -1
  393. package/.next/server/chunks/ssr/[root-of-the-server]__af792402._.js.map +1 -1
  394. package/.next/server/chunks/ssr/[root-of-the-server]__b5f65083._.js +1 -1
  395. package/.next/server/chunks/ssr/[root-of-the-server]__b5f65083._.js.map +1 -1
  396. package/.next/server/chunks/ssr/[root-of-the-server]__becf14db._.js +3 -0
  397. package/.next/server/chunks/ssr/[root-of-the-server]__becf14db._.js.map +1 -0
  398. package/.next/server/chunks/ssr/[root-of-the-server]__c106a298._.js +3 -0
  399. package/.next/server/chunks/ssr/[root-of-the-server]__c106a298._.js.map +1 -0
  400. package/.next/server/chunks/ssr/[root-of-the-server]__cb91405c._.js +3 -0
  401. package/.next/server/chunks/ssr/[root-of-the-server]__cb91405c._.js.map +1 -0
  402. package/.next/server/chunks/ssr/[root-of-the-server]__f59c3144._.js +3 -0
  403. package/.next/server/chunks/ssr/[root-of-the-server]__f59c3144._.js.map +1 -0
  404. package/.next/server/chunks/ssr/[root-of-the-server]__fbe5ff69._.js +1 -1
  405. package/.next/server/chunks/ssr/[root-of-the-server]__fbe5ff69._.js.map +1 -1
  406. package/.next/server/chunks/ssr/_1ee3bd7b._.js +1 -1
  407. package/.next/server/chunks/ssr/_1ee3bd7b._.js.map +1 -1
  408. package/.next/server/chunks/ssr/{_deb7a691._.js → _2ab986a4._.js} +2 -2
  409. package/.next/server/chunks/ssr/_2ab986a4._.js.map +1 -0
  410. package/.next/server/chunks/ssr/_2d8d7232._.js +1 -1
  411. package/.next/server/chunks/ssr/_2d8d7232._.js.map +1 -1
  412. package/.next/server/chunks/ssr/_43a80c61._.js +1 -1
  413. package/.next/server/chunks/ssr/_43a80c61._.js.map +1 -1
  414. package/.next/server/chunks/ssr/_641f29bc._.js +3 -0
  415. package/.next/server/chunks/ssr/_641f29bc._.js.map +1 -0
  416. package/.next/server/chunks/ssr/_ac993243._.js +3 -0
  417. package/.next/server/chunks/ssr/_ac993243._.js.map +1 -0
  418. package/.next/server/chunks/ssr/_f636ce67._.js +3 -0
  419. package/.next/server/chunks/ssr/_f636ce67._.js.map +1 -0
  420. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +7 -1
  421. package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -1
  422. package/.next/server/chunks/ssr/{_7f9e89d2._.js → node_modules_next_10fb6ad9._.js} +3 -3
  423. package/.next/server/chunks/ssr/node_modules_next_10fb6ad9._.js.map +1 -0
  424. package/.next/server/chunks/ssr/node_modules_next_dist_25a30daf._.js +1 -1
  425. package/.next/server/chunks/ssr/node_modules_next_dist_compiled_bc6b8ddf._.js +1 -1
  426. package/.next/server/chunks/ssr/node_modules_yaml_dist_18db9ed7._.js +2 -2
  427. package/.next/server/chunks/ssr/src_13139e3d._.js +1 -1
  428. package/.next/server/chunks/ssr/src_13139e3d._.js.map +1 -1
  429. package/.next/server/chunks/ssr/src_2a73b867._.js +1 -1
  430. package/.next/server/chunks/ssr/src_2a73b867._.js.map +1 -1
  431. package/.next/server/chunks/ssr/src_2dbb3b7f._.js +1 -1
  432. package/.next/server/chunks/ssr/src_2dbb3b7f._.js.map +1 -1
  433. package/.next/server/chunks/ssr/src_417bc4a6._.js +1 -1
  434. package/.next/server/chunks/ssr/src_417bc4a6._.js.map +1 -1
  435. package/.next/server/chunks/ssr/src_59477309._.js +1 -1
  436. package/.next/server/chunks/ssr/src_59477309._.js.map +1 -1
  437. package/.next/server/chunks/ssr/src_79d55c05._.js +1 -1
  438. package/.next/server/chunks/ssr/src_79d55c05._.js.map +1 -1
  439. package/.next/server/chunks/ssr/src_app_HomeClient_tsx_f9f7568d._.js +1 -1
  440. package/.next/server/chunks/ssr/src_app_HomeClient_tsx_f9f7568d._.js.map +1 -1
  441. package/.next/server/chunks/ssr/src_app_agents_[agentId]_agent-editor_tsx_f85bbe65._.js +1 -1
  442. package/.next/server/chunks/ssr/src_app_agents_[agentId]_agent-editor_tsx_f85bbe65._.js.map +1 -1
  443. package/.next/server/chunks/ssr/src_app_cron-jobs_cron-jobs-client_tsx_ec91a73d._.js +1 -1
  444. package/.next/server/chunks/ssr/src_app_cron-jobs_cron-jobs-client_tsx_ec91a73d._.js.map +1 -1
  445. package/.next/server/chunks/ssr/src_app_recipes_[id]_RecipeEditor_index_tsx_98393217._.js +1 -1
  446. package/.next/server/chunks/ssr/src_app_recipes_[id]_RecipeEditor_index_tsx_98393217._.js.map +1 -1
  447. package/.next/server/chunks/ssr/src_app_recipes_recipes-client_tsx_8ed3ca94._.js +1 -1
  448. package/.next/server/chunks/ssr/src_app_recipes_recipes-client_tsx_8ed3ca94._.js.map +1 -1
  449. package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js +3 -0
  450. package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js.map +1 -0
  451. package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js +1 -1
  452. package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js.map +1 -1
  453. package/.next/server/chunks/ssr/src_app_tickets_TicketsBoardClient_tsx_5e156ef3._.js +1 -1
  454. package/.next/server/chunks/ssr/src_app_tickets_TicketsBoardClient_tsx_5e156ef3._.js.map +1 -1
  455. package/.next/server/middleware-build-manifest.js +3 -3
  456. package/.next/server/pages/404.html +1 -1
  457. package/.next/server/pages/500.html +2 -2
  458. package/.next/server/server-reference-manifest.js +1 -1
  459. package/.next/server/server-reference-manifest.json +1 -1
  460. package/.next/static/chunks/001f840e2d5598af.js +10 -0
  461. package/.next/static/chunks/212477db59154fa7.js +3 -0
  462. package/.next/static/chunks/242fee5849d79d1b.js +1 -0
  463. package/.next/static/chunks/26d8587a145bded7.js +1 -0
  464. package/.next/static/chunks/{b83c1ca03c3b8c6d.js → 372ac1d07db9969a.js} +1 -1
  465. package/.next/static/chunks/4a0d27f3023676a5.js +1 -0
  466. package/.next/static/chunks/4ad57cfc54e20abd.js +1 -0
  467. package/.next/static/chunks/4e8866ad8f1f6b2b.js +1 -0
  468. package/.next/static/chunks/7d9e7a36b92578fd.js +1 -0
  469. package/.next/static/chunks/87f63f654bc046a2.js +3 -0
  470. package/.next/static/chunks/8aac543d98940eb3.js +2 -0
  471. package/.next/static/chunks/8acd42df55d57556.js +1 -0
  472. package/.next/static/chunks/95b7564f2360e762.js +1 -0
  473. package/.next/static/chunks/9801fc48f532d076.js +1 -0
  474. package/.next/static/chunks/{d6e1b7307a9274ce.js → 9c627cb11f73ac4c.js} +1 -1
  475. package/.next/static/chunks/ad652e4b50e1fb17.js +1 -0
  476. package/.next/static/chunks/aff32612e6b9d901.js +1 -0
  477. package/.next/static/chunks/c6c561355e97baa8.js +7 -0
  478. package/.next/static/chunks/d4c855575c079ffc.js +3 -0
  479. package/.next/static/chunks/d593ea5e91e81b45.js +1 -0
  480. package/.next/static/chunks/{87879d67a1601ee0.js → e0984ec981f01c0d.js} +1 -1
  481. package/.next/static/chunks/f5039461b97678c7.js +1 -0
  482. package/.next/static/chunks/f51763a2aea0a4b6.js +1 -0
  483. package/.next/static/chunks/f7f157ba542e1ae5.js +1 -0
  484. package/.next/static/chunks/fb008837ba324b34.css +3 -0
  485. package/.next/static/chunks/{turbopack-dbf3078dbf5863bd.js → turbopack-bdd9478663f034d6.js} +1 -1
  486. package/LICENSE +192 -0
  487. package/README.md +19 -5
  488. package/openclaw/index.ts +154 -5
  489. package/openclaw.plugin.json +2 -8
  490. package/package.json +5 -2
  491. package/.next/server/chunks/[root-of-the-server]__18423bab._.js +0 -3
  492. package/.next/server/chunks/[root-of-the-server]__18423bab._.js.map +0 -1
  493. package/.next/server/chunks/[root-of-the-server]__35ec765d._.js +0 -13
  494. package/.next/server/chunks/[root-of-the-server]__35ec765d._.js.map +0 -1
  495. package/.next/server/chunks/[root-of-the-server]__3c92e5aa._.js +0 -3
  496. package/.next/server/chunks/[root-of-the-server]__3c92e5aa._.js.map +0 -1
  497. package/.next/server/chunks/[root-of-the-server]__813dd669._.js +0 -3
  498. package/.next/server/chunks/[root-of-the-server]__813dd669._.js.map +0 -1
  499. package/.next/server/chunks/[root-of-the-server]__b457b884._.js +0 -22
  500. package/.next/server/chunks/[root-of-the-server]__b457b884._.js.map +0 -1
  501. package/.next/server/chunks/[root-of-the-server]__c5e88cbb._.js +0 -3
  502. package/.next/server/chunks/[root-of-the-server]__c5e88cbb._.js.map +0 -1
  503. package/.next/server/chunks/[root-of-the-server]__da7df58d._.js +0 -3
  504. package/.next/server/chunks/[root-of-the-server]__da7df58d._.js.map +0 -1
  505. package/.next/server/chunks/ssr/[root-of-the-server]__0a5cb3ca._.js +0 -3
  506. package/.next/server/chunks/ssr/[root-of-the-server]__0a5cb3ca._.js.map +0 -1
  507. package/.next/server/chunks/ssr/[root-of-the-server]__177cec74._.js +0 -3
  508. package/.next/server/chunks/ssr/[root-of-the-server]__177cec74._.js.map +0 -1
  509. package/.next/server/chunks/ssr/[root-of-the-server]__4981f370._.js +0 -3
  510. package/.next/server/chunks/ssr/[root-of-the-server]__4981f370._.js.map +0 -1
  511. package/.next/server/chunks/ssr/[root-of-the-server]__51e26a01._.js +0 -3
  512. package/.next/server/chunks/ssr/[root-of-the-server]__51e26a01._.js.map +0 -1
  513. package/.next/server/chunks/ssr/[root-of-the-server]__6b6b7595._.js +0 -3
  514. package/.next/server/chunks/ssr/[root-of-the-server]__6b6b7595._.js.map +0 -1
  515. package/.next/server/chunks/ssr/[root-of-the-server]__8f9585b9._.js +0 -3
  516. package/.next/server/chunks/ssr/[root-of-the-server]__8f9585b9._.js.map +0 -1
  517. package/.next/server/chunks/ssr/[root-of-the-server]__9e400864._.js +0 -3
  518. package/.next/server/chunks/ssr/[root-of-the-server]__9e400864._.js.map +0 -1
  519. package/.next/server/chunks/ssr/[root-of-the-server]__a6348eaa._.js +0 -3
  520. package/.next/server/chunks/ssr/[root-of-the-server]__a6348eaa._.js.map +0 -1
  521. package/.next/server/chunks/ssr/[root-of-the-server]__ad4e8478._.js +0 -3
  522. package/.next/server/chunks/ssr/[root-of-the-server]__ad4e8478._.js.map +0 -1
  523. package/.next/server/chunks/ssr/[root-of-the-server]__b5aa14b8._.js +0 -3
  524. package/.next/server/chunks/ssr/[root-of-the-server]__b5aa14b8._.js.map +0 -1
  525. package/.next/server/chunks/ssr/[root-of-the-server]__b8998a21._.js +0 -3
  526. package/.next/server/chunks/ssr/[root-of-the-server]__b8998a21._.js.map +0 -1
  527. package/.next/server/chunks/ssr/[root-of-the-server]__e9bd9b71._.js +0 -3
  528. package/.next/server/chunks/ssr/[root-of-the-server]__e9bd9b71._.js.map +0 -1
  529. package/.next/server/chunks/ssr/_32beff4b._.js +0 -3
  530. package/.next/server/chunks/ssr/_32beff4b._.js.map +0 -1
  531. package/.next/server/chunks/ssr/_7f9e89d2._.js.map +0 -1
  532. package/.next/server/chunks/ssr/_8538617d._.js +0 -3
  533. package/.next/server/chunks/ssr/_8538617d._.js.map +0 -1
  534. package/.next/server/chunks/ssr/_a506fcf8._.js +0 -3
  535. package/.next/server/chunks/ssr/_a506fcf8._.js.map +0 -1
  536. package/.next/server/chunks/ssr/_deb7a691._.js.map +0 -1
  537. package/.next/server/chunks/ssr/d4b1c_modules_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_6ef9314a.js +0 -3
  538. package/.next/server/chunks/ssr/d4b1c_modules_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_6ef9314a.js.map +0 -1
  539. package/.next/server/chunks/ssr/src_app_21685f67._.js +0 -3
  540. package/.next/server/chunks/ssr/src_app_21685f67._.js.map +0 -1
  541. package/.next/static/chunks/0edab8a24d59a626.js +0 -2
  542. package/.next/static/chunks/410dc851d0e3033d.js +0 -1
  543. package/.next/static/chunks/4e38b3f280ced64c.js +0 -1
  544. package/.next/static/chunks/4f2b8a07ace7e02b.js +0 -1
  545. package/.next/static/chunks/57ad5290f7e92ffd.css +0 -3
  546. package/.next/static/chunks/8a919077b73862da.js +0 -1
  547. package/.next/static/chunks/9906444fb1191bb4.js +0 -1
  548. package/.next/static/chunks/a625725b4cd85ea3.js +0 -1
  549. package/.next/static/chunks/ac32974713c57cb3.js +0 -1
  550. package/.next/static/chunks/bdb7ebd88ea13111.js +0 -1
  551. package/.next/static/chunks/bfcfbe145220d365.js +0 -1
  552. package/.next/static/chunks/c0d9f53d91cc65c5.js +0 -10
  553. package/.next/static/chunks/c0e2f959abc4cc13.js +0 -1
  554. package/.next/static/chunks/c822e53f79a492c7.js +0 -1
  555. package/.next/static/chunks/ce6b2024d13b4333.js +0 -1
  556. package/.next/static/chunks/d13249af74d111cf.js +0 -3
  557. package/.next/static/chunks/d16f64ca3a8ed208.js +0 -1
  558. package/.next/static/chunks/d7541a171116ec9c.js +0 -1
  559. package/.next/static/chunks/e03137fd069b1514.js +0 -1
  560. package/.next/static/chunks/e10faa9296c8b246.js +0 -1
  561. package/.next/static/chunks/ec24877f7b7f82c5.js +0 -3
  562. package/.next/static/chunks/ff3bbb5df40b2cc4.js +0 -1
  563. /package/.next/server/chunks/{[root-of-the-server]__be5f57b2._.js.map → [root-of-the-server]__17fa6089._.js.map} +0 -0
  564. /package/.next/server/chunks/{[root-of-the-server]__74b80ca4._.js.map → [root-of-the-server]__5792c29e._.js.map} +0 -0
  565. /package/.next/server/chunks/{[root-of-the-server]__c1b0d50e._.js.map → [root-of-the-server]__7194dfe2._.js.map} +0 -0
  566. /package/.next/server/chunks/{[root-of-the-server]__17124952._.js.map → [root-of-the-server]__89f2190c._.js.map} +0 -0
  567. /package/.next/server/chunks/{[root-of-the-server]__343776df._.js.map → [root-of-the-server]__bbed0e46._.js.map} +0 -0
  568. /package/.next/static/{F0PhVXEIb3LrF9XQem5EQ → QPNWZUPFu-1zEy4dGcXv5}/_buildManifest.js +0 -0
  569. /package/.next/static/{F0PhVXEIb3LrF9XQem5EQ → QPNWZUPFu-1zEy4dGcXv5}/_clientMiddlewareManifest.json +0 -0
  570. /package/.next/static/{F0PhVXEIb3LrF9XQem5EQ → QPNWZUPFu-1zEy4dGcXv5}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
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(18050),a=e.i(74080);function r({open:e,onClose:r,title:s,children:i,error:l,confirmLabel:o,confirmBusyLabel:n,onConfirm:c,confirmDisabled:d,busy:m,confirmButtonClassName:u}){if(!e)return null;let x=m??!1,h=x&&n?n:o,p="confirmation-modal-title";return(0,a.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:r,"aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":p,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:p,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:s}),i,l?(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:l}):null,(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:r,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)||x,onClick:c,className:u??"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:h})]})]})})})]}),document.body)}e.s(["ConfirmationModal",()=>r])},54510,e=>{"use strict";var t=e.i(18050),a=e.i(44355);function r({open:e,onClose:r,title:s,entityLabel:i,bodyText:l,onConfirm:o,busy:n,error:c}){return(0,t.jsx)(a.ConfirmationModal,{open:e,onClose:r,title:s,confirmLabel:"Delete",confirmBusyLabel:"Deleting…",onConfirm:o,busy:n,error:c??void 0,children:(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[s," ",(0,t.jsx)("code",{className:"font-mono",children:i}),"? ",l]})})}function s(e){return function(a){let s=a[e.entityLabelKey];return(0,t.jsx)(r,{open:a.open,onClose:a.onClose,title:e.title,entityLabel:s,bodyText:e.bodyText,onConfirm:a.onConfirm,busy:a.busy,error:a.error})}}let i=s({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),l=s({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),o=s({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),n=s({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});e.s(["DeleteAgentModal",0,i,"DeleteCronJobModal",0,n,"DeleteRecipeModal",0,o,"DeleteTeamModal",0,l],54510)},92236,e=>{"use strict";async function t(e){let t=await fetch("/api/scaffold",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...e,applyConfig:!0,overwrite:!1})}),a=await t.json();return{res:t,json:a}}e.s(["fetchScaffold",()=>t])},56460,e=>{"use strict";function t(e,a=80){let r=String(e??"").toLowerCase().trim(),s=Math.min(r.length,2*a),i="",l=!1;for(let e=0;e<s;e++){let t=r[e];t>="a"&&t<="z"||t>="0"&&t<="9"?(i+=t,l=!1):" "!==t&&"-"!==t&&"_"!==t||l||(i+="-",l=!0)}for(;i.startsWith("-");)i=i.slice(1);for(;i.endsWith("-");)i=i.slice(0,-1);return i.slice(0,a)}e.s(["slugifyId",()=>t])},44321,e=>{"use strict";var t=e.i(18050),a=e.i(22016),r=e.i(18566),s=e.i(71645),i=e.i(74080);let l={1:"Ordering team…",2:"Cooking up agents…",3:"Serving them up hot…"};function o({open:e,step:a,onDismiss:r}){return e?(0,i.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[9999]",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-[color:var(--ck-bg-base)]/90 pointer-events-none"}),r?(0,t.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),r()},className:"fixed right-4 top-4 z-[10000] rounded-full border border-white/10 bg-[color:var(--ck-bg-glass)] px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-[color:var(--ck-bg-glass-strong)]","aria-label":"Dismiss loading overlay",title:"Dismiss",children:"Esc"}):null,(0,t.jsx)("div",{className:"fixed inset-0 flex items-center justify-center p-6 sm:p-10",children:(0,t.jsxs)("div",{className:"w-full max-w-2xl rounded-2xl border border-white/10 bg-[color:var(--ck-bg-glass-strong)] p-8 sm:p-10 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("div",{className:"text-2xl font-semibold text-[color:var(--ck-text-primary)]",children:"Claw Kitchen"}),(0,t.jsx)("div",{className:"mt-3 text-base text-[color:var(--ck-text-secondary)]",children:"Hang tight — we’re updating your OpenClaw install."}),(0,t.jsx)("div",{className:"mt-8 space-y-4 text-base",children:[1,2,3].map(e=>{let r=e===a,s=e<a;return(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"h-4 w-4 rounded-full "+(s?"bg-emerald-400":r?"bg-[var(--ck-accent-red)] animate-pulse":"bg-white/20")}),(0,t.jsx)("div",{className:s?"text-[color:var(--ck-text-secondary)] line-through":"text-[color:var(--ck-text-primary)]",children:l[e]})]},e)})})]})})]}),document.body):null}var n=e.i(42771);async function c(e,t){let a=t.intervalMs??500,r=Date.now();for(;Date.now()-r<t.timeoutMs;){let t=await e();if(null!==t)return t;await new Promise(e=>setTimeout(e,a))}return null}var d=e.i(92236),m=e.i(76972),u=e.i(56460);function x(e){let{open:t,name:a,setName:r,id:i,setId:l,idTouched:o,setIdTouched:n,slugify:c=u.slugifyId}=e,d=(0,s.useMemo)(()=>c(a),[a,c]),m=o?i:d;return(0,s.useEffect)(()=>{t&&(o||l(d))},[d,t,o,l]),(0,s.useEffect)(()=>{t||(n(!1),r(""),l(""))},[t,n,r,l]),{derivedId:d,effectiveId:m}}var h=e.i(44355);function p({open:e,title:a,recipeId:r,recipeName:s,children:i,error:l,busy:o,canConfirm:n,onClose:c,onConfirm:d,confirmLabel:m}){return(0,t.jsxs)(h.ConfirmationModal,{open:e,onClose:c,title:a,error:l,confirmLabel:m,confirmBusyLabel:"Creating…",confirmDisabled:!n,busy:o,onConfirm:d,children:[(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:["Create a new ",a.toLowerCase().replace("create ","")," from recipe"," ",(0,t.jsx)("code",{className:"font-mono",children:r}),s?(0,t.jsxs)(t.Fragment,{children:[" ","(",(0,t.jsx)("span",{className:"font-medium",children:s}),")"]}):null,"."]}),i]})}function g({open:e,recipeId:a,recipeName:r,teamId:i,setTeamId:l,installCron:o,setInstallCron:n,busy:c,error:d,onClose:m,onConfirm:u}){let[h,g]=(0,s.useState)(""),[v,f]=(0,s.useState)(!1),{effectiveId:y}=x({open:e,name:h,setName:g,id:i,setId:l,idTouched:v,setIdTouched:f});return(0,t.jsxs)(p,{open:e,title:"Create team",recipeId:a,recipeName:r,error:d,busy:c,canConfirm:!!y.trim(),onClose:m,onConfirm:u,confirmLabel:"Create team",children:[(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Team name"}),(0,t.jsx)("input",{value:h,onChange:e=>g(e.target.value),placeholder:"e.g. Crypto Team",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Team id"}),(0,t.jsx)("input",{value:y,onChange:e=>{f(!0),l(e.target.value)},placeholder:"e.g. my-team",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]"}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"This will scaffold ~/.openclaw/workspace-<teamId> and add the team to config."})]}),(0,t.jsxs)("label",{className:"mt-4 flex items-center gap-2 text-sm text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:o,onChange:e=>n(e.target.checked)}),"Install cron jobs from this recipe"]})]})}function v(e){return/^[a-z0-9][a-z0-9_-]{1,62}$/.test(e)}function f({open:e,teamId:a,setTeamId:r,busy:i,error:l,onClose:o,onConfirm:c,onRolesChange:d}){let[m,u]=(0,s.useState)([]),[x,h]=(0,s.useState)(null),[g,f]=(0,s.useState)(""),[y,b]=(0,s.useState)({}),[k,w]=(0,s.useState)(null),[j,N]=(0,s.useState)(null),[C,I]=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=!1;return(async()=>{let t=await (0,n.fetchJsonWithStatus)("/api/recipes/local-agent-catalog",{cache:"no-store"});if(!e){if(!t.ok)return h(t.error||"Failed to load local agent catalog");if(!t.data.ok)return h(t.data.error||"Failed to load local agent catalog");u(Array.isArray(t.data.items)?t.data.items:[])}})(),()=>{e=!0}},[]);let[S,T]=(0,s.useState)({state:"unknown"}),$=(0,s.useMemo)(()=>{let e=g.trim().toLowerCase(),t=m.map(e=>{var t;let a;if("team-role"===e.kind){let t=`team:${e.recipeId}:${e.roleId}`,a=e.recipeName||e.recipeId,r=e.roleName?`${e.roleName} (${e.roleId})`:e.roleId;return{id:t,label:`${a} → ${r}`,roleId:e.roleId,displayName:e.roleName||`${a} ${e.roleId}`,haystack:`${e.recipeId} ${e.recipeName||""} ${e.roleId} ${e.roleName||""}`.toLowerCase()}}let r=`agent:${e.recipeId}`,s=e.recipeName||e.recipeId,i=e.description?` — ${e.description}`:"";return{id:r,label:`${s} (agent recipe: ${e.recipeId})${i}`,roleId:((a=(t=e.recipeId).split("/").pop()||t).split("-").slice(-1)[0]||a).toLowerCase().replace(/[^a-z0-9_-]+/g,"-"),displayName:s,haystack:`${e.recipeId} ${e.recipeName||""} ${e.description||""}`.toLowerCase()}});return(e?t.filter(t=>t.haystack.includes(e)):t).slice().sort((e,t)=>e.label.localeCompare(t.label)).map(({haystack:e,...t})=>t)},[m,g]),M=(0,s.useMemo)(()=>Object.values(y),[y]),D=a.trim(),L=(0,s.useMemo)(()=>e?D?v(D)?D.endsWith("-team")?"taken"===S.state?`Team id is already taken: ${D}`:null:"Team id must end with -team.":"Invalid team id. Use lowercase letters/numbers with - or _ (2-63 chars).":"Team id is required.":null,[e,D,S.state]),A=(0,s.useMemo)(()=>{let e=new Map;for(let t of M){let a=String(t.roleId??"").trim();if(!a){e.set(t.agentId,"Role id is required.");continue}v(a)||e.set(t.agentId,"Invalid role id (lowercase letters/numbers with - or _).")}return e},[M]),E=!L&&"checking"!==S.state&&"unknown"!==S.state&&M.length>0&&0===A.size;return(0,s.useEffect)(()=>{e&&d(M)},[e,M,d]),(0,s.useEffect)(()=>{if(!e)return;let t=!1,a=setTimeout(async()=>{if(!D||!(v(D)&&D.endsWith("-team")))return void T({state:"unknown"});T({state:"checking"});let e=await (0,n.fetchJsonWithStatus)(`/api/ids/check?kind=team&id=${encodeURIComponent(D)}`,{cache:"no-store"});if(!t){if(!e.ok)return void T({state:"unknown"});if(e.data.ok&&!0===e.data.available)return void T({state:"available"});T({state:"taken",reason:e.data.reason})}},250);return()=>{t=!0,clearTimeout(a)}},[e,D]),(0,s.useEffect)(()=>{if(!e||!E)return;let t=!1,a=setTimeout(async()=>{let e=D.endsWith("-team")?D.slice(0,-5):D,a=await (0,n.fetchJsonWithStatus)("/api/recipes/custom-team",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({dryRun:!0,recipeId:e,teamId:D,roles:M.map(e=>({roleId:e.roleId,displayName:e.displayName}))})});if(!t){if(!a.ok){I(a.error),w(null),N(null);return}if(!a.data.ok){I(a.data.error||"Failed to generate preview"),w(null),N(null);return}I(null),w("string"==typeof a.data.md?a.data.md:null),N("string"==typeof a.data.filePath?a.data.filePath:null)}},250);return()=>{t=!0,clearTimeout(a)}},[e,E,D,M]),(0,t.jsxs)(p,{open:e,title:"Create custom team",recipeId:"(new recipe)",recipeName:"Custom Team",error:l||x,busy:i,canConfirm:E,onClose:o,onConfirm:c,confirmLabel:"Create team",children:[(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Team id"}),(0,t.jsx)("input",{value:a,onChange:e=>r(e.target.value.toLowerCase().replace(/\s+/g,"-")),placeholder:"e.g. my-team",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]",autoFocus:!0}),L?(0,t.jsx)("div",{className:"mt-2 text-xs text-red-300",children:L}):null,!L&&D?(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["checking"===S.state?"Checking availability…":null,"available"===S.state?"Available.":null]}):null]}),(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Select agents"}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"MVP: this creates new team roles that mirror the selected agents' names. You can edit the resulting team recipe later."}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("input",{value:g,onChange:e=>f(e.target.value),placeholder:"Search local roles/agents (recipe id, name, role)",className:"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]"}),(0,t.jsxs)("div",{className:"mt-3 max-h-[220px] overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 p-3",children:[x?(0,t.jsx)("div",{className:"text-sm text-red-300",children:x}):null,x||0!==$.length?null:(0,t.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"No local roles/agents found."}),!x&&$.length?(0,t.jsx)("div",{className:"space-y-2",children:$.map(e=>{let a=!!y[e.id];return(0,t.jsxs)("label",{className:"flex items-start gap-2 text-sm text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:t=>{let a={...y};t.target.checked?a[e.id]={agentId:e.id,roleId:e.roleId,displayName:e.displayName}:delete a[e.id],b(a)}}),(0,t.jsx)("span",{className:"min-w-0 break-words",children:e.label})]},e.id)})}):null]})]})]}),M.length?(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Role mapping"}),(0,t.jsx)("div",{className:"mt-3 space-y-3",children:M.map(e=>{let a=A.get(e.agentId);return(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 p-3",children:[(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:e.agentId}),(0,t.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Role id"}),(0,t.jsx)("input",{value:e.roleId,onChange:t=>{b(a=>({...a,[e.agentId]:{...a[e.agentId],roleId:t.target.value}}))},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),a?(0,t.jsx)("div",{className:"mt-1 text-xs text-red-300",children:a}):null]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Display name"}),(0,t.jsx)("input",{value:e.displayName,onChange:t=>{b(a=>({...a,[e.agentId]:{...a[e.agentId],displayName:t.target.value}}))},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]})]},e.agentId)})})]}):null,(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Preview"}),(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["Generated recipe preview (best-effort). This is what will be written to",(0,t.jsx)("code",{className:"ml-1",children:"~/.openclaw/workspace/recipes/<teamId>.md"}),"."]}),E&&C?(0,t.jsx)("div",{className:"mt-2 text-xs text-red-300",children:C}):null,E&&j?(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["Target path: ",(0,t.jsx)("code",{children:j})]}):null,(0,t.jsx)("pre",{className:"mt-3 max-h-[260px] overflow-auto whitespace-pre-wrap rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-3 text-xs text-[color:var(--ck-text-secondary)]",children:E?k||"(Loading preview…)":"(Select a valid team id and at least one agent to preview.)"})]})]})}function y({open:e,recipeId:a,recipeName:r,agentId:i,setAgentId:l,agentName:o,setAgentName:c,existingRecipeIds:d,existingAgentIds:m,busy:u,error:h,onClose:g,onConfirm:v}){var f,y;let[b,k]=(0,s.useState)(!1),[w,j]=(0,s.useState)(null),{effectiveId:N}=x({open:e,name:o,setName:c,id:i,setId:l,idTouched:b,setIdTouched:k}),C=String(N??"").trim(),I=(0,s.useMemo)(()=>e?C?d.includes(C)?{state:"taken",reason:"recipe-id-collision"}:m.includes(C)?{state:"taken",reason:"agent-exists"}:null:{state:"empty"}:{state:"empty"},[e,C,d,m]),S=I??w??{state:"available"};return(0,s.useEffect)(()=>{if(!e||null!==I)return;let t=setTimeout(()=>{(async()=>{j({state:"checking"});try{let e=await (0,n.fetchJson)(`/api/ids/check?kind=agent&id=${encodeURIComponent(C)}`,{cache:"no-store"});e.available?j({state:"available"}):j({state:"taken",reason:e.reason})}catch{j({state:"available"})}})()},250);return()=>clearTimeout(t)},[e,I,C]),(0,t.jsxs)(p,{open:e,title:"Create agent",recipeId:a,recipeName:r,error:h,busy:u,canConfirm:!!N.trim()&&"taken"!==S.state&&"checking"!==S.state,onClose:g,onConfirm:v,confirmLabel:"Create agent",children:[(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Agent name"}),(0,t.jsx)("input",{value:o,onChange:e=>c(e.target.value),placeholder:"e.g. Crypto Onchain",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Agent id"}),(0,t.jsx)("input",{value:N,onChange:e=>{k(!0),l(e.target.value)},placeholder:"e.g. crypto-onchain",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)] "+("available"===(f=S.state)?"border-emerald-400/50":"taken"===f?"border-red-400/60":"border-white/10")}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"taken"===(y=S.state)?"That id is already taken.":"available"===y?"Id is available.":"This will scaffold ~/.openclaw/workspace/agents/<agentId> and add the agent to config."})]})]})}var b=e.i(54510),k=e.i(82310);function w({title:e,items:r,onDelete:s,onCreateTeam:i,onCreateAgent:l,installedAgentIds:o}){return(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:e}),0===r.length?(0,t.jsx)("div",{className:"mt-3 ck-glass px-4 py-3 text-sm text-[color:var(--ck-text-secondary)]",children:"None yet."}):(0,t.jsx)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2",children:r.map(e=>{var r;let n="agent"===e.kind&&o.includes(e.id),c=n?`/agents/${encodeURIComponent(e.id)}`:`/recipes/${encodeURIComponent(e.id)}`,d=(r=e.source,n?"Edit agent":"builtin"===r?"View recipe":"Edit recipe");return(0,t.jsxs)("div",{className:"ck-glass flex flex-col gap-3 px-4 py-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium text-[color:var(--ck-text-primary)] whitespace-normal break-words",children:e.name}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:e.id})," • ",e.kind," • ",e.source]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:["team"===e.kind&&i?(0,t.jsx)("button",{type:"button",onClick:()=>i(e),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)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15",children:"Create team"}):null,"agent"===e.kind&&l?(0,t.jsx)("button",{type:"button",onClick:()=>l(e),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)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15",children:"Create agent"}):null,(0,t.jsx)(a.default,{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)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15",href:c,children:d}),s?(0,t.jsx)("button",{type:"button",onClick:()=>s(e.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:"Delete"}):null]})]},`${e.source}:${e.id}`)})})]})}function j({builtin:e,customTeamRecipes:a,customAgentRecipes:i,installedAgentIds:l,initialOpenCustomTeam:u=!1}){let x=(0,m.useToast)(),[h,p]=(0,s.useState)(!1),[v,j]=(0,s.useState)(1),N=(0,r.useRouter)(),[C,I]=(0,s.useState)(!1),[S,T]=(0,s.useState)(""),[$,M]=(0,s.useState)(!1),[D,L]=(0,s.useState)(null),[A,E]=(0,s.useState)(!1),[O,R]=(0,s.useState)(null),[P,W]=(0,s.useState)(""),[J,B]=(0,s.useState)(!0),[F,U]=(0,s.useState)(!1),[z,K]=(0,s.useState)(null),[q,_]=(0,s.useState)(!1),[G,V]=(0,s.useState)(null),[Y,H]=(0,s.useState)(""),[Q,X]=(0,s.useState)(""),[Z,ee]=(0,s.useState)(!1),[et,ea]=(0,s.useState)(null),[er,es]=(0,s.useState)(u),[ei,el]=(0,s.useState)(""),[eo,en]=(0,s.useState)(!1),[ec,ed]=(0,s.useState)(null),[em,eu]=(0,s.useState)([]),ex=e=>{T(e),L(null),I(!0)},eh=e=>{R(e),W(""),B(!0),K(null),E(!0)},ep=e=>{V(e),H(""),X(""),ea(null),_(!0)};async function eg(){M(!0),L(null);try{let e=await (0,n.fetchJsonWithStatus)("/api/recipes/delete",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:S})});if(!e.ok){if(409===e.status)return void L(e.error);throw Error(e.error)}if(!e.data.ok)return void L(e.data.error??"Delete failed");x.push({kind:"success",message:`Deleted recipe: ${S}`}),I(!1),window.location.reload()}catch(e){x.push({kind:"error",message:(0,k.errorMessage)(e)})}finally{M(!1)}}async function ev(e){let t=e?.timeoutMs??3e4;return await c(async()=>{try{return!!(await fetch("/healthz",{cache:"no-store"})).ok||null}catch{return null}},{timeoutMs:t})??!1}async function ef(e,t){let a=t?.timeoutMs??3e4;return await c(async()=>{try{let[t,a]=await Promise.all([fetch("/api/recipes",{cache:"no-store"}),fetch(`/api/teams/meta?teamId=${encodeURIComponent(e)}`,{cache:"no-store"})]),r=await t.json(),s=(Array.isArray(r.recipes)?r.recipes:[]).some(t=>String(t.id??"")===e&&"team"===String(t.kind??"")),i=await a.json(),l=!!(a.ok&&i.ok&&!i.missing);return!!s&&!!l||null}catch{return null}},{timeoutMs:a})??!1}async function ey(e,t,a){let r=await (0,n.fetchJsonWithStatus)("/api/teams/meta",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,recipeId:t,recipeName:a})});if(!r.ok)throw Error(r.error);if(!r.data.ok)throw Error(r.data.error||"Failed to attach team meta")}async function eb(e){let{kind:t,recipeId:a,teamId:r,agentId:s,name:i,cronInstallChoice:l,setBusy:o,setError:n,setModalOpen:c,setOverlayOpen:m,setOverlayStep:u,successMessage:h,navigateTo:p,waitBeforeNavigate:g}=e;o(!0),n(null),c(!1),m(!0),u(1);let v=null;try{let{res:e,json:o}=await (0,d.fetchScaffold)("team"===t?{kind:"team",recipeId:a,teamId:r,cronInstallChoice:l}:{kind:"agent",recipeId:a,agentId:s,name:i});if(!e.ok||!o.ok)throw Error(String(o.error||("team"===t?"Create team failed":"Create agent failed")));u(2),v=setTimeout(()=>{u(e=>e<3?3:e)},2e4);let n="string"==typeof o.stderr?o.stderr:"";if(/Failed to start CLI:/i.test(n)||/\bError: /i.test(n))throw Error(n.trim()||"Scaffold failed");if(/Restart required:/i.test(n)){u(3);try{await fetch("/api/gateway/restart",{method:"POST"})}catch{}await ev({timeoutMs:6e4})}g&&await g(),v&&clearTimeout(v),x.push({kind:"success",message:h}),c(!1),N.push(p),setTimeout(()=>m(!1),500)}catch(t){v&&clearTimeout(v),m(!1);let e=(0,k.errorMessage)(t);n(e),x.push({kind:"error",message:e})}finally{o(!1)}}async function ek(){let e=function(e,t){if(!e)return null;let a=t.trim();return a?a.endsWith("-team")?a===e.id?`Team id cannot be the same as the recipe id (${e.id}). Choose a new team id.`:null:"Team id must end with -team.":"Team id is required."}(O,P);if(e)return void K(e);if(!O)return;let t=P.trim();await eb({kind:"team",recipeId:O.id,teamId:t,cronInstallChoice:J?"yes":"no",setBusy:U,setError:K,setModalOpen:E,setOverlayOpen:p,setOverlayStep:j,successMessage:`Created team: ${t}`,navigateTo:`/teams/${encodeURIComponent(t)}`,waitBeforeNavigate:()=>ef(t,{timeoutMs:6e4})})}async function ew(){if(!G)return;let e=Y.trim();e?e===G.id?ea(`Agent id cannot be the same as the recipe id (${G.id}). Choose a new agent id.`):await eb({kind:"agent",recipeId:G.id,agentId:e,name:Q.trim()||void 0,setBusy:ee,setError:ea,setModalOpen:_,setOverlayOpen:p,setOverlayStep:j,successMessage:`Created agent: ${e}`,navigateTo:`/agents/${encodeURIComponent(e)}`}):ea("Agent id is required.")}async function ej(){let e=ei.trim();if(!e)return void ed("Team id is required.");let t=e.endsWith("-team")?e.slice(0,-5):e;if(!t)return void ed("Team id is invalid.");if(em.length<1)return void ed("Select at least one agent.");ed(null);try{en(!0);let a=await (0,n.fetchJsonWithStatus)("/api/recipes/custom-team",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({recipeId:t,teamId:e,roles:em.map(e=>({roleId:e.roleId,displayName:e.displayName}))})});if(en(!1),!a.ok)throw Error(a.error);if(!a.data.ok)throw Error(a.data.error||"Failed to create custom team recipe");await eb({kind:"team",recipeId:t,teamId:e,cronInstallChoice:"no",setBusy:en,setError:ed,setModalOpen:es,setOverlayOpen:p,setOverlayStep:j,successMessage:`Created team: ${e}`,navigateTo:`/teams/${encodeURIComponent(e)}`,waitBeforeNavigate:async()=>{await ey(e,t,"Custom Team"),await ef(e,{timeoutMs:6e4})}})}catch(t){en(!1);let e=(0,k.errorMessage)(t);ed(e),x.push({kind:"error",message:e})}}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o,{open:h,step:v,onDismiss:()=>{p(!1)}}),(0,t.jsxs)("div",{className:"mt-8 space-y-10",children:[(0,t.jsxs)("section",{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:"Custom recipes"}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:["Workspace recipes (editable) — stored under ",(0,t.jsx)("code",{className:"font-mono",children:"~/.openclaw/workspace/recipes/"}),"."]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{el(""),eu([]),ed(null),es(!0)},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)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15",children:"Create custom team"})]}),(0,t.jsxs)("div",{className:"mt-4 space-y-8",children:[(0,t.jsx)(w,{title:`Teams (${a.length})`,items:a,onDelete:ex,onCreateTeam:eh,installedAgentIds:l}),(0,t.jsx)(w,{title:`Agents (${i.length})`,items:i,onDelete:ex,onCreateAgent:ep,installedAgentIds:l})]})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:"Builtin recipes"}),(0,t.jsx)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:"Bundled recipes shipped with the plugin."}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(w,{title:`All (${e.length})`,items:e,onCreateTeam:eh,onCreateAgent:ep,installedAgentIds:l})})]})]}),(0,t.jsx)(b.DeleteRecipeModal,{open:C,recipeId:S,busy:$,error:D,onClose:()=>I(!1),onConfirm:eg}),(0,t.jsx)(f,{open:er,teamId:ei,setTeamId:el,busy:eo,error:ec,onRolesChange:eu,onClose:()=>es(!1),onConfirm:ej}),(0,t.jsx)(g,{open:A,recipeId:O?.id??"",recipeName:O?.name??"",teamId:P,setTeamId:W,installCron:J,setInstallCron:B,busy:F,error:z,onClose:()=>E(!1),onConfirm:ek}),(0,t.jsx)(y,{open:q,recipeId:G?.id??"",recipeName:G?.name??"",agentId:Y,setAgentId:H,agentName:Q,setAgentName:X,existingRecipeIds:[...e,...a,...i].map(e=>e.id),existingAgentIds:l,busy:Z,error:et,onClose:()=>_(!1),onConfirm:ew})]})}e.s(["default",()=>j],44321)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function s(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>s])},41588,e=>{"use strict";var s=e.i(18050),t=e.i(22016),a=e.i(82310),l=e.i(42771),r=e.i(18566),n=e.i(71645);async function c(){try{return{goals:(await (0,l.fetchJson)("/api/goals",{cache:"no-store"})).goals??[],error:null}}catch(e){return{goals:[],error:(0,a.errorMessage)(e)}}}function i({children:e}){return(0,s.jsx)("span",{className:"rounded-full bg-[color:var(--ck-bg-glass)] px-2 py-0.5 text-xs text-[color:var(--ck-text-secondary)]",children:e})}function o(){let[e,l]=(0,n.useState)(null),[o,d]=(0,n.useState)(null),x=((0,r.useSearchParams)().get("team")??"").trim(),[m,u]=(0,n.useState)("all");async function h(){l(null),d(null);try{let{goals:e,error:s}=await c();d(s),l(s?[]:e)}catch(e){d((0,a.errorMessage)(e)),l([])}}(0,n.useEffect)(()=>{let e=!1;return(async()=>{try{let{goals:s,error:t}=await c();if(e)return;d(t),l(t?[]:s)}catch(s){if(e)return;d((0,a.errorMessage)(s)),l([])}})(),()=>{e=!0}},[]);let g=(0,n.useMemo)(()=>{let s=e??[];return(x&&(s=s.filter(e=>Array.isArray(e.teams)&&e.teams.includes(x))),"all"===m)?s:s.filter(e=>e.status===m)},[e,m,x]),p=(0,n.useMemo)(()=>{let s=e??[],t={all:s.length,active:0,planned:0,done:0};for(let e of s)"active"===e.status?t.active+=1:"done"===e.status?t.done+=1:t.planned+=1;return t},[e]);function v(e){return(0,s.jsx)(t.default,{href:`/goals/${encodeURIComponent(e.id)}`,className:"block ck-glass p-5 transition hover:bg-[color:var(--ck-bg-glass)]",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"truncate text-base font-semibold text-[color:var(--ck-text-primary)]",children:e.title}),(0,s.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[(0,s.jsx)("span",{className:"font-mono",children:e.id}),e.updatedAt?` • updated ${new Date(e.updatedAt).toLocaleString()}`:""]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(i,{children:e.status}),e.teams?.slice(0,3).map(e=>(0,s.jsx)(i,{children:e},e)),e.tags?.slice(0,3).map(e=>(0,s.jsxs)(i,{children:["#",e]},e))]})]})},e.id)}return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Goals"}),(0,s.jsxs)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:["Stored in ",(0,s.jsx)("code",{className:"font-mono",children:"~/.openclaw/workspace/notes/goals/"}),x?(0,s.jsxs)(s.Fragment,{children:[" ","• filtered by team ",(0,s.jsx)("code",{className:"font-mono",children:x})]}):null]})]}),(0,s.jsx)(t.default,{href:"/goals/new",className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white",children:"Create goal"})]}),(0,s.jsx)("div",{className:"ck-glass p-4",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)("label",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"Status"}),(0,s.jsxs)("select",{className:"rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] bg-transparent px-2 py-1 text-sm",value:m,onChange:e=>u(e.target.value),children:[(0,s.jsxs)("option",{value:"all",children:["All (",p.all,")"]}),(0,s.jsxs)("option",{value:"active",children:["Active (",p.active,")"]}),(0,s.jsxs)("option",{value:"planned",children:["Planned (",p.planned,")"]}),(0,s.jsxs)("option",{value:"done",children:["Done (",p.done,")"]})]}),(0,s.jsx)("button",{className:"ml-auto text-sm font-medium hover:underline",onClick:()=>void h(),children:"Refresh"})]})}),o?(0,s.jsx)("div",{className:"ck-glass p-4 text-sm text-red-300",children:o}):null,null==e&&(0,s.jsx)("div",{className:"ck-glass p-6 text-sm text-[color:var(--ck-text-secondary)]",children:"Loading…"}),null!=e&&0===g.length&&(0,s.jsxs)("div",{className:"ck-glass p-6",children:[(0,s.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"No goals yet."}),(0,s.jsx)("div",{className:"mt-3",children:(0,s.jsx)(t.default,{href:"/goals/new",className:"text-sm font-medium hover:underline",children:"Create your first goal →"})})]}),null!=e&&g.length>0&&"all"!==m&&(0,s.jsx)("div",{className:"space-y-3",children:g.map(v)}),null!=e&&g.length>0&&"all"===m&&(0,s.jsx)("div",{className:"space-y-8",children:["active","planned","done"].map(e=>{let t=g.filter(s=>s.status===e);return t.length?(0,s.jsxs)("section",{children:[(0,s.jsx)("div",{className:"mb-2 flex items-end justify-between",children:(0,s.jsxs)("h2",{className:"text-sm font-semibold tracking-wide text-[color:var(--ck-text-secondary)] uppercase",children:[e," (",t.length,")"]})}),(0,s.jsx)("div",{className:"space-y-3",children:t.map(v)})]},e):null})})]})}e.s(["default",()=>o])}]);
@@ -1 +0,0 @@
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(18050),a=e.i(74080);function s({open:e,onClose:s,title:r,children:i,error:l,confirmLabel:n,confirmBusyLabel:o,onConfirm:c,confirmDisabled:d,busy:m,confirmButtonClassName:x}){if(!e)return null;let u=m??!1,h=u&&o?o:n,g="confirmation-modal-title";return(0,a.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":g,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:g,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:r}),i,l?(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:l}):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:h})]})]})})})]}),document.body)}e.s(["ConfirmationModal",()=>s])},54510,e=>{"use strict";var t=e.i(18050),a=e.i(44355);function s({open:e,onClose:s,title:r,entityLabel:i,bodyText:l,onConfirm:n,busy:o,error:c}){return(0,t.jsx)(a.ConfirmationModal,{open:e,onClose:s,title:r,confirmLabel:"Delete",confirmBusyLabel:"Deleting…",onConfirm:n,busy:o,error:c??void 0,children:(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[r," ",(0,t.jsx)("code",{className:"font-mono",children:i}),"? ",l]})})}function r(e){return function(a){let r=a[e.entityLabelKey];return(0,t.jsx)(s,{open:a.open,onClose:a.onClose,title:e.title,entityLabel:r,bodyText:e.bodyText,onConfirm:a.onConfirm,busy:a.busy,error:a.error})}}let i=r({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),l=r({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),n=r({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),o=r({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});e.s(["DeleteAgentModal",0,i,"DeleteCronJobModal",0,o,"DeleteRecipeModal",0,n,"DeleteTeamModal",0,l],54510)},72532,e=>{"use strict";var t=e.i(18050);function a({title:e,files:a,loading:s,showOptionalFiles:r,onShowOptionalChange:i,selectedFileName:l,onSelectFile:n,renderItemExtra:o}){let c=r?a:a.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:r,onChange:e=>i(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 a;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:()=>n(e.name),className:(a=e.name,s="w-full rounded-[var(--ck-radius-sm)] px-3 py-2 text-left text-sm",l===a?`${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]}),o?.(e)]})},e.name)})]})]})}e.s(["FileListWithOptionalToggle",()=>a])},88810,e=>{"use strict";var t=e.i(18050),a=e.i(71645),s=e.i(18566),r=e.i(82310),i=e.i(42771),l=e.i(54510),n=e.i(72532);function o({name:e,emoji:a,theme:s,avatar:r,saving:i,returnTo:l,onNameChange:n,onEmojiChange:o,onThemeChange:c,onAvatarChange:d,onSave:m,router:x}){return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Identity"}),(0,t.jsx)("label",{className:"mt-3 block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Name"}),(0,t.jsx)("input",{value:e,onChange:e=>n(e.target.value),className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),(0,t.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Emoji"}),(0,t.jsx)("input",{value:a,onChange:e=>o(e.target.value),placeholder:"🦞",className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Theme"}),(0,t.jsx)("input",{value:s,onChange:e=>c(e.target.value),placeholder:"warm, sharp, calm",className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Avatar"}),(0,t.jsx)("input",{value:r,onChange:e=>d(e.target.value),placeholder:"avatars/openclaw.png",className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]}),(0,t.jsxs)("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row",children:[(0,t.jsx)("button",{disabled:i,onClick:m,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)] transition-colors hover:bg-[var(--ck-accent-red-hover)] active:bg-[var(--ck-accent-red-active)] disabled:opacity-50",children:i?"Saving…":"Save"}),l?(0,t.jsx)("button",{disabled:i,onClick:async()=>{await m(),x.push(l)},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)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15 disabled:opacity-50",children:"Save & return"}):null]})]})}function c({model:e,saving:a,onModelChange:s,onSave:r}){return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Config"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"Thin slice: edit the configured model id for this agent (writes to OpenClaw config)."}),(0,t.jsx)("label",{className:"mt-3 block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Model"}),(0,t.jsx)("input",{value:e,onChange:e=>s(e.target.value),placeholder:"openai/gpt-5.2",className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)("button",{disabled:a,onClick:r,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)] disabled:opacity-50",children:a?"Saving…":"Save config"})})]})}function d({agentId:e,skillsList:a,availableSkills:s,skillsLoading:r,selectedSkill:i,installingSkill:l,skillError:n,skillMsg:o,onSelectedSkillChange:c,onInstallSkill:d}){return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Skills"}),(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:["Skills installed in this ",(0,t.jsx)("strong",{children:"agent"})," workspace (",(0,t.jsx)("code",{children:"skills/"}),"). If you want a skill available to all agents, add it at the team level."]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Installed"}),(0,t.jsxs)("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-[color:var(--ck-text-secondary)]",children:[r&&(0,t.jsx)("li",{children:"Loading…"}),!r&&a.length>0&&a.map(e=>(0,t.jsx)("li",{children:e},e)),!r&&!a.length&&(0,t.jsx)("li",{children:"None installed."})]})]}),(0,t.jsxs)("div",{className:"mt-5 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/15 p-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Add a skill"}),(0,t.jsxs)("div",{className:"mt-2 flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,t.jsx)("select",{value:i,onChange:e=>c(e.target.value),className:"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]",disabled:l||!s.length,children:s.length?s.map(e=>(0,t.jsx)("option",{value:e,children:e},e)):(0,t.jsx)("option",{value:"",children:"No skills found"})}),(0,t.jsx)("button",{type:"button",disabled:l||!i,onClick:()=>void d(),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)] disabled:opacity-50",children:l?"Adding…":"Add"})]}),n&&(0,t.jsx)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:n}),!n&&o&&(0,t.jsx)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-emerald-400/30 bg-emerald-500/10 p-3 text-sm text-emerald-100",children:o}),(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["This uses ",(0,t.jsxs)("code",{children:["openclaw recipes install-skill <skill> --agent-id ",e," --yes"]}),"."]})]})]})}function m({agentFiles:e,agentFilesLoading:a,showOptionalFiles:s,fileName:r,fileContent:i,loadingFile:l,saving:o,fileError:c,onShowOptionalChange:d,onLoadFile:m,onFileContentChange:x,onSaveFile:u,onCreateMissingFile:h}){return(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,t.jsx)(n.FileListWithOptionalToggle,{title:"Agent files",files:e,loading:a,showOptionalFiles:s,onShowOptionalChange:d,selectedFileName:r,onSelectFile:m,renderItemExtra:e=>e.missing?(0,t.jsx)("button",{type:"button",disabled:o,onClick:()=>void h(e.name),className:"shrink-0 rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-xs font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-50",children:"Create"}):null}),(0,t.jsxs)("div",{className:"ck-glass-strong p-4 lg:col-span-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:["Edit: ",r]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[l?(0,t.jsx)("span",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Loading…"}):null,(0,t.jsx)("button",{disabled:o,onClick:u,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)] disabled:opacity-50",children:o?"Saving…":"Save file"})]})]}),c?(0,t.jsx)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:c}):null,(0,t.jsx)("textarea",{value:i,onChange:e=>x(e.target.value),className:"mt-3 h-[55vh] w-full resize-none rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-3 font-mono text-xs text-[color:var(--ck-text-primary)]",spellCheck:!1})]})]})}async function x(e,t){t.setAgentFilesLoading(!0),t.setSkillsLoading(!0);try{let[a,s,r]=await (0,i.fetchAll)([`/api/agents/files?agentId=${encodeURIComponent(e)}`,`/api/agents/skills?agentId=${encodeURIComponent(e)}`,"/api/skills/available"]),l=[];try{let e=await a.json();if(a.ok&&e.ok){let a=Array.isArray(e.files)?e.files:[];t.setAgentFiles(a.map(e=>({name:String(e.name??""),missing:!!e.missing,required:!!e.required,rationale:"string"==typeof e.rationale?e.rationale:void 0})))}}catch{}try{let e=await s.json();s.ok&&e.ok&&(l=Array.isArray(e.skills)?e.skills:[],t.setSkillsList(l))}catch{}try{let e=await r.json();if(r.ok&&e.ok){let a=Array.isArray(e.skills)?e.skills:[];t.setAvailableSkills(a);let s=a.find(e=>!l.includes(e));t.setSelectedSkill(s??a[0]??"")}}catch{}}finally{t.setAgentFilesLoading(!1),t.setSkillsLoading(!1)}}function u({agentId:e,returnTo:n}){let u=(0,s.useRouter)(),[h,g]=(0,a.useState)(null),[p,v]=(0,a.useState)(!0),[k,b]=(0,a.useState)(!1),[y,f]=(0,a.useState)(!1),[j,w]=(0,a.useState)(""),[N,S]=(0,a.useState)(""),[C,T]=(0,a.useState)(""),[A,L]=(0,a.useState)(""),[I,E]=(0,a.useState)(!1),[O,F]=(0,a.useState)(!1),[M,D]=(0,a.useState)(null),[U,R]=(0,a.useState)("identity"),[J,$]=(0,a.useState)(""),[K,P]=(0,a.useState)(""),[q,B]=(0,a.useState)(""),[G,W]=(0,a.useState)(""),[Y,z]=(0,a.useState)(""),[H,V]=(0,a.useState)([]),[Q,X]=(0,a.useState)([]),[Z,_]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(""),[ea,es]=(0,a.useState)(!1),[er,ei]=(0,a.useState)([]),[el,en]=(0,a.useState)(!1),[eo,ec]=(0,a.useState)(!1),[ed,em]=(0,a.useState)("SOUL.md"),[ex,eu]=(0,a.useState)(""),eh=e.includes("-")?e.split("-").slice(0,-1).join("-"):"";async function eg(e){b(!0),w("");try{let t=await e();w(t)}catch(e){w((0,r.errorMessage)(e))}finally{b(!1)}}async function ep(){await eg(async()=>(await (0,i.fetchJson)("/api/agents/identity",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,name:J,emoji:K,theme:q,avatar:G})}),"Saved identity via openclaw agents set-identity"))}async function ev(){await eg(async()=>(await (0,i.fetchJson)("/api/agents/update",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,patch:{model:Y}})}),"Saved agent config (model) and restarted gateway"))}async function ek(t){em(t),eu(""),f(!0),S("");try{let a=await (0,i.fetchJson)(`/api/agents/file?agentId=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`,{cache:"no-store"});if(!a.ok)throw Error("Failed to load file");eu(String(a.content??""))}catch(e){S((0,r.errorMessage)(e))}finally{f(!1)}}async function eb(){b(!0),S("");try{if(!(await (0,i.fetchJson)("/api/agents/file",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,name:ed,content:ex})})).ok)throw Error("Failed to save file");try{let t=await (0,i.fetchJson)(`/api/agents/files?agentId=${encodeURIComponent(e)}`,{cache:"no-store"});t.ok&&Array.isArray(t.files)&&ei(t.files)}catch{}}catch(e){S((0,r.errorMessage)(e))}finally{b(!1)}}async function ey(e){em(e),S(""),eu(function(e){switch(e){case"SOUL.md":return"# SOUL.md\n\n";case"AGENTS.md":return"# AGENTS.md\n\n";case"TOOLS.md":return"# TOOLS.md\n\n";case"STATUS.md":return"# STATUS.md\n\n- (empty)\n";case"NOTES.md":return"# NOTES.md\n\n- (empty)\n";case"IDENTITY.md":return"# IDENTITY.md\n\n- **Name:**\n- **Creature:**\n- **Vibe:**\n- **Emoji:**\n- **Avatar:**\n";case"USER.md":return"# USER.md\n\n";case"HEARTBEAT.md":return"# HEARTBEAT.md\n\n# Keep this file empty (or with only comments) to skip heartbeat API calls.\n";default:return""}}(e)),await eb()}async function ef(){F(!0),D(null),w("");try{await (0,i.fetchJson)(`/api/agents/${encodeURIComponent(e)}`,{method:"DELETE"}),window.location.href="/"}catch(e){D((0,r.errorMessage)(e)),F(!1)}}return(0,a.useEffect)(()=>{(async()=>{v(!0),w("");try{let t=await (0,i.fetchJson)("/api/agents",{cache:"no-store"}),a=(Array.isArray(t.agents)?t.agents:[]).find(t=>t.id===e)??null;g(a),$(a?.identityName??""),z(a?.model??""),v(!1),x(e,{setAgentFiles:ei,setSkillsList:V,setAvailableSkills:X,setSelectedSkill:et,setAgentFilesLoading:en,setSkillsLoading:_})}catch(e){w((0,r.errorMessage)(e))}finally{v(!1)}})()},[e]),(0,a.useEffect)(()=>{if("files"!==U||!er.length)return;let e=er.some(e=>e.name===ed),t=er[0]?.name,a=e?ed:t;a&&(a!==ed&&(em(a),eu("")),ex||ek(a))},[U,e,er.length]),p?(0,t.jsx)("div",{className:"ck-glass mx-auto max-w-4xl p-6",children:"Loading…"}):h?(0,t.jsxs)("div",{className:"ck-glass mx-auto max-w-4xl p-6 sm:p-8",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Agent editor"}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-secondary)]",children:[h.id,h.isDefault?" • default":"",h.model?` • ${h.model}`:""]})]}),(0,t.jsx)("button",{type:"button",disabled:k,onClick:()=>{D(null),E(!0)},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-2 text-sm font-medium text-[color:var(--ck-accent-red)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:rgba(255,59,48,0.12)] disabled:opacity-50",children:"Delete agent"})]}),h.workspace?(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:["Workspace: ",h.workspace]}):null,eh?(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:["Team: ",eh]}):null,j?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 p-3 text-sm text-[color:var(--ck-text-primary)]",children:j}):null,(0,t.jsx)("div",{className:"mt-6 flex flex-wrap gap-2",children:[{id:"identity",label:"Identity"},{id:"config",label:"Config"},{id:"skills",label:"Skills"},{id:"files",label:"Files"}].map(e=>(0,t.jsx)("button",{onClick:()=>R(e.id),className:U===e.id?"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)]":"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)] shadow-[var(--ck-shadow-1)] hover:bg-white/10",children:e.label},e.id))}),(0,t.jsxs)("div",{className:"mt-6 grid grid-cols-1 gap-4",children:["identity"===U&&(0,t.jsx)(o,{name:J,emoji:K,theme:q,avatar:G,saving:k,returnTo:n,onNameChange:$,onEmojiChange:P,onThemeChange:B,onAvatarChange:W,onSave:ep,router:u}),"config"===U&&(0,t.jsx)(c,{model:Y,saving:k,onModelChange:z,onSave:ev}),"skills"===U&&(0,t.jsx)(d,{agentId:e,skillsList:H,availableSkills:Q,skillsLoading:Z,selectedSkill:ee,installingSkill:ea,skillError:A,skillMsg:C,onSelectedSkillChange:et,onInstallSkill:async()=>{es(!0),T(""),L("");try{await (0,i.fetchJson)("/api/agents/skills/install",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,skill:ee})}),T(`Installed skill: ${ee}`);try{let t=await (0,i.fetchJson)(`/api/agents/skills?agentId=${encodeURIComponent(e)}`,{cache:"no-store"});t.ok&&Array.isArray(t.skills)&&V(t.skills)}catch{}}catch(e){L((0,r.errorMessage)(e))}finally{es(!1)}}}),"files"===U&&(0,t.jsx)(m,{agentFiles:er,agentFilesLoading:el,showOptionalFiles:eo,fileName:ed,fileContent:ex,loadingFile:y,saving:k,fileError:N,onShowOptionalChange:ec,onLoadFile:ek,onFileContentChange:eu,onSaveFile:eb,onCreateMissingFile:ey})]}),(0,t.jsx)(l.DeleteAgentModal,{open:I,agentId:e,busy:O,error:M,onClose:()=>E(!1),onConfirm:()=>void ef()})]}):(0,t.jsxs)("div",{className:"ck-glass mx-auto max-w-4xl p-6",children:["Agent not found: ",e]})}e.s(["default",()=>u],88810)}]);
@@ -1,3 +0,0 @@
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(18050),r=e.i(74080);function a({open:e,onClose:a,title:s,children:i,error:o,confirmLabel:l,confirmBusyLabel:n,onConfirm:c,confirmDisabled:d,busy:u,confirmButtonClassName:m}){if(!e)return null;let x=u??!1,p=x&&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:a,"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:s}),i,o?(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:o}):null,(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:a,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)||x,onClick:c,className:m??"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",()=>a])},54510,e=>{"use strict";var t=e.i(18050),r=e.i(44355);function a({open:e,onClose:a,title:s,entityLabel:i,bodyText:o,onConfirm:l,busy:n,error:c}){return(0,t.jsx)(r.ConfirmationModal,{open:e,onClose:a,title:s,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:[s," ",(0,t.jsx)("code",{className:"font-mono",children:i}),"? ",o]})})}function s(e){return function(r){let s=r[e.entityLabelKey];return(0,t.jsx)(a,{open:r.open,onClose:r.onClose,title:e.title,entityLabel:s,bodyText:e.bodyText,onConfirm:r.onConfirm,busy:r.busy,error:r.error})}}let i=s({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),o=s({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),l=s({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),n=s({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});e.s(["DeleteAgentModal",0,i,"DeleteCronJobModal",0,n,"DeleteRecipeModal",0,l,"DeleteTeamModal",0,o],54510)},72532,e=>{"use strict";var t=e.i(18050);function r({title:e,files:r,loading:a,showOptionalFiles:s,onShowOptionalChange:i,selectedFileName:o,onSelectFile:l,renderItemExtra:n}){let c=s?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:s,onChange:e=>i(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:[a?(0,t.jsx)("li",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"Loading…"}):null,c.map(e=>{var r;let a;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,a="w-full rounded-[var(--ck-radius-sm)] px-3 py-2 text-left text-sm",o===r?`${a} bg-white/10 text-[color:var(--ck-text-primary)]`:`${a} 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(18050),r=e.i(71645),a=e.i(22016),s=e.i(18566),i=e.i(42771),o=e.i(82310);function l(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function n({teamId:e,llmTaskEnabled:n}){let c=(0,s.useRouter)(),[d,u]=(0,r.useState)([]),[m,x]=(0,r.useState)(!0),[p,h]=(0,r.useState)(!1),[f,v]=(0,r.useState)(""),[b,g]=(0,r.useState)(""),[w,y]=(0,r.useState)({}),[j,k]=(0,r.useState)({}),[N,C]=(0,r.useState)(""),[S,_]=(0,r.useState)(""),[I,P]=(0,r.useState)(null),[R,E]=(0,r.useState)(""),[O,$]=(0,r.useState)(""),[M,A]=(0,r.useState)(!1),T=(0,r.useCallback)(async t=>{let r=!!t?.quiet;v(""),r||x(!0);try{let t=await (0,i.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);u(r.map(e=>({id:e,name:e})))}catch(e){v((0,o.errorMessage)(e))}finally{r||x(!1)}},[e]);async function z(){h(!0);try{await T({quiet:!0})}finally{h(!1)}}async function D(t){if(confirm(`Delete workflow “${t}”? This removes the .workflow.json file from the team workspace.`)){v("");try{let r=await (0,i.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`,{method:"DELETE"});if(!r.ok)throw Error(r.error||"Failed to delete workflow");await T({quiet:!0}),b===t&&(g(""),C(""),P(null))}catch(e){v((0,o.errorMessage)(e))}}}async function L(t){k(e=>({...e,[t]:!0})),E("");try{let r=await (0,i.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 a=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):[];y(e=>({...e,[t]:a}))}catch(e){E((0,o.errorMessage)(e)),y(e=>({...e,[t]:[]}))}finally{k(e=>({...e,[t]:!1}))}}async function U(t,r){_(t),C(r),P(null),E(""),$("");try{let a=await (0,i.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}&runId=${encodeURIComponent(r)}`,{cache:"no-store"});if(!a.ok)throw Error(a.error||"Failed to load run");let s=l(a.run)?a.run:null;if(!s)throw Error("Invalid run format");P({id:String(s.id??r),status:"string"==typeof s.status?s.status:void 0,startedAt:"string"==typeof s.startedAt?s.startedAt:void 0,finishedAt:"string"==typeof s.finishedAt?String(s.finishedAt):void 0,meta:s.meta,memoryUsed:s.memoryUsed,approval:s.approval,raw:s})}catch(e){E((0,o.errorMessage)(e)),P(null)}}async function q(t){if(confirm(`Add workflow from template “${t}”?`)){v("");try{let r=await (0,i.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 a=String(r.workflowId??"").trim();if(!a)throw Error("Template applied but workflowId missing");await T({quiet:!0}),c.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(a)}`)}catch(e){v((0,o.errorMessage)(e))}}}(0,r.useEffect)(()=>{T()},[T]);let B=(0,r.useMemo)(()=>{if(!I)return[];let e=I.memoryUsed??(l(I.meta)?I.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):[]},[I]);if(m)return(0,t.jsx)("div",{className:"ck-glass p-4",children:"Loading workflows…"});let F=!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."]}),F,(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 q("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:z,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"})]})]}),f?(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:f}):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 s=b===r.id,i=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=s?"":r.id;g(e),C(""),P(null),E(""),e&&await L(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 ",s?"collapse":"expand"," run details"]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)(a.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 D(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"})]})]}),s?(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 L(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"})]}),R?(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:R}):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:i.length?(0,t.jsx)("div",{className:"space-y-1",children:i.slice(0,8).map(e=>{let a=N===e;return(0,t.jsx)("button",{type:"button",onClick:()=>void U(r.id,e),className:a?"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:I?(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:I.id}),I.status?(0,t.jsxs)("span",{children:[" • ",I.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=I.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 a=String(r.state??"").trim(),s="string"==typeof r.requestedAt?r.requestedAt:"",i="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,u="pending"===a||"waiting_for_approval"===I.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:a||"(unknown)"})]}),s?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"requestedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:s})]}):null,i?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"decidedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:i})]}):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]}),u?(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:O,onChange:e=>$(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}?`)){A(!0),E("");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:O||void 0,decidedBy:"ClawKitchen UI"})}),a=await t.json();if(!t.ok||!a.ok)throw Error(a.error||"Failed to apply approval action");await U(S,N)}catch(e){E((0,o.errorMessage)(e))}finally{A(!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"}),B.length?(0,t.jsx)("div",{className:"mt-2 space-y-2",children:B.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])},88143,(e,t,r)=>{"use strict";function a({widthInt:e,heightInt:t,blurWidth:r,blurHeight:a,blurDataURL:s,objectFit:i}){let o=r?40*r:e,l=a?40*a:t,n=o&&l?`viewBox='0 0 ${o} ${l}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${n}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${n?"none":"contain"===i?"xMidYMid":"cover"===i?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${s}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return a}})},87690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={VALID_LOADERS:function(){return i},imageConfigDefault:function(){return o}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=["default","imgix","cloudinary","akamai","custom"],o={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},8927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return c}}),e.r(33525);let a=e.r(43369),s=e.r(88143),i=e.r(87690),o=["-moz-initial","fill","none","scale-down",void 0];function l(e){return void 0!==e.default}function n(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function c({src:e,sizes:t,unoptimized:r=!1,priority:c=!1,preload:d=!1,loading:u,className:m,quality:x,width:p,height:h,fill:f=!1,style:v,overrideSrc:b,onLoad:g,onLoadingComplete:w,placeholder:y="empty",blurDataURL:j,fetchPriority:k,decoding:N="async",layout:C,objectFit:S,objectPosition:_,lazyBoundary:I,lazyRoot:P,...R},E){var O;let $,M,A,{imgConf:T,showAltText:z,blurComplete:D,defaultLoader:L}=E,U=T||i.imageConfigDefault;if("allSizes"in U)$=U;else{let e=[...U.deviceSizes,...U.imageSizes].sort((e,t)=>e-t),t=U.deviceSizes.sort((e,t)=>e-t),r=U.qualities?.sort((e,t)=>e-t);$={...U,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===L)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let q=R.loader||L;delete R.loader,delete R.srcSet;let B="__next_img_default"in q;if(B){if("custom"===$.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
2
- Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=q;q=t=>{let{config:r,...a}=t;return e(a)}}if(C){"fill"===C&&(f=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[C];e&&(v={...v,...e});let r={responsive:"100vw",fill:"100vw"}[C];r&&!t&&(t=r)}let F="",W=n(p),J=n(h);if((O=e)&&"object"==typeof O&&(l(O)||void 0!==O.src)){let t=l(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(M=t.blurWidth,A=t.blurHeight,j=j||t.blurDataURL,F=t.src,!f)if(W||J){if(W&&!J){let e=W/t.width;J=Math.round(t.height*e)}else if(!W&&J){let e=J/t.height;W=Math.round(t.width*e)}}else W=t.width,J=t.height}let G=!c&&!d&&("lazy"===u||void 0===u);(!(e="string"==typeof e?e:F)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,G=!1),$.unoptimized&&(r=!0),B&&!$.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let K=n(x),X=Object.assign(f?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:S,objectPosition:_}:{},z?{}:{color:"transparent"},v),V=D||"empty"===y?null:"blur"===y?`url("data:image/svg+xml;charset=utf-8,${(0,s.getImageBlurSvg)({widthInt:W,heightInt:J,blurWidth:M,blurHeight:A,blurDataURL:j||"",objectFit:X.objectFit})}")`:`url("${y}")`,H=o.includes(X.objectFit)?"fill"===X.objectFit?"100% 100%":"cover":X.objectFit,Y=V?{backgroundSize:H,backgroundPosition:X.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:V}:{},Q=function({config:e,src:t,unoptimized:r,width:s,quality:i,sizes:o,loader:l}){if(r){let e=(0,a.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")&&e){let r=t.includes("?")?"&":"?";t=`${t}${r}dpl=${e}`}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:n,kind:c}=function({deviceSizes:e,allSizes:t},r,a){if(a){let r=/(^|\s)(1?\d?\d)vw/g,s=[];for(let e;e=r.exec(a);)s.push(parseInt(e[2]));if(s.length){let r=.01*Math.min(...s);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,s,o),d=n.length-1;return{sizes:o||"w"!==c?o:"100vw",srcSet:n.map((r,a)=>`${l({config:e,src:t,quality:i,width:r})} ${"w"===c?r:a+1}${c}`).join(", "),src:l({config:e,src:t,quality:i,width:n[d]})}}({config:$,src:e,unoptimized:r,width:W,quality:K,sizes:t,loader:q}),Z=G?"lazy":u;return{props:{...R,loading:Z,fetchPriority:k,width:W,height:J,decoding:N,className:m,style:{...X,...Y},sizes:Q.sizes,srcSet:Q.srcSet,src:b||Q.src},meta:{unoptimized:r,preload:d||c,placeholder:y,fill:f}}}},98879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let a=e.r(71645),s="u"<typeof window,i=s?()=>{}:a.useLayoutEffect,o=s?()=>{}:a.useEffect;function l(e){let{headManager:t,reduceComponentsToState:r}=e;function l(){if(t&&t.mountedInstances){let e=a.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return s&&(t?.mountedInstances?.add(e.children),l()),i(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),i(()=>(t&&(t._pendingUpdate=l),()=>{t&&(t._pendingUpdate=l)})),o(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},25633,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return h},defaultHead:function(){return u}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=e.r(55682),o=e.r(90809),l=e.r(18050),n=o._(e.r(71645)),c=i._(e.r(98879)),d=e.r(42732);function u(){return[(0,l.jsx)("meta",{charSet:"utf-8"},"charset"),(0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function m(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===n.default.Fragment?e.concat(n.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(33525);let x=["name","httpEquiv","charSet","itemProp"];function p(e){let t,r,a,s;return e.reduce(m,[]).reverse().concat(u().reverse()).filter((t=new Set,r=new Set,a=new Set,s={},e=>{let i=!0,o=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){o=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?i=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?i=!1:r.add(e.type);break;case"meta":for(let t=0,r=x.length;t<r;t++){let r=x[t];if(e.props.hasOwnProperty(r))if("charSet"===r)a.has(r)?i=!1:a.add(r);else{let t=e.props[r],a=s[r]||new Set;("name"!==r||!o)&&a.has(t)?i=!1:(a.add(t),s[r]=a)}}}return i})).reverse().map((e,t)=>{let r=e.key||t;return n.default.cloneElement(e,{key:r})})}let h=function({children:e}){let t=(0,n.useContext)(d.HeadManagerContext);return(0,l.jsx)(c.default,{reduceComponentsToState:p,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18556,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let a=e.r(55682)._(e.r(71645)),s=e.r(87690),i=a.default.createContext(s.imageConfigDefault)},65856,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return a}});let a=e.r(55682)._(e.r(71645)).default.createContext(null)},70965,(e,t,r)=>{"use strict";function a(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,0):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return a}})},1948,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let a=e.r(70965),s=e.r(43369);function i({config:e,src:t,width:r,quality:i}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
3
- Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let o=(0,a.findClosestQuality)(i,e),l=(0,s.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${o}${t.startsWith("/")&&l?`&dpl=${l}`:""}`}i.__next_img_default=!0;let o=i},5500,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return w}});let a=e.r(55682),s=e.r(90809),i=e.r(18050),o=s._(e.r(71645)),l=a._(e.r(74080)),n=a._(e.r(25633)),c=e.r(8927),d=e.r(87690),u=e.r(18556);e.r(33525);let m=e.r(65856),x=a._(e.r(1948)),p=e.r(18581),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function f(e,t,r,a,s,i,o){let l=e?.src;e&&e["data-loaded-src"]!==l&&(e["data-loaded-src"]=l,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&s(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let a=!1,s=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>a,isPropagationStopped:()=>s,persist:()=>{},preventDefault:()=>{a=!0,t.preventDefault()},stopPropagation:()=>{s=!0,t.stopPropagation()}})}a?.current&&a.current(e)}}))}function v(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b=(0,o.forwardRef)(({src:e,srcSet:t,sizes:r,height:a,width:s,decoding:l,className:n,style:c,fetchPriority:d,placeholder:u,loading:m,unoptimized:x,fill:h,onLoadRef:b,onLoadingCompleteRef:g,setBlurComplete:w,setShowAltText:y,sizesInput:j,onLoad:k,onError:N,...C},S)=>{let _=(0,o.useCallback)(e=>{e&&(N&&(e.src=e.src),e.complete&&f(e,u,b,g,w,x,j))},[e,u,b,g,w,N,x,j]),I=(0,p.useMergedRef)(S,_);return(0,i.jsx)("img",{...C,...v(d),loading:m,width:s,height:a,decoding:l,"data-nimg":h?"fill":"1",className:n,style:c,sizes:r,srcSet:t,src:e,ref:I,onLoad:e=>{f(e.currentTarget,u,b,g,w,x,j)},onError:e=>{y(!0),"empty"!==u&&w(!0),N&&N(e)}})});function g({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...v(t.fetchPriority)};return e&&l.default.preload?(l.default.preload(t.src,r),null):(0,i.jsx)(n.default,{children:(0,i.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let w=(0,o.forwardRef)((e,t)=>{let r=(0,o.useContext)(m.RouterContext),a=(0,o.useContext)(u.ImageConfigContext),s=(0,o.useMemo)(()=>{let e=h||a||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),s=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:s,localPatterns:"u"<typeof window?a?.localPatterns:e.localPatterns}},[a]),{onLoad:l,onLoadingComplete:n}=e,p=(0,o.useRef)(l);(0,o.useEffect)(()=>{p.current=l},[l]);let f=(0,o.useRef)(n);(0,o.useEffect)(()=>{f.current=n},[n]);let[v,w]=(0,o.useState)(!1),[y,j]=(0,o.useState)(!1),{props:k,meta:N}=(0,c.getImgProps)(e,{defaultLoader:x.default,imgConf:s,blurComplete:v,showAltText:y});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b,{...k,unoptimized:N.unoptimized,placeholder:N.placeholder,fill:N.fill,onLoadRef:p,onLoadingCompleteRef:f,setBlurComplete:w,setShowAltText:j,sizesInput:e.sizes,ref:t}),N.preload?(0,i.jsx)(g,{isAppRouter:!r,imgAttributes:k}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},94909,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return d},getImageProps:function(){return c}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=e.r(55682),o=e.r(8927),l=e.r(5500),n=i._(e.r(1948));function c(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:n.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let d=l.Image},57688,(e,t,r)=>{t.exports=e.r(94909)},529,e=>{"use strict";var t=e.i(18050),r=e.i(57688),a=e.i(22016),s=e.i(71645),i=e.i(18566);let o=new Set(["png","jpg","jpeg","gif","webp","svg"]);function l(e){let t=e.toLowerCase().split(".").pop()??"";return o.has(t)}function n(e,t){return`/api/teams/workflow-deliverables/file?teamId=${encodeURIComponent(e)}&runId=${encodeURIComponent(t.runId)}&path=${encodeURIComponent(t.relativePath)}`}function c(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(1))+" "+["B","KB","MB","GB"][t]}function d(e){try{return new Date(e).toLocaleString()}catch{return e}}function u(e){switch(e.toLowerCase().split(".").pop()){case"md":return"📝";case"json":return"🔧";case"txt":default:return"📄";case"html":case"htm":return"🌐";case"css":return"🎨";case"js":case"ts":case"tsx":case"jsx":return"⚙️";case"png":case"jpg":case"jpeg":case"gif":case"webp":return"🖼️";case"pdf":return"📋";case"zip":case"tar":case"gz":return"📦"}}function m({teamId:e,deliverables:o,workflows:m}){let x=(0,i.useRouter)(),[p,h]=(0,s.useState)(""),[f,v]=(0,s.useState)(""),[b,g]=(0,s.useState)(""),[w,y]=(0,s.useState)(null),j=(0,s.useMemo)(()=>{let e=b.trim().toLowerCase();return o.filter(t=>{if(p&&t.workflowId!==p||f&&t.runId!==f)return!1;if(!e)return!0;let r=m[t.workflowId]?.name??"";return t.fileName.toLowerCase().includes(e)||t.workflowId.toLowerCase().includes(e)||t.runId.toLowerCase().includes(e)||r.toLowerCase().includes(e)||t.contentPreview&&t.contentPreview.toLowerCase().includes(e)})},[o,b,p,f,m]),k=(0,s.useMemo)(()=>Array.from(new Set(o.map(e=>e.workflowId).filter(Boolean))).sort(),[o]),N=(0,s.useMemo)(()=>Array.from(new Set((p?o.filter(e=>e.workflowId===p):o).map(e=>e.runId).filter(Boolean))).sort(),[o,p]),C=async t=>{try{if(t.isText&&t.contentPreview)await navigator.clipboard.writeText(t.contentPreview),alert("Content copied to clipboard!");else{let r=n(e,t),a=document.createElement("a");a.href=r,a.download=t.fileName,document.body.appendChild(a),a.click(),a.remove()}}catch{alert("Failed to download file")}};return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("div",{className:"rounded-[var(--ck-radius-lg)] border border-white/10 bg-black/10 p-4",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"workflow"}),(0,t.jsxs)("select",{value:p,onChange:e=>{h(e.target.value||""),v("")},className:"mt-1 w-64 max-w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"All workflows"}),k.map(e=>(0,t.jsx)("option",{value:e,children:m[e]?.name?`${m[e]?.name} (${e})`:e},e))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"run"}),(0,t.jsxs)("select",{value:f,onChange:e=>v(e.target.value||""),className:"mt-1 w-56 max-w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"All runs"}),N.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"search"}),(0,t.jsx)("input",{value:b,onChange:e=>g(e.target.value),placeholder:"filename / content",className:"mt-1 w-72 max-w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("button",{type:"button",onClick:()=>x.refresh(),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:"Refresh"})})]})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,t.jsxs)("div",{className:"lg:col-span-2 rounded-[var(--ck-radius-lg)] border border-white/10 bg-black/10 p-4",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4",children:"Workflow Deliverables"}),j.length>0?(0,t.jsx)("div",{className:"space-y-2",children:j.map((s,i)=>{let o=w?.absolutePath===s.absolutePath,x=m[s.workflowId]?.name||s.workflowId;return(0,t.jsx)("div",{className:`cursor-pointer rounded-[var(--ck-radius-sm)] border p-3 transition-colors ${o?"border-white/20 bg-white/10":"border-white/5 bg-black/5 hover:bg-white/5"}`,onClick:()=>y(s),children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[l(s.fileName)&&(0,t.jsx)("div",{className:"flex-shrink-0 w-12 h-12 rounded overflow-hidden bg-black/20 border border-white/10",children:(0,t.jsx)(r.default,{src:n(e,s),alt:s.fileName,width:48,height:48,className:"w-full h-full object-cover",unoptimized:!0})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-lg",children:u(s.fileName)}),(0,t.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] truncate",children:s.fileName}),s.isText&&(0,t.jsx)("span",{className:"text-xs bg-green-500/20 text-green-400 px-1.5 py-0.5 rounded",children:"TEXT"})]}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:x})," · ",(0,t.jsx)("span",{className:"font-mono",children:s.runId})]}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[s.relativePath!==s.fileName&&(0,t.jsxs)("span",{children:[s.relativePath," · "]}),c(s.size)," · ",d(s.mtime)]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),C(s)},className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:s.isText?"Copy":"Download"}),(0,t.jsx)(a.default,{href:`/teams/${e}/runs/${s.workflowId}/${s.runId}`,onClick:e=>e.stopPropagation(),className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"View Run →"})]})]})},`${s.runId}-${s.relativePath}`)})}):(0,t.jsxs)("div",{className:"text-center py-8 text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("div",{className:"text-4xl mb-2",children:"📋"}),(0,t.jsx)("div",{className:"text-lg mb-1",children:"No deliverables found"}),(0,t.jsx)("div",{className:"text-sm",children:"Workflow runs will create deliverables that appear here when they complete."})]}),j.length>0&&(0,t.jsxs)("div",{className:"mt-4 text-xs text-[color:var(--ck-text-tertiary)]",children:["Showing ",j.length," of ",o.length," deliverables."]})]}),(0,t.jsxs)("div",{className:"lg:col-span-1 rounded-[var(--ck-radius-lg)] border border-white/10 bg-black/10 p-4",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)] mb-3",children:"Preview"}),w?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-3 pb-3 border-b border-white/10",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("span",{className:"text-lg",children:u(w.fileName)}),(0,t.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] text-sm break-all",children:w.fileName})]}),(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] space-y-1",children:[(0,t.jsxs)("div",{children:["Size: ",c(w.size)]}),(0,t.jsxs)("div",{children:["Modified: ",d(w.mtime)]}),(0,t.jsxs)("div",{children:["Path: ",w.relativePath]})]})]}),l(w.fileName)?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Image Preview:"}),(0,t.jsx)("div",{className:"bg-black/20 border border-white/10 rounded-[var(--ck-radius-sm)] p-2 overflow-hidden",children:(0,t.jsx)(r.default,{src:n(e,w),alt:w.fileName,width:800,height:600,className:"w-full h-auto rounded-[var(--ck-radius-sm)] object-contain max-h-[500px]",unoptimized:!0})}),(0,t.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,t.jsx)("a",{href:n(e,w),target:"_blank",rel:"noopener noreferrer",className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Open full size ↗"}),(0,t.jsx)("button",{onClick:()=>C(w),className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download"})]})]}):w.isText&&w.contentPreview?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Content Preview:"}),(0,t.jsx)("div",{className:"bg-black/20 border border-white/10 rounded-[var(--ck-radius-sm)] p-3 max-h-[400px] overflow-auto",children:(0,t.jsx)("pre",{className:"text-xs text-[color:var(--ck-text-primary)] whitespace-pre-wrap break-words",children:w.contentPreview})})]}):(0,t.jsxs)("div",{className:"text-center py-6",children:[(0,t.jsx)("div",{className:"text-3xl mb-2",children:u(w.fileName)}),(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-secondary)] mb-2",children:[c(w.size)," · ",w.fileName.split(".").pop()?.toUpperCase()," file"]}),(0,t.jsx)("button",{onClick:()=>C(w),className:"text-xs px-3 py-1.5 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download file"})]})]}):(0,t.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)] italic",children:"Select a deliverable to preview"})]})]})]})}e.s(["default",()=>m])}]);
@@ -1 +0,0 @@
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(18050),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,...e?{teamId:e}:{}})}),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)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return o}});let o=e=>{}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o={assign:function(){return c},searchParamsToUrlQuery:function(){return a},urlQueryToSearchParams:function(){return l}};for(var n in o)Object.defineProperty(r,n,{enumerable:!0,get:o[n]});function a(e){let t={};for(let[r,o]of e.entries()){let e=t[r];void 0===e?t[r]=o:Array.isArray(e)?e.push(o):t[r]=[e,o]}return t}function s(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e))if(Array.isArray(o))for(let e of o)t.append(r,s(e));else t.set(r,s(o));return t}function c(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,o]of r.entries())e.append(t,o)}return e}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o={formatUrl:function(){return l},formatWithValidation:function(){return i},urlObjectKeys:function(){return c}};for(var n in o)Object.defineProperty(r,n,{enumerable:!0,get:o[n]});let a=e.r(90809)._(e.r(98183)),s=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,o=e.protocol||"",n=e.pathname||"",l=e.hash||"",c=e.query||"",i=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?i=t+e.host:r&&(i=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(i+=":"+e.port)),c&&"object"==typeof c&&(c=String(a.urlQueryToSearchParams(c)));let u=e.search||c&&`?${c}`||"";return o&&!o.endsWith(":")&&(o+=":"),e.slashes||(!o||s.test(o))&&!1!==i?(i="//"+(i||""),n&&"/"!==n[0]&&(n="/"+n)):i||(i=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${o}${i}${n}${u}${l}`}let c=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function i(e){return l(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let o=e.r(71645);function n(e,t){let r=(0,o.useRef)(null),n=(0,o.useRef)(null);return(0,o.useCallback)(o=>{if(null===o){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=a(e,o)),t&&(n.current=a(t,o))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},2968,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o={DecodeError:function(){return v},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return b},NormalizeError:function(){return g},PageNotFoundError:function(){return k},SP:function(){return m},ST:function(){return x},WEB_VITALS:function(){return a},execOnce:function(){return s},getDisplayName:function(){return d},getLocationOrigin:function(){return i},getURL:function(){return u},isAbsoluteUrl:function(){return c},isResSent:function(){return h},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return y}};for(var n in o)Object.defineProperty(r,n,{enumerable:!0,get:o[n]});let a=["CLS","FCP","FID","INP","LCP","TTFB"];function s(e){let t,r=!1;return(...o)=>(r||(r=!0,t=e(...o)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,c=e=>l.test(e);function i(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=i();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function h(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let o=await e.getInitialProps(t);if(r&&h(r))return o;if(!o)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${o}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return o}let m="u">typeof performance,x=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class v extends Error{}class g extends Error{}class k extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class b extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function y(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let o=e.r(2968),n=e.r(52817);function a(e){if(!(0,o.isAbsoluteUrl)(e))return!0;try{let t=(0,o.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return o}});let o=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o={default:function(){return v},useLinkStatus:function(){return k}};for(var n in o)Object.defineProperty(r,n,{enumerable:!0,get:o[n]});let a=e.r(90809),s=e.r(18050),l=a._(e.r(71645)),c=e.r(95057),i=e.r(8372),u=e.r(18581),d=e.r(2968),h=e.r(5550);e.r(33525);let f=e.r(91949),p=e.r(73668),m=e.r(9396);function x(e){return"string"==typeof e?e:(0,c.formatUrl)(e)}function v(t){var r;let o,n,a,[c,v]=(0,l.useOptimistic)(f.IDLE_LINK_STATUS),k=(0,l.useRef)(null),{href:b,as:j,children:y,prefetch:w=null,passHref:N,replace:C,shallow:S,scroll:E,onClick:P,onMouseEnter:M,onTouchStart:L,legacyBehavior:R=!1,onNavigate:T,ref:_,unstable_dynamicOnHover:O,...I}=t;o=y,R&&("string"==typeof o||"number"==typeof o)&&(o=(0,s.jsx)("a",{children:o}));let A=l.default.useContext(i.AppRouterContext),W=!1!==w,$=!1!==w?null===(r=w)||"auto"===r?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,{href:B,as:U}=l.default.useMemo(()=>{let e=x(b);return{href:e,as:j?x(j):e}},[b,j]);if(R){if(o?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<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."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=l.default.Children.only(o)}let z=R?n&&"object"==typeof n&&n.ref:_,D=l.default.useCallback(e=>(null!==A&&(k.current=(0,f.mountLinkInstance)(e,B,A,$,W,v)),()=>{k.current&&((0,f.unmountLinkForCurrentNavigation)(k.current),k.current=null),(0,f.unmountPrefetchableInstance)(e)}),[W,B,A,$,v]),F={ref:(0,u.useMergedRef)(D,z),onClick(t){R||"function"!=typeof P||P(t),R&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!A||t.defaultPrevented||function(t,r,o,n,a,s,c){if("u">typeof window){let i,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((i=t.currentTarget.getAttribute("target"))&&"_self"!==i||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),c){let e=!1;if(c({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);l.default.startTransition(()=>{d(o||r,a?"replace":"push",s??!0,n.current)})}}(t,B,U,k,C,E,T)},onMouseEnter(e){R||"function"!=typeof M||M(e),R&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),A&&W&&(0,f.onNavigationIntent)(e.currentTarget,!0===O)},onTouchStart:function(e){R||"function"!=typeof L||L(e),R&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),A&&W&&(0,f.onNavigationIntent)(e.currentTarget,!0===O)}};return(0,d.isAbsoluteUrl)(U)?F.href=U:R&&!N&&("a"!==n.type||"href"in n.props)||(F.href=(0,h.addBasePath)(U)),a=R?l.default.cloneElement(n,F):(0,s.jsx)("a",{...I,...F,children:o}),(0,s.jsx)(g.Provider,{value:c,children:a})}e.r(84508);let g=(0,l.createContext)(f.IDLE_LINK_STATUS),k=()=>(0,l.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},42771,e=>{"use strict";async function t(e){return Promise.all(e.map(e=>fetch(e,{cache:"no-store"})))}async function r(e,t){let r=await fetch(e,t),o=await r.json();if(!r.ok)throw Error(o.error??"Request failed");return o}async function o(e,t){let r=await fetch(e,t),o=await r.json();return r.ok?{ok:!0,data:o}:{ok:!1,status:r.status,error:o.error??"Request failed"}}e.s(["fetchAll",()=>t,"fetchJson",()=>r,"fetchJsonWithStatus",()=>o])},76972,e=>{"use strict";var t=e.i(18050),r=e.i(71645);let o=(0,r.createContext)(null);function n({kind:e}){return"success"===e?(0,t.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-emerald-400",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.707a1 1 0 00-1.414-1.414L9 10.172 7.707 8.879a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}):"error"===e?(0,t.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-red-400",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm-1-5a1 1 0 112 0 1 1 0 01-2 0zm0-8a1 1 0 012 0v6a1 1 0 11-2 0V5z",clipRule:"evenodd"})}):(0,t.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-slate-300",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M18 10A8 8 0 11 2 10a8 8 0 0116 0zM9 9a1 1 0 112 0v5a1 1 0 11-2 0V9zm0-3a1 1 0 112 0 1 1 0 01-2 0z",clipRule:"evenodd"})})}function a({children:e}){let[a,s]=(0,r.useState)([]),l=(0,r.useCallback)(e=>{s(t=>t.filter(t=>t.id!==e))},[]),c=(0,r.useCallback)(e=>{s(t=>t.map(t=>t.id===e?{...t,state:"leave"}:t)),window.setTimeout(()=>l(e),250)},[l]),i=(0,r.useCallback)(e=>{s(t=>t.map(t=>t.id===e?{...t,state:"show"}:t))},[]),u=(0,r.useCallback)(e=>{let t,r=`${Date.now()}-${(t=new Uint8Array(8),crypto.getRandomValues(t),Array.from(t,e=>e.toString(16).padStart(2,"0")).join(""))}`,o={id:r,timeoutMs:5e3,state:"enter",...e};s(e=>[o,...e].slice(0,4)),window.setTimeout(()=>i(r),10);let n=o.timeoutMs;n&&n>0&&window.setTimeout(()=>c(r),n)},[c,i]),d=(0,r.useMemo)(()=>({push:u}),[u]);return(0,t.jsxs)(o.Provider,{value:d,children:[e,(0,t.jsx)("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 z-[100] flex items-end px-4 py-6 sm:p-6",children:(0,t.jsx)("div",{className:"flex w-full flex-col items-start space-y-4",children:a.map(e=>{var r;return(0,t.jsx)("div",{className:"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg border bg-[color:var(--ck-toast-bg)] shadow-[var(--ck-shadow-2)] transition-all duration-200 ease-out border-[color:var(--ck-toast-border)] "+("enter"===(r=e.state)||"leave"===r?"translate-x-[-16px] opacity-0":"translate-x-0 opacity-100"),children:(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("div",{className:"flex items-start",children:[(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)(n,{kind:e.kind})}),(0,t.jsxs)("div",{className:"ml-3 w-0 flex-1",children:[e.title?(0,t.jsx)("p",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:e.title}):null,(0,t.jsx)("p",{className:"whitespace-pre-wrap text-sm text-[color:var(--ck-text-primary)]",children:e.message})]}),(0,t.jsx)("div",{className:"ml-4 flex shrink-0",children:(0,t.jsxs)("button",{type:"button",onClick:()=>c(e.id),className:"inline-flex rounded-md bg-transparent text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]","aria-label":"Dismiss",title:"Dismiss",children:[(0,t.jsx)("span",{className:"sr-only",children:"Close"}),(0,t.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:(0,t.jsx)("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 10-1.06-1.06L10 8.94 6.28 5.22z"})})]})})]})})},e.id)})})})]})}function s(){let e=(0,r.useContext)(o);if(!e)throw Error("useToast must be used within ToastProvider");return e}e.s(["ToastProvider",()=>a,"useToast",()=>s])},65046,e=>{"use strict";var t=e.i(71645);let r="ck-selected-team-changed";function o(){try{return(localStorage.getItem("ck-selected-team")||"").trim()}catch{return""}}function n(e){let t=()=>e();return window.addEventListener("storage",t),window.addEventListener(r,t),()=>{window.removeEventListener("storage",t),window.removeEventListener(r,t)}}function a(){return(0,t.useSyncExternalStore)(n,o,()=>"")}function s(){try{window.dispatchEvent(new Event(r))}catch{}}e.s(["dispatchSelectedTeamChanged",()=>s,"useSelectedTeamId",()=>a])},49830,e=>{"use strict";var t=e.i(18050),r=e.i(22016),o=e.i(18566),n=e.i(71645),a=e.i(65046),s=n;class l extends s.default.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("ErrorBoundary caught:",e,t)}render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback:(0,t.jsxs)("div",{className:"ck-glass mx-auto max-w-2xl p-6 sm:p-8",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:"Something went wrong"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"An unexpected error occurred. You can try refreshing the page or go back home."}),(0,t.jsx)("pre",{className:"mt-4 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-3 font-mono text-xs text-[color:var(--ck-text-secondary)]",children:this.state.error.message}),(0,t.jsxs)("div",{className:"mt-6 flex flex-wrap gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:()=>window.location.reload(),className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-4 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] hover:bg-[var(--ck-accent-red)]/90",children:"Refresh page"}),(0,t.jsx)(r.default,{href:"/",className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-4 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10",children:"Go home"})]})]}):this.props.children}}var c=e.i(42771);function i({className:e,children:r}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:r})}function u({className:e}){return(0,t.jsxs)(i,{className:e,children:[(0,t.jsx)("path",{d:"M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z",stroke:"currentColor",strokeWidth:"1.8"}),(0,t.jsx)("path",{d:"M12 2v2.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M12 19.5V22",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M2 12h2.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M19.5 12H22",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M4.2 4.2 6 6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M18 18l1.8 1.8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M18 6l1.8-1.8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,t.jsx)("path",{d:"M4.2 19.8 6 18",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}function d({className:e}){return(0,t.jsx)(i,{className:e,children:(0,t.jsx)("path",{d:"M21 14.2A7.8 7.8 0 0 1 9.8 3a7 7 0 1 0 11.2 11.2Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"})})}let h="ck-theme";function f(){return"light"===window.localStorage.getItem(h)?"light":"dark"}function p(){let[e,r]=(0,n.useState)(f);(0,n.useEffect)(()=>{document.documentElement.dataset.theme=e,window.localStorage.setItem(h,e)},[e]);let o="dark"===e?"Switch to light mode":"Switch to dark mode";return(0,t.jsxs)("button",{type:"button",onClick:function(){r(e=>"dark"===e?"light":"dark")},className:"grid h-9 w-9 place-items-center rounded-full border border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:var(--ck-bg-glass-strong)]","aria-label":o,title:o,children:[(0,t.jsx)("span",{className:"sr-only",suppressHydrationWarning:!0,children:o}),"dark"===e?(0,t.jsx)(d,{className:"h-4.5 w-4.5"}):(0,t.jsx)(u,{className:"h-4.5 w-4.5"})]})}var m=e.i(76972);function x({children:e}){return(0,t.jsx)("span",{className:"grid size-7 place-items-center text-[color:var(--ck-text-secondary)]","aria-hidden":!0,children:e})}function v({href:e,label:o,icon:n,active:a,collapsed:s}){return(0,t.jsxs)(r.default,{href:e,title:o,className:(a?"flex items-center rounded-[var(--ck-radius-sm)] bg-white/10 text-sm font-medium text-[color:var(--ck-text-primary)]":"flex items-center rounded-[var(--ck-radius-sm)] text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]")+(s?" justify-center px-0 py-3":" gap-4 px-4 py-3"),children:[n,s?null:(0,t.jsx)("span",{children:o})]})}function g({children:e}){let s=(0,o.usePathname)()||"/",i=(0,o.useRouter)(),u=(0,n.useMemo)(()=>{let e=s.match(/^\/teams\/([^/]+)(?:\/|$)/);return e?decodeURIComponent(e[1]):null},[s]),d=(0,n.useMemo)(()=>s.startsWith("/teams/"),[s]),[h,f]=(0,n.useState)(""),g=(u||h).trim();function k(e){return g&&("/tickets"===e||"/goals"===e||"/cron-jobs"===e||"/runs"===e)?function(e,t){let[r,o]=e.split("?"),n=new URLSearchParams(o??"");return n.set("team",t),`${r}?${n.toString()}`}(e,g):e}function b(e){if(!s.startsWith("/teams/")&&("/tickets"===s||"/goals"===s||"/cron-jobs"===s||"/runs"===s))try{let t=new URL(window.location.href);if(!e){if(!t.searchParams.has("team"))return;t.searchParams.delete("team");let e=t.searchParams.toString();i.replace(t.pathname+(e?`?${e}`:""));return}if((t.searchParams.get("team")??"").trim()===e)return;t.searchParams.set("team",e),i.replace(t.pathname+"?"+t.searchParams.toString())}catch{}}(0,n.useEffect)(()=>{try{f((localStorage.getItem("ck-selected-team")||"").trim())}catch{}},[]),(0,n.useEffect)(()=>{b(g)},[s,g]),(0,n.useEffect)(()=>{try{g?localStorage.setItem("ck-selected-team",g):localStorage.removeItem("ck-selected-team")}catch{}},[g]);let[j,y]=(0,n.useState)(!1);(0,n.useEffect)(()=>{try{let e=localStorage.getItem("ck-leftnav-collapsed");y("1"===e)}catch{}},[]);let[w,N]=(0,n.useState)([]);(0,n.useEffect)(()=>{(async()=>{try{let e=await (0,c.fetchJson)("/api/agents",{cache:"no-store"}),t=Array.isArray(e.agents)?e.agents:[],r=new Set;for(let e of(r.add("main"),t)){let t=String(e.workspace??"").split("/").filter(Boolean).find(e=>e.startsWith("workspace-"))??"";if(!t)continue;let o=t.slice(10);o&&"workspace"!==o&&r.add(o)}N(Array.from(r).sort())}catch{N([])}})()},[]);let C=[{href:"/",label:"Agents",icon:(0,t.jsx)(x,{children:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,t.jsx)("path",{d:"M3 11l9-8 9 8"}),(0,t.jsx)("path",{d:"M5 10v10h14V10"})]})})},{href:"/recipes",label:"Recipes",icon:(0,t.jsx)(x,{children:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,t.jsx)("path",{d:"M6 4h12v16H6z"}),(0,t.jsx)("path",{d:"M9 8h6"}),(0,t.jsx)("path",{d:"M9 12h6"})]})})},{href:k("/tickets"),label:"Tickets",icon:(0,t.jsx)(x,{children:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,t.jsx)("path",{d:"M4 7h16v4a2 2 0 0 1 0 4v4H4v-4a2 2 0 0 0 0-4z"})})})},{href:"/channels",label:"Channels",icon:(0,t.jsx)(x,{children:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,t.jsx)("path",{d:"M4 6h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 18h16"}),(0,t.jsx)("path",{d:"M7 9h0"})]})})},{href:k("/goals"),label:"Goals",icon:(0,t.jsx)(x,{children:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,t.jsx)("path",{d:"M12 7v5l3 3"})]})})},{href:k("/cron-jobs"),label:"Cron jobs",icon:(0,t.jsx)(x,{children:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,t.jsx)("path",{d:"M12 7v5"})]})})},{href:k("/runs"),label:"Runs",icon:(0,t.jsx)(x,{children:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,t.jsx)("path",{d:"M4 19h16"}),(0,t.jsx)("path",{d:"M6 16l4-4 3 3 5-7"}),(0,t.jsx)("circle",{cx:"10",cy:"12",r:"1"}),(0,t.jsx)("circle",{cx:"13",cy:"15",r:"1"}),(0,t.jsx)("circle",{cx:"18",cy:"8",r:"1"})]})})},{href:"/settings",label:"Settings",icon:(0,t.jsx)(x,{children:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,t.jsx)("path",{d:"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z"}),(0,t.jsx)("path",{d:"M19.4 15a7.9 7.9 0 0 0 .1-1l2-1.5-2-3.5-2.4.5a7.8 7.8 0 0 0-1.7-1L13.5 3h-4L8.6 6.5a7.8 7.8 0 0 0-1.7 1L4.5 7l-2 3.5 2 1.5a7.9 7.9 0 0 0 .1 1l-2 1.5 2 3.5 2.4-.5a7.8 7.8 0 0 0 1.7 1L10.5 21h4l.9-3.5a7.8 7.8 0 0 0 1.7-1l2.4.5 2-3.5-2-1.5Z"})]})})}],S=j?"w-16":"w-72";return(0,t.jsx)(m.ToastProvider,{children:(0,t.jsxs)("div",{className:"flex h-dvh w-dvw overflow-hidden",children:[(0,t.jsxs)("aside",{className:`flex shrink-0 flex-col border-r border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] backdrop-blur-[var(--ck-glass-blur)] ${S}`,children:[(0,t.jsxs)("div",{className:"flex h-14 items-center justify-between gap-2 border-b border-[color:var(--ck-border-subtle)] px-3",children:[(0,t.jsx)(r.default,{href:"/",className:"text-sm font-semibold tracking-tight",title:"Home",children:j?"CK":"Claw Kitchen"}),(0,t.jsx)("button",{onClick:function(){y(e=>{let t=!e;try{localStorage.setItem("ck-leftnav-collapsed",t?"1":"0")}catch{}return t})},className:"rounded-[var(--ck-radius-sm)] px-2 py-1 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]",title:j?"Expand":"Collapse",children:j?"»":"«"})]}),(0,t.jsx)("div",{className:"border-b border-[color:var(--ck-border-subtle)] p-2",children:j?(0,t.jsx)("button",{className:"w-full rounded-[var(--ck-radius-sm)] bg-white/5 px-2 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:g?`Team: ${g}`:"Select team",onClick:()=>{let e=w[0]||"";if(e){f(e);try{localStorage.setItem("ck-selected-team",e)}catch{}b(e)}},children:"👥"}):(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("div",{className:"px-2 pt-1 text-xs font-semibold uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Team"}),(0,t.jsxs)("select",{value:g??"",disabled:d,onChange:e=>{let t=(e.target.value||"").trim();f(t);try{t?localStorage.setItem("ck-selected-team",t):localStorage.removeItem("ck-selected-team")}catch{}(0,a.dispatchSelectedTeamChanged)(),b(t)},className:"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]"+(d?" cursor-not-allowed opacity-60":""),children:[(0,t.jsx)("option",{value:"",children:"All teams"}),w.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),g?(0,t.jsx)(r.default,{href:`/teams/${encodeURIComponent(g)}`,className:"px-2 pb-1 text-xs font-medium text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-secondary)]",children:"Edit team"}):null]})}),(0,t.jsxs)("nav",{className:"min-h-0 flex-1 overflow-auto p-2",children:[(0,t.jsx)("div",{className:"mt-2 px-2 pb-2 pt-2"}),C.map(e=>{let r;return(0,t.jsx)(v,{href:e.href,label:e.label,icon:(0,t.jsx)("span",{"aria-hidden":!0,children:e.icon}),collapsed:j,active:s===(r=e.href.split("?")[0])||s.startsWith(r+"/")},e.href)})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 border-t border-[color:var(--ck-border-subtle)] p-2",children:[(0,t.jsx)("a",{href:"https://github.com/JIGGAI/ClawRecipes/tree/main/docs",target:"_blank",rel:"noreferrer",className:j?"mx-auto rounded-[var(--ck-radius-sm)] px-2 py-2 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]":"rounded-[var(--ck-radius-sm)] px-3 py-2 text-sm font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]",title:"Docs",children:j?"📖":"Docs"}),j?null:(0,t.jsx)(p,{})]})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)("main",{className:"h-full overflow-auto p-4 md:p-6",children:(0,t.jsx)(l,{children:e})})})]})})}e.s(["AppShell",()=>g],49830)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35451,(e,t,r)=>{var n={229:function(e){var t,r,n,o=e.exports={};function u(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:u}catch(e){t=u}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}function l(e){if(t===setTimeout)return setTimeout(e,0);if((t===u||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var a=[],s=!1,c=-1;function f(){s&&n&&(s=!1,n.length?a=n.concat(a):c=-1,a.length&&d())}function d(){if(!s){var e=l(f);s=!0;for(var t=a.length;t;){for(n=a,a=[];++c<t;)n&&n[c].run();c=-1,t=a.length}n=null,s=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];a.push(new p(e,t)),1!==a.length||s||l(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},o={};function u(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},i=!0;try{n[e](r,r.exports,u),i=!1}finally{i&&delete o[e]}return r.exports}u.ab="/ROOT/node_modules/next/dist/compiled/process/",t.exports=u(229)},47167,(e,t,r)=>{"use strict";var n,o;t.exports=(null==(n=e.g.process)?void 0:n.env)&&"object"==typeof(null==(o=e.g.process)?void 0:o.env)?e.g.process:e.r(35451)},45689,(e,t,r)=>{"use strict";var n=Symbol.for("react.transitional.element");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var u in r={},t)"key"!==u&&(r[u]=t[u]);else r=t;return{$$typeof:n,type:e,key:o,ref:void 0!==(t=r.ref)?t:null,props:r}}r.Fragment=Symbol.for("react.fragment"),r.jsx=o,r.jsxs=o},18050,(e,t,r)=>{"use strict";t.exports=e.r(45689)},50740,(e,t,r)=>{"use strict";var n=e.i(47167),o=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),_=Symbol.for("react.view_transition"),v=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,g={};function j(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||m}function E(){}function O(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||m}j.prototype.isReactComponent={},j.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},j.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},E.prototype=j.prototype;var w=O.prototype=new E;w.constructor=O,b(w,j.prototype),w.isPureReactComponent=!0;var x=Array.isArray;function S(){}var T={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function P(e,t,r){var n=r.ref;return{$$typeof:o,type:e,key:t,ref:void 0!==n?n:null,props:r}}function A(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var M=/\/+/g;function H(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function k(e,t,r){if(null==e)return e;var n=[],i=0;return!function e(t,r,n,i,l){var a,s,c,f=typeof t;("undefined"===f||"boolean"===f)&&(t=null);var d=!1;if(null===t)d=!0;else switch(f){case"bigint":case"string":case"number":d=!0;break;case"object":switch(t.$$typeof){case o:case u:d=!0;break;case y:return e((d=t._init)(t._payload),r,n,i,l)}}if(d)return l=l(t),d=""===i?"."+H(t,0):i,x(l)?(n="",null!=d&&(n=d.replace(M,"$&/")+"/"),e(l,r,n,"",function(e){return e})):null!=l&&(A(l)&&(a=l,s=n+(null==l.key||t&&t.key===l.key?"":(""+l.key).replace(M,"$&/")+"/")+d,l=P(a.type,s,a.props)),r.push(l)),1;d=0;var p=""===i?".":i+":";if(x(t))for(var h=0;h<t.length;h++)f=p+H(i=t[h],h),d+=e(i,r,n,f,l);else if("function"==typeof(h=null===(c=t)||"object"!=typeof c?null:"function"==typeof(c=v&&c[v]||c["@@iterator"])?c:null))for(t=h.call(t),h=0;!(i=t.next()).done;)f=p+H(i=i.value,h++),d+=e(i,r,n,f,l);else if("object"===f){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(S,S):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),r,n,i,l);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(r=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return d}(e,n,"","",function(e){return t.call(r,e,i++)}),n}function U(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var C="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof n.default&&"function"==typeof n.default.emit)return void n.default.emit("uncaughtException",e);console.error(e)};function N(e){var t=T.T,r={};r.types=null!==t?t.types:null,T.T=r;try{var n=e(),o=T.S;null!==o&&o(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(S,C)}catch(e){C(e)}finally{null!==t&&null!==r.types&&(t.types=r.types),T.T=t}}function $(e){var t=T.T;if(null!==t){var r=t.types;null===r?t.types=[e]:-1===r.indexOf(e)&&r.push(e)}else N($.bind(null,e))}r.Activity=h,r.Children={map:k,forEach:function(e,t,r){k(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return k(e,function(){t++}),t},toArray:function(e){return k(e,function(e){return e})||[]},only:function(e){if(!A(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},r.Component=j,r.Fragment=i,r.Profiler=a,r.PureComponent=O,r.StrictMode=l,r.Suspense=d,r.ViewTransition=_,r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,r.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},r.addTransitionType=$,r.cache=function(e){return function(){return e.apply(null,arguments)}},r.cacheSignal=function(){return null},r.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=b({},e.props),o=e.key;if(null!=t)for(u in void 0!==t.key&&(o=""+t.key),t)R.call(t,u)&&"key"!==u&&"__self"!==u&&"__source"!==u&&("ref"!==u||void 0!==t.ref)&&(n[u]=t[u]);var u=arguments.length-2;if(1===u)n.children=r;else if(1<u){for(var i=Array(u),l=0;l<u;l++)i[l]=arguments[l+2];n.children=i}return P(e.type,o,n)},r.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:s,_context:e},e},r.createElement=function(e,t,r){var n,o={},u=null;if(null!=t)for(n in void 0!==t.key&&(u=""+t.key),t)R.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(o[n]=t[n]);var i=arguments.length-2;if(1===i)o.children=r;else if(1<i){for(var l=Array(i),a=0;a<i;a++)l[a]=arguments[a+2];o.children=l}if(e&&e.defaultProps)for(n in i=e.defaultProps)void 0===o[n]&&(o[n]=i[n]);return P(e,u,o)},r.createRef=function(){return{current:null}},r.forwardRef=function(e){return{$$typeof:f,render:e}},r.isValidElement=A,r.lazy=function(e){return{$$typeof:y,_payload:{_status:-1,_result:e},_init:U}},r.memo=function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},r.startTransition=N,r.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},r.use=function(e){return T.H.use(e)},r.useActionState=function(e,t,r){return T.H.useActionState(e,t,r)},r.useCallback=function(e,t){return T.H.useCallback(e,t)},r.useContext=function(e){return T.H.useContext(e)},r.useDebugValue=function(){},r.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},r.useEffect=function(e,t){return T.H.useEffect(e,t)},r.useEffectEvent=function(e){return T.H.useEffectEvent(e)},r.useId=function(){return T.H.useId()},r.useImperativeHandle=function(e,t,r){return T.H.useImperativeHandle(e,t,r)},r.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},r.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},r.useMemo=function(e,t){return T.H.useMemo(e,t)},r.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},r.useReducer=function(e,t,r){return T.H.useReducer(e,t,r)},r.useRef=function(e){return T.H.useRef(e)},r.useState=function(e){return T.H.useState(e)},r.useSyncExternalStore=function(e,t,r){return T.H.useSyncExternalStore(e,t,r)},r.useTransition=function(){return T.H.useTransition()},r.version="19.3.0-canary-f93b9fd4-20251217"},71645,(e,t,r)=>{"use strict";t.exports=e.r(50740)},90373,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useUntrackedPathname",{enumerable:!0,get:function(){return u}});let n=e.r(71645),o=e.r(61994);function u(){return!function(){if("u"<typeof window){let{workUnitAsyncStorage:t}=e.r(62141),r=t.getStore();if(!r)return!1;switch(r.type){case"prerender":case"prerender-client":case"prerender-ppr":let n=r.fallbackRouteParams;return!!n&&n.size>0}}return!1}()?(0,n.useContext)(o.PathnameContext):null}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},78377,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={handleHardNavError:function(){return i},useNavFailureHandler:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});e.r(71645);let u=e.r(51191);function i(e){return!!(e&&"u">typeof window)&&!!window.next.__pendingUrl&&(0,u.createHrefFromUrl)(new URL(window.location.href))!==(0,u.createHrefFromUrl)(window.next.__pendingUrl)&&(console.error("Error occurred during navigation, falling back to hard navigation",e),window.location.href=window.next.__pendingUrl.toString(),!0)}function l(){}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},12354,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HandleISRError",{enumerable:!0,get:function(){return o}});let n="u"<typeof window?e.r(63599).workAsyncStorage:void 0;function o({error:e}){if(n){let t=n.getStore();if(t?.isStaticGeneration)throw e&&console.error(e),e}return null}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},72383,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ErrorBoundary:function(){return y},ErrorBoundaryHandler:function(){return p}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(55682),i=e.r(18050),l=u._(e.r(71645)),a=e.r(90373),s=e.r(65713);e.r(78377);let c=e.r(12354),f=e.r(82604),d="u">typeof window&&(0,f.isBot)(window.navigator.userAgent);class p extends l.default.Component{constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}static getDerivedStateFromError(e){if((0,s.isNextRouterError)(e))throw e;return{error:e}}static getDerivedStateFromProps(e,t){let{error:r}=t;return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error&&!d?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.HandleISRError,{error:this.state.error}),this.props.errorStyles,this.props.errorScripts,(0,i.jsx)(this.props.errorComponent,{error:this.state.error,reset:this.reset})]}):this.props.children}}function y({errorComponent:e,errorStyles:t,errorScripts:r,children:n}){let o=(0,a.useUntrackedPathname)();return e?(0,i.jsx)(p,{pathname:o,errorComponent:e,errorStyles:t,errorScripts:r,children:n}):(0,i.jsx)(i.Fragment,{children:n})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},58442,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={RedirectBoundary:function(){return p},RedirectErrorBoundary:function(){return d}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(90809),i=e.r(18050),l=u._(e.r(71645)),a=e.r(76562),s=e.r(24063),c=e.r(68391);function f({redirect:e,reset:t,redirectType:r}){let n=(0,a.useRouter)();return(0,l.useEffect)(()=>{l.default.startTransition(()=>{r===c.RedirectType.push?n.push(e,{}):n.replace(e,{}),t()})},[e,r,t,n]),null}class d extends l.default.Component{constructor(e){super(e),this.state={redirect:null,redirectType:null}}static getDerivedStateFromError(e){if((0,c.isRedirectError)(e)){let t=(0,s.getURLFromRedirectError)(e),r=(0,s.getRedirectTypeFromError)(e);return"handled"in e?{redirect:null,redirectType:null}:{redirect:t,redirectType:r}}throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,i.jsx)(f,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}}function p({children:e}){let t=(0,a.useRouter)();return(0,i.jsx)(d,{router:t,children:e})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},1244,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"unresolvedThenable",{enumerable:!0,get:function(){return n}});let n={then:()=>{}};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},97367,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={MetadataBoundary:function(){return l},OutletBoundary:function(){return s},RootLayoutBoundary:function(){return c},ViewportBoundary:function(){return a}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(54839),i={[u.METADATA_BOUNDARY_NAME]:function({children:e}){return e},[u.VIEWPORT_BOUNDARY_NAME]:function({children:e}){return e},[u.OUTLET_BOUNDARY_NAME]:function({children:e}){return e},[u.ROOT_LAYOUT_BOUNDARY_NAME]:function({children:e}){return e}},l=i[u.METADATA_BOUNDARY_NAME.slice(0)],a=i[u.VIEWPORT_BOUNDARY_NAME.slice(0)],s=i[u.OUTLET_BOUNDARY_NAME.slice(0)],c=i[u.ROOT_LAYOUT_BOUNDARY_NAME.slice(0)]},42732,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=e.r(55682)._(e.r(71645)).default.createContext({})},68027,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let n=e.r(18050),o=e.r(12354),u={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},i={fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"},l=function({error:e}){let t=e?.digest;return(0,n.jsxs)("html",{id:"__next_error__",children:[(0,n.jsx)("head",{}),(0,n.jsxs)("body",{children:[(0,n.jsx)(o.HandleISRError,{error:e}),(0,n.jsx)("div",{style:u,children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("h2",{style:i,children:["Application error: a ",t?"server":"client","-side exception has occurred while loading ",window.location.hostname," (see the"," ",t?"server logs":"browser console"," for more information)."]}),t?(0,n.jsx)("p",{style:i,children:`Digest: ${t}`}):null]})})]})]})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]);
@@ -1 +0,0 @@
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])},84827,87927,e=>{"use strict";var t=e.i(18050),a=e.i(71645);function s({children:e,error:a,actions:s}){return(0,t.jsxs)("div",{className:"ck-glass p-6 space-y-4",children:[e,a?(0,t.jsx)("div",{className:"text-sm text-red-300",children:a}):null,s]})}let r="mt-1 w-full rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] bg-transparent px-3 py-2 text-sm";function l({formState:e,idField:s,updatedAt:l,bodyHeight:o="h-[320px]"}){let{title:i,setTitle:n,status:d,setStatus:c,tagsRaw:u,setTagsRaw:m,teamsRaw:x,setTeamsRaw:h,body:p,setBody:v}=e,g=(0,a.useId)(),b=`${g}-id`,j=`${g}-title`,y=`${g}-status`,f=`${g}-teams`,k=`${g}-tags`,N=`${g}-body`;return(0,t.jsxs)(t.Fragment,{children:[s?(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:b,className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"ID"}),(0,t.jsx)("input",{id:b,className:`${r} font-mono`,value:s.id,onChange:e=>s.setId(e.target.value),placeholder:"increase-trial-activation","aria-describedby":`${g}-id-hint`}),(0,t.jsxs)("div",{id:`${g}-id-hint`,className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:["Lowercase letters, numbers, hyphens. Stored as ",(0,t.jsxs)("code",{className:"font-mono",children:[s.id||"<id>",".md"]}),".",s.suggestedId&&!s.id.trim()?(0,t.jsxs)(t.Fragment,{children:[" ","Suggested:"," ",(0,t.jsx)("button",{type:"button",className:"underline",onClick:()=>s.setId(s.suggestedId??""),children:s.suggestedId})]}):null]})]}):null,(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:j,className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Title"}),(0,t.jsx)("input",{id:j,className:r,value:i,onChange:e=>n(e.target.value),placeholder:s?"Increase trial activation":"Goal title"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:y,className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Status"}),(0,t.jsxs)("select",{id:y,className:r,value:d,onChange:e=>c(e.target.value),"aria-label":"Goal status",children:[(0,t.jsx)("option",{value:"planned",children:"Planned"}),(0,t.jsx)("option",{value:"active",children:"Active"}),(0,t.jsx)("option",{value:"done",children:"Done"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:f,className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Teams (comma-separated)"}),(0,t.jsx)("input",{id:f,className:r,value:x,onChange:e=>h(e.target.value),placeholder:"development-team, marketing-team"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:k,className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Tags (comma-separated)"}),(0,t.jsx)("input",{id:k,className:r,value:u,onChange:e=>m(e.target.value),placeholder:"onboarding, growth"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("label",{htmlFor:N,className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Body (markdown)"}),null!=l?(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:l?`updated ${new Date(l).toLocaleString()}`:""}):null]}),(0,t.jsx)("textarea",{id:N,className:`mt-1 ${o} w-full rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] bg-transparent px-3 py-2 font-mono text-sm`,value:p,onChange:e=>v(e.target.value),placeholder:"Write the goal here…"})]})]})}function o(e){return e.split(",").map(e=>e.trim()).filter(Boolean)}function i(e){let[t,s]=(0,a.useState)(e?.title??""),[r,l]=(0,a.useState)(e?.status??"planned"),[i,n]=(0,a.useState)(e?.tagsRaw??""),[d,c]=(0,a.useState)(e?.teamsRaw??""),[u,m]=(0,a.useState)(e?.body??""),x=(0,a.useMemo)(()=>({title:t,setTitle:s,status:r,setStatus:l,tagsRaw:i,setTagsRaw:n,teamsRaw:d,setTeamsRaw:c,body:u,setBody:m}),[t,r,i,d,u]);return{formState:x,tags:(0,a.useMemo)(()=>o(i),[i]),teams:(0,a.useMemo)(()=>o(d),[d])}}e.s(["GoalFormCard",()=>s,"GoalFormFields",()=>l],84827),e.s(["useGoalFormState",()=>i],87927)},43809,e=>{"use strict";var t=e.i(18050),a=e.i(22016),s=e.i(84827),r=e.i(82310),l=e.i(42771),o=e.i(87927),i=e.i(18566),n=e.i(71645);function d({goalId:e}){let d=(0,i.useRouter)(),[c,u]=(0,n.useState)(!0),[m,x]=(0,n.useState)(!1),[h,p]=(0,n.useState)(null),[v,g]=(0,n.useState)(null),{formState:b,tags:j,teams:y}=(0,o.useGoalFormState)(),{setTitle:f,setStatus:k,setTagsRaw:N,setTeamsRaw:w,setBody:S}=b,C=(0,n.useCallback)(async()=>{u(!0),p(null);try{let t=await (0,l.fetchJson)(`/api/goals/${encodeURIComponent(e)}`,{cache:"no-store"}),a=t.goal;f(a.title??""),k(a.status??"planned"),N((a.tags??[]).join(", ")),w((a.teams??[]).join(", ")),S(t.body??""),g(a.updatedAt??null)}catch(e){p((0,r.errorMessage)(e))}finally{u(!1)}},[e,f,k,N,w,S]);async function F(){x(!0),p(null);try{let t=await (0,l.fetchJson)(`/api/goals/${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({title:b.title,status:b.status,tags:j,teams:y,body:b.body})});g(t.goal.updatedAt??null),d.push("/goals")}catch(e){p((0,r.errorMessage)(e))}finally{x(!1)}}async function $(){x(!0),p(null);try{await (0,l.fetchJson)(`/api/goals/${encodeURIComponent(e)}/promote`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({})}),await C()}catch(e){p((0,r.errorMessage)(e))}finally{x(!1)}}async function I(){if(window.confirm(`Delete goal "${e}"? This will delete the markdown file.`)){x(!0),p(null);try{await (0,l.fetchJson)(`/api/goals/${encodeURIComponent(e)}`,{method:"DELETE"}),d.push("/goals")}catch(e){p((0,r.errorMessage)(e))}finally{x(!1)}}}return(0,n.useEffect)(()=>{C()},[C]),(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)(a.default,{href:"/goals",className:"text-sm font-medium hover:underline",children:"← Back"}),(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] font-mono",children:e})]}),(0,t.jsx)(s.GoalFormCard,{error:h,actions:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("button",{onClick:()=>void F(),disabled:m||c,className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white disabled:opacity-50",children:m?"Saving…":"Save"}),(0,t.jsx)("button",{onClick:()=>void C(),disabled:m,className:"rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] px-3 py-2 text-sm",children:"Reload"}),(0,t.jsx)("button",{onClick:()=>void $(),disabled:m||c,className:"rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] px-3 py-2 text-sm font-medium",children:"Promote to inbox"}),(0,t.jsx)("button",{onClick:()=>void I(),disabled:m||c,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-2 text-sm font-medium text-[color:var(--ck-accent-red)] transition-colors hover:bg-[color:rgba(255,59,48,0.12)]",children:"Delete"})]}),children:(0,t.jsx)(s.GoalFormFields,{formState:b,updatedAt:v})}),(0,t.jsxs)("div",{className:"ck-glass p-6",children:[(0,t.jsx)("div",{className:"text-sm font-medium",children:"Preview"}),(0,t.jsx)("pre",{className:"mt-2 whitespace-pre-wrap break-words text-sm leading-6 text-[color:var(--ck-text-primary)]",children:b.body})]}),c?(0,t.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"Loading…"}):null]})}e.s(["default",()=>d])}]);
@@ -1,3 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,88143,(e,t,r)=>{"use strict";function a({widthInt:e,heightInt:t,blurWidth:r,blurHeight:a,blurDataURL:i,objectFit:s}){let l=r?40*r:e,n=a?40*a:t,o=l&&n?`viewBox='0 0 ${l} ${n}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${o}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${o?"none":"contain"===s?"xMidYMid":"cover"===s?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${i}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return a}})},87690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={VALID_LOADERS:function(){return s},imageConfigDefault:function(){return l}};for(var i in a)Object.defineProperty(r,i,{enumerable:!0,get:a[i]});let s=["default","imgix","cloudinary","akamai","custom"],l={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},8927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return d}}),e.r(33525);let a=e.r(43369),i=e.r(88143),s=e.r(87690),l=["-moz-initial","fill","none","scale-down",void 0];function n(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function d({src:e,sizes:t,unoptimized:r=!1,priority:d=!1,preload:c=!1,loading:u,className:f,quality:m,width:p,height:h,fill:x=!1,style:g,overrideSrc:b,onLoad:v,onLoadingComplete:w,placeholder:y="empty",blurDataURL:j,fetchPriority:k,decoding:N="async",layout:_,objectFit:P,objectPosition:C,lazyBoundary:S,lazyRoot:O,...E},I){var R;let z,M,$,{imgConf:D,showAltText:T,blurComplete:A,defaultLoader:L}=I,B=D||s.imageConfigDefault;if("allSizes"in B)z=B;else{let e=[...B.deviceSizes,...B.imageSizes].sort((e,t)=>e-t),t=B.deviceSizes.sort((e,t)=>e-t),r=B.qualities?.sort((e,t)=>e-t);z={...B,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===L)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let U=E.loader||L;delete E.loader,delete E.srcSet;let F="__next_img_default"in U;if(F){if("custom"===z.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
2
- Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=U;U=t=>{let{config:r,...a}=t;return e(a)}}if(_){"fill"===_&&(x=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[_];e&&(g={...g,...e});let r={responsive:"100vw",fill:"100vw"}[_];r&&!t&&(t=r)}let q="",W=o(p),G=o(h);if((R=e)&&"object"==typeof R&&(n(R)||void 0!==R.src)){let t=n(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(M=t.blurWidth,$=t.blurHeight,j=j||t.blurDataURL,q=t.src,!x)if(W||G){if(W&&!G){let e=W/t.width;G=Math.round(t.height*e)}else if(!W&&G){let e=G/t.height;W=Math.round(t.width*e)}}else W=t.width,G=t.height}let X=!d&&!c&&("lazy"===u||void 0===u);(!(e="string"==typeof e?e:q)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,X=!1),z.unoptimized&&(r=!0),F&&!z.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let V=o(m),H=Object.assign(x?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:P,objectPosition:C}:{},T?{}:{color:"transparent"},g),K=A||"empty"===y?null:"blur"===y?`url("data:image/svg+xml;charset=utf-8,${(0,i.getImageBlurSvg)({widthInt:W,heightInt:G,blurWidth:M,blurHeight:$,blurDataURL:j||"",objectFit:H.objectFit})}")`:`url("${y}")`,J=l.includes(H.objectFit)?"fill"===H.objectFit?"100% 100%":"cover":H.objectFit,Q=K?{backgroundSize:J,backgroundPosition:H.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:K}:{},Y=function({config:e,src:t,unoptimized:r,width:i,quality:s,sizes:l,loader:n}){if(r){let e=(0,a.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")&&e){let r=t.includes("?")?"&":"?";t=`${t}${r}dpl=${e}`}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:o,kind:d}=function({deviceSizes:e,allSizes:t},r,a){if(a){let r=/(^|\s)(1?\d?\d)vw/g,i=[];for(let e;e=r.exec(a);)i.push(parseInt(e[2]));if(i.length){let r=.01*Math.min(...i);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,i,l),c=o.length-1;return{sizes:l||"w"!==d?l:"100vw",srcSet:o.map((r,a)=>`${n({config:e,src:t,quality:s,width:r})} ${"w"===d?r:a+1}${d}`).join(", "),src:n({config:e,src:t,quality:s,width:o[c]})}}({config:z,src:e,unoptimized:r,width:W,quality:V,sizes:t,loader:U}),Z=X?"lazy":u;return{props:{...E,loading:Z,fetchPriority:k,width:W,height:G,decoding:N,className:f,style:{...H,...Q},sizes:Y.sizes,srcSet:Y.srcSet,src:b||Y.src},meta:{unoptimized:r,preload:c||d,placeholder:y,fill:x}}}},98879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n}});let a=e.r(71645),i="u"<typeof window,s=i?()=>{}:a.useLayoutEffect,l=i?()=>{}:a.useEffect;function n(e){let{headManager:t,reduceComponentsToState:r}=e;function n(){if(t&&t.mountedInstances){let e=a.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return i&&(t?.mountedInstances?.add(e.children),n()),s(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),s(()=>(t&&(t._pendingUpdate=n),()=>{t&&(t._pendingUpdate=n)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},25633,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return h},defaultHead:function(){return u}};for(var i in a)Object.defineProperty(r,i,{enumerable:!0,get:a[i]});let s=e.r(55682),l=e.r(90809),n=e.r(18050),o=l._(e.r(71645)),d=s._(e.r(98879)),c=e.r(42732);function u(){return[(0,n.jsx)("meta",{charSet:"utf-8"},"charset"),(0,n.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(33525);let m=["name","httpEquiv","charSet","itemProp"];function p(e){let t,r,a,i;return e.reduce(f,[]).reverse().concat(u().reverse()).filter((t=new Set,r=new Set,a=new Set,i={},e=>{let s=!0,l=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){l=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?s=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?s=!1:r.add(e.type);break;case"meta":for(let t=0,r=m.length;t<r;t++){let r=m[t];if(e.props.hasOwnProperty(r))if("charSet"===r)a.has(r)?s=!1:a.add(r);else{let t=e.props[r],a=i[r]||new Set;("name"!==r||!l)&&a.has(t)?s=!1:(a.add(t),i[r]=a)}}}return s})).reverse().map((e,t)=>{let r=e.key||t;return o.default.cloneElement(e,{key:r})})}let h=function({children:e}){let t=(0,o.useContext)(c.HeadManagerContext);return(0,n.jsx)(d.default,{reduceComponentsToState:p,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18556,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return s}});let a=e.r(55682)._(e.r(71645)),i=e.r(87690),s=a.default.createContext(i.imageConfigDefault)},65856,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return a}});let a=e.r(55682)._(e.r(71645)).default.createContext(null)},70965,(e,t,r)=>{"use strict";function a(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,0):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return a}})},1948,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let a=e.r(70965),i=e.r(43369);function s({config:e,src:t,width:r,quality:s}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
3
- Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let l=(0,a.findClosestQuality)(s,e),n=(0,i.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${l}${t.startsWith("/")&&n?`&dpl=${n}`:""}`}s.__next_img_default=!0;let l=s},5500,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return w}});let a=e.r(55682),i=e.r(90809),s=e.r(18050),l=i._(e.r(71645)),n=a._(e.r(74080)),o=a._(e.r(25633)),d=e.r(8927),c=e.r(87690),u=e.r(18556);e.r(33525);let f=e.r(65856),m=a._(e.r(1948)),p=e.r(18581),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function x(e,t,r,a,i,s,l){let n=e?.src;e&&e["data-loaded-src"]!==n&&(e["data-loaded-src"]=n,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let a=!1,i=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>a,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{a=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}a?.current&&a.current(e)}}))}function g(e){return l.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b=(0,l.forwardRef)(({src:e,srcSet:t,sizes:r,height:a,width:i,decoding:n,className:o,style:d,fetchPriority:c,placeholder:u,loading:f,unoptimized:m,fill:h,onLoadRef:b,onLoadingCompleteRef:v,setBlurComplete:w,setShowAltText:y,sizesInput:j,onLoad:k,onError:N,..._},P)=>{let C=(0,l.useCallback)(e=>{e&&(N&&(e.src=e.src),e.complete&&x(e,u,b,v,w,m,j))},[e,u,b,v,w,N,m,j]),S=(0,p.useMergedRef)(P,C);return(0,s.jsx)("img",{..._,...g(c),loading:f,width:i,height:a,decoding:n,"data-nimg":h?"fill":"1",className:o,style:d,sizes:r,srcSet:t,src:e,ref:S,onLoad:e=>{x(e.currentTarget,u,b,v,w,m,j)},onError:e=>{y(!0),"empty"!==u&&w(!0),N&&N(e)}})});function v({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...g(t.fetchPriority)};return e&&n.default.preload?(n.default.preload(t.src,r),null):(0,s.jsx)(o.default,{children:(0,s.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let w=(0,l.forwardRef)((e,t)=>{let r=(0,l.useContext)(f.RouterContext),a=(0,l.useContext)(u.ImageConfigContext),i=(0,l.useMemo)(()=>{let e=h||a||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),i=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:i,localPatterns:"u"<typeof window?a?.localPatterns:e.localPatterns}},[a]),{onLoad:n,onLoadingComplete:o}=e,p=(0,l.useRef)(n);(0,l.useEffect)(()=>{p.current=n},[n]);let x=(0,l.useRef)(o);(0,l.useEffect)(()=>{x.current=o},[o]);let[g,w]=(0,l.useState)(!1),[y,j]=(0,l.useState)(!1),{props:k,meta:N}=(0,d.getImgProps)(e,{defaultLoader:m.default,imgConf:i,blurComplete:g,showAltText:y});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(b,{...k,unoptimized:N.unoptimized,placeholder:N.placeholder,fill:N.fill,onLoadRef:p,onLoadingCompleteRef:x,setBlurComplete:w,setShowAltText:j,sizesInput:e.sizes,ref:t}),N.preload?(0,s.jsx)(v,{isAppRouter:!r,imgAttributes:k}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},94909,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return c},getImageProps:function(){return d}};for(var i in a)Object.defineProperty(r,i,{enumerable:!0,get:a[i]});let s=e.r(55682),l=e.r(8927),n=e.r(5500),o=s._(e.r(1948));function d(e){let{props:t}=(0,l.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let c=n.Image},57688,(e,t,r)=>{t.exports=e.r(94909)},529,e=>{"use strict";var t=e.i(18050),r=e.i(57688),a=e.i(22016),i=e.i(71645),s=e.i(18566);let l=new Set(["png","jpg","jpeg","gif","webp","svg"]);function n(e){let t=e.toLowerCase().split(".").pop()??"";return l.has(t)}function o(e,t){return`/api/teams/workflow-deliverables/file?teamId=${encodeURIComponent(e)}&runId=${encodeURIComponent(t.runId)}&path=${encodeURIComponent(t.relativePath)}`}function d(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(1))+" "+["B","KB","MB","GB"][t]}function c(e){try{return new Date(e).toLocaleString()}catch{return e}}function u(e){switch(e.toLowerCase().split(".").pop()){case"md":return"📝";case"json":return"🔧";case"txt":default:return"📄";case"html":case"htm":return"🌐";case"css":return"🎨";case"js":case"ts":case"tsx":case"jsx":return"⚙️";case"png":case"jpg":case"jpeg":case"gif":case"webp":return"🖼️";case"pdf":return"📋";case"zip":case"tar":case"gz":return"📦"}}function f({teamId:e,deliverables:l,workflows:f}){let m=(0,s.useRouter)(),[p,h]=(0,i.useState)(""),[x,g]=(0,i.useState)(""),[b,v]=(0,i.useState)(""),[w,y]=(0,i.useState)(null),j=(0,i.useMemo)(()=>{let e=b.trim().toLowerCase();return l.filter(t=>{if(p&&t.workflowId!==p||x&&t.runId!==x)return!1;if(!e)return!0;let r=f[t.workflowId]?.name??"";return t.fileName.toLowerCase().includes(e)||t.workflowId.toLowerCase().includes(e)||t.runId.toLowerCase().includes(e)||r.toLowerCase().includes(e)||t.contentPreview&&t.contentPreview.toLowerCase().includes(e)})},[l,b,p,x,f]),k=(0,i.useMemo)(()=>Array.from(new Set(l.map(e=>e.workflowId).filter(Boolean))).sort(),[l]),N=(0,i.useMemo)(()=>Array.from(new Set((p?l.filter(e=>e.workflowId===p):l).map(e=>e.runId).filter(Boolean))).sort(),[l,p]),_=async t=>{try{if(t.isText&&t.contentPreview)await navigator.clipboard.writeText(t.contentPreview),alert("Content copied to clipboard!");else{let r=o(e,t),a=document.createElement("a");a.href=r,a.download=t.fileName,document.body.appendChild(a),a.click(),a.remove()}}catch{alert("Failed to download file")}};return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("div",{className:"rounded-[var(--ck-radius-lg)] border border-white/10 bg-black/10 p-4",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"workflow"}),(0,t.jsxs)("select",{value:p,onChange:e=>{h(e.target.value||""),g("")},className:"mt-1 w-64 max-w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"All workflows"}),k.map(e=>(0,t.jsx)("option",{value:e,children:f[e]?.name?`${f[e]?.name} (${e})`:e},e))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"run"}),(0,t.jsxs)("select",{value:x,onChange:e=>g(e.target.value||""),className:"mt-1 w-56 max-w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"All runs"}),N.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"search"}),(0,t.jsx)("input",{value:b,onChange:e=>v(e.target.value),placeholder:"filename / content",className:"mt-1 w-72 max-w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("button",{type:"button",onClick:()=>m.refresh(),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:"Refresh"})})]})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,t.jsxs)("div",{className:"lg:col-span-2 rounded-[var(--ck-radius-lg)] border border-white/10 bg-black/10 p-4",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4",children:"Workflow Deliverables"}),j.length>0?(0,t.jsx)("div",{className:"space-y-2",children:j.map((i,s)=>{let l=w?.absolutePath===i.absolutePath,m=f[i.workflowId]?.name||i.workflowId;return(0,t.jsx)("div",{className:`cursor-pointer rounded-[var(--ck-radius-sm)] border p-3 transition-colors ${l?"border-white/20 bg-white/10":"border-white/5 bg-black/5 hover:bg-white/5"}`,onClick:()=>y(i),children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[n(i.fileName)&&(0,t.jsx)("div",{className:"flex-shrink-0 w-12 h-12 rounded overflow-hidden bg-black/20 border border-white/10",children:(0,t.jsx)(r.default,{src:o(e,i),alt:i.fileName,width:48,height:48,className:"w-full h-full object-cover",unoptimized:!0})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-lg",children:u(i.fileName)}),(0,t.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] truncate",children:i.fileName}),i.isText&&(0,t.jsx)("span",{className:"text-xs bg-green-500/20 text-green-400 px-1.5 py-0.5 rounded",children:"TEXT"})]}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:m})," · ",(0,t.jsx)("span",{className:"font-mono",children:i.runId})]}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[i.relativePath!==i.fileName&&(0,t.jsxs)("span",{children:[i.relativePath," · "]}),d(i.size)," · ",c(i.mtime)]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),_(i)},className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:i.isText?"Copy":"Download"}),(0,t.jsx)(a.default,{href:`/teams/${e}/runs/${i.workflowId}/${i.runId}`,onClick:e=>e.stopPropagation(),className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"View Run →"})]})]})},`${i.runId}-${i.relativePath}`)})}):(0,t.jsxs)("div",{className:"text-center py-8 text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("div",{className:"text-4xl mb-2",children:"📋"}),(0,t.jsx)("div",{className:"text-lg mb-1",children:"No deliverables found"}),(0,t.jsx)("div",{className:"text-sm",children:"Workflow runs will create deliverables that appear here when they complete."})]}),j.length>0&&(0,t.jsxs)("div",{className:"mt-4 text-xs text-[color:var(--ck-text-tertiary)]",children:["Showing ",j.length," of ",l.length," deliverables."]})]}),(0,t.jsxs)("div",{className:"lg:col-span-1 rounded-[var(--ck-radius-lg)] border border-white/10 bg-black/10 p-4",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)] mb-3",children:"Preview"}),w?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-3 pb-3 border-b border-white/10",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("span",{className:"text-lg",children:u(w.fileName)}),(0,t.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] text-sm break-all",children:w.fileName})]}),(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] space-y-1",children:[(0,t.jsxs)("div",{children:["Size: ",d(w.size)]}),(0,t.jsxs)("div",{children:["Modified: ",c(w.mtime)]}),(0,t.jsxs)("div",{children:["Path: ",w.relativePath]})]})]}),n(w.fileName)?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Image Preview:"}),(0,t.jsx)("div",{className:"bg-black/20 border border-white/10 rounded-[var(--ck-radius-sm)] p-2 overflow-hidden",children:(0,t.jsx)(r.default,{src:o(e,w),alt:w.fileName,width:800,height:600,className:"w-full h-auto rounded-[var(--ck-radius-sm)] object-contain max-h-[500px]",unoptimized:!0})}),(0,t.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,t.jsx)("a",{href:o(e,w),target:"_blank",rel:"noopener noreferrer",className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Open full size ↗"}),(0,t.jsx)("button",{onClick:()=>_(w),className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download"})]})]}):w.isText&&w.contentPreview?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Content Preview:"}),(0,t.jsx)("div",{className:"bg-black/20 border border-white/10 rounded-[var(--ck-radius-sm)] p-3 max-h-[400px] overflow-auto",children:(0,t.jsx)("pre",{className:"text-xs text-[color:var(--ck-text-primary)] whitespace-pre-wrap break-words",children:w.contentPreview})})]}):(0,t.jsxs)("div",{className:"text-center py-6",children:[(0,t.jsx)("div",{className:"text-3xl mb-2",children:u(w.fileName)}),(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-secondary)] mb-2",children:[d(w.size)," · ",w.fileName.split(".").pop()?.toUpperCase()," file"]}),(0,t.jsx)("button",{onClick:()=>_(w),className:"text-xs px-3 py-1.5 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download file"})]})]}):(0,t.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)] italic",children:"Select a deliverable to preview"})]})]})]})}e.s(["default",()=>f])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54523,e=>{"use strict";var t=e.i(18050),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])}]);