@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
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,348990,e=>{"use strict";var t=e.i(271645),r=e.i(891287),s=e.i(95265),n=e.i(586108),a=e.i(583093);e.s(["useEnvironmentList",0,function(e,o){let i=(0,n.useStigmer)(),l=(0,t.useRef)(o);o!==l.current&&JSON.stringify(o)!==JSON.stringify(l.current)&&(l.current=o);let u=l.current,c=e?async()=>{let t=await i.environment.list((0,r.create)(s.ListEnvironmentsRequestSchema,{org:e,labels:u??{}}));return{environments:t.items,totalCount:t.totalCount}}:null,{data:d,isLoading:g,isRefetching:h,error:p,refetch:m}=(0,a.useFetch)(c,[e,u,i],{environments:[],totalCount:0});return{environments:d.environments,totalCount:d.totalCount,isLoading:g,isRefetching:h,error:p,refetch:m}}])},367539,e=>{"use strict";e.s(["generateSlug",0,function(e){return e.toLowerCase().replace(/[ .]/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"")},"generateSlugSuffix",0,function(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}])},207344,e=>{"use strict";var t=e.i(271645),r=e.i(891287),s=e.i(95265),n=e.i(621559),a=e.i(586108),o=e.i(367539),i=e.i(326283),l=e.i(348990);let u={"stigmer.ai/personal":"true"};e.s(["usePersonalEnvironment",0,function(e){let c=(0,a.useStigmer)(),{environments:d,isLoading:g,error:h,refetch:p}=(0,l.useEnvironmentList)(e,u),m=(0,t.useMemo)(()=>d[0]??null,[d]),[v,f]=(0,t.useState)(!1),[b,x]=(0,t.useState)(null),S=(0,t.useRef)(m);S.current=m;let y=(0,t.useRef)(g);y.current=g;let w=(0,t.useCallback)(async t=>{if(S.current)return S.current;if(!e)throw Error("usePersonalEnvironment: cannot call getOrCreate when org is null.");if(y.current)throw Error("usePersonalEnvironment: cannot call getOrCreate while the environment list is loading. Wait for isLoading to become false before calling getOrCreate().");f(!0),x(null);try{let r;t&&Object.keys(t).length>0&&(r=t);let s=await c.environment.create({name:"Personal Environment",slug:`env-personal-${(0,o.generateSlugSuffix)()}`,org:e,labels:u,data:r});return S.current=s,p(),s}catch(e){throw x((0,i.toError)(e)),e}finally{f(!1)}},[e,c,p]),k=(0,t.useCallback)(async e=>{let t=S.current;if(!t)throw Error("usePersonalEnvironment: personal environment does not exist. Call getOrCreate() before addVariables().");f(!0),x(null);try{let a=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(0,r.create)(n.EnvironmentValueSchema,{value:t.value,isSecret:t.isSecret,description:t.description})])),o=(0,r.create)(s.UpdateEnvironmentVariablesRequestSchema,{environmentId:t.metadata.id,variables:a}),i=await c.environment.updateVariables(o);return p(),i}catch(e){throw x((0,i.toError)(e)),e}finally{f(!1)}},[c,p]),A=(0,t.useCallback)(async e=>{let t=S.current;if(!t)throw Error("usePersonalEnvironment: personal environment does not exist. Call getOrCreate() before removeVariables().");f(!0),x(null);try{let n=(0,r.create)(s.RemoveEnvironmentVariablesRequestSchema,{environmentId:t.metadata.id,keys:e}),a=await c.environment.removeVariables(n);return p(),a}catch(e){throw x((0,i.toError)(e)),e}finally{f(!1)}},[c,p]);return{environment:m,isLoading:g,error:b??h,refetch:p,getOrCreate:w,addVariables:k,removeVariables:A,isMutating:v}}])},903198,e=>{"use strict";let t="stigmer:oauth:callback",r="stigmer:oauth:broadcast";function s(e){try{e?.close()}catch{}}e.s(["OAUTH_BROADCAST_CHANNEL",0,r,"OAUTH_CALLBACK_MESSAGE_TYPE",0,t,"closeOAuthPopup",0,s,"openOAuthPopup",0,function(){let e=window.screenX+(window.outerWidth-600)/2,t=window.screenY+(window.outerHeight-700)/2;return window.open("about:blank","stigmer_oauth",`width=600,height=700,left=${e},top=${t},popup=yes`)},"popupBlockedError",0,function(){return Error("Your browser blocked the authentication popup. Please allow popups for this site and try again.")},"waitForOAuthCallback",0,function(e,n,a){return new Promise((o,i)=>{let l,u,c=!1,d=null,g=!1;function h(e){if(!c){c=!0,l&&clearTimeout(l),u&&clearInterval(u),window.removeEventListener("message",m);try{d?.close()}catch{}e instanceof Error?i(e):o(e)}}function p(e){if(e?.type===t){if(e.state!==n)return void h(Error("OAuth state mismatch — the callback did not match the initiated flow. Please try again."));if(!e.code)return void h(Error("No authorization code received from the OAuth provider."));h({code:e.code,state:e.state})}}function m(e){e.origin===window.location.origin&&p(e.data)}a(()=>{h(Error("OAuth flow was cancelled.")),s(e)}),window.addEventListener("message",m);try{d=new BroadcastChannel(r),g=!0,d.onmessage=e=>{p(e.data)}}catch{}l=setTimeout(()=>{h(Error("OAuth authentication timed out. Ensure your callback page renders <OAuthCallbackHandler /> from @stigmer/react at the URL configured as your OAuth redirect URI.")),s(e)},12e4);let v=null;u=setInterval(()=>{!g&&(e.closed?null===v?v=Date.now():Date.now()-v>5e3&&h(Error("The authentication window was closed before completing sign-in.")):v=null)},500)})}])},230849,4144,e=>{"use strict";var t=e.i(271645);e.s(["useScrollShadows",0,function(){let e=(0,t.useRef)(null),[r,s]=(0,t.useState)(!1),[n,a]=(0,t.useState)(!1),o=(0,t.useCallback)(()=>{let t=e.current;t&&(s(t.scrollTop>0),a(t.scrollTop+t.clientHeight<t.scrollHeight-1))},[]);return(0,t.useEffect)(()=>{let t=e.current;if(!t)return;t.addEventListener("scroll",o,{passive:!0});let r=new ResizeObserver(o);return r.observe(t),o(),()=>{t.removeEventListener("scroll",o),r.disconnect()}},[o]),{scrollRef:e,canScrollUp:r,canScrollDown:n}}],230849);var r=e.i(843476);e.s(["ScrollFade",0,function({position:e}){let t="top"===e;return(0,r.jsx)("div",{className:["stg:pointer-events-none stg:absolute stg:inset-x-0 stg:z-10 stg:h-3",t?"stg:top-0":"stg:bottom-0"].join(" "),style:{background:t?"linear-gradient(to bottom, var(--color-popover, hsl(0 0% 9%)), transparent)":"linear-gradient(to top, var(--color-popover, hsl(0 0% 9%)), transparent)"},"aria-hidden":"true"})}],4144)},351240,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(893976),n=e.i(230849),a=e.i(4144),o=e.i(379410);function i(){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 l(){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"})]})}e.s(["EnvVarForm",0,function({variables:e,onSubmit:u,onCancel:c,isSubmitting:d,disabled:g,title:h,description:p,submitLabel:m,cancelLabel:v="Back",defaultSaveForFuture:f=!0,hideSaveToggle:b=!1,poolValues:x,className:S,ariaLabel:y}){let[w,k]=(0,r.useState)(()=>Object.fromEntries(e.map(e=>{let t=x?.(e.key);return[e.key,t?.value??""]}))),[A]=(0,r.useState)(()=>{if(!x)return new Set;let t=new Set;for(let r of e)x(r.key)&&t.add(r.key);return t}),[O,E]=(0,r.useState)(new Set),[j,C]=(0,r.useState)(f),N=(0,r.useRef)(null),I=(0,n.useScrollShadows)(),M=(0,r.useId)(),P=`${M}-save-toggle`,R=g||d,L=e.every(e=>w[e.key]?.trim()!==""),T=(0,r.useCallback)((e,t)=>{k(r=>({...r,[e]:t}))},[]),_=(0,r.useCallback)(e=>{E(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),U=(0,r.useCallback)(t=>{if(t.preventDefault(),!L||R)return;let r={};for(let t of e)r[t.key]={value:w[t.key],isSecret:t.isSecret,...t.description&&{description:t.description}};u(r,{saveForFuture:j})},[L,R,w,e,u,j]),V=y??(h?`Configure ${h}`:"Configure environment variables"),D=m??(j?"Save":"Use once");return(0,t.jsxs)("form",{onSubmit:U,className:(0,s.cn)("stg:w-72 stg:space-y-3",S),"aria-label":V,children:[h&&(0,t.jsxs)("div",{className:"stg:space-y-0.5",children:[(0,t.jsx)("h3",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:h}),p&&(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:p})]}),(0,t.jsxs)("div",{className:"stg:relative",children:[I.canScrollUp&&(0,t.jsx)(a.ScrollFade,{position:"top"}),(0,t.jsx)("div",{ref:I.scrollRef,className:"stg:max-h-64 stg:space-y-2.5 stg:overflow-y-auto",children:e.map((e,r)=>{let n=`${M}-env-${e.key}`,a=e.description?`${n}-desc`:void 0,o=O.has(e.key);return(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsxs)("label",{htmlFor:n,className:"stg:flex stg:items-baseline stg:gap-1.5 stg:text-[0.65rem] stg:font-medium stg:text-muted-foreground",children:[(0,t.jsx)("span",{className:"stg:font-mono",children:e.key}),e.isSecret&&(0,t.jsx)("span",{className:"stg:text-[0.55rem] stg:uppercase stg:tracking-wider stg:text-muted-foreground-subtle",children:"secret"})]}),(0,t.jsxs)("div",{className:"stg:relative",children:[(0,t.jsx)("input",{ref:0===r?N:void 0,id:n,type:e.isSecret&&!o?"password":"text",value:w[e.key],onChange:t=>T(e.key,t.target.value),disabled:R,required:!0,"aria-required":!0,"aria-describedby":a,autoComplete:"off",autoFocus:0===r,className:(0,s.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",e.isSecret&&"stg:pr-8")}),e.isSecret&&(0,t.jsx)("button",{type:"button",onClick:()=>_(e.key),disabled:R,className:(0,s.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":o?`Hide ${e.key}`:`Show ${e.key}`,tabIndex:-1,children:o?(0,t.jsx)(l,{}):(0,t.jsx)(i,{})})]}),e.description&&(0,t.jsx)("p",{id:a,className:"stg:text-[0.6rem] stg:leading-relaxed stg:text-muted-foreground-subtle",children:e.description}),A.has(e.key)&&(0,t.jsx)("p",{className:"stg:text-[0.55rem] stg:text-primary-muted",children:"Pre-filled from session variables"})]},e.key)})}),I.canScrollDown&&(0,t.jsx)(a.ScrollFade,{position:"bottom"})]}),!b&&(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-2 stg:pt-0.5",children:[(0,t.jsx)("button",{id:P,type:"button",role:"switch","aria-checked":j,onClick:()=>C(e=>!e),disabled:R,className:(0,s.cn)("stg:relative stg:mt-0.5 stg:inline-flex stg:h-4 stg:w-7 stg:shrink-0 stg:cursor-pointer stg:rounded-full stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:focus-visible:ring-offset-2","stg:disabled:pointer-events-none stg:disabled:opacity-50",j?"stg:bg-primary":"stg:bg-input"),children:(0,t.jsx)("span",{className:(0,s.cn)("stg:pointer-events-none stg:block stg:h-3 stg:w-3 stg:translate-y-0.5 stg:rounded-full stg:bg-background stg:shadow-sm stg:ring-0 stg:transition-transform",j?"stg:translate-x-3.5":"stg:translate-x-0.5")})}),(0,t.jsxs)("label",{htmlFor:P,className:"stg:cursor-pointer stg:select-none stg:space-y-0.5",children:[(0,t.jsx)("span",{className:"stg:block stg:text-[0.65rem] stg:font-medium stg:text-muted-foreground",children:"Save for future runs"}),!j&&(0,t.jsx)("span",{className:"stg:block stg:text-[0.6rem] stg:leading-relaxed stg:text-muted-foreground-subtle",children:"These values will only be used for this run."})]})]}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-end stg:gap-2 stg:pt-1",children:[c&&(0,t.jsx)("button",{type:"button",onClick:c,disabled:R,className:(0,s.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:v}),(0,t.jsxs)("button",{type:"submit",disabled:!L||R,"data-cursor-target":"env-form-submit",className:(0,s.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:[d&&(0,t.jsx)(o.SpinnerIcon,{size:12}),D]})]})]})}])},793907,e=>{"use strict";var t=e.i(843476),r=e.i(893976);function s({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 n({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"})]})}e.s(["VendorApprovalBlockedNotice",0,function({blocked:e,pending:a,manualEntrySupported:o,canBringOwnApp:i,docsUrl:l,onBringOwnApp:u,compact:c,className:d}){if(!e)return null;let g=a?"The platform's OAuth app is awaiting vendor approval.":"The platform's OAuth app was not approved by the vendor.",h=i?o?"You can use your own OAuth app or enter a token manually.":"You can use your own OAuth app.":o?"You can still connect by entering your own token manually.":"OAuth sign-in is temporarily unavailable for this server.",p=i&&u,m=!!l&&!i;return c?(0,t.jsxs)("div",{className:(0,r.cn)("stg:text-[0.65rem] stg:text-amber-700 stg:dark:text-amber-300",d),children:[(0,t.jsxs)("p",{children:[g," ",h]}),p&&(0,t.jsx)("button",{type:"button",onClick:u,className:"stg:mt-1 stg:inline-flex stg:items-center stg:gap-1 stg:rounded stg:bg-amber-600 stg:px-2 stg:py-0.5 stg:text-[0.6rem] stg:font-medium stg:text-white stg:hover:bg-amber-700 stg:dark:bg-amber-500 stg:dark:text-amber-950 stg:dark:hover:bg-amber-400",children:"Use your own OAuth app"}),m&&(0,t.jsx)("a",{href:l??void 0,target:"_blank",rel:"noopener noreferrer",className:"stg:underline stg:decoration-amber-600/40 stg:underline-offset-2 stg:hover:decoration-amber-600 stg:dark:decoration-amber-400/40 stg:dark:hover:decoration-amber-400",children:"Learn how to bring your own token"})]}):(0,t.jsxs)("div",{role:"status",className:(0,r.cn)("stg:flex stg:items-start stg:gap-2 stg:bg-amber-500/5 stg:px-3 stg:py-2",d),children:[(0,t.jsx)(s,{className:"stg:mt-0.5 stg:size-3.5 stg:shrink-0 stg:text-amber-600 stg:dark:text-amber-400"}),(0,t.jsxs)("div",{className:"stg:flex-1 stg:text-xs stg:text-amber-700 stg:dark:text-amber-300",children:[(0,t.jsxs)("p",{children:[g," ",h]}),p&&(0,t.jsx)("button",{type:"button",onClick:u,"data-cursor-target":"byoa-cta-button",className:"stg:mt-1.5 stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:bg-amber-600 stg:px-2.5 stg:py-1 stg:text-[11px] stg:font-medium stg:text-white stg:hover:bg-amber-700 stg:dark:bg-amber-500 stg:dark:text-amber-950 stg:dark:hover:bg-amber-400",children:"Use your own OAuth app"}),m&&(0,t.jsxs)("a",{href:l??void 0,target:"_blank",rel:"noopener noreferrer",className:"stg:mt-1 stg:inline-flex stg:items-center stg:gap-1 stg:underline stg:decoration-amber-600/40 stg:underline-offset-2 stg:hover:decoration-amber-600 stg:dark:decoration-amber-400/40 stg:dark:hover:decoration-amber-400",children:["Learn how to bring your own token",(0,t.jsx)(n,{className:"stg:size-3 stg:shrink-0"})]})]})]})}])},20883,e=>{"use strict";var t=e.i(939910),r=e.i(167937),s=e.i(498931),n=e.i(910304);class a extends Error{mcpServerId;constructor(e,t){super(`the connect of MCP server '${e}' is still running server-side after ${Math.round(t/1e3)}s — it will persist its result on its own; re-read the server to observe the outcome`),this.name="ConnectStillRunningError",this.mcpServerId=e}}async function o(e,o,l){let u,c=l?.pollIntervalMs??2500,d=Math.min(l?.deadlineMs??39e5,39e5);try{u=await e.startConnect(o)}catch(t){if(!(0,n.isUnimplemented)(t))throw t;return i(e,o,d)}l?.onStarted?.(u);let g=Date.now()+d;for(;;){if(Date.now()>=g)throw new a(o.mcpServerId,d);await function(e){return new Promise(t=>setTimeout(t,e))}(Math.min(c,Math.max(1,g-Date.now())));let i=await e.get(o.mcpServerId),l=i.status?.connectStatus;if(l?.phase===s.ConnectPhase.succeeded)return i;if(l?.phase===s.ConnectPhase.failed)throw function(e,s){let a=t.Code[e];return(0,n.wrapError)(new r.ConnectError(s,"number"==typeof a?a:t.Code.Unknown))}(l.failureCode,l.failureMessage)}}async function i(e,t,r){let s,n=e.connect(t);n.catch(()=>{});let o=new Promise((e,n)=>{s=setTimeout(()=>n(new a(t.mcpServerId,r)),r)});try{return await Promise.race([n,o])}finally{void 0!==s&&clearTimeout(s)}}e.s(["connectAndWait",0,o])},139666,e=>{"use strict";let t="STIGMER_SERVER_ADDRESS",r="STIGMER_API_KEY",s=new Set([t,r]);async function n(e){var s;let n=await e.getAuthCredential();return s=e.baseUrl,{[t]:{value:function(e){try{let t=new URL(e),r=t.hostname,s=t.port||("https:"===t.protocol?"443":"80");return`${r}:${s}`}catch{return e}}(s),isSecret:!1,description:"Auto-resolved from the current Stigmer connection."},[r]:{value:n||"unused",isSecret:!0,description:"Auto-resolved from the current Stigmer auth context."}}}async function a(e,t){let r=t instanceof Set?t:new Set(t);if(![...s].some(e=>r.has(e)))return{};let a=await n(e),o={};for(let[e,t]of Object.entries(a))r.has(e)&&(o[e]=t);return o}e.s(["SYSTEM_ENV_VAR_KEYS",0,s,"resolveDeclaredSystemEnvVars",0,a,"resolveSystemEnvVarValues",0,n])},168197,e=>{"use strict";var t=e.i(271645),r=e.i(891287),s=e.i(20883),n=e.i(610595),a=e.i(336973),o=e.i(586108),i=e.i(139666),l=e.i(326283),u=e.i(903198);e.s(["getOAuthConnectErrorMessage",0,function(e,t){let r=(0,n.getUserMessage)(e);return"connecting"===t?`Signed in successfully, but tool discovery failed: ${r}`:r},"useMcpServerOAuthConnect",0,function(){let e=(0,o.useStigmer)(),[n,c]=(0,t.useState)("idle"),[d,g]=(0,t.useState)(null),[h,p]=(0,t.useState)(null),m=(0,t.useRef)(null),v=(0,t.useRef)(null),f=(0,t.useRef)(!1),b=(0,t.useRef)("idle"),x=(0,t.useCallback)(e=>{b.current=e,c(e)},[]);(0,t.useEffect)(()=>()=>{v.current?.()},[]);let S=(0,t.useCallback)(()=>{(v.current||m.current)&&(f.current=!0,v.current?.(),(0,u.closeOAuthPopup)(m.current),m.current=null,v.current=null),x("idle"),g(null),p(null)},[x]);return{startOAuth:(0,t.useCallback)(async(t,n,o)=>{x("initiating"),g(null),p(null),f.current=!1,v.current?.();let c=(0,u.openOAuthPopup)();if(!c){let e=(0,u.popupBlockedError)();throw g(e),p("initiating"),x("idle"),e}m.current=c;try{let l=await e.mcpServer.initiateOAuthConnect((0,r.create)(a.InitiateOAuthConnectInputSchema,{mcpServerId:t,org:n}));c.location.href=l.authorizationUrl,x("awaiting-callback");let{code:d,state:g}=await (0,u.waitForOAuthCallback)(c,l.state,e=>{v.current=e});x("completing"),await e.mcpServer.completeOAuthConnect((0,r.create)(a.CompleteOAuthConnectInputSchema,{mcpServerId:t,authorizationCode:d,state:g})),x("connecting");let h=o?await (0,i.resolveDeclaredSystemEnvVars)(e,o):{},p={};for(let[e,t]of Object.entries(h))p[e]={value:t.value,isSecret:t.isSecret??!1};let m=(0,r.create)(a.ConnectInputSchema,{mcpServerId:t,org:n,...Object.keys(p).length>0?{runtimeEnv:p}:{}}),f=await (0,s.connectAndWait)(e.mcpServer,m);return x("done"),f}catch(t){let e=(0,l.toError)(t);throw f.current||(g(e),p(b.current),x("idle"),(0,u.closeOAuthPopup)(c)),f.current=!1,e}finally{m.current=null,v.current=null}},[e,x]),isInProgress:"idle"!==n&&"done"!==n,phase:n,error:d,failedPhase:h,clearError:S}}])},862645,e=>{"use strict";var t=e.i(271645),r=e.i(891287),s=e.i(336973),n=e.i(20883),a=e.i(586108),o=e.i(139666),i=e.i(326283);e.s(["useMcpServerConnect",0,function(){let e=(0,a.useStigmer)(),[l,u]=(0,t.useState)(!1),[c,d]=(0,t.useState)(null),g=(0,t.useCallback)(()=>d(null),[]);return{connect:(0,t.useCallback)(async(t,a,l,c)=>{u(!0),d(null);try{let i={...c?await (0,o.resolveDeclaredSystemEnvVars)(e,c):{},...l??{}},u={};for(let[e,t]of Object.entries(i))u[e]={value:t.value,isSecret:t.isSecret??!1};let d=(0,r.create)(s.ConnectInputSchema,{mcpServerId:t,org:a,...Object.keys(u).length>0?{runtimeEnv:u}:{}});return await (0,n.connectAndWait)(e.mcpServer,d)}catch(t){let e=(0,i.toError)(t);throw d(e),e}finally{u(!1)}},[e]),isConnecting:l,error:c,clearError:g}}])},727996,288270,651424,153158,e=>{"use strict";var t=e.i(910304),r=e.i(586108),s=e.i(583093);e.s(["useMcpServer",0,function(e,n){let a=(0,r.useStigmer)(),{data:o,isLoading:i,isRefetching:l,error:u,refetch:c}=(0,s.useFetch)(e&&n?async()=>{try{return await a.mcpServer.getByReference({org:e,slug:n})}catch(e){if((0,t.isNotFound)(e))return null;throw e}}:null,[e,n,a],null);return{mcpServer:o,isLoading:i,isRefetching:l,error:u,refetch:c}}],727996);var n=e.i(271645),a=e.i(498931),o=e.i(437241),i=e.i(207344);function l(e,t,r){let s=[];for(let[n,a]of Object.entries(e))!t.has(n)&&(r?.has(n)||s.push({key:n,isSecret:a.isSecret,...a.description&&{description:a.description},...a.optional&&{optional:!0}}));return s}e.s(["diffEnv",0,l],288270);var u=e.i(139666),c=e.i(891287),d=e.i(336973);let g={connected:!1,accessTokenExpiresAt:BigInt(0),targetEnvVar:"",authMethod:"",connectionHealth:d.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_UNSPECIFIED};var h=e.i(521557),p=e.i(326283);let m={isSupported:!1,hasOverride:!1,oauthAppId:null,clientId:null},v={isSupported:!1,hasOverride:!1,oauthAppId:null,clientId:null},f={...m,isLoading:!1,isRefetching:!1,error:null,refetch:()=>{},setOrgOAuthApp:()=>Promise.resolve(""),isSetting:!1,setError:null,deleteOrgOAuthApp:()=>Promise.resolve(!1),isDeleting:!1,deleteError:null,clearErrors:()=>{}};function b(e,t){let a=(0,r.useStigmer)(),{data:o,isLoading:i,isRefetching:l,error:u,refetch:g}=(0,s.useFetch)(e&&t?async()=>{try{let r=await a.mcpServer.getOrgOAuthApp((0,c.create)(d.GetOrgOAuthAppInputSchema,{resourceId:e,org:t}));return{isSupported:!0,hasOverride:r.hasOverride,oauthAppId:r.oauthAppId||null,clientId:r.clientId||null}}catch(e){if((0,h.isUnimplemented)(e))return v;throw e}}:null,[e,t,a],m,{cacheKey:`org-oauth-app:${t}:${e}`}),[b,x]=(0,n.useState)(!1),[S,y]=(0,n.useState)(null),[w,k]=(0,n.useState)(!1),[A,O]=(0,n.useState)(null),E=(0,n.useCallback)(()=>{y(null),O(null)},[]),j=(0,n.useCallback)(async(r,s)=>{if(!e||!t)throw Error("useOrgOAuthApp: resourceId and org are required for setOrgOAuthApp");x(!0),y(null);try{return(await a.mcpServer.setOrgOAuthApp((0,c.create)(d.SetOrgOAuthAppInputSchema,{resourceId:e,org:t,clientId:r,clientSecret:s}))).oauthAppId}catch(t){let e=(0,p.toError)(t);throw y(e),e}finally{x(!1)}},[a,e,t]),C=(0,n.useCallback)(async()=>{if(!e||!t)throw Error("useOrgOAuthApp: resourceId and org are required for deleteOrgOAuthApp");k(!0),O(null);try{return(await a.mcpServer.deleteOrgOAuthApp((0,c.create)(d.DeleteOrgOAuthAppInputSchema,{resourceId:e,org:t}))).deleted}catch(t){let e=(0,p.toError)(t);throw O(e),e}finally{k(!1)}},[a,e,t]);return e&&t?{...o,isLoading:i,isRefetching:l,error:u,refetch:g,setOrgOAuthApp:j,isSetting:b,setError:S,deleteOrgOAuthApp:C,isDeleting:w,deleteError:A,clearErrors:E}:{...f,refetch:g,clearErrors:E}}e.s(["useOrgOAuthApp",0,b],651424),e.s(["useMcpServerCredentials",0,function(e,t){let h=(0,i.usePersonalEnvironment)(e),[p,m]=(0,n.useState)(!1),v=t?.spec?.auth,f=v?"oauth":"manual",x=v?.targetEnvVar||null,S=v?.tokenLifetimeHint||null,y=!v?.oauthOnly,w=p&&y,k=t?.status?.oauthStatus,A="oauth"===f&&k?.vendorApprovalStatus===o.VendorApprovalStatus.PENDING,O="oauth"===f&&(k?.vendorApprovalStatus===o.VendorApprovalStatus.PENDING||k?.vendorApprovalStatus===o.VendorApprovalStatus.REJECTED),E=k?.vendorApprovalDocsUrl||null,j=!!v?.oauthAppRef?.slug,C=b("oauth"===f&&j?t?.metadata?.id??null:null,e),N=C.hasOverride,I=C.isLoading||null!==C.error||j&&!e,M="oauth"!==f||I?a.OAuthAppSource.OAUTH_APP_SOURCE_UNSPECIFIED:N?a.OAuthAppSource.OAUTH_APP_SOURCE_ORG_OVERRIDE:j?a.OAuthAppSource.OAUTH_APP_SOURCE_PLATFORM:a.OAuthAppSource.OAUTH_APP_SOURCE_NONE,P="oauth"===f&&j&&!N&&C.isSupported,R=function(e,t){let n=(0,r.useStigmer)(),{data:a,isLoading:o,isRefetching:i,error:l,refetch:u}=(0,s.useFetch)(e&&t?async()=>{let r=await n.mcpServer.getOAuthGrantStatus((0,c.create)(d.GetOAuthGrantStatusInputSchema,{resourceId:e,org:t}));return{connected:r.connected,accessTokenExpiresAt:r.accessTokenExpiresAt,targetEnvVar:r.targetEnvVar,authMethod:r.authMethod,connectionHealth:r.connectionHealth}}:null,[e,t,n],g);return{...a,isLoading:o,isRefetching:i,error:l,refetch:u}}("oauth"===f?t?.metadata?.id??null:null,"oauth"===f?e:null),L="oauth"===f&&R.connected,T=(0,n.useMemo)(()=>new Set(Object.keys(h.environment?.spec?.data??{})),[h.environment]),_=(0,n.useMemo)(()=>{if(!t)return[];let e=t.spec?.env;return e&&0!==Object.keys(e).length?l(e,T).filter(e=>!u.SYSTEM_ENV_VAR_KEYS.has(e.key)):[]},[t,T]),U=(0,n.useMemo)(()=>_.filter(e=>!e.optional),[_]),V=(0,n.useMemo)(()=>!x||w?U:U.filter(e=>e.key!==x),[U,x,w]),D=!h.isLoading&&!R.isLoading&&0===V.length&&("manual"===f||w||L),H=(0,n.useCallback)(async e=>{await h.getOrCreate(),await h.addVariables(e)},[h]),$=(0,n.useCallback)(()=>{h.refetch(),R.refetch(),C.refetch()},[h,R,C]);return{authMode:f,oauthTargetEnvVar:x,isOAuthConnected:L,connectionHealth:R.connectionHealth,canDisconnect:L,accessTokenExpiresAt:R.accessTokenExpiresAt,tokenLifetimeHint:S,isVendorApprovalPending:A,isVendorApprovalBlocked:O,vendorApprovalDocsUrl:E,effectiveOAuthSource:M,isOrgOAuthApp:N,canBringOwnApp:P,manualEntrySupported:y,missingVariables:V,isReady:D,isLoading:h.isLoading||R.isLoading||C.isLoading,error:h.error??R.error??C.error,saveCredentials:H,isSaving:h.isMutating,refetch:$,manualOverride:w,setManualOverride:m}}],153158)},844533,801731,e=>{"use strict";var t=e.i(843476),r=e.i(893976),s=e.i(597744);function n({className:e}){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M2 5.5 8 2.5l6 3-6 3-6-3Z"}),(0,t.jsx)("path",{d:"M2 5.5v5l6 3 6-3v-5"}),(0,t.jsx)("path",{d:"M8 8.5v5"})]})}function a({className:e}){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"5",cy:"11",r:"2.5"}),(0,t.jsx)("path",{d:"M6.8 9.2 13 3"}),(0,t.jsx)("path",{d:"M11 5l1.5 1.5"}),(0,t.jsx)("path",{d:"M9 7l1.5 1.5"})]})}e.s(["StdioSandboxNotice",0,function({serverType:e,className:a}){var o;return(o=(0,s.useDeploymentMode)(),"cloud"!==o||e?.case!=="stdio")?null:(0,t.jsxs)("div",{role:"status",className:(0,r.cn)("stg:bg-muted-subtle stg:text-muted-foreground stg:flex stg:items-start stg:gap-2.5 stg:rounded-lg stg:border stg:border-transparent stg:px-4 stg:py-3",a),children:[(0,t.jsx)(n,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}),(0,t.jsx)("p",{className:"stg:text-xs stg:leading-relaxed",children:"This stdio server runs only on local runners — it won't be available to sessions on Stigmer-managed cloud compute. Run the session on a local runner (desktop app or CLI) to use it, or choose a remote (HTTP) server instead."})]})}],844533),e.s(["OAuthRequiredNotice",0,function({oauthOnly:e,className:s}){return e?(0,t.jsxs)("div",{role:"status",className:(0,r.cn)("stg:bg-muted-subtle stg:text-muted-foreground stg:flex stg:items-start stg:gap-2.5 stg:rounded-lg stg:border stg:border-transparent stg:px-4 stg:py-3",s),children:[(0,t.jsx)(a,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}),(0,t.jsx)("p",{className:"stg:text-xs stg:leading-relaxed",children:"This server requires OAuth. Sign in to connect — its hosted endpoint rejects manually-entered API tokens, so a pasted token won't work here."})]}):null}],801731)},388894,e=>{"use strict";var t=e.i(271645),r=e.i(891287),s=e.i(336973),n=e.i(586108),a=e.i(326283);e.s(["useDisconnectOAuth",0,function(){let e=(0,n.useStigmer)(),[o,i]=(0,t.useState)(!1),[l,u]=(0,t.useState)(null),c=(0,t.useCallback)(()=>u(null),[]);return{disconnect:(0,t.useCallback)(async(t,n)=>{i(!0),u(null);try{return(await e.mcpServer.disconnectOAuth((0,r.create)(s.DisconnectOAuthInputSchema,{resourceId:t,org:n}))).disconnected}catch(e){throw u((0,a.toError)(e)),e}finally{i(!1)}},[e]),isDisconnecting:o,error:l,clearError:c}}])}]);
@@ -1 +0,0 @@
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 o(){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:a,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,w]=(0,s.useState)([...e]);(0,s.useCallback)(()=>{w([...e]),k(!0)},[e,k]);let S=(0,s.useCallback)(()=>{k(!1),w([...e])},[e,k]),E=(0,s.useCallback)(async()=>{let e=C.filter(e=>e.key.trim());await a(e)&&k(!1)},[C,a,k]),A=(0,s.useCallback)((e,t)=>{w(s=>s.map((s,r)=>r===e?{...s,...t}:s))},[]),O=(0,s.useCallback)(e=>{w(t=>t.filter((t,s)=>s!==e))},[]),L=(0,s.useCallback)(()=>{w(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:()=>O(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:S,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:E,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)(o,{}),"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 o({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 a({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]),w=(0,s.useCallback)(e=>{"Enter"===e.key?(e.preventDefault(),k()):"Escape"===e.key&&C()},[k,C]),S="sm"===c?"stg:size-6":"stg:size-8",E=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)(S,"stg:shrink-0 stg:rounded stg:object-cover")}):d??(0,t.jsx)(a,{className:(0,r.cn)(S,"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:w,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",E&&"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)(o,{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"})]}),E&&(0,t.jsx)("p",{className:"stg:px-1 stg:text-xs stg:text-destructive",role:"alert",children:E})]})}])},521557,e=>{"use strict";e.s(["isUnimplemented",0,function(e){if(!e||"object"!=typeof e)return!1;if("connectCode"in e&&12===e.connectCode)return!0;let t=e.message??"";return t.includes("[unimplemented]")||t.includes("UNIMPLEMENTED")}])},141249,e=>{"use strict";var t=e.i(843476);e.s(["PluginIcon",0,function({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:"M6 2.5a1.5 1.5 0 0 1 3 0V4h2.5A1.5 1.5 0 0 1 13 5.5V8h-1.5a1.5 1.5 0 0 0 0 3H13v2.5a1.5 1.5 0 0 1-1.5 1.5H9v-1.5a1.5 1.5 0 0 0-3 0V15H3.5A1.5 1.5 0 0 1 2 13.5V11h1.5a1.5 1.5 0 0 0 0-3H2V5.5A1.5 1.5 0 0 1 3.5 4H6V2.5Z"})})}])},292420,e=>{"use strict";var t=e.i(843476),s=e.i(893976),r=e.i(141249);e.s(["ManagedByPluginNotice",0,function({plugin:e,onPluginClick:n,className:i}){if(null===e)return null;let o=e.metadata,a=o?.name||o?.slug||"a plugin",g=o?{org:o.org,slug:o.slug}:null;return(0,t.jsxs)("div",{role:"note",className:(0,s.cn)("stg:flex stg:items-start stg:gap-2 stg:rounded-md stg:border stg:border-border stg:bg-muted stg:px-3 stg:py-2 stg:text-sm stg:text-foreground",i),children:[(0,t.jsx)(r.PluginIcon,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0 stg:text-muted-foreground"}),(0,t.jsxs)("p",{children:["Installed by the plugin"," ",n&&g?(0,t.jsx)("button",{type:"button",onClick:()=>n(g),className:"stg:cursor-pointer stg:font-medium stg:underline stg:decoration-dotted stg:underline-offset-2 stg:hover:text-primary",children:a}):(0,t.jsx)("span",{className:"stg:font-medium",children:a}),". To change it, change the plugin and push it again; to customise, compose your own agent over its skills and servers."]})]})}])},473489,e=>{"use strict";var t=e.i(271645),s=e.i(910304),r=e.i(586108),n=e.i(583093);let i="stigmer.ai/plugin";e.s(["PLUGIN_LABEL",0,i,"useManagingPlugin",0,function(e){let o=(0,r.useStigmer)(),a=e?.[i]??null,{data:g,isLoading:l}=(0,n.useFetch)(a?async()=>{try{return await o.plugin.get(a)}catch(e){if((0,s.isNotFound)(e))return null;throw e}}:null,[a,o],null);return(0,t.useMemo)(()=>({plugin:g,isLoading:l}),[g,l])}])},244990,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 o({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 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(["InlineEditText",0,function({value:e,onSave:g,placeholder:l="Click to edit",validate:d,variant:c="default",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();if(t===e)return void f(!1);if(d){let e=d(t);if(e)return void N(e)}await g(t)&&f(!1)},[v,e,d,g]),C=(0,s.useCallback)(()=>{f(!1),b(e),N(null)},[e]),w=(0,s.useCallback)(e=>{"Enter"===e.key?(e.preventDefault(),k()):"Escape"===e.key&&C()},[k,C]),S=j||m;return u||!h?(0,t.jsx)("div",{className:(0,r.cn)("stg:group/inline-edit",p),children:(0,t.jsxs)("button",{type:"button",onClick:()=>{u||f(!0)},disabled:u,className:(0,r.cn)("stg:inline-flex stg:w-full stg:items-center stg:gap-1.5 stg:rounded-md stg:px-1.5 stg:py-0.5 stg:text-left stg:transition-colors",!u&&"stg:hover:bg-accent-hover stg:cursor-pointer",u&&"stg:cursor-default","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:(0,r.cn)("stg:min-w-0 stg:truncate","heading"===c?"stg:text-lg stg:font-semibold stg:text-foreground":"stg:text-sm stg:text-foreground",!e&&"stg:text-muted-foreground stg:italic"),children:e||l}),!u&&(0,t.jsx)(n,{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",{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:"text",value:v,onChange:e=>{b(e.target.value),N(null)},onKeyDown:w,disabled:x,placeholder:l,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","heading"===c&&"stg:text-lg stg:font-semibold",S&&"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)(a,{}):(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:hover:text-accent-foreground","stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:(0,t.jsx)(o,{className:"stg:size-3.5"})})]}),S&&(0,t.jsx)("p",{className:"stg:px-1 stg:text-xs stg:text-destructive",role:"alert",children:S})]})}])},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),o=e.i(336973),a=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:o,onCancel:a,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`,w=c.trim().length>0&&x.trim().length>0,S=(0,s.useCallback)(async e=>{e.preventDefault(),w&&!g&&await o(c.trim(),x.trim())},[w,g,o,c,x]);return(0,t.jsxs)("form",{onSubmit:S,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:a,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:!w||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 w=e.i(170255),S=e.i(476007),E=e.i(188482),A=e.i(468806),O=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:o,isSaving:a,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 o||!d?(0,t.jsx)("div",{className:(0,r.cn)("stg:group/inline-edit",l),children:(0,t.jsxs)("button",{type:"button",onClick:()=>{o||c(!0)},disabled:o,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",!o&&"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}),!o&&(0,t.jsx)(U,{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:a,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})]}),a&&s.value!==e&&(0,t.jsx)(R,{})]},s.value))}),g&&(0,t.jsx)("p",{className:"stg:px-1 stg:text-xs stg:text-destructive",role:"alert",children:g})]})}function U({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 R(){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 V=e.i(52595),_=e.i(292420),W=e.i(473489);function F({isConnecting:e,connectionError:i,connectionErrorMessage:a,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:w,isVendorApprovalPending:S,isVendorApprovalBlocked:E,vendorApprovalDocsUrl:A,canBringOwnApp:O,isOrgOAuthApp:L,onBringOwnApp:M,onRemoveOrgApp:T,isRemovingOrgApp:D,removeOrgAppError:B,onClearRemoveOrgAppError:H,manualEntrySupported:z,manualOverride:P,onManualOverride:I,onBackToOAuth:U,onCancelOAuth:R}){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,Z=h===o.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_TOKEN_EXPIRED,Y=E&&X&&!L,G=e||K||j||D,J=K?$(x):e?"Connecting...":L&&X?"Sign in with your app":X||Z?"Sign in to connect":c?"Discover tools":d?"Reconnect":"Connect",Q=K||e?(0,t.jsx)(eN,{}):X||Z?(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 o.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 o.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_TOKEN_EXPIRED_REFRESHABLE:return"Will refresh automatically on next use";case o.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_TOKEN_EXPIRED:return"Token expired — sign in again to reconnect";default:return"Not connected yet"}}(h,C,w);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 o.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_HEALTHY:return{pillClass:"stg:bg-success/10 stg:text-success",dotClass:"stg:bg-success",label:"Connected"};case o.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 o.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,S&&!p),es=L&&!G&&"idle"===W;return"confirming"===V||"disconnecting"===V?(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()=>{_("disconnecting");try{await b(),_("idle")}catch{_("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:()=>{_("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:Y?"OAuth sign-in is pending vendor approval":ee}),v&&!G&&!P&&"idle"===V&&(0,t.jsx)("button",{type:"button",onClick:()=>_("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:G||u||Y,"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||Z?"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:[Q,J]})]}),"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: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:"Cancel sign-in"})}),Y&&(0,t.jsx)(f.VendorApprovalBlockedNotice,{blocked:!0,pending:S,manualEntrySupported:z,canBringOwnApp:O,docsUrl:A,onBringOwnApp:M,className:"stg:border-t stg:border-amber-500/20"}),"oauth"===m&&!p&&!K&&!e&&(P||z||O)&&(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: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:S?"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"}),O&&!E&&(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:a??(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 $(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 a.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 a.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 Z({serverType:e,editable:r,isSaving:n,saveMcpField:i}){let[o,a]=(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)(Y,{title:"Headers",count:u.length,rows:u,editable:r,isSaving:n,editing:o,onEditingChange:a,onSave:m,keyLabel:"Header name"}),e?.case==="http"&&(r||x.length>0)&&(0,t.jsx)(Y,{title:"Query Parameters",count:x.length,rows:x,editable:r,isSaving:n,editing:g,onEditingChange:l,onSave:p,keyLabel:"Parameter name"})]})}function Y({title:e,count:s,rows:r,editable:n,isSaving:i,editing:o,onEditingChange:a,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:()=>a(!o),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:o?"Done":"Edit"})]}),n&&o?(0,t.jsx)(V.InlineEditKeyValue,{value:[...r],onSave:g,isSaving:i,editing:o,onEditingChange:a,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(!G.test(e))return e;G.lastIndex=0;let r=[],n=0;for(;null!==(s=G.exec(e));)s.index>n&&r.push(e.slice(n,s.index)),r.push((0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.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)(E.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 G=/\$\{([^}]+)\}/g;function J({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 Q({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:o}){let a=Object.entries(e).sort(([e],[t])=>e.localeCompare(t)),g=(0,s.useMemo)(()=>a.map(([e,t])=>({key:e,value:"",isSecret:t.isSecret,description:t.description,optional:t.optional})),[a]),l=(0,s.useCallback)(async e=>{if(!o)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 o("env",Object.keys(t).length>0?t:void 0)},[o]),[d,c]=(0,s.useState)(!1);return(0,t.jsx)(B.Section,{title:"Environment Variables",count:a.length,onEdit:n?()=>c(e=>!e):void 0,children:n?(0,t.jsx)(V.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:a.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:o}){let[a,g]=(0,s.useState)(""),[l,d]=(0,s.useState)(null),c=(0,s.useMemo)(()=>{if(!a.trim())return e;let t=a.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t))},[e,a]);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:o,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:[o&&(0,t.jsx)(eN,{}),o?"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=a.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:a,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 “",a,"”"]})}):(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[o,a]=(0,s.useState)(""),g=e.length+r.length,l=g>0,d=(0,s.useMemo)(()=>{if(!o.trim())return e;let t=o.toLowerCase();return e.filter(e=>e.toolName.toLowerCase().includes(t)||e.message?.toLowerCase().includes(t))},[e,o]),c=(0,s.useMemo)(()=>{if(!o.trim())return r;let e=o.toLowerCase();return r.filter(t=>t.toolName.toLowerCase().includes(e)||t.message?.toLowerCase().includes(e))},[r,o]),u=d.length+c.length,x=o.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:o,onChange:e=>a(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:()=>a(""),"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 “",o,"”"]})}):(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 eo({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 ea({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:E,primaryAction:I,actions:U,onPluginClick:R,editable:V=!1,onResourceUpdated:$,className:X}){let Y=(0,g.useMcpServer)(f?null:e,f?null:r),{mcpServer:G,isLoading:en,error:el,refetch:ed}=f??Y,ec=(0,W.useManagingPlugin)(G?.metadata?.labels),eu=V&&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),o=(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:o}}(),ep=(0,s.useCallback)(async(e,t)=>{if(!G)return!1;let s=(0,c.toMcpServerUpdateInput)(G);s[e]=t;try{let e=await ex(s);return $?.(e),ed(),!0}catch{return!1}},[G,ex,$,ed]),eh=(0,x.useMcpServerCredentials)(E??e,G??null),ef=(0,u.useMcpServerConnect)(),ev=(0,m.useMcpServerOAuthConnect)(),eb=(0,v.useDisconnectOAuth)(),ej=(0,b.useOrgOAuthApp)(G?.metadata?.id??null,E??e),[eN,ey]=(0,s.useState)(k),[ek,eC]=(0,s.useState)(!1),[ew,eS]=(0,s.useState)(y),eE=(0,s.useRef)(j);eE.current=j,(0,s.useEffect)(()=>{G?.metadata?.name&&eE.current?.({name:G.metadata.name,id:G.metadata.id})},[G]);let eA=(0,s.useCallback)(async()=>{if(!G?.metadata?.id)return;let t=Object.keys(G.spec?.env??{});try{await ev.startOAuth(G.metadata.id,E??e,t),eh.refetch(),ed()}catch{eh.refetch(),ed()}},[G,ev,eh,ed]),eO="oauth"===eh.authMode&&"connecting"===ev.failedPhase,eL=(0,s.useCallback)(async()=>{if(!G?.metadata?.id)return;if("oauth"===eh.authMode&&!eh.isOAuthConnected&&!eh.manualOverride&&!eO)return void eA();if(!eh.isReady&&!eO)return void ey(!0);let t=Object.keys(G.spec?.env??{});try{await ef.connect(G.metadata.id,E??e,void 0,t),ev.clearError(),ed()}catch{}},[G,eh.authMode,eh.isOAuthConnected,eh.manualOverride,eh.isReady,eO,ef,ev.clearError,ed,eA,E,e]),eM=(0,s.useCallback)(async(t,s)=>{try{if(s.saveForFuture&&(await eh.saveCredentials(t),eh.refetch()),G?.metadata?.id){let s=Object.keys(G.spec?.env??{}),r=E??e;await ef.connect(G.metadata.id,r,t,s),ed()}ey(!1)}catch{}},[eh,G,ef,ed]),eT=(0,s.useCallback)(async()=>{if(G?.metadata?.id)try{await eb.disconnect(G.metadata.id,E??e),eh.refetch(),ed()}catch{}},[G,eb,eh,ed,E,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=G?.spec,eP=G?.status,eI=ez&&(ez.repositoryUrl||ez.githubStars>0),eU=eP?.audit?.specAudit,eR=eP?.discoveredCapabilities,eV=ez?.pinnedToolApprovals??[],e_=eP?.toolApprovals??[],eW=eV.length+e_.length,eF=eR?.tools??[],e$=eR?.resourceTemplates??[],eq=eF.length>0,eK="oauth"===eh.authMode&&eh.isOAuthConnected&&eh.connectionHealth!==o.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_TOKEN_EXPIRED&&!eq,eX=(0,s.useMemo)(()=>{let e=[{id:"tools",label:"Tools",badge:eF.length},{id:"policies",label:"Policies",badge:eW}];return e$.length>0&&e.push({id:"resources",label:"Resources",badge:e$.length}),e},[eF.length,eW,e$.length]),eZ=ef.error??ev.error,eY=ef.error?(0,n.getUserMessage)(ef.error):ev.error?(0,m.getOAuthConnectErrorMessage)(ev.error,ev.failedPhase):null,eG=(0,s.useCallback)(()=>{ef.clearError(),ev.clearError()},[ef,ev]),eJ=(0,M.useManageAccess)({resource:G?.metadata?{kind:w.ApiResourceKind.mcp_server,kindString:"mcp_server",id:G.metadata.id,org:G.metadata.org,name:G.metadata.name}:null,visibility:G?.metadata?{kind:"mcpServer",current:G.metadata.visibility,org:G.metadata.org,onChanged:ed}:void 0});if(en)return(0,t.jsx)(eo,{className:X});if(el)return(0,t.jsx)(S.ErrorMessage,{error:el,retry:ed,className:X});if(!G)return(0,t.jsx)(ea,{className:X});let eQ=G.metadata,e0=eR?.lastDiscoveredAt?(0,i.timestampDate)(eR.lastDiscoveredAt):null,e1={name:eQ?.name||eQ?.slug||"Untitled",nameElement:eu&&ep?(0,t.jsx)(H.InlineEditText,{value:eQ?.name||"",onSave:e=>ep("name",e),isSaving:em,variant:"heading",placeholder:"Server name",validate:e=>e.trim()?null:"Name is required"}):void 0,id:eQ?.id||"",org:eQ?.org,slug:eQ?.slug,qualifiedSlug:eQ?.slug?eQ.org?`${eQ.org}/${eQ.slug}`:eQ.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:eU?.createdAt?(0,i.timestampDate)(eU.createdAt):null,updatedAt:eU?.updatedAt?(0,i.timestampDate)(eU.updatedAt):null},e5=eQ?(0,t.jsx)(L.VisibilityBadge,{visibility:eQ.visibility,onClick:eJ.action?eJ.open:void 0}):void 0,e2=eJ.action?[...U??[],eJ.action]:U,e3=(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)(_.ManagedByPluginNotice,{plugin:ec.plugin,onPluginClick:R}),eP?.validationState===a.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:e3,headerBanner:e6,primaryAction:I,actions:e2,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)(J,{spec:ez}),(eu||ez?.serverType.case)&&(0,t.jsx)(Z,{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)(F,{manualEntrySupported:eh.manualEntrySupported,isConnecting:ef.isConnecting||ev.isInProgress,connectionError:eZ,connectionErrorMessage:eY,onConnect:eL,onClearConnectionError:eG,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:G?.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)(O.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:G?.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:ew,onTabChange:e=>eS(e),"aria-label":"MCP server capabilities",children:["tools"===ew&&(0,t.jsx)(es,{tools:eF,isOAuthStranded:eK,onDiscover:eL,isDiscovering:ef.isConnecting||ev.isInProgress}),"policies"===ew&&(0,t.jsx)(er,{pinnedPolicies:eV,classifiedPolicies:e_,hasDiscoveredTools:eq,isOAuthStranded:eK}),"resources"===ew&&(0,t.jsx)(Q,{templates:e$})]})}),(eu||ez&&ez.tags.length>0)&&(0,t.jsx)(et,{tags:ez?.tags??[],editable:eu})]}),eJ.dialog]})},"oauthPhaseLabel",0,$],674542)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,597744,937111,283416,50086,940530,e=>{"use strict";var i,t,l,s,a,n,r,c,o=e.i(271645),u=e.i(170255),d=(e.i(113024),e.i(424407)),m=e.i(304532),g=e.i(499328),p=e.i(693569),b=e.i(761867);let A=(0,d.fileDesc)("CihhaS9zdGlnbWVyL3BsYXRmb3JtL3YxL2VudGl0bGVtZW50LnByb3RvEhZhaS5zdGlnbWVyLnBsYXRmb3JtLnYxIo8BCgxFbnRpdGxlbWVudHMSOQoGbGltaXRzGAEgASgLMikuYWkuc3RpZ21lci5wbGF0Zm9ybS52MS5FbnRpdGxlbWVudExpbWl0cxJECghmZWF0dXJlcxgCIAMoDjIfLmFpLnN0aWdtZXIucGxhdGZvcm0udjEuRmVhdHVyZUIRukgOkgELGAEiB4IBBBABIAAi2gEKEUVudGl0bGVtZW50TGltaXRzEicKEW1heF9vcmdhbml6YXRpb25zGAEgASgFQge6SAQaAiAASACIAQESHwoJbWF4X3VzZXJzGAIgASgFQge6SAQaAiAASAGIAQESNAoeaW5jbHVkZWRfbWFuYWdlZF9vcmdhbml6YXRpb25zGAMgASgFQge6SAQaAiAASAKIAQFCFAoSX21heF9vcmdhbml6YXRpb25zQgwKCl9tYXhfdXNlcnNCIQofX2luY2x1ZGVkX21hbmFnZWRfb3JnYW5pemF0aW9ucyp+CgdGZWF0dXJlEhcKE2ZlYXR1cmVfdW5zcGVjaWZpZWQQABITCg9zc29fZW5mb3JjZW1lbnQQARITCg9wbGF0Zm9ybV9jbGllbnQQAhIVChFieW9fcHJvdmlkZXJfa2V5cxADEgwKCGNoYW5uZWxzEAQSCwoHc2hhcmluZxAFQhJCEEVudGl0bGVtZW50UHJvdG9iBnByb3RvMw",[b.file_buf_validate_validate]),R=(0,m.messageDesc)(A,0),h=(0,m.messageDesc)(A,1);(i=a||(a={}))[i.feature_unspecified=0]="feature_unspecified",i[i.sso_enforcement=1]="sso_enforcement",i[i.platform_client=2]="platform_client",i[i.byo_provider_keys=3]="byo_provider_keys",i[i.channels=4]="channels",i[i.sharing=5]="sharing",e.s(["EntitlementLimitsSchema",0,h,"EntitlementsSchema",0,R,"Feature",0,a,"file_ai_stigmer_platform_v1_entitlement",0,A],937111);var W=e.i(732303);let G=(0,d.fileDesc)("CiRhaS9zdGlnbWVyL3BsYXRmb3JtL3YxL2xpY2Vuc2UucHJvdG8SFmFpLnN0aWdtZXIucGxhdGZvcm0udjEiiQUKDUxpY2Vuc2VDbGFpbXMSGgoKbGljZW5zZV9pZBgBIAEoCUIGukgDyAEBEkEKCGN1c3RvbWVyGAIgASgLMicuYWkuc3RpZ21lci5wbGF0Zm9ybS52MS5MaWNlbnNlQ3VzdG9tZXJCBrpIA8gBARJACgR0ZXJtGAMgASgOMiMuYWkuc3RpZ21lci5wbGF0Zm9ybS52MS5MaWNlbnNlVGVybUINukgKyAEBggEEEAEgABJCCgxlbnRpdGxlbWVudHMYBCABKAsyJC5haS5zdGlnbWVyLnBsYXRmb3JtLnYxLkVudGl0bGVtZW50c0IGukgDyAEBEjUKCWlzc3VlZF9hdBgFIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCBrpIA8gBARI2CgpleHBpcmVzX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEIGukgDyAEBEjcKC2dyYWNlX3VudGlsGAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEIGukgDyAEBOuoBukjmARpqCiJsaWNlbnNlX2NsYWltcy5leHBpcmVzX2FmdGVyX2lzc3VlEiJleHBpcmVzX2F0IG11c3QgYmUgYWZ0ZXIgaXNzdWVkX2F0GiB0aGlzLmV4cGlyZXNfYXQgPiB0aGlzLmlzc3VlZF9hdBp4CiZsaWNlbnNlX2NsYWltcy5ncmFjZV9ub3RfYmVmb3JlX2V4cGlyeRIpZ3JhY2VfdW50aWwgbXVzdCBub3QgYmUgYmVmb3JlIGV4cGlyZXNfYXQaI3RoaXMuZ3JhY2VfdW50aWwgPj0gdGhpcy5leHBpcmVzX2F0InwKD0xpY2Vuc2VDdXN0b21lchISCgJpZBgBIAEoCUIGukgDyAEBEhwKDGRpc3BsYXlfbmFtZRgCIAEoCUIGukgDyAEBEiEKDWNvbnRhY3RfZW1haWwYAyABKAlCCrpIB8gBAXICYAESFAoMb3JnYW5pemF0aW9uGAQgASgJKkAKC0xpY2Vuc2VUZXJtEhwKGGxpY2Vuc2VfdGVybV91bnNwZWNpZmllZBAAEgkKBXRyaWFsEAESCAoEcGFpZBACKncKDExpY2Vuc2VTdGF0ZRIdChlsaWNlbnNlX3N0YXRlX3Vuc3BlY2lmaWVkEAASCgoGYWJzZW50EAESCQoFdmFsaWQQAhIMCghleHBpcmluZxADEgkKBWdyYWNlEAQSCwoHZXhwaXJlZBAFEgsKB2ludmFsaWQQBkIOQgxMaWNlbnNlUHJvdG9iBnByb3RvMw",[A,b.file_buf_validate_validate,W.file_google_protobuf_timestamp]),I=(0,m.messageDesc)(G,1);(t=n||(n={}))[t.license_term_unspecified=0]="license_term_unspecified",t[t.trial=1]="trial",t[t.paid=2]="paid",(l=r||(r={}))[l.license_state_unspecified=0]="license_state_unspecified",l[l.absent=1]="absent",l[l.valid=2]="valid",l[l.expiring=3]="expiring",l[l.grace=4]="grace",l[l.expired=5]="expired",l[l.invalid=6]="invalid",e.s(["LicenseCustomerSchema",0,I,"LicenseState",0,r,"LicenseTerm",0,n,"file_ai_stigmer_platform_v1_license",0,G],283416);let S=(0,d.fileDesc)("CihhaS9zdGlnbWVyL3BsYXRmb3JtL3YxL3NlcnZlcl9pbmZvLnByb3RvEhZhaS5zdGlnbWVyLnBsYXRmb3JtLnYxIhQKEkdldFNlcnZlckluZm9JbnB1dCKgAQoTR2V0U2VydmVySW5mb091dHB1dBI2CgdlZGl0aW9uGAEgASgOMiUuYWkuc3RpZ21lci5wbGF0Zm9ybS52MS5TZXJ2ZXJFZGl0aW9uEg8KB3ZlcnNpb24YAiABKAkSJAoXYXV0aGVudGljYXRpb25fcmVxdWlyZWQYAyABKAhIAIgBAUIaChhfYXV0aGVudGljYXRpb25fcmVxdWlyZWQiFwoVR2V0TGljZW5zZVN0YXR1c0lucHV0IsQBChZHZXRMaWNlbnNlU3RhdHVzT3V0cHV0EjMKBXN0YXRlGAEgASgOMiQuYWkuc3RpZ21lci5wbGF0Zm9ybS52MS5MaWNlbnNlU3RhdGUSNQoGY2xhaW1zGAIgASgLMiUuYWkuc3RpZ21lci5wbGF0Zm9ybS52MS5MaWNlbnNlQ2xhaW1zEg4KBmtleV9pZBgDIAEoCRIuCgpjaGVja2VkX2F0GAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCIfCh1HZXRSdW5uZXJCb290c3RyYXBDb25maWdJbnB1dCLjAgoeR2V0UnVubmVyQm9vdHN0cmFwQ29uZmlnT3V0cHV0EiEKEHRlbXBvcmFsX2FkZHJlc3MYASABKAlCB7pIBHICEAESIwoSdGVtcG9yYWxfbmFtZXNwYWNlGAIgASgJQge6SARyAhABEhsKE3J1bm5lcl9hY2Nlc3NfdG9rZW4YAyABKAkSEgoKdG9rZW5fdHlwZRgEIAEoCRIuCiZydW5uZXJfYWNjZXNzX3Rva2VuX2V4cGlyZXNfaW5fc2Vjb25kcxgFIAEoBRIeChZwYXlsb2FkX2VuY3J5cHRpb25fa2V5GAYgASgJEiEKGXBheWxvYWRfZW5jcnlwdGlvbl9rZXlfaWQYByABKAkSKAogcGF5bG9hZF9lbmNyeXB0aW9uX3NlY29uZGFyeV9rZXkYCCABKAkSKwojcGF5bG9hZF9lbmNyeXB0aW9uX3NlY29uZGFyeV9rZXlfaWQYCSABKAki3AEKGUdldFJ1bm5lclNjb3BlZFRva2VuSW5wdXQSHAoSYWdlbnRfZXhlY3V0aW9uX2lkGAEgASgJSAASHwoVd29ya2Zsb3dfZXhlY3V0aW9uX2lkGAIgASgJSAASNwoKcG9vbF9jbGFpbRgDIAEoCzIhLmFpLnN0aWdtZXIucGxhdGZvcm0udjEuUG9vbENsYWltSAASNwoHcmVuZXdhbBgEIAEoCzIkLmFpLnN0aWdtZXIucGxhdGZvcm0udjEuVG9rZW5SZW5ld2FsSABCDgoFc2NvcGUSBbpIAggBIigKCVBvb2xDbGFpbRIbCgpzZXNzaW9uX2lkGAEgASgJQge6SARyAhABIg4KDFRva2VuUmVuZXdhbCJpChpHZXRSdW5uZXJTY29wZWRUb2tlbk91dHB1dBIbChNydW5uZXJfc2NvcGVkX3Rva2VuGAEgASgJEhIKCnRva2VuX3R5cGUYAiABKAkSGgoSZXhwaXJlc19pbl9zZWNvbmRzGAMgASgFKlMKDVNlcnZlckVkaXRpb24SHgoac2VydmVyX2VkaXRpb25fdW5zcGVjaWZpZWQQABIHCgNvc3MQARIJCgVjbG91ZBACEg4KCmVudGVycHJpc2UQAzKaBAoXUGxhdGZvcm1RdWVyeUNvbnRyb2xsZXISbgoNZ2V0U2VydmVySW5mbxIqLmFpLnN0aWdtZXIucGxhdGZvcm0udjEuR2V0U2VydmVySW5mb0lucHV0GisuYWkuc3RpZ21lci5wbGF0Zm9ybS52MS5HZXRTZXJ2ZXJJbmZvT3V0cHV0IgTIuBgBEncKEGdldExpY2Vuc2VTdGF0dXMSLS5haS5zdGlnbWVyLnBsYXRmb3JtLnYxLkdldExpY2Vuc2VTdGF0dXNJbnB1dBouLmFpLnN0aWdtZXIucGxhdGZvcm0udjEuR2V0TGljZW5zZVN0YXR1c091dHB1dCIE0LgYARKPAQoYZ2V0UnVubmVyQm9vdHN0cmFwQ29uZmlnEjUuYWkuc3RpZ21lci5wbGF0Zm9ybS52MS5HZXRSdW5uZXJCb290c3RyYXBDb25maWdJbnB1dBo2LmFpLnN0aWdtZXIucGxhdGZvcm0udjEuR2V0UnVubmVyQm9vdHN0cmFwQ29uZmlnT3V0cHV0IgTQuBgBEoMBChRnZXRSdW5uZXJTY29wZWRUb2tlbhIxLmFpLnN0aWdtZXIucGxhdGZvcm0udjEuR2V0UnVubmVyU2NvcGVkVG9rZW5JbnB1dBoyLmFpLnN0aWdtZXIucGxhdGZvcm0udjEuR2V0UnVubmVyU2NvcGVkVG9rZW5PdXRwdXQiBNC4GAFCEUIPU2VydmVySW5mb1Byb3RvYgZwcm90bzM",[p.file_ai_stigmer_commons_rpc_method_options,G,b.file_buf_validate_validate,W.file_google_protobuf_timestamp]),V=(0,m.messageDesc)(S,0),Z=(0,m.messageDesc)(S,2);(s=c||(c={}))[s.server_edition_unspecified=0]="server_edition_unspecified",s[s.oss=1]="oss",s[s.cloud=2]="cloud",s[s.enterprise=3]="enterprise";let v=(0,g.serviceDesc)(S,0);e.s(["GetLicenseStatusInputSchema",0,Z,"GetServerInfoInputSchema",0,V,"PlatformQueryController",0,v,"ServerEdition",0,c],50086);let y=new Map([[u.ApiResourceKind.api_resource_version,u.ResourceTier.cloud_only],[u.ApiResourceKind.iam_policy,u.ResourceTier.open_source],[u.ApiResourceKind.identity_account,u.ResourceTier.open_source],[u.ApiResourceKind.api_key,u.ResourceTier.open_source],[u.ApiResourceKind.invitation,u.ResourceTier.enterprise],[u.ApiResourceKind.identity_provider,u.ResourceTier.enterprise],[u.ApiResourceKind.oauth_app,u.ResourceTier.open_source],[u.ApiResourceKind.platform_client,u.ResourceTier.open_source],[u.ApiResourceKind.team,u.ResourceTier.enterprise],[u.ApiResourceKind.organization,u.ResourceTier.open_source],[u.ApiResourceKind.platform,u.ResourceTier.enterprise],[u.ApiResourceKind.agent,u.ResourceTier.open_source],[u.ApiResourceKind.agent_execution,u.ResourceTier.open_source],[u.ApiResourceKind.session,u.ResourceTier.open_source],[u.ApiResourceKind.skill,u.ResourceTier.open_source],[u.ApiResourceKind.mcp_server,u.ResourceTier.open_source],[u.ApiResourceKind.agent_instance,u.ResourceTier.open_source],[u.ApiResourceKind.agent_share,u.ResourceTier.open_source],[u.ApiResourceKind.agent_channel,u.ResourceTier.open_source],[u.ApiResourceKind.channel_app,u.ResourceTier.open_source],[u.ApiResourceKind.workflow,u.ResourceTier.open_source],[u.ApiResourceKind.workflow_instance,u.ResourceTier.open_source],[u.ApiResourceKind.workflow_execution,u.ResourceTier.open_source],[u.ApiResourceKind.environment,u.ResourceTier.open_source],[u.ApiResourceKind.execution_context,u.ResourceTier.open_source],[u.ApiResourceKind.artifact,u.ResourceTier.open_source],[u.ApiResourceKind.schedule,u.ResourceTier.open_source],[u.ApiResourceKind.memory,u.ResourceTier.open_source],[u.ApiResourceKind.plugin,u.ResourceTier.open_source],[u.ApiResourceKind.plan,u.ResourceTier.cloud_only],[u.ApiResourceKind.subscription,u.ResourceTier.cloud_only],[u.ApiResourceKind.license,u.ResourceTier.cloud_only]]);function Y(e,i){let t=y.get(e);if(void 0===t)throw Error(`isResourceAvailable: kind ${e} has no tier — only kinds with kind_meta can be asked about`);return function(e){switch(e){case"local":return 1;case"enterprise":return 2;case"cloud":return 3;default:throw Error(`unknown deployment mode: ${String(e)}`)}}(i)>=function(e){switch(e){case u.ResourceTier.open_source:return 1;case u.ResourceTier.enterprise:return 2;case u.ResourceTier.cloud_only:return 3;case u.ResourceTier.resource_tier_unspecified:return 1;default:throw Error(`unknown resource tier: ${String(e)}`)}}(t)}e.s(["deploymentModeOf",0,function(e){switch(e){case c.oss:return"local";case c.enterprise:return"enterprise";case c.cloud:case c.server_edition_unspecified:default:return"cloud"}},"isResourceAvailable",0,Y],940530);let B=(0,o.createContext)("cloud");function f(){return(0,o.useContext)(B)}e.s(["DeploymentModeContext",0,B,"useDeploymentMode",0,f,"useResourceAvailable",0,function(e){return Y(e,f())}],597744)},267872,e=>{"use strict";var i,t;e.i(113024);let l=(0,e.i(424407).fileDesc)("CixhaS9zdGlnbWVyL2lhbS9pZGVudGl0eWFjY291bnQvdjEvZW51bS5wcm90bxIhYWkuc3RpZ21lci5pYW0uaWRlbnRpdHlhY2NvdW50LnYxKpIBCh9JZGVudGl0eUFjY291bnRQcm92aXNpb25pbmdNb2RlEjIKLmlkZW50aXR5X2FjY291bnRfcHJvdmlzaW9uaW5nX21vZGVfdW5zcGVjaWZpZWQQABIKCgZkaXJlY3QQARINCglmZWRlcmF0ZWQQAhILCgdtYWNoaW5lEAMSEwoPcGxhdGZvcm1fY2xpZW50EARiBnByb3RvMw");(t=i||(i={}))[t.identity_account_provisioning_mode_unspecified=0]="identity_account_provisioning_mode_unspecified",t[t.direct=1]="direct",t[t.federated=2]="federated",t[t.machine=3]="machine",t[t.platform_client=4]="platform_client",e.s(["file_ai_stigmer_iam_identityaccount_v1_enum",0,l])},452026,632897,626874,e=>{"use strict";var i=e.i(424407),t=e.i(304532),l=e.i(421415),s=e.i(988158),a=e.i(761867);let n=(0,i.fileDesc)("CiZhaS9zdGlnbWVyL2lhbS9pYW1wb2xpY3kvdjEvc3BlYy5wcm90bxIbYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxIr4BCg1JYW1Qb2xpY3lTcGVjEkYKCXByaW5jaXBhbBgBIAEoCzIrLmFpLnN0aWdtZXIuaWFtLmlhbXBvbGljeS52MS5BcGlSZXNvdXJjZVJlZkIGukgDyAEBEkUKCHJlc291cmNlGAIgASgLMisuYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLkFwaVJlc291cmNlUmVmQga6SAPIAQESHgoIcmVsYXRpb24YAyABKAlCDLpICcgBAXIEEAEYQCJkCg5BcGlSZXNvdXJjZVJlZhIbCgRraW5kGAEgASgJQg26SArIAQFyBRABGIACEhkKAmlkGAIgASgJQg26SArIAQFyBRABGIACEhoKCHJlbGF0aW9uGAMgASgJQgi6SAVyAxiAAmIGcHJvdG8z",[a.file_buf_validate_validate]),r=(0,t.messageDesc)(n,0),c=(0,t.messageDesc)(n,1);e.s(["ApiResourceRefSchema",0,c,"IamPolicySpecSchema",0,r,"file_ai_stigmer_iam_iampolicy_v1_spec",0,n],632897);let o=(0,i.fileDesc)("CiVhaS9zdGlnbWVyL2lhbS9pYW1wb2xpY3kvdjEvYXBpLnByb3RvEhthaS5zdGlnbWVyLmlhbS5pYW1wb2xpY3kudjEimQIKCUlhbVBvbGljeRItCgthcGlfdmVyc2lvbhgBIAEoCUIYukgVchMKEWlhbS5zdGlnbWVyLmFpL3YxEh4KBGtpbmQYAiABKAlCELpIDXILCglJYW1Qb2xpY3kSRQoIbWV0YWRhdGEYAyABKAsyMy5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuQXBpUmVzb3VyY2VNZXRhZGF0YRI4CgRzcGVjGAQgASgLMiouYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLklhbVBvbGljeVNwZWMSPAoGc3RhdHVzGAUgASgLMiwuYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLklhbVBvbGljeVN0YXR1cyJSCg9JYW1Qb2xpY3lTdGF0dXMSPwoFYXVkaXQYASABKAsyMC5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuQXBpUmVzb3VyY2VBdWRpdGIGcHJvdG8z",[l.file_ai_stigmer_commons_apiresource_metadata,s.file_ai_stigmer_commons_apiresource_status,n,a.file_buf_validate_validate]);e.s(["file_ai_stigmer_iam_iampolicy_v1_api",0,o],626874);var u=e.i(267872);let d=(0,i.fileDesc)("CiRhaS9zdGlnbWVyL2lhbS9pYW1wb2xpY3kvdjEvaW8ucHJvdG8SG2FpLnN0aWdtZXIuaWFtLmlhbXBvbGljeS52MSLDAgoSQXBpUmVzb3VyY2VSZWZWaWV3EgwKBGtpbmQYASABKAkSCgoCaWQYAiABKAkSEAoIcmVsYXRpb24YAyABKAkSDAoEbmFtZRgEIAEoCRINCgVlbWFpbBgFIAEoCRIMCgRzbHVnGAYgASgJEg4KBmF2YXRhchgHIAEoCRJACgdtZW1iZXJzGAggAygLMi8uYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLkFwaVJlc291cmNlUmVmVmlldxI+CgV0ZWFtcxgJIAMoCzIvLmFpLnN0aWdtZXIuaWFtLmlhbXBvbGljeS52MS5BcGlSZXNvdXJjZVJlZlZpZXcSRAoPaWRlbnRpdHlfb3JpZ2luGAogASgLMisuYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLklkZW50aXR5T3JpZ2luIo4BCg5JZGVudGl0eU9yaWdpbhJdChFwcm92aXNpb25pbmdfbW9kZRgBIAEoDjJCLmFpLnN0aWdtZXIuaWFtLmlkZW50aXR5YWNjb3VudC52MS5JZGVudGl0eUFjY291bnRQcm92aXNpb25pbmdNb2RlEh0KFXByb3ZpZGVyX2Rpc3BsYXlfbmFtZRgCIAEoCSIkCgtJYW1Qb2xpY3lJZBIVCgV2YWx1ZRgBIAEoCUIGukgDyAEBIqcBChZQcmluY2lwYWxSZXNvdXJjZUlucHV0EkYKCXByaW5jaXBhbBgBIAEoCzIrLmFpLnN0aWdtZXIuaWFtLmlhbXBvbGljeS52MS5BcGlSZXNvdXJjZVJlZkIGukgDyAEBEkUKCHJlc291cmNlGAIgASgLMisuYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLkFwaVJlc291cmNlUmVmQga6SAPIAQEiqQEKF1Jlc291cmNlUHJpbmNpcGFsc0lucHV0EkUKCHJlc291cmNlGAEgASgLMisuYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLkFwaVJlc291cmNlUmVmQga6SAPIAQESRwoKcHJpbmNpcGFscxgCIAMoCzIrLmFpLnN0aWdtZXIuaWFtLmlhbXBvbGljeS52MS5BcGlSZXNvdXJjZVJlZkIGukgDyAEBImQKFFJldm9rZU9yZ0FjY2Vzc0lucHV0EicKE2lkZW50aXR5X2FjY291bnRfaWQYASABKAlCCrpIB8gBAXICEAESIwoPb3JnYW5pemF0aW9uX2lkGAIgASgJQgq6SAfIAQFyAhABIkoKD0lhbVBvbGljaWVzTGlzdBI3CgdlbnRyaWVzGAEgAygLMiYuYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLklhbVBvbGljeSJ7ChdMaXN0UmVzb3VyY2VBY2Nlc3NJbnB1dBJFCghyZXNvdXJjZRgBIAEoCzIrLmFpLnN0aWdtZXIuaWFtLmlhbXBvbGljeS52MS5BcGlSZXNvdXJjZVJlZkIGukgDyAEBEhkKEWluY2x1ZGVfaW5oZXJpdGVkGAIgASgIIl4KHVJlc291cmNlQWNjZXNzQnlQcmluY2lwYWxMaXN0Ej0KB2VudHJpZXMYASADKAsyLC5haS5zdGlnbWVyLmlhbS5pYW1wb2xpY3kudjEuUHJpbmNpcGFsQWNjZXNzIowBCg9QcmluY2lwYWxBY2Nlc3MSQgoJcHJpbmNpcGFsGAEgASgLMi8uYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLkFwaVJlc291cmNlUmVmVmlldxI1CgVyb2xlcxgCIAMoCzImLmFpLnN0aWdtZXIuaWFtLmlhbXBvbGljeS52MS5Sb2xlR3JhbnQimwEKCVJvbGVHcmFudBIzCgRyb2xlGAEgASgLMiUuYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLlJvbGVJbmZvEkMKDm93bmVyX3Jlc291cmNlGAIgASgLMisuYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLkFwaVJlc291cmNlUmVmEhQKDGlzX2luaGVyaXRlZBgDIAEoCCJUChhSZXNvdXJjZUFjY2Vzc0J5Um9sZUxpc3QSOAoHZW50cmllcxgBIAMoCzInLmFpLnN0aWdtZXIuaWFtLmlhbXBvbGljeS52MS5Sb2xlQWNjZXNzIocBCgpSb2xlQWNjZXNzEjQKBHJvbGUYASABKAsyJi5haS5zdGlnbWVyLmlhbS5pYW1wb2xpY3kudjEuUm9sZUdyYW50EkMKCnByaW5jaXBhbHMYAiADKAsyLy5haS5zdGlnbWVyLmlhbS5pYW1wb2xpY3kudjEuQXBpUmVzb3VyY2VSZWZWaWV3IkcKCFJvbGVJbmZvEgoKAmlkGAEgASgJEgwKBGNvZGUYAiABKAkSDAoEbmFtZRgDIAEoCRITCgtkZXNjcmlwdGlvbhgEIAEoCSJOChZQcmluY2lwYWxSZXNvdXJjZVJvbGVzEjQKBXJvbGVzGAEgAygLMiUuYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLlJvbGVJbmZvIqYBChdDaGVja0F1dGhvcml6YXRpb25JbnB1dBJCCgZwb2xpY3kYASABKAsyKi5haS5zdGlnbWVyLmlhbS5pYW1wb2xpY3kudjEuSWFtUG9saWN5U3BlY0IGukgDyAEBEkcKE2NvbnRleHR1YWxfcG9saWNpZXMYAiADKAsyKi5haS5zdGlnbWVyLmlhbS5pYW1wb2xpY3kudjEuSWFtUG9saWN5U3BlYyIxChhDaGVja0F1dGhvcml6YXRpb25SZXN1bHQSFQoNaXNfYXV0aG9yaXplZBgBIAEoCCLIAQoWQ2hlY2tNeVBlcm1pc3Npb25JbnB1dBJFCghyZXNvdXJjZRgBIAEoCzIrLmFpLnN0aWdtZXIuaWFtLmlhbXBvbGljeS52MS5BcGlSZXNvdXJjZVJlZkIGukgDyAEBEh4KCHJlbGF0aW9uGAIgASgJQgy6SAnIAQFyBBABGEASRwoTY29udGV4dHVhbF9wb2xpY2llcxgDIAMoCzIqLmFpLnN0aWdtZXIuaWFtLmlhbXBvbGljeS52MS5JYW1Qb2xpY3lTcGVjIvIBCh5MaXN0QXV0aG9yaXplZFJlc291cmNlSWRzSW5wdXQSRgoJcHJpbmNpcGFsGAEgASgLMisuYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLkFwaVJlc291cmNlUmVmQga6SAPIAQESIQoNcmVzb3VyY2Vfa2luZBgCIAEoCUIKukgHyAEBcgIQARIcCghyZWxhdGlvbhgDIAEoCUIKukgHyAEBcgIQARJHChNjb250ZXh0dWFsX3BvbGljaWVzGAQgAygLMiouYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLklhbVBvbGljeVNwZWMiMQoZQXV0aG9yaXplZFJlc291cmNlSWRzTGlzdBIUCgxyZXNvdXJjZV9pZHMYASADKAki8wEKH0xpc3RBdXRob3JpemVkUHJpbmNpcGFsSWRzSW5wdXQSRQoIcmVzb3VyY2UYASABKAsyKy5haS5zdGlnbWVyLmlhbS5pYW1wb2xpY3kudjEuQXBpUmVzb3VyY2VSZWZCBrpIA8gBARIiCg5wcmluY2lwYWxfa2luZBgCIAEoCUIKukgHyAEBcgIQARIcCghyZWxhdGlvbhgDIAEoCUIKukgHyAEBcgIQARJHChNjb250ZXh0dWFsX3BvbGljaWVzGAQgAygLMiouYWkuc3RpZ21lci5pYW0uaWFtcG9saWN5LnYxLklhbVBvbGljeVNwZWMiMwoaQXV0aG9yaXplZFByaW5jaXBhbElkc0xpc3QSFQoNcHJpbmNpcGFsX2lkcxgBIAMoCSJZChdHZXRQcmluY2lwYWxzQ291bnRJbnB1dBIaCgZvcmdfaWQYASABKAlCCrpIB8gBAXICEAESIgoOcHJpbmNpcGFsX2tpbmQYAiABKAlCCrpIB8gBAXICEAEiIAoPUHJpbmNpcGFsc0NvdW50Eg0KBWNvdW50GAEgASgFYgZwcm90bzM",[o,n,u.file_ai_stigmer_iam_identityaccount_v1_enum,a.file_buf_validate_validate]),m=(0,t.messageDesc)(d,2),g=(0,t.messageDesc)(d,5),p=(0,t.messageDesc)(d,7),b=(0,t.messageDesc)(d,17),A=(0,t.messageDesc)(d,22);e.s(["CheckMyPermissionInputSchema",0,b,"GetPrincipalsCountInputSchema",0,A,"IamPolicyIdSchema",0,m,"ListResourceAccessInputSchema",0,p,"RevokeOrgAccessInputSchema",0,g,"file_ai_stigmer_iam_iampolicy_v1_io",0,d],452026)},3422,11493,554212,e=>{"use strict";var i=e.i(424407),t=e.i(304532),l=e.i(421415),s=e.i(988158),a=e.i(761867);let n=(0,i.fileDesc)("CiFhaS9zdGlnbWVyL2lhbS90ZWFtL3YxL3NwZWMucHJvdG8SFmFpLnN0aWdtZXIuaWFtLnRlYW0udjEiKQoIVGVhbVNwZWMSHQoLZGVzY3JpcHRpb24YASABKAlCCLpIBXIDGPQDYgZwcm90bzM",[a.file_buf_validate_validate]),r=(0,t.messageDesc)(n,0);e.s(["TeamSpecSchema",0,r,"file_ai_stigmer_iam_team_v1_spec",0,n],11493);let c=(0,i.fileDesc)("CiBhaS9zdGlnbWVyL2lhbS90ZWFtL3YxL2FwaS5wcm90bxIWYWkuc3RpZ21lci5pYW0udGVhbS52MSKXAgoEVGVhbRItCgthcGlfdmVyc2lvbhgBIAEoCUIYukgVchMKEWlhbS5zdGlnbWVyLmFpL3YxEhkKBGtpbmQYAiABKAlCC7pICHIGCgRUZWFtEk0KCG1ldGFkYXRhGAMgASgLMjMuYWkuc3RpZ21lci5jb21tb25zLmFwaXJlc291cmNlLkFwaVJlc291cmNlTWV0YWRhdGFCBrpIA8gBARIuCgRzcGVjGAQgASgLMiAuYWkuc3RpZ21lci5pYW0udGVhbS52MS5UZWFtU3BlYxJGCgZzdGF0dXMYBSABKAsyNi5haS5zdGlnbWVyLmNvbW1vbnMuYXBpcmVzb3VyY2UuQXBpUmVzb3VyY2VBdWRpdFN0YXR1c2IGcHJvdG8z",[l.file_ai_stigmer_commons_apiresource_metadata,s.file_ai_stigmer_commons_apiresource_status,n,a.file_buf_validate_validate]),o=(0,t.messageDesc)(c,0);e.s(["TeamSchema",0,o,"file_ai_stigmer_iam_team_v1_api",0,c],554212);let u=(0,i.fileDesc)("Ch9haS9zdGlnbWVyL2lhbS90ZWFtL3YxL2lvLnByb3RvEhZhaS5zdGlnbWVyLmlhbS50ZWFtLnYxIjYKBVRlYW1zEi0KB2VudHJpZXMYASADKAsyHC5haS5zdGlnbWVyLmlhbS50ZWFtLnYxLlRlYW0iKwoTTGlzdFRlYW1zQnlPcmdJbnB1dBIUCgNvcmcYASABKAlCB7pIBHICEAFiBnByb3RvMw",[c,a.file_buf_validate_validate]),d=(0,t.messageDesc)(u,1);e.s(["ListTeamsByOrgInputSchema",0,d,"file_ai_stigmer_iam_team_v1_io",0,u],3422)},691444,e=>{"use strict";var i=e.i(430182);let t={[i.IamRole.iam_role_unspecified]:"unspecified",[i.IamRole.owner]:"owner",[i.IamRole.admin]:"admin",[i.IamRole.member]:"member",[i.IamRole.viewer]:"viewer",[i.IamRole.participant]:"participant"},l={owner:i.IamRole.owner,admin:i.IamRole.admin,member:i.IamRole.member,viewer:i.IamRole.viewer,participant:i.IamRole.participant},s={[i.IamRole.iam_role_unspecified]:"Unspecified",[i.IamRole.owner]:"Owner",[i.IamRole.admin]:"Admin",[i.IamRole.member]:"Member",[i.IamRole.viewer]:"Viewer",[i.IamRole.participant]:"Participant"},a={[i.IamRole.iam_role_unspecified]:"",[i.IamRole.owner]:"Full access including delete and access management",[i.IamRole.admin]:"Edit access and member management",[i.IamRole.member]:"Standard access to organization resources",[i.IamRole.viewer]:"Read-only access",[i.IamRole.participant]:"Reply to customers and manage conversation takeover"};e.s(["iamRoleDescription",0,function(e){return a[e]??""},"iamRoleDisplayName",0,function(e){return s[e]??"Unknown"},"iamRoleFromString",0,function(e){return l[e]},"iamRoleToString",0,function(e){return t[e]??"unspecified"}])},818094,e=>{"use strict";var i=e.i(170255),t=e.i(430182);let l=new Map([[i.ApiResourceKind.identity_provider,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.oauth_app,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.platform_client,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.team,[t.IamRole.member]],[i.ApiResourceKind.organization,[t.IamRole.owner,t.IamRole.admin,t.IamRole.member,t.IamRole.viewer]],[i.ApiResourceKind.agent,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.session,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.skill,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.mcp_server,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.agent_instance,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.agent_share,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.agent_channel,[t.IamRole.owner,t.IamRole.viewer,t.IamRole.participant]],[i.ApiResourceKind.channel_app,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.workflow,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.workflow_instance,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.workflow_execution,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.environment,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.artifact,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.schedule,[t.IamRole.owner,t.IamRole.viewer]],[i.ApiResourceKind.plugin,[t.IamRole.owner,t.IamRole.viewer]]]),s=new Map([[i.ApiResourceKind.agent,[t.IamRole.viewer]],[i.ApiResourceKind.skill,[t.IamRole.viewer]],[i.ApiResourceKind.mcp_server,[t.IamRole.viewer]],[i.ApiResourceKind.agent_instance,[t.IamRole.viewer]],[i.ApiResourceKind.agent_channel,[t.IamRole.viewer,t.IamRole.participant]],[i.ApiResourceKind.workflow,[t.IamRole.viewer]],[i.ApiResourceKind.workflow_instance,[t.IamRole.viewer]],[i.ApiResourceKind.workflow_execution,[t.IamRole.viewer]],[i.ApiResourceKind.schedule,[t.IamRole.viewer]],[i.ApiResourceKind.plugin,[t.IamRole.viewer]]]),a=Object.freeze([]);e.s(["getGrantableRoles",0,function(e){return l.get(e)??a},"getTeamGrantableRoles",0,function(e){return s.get(e)??a},"hasGrantableRoles",0,function(e){let i=l.get(e);return void 0!==i&&i.length>0},"hasTeamGrantableRoles",0,function(e){let i=s.get(e);return void 0!==i&&i.length>0},"isRoleGrantable",0,function(e,i){let t=l.get(e);return void 0!==t&&t.includes(i)},"isRoleTeamGrantable",0,function(e,i){let t=s.get(e);return void 0!==t&&t.includes(i)}],818094)},564035,288441,890079,e=>{"use strict";var i=e.i(891287),t=e.i(452026),l=e.i(632897),s=e.i(586108),a=e.i(583093);e.s(["useResourceAccess",0,function(e,n){let r=(0,s.useStigmer)(),c=e?.kind??null,o=e?.id??null,u=n?.includeInherited??!1,{data:d,isLoading:m,isRefetching:g,error:p,refetch:b}=(0,a.useFetch)(c&&o?()=>{let e=(0,i.create)(t.ListResourceAccessInputSchema,{resource:(0,i.create)(l.ApiResourceRefSchema,{kind:c,id:o}),includeInherited:u});return r.iamPolicy.listResourceAccessByPrincipal(e).then(e=>[...e.entries])}:null,[c,o,u,r],[]);return{members:d,isLoading:m,isRefetching:g,error:p,refetch:b}}],564035);var n=e.i(271645),r=e.i(326283);e.s(["useCreateIamPolicy",0,function(){let e=(0,s.useStigmer)(),[i,t]=(0,n.useState)(!1),[l,a]=(0,n.useState)(null),c=(0,n.useCallback)(()=>a(null),[]);return{create:(0,n.useCallback)(async i=>{t(!0),a(null);try{return await e.iamPolicy.create(i)}catch(e){throw a((0,r.toError)(e)),e}finally{t(!1)}},[e]),isCreating:i,error:l,clearError:c}}],288441),e.s(["useDeleteIamPolicy",0,function(){let e=(0,s.useStigmer)(),[i,t]=(0,n.useState)(!1),[l,a]=(0,n.useState)(null),c=(0,n.useCallback)(()=>a(null),[]);return{remove:(0,n.useCallback)(async i=>{t(!0),a(null);try{return await e.iamPolicy.delete(i)}catch(e){throw a((0,r.toError)(e)),e}finally{t(!1)}},[e]),isDeleting:i,error:l,clearError:c}}],890079)},32011,e=>{"use strict";var i=e.i(843476),t=e.i(893976),l=e.i(188482);function s(e){return e?.identityOrigin?.providerDisplayName??""}e.s(["ProviderBadge",0,function({principal:e,className:a}){let n=s(e);return n?(0,i.jsxs)(l.Tooltip,{children:[(0,i.jsx)(l.TooltipTrigger,{render:(0,i.jsx)("span",{className:(0,t.cn)("stg:inline-flex stg:items-center stg:rounded stg:px-1.5 stg:py-0.5 stg:text-[0.6rem] stg:font-medium","stg:bg-muted-subtle stg:text-muted-foreground",a)}),children:n}),(0,i.jsx)(l.TooltipContent,{side:"top",children:`Identity provider: ${n}`})]}):null},"providerLabel",0,s])},981922,e=>{"use strict";var i=e.i(271645),t=e.i(891287),l=e.i(452026),s=e.i(632897),a=e.i(586108);e.s(["useCheckPermission",0,function(e,n,r){let c=(0,a.useStigmer)(),o="open"===(r?.fail??"open"),[u,d]=(0,i.useState)(o),[m,g]=(0,i.useState)(!1),[p,b]=(0,i.useState)(null),A=e?`${e.kind}:${e.id}:${n}`:null,R=(0,i.useRef)(new Map);return(0,i.useEffect)(()=>{if(!e||!A){d(o),g(!1);return}let i=R.current.get(A);if(void 0!==i){d(i),g(!1);return}let a=!1;d(o),g(!0);let r=(0,t.create)(l.CheckMyPermissionInputSchema,{resource:(0,t.create)(s.ApiResourceRefSchema,{kind:e.kind,id:e.id}),relation:n});return c.iamPolicy.checkMyPermission(r).then(e=>{if(a)return;let i=e.isAuthorized;R.current.set(A,i),d(i),b(null)}).catch(e=>{a||(d(o),b(e instanceof Error?e:Error(String(e))))}).finally(()=>{a||g(!1)}),()=>{a=!0}},[A,e?.kind,e?.id,n,o,c]),{allowed:u,isLoading:m,error:p}}])},590150,e=>{"use strict";var i=e.i(981922);e.s(["PermissionGate",0,function({resource:e,relation:t,children:l,fallback:s=null,loading:a=null}){let{allowed:n,isLoading:r}=(0,i.useCheckPermission)(e,t);return r?a:n?l:s}])},14606,e=>{"use strict";let i=(0,e.i(475254).default)("users-round",[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]]);e.s(["UsersRound",0,i],14606)},884561,e=>{"use strict";var i=e.i(891287),t=e.i(170255),l=e.i(632897);let s=t.ApiResourceKind[t.ApiResourceKind.identity_account],a=t.ApiResourceKind[t.ApiResourceKind.team],n="member";function r(e){return{kind:"identity_account",id:e}}function c(e){return{kind:"team",id:e}}e.s(["granteeFromView",0,function(e){if(e.id){if(e.kind===s&&""===e.relation)return r(e.id);if(e.kind===a&&e.relation===n)return c(e.id)}},"granteeKey",0,function(e){return`${e.kind}:${e.id}`},"granteeRef",0,function(e){switch(e.kind){case"identity_account":return(0,i.create)(l.ApiResourceRefSchema,{kind:s,id:e.id});case"team":return(0,i.create)(l.ApiResourceRefSchema,{kind:a,id:e.id,relation:n});default:return e}},"personGrantee",0,r,"teamGrantee",0,c])},681094,e=>{"use strict";var i=e.i(271645),t=e.i(891287),l=e.i(170255),s=e.i(632897),a=e.i(818094),n=e.i(884561),r=e.i(691444),c=e.i(597744),o=e.i(326283),u=e.i(564035),d=e.i(288441),m=e.i(890079);e.s(["useShareFlow",0,function(e){let g=(0,i.useMemo)(()=>e?{kind:e.kind,id:e.id}:null,[e?.kind,e?.id]),{members:p,isLoading:b,isRefetching:A,error:R,refetch:h}=(0,u.useResourceAccess)(g),W=e?.resourceKind??null,{roles:G,hasRoles:I}=(0,i.useMemo)(()=>null===W?{roles:[],hasRoles:!1}:{roles:(0,a.getGrantableRoles)(W),hasRoles:(0,a.hasGrantableRoles)(W)},[W]),S=(0,c.useResourceAvailable)(l.ApiResourceKind.team),V=(0,i.useMemo)(()=>null===W?[]:(0,a.getTeamGrantableRoles)(W),[W]),Z=S&&V.length>0,{create:v,isCreating:y,error:Y,clearError:B}=(0,d.useCreateIamPolicy)(),{remove:f}=(0,m.useDeleteIamPolicy)(),[x,X]=(0,i.useState)(!1),[k,w]=(0,i.useState)(null),C=(0,i.useRef)(e);C.current=e;let N=(0,i.useRef)(p);N.current=p;let E=(0,i.useCallback)(async(e,i)=>{let l=C.current;l&&(await v((0,t.create)(s.IamPolicySpecSchema,{principal:(0,n.granteeRef)(e),resource:(0,t.create)(s.ApiResourceRefSchema,{kind:l.kind,id:l.id}),relation:(0,r.iamRoleToString)(i)})),h())},[v,h]),_=(0,i.useCallback)(async e=>{let i=C.current;if(!i)return;let l=(0,n.granteeKey)(e),a=N.current.filter(e=>{let i=e.principal?(0,n.granteeFromView)(e.principal):void 0;return void 0!==i&&(0,n.granteeKey)(i)===l}).flatMap(e=>e.roles).filter(e=>!e.isInherited&&e.role?.code).map(e=>e.role?.code??"");X(!0),w(null);try{for(let l of new Set(a))await f((0,t.create)(s.IamPolicySpecSchema,{principal:(0,n.granteeRef)(e),resource:(0,t.create)(s.ApiResourceRefSchema,{kind:i.kind,id:i.id}),relation:l}))}catch(e){throw w((0,o.toError)(e)),e}finally{X(!1),h()}},[f,h]),F=(0,i.useCallback)(()=>{B(),w(null)},[B]);return(0,i.useMemo)(()=>({accessList:p,isLoading:b,isRefetching:A,fetchError:R,grantableRoles:G,hasGrantableRoles:I,teamGrantableRoles:V,canShareWithTeams:Z,grant:E,isGranting:y,grantError:Y,revoke:_,isRevoking:x,revokeError:k,refetch:h,clearErrors:F}),[p,b,A,R,G,I,V,Z,E,y,Y,_,x,k,h,F])}],681094)},540279,9531,982943,e=>{"use strict";var i=e.i(843476),t=e.i(271645),l=e.i(893976),s=e.i(884561),a=e.i(14606);function n({kind:e,name:t,className:s}){return(0,i.jsx)("div",{className:(0,l.cn)("stg:flex stg:h-6 stg:w-6 stg:shrink-0 stg:items-center stg:justify-center stg:rounded-full stg:bg-avatar stg:text-[0.6rem] stg:font-medium stg:text-muted-foreground",s),"aria-hidden":"true",children:"team"===e?(0,i.jsx)(a.UsersRound,{className:"stg:h-3.5 stg:w-3.5"}):(t[0]??"?").toUpperCase()})}var r=e.i(590150);function c(){return(0,i.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"})})}e.s(["AccessRow",0,function({entry:e,grantGate:a,onRemove:o,isRemoving:u,showRoles:d=!0}){let m=e.principal,g=m?(0,s.granteeFromView)(m):void 0,p=g?.kind==="team",b=m?.name||m?.email||m?.id||"Unknown",A=[...new Set(e.roles.map(e=>e.role?.name||e.role?.code).filter(Boolean))].join(", "),R=p?"Team":m?.email&&m.name?m.email:"",h=(0,t.useCallback)(async()=>{if(g)try{await o(g)}catch{}},[g,o]);return(0,i.jsxs)("li",{className:"stg:flex stg:items-center stg:justify-between stg:gap-2 stg:rounded-md stg:px-2 stg:py-1.5 stg:hover:bg-accent-hover stg:group",children:[(0,i.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:min-w-0",children:[(0,i.jsx)(n,{kind:p?"team":"identity_account",name:m?.name||m?.email||"?"}),(0,i.jsxs)("div",{className:"stg:min-w-0",children:[(0,i.jsx)("p",{className:"stg:text-xs stg:text-foreground stg:truncate",children:b}),R&&(0,i.jsx)("p",{className:"stg:text-[0.6rem] stg:text-muted-foreground stg:truncate",children:R})]})]}),(0,i.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5 stg:shrink-0",children:[d&&(0,i.jsx)("span",{className:"stg:text-[0.6rem] stg:text-muted-foreground stg:capitalize",children:A||"—"}),g&&(0,i.jsx)(r.PermissionGate,{resource:a,relation:"can_grant_access",children:(0,i.jsx)("button",{type:"button",onClick:h,disabled:u,"aria-label":`Remove ${b}'s access`,className:(0,l.cn)("stg:rounded stg:p-0.5 stg:text-muted-foreground stg:opacity-0 stg:group-hover:opacity-100 stg:focus-visible:opacity-100","stg:hover:text-destructive stg:hover:bg-destructive-subtle","stg:disabled:pointer-events-none stg:disabled:opacity-50","stg:transition-opacity"),children:(0,i.jsx)(c,{})})})]})]})},"accessEntryKey",0,function(e){let i=e.principal;return i?`${i.kind}:${i.id}#${i.relation}`:"unknown"}],540279);var o=e.i(610595),u=e.i(869803),d=e.i(32011),m=e.i(891287),g=e.i(3422),p=e.i(586108),b=e.i(583093);let A=[];function R(e){let i=(0,p.useStigmer)(),{data:l,isLoading:s,isRefetching:a,error:n,refetch:r}=(0,b.useFetch)(e?()=>i.team.listByOrg((0,m.create)(g.ListTeamsByOrgInputSchema,{org:e})).then(e=>[...e.entries]):null,[e,i],A);return(0,t.useMemo)(()=>({teams:l,isLoading:s,isRefetching:a,error:n,refetch:r}),[l,s,a,n,r])}e.s(["useTeamList",0,R],9531);var h=e.i(564035);function W({label:e,count:l,children:s}){let a=(0,t.useId)();return 0===l?null:(0,i.jsxs)("li",{role:"presentation",children:[(0,i.jsx)("div",{id:a,className:"stg:px-2.5 stg:pt-1.5 stg:pb-1 stg:text-[0.6rem] stg:font-medium stg:uppercase stg:tracking-wide stg:text-muted-foreground",children:e}),(0,i.jsx)("ul",{role:"group","aria-labelledby":a,className:u.UNSTYLED_LIST,children:s})]})}function G({candidate:e}){let t="team"===e.kind?e.description:e.email!==e.name?e.email:"";return t?(0,i.jsx)("span",{className:"stg:block stg:truncate stg:text-[0.6rem] stg:text-muted-foreground",children:t}):null}function I({value:e}){return"team"===e.kind?(0,i.jsx)("span",{className:"stg:block stg:truncate stg:text-[0.6rem] stg:text-muted-foreground",children:"Team"}):(0,i.jsx)(G,{candidate:e})}function S(){return(0,i.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"})})}e.s(["PrincipalPicker",0,function({orgId:e,value:a,onChange:r,includeTeams:c=!1,excludeGrantees:m,disabled:g=!1,label:p,autoFocus:b=!0,className:A}){let V=(0,t.useId)(),{people:Z,teams:v,isLoading:y,error:Y}=function({orgId:e,includeTeams:i}){let l=(0,h.useResourceAccess)(e?{kind:"organization",id:e}:null),a=R(i?e:null),n=(0,t.useMemo)(()=>{let e=new Map;for(let i of l.members){let t=i.principal,l=t?(0,s.granteeFromView)(t):void 0;!t||l?.kind!=="identity_account"||e.has(l.id)||e.set(l.id,{kind:"identity_account",grantee:(0,s.personGrantee)(l.id),name:t.name||t.email||t.id,email:t.email,view:t})}return[...e.values()]},[l.members]),r=(0,t.useMemo)(()=>i?a.teams.flatMap(e=>{let i=e.metadata?.id;return i?[{kind:"team",grantee:(0,s.teamGrantee)(i),name:e.metadata?.name||i,description:e.spec?.description??"",team:e}]:[]}):[],[i,a.teams]),c=l.isLoading||i&&a.isLoading,o=l.error??(i?a.error:null);return(0,t.useMemo)(()=>({people:n,teams:r,isLoading:c,error:o}),[n,r,c,o])}({orgId:e||null,includeTeams:c}),[B,f]=(0,t.useState)(""),[x,X]=(0,t.useState)(!1),[k,w]=(0,t.useState)(0),C=(0,t.useRef)(null),N=(0,t.useMemo)(()=>new Set((m??[]).map(s.granteeKey)),[m]),E=(0,t.useCallback)(e=>N.has((0,s.granteeKey)(e.grantee)),[N]),_=(0,t.useMemo)(()=>{let e=new Map;for(let i of Z){let t=i.email.toLowerCase();t&&e.set(t,(e.get(t)??0)+1)}return new Set([...e.entries()].filter(([,e])=>e>1).map(([e])=>e))},[Z]),{matchingPeople:F,matchingTeams:L}=(0,t.useMemo)(()=>{let e=B.trim().toLowerCase();return{matchingPeople:e?Z.filter(i=>i.name.toLowerCase().includes(e)||i.email.toLowerCase().includes(e)):Z,matchingTeams:e?v.filter(i=>i.name.toLowerCase().includes(e)||i.description.toLowerCase().includes(e)):v}},[Z,v,B]),K=(0,t.useMemo)(()=>[...L,...F],[F,L]),J=(0,t.useCallback)(e=>{E(e)||(r(e),f(""),X(!1))},[E,r]),j=(0,t.useCallback)(e=>{if("ArrowDown"===e.key)e.preventDefault(),X(!0),w(e=>Math.min(e+1,K.length-1));else if("ArrowUp"===e.key)e.preventDefault(),w(e=>Math.max(e-1,0));else if("Enter"===e.key){e.preventDefault();let i=K[k];i&&J(i)}else"Escape"===e.key&&X(!1)},[K,k,J]),Q=p??(c?"Person or team":"Person");if(a)return(0,i.jsxs)("div",{className:(0,l.cn)("stg:space-y-1",A),children:[(0,i.jsx)("span",{className:"stg:block stg:text-xs stg:font-medium stg:text-foreground",children:Q}),(0,i.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-2 stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5",children:[(0,i.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-2",children:[(0,i.jsx)(n,{kind:a.kind,name:a.name}),(0,i.jsxs)("div",{className:"stg:min-w-0",children:[(0,i.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,i.jsx)("span",{className:"stg:truncate stg:text-xs stg:text-foreground",children:a.name}),"identity_account"===a.kind&&(0,i.jsx)(d.ProviderBadge,{principal:a.view})]}),(0,i.jsx)(I,{value:a})]})]}),(0,i.jsx)("button",{type:"button",onClick:()=>r(null),disabled:g,"aria-label":"team"===a.kind?"Clear selected team":"Clear selected person",className:(0,l.cn)("stg:shrink-0 stg:rounded stg:p-0.5 stg:text-muted-foreground","stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:(0,i.jsx)(S,{})})]})]});let M=(e,t)=>{var a,r;let c=E(e),o=t===k;return(0,i.jsxs)("li",{role:"option","aria-selected":o,"aria-disabled":c,onMouseEnter:()=>w(t),onMouseDown:i=>{i.preventDefault(),J(e)},className:(0,l.cn)("stg:flex stg:items-center stg:justify-between stg:gap-2 stg:px-2.5 stg:py-1.5",c?"stg:cursor-not-allowed stg:opacity-50":"stg:cursor-pointer",o&&!c&&"stg:bg-accent-hover"),children:[(0,i.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:items-center stg:gap-2",children:[(0,i.jsx)(n,{kind:e.kind,name:e.name}),(0,i.jsxs)("div",{className:"stg:min-w-0",children:[(0,i.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,i.jsx)("span",{className:"stg:truncate stg:text-xs stg:text-foreground",children:e.name}),"identity_account"===e.kind&&(a=e,r=_,!!(0,d.providerLabel)(a.view)&&(a.view.identityOrigin?.providerDisplayName!=="Stigmer"||!!a.email&&r.has(a.email.toLowerCase())))&&(0,i.jsx)(d.ProviderBadge,{principal:e.view})]}),(0,i.jsx)(G,{candidate:e})]})]}),c&&(0,i.jsx)("span",{className:"stg:shrink-0 stg:text-[0.6rem] stg:text-muted-foreground",children:"Has access"})]},(0,s.granteeKey)(e.grantee))},z=0===K.length;return(0,i.jsxs)("div",{className:(0,l.cn)("stg:space-y-1",A),children:[(0,i.jsx)("label",{htmlFor:`${V}-input`,className:"stg:block stg:text-xs stg:font-medium stg:text-foreground",children:Q}),(0,i.jsxs)("div",{className:"stg:relative",children:[(0,i.jsx)("input",{id:`${V}-input`,ref:C,type:"text",role:"combobox","aria-expanded":x,"aria-controls":V,"aria-autocomplete":"list",autoComplete:"off",value:B,onChange:e=>{f(e.target.value),X(!0),w(0)},onFocus:()=>X(!0),onBlur:()=>{window.setTimeout(()=>X(!1),120)},onKeyDown:j,placeholder:c?"Search people or teams":"Search by name or email",disabled:g||y,autoFocus:b,className:(0,l.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-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50")}),x&&(0,i.jsxs)("ul",{id:V,role:"listbox","aria-label":c?"People and teams":"Organization members",className:(0,l.cn)(u.UNSTYLED_LIST,"stg:absolute stg:z-10 stg:mt-1 stg:max-h-56 stg:w-full stg:overflow-auto stg:rounded-md stg:border stg:border-border stg:bg-popover stg:py-1 stg:shadow-md"),children:[y&&(0,i.jsx)("li",{className:"stg:px-2.5 stg:py-2 stg:text-xs stg:text-muted-foreground",children:c?"Loading people and teams…":"Loading members…"}),!y&&Y&&(0,i.jsx)("li",{className:"stg:px-2.5 stg:py-2 stg:text-[0.65rem] stg:text-destructive",role:"alert",children:(0,o.getUserMessage)(Y)}),!y&&!Y&&z&&(0,i.jsx)("li",{className:"stg:px-2.5 stg:py-2 stg:text-xs stg:text-muted-foreground",children:B.trim()?"No one matches your search.":"No one to share with."}),!y&&!Y&&!z&&!c&&F.map((e,i)=>M(e,i)),!y&&!Y&&!z&&c&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(W,{label:"Teams",count:L.length,children:L.map((e,i)=>M(e,i))}),(0,i.jsx)(W,{label:"People",count:F.length,children:F.map((e,i)=>M(e,L.length+i))})]})]})]})]})}],982943)}]);