@tickernelz/wardmote-ui 2026.1114.2 → 2026.1115.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (829) hide show
  1. package/dist/assets/AccessSelectIdentity-BDYx1ZfF.js +1 -0
  2. package/dist/assets/AdapterManager-Dr6HMn6m.js +1 -0
  3. package/dist/assets/AdvancedToolsRoute-BtrEJ8Kl.js +39 -0
  4. package/dist/assets/AgentActionButtons-GqegemnQ.js +1 -0
  5. package/dist/assets/AgentAvatar-CHxCQtX1.js +1 -0
  6. package/dist/assets/AgentBubbleActionRow-DDep61nY.js +1 -0
  7. package/dist/assets/AgentCharacter-DpdNYKTX.js +2 -0
  8. package/dist/assets/AgentChat-BwT6gtxl.js +1 -0
  9. package/dist/assets/AgentChats-C7Wny5Xo.js +1 -0
  10. package/dist/assets/AgentDefaults-Cs5Bf0J-.js +1 -0
  11. package/dist/assets/AgentDetail-FzlEvgyi.js +38 -0
  12. package/dist/assets/AgentIconPicker-CDdlpWlV.js +1 -0
  13. package/dist/assets/AgentIdentity-C6wmi_qi.js +1 -0
  14. package/dist/assets/AgentMailCredentialField-DTevbVmi.js +1 -0
  15. package/dist/assets/AgentMultiSelect-isF4VAOe.js +1 -0
  16. package/dist/assets/AgentRoleEditor-DALs_S3f.js +1 -0
  17. package/dist/assets/AgentSetupPrompt-mJfq45rR.js +30 -0
  18. package/dist/assets/AgentTodoCard-DofAPWmu.js +1 -0
  19. package/dist/assets/Agents-CmauHEC_.js +3 -0
  20. package/dist/assets/AppDetail-C61JaJyi.js +5 -0
  21. package/dist/assets/AppLogo-Da6J2kSR.js +1 -0
  22. package/dist/assets/AppNotConnected-CiM1HSNo.js +1 -0
  23. package/dist/assets/ApprovalCard-C-z6ovlE.js +1 -0
  24. package/dist/assets/ApprovalDetail-DvGLSlDB.js +1 -0
  25. package/dist/assets/ApprovalPayload-VYiHqD4m.js +1 -0
  26. package/dist/assets/Approvals-D7h2H_sr.js +1 -0
  27. package/dist/assets/AppsConnect-BV3-Loxz.js +1 -0
  28. package/dist/assets/AppsReview-CbER22st.js +1 -0
  29. package/dist/assets/ArtifactCard-BewPtFvc.js +1 -0
  30. package/dist/assets/Artifacts-DvVv2IJk.js +1 -0
  31. package/dist/assets/AssistantConnection-hL02uszq.js +1 -0
  32. package/dist/assets/AttentionInteractionResolver-qHNl_xbV.js +1 -0
  33. package/dist/assets/AuditHub-nt7z4iFD.js +1 -0
  34. package/dist/assets/Auth-BB7VP3fC.js +3 -0
  35. package/dist/assets/BoardChat-BNCmqJXx.js +18 -0
  36. package/dist/assets/BoardClaim-Cy6RXIcK.js +1 -0
  37. package/dist/assets/BootstrapSetupUxLab-Dx7dsqL7.js +1 -0
  38. package/dist/assets/BreadcrumbContext-BKgeE2st.js +1 -0
  39. package/dist/assets/Browse-CSoDYBmL.js +1 -0
  40. package/dist/assets/BudgetPolicyCard-CvjxMT7D.js +1 -0
  41. package/dist/assets/CaseDetail-DLWFPO4F.js +2 -0
  42. package/dist/assets/CaseIdentifierKey-Bxj5DIwm.js +1 -0
  43. package/dist/assets/Cases-DVrVJGhT.js +2 -0
  44. package/dist/assets/ChatEndpointDetail-BtVesRM4.js +5 -0
  45. package/dist/assets/ChatEndpointSetup-aBQTEbNQ.js +1 -0
  46. package/dist/assets/ChatIdentityConfirm-BzwwLyfO.js +1 -0
  47. package/dist/assets/ChoiceControls-CyXp9WJX.js +1 -0
  48. package/dist/assets/CliAuth-CyZ8-Woi.js +1 -0
  49. package/dist/assets/CommentAttributionChip-CojGGiYj.js +1 -0
  50. package/dist/assets/Companies-NQZfEwC5.js +1 -0
  51. package/dist/assets/CompanyAccess-FyXDsh86.js +1 -0
  52. package/dist/assets/CompanyActivity-BJv98EGz.js +1 -0
  53. package/dist/assets/CompanyConnections-XcsFcJNb.js +1 -0
  54. package/dist/assets/CompanyContext-dsHNbwL5.js +1 -0
  55. package/dist/assets/CompanyEnvironments-iFBbTOTj.js +3 -0
  56. package/dist/assets/CompanyExport-xlMYiY7S.js +4 -0
  57. package/dist/assets/CompanyImport-CfVS727g.js +1 -0
  58. package/dist/assets/CompanySettings-CkI5BPE7.js +1 -0
  59. package/dist/assets/CompanySettingsPluginPage-CHfwGrSy.js +1 -0
  60. package/dist/assets/CompanySkills-DRYlbEIw.js +10 -0
  61. package/dist/assets/ComposerAddMenu-DE7U8fwA.js +3 -0
  62. package/dist/assets/ConfigureBuiltInAgentModal-CPTKswQX.js +1 -0
  63. package/dist/assets/ConnectionSetupFlow-CVuuI_IB.js +40 -0
  64. package/dist/assets/CopyText-_f1fNkU9.js +1 -0
  65. package/dist/assets/CopyableGatewayUrl-C5DM-jlb.js +1 -0
  66. package/dist/assets/CrossIssueCollaborationUxLab-tDhS-jq4.js +1 -0
  67. package/dist/assets/Dashboard-CsWdlf2w.js +2 -0
  68. package/dist/assets/DecisionDateChips-CKGOW4lI.js +1 -0
  69. package/dist/assets/DecisionModelSettings-CRU_tFiW.js +1 -0
  70. package/dist/assets/DecisionQueuePage-B-d23vhE.js +1 -0
  71. package/dist/assets/DesignGuide-C6pUE0g8.js +23 -0
  72. package/dist/assets/DocumentFrameHeader-DJxQSrVU.js +1 -0
  73. package/dist/assets/EmailConnectionAccess-Bmzjruyw.js +1 -0
  74. package/dist/assets/EmailEndpointSetup-tb-MwAeF.js +1 -0
  75. package/dist/assets/EnforcementBanner-CvSlJnT3.js +1 -0
  76. package/dist/assets/EntityRow-B_hi0SpF.js +1 -0
  77. package/dist/assets/ExecutionWorkspaceDetail-DeGCUx0Z.js +19 -0
  78. package/dist/assets/FilterBar-B0Ky4IKW.js +1 -0
  79. package/dist/assets/FoldCurtain-DpaCBMQq.js +1 -0
  80. package/dist/assets/FolderControls-Bnct9FlN.js +1 -0
  81. package/dist/assets/GatewayDetail-C1azJf5O.js +2 -0
  82. package/dist/assets/GatewaysList-C5G4t9_s.js +1 -0
  83. package/dist/assets/GoalDetail-CI3GJljQ.js +1 -0
  84. package/dist/assets/GoalTree-DSJRz3A3.js +1 -0
  85. package/dist/assets/Goals-BD7j5fQ-.js +1 -0
  86. package/dist/assets/Identity-D6-4ufCa.js +1 -0
  87. package/dist/assets/ImageGalleryModal-DYawBp7o.js +1 -0
  88. package/dist/assets/Inbox-D31eIx5B.js +2 -0
  89. package/dist/assets/InlineBanner-BxYdCuGP.js +1 -0
  90. package/dist/assets/InlineEditor-CDKgapVj.js +1 -0
  91. package/dist/assets/InlineEntitySelector-DcWijm3s.js +1 -0
  92. package/dist/assets/InstanceAccess-DGzXC0Xl.js +1 -0
  93. package/dist/assets/InstanceAdvanced-xrGokT-A.js +1 -0
  94. package/dist/assets/InstanceFeatures-Dh9AJ16M.js +1 -0
  95. package/dist/assets/InviteLanding-SBgzJ00W.js +1 -0
  96. package/dist/assets/IssueChatLongThreadPerf-C8RVTu9g.js +2 -0
  97. package/dist/assets/IssueChatThread-D_ke-NXX.js +40 -0
  98. package/dist/assets/IssueDetail-D6t6W3vf.js +9 -0
  99. package/dist/assets/IssueDocumentAnnotations-BusZRPJz.js +2 -0
  100. package/dist/assets/IssueOutputSection-DbSjLJ0z.js +1 -0
  101. package/dist/assets/IssueRecoveryActionCard--s2DeVTI.js +1 -0
  102. package/dist/assets/IssueReferencePill-CrbkBko3.js +1 -0
  103. package/dist/assets/IssueThreadInteractionCard-CEOm3Nou.js +9 -0
  104. package/dist/assets/IssueWriteDenialNotice-BSocbA8i.js +1 -0
  105. package/dist/assets/Issues-D87QBALw.js +5 -0
  106. package/dist/assets/JoinRequestQueue-m5g8CeX_.js +1 -0
  107. package/dist/assets/JsonSchemaForm-DcMqKoRk.js +1 -0
  108. package/dist/assets/LiveNowTodoLine-4_fha7LL.js +1 -0
  109. package/dist/assets/ManagedAiConnectionDetails-BvECa_4J.js +1 -0
  110. package/dist/assets/MarkdownBody-DneqWO_F.js +16 -0
  111. package/dist/assets/MarkdownEditor-Dop0pvpQ.js +85 -0
  112. package/dist/assets/McpConnect-B6lgmV49.js +1 -0
  113. package/dist/assets/MembershipAction-lxyNE6cV.js +1 -0
  114. package/dist/assets/MetricCard-C65n44vu.js +1 -0
  115. package/dist/assets/MissingPluginTabPlaceholder-DzxTVHCm.js +1 -0
  116. package/dist/assets/ModelsAndProviders-Cf5ywcp6.js +1 -0
  117. package/dist/assets/MootMark-Cw1oipfs.js +1 -0
  118. package/dist/assets/NewAgent-DIm04W61.js +1 -0
  119. package/dist/assets/OmpAllSettings-BN_03A5F.js +1 -0
  120. package/dist/assets/OpenwaGatewayManager-CR2JaccN.js +2 -0
  121. package/dist/assets/PathInstructionsModal-BJj8D16I.js +1 -0
  122. package/dist/assets/PipelineSettings-DJ3wPyS6.js +2 -0
  123. package/dist/assets/Pipelines-DGmfqNxF.js +1 -0
  124. package/dist/assets/PixelsOffice-IvHoOjLi.js +2 -0
  125. package/dist/assets/PluginManager-CCLKIrQH.js +1 -0
  126. package/dist/assets/PluginPage-BPjyJHry.js +1 -0
  127. package/dist/assets/PluginSettings-BOAe2lNP.js +1 -0
  128. package/dist/assets/ProfileDetailRoute-BtPWhwsL.js +1 -0
  129. package/dist/assets/ProfileSettings-nUyykb7U.js +1 -0
  130. package/dist/assets/ProfileWizardRoute-BgmALebB.js +1 -0
  131. package/dist/assets/ProjectDetail-Sc5w75pl.js +1 -0
  132. package/dist/assets/ProjectWorkspaceDetail-DddXh8vS.js +29 -0
  133. package/dist/assets/ProjectWorkspacesContent-BDjk8_xt.js +1 -0
  134. package/dist/assets/Projects-CI3qDhpS.js +1 -0
  135. package/dist/assets/PublicIssueSharePage-DwYXZzxO.js +1 -0
  136. package/dist/assets/QuestionForm-CichUYOX.js +7 -0
  137. package/dist/assets/QuotaBar-BGCW-X3-.js +1 -0
  138. package/dist/assets/RepositoryEditor-DjowAt7s.js +1 -0
  139. package/dist/assets/ResponsibleUserDenialNotice-Bln16DNY.js +1 -0
  140. package/dist/assets/ResponsibleUserDenialUxLab-D7OT10CT.js +1 -0
  141. package/dist/assets/ReviewQueueCard-DOmPi2Sh.js +1 -0
  142. package/dist/assets/RichWorkProductCard-DR1nS1PX.js +1 -0
  143. package/dist/assets/RoutineActivityRow-FRpZgdY9.js +1 -0
  144. package/dist/assets/RoutineDetail-B3VRsS0N.js +2 -0
  145. package/dist/assets/RoutineRunVariablesDialog-DswRuGZ9.js +1 -0
  146. package/dist/assets/RoutineVariablesEditor-Donmo-Ha.js +1 -0
  147. package/dist/assets/Routines-Di5TG7XO.js +1 -0
  148. package/dist/assets/ScrollToBottom-_G56w_lV.js +1 -0
  149. package/dist/assets/Search-BIik4_bN.js +1 -0
  150. package/dist/assets/SearchableSelect-Dt_6_dds.js +1 -0
  151. package/dist/assets/Secrets-CHpXsGv_.js +4 -0
  152. package/dist/assets/SetupWizard-Bywkpo--.js +1 -0
  153. package/dist/assets/SidebarContext-B3wVOcP3.js +1 -0
  154. package/dist/assets/SidebarNavItem-DKoBWUYG.js +1 -0
  155. package/dist/assets/SkillBinaryFile-StCRWUUR.js +1 -0
  156. package/dist/assets/SkillCardIcon-DV49-Rqj.js +2 -0
  157. package/dist/assets/SkillSourceTree-DggH4IBB.js +2 -0
  158. package/dist/assets/SkillSources-DfT7WFOQ.js +2 -0
  159. package/dist/assets/SkillStudio-CRelTbZ8.js +9 -0
  160. package/dist/assets/SourceTrustBadge-DVLJ7ZD_.js +1 -0
  161. package/dist/assets/StatusCards-DpkFy5MW.js +1 -0
  162. package/dist/assets/StatusIcon-DQw2SvHx.js +1 -0
  163. package/dist/assets/SummarySlotCard-DrD7ZUGg.js +1 -0
  164. package/dist/assets/TaskChatComposerTakeoverContext-CDZizi4n.js +1 -0
  165. package/dist/assets/TaskChatLab-DEU_p6uP.js +11 -0
  166. package/dist/assets/TaskChatMarker-CIi5LTz5.js +2 -0
  167. package/dist/assets/TaskChatProtocolCard-914r9_hc.js +1 -0
  168. package/dist/assets/TaskChatThreadView-Cg1OemFt.js +4 -0
  169. package/dist/assets/TaskTreeControls-CxIqDyig.js +3 -0
  170. package/dist/assets/Terminal-BbK63NvM.js +1 -0
  171. package/dist/assets/TerminalView-rL43P2cd.js +58 -0
  172. package/dist/assets/ThemeContext-VwmgZV3v.js +1 -0
  173. package/dist/assets/ThemeToggle-zSm7ZVJQ.js +1 -0
  174. package/dist/assets/ToastContext-Brs-4k-1.js +1 -0
  175. package/dist/assets/ToolsAdminGate-r7j5MzHI.js +1 -0
  176. package/dist/assets/TrustPresetSection-Clyy_toY.js +1 -0
  177. package/dist/assets/UserProfile-DPol1TV3.js +1 -0
  178. package/dist/assets/WebhookUrlWarning-DL5kWPiZ.js +1 -0
  179. package/dist/assets/WhatNeedsMe-CgUifJfF.js +1 -0
  180. package/dist/assets/WorkspaceRuntimeControls-C-Iz5m02.js +1 -0
  181. package/dist/assets/Workspaces-VvtqZaqn.js +1 -0
  182. package/dist/assets/access-GBXLU9Vk.js +1 -0
  183. package/dist/assets/activity-CYcMbzsk.js +1 -0
  184. package/dist/assets/activity-fmxP7mpr.js +1 -0
  185. package/dist/assets/activity-format-DoAsbE0g.js +1 -0
  186. package/dist/assets/adapter-display-registry-C6GXIVXZ.js +1 -0
  187. package/dist/assets/adapters-CFK_eCPY.js +1 -0
  188. package/dist/assets/agent-avatar-url-D2n1Ozed.js +1 -0
  189. package/dist/assets/agent-config-primitives-Cs7txZkg.js +1 -0
  190. package/dist/assets/agentChats-B6eLnzJT.js +1 -0
  191. package/dist/assets/agents-B46GLJqX.js +1 -0
  192. package/dist/assets/alert-dialog-BvLBb6EL.js +1 -0
  193. package/dist/assets/app-connect-policy-BuNz5ikd.js +1 -0
  194. package/dist/assets/archive-CJfzKyJd.js +1 -0
  195. package/dist/assets/archive-restore-Bu12jvK6.js +1 -0
  196. package/dist/assets/arrow-down-Ci2NVHDm.js +1 -0
  197. package/dist/assets/arrow-down-left-Dk2oXKyh.js +1 -0
  198. package/dist/assets/arrow-left-C6eRcImQ.js +1 -0
  199. package/dist/assets/arrow-right-rIiVMAiv.js +1 -0
  200. package/dist/assets/arrow-up-Dnv0YU10.js +1 -0
  201. package/dist/assets/arrow-up-down-DYp2VJib.js +1 -0
  202. package/dist/assets/arrow-up-right-BWJhDk_Y.js +1 -0
  203. package/dist/assets/artifacts-BwKfWH9Y.js +1 -0
  204. package/dist/assets/assets-CcTyp_pK.js +1 -0
  205. package/dist/assets/attachment-icon-CABmZCE-.js +1 -0
  206. package/dist/assets/avatar-DWrtTUFj.js +1 -0
  207. package/dist/assets/badge-Bw9Yv7_W.js +1 -0
  208. package/dist/assets/badge-check-C3SQez1U.js +1 -0
  209. package/dist/assets/book-open-amuA6uFy.js +1 -0
  210. package/dist/assets/bot-DRofiPdb.js +1 -0
  211. package/dist/assets/boxes-5gvA2uo8.js +1 -0
  212. package/dist/assets/braces-C5ZUDIxe.js +1 -0
  213. package/dist/assets/browser-use-BILV_BYD.js +1 -0
  214. package/dist/assets/budgets-DZOWP4Hh.js +1 -0
  215. package/dist/assets/button-bS07vQAg.js +1 -0
  216. package/dist/assets/calendar-clock-BYIHtGGP.js +1 -0
  217. package/dist/assets/card-BdxT61BL.js +1 -0
  218. package/dist/assets/cases-CZE-FTip.js +1 -0
  219. package/dist/assets/chatEndpoints-91qyAU1E.js +1 -0
  220. package/dist/assets/check-Cn0uuQ_e.js +1 -0
  221. package/dist/assets/checkbox-tTcdQ3wz.js +1 -0
  222. package/dist/assets/chevron-down-DA6rxxgD.js +1 -0
  223. package/dist/assets/chevron-left-zJln1v3t.js +1 -0
  224. package/dist/assets/chevron-right-dRlTJLmW.js +1 -0
  225. package/dist/assets/chevron-up-OGjfRrmd.js +1 -0
  226. package/dist/assets/chip-C1sAQ_om.js +1 -0
  227. package/dist/assets/circle-D37l2gIX.js +1 -0
  228. package/dist/assets/circle-alert-Da1ne2k3.js +1 -0
  229. package/dist/assets/circle-dot-BflVdAjA.js +1 -0
  230. package/dist/assets/circle-question-mark-D9QciJpU.js +1 -0
  231. package/dist/assets/circle-slash-C-AiIJx8.js +1 -0
  232. package/dist/assets/circle-x-CSlDT5zP.js +1 -0
  233. package/dist/assets/clipboard-paste-CDNv7EUP.js +1 -0
  234. package/dist/assets/clock-CzJ0Y1V8.js +1 -0
  235. package/dist/assets/cloud-DFiLk-Nc.js +1 -0
  236. package/dist/assets/code-xml-BdOLy6gM.js +1 -0
  237. package/dist/assets/coins-DxyWOmEZ.js +1 -0
  238. package/dist/assets/collapsible-9d0h08gJ.js +1 -0
  239. package/dist/assets/columns-3-Bd3qBbsG.js +1 -0
  240. package/dist/assets/command-DibaV-of.js +5 -0
  241. package/dist/assets/companies-query-lyTYPUyy.js +1 -0
  242. package/dist/assets/connection-identity-CymhAKo1.js +1 -0
  243. package/dist/assets/connection-owner-CrqspCR3.js +1 -0
  244. package/dist/assets/copy-B9wRjKte.js +1 -0
  245. package/dist/assets/createLucideIcon-Dp_BESPI.js +94 -0
  246. package/dist/assets/decision-models-BtPQZgAS.js +1 -0
  247. package/dist/assets/dialog-BbBEA9p-.js +1 -0
  248. package/dist/assets/dist-B4RM_iwm.js +1 -0
  249. package/dist/assets/dist-BUubItNY.js +1 -0
  250. package/dist/assets/dist-Bfnp-w05.js +1 -0
  251. package/dist/assets/dist-Br1hXe2P.js +1 -0
  252. package/dist/assets/dist-Bt8JSjoR.js +1 -0
  253. package/dist/assets/dist-ByLqhYXa.js +1 -0
  254. package/dist/assets/dist-CYtosku9.js +1 -0
  255. package/dist/assets/dist-CaA23w-w.js +1 -0
  256. package/dist/assets/dist-CgTn_tfa.js +1 -0
  257. package/dist/assets/dist-DZG7nTA7.js +1 -0
  258. package/dist/assets/dist-DqqULahA.js +1 -0
  259. package/dist/assets/dist-DrKAhw8j.js +1 -0
  260. package/dist/assets/dist-Dy96Oxtm.js +1 -0
  261. package/dist/assets/dropdown-menu-CR4r_wCy.js +1 -0
  262. package/dist/assets/ellipsis-D-B_YyXO.js +1 -0
  263. package/dist/assets/ellipsis-vertical-Cvwuft46.js +1 -0
  264. package/dist/assets/email-B4M0T3qh.js +1 -0
  265. package/dist/assets/environment-variables-editor-CMuDqyG3.js +1 -0
  266. package/dist/assets/environments-DXsydWIO.js +1 -0
  267. package/dist/assets/es2015-C36Uu4St.js +41 -0
  268. package/dist/assets/external-link-dcZMvrBY.js +1 -0
  269. package/dist/assets/eye-FIf8kCfJ.js +1 -0
  270. package/dist/assets/eye-off-DyiqgKoU.js +1 -0
  271. package/dist/assets/fast-responses-BRhTUKUm.js +1 -0
  272. package/dist/assets/file-BTR-cl5V.js +1 -0
  273. package/dist/assets/file-code-corner-D56_khbN.js +1 -0
  274. package/dist/assets/file-question-mark-DKgQ4Qx0.js +1 -0
  275. package/dist/assets/file-search-qrHVliUu.js +1 -0
  276. package/dist/assets/file-text-C3HKnY1t.js +1 -0
  277. package/dist/assets/flag-DtP1qZ9D.js +1 -0
  278. package/dist/assets/flask-conical-CEy_2iN6.js +1 -0
  279. package/dist/assets/folder-git-2-sTNuDiCh.js +1 -0
  280. package/dist/assets/folder-open-BjdwrLu4.js +1 -0
  281. package/dist/assets/folder-search-C2QnQ02g.js +1 -0
  282. package/dist/assets/funnel-B6zSgvNd.js +1 -0
  283. package/dist/assets/git-pull-request-BVLQZnFj.js +1 -0
  284. package/dist/assets/github-icon-BvWUh1KT.js +1 -0
  285. package/dist/assets/health-CcqADKZw.js +1 -0
  286. package/dist/assets/heartbeats-Do5AjDtr.js +1 -0
  287. package/dist/assets/inbox-Dob9VqgU.js +1 -0
  288. package/dist/assets/inboxArchiveCache-DyAJQXXz.js +1 -0
  289. package/dist/assets/index-Bz_e1N10.css +2 -0
  290. package/dist/assets/index-CUNTJ_RK.js +67 -0
  291. package/dist/assets/info-Tk1lW8gi.js +1 -0
  292. package/dist/assets/input-Cq0iBDAN.js +1 -0
  293. package/dist/assets/instanceSettings-kW2DXfL4.js +1 -0
  294. package/dist/assets/interaction-audience-eGPW7epJ.js +1 -0
  295. package/dist/assets/interaction-card-visibility-CMe0W5FM.js +1 -0
  296. package/dist/assets/issue-blockers-B3cNlMTc.js +1 -0
  297. package/dist/assets/issue-filters-Ce8v1l6U.js +1 -0
  298. package/dist/assets/issue-output-DJVhoabR.js +1 -0
  299. package/dist/assets/issue-properties-By4_d87g.js +4 -0
  300. package/dist/assets/issue-share-Csd88Ksi.js +1 -0
  301. package/dist/assets/issue-workspace-selection-D3X0yGTI.js +1 -0
  302. package/dist/assets/key-round-DnZyJChv.js +1 -0
  303. package/dist/assets/label-C8OzDIYT.js +1 -0
  304. package/dist/assets/layout-dashboard-BKS8iwhq.js +1 -0
  305. package/dist/assets/link-2-Cl0gUYUT.js +1 -0
  306. package/dist/assets/link-DJXsSlVf.js +1 -0
  307. package/dist/assets/list-filter-WC4U6eSH.js +1 -0
  308. package/dist/assets/list-todo-CQxIFFFt.js +1 -0
  309. package/dist/assets/log-in-CqSMhQnh.js +1 -0
  310. package/dist/assets/maximize-2-amZRvyCt.js +1 -0
  311. package/dist/assets/mention-chips-CE46mpoH.js +17 -0
  312. package/dist/assets/message-square-plus-C_l_rEfF.js +1 -0
  313. package/dist/assets/minus-Buu9ydDk.js +1 -0
  314. package/dist/assets/model-fallback-DLgR8yUB.js +1 -0
  315. package/dist/assets/model-picker-fields-B9Syk1Po.js +1 -0
  316. package/dist/assets/network-CwJcZzzO.js +1 -0
  317. package/dist/assets/octagon-alert-Brf0_Mjx.js +1 -0
  318. package/dist/assets/octagon-x-Buu9jyYv.js +1 -0
  319. package/dist/assets/omp-settings-model-tJ2dGg2i.js +1 -0
  320. package/dist/assets/package-Cear_jmz.js +1 -0
  321. package/dist/assets/pause-BUOF24wZ.js +1 -0
  322. package/dist/assets/pen-line-BzM9aj3c.js +1 -0
  323. package/dist/assets/pipeline-stage-presentation-DlCpG0qw.js +2 -0
  324. package/dist/assets/pipelines-CNnZNrdV.js +1 -0
  325. package/dist/assets/play-BbPL3U2Z.js +1 -0
  326. package/dist/assets/plug-8Lp1g1l2.js +1 -0
  327. package/dist/assets/plugins-DkSvCKMQ.js +1 -0
  328. package/dist/assets/plus--_-YgodI.js +1 -0
  329. package/dist/assets/popover-CgIDA573.js +1 -0
  330. package/dist/assets/power-CApeDdsJ.js +1 -0
  331. package/dist/assets/presentation-mode-CA39Cukj.js +1 -0
  332. package/dist/assets/profile-summary-Djbqv9qM.js +1 -0
  333. package/dist/assets/projects-oY9VYW38.js +1 -0
  334. package/dist/assets/proposal-review-Duwdz6By.js +1 -0
  335. package/dist/assets/queryClient-DexRZQAq.js +1 -0
  336. package/dist/assets/queryKeys-Sk0U6x0H.js +1 -0
  337. package/dist/assets/radio-Cqg3txrz.js +1 -0
  338. package/dist/assets/radio-card-Dt1-FCvF.js +1 -0
  339. package/dist/assets/recent-agent-chats-d0l_Yj1L.js +1 -0
  340. package/dist/assets/refresh-cw-DCZxsFMf.js +1 -0
  341. package/dist/assets/repeat-CC7VfEiF.js +1 -0
  342. package/dist/assets/resizable-panels-ByTtx3M4.js +1 -0
  343. package/dist/assets/review-policy-Dxd8aZiE.js +1 -0
  344. package/dist/assets/rotate-ccw-C_1vZuhL.js +1 -0
  345. package/dist/assets/rotate-cw-I3e1Xw1W.js +1 -0
  346. package/dist/assets/router-qrDA_fDm.js +1 -0
  347. package/dist/assets/routines-CJdlnuen.js +1 -0
  348. package/dist/assets/runRetryState-dV9X1tL7.js +1 -0
  349. package/dist/assets/save-DqST8D4G.js +1 -0
  350. package/dist/assets/schema-config-fields-DWL2SGAV.js +1 -0
  351. package/dist/assets/scroll-area-CpCJXkWU.js +1 -0
  352. package/dist/assets/scroll-text-BJJb9Pmr.js +1 -0
  353. package/dist/assets/search-ibIk5iio.js +1 -0
  354. package/dist/assets/secrets-Bm2e103f.js +1 -0
  355. package/dist/assets/select-DHbqeY8-.js +1 -0
  356. package/dist/assets/send-C41Z1Xid.js +1 -0
  357. package/dist/assets/separator-BidXiA6w.js +1 -0
  358. package/dist/assets/server-CMSWA2Ot.js +1 -0
  359. package/dist/assets/server-cog-BD1bLG6y.js +1 -0
  360. package/dist/assets/settings-C9BE0rWf.js +1 -0
  361. package/dist/assets/shared-BbsNa_97.js +1 -0
  362. package/dist/assets/sheet-CBSmXpkT.js +1 -0
  363. package/dist/assets/shield-alert-YwTMOIDC.js +1 -0
  364. package/dist/assets/shield-check-wN-_3-kE.js +1 -0
  365. package/dist/assets/shield-fs-95RH0.js +1 -0
  366. package/dist/assets/shield-question-mark-BMirO5nk.js +1 -0
  367. package/dist/assets/shield-x-D-Cey5j5.js +1 -0
  368. package/dist/assets/sidebarPreferences-DrwUhshr.js +1 -0
  369. package/dist/assets/skeleton-BGHeLb8T.js +1 -0
  370. package/dist/assets/slots-CoW6zbG2.js +49 -0
  371. package/dist/assets/smoke-lab-matrix-Bd93k2qI.js +1 -0
  372. package/dist/assets/square-CxemVvLC.js +1 -0
  373. package/dist/assets/star-CpH09lE0.js +15 -0
  374. package/dist/assets/sun-BmLLKuXZ.js +1 -0
  375. package/dist/assets/system-notice-comment-C59ifr3s.js +1 -0
  376. package/dist/assets/tabs-BeNCSQfH.js +1 -0
  377. package/dist/assets/task-chat-attachments-fAxgAmq-.js +10 -0
  378. package/dist/assets/terminal-BHpyJMSm.js +1 -0
  379. package/dist/assets/textarea-BCpiepe1.js +1 -0
  380. package/dist/assets/thumbs-down-DZc6J8BY.js +1 -0
  381. package/dist/assets/thumbs-up-BSrfRAoM.js +1 -0
  382. package/dist/assets/toggle-switch-4ZdUl1cb.js +1 -0
  383. package/dist/assets/tools-CtHWMX0r.js +1 -0
  384. package/dist/assets/tooltip-BeXkeOXn.js +1 -0
  385. package/dist/assets/transcript-adapter-CL9r2VPx.js +5 -0
  386. package/dist/assets/trash-DR-HYzK4.js +1 -0
  387. package/dist/assets/triangle-alert-2xDDaXgc.js +1 -0
  388. package/dist/assets/use-adapter-capabilities-Doio2Kd7.js +1 -0
  389. package/dist/assets/use-copy-action-BwdiNLQ4.js +1 -0
  390. package/dist/assets/useAgentChatEnabled-DAjgbjFc.js +1 -0
  391. package/dist/assets/useAutosaveIndicator-SeuXAwa6.js +1 -0
  392. package/dist/assets/useHiddenSettings-su4lPXtZ.js +1 -0
  393. package/dist/assets/useInfiniteQuery-DpkS2abG.js +1 -0
  394. package/dist/assets/useInstanceFeatureSettings-Jo6rkq0M.js +1 -0
  395. package/dist/assets/useManagedSandboxOnly-mYadyWYh.js +1 -0
  396. package/dist/assets/useMobileEntityPickerViewportStyle-Dndq48zX.js +1 -0
  397. package/dist/assets/usePrefersReducedMotion-CtREi7r-.js +1 -0
  398. package/dist/assets/useProfilesData-yVfX1sRo.js +1 -0
  399. package/dist/assets/useQueries-SZ8rhHDB.js +1 -0
  400. package/dist/assets/useSecondTick-D3ecvH8m.js +1 -0
  401. package/dist/assets/useSharedPolling-SqFIqyK_.js +1 -0
  402. package/dist/assets/useSummaryDraftStream-DNU41h57.js +3 -0
  403. package/dist/assets/user-BVhnWxYc.js +1 -0
  404. package/dist/assets/user-check-BUwzmc0Y.js +1 -0
  405. package/dist/assets/user-minus-DUnrN5mR.js +1 -0
  406. package/dist/assets/user-round-DlEVjh6C.js +1 -0
  407. package/dist/assets/user-x-3uNljA-y.js +1 -0
  408. package/dist/assets/users-CycOHqnK.js +1 -0
  409. package/dist/assets/wand-sparkles-DpBlMupu.js +1 -0
  410. package/dist/assets/webhook-DmWTKMCs.js +1 -0
  411. package/dist/assets/x-C-YdLCiV.js +1 -0
  412. package/dist/index.html +192 -190
  413. package/dist/sw.js +1 -1
  414. package/package.json +1 -1
  415. package/dist/assets/AccessSelectIdentity-Dp--1kWe.js +0 -1
  416. package/dist/assets/ActiveAgentsPanel-Budj8e9v.js +0 -1
  417. package/dist/assets/AdapterManager-DhiW44Eo.js +0 -1
  418. package/dist/assets/AdvancedToolsRoute-CICI1XRd.js +0 -39
  419. package/dist/assets/AgentActionButtons-DIhpv51Y.js +0 -1
  420. package/dist/assets/AgentAvatar-DgGEobSY.js +0 -1
  421. package/dist/assets/AgentBubbleActionRow-DIr3TdR9.js +0 -1
  422. package/dist/assets/AgentCharacter-BTEn5MBu.js +0 -2
  423. package/dist/assets/AgentChat-CeuGtMXr.js +0 -1
  424. package/dist/assets/AgentChats-CmDtTrMa.js +0 -1
  425. package/dist/assets/AgentDefaults-DpYaMGkf.js +0 -1
  426. package/dist/assets/AgentDetail-DFTeFc4-.js +0 -38
  427. package/dist/assets/AgentIconPicker-D87bSkxE.js +0 -1
  428. package/dist/assets/AgentIdentity-I_kB4rMX.js +0 -1
  429. package/dist/assets/AgentMailCredentialField-L4T0REEW.js +0 -1
  430. package/dist/assets/AgentMultiSelect-DsJfZtR2.js +0 -1
  431. package/dist/assets/AgentRoleEditor-DTKNKZXs.js +0 -1
  432. package/dist/assets/AgentSetupPrompt-DYBB5Med.js +0 -30
  433. package/dist/assets/AgentTodoCard-DRXZ7hmU.js +0 -1
  434. package/dist/assets/Agents-CClUUMUq.js +0 -3
  435. package/dist/assets/AppDetail-DfHLFOtj.js +0 -5
  436. package/dist/assets/AppLogo-CZr1Y48O.js +0 -1
  437. package/dist/assets/AppNotConnected-CcmXbFtD.js +0 -1
  438. package/dist/assets/ApprovalCard-uT_9D_uH.js +0 -1
  439. package/dist/assets/ApprovalDetail-CE41WFbd.js +0 -1
  440. package/dist/assets/ApprovalPayload-_zU9bukt.js +0 -1
  441. package/dist/assets/Approvals-BXrjqpKc.js +0 -1
  442. package/dist/assets/AppsConnect-DH7aSjtS.js +0 -1
  443. package/dist/assets/AppsReview-C0Y3SxmZ.js +0 -1
  444. package/dist/assets/ArtifactCard-DKUUBZ0K.js +0 -1
  445. package/dist/assets/Artifacts-Bsv5m0aU.js +0 -1
  446. package/dist/assets/AssistantConnection-Dm2PaSeU.js +0 -1
  447. package/dist/assets/AttentionInteractionResolver-CBjNuhYo.js +0 -1
  448. package/dist/assets/AuditHub-DbUni0O_.js +0 -1
  449. package/dist/assets/Auth-_P9t1YSS.js +0 -3
  450. package/dist/assets/BoardChat-CgzCuFIL.js +0 -18
  451. package/dist/assets/BoardClaim-CsomHmd6.js +0 -1
  452. package/dist/assets/BootstrapSetupUxLab-D-niQCV5.js +0 -1
  453. package/dist/assets/BreadcrumbContext-BVZDZoC0.js +0 -1
  454. package/dist/assets/Browse-0bmB5mqw.js +0 -1
  455. package/dist/assets/BudgetPolicyCard-CqFUHqOj.js +0 -1
  456. package/dist/assets/CaseDetail-DakrB2jI.js +0 -2
  457. package/dist/assets/CaseIdentifierKey-D8Xi16PS.js +0 -1
  458. package/dist/assets/Cases-DXbr4HJt.js +0 -2
  459. package/dist/assets/ChatEndpointDetail-BdDKo-Gq.js +0 -5
  460. package/dist/assets/ChatEndpointSetup-BX3iDH7N.js +0 -1
  461. package/dist/assets/ChatIdentityConfirm-DCI5BnWo.js +0 -1
  462. package/dist/assets/ChoiceControls-Bu-fd6qI.js +0 -1
  463. package/dist/assets/CliAuth-CRG0c0EH.js +0 -1
  464. package/dist/assets/CommentAttributionChip-fz5Mn0RW.js +0 -1
  465. package/dist/assets/Companies-FcUNLIkt.js +0 -1
  466. package/dist/assets/CompanyAccess-BUcTNg7_.js +0 -1
  467. package/dist/assets/CompanyActivity-ScpRBz1G.js +0 -1
  468. package/dist/assets/CompanyConnections-DMEwbZv7.js +0 -1
  469. package/dist/assets/CompanyContext-CSrVsSze.js +0 -1
  470. package/dist/assets/CompanyEnvironments-EqXhVruZ.js +0 -3
  471. package/dist/assets/CompanyExport-DQ9ffuua.js +0 -4
  472. package/dist/assets/CompanyImport-BhuZu4oc.js +0 -1
  473. package/dist/assets/CompanySettings-BSkg4ahA.js +0 -1
  474. package/dist/assets/CompanySettingsPluginPage-BzZkZqh-.js +0 -1
  475. package/dist/assets/CompanySkills-BbA4RKIw.js +0 -10
  476. package/dist/assets/ComposerAddMenu-D9z2INup.js +0 -3
  477. package/dist/assets/ConfigureBuiltInAgentModal-BUJPbmWc.js +0 -1
  478. package/dist/assets/ConnectionSetupFlow-DKjP5RBZ.js +0 -40
  479. package/dist/assets/CopyText-Cr673_Kx.js +0 -1
  480. package/dist/assets/CopyableGatewayUrl-BZyE_jT9.js +0 -1
  481. package/dist/assets/CrossIssueCollaborationUxLab-CEh5B2iJ.js +0 -1
  482. package/dist/assets/Dashboard--lTwxjV-.js +0 -2
  483. package/dist/assets/DashboardLive-BYyTgF5d.js +0 -1
  484. package/dist/assets/DecisionDateChips-vXwAFdua.js +0 -1
  485. package/dist/assets/DecisionModelSettings-NrNERkaW.js +0 -1
  486. package/dist/assets/DecisionQueuePage-BaaKuZBi.js +0 -1
  487. package/dist/assets/DesignGuide-DS6MuXWY.js +0 -23
  488. package/dist/assets/DocumentFrameHeader-DTSqcw4Q.js +0 -1
  489. package/dist/assets/EmailConnectionAccess-DAFMofYX.js +0 -1
  490. package/dist/assets/EmailEndpointSetup-CJFYu2G0.js +0 -1
  491. package/dist/assets/EnforcementBanner-DWPluRU0.js +0 -1
  492. package/dist/assets/EntityRow-BIfupmlZ.js +0 -1
  493. package/dist/assets/ExecutionWorkspaceDetail-CuD5xWOB.js +0 -19
  494. package/dist/assets/FilterBar-5ta25FCb.js +0 -1
  495. package/dist/assets/FoldCurtain-DUAOdtCt.js +0 -1
  496. package/dist/assets/FolderControls-B7TWghGc.js +0 -1
  497. package/dist/assets/GatewayDetail-xNVOxSIs.js +0 -2
  498. package/dist/assets/GatewaysList-DsSKLm1h.js +0 -1
  499. package/dist/assets/GoalDetail-oN5pyUUY.js +0 -1
  500. package/dist/assets/GoalTree-DaFizciF.js +0 -1
  501. package/dist/assets/Goals-xgGKfQZi.js +0 -1
  502. package/dist/assets/Identity-Cv_2a9qJ.js +0 -1
  503. package/dist/assets/ImageGalleryModal-CjHED0Lb.js +0 -1
  504. package/dist/assets/Inbox-wHhHozfr.js +0 -2
  505. package/dist/assets/InlineBanner-VQ5mstsR.js +0 -1
  506. package/dist/assets/InlineEditor-BKBqNA21.js +0 -1
  507. package/dist/assets/InlineEntitySelector-v2Q4C8oT.js +0 -1
  508. package/dist/assets/InstanceAccess-Ns2rAmva.js +0 -1
  509. package/dist/assets/InstanceAdvanced-Bdf2a4c_.js +0 -1
  510. package/dist/assets/InstanceFeatures-DUQnBkxy.js +0 -1
  511. package/dist/assets/InviteLanding-McBYpNeW.js +0 -1
  512. package/dist/assets/IssueChatLongThreadPerf-DD3RLbBo.js +0 -2
  513. package/dist/assets/IssueChatThread-BN-_8hT8.js +0 -40
  514. package/dist/assets/IssueDetail-CsaD311l.js +0 -9
  515. package/dist/assets/IssueDocumentAnnotations-BVdH4RTa.js +0 -2
  516. package/dist/assets/IssueOutputSection-CDIMRaF0.js +0 -1
  517. package/dist/assets/IssueRecoveryActionCard-C9qJAHes.js +0 -1
  518. package/dist/assets/IssueReferenceActivitySummary-CbpSjmdV.js +0 -1
  519. package/dist/assets/IssueReferencePill-DAEplgLd.js +0 -1
  520. package/dist/assets/IssueThreadInteractionCard-BbigJB2U.js +0 -9
  521. package/dist/assets/IssueWriteDenialNotice-BCJ74Czu.js +0 -1
  522. package/dist/assets/Issues-BWoc80Y9.js +0 -3
  523. package/dist/assets/JoinRequestQueue-ZZq3jWW-.js +0 -1
  524. package/dist/assets/JsonSchemaForm-ixDd6e-N.js +0 -1
  525. package/dist/assets/LiveNowTodoLine-B9oTH2L0.js +0 -1
  526. package/dist/assets/ManagedAiConnectionDetails-B0aWUPkf.js +0 -1
  527. package/dist/assets/MarkdownBody-BTjuUgFa.js +0 -16
  528. package/dist/assets/MarkdownEditor-DXD-Cu3u.js +0 -85
  529. package/dist/assets/McpConnect-Dzf7W2K6.js +0 -1
  530. package/dist/assets/MembershipAction-oiLtxQm3.js +0 -1
  531. package/dist/assets/MetricCard-DaAh5x_N.js +0 -1
  532. package/dist/assets/MissingPluginTabPlaceholder-DT47WyQq.js +0 -1
  533. package/dist/assets/ModelsAndProviders-BEb4Z38S.js +0 -1
  534. package/dist/assets/MootMark-DZAfkwdv.js +0 -1
  535. package/dist/assets/NewAgent-C3MxIRJj.js +0 -1
  536. package/dist/assets/OmpAllSettings-DBtL1qDL.js +0 -1
  537. package/dist/assets/OpenwaGatewayManager-DH3bF7fa.js +0 -2
  538. package/dist/assets/PathInstructionsModal-D4GUYKIT.js +0 -1
  539. package/dist/assets/PipelineSettings-BcAtsehE.js +0 -2
  540. package/dist/assets/Pipelines-CkiYUQS-.js +0 -1
  541. package/dist/assets/PixelsOffice-BSlctoug.js +0 -2
  542. package/dist/assets/PluginManager-4rrrAOLG.js +0 -1
  543. package/dist/assets/PluginPage-C6Qnf9ka.js +0 -1
  544. package/dist/assets/PluginSettings-Do37r6Zu.js +0 -1
  545. package/dist/assets/ProfileDetailRoute-DRFQNId6.js +0 -1
  546. package/dist/assets/ProfileSettings-BMwLBQDB.js +0 -1
  547. package/dist/assets/ProfileWizardRoute-XnnvzH9S.js +0 -1
  548. package/dist/assets/ProjectDetail-BW6Lr4Iq.js +0 -1
  549. package/dist/assets/ProjectWorkspaceDetail-DR4JCa1b.js +0 -29
  550. package/dist/assets/ProjectWorkspacesContent-CadPZn0k.js +0 -1
  551. package/dist/assets/Projects-DLBFbxcj.js +0 -1
  552. package/dist/assets/PublicIssueSharePage-C9yRZOdP.js +0 -1
  553. package/dist/assets/QuestionForm-B8-PWz3B.js +0 -7
  554. package/dist/assets/QuotaBar-_ok6Pek4.js +0 -1
  555. package/dist/assets/RepositoryEditor-CFt-HPgf.js +0 -1
  556. package/dist/assets/ResponsibleUserDenialNotice-DKNk1-BK.js +0 -1
  557. package/dist/assets/ResponsibleUserDenialUxLab-Bt9vnHJz.js +0 -1
  558. package/dist/assets/ReviewQueueCard-CIkiY-Lm.js +0 -1
  559. package/dist/assets/RichWorkProductCard-JGHGU_RI.js +0 -1
  560. package/dist/assets/RoutineActivityRow-B69N6Hcy.js +0 -1
  561. package/dist/assets/RoutineDetail-izWzADvA.js +0 -2
  562. package/dist/assets/RoutineRunVariablesDialog-DiT_o5Dm.js +0 -1
  563. package/dist/assets/RoutineVariablesEditor-0dQ10yPY.js +0 -1
  564. package/dist/assets/Routines-CHtabiYj.js +0 -1
  565. package/dist/assets/ScrollToBottom-pyHLjOjY.js +0 -1
  566. package/dist/assets/Search-yNNB6kys.js +0 -1
  567. package/dist/assets/SearchableSelect-CIJ5K8ih.js +0 -1
  568. package/dist/assets/Secrets-BOyOk5BF.js +0 -4
  569. package/dist/assets/SetupWizard-C8qzkJn1.js +0 -1
  570. package/dist/assets/SidebarContext-CF3RWLxh.js +0 -1
  571. package/dist/assets/SidebarNavItem-DV9nmC7O.js +0 -1
  572. package/dist/assets/SkillBinaryFile-DNe-MmCv.js +0 -1
  573. package/dist/assets/SkillCardIcon-BTCafp8l.js +0 -2
  574. package/dist/assets/SkillSourceTree-M58QwBFF.js +0 -2
  575. package/dist/assets/SkillSources-Cw4PU-Bz.js +0 -2
  576. package/dist/assets/SkillStudio-Cj_M3ZJa.js +0 -9
  577. package/dist/assets/SourceTrustBadge-BZBQe5No.js +0 -1
  578. package/dist/assets/StatusCards-DaJdQUN5.js +0 -1
  579. package/dist/assets/StatusIcon-0GcYXDdN.js +0 -1
  580. package/dist/assets/SummarySlotCard-DlSmN6PL.js +0 -1
  581. package/dist/assets/TaskChatComposerTakeoverContext-BJAHPHve.js +0 -1
  582. package/dist/assets/TaskChatLab-CU5eA7nX.js +0 -11
  583. package/dist/assets/TaskChatMarker-wBVUFL3u.js +0 -2
  584. package/dist/assets/TaskChatProtocolCard-D-Dwy2EL.js +0 -1
  585. package/dist/assets/TaskChatThreadView-Crlf9I05.js +0 -4
  586. package/dist/assets/TaskDetailRelationsPanel-CkktN1EC.js +0 -1
  587. package/dist/assets/TaskTreeControls-B_ulMOi1.js +0 -3
  588. package/dist/assets/Terminal-Bo-WuezO.js +0 -1
  589. package/dist/assets/TerminalView-AkFY5bLC.js +0 -58
  590. package/dist/assets/ThemeContext-DYRUK81c.js +0 -1
  591. package/dist/assets/ThemeToggle-BWFlFnSX.js +0 -1
  592. package/dist/assets/ToastContext-DMdt9oTd.js +0 -1
  593. package/dist/assets/ToolsAdminGate-BI5-WYC3.js +0 -1
  594. package/dist/assets/TrustPresetSection-DTc1Rj4q.js +0 -1
  595. package/dist/assets/UserProfile-C6q55R0Q.js +0 -1
  596. package/dist/assets/WebhookUrlWarning-D0GLAS0A.js +0 -1
  597. package/dist/assets/WhatNeedsMe-1igJA4gL.js +0 -1
  598. package/dist/assets/WorkspaceRuntimeControls-T4YUoZvK.js +0 -1
  599. package/dist/assets/Workspaces-rtQKliW0.js +0 -1
  600. package/dist/assets/access-GAosX22P.js +0 -1
  601. package/dist/assets/activity-BVYJmFzR.js +0 -1
  602. package/dist/assets/activity-CB9AQzZO.js +0 -1
  603. package/dist/assets/activity-format-zP89NM00.js +0 -1
  604. package/dist/assets/adapter-display-registry-Bk0KWAHT.js +0 -1
  605. package/dist/assets/adapters-Dp0USyWg.js +0 -1
  606. package/dist/assets/agent-avatar-url-C-slYk2A.js +0 -1
  607. package/dist/assets/agent-config-primitives-BsZUnbf2.js +0 -1
  608. package/dist/assets/agentChats-CjHr739f.js +0 -1
  609. package/dist/assets/agents-DmlgUVso.js +0 -1
  610. package/dist/assets/alert-dialog-Blls2GnU.js +0 -1
  611. package/dist/assets/app-connect-policy-CUzbEnhU.js +0 -1
  612. package/dist/assets/archive-CTfe4zq5.js +0 -1
  613. package/dist/assets/archive-restore-DeLPtKS0.js +0 -1
  614. package/dist/assets/arrow-down-Dg4PKbmt.js +0 -1
  615. package/dist/assets/arrow-down-left-C8jhGqM0.js +0 -1
  616. package/dist/assets/arrow-left-Ce_LIut0.js +0 -1
  617. package/dist/assets/arrow-right-BL5kYtCZ.js +0 -1
  618. package/dist/assets/arrow-up-D_YoSnQD.js +0 -1
  619. package/dist/assets/arrow-up-down-Bpe9xqCo.js +0 -1
  620. package/dist/assets/arrow-up-right-BLYWl-we.js +0 -1
  621. package/dist/assets/artifacts-9HWeqVeB.js +0 -1
  622. package/dist/assets/assets-TRDkBfss.js +0 -1
  623. package/dist/assets/attachment-icon-4xDiQblX.js +0 -1
  624. package/dist/assets/avatar-UO226cef.js +0 -1
  625. package/dist/assets/badge-DuA2EgZC.js +0 -1
  626. package/dist/assets/badge-check-Bd7IYIB2.js +0 -1
  627. package/dist/assets/bot-C9arfJWx.js +0 -1
  628. package/dist/assets/boxes-fV98p9-r.js +0 -1
  629. package/dist/assets/braces-BEVhwPeU.js +0 -1
  630. package/dist/assets/browser-use-D2HTf8rD.js +0 -1
  631. package/dist/assets/budgets-DvML2uxG.js +0 -1
  632. package/dist/assets/button-CMwV3L1P.js +0 -1
  633. package/dist/assets/calendar-clock-BVFltraz.js +0 -1
  634. package/dist/assets/card-Bru3x_SJ.js +0 -1
  635. package/dist/assets/cases-m9RZ5Cym.js +0 -1
  636. package/dist/assets/chatEndpoints-BKsIHowE.js +0 -1
  637. package/dist/assets/check-Ctsrlfa-.js +0 -1
  638. package/dist/assets/checkbox-BHQhs41k.js +0 -1
  639. package/dist/assets/chevron-down-BCvxsWfI.js +0 -1
  640. package/dist/assets/chevron-left-DP4zwC0G.js +0 -1
  641. package/dist/assets/chevron-right-s7L6hXXq.js +0 -1
  642. package/dist/assets/chevron-up-rFDQGA-7.js +0 -1
  643. package/dist/assets/chip-DsDe6yck.js +0 -1
  644. package/dist/assets/circle-IAHLDvLO.js +0 -1
  645. package/dist/assets/circle-alert-C-L4OsHh.js +0 -1
  646. package/dist/assets/circle-dot-zr8GONq2.js +0 -1
  647. package/dist/assets/circle-question-mark-B1jR2is9.js +0 -1
  648. package/dist/assets/circle-slash-Bx5HrFMb.js +0 -1
  649. package/dist/assets/circle-x-CFlSbYzD.js +0 -1
  650. package/dist/assets/clipboard-paste-D9rNPVFj.js +0 -1
  651. package/dist/assets/clock-CzrJT_cP.js +0 -1
  652. package/dist/assets/cloud-BktKFMPI.js +0 -1
  653. package/dist/assets/code-xml-BWc3OvMt.js +0 -1
  654. package/dist/assets/coins-C6QoCoLN.js +0 -1
  655. package/dist/assets/collapsible-CqjPlqOa.js +0 -1
  656. package/dist/assets/columns-3-CqC5nP-p.js +0 -1
  657. package/dist/assets/command-Ca3v36Mu.js +0 -5
  658. package/dist/assets/companies-query-D9PxIiMT.js +0 -1
  659. package/dist/assets/connection-identity-YKZfppDS.js +0 -1
  660. package/dist/assets/connection-owner-CZwxTEuM.js +0 -1
  661. package/dist/assets/copy-_wvZOjTe.js +0 -1
  662. package/dist/assets/createLucideIcon-DJi9suAC.js +0 -94
  663. package/dist/assets/decision-models-CD2AFC2a.js +0 -1
  664. package/dist/assets/dialog-CKUblzlR.js +0 -1
  665. package/dist/assets/dist-BNOqBr2U.js +0 -1
  666. package/dist/assets/dist-Bm2igrAN.js +0 -1
  667. package/dist/assets/dist-BuHnL0GV.js +0 -1
  668. package/dist/assets/dist-CClcSLHe.js +0 -1
  669. package/dist/assets/dist-CtvMIwRC.js +0 -1
  670. package/dist/assets/dist-CvHBQVAC.js +0 -1
  671. package/dist/assets/dist-DC4EOH0g.js +0 -1
  672. package/dist/assets/dist-DMg_vOQs.js +0 -1
  673. package/dist/assets/dist-DOIzg2vq.js +0 -1
  674. package/dist/assets/dist-DTFX_1D6.js +0 -1
  675. package/dist/assets/dist-DcOFbG-W.js +0 -1
  676. package/dist/assets/dist-SzpVz8Pd.js +0 -1
  677. package/dist/assets/dropdown-menu-CqRAF7Oj.js +0 -1
  678. package/dist/assets/ellipsis-BTiLRUn4.js +0 -1
  679. package/dist/assets/ellipsis-vertical-DWXPf6Ow.js +0 -1
  680. package/dist/assets/email-BNu4jmOH.js +0 -1
  681. package/dist/assets/environment-variables-editor-CCxeFKKk.js +0 -1
  682. package/dist/assets/environments-BLQs1ScE.js +0 -1
  683. package/dist/assets/es2015-C3hhXnTu.js +0 -41
  684. package/dist/assets/external-link-nl1b263c.js +0 -1
  685. package/dist/assets/eye-DRS7RbEp.js +0 -1
  686. package/dist/assets/eye-off-CVVA-EWh.js +0 -1
  687. package/dist/assets/fast-responses-DZodQpLv.js +0 -1
  688. package/dist/assets/file-N19tC0jj.js +0 -1
  689. package/dist/assets/file-code-corner-CmZ_RihF.js +0 -1
  690. package/dist/assets/file-pen-line-DX6PZQXR.js +0 -1
  691. package/dist/assets/file-question-mark-CTomlKBX.js +0 -1
  692. package/dist/assets/file-search-DZpRLS-j.js +0 -1
  693. package/dist/assets/file-text-Cw7ntqRx.js +0 -1
  694. package/dist/assets/flag-R0AVTKGk.js +0 -1
  695. package/dist/assets/flask-conical-CEYKkO5k.js +0 -1
  696. package/dist/assets/folder-git-2-D2Hz-CeQ.js +0 -1
  697. package/dist/assets/folder-open-8WDYv4mw.js +0 -1
  698. package/dist/assets/folder-search-D0WkVTZt.js +0 -1
  699. package/dist/assets/funnel-DWwD2WCu.js +0 -1
  700. package/dist/assets/git-pull-request-CdCSG7CL.js +0 -1
  701. package/dist/assets/github-icon-Bbgf67tg.js +0 -1
  702. package/dist/assets/health-DF7yrggW.js +0 -1
  703. package/dist/assets/heartbeats-DOyojsaN.js +0 -1
  704. package/dist/assets/inbox-C08arfF_.js +0 -1
  705. package/dist/assets/inboxArchiveCache-D8QGdg49.js +0 -1
  706. package/dist/assets/index-DDoARkPG.js +0 -67
  707. package/dist/assets/index-KZ2bEg2H.css +0 -2
  708. package/dist/assets/info-DXpx_HA2.js +0 -1
  709. package/dist/assets/input-DobnTAyB.js +0 -1
  710. package/dist/assets/instanceSettings-D8g_QlS-.js +0 -1
  711. package/dist/assets/interaction-audience-BRS_4X7S.js +0 -1
  712. package/dist/assets/interaction-card-visibility-DcyO470L.js +0 -1
  713. package/dist/assets/issue-blockers-DLfa24KC.js +0 -1
  714. package/dist/assets/issue-filters-BO9xiK0c.js +0 -1
  715. package/dist/assets/issue-output-CU3gasZ1.js +0 -1
  716. package/dist/assets/issue-properties-lmRBaUTG.js +0 -4
  717. package/dist/assets/issue-share-j9E_vLuf.js +0 -1
  718. package/dist/assets/issue-workspace-selection-4JI2Uh9p.js +0 -1
  719. package/dist/assets/key-round-0RqEOB_C.js +0 -1
  720. package/dist/assets/label-BPz3pg9_.js +0 -1
  721. package/dist/assets/layout-dashboard-DClZjSaR.js +0 -1
  722. package/dist/assets/link-2-CND-9QZ2.js +0 -1
  723. package/dist/assets/link-BITB8yRp.js +0 -1
  724. package/dist/assets/list-filter-h7_mdWEH.js +0 -1
  725. package/dist/assets/list-todo-BmObdeVq.js +0 -1
  726. package/dist/assets/log-in-nSyhNjrD.js +0 -1
  727. package/dist/assets/maximize-2-DgliXYEr.js +0 -1
  728. package/dist/assets/mention-chips-D8856Q0_.js +0 -17
  729. package/dist/assets/message-square-plus-yRlSBxPl.js +0 -1
  730. package/dist/assets/minus-WOgDAWiC.js +0 -1
  731. package/dist/assets/model-fallback-X_YvC3rj.js +0 -1
  732. package/dist/assets/model-picker-fields-235ien8Z.js +0 -1
  733. package/dist/assets/network-RCsafDTP.js +0 -1
  734. package/dist/assets/octagon-alert-CeNhknXC.js +0 -1
  735. package/dist/assets/octagon-x-CBcXy1zJ.js +0 -1
  736. package/dist/assets/omp-settings-model-uqWvMNr2.js +0 -1
  737. package/dist/assets/package-CYC5MDhY.js +0 -1
  738. package/dist/assets/pause-CJSwJvLv.js +0 -1
  739. package/dist/assets/pen-line-CxWwoiP_.js +0 -1
  740. package/dist/assets/pipeline-stage-presentation-BSuBql6K.js +0 -2
  741. package/dist/assets/pipelines-vN196fc4.js +0 -1
  742. package/dist/assets/play-CJNuUj69.js +0 -1
  743. package/dist/assets/plug-VjpaJcMq.js +0 -1
  744. package/dist/assets/plugins-CF2QITJB.js +0 -1
  745. package/dist/assets/plus-C6fnr28l.js +0 -1
  746. package/dist/assets/popover-BhYHYj7q.js +0 -1
  747. package/dist/assets/power-B3xsPeS4.js +0 -1
  748. package/dist/assets/presentation-mode-Bk6TnKr9.js +0 -1
  749. package/dist/assets/profile-summary-unutni_7.js +0 -1
  750. package/dist/assets/projects-mixWrT5q.js +0 -1
  751. package/dist/assets/proposal-review-kucrRJgS.js +0 -1
  752. package/dist/assets/queryClient-BOli2vjj.js +0 -1
  753. package/dist/assets/queryKeys-DYV5MhM_.js +0 -1
  754. package/dist/assets/radio-DnDOdgWd.js +0 -1
  755. package/dist/assets/radio-card-DVZaXlw0.js +0 -1
  756. package/dist/assets/recent-agent-chats-DIU_z_qg.js +0 -1
  757. package/dist/assets/refresh-cw-B_Oki9wZ.js +0 -1
  758. package/dist/assets/repeat-DGPKlc5I.js +0 -1
  759. package/dist/assets/resizable-panels-Qjbo0P05.js +0 -1
  760. package/dist/assets/review-policy-BL48kYvb.js +0 -1
  761. package/dist/assets/rotate-ccw-CQEJ4ewP.js +0 -1
  762. package/dist/assets/rotate-cw-DnCrcS38.js +0 -1
  763. package/dist/assets/router-2UfGeejU.js +0 -1
  764. package/dist/assets/routines-KPtwxuS7.js +0 -1
  765. package/dist/assets/runRetryState-BdjK4QQj.js +0 -1
  766. package/dist/assets/save-CJ1Iqyew.js +0 -1
  767. package/dist/assets/schema-config-fields-DggSrP5S.js +0 -1
  768. package/dist/assets/scroll-area-P1KpIQWe.js +0 -1
  769. package/dist/assets/scroll-text-BpkOrME3.js +0 -1
  770. package/dist/assets/search-04O7m-IF.js +0 -1
  771. package/dist/assets/secrets-CZifgF0J.js +0 -1
  772. package/dist/assets/select-V0Hm_q4f.js +0 -1
  773. package/dist/assets/send-mNwfi_F1.js +0 -1
  774. package/dist/assets/separator-B2LFqBpM.js +0 -1
  775. package/dist/assets/server-DIhG4RDC.js +0 -1
  776. package/dist/assets/server-cog-DV4ua9lY.js +0 -1
  777. package/dist/assets/settings-DuZndeX2.js +0 -1
  778. package/dist/assets/shared-DDwmHbeD.js +0 -1
  779. package/dist/assets/sheet-jd7y5x4-.js +0 -1
  780. package/dist/assets/shield-BhaVQdWV.js +0 -1
  781. package/dist/assets/shield-alert-Be9GuMrS.js +0 -1
  782. package/dist/assets/shield-check-B0HVjzM_.js +0 -1
  783. package/dist/assets/shield-question-mark-D1_en6pn.js +0 -1
  784. package/dist/assets/shield-x-D-Ice3nf.js +0 -1
  785. package/dist/assets/sidebarPreferences-vEHBC54I.js +0 -1
  786. package/dist/assets/skeleton-Bv_lQagE.js +0 -1
  787. package/dist/assets/slots-Dw517dxP.js +0 -49
  788. package/dist/assets/smoke-lab-matrix-0BhnGQeo.js +0 -1
  789. package/dist/assets/square-B2aH51tE.js +0 -1
  790. package/dist/assets/star-BZgQbzhV.js +0 -15
  791. package/dist/assets/sun-_NIddwh7.js +0 -1
  792. package/dist/assets/system-notice-comment-CL_SWj_f.js +0 -1
  793. package/dist/assets/tabs-B2Os_leL.js +0 -1
  794. package/dist/assets/task-chat-attachments-jZNCAKd4.js +0 -10
  795. package/dist/assets/terminal-C0CKe_Zz.js +0 -1
  796. package/dist/assets/textarea-BRPEfJ-g.js +0 -1
  797. package/dist/assets/thumbs-down-C2BkjZOy.js +0 -1
  798. package/dist/assets/thumbs-up-OW2IsTL7.js +0 -1
  799. package/dist/assets/toggle-switch-BHxNtSq9.js +0 -1
  800. package/dist/assets/tool-taxonomy-DR7Q8sVs.js +0 -1
  801. package/dist/assets/tools-B-L_sU_9.js +0 -1
  802. package/dist/assets/tooltip-B5WQ3lq5.js +0 -1
  803. package/dist/assets/transcript-adapter-wiFIjKfq.js +0 -5
  804. package/dist/assets/trash-D7zTaHTj.js +0 -1
  805. package/dist/assets/triangle-alert-CBVKiaXB.js +0 -1
  806. package/dist/assets/use-adapter-capabilities-Bu8XkVZ9.js +0 -1
  807. package/dist/assets/use-copy-action-D5dEzo6L.js +0 -1
  808. package/dist/assets/useAgentChatEnabled-Chi_JXJj.js +0 -1
  809. package/dist/assets/useAutosaveIndicator-DttGFwx7.js +0 -1
  810. package/dist/assets/useHiddenSettings-CcaZfHLD.js +0 -1
  811. package/dist/assets/useInfiniteQuery-B28xptxn.js +0 -1
  812. package/dist/assets/useInstanceFeatureSettings-CEK6Xn3o.js +0 -1
  813. package/dist/assets/useManagedSandboxOnly-CO01cDK4.js +0 -1
  814. package/dist/assets/useMobileEntityPickerViewportStyle-C3R37KtS.js +0 -1
  815. package/dist/assets/usePrefersReducedMotion-Dw81-akd.js +0 -1
  816. package/dist/assets/useProfilesData-2L3_71Ql.js +0 -1
  817. package/dist/assets/useQueries-BIJ7zVTy.js +0 -1
  818. package/dist/assets/useSecondTick-Gige2l0t.js +0 -1
  819. package/dist/assets/useSharedPolling-D4Xn8mY2.js +0 -1
  820. package/dist/assets/useSummaryDraftStream-CWOQt25o.js +0 -3
  821. package/dist/assets/user-Ccom_Ph0.js +0 -1
  822. package/dist/assets/user-check-BoBa1Xs_.js +0 -1
  823. package/dist/assets/user-minus-B4F-9ccK.js +0 -1
  824. package/dist/assets/user-round-CGxsJ0K8.js +0 -1
  825. package/dist/assets/user-x-CRO9YVVi.js +0 -1
  826. package/dist/assets/users-DyKzwIh4.js +0 -1
  827. package/dist/assets/wand-sparkles-BqnbLKl3.js +0 -1
  828. package/dist/assets/webhook-BVBCKjlU.js +0 -1
  829. package/dist/assets/x-DRDFdlYE.js +0 -1
