@orgsdk/cli 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/README.md +21 -7
  2. package/bin/orgsdk.mjs +1 -1
  3. package/dist/THIRD_PARTY_NOTICES.txt +278 -0
  4. package/dist/runtime/README.md +9 -7
  5. package/dist/runtime/cli.js +12 -13
  6. package/dist/runtime/client.js +79 -17
  7. package/dist/runtime/contract.js +39 -6
  8. package/dist/runtime/executor-configuration.js +1 -1
  9. package/dist/runtime/isolated-actions.js +4 -5
  10. package/dist/runtime/isolated-worker.js +5 -0
  11. package/dist/runtime/mcp/aliases.js +29 -0
  12. package/dist/runtime/mcp/client.js +239 -0
  13. package/dist/runtime/mcp/contract.js +57 -0
  14. package/dist/runtime/mcp/functions.js +40 -0
  15. package/dist/runtime/mcp/network.js +61 -0
  16. package/dist/runtime/mcp/schema-types.js +35 -0
  17. package/dist/runtime/mcp/transport.js +18 -0
  18. package/dist/runtime/project-data.js +1 -1
  19. package/dist/runtime/register-executor.js +23 -0
  20. package/dist/runtime/runner.js +30 -24
  21. package/dist/runtime/sdk-declarations.js +8 -1
  22. package/dist/runtime/session-job-contract.js +29 -0
  23. package/dist/runtime/session-job.js +256 -0
  24. package/dist/runtime/session-plugin-call.js +33 -0
  25. package/dist/runtime/sessions/manager.js +5 -3
  26. package/dist/runtime/sessions/process.js +3 -3
  27. package/dist/runtime/sessions/session-runtime.js +7 -3
  28. package/dist/runtime/sessions/worker-guard.js +20 -0
  29. package/dist/runtime/spawn-job.js +69 -0
  30. package/dist/runtime/supervisor.js +102 -146
  31. package/dist/runtime/worker.js +48 -45
  32. package/dist/server/{bun-driver-JKOGHIVX.js → bun-driver-DTZUUCI3.js} +1 -1
  33. package/dist/server/{chunk-WCVBLUNL.js → chunk-S5SFX3JM.js} +24 -0
  34. package/dist/server/index.js +2628 -1230
  35. package/dist/server/migrations/0003_remote-mcp.sql +17 -0
  36. package/dist/server/migrations/meta/0003_snapshot.json +3395 -0
  37. package/dist/server/migrations/meta/_journal.json +7 -0
  38. package/dist/server/{node-driver-FRDSYDBU.js → node-driver-HDJKKWXQ.js} +1 -1
  39. package/dist/server/out/404/index.html +1 -1
  40. package/dist/server/out/404.html +1 -1
  41. package/dist/server/out/__next.!KHdvcmtzcGFjZSk.__PAGE__.txt +10 -10
  42. package/dist/server/out/__next._full.txt +10 -10
  43. package/dist/server/out/__next._tree.txt +2 -2
  44. package/dist/server/out/_next/static/chunks/0ay0b1lpy734z.js +1 -0
  45. package/dist/server/out/_next/static/chunks/0c-3k17txbh0-.js +1 -0
  46. package/dist/server/out/_next/static/chunks/0cwfl2xanfapu.js +1 -0
  47. package/dist/server/out/_next/static/chunks/0e7s8ie0wlk66.js +1 -0
  48. package/dist/server/out/_next/static/chunks/0ey-6hb0za4r_.js +1 -0
  49. package/dist/server/out/_next/static/chunks/0huhp5j8dlai8.js +1 -0
  50. package/dist/server/out/_next/static/chunks/0khjy8qh1ll42.js +1 -0
  51. package/dist/server/out/_next/static/chunks/0r0572w1rwpcv.js +1 -0
  52. package/dist/server/out/_next/static/chunks/0rlc9tihf4po6.css +1 -0
  53. package/dist/server/out/_next/static/chunks/0u_9k8f7709np.js +1 -0
  54. package/dist/server/out/_next/static/chunks/0w34iczo7r1v5.js +1 -0
  55. package/dist/server/out/_next/static/chunks/{280w168xxgtwt.js → 0y5lgqdwpeabb.js} +4 -4
  56. package/dist/server/out/_next/static/chunks/0zfiikazg0_ga.js +1 -0
  57. package/dist/server/out/_next/static/chunks/1-75euysc3lin.js +22 -0
  58. package/dist/server/out/_next/static/chunks/10aam78qxauw0.js +1 -0
  59. package/dist/server/out/_next/static/chunks/12ro_nqb83zku.js +1 -0
  60. package/dist/server/out/_next/static/chunks/19ue6x5c3f_38.js +3 -0
  61. package/dist/server/out/_next/static/chunks/1c1ayx3fqtub5.js +31 -0
  62. package/dist/server/out/_next/static/chunks/1c2xcwifk3vhh.js +1 -0
  63. package/dist/server/out/_next/static/chunks/1dwr62uuyceq-.js +1 -0
  64. package/dist/server/out/_next/static/chunks/1fweh1ttncdlv.js +1 -0
  65. package/dist/server/out/_next/static/chunks/1iklteprcoims.js +1 -0
  66. package/dist/server/out/_next/static/chunks/1qaow7bdy3oid.js +1 -0
  67. package/dist/server/out/_next/static/chunks/1tnzhqkfwk7l8.js +1 -0
  68. package/dist/server/out/_next/static/chunks/1wn9ohqcnx8y8.js +3 -0
  69. package/dist/server/out/_next/static/chunks/1zieh-zxgxmcp.js +1 -0
  70. package/dist/server/out/_next/static/chunks/25qsan0t-_of0.js +1 -0
  71. package/dist/server/out/_next/static/chunks/26yareaaj1kyr.js +1 -0
  72. package/dist/server/out/_next/static/chunks/2bkkmnhngpacd.js +1 -0
  73. package/dist/server/out/_next/static/chunks/2e39uy7huhczu.js +1 -0
  74. package/dist/server/out/_next/static/chunks/2lxgam-nk-e9a.js +3 -0
  75. package/dist/server/out/_next/static/chunks/{3dx108d0g6032.js → 2navy2mx7--vk.js} +1 -1
  76. package/dist/server/out/_next/static/chunks/2ngzwwqeitkk7.js +1 -0
  77. package/dist/server/out/_next/static/chunks/2rp65hq6bmpxv.js +1 -0
  78. package/dist/server/out/_next/static/chunks/2z60o39-yshg2.js +1 -0
  79. package/dist/server/out/_next/static/chunks/3_d6w25_b15kx.js +1 -0
  80. package/dist/server/out/_next/static/chunks/3d8gkwu9nszjk.js +1 -0
  81. package/dist/server/out/_next/static/chunks/3l-16g1y6k5rs.js +1 -0
  82. package/dist/server/out/_next/static/chunks/3obu_9-ka7u_h.js +1 -0
  83. package/dist/server/out/_next/static/chunks/3xs2ji0dgkbmc.js +1 -0
  84. package/dist/server/out/_next/static/chunks/{turbopack-3-ry682tkyiqk.js → turbopack-2u1d16houkiyo.js} +1 -1
  85. package/dist/server/out/_not-found/__next._full.txt +3 -3
  86. package/dist/server/out/_not-found/__next._not-found.__PAGE__.txt +3 -3
  87. package/dist/server/out/_not-found/__next._tree.txt +2 -2
  88. package/dist/server/out/_not-found/index.html +1 -1
  89. package/dist/server/out/_not-found/index.txt +3 -3
  90. package/dist/server/out/accounts/2fa/__next._full.txt +8 -8
  91. package/dist/server/out/accounts/2fa/__next._tree.txt +2 -2
  92. package/dist/server/out/accounts/2fa/__next.accounts.2fa.__PAGE__.txt +8 -8
  93. package/dist/server/out/accounts/2fa/index.html +1 -1
  94. package/dist/server/out/accounts/2fa/index.txt +8 -8
  95. package/dist/server/out/accounts/email/__next._full.txt +7 -7
  96. package/dist/server/out/accounts/email/__next._tree.txt +2 -2
  97. package/dist/server/out/accounts/email/__next.accounts.email.__PAGE__.txt +7 -7
  98. package/dist/server/out/accounts/email/index.html +1 -1
  99. package/dist/server/out/accounts/email/index.txt +7 -7
  100. package/dist/server/out/accounts/login/__next._full.txt +7 -7
  101. package/dist/server/out/accounts/login/__next._tree.txt +2 -2
  102. package/dist/server/out/accounts/login/__next.accounts.login.__PAGE__.txt +7 -7
  103. package/dist/server/out/accounts/login/index.html +1 -1
  104. package/dist/server/out/accounts/login/index.txt +7 -7
  105. package/dist/server/out/accounts/logout/__next._full.txt +7 -7
  106. package/dist/server/out/accounts/logout/__next._tree.txt +2 -2
  107. package/dist/server/out/accounts/logout/__next.accounts.logout.__PAGE__.txt +7 -7
  108. package/dist/server/out/accounts/logout/index.html +1 -1
  109. package/dist/server/out/accounts/logout/index.txt +7 -7
  110. package/dist/server/out/accounts/password/change/__next._full.txt +7 -7
  111. package/dist/server/out/accounts/password/change/__next._tree.txt +2 -2
  112. package/dist/server/out/accounts/password/change/__next.accounts.password.change.__PAGE__.txt +7 -7
  113. package/dist/server/out/accounts/password/change/index.html +1 -1
  114. package/dist/server/out/accounts/password/change/index.txt +7 -7
  115. package/dist/server/out/accounts/password/reset/__next._full.txt +5 -5
  116. package/dist/server/out/accounts/password/reset/__next._tree.txt +2 -2
  117. package/dist/server/out/accounts/password/reset/__next.accounts.password.reset.__PAGE__.txt +5 -5
  118. package/dist/server/out/accounts/password/reset/index.html +1 -1
  119. package/dist/server/out/accounts/password/reset/index.txt +5 -5
  120. package/dist/server/out/accounts/signup/__next._full.txt +7 -7
  121. package/dist/server/out/accounts/signup/__next._tree.txt +2 -2
  122. package/dist/server/out/accounts/signup/__next.accounts.signup.__PAGE__.txt +7 -7
  123. package/dist/server/out/accounts/signup/index.html +1 -1
  124. package/dist/server/out/accounts/signup/index.txt +7 -7
  125. package/dist/server/out/actions/__next.!KHdvcmtzcGFjZSk.actions.__PAGE__.txt +15 -15
  126. package/dist/server/out/actions/__next._full.txt +15 -15
  127. package/dist/server/out/actions/__next._tree.txt +2 -2
  128. package/dist/server/out/actions/index.html +1 -1
  129. package/dist/server/out/actions/index.txt +15 -15
  130. package/dist/server/out/agents/__next.!KHdvcmtzcGFjZSk.agents.__PAGE__.txt +8 -8
  131. package/dist/server/out/agents/__next._full.txt +8 -8
  132. package/dist/server/out/agents/__next._tree.txt +2 -2
  133. package/dist/server/out/agents/index.html +1 -1
  134. package/dist/server/out/agents/index.txt +8 -8
  135. package/dist/server/out/approvals/__next.!KHdvcmtzcGFjZSk.approvals.__PAGE__.txt +10 -10
  136. package/dist/server/out/approvals/__next._full.txt +10 -10
  137. package/dist/server/out/approvals/__next._tree.txt +2 -2
  138. package/dist/server/out/approvals/index.html +1 -1
  139. package/dist/server/out/approvals/index.txt +10 -10
  140. package/dist/server/out/artifacts/__next.!KHdvcmtzcGFjZSk.artifacts.__PAGE__.txt +12 -12
  141. package/dist/server/out/artifacts/__next._full.txt +12 -12
  142. package/dist/server/out/artifacts/__next._tree.txt +2 -2
  143. package/dist/server/out/artifacts/index.html +1 -1
  144. package/dist/server/out/artifacts/index.txt +12 -12
  145. package/dist/server/out/audit/__next.!KHdvcmtzcGFjZSk.audit.__PAGE__.txt +10 -10
  146. package/dist/server/out/audit/__next._full.txt +10 -10
  147. package/dist/server/out/audit/__next._tree.txt +2 -2
  148. package/dist/server/out/audit/index.html +1 -1
  149. package/dist/server/out/audit/index.txt +10 -10
  150. package/dist/server/out/chat/__next.!KHdvcmtzcGFjZSk.chat.__PAGE__.txt +8 -8
  151. package/dist/server/out/chat/__next._full.txt +8 -8
  152. package/dist/server/out/chat/__next._tree.txt +2 -2
  153. package/dist/server/out/chat/index.html +1 -1
  154. package/dist/server/out/chat/index.txt +8 -8
  155. package/dist/server/out/connections/__next.!KHdvcmtzcGFjZSk.connections.__PAGE__.txt +10 -10
  156. package/dist/server/out/connections/__next._full.txt +10 -10
  157. package/dist/server/out/connections/__next._tree.txt +2 -2
  158. package/dist/server/out/connections/index.html +1 -1
  159. package/dist/server/out/connections/index.txt +10 -10
  160. package/dist/server/out/credentials/__next.!KHdvcmtzcGFjZSk.credentials.__PAGE__.txt +11 -11
  161. package/dist/server/out/credentials/__next._full.txt +11 -11
  162. package/dist/server/out/credentials/__next._tree.txt +2 -2
  163. package/dist/server/out/credentials/index.html +1 -1
  164. package/dist/server/out/credentials/index.txt +11 -11
  165. package/dist/server/out/documents/__next.!KHdvcmtzcGFjZSk.documents.__PAGE__.txt +10 -10
  166. package/dist/server/out/documents/__next._full.txt +10 -10
  167. package/dist/server/out/documents/__next._tree.txt +2 -2
  168. package/dist/server/out/documents/index.html +1 -1
  169. package/dist/server/out/documents/index.txt +10 -10
  170. package/dist/server/out/index.html +1 -1
  171. package/dist/server/out/index.txt +10 -10
  172. package/dist/server/out/people/__next.!KHdvcmtzcGFjZSk.people.__PAGE__.txt +10 -10
  173. package/dist/server/out/people/__next._full.txt +10 -10
  174. package/dist/server/out/people/__next._tree.txt +2 -2
  175. package/dist/server/out/people/index.html +1 -1
  176. package/dist/server/out/people/index.txt +10 -10
  177. package/dist/server/out/plugins/__next.!KHdvcmtzcGFjZSk.plugins.__PAGE__.txt +13 -13
  178. package/dist/server/out/plugins/__next._full.txt +13 -13
  179. package/dist/server/out/plugins/__next._tree.txt +2 -2
  180. package/dist/server/out/plugins/index.html +1 -1
  181. package/dist/server/out/plugins/index.txt +13 -13
  182. package/dist/server/out/projects/__next.!KHdvcmtzcGFjZSk.projects.__PAGE__.txt +10 -10
  183. package/dist/server/out/projects/__next._full.txt +10 -10
  184. package/dist/server/out/projects/__next._tree.txt +2 -2
  185. package/dist/server/out/projects/index.html +1 -1
  186. package/dist/server/out/projects/index.txt +10 -10
  187. package/dist/server/out/runs/__next.!KHdvcmtzcGFjZSk.runs.__PAGE__.txt +12 -12
  188. package/dist/server/out/runs/__next._full.txt +12 -12
  189. package/dist/server/out/runs/__next._tree.txt +2 -2
  190. package/dist/server/out/runs/index.html +1 -1
  191. package/dist/server/out/runs/index.txt +12 -12
  192. package/dist/server/out/schedules/__next.!KHdvcmtzcGFjZSk.schedules.__PAGE__.txt +12 -12
  193. package/dist/server/out/schedules/__next._full.txt +12 -12
  194. package/dist/server/out/schedules/__next._tree.txt +2 -2
  195. package/dist/server/out/schedules/index.html +1 -1
  196. package/dist/server/out/schedules/index.txt +12 -12
  197. package/dist/server/out/settings/__next.!KHdvcmtzcGFjZSk.settings.__PAGE__.txt +10 -10
  198. package/dist/server/out/settings/__next._full.txt +10 -10
  199. package/dist/server/out/settings/__next._tree.txt +2 -2
  200. package/dist/server/out/settings/index.html +1 -1
  201. package/dist/server/out/settings/index.txt +10 -10
  202. package/dist/server/out/setup/__next._full.txt +7 -7
  203. package/dist/server/out/setup/__next._tree.txt +2 -2
  204. package/dist/server/out/setup/__next.setup.__PAGE__.txt +7 -7
  205. package/dist/server/out/setup/index.html +1 -1
  206. package/dist/server/out/setup/index.txt +7 -7
  207. package/dist/server/out/tables/__next.!KHdvcmtzcGFjZSk.tables.__PAGE__.txt +10 -10
  208. package/dist/server/out/tables/__next._full.txt +10 -10
  209. package/dist/server/out/tables/__next._tree.txt +2 -2
  210. package/dist/server/out/tables/index.html +1 -1
  211. package/dist/server/out/tables/index.txt +10 -10
  212. package/dist/server/out/webhooks/__next.!KHdvcmtzcGFjZSk.webhooks.__PAGE__.txt +10 -10
  213. package/dist/server/out/webhooks/__next._full.txt +10 -10
  214. package/dist/server/out/webhooks/__next._tree.txt +2 -2
  215. package/dist/server/out/webhooks/index.html +1 -1
  216. package/dist/server/out/webhooks/index.txt +10 -10
  217. package/dist/server/out/workspaces/invite/__next._full.txt +6 -6
  218. package/dist/server/out/workspaces/invite/__next._tree.txt +2 -2
  219. package/dist/server/out/workspaces/invite/__next.workspaces.invite.__PAGE__.txt +6 -6
  220. package/dist/server/out/workspaces/invite/index.html +1 -1
  221. package/dist/server/out/workspaces/invite/index.txt +6 -6
  222. package/docs/browser-sessions.md +85 -0
  223. package/docs/npm-distribution.md +13 -11
  224. package/docs/remote-mcp.md +51 -0
  225. package/package.json +53 -20
  226. package/runtime/README.md +9 -7
  227. package/dist/runtime/generated/schema.d.ts +0 -6443
  228. package/dist/server/out/THIRD_PARTY_NOTICES.md +0 -13
  229. package/dist/server/out/_next/static/chunks/016glzdsa3q5_.js +0 -1
  230. package/dist/server/out/_next/static/chunks/05i1qq0mw887k.js +0 -1
  231. package/dist/server/out/_next/static/chunks/06tt8wiyre1ez.js +0 -1
  232. package/dist/server/out/_next/static/chunks/0cm9i2msjsy--.js +0 -1
  233. package/dist/server/out/_next/static/chunks/0hq5dvj7fy64b.js +0 -1
  234. package/dist/server/out/_next/static/chunks/0ma4vl-fj0tmu.js +0 -1
  235. package/dist/server/out/_next/static/chunks/0noal-jqjivtf.js +0 -1
  236. package/dist/server/out/_next/static/chunks/0spckmsiek0gd.js +0 -1
  237. package/dist/server/out/_next/static/chunks/103sekujf0rxr.js +0 -1
  238. package/dist/server/out/_next/static/chunks/10h8kpcnjfe_v.js +0 -1
  239. package/dist/server/out/_next/static/chunks/16_aurf9162_6.js +0 -1
  240. package/dist/server/out/_next/static/chunks/1c48yx15nlt6w.js +0 -1
  241. package/dist/server/out/_next/static/chunks/1jp827_2p_wkf.js +0 -1
  242. package/dist/server/out/_next/static/chunks/1kdk-viqnjs3j.js +0 -1
  243. package/dist/server/out/_next/static/chunks/1mlfee105fhl7.js +0 -1
  244. package/dist/server/out/_next/static/chunks/1q9jpzm9b6zy9.js +0 -1
  245. package/dist/server/out/_next/static/chunks/1v0-a7pehktp9.js +0 -22
  246. package/dist/server/out/_next/static/chunks/24qxhh2dqvhaa.js +0 -1
  247. package/dist/server/out/_next/static/chunks/253gnn8ai3i89.js +0 -1
  248. package/dist/server/out/_next/static/chunks/27umf0z4povug.js +0 -1
  249. package/dist/server/out/_next/static/chunks/2a_c2xcjy62fq.css +0 -1
  250. package/dist/server/out/_next/static/chunks/2mvlvogrl6o0u.js +0 -1
  251. package/dist/server/out/_next/static/chunks/2xzrcwr9q6195.js +0 -1
  252. package/dist/server/out/_next/static/chunks/2yi6lq56xoijl.js +0 -31
  253. package/dist/server/out/_next/static/chunks/30g0jo299pr8e.js +0 -1
  254. package/dist/server/out/_next/static/chunks/36tf56rgybjz0.js +0 -3
  255. package/dist/server/out/_next/static/chunks/39dofrhzg_uju.js +0 -1
  256. package/dist/server/out/_next/static/chunks/3a8aanmz3kfof.js +0 -1
  257. package/dist/server/out/_next/static/chunks/3bd3k15tx3lj1.js +0 -1
  258. package/dist/server/out/_next/static/chunks/3d34pxerfr389.js +0 -1
  259. package/dist/server/out/_next/static/chunks/3elab9vgx7_ok.js +0 -1
  260. package/dist/server/out/_next/static/chunks/3gvae9c-5pi5z.js +0 -1
  261. package/dist/server/out/_next/static/chunks/3hzia782sc9pf.js +0 -1
  262. package/dist/server/out/_next/static/chunks/3jl4k-15i8847.js +0 -1
  263. package/dist/server/out/_next/static/chunks/3lb23el6qno6s.js +0 -1
  264. package/dist/server/out/_next/static/chunks/3prum3lr5470i.js +0 -3
  265. package/dist/server/out/_next/static/chunks/3prwkrciuqwjg.js +0 -1
  266. package/dist/server/out/_next/static/chunks/3txmqtuo5xgfd.js +0 -3
  267. package/dist/server/out/third-party-licenses/monaco-editor.txt +0 -21
  268. package/dist/server/out/third-party-licenses/zod.txt +0 -21
  269. /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → -qfuCDzkIvBZY_UFsMHnB}/_buildManifest.js +0 -0
  270. /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → -qfuCDzkIvBZY_UFsMHnB}/_clientMiddlewareManifest.js +0 -0
  271. /package/dist/server/out/_next/static/{F49bfPs3jKhcIuc95hqZh → -qfuCDzkIvBZY_UFsMHnB}/_ssgManifest.js +0 -0
