nodal-agents 0.9.2 → 0.9.3

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 (298) hide show
  1. package/cli.js +629 -426
  2. package/docs-index.json +21 -14
  3. package/migrations/0123_chat_messages_stopped.sql +10 -0
  4. package/migrations/0124_chat_messages_cut_reason.sql +12 -0
  5. package/migrations/0125_shell_checklist.sql +31 -0
  6. package/migrations/0126_run_budget.sql +57 -0
  7. package/migrations/0127_agent_budget.sql +86 -0
  8. package/migrations/0128_shell_policy_retired_kinds.sql +52 -0
  9. package/migrations/meta/_journal.json +42 -0
  10. package/package.json +1 -1
  11. package/runner.js +4373 -2761
  12. package/web/.next/BUILD_ID +1 -1
  13. package/web/.next/app-path-routes-manifest.json +6 -2
  14. package/web/.next/build-manifest.json +2 -2
  15. package/web/.next/prerender-manifest.json +5 -5
  16. package/web/.next/routes-manifest.json +28 -0
  17. package/web/.next/server/app/(dashboard)/agents/[id]/channels/page.js +1 -1
  18. package/web/.next/server/app/(dashboard)/agents/[id]/channels/page_client-reference-manifest.js +1 -1
  19. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page.js +4 -4
  20. package/web/.next/server/app/(dashboard)/agents/[id]/edit/page_client-reference-manifest.js +1 -1
  21. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page.js +1 -1
  22. package/web/.next/server/app/(dashboard)/agents/[id]/telegram/page_client-reference-manifest.js +1 -1
  23. package/web/.next/server/app/(dashboard)/agents/page.js +1 -1
  24. package/web/.next/server/app/(dashboard)/agents/page_client-reference-manifest.js +1 -1
  25. package/web/.next/server/app/(dashboard)/approvals/page.js +1 -1
  26. package/web/.next/server/app/(dashboard)/approvals/page_client-reference-manifest.js +1 -1
  27. package/web/.next/server/app/(dashboard)/automations/[id]/page.js +1 -1
  28. package/web/.next/server/app/(dashboard)/automations/[id]/page_client-reference-manifest.js +1 -1
  29. package/web/.next/server/app/(dashboard)/automations/page.js +1 -1
  30. package/web/.next/server/app/(dashboard)/automations/page_client-reference-manifest.js +1 -1
  31. package/web/.next/server/app/(dashboard)/chat/[id]/page.js +1 -1
  32. package/web/.next/server/app/(dashboard)/chat/[id]/page_client-reference-manifest.js +1 -1
  33. package/web/.next/server/app/(dashboard)/chat/page.js +1 -1
  34. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  35. package/web/.next/server/app/(dashboard)/chat/runs/[id]/page.js +1 -0
  36. package/web/.next/server/app/(dashboard)/chat/runs/[id]/page_client-reference-manifest.js +1 -0
  37. package/web/.next/server/app/(dashboard)/code/[id]/page.js +1 -1
  38. package/web/.next/server/app/(dashboard)/code/[id]/page_client-reference-manifest.js +1 -1
  39. package/web/.next/server/app/(dashboard)/code/page.js +1 -1
  40. package/web/.next/server/app/(dashboard)/code/page_client-reference-manifest.js +1 -1
  41. package/web/.next/server/app/(dashboard)/connectors/page.js +1 -1
  42. package/web/.next/server/app/(dashboard)/connectors/page_client-reference-manifest.js +1 -1
  43. package/web/.next/server/app/(dashboard)/credentials/page.js +1 -1
  44. package/web/.next/server/app/(dashboard)/credentials/page_client-reference-manifest.js +1 -1
  45. package/web/.next/server/app/(dashboard)/dashboard/page.js +1 -1
  46. package/web/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  47. package/web/.next/server/app/(dashboard)/jobs/[id]/page.js +1 -1
  48. package/web/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -1
  49. package/web/.next/server/app/(dashboard)/jobs/page.js +1 -1
  50. package/web/.next/server/app/(dashboard)/jobs/page_client-reference-manifest.js +1 -1
  51. package/web/.next/server/app/(dashboard)/learned-skills/page.js +1 -1
  52. package/web/.next/server/app/(dashboard)/learned-skills/page_client-reference-manifest.js +1 -1
  53. package/web/.next/server/app/(dashboard)/llm-providers/page.js +1 -1
  54. package/web/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/(dashboard)/logs/page.js +1 -1
  56. package/web/.next/server/app/(dashboard)/logs/page_client-reference-manifest.js +1 -1
  57. package/web/.next/server/app/(dashboard)/mcp/page.js +1 -1
  58. package/web/.next/server/app/(dashboard)/mcp/page_client-reference-manifest.js +1 -1
  59. package/web/.next/server/app/(dashboard)/memories/page.js +1 -1
  60. package/web/.next/server/app/(dashboard)/memories/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/app/(dashboard)/page.js +1 -1
  62. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  63. package/web/.next/server/app/(dashboard)/scheduled/[id]/page.js +1 -1
  64. package/web/.next/server/app/(dashboard)/scheduled/[id]/page_client-reference-manifest.js +1 -1
  65. package/web/.next/server/app/(dashboard)/scheduled/page.js +1 -1
  66. package/web/.next/server/app/(dashboard)/scheduled/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(dashboard)/settings/page.js +1 -1
  68. package/web/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  69. package/web/.next/server/app/(dashboard)/settings/root-context/page.js +1 -1
  70. package/web/.next/server/app/(dashboard)/settings/root-context/page_client-reference-manifest.js +1 -1
  71. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page.js +1 -1
  72. package/web/.next/server/app/(dashboard)/skills/[id]/edit/page_client-reference-manifest.js +1 -1
  73. package/web/.next/server/app/(dashboard)/skills/new/page.js +1 -1
  74. package/web/.next/server/app/(dashboard)/skills/new/page_client-reference-manifest.js +1 -1
  75. package/web/.next/server/app/(dashboard)/skills/page.js +1 -1
  76. package/web/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
  77. package/web/.next/server/app/(dashboard)/spaces/[id]/files/page.js +1 -1
  78. package/web/.next/server/app/(dashboard)/spaces/[id]/files/page_client-reference-manifest.js +1 -1
  79. package/web/.next/server/app/(dashboard)/spaces/[id]/page.js +1 -1
  80. package/web/.next/server/app/(dashboard)/spaces/[id]/page_client-reference-manifest.js +1 -1
  81. package/web/.next/server/app/(dashboard)/spaces/page.js +1 -1
  82. package/web/.next/server/app/(dashboard)/spaces/page_client-reference-manifest.js +1 -1
  83. package/web/.next/server/app/_global-error/page.js +2 -2
  84. package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  85. package/web/.next/server/app/_global-error.html +1 -1
  86. package/web/.next/server/app/_global-error.rsc +2 -2
  87. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  88. package/web/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +2 -2
  89. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  90. package/web/.next/server/app/_not-found/page.js +1 -1
  91. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  92. package/web/.next/server/app/_not-found.html +1 -1
  93. package/web/.next/server/app/_not-found.rsc +3 -3
  94. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  95. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  96. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  97. package/web/.next/server/app/api/auth/[...all]/route.js +1 -1
  98. package/web/.next/server/app/api/chat/live/route.js +4 -0
  99. package/web/.next/server/app/api/chat/live/route_client-reference-manifest.js +1 -0
  100. package/web/.next/server/app/api/chat/stop/route.js +1 -0
  101. package/web/.next/server/app/api/chat/stop/route_client-reference-manifest.js +1 -0
  102. package/web/.next/server/app/api/chat/stream/route.js +3 -3
  103. package/web/.next/server/app/api/health/route.js +1 -1
  104. package/web/.next/server/app/api/oauth/[provider]/callback/route.js +1 -1
  105. package/web/.next/server/app/api/oauth/[provider]/start/route.js +1 -1
  106. package/web/.next/server/app/api/runs/[jobId]/media/route.js +1 -0
  107. package/web/.next/server/app/api/runs/[jobId]/media/route_client-reference-manifest.js +1 -0
  108. package/web/.next/server/app/auth/callback/route.js +1 -1
  109. package/web/.next/server/app/login/page.js +1 -1
  110. package/web/.next/server/app/login/page_client-reference-manifest.js +1 -1
  111. package/web/.next/server/app/onboarding/page.js +2 -2
  112. package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  113. package/web/.next/server/app-paths-manifest.json +6 -2
  114. package/web/.next/server/chunks/1326.js +136 -0
  115. package/web/.next/server/chunks/1406.js +1773 -0
  116. package/web/.next/server/chunks/1615.js +1 -0
  117. package/web/.next/server/chunks/1873.js +1 -0
  118. package/web/.next/server/chunks/2443.js +3 -0
  119. package/web/.next/server/chunks/3483.js +1 -0
  120. package/web/.next/server/chunks/3675.js +1 -1
  121. package/web/.next/server/chunks/3920.js +1 -0
  122. package/web/.next/server/chunks/42.js +3 -3
  123. package/web/.next/server/chunks/4546.js +1 -0
  124. package/web/.next/server/chunks/494.js +1 -1
  125. package/web/.next/server/chunks/5648.js +1 -0
  126. package/web/.next/server/chunks/5804.js +1 -1
  127. package/web/.next/server/chunks/592.js +1 -1
  128. package/web/.next/server/chunks/5976.js +1 -0
  129. package/web/.next/server/chunks/6915.js +1 -0
  130. package/web/.next/server/chunks/692.js +15 -15
  131. package/web/.next/server/chunks/7465.js +1 -0
  132. package/web/.next/server/chunks/7651.js +812 -0
  133. package/web/.next/server/chunks/7663.js +22 -22
  134. package/web/.next/server/chunks/7876.js +1 -0
  135. package/web/.next/server/chunks/7915.js +1 -1
  136. package/web/.next/server/chunks/796.js +1 -1
  137. package/web/.next/server/chunks/8030.js +1 -0
  138. package/web/.next/server/chunks/8104.js +1 -0
  139. package/web/.next/server/chunks/8697.js +1 -1
  140. package/web/.next/server/chunks/8794.js +1 -0
  141. package/web/.next/server/chunks/8830.js +1 -0
  142. package/web/.next/server/chunks/9009.js +1 -0
  143. package/web/.next/server/chunks/{2096.js → 9066.js} +1 -1
  144. package/web/.next/server/chunks/965.js +1 -1
  145. package/web/.next/server/chunks/{6213.js → 9844.js} +2 -2
  146. package/web/.next/server/chunks/9882.js +36 -0
  147. package/web/.next/server/middleware-build-manifest.js +1 -1
  148. package/web/.next/server/middleware.js +27 -27
  149. package/web/.next/server/pages/404.html +1 -1
  150. package/web/.next/server/pages/500.html +1 -1
  151. package/web/.next/server/server-reference-manifest.js +1 -1
  152. package/web/.next/server/server-reference-manifest.json +1 -1
  153. package/web/.next/static/chunks/{1091-6d0af9f18ddf99f6.js → 1091-9485133bd943918f.js} +1 -1
  154. package/web/.next/static/chunks/{1332-c8bed6b750598652.js → 1409-fe80b5952e1f40cb.js} +1 -1
  155. package/web/.next/static/chunks/1789-2566ac18a25fb387.js +1 -0
  156. package/web/.next/static/chunks/3844-36a00411beee6253.js +1 -0
  157. package/web/.next/static/chunks/4020-ec67a80b0e0b651e.js +1 -0
  158. package/web/.next/static/chunks/4666-5fd532303d09a950.js +1 -0
  159. package/web/.next/static/chunks/4771-47261da3c38b4746.js +1 -0
  160. package/web/.next/static/chunks/494-a34a6a0b36862877.js +1 -0
  161. package/web/.next/static/chunks/5034-9aff8cbeb288ac20.js +1 -0
  162. package/web/.next/static/chunks/5216-528f63f54d56b47a.js +1 -0
  163. package/web/.next/static/chunks/5575-444e6f49e2d2a328.js +1 -0
  164. package/web/.next/static/chunks/560-59e02268ee5fe11e.js +1 -0
  165. package/web/.next/static/chunks/5954-7c92f3e7812dce11.js +1 -0
  166. package/web/.next/static/chunks/{5925-76337eacde3c3bc8.js → 6724-8a6d2dc777961105.js} +11 -11
  167. package/web/.next/static/chunks/6861-5edebd867f40e3a6.js +3 -0
  168. package/web/.next/static/chunks/764-a883257e15345ae8.js +1 -0
  169. package/web/.next/static/chunks/825-c876657b507df9d8.js +1 -0
  170. package/web/.next/static/chunks/9052-33a3c725444cb518.js +1 -0
  171. package/web/.next/static/chunks/9287-41590f18e747f14c.js +1 -0
  172. package/web/.next/static/chunks/9484-f972307c1c78a8e8.js +1 -0
  173. package/web/.next/static/chunks/9643-03e18abc622d33f5.js +1 -0
  174. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/channels/page-7b6e8b91210cb2ee.js +1 -0
  175. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-16e26ece80055943.js +6 -0
  176. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-7b6e8b91210cb2ee.js +1 -0
  177. package/web/.next/static/chunks/app/(dashboard)/agents/page-ca54871a8009f0aa.js +1 -0
  178. package/web/.next/static/chunks/app/(dashboard)/approvals/page-a5d31137ad6c86c0.js +1 -0
  179. package/web/.next/static/chunks/app/(dashboard)/automations/[id]/{page-9ef1d76121b6030d.js → page-2ea773c99f54f674.js} +1 -1
  180. package/web/.next/static/chunks/app/(dashboard)/automations/page-095be3edd6287d73.js +1 -0
  181. package/web/.next/static/chunks/app/(dashboard)/chat/[id]/page-00acae0653281839.js +1 -0
  182. package/web/.next/static/chunks/app/(dashboard)/chat/page-056975f6c9d5625b.js +1 -0
  183. package/web/.next/static/chunks/app/(dashboard)/chat/runs/[id]/page-899772b15670d3de.js +1 -0
  184. package/web/.next/static/chunks/app/(dashboard)/code/[id]/page-83535784a61e8e36.js +1 -0
  185. package/web/.next/static/chunks/app/(dashboard)/code/page-7b6e8b91210cb2ee.js +1 -0
  186. package/web/.next/static/chunks/app/(dashboard)/connectors/page-af5150e89038a92b.js +1 -0
  187. package/web/.next/static/chunks/app/(dashboard)/dashboard/{page-7473d1190864cbd4.js → page-241109c80363cab1.js} +1 -1
  188. package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-899772b15670d3de.js +1 -0
  189. package/web/.next/static/chunks/app/(dashboard)/jobs/page-7b6e8b91210cb2ee.js +1 -0
  190. package/web/.next/static/chunks/app/(dashboard)/layout-2b492fe5d87e7a8c.js +1 -0
  191. package/web/.next/static/chunks/app/(dashboard)/learned-skills/page-d3d0521187a02e31.js +1 -0
  192. package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-1b5aef6848173842.js +1 -0
  193. package/web/.next/static/chunks/app/(dashboard)/logs/page-fd939bac9a74004e.js +1 -0
  194. package/web/.next/static/chunks/app/(dashboard)/mcp/page-11decdc1d91b079d.js +1 -0
  195. package/web/.next/static/chunks/app/(dashboard)/memories/{page-593161bc7c2a25d7.js → page-2dda98de596fe53c.js} +1 -1
  196. package/web/.next/static/chunks/app/(dashboard)/page-40b43271735f5935.js +1 -0
  197. package/web/.next/static/chunks/app/(dashboard)/scheduled/[id]/page-899772b15670d3de.js +1 -0
  198. package/web/.next/static/chunks/app/(dashboard)/scheduled/page-7b6e8b91210cb2ee.js +1 -0
  199. package/web/.next/static/chunks/app/(dashboard)/settings/page-420c62b3fbec2901.js +1 -0
  200. package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-7840e0f90ad51fd3.js +1 -0
  201. package/web/.next/static/chunks/app/(dashboard)/skills/page-497d3e268b76b0eb.js +1 -0
  202. package/web/.next/static/chunks/app/(dashboard)/spaces/[id]/files/page-d13f877dfd34c6c0.js +1 -0
  203. package/web/.next/static/chunks/app/(dashboard)/spaces/[id]/page-bf466093877ab1c5.js +1 -0
  204. package/web/.next/static/chunks/app/(dashboard)/spaces/page-1d264307964cfdfe.js +1 -0
  205. package/web/.next/static/chunks/app/_global-error/page-7b6e8b91210cb2ee.js +1 -0
  206. package/web/.next/static/chunks/app/_not-found/page-7b6e8b91210cb2ee.js +1 -0
  207. package/web/.next/static/chunks/app/api/auth/[...all]/route-7b6e8b91210cb2ee.js +1 -0
  208. package/web/.next/static/chunks/app/api/chat/live/route-7b6e8b91210cb2ee.js +1 -0
  209. package/web/.next/static/chunks/app/api/chat/stop/route-7b6e8b91210cb2ee.js +1 -0
  210. package/web/.next/static/chunks/app/api/chat/stream/route-7b6e8b91210cb2ee.js +1 -0
  211. package/web/.next/static/chunks/app/api/health/route-7b6e8b91210cb2ee.js +1 -0
  212. package/web/.next/static/chunks/app/api/oauth/[provider]/callback/route-7b6e8b91210cb2ee.js +1 -0
  213. package/web/.next/static/chunks/app/api/oauth/[provider]/start/route-7b6e8b91210cb2ee.js +1 -0
  214. package/web/.next/static/chunks/app/api/runs/[jobId]/media/route-7b6e8b91210cb2ee.js +1 -0
  215. package/web/.next/static/chunks/app/auth/callback/route-7b6e8b91210cb2ee.js +1 -0
  216. package/web/.next/static/chunks/app/login/{page-5357f030e5018563.js → page-d260a3be0b6857ef.js} +1 -1
  217. package/web/.next/static/chunks/app/onboarding/{page-9b6955cdd3033584.js → page-07908ee9b2b6d6b5.js} +2 -2
  218. package/web/.next/static/chunks/next/dist/client/components/builtin/app-error-7b6e8b91210cb2ee.js +1 -0
  219. package/web/.next/static/chunks/next/dist/client/components/builtin/forbidden-7b6e8b91210cb2ee.js +1 -0
  220. package/web/.next/static/chunks/next/dist/client/components/builtin/unauthorized-7b6e8b91210cb2ee.js +1 -0
  221. package/web/.next/static/css/55c009e1dd52d5a7.css +1 -0
  222. package/web/.next/static/uWxfL1NbU-xFtwNtkF4Wb/_buildManifest.js +1 -0
  223. package/web/.next/server/chunks/1960.js +0 -1
  224. package/web/.next/server/chunks/292.js +0 -1
  225. package/web/.next/server/chunks/3592.js +0 -1
  226. package/web/.next/server/chunks/409.js +0 -1
  227. package/web/.next/server/chunks/4357.js +0 -1
  228. package/web/.next/server/chunks/5547.js +0 -1
  229. package/web/.next/server/chunks/570.js +0 -1
  230. package/web/.next/server/chunks/5974.js +0 -1
  231. package/web/.next/server/chunks/6106.js +0 -1
  232. package/web/.next/server/chunks/7134.js +0 -947
  233. package/web/.next/server/chunks/7431.js +0 -1
  234. package/web/.next/server/chunks/7533.js +0 -1
  235. package/web/.next/server/chunks/7709.js +0 -1
  236. package/web/.next/server/chunks/8022.js +0 -1
  237. package/web/.next/server/chunks/8536.js +0 -3
  238. package/web/.next/server/chunks/8974.js +0 -1808
  239. package/web/.next/server/chunks/9200.js +0 -1
  240. package/web/.next/static/chunks/1054-08930540869affcc.js +0 -1
  241. package/web/.next/static/chunks/1577-09f4d5183fb172de.js +0 -1
  242. package/web/.next/static/chunks/1789-b436bca079b82fcc.js +0 -1
  243. package/web/.next/static/chunks/296-1b50dd61ac3198f4.js +0 -1
  244. package/web/.next/static/chunks/3159-f25525771781f5aa.js +0 -1
  245. package/web/.next/static/chunks/3775-3a5a749d63c785a1.js +0 -3
  246. package/web/.next/static/chunks/390-d6132d3a117487df.js +0 -1
  247. package/web/.next/static/chunks/4020-9778230f3cc2164a.js +0 -1
  248. package/web/.next/static/chunks/4771-a0aadf337f224b72.js +0 -1
  249. package/web/.next/static/chunks/494-ed02d105fa0ac132.js +0 -1
  250. package/web/.next/static/chunks/5034-fc9997ff33a114aa.js +0 -1
  251. package/web/.next/static/chunks/7879-67ac5a52d74c20d2.js +0 -1
  252. package/web/.next/static/chunks/7920-40dc6aa63e653d6b.js +0 -1
  253. package/web/.next/static/chunks/870-b7151716d04a13c3.js +0 -1
  254. package/web/.next/static/chunks/8794-2a616d1f9c210117.js +0 -1
  255. package/web/.next/static/chunks/8861-a108ed6178a56b21.js +0 -1
  256. package/web/.next/static/chunks/9643-e9c8a744dd98813d.js +0 -1
  257. package/web/.next/static/chunks/9952-992cabfb077d287c.js +0 -1
  258. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/channels/page-523c5d229e8520bf.js +0 -1
  259. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/edit/page-5ca9c1eef4d0f837.js +0 -6
  260. package/web/.next/static/chunks/app/(dashboard)/agents/[id]/telegram/page-523c5d229e8520bf.js +0 -1
  261. package/web/.next/static/chunks/app/(dashboard)/agents/page-5ffa4a2468c1f95a.js +0 -1
  262. package/web/.next/static/chunks/app/(dashboard)/approvals/page-cd46d5e439a20d3e.js +0 -1
  263. package/web/.next/static/chunks/app/(dashboard)/automations/page-46eeaa40df9e58f8.js +0 -1
  264. package/web/.next/static/chunks/app/(dashboard)/chat/[id]/page-25e095bf0cdd1c40.js +0 -1
  265. package/web/.next/static/chunks/app/(dashboard)/chat/page-e2df1a328e18da7a.js +0 -1
  266. package/web/.next/static/chunks/app/(dashboard)/code/[id]/page-f5f7624cfbb32ee2.js +0 -1
  267. package/web/.next/static/chunks/app/(dashboard)/code/page-523c5d229e8520bf.js +0 -1
  268. package/web/.next/static/chunks/app/(dashboard)/connectors/page-2ecbfc5836577888.js +0 -1
  269. package/web/.next/static/chunks/app/(dashboard)/jobs/[id]/page-47e177ab46926fd7.js +0 -1
  270. package/web/.next/static/chunks/app/(dashboard)/jobs/page-523c5d229e8520bf.js +0 -1
  271. package/web/.next/static/chunks/app/(dashboard)/layout-0b429859260736b2.js +0 -1
  272. package/web/.next/static/chunks/app/(dashboard)/learned-skills/page-596d973a31e774db.js +0 -1
  273. package/web/.next/static/chunks/app/(dashboard)/llm-providers/page-ba1968c9430c4dd4.js +0 -1
  274. package/web/.next/static/chunks/app/(dashboard)/logs/page-f74da6f66116c7e7.js +0 -1
  275. package/web/.next/static/chunks/app/(dashboard)/mcp/page-07bdc6780b13cfca.js +0 -1
  276. package/web/.next/static/chunks/app/(dashboard)/page-889d6e89a8f679f8.js +0 -1
  277. package/web/.next/static/chunks/app/(dashboard)/scheduled/[id]/page-47e177ab46926fd7.js +0 -1
  278. package/web/.next/static/chunks/app/(dashboard)/scheduled/page-523c5d229e8520bf.js +0 -1
  279. package/web/.next/static/chunks/app/(dashboard)/settings/page-1b40e127c38affda.js +0 -1
  280. package/web/.next/static/chunks/app/(dashboard)/settings/root-context/page-6b7e1cffcad40a6a.js +0 -1
  281. package/web/.next/static/chunks/app/(dashboard)/skills/page-3ad87d1a3fbb4f05.js +0 -1
  282. package/web/.next/static/chunks/app/(dashboard)/spaces/[id]/files/page-4e2d27f80456a1ba.js +0 -1
  283. package/web/.next/static/chunks/app/(dashboard)/spaces/[id]/page-c81023eaa26c2c7a.js +0 -1
  284. package/web/.next/static/chunks/app/(dashboard)/spaces/page-9dbb35822503481b.js +0 -1
  285. package/web/.next/static/chunks/app/_global-error/page-523c5d229e8520bf.js +0 -1
  286. package/web/.next/static/chunks/app/_not-found/page-523c5d229e8520bf.js +0 -1
  287. package/web/.next/static/chunks/app/api/auth/[...all]/route-523c5d229e8520bf.js +0 -1
  288. package/web/.next/static/chunks/app/api/chat/stream/route-523c5d229e8520bf.js +0 -1
  289. package/web/.next/static/chunks/app/api/health/route-523c5d229e8520bf.js +0 -1
  290. package/web/.next/static/chunks/app/api/oauth/[provider]/callback/route-523c5d229e8520bf.js +0 -1
  291. package/web/.next/static/chunks/app/api/oauth/[provider]/start/route-523c5d229e8520bf.js +0 -1
  292. package/web/.next/static/chunks/app/auth/callback/route-523c5d229e8520bf.js +0 -1
  293. package/web/.next/static/chunks/next/dist/client/components/builtin/app-error-523c5d229e8520bf.js +0 -1
  294. package/web/.next/static/chunks/next/dist/client/components/builtin/forbidden-523c5d229e8520bf.js +0 -1
  295. package/web/.next/static/chunks/next/dist/client/components/builtin/unauthorized-523c5d229e8520bf.js +0 -1
  296. package/web/.next/static/css/099c0b54fc41e5b0.css +0 -1
  297. package/web/.next/static/x5fvzE6AeZGASlemQTLwd/_buildManifest.js +0 -1
  298. /package/web/.next/static/{x5fvzE6AeZGASlemQTLwd → uWxfL1NbU-xFtwNtkF4Wb}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6996],{5079:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(48503),s=n(80351),l=n(63428),r=n(5829);let i=(0,s.forwardRef)(function({label:e,error:t,id:n,className:i="",containerClassName:d="",children:o,...c},u){let x=(0,s.useId)(),m=n??x,h=(0,s.useRef)(null);return(0,s.useImperativeHandle)(u,()=>h.current,[]),(0,s.useEffect)(()=>{h.current&&function(e){if(CSS.supports("appearance","base-select"))for(let t of e.querySelectorAll("optgroup")){let e=t.getAttribute("label")??"",n=t.querySelector(":scope > legend");if(!n){if(e){let n=document.createElement("legend");n.textContent=e,t.prepend(n)}continue}n.textContent!==e&&(n.textContent=e),t.firstElementChild!==n&&t.prepend(n)}}(h.current)}),(0,a.jsxs)("div",{className:d,children:[e&&(0,a.jsx)(r.A,{htmlFor:m,children:e}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("select",{id:m,ref:h,"aria-invalid":!!t||void 0,className:`peer h-8.5 w-full rounded-md border bg-hover py-1.5 pr-8 pl-3 text-body-14 leading-5! text-ink transition-colors required:invalid:text-ink-4 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${t?"border-err focus:border-err":"border-rule focus:border-ink-3"} ${i}`,...c,children:o}),(0,a.jsx)(l.a,{size:16,"aria-hidden":!0,className:"pointer-events-none absolute top-4.25 right-2 -translate-y-1/2 text-ink-3 peer-disabled:opacity-50"})]}),t&&(0,a.jsx)("p",{className:"mt-1 text-xs text-err",children:t})]})})},7576:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(48503),s=n(80351);let l={ink:"accent-ink",agent:"accent-agent-vivid",skill:"accent-skill-vivid",connector:"accent-conn-vivid"};function r({label:e,tone:t="ink",id:n,className:i="",containerClassName:d="",...o}){let c=(0,s.useId)(),u=n??c,x=(0,a.jsx)("input",{id:u,type:"checkbox",className:`h-4 w-4 shrink-0 cursor-pointer rounded border-rule disabled:cursor-not-allowed disabled:opacity-50 ${l[t]} ${i}`,...o});return e?(0,a.jsxs)("label",{htmlFor:u,className:`flex cursor-pointer items-center gap-2 text-sm text-ink ${d}`,children:[x,e]}):(0,a.jsx)("div",{className:d,children:x})}},10227:(e,t,n)=>{"use strict";n.d(t,{E6:()=>s,Os:()=>l});var a=n(81528);let s={telegram:"Telegram",slack:"Slack",discord:"Discord",whatsapp:"WhatsApp",mcp:"MCP",api:"API",internal:"Agent","task-board":"Task board"};function l(e){return null===e||a.KvV.includes(e)}},16966:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var a=n(48503),s=n(80351);function l({tabs:e,value:t,defaultValue:n,onChange:r,variant:i="inset",fullWidth:d=!1,className:o=""}){let[c,u]=(0,s.useState)(t??n??e[0].value),x=t??c,m="inset"===i?"bg-paper text-ink shadow-[0_1px_2px_rgba(0,0,0,0.06)]":"bg-ink text-canvas";return(0,a.jsx)("div",{className:`${d?"flex":"inline-flex"} gap-0.5 rounded-md p-[3px] ${"inset"===i?"bg-black/[0.05]":"bg-black/[0.04]"} ${o}`,role:"tablist",children:e.map(e=>{let n=e.value===x;return(0,a.jsxs)("button",{type:"button",role:"tab","aria-selected":n,onClick:()=>{void 0===t&&u(e.value),r?.(e.value)},className:`inline-flex h-[26px] items-center justify-center gap-1.5 rounded-[6px] border-0 px-3 text-medium-12 leading-none! transition-colors ${d?"flex-1":""} ${n?m:"bg-transparent text-ink-3 hover:text-ink-2"}`,children:[e.label,void 0!==e.count&&(0,a.jsx)("span",{className:`text-mono-11 ${n?"opacity-85":"opacity-65"}`,children:e.count})]},e.value)})})}},21914:(e,t,n)=>{"use strict";n.d(t,{default:()=>y});var a=n(48503),s=n(18781),l=n(80351),r=n(22208),i=n.n(r),d=n(9618),o=n(2439);let c=(0,o.createServerReference)("40319e15cced32d88942333dc8946fe0d441cd6908",o.callServer,void 0,o.findSourceMapURL,"listRunCallsAction");var u=n(10227),x=n(4978),m=n(60128),h=n(25297),p=n(75551),b=n(45846),g=n(1678),v=n(85347),f=n(48572),j=n(23138);function k({call:e}){let t=null!==e.error&&""!==e.error,n=null===e.inputTokens&&null===e.outputTokens?null:`${(0,g._y)(e.inputTokens??0)} in / ${(0,g._y)(e.outputTokens??0)} out`;return(0,a.jsxs)("div",{className:"overflow-hidden rounded-md border border-rule-2 bg-canvas",children:[(0,a.jsxs)("div",{className:"flex h-[31px] items-center gap-2 px-3",children:[(0,a.jsx)(v.R,{size:14,className:"shrink-0 text-ink-3","aria-hidden":!0}),(0,a.jsx)("span",{className:"shrink-0 text-mono-12 text-ink",title:e.model,children:e.model}),(0,a.jsxs)("span",{className:"min-w-0 flex-1 truncate text-mono-12 text-ink-3",children:[null!==n&&n,null!==n&&null!==e.costUsd&&" \xb7 ",null!==e.costUsd&&(0,g.BD)(e.costUsd)]}),e.failover&&(0,a.jsx)(j.s,{tone:"warn",children:"failover"}),(0,a.jsx)("span",{className:`ml-auto h-1.5 w-1.5 shrink-0 rounded-full ${t?"bg-err":"bg-ok"}`,"aria-hidden":!0}),null!==e.durationMs&&(0,a.jsx)("span",{className:"shrink-0 text-mono-12 text-ink-4",children:(0,g._V)(e.durationMs)})]}),t&&(0,a.jsxs)("div",{className:"flex h-[31px] items-center gap-2 border-t border-rule-2 px-3",children:[(0,a.jsx)(f.L,{size:12,className:"shrink-0 text-ink-4","aria-hidden":!0}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-mono-12 text-err",children:e.error})]})]})}function N(e){return e<3e5?3e3:3e4}function w({run:e,columns:t,defaultExpanded:n=!1}){var r,o;let[v,f]=(0,l.useState)(n),[j,y]=(0,l.useState)([]),[S,A]=(0,l.useState)(!1),[T,$]=(0,l.useState)(null),[C,R]=(0,l.useState)(!1),[_,P]=(0,l.useState)(null),[U,F]=(0,l.useState)(!1),M=(0,l.useRef)(0),E=(0,l.useCallback)(async t=>{R(!0);let n=await c({jobId:e.id,page:t,pageSize:50});(R(!1),n.ok)?(P(null),A(n.data.hasMore),$(n.data.total),y(e=>{let a=e.slice(0,t-1);return a[t-1]=n.data.items,M.current=a.length,a})):P(n.message)},[e.id]);(0,l.useEffect)(()=>{v&&!(M.current>0)&&E(1)},[v,E]),(0,l.useEffect)(()=>{let t;if(!v||!(0,u.Os)(e.status)||U)return;let n=Date.now(),a=()=>{Date.now()-n>=18e5?F(!0):(("u"<typeof document||"hidden"!==document.visibilityState)&&E(Math.max(1,M.current)),t=setTimeout(a,N(Date.now()-n)))};return t=setTimeout(a,N(0)),()=>clearTimeout(t)},[v,e.status,U,E]);let L=j.flat(),z=T??e.callCount;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.Tr,{interactive:!0,hover:!v,className:v?"bg-hover":"",onClick:()=>f(e=>!e),"aria-expanded":v,"data-testid":`run-row-${e.id}`,children:[(0,a.jsx)(s.Td,{top:!0,className:"w-8",children:(0,a.jsx)(d.K,{size:12,className:`text-ink-4 transition-transform ${v?"rotate-90":""}`,"aria-hidden":!0})}),(0,a.jsx)(s.Td,{top:!0,"data-testid":"run-agent",children:(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(h.A,{name:e.agentName??"Unknown",imageUrl:e.agentAvatarUrl,size:"md",shape:"round"}),(0,a.jsx)("span",{className:"truncate text-medium-14 text-ink",children:e.agentName??"Unknown"})]})}),(0,a.jsxs)(s.Td,{top:!0,className:"hidden md:table-cell","data-testid":"run-origin",children:[(0,a.jsx)("span",{className:"text-body-13 text-ink-2",children:e.origin.label}),null!==e.origin.detail&&(0,a.jsx)("div",{className:"truncate text-mono-11 text-ink-4",children:e.origin.detail})]}),(0,a.jsx)(s.Td,{top:!0,className:"max-w-[320px]","data-testid":"run-task",children:(0,a.jsx)("span",{className:"line-clamp-1 text-body-14 text-ink-2",title:e.task,children:(0,x.xv)(e.task,72)})}),(0,a.jsx)(s.Td,{top:!0,"data-testid":"run-status",children:(0,a.jsx)(m.A,{variant:"completed"===(r=e.status)?"done":"failed"===r||"cancelled"===r?"warn":(0,u.Os)(r)?"run":"idle",label:null===(o=e.status)?"Pending":({pending:"Pending",processing:"Running",completed:"Done",failed:"Failed",awaiting_approval:"Awaiting",awaiting_delegation:"Awaiting",cancelled:"Cancelled"})[o]??o})}),(0,a.jsx)(s.Td,{top:!0,className:"hidden font-mono text-xs text-ink-3 lg:table-cell","data-testid":"run-duration",children:null===e.durationMs||0===e.durationMs&&(0,u.Os)(e.status)?"n/a":(0,g._V)(e.durationMs)}),(0,a.jsx)(s.Td,{top:!0,className:"hidden font-mono text-xs text-ink-3 lg:table-cell","data-testid":"run-cost",children:(0,g.BD)(e.costUsd)}),(0,a.jsxs)(s.Td,{top:!0,align:"right",className:"font-mono text-xs text-ink-3","data-testid":"run-calls",children:[z," ",1===z?"call":"calls"]})]}),v&&(0,a.jsx)(s.Tr,{hover:!1,className:"bg-canvas","data-testid":`run-calls-${e.id}`,children:(0,a.jsxs)(s.Td,{colSpan:t,className:"py-4",children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-legacy-10 uppercase tracking-wider text-ink-3",children:"Calls"}),(0,a.jsx)(i(),{href:`/jobs/${e.id}`,className:"text-medium-13 text-ink-3 transition-colors hover:text-ink",children:"Open run"})]}),null!==_&&(0,a.jsx)("div",{className:"rounded-md border border-err/25 bg-paper px-3 py-2 text-mono-12 text-err",children:_}),null===_&&0===L.length&&!C&&(0,a.jsx)("div",{className:"text-body-13 text-ink-4",children:"No call recorded for this run."}),C&&0===L.length&&(0,a.jsx)("div",{className:"text-body-13 text-ink-4",children:"Loading calls…"}),(0,a.jsx)("div",{className:"space-y-1.5",children:L.map(e=>"tool"===e.kind?(0,a.jsx)(b.default,{step:e.step},e.id):(0,a.jsx)(k,{call:e},e.id))}),U&&(0,u.Os)(e.status)&&(0,a.jsx)("div",{className:"mt-3 text-body-13 text-ink-4","data-testid":"run-follow-stopped",children:"Stopped following, reload to resume."}),S&&(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(p.A,{onClick:()=>void E(M.current+1),disabled:C,children:["Show ",50," more"]})})]})})]})}function y({runs:e,expandedRunId:t=null}){return(0,a.jsxs)(s.Ay,{children:[(0,a.jsxs)(s.D1,{children:[(0,a.jsx)(s.Th,{}),(0,a.jsx)(s.Th,{children:"Agent"}),(0,a.jsx)(s.Th,{className:"hidden md:table-cell",children:"From"}),(0,a.jsx)(s.Th,{children:"Task"}),(0,a.jsx)(s.Th,{children:"Status"}),(0,a.jsx)(s.Th,{className:"hidden lg:table-cell",children:"Duration"}),(0,a.jsx)(s.Th,{className:"hidden lg:table-cell",children:"Cost"}),(0,a.jsx)(s.Th,{align:"right",children:"Calls"})]}),(0,a.jsx)("tbody",{children:e.map(e=>(0,a.jsx)(w,{run:e,columns:8,defaultExpanded:e.id===t},e.id))})]})}},25297:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(48503),s=n(19176);let l={sm:{box:"h-6 w-6",text:"text-label-11",px:24},md:{box:"h-[30px] w-[30px]",text:"text-label-11",px:30},lg:{box:"h-[42px] w-[42px]",text:"text-title-15",px:42}};function r({name:e,imageUrl:t,size:n="md",shape:i="round",className:d=""}){let o=l[n],c=`inline-flex shrink-0 items-center justify-center overflow-hidden bg-hover font-mono font-semibold tracking-[0.04em] text-ink-2 ${o.box} ${o.text} ${"round"===i?"rounded-full":"rounded-[8px]"} ${d}`;return t?(0,a.jsx)("span",{className:c,children:(0,a.jsx)(s.default,{src:t,alt:e,width:o.px,height:o.px,className:"h-full w-full object-cover"})}):(0,a.jsx)("span",{className:c,children:function(e){let t=e.trim();if(!t)return"?";let n=t.split(/\s+/);return n.length>=2?((n[0][0]??"")+(n[1][0]??"")).toUpperCase():t.slice(0,2).toUpperCase()}(e)})}},60128:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var a=n(48503),s=n(64178),l=n(68269),r=n(90566);let i={done:"Done",warn:"Attention",run:"Running",idle:"Idle","lvl-info":"INFO","lvl-ok":"OK","lvl-warn":"WARN","lvl-err":"ERR"},d={done:"bg-ok-bg text-ok",warn:"bg-warn-bg text-warn",run:"bg-run-bg text-run",idle:"bg-black/5 text-ink-3 dark:bg-white/5","lvl-info":"bg-black/5 text-ink-3 dark:bg-white/5","lvl-ok":"bg-ok-bg text-ok","lvl-warn":"bg-warn-bg text-warn","lvl-err":"bg-warn-bg text-err"};function o({variant:e,label:t,icon:n,className:c=""}){let u=t??i[e],x=null;return void 0!==n?x=n:"done"===e?x=(0,a.jsx)(s.r,{size:11,weight:"regular"}):"warn"===e?x=(0,a.jsx)(l.N,{size:11,weight:"regular"}):"run"===e&&(x=(0,a.jsx)(r.A,{variant:"blue",size:"sm"})),(0,a.jsxs)("span",{className:`inline-flex h-[22px] items-center gap-1.5 rounded-[5px] px-2.5 text-medium-12 leading-none! ${d[e]} ${c}`,children:[x,u]})}},76298:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var a=n(48503),s=n(73573),l=n(80351),r=n(5079);function i({agents:e,toolNames:t}){let n=(0,s.useRouter)(),d=(0,s.useSearchParams)(),[o,c]=(0,l.useTransition)(),u=d.get("agent")??"",x=d.get("tool")??"";function m(e){let t=new URLSearchParams(d.toString());for(let[n,a]of Object.entries(e))a?t.set(n,a):t.delete(n);t.delete("page"),c(()=>{n.replace(`/logs?${t.toString()}`)})}return(0,a.jsxs)("div",{className:"flex flex-wrap items-end gap-3 rounded-xl border border-rule-2 bg-paper px-4 py-3",children:[(0,a.jsxs)("div",{className:"min-w-[180px] flex-1",children:[(0,a.jsx)("label",{className:"mb-1 block text-legacy-11 uppercase tracking-wider text-ink-3",children:"Agent"}),(0,a.jsxs)(r.A,{value:u,onChange:e=>m({agent:e.target.value||null}),disabled:o,className:"bg-canvas",children:[(0,a.jsx)("option",{value:"",children:"All agents"}),e.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,a.jsxs)("div",{className:"min-w-[200px] flex-1",children:[(0,a.jsx)("label",{className:"mb-1 block text-legacy-11 uppercase tracking-wider text-ink-3",children:"Tool name"}),(0,a.jsxs)(r.A,{value:x,onChange:e=>m({tool:e.target.value||null}),disabled:o,className:"bg-canvas font-mono",children:[(0,a.jsx)("option",{value:"",children:"All tools"}),t.map(e=>(0,a.jsx)("option",{value:e,children:e},e))]})]})]})}},76381:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(48503),s=n(80351),l=n(5829);let r=(0,s.forwardRef)(function({label:e,error:t,showCount:n,id:r,className:i="",containerClassName:d="",maxLength:o,value:c,bare:u=!1,...x},m){let h=(0,s.useId)(),p=r??h;return(0,a.jsxs)("div",{className:d,children:[e&&(0,a.jsx)(l.A,{htmlFor:p,children:e}),(0,a.jsx)("textarea",{id:p,ref:m,maxLength:o,value:c,"aria-invalid":!!t||void 0,className:u?`w-full text-ink placeholder:text-ink-4 transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${i}`:`w-full resize-y rounded-md border bg-hover px-2 py-1.5 text-body-14 leading-[1.5]! text-ink placeholder:text-ink-4 transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${t?"border-err focus:border-err":"border-rule focus:border-ink-3"} ${i}`,...x}),n&&void 0!==o&&"string"==typeof c&&(0,a.jsxs)("div",{className:"mt-1 text-right text-legacy-11 text-ink-4",children:[c.length," / ",o]}),t&&(0,a.jsx)("p",{className:"mt-1 text-xs text-err",children:t})]})})},90492:(e,t,n)=>{Promise.resolve().then(n.bind(n,76298)),Promise.resolve().then(n.bind(n,21914)),Promise.resolve().then(n.bind(n,96431)),Promise.resolve().then(n.bind(n,8444)),Promise.resolve().then(n.bind(n,2193)),Promise.resolve().then(n.bind(n,95878)),Promise.resolve().then(n.bind(n,68534)),Promise.resolve().then(n.bind(n,81098)),Promise.resolve().then(n.t.bind(n,22208,23))},90566:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(48503);let s={ok:"bg-ok",lime:"bg-agent-vivid",coral:"bg-skill-vivid",blue:"bg-conn-vivid",warn:"bg-warn"},l={ok:"animate-[blip_1.4s_ease-out_infinite]",lime:"animate-[blip-lime_1.5s_ease-out_infinite]",coral:"animate-[blip-coral_1.4s_ease-out_infinite]",blue:"animate-[blip-blue_1.4s_ease-out_infinite]",warn:"animate-[blip-coral_1.4s_ease-out_infinite]"};function r({variant:e="ok",size:t="sm",animate:n=!0,className:i=""}){return(0,a.jsx)("span",{className:`inline-block shrink-0 rounded-full ${"sm"===t?"h-[7px] w-[7px]":"h-2 w-2"} ${s[e]} ${n?l[e]:""} ${i}`})}},95878:(e,t,n)=>{"use strict";n.d(t,{default:()=>p});var a=n(48503),s=n(80351),l=n(73573),r=n(68926),i=n(68007),d=n(2439);let o=(0,d.createServerReference)("40e4c78ec4b9aa0e236437fdc88e55ba271ea4b5b4",d.callServer,void 0,d.findSourceMapURL,"sendTaskAction");var c=n(12871),u=n(45070),x=n(76381),m=n(5079),h=n(7576);function p({agents:e}){let[t,n]=(0,s.useState)(!1),[d,b]=(0,s.useTransition)(),[g,v]=(0,s.useState)(""),f=(0,l.useRouter)(),j=e.find(e=>e.id===g);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(c.A,{variant:"neutral",onClick:()=>n(!0),children:[(0,a.jsx)(i.F,{size:13,weight:"bold"}),"New task"]}),(0,a.jsx)(u.A,{open:t,onClose:()=>n(!1),title:"New task",dismissable:!1,children:(0,a.jsxs)("form",{onSubmit:function(e){e.preventDefault();let t=Object.fromEntries(new FormData(e.currentTarget));b(async()=>{let e=await o(t);e.ok?(r.oR.success("Task sent, job created"),n(!1),f.push(`/jobs/${e.data.jobId}`)):r.oR.error(e.message)})},className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs text-ink-3",htmlFor:"task-prompt",children:"Task description"}),(0,a.jsx)(x.A,{id:"task-prompt",name:"prompt",required:!0,rows:6,placeholder:"Summarise the last 10 emails from my inbox…",className:"min-h-[80px] rounded-lg"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs text-ink-3",htmlFor:"task-agent",children:"Assign to"}),(0,a.jsxs)(m.A,{id:"task-agent",name:"agentId",required:!0,value:g,onChange:e=>v(e.target.value),className:"rounded-lg",children:[(0,a.jsx)("option",{value:"",disabled:!0,children:"Select agent"}),e.map(e=>(0,a.jsxs)("option",{value:e.id,children:[e.name," (",e.slug,")"]},e.id))]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs text-ink-3",htmlFor:"task-priority",children:"Priority"}),(0,a.jsxs)(m.A,{id:"task-priority",name:"priority",defaultValue:"medium",className:"rounded-lg",children:[(0,a.jsx)("option",{value:"low",children:"Low"}),(0,a.jsx)("option",{value:"medium",children:"Medium"}),(0,a.jsx)("option",{value:"high",children:"High"})]})]})]}),j?.telegramBotToken&&(0,a.jsx)(h.A,{name:"sendViaTelegram",value:"true",label:"Send result via Telegram",className:"bg-hover"}),(0,a.jsxs)(u.j,{className:"-mx-6 -mb-6 mt-2 rounded-b-xl",children:[(0,a.jsx)(c.A,{variant:"neutral",type:"button",onClick:()=>n(!1),children:"Cancel"}),(0,a.jsx)(c.A,{variant:"ink",type:"submit",disabled:d,children:d?"Sending…":"New task"})]})]})})]})}},96431:(e,t,n)=>{"use strict";n.d(t,{default:()=>p});var a=n(48503),s=n(80351),l=n(68926),r=n(16966),i=n(12871),d=n(45678),o=n(23138),c=n(2439);let u=(0,c.createServerReference)("40a78ae07fa6f74dceb20cfbda58223d620f65e350",c.callServer,void 0,c.findSourceMapURL,"readServiceLogTailAction"),x=(0,c.createServerReference)("402995cca001806c8f3d9637a86996ad847d4b0677",c.callServer,void 0,c.findSourceMapURL,"clearServiceLogAction"),m=(0,c.createServerReference)("00e05dd5e094593ccd6198cd26a7df9a0d3ee2a5c5",c.callServer,void 0,c.findSourceMapURL,"listServiceLogsAction");function h(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function p({initial:e}){let[t,n]=(0,s.useState)(e),[c,b]=(0,s.useState)("runner"),[g,v]=(0,s.useState)("current"),[f,j]=(0,s.useState)(""),[k,N]=(0,s.useState)(0),[w,y]=(0,s.useState)(!1),[S,A]=(0,s.useState)(!0),[T,$]=(0,s.useState)(!1),[C,R]=(0,s.useState)(!1),_=(0,s.useRef)(null),P=(0,s.useRef)(!0),U=t.find(e=>e.service===c),F=U?.isOwner??!1,M=(U?.archiveBytes??null)!==null,E=(0,s.useCallback)(e=>{e.ok&&(j(e.data.tail),N(e.data.sizeBytes),y(e.data.truncated),A(e.data.exists))},[]);async function L(){R(!0);let e=await x({service:c});if(R(!1),!e.ok)return void l.oR.error(e.message);l.oR.success(`Cleared ${c} logs (${h(e.data.freedBytes)} freed).`),v("current");let[t,a]=await Promise.all([m(),u({service:c,generation:"current"})]);t.ok&&n(t.data),E(a)}return(0,s.useEffect)(()=>{P.current=!0;let e=!1,t=()=>u({service:c,generation:g}).then(t=>{e||E(t)});t();let n="current"===g?setInterval(()=>void t(),5e3):null;return()=>{e=!0,null!==n&&clearInterval(n)}},[c,g,E]),(0,s.useEffect)(()=>{let e=_.current;e&&P.current&&(e.scrollTop=e.scrollHeight)},[f]),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsx)(r.A,{tabs:[{value:"runner",label:"Runner"},{value:"web",label:"Web"}],value:c,onChange:e=>{b(e),v("current")},variant:"inset"}),(0,a.jsx)(r.A,{tabs:[{value:"current",label:`Current \xb7 ${h(U?.currentBytes??0)}`},...M?[{value:"archive",label:`Previous \xb7 ${h(U?.archiveBytes??0)}`}]:[]],value:g,onChange:e=>v(e),variant:"inset"}),"current"===g&&(0,a.jsx)(o.s,{tone:"agent",children:"live"}),(0,a.jsx)("div",{className:"ml-auto",children:F&&(0,a.jsx)(i.A,{variant:"danger",size:"sm",onClick:()=>$(!0),disabled:C||!S&&!M,children:C?"Clearing…":"Clear logs"})})]}),w&&(0,a.jsxs)("p",{className:"text-body-12 text-ink-4",children:["Showing the last 64 KB of ",h(k),". Use"," ",(0,a.jsxs)("code",{className:"text-mono-12",children:["nodal-agents logs ",c]})," for the full file."]}),S?(0,a.jsx)("pre",{ref:_,onScroll:function(){let e=_.current;e&&(P.current=e.scrollHeight-e.scrollTop-e.clientHeight<40)},"data-testid":"service-log-tail",className:"text-mono-12 h-[60vh] overflow-auto rounded-xl border border-rule-2 bg-canvas/60 p-4 leading-[1.5]! whitespace-pre-wrap text-ink-2",children:f||"(empty)"}):(0,a.jsxs)("div",{className:"rounded-xl border border-rule-2 bg-paper px-6 py-10 text-center text-body-13 text-ink-4",children:["No ","archive"===g?"archived ":"","log file yet for this service."]}),(0,a.jsx)(d.A,{open:T,title:`Clear ${c} logs?`,message:"This empties the current log file and deletes its archive. Useful for a fresh capture before reproducing a bug — the history is gone for good.",confirmLabel:"Clear",destructive:!0,onConfirm:()=>{$(!1),L()},onCancel:()=>$(!1)})]})}}},e=>{e.O(0,[2208,3969,8153,6937,494,5034,1054,8698,1332,4811,9706,7358],()=>e(e.s=90492)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7513],{2278:(e,t,a)=>{"use strict";a.d(t,{default:()=>W});var s=a(48503),n=a(80351),r=a(73573),l=a(47585),i=a(41694),o=a(45072),c=a(18379),d=a(23370),u=a(12871),m=a(50236),x=a(85933),p=a(68007),h=a(45070),g=a(78750),v=a(38032),f=a(56751),b=a(64633),j=a(18781),k=a(60128),y=a(75551),N=a(68926),C=a(2439);let A=(0,C.createServerReference)("40cc3ce7920f42c8ad2d5d72ae0ab29eb2859f1e0e",C.callServer,void 0,C.findSourceMapURL,"deleteMcpServerAction"),w=(0,C.createServerReference)("602f1e3edbc2a116325d7f7fb8e5cb32c67250fada",C.callServer,void 0,C.findSourceMapURL,"updateMcpServerApiKeyAction");var S=a(45678),$=a(9594),R=a(5829),_=a(90368);let P=(0,C.createServerReference)("402fa2aab06e1c35069f2157d036b46815e6ecab64",C.callServer,void 0,C.findSourceMapURL,"getMcpServerConfigAction"),T=(0,C.createServerReference)("60794920903db0715cb7af58fadf5de91eabbae33d",C.callServer,void 0,C.findSourceMapURL,"updateMcpServerConfigAction");var q=a(76381);let L={header:"Header",query:"Query param",bearer:"Bearer"};function M({name:e,value:t,onChange:a}){return(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:["header","query","bearer"].map(n=>(0,s.jsxs)("label",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs cursor-pointer border ${t===n?"bg-hover border-ink-3 text-ink":"bg-paper border-rule text-ink-3 hover:border-rule"}`,children:[(0,s.jsx)("input",{type:"radio",name:e,value:n,checked:t===n,onChange:()=>a(n),className:"sr-only"}),L[n]]},n))})}function F({mcpServerId:e,onDone:t,onCancel:a}){let[r,l]=(0,n.useState)(null),[i,o]=(0,n.useState)(null),[c,d]=(0,n.useTransition)(),[m,x]=(0,n.useState)(""),[p,g]=(0,n.useState)(""),[v,f]=(0,n.useState)("header"),[b,j]=(0,n.useState)(""),[k,C]=(0,n.useState)(""),[A,w]=(0,n.useState)(""),[S,L]=(0,n.useState)(""),[z,I]=(0,n.useState)([]);if((0,n.useEffect)(()=>{let t=!1;return(async()=>{let a=await P(e);if(t)return;if(!a.ok)return o(a.message);let s=a.data;l(s),x(s.name),g(s.url??""),f(s.authScheme??"header"),j(s.authParamName??""),w(s.command??""),L(s.args.join("\n")),I(s.envKeys.length>0?s.envKeys.map(e=>({key:e,value:""})):[{key:"",value:""}])})(),()=>{t=!0}},[e]),i)return(0,s.jsx)("div",{className:"bg-paper border border-rule-2 rounded-xl px-5 py-4",children:(0,s.jsx)("p",{className:"text-xs text-err",children:i})});if(!r)return(0,s.jsx)("div",{className:"bg-paper border border-rule-2 rounded-xl px-5 py-4",children:(0,s.jsx)("p",{className:"text-xs text-ink-4",children:"Loading configuration…"})});let D="stdio"===r.transport;function E(e,t){I(a=>a.map((a,s)=>s===e?{...a,...t}:a))}return(0,s.jsxs)("form",{onSubmit:function(e){if(e.preventDefault(),!r)return;let a=m.trim();if(!a)return void N.oR.error("Name is required");let s={name:a};if("http"===r.transport){let e=p.trim();if(!e)return void N.oR.error("Server URL is required");if(s.url=e,s.authScheme=v,"bearer"!==v){let e=b.trim();if(!e)return void N.oR.error("Auth param name is required for this scheme");s.authParamName=e}let t=k.trim();t&&(s.apiKey=t)}else{let e=A.trim();if(!e)return void N.oR.error("Command is required");s.command=e,s.args=S.split("\n").map(e=>e.trim()).filter(Boolean);let t={};for(let e of z){let a=e.key.trim();a&&(t[a]=e.value)}s.env=t}d(async()=>{let e=await T(r.id,s);e.ok?(N.oR.success("Configuration updated"),t?.()):N.oR.error(e.message)})},className:"bg-paper border border-rule-2 rounded-xl px-5 py-4 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-label-11 uppercase tracking-wider text-ink-4 font-mono",children:[(0,s.jsx)("span",{children:r.slug}),(0,s.jsx)("span",{children:"\xb7"}),(0,s.jsx)("span",{children:r.transport})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(R.A,{htmlFor:`edit-name-${r.id}`,children:"Name"}),(0,s.jsx)($.A,{id:`edit-name-${r.id}`,type:"text",required:!0,value:m,onChange:e=>x(e.target.value)})]}),!D&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(R.A,{htmlFor:`edit-url-${r.id}`,children:"Server URL"}),(0,s.jsx)($.A,{id:`edit-url-${r.id}`,type:"url",required:!0,value:p,onChange:e=>g(e.target.value),placeholder:"https://…",className:"font-mono"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"block text-xs text-ink-3",children:"Auth scheme"}),(0,s.jsx)(M,{name:`edit-scheme-${r.id}`,value:v,onChange:f}),"bearer"!==v&&(0,s.jsxs)("div",{children:[(0,s.jsx)(R.A,{htmlFor:`edit-auth-param-${r.id}`,children:"header"===v?"Header name":"Query param name"}),(0,s.jsx)($.A,{id:`edit-auth-param-${r.id}`,type:"text",required:!0,value:b,onChange:e=>j(e.target.value),placeholder:"header"===v?"x-api-key":"api_key",className:"font-mono"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(R.A,{htmlFor:`edit-key-${r.id}`,children:"API key"}),(0,s.jsx)($.A,{id:`edit-key-${r.id}`,type:"password",autoComplete:"off",value:k,onChange:e=>C(e.target.value),placeholder:r.apiKeyLast4?`•••• ${r.apiKeyLast4} - leave blank to keep`:"Paste a key",className:"font-mono"}),(0,s.jsx)("p",{className:"text-body-12 text-ink-4 mt-1",children:"Leave blank to keep the current key. The new config is verified against the live server before saving."})]})]}),D&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(R.A,{htmlFor:`edit-command-${r.id}`,children:"Command"}),(0,s.jsx)($.A,{id:`edit-command-${r.id}`,type:"text",required:!0,value:A,onChange:e=>w(e.target.value),placeholder:"npx",className:"font-mono"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(R.A,{htmlFor:`edit-args-${r.id}`,children:["Arguments ",(0,s.jsx)("span",{className:"text-ink-4",children:"(one per line)"})]}),(0,s.jsx)(q.A,{id:`edit-args-${r.id}`,rows:Math.max(3,S.split("\n").length),value:S,onChange:e=>L(e.target.value),className:"font-mono resize-none"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"block text-xs text-ink-3 mb-1",children:["Environment variables"," ",(0,s.jsx)("span",{className:"text-ink-4",children:"(encrypted, leave value blank to keep)"})]}),(0,s.jsx)("div",{className:"space-y-2",children:z.map((e,t)=>(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)($.A,{type:"text",value:e.key,onChange:e=>E(t,{key:e.target.value}),placeholder:"VAR_NAME",containerClassName:"flex-1",className:"font-mono"}),(0,s.jsx)($.A,{type:"password",autoComplete:"off",value:e.value,onChange:e=>E(t,{value:e.target.value}),placeholder:r.envKeys.includes(e.key)?"leave blank to keep":"value",containerClassName:"flex-1",className:"font-mono"}),(0,s.jsx)(y.A,{square:!0,tone:"danger",onClick:()=>{I(e=>e.filter((e,a)=>a!==t))},title:"Remove variable",icon:(0,s.jsx)(_.l,{size:14})})]},t))}),(0,s.jsx)(y.A,{onClick:function(){I(e=>[...e,{key:"",value:""}])},className:"mt-2",children:"+ Add variable"})]})]}),(0,s.jsxs)(h.j,{className:"-mx-5 -mb-4 mt-1 rounded-b-xl",children:[a&&(0,s.jsx)(u.A,{variant:"neutral",type:"button",onClick:a,children:"Cancel"}),(0,s.jsx)(u.A,{variant:"ink",type:"submit",disabled:c||!m.trim(),children:c?"Verifying…":"Save changes"})]})]})}function z({instance:e,catalogLabel:t,description:a,onClose:r}){let[l,i]=(0,n.useTransition)(),[o,c]=(0,n.useState)(!1),[d,m]=(0,n.useState)(!1),[x,p]=(0,n.useState)("");function h(){let t=x.trim();t?i(async()=>{let a=await w(e.id,t);a.ok?(N.oR.success(`${e.name} key rotated`),m(!1),p("")):N.oR.error(a.message)}):N.oR.error("New API key is required")}return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"font-mono text-label-11 uppercase tracking-wider text-ink-3",children:t}),a&&(0,s.jsx)("p",{className:"mt-0.5 text-xs text-ink-3",children:a}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-ink-4",children:[e.toolCount," tool",1===e.toolCount?"":"s"," discovered",e.apiKeyLast4?` \xb7 key …${e.apiKeyLast4}`:""]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(u.A,{variant:"neutral",size:"sm",onClick:()=>m(e=>!e),disabled:l,children:d?"Cancel rotate":"Rotate secret"}),(0,s.jsx)(u.A,{variant:"danger",size:"sm",onClick:()=>c(!0),disabled:l,children:"Disconnect"})]}),d&&(0,s.jsxs)("div",{className:"space-y-3 border-t border-rule-2 pt-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(R.A,{htmlFor:`mcp-rotate-${e.id}`,children:"New API key"}),(0,s.jsx)($.A,{id:`mcp-rotate-${e.id}`,type:"password",autoComplete:"off",autoFocus:!0,value:x,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"===e.key&&h(),"Escape"===e.key&&(p(""),m(!1))},placeholder:"Paste the new key",className:"font-mono"}),(0,s.jsx)("p",{className:"mt-1 text-body-12 text-ink-4",children:"Agent assignments stay intact - the key is verified against the server before being saved."})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(u.A,{variant:"ink",size:"sm",onClick:h,disabled:l||!x.trim(),children:l?"Verifying…":"Save new key"}),(0,s.jsx)(u.A,{variant:"neutral",size:"sm",onClick:()=>{p(""),m(!1)},children:"Cancel"})]})]}),(0,s.jsx)("div",{className:"border-t border-rule-2 pt-3",children:(0,s.jsx)(F,{mcpServerId:e.id,onDone:r,onCancel:r})}),(0,s.jsx)(S.A,{open:o,title:`Disconnect "${e.name}"?`,message:"The MCP connector and all its agent assignments will be removed. Re-connecting later requires the API key again.",confirmLabel:"Disconnect",onConfirm:function(){c(!1),i(async()=>{let t=await A(e.id);t.ok?(N.oR.success(`${e.name} disconnected`),r()):N.oR.error(t.message)})},onCancel:()=>c(!1)})]})}function I({instances:e,catalog:t}){return(0,s.jsxs)(j.Ay,{children:[(0,s.jsxs)(j.D1,{children:[(0,s.jsx)(j.Th,{children:"Server"}),(0,s.jsx)(j.Th,{children:"Tools"}),(0,s.jsx)(j.Th,{children:"Transport"}),(0,s.jsx)(j.Th,{children:"Status"}),(0,s.jsx)(j.Th,{align:"right",children:"Actions"})]}),(0,s.jsx)("tbody",{children:e.map(e=>{let a=t.find(t=>t.slug===e.slug);return(0,s.jsx)(D,{instance:e,catalogLabel:a?.label??e.name,description:a?.description??"",transport:a?.transport??"http"},e.id)})})]})}function D({instance:e,catalogLabel:t,description:a,transport:r}){let[l,i]=(0,n.useState)(!1),o=t.slice(0,2).toUpperCase(),c=(0,f.CT)(e.slug),d=(0,f.Zr)(e.slug);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(j.Tr,{children:[(0,s.jsx)(j.Td,{children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(v.A,{variant:"conn",size:"sm",shape:"square",background:c||d?"#ffffff":"#3565ff",children:c?(0,s.jsx)("img",{src:c,alt:"",className:"h-4 w-4 object-contain"}):d?(0,s.jsx)("span",{className:"text-body-15 leading-none!",children:d}):(0,s.jsx)("span",{className:"font-mono text-micro-10 tracking-[0.04em]",children:o})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"text-medium-13 leading-[1.2]! text-ink",children:e.name}),(0,s.jsx)("div",{className:"mt-0.5 text-mono-11 uppercase tracking-[0.12em] text-ink-4",children:t})]})]})}),(0,s.jsxs)(j.Td,{children:[(0,s.jsx)("span",{className:"text-mono-13 text-ink-2",children:e.toolCount}),0===e.toolCount&&(0,s.jsx)("span",{className:"ml-1 text-mono-11 text-ink-4",children:"none"})]}),(0,s.jsx)(j.Td,{children:(0,s.jsx)(b.A,{children:r})}),(0,s.jsx)(j.Td,{children:(0,s.jsx)(k.A,{variant:e.active?"done":"warn",label:e.active?"Connected":"Inactive"})}),(0,s.jsx)(j.Td,{children:(0,s.jsx)("div",{className:"flex items-center justify-end gap-2",children:(0,s.jsx)(y.A,{square:!0,icon:(0,s.jsx)(g.I,{size:16}),title:"Edit",onClick:()=>i(!0)})})})]}),(0,s.jsx)(h.A,{open:l,onClose:()=>i(!1),title:e.name,dismissable:!1,className:"max-w-xl",children:(0,s.jsx)(z,{instance:e,catalogLabel:t,description:a,onClose:()=>i(!1)})})]})}var E=a(27253),U=a(73230),H=a(82899);let K=(0,C.createServerReference)("401a28081169e48e9db29fc9de64baa4d05a0d7eb1",C.callServer,void 0,C.findSourceMapURL,"createMcpServerFromCatalogAction");function O({catalogItem:e,onDone:t,onCancel:a}){let[r,l]=(0,n.useTransition)(),[i,o]=(0,n.useState)(""),[c,d]=(0,n.useState)(""),[m,x]=(0,n.useState)(""),[p,g]=(0,n.useState)(""),[v,f]=(0,n.useState)("header"),[b,j]=(0,n.useState)(""),[k,C]=(0,n.useState)(""),[A,w]=(0,n.useState)(""),[S,P]=(0,n.useState)(()=>(e.args??[]).join("\n")),[T,L]=(0,n.useState)(()=>{let t=e.envVarNames??[];return t.length>0?t.map(e=>({key:e,value:""})):[{key:"",value:""}]}),F="custom-http-mcp"===e.slug,z="custom-stdio-mcp"===e.slug,I="stdio"===e.transport,D=I&&!z,E=!I&&null===e.serverUrl;function U(){o(""),d(""),x(""),g(""),f("header"),j(""),C(""),w(""),P((e.args??[]).join("\n"));let t=e.envVarNames??[];L(t.length>0?t.map(e=>({key:e,value:""})):[{key:"",value:""}])}function H(){L(e=>[...e,{key:"",value:""}])}function V(e){L(t=>t.filter((t,a)=>a!==e))}function B(e,t){L(a=>a.map((a,s)=>s===e?{...a,...t}:a))}let G=p.trim()?`${p.trim().replace(/-/g,"_")}__list_things`:"my_slug__list_things";return(0,s.jsxs)("form",{onSubmit:function(a){a.preventDefault();let s=i.trim();if(!s)return void N.oR.error("Name is required");if(D){let a=S.split("\n").map(e=>e.trim()).filter(Boolean),n={};for(let e of T){let t=e.key.trim();t&&(n[t]=e.value)}l(async()=>{let r=await K({slug:e.slug,name:s,customArgs:a,customEnv:Object.keys(n).length>0?n:void 0});r.ok?(N.oR.success(`${s} connected`),U(),t?.()):N.oR.error(r.message)});return}if(z){let a=p.trim(),n=k.trim();if(!a)return N.oR.error("Server slug is required");if(!/^[a-z0-9-]+$/.test(a))return N.oR.error("Slug must be lowercase letters, digits, dashes");if(!n)return N.oR.error("Command is required");let r=A.split("\n").map(e=>e.trim()).filter(Boolean),i={};for(let e of T){let t=e.key.trim();t&&(i[t]=e.value)}return void l(async()=>{let l=await K({slug:e.slug,name:s,customSlug:a,customCommand:n,customArgs:r,customEnv:i});l.ok?(N.oR.success(`${s} connected`),U(),t?.()):N.oR.error(l.message)})}let n=c.trim(),r=m.trim();if(!n)return void N.oR.error("API key is required");if(E&&!r)return void N.oR.error("Server URL is required");if(F){let e=p.trim();if(!e)return N.oR.error("Server slug is required");if(!/^[a-z0-9-]+$/.test(e))return N.oR.error("Slug must be lowercase letters, digits, dashes");if("bearer"!==v&&!b.trim())return N.oR.error("Auth param name is required for this scheme")}l(async()=>{let a={slug:e.slug,name:s,apiKey:n};E&&(a.url=r),F&&(a.customSlug=p.trim(),a.customAuthScheme=v,"bearer"!==v&&(a.customAuthParamName=b.trim()));let l=await K(a);l.ok?(N.oR.success(`${s} connected`),U(),t?.()):N.oR.error(l.message)})},className:"space-y-3",children:[e.description&&(0,s.jsx)("p",{className:"text-xs text-ink-4",children:e.description}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(R.A,{htmlFor:`mcp-name-${e.slug}`,children:["Name ",(0,s.jsx)("span",{className:"text-ink-4",children:'(e.g. "Cortex perso")'})]}),(0,s.jsx)($.A,{id:`mcp-name-${e.slug}`,type:"text",required:!0,value:i,onChange:e=>o(e.target.value),placeholder:e.label})]}),(F||z)&&(0,s.jsxs)("div",{children:[(0,s.jsxs)(R.A,{htmlFor:`mcp-slug-${e.slug}`,children:["Server slug ",(0,s.jsx)("span",{className:"text-ink-4",children:"(tool name prefix)"})]}),(0,s.jsx)($.A,{id:`mcp-slug-${e.slug}`,type:"text",required:!0,value:p,onChange:e=>g(e.target.value),placeholder:"my-server",pattern:"[a-z0-9-]+",className:"font-mono"}),(0,s.jsxs)("p",{className:"text-body-12 text-ink-4 mt-1",children:["Tools will be named like ",(0,s.jsx)("span",{className:"font-mono text-ink-3",children:G}),". Lowercase letters, digits, dashes."]})]}),E&&(0,s.jsxs)("div",{children:[(0,s.jsx)(R.A,{htmlFor:`mcp-url-${e.slug}`,children:"Server URL"}),(0,s.jsx)($.A,{id:`mcp-url-${e.slug}`,type:"url",required:!0,value:m,onChange:e=>x(e.target.value),placeholder:"https://…",className:"font-mono"})]}),F&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"block text-xs text-ink-3",children:"Auth scheme"}),(0,s.jsx)(M,{name:`mcp-scheme-${e.slug}`,value:v,onChange:f}),"bearer"!==v&&(0,s.jsxs)("div",{children:[(0,s.jsx)(R.A,{htmlFor:`mcp-auth-param-${e.slug}`,children:"header"===v?"Header name":"Query param name"}),(0,s.jsx)($.A,{id:`mcp-auth-param-${e.slug}`,type:"text",required:!0,value:b,onChange:e=>j(e.target.value),placeholder:"header"===v?"x-api-key":"api_key",className:"font-mono"})]})]}),!I&&(0,s.jsxs)("div",{children:[(0,s.jsx)(R.A,{htmlFor:`mcp-key-${e.slug}`,children:"API key"}),(0,s.jsx)($.A,{id:`mcp-key-${e.slug}`,type:"password",required:!0,autoComplete:"off",value:c,onChange:e=>d(e.target.value),placeholder:e.keyPrefix[0]?`${e.keyPrefix[0]}…`:"",className:"font-mono"}),e.docsHint&&(0,s.jsx)("p",{className:"text-body-12 text-ink-4 mt-1",children:e.docsHint})]}),D&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(R.A,{htmlFor:`mcp-prefilled-args-${e.slug}`,children:["Arguments"," ",(0,s.jsx)("span",{className:"text-ink-4",children:"(one per line, edit placeholders like <root-directory>)"})]}),(0,s.jsx)(q.A,{id:`mcp-prefilled-args-${e.slug}`,rows:Math.max(3,(e.args??[]).length+1),value:S,onChange:e=>P(e.target.value),className:"font-mono resize-none"}),(0,s.jsxs)("p",{className:"text-body-12 text-ink-4 mt-1",children:["Command: ",(0,s.jsx)("span",{className:"font-mono text-ink-3",children:e.command??"npx"})]})]}),(e.envVarNames??[]).length>0&&(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"block text-xs text-ink-3 mb-1",children:["Environment variables ",(0,s.jsx)("span",{className:"text-ink-4",children:"(encrypted at rest)"})]}),(0,s.jsx)("div",{className:"space-y-2",children:T.map((e,t)=>(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)($.A,{type:"text",value:e.key,onChange:e=>B(t,{key:e.target.value}),placeholder:"VAR_NAME",containerClassName:"flex-1",className:"font-mono"}),(0,s.jsx)($.A,{type:"password",autoComplete:"off",value:e.value,onChange:e=>B(t,{value:e.target.value}),placeholder:"value",containerClassName:"flex-1",className:"font-mono"}),(0,s.jsx)(y.A,{square:!0,tone:"danger",onClick:()=>V(t),disabled:1===T.length,title:"Remove variable",icon:(0,s.jsx)(_.l,{size:14})})]},t))}),(0,s.jsx)(y.A,{onClick:H,className:"mt-2",children:"+ Add variable"})]}),e.docsHint&&(0,s.jsx)("p",{className:"text-body-12 text-ink-4",children:e.docsHint})]}),z&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(R.A,{htmlFor:`mcp-command-${e.slug}`,children:"Command"}),(0,s.jsx)($.A,{id:`mcp-command-${e.slug}`,type:"text",required:!0,value:k,onChange:e=>C(e.target.value),placeholder:"npx",className:"font-mono"}),(0,s.jsx)("p",{className:"text-body-12 text-ink-4 mt-1",children:"Executable name (resolved via PATH) or absolute path."})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(R.A,{htmlFor:`mcp-args-${e.slug}`,children:["Arguments ",(0,s.jsx)("span",{className:"text-ink-4",children:"(one per line)"})]}),(0,s.jsx)(q.A,{id:`mcp-args-${e.slug}`,rows:3,value:A,onChange:e=>w(e.target.value),placeholder:"-y\n@modelcontextprotocol/server-filesystem\n/path/to/folder",className:"font-mono resize-none"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"block text-xs text-ink-3 mb-1",children:["Environment variables ",(0,s.jsx)("span",{className:"text-ink-4",children:"(encrypted at rest)"})]}),(0,s.jsx)("div",{className:"space-y-2",children:T.map((e,t)=>(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)($.A,{type:"text",value:e.key,onChange:e=>B(t,{key:e.target.value}),placeholder:"GITHUB_TOKEN",containerClassName:"flex-1",className:"font-mono"}),(0,s.jsx)($.A,{type:"password",autoComplete:"off",value:e.value,onChange:e=>B(t,{value:e.target.value}),placeholder:"value",containerClassName:"flex-1",className:"font-mono"}),(0,s.jsx)(y.A,{square:!0,tone:"danger",onClick:()=>V(t),disabled:1===T.length,title:"Remove variable",icon:(0,s.jsx)(_.l,{size:14})})]},t))}),(0,s.jsx)(y.A,{onClick:H,className:"mt-2",children:"+ Add variable"}),e.docsHint&&(0,s.jsx)("p",{className:"text-body-12 text-ink-4 mt-2",children:e.docsHint})]})]}),(0,s.jsxs)(h.j,{className:"-mx-6 -mb-6 mt-2 rounded-b-xl",children:[a&&(0,s.jsx)(u.A,{variant:"neutral",type:"button",onClick:a,children:"Cancel"}),(0,s.jsx)(u.A,{variant:"ink",type:"submit",disabled:r||!i.trim(),children:r?"Connecting…":"Connect"})]})]})}function V(e){return"cogni-cortex"===e?"Comms":"stripe"===e||"mcp-postgres"===e||"supabase"===e||"airtable"===e||"mcp-fetch"===e||"mcp-playwright"===e||"apify"===e?"Data":"mcp-filesystem"===e||"mcp-git"===e||"mcp-github"===e||"sentry"===e?"DevTools":"composio"===e||"linear"===e||"n8n"===e||"notion"===e?"Productivity":"comfyui"===e||"blender"===e||"unity"===e||"unreal-engine"===e||"keyshot"===e||"photoshop"===e||"vidiq"===e?"Creative":"Other"}function B({catalog:e,instances:t}){let a=[...e].sort((e,t)=>{let a=e.slug.startsWith("custom-");return a!==t.slug.startsWith("custom-")?a?1:-1:e.label.localeCompare(t.label)});return 0===e.length?(0,s.jsx)(x.A,{title:"No servers in this category."}):(0,s.jsx)("div",{className:"grid auto-rows-fr grid-cols-1 gap-3.5 md:grid-cols-2 lg:grid-cols-4",children:a.map(e=>{let a=t.filter(t=>t.slug===e.slug),n=a.length>0;return(0,s.jsx)(G,{catalogItem:e,isInstalled:n,installedCount:a.length},e.slug)})})}function G({catalogItem:e,isInstalled:t,installedCount:a}){let[l,i]=(0,n.useState)(!1),o=(0,r.useRouter)(),c=e.label.slice(0,2).toUpperCase(),d=(0,f.CT)(e.slug),u=(0,f.Zr)(e.slug),m=V(e.slug),x="pending"===e.status;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(U.A,{glyph:d?(0,s.jsx)("img",{src:d,alt:"",className:"h-6 w-6 object-contain"}):u?(0,s.jsx)("span",{className:"text-legacy-20 leading-none!",children:u}):(0,s.jsx)("span",{className:"font-mono text-label-11 tracking-[0.04em]",children:c}),glyphVariant:"conn",glyphBackground:d||u?"#ffffff":"#3565ff",name:e.label,description:e.description,category:m,topRight:t||x?(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[x&&(0,s.jsx)("span",{className:"inline-flex items-center rounded-[6px] bg-warn-bg px-2 py-1 font-sans text-medium-12 text-warn",title:"Not yet verified end-to-end, connection params may need adjusting.",children:"Test pending"}),t&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-[6px] bg-ok-bg px-2 py-1 font-sans text-medium-12 text-ok",children:[(0,s.jsx)(E.r,{size:11,weight:"regular"}),a," installed"]})]}):void 0,foot:(0,s.jsx)(H.A,{ctaLabel:t?"Add account":"Install",ctaVariant:"blue",onCta:()=>i(!0)})}),(0,s.jsx)(h.A,{open:l,onClose:()=>i(!1),title:t?`Add account - ${e.label}`:`Install ${e.label}`,dismissable:!1,children:(0,s.jsx)(O,{catalogItem:e,onDone:function(){i(!1),o.refresh()},onCancel:()=>i(!1)})})]})}var Q=a(65548);function W({instances:e,catalog:t}){let a=(0,r.useRouter)(),[x,g]=(0,n.useState)(e.length>0?"installed":"marketplace"),[v,f]=(0,n.useState)(""),[b,j]=(0,n.useState)("All"),[k,y]=(0,n.useState)(!1),[N,C]=(0,n.useState)("stdio"),A=t.find(e=>"custom-http-mcp"===e.slug),w=t.find(e=>"custom-stdio-mcp"===e.slug),S="http"===N?A:w,$=(0,n.useMemo)(()=>{let t=e;if("All"!==b&&(t=t.filter(e=>V(e.slug)===b)),v.trim()){let e=v.toLowerCase();t=t.filter(t=>t.name.toLowerCase().includes(e)||t.slug.toLowerCase().includes(e))}return t},[e,v,b]),R=(0,n.useMemo)(()=>{let e=t;if("All"!==b&&(e=e.filter(e=>V(e.slug)===b)),v.trim()){let t=v.toLowerCase();e=e.filter(e=>e.label.toLowerCase().includes(t)||e.description.toLowerCase().includes(t))}return e},[t,b,v]);return(0,s.jsxs)(l.A,{title:"MCP Connectors",subtitle:"MCP servers your agents can call.",toolbar:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.A,{tabs:(0,s.jsx)(o.A,{value:x,onChange:e=>{g(e),f("")},tabs:[{value:"installed",label:"Installed",count:e.length},{value:"marketplace",label:"Library",count:t.length}]}),search:(0,s.jsx)(d.A,{value:v,onChange:f,placeholder:"installed"===x?"Search MCP servers…":"Search catalog…"}),cta:(0,s.jsxs)(u.A,{variant:"blue",onClick:()=>y(!0),children:[(0,s.jsx)(p.F,{size:13,weight:"bold"}),"New MCP"]})}),(0,s.jsx)(c.A,{className:"mt-3",items:Q.j,value:b,onChange:j})]}),children:["installed"===x?0===e.length?(0,s.jsx)(Y,{onBrowse:()=>g("marketplace")}):0===$.length?(0,s.jsx)(Z,{}):(0,s.jsx)(I,{instances:$,catalog:t}):(0,s.jsx)(B,{catalog:R,instances:e}),(0,s.jsx)(h.A,{open:k,onClose:()=>y(!1),title:"Add a custom MCP server",dismissable:!1,children:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)(m.A,{value:N,onChange:C,ariaLabel:"Custom MCP server type",options:[{value:"stdio",label:"Local subprocess (stdio)"},{value:"http",label:"Remote server (HTTP)"}]}),(0,s.jsx)("p",{className:"text-body-12 text-ink-4",children:"stdio"===N?"Run any MCP package locally (npx, python, a binary…). Provide the command, args, and env vars.":"Connect any Streamable-HTTP MCP server. Provide the URL, auth scheme, and API key."}),S?(0,s.jsx)(O,{catalogItem:S,onDone:()=>{y(!1),a.refresh()},onCancel:()=>y(!1)},N):(0,s.jsx)("p",{className:"text-xs text-err",children:"Custom MCP option is unavailable."})]})})]})}function Y({onBrowse:e}){return(0,s.jsx)(x.A,{title:"No MCP servers installed yet.",description:"Pick one from the Marketplace, its tools become available to any agent you assign it to.",action:(0,s.jsx)(u.A,{variant:"blue",onClick:e,children:"Browse Marketplace"})})}function Z(){return(0,s.jsx)(x.A,{title:"No servers match your search."})}},18379:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(48503);function n({items:e,value:t,onChange:a,className:r=""}){return(0,s.jsx)("div",{className:`flex flex-wrap items-center gap-2 ${r}`,children:e.map(e=>{let n=e.value===t;return(0,s.jsxs)("button",{type:"button",onClick:()=>a(e.value),className:`inline-flex h-8 items-center gap-1.5 rounded-[9px] border px-3.5 text-medium-13 leading-none! transition-colors ${n?"border-ink bg-ink text-canvas":"border-rule-2 bg-paper text-ink-2 hover:bg-hover"}`,children:[e.label,void 0!==e.count&&(0,s.jsx)("span",{className:`text-mono-12 leading-none! ${n?"opacity-65":"opacity-55"}`,children:e.count})]},e.value)})})}},18781:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>n,D1:()=>r,Td:()=>o,Th:()=>l,Tr:()=>i,mi:()=>c});var s=a(48503);function n({children:e,frame:t=!0,className:a=""}){let r=(0,s.jsx)("table",{className:`w-full border-collapse text-sm ${a}`,children:e});return t?(0,s.jsx)("div",{className:"overflow-hidden rounded-2xl border border-rule-2 bg-paper",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:r})}):r}function r({children:e}){return(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:e})})}function l({children:e,align:t="left",className:a=""}){return(0,s.jsx)("th",{scope:"col",className:`border-b border-rule-2 px-5 py-3 text-label-11 uppercase tracking-wider whitespace-nowrap text-ink-4 ${"right"===t?"text-right":"text-left"} ${a}`,children:e})}function i({children:e,interactive:t=!1,hover:a=!0,className:n="",onClick:r,title:l,style:o,"aria-expanded":c,"data-testid":d}){return(0,s.jsx)("tr",{onClick:r,title:l,style:o,"aria-expanded":c,"data-testid":d,className:`border-b border-rule-2 transition-colors last:border-0 ${a?"hover:bg-hover":""} ${t?"cursor-pointer":""} ${n}`,children:e})}function o({children:e,align:t="left",top:a=!1,colSpan:n,className:r="",onClick:l,style:i,"data-testid":c}){return(0,s.jsx)("td",{colSpan:n,onClick:l,style:i,"data-testid":c,className:`px-5 py-3.5 ${a?"align-top":"align-middle"} ${"right"===t?"text-right":""} ${r}`,children:e})}function c({label:e,count:t,dot:a,colSpan:n}){return(0,s.jsx)("tr",{className:"border-b border-rule-2 bg-canvas/40",children:(0,s.jsx)("td",{colSpan:n,className:"px-5 py-2.5",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:`h-1.5 w-1.5 rounded-full ${a}`,"aria-hidden":!0}),(0,s.jsx)("span",{className:"text-medium-13 text-ink",children:e}),(0,s.jsx)("span",{className:"text-mono-11 text-ink-4",children:t})]})})})}},23370:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var s=a(48503),n=a(78936);function r({value:e,onChange:t,placeholder:a="Search…",minWidth:l=300,ariaLabel:i,testId:o,className:c=""}){return(0,s.jsxs)("div",{className:`flex h-[34px] items-center gap-2 rounded-[9px] border border-rule-2 bg-paper px-3 text-body-13 text-ink-4 ${c}`,style:{minWidth:l},children:[(0,s.jsx)(n.e,{size:13,className:"shrink-0"}),(0,s.jsx)("input",{type:"search",value:e,onChange:e=>t(e.target.value),placeholder:a,"aria-label":i,"data-testid":o,className:"flex-1 border-0 bg-transparent text-body-14 leading-none! text-ink outline-none placeholder:text-ink-4"})]})}},38032:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var s=a(48503);let n={agent:"bg-agent-vivid text-[#0a0a0a]",skill:"bg-skill-vivid text-white",conn:"bg-conn-vivid text-white",ink:"bg-ink text-canvas",neutral:"bg-hover text-ink-3"},r={sm:"h-[30px] w-[30px]",md:"h-[34px] w-[34px]",lg:"h-[38px] w-[38px]",xl:"h-[42px] w-[42px]"},l={sm:"[&_svg]:h-[13px] [&_svg]:w-[13px]",md:"[&_svg]:h-[14px] [&_svg]:w-[14px]",lg:"[&_svg]:h-[16px] [&_svg]:w-[16px]",xl:"[&_svg]:h-[18px] [&_svg]:w-[18px]"};function i({variant:e,size:t="md",shape:a="round",background:o,children:c,className:d=""}){let u=o?"":n[e];return(0,s.jsx)("span",{style:o?{background:o}:void 0,className:`inline-flex shrink-0 items-center justify-center ${r[t]} ${l[t]} ${"round"===a?"rounded-full":"rounded-[9px]"} ${u} ${o?"text-white":""} ${d}`,children:c})}},45072:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var s=a(48503),n=a(80351);function r({tabs:e,value:t,defaultValue:a,onChange:l}){let[i,o]=(0,n.useState)(t??a??e[0].value),c=t??i;return(0,s.jsx)("div",{className:"inline-flex gap-1 rounded-[11px] border border-rule-2 bg-paper p-1",role:"tablist",children:e.map(e=>{let a=e.value===c;return(0,s.jsxs)("button",{type:"button",role:"tab","aria-selected":a,onClick:()=>{void 0===t&&o(e.value),l?.(e.value)},className:`inline-flex h-[30px] items-center gap-2 rounded-lg border-0 px-3.5 text-medium-13 leading-none! transition-colors ${a?"bg-ink text-canvas":"bg-transparent text-ink-3 hover:text-ink-2"}`,children:[e.label,void 0!==e.count&&(0,s.jsxs)("span",{className:`text-mono-12 leading-none! ${a?"opacity-65":"opacity-60"}`,children:["\xb7 ",e.count]})]},e.value)})})}},50236:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(48503);function n({options:e,value:t,onChange:a,disabled:r,ariaLabel:l,className:i=""}){return(0,s.jsx)("div",{className:`flex w-fit shrink-0 overflow-hidden rounded-lg border border-rule-2 ${i}`,role:"group","aria-label":l,children:e.map((e,n)=>{let l=e.value===t;return(0,s.jsx)("button",{type:"button",disabled:r,onClick:()=>a(e.value),"data-testid":e.testId,"aria-pressed":l,className:["relative h-[32px] px-3 text-medium-13 transition-colors",n>0?"border-l border-rule-2":"",l?e.activeClassName??"bg-ink text-canvas border-ink":"bg-canvas text-ink-3 hover:bg-hover hover:text-ink-2",r?"cursor-wait opacity-60":""].join(" "),children:e.label},e.value)})})}},56751:(e,t,a)=>{"use strict";a.d(t,{CT:()=>i,Zr:()=>o,ah:()=>s,d3:()=>r});let s={gmail:"#ea4335","google-drive":"#4285f4","google-sheets":"#0f9d58","google-docs":"#4285f4","google-calendar":"#4285f4",notion:"#000000","notion-oauth":"#000000",airtable:"#f82b60","airtable-oauth":"#f82b60",github:"#24292f",linear:"#5e6ad2",hubspot:"#ff7a59",slack:"#4a154b",intercom:"#1f8ced",stripe:"#635bff",postgres:"#336791",apify:"#00aeff",firecrawl:"#f97316",tavily:"#6366f1",composio:"#000000",poyo:"#7c3aed","outlook-mail":"#0f6cbd"},n={gmail:"Gm","google-drive":"GD","google-sheets":"GS","google-docs":"GD","google-calendar":"GC",notion:"No","notion-oauth":"No",airtable:"At","airtable-oauth":"At",github:"Gh",linear:"Li",hubspot:"HS",slack:"Sl",intercom:"IC",stripe:"St",postgres:"PG",apify:"Ap",firecrawl:"FC",tavily:"Tv",composio:"Co","custom-http-mcp":"+","custom-stdio-mcp":"+","cogni-cortex":"CX",keyshot:"KS",photoshop:"Ps",poyo:"Po","outlook-mail":"Ol"};function r(e,t){return n[e]??t.slice(0,2).toUpperCase()}let l={notion:"/connector-icons/notion.svg","notion-oauth":"/connector-icons/notion.svg","google-drive":"/connector-icons/google-drive.svg",gmail:"/connector-icons/gmail.svg","google-sheets":"/connector-icons/google-sheets.svg","google-docs":"/connector-icons/google-docs.svg","google-calendar":"/connector-icons/google-calendar.svg",airtable:"/connector-icons/airtable.svg","airtable-oauth":"/connector-icons/airtable.svg","outlook-mail":"/connector-icons/outlook-mail.svg",stripe:"/connector-icons/stripe.svg",sentry:"/connector-icons/sentry.svg","mcp-github":"/connector-icons/github.svg","mcp-postgres":"/connector-icons/postgresql.svg","mcp-git":"/connector-icons/git.svg",blender:"/connector-icons/blender.svg",unity:"/connector-icons/unity.svg","unreal-engine":"/connector-icons/unreal-engine.svg",photoshop:"/connector-icons/photoshop.svg","mcp-playwright":"/connector-icons/playwright.svg",supabase:"/connector-icons/supabase.svg",perplexity:"/connector-icons/perplexity.svg",linear:"/connector-icons/linear.svg",n8n:"/connector-icons/n8n.svg",firecrawl:"/connector-icons/firecrawl.svg",apify:"/connector-icons/apify.svg",tavily:"/connector-icons/tavily.svg",cloudflare:"/connector-icons/cloudflare.svg","mcp-fetch":"/connector-icons/fetch.svg",keyshot:"/connector-icons/keyshot.svg",composio:"/connector-icons/composio.png"};function i(e){return l[e]??null}function o(e){return"mcp-filesystem"===e?"\uD83D\uDCC1":null}},60128:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var s=a(48503),n=a(64178),r=a(68269),l=a(90566);let i={done:"Done",warn:"Attention",run:"Running",idle:"Idle","lvl-info":"INFO","lvl-ok":"OK","lvl-warn":"WARN","lvl-err":"ERR"},o={done:"bg-ok-bg text-ok",warn:"bg-warn-bg text-warn",run:"bg-run-bg text-run",idle:"bg-black/5 text-ink-3 dark:bg-white/5","lvl-info":"bg-black/5 text-ink-3 dark:bg-white/5","lvl-ok":"bg-ok-bg text-ok","lvl-warn":"bg-warn-bg text-warn","lvl-err":"bg-warn-bg text-err"};function c({variant:e,label:t,icon:a,className:d=""}){let u=t??i[e],m=null;return void 0!==a?m=a:"done"===e?m=(0,s.jsx)(n.r,{size:11,weight:"regular"}):"warn"===e?m=(0,s.jsx)(r.N,{size:11,weight:"regular"}):"run"===e&&(m=(0,s.jsx)(l.A,{variant:"blue",size:"sm"})),(0,s.jsxs)("span",{className:`inline-flex h-[22px] items-center gap-1.5 rounded-[5px] px-2.5 text-medium-12 leading-none! ${o[e]} ${d}`,children:[m,u]})}},64633:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var s=a(48503);function n({children:e,className:t=""}){return(0,s.jsx)("code",{className:`inline-flex items-center rounded-[5px] bg-hover px-1.5 py-1 text-mono-12 leading-none! tracking-[0.02em] text-ink-2 ${t}`,children:e})}},65548:(e,t,a)=>{"use strict";a.d(t,{e:()=>r,j:()=>n});var s=a(74540);let n=[{value:"All",label:"All"},{value:"CRM",label:"CRM"},{value:"Productivity",label:"Productivity"},{value:"Data",label:"Data"},{value:"DevTools",label:"DevTools"},{value:"Comms",label:"Comms"},{value:"Creative",label:"Creative"},{value:"Other",label:"Other"}];function r(e){let t=s.Y.find(t=>t.slug===e);if(!t)throw Error(`catalogCategory: no catalog entry for slug "${e}".`);return t.category}},73230:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var s=a(48503),n=a(38032);function r({glyph:e,glyphVariant:t="skill",glyphBackground:a,name:l,description:i,category:o,topRight:c,foot:d,className:u=""}){return(0,s.jsxs)("div",{"data-testid":`marketplace-card-${String(l).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,"data-marketplace-card":"",className:`relative flex h-full min-h-[200px] flex-col gap-1.5 rounded-2xl border border-rule-2 bg-paper p-[18px] ${u}`,children:[c&&(0,s.jsx)("div",{className:"absolute top-3.5 right-3.5 flex items-center gap-1.5",children:c}),e&&(0,s.jsx)("div",{className:"mb-1.5",children:(0,s.jsx)(n.A,{variant:t,background:a,size:"lg",shape:"square",children:e})}),(0,s.jsx)("h3",{className:"text-title-16 leading-[1.2]! tracking-[-0.005em] text-ink",children:l}),i&&(0,s.jsx)("div",{className:"line-clamp-3 text-body-14 leading-[1.4]! text-ink-3",title:"string"==typeof i?i:void 0,children:i}),o&&(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)("span",{className:"inline-flex items-center rounded-full bg-hover px-2.5 py-1 font-mono text-legacy-10 font-medium tracking-[0.1em] text-ink-2 uppercase",children:o})}),d&&(0,s.jsx)("div",{className:"-mx-[18px] mt-auto flex items-center gap-2 border-t border-rule-2 px-[18px] pt-3.5",children:d})]})}},74540:(e,t,a)=>{"use strict";a.d(t,{Y:()=>s.YTi});var s=a(81528)},76381:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(48503),n=a(80351),r=a(5829);let l=(0,n.forwardRef)(function({label:e,error:t,showCount:a,id:l,className:i="",containerClassName:o="",maxLength:c,value:d,bare:u=!1,...m},x){let p=(0,n.useId)(),h=l??p;return(0,s.jsxs)("div",{className:o,children:[e&&(0,s.jsx)(r.A,{htmlFor:h,children:e}),(0,s.jsx)("textarea",{id:h,ref:x,maxLength:c,value:d,"aria-invalid":!!t||void 0,className:u?`w-full text-ink placeholder:text-ink-4 transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${i}`:`w-full resize-y rounded-md border bg-hover px-2 py-1.5 text-body-14 leading-[1.5]! text-ink placeholder:text-ink-4 transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${t?"border-err focus:border-err":"border-rule focus:border-ink-3"} ${i}`,...m}),a&&void 0!==c&&"string"==typeof d&&(0,s.jsxs)("div",{className:"mt-1 text-right text-legacy-11 text-ink-4",children:[d.length," / ",c]}),t&&(0,s.jsx)("p",{className:"mt-1 text-xs text-err",children:t})]})})},78061:(e,t,a)=>{Promise.resolve().then(a.bind(a,2278)),Promise.resolve().then(a.bind(a,2193)),Promise.resolve().then(a.bind(a,68534)),Promise.resolve().then(a.bind(a,81098))},82899:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(48503),n=a(68007),r=a(12871);function l({status:e,ctaLabel:t,ctaVariant:a="blue",onCta:i,ctaHref:o,secondary:c,icon:d}){let u=d??(0,s.jsx)(n.F,{size:12,weight:"bold"});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-body-13 whitespace-nowrap text-ink-3",children:e}),c,o?(0,s.jsxs)(r.A,{variant:a,size:"sm",href:o,className:"shrink-0",children:[u,t]}):(0,s.jsxs)(r.A,{variant:a,size:"sm",onClick:i,className:"shrink-0",children:[u,t]})]})}},90566:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(48503);let n={ok:"bg-ok",lime:"bg-agent-vivid",coral:"bg-skill-vivid",blue:"bg-conn-vivid",warn:"bg-warn"},r={ok:"animate-[blip_1.4s_ease-out_infinite]",lime:"animate-[blip-lime_1.5s_ease-out_infinite]",coral:"animate-[blip-coral_1.4s_ease-out_infinite]",blue:"animate-[blip-blue_1.4s_ease-out_infinite]",warn:"animate-[blip-coral_1.4s_ease-out_infinite]"};function l({variant:e="ok",size:t="sm",animate:a=!0,className:i=""}){return(0,s.jsx)("span",{className:`inline-block shrink-0 rounded-full ${"sm"===t?"h-[7px] w-[7px]":"h-2 w-2"} ${n[e]} ${a?r[e]:""} ${i}`})}}},e=>{e.O(0,[2208,3969,8153,6942,5034,1054,341,4811,9706,7358],()=>e(e.s=78061)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1966],{1678:(e,t,r)=>{"use strict";function n(e){if(e<1e3)return`${e} ms`;if(e<6e4)return`${(e/1e3).toFixed(1).replace(/\.0$/,"")} s`;let t=Math.floor(e/6e4),r=Math.round(e%6e4/1e3);return`${t} min${r>0?` ${r.toString().padStart(2,"0")}`:""}`}function l(e){return e.toLocaleString("en-US")}function a(e){return null===e?"n/a":e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function s(e){return"cron"===e.channel?e.scheduleName?`via automation “${e.scheduleName}”`:"via automation":"dashboard"===e.channel?"from the dashboard":"api"===e.channel?"from the API":"mcp"===e.channel?"from the MCP server":"internal"===e.channel?"from another agent":"task-board"===e.channel?"from the task board":`via ${e.channel.charAt(0).toUpperCase()}${e.channel.slice(1)}`}function i(e){let t=/^mcp_[^_]+(?:_[^_]+)*__(.+)$/.exec(e);return t?.[1]?t[1]:e.startsWith("cli:")?e.slice(4):e}r.d(t,{BD:()=>a,Ow:()=>i,_V:()=>n,_y:()=>l,fG:()=>s})},45413:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>h,wh:()=>u});var n=r(48503),l=r(67704),a=r(66131),s=r(17572),i=r(33115),c=r(18781),o=r(95995);let d=(0,l.l)().use(a.A).use(s.A);function u(e){let t=d.parse(e),r="children"in t?t.children[0]:void 0;return((0,i.d)(r??t).split("\n").find(e=>""!==e.trim())??"").replace(/\s+/g," ").trim()}function h({text:e,tone:t="agent",className:r=""}){var l;let a=d.parse(e),s="children"in a?a.children:[];return(0,n.jsx)("div",{className:`break-words ${r}`,children:s.map((l=t,function(e,t){return(0,n.jsx)(p,{node:e,tone:l},t)}))})}function m(e,t){return(e.children??[]).map((e,r)=>(0,n.jsx)(p,{node:e,tone:t},r))}function x(e){return"agent"===e?"max-w-[68ch] text-body-13 text-feed-prose":"max-w-[68ch] text-body-15 text-ink"}function f(e){let t=e.replace(/[\u0000-\u0020\u007f]/g,"");if(""===t||t.startsWith("//"))return null;let r=/^([a-z][a-z0-9+.-]*):/i.exec(t);if(null===r)return t;let n=r[1]?.toLowerCase();return"http"===n||"https"===n||"mailto"===n?t:null}function p({node:e,tone:t}){switch(e.type){case"paragraph":return(0,n.jsx)("p",{className:`mb-3 last:mb-0 ${x(t)}`,children:m(e,t)});case"heading":return e.depth<=2?(0,n.jsx)("h2",{className:"mt-4 mb-2 text-title-15 text-ink first:mt-0",children:m(e,t)}):(0,n.jsx)("h3",{className:"mt-3 mb-1.5 text-title-13 text-ink first:mt-0",children:m(e,t)});case"strong":return(0,n.jsx)("strong",{className:"font-semibold text-ink",children:m(e,t)});case"emphasis":return(0,n.jsx)("em",{className:"italic",children:m(e,t)});case"delete":return(0,n.jsx)("del",{className:"text-ink-4 line-through",children:m(e,t)});case"inlineCode":return(0,n.jsx)("code",{className:"rounded-[5px] bg-hover px-1 py-0.5 text-mono-12 text-ink-2",children:e.value});case"code":return(0,n.jsx)(o.A,{code:e.value,lang:e.lang??null,...null!==e.meta&&void 0!==e.meta&&""!==e.meta?{filename:e.meta}:{}});case"break":return(0,n.jsx)("br",{});case"thematicBreak":return(0,n.jsx)("hr",{className:"my-4 border-rule-2"});case"blockquote":return(0,n.jsx)("blockquote",{className:"mb-3 border-l-2 border-rule pl-3 text-ink-3",children:m(e,t)});case"list":return!0===e.ordered?(0,n.jsx)("ol",{className:`mb-3 list-decimal space-y-1 pl-5 ${x(t)}`,children:m(e,t)}):(0,n.jsx)("ul",{className:`mb-3 list-disc space-y-1 pl-5 ${x(t)}`,children:m(e,t)});case"listItem":return(0,n.jsxs)("li",{className:null===e.checked||void 0===e.checked?"":"list-none",children:[!0===e.checked&&(0,n.jsx)("span",{className:"mr-1 text-mono-12 text-ok",children:"✓"}),!1===e.checked&&(0,n.jsx)("span",{className:"mr-1 text-mono-12 text-ink-4",children:"◻"}),m(e,t)]});case"link":{let r=f(e.url);if(null===r)return(0,n.jsxs)(n.Fragment,{children:[m(e,t),(0,n.jsxs)("span",{className:"text-mono-11 text-ink-4",children:[" (",e.url,")"]})]});let l=/^(https?|mailto):/i.test(r);return(0,n.jsx)("a",{href:r,...e.title?{title:e.title}:{},...l?{target:"_blank",rel:"noopener noreferrer"}:{},className:"text-ink underline decoration-rule underline-offset-2 hover:decoration-ink",children:m(e,t)})}case"image":{let t=null!==e.alt&&void 0!==e.alt&&""!==e.alt?e.alt:e.url,r=f(e.url);if(null===r)return(0,n.jsx)("span",{className:"text-mono-11 text-ink-4",children:t});return(0,n.jsx)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"text-ink underline decoration-rule underline-offset-2 hover:decoration-ink",children:t})}case"table":return(0,n.jsx)(v,{node:e,tone:t});case"text":case"html":return e.value;case"footnoteReference":return(0,n.jsxs)("sup",{className:"text-mono-11 text-ink-4",children:["[",e.identifier,"]"]});default:return(0,i.d)(e)}}function v({node:e,tone:t}){let r=e.children,l=r[0],a=r.slice(1),s=t=>e.align?.[t]==="right"?"right":"left";return(0,n.jsx)("div",{className:"mb-3 overflow-x-auto rounded-lg border border-rule-2",children:(0,n.jsxs)(c.Ay,{frame:!1,children:[l&&(0,n.jsx)(c.D1,{children:l.children.map((e,r)=>(0,n.jsx)(c.Th,{align:s(r),children:m(e,t)},r))}),(0,n.jsx)("tbody",{children:a.map((e,r)=>(0,n.jsx)(c.Tr,{children:e.children.map((e,r)=>(0,n.jsx)(c.Td,{align:s(r),className:"text-body-13 text-ink-2",children:m(e,t)},r))},r))})]})})}},56770:(e,t,r)=>{"use strict";r.d(t,{Q:()=>l});var n=r(2439);let l=(0,n.createServerReference)("400769f2991176c43b1dd042a9d6f3fca4a8fd8c84",n.callServer,void 0,n.findSourceMapURL,"createConversationAction")},73175:(e,t,r)=>{Promise.resolve().then(r.bind(r,81011)),Promise.resolve().then(r.bind(r,83589)),Promise.resolve().then(r.bind(r,40284)),Promise.resolve().then(r.bind(r,16062)),Promise.resolve().then(r.bind(r,2193)),Promise.resolve().then(r.bind(r,69160)),Promise.resolve().then(r.bind(r,68534)),Promise.resolve().then(r.bind(r,81098)),Promise.resolve().then(r.t.bind(r,22208,23)),Promise.resolve().then(r.t.bind(r,76937,23))},81011:(e,t,r)=>{"use strict";r.d(t,{default:()=>a});var n=r(48503),l=r(40284);function a({greeting:e,composer:t,agentName:r,agentAvatarUrl:s=null}){let{pending:i,inFlight:c}=(0,l.i)(),o=i.length>0||c;return(0,n.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-start gap-8 overflow-y-auto px-5 pt-[30vh] sm:px-8 lg:px-9",children:[o?(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)(l.default,{agentName:r,agentAvatarUrl:s})}):(0,n.jsx)("p",{className:"text-center text-display-28 tracking-[-0.015em] text-ink",children:e}),(0,n.jsx)("div",{className:"w-full",children:t})]})}},83589:(e,t,r)=>{"use strict";r.d(t,{default:()=>d});var n=r(48503),l=r(73573),a=r(3775),s=r(56770),i=r(2439);let c=(0,i.createServerReference)("40221aee1833c19bfe90063b7dac59e04b206000e1",i.callServer,void 0,i.findSourceMapURL,"discardEmptyConversationAction"),o=(0,i.createServerReference)("40620fec99ecf7c5964b221c1b989a37c00fe9c78a",i.callServer,void 0,i.findSourceMapURL,"createProjectConversationAction");function d({projectId:e=null,agentName:t,agentId:r,llmKeyId:i,model:u,reasoningEffort:h,llmKeys:m,requireTools:x}){let f=(0,l.useRouter)();return(0,n.jsx)(a.default,{conversationId:"",placeholder:"What are we doing today?",agentId:r??null,llmKeyId:i??null,model:u??null,reasoningEffort:h??null,llmKeys:m??[],requireTools:x??!1,...void 0!==t?{agentName:t}:{},onBeforeSend:async()=>{let t=null===e?await (0,s.Q)():await o(e);if(!t.ok)throw Error(t.message);return t.data.id},onSent:e=>f.replace(`/chat/${e}`),onSendFailed:e=>{c(e).then(e=>{e.ok||console.error("[new conversation] discard failed",e.code,e.message)})}})}}},e=>{e.O(0,[2208,3969,8153,6937,9311,5034,1054,8698,4771,3775,4811,9706,7358],()=>e(e.s=73175)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2771,2988],{2396:(e,t,r)=>{Promise.resolve().then(r.bind(r,67890)),Promise.resolve().then(r.bind(r,92085)),Promise.resolve().then(r.bind(r,99145)),Promise.resolve().then(r.bind(r,65768)),Promise.resolve().then(r.bind(r,41022)),Promise.resolve().then(r.bind(r,31288)),Promise.resolve().then(r.bind(r,26099)),Promise.resolve().then(r.bind(r,53254)),Promise.resolve().then(r.bind(r,93197)),Promise.resolve().then(r.bind(r,90515)),Promise.resolve().then(r.bind(r,76353)),Promise.resolve().then(r.bind(r,63416)),Promise.resolve().then(r.bind(r,8444)),Promise.resolve().then(r.bind(r,48543)),Promise.resolve().then(r.bind(r,81348)),Promise.resolve().then(r.bind(r,16062)),Promise.resolve().then(r.bind(r,13748)),Promise.resolve().then(r.bind(r,45846)),Promise.resolve().then(r.bind(r,2193)),Promise.resolve().then(r.bind(r,69160)),Promise.resolve().then(r.bind(r,68534)),Promise.resolve().then(r.bind(r,37932)),Promise.resolve().then(r.bind(r,81098)),Promise.resolve().then(r.t.bind(r,22208,23)),Promise.resolve().then(r.t.bind(r,76937,23))},26099:(e,t,r)=>{"use strict";r.d(t,{default:()=>m});var s=r(48503),n=r(80351),i=r(71552),o=r(23138),l=r(45413),d=r(4978);let a={confirmed:{tone:"agent",label:"sent"},attempted:{tone:"warn",label:"retrying"},prepared:{tone:"ink",label:"queued"},rejected:{tone:"err",label:"rejected"}};function m({deliveries:e}){return 0===e.length?null:(0,s.jsxs)("div",{className:"overflow-hidden rounded-xl border border-rule-2 bg-paper","data-testid":"deliveries-section",children:[(0,s.jsxs)("h2",{className:"border-b border-rule-2 px-4 py-3 text-mono-11 tracking-wider text-ink-4 uppercase",children:["Deliveries \xb7 ",e.length]}),e.map((e,t)=>(0,s.jsx)(h,{delivery:e},t))]})}function h({delivery:e}){let[t,r]=(0,n.useState)(!1),m=a[e.outcome]??{tone:"ink",label:e.outcome},b=e.payload?.trim()??"",c=e.reason?.trim()??"",v=""!==b||""!==c,x=e.updatedAt??e.createdAt,p=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"shrink-0 text-mono-12 text-ink",children:e.channel}),(0,s.jsxs)("span",{className:"min-w-0 truncate text-mono-11 text-ink-4",children:["to ",e.chatId]}),(0,s.jsx)(o.s,{tone:m.tone,children:m.label}),e.attempts>0&&(0,s.jsxs)("span",{className:"shrink-0 text-mono-11 text-ink-4",children:[e.attempts," ",1===e.attempts?"attempt":"attempts"]}),(0,s.jsx)("span",{className:"ml-auto shrink-0 text-mono-11 text-ink-4",children:null===x?"":(0,d.KW)(x)})]});return(0,s.jsxs)("div",{className:"border-b border-rule-2 last:border-b-0","data-testid":"delivery-row",children:[v?(0,s.jsx)(i.A,{open:t,onClick:()=>r(e=>!e),inset:"tight",children:p}):(0,s.jsx)("div",{className:"flex items-center gap-2 px-4 py-3",children:p}),t&&(0,s.jsxs)("div",{className:"space-y-2 border-t border-rule-2 px-4 py-3",children:[""!==b&&(0,s.jsx)(l.Ay,{text:b}),""!==c&&(0,s.jsx)("p",{className:"text-mono-11 text-warn",children:c})]})]})}}},e=>{e.O(0,[2208,3969,8153,6937,9311,1577,5034,1054,8698,1332,390,4771,9952,1789,4811,9706,7358],()=>e(e.s=2396)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1903,2772,2925,3302,3402,4790,4896,5015,5975,6066,6762,6819,6988,8167,8731,9492],{56285:()=>{}},_=>{_.O(0,[4811,9706,7358],()=>_(_.s=56285)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1670],{192:(e,t,n)=>{"use strict";n.d(t,{default:()=>m});var a=n(48503),s=n(80351),r=n(68926),i=n(85148),o=n(13919),l=n(15564),c=n(75551),d=n(9594);let u=["Europe/Paris","Europe/London","America/New_York","America/Los_Angeles","America/Sao_Paulo","Asia/Singapore","Asia/Tokyo","Asia/Kolkata","Asia/Dubai","Australia/Sydney","UTC"];function m({initial:e,isExplicit:t,formId:n}){let[h,x]=(0,s.useState)(e),[p,f]=(0,s.useTransition)(),g=Array.from(new Set([e,...u])),b=(()=>{try{return new Intl.DateTimeFormat("en-GB",{timeZone:h,weekday:"short",hour:"2-digit",minute:"2-digit",hour12:!1}).format(new Date)}catch{return""}})();return(0,a.jsx)("form",{id:n,onSubmit:function(e){e.preventDefault(),f(async()=>{let e=await (0,i.t)({timezone:h});e.ok?r.oR.success(`Timezone set to ${h} — agents schedule and read time in this zone.`):r.oR.error(e.message)})},children:(0,a.jsxs)(o.v,{children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("p",{className:"text-body-13 leading-[1.5]! text-ink-3",children:["The timezone your agents use to tell the time and schedule automations. Detected from your browser at setup",t?"":" (currently the server default — set it to be sure)",".",b?` It is currently ${b} there.`:""]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(d.A,{list:"tz-options",value:h,onChange:e=>x(e.target.value),placeholder:"e.g. Europe/Paris"}),(0,a.jsx)("datalist",{id:"tz-options",children:g.map(e=>(0,a.jsx)("option",{value:e},e))}),(0,a.jsx)(c.A,{onClick:function(){try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;e&&x(e)}catch{r.oR.error("Could not detect the browser timezone.")}},className:"shrink-0",children:"Detect"})]})]}),(0,a.jsx)(l.h,{onCancel:()=>x(e),pending:p})]})})}},7020:(e,t,n)=>{"use strict";n.d(t,{E:()=>s});var a=n(48503);function s({variant:e,children:t}){return(0,a.jsx)("span",{className:["inline-flex items-center gap-1.5 h-[22px] px-2 rounded-[5px] font-mono text-label-11 tracking-[0.08em]","ok"===e?"bg-lime-400/20 text-lime-600 dark:text-lime-300":"bg-orange-500/[0.13] text-orange-700 dark:text-orange-400"].join(" "),children:t})}},7576:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(48503),s=n(80351);let r={ink:"accent-ink",agent:"accent-agent-vivid",skill:"accent-skill-vivid",connector:"accent-conn-vivid"};function i({label:e,tone:t="ink",id:n,className:o="",containerClassName:l="",...c}){let d=(0,s.useId)(),u=n??d,m=(0,a.jsx)("input",{id:u,type:"checkbox",className:`h-4 w-4 shrink-0 cursor-pointer rounded border-rule disabled:cursor-not-allowed disabled:opacity-50 ${r[t]} ${o}`,...c});return e?(0,a.jsxs)("label",{htmlFor:u,className:`flex cursor-pointer items-center gap-2 text-sm text-ink ${l}`,children:[m,e]}):(0,a.jsx)("div",{className:l,children:m})}},9245:(e,t,n)=>{"use strict";n.d(t,{A:()=>r,S:()=>s});var a=n(48503);let s=["\uD83D\uDDC2️","\uD83C\uDFE0","\uD83D\uDCBC","\uD83D\uDE80","\uD83E\uDDEA","\uD83C\uDFA8","\uD83D\uDCCA","\uD83D\uDEE0️","\uD83C\uDF10","⚡","\uD83E\uDD16","\uD83D\uDCE6"];function r({value:e,onChange:t,disabled:n}){return(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:s.map(s=>{let r=e===s;return(0,a.jsx)("button",{type:"button",disabled:n,"aria-pressed":r,onClick:()=>t(s),className:`flex h-8 w-8 items-center justify-center rounded-md border text-legacy-16 leading-none! transition-colors disabled:opacity-50 ${r?"border-ink bg-hover-2":"border-rule-2 hover:bg-hover"}`,children:s},s)})})}},9594:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(48503),s=n(80351),r=n(5829);let i=(0,s.forwardRef)(function({label:e,error:t,id:n,className:i="",containerClassName:o="",...l},c){let d=(0,s.useId)(),u=n??d;return(0,a.jsxs)("div",{className:o,children:[e&&(0,a.jsx)(r.A,{htmlFor:u,children:e}),(0,a.jsx)("input",{id:u,ref:c,"aria-invalid":!!t||void 0,className:`w-full rounded-md border bg-hover py-1.5 pr-2 pl-3 text-body-14 leading-5! text-ink placeholder:text-ink-4 transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${t?"border-err focus:border-err":"border-rule focus:border-ink-3"} ${i}`,...l}),t&&(0,a.jsx)("p",{className:"mt-1 text-xs text-err",children:t})]})})},10664:(e,t,n)=>{"use strict";n.d(t,{O:()=>r});var a=n(48503),s=n(68926);function r({subtitle:e,url:t}){async function n(){try{navigator.clipboard?.writeText?await navigator.clipboard.writeText(t):i(t),s.oR.success("Copied")}catch{try{i(t),s.oR.success("Copied")}catch{s.oR.error("Could not copy")}}}function i(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();let n=document.execCommand("copy");if(t.remove(),!n)throw Error("copy_failed")}return(0,a.jsxs)("div",{className:"flex items-center gap-3 bg-canvas/40 border border-rule-2 rounded-[9px] px-4 py-3.5 mt-2",children:[(0,a.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,a.jsx)("span",{className:"block text-xs leading-[1.4] text-ink-4",children:e}),(0,a.jsx)("span",{className:"block font-mono text-legacy-14 leading-[1.4]! text-ink tracking-[0.02em] mt-1.5 break-all",children:t})]}),(0,a.jsxs)("button",{type:"button",onClick:n,className:"flex-shrink-0 flex items-center gap-1.5 px-2.5 py-1.5 border border-rule text-ink-3 rounded-[7px] text-xs font-medium hover:border-rule-2 hover:text-ink transition-colors",children:[(0,a.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-3.5 h-3.5",children:[(0,a.jsx)("rect",{x:"3",y:"3",width:"8",height:"8",rx:"1"}),(0,a.jsx)("rect",{x:"5",y:"5",width:"8",height:"8",rx:"1"})]}),"Copy"]})]})}},13919:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});var a=n(48503);function s({label:e,children:t}){return(0,a.jsxs)("div",{className:"mt-3.5 bg-paper border border-rule-2 rounded-[14px] p-5",children:[e&&(0,a.jsx)("div",{className:"text-body-14 leading-none! text-ink-3 mb-2.5",children:e}),t]})}},15564:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});var a=n(48503),s=n(80351);let r=(0,s.createContext)(null);function i({onCancel:e,pending:t,saveLabel:n="Save"}){let o=(0,s.useContext)(r),l=o?.report,c=(0,s.useRef)(e);(0,s.useEffect)(()=>{c.current=e});let d=(0,s.useCallback)(()=>c.current(),[]);return((0,s.useEffect)(()=>{l&&l({saveLabel:n,pending:!!t,onCancel:d})},[l,n,t,d]),(0,s.useEffect)(()=>{if(l)return()=>l(null)},[l]),o)?null:(0,a.jsxs)("div",{className:"flex justify-end gap-2 mt-[18px]",children:[(0,a.jsx)("button",{type:"button",onClick:e,className:"h-[34px] px-3.5 rounded-[9px] cursor-pointer bg-paper border border-rule text-medium-14 text-ink-2 hover:bg-hover hover:border-rule-2 transition-colors",children:"Cancel"}),(0,a.jsx)("button",{type:"submit",disabled:t,className:"h-[34px] px-4 rounded-[9px] border-0 cursor-pointer bg-ink text-canvas text-medium-14 hover:brightness-90 disabled:opacity-50 transition-[filter,opacity]",children:t?"Saving…":n})]})}},17878:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});var a=n(48503),s=n(80351),r=n(68926),i=n(13919),o=n(15564),l=n(9594);function c({formId:e}){let[t,n]=(0,s.useState)(""),[d,u]=(0,s.useState)(""),[m,h]=(0,s.useState)(""),[x,p]=(0,s.useState)(!1);function f(){n(""),u(""),h("")}async function g(e){if(e.preventDefault(),d!==m)return void r.oR.error("New passwords do not match.");if(d.length<8)return void r.oR.error("New password must be at least 8 characters.");p(!0);try{let e=await fetch("/api/auth/change-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:t,newPassword:d,revokeOtherSessions:!0})});if(!e.ok){let t=await e.json().catch(()=>null);r.oR.error(400===e.status?t?.message??"Current password is incorrect.":t?.message??"Could not change the password.");return}f(),r.oR.success("Password changed. Other signed-in devices were signed out.")}catch{r.oR.error("Network error. Please try again.")}finally{p(!1)}}return(0,a.jsx)("form",{id:e,onSubmit:g,children:(0,a.jsxs)(i.v,{children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(l.A,{type:"password",value:t,onChange:e=>n(e.target.value),placeholder:"Current password",autoComplete:"current-password",required:!0}),(0,a.jsx)(l.A,{type:"password",value:d,onChange:e=>u(e.target.value),placeholder:"New password (min. 8 characters)",autoComplete:"new-password",required:!0}),(0,a.jsx)(l.A,{type:"password",value:m,onChange:e=>h(e.target.value),placeholder:"Repeat new password",autoComplete:"new-password",required:!0})]}),(0,a.jsx)(o.h,{onCancel:f,pending:x,saveLabel:"Change password"})]})})}},20250:(e,t,n)=>{"use strict";n.d(t,{default:()=>m});var a=n(48503),s=n(80351),r=n(68926),i=n(2439);let o=(0,i.createServerReference)("404c01a52bfef7c9939dcb90c4e0502f116594867d",i.callServer,void 0,i.findSourceMapURL,"setAutoRunPauseAction");var l=n(45678),c=n(28661),d=n(23138),u=n(90423);function m({initial:e}){let[t,n]=(0,s.useState)(e.autoRunPaused),[i,h]=(0,s.useState)(!1),[x,p]=(0,s.useTransition)();function f(e){n(e),p(async()=>{let t=await o({paused:e});t.ok?r.oR.success(e?"Auto-run paused. Every command, script and coding task asks for approval again.":"Auto-run resumed. Per-agent Yolo toggles apply again."):(r.oR.error(t.message),n(!e))})}let g=!e.isOwner||x;return(0,a.jsxs)("div",{className:"flex items-start gap-4 rounded-xl border border-rule-2 bg-paper px-[18px] py-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-medium-14 text-ink",children:"Pause all auto-run"}),(0,a.jsx)(d.s,{tone:"err",children:"owner only"})]}),(0,a.jsx)("p",{className:"mt-1 text-body-13 leading-[1.4]! text-ink-3",children:"The emergency brake. When on, every shell command, skill script and coding CLI task in this workspace asks for approval again — per-agent Yolo toggles are put to sleep, not deleted. Release the brake and they apply again as before."}),!e.isOwner&&(0,a.jsx)("p",{className:"mt-2 text-body-12 text-ink-4",children:"Only the workspace owner can change this setting."}),t&&e.isOwner&&(0,a.jsx)(c.A,{variant:"warn",children:(0,a.jsxs)("span",{children:[(0,a.jsx)("b",{className:"block font-medium text-ink",children:"Auto-run is paused workspace-wide"}),"Nothing runs without your approval right now, whatever the per-agent toggles say. Release the brake to re-arm them."]})})]}),(0,a.jsx)("div",{className:"mt-0.5",children:(0,a.jsx)(u.A,{checked:t,onChange:function(){t?h(!0):f(!0)},disabled:g})}),(0,a.jsx)(l.A,{open:i,title:"Release the brake?",message:"Per-agent Yolo rules re-arm exactly as they were: agents whose toggle is on will run shell commands and coding tasks again without approval.",confirmLabel:"Release",destructive:!0,onConfirm:()=>{h(!1),f(!1)},onCancel:()=>h(!1)})]})}},22808:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var a=n(48503),s=n(80351),r=n(68926),i=n(2439);let o=(0,i.createServerReference)("40b46fd17bf9459d4d04447ad03e654ca354524644",i.callServer,void 0,i.findSourceMapURL,"updateNetworkSettingsAction");var l=n(91701),c=n(28661),d=n(10664),u=n(15564),m=n(13919);function h({initial:e,formId:t}){let[n,i]=(0,s.useState)(e.configuredBind),[x,p]=(0,s.useTransition)(),[f,g]=(0,s.useState)(!1),[b,v]=(0,s.useState)(!1);return(0,a.jsx)("form",{id:t,onSubmit:function(e){e.preventDefault(),p(async()=>{let e=await o({bind:n});e.ok?(r.oR.success("Network settings saved"),g(e.data.requiresRestart),v(e.data.authModeAligned)):r.oR.error(e.message)})},children:(0,a.jsxs)(m.v,{children:[(0,a.jsx)(l.t,{active:"loopback"===n,onClick:()=>i("loopback"),name:"Local only (127.0.0.1)",description:"Only this machine can reach the dashboard. No auth required by default."}),(0,a.jsx)(l.t,{active:"lan"===n,onClick:()=>i("lan"),name:"LAN (0.0.0.0) — accessible from your network",description:"Other devices on the same Wi-Fi can reach the dashboard. Sign-in required (local-auth)."}),"lan"===n&&e.lanAddresses.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.A,{variant:"info",children:"Any device on the same Wi-Fi can open the dashboard. Combine with email + password auth to avoid unintended access."}),e.lanAddresses.map(t=>{let n=`http://${t}:${e.webPort}`;return(0,a.jsx)(d.O,{subtitle:"From your phone or another device on the same network, open:",url:n},t)}),(0,a.jsx)("p",{className:"text-body-13 leading-[1.5]! text-ink-4 mt-2.5 mx-1",children:"Windows Defender may prompt the first time another device tries to connect — allow access on private networks."}),(0,a.jsx)(c.A,{variant:"warn",children:(0,a.jsxs)("span",{children:[(0,a.jsx)("b",{className:"block font-medium text-ink",children:"LAN exposes this dashboard beyond your machine"}),"Anyone on the same Wi-Fi can attempt to reach the URL above. Keep email + password auth enabled and avoid open / public networks."]})})]}),"lan"===n&&0===e.lanAddresses.length&&(0,a.jsx)(c.A,{variant:"warn",children:"No LAN interface detected. Make sure this machine is connected to a network before enabling LAN access."}),!e.configPathExists&&(0,a.jsxs)(c.A,{variant:"warn",children:[(0,a.jsx)("b",{className:"block font-medium text-ink",children:"Config file missing"}),"~/.nodalai/config.json wasn't found. Save will fail until you've run"," ",(0,a.jsx)("code",{className:"text-mono-12",children:"nodal-agents init"})," at least once."]}),b&&(0,a.jsx)(c.A,{variant:"info",title:"Sign-in enabled.",children:"LAN access requires email + password auth, so it was switched on. After the restart, the login page will ask you to create your account. Your agents and settings are kept."}),f&&(0,a.jsxs)(c.A,{variant:"info",title:"Saved. Restart required.",children:["Run ",(0,a.jsx)("code",{className:"text-mono-12",children:"nodal-agents down && nodal-agents up"})," to activate the new network mode."]}),(0,a.jsx)(u.h,{onCancel:function(){i(e.configuredBind),g(!1),v(!1)},pending:x})]})})}},23138:(e,t,n)=>{"use strict";n.d(t,{s:()=>r});var a=n(48503);let s={err:"bg-err/10 text-err",ok:"bg-ok-bg text-ok",skill:"bg-skill-vivid/10 text-skill-vivid",warn:"bg-warn/10 text-warn",agent:"bg-agent-vivid/40 text-ink-2 dark:bg-agent-vivid/20 dark:text-agent-vivid",ink:"bg-ink/10 text-ink-3"};function r({tone:e,children:t,className:n=""}){return(0,a.jsx)("span",{className:["inline-flex h-[18px] items-center rounded-full px-2 text-mono-11 uppercase tracking-[0.1em]",s[e],n].join(" "),children:t})}},28661:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var a=n(48503),s=n(78608),r=n(68269),i=n(69996);let o={info:{bg:"bg-run-bg",icon:"text-conn-vivid",iconColor:"text-conn-vivid"},warn:{bg:"bg-warn-bg",icon:"text-skill-vivid",iconColor:"text-skill-vivid"},tip:{bg:"bg-paper border border-rule-2",icon:"text-ink-3",iconColor:"text-ink-3"}},l={info:s.R,warn:r.N,tip:i.g};function c({variant:e,title:t,children:n,className:s=""}){let r=o[e],i=l[e];return(0,a.jsxs)("div",{className:`flex items-start gap-2.5 rounded-[9px] px-3.5 py-2.5 text-body-13 leading-[1.5]! text-ink-2 ${r.bg} ${s}`,children:[(0,a.jsx)(i,{size:16,weight:"regular",className:`mt-0.5 shrink-0 ${r.iconColor}`}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[t&&(0,a.jsx)("b",{className:"block font-medium text-ink",children:t}),n]})]})}},41685:(e,t,n)=>{"use strict";n.d(t,{u:()=>a});let a=[{value:"propose_confirm",name:"Propose & confirm",description:"While doing what you ask, it pauses for your approval before every action: shell commands, skill scripts, connector writes and the ROOT meta-tools (create agent, skill…) all wait in the Approvals queue before running."},{value:"destructive_gate",name:"Autonomous, gate destructive",description:"While doing what you ask, ordinary actions run without interrupting you (normal commands, scripts, meta-tools). But destructive or heavy ones still ask first: deletions, software installs / large downloads, killing processes, disk operations. The sweet spot — no friction for routine work, a checkpoint before anything risky."},{value:"fully_autonomous",name:"Fully autonomous",description:"While doing what you ask, nothing pauses for approval — every command, script and connector action, plus the ROOT meta-tools, run straight through. Only truly catastrophic shell commands (wiping the disk, etc.) still force a confirmation. Maximum power, no friction: use only if you fully trust it."}]},41779:(e,t,n)=>{"use strict";n.d(t,{O:()=>s});var a=n(2439);let s=(0,a.createServerReference)("40d039abdd07a386ee71403a4c894d7e4c9222ff5a",a.callServer,void 0,a.findSourceMapURL,"createWorkspaceAction")},45070:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,j:()=>d});var a=n(48503),s=n(80351),r=n(88142),i=n(86045),o=n(12871);function l({open:e,onClose:t,title:n,children:o,footer:c,className:d="",dismissable:u=!0,testId:m}){let[h,x]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{x(!0)},[]),(0,i.Z4)(e,u?t:i.C5),(0,s.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e]),e&&h)?(0,r.createPortal)((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 z-40 bg-black/60 animate-[fadeIn_150ms_ease]",onClick:u?t:void 0,"aria-hidden":"true"}),(0,a.jsx)("div",{role:"dialog","aria-modal":"true","data-testid":m,className:"fixed inset-0 z-50 flex items-center justify-center p-4 pointer-events-none",children:(0,a.jsxs)("div",{className:`pointer-events-auto w-full max-w-lg max-h-[90vh] overflow-y-auto bg-paper border border-rule-2 rounded-xl shadow-2xl animate-[scaleIn_150ms_ease] ${d}`,children:[void 0!==n&&(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 px-6 pt-5 pb-4 border-b border-rule-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-ink",children:n}),u&&(0,a.jsx)("button",{type:"button",onClick:t,"aria-label":"Close",className:"text-ink-3 hover:text-ink transition-colors",children:"✕"})]}),(0,a.jsx)("div",{className:"p-6 pt-5",children:o}),c]})})]}),document.body):null}function c(e){return s.Children.map(e,e=>(0,s.isValidElement)(e)&&e.type===o.A?(0,s.cloneElement)(e,{size:"md"}):e)}function d({children:e,danger:t,className:n=""}){return(0,a.jsxs)("div",{className:`flex items-center gap-2 border-t border-rule-2 px-6 py-4 ${t?"justify-between":"justify-end"} ${n}`,children:[c(t),(0,a.jsx)("div",{className:"flex items-center gap-2",children:c(e)})]})}},45678:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var a=n(48503),s=n(80351),r=n(88142),i=n(86045),o=n(12871),l=n(9594),c=n(45070);function d({open:e,title:t,message:n,confirmLabel:u="Confirm",cancelLabel:m="Cancel",destructive:h=!0,typeToConfirm:x,extra:p,onConfirm:f,onCancel:g}){let b=(0,s.useRef)(null),[v,k]=(0,s.useState)(!1),[j,y]=(0,s.useState)(""),[w,N]=(0,s.useState)(e);w!==e&&(N(e),e&&y(""));let C=!!x&&j!==x;return((0,s.useEffect)(()=>{k(!0)},[]),(0,i.Z4)(e,g),(0,s.useEffect)(()=>{e&&b.current?.focus()},[e]),e&&v)?(0,r.createPortal)((0,a.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-dialog-title",className:"fixed inset-0 z-50 flex items-center justify-center px-4 text-left",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:g,"aria-hidden":"true"}),(0,a.jsxs)("div",{className:"relative bg-paper border border-rule-2 rounded-xl max-w-md w-full shadow-2xl",children:[(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsx)("h2",{id:"confirm-dialog-title",className:"text-base font-semibold text-ink",children:t}),n&&(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3 leading-relaxed",children:n}),p&&(0,a.jsx)("div",{className:"mt-3",children:p}),x&&(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsxs)("p",{className:"text-body-13 text-ink-3",children:["Type ",(0,a.jsx)("span",{className:"font-mono font-semibold text-ink",children:x})," to confirm."]}),(0,a.jsx)(l.A,{type:"text",value:j,onChange:e=>y(e.target.value),placeholder:x,autoComplete:"off",spellCheck:!1,className:"mt-2"})]})]}),(0,a.jsxs)(c.j,{className:"rounded-b-xl",children:[(0,a.jsx)(o.A,{variant:"neutral",onClick:g,ref:b,children:m}),(0,a.jsx)(o.A,{variant:h?"danger":"ink",onClick:f,disabled:C,className:C?"cursor-not-allowed opacity-40":"",children:u})]})]})]}),document.body):null}},48677:(e,t,n)=>{"use strict";n.d(t,{W:()=>s});var a=n(2439);let s=(0,a.createServerReference)("4062cef616071913ee4ce2257f7353748953b8fd7e",a.callServer,void 0,a.findSourceMapURL,"switchWorkspaceAction")},49524:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var a=n(48503),s=n(80351),r=n(68926),i=n(81528),o=n(2439);let l=(0,o.createServerReference)("4026a65ca14c354283475c21b41ba6113610c7c57b",o.callServer,void 0,o.findSourceMapURL,"setProofRepairAction");var c=n(23138),d=n(50236);function u({initial:e}){let[t,n]=(0,s.useState)(e.repairAttempts),[o,m]=(0,s.useTransition)(),h=!e.isOwner||o;return(0,a.jsxs)("div",{className:"rounded-xl border border-rule-2 bg-paper px-[18px] py-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-medium-14 text-ink",children:"Repair turns after a failed proof"}),(0,a.jsx)(c.s,{tone:"err",children:"owner only"})]}),(0,a.jsx)("p",{className:"mt-1 text-body-13 leading-[1.4]! text-ink-3",children:0===t?"A failed proof ends the run at once, with its red verdict.":1===t?"A failed proof reopens the run once. The agent gets the failing command and its output, fixes it, and delivers again.":`A failed proof reopens the run up to ${t} times. Each turn costs another model call and another full proof.`}),!e.isOwner&&(0,a.jsx)("p",{className:"mt-2 text-body-12 text-ink-4",children:"Only the workspace owner can change this setting."})]}),(0,a.jsx)("div",{className:"mt-0.5",children:(0,a.jsx)(d.A,{ariaLabel:"Repair turns after a failed proof",value:String(t),onChange:function(e){let a=Number(e);n(a),m(async()=>{let e=await l({repairAttempts:a});e.ok?r.oR.success(0===a?"A failed proof now ends the run at once.":`A failed proof now reopens the run ${1===a?"once":`up to ${a} times`}.`):(r.oR.error(e.message),n(t))})},disabled:h,options:i.bpx.map(e=>({value:String(e),label:String(e),testId:`repair-turns-${e}`}))})})]}),(0,a.jsxs)("div",{className:"mt-4 border-t border-rule-2 pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-medium-13 text-ink-2",children:"What else bounds a run"}),(0,a.jsx)(c.s,{tone:"ink",children:"read only"})]}),(0,a.jsx)("dl",{className:"mt-2 grid gap-1.5","data-testid":"run-budgets",children:[{key:"resumes",label:"Resumes per run",value:e.budgets.resumesPerRun,hint:"Delegations picked back up, approvals answered, repair turns."},{key:"tool-calls",label:"Tool calls per turn",value:e.budgets.toolCallsPerTurn,hint:"One model turn cannot ask for more than this."},{key:"delegation",label:"Delegation depth",value:e.budgets.delegationDepth,hint:"An agent briefing an agent briefing an agent."}].map(e=>(0,a.jsxs)("div",{className:"flex items-baseline gap-3","data-testid":`budget-${e.key}`,children:[(0,a.jsx)("dt",{className:"text-body-13 text-ink-2",children:e.label}),(0,a.jsx)("dd",{className:"text-medium-13 text-ink",children:e.value}),(0,a.jsx)("span",{className:"min-w-0 truncate text-body-12 text-ink-4",children:e.hint})]},e.key))})]})]})}},50236:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(48503);function s({options:e,value:t,onChange:n,disabled:r,ariaLabel:i,className:o=""}){return(0,a.jsx)("div",{className:`flex w-fit shrink-0 overflow-hidden rounded-lg border border-rule-2 ${o}`,role:"group","aria-label":i,children:e.map((e,s)=>{let i=e.value===t;return(0,a.jsx)("button",{type:"button",disabled:r,onClick:()=>n(e.value),"data-testid":e.testId,"aria-pressed":i,className:["relative h-[32px] px-3 text-medium-13 transition-colors",s>0?"border-l border-rule-2":"",i?e.activeClassName??"bg-ink text-canvas border-ink":"bg-canvas text-ink-3 hover:bg-hover hover:text-ink-2",r?"cursor-wait opacity-60":""].join(" "),children:e.label},e.value)})})}},51137:(e,t,n)=>{"use strict";n.d(t,{CR:()=>s,Oi:()=>a}),n(81528);let a={codeTask:{label:"Coding tool",hint:"code_task: a coding CLI called as a tool"},cliRuntime:{label:"Claude Code / Codex agents",hint:"agents that ARE a coding CLI session"},fileOps:{label:"File tools",hint:"file_write, file_edit, Office files"},shell:{label:"Commands and scripts",hint:"run_command, run_skill_script"}};function s(e){return a[e]?.label??e}},59085:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var a=n(48503),s=n(68926),r=n(89466);function i({display:e,value:t,href:n}){async function o(){try{await navigator.clipboard.writeText(t),s.oR.success("Path copied")}catch{s.oR.error("Could not copy")}}let l=(0,a.jsx)("span",{title:t,className:"block truncate rounded-md bg-hover px-2 py-1 text-mono-13 text-ink-2",children:e});return(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)("span",{className:"min-w-0 flex-1",children:n?(0,a.jsx)("a",{href:n,title:t,className:"block min-w-0 hover:opacity-80",children:l}):l}),(0,a.jsxs)("button",{type:"button",onClick:o,title:"Copy full path",className:"inline-flex h-[28px] shrink-0 items-center gap-1.5 rounded-md border border-rule-2 px-2.5 text-medium-12 text-ink-3 transition-colors hover:border-rule hover:text-ink",children:[(0,a.jsx)(r.Q,{size:13})," Copy"]})]})}},59942:(e,t,n)=>{"use strict";n.d(t,{default:()=>x});var a=n(48503),s=n(80351),r=n(68926),i=n(81528),o=n(2439);let l=(0,o.createServerReference)("402781412fb9bdbf00477c6e4c16b13dd9e139b02f",o.callServer,void 0,o.findSourceMapURL,"setVerificationSurfacesAction");var c=n(51137),d=n(45678),u=n(7576),m=n(23138);let h=i.XWN.map(e=>({key:e,...c.Oi[e]}));function x({initial:e}){let[t,n]=(0,s.useState)(e.surfaces),[i,o]=(0,s.useState)(null),[c,p]=(0,s.useTransition)();function f(e){n(e),p(async()=>{let a=await l(e);a.ok?r.oR.success("Verification surfaces saved."):(r.oR.error(a.message),n(t))})}let g=!e.isOwner||c,b=h.find(e=>e.key===i)?.label??"";return(0,a.jsxs)("div",{className:"flex flex-col gap-3 rounded-xl border border-rule-2 bg-paper px-[18px] py-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-medium-14 text-ink",children:"What gets verified"}),(0,a.jsx)(m.s,{tone:"err",children:"owner only"})]}),(0,a.jsx)("p",{className:"text-body-13 leading-[1.4]! text-ink-3",children:"A checked surface declares what it changes and gets proven by the project's proof commands. An unchecked one is not verified, and every run says so. All on by default."}),(0,a.jsx)("ul",{className:"flex flex-col gap-2",children:h.map(e=>(0,a.jsxs)("li",{className:"flex items-baseline gap-2",children:[(0,a.jsx)(u.A,{tone:"ink",label:e.label,checked:t[e.key],disabled:g,onChange:n=>{var a;return a=e.key,void(!n.currentTarget.checked?o(a):f({...t,[a]:!0}))},"data-testid":`verification-surface-${e.key}`}),(0,a.jsx)("span",{className:"text-body-12 text-ink-4",children:e.hint})]},e.key))}),!e.isOwner&&(0,a.jsx)("p",{className:"text-body-12 text-ink-4",children:"Only the workspace owner can change this setting."}),(0,a.jsx)(d.A,{open:null!==i,title:`Stop verifying ${b}?`,message:"Work coming from this surface will no longer be proven by the project's proof commands. Each run will say it was not verified.",confirmLabel:"Stop verifying",destructive:!0,onConfirm:()=>{o(null),i&&f({...t,[i]:!1})},onCancel:()=>o(null)})]})}},60100:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var a=n(2439);let s=(0,a.createServerReference)("405455934cabf5f2c476e40be52d546683ac27d2df",a.callServer,void 0,a.findSourceMapURL,"setInstallNotesAction")},60540:(e,t,n)=>{"use strict";n.d(t,{default:()=>k});var a=n(48503),s=n(8584),r=n(48857),i=n(88172),o=n(9481),l=n(76089),c=n(16020),d=n(13472),u=n(14397),m=n(28718),h=n(56743),x=n(18859),p=n(65985),f=n(47922),g=n(75207),b=n(7020);let v={"sign-in":s.U,network:r.Q,password:i.L,"worker-secret":o.o,"auto-run-brake":l.v,verification:c.s,"repair-turns":d.P,"root-agent":u.n,"mcp-server":m.X,timezone:h.z,"install-notes":x.c,workspaces:p.P,urls:f.X,session:g.T};function k({rows:e,panels:t}){return(0,a.jsx)("div",{className:"flex flex-col gap-8","data-testid":"settings-sections",children:e.map(e=>{let n=v[e.id],s=t[e.id]??null;return(0,a.jsxs)("section",{id:e.id,"data-testid":`setting-section-${e.id}`,className:"flex flex-col gap-4",children:[(0,a.jsxs)("header",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(n,{size:16})}),(0,a.jsx)("h2",{className:"text-title-16 text-ink",children:e.name}),e.tag&&(0,a.jsx)(b.E,{variant:e.tag.variant,children:e.tag.label})]}),(0,a.jsx)("p",{className:"text-body-13 text-ink-3",children:e.lede})]}),null===s?(0,a.jsxs)("p",{className:"text-body-13 text-warn","data-testid":`setting-unread-${e.id}`,children:[e.value,". Reload the page, and check the runner is up."]}):(0,a.jsx)("div",{className:"rounded-lg border border-rule-2 bg-paper p-4",children:s})]},e.id)})})}},62260:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var a=n(2439);let s=(0,a.createServerReference)("400a69f05e1dbe9d71a06d6a813639480b68d73cef",a.callServer,void 0,a.findSourceMapURL,"setRootAgentAction")},68534:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var a=n(48503),s=n(78936),r=n(80351);function i({placeholder:e="Search agents, skills, runs…",keyboardShortcut:t=!0,onSubmit:n,className:o=""}){let l=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(!t)return;let e=e=>{if("/"!==e.key)return;let t=e.target;t&&/^(input|textarea|select)$/i.test(t.tagName)||t?.isContentEditable||(e.preventDefault(),l.current?.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t]),(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),n?.(l.current?.value??"")},className:`flex h-[34px] min-w-[280px] items-center gap-2 rounded-md border border-rule-2 bg-paper px-3 text-body-13 text-ink-4 ${o}`,children:[(0,a.jsx)(s.e,{size:13,className:"shrink-0"}),(0,a.jsx)("input",{ref:l,type:"search",placeholder:e,className:"h-full flex-1 border-0 bg-transparent text-body-14 leading-none! text-ink outline-none placeholder:text-ink-4"}),(0,a.jsx)("span",{className:"rounded-[5px] border border-rule bg-black/5 px-1.5 py-[1px] text-mono-12 leading-none! text-ink-4 dark:bg-white/[0.06]",children:"/"})]})}},75068:(e,t,n)=>{"use strict";n.d(t,{default:()=>m});var a=n(48503),s=n(80351),r=n(68926),i=n(2439);let o=(0,i.createServerReference)("40e2b3ad26610b716852d20df66af356b8630d2e27",i.callServer,void 0,i.findSourceMapURL,"setMcpServerSwitchAction");var l=n(45678),c=n(23138),d=n(90423),u=n(10664);function m({initial:e}){let[t,n]=(0,s.useState)(e.enabled),[i,h]=(0,s.useState)(!1),[x,p]=(0,s.useTransition)();function f(e){p(async()=>{let t=await o({enabled:e});t.ok?(n(e),r.oR.success(e?"MCP server enabled":"MCP server disabled")):r.oR.error(t.message)})}return(0,a.jsxs)("div",{className:"rounded-2xl border border-rule-2 bg-paper p-6",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h2",{className:"text-medium-15 text-ink",children:"MCP server"}),(0,a.jsx)(c.s,{tone:t?"agent":"ink",children:t?"on":"off"})]}),(0,a.jsxs)("p",{className:"mt-1 text-body-13 leading-[1.5]! text-ink-3",children:["Lets an external MCP client — your terminal, a coding agent — hand work to this workspace's root agent. Jobs arrive on the Runs page with channel ",(0,a.jsx)("code",{children:"mcp"})," ","and the caller's self-chosen label. MCP jobs can never use the configuration tools (create agents, skills, connectors, automations) — that is enforced in the runner, not by this switch."]}),t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.O,{subtitle:"Connect a client (Claude Code shown):",url:"claude mcp add nodal -- nodal-agents mcp serve"}),(0,a.jsx)("p",{className:"mt-1.5 text-body-12 text-ink-4",children:"Run it on the machine that hosts Nodal."})]}),!e.isOwner&&(0,a.jsx)("p",{className:"mt-2 text-body-12 text-ink-4",children:"Only the workspace owner can change this setting."})]}),(0,a.jsx)(d.A,{checked:t,disabled:x||!e.isOwner,onChange:()=>{t?f(!1):h(!0)}})]}),(0,a.jsx)(l.A,{open:i,title:"Enable the MCP server?",message:"Any process on this machine that knows the database URL will be able to hand work to your root agent — under its approval rules and budgets, and never with the configuration tools. Turning this off later also cuts clients that are already connected.",confirmLabel:"Enable",onConfirm:()=>{h(!1),f(!0)},onCancel:()=>h(!1)})]})}},75613:(e,t,n)=>{"use strict";n.d(t,{default:()=>d});var a=n(48503),s=n(80351),r=n(68926),i=n(60100),o=n(13919),l=n(15564),c=n(76381);function d({initial:e,formId:t}){let[n,u]=(0,s.useState)(e),[m,h]=(0,s.useTransition)();return(0,a.jsx)("form",{id:t,onSubmit:function(e){e.preventDefault(),h(async()=>{let e=await (0,i.F)(n);e.ok?r.oR.success("Install notes saved — agents will see them on the next job."):r.oR.error(e.message)})},children:(0,a.jsxs)(o.v,{children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-body-13 leading-[1.5]! text-ink-3",children:"These notes are injected into every agent's runtime context and apply live (no restart needed). Use them for machine-specifics the system can't auto-detect — for example: “ComfyUI runs on :8188”, a local GPU, a local API path, or services the agent should call directly."}),(0,a.jsx)(c.A,{value:n,onChange:e=>u(e.target.value),rows:5,maxLength:4e3,showCount:!0,placeholder:"e.g. ComfyUI runs on :8188 with no auth. GPU: RTX 4090. Ollama on :11434."})]}),(0,a.jsx)(l.h,{onCancel:function(){u(e)},pending:m})]})})}},76381:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(48503),s=n(80351),r=n(5829);let i=(0,s.forwardRef)(function({label:e,error:t,showCount:n,id:i,className:o="",containerClassName:l="",maxLength:c,value:d,bare:u=!1,...m},h){let x=(0,s.useId)(),p=i??x;return(0,a.jsxs)("div",{className:l,children:[e&&(0,a.jsx)(r.A,{htmlFor:p,children:e}),(0,a.jsx)("textarea",{id:p,ref:h,maxLength:c,value:d,"aria-invalid":!!t||void 0,className:u?`w-full text-ink placeholder:text-ink-4 transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${o}`:`w-full resize-y rounded-md border bg-hover px-2 py-1.5 text-body-14 leading-[1.5]! text-ink placeholder:text-ink-4 transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${t?"border-err focus:border-err":"border-rule focus:border-ink-3"} ${o}`,...m}),n&&void 0!==c&&"string"==typeof d&&(0,a.jsxs)("div",{className:"mt-1 text-right text-legacy-11 text-ink-4",children:[d.length," / ",c]}),t&&(0,a.jsx)("p",{className:"mt-1 text-xs text-err",children:t})]})})},79183:(e,t,n)=>{"use strict";n.d(t,{default:()=>x});var a=n(48503),s=n(80351),r=n(73573),i=n(68926),o=n(62260),l=n(41685),c=n(81528),d=n(13919),u=n(15564),m=n(91701),h=n(7576);function x({agents:e,initialRootAgentId:t,initialGrants:n,formId:p}){let f=(0,r.useRouter)(),[g,b]=(0,s.useTransition)(),v=e.find(e=>e.id===t)??null,[k,j]=(0,s.useState)(n??c.zw);return(0,a.jsx)(a.Fragment,{children:null===v?(0,a.jsx)("div",{className:"mt-3.5 rounded-xl border border-rule-2 bg-paper px-[18px] py-4",children:(0,a.jsxs)("p",{className:"text-body-14 text-ink-3",children:["No ROOT agent yet."," ",(0,a.jsx)("a",{href:"/agents",className:"font-medium text-ink underline decoration-rule underline-offset-[3px] hover:decoration-ink-3",children:"Create an orchestrator agent"})," ","— the first one you create becomes this workspace's ROOT automatically."]})}):(0,a.jsx)("form",{id:p,onSubmit:function(e){e.preventDefault(),b(async()=>{let e=await (0,o.S)({grants:k});e.ok?(i.oR.success("ROOT agent configuration saved"),f.refresh()):i.oR.error(e.message)})},children:(0,a.jsxs)(d.v,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("div",{className:"mb-1.5 text-body-14 leading-none! text-ink-3",children:"ROOT agent"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-rule bg-paper px-3 py-2",children:[(0,a.jsx)("span",{className:"text-medium-14 text-ink",children:v.name}),(0,a.jsx)("span",{className:"rounded-full border border-rule-2 px-2 py-0.5 text-micro-11 uppercase tracking-wide text-ink-4",children:"Origin orchestrator"}),(0,a.jsx)("a",{href:"/settings/root-context",className:"ml-auto text-medium-13 text-ink-3 underline decoration-rule underline-offset-[3px] hover:text-ink hover:decoration-ink-3",children:"View & edit context →"})]})]}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("div",{className:"mb-2 text-body-14 leading-none! text-ink-3",children:"Allowed actions"}),(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:[{key:"createAgent",label:"Create agents"},{key:"updateAgent",label:"Edit agents (model, personality, name)"},{key:"attachAgent",label:"Attach / detach sub-agents"},{key:"createSkill",label:"Create skills"},{key:"updateSkill",label:"Update skills"},{key:"assignSkill",label:"Assign / unassign skills"},{key:"createMcp",label:"Create MCP servers"},{key:"attachMcp",label:"Attach / detach MCP servers"},{key:"createConnector",label:"Create connectors"},{key:"attachConnector",label:"Attach / detach connectors"},{key:"manageSchedules",label:"Manage schedules (create / edit / pause cron)"}].map(({key:e,label:t})=>(0,a.jsx)(h.A,{tone:"connector",checked:k[e],onChange:()=>{j(t=>({...t,[e]:!t[e]}))},disabled:g,label:(0,a.jsx)("span",{className:"text-body-14 text-ink-2",children:t})},e))})]}),(0,a.jsxs)("div",{className:"mb-1",children:[(0,a.jsx)("div",{className:"mb-2.5 text-body-14 leading-none! text-ink-3",children:"Autonomy level"}),(0,a.jsx)("div",{role:"radiogroup","aria-label":"Autonomy level",children:l.u.map(e=>(0,a.jsx)(m.t,{active:k.autonomy===e.value,onClick:()=>{var t;return t=e.value,void j(e=>({...e,autonomy:t}))},name:e.name,description:e.description},e.value))})]})]}),(0,a.jsx)(u.h,{onCancel:function(){j(n??c.zw)},pending:g,saveLabel:"Save"})]})})})}},83857:(e,t,n)=>{"use strict";n.d(t,{default:()=>y});var a=n(48503),s=n(80351),r=n(73573),i=n(68926),o=n(2439);let l=(0,o.createServerReference)("00920ac177f0bb48e87febc3d332553bd5dae71ff8",o.callServer,void 0,o.findSourceMapURL,"listWorkspacesAction");var c=n(41779);let d=(0,o.createServerReference)("4067cdcd01af6f350a208794a19363fcf0afee1b11",o.callServer,void 0,o.findSourceMapURL,"renameWorkspaceAction"),u=(0,o.createServerReference)("408011541bdc74610a558389ee81f105e3c66c2b98",o.callServer,void 0,o.findSourceMapURL,"deleteWorkspaceAction");var m=n(48677);let h=(0,o.createServerReference)("005315da89de60cd3f2f6c9ff1540638cc9bb33885",o.callServer,void 0,o.findSourceMapURL,"listWorkspaceFootprintsAction");var x=n(45678),p=n(13919),f=n(15564),g=n(7020),b=n(9245),v=n(12871),k=n(75551),j=n(9594);function y({initial:e,formId:t}){let n=(0,r.useRouter)(),[o,w]=(0,s.useState)(e),[N,C]=(0,s.useState)(""),[S,A]=(0,s.useState)(b.S[0]),[R,O]=(0,s.useTransition)(),[P,$]=(0,s.useState)(null),[L,T]=(0,s.useState)(""),[E,M]=(0,s.useState)(b.S[0]),[U,D]=(0,s.useTransition)(),[I,F]=(0,s.useState)(null),[W,z]=(0,s.useTransition)(),[_,G]=(0,s.useState)(null),[q,B]=(0,s.useState)(null);async function V(){let e=await l();e.ok&&w(e.data)}function Y(){$(null),T("")}async function X(e){let t=await (0,m.W)({id:e});t.ok?(await V(),n.refresh()):i.oR.error(t.message)}return(0,s.useEffect)(()=>{let e=!0;return h().then(t=>{e&&(t.ok?G(t.data):B(t.message))}).catch(()=>{e&&B("Could not reach the server to measure the folders.")}),()=>{e=!1}},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mt-3.5 rounded-xl border border-rule-2 bg-paper overflow-hidden",children:0===o.length?(0,a.jsx)("p",{className:"px-[18px] py-4 text-body-14 text-ink-4",children:"No workspaces found."}):o.map(e=>{let t,s=P===e.id;return(0,a.jsxs)("div",{className:"flex items-center gap-3 px-[18px] py-3.5 border-b border-rule-2 last:border-b-0",children:[(0,a.jsx)("span",{className:"flex h-[28px] w-[28px] shrink-0 items-center justify-center rounded-md border border-rule-2 bg-canvas font-mono text-legacy-14 leading-none!",children:e.icon??e.name.slice(0,1).toUpperCase()}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s?(0,a.jsxs)("form",{onSubmit:t=>{var a;let s;return a=e.id,t.preventDefault(),void((s=L.trim())&&D(async()=>{let e=await d({id:a,name:s,icon:E});e.ok?(i.oR.success("Workspace updated"),$(null),await V(),n.refresh()):i.oR.error(e.message)}))},className:"flex flex-col gap-2",children:[(0,a.jsx)(b.A,{value:E,onChange:M,disabled:U}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(j.A,{autoFocus:!0,type:"text",value:L,onChange:e=>T(e.target.value),maxLength:60,disabled:U,containerClassName:"w-44"}),(0,a.jsx)(v.A,{variant:"ink",size:"sm",type:"submit",disabled:!L.trim(),children:"Save"}),(0,a.jsx)(k.A,{type:"button",onClick:Y,children:"Cancel"})]})]}):(0,a.jsx)("span",{className:"text-medium-14 text-ink leading-none!",children:e.name}),(0,a.jsx)("span",{className:"text-mono-11 text-ink-4 leading-none! mt-0.5",children:e.role}),(0,a.jsx)("span",{className:"text-mono-11 text-ink-4 leading-none! mt-1","data-testid":`workspace-footprint-${e.id}`,children:null!==q?q:null===_?"Measuring shared folder…":void 0===(t=_.find(t=>t.workspaceId===e.id))?"Shared folder not measured":`${function(e){if(null===e.measure)return"absent"===e.unmeasured?"No shared folder yet":"Size unreadable";let{sizeLabel:t,files:n,capped:a}=e.measure,s=1===n?"1 file":`${n} files`;return a?`At least ${t} in ${s}`:`${t} in ${s}`}(t)} \xb7 ${function(e){let t=e.lastSnapshot;if(null===t)return"No safety snapshot yet";if(null===t.ms)return"Last snapshot not timed";let n=t.ms<1e3?`${t.ms} ms`:`${(t.ms/1e3).toFixed(1)} s`;return`Last snapshot took ${n}`}(t)}`})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[e.active&&(0,a.jsx)(g.E,{variant:"ok",children:"ACTIVE"}),!e.active&&(0,a.jsx)(k.A,{onClick:()=>X(e.id),children:"Switch"}),!s&&(0,a.jsx)(k.A,{onClick:()=>{$(e.id),T(e.name),M(e.icon??b.S[0])},children:"Rename"}),"owner"===e.role&&!e.active&&(0,a.jsx)(k.A,{tone:"danger",onClick:()=>F(e),disabled:W,children:"Delete"})]})]},e.id)})}),(0,a.jsx)("form",{id:t,onSubmit:function(e){e.preventDefault();let t=N.trim();t&&O(async()=>{let e=await (0,c.O)({name:t,icon:S});e.ok?(i.oR.success(`Workspace "${t}" created`),C(""),A(b.S[0]),await V(),n.refresh()):i.oR.error(e.message)})},children:(0,a.jsxs)(p.v,{label:"Create workspace",children:[(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsx)(b.A,{value:S,onChange:A,disabled:R})}),(0,a.jsx)("div",{className:"flex gap-2 items-center",children:(0,a.jsx)(j.A,{type:"text",value:N,onChange:e=>C(e.target.value),placeholder:"Workspace name",maxLength:60,disabled:R,containerClassName:"min-w-0 flex-1"})}),(0,a.jsx)(f.h,{onCancel:()=>C(""),pending:R,saveLabel:"Create"})]})}),(0,a.jsx)(x.A,{open:null!==I,title:"Delete workspace?",message:I?`This will permanently delete "${I.name}" and all its data (agents, jobs, credentials). This cannot be undone.`:"",confirmLabel:"Delete",destructive:!0,onConfirm:function(){if(!I)return;let{id:e,name:t}=I;z(async()=>{F(null);let a=await u({id:e});a.ok?(i.oR.success(`Workspace "${t}" deleted`),await V(),n.refresh()):i.oR.error(a.message)})},onCancel:()=>F(null)})]})}},85058:(e,t,n)=>{Promise.resolve().then(n.bind(n,20250)),Promise.resolve().then(n.bind(n,75613)),Promise.resolve().then(n.bind(n,75068)),Promise.resolve().then(n.bind(n,22808)),Promise.resolve().then(n.bind(n,17878)),Promise.resolve().then(n.bind(n,49524)),Promise.resolve().then(n.bind(n,79183)),Promise.resolve().then(n.bind(n,97465)),Promise.resolve().then(n.bind(n,60540)),Promise.resolve().then(n.bind(n,192)),Promise.resolve().then(n.bind(n,59942)),Promise.resolve().then(n.bind(n,83857)),Promise.resolve().then(n.bind(n,2193)),Promise.resolve().then(n.bind(n,59085)),Promise.resolve().then(n.bind(n,68534)),Promise.resolve().then(n.bind(n,81098)),Promise.resolve().then(n.t.bind(n,22208,23))},85148:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var a=n(2439);let s=(0,a.createServerReference)("40eb98d142c5916308285052fd182f40fb53a577a4",a.callServer,void 0,a.findSourceMapURL,"setWorkspaceTimezoneAction")},90423:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var a=n(48503);let s={sm:"h-5 w-9",md:"h-[22px] w-[38px]"},r={sm:"h-3.5 w-3.5",md:"h-4 w-4"};function i({checked:e,onChange:t,disabled:n,size:o="md",ariaLabel:l,ariaLabelledBy:c,ariaDescribedBy:d,readOnly:u=!1}){let m=`relative inline-flex shrink-0 items-center rounded-full ${s[o]} ${e?"bg-ok":"bg-ink-4"}`,h=(0,a.jsx)("span",{className:`pointer-events-none inline-block rounded-full bg-paper ${u?"":"transition-transform duration-200"} ${r[o]} ${e?"translate-x-[19px]":"translate-x-[3px]"}`});return u?(0,a.jsx)("span",{role:"img","aria-label":l??(e?"On":"Off"),"data-state":e?"on":"off",className:`${m} ${n?"opacity-50":""}`,children:h}):(0,a.jsx)("button",{type:"button",role:"switch","aria-checked":e,"aria-label":l,"aria-labelledby":c,"aria-describedby":d,disabled:n,onClick:t,className:`${m} cursor-pointer transition-colors duration-200 focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-conn-vivid/50 disabled:cursor-not-allowed disabled:opacity-50`,children:h})}},91701:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var a=n(48503);function s({active:e,onClick:t,name:n,description:r,children:i,testId:o}){return(0,a.jsxs)("div",{role:"radio","aria-checked":e,"data-testid":o,tabIndex:0,onClick:t,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t())},className:["flex items-start gap-3.5 px-4 py-3.5 rounded-[10px] border cursor-pointer mb-2 transition-[border-color,background-color] duration-[120ms]",e?"border-conn-vivid bg-conn-vivid/[0.06]":"border-rule-2 bg-paper hover:border-rule"].join(" "),children:[(0,a.jsx)("span",{className:["mt-0.5 flex-shrink-0 w-[18px] h-[18px] rounded-full border-[1.6px] flex items-center justify-center",e?"border-conn-vivid":"border-rule"].join(" "),children:e&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-conn-vivid"})}),(0,a.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,a.jsx)("span",{className:"block text-medium-14 leading-[1.3]! text-ink",children:n}),(0,a.jsx)("span",{className:"block text-body-13 leading-[1.4]! text-ink-3 mt-0.5",children:r}),i]})]})}},97465:(e,t,n)=>{"use strict";n.d(t,{default:()=>g});var a=n(48503),s=n(80351),r=n(68926),i=n(2439);let o=(0,i.createServerReference)("40060deba770cabcaf393126defb02dc9eb6e19f62",i.callServer,void 0,i.findSourceMapURL,"updateAuthSettingsAction");var l=n(45678),c=n(91701),d=n(28661);function u({name:e,description:t,action:n}){return(0,a.jsxs)("div",{className:"flex items-center gap-3.5 px-4 py-3.5 rounded-[10px] bg-canvas/40 border border-rule-2 mt-2",children:[(0,a.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,a.jsx)("span",{className:"block text-medium-14 leading-[1.3]! text-ink",children:e}),(0,a.jsx)("span",{className:"block text-body-13 leading-[1.4]! text-ink-3 mt-0.5",children:t})]}),(0,a.jsx)("span",{className:"flex-shrink-0",children:n})]})}var m=n(15564),h=n(13919),x=n(75551),p=n(9594),f=n(5829);function g({initial:e,formId:t}){let[n,i]=(0,s.useState)(e.configuredMode),[b,v]=(0,s.useState)(!1),[k,j]=(0,s.useTransition)(),[y,w]=(0,s.useState)(!1),[N,C]=(0,s.useState)(!1);return(0,a.jsxs)("form",{id:t,onSubmit:function(e){e.preventDefault();let t=new FormData(e.currentTarget);j(async()=>{let e=await o({mode:n,googleClientId:b?t.get("googleClientId"):void 0,googleClientSecret:b?t.get("googleClientSecret"):void 0,clearGoogle:!1});e.ok?(r.oR.success("Auth settings saved"),C(e.data.requiresRestart)):r.oR.error(e.message)})},children:[(0,a.jsxs)(h.v,{label:"Auth mode",children:[(0,a.jsx)(c.t,{active:"local-trust"===n,onClick:()=>i("local-trust"),name:"No auth (local-trust)",description:"Single hardcoded user. Recommended for solo loopback installs."}),(0,a.jsx)(c.t,{active:"local-auth"===n,onClick:()=>i("local-auth"),name:"Email + password (local-auth)",description:"Sign-up + login via better-auth. Optional Google OAuth on top."}),"local-auth"===n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.A,{variant:"info",children:"Each user signs in with email + password. Sessions are stored in the local DB and can be revoked from this page."}),(0,a.jsx)(u,{name:"Google OAuth",description:e.googleConfigured?"Configured.":"Optional. Add to allow Google sign-in alongside email + password.",action:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(x.A,{onClick:()=>v(e=>!e),children:b?"Hide fields":e.googleConfigured?"Rotate":"Add"}),e.googleConfigured&&(0,a.jsx)(x.A,{tone:"danger",onClick:()=>w(!0),disabled:k,children:"Remove"})]})}),b&&(0,a.jsxs)("div",{className:"mt-3 grid grid-cols-1 sm:grid-cols-2 gap-3 px-1",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(f.A,{htmlFor:"google-client-id",children:"Client ID"}),(0,a.jsx)(p.A,{id:"google-client-id",name:"googleClientId",type:"text",placeholder:"xxx.apps.googleusercontent.com",className:"font-mono"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(f.A,{htmlFor:"google-client-secret",children:"Client secret"}),(0,a.jsx)(p.A,{id:"google-client-secret",name:"googleClientSecret",type:"password",placeholder:e.googleConfigured?"•••••••• (overwrite)":"",className:"font-mono"})]}),(0,a.jsxs)("p",{className:"sm:col-span-2 text-body-12 text-ink-4",children:["Use authorized JavaScript origins"," ",(0,a.jsx)("code",{className:"font-mono",children:"http://localhost:3000"})," and redirect URI"," ",(0,a.jsx)("code",{className:"font-mono",children:"http://localhost:3000/api/auth/callback/google"})," ","in the Google Cloud Console."]})]})]}),!e.configPathExists&&(0,a.jsxs)(d.A,{variant:"warn",children:[(0,a.jsx)("b",{className:"block font-medium text-ink",children:"Config file missing"}),"~/.nodalai/config.json wasn't found. Save will fail until you've run"," ",(0,a.jsx)("code",{className:"text-mono-12",children:"nodal-agents init"})," at least once."]}),(0,a.jsx)(d.A,{variant:"warn",children:(0,a.jsxs)("span",{children:[(0,a.jsx)("b",{className:"block font-medium text-ink",children:"Switching auth mode signs everyone out"}),"Active sessions are invalidated when the auth mode changes. Make sure you can still sign in with the new method before applying."]})}),N&&(0,a.jsxs)(d.A,{variant:"info",title:"Saved. Restart required.",children:["Run ",(0,a.jsx)("code",{className:"text-mono-12",children:"nodal-agents down && nodal-agents up"})," to activate the new auth mode."]}),(0,a.jsx)(m.h,{onCancel:function(){i(e.configuredMode),v(!1),C(!1)},pending:k})]}),(0,a.jsx)(l.A,{open:y,title:"Remove Google OAuth credentials?",message:"The clientId and clientSecret will be removed from ~/.nodalai/config.json. Users with active Google sessions will need to sign in again with email + password.",confirmLabel:"Remove",onConfirm:function(){w(!1),j(async()=>{let e=await o({mode:n,clearGoogle:!0});e.ok?r.oR.success("Google credentials removed"):r.oR.error(e.message)})},onCancel:()=>w(!1)})]})}}},e=>{e.O(0,[2208,3969,8153,7999,296,5034,1054,4811,9706,7358],()=>e(e.s=85058)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2945],{5829:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(48503);function r({children:e,className:t="",...a}){return(0,l.jsx)("label",{className:`block text-xs text-ink-3 mb-1 ${t}`,...a,children:e})}},12871:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var l=a(48503),r=a(22208),n=a.n(r),s=a(80351);let i={ink:"bg-ink text-canvas border-0 hover:brightness-[0.92]",agent:"bg-agent-vivid text-[#1a2200] border-0 hover:brightness-[0.96]",coral:"bg-skill-vivid text-white border-0 hover:brightness-[0.94]",blue:"bg-conn-vivid text-white border-0 hover:brightness-[0.94]",neutral:"border border-rule-2 bg-paper text-ink hover:bg-hover",danger:"border border-err/30 bg-paper text-err hover:border-err hover:bg-warn-bg"},d=(0,s.forwardRef)(function(e,t){let{children:a,variant:r="ink",size:s="md",className:d=""}=e,c=`inline-flex cursor-pointer items-center justify-center gap-1.5 rounded-md leading-none! transition-[filter,background-color] disabled:pointer-events-none disabled:opacity-40 ${"md"===s?"h-[34px] px-3.5 text-medium-14":"h-[30px] px-3 text-medium-13"} ${i[r]} ${d}`;if("href"in e&&e.href){let{href:r,variant:s,size:i,className:d,children:o,...m}=e;return(0,l.jsx)(n(),{href:r,className:c,ref:t,...m,children:a})}let{variant:o,size:m,className:x,children:h,...u}=e;return(0,l.jsx)("button",{type:"button",className:c,ref:t,...u,children:a})})},16763:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(80351);let r=l.forwardRef((e,t)=>{let{alt:a,color:r="currentColor",size:n="1em",weight:s="regular",mirrored:i=!1,children:d,weights:c,...o}=e;return l.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:n,height:n,fill:r,viewBox:"0 0 256 256",transform:i?"scale(-1, 1)":void 0,...o},!!a&&l.createElement("title",null,a),d,c.get(s))});r.displayName="SSRBase"},37306:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(80351);let r=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),l.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]])},38178:(e,t,a)=>{"use strict";a.d(t,{K:()=>i});var l=a(80351),r=a(16763),n=a(37306);let s=l.forwardRef((e,t)=>l.createElement(r.A,{ref:t,...e,weights:n.A}));s.displayName="CaretRightIcon";let i=s},47585:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var l=a(48503),r=a(68534),n=a(81098),s=a(2193);function i({title:e,subtitle:t,header:a}){return void 0!==a?(0,l.jsxs)("header",{className:"flex min-h-[75px] items-center gap-4 border-b border-rule-2 px-5 pt-5 pb-4 sm:px-8 lg:px-9",children:[(0,l.jsx)("div",{className:"min-w-0 flex-1",children:a}),(0,l.jsxs)("div",{className:"hidden shrink-0 items-center gap-2 lg:flex",children:[(0,l.jsx)(r.default,{className:"hidden md:flex"}),(0,l.jsx)(s.default,{}),(0,l.jsx)(n.default,{})]})]}):(0,l.jsxs)("header",{className:"flex items-center justify-between gap-4 border-b border-rule-2 px-5 pt-5 pb-4 sm:px-8 lg:px-9",children:[(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("h1",{className:"text-display-28 leading-[1.15]! tracking-[-0.015em] text-ink",children:e}),t&&(0,l.jsx)("p",{className:"mt-1.5 text-body-14 leading-[1.5]! text-ink-3",children:t})]}),(0,l.jsxs)("div",{className:"hidden shrink-0 items-center gap-2 lg:flex",children:[(0,l.jsx)(r.default,{className:"hidden md:flex"}),(0,l.jsx)(s.default,{}),(0,l.jsx)(n.default,{})]})]})}function d(e){let{toolbar:t,toolbarBleed:a=!1,aside:r,footer:n,children:s,fluid:d=!1,fill:c=!1,bodyClassName:o=""}=e,m=void 0!==e.header?(0,l.jsx)(i,{header:e.header}):(0,l.jsx)(i,{title:e.title,subtitle:e.subtitle});return c?(0,l.jsxs)("div",{className:"flex h-full min-h-0 flex-1 flex-col",children:[m,t&&a&&t,(0,l.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,l.jsxs)("div",{className:`flex min-w-0 min-h-0 flex-1 flex-col ${o}`,children:[t&&!a&&(0,l.jsx)("div",{className:`w-full px-5 pt-4 sm:px-8 lg:px-9 ${d?"":"mx-auto max-w-6xl"}`,children:t}),d?s:(0,l.jsx)("div",{className:"mx-auto flex min-h-0 w-full max-w-6xl flex-1 flex-col",children:s})]}),r]}),n]}):(0,l.jsxs)(l.Fragment,{children:[m,t&&a&&t,(0,l.jsxs)("div",{className:`w-full px-5 pt-6 pb-10 sm:px-8 lg:px-9 ${d?"":"mx-auto max-w-6xl"} ${o}`,children:[t&&!a&&(0,l.jsx)("div",{className:"mb-5",children:t}),s]})]})}},50232:(e,t,a)=>{"use strict";a.d(t,{default:()=>b});var l=a(48503),r=a(80351),n=a(68926),s=a(2439);let i=(0,s.createServerReference)("40979df594ff3dd9562d81bedb329591cf5612ce90",s.callServer,void 0,s.findSourceMapURL,"updateRootPersonalityAction");var d=a(60100),c=a(72772),o=a(78100),m=a(12871),x=a(75551),h=a(76381),u=a(47585),p=a(71552);let f="mt-2 text-mono-13 leading-[1.55]!";function g({children:e}){return(0,l.jsx)("div",{className:"text-mono-11 tracking-[0.18em] uppercase text-ink-4",children:e})}function b({rootName:e,systemPrompt:t,personality:a,skills:s,installNotes:v,memories:j}){let[k,y]=(0,r.useState)(a),[N,w]=(0,r.useState)(!1),[E,A]=(0,r.useState)(v),[M,R]=(0,r.useState)(!1),[S,Z]=(0,r.useState)(Object.fromEntries(s.map(e=>[e.id,e.content]))),[F,C]=(0,r.useState)(null),[L,$]=(0,r.useState)({}),[O,z]=(0,r.useState)(j);async function I(){w(!0);let e=await i({personality:k});w(!1),n.oR[e.ok?"success":"error"](e.ok?"Personality saved":e.message)}async function _(){R(!0);let e=await (0,d.F)(E);R(!1),n.oR[e.ok?"success":"error"](e.ok?"Install notes saved":e.message)}async function U(e){C(e.id);let t=await (0,c.R)({id:e.id,name:e.name,description:e.description??void 0,content:S[e.id]??""});C(null),n.oR[t.ok?"success":"error"](t.ok?`Saved "${e.name}"`:t.message)}async function D(e){let t=await (0,o.t)(e);t.ok?(z(t=>t.filter(t=>t.id!==e)),n.oR.success("Memory removed")):n.oR.error(t.message)}return(0,l.jsx)(u.A,{title:"Root context",subtitle:"What the ROOT agent sees every turn.",children:e?(0,l.jsxs)("div",{className:"mt-7 flex flex-col gap-9",children:[(0,l.jsxs)("section",{children:[(0,l.jsxs)(g,{children:["Full system prompt — exactly what ",e," receives"]}),(0,l.jsx)("p",{className:"mt-1 text-body-13 text-ink-3",children:"The complete context assembled per turn: identity, personality, runtime, built-in capabilities, workspaces, memory, and every skill. Read-only — edit the pieces below."}),(0,l.jsx)(h.A,{readOnly:!0,value:t,rows:18,className:"mt-2 text-mono-12 leading-[1.5]! text-ink-2"})]}),(0,l.jsxs)("section",{children:[(0,l.jsx)(g,{children:"Identity & personality"}),(0,l.jsx)(h.A,{value:k,onChange:e=>y(e.target.value),rows:12,className:f}),(0,l.jsx)("div",{className:"mt-2 flex justify-end",children:(0,l.jsx)(m.A,{onClick:I,size:"sm",children:N?"Saving…":"Save personality"})})]}),(0,l.jsxs)("section",{children:[(0,l.jsxs)(g,{children:["Skills (",s.length,")"]}),(0,l.jsx)("p",{className:"mt-1 text-body-13 text-ink-3",children:"Each skill's full markdown is injected into the prompt. Edit here to change how the agent behaves."}),(0,l.jsxs)("div",{className:"mt-3 flex flex-col gap-2.5",children:[s.map(e=>{let t=!!L[e.id];return(0,l.jsxs)("div",{className:"overflow-hidden rounded-xl border border-rule-2 bg-paper",children:[(0,l.jsxs)(p.A,{open:t,onClick:()=>$(t=>({...t,[e.id]:!t[e.id]})),children:[(0,l.jsx)("span",{className:"shrink-0 text-legacy-14 font-semibold text-ink",children:e.name}),e.description&&(0,l.jsxs)("span",{className:"min-w-0 truncate text-body-13 text-ink-3",children:["— ",e.description]}),(0,l.jsxs)("span",{className:"ml-auto shrink-0 text-mono-11 text-ink-4",children:[(S[e.id]??"").length," chars"]})]}),t&&(0,l.jsxs)("div",{className:"px-4 pb-4",children:[(0,l.jsx)(h.A,{value:S[e.id]??"",onChange:t=>Z(a=>({...a,[e.id]:t.target.value})),rows:12,className:f}),(0,l.jsx)("div",{className:"mt-2 flex justify-end",children:(0,l.jsx)(m.A,{onClick:()=>U(e),size:"sm",children:F===e.id?"Saving…":"Save"})})]})]},e.id)}),0===s.length&&(0,l.jsx)("div",{className:"text-body-13 text-ink-4",children:"No skills attached."})]})]}),(0,l.jsxs)("section",{children:[(0,l.jsx)(g,{children:"Install notes (Runtime block)"}),(0,l.jsx)("p",{className:"mt-1 text-body-13 text-ink-3",children:"Operator notes about this machine (endpoints, model names, paths) — injected into every agent's ## Runtime block."}),(0,l.jsx)(h.A,{value:E,onChange:e=>A(e.target.value),rows:6,placeholder:"e.g. ComfyUI runs on port 8000; substitute models, don't block.",className:f}),(0,l.jsx)("div",{className:"mt-2 flex justify-end",children:(0,l.jsx)(m.A,{onClick:_,size:"sm",children:M?"Saving…":"Save notes"})})]}),(0,l.jsxs)("section",{children:[(0,l.jsxs)(g,{children:["Persistent memory (",O.length,")"]}),(0,l.jsx)("p",{className:"mt-1 text-body-13 text-ink-3",children:"Durable facts injected into the prompt. Remove anything stale or wrong."}),(0,l.jsxs)("div",{className:"mt-3 flex flex-col gap-2",children:[O.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-3 rounded-lg border border-rule-2 bg-paper px-3.5 py-2.5",children:[(0,l.jsx)("span",{className:"mt-0.5 shrink-0 rounded bg-conn-vivid/12 px-1.5 py-0.5 text-mono-11 uppercase tracking-wide text-ink-3",children:e.category}),(0,l.jsx)("span",{className:"min-w-0 flex-1 text-legacy-14 leading-[1.5]! text-ink",children:e.fact}),(0,l.jsx)(x.A,{tone:"danger",onClick:()=>D(e.id),className:"shrink-0",children:"Remove"})]},e.id)),0===O.length&&(0,l.jsx)("div",{className:"text-body-13 text-ink-4",children:"No memories yet."})]})]})]}):(0,l.jsx)("div",{className:"mt-6 rounded-xl border border-rule-2 bg-paper p-5 text-legacy-14 text-ink-3",children:"No ROOT agent yet. Create your first agent — the workspace's origin orchestrator becomes the ROOT."})})}},53384:(e,t,a)=>{Promise.resolve().then(a.bind(a,50232))},60100:(e,t,a)=>{"use strict";a.d(t,{F:()=>r});var l=a(2439);let r=(0,l.createServerReference)("405455934cabf5f2c476e40be52d546683ac27d2df",l.callServer,void 0,l.findSourceMapURL,"setInstallNotesAction")},63428:(e,t,a)=>{"use strict";a.d(t,{a:()=>i});var l=a(80351),r=a(16763),n=a(91692);let s=l.forwardRef((e,t)=>l.createElement(r.A,{ref:t,...e,weights:n.A}));s.displayName="CaretDownIcon";let i=s},68534:(e,t,a)=>{"use strict";a.d(t,{default:()=>s});var l=a(48503),r=a(78936),n=a(80351);function s({placeholder:e="Search agents, skills, runs…",keyboardShortcut:t=!0,onSubmit:a,className:i=""}){let d=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!t)return;let e=e=>{if("/"!==e.key)return;let t=e.target;t&&/^(input|textarea|select)$/i.test(t.tagName)||t?.isContentEditable||(e.preventDefault(),d.current?.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t]),(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault(),a?.(d.current?.value??"")},className:`flex h-[34px] min-w-[280px] items-center gap-2 rounded-md border border-rule-2 bg-paper px-3 text-body-13 text-ink-4 ${i}`,children:[(0,l.jsx)(r.e,{size:13,className:"shrink-0"}),(0,l.jsx)("input",{ref:d,type:"search",placeholder:e,className:"h-full flex-1 border-0 bg-transparent text-body-14 leading-none! text-ink outline-none placeholder:text-ink-4"}),(0,l.jsx)("span",{className:"rounded-[5px] border border-rule bg-black/5 px-1.5 py-[1px] text-mono-12 leading-none! text-ink-4 dark:bg-white/[0.06]",children:"/"})]})}},71552:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var l=a(48503),r=a(63428),n=a(38178);let s={default:"px-4",tight:"px-3",none:"px-0"},i={default:"py-3",tight:"py-2",none:"py-0"};function d({open:e,onClick:t,children:a,chevron:c="start",inset:o="default",insetY:m="default",className:x="",testId:h}){let u=(0,l.jsx)("span",{className:"flex w-3.5 shrink-0 items-center text-ink-4","aria-hidden":!0,children:e?(0,l.jsx)(r.a,{size:14}):(0,l.jsx)(n.K,{size:14})});return(0,l.jsxs)("button",{type:"button",onClick:t,"aria-expanded":e,"data-testid":h,className:`flex w-full items-center gap-2 ${s[o]} ${i[m]} text-left hover:bg-hover ${x}`,children:["start"===c&&u,a,"end"===c&&u]})}},72772:(e,t,a)=>{"use strict";a.d(t,{R:()=>r});var l=a(2439);let r=(0,l.createServerReference)("405be84667c8b7479a6225f1cb7fe66df7749c3d64",l.callServer,void 0,l.findSourceMapURL,"updateSkillAction")},76381:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(48503),r=a(80351),n=a(5829);let s=(0,r.forwardRef)(function({label:e,error:t,showCount:a,id:s,className:i="",containerClassName:d="",maxLength:c,value:o,bare:m=!1,...x},h){let u=(0,r.useId)(),p=s??u;return(0,l.jsxs)("div",{className:d,children:[e&&(0,l.jsx)(n.A,{htmlFor:p,children:e}),(0,l.jsx)("textarea",{id:p,ref:h,maxLength:c,value:o,"aria-invalid":!!t||void 0,className:m?`w-full text-ink placeholder:text-ink-4 transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${i}`:`w-full resize-y rounded-md border bg-hover px-2 py-1.5 text-body-14 leading-[1.5]! text-ink placeholder:text-ink-4 transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 ${t?"border-err focus:border-err":"border-rule focus:border-ink-3"} ${i}`,...x}),a&&void 0!==c&&"string"==typeof o&&(0,l.jsxs)("div",{className:"mt-1 text-right text-legacy-11 text-ink-4",children:[o.length," / ",c]}),t&&(0,l.jsx)("p",{className:"mt-1 text-xs text-err",children:t})]})})},78100:(e,t,a)=>{"use strict";a.d(t,{t:()=>r});var l=a(2439);let r=(0,l.createServerReference)("408b7a39c037fa9bf9867d5458972f8424f401affc",l.callServer,void 0,l.findSourceMapURL,"deleteMemoryAction")},78936:(e,t,a)=>{"use strict";a.d(t,{e:()=>i});var l=a(80351),r=a(3674);let n=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),l.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),s=l.forwardRef((e,t)=>l.createElement(r.A,{ref:t,...e,weights:n}));s.displayName="MagnifyingGlassIcon";let i=s},91692:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(80351);let r=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),l.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]])}},e=>{e.O(0,[2208,3969,5034,4811,9706,7358],()=>e(e.s=53384)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8141],{3604:(e,t,a)=>{"use strict";a.d(t,{B:()=>n});let l=new Set(a(67117).t);function n(e){return e.isSystem&&l.has(e.slug)}},9481:(e,t,a)=>{"use strict";a.d(t,{o:()=>i});var l=a(80351),n=a(3674);let s=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,36H48A20,20,0,0,0,28,56v56c0,54.29,26.32,87.22,48.4,105.29,23.71,19.39,47.44,26,48.44,26.29a12.1,12.1,0,0,0,6.32,0c1-.28,24.73-6.9,48.44-26.29,22.08-18.07,48.4-51,48.4-105.29V56A20,20,0,0,0,208,36Zm-4,76c0,35.71-13.09,64.69-38.91,86.15A126.28,126.28,0,0,1,128,219.38a126.14,126.14,0,0,1-37.09-21.23C65.09,176.69,52,147.71,52,112V60H204ZM79.51,144.49a12,12,0,1,1,17-17L112,143l47.51-47.52a12,12,0,0,1,17,17l-56,56a12,12,0,0,1-17,0Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z",opacity:"0.2"}),l.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.26,47,25.53a8,8,0,0,0,4.2,0c1-.27,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0ZM82.34,141.66a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32l-56,56a8,8,0,0,1-11.32,0Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.26,47,25.53a8,8,0,0,0,4.2,0c1-.27,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm-34.32,69.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,42H48A14,14,0,0,0,34,56v56c0,51.94,25.12,83.4,46.2,100.64,22.73,18.6,45.27,24.89,46.22,25.15a6,6,0,0,0,3.16,0c.95-.26,23.49-6.55,46.22-25.15C196.88,195.4,222,163.94,222,112V56A14,14,0,0,0,208,42Zm2,70c0,37.76-13.94,68.39-41.44,91.06A131.17,131.17,0,0,1,128,225.72a130.94,130.94,0,0,1-40.56-22.66C59.94,180.39,46,149.76,46,112V56a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2ZM172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.26,47,25.53a8,8,0,0,0,4.2,0c1-.27,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0ZM82.34,141.66a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32l-56,56a8,8,0,0,1-11.32,0Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,44H48A12,12,0,0,0,36,56v56c0,51.16,24.73,82.12,45.47,99.1,22.4,18.32,44.55,24.5,45.48,24.76a4,4,0,0,0,2.1,0c.93-.26,23.08-6.44,45.48-24.76,20.74-17,45.47-47.94,45.47-99.1V56A12,12,0,0,0,208,44Zm4,68c0,38.44-14.23,69.63-42.29,92.71A132.45,132.45,0,0,1,128,227.82a132.23,132.23,0,0,1-41.71-23.11C58.23,181.63,44,150.44,44,112V56a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-41.17-10.83a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17Z"}))]]),r=l.forwardRef((e,t)=>l.createElement(n.A,{ref:t,...e,weights:s}));r.displayName="ShieldCheckIcon";let i=r},14570:(e,t,a)=>{"use strict";a.d(t,{z:()=>i});var l=a(80351),n=a(3674);let s=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),l.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z"}))]]),r=l.forwardRef((e,t)=>l.createElement(n.A,{ref:t,...e,weights:s}));r.displayName="DownloadSimpleIcon";let i=r},17773:(e,t,a)=>{"use strict";a.d(t,{default:()=>er});var l=a(48503),n=a(80351),s=a(3674);let r=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M192.49,167.51a12,12,0,0,1,0,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L140,179V128a12,12,0,0,1,24,0v51l11.51-11.52A12,12,0,0,1,192.49,167.51ZM160,36A92.08,92.08,0,0,0,79,84.37,68,68,0,1,0,72,220H84a12,12,0,0,0,0-24H72a44,44,0,0,1-1.81-87.95A91.7,91.7,0,0,0,68,128a12,12,0,0,0,24,0,68,68,0,0,1,136,0,67.27,67.27,0,0,1-7.25,30.59,12,12,0,1,0,21.42,10.82A91.08,91.08,0,0,0,252,128,92.1,92.1,0,0,0,160,36Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,128a80,80,0,0,1-80,80H72A56,56,0,1,1,85.92,97.74l0,.1A80,80,0,0,1,240,128Z",opacity:"0.2"}),n.createElement("path",{d:"M248,128a87.34,87.34,0,0,1-17.6,52.81,8,8,0,1,1-12.8-9.62A71.34,71.34,0,0,0,232,128a72,72,0,0,0-144,0,8,8,0,0,1-16,0,88,88,0,0,1,3.29-23.88C74.2,104,73.1,104,72,104a48,48,0,0,0,0,96H96a8,8,0,0,1,0,16H72A64,64,0,1,1,81.29,88.68,88,88,0,0,1,248,128Zm-69.66,42.34L160,188.69V128a8,8,0,0,0-16,0v60.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M247.93,124.52C246.11,77.54,207.07,40,160.06,40A88.1,88.1,0,0,0,81.29,88.67h0A87.48,87.48,0,0,0,72,127.73,8.18,8.18,0,0,1,64.57,136,8,8,0,0,1,56,128a103.66,103.66,0,0,1,5.34-32.92,4,4,0,0,0-4.75-5.18A64.09,64.09,0,0,0,8,152c0,35.19,29.75,64,65,64H160A88.09,88.09,0,0,0,247.93,124.52Zm-50.27,25.14-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L152,156.69V96a8,8,0,0,1,16,0v60.69l18.34-18.35a8,8,0,0,1,11.32,11.32Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M246,128a85.27,85.27,0,0,1-17.2,51.6,6,6,0,1,1-9.6-7.2A74,74,0,1,0,86,128a6,6,0,0,1-12,0,85.54,85.54,0,0,1,3.91-25.64A50.68,50.68,0,0,0,72,102a50,50,0,0,0,0,100H96a6,6,0,0,1,0,12H72A62,62,0,1,1,82.43,90.88,86,86,0,0,1,246,128Zm-66.24,43.76L158,193.51V128a6,6,0,0,0-12,0v65.51l-21.76-21.75a6,6,0,0,0-8.48,8.48l32,32a6,6,0,0,0,8.48,0l32-32a6,6,0,0,0-8.48-8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M248,128a87.34,87.34,0,0,1-17.6,52.81,8,8,0,1,1-12.8-9.62A71.34,71.34,0,0,0,232,128a72,72,0,0,0-144,0,8,8,0,0,1-16,0,88,88,0,0,1,3.29-23.88C74.2,104,73.1,104,72,104a48,48,0,0,0,0,96H96a8,8,0,0,1,0,16H72A64,64,0,1,1,81.29,88.68,88,88,0,0,1,248,128Zm-69.66,42.34L160,188.69V128a8,8,0,0,0-16,0v60.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M244,128a83.28,83.28,0,0,1-16.8,50.4,4,4,0,1,1-6.4-4.8A76,76,0,1,0,84,128a4,4,0,0,1-8,0,83.45,83.45,0,0,1,4.57-27.27A52,52,0,1,0,72,204H96a4,4,0,0,1,0,8H72A60,60,0,1,1,83.61,93.13,84,84,0,0,1,244,128Zm-62.83,45.17L156,198.34V128a4,4,0,0,0-8,0v70.34l-25.17-25.17a4,4,0,0,0-5.66,5.66l32,32a4,4,0,0,0,5.66,0l32-32a4,4,0,0,0-5.66-5.66Z"}))]]),i=n.forwardRef((e,t)=>n.createElement(s.A,{ref:t,...e,weights:r}));i.displayName="CloudArrowDownIcon";var c=a(68007),o=a(81528),d=a(3604),m=a(33796),u=a(47585),p=a(41694),h=a(45072),x=a(18379),g=a(23370),v=a(12871),f=a(85933),b=a(45070),j=a(68926),k=a(61151),A=a(9481),y=a(40255),N=a(78750);let w=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M160,36A92.09,92.09,0,0,0,79,84.36,68,68,0,1,0,72,220h88a92,92,0,0,0,0-184Zm0,160H72a44,44,0,0,1-1.82-88A91.86,91.86,0,0,0,68,128a12,12,0,0,0,24,0,68,68,0,1,1,68,68Zm32.49-79.51L177,132l15.52,15.51a12,12,0,0,1-17,17L160,149l-15.51,15.52a12,12,0,1,1-17-17L143,132l-15.52-15.51a12,12,0,1,1,17-17L160,115l15.51-15.52a12,12,0,0,1,17,17Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,127.62a80,80,0,0,1-80,80H72A56,56,0,1,1,85.92,97.36l0,.1A80,80,0,0,1,240,127.62Z",opacity:"0.2"}),n.createElement("path",{d:"M160,40A88.09,88.09,0,0,0,81.29,88.67,64,64,0,1,0,72,216h88a88,88,0,0,0,0-176Zm0,160H72a48,48,0,0,1,0-96c1.1,0,2.2,0,3.29.11A88,88,0,0,0,72,128a8,8,0,0,0,16,0,72,72,0,1,1,72,72Zm29.66-82.34L171.31,136l18.35,18.34a8,8,0,0,1-11.32,11.32L160,147.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L148.69,136l-18.35-18.34a8,8,0,0,1,11.32-11.32L160,124.69l18.34-18.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M247.93,124.52C246.11,77.54,207.07,40,160.06,40A88.1,88.1,0,0,0,81.29,88.67h0A87.48,87.48,0,0,0,72,127.73,8.18,8.18,0,0,1,64.57,136,8,8,0,0,1,56,128a103.66,103.66,0,0,1,5.34-32.92,4,4,0,0,0-4.75-5.18A64.09,64.09,0,0,0,8,152c0,35.19,29.75,64,65,64H160A88.09,88.09,0,0,0,247.93,124.52Zm-58.27,29.82a8,8,0,0,1-11.32,11.32L160,147.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L148.69,136l-18.35-18.34a8,8,0,0,1,11.32-11.32L160,124.69l18.34-18.35a8,8,0,0,1,11.32,11.32L171.31,136Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M160,42A86.11,86.11,0,0,0,82.43,90.88,62,62,0,1,0,72,214h88a86,86,0,0,0,0-172Zm0,160H72a50,50,0,0,1,0-100,50.67,50.67,0,0,1,5.91.35A85.61,85.61,0,0,0,74,128a6,6,0,0,0,12,0,74,74,0,1,1,74,74Zm28.24-85.76L168.48,136l19.76,19.76a6,6,0,1,1-8.48,8.48L160,144.48l-19.76,19.76a6,6,0,0,1-8.48-8.48L151.52,136l-19.76-19.76a6,6,0,0,1,8.48-8.48L160,127.52l19.76-19.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M160,40A88.09,88.09,0,0,0,81.29,88.67,64,64,0,1,0,72,216h88a88,88,0,0,0,0-176Zm0,160H72a48,48,0,0,1,0-96c1.1,0,2.2,0,3.29.11A88,88,0,0,0,72,128a8,8,0,0,0,16,0,72,72,0,1,1,72,72Zm29.66-82.34L171.31,136l18.35,18.34a8,8,0,0,1-11.32,11.32L160,147.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L148.69,136l-18.35-18.34a8,8,0,0,1,11.32-11.32L160,124.69l18.34-18.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M160,44A84.11,84.11,0,0,0,83.59,93.12,60.71,60.71,0,0,0,72,92a60,60,0,0,0,0,120h88a84,84,0,0,0,0-168Zm0,160H72a52,52,0,1,1,8.55-103.3A83.66,83.66,0,0,0,76,128a4,4,0,0,0,8,0,76,76,0,1,1,76,76Zm26.83-89.17L165.66,136l21.17,21.17a4,4,0,0,1-5.66,5.66L160,141.66l-21.17,21.17a4,4,0,0,1-5.66-5.66L154.34,136l-21.17-21.17a4,4,0,0,1,5.66-5.66L160,130.34l21.17-21.17a4,4,0,1,1,5.66,5.66Z"}))]]),C=n.forwardRef((e,t)=>n.createElement(s.A,{ref:t,...e,weights:w}));C.displayName="CloudXIcon";var S=a(90368),E=a(18781),Z=a(2439);let L=(0,Z.createServerReference)("40dba91a3d91396aa28ffb045260f2f273e13cb132",Z.callServer,void 0,Z.findSourceMapURL,"deleteSkillAction"),M=(0,Z.createServerReference)("4083458a938c278255f90a373c6f22090fa9a1a292",Z.callServer,void 0,Z.findSourceMapURL,"uninstallCommunitySkillAction"),R="flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden rounded-full";function H({avatars:e,max:t=5,label:a,className:n=""}){if(0===e.length)return a?(0,l.jsx)("span",{className:`text-medium-13 leading-none! text-ink-3 ${n}`,children:a}):null;let s=e.slice(0,t),r=e.length-s.length;return(0,l.jsxs)("span",{className:`inline-flex items-center gap-2.5 ${n}`,children:[(0,l.jsxs)("span",{className:"inline-flex gap-0.5",children:[s.map(e=>(0,l.jsx)("span",{className:`${R} bg-agent-vivid text-mono-11-caps text-[#0a0a0a]`,title:e.name,children:e.avatarUrl?(0,l.jsx)("img",{src:e.avatarUrl,alt:"",className:"h-full w-full object-cover"}):function(e){let t=e.trim();if(!t)return"?";let a=t.split(/\s+/);return a.length>=2?((a[0][0]??"")+(a[1][0]??"")).toUpperCase():t.slice(0,2).toUpperCase()}(e.name)},e.id)),r>0&&(0,l.jsxs)("span",{className:`${R} bg-hover text-mono-11-caps text-ink-3`,children:["+",r]})]}),a&&(0,l.jsx)("span",{className:"text-medium-13 leading-none! text-ink-3",children:a})]})}var V=a(51261),$=a(60128),F=a(45678),U=a(75551),T=a(88937),z=a(94480);let D=(0,Z.createServerReference)("400093dc77c1f86c93ae662498490008573e4c65e5",Z.callServer,void 0,Z.findSourceMapURL,"previewCommunitySkillUpdateAction"),I=(0,Z.createServerReference)("60397e84fe085de776dd4536d028f3003da17af850",Z.callServer,void 0,Z.findSourceMapURL,"updateCommunitySkillAction"),_=(0,Z.createServerReference)("40da7e995ab616a8434ba1ad9ea19cb2828934e8f5",Z.callServer,void 0,Z.findSourceMapURL,"acknowledgeSkillUpdateAction"),q={" ":"same","+":"add","-":"remove"};function B({preview:e}){var t,a;let n=(t=e.currentContent,a=e.upstreamContent,(0,o.CNy)(t,a).lines.map(e=>({op:q[e.kind],text:e.text}))),s=function(e){let t=0,a=0;for(let l of e)"add"===l.op?t++:"remove"===l.op&&a++;return{added:t,removed:a}}(n),r=function(e,t=3){let a=Array(e.length).fill(!1);for(let l=0;l<e.length;l++)if("same"!==e[l].op)for(let n=Math.max(0,l-t);n<=Math.min(e.length-1,l+t);n++)a[n]=!0;let l=[],n=!1;for(let t=0;t<e.length;t++)a[t]?(l.push(e[t]),n=!1):n||(l.push(null),n=!0);return l}(n);return(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-body-12 text-ink-3",children:[(0,l.jsxs)("span",{className:"text-ok",children:["+",s.added]}),(0,l.jsxs)("span",{className:"text-err",children:["−",s.removed]}),e.scriptsChanged&&(0,l.jsx)("span",{className:"text-warn",children:"bundled scripts changed"}),e.contentOverridden&&(0,l.jsx)("span",{children:"your local edits are kept — only the upstream baseline updates"})]}),0===s.added&&0===s.removed?(0,l.jsxs)("p",{className:"text-body-13 text-ink-3",children:["The skill text is identical. ",e.scriptsChanged?"Only scripts changed.":""]}):(0,l.jsx)("pre",{className:"max-h-80 overflow-auto rounded-md bg-hover px-3 py-2 text-mono-12 leading-[1.5]! whitespace-pre",children:r.map((e,t)=>null===e?(0,l.jsx)("div",{className:"text-ink-4",children:" ⋯"},t):(0,l.jsx)("div",{className:"add"===e.op?"bg-ok-bg text-ok":"remove"===e.op?"bg-warn-bg text-err":"text-ink-3",children:("add"===e.op?"+ ":"remove"===e.op?"− ":" ")+e.text},t))}),e.scriptNames.length>0&&(0,l.jsxs)("p",{className:"text-body-12 text-ink-4",children:["Bundled scripts: ",e.scriptNames.join(", "),". Their contents are not shown here — read them in the skill store before re-authorizing."]})]})}function O({slug:e,name:t,updateDetail:a,hasScripts:s,children:r}){let i,[c,o]=(0,n.useState)(!1),[d,m]=(0,n.useState)(null),[u,p]=(0,n.useState)(!1),[h,x]=(0,n.useTransition)();return(0,l.jsxs)(l.Fragment,{children:[r({onClick:function(){p(!0),D(e).then(e=>{(p(!1),e.ok)?(m(e.data),o(!0)):j.oR.error(e.message)})},pending:h||u}),(0,l.jsx)(F.A,{open:c,title:`Update skill "${t}"?`,message:(i=a?.scriptsState==="conflict"?' Your locally edited scripts will be replaced. Use "Keep your version" to keep them instead.':"",`This text goes into the system prompt of every agent using this skill.${i}${s?" Script changes revoke this skill's run authorization for every agent until you re-approve it.":""}`),confirmLabel:"Install this version",destructive:a?.scriptsState==="conflict",extra:d?(0,l.jsx)(B,{preview:d}):null,onConfirm:function(){o(!1);let a=d?.upstreamContentHash;x(async()=>{let l=await I(e,a);if(m(null),!l.ok)return void j.oR.error(l.message);let n=l.data.scriptsAuthorizationRevoked;n>0?j.oR.success(`"${t}" updated. Script authorization revoked for ${n} agent${1===n?"":"s"}, re-approve to keep running scripts.`):j.oR.success(`"${t}" updated.`)})},onCancel:()=>{o(!1),m(null)}})]})}function K({slug:e,name:t,children:a}){let[s,r]=(0,n.useState)(!1),[i,c]=(0,n.useTransition)();return(0,l.jsxs)(l.Fragment,{children:[a({onClick:()=>r(!0),pending:i}),(0,l.jsx)(F.A,{open:s,title:`Keep your version of "${t}"?`,message:"Keeps your edited scripts exactly as they are and clears the update flag. It comes back only if upstream changes again. Script authorizations are untouched.",confirmLabel:"Keep mine",destructive:!1,onConfirm:function(){r(!1),c(async()=>{let a=await _(e);a.ok?a.data.contentChanged?j.oR.success(`"${t}": your scripts are kept. A content update is still available.`):j.oR.success(`"${t}": your scripts are kept.`):j.oR.error(a.message)})},onCancel:()=>r(!1)})]})}function P({segments:e,agents:t}){return(0,l.jsxs)(E.Ay,{children:[(0,l.jsxs)(E.D1,{children:[(0,l.jsx)(E.Th,{children:"Skill"}),(0,l.jsx)(E.Th,{children:"Assigned to"}),(0,l.jsx)(E.Th,{children:"Required built-ins"}),(0,l.jsx)(E.Th,{align:"right",children:"Actions"})]}),(0,l.jsx)("tbody",{children:e.map(e=>(0,l.jsxs)(n.Fragment,{children:[(0,l.jsx)(E.mi,{label:e.label,count:e.skills.length,dot:e.dot,colSpan:4}),e.skills.map(e=>(0,l.jsx)(Y,{skill:e,agents:t},e.id))]},e.key))})]})}function Y({skill:e,agents:t}){let[a,s]=(0,n.useState)(!1),[r,i]=(0,n.useState)(!1),[c,o]=(0,n.useState)(!1),[d,m]=(0,n.useState)(!1),[u,p]=(0,n.useTransition)();return(0,l.jsxs)(E.Tr,{children:[(0,l.jsx)(E.Td,{children:(0,l.jsx)("div",{className:"flex items-center gap-3",children:(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-medium-13 leading-[1.2]! text-ink",children:e.name}),e.isCommunity&&e.updateAvailable&&(0,l.jsx)($.A,{variant:"warn",label:"Update available"})]}),(0,l.jsx)("div",{className:"mt-0.5 line-clamp-2 max-w-[460px] text-body-12 leading-[1.3]! text-ink-3",title:e.description??e.slug,children:e.description??(0,l.jsx)("span",{className:"font-mono text-ink-4",children:e.slug})})]})})}),(0,l.jsx)(E.Td,{children:e.assignmentCount>0?(0,l.jsx)(H,{avatars:e.assignedAgents,max:4,label:`${e.assignmentCount} ${1===e.assignmentCount?"agent":"agents"}`}):(0,l.jsx)("span",{className:"text-mono-11 text-ink-4",children:"Unassigned"})}),(0,l.jsx)(E.Td,{children:e.requiredBuiltins.length>0?(0,l.jsx)(V.A,{items:e.requiredBuiltins,noun:"built-in"}):(0,l.jsx)("span",{className:"text-mono-11 text-ink-4",children:"none"})}),(0,l.jsxs)(E.Td,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[e.isCommunity&&e.updateAvailable&&(0,l.jsx)(O,{slug:e.slug,name:e.name,updateDetail:e.updateDetail,hasScripts:!!(e.installedScripts&&e.installedScripts.length>0),children:({onClick:t,pending:a})=>(0,l.jsx)(U.A,{square:!0,icon:(0,l.jsx)(k.S,{size:16}),title:e.updateDetail?.scriptsState==="conflict"?"Update available (replaces your edited scripts)":"Update available",disabled:a,onClick:t})}),e.isCommunity&&e.updateAvailable&&e.updateDetail?.scriptsState==="conflict"&&(0,l.jsx)(K,{slug:e.slug,name:e.name,children:({onClick:e,pending:t})=>(0,l.jsx)(U.A,{square:!0,icon:(0,l.jsx)(A.o,{size:16}),title:"Keep your version",disabled:t,onClick:e})}),(0,l.jsx)(U.A,{square:!0,icon:(0,l.jsx)(y.y,{size:16}),title:"Assign to agents",onClick:()=>o(!0)}),(0,l.jsx)(U.A,{square:!0,icon:(0,l.jsx)(N.I,{size:16}),title:"Edit",onClick:()=>m(!0)}),!e.isSystem&&e.isCommunity&&(0,l.jsx)(U.A,{square:!0,icon:(0,l.jsx)(C,{size:16}),title:"Uninstall",tone:"danger",disabled:u,onClick:()=>i(!0)}),!e.isSystem&&(0,l.jsx)(U.A,{square:!0,icon:(0,l.jsx)(S.l,{size:16}),title:"Delete",tone:"danger",disabled:u,onClick:()=>s(!0)})]}),(0,l.jsx)(F.A,{open:a,title:`Delete skill "${e.name}"?`,message:"The skill and all its agent assignments will be removed. Existing job logs are kept.",confirmLabel:"Delete",onConfirm:()=>{s(!1),p(async()=>{let t=await L(e.id);t.ok?j.oR.success("Skill deleted"):j.oR.error(t.message)})},onCancel:()=>s(!1)}),(0,l.jsx)(F.A,{open:r,title:`Uninstall community skill "${e.name}"?`,message:"The skill and all its agent assignments will be removed. You can reinstall it at any time from the same source.",confirmLabel:"Uninstall",onConfirm:()=>{i(!1),p(async()=>{let t=await M(e.slug);t.ok?j.oR.success(`Skill "${e.name}" uninstalled`):j.oR.error(t.message)})},onCancel:()=>i(!1)}),(0,l.jsx)(T.A,{open:c,onClose:()=>o(!1),skill:e,agents:t}),(0,l.jsx)(b.A,{open:d,onClose:()=>m(!1),title:e.name,dismissable:!1,className:"max-w-3xl",children:(0,l.jsx)(z.default,{mode:"edit",initial:e,onClose:()=>m(!1)})})]})]})}var G=a(73573),W=a(14570);let X=(0,Z.createServerReference)("4063c6465933dd4621e3c8ed37e05ba6efcfcb822e",Z.callServer,void 0,Z.findSourceMapURL,"installCommunitySkillAction");var J=a(73230),Q=a(82899);function ee({installedSkills:e,query:t="",category:a="All"}){let n=new Map(e.map(e=>[e.slug,e])),s=t.trim().toLowerCase(),r=o.EBd;return("All"!==a&&(r=r.filter(e=>e.category===a)),s&&(r=r.filter(e=>e.name.toLowerCase().includes(s)||e.description.toLowerCase().includes(s)||e.category.toLowerCase().includes(s))),0===r.length)?(0,l.jsx)(f.A,{title:"No community skills match your search."}):(0,l.jsx)("div",{className:"grid auto-rows-fr grid-cols-1 gap-3.5 sm:grid-cols-2 lg:grid-cols-3",children:r.map(e=>(0,l.jsx)(et,{entry:e,installed:n.get(e.slug)??null},e.slug))})}function et({entry:e,installed:t}){let a=(0,G.useRouter)(),[s,r]=(0,n.useTransition)(),[i,c]=(0,n.useState)(!1),o=null!==t||i,d=(0,l.jsx)("span",{className:"cursor-help text-mono-12 text-ink-4",title:e.source.split("/").slice(0,2).join("/"),children:("skills-sh"===e.sourceHost?"Skills.sh":"GitHub").toLowerCase()});return(0,l.jsx)(J.A,{name:e.name,description:e.description,category:e.category,foot:o?t?.updateAvailable?(0,l.jsx)(O,{slug:e.slug,name:e.name,updateDetail:t.updateDetail,hasScripts:t.hasScripts,children:({onClick:e,pending:a})=>(0,l.jsx)(Q.A,{status:(0,l.jsx)($.A,{variant:"warn",label:t.updateDetail?.scriptsState==="conflict"?"Update conflicts with your edits":"Update available"}),ctaLabel:a?"Updating…":"Update",ctaVariant:"coral",icon:(0,l.jsx)(k.S,{size:12,weight:"bold"}),onCta:a?void 0:e})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"min-w-0 flex-1 truncate",children:d}),(0,l.jsx)("span",{className:"inline-flex h-[30px] shrink-0 items-center rounded-[7px] border border-rule bg-paper px-3 text-medium-13 text-ink-4",children:"Installed"})]}):(0,l.jsx)(Q.A,{status:d,ctaLabel:s?"Installing…":"Install",ctaVariant:"coral",icon:(0,l.jsx)(W.z,{size:12,weight:"bold"}),onCta:s?void 0:function(){r(async()=>{let t=await X(e.source);t.ok?(c(!0),j.oR.success(`${e.name} installed — assign it to an agent`),a.refresh()):j.oR.error(t.message)})}})})}var ea=a(58205),el=a(9594);function en({open:e,onClose:t}){let a=(0,G.useRouter)(),[s,r]=(0,n.useState)(""),[i,c]=(0,n.useTransition)(),[o,d]=(0,n.useState)(null),[m,u]=(0,n.useState)(null);function p(){r(""),d(null),u(null),t()}function h(){s.trim()&&(d(null),u(null),c(async()=>{let e=await X(s.trim());if(!e.ok){u(e.message),j.oR.error(e.message);return}d(e.data),j.oR.success(e.data.reinstalled?`Skill "${e.data.name}" reinstalled`:`Skill "${e.data.name}" installed`),a.refresh()}))}return(0,l.jsx)(b.A,{open:e,onClose:p,title:"Install community skill",dismissable:!1,footer:(0,l.jsxs)(b.j,{children:[(0,l.jsx)(v.A,{variant:"neutral",onClick:p,children:o?"Close":"Cancel"}),!o&&(0,l.jsx)(v.A,{variant:"coral",onClick:h,disabled:i||!s.trim(),children:i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"h-3.5 w-3.5 animate-spin rounded-full border-2 border-white/30 border-t-white"}),"Installing…"]}):"Install"})]}),children:(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"flex gap-2.5 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3.5 py-3",children:[(0,l.jsx)(ea.N,{size:16,weight:"fill",className:"mt-[1px] shrink-0 text-amber-400"}),(0,l.jsx)("p",{className:"text-body-13 leading-[1.5]! text-amber-300",children:"Only install skills from sources you trust - a skill's instructions run with your agent's tools."})]}),(0,l.jsxs)("div",{className:"space-y-1.5",children:[(0,l.jsx)("label",{htmlFor:"skill-source",className:"block text-medium-13 text-ink-2",children:"Source"}),(0,l.jsx)(el.A,{id:"skill-source",type:"text",value:s,onChange:e=>r(e.target.value),onKeyDown:e=>{"Enter"!==e.key||i||h()},placeholder:"owner/repo, GitHub URL, or skills.sh path",disabled:i})]}),m&&!o&&(0,l.jsx)("div",{className:"rounded-lg border border-err/30 bg-err/10 px-3.5 py-3",children:(0,l.jsx)("p",{className:"text-body-13 leading-[1.5]! text-err",children:m})}),o&&(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"rounded-lg border border-ok/30 bg-ok/10 px-3.5 py-3",children:[(0,l.jsxs)("p",{className:"text-medium-13 leading-[1.5]! text-ok",children:[o.reinstalled?"Reinstalled":"Installed",":"," ",(0,l.jsx)("span",{className:"font-semibold",children:o.name})]}),o.description&&(0,l.jsx)("p",{className:"mt-1 text-body-13 leading-[1.4]! text-ok/70",children:o.description})]}),o.installedScripts.length>0&&(0,l.jsx)("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/10 px-3.5 py-3",children:(0,l.jsxs)("div",{className:"flex gap-2.5",children:[(0,l.jsx)(ea.N,{size:15,weight:"fill",className:"mt-[1px] shrink-0 text-amber-400"}),(0,l.jsxs)("div",{className:"space-y-1.5",children:[(0,l.jsx)("p",{className:"text-medium-13 leading-[1.4]! text-amber-300",children:"This skill bundles executable scripts."}),(0,l.jsxs)("p",{className:"text-body-13 leading-[1.4]! text-amber-300/80",children:["They run only for an agent that has the"," ",(0,l.jsx)("span",{className:"font-mono",children:"command-execution"})," capability and only after you authorize them, and every run is gated by your approval. Otherwise just the skill's instructions are used."]}),(0,l.jsx)("ul",{className:"mt-2 space-y-0.5",children:o.installedScripts.map(e=>(0,l.jsxs)("li",{className:"flex items-center gap-2 text-mono-12 text-amber-300/70",children:[(0,l.jsx)("span",{className:"rounded bg-amber-500/20 px-1.5 py-0.5 text-legacy-11 uppercase",children:e.language}),(0,l.jsx)("span",{className:"truncate",children:e.path})]},e.path))})]})]})})]})]})})}let es=["All",...Array.from(new Set(o.EBd.map(e=>e.category)))];function er({skills:e,agents:t}){let a=(0,n.useMemo)(()=>e.filter(e=>!(0,d.B)(e)),[e]),s=(0,n.useMemo)(()=>e.filter(e=>e.isCommunity).map(e=>({slug:e.slug,updateAvailable:e.updateAvailable,updateDetail:e.updateDetail,hasScripts:!!(e.installedScripts&&e.installedScripts.length>0)})),[e]),[r,j]=(0,n.useState)("workspace"),[k,A]=(0,n.useState)("All"),[y,N]=(0,n.useState)(""),[w,C]=(0,n.useState)(!1),[S,E]=(0,n.useState)(!1),Z=(0,n.useMemo)(()=>{let e=y.trim().toLowerCase(),t=e?a.filter(t=>t.name.toLowerCase().includes(e)||(t.description??"").toLowerCase().includes(e)):a;return(0,m.Yu)(t)},[a,y]);return(0,l.jsxs)(u.A,{title:"Skills",subtitle:`${e.length} reusable instructions`,toolbar:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p.A,{tabs:(0,l.jsx)(h.A,{value:r,onChange:e=>{j(e),N("")},tabs:[{value:"workspace",label:"Workspace",count:a.length},{value:"community",label:"Community",count:o.EBd.length}]}),search:(0,l.jsx)(g.A,{value:y,onChange:N,placeholder:"Search skill…"}),cta:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)(v.A,{variant:"neutral",onClick:()=>C(!0),className:"!border-black/10 !bg-white !text-[#161616] hover:!bg-[#f2f2f2]",children:[(0,l.jsx)(i,{size:13,weight:"bold"}),"Install skill"]}),(0,l.jsxs)(v.A,{variant:"coral",onClick:()=>E(!0),children:[(0,l.jsx)(c.F,{size:13,weight:"bold"}),"New Skill"]})]})}),"community"===r&&(0,l.jsx)(x.A,{className:"mt-3",value:k,onChange:A,items:es.map(e=>({value:e,label:e}))})]}),children:[(0,l.jsx)(en,{open:w,onClose:()=>C(!1)}),(0,l.jsx)(b.A,{open:S,onClose:()=>E(!1),title:"New skill",dismissable:!1,className:"max-w-3xl",children:(0,l.jsx)(z.default,{mode:"create",defaultOpen:!0,onClose:()=>E(!1)})}),"workspace"===r?0===Z.length?(0,l.jsx)(f.A,{title:y.trim()?"No skill matches your search.":"No skills on this workspace yet. Browse the Community tab to install one."}):(0,l.jsx)(P,{segments:Z,agents:t}):(0,l.jsx)(ee,{installedSkills:s,query:y,category:k})]})}},18379:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var l=a(48503);function n({items:e,value:t,onChange:a,className:s=""}){return(0,l.jsx)("div",{className:`flex flex-wrap items-center gap-2 ${s}`,children:e.map(e=>{let n=e.value===t;return(0,l.jsxs)("button",{type:"button",onClick:()=>a(e.value),className:`inline-flex h-8 items-center gap-1.5 rounded-[9px] border px-3.5 text-medium-13 leading-none! transition-colors ${n?"border-ink bg-ink text-canvas":"border-rule-2 bg-paper text-ink-2 hover:bg-hover"}`,children:[e.label,void 0!==e.count&&(0,l.jsx)("span",{className:`text-mono-12 leading-none! ${n?"opacity-65":"opacity-55"}`,children:e.count})]},e.value)})})}},18781:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>n,D1:()=>s,Td:()=>c,Th:()=>r,Tr:()=>i,mi:()=>o});var l=a(48503);function n({children:e,frame:t=!0,className:a=""}){let s=(0,l.jsx)("table",{className:`w-full border-collapse text-sm ${a}`,children:e});return t?(0,l.jsx)("div",{className:"overflow-hidden rounded-2xl border border-rule-2 bg-paper",children:(0,l.jsx)("div",{className:"overflow-x-auto",children:s})}):s}function s({children:e}){return(0,l.jsx)("thead",{children:(0,l.jsx)("tr",{children:e})})}function r({children:e,align:t="left",className:a=""}){return(0,l.jsx)("th",{scope:"col",className:`border-b border-rule-2 px-5 py-3 text-label-11 uppercase tracking-wider whitespace-nowrap text-ink-4 ${"right"===t?"text-right":"text-left"} ${a}`,children:e})}function i({children:e,interactive:t=!1,hover:a=!0,className:n="",onClick:s,title:r,style:c,"aria-expanded":o,"data-testid":d}){return(0,l.jsx)("tr",{onClick:s,title:r,style:c,"aria-expanded":o,"data-testid":d,className:`border-b border-rule-2 transition-colors last:border-0 ${a?"hover:bg-hover":""} ${t?"cursor-pointer":""} ${n}`,children:e})}function c({children:e,align:t="left",top:a=!1,colSpan:n,className:s="",onClick:r,style:i,"data-testid":o}){return(0,l.jsx)("td",{colSpan:n,onClick:r,style:i,"data-testid":o,className:`px-5 py-3.5 ${a?"align-top":"align-middle"} ${"right"===t?"text-right":""} ${s}`,children:e})}function o({label:e,count:t,dot:a,colSpan:n}){return(0,l.jsx)("tr",{className:"border-b border-rule-2 bg-canvas/40",children:(0,l.jsx)("td",{colSpan:n,className:"px-5 py-2.5",children:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:`h-1.5 w-1.5 rounded-full ${a}`,"aria-hidden":!0}),(0,l.jsx)("span",{className:"text-medium-13 text-ink",children:e}),(0,l.jsx)("span",{className:"text-mono-11 text-ink-4",children:t})]})})})}},23370:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(48503),n=a(78936);function s({value:e,onChange:t,placeholder:a="Search…",minWidth:r=300,ariaLabel:i,testId:c,className:o=""}){return(0,l.jsxs)("div",{className:`flex h-[34px] items-center gap-2 rounded-[9px] border border-rule-2 bg-paper px-3 text-body-13 text-ink-4 ${o}`,style:{minWidth:r},children:[(0,l.jsx)(n.e,{size:13,className:"shrink-0"}),(0,l.jsx)("input",{type:"search",value:e,onChange:e=>t(e.target.value),placeholder:a,"aria-label":i,"data-testid":c,className:"flex-1 border-0 bg-transparent text-body-14 leading-none! text-ink outline-none placeholder:text-ink-4"})]})}},33796:(e,t,a)=>{"use strict";function l(e){return e.isCommunity?"community":"agent"===e.createdBy?"learned":"user"===e.createdBy?"custom":"builtin"}a.d(t,{Yu:()=>r,cl:()=>l});let n={community:{label:"Community",dot:"bg-skill-vivid"},custom:{label:"Custom",dot:"bg-ink-3"},learned:{label:"Learned",dot:"bg-agent-vivid"},builtin:{label:"Built-in",dot:"bg-ink-4"}},s=["community","custom","learned","builtin"];function r(e){return s.map(t=>({key:t,...n[t],skills:e.filter(e=>l(e)===t).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.skills.length>0)}},38032:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(48503);let n={agent:"bg-agent-vivid text-[#0a0a0a]",skill:"bg-skill-vivid text-white",conn:"bg-conn-vivid text-white",ink:"bg-ink text-canvas",neutral:"bg-hover text-ink-3"},s={sm:"h-[30px] w-[30px]",md:"h-[34px] w-[34px]",lg:"h-[38px] w-[38px]",xl:"h-[42px] w-[42px]"},r={sm:"[&_svg]:h-[13px] [&_svg]:w-[13px]",md:"[&_svg]:h-[14px] [&_svg]:w-[14px]",lg:"[&_svg]:h-[16px] [&_svg]:w-[16px]",xl:"[&_svg]:h-[18px] [&_svg]:w-[18px]"};function i({variant:e,size:t="md",shape:a="round",background:c,children:o,className:d=""}){let m=c?"":n[e];return(0,l.jsx)("span",{style:c?{background:c}:void 0,className:`inline-flex shrink-0 items-center justify-center ${s[t]} ${r[t]} ${"round"===a?"rounded-full":"rounded-[9px]"} ${m} ${c?"text-white":""} ${d}`,children:o})}},40255:(e,t,a)=>{"use strict";a.d(t,{y:()=>i});var l=a(80351),n=a(3674);let s=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M256,136a12,12,0,0,1-12,12h-8v8a12,12,0,0,1-24,0v-8h-8a12,12,0,0,1,0-24h8v-8a12,12,0,0,1,24,0v8h8A12,12,0,0,1,256,136Zm-54.81,56.28a12,12,0,1,1-18.38,15.44C169.12,191.42,145,172,108,172c-28.89,0-55.46,12.68-74.81,35.72a12,12,0,0,1-18.38-15.44A124.08,124.08,0,0,1,63.5,156.53a72,72,0,1,1,89,0A124,124,0,0,1,201.19,192.28ZM108,148a48,48,0,1,0-48-48A48.05,48.05,0,0,0,108,148Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M168,100a60,60,0,1,1-60-60A60,60,0,0,1,168,100Z",opacity:"0.2"}),l.createElement("path",{d:"M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136Zm-57.87,58.85a8,8,0,0,1-12.26,10.3C165.75,181.19,138.09,168,108,168s-57.75,13.19-77.87,37.15a8,8,0,0,1-12.25-10.3c14.94-17.78,33.52-30.41,54.17-37.17a68,68,0,1,1,71.9,0C164.6,164.44,183.18,177.07,198.13,194.85ZM108,152a52,52,0,1,0-52-52A52.06,52.06,0,0,0,108,152Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136ZM144,157.68a68,68,0,1,0-71.9,0c-20.65,6.76-39.23,19.39-54.17,37.17A8,8,0,0,0,24,208H192a8,8,0,0,0,6.13-13.15C183.18,177.07,164.6,164.44,144,157.68Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M254,136a6,6,0,0,1-6,6H230v18a6,6,0,0,1-12,0V142H200a6,6,0,0,1,0-12h18V112a6,6,0,0,1,12,0v18h18A6,6,0,0,1,254,136Zm-57.41,60.14a6,6,0,1,1-9.18,7.72C166.9,179.45,138.69,166,108,166s-58.89,13.45-79.41,37.86a6,6,0,0,1-9.18-7.72C35.14,177.41,55,164.48,77,158.25a66,66,0,1,1,62,0C161,164.48,180.86,177.41,196.59,196.14ZM108,154a54,54,0,1,0-54-54A54.06,54.06,0,0,0,108,154Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136Zm-57.87,58.85a8,8,0,0,1-12.26,10.3C165.75,181.19,138.09,168,108,168s-57.75,13.19-77.87,37.15a8,8,0,0,1-12.25-10.3c14.94-17.78,33.52-30.41,54.17-37.17a68,68,0,1,1,71.9,0C164.6,164.44,183.18,177.07,198.13,194.85ZM108,152a52,52,0,1,0-52-52A52.06,52.06,0,0,0,108,152Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M252,136a4,4,0,0,1-4,4H228v20a4,4,0,0,1-8,0V140H200a4,4,0,0,1,0-8h20V112a4,4,0,0,1,8,0v20h20A4,4,0,0,1,252,136Zm-56.94,61.43a4,4,0,0,1-6.12,5.14C168,177.7,139.3,164,108,164s-60,13.7-80.94,38.57a4,4,0,1,1-6.12-5.14c16.71-19.9,38.13-33.13,61.89-38.59a64,64,0,1,1,50.34,0C156.93,164.3,178.35,177.53,195.06,197.43ZM108,156a56,56,0,1,0-56-56A56.06,56.06,0,0,0,108,156Z"}))]]),r=l.forwardRef((e,t)=>l.createElement(n.A,{ref:t,...e,weights:s}));r.displayName="UserPlusIcon";let i=r},45072:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(48503),n=a(80351);function s({tabs:e,value:t,defaultValue:a,onChange:r}){let[i,c]=(0,n.useState)(t??a??e[0].value),o=t??i;return(0,l.jsx)("div",{className:"inline-flex gap-1 rounded-[11px] border border-rule-2 bg-paper p-1",role:"tablist",children:e.map(e=>{let a=e.value===o;return(0,l.jsxs)("button",{type:"button",role:"tab","aria-selected":a,onClick:()=>{void 0===t&&c(e.value),r?.(e.value)},className:`inline-flex h-[30px] items-center gap-2 rounded-lg border-0 px-3.5 text-medium-13 leading-none! transition-colors ${a?"bg-ink text-canvas":"bg-transparent text-ink-3 hover:text-ink-2"}`,children:[e.label,void 0!==e.count&&(0,l.jsxs)("span",{className:`text-mono-12 leading-none! ${a?"opacity-65":"opacity-60"}`,children:["\xb7 ",e.count]})]},e.value)})})}},51261:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(48503),n=a(18859);function s({items:e,noun:t}){let a=e.length;return(0,l.jsxs)("span",{title:e.join("\n"),className:"inline-flex cursor-help items-center gap-1.5 rounded-md border border-rule-2 bg-hover px-2 py-1 text-mono-11 whitespace-nowrap text-ink-2",children:[(0,l.jsx)(n.c,{size:12,weight:"bold",className:"text-ink-4"}),a," ",t,1!==a?"s":""]})}},58205:(e,t,a)=>{"use strict";a.d(t,{N:()=>i});var l=a(80351),n=a(3674),s=a(60709);let r=l.forwardRef((e,t)=>l.createElement(n.A,{ref:t,...e,weights:s.A}));r.displayName="WarningIcon";let i=r},72772:(e,t,a)=>{"use strict";a.d(t,{R:()=>n});var l=a(2439);let n=(0,l.createServerReference)("405be84667c8b7479a6225f1cb7fe66df7749c3d64",l.callServer,void 0,l.findSourceMapURL,"updateSkillAction")},73230:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(48503),n=a(38032);function s({glyph:e,glyphVariant:t="skill",glyphBackground:a,name:r,description:i,category:c,topRight:o,foot:d,className:m=""}){return(0,l.jsxs)("div",{"data-testid":`marketplace-card-${String(r).toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,"data-marketplace-card":"",className:`relative flex h-full min-h-[200px] flex-col gap-1.5 rounded-2xl border border-rule-2 bg-paper p-[18px] ${m}`,children:[o&&(0,l.jsx)("div",{className:"absolute top-3.5 right-3.5 flex items-center gap-1.5",children:o}),e&&(0,l.jsx)("div",{className:"mb-1.5",children:(0,l.jsx)(n.A,{variant:t,background:a,size:"lg",shape:"square",children:e})}),(0,l.jsx)("h3",{className:"text-title-16 leading-[1.2]! tracking-[-0.005em] text-ink",children:r}),i&&(0,l.jsx)("div",{className:"line-clamp-3 text-body-14 leading-[1.4]! text-ink-3",title:"string"==typeof i?i:void 0,children:i}),c&&(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)("span",{className:"inline-flex items-center rounded-full bg-hover px-2.5 py-1 font-mono text-legacy-10 font-medium tracking-[0.1em] text-ink-2 uppercase",children:c})}),d&&(0,l.jsx)("div",{className:"-mx-[18px] mt-auto flex items-center gap-2 border-t border-rule-2 px-[18px] pt-3.5",children:d})]})}},74601:(e,t,a)=>{Promise.resolve().then(a.bind(a,17773)),Promise.resolve().then(a.bind(a,2193)),Promise.resolve().then(a.bind(a,68534)),Promise.resolve().then(a.bind(a,81098))},75839:(e,t,a)=>{"use strict";a.d(t,{f:()=>n});var l=a(2439);let n=(0,l.createServerReference)("403e0bd99ae9d9ba8c065ead612f77a4e02846a42b",l.callServer,void 0,l.findSourceMapURL,"assignSkillAction")},82899:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var l=a(48503),n=a(68007),s=a(12871);function r({status:e,ctaLabel:t,ctaVariant:a="blue",onCta:i,ctaHref:c,secondary:o,icon:d}){let m=d??(0,l.jsx)(n.F,{size:12,weight:"bold"});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"min-w-0 flex-1 truncate text-body-13 whitespace-nowrap text-ink-3",children:e}),o,c?(0,l.jsxs)(s.A,{variant:a,size:"sm",href:c,className:"shrink-0",children:[m,t]}):(0,l.jsxs)(s.A,{variant:a,size:"sm",onClick:i,className:"shrink-0",children:[m,t]})]})}},88937:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var l=a(48503),n=a(80351),s=a(68926),r=a(22208),i=a.n(r),c=a(75839),o=a(96211),d=a(45070),m=a(12871),u=a(7576);function p({open:e,onClose:t,skill:a,agents:n,assign:s=c.f,unassign:r=o._,onToggled:i}){return(0,l.jsx)(d.A,{open:e,onClose:t,title:`Assign "${a.name}"`,footer:(0,l.jsx)(d.j,{children:(0,l.jsx)(m.A,{variant:"neutral",onClick:t,children:"Close"})}),children:(0,l.jsx)(h,{skill:a,agents:n,onClose:t,assign:s,unassign:r,onToggled:i})})}function h({skill:e,agents:t,onClose:a,assign:r,unassign:c,onToggled:o}){let[d,m]=(0,n.useState)(()=>new Set(e.assignedAgents.map(e=>e.id))),[p,x]=(0,n.useTransition)();return 0===t.length?(0,l.jsxs)("div",{className:"space-y-3 py-6 text-center",children:[(0,l.jsx)("p",{className:"text-sm text-ink-3",children:"No agents yet, create one first."}),(0,l.jsx)(i(),{href:"/agents",onClick:a,className:"inline-flex items-center gap-1 text-sm font-medium text-blue-400 underline underline-offset-2 hover:text-blue-300",children:"Go to Agents"})]}):(0,l.jsxs)("div",{className:"space-y-1",children:[(0,l.jsx)("p",{className:"mb-3 text-xs text-ink-3",children:"Toggle to assign or unassign this skill from each agent."}),(0,l.jsx)("div",{className:"divide-y divide-rule-2 overflow-hidden rounded-lg border border-rule-2 bg-canvas/30",children:t.map(t=>{let a=d.has(t.id);return(0,l.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 px-3 py-2.5 transition-colors hover:bg-hover",children:[(0,l.jsx)(u.A,{tone:"skill",checked:a,disabled:p,onChange:()=>{var a;let l;return a=t.id,l=d.has(a),void(m(e=>{let t=new Set(e);return l?t.delete(a):t.add(a),t}),x(async()=>{let t={skillId:e.id,agentId:a},n=l?await c(t):await r(t);if(!n.ok){m(e=>{let t=new Set(e);return l?t.add(a):t.delete(a),t}),s.oR.error(n.message);return}s.oR.success(l?"Skill unassigned":"Skill assigned"),o?.(a,!l)}))}}),(0,l.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,l.jsx)("span",{className:"block truncate text-sm text-ink",children:t.name}),(0,l.jsx)("span",{className:"block truncate text-mono-12 text-ink-3",children:t.slug})]}),(0,l.jsx)("span",{className:`shrink-0 text-medium-12 ${a?"text-ok":"text-ink-4"}`,children:a?"Assigned":"Not assigned"})]},t.id)})})]})}},94480:(e,t,a)=>{"use strict";a.d(t,{default:()=>v});var l=a(48503),n=a(80351),s=a(73573),r=a(68926),i=a(2439);let c=(0,i.createServerReference)("4020a9b5a7e1aa8d8e79d75dc02f58acdd4af67912",i.callServer,void 0,i.findSourceMapURL,"resetSkillToDefaultAction");var o=a(72772);let d=(0,i.createServerReference)("40d8fc8a6eb8a5833c447f09330385f265cca79c69",i.callServer,void 0,i.findSourceMapURL,"createSkillAction");var m=a(45678),u=a(12871),p=a(75551),h=a(9594),x=a(76381),g=a(45070);function v(e){let t="edit"===e.mode,a=(0,s.useRouter)(),[i,v]=(0,n.useState)(t||!0===e.defaultOpen),[f,b]=(0,n.useTransition)(),[j,k]=(0,n.useState)(!1),A=t&&!0===e.initial.contentOverridden&&null!==e.initial.defaultContent;if(!i)return(0,l.jsx)(u.A,{variant:"ink",onClick:()=>v(!0),children:"+ New skill"});let y=t?e.initial:void 0;return(0,l.jsxs)("form",{onSubmit:function(l){l.preventDefault();let n=l.currentTarget,s=new FormData(n);if(t&&"edit"===e.mode){let t={id:e.initial.id,name:s.get("name"),content:s.get("content"),description:s.get("description")||void 0};b(async()=>{let l=await (0,o.R)(t);l.ok?(r.oR.success("Skill updated"),e.onClose?(e.onClose(),a.refresh()):a.push("/skills")):r.oR.error(l.message)})}else b(async()=>{let t=await d({slug:s.get("slug"),name:s.get("name"),content:s.get("content"),description:s.get("description")||void 0});t.ok?(r.oR.success("Skill created"),n.reset(),e.onClose?(e.onClose(),a.refresh()):a.push("/skills")):r.oR.error(t.message)})},className:"bg-paper border border-rule-2 rounded-xl p-5 space-y-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-ink",children:t?"Edit skill":"New skill"}),A&&(0,l.jsx)(p.A,{onClick:()=>k(!0),disabled:f,title:"Restore the catalog default content for this skill",className:"!border-warn/30 !text-warn hover:!bg-warn-bg hover:!text-warn",children:"Reset to default"})]}),(0,l.jsx)(m.A,{open:j,title:"Reset skill to default?",message:"Your customised instructions will be replaced with the catalog default shipped with NodalAI. This cannot be undone.",confirmLabel:"Reset",cancelLabel:"Cancel",destructive:!0,onConfirm:function(){if(!t)return;let l=e.initial.id;k(!1),b(async()=>{let e=await c(l);e.ok?(r.oR.success("Skill reset to default"),a.refresh()):r.oR.error(e.message)})},onCancel:()=>k(!1)}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,l.jsx)(h.A,{id:"skill-slug",label:(0,l.jsxs)(l.Fragment,{children:["Slug ",t&&(0,l.jsx)("span",{className:"text-ink-4",children:"(stable — not editable)"})]}),name:"slug",required:!t,readOnly:t,disabled:t,pattern:t?void 0:"[a-z0-9\\-]+",placeholder:"my-skill",defaultValue:y?.slug,title:t?"Slug is a stable identifier and cannot be changed":void 0,className:t?"cursor-not-allowed font-mono text-ink-3":"font-mono"}),(0,l.jsx)(h.A,{id:"skill-name",label:"Name",name:"name",required:!0,placeholder:"My Skill",defaultValue:y?.name})]}),(0,l.jsx)(h.A,{id:"skill-description",label:(0,l.jsxs)(l.Fragment,{children:["Description ",(0,l.jsx)("span",{className:"text-ink-4",children:"(optional)"})]}),name:"description",maxLength:500,placeholder:"What does this skill teach the agent?",defaultValue:y?.description??""}),(0,l.jsx)(x.A,{id:"skill-content",label:"Instructions",name:"content",required:!0,rows:18,placeholder:"Step-by-step instructions or context the agent gets when this skill is enabled.",defaultValue:y?.content,className:"min-h-[440px] leading-relaxed"}),(0,l.jsxs)(g.j,{className:"-mx-5 -mb-5 mt-1 rounded-b-xl",children:[(0,l.jsx)(u.A,{variant:"neutral",onClick:()=>e.onClose?e.onClose():a.push("/skills"),children:"Cancel"}),(0,l.jsx)(u.A,{variant:"ink",type:"submit",disabled:f,children:f?t?"Saving…":"Creating…":t?"Save changes":"Create skill"})]})]})}},96211:(e,t,a)=>{"use strict";a.d(t,{_:()=>n});var l=a(2439);let n=(0,l.createServerReference)("404009a071b103aeec91382a857f5f320dd19faa17",l.callServer,void 0,l.findSourceMapURL,"unassignSkillAction")}},e=>{e.O(0,[2208,3969,8153,2440,5034,1054,341,5925,4811,9706,7358],()=>e(e.s=74601)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4314],{},_=>{_.O(0,[2208,3969,8153,6937,377,5034,1054,3051,1091,4811,9706,7358],()=>_(_.s=31091)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8210],{},_=>{_.O(0,[2208,3969,8153,6937,377,5034,1054,3051,1091,4811,9706,7358],()=>_(_.s=31091)),_N_E=_.O()}]);