@@ -0,0 +1 @@
1
+ var y=Object.defineProperty;var v=(n,r)=>y(n,"name",{value:r,configurable:!0});import{i as z}from"./rolldown-runtime-ZpX3ckPj.js";import{l as e,ta as E}from"./createLucideIcon-Dp_BESPI.js";import{t as F}from"./router-qrDA_fDm.js";var s=z(E(),1);function A({leading:n,identifier:r,title:m,titleAccessory:g,subtitle:i,meta:t,metaSpacerClassName:N,trailing:x,selected:b,to:a,onClick:c,className:k,titleClassName:u,titleTextClassName:d,subtitleClassName:o,reserveSubtitleSpace:w,titlePriority:h,secondaryRow:l,secondaryRowClassName:_}){const p=e(l?"block":"flex items-center gap-3","px-4 py-2 text-sm border-b border-line last:border-b-0 transition-colors",!!(a||c)&&"cursor-pointer hover:bg-bg-3/50",b&&"bg-bg-3/30",k),j=(0,s.jsxs)(s.Fragment,{children:[n&&(0,s.jsx)("div",{className:"flex items-center gap-2 shrink-0",children:n}),(0,s.jsxs)("div",{className:e(h?"min-w-(--sz-6rem)":"min-w-0",!t&&"flex-1",u),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[r&&(0,s.jsx)("span",{className:"text-xs text-ink-3 font-mono shrink-0 relative top-(--sz-1px)",children:r}),(0,s.jsx)("span",{className:e(!d&&"truncate",d),title:m,children:m}),g]}),(i||w)&&(0,s.jsx)("p",{className:e("text-xs text-ink-3 mt-0.5 min-h-4",!o&&"truncate",o,!i&&"invisible"),"aria-hidden":!i,children:i})]}),t&&(0,s.jsx)("div",{className:e("flex items-center gap-2",h?"min-w-0 shrink":"shrink-0"),children:t}),t&&(0,s.jsx)("div",{className:e("flex-1",N)}),x&&(0,s.jsx)("div",{"data-slot":"entity-row-trailing",className:"flex items-center gap-2 shrink-0",children:x})]}),f=l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{"data-slot":"entity-row-main",className:"flex items-center gap-3",children:j}),(0,s.jsx)("div",{className:e("mt-1 pl-5",_),children:l})]}):j;return a?(0,s.jsx)(F,{to:a,"data-slot":"entity-row",className:e("no-underline text-inherit",p),onClick:c,children:f}):(0,s.jsx)("div",{"data-slot":"entity-row",className:p,onClick:c,children:f})}v(A,"EntityRow");export{A as t};
@@ -0,0 +1,19 @@
1
+ var ms=Object.defineProperty;var r=(s,n)=>ms(s,"name",{value:n,configurable:!0});import{i as $e}from"./rolldown-runtime-ZpX3ckPj.js";import{C as ps,S as xs,T as hs,Ui as fs,Zn as gs,h as L,l as S,na as js,ta as vs}from"./createLucideIcon-Dp_BESPI.js";import{h as bs,v as ks}from"./star-CpH09lE0.js";import{X as Re,_ as le,t as x,v as P}from"./queryKeys-Sk0U6x0H.js";import{a as ys,i as ws,r as Ns,t as Rs}from"./WorkspaceRuntimeControls-C-Iz5m02.js";import{n as Cs}from"./CompanyContext-dsHNbwL5.js";import{o as Is,r as Ss,t as Y,zt as ke}from"./router-qrDA_fDm.js";import{t as Ws}from"./tabs-BeNCSQfH.js";import{o as Ps,r as _s,t as Es}from"./popover-CgIDA573.js";import{t as As}from"./check-Cn0uuQ_e.js";import{t as Ts}from"./chevron-down-DA6rxxgD.js";import{t as Ce}from"./copy-B9wRjKte.js";import{t as ye}from"./external-link-dcZMvrBY.js";import{r as ue,t as N}from"./button-bS07vQAg.js";import{t as we}from"./play-BbPL3U2Z.js";import{t as Fs}from"./repeat-CC7VfEiF.js";import{t as De}from"./rotate-ccw-C_1vZuhL.js";import{t as Ls}from"./square-CxemVvLC.js";import{t as Ve}from"./triangle-alert-2xDDaXgc.js";import{a as qs}from"./ToastContext-Brs-4k-1.js";import{t as Je}from"./agents-B46GLJqX.js";import{t as Os}from"./heartbeats-Do5AjDtr.js";import{n as Us,t as Bs}from"./useSharedPolling-SqFIqyK_.js";import{t as Ks}from"./projects-oY9VYW38.js";import{t as U}from"./input-Cq0iBDAN.js";import{n as Ds,o as Ms,t as zs}from"./slots-CoW6zbG2.js";import{t as Me}from"./routines-CJdlnuen.js";import{n as Qs}from"./BreadcrumbContext-BKgeE2st.js";import{t as $}from"./textarea-BCpiepe1.js";import{t as $s}from"./clipboard-CTLKYvRL.js";import{i as H,n as Vs,o as G,r as B,s as X,t as K}from"./card-BdxT61BL.js";import{G as Js,gr as Hs,hr as V,oi as Gs,r as Xs}from"./index-CUNTJ_RK.js";import{t as ae}from"./separator-BidXiA6w.js";import{t as Zs}from"./useManagedSandboxOnly-mYadyWYh.js";import{t as He}from"./CopyText-_f1fNkU9.js";import{n as Ys,t as en}from"./SummarySlotCard-DrD7ZUGg.js";import{t as sn}from"./MissingPluginTabPlaceholder-DzxTVHCm.js";import{t as nn}from"./RoutineRunVariablesDialog-DswRuGZ9.js";var h=$e(js(),1),e=$e(vs(),1),tn=["provisioning","starting","stopping","restarting"];function Ie(s){return tn.includes(s)}r(Ie,"isTransitional");function Ge(s){return s?s.replace(/^https?:\/\//,"").replace(/\/$/,""):null}r(Ge,"formatServiceUrl");function Xe(s){switch(s.state){case"provisioning":return{label:"Provisioning…",unhealthy:!1};case"starting":return{label:"Starting…",unhealthy:!1};case"stopping":return{label:"Stopping…",unhealthy:!1};case"restarting":return{label:"Restarting…",unhealthy:!1};case"failed":return{label:"Failed",unhealthy:!1};case"running":return s.healthStatus==="unhealthy"?{label:"Unhealthy",unhealthy:!0}:{label:"Running",unhealthy:!1};default:return{label:"Stopped",unhealthy:!1}}}r(Xe,"statusMeta");function Se({entry:s,className:n}){if(Ie(s.state))return(0,e.jsx)(ue,{className:S("size-3 shrink-0 animate-spin text-ink-3",n)});if(s.state==="failed")return(0,e.jsx)(Ve,{className:S("size-3 shrink-0 text-bad",n)});const a=s.state==="running"&&s.healthStatus==="unhealthy";return(0,e.jsx)("span",{className:S("size-2 shrink-0 rounded-full",s.state==="running"?a?"bg-amber-500 ring-2 ring-amber-500/30":"bg-emerald-500":"border border-ink-3/60 bg-transparent",n)})}r(Se,"StatusIndicator");function Ze({url:s,disabled:n}){const[a,o]=(0,h.useState)("idle"),d=(0,h.useRef)(null);(0,h.useEffect)(()=>()=>{d.current&&clearTimeout(d.current)},[]);const c=a==="copied"?"URL copied":a==="failed"?"Copy failed":"Copy URL";return(0,e.jsxs)(N,{variant:"ghost",size:"icon-xs",disabled:n,"aria-label":c,title:c,onClick:r(async()=>{try{await $s(s),o("copied")}catch{o("failed")}d.current&&clearTimeout(d.current),d.current=setTimeout(()=>o("idle"),1500)},"onClick"),children:[a==="copied"?(0,e.jsx)(As,{className:"size-3"}):a==="failed"?(0,e.jsx)(Ve,{className:"size-3 text-bad"}):(0,e.jsx)(Ce,{className:"size-3"}),(0,e.jsx)("span",{className:"sr-only","aria-live":"polite",children:c})]})}r(Ze,"CopyUrlButton");function ce({entry:s,compact:n}){const a=Ge(s.url)??(s.port?`:${s.port}`:null),o=s.state==="running"&&!!s.url;return a?(0,e.jsxs)(e.Fragment,{children:[o?(0,e.jsx)("a",{href:s.url??void 0,target:"_blank",rel:"noreferrer",title:s.url??void 0,className:S("min-w-0 truncate font-mono text-xs text-ink hover:underline",n?"max-w-44":"max-w-56"),children:a}):(0,e.jsx)("span",{title:s.url??void 0,className:S("min-w-0 truncate font-mono text-xs text-ink-3/70",n?"max-w-44":"max-w-56"),children:a}),(0,e.jsxs)("span",{className:S("flex items-center",o?null:"invisible"),"aria-hidden":o?void 0:!0,children:[(0,e.jsx)(Ze,{url:s.url??"",disabled:!o}),(0,e.jsx)(N,{asChild:o,variant:"ghost",size:"icon-xs",disabled:!o,title:"Open in new tab",children:o?(0,e.jsx)("a",{href:s.url??void 0,target:"_blank",rel:"noreferrer","aria-label":"Open in new tab",children:(0,e.jsx)(ye,{className:"size-3"})}):(0,e.jsx)(ye,{className:"size-3"})})]})]}):(0,e.jsx)("span",{className:"font-mono text-xs text-ink-3/70",children:"no url"})}r(ce,"UrlSegment");function We({entry:s,onAction:n}){const a=Ie(s.state),o=s.canStart??!0;return s.state==="stopped"?(0,e.jsxs)(N,{variant:"primary",size:"xs",className:"w-13 justify-center",disabled:!o,onClick:r(()=>n("start"),"onClick"),"aria-label":"Start",title:"Start",children:[(0,e.jsx)(we,{className:"size-3"}),"Start"]}):s.state==="failed"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(N,{variant:"primary",size:"icon-xs",disabled:!o,onClick:r(()=>n("start"),"onClick"),"aria-label":"Start",title:"Start",children:(0,e.jsx)(we,{className:"size-3"})}),(0,e.jsx)(N,{variant:"ghost",size:"icon-xs",disabled:!o,onClick:r(()=>n("restart"),"onClick"),"aria-label":"Restart",title:"Restart",className:"border",children:(0,e.jsx)(De,{className:"size-3"})})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(N,{variant:"ghost",size:"icon-xs",disabled:a,onClick:r(()=>n("stop"),"onClick"),"aria-label":"Stop",title:"Stop",className:"border",children:(0,e.jsx)(Ls,{className:"size-3"})}),(0,e.jsx)(N,{variant:"ghost",size:"icon-xs",disabled:a||!o,onClick:r(()=>n("restart"),"onClick"),"aria-label":"Restart",title:"Restart",className:"border",children:(0,e.jsx)(De,{className:"size-3"})})]})}r(We,"ActionSlots");function rn({entry:s,onViewLogs:n}){const a=s.exposureDetail??(s.state==="failed"?s.failureDetail:null);if(!a)return null;const o=s.exposureState==="failed"||s.exposureState==="cleanup_pending";return(0,e.jsxs)("div",{className:S("flex items-center gap-1 text-xs",o?"text-bad":"text-ink-3"),children:[(0,e.jsx)("span",{children:a}),n&&s.state==="failed"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,e.jsx)("button",{type:"button",onClick:n,className:"font-medium text-ink underline underline-offset-2 hover:text-ink/80",children:"View logs"})]}):null]})}r(rn,"ServiceDetail");function an({entry:s,onAction:n,onViewLogs:a,className:o}){const d=Xe(s);return(0,e.jsxs)("div",{className:S("flex w-full flex-col items-stretch gap-1 sm:w-auto sm:items-end",o),children:[(0,e.jsxs)("div",{className:"rounded-lg border border-line bg-bg",children:[(0,e.jsxs)("div",{className:"flex h-9 items-center pl-3 pr-1.5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 sm:min-w-24",children:[(0,e.jsx)(Se,{entry:s}),(0,e.jsx)("span",{className:"whitespace-nowrap text-xs font-medium text-ink",children:d.label})]}),(0,e.jsx)("div",{className:"mx-3 hidden h-5 w-px bg-line sm:block"}),(0,e.jsx)("div",{className:"hidden w-56 min-w-0 shrink-0 items-center gap-0.5 sm:flex",children:(0,e.jsx)(ce,{entry:s})}),(0,e.jsx)("div",{className:"mx-3 hidden h-5 w-px bg-line sm:block"}),(0,e.jsx)("div",{className:"ml-auto flex items-center gap-1 pl-3 sm:pl-0",children:(0,e.jsx)(We,{entry:s,onAction:r(c=>n(c,s.key),"onAction")})})]}),(0,e.jsx)("div",{className:"flex h-8 items-center justify-between gap-0.5 border-t border-line px-3 sm:hidden",children:(0,e.jsx)(ce,{entry:s,compact:!0})})]}),(0,e.jsx)(rn,{entry:s,onViewLogs:a})]})}r(an,"SingleServiceBar");function on({entry:s,onAction:n}){const a=Xe(s),o=Ge(s.url),d=s.state==="running"&&!!s.url,c=s.exposureState==="failed"||s.exposureState==="cleanup_pending",u=s.exposureDetail?s.exposureDetail:d?o:s.state==="starting"&&s.port?`starting on :${s.port}…`:s.state==="failed"&&s.failureDetail?s.failureDetail:`${a.label.toLowerCase().replace(/…$/,"")}${s.port?` · :${s.port}`:""}`;return(0,e.jsxs)("div",{className:"flex items-center gap-3 py-2.5",children:[(0,e.jsx)(Se,{entry:s,className:"mt-0.5"}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("div",{className:"truncate text-sm font-medium text-ink",children:s.name}),(0,e.jsx)("div",{className:"flex min-w-0 items-center gap-0.5",children:d&&s.url?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("a",{href:s.url,target:"_blank",rel:"noreferrer",title:s.url,className:"min-w-0 truncate font-mono text-xs text-ink-3 hover:text-ink hover:underline",children:o}),(0,e.jsx)(Ze,{url:s.url})]}):(0,e.jsx)("span",{className:S("min-w-0 text-xs",c?"whitespace-normal break-words text-bad":"truncate text-ink-3"),children:u})})]}),(0,e.jsx)("div",{className:"flex shrink-0 items-center gap-1",children:(0,e.jsx)(We,{entry:s,onAction:r(v=>n(v,s.key),"onAction")})})]})}r(on,"ServicePopoverRow");function ln({services:s,onAction:n,onManageServices:a,defaultServicesOpen:o,className:d}){const[c,u]=(0,h.useState)(o??!1),v=s.filter(f=>f.state==="running").length,k=s.some(f=>Ie(f.state)),y=s.some(f=>f.state==="failed"),m=v>0,p=s.find(f=>f.state==="running"&&f.url)??null,_={key:"__all__",name:"All services",state:k?"starting":y?"failed":m?"running":"stopped",healthStatus:s.some(f=>f.state==="running"&&f.healthStatus==="unhealthy")?"unhealthy":"healthy"};return(0,e.jsx)("div",{className:S("flex w-full flex-col items-stretch gap-1 sm:w-auto sm:items-end",d),children:(0,e.jsxs)("div",{className:"rounded-lg border border-line bg-bg",children:[(0,e.jsxs)("div",{className:"flex h-9 items-center pl-3 pr-1.5",children:[(0,e.jsxs)(Es,{open:c,onOpenChange:u,children:[(0,e.jsx)(Ps,{asChild:!0,children:(0,e.jsxs)("button",{type:"button",className:"flex h-full items-center gap-2 rounded-l-lg pr-1 text-xs font-medium text-ink hover:bg-bg-3","aria-label":`${v} of ${s.length} services running — show services`,children:[(0,e.jsx)(Se,{entry:_}),(0,e.jsxs)("span",{className:"whitespace-nowrap",children:[v,"/",s.length," running"]}),(0,e.jsx)(Ts,{className:"size-3 text-ink-3"})]})}),(0,e.jsxs)(_s,{align:"end",className:"w-96 p-0",onOpenAutoFocus:r(f=>f.preventDefault(),"onOpenAutoFocus"),children:[(0,e.jsxs)("div",{className:"px-4 pb-1 pt-3 text-xs font-medium uppercase tracking-wide text-ink-3",children:["Services · ",s.length]}),(0,e.jsx)("div",{className:"divide-y divide-line px-4",children:s.map(f=>(0,e.jsx)(on,{entry:f,onAction:n},f.key))}),(0,e.jsxs)("div",{className:"flex items-center gap-1 border-t border-line px-4 py-2",children:[(0,e.jsx)(N,{variant:"ghost",size:"xs",onClick:r(()=>n("start",null),"onClick"),children:"Start all"}),(0,e.jsx)(N,{variant:"ghost",size:"xs",onClick:r(()=>n("stop",null),"onClick"),children:"Stop all"}),(0,e.jsx)(N,{variant:"ghost",size:"xs",onClick:r(()=>n("restart",null),"onClick"),children:"Restart all"}),a?(0,e.jsx)(N,{variant:"link",size:"xs",className:"ml-auto",onClick:a,children:"Manage in Services tab →"}):null]})]})]}),(0,e.jsx)("div",{className:"mx-3 hidden h-5 w-px bg-line sm:block"}),(0,e.jsx)("div",{className:"hidden min-w-0 items-center gap-0.5 sm:flex",children:p?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{className:"mr-1 shrink-0 text-xs text-ink-3",children:p.name}),(0,e.jsx)(ce,{entry:p})]}):(0,e.jsx)("span",{className:"font-mono text-xs text-ink-3/70",children:"no url"})}),(0,e.jsx)("div",{className:"mx-3 hidden h-5 w-px bg-line sm:block"}),(0,e.jsx)("div",{className:"ml-auto flex items-center gap-1 pl-3 sm:pl-0",children:(0,e.jsx)(We,{entry:{state:_.state,canStart:!0},onAction:r(f=>n(f,null),"onAction")})})]}),p?(0,e.jsx)("div",{className:"flex h-8 items-center justify-between gap-0.5 border-t border-line px-3 sm:hidden",children:(0,e.jsx)(ce,{entry:p,compact:!0})}):null]})})}r(ln,"MultiServiceBar");function cn({services:s,onAction:n,onViewLogs:a,onManageServices:o,defaultServicesOpen:d,className:c}){return s.length===0?null:s.length===1?(0,e.jsx)(an,{entry:s[0],onAction:n,onViewLogs:a,className:c}):(0,e.jsx)(ln,{services:s,onAction:n,onManageServices:o,defaultServicesOpen:d,className:c})}r(cn,"WorkspaceServiceControlBar");var ze=new Set([fs]);function Ye(s){const n=new Set;for(const a of s.variables)ze.has(a.name)&&n.add(a.name);for(const a of gs([s.title,s.description]))ze.has(a)&&n.add(a);return[...n]}r(Ye,"getWorkspaceSpecificRoutineVariableNames");function dn(s){return Ye(s).length>0}r(dn,"routineHasWorkspaceSpecificVariables");function un(s){return[...s].sort((n,a)=>{const o=n.title.localeCompare(a.title,void 0,{sensitivity:"base"});return o!==0?o:n.id.localeCompare(a.id)})}r(un,"sortWorkspaceRoutinesByName");var mn=100,pn=[{value:"issues",label:"Tasks",order:10},{value:"services",label:"Services",order:20},{value:"configuration",label:"Configuration",order:30},{value:"runtime_logs",label:"Runtime logs",order:40},{value:"routines",label:"Routines",order:60}];function J(s){return typeof s=="string"&&s.startsWith("plugin:")}r(J,"isExecutionWorkspacePluginTab");function xn(s){return s.map((n,a)=>({item:n,index:a})).sort((n,a)=>n.item.order-a.item.order||n.index-a.index).map(({item:n})=>n)}r(xn,"orderExecutionWorkspaceTabItems");function hn(s,n){const a=s.split("/").filter(Boolean),o=a.indexOf("execution-workspaces");if(o===-1||a[o+1]!==n)return null;const d=a[o+2];return d==="services"?"services":d==="issues"?"issues":d==="routines"?"routines":d==="runtime-logs"?"runtime_logs":d==="configuration"?"configuration":null}r(hn,"resolveExecutionWorkspaceTab");function ie(s,n){return`/execution-workspaces/${s}/${n==="runtime_logs"?"runtime-logs":n}`}r(ie,"executionWorkspaceTabPath");function be({workspaceId:s}){return(0,h.useEffect)(()=>{try{localStorage.removeItem(`wardmote:execution-workspace-tab:${s}`)}catch{}},[s]),(0,e.jsx)(Ss,{to:ie(s,"issues"),replace:!0})}r(be,"LegacyWorkspaceTabRedirect");function fn(s){if(!s)return!1;try{const n=new URL(s);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}}r(fn,"isSafeExternalUrl");function T(s){return s??""}r(T,"readText");function Ne(s){return!s||Object.keys(s).length===0?"":JSON.stringify(s,null,2)}r(Ne,"formatJson");function gn(s){return s?L(s):"Never"}r(gn,"formatOptionalDateTime");function oe(s){const n=s.trim();return n.length>0?n:null}r(oe,"normalizeText");function de(s){const n=s.trim();if(!n)return{ok:!0,value:null};try{const a=JSON.parse(n);return!a||typeof a!="object"||Array.isArray(a)?{ok:!1,error:"Workspace commands JSON must be a JSON object."}:{ok:!0,value:a}}catch(a){return{ok:!1,error:a instanceof Error?a.message:"Invalid JSON."}}}r(de,"parseWorkspaceRuntimeJson");function es(s){if(!s)return[];const n=[],a=r((o,d,c)=>{Array.isArray(d)&&d.forEach((u,v)=>{if(!u||typeof u!="object"||Array.isArray(u))return;const k=u;if(c&&k.kind!=="service")return;const y=k.port,m=!!(y&&typeof y=="object"&&!Array.isArray(y)&&Object.hasOwn(y,"value")),p=typeof y=="number"?y:m?y.value:null;n.push({collection:o,index:v,name:typeof k.name=="string"&&k.name.trim()?k.name:`Service ${v+1}`,port:typeof p=="number"?p:null,invalidPort:(typeof y=="number"||m)&&(typeof p!="number"||!Number.isInteger(p)||p<1||p>65535)})})},"addServices");return a("commands",s.commands,!0),a("services",s.services,!1),n}r(es,"readConfiguredRuntimeServicePorts");function jn(s){const n=structuredClone(s.runtimeConfig),a=n[s.service.collection];if(!Array.isArray(a))return n;const o=a[s.service.index];if(!o||typeof o!="object"||Array.isArray(o))return n;const d=o,c=d.port&&typeof d.port=="object"&&!Array.isArray(d.port)?d.port:null,u=s.port.trim();if(!u){if(c){const k={...c,type:"auto"};delete k.value,d.port=k}else delete d.port;return n}const v=Number(u);return!Number.isInteger(v)||v<1||v>65535||(d.port={...c,type:"fixed",value:v}),n}r(jn,"updateConfiguredRuntimeServicePort");function vn(s){const n=new Map;for(const a of s){if(a.invalidPort||!a.port)continue;const o=n.get(a.port)??[];o.push(a),n.set(a.port,o)}return Array.from(n.entries()).filter(([,a])=>a.length>1).map(([a,o])=>`Port ${a} is assigned to multiple services: ${o.map(d=>d.name).join(", ")}.`)}r(vn,"getConfiguredRuntimeServicePortWarnings");function Qe(s){return{name:s.name,cwd:T(s.cwd),repoUrl:T(s.repoUrl),baseRef:T(s.baseRef),branchName:T(s.branchName),providerRef:T(s.providerRef),provisionCommand:T(s.config?.provisionCommand),runtimeProvisionCommand:T(s.config?.runtimeProvisionCommand),teardownCommand:T(s.config?.teardownCommand),cleanupCommand:T(s.config?.cleanupCommand),inheritRuntime:!s.config?.workspaceRuntime,workspaceRuntime:Ne(s.config?.workspaceRuntime)}}r(Qe,"formStateFromWorkspace");function bn(s,n){const a={},o={},d=r(u=>{s[u]!==n[u]&&(a[u]=u==="name"?oe(n[u])??s.name:oe(n[u]))},"maybeAssign");d("name"),d("cwd"),d("repoUrl"),d("baseRef"),d("branchName"),d("providerRef");const c=r(u=>{s[u]!==n[u]&&(o[u]=oe(n[u]))},"maybeAssignConfigText");if(c("provisionCommand"),c("runtimeProvisionCommand"),c("teardownCommand"),c("cleanupCommand"),s.inheritRuntime!==n.inheritRuntime||s.workspaceRuntime!==n.workspaceRuntime){const u=de(n.workspaceRuntime);if(!u.ok)throw new Error(u.error);o.workspaceRuntime=n.inheritRuntime?null:u.value}return Object.keys(o).length>0&&(a.config=o),a}r(bn,"buildWorkspacePatch");function kn(s){const n=oe(s.repoUrl);if(n)try{new URL(n)}catch{return"Repo URL must be a valid URL."}if(!s.inheritRuntime){const a=de(s.workspaceRuntime);if(!a.ok)return a.error;const o=es(a.value).find(d=>d.invalidPort);if(o)return`${o.name} has an invalid fixed port.`}return null}r(kn,"validateForm");function I({label:s,hint:n,children:a}){return(0,e.jsxs)("label",{className:"block space-y-2",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-0.5 sm:flex-row sm:items-baseline sm:justify-between sm:gap-3",children:[(0,e.jsx)("span",{className:"text-sm font-medium text-ink",children:s}),n?(0,e.jsx)("span",{className:"text-xs text-ink-3 sm:text-right",children:n}):null]}),a]})}r(I,"Field");function yn(s){switch(s){case"worktree_prepare":return"Worktree setup";case"workspace_config_freshness":return"Config freshness";case"workspace_provision":return"Provision";case"workspace_seed":return"Database seed";case"workspace_runtime_provision":return"Runtime provision";case"workspace_teardown":return"Teardown";case"worktree_cleanup":return"Worktree cleanup";case"workspace_finalize":return"Finalize";default:return s}}r(yn,"workspaceOperationPhaseLabel");function wn(s){const n=(s.operations??[]).find(a=>a.phase==="workspace_seed"||a.phase==="workspace_runtime_provision")??null;if(n){const a=n.finishedAt??n.startedAt??null;if(n.status==="running")return{kind:"provisioning",at:a};if(n.status==="succeeded")return{kind:"provisioned",at:a};if(n.status==="failed")return{kind:"failed",at:a}}return s.runtimeProvisionCommand&&s.runtimeProvisionCommand.trim()?{kind:"deferred"}:{kind:"eager"}}r(wn,"resolveRuntimeProvisionStatus");function C({label:s,children:n}){return(0,e.jsxs)("div",{className:"flex flex-col gap-1.5 py-1.5 sm:flex-row sm:items-start sm:gap-3",children:[(0,e.jsx)("div",{className:"shrink-0 text-xs text-ink-3 sm:w-32",children:s}),(0,e.jsx)("div",{className:"min-w-0 flex-1 text-sm",children:n})]})}r(C,"DetailRow");function Z({children:s,className:n}){return(0,e.jsx)("div",{className:S("inline-flex items-center rounded-full border border-line bg-bg px-2.5 py-1 text-xs text-ink-3",n),children:s})}r(Z,"StatusPill");function Nn({status:s,onViewLogs:n}){return s.kind==="eager"?(0,e.jsx)("span",{className:"text-sm text-ink-3",children:"Eager · provisioned during workspace setup"}):s.kind==="deferred"?(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsx)(Z,{className:"border-amber-500/40 text-amber-600 dark:text-amber-400",children:"Deferred"}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:"Runs once before the first runtime-service start."})]}):s.kind==="provisioning"?(0,e.jsxs)(Z,{className:"border-line text-ink-3",children:[(0,e.jsx)(ue,{className:"mr-1.5 h-3 w-3 animate-spin"}),"Provisioning…"]}):s.kind==="provisioned"?(0,e.jsxs)(Z,{className:"border-emerald-500/40 text-emerald-600 dark:text-emerald-400",children:["Provisioned",s.at?` · ${L(s.at)}`:""]}):(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsxs)(Z,{className:"border-bad/50 text-bad",children:["Provisioning failed",s.at?` · ${L(s.at)}`:""]}),(0,e.jsx)("button",{type:"button",onClick:n,className:"self-start text-xs text-ink-3 underline underline-offset-2 hover:text-ink",children:"View runtime logs"})]})}r(Nn,"RuntimeProvisionStatusValue");function W({value:s,copy:n}){return(0,e.jsxs)("div",{className:"inline-flex max-w-full items-start gap-2",children:[(0,e.jsx)("span",{className:"break-all font-mono text-xs",children:s}),n?(0,e.jsx)(He,{text:s,className:"shrink-0 text-ink-3 hover:text-ink",copiedLabel:"Copied",children:(0,e.jsx)(Ce,{className:"h-3.5 w-3.5"})}):null]})}r(W,"MonoValue");function Rn({project:s,workspace:n}){return(0,e.jsx)(Y,{to:hs(s,n.id),className:"hover:underline",children:n.name})}r(Rn,"WorkspaceLink");function Cn({companyId:s,workspace:n,issues:a,isLoading:o,error:d,project:c}){const u=Re(),{data:v}=P({queryKey:x.agents.list(s),queryFn:r(()=>Je.list(s),"queryFn"),enabled:!!s}),k=x.liveRuns(s),y=Us({companyId:s,resourceKey:"live-runs",queryKey:k,enabled:!!s,refetchInterval:!1,leaderOnly:!0}),{data:m,dataUpdatedAt:p}=P({queryKey:k,queryFn:r(()=>Os.liveRunsForCompany(s),"queryFn"),enabled:y.enabled,refetchInterval:y.refetchInterval});Bs(y,m,p);const _=(0,h.useMemo)(()=>Js(m,a),[a,m]),f=le({mutationFn:r(({id:q,data:F})=>ke.update(q,F),"mutationFn"),onSuccess:r(()=>{u.invalidateQueries({queryKey:x.issues.listByExecutionWorkspace(s,n.id)}),u.invalidateQueries({queryKey:x.issues.list(s)}),c?.id&&u.invalidateQueries({queryKey:x.issues.listByProject(s,c.id)})},"onSuccess")}),b=(0,h.useMemo)(()=>c?[{id:c.id,name:c.name,workspaces:c.workspaces??[]}]:void 0,[c]),g=(0,h.useMemo)(()=>({projectId:n.projectId,...n.projectWorkspaceId?{projectWorkspaceId:n.projectWorkspaceId}:{},executionWorkspaceId:n.id,executionWorkspaceMode:"reuse_existing"}),[n.id,n.projectId,n.projectWorkspaceId]);return(0,e.jsx)(Xs,{issues:a,isLoading:o,error:d,agents:v,projects:b,liveIssueIds:_,projectId:c?.id,viewStateKey:"wardmote:execution-workspace-issues-view",baseCreateIssueDefaults:g,onUpdateIssue:r((q,F)=>f.mutate({id:q,data:F}),"onUpdateIssue")})}r(Cn,"ExecutionWorkspaceIssuesList");function In({routine:s,variableNames:n,runningRoutineId:a,onRunNow:o}){const d=s.status==="archived",c=a===s.id;return(0,e.jsxs)("div",{className:"flex flex-col gap-3 border-b border-line px-3 py-3 last:border-b-0 sm:flex-row sm:items-center",children:[(0,e.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(Y,{to:`/routines/${s.id}`,className:"truncate text-sm font-medium hover:underline",children:s.title}),s.status!=="active"?(0,e.jsx)("span",{className:"text-xs text-ink-3",children:s.status}):null]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-ink-3",children:[(0,e.jsx)("span",{children:s.assigneeAgentId?"Default agent set":"Choose agent when running"}),(0,e.jsxs)("span",{children:["Last run ",gn(s.lastRun?.triggeredAt??s.lastTriggeredAt)]}),(0,e.jsx)("span",{className:"flex flex-wrap gap-1",children:n.map(u=>(0,e.jsx)("span",{className:"rounded-sm bg-bg-3 px-1.5 py-0.5 font-mono text-(length:--text-micro) text-ink-3",children:u},u))})]})]}),(0,e.jsxs)(N,{variant:"secondary",size:"sm",className:"w-full sm:w-auto",disabled:d||c,onClick:r(()=>o(s),"onClick"),children:[c?(0,e.jsx)(ue,{className:"mr-2 h-4 w-4 animate-spin"}):(0,e.jsx)(we,{className:"mr-2 h-4 w-4"}),c?"Running...":"Run now"]})]})}r(In,"WorkspaceRoutineRow");function Sn({workspace:s,project:n}){const a=Re(),{pushToast:o}=qs(),[d,c]=(0,h.useState)(null),[u,v]=(0,h.useState)(null),{data:k,isLoading:y,error:m}=P({queryKey:x.routines.list(s.companyId,{projectId:s.projectId}),queryFn:r(()=>Me.list(s.companyId,{projectId:s.projectId}),"queryFn")}),{data:p}=P({queryKey:x.agents.list(s.companyId),queryFn:r(()=>Je.list(s.companyId),"queryFn")}),_=(0,h.useMemo)(()=>un((k??[]).filter(dn)),[k]),f=le({mutationFn:r(({id:b,data:g})=>Me.run(b,{...g?.variables&&Object.keys(g.variables).length>0?{variables:g.variables}:{},...g?.assigneeAgentId!==void 0?{assigneeAgentId:g.assigneeAgentId}:{},...g?.projectId!==void 0?{projectId:g.projectId}:{},...g?.executionWorkspaceId!==void 0?{executionWorkspaceId:g.executionWorkspaceId}:{},...g?.executionWorkspacePreference!==void 0?{executionWorkspacePreference:g.executionWorkspacePreference}:{},...g?.executionWorkspaceSettings!==void 0?{executionWorkspaceSettings:g.executionWorkspaceSettings}:{}}),"mutationFn"),onMutate:r(({id:b})=>{v(b)},"onMutate"),onSuccess:r(async(b,{id:g})=>{c(null),await Promise.all([a.invalidateQueries({queryKey:["routines",s.companyId]}),a.invalidateQueries({queryKey:x.routines.detail(g)}),a.invalidateQueries({queryKey:x.issues.listByExecutionWorkspace(s.companyId,s.id)}),a.invalidateQueries({queryKey:x.issues.list(s.companyId)})]),o({title:"Routine started",body:"Wardmote created a run using this execution workspace.",tone:"success"})},"onSuccess"),onSettled:r(()=>{v(null)},"onSettled"),onError:r(b=>{o({title:"Routine run failed",body:b instanceof Error?b.message:"Wardmote could not start the routine run.",tone:"error"})},"onError")});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(K,{className:"rounded-none",children:[(0,e.jsxs)(G,{children:[(0,e.jsx)(X,{children:"Workspace routines"}),(0,e.jsx)(H,{children:"Routines that use workspace-specific variables can be run against this execution workspace."})]}),(0,e.jsx)(B,{children:y?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Loading routines..."}):m?(0,e.jsx)("p",{className:"text-sm text-bad",children:m instanceof Error?m.message:"Failed to load routines."}):_.length===0?(0,e.jsxs)("div",{className:"flex flex-col items-center gap-2 py-10 text-center",children:[(0,e.jsx)(Fs,{className:"h-5 w-5 text-ink-3"}),(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No routines use workspace-specific variables yet."})]}):(0,e.jsx)("div",{className:"rounded-lg border border-line",children:_.map(b=>(0,e.jsx)(In,{routine:b,variableNames:Ye(b),runningRoutineId:u,onRunNow:c},b.id))})})]}),(0,e.jsx)(nn,{open:d!==null,onOpenChange:r(b=>{b||c(null)},"onOpenChange"),companyId:s.companyId,routineName:d?.title??null,agents:p??[],projects:n?[n]:[],defaultProjectId:s.projectId,defaultAssigneeAgentId:d?.assigneeAgentId??null,defaultExecutionWorkspace:s,variables:d?.variables??[],isPending:f.isPending,onSubmit:r(b=>{d&&f.mutate({id:d.id,data:b})},"onSubmit")})]})}r(Sn,"ExecutionWorkspaceRoutinesList");function xt(){const{visible:s,loaded:n}=Hs(),{workspaceId:a}=ks(),o=bs(),d=Is(),c=Re(),{setBreadcrumbs:u}=Qs(),{selectedCompanyId:v,setSelectedCompanyId:k}=Cs(),{hideHostPaths:y}=Zs(),[m,p]=(0,h.useState)(null),[_,f]=(0,h.useState)(!1),[b,g]=(0,h.useState)(null),[q,F]=(0,h.useState)(null),[Pe,me]=(0,h.useState)(null),[ss,pe]=(0,h.useState)([]),ns=a?hn(o.pathname,a):null,ts=(0,h.useMemo)(()=>{const t=new URLSearchParams(o.search).get("tab");return J(t)?t:null},[o.search]),R=ns??ts,D=P({queryKey:x.executionWorkspaces.detail(a),queryFn:r(()=>V.get(a),"queryFn"),enabled:!!a}),i=D.data??null,j=P({queryKey:i?[...x.projects.detail(i.projectId),i.companyId]:["projects","detail","__pending__"],queryFn:r(()=>Ks.get(i.projectId,i.companyId),"queryFn"),enabled:!!i?.projectId}).data??null,E=P({queryKey:i?.sourceIssueId?x.issues.detail(i.sourceIssueId):["issues","detail","__none__"],queryFn:r(()=>ke.get(i.sourceIssueId),"queryFn"),enabled:!!i?.sourceIssueId}).data??null,xe=P({queryKey:i?.derivedFromExecutionWorkspaceId?x.executionWorkspaces.detail(i.derivedFromExecutionWorkspaceId):["execution-workspaces","detail","__none__"],queryFn:r(()=>V.get(i.derivedFromExecutionWorkspaceId),"queryFn"),enabled:!!i?.derivedFromExecutionWorkspaceId}).data??null,he=P({queryKey:i?x.issues.listByExecutionWorkspace(i.companyId,i.id):["issues","__execution-workspace__","__none__"],queryFn:r(()=>ke.list(i.companyId,{executionWorkspaceId:i.id}),"queryFn"),enabled:!!i?.companyId}),rs=he.data??[],ee=(0,h.useMemo)(()=>j?.workspaces.find(t=>t.id===i?.projectWorkspaceId)??null,[j,i?.projectWorkspaceId]),{slots:_e,isLoading:as,errorMessage:Ee}=Ms({slotTypes:["detailTab"],entityType:"execution_workspace",companyId:i?.companyId??null,enabled:!!i?.companyId}),fe=(0,h.useMemo)(()=>_e.map(t=>({value:`plugin:${t.pluginKey}:${t.id}`,label:t.displayName,order:t.order??mn,slot:t})),[_e]),is=(0,h.useMemo)(()=>xn([...pn.filter(t=>t.value!=="configuration"||s),...fe]),[fe,s]),O=ee?.runtimeConfig?.workspaceRuntime??null,ge=i?.config?.workspaceRuntime??O,Ae=i?.config?.workspaceRuntime?"execution_workspace":O?"project_workspace":"none",Te=(0,h.useMemo)(()=>{if(!m||m.inheritRuntime)return O;const t=de(m.workspaceRuntime);return t.ok?t.value:null},[m,O]),se=(0,h.useMemo)(()=>es(Te),[Te]),Fe=(0,h.useMemo)(()=>vn(se),[se]),M=(0,h.useMemo)(()=>i?Qe(i):null,[i]),je=!!(m&&M&&JSON.stringify(m)!==JSON.stringify(M)),ne=j?ps(j):i?.projectId??"";(0,h.useEffect)(()=>{!i?.companyId||i.companyId===v||k(i.companyId,{source:"route_sync"})},[i?.companyId,v,k]),(0,h.useEffect)(()=>{i&&(p(Qe(i)),g(null),F(null),pe([]))},[i]),(0,h.useEffect)(()=>{if(!i)return;const t=[{label:"Projects",href:"/projects"},...j?[{label:j.name,href:`/projects/${ne}`}]:[],...j?[{label:"Workspaces",href:`/projects/${ne}/workspaces`}]:[],{label:i.name}];u(t)},[u,i,j,ne]);const te=le({mutationFn:r(t=>V.update(i.id,t),"mutationFn"),onSuccess:r(t=>{c.setQueryData(x.executionWorkspaces.detail(t.id),t),c.invalidateQueries({queryKey:x.executionWorkspaces.closeReadiness(t.id)}),c.invalidateQueries({queryKey:x.executionWorkspaces.workspaceOperations(t.id)}),j&&(c.invalidateQueries({queryKey:x.projects.detail(j.id)}),c.invalidateQueries({queryKey:x.projects.detail(j.urlKey)})),E&&c.invalidateQueries({queryKey:x.issues.detail(E.id)}),g(null)},"onSuccess"),onError:r(t=>{g(t instanceof Error?t.message:"Failed to save execution workspace.")},"onError")}),A=P({queryKey:x.executionWorkspaces.workspaceOperations(a),queryFn:r(()=>V.listWorkspaceOperations(a),"queryFn"),enabled:!!a}),Le=i?.config?.runtimeProvisionCommand??j?.executionWorkspacePolicy?.workspaceStrategy?.runtimeProvisionCommand??null,os=(0,h.useMemo)(()=>wn({runtimeProvisionCommand:Le,operations:A.data}),[Le,A.data]),re=le({mutationFn:r(t=>V.controlRuntimeCommands(i.id,t.action,t),"mutationFn"),onSuccess:r((t,l)=>{c.setQueryData(x.executionWorkspaces.detail(t.workspace.id),t.workspace),c.invalidateQueries({queryKey:x.executionWorkspaces.overview(t.workspace.companyId)}),c.invalidateQueries({queryKey:x.executionWorkspaces.workspaceOperations(t.workspace.id)}),c.invalidateQueries({queryKey:x.projects.detail(t.workspace.projectId)}),F(null),me(l.action==="run"?"Workspace job completed.":l.action==="stop"?"Workspace service stopped.":l.action==="restart"?"Workspace service restarted.":"Workspace service started.")},"onSuccess"),onError:r(t=>{me(null),F(t instanceof Error?t.message:"Failed to control workspace commands.")},"onError"),onSettled:r((t,l,w)=>{pe(Q=>Q.filter(us=>us!==w))},"onSettled")});if(D.isLoading)return(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Loading workspace…"});if(D.error)return(0,e.jsx)("p",{className:"text-sm text-bad",children:D.error instanceof Error?D.error.message:"Failed to load workspace"});if(!i||!m||!M)return null;const qe=!!i.cwd,Oe=!!ge&&qe,ve=Ns({runtimeConfig:ge,runtimeServices:i.runtimeServices??[],canStartServices:Oe,canRunJobs:qe}),ls=re.isPending?re.variables??null:null,cs=ws({sections:ve,runtimeServices:i.runtimeServices??[],pendingRequests:ss}),Ue={companyId:i.companyId,projectId:i.projectId,entityId:i.id,entityType:"execution_workspace"},Be=fe.find(t=>t.value===R)??null;if(R==="configuration"&&!n)return null;if(a&&R==="configuration"&&!s)return(0,e.jsx)(be,{workspaceId:a});if(a&&R===null)return(0,e.jsx)(be,{workspaceId:a});const z=r(t=>{if(J(t)){d(`/execution-workspaces/${i.id}?tab=${encodeURIComponent(t)}`);return}d(ie(i.id,t))},"handleTabChange"),ds=r(()=>{const t=kn(m);if(t){g(t);return}let l;try{l=bn(M,m)}catch(w){g(w instanceof Error?w.message:"Failed to build workspace update.");return}Object.keys(l).length!==0&&te.mutate(l)},"saveChanges"),Ke=r(t=>{if(t.length!==0){pe(l=>[...l,...t]);for(const l of t)re.mutate(l)}},"runRuntimeControlRequests");return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-4 overflow-hidden sm:space-y-6",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-(--tracking-eyebrow) text-ink-3",children:"Execution workspace"}),(0,e.jsx)("h1",{className:"truncate text-xl font-semibold sm:text-2xl",children:i.name})]}),(0,e.jsx)(cn,{services:cs,onAction:r((t,l)=>{Ke(ys(ve,t,l))},"onAction"),onViewLogs:r(()=>z("runtime_logs"),"onViewLogs"),onManageServices:r(()=>z("services"),"onManageServices")})]}),q?(0,e.jsx)("p",{className:"text-sm text-bad",children:q}):null,!q&&Pe?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:Pe}):null,(0,e.jsx)(Ds,{slotTypes:["toolbarButton","contextMenuItem"],entityType:"execution_workspace",context:Ue,className:"flex flex-wrap gap-2",itemClassName:"inline-flex",missingBehavior:"placeholder"}),(0,e.jsx)(Ws,{value:R??"issues",onValueChange:r(t=>z(t),"onValueChange"),children:(0,e.jsx)(Gs,{items:is.map(t=>({value:t.value,label:t.label})),align:"start",value:R??"issues",onValueChange:r(t=>z(t),"onValueChange")})}),R==="services"?(0,e.jsx)(Rs,{sections:ve,isPending:re.isPending,pendingRequest:ls,serviceEmptyMessage:ge?"No services have been started for this execution workspace yet.":"No workspace command config is defined for this execution workspace yet.",jobEmptyMessage:"No one-shot jobs are configured for this execution workspace yet.",disabledHint:Oe?null:"Execution workspaces need a working directory before local commands can run, and services also need runtime config.",onAction:r(t=>Ke([t]),"onAction")}):R==="configuration"?(0,e.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,e.jsxs)(K,{className:"rounded-none",children:[(0,e.jsxs)(G,{children:[(0,e.jsx)(X,{children:"Workspace settings"}),(0,e.jsx)(H,{children:"Edit the concrete path, repo, branch, provisioning, teardown, and runtime overrides attached to this execution workspace. Saved changes affect future runs; Wardmote may refresh or replace a reused workspace when config changes."}),(0,e.jsx)(Vs,{children:(0,e.jsx)(N,{variant:"danger",size:"sm",className:"w-full sm:w-auto",onClick:r(()=>f(!0),"onClick"),disabled:i.status==="archived",children:i.status==="cleanup_failed"?"Retry close":"Close workspace"})})]}),(0,e.jsxs)(B,{children:[(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-widest text-ink-3",children:"General"}),(0,e.jsx)(I,{label:"Workspace name",children:(0,e.jsx)(U,{value:m.name,onChange:r(t=>p(l=>l&&{...l,name:t.target.value}),"onChange"),placeholder:"Execution workspace name"})})]}),(0,e.jsx)(ae,{}),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-widest text-ink-3",children:"Source control"}),(0,e.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,e.jsx)(I,{label:"Branch name",hint:"Useful for isolated worktrees",children:(0,e.jsx)(U,{className:"font-mono",value:m.branchName,onChange:r(t=>p(l=>l&&{...l,branchName:t.target.value}),"onChange"),placeholder:"PAP-946-workspace"})}),(0,e.jsx)(I,{label:"Base ref",children:(0,e.jsx)(U,{className:"font-mono",value:m.baseRef,onChange:r(t=>p(l=>l&&{...l,baseRef:t.target.value}),"onChange"),placeholder:"origin/main"})})]}),(0,e.jsx)(I,{label:"Repo URL",children:(0,e.jsx)(U,{value:m.repoUrl,onChange:r(t=>p(l=>l&&{...l,repoUrl:t.target.value}),"onChange"),placeholder:"https://github.com/org/repo"})})]}),(0,e.jsx)(ae,{}),!y&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-widest text-ink-3",children:"Paths"}),(0,e.jsx)(I,{label:"Working directory",children:(0,e.jsx)(U,{className:"font-mono",value:m.cwd,onChange:r(t=>p(l=>l&&{...l,cwd:t.target.value}),"onChange"),placeholder:"/absolute/path/to/workspace"})}),(0,e.jsx)(I,{label:"Provider path / ref",children:(0,e.jsx)(U,{className:"font-mono",value:m.providerRef,onChange:r(t=>p(l=>l&&{...l,providerRef:t.target.value}),"onChange"),placeholder:"/path/to/worktree or provider ref"})})]}),(0,e.jsx)(ae,{})]}),!y&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-widest text-ink-3",children:"Lifecycle commands"}),(0,e.jsx)(I,{label:"Provision command",hint:"Runs when Wardmote prepares this execution workspace",children:(0,e.jsx)($,{className:"min-h-20 font-mono",value:m.provisionCommand,onChange:r(t=>p(l=>l&&{...l,provisionCommand:t.target.value}),"onChange"),placeholder:"bash ./scripts/provision-worktree.sh"})}),(0,e.jsx)(I,{label:"Runtime provision command",hint:"Runs once before the first runtime-service start. Leave empty to keep eager provisioning.",children:(0,e.jsx)($,{className:"min-h-20 font-mono",value:m.runtimeProvisionCommand,onChange:r(t=>p(l=>l&&{...l,runtimeProvisionCommand:t.target.value}),"onChange"),placeholder:"bash ./scripts/provision-worktree-runtime.sh"})}),(0,e.jsx)(I,{label:"Teardown command",hint:"Runs when the execution workspace is archived or cleaned up",children:(0,e.jsx)($,{className:"min-h-20 font-mono",value:m.teardownCommand,onChange:r(t=>p(l=>l&&{...l,teardownCommand:t.target.value}),"onChange"),placeholder:"bash ./scripts/teardown-worktree.sh"})}),(0,e.jsx)(I,{label:"Cleanup command",hint:"Workspace-specific cleanup before teardown",children:(0,e.jsx)($,{className:"min-h-16 font-mono",value:m.cleanupCommand,onChange:r(t=>p(l=>l&&{...l,cleanupCommand:t.target.value}),"onChange"),placeholder:"pkill -f vite || true"})})]}),(0,e.jsx)(ae,{})]}),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-widest text-ink-3",children:"Runtime config"}),(0,e.jsx)("div",{className:"rounded-md border border-dashed border-line/70 bg-bg px-4 py-3",children:(0,e.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-ink",children:"Runtime config source"}),(0,e.jsx)("p",{className:"text-sm text-ink-3",children:Ae==="execution_workspace"?"This execution workspace currently overrides the project workspace runtime config.":Ae==="project_workspace"?"This execution workspace is inheriting the project workspace runtime config.":"No runtime config is currently defined on this execution workspace or its project workspace."})]}),(0,e.jsx)(N,{variant:"secondary",className:"w-full sm:w-auto",size:"sm",disabled:!ee?.runtimeConfig?.workspaceRuntime,onClick:r(()=>p(t=>t&&{...t,inheritRuntime:!0,workspaceRuntime:""}),"onClick"),children:"Reset to inherit"})]})}),(0,e.jsxs)("details",{className:"rounded-md border border-dashed border-line/70 bg-bg px-4 py-3",children:[(0,e.jsx)("summary",{className:"cursor-pointer text-sm font-medium",children:"Advanced runtime JSON"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Override the inherited workspace command model only when this execution workspace truly needs different service or job behavior."}),(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsxs)(I,{label:"Workspace commands JSON",hint:"Legacy `services` arrays still work, but `commands` supports both services and jobs.",children:[(0,e.jsxs)("div",{className:"mb-2 flex items-center gap-2 text-sm text-ink-3",children:[(0,e.jsx)("input",{id:"inherit-runtime-config",type:"checkbox",className:"rounded border-line",checked:m.inheritRuntime,onChange:r(t=>{const l=t.target.checked;p(w=>w&&(!l&&!w.workspaceRuntime.trim()&&O?{...w,inheritRuntime:l,workspaceRuntime:Ne(O)}:{...w,inheritRuntime:l}))},"onChange")}),(0,e.jsx)("label",{htmlFor:"inherit-runtime-config",children:"Inherit project workspace runtime config"})]}),(0,e.jsx)($,{className:"min-h-64 font-mono sm:min-h-96",value:m.workspaceRuntime,onChange:r(t=>p(l=>l&&{...l,workspaceRuntime:t.target.value}),"onChange"),disabled:m.inheritRuntime,placeholder:`{
2
+ "commands": [
3
+ {
4
+ "id": "web",
5
+ "name": "web",
6
+ "kind": "service",
7
+ "command": "pnpm dev",
8
+ "cwd": ".",
9
+ "port": { "type": "auto" }
10
+ },
11
+ {
12
+ "id": "db-migrate",
13
+ "name": "db:migrate",
14
+ "kind": "job",
15
+ "command": "pnpm db:migrate",
16
+ "cwd": "."
17
+ }
18
+ ]
19
+ }`})]})})]}),se.length>0?(0,e.jsxs)("div",{className:"space-y-3 rounded-md border border-line bg-bg-3/20 p-4",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-medium",children:"Service ports"}),(0,e.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Set a fixed port for a service or leave it blank to use its configured automatic behavior. Editing an inherited service creates an execution-workspace runtime override."})]}),(0,e.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:se.map(t=>(0,e.jsx)(I,{label:t.name,hint:"Fixed port",children:(0,e.jsx)(U,{type:"number",min:"1",max:"65535",inputMode:"numeric",value:t.port??"",onChange:r(l=>{p(w=>{if(!w)return w;const Q=w.inheritRuntime?{ok:!0,value:O}:de(w.workspaceRuntime);return!Q.ok||!Q.value?w:{...w,inheritRuntime:!1,workspaceRuntime:Ne(jn({runtimeConfig:Q.value,service:t,port:l.target.value}))}})},"onChange")})},`${t.collection}-${t.index}`))}),Fe.length>0?(0,e.jsx)("div",{className:"rounded-md border border-bad/40 bg-bad/10 px-3 py-2 text-sm text-bad",children:Fe.map(t=>(0,e.jsx)("p",{children:t},t))}):null,(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Wardmote checks fixed ports again when a service starts and rejects cross-workspace conflicts."})]}):null]})]}),(0,e.jsxs)("div",{className:"mt-6 flex flex-col items-stretch gap-3 sm:flex-row sm:flex-wrap sm:items-center",children:[(0,e.jsxs)(N,{className:"w-full sm:w-auto",disabled:!je||te.isPending,onClick:ds,children:[te.isPending?(0,e.jsx)(ue,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Save changes"]}),(0,e.jsx)(N,{variant:"secondary",className:"w-full sm:w-auto",disabled:!je||te.isPending,onClick:r(()=>{p(M),g(null),F(null),me(null)},"onClick"),children:"Reset"}),b?(0,e.jsx)("p",{className:"text-sm text-bad",children:b}):null,!b&&!je?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No unsaved changes."}):null]})]})]}),(0,e.jsxs)(K,{className:"rounded-none",children:[(0,e.jsxs)(G,{children:[(0,e.jsx)(X,{children:"Workspace context"}),(0,e.jsx)(H,{children:"Linked objects and relationships"})]}),(0,e.jsxs)(B,{children:[(0,e.jsx)(C,{label:"Project",children:j?(0,e.jsx)(Y,{to:`/projects/${ne}`,className:"hover:underline",children:j.name}):(0,e.jsx)(W,{value:i.projectId})}),(0,e.jsx)(C,{label:"Project workspace",children:j&&ee?(0,e.jsx)(Rn,{project:j,workspace:ee}):i.projectWorkspaceId?(0,e.jsx)(W,{value:i.projectWorkspaceId}):"None"}),(0,e.jsx)(C,{label:"Source task",children:E?(0,e.jsxs)(Y,{to:xs(E),className:"hover:underline",children:[E.identifier??E.id," · ",E.title]}):i.sourceIssueId?(0,e.jsx)(W,{value:i.sourceIssueId}):"None"}),(0,e.jsx)(C,{label:"Derived from",children:xe?(0,e.jsx)(Y,{to:ie(xe.id,s?"configuration":"issues"),className:"hover:underline",children:xe.name}):i.derivedFromExecutionWorkspaceId?(0,e.jsx)(W,{value:i.derivedFromExecutionWorkspaceId}):"None"}),(0,e.jsx)(C,{label:"Runtime provisioning",children:(0,e.jsx)(Nn,{status:os,onViewLogs:r(()=>z("runtime_logs"),"onViewLogs")})}),(0,e.jsx)(C,{label:"Workspace ID",children:(0,e.jsx)(W,{value:i.id})})]})]}),(0,e.jsxs)(K,{className:"rounded-none",children:[(0,e.jsxs)(G,{children:[(0,e.jsx)(X,{children:"Concrete location"}),(0,e.jsx)(H,{children:"Paths and refs"})]}),(0,e.jsxs)(B,{children:[(0,e.jsx)(C,{label:"Working dir",children:i.cwd?(0,e.jsx)(W,{value:i.cwd,copy:!0}):"None"}),(0,e.jsx)(C,{label:"Provider ref",children:i.providerRef?(0,e.jsx)(W,{value:i.providerRef,copy:!0}):"None"}),(0,e.jsx)(C,{label:"Repo URL",children:i.repoUrl&&fn(i.repoUrl)?(0,e.jsxs)("div",{className:"inline-flex max-w-full items-start gap-2",children:[(0,e.jsxs)("a",{href:i.repoUrl,target:"_blank",rel:"noreferrer",className:"inline-flex min-w-0 items-center gap-1 break-all hover:underline",children:[i.repoUrl,(0,e.jsx)(ye,{className:"h-3.5 w-3.5 shrink-0"})]}),(0,e.jsx)(He,{text:i.repoUrl,className:"shrink-0 text-ink-3 hover:text-ink",copiedLabel:"Copied",children:(0,e.jsx)(Ce,{className:"h-3.5 w-3.5"})})]}):i.repoUrl?(0,e.jsx)(W,{value:i.repoUrl,copy:!0}):"None"}),(0,e.jsx)(C,{label:"Base ref",children:i.baseRef?(0,e.jsx)(W,{value:i.baseRef,copy:!0}):"None"}),(0,e.jsx)(C,{label:"Branch",children:i.branchName?(0,e.jsx)(W,{value:i.branchName,copy:!0}):"None"}),(0,e.jsx)(C,{label:"Opened",children:L(i.openedAt)}),(0,e.jsx)(C,{label:"Last used",children:L(i.lastUsedAt)}),(0,e.jsx)(C,{label:"Cleanup",children:i.cleanupEligibleAt?`${L(i.cleanupEligibleAt)}${i.cleanupReason?` · ${i.cleanupReason}`:""}`:"Not scheduled"})]})]})]}):R==="runtime_logs"?(0,e.jsxs)(K,{className:"rounded-none",children:[(0,e.jsxs)(G,{children:[(0,e.jsx)(X,{children:"Runtime and cleanup logs"}),(0,e.jsx)(H,{children:"Recent operations"})]}),(0,e.jsx)(B,{children:A.isLoading?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Loading workspace operations…"}):A.error?(0,e.jsx)("p",{className:"text-sm text-bad",children:A.error instanceof Error?A.error.message:"Failed to load workspace operations."}):A.data&&A.data.length>0?(0,e.jsx)("div",{className:"space-y-3",children:A.data.map(t=>(0,e.jsx)("div",{className:"rounded-none border border-line/80 bg-bg px-4 py-3",children:(0,e.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("div",{className:"text-sm font-medium",children:t.command??yn(t.phase)}),(0,e.jsxs)("div",{className:"text-xs text-ink-3",children:[L(t.startedAt),t.finishedAt?` → ${L(t.finishedAt)}`:""]}),t.stderrExcerpt?(0,e.jsx)("div",{className:"whitespace-pre-wrap break-words text-xs text-bad",children:t.stderrExcerpt}):t.stdoutExcerpt?(0,e.jsx)("div",{className:"whitespace-pre-wrap break-words text-xs text-ink-3",children:t.stdoutExcerpt}):null]}),(0,e.jsx)(Z,{className:"self-start",children:t.status})]})},t.id))}):(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No workspace operations have been recorded yet."})})]}):R==="issues"?(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsx)(en,{companyId:i.companyId,scopeKind:"execution_workspace",scopeId:i.id,title:"Workspace summary",description:"Summarizer keeps the latest workspace status, next step, and operator-needed items here."}),(0,e.jsx)(Cn,{companyId:i.companyId,workspace:i,issues:rs,isLoading:he.isLoading,error:he.error,project:j})]}):Be?(0,e.jsx)(zs,{slot:Be.slot,context:Ue,missingBehavior:"placeholder"}):J(R)&&as?(0,e.jsx)(K,{children:(0,e.jsx)(B,{className:"py-6 text-sm text-ink-3",children:"Loading workspace plugin..."})}):J(R)&&Ee?(0,e.jsx)(K,{children:(0,e.jsx)(B,{className:"py-6 text-sm text-bad",children:Ee})}):J(R)?(0,e.jsx)(sn,{defaultTabHref:ie(i.id,"issues"),defaultTabLabel:"Back to tasks"}):R==="routines"?(0,e.jsx)(Sn,{workspace:i,project:j}):(0,e.jsx)(be,{workspaceId:i.id})]}),(0,e.jsx)(Ys,{workspaceId:i.id,workspaceName:i.name,currentStatus:i.status,open:_,onOpenChange:f,onClosed:r(t=>{c.setQueryData(x.executionWorkspaces.detail(t.id),t),c.invalidateQueries({queryKey:x.executionWorkspaces.overview(t.companyId)}),c.invalidateQueries({queryKey:x.executionWorkspaces.closeReadiness(t.id)}),c.invalidateQueries({queryKey:x.executionWorkspaces.workspaceOperations(t.id)}),j&&(c.invalidateQueries({queryKey:x.projects.detail(j.id)}),c.invalidateQueries({queryKey:x.executionWorkspaces.list(j.companyId,{projectId:j.id})})),E&&c.invalidateQueries({queryKey:x.issues.detail(E.id)})},"onClosed")})]})}r(xt,"ExecutionWorkspaceDetail");export{xt as ExecutionWorkspaceDetail};
@@ -0,0 +1 @@
1
+ var i=Object.defineProperty;var t=(e,s)=>i(e,"name",{value:s,configurable:!0});import{i as n}from"./rolldown-runtime-ZpX3ckPj.js";import{ta as m}from"./createLucideIcon-Dp_BESPI.js";import{t as o}from"./button-bS07vQAg.js";import{t as c}from"./x-C-YdLCiV.js";import{t as p}from"./badge-Bw9Yv7_W.js";var a=n(m(),1);function f({filters:e,onRemove:s,onClear:l}){return e.length===0?null:(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[e.map(r=>(0,a.jsxs)(p,{variant:"secondary",className:"gap-1 pr-1",children:[(0,a.jsxs)("span",{className:"text-ink-3",children:[r.label,":"]}),(0,a.jsx)("span",{children:r.value}),(0,a.jsx)("button",{className:"ml-1 rounded-full hover:bg-bg-3 p-0.5",onClick:t(()=>s(r.key),"onClick"),children:(0,a.jsx)(c,{className:"h-3 w-3"})})]},r.key)),(0,a.jsx)(o,{variant:"ghost",size:"sm",className:"text-xs h-6",onClick:l,children:"Clear all"})]})}t(f,"FilterBar");export{f as t};
@@ -0,0 +1 @@
1
+ var A=Object.defineProperty;var n=(e,s)=>A(e,"name",{value:s,configurable:!0});import{i as H}from"./rolldown-runtime-ZpX3ckPj.js";import{l as d,na as O,ta as D}from"./createLucideIcon-Dp_BESPI.js";import{t as M}from"./chevron-down-DA6rxxgD.js";import{t as R}from"./chevron-up-OGjfRrmd.js";import{t as z}from"./button-bS07vQAg.js";var t=H(O(),1),r=H(D(),1),x=640,g=320,c=420,E=72,P=220;function $(e){const[s,u]=(0,t.useState)(()=>e??(typeof window>"u"?c:window.innerWidth<x?g:c));return(0,t.useEffect)(()=>{if(e!=null){u(e);return}if(typeof window>"u")return;const a=n(()=>u(window.innerWidth<x?g:c),"compute");return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[e]),s}n($,"useResponsiveCollapsedHeight");function X({children:e,collapsedHeight:s,activationBuffer:u=120,moreLabel:a="Show more",lessLabel:b="Show less",className:S,contentClassName:N,toggleClassName:I}){const m=$(s),f=(0,t.useRef)(null),[h,L]=(0,t.useState)(0),[o,T]=(0,t.useState)(!1),[j,k]=(0,t.useState)(!1),[p,C]=(0,t.useState)(!1);(0,t.useLayoutEffect)(()=>{const i=f.current;if(!i)return;const w=n(()=>{L(i.scrollHeight),k(!0)},"measure");if(w(),typeof ResizeObserver>"u")return;const _=new ResizeObserver(w);return _.observe(i),()=>_.disconnect()},[]);const l=j&&h>=m+u,v=l&&!o,y=v?{WebkitMaskImage:`linear-gradient(to bottom, black 0, black calc(100% - ${E}px), transparent 100%)`,maskImage:`linear-gradient(to bottom, black 0, black calc(100% - ${E}px), transparent 100%)`}:void 0;return(0,r.jsxs)("div",{className:d("fold-curtain",S),"data-expanded":o?"true":"false",children:[(0,r.jsx)("div",{ref:f,className:d("fold-curtain__content relative overflow-hidden",p&&"motion-safe:transition-(--tp-max-height) motion-reduce:transition-none",N),style:{maxHeight:v?`${m}px`:l?`${h}px`:void 0,transitionDuration:p?`${P}ms`:void 0,transitionTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",...y},children:e}),l?(0,r.jsx)("div",{className:"fold-curtain__toggle mt-2 flex justify-center print:hidden",children:(0,r.jsxs)(z,{type:"button",variant:"ghost",size:"sm","aria-expanded":o,onClick:n(()=>{C(!0),T(i=>!i)},"onClick"),className:d("h-7 px-2 text-xs",I),children:[o?b:a,o?(0,r.jsx)(R,{className:"h-3.5 w-3.5"}):(0,r.jsx)(M,{className:"h-3.5 w-3.5"})]})}):null]})}n(X,"FoldCurtain");export{X as t};
@@ -0,0 +1 @@
1
+ var W=Object.defineProperty;var r=(s,n)=>W(s,"name",{value:n,configurable:!0});import{i as U}from"./rolldown-runtime-ZpX3ckPj.js";import{l as N,na as H,ta as V}from"./createLucideIcon-Dp_BESPI.js";import{r as k}from"./star-CpH09lE0.js";import{r as g}from"./queryKeys-Sk0U6x0H.js";import{a as G,c as Q,i as X,n as J,o as Y,r as Z,s as ee,t as se}from"./alert-dialog-BvLBb6EL.js";import{c as S,d as ne,f as te,i as b,p as B,r as E,t as $,u as re}from"./dropdown-menu-CR4r_wCy.js";import{t as F}from"./check-Cn0uuQ_e.js";import{t as le}from"./chevron-down-DA6rxxgD.js";import{t as ae}from"./ellipsis-D-B_YyXO.js";import{t as h}from"./button-bS07vQAg.js";import{t as I}from"./plus--_-YgodI.js";import{t as oe}from"./search-ibIk5iio.js";import{t as ie}from"./trash-DR-HYzK4.js";import{t as de}from"./x-C-YdLCiV.js";import{a as ce,i as me,n as ue,r as fe,s as xe,t as he}from"./dialog-BbBEA9p-.js";import{t as pe}from"./input-Cq0iBDAN.js";import{o as je,r as ge,s as be,t as ye}from"./sheet-CBSmXpkT.js";var Ve={list:r((s,n)=>g.get(`/companies/${encodeURIComponent(s)}/folders?kind=${n}`),"list"),create:r((s,n)=>g.post(`/companies/${encodeURIComponent(s)}/folders`,n),"create"),ensureMy:r((s,n={})=>g.post(`/companies/${encodeURIComponent(s)}/folders/ensure-my`,n),"ensureMy"),update:r((s,n,t)=>g.patch(`/companies/${encodeURIComponent(s)}/folders/${encodeURIComponent(n)}`,t),"update"),moveFolder:r((s,n,t)=>g.post(`/companies/${encodeURIComponent(s)}/folders/${encodeURIComponent(n)}/move`,t),"moveFolder"),moveItem:r((s,n)=>g.post(`/companies/${encodeURIComponent(s)}/folders/items/move`,n),"moveItem"),delete:r((s,n)=>g.delete(`/companies/${encodeURIComponent(s)}/folders/${encodeURIComponent(n)}`),"delete")},p=U(H(),1);function Ge(s){return s.systemKey==="bundled"||s.systemKey?.startsWith("bundled:")?!0:s.path==="bundled"||s.path.startsWith("bundled/")}r(Ge,"isBundledFolder");function Qe(s){return s.systemKey==="projects"||s.systemKey?.startsWith("project:")?!0:s.path==="projects"||s.path.startsWith("projects/")}r(Qe,"isProjectsFolder");function _(s){s.sort((n,t)=>n.folder.position-t.folder.position||n.folder.name.localeCompare(t.folder.name));for(const n of s)_(n.children)}r(_,"sortNodes");function ve(s){const n=new Map,t=new Map;for(const d of s)n.set(d.id,d),t.set(d.id,{folder:d,children:[]});const l=[];for(const d of s){const a=t.get(d.id),j=d.parentId?t.get(d.parentId):null;j?j.children.push(a):l.push(a)}_(l);let o=null,i=null,m=null;const c=[];for(const d of l)switch(d.folder.systemKey){case"my":o=d;break;case"projects":i=d;break;case"bundled":m=d;break;default:c.push(d)}const x=new Map;for(const[d,a]of t)x.set(d,a.children);const u=[];return o&&u.push(o),u.push(...c),i&&u.push(i),m&&u.push(m),{my:o,company:c,projects:i,bundled:m,byId:n,childrenById:x,roots:u}}r(ve,"buildSkillFolderTree");function Xe(s,n){const t=new Set([n]),l=[n];for(;l.length>0;){const o=l.pop();for(const i of s.childrenById.get(o)??[])t.has(i.folder.id)||(t.add(i.folder.id),l.push(i.folder.id))}return t}r(Xe,"subtreeFolderIds");function Ne(s,n){const t=[];let l=s.byId.get(n);const o=new Set;for(;l&&!o.has(l.id);)o.add(l.id),t.unshift(l),l=l.parentId?s.byId.get(l.parentId):void 0;return t}r(Ne,"folderBreadcrumbTrail");function A(s){switch(s.systemKey){case"my":return"My Skills";case"projects":return"Projects";case"bundled":return"Bundled";default:return s.name}}r(A,"reservedRootLabel");function Je(s,n){if(!n)return null;const t=Ne(s,n);if(t.length===0)return null;const l=t.map(o=>A(o));return t[0]?.systemKey||l.unshift("Organization"),l.join(" / ")}r(Je,"skillFolderDisplayPath");function we(s){return s.replace(/[-_]+/g," ").replace(/\b\w/g,n=>n.toUpperCase())}r(we,"humanizeFolderPathSegment");function Ye(s){if(!s)return null;if(s.includes(" / "))return s;const n=s.split("/").filter(Boolean);if(n.length===0)return null;const t=n[0]?.toLowerCase(),l=n.map(we);return t==="my"?l[0]="My Skills":t==="projects"?l[0]="Projects":t==="bundled"?l[0]="Bundled":l.unshift("Organization"),l.join(" / ")}r(Ye,"skillFolderPathDisplayFallback");function ke(s){return ve(s?.folders??[])}r(ke,"treeFromResult");var e=U(V(),1),C=["indigo","violet","emerald","cyan","amber","slate"],T={indigo:"var(--folder-color-indigo)",violet:"var(--folder-color-violet)",emerald:"var(--folder-color-emerald)",cyan:"var(--folder-color-cyan)",amber:"var(--folder-color-amber)",slate:"var(--folder-color-slate)"};function Ze(s){return s?s==="unfiled"?"unfiled":s:"all"}r(Ze,"normalizeFolderSelection");function es(s){return s==="all"?"":s==="unfiled"?"unfiled":s}r(es,"folderSearchValue");function Ce(s,n){return n==="all"||n==="unfiled"?null:s.find(t=>t.id===n)??null}r(Ce,"selectedFolderFromList");function y({color:s,className:n}){const t=s?T[s]??s:"var(--folder-color-slate)";return(0,e.jsx)("span",{"aria-hidden":"true",className:N("h-2.5 w-2.5 shrink-0 rounded-sm border border-line/40",n),style:{backgroundColor:t}})}r(y,"FolderSwatch");function De({folders:s,selection:n,allLabel:t}){return n==="all"?t:n==="unfiled"?"Unfiled":s.find(l=>l.id===n)?.name??t}r(De,"selectionLabel");function Se(s,n){return s?n==="all"?s.allCount:n==="unfiled"?s.unfiledCount:s.folders.find(t=>t.id===n)?.itemCount??0:0}r(Se,"selectionCount");function ss({result:s,selection:n,allLabel:t,onClick:l}){const o=s?Ce(s.folders,n):null;return(0,e.jsxs)(h,{variant:"secondary",size:"sm",className:"max-w-full justify-start",onClick:l,children:[n==="all"?(0,e.jsx)(k,{className:"mr-2 h-3.5 w-3.5"}):(0,e.jsx)(y,{color:o?.color,className:"mr-2"}),(0,e.jsx)("span",{className:"truncate",children:De({folders:s?.folders??[],selection:n,allLabel:t})}),(0,e.jsx)("span",{className:"ml-2 text-xs text-ink-3",children:Se(s,n)}),(0,e.jsx)(le,{className:"ml-1 h-3.5 w-3.5 shrink-0"})]})}r(ss,"FolderChip");function ns({result:s,selection:n,itemLabelPlural:t,allLabel:l,loading:o=!1,onSelect:i,onCreate:m,onRename:c,onEdit:x,onDelete:u}){const d=s?.folders??[],[a,j]=(0,p.useState)(null),[w,R]=(0,p.useState)("");(0,p.useEffect)(()=>{a&&(d.find(f=>f.id===a)||j(null))},[d,a]);function K(f){j(f.id),R(f.name)}r(K,"startRename");function O(f){const v=w.trim();v&&v!==f.name&&c(f,v),j(null)}r(O,"commitRename");function M(f,v,P,q){const z=n===f;return(0,e.jsxs)("button",{type:"button",className:N("grid w-full grid-cols-(--gtc-folder-row) items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors hover:bg-bg-3/40",z?"bg-bg-3/60 text-ink":"text-ink-3"),"aria-current":z?"page":void 0,onClick:r(()=>i(f),"onClick"),children:[(0,e.jsx)("span",{className:"h-4 w-4",children:q}),(0,e.jsx)("span",{className:"truncate",children:v}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:P})]})}return r(M,"renderVirtualRow"),(0,e.jsxs)("nav",{"aria-label":`${t} folders`,className:"hidden w-(--sz-folder-rail) shrink-0 border-r border-line pr-3 md:block",children:[(0,e.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-2",children:[(0,e.jsx)("div",{className:"text-(length:--text-micro) font-medium uppercase tracking-wide text-ink-3",children:"Folders"}),(0,e.jsx)(h,{variant:"ghost",size:"icon-sm",title:"New folder",onClick:m,children:(0,e.jsx)(I,{className:"h-3.5 w-3.5"})})]}),o?(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("div",{className:"h-7 rounded-md bg-bg-3/60"}),(0,e.jsx)("div",{className:"h-7 rounded-md bg-bg-3/40"}),(0,e.jsx)("div",{className:"h-7 rounded-md bg-bg-3/30"})]}):(0,e.jsxs)("div",{className:"space-y-0.5",children:[M("all",l,s?.allCount??0,(0,e.jsx)(k,{className:"h-3.5 w-3.5"})),d.map(f=>(0,e.jsx)(Fe,{folder:f,active:n===f.id,renaming:a===f.id,renameDraft:w,onRenameDraftChange:R,onRenameCommit:r(()=>O(f),"onRenameCommit"),onRenameCancel:r(()=>j(null),"onRenameCancel"),onSelect:r(()=>i(f.id),"onSelect"),onStartRename:r(()=>K(f),"onStartRename"),onEdit:r(()=>x(f),"onEdit"),onDelete:r(()=>u(f),"onDelete")},f.id)),(0,e.jsx)("div",{className:"px-2 pb-1 pt-3 text-(length:--text-micro) font-medium uppercase tracking-wide text-ink-3",children:"System"}),M("unfiled","Unfiled",s?.unfiledCount??0,(0,e.jsx)(y,{color:null,className:"mt-0.5"}))]})]})}r(ns,"FolderRail");function Fe({folder:s,active:n,renaming:t,renameDraft:l,onRenameDraftChange:o,onRenameCommit:i,onRenameCancel:m,onSelect:c,onStartRename:x,onEdit:u,onDelete:d}){return(0,e.jsxs)("div",{className:N("group grid grid-cols-(--gtc-folder-row-actions) items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors hover:bg-bg-3/40",n?"bg-bg-3/60 text-ink":"text-ink-3"),children:[(0,e.jsx)("span",{className:"h-4 w-4"}),(0,e.jsxs)("button",{type:"button",className:"flex min-w-0 items-center gap-2 text-left","aria-current":n?"page":void 0,onClick:c,onDoubleClick:x,children:[(0,e.jsx)(y,{color:s.color}),t?(0,e.jsx)("input",{value:l,onChange:r(a=>o(a.target.value),"onChange"),onClick:r(a=>a.stopPropagation(),"onClick"),onKeyDown:r(a=>{a.key==="Enter"&&i(),a.key==="Escape"&&m()},"onKeyDown"),onBlur:i,className:"h-6 min-w-0 flex-1 rounded-sm border border-line bg-bg px-1 text-sm outline-none",autoFocus:!0}):(0,e.jsx)("span",{className:"truncate",children:s.name})]}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:s.itemCount}),(0,e.jsxs)($,{children:[(0,e.jsx)(B,{asChild:!0,children:(0,e.jsx)(h,{variant:"ghost",size:"icon-sm",className:"h-6 w-6 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100","aria-label":`Folder actions for ${s.name}`,children:(0,e.jsx)(ae,{className:"h-3.5 w-3.5"})})}),(0,e.jsxs)(E,{align:"end",children:[(0,e.jsx)(b,{onSelect:x,children:"Rename"}),(0,e.jsx)(b,{onSelect:u,children:"Edit color"}),(0,e.jsx)(S,{}),(0,e.jsxs)(b,{variant:"destructive",onSelect:d,children:[(0,e.jsx)(ie,{className:"h-3.5 w-3.5"}),"Delete"]})]})]})]})}r(Fe,"FolderRailItem");function ts({storageKey:s,itemLabelPlural:n,onCreateFolder:t}){const[l,o]=(0,p.useState)(()=>{try{return window.localStorage.getItem(s)==="1"}catch{return!1}});if(l)return null;function i(){o(!0);try{window.localStorage.setItem(s,"1")}catch{}}return r(i,"dismiss"),(0,e.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-2 rounded-md border border-line bg-bg-3/40 px-3 py-2 text-sm",children:[(0,e.jsx)(k,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,e.jsxs)("span",{className:"min-w-0 flex-1 text-ink-3",children:["Group these ",n," into folders to keep things tidy."]}),(0,e.jsx)(h,{size:"sm",variant:"secondary",onClick:t,children:"Create your first folder"}),(0,e.jsx)(h,{size:"icon-sm",variant:"ghost","aria-label":"Dismiss folder suggestion",onClick:i,children:(0,e.jsx)(de,{className:"h-3.5 w-3.5"})})]})}r(ts,"AllUnfiledBanner");function rs({open:s,onOpenChange:n,result:t,selection:l,allLabel:o,itemLabelPlural:i,onSelect:m,onCreate:c}){function x(a){m(a),n(!1)}r(x,"select");const u=(0,p.useMemo)(()=>ke(t),[t]);function d(a,j){return(0,e.jsxs)("div",{"data-folder-id":a.folder.id,children:[(0,e.jsx)(D,{id:a.folder.id,label:j??a.folder.name,count:a.folder.itemCount,color:a.folder.color,selected:l===a.folder.id,onSelect:x}),a.children.length>0?(0,e.jsx)("div",{className:"pl-3",children:a.children.map(w=>d(w))}):null]},a.folder.id)}return r(d,"renderBranch"),(0,e.jsx)(ye,{open:s,onOpenChange:n,children:(0,e.jsxs)(ge,{side:"bottom",className:"max-h-(--sz-folder-sheet-max) rounded-t-lg pb-4",children:[(0,e.jsx)(je,{className:"border-b border-line px-4 py-3",children:(0,e.jsxs)(be,{children:[i," folders"]})}),(0,e.jsxs)("div",{className:"overflow-y-auto px-3",children:[(0,e.jsx)(D,{id:"all",label:o,count:t?.allCount??0,selected:l==="all",onSelect:x,all:!0}),t?.kind==="skill"?(0,e.jsxs)(e.Fragment,{children:[u.my?d(u.my,"My Skills"):null,(0,e.jsx)("div",{className:"px-2 pb-0.5 pt-2 text-(length:--text-micro) font-medium uppercase tracking-wide text-ink-3",children:"Organization"}),u.company.map(a=>d(a)),u.projects?d(u.projects,"Projects"):null,u.bundled?d(u.bundled,"Bundled"):null]}):u.roots.map(a=>d(a,A(a.folder))),(0,e.jsx)(D,{id:"unfiled",label:"Unfiled",count:t?.unfiledCount??0,selected:l==="unfiled",onSelect:x})]}),(0,e.jsx)("div",{className:"border-t border-line px-4 pt-3",children:(0,e.jsxs)(h,{size:"sm",variant:"secondary",className:"w-full",onClick:c,children:[(0,e.jsx)(I,{className:"mr-2 h-3.5 w-3.5"}),"New folder"]})})]})})}r(rs,"MobileFolderSheet");function D({id:s,label:n,count:t,color:l,selected:o,all:i=!1,onSelect:m}){return(0,e.jsxs)("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-bg-3/50",onClick:r(()=>m(s),"onClick"),children:[i?(0,e.jsx)(k,{className:"h-3.5 w-3.5 text-ink-3"}):(0,e.jsx)(y,{color:l}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate",children:n}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:t}),o?(0,e.jsx)(F,{className:"h-3.5 w-3.5"}):null]})}r(D,"MobileFolderRow");function ls({folders:s,currentFolderId:n,onMove:t,onCreateAndMove:l}){return(0,e.jsxs)(re,{children:[(0,e.jsx)(te,{children:"Move to..."}),(0,e.jsx)(ne,{className:"w-56",children:(0,e.jsx)(L,{folders:s,currentFolderId:n,onMove:t,onCreateAndMove:l})})]})}r(ls,"MoveToMenu");function L({folders:s,currentFolderId:n,onMove:t,onCreateAndMove:l}){const[o,i]=(0,p.useState)(""),m=(0,p.useMemo)(()=>{const c=o.trim().toLowerCase();return c?s.filter(x=>x.name.toLowerCase().includes(c)):s},[s,o]);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[(0,e.jsx)(oe,{className:"h-3.5 w-3.5 text-ink-3"}),(0,e.jsx)("input",{value:o,onChange:r(c=>i(c.target.value),"onChange"),onKeyDown:r(c=>c.stopPropagation(),"onKeyDown"),placeholder:"Search folders",className:"h-7 min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-ink-3"})]}),(0,e.jsx)(S,{}),(0,e.jsxs)(b,{onSelect:r(()=>t(null),"onSelect"),children:[(0,e.jsx)(y,{color:null}),"Unfiled",n==null?(0,e.jsx)(F,{className:"ml-auto h-3.5 w-3.5"}):null]}),m.map(c=>(0,e.jsxs)(b,{onSelect:r(()=>t(c.id),"onSelect"),children:[(0,e.jsx)(y,{color:c.color}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate",children:c.name}),n===c.id?(0,e.jsx)(F,{className:"ml-auto h-3.5 w-3.5"}):null]},c.id)),m.length===0?(0,e.jsx)("div",{className:"px-2 py-2 text-xs text-ink-3",children:"No folders match."}):null,(0,e.jsx)(S,{}),(0,e.jsxs)(b,{onSelect:l,children:[(0,e.jsx)(I,{className:"h-3.5 w-3.5"}),"New folder..."]})]})}r(L,"MoveToMenuItems");function as({open:s,kind:n,folder:t,onOpenChange:l,onSubmit:o,pending:i=!1}){const[m,c]=(0,p.useState)(""),[x,u]=(0,p.useState)(C[0]??null),d=!!t;return(0,p.useEffect)(()=>{s&&(c(t?.name??""),u(t?.color??C[0]??null))},[t,s]),(0,e.jsx)(he,{open:s,onOpenChange:l,children:(0,e.jsxs)(ue,{className:"sm:max-w-md",children:[(0,e.jsxs)(ce,{children:[(0,e.jsx)(xe,{children:d?"Edit folder":"Create folder"}),(0,e.jsx)(fe,{children:n==="routine"?"Organize routines in this organization.":"Organize installed organization skills."})]}),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("label",{className:"text-sm font-medium",htmlFor:"folder-name",children:"Name"}),(0,e.jsx)(pe,{id:"folder-name",value:m,onChange:r(a=>c(a.target.value),"onChange"),autoFocus:!0,onKeyDown:r(a=>{a.key==="Enter"&&m.trim()&&o({name:m.trim(),color:x})},"onKeyDown")})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("div",{className:"text-sm font-medium",children:"Color"}),(0,e.jsxs)("div",{className:"flex flex-wrap gap-2",children:[C.map(a=>(0,e.jsx)("button",{type:"button","aria-label":`Use folder color ${a}`,className:N("h-7 w-7 rounded-md border border-line",x===a&&"ring-2 ring-focus ring-offset-2 ring-offset-bg"),style:{backgroundColor:T[a]},onClick:r(()=>u(a),"onClick")},a)),(0,e.jsx)("button",{type:"button",className:N("h-7 rounded-md border border-line px-2 text-xs text-ink-3",x==null&&"ring-2 ring-focus ring-offset-2 ring-offset-bg"),onClick:r(()=>u(null),"onClick"),children:"None"})]})]})]}),(0,e.jsxs)(me,{children:[(0,e.jsx)(h,{variant:"ghost",onClick:r(()=>l(!1),"onClick"),disabled:i,children:"Cancel"}),(0,e.jsx)(h,{onClick:r(()=>o({name:m.trim(),color:x}),"onClick"),disabled:i||!m.trim(),children:i?"Saving...":d?"Save":"Create folder"})]})]})})}r(as,"FolderFormDialog");function os({open:s,folder:n,itemLabelPlural:t,onOpenChange:l,onConfirm:o,pending:i=!1}){return(0,e.jsx)(se,{open:s,onOpenChange:l,children:(0,e.jsxs)(X,{children:[(0,e.jsxs)(ee,{children:[(0,e.jsx)(Q,{children:"Delete folder"}),(0,e.jsxs)(G,{children:["The ",n?.itemCount??0," ",t," in this folder won't be deleted. They'll move to Unfiled."]})]}),(0,e.jsxs)(Y,{children:[(0,e.jsx)(Z,{disabled:i,children:"Cancel"}),(0,e.jsx)(J,{className:"bg-bad text-accent-ink hover:bg-bad/90",disabled:i||!n,onClick:r(m=>{m.preventDefault(),o()},"onClick"),children:i?"Deleting...":"Delete folder"})]})]})})}r(os,"DeleteFolderDialog");function is({selectedCount:s,folders:n,onMove:t,onCreateAndMove:l,onClear:o,onDone:i}){return s===0?null:(0,e.jsxs)("div",{className:"sticky top-2 z-10 flex flex-wrap items-center gap-2 rounded-md border border-line bg-bg/95 px-3 py-2 shadow-sm backdrop-blur",children:[(0,e.jsxs)("span",{className:"mr-auto text-sm text-ink-3",children:[s," selected"]}),(0,e.jsxs)($,{children:[(0,e.jsx)(B,{asChild:!0,children:(0,e.jsx)(h,{size:"sm",variant:"secondary",children:"Move to..."})}),(0,e.jsx)(E,{align:"end",className:"w-56",children:(0,e.jsx)(L,{folders:n,currentFolderId:void 0,onMove:t,onCreateAndMove:l})})]}),(0,e.jsx)(h,{size:"sm",variant:"ghost",onClick:o,children:"Deselect all"}),(0,e.jsx)(h,{size:"sm",onClick:i,children:"Done"})]})}r(is,"BulkBar");export{Je as _,as as a,ke as b,rs as c,Ze as d,Ce as f,A as g,Qe as h,ss as i,ls as l,Ge as m,is as n,ns as o,Ne as p,os as r,y as s,ts as t,es as u,Ye as v,Ve as x,Xe as y};
@@ -0,0 +1,2 @@
1
+ var ze=Object.defineProperty;var t=(s,a)=>ze(s,"name",{value:a,configurable:!0});import{i as fe}from"./rolldown-runtime-ZpX3ckPj.js";import{l as B,na as Me,t as qe,ta as $e}from"./createLucideIcon-Dp_BESPI.js";import{v as Oe}from"./star-CpH09lE0.js";import{X as V,_ as Q,t as R,v as G}from"./queryKeys-Sk0U6x0H.js";import{t as Fe}from"./useInfiniteQuery-DpkS2abG.js";import{n as Ge}from"./CompanyContext-dsHNbwL5.js";import{o as je,r as Re,t as J}from"./router-qrDA_fDm.js";import{n as Le,r as Ke,t as Be}from"./collapsible-9d0h08gJ.js";import{t as Qe}from"./bot-DRofiPdb.js";import{t as Ue}from"./braces-C5ZUDIxe.js";import{t as He}from"./check-Cn0uuQ_e.js";import{t as ge}from"./chevron-down-DA6rxxgD.js";import{t as We}from"./chevron-left-zJln1v3t.js";import{t as be}from"./chevron-right-dRlTJLmW.js";import{t as Je}from"./chevron-up-OGjfRrmd.js";import{t as Ve}from"./SearchableSelect-Dt_6_dds.js";import{t as Ze}from"./circle-question-mark-D9QciJpU.js";import{t as Xe}from"./code-xml-BdOLy6gM.js";import{t as F}from"./copy-B9wRjKte.js";import{t as Ye}from"./key-round-DnZyJChv.js";import{t as es}from"./link-DJXsSlVf.js";import{t as x}from"./button-bS07vQAg.js";import{t as ss}from"./plus--_-YgodI.js";import{t as ts}from"./send-C41Z1Xid.js";import{i as as,n as ns,t as is}from"./tooltip-BeXkeOXn.js";import{i as H}from"./ToastContext-Brs-4k-1.js";import{t as ls}from"./agents-B46GLJqX.js";import{t as rs}from"./projects-oY9VYW38.js";import{a as ye,i as Ne,n as ve,r as ke,s as we,t as Ce}from"./dialog-BbBEA9p-.js";import{t as L}from"./input-Cq0iBDAN.js";import{t as K}from"./skeleton-BGHeLb8T.js";import{t as A}from"./tools-CtHWMX0r.js";import{n as os}from"./BreadcrumbContext-BKgeE2st.js";import{t as cs}from"./toggle-switch-4ZdUl1cb.js";import{t as Y}from"./clipboard-CTLKYvRL.js";import{Ba as ds,Dn as ms,Na as xs}from"./index-CUNTJ_RK.js";import{a as $,r as Te}from"./shared-BbsNa_97.js";import{_ as us,a as hs,b as oe,c as ps,d as fs,f as Se,g as js,h as O,i as gs,l as bs,o as le,p as Ae,r as U,s as Pe,t as ys,u as ce,v as ie,x as Ns,y as vs}from"./CopyableGatewayUrl-C5DM-jlb.js";var _e={name:"mouse-pointer-2",size:24,node:[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]};_e.node;var ks=qe(_e),o=fe(Me(),1),e=fe($e(),1),ws={cursor:ks,claude_desktop:Qe,vscode:Xe,claude_code:xs,opencode:Ue};function Cs({gateway:s,open:a,onOpenChange:i,createdTokens:p,onTokenCreated:c}){const r=V(),{pushToast:y}=H(),u=(0,o.useMemo)(()=>js(s.clientSnippets??[]),[s.clientSnippets]),N=(0,o.useMemo)(()=>`${typeof window<"u"?window.location.origin:""}${s.endpointPath}`,[s.endpointPath]),f=(0,o.useMemo)(()=>p.filter(l=>{const C=s.tokens.find(M=>M.id===l.id),S=ie(C??l);return S==="active"||S==="expiring"}),[p,s.tokens]),k=(0,o.useMemo)(()=>[{id:"tokens",label:"Available this session",options:f.map(l=>({key:l.id,value:l.id,label:l.name,title:l.clientLabel,searchText:`${l.name} ${l.clientLabel} ${l.tokenPrefix}`,token:l}))}],[f]),[j,w]=(0,o.useState)(u[0]?.client??"raw_url"),[h,v]=(0,o.useState)(""),g=f.find(l=>l.id===h)??null;(0,o.useEffect)(()=>{a&&(w(u[0]?.client??"raw_url"),v(l=>f.some(C=>C.id===l)?l:f[0]?.id??""))},[f,a,u]);const d=Q({mutationFn:t(()=>{const l=Pe(s);return A.createGatewayToken(s.companyId,s.id,{name:l,clientLabel:l,ownerNote:"",allowedActions:["tools/list","tools/call"],expiresAt:new Date(Date.now()+7776e6).toISOString()})},"mutationFn"),onSuccess:t(async l=>{c(l),v(l.id),y({title:"Token issued",body:"The copy buttons now include its full Authorization header.",tone:"success"}),await r.invalidateQueries({queryKey:U(s.companyId)})},"onSuccess"),onError:t(l=>y({title:"Token was not issued",body:l instanceof Error?l.message:String(l),tone:"error"}),"onError")});async function D(l,C){try{await Y(l),y({title:"Copied",body:C,tone:"success"})}catch(S){y({title:"Copy failed",body:S instanceof Error?S.message:"Clipboard access is unavailable.",tone:"error"})}}t(D,"copyText");const T=u.find(l=>l.client===j)??null,P=T?ce(T.config,{endpointPath:s.endpointPath,endpoint:N,token:g?O(g):"pcgw_•••"}):"",b=T&&g?ce(T.config,{endpointPath:s.endpointPath,endpoint:N,token:g.token}):null;function _(){d.isPending||d.mutate()}return t(_,"issueToken"),(0,e.jsx)(Ce,{open:a,onOpenChange:i,children:(0,e.jsxs)(ve,{className:"sm:max-w-2xl",children:[(0,e.jsxs)(ye,{children:[(0,e.jsxs)(we,{className:"flex items-center gap-2",children:["Client snippets",(0,e.jsxs)(is,{children:[(0,e.jsx)(as,{asChild:!0,children:(0,e.jsx)("button",{type:"button","aria-label":"About client snippets",className:"text-ink-3 hover:text-ink",children:(0,e.jsx)(Ze,{className:"h-4 w-4"})})}),(0,e.jsx)(ns,{className:"max-w-xs text-xs",children:"Give this MCP gateway configuration to your tool. It does not give it access to Wardmote or skills; it only gateways calls between the client and the tools exposed here."})]})]}),(0,e.jsx)(ke,{children:"Choose a client and copy a complete, authenticated configuration."})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-line pb-3",children:[(0,e.jsx)("span",{className:"text-xs font-medium text-ink-3",children:"Authorization"}),f.length>0?(0,e.jsx)(Ve,{value:h,groups:k,onValueChange:v,placeholder:"Issue a token",searchPlaceholder:"Search tokens…",emptyMessage:"No copyable tokens.",contentWidth:"auto",triggerClassName:"h-8 w-auto max-w-xs rounded-full px-3",renderValue:t(l=>l?`${l.label} · ${O(l.token)}`:"Issue a token","renderValue"),renderOption:t(l=>(0,e.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,e.jsx)("span",{className:"truncate",children:l.label}),(0,e.jsx)("span",{className:"truncate font-mono text-(length:--text-micro) text-ink-3",children:O(l.token)})]}),"renderOption"),createItem:{render:t(()=>(0,e.jsx)("span",{children:"+ Issue a new token"}),"render"),onSelect:_}}):(0,e.jsx)(x,{type:"button",variant:"secondary",size:"sm",className:"rounded-full",disabled:d.isPending,onClick:_,children:d.isPending?"Issuing…":"Issue a token"}),g?(0,e.jsxs)(x,{type:"button",variant:"ghost",size:"sm",onClick:t(()=>{D(`Authorization: Bearer ${g.token}`,"Authorization header")},"onClick"),children:[(0,e.jsx)(F,{className:"mr-1 h-3.5 w-3.5"}),"Copy header"]}):null]}),g?null:(0,e.jsxs)("p",{className:"text-xs text-ink-3",children:["Issue a token before copying a snippet; the full ",(0,e.jsx)("code",{children:"Authorization: Bearer …"})," header is required. Existing token secrets cannot be retrieved again, so only tokens issued in this page session can fill a snippet."]}),(0,e.jsxs)("div",{className:"grid gap-4 sm:grid-cols-(--gtc-10)",children:[(0,e.jsxs)("nav",{className:"flex gap-1 overflow-x-auto sm:flex-col","aria-label":"Clients",children:[u.map(l=>{const C=ws[l.client];return(0,e.jsxs)("button",{type:"button",onClick:t(()=>w(l.client),"onClick"),className:B("flex shrink-0 items-center gap-2 rounded-md px-3 py-1.5 text-left text-sm transition-colors",j===l.client?"bg-bg-3 font-medium text-ink":"text-ink-3 hover:bg-bg-3/60"),children:[(0,e.jsx)(C,{className:"h-4 w-4 shrink-0"}),l.label]},l.client)}),(0,e.jsxs)("button",{type:"button",onClick:t(()=>w("raw_url"),"onClick"),className:B("flex shrink-0 items-center gap-2 rounded-md px-3 py-1.5 text-left text-sm transition-colors",j==="raw_url"?"bg-bg-3 font-medium text-ink":"text-ink-3 hover:bg-bg-3/60"),children:[(0,e.jsx)(es,{className:"h-4 w-4 shrink-0"}),"Raw URL"]})]}),(0,e.jsxs)("div",{className:"min-w-0 space-y-3",children:[j==="raw_url"?(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-ink",children:"Endpoint URL"}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("code",{className:"min-w-0 flex-1 truncate rounded-md bg-bg-3 px-3 py-2 font-mono text-xs text-ink-3",children:N}),(0,e.jsxs)(x,{variant:"secondary",size:"sm",onClick:t(()=>{D(N,"Endpoint URL")},"onClick"),children:[(0,e.jsx)(F,{className:"mr-1 h-3.5 w-3.5"}),"Copy"]})]})]}),(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-ink",children:"Authorization header"}),(0,e.jsx)("code",{className:"block truncate rounded-md bg-bg-3 px-3 py-2 font-mono text-xs text-ink-3",children:g?`Authorization: Bearer ${O(g)}`:"Authorization: Bearer pcgw_•••"})]})]}):T?(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-ink",children:T.label}),(0,e.jsxs)(x,{variant:"secondary",size:"sm",disabled:!b,onClick:t(()=>b&&void D(b,`${T.label} config`),"onClick"),children:[(0,e.jsx)(F,{className:"mr-1 h-3.5 w-3.5"}),"Copy"]})]}),(0,e.jsx)("pre",{className:"max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md bg-bg-3 p-3 font-mono text-xs text-ink-3",children:P}),T.notes.length>0?(0,e.jsx)("ul",{className:"space-y-1 text-xs text-ink-3",children:T.notes.map(l=>(0,e.jsx)("li",{children:l},l))}):null]}):(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No client snippets available for this gateway."}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Treat the token like a password. Anyone holding it can call the tools this gateway allows. Revoke it if it leaks."})]})]}),(0,e.jsx)(Ne,{children:(0,e.jsxs)(x,{onClick:t(()=>i(!1),"onClick"),children:[(0,e.jsx)(He,{className:"mr-1.5 h-4 w-4"}),"Done"]})})]})})}t(Cs,"ConnectClientDialog");function Ts({companyId:s,gateway:a,profiles:i,open:p,onOpenChange:c}){const r=V(),{pushToast:y}=H(),[u,N]=(0,o.useState)(a.name),[f,k]=(0,o.useState)(a.description??""),[j,w]=(0,o.useState)(a.profileId);(0,o.useEffect)(()=>{p&&(N(a.name),k(a.description??""),w(a.profileId))},[a,p]);const h=i.filter(d=>d.status!=="archived"),v=Q({mutationFn:t(()=>A.updateGateway(s,a.id,{name:u.trim(),description:f.trim()||null,profileId:j}),"mutationFn"),onSuccess:t(async d=>{y({title:"Gateway updated",body:d.name,tone:"success"}),await r.invalidateQueries({queryKey:U(s)}),c(!1)},"onSuccess"),onError:t(d=>{y({title:"Gateway was not updated",body:d instanceof Error?d.message:String(d),tone:"error"})},"onError")});function g(d){d.preventDefault(),!(!u.trim()||!j)&&v.mutate()}return t(g,"submit"),(0,e.jsx)(Ce,{open:p,onOpenChange:c,children:(0,e.jsxs)(ve,{className:"sm:max-w-lg",children:[(0,e.jsxs)(ye,{children:[(0,e.jsx)(we,{children:"Edit gateway"}),(0,e.jsx)(ke,{children:"Change the label or the access profile that controls which tools this endpoint exposes."})]}),(0,e.jsxs)("form",{className:"space-y-4",onSubmit:g,children:[(0,e.jsxs)("label",{className:"block space-y-1.5",children:[(0,e.jsx)("span",{className:"text-xs font-medium text-ink-3",children:"Name"}),(0,e.jsx)(L,{value:u,onChange:t(d=>N(d.target.value),"onChange"),required:!0,autoFocus:!0})]}),(0,e.jsxs)("label",{className:"block space-y-1.5",children:[(0,e.jsx)("span",{className:"text-xs font-medium text-ink-3",children:"Access profile"}),(0,e.jsx)("select",{className:"w-full rounded-md border border-line-strong bg-bg px-3 py-2 text-sm",value:j,onChange:t(d=>w(d.target.value),"onChange"),required:!0,children:h.map(d=>(0,e.jsxs)("option",{value:d.id,children:[d.name," — ",le(d)]},d.id))})]}),(0,e.jsxs)("label",{className:"block space-y-1.5",children:[(0,e.jsx)("span",{className:"text-xs font-medium text-ink-3",children:"Description (optional)"}),(0,e.jsx)("textarea",{className:"min-h-16 w-full rounded-md border border-line-strong bg-bg px-3 py-2 text-sm",value:f,onChange:t(d=>k(d.target.value),"onChange"),placeholder:"Who this endpoint is for."})]}),(0,e.jsxs)(Ne,{children:[(0,e.jsx)(x,{type:"button",variant:"ghost",onClick:t(()=>c(!1),"onClick"),children:"Cancel"}),(0,e.jsx)(x,{type:"submit",disabled:v.isPending||!u.trim()||!j,children:v.isPending?"Saving…":"Save changes"})]})]})]})})}t(Ts,"EditGatewayDialog");function Ss({gateway:s,profile:a,apps:i,agentNames:p,projectNames:c,toggleDisabled:r,onToggle:y}){const{pushToast:u}=H(),N=`${typeof window<"u"?window.location.origin:""}${s.endpointPath}`,f=hs(s),k=bs(s),j=i.filter(g=>g.needsAttention),w=Ae(s),h=["{",' "mcpServers": {',` "wardmote-${s.displaySlug}": {`,` "url": "${N}",`,' "headers": { "Authorization": "Bearer pcgw_•••_TOKEN" }'," }"," }","}"].join(`
2
+ `);async function v(g,d){try{await Y(g),u({title:"Copied",body:d,tone:"success"})}catch{u({title:"Copy failed",body:"Clipboard access is unavailable.",tone:"error"})}}return t(v,"copy"),(0,e.jsxs)("div",{className:"space-y-5",children:[(0,e.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[(0,e.jsxs)("div",{className:"rounded-lg border border-line p-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium text-ink-3",children:w?"On":"Off"}),(0,e.jsx)("div",{className:"mt-2",children:(0,e.jsx)(cs,{checked:w,disabled:r,onCheckedChange:y,"aria-label":"Toggle gateway"})}),(0,e.jsx)("p",{className:"mt-2 text-xs text-ink-3",children:"Toggle the whole gateway off here."})]}),(0,e.jsxs)(se,{label:"Apps",children:[i.length," ",i.length===1?"app":"apps",a?` · ${le(a)}`:""]}),(0,e.jsxs)(se,{label:"Tokens",children:[f," active",k>0?` · ${k} expiring`:""]}),(0,e.jsx)(se,{label:"Health",children:j.length===0?"All green":`${j.length} needs attention`})]}),(0,e.jsxs)("section",{className:"rounded-lg border border-line p-4",children:[(0,e.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"Who can use it"}),(0,e.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Anyone holding an active token below, restricted by the rules in the bound profile."})]})}),(0,e.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,e.jsxs)(te,{children:["Scope · ",fs(s,c,p)]}),(0,e.jsxs)(te,{children:["Profile · ",a?.name??"Unavailable"]}),(0,e.jsxs)(te,{children:[f," active ",f===1?"token":"tokens"]})]})]}),(0,e.jsxs)("section",{className:"rounded-lg border border-line p-4",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"Apps in this gateway"}),i.length===0?(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This gateway’s profile doesn’t include any apps yet."}):(0,e.jsx)("ul",{className:"mt-3 divide-y divide-line",children:i.map(g=>(0,e.jsx)(As,{app:g},g.application.id))})]}),(0,e.jsxs)("section",{className:"rounded-lg border border-line bg-bg-3/30 p-4",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"How clients connect"}),(0,e.jsxs)(x,{variant:"secondary",size:"sm",onClick:t(()=>{v(h,"Client config")},"onClick"),children:[(0,e.jsx)(F,{className:"mr-1 h-3.5 w-3.5"}),"Copy"]})]}),(0,e.jsx)("pre",{className:"mt-3 overflow-auto whitespace-pre-wrap break-words rounded bg-bg p-3 font-mono text-xs text-ink-3",children:h})]})]})}t(Ss,"OverviewPanel");function se({label:s,children:a}){return(0,e.jsxs)("div",{className:"rounded-lg border border-line p-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium text-ink-3",children:s}),(0,e.jsx)("div",{className:"mt-2 text-sm font-semibold text-ink",children:a})]})}t(se,"StatCard");function te({children:s}){return(0,e.jsx)("span",{className:"inline-flex items-center rounded-full border border-line px-3 py-1 text-xs font-medium text-ink",children:s})}t(te,"Chip");function As({app:s}){const a=s.connection?`/apps/${s.connection.id}/permissions`:`/apps/app/${s.application.id}/permissions`;return(0,e.jsxs)("li",{className:"flex items-center justify-between gap-3 py-2.5",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)(J,{to:a,className:"font-medium text-ink hover:underline",children:Se(s)}),(0,e.jsxs)("div",{className:"text-xs text-ink-3",children:[s.toolCount," ",s.toolCount===1?"tool":"tools",s.needsAttention&&s.attentionReason?` · ${s.attentionReason}`:""]})]}),(0,e.jsx)("span",{className:B("shrink-0 rounded-full border px-2 py-0.5 text-xs font-medium",s.needsAttention?"border-ink bg-ink text-bg":"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"),children:s.needsAttention?"Needs attention":"Healthy"})]})}t(As,"AppRow");function Ps({apps:s,profile:a}){return(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("p",{className:"text-sm text-ink-3",children:["These apps go through this gateway. The bound profile",a?` (${a.name})`:""," decides which tools are allowed",a?` — ${le(a)}.`:"."," Change the profile under Advanced."]}),s.length===0?(0,e.jsx)("div",{className:"rounded-md border border-dashed border-line p-6 text-center text-sm text-ink-3",children:"No apps are assigned to this gateway’s profile yet."}):(0,e.jsx)("div",{className:"overflow-x-auto rounded-lg border border-line",children:(0,e.jsxs)("table",{className:"w-full min-w-(--sz-32rem) text-sm",children:[(0,e.jsx)("thead",{children:(0,e.jsxs)("tr",{className:"border-b border-line bg-bg-3/40 text-left text-(length:--text-micro) font-semibold uppercase tracking-wide text-ink-3",children:[(0,e.jsx)("th",{className:"px-4 py-2.5",children:"App"}),(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Tools"}),(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Status"}),(0,e.jsx)("th",{className:"px-4 py-2.5 text-right"})]})}),(0,e.jsx)("tbody",{children:s.map(i=>{const p=i.connection?`/apps/${i.connection.id}/permissions`:`/apps/app/${i.application.id}/permissions`;return(0,e.jsxs)("tr",{className:"border-b border-line last:border-0",children:[(0,e.jsxs)("td",{className:"px-4 py-3",children:[(0,e.jsx)(J,{to:p,className:"font-medium text-ink hover:underline",children:Se(i)}),i.needsAttention&&i.attentionReason?(0,e.jsx)("div",{className:"text-xs text-ink-3",children:i.attentionReason}):null]}),(0,e.jsxs)("td",{className:"px-4 py-3 text-ink-3",children:[i.toolCount," ",i.toolCount===1?"tool":"tools"]}),(0,e.jsx)("td",{className:"px-4 py-3",children:(0,e.jsx)("span",{className:B("inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-medium",i.needsAttention?"border-ink bg-ink text-bg":"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"),children:i.needsAttention?"Needs attention":"Healthy"})}),(0,e.jsx)("td",{className:"px-4 py-3 text-right",children:(0,e.jsx)(J,{to:p,className:"text-xs font-medium text-accent hover:underline",children:"Open →"})})]},i.application.id)})})]})})]})}t(Ps,"AppsToolsPanel");var _s=["tools/list","tools/call"],ae=10;function de(){return new Date(Date.now()+7776e6).toISOString().slice(0,10)}t(de,"defaultExpiry");var Es={active:"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",expiring:"border-amber-500/40 bg-amber-500/10 text-amber-700 dark:text-amber-300",expired:"border-line bg-bg-3 text-ink-3",revoked:"border-ink bg-ink text-bg"};function me({status:s}){return(0,e.jsx)("span",{className:B("inline-flex shrink-0 items-center rounded-full border px-2 py-0.5 text-xs font-medium",Es[s]),children:gs[s]})}t(me,"StatusBadge");function Z({label:s,value:a}){return(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("dt",{className:"text-(length:--text-micro) font-semibold uppercase tracking-wide text-ink-3",children:s}),(0,e.jsx)("dd",{className:"mt-0.5 truncate text-ink",children:a})]})}t(Z,"TokenField");function xe({token:s}){const a=us(s.expiresAt);return a?a.getTime()<=Date.now()?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{className:"font-medium text-ink",children:"Expired"})," ",(0,e.jsx)($,{value:s.expiresAt})]}):(0,e.jsxs)(e.Fragment,{children:["Expires ",(0,e.jsx)($,{value:s.expiresAt})]}):(0,e.jsx)(e.Fragment,{children:"No expiry"})}t(xe,"ExpiryValue");function Ds({companyId:s,gateway:a,onTokenCreated:i}){const p=V(),{pushToast:c}=H(),[r,y]=(0,o.useState)(!1),[u,N]=(0,o.useState)(""),[f,k]=(0,o.useState)(""),[j,w]=(0,o.useState)(de()),[h,v]=(0,o.useState)(null),[g,d]=(0,o.useState)(!1),[D,T]=(0,o.useState)(!1),[P,b]=(0,o.useState)(1),[_,l]=(0,o.useState)(""),[C,S]=(0,o.useState)(null),M=t(()=>p.invalidateQueries({queryKey:U(s)}),"invalidate"),I=(0,o.useMemo)(()=>[...a.tokens].sort((n,E)=>new Date(E.createdAt).getTime()-new Date(n.createdAt).getTime()),[a.tokens]),m=Math.max(1,Math.ceil(I.length/ae)),q=I.slice((P-1)*ae,P*ae);(0,o.useEffect)(()=>{b(n=>Math.min(n,m))},[m]);const W=Q({mutationFn:t(()=>A.createGatewayToken(s,a.id,{name:u.trim(),clientLabel:u.trim(),ownerNote:f.trim(),allowedActions:_s,expiresAt:j?`${j}T23:59:59.000Z`:null}),"mutationFn"),onSuccess:t(async n=>{v(n),d(!0),y(!1),N(""),k(""),w(de()),c({title:"Token issued",body:"Copy it now — you won’t see the full value again after leaving this page.",tone:"success"}),i?.(n),await M()},"onSuccess"),onError:t(n=>c({title:"Token was not issued",body:n instanceof Error?n.message:String(n),tone:"error"}),"onError")}),ee=Q({mutationFn:t(n=>A.revokeGatewayToken(s,n),"mutationFn"),onSuccess:t(async n=>{S(null),l(""),c({title:"Token revoked",body:`${n.name} can no longer connect.`,tone:"success"}),await M()},"onSuccess"),onError:t(n=>c({title:"Token was not revoked",body:n instanceof Error?n.message:String(n),tone:"error"}),"onError")});async function Ee(n){try{await Y(n),c({title:"Copied",body:"Access token",tone:"success"})}catch(E){c({title:"Copy failed",body:E instanceof Error?E.message:"Clipboard access is unavailable.",tone:"error"})}}t(Ee,"copyToken");function De(){!r&&!u.trim()&&N(Pe(a)),y(n=>!n)}t(De,"startIssuing");function Ie(n){n.preventDefault(),u.trim()&&W.mutate()}t(Ie,"submit");function re(n){S({id:n.id,name:n.name}),l("")}return t(re,"startRevoke"),(0,e.jsxs)("div",{className:"space-y-5",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,e.jsxs)("div",{className:"max-w-2xl space-y-1",children:[(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Issue a reusable token for an external client. Its name is also used as the client label."}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Wardmote creates a fresh one-hour runtime token when an agent run starts, then revokes it when the run ends. Codex can receive the same gateway through both an app connection and the managed-gateway path, so one run may leave two revoked rows. These are audit history, not repeated manual tokens."})]}),(0,e.jsxs)(x,{size:"sm",onClick:De,children:[(0,e.jsx)(ss,{className:"mr-1.5 h-3.5 w-3.5"}),"Issue token"]})]}),r?(0,e.jsxs)("form",{className:"space-y-3",onSubmit:Ie,children:[(0,e.jsxs)("div",{className:"grid gap-3 md:grid-cols-[1fr_auto]",children:[(0,e.jsxs)("label",{className:"space-y-1.5 text-sm",children:[(0,e.jsx)("span",{className:"text-xs font-medium text-ink-3",children:"Token name"}),(0,e.jsx)(L,{value:u,onChange:t(n=>N(n.target.value),"onChange"),required:!0,autoFocus:!0}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:"Also used as the client label."})]}),(0,e.jsxs)("label",{className:"space-y-1.5 text-sm",children:[(0,e.jsx)("span",{className:"text-xs font-medium text-ink-3",children:"Expires"}),(0,e.jsx)(L,{type:"date",value:j,onChange:t(n=>w(n.target.value),"onChange"),required:!0})]})]}),(0,e.jsxs)("label",{className:"block space-y-1.5 text-sm",children:[(0,e.jsx)("span",{className:"text-xs font-medium text-ink-3",children:"Owner note (optional)"}),(0,e.jsx)(L,{value:f,onChange:t(n=>k(n.target.value),"onChange"),placeholder:"Who uses this token or why it exists"})]}),(0,e.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,e.jsx)(x,{type:"button",variant:"ghost",size:"sm",onClick:t(()=>y(!1),"onClick"),children:"Cancel"}),(0,e.jsx)(x,{type:"submit",size:"sm",disabled:W.isPending||!u.trim(),children:W.isPending?"Issuing…":"Issue token"})]})]}):null,h?(0,e.jsxs)("div",{className:"space-y-2 border-y border-line py-4",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-semibold text-ink",children:"New token — copy now"}),(0,e.jsx)("div",{className:"text-xs text-ink-3",children:"It is now available in Client snippets for a copy-ready configuration."})]}),(0,e.jsx)(x,{variant:"ghost",size:"sm",onClick:t(()=>v(null),"onClick"),"aria-label":"Dismiss new token",children:"Dismiss"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("code",{className:"min-w-0 flex-1 truncate rounded bg-bg-3 px-3 py-2 font-mono text-xs text-ink",children:g?h.token:O(h)}),g?(0,e.jsxs)(x,{variant:"secondary",size:"sm",onClick:t(()=>{Ee(h.token)},"onClick"),children:[(0,e.jsx)(F,{className:"mr-1 h-3.5 w-3.5"}),"Copy"]}):(0,e.jsx)(x,{variant:"secondary",size:"sm",onClick:t(()=>d(!0),"onClick"),children:"Show"})]})]}):null,(0,e.jsxs)(Be,{open:D,onOpenChange:T,children:[(0,e.jsx)(Ke,{asChild:!0,children:(0,e.jsxs)(x,{variant:"ghost",className:"h-auto w-full justify-between px-0 py-1 hover:bg-transparent",children:[(0,e.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-ink",children:[(0,e.jsx)(Ye,{className:"h-4 w-4 text-ink-3"}),"Token history",(0,e.jsx)("span",{className:"font-normal text-ink-3",children:I.length})]}),D?(0,e.jsx)(Je,{className:"h-4 w-4"}):(0,e.jsx)(ge,{className:"h-4 w-4"})]})}),(0,e.jsx)(Le,{className:"space-y-3 pt-3",children:I.length===0?(0,e.jsx)("p",{className:"py-4 text-sm text-ink-3",children:"No tokens have been issued for this gateway."}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"hidden overflow-x-auto rounded-lg border border-line sm:block",children:(0,e.jsxs)("table",{className:"w-full min-w-(--sz-44rem) text-sm",children:[(0,e.jsx)("thead",{children:(0,e.jsxs)("tr",{className:"border-b border-line bg-bg-3/40 text-left text-(length:--text-micro) font-semibold uppercase tracking-wide text-ink-3",children:[(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Token"}),(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Owner"}),(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Created"}),(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Last used"}),(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Expiry"}),(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Status"}),(0,e.jsx)("th",{className:"px-4 py-2.5 text-right"})]})}),(0,e.jsx)("tbody",{children:q.map(n=>{const E=ie(n);return(0,e.jsxs)("tr",{className:"border-b border-line last:border-0",children:[(0,e.jsxs)("td",{className:"px-4 py-3",children:[(0,e.jsx)("div",{className:"font-medium text-ink",children:n.name}),(0,e.jsx)("div",{className:"font-mono text-xs text-ink-3",children:O(n)})]}),(0,e.jsx)("td",{className:"px-4 py-3 text-ink-3",children:n.clientLabel||n.ownerNote||"—"}),(0,e.jsx)("td",{className:"px-4 py-3 text-ink-3",children:(0,e.jsx)($,{value:n.createdAt})}),(0,e.jsx)("td",{className:"px-4 py-3 text-ink-3",children:n.lastUsedAt?(0,e.jsx)($,{value:n.lastUsedAt}):"—"}),(0,e.jsx)("td",{className:"px-4 py-3 text-ink-3",children:(0,e.jsx)(xe,{token:n})}),(0,e.jsx)("td",{className:"px-4 py-3",children:(0,e.jsx)(me,{status:E})}),(0,e.jsx)("td",{className:"px-4 py-3 text-right",children:E!=="revoked"?(0,e.jsx)(x,{variant:"danger",size:"sm",className:"h-7 px-2 text-xs",onClick:t(()=>re(n),"onClick"),children:"Revoke"}):null})]},n.id)})})]})}),(0,e.jsx)("div",{className:"space-y-3 sm:hidden",children:q.map(n=>{const E=ie(n);return(0,e.jsxs)("div",{className:"border-b border-line py-3 last:border-0",children:[(0,e.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"font-medium text-ink",children:n.name}),(0,e.jsx)("div",{className:"font-mono text-xs text-ink-3",children:O(n)})]}),(0,e.jsx)(me,{status:E})]}),(0,e.jsxs)("dl",{className:"mt-3 grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[(0,e.jsx)(Z,{label:"Owner",value:n.clientLabel||n.ownerNote||"—"}),(0,e.jsx)(Z,{label:"Created",value:(0,e.jsx)($,{value:n.createdAt})}),(0,e.jsx)(Z,{label:"Last used",value:n.lastUsedAt?(0,e.jsx)($,{value:n.lastUsedAt}):"—"}),(0,e.jsx)(Z,{label:"Expiry",value:(0,e.jsx)(xe,{token:n})})]}),E!=="revoked"?(0,e.jsx)(x,{variant:"danger",size:"sm",className:"mt-3 w-full text-xs",onClick:t(()=>re(n),"onClick"),children:"Revoke"}):null]},n.id)})}),m>1?(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsxs)("p",{className:"text-xs text-ink-3",children:["Page ",P," of ",m," · ",I.length," tokens"]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(x,{variant:"ghost",size:"sm",disabled:P===1,onClick:t(()=>b(n=>Math.max(1,n-1)),"onClick"),"aria-label":"Previous token page",children:(0,e.jsx)(We,{className:"h-4 w-4"})}),(0,e.jsx)(x,{variant:"ghost",size:"sm",disabled:P===m,onClick:t(()=>b(n=>Math.min(m,n+1)),"onClick"),"aria-label":"Next token page",children:(0,e.jsx)(be,{className:"h-4 w-4"})})]})]}):null]})})]}),C?(0,e.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",role:"dialog","aria-modal":"true",children:(0,e.jsxs)("div",{className:"w-full max-w-md space-y-3 rounded-lg border border-line bg-bg-2 p-5 shadow-lg",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"Revoke this token?"}),(0,e.jsxs)("p",{className:"mt-1 text-sm text-ink-3",children:["Any client using ",(0,e.jsx)("span",{className:"font-medium text-ink",children:C.name})," goes silent immediately. This can’t be undone. Type the token name to confirm."]})]}),(0,e.jsx)(L,{value:_,onChange:t(n=>l(n.target.value),"onChange"),placeholder:C.name,"aria-label":"Type the token name to confirm",autoFocus:!0}),(0,e.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,e.jsx)(x,{variant:"ghost",size:"sm",onClick:t(()=>{S(null),l("")},"onClick"),children:"Cancel"}),(0,e.jsx)(x,{variant:"danger",size:"sm",disabled:_.trim()!==C.name||ee.isPending,onClick:t(()=>ee.mutate(C.id),"onClick"),children:ee.isPending?"Revoking…":"Revoke token"})]})]})}):null]})}t(Ds,"TokensPanel");var Is=25,ue={allowed:{label:"Allowed",status:"allowed"},blocked:{label:"Blocked",status:"denied"},asked_first:{label:"Asked first",status:"require-approval"},waiting:{label:"Waiting",status:"deferred"},failed:{label:"Failed",status:"failed"},unknown:{label:"Recorded",status:"unchecked"}};function ne(s,a){const i=s?.[a];return typeof i=="string"&&i.trim().length>0?i:null}t(ne,"detailString");function he(s){if(!s?.summary)return null;try{return JSON.stringify(JSON.parse(s.summary),null,2)}catch{return s.summary}}t(he,"formatSummary");function pe(s,a){const i=s?.[a];if(!i||typeof i!="object"||Array.isArray(i))return null;const p=i.summary;return typeof p=="string"?{summary:p}:null}t(pe,"summaryFromDetails");function zs(s){const a=s.invocation?.startedAt?new Date(s.invocation.startedAt).getTime():NaN,i=s.invocation?.completedAt?new Date(s.invocation.completedAt).getTime():NaN;return!Number.isFinite(a)||!Number.isFinite(i)||i<a?null:`${i-a} ms`}t(zs,"durationLabel");function z({label:s,value:a,mono:i=!1}){return(0,e.jsxs)("div",{className:"flex gap-3 py-1",children:[(0,e.jsx)("dt",{className:"w-28 shrink-0 text-ink-3",children:s}),(0,e.jsx)("dd",{className:i?"min-w-0 break-all font-mono text-(length:--text-micro) text-ink":"min-w-0 text-ink",children:a})]})}t(z,"Fact");function Ms({event:s}){const[a,i]=(0,o.useState)(!1),p=ue[s.normalizedOutcome]??ue.unknown,c=s.agentDisplayName??"Client",r=s.appDisplayName??s.connectionDisplayName??s.applicationDisplayName??"App",y=s.toolDisplayName??s.invocation?.toolName??"Tool call",u=s.invocation?.toolName??ne(s.details,"tool")??ne(s.details,"toolName"),N=ne(s.details,"reasonCode"),f=he(s.invocation?.argumentsSummary??pe(s.details,"argumentsSummary")),k=he(s.invocation?.resultSummary??pe(s.details,"resultSummary")),j=zs(s);return(0,e.jsxs)("li",{className:"text-sm",children:[(0,e.jsxs)("button",{type:"button",onClick:t(()=>i(w=>!w),"onClick"),className:"flex w-full items-start gap-2.5 px-4 py-3 text-left hover:bg-bg-3/50","aria-expanded":a,children:[a?(0,e.jsx)(ge,{className:"mt-0.5 h-4 w-4 shrink-0 text-ink-3"}):(0,e.jsx)(be,{className:"mt-0.5 h-4 w-4 shrink-0 text-ink-3"}),(0,e.jsx)("span",{className:"min-w-0 flex-1",children:(0,e.jsxs)("span",{className:"block text-ink",children:[(0,e.jsx)("span",{className:"font-medium",children:c})," used ",(0,e.jsx)("span",{className:"font-medium",children:y})," in ",r]})}),(0,e.jsxs)("span",{className:"flex shrink-0 items-center gap-2 whitespace-nowrap",children:[(0,e.jsx)(ms,{status:p.status,label:p.label}),(0,e.jsxs)("span",{className:"text-xs text-ink-3",children:["· ",(0,e.jsx)($,{value:s.createdAt})]})]})]}),a?(0,e.jsxs)("div",{className:"border-t border-line bg-bg-3/30 px-4 py-3 pl-10 text-xs",children:[(0,e.jsxs)("dl",{children:[u?(0,e.jsx)(z,{label:"Tool",value:u,mono:!0}):null,s.invocation?.status?(0,e.jsx)(z,{label:"Call status",value:s.invocation.status}):null,s.invocation?.policyDecision?(0,e.jsx)(z,{label:"Decision",value:s.invocation.policyDecision}):null,N?(0,e.jsx)(z,{label:"Reason",value:N,mono:!0}):null,j?(0,e.jsx)(z,{label:"Duration",value:j}):null,s.invocation?.id?(0,e.jsx)(z,{label:"Invocation ID",value:s.invocation.id,mono:!0}):null,s.invocation?.errorCode?(0,e.jsx)(z,{label:"Error code",value:s.invocation.errorCode,mono:!0}):null,s.invocation?.errorMessage?(0,e.jsx)(z,{label:"Error",value:s.invocation.errorMessage}):null]}),f?(0,e.jsxs)("div",{className:"mt-2 space-y-1",children:[(0,e.jsx)("div",{className:"text-ink-3",children:"Arguments (redacted)"}),(0,e.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words rounded-md border border-line bg-bg p-3 font-mono text-xs text-ink",children:f})]}):null,k?(0,e.jsxs)("div",{className:"mt-3 space-y-1",children:[(0,e.jsx)("div",{className:"text-ink-3",children:"Result (redacted)"}),(0,e.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words rounded-md border border-line bg-bg p-3 font-mono text-xs text-ink",children:k})]}):null]}):null]})}t(Ms,"ActivityRow");function qs({companyId:s,gateway:a}){const i=Fe({queryKey:R.tools.activity(s,{gateway:a.id,window:"30d"}),queryFn:t(({pageParam:c})=>A.listActivity(s,{gateway:a.id,window:"30d",limit:Is,cursor:c??void 0}),"queryFn"),initialPageParam:null,getNextPageParam:t(c=>c.nextCursor??void 0,"getNextPageParam")}),p=(0,o.useMemo)(()=>i.data?.pages.flatMap(c=>c.events)??[],[i.data]);return i.isLoading?(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(K,{className:"h-12 w-full"}),(0,e.jsx)(K,{className:"h-12 w-full"}),(0,e.jsx)(K,{className:"h-12 w-full"})]}):i.isError?(0,e.jsx)(Te,{error:i.error,onRetry:t(()=>i.refetch(),"onRetry")}):(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Calls through this gateway from the last 30 days. Open a row to inspect its tool, redacted arguments, result, and decision."}),p.length===0?(0,e.jsx)("div",{className:"rounded-md border border-dashed border-line p-6 text-center text-sm text-ink-3",children:"No calls have gone through this gateway yet."}):(0,e.jsx)("ul",{className:"divide-y divide-line rounded-lg border border-line",children:p.map(c=>(0,e.jsx)(Ms,{event:c},c.id))}),i.hasNextPage?(0,e.jsx)("div",{className:"flex justify-center",children:(0,e.jsx)(x,{variant:"secondary",size:"sm",onClick:t(()=>i.fetchNextPage(),"onClick"),disabled:i.isFetchingNextPage,children:i.isFetchingNextPage?"Loading…":"Load more"})}):null]})}t(qs,"GatewayActivityPanel");function $s({companyId:s,gateway:a}){const i=V(),p=je(),{pushToast:c}=H(),[r,y]=(0,o.useState)(!1),[u,N]=(0,o.useState)(""),f=`${typeof window<"u"?window.location.origin:""}${a.endpointPath}`,k=JSON.stringify({gatewayPublicId:a.gatewayPublicId,displaySlug:a.displaySlug,status:a.status,profileId:a.profileId,defaultProfileMode:a.defaultProfileMode,contextScopeType:a.contextScopeType,contextScopeId:a.contextScopeId,endpointPath:a.endpointPath,authConfig:a.authConfig,headerPolicy:a.headerPolicy,metadataPolicy:a.metadataPolicy,onDemandToolsConfig:a.onDemandToolsConfig},null,2),j=Q({mutationFn:t(()=>A.updateGateway(s,a.id,{status:"archived"}),"mutationFn"),onSuccess:t(async()=>{c({title:"Gateway archived",body:`${a.name} is no longer reachable.`,tone:"success"}),await i.invalidateQueries({queryKey:U(s)}),p("/apps/gateways")},"onSuccess"),onError:t(h=>c({title:"Couldn't archive the gateway",body:h instanceof Error?h.message:String(h),tone:"error"}),"onError")});async function w(h,v){try{await Y(h),c({title:"Copied",body:v,tone:"success"})}catch{c({title:"Copy failed",body:"Clipboard access is unavailable.",tone:"error"})}}return t(w,"copy"),(0,e.jsxs)("div",{className:"space-y-5",children:[(0,e.jsxs)("section",{className:"space-y-2",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"Transport"}),(0,e.jsxs)("dl",{className:"grid gap-x-6 gap-y-2 text-sm sm:grid-cols-2",children:[(0,e.jsx)(X,{label:"Transport",value:"streamable_http"}),(0,e.jsx)(X,{label:"Authentication",value:"bearer"}),(0,e.jsx)(X,{label:"Protocol version",value:"2025-03-26"}),(0,e.jsx)(X,{label:"Public ID",value:a.gatewayPublicId,mono:!0})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("code",{className:"min-w-0 flex-1 truncate rounded-md bg-bg-3 px-3 py-2 font-mono text-xs text-ink-3",children:f}),(0,e.jsxs)(x,{variant:"secondary",size:"sm",onClick:t(()=>{w(f,"Endpoint URL")},"onClick"),children:[(0,e.jsx)(F,{className:"mr-1 h-3.5 w-3.5"}),"Copy"]})]})]}),(0,e.jsxs)("section",{className:"space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"Raw configuration"}),(0,e.jsxs)(x,{variant:"secondary",size:"sm",onClick:t(()=>{w(k,"Gateway config JSON")},"onClick"),children:[(0,e.jsx)(F,{className:"mr-1 h-3.5 w-3.5"}),"Copy JSON"]})]}),(0,e.jsx)("pre",{className:"max-h-96 overflow-auto whitespace-pre-wrap break-words rounded-md bg-bg-3 p-3 font-mono text-xs text-ink-3",children:k})]}),(0,e.jsxs)("section",{className:"space-y-2 rounded-lg border border-bad/40 p-4",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-bad",children:"Danger zone"}),(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Archiving takes the gateway offline for every client. Existing tokens stop working. Type the gateway name to confirm."}),r?(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(L,{value:u,onChange:t(h=>N(h.target.value),"onChange"),placeholder:a.name,"aria-label":"Type the gateway name to confirm archive"}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(x,{variant:"danger",size:"sm",disabled:u.trim()!==a.name||j.isPending,onClick:t(()=>j.mutate(),"onClick"),children:j.isPending?"Archiving…":"Archive gateway"}),(0,e.jsx)(x,{variant:"ghost",size:"sm",onClick:t(()=>{y(!1),N("")},"onClick"),children:"Cancel"})]})]}):(0,e.jsx)(x,{variant:"danger",size:"sm",onClick:t(()=>y(!0),"onClick"),children:"Archive gateway"})]})]})}t($s,"GatewayAdvancedPanel");function X({label:s,value:a,mono:i}){return(0,e.jsxs)("div",{children:[(0,e.jsx)("dt",{className:"text-xs font-medium text-ink-3",children:s}),(0,e.jsx)("dd",{className:i?"mt-0.5 font-mono text-ink":"mt-0.5 text-ink",children:a})]})}t(X,"Row");function kt(){const{gatewayId:s="",tab:a}=Oe(),i=je(),p=V(),{pushToast:c}=H(),{selectedCompanyId:r}=Ge(),{setBreadcrumbs:y}=os(),[u,N]=(0,o.useState)(!1),[f,k]=(0,o.useState)(!1),[j,w]=(0,o.useState)([]),h=Ns(a)?a:null,v=G({queryKey:U(r??"__none__"),queryFn:t(()=>A.listGateways(r),"queryFn"),enabled:!!r}),g=G({queryKey:R.tools.profiles(r??"__none__"),queryFn:t(()=>A.listProfiles(r),"queryFn"),enabled:!!r}),d=G({queryKey:R.tools.connections(r??"__none__"),queryFn:t(()=>A.listConnections(r),"queryFn"),enabled:!!r}),D=G({queryKey:R.tools.applications(r??"__none__"),queryFn:t(()=>A.listApplications(r),"queryFn"),enabled:!!r}),T=G({queryKey:R.agents.list(r??"__none__"),queryFn:t(()=>ls.list(r),"queryFn"),enabled:!!r}),P=G({queryKey:R.projects.list(r??"__none__",{includeArchived:!0}),queryFn:t(()=>rs.list(r,{includeArchived:!0}),"queryFn"),enabled:!!r}),b=(0,o.useMemo)(()=>(v.data?.gateways??[]).find(m=>m.id===s),[v.data,s]),_=(0,o.useMemo)(()=>(g.data?.profiles??[]).find(m=>m.id===b?.profileId),[g.data,b?.profileId]),l=(0,o.useMemo)(()=>ps(_,D.data?.applications??[],d.data?.connections??[]),[_,D.data,d.data]),C=(0,o.useMemo)(()=>new Map((T.data??[]).map(m=>[m.id,m.name])),[T.data]),S=(0,o.useMemo)(()=>new Map((P.data??[]).map(m=>[m.id,m.name])),[P.data]);function M(m){w(q=>[m,...q.filter(W=>W.id!==m.id)])}t(M,"rememberCreatedToken"),(0,o.useEffect)(()=>{if(b)return y([{label:"Connectors",href:"/apps"},{label:"Gateways",href:"/apps/gateways"},{label:b.name}]),()=>y([])},[y,b]);const I=Q({mutationFn:t(()=>A.updateGateway(r,s,{status:b&&Ae(b)?"disabled":"active"}),"mutationFn"),onSuccess:t(async m=>{c({title:m.status==="active"?"Gateway on":"Gateway off",body:m.status==="active"?`${m.name} is exposing its tools again.`:`${m.name} is off — every client goes silent.`,tone:"success"}),await p.invalidateQueries({queryKey:U(r)})},"onSuccess"),onError:t(m=>c({title:"Couldn't update the gateway",body:m instanceof Error?m.message:String(m),tone:"error"}),"onError")});return r?h?v.isLoading?(0,e.jsxs)("div",{className:"max-w-4xl space-y-4",children:[(0,e.jsx)(K,{className:"h-10 w-64"}),(0,e.jsx)(K,{className:"h-9 w-full max-w-lg"}),(0,e.jsx)(K,{className:"h-64 w-full"})]}):v.isError?(0,e.jsx)(Te,{error:v.error,onRetry:t(()=>v.refetch(),"onRetry")}):b?(0,e.jsxs)("div",{className:"max-w-4xl space-y-5 pb-12",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"text-xs text-ink-3",children:(0,e.jsx)(J,{to:"/apps/gateways",className:"hover:underline",children:"Apps · Gateways"})}),(0,e.jsx)("h1",{className:"mt-1 text-2xl font-bold tracking-tight",children:b.name}),(0,e.jsx)(ys,{endpointPath:b.endpointPath,className:"mt-1 max-w-xl"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsxs)(x,{variant:"secondary",onClick:t(()=>k(!0),"onClick"),children:[(0,e.jsx)(ds,{className:"mr-1.5 h-4 w-4"}),"Edit"]}),(0,e.jsxs)(x,{onClick:t(()=>N(!0),"onClick"),children:[(0,e.jsx)(ts,{className:"mr-1.5 h-4 w-4"}),"Client snippets"]})]})]}),(0,e.jsx)("nav",{className:"flex items-center gap-6 overflow-x-auto border-b border-line text-sm","aria-label":"Gateway tabs",children:vs.map(m=>{const q=m.key===h;return(0,e.jsx)(J,{to:oe(s,m.key),className:B("-mb-px shrink-0 border-b-2 pb-2.5 pt-1 font-medium transition-colors",q?"border-ink text-ink":"border-transparent text-ink-3 hover:text-ink"),"aria-current":q?"page":void 0,children:m.label},m.key)})}),h==="overview"&&(0,e.jsx)(Ss,{gateway:b,profile:_,apps:l,agentNames:C,projectNames:S,toggleDisabled:I.isPending,onToggle:t(()=>I.mutate(),"onToggle")}),h==="apps"&&(0,e.jsx)(Ps,{apps:l,profile:_}),h==="tokens"&&(0,e.jsx)(Ds,{companyId:r,gateway:b,onTokenCreated:M}),h==="activity"&&(0,e.jsx)(qs,{companyId:r,gateway:b}),h==="advanced"&&(0,e.jsx)($s,{companyId:r,gateway:b}),(0,e.jsx)(Cs,{gateway:b,open:u,onOpenChange:N,createdTokens:j,onTokenCreated:M}),(0,e.jsx)(Ts,{companyId:r,gateway:b,profiles:g.data?.profiles??[],open:f,onOpenChange:k})]}):(0,e.jsxs)("div",{className:"max-w-3xl p-6",children:[(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"We couldn’t find that gateway."}),(0,e.jsx)(x,{className:"mt-4",variant:"secondary",onClick:t(()=>i("/apps/gateways"),"onClick"),children:"Back to gateways"})]}):(0,e.jsx)(Re,{replace:!0,to:oe(s,"overview")}):(0,e.jsx)("div",{className:"p-6 text-sm text-ink-3",children:"Select an organization to manage gateways."})}t(kt,"GatewayDetail");export{kt as GatewayDetail};
@@ -0,0 +1 @@
1
+ var Y=Object.defineProperty;var t=(o,d)=>Y(o,"name",{value:d,configurable:!0});import{i as I}from"./rolldown-runtime-ZpX3ckPj.js";import{na as J,ta as U}from"./createLucideIcon-Dp_BESPI.js";import{X as V,_ as Z,t as h,v as l}from"./queryKeys-Sk0U6x0H.js";import{n as ee}from"./CompanyContext-dsHNbwL5.js";import{o as se}from"./router-qrDA_fDm.js";import{t as B}from"./button-bS07vQAg.js";import{t as O}from"./plus--_-YgodI.js";import{t as te}from"./search-ibIk5iio.js";import{i as ae}from"./ToastContext-Brs-4k-1.js";import{t as ne}from"./agents-B46GLJqX.js";import{t as re}from"./projects-oY9VYW38.js";import{t as oe}from"./input-Cq0iBDAN.js";import{t as L}from"./skeleton-BGHeLb8T.js";import{t as u}from"./tools-CtHWMX0r.js";import{n as ie}from"./BreadcrumbContext-BKgeE2st.js";import{t as le}from"./toggle-switch-4ZdUl1cb.js";import{a as Q,r as ce}from"./shared-BbsNa_97.js";import{a as de,b as F,c as pe,d as K,l as me,m as xe,n as he,o as ue,p as _,r as P,t as E}from"./CopyableGatewayUrl-C5DM-jlb.js";var c=I(J(),1),e=I(U(),1);function Fe(){const o=se(),d=V(),{pushToast:C}=ae(),{selectedCompanyId:a}=ee(),{setBreadcrumbs:f}=ie(),[b,R]=(0,c.useState)(""),[z,g]=(0,c.useState)(!1);(0,c.useEffect)(()=>(f([{label:"Connectors",href:"/apps"},{label:"Gateways"}]),()=>f([])),[f]);const p=l({queryKey:P(a??"__none__"),queryFn:t(()=>u.listGateways(a),"queryFn"),enabled:!!a}),S=l({queryKey:h.tools.profiles(a??"__none__"),queryFn:t(()=>u.listProfiles(a),"queryFn"),enabled:!!a}),D=l({queryKey:h.tools.connections(a??"__none__"),queryFn:t(()=>u.listConnections(a),"queryFn"),enabled:!!a}),H=l({queryKey:h.tools.applications(a??"__none__"),queryFn:t(()=>u.listApplications(a),"queryFn"),enabled:!!a}),q=l({queryKey:h.agents.list(a??"__none__"),queryFn:t(()=>ne.list(a),"queryFn"),enabled:!!a}),G=l({queryKey:h.projects.list(a??"__none__"),queryFn:t(()=>re.list(a),"queryFn"),enabled:!!a}),W=(0,c.useMemo)(()=>new Map((S.data?.profiles??[]).map(s=>[s.id,s])),[S.data]),T=(0,c.useMemo)(()=>new Map((q.data??[]).map(s=>[s.id,s.name])),[q.data]),$=(0,c.useMemo)(()=>new Map((G.data??[]).map(s=>[s.id,s.name])),[G.data]),M=Z({mutationFn:t(({gateway:s})=>u.updateGateway(a,s.id,{status:_(s)?"disabled":"active"}),"mutationFn"),onSuccess:t(async s=>{C({title:s.status==="active"?"Gateway on":"Gateway off",body:s.status==="active"?`${s.name} is exposing its tools again.`:`${s.name} is off — every client goes silent.`,tone:"success"}),await d.invalidateQueries({queryKey:P(a)})},"onSuccess"),onError:t(s=>C({title:"Couldn't update the gateway",body:s instanceof Error?s.message:String(s),tone:"error"}),"onError")});if(!a)return(0,e.jsx)("div",{className:"p-6 text-sm text-ink-3",children:"Select an organization to manage gateways."});const N=p.data?.gateways??[],y=b.trim().toLowerCase(),X=y?N.filter(s=>{const j=K(s,$,T).toLowerCase();return s.name.toLowerCase().includes(y)||s.displaySlug.toLowerCase().includes(y)||j.includes(y)}):N;return(0,e.jsxs)("div",{className:"max-w-5xl space-y-5",children:[(0,e.jsxs)("header",{className:"space-y-1",children:[(0,e.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:"Apps"}),(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"A gateway is one safe MCP endpoint that exposes only the apps you assign. Hand it to a client like Cursor or Claude Desktop."})]}),p.isLoading?(0,e.jsxs)("div",{className:"space-y-3 pt-2",children:[(0,e.jsx)(L,{className:"h-9 w-full max-w-sm"}),(0,e.jsx)(L,{className:"h-52 w-full"})]}):p.isError?(0,e.jsx)(ce,{error:p.error,onRetry:t(()=>p.refetch(),"onRetry")}):N.length===0?(0,e.jsx)(ye,{onCreate:t(()=>g(!0),"onCreate")}):(0,e.jsxs)("div",{className:"space-y-4 pt-1",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,e.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,e.jsx)(te,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-ink-3"}),(0,e.jsx)(oe,{value:b,onChange:t(s=>R(s.target.value),"onChange"),placeholder:"Search by name, app, or owner",className:"pl-9","aria-label":"Search gateways"})]}),(0,e.jsxs)(B,{onClick:t(()=>g(!0),"onClick"),children:[(0,e.jsx)(O,{className:"mr-1.5 h-4 w-4"}),"New gateway"]})]}),(()=>{const s=X.map(n=>{const r=W.get(n.profileId),i=pe(r,H.data?.applications??[],D.data?.connections??[]);return{gateway:n,profile:r,scope:K(n,$,T),appsLabel:`${i.length} ${i.length===1?"app":"apps"}${r?` · ${ue(r)}`:""}`,active:de(n),expiring:me(n),lastUsed:xe(n),href:F(n.id,"overview")}}),j=t(n=>(0,e.jsx)(le,{checked:_(n),disabled:M.isPending,onClick:t(r=>r.stopPropagation(),"onClick"),onCheckedChange:t(()=>M.mutate({gateway:n}),"onCheckedChange"),"aria-label":`Turn ${n.name} ${_(n)?"off":"on"}`}),"toggle"),A=(0,e.jsxs)("div",{className:"px-4 py-8 text-center text-sm text-ink-3",children:["No gateways match “",b.trim(),"”."]});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"hidden overflow-x-auto rounded-lg border border-line sm:block",children:(0,e.jsxs)("table",{className:"w-full min-w-(--sz-40rem) text-sm",children:[(0,e.jsx)("thead",{children:(0,e.jsxs)("tr",{className:"border-b border-line bg-bg-3/40 text-left text-(length:--text-micro) font-semibold uppercase tracking-wide text-ink-3",children:[(0,e.jsx)("th",{className:"whitespace-nowrap px-4 py-2.5",children:"Gateway"}),(0,e.jsx)("th",{className:"whitespace-nowrap px-4 py-2.5",children:"Scope"}),(0,e.jsx)("th",{className:"whitespace-nowrap px-4 py-2.5",children:"Apps"}),(0,e.jsx)("th",{className:"whitespace-nowrap px-4 py-2.5",children:"Tokens"}),(0,e.jsx)("th",{className:"whitespace-nowrap px-4 py-2.5",children:"Last used"}),(0,e.jsx)("th",{className:"whitespace-nowrap px-4 py-2.5 text-right",children:"On"})]})}),(0,e.jsxs)("tbody",{children:[s.map(({gateway:n,scope:r,appsLabel:i,active:v,expiring:m,lastUsed:x,href:k})=>(0,e.jsxs)("tr",{onClick:t(()=>o(k),"onClick"),className:"cursor-pointer border-b border-line transition-colors last:border-0 hover:bg-bg-3/30",children:[(0,e.jsxs)("td",{className:"w-64 max-w-64 whitespace-nowrap px-4 py-3",children:[(0,e.jsx)("div",{className:"font-medium text-ink",children:n.name}),(0,e.jsx)(E,{endpointPath:n.endpointPath})]}),(0,e.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-ink-3",children:r}),(0,e.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-ink-3",children:i}),(0,e.jsxs)("td",{className:"whitespace-nowrap px-4 py-3 text-ink-3",children:[v," active",m>0?` · ${m} expiring`:""]}),(0,e.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-ink-3",children:x?(0,e.jsx)(Q,{value:x}):"—"}),(0,e.jsx)("td",{className:"px-4 py-3",children:(0,e.jsx)("div",{className:"flex justify-end",children:j(n)})})]},n.id)),s.length===0?(0,e.jsx)("tr",{children:(0,e.jsx)("td",{colSpan:6,children:A})}):null]})]})}),(0,e.jsxs)("div",{className:"space-y-3 sm:hidden",children:[s.map(({gateway:n,scope:r,appsLabel:i,active:v,expiring:m,lastUsed:x,href:k})=>(0,e.jsxs)("div",{onClick:t(()=>o(k),"onClick"),className:"cursor-pointer rounded-lg border border-line p-4 transition-colors hover:bg-bg-3/30",children:[(0,e.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"font-medium text-ink",children:n.name}),(0,e.jsx)(E,{endpointPath:n.endpointPath})]}),(0,e.jsx)("div",{className:"shrink-0",children:j(n)})]}),(0,e.jsxs)("dl",{className:"mt-3 grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[(0,e.jsx)(w,{label:"Scope",value:r}),(0,e.jsx)(w,{label:"Apps",value:i}),(0,e.jsx)(w,{label:"Tokens",value:`${v} active${m>0?` · ${m} expiring`:""}`}),(0,e.jsx)(w,{label:"Last used",value:x?(0,e.jsx)(Q,{value:x}):"—"})]})]},n.id)),s.length===0?(0,e.jsx)("div",{className:"rounded-lg border border-line",children:A}):null]})]})})(),(0,e.jsxs)("div",{className:"rounded-lg border border-line bg-bg-3/30 px-4 py-3",children:[(0,e.jsx)("div",{className:"text-sm font-semibold text-ink",children:"Why a gateway?"}),(0,e.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"You pick which apps go through it, who can use it, and how. Revoke the token, the whole gateway goes silent — no app-by-app cleanup."})]})]}),(0,e.jsx)(he,{companyId:a,open:z,onOpenChange:g,onCreated:t(s=>o(F(s,"overview")),"onCreated")})]})}t(Fe,"GatewaysList");function w({label:o,value:d}){return(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("dt",{className:"text-(length:--text-micro) font-semibold uppercase tracking-wide text-ink-3",children:o}),(0,e.jsx)("dd",{className:"mt-0.5 truncate text-ink",children:d})]})}t(w,"MobileField");function ye({onCreate:o}){return(0,e.jsxs)("div",{className:"rounded-2xl border border-dashed border-line p-12 text-center",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold text-ink",children:"No gateways yet"}),(0,e.jsx)("p",{className:"mx-auto mt-2 max-w-sm text-sm text-ink-3",children:"Group your connected apps into one safe endpoint you can hand to a client, then revoke it in one move."}),(0,e.jsxs)(B,{className:"mt-5",onClick:o,children:[(0,e.jsx)(O,{className:"mr-1.5 h-4 w-4"}),"New gateway"]})]})}t(ye,"EmptyGateways");export{Fe as GatewaysList};
@@ -0,0 +1 @@
1
+ var D=Object.defineProperty;var a=(s,n)=>D(s,"name",{value:n,configurable:!0});import{i as E}from"./rolldown-runtime-ZpX3ckPj.js";import{Ei as Q,Ti as U,i as V,l as T,m as S,na as H,ta as $,w as M}from"./createLucideIcon-Dp_BESPI.js";import{v as R}from"./star-CpH09lE0.js";import{X,_ as C,t as m,v as h}from"./queryKeys-Sk0U6x0H.js";import{n as L}from"./CompanyContext-dsHNbwL5.js";import{t as k}from"./router-qrDA_fDm.js";import{i as A,n as G,r as J,t as W}from"./tabs-BeNCSQfH.js";import{o as Y,r as Z,t as ee}from"./popover-CgIDA573.js";import{t as b}from"./button-bS07vQAg.js";import{t as se}from"./plus--_-YgodI.js";import{t as te}from"./agents-B46GLJqX.js";import{t as ae}from"./projects-oY9VYW38.js";import{n as ne}from"./BreadcrumbContext-BKgeE2st.js";import{t as re}from"./assets-CcTyp_pK.js";import{Dn as y,Fa as ie,Hr as le,On as j,Sa as oe,v as ce}from"./index-CUNTJ_RK.js";import{t as q}from"./InlineEditor-CDKgapVj.js";import{t as de}from"./separator-BidXiA6w.js";import{t as me}from"./EntityRow-B_hi0SpF.js";import{t as ue}from"./GoalTree-DSJRz3A3.js";var f=E(H(),1),e=E($(),1);function u({label:s,children:n}){return(0,e.jsxs)("div",{className:"flex items-start gap-3 py-1.5",children:[(0,e.jsx)("span",{className:"text-xs text-ink-3 shrink-0 w-20 mt-0.5",children:s}),(0,e.jsx)("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 flex-wrap",children:n})]})}a(u,"PropertyRow");function pe(s){return s.replace(/_/g," ").replace(/\b\w/g,n=>n.toUpperCase())}a(pe,"label");function _({current:s,options:n,onChange:i,children:p}){const[x,c]=(0,f.useState)(!1);return(0,e.jsxs)(ee,{open:x,onOpenChange:c,children:[(0,e.jsx)(Y,{asChild:!0,children:(0,e.jsx)("button",{className:"cursor-pointer hover:opacity-80 transition-opacity",children:p})}),(0,e.jsx)(Z,{className:"w-40 p-1",align:"end",children:n.map(d=>(0,e.jsx)(b,{active:d===s,variant:"ghost",size:"sm",className:T("w-full justify-start text-xs"),onClick:a(()=>{i(d),c(!1)},"onClick"),children:pe(d)},d))})]})}a(_,"PickerButton");function xe({goal:s,onUpdate:n}){const{selectedCompanyId:i}=L(),{data:p}=h({queryKey:m.agents.list(i),queryFn:a(()=>te.list(i),"queryFn"),enabled:!!i}),{data:x}=h({queryKey:m.goals.list(i),queryFn:a(()=>j.list(i),"queryFn"),enabled:!!i}),c=s.ownerAgentId?p?.find(o=>o.id===s.ownerAgentId):null,d=s.parentId?x?.find(o=>o.id===s.parentId):null;return(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)(u,{label:"Status",children:n?(0,e.jsx)(_,{current:s.status,options:Q,onChange:a(o=>n({status:o}),"onChange"),children:(0,e.jsx)(y,{status:s.status})}):(0,e.jsx)(y,{status:s.status})}),(0,e.jsx)(u,{label:"Level",children:n?(0,e.jsx)(_,{current:s.level,options:U,onChange:a(o=>n({level:o}),"onChange"),children:(0,e.jsx)("span",{className:"text-sm capitalize",children:s.level})}):(0,e.jsx)("span",{className:"text-sm capitalize",children:s.level})}),(0,e.jsx)(u,{label:"Owner",children:c?(0,e.jsx)(k,{to:V(c),className:"text-sm hover:underline",children:c.name}):(0,e.jsx)("span",{className:"text-sm text-ink-3",children:"None"})}),s.parentId&&(0,e.jsx)(u,{label:"Parent Goal",children:(0,e.jsx)(k,{to:`/goals/${s.parentId}`,className:"text-sm hover:underline",children:d?.title??s.parentId.slice(0,8)})})]}),(0,e.jsx)(de,{}),(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)(u,{label:"Created",children:(0,e.jsx)("span",{className:"text-sm",children:S(s.createdAt)})}),(0,e.jsx)(u,{label:"Updated",children:(0,e.jsx)("span",{className:"text-sm",children:S(s.updatedAt)})})]})]})}a(xe,"GoalProperties");function he({panelVisible:s,onShowProperties:n}){return(0,e.jsx)(b,{variant:"ghost",size:"icon-xs",className:T("hidden md:inline-flex shrink-0 transition-opacity duration-200",s?"opacity-0 pointer-events-none w-0 overflow-hidden":"opacity-100"),onClick:n,title:"Show properties",children:(0,e.jsx)(ie,{className:"h-4 w-4"})})}a(he,"GoalPropertiesToggleButton");function Fe(){const{goalId:s}=R(),{selectedCompanyId:n,setSelectedCompanyId:i}=L(),{openNewGoal:p}=oe(),{openPanel:x,closePanel:c,panelVisible:d,setPanelVisible:o}=le(),{setBreadcrumbs:I}=ne(),w=X(),{data:r,isLoading:F,error:P}=h({queryKey:m.goals.detail(s),queryFn:a(()=>j.get(s),"queryFn"),enabled:!!s}),l=r?.companyId??n,{data:K}=h({queryKey:m.goals.list(l),queryFn:a(()=>j.list(l),"queryFn"),enabled:!!l}),{data:z}=h({queryKey:m.projects.list(l,{includeArchived:!0}),queryFn:a(()=>ae.list(l,{includeArchived:!0}),"queryFn"),enabled:!!l});(0,f.useEffect)(()=>{!r?.companyId||r.companyId===n||i(r.companyId,{source:"route_sync"})},[r?.companyId,n,i]);const v=C({mutationFn:a(t=>j.update(s,t),"mutationFn"),onSuccess:a(()=>{w.invalidateQueries({queryKey:m.goals.detail(s)}),l&&w.invalidateQueries({queryKey:m.goals.list(l)})},"onSuccess")}),B=C({mutationFn:a(async t=>{if(!l)throw new Error("No organization selected");return re.uploadImage(l,t,`goals/${s??"draft"}`)},"mutationFn")}),g=(K??[]).filter(t=>t.parentId===s),N=(z??[]).filter(t=>s?t.goalIds.includes(s)||t.goals.some(O=>O.id===s)?!0:t.goalId===s:!1);return(0,f.useEffect)(()=>{I([{label:"Goals",href:"/goals"},{label:r?.title??s??"Goal"}])},[I,r,s]),(0,f.useEffect)(()=>(r&&x((0,e.jsx)(xe,{goal:r,onUpdate:a(t=>v.mutate(t),"onUpdate")})),()=>c()),[r]),F?(0,e.jsx)(ce,{variant:"detail"}):P?(0,e.jsx)("p",{className:"text-sm text-bad",children:P.message}):r?(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-xs uppercase text-ink-3",children:r.level}),(0,e.jsx)(y,{status:r.status}),(0,e.jsx)("div",{className:"ml-auto",children:(0,e.jsx)(he,{panelVisible:d,onShowProperties:a(()=>o(!0),"onShowProperties")})})]}),(0,e.jsx)(q,{value:r.title,onSave:a(t=>v.mutate({title:t}),"onSave"),as:"h2",className:"text-xl font-bold"}),(0,e.jsx)(q,{value:r.description??"",onSave:a(t=>v.mutate({description:t}),"onSave"),as:"p",className:"text-sm text-ink-3",placeholder:"Add a description...",multiline:!0,imageUploadHandler:a(async t=>(await B.mutateAsync(t)).contentPath,"imageUploadHandler")})]}),(0,e.jsxs)(W,{defaultValue:"children",children:[(0,e.jsxs)(J,{children:[(0,e.jsxs)(A,{value:"children",children:["Sub-Goals (",g.length,")"]}),(0,e.jsxs)(A,{value:"projects",children:["Projects (",N.length,")"]})]}),(0,e.jsxs)(G,{value:"children",className:"mt-4 space-y-3",children:[(0,e.jsx)("div",{className:"flex items-center justify-start",children:(0,e.jsxs)(b,{size:"sm",variant:"secondary",onClick:a(()=>p({parentId:s}),"onClick"),children:[(0,e.jsx)(se,{className:"h-3.5 w-3.5 mr-1.5"}),"Sub Goal"]})}),g.length===0?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No sub-goals."}):(0,e.jsx)(ue,{goals:g,goalLink:a(t=>`/goals/${t.id}`,"goalLink")})]}),(0,e.jsx)(G,{value:"projects",className:"mt-4",children:N.length===0?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No linked projects."}):(0,e.jsx)("div",{className:"border border-line",children:N.map(t=>(0,e.jsx)(me,{title:t.name,subtitle:t.description??void 0,to:M(t),trailing:(0,e.jsx)(y,{status:t.status})},t.id))})})]})]}):null}a(Fe,"GoalDetail");export{Fe as GoalDetail};
@@ -0,0 +1 @@
1
+ var v=Object.defineProperty;var d=(t,r)=>v(t,"name",{value:r,configurable:!0});import{i as h}from"./rolldown-runtime-ZpX3ckPj.js";import{l,na as _,ta as b}from"./createLucideIcon-Dp_BESPI.js";import{t as k}from"./router-qrDA_fDm.js";import{t as I}from"./chevron-right-dRlTJLmW.js";import{Dn as y}from"./index-CUNTJ_RK.js";var C=h(_(),1),e=h(b(),1);function f({goal:t,children:r,allGoals:o,depth:i,goalLink:c,onSelect:s}){const[n,j]=(0,C.useState)(!0),p=r.length>0,x=c?.(t),m=(0,e.jsxs)(e.Fragment,{children:[p?(0,e.jsx)("button",{className:"p-0.5",onClick:d(a=>{a.preventDefault(),a.stopPropagation(),j(!n)},"onClick"),"aria-label":`${t.title} subtree`,"aria-expanded":n,children:(0,e.jsx)(I,{className:l("h-3 w-3 transition-transform",n&&"rotate-90")})}):(0,e.jsx)("span",{className:"w-4"}),(0,e.jsx)("span",{className:"text-xs text-ink-3 capitalize",children:t.level}),(0,e.jsx)("span",{className:"flex-1 truncate",children:t.title}),(0,e.jsx)(y,{status:t.status})]}),u=l("flex items-center gap-2 px-3 py-1.5 text-sm transition-colors cursor-pointer hover:bg-bg-3/50");return(0,e.jsxs)("div",{children:[x?(0,e.jsx)(k,{to:x,className:l(u,"no-underline text-inherit"),style:{paddingLeft:`${i*16+12}px`},children:m}):(0,e.jsx)("div",{className:u,style:{paddingLeft:`${i*16+12}px`},onClick:d(()=>s?.(t),"onClick"),children:m}),p&&n&&(0,e.jsx)("div",{children:r.map(a=>(0,e.jsx)(f,{goal:a,children:o.filter(N=>N.parentId===a.id),allGoals:o,depth:i+1,goalLink:c,onSelect:s},a.id))})]})}d(f,"GoalNode");function G({goals:t,goalLink:r,onSelect:o}){const i=new Set(t.map(s=>s.id)),c=t.filter(s=>!s.parentId||!i.has(s.parentId));return t.length===0?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No goals."}):(0,e.jsx)("div",{className:"border border-line py-1",children:c.map(s=>(0,e.jsx)(f,{goal:s,children:t.filter(n=>n.parentId===s.id),allGoals:t,depth:0,goalLink:r,onSelect:o},s.id))})}d(G,"GoalTree");export{G as t};
@@ -0,0 +1 @@
1
+ var p=Object.defineProperty;var a=(e,r)=>p(e,"name",{value:r,configurable:!0});import{i as l}from"./rolldown-runtime-ZpX3ckPj.js";import{na as d,ta as g}from"./createLucideIcon-Dp_BESPI.js";import{t as f,v as x}from"./queryKeys-Sk0U6x0H.js";import{n as j}from"./CompanyContext-dsHNbwL5.js";import{q as n}from"./router-qrDA_fDm.js";import{t as y}from"./button-bS07vQAg.js";import{t as v}from"./plus--_-YgodI.js";import{n as h}from"./BreadcrumbContext-BKgeE2st.js";import{E as m,On as _,Sa as N,v as q}from"./index-CUNTJ_RK.js";import{t as G}from"./GoalTree-DSJRz3A3.js";var b=l(d(),1),s=l(g(),1);function P(){const{selectedCompanyId:e}=j(),{openNewGoal:r}=N(),{setBreadcrumbs:o}=h();(0,b.useEffect)(()=>{o([{label:"Goals"}])},[o]);const{data:t,isLoading:c,error:i}=x({queryKey:f.goals.list(e),queryFn:a(()=>_.list(e),"queryFn"),enabled:!!e});return e?c?(0,s.jsx)(q,{variant:"list"}):(0,s.jsxs)("div",{className:"space-y-4",children:[i&&(0,s.jsx)("p",{className:"text-sm text-bad",children:i.message}),t&&t.length===0&&(0,s.jsx)(m,{icon:n,message:"No goals yet.",action:"Add Goal",onAction:a(()=>r(),"onAction")}),t&&t.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex items-center justify-start",children:(0,s.jsxs)(y,{size:"sm",variant:"secondary",onClick:a(()=>r(),"onClick"),children:[(0,s.jsx)(v,{className:"h-3.5 w-3.5 mr-1.5"}),"New Goal"]})}),(0,s.jsx)(G,{goals:t,goalLink:a(u=>`/goals/${u.id}`,"goalLink")})]})]}):(0,s.jsx)(m,{icon:n,message:"Select an organization to view goals."})}a(P,"Goals");export{P as Goals};
@@ -0,0 +1 @@
1
+ var x=Object.defineProperty;var r=(s,t)=>x(s,"name",{value:t,configurable:!0});import{i as m}from"./rolldown-runtime-ZpX3ckPj.js";import{l as i,ta as o}from"./createLucideIcon-Dp_BESPI.js";import{a as u,n as d,t as f}from"./avatar-DWrtTUFj.js";var e=m(o(),1);function g(s){const t=s.trim().split(/\s+/);return t.length>=2?(t[0][0]+t[t.length-1][0]).toUpperCase():s.slice(0,2).toUpperCase()}r(g,"deriveInitials");var h={xs:"text-sm",sm:"text-xs",default:"text-sm",lg:"text-sm"};function A({name:s,avatarUrl:t,initials:n,size:a="default",shape:l="circle",className:c}){const p=n??g(s);return(0,e.jsxs)("span",{className:i("inline-flex min-w-0 gap-1.5 items-center",a==="xs"&&"gap-1",a==="lg"&&"gap-2",c),title:s,children:[(0,e.jsxs)(f,{size:a,shape:l,"aria-hidden":"true",children:[t&&(0,e.jsx)(u,{src:t,alt:""}),(0,e.jsx)(d,{children:p})]}),(0,e.jsx)("span",{className:i("truncate",h[a]),children:s})]})}r(A,"Identity");export{g as n,A as t};
@@ -0,0 +1 @@
1
+ var b=Object.defineProperty;var a=(t,n)=>b(t,"name",{value:n,configurable:!0});import{i as w}from"./rolldown-runtime-ZpX3ckPj.js";import{na as k,ta as N,vi as g}from"./createLucideIcon-Dp_BESPI.js";import{a as C,o as P,r as L,t as _}from"./dist-Bt8JSjoR.js";import{t as D}from"./chevron-left-zJln1v3t.js";import{t as E}from"./chevron-right-dRlTJLmW.js";import{t as A}from"./x-C-YdLCiV.js";import{eo as T}from"./index-CUNTJ_RK.js";import{o as $,s as j}from"./issue-output-DJVhoabR.js";var i=w(k(),1),K=(0,i.createContext)(null);function F(t,n){const o=t?.toLowerCase().split(";")[0].trim();return o==="text/html"||o==="application/xhtml+xml"||/\.html?$/i.test(n??"")}a(F,"isHtmlPreview");var M=["default-src 'none'","script-src 'unsafe-inline'","style-src 'unsafe-inline'","img-src data:","font-src data:","media-src data:","connect-src 'none'","frame-src 'none'","object-src 'none'","base-uri 'none'","form-action 'none'"].join("; ");function Q(t){return`<!doctype html><html><head><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="${M}"><meta name="referrer" content="no-referrer"></head><body>${t}</body></html>`}a(Q,"htmlPreviewDocument");function R(t){return t.contentType.toLowerCase().split(";")[0]?.trim()??""}a(R,"normalizedContentType");function I(t){return t.originalFilename??t.id}a(I,"attachmentFilename");function U(t){return t.openPath??t.contentPath}a(U,"attachmentOpenPath");function q(t){return t.downloadPath??`${t.contentPath}?download=1`}a(q,"attachmentDownloadPath");function Y(t){const n=R(t);return $(n,t.originalFilename)&&!/^image\/hei[cf](?:-sequence)?$/.test(n)}a(Y,"isImageAttachment");function Z(t){return j(t.contentType,t.originalFilename)}a(Z,"isVideoAttachment");function O(t){return g(t)}a(O,"isMarkdownAttachment");function tt(t){const n=t.contentType.toLowerCase().split(";")[0].trim();return g(t)||F(n,t.originalFilename)||n.startsWith("text/")||/^(application\/(json|xml|javascript|x-yaml|yaml)|application\/[\w.-]+\+json)$/.test(n)||["","application/octet-stream"].includes(n)&&/\.(txt|log|csv|json|yaml|yml|toml|ini|sh|ts|tsx|js|jsx|py|css|html)$/i.test(t.originalFilename??"")}a(tt,"isTextAttachment");var e=w(N(),1);function et({items:t,initialIndex:n,open:o,onOpenChange:c}){const[m,d]=(0,i.useState)(n),x=(0,i.useRef)(null),p=(0,i.useCallback)(s=>{x.current=s},[]);(0,i.useEffect)(()=>{o&&d(n)},[o,n]);const h=(0,i.useCallback)(()=>{d(s=>(s+1)%t.length)},[t.length]),f=(0,i.useCallback)(()=>{d(s=>(s-1+t.length)%t.length)},[t.length]);(0,i.useEffect)(()=>{m<t.length||d(0)},[m,t.length]),(0,i.useEffect)(()=>{if(!o)return;const s=a(l=>{l.key==="ArrowRight"?h():l.key==="ArrowLeft"?f():l.key==="Escape"&&c(!1)},"handler");return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[o,h,f,c]);const y=(0,i.useCallback)(s=>{const l=s.target;l.closest("button")||l.closest("a")||l===x.current||c(!1)},[c]);if(t.length===0)return null;const r=t[m];if(!r)return null;const u=I(r),v=j(r.contentType,r.originalFilename);return(0,e.jsx)(_,{open:o,onOpenChange:c,children:(0,e.jsxs)(P,{children:[(0,e.jsx)(C,{className:"fixed inset-0 z-50 bg-black/90 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 duration-200"}),(0,e.jsxs)(L,{className:"fixed inset-0 z-50 flex flex-col outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 duration-200",onClick:y,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 text-white/80 text-sm shrink-0",children:[(0,e.jsx)("span",{className:"truncate max-w-(--pct-50) font-medium",title:u,children:u}),(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsxs)("span",{className:"text-white/40 tabular-nums text-xs",children:[m+1," / ",t.length]}),(0,e.jsx)("a",{href:q(r),download:u,className:"text-white/50 hover:text-white transition-colors",title:"Download","aria-label":`Download ${u}`,onClick:a(s=>s.stopPropagation(),"onClick"),children:(0,e.jsx)(T,{className:"h-4.5 w-4.5"})}),(0,e.jsx)("button",{type:"button",onClick:a(()=>c(!1),"onClick"),className:"text-white/50 hover:text-white transition-colors",title:"Close",children:(0,e.jsx)(A,{className:"h-5 w-5"})})]})]}),(0,e.jsxs)("div",{className:"flex-1 flex items-center min-h-0",children:[(0,e.jsx)("div",{className:"w-16 md:w-24 shrink-0 flex items-center justify-center h-full",children:t.length>1&&(0,e.jsx)("button",{type:"button",onClick:f,className:"rounded-full bg-white/10 p-3 text-white/60 hover:text-white hover:bg-white/20 transition-colors",title:"Previous",children:(0,e.jsx)(D,{className:"h-7 w-7"})})}),(0,e.jsx)("div",{className:"flex-1 flex items-center justify-center min-w-0 min-h-0 h-full px-2",children:v?(0,e.jsx)("video",{ref:p,src:r.contentPath,className:"max-w-full max-h-full rounded-lg",controls:!0,playsInline:!0}):(0,e.jsx)("img",{ref:p,src:r.contentPath,alt:u,className:"max-w-full max-h-full object-contain select-none rounded-lg",draggable:!1})}),(0,e.jsx)("div",{className:"w-16 md:w-24 shrink-0 flex items-center justify-center h-full",children:t.length>1&&(0,e.jsx)("button",{type:"button",onClick:h,className:"rounded-full bg-white/10 p-3 text-white/60 hover:text-white hover:bg-white/20 transition-colors",title:"Next",children:(0,e.jsx)(E,{className:"h-7 w-7"})})})]}),(0,e.jsx)("div",{className:"h-6 shrink-0"})]})]})})}a(et,"ImageGalleryModal");export{Y as a,Z as c,K as d,U as i,Q as l,q as n,O as o,I as r,tt as s,et as t,F as u};