@tickernelz/wardmote-ui 2026.1108.2 → 2026.1111.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.
- package/dist/assets/AccessSelectIdentity-BzNL_ZaL.js +1 -0
- package/dist/assets/ActiveAgentsPanel-CLj_ucN7.js +1 -0
- package/dist/assets/AdapterManager-8ofINbXH.js +1 -0
- package/dist/assets/AdvancedToolsRoute-dQcLG_fZ.js +39 -0
- package/dist/assets/AgentActionButtons-pRsHFtLW.js +1 -0
- package/dist/assets/AgentAvatar-EsXsSxSG.js +1 -0
- package/dist/assets/AgentBubbleActionRow-nLDgzu9o.js +1 -0
- package/dist/assets/AgentCharacter-DzxzveQH.js +2 -0
- package/dist/assets/AgentChat-DTQT-Wek.js +1 -0
- package/dist/assets/AgentChats-DztS4ACV.js +1 -0
- package/dist/assets/AgentDefaults-xGoI264I.js +1 -0
- package/dist/assets/AgentDetail-BbpgFl_G.js +38 -0
- package/dist/assets/AgentIconPicker-DHCKaIkZ.js +1 -0
- package/dist/assets/AgentIdentity-GjMQAWCv.js +1 -0
- package/dist/assets/AgentMailCredentialField-CJcF0Clw.js +1 -0
- package/dist/assets/AgentMultiSelect-ChKUNflE.js +1 -0
- package/dist/assets/AgentRoleEditor-BaT_mb8k.js +1 -0
- package/dist/assets/AgentSetupPrompt-CRMBM6wm.js +30 -0
- package/dist/assets/AgentTodoCard-BCx1biOy.js +1 -0
- package/dist/assets/Agents-BTZu-vy-.js +3 -0
- package/dist/assets/AppDetail-Bw4J28Ak.js +5 -0
- package/dist/assets/AppLogo-DTmvrLai.js +1 -0
- package/dist/assets/AppNotConnected-CBliUH8m.js +1 -0
- package/dist/assets/ApprovalCard-DKGjyQt-.js +1 -0
- package/dist/assets/ApprovalDetail-DVVR3EtT.js +1 -0
- package/dist/assets/ApprovalPayload-DekKq-IE.js +1 -0
- package/dist/assets/Approvals-CLeSmmEV.js +1 -0
- package/dist/assets/AppsConnect-C35NNIiG.js +1 -0
- package/dist/assets/AppsReview-lab3deOa.js +1 -0
- package/dist/assets/ArtifactCard-BOcWFgmA.js +1 -0
- package/dist/assets/Artifacts-DAtpWAuL.js +1 -0
- package/dist/assets/AssistantConnection-gcHktiyu.js +1 -0
- package/dist/assets/AttentionInteractionResolver-Cm0k_3MB.js +1 -0
- package/dist/assets/AuditHub-C6U9wM2v.js +1 -0
- package/dist/assets/Auth-BdXfGiLC.js +3 -0
- package/dist/assets/BoardChat-BTFAl90K.js +18 -0
- package/dist/assets/BoardClaim-Cv56WNDU.js +1 -0
- package/dist/assets/BootstrapSetupUxLab-DbE6ARGg.js +1 -0
- package/dist/assets/BreadcrumbContext-C1Pz9E0M.js +1 -0
- package/dist/assets/Browse-0mLkYDuT.js +1 -0
- package/dist/assets/BudgetPolicyCard-BwV8P4n4.js +1 -0
- package/dist/assets/CaseDetail-X0DGQoca.js +2 -0
- package/dist/assets/CaseIdentifierKey-DgiLO3Rb.js +1 -0
- package/dist/assets/Cases-gjrf6tmu.js +2 -0
- package/dist/assets/ChatEndpointDetail-Co2K-j6p.js +5 -0
- package/dist/assets/ChatEndpointSetup-XspGek-A.js +1 -0
- package/dist/assets/ChatIdentityConfirm-m3fNvAJx.js +1 -0
- package/dist/assets/ChoiceControls-Cy8E_BqQ.js +1 -0
- package/dist/assets/CliAuth-CTkJ-3kI.js +1 -0
- package/dist/assets/CommentAttributionChip-DHuPOHJh.js +1 -0
- package/dist/assets/Companies-BbbaWb0v.js +1 -0
- package/dist/assets/CompanyAccess-Dmq_cs8a.js +1 -0
- package/dist/assets/CompanyActivity-D1j2INEB.js +1 -0
- package/dist/assets/CompanyConnections-CZOQquHF.js +1 -0
- package/dist/assets/CompanyContext-BxCDBNSH.js +1 -0
- package/dist/assets/CompanyEnvironments-DDbrQrMB.js +3 -0
- package/dist/assets/CompanyExport-B0eLuNvu.js +4 -0
- package/dist/assets/CompanyImport-DbbCQEFp.js +1 -0
- package/dist/assets/CompanySettings-8ROAg5aG.js +1 -0
- package/dist/assets/CompanySettingsPluginPage-B-79nVuk.js +1 -0
- package/dist/assets/CompanySkills-BfBhMNaP.js +10 -0
- package/dist/assets/ComposerAddMenu-DBuHSmG4.js +3 -0
- package/dist/assets/ConfigureBuiltInAgentModal-BkaylF48.js +1 -0
- package/dist/assets/ConnectionSetupFlow-Dzuzx7jk.js +40 -0
- package/dist/assets/CopyText-CW3qWFPY.js +1 -0
- package/dist/assets/CopyableGatewayUrl-C8LwXvVu.js +1 -0
- package/dist/assets/CrossIssueCollaborationUxLab-BNEDnULO.js +1 -0
- package/dist/assets/Dashboard-C_87MSE2.js +2 -0
- package/dist/assets/DashboardLive-CdHY1mHk.js +1 -0
- package/dist/assets/DecisionDateChips-BckDENkn.js +1 -0
- package/dist/assets/DecisionModelSettings-DiqQ14Zd.js +1 -0
- package/dist/assets/DecisionQueuePage-BZrUoCk3.js +1 -0
- package/dist/assets/DesignGuide-B38yltct.js +23 -0
- package/dist/assets/DocumentFrameHeader-C57Py4YE.js +1 -0
- package/dist/assets/EmailConnectionAccess-CgZl2FFX.js +1 -0
- package/dist/assets/EmailEndpointSetup-Dpg3e5IP.js +1 -0
- package/dist/assets/EnforcementBanner-CqY3eZb5.js +1 -0
- package/dist/assets/EntityRow-CsMXIXXb.js +1 -0
- package/dist/assets/ExecutionWorkspaceDetail-w0tph5fx.js +19 -0
- package/dist/assets/FilterBar-BsmtWqB7.js +1 -0
- package/dist/assets/FoldCurtain-BirYTOEh.js +1 -0
- package/dist/assets/FolderControls-DfQCO8-2.js +1 -0
- package/dist/assets/GatewayDetail-Cf6WshG5.js +2 -0
- package/dist/assets/GatewaysList-C3fEQHRs.js +1 -0
- package/dist/assets/GoalDetail-B2jZMNHQ.js +1 -0
- package/dist/assets/GoalTree-Btaagjxs.js +1 -0
- package/dist/assets/Goals-0Q2Gnko1.js +1 -0
- package/dist/assets/Identity-DHk25Fo0.js +1 -0
- package/dist/assets/ImageGalleryModal-OwUAU2AO.js +1 -0
- package/dist/assets/Inbox-Bk8khlSh.js +2 -0
- package/dist/assets/InlineBanner-DnQWPYOq.js +1 -0
- package/dist/assets/InlineEditor-B-oEEW8R.js +1 -0
- package/dist/assets/InlineEntitySelector-NCqeSVBt.js +1 -0
- package/dist/assets/InstanceAccess-DyQFxK_O.js +1 -0
- package/dist/assets/InstanceAdvanced-C8uDSsPL.js +1 -0
- package/dist/assets/InstanceFeatures-CPYwZmZk.js +1 -0
- package/dist/assets/InviteLanding-o-enK_RP.js +1 -0
- package/dist/assets/IssueChatLongThreadPerf-CjaD3woT.js +2 -0
- package/dist/assets/IssueChatThread-CUlN-lN0.js +40 -0
- package/dist/assets/IssueDetail-CdKGl1_O.js +9 -0
- package/dist/assets/IssueDocumentAnnotations-DqMdyd5R.js +2 -0
- package/dist/assets/IssueOutputSection-BReOvQxZ.js +1 -0
- package/dist/assets/IssueRecoveryActionCard-DXthkoa2.js +1 -0
- package/dist/assets/IssueReferenceActivitySummary-BybOSmTQ.js +1 -0
- package/dist/assets/IssueReferencePill-Byyo3mWU.js +1 -0
- package/dist/assets/IssueThreadInteractionCard-CnGISjFd.js +9 -0
- package/dist/assets/IssueWriteDenialNotice-CFwpbsKd.js +1 -0
- package/dist/assets/Issues-BrnnvHeE.js +3 -0
- package/dist/assets/JoinRequestQueue-D2RLtri2.js +1 -0
- package/dist/assets/JsonSchemaForm-Cn579kgp.js +1 -0
- package/dist/assets/LiveNowTodoLine-DJoyO8eZ.js +1 -0
- package/dist/assets/ManagedAiConnectionDetails-DsAuL_cK.js +1 -0
- package/dist/assets/MarkdownBody-BfIbo0pr.js +16 -0
- package/dist/assets/MarkdownEditor-CCqgqbbX.js +85 -0
- package/dist/assets/McpConnect-BJhgeezW.js +1 -0
- package/dist/assets/MembershipAction-Bu1nqQYv.js +1 -0
- package/dist/assets/MetricCard-DCSvmMqn.js +1 -0
- package/dist/assets/MissingPluginTabPlaceholder-UM0Cgk9J.js +1 -0
- package/dist/assets/ModelsAndProviders-B0gYOLvd.js +1 -0
- package/dist/assets/MootMark-DpAqNyxE.js +1 -0
- package/dist/assets/NewAgent-E1cSVMu1.js +1 -0
- package/dist/assets/OmpAllSettings-fSc31cIu.js +1 -0
- package/dist/assets/OmpSignIn-BSLYU6uC.js +3 -0
- package/dist/assets/OpenwaGatewayManager-UG0cEqQK.js +2 -0
- package/dist/assets/PathInstructionsModal-CEyWg69s.js +1 -0
- package/dist/assets/PipelineSettings-CY-XoAGe.js +2 -0
- package/dist/assets/Pipelines-lSbZ6-uQ.js +1 -0
- package/dist/assets/PixelsOffice-s8WCydt9.js +2 -0
- package/dist/assets/PluginManager-BLY48Rdb.js +1 -0
- package/dist/assets/PluginPage-CIvrzBLJ.js +1 -0
- package/dist/assets/PluginSettings-DugaPtGC.js +1 -0
- package/dist/assets/ProfileDetailRoute-CY9Zo_L-.js +1 -0
- package/dist/assets/ProfileSettings-Bfeh1MlI.js +1 -0
- package/dist/assets/ProfileWizardRoute-DQ8Wf6CN.js +1 -0
- package/dist/assets/ProjectDetail-Cie7YkeD.js +1 -0
- package/dist/assets/ProjectWorkspaceDetail-4Eh2xMnt.js +29 -0
- package/dist/assets/ProjectWorkspacesContent-CAEuHcwN.js +1 -0
- package/dist/assets/Projects-B7XDgtru.js +1 -0
- package/dist/assets/PublicIssueSharePage-D7UqYVp1.js +1 -0
- package/dist/assets/QuestionForm-BexjfwBC.js +7 -0
- package/dist/assets/QuotaBar-85eAFwZM.js +1 -0
- package/dist/assets/RepositoryEditor-C783DHwy.js +1 -0
- package/dist/assets/ResponsibleUserDenialNotice-CKbMq_8f.js +1 -0
- package/dist/assets/ResponsibleUserDenialUxLab-CFDLXQbq.js +1 -0
- package/dist/assets/ReviewQueueCard-LPKXTa7p.js +1 -0
- package/dist/assets/RichWorkProductCard-BO_PVS_R.js +1 -0
- package/dist/assets/RoutineActivityRow-BAIWOkSU.js +1 -0
- package/dist/assets/RoutineDetail-CxBrkRyy.js +2 -0
- package/dist/assets/RoutineRunVariablesDialog-BmocvukK.js +1 -0
- package/dist/assets/RoutineVariablesEditor-CBxgGYWn.js +1 -0
- package/dist/assets/Routines-BOD80kz-.js +1 -0
- package/dist/assets/ScrollToBottom-MElZx9KC.js +1 -0
- package/dist/assets/Search-CBYkMobM.js +1 -0
- package/dist/assets/SearchableSelect-DF7YpkdT.js +1 -0
- package/dist/assets/Secrets-Bu6q9QVj.js +4 -0
- package/dist/assets/SetupWizard-C3-3uNXq.js +1 -0
- package/dist/assets/SidebarContext-BDwcx9eV.js +1 -0
- package/dist/assets/SidebarNavItem-BFemYMPb.js +1 -0
- package/dist/assets/SkillBinaryFile-lsCfxI4Z.js +1 -0
- package/dist/assets/SkillCardIcon-D6Sde9N1.js +2 -0
- package/dist/assets/SkillSourceTree-BCndxsNf.js +2 -0
- package/dist/assets/SkillSources-B7fG3KBv.js +2 -0
- package/dist/assets/SkillStudio-BEAfNXcI.js +9 -0
- package/dist/assets/SourceTrustBadge-BaYEFytm.js +1 -0
- package/dist/assets/StatusCards-BfwQO3yd.js +1 -0
- package/dist/assets/StatusIcon-C2NWeA8n.js +1 -0
- package/dist/assets/SummarySlotCard-CmxW3-lC.js +1 -0
- package/dist/assets/TaskChatComposerTakeoverContext-DWOxDlEu.js +1 -0
- package/dist/assets/TaskChatLab-B0aJ05Zn.js +11 -0
- package/dist/assets/TaskChatMarker-CqvZL5i4.js +2 -0
- package/dist/assets/TaskChatProtocolCard-poluyifm.js +1 -0
- package/dist/assets/TaskChatThreadView-QQeO-S6o.js +4 -0
- package/dist/assets/TaskDetailRelationsPanel-Bk1aFfQv.js +1 -0
- package/dist/assets/TaskTreeControls-CDIjiEFr.js +3 -0
- package/dist/assets/Terminal-_XGdPaFV.js +1 -0
- package/dist/assets/TerminalView-DYJK_6rV.js +58 -0
- package/dist/assets/ThemeContext-DD1EP5qf.js +1 -0
- package/dist/assets/ThemeToggle-CYTGbBo5.js +1 -0
- package/dist/assets/ToastContext-hirVjDXt.js +1 -0
- package/dist/assets/ToolsAdminGate-CGmWPDuY.js +1 -0
- package/dist/assets/TrustPresetSection-BE9L2eQf.js +1 -0
- package/dist/assets/UserProfile-DUpHIz3U.js +1 -0
- package/dist/assets/WebhookUrlWarning-DEtZrsXR.js +1 -0
- package/dist/assets/WhatNeedsMe-s8nEWFq9.js +1 -0
- package/dist/assets/WorkspaceRuntimeControls-UK1xSSV7.js +1 -0
- package/dist/assets/Workspaces-J1XIkM6C.js +1 -0
- package/dist/assets/access-CbJiLazn.js +1 -0
- package/dist/assets/activity-Cvh9YJZ4.js +1 -0
- package/dist/assets/activity-format-B1sPfZ7Q.js +1 -0
- package/dist/assets/activity-in5dxqje.js +1 -0
- package/dist/assets/adapter-display-registry-DLd1q9Lr.js +1 -0
- package/dist/assets/adapters-qgEEm2Iw.js +1 -0
- package/dist/assets/agent-avatar-url-BqlU_BLu.js +1 -0
- package/dist/assets/agent-config-primitives-CB06SePU.js +1 -0
- package/dist/assets/agent-order-BE-pAWdx.js +1 -0
- package/dist/assets/agentChats-C2bFjmaS.js +1 -0
- package/dist/assets/agents-HNnobIne.js +1 -0
- package/dist/assets/alert-dialog-DnlZalnH.js +1 -0
- package/dist/assets/app-connect-policy-IJzJACTA.js +1 -0
- package/dist/assets/archive-CSkC2INB.js +1 -0
- package/dist/assets/archive-restore-lk6xiO1p.js +1 -0
- package/dist/assets/arrow-down-B0zOBhzU.js +1 -0
- package/dist/assets/arrow-down-left-DW1TelNZ.js +1 -0
- package/dist/assets/arrow-left-CKq5sdlw.js +1 -0
- package/dist/assets/arrow-right-CDTbNhTa.js +1 -0
- package/dist/assets/arrow-up-DgjI5OHn.js +1 -0
- package/dist/assets/arrow-up-down-RwrdXrTc.js +1 -0
- package/dist/assets/arrow-up-right-CnSONOF5.js +1 -0
- package/dist/assets/artifacts-CaQr7P1r.js +1 -0
- package/dist/assets/assets-j5Kg0sqV.js +1 -0
- package/dist/assets/assignees-DkQNbPzi.js +1 -0
- package/dist/assets/audit-navigation-IalprBz0.js +1 -0
- package/dist/assets/avatar-Cliaab6i.js +1 -0
- package/dist/assets/badge-CmRCZQXu.js +1 -0
- package/dist/assets/badge-check-ByHo5kUl.js +1 -0
- package/dist/assets/bot-TL3Jdr73.js +1 -0
- package/dist/assets/boxes-BxuK2fXe.js +1 -0
- package/dist/assets/braces-Cc8xLJ1U.js +1 -0
- package/dist/assets/browser-use-DEYvGklp.js +1 -0
- package/dist/assets/budgets-ifaLm6Di.js +1 -0
- package/dist/assets/button-Cq79rkKD.js +1 -0
- package/dist/assets/calendar-clock-Bm_UA63E.js +1 -0
- package/dist/assets/card-DCb-JOH-.js +1 -0
- package/dist/assets/cases-DVp6Rjr-.js +1 -0
- package/dist/assets/chatEndpoints-DkjTRXJB.js +1 -0
- package/dist/assets/check-vba7RPNV.js +1 -0
- package/dist/assets/checkbox-BGLv5God.js +1 -0
- package/dist/assets/chevron-down-CTfmQYtZ.js +1 -0
- package/dist/assets/chevron-left-DbSymkYp.js +1 -0
- package/dist/assets/chevron-right-CZqG6c6-.js +1 -0
- package/dist/assets/chevron-up-CzC1gtv6.js +1 -0
- package/dist/assets/chip-BzNFVgX5.js +1 -0
- package/dist/assets/circle-3iXc8Bn9.js +1 -0
- package/dist/assets/circle-alert-DXWfyHyZ.js +1 -0
- package/dist/assets/circle-dot-ClSiVq7g.js +1 -0
- package/dist/assets/circle-question-mark-CqwY53-2.js +1 -0
- package/dist/assets/circle-slash-CFjhY0cX.js +1 -0
- package/dist/assets/circle-x-DlwqHtyY.js +1 -0
- package/dist/assets/clipboard-CTLKYvRL.js +1 -0
- package/dist/assets/clipboard-paste-0RG8HmtD.js +1 -0
- package/dist/assets/clock-BoEHLMU_.js +1 -0
- package/dist/assets/cloud-J5TXOfaU.js +1 -0
- package/dist/assets/code-xml-CfpLGfdE.js +1 -0
- package/dist/assets/coins-BzhY_8bw.js +1 -0
- package/dist/assets/collapsible-BVnhGR5_.js +1 -0
- package/dist/assets/color-contrast-BHHcEMtO.js +1 -0
- package/dist/assets/columns-3-BEJ-fVu5.js +1 -0
- package/dist/assets/command-Cq8PZDyP.js +5 -0
- package/dist/assets/companies-query-CmKa9bVw.js +1 -0
- package/dist/assets/company-skill-routes-D5LJ1l8M.js +1 -0
- package/dist/assets/connection-identity-HeZN7f9X.js +1 -0
- package/dist/assets/connection-owner-DfXYDqVS.js +1 -0
- package/dist/assets/copy-DWkF-rFH.js +1 -0
- package/dist/assets/createLucideIcon-C01KAfc1.js +94 -0
- package/dist/assets/decision-models-B27g9stT.js +1 -0
- package/dist/assets/{definition-CvJN1sEp.js → definition-CP66xiVi.js} +1 -1
- package/dist/assets/dialog-DAYoqqlE.js +1 -0
- package/dist/assets/dist-B6TpBrd3.js +1 -0
- package/dist/assets/dist-BAtkULn4.js +1 -0
- package/dist/assets/{dist-YLpD_m68.js → dist-BEo-uoE2.js} +2 -2
- package/dist/assets/dist-BPuuaNc6.js +1 -0
- package/dist/assets/dist-BQx_Sj8Z.js +1 -0
- package/dist/assets/dist-BX4PSqp4.js +1 -0
- package/dist/assets/dist-BY93_d3Z.js +1 -0
- package/dist/assets/{dist-CoBeqEhN.js → dist-Bc6S4vv3.js} +2 -2
- package/dist/assets/dist-BgbeNgQ7.js +1 -0
- package/dist/assets/dist-BhEZ0cZQ.js +1 -0
- package/dist/assets/dist-BhxPxuMy.js +13 -0
- package/dist/assets/dist-BoCmQaxU.js +1 -0
- package/dist/assets/{dist-Bs-s6dPt.js → dist-Bp5Y-deP.js} +1 -1
- package/dist/assets/dist-C7_8mWOJ.js +1 -0
- package/dist/assets/dist-CD47N__7.js +1 -0
- package/dist/assets/{dist-D_0NfuCy.js → dist-CN5Rg9XU.js} +4 -4
- package/dist/assets/dist-CcBZFMdg.js +1 -0
- package/dist/assets/dist-CdFTLNcc.js +1 -0
- package/dist/assets/dist-CjIC-l6P.js +1 -0
- package/dist/assets/{dist-DwUD8svp.js → dist-Cv1Aw0YM.js} +1 -1
- package/dist/assets/dist-CxscfvXr.js +1 -0
- package/dist/assets/dist-D4qkWMdz.js +1 -0
- package/dist/assets/{dist-DX49WtIu.js → dist-D61jI6QA.js} +1 -1
- package/dist/assets/dist-DTj_cM7l.js +1 -0
- package/dist/assets/dist-DTwCbVsv.js +7 -0
- package/dist/assets/dist-DXN4Acbb.js +1 -0
- package/dist/assets/dist-DY5RRJBY.js +1 -0
- package/dist/assets/dist-Dqr5P1yA.js +1 -0
- package/dist/assets/dist-DrXWoUSy.js +1 -0
- package/dist/assets/dist-Uvf9OORN.js +1 -0
- package/dist/assets/dist-Wi1mdRva.js +1 -0
- package/dist/assets/dist-ZRlzTkPa.js +1 -0
- package/dist/assets/dist-ds5P5TFe.js +13 -0
- package/dist/assets/dist-t8wEz_ib.js +1 -0
- package/dist/assets/dist-xt2ddRNe.js +1 -0
- package/dist/assets/dist-yKrp-Qew.js +1 -0
- package/dist/assets/dropdown-menu-BgB3ZFIW.js +1 -0
- package/dist/assets/dynamic-loader-ehitOaJV.js +103 -0
- package/dist/assets/ellipsis-BK2IHFgt.js +1 -0
- package/dist/assets/ellipsis-vertical-C5e3-e9R.js +1 -0
- package/dist/assets/email-CV3yYcNq.js +1 -0
- package/dist/assets/environment-variables-editor-BitLLMXQ.js +1 -0
- package/dist/assets/environments-CfHweeFn.js +1 -0
- package/dist/assets/es2015-DhDTIiZX.js +41 -0
- package/dist/assets/execution-projection-BGI5f3kX.js +1 -0
- package/dist/assets/external-link-CFqVy5ry.js +1 -0
- package/dist/assets/eye-BwNiGG0K.js +1 -0
- package/dist/assets/eye-off-DM4Mn0Ui.js +1 -0
- package/dist/assets/fast-responses-DPQkf5ib.js +1 -0
- package/dist/assets/file-_5byK_0p.js +1 -0
- package/dist/assets/file-code-corner-P0uyjZIh.js +1 -0
- package/dist/assets/file-pen-line-kClOj_yW.js +1 -0
- package/dist/assets/file-question-mark-CkUR8QEW.js +1 -0
- package/dist/assets/file-search-B7lfsYmF.js +1 -0
- package/dist/assets/file-text-Chu49UHl.js +1 -0
- package/dist/assets/flag-CrPUL4EW.js +1 -0
- package/dist/assets/flask-conical-Dcrf_nx_.js +1 -0
- package/dist/assets/folder-git-2-CLpnZyIw.js +1 -0
- package/dist/assets/folder-open-Kn4cJ9z0.js +1 -0
- package/dist/assets/folder-search-B8ukxS6T.js +1 -0
- package/dist/assets/funnel-DCdgde5v.js +1 -0
- package/dist/assets/git-pull-request-BpJt0qs7.js +1 -0
- package/dist/assets/github-icon-Cd7zG3cl.js +1 -0
- package/dist/assets/health-DgXwfcgQ.js +1 -0
- package/dist/assets/heartbeats-DqejhX23.js +1 -0
- package/dist/assets/inbox-Cbfplszq.js +1 -0
- package/dist/assets/inboxArchiveCache-BtWGk_ob.js +1 -0
- package/dist/assets/index-B68fUztV.js +63 -0
- package/dist/assets/index-EGhEwKJ3.css +2 -0
- package/dist/assets/info-DH5P_pOB.js +1 -0
- package/dist/assets/input-ChF32KiE.js +1 -0
- package/dist/assets/instance-settings-QXUWVmQs.js +1 -0
- package/dist/assets/instanceSettings-CUD5DYwc.js +1 -0
- package/dist/assets/interaction-audience-B7SSjTOH.js +1 -0
- package/dist/assets/interaction-card-visibility-BruS_M_b.js +1 -0
- package/dist/assets/invite-memory-CHGcQdLs.js +1 -0
- package/dist/assets/issue-attribution-DfN_3u2W.js +1 -0
- package/dist/assets/issue-blockers-CPChygIu.js +1 -0
- package/dist/assets/issue-filters-BO9xiK0c.js +1 -0
- package/dist/assets/issue-output-BWw5hGM4.js +1 -0
- package/dist/assets/issue-properties-DImTADpL.js +4 -0
- package/dist/assets/issue-share-BziUBrKs.js +1 -0
- package/dist/assets/issue-workspace-selection-ZZQ5MvBX.js +1 -0
- package/dist/assets/issueActiveRun-s6f-GUHq.js +1 -0
- package/dist/assets/key-round-hIknfaVC.js +1 -0
- package/dist/assets/label-B8cGBdHV.js +1 -0
- package/dist/assets/layout-dashboard-B47lh1t7.js +1 -0
- package/dist/assets/line-diff-DAcZgvm2.js +3 -0
- package/dist/assets/link-2-Czdp7P22.js +1 -0
- package/dist/assets/link-B5IDCTfS.js +1 -0
- package/dist/assets/list-filter-DGszpYtY.js +1 -0
- package/dist/assets/list-todo-mtfpHiej.js +1 -0
- package/dist/assets/log-in-xaKdjJ3s.js +1 -0
- package/dist/assets/managed-sandbox-environment-B8DewKvK.js +1 -0
- package/dist/assets/maximize-2-D_7SnXGd.js +1 -0
- package/dist/assets/{mention-chips-BKRdYPgz.js → mention-chips-rgpUYSS0.js} +9 -9
- package/dist/assets/message-square-plus-Bx97bVFn.js +1 -0
- package/dist/assets/minus-Cksvqs-H.js +1 -0
- package/dist/assets/model-DidtFy-U.js +1 -0
- package/dist/assets/model-fallback-BA1V-ii-.js +1 -0
- package/dist/assets/model-picker-fields-reyKlVR2.js +1 -0
- package/dist/assets/network-DuLdTW_2.js +1 -0
- package/dist/assets/octagon-alert-CDc0IOFm.js +1 -0
- package/dist/assets/octagon-x-BnObTt3C.js +1 -0
- package/dist/assets/omp-settings-model-RrukAqFT.js +1 -0
- package/dist/assets/package-CAlqg80l.js +1 -0
- package/dist/assets/paperclip-CdwdbvAb.js +1 -0
- package/dist/assets/pause-D5LWH4m4.js +1 -0
- package/dist/assets/pen-line-BctzdUrl.js +1 -0
- package/dist/assets/pencil-4y59RLDI.js +1 -0
- package/dist/assets/pipeline-stage-presentation-DplSUQ-v.js +2 -0
- package/dist/assets/pipelines-zw8JXnEw.js +1 -0
- package/dist/assets/play-DYcWlP80.js +1 -0
- package/dist/assets/plug-Dlmv_sib.js +1 -0
- package/dist/assets/plugins-DxlXA9g_.js +1 -0
- package/dist/assets/plus-XHeYelml.js +1 -0
- package/dist/assets/popover-Dq6_MkmZ.js +1 -0
- package/dist/assets/portable-files-CloN_vbk.js +1 -0
- package/dist/assets/power-Df1YORDz.js +1 -0
- package/dist/assets/presentation-mode-B1mYfRtC.js +1 -0
- package/dist/assets/primary-sidebar-styles-BdMiagDc.js +1 -0
- package/dist/assets/profile-summary-ClLOCEcJ.js +1 -0
- package/dist/assets/projects-DebVPi8C.js +1 -0
- package/dist/assets/proposal-review-COOriT05.js +1 -0
- package/dist/assets/query-placeholder-data-Bg4z2kcq.js +1 -0
- package/dist/assets/queryClient-zvH4bKo9.js +1 -0
- package/dist/assets/queryKeys-Br82Auye.js +1 -0
- package/dist/assets/radio-BIjLcReK.js +1 -0
- package/dist/assets/radio-card-BO_94Vo8.js +1 -0
- package/dist/assets/recent-agent-chats-BzbiZr3S.js +1 -0
- package/dist/assets/recent-assignees-DmalYaLf.js +1 -0
- package/dist/assets/recent-selections-BnN_nb6Y.js +1 -0
- package/dist/assets/refresh-cw-CqldqiKu.js +1 -0
- package/dist/assets/repeat-5LyAUYWe.js +1 -0
- package/dist/assets/resizable-panels-D6N09g1s.js +1 -0
- package/dist/assets/responsible-user-denial-Dyl0BwU5.js +1 -0
- package/dist/assets/retired-composio-DrxhEOpx.js +1 -0
- package/dist/assets/review-policy-C0aUsC3B.js +1 -0
- package/dist/assets/rotate-ccw-CMMEfcO3.js +1 -0
- package/dist/assets/rotate-cw-chXO5k8L.js +1 -0
- package/dist/assets/router-Bo2oJyq_.js +1 -0
- package/dist/assets/routines-Dj56gU5g.js +1 -0
- package/dist/assets/run-log-chunks-ZnzOvrXs.js +2 -0
- package/dist/assets/runRetryState-BykQUNQw.js +1 -0
- package/dist/assets/save-B-X79KYj.js +1 -0
- package/dist/assets/schema-config-fields-BKzRKOf-.js +1 -0
- package/dist/assets/scroll-area-C1fbWVPu.js +1 -0
- package/dist/assets/scroll-text-C2dYnVvE.js +1 -0
- package/dist/assets/search-BXCEz7xF.js +1 -0
- package/dist/assets/searchable-select-fvMNMcqm.js +1 -0
- package/dist/assets/secrets-DhK8O7Pz.js +1 -0
- package/dist/assets/segmented-tifc6Dov.js +1 -0
- package/dist/assets/select-zH7gqAbB.js +1 -0
- package/dist/assets/send-DixgMXzs.js +1 -0
- package/dist/assets/separator-B65gZ5VY.js +1 -0
- package/dist/assets/server-DnsT1uDe.js +1 -0
- package/dist/assets/server-cog-vS2OmfoT.js +1 -0
- package/dist/assets/settings-D88XZaPT.js +1 -0
- package/dist/assets/shared-CT8xZIqu.js +1 -0
- package/dist/assets/sheet-DnX__vl2.js +1 -0
- package/dist/assets/shield-KDhiJeJq.js +1 -0
- package/dist/assets/shield-alert-BEyIvSqK.js +1 -0
- package/dist/assets/shield-check-BBMPASnP.js +1 -0
- package/dist/assets/shield-question-mark-CzkOeQok.js +1 -0
- package/dist/assets/shield-x-Cf3sKG3X.js +1 -0
- package/dist/assets/sidebarPreferences-CdgZXAKV.js +1 -0
- package/dist/assets/skeleton-B4cIa_g2.js +1 -0
- package/dist/assets/skill-source-connect-return-C3vV7DQP.js +1 -0
- package/dist/assets/slots-FyJ3Hfus.js +49 -0
- package/dist/assets/smoke-lab-matrix-DWiBJIcl.js +1 -0
- package/dist/assets/square-DPfXoq29.js +1 -0
- package/dist/assets/star-B0Mu4cdA.js +15 -0
- package/dist/assets/sun-Bl_UqCKR.js +1 -0
- package/dist/assets/system-notice-comment-CoRAcwGq.js +1 -0
- package/dist/assets/tabs-B0vo1rAq.js +1 -0
- package/dist/assets/task-chat-attachments-DtAs6_z7.js +10 -0
- package/dist/assets/terminal-Bm6kwzsr.js +1 -0
- package/dist/assets/terminal-font-B-qtwS34.js +10 -0
- package/dist/assets/textarea-DddKJofz.js +1 -0
- package/dist/assets/thumbs-down-BVyvvF51.js +1 -0
- package/dist/assets/thumbs-up-BueMhd4r.js +1 -0
- package/dist/assets/toggle-switch-D8RWluFT.js +1 -0
- package/dist/assets/tool-taxonomy-ChJ16HLB.js +1 -0
- package/dist/assets/tools-ClJdhG8w.js +1 -0
- package/dist/assets/tooltip-BF1EZSM_.js +1 -0
- package/dist/assets/transcript-adapter-8zQ2IrC0.js +5 -0
- package/dist/assets/trash-CN4Xf2am.js +1 -0
- package/dist/assets/triangle-alert-DuUA72IB.js +1 -0
- package/dist/assets/use-adapter-capabilities-DIMhQ3jT.js +1 -0
- package/dist/assets/use-copy-action-JoIz-xmX.js +1 -0
- package/dist/assets/useAgentChatEnabled-hizcCAft.js +1 -0
- package/dist/assets/useAutosaveIndicator-DT0E_3dy.js +1 -0
- package/dist/assets/useHiddenSettings-CXOyNixn.js +1 -0
- package/dist/assets/useInfiniteQuery-Desl5o9L.js +1 -0
- package/dist/assets/useInstanceFeatureSettings-DVYS6vi6.js +1 -0
- package/dist/assets/useManagedSandboxOnly-Buxyl4mU.js +1 -0
- package/dist/assets/useMobileEntityPickerViewportStyle-CTKldW72.js +1 -0
- package/dist/assets/usePrefersReducedMotion-D9kOF5TM.js +1 -0
- package/dist/assets/useProfilesData-BaJegHE_.js +1 -0
- package/dist/assets/useQueries-Dsz6Nov_.js +1 -0
- package/dist/assets/useSecondTick-BpSp0EL3.js +1 -0
- package/dist/assets/useSharedPolling-BsEZUKWE.js +1 -0
- package/dist/assets/useSummaryDraftStream-B5G7DDoN.js +3 -0
- package/dist/assets/user-DrmBwrR4.js +1 -0
- package/dist/assets/user-check-wxCkYhKI.js +1 -0
- package/dist/assets/user-minus-D4gqJyh-.js +1 -0
- package/dist/assets/user-round-CafDnRCl.js +1 -0
- package/dist/assets/user-x-Cc_Mqj5k.js +1 -0
- package/dist/assets/users-BCTPIiOj.js +1 -0
- package/dist/assets/wand-sparkles-BAzjtC-H.js +1 -0
- package/dist/assets/webhook-BmdMp-g8.js +1 -0
- package/dist/assets/workspace-restore-Dz-CzQw6.js +1 -0
- package/dist/assets/x-s4V0MRUq.js +1 -0
- package/dist/brands/adapters/openai-dot.README.md +1 -1
- package/dist/downloads/local-browser-chromium.zip +0 -0
- package/dist/downloads/local-browser-firefox-unsigned.zip +0 -0
- package/dist/downloads/local-browser-firefox.xpi +0 -0
- package/dist/fonts/NOTICE.md +1 -1
- package/dist/index.html +222 -19
- package/dist/sw.js +3 -3
- package/package.json +2 -2
- package/dist/assets/CompanyExport-nSZ6c22o.js +0 -4
- package/dist/assets/Terminal-BUKNL-hS.js +0 -1
- package/dist/assets/clipboard-oERS_NGj.js +0 -15
- package/dist/assets/dist-7JK5o5w2.js +0 -7
- package/dist/assets/dist-BJVIAntd.js +0 -1
- package/dist/assets/dist-BNQK72Ay.js +0 -1
- package/dist/assets/dist-BRZ2juoF.js +0 -1
- package/dist/assets/dist-BYmxsnlZ.js +0 -1
- package/dist/assets/dist-Be2PH9Ri.js +0 -1
- package/dist/assets/dist-BsvRtKyc.js +0 -1
- package/dist/assets/dist-C-AEDno-.js +0 -1
- package/dist/assets/dist-CPFoA4ty.js +0 -1
- package/dist/assets/dist-CWYWSO70.js +0 -1
- package/dist/assets/dist-CsYwdeKQ.js +0 -1
- package/dist/assets/dist-CwygYsQk.js +0 -1
- package/dist/assets/dist-DCmyl8JS.js +0 -1
- package/dist/assets/dist-DLhVtuRQ.js +0 -1
- package/dist/assets/dist-DpJyVhoi.js +0 -1
- package/dist/assets/dist-DxGmGQAd.js +0 -1
- package/dist/assets/dist-aSaqj57N.js +0 -1
- package/dist/assets/dist-fm9IOgs2.js +0 -13
- package/dist/assets/index-CXBON4gu.js +0 -760
- package/dist/assets/index-CYb_Lk-W.css +0 -1
- package/dist/assets/x-CzBf9g0R.js +0 -134
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var ms=Object.defineProperty;var r=(s,n)=>ms(s,"name",{value:n,configurable:!0});import{i as ze}from"./rolldown-runtime-ZpX3ckPj.js";import{$i as ps,Bi as xs,C as hs,Jn as fs,Qi as gs,S as js,T as vs,h as L,l as S}from"./createLucideIcon-C01KAfc1.js";import{h as bs,v as ks}from"./star-B0Mu4cdA.js";import{X as Re,_ as le,t as x,v as P}from"./queryKeys-Br82Auye.js";import{a as ys,i as ws,r as Ns,t as Rs}from"./WorkspaceRuntimeControls-UK1xSSV7.js";import{n as Cs}from"./CompanyContext-BxCDBNSH.js";import{Rt as ke,o as Is,r as Ss,t as Y}from"./router-Bo2oJyq_.js";import{t as Ws}from"./tabs-B0vo1rAq.js";import{o as Ps,r as _s,t as Es}from"./popover-Dq6_MkmZ.js";import{t as As}from"./check-vba7RPNV.js";import{t as Ts}from"./chevron-down-CTfmQYtZ.js";import{t as Ce}from"./copy-DWkF-rFH.js";import{t as ye}from"./external-link-CFqVy5ry.js";import{r as ue,t as N}from"./button-Cq79rkKD.js";import{t as we}from"./play-DYcWlP80.js";import{t as Fs}from"./repeat-5LyAUYWe.js";import{t as De}from"./rotate-ccw-CMMEfcO3.js";import{t as Ls}from"./square-DPfXoq29.js";import{t as Ve}from"./triangle-alert-DuUA72IB.js";import{a as qs}from"./ToastContext-hirVjDXt.js";import{t as Je}from"./agents-HNnobIne.js";import{t as Os}from"./heartbeats-DqejhX23.js";import{n as Bs,t as Us}from"./useSharedPolling-BsEZUKWE.js";import{t as Ks}from"./projects-DebVPi8C.js";import{t as B}from"./input-ChF32KiE.js";import{n as Ds,o as Ms,t as Qs}from"./slots-FyJ3Hfus.js";import{t as Me}from"./routines-Dj56gU5g.js";import{n as $s}from"./BreadcrumbContext-C1Pz9E0M.js";import{t as z}from"./textarea-DddKJofz.js";import{t as zs}from"./clipboard-CTLKYvRL.js";import{i as H,n as Vs,o as X,r as U,s as G,t as K}from"./card-DCb-JOH-.js";import{M as Js,Vr as Hs,Xn as V,Zn as Xs,r as Gs}from"./index-B68fUztV.js";import{t as ae}from"./separator-B65gZ5VY.js";import{t as Zs}from"./useManagedSandboxOnly-Buxyl4mU.js";import{t as He}from"./CopyText-CW3qWFPY.js";import{n as Ys,t as en}from"./SummarySlotCard-CmxW3-lC.js";import{t as sn}from"./MissingPluginTabPlaceholder-UM0Cgk9J.js";import{t as nn}from"./RoutineRunVariablesDialog-BmocvukK.js";var h=ze(ps(),1),e=ze(gs(),1),tn=["provisioning","starting","stopping","restarting"];function Ie(s){return tn.includes(s)}r(Ie,"isTransitional");function Xe(s){return s?s.replace(/^https?:\/\//,"").replace(/\/$/,""):null}r(Xe,"formatServiceUrl");function Ge(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(Ge,"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 zs(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=Xe(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=Ge(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=Ge(s),o=Xe(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 Qe=new Set([xs]);function Ye(s){const n=new Set;for(const a of s.variables)Qe.has(a.name)&&n.add(a.name);for(const a of fs([s.title,s.description]))Qe.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 $e(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($e,"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:vs(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=Bs({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});Us(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)(Gs,{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)(X,{children:[(0,e.jsx)(G,{children:"Workspace routines"}),(0,e.jsx)(H,{children:"Routines that use workspace-specific variables can be run against this execution workspace."})]}),(0,e.jsx)(U,{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}=Xs(),{workspaceId:a}=ks(),o=bs(),d=Is(),c=Re(),{setBreadcrumbs:u}=$s(),{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?$e(i):null,[i]),je=!!(m&&M&&JSON.stringify(m)!==JSON.stringify(M)),ne=j?hs(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($e(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($=>$.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}),Be={companyId:i.companyId,projectId:i.projectId,entityId:i.id,entityType:"execution_workspace"},Ue=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 Q=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(()=>Q("runtime_logs"),"onViewLogs"),onManageServices:r(()=>Q("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:Be,className:"flex flex-wrap gap-2",itemClassName:"inline-flex",missingBehavior:"placeholder"}),(0,e.jsx)(Ws,{value:R??"issues",onValueChange:r(t=>Q(t),"onValueChange"),children:(0,e.jsx)(Hs,{items:is.map(t=>({value:t.value,label:t.label})),align:"start",value:R??"issues",onValueChange:r(t=>Q(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)(X,{children:[(0,e.jsx)(G,{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)(U,{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)(B,{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)(B,{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)(B,{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)(B,{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)(B,{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)(B,{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)(z,{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)(z,{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)(z,{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)(z,{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)(z,{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)(B,{type:"number",min:"1",max:"65535",inputMode:"numeric",value:t.port??"",onChange:r(l=>{p(w=>{if(!w)return w;const $=w.inheritRuntime?{ok:!0,value:O}:de(w.workspaceRuntime);return!$.ok||!$.value?w:{...w,inheritRuntime:!1,workspaceRuntime:Ne(jn({runtimeConfig:$.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)(X,{children:[(0,e.jsx)(G,{children:"Workspace context"}),(0,e.jsx)(H,{children:"Linked objects and relationships"})]}),(0,e.jsxs)(U,{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:js(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(()=>Q("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)(X,{children:[(0,e.jsx)(G,{children:"Concrete location"}),(0,e.jsx)(H,{children:"Paths and refs"})]}),(0,e.jsxs)(U,{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)(X,{children:[(0,e.jsx)(G,{children:"Runtime and cleanup logs"}),(0,e.jsx)(H,{children:"Recent operations"})]}),(0,e.jsx)(U,{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})]}):Ue?(0,e.jsx)(Qs,{slot:Ue.slot,context:Be,missingBehavior:"placeholder"}):J(R)&&as?(0,e.jsx)(K,{children:(0,e.jsx)(U,{className:"py-6 text-sm text-ink-3",children:"Loading workspace plugin..."})}):J(R)&&Ee?(0,e.jsx)(K,{children:(0,e.jsx)(U,{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=(r,a)=>i(r,"name",{value:a,configurable:!0});import{i as n}from"./rolldown-runtime-ZpX3ckPj.js";import{Qi as m}from"./createLucideIcon-C01KAfc1.js";import{t as o}from"./button-Cq79rkKD.js";import{t as c}from"./x-s4V0MRUq.js";import{t as p}from"./badge-CmRCZQXu.js";var e=n(m(),1);function f({filters:r,onRemove:a,onClear:l}){return r.length===0?null:(0,e.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[r.map(s=>(0,e.jsxs)(p,{variant:"secondary",className:"gap-1 pr-1",children:[(0,e.jsxs)("span",{className:"text-ink-3",children:[s.label,":"]}),(0,e.jsx)("span",{children:s.value}),(0,e.jsx)("button",{className:"ml-1 rounded-full hover:bg-bg-3 p-0.5",onClick:t(()=>a(s.key),"onClick"),children:(0,e.jsx)(c,{className:"h-3 w-3"})})]},s.key)),(0,e.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{$i as O,Qi as D,l as d}from"./createLucideIcon-C01KAfc1.js";import{t as M}from"./chevron-down-CTfmQYtZ.js";import{t as R}from"./chevron-up-CzC1gtv6.js";import{t as z}from"./button-Cq79rkKD.js";var t=H(O(),1),r=H(D(),1),x=640,g=320,c=420,E=72,$=220;function P(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(P,"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=P(s),f=(0,t.useRef)(null),[h,L]=(0,t.useState)(0),[i,T]=(0,t.useState)(!1),[j,k]=(0,t.useState)(!1),[p,C]=(0,t.useState)(!1);(0,t.useLayoutEffect)(()=>{const o=f.current;if(!o)return;const w=n(()=>{L(o.scrollHeight),k(!0)},"measure");if(w(),typeof ResizeObserver>"u")return;const _=new ResizeObserver(w);return _.observe(o),()=>_.disconnect()},[]);const l=j&&h>=m+u,v=l&&!i,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":i?"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?`${$}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":i,onClick:n(()=>{C(!0),T(o=>!o)},"onClick"),className:d("h-7 px-2 text-xs",I),children:[i?b:a,i?(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{$i as H,Qi as V,l as N}from"./createLucideIcon-C01KAfc1.js";import{r as k}from"./star-B0Mu4cdA.js";import{r as g}from"./queryKeys-Br82Auye.js";import{a as Q,c as G,i as X,n as J,o as Y,r as Z,s as ee,t as se}from"./alert-dialog-DnlZalnH.js";import{c as S,d as ne,f as te,i as b,p as B,r as $,t as E,u as re}from"./dropdown-menu-BgB3ZFIW.js";import{t as F}from"./check-vba7RPNV.js";import{t as le}from"./chevron-down-CTfmQYtZ.js";import{t as oe}from"./ellipsis-BK2IHFgt.js";import{t as h}from"./button-Cq79rkKD.js";import{t as I}from"./plus-XHeYelml.js";import{t as ae}from"./search-BXCEz7xF.js";import{t as ie}from"./trash-CN4Xf2am.js";import{t as de}from"./x-s4V0MRUq.js";import{a as ce,i as me,n as ue,r as fe,s as xe,t as he}from"./dialog-DAYoqqlE.js";import{t as pe}from"./input-ChF32KiE.js";import{o as je,r as ge,s as be,t as ye}from"./sheet-DnX__vl2.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 Qe(s){return s.systemKey==="bundled"||s.systemKey?.startsWith("bundled:")?!0:s.path==="bundled"||s.path.startsWith("bundled/")}r(Qe,"isBundledFolder");function Ge(s){return s.systemKey==="projects"||s.systemKey?.startsWith("project:")?!0:s.path==="projects"||s.path.startsWith("projects/")}r(Ge,"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 o=t.get(d.id),j=d.parentId?t.get(d.parentId):null;j?j.children.push(o):l.push(o)}_(l);let a=null,i=null,m=null;const c=[];for(const d of l)switch(d.folder.systemKey){case"my":a=d;break;case"projects":i=d;break;case"bundled":m=d;break;default:c.push(d)}const x=new Map;for(const[d,o]of t)x.set(d,o.children);const u=[];return a&&u.push(a),u.push(...c),i&&u.push(i),m&&u.push(m),{my:a,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 a=l.pop();for(const i of s.childrenById.get(a)??[])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 a=new Set;for(;l&&!a.has(l.id);)a.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(a=>A(a));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 a=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:a?.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:a=!1,onSelect:i,onCreate:m,onRename:c,onEdit:x,onDelete:u}){const d=s?.folders??[],[o,j]=(0,p.useState)(null),[w,R]=(0,p.useState)("");(0,p.useEffect)(()=>{o&&(d.find(f=>f.id===o)||j(null))},[d,o]);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"})})]}),a?(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:o===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:a,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(o=>a(o.target.value),"onChange"),onClick:r(o=>o.stopPropagation(),"onClick"),onKeyDown:r(o=>{o.key==="Enter"&&i(),o.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)(E,{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)(oe,{className:"h-3.5 w-3.5"})})}),(0,e.jsxs)($,{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,a]=(0,p.useState)(()=>{try{return window.localStorage.getItem(s)==="1"}catch{return!1}});if(l)return null;function i(){a(!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:a,itemLabelPlural:i,onSelect:m,onCreate:c}){function x(o){m(o),n(!1)}r(x,"select");const u=(0,p.useMemo)(()=>ke(t),[t]);function d(o,j){return(0,e.jsxs)("div",{"data-folder-id":o.folder.id,children:[(0,e.jsx)(D,{id:o.folder.id,label:j??o.folder.name,count:o.folder.itemCount,color:o.folder.color,selected:l===o.folder.id,onSelect:x}),o.children.length>0?(0,e.jsx)("div",{className:"pl-3",children:o.children.map(w=>d(w))}):null]},o.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:a,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(o=>d(o)),u.projects?d(u.projects,"Projects"):null,u.bundled?d(u.bundled,"Bundled"):null]}):u.roots.map(o=>d(o,A(o.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:a,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}),a?(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[a,i]=(0,p.useState)(""),m=(0,p.useMemo)(()=>{const c=a.trim().toLowerCase();return c?s.filter(x=>x.name.toLowerCase().includes(c)):s},[s,a]);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)(ae,{className:"h-3.5 w-3.5 text-ink-3"}),(0,e.jsx)("input",{value:a,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 os({open:s,kind:n,folder:t,onOpenChange:l,onSubmit:a,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(o=>c(o.target.value),"onChange"),autoFocus:!0,onKeyDown:r(o=>{o.key==="Enter"&&m.trim()&&a({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(o=>(0,e.jsx)("button",{type:"button","aria-label":`Use folder color ${o}`,className:N("h-7 w-7 rounded-md border border-line",x===o&&"ring-2 ring-focus ring-offset-2 ring-offset-bg"),style:{backgroundColor:T[o]},onClick:r(()=>u(o),"onClick")},o)),(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(()=>a({name:m.trim(),color:x}),"onClick"),disabled:i||!m.trim(),children:i?"Saving...":d?"Save":"Create folder"})]})]})})}r(os,"FolderFormDialog");function as({open:s,folder:n,itemLabelPlural:t,onOpenChange:l,onConfirm:a,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)(G,{children:"Delete folder"}),(0,e.jsxs)(Q,{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(),a()},"onClick"),children:i?"Deleting...":"Delete folder"})]})]})})}r(as,"DeleteFolderDialog");function is({selectedCount:s,folders:n,onMove:t,onCreateAndMove:l,onClear:a,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)(E,{children:[(0,e.jsx)(B,{asChild:!0,children:(0,e.jsx)(h,{size:"sm",variant:"secondary",children:"Move to..."})}),(0,e.jsx)($,{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:a,children:"Deselect all"}),(0,e.jsx)(h,{size:"sm",onClick:i,children:"Done"})]})}r(is,"BulkBar");export{Je as _,os as a,ke as b,rs as c,Ze as d,Ce as f,A as g,Ge as h,ss as i,ls as l,Qe as m,is as n,ns as o,Ne as p,as 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{$i as Me,Qi as $e,l as Q,t as qe}from"./createLucideIcon-C01KAfc1.js";import{v as Oe}from"./star-B0Mu4cdA.js";import{X as V,_ as B,t as R,v as G}from"./queryKeys-Br82Auye.js";import{t as Fe}from"./useInfiniteQuery-Desl5o9L.js";import{n as Ge}from"./CompanyContext-BxCDBNSH.js";import{o as je,r as Re,t as J}from"./router-Bo2oJyq_.js";import{n as Le,r as Ke,t as Qe}from"./collapsible-BVnhGR5_.js";import{t as Be}from"./bot-TL3Jdr73.js";import{t as Ue}from"./braces-Cc8xLJ1U.js";import{t as He}from"./check-vba7RPNV.js";import{t as ge}from"./chevron-down-CTfmQYtZ.js";import{t as We}from"./chevron-left-DbSymkYp.js";import{t as be}from"./chevron-right-CZqG6c6-.js";import{t as Je}from"./chevron-up-CzC1gtv6.js";import{t as Ve}from"./SearchableSelect-DF7YpkdT.js";import{t as Ze}from"./circle-question-mark-CqwY53-2.js";import{t as Xe}from"./code-xml-CfpLGfdE.js";import{t as F}from"./copy-DWkF-rFH.js";import{t as Ye}from"./key-round-hIknfaVC.js";import{t as es}from"./link-B5IDCTfS.js";import{t as x}from"./button-Cq79rkKD.js";import{t as ss}from"./pencil-4y59RLDI.js";import{t as ts}from"./plus-XHeYelml.js";import{t as as}from"./send-DixgMXzs.js";import{i as ns,n as is,t as ls}from"./tooltip-BF1EZSM_.js";import{i as H}from"./ToastContext-hirVjDXt.js";import{t as rs}from"./agents-HNnobIne.js";import{t as os}from"./projects-DebVPi8C.js";import{a as ye,i as Ne,n as ve,r as ke,s as we,t as Ce}from"./dialog-DAYoqqlE.js";import{t as L}from"./input-ChF32KiE.js";import{t as K}from"./skeleton-B4cIa_g2.js";import{t as A}from"./tools-ClJdhG8w.js";import{n as cs}from"./BreadcrumbContext-C1Pz9E0M.js";import{t as ds}from"./toggle-switch-D8RWluFT.js";import{t as Y}from"./clipboard-CTLKYvRL.js";import{cn as ms,ma as xs}from"./index-B68fUztV.js";import{a as q,r as Te}from"./shared-CT8xZIqu.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-C8LwXvVu.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:Be,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=B({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)(ls,{children:[(0,e.jsx)(ns,{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)(is,{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:Q("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:Q("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=B({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": {',` "paperclip-${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)(ds,{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:Q("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:Q("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:Q("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)(q,{value:s.expiresAt})]}):(0,e.jsxs)(e.Fragment,{children:["Expires ",(0,e.jsx)(q,{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)),$=I.slice((P-1)*ae,P*ae);(0,o.useEffect)(()=>{b(n=>Math.min(n,m))},[m]);const W=B({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=B({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)(ts,{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)(Qe,{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:$.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)(q,{value:n.createdAt})}),(0,e.jsx)("td",{className:"px-4 py-3 text-ink-3",children:n.lastUsedAt?(0,e.jsx)(q,{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:$.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)(q,{value:n.createdAt})}),(0,e.jsx)(Z,{label:"Last used",value:n.lastUsedAt?(0,e.jsx)(q,{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)(q,{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 $s({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($s,"GatewayActivityPanel");function qs({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=B({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(qs,"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 wt(){const{gatewayId:s="",tab:a}=Oe(),i=je(),p=V(),{pushToast:c}=H(),{selectedCompanyId:r}=Ge(),{setBreadcrumbs:y}=cs(),[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(()=>rs.list(r),"queryFn"),enabled:!!r}),P=G({queryKey:R.projects.list(r??"__none__",{includeArchived:!0}),queryFn:t(()=>os.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($=>[m,...$.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=B({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)(ss,{className:"mr-1.5 h-4 w-4"}),"Edit"]}),(0,e.jsxs)(x,{onClick:t(()=>N(!0),"onClick"),children:[(0,e.jsx)(as,{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 $=m.key===h;return(0,e.jsx)(J,{to:oe(s,m.key),className:Q("-mb-px shrink-0 border-b-2 pb-2.5 pt-1 font-medium transition-colors",$?"border-ink text-ink":"border-transparent text-ink-3 hover:text-ink"),"aria-current":$?"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)($s,{companyId:r,gateway:b}),h==="advanced"&&(0,e.jsx)(qs,{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(wt,"GatewayDetail");export{wt as GatewayDetail};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Y=Object.defineProperty;var t=(i,d)=>Y(i,"name",{value:d,configurable:!0});import{i as I}from"./rolldown-runtime-ZpX3ckPj.js";import{$i as J,Qi as U}from"./createLucideIcon-C01KAfc1.js";import{X as V,_ as Z,t as h,v as l}from"./queryKeys-Br82Auye.js";import{n as ee}from"./CompanyContext-BxCDBNSH.js";import{o as se}from"./router-Bo2oJyq_.js";import{t as B}from"./button-Cq79rkKD.js";import{t as O}from"./plus-XHeYelml.js";import{t as te}from"./search-BXCEz7xF.js";import{i as ae}from"./ToastContext-hirVjDXt.js";import{t as ne}from"./agents-HNnobIne.js";import{t as re}from"./projects-DebVPi8C.js";import{t as ie}from"./input-ChF32KiE.js";import{t as A}from"./skeleton-B4cIa_g2.js";import{t as u}from"./tools-ClJdhG8w.js";import{n as oe}from"./BreadcrumbContext-C1Pz9E0M.js";import{t as le}from"./toggle-switch-D8RWluFT.js";import{a as L,r as ce}from"./shared-CT8xZIqu.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-C8LwXvVu.js";var c=I(J(),1),e=I(U(),1);function Fe(){const i=se(),d=V(),{pushToast:C}=ae(),{selectedCompanyId:a}=ee(),{setBreadcrumbs:f}=oe(),[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]),$=(0,c.useMemo)(()=>new Map((q.data??[]).map(s=>[s.id,s.name])),[q.data]),T=(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)(A,{className:"h-9 w-full max-w-sm"}),(0,e.jsx)(A,{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)(ie,{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),o=pe(r,H.data?.applications??[],D.data?.connections??[]);return{gateway:n,profile:r,scope:K(n,T,$),appsLabel:`${o.length} ${o.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"),Q=(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:o,active:v,expiring:m,lastUsed:x,href:k})=>(0,e.jsxs)("tr",{onClick:t(()=>i(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:o}),(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)(L,{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:Q})}):null]})]})}),(0,e.jsxs)("div",{className:"space-y-3 sm:hidden",children:[s.map(({gateway:n,scope:r,appsLabel:o,active:v,expiring:m,lastUsed:x,href:k})=>(0,e.jsxs)("div",{onClick:t(()=>i(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:o}),(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)(L,{value:x}):"—"})]})]},n.id)),s.length===0?(0,e.jsx)("div",{className:"rounded-lg border border-line",children:Q}):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=>i(F(s,"overview")),"onCreated")})]})}t(Fe,"GatewaysList");function w({label:i,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:i}),(0,e.jsx)("dd",{className:"mt-0.5 truncate text-ink",children:d})]})}t(w,"MobileField");function ye({onCreate:i}){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:i,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 Q=Object.defineProperty;var a=(s,r)=>Q(s,"name",{value:r,configurable:!0});import{i as E}from"./rolldown-runtime-ZpX3ckPj.js";import{$i as U,Ci as V,Qi as $,Si as D,i as H,l as T,m as P,w as M}from"./createLucideIcon-C01KAfc1.js";import{v as R}from"./star-B0Mu4cdA.js";import{X,_ as S,t as m,v as h}from"./queryKeys-Br82Auye.js";import{n as L}from"./CompanyContext-BxCDBNSH.js";import{t as k}from"./router-Bo2oJyq_.js";import{i as A,n as G,r as J,t as W}from"./tabs-B0vo1rAq.js";import{o as Y,r as Z,t as ee}from"./popover-Dq6_MkmZ.js";import{t as b}from"./button-Cq79rkKD.js";import{t as se}from"./plus-XHeYelml.js";import{t as te}from"./agents-HNnobIne.js";import{t as ae}from"./projects-DebVPi8C.js";import{n as re}from"./BreadcrumbContext-C1Pz9E0M.js";import{t as ne}from"./assets-j5Kg0sqV.js";import{Cr as ie,_ as le,cn as y,ga as oe,ln as j,ra as ce}from"./index-B68fUztV.js";import{t as q}from"./InlineEditor-B-oEEW8R.js";import{t as de}from"./separator-B65gZ5VY.js";import{t as me}from"./EntityRow-CsMXIXXb.js";import{t as ue}from"./GoalTree-Btaagjxs.js";var f=E(U(),1),e=E($(),1);function u({label:s,children:r}){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:r})]})}a(u,"PropertyRow");function pe(s){return s.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())}a(pe,"label");function _({current:s,options:r,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:r.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:r}){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:r?(0,e.jsx)(_,{current:s.status,options:V,onChange:a(o=>r({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:r?(0,e.jsx)(_,{current:s.level,options:D,onChange:a(o=>r({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:H(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:P(s.createdAt)})}),(0,e.jsx)(u,{label:"Updated",children:(0,e.jsx)("span",{className:"text-sm",children:P(s.updatedAt)})})]})]})}a(xe,"GoalProperties");function he({panelVisible:s,onShowProperties:r}){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:r,title:"Show properties",children:(0,e.jsx)(oe,{className:"h-4 w-4"})})}a(he,"GoalPropertiesToggleButton");function Ke(){const{goalId:s}=R(),{selectedCompanyId:r,setSelectedCompanyId:i}=L(),{openNewGoal:p}=ce(),{openPanel:x,closePanel:c,panelVisible:d,setPanelVisible:o}=ie(),{setBreadcrumbs:I}=re(),w=X(),{data:n,isLoading:K,error:C}=h({queryKey:m.goals.detail(s),queryFn:a(()=>j.get(s),"queryFn"),enabled:!!s}),l=n?.companyId??r,{data:z}=h({queryKey:m.goals.list(l),queryFn:a(()=>j.list(l),"queryFn"),enabled:!!l}),{data:F}=h({queryKey:m.projects.list(l,{includeArchived:!0}),queryFn:a(()=>ae.list(l,{includeArchived:!0}),"queryFn"),enabled:!!l});(0,f.useEffect)(()=>{!n?.companyId||n.companyId===r||i(n.companyId,{source:"route_sync"})},[n?.companyId,r,i]);const v=S({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=S({mutationFn:a(async t=>{if(!l)throw new Error("No organization selected");return ne.uploadImage(l,t,`goals/${s??"draft"}`)},"mutationFn")}),g=(z??[]).filter(t=>t.parentId===s),N=(F??[]).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:n?.title??s??"Goal"}])},[I,n,s]),(0,f.useEffect)(()=>(n&&x((0,e.jsx)(xe,{goal:n,onUpdate:a(t=>v.mutate(t),"onUpdate")})),()=>c()),[n]),K?(0,e.jsx)(le,{variant:"detail"}):C?(0,e.jsx)("p",{className:"text-sm text-bad",children:C.message}):n?(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:n.level}),(0,e.jsx)(y,{status:n.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:n.title,onSave:a(t=>v.mutate({title:t}),"onSave"),as:"h2",className:"text-xl font-bold"}),(0,e.jsx)(q,{value:n.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(Ke,"GoalDetail");export{Ke 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{$i as _,Qi as b,l}from"./createLucideIcon-C01KAfc1.js";import{t as k}from"./router-Bo2oJyq_.js";import{t as I}from"./chevron-right-CZqG6c6-.js";import{cn as y}from"./index-B68fUztV.js";var C=h(_(),1),e=h(b(),1);function f({goal:t,children:r,allGoals:o,depth:a,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(i=>{i.preventDefault(),i.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:`${a*16+12}px`},children:m}):(0,e.jsx)("div",{className:u,style:{paddingLeft:`${a*16+12}px`},onClick:d(()=>s?.(t),"onClick"),children:m}),p&&n&&(0,e.jsx)("div",{children:r.map(i=>(0,e.jsx)(f,{goal:i,children:o.filter(N=>N.parentId===i.id),allGoals:o,depth:a+1,goalLink:c,onSelect:s},i.id))})]})}d(f,"GoalNode");function L({goals:t,goalLink:r,onSelect:o}){const a=new Set(t.map(s=>s.id)),c=t.filter(s=>!s.parentId||!a.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(L,"GoalTree");export{L as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var p=Object.defineProperty;var a=(e,t)=>p(e,"name",{value:t,configurable:!0});import{i as l}from"./rolldown-runtime-ZpX3ckPj.js";import{$i as d,Qi as g}from"./createLucideIcon-C01KAfc1.js";import{t as f,v as x}from"./queryKeys-Br82Auye.js";import{n as j}from"./CompanyContext-BxCDBNSH.js";import{q as n}from"./router-Bo2oJyq_.js";import{t as y}from"./button-Cq79rkKD.js";import{t as _}from"./plus-XHeYelml.js";import{n as h}from"./BreadcrumbContext-C1Pz9E0M.js";import{T as m,_ as v,ln as N,ra as q}from"./index-B68fUztV.js";import{t as G}from"./GoalTree-Btaagjxs.js";var b=l(d(),1),s=l(g(),1);function L(){const{selectedCompanyId:e}=j(),{openNewGoal:t}=q(),{setBreadcrumbs:o}=h();(0,b.useEffect)(()=>{o([{label:"Goals"}])},[o]);const{data:r,isLoading:c,error:i}=x({queryKey:f.goals.list(e),queryFn:a(()=>N.list(e),"queryFn"),enabled:!!e});return e?c?(0,s.jsx)(v,{variant:"list"}):(0,s.jsxs)("div",{className:"space-y-4",children:[i&&(0,s.jsx)("p",{className:"text-sm text-bad",children:i.message}),r&&r.length===0&&(0,s.jsx)(m,{icon:n,message:"No goals yet.",action:"Add Goal",onAction:a(()=>t(),"onAction")}),r&&r.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(()=>t(),"onClick"),children:[(0,s.jsx)(_,{className:"h-3.5 w-3.5 mr-1.5"}),"New Goal"]})}),(0,s.jsx)(G,{goals:r,goalLink:a(u=>`/goals/${u.id}`,"goalLink")})]})]}):(0,s.jsx)(m,{icon:n,message:"Select an organization to view goals."})}a(L,"Goals");export{L as Goals};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var x=Object.defineProperty;var a=(s,t)=>x(s,"name",{value:t,configurable:!0});import{i as m}from"./rolldown-runtime-ZpX3ckPj.js";import{Qi as o,l as i}from"./createLucideIcon-C01KAfc1.js";import{a as u,n as d,t as f}from"./avatar-Cliaab6i.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()}a(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:r="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",r==="xs"&&"gap-1",r==="lg"&&"gap-2",c),title:s,children:[(0,e.jsxs)(f,{size:r,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[r]),children:s})]})}a(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{$i as k,Qi as N,hi as g}from"./createLucideIcon-C01KAfc1.js";import{a as C,o as P,r as L,t as _}from"./dist-BgbeNgQ7.js";import{t as D}from"./chevron-left-DbSymkYp.js";import{t as E}from"./chevron-right-CZqG6c6-.js";import{t as $}from"./x-s4V0MRUq.js";import{Ma as A}from"./index-B68fUztV.js";import{o as T,s as j}from"./issue-output-BWw5hGM4.js";var i=w(k(),1),J=(0,i.createContext)(null);function F(t,n){const r=t?.toLowerCase().split(";")[0].trim();return r==="text/html"||r==="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 K(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(K,"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 T(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:r,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)(()=>{r&&d(n)},[r,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(!r)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)},[r,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 o=t[m];if(!o)return null;const u=I(o),v=j(o.contentType,o.originalFilename);return(0,e.jsx)(_,{open:r,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(o),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)(A,{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)($,{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:o.contentPath,className:"max-w-full max-h-full rounded-lg",controls:!0,playsInline:!0}):(0,e.jsx)("img",{ref:p,src:o.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,J as d,U as i,K as l,q as n,O as o,I as r,tt as s,et as t,F as u};
|