@tickernelz/wardmote-ui 2026.1117.2 → 2026.1117.3
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-C-iVX_EX.js +1 -0
- package/dist/assets/AdapterManager-C59AKY0f.js +1 -0
- package/dist/assets/AdvancedToolsRoute-Bg4KowJU.js +39 -0
- package/dist/assets/AgentActionButtons-BBhJXLbY.js +1 -0
- package/dist/assets/AgentAvatar-BZiiDlCN.js +1 -0
- package/dist/assets/AgentBubbleActionRow-Dqrx638X.js +1 -0
- package/dist/assets/AgentCharacter-DAAMv7-c.js +2 -0
- package/dist/assets/AgentChat--rcr73Ls.js +1 -0
- package/dist/assets/AgentChats-56CMlXmb.js +1 -0
- package/dist/assets/AgentDefaults-C0WFwQky.js +1 -0
- package/dist/assets/AgentDetail-NfA1gamX.js +38 -0
- package/dist/assets/AgentIconPicker-BJerBmcL.js +1 -0
- package/dist/assets/AgentIdentity-DBHRFgMM.js +1 -0
- package/dist/assets/AgentMailCredentialField-DNclWIul.js +1 -0
- package/dist/assets/AgentMultiSelect-BlUaNdZZ.js +1 -0
- package/dist/assets/AgentRoleEditor-DnibPmmw.js +1 -0
- package/dist/assets/AgentSetupPrompt-CaafK5_w.js +30 -0
- package/dist/assets/AgentTodoCard-CGUyYht3.js +1 -0
- package/dist/assets/Agents-BjPLaL-p.js +3 -0
- package/dist/assets/AppDetail-CwyYWsvw.js +8 -0
- package/dist/assets/AppLogo-BLq8BpKi.js +1 -0
- package/dist/assets/AppNotConnected-DzDZR0-8.js +1 -0
- package/dist/assets/ApprovalCard-DyxP9tMM.js +1 -0
- package/dist/assets/ApprovalDetail-Cxhx_U0d.js +1 -0
- package/dist/assets/ApprovalPayload-C7jnoOLa.js +1 -0
- package/dist/assets/Approvals-CF4K0bD1.js +1 -0
- package/dist/assets/AppsConnect-D7l2xnv-.js +1 -0
- package/dist/assets/AppsReview-Chv6Jms5.js +1 -0
- package/dist/assets/ArtifactCard-CAlD_gkp.js +1 -0
- package/dist/assets/Artifacts-47GmGXVx.js +1 -0
- package/dist/assets/AssistantConnection-BCrEgmJR.js +1 -0
- package/dist/assets/AttentionInteractionResolver-DUg8FwhJ.js +1 -0
- package/dist/assets/AuditHub-DNmGrEzV.js +1 -0
- package/dist/assets/Auth-D0lGuVnd.js +3 -0
- package/dist/assets/BoardChat-BenJSqr6.js +18 -0
- package/dist/assets/BoardClaim-CbYY66Qd.js +1 -0
- package/dist/assets/BootstrapSetupUxLab-DO03bmwI.js +1 -0
- package/dist/assets/BreadcrumbContext-DNbB7zWn.js +1 -0
- package/dist/assets/Browse-gMVDtSCz.js +1 -0
- package/dist/assets/BudgetPolicyCard-CbkwslmQ.js +1 -0
- package/dist/assets/CaseDetail-k79_F25A.js +2 -0
- package/dist/assets/CaseIdentifierKey-CIGzqAfo.js +1 -0
- package/dist/assets/Cases-C5IE_YuB.js +2 -0
- package/dist/assets/ChatEndpointDetail-DPiCCvto.js +5 -0
- package/dist/assets/ChatEndpointSetup-CTntfzjg.js +1 -0
- package/dist/assets/ChatIdentityConfirm-Dc4AnYX8.js +1 -0
- package/dist/assets/ChoiceControls-CzMMk2Iy.js +1 -0
- package/dist/assets/CliAuth-CatEsBxW.js +1 -0
- package/dist/assets/CommentAttributionChip-BdllZVtJ.js +1 -0
- package/dist/assets/Companies-Cr0mZy2B.js +1 -0
- package/dist/assets/CompanyAccess-BQZD0MZf.js +1 -0
- package/dist/assets/CompanyActivity-BhNtXl8c.js +1 -0
- package/dist/assets/CompanyConnections-BwCkXXZK.js +1 -0
- package/dist/assets/CompanyContext-fQCNWI_f.js +1 -0
- package/dist/assets/CompanyEnvironments-CyrghjsN.js +3 -0
- package/dist/assets/CompanyExport-BlQuIvDU.js +4 -0
- package/dist/assets/CompanyImport-5M7yWHR-.js +1 -0
- package/dist/assets/CompanySettings-C6FNik3j.js +1 -0
- package/dist/assets/CompanySettingsPluginPage-DPHNF4sp.js +1 -0
- package/dist/assets/CompanySkills-DsgjKlp7.js +10 -0
- package/dist/assets/ComposerAddMenu-BPPkbm0o.js +3 -0
- package/dist/assets/ConfigureBuiltInAgentModal-reyr1Tds.js +1 -0
- package/dist/assets/ConnectionSetupFlow-g6asOGFg.js +40 -0
- package/dist/assets/CopyText-BbOm2I6t.js +1 -0
- package/dist/assets/CopyableGatewayUrl-B4EYBk9t.js +1 -0
- package/dist/assets/CrossIssueCollaborationUxLab-D2bB9GTl.js +1 -0
- package/dist/assets/Dashboard-B0JjQSAg.js +2 -0
- package/dist/assets/DecisionDateChips-BaRZkOU2.js +1 -0
- package/dist/assets/DecisionModelSettings-HEZJ0E6n.js +1 -0
- package/dist/assets/DecisionQueuePage-DtzH_oQI.js +1 -0
- package/dist/assets/DesignGuide-CXHLyL_C.js +23 -0
- package/dist/assets/DocumentFrameHeader-B8A6eaJb.js +1 -0
- package/dist/assets/EmailConnectionAccess-BcI7_br0.js +1 -0
- package/dist/assets/EmailEndpointSetup-hb_Hewoa.js +1 -0
- package/dist/assets/EnforcementBanner-qtVCLyJo.js +1 -0
- package/dist/assets/EntityRow-B24YmFE7.js +1 -0
- package/dist/assets/ExecutionWorkspaceDetail-BxA_kWKs.js +19 -0
- package/dist/assets/FilterBar-CIPYvHzR.js +1 -0
- package/dist/assets/FoldCurtain-H4DNjYLl.js +1 -0
- package/dist/assets/FolderControls-DI7QVvPv.js +1 -0
- package/dist/assets/GatewayDetail-CUcpw4Hj.js +2 -0
- package/dist/assets/GatewaysList-Ad1dZuwC.js +1 -0
- package/dist/assets/GoalDetail-C-uH9eNu.js +1 -0
- package/dist/assets/GoalTree-BZUt4xZ3.js +1 -0
- package/dist/assets/Goals-UrfBAjOT.js +1 -0
- package/dist/assets/Identity-8eG_HXAH.js +1 -0
- package/dist/assets/ImageGalleryModal-D3SH_FYj.js +1 -0
- package/dist/assets/Inbox-BzkFmAxU.js +2 -0
- package/dist/assets/InlineBanner-DYx7A02D.js +1 -0
- package/dist/assets/InlineEditor-BJTE1pyF.js +1 -0
- package/dist/assets/InlineEntitySelector-BboofK18.js +1 -0
- package/dist/assets/InstanceAccess-D4ZbGCeK.js +1 -0
- package/dist/assets/InstanceAdvanced-DYZ50o97.js +1 -0
- package/dist/assets/InstanceFeatures-C1eqcxDI.js +1 -0
- package/dist/assets/InviteLanding-Bqp1ulQV.js +1 -0
- package/dist/assets/IssueChatLongThreadPerf-BJ_Hr2PT.js +2 -0
- package/dist/assets/IssueChatThread-qDc-9yA9.js +40 -0
- package/dist/assets/IssueDetail-C0hCFL-i.js +9 -0
- package/dist/assets/IssueDocumentAnnotations-DjcRXcEw.js +2 -0
- package/dist/assets/IssueOutputSection-D7QbMiqq.js +1 -0
- package/dist/assets/IssueRecoveryActionCard-DeJbfGm1.js +1 -0
- package/dist/assets/IssueReferencePill-BTH42QmE.js +1 -0
- package/dist/assets/IssueThreadInteractionCard-D9QAYhuJ.js +9 -0
- package/dist/assets/IssueWriteDenialNotice-Bf0ZFSBV.js +1 -0
- package/dist/assets/Issues-DtYFX9i_.js +5 -0
- package/dist/assets/JoinRequestQueue-DyPP4DL2.js +1 -0
- package/dist/assets/JsonSchemaForm-Dkh3zdL9.js +1 -0
- package/dist/assets/LiveNowTodoLine-IsmhMx5O.js +1 -0
- package/dist/assets/ManagedAiConnectionDetails-BrX9Q9t2.js +1 -0
- package/dist/assets/MarkdownBody-D7qCQaU_.js +16 -0
- package/dist/assets/MarkdownEditor-ubJimjUH.js +85 -0
- package/dist/assets/McpConnect-BYYMfbhs.js +1 -0
- package/dist/assets/MembershipAction-Esk0pndF.js +1 -0
- package/dist/assets/MetricCard-DlcBTKQs.js +1 -0
- package/dist/assets/MissingPluginTabPlaceholder-l1R-Q4nh.js +1 -0
- package/dist/assets/ModelsAndProviders-C7VZHvPR.js +1 -0
- package/dist/assets/MootMark-BZOhYsK8.js +1 -0
- package/dist/assets/NewAgent-BzZI-FBE.js +1 -0
- package/dist/assets/OmpAllSettings-DTJLATQL.js +1 -0
- package/dist/assets/OpenwaGatewayManager-BQpxxJOa.js +2 -0
- package/dist/assets/PathInstructionsModal-BJAqF7vQ.js +1 -0
- package/dist/assets/PipelineSettings-BgfMR73P.js +2 -0
- package/dist/assets/Pipelines-DAuqtVqc.js +1 -0
- package/dist/assets/PixelsOffice-CaQYQilp.js +2 -0
- package/dist/assets/PluginManager-DkADWuR8.js +1 -0
- package/dist/assets/PluginPage-C-W3lTd9.js +1 -0
- package/dist/assets/PluginSettings-D365WG22.js +1 -0
- package/dist/assets/ProfileDetailRoute-YzeVN0Ko.js +1 -0
- package/dist/assets/ProfileSettings-BLh9EdSK.js +1 -0
- package/dist/assets/ProfileWizardRoute-DvOWuvrG.js +1 -0
- package/dist/assets/ProjectDetail-OirlXEA4.js +1 -0
- package/dist/assets/ProjectWorkspaceDetail-C9_liq4q.js +29 -0
- package/dist/assets/ProjectWorkspacesContent-DRAIVofy.js +1 -0
- package/dist/assets/Projects-B6UgAQ3Z.js +1 -0
- package/dist/assets/PublicIssueSharePage-Cg0GqSVM.js +1 -0
- package/dist/assets/QuestionForm-DF6R7lYE.js +7 -0
- package/dist/assets/QuotaBar-Ch_rM0X1.js +1 -0
- package/dist/assets/RepositoryEditor-BuV4JRgV.js +1 -0
- package/dist/assets/ResponsibleUserDenialNotice-dXyOLtYP.js +1 -0
- package/dist/assets/ResponsibleUserDenialUxLab-DGWo-GoD.js +1 -0
- package/dist/assets/ReviewQueueCard-MNEVuxSA.js +1 -0
- package/dist/assets/RichWorkProductCard-D4Qq1gRh.js +1 -0
- package/dist/assets/RoutineActivityRow-D16b-qFh.js +1 -0
- package/dist/assets/RoutineDetail-DPzql29w.js +2 -0
- package/dist/assets/RoutineRunVariablesDialog-C8OHcazq.js +1 -0
- package/dist/assets/RoutineVariablesEditor-CHogduM9.js +1 -0
- package/dist/assets/Routines-pnhQk9RN.js +1 -0
- package/dist/assets/ScrollToBottom-C_k4p-hC.js +1 -0
- package/dist/assets/Search-DjpKZIsB.js +1 -0
- package/dist/assets/SearchableSelect-BbuRtdzg.js +1 -0
- package/dist/assets/Secrets-BOZydXaY.js +4 -0
- package/dist/assets/SetupWizard-92wVRG6Y.js +1 -0
- package/dist/assets/SidebarContext-bEtg0ItG.js +1 -0
- package/dist/assets/SidebarNavItem-afEXEFeo.js +1 -0
- package/dist/assets/SkillBinaryFile-N7sK2ZTh.js +1 -0
- package/dist/assets/SkillCardIcon-Byzb3JuD.js +2 -0
- package/dist/assets/SkillSourceTree-Cuv3EWpo.js +2 -0
- package/dist/assets/SkillSources-CYYp9Mds.js +2 -0
- package/dist/assets/SkillStudio-Dl28fokd.js +9 -0
- package/dist/assets/SourceTrustBadge-BYpC1Kw9.js +1 -0
- package/dist/assets/StatusCards-Bqkb18QJ.js +1 -0
- package/dist/assets/StatusIcon-Bx4H7RuA.js +1 -0
- package/dist/assets/SummarySlotCard-DlwG6iRT.js +1 -0
- package/dist/assets/TaskChatComposerTakeoverContext-C68QVO36.js +1 -0
- package/dist/assets/TaskChatLab-vnFP7gcJ.js +11 -0
- package/dist/assets/TaskChatMarker-KUR-n-7D.js +2 -0
- package/dist/assets/TaskChatProtocolCard-CuyApwWM.js +1 -0
- package/dist/assets/TaskChatThreadView-B2LR9geW.js +4 -0
- package/dist/assets/TaskTreeControls-CRzAjVlt.js +3 -0
- package/dist/assets/Terminal-YAhWrMv9.js +1 -0
- package/dist/assets/TerminalView-7diHxQOx.js +58 -0
- package/dist/assets/ThemeContext-Ca30E6O4.js +1 -0
- package/dist/assets/ThemeToggle-BzQNYD1J.js +1 -0
- package/dist/assets/ToastContext-DyVJ6bCh.js +1 -0
- package/dist/assets/ToolsAdminGate-C5dQpL4C.js +1 -0
- package/dist/assets/TrustPresetSection-DCiCKRh0.js +1 -0
- package/dist/assets/UserProfile-CEpSKMzS.js +1 -0
- package/dist/assets/WebhookUrlWarning-CbkWHsPb.js +1 -0
- package/dist/assets/WhatNeedsMe-D0yh5L5H.js +1 -0
- package/dist/assets/WorkspaceRuntimeControls-Cp5E1FME.js +1 -0
- package/dist/assets/Workspaces-uDkUYVN3.js +1 -0
- package/dist/assets/access-DhB95qNC.js +1 -0
- package/dist/assets/activity-BwGRpduS.js +1 -0
- package/dist/assets/activity-CudcEDwO.js +1 -0
- package/dist/assets/activity-format-CYYHRbLo.js +1 -0
- package/dist/assets/adapter-display-registry-9qBBJi9B.js +1 -0
- package/dist/assets/adapters-D3NHXckp.js +1 -0
- package/dist/assets/agent-avatar-url-BSxCmIBZ.js +1 -0
- package/dist/assets/agent-config-primitives-BJlDiwaH.js +1 -0
- package/dist/assets/agentChats-C8o51WiF.js +1 -0
- package/dist/assets/agents-B8n-p0aX.js +1 -0
- package/dist/assets/alert-dialog-DNbnZgRz.js +1 -0
- package/dist/assets/app-connect-policy-DqQf5knn.js +1 -0
- package/dist/assets/archive-CvT6i844.js +1 -0
- package/dist/assets/archive-restore-tP0pyaei.js +1 -0
- package/dist/assets/arrow-down-C_oYEUXL.js +1 -0
- package/dist/assets/arrow-down-left-B8lHKNrs.js +1 -0
- package/dist/assets/arrow-left-CnGEiANj.js +1 -0
- package/dist/assets/arrow-right-W0iJ_-Zs.js +1 -0
- package/dist/assets/arrow-up-BMN1ZnS1.js +1 -0
- package/dist/assets/arrow-up-down-Ci6AcwB0.js +1 -0
- package/dist/assets/arrow-up-right-CFNgVoQj.js +1 -0
- package/dist/assets/artifacts-4t_LL-lA.js +1 -0
- package/dist/assets/assets-BOhIBphq.js +1 -0
- package/dist/assets/attachment-icon-_1iz_saB.js +1 -0
- package/dist/assets/avatar-qO_h93F8.js +1 -0
- package/dist/assets/badge-check-BNLpGDnd.js +1 -0
- package/dist/assets/badge-jeXr866I.js +1 -0
- package/dist/assets/book-open-i_DxEUXC.js +1 -0
- package/dist/assets/bot-kSfD9MPZ.js +1 -0
- package/dist/assets/boxes-DVB7wdRh.js +1 -0
- package/dist/assets/braces-CpXTT0w9.js +1 -0
- package/dist/assets/browser-use-BwBUHG71.js +1 -0
- package/dist/assets/budgets-C2LtVWph.js +1 -0
- package/dist/assets/button-DI4w5WP7.js +1 -0
- package/dist/assets/calendar-clock-CXtB0BA2.js +1 -0
- package/dist/assets/card-BVZvs7aX.js +1 -0
- package/dist/assets/cases-lkyebfpY.js +1 -0
- package/dist/assets/chatEndpoints-Bj-keCuw.js +1 -0
- package/dist/assets/check-Bis3vECb.js +1 -0
- package/dist/assets/checkbox-Cf2_HXDG.js +1 -0
- package/dist/assets/chevron-down-nRcQ7bok.js +1 -0
- package/dist/assets/chevron-left-DnUVccc_.js +1 -0
- package/dist/assets/chevron-right-BP8JjEC_.js +1 -0
- package/dist/assets/chevron-up-C1TOE3pP.js +1 -0
- package/dist/assets/chip-yHjfSD46.js +1 -0
- package/dist/assets/circle-DCDVf2v0.js +1 -0
- package/dist/assets/circle-alert-C7T1cdKm.js +1 -0
- package/dist/assets/circle-dot-EfQ00xK3.js +1 -0
- package/dist/assets/circle-question-mark-CasEGiDp.js +1 -0
- package/dist/assets/circle-slash-DP3-64k6.js +1 -0
- package/dist/assets/circle-x-oLE71NY3.js +1 -0
- package/dist/assets/clipboard-paste-B7AvxL_k.js +1 -0
- package/dist/assets/clock-D2UFngg7.js +1 -0
- package/dist/assets/cloud-DX1fkQ6i.js +1 -0
- package/dist/assets/code-xml-CZhhm_-P.js +1 -0
- package/dist/assets/coins-DeD2KB8A.js +1 -0
- package/dist/assets/collapsible-D_rwONtV.js +1 -0
- package/dist/assets/columns-3-CsveFAYd.js +1 -0
- package/dist/assets/command-BnJHDVFJ.js +5 -0
- package/dist/assets/companies-query-BEdFiAhG.js +1 -0
- package/dist/assets/connection-identity-ch7QDvun.js +1 -0
- package/dist/assets/connection-owner-rjoh3jce.js +1 -0
- package/dist/assets/copy-C1cfcpxY.js +1 -0
- package/dist/assets/createLucideIcon-CgrPXnTY.js +94 -0
- package/dist/assets/decision-models-DBtkxtYF.js +1 -0
- package/dist/assets/dialog-CeH7rDcv.js +1 -0
- package/dist/assets/dist--9cFpXne.js +1 -0
- package/dist/assets/dist-9zjsMxaY.js +1 -0
- package/dist/assets/dist-BJ09fDjD.js +1 -0
- package/dist/assets/dist-BdDa0b16.js +1 -0
- package/dist/assets/dist-Bn32UOVm.js +1 -0
- package/dist/assets/dist-C48HB-LT.js +1 -0
- package/dist/assets/dist-CEXsZ2vP.js +1 -0
- package/dist/assets/dist-Cfwg8Fpq.js +1 -0
- package/dist/assets/dist-DMGv3m4L.js +1 -0
- package/dist/assets/dist-DW0z82oc.js +1 -0
- package/dist/assets/dist-DYoIyA63.js +1 -0
- package/dist/assets/dist-JmBbJxI1.js +1 -0
- package/dist/assets/dist-Kk1Xaco5.js +1 -0
- package/dist/assets/dropdown-menu-rUbU8QKw.js +1 -0
- package/dist/assets/ellipsis-DyXbAp4P.js +1 -0
- package/dist/assets/ellipsis-vertical-DzWImTnI.js +1 -0
- package/dist/assets/email-hX48MODm.js +1 -0
- package/dist/assets/environment-variables-editor-D6Ylcd74.js +1 -0
- package/dist/assets/environments-xuhuvnTt.js +1 -0
- package/dist/assets/es2015-I559Yimy.js +41 -0
- package/dist/assets/external-link-BIcMNNSN.js +1 -0
- package/dist/assets/eye-D8HiVtuU.js +1 -0
- package/dist/assets/eye-off-DTXvEIMp.js +1 -0
- package/dist/assets/fast-responses-B5vx8axv.js +1 -0
- package/dist/assets/file-CcVMTQhg.js +1 -0
- package/dist/assets/file-code-corner-CwcL9g2p.js +1 -0
- package/dist/assets/file-question-mark-BCVjQ2mM.js +1 -0
- package/dist/assets/file-search-Ccb88q3t.js +1 -0
- package/dist/assets/file-text-CsPKrMTp.js +1 -0
- package/dist/assets/flag-i_D610oD.js +1 -0
- package/dist/assets/flask-conical-BxspRG7d.js +1 -0
- package/dist/assets/folder-git-2-igHQBSOf.js +1 -0
- package/dist/assets/folder-open-Dkshp3J4.js +1 -0
- package/dist/assets/folder-search-B_Hz17IO.js +1 -0
- package/dist/assets/funnel-BoiZeTWw.js +1 -0
- package/dist/assets/git-pull-request-DXoACxvx.js +1 -0
- package/dist/assets/github-icon-Cf0axVvi.js +1 -0
- package/dist/assets/health-Cn-5LIwb.js +1 -0
- package/dist/assets/heartbeats-D96c9g2n.js +1 -0
- package/dist/assets/inbox-BbL3s2C7.js +1 -0
- package/dist/assets/inboxArchiveCache-CxaLM1R8.js +1 -0
- package/dist/assets/index-BcwxLap4.js +67 -0
- package/dist/assets/index-BrXf-544.css +2 -0
- package/dist/assets/info-Clx4FKz9.js +1 -0
- package/dist/assets/input-BBNGmECW.js +1 -0
- package/dist/assets/instanceSettings-D1nNVWU0.js +1 -0
- package/dist/assets/interaction-audience-B74UGNaN.js +1 -0
- package/dist/assets/interaction-card-visibility-CUHRz7le.js +1 -0
- package/dist/assets/issue-blockers-t3wlvg4M.js +1 -0
- package/dist/assets/issue-output-BM-lLts2.js +1 -0
- package/dist/assets/issue-properties-D64PIhST.js +4 -0
- package/dist/assets/issue-share-W3K_cYZY.js +1 -0
- package/dist/assets/issue-workspace-selection-BY0sBaN6.js +1 -0
- package/dist/assets/key-round-CGxQxRtN.js +1 -0
- package/dist/assets/label-B707hSFt.js +1 -0
- package/dist/assets/layout-dashboard-CGcwI_3-.js +1 -0
- package/dist/assets/link-0uKX-OmT.js +1 -0
- package/dist/assets/link-2-Cn4f4xsG.js +1 -0
- package/dist/assets/list-filter-BjVYqW16.js +1 -0
- package/dist/assets/list-todo-DfkI9JDS.js +1 -0
- package/dist/assets/log-in-C4giPkVk.js +1 -0
- package/dist/assets/maximize-2-c8H5WcEB.js +1 -0
- package/dist/assets/mention-chips-COg-185l.js +17 -0
- package/dist/assets/message-square-plus-BQNp2QTu.js +1 -0
- package/dist/assets/minus-BttANimQ.js +1 -0
- package/dist/assets/model-fallback-CwykjJWn.js +1 -0
- package/dist/assets/model-picker-fields-D_I_l2UI.js +1 -0
- package/dist/assets/network-D_6qRf8m.js +1 -0
- package/dist/assets/octagon-alert-BGGMATMK.js +1 -0
- package/dist/assets/octagon-x-ZKE_ZOe_.js +1 -0
- package/dist/assets/omp-settings-model-B06pdqQR.js +1 -0
- package/dist/assets/package-G5arH6JJ.js +1 -0
- package/dist/assets/pause-B6AkvDer.js +1 -0
- package/dist/assets/pen-line-CKsWWDy2.js +1 -0
- package/dist/assets/pipeline-stage-presentation-DDdch-G7.js +2 -0
- package/dist/assets/pipelines-0Lb8D7gt.js +1 -0
- package/dist/assets/play-Czm7OCYh.js +1 -0
- package/dist/assets/plug-UFf0xCI3.js +1 -0
- package/dist/assets/plugins-C7Akvi81.js +1 -0
- package/dist/assets/plus-CwNlqadt.js +1 -0
- package/dist/assets/popover-CWlBonqy.js +1 -0
- package/dist/assets/power-CJfOYd7k.js +1 -0
- package/dist/assets/presentation-mode-ZjtUUsSS.js +1 -0
- package/dist/assets/profile-summary-BwdvqPGE.js +1 -0
- package/dist/assets/projects-l3kQxnTp.js +1 -0
- package/dist/assets/proposal-review-D9ye_2Px.js +1 -0
- package/dist/assets/queryClient-CojHFSot.js +1 -0
- package/dist/assets/queryKeys-BzT8CD34.js +1 -0
- package/dist/assets/radio-BqjASC1E.js +1 -0
- package/dist/assets/radio-card-DCobJXTD.js +1 -0
- package/dist/assets/recent-agent-chats-BUso0Smv.js +1 -0
- package/dist/assets/refresh-cw-CfzWP9se.js +1 -0
- package/dist/assets/repeat-DzPORJjX.js +1 -0
- package/dist/assets/resizable-panels-DkafPiQi.js +1 -0
- package/dist/assets/review-policy-B1PowuVV.js +1 -0
- package/dist/assets/rotate-ccw-DpzLJhXT.js +1 -0
- package/dist/assets/rotate-cw-D1cKBtZK.js +1 -0
- package/dist/assets/router-BKzUF9uf.js +1 -0
- package/dist/assets/routines-DteAuK7S.js +1 -0
- package/dist/assets/runRetryState-p_i4Mh7u.js +1 -0
- package/dist/assets/save-Blub8a14.js +1 -0
- package/dist/assets/schema-config-fields-B8ha5h4A.js +1 -0
- package/dist/assets/scroll-area-Ci3PubY2.js +1 -0
- package/dist/assets/scroll-text-DfBz82Kz.js +1 -0
- package/dist/assets/search-CgZSuGC8.js +1 -0
- package/dist/assets/secrets-D17QEm13.js +1 -0
- package/dist/assets/segmented-tuNVx49H.js +1 -0
- package/dist/assets/select-DNiRU1d9.js +1 -0
- package/dist/assets/send-DfQbMfo9.js +1 -0
- package/dist/assets/separator-6cvFqhvW.js +1 -0
- package/dist/assets/server-NjSlblAR.js +1 -0
- package/dist/assets/server-cog-cefxr54v.js +1 -0
- package/dist/assets/settings-DuRZr7gk.js +1 -0
- package/dist/assets/shared-BjSrBoPt.js +1 -0
- package/dist/assets/sheet-D5sUsyfT.js +1 -0
- package/dist/assets/shield-DC6LuDUy.js +1 -0
- package/dist/assets/shield-alert-BAXWoBTh.js +1 -0
- package/dist/assets/shield-check-RPyaLAc-.js +1 -0
- package/dist/assets/shield-question-mark-Dl8dxzUU.js +1 -0
- package/dist/assets/shield-x-DaFG-JUd.js +1 -0
- package/dist/assets/sidebarPreferences-CIMvMX-W.js +1 -0
- package/dist/assets/skeleton-BAAoD7cz.js +1 -0
- package/dist/assets/slots-DZ1hj5sG.js +49 -0
- package/dist/assets/smoke-lab-matrix-Cjauo09x.js +1 -0
- package/dist/assets/square-CDo6rOf8.js +1 -0
- package/dist/assets/star-eem0qj3E.js +15 -0
- package/dist/assets/sun-2LJX7Tad.js +1 -0
- package/dist/assets/system-notice-comment-DPCHQ4-Y.js +1 -0
- package/dist/assets/tabs-CjHzZxtD.js +1 -0
- package/dist/assets/task-chat-attachments-DNPQ-jOG.js +10 -0
- package/dist/assets/terminal-i6UlT3R6.js +1 -0
- package/dist/assets/textarea-CTx68BDs.js +1 -0
- package/dist/assets/thumbs-down-BVZskfHA.js +1 -0
- package/dist/assets/thumbs-up-Cqj30fzj.js +1 -0
- package/dist/assets/toggle-switch-Dj5GORxn.js +1 -0
- package/dist/assets/tools-MhVvhrz_.js +1 -0
- package/dist/assets/tooltip-CW50mEoC.js +1 -0
- package/dist/assets/transcript-adapter-C1RGcJFu.js +5 -0
- package/dist/assets/trash-QxFF084e.js +1 -0
- package/dist/assets/triangle-alert-CnHMpmva.js +1 -0
- package/dist/assets/upload-Dk7oXJof.js +1 -0
- package/dist/assets/use-adapter-capabilities-BNfGiTEP.js +1 -0
- package/dist/assets/use-copy-action-DFzauB4H.js +1 -0
- package/dist/assets/useAgentChatEnabled-DMbd4JDE.js +1 -0
- package/dist/assets/useAutosaveIndicator-D3owckCV.js +1 -0
- package/dist/assets/useHiddenSettings-D0HL2tkE.js +1 -0
- package/dist/assets/useInfiniteQuery-DTEIZ1gz.js +1 -0
- package/dist/assets/useInstanceFeatureSettings-1h06E3Mh.js +1 -0
- package/dist/assets/useManagedSandboxOnly-KE5BJrr7.js +1 -0
- package/dist/assets/useMobileEntityPickerViewportStyle-BG2vZMIz.js +1 -0
- package/dist/assets/usePrefersReducedMotion-BLkUT2m6.js +1 -0
- package/dist/assets/useProfilesData-Bs6IpD6I.js +1 -0
- package/dist/assets/useQueries-K6OPYBvC.js +1 -0
- package/dist/assets/useSecondTick-BRYNTPNI.js +1 -0
- package/dist/assets/useSharedPolling-CFeiZe2t.js +1 -0
- package/dist/assets/useSummaryDraftStream-DOcsGLEm.js +3 -0
- package/dist/assets/user-D5V640s5.js +1 -0
- package/dist/assets/user-check-DcbSRa0r.js +1 -0
- package/dist/assets/user-minus-DSZK8_9n.js +1 -0
- package/dist/assets/user-round-B87hENhM.js +1 -0
- package/dist/assets/user-x-CZ1ImNac.js +1 -0
- package/dist/assets/users-CEZ1U5q9.js +1 -0
- package/dist/assets/wand-sparkles-CONrztQy.js +1 -0
- package/dist/assets/webhook-nurKUWEn.js +1 -0
- package/dist/assets/x-6E1yeU3Q.js +1 -0
- package/dist/index.html +193 -193
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/AccessSelectIdentity-DT_buzXu.js +0 -1
- package/dist/assets/AdapterManager-D60L5cdo.js +0 -1
- package/dist/assets/AdvancedToolsRoute-CTTIaGDV.js +0 -39
- package/dist/assets/AgentActionButtons-CSDLZSMZ.js +0 -1
- package/dist/assets/AgentAvatar-Dui4nRtK.js +0 -1
- package/dist/assets/AgentBubbleActionRow-DSmdb3Li.js +0 -1
- package/dist/assets/AgentCharacter-D8CErloh.js +0 -2
- package/dist/assets/AgentChat-D3dO5D25.js +0 -1
- package/dist/assets/AgentChats-BlMX0riv.js +0 -1
- package/dist/assets/AgentDefaults-BRMPOQ-f.js +0 -1
- package/dist/assets/AgentDetail-CWdw5kRB.js +0 -38
- package/dist/assets/AgentIconPicker-Dub7R1_d.js +0 -1
- package/dist/assets/AgentIdentity-DoJBo59l.js +0 -1
- package/dist/assets/AgentMailCredentialField-qDnOhzgT.js +0 -1
- package/dist/assets/AgentMultiSelect-CEZ1NuIU.js +0 -1
- package/dist/assets/AgentRoleEditor-yyBT_XYK.js +0 -1
- package/dist/assets/AgentSetupPrompt-B44EEYgo.js +0 -30
- package/dist/assets/AgentTodoCard-BHWOqSEn.js +0 -1
- package/dist/assets/Agents-0yi6xFaj.js +0 -3
- package/dist/assets/AppDetail-CqWalFA3.js +0 -8
- package/dist/assets/AppLogo-C6tetlB_.js +0 -1
- package/dist/assets/AppNotConnected-CzQcETOO.js +0 -1
- package/dist/assets/ApprovalCard-BIquGj06.js +0 -1
- package/dist/assets/ApprovalDetail-hUlU9KPS.js +0 -1
- package/dist/assets/ApprovalPayload-CZTySb8R.js +0 -1
- package/dist/assets/Approvals-DSt7iLh6.js +0 -1
- package/dist/assets/AppsConnect-C1ilHYgy.js +0 -1
- package/dist/assets/AppsReview-CdjVNMBY.js +0 -1
- package/dist/assets/ArtifactCard-CheT3r1Y.js +0 -1
- package/dist/assets/Artifacts-Cp_CLB8P.js +0 -1
- package/dist/assets/AssistantConnection-D7MGE_yN.js +0 -1
- package/dist/assets/AttentionInteractionResolver-BUB3AfZH.js +0 -1
- package/dist/assets/AuditHub-DiWa6PDF.js +0 -1
- package/dist/assets/Auth-7ZwKR47T.js +0 -3
- package/dist/assets/BoardChat-BtB-0sW_.js +0 -18
- package/dist/assets/BoardClaim-Dj03nG8V.js +0 -1
- package/dist/assets/BootstrapSetupUxLab-ARs-PdM-.js +0 -1
- package/dist/assets/BreadcrumbContext-B9JUzLr5.js +0 -1
- package/dist/assets/Browse-B5mbrNri.js +0 -1
- package/dist/assets/BudgetPolicyCard-D31Qlv4T.js +0 -1
- package/dist/assets/CaseDetail-kLu_fI6z.js +0 -2
- package/dist/assets/CaseIdentifierKey-BFHk8T39.js +0 -1
- package/dist/assets/Cases-B-LfED0v.js +0 -2
- package/dist/assets/ChatEndpointDetail-DMGq_bkC.js +0 -5
- package/dist/assets/ChatEndpointSetup-BIxcZyIt.js +0 -1
- package/dist/assets/ChatIdentityConfirm-vsNMn_wj.js +0 -1
- package/dist/assets/ChoiceControls-CLtKmk2I.js +0 -1
- package/dist/assets/CliAuth-BrGRdrjs.js +0 -1
- package/dist/assets/CommentAttributionChip-CnhotPjn.js +0 -1
- package/dist/assets/Companies-BMVhOFzV.js +0 -1
- package/dist/assets/CompanyAccess-BlUM6hbW.js +0 -1
- package/dist/assets/CompanyActivity-5OGh6LZ6.js +0 -1
- package/dist/assets/CompanyConnections-Q1zAAePy.js +0 -1
- package/dist/assets/CompanyContext-Cx4B566r.js +0 -1
- package/dist/assets/CompanyEnvironments-BW9JgMNj.js +0 -3
- package/dist/assets/CompanyExport-CDSYD5mi.js +0 -4
- package/dist/assets/CompanyImport-B7Y99lni.js +0 -1
- package/dist/assets/CompanySettings-EcYnaTrR.js +0 -1
- package/dist/assets/CompanySettingsPluginPage-D3Vts52M.js +0 -1
- package/dist/assets/CompanySkills-CJp4nZix.js +0 -10
- package/dist/assets/ComposerAddMenu-lqbjcizN.js +0 -3
- package/dist/assets/ConfigureBuiltInAgentModal-C5RpKaFX.js +0 -1
- package/dist/assets/ConnectionSetupFlow-BFexB8UB.js +0 -40
- package/dist/assets/CopyText-Z_7ZP24v.js +0 -1
- package/dist/assets/CopyableGatewayUrl-BAIPUo7r.js +0 -1
- package/dist/assets/CrossIssueCollaborationUxLab-BbToOV2g.js +0 -1
- package/dist/assets/Dashboard-B_807CNK.js +0 -2
- package/dist/assets/DecisionDateChips-CM9496e0.js +0 -1
- package/dist/assets/DecisionModelSettings-DyZC9rU1.js +0 -1
- package/dist/assets/DecisionQueuePage-BRbIttBU.js +0 -1
- package/dist/assets/DesignGuide-bh4XX4nv.js +0 -23
- package/dist/assets/DocumentFrameHeader-lPIe9r6i.js +0 -1
- package/dist/assets/EmailConnectionAccess-BfEW3sUV.js +0 -1
- package/dist/assets/EmailEndpointSetup-BOhC9uiR.js +0 -1
- package/dist/assets/EnforcementBanner-CvthijpR.js +0 -1
- package/dist/assets/EntityRow-DbXjGhVW.js +0 -1
- package/dist/assets/ExecutionWorkspaceDetail-D4v1WZZf.js +0 -19
- package/dist/assets/FilterBar-CDIOkdDy.js +0 -1
- package/dist/assets/FoldCurtain-SSKlbSjO.js +0 -1
- package/dist/assets/FolderControls-Bhry3Vd2.js +0 -1
- package/dist/assets/GatewayDetail-BzSIBC84.js +0 -2
- package/dist/assets/GatewaysList-CZP6UIqo.js +0 -1
- package/dist/assets/GoalDetail-Ct08uwQw.js +0 -1
- package/dist/assets/GoalTree-DxU1Hv7E.js +0 -1
- package/dist/assets/Goals-BT9hCHnP.js +0 -1
- package/dist/assets/Identity-Jt9hiBbb.js +0 -1
- package/dist/assets/ImageGalleryModal-tTRmXGM4.js +0 -1
- package/dist/assets/Inbox-6vKVEJVu.js +0 -2
- package/dist/assets/InlineBanner-BWitMSzj.js +0 -1
- package/dist/assets/InlineEditor-DJB_QvGc.js +0 -1
- package/dist/assets/InlineEntitySelector-h-mVM8ny.js +0 -1
- package/dist/assets/InstanceAccess-CWtKVMDd.js +0 -1
- package/dist/assets/InstanceAdvanced-Bb4mtcMA.js +0 -1
- package/dist/assets/InstanceFeatures-CkqItnLP.js +0 -1
- package/dist/assets/InviteLanding-BnL6CX0t.js +0 -1
- package/dist/assets/IssueChatLongThreadPerf-VX9bG-bM.js +0 -2
- package/dist/assets/IssueChatThread-RwT_ZjCz.js +0 -40
- package/dist/assets/IssueDetail-DuaqjKFa.js +0 -9
- package/dist/assets/IssueDocumentAnnotations-CwAOcRXe.js +0 -2
- package/dist/assets/IssueOutputSection-CWIabX5_.js +0 -1
- package/dist/assets/IssueRecoveryActionCard-BH_n5kJ0.js +0 -1
- package/dist/assets/IssueReferencePill-Bx19xBTT.js +0 -1
- package/dist/assets/IssueThreadInteractionCard-CwQx5QmL.js +0 -9
- package/dist/assets/IssueWriteDenialNotice-DntH-qXu.js +0 -1
- package/dist/assets/Issues-Cn7D_2T3.js +0 -5
- package/dist/assets/JoinRequestQueue-DDbAcL7h.js +0 -1
- package/dist/assets/JsonSchemaForm-CukFZxO5.js +0 -1
- package/dist/assets/LiveNowTodoLine-CeGqy3iK.js +0 -1
- package/dist/assets/ManagedAiConnectionDetails-GCRA__HT.js +0 -1
- package/dist/assets/MarkdownBody-Dtjq3Ln7.js +0 -16
- package/dist/assets/MarkdownEditor-GCKumUHH.js +0 -85
- package/dist/assets/McpConnect-Cv3wvage.js +0 -1
- package/dist/assets/MembershipAction-B1Rkn6Ya.js +0 -1
- package/dist/assets/MetricCard-CWsDw6PQ.js +0 -1
- package/dist/assets/MissingPluginTabPlaceholder-BBTNbYkG.js +0 -1
- package/dist/assets/ModelsAndProviders-DhjeUdj-.js +0 -1
- package/dist/assets/MootMark-Djv4Cqoj.js +0 -1
- package/dist/assets/NewAgent-BTrIjdLI.js +0 -1
- package/dist/assets/OmpAllSettings-D7HFc1wr.js +0 -1
- package/dist/assets/OpenwaGatewayManager-CZ-1AWGM.js +0 -2
- package/dist/assets/PathInstructionsModal-Ch_Y_h-W.js +0 -1
- package/dist/assets/PipelineSettings-CEOXJLey.js +0 -2
- package/dist/assets/Pipelines-Dqr4RIMe.js +0 -1
- package/dist/assets/PixelsOffice-Dc-hTwL6.js +0 -2
- package/dist/assets/PluginManager-BHDvd2Kk.js +0 -1
- package/dist/assets/PluginPage-DGJsTGb4.js +0 -1
- package/dist/assets/PluginSettings-DSb7ReBz.js +0 -1
- package/dist/assets/ProfileDetailRoute-DWOiwLnB.js +0 -1
- package/dist/assets/ProfileSettings-BDPwbFPA.js +0 -1
- package/dist/assets/ProfileWizardRoute-CyY9cBXn.js +0 -1
- package/dist/assets/ProjectDetail-tbNc2eqO.js +0 -1
- package/dist/assets/ProjectWorkspaceDetail-CE3uadEz.js +0 -29
- package/dist/assets/ProjectWorkspacesContent-C-UY0h-1.js +0 -1
- package/dist/assets/Projects-IJU6fKzh.js +0 -1
- package/dist/assets/PublicIssueSharePage-D2-mjx5c.js +0 -1
- package/dist/assets/QuestionForm-CNI1aaPv.js +0 -7
- package/dist/assets/QuotaBar-BHpsGZ_M.js +0 -1
- package/dist/assets/RepositoryEditor-sn0h55E-.js +0 -1
- package/dist/assets/ResponsibleUserDenialNotice-O-ehIhIk.js +0 -1
- package/dist/assets/ResponsibleUserDenialUxLab-CwOtm-H_.js +0 -1
- package/dist/assets/ReviewQueueCard-DK0sDiGs.js +0 -1
- package/dist/assets/RichWorkProductCard-ButSFwSp.js +0 -1
- package/dist/assets/RoutineActivityRow-C0vIpaP_.js +0 -1
- package/dist/assets/RoutineDetail-CWWdWsrO.js +0 -2
- package/dist/assets/RoutineRunVariablesDialog-CRGon2Hg.js +0 -1
- package/dist/assets/RoutineVariablesEditor-C_rNpv3C.js +0 -1
- package/dist/assets/Routines-GiNr76nw.js +0 -1
- package/dist/assets/ScrollToBottom-BYgXnYon.js +0 -1
- package/dist/assets/Search-SUbPfqq4.js +0 -1
- package/dist/assets/SearchableSelect-Dl3Lshyy.js +0 -1
- package/dist/assets/Secrets--ch95iPv.js +0 -4
- package/dist/assets/SetupWizard-BhEuzmUv.js +0 -1
- package/dist/assets/SidebarContext-BHJMHrvt.js +0 -1
- package/dist/assets/SidebarNavItem-Dr2h0yiK.js +0 -1
- package/dist/assets/SkillBinaryFile-Datjq2Oi.js +0 -1
- package/dist/assets/SkillCardIcon-C430BaPr.js +0 -2
- package/dist/assets/SkillSourceTree-CR0E52D2.js +0 -2
- package/dist/assets/SkillSources-DeBOYCiw.js +0 -2
- package/dist/assets/SkillStudio-C3XaNFS3.js +0 -9
- package/dist/assets/SourceTrustBadge-D9HGGRtv.js +0 -1
- package/dist/assets/StatusCards-D2X-8hFz.js +0 -1
- package/dist/assets/StatusIcon-Byea8cPq.js +0 -1
- package/dist/assets/SummarySlotCard-CxnwG1r2.js +0 -1
- package/dist/assets/TaskChatComposerTakeoverContext-DCrczoPx.js +0 -1
- package/dist/assets/TaskChatLab-BvlnYRNe.js +0 -11
- package/dist/assets/TaskChatMarker-2V0Oo3xV.js +0 -2
- package/dist/assets/TaskChatProtocolCard-CgwNmmaw.js +0 -1
- package/dist/assets/TaskChatThreadView-BSU2dzE7.js +0 -4
- package/dist/assets/TaskTreeControls-DaAFj1E9.js +0 -3
- package/dist/assets/Terminal-Byg7O1p2.js +0 -1
- package/dist/assets/TerminalView-CsrRCoNX.js +0 -58
- package/dist/assets/ThemeContext-Bj-WoVL8.js +0 -1
- package/dist/assets/ThemeToggle-_Eipcr9P.js +0 -1
- package/dist/assets/ToastContext-BCfjPRi1.js +0 -1
- package/dist/assets/ToolsAdminGate-B6k3SrGU.js +0 -1
- package/dist/assets/TrustPresetSection-DSCmQxlJ.js +0 -1
- package/dist/assets/UserProfile-BYBUYHyM.js +0 -1
- package/dist/assets/WebhookUrlWarning-DeNhQ5SI.js +0 -1
- package/dist/assets/WhatNeedsMe-I9wfO12c.js +0 -1
- package/dist/assets/WorkspaceRuntimeControls-ByOvZ2To.js +0 -1
- package/dist/assets/Workspaces-Db99D3YB.js +0 -1
- package/dist/assets/access-BqSI2EWX.js +0 -1
- package/dist/assets/activity-CV1ib_N4.js +0 -1
- package/dist/assets/activity-DjXPM70-.js +0 -1
- package/dist/assets/activity-format-z4x2U1UL.js +0 -1
- package/dist/assets/adapter-display-registry-BwL8TUEJ.js +0 -1
- package/dist/assets/adapters-BDzUkPiY.js +0 -1
- package/dist/assets/agent-avatar-url-D6FtNk3V.js +0 -1
- package/dist/assets/agent-config-primitives-BpUNyayv.js +0 -1
- package/dist/assets/agentChats-B3DxYJ0s.js +0 -1
- package/dist/assets/agents-PFXnjEjH.js +0 -1
- package/dist/assets/alert-dialog-Bu032Tf4.js +0 -1
- package/dist/assets/app-connect-policy-C0ySFS-g.js +0 -1
- package/dist/assets/archive-BHg7Yq0H.js +0 -1
- package/dist/assets/archive-restore-BtX-2MA_.js +0 -1
- package/dist/assets/arrow-down-CDBD_UhE.js +0 -1
- package/dist/assets/arrow-down-left-tUS9EGQ5.js +0 -1
- package/dist/assets/arrow-left-CRfeAefI.js +0 -1
- package/dist/assets/arrow-right-898_TY3T.js +0 -1
- package/dist/assets/arrow-up-down-CIDQ-7ap.js +0 -1
- package/dist/assets/arrow-up-lSEksryM.js +0 -1
- package/dist/assets/arrow-up-right-CiL52_C-.js +0 -1
- package/dist/assets/artifacts-BmsoVCdJ.js +0 -1
- package/dist/assets/assets-lhKNSpON.js +0 -1
- package/dist/assets/attachment-icon-g4YAkuZ8.js +0 -1
- package/dist/assets/avatar-C4Ssxg9Y.js +0 -1
- package/dist/assets/badge-Dvh7HNMN.js +0 -1
- package/dist/assets/badge-check-B-GkuMC-.js +0 -1
- package/dist/assets/book-open-Ccq-Ea-W.js +0 -1
- package/dist/assets/bot-CPZa9Nhm.js +0 -1
- package/dist/assets/boxes-PkWx_5hs.js +0 -1
- package/dist/assets/braces-DovVxLjW.js +0 -1
- package/dist/assets/browser-use-DzHGNDA8.js +0 -1
- package/dist/assets/budgets-BieJJ3WD.js +0 -1
- package/dist/assets/button-CB8r2Tmh.js +0 -1
- package/dist/assets/calendar-clock-CeIy5aD9.js +0 -1
- package/dist/assets/card-DANCDyBy.js +0 -1
- package/dist/assets/cases-DiL3ys5G.js +0 -1
- package/dist/assets/chatEndpoints-BR_dsxeU.js +0 -1
- package/dist/assets/check-ByoSzjU8.js +0 -1
- package/dist/assets/checkbox-D9x1Kpmi.js +0 -1
- package/dist/assets/chevron-down-BY8r8lEv.js +0 -1
- package/dist/assets/chevron-left-Bh6cfiU3.js +0 -1
- package/dist/assets/chevron-right-B9tyGqmZ.js +0 -1
- package/dist/assets/chevron-up-Y_THiwqt.js +0 -1
- package/dist/assets/chip-CPztosQ8.js +0 -1
- package/dist/assets/circle-Dov4MVoe.js +0 -1
- package/dist/assets/circle-alert-Dw0yL22E.js +0 -1
- package/dist/assets/circle-dot-W_Fv5sI-.js +0 -1
- package/dist/assets/circle-question-mark-Bs7m2809.js +0 -1
- package/dist/assets/circle-slash-BrrkGL_C.js +0 -1
- package/dist/assets/circle-x-haVgjs_m.js +0 -1
- package/dist/assets/clipboard-paste-CbrlOJuv.js +0 -1
- package/dist/assets/clock-DynbfDi4.js +0 -1
- package/dist/assets/cloud-BL3mJ3Zk.js +0 -1
- package/dist/assets/code-xml-DnMtzyzg.js +0 -1
- package/dist/assets/coins-op-yocyK.js +0 -1
- package/dist/assets/collapsible-CK4bkaKD.js +0 -1
- package/dist/assets/columns-3-h7a-cGgB.js +0 -1
- package/dist/assets/command-DnT_Dqx6.js +0 -5
- package/dist/assets/companies-query-CEvXdXle.js +0 -1
- package/dist/assets/connection-identity-BFnwnJ1m.js +0 -1
- package/dist/assets/connection-owner-a9FWzn0p.js +0 -1
- package/dist/assets/copy-BzAUsLd3.js +0 -1
- package/dist/assets/createLucideIcon-DpXjCQRS.js +0 -94
- package/dist/assets/decision-models-BJo87qdY.js +0 -1
- package/dist/assets/dialog-Bj8Y6BBR.js +0 -1
- package/dist/assets/dist-3Dez14jq.js +0 -1
- package/dist/assets/dist-B0zvydXD.js +0 -1
- package/dist/assets/dist-BHjJYMl9.js +0 -1
- package/dist/assets/dist-BdR2FnFe.js +0 -1
- package/dist/assets/dist-BmMF5JdA.js +0 -1
- package/dist/assets/dist-BvZdGtYE.js +0 -1
- package/dist/assets/dist-CL5YXBl1.js +0 -1
- package/dist/assets/dist-C_1hhiPG.js +0 -1
- package/dist/assets/dist-CvnnLM1v.js +0 -1
- package/dist/assets/dist-DGPm9z2w.js +0 -1
- package/dist/assets/dist-DIKPg1Zq.js +0 -1
- package/dist/assets/dist-hTXDV8BS.js +0 -1
- package/dist/assets/dist-qP8xhvXd.js +0 -1
- package/dist/assets/dropdown-menu-COuwCVD4.js +0 -1
- package/dist/assets/ellipsis-ClhaIBYZ.js +0 -1
- package/dist/assets/ellipsis-vertical-BLqWWVnI.js +0 -1
- package/dist/assets/email-X-ZvOMfe.js +0 -1
- package/dist/assets/environment-variables-editor-DuAdYQbc.js +0 -1
- package/dist/assets/environments-C7Tx6OHp.js +0 -1
- package/dist/assets/es2015-D1VPo3R2.js +0 -41
- package/dist/assets/external-link--KkXYRPz.js +0 -1
- package/dist/assets/eye-kZn_xPie.js +0 -1
- package/dist/assets/eye-off-CIggBtC5.js +0 -1
- package/dist/assets/fast-responses-BxWwvpML.js +0 -1
- package/dist/assets/file-DpimbHnE.js +0 -1
- package/dist/assets/file-code-corner-CTt6xXKc.js +0 -1
- package/dist/assets/file-question-mark-BdUx7roP.js +0 -1
- package/dist/assets/file-search-DKDwHcZ2.js +0 -1
- package/dist/assets/file-text-Dpnp6o-I.js +0 -1
- package/dist/assets/flag-DL-0fBPJ.js +0 -1
- package/dist/assets/flask-conical-qqfS8te7.js +0 -1
- package/dist/assets/folder-git-2-D8yyJVTc.js +0 -1
- package/dist/assets/folder-open-fbJID1cC.js +0 -1
- package/dist/assets/folder-search-D89U3Z-T.js +0 -1
- package/dist/assets/funnel-B2ism2sD.js +0 -1
- package/dist/assets/git-pull-request-DQkSlyfL.js +0 -1
- package/dist/assets/github-icon-CbU9rpKT.js +0 -1
- package/dist/assets/health-CHjyy9Zt.js +0 -1
- package/dist/assets/heartbeats-Cy4hqsrt.js +0 -1
- package/dist/assets/inbox-WZDW93BL.js +0 -1
- package/dist/assets/inboxArchiveCache-CoY_V35O.js +0 -1
- package/dist/assets/index-B6ALXjXD.js +0 -67
- package/dist/assets/index-gXKvahZk.css +0 -2
- package/dist/assets/info-BqXpbzV2.js +0 -1
- package/dist/assets/input-tD3qR9Gq.js +0 -1
- package/dist/assets/instanceSettings-DIXpSGRh.js +0 -1
- package/dist/assets/interaction-audience-CXUDNI1a.js +0 -1
- package/dist/assets/interaction-card-visibility-DTtQkm6u.js +0 -1
- package/dist/assets/issue-blockers-KTmO2cng.js +0 -1
- package/dist/assets/issue-output-BzlPk1Fq.js +0 -1
- package/dist/assets/issue-properties-CmEBhjZa.js +0 -4
- package/dist/assets/issue-share-0nHxp5nx.js +0 -1
- package/dist/assets/issue-workspace-selection-DxIMVIPY.js +0 -1
- package/dist/assets/key-round-Bzc86YKh.js +0 -1
- package/dist/assets/label-CUFCL9Te.js +0 -1
- package/dist/assets/layout-dashboard-CQUo0zqq.js +0 -1
- package/dist/assets/link-2-DdeL2ffb.js +0 -1
- package/dist/assets/link-BTk9LQnG.js +0 -1
- package/dist/assets/list-filter-BIvVZUS2.js +0 -1
- package/dist/assets/list-todo-ByybdFTG.js +0 -1
- package/dist/assets/log-in-C5qjuUlB.js +0 -1
- package/dist/assets/maximize-2-pkU0hBkw.js +0 -1
- package/dist/assets/mention-chips-D3m3O_ko.js +0 -17
- package/dist/assets/message-square-plus-DaOHWEpG.js +0 -1
- package/dist/assets/minus-ymsuVafu.js +0 -1
- package/dist/assets/model-fallback-5DsUzAM5.js +0 -1
- package/dist/assets/model-picker-fields-jLfT-wsr.js +0 -1
- package/dist/assets/network-DtO4s1Xo.js +0 -1
- package/dist/assets/octagon-alert-Do2mnwTI.js +0 -1
- package/dist/assets/octagon-x-7Om5soqi.js +0 -1
- package/dist/assets/omp-settings-model-BVsTwU6j.js +0 -1
- package/dist/assets/package-Cvq1waTm.js +0 -1
- package/dist/assets/pause-BNtKkOA6.js +0 -1
- package/dist/assets/pen-line-DJnffu7P.js +0 -1
- package/dist/assets/pipeline-stage-presentation-DvjVVsAD.js +0 -2
- package/dist/assets/pipelines-B_5RdgB1.js +0 -1
- package/dist/assets/play-BEkcNe5A.js +0 -1
- package/dist/assets/plug-vBXQGAOC.js +0 -1
- package/dist/assets/plugins-CaoL00gm.js +0 -1
- package/dist/assets/plus-Ci4fWNMH.js +0 -1
- package/dist/assets/popover-C9GvGhqf.js +0 -1
- package/dist/assets/power-czY3YlJl.js +0 -1
- package/dist/assets/presentation-mode-3-5_ozCU.js +0 -1
- package/dist/assets/profile-summary-Bhu05QwC.js +0 -1
- package/dist/assets/projects-C-sNYR8y.js +0 -1
- package/dist/assets/proposal-review-Cww0NzU2.js +0 -1
- package/dist/assets/queryClient-CLuei5YE.js +0 -1
- package/dist/assets/queryKeys-Bwpi9du8.js +0 -1
- package/dist/assets/radio-Bbj2qILX.js +0 -1
- package/dist/assets/radio-card-CEpISzBw.js +0 -1
- package/dist/assets/recent-agent-chats-xm5DHAP2.js +0 -1
- package/dist/assets/refresh-cw-BoKHCT9Q.js +0 -1
- package/dist/assets/repeat-CxiYIeqH.js +0 -1
- package/dist/assets/resizable-panels-CAJWzqPj.js +0 -1
- package/dist/assets/review-policy-BroUuOnH.js +0 -1
- package/dist/assets/rotate-ccw-DP1fSRXE.js +0 -1
- package/dist/assets/rotate-cw-BIJjXmtM.js +0 -1
- package/dist/assets/router-DvYg2TPj.js +0 -1
- package/dist/assets/routines-DRJ8glz2.js +0 -1
- package/dist/assets/runRetryState-BQtnYsCT.js +0 -1
- package/dist/assets/save-TS82wH4U.js +0 -1
- package/dist/assets/schema-config-fields-CKfJ_1Bc.js +0 -1
- package/dist/assets/scroll-area-CSkajMX4.js +0 -1
- package/dist/assets/scroll-text-BtyjTPat.js +0 -1
- package/dist/assets/search-C7RvqPDh.js +0 -1
- package/dist/assets/secrets-Bow-lhgm.js +0 -1
- package/dist/assets/segmented-B9WQFRdU.js +0 -1
- package/dist/assets/select-BILzRqwR.js +0 -1
- package/dist/assets/send-Cq6oLC65.js +0 -1
- package/dist/assets/separator-Cc_zxQfG.js +0 -1
- package/dist/assets/server-D14pf6xr.js +0 -1
- package/dist/assets/server-cog-Dd0WwTxo.js +0 -1
- package/dist/assets/settings-_MxMwkB3.js +0 -1
- package/dist/assets/shared-C9rdRvrI.js +0 -1
- package/dist/assets/sheet-CXi-joPR.js +0 -1
- package/dist/assets/shield-B35HbBPD.js +0 -1
- package/dist/assets/shield-alert-DoI68Irt.js +0 -1
- package/dist/assets/shield-check-BkZhOxSV.js +0 -1
- package/dist/assets/shield-question-mark-DJ1-iT-R.js +0 -1
- package/dist/assets/shield-x-IA54_BG9.js +0 -1
- package/dist/assets/sidebarPreferences-RlJwFW7E.js +0 -1
- package/dist/assets/skeleton-D5GfoYPy.js +0 -1
- package/dist/assets/slots-B-bF0j6o.js +0 -49
- package/dist/assets/smoke-lab-matrix-ChxKoFnA.js +0 -1
- package/dist/assets/square-BSbamBKn.js +0 -1
- package/dist/assets/star-vweB_JDI.js +0 -15
- package/dist/assets/sun-t5pkwxql.js +0 -1
- package/dist/assets/system-notice-comment-BzIsx8nv.js +0 -1
- package/dist/assets/tabs-BruQLBag.js +0 -1
- package/dist/assets/task-chat-attachments-COZdrQRo.js +0 -10
- package/dist/assets/terminal-BSPCPTKd.js +0 -1
- package/dist/assets/textarea-BQh3frGz.js +0 -1
- package/dist/assets/thumbs-down-Db03Y3rC.js +0 -1
- package/dist/assets/thumbs-up-hfQ2kjmZ.js +0 -1
- package/dist/assets/toggle-switch-CCZLW1ZV.js +0 -1
- package/dist/assets/tools-VxBq3Bni.js +0 -1
- package/dist/assets/tooltip-DhA8eGCr.js +0 -1
- package/dist/assets/transcript-adapter-CEuUrDAp.js +0 -5
- package/dist/assets/trash-Blp_H70m.js +0 -1
- package/dist/assets/triangle-alert-BbGTCcEH.js +0 -1
- package/dist/assets/upload-D1pDAAji.js +0 -1
- package/dist/assets/use-adapter-capabilities-DVcxB6B0.js +0 -1
- package/dist/assets/use-copy-action-DOl9yp4g.js +0 -1
- package/dist/assets/useAgentChatEnabled-BIG72pQN.js +0 -1
- package/dist/assets/useAutosaveIndicator-Bb6JV7mP.js +0 -1
- package/dist/assets/useHiddenSettings-C5OX_C_M.js +0 -1
- package/dist/assets/useInfiniteQuery-aicMPSfT.js +0 -1
- package/dist/assets/useInstanceFeatureSettings-1CM1woTZ.js +0 -1
- package/dist/assets/useManagedSandboxOnly-DENpzhcY.js +0 -1
- package/dist/assets/useMobileEntityPickerViewportStyle-l3SLJAQb.js +0 -1
- package/dist/assets/usePrefersReducedMotion-z1zTAoVk.js +0 -1
- package/dist/assets/useProfilesData-D_CamlCc.js +0 -1
- package/dist/assets/useQueries-DVLf9RKa.js +0 -1
- package/dist/assets/useSecondTick-CQantaP_.js +0 -1
- package/dist/assets/useSharedPolling-CfP23_kt.js +0 -1
- package/dist/assets/useSummaryDraftStream-Cce3cGNj.js +0 -3
- package/dist/assets/user-RgiS0rQH.js +0 -1
- package/dist/assets/user-check-NQX3Jxil.js +0 -1
- package/dist/assets/user-minus-DFmQKqPK.js +0 -1
- package/dist/assets/user-round-cSiRkcc8.js +0 -1
- package/dist/assets/user-x-BydVKgYM.js +0 -1
- package/dist/assets/users-CjaVMVjO.js +0 -1
- package/dist/assets/wand-sparkles-wj238ghx.js +0 -1
- package/dist/assets/webhook-CrpXuiI8.js +0 -1
- package/dist/assets/x-B9UP51U4.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var y=Object.defineProperty;var v=(n,r)=>y(n,"name",{value:r,configurable:!0});import{i as z}from"./rolldown-runtime-ZpX3ckPj.js";import{l as e,la as E}from"./createLucideIcon-CgrPXnTY.js";import{t as F}from"./router-BKzUF9uf.js";var s=z(E(),1);function A({leading:n,identifier:r,title:m,titleAccessory:g,subtitle:i,meta:t,metaSpacerClassName:N,trailing:x,selected:b,to:a,onClick:c,className:k,titleClassName:u,titleTextClassName:d,subtitleClassName:o,reserveSubtitleSpace:w,titlePriority:h,secondaryRow:l,secondaryRowClassName:_}){const p=e(l?"block":"flex items-center gap-3","px-4 py-2 text-sm border-b border-line last:border-b-0 transition-colors",!!(a||c)&&"cursor-pointer hover:bg-bg-3/50",b&&"bg-bg-3/30",k),j=(0,s.jsxs)(s.Fragment,{children:[n&&(0,s.jsx)("div",{className:"flex items-center gap-2 shrink-0",children:n}),(0,s.jsxs)("div",{className:e(h?"min-w-(--sz-6rem)":"min-w-0",!t&&"flex-1",u),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[r&&(0,s.jsx)("span",{className:"text-xs text-ink-3 font-mono shrink-0 relative top-(--sz-1px)",children:r}),(0,s.jsx)("span",{className:e(!d&&"truncate",d),title:m,children:m}),g]}),(i||w)&&(0,s.jsx)("p",{className:e("text-xs text-ink-3 mt-0.5 min-h-4",!o&&"truncate",o,!i&&"invisible"),"aria-hidden":!i,children:i})]}),t&&(0,s.jsx)("div",{className:e("flex items-center gap-2",h?"min-w-0 shrink":"shrink-0"),children:t}),t&&(0,s.jsx)("div",{className:e("flex-1",N)}),x&&(0,s.jsx)("div",{"data-slot":"entity-row-trailing",className:"flex items-center gap-2 shrink-0",children:x})]}),f=l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{"data-slot":"entity-row-main",className:"flex items-center gap-3",children:j}),(0,s.jsx)("div",{className:e("mt-1 pl-5",_),children:l})]}):j;return a?(0,s.jsx)(F,{to:a,"data-slot":"entity-row",className:e("no-underline text-inherit",p),onClick:c,children:f}):(0,s.jsx)("div",{"data-slot":"entity-row",className:p,onClick:c,children:f})}v(A,"EntityRow");export{A as t};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var ms=Object.defineProperty;var r=(s,n)=>ms(s,"name",{value:n,configurable:!0});import{i as $e}from"./rolldown-runtime-ZpX3ckPj.js";import{C as ps,S as xs,T as hs,Zi as fs,Zn as gs,h as L,l as S,la as js,ua as vs}from"./createLucideIcon-CgrPXnTY.js";import{h as bs,v as ks}from"./star-eem0qj3E.js";import{X as Re,_ as le,t as x,v as P}from"./queryKeys-BzT8CD34.js";import{a as ys,i as ws,r as Ns,t as Rs}from"./WorkspaceRuntimeControls-Cp5E1FME.js";import{n as Cs}from"./CompanyContext-fQCNWI_f.js";import{o as Is,r as Ss,t as Y,zt as ke}from"./router-BKzUF9uf.js";import{t as Ws}from"./tabs-CjHzZxtD.js";import{o as Ps,r as _s,t as Es}from"./popover-CWlBonqy.js";import{t as As}from"./check-Bis3vECb.js";import{t as Ts}from"./chevron-down-nRcQ7bok.js";import{t as Ce}from"./copy-C1cfcpxY.js";import{t as ye}from"./external-link-BIcMNNSN.js";import{r as ue,t as N}from"./button-DI4w5WP7.js";import{t as we}from"./play-Czm7OCYh.js";import{t as Fs}from"./repeat-DzPORJjX.js";import{t as De}from"./rotate-ccw-DpzLJhXT.js";import{t as Ls}from"./square-CDo6rOf8.js";import{t as Ve}from"./triangle-alert-CnHMpmva.js";import{a as qs}from"./ToastContext-DyVJ6bCh.js";import{t as Je}from"./agents-B8n-p0aX.js";import{t as Os}from"./heartbeats-D96c9g2n.js";import{n as Us,t as Bs}from"./useSharedPolling-CFeiZe2t.js";import{t as Ks}from"./projects-l3kQxnTp.js";import{t as U}from"./input-BBNGmECW.js";import{n as Ds,o as Ms,t as zs}from"./slots-DZ1hj5sG.js";import{t as Me}from"./routines-DteAuK7S.js";import{n as Qs}from"./BreadcrumbContext-DNbB7zWn.js";import{t as $}from"./textarea-CTx68BDs.js";import{t as $s}from"./clipboard-CTLKYvRL.js";import{i as H,n as Vs,o as G,r as B,s as X,t as K}from"./card-BVZvs7aX.js";import{W as Js,fr as V,pr as Hs,r as Gs,ri as Xs}from"./index-BcwxLap4.js";import{t as ae}from"./separator-6cvFqhvW.js";import{t as Zs}from"./useManagedSandboxOnly-KE5BJrr7.js";import{t as He}from"./CopyText-BbOm2I6t.js";import{n as Ys,t as en}from"./SummarySlotCard-DlwG6iRT.js";import{t as sn}from"./MissingPluginTabPlaceholder-l1R-Q4nh.js";import{t as nn}from"./RoutineRunVariablesDialog-C8OHcazq.js";var h=$e(vs(),1),e=$e(js(),1),tn=["provisioning","starting","stopping","restarting"];function Ie(s){return tn.includes(s)}r(Ie,"isTransitional");function Ge(s){return s?s.replace(/^https?:\/\//,"").replace(/\/$/,""):null}r(Ge,"formatServiceUrl");function Xe(s){switch(s.state){case"provisioning":return{label:"Provisioning…",unhealthy:!1};case"starting":return{label:"Starting…",unhealthy:!1};case"stopping":return{label:"Stopping…",unhealthy:!1};case"restarting":return{label:"Restarting…",unhealthy:!1};case"failed":return{label:"Failed",unhealthy:!1};case"running":return s.healthStatus==="unhealthy"?{label:"Unhealthy",unhealthy:!0}:{label:"Running",unhealthy:!1};default:return{label:"Stopped",unhealthy:!1}}}r(Xe,"statusMeta");function Se({entry:s,className:n}){if(Ie(s.state))return(0,e.jsx)(ue,{className:S("size-3 shrink-0 animate-spin text-ink-3",n)});if(s.state==="failed")return(0,e.jsx)(Ve,{className:S("size-3 shrink-0 text-bad",n)});const a=s.state==="running"&&s.healthStatus==="unhealthy";return(0,e.jsx)("span",{className:S("size-2 shrink-0 rounded-full",s.state==="running"?a?"bg-amber-500 ring-2 ring-amber-500/30":"bg-emerald-500":"border border-ink-3/60 bg-transparent",n)})}r(Se,"StatusIndicator");function Ze({url:s,disabled:n}){const[a,o]=(0,h.useState)("idle"),d=(0,h.useRef)(null);(0,h.useEffect)(()=>()=>{d.current&&clearTimeout(d.current)},[]);const c=a==="copied"?"URL copied":a==="failed"?"Copy failed":"Copy URL";return(0,e.jsxs)(N,{variant:"ghost",size:"icon-xs",disabled:n,"aria-label":c,title:c,onClick:r(async()=>{try{await $s(s),o("copied")}catch{o("failed")}d.current&&clearTimeout(d.current),d.current=setTimeout(()=>o("idle"),1500)},"onClick"),children:[a==="copied"?(0,e.jsx)(As,{className:"size-3"}):a==="failed"?(0,e.jsx)(Ve,{className:"size-3 text-bad"}):(0,e.jsx)(Ce,{className:"size-3"}),(0,e.jsx)("span",{className:"sr-only","aria-live":"polite",children:c})]})}r(Ze,"CopyUrlButton");function ce({entry:s,compact:n}){const a=Ge(s.url)??(s.port?`:${s.port}`:null),o=s.state==="running"&&!!s.url;return a?(0,e.jsxs)(e.Fragment,{children:[o?(0,e.jsx)("a",{href:s.url??void 0,target:"_blank",rel:"noreferrer",title:s.url??void 0,className:S("min-w-0 truncate font-mono text-xs text-ink hover:underline",n?"max-w-44":"max-w-56"),children:a}):(0,e.jsx)("span",{title:s.url??void 0,className:S("min-w-0 truncate font-mono text-xs text-ink-3/70",n?"max-w-44":"max-w-56"),children:a}),(0,e.jsxs)("span",{className:S("flex items-center",o?null:"invisible"),"aria-hidden":o?void 0:!0,children:[(0,e.jsx)(Ze,{url:s.url??"",disabled:!o}),(0,e.jsx)(N,{asChild:o,variant:"ghost",size:"icon-xs",disabled:!o,title:"Open in new tab",children:o?(0,e.jsx)("a",{href:s.url??void 0,target:"_blank",rel:"noreferrer","aria-label":"Open in new tab",children:(0,e.jsx)(ye,{className:"size-3"})}):(0,e.jsx)(ye,{className:"size-3"})})]})]}):(0,e.jsx)("span",{className:"font-mono text-xs text-ink-3/70",children:"no url"})}r(ce,"UrlSegment");function We({entry:s,onAction:n}){const a=Ie(s.state),o=s.canStart??!0;return s.state==="stopped"?(0,e.jsxs)(N,{variant:"primary",size:"xs",className:"w-13 justify-center",disabled:!o,onClick:r(()=>n("start"),"onClick"),"aria-label":"Start",title:"Start",children:[(0,e.jsx)(we,{className:"size-3"}),"Start"]}):s.state==="failed"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(N,{variant:"primary",size:"icon-xs",disabled:!o,onClick:r(()=>n("start"),"onClick"),"aria-label":"Start",title:"Start",children:(0,e.jsx)(we,{className:"size-3"})}),(0,e.jsx)(N,{variant:"ghost",size:"icon-xs",disabled:!o,onClick:r(()=>n("restart"),"onClick"),"aria-label":"Restart",title:"Restart",className:"border",children:(0,e.jsx)(De,{className:"size-3"})})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(N,{variant:"ghost",size:"icon-xs",disabled:a,onClick:r(()=>n("stop"),"onClick"),"aria-label":"Stop",title:"Stop",className:"border",children:(0,e.jsx)(Ls,{className:"size-3"})}),(0,e.jsx)(N,{variant:"ghost",size:"icon-xs",disabled:a||!o,onClick:r(()=>n("restart"),"onClick"),"aria-label":"Restart",title:"Restart",className:"border",children:(0,e.jsx)(De,{className:"size-3"})})]})}r(We,"ActionSlots");function rn({entry:s,onViewLogs:n}){const a=s.exposureDetail??(s.state==="failed"?s.failureDetail:null);if(!a)return null;const o=s.exposureState==="failed"||s.exposureState==="cleanup_pending";return(0,e.jsxs)("div",{className:S("flex items-center gap-1 text-xs",o?"text-bad":"text-ink-3"),children:[(0,e.jsx)("span",{children:a}),n&&s.state==="failed"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{"aria-hidden":!0,children:"·"}),(0,e.jsx)("button",{type:"button",onClick:n,className:"font-medium text-ink underline underline-offset-2 hover:text-ink/80",children:"View logs"})]}):null]})}r(rn,"ServiceDetail");function an({entry:s,onAction:n,onViewLogs:a,className:o}){const d=Xe(s);return(0,e.jsxs)("div",{className:S("flex w-full flex-col items-stretch gap-1 sm:w-auto sm:items-end",o),children:[(0,e.jsxs)("div",{className:"rounded-lg border border-line bg-bg",children:[(0,e.jsxs)("div",{className:"flex h-9 items-center pl-3 pr-1.5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 sm:min-w-24",children:[(0,e.jsx)(Se,{entry:s}),(0,e.jsx)("span",{className:"whitespace-nowrap text-xs font-medium text-ink",children:d.label})]}),(0,e.jsx)("div",{className:"mx-3 hidden h-5 w-px bg-line sm:block"}),(0,e.jsx)("div",{className:"hidden w-56 min-w-0 shrink-0 items-center gap-0.5 sm:flex",children:(0,e.jsx)(ce,{entry:s})}),(0,e.jsx)("div",{className:"mx-3 hidden h-5 w-px bg-line sm:block"}),(0,e.jsx)("div",{className:"ml-auto flex items-center gap-1 pl-3 sm:pl-0",children:(0,e.jsx)(We,{entry:s,onAction:r(c=>n(c,s.key),"onAction")})})]}),(0,e.jsx)("div",{className:"flex h-8 items-center justify-between gap-0.5 border-t border-line px-3 sm:hidden",children:(0,e.jsx)(ce,{entry:s,compact:!0})})]}),(0,e.jsx)(rn,{entry:s,onViewLogs:a})]})}r(an,"SingleServiceBar");function on({entry:s,onAction:n}){const a=Xe(s),o=Ge(s.url),d=s.state==="running"&&!!s.url,c=s.exposureState==="failed"||s.exposureState==="cleanup_pending",u=s.exposureDetail?s.exposureDetail:d?o:s.state==="starting"&&s.port?`starting on :${s.port}…`:s.state==="failed"&&s.failureDetail?s.failureDetail:`${a.label.toLowerCase().replace(/…$/,"")}${s.port?` · :${s.port}`:""}`;return(0,e.jsxs)("div",{className:"flex items-center gap-3 py-2.5",children:[(0,e.jsx)(Se,{entry:s,className:"mt-0.5"}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("div",{className:"truncate text-sm font-medium text-ink",children:s.name}),(0,e.jsx)("div",{className:"flex min-w-0 items-center gap-0.5",children:d&&s.url?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("a",{href:s.url,target:"_blank",rel:"noreferrer",title:s.url,className:"min-w-0 truncate font-mono text-xs text-ink-3 hover:text-ink hover:underline",children:o}),(0,e.jsx)(Ze,{url:s.url})]}):(0,e.jsx)("span",{className:S("min-w-0 text-xs",c?"whitespace-normal break-words text-bad":"truncate text-ink-3"),children:u})})]}),(0,e.jsx)("div",{className:"flex shrink-0 items-center gap-1",children:(0,e.jsx)(We,{entry:s,onAction:r(v=>n(v,s.key),"onAction")})})]})}r(on,"ServicePopoverRow");function ln({services:s,onAction:n,onManageServices:a,defaultServicesOpen:o,className:d}){const[c,u]=(0,h.useState)(o??!1),v=s.filter(f=>f.state==="running").length,k=s.some(f=>Ie(f.state)),y=s.some(f=>f.state==="failed"),m=v>0,p=s.find(f=>f.state==="running"&&f.url)??null,_={key:"__all__",name:"All services",state:k?"starting":y?"failed":m?"running":"stopped",healthStatus:s.some(f=>f.state==="running"&&f.healthStatus==="unhealthy")?"unhealthy":"healthy"};return(0,e.jsx)("div",{className:S("flex w-full flex-col items-stretch gap-1 sm:w-auto sm:items-end",d),children:(0,e.jsxs)("div",{className:"rounded-lg border border-line bg-bg",children:[(0,e.jsxs)("div",{className:"flex h-9 items-center pl-3 pr-1.5",children:[(0,e.jsxs)(Es,{open:c,onOpenChange:u,children:[(0,e.jsx)(Ps,{asChild:!0,children:(0,e.jsxs)("button",{type:"button",className:"flex h-full items-center gap-2 rounded-l-lg pr-1 text-xs font-medium text-ink hover:bg-bg-3","aria-label":`${v} of ${s.length} services running — show services`,children:[(0,e.jsx)(Se,{entry:_}),(0,e.jsxs)("span",{className:"whitespace-nowrap",children:[v,"/",s.length," running"]}),(0,e.jsx)(Ts,{className:"size-3 text-ink-3"})]})}),(0,e.jsxs)(_s,{align:"end",className:"w-96 p-0",onOpenAutoFocus:r(f=>f.preventDefault(),"onOpenAutoFocus"),children:[(0,e.jsxs)("div",{className:"px-4 pb-1 pt-3 text-xs font-medium uppercase tracking-wide text-ink-3",children:["Services · ",s.length]}),(0,e.jsx)("div",{className:"divide-y divide-line px-4",children:s.map(f=>(0,e.jsx)(on,{entry:f,onAction:n},f.key))}),(0,e.jsxs)("div",{className:"flex items-center gap-1 border-t border-line px-4 py-2",children:[(0,e.jsx)(N,{variant:"ghost",size:"xs",onClick:r(()=>n("start",null),"onClick"),children:"Start all"}),(0,e.jsx)(N,{variant:"ghost",size:"xs",onClick:r(()=>n("stop",null),"onClick"),children:"Stop all"}),(0,e.jsx)(N,{variant:"ghost",size:"xs",onClick:r(()=>n("restart",null),"onClick"),children:"Restart all"}),a?(0,e.jsx)(N,{variant:"link",size:"xs",className:"ml-auto",onClick:a,children:"Manage in Services tab →"}):null]})]})]}),(0,e.jsx)("div",{className:"mx-3 hidden h-5 w-px bg-line sm:block"}),(0,e.jsx)("div",{className:"hidden min-w-0 items-center gap-0.5 sm:flex",children:p?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{className:"mr-1 shrink-0 text-xs text-ink-3",children:p.name}),(0,e.jsx)(ce,{entry:p})]}):(0,e.jsx)("span",{className:"font-mono text-xs text-ink-3/70",children:"no url"})}),(0,e.jsx)("div",{className:"mx-3 hidden h-5 w-px bg-line sm:block"}),(0,e.jsx)("div",{className:"ml-auto flex items-center gap-1 pl-3 sm:pl-0",children:(0,e.jsx)(We,{entry:{state:_.state,canStart:!0},onAction:r(f=>n(f,null),"onAction")})})]}),p?(0,e.jsx)("div",{className:"flex h-8 items-center justify-between gap-0.5 border-t border-line px-3 sm:hidden",children:(0,e.jsx)(ce,{entry:p,compact:!0})}):null]})})}r(ln,"MultiServiceBar");function cn({services:s,onAction:n,onViewLogs:a,onManageServices:o,defaultServicesOpen:d,className:c}){return s.length===0?null:s.length===1?(0,e.jsx)(an,{entry:s[0],onAction:n,onViewLogs:a,className:c}):(0,e.jsx)(ln,{services:s,onAction:n,onManageServices:o,defaultServicesOpen:d,className:c})}r(cn,"WorkspaceServiceControlBar");var ze=new Set([fs]);function Ye(s){const n=new Set;for(const a of s.variables)ze.has(a.name)&&n.add(a.name);for(const a of gs([s.title,s.description]))ze.has(a)&&n.add(a);return[...n]}r(Ye,"getWorkspaceSpecificRoutineVariableNames");function dn(s){return Ye(s).length>0}r(dn,"routineHasWorkspaceSpecificVariables");function un(s){return[...s].sort((n,a)=>{const o=n.title.localeCompare(a.title,void 0,{sensitivity:"base"});return o!==0?o:n.id.localeCompare(a.id)})}r(un,"sortWorkspaceRoutinesByName");var mn=100,pn=[{value:"issues",label:"Tasks",order:10},{value:"services",label:"Services",order:20},{value:"configuration",label:"Configuration",order:30},{value:"runtime_logs",label:"Runtime logs",order:40},{value:"routines",label:"Routines",order:60}];function J(s){return typeof s=="string"&&s.startsWith("plugin:")}r(J,"isExecutionWorkspacePluginTab");function xn(s){return s.map((n,a)=>({item:n,index:a})).sort((n,a)=>n.item.order-a.item.order||n.index-a.index).map(({item:n})=>n)}r(xn,"orderExecutionWorkspaceTabItems");function hn(s,n){const a=s.split("/").filter(Boolean),o=a.indexOf("execution-workspaces");if(o===-1||a[o+1]!==n)return null;const d=a[o+2];return d==="services"?"services":d==="issues"?"issues":d==="routines"?"routines":d==="runtime-logs"?"runtime_logs":d==="configuration"?"configuration":null}r(hn,"resolveExecutionWorkspaceTab");function ie(s,n){return`/execution-workspaces/${s}/${n==="runtime_logs"?"runtime-logs":n}`}r(ie,"executionWorkspaceTabPath");function be({workspaceId:s}){return(0,h.useEffect)(()=>{try{localStorage.removeItem(`wardmote:execution-workspace-tab:${s}`)}catch{}},[s]),(0,e.jsx)(Ss,{to:ie(s,"issues"),replace:!0})}r(be,"LegacyWorkspaceTabRedirect");function fn(s){if(!s)return!1;try{const n=new URL(s);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}}r(fn,"isSafeExternalUrl");function T(s){return s??""}r(T,"readText");function Ne(s){return!s||Object.keys(s).length===0?"":JSON.stringify(s,null,2)}r(Ne,"formatJson");function gn(s){return s?L(s):"Never"}r(gn,"formatOptionalDateTime");function oe(s){const n=s.trim();return n.length>0?n:null}r(oe,"normalizeText");function de(s){const n=s.trim();if(!n)return{ok:!0,value:null};try{const a=JSON.parse(n);return!a||typeof a!="object"||Array.isArray(a)?{ok:!1,error:"Workspace commands JSON must be a JSON object."}:{ok:!0,value:a}}catch(a){return{ok:!1,error:a instanceof Error?a.message:"Invalid JSON."}}}r(de,"parseWorkspaceRuntimeJson");function es(s){if(!s)return[];const n=[],a=r((o,d,c)=>{Array.isArray(d)&&d.forEach((u,v)=>{if(!u||typeof u!="object"||Array.isArray(u))return;const k=u;if(c&&k.kind!=="service")return;const y=k.port,m=!!(y&&typeof y=="object"&&!Array.isArray(y)&&Object.hasOwn(y,"value")),p=typeof y=="number"?y:m?y.value:null;n.push({collection:o,index:v,name:typeof k.name=="string"&&k.name.trim()?k.name:`Service ${v+1}`,port:typeof p=="number"?p:null,invalidPort:(typeof y=="number"||m)&&(typeof p!="number"||!Number.isInteger(p)||p<1||p>65535)})})},"addServices");return a("commands",s.commands,!0),a("services",s.services,!1),n}r(es,"readConfiguredRuntimeServicePorts");function jn(s){const n=structuredClone(s.runtimeConfig),a=n[s.service.collection];if(!Array.isArray(a))return n;const o=a[s.service.index];if(!o||typeof o!="object"||Array.isArray(o))return n;const d=o,c=d.port&&typeof d.port=="object"&&!Array.isArray(d.port)?d.port:null,u=s.port.trim();if(!u){if(c){const k={...c,type:"auto"};delete k.value,d.port=k}else delete d.port;return n}const v=Number(u);return!Number.isInteger(v)||v<1||v>65535||(d.port={...c,type:"fixed",value:v}),n}r(jn,"updateConfiguredRuntimeServicePort");function vn(s){const n=new Map;for(const a of s){if(a.invalidPort||!a.port)continue;const o=n.get(a.port)??[];o.push(a),n.set(a.port,o)}return Array.from(n.entries()).filter(([,a])=>a.length>1).map(([a,o])=>`Port ${a} is assigned to multiple services: ${o.map(d=>d.name).join(", ")}.`)}r(vn,"getConfiguredRuntimeServicePortWarnings");function Qe(s){return{name:s.name,cwd:T(s.cwd),repoUrl:T(s.repoUrl),baseRef:T(s.baseRef),branchName:T(s.branchName),providerRef:T(s.providerRef),provisionCommand:T(s.config?.provisionCommand),runtimeProvisionCommand:T(s.config?.runtimeProvisionCommand),teardownCommand:T(s.config?.teardownCommand),cleanupCommand:T(s.config?.cleanupCommand),inheritRuntime:!s.config?.workspaceRuntime,workspaceRuntime:Ne(s.config?.workspaceRuntime)}}r(Qe,"formStateFromWorkspace");function bn(s,n){const a={},o={},d=r(u=>{s[u]!==n[u]&&(a[u]=u==="name"?oe(n[u])??s.name:oe(n[u]))},"maybeAssign");d("name"),d("cwd"),d("repoUrl"),d("baseRef"),d("branchName"),d("providerRef");const c=r(u=>{s[u]!==n[u]&&(o[u]=oe(n[u]))},"maybeAssignConfigText");if(c("provisionCommand"),c("runtimeProvisionCommand"),c("teardownCommand"),c("cleanupCommand"),s.inheritRuntime!==n.inheritRuntime||s.workspaceRuntime!==n.workspaceRuntime){const u=de(n.workspaceRuntime);if(!u.ok)throw new Error(u.error);o.workspaceRuntime=n.inheritRuntime?null:u.value}return Object.keys(o).length>0&&(a.config=o),a}r(bn,"buildWorkspacePatch");function kn(s){const n=oe(s.repoUrl);if(n)try{new URL(n)}catch{return"Repo URL must be a valid URL."}if(!s.inheritRuntime){const a=de(s.workspaceRuntime);if(!a.ok)return a.error;const o=es(a.value).find(d=>d.invalidPort);if(o)return`${o.name} has an invalid fixed port.`}return null}r(kn,"validateForm");function I({label:s,hint:n,children:a}){return(0,e.jsxs)("label",{className:"block space-y-2",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-0.5 sm:flex-row sm:items-baseline sm:justify-between sm:gap-3",children:[(0,e.jsx)("span",{className:"text-sm font-medium text-ink",children:s}),n?(0,e.jsx)("span",{className:"text-xs text-ink-3 sm:text-right",children:n}):null]}),a]})}r(I,"Field");function yn(s){switch(s){case"worktree_prepare":return"Worktree setup";case"workspace_config_freshness":return"Config freshness";case"workspace_provision":return"Provision";case"workspace_seed":return"Database seed";case"workspace_runtime_provision":return"Runtime provision";case"workspace_teardown":return"Teardown";case"worktree_cleanup":return"Worktree cleanup";case"workspace_finalize":return"Finalize";default:return s}}r(yn,"workspaceOperationPhaseLabel");function wn(s){const n=(s.operations??[]).find(a=>a.phase==="workspace_seed"||a.phase==="workspace_runtime_provision")??null;if(n){const a=n.finishedAt??n.startedAt??null;if(n.status==="running")return{kind:"provisioning",at:a};if(n.status==="succeeded")return{kind:"provisioned",at:a};if(n.status==="failed")return{kind:"failed",at:a}}return s.runtimeProvisionCommand&&s.runtimeProvisionCommand.trim()?{kind:"deferred"}:{kind:"eager"}}r(wn,"resolveRuntimeProvisionStatus");function C({label:s,children:n}){return(0,e.jsxs)("div",{className:"flex flex-col gap-1.5 py-1.5 sm:flex-row sm:items-start sm:gap-3",children:[(0,e.jsx)("div",{className:"shrink-0 text-xs text-ink-3 sm:w-32",children:s}),(0,e.jsx)("div",{className:"min-w-0 flex-1 text-sm",children:n})]})}r(C,"DetailRow");function Z({children:s,className:n}){return(0,e.jsx)("div",{className:S("inline-flex items-center rounded-full border border-line bg-bg px-2.5 py-1 text-xs text-ink-3",n),children:s})}r(Z,"StatusPill");function Nn({status:s,onViewLogs:n}){return s.kind==="eager"?(0,e.jsx)("span",{className:"text-sm text-ink-3",children:"Eager · provisioned during workspace setup"}):s.kind==="deferred"?(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsx)(Z,{className:"border-amber-500/40 text-amber-600 dark:text-amber-400",children:"Deferred"}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:"Runs once before the first runtime-service start."})]}):s.kind==="provisioning"?(0,e.jsxs)(Z,{className:"border-line text-ink-3",children:[(0,e.jsx)(ue,{className:"mr-1.5 h-3 w-3 animate-spin"}),"Provisioning…"]}):s.kind==="provisioned"?(0,e.jsxs)(Z,{className:"border-emerald-500/40 text-emerald-600 dark:text-emerald-400",children:["Provisioned",s.at?` · ${L(s.at)}`:""]}):(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsxs)(Z,{className:"border-bad/50 text-bad",children:["Provisioning failed",s.at?` · ${L(s.at)}`:""]}),(0,e.jsx)("button",{type:"button",onClick:n,className:"self-start text-xs text-ink-3 underline underline-offset-2 hover:text-ink",children:"View runtime logs"})]})}r(Nn,"RuntimeProvisionStatusValue");function W({value:s,copy:n}){return(0,e.jsxs)("div",{className:"inline-flex max-w-full items-start gap-2",children:[(0,e.jsx)("span",{className:"break-all font-mono text-xs",children:s}),n?(0,e.jsx)(He,{text:s,className:"shrink-0 text-ink-3 hover:text-ink",copiedLabel:"Copied",children:(0,e.jsx)(Ce,{className:"h-3.5 w-3.5"})}):null]})}r(W,"MonoValue");function Rn({project:s,workspace:n}){return(0,e.jsx)(Y,{to:hs(s,n.id),className:"hover:underline",children:n.name})}r(Rn,"WorkspaceLink");function Cn({companyId:s,workspace:n,issues:a,isLoading:o,error:d,project:c}){const u=Re(),{data:v}=P({queryKey:x.agents.list(s),queryFn:r(()=>Je.list(s),"queryFn"),enabled:!!s}),k=x.liveRuns(s),y=Us({companyId:s,resourceKey:"live-runs",queryKey:k,enabled:!!s,refetchInterval:!1,leaderOnly:!0}),{data:m,dataUpdatedAt:p}=P({queryKey:k,queryFn:r(()=>Os.liveRunsForCompany(s),"queryFn"),enabled:y.enabled,refetchInterval:y.refetchInterval});Bs(y,m,p);const _=(0,h.useMemo)(()=>Js(m,a),[a,m]),f=le({mutationFn:r(({id:q,data:F})=>ke.update(q,F),"mutationFn"),onSuccess:r(()=>{u.invalidateQueries({queryKey:x.issues.listByExecutionWorkspace(s,n.id)}),u.invalidateQueries({queryKey:x.issues.list(s)}),c?.id&&u.invalidateQueries({queryKey:x.issues.listByProject(s,c.id)})},"onSuccess")}),b=(0,h.useMemo)(()=>c?[{id:c.id,name:c.name,workspaces:c.workspaces??[]}]:void 0,[c]),g=(0,h.useMemo)(()=>({projectId:n.projectId,...n.projectWorkspaceId?{projectWorkspaceId:n.projectWorkspaceId}:{},executionWorkspaceId:n.id,executionWorkspaceMode:"reuse_existing"}),[n.id,n.projectId,n.projectWorkspaceId]);return(0,e.jsx)(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)(G,{children:[(0,e.jsx)(X,{children:"Workspace routines"}),(0,e.jsx)(H,{children:"Routines that use workspace-specific variables can be run against this execution workspace."})]}),(0,e.jsx)(B,{children:y?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Loading routines..."}):m?(0,e.jsx)("p",{className:"text-sm text-bad",children:m instanceof Error?m.message:"Failed to load routines."}):_.length===0?(0,e.jsxs)("div",{className:"flex flex-col items-center gap-2 py-10 text-center",children:[(0,e.jsx)(Fs,{className:"h-5 w-5 text-ink-3"}),(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No routines use workspace-specific variables yet."})]}):(0,e.jsx)("div",{className:"rounded-lg border border-line",children:_.map(b=>(0,e.jsx)(In,{routine:b,variableNames:Ye(b),runningRoutineId:u,onRunNow:c},b.id))})})]}),(0,e.jsx)(nn,{open:d!==null,onOpenChange:r(b=>{b||c(null)},"onOpenChange"),companyId:s.companyId,routineName:d?.title??null,agents:p??[],projects:n?[n]:[],defaultProjectId:s.projectId,defaultAssigneeAgentId:d?.assigneeAgentId??null,defaultExecutionWorkspace:s,variables:d?.variables??[],isPending:f.isPending,onSubmit:r(b=>{d&&f.mutate({id:d.id,data:b})},"onSubmit")})]})}r(Sn,"ExecutionWorkspaceRoutinesList");function xt(){const{visible:s,loaded:n}=Hs(),{workspaceId:a}=ks(),o=bs(),d=Is(),c=Re(),{setBreadcrumbs:u}=Qs(),{selectedCompanyId:v,setSelectedCompanyId:k}=Cs(),{hideHostPaths:y}=Zs(),[m,p]=(0,h.useState)(null),[_,f]=(0,h.useState)(!1),[b,g]=(0,h.useState)(null),[q,F]=(0,h.useState)(null),[Pe,me]=(0,h.useState)(null),[ss,pe]=(0,h.useState)([]),ns=a?hn(o.pathname,a):null,ts=(0,h.useMemo)(()=>{const t=new URLSearchParams(o.search).get("tab");return J(t)?t:null},[o.search]),R=ns??ts,D=P({queryKey:x.executionWorkspaces.detail(a),queryFn:r(()=>V.get(a),"queryFn"),enabled:!!a}),i=D.data??null,j=P({queryKey:i?[...x.projects.detail(i.projectId),i.companyId]:["projects","detail","__pending__"],queryFn:r(()=>Ks.get(i.projectId,i.companyId),"queryFn"),enabled:!!i?.projectId}).data??null,E=P({queryKey:i?.sourceIssueId?x.issues.detail(i.sourceIssueId):["issues","detail","__none__"],queryFn:r(()=>ke.get(i.sourceIssueId),"queryFn"),enabled:!!i?.sourceIssueId}).data??null,xe=P({queryKey:i?.derivedFromExecutionWorkspaceId?x.executionWorkspaces.detail(i.derivedFromExecutionWorkspaceId):["execution-workspaces","detail","__none__"],queryFn:r(()=>V.get(i.derivedFromExecutionWorkspaceId),"queryFn"),enabled:!!i?.derivedFromExecutionWorkspaceId}).data??null,he=P({queryKey:i?x.issues.listByExecutionWorkspace(i.companyId,i.id):["issues","__execution-workspace__","__none__"],queryFn:r(()=>ke.list(i.companyId,{executionWorkspaceId:i.id}),"queryFn"),enabled:!!i?.companyId}),rs=he.data??[],ee=(0,h.useMemo)(()=>j?.workspaces.find(t=>t.id===i?.projectWorkspaceId)??null,[j,i?.projectWorkspaceId]),{slots:_e,isLoading:as,errorMessage:Ee}=Ms({slotTypes:["detailTab"],entityType:"execution_workspace",companyId:i?.companyId??null,enabled:!!i?.companyId}),fe=(0,h.useMemo)(()=>_e.map(t=>({value:`plugin:${t.pluginKey}:${t.id}`,label:t.displayName,order:t.order??mn,slot:t})),[_e]),is=(0,h.useMemo)(()=>xn([...pn.filter(t=>t.value!=="configuration"||s),...fe]),[fe,s]),O=ee?.runtimeConfig?.workspaceRuntime??null,ge=i?.config?.workspaceRuntime??O,Ae=i?.config?.workspaceRuntime?"execution_workspace":O?"project_workspace":"none",Te=(0,h.useMemo)(()=>{if(!m||m.inheritRuntime)return O;const t=de(m.workspaceRuntime);return t.ok?t.value:null},[m,O]),se=(0,h.useMemo)(()=>es(Te),[Te]),Fe=(0,h.useMemo)(()=>vn(se),[se]),M=(0,h.useMemo)(()=>i?Qe(i):null,[i]),je=!!(m&&M&&JSON.stringify(m)!==JSON.stringify(M)),ne=j?ps(j):i?.projectId??"";(0,h.useEffect)(()=>{!i?.companyId||i.companyId===v||k(i.companyId,{source:"route_sync"})},[i?.companyId,v,k]),(0,h.useEffect)(()=>{i&&(p(Qe(i)),g(null),F(null),pe([]))},[i]),(0,h.useEffect)(()=>{if(!i)return;const t=[{label:"Projects",href:"/projects"},...j?[{label:j.name,href:`/projects/${ne}`}]:[],...j?[{label:"Workspaces",href:`/projects/${ne}/workspaces`}]:[],{label:i.name}];u(t)},[u,i,j,ne]);const te=le({mutationFn:r(t=>V.update(i.id,t),"mutationFn"),onSuccess:r(t=>{c.setQueryData(x.executionWorkspaces.detail(t.id),t),c.invalidateQueries({queryKey:x.executionWorkspaces.closeReadiness(t.id)}),c.invalidateQueries({queryKey:x.executionWorkspaces.workspaceOperations(t.id)}),j&&(c.invalidateQueries({queryKey:x.projects.detail(j.id)}),c.invalidateQueries({queryKey:x.projects.detail(j.urlKey)})),E&&c.invalidateQueries({queryKey:x.issues.detail(E.id)}),g(null)},"onSuccess"),onError:r(t=>{g(t instanceof Error?t.message:"Failed to save execution workspace.")},"onError")}),A=P({queryKey:x.executionWorkspaces.workspaceOperations(a),queryFn:r(()=>V.listWorkspaceOperations(a),"queryFn"),enabled:!!a}),Le=i?.config?.runtimeProvisionCommand??j?.executionWorkspacePolicy?.workspaceStrategy?.runtimeProvisionCommand??null,os=(0,h.useMemo)(()=>wn({runtimeProvisionCommand:Le,operations:A.data}),[Le,A.data]),re=le({mutationFn:r(t=>V.controlRuntimeCommands(i.id,t.action,t),"mutationFn"),onSuccess:r((t,l)=>{c.setQueryData(x.executionWorkspaces.detail(t.workspace.id),t.workspace),c.invalidateQueries({queryKey:x.executionWorkspaces.overview(t.workspace.companyId)}),c.invalidateQueries({queryKey:x.executionWorkspaces.workspaceOperations(t.workspace.id)}),c.invalidateQueries({queryKey:x.projects.detail(t.workspace.projectId)}),F(null),me(l.action==="run"?"Workspace job completed.":l.action==="stop"?"Workspace service stopped.":l.action==="restart"?"Workspace service restarted.":"Workspace service started.")},"onSuccess"),onError:r(t=>{me(null),F(t instanceof Error?t.message:"Failed to control workspace commands.")},"onError"),onSettled:r((t,l,w)=>{pe(Q=>Q.filter(us=>us!==w))},"onSettled")});if(D.isLoading)return(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Loading workspace…"});if(D.error)return(0,e.jsx)("p",{className:"text-sm text-bad",children:D.error instanceof Error?D.error.message:"Failed to load workspace"});if(!i||!m||!M)return null;const qe=!!i.cwd,Oe=!!ge&&qe,ve=Ns({runtimeConfig:ge,runtimeServices:i.runtimeServices??[],canStartServices:Oe,canRunJobs:qe}),ls=re.isPending?re.variables??null:null,cs=ws({sections:ve,runtimeServices:i.runtimeServices??[],pendingRequests:ss}),Ue={companyId:i.companyId,projectId:i.projectId,entityId:i.id,entityType:"execution_workspace"},Be=fe.find(t=>t.value===R)??null;if(R==="configuration"&&!n)return null;if(a&&R==="configuration"&&!s)return(0,e.jsx)(be,{workspaceId:a});if(a&&R===null)return(0,e.jsx)(be,{workspaceId:a});const z=r(t=>{if(J(t)){d(`/execution-workspaces/${i.id}?tab=${encodeURIComponent(t)}`);return}d(ie(i.id,t))},"handleTabChange"),ds=r(()=>{const t=kn(m);if(t){g(t);return}let l;try{l=bn(M,m)}catch(w){g(w instanceof Error?w.message:"Failed to build workspace update.");return}Object.keys(l).length!==0&&te.mutate(l)},"saveChanges"),Ke=r(t=>{if(t.length!==0){pe(l=>[...l,...t]);for(const l of t)re.mutate(l)}},"runRuntimeControlRequests");return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-4 overflow-hidden sm:space-y-6",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,e.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-(--tracking-eyebrow) text-ink-3",children:"Execution workspace"}),(0,e.jsx)("h1",{className:"truncate text-xl font-semibold sm:text-2xl",children:i.name})]}),(0,e.jsx)(cn,{services:cs,onAction:r((t,l)=>{Ke(ys(ve,t,l))},"onAction"),onViewLogs:r(()=>z("runtime_logs"),"onViewLogs"),onManageServices:r(()=>z("services"),"onManageServices")})]}),q?(0,e.jsx)("p",{className:"text-sm text-bad",children:q}):null,!q&&Pe?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:Pe}):null,(0,e.jsx)(Ds,{slotTypes:["toolbarButton","contextMenuItem"],entityType:"execution_workspace",context:Ue,className:"flex flex-wrap gap-2",itemClassName:"inline-flex",missingBehavior:"placeholder"}),(0,e.jsx)(Ws,{value:R??"issues",onValueChange:r(t=>z(t),"onValueChange"),children:(0,e.jsx)(Xs,{items:is.map(t=>({value:t.value,label:t.label})),align:"start",value:R??"issues",onValueChange:r(t=>z(t),"onValueChange")})}),R==="services"?(0,e.jsx)(Rs,{sections:ve,isPending:re.isPending,pendingRequest:ls,serviceEmptyMessage:ge?"No services have been started for this execution workspace yet.":"No workspace command config is defined for this execution workspace yet.",jobEmptyMessage:"No one-shot jobs are configured for this execution workspace yet.",disabledHint:Oe?null:"Execution workspaces need a working directory before local commands can run, and services also need runtime config.",onAction:r(t=>Ke([t]),"onAction")}):R==="configuration"?(0,e.jsxs)("div",{className:"space-y-4 sm:space-y-6",children:[(0,e.jsxs)(K,{className:"rounded-none",children:[(0,e.jsxs)(G,{children:[(0,e.jsx)(X,{children:"Workspace settings"}),(0,e.jsx)(H,{children:"Edit the concrete path, repo, branch, provisioning, teardown, and runtime overrides attached to this execution workspace. Saved changes affect future runs; Wardmote may refresh or replace a reused workspace when config changes."}),(0,e.jsx)(Vs,{children:(0,e.jsx)(N,{variant:"danger",size:"sm",className:"w-full sm:w-auto",onClick:r(()=>f(!0),"onClick"),disabled:i.status==="archived",children:i.status==="cleanup_failed"?"Retry close":"Close workspace"})})]}),(0,e.jsxs)(B,{children:[(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-widest text-ink-3",children:"General"}),(0,e.jsx)(I,{label:"Workspace name",children:(0,e.jsx)(U,{value:m.name,onChange:r(t=>p(l=>l&&{...l,name:t.target.value}),"onChange"),placeholder:"Execution workspace name"})})]}),(0,e.jsx)(ae,{}),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-widest text-ink-3",children:"Source control"}),(0,e.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,e.jsx)(I,{label:"Branch name",hint:"Useful for isolated worktrees",children:(0,e.jsx)(U,{className:"font-mono",value:m.branchName,onChange:r(t=>p(l=>l&&{...l,branchName:t.target.value}),"onChange"),placeholder:"PAP-946-workspace"})}),(0,e.jsx)(I,{label:"Base ref",children:(0,e.jsx)(U,{className:"font-mono",value:m.baseRef,onChange:r(t=>p(l=>l&&{...l,baseRef:t.target.value}),"onChange"),placeholder:"origin/main"})})]}),(0,e.jsx)(I,{label:"Repo URL",children:(0,e.jsx)(U,{value:m.repoUrl,onChange:r(t=>p(l=>l&&{...l,repoUrl:t.target.value}),"onChange"),placeholder:"https://github.com/org/repo"})})]}),(0,e.jsx)(ae,{}),!y&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-widest text-ink-3",children:"Paths"}),(0,e.jsx)(I,{label:"Working directory",children:(0,e.jsx)(U,{className:"font-mono",value:m.cwd,onChange:r(t=>p(l=>l&&{...l,cwd:t.target.value}),"onChange"),placeholder:"/absolute/path/to/workspace"})}),(0,e.jsx)(I,{label:"Provider path / ref",children:(0,e.jsx)(U,{className:"font-mono",value:m.providerRef,onChange:r(t=>p(l=>l&&{...l,providerRef:t.target.value}),"onChange"),placeholder:"/path/to/worktree or provider ref"})})]}),(0,e.jsx)(ae,{})]}),!y&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-widest text-ink-3",children:"Lifecycle commands"}),(0,e.jsx)(I,{label:"Provision command",hint:"Runs when Wardmote prepares this execution workspace",children:(0,e.jsx)($,{className:"min-h-20 font-mono",value:m.provisionCommand,onChange:r(t=>p(l=>l&&{...l,provisionCommand:t.target.value}),"onChange"),placeholder:"bash ./scripts/provision-worktree.sh"})}),(0,e.jsx)(I,{label:"Runtime provision command",hint:"Runs once before the first runtime-service start. Leave empty to keep eager provisioning.",children:(0,e.jsx)($,{className:"min-h-20 font-mono",value:m.runtimeProvisionCommand,onChange:r(t=>p(l=>l&&{...l,runtimeProvisionCommand:t.target.value}),"onChange"),placeholder:"bash ./scripts/provision-worktree-runtime.sh"})}),(0,e.jsx)(I,{label:"Teardown command",hint:"Runs when the execution workspace is archived or cleaned up",children:(0,e.jsx)($,{className:"min-h-20 font-mono",value:m.teardownCommand,onChange:r(t=>p(l=>l&&{...l,teardownCommand:t.target.value}),"onChange"),placeholder:"bash ./scripts/teardown-worktree.sh"})}),(0,e.jsx)(I,{label:"Cleanup command",hint:"Workspace-specific cleanup before teardown",children:(0,e.jsx)($,{className:"min-h-16 font-mono",value:m.cleanupCommand,onChange:r(t=>p(l=>l&&{...l,cleanupCommand:t.target.value}),"onChange"),placeholder:"pkill -f vite || true"})})]}),(0,e.jsx)(ae,{})]}),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-widest text-ink-3",children:"Runtime config"}),(0,e.jsx)("div",{className:"rounded-md border border-dashed border-line/70 bg-bg px-4 py-3",children:(0,e.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("div",{className:"text-sm font-medium text-ink",children:"Runtime config source"}),(0,e.jsx)("p",{className:"text-sm text-ink-3",children:Ae==="execution_workspace"?"This execution workspace currently overrides the project workspace runtime config.":Ae==="project_workspace"?"This execution workspace is inheriting the project workspace runtime config.":"No runtime config is currently defined on this execution workspace or its project workspace."})]}),(0,e.jsx)(N,{variant:"secondary",className:"w-full sm:w-auto",size:"sm",disabled:!ee?.runtimeConfig?.workspaceRuntime,onClick:r(()=>p(t=>t&&{...t,inheritRuntime:!0,workspaceRuntime:""}),"onClick"),children:"Reset to inherit"})]})}),(0,e.jsxs)("details",{className:"rounded-md border border-dashed border-line/70 bg-bg px-4 py-3",children:[(0,e.jsx)("summary",{className:"cursor-pointer text-sm font-medium",children:"Advanced runtime JSON"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Override the inherited workspace command model only when this execution workspace truly needs different service or job behavior."}),(0,e.jsx)("div",{className:"mt-3",children:(0,e.jsxs)(I,{label:"Workspace commands JSON",hint:"Legacy `services` arrays still work, but `commands` supports both services and jobs.",children:[(0,e.jsxs)("div",{className:"mb-2 flex items-center gap-2 text-sm text-ink-3",children:[(0,e.jsx)("input",{id:"inherit-runtime-config",type:"checkbox",className:"rounded border-line",checked:m.inheritRuntime,onChange:r(t=>{const l=t.target.checked;p(w=>w&&(!l&&!w.workspaceRuntime.trim()&&O?{...w,inheritRuntime:l,workspaceRuntime:Ne(O)}:{...w,inheritRuntime:l}))},"onChange")}),(0,e.jsx)("label",{htmlFor:"inherit-runtime-config",children:"Inherit project workspace runtime config"})]}),(0,e.jsx)($,{className:"min-h-64 font-mono sm:min-h-96",value:m.workspaceRuntime,onChange:r(t=>p(l=>l&&{...l,workspaceRuntime:t.target.value}),"onChange"),disabled:m.inheritRuntime,placeholder:`{
|
|
2
|
+
"commands": [
|
|
3
|
+
{
|
|
4
|
+
"id": "web",
|
|
5
|
+
"name": "web",
|
|
6
|
+
"kind": "service",
|
|
7
|
+
"command": "pnpm dev",
|
|
8
|
+
"cwd": ".",
|
|
9
|
+
"port": { "type": "auto" }
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "db-migrate",
|
|
13
|
+
"name": "db:migrate",
|
|
14
|
+
"kind": "job",
|
|
15
|
+
"command": "pnpm db:migrate",
|
|
16
|
+
"cwd": "."
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}`})]})})]}),se.length>0?(0,e.jsxs)("div",{className:"space-y-3 rounded-md border border-line bg-bg-3/20 p-4",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-medium",children:"Service ports"}),(0,e.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Set a fixed port for a service or leave it blank to use its configured automatic behavior. Editing an inherited service creates an execution-workspace runtime override."})]}),(0,e.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:se.map(t=>(0,e.jsx)(I,{label:t.name,hint:"Fixed port",children:(0,e.jsx)(U,{type:"number",min:"1",max:"65535",inputMode:"numeric",value:t.port??"",onChange:r(l=>{p(w=>{if(!w)return w;const Q=w.inheritRuntime?{ok:!0,value:O}:de(w.workspaceRuntime);return!Q.ok||!Q.value?w:{...w,inheritRuntime:!1,workspaceRuntime:Ne(jn({runtimeConfig:Q.value,service:t,port:l.target.value}))}})},"onChange")})},`${t.collection}-${t.index}`))}),Fe.length>0?(0,e.jsx)("div",{className:"rounded-md border border-bad/40 bg-bad/10 px-3 py-2 text-sm text-bad",children:Fe.map(t=>(0,e.jsx)("p",{children:t},t))}):null,(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Wardmote checks fixed ports again when a service starts and rejects cross-workspace conflicts."})]}):null]})]}),(0,e.jsxs)("div",{className:"mt-6 flex flex-col items-stretch gap-3 sm:flex-row sm:flex-wrap sm:items-center",children:[(0,e.jsxs)(N,{className:"w-full sm:w-auto",disabled:!je||te.isPending,onClick:ds,children:[te.isPending?(0,e.jsx)(ue,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Save changes"]}),(0,e.jsx)(N,{variant:"secondary",className:"w-full sm:w-auto",disabled:!je||te.isPending,onClick:r(()=>{p(M),g(null),F(null),me(null)},"onClick"),children:"Reset"}),b?(0,e.jsx)("p",{className:"text-sm text-bad",children:b}):null,!b&&!je?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No unsaved changes."}):null]})]})]}),(0,e.jsxs)(K,{className:"rounded-none",children:[(0,e.jsxs)(G,{children:[(0,e.jsx)(X,{children:"Workspace context"}),(0,e.jsx)(H,{children:"Linked objects and relationships"})]}),(0,e.jsxs)(B,{children:[(0,e.jsx)(C,{label:"Project",children:j?(0,e.jsx)(Y,{to:`/projects/${ne}`,className:"hover:underline",children:j.name}):(0,e.jsx)(W,{value:i.projectId})}),(0,e.jsx)(C,{label:"Project workspace",children:j&&ee?(0,e.jsx)(Rn,{project:j,workspace:ee}):i.projectWorkspaceId?(0,e.jsx)(W,{value:i.projectWorkspaceId}):"None"}),(0,e.jsx)(C,{label:"Source task",children:E?(0,e.jsxs)(Y,{to:xs(E),className:"hover:underline",children:[E.identifier??E.id," · ",E.title]}):i.sourceIssueId?(0,e.jsx)(W,{value:i.sourceIssueId}):"None"}),(0,e.jsx)(C,{label:"Derived from",children:xe?(0,e.jsx)(Y,{to:ie(xe.id,s?"configuration":"issues"),className:"hover:underline",children:xe.name}):i.derivedFromExecutionWorkspaceId?(0,e.jsx)(W,{value:i.derivedFromExecutionWorkspaceId}):"None"}),(0,e.jsx)(C,{label:"Runtime provisioning",children:(0,e.jsx)(Nn,{status:os,onViewLogs:r(()=>z("runtime_logs"),"onViewLogs")})}),(0,e.jsx)(C,{label:"Workspace ID",children:(0,e.jsx)(W,{value:i.id})})]})]}),(0,e.jsxs)(K,{className:"rounded-none",children:[(0,e.jsxs)(G,{children:[(0,e.jsx)(X,{children:"Concrete location"}),(0,e.jsx)(H,{children:"Paths and refs"})]}),(0,e.jsxs)(B,{children:[(0,e.jsx)(C,{label:"Working dir",children:i.cwd?(0,e.jsx)(W,{value:i.cwd,copy:!0}):"None"}),(0,e.jsx)(C,{label:"Provider ref",children:i.providerRef?(0,e.jsx)(W,{value:i.providerRef,copy:!0}):"None"}),(0,e.jsx)(C,{label:"Repo URL",children:i.repoUrl&&fn(i.repoUrl)?(0,e.jsxs)("div",{className:"inline-flex max-w-full items-start gap-2",children:[(0,e.jsxs)("a",{href:i.repoUrl,target:"_blank",rel:"noreferrer",className:"inline-flex min-w-0 items-center gap-1 break-all hover:underline",children:[i.repoUrl,(0,e.jsx)(ye,{className:"h-3.5 w-3.5 shrink-0"})]}),(0,e.jsx)(He,{text:i.repoUrl,className:"shrink-0 text-ink-3 hover:text-ink",copiedLabel:"Copied",children:(0,e.jsx)(Ce,{className:"h-3.5 w-3.5"})})]}):i.repoUrl?(0,e.jsx)(W,{value:i.repoUrl,copy:!0}):"None"}),(0,e.jsx)(C,{label:"Base ref",children:i.baseRef?(0,e.jsx)(W,{value:i.baseRef,copy:!0}):"None"}),(0,e.jsx)(C,{label:"Branch",children:i.branchName?(0,e.jsx)(W,{value:i.branchName,copy:!0}):"None"}),(0,e.jsx)(C,{label:"Opened",children:L(i.openedAt)}),(0,e.jsx)(C,{label:"Last used",children:L(i.lastUsedAt)}),(0,e.jsx)(C,{label:"Cleanup",children:i.cleanupEligibleAt?`${L(i.cleanupEligibleAt)}${i.cleanupReason?` · ${i.cleanupReason}`:""}`:"Not scheduled"})]})]})]}):R==="runtime_logs"?(0,e.jsxs)(K,{className:"rounded-none",children:[(0,e.jsxs)(G,{children:[(0,e.jsx)(X,{children:"Runtime and cleanup logs"}),(0,e.jsx)(H,{children:"Recent operations"})]}),(0,e.jsx)(B,{children:A.isLoading?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Loading workspace operations…"}):A.error?(0,e.jsx)("p",{className:"text-sm text-bad",children:A.error instanceof Error?A.error.message:"Failed to load workspace operations."}):A.data&&A.data.length>0?(0,e.jsx)("div",{className:"space-y-3",children:A.data.map(t=>(0,e.jsx)("div",{className:"rounded-none border border-line/80 bg-bg px-4 py-3",children:(0,e.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("div",{className:"text-sm font-medium",children:t.command??yn(t.phase)}),(0,e.jsxs)("div",{className:"text-xs text-ink-3",children:[L(t.startedAt),t.finishedAt?` → ${L(t.finishedAt)}`:""]}),t.stderrExcerpt?(0,e.jsx)("div",{className:"whitespace-pre-wrap break-words text-xs text-bad",children:t.stderrExcerpt}):t.stdoutExcerpt?(0,e.jsx)("div",{className:"whitespace-pre-wrap break-words text-xs text-ink-3",children:t.stdoutExcerpt}):null]}),(0,e.jsx)(Z,{className:"self-start",children:t.status})]})},t.id))}):(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No workspace operations have been recorded yet."})})]}):R==="issues"?(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsx)(en,{companyId:i.companyId,scopeKind:"execution_workspace",scopeId:i.id,title:"Workspace summary",description:"Summarizer keeps the latest workspace status, next step, and operator-needed items here."}),(0,e.jsx)(Cn,{companyId:i.companyId,workspace:i,issues:rs,isLoading:he.isLoading,error:he.error,project:j})]}):Be?(0,e.jsx)(zs,{slot:Be.slot,context:Ue,missingBehavior:"placeholder"}):J(R)&&as?(0,e.jsx)(K,{children:(0,e.jsx)(B,{className:"py-6 text-sm text-ink-3",children:"Loading workspace plugin..."})}):J(R)&&Ee?(0,e.jsx)(K,{children:(0,e.jsx)(B,{className:"py-6 text-sm text-bad",children:Ee})}):J(R)?(0,e.jsx)(sn,{defaultTabHref:ie(i.id,"issues"),defaultTabLabel:"Back to tasks"}):R==="routines"?(0,e.jsx)(Sn,{workspace:i,project:j}):(0,e.jsx)(be,{workspaceId:i.id})]}),(0,e.jsx)(Ys,{workspaceId:i.id,workspaceName:i.name,currentStatus:i.status,open:_,onOpenChange:f,onClosed:r(t=>{c.setQueryData(x.executionWorkspaces.detail(t.id),t),c.invalidateQueries({queryKey:x.executionWorkspaces.overview(t.companyId)}),c.invalidateQueries({queryKey:x.executionWorkspaces.closeReadiness(t.id)}),c.invalidateQueries({queryKey:x.executionWorkspaces.workspaceOperations(t.id)}),j&&(c.invalidateQueries({queryKey:x.projects.detail(j.id)}),c.invalidateQueries({queryKey:x.executionWorkspaces.list(j.companyId,{projectId:j.id})})),E&&c.invalidateQueries({queryKey:x.issues.detail(E.id)})},"onClosed")})]})}r(xt,"ExecutionWorkspaceDetail");export{xt as ExecutionWorkspaceDetail};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i=Object.defineProperty;var t=(e,s)=>i(e,"name",{value:s,configurable:!0});import{i as n}from"./rolldown-runtime-ZpX3ckPj.js";import{la as m}from"./createLucideIcon-CgrPXnTY.js";import{t as o}from"./button-DI4w5WP7.js";import{t as c}from"./x-6E1yeU3Q.js";import{t as p}from"./badge-jeXr866I.js";var a=n(m(),1);function f({filters:e,onRemove:s,onClear:l}){return e.length===0?null:(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[e.map(r=>(0,a.jsxs)(p,{variant:"secondary",className:"gap-1 pr-1",children:[(0,a.jsxs)("span",{className:"text-ink-3",children:[r.label,":"]}),(0,a.jsx)("span",{children:r.value}),(0,a.jsx)("button",{className:"ml-1 rounded-full hover:bg-bg-3 p-0.5",onClick:t(()=>s(r.key),"onClick"),children:(0,a.jsx)(c,{className:"h-3 w-3"})})]},r.key)),(0,a.jsx)(o,{variant:"ghost",size:"sm",className:"text-xs h-6",onClick:l,children:"Clear all"})]})}t(f,"FilterBar");export{f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var A=Object.defineProperty;var n=(e,s)=>A(e,"name",{value:s,configurable:!0});import{i as H}from"./rolldown-runtime-ZpX3ckPj.js";import{l as d,la as O,ua as D}from"./createLucideIcon-CgrPXnTY.js";import{t as M}from"./chevron-down-nRcQ7bok.js";import{t as R}from"./chevron-up-C1TOE3pP.js";import{t as z}from"./button-DI4w5WP7.js";var t=H(D(),1),r=H(O(),1),x=640,g=320,c=420,E=72,P=220;function $(e){const[s,u]=(0,t.useState)(()=>e??(typeof window>"u"?c:window.innerWidth<x?g:c));return(0,t.useEffect)(()=>{if(e!=null){u(e);return}if(typeof window>"u")return;const a=n(()=>u(window.innerWidth<x?g:c),"compute");return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[e]),s}n($,"useResponsiveCollapsedHeight");function X({children:e,collapsedHeight:s,activationBuffer:u=120,moreLabel:a="Show more",lessLabel:b="Show less",className:S,contentClassName:N,toggleClassName:I}){const m=$(s),f=(0,t.useRef)(null),[h,L]=(0,t.useState)(0),[o,T]=(0,t.useState)(!1),[j,k]=(0,t.useState)(!1),[p,C]=(0,t.useState)(!1);(0,t.useLayoutEffect)(()=>{const i=f.current;if(!i)return;const w=n(()=>{L(i.scrollHeight),k(!0)},"measure");if(w(),typeof ResizeObserver>"u")return;const _=new ResizeObserver(w);return _.observe(i),()=>_.disconnect()},[]);const l=j&&h>=m+u,v=l&&!o,y=v?{WebkitMaskImage:`linear-gradient(to bottom, black 0, black calc(100% - ${E}px), transparent 100%)`,maskImage:`linear-gradient(to bottom, black 0, black calc(100% - ${E}px), transparent 100%)`}:void 0;return(0,r.jsxs)("div",{className:d("fold-curtain",S),"data-expanded":o?"true":"false",children:[(0,r.jsx)("div",{ref:f,className:d("fold-curtain__content relative overflow-hidden",p&&"motion-safe:transition-(--tp-max-height) motion-reduce:transition-none",N),style:{maxHeight:v?`${m}px`:l?`${h}px`:void 0,transitionDuration:p?`${P}ms`:void 0,transitionTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",...y},children:e}),l?(0,r.jsx)("div",{className:"fold-curtain__toggle mt-2 flex justify-center print:hidden",children:(0,r.jsxs)(z,{type:"button",variant:"ghost",size:"sm","aria-expanded":o,onClick:n(()=>{C(!0),T(i=>!i)},"onClick"),className:d("h-7 px-2 text-xs",I),children:[o?b:a,o?(0,r.jsx)(R,{className:"h-3.5 w-3.5"}):(0,r.jsx)(M,{className:"h-3.5 w-3.5"})]})}):null]})}n(X,"FoldCurtain");export{X as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var W=Object.defineProperty;var r=(s,n)=>W(s,"name",{value:n,configurable:!0});import{i as U}from"./rolldown-runtime-ZpX3ckPj.js";import{l as N,la as H,ua as V}from"./createLucideIcon-CgrPXnTY.js";import{r as k}from"./star-eem0qj3E.js";import{r as g}from"./queryKeys-BzT8CD34.js";import{a as G,c as Q,i as X,n as J,o as Y,r as Z,s as ee,t as se}from"./alert-dialog-DNbnZgRz.js";import{c as S,d as ne,f as te,i as b,p as B,r as E,t as $,u as re}from"./dropdown-menu-rUbU8QKw.js";import{t as F}from"./check-Bis3vECb.js";import{t as le}from"./chevron-down-nRcQ7bok.js";import{t as ae}from"./ellipsis-DyXbAp4P.js";import{t as h}from"./button-DI4w5WP7.js";import{t as I}from"./plus-CwNlqadt.js";import{t as oe}from"./search-CgZSuGC8.js";import{t as ie}from"./trash-QxFF084e.js";import{t as de}from"./x-6E1yeU3Q.js";import{a as ce,i as me,n as ue,r as fe,s as xe,t as he}from"./dialog-CeH7rDcv.js";import{t as pe}from"./input-BBNGmECW.js";import{o as je,r as ge,s as be,t as ye}from"./sheet-D5sUsyfT.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(V(),1);function Ge(s){return s.systemKey==="bundled"||s.systemKey?.startsWith("bundled:")?!0:s.path==="bundled"||s.path.startsWith("bundled/")}r(Ge,"isBundledFolder");function Qe(s){return s.systemKey==="projects"||s.systemKey?.startsWith("project:")?!0:s.path==="projects"||s.path.startsWith("projects/")}r(Qe,"isProjectsFolder");function _(s){s.sort((n,t)=>n.folder.position-t.folder.position||n.folder.name.localeCompare(t.folder.name));for(const n of s)_(n.children)}r(_,"sortNodes");function ve(s){const n=new Map,t=new Map;for(const d of s)n.set(d.id,d),t.set(d.id,{folder:d,children:[]});const l=[];for(const d of s){const a=t.get(d.id),j=d.parentId?t.get(d.parentId):null;j?j.children.push(a):l.push(a)}_(l);let o=null,i=null,m=null;const c=[];for(const d of l)switch(d.folder.systemKey){case"my":o=d;break;case"projects":i=d;break;case"bundled":m=d;break;default:c.push(d)}const x=new Map;for(const[d,a]of t)x.set(d,a.children);const u=[];return o&&u.push(o),u.push(...c),i&&u.push(i),m&&u.push(m),{my:o,company:c,projects:i,bundled:m,byId:n,childrenById:x,roots:u}}r(ve,"buildSkillFolderTree");function Xe(s,n){const t=new Set([n]),l=[n];for(;l.length>0;){const o=l.pop();for(const i of s.childrenById.get(o)??[])t.has(i.folder.id)||(t.add(i.folder.id),l.push(i.folder.id))}return t}r(Xe,"subtreeFolderIds");function Ne(s,n){const t=[];let l=s.byId.get(n);const o=new Set;for(;l&&!o.has(l.id);)o.add(l.id),t.unshift(l),l=l.parentId?s.byId.get(l.parentId):void 0;return t}r(Ne,"folderBreadcrumbTrail");function A(s){switch(s.systemKey){case"my":return"My Skills";case"projects":return"Projects";case"bundled":return"Bundled";default:return s.name}}r(A,"reservedRootLabel");function Je(s,n){if(!n)return null;const t=Ne(s,n);if(t.length===0)return null;const l=t.map(o=>A(o));return t[0]?.systemKey||l.unshift("Organization"),l.join(" / ")}r(Je,"skillFolderDisplayPath");function we(s){return s.replace(/[-_]+/g," ").replace(/\b\w/g,n=>n.toUpperCase())}r(we,"humanizeFolderPathSegment");function Ye(s){if(!s)return null;if(s.includes(" / "))return s;const n=s.split("/").filter(Boolean);if(n.length===0)return null;const t=n[0]?.toLowerCase(),l=n.map(we);return t==="my"?l[0]="My Skills":t==="projects"?l[0]="Projects":t==="bundled"?l[0]="Bundled":l.unshift("Organization"),l.join(" / ")}r(Ye,"skillFolderPathDisplayFallback");function ke(s){return ve(s?.folders??[])}r(ke,"treeFromResult");var e=U(H(),1),C=["indigo","violet","emerald","cyan","amber","slate"],T={indigo:"var(--folder-color-indigo)",violet:"var(--folder-color-violet)",emerald:"var(--folder-color-emerald)",cyan:"var(--folder-color-cyan)",amber:"var(--folder-color-amber)",slate:"var(--folder-color-slate)"};function Ze(s){return s?s==="unfiled"?"unfiled":s:"all"}r(Ze,"normalizeFolderSelection");function es(s){return s==="all"?"":s==="unfiled"?"unfiled":s}r(es,"folderSearchValue");function Ce(s,n){return n==="all"||n==="unfiled"?null:s.find(t=>t.id===n)??null}r(Ce,"selectedFolderFromList");function y({color:s,className:n}){const t=s?T[s]??s:"var(--folder-color-slate)";return(0,e.jsx)("span",{"aria-hidden":"true",className:N("h-2.5 w-2.5 shrink-0 rounded-sm border border-line/40",n),style:{backgroundColor:t}})}r(y,"FolderSwatch");function De({folders:s,selection:n,allLabel:t}){return n==="all"?t:n==="unfiled"?"Unfiled":s.find(l=>l.id===n)?.name??t}r(De,"selectionLabel");function Se(s,n){return s?n==="all"?s.allCount:n==="unfiled"?s.unfiledCount:s.folders.find(t=>t.id===n)?.itemCount??0:0}r(Se,"selectionCount");function ss({result:s,selection:n,allLabel:t,onClick:l}){const o=s?Ce(s.folders,n):null;return(0,e.jsxs)(h,{variant:"secondary",size:"sm",className:"max-w-full justify-start",onClick:l,children:[n==="all"?(0,e.jsx)(k,{className:"mr-2 h-3.5 w-3.5"}):(0,e.jsx)(y,{color:o?.color,className:"mr-2"}),(0,e.jsx)("span",{className:"truncate",children:De({folders:s?.folders??[],selection:n,allLabel:t})}),(0,e.jsx)("span",{className:"ml-2 text-xs text-ink-3",children:Se(s,n)}),(0,e.jsx)(le,{className:"ml-1 h-3.5 w-3.5 shrink-0"})]})}r(ss,"FolderChip");function ns({result:s,selection:n,itemLabelPlural:t,allLabel:l,loading:o=!1,onSelect:i,onCreate:m,onRename:c,onEdit:x,onDelete:u}){const d=s?.folders??[],[a,j]=(0,p.useState)(null),[w,R]=(0,p.useState)("");(0,p.useEffect)(()=>{a&&(d.find(f=>f.id===a)||j(null))},[d,a]);function K(f){j(f.id),R(f.name)}r(K,"startRename");function O(f){const v=w.trim();v&&v!==f.name&&c(f,v),j(null)}r(O,"commitRename");function M(f,v,P,q){const z=n===f;return(0,e.jsxs)("button",{type:"button",className:N("grid w-full grid-cols-(--gtc-folder-row) items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors hover:bg-bg-3/40",z?"bg-bg-3/60 text-ink":"text-ink-3"),"aria-current":z?"page":void 0,onClick:r(()=>i(f),"onClick"),children:[(0,e.jsx)("span",{className:"h-4 w-4",children:q}),(0,e.jsx)("span",{className:"truncate",children:v}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:P})]})}return r(M,"renderVirtualRow"),(0,e.jsxs)("nav",{"aria-label":`${t} folders`,className:"hidden w-(--sz-folder-rail) shrink-0 border-r border-line pr-3 md:block",children:[(0,e.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-2",children:[(0,e.jsx)("div",{className:"text-(length:--text-micro) font-medium uppercase tracking-wide text-ink-3",children:"Folders"}),(0,e.jsx)(h,{variant:"ghost",size:"icon-sm",title:"New folder",onClick:m,children:(0,e.jsx)(I,{className:"h-3.5 w-3.5"})})]}),o?(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("div",{className:"h-7 rounded-md bg-bg-3/60"}),(0,e.jsx)("div",{className:"h-7 rounded-md bg-bg-3/40"}),(0,e.jsx)("div",{className:"h-7 rounded-md bg-bg-3/30"})]}):(0,e.jsxs)("div",{className:"space-y-0.5",children:[M("all",l,s?.allCount??0,(0,e.jsx)(k,{className:"h-3.5 w-3.5"})),d.map(f=>(0,e.jsx)(Fe,{folder:f,active:n===f.id,renaming:a===f.id,renameDraft:w,onRenameDraftChange:R,onRenameCommit:r(()=>O(f),"onRenameCommit"),onRenameCancel:r(()=>j(null),"onRenameCancel"),onSelect:r(()=>i(f.id),"onSelect"),onStartRename:r(()=>K(f),"onStartRename"),onEdit:r(()=>x(f),"onEdit"),onDelete:r(()=>u(f),"onDelete")},f.id)),(0,e.jsx)("div",{className:"px-2 pb-1 pt-3 text-(length:--text-micro) font-medium uppercase tracking-wide text-ink-3",children:"System"}),M("unfiled","Unfiled",s?.unfiledCount??0,(0,e.jsx)(y,{color:null,className:"mt-0.5"}))]})]})}r(ns,"FolderRail");function Fe({folder:s,active:n,renaming:t,renameDraft:l,onRenameDraftChange:o,onRenameCommit:i,onRenameCancel:m,onSelect:c,onStartRename:x,onEdit:u,onDelete:d}){return(0,e.jsxs)("div",{className:N("group grid grid-cols-(--gtc-folder-row-actions) items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors hover:bg-bg-3/40",n?"bg-bg-3/60 text-ink":"text-ink-3"),children:[(0,e.jsx)("span",{className:"h-4 w-4"}),(0,e.jsxs)("button",{type:"button",className:"flex min-w-0 items-center gap-2 text-left","aria-current":n?"page":void 0,onClick:c,onDoubleClick:x,children:[(0,e.jsx)(y,{color:s.color}),t?(0,e.jsx)("input",{value:l,onChange:r(a=>o(a.target.value),"onChange"),onClick:r(a=>a.stopPropagation(),"onClick"),onKeyDown:r(a=>{a.key==="Enter"&&i(),a.key==="Escape"&&m()},"onKeyDown"),onBlur:i,className:"h-6 min-w-0 flex-1 rounded-sm border border-line bg-bg px-1 text-sm outline-none",autoFocus:!0}):(0,e.jsx)("span",{className:"truncate",children:s.name})]}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:s.itemCount}),(0,e.jsxs)($,{children:[(0,e.jsx)(B,{asChild:!0,children:(0,e.jsx)(h,{variant:"ghost",size:"icon-sm",className:"h-6 w-6 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100","aria-label":`Folder actions for ${s.name}`,children:(0,e.jsx)(ae,{className:"h-3.5 w-3.5"})})}),(0,e.jsxs)(E,{align:"end",children:[(0,e.jsx)(b,{onSelect:x,children:"Rename"}),(0,e.jsx)(b,{onSelect:u,children:"Edit color"}),(0,e.jsx)(S,{}),(0,e.jsxs)(b,{variant:"destructive",onSelect:d,children:[(0,e.jsx)(ie,{className:"h-3.5 w-3.5"}),"Delete"]})]})]})]})}r(Fe,"FolderRailItem");function ts({storageKey:s,itemLabelPlural:n,onCreateFolder:t}){const[l,o]=(0,p.useState)(()=>{try{return window.localStorage.getItem(s)==="1"}catch{return!1}});if(l)return null;function i(){o(!0);try{window.localStorage.setItem(s,"1")}catch{}}return r(i,"dismiss"),(0,e.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-2 rounded-md border border-line bg-bg-3/40 px-3 py-2 text-sm",children:[(0,e.jsx)(k,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,e.jsxs)("span",{className:"min-w-0 flex-1 text-ink-3",children:["Group these ",n," into folders to keep things tidy."]}),(0,e.jsx)(h,{size:"sm",variant:"secondary",onClick:t,children:"Create your first folder"}),(0,e.jsx)(h,{size:"icon-sm",variant:"ghost","aria-label":"Dismiss folder suggestion",onClick:i,children:(0,e.jsx)(de,{className:"h-3.5 w-3.5"})})]})}r(ts,"AllUnfiledBanner");function rs({open:s,onOpenChange:n,result:t,selection:l,allLabel:o,itemLabelPlural:i,onSelect:m,onCreate:c}){function x(a){m(a),n(!1)}r(x,"select");const u=(0,p.useMemo)(()=>ke(t),[t]);function d(a,j){return(0,e.jsxs)("div",{"data-folder-id":a.folder.id,children:[(0,e.jsx)(D,{id:a.folder.id,label:j??a.folder.name,count:a.folder.itemCount,color:a.folder.color,selected:l===a.folder.id,onSelect:x}),a.children.length>0?(0,e.jsx)("div",{className:"pl-3",children:a.children.map(w=>d(w))}):null]},a.folder.id)}return r(d,"renderBranch"),(0,e.jsx)(ye,{open:s,onOpenChange:n,children:(0,e.jsxs)(ge,{side:"bottom",className:"max-h-(--sz-folder-sheet-max) rounded-t-lg pb-4",children:[(0,e.jsx)(je,{className:"border-b border-line px-4 py-3",children:(0,e.jsxs)(be,{children:[i," folders"]})}),(0,e.jsxs)("div",{className:"overflow-y-auto px-3",children:[(0,e.jsx)(D,{id:"all",label:o,count:t?.allCount??0,selected:l==="all",onSelect:x,all:!0}),t?.kind==="skill"?(0,e.jsxs)(e.Fragment,{children:[u.my?d(u.my,"My Skills"):null,(0,e.jsx)("div",{className:"px-2 pb-0.5 pt-2 text-(length:--text-micro) font-medium uppercase tracking-wide text-ink-3",children:"Organization"}),u.company.map(a=>d(a)),u.projects?d(u.projects,"Projects"):null,u.bundled?d(u.bundled,"Bundled"):null]}):u.roots.map(a=>d(a,A(a.folder))),(0,e.jsx)(D,{id:"unfiled",label:"Unfiled",count:t?.unfiledCount??0,selected:l==="unfiled",onSelect:x})]}),(0,e.jsx)("div",{className:"border-t border-line px-4 pt-3",children:(0,e.jsxs)(h,{size:"sm",variant:"secondary",className:"w-full",onClick:c,children:[(0,e.jsx)(I,{className:"mr-2 h-3.5 w-3.5"}),"New folder"]})})]})})}r(rs,"MobileFolderSheet");function D({id:s,label:n,count:t,color:l,selected:o,all:i=!1,onSelect:m}){return(0,e.jsxs)("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-bg-3/50",onClick:r(()=>m(s),"onClick"),children:[i?(0,e.jsx)(k,{className:"h-3.5 w-3.5 text-ink-3"}):(0,e.jsx)(y,{color:l}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate",children:n}),(0,e.jsx)("span",{className:"text-xs text-ink-3",children:t}),o?(0,e.jsx)(F,{className:"h-3.5 w-3.5"}):null]})}r(D,"MobileFolderRow");function ls({folders:s,currentFolderId:n,onMove:t,onCreateAndMove:l}){return(0,e.jsxs)(re,{children:[(0,e.jsx)(te,{children:"Move to..."}),(0,e.jsx)(ne,{className:"w-56",children:(0,e.jsx)(L,{folders:s,currentFolderId:n,onMove:t,onCreateAndMove:l})})]})}r(ls,"MoveToMenu");function L({folders:s,currentFolderId:n,onMove:t,onCreateAndMove:l}){const[o,i]=(0,p.useState)(""),m=(0,p.useMemo)(()=>{const c=o.trim().toLowerCase();return c?s.filter(x=>x.name.toLowerCase().includes(c)):s},[s,o]);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[(0,e.jsx)(oe,{className:"h-3.5 w-3.5 text-ink-3"}),(0,e.jsx)("input",{value:o,onChange:r(c=>i(c.target.value),"onChange"),onKeyDown:r(c=>c.stopPropagation(),"onKeyDown"),placeholder:"Search folders",className:"h-7 min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-ink-3"})]}),(0,e.jsx)(S,{}),(0,e.jsxs)(b,{onSelect:r(()=>t(null),"onSelect"),children:[(0,e.jsx)(y,{color:null}),"Unfiled",n==null?(0,e.jsx)(F,{className:"ml-auto h-3.5 w-3.5"}):null]}),m.map(c=>(0,e.jsxs)(b,{onSelect:r(()=>t(c.id),"onSelect"),children:[(0,e.jsx)(y,{color:c.color}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate",children:c.name}),n===c.id?(0,e.jsx)(F,{className:"ml-auto h-3.5 w-3.5"}):null]},c.id)),m.length===0?(0,e.jsx)("div",{className:"px-2 py-2 text-xs text-ink-3",children:"No folders match."}):null,(0,e.jsx)(S,{}),(0,e.jsxs)(b,{onSelect:l,children:[(0,e.jsx)(I,{className:"h-3.5 w-3.5"}),"New folder..."]})]})}r(L,"MoveToMenuItems");function as({open:s,kind:n,folder:t,onOpenChange:l,onSubmit:o,pending:i=!1}){const[m,c]=(0,p.useState)(""),[x,u]=(0,p.useState)(C[0]??null),d=!!t;return(0,p.useEffect)(()=>{s&&(c(t?.name??""),u(t?.color??C[0]??null))},[t,s]),(0,e.jsx)(he,{open:s,onOpenChange:l,children:(0,e.jsxs)(ue,{className:"sm:max-w-md",children:[(0,e.jsxs)(ce,{children:[(0,e.jsx)(xe,{children:d?"Edit folder":"Create folder"}),(0,e.jsx)(fe,{children:n==="routine"?"Organize routines in this organization.":"Organize installed organization skills."})]}),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("label",{className:"text-sm font-medium",htmlFor:"folder-name",children:"Name"}),(0,e.jsx)(pe,{id:"folder-name",value:m,onChange:r(a=>c(a.target.value),"onChange"),autoFocus:!0,onKeyDown:r(a=>{a.key==="Enter"&&m.trim()&&o({name:m.trim(),color:x})},"onKeyDown")})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("div",{className:"text-sm font-medium",children:"Color"}),(0,e.jsxs)("div",{className:"flex flex-wrap gap-2",children:[C.map(a=>(0,e.jsx)("button",{type:"button","aria-label":`Use folder color ${a}`,className:N("h-7 w-7 rounded-md border border-line",x===a&&"ring-2 ring-focus ring-offset-2 ring-offset-bg"),style:{backgroundColor:T[a]},onClick:r(()=>u(a),"onClick")},a)),(0,e.jsx)("button",{type:"button",className:N("h-7 rounded-md border border-line px-2 text-xs text-ink-3",x==null&&"ring-2 ring-focus ring-offset-2 ring-offset-bg"),onClick:r(()=>u(null),"onClick"),children:"None"})]})]})]}),(0,e.jsxs)(me,{children:[(0,e.jsx)(h,{variant:"ghost",onClick:r(()=>l(!1),"onClick"),disabled:i,children:"Cancel"}),(0,e.jsx)(h,{onClick:r(()=>o({name:m.trim(),color:x}),"onClick"),disabled:i||!m.trim(),children:i?"Saving...":d?"Save":"Create folder"})]})]})})}r(as,"FolderFormDialog");function os({open:s,folder:n,itemLabelPlural:t,onOpenChange:l,onConfirm:o,pending:i=!1}){return(0,e.jsx)(se,{open:s,onOpenChange:l,children:(0,e.jsxs)(X,{children:[(0,e.jsxs)(ee,{children:[(0,e.jsx)(Q,{children:"Delete folder"}),(0,e.jsxs)(G,{children:["The ",n?.itemCount??0," ",t," in this folder won't be deleted. They'll move to Unfiled."]})]}),(0,e.jsxs)(Y,{children:[(0,e.jsx)(Z,{disabled:i,children:"Cancel"}),(0,e.jsx)(J,{className:"bg-bad text-accent-ink hover:bg-bad/90",disabled:i||!n,onClick:r(m=>{m.preventDefault(),o()},"onClick"),children:i?"Deleting...":"Delete folder"})]})]})})}r(os,"DeleteFolderDialog");function is({selectedCount:s,folders:n,onMove:t,onCreateAndMove:l,onClear:o,onDone:i}){return s===0?null:(0,e.jsxs)("div",{className:"sticky top-2 z-10 flex flex-wrap items-center gap-2 rounded-md border border-line bg-bg/95 px-3 py-2 shadow-sm backdrop-blur",children:[(0,e.jsxs)("span",{className:"mr-auto text-sm text-ink-3",children:[s," selected"]}),(0,e.jsxs)($,{children:[(0,e.jsx)(B,{asChild:!0,children:(0,e.jsx)(h,{size:"sm",variant:"secondary",children:"Move to..."})}),(0,e.jsx)(E,{align:"end",className:"w-56",children:(0,e.jsx)(L,{folders:n,currentFolderId:void 0,onMove:t,onCreateAndMove:l})})]}),(0,e.jsx)(h,{size:"sm",variant:"ghost",onClick:o,children:"Deselect all"}),(0,e.jsx)(h,{size:"sm",onClick:i,children:"Done"})]})}r(is,"BulkBar");export{Je as _,as as a,ke as b,rs as c,Ze as d,Ce as f,A as g,Qe as h,ss as i,ls as l,Ge as m,is as n,ns as o,Ne as p,os as r,y as s,ts as t,es as u,Ye as v,Ve as x,Xe as y};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var ze=Object.defineProperty;var t=(s,a)=>ze(s,"name",{value:a,configurable:!0});import{i as fe}from"./rolldown-runtime-ZpX3ckPj.js";import{l as Q,la as Me,t as qe,ua as $e}from"./createLucideIcon-CgrPXnTY.js";import{v as Oe}from"./star-eem0qj3E.js";import{X as V,_ as B,t as R,v as G}from"./queryKeys-BzT8CD34.js";import{t as Fe}from"./useInfiniteQuery-DTEIZ1gz.js";import{n as Ge}from"./CompanyContext-fQCNWI_f.js";import{o as je,r as Re,t as J}from"./router-BKzUF9uf.js";import{n as Le,r as Ke,t as Qe}from"./collapsible-D_rwONtV.js";import{t as Be}from"./bot-kSfD9MPZ.js";import{t as Ue}from"./braces-CpXTT0w9.js";import{t as He}from"./check-Bis3vECb.js";import{t as ge}from"./chevron-down-nRcQ7bok.js";import{t as We}from"./chevron-left-DnUVccc_.js";import{t as be}from"./chevron-right-BP8JjEC_.js";import{t as Je}from"./chevron-up-C1TOE3pP.js";import{t as Ve}from"./SearchableSelect-BbuRtdzg.js";import{t as Ze}from"./circle-question-mark-CasEGiDp.js";import{t as Xe}from"./code-xml-CZhhm_-P.js";import{t as F}from"./copy-C1cfcpxY.js";import{t as Ye}from"./key-round-CGxQxRtN.js";import{t as es}from"./link-0uKX-OmT.js";import{t as x}from"./button-DI4w5WP7.js";import{t as ss}from"./plus-CwNlqadt.js";import{t as ts}from"./send-DfQbMfo9.js";import{i as as,n as ns,t as is}from"./tooltip-CW50mEoC.js";import{i as H}from"./ToastContext-DyVJ6bCh.js";import{t as ls}from"./agents-B8n-p0aX.js";import{t as rs}from"./projects-l3kQxnTp.js";import{a as ye,i as Ne,n as ve,r as ke,s as we,t as Ce}from"./dialog-CeH7rDcv.js";import{t as L}from"./input-BBNGmECW.js";import{t as K}from"./skeleton-BAAoD7cz.js";import{t as A}from"./tools-MhVvhrz_.js";import{n as os}from"./BreadcrumbContext-DNbB7zWn.js";import{t as cs}from"./toggle-switch-Dj5GORxn.js";import{t as Y}from"./clipboard-CTLKYvRL.js";import{Ia as ds,ka as ms,wn as xs}from"./index-BcwxLap4.js";import{a as $,r as Te}from"./shared-BjSrBoPt.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-B4EYBk9t.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($e(),1),e=fe(Me(),1),ws={cursor:ks,claude_desktop:Be,vscode:Xe,claude_code:ms,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 I(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(I,"copyText");const T=u.find(l=>l.client===j)??null,P=T?ce(T.config,{endpointPath:s.endpointPath,endpoint:N,token:g?O(g):"pcgw_•••"}):"",b=T&&g?ce(T.config,{endpointPath:s.endpointPath,endpoint:N,token:g.token}):null;function _(){d.isPending||d.mutate()}return t(_,"issueToken"),(0,e.jsx)(Ce,{open:a,onOpenChange:i,children:(0,e.jsxs)(ve,{className:"sm:max-w-2xl",children:[(0,e.jsxs)(ye,{children:[(0,e.jsxs)(we,{className:"flex items-center gap-2",children:["Client snippets",(0,e.jsxs)(is,{children:[(0,e.jsx)(as,{asChild:!0,children:(0,e.jsx)("button",{type:"button","aria-label":"About client snippets",className:"text-ink-3 hover:text-ink",children:(0,e.jsx)(Ze,{className:"h-4 w-4"})})}),(0,e.jsx)(ns,{className:"max-w-xs text-xs",children:"Give this MCP gateway configuration to your tool. It does not give it access to Wardmote or skills; it only gateways calls between the client and the tools exposed here."})]})]}),(0,e.jsx)(ke,{children:"Choose a client and copy a complete, authenticated configuration."})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-line pb-3",children:[(0,e.jsx)("span",{className:"text-xs font-medium text-ink-3",children:"Authorization"}),f.length>0?(0,e.jsx)(Ve,{value:h,groups:k,onValueChange:v,placeholder:"Issue a token",searchPlaceholder:"Search tokens…",emptyMessage:"No copyable tokens.",contentWidth:"auto",triggerClassName:"h-8 w-auto max-w-xs rounded-full px-3",renderValue:t(l=>l?`${l.label} · ${O(l.token)}`:"Issue a token","renderValue"),renderOption:t(l=>(0,e.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,e.jsx)("span",{className:"truncate",children:l.label}),(0,e.jsx)("span",{className:"truncate font-mono text-(length:--text-micro) text-ink-3",children:O(l.token)})]}),"renderOption"),createItem:{render:t(()=>(0,e.jsx)("span",{children:"+ Issue a new token"}),"render"),onSelect:_}}):(0,e.jsx)(x,{type:"button",variant:"secondary",size:"sm",className:"rounded-full",disabled:d.isPending,onClick:_,children:d.isPending?"Issuing…":"Issue a token"}),g?(0,e.jsxs)(x,{type:"button",variant:"ghost",size:"sm",onClick:t(()=>{I(`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(()=>{I(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 I(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": {',` "wardmote-${s.displaySlug}": {`,` "url": "${N}",`,' "headers": { "Authorization": "Bearer pcgw_•••_TOKEN" }'," }"," }","}"].join(`
|
|
2
|
+
`);async function v(g,d){try{await Y(g),u({title:"Copied",body:d,tone:"success"})}catch{u({title:"Copy failed",body:"Clipboard access is unavailable.",tone:"error"})}}return t(v,"copy"),(0,e.jsxs)("div",{className:"space-y-5",children:[(0,e.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[(0,e.jsxs)("div",{className:"rounded-lg border border-line p-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium text-ink-3",children:w?"On":"Off"}),(0,e.jsx)("div",{className:"mt-2",children:(0,e.jsx)(cs,{checked:w,disabled:r,onCheckedChange:y,"aria-label":"Toggle gateway"})}),(0,e.jsx)("p",{className:"mt-2 text-xs text-ink-3",children:"Toggle the whole gateway off here."})]}),(0,e.jsxs)(se,{label:"Apps",children:[i.length," ",i.length===1?"app":"apps",a?` · ${le(a)}`:""]}),(0,e.jsxs)(se,{label:"Tokens",children:[f," active",k>0?` · ${k} expiring`:""]}),(0,e.jsx)(se,{label:"Health",children:j.length===0?"All green":`${j.length} needs attention`})]}),(0,e.jsxs)("section",{className:"rounded-lg border border-line p-4",children:[(0,e.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"Who can use it"}),(0,e.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Anyone holding an active token below, restricted by the rules in the bound profile."})]})}),(0,e.jsxs)("div",{className:"mt-3 flex flex-wrap gap-2",children:[(0,e.jsxs)(te,{children:["Scope · ",fs(s,c,p)]}),(0,e.jsxs)(te,{children:["Profile · ",a?.name??"Unavailable"]}),(0,e.jsxs)(te,{children:[f," active ",f===1?"token":"tokens"]})]})]}),(0,e.jsxs)("section",{className:"rounded-lg border border-line p-4",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"Apps in this gateway"}),i.length===0?(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This gateway’s profile doesn’t include any apps yet."}):(0,e.jsx)("ul",{className:"mt-3 divide-y divide-line",children:i.map(g=>(0,e.jsx)(As,{app:g},g.application.id))})]}),(0,e.jsxs)("section",{className:"rounded-lg border border-line bg-bg-3/30 p-4",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-ink",children:"How clients connect"}),(0,e.jsxs)(x,{variant:"secondary",size:"sm",onClick:t(()=>{v(h,"Client config")},"onClick"),children:[(0,e.jsx)(F,{className:"mr-1 h-3.5 w-3.5"}),"Copy"]})]}),(0,e.jsx)("pre",{className:"mt-3 overflow-auto whitespace-pre-wrap break-words rounded bg-bg p-3 font-mono text-xs text-ink-3",children:h})]})]})}t(Ss,"OverviewPanel");function se({label:s,children:a}){return(0,e.jsxs)("div",{className:"rounded-lg border border-line p-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium text-ink-3",children:s}),(0,e.jsx)("div",{className:"mt-2 text-sm font-semibold text-ink",children:a})]})}t(se,"StatCard");function te({children:s}){return(0,e.jsx)("span",{className:"inline-flex items-center rounded-full border border-line px-3 py-1 text-xs font-medium text-ink",children:s})}t(te,"Chip");function As({app:s}){const a=s.connection?`/apps/${s.connection.id}/permissions`:`/apps/app/${s.application.id}/permissions`;return(0,e.jsxs)("li",{className:"flex items-center justify-between gap-3 py-2.5",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)(J,{to:a,className:"font-medium text-ink hover:underline",children:Se(s)}),(0,e.jsxs)("div",{className:"text-xs text-ink-3",children:[s.toolCount," ",s.toolCount===1?"tool":"tools",s.needsAttention&&s.attentionReason?` · ${s.attentionReason}`:""]})]}),(0,e.jsx)("span",{className: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)($,{value:s.expiresAt})]}):(0,e.jsxs)(e.Fragment,{children:["Expires ",(0,e.jsx)($,{value:s.expiresAt})]}):(0,e.jsx)(e.Fragment,{children:"No expiry"})}t(xe,"ExpiryValue");function Is({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),[I,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"),D=(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(D.length/ae)),q=D.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 Ie(){!r&&!u.trim()&&N(Pe(a)),y(n=>!n)}t(Ie,"startIssuing");function De(n){n.preventDefault(),u.trim()&&W.mutate()}t(De,"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:Ie,children:[(0,e.jsx)(ss,{className:"mr-1.5 h-3.5 w-3.5"}),"Issue token"]})]}),r?(0,e.jsxs)("form",{className:"space-y-3",onSubmit:De,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:I,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:D.length})]}),I?(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:D.length===0?(0,e.jsx)("p",{className:"py-4 text-sm text-ink-3",children:"No tokens have been issued for this gateway."}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"hidden overflow-x-auto rounded-lg border border-line sm:block",children:(0,e.jsxs)("table",{className:"w-full min-w-(--sz-44rem) text-sm",children:[(0,e.jsx)("thead",{children:(0,e.jsxs)("tr",{className:"border-b border-line bg-bg-3/40 text-left text-(length:--text-micro) font-semibold uppercase tracking-wide text-ink-3",children:[(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Token"}),(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Owner"}),(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Created"}),(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Last used"}),(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Expiry"}),(0,e.jsx)("th",{className:"px-4 py-2.5",children:"Status"}),(0,e.jsx)("th",{className:"px-4 py-2.5 text-right"})]})}),(0,e.jsx)("tbody",{children:q.map(n=>{const E=ie(n);return(0,e.jsxs)("tr",{className:"border-b border-line last:border-0",children:[(0,e.jsxs)("td",{className:"px-4 py-3",children:[(0,e.jsx)("div",{className:"font-medium text-ink",children:n.name}),(0,e.jsx)("div",{className:"font-mono text-xs text-ink-3",children:O(n)})]}),(0,e.jsx)("td",{className:"px-4 py-3 text-ink-3",children:n.clientLabel||n.ownerNote||"—"}),(0,e.jsx)("td",{className:"px-4 py-3 text-ink-3",children:(0,e.jsx)($,{value:n.createdAt})}),(0,e.jsx)("td",{className:"px-4 py-3 text-ink-3",children:n.lastUsedAt?(0,e.jsx)($,{value:n.lastUsedAt}):"—"}),(0,e.jsx)("td",{className:"px-4 py-3 text-ink-3",children:(0,e.jsx)(xe,{token:n})}),(0,e.jsx)("td",{className:"px-4 py-3",children:(0,e.jsx)(me,{status:E})}),(0,e.jsx)("td",{className:"px-4 py-3 text-right",children:E!=="revoked"?(0,e.jsx)(x,{variant:"danger",size:"sm",className:"h-7 px-2 text-xs",onClick:t(()=>re(n),"onClick"),children:"Revoke"}):null})]},n.id)})})]})}),(0,e.jsx)("div",{className:"space-y-3 sm:hidden",children:q.map(n=>{const E=ie(n);return(0,e.jsxs)("div",{className:"border-b border-line py-3 last:border-0",children:[(0,e.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"font-medium text-ink",children:n.name}),(0,e.jsx)("div",{className:"font-mono text-xs text-ink-3",children:O(n)})]}),(0,e.jsx)(me,{status:E})]}),(0,e.jsxs)("dl",{className:"mt-3 grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[(0,e.jsx)(Z,{label:"Owner",value:n.clientLabel||n.ownerNote||"—"}),(0,e.jsx)(Z,{label:"Created",value:(0,e.jsx)($,{value:n.createdAt})}),(0,e.jsx)(Z,{label:"Last used",value:n.lastUsedAt?(0,e.jsx)($,{value:n.lastUsedAt}):"—"}),(0,e.jsx)(Z,{label:"Expiry",value:(0,e.jsx)(xe,{token:n})})]}),E!=="revoked"?(0,e.jsx)(x,{variant:"danger",size:"sm",className:"mt-3 w-full text-xs",onClick:t(()=>re(n),"onClick"),children:"Revoke"}):null]},n.id)})}),m>1?(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsxs)("p",{className:"text-xs text-ink-3",children:["Page ",P," of ",m," · ",D.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(Is,"TokensPanel");var Ds=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)(xs,{status:p.status,label:p.label}),(0,e.jsxs)("span",{className:"text-xs text-ink-3",children:["· ",(0,e.jsx)($,{value:s.createdAt})]})]})]}),a?(0,e.jsxs)("div",{className:"border-t border-line bg-bg-3/30 px-4 py-3 pl-10 text-xs",children:[(0,e.jsxs)("dl",{children:[u?(0,e.jsx)(z,{label:"Tool",value:u,mono:!0}):null,s.invocation?.status?(0,e.jsx)(z,{label:"Call status",value:s.invocation.status}):null,s.invocation?.policyDecision?(0,e.jsx)(z,{label:"Decision",value:s.invocation.policyDecision}):null,N?(0,e.jsx)(z,{label:"Reason",value:N,mono:!0}):null,j?(0,e.jsx)(z,{label:"Duration",value:j}):null,s.invocation?.id?(0,e.jsx)(z,{label:"Invocation ID",value:s.invocation.id,mono:!0}):null,s.invocation?.errorCode?(0,e.jsx)(z,{label:"Error code",value:s.invocation.errorCode,mono:!0}):null,s.invocation?.errorMessage?(0,e.jsx)(z,{label:"Error",value:s.invocation.errorMessage}):null]}),f?(0,e.jsxs)("div",{className:"mt-2 space-y-1",children:[(0,e.jsx)("div",{className:"text-ink-3",children:"Arguments (redacted)"}),(0,e.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words rounded-md border border-line bg-bg p-3 font-mono text-xs text-ink",children:f})]}):null,k?(0,e.jsxs)("div",{className:"mt-3 space-y-1",children:[(0,e.jsx)("div",{className:"text-ink-3",children:"Result (redacted)"}),(0,e.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap break-words rounded-md border border-line bg-bg p-3 font-mono text-xs text-ink",children:k})]}):null]}):null]})}t(Ms,"ActivityRow");function qs({companyId:s,gateway:a}){const i=Fe({queryKey:R.tools.activity(s,{gateway:a.id,window:"30d"}),queryFn:t(({pageParam:c})=>A.listActivity(s,{gateway:a.id,window:"30d",limit:Ds,cursor:c??void 0}),"queryFn"),initialPageParam:null,getNextPageParam:t(c=>c.nextCursor??void 0,"getNextPageParam")}),p=(0,o.useMemo)(()=>i.data?.pages.flatMap(c=>c.events)??[],[i.data]);return i.isLoading?(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(K,{className:"h-12 w-full"}),(0,e.jsx)(K,{className:"h-12 w-full"}),(0,e.jsx)(K,{className:"h-12 w-full"})]}):i.isError?(0,e.jsx)(Te,{error:i.error,onRetry:t(()=>i.refetch(),"onRetry")}):(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Calls through this gateway from the last 30 days. Open a row to inspect its tool, redacted arguments, result, and decision."}),p.length===0?(0,e.jsx)("div",{className:"rounded-md border border-dashed border-line p-6 text-center text-sm text-ink-3",children:"No calls have gone through this gateway yet."}):(0,e.jsx)("ul",{className:"divide-y divide-line rounded-lg border border-line",children:p.map(c=>(0,e.jsx)(Ms,{event:c},c.id))}),i.hasNextPage?(0,e.jsx)("div",{className:"flex justify-center",children:(0,e.jsx)(x,{variant:"secondary",size:"sm",onClick:t(()=>i.fetchNextPage(),"onClick"),disabled:i.isFetchingNextPage,children:i.isFetchingNextPage?"Loading…":"Load more"})}):null]})}t(qs,"GatewayActivityPanel");function $s({companyId:s,gateway:a}){const i=V(),p=je(),{pushToast:c}=H(),[r,y]=(0,o.useState)(!1),[u,N]=(0,o.useState)(""),f=`${typeof window<"u"?window.location.origin:""}${a.endpointPath}`,k=JSON.stringify({gatewayPublicId:a.gatewayPublicId,displaySlug:a.displaySlug,status:a.status,profileId:a.profileId,defaultProfileMode:a.defaultProfileMode,contextScopeType:a.contextScopeType,contextScopeId:a.contextScopeId,endpointPath:a.endpointPath,authConfig:a.authConfig,headerPolicy:a.headerPolicy,metadataPolicy:a.metadataPolicy,onDemandToolsConfig:a.onDemandToolsConfig},null,2),j=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($s,"GatewayAdvancedPanel");function X({label:s,value:a,mono:i}){return(0,e.jsxs)("div",{children:[(0,e.jsx)("dt",{className:"text-xs font-medium text-ink-3",children:s}),(0,e.jsx)("dd",{className:i?"mt-0.5 font-mono text-ink":"mt-0.5 text-ink",children:a})]})}t(X,"Row");function kt(){const{gatewayId:s="",tab:a}=Oe(),i=je(),p=V(),{pushToast:c}=H(),{selectedCompanyId:r}=Ge(),{setBreadcrumbs:y}=os(),[u,N]=(0,o.useState)(!1),[f,k]=(0,o.useState)(!1),[j,w]=(0,o.useState)([]),h=Ns(a)?a:null,v=G({queryKey:U(r??"__none__"),queryFn:t(()=>A.listGateways(r),"queryFn"),enabled:!!r}),g=G({queryKey:R.tools.profiles(r??"__none__"),queryFn:t(()=>A.listProfiles(r),"queryFn"),enabled:!!r}),d=G({queryKey:R.tools.connections(r??"__none__"),queryFn:t(()=>A.listConnections(r),"queryFn"),enabled:!!r}),I=G({queryKey:R.tools.applications(r??"__none__"),queryFn:t(()=>A.listApplications(r),"queryFn"),enabled:!!r}),T=G({queryKey:R.agents.list(r??"__none__"),queryFn:t(()=>ls.list(r),"queryFn"),enabled:!!r}),P=G({queryKey:R.projects.list(r??"__none__",{includeArchived:!0}),queryFn:t(()=>rs.list(r,{includeArchived:!0}),"queryFn"),enabled:!!r}),b=(0,o.useMemo)(()=>(v.data?.gateways??[]).find(m=>m.id===s),[v.data,s]),_=(0,o.useMemo)(()=>(g.data?.profiles??[]).find(m=>m.id===b?.profileId),[g.data,b?.profileId]),l=(0,o.useMemo)(()=>ps(_,I.data?.applications??[],d.data?.connections??[]),[_,I.data,d.data]),C=(0,o.useMemo)(()=>new Map((T.data??[]).map(m=>[m.id,m.name])),[T.data]),S=(0,o.useMemo)(()=>new Map((P.data??[]).map(m=>[m.id,m.name])),[P.data]);function M(m){w(q=>[m,...q.filter(W=>W.id!==m.id)])}t(M,"rememberCreatedToken"),(0,o.useEffect)(()=>{if(b)return y([{label:"Connectors",href:"/apps"},{label:"Gateways",href:"/apps/gateways"},{label:b.name}]),()=>y([])},[y,b]);const D=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)(ds,{className:"mr-1.5 h-4 w-4"}),"Edit"]}),(0,e.jsxs)(x,{onClick:t(()=>N(!0),"onClick"),children:[(0,e.jsx)(ts,{className:"mr-1.5 h-4 w-4"}),"Client snippets"]})]})]}),(0,e.jsx)("nav",{className:"flex items-center gap-6 overflow-x-auto border-b border-line text-sm","aria-label":"Gateway tabs",children:vs.map(m=>{const q=m.key===h;return(0,e.jsx)(J,{to:oe(s,m.key),className:Q("-mb-px shrink-0 border-b-2 pb-2.5 pt-1 font-medium transition-colors",q?"border-ink text-ink":"border-transparent text-ink-3 hover:text-ink"),"aria-current":q?"page":void 0,children:m.label},m.key)})}),h==="overview"&&(0,e.jsx)(Ss,{gateway:b,profile:_,apps:l,agentNames:C,projectNames:S,toggleDisabled:D.isPending,onToggle:t(()=>D.mutate(),"onToggle")}),h==="apps"&&(0,e.jsx)(Ps,{apps:l,profile:_}),h==="tokens"&&(0,e.jsx)(Is,{companyId:r,gateway:b,onTokenCreated:M}),h==="activity"&&(0,e.jsx)(qs,{companyId:r,gateway:b}),h==="advanced"&&(0,e.jsx)($s,{companyId:r,gateway:b}),(0,e.jsx)(Cs,{gateway:b,open:u,onOpenChange:N,createdTokens:j,onTokenCreated:M}),(0,e.jsx)(Ts,{companyId:r,gateway:b,profiles:g.data?.profiles??[],open:f,onOpenChange:k})]}):(0,e.jsxs)("div",{className:"max-w-3xl p-6",children:[(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"We couldn’t find that gateway."}),(0,e.jsx)(x,{className:"mt-4",variant:"secondary",onClick:t(()=>i("/apps/gateways"),"onClick"),children:"Back to gateways"})]}):(0,e.jsx)(Re,{replace:!0,to:oe(s,"overview")}):(0,e.jsx)("div",{className:"p-6 text-sm text-ink-3",children:"Select an organization to manage gateways."})}t(kt,"GatewayDetail");export{kt as GatewayDetail};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Y=Object.defineProperty;var t=(o,d)=>Y(o,"name",{value:d,configurable:!0});import{i as I}from"./rolldown-runtime-ZpX3ckPj.js";import{la as J,ua as U}from"./createLucideIcon-CgrPXnTY.js";import{X as V,_ as Z,t as h,v as l}from"./queryKeys-BzT8CD34.js";import{n as ee}from"./CompanyContext-fQCNWI_f.js";import{o as se}from"./router-BKzUF9uf.js";import{t as B}from"./button-DI4w5WP7.js";import{t as O}from"./plus-CwNlqadt.js";import{t as te}from"./search-CgZSuGC8.js";import{i as ae}from"./ToastContext-DyVJ6bCh.js";import{t as ne}from"./agents-B8n-p0aX.js";import{t as re}from"./projects-l3kQxnTp.js";import{t as oe}from"./input-BBNGmECW.js";import{t as L}from"./skeleton-BAAoD7cz.js";import{t as u}from"./tools-MhVvhrz_.js";import{n as ie}from"./BreadcrumbContext-DNbB7zWn.js";import{t as le}from"./toggle-switch-Dj5GORxn.js";import{a as Q,r as ce}from"./shared-BjSrBoPt.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-B4EYBk9t.js";var c=I(U(),1),e=I(J(),1);function Fe(){const o=se(),d=V(),{pushToast:C}=ae(),{selectedCompanyId:a}=ee(),{setBreadcrumbs:f}=ie(),[b,R]=(0,c.useState)(""),[z,g]=(0,c.useState)(!1);(0,c.useEffect)(()=>(f([{label:"Connectors",href:"/apps"},{label:"Gateways"}]),()=>f([])),[f]);const p=l({queryKey:P(a??"__none__"),queryFn:t(()=>u.listGateways(a),"queryFn"),enabled:!!a}),S=l({queryKey:h.tools.profiles(a??"__none__"),queryFn:t(()=>u.listProfiles(a),"queryFn"),enabled:!!a}),D=l({queryKey:h.tools.connections(a??"__none__"),queryFn:t(()=>u.listConnections(a),"queryFn"),enabled:!!a}),H=l({queryKey:h.tools.applications(a??"__none__"),queryFn:t(()=>u.listApplications(a),"queryFn"),enabled:!!a}),q=l({queryKey:h.agents.list(a??"__none__"),queryFn:t(()=>ne.list(a),"queryFn"),enabled:!!a}),G=l({queryKey:h.projects.list(a??"__none__"),queryFn:t(()=>re.list(a),"queryFn"),enabled:!!a}),W=(0,c.useMemo)(()=>new Map((S.data?.profiles??[]).map(s=>[s.id,s])),[S.data]),T=(0,c.useMemo)(()=>new Map((q.data??[]).map(s=>[s.id,s.name])),[q.data]),$=(0,c.useMemo)(()=>new Map((G.data??[]).map(s=>[s.id,s.name])),[G.data]),M=Z({mutationFn:t(({gateway:s})=>u.updateGateway(a,s.id,{status:_(s)?"disabled":"active"}),"mutationFn"),onSuccess:t(async s=>{C({title:s.status==="active"?"Gateway on":"Gateway off",body:s.status==="active"?`${s.name} is exposing its tools again.`:`${s.name} is off — every client goes silent.`,tone:"success"}),await d.invalidateQueries({queryKey:P(a)})},"onSuccess"),onError:t(s=>C({title:"Couldn't update the gateway",body:s instanceof Error?s.message:String(s),tone:"error"}),"onError")});if(!a)return(0,e.jsx)("div",{className:"p-6 text-sm text-ink-3",children:"Select an organization to manage gateways."});const N=p.data?.gateways??[],y=b.trim().toLowerCase(),X=y?N.filter(s=>{const j=K(s,$,T).toLowerCase();return s.name.toLowerCase().includes(y)||s.displaySlug.toLowerCase().includes(y)||j.includes(y)}):N;return(0,e.jsxs)("div",{className:"max-w-5xl space-y-5",children:[(0,e.jsxs)("header",{className:"space-y-1",children:[(0,e.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:"Apps"}),(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"A gateway is one safe MCP endpoint that exposes only the apps you assign. Hand it to a client like Cursor or Claude Desktop."})]}),p.isLoading?(0,e.jsxs)("div",{className:"space-y-3 pt-2",children:[(0,e.jsx)(L,{className:"h-9 w-full max-w-sm"}),(0,e.jsx)(L,{className:"h-52 w-full"})]}):p.isError?(0,e.jsx)(ce,{error:p.error,onRetry:t(()=>p.refetch(),"onRetry")}):N.length===0?(0,e.jsx)(ye,{onCreate:t(()=>g(!0),"onCreate")}):(0,e.jsxs)("div",{className:"space-y-4 pt-1",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,e.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,e.jsx)(te,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-ink-3"}),(0,e.jsx)(oe,{value:b,onChange:t(s=>R(s.target.value),"onChange"),placeholder:"Search by name, app, or owner",className:"pl-9","aria-label":"Search gateways"})]}),(0,e.jsxs)(B,{onClick:t(()=>g(!0),"onClick"),children:[(0,e.jsx)(O,{className:"mr-1.5 h-4 w-4"}),"New gateway"]})]}),(()=>{const s=X.map(n=>{const r=W.get(n.profileId),i=pe(r,H.data?.applications??[],D.data?.connections??[]);return{gateway:n,profile:r,scope:K(n,$,T),appsLabel:`${i.length} ${i.length===1?"app":"apps"}${r?` · ${ue(r)}`:""}`,active:de(n),expiring:me(n),lastUsed:xe(n),href:F(n.id,"overview")}}),j=t(n=>(0,e.jsx)(le,{checked:_(n),disabled:M.isPending,onClick:t(r=>r.stopPropagation(),"onClick"),onCheckedChange:t(()=>M.mutate({gateway:n}),"onCheckedChange"),"aria-label":`Turn ${n.name} ${_(n)?"off":"on"}`}),"toggle"),A=(0,e.jsxs)("div",{className:"px-4 py-8 text-center text-sm text-ink-3",children:["No gateways match “",b.trim(),"”."]});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"hidden overflow-x-auto rounded-lg border border-line sm:block",children:(0,e.jsxs)("table",{className:"w-full min-w-(--sz-40rem) text-sm",children:[(0,e.jsx)("thead",{children:(0,e.jsxs)("tr",{className:"border-b border-line bg-bg-3/40 text-left text-(length:--text-micro) font-semibold uppercase tracking-wide text-ink-3",children:[(0,e.jsx)("th",{className:"whitespace-nowrap px-4 py-2.5",children:"Gateway"}),(0,e.jsx)("th",{className:"whitespace-nowrap px-4 py-2.5",children:"Scope"}),(0,e.jsx)("th",{className:"whitespace-nowrap px-4 py-2.5",children:"Apps"}),(0,e.jsx)("th",{className:"whitespace-nowrap px-4 py-2.5",children:"Tokens"}),(0,e.jsx)("th",{className:"whitespace-nowrap px-4 py-2.5",children:"Last used"}),(0,e.jsx)("th",{className:"whitespace-nowrap px-4 py-2.5 text-right",children:"On"})]})}),(0,e.jsxs)("tbody",{children:[s.map(({gateway:n,scope:r,appsLabel:i,active:v,expiring:m,lastUsed:x,href:k})=>(0,e.jsxs)("tr",{onClick:t(()=>o(k),"onClick"),className:"cursor-pointer border-b border-line transition-colors last:border-0 hover:bg-bg-3/30",children:[(0,e.jsxs)("td",{className:"w-64 max-w-64 whitespace-nowrap px-4 py-3",children:[(0,e.jsx)("div",{className:"font-medium text-ink",children:n.name}),(0,e.jsx)(E,{endpointPath:n.endpointPath})]}),(0,e.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-ink-3",children:r}),(0,e.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-ink-3",children:i}),(0,e.jsxs)("td",{className:"whitespace-nowrap px-4 py-3 text-ink-3",children:[v," active",m>0?` · ${m} expiring`:""]}),(0,e.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-ink-3",children:x?(0,e.jsx)(Q,{value:x}):"—"}),(0,e.jsx)("td",{className:"px-4 py-3",children:(0,e.jsx)("div",{className:"flex justify-end",children:j(n)})})]},n.id)),s.length===0?(0,e.jsx)("tr",{children:(0,e.jsx)("td",{colSpan:6,children:A})}):null]})]})}),(0,e.jsxs)("div",{className:"space-y-3 sm:hidden",children:[s.map(({gateway:n,scope:r,appsLabel:i,active:v,expiring:m,lastUsed:x,href:k})=>(0,e.jsxs)("div",{onClick:t(()=>o(k),"onClick"),className:"cursor-pointer rounded-lg border border-line p-4 transition-colors hover:bg-bg-3/30",children:[(0,e.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"font-medium text-ink",children:n.name}),(0,e.jsx)(E,{endpointPath:n.endpointPath})]}),(0,e.jsx)("div",{className:"shrink-0",children:j(n)})]}),(0,e.jsxs)("dl",{className:"mt-3 grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[(0,e.jsx)(w,{label:"Scope",value:r}),(0,e.jsx)(w,{label:"Apps",value:i}),(0,e.jsx)(w,{label:"Tokens",value:`${v} active${m>0?` · ${m} expiring`:""}`}),(0,e.jsx)(w,{label:"Last used",value:x?(0,e.jsx)(Q,{value:x}):"—"})]})]},n.id)),s.length===0?(0,e.jsx)("div",{className:"rounded-lg border border-line",children:A}):null]})]})})(),(0,e.jsxs)("div",{className:"rounded-lg border border-line bg-bg-3/30 px-4 py-3",children:[(0,e.jsx)("div",{className:"text-sm font-semibold text-ink",children:"Why a gateway?"}),(0,e.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"You pick which apps go through it, who can use it, and how. Revoke the token, the whole gateway goes silent — no app-by-app cleanup."})]})]}),(0,e.jsx)(he,{companyId:a,open:z,onOpenChange:g,onCreated:t(s=>o(F(s,"overview")),"onCreated")})]})}t(Fe,"GatewaysList");function w({label:o,value:d}){return(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("dt",{className:"text-(length:--text-micro) font-semibold uppercase tracking-wide text-ink-3",children:o}),(0,e.jsx)("dd",{className:"mt-0.5 truncate text-ink",children:d})]})}t(w,"MobileField");function ye({onCreate:o}){return(0,e.jsxs)("div",{className:"rounded-2xl border border-dashed border-line p-12 text-center",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold text-ink",children:"No gateways yet"}),(0,e.jsx)("p",{className:"mx-auto mt-2 max-w-sm text-sm text-ink-3",children:"Group your connected apps into one safe endpoint you can hand to a client, then revoke it in one move."}),(0,e.jsxs)(B,{className:"mt-5",onClick:o,children:[(0,e.jsx)(O,{className:"mr-1.5 h-4 w-4"}),"New gateway"]})]})}t(ye,"EmptyGateways");export{Fe as GatewaysList};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Q=Object.defineProperty;var a=(s,r)=>Q(s,"name",{value:r,configurable:!0});import{i as T}from"./rolldown-runtime-ZpX3ckPj.js";import{Ni as U,Pi as V,i as D,l as E,la as $,m as S,ua as H,w as M}from"./createLucideIcon-CgrPXnTY.js";import{v as R}from"./star-eem0qj3E.js";import{X,_ as C,t as m,v as h}from"./queryKeys-BzT8CD34.js";import{n as L}from"./CompanyContext-fQCNWI_f.js";import{t as k}from"./router-BKzUF9uf.js";import{i as A,n as G,r as J,t as W}from"./tabs-CjHzZxtD.js";import{o as Y,r as Z,t as ee}from"./popover-CWlBonqy.js";import{t as b}from"./button-DI4w5WP7.js";import{t as se}from"./plus-CwNlqadt.js";import{t as te}from"./agents-B8n-p0aX.js";import{t as ae}from"./projects-l3kQxnTp.js";import{n as re}from"./BreadcrumbContext-DNbB7zWn.js";import{t as ne}from"./assets-BOhIBphq.js";import{Tn as j,_ as le,ja as ie,wn as y,ya as oe,zr as ce}from"./index-BcwxLap4.js";import{t as q}from"./InlineEditor-BJTE1pyF.js";import{t as de}from"./separator-6cvFqhvW.js";import{t as me}from"./EntityRow-B24YmFE7.js";import{t as ue}from"./GoalTree-BZUt4xZ3.js";var f=T(H(),1),e=T($(),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:l,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:E("w-full justify-start text-xs"),onClick:a(()=>{l(d),c(!1)},"onClick"),children:pe(d)},d))})]})}a(_,"PickerButton");function xe({goal:s,onUpdate:r}){const{selectedCompanyId:l}=L(),{data:p}=h({queryKey:m.agents.list(l),queryFn:a(()=>te.list(l),"queryFn"),enabled:!!l}),{data:x}=h({queryKey:m.goals.list(l),queryFn:a(()=>j.list(l),"queryFn"),enabled:!!l}),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:U,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:D(c),className:"text-sm hover:underline",children:c.name}):(0,e.jsx)("span",{className:"text-sm text-ink-3",children:"None"})}),s.parentId&&(0,e.jsx)(u,{label:"Parent Goal",children:(0,e.jsx)(k,{to:`/goals/${s.parentId}`,className:"text-sm hover:underline",children:d?.title??s.parentId.slice(0,8)})})]}),(0,e.jsx)(de,{}),(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)(u,{label:"Created",children:(0,e.jsx)("span",{className:"text-sm",children:S(s.createdAt)})}),(0,e.jsx)(u,{label:"Updated",children:(0,e.jsx)("span",{className:"text-sm",children:S(s.updatedAt)})})]})]})}a(xe,"GoalProperties");function he({panelVisible:s,onShowProperties:r}){return(0,e.jsx)(b,{variant:"ghost",size:"icon-xs",className:E("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)(ie,{className:"h-4 w-4"})})}a(he,"GoalPropertiesToggleButton");function ze(){const{goalId:s}=R(),{selectedCompanyId:r,setSelectedCompanyId:l}=L(),{openNewGoal:p}=oe(),{openPanel:x,closePanel:c,panelVisible:d,setPanelVisible:o}=ce(),{setBreadcrumbs:w}=re(),I=X(),{data:n,isLoading:z,error:P}=h({queryKey:m.goals.detail(s),queryFn:a(()=>j.get(s),"queryFn"),enabled:!!s}),i=n?.companyId??r,{data:K}=h({queryKey:m.goals.list(i),queryFn:a(()=>j.list(i),"queryFn"),enabled:!!i}),{data:F}=h({queryKey:m.projects.list(i,{includeArchived:!0}),queryFn:a(()=>ae.list(i,{includeArchived:!0}),"queryFn"),enabled:!!i});(0,f.useEffect)(()=>{!n?.companyId||n.companyId===r||l(n.companyId,{source:"route_sync"})},[n?.companyId,r,l]);const v=C({mutationFn:a(t=>j.update(s,t),"mutationFn"),onSuccess:a(()=>{I.invalidateQueries({queryKey:m.goals.detail(s)}),i&&I.invalidateQueries({queryKey:m.goals.list(i)})},"onSuccess")}),B=C({mutationFn:a(async t=>{if(!i)throw new Error("No organization selected");return ne.uploadImage(i,t,`goals/${s??"draft"}`)},"mutationFn")}),g=(K??[]).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)(()=>{w([{label:"Goals",href:"/goals"},{label:n?.title??s??"Goal"}])},[w,n,s]),(0,f.useEffect)(()=>(n&&x((0,e.jsx)(xe,{goal:n,onUpdate:a(t=>v.mutate(t),"onUpdate")})),()=>c()),[n]),z?(0,e.jsx)(le,{variant:"detail"}):P?(0,e.jsx)("p",{className:"text-sm text-bad",children:P.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(ze,"GoalDetail");export{ze as GoalDetail};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var v=Object.defineProperty;var d=(t,r)=>v(t,"name",{value:r,configurable:!0});import{i as h}from"./rolldown-runtime-ZpX3ckPj.js";import{l,la as _,ua as b}from"./createLucideIcon-CgrPXnTY.js";import{t as k}from"./router-BKzUF9uf.js";import{t as I}from"./chevron-right-BP8JjEC_.js";import{wn as w}from"./index-BcwxLap4.js";var y=h(b(),1),e=h(_(),1);function f({goal:t,children:r,allGoals:o,depth:i,goalLink:c,onSelect:s}){const[n,j]=(0,y.useState)(!0),p=r.length>0,x=c?.(t),m=(0,e.jsxs)(e.Fragment,{children:[p?(0,e.jsx)("button",{className:"p-0.5",onClick:d(a=>{a.preventDefault(),a.stopPropagation(),j(!n)},"onClick"),"aria-label":`${t.title} subtree`,"aria-expanded":n,children:(0,e.jsx)(I,{className:l("h-3 w-3 transition-transform",n&&"rotate-90")})}):(0,e.jsx)("span",{className:"w-4"}),(0,e.jsx)("span",{className:"text-xs text-ink-3 capitalize",children:t.level}),(0,e.jsx)("span",{className:"flex-1 truncate",children:t.title}),(0,e.jsx)(w,{status:t.status})]}),u=l("flex items-center gap-2 px-3 py-1.5 text-sm transition-colors cursor-pointer hover:bg-bg-3/50");return(0,e.jsxs)("div",{children:[x?(0,e.jsx)(k,{to:x,className:l(u,"no-underline text-inherit"),style:{paddingLeft:`${i*16+12}px`},children:m}):(0,e.jsx)("div",{className:u,style:{paddingLeft:`${i*16+12}px`},onClick:d(()=>s?.(t),"onClick"),children:m}),p&&n&&(0,e.jsx)("div",{children:r.map(a=>(0,e.jsx)(f,{goal:a,children:o.filter(N=>N.parentId===a.id),allGoals:o,depth:i+1,goalLink:c,onSelect:s},a.id))})]})}d(f,"GoalNode");function L({goals:t,goalLink:r,onSelect:o}){const i=new Set(t.map(s=>s.id)),c=t.filter(s=>!s.parentId||!i.has(s.parentId));return t.length===0?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"No goals."}):(0,e.jsx)("div",{className:"border border-line py-1",children:c.map(s=>(0,e.jsx)(f,{goal:s,children:t.filter(n=>n.parentId===s.id),allGoals:t,depth:0,goalLink:r,onSelect:o},s.id))})}d(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{la as d,ua as g}from"./createLucideIcon-CgrPXnTY.js";import{t as f,v as x}from"./queryKeys-BzT8CD34.js";import{n as y}from"./CompanyContext-fQCNWI_f.js";import{q as n}from"./router-BKzUF9uf.js";import{t as j}from"./button-DI4w5WP7.js";import{t as _}from"./plus-CwNlqadt.js";import{n as h}from"./BreadcrumbContext-DNbB7zWn.js";import{T as m,Tn as v,_ as N,ya as q}from"./index-BcwxLap4.js";import{t as G}from"./GoalTree-BZUt4xZ3.js";var b=l(g(),1),s=l(d(),1);function L(){const{selectedCompanyId:e}=y(),{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(()=>v.list(e),"queryFn"),enabled:!!e});return e?c?(0,s.jsx)(N,{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)(j,{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 r=(s,t)=>x(s,"name",{value:t,configurable:!0});import{i as m}from"./rolldown-runtime-ZpX3ckPj.js";import{l as i,la as o}from"./createLucideIcon-CgrPXnTY.js";import{a as u,n as d,t as f}from"./avatar-qO_h93F8.js";var e=m(o(),1);function g(s){const t=s.trim().split(/\s+/);return t.length>=2?(t[0][0]+t[t.length-1][0]).toUpperCase():s.slice(0,2).toUpperCase()}r(g,"deriveInitials");var h={xs:"text-sm",sm:"text-xs",default:"text-sm",lg:"text-sm"};function A({name:s,avatarUrl:t,initials:n,size:a="default",shape:l="circle",className:c}){const p=n??g(s);return(0,e.jsxs)("span",{className:i("inline-flex min-w-0 gap-1.5 items-center",a==="xs"&&"gap-1",a==="lg"&&"gap-2",c),title:s,children:[(0,e.jsxs)(f,{size:a,shape:l,"aria-hidden":"true",children:[t&&(0,e.jsx)(u,{src:t,alt:""}),(0,e.jsx)(d,{children:p})]}),(0,e.jsx)("span",{className:i("truncate",h[a]),children:s})]})}r(A,"Identity");export{g as n,A as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var b=Object.defineProperty;var a=(t,n)=>b(t,"name",{value:n,configurable:!0});import{i as w}from"./rolldown-runtime-ZpX3ckPj.js";import{Ei as g,la as k,ua as N}from"./createLucideIcon-CgrPXnTY.js";import{a as C,o as P,r as E,t as L}from"./dist-CEXsZ2vP.js";import{t as _}from"./chevron-left-DnUVccc_.js";import{t as D}from"./chevron-right-BP8JjEC_.js";import{t as A}from"./x-6E1yeU3Q.js";import{Xa as T}from"./index-BcwxLap4.js";import{o as $,s as j}from"./issue-output-BM-lLts2.js";var i=w(N(),1),K=(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 Q(t){return`<!doctype html><html><head><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="${M}"><meta name="referrer" content="no-referrer"></head><body>${t}</body></html>`}a(Q,"htmlPreviewDocument");function R(t){return t.contentType.toLowerCase().split(";")[0]?.trim()??""}a(R,"normalizedContentType");function I(t){return t.originalFilename??t.id}a(I,"attachmentFilename");function U(t){return t.openPath??t.contentPath}a(U,"attachmentOpenPath");function q(t){return t.downloadPath??`${t.contentPath}?download=1`}a(q,"attachmentDownloadPath");function Y(t){const n=R(t);return $(n,t.originalFilename)&&!/^image\/hei[cf](?:-sequence)?$/.test(n)}a(Y,"isImageAttachment");function Z(t){return j(t.contentType,t.originalFilename)}a(Z,"isVideoAttachment");function O(t){return g(t)}a(O,"isMarkdownAttachment");function tt(t){const n=t.contentType.toLowerCase().split(";")[0].trim();return g(t)||F(n,t.originalFilename)||n.startsWith("text/")||/^(application\/(json|xml|javascript|x-yaml|yaml)|application\/[\w.-]+\+json)$/.test(n)||["","application/octet-stream"].includes(n)&&/\.(txt|log|csv|json|yaml|yml|toml|ini|sh|ts|tsx|js|jsx|py|css|html)$/i.test(t.originalFilename??"")}a(tt,"isTextAttachment");var e=w(k(),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)(L,{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)(E,{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)(T,{className:"h-4.5 w-4.5"})}),(0,e.jsx)("button",{type:"button",onClick:a(()=>c(!1),"onClick"),className:"text-white/50 hover:text-white transition-colors",title:"Close",children:(0,e.jsx)(A,{className:"h-5 w-5"})})]})]}),(0,e.jsxs)("div",{className:"flex-1 flex items-center min-h-0",children:[(0,e.jsx)("div",{className:"w-16 md:w-24 shrink-0 flex items-center justify-center h-full",children:t.length>1&&(0,e.jsx)("button",{type:"button",onClick:f,className:"rounded-full bg-white/10 p-3 text-white/60 hover:text-white hover:bg-white/20 transition-colors",title:"Previous",children:(0,e.jsx)(_,{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)(D,{className:"h-7 w-7"})})})]}),(0,e.jsx)("div",{className:"h-6 shrink-0"})]})]})})}a(et,"ImageGalleryModal");export{Y as a,Z as c,K as d,U as i,Q as l,q as n,O as o,I as r,tt as s,et as t,F as u};
|