@@ -0,0 +1,3 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,5500,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Image",{enumerable:!0,get:function(){return x}});let r=e.r(55682),a=e.r(90809),l=e.r(18050),s=a._(e.r(71645)),i=r._(e.r(74080)),o=r._(e.r(25633)),c=e.r(8927),u=e.r(65856),d=e.r(49381),p=r._(e.r(1948)),f=e.r(18581);function h(e,t,n,r,a,l,s){let i=e?.src;e&&e["data-loaded-src"]!==i&&(e["data-loaded-src"]=i,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),n?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,a=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function m(e){return s.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let g="u"<typeof window?s.useEffect:s.useLayoutEffect,j=(0,s.forwardRef)(({src:e,srcSet:t,sizes:n,height:r,width:a,decoding:i,className:o,style:c,fetchPriority:u,placeholder:d,loading:p,unoptimized:j,fill:b,onLoadRef:x,onLoadingCompleteRef:v,setBlurComplete:y,setShowAltText:w,sizesInput:S,onLoad:C,onError:_,...N},k)=>{let P=(0,s.useRef)(!1),O=(0,s.useRef)(null);g(()=>{let{current:e}=P,{current:t}=O;e||null===t||(_&&(t.src=t.src),t.complete&&h(t,d,x,v,y,j,S),P.current=!0)},[e,d,x,v,_,j,S]);let R=(0,f.useMergedRef)(k,O);return(0,l.jsx)("img",{...N,...m(u),loading:p,width:a,height:r,decoding:i,"data-nimg":b?"fill":"1",className:o,style:c,sizes:n,srcSet:t,src:e,ref:R,onLoad:e=>{h(e.currentTarget,d,x,v,y,j,S)},onError:e=>{w(!0),"empty"!==d&&y(!0),_&&_(e)}})});function b({isAppRouter:e,imgAttributes:t}){let n={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...m(t.fetchPriority)};return e&&i.default.preload?(i.default.preload(t.src,n),null):(0,l.jsx)(o.default,{children:(0,l.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...n},"__nimg-"+t.src+t.srcSet+t.sizes)})}let x=(0,s.forwardRef)((e,t)=>{let n=(0,s.useContext)(u.RouterContext),r=(0,d.useImageConfig)(),{onLoad:a,onLoadingComplete:i}=e,o=(0,s.useRef)(a);(0,s.useEffect)(()=>{o.current=a},[a]);let f=(0,s.useRef)(i);(0,s.useEffect)(()=>{f.current=i},[i]);let[h,m]=(0,s.useState)(!1),[g,x]=(0,s.useState)(!1),{props:v,meta:y}=(0,c.getImgProps)(e,{defaultLoader:p.default,imgConf:r,blurComplete:h,showAltText:g});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(j,{...v,unoptimized:y.unoptimized,placeholder:y.placeholder,fill:y.fill,onLoadRef:o,onLoadingCompleteRef:f,setBlurComplete:m,setShowAltText:x,sizesInput:e.sizes,ref:t}),y.preload?(0,l.jsx)(b,{isAppRouter:!n,imgAttributes:v}):null]})});("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},49381,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useImageConfig",{enumerable:!0,get:function(){return i}});let r=e.r(71645),a=e.r(87690),l=e.r(18556),s={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function i(){let e=(0,r.useContext)(l.ImageConfigContext);return(0,a.prepareImageConfig)(s,e)}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},90317,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={bindSnapshot:function(){return u},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return d},getOrCreateGlobalAsyncLocalStorage:function(){return c}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let l=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class s{disable(){throw l}getStore(){}run(){throw l}exit(){throw l}enterWith(){throw l}static bind(e){return e}}let i="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return i?new i:new s}function c(e){let t=Symbol.for(`@next/${e}@16.4.5`),n=globalThis;return n[t]??=o()}function u(e){return i?i.bind(e):s.bind(e)}function d(){return i?i.snapshot():function(e,...t){return e(...t)}}},42344,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,e.r(90317).getOrCreateGlobalAsyncLocalStorage)("work-async-storage")},63599,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=e.r(42344)},70703,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a}});let r=e.r(55682)._(e.r(69093));function a(e,t){let n={};"function"==typeof e&&(n.loader=e);let a={...n,...t};return(0,r.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},9885,(e,t,n)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return r}})},70965,(e,t,n)=>{"use strict";function r(e,t){let n=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e,t.qualities[0]):n}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"findClosestQuality",{enumerable:!0,get:function(){return r}})},8927,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImgProps",{enumerable:!0,get:function(){return o}});let r=e.r(43369),a=e.r(88143),l=["-moz-initial","fill","none","scale-down",void 0];function s(e){return void 0!==e.default}function i(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:0/0:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):0/0}function o({src:e,sizes:t,unoptimized:n=!1,priority:c=!1,preload:u=!1,loading:d,className:p,quality:f,width:h,height:m,fill:g=!1,style:j,overrideSrc:b,onLoad:x,onLoadingComplete:v,placeholder:y="empty",blurDataURL:w,fetchPriority:S,decoding:C="async",layout:_,objectFit:N,objectPosition:k,lazyBoundary:P,lazyRoot:O,...R},A){var M;let I,E,{imgConf:z,showAltText:U,blurComplete:L,defaultLoader:T}=A;if(void 0===T)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let $=R.loader||T;delete R.loader,delete R.srcSet;let D="__next_img_default"in $;if(D){if("custom"===z.loader)throw Error(`Image with src "${e}" is missing "loader" prop.
2
+ Read more: https://nextjs.org/docs/messages/next-image-missing-loader`)}else{let e=$;$=t=>{let{config:n,...r}=t;return e(r)}}if(_){"fill"===_&&(g=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[_];e&&(j={...j,...e});let n={responsive:"100vw",fill:"100vw"}[_];n&&!t&&(t=n)}let B="",F=i(h),q=i(m);if((M=e)&&"object"==typeof M&&(s(M)||void 0!==M.src)){let t=s(e)?e.default:e;if(!t.src)throw Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`);if(!t.height||!t.width)throw Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`);if(I=t.blurWidth,E=t.blurHeight,w=w||t.blurDataURL,B=t.src,!g)if(F||q){if(F&&!q){let e=F/t.width;q=Math.round(t.height*e)}else if(!F&&q){let e=q/t.height;F=Math.round(t.width*e)}}else F=t.width,q=t.height}let W=!c&&!u&&("lazy"===d||void 0===d);(!(e="string"==typeof e?e:B)||e.startsWith("data:")||e.startsWith("blob:"))&&(n=!0,W=!1),z.unoptimized&&(n=!0),D&&!z.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(n=!0);let J=i(f),G=Object.assign(g?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:N,objectPosition:k}:{},U?{}:{color:"transparent"},j),H=L||"empty"===y?null:"blur"===y?`url("data:image/svg+xml;charset=utf-8,${(0,a.getImageBlurSvg)({widthInt:F,heightInt:q,blurWidth:I,blurHeight:E,blurDataURL:w||"",objectFit:G.objectFit})}")`:`url("${y}")`,K=l.includes(G.objectFit)?"fill"===G.objectFit?"100% 100%":"cover":G.objectFit,V=H?{backgroundSize:K,backgroundPosition:G.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:H}:{},Q=function({config:e,src:t,unoptimized:n,width:a,quality:l,sizes:s,loader:i}){if(n){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,r.getDeploymentId)();if(t.includes("/_next/static/immutable")&&!(0,r.getAssetToken)())e=void 0;else if(e){let n=t.indexOf("?");if(-1!==n){let r=new URLSearchParams(t.slice(n+1));r.get("dpl")||(r.append("dpl",e),t=t.slice(0,n)+"?"+r.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:o,kind:c}=function({deviceSizes:e,allSizes:t},n,r){if(r){let n=/(^|\s)(1?\d?\d)vw/g,a=[];for(let e;e=n.exec(r);)a.push(parseInt(e[2]));if(a.length){let n=.01*Math.min(...a);return{widths:t.filter(t=>t>=e[0]*n),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof n?{widths:e,kind:"w"}:{widths:[...new Set([n,2*n].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,a,s),u=o.length-1;return{sizes:s||"w"!==c?s:"100vw",srcSet:o.map((n,r)=>`${i({config:e,src:t,quality:l,width:n})} ${"w"===c?n:r+1}${c}`).join(", "),src:i({config:e,src:t,quality:l,width:o[u]})}}({config:z,src:e,unoptimized:n,width:F,quality:J,sizes:t,loader:$}),X=W?"lazy":d;return{props:{...R,loading:X,fetchPriority:S,width:F,height:q,decoding:C,className:p,style:{...G,...V},sizes:Q.sizes,srcSet:Q.srcSet,src:b||Q.src},meta:{unoptimized:n,preload:u||c,placeholder:y,fill:g}}}},25633,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return m},defaultHead:function(){return d}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let l=e.r(55682),s=e.r(90809),i=e.r(18050),o=s._(e.r(71645)),c=l._(e.r(98879)),u=e.r(42732);function d(){return[(0,i.jsx)("meta",{charSet:"utf-8"},"charset"),(0,i.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function p(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}let f=["name","httpEquiv","charSet","itemProp"];function h(e){let t,n,r,a;return e.reduce(p,[]).reverse().concat(d().reverse()).filter((t=new Set,n=new Set,r=new Set,a={},e=>{let l=!0,s=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){s=!0;let n=e.key.slice(e.key.indexOf("$")+1);t.has(n)?l=!1:t.add(n)}switch(e.type){case"title":case"base":n.has(e.type)?l=!1:n.add(e.type);break;case"meta":for(let t=0,n=f.length;t<n;t++){let n=f[t];if(e.props.hasOwnProperty(n))if("charSet"===n)r.has(n)?l=!1:r.add(n);else{let t=e.props[n],r=a[n]||new Set;("name"!==n||!s)&&r.has(t)?l=!1:(r.add(t),a[n]=r)}}}return l})).reverse().map((e,t)=>{let n=e.key||t;return o.default.cloneElement(e,{key:n})})}let m=function({children:e}){let t=(0,o.useContext)(u.HeadManagerContext);return(0,i.jsx)(c.default,{reduceComponentsToState:h,headManager:t,children:e})};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},88143,(e,t,n)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:n,blurHeight:a,blurDataURL:l,objectFit:s}){let i=n?40*n:e,o=a?40*a:t,c=i&&o?`viewBox='0 0 ${i} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${c}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${c?"none":"contain"===s?"xMidYMid":"cover"===s?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${l}'/%3E%3C/svg%3E`}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},18556,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageConfigContext",{enumerable:!0,get:function(){return l}});let r=e.r(55682)._(e.r(71645)),a=e.r(87690),l=r.default.createContext(a.imageConfigDefault)},87690,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return l},imageConfigDefault:function(){return c},prepareImageConfig:function(){return o}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let l=["default","imgix","cloudinary","akamai","custom"],s={},i=new WeakMap;function o(e,t){let n=e??s,r=t??s,a=i.get(n);if(a){let e=a.get(r);if(e)return e}let l=e||t||c,o=[...l.deviceSizes].sort((e,t)=>e-t),u=[...l.imageSizes],d={deviceSizes:o,imageSizes:u,allSizes:[...o,...u].sort((e,t)=>e-t),qualities:void 0===l.qualities?void 0:[...l.qualities].sort((e,t)=>e-t),path:l.path,loader:l.loader,dangerouslyAllowSVG:l.dangerouslyAllowSVG,unoptimized:l.unoptimized,domains:l.domains,remotePatterns:l.remotePatterns,localPatterns:"u"<typeof window&&void 0!==t?t.localPatterns:l.localPatterns,output:l.output};return a||(a=new WeakMap,i.set(n,a)),a.set(r,d),d}let c={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},1948,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return s}});let r=e.r(70965),a=e.r(43369);function l({config:e,src:t,width:n,quality:s}){let i=(0,a.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//"))if(t.includes("/_next/static/immutable")&&!(0,a.getAssetToken)())i=void 0;else{let e=t.indexOf("?");if(-1!==e){let n=new URLSearchParams(t.slice(e+1)),r=n.get("dpl");if(r){i=r,n.delete("dpl");let a=n.toString();t=t.slice(0,e)+(a?"?"+a:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
3
+ Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`);let o=(0,r.findClosestQuality)(s,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${n}&q=${o}${t.startsWith("/")&&i?`&dpl=${i}`:""}`}l.__next_img_default=!0;let s=l},67585,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSRForNextDynamic",{enumerable:!0,get:function(){return s}});let r=e.r(71645),a=e.r(74080);e.r(32061);let l=e.r(49354).createReactBrowserBailoutReason.bind(null,"next/dynamic");function s({children:e}){return(0,r.use)((0,a.browser)(l)),e}},69093,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return c}});let r=e.r(18050),a=e.r(71645),l=e.r(67585),s=e.r(52157);function i(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},n=(0,a.lazy)(()=>t.loader().then(i)),c=t.loading;function u(e){let i=c?(0,r.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,u=o?a.Suspense:a.Fragment,d=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(s.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(l.BailoutToCSRForNextDynamic,{children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(u,{...o?{fallback:i}:{},children:d})}return u.displayName="LoadableComponent",u}},52157,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return o}});let r=e.r(18050),a=e.r(74080),l=e.r(63599),s=e.r(9885),i=e.r(43369);function o({moduleIds:e}){if("u">typeof window)return null;let t=l.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;n.push(...e)}}if(0===n.length)return null;let c=(0,i.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,s.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,a.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},49354,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={createReactBrowserBailoutReason:function(){return s},getReactBrowserBailoutReason:function(){return i},isNextBrowserBailoutError:function(){return o}};for(var a in r)Object.defineProperty(n,a,{enumerable:!0,get:r[a]});let l=Symbol.for("next.browser-bailout-reason");function s(e){return{$$typeof:l,reason:e}}function i(e){let t=e?.cause;return t?.$$typeof===l?t.reason:void 0}function o(e){return void 0!==i(e)}},65856,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"RouterContext",{enumerable:!0,get:function(){return r}});let r=(e.r(55682)._(e.r(71645))).default.createContext(null)},98879,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return i}});let r=e.r(71645),a="u"<typeof window,l=a?()=>{}:r.useLayoutEffect,s=a?()=>{}:r.useEffect;function i(e){let{headManager:t,reduceComponentsToState:n}=e;function i(){if(t&&t.mountedInstances){let e=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(e))}}return a&&(t?.mountedInstances?.add(e.children),i()),l(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),l(()=>(t&&(t._pendingUpdate=i),()=>{t&&(t._pendingUpdate=i)})),s(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},13581,29487,e=>{"use strict";var t=e.i(71645),n=e.i(95813);e.s(["f",0,function(e,r=0){let[a,l]=(0,t.useState)(),[s,i]=(0,t.useState)(""),[o,c]=(0,t.useState)(!0),u=(0,t.useRef)(void 0),d=(0,t.useRef)(!1),p=(0,t.useCallback)(async()=>{u.current?.abort();let t=new AbortController;u.current=t;try{let n=await e(t.signal);if(t.signal.aborted||!d.current)return;l(n),i("")}catch(e){!t.signal.aborted&&d.current&&i((0,n.f)(e))}finally{!t.signal.aborted&&d.current&&c(!1)}},[e]);return(0,t.useEffect)(()=>{d.current=!0,queueMicrotask(()=>{d.current&&p()});let e=r>0?setInterval(()=>{p()},r):void 0;return()=>{d.current=!1,u.current?.abort(),clearInterval(e)}},[p,r]),{data:a,error:s,isLoading:o,refresh:p}}],13581);var r=e.i(18050),a=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:n}){return(0,r.jsxs)(r.Fragment,{children:[e?(0,r.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,r.jsxs)("div",{className:"error",role:"alert",children:[(0,r.jsx)("p",{children:t}),(0,r.jsx)(a.f,{variant:"outline",onClick:()=>{n()},children:"Try again"})]}):void 0]})}],29487)},33103,e=>{"use strict";var t=e.i(18050),n=e.i(70703),r=e.i(71645),a=e.i(73656),l=e.i(95813),s=e.i(13581),i=e.i(19455),o=e.i(93479),c=e.i(24687),u=e.i(22219),u=u,d=e.i(40192),p=e.i(54105);let f=u.enum(["none","headers","oauth"]),h=u.enum(["auto","streamable-http","sse"]),m=d.z.record(p.z.string(),p.z.string()),g=[{value:"none",label:"No authentication"},{value:"headers",label:"Token or custom headers"},{value:"oauth",label:"Sign in with OAuth"}],j=[{value:"auto",label:"Automatic"},{value:"streamable-http",label:"Streamable HTTP"},{value:"sse",label:"Legacy HTTP/SSE"}];function b({connection:e,busy:n,perform:l,onDirtyChange:s}){let[u,d]=(0,r.useState)(e.endpoint),[p,x]=(0,r.useState)(e.authMode),[v,y]=(0,r.useState)(e.transport),[w,S]=(0,r.useState)(""),[C,_]=(0,r.useState)(""),[N,k]=(0,r.useState)(""),[P,O]=(0,r.useState)(""),[R,A]=(0,r.useState)(""),[M,I]=(0,r.useState)(""),E=u!==e.endpoint||p!==e.authMode||v!==e.transport||!!(w||C),z=E||!!(P||R||M);return(0,r.useEffect)(()=>(s(z),()=>{s(!1)}),[z,s]),(0,t.jsxs)("div",{className:"space-y-3",children:["oauth"===e.authMode?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Registered OAuth application (optional)"}),(0,t.jsxs)("label",{className:"block",children:["Client ID",(0,t.jsx)(o.f,{value:P,onChange:e=>{O(e.target.value)}})]}),(0,t.jsxs)("label",{className:"block",children:["Client secret",(0,t.jsx)(o.f,{type:"password",autoComplete:"off",value:R,onChange:e=>{A(e.target.value)}})]}),(0,t.jsxs)("label",{className:"block",children:["Client metadata URL",(0,t.jsx)(o.f,{type:"url",value:M,onChange:e=>{I(e.target.value)}})]}),(0,t.jsxs)("p",{className:"small",children:["Register ",(0,t.jsx)("code",{children:"/oauth/mcp/callback"})," on your configured OrgSDK public origin as the callback URL."]})]}),(0,t.jsx)(i.f,{disabled:n||E,onClick:()=>{l(async()=>{let t=await a.U.plugins.mcp.beginOAuth.mutate({id:e.pluginId,...P&&{client_id:P},...R&&{client_secret:R},...M&&{client_metadata_url:M}});O(""),A(""),I(""),s(!1),k(t.authorization_url)},"Open the sign-in link, finish authorization, then check the connection.")},children:e.authenticated?"Reconnect account":"Sign in"}),N?(0,t.jsx)("a",{className:"underline",href:N,target:"_blank",rel:"noopener noreferrer",children:"Continue to server sign-in"}):null]}):null,(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Update connection"}),(0,t.jsx)("p",{children:"Saving disables this connection until its tools are checked and reviewed again."}),(0,t.jsxs)("label",{className:"block",children:["Server URL",(0,t.jsx)(o.f,{type:"url",value:u,onChange:e=>{d(e.target.value)}})]}),(0,t.jsxs)("label",{className:"block",children:["Authentication",(0,t.jsx)("select",{className:"field",value:p,onChange:e=>{x(f.parse(e.target.value))},children:g.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),"headers"===p?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"block",children:["Replacement bearer token",(0,t.jsx)(o.f,{type:"password",autoComplete:"off",value:w,onChange:e=>{S(e.target.value)}})]}),(0,t.jsxs)("label",{className:"block",children:["Replacement custom headers (JSON)",(0,t.jsx)(c.f,{value:C,onChange:e=>{_(e.target.value)},placeholder:'{"X-API-Key":"..."}'})]}),(0,t.jsx)("p",{className:"small",children:"Leave credential fields empty to keep existing credentials at the same endpoint."})]}):null,(0,t.jsxs)("label",{className:"block",children:["Connection transport",(0,t.jsx)("select",{className:"field",value:v,onChange:e=>{y(h.parse(e.target.value))},children:j.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,t.jsx)(i.f,{disabled:n||!E,onClick:()=>{l(async()=>{let t=C.trim()?m.parse(JSON.parse(C)):{};await a.U.plugins.mcp.update.mutate({id:e.pluginId,endpoint:u,transport:v,auth_mode:p,..."headers"===p&&(w||C)&&{headers:{...t,...w&&{Authorization:`Bearer ${w}`}}}}),S(""),_("")})},children:"Save connection changes"})]})]})}var x=e.i(29487);function v({plugin:e,canManage:n,onChanged:o,onDirtyChange:c}){let u=(0,r.useCallback)(t=>a.U.plugins.mcp.get.query({id:e.id},{signal:t}),[e.id]),d=(0,s.f)(u),p=d.refresh,[f,h]=(0,r.useState)(null),[m,g]=(0,r.useState)(!1),[j,y]=(0,r.useState)(""),[w,S]=(0,r.useState)(""),[C,_]=(0,r.useState)(!1),N=C||null!==f;(0,r.useEffect)(()=>(c(e.id,N),()=>{c(e.id,!1)}),[e.id,N,c]);let k=d.data;(0,r.useEffect)(()=>{if(k?.status!=="checking")return;let e=setInterval(()=>{p()},2e3);return()=>{clearInterval(e)}},[k?.status,p]);let P=async(e,t="")=>{g(!0),y(""),S("");try{await e(),await d.refresh(),await o(),S(t)}catch(e){y((0,l.f)(e))}finally{g(!1)}},O=k?.candidate,R=O?.tools.filter(e=>k?.enabledTools.includes(e.name)&&k.catalogue.some(t=>{let{alias:n,...r}=t;return JSON.stringify(r)===JSON.stringify(e)})).map(e=>e.name)??[],A=f??R;return(0,t.jsxs)("article",{className:"rounded-lg border p-4 space-y-3","aria-label":`MCP ${e.slug}`,children:[(0,t.jsx)("h3",{children:e.slug}),(0,t.jsx)(x.f,{...d}),k?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"break-all small",children:k.endpoint}),(0,t.jsxs)("p",{children:[e.enabled?"Enabled":"Disabled"," ·"," ",k.enabledTools.length," tools selected"]}),"ready"===k.runner?null:(0,t.jsx)("p",{role:"status",children:"offline"===k.runner?"Connect the project runner to check or use this server.":"Upgrade the project runner to enable MCP connections."}),"checking"===k.status?(0,t.jsx)("p",{role:"status",children:k.discovery?.status==="queued"?"Waiting for the project runner…":"Checking connection and available tools…"}):null,"authentication_required"===k.status?(0,t.jsx)("p",{role:"status",children:"This server requires authentication. Sign in or update its credentials."}):null,"failed"===k.status?(0,t.jsxs)("p",{role:"alert",children:["Connection check failed. ",k.discovery?.error]}):null,k.checkedAt?(0,t.jsxs)("p",{className:"small",children:["Last checked ",new Date(k.checkedAt).toLocaleString()]}):null,n?(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(i.f,{disabled:m||"ready"!==k.runner||"checking"===k.status,onClick:()=>{h(null),P(()=>a.U.plugins.mcp.discover.mutate({id:e.id}))},children:"Check connection / refresh tools"}),(0,t.jsx)(i.f,{variant:"outline",disabled:m||!e.enabled&&0===k.enabledTools.length,onClick:()=>{P(()=>a.U.plugins.update.mutate({id:e.id,enabled:!e.enabled}),e.enabled?"Connection disabled. Active runs are being cancelled.":"Connection enabled.")},children:e.enabled?"Disable":"Enable"}),(0,t.jsx)(i.f,{variant:"outline",disabled:m,onClick:()=>{P(()=>a.U.plugins.delete.mutate({id:e.id}))},children:"Remove"})]}):null,O&&!O.authRequired?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("h4",{children:"Review available tools"}),(0,t.jsx)("p",{children:"Only selected tools become available to this project. Changed tools need your review again."}),O.tools.map(e=>{var r;return(0,t.jsxs)("div",{className:"block rounded border p-2",children:[(0,t.jsxs)("label",{children:[(0,t.jsx)("input",{type:"checkbox",disabled:!n||m,checked:A.includes(e.name),onChange:t=>{h(t.target.checked?[...A,e.name]:A.filter(t=>t!==e.name))}})," ",(0,t.jsx)("strong",{children:e.name})]}),(0,t.jsx)("span",{className:"small",children:(r=e.name,R.includes(r)?"Enabled, unchanged":k?.catalogue.some(e=>e.name===r)?"Review changes":"New tool")}),(0,t.jsx)("p",{className:"small",children:e.description}),(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Tool contract"}),(0,t.jsx)("pre",{className:"overflow-auto",children:JSON.stringify({inputSchema:e.inputSchema,outputSchema:e.outputSchema},null,2)})]})]},e.name)}),k.enabledTools.some(e=>O.tools.every(t=>t.name!==e))?(0,t.jsxs)("p",{role:"status",children:["Removed by the server:"," ",k.enabledTools.filter(e=>O.tools.every(t=>t.name!==e)).join(", "),". Accepting this catalogue removes their access and cancels affected runs."]}):null,0===O.tools.length?(0,t.jsx)("p",{children:"This server exposes no tools."}):null,n?(0,t.jsx)(i.f,{disabled:m,onClick:()=>{let t=k.discoveryRunId;t&&P(async()=>{await a.U.plugins.mcp.accept.mutate({id:e.id,run:t,tools:A}),h(null)},"Selected tools are ready for code and actions.")},children:"Enable selected tools"}):null]}):null,k.catalogue.length>0?(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Enabled tool reference"}),k.catalogue.filter(e=>k.enabledTools.includes(e.name)).map(n=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("code",{children:[e.slug.replaceAll(/-([a-z])/g,(e,t)=>t.toUpperCase()),".",n.alias,"(args)"]}),(0,t.jsx)("pre",{className:"overflow-auto",children:JSON.stringify(n.inputSchema,null,2)})]},n.name))]}):null,n?(0,t.jsx)(b,{connection:k,busy:m,perform:P,onDirtyChange:_},k.revision):null]}):null,j?(0,t.jsx)("p",{role:"alert",children:j}):null,w?(0,t.jsx)("p",{role:"status",children:w}):null]})}function y({project:e,onSaved:n,onDirtyChange:s}){let[u,d]=(0,r.useState)(""),[p,b]=(0,r.useState)(""),[x,v]=(0,r.useState)("auto"),[w,S]=(0,r.useState)("none"),[C,_]=(0,r.useState)(""),[N,k]=(0,r.useState)(""),[P,O]=(0,r.useState)(!1),[R,A]=(0,r.useState)(""),M=!!(u||p||C||N);return(0,r.useEffect)(()=>(s(M),()=>{s(!1)}),[M,s]),(0,t.jsxs)("form",{className:"space-y-4",onSubmit:t=>{t.preventDefault(),O(!0),A(""),(async()=>{try{let t=N.trim()?m.parse(JSON.parse(N)):{};await a.U.plugins.mcp.create.mutate({project:e,slug:u,endpoint:p,transport:x,auth_mode:w,..."headers"===w&&{headers:{...t,...C&&{Authorization:`Bearer ${C}`}}}}),d(""),b(""),_(""),k(""),await n()}catch(e){A((0,l.f)(e))}finally{O(!1)}})()},children:[(0,t.jsx)("h3",{children:"Connect MCP server"}),(0,t.jsx)("p",{children:"Add a server, check its connection, then choose the tools this project can use."}),(0,t.jsxs)("label",{className:"block",children:["Connection name",(0,t.jsx)(o.f,{required:!0,value:u,onChange:e=>{d(e.target.value)},placeholder:"customer-tools",pattern:"[a-z][a-z0-9]*(-[a-z][a-z0-9]*)*"})]}),(0,t.jsxs)("label",{className:"block",children:["Server URL",(0,t.jsx)(o.f,{required:!0,type:"url",value:p,onChange:e=>{b(e.target.value)},placeholder:"https://example.com/mcp"})]}),(0,t.jsxs)("label",{className:"block",children:["Authentication",(0,t.jsx)("select",{className:"field",value:w,onChange:e=>{S(f.parse(e.target.value))},children:g.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]}),"headers"===w?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"block",children:["Bearer token",(0,t.jsx)(o.f,{type:"password",autoComplete:"off",value:C,onChange:e=>{_(e.target.value)}})]}),(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Custom authentication headers"}),(0,t.jsxs)("label",{className:"block",children:["Headers as a JSON object",(0,t.jsx)(c.f,{value:N,onChange:e=>{k(e.target.value)},placeholder:'{"X-API-Key":"..."}'})]})]})]}):null,(0,t.jsxs)("details",{children:[(0,t.jsx)("summary",{children:"Transport settings"}),(0,t.jsxs)("label",{className:"block",children:["Connection transport",(0,t.jsx)("select",{className:"field",value:x,onChange:e=>{v(h.parse(e.target.value))},children:j.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})]})]}),R?(0,t.jsx)("p",{role:"alert",children:R}):null,(0,t.jsx)(i.f,{disabled:P,type:"submit",children:P?"Saving…":"Add connection"})]})}function w({project:e,plugins:n,canManage:a,onChanged:l,onDirtyChange:s}){let[i,o]=(0,r.useState)({}),c=Object.values(i).some(Boolean),u=(0,r.useCallback)((e,t)=>{o(n=>n[e]===t?n:{...n,[e]:t})},[]),d=(0,r.useCallback)(e=>{u("create",e)},[u]);return(0,r.useEffect)(()=>(s(c),()=>{s(!1)}),[c,s]),(0,t.jsxs)("section",{className:"panel space-y-4",children:[(0,t.jsx)("h2",{children:"Remote MCP connections"}),(0,t.jsx)("p",{children:"Use tools from your own servers in this project’s code and actions. Connections run from the project runner."}),n.map(e=>(0,t.jsx)(v,{plugin:e,canManage:a,onChanged:l,onDirtyChange:u},e.id)),a?(0,t.jsx)(y,{project:e,onSaved:l,onDirtyChange:d},e):(0,t.jsx)("p",{children:"Ask an administrator to connect a server or change tool access."})]})}var S=e.i(23920);async function C(e){return a.U.plugins.marketplace.query(void 0,{signal:e})}function _({releases:e}){let n=(0,s.f)(C),[a,l]=(0,r.useState)(""),i=a.trim().toLowerCase().split(/\s+/).filter(Boolean),c=(n.data??[]).filter(t=>{let n=[t.display_name,t.description,t.category,...t.tags,...t.use_cases].join(" ").toLowerCase();return e.every(e=>e.slug!==t.slug)&&i.every(e=>n.includes(e))});return(0,t.jsxs)("section",{className:"panel space-y-4",children:[(0,t.jsx)("h2",{children:"Discover plugins"}),(0,t.jsx)("p",{children:"Explore the OrgSDK plugin catalog. Plugins without a published release can be inspected on the website; installation becomes available when a compatible release is published."}),(0,t.jsx)("a",{className:"underline",href:"https://orgsdk.ai/plugins",target:"_blank",rel:"noreferrer",children:"Browse plugins on orgsdk.ai ↗"}),(0,t.jsxs)("label",{className:"block",children:["Search plugin catalog",(0,t.jsx)(o.f,{type:"search",value:a,onChange:e=>{l(e.target.value)},placeholder:"Search names, categories or use cases"})]}),(0,t.jsx)(x.f,{...n}),n.isLoading||n.error||0!==c.length?null:(0,t.jsx)("p",{children:"No additional plugins match this search."}),(0,t.jsx)("div",{className:"grid gap-4 md:grid-cols-2",children:c.map(e=>(0,t.jsxs)("article",{className:"rounded-lg border p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(S.f,{url:"string"==typeof e.icon_url?e.icon_url:""}),(0,t.jsx)("h3",{children:e.display_name})]}),(0,t.jsxs)("p",{className:"small",children:[e.category," ·"," ","available"===e.release_status?"Release listed on marketplace":"Awaiting release"]}),(0,t.jsx)("p",{children:e.description}),"number"==typeof e.tool_count?(0,t.jsxs)("p",{className:"small",children:[e.tool_count," functions"]}):null,(0,t.jsx)("ul",{className:"my-3 list-inside list-disc text-sm",children:e.use_cases.map(e=>(0,t.jsx)("li",{children:e},e))}),(0,t.jsxs)("a",{className:"inline-flex min-h-11 items-center underline",href:e.url,target:"_blank",rel:"noreferrer",children:["Explore ",e.display_name," ↗"]})]},e.slug))})]})}function N({plugin:e,auth:n,onConnected:s}){let[c,u]=(0,r.useState)(`${e.slug} connection`),[d,p]=(0,r.useState)(""),[f,h]=(0,r.useState)(""),[m,g]=(0,r.useState)(""),[j,b]=(0,r.useState)(!1),[x,v]=(0,r.useState)(""),y=n.provider;if(!y)return null;let w=async()=>{b(!0),v("");try{if("oauth2"===n.type){let t=await a.U.credentials.beginOAuth.mutate({plugin:e.id,name:c,client_id:f,client_secret:m});g(""),location.assign(t.authorization_url);return}let t="github"===e.slug?"secret_token":"secret_apiKey",r=await a.U.credentials.create.mutate({name:c,provider:y,secret:{[t]:d}});p(""),await s(r.id)}catch(e){v((0,l.f)(e))}finally{b(!1)}};return(0,t.jsxs)("details",{className:"my-4 rounded-lg border p-4",children:[(0,t.jsxs)("summary",{children:["Connect ",n.label??e.slug]}),(0,t.jsxs)("label",{children:["Connection name",(0,t.jsx)(o.f,{value:c,onChange:e=>{u(e.target.value)},disabled:j})]}),"oauth2"===n.type?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{children:"Use your own OAuth application. Register this redirect URL:"}),(0,t.jsxs)("code",{className:"break-all",children:[location.origin,"/oauth/callback"]}),(0,t.jsxs)("label",{children:["Client ID",(0,t.jsx)(o.f,{value:f,onChange:e=>{h(e.target.value)},disabled:j})]}),(0,t.jsxs)("label",{children:["Client secret",(0,t.jsx)(o.f,{type:"password",autoComplete:"off",value:m,onChange:e=>{g(e.target.value)},disabled:j})]})]}):(0,t.jsxs)("label",{children:[n.label??"API token",(0,t.jsx)(o.f,{type:"password",autoComplete:"off",value:d,onChange:e=>{p(e.target.value)},disabled:j})]}),(0,t.jsx)(i.f,{type:"button",className:"mt-3",disabled:j||!c.trim()||("oauth2"===n.type?!f||!m:!d),onClick:()=>{w()},children:"Connect"}),x?(0,t.jsx)("p",{role:"alert",children:x}):null]})}var k=e.i(78688);function P({slug:e,metadata:n}){let{tools:a,isComplete:l}=(0,k.o)(n),[s,i]=(0,r.useState)(""),c=s.trim().toLowerCase().split(/\s+/).filter(Boolean),u=a.filter(e=>c.every(t=>`${e.name} ${e.description}`.toLowerCase().includes(t))),d=e.replaceAll(/-([a-z])/g,(e,t)=>t.toUpperCase());return(0,t.jsxs)("details",{className:"my-3 min-w-0 rounded-lg border p-3",children:[(0,t.jsxs)("summary",{children:["Capabilities · ",a.length," functions"]}),l?null:(0,t.jsx)("p",{className:"small",children:"Function information is incomplete for this release."}),a.length>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"my-3 block",children:["Find a function",(0,t.jsx)(o.f,{type:"search",value:s,onChange:e=>{i(e.target.value)},placeholder:"Search functions or descriptions"})]}),(0,t.jsxs)("p",{className:"small",role:"status",children:[u.length," of ",a.length," functions"]}),(0,t.jsx)("div",{className:"max-h-80 space-y-3 overflow-auto",children:u.map(e=>(0,t.jsxs)("details",{className:"min-w-0 rounded border p-3",children:[(0,t.jsx)("summary",{className:"break-words",children:(0,t.jsxs)("code",{children:[d,".",e.name]})}),(0,t.jsx)("p",{className:"small my-2",children:e.description}),(0,t.jsx)("dl",{className:"space-y-2 text-sm",children:e.parameters.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("dt",{className:"break-words font-medium",children:[e.name,e.optional?" (optional)":"",":"," ",(0,t.jsx)("code",{children:e.type})]}),e.description?(0,t.jsx)("dd",{children:e.description}):null]},e.name))}),e.returnType?(0,t.jsxs)("p",{className:"small mt-2 break-words",children:["Returns: ",(0,t.jsx)("code",{children:e.returnType})]}):null]},e.name))}),0===u.length?(0,t.jsx)("p",{children:"No matching functions."}):null]}):(0,t.jsx)("p",{className:"small",children:"No functions are declared in this metadata."})]})}var O=e.i(85951),R=e.i(79258),A=e.i(56420);let M={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};M.node;let I=(0,A.f)(M);var E=e.i(19877),z=e.i(15080),U=e.i(59037),L=e.i(87309),T=e.i(94757),$=e.i(75016);let D=(0,n.default)(async()=>{let t=await e.A(96001);return t.configureMonaco(),t.default},{loadableGenerated:{modules:[160]},ssr:!1}),B='export const safeFunctions = [{\n name: "greet",\n handler: (name: string) => `Hello, ${name}!`\n}];',F=d.z.record(p.z.string(),E.z.json());async function q(e){let[t,n]=await Promise.all([(0,z.p)(e),(0,z._)(e)]);return{plugins:t,credentials:n}}async function W(e){return a.U.plugins.catalog.query(void 0,{signal:e})}function J({canManage:e,onDirtyChange:n}){let u=(0,s.f)(q),d=(0,s.f)(W),p=(d.data??[]).filter((e,t,n)=>n.findIndex(t=>t.slug===e.slug)===t),{selected:f,projects:h}=(0,T.useWorkspace)(),m=h.find(e=>e.id===f),g=(u.data?.plugins??[]).filter(e=>e.project===f),[j,b]=(0,r.useState)(""),[v,y]=(0,r.useState)(""),C=v.trim().toLowerCase().split(/\s+/).filter(Boolean),A=p.filter(e=>{let t=[e.display_name,e.description,e.category,...(0,k.o)(e.tools).tools.map(e=>`${e.name} ${e.description}`)].join(" ").toLowerCase();return C.every(e=>t.includes(e))}),[M,E]=(0,r.useState)(""),[z,G]=(0,r.useState)("1.0.0"),[H,K]=(0,r.useState)(""),[V,Q]=(0,r.useState)(B),[X,Y]=(0,r.useState)(""),[Z,ee]=(0,r.useState)("{}"),et=g.find(e=>e.id===j),en=et?.distribution==="external",er=(0,k.u)(et?.auth),[ea,el]=(0,r.useState)(!1),[es,ei]=(0,r.useState)(""),[eo,ec]=(0,r.useState)(""),eu=JSON.stringify({slug:M,version:z,description:H,source:V,credential:X,configuration:Z}),[ed,ep]=(0,r.useState)(JSON.stringify({slug:"",version:"1.0.0",description:"",source:B,credential:"",configuration:"{}"})),[ef,eh]=(0,r.useState)(!1),em=eu!==ed,eg=(0,L.h)();if((0,U.f)(em||ef,n),!m)return(0,t.jsxs)("section",{className:"panel space-y-4",children:[(0,t.jsx)("h2",{children:"Project plugins"}),(0,t.jsx)("p",{children:"Create a project before installing and configuring its tools."}),(0,t.jsx)($.f,{href:"/projects/?new=1",children:"Create project"})]});let ej=e=>{let t={slug:e?.slug??"",version:e?.version??"1.0.0",description:e?.description??"",source:e?.source??B,credential:e?.credential??"",configuration:JSON.stringify(e?.configuration??{},null,2)};b(e?.id??""),E(t.slug),G(t.version),K(t.description),Q(t.source),Y(t.credential),ee(t.configuration),ep(JSON.stringify(t))},eb=async e=>{(!em||await eg())&&ej(e)},ex=async e=>{el(!0),ei(""),ec("");try{await e(),await u.refresh()}catch(e){ei((0,l.f)(e))}finally{el(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w,{project:f,plugins:g.filter(e=>"mcp"===e.distribution),canManage:e,onChanged:u.refresh,onDirtyChange:eh}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Plugin marketplace"}),(0,t.jsxs)("p",{children:["Install optional tools for ",m.name," from the external marketplace. This project owns its plugin configuration and credentials."]}),(0,t.jsxs)("p",{className:"small mt-3",children:["Project: ",(0,t.jsx)("strong",{children:m.name})]}),(0,t.jsx)(x.f,{...d}),(0,t.jsxs)("label",{className:"my-4 block",children:["Find plugins or capabilities",(0,t.jsx)(o.f,{type:"search",value:v,onChange:e=>{y(e.target.value)},placeholder:"Search plugins, functions or descriptions"})]}),d.isLoading||d.error||!(p.length>0)||0!==A.length?null:(0,t.jsx)("p",{children:"No plugins match this search."}),d.isLoading||d.error||d.data?.length!==0?null:(0,t.jsx)("p",{children:"No external releases are available from the configured marketplace. Your projects can run without plugins."}),(0,t.jsx)("div",{className:"grid gap-4 md:grid-cols-2",children:A.map(n=>{let r=g.find(e=>e.slug===n.slug);return(0,t.jsxs)("article",{className:"min-w-0 rounded-lg border p-4","aria-label":n.display_name,children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(S.f,{url:(0,k.g)(n.marketplace)}),(0,t.jsx)("h3",{children:n.display_name})]}),(0,t.jsxs)("p",{className:"small",children:[n.category," · v",n.version]}),(0,t.jsx)("p",{children:n.description}),(0,t.jsx)(P,{slug:n.slug,metadata:n.tools}),(0,t.jsx)("p",{className:"small",children:n.package_url?"Downloadable package. The runner installs this pinned release for the selected project.":"Local package. Install this package on the selected project’s runner first using the executor CLI with --file. Saving its configuration here does not install the package."}),e&&r?.distribution==="external"&&r.digest!==n.digest?(0,t.jsx)(i.f,{variant:"outline",disabled:ea,onClick:()=>{ex(async()=>{em&&!await eg()||(ej(await a.U.plugins.update.mutate({id:r.id,version:n.version,refresh_bundle:!0})),ec("Plugin updated for future runs. Older runs still require their original executor image."))})},children:"Update plugin"}):null,(0,t.jsxs)("details",{className:"my-3",children:[(0,t.jsx)("summary",{children:"Documentation"}),(0,t.jsx)("p",{className:"small",children:"Upstream reference documentation. Use the connection form below for this installation."}),(0,t.jsx)(O.f,{className:"max-h-80 overflow-auto",content:n.documentation})]}),r?(0,t.jsx)(i.f,{variant:"outline",onClick:()=>{eb(r)},children:"Configure"}):null,!r&&e?(0,t.jsx)(i.f,{disabled:ea,onClick:()=>{ex(async()=>{em&&!await eg()||(ej(await a.U.plugins.create.mutate({project:f,slug:n.slug,version:n.version,distribution:"external",enabled:!0})),ec("Plugin enabled for the selected project. The runner downloads and verifies its package. Connect credentials if required."))})},children:"Enable plugin"}):null,r||e?null:(0,t.jsx)("p",{children:"Ask an administrator to enable this plugin."})]},n.slug)})})]}),(0,t.jsx)(_,{releases:d.data??[]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)(x.f,{...u}),(0,t.jsx)("div",{className:"panel-title",children:(0,t.jsxs)("h2",{children:[(0,t.jsx)(R.f,{size:18})," Installed plugins"]})}),u.isLoading||u.error||0!==g.length?void 0:(0,t.jsxs)("div",{className:"resource-empty",children:[(0,t.jsx)(R.f,{size:30}),(0,t.jsx)("h3",{children:"No plugins installed"}),(0,t.jsx)("p",{children:"Installed plugins will appear here. Ask your workspace administrator to provision reviewed tools."})]}),g.filter(e=>"mcp"!==e.distribution).map(n=>(0,t.jsxs)("div",{className:"resource-row",children:[(0,t.jsx)(S.f,{url:n.icon_url,size:24}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"string"==typeof n.display_name?n.display_name:n.slug}),(0,t.jsxs)("small",{children:[m.name," · v",n.version," ·"," ",n.enabled?"Enabled":"Disabled"," ·"," ",n.description]})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(i.f,{variant:"outline",size:"sm",onClick:()=>{eb(n)},children:"Inspect"}),e?(0,t.jsxs)(i.f,{variant:"ghost",size:"sm",disabled:ea,onClick:()=>{ex(async()=>{await a.U.plugins.update.mutate({id:n.id,enabled:!n.enabled}),ec(n.enabled?"Plugin disabled for future runs.":"Plugin enabled.")})},children:[(0,t.jsx)(I,{size:13}),n.enabled?"Disable":"Enable"]}):void 0]})]},n.id))]}),j?(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("h2",{children:["Plugin: ",M]}),et?.distribution==="external"?(0,t.jsx)(P,{slug:et.slug,metadata:et.tools}):null,(0,t.jsx)("p",{className:"small",children:en?"This plugin comes from an external release. Select a matching credential and configure it below.":"Changed source requires a new version. Existing runs keep their pinned plugin source."}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),ex(async()=>{let e={version:z,description:H,...en?{configuration:F.parse(JSON.parse(Z))}:{source:V},credential:X||null};await a.U.plugins.update.mutate({id:j,...e}),ep(eu),ec("Plugin saved for its project.")})},children:[(0,t.jsxs)("div",{className:"row",children:[(0,t.jsxs)("label",{children:["Plugin slug",(0,t.jsx)(o.f,{required:!0,value:M,disabled:!0,onChange:e=>{E(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Plugin version",(0,t.jsx)(o.f,{required:!0,value:z,disabled:en||ea||!e,onChange:e=>{G(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Plugin credential",(0,t.jsxs)("select",{value:X,disabled:ea||!e,onChange:e=>{Y(e.target.value)},children:[(0,t.jsx)("option",{value:"",children:"No credential"}),u.data?.credentials.filter(e=>!en||e.provider===er.provider).map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]})]}),(0,t.jsxs)("label",{children:["Description",(0,t.jsx)(o.f,{value:H,disabled:ea||!e,onChange:e=>{K(e.target.value)}})]}),en?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"small",children:er.hint??"No additional setup instructions."}),(0,t.jsx)("p",{children:(0,t.jsx)($.f,{href:"/credentials/",children:"Manage credentials"})}),(0,t.jsxs)("label",{children:["Configuration (JSON)",(0,t.jsx)(c.f,{value:Z,disabled:ea||!e,onChange:e=>{ee(e.target.value)}})]})]}):(0,t.jsxs)("div",{className:"source-pane",children:[(0,t.jsxs)("div",{className:"source-toolbar",children:[(0,t.jsx)("span",{children:"plugin.ts"}),(0,t.jsx)("span",{children:"TypeScript safe-functions"})]}),(0,t.jsx)("div",{className:"desktop-editor",children:(0,t.jsx)(D,{actionId:`plugin-${j||"new"}`,value:V,onChange:Q,readOnly:ea||!e})}),(0,t.jsx)("div",{className:"mobile-editor",children:(0,t.jsxs)("label",{children:["Plugin source",(0,t.jsx)(c.f,{className:"code",rows:12,value:V,readOnly:ea||!e,onChange:e=>{Q(e.target.value)}})]})})]}),e?(0,t.jsx)(i.f,{type:"submit",className:"mt-4",disabled:ea||!M.trim()||!z.trim(),children:"Save plugin"}):(0,t.jsx)("p",{className:"small",children:"Only owners and admins can update plugins."}),e&&j?(0,t.jsx)(i.f,{type:"button",variant:"outline",className:"ml-3 mt-4",disabled:ea,onClick:()=>{ex(async()=>{await eg({title:"Remove this plugin?",description:"Its tools will be removed from future project runs. Existing runs retain their pinned source.",actionLabel:"Remove plugin"})&&(await a.U.plugins.delete.mutate({id:j}),ej(),ec("Plugin removed."))})},children:"Remove plugin"}):void 0]}),en&&e&&!em?(0,t.jsx)(N,{plugin:et,auth:er,onConnected:async e=>{try{let t=await a.U.plugins.update.mutate({id:et.id,credential:e});ej(t),ec("Credential connected for this project’s plugin.")}finally{await u.refresh()}}},et.id):null]}):void 0,es?(0,t.jsx)("p",{className:"error",role:"alert",children:es}):void 0,eo?(0,t.jsx)("p",{className:"notice",role:"status",children:eo}):void 0]})}e.s(["default",0,function(){let{canManage:e,setDirty:n,selected:r}=(0,T.useWorkspace)();return(0,t.jsx)(J,{canManage:e,onDirtyChange:n},r)}],33103)},93479,e=>{"use strict";var t=e.i(18050),n=e.i(71645),r=e.i(39689);let a=n.forwardRef(({className:e,type:n,...a},l)=>(0,t.jsx)("input",{type:n,className:(0,r.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:l,...a}));a.displayName="Input",e.s(["f",0,a])},24687,e=>{"use strict";var t=e.i(18050),n=e.i(71645),r=e.i(39689);let a=n.forwardRef(({className:e,...n},a)=>(0,t.jsx)("textarea",{className:(0,r.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...n}));a.displayName="Textarea",e.s(["f",0,a])},23920,e=>{"use strict";var t=e.i(18050),n=e.i(5500),n=n,r=e.i(79258),a=e.i(71645);e.s(["f",0,function({url:e,size:l=32}){let s=function(e){if(!e)return"";try{let t=new URL(e);return"https:"!==t.protocol||t.username||t.password?"":t.href}catch{return""}}(e),[i,o]=(0,a.useState)("");return s&&i!==s?(0,t.jsx)(n.Image,{src:s,alt:"",width:l,height:l,unoptimized:!0,referrerPolicy:"no-referrer",className:"shrink-0 object-contain",onError:()=>{o(s)}}):(0,t.jsx)(r.f,{size:l,className:"shrink-0","aria-hidden":"true"})}],23920)},59037,e=>{"use strict";var t=e.i(71645);e.s(["f",0,function(e,n){(0,t.useEffect)(()=>{n(e);let t=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",t),()=>{removeEventListener("beforeunload",t),n(!1)}},[e,n])}])},78688,e=>{"use strict";function t(e){return null===e||"object"!=typeof e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e))}function n(e){return"string"==typeof e?e:""}e.s(["o",0,function(e){if(!Array.isArray(e))return{tools:[],isComplete:!1};let r=[],a=!0;for(let l of e){let e=t(l),s=n(e.name);if(!s){a=!1;continue}let i=[];if(Array.isArray(e.parameters))for(let r of e.parameters){let e=t(r);if(!n(e.name)){a=!1;continue}i.push({name:n(e.name),type:n(e.type),description:n(e.description),optional:!0===e.optional})}r.push({name:s,description:n(e.description),parameters:i,returnType:n(e.returnType)})}return{tools:r,isComplete:a}},"u",0,function(e){let n=t(e);return{..."string"==typeof n.type&&{type:n.type},..."string"==typeof n.provider&&{provider:n.provider},..."string"==typeof n.label&&{label:n.label},..."string"==typeof n.hint&&{hint:n.hint}}},"g",0,function(e){return n(t(e).icon_url)}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809),i=e.r(18050),s=a._(e.r(71645)),u=e.r(95057),l=e.r(8372),c=e.r(18581),f=e.r(18967),d=e.r(5550),p=e.r(88540),h=e.r(91949),m=e.r(73668),g=e.r(9396);function y(t){var r;let n,o,a,[y,b]=(0,s.useOptimistic)(h.IDLE_LINK_STATUS),j=(0,s.useRef)(null),{href:v,as:w,children:S,prefetch:P=null,passHref:C,replace:N,shallow:E,scroll:_,onClick:T,onMouseEnter:U,onTouchStart:O,legacyBehavior:$=!1,onNavigate:R,transitionTypes:k,ref:A,unstable_dynamicOnHover:L,...I}=t;n=S,$&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let M=s.default.useContext(l.AppRouterContext),F=!1!==P,B=!1===P?"none":!0===P?"full":"auto",D="none"!==B?"auto"===B?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,K="string"==typeof(r=w||v)?r:(0,u.formatUrl)(r);if($){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");o=s.default.Children.only(n)}let z=$?o&&"object"==typeof o&&o.ref:A,q,W=s.default.useCallback(e=>(null!==M&&(j.current=(0,h.mountLinkInstance)(e,K,M,D,F,b,q)),()=>{j.current&&((0,h.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,h.unmountPrefetchableInstance)(e)}),[F,K,M,D,b,q]),V={ref:(0,c.useMergedRef)(W,z),onClick(t){$||"function"!=typeof T||T(t),$&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!M||t.defaultPrevented||function(t,r,n,o,a,i,s,u="none"){if("u">typeof window){let l,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((l=t.currentTarget.getAttribute("target"))&&"_self"!==l||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{navigate:f}=e.r(32916);f(r,o?"replace":"push",!1===a?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,s,u)}}(t,K,j,N,_,R,k,B)},onMouseEnter(e){$||"function"!=typeof U||U(e),$&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),M&&F&&(0,h.onNavigationIntent)(e.currentTarget,!0===L)},onTouchStart:function(e){$||"function"!=typeof O||O(e),$&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),M&&F&&(0,h.onNavigationIntent)(e.currentTarget,!0===L)}};return(0,f.isAbsoluteUrl)(K)?V.href=K:$&&!C&&("a"!==o.type||"href"in o.props)||(V.href=(0,d.addBasePath)(K)),a=$?s.default.cloneElement(o,V):(0,i.jsx)("a",{...I,...V,children:n}),(0,i.jsx)(x.Provider,{value:y,children:a})}let x=(0,s.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(71645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=a(e,n)),t&&(o.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return l},urlObjectKeys:function(){return u}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",s=e.hash||"",u=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(l+=":"+e.port)),u&&"object"==typeof u&&(u=String(a.urlQueryToSearchParams(u)));let c=e.search||u&&`?${u}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==l?(l="//"+(l||""),o&&"/"!==o[0]&&(o="/"+o)):l||(l=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),o=o.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${l}${o}${c}${s}`}let u=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return s(e)}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(18967),o=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return v},MissingStaticPage:function(){return j},NormalizeError:function(){return x},PageNotFoundError:function(){return b},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return f},getLocationOrigin:function(){return l},getURL:function(){return c},isAbsoluteUrl:function(){return u},isResSent:function(){return d},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return w}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,u=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&s.test(e)};function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=l();return e.substring(t.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&d(r))return n;if(!n)throw Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class x extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class j extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class v extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},76046,e=>{"use strict";e.i(44362);var t=e.i(14778);e.s(["k",0,function(){location.assign(function(e){let t=new URLSearchParams(e).get("next");if(!t||!t.startsWith("/")||t.startsWith("//")||t.includes("\\"))return"/";for(let e of t)if((e.codePointAt(0)??0)<=32)return"/";let r=new URL(t,location.origin);return r.origin===location.origin?`${r.pathname}${r.search}${r.hash}`:"/"}(location.search))},"z",0,"Confirm your identity below, then retry your change.","$",0,function(e){return(0,t.f)(e)&&e.data?.code==="UNAUTHORIZED"},"y",0,function(){let e=`${location.pathname}${location.search}${location.hash}`;location.replace(`/accounts/login/?next=${encodeURIComponent(e)}`)},"u",0,function(e){return!e.is_authenticated&&e.flows.some(e=>"mfa_authenticate"===e.id)}])},11105,92229,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(76046),o=e.i(95813);let a=(0,r.createContext)(void 0);function i(){let e=(0,r.useContext)(a);return(t,r)=>e&&(0,n.$)(t)?(e(),n.z):(0,o.f)(t,r)}e.s(["T",0,a,"G",0,i],92229);var s=e.i(19455),u=e.i(93479);e.s(["j",0,function({label:e,...r}){return(0,t.jsxs)("label",{children:[e,(0,t.jsx)(u.f,{...r})]})},"F",0,function({children:e,submitLabel:n,onSubmit:o}){let a=i(),[u,l]=(0,r.useState)(!1),[c,f]=(0,r.useState)(""),[d,p]=(0,r.useState)("");async function h(e){e.preventDefault();let t=new FormData(e.currentTarget);l(!0),f(""),p("");try{p(await o(t)??"")}catch(e){f(a(e,"Unable to save. Please try again."))}finally{l(!1)}}return(0,t.jsxs)("form",{onSubmit:e=>{h(e)},children:[(0,t.jsxs)("fieldset",{disabled:u,className:"min-w-0 border-0 p-0",children:[e,(0,t.jsx)(s.f,{type:"submit",disabled:u,children:u?"Please wait…":n})]}),c&&(0,t.jsx)("p",{role:"alert",className:"error mt-4",children:c}),d&&(0,t.jsx)("p",{role:"status",className:"notice mt-4",children:d})]})}],11105)},15448,e=>{"use strict";var t=e.i(18050),r=e.i(22016),n=e.i(2716);e.s(["f",0,function({title:e,description:o,children:a,showAccountNavigation:i=!1}){return(0,t.jsxs)("div",{className:"min-h-screen",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between border-b border-slate-200 bg-white px-6 py-4 sm:px-10",children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-2 text-lg font-semibold text-slate-900",children:[(0,t.jsx)(n.f,{className:"h-9 w-9"}),"OrgSDK"]}),(0,t.jsx)(r.default,{href:"/",className:"text-sm",children:"Back to app"})]}),(0,t.jsxs)("main",{className:"mx-auto w-full max-w-xl px-4 py-10 sm:py-16",children:[i&&(0,t.jsxs)("nav",{"aria-label":"Account",className:"mb-6 flex flex-wrap gap-4 text-sm",children:[(0,t.jsx)(r.default,{href:"/accounts/email/",children:"Account"}),(0,t.jsx)(r.default,{href:"/accounts/password/change/",children:"Password"}),(0,t.jsx)(r.default,{href:"/accounts/2fa/",children:"Two-factor authentication"}),(0,t.jsx)(r.default,{href:"/accounts/logout/",children:"Sign out"})]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h1",{className:"!text-2xl",children:e}),o&&(0,t.jsx)("p",{className:"mb-6 text-sm",children:o}),a]})]})]})}])},4767,e=>{"use strict";var t=e.i(18050),r=e.i(22016),n=e.i(71645),o=e.i(76046),a=e.i(73656),i=e.i(15448),s=e.i(11105),u=e.i(18879);e.s(["SignIn",0,function({signup:e=!1}){let[l,c]=(0,n.useState)(!1),[f,d]=(0,n.useState)(""),[p,h]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=new AbortController;return(0,a.m)(e.signal).then(()=>a.U.auth.browserSession.query(void 0,{signal:e.signal})).then(t=>{if(!e.signal.aborted){if(t.is_authenticated)return void(0,o.k)();h((0,o.u)(t)),c(!0)}}).catch(()=>{e.signal.aborted||d("Unable to load your session. Reload this page to try again.")}),()=>{e.abort()}},[]),(0,t.jsxs)(i.f,{title:p?"Two-factor authentication":e?"Create your account":"Welcome back",description:p?"Enter a code from your authenticator app or an unused recovery code.":"Your projects, actions and workspace in one place.",children:[f&&(0,t.jsx)("p",{role:"alert",className:"error",children:f}),!l&&!f&&(0,t.jsx)("p",{role:"status",children:"Loading your session…"}),l&&(0,t.jsx)(s.F,{submitLabel:p?"Verify code":e?"Create account":"Sign in",onSubmit:async t=>{let r=await (p?a.U.auth.mfaAuthenticate.mutate({code:(0,u.f)(t,"code")}):e?a.U.auth.signup.mutate({email:(0,u.f)(t,"email"),username:(0,u.f)(t,"username"),password:(0,u.f)(t,"password")}):a.U.auth.login.mutate({email:(0,u.f)(t,"email"),password:(0,u.f)(t,"password")}));if(r.is_authenticated)return(0,o.k)(),"";if((0,o.u)(r))return h(!0),"";throw Error("Unable to sign in. Please try again.")},children:p?(0,t.jsx)(s.j,{label:"Authentication or recovery code",name:"code",autoComplete:"one-time-code",required:!0}):(0,t.jsxs)(t.Fragment,{children:[e&&(0,t.jsx)(s.j,{label:"Username",name:"username",autoComplete:"username",required:!0}),(0,t.jsx)(s.j,{label:"Email address",name:"email",type:"email",autoComplete:e?"email":"username",required:!0}),(0,t.jsx)(s.j,{label:"Password",name:"password",type:"password",autoComplete:e?"new-password":"current-password",required:!0})]})}),(0,t.jsxs)("div",{className:"mt-6 flex flex-wrap gap-4 text-sm",children:[(0,t.jsx)(r.default,{href:e?"/accounts/login/":"/accounts/signup/",children:e?"Already have an account? Sign in":"Create an account"}),(0,t.jsx)(r.default,{href:"/accounts/password/reset/",children:"Forgot password?"})]})]})}])},93479,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(39689);let o=r.forwardRef(({className:e,type:r,...o},a)=>(0,t.jsx)("input",{type:r,className:(0,n.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...o}));o.displayName="Input",e.s(["f",0,o])},2716,e=>{"use strict";var t=e.i(18050);e.s(["f",0,function({className:e,...r}){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",className:e,...r,children:[(0,t.jsx)("circle",{cx:"32",cy:"32",r:"19",stroke:"#4f46e5",strokeWidth:"12"}),(0,t.jsx)("circle",{cx:"50",cy:"14",r:"6",fill:"#8b5cf6"})]})}])},18879,e=>{"use strict";e.s(["f",0,function(e,t){let r=e.get(t);return"string"==typeof r?r:""}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22016,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return m},useLinkStatus:function(){return v}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(90809),i=e.r(18050),a=u._(e.r(71645)),l=e.r(95057),c=e.r(8372),s=e.r(18581),f=e.r(18967),p=e.r(5550),d=e.r(88540),h=e.r(91949),g=e.r(73668),y=e.r(9396);function m(t){var r;let n,o,u,[m,v]=(0,a.useOptimistic)(h.IDLE_LINK_STATUS),P=(0,a.useRef)(null),{href:S,as:E,children:C,prefetch:_=null,passHref:j,replace:O,shallow:T,scroll:x,onClick:L,onMouseEnter:N,onTouchStart:R,legacyBehavior:w=!1,onNavigate:$,transitionTypes:M,ref:U,unstable_dynamicOnHover:A,...I}=t;n=C,w&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let k=a.default.useContext(c.AppRouterContext),B=!1!==_,F=!1===_?"none":!0===_?"full":"auto",K="none"!==F?"auto"===F?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,D="string"==typeof(r=E||S)?r:(0,l.formatUrl)(r);if(w){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");o=a.default.Children.only(n)}let z=w?o&&"object"==typeof o&&o.ref:U,W,q=a.default.useCallback(e=>(null!==k&&(P.current=(0,h.mountLinkInstance)(e,D,k,K,B,v,W)),()=>{P.current&&((0,h.unmountLinkForCurrentNavigation)(P.current),P.current=null),(0,h.unmountPrefetchableInstance)(e)}),[B,D,k,K,v,W]),J={ref:(0,s.useMergedRef)(q,z),onClick(t){w||"function"!=typeof L||L(t),w&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!k||t.defaultPrevented||function(t,r,n,o,u,i,a,l="none"){if("u">typeof window){let c,{nodeName:s}=t.currentTarget;if("A"===s.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{navigate:f}=e.r(32916);f(r,o?"replace":"push",!1===u?d.ScrollBehavior.NoScroll:d.ScrollBehavior.Default,n.current,a,l)}}(t,D,P,O,x,$,M,F)},onMouseEnter(e){w||"function"!=typeof N||N(e),w&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),k&&B&&(0,h.onNavigationIntent)(e.currentTarget,!0===A)},onTouchStart:function(e){w||"function"!=typeof R||R(e),w&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),k&&B&&(0,h.onNavigationIntent)(e.currentTarget,!0===A)}};return(0,f.isAbsoluteUrl)(D)?J.href=D:w&&!j&&("a"!==o.type||"href"in o.props)||(J.href=(0,p.addBasePath)(D)),u=w?a.default.cloneElement(o,J):(0,i.jsx)("a",{...I,...J,children:n}),(0,i.jsx)(b.Provider,{value:m,children:u})}let b=(0,a.createContext)(h.IDLE_LINK_STATUS),v=()=>(0,a.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(71645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=u(e,n)),t&&(o.current=u(t,n))},[e,t])}function u(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},95057,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",a=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(u.urlQueryToSearchParams(l)));let s=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),o&&"/"!==o[0]&&(o="/"+o)):c||(c=""),a&&"#"!==a[0]&&(a="#"+a),s&&"?"!==s[0]&&(s="?"+s),o=o.replace(/[?#]/g,encodeURIComponent),s=s.replace("#","%23"),`${n}${c}${o}${s}${a}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return a(e)}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return u}});let n=e.r(18967),o=e.r(52817);function u(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},18967,(e,t,r)=>{"use strict";e.i(47167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return m},MiddlewareNotFoundError:function(){return S},MissingStaticPage:function(){return P},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return g},ST:function(){return y},WEB_VITALS:function(){return u},execOnce:function(){return i},getDisplayName:function(){return f},getLocationOrigin:function(){return c},getURL:function(){return s},isAbsoluteUrl:function(){return l},isResSent:function(){return p},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return d},stringifyError:function(){return E}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=["CLS","FCP","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let a=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&a.test(e)};function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function s(){let{href:e}=window.location,t=c();return e.substring(t.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function d(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&p(r))return n;if(!n)throw Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let g="u">typeof performance,y=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class m extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class P extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class S extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11241,e=>{"use strict";var t=e.i(56420);let i={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};i.node;let a=(0,t.f)(i);e.s(["f",0,a],11241)},51757,e=>{"use strict";var t=e.i(56420);let i={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};i.node;let a=(0,t.f)(i);e.s(["f",0,a],51757)},59659,e=>{"use strict";var t=e.i(56420);let i={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};i.node;let a=(0,t.f)(i);e.s(["f",0,a],59659)},13581,29487,e=>{"use strict";var t=e.i(71645),i=e.i(95813);e.s(["f",0,function(e,a=0){let[s,r]=(0,t.useState)(),[n,l]=(0,t.useState)(""),[c,d]=(0,t.useState)(!0),o=(0,t.useRef)(void 0),u=(0,t.useRef)(!1),h=(0,t.useCallback)(async()=>{o.current?.abort();let t=new AbortController;o.current=t;try{let i=await e(t.signal);if(t.signal.aborted||!u.current)return;r(i),l("")}catch(e){!t.signal.aborted&&u.current&&l((0,i.f)(e))}finally{!t.signal.aborted&&u.current&&d(!1)}},[e]);return(0,t.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h()});let e=a>0?setInterval(()=>{h()},a):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[h,a]),{data:s,error:n,isLoading:c,refresh:h}}],13581);var a=e.i(18050),s=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:i}){return(0,a.jsxs)(a.Fragment,{children:[e?(0,a.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,a.jsxs)("div",{className:"error",role:"alert",children:[(0,a.jsx)("p",{children:t}),(0,a.jsx)(s.f,{variant:"outline",onClick:()=>{i()},children:"Try again"})]}):void 0]})}],29487)},16118,e=>{"use strict";var t=e.i(18050),i=e.i(6501),a=e.i(56420);let s={name:"pause",size:24,node:[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]};s.node;let r=(0,a.f)(s);var n=e.i(21357),l=e.i(59659),c=e.i(71645),d=e.i(40192),o=e.i(54105),u=e.i(19877),h=e.i(73656),f=e.i(95813),p=e.i(13581),x=e.i(15080),m=e.i(19455),v=e.i(90350),b=e.i(31084),j=e.i(24687),g=e.i(29487),y=e.i(87309),w=e.i(10505),k=e.i(94757),S=e.i(75016),N=e.i(59037);async function z(e){let[t,i]=await Promise.all([h.U.schedules.list.query(void 0,{signal:e}),(0,x.t)(e)]);return{schedules:t.results,actions:i}}function C({actionId:e=""}){let{selected:a,setDirty:s}=(0,k.useWorkspace)(),x=(0,p.f)(z),A=(x.data?.actions??[]).filter(t=>t.project===a&&(!e||t.id===e)),$=new Set(A.map(e=>e.id)),U=(x.data?.schedules??[]).filter(e=>$.has(e.action)),L=(0,y.h)(),[R,M]=(0,c.useState)(""),[P,E]=(0,c.useState)(e),[T,_]=(0,c.useState)(v.A),[q,O]=(0,c.useState)("{}"),[D,F]=(0,c.useState)({action:e,cron:v.A,inputs:"{}"}),I=P!==D.action||T!==D.cron||q!==D.inputs;(0,N.f)(I,s);let B=()=>{M(""),E(e),_(v.A),O("{}"),F({action:e,cron:v.A,inputs:"{}"})},[W,H]=(0,c.useState)(!1),[J,V]=(0,c.useState)(""),[K,Z]=(0,c.useState)(""),G=async e=>{H(!0),V(""),Z("");try{await e(),await x.refresh()}catch(e){V((0,f.f)(e))}finally{H(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsxs)("div",{className:"panel-title",children:[(0,t.jsxs)("h2",{children:[(0,t.jsx)(i.f,{size:18})," Scheduled work"]}),(0,t.jsxs)("span",{className:"badge",children:[U.length," schedules"]})]}),(0,t.jsx)(g.f,{...x}),x.isLoading||x.error||0!==U.length?void 0:(0,t.jsx)("p",{children:"No schedules yet. Choose an action below to automate it."}),U.map(e=>(0,t.jsxs)("div",{className:"resource-row",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(S.f,{href:`/actions/?${new URLSearchParams({project:a,action:e.action}).toString()}`,children:(0,t.jsx)("strong",{children:A.find(t=>t.id===e.action)?.name??"Action"})}),(0,t.jsxs)("small",{children:[(0,v.E)(e.cron)," ·"," ",e.enabled?`Next ${new Date(e.next_run_at).toLocaleString(void 0,{timeZone:"UTC"})+" UTC"}`:"Paused"]})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsxs)(m.f,{variant:"outline",size:"sm",disabled:W,onClick:()=>{G(async()=>{await h.U.schedules.update.mutate({id:e.id,enabled:!e.enabled}),Z(e.enabled?"Schedule paused.":"Schedule resumed.")})},children:[e.enabled?(0,t.jsx)(r,{size:13}):(0,t.jsx)(n.f,{size:13}),e.enabled?"Pause":"Resume"]}),(0,t.jsx)(m.f,{variant:"ghost",size:"sm",onClick:()=>{(async()=>{if(I&&!await L())return;let t={action:e.action,cron:e.cron,inputs:(0,w.A)(e.inputs)};M(e.id),E(t.action),_(t.cron),O(t.inputs),F(t)})()},children:"Edit"}),(0,t.jsx)(m.f,{variant:"ghost",size:"icon","aria-label":"Delete schedule",disabled:W,onClick:()=>{G(async()=>{await L({title:"Delete this schedule?",description:"Future scheduled runs will stop. Existing runs and their results will be retained.",actionLabel:"Delete schedule"})&&(await h.U.schedules.delete.mutate({id:e.id}),Z("Schedule deleted."))})},children:(0,t.jsx)(l.f,{size:14})})]})]},e.id))]}),(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:R?"Edit schedule":"Create a schedule"}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),G(async()=>{let e={action:P,cron:T,inputs:d.z.record(o.z.string(),u.z.json()).parse(JSON.parse(q))};R?await h.U.schedules.update.mutate({id:R,...e}):await h.U.schedules.create.mutate(e),Z("Schedule saved."),B()})},children:[(0,t.jsx)("div",{className:"row",children:(0,t.jsxs)("label",{children:["Action",(0,t.jsxs)("select",{required:!0,value:P,disabled:W,onChange:e=>{E(e.target.value)},children:[(0,t.jsx)("option",{value:"",children:"Choose an action"}),A.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]})]})}),(0,t.jsx)(b.f,{value:T,onChange:_,disabled:W}),(0,t.jsxs)("label",{children:["Scheduled inputs (JSON)",(0,t.jsx)(j.f,{className:"code",rows:3,value:q,disabled:W,onChange:e=>{O(e.target.value)}})]}),(0,t.jsxs)("div",{className:"row",children:[(0,t.jsx)(m.f,{type:"submit",disabled:W||!$.has(P),children:"Save schedule"}),R?(0,t.jsx)(m.f,{variant:"outline",type:"button",onClick:()=>{(async()=>{(!I||await L())&&B()})()},children:"Cancel editing"}):void 0]})]})]}),J?(0,t.jsx)("p",{className:"error",role:"alert",children:J}):void 0,K?(0,t.jsx)("p",{className:"notice",role:"status",children:K}):void 0]})}var A=e.i(59140);e.s(["default",0,function(){let{selected:e}=(0,k.useWorkspace)();return(0,t.jsx)(A.c,{current:"schedules",children:i=>(0,t.jsx)(C,{actionId:i},`${e}:${i}`)})}],16118)},93479,e=>{"use strict";var t=e.i(18050),i=e.i(71645),a=e.i(39689);let s=i.forwardRef(({className:e,type:i,...s},r)=>(0,t.jsx)("input",{type:i,className:(0,a.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...s}));s.displayName="Input",e.s(["f",0,s])},24687,e=>{"use strict";var t=e.i(18050),i=e.i(71645),a=e.i(39689);let s=i.forwardRef(({className:e,...i},s)=>(0,t.jsx)("textarea",{className:(0,a.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...i}));s.displayName="Textarea",e.s(["f",0,s])},59140,e=>{"use strict";var t=e.i(18050),i=e.i(71645),a=e.i(18566),s=e.i(11241),r=e.i(73656),n=e.i(13581),l=e.i(94757),c=e.i(75016),d=e.i(29487);let o=[{id:"editor",label:"Code & configuration",path:"/actions/"},{id:"runs",label:"Runs",path:"/runs/"},{id:"schedules",label:"Schedule",path:"/schedules/"},{id:"webhooks",label:"Webhooks",path:"/webhooks/"}];function u({action:e,current:i}){let a=e.project,r=new URLSearchParams({project:a,action:e.id});return(0,t.jsxs)("div",{className:"mb-6 min-w-0 space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)(c.f,{className:"inline-flex items-center gap-1 text-sm",href:`/actions/?${new URLSearchParams({project:a}).toString()}`,children:[(0,t.jsx)(s.f,{size:14,"aria-hidden":"true"})," All actions"]}),(0,t.jsx)("span",{className:"text-slate-300","aria-hidden":"true",children:"/"}),(0,t.jsx)("strong",{className:"min-w-0 break-words",children:e.name})]}),(0,t.jsx)("nav",{className:"flex flex-wrap gap-2","aria-label":"Action sections",children:o.map(e=>(0,t.jsx)(c.f,{href:`${e.path}?${r.toString()}`,"aria-current":i===e.id?"page":void 0,className:i===e.id?"rounded-md bg-indigo-50 px-3 py-2 text-sm font-medium text-indigo-700":"rounded-md px-3 py-2 text-sm text-slate-600 hover:bg-slate-100",children:e.label},e.id))})]})}function h({project:e,actionId:a,current:s,children:l}){let o=(0,i.useCallback)(async t=>{if(!a)return;let i=await r.U.actions.get.query({id:a},{signal:t});if(i.project!==e)throw Error("This action is not available in the selected project.");return i},[a,e]),f=(0,n.f)(o);return a&&(f.isLoading||f.error||f.data?.id!==a)?(0,t.jsx)(d.f,{...f}):(0,t.jsxs)(t.Fragment,{children:[f.data?(0,t.jsx)(u,{action:f.data,current:s}):(0,t.jsx)("p",{className:"mb-5",children:(0,t.jsx)(c.f,{href:`/actions/?${new URLSearchParams({project:e}).toString()}`,children:"Back to project actions"})}),l(a)]})}e.s(["F",0,u,"c",0,function({current:e,children:i}){let{selected:s}=(0,l.useWorkspace)(),r=(0,a.useSearchParams)().get("action")??"";return(0,t.jsx)(h,{project:s,actionId:r,current:e,children:i},`${s}:${r}`)}])},10505,79432,e=>{"use strict";var t=e.i(18050),i=e.i(56420);let a={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};a.node;let s=(0,i.f)(a);e.s(["f",0,s],79432);var r=e.i(51757);let n={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};n.node;let l=(0,i.f)(n),c={name:"shield-exclamation-point",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],aliases:["shield-alert"]};c.node;let d=(0,i.f)(c),o={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};o.node;let u=(0,i.f)(o);function h(e){return({chat:"Chat task",code:"Code execution",session:"Execution session",action:"Action run",validate:"Code validation",test:"Action tests"})[e]??e.replaceAll("_"," ")}e.s(["k",0,function({status:e}){let i={succeeded:r.f,waiting_approval:d,running:s,queued:l,failed:u,cancelled:u,interrupted:u}[e]??l;return(0,t.jsxs)("span",{className:`run-status status-${e}`,children:[(0,t.jsx)(i,{size:13,"aria-hidden":"true"}),e.replaceAll("_"," ")]})},"B",0,["queued","running","waiting_approval"],"A",0,function(e){return void 0===e?"":"string"==typeof e?e:JSON.stringify(e,void 0,2)},"N",0,function(e,t){let i=t.find(t=>t.id===e.project)?.name??"Project";return"chat"===e.operation?`${i} \xb7 ${(function(e,t){if(null!==e&&"object"==typeof e&&Object.hasOwn(e,t)){let i=Reflect.get(e,t);if("string"==typeof i)return i}return""})(e.inputs,"message").slice(0,70)}`:`${i} \xb7 ${h(e.operation)}`},"T",0,h],10505)},59037,e=>{"use strict";var t=e.i(71645);e.s(["f",0,function(e,i){(0,t.useEffect)(()=>{i(e);let t=e=>{e.preventDefault()};return e&&addEventListener("beforeunload",t),()=>{removeEventListener("beforeunload",t),i(!1)}},[e,i])}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13581,29487,e=>{"use strict";var t=e.i(71645),r=e.i(95813);e.s(["f",0,function(e,a=0){let[i,s]=(0,t.useState)(),[n,l]=(0,t.useState)(""),[o,d]=(0,t.useState)(!0),u=(0,t.useRef)(void 0),c=(0,t.useRef)(!1),f=(0,t.useCallback)(async()=>{u.current?.abort();let t=new AbortController;u.current=t;try{let r=await e(t.signal);if(t.signal.aborted||!c.current)return;s(r),l("")}catch(e){!t.signal.aborted&&c.current&&l((0,r.f)(e))}finally{!t.signal.aborted&&c.current&&d(!1)}},[e]);return(0,t.useEffect)(()=>{c.current=!0,queueMicrotask(()=>{c.current&&f()});let e=a>0?setInterval(()=>{f()},a):void 0;return()=>{c.current=!1,u.current?.abort(),clearInterval(e)}},[f,a]),{data:i,error:n,isLoading:o,refresh:f}}],13581);var a=e.i(18050),i=e.i(19455);e.s(["f",0,function({isLoading:e,error:t,refresh:r}){return(0,a.jsxs)(a.Fragment,{children:[e?(0,a.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,t?(0,a.jsxs)("div",{className:"error",role:"alert",children:[(0,a.jsx)("p",{children:t}),(0,a.jsx)(i.f,{variant:"outline",onClick:()=>{r()},children:"Try again"})]}):void 0]})}],29487)},29417,e=>{"use strict";var t=e.i(18050),r=e.i(19455),a=e.i(93479),i=e.i(24687),s=e.i(71645),n=e.i(15080),l=e.i(13581),o=e.i(73656),d=e.i(95813),u=e.i(94757),c=e.i(87309),f=e.i(29487);function m(){let e=(0,s.useId)(),m=(0,l.f)(n.l),h=m.data??[],{isDirty:b,setDirty:v}=(0,u.useWorkspace)(),x=(0,c.h)(),[g,p]=(0,s.useState)(""),[j,y]=(0,s.useState)(""),[w,S]=(0,s.useState)(""),[C,k]=(0,s.useState)(""),[N,T]=(0,s.useState)(""),[R,D]=(0,s.useState)(!1),I=async e=>{if(b&&!await x())return;let t=h.find(t=>t.id===e);p(e),y(t?.title??""),S(t?.content??""),v(!1),k(""),T("")},U=async()=>{if(!R){D(!0),k(""),T("");try{let e={title:j,content:w},t=g?await o.U.documents.update.mutate({id:g,...e}):await o.U.documents.create.mutate({...e,kind:"document"});p(t.id),y(t.title),S(t.content),v(!1),T("Document saved."),await m.refresh()}catch(e){k(`Could not save document. Your changes are still here. Try saving again. ${(0,d.f)(e)}`)}finally{D(!1)}}};return(0,t.jsxs)("section",{className:"panel",children:[(0,t.jsx)("h2",{children:"Documents & memory"}),(0,t.jsx)("p",{children:"Create shared workspace documents and review saved memory."}),(0,t.jsx)(f.f,{...m}),C?(0,t.jsx)("p",{role:"alert",className:"error",children:C}):void 0,N?(0,t.jsx)("p",{role:"status",className:"notice",children:N}):void 0,(0,t.jsxs)("label",{htmlFor:e,children:["Document",(0,t.jsxs)("select",{id:e,value:g,disabled:R||m.isLoading,onChange:e=>{I(e.target.value)},children:[(0,t.jsx)("option",{value:"",children:"New document"}),h.map(e=>(0,t.jsxs)("option",{value:e.id,children:[e.title," · ",e.kind]},e.id))]})]}),(0,t.jsxs)("form",{"aria-busy":R,onChange:()=>{v(!0),T("")},onSubmit:e=>{e.preventDefault(),U()},children:[(0,t.jsxs)("label",{children:["Title",(0,t.jsx)(a.f,{required:!0,maxLength:200,disabled:R,value:j,onChange:e=>{y(e.target.value)}})]}),(0,t.jsxs)("label",{children:["Content",(0,t.jsx)(i.f,{rows:12,disabled:R,value:w,onChange:e=>{S(e.target.value)}})]}),(0,t.jsx)(r.f,{type:"submit",disabled:R||!j.trim(),children:R?"Saving…":"Save document"})]})]})}e.s(["default",0,function(){return(0,t.jsx)(m,{})}],29417)},93479,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(39689);let i=r.forwardRef(({className:e,type:r,...i},s)=>(0,t.jsx)("input",{type:r,className:(0,a.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:s,...i}));i.displayName="Input",e.s(["f",0,i])},24687,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(39689);let i=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("textarea",{className:(0,a.f)("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...r}));i.displayName="Textarea",e.s(["f",0,i])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13581,29487,e=>{"use strict";var s=e.i(71645),r=e.i(95813);e.s(["f",0,function(e,t=0){let[i,a]=(0,s.useState)(),[l,n]=(0,s.useState)(""),[c,d]=(0,s.useState)(!0),o=(0,s.useRef)(void 0),u=(0,s.useRef)(!1),m=(0,s.useCallback)(async()=>{o.current?.abort();let s=new AbortController;o.current=s;try{let r=await e(s.signal);if(s.signal.aborted||!u.current)return;a(r),n("")}catch(e){!s.signal.aborted&&u.current&&n((0,r.f)(e))}finally{!s.signal.aborted&&u.current&&d(!1)}},[e]);return(0,s.useEffect)(()=>{u.current=!0,queueMicrotask(()=>{u.current&&m()});let e=t>0?setInterval(()=>{m()},t):void 0;return()=>{u.current=!1,o.current?.abort(),clearInterval(e)}},[m,t]),{data:i,error:l,isLoading:c,refresh:m}}],13581);var t=e.i(18050),i=e.i(19455);e.s(["f",0,function({isLoading:e,error:s,refresh:r}){return(0,t.jsxs)(t.Fragment,{children:[e?(0,t.jsx)("p",{role:"status",children:"Loading workspace data…"}):void 0,s?(0,t.jsxs)("div",{className:"error",role:"alert",children:[(0,t.jsx)("p",{children:s}),(0,t.jsx)(i.f,{variant:"outline",onClick:()=>{r()},children:"Try again"})]}):void 0]})}],29487)},93479,e=>{"use strict";var s=e.i(18050),r=e.i(71645),t=e.i(39689);let i=r.forwardRef(({className:e,type:r,...i},a)=>(0,s.jsx)("input",{type:r,className:(0,t.f)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...i}));i.displayName="Input",e.s(["f",0,i])},44727,e=>{"use strict";var s=e.i(18050),r=e.i(71645),t=e.i(73656),i=e.i(13581),a=e.i(18879),l=e.i(19455),n=e.i(93479),c=e.i(94757),d=e.i(29487),o=e.i(69212);let u={};function m({filters:e}){let a=(0,r.useCallback)(async s=>await t.U.audit.list.query(e,{signal:s}),[e]),{data:l,error:n,isLoading:c,refresh:o}=(0,i.f)(a);return(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Recorded events"}),(0,s.jsx)("p",{className:"small",children:"Newest first. Only event metadata is shown; values and credentials are never included."}),(0,s.jsx)(d.f,{isLoading:c,error:n,refresh:o}),l&&!c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{role:"status",children:[l.count," matching events"]}),0===l.results.length?(0,s.jsx)("p",{children:"No audit events match these filters."}):(0,s.jsx)("ol",{className:"grid gap-3","aria-label":"Audit events",children:l.results.map(e=>(0,s.jsxs)("li",{className:"rounded-md border p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap justify-between gap-2",children:[(0,s.jsx)("strong",{children:e.kind}),(0,s.jsx)("time",{dateTime:e.created_at,children:new Date(e.created_at).toLocaleString()})]}),(0,s.jsxs)("p",{className:"small",children:[e.actor_label,e.actor_id?` \xb7 Actor ID ${String(e.actor_id)}`:""]}),(0,s.jsxs)("p",{className:"break-all text-sm",children:["Object: ",e.object_id||"—"]}),(0,s.jsxs)("p",{className:"small break-all",children:["Event: ",e.id]})]},e.id))})]}):void 0]})}e.s(["AuditLog",0,function(){let{canManage:e,workspace:t}=(0,c.useWorkspace)(),[i,d]=(0,r.useState)(u);return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.K,{children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{children:"Audit log"}),(0,s.jsx)("p",{className:"small",children:"Review recorded workspace changes."})]})}),(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Filter events"}),(0,s.jsx)("p",{className:"small",children:"Exact matches for action, actor ID and object ID. Times use your local timezone; the start is included and the end is excluded."}),(0,s.jsxs)("form",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",onSubmit:e=>{e.preventDefault();let s=new FormData(e.currentTarget),r=e=>(0,a.f)(s,e).trim(),t={};r("kind")&&(t.kind=r("kind")),r("actor")&&(t.actor=Number(r("actor"))),r("object_id")&&(t.object_id=r("object_id")),r("since")&&(t.since=new Date(r("since")).toISOString()),r("before")&&(t.before=new Date(r("before")).toISOString()),d(t)},children:[(0,s.jsxs)("label",{children:["Action / kind",(0,s.jsx)(n.f,{name:"kind",placeholder:"document.updated",maxLength:100})]}),(0,s.jsxs)("label",{children:["Actor ID",(0,s.jsx)(n.f,{name:"actor",type:"number",min:1,step:1,placeholder:"Numeric member ID"})]}),(0,s.jsxs)("label",{children:["Object ID",(0,s.jsx)(n.f,{name:"object_id",maxLength:100})]}),(0,s.jsxs)("label",{children:["From (inclusive)",(0,s.jsx)(n.f,{name:"since",type:"datetime-local"})]}),(0,s.jsxs)("label",{children:["Before (exclusive)",(0,s.jsx)(n.f,{name:"before",type:"datetime-local"})]}),(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)(l.f,{type:"submit",children:"Apply filters"}),(0,s.jsx)(l.f,{variant:"outline",type:"reset",onClick:()=>{d(u)},children:"Clear"})]})]})]}),(0,s.jsx)(m,{filters:i},`${t}:${JSON.stringify(i)}`)]}):(0,s.jsxs)("section",{className:"panel",children:[(0,s.jsx)("h2",{children:"Audit log"}),(0,s.jsx)("p",{children:"Only workspace owners and admins can view the audit log."})]})}])},18879,e=>{"use strict";e.s(["f",0,function(e,s){let r=e.get(s);return"string"==typeof r?r:""}])}]);