@stigmer/server-slim 3.27.1 → 3.27.2

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 (572) hide show
  1. package/console/404.html +1 -1
  2. package/console/__next.__PAGE__.txt +2 -2
  3. package/console/__next._full.txt +14 -14
  4. package/console/__next._head.txt +4 -4
  5. package/console/__next._index.txt +9 -9
  6. package/console/__next._tree.txt +1 -1
  7. package/console/_next/static/chunks/01t5bq-0-a_i1.js +1 -0
  8. package/console/_next/static/chunks/{0ecjlb.bunt.1.js → 02-y8.0mij3oo.js} +1 -1
  9. package/console/_next/static/chunks/06305x101kz.-.js +1 -0
  10. package/console/_next/static/chunks/0a0wj-awx7rg..js +1 -0
  11. package/console/_next/static/chunks/0aao6-s-v_vxi.js +1 -0
  12. package/console/_next/static/chunks/0it9gag-6iroy.js +1 -0
  13. package/console/_next/static/chunks/0k.09v5itlmei.js +1 -0
  14. package/console/_next/static/chunks/0zwmzxuausxu9.js +1 -0
  15. package/console/_next/static/chunks/107k.7sfwlnvt.js +1 -0
  16. package/console/_next/static/chunks/{15ujs0cxvcbwz.js → 11i.dbxqrdc26.js} +1 -1
  17. package/console/_next/static/chunks/{00r~itj4ekq5y.js → 16wp_e52o23tz.js} +1 -1
  18. package/console/_not-found/__next._full.txt +14 -14
  19. package/console/_not-found/__next._head.txt +4 -4
  20. package/console/_not-found/__next._index.txt +9 -9
  21. package/console/_not-found/__next._not-found.__PAGE__.txt +3 -3
  22. package/console/_not-found/__next._not-found.txt +3 -3
  23. package/console/_not-found/__next._tree.txt +1 -1
  24. package/console/_not-found.html +1 -1
  25. package/console/_not-found.txt +14 -14
  26. package/console/auth/callback/__next._full.txt +16 -16
  27. package/console/auth/callback/__next._head.txt +4 -4
  28. package/console/auth/callback/__next._index.txt +9 -9
  29. package/console/auth/callback/__next._tree.txt +1 -1
  30. package/console/auth/callback/__next.auth.callback.__PAGE__.txt +4 -4
  31. package/console/auth/callback/__next.auth.callback.txt +3 -3
  32. package/console/auth/callback/__next.auth.txt +3 -3
  33. package/console/auth/callback.html +1 -1
  34. package/console/auth/callback.txt +16 -16
  35. package/console/auth/github/callback/__next._full.txt +16 -16
  36. package/console/auth/github/callback/__next._head.txt +4 -4
  37. package/console/auth/github/callback/__next._index.txt +9 -9
  38. package/console/auth/github/callback/__next._tree.txt +1 -1
  39. package/console/auth/github/callback/__next.auth.github.callback.__PAGE__.txt +4 -4
  40. package/console/auth/github/callback/__next.auth.github.callback.txt +3 -3
  41. package/console/auth/github/callback/__next.auth.github.txt +3 -3
  42. package/console/auth/github/callback/__next.auth.txt +3 -3
  43. package/console/auth/github/callback.html +1 -1
  44. package/console/auth/github/callback.txt +16 -16
  45. package/console/auth/oauth/callback/__next._full.txt +16 -16
  46. package/console/auth/oauth/callback/__next._head.txt +4 -4
  47. package/console/auth/oauth/callback/__next._index.txt +9 -9
  48. package/console/auth/oauth/callback/__next._tree.txt +1 -1
  49. package/console/auth/oauth/callback/__next.auth.oauth.callback.__PAGE__.txt +4 -4
  50. package/console/auth/oauth/callback/__next.auth.oauth.callback.txt +3 -3
  51. package/console/auth/oauth/callback/__next.auth.oauth.txt +3 -3
  52. package/console/auth/oauth/callback/__next.auth.txt +3 -3
  53. package/console/auth/oauth/callback.html +1 -1
  54. package/console/auth/oauth/callback.txt +16 -16
  55. package/console/chat/__placeholder__/__placeholder__/__next._full.txt +15 -15
  56. package/console/chat/__placeholder__/__placeholder__/__next._head.txt +4 -4
  57. package/console/chat/__placeholder__/__placeholder__/__next._index.txt +9 -9
  58. package/console/chat/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  59. package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.$d$slug.__PAGE__.txt +3 -3
  60. package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.$d$slug.txt +3 -3
  61. package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.txt +3 -3
  62. package/console/chat/__placeholder__/__placeholder__/__next.chat.txt +3 -3
  63. package/console/chat/__placeholder__/__placeholder__.html +1 -1
  64. package/console/chat/__placeholder__/__placeholder__.txt +15 -15
  65. package/console/conversations/__next._full.txt +15 -15
  66. package/console/conversations/__next._head.txt +4 -4
  67. package/console/conversations/__next._index.txt +9 -9
  68. package/console/conversations/__next._tree.txt +1 -1
  69. package/console/conversations/__next.conversations.__PAGE__.txt +3 -3
  70. package/console/conversations/__next.conversations.txt +3 -3
  71. package/console/conversations/__placeholder__/__placeholder__/__next._full.txt +15 -15
  72. package/console/conversations/__placeholder__/__placeholder__/__next._head.txt +4 -4
  73. package/console/conversations/__placeholder__/__placeholder__/__next._index.txt +9 -9
  74. package/console/conversations/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  75. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.__PAGE__.txt +3 -3
  76. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.txt +3 -3
  77. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.txt +3 -3
  78. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.txt +3 -3
  79. package/console/conversations/__placeholder__/__placeholder__.html +1 -1
  80. package/console/conversations/__placeholder__/__placeholder__.txt +15 -15
  81. package/console/conversations.html +1 -1
  82. package/console/conversations.txt +15 -15
  83. package/console/dashboard/__next._full.txt +15 -15
  84. package/console/dashboard/__next._head.txt +4 -4
  85. package/console/dashboard/__next._index.txt +9 -9
  86. package/console/dashboard/__next._tree.txt +1 -1
  87. package/console/dashboard/__next.dashboard.__PAGE__.txt +3 -3
  88. package/console/dashboard/__next.dashboard.txt +3 -3
  89. package/console/dashboard.html +1 -1
  90. package/console/dashboard.txt +15 -15
  91. package/console/executions/__placeholder__/__next._full.txt +14 -14
  92. package/console/executions/__placeholder__/__next._head.txt +4 -4
  93. package/console/executions/__placeholder__/__next._index.txt +9 -9
  94. package/console/executions/__placeholder__/__next._tree.txt +1 -1
  95. package/console/executions/__placeholder__/__next.executions.$d$id.__PAGE__.txt +2 -2
  96. package/console/executions/__placeholder__/__next.executions.$d$id.txt +3 -3
  97. package/console/executions/__placeholder__/__next.executions.txt +3 -3
  98. package/console/executions/__placeholder__.html +1 -1
  99. package/console/executions/__placeholder__.txt +14 -14
  100. package/console/index.html +1 -1
  101. package/console/index.txt +14 -14
  102. package/console/invite/__placeholder__/__next._full.txt +15 -15
  103. package/console/invite/__placeholder__/__next._head.txt +4 -4
  104. package/console/invite/__placeholder__/__next._index.txt +9 -9
  105. package/console/invite/__placeholder__/__next._tree.txt +1 -1
  106. package/console/invite/__placeholder__/__next.invite.$d$token.__PAGE__.txt +3 -3
  107. package/console/invite/__placeholder__/__next.invite.$d$token.txt +3 -3
  108. package/console/invite/__placeholder__/__next.invite.txt +3 -3
  109. package/console/invite/__placeholder__.html +1 -1
  110. package/console/invite/__placeholder__.txt +15 -15
  111. package/console/library/__next._full.txt +17 -17
  112. package/console/library/__next._head.txt +4 -4
  113. package/console/library/__next._index.txt +9 -9
  114. package/console/library/__next._tree.txt +1 -1
  115. package/console/library/__next.library.__PAGE__.txt +3 -3
  116. package/console/library/__next.library.txt +5 -5
  117. package/console/library/agents/__next._full.txt +17 -17
  118. package/console/library/agents/__next._head.txt +4 -4
  119. package/console/library/agents/__next._index.txt +9 -9
  120. package/console/library/agents/__next._tree.txt +1 -1
  121. package/console/library/agents/__next.library.agents.__PAGE__.txt +3 -3
  122. package/console/library/agents/__next.library.agents.txt +3 -3
  123. package/console/library/agents/__next.library.txt +5 -5
  124. package/console/library/agents/__placeholder__/__placeholder__/__next._full.txt +17 -17
  125. package/console/library/agents/__placeholder__/__placeholder__/__next._head.txt +4 -4
  126. package/console/library/agents/__placeholder__/__placeholder__/__next._index.txt +9 -9
  127. package/console/library/agents/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  128. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.__PAGE__.txt +3 -3
  129. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.txt +3 -3
  130. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.txt +3 -3
  131. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.txt +3 -3
  132. package/console/library/agents/__placeholder__/__placeholder__/__next.library.txt +5 -5
  133. package/console/library/agents/__placeholder__/__placeholder__.html +1 -1
  134. package/console/library/agents/__placeholder__/__placeholder__.txt +17 -17
  135. package/console/library/agents/new/__next._full.txt +18 -18
  136. package/console/library/agents/new/__next._head.txt +4 -4
  137. package/console/library/agents/new/__next._index.txt +9 -9
  138. package/console/library/agents/new/__next._tree.txt +1 -1
  139. package/console/library/agents/new/__next.library.agents.new.__PAGE__.txt +4 -4
  140. package/console/library/agents/new/__next.library.agents.new.txt +3 -3
  141. package/console/library/agents/new/__next.library.agents.txt +3 -3
  142. package/console/library/agents/new/__next.library.txt +5 -5
  143. package/console/library/agents/new.html +1 -1
  144. package/console/library/agents/new.txt +18 -18
  145. package/console/library/agents.html +1 -1
  146. package/console/library/agents.txt +17 -17
  147. package/console/library/mcp-servers/__next._full.txt +17 -17
  148. package/console/library/mcp-servers/__next._head.txt +4 -4
  149. package/console/library/mcp-servers/__next._index.txt +9 -9
  150. package/console/library/mcp-servers/__next._tree.txt +1 -1
  151. package/console/library/mcp-servers/__next.library.mcp-servers.__PAGE__.txt +3 -3
  152. package/console/library/mcp-servers/__next.library.mcp-servers.txt +3 -3
  153. package/console/library/mcp-servers/__next.library.txt +5 -5
  154. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._full.txt +17 -17
  155. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._head.txt +4 -4
  156. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._index.txt +9 -9
  157. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  158. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.$d$slug.__PAGE__.txt +3 -3
  159. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.$d$slug.txt +3 -3
  160. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.txt +3 -3
  161. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.txt +3 -3
  162. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.txt +5 -5
  163. package/console/library/mcp-servers/__placeholder__/__placeholder__.html +1 -1
  164. package/console/library/mcp-servers/__placeholder__/__placeholder__.txt +17 -17
  165. package/console/library/mcp-servers/new/__next._full.txt +18 -18
  166. package/console/library/mcp-servers/new/__next._head.txt +4 -4
  167. package/console/library/mcp-servers/new/__next._index.txt +9 -9
  168. package/console/library/mcp-servers/new/__next._tree.txt +1 -1
  169. package/console/library/mcp-servers/new/__next.library.mcp-servers.new.__PAGE__.txt +4 -4
  170. package/console/library/mcp-servers/new/__next.library.mcp-servers.new.txt +3 -3
  171. package/console/library/mcp-servers/new/__next.library.mcp-servers.txt +3 -3
  172. package/console/library/mcp-servers/new/__next.library.txt +5 -5
  173. package/console/library/mcp-servers/new.html +1 -1
  174. package/console/library/mcp-servers/new.txt +18 -18
  175. package/console/library/mcp-servers.html +1 -1
  176. package/console/library/mcp-servers.txt +17 -17
  177. package/console/library/plugins/__next._full.txt +17 -17
  178. package/console/library/plugins/__next._head.txt +4 -4
  179. package/console/library/plugins/__next._index.txt +9 -9
  180. package/console/library/plugins/__next._tree.txt +1 -1
  181. package/console/library/plugins/__next.library.plugins.__PAGE__.txt +3 -3
  182. package/console/library/plugins/__next.library.plugins.txt +3 -3
  183. package/console/library/plugins/__next.library.txt +5 -5
  184. package/console/library/plugins/__placeholder__/__placeholder__/__next._full.txt +17 -17
  185. package/console/library/plugins/__placeholder__/__placeholder__/__next._head.txt +4 -4
  186. package/console/library/plugins/__placeholder__/__placeholder__/__next._index.txt +9 -9
  187. package/console/library/plugins/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  188. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.$d$slug.__PAGE__.txt +3 -3
  189. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.$d$slug.txt +3 -3
  190. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.txt +3 -3
  191. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.txt +3 -3
  192. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.txt +5 -5
  193. package/console/library/plugins/__placeholder__/__placeholder__.html +1 -1
  194. package/console/library/plugins/__placeholder__/__placeholder__.txt +17 -17
  195. package/console/library/plugins/upload/__next._full.txt +18 -18
  196. package/console/library/plugins/upload/__next._head.txt +4 -4
  197. package/console/library/plugins/upload/__next._index.txt +9 -9
  198. package/console/library/plugins/upload/__next._tree.txt +1 -1
  199. package/console/library/plugins/upload/__next.library.plugins.txt +3 -3
  200. package/console/library/plugins/upload/__next.library.plugins.upload.__PAGE__.txt +4 -4
  201. package/console/library/plugins/upload/__next.library.plugins.upload.txt +3 -3
  202. package/console/library/plugins/upload/__next.library.txt +5 -5
  203. package/console/library/plugins/upload.html +1 -1
  204. package/console/library/plugins/upload.txt +18 -18
  205. package/console/library/plugins.html +1 -1
  206. package/console/library/plugins.txt +17 -17
  207. package/console/library/schedules/__next._full.txt +17 -17
  208. package/console/library/schedules/__next._head.txt +4 -4
  209. package/console/library/schedules/__next._index.txt +9 -9
  210. package/console/library/schedules/__next._tree.txt +1 -1
  211. package/console/library/schedules/__next.library.schedules.__PAGE__.txt +3 -3
  212. package/console/library/schedules/__next.library.schedules.txt +3 -3
  213. package/console/library/schedules/__next.library.txt +5 -5
  214. package/console/library/schedules/__placeholder__/__placeholder__/__next._full.txt +17 -17
  215. package/console/library/schedules/__placeholder__/__placeholder__/__next._head.txt +4 -4
  216. package/console/library/schedules/__placeholder__/__placeholder__/__next._index.txt +9 -9
  217. package/console/library/schedules/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  218. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.$d$slug.__PAGE__.txt +3 -3
  219. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.$d$slug.txt +3 -3
  220. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.txt +3 -3
  221. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.txt +3 -3
  222. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.txt +5 -5
  223. package/console/library/schedules/__placeholder__/__placeholder__.html +1 -1
  224. package/console/library/schedules/__placeholder__/__placeholder__.txt +17 -17
  225. package/console/library/schedules/new/__next._full.txt +18 -18
  226. package/console/library/schedules/new/__next._head.txt +4 -4
  227. package/console/library/schedules/new/__next._index.txt +9 -9
  228. package/console/library/schedules/new/__next._tree.txt +1 -1
  229. package/console/library/schedules/new/__next.library.schedules.new.__PAGE__.txt +4 -4
  230. package/console/library/schedules/new/__next.library.schedules.new.txt +3 -3
  231. package/console/library/schedules/new/__next.library.schedules.txt +3 -3
  232. package/console/library/schedules/new/__next.library.txt +5 -5
  233. package/console/library/schedules/new.html +1 -1
  234. package/console/library/schedules/new.txt +18 -18
  235. package/console/library/schedules.html +1 -1
  236. package/console/library/schedules.txt +17 -17
  237. package/console/library/skills/__next._full.txt +17 -17
  238. package/console/library/skills/__next._head.txt +4 -4
  239. package/console/library/skills/__next._index.txt +9 -9
  240. package/console/library/skills/__next._tree.txt +1 -1
  241. package/console/library/skills/__next.library.skills.__PAGE__.txt +3 -3
  242. package/console/library/skills/__next.library.skills.txt +3 -3
  243. package/console/library/skills/__next.library.txt +5 -5
  244. package/console/library/skills/__placeholder__/__placeholder__/__next._full.txt +17 -17
  245. package/console/library/skills/__placeholder__/__placeholder__/__next._head.txt +4 -4
  246. package/console/library/skills/__placeholder__/__placeholder__/__next._index.txt +9 -9
  247. package/console/library/skills/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  248. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.__PAGE__.txt +3 -3
  249. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.txt +3 -3
  250. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.txt +3 -3
  251. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.txt +3 -3
  252. package/console/library/skills/__placeholder__/__placeholder__/__next.library.txt +5 -5
  253. package/console/library/skills/__placeholder__/__placeholder__.html +1 -1
  254. package/console/library/skills/__placeholder__/__placeholder__.txt +17 -17
  255. package/console/library/skills/new/__next._full.txt +18 -18
  256. package/console/library/skills/new/__next._head.txt +4 -4
  257. package/console/library/skills/new/__next._index.txt +9 -9
  258. package/console/library/skills/new/__next._tree.txt +1 -1
  259. package/console/library/skills/new/__next.library.skills.new.__PAGE__.txt +4 -4
  260. package/console/library/skills/new/__next.library.skills.new.txt +3 -3
  261. package/console/library/skills/new/__next.library.skills.txt +3 -3
  262. package/console/library/skills/new/__next.library.txt +5 -5
  263. package/console/library/skills/new.html +1 -1
  264. package/console/library/skills/new.txt +18 -18
  265. package/console/library/skills.html +1 -1
  266. package/console/library/skills.txt +17 -17
  267. package/console/library/workflows/__next._full.txt +17 -17
  268. package/console/library/workflows/__next._head.txt +4 -4
  269. package/console/library/workflows/__next._index.txt +9 -9
  270. package/console/library/workflows/__next._tree.txt +1 -1
  271. package/console/library/workflows/__next.library.txt +5 -5
  272. package/console/library/workflows/__next.library.workflows.__PAGE__.txt +3 -3
  273. package/console/library/workflows/__next.library.workflows.txt +3 -3
  274. package/console/library/workflows/__placeholder__/__placeholder__/__next._full.txt +17 -17
  275. package/console/library/workflows/__placeholder__/__placeholder__/__next._head.txt +4 -4
  276. package/console/library/workflows/__placeholder__/__placeholder__/__next._index.txt +9 -9
  277. package/console/library/workflows/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  278. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.txt +5 -5
  279. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.$d$slug.__PAGE__.txt +3 -3
  280. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.$d$slug.txt +3 -3
  281. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.txt +3 -3
  282. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.txt +3 -3
  283. package/console/library/workflows/__placeholder__/__placeholder__.html +1 -1
  284. package/console/library/workflows/__placeholder__/__placeholder__.txt +17 -17
  285. package/console/library/workflows/executions/__next._full.txt +17 -17
  286. package/console/library/workflows/executions/__next._head.txt +4 -4
  287. package/console/library/workflows/executions/__next._index.txt +9 -9
  288. package/console/library/workflows/executions/__next._tree.txt +1 -1
  289. package/console/library/workflows/executions/__next.library.txt +5 -5
  290. package/console/library/workflows/executions/__next.library.workflows.executions.__PAGE__.txt +3 -3
  291. package/console/library/workflows/executions/__next.library.workflows.executions.txt +3 -3
  292. package/console/library/workflows/executions/__next.library.workflows.txt +3 -3
  293. package/console/library/workflows/executions.html +1 -1
  294. package/console/library/workflows/executions.txt +17 -17
  295. package/console/library/workflows/new/__next._full.txt +18 -18
  296. package/console/library/workflows/new/__next._head.txt +4 -4
  297. package/console/library/workflows/new/__next._index.txt +9 -9
  298. package/console/library/workflows/new/__next._tree.txt +1 -1
  299. package/console/library/workflows/new/__next.library.txt +5 -5
  300. package/console/library/workflows/new/__next.library.workflows.new.__PAGE__.txt +4 -4
  301. package/console/library/workflows/new/__next.library.workflows.new.txt +3 -3
  302. package/console/library/workflows/new/__next.library.workflows.txt +3 -3
  303. package/console/library/workflows/new.html +1 -1
  304. package/console/library/workflows/new.txt +18 -18
  305. package/console/library/workflows.html +1 -1
  306. package/console/library/workflows.txt +17 -17
  307. package/console/library.html +1 -1
  308. package/console/library.txt +17 -17
  309. package/console/login/__next._full.txt +16 -16
  310. package/console/login/__next._head.txt +4 -4
  311. package/console/login/__next._index.txt +9 -9
  312. package/console/login/__next._tree.txt +1 -1
  313. package/console/login/__next.login.__PAGE__.txt +4 -4
  314. package/console/login/__next.login.txt +3 -3
  315. package/console/login.html +1 -1
  316. package/console/login.txt +16 -16
  317. package/console/marketplace/__next._full.txt +15 -15
  318. package/console/marketplace/__next._head.txt +4 -4
  319. package/console/marketplace/__next._index.txt +9 -9
  320. package/console/marketplace/__next._tree.txt +1 -1
  321. package/console/marketplace/__next.marketplace.__PAGE__.txt +3 -3
  322. package/console/marketplace/__next.marketplace.txt +3 -3
  323. package/console/marketplace.html +1 -1
  324. package/console/marketplace.txt +15 -15
  325. package/console/oauth/slack/callback/__next._full.txt +16 -16
  326. package/console/oauth/slack/callback/__next._head.txt +4 -4
  327. package/console/oauth/slack/callback/__next._index.txt +9 -9
  328. package/console/oauth/slack/callback/__next._tree.txt +1 -1
  329. package/console/oauth/slack/callback/__next.oauth.slack.callback.__PAGE__.txt +4 -4
  330. package/console/oauth/slack/callback/__next.oauth.slack.callback.txt +3 -3
  331. package/console/oauth/slack/callback/__next.oauth.slack.txt +3 -3
  332. package/console/oauth/slack/callback/__next.oauth.txt +3 -3
  333. package/console/oauth/slack/callback.html +1 -1
  334. package/console/oauth/slack/callback.txt +16 -16
  335. package/console/sessions/__placeholder__/__next._full.txt +14 -14
  336. package/console/sessions/__placeholder__/__next._head.txt +4 -4
  337. package/console/sessions/__placeholder__/__next._index.txt +9 -9
  338. package/console/sessions/__placeholder__/__next._tree.txt +1 -1
  339. package/console/sessions/__placeholder__/__next.sessions.$d$id.__PAGE__.txt +2 -2
  340. package/console/sessions/__placeholder__/__next.sessions.$d$id.txt +3 -3
  341. package/console/sessions/__placeholder__/__next.sessions.txt +3 -3
  342. package/console/sessions/__placeholder__.html +1 -1
  343. package/console/sessions/__placeholder__.txt +14 -14
  344. package/console/settings/__next._full.txt +18 -18
  345. package/console/settings/__next._head.txt +4 -4
  346. package/console/settings/__next._index.txt +9 -9
  347. package/console/settings/__next._tree.txt +1 -1
  348. package/console/settings/__next.settings.__PAGE__.txt +4 -4
  349. package/console/settings/__next.settings.txt +5 -5
  350. package/console/settings/account-preferences/__next._full.txt +17 -17
  351. package/console/settings/account-preferences/__next._head.txt +4 -4
  352. package/console/settings/account-preferences/__next._index.txt +9 -9
  353. package/console/settings/account-preferences/__next._tree.txt +1 -1
  354. package/console/settings/account-preferences/__next.settings.account-preferences.__PAGE__.txt +3 -3
  355. package/console/settings/account-preferences/__next.settings.account-preferences.txt +3 -3
  356. package/console/settings/account-preferences/__next.settings.txt +5 -5
  357. package/console/settings/account-preferences.html +1 -1
  358. package/console/settings/account-preferences.txt +17 -17
  359. package/console/settings/api-keys/__next._full.txt +17 -17
  360. package/console/settings/api-keys/__next._head.txt +4 -4
  361. package/console/settings/api-keys/__next._index.txt +9 -9
  362. package/console/settings/api-keys/__next._tree.txt +1 -1
  363. package/console/settings/api-keys/__next.settings.api-keys.__PAGE__.txt +3 -3
  364. package/console/settings/api-keys/__next.settings.api-keys.txt +3 -3
  365. package/console/settings/api-keys/__next.settings.txt +5 -5
  366. package/console/settings/api-keys.html +1 -1
  367. package/console/settings/api-keys.txt +17 -17
  368. package/console/settings/billing/__next._full.txt +18 -18
  369. package/console/settings/billing/__next._head.txt +4 -4
  370. package/console/settings/billing/__next._index.txt +9 -9
  371. package/console/settings/billing/__next._tree.txt +1 -1
  372. package/console/settings/billing/__next.settings.billing.__PAGE__.txt +4 -4
  373. package/console/settings/billing/__next.settings.billing.txt +3 -3
  374. package/console/settings/billing/__next.settings.txt +5 -5
  375. package/console/settings/billing.html +1 -1
  376. package/console/settings/billing.txt +18 -18
  377. package/console/settings/channel-apps/__next._full.txt +17 -17
  378. package/console/settings/channel-apps/__next._head.txt +4 -4
  379. package/console/settings/channel-apps/__next._index.txt +9 -9
  380. package/console/settings/channel-apps/__next._tree.txt +1 -1
  381. package/console/settings/channel-apps/__next.settings.channel-apps.__PAGE__.txt +3 -3
  382. package/console/settings/channel-apps/__next.settings.channel-apps.txt +3 -3
  383. package/console/settings/channel-apps/__next.settings.txt +5 -5
  384. package/console/settings/channel-apps.html +1 -1
  385. package/console/settings/channel-apps.txt +17 -17
  386. package/console/settings/cursor-accounts/__next._full.txt +18 -18
  387. package/console/settings/cursor-accounts/__next._head.txt +4 -4
  388. package/console/settings/cursor-accounts/__next._index.txt +9 -9
  389. package/console/settings/cursor-accounts/__next._tree.txt +1 -1
  390. package/console/settings/cursor-accounts/__next.settings.cursor-accounts.__PAGE__.txt +4 -4
  391. package/console/settings/cursor-accounts/__next.settings.cursor-accounts.txt +3 -3
  392. package/console/settings/cursor-accounts/__next.settings.txt +5 -5
  393. package/console/settings/cursor-accounts.html +1 -1
  394. package/console/settings/cursor-accounts.txt +18 -18
  395. package/console/settings/environments/__next._full.txt +17 -17
  396. package/console/settings/environments/__next._head.txt +4 -4
  397. package/console/settings/environments/__next._index.txt +9 -9
  398. package/console/settings/environments/__next._tree.txt +1 -1
  399. package/console/settings/environments/__next.settings.environments.__PAGE__.txt +3 -3
  400. package/console/settings/environments/__next.settings.environments.txt +3 -3
  401. package/console/settings/environments/__next.settings.txt +5 -5
  402. package/console/settings/environments.html +1 -1
  403. package/console/settings/environments.txt +17 -17
  404. package/console/settings/identity-providers/__next._full.txt +18 -18
  405. package/console/settings/identity-providers/__next._head.txt +4 -4
  406. package/console/settings/identity-providers/__next._index.txt +9 -9
  407. package/console/settings/identity-providers/__next._tree.txt +1 -1
  408. package/console/settings/identity-providers/__next.settings.identity-providers.__PAGE__.txt +3 -3
  409. package/console/settings/identity-providers/__next.settings.identity-providers.txt +3 -3
  410. package/console/settings/identity-providers/__next.settings.txt +5 -5
  411. package/console/settings/identity-providers.html +1 -1
  412. package/console/settings/identity-providers.txt +18 -18
  413. package/console/settings/invitations/__next._full.txt +17 -17
  414. package/console/settings/invitations/__next._head.txt +4 -4
  415. package/console/settings/invitations/__next._index.txt +9 -9
  416. package/console/settings/invitations/__next._tree.txt +1 -1
  417. package/console/settings/invitations/__next.settings.invitations.__PAGE__.txt +3 -3
  418. package/console/settings/invitations/__next.settings.invitations.txt +3 -3
  419. package/console/settings/invitations/__next.settings.txt +5 -5
  420. package/console/settings/invitations.html +1 -1
  421. package/console/settings/invitations.txt +17 -17
  422. package/console/settings/licenses/__next._full.txt +18 -18
  423. package/console/settings/licenses/__next._head.txt +4 -4
  424. package/console/settings/licenses/__next._index.txt +9 -9
  425. package/console/settings/licenses/__next._tree.txt +1 -1
  426. package/console/settings/licenses/__next.settings.licenses.__PAGE__.txt +4 -4
  427. package/console/settings/licenses/__next.settings.licenses.txt +3 -3
  428. package/console/settings/licenses/__next.settings.txt +5 -5
  429. package/console/settings/licenses.html +1 -1
  430. package/console/settings/licenses.txt +18 -18
  431. package/console/settings/members/__next._full.txt +17 -17
  432. package/console/settings/members/__next._head.txt +4 -4
  433. package/console/settings/members/__next._index.txt +9 -9
  434. package/console/settings/members/__next._tree.txt +1 -1
  435. package/console/settings/members/__next.settings.members.__PAGE__.txt +3 -3
  436. package/console/settings/members/__next.settings.members.txt +3 -3
  437. package/console/settings/members/__next.settings.txt +5 -5
  438. package/console/settings/members.html +1 -1
  439. package/console/settings/members.txt +17 -17
  440. package/console/settings/memory/__next._full.txt +17 -17
  441. package/console/settings/memory/__next._head.txt +4 -4
  442. package/console/settings/memory/__next._index.txt +9 -9
  443. package/console/settings/memory/__next._tree.txt +1 -1
  444. package/console/settings/memory/__next.settings.memory.__PAGE__.txt +3 -3
  445. package/console/settings/memory/__next.settings.memory.txt +3 -3
  446. package/console/settings/memory/__next.settings.txt +5 -5
  447. package/console/settings/memory.html +1 -1
  448. package/console/settings/memory.txt +17 -17
  449. package/console/settings/oauth-apps/__next._full.txt +17 -17
  450. package/console/settings/oauth-apps/__next._head.txt +4 -4
  451. package/console/settings/oauth-apps/__next._index.txt +9 -9
  452. package/console/settings/oauth-apps/__next._tree.txt +1 -1
  453. package/console/settings/oauth-apps/__next.settings.oauth-apps.__PAGE__.txt +3 -3
  454. package/console/settings/oauth-apps/__next.settings.oauth-apps.txt +3 -3
  455. package/console/settings/oauth-apps/__next.settings.txt +5 -5
  456. package/console/settings/oauth-apps.html +1 -1
  457. package/console/settings/oauth-apps.txt +17 -17
  458. package/console/settings/org-preferences/__next._full.txt +17 -17
  459. package/console/settings/org-preferences/__next._head.txt +4 -4
  460. package/console/settings/org-preferences/__next._index.txt +9 -9
  461. package/console/settings/org-preferences/__next._tree.txt +1 -1
  462. package/console/settings/org-preferences/__next.settings.org-preferences.__PAGE__.txt +3 -3
  463. package/console/settings/org-preferences/__next.settings.org-preferences.txt +3 -3
  464. package/console/settings/org-preferences/__next.settings.txt +5 -5
  465. package/console/settings/org-preferences.html +1 -1
  466. package/console/settings/org-preferences.txt +17 -17
  467. package/console/settings/org-profile/__next._full.txt +18 -18
  468. package/console/settings/org-profile/__next._head.txt +4 -4
  469. package/console/settings/org-profile/__next._index.txt +9 -9
  470. package/console/settings/org-profile/__next._tree.txt +1 -1
  471. package/console/settings/org-profile/__next.settings.org-profile.__PAGE__.txt +3 -3
  472. package/console/settings/org-profile/__next.settings.org-profile.txt +3 -3
  473. package/console/settings/org-profile/__next.settings.txt +5 -5
  474. package/console/settings/org-profile.html +1 -1
  475. package/console/settings/org-profile.txt +18 -18
  476. package/console/settings/platform-clients/__next._full.txt +17 -17
  477. package/console/settings/platform-clients/__next._head.txt +4 -4
  478. package/console/settings/platform-clients/__next._index.txt +9 -9
  479. package/console/settings/platform-clients/__next._tree.txt +1 -1
  480. package/console/settings/platform-clients/__next.settings.platform-clients.__PAGE__.txt +3 -3
  481. package/console/settings/platform-clients/__next.settings.platform-clients.txt +3 -3
  482. package/console/settings/platform-clients/__next.settings.txt +5 -5
  483. package/console/settings/platform-clients.html +1 -1
  484. package/console/settings/platform-clients.txt +17 -17
  485. package/console/settings/pricing-governance/__next._full.txt +18 -18
  486. package/console/settings/pricing-governance/__next._head.txt +4 -4
  487. package/console/settings/pricing-governance/__next._index.txt +9 -9
  488. package/console/settings/pricing-governance/__next._tree.txt +1 -1
  489. package/console/settings/pricing-governance/__next.settings.pricing-governance.__PAGE__.txt +4 -4
  490. package/console/settings/pricing-governance/__next.settings.pricing-governance.txt +3 -3
  491. package/console/settings/pricing-governance/__next.settings.txt +5 -5
  492. package/console/settings/pricing-governance.html +1 -1
  493. package/console/settings/pricing-governance.txt +18 -18
  494. package/console/settings/provider-standing/__next._full.txt +18 -18
  495. package/console/settings/provider-standing/__next._head.txt +4 -4
  496. package/console/settings/provider-standing/__next._index.txt +9 -9
  497. package/console/settings/provider-standing/__next._tree.txt +1 -1
  498. package/console/settings/provider-standing/__next.settings.provider-standing.__PAGE__.txt +4 -4
  499. package/console/settings/provider-standing/__next.settings.provider-standing.txt +3 -3
  500. package/console/settings/provider-standing/__next.settings.txt +5 -5
  501. package/console/settings/provider-standing.html +1 -1
  502. package/console/settings/provider-standing.txt +18 -18
  503. package/console/settings/teams/__next._full.txt +17 -17
  504. package/console/settings/teams/__next._head.txt +4 -4
  505. package/console/settings/teams/__next._index.txt +9 -9
  506. package/console/settings/teams/__next._tree.txt +1 -1
  507. package/console/settings/teams/__next.settings.teams.__PAGE__.txt +3 -3
  508. package/console/settings/teams/__next.settings.teams.txt +3 -3
  509. package/console/settings/teams/__next.settings.txt +5 -5
  510. package/console/settings/teams.html +1 -1
  511. package/console/settings/teams.txt +17 -17
  512. package/console/settings/usage/__next._full.txt +17 -17
  513. package/console/settings/usage/__next._head.txt +4 -4
  514. package/console/settings/usage/__next._index.txt +9 -9
  515. package/console/settings/usage/__next._tree.txt +1 -1
  516. package/console/settings/usage/__next.settings.txt +5 -5
  517. package/console/settings/usage/__next.settings.usage.__PAGE__.txt +3 -3
  518. package/console/settings/usage/__next.settings.usage.txt +3 -3
  519. package/console/settings/usage.html +1 -1
  520. package/console/settings/usage.txt +17 -17
  521. package/console/settings.html +1 -1
  522. package/console/settings.txt +18 -18
  523. package/console/workflows/__next._full.txt +14 -14
  524. package/console/workflows/__next._head.txt +4 -4
  525. package/console/workflows/__next._index.txt +9 -9
  526. package/console/workflows/__next._tree.txt +1 -1
  527. package/console/workflows/__next.workflows.__PAGE__.txt +2 -2
  528. package/console/workflows/__next.workflows.txt +3 -3
  529. package/console/workflows/__placeholder__/__placeholder__/__next._full.txt +15 -15
  530. package/console/workflows/__placeholder__/__placeholder__/__next._head.txt +4 -4
  531. package/console/workflows/__placeholder__/__placeholder__/__next._index.txt +9 -9
  532. package/console/workflows/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  533. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.$d$slug.__PAGE__.txt +3 -3
  534. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.$d$slug.txt +3 -3
  535. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.txt +3 -3
  536. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.txt +3 -3
  537. package/console/workflows/__placeholder__/__placeholder__.html +1 -1
  538. package/console/workflows/__placeholder__/__placeholder__.txt +15 -15
  539. package/console/workflows/executions/__next._full.txt +14 -14
  540. package/console/workflows/executions/__next._head.txt +4 -4
  541. package/console/workflows/executions/__next._index.txt +9 -9
  542. package/console/workflows/executions/__next._tree.txt +1 -1
  543. package/console/workflows/executions/__next.workflows.executions.__PAGE__.txt +2 -2
  544. package/console/workflows/executions/__next.workflows.executions.txt +3 -3
  545. package/console/workflows/executions/__next.workflows.txt +3 -3
  546. package/console/workflows/executions/__placeholder__/__next._full.txt +15 -15
  547. package/console/workflows/executions/__placeholder__/__next._head.txt +4 -4
  548. package/console/workflows/executions/__placeholder__/__next._index.txt +9 -9
  549. package/console/workflows/executions/__placeholder__/__next._tree.txt +1 -1
  550. package/console/workflows/executions/__placeholder__/__next.workflows.executions.$d$id.__PAGE__.txt +3 -3
  551. package/console/workflows/executions/__placeholder__/__next.workflows.executions.$d$id.txt +3 -3
  552. package/console/workflows/executions/__placeholder__/__next.workflows.executions.txt +3 -3
  553. package/console/workflows/executions/__placeholder__/__next.workflows.txt +3 -3
  554. package/console/workflows/executions/__placeholder__.html +1 -1
  555. package/console/workflows/executions/__placeholder__.txt +15 -15
  556. package/console/workflows/executions.html +1 -1
  557. package/console/workflows/executions.txt +14 -14
  558. package/console/workflows.html +1 -1
  559. package/console/workflows.txt +14 -14
  560. package/main.js +5 -5
  561. package/package.json +6 -6
  562. package/console/_next/static/chunks/0-zcgxw8vt51~.js +0 -1
  563. package/console/_next/static/chunks/01_egbwaa3b.d.js +0 -1
  564. package/console/_next/static/chunks/05uzu4-_sp1yp.js +0 -1
  565. package/console/_next/static/chunks/0heeg7tjg-ble.js +0 -1
  566. package/console/_next/static/chunks/0io-wgdji~5d0.js +0 -1
  567. package/console/_next/static/chunks/0rihzw4w1wzg3.js +0 -1
  568. package/console/_next/static/chunks/0xy23zns071f6.js +0 -1
  569. package/console/_next/static/chunks/189scd957oqn5.js +0 -1
  570. /package/console/_next/static/{nfAUAfaA7Rib4kBQkLcv6 → DNLQClN7GaRAVmHLSwsMN}/_buildManifest.js +0 -0
  571. /package/console/_next/static/{nfAUAfaA7Rib4kBQkLcv6 → DNLQClN7GaRAVmHLSwsMN}/_clientMiddlewareManifest.js +0 -0
  572. /package/console/_next/static/{nfAUAfaA7Rib4kBQkLcv6 → DNLQClN7GaRAVmHLSwsMN}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52595,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976);function n({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M8 3v10M3 8h10"})})}function i({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M2 4h12M5.333 4V2.667a1.333 1.333 0 0 1 1.334-1.334h2.666a1.333 1.333 0 0 1 1.334 1.334V4M12.667 4v9.333a1.333 1.333 0 0 1-1.334 1.334H4.667a1.333 1.333 0 0 1-1.334-1.334V4"})})}function a(){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",className:"stg:animate-spin","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M8 2a6 6 0 1 0 6 6"})})}e.s(["InlineEditKeyValue",0,function({value:e,onSave:o,keyLabel:g="Key",showValue:l=!1,valueLabel:d="Value",showSecretToggle:c=!1,showOptionalToggle:u=!1,showDescription:x=!1,editing:m,onEditingChange:p,disabled:h,isSaving:f,error:v,className:b}){let[j,N]=(0,s.useState)(!1),y=m??j,k=(0,s.useCallback)(e=>{N(e),p?.(e)},[p]);(0,s.useEffect)(()=>{void 0!==m&&N(m)},[m]);let[C,S]=(0,s.useState)([...e]);(0,s.useCallback)(()=>{S([...e]),k(!0)},[e,k]);let w=(0,s.useCallback)(()=>{k(!1),S([...e])},[e,k]),O=(0,s.useCallback)(async()=>{let e=C.filter(e=>e.key.trim());await o(e)&&k(!1)},[C,o,k]),A=(0,s.useCallback)((e,t)=>{S(s=>s.map((s,r)=>r===e?{...s,...t}:s))},[]),E=(0,s.useCallback)(e=>{S(t=>t.filter((t,s)=>s!==e))},[]),L=(0,s.useCallback)(()=>{S(e=>[...e,{key:"",value:"",isSecret:!1,description:""}])},[]);return h||!y?(0,t.jsx)("div",{className:(0,r.cn)("stg:flex stg:flex-col",b),children:e.length>0?(0,t.jsx)("div",{className:"stg:flex stg:flex-col stg:divide-y stg:divide-border",children:e.map(e=>(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-3 stg:px-3 stg:py-2.5",children:[(0,t.jsx)("code",{className:"stg:shrink-0 stg:font-mono stg:text-sm stg:font-medium stg:text-foreground",children:e.key}),l&&(0,t.jsx)("span",{className:"stg:min-w-0 stg:break-all stg:font-mono stg:text-xs stg:text-muted-foreground",children:e.value}),c&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-muted-foreground",children:e.isSecret?"secret":"config"}),u&&e.optional&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-muted-foreground-subtle",children:"optional"}),e.description&&(0,t.jsx)("span",{className:"stg:text-xs stg:text-muted-foreground",children:e.description})]},e.key))}):(0,t.jsx)("p",{className:"stg:px-3 stg:py-3 stg:text-xs stg:text-muted-foreground stg:italic",children:"No entries"})}):(0,t.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col stg:gap-3",b),children:[C.map((e,s)=>(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-2 stg:rounded-md stg:border stg:border-border stg:bg-muted-faint stg:p-2.5",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-1 stg:flex-col stg:gap-1.5",children:[(0,t.jsx)("input",{type:"text",value:e.key,onChange:e=>A(s,{key:e.target.value}),placeholder:g,className:(0,r.cn)("stg:rounded-md stg:border stg:border-border stg:bg-input-bg stg:px-2 stg:py-1 stg:font-mono stg:text-sm stg:text-foreground","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring")}),l&&(0,t.jsx)("input",{type:"text",value:e.value,onChange:e=>A(s,{value:e.target.value}),placeholder:d,className:(0,r.cn)("stg:rounded-md stg:border stg:border-border stg:bg-input-bg stg:px-2 stg:py-1 stg:font-mono stg:text-sm stg:text-foreground","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring")}),x&&(0,t.jsx)("input",{type:"text",value:e.description??"",onChange:e=>A(s,{description:e.target.value}),placeholder:"Description",className:(0,r.cn)("stg:rounded-md stg:border stg:border-border stg:bg-input-bg stg:px-2 stg:py-1 stg:text-xs stg:text-foreground","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring")}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-3",children:[c&&(0,t.jsxs)("label",{className:"stg:inline-flex stg:items-center stg:gap-1.5 stg:text-xs stg:text-muted-foreground stg:cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:e.isSecret??!1,onChange:e=>A(s,{isSecret:e.target.checked}),className:"stg:size-3.5 stg:rounded stg:border-border"}),"Secret"]}),u&&(0,t.jsxs)("label",{className:"stg:inline-flex stg:items-center stg:gap-1.5 stg:text-xs stg:text-muted-foreground stg:cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:e.optional??!1,onChange:e=>A(s,{optional:e.target.checked}),className:"stg:size-3.5 stg:rounded stg:border-border"}),"Optional"]})]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>E(s),"aria-label":`Remove ${e.key||"entry"}`,className:(0,r.cn)("stg:mt-1 stg:inline-flex stg:size-6 stg:items-center stg:justify-center stg:rounded-md stg:text-muted-foreground","stg:hover:bg-destructive-subtle stg:hover:text-destructive","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:(0,t.jsx)(i,{className:"stg:size-3.5"})})]},s)),(0,t.jsxs)("button",{type:"button",onClick:L,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-1.5 stg:text-xs stg:font-medium","stg:border stg:border-dashed stg:border-border stg:text-muted-foreground","stg:hover:border-muted-foreground stg:hover:text-foreground stg:hover:bg-muted-subtle","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:transition-colors"),children:[(0,t.jsx)(n,{className:"stg:size-3"}),"Add entry"]}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-end stg:gap-1.5",children:[(0,t.jsx)("button",{type:"button",onClick:w,disabled:f,className:(0,r.cn)("stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:border stg:border-border stg:bg-background stg:text-foreground stg:hover:bg-accent","stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:"Cancel"}),(0,t.jsxs)("button",{type:"button",onClick:O,disabled:f,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:[f&&(0,t.jsx)(a,{}),"Save changes"]})]}),v&&(0,t.jsx)("p",{className:"stg:px-1 stg:text-xs stg:text-destructive",role:"alert",children:v})]})}])},81346,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976);function n({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M11.5 1.5a2.121 2.121 0 0 1 3 3L5 14l-4 1 1-4Z"})})}function i({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"m3 8.5 3.5 3.5 6.5-8"})})}function a({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"m4 4 8 8M12 4l-8 8"})})}function o({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"2",y:"2",width:"12",height:"12",rx:"1.5"}),(0,t.jsx)("circle",{cx:"5.5",cy:"5.5",r:"1"}),(0,t.jsx)("path",{d:"m14 10.5-3-3L4 14"})]})}function g(){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",className:"stg:animate-spin","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M8 2a6 6 0 1 0 6 6"})})}e.s(["InlineEditImage",0,function({value:e,onSave:l,fallback:d,size:c="md",disabled:u,isSaving:x,error:m,className:p}){let[h,f]=(0,s.useState)(!1),[v,b]=(0,s.useState)(e),[j,N]=(0,s.useState)(null),y=(0,s.useRef)(null);(0,s.useEffect)(()=>{h&&(b(e),N(null),requestAnimationFrame(()=>y.current?.focus()))},[h,e]);let k=(0,s.useCallback)(async()=>{let t=v.trim();t===e?f(!1):t&&!function(e){try{return new URL(e),!0}catch{return!1}}(t)?N("Enter a valid URL"):await l(t)&&f(!1)},[v,e,l]),C=(0,s.useCallback)(()=>{f(!1),b(e),N(null)},[e]),S=(0,s.useCallback)(e=>{"Enter"===e.key?(e.preventDefault(),k()):"Escape"===e.key&&C()},[k,C]),w="sm"===c?"stg:size-6":"stg:size-8",O=j||m;return u||!h?(0,t.jsx)("div",{className:(0,r.cn)("stg:group/inline-edit stg:inline-flex",p),children:(0,t.jsxs)("button",{type:"button",onClick:()=>{u||f(!0)},disabled:u,className:(0,r.cn)("stg:relative stg:rounded-md stg:p-0.5 stg:transition-colors",!u&&"stg:hover:bg-accent-hover stg:cursor-pointer","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),"aria-label":"Change icon",children:[e?(0,t.jsx)("img",{src:e,alt:"",className:(0,r.cn)(w,"stg:shrink-0 stg:rounded stg:object-cover")}):d??(0,t.jsx)(o,{className:(0,r.cn)(w,"stg:text-muted-foreground")}),!u&&(0,t.jsx)("span",{className:"stg:absolute stg:-bottom-0.5 stg:-right-0.5 stg:flex stg:size-4 stg:items-center stg:justify-center stg:rounded-full stg:bg-muted stg:text-muted-foreground stg:opacity-0 stg:transition-opacity stg:group-hover/inline-edit:opacity-100",children:(0,t.jsx)(n,{className:"stg:size-2.5"})})]})}):(0,t.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col stg:gap-1",p),children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,t.jsx)("input",{ref:y,type:"url",value:v,onChange:e=>{b(e.target.value),N(null)},onKeyDown:S,disabled:x,placeholder:"https://example.com/icon.png",className:(0,r.cn)("stg:flex-1 stg:rounded-md stg:border stg:border-border stg:bg-input-bg stg:px-2 stg:py-1 stg:text-sm stg:text-foreground","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring","stg:disabled:opacity-50",O&&"stg:border-destructive")}),(0,t.jsx)("button",{type:"button",onClick:k,disabled:x,"aria-label":"Save",className:(0,r.cn)("stg:inline-flex stg:size-7 stg:items-center stg:justify-center stg:rounded-md","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:x?(0,t.jsx)(g,{}):(0,t.jsx)(i,{className:"stg:size-3.5"})}),(0,t.jsx)("button",{type:"button",onClick:C,disabled:x,"aria-label":"Cancel",className:(0,r.cn)("stg:inline-flex stg:size-7 stg:items-center stg:justify-center stg:rounded-md","stg:border stg:border-border stg:bg-background stg:text-foreground stg:hover:bg-accent stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:(0,t.jsx)(a,{className:"stg:size-3.5"})}),v&&(0,t.jsx)("button",{type:"button",onClick:()=>b(""),disabled:x,"aria-label":"Clear",className:"stg:text-xs stg:text-muted-foreground stg:underline stg:decoration-muted-foreground/40 stg:underline-offset-2 stg:hover:text-foreground",children:"Clear"})]}),O&&(0,t.jsx)("p",{className:"stg:px-1 stg:text-xs stg:text-destructive",role:"alert",children:O})]})}])},674542,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(610595),i=e.i(17616),a=e.i(336973),o=e.i(498931),g=e.i(727996),l=e.i(586108),d=e.i(326283),c=e.i(78946),u=e.i(862645),x=e.i(153158),m=e.i(168197),p=e.i(844533),h=e.i(801731),f=e.i(793907),v=e.i(388894),b=e.i(651424),j=e.i(379410);function N({providerName:e,vendorDocsUrl:i,onSubmit:a,onCancel:o,isSubmitting:g,error:l,className:d}){let[c,u]=(0,s.useState)(""),[x,m]=(0,s.useState)(""),[p,h]=(0,s.useState)(!1),f=(0,s.useId)(),v=`${f}-client-id`,b=`${f}-client-secret`,S=c.trim().length>0&&x.trim().length>0,w=(0,s.useCallback)(async e=>{e.preventDefault(),S&&!g&&await a(c.trim(),x.trim())},[S,g,a,c,x]);return(0,t.jsxs)("form",{onSubmit:w,className:(0,r.cn)("stg:flex stg:flex-col stg:gap-4",d),children:[(0,t.jsxs)("div",{className:"stg:space-y-1.5",children:[(0,t.jsxs)("p",{className:"stg:text-sm stg:text-foreground",children:["Register an OAuth app with"," ",(0,t.jsx)("span",{className:"stg:font-medium",children:e})," and enter your credentials below."]}),i&&(0,t.jsxs)("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"stg:inline-flex stg:items-center stg:gap-1 stg:text-xs stg:text-primary stg:underline stg:decoration-primary/40 stg:underline-offset-2 stg:hover:decoration-primary",children:[e," OAuth app registration",(0,t.jsx)(y,{className:"stg:size-3 stg:shrink-0"})]})]}),(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-3",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1.5",children:[(0,t.jsx)("label",{htmlFor:v,className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Client ID"}),(0,t.jsx)("input",{id:v,type:"text",value:c,onChange:e=>u(e.target.value),disabled:g,required:!0,"aria-required":!0,autoComplete:"off",autoFocus:!0,placeholder:"e.g. 1234567890abcdef",className:(0,r.cn)("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground","stg:placeholder:text-muted-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50")})]}),(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1.5",children:[(0,t.jsx)("label",{htmlFor:b,className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Client Secret"}),(0,t.jsxs)("div",{className:"stg:relative",children:[(0,t.jsx)("input",{id:b,type:p?"text":"password",value:x,onChange:e=>m(e.target.value),disabled:g,required:!0,"aria-required":!0,autoComplete:"off",placeholder:"Your client secret",className:(0,r.cn)("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:pr-8 stg:text-xs stg:text-foreground","stg:placeholder:text-muted-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50")}),(0,t.jsx)("button",{type:"button",onClick:()=>h(e=>!e),disabled:g,className:(0,r.cn)("stg:absolute stg:right-2 stg:top-1/2 stg:-translate-y-1/2","stg:text-muted-foreground stg:hover:text-foreground","stg:disabled:pointer-events-none stg:disabled:opacity-50"),"aria-label":p?"Hide client secret":"Show client secret",tabIndex:-1,children:p?(0,t.jsx)(C,{}):(0,t.jsx)(k,{})})]})]})]}),l&&(0,t.jsx)("div",{role:"alert",className:"stg:rounded-md stg:border stg:border-destructive/30 stg:bg-destructive-subtle stg:px-2.5 stg:py-2 stg:text-xs stg:text-destructive",children:(0,n.getUserMessage)(l)}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-end stg:gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:o,disabled:g,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:"Cancel"}),(0,t.jsxs)("button",{type:"submit",disabled:!S||g,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:disabled:pointer-events-none stg:disabled:opacity-40"),children:[g&&(0,t.jsx)(j.SpinnerIcon,{size:12}),"Save"]})]})]})}function y({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M6 3.5H3.5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V10"}),(0,t.jsx)("path",{d:"M9.5 2.5h4v4"}),(0,t.jsx)("path",{d:"M13.5 2.5 8 8"})]})}function k(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8s-2.5 4.5-6.5 4.5S1.5 8 1.5 8z"}),(0,t.jsx)("circle",{cx:"8",cy:"8",r:"2"})]})}function C(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M6.59 6.59a2 2 0 0 0 2.82 2.82"}),(0,t.jsx)("path",{d:"M10.73 10.73A6.5 6.5 0 0 1 8 12.5c-4 0-6.5-4.5-6.5-4.5a11.5 11.5 0 0 1 3.77-3.73"}),(0,t.jsx)("path",{d:"M5.71 3.56A6.3 6.3 0 0 1 8 3.5c4 0 6.5 4.5 6.5 4.5a11.5 11.5 0 0 1-1.28 1.73"}),(0,t.jsx)("path",{d:"M2 2l12 12"})]})}var S=e.i(170255),w=e.i(476007),O=e.i(188482),A=e.i(468806),E=e.i(351240),L=e.i(758960),M=e.i(484763),T=e.i(927056),D=e.i(668093),B=e.i(652337),H=e.i(244990),z=e.i(261722),P=e.i(81346);function I({value:e,options:n,onSave:i,disabled:a,isSaving:o,error:g,className:l}){let[d,c]=(0,s.useState)(!1),u=(0,s.useRef)(null),x=n.find(t=>t.value===e)?.label??e;(0,s.useEffect)(()=>{if(!d)return;let e=e=>{u.current&&!u.current.contains(e.target)&&c(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[d]);let m=(0,s.useCallback)(async t=>{t===e?c(!1):await i(t)&&c(!1)},[e,i]);return a||!d?(0,t.jsx)("div",{className:(0,r.cn)("stg:group/inline-edit",l),children:(0,t.jsxs)("button",{type:"button",onClick:()=>{a||c(!0)},disabled:a,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-1.5 stg:py-0.5 stg:text-left stg:transition-colors",!a&&"stg:hover:bg-accent-hover stg:cursor-pointer","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring"),children:[(0,t.jsx)("span",{className:"stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:font-mono stg:text-xs stg:font-medium stg:text-foreground",children:x}),!a&&(0,t.jsx)(R,{className:"stg:size-3 stg:shrink-0 stg:text-muted-foreground stg:opacity-0 stg:transition-opacity stg:group-hover/inline-edit:opacity-100"})]})}):(0,t.jsxs)("div",{ref:u,className:(0,r.cn)("stg:flex stg:flex-col stg:gap-1",l),children:[(0,t.jsx)("div",{className:"stg:rounded-lg stg:border stg:border-border stg:bg-background stg:p-1",role:"radiogroup",children:n.map(s=>(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":s.value===e,disabled:o,onClick:()=>m(s.value),className:(0,r.cn)("stg:flex stg:w-full stg:items-start stg:gap-2 stg:rounded-md stg:px-2.5 stg:py-1.5 stg:text-left stg:transition-colors",s.value===e?"stg:bg-muted-subtle stg:text-foreground":"stg:hover:bg-accent-hover stg:text-foreground","stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring"),children:[(0,t.jsx)("div",{className:(0,r.cn)("stg:mt-0.5 stg:flex stg:size-4 stg:shrink-0 stg:items-center stg:justify-center stg:rounded-full stg:border",s.value===e?"stg:border-primary stg:bg-primary":"stg:border-muted-foreground"),children:s.value===e&&(0,t.jsx)("div",{className:"stg:size-1.5 stg:rounded-full stg:bg-primary-foreground"})}),(0,t.jsxs)("div",{className:"stg:min-w-0 stg:flex-1",children:[(0,t.jsx)("span",{className:"stg:text-sm stg:font-medium",children:s.label}),s.description&&(0,t.jsx)("p",{className:"stg:mt-0.5 stg:text-xs stg:text-muted-foreground",children:s.description})]}),o&&s.value!==e&&(0,t.jsx)(U,{})]},s.value))}),g&&(0,t.jsx)("p",{className:"stg:px-1 stg:text-xs stg:text-destructive",role:"alert",children:g})]})}function R({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"m4 6 4 4 4-4"})})}function U(){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",className:"stg:animate-spin","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M8 2a6 6 0 1 0 6 6"})})}var _=e.i(52595),V=e.i(292420),W=e.i(473489);function $({isConnecting:e,connectionError:i,connectionErrorMessage:o,onConnect:g,onClearConnectionError:l,hasDiscoveredTools:d,isOAuthStranded:c,credentialsLoading:u,oauthPhase:x,authMode:m,isOAuthConnected:p,connectionHealth:h,canDisconnect:v,onDisconnect:b,isDisconnecting:j,disconnectError:N,onClearDisconnectError:y,serverName:k,accessTokenExpiresAt:C,tokenLifetimeHint:S,isVendorApprovalPending:w,isVendorApprovalBlocked:O,vendorApprovalDocsUrl:A,canBringOwnApp:E,isOrgOAuthApp:L,onBringOwnApp:M,onRemoveOrgApp:T,isRemovingOrgApp:D,removeOrgAppError:B,onClearRemoveOrgAppError:H,manualEntrySupported:z,manualOverride:P,onManualOverride:I,onBackToOAuth:R,onCancelOAuth:U}){let[_,V]=(0,s.useState)("idle"),[W,q]=(0,s.useState)("idle"),K="initiating"===x||"awaiting-callback"===x||"completing"===x||"connecting"===x,X="oauth"===m&&!p&&!P,Y=h===a.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_TOKEN_EXPIRED,Z=O&&X&&!L,J=e||K||j||D,Q=K?F(x):e?"Connecting...":L&&X?"Sign in with your app":X||Y?"Sign in to connect":c?"Discover tools":d?"Reconnect":"Connect",G=K||e?(0,t.jsx)(eN,{}):X||Y?(0,t.jsx)(eh,{className:"stg:size-3.5"}):d?(0,t.jsx)(eu,{className:"stg:size-3.5"}):(0,t.jsx)(ec,{className:"stg:size-3.5"}),ee=(()=>{if("oauth"===m&&p){if(c)return"Signed in — tools not discovered yet";let e=function(e,t,s){switch(e){case a.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_HEALTHY:{let e=function(e){if(e===BigInt(0))return null;let t=e-BigInt(Math.floor(Date.now()/1e3));if(t<=BigInt(0))return"Token expired";let s=Number(t/BigInt(60));if(s<1)return"Expires in <1 min";if(s<60)return`Expires in ${s} min`;let r=Math.floor(s/60);if(r<24)return`Expires in ${r}h ${s%60}m`;let n=Math.floor(r/24);return`Expires in ${n}d`}(t);if(e)return`Tokens refresh automatically \u00B7 ${e}`;let r=s&&"never"!==s?` \u00B7 Session lasts ~${s}`:"";return`Tokens refresh automatically${r}`}case a.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_TOKEN_EXPIRED_REFRESHABLE:return"Will refresh automatically on next use";case a.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_TOKEN_EXPIRED:return"Token expired — sign in again to reconnect";default:return"Not connected yet"}}(h,C,S);return L?`${e} \u00B7 Using your OAuth app`:e}return L&&X?"Using your OAuth app":P?"Entering token manually":d?"Connected":"Not connected yet"})(),et=function(e,t){if(t)return{pillClass:"stg:bg-amber-500/10 stg:text-amber-600 stg:dark:text-amber-400",dotClass:"stg:bg-amber-500",label:"Pending approval"};switch(e){case a.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_HEALTHY:return{pillClass:"stg:bg-success/10 stg:text-success",dotClass:"stg:bg-success",label:"Connected"};case a.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_TOKEN_EXPIRED_REFRESHABLE:return{pillClass:"stg:bg-amber-500/10 stg:text-amber-600 stg:dark:text-amber-400",dotClass:"stg:bg-amber-500",label:"Token expired"};case a.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_TOKEN_EXPIRED:return{pillClass:"stg:bg-destructive-subtle stg:text-destructive",dotClass:"stg:bg-destructive",label:"Re-auth needed"};default:return{pillClass:"stg:bg-muted stg:text-muted-foreground",dotClass:"stg:bg-muted-foreground",label:"Not connected"}}}(h,w&&!p),es=L&&!J&&"idle"===W;return"confirming"===_||"disconnecting"===_?(0,t.jsxs)("div",{className:"stg:flex stg:flex-col",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:px-3 stg:py-2",children:[(0,t.jsx)(ed,{className:"stg:size-3.5 stg:shrink-0 stg:text-destructive"}),(0,t.jsxs)("p",{className:"stg:flex-1 stg:text-xs stg:text-foreground",children:["Remove OAuth credentials for ",(0,t.jsx)("span",{className:"stg:font-medium",children:k}),"? You can reconnect at any time."]}),(0,t.jsxs)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:gap-1.5",children:[(0,t.jsxs)("button",{type:"button",disabled:j,onClick:async()=>{V("disconnecting");try{await b(),V("idle")}catch{V("confirming")}},className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:bg-destructive stg:text-destructive-foreground stg:hover:bg-destructive-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:[j&&(0,t.jsx)(eN,{}),"Disconnect"]}),(0,t.jsx)("button",{type:"button",disabled:j,onClick:()=>{V("idle"),y()},className:(0,r.cn)("stg:inline-flex stg:items-center stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:border stg:border-border stg:bg-background stg:text-foreground stg:hover:bg-accent stg:hover:text-accent-foreground","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:"Cancel"})]})]}),N&&(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-2 stg:border-t stg:border-destructive/20 stg:bg-destructive-subtle stg:px-3 stg:py-2",children:[(0,t.jsx)(ed,{className:"stg:mt-0.5 stg:size-3.5 stg:shrink-0 stg:text-destructive"}),(0,t.jsx)("p",{className:"stg:flex-1 stg:text-xs stg:text-destructive",children:(0,n.getUserMessage)(N)}),(0,t.jsx)("button",{type:"button",onClick:y,className:"stg:shrink-0 stg:text-xs stg:text-destructive-muted stg:hover:text-destructive","aria-label":"Dismiss error",children:"Dismiss"})]})]}):"confirming"===W||"removing"===W?(0,t.jsxs)("div",{className:"stg:flex stg:flex-col",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:px-3 stg:py-2",children:[(0,t.jsx)(ed,{className:"stg:size-3.5 stg:shrink-0 stg:text-destructive"}),(0,t.jsxs)("p",{className:"stg:flex-1 stg:text-xs stg:text-foreground",children:["Remove your custom OAuth app for"," ",(0,t.jsx)("span",{className:"stg:font-medium",children:k}),"? The server will revert to the platform's OAuth app."]}),(0,t.jsxs)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:gap-1.5",children:[(0,t.jsxs)("button",{type:"button",disabled:D,onClick:async()=>{q("removing");try{await T(),q("idle")}catch{q("confirming")}},className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:bg-destructive stg:text-destructive-foreground stg:hover:bg-destructive-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:[D&&(0,t.jsx)(eN,{}),"Remove"]}),(0,t.jsx)("button",{type:"button",disabled:D,onClick:()=>{q("idle"),H()},className:(0,r.cn)("stg:inline-flex stg:items-center stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:border stg:border-border stg:bg-background stg:text-foreground stg:hover:bg-accent stg:hover:text-accent-foreground","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:"Cancel"})]})]}),B&&(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-2 stg:border-t stg:border-destructive/20 stg:bg-destructive-subtle stg:px-3 stg:py-2",children:[(0,t.jsx)(ed,{className:"stg:mt-0.5 stg:size-3.5 stg:shrink-0 stg:text-destructive"}),(0,t.jsx)("p",{className:"stg:flex-1 stg:text-xs stg:text-destructive",children:(0,n.getUserMessage)(B)}),(0,t.jsx)("button",{type:"button",onClick:H,className:"stg:shrink-0 stg:text-xs stg:text-destructive-muted stg:hover:text-destructive","aria-label":"Dismiss error",children:"Dismiss"})]})]}):(0,t.jsxs)("div",{className:"stg:flex stg:flex-col",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:px-3 stg:py-2",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:["oauth"===m&&!P&&(0,t.jsxs)("span",{className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-full stg:px-2 stg:py-0.5 stg:text-[10px] stg:font-medium",et.pillClass),children:[(0,t.jsx)("span",{className:(0,r.cn)("stg:size-1.5 stg:rounded-full",et.dotClass),"aria-hidden":"true"}),et.label]}),(0,t.jsx)("span",{className:"stg:text-xs stg:text-muted-foreground",children:Z?"OAuth sign-in is pending vendor approval":ee}),v&&!J&&!P&&"idle"===_&&(0,t.jsx)("button",{type:"button",onClick:()=>V("confirming"),className:"stg:text-[11px] stg:text-muted-foreground stg:underline stg:decoration-muted-foreground/40 stg:underline-offset-2 stg:hover:text-foreground stg:hover:decoration-foreground",children:"Disconnect"}),es&&(0,t.jsx)("button",{type:"button",onClick:()=>q("confirming"),className:"stg:text-[11px] stg:text-muted-foreground stg:underline stg:decoration-muted-foreground/40 stg:underline-offset-2 stg:hover:text-foreground stg:hover:decoration-foreground",children:"Remove custom app"})]}),(0,t.jsxs)("button",{type:"button",onClick:g,disabled:J||u||Z,"data-cursor-target":"connect-button",className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium",X||Y?"stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover":"stg:border stg:border-border stg:bg-background stg:text-foreground stg:hover:bg-accent stg:hover:text-accent-foreground","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:[G,Q]})]}),"awaiting-callback"===x&&(0,t.jsx)("div",{className:"stg:flex stg:items-center stg:gap-3 stg:border-t stg:border-border stg:px-3 stg:py-1.5",children:(0,t.jsx)("button",{type:"button",onClick:U,className:"stg:text-[11px] stg:text-muted-foreground stg:underline stg:decoration-muted-foreground/40 stg:underline-offset-2 stg:hover:text-foreground stg:hover:decoration-foreground",children:"Cancel sign-in"})}),Z&&(0,t.jsx)(f.VendorApprovalBlockedNotice,{blocked:!0,pending:w,manualEntrySupported:z,canBringOwnApp:E,docsUrl:A,onBringOwnApp:M,className:"stg:border-t stg:border-amber-500/20"}),"oauth"===m&&!p&&!K&&!e&&(P||z||E)&&(0,t.jsx)("div",{className:"stg:flex stg:items-center stg:gap-3 stg:border-t stg:border-border stg:px-3 stg:py-1.5",children:P?(0,t.jsx)("button",{type:"button",onClick:R,className:"stg:text-[11px] stg:text-muted-foreground stg:underline stg:decoration-muted-foreground/40 stg:underline-offset-2 stg:hover:text-foreground stg:hover:decoration-foreground",children:w?"Back to OAuth status":"Sign in with OAuth instead"}):(0,t.jsxs)(t.Fragment,{children:[z&&(0,t.jsx)("button",{type:"button",onClick:I,className:"stg:text-[11px] stg:text-muted-foreground stg:underline stg:decoration-muted-foreground/40 stg:underline-offset-2 stg:hover:text-foreground stg:hover:decoration-foreground",children:"Enter token manually"}),E&&!O&&(0,t.jsx)("button",{type:"button",onClick:M,className:"stg:text-[11px] stg:text-muted-foreground stg:underline stg:decoration-muted-foreground/40 stg:underline-offset-2 stg:hover:text-foreground stg:hover:decoration-foreground",children:"Use your own OAuth app"})]})}),i&&(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-2 stg:border-t stg:border-destructive/20 stg:bg-destructive-subtle stg:px-3 stg:py-2",role:"alert",children:[(0,t.jsx)(ed,{className:"stg:mt-0.5 stg:size-3.5 stg:shrink-0 stg:text-destructive"}),(0,t.jsx)("p",{className:"stg:flex-1 stg:text-xs stg:text-destructive",children:o??(0,n.getUserMessage)(i)}),(0,t.jsxs)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:gap-2",children:[(0,n.isRetryableError)(i)&&(0,t.jsx)("button",{type:"button",onClick:()=>{l(),g()},className:"stg:text-xs stg:font-medium stg:text-destructive stg:underline stg:underline-offset-2 stg:hover:no-underline",children:"Try again"}),(0,t.jsx)("button",{type:"button",onClick:l,className:"stg:text-xs stg:text-destructive-muted stg:hover:text-destructive","aria-label":"Dismiss error",children:"Dismiss"})]})]})]})}function F(e){switch(e){case"initiating":return"Starting sign-in...";case"awaiting-callback":return"Waiting for authorization...";case"completing":return"Completing sign-in...";case"connecting":return"Discovering tools...";default:return"Connecting..."}}function q({message:e}){return(0,t.jsxs)("div",{role:"alert",className:"stg:flex stg:items-start stg:gap-2.5 stg:rounded-lg stg:border stg:border-destructive/30 stg:bg-destructive-subtle stg:px-4 stg:py-3",children:[(0,t.jsx)(ed,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0 stg:text-destructive"}),(0,t.jsxs)("div",{className:"stg:min-w-0 stg:flex-1",children:[(0,t.jsx)("p",{className:"stg:text-sm stg:font-medium stg:text-destructive",children:"Invalid Configuration"}),(0,t.jsx)("p",{className:"stg:mt-0.5 stg:text-xs stg:text-destructive-muted",children:e})]})]})}function K({state:e}){switch(e){case o.ValidationState.valid:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ei,{}),(0,t.jsxs)("span",{className:"stg:inline-flex stg:items-center stg:gap-1 stg:text-emerald-600 stg:dark:text-emerald-400",children:[(0,t.jsx)(el,{className:"stg:size-3"}),"Valid"]})]});case o.ValidationState.invalid:return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ei,{}),(0,t.jsx)("span",{className:"stg:text-destructive",children:"Invalid"})]});default:return null}}let X=[{value:"http",label:"HTTP",description:"Connect via HTTP/SSE endpoint"},{value:"stdio",label:"Stdio",description:"Launch a local process with stdin/stdout"}];function Y({serverType:e,editable:r,isSaving:n,saveMcpField:i}){let[a,o]=(0,s.useState)(!1),[g,l]=(0,s.useState)(!1),d=(0,s.useMemo)(()=>{if(e?.case!=="http")return null;let t=e.value;return{url:t.url,headers:t.headers&&Object.keys(t.headers).length>0?{...t.headers}:void 0,queryParams:t.queryParams&&Object.keys(t.queryParams).length>0?{...t.queryParams}:void 0,timeoutSeconds:t.timeoutSeconds||void 0}},[e]),c=(0,s.useCallback)(async e=>{if(!i)return!1;if("http"===e){let e=await i("http",{url:""});return e&&await i("stdio",void 0),e}let t=await i("stdio",{command:""});return t&&await i("http",void 0),t},[i]),u=(0,s.useMemo)(()=>d?.headers?Object.entries(d.headers).map(([e,t])=>({key:e,value:t})):[],[d?.headers]),x=(0,s.useMemo)(()=>d?.queryParams?Object.entries(d.queryParams).map(([e,t])=>({key:e,value:t})):[],[d?.queryParams]),m=(0,s.useCallback)(async e=>{if(!i||!d)return!1;let t={};for(let s of e)s.key.trim()&&(t[s.key.trim()]=s.value);return i("http",{...d,headers:Object.keys(t).length>0?t:void 0})},[i,d]),p=(0,s.useCallback)(async e=>{if(!i||!d)return!1;let t={};for(let s of e)s.key.trim()&&(t[s.key.trim()]=s.value);return i("http",{...d,queryParams:Object.keys(t).length>0?t:void 0})},[i,d]);return(0,t.jsxs)(B.Section,{title:"Server Configuration",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-2 stg:p-3",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:"Type"}),r&&i?(0,t.jsx)(I,{value:e?.case??"http",options:X,onSave:c,isSaving:n}):(0,t.jsx)("span",{className:"stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:font-mono stg:text-xs stg:font-medium stg:text-foreground",children:e?.case??"none"})]}),e?.case==="stdio"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:"Command"}),r&&i?(0,t.jsx)(H.InlineEditText,{value:`${e.value.command}${e.value.args.length>0?` ${e.value.args.join(" ")}`:""}`,onSave:async e=>{let t=e.trim().split(/\s+/);return i("stdio",{command:t[0]||"",args:t.slice(1)})},isSaving:n,placeholder:"e.g. npx -y @modelcontextprotocol/server"}):(0,t.jsxs)("code",{className:"stg:font-mono stg:text-sm stg:text-foreground",children:[e.value.command,e.value.args.length>0&&` ${e.value.args.join(" ")}`]})]}),(r||e.value.workingDir)&&(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:"Working Dir"}),r&&i?(0,t.jsx)(H.InlineEditText,{value:e.value.workingDir??"",onSave:async t=>i("stdio",{command:e.value.command,args:[...e.value.args],workingDir:t||void 0}),isSaving:n,placeholder:"/path/to/working/dir"}):(0,t.jsx)("code",{className:"stg:font-mono stg:text-xs stg:text-foreground",children:e.value.workingDir})]})]}),e?.case==="http"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:"URL"}),r&&i?(0,t.jsx)(H.InlineEditText,{value:e.value.url,onSave:async e=>i("http",{...d,url:e}),isSaving:n,placeholder:"https://example.com/mcp"}):(0,t.jsx)("code",{className:"stg:break-all stg:font-mono stg:text-sm stg:text-foreground",children:e.value.url})]}),(r||e.value.timeoutSeconds>0)&&(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:"Timeout"}),r&&i?(0,t.jsx)(H.InlineEditText,{value:e.value.timeoutSeconds>0?String(e.value.timeoutSeconds):"",onSave:async e=>i("http",{...d,timeoutSeconds:e?Number(e):void 0}),isSaving:n,placeholder:"30",validate:e=>e&&(isNaN(Number(e))||0>Number(e))?"Must be a positive number":null}):(0,t.jsxs)("span",{className:"stg:text-xs stg:text-foreground",children:[e.value.timeoutSeconds,"s"]})]})]})]}),e?.case==="http"&&(r||u.length>0)&&(0,t.jsx)(Z,{title:"Headers",count:u.length,rows:u,editable:r,isSaving:n,editing:a,onEditingChange:o,onSave:m,keyLabel:"Header name"}),e?.case==="http"&&(r||x.length>0)&&(0,t.jsx)(Z,{title:"Query Parameters",count:x.length,rows:x,editable:r,isSaving:n,editing:g,onEditingChange:l,onSave:p,keyLabel:"Parameter name"})]})}function Z({title:e,count:s,rows:r,editable:n,isSaving:i,editing:a,onEditingChange:o,onSave:g,keyLabel:l}){return(0,t.jsxs)("div",{className:"stg:border-t stg:border-border",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:px-3 stg:py-2",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:e}),s>0&&(0,t.jsx)("span",{className:"stg:inline-flex stg:min-w-[1.25rem] stg:items-center stg:justify-center stg:rounded-full stg:bg-muted stg:px-1 stg:py-px stg:text-[10px] stg:font-medium stg:leading-none stg:text-muted-foreground",children:s})]}),n&&(0,t.jsx)("button",{type:"button",onClick:()=>o(!a),className:"stg:text-[11px] stg:text-muted-foreground stg:underline stg:decoration-muted-foreground/40 stg:underline-offset-2 stg:hover:text-foreground stg:hover:decoration-foreground",children:a?"Done":"Edit"})]}),n&&a?(0,t.jsx)(_.InlineEditKeyValue,{value:[...r],onSave:g,isSaving:i,editing:a,onEditingChange:o,keyLabel:l,showValue:!0,valueLabel:"Value"}):(0,t.jsx)("div",{className:"stg:flex stg:flex-col stg:divide-y stg:divide-border",children:r.map(e=>(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-2 stg:px-3 stg:py-1.5",children:[(0,t.jsx)("code",{className:"stg:shrink-0 stg:font-mono stg:text-xs stg:font-medium stg:text-foreground",children:e.key}),(0,t.jsx)("span",{className:"stg:min-w-0 stg:break-all stg:font-mono stg:text-xs stg:text-muted-foreground",children:function(e){let s;if(!J.test(e))return e;J.lastIndex=0;let r=[],n=0;for(;null!==(s=J.exec(e));)s.index>n&&r.push(e.slice(n,s.index)),r.push((0,t.jsxs)(O.Tooltip,{children:[(0,t.jsx)(O.TooltipTrigger,{render:(0,t.jsx)("span",{className:"stg:inline-flex stg:items-center stg:gap-0.5 stg:rounded stg:bg-primary-subtle stg:px-1 stg:py-px stg:text-[10px] stg:font-medium stg:text-primary"}),children:s[0]}),(0,t.jsx)(O.TooltipContent,{side:"top",children:`Resolved from environment variable: ${s[1]}`})]},s.index)),n=s.index+s[0].length;return n<e.length&&r.push(e.slice(n)),(0,t.jsx)(t.Fragment,{children:r})}(e.value)})]},e.key))})]})}let J=/\$\{([^}]+)\}/g;function Q({spec:e}){return(0,t.jsx)(B.Section,{title:"Source",children:(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-2 stg:p-3",children:[e.repositoryUrl&&(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-xs stg:font-medium stg:text-muted-foreground",children:"Repository"}),(0,t.jsxs)("a",{href:e.repositoryUrl,target:"_blank",rel:"noopener noreferrer",className:"stg:inline-flex stg:items-center stg:gap-1 stg:break-all stg:font-mono stg:text-xs stg:text-foreground stg:underline stg:decoration-muted-foreground/40 stg:underline-offset-2 stg:hover:decoration-foreground",children:[e.repositoryUrl,(0,t.jsx)(ef,{className:"stg:size-3 stg:shrink-0"})]})]}),e.githubStars>0&&(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-xs stg:font-medium stg:text-muted-foreground",children:"Stars"}),(0,t.jsx)("span",{className:"stg:text-xs stg:text-foreground",children:e.githubStars.toLocaleString()})]})]})})}function G({templates:e}){return 0===e.length?null:(0,t.jsx)("div",{className:"stg:flex stg:flex-col stg:divide-y stg:divide-border",children:e.map(e=>(0,t.jsxs)("div",{className:"stg:px-3 stg:py-2.5",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:text-sm stg:font-medium stg:text-foreground",children:e.name}),(0,t.jsx)("code",{className:"stg:font-mono stg:text-[10px] stg:text-muted-foreground",children:e.uriTemplate})]}),e.description&&(0,t.jsx)("p",{className:"stg:mt-0.5 stg:text-xs stg:text-muted-foreground",children:e.description})]},e.uriTemplate||e.name))})}function ee({data:e,oauthTargetEnvVar:r,editable:n,isSaving:i,saveMcpField:a}){let o=Object.entries(e).sort(([e],[t])=>e.localeCompare(t)),g=(0,s.useMemo)(()=>o.map(([e,t])=>({key:e,value:"",isSecret:t.isSecret,description:t.description,optional:t.optional})),[o]),l=(0,s.useCallback)(async e=>{if(!a)return!1;let t={};for(let s of e)s.key.trim()&&(t[s.key.trim()]={isSecret:s.isSecret||void 0,description:s.description||void 0,optional:s.optional||void 0});return a("env",Object.keys(t).length>0?t:void 0)},[a]),[d,c]=(0,s.useState)(!1);return(0,t.jsx)(B.Section,{title:"Environment Variables",count:o.length,onEdit:n?()=>c(e=>!e):void 0,children:n?(0,t.jsx)(_.InlineEditKeyValue,{value:g,onSave:l,isSaving:i,editing:d,onEditingChange:c,showSecretToggle:!0,showOptionalToggle:!0,showDescription:!0,keyLabel:"Variable name"}):(0,t.jsx)("div",{className:"stg:flex stg:flex-col stg:divide-y stg:divide-border",children:o.map(([e,s])=>{let n=e===r;return(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-3 stg:px-3 stg:py-2",children:[(0,t.jsx)("code",{className:"stg:shrink-0 stg:font-mono stg:text-sm stg:font-medium stg:text-foreground",children:e}),(0,t.jsx)("span",{className:"stg:shrink-0 stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-muted-foreground",children:s.isSecret?"secret":"config"}),n&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:rounded stg:bg-primary-subtle stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-primary",children:"oauth"}),s.optional&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-muted-foreground-subtle",children:"optional"}),s.description&&(0,t.jsx)("span",{className:"stg:text-xs stg:text-muted-foreground",children:s.description})]},e)})})})}function et({tags:e,editable:s}){return(0,t.jsx)(B.Section,{title:"Tags",count:e.length,children:(0,t.jsxs)("div",{className:"stg:flex stg:flex-wrap stg:gap-1.5 stg:p-3",children:[e.map(e=>(0,t.jsx)("span",{className:"stg:rounded-full stg:bg-muted stg:px-2.5 stg:py-0.5 stg:text-xs stg:font-medium stg:text-muted-foreground",children:e},e)),s&&0===e.length&&(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground stg:italic",children:"No tags"})]})})}function es({tools:e,isOAuthStranded:n,onDiscover:i,isDiscovering:a}){let[o,g]=(0,s.useState)(""),[l,d]=(0,s.useState)(null),c=(0,s.useMemo)(()=>{if(!o.trim())return e;let t=o.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t))},[e,o]);if(0===e.length)return(0,t.jsxs)("div",{className:"stg:px-3 stg:py-8 stg:text-center",children:[(0,t.jsx)(ec,{className:"stg:mx-auto stg:mb-2 stg:size-6 stg:text-muted-foreground-faint"}),n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:"Signed in, but tools haven't been discovered yet."}),(0,t.jsxs)("button",{type:"button",onClick:i,disabled:a,className:(0,r.cn)("stg:mt-3 stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:[a&&(0,t.jsx)(eN,{}),a?"Discovering tools...":"Discover tools"]})]}):(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:"Connect to this MCP server to discover its available tools."})]});let u=o.trim().length>0;return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:px-3 stg:pb-2",children:[(0,t.jsxs)("div",{className:"stg:relative stg:flex-1",children:[(0,t.jsx)(ev,{className:"stg:pointer-events-none stg:absolute stg:left-2 stg:top-1/2 stg:size-3.5 stg:-translate-y-1/2 stg:text-muted-foreground"}),(0,t.jsx)("input",{type:"text",value:o,onChange:e=>g(e.target.value),placeholder:"Search tools…","aria-label":"Search tools",className:"stg:w-full stg:rounded-md stg:border stg:border-border stg:bg-background stg:py-1.5 stg:pl-7 stg:pr-7 stg:text-xs stg:text-foreground stg:placeholder:text-muted-foreground stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring"}),u&&(0,t.jsx)("button",{type:"button",onClick:()=>g(""),"aria-label":"Clear search",className:"stg:absolute stg:right-2 stg:top-1/2 stg:-translate-y-1/2 stg:text-muted-foreground stg:hover:text-foreground",children:(0,t.jsx)(eb,{className:"stg:size-3"})})]}),(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-[10px] stg:text-muted-foreground",children:u?`${c.length} of ${e.length}`:e.length})]}),0===c.length?(0,t.jsx)("div",{className:"stg:px-3 stg:py-6 stg:text-center",children:(0,t.jsxs)("p",{className:"stg:text-xs stg:text-muted-foreground",children:["No tools matching “",o,"”"]})}):(0,t.jsx)("div",{className:"stg:max-h-96 stg:overflow-y-auto",children:(0,t.jsx)("div",{className:"stg:flex stg:flex-col stg:divide-y stg:divide-border",children:c.map(e=>{let s=l===e.name,n=null!=e.inputSchema&&Object.keys(e.inputSchema).length>0;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{type:"button",onClick:()=>d(s?null:e.name),className:"stg:flex stg:w-full stg:items-start stg:gap-2 stg:px-3 stg:py-2.5 stg:text-left stg:transition-colors stg:hover:bg-muted-faint","aria-expanded":s,children:[(0,t.jsx)(ej,{className:(0,r.cn)("stg:mt-0.5 stg:size-3 stg:shrink-0 stg:text-muted-foreground stg:transition-transform",s&&"stg:rotate-90")}),(0,t.jsxs)("div",{className:"stg:min-w-0 stg:flex-1",children:[(0,t.jsx)("code",{className:"stg:font-mono stg:text-sm stg:font-medium stg:text-foreground",children:e.name}),e.description&&(0,t.jsx)("p",{className:"stg:mt-0.5 stg:text-xs stg:text-muted-foreground",children:e.description})]}),n&&(0,t.jsx)("span",{className:"stg:mt-0.5 stg:shrink-0 stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-muted-foreground",children:"schema"})]}),s&&n&&(0,t.jsx)("div",{className:"stg:border-t stg:border-border stg:bg-muted-faint stg:px-3 stg:py-2",children:(0,t.jsx)("pre",{className:"stg:max-h-64 stg:overflow-auto stg:whitespace-pre-wrap stg:break-words stg:rounded stg:border stg:border-border stg:bg-background stg:p-2 stg:font-mono stg:text-[11px] stg:text-foreground",children:JSON.stringify(e.inputSchema,null,2)})})]},e.name)})})})]})}function er({pinnedPolicies:e,classifiedPolicies:r,hasDiscoveredTools:n,isOAuthStranded:i}){let[a,o]=(0,s.useState)(""),g=e.length+r.length,l=g>0,d=(0,s.useMemo)(()=>{if(!a.trim())return e;let t=a.toLowerCase();return e.filter(e=>e.toolName.toLowerCase().includes(t)||e.message?.toLowerCase().includes(t))},[e,a]),c=(0,s.useMemo)(()=>{if(!a.trim())return r;let e=a.toLowerCase();return r.filter(t=>t.toolName.toLowerCase().includes(e)||t.message?.toLowerCase().includes(e))},[r,a]),u=d.length+c.length,x=a.trim().length>0;return l?(0,t.jsxs)("div",{className:"stg:flex stg:flex-col",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:px-3 stg:pb-2",children:[(0,t.jsxs)("div",{className:"stg:relative stg:flex-1",children:[(0,t.jsx)(ev,{className:"stg:pointer-events-none stg:absolute stg:left-2 stg:top-1/2 stg:size-3.5 stg:-translate-y-1/2 stg:text-muted-foreground"}),(0,t.jsx)("input",{type:"text",value:a,onChange:e=>o(e.target.value),placeholder:"Search policies…","aria-label":"Search policies",className:"stg:w-full stg:rounded-md stg:border stg:border-border stg:bg-background stg:py-1.5 stg:pl-7 stg:pr-7 stg:text-xs stg:text-foreground stg:placeholder:text-muted-foreground stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring"}),x&&(0,t.jsx)("button",{type:"button",onClick:()=>o(""),"aria-label":"Clear search",className:"stg:absolute stg:right-2 stg:top-1/2 stg:-translate-y-1/2 stg:text-muted-foreground stg:hover:text-foreground",children:(0,t.jsx)(eb,{className:"stg:size-3"})})]}),(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-[10px] stg:text-muted-foreground",children:x?`${u} of ${g}`:g})]}),0===u?(0,t.jsx)("div",{className:"stg:px-3 stg:py-6 stg:text-center",children:(0,t.jsxs)("p",{className:"stg:text-xs stg:text-muted-foreground",children:["No policies matching “",a,"”"]})}):(0,t.jsxs)("div",{className:"stg:max-h-96 stg:overflow-y-auto",children:[d.length>0&&(0,t.jsx)(en,{icon:(0,t.jsx)(em,{className:"stg:size-3.5"}),label:"Pinned",policies:d}),c.length>0&&(0,t.jsx)(en,{icon:(0,t.jsx)(ep,{className:"stg:size-3.5"}),label:"Auto-classified",policies:c})]})]}):(0,t.jsxs)("div",{className:"stg:px-3 stg:py-8 stg:text-center",children:[(0,t.jsx)(ex,{className:"stg:mx-auto stg:mb-2 stg:size-6 stg:text-muted-foreground-faint"}),(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:n?"No approval policies yet. Reconnect to reclassify tools.":i?"Signed in — discover tools to auto-classify approval policies.":"Connect to discover tools and auto-classify approval policies."})]})}function en({icon:e,label:s,policies:r}){return(0,t.jsxs)("div",{className:"stg:flex stg:flex-col",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5 stg:border-b stg:border-border stg:bg-muted-faint stg:px-3 stg:py-1.5",children:[(0,t.jsx)("span",{className:"stg:text-muted-foreground",children:e}),(0,t.jsx)("span",{className:"stg:text-[10px] stg:font-medium stg:uppercase stg:tracking-wider stg:text-muted-foreground",children:s}),(0,t.jsxs)("span",{className:"stg:text-[10px] stg:text-muted-foreground",children:["(",r.length,")"]})]}),(0,t.jsx)("div",{className:"stg:flex stg:flex-col stg:divide-y stg:divide-border",children:r.map(e=>(0,t.jsxs)("div",{className:"stg:px-3 stg:py-2.5",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-baseline stg:gap-2",children:[(0,t.jsx)("code",{className:"stg:font-mono stg:text-sm stg:font-medium stg:text-foreground",children:e.toolName}),(0,t.jsxs)("span",{className:"stg:inline-flex stg:items-center stg:gap-1 stg:rounded stg:bg-amber-500/10 stg:px-1.5 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-amber-600 stg:dark:text-amber-400",children:[(0,t.jsx)(ex,{className:"stg:size-2.5"}),"requires approval"]})]}),e.message&&(0,t.jsx)("p",{className:"stg:mt-0.5 stg:text-xs stg:text-muted-foreground",children:e.message})]},e.toolName))})]})}function ei(){return(0,t.jsx)("span",{className:"stg:shrink-0","aria-hidden":"true",children:"·"})}function ea({className:e}){return(0,t.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col stg:gap-6",e),"aria-busy":"true","aria-label":"Loading MCP server details",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-3",children:[(0,t.jsx)("div",{className:"stg:mt-1 stg:size-6 stg:shrink-0 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsxs)("div",{className:"stg:flex-1 stg:space-y-2",children:[(0,t.jsx)("div",{className:"stg:h-5 stg:w-48 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:h-3 stg:w-64 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:h-4 stg:w-full stg:max-w-md stg:animate-pulse stg:rounded stg:bg-muted"})]})]}),[24,48,16,12].map((e,s)=>(0,t.jsxs)("div",{className:"stg:space-y-2",children:[(0,t.jsx)("div",{className:"stg:h-3 stg:w-28 stg:animate-pulse stg:rounded stg:bg-muted"}),(0,t.jsx)("div",{className:"stg:animate-pulse stg:rounded-lg stg:border stg:border-border stg:bg-muted-faint",style:{height:`${4*e}px`}})]},s))]})}function eo({className:e}){return(0,t.jsxs)("div",{role:"status",className:(0,r.cn)("stg:flex stg:flex-col stg:items-center stg:gap-2 stg:py-12 stg:text-center",e),children:[(0,t.jsx)(eg,{className:"stg:size-10 stg:text-muted-foreground-faint"}),(0,t.jsx)("p",{className:"stg:text-sm stg:font-medium stg:text-muted-foreground",children:"MCP Server not found"}),(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground-subtle",children:"This MCP server doesn't exist or you don't have access to it."})]})}function eg({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"2",y:"2",width:"12",height:"5",rx:"1"}),(0,t.jsx)("rect",{x:"2",y:"9",width:"12",height:"5",rx:"1"}),(0,t.jsx)("circle",{cx:"5",cy:"4.5",r:"0.75",fill:"currentColor",stroke:"none"}),(0,t.jsx)("circle",{cx:"5",cy:"11.5",r:"0.75",fill:"currentColor",stroke:"none"})]})}function el({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"m3 8.5 3.5 3.5 6.5-8"})})}function ed({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M8 1.5 1 14h14L8 1.5Z"}),(0,t.jsx)("path",{d:"M8 6v3.5"}),(0,t.jsx)("circle",{cx:"8",cy:"11.5",r:"0.5",fill:"currentColor",stroke:"none"})]})}function ec({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M6.5 6.5 4.25 4.25"}),(0,t.jsx)("path",{d:"m9.5 9.5 2.25 2.25"}),(0,t.jsx)("rect",{x:"1.5",y:"1.5",width:"5",height:"5",rx:"1"}),(0,t.jsx)("rect",{x:"9.5",y:"9.5",width:"5",height:"5",rx:"1"}),(0,t.jsx)("path",{d:"m6.5 9.5-3 3"}),(0,t.jsx)("path",{d:"m9.5 6.5 3-3"})]})}function eu({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M2.5 8a5.5 5.5 0 0 1 9.36-3.92"}),(0,t.jsx)("path",{d:"M13.5 8a5.5 5.5 0 0 1-9.36 3.92"}),(0,t.jsx)("path",{d:"M12 2v3h-3"}),(0,t.jsx)("path",{d:"M4 14v-3h3"})]})}function ex({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M8 1.5 2.5 4v4c0 3.31 2.35 6.4 5.5 7 3.15-.6 5.5-3.69 5.5-7V4L8 1.5Z"})})}function em({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M9.5 2.5 13.5 6.5"}),(0,t.jsx)("path",{d:"M5 7 3 14l7-2"}),(0,t.jsx)("path",{d:"m5 7 2-2 4.5-1 1.5 1.5-1 4.5-2 2z"})]})}function ep({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M8 1v2M8 13v2M1 8h2M13 8h2M3.05 3.05l1.41 1.41M11.54 11.54l1.41 1.41M3.05 12.95l1.41-1.41M11.54 4.46l1.41-1.41"})})}function eh({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"1.5",y:"5",width:"13",height:"8",rx:"1.5"}),(0,t.jsx)("path",{d:"M4.5 5V3.5a3.5 3.5 0 0 1 7 0V5"}),(0,t.jsx)("circle",{cx:"8",cy:"9.5",r:"1.25"})]})}function ef({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12 8.667v4A1.333 1.333 0 0 1 10.667 14H3.333A1.333 1.333 0 0 1 2 12.667V5.333A1.333 1.333 0 0 1 3.333 4h4"}),(0,t.jsx)("path",{d:"M10 2h4v4"}),(0,t.jsx)("path",{d:"M6.667 9.333 14 2"})]})}function ev({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"7",cy:"7",r:"4.5"}),(0,t.jsx)("path",{d:"m10.5 10.5 3 3"})]})}function eb({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"m4 4 8 8M12 4l-8 8"})})}function ej({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"m6 4 4 4-4 4"})})}function eN(){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",className:"stg:animate-spin","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M8 2a6 6 0 1 0 6 6"})})}e.s(["McpServerDetailView",0,function({org:e,slug:r,mcpServerState:f,onResourceLoad:j,defaultCapabilityTab:y="tools",defaultShowCredentialForm:k=!1,credentialPoolValues:C,activeOrg:O,primaryAction:I,actions:R,onPluginClick:U,editable:_=!1,onResourceUpdated:F,className:X}){let Z=(0,g.useMcpServer)(f?null:e,f?null:r),{mcpServer:J,isLoading:en,error:el,refetch:ed}=f??Z,ec=(0,W.useManagingPlugin)(J?.metadata?.labels),eu=_&&null===ec.plugin,{update:ex,isUpdating:em}=function(){let e=(0,l.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,i]=(0,s.useState)(null),a=(0,s.useCallback)(()=>i(null),[]);return{update:(0,s.useCallback)(async t=>{r(!0),i(null);try{return await e.mcpServer.update(t)}catch(e){throw i((0,d.toError)(e)),e}finally{r(!1)}},[e]),isUpdating:t,error:n,clearError:a}}(),ep=(0,s.useCallback)(async(e,t)=>{if(!J)return!1;let s=(0,c.toMcpServerUpdateInput)(J);s[e]=t;try{let e=await ex(s);return F?.(e),ed(),!0}catch{return!1}},[J,ex,F,ed]),eh=(0,x.useMcpServerCredentials)(O??e,J??null),ef=(0,u.useMcpServerConnect)(),ev=(0,m.useMcpServerOAuthConnect)(),eb=(0,v.useDisconnectOAuth)(),ej=(0,b.useOrgOAuthApp)(J?.metadata?.id??null,O??e),[eN,ey]=(0,s.useState)(k),[ek,eC]=(0,s.useState)(!1),[eS,ew]=(0,s.useState)(y),eO=(0,s.useRef)(j);eO.current=j,(0,s.useEffect)(()=>{J?.metadata?.name&&eO.current?.({name:J.metadata.name,id:J.metadata.id})},[J]);let eA=(0,s.useCallback)(async()=>{if(!J?.metadata?.id)return;let t=Object.keys(J.spec?.env??{});try{await ev.startOAuth(J.metadata.id,O??e,t),eh.refetch(),ed()}catch{eh.refetch(),ed()}},[J,ev,eh,ed]),eE="oauth"===eh.authMode&&"connecting"===ev.failedPhase,eL=(0,s.useCallback)(async()=>{if(!J?.metadata?.id)return;if("oauth"===eh.authMode&&!eh.isOAuthConnected&&!eh.manualOverride&&!eE)return void eA();if(!eh.isReady&&!eE)return void ey(!0);let t=Object.keys(J.spec?.env??{});try{await ef.connect(J.metadata.id,O??e,void 0,t),ev.clearError(),ed()}catch{}},[J,eh.authMode,eh.isOAuthConnected,eh.manualOverride,eh.isReady,eE,ef,ev.clearError,ed,eA,O,e]),eM=(0,s.useCallback)(async(t,s)=>{try{if(s.saveForFuture&&(await eh.saveCredentials(t),eh.refetch()),J?.metadata?.id){let s=Object.keys(J.spec?.env??{}),r=O??e;await ef.connect(J.metadata.id,r,t,s),ed()}ey(!1)}catch{}},[eh,J,ef,ed]),eT=(0,s.useCallback)(async()=>{if(J?.metadata?.id)try{await eb.disconnect(J.metadata.id,O??e),eh.refetch(),ed()}catch{}},[J,eb,eh,ed,O,e]),eD=(0,s.useCallback)(e=>{e||(eC(!1),ej.clearErrors())},[ej]),eB=(0,s.useCallback)(async(e,t)=>{await ej.setOrgOAuthApp(e,t),eC(!1),ej.refetch(),eh.refetch(),ed()},[ej,eh,ed]),eH=(0,s.useCallback)(async()=>{await ej.deleteOrgOAuthApp(),ej.refetch(),eh.refetch(),ed()},[ej,eh,ed]),ez=J?.spec,eP=J?.status,eI=ez&&(ez.repositoryUrl||ez.githubStars>0),eR=eP?.audit?.specAudit,eU=eP?.discoveredCapabilities,e_=ez?.pinnedToolApprovals??[],eV=eP?.toolApprovals??[],eW=e_.length+eV.length,e$=eU?.tools??[],eF=eU?.resourceTemplates??[],eq=e$.length>0,eK="oauth"===eh.authMode&&eh.isOAuthConnected&&eh.connectionHealth!==a.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_TOKEN_EXPIRED&&!eq,eX=(0,s.useMemo)(()=>{let e=[{id:"tools",label:"Tools",badge:e$.length},{id:"policies",label:"Policies",badge:eW}];return eF.length>0&&e.push({id:"resources",label:"Resources",badge:eF.length}),e},[e$.length,eW,eF.length]),eY=ef.error??ev.error,eZ=ef.error?(0,n.getUserMessage)(ef.error):ev.error?(0,m.getOAuthConnectErrorMessage)(ev.error,ev.failedPhase):null,eJ=(0,s.useCallback)(()=>{ef.clearError(),ev.clearError()},[ef,ev]),eQ=(0,M.useManageAccess)({resource:J?.metadata?{kind:S.ApiResourceKind.mcp_server,kindString:"mcp_server",id:J.metadata.id,org:J.metadata.org,name:J.metadata.name}:null,visibility:J?.metadata?{kind:"mcpServer",current:J.metadata.visibility,org:J.metadata.org,onChanged:ed}:void 0});if(en)return(0,t.jsx)(ea,{className:X});if(el)return(0,t.jsx)(w.ErrorMessage,{error:el,retry:ed,className:X});if(!J)return(0,t.jsx)(eo,{className:X});let eG=J.metadata,e0=eU?.lastDiscoveredAt?(0,i.timestampDate)(eU.lastDiscoveredAt):null,e1={name:eG?.name||eG?.slug||"Untitled",nameElement:eu&&ep?(0,t.jsx)(H.InlineEditText,{value:eG?.name||"",onSave:e=>ep("name",e),isSaving:em,variant:"heading",placeholder:"Server name",validate:e=>e.trim()?null:"Name is required"}):void 0,id:eG?.id||"",org:eG?.org,slug:eG?.slug,qualifiedSlug:eG?.slug?eG.org?`${eG.org}/${eG.slug}`:eG.slug:void 0,icon:eu&&ep?(0,t.jsx)(P.InlineEditImage,{value:ez?.iconUrl??"",onSave:e=>ep("iconUrl",e||void 0),isSaving:em,fallback:(0,t.jsx)(eg,{className:"stg:size-6 stg:text-muted-foreground"}),size:"md"}):ez?.iconUrl?void 0:(0,t.jsx)(eg,{className:"stg:size-6 stg:text-muted-foreground"}),iconUrl:eu?void 0:ez?.iconUrl||void 0,createdAt:eR?.createdAt?(0,i.timestampDate)(eR.createdAt):null,updatedAt:eR?.updatedAt?(0,i.timestampDate)(eR.updatedAt):null},e5=eG?(0,t.jsx)(L.VisibilityBadge,{visibility:eG.visibility,onClick:eQ.action?eQ.open:void 0}):void 0,e3=eQ.action?[...R??[],eQ.action]:R,e2=(0,t.jsxs)(t.Fragment,{children:[eP&&(0,t.jsx)(K,{state:eP.validationState}),e0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ei,{}),(0,t.jsxs)("span",{children:["Discovered ",e0.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]})]}),e6=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(V.ManagedByPluginNotice,{plugin:ec.plugin,onPluginClick:U}),eP?.validationState===o.ValidationState.invalid&&eP.validationMessage?(0,t.jsx)(q,{message:eP.validationMessage}):null]});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(D.ResourceDetailShell,{header:e1,visibilityControl:e5,headerMetaExtra:e2,headerBanner:e6,primaryAction:I,actions:e3,className:X,children:[(eu||ez?.description)&&(0,t.jsx)(B.Section,{title:"Description",children:eu&&ep?(0,t.jsx)("div",{className:"stg:max-h-20 stg:overflow-y-auto stg:p-3",children:(0,t.jsx)(z.InlineEditTextarea,{value:ez?.description||"",onSave:e=>ep("description",e||void 0),isSaving:em,placeholder:"Add a description",minRows:2})}):(0,t.jsx)("div",{className:"stg:p-3",children:(0,t.jsx)("pre",{className:"stg:whitespace-pre-wrap stg:break-words stg:text-sm stg:text-foreground stg:font-sans",children:ez?.description})})}),eI&&(0,t.jsx)(Q,{spec:ez}),(eu||ez?.serverType.case)&&(0,t.jsx)(Y,{serverType:ez?.serverType,editable:eu,isSaving:em,saveMcpField:ep}),(eu||ez?.env&&Object.keys(ez.env).length>0)&&(0,t.jsx)(ee,{data:ez?.env??{},oauthTargetEnvVar:eh.oauthTargetEnvVar,editable:eu,isSaving:em,saveMcpField:ep}),(0,t.jsxs)(B.Section,{title:"Connection",scrollTarget:"mcp-connection",children:[(0,t.jsx)(p.StdioSandboxNotice,{serverType:ez?.serverType,className:"stg:mb-3"}),(0,t.jsx)(h.OAuthRequiredNotice,{oauthOnly:ez?.auth?.oauthOnly,className:"stg:mb-3"}),(0,t.jsx)($,{manualEntrySupported:eh.manualEntrySupported,isConnecting:ef.isConnecting||ev.isInProgress,connectionError:eY,connectionErrorMessage:eZ,onConnect:eL,onClearConnectionError:eJ,hasDiscoveredTools:eq,isOAuthStranded:eK,credentialsLoading:eh.isLoading,oauthPhase:ev.phase,authMode:eh.authMode,isOAuthConnected:eh.isOAuthConnected,connectionHealth:eh.connectionHealth,canDisconnect:eh.canDisconnect,onDisconnect:eT,isDisconnecting:eb.isDisconnecting,disconnectError:eb.error,onClearDisconnectError:eb.clearError,serverName:J?.metadata?.name??r,accessTokenExpiresAt:eh.accessTokenExpiresAt,tokenLifetimeHint:eh.tokenLifetimeHint,isVendorApprovalPending:eh.isVendorApprovalPending,isVendorApprovalBlocked:eh.isVendorApprovalBlocked,vendorApprovalDocsUrl:eh.vendorApprovalDocsUrl,canBringOwnApp:eh.canBringOwnApp,isOrgOAuthApp:eh.isOrgOAuthApp,onBringOwnApp:()=>eC(!0),onRemoveOrgApp:eH,isRemovingOrgApp:ej.isDeleting,removeOrgAppError:ej.deleteError,onClearRemoveOrgAppError:ej.clearErrors,manualOverride:eh.manualOverride,onManualOverride:()=>{eh.setManualOverride(!0),ey(!0)},onBackToOAuth:()=>{eh.setManualOverride(!1),ey(!1)},onCancelOAuth:ev.clearError}),eN&&eh.missingVariables.length>0&&(0,t.jsx)("div",{className:"stg:border-b stg:border-border stg:p-4","data-cursor-target":"credential-form",children:(0,t.jsx)(E.EnvVarForm,{title:"Credentials Required",description:'Enter the credentials needed to connect to this MCP server. Toggle "Save for future runs" to persist them in your personal environment, or leave it off for one-time use.',variables:eh.missingVariables,onSubmit:(e,t)=>eM(e,t),onCancel:()=>ey(!1),isSubmitting:eh.isSaving,poolValues:C,className:"stg:w-full stg:max-w-md"})})]}),(0,t.jsxs)(A.DialogShell,{open:ek,onOpenChange:eD,width:"md",className:"stg:p-6","aria-label":"Use your own OAuth app",children:[(0,t.jsx)("h3",{className:"stg:mb-4 stg:text-base stg:font-semibold stg:text-foreground",children:"Use your own OAuth app"}),(0,t.jsx)(N,{providerName:J?.metadata?.name??r,vendorDocsUrl:eh.vendorApprovalDocsUrl,onSubmit:eB,onCancel:()=>{eC(!1),ej.clearErrors()},isSubmitting:ej.isSetting,error:ej.setError})]}),(0,t.jsx)(B.Section,{title:"Capabilities",scrollTarget:"mcp-capabilities",children:(0,t.jsxs)(T.Tabs,{tabs:eX,activeTab:eS,onTabChange:e=>ew(e),"aria-label":"MCP server capabilities",children:["tools"===eS&&(0,t.jsx)(es,{tools:e$,isOAuthStranded:eK,onDiscover:eL,isDiscovering:ef.isConnecting||ev.isInProgress}),"policies"===eS&&(0,t.jsx)(er,{pinnedPolicies:e_,classifiedPolicies:eV,hasDiscoveredTools:eq,isOAuthStranded:eK}),"resources"===eS&&(0,t.jsx)(G,{templates:eF})]})}),(eu||ez&&ez.tags.length>0)&&(0,t.jsx)(et,{tags:ez?.tags??[],editable:eu})]}),eQ.dialog]})},"oauthPhaseLabel",0,F],674542)}]);