@microvac/ui 0.0.0-stage → 0.1.0-rc.14
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/README.md +29 -2
- package/dist/android-chrome-192x192.png +0 -0
- package/dist/android-chrome-512x512.png +0 -0
- package/dist/announcement-preview.svg +11 -0
- package/dist/apple-touch-icon.png +0 -0
- package/dist/assets/ActiveAgentsPanel-C9AP9hJu.js +1 -0
- package/dist/assets/AdapterManager-CmxTUKJH.js +1 -0
- package/dist/assets/AdvancedToolsRoute-CXsQnTei.js +39 -0
- package/dist/assets/AgentActionButtons-DWq2OuVK.js +1 -0
- package/dist/assets/AgentAdvancedTab-dhBDxF-H.js +131 -0
- package/dist/assets/AgentBulkSettingsSheet-DYT4ovDg.js +1 -0
- package/dist/assets/AgentChat-r0TPOfPK.js +1 -0
- package/dist/assets/AgentDetailPage-Bc_okBuS.js +39 -0
- package/dist/assets/AgentIdentityChip-CB2NBXkZ.js +1 -0
- package/dist/assets/AgentRosterFilters-b7qMLv8-.js +2 -0
- package/dist/assets/Agents-BsvXy3pZ.js +2 -0
- package/dist/assets/Agents.production-BeOZmzaF.js +2 -0
- package/dist/assets/AnimatedDialogContent-CWshmxP2.js +1 -0
- package/dist/assets/AppDetail-DbqENTF_.js +1 -0
- package/dist/assets/AppNotConnected-BhnCqL0F.js +1 -0
- package/dist/assets/ApprovalDetail-B2KiYLTj.js +1 -0
- package/dist/assets/Approvals-j-wRmqKj.js +1 -0
- package/dist/assets/AppsConnect-CcPVEZ0C.js +1 -0
- package/dist/assets/AppsReview-B8eWvKkS.js +1 -0
- package/dist/assets/ArtifactEmptyGraphic-5mdkS5jj.js +1 -0
- package/dist/assets/Artifacts-Bz7Oo6VX.js +1 -0
- package/dist/assets/AssigneePickerInner-DdpF7hck.js +1 -0
- package/dist/assets/AssistantConnection-BpaaJDc_.js +1 -0
- package/dist/assets/AttentionInlineVerbs-DlPQVCO-.js +1 -0
- package/dist/assets/AttentionQueueRow-BC6ezctS.js +1 -0
- package/dist/assets/AuditHub-BVP7LKL9.js +1 -0
- package/dist/assets/AuditRuns-DqizHgX1.js +1 -0
- package/dist/assets/Auth-DOF0snjp.js +3 -0
- package/dist/assets/BoardChat-BYAbDtfd.js +18 -0
- package/dist/assets/BoardClaim-7y41Pr8e.js +1 -0
- package/dist/assets/BootstrapSetupUxLab-BftH1vOv.js +1 -0
- package/dist/assets/Browse-Ck01W1Yl.js +1 -0
- package/dist/assets/BudgetPolicyCard-CKhrzfgy.js +1 -0
- package/dist/assets/CaseDetail-qlXKJ66D.js +1 -0
- package/dist/assets/CaseStatus-B3RiZVDH.js +1 -0
- package/dist/assets/Cases-CFV3V-5X.js +1 -0
- package/dist/assets/ChatEndpointDetail-7Hi5TJNt.js +5 -0
- package/dist/assets/ChatEndpointSetup-CtwgH6sg.js +1 -0
- package/dist/assets/ChatIdentityConfirm-CXjksBwX.js +1 -0
- package/dist/assets/CliAuth-KVjrGMfZ.js +1 -0
- package/dist/assets/Companies-oeJem3De.js +1 -0
- package/dist/assets/CompanyAccess-vWT6G-n_.js +1 -0
- package/dist/assets/CompanyActivity-zOzzeN1B.js +1 -0
- package/dist/assets/CompanyActivity.production-DbaFBsM0.js +1 -0
- package/dist/assets/CompanyConnections-llSEaVa2.js +1 -0
- package/dist/assets/CompanyEnvironments-BrP-ENHg.css +1 -0
- package/dist/assets/CompanyEnvironments-DNyyGC_S.js +35 -0
- package/dist/assets/CompanyExport-CFa-F8Es.js +4 -0
- package/dist/assets/CompanyImport-DG6qwQ8F.js +1 -0
- package/dist/assets/CompanySettings-Dv5Z3ZQi.js +1 -0
- package/dist/assets/CompanySettingsPluginPage-CZk1d_0d.js +1 -0
- package/dist/assets/CompanySkills-CdzWhJfQ.js +10 -0
- package/dist/assets/CompanySkills.production-IoCRW5FQ.js +10 -0
- package/dist/assets/ConfigureBuiltInAgentModal-BwW7XQ1O.js +1 -0
- package/dist/assets/CopyableGatewayUrl-PTn061ft.js +1 -0
- package/dist/assets/CordisPluginSettings-C_BeeGEc.js +1 -0
- package/dist/assets/Costs-DhuNxwSj.js +1 -0
- package/dist/assets/CrossIssueCollaborationUxLab-ZaAXq46r.js +1 -0
- package/dist/assets/Dashboard-BaDnqiKo.js +2 -0
- package/dist/assets/DashboardLive-D-Ed7osd.js +1 -0
- package/dist/assets/DecisionDateChips-D3pl_mLn.js +1 -0
- package/dist/assets/DecisionHistoryPanel-D5MzyrOh.js +1 -0
- package/dist/assets/DecisionQueuePage-D3UZ9oRk.js +1 -0
- package/dist/assets/DesignGuide-COTo7ICj.js +25 -0
- package/dist/assets/DesignSandboxTaskThread-CMeCSQid.js +28 -0
- package/dist/assets/EmailConnectionAccess-kCL7obSr.js +1 -0
- package/dist/assets/EmailEndpointSetup-BGrksR_u.js +1 -0
- package/dist/assets/EnforcementBanner-_Eb_nK3M.js +1 -0
- package/dist/assets/EntityRow-gpsOgEtu.js +1 -0
- package/dist/assets/ExecutionWorkspaceDetail-DwGkH6d3.js +19 -0
- package/dist/assets/ExternalAgentInviteDialog-CGid6pM9.js +50 -0
- package/dist/assets/FilterBar-1D-VhrvG.js +1 -0
- package/dist/assets/FolderControls-CQ6kef3c.js +1 -0
- package/dist/assets/GatewayDetail-CCqekM1J.js +2 -0
- package/dist/assets/GatewaysList-nFsRcszh.js +1 -0
- package/dist/assets/GitHubConnectionRecovery-B9sFWJup.js +1 -0
- package/dist/assets/GoalDetail-BQ8y55P-.js +1 -0
- package/dist/assets/GoalTree-laRjXp0P.js +1 -0
- package/dist/assets/Goals-Cm14EaeP.js +1 -0
- package/dist/assets/InstanceAccess-DxQ-Akt_.js +1 -0
- package/dist/assets/InstanceExperimentalSettings-BxwqbXNw.js +1 -0
- package/dist/assets/InviteLanding-Cf0L_u6s.js +1 -0
- package/dist/assets/IssueChatLongThreadPerf-BfsF6FdF.js +2 -0
- package/dist/assets/JoinRequestQueue-BXCdTFG_.js +1 -0
- package/dist/assets/Layout.production-CqzU0qMi.js +1 -0
- package/dist/assets/McpConnect-COWnZ9Eb.js +1 -0
- package/dist/assets/MembershipAction-C9i9Sdmi.js +1 -0
- package/dist/assets/MetricCard-Bwnt3_p3.js +1 -0
- package/dist/assets/MissingPluginTabPlaceholder-B0Zxv1Kx.js +1 -0
- package/dist/assets/NewAgent-BIlJ5Dyt.js +1 -0
- package/dist/assets/NewAgentDialog-CJdMxxYL.js +1 -0
- package/dist/assets/NewGoalDialog-B8izfKLm.js +1 -0
- package/dist/assets/NewProjectDialog-DXqjTYFK.js +1 -0
- package/dist/assets/OnboardingPrimitives-DHYBqn_0.js +1 -0
- package/dist/assets/OnboardingWizard-DqSfZ13V.js +2 -0
- package/dist/assets/OrgChart.production-DrSFUf7i.js +1 -0
- package/dist/assets/PaperclipCloudOAuthHandoff-jPUvjJ8q.js +1 -0
- package/dist/assets/PluginManager-h3LFPaUq.js +1 -0
- package/dist/assets/PluginPage-E5Im4454.js +1 -0
- package/dist/assets/PluginSettings-BBO0jAgo.js +1 -0
- package/dist/assets/ProfileDetailRoute-CQBD7fms.js +1 -0
- package/dist/assets/ProfileSettings-BwnVEHLp.js +1 -0
- package/dist/assets/ProfileWizardRoute-By_SC6Gn.js +1 -0
- package/dist/assets/ProjectDetail-CbiwFBAE.js +1 -0
- package/dist/assets/ProjectRepositoryInput-DZF9bX4E.js +1 -0
- package/dist/assets/ProjectWorkspaceDetail-DPsl_4bD.js +29 -0
- package/dist/assets/ProjectWorkspacesContent-COH4dOWK.js +1 -0
- package/dist/assets/Projects-Ch9Qu7sn.js +1 -0
- package/dist/assets/QuotaBar-DIFOT9Uh.js +1 -0
- package/dist/assets/RepositoryEditor-DHB1bqId.js +1 -0
- package/dist/assets/Responsibilities-C5O0JXXG.js +4 -0
- package/dist/assets/ResponsibilityDetail-D6NpZpkm.js +1 -0
- package/dist/assets/ResponsibleUserDenialUxLab-CFrIWYwe.js +1 -0
- package/dist/assets/ReviewQueueCard-BPC4Lm67.js +1 -0
- package/dist/assets/RoutineAuditActivity-sKyzMajz.js +1 -0
- package/dist/assets/RoutineDetail-CG8HF5fp.js +2 -0
- package/dist/assets/RoutineRunVariablesDialog-CKh3CmLD.js +1 -0
- package/dist/assets/Routines-tF2qfUKo.js +1 -0
- package/dist/assets/Routines.production-BTyj1Ljr.js +1 -0
- package/dist/assets/RoutinesToolbar-CvUFVCGN.js +1 -0
- package/dist/assets/Search-Z9D0NuS1.js +1 -0
- package/dist/assets/Secrets-DgmbLOJK.js +4 -0
- package/dist/assets/SkillBinaryFile-F3_9qcaM.js +1 -0
- package/dist/assets/SkillCardIcon-CXHUCMej.js +2 -0
- package/dist/assets/SkillFolderTree-CB3lrTIE.js +1 -0
- package/dist/assets/SkillSourceTree-BbuciCo6.js +2 -0
- package/dist/assets/SkillSources-Dlo6Cew3.js +2 -0
- package/dist/assets/SkillStudio-ZO-Nf7eI.js +9 -0
- package/dist/assets/SkillsNavigationTabs-B9Iqnlqt.js +1 -0
- package/dist/assets/SpekoPhoneCallback-C4VnMiZh.js +1 -0
- package/dist/assets/SpekoProviderSetup-I4evPZb3.js +1 -0
- package/dist/assets/StatusCards-D0MVzbsw.js +1 -0
- package/dist/assets/SummarySlotCard-DUXgZPxG.js +1 -0
- package/dist/assets/TailscaleConnector-CMhT73gj.js +1 -0
- package/dist/assets/TaskChatLab-D9-KAE-7.js +11 -0
- package/dist/assets/TaskSummaryList-CUxieFNe.js +1 -0
- package/dist/assets/Timeline-BNMoRbtK.js +1 -0
- package/dist/assets/ToolsAdminGate-CEr0zy2T.js +1 -0
- package/dist/assets/TrustPresetSection-B9YXZtkh.js +1 -0
- package/dist/assets/UserProfile-D-tnW96X.js +1 -0
- package/dist/assets/WebhookUrlWarning-Ba_DixKh.js +1 -0
- package/dist/assets/WhatNeedsMe-B-Jzj8_M.js +1 -0
- package/dist/assets/Workspaces-BqhDI_Bl.js +1 -0
- package/dist/assets/abnfDiagram-YUKMZFIV-Bn9P-nUW.js +1 -0
- package/dist/assets/apl-MHzTCvfx.js +1 -0
- package/dist/assets/arc-Dnq9Aszq.js +1 -0
- package/dist/assets/architecture-WOLXFQ4H-V1ldsZlt.js +1 -0
- package/dist/assets/architectureDiagram-47P4ROYG-BkYxt-Gc.js +36 -0
- package/dist/assets/array-CL5Tisss.js +1 -0
- package/dist/assets/arrow-down-left-o81ENfeW.js +1 -0
- package/dist/assets/asciiarmor-DFLNSgns.js +1 -0
- package/dist/assets/asn1-CfPVWRYE.js +1 -0
- package/dist/assets/asterisk-CJ4OeA7Y.js +1 -0
- package/dist/assets/blockDiagram-E7TT5TSB-BO7pPYbp.js +140 -0
- package/dist/assets/brainfuck-NEHkmXMc.js +1 -0
- package/dist/assets/budgets-0Dw6TH1A.js +1 -0
- package/dist/assets/building-complex-DciZTnys.js +1 -0
- package/dist/assets/c4Diagram-CRA5TL53-D4EpmmzV.js +38 -0
- package/dist/assets/channel-BQh2vFIU.js +1 -0
- package/dist/assets/character-CguPM7IG.js +1 -0
- package/dist/assets/chat-channels-DWyry-9M.js +1 -0
- package/dist/assets/chunk-2BW5OAIV-DFXIyCJy.js +10 -0
- package/dist/assets/chunk-2Q5K7J3B-CkPHWFj-.js +1 -0
- package/dist/assets/chunk-3YJQHVM4-Dj5wEKIw.js +2 -0
- package/dist/assets/chunk-4EA7E6EY-5XiUVgzK.js +1 -0
- package/dist/assets/chunk-5VM5RSS4-2H3r6wq0.js +15 -0
- package/dist/assets/chunk-7TKQ45FW-D0opKcsy.js +1 -0
- package/dist/assets/chunk-AW2ZBBNX-DnjsTe04.js +88 -0
- package/dist/assets/chunk-DBDB3WZW-DNqSQPZ0.js +1 -0
- package/dist/assets/chunk-DUW6YSOI-slPglwIh.js +1 -0
- package/dist/assets/chunk-E2ZNV5FY-cjSf_BTz.js +70 -0
- package/dist/assets/chunk-EU5HNXII-CZYBiaSw.js +213 -0
- package/dist/assets/chunk-FVRAUYC3-DSc0-wJA.js +2 -0
- package/dist/assets/chunk-HJ2JQQFS-MXK0gYSP.js +1 -0
- package/dist/assets/chunk-HTAEGDNF-BjDZm_5k.js +1 -0
- package/dist/assets/chunk-J5ZVWO5B-ClU583ja.js +1 -0
- package/dist/assets/chunk-JWPE2WC7--HEGjv3t.js +1 -0
- package/dist/assets/chunk-KQW6MTUR-Bfj0tDmO.js +1 -0
- package/dist/assets/chunk-NGNAAXSQ-e5XI1hSt.js +128 -0
- package/dist/assets/chunk-NTY3LDVX-Bpz5TkVb.js +1 -0
- package/dist/assets/chunk-VPRB5NB3-CfeHjtbb.js +129 -0
- package/dist/assets/chunk-XC4XBNZT-FBCWmi6K.js +62 -0
- package/dist/assets/chunk-XXDRQBXY-BdWplhUD.js +1 -0
- package/dist/assets/chunk-Y2CYZVJY-OvsAdhaO.js +1 -0
- package/dist/assets/circle-slash-DqKFFqfb.js +1 -0
- package/dist/assets/classDiagram-v2-K4WV4PDN-DbC_J0kK.js +217 -0
- package/dist/assets/clike-CIx9nZSv.js +1 -0
- package/dist/assets/clojure-DFaIEz5O.js +1 -0
- package/dist/assets/cmake-koz-qBlo.js +1 -0
- package/dist/assets/cobol-Bo8Zw9gB.js +1 -0
- package/dist/assets/coffeescript-CXYzYf-Y.js +1 -0
- package/dist/assets/coins-BztUbqyl.js +1 -0
- package/dist/assets/collections-BxrcELwt.js +3 -0
- package/dist/assets/commonlisp-C4OOCwkD.js +1 -0
- package/dist/assets/company-skill-routes-D5LJ1l8M.js +1 -0
- package/dist/assets/company-skill-summary-DnWVmP1S.js +1 -0
- package/dist/assets/configuration-warnings-CZKSfHJv.js +2 -0
- package/dist/assets/connection-owner-D-ikSHyR.js +1 -0
- package/dist/assets/cose-bilkent-JH36ORCC-DFyVDb92.js +1 -0
- package/dist/assets/crystal-BlJXQDvy.js +1 -0
- package/dist/assets/css-DEZwfVpY.js +1 -0
- package/dist/assets/cynefin-EF2NZ3EQ-COwSJ4qP.js +1 -0
- package/dist/assets/cynefinDiagram-3GCD6N5R-diaEJq9Y.js +62 -0
- package/dist/assets/cypher-z2oFsVv2.js +1 -0
- package/dist/assets/cytoscape.esm-C2vp4vBx.js +321 -0
- package/dist/assets/d-Dkt6y7AQ.js +1 -0
- package/dist/assets/dagre-W4DXFKR2-BPAMRuIj.js +4 -0
- package/dist/assets/defaultLocale-C2Bpu8Ih.js +1 -0
- package/dist/assets/definition-DxwMBXnu.js +1 -0
- package/dist/assets/diagram-2UJZ2QOL-BvRnO1Id.js +200 -0
- package/dist/assets/diagram-OVF4WLC6-CDgBeD0m.js +24 -0
- package/dist/assets/diagram-PFPMY2P6-DAw9lREG.js +30 -0
- package/dist/assets/diagram-UMYRVEAY-ZQqQn22t.js +24 -0
- package/dist/assets/diagram-YEKJPTXX-CoJtGgWs.js +41 -0
- package/dist/assets/diagram-ZIFT7M5P-qW_Zn_bO.js +3 -0
- package/dist/assets/diff-C60bAYOU.js +1 -0
- package/dist/assets/dist-B2E6oBK1.js +1 -0
- package/dist/assets/dist-B6Qde8KJ.js +1 -0
- package/dist/assets/dist-BCJybC91.js +1 -0
- package/dist/assets/dist-CG-phytt.js +1 -0
- package/dist/assets/dist-CG6fC1Db.js +1 -0
- package/dist/assets/dist-CPgRB-NQ.js +1 -0
- package/dist/assets/dist-CTlCK4Pe.js +1 -0
- package/dist/assets/dist-CYRzGbSY.js +7 -0
- package/dist/assets/dist-Cd7wdKYE.js +39 -0
- package/dist/assets/dist-CdmdXwCZ.js +1 -0
- package/dist/assets/dist-CeSzCyeG.js +1 -0
- package/dist/assets/dist-CjRqeLFz.js +2 -0
- package/dist/assets/dist-CuwPDbnL.js +1 -0
- package/dist/assets/dist-CvRpZH53.js +1 -0
- package/dist/assets/dist-DKyBHaH2.js +1 -0
- package/dist/assets/dist-DML0cJH3.js +13 -0
- package/dist/assets/dist-DXjkgaZX.js +1 -0
- package/dist/assets/dist-DZIxMHOT.js +1 -0
- package/dist/assets/dist-DZruZxAk.js +1 -0
- package/dist/assets/dist-DbXGl-wj.js +3 -0
- package/dist/assets/dist-Dl94YqeS.js +1 -0
- package/dist/assets/dist-DylHAy-6.js +1 -0
- package/dist/assets/dist-IcdxEhjC.js +1 -0
- package/dist/assets/dist-_EtfntKJ.js +6 -0
- package/dist/assets/dist-ptDa9fKh.js +1 -0
- package/dist/assets/dockerfile-BttNdtK0.js +1 -0
- package/dist/assets/dtd-CCVZU5Da.js +1 -0
- package/dist/assets/dylan-3pmV5wzs.js +1 -0
- package/dist/assets/ebnf-bm-I2WIh.js +1 -0
- package/dist/assets/ebnfDiagram-VR2GEFS7-DA4UvKXV.js +1 -0
- package/dist/assets/ecl-BIv3PrZb.js +1 -0
- package/dist/assets/eiffel-DuLnr4-r.js +1 -0
- package/dist/assets/elk-IJKZMXRS-CM74d3mJ.js +25 -0
- package/dist/assets/elm-njbaCU-L.js +1 -0
- package/dist/assets/erDiagram-O2IAPWRE-d869V0qL.js +99 -0
- package/dist/assets/erlang-CuhOC2I8.js +1 -0
- package/dist/assets/eventmodeling-K75KTNOO-C-oz_eyI.js +1 -0
- package/dist/assets/factor-CM3-9V3b.js +1 -0
- package/dist/assets/fcl-nWsMJ92o.js +1 -0
- package/dist/assets/flowDiagram-OXPTDLAJ-Be1xLbJu.js +1 -0
- package/dist/assets/folder-plus-CxWXoYCi.js +1 -0
- package/dist/assets/forth-BQ9HrCVY.js +1 -0
- package/dist/assets/fortran-DHJe28ev.js +1 -0
- package/dist/assets/ganttDiagram-R7TSEDQI-BBul4Kpm.js +292 -0
- package/dist/assets/gas-ByO0qYMr.js +1 -0
- package/dist/assets/gherkin-CwOmHL5K.js +1 -0
- package/dist/assets/gitGraph-VSP46ZUC-BriEZgAq.js +1 -0
- package/dist/assets/gitGraphDiagram-XJZIOB7I-I12rg8s1.js +106 -0
- package/dist/assets/goals-CvMWzjH4.js +1 -0
- package/dist/assets/googleAccessRemoval-CQIi1dvu.js +1 -0
- package/dist/assets/graphlib-DHhK3saS.js +1 -0
- package/dist/assets/groovy-ByXGF8cx.js +1 -0
- package/dist/assets/haskell-CHSpCNOy.js +1 -0
- package/dist/assets/haxe-P2jh68ck.js +1 -0
- package/dist/assets/http-0jwMmfWP.js +1 -0
- package/dist/assets/idl-DTVVj6r5.js +1 -0
- package/dist/assets/index-Bt31d8ga.js +706 -0
- package/dist/assets/index-z7lcCz2I.css +1 -0
- package/dist/assets/info-OHQRW6UA-CxrcGiem.js +1 -0
- package/dist/assets/infoDiagram-5W2HQ5XZ-4Sm0LiOu.js +2 -0
- package/dist/assets/init-BXPE0p7i.js +1 -0
- package/dist/assets/invite-memory-BKdqfr5K.js +1 -0
- package/dist/assets/ishikawaDiagram-K3B6WC7H-CKXvKV-s.js +70 -0
- package/dist/assets/issue-detail-4PCbYpdv.js +119 -0
- package/dist/assets/javascript-Cblpdx44.js +1 -0
- package/dist/assets/journeyDiagram-COXZFDF6-BHsrZLvQ.js +139 -0
- package/dist/assets/julia-KVJvUu_F.js +1 -0
- package/dist/assets/kanban-definition-P3RFRI5V-8HhnIs_l.js +89 -0
- package/dist/assets/katex-Du_FPwxl.js +257 -0
- package/dist/assets/line-rrKrpB-b.js +1 -0
- package/dist/assets/linear-BRQgexd0.js +1 -0
- package/dist/assets/link-BecLzmfo.js +1 -0
- package/dist/assets/list-filter-BC3D4IoX.js +1 -0
- package/dist/assets/livescript-DSHsJPcD.js +1 -0
- package/dist/assets/log-in-BJCGwGGT.js +1 -0
- package/dist/assets/lua-Vher-70I.js +1 -0
- package/dist/assets/mathematica-CE9SaVsW.js +1 -0
- package/dist/assets/mbox-JGl1Fgvq.js +1 -0
- package/dist/assets/mcpSkills-DRs3pGKn.js +1 -0
- package/dist/assets/mermaid-parser.core-DmG0b4S0.js +7 -0
- package/dist/assets/mermaid.core-D1vILTuF.js +42 -0
- package/dist/assets/mindmap-definition-LZFPQGKD-DIMpL0de.js +96 -0
- package/dist/assets/mirc-BGWbO906.js +1 -0
- package/dist/assets/mllike-DuNQsEw8.js +1 -0
- package/dist/assets/model-DL5biheO.js +1 -0
- package/dist/assets/modelica-5XCgKQt8.js +1 -0
- package/dist/assets/mscgen-mVFg19ri.js +1 -0
- package/dist/assets/mumps-C7oS353s.js +1 -0
- package/dist/assets/nginx-DXVlpyCz.js +1 -0
- package/dist/assets/nsis-KFC6hioG.js +1 -0
- package/dist/assets/ntriples-5ckCopnn.js +1 -0
- package/dist/assets/octave-D1J2QQNt.js +1 -0
- package/dist/assets/onboarding-state-C5_mIw3o.js +1 -0
- package/dist/assets/ordinal-BJyFM1v8.js +1 -0
- package/dist/assets/oz-CPsllMDD.js +1 -0
- package/dist/assets/packet-JDAUHWVQ-BnbYht3G.js +1 -0
- package/dist/assets/palette-tokens-CL5ZDrEd.js +1 -0
- package/dist/assets/pascal-B-I6JP0Y.js +1 -0
- package/dist/assets/path-D6mommQw.js +1 -0
- package/dist/assets/pegDiagram-BGZESJAR-BUjtJVjT.js +1 -0
- package/dist/assets/perl-CI8WIWBi.js +1 -0
- package/dist/assets/pie-XZMESJXO-CM4VXUb-.js +1 -0
- package/dist/assets/pieDiagram-CAPJLFHJ-B3v8ryvG.js +39 -0
- package/dist/assets/pig-FQI0W3S3.js +1 -0
- package/dist/assets/portable-files-CloN_vbk.js +1 -0
- package/dist/assets/power-0mw59G-l.js +1 -0
- package/dist/assets/powershell-BAu6x78A.js +1 -0
- package/dist/assets/prod-C6Q7tISe.js +495 -0
- package/dist/assets/profile-summary-B5rPf8v-.js +1 -0
- package/dist/assets/properties-BKTTDgau.js +1 -0
- package/dist/assets/protobuf-UWh8gh_j.js +1 -0
- package/dist/assets/pug-C20tNwmy.js +1 -0
- package/dist/assets/puppet-BAHVzCkO.js +1 -0
- package/dist/assets/python-C2DOnsac.js +1 -0
- package/dist/assets/q-Cooe-Nh8.js +1 -0
- package/dist/assets/quadrantDiagram-GDMTTRAM-Cv-dS2Rn.js +7 -0
- package/dist/assets/r-CktBKya9.js +1 -0
- package/dist/assets/radar-ABXABTNO-v6yZj4Fk.js +1 -0
- package/dist/assets/railroad-I3PHUGI6-D-U8Cs0m.js +1 -0
- package/dist/assets/railroad-abnf-LNEFI6M7-Dw3fkrVy.js +1 -0
- package/dist/assets/railroad-ebnf-DWYD2UWJ-_ln-e3Tx.js +1 -0
- package/dist/assets/railroad-peg-JR7BVNR7-Bf8u1-RZ.js +1 -0
- package/dist/assets/railroadDiagram-SM67HX2B-Drr5UhQI.js +1 -0
- package/dist/assets/requirementDiagram-X7JNWC4A-D5ef6_ac.js +84 -0
- package/dist/assets/rolldown-runtime-DhZMWcEn.js +1 -0
- package/dist/assets/rough.esm-DnC5Tr1g.js +1 -0
- package/dist/assets/rpm-Csj9nLHl.js +1 -0
- package/dist/assets/ruby-bGx9eo-K.js +1 -0
- package/dist/assets/runtime-IAg0vdY9.js +4137 -0
- package/dist/assets/sankeyDiagram-UM26HJRW-DncJWIz_.js +40 -0
- package/dist/assets/sas-Drou_EQ9.js +1 -0
- package/dist/assets/saved-permissions-CizWg8-P.js +1 -0
- package/dist/assets/scheme-DcjG9bAf.js +1 -0
- package/dist/assets/scroll-text-Ck6HB7eM.js +1 -0
- package/dist/assets/sdk-CWyUlmcn.js +1 -0
- package/dist/assets/search-DkTqg7ab.js +1 -0
- package/dist/assets/send-CYVi50sh.js +1 -0
- package/dist/assets/sequenceDiagram-ZO4K6R2Y-Cs0nGCCg.js +169 -0
- package/dist/assets/shared-CIwISWMj.js +1 -0
- package/dist/assets/shell-BSKClwid.js +1 -0
- package/dist/assets/sieve-CcvsXPZo.js +1 -0
- package/dist/assets/simple-mode-B79cVo-x.js +1 -0
- package/dist/assets/sizeCapture-INFHLROL-XURNLuv_.js +1 -0
- package/dist/assets/skill-source-connect-return-eFTeuj7y.js +1 -0
- package/dist/assets/smalltalk-Cmg-4mjQ.js +1 -0
- package/dist/assets/smoke-lab-matrix-A7ubFpfk.js +1 -0
- package/dist/assets/solr-Dj8ahEwG.js +1 -0
- package/dist/assets/sparql-LAJYmgfk.js +1 -0
- package/dist/assets/spreadsheet-B8doD_pL.js +1 -0
- package/dist/assets/sql-C3kWxFGw.js +1 -0
- package/dist/assets/src-DYjgETqR.js +1 -0
- package/dist/assets/stateDiagram-v2-TBUQTH76-Dpp3m5Wq.js +291 -0
- package/dist/assets/stex-CW6K5Nmu.js +1 -0
- package/dist/assets/stylus-BS-Ienrc.js +1 -0
- package/dist/assets/swift-BD82LMDK.js +1 -0
- package/dist/assets/swimlanes-N4OXWK64-NXVbx1w8.js +1 -0
- package/dist/assets/swimlanesDiagram-K3J5GTZL-Ct3LnXZt.js +8 -0
- package/dist/assets/tcl-RZa1cqc-.js +1 -0
- package/dist/assets/textile-C-BY_OGF.js +1 -0
- package/dist/assets/tiddlywiki-C9bm_Oju.js +1 -0
- package/dist/assets/tiki-DJOT-rFT.js +1 -0
- package/dist/assets/timeline-definition-YOQAKGHF-DqI-Mv2e.js +120 -0
- package/dist/assets/toml-Civ2fTsu.js +1 -0
- package/dist/assets/treeView-D4JQ5SDB-CZBlE7ya.js +1 -0
- package/dist/assets/treemap-SAJKECNS-BlueznID.js +1 -0
- package/dist/assets/troff-Lns35Xcq.js +1 -0
- package/dist/assets/ttcn-7vlxVTUK.js +1 -0
- package/dist/assets/ttcn-cfg-B8qhhp6o.js +1 -0
- package/dist/assets/turtle-DTIS1YQ7.js +1 -0
- package/dist/assets/useAgentlessOnboardingAutoOpen-CnFwEQ-H.js +1 -0
- package/dist/assets/useAuthorizationWindow-DnFQsiFj.js +1 -0
- package/dist/assets/useDateRange-9EbqkWXy.js +1 -0
- package/dist/assets/useFastResponsesEnabled-D8dunm4j.js +1 -0
- package/dist/assets/usePageView-BiX5i8ck.js +1 -0
- package/dist/assets/useProfilesData-0VYQ4lAT.js +1 -0
- package/dist/assets/useReviewCount-WBWxwKI3.js +1 -0
- package/dist/assets/useRoutineFormOptions-DnX5DBn1.js +3 -0
- package/dist/assets/useSummaryDraftStream-DPQRvaXT.js +3 -0
- package/dist/assets/useTailscaleConnections-BDff6dWx.js +1 -0
- package/dist/assets/usecaseDiagram-VIAY4XPW-BSDn8OaJ.js +362 -0
- package/dist/assets/vb-BO8UacKu.js +1 -0
- package/dist/assets/vbscript-DWLru3lT.js +1 -0
- package/dist/assets/velocity-BIIn-Nl2.js +1 -0
- package/dist/assets/vennDiagram-BLWOH2XV-BBSA9KNN.js +34 -0
- package/dist/assets/verilog-BVYlmXGg.js +1 -0
- package/dist/assets/vhdl-Cn8cC8Yb.js +1 -0
- package/dist/assets/wardley-7MLQ67FV-CsT-rTZ9.js +1 -0
- package/dist/assets/wardleyDiagram-YMQ3BMBF-BLClsIjw.js +78 -0
- package/dist/assets/webidl-ChvzbZ5-.js +1 -0
- package/dist/assets/xquery-BKN7qEbU.js +1 -0
- package/dist/assets/xychartDiagram-TAQBALBS-2x4wB0gq.js +7 -0
- package/dist/assets/yacas-BG9ha7tU.js +1 -0
- package/dist/assets/z80-CB2cGLew.js +1 -0
- package/dist/brands/adapters/LICENSE +21 -0
- package/dist/brands/adapters/README.md +7 -0
- package/dist/brands/adapters/cursor-dark.svg +1 -0
- package/dist/brands/adapters/cursor.svg +1 -0
- package/dist/brands/adapters/gemini-color.svg +1 -0
- package/dist/brands/adapters/grok-dark.svg +1 -0
- package/dist/brands/adapters/grok.svg +1 -0
- package/dist/brands/adapters/hermesagent-dark.svg +1 -0
- package/dist/brands/adapters/hermesagent.svg +1 -0
- package/dist/brands/adapters/kimi-color-light.svg +1 -0
- package/dist/brands/adapters/kimi-color.svg +1 -0
- package/dist/brands/adapters/openai-dot.README.md +7 -0
- package/dist/brands/adapters/openai-dot.svg +3 -0
- package/dist/brands/adapters/pi-dark.svg +1 -0
- package/dist/brands/adapters/pi.svg +1 -0
- package/dist/brands/apps/1password-dark.svg +1 -0
- package/dist/brands/apps/1password.svg +1 -0
- package/dist/brands/apps/LOBE-LICENSE +21 -0
- package/dist/brands/apps/agentmail-dark.svg +16 -0
- package/dist/brands/apps/agentmail.svg +17 -0
- package/dist/brands/apps/airtable.svg +1 -0
- package/dist/brands/apps/anthropic-dark.svg +1 -0
- package/dist/brands/apps/anthropic.svg +1 -0
- package/dist/brands/apps/antigravity.svg +31 -0
- package/dist/brands/apps/api-key-generic.svg +1 -0
- package/dist/brands/apps/arcade.png +0 -0
- package/dist/brands/apps/asana.svg +12 -0
- package/dist/brands/apps/aws-dark.svg +1 -0
- package/dist/brands/apps/aws.svg +1 -0
- package/dist/brands/apps/bedrock.svg +1 -0
- package/dist/brands/apps/beehiiv.png +0 -0
- package/dist/brands/apps/bitly.svg +1 -0
- package/dist/brands/apps/box.svg +1 -0
- package/dist/brands/apps/braintrust-dark.png +0 -0
- package/dist/brands/apps/braintrust.png +0 -0
- package/dist/brands/apps/brex-dark.svg +1 -0
- package/dist/brands/apps/brex.svg +1 -0
- package/dist/brands/apps/browser-use.svg +6 -0
- package/dist/brands/apps/calendly.png +0 -0
- package/dist/brands/apps/candid.png +0 -0
- package/dist/brands/apps/circleback.png +0 -0
- package/dist/brands/apps/clickhouse-dark.svg +1 -0
- package/dist/brands/apps/clickhouse.svg +1 -0
- package/dist/brands/apps/clickup.png +0 -0
- package/dist/brands/apps/cloudflare.svg +1 -0
- package/dist/brands/apps/cloudinary-dark.svg +1 -0
- package/dist/brands/apps/cloudinary.svg +3 -0
- package/dist/brands/apps/coda.svg +1 -0
- package/dist/brands/apps/cognee.png +0 -0
- package/dist/brands/apps/composio-dark.svg +11 -0
- package/dist/brands/apps/composio.svg +16 -0
- package/dist/brands/apps/connection-pool.svg +1 -0
- package/dist/brands/apps/context7-dark.svg +8 -0
- package/dist/brands/apps/context7.svg +8 -0
- package/dist/brands/apps/daytona-dark.svg +1 -0
- package/dist/brands/apps/daytona.svg +1 -0
- package/dist/brands/apps/discord-dark.svg +1 -0
- package/dist/brands/apps/discord.svg +1 -0
- package/dist/brands/apps/ditto.png +0 -0
- package/dist/brands/apps/egnyte.svg +1 -0
- package/dist/brands/apps/embat.svg +1 -0
- package/dist/brands/apps/enterpret.png +0 -0
- package/dist/brands/apps/exa.svg +5 -0
- package/dist/brands/apps/executor.png +0 -0
- package/dist/brands/apps/firecrawl.svg +12 -0
- package/dist/brands/apps/fireflies.svg +76 -0
- package/dist/brands/apps/gauge.png +0 -0
- package/dist/brands/apps/github-copilot-dark.svg +1 -0
- package/dist/brands/apps/github-copilot.svg +1 -0
- package/dist/brands/apps/github-dark.svg +10 -0
- package/dist/brands/apps/github.svg +10 -0
- package/dist/brands/apps/gmail.svg +1 -0
- package/dist/brands/apps/google-calendar.svg +1 -0
- package/dist/brands/apps/google-chat.svg +1 -0
- package/dist/brands/apps/google-docs.svg +1 -0
- package/dist/brands/apps/google-drive.svg +1 -0
- package/dist/brands/apps/google-people.svg +1 -0
- package/dist/brands/apps/google-sheets.svg +1 -0
- package/dist/brands/apps/google-slides.svg +1 -0
- package/dist/brands/apps/google-workspace-search.svg +1 -0
- package/dist/brands/apps/google.svg +1 -0
- package/dist/brands/apps/gsc-wizard.png +0 -0
- package/dist/brands/apps/honcho.svg +33 -0
- package/dist/brands/apps/hugging-face.svg +8 -0
- package/dist/brands/apps/imessage-photon.png +0 -0
- package/dist/brands/apps/jam-dev-dark.svg +1 -0
- package/dist/brands/apps/jam-dev.svg +1 -0
- package/dist/brands/apps/jira-dark.svg +1 -0
- package/dist/brands/apps/jira.svg +4 -0
- package/dist/brands/apps/kernel.svg +3 -0
- package/dist/brands/apps/klaviyo.png +0 -0
- package/dist/brands/apps/linear-dark.svg +5 -0
- package/dist/brands/apps/linear.svg +5 -0
- package/dist/brands/apps/local-falcon.png +0 -0
- package/dist/brands/apps/make-dark.svg +1 -0
- package/dist/brands/apps/make.svg +1 -0
- package/dist/brands/apps/manifest.json +756 -0
- package/dist/brands/apps/manufact-dark.svg +6 -0
- package/dist/brands/apps/manufact.svg +5 -0
- package/dist/brands/apps/mem0.svg +1 -0
- package/dist/brands/apps/microsoft-teams.svg +68 -0
- package/dist/brands/apps/miro-dark.svg +1 -0
- package/dist/brands/apps/miro.svg +4 -0
- package/dist/brands/apps/mixpanel-dark.svg +1 -0
- package/dist/brands/apps/mixpanel.svg +1 -0
- package/dist/brands/apps/monday-dark.png +0 -0
- package/dist/brands/apps/monday.png +0 -0
- package/dist/brands/apps/neon.png +0 -0
- package/dist/brands/apps/netlify-dark.svg +1 -0
- package/dist/brands/apps/netlify.svg +16 -0
- package/dist/brands/apps/notion-dark.svg +1 -0
- package/dist/brands/apps/notion.svg +1 -0
- package/dist/brands/apps/oauth-generic.svg +1 -0
- package/dist/brands/apps/openai-dark.svg +1 -0
- package/dist/brands/apps/openai.svg +1 -0
- package/dist/brands/apps/openrouter-dark.svg +3 -0
- package/dist/brands/apps/openrouter.svg +3 -0
- package/dist/brands/apps/oreilly.svg +1 -0
- package/dist/brands/apps/pagerduty.svg +4 -0
- package/dist/brands/apps/paperclip-notebook-dark.svg +1 -0
- package/dist/brands/apps/paperclip-notebook.svg +1 -0
- package/dist/brands/apps/parallel-dark.svg +11 -0
- package/dist/brands/apps/parallel.svg +11 -0
- package/dist/brands/apps/planetscale-dark.svg +1 -0
- package/dist/brands/apps/planetscale.svg +1 -0
- package/dist/brands/apps/posthog-dark.svg +1 -0
- package/dist/brands/apps/posthog.svg +1 -0
- package/dist/brands/apps/postman.svg +1 -0
- package/dist/brands/apps/railway-dark.svg +1 -0
- package/dist/brands/apps/railway.svg +1 -0
- package/dist/brands/apps/razorpay-dark.svg +1 -0
- package/dist/brands/apps/razorpay.svg +1 -0
- package/dist/brands/apps/resend-dark.svg +1 -0
- package/dist/brands/apps/resend.svg +1 -0
- package/dist/brands/apps/sanity-dark.svg +1 -0
- package/dist/brands/apps/sanity.svg +1 -0
- package/dist/brands/apps/sentry-dark.svg +1 -0
- package/dist/brands/apps/sentry.svg +1 -0
- package/dist/brands/apps/shopify.svg +24 -0
- package/dist/brands/apps/similarweb-dark.svg +1 -0
- package/dist/brands/apps/similarweb.svg +1 -0
- package/dist/brands/apps/slack.png +0 -0
- package/dist/brands/apps/slack.svg +17 -0
- package/dist/brands/apps/speko.svg +16 -0
- package/dist/brands/apps/stripe.svg +11 -0
- package/dist/brands/apps/supabase.svg +15 -0
- package/dist/brands/apps/superagent.png +0 -0
- package/dist/brands/apps/supermemory.png +0 -0
- package/dist/brands/apps/tailscale.png +0 -0
- package/dist/brands/apps/tavily.png +0 -0
- package/dist/brands/apps/telegram.svg +12 -0
- package/dist/brands/apps/telem-dark.svg +9 -0
- package/dist/brands/apps/telem.svg +9 -0
- package/dist/brands/apps/ticket-tailor-dark.svg +1 -0
- package/dist/brands/apps/ticket-tailor.svg +1 -0
- package/dist/brands/apps/ticktick.svg +1 -0
- package/dist/brands/apps/todoist.svg +1 -0
- package/dist/brands/apps/unikraft.svg +1 -0
- package/dist/brands/apps/vercel-dark.svg +1 -0
- package/dist/brands/apps/vercel.svg +1 -0
- package/dist/brands/apps/webflow.svg +1 -0
- package/dist/brands/apps/windsor-ai.png +0 -0
- package/dist/brands/apps/wix-dark.svg +12 -0
- package/dist/brands/apps/wix.svg +12 -0
- package/dist/brands/apps/xai-dark.svg +1 -0
- package/dist/brands/apps/xai.svg +1 -0
- package/dist/brands/apps/xero.svg +1 -0
- package/dist/brands/apps/youcom-dark.svg +13 -0
- package/dist/brands/apps/youcom.svg +13 -0
- package/dist/brands/apps/zapier.svg +1 -0
- package/dist/brands/apps/zep.png +0 -0
- package/dist/brands/claude-color.svg +17 -0
- package/dist/brands/codex-color.svg +17 -0
- package/dist/brands/opencode-logo-dark-square.svg +18 -0
- package/dist/brands/opencode-logo-light-square.svg +18 -0
- package/dist/favicon-16x16.png +0 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/favicon.svg +7 -0
- package/dist/fonts/InterVariable-Italic.woff2 +0 -0
- package/dist/fonts/InterVariable.woff2 +0 -0
- package/dist/fonts/NOTICE.md +30 -0
- package/dist/fonts/PaperMono-OFL.txt +93 -0
- package/dist/fonts/PaperMono-Variable.woff2 +0 -0
- package/dist/index.html +165 -0
- package/dist/microvac-push-sw.js +37 -0
- package/dist/paperclip-thinking.svg +17 -0
- package/dist/site.webmanifest +30 -0
- package/dist/storybook/grok-comparison.csv +4 -0
- package/dist/sw.js +176 -0
- package/dist/worktree-favicon-16x16.png +0 -0
- package/dist/worktree-favicon-32x32.png +0 -0
- package/dist/worktree-favicon.ico +0 -0
- package/dist/worktree-favicon.svg +9 -0
- package/package.json +20 -4
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var Ge=Object.defineProperty;var t=(s,a)=>Ge(s,"name",{value:a,configurable:!0});import{a as ve}from"./rolldown-runtime-DhZMWcEn.js";import{vi as Oe,yi as Fe}from"./issue-detail-4PCbYpdv.js";import{C as Le,b as Qe}from"./collections-BxrcELwt.js";import{t as Ke}from"./link-BecLzmfo.js";import{t as Ue}from"./send-CYVi50sh.js";import{$A as Be,$S as H,AT as He,B_ as Ve,CC as We,Ep as Je,Ew as Ye,GS as J,Gb as Y,Jp as P,LS as Ze,ME as Z,MT as Xe,NE as c,OT as es,RT as ss,VS as ts,V_ as as,XC as ns,Yb as Ne,__ as U,aE as rs,ab as we,bE as F,cT as L,dy as ke,eC as os,fy as Ce,hE as $,ib as is,jT as Te,kT as Ae,ly as Se,mb as B,my as Pe,nj as ls,nw as ds,qC as cs,qb as us,qp as ae,rb as ms,sv as W,sy as _e,ub as Ee,uy as Ie,vT as xs,vb as hs,vm as ps,xE as K,x_ as fs,xb as gs,yb as bs,zE as A,z_ as js}from"./index-Bt31d8ga.js";import{a as O}from"./shared-CIwISWMj.js";import{_ as ys,a as vs,b as he,c as Ns,d as ws,f as De,g as ks,h as R,i as Cs,l as Ts,o as ue,p as Me,r as V,s as ze,t as As,u as pe,v as te,x as Ss,y as Ps}from"./CopyableGatewayUrl-PTn061ft.js";var l=ve(ls(),1),e=ve(Be(),1),_s={cursor:ds,claude_desktop:ss,vscode:Oe,claude_code:We,opencode:Fe};function Es({gateway:s,open:a,onOpenChange:r,createdTokens:m,onTokenCreated:u}){const i=Z(),{pushToast:j}=W(),x=(0,l.useMemo)(()=>ks(s.clientSnippets??[]),[s.clientSnippets]),y=(0,l.useMemo)(()=>`${typeof window<"u"?window.location.origin:""}${s.endpointPath}`,[s.endpointPath]),f=(0,l.useMemo)(()=>m.filter(o=>{const C=s.tokens.find(G=>G.id===o.id),I=te(C??o);return I==="active"||I==="expiring"}),[m,s.tokens]),w=(0,l.useMemo)(()=>[{id:"tokens",label:"Available this session",options:f.map(o=>({key:o.id,value:o.id,label:o.name,title:o.clientLabel,searchText:`${o.name} ${o.clientLabel} ${o.tokenPrefix}`,token:o}))}],[f]),[g,k]=(0,l.useState)(x[0]?.client??"raw_url"),[p,N]=(0,l.useState)(""),b=f.find(o=>o.id===p)??null;(0,l.useEffect)(()=>{a&&(k(x[0]?.client??"raw_url"),N(o=>f.some(C=>C.id===o)?o:f[0]?.id??""))},[f,a,x]);const d=F({mutationFn:t(()=>{const o=ze(s);return P.createGatewayToken(s.companyId,s.id,{name:o,clientLabel:o,ownerNote:"",allowedActions:["tools/list","tools/call"],expiresAt:new Date(Date.now()+7776e6).toISOString()})},"mutationFn"),onSuccess:t(async o=>{u(o),N(o.id),j({title:"Token issued",body:"The copy buttons now include its full Authorization header.",tone:"success"}),await i.invalidateQueries({queryKey:V(s.companyId)})},"onSuccess"),onError:t(o=>j({title:"Token was not issued",body:$(o).body,tone:"error"}),"onError")});async function M(o,C){try{await ae(o),j({title:"Copied",body:C,tone:"success"})}catch(I){j({title:"Copy failed",body:$(I).body,tone:"error"})}}t(M,"copyText");const T=x.find(o=>o.client===g)??null,E=T?pe(T.config,{endpointPath:s.endpointPath,endpoint:y,token:b?R(b):"pcgw_•••"}):"",S=T&&b?pe(T.config,{endpointPath:s.endpointPath,endpoint:y,token:b.token}):null;function v(){d.isPending||d.mutate()}return t(v,"issueToken"),(0,e.jsx)(_e,{open:a,onOpenChange:r,children:(0,e.jsxs)(Se,{className:A("sm:max-w-2xl",H),children:[(0,e.jsxs)(Ce,{children:[(0,e.jsxs)(Pe,{className:"flex items-center gap-2",children:["Client snippets",(0,e.jsxs)(hs,{children:[(0,e.jsx)(gs,{asChild:!0,children:(0,e.jsx)("button",{type:"button","aria-label":"About client snippets",className:"text-muted-foreground hover:text-foreground",children:(0,e.jsx)(xs,{className:"h-4 w-4"})})}),(0,e.jsx)(bs,{className:A("max-w-xs text-xs",H),children:"Give this MCP gateway configuration to your tool. It does not give it access to Microvac or skills; it only gateways calls between the client and the tools exposed here."})]})]}),(0,e.jsx)(Ie,{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-border pb-3",children:[(0,e.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:"Authorization"}),f.length>0?(0,e.jsx)(ps,{value:p,groups:w,onValueChange:N,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(o=>o?`${o.label} · ${R(o.token)}`:"Issue a token","renderValue"),renderOption:t(o=>(0,e.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,e.jsx)("span",{className:"truncate",children:o.label}),(0,e.jsx)("span",{className:"truncate font-mono text-(length:--text-micro) text-muted-foreground",children:R(o.token)})]}),"renderOption"),createItem:{render:t(()=>(0,e.jsx)("span",{children:"+ Issue a new token"}),"render"),onSelect:v}}):(0,e.jsx)(c,{type:"button",variant:"outline",size:"sm",className:"rounded-full",disabled:d.isPending,onClick:v,children:d.isPending?"Issuing…":"Issue a token"}),b?(0,e.jsxs)(c,{type:"button",variant:"ghost",size:"sm",onClick:t(()=>{M(`Authorization: Bearer ${b.token}`,"Authorization header")},"onClick"),children:[(0,e.jsx)(L,{className:"mr-1 h-3.5 w-3.5"}),"Copy header"]}):null]}),b?null:(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",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:[x.map(o=>{const C=_s[o.client];return(0,e.jsxs)("button",{type:"button",onClick:t(()=>k(o.client),"onClick"),className:A("flex shrink-0 items-center gap-2 rounded-md px-3 py-1.5 text-left text-sm transition-colors",g===o.client?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted/60"),children:[(0,e.jsx)(C,{className:"h-4 w-4 shrink-0"}),o.label]},o.client)}),(0,e.jsxs)("button",{type:"button",onClick:t(()=>k("raw_url"),"onClick"),className:A("flex shrink-0 items-center gap-2 rounded-md px-3 py-1.5 text-left text-sm transition-colors",g==="raw_url"?"bg-muted font-medium text-foreground":"text-muted-foreground hover:bg-muted/60"),children:[(0,e.jsx)(Ke,{className:"h-4 w-4 shrink-0"}),"Raw URL"]})]}),(0,e.jsxs)("div",{className:"min-w-0 space-y-3",children:[g==="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-foreground",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-muted px-3 py-2 font-mono text-xs text-muted-foreground",children:y}),(0,e.jsxs)(c,{variant:"outline",size:"sm",onClick:t(()=>{M(y,"Endpoint URL")},"onClick"),children:[(0,e.jsx)(L,{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-foreground",children:"Authorization header"}),(0,e.jsx)("code",{className:"block truncate rounded-md bg-muted px-3 py-2 font-mono text-xs text-muted-foreground",children:b?`Authorization: Bearer ${R(b)}`:"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-foreground",children:T.label}),(0,e.jsxs)(c,{variant:"outline",size:"sm",disabled:!S,onClick:t(()=>S&&void M(S,`${T.label} config`),"onClick"),children:[(0,e.jsx)(L,{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-muted p-3 font-mono text-xs text-muted-foreground",children:E}),T.notes.length>0?(0,e.jsx)("ul",{className:"space-y-1 text-xs text-muted-foreground",children:T.notes.map(o=>(0,e.jsx)("li",{children:o},o))}):null]}):(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"No client snippets available for this gateway."}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",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)(ke,{children:(0,e.jsxs)(c,{onClick:t(()=>r(!1),"onClick"),children:[(0,e.jsx)(Xe,{className:"mr-1.5 h-4 w-4"}),"Done"]})})]})})}t(Es,"ConnectClientDialog");function Is({companyId:s,gateway:a,profiles:r,open:m,onOpenChange:u}){const i=Z(),{pushToast:j}=W(),[x,y]=(0,l.useState)(a.name),[f,w]=(0,l.useState)(a.description??""),[g,k]=(0,l.useState)(a.profileId);(0,l.useEffect)(()=>{m&&(y(a.name),w(a.description??""),k(a.profileId))},[a,m]);const p=r.filter(d=>d.status!=="archived"),N=F({mutationFn:t(()=>P.updateGateway(s,a.id,{name:x.trim(),description:f.trim()||null,profileId:g}),"mutationFn"),onSuccess:t(async d=>{j({title:"Gateway updated",body:d.name,tone:"success"}),await i.invalidateQueries({queryKey:V(s)}),u(!1)},"onSuccess"),onError:t(d=>{j({title:"Gateway was not updated",body:$(d).body,tone:"error"})},"onError")});function b(d){d.preventDefault(),!(!x.trim()||!g)&&N.mutate()}return t(b,"submit"),(0,e.jsx)(_e,{open:m,onOpenChange:u,children:(0,e.jsxs)(Se,{className:A("sm:max-w-lg",H),children:[(0,e.jsxs)(Ce,{children:[(0,e.jsx)(Pe,{children:"Edit gateway"}),(0,e.jsx)(Ie,{children:"Change the label or the access profile that controls which tools this endpoint exposes."})]}),(0,e.jsxs)("form",{className:"space-y-4",onSubmit:b,children:[(0,e.jsxs)("label",{className:"block space-y-1.5",children:[(0,e.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:"Name"}),(0,e.jsx)(U,{value:x,onChange:t(d=>y(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-muted-foreground",children:"Access profile"}),(0,e.jsx)("select",{className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",value:g,onChange:t(d=>k(d.target.value),"onChange"),required:!0,children:p.map(d=>(0,e.jsxs)("option",{value:d.id,children:[d.name," — ",ue(d)]},d.id))})]}),(0,e.jsxs)("label",{className:"block space-y-1.5",children:[(0,e.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:"Description (optional)"}),(0,e.jsx)("textarea",{className:"min-h-16 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",value:f,onChange:t(d=>w(d.target.value),"onChange"),placeholder:"Who this endpoint is for."})]}),(0,e.jsxs)(ke,{children:[(0,e.jsx)(c,{type:"button",variant:"ghost",onClick:t(()=>u(!1),"onClick"),children:"Cancel"}),(0,e.jsx)(c,{type:"submit",disabled:N.isPending||!x.trim()||!g,children:N.isPending?"Saving…":"Save changes"})]})]})]})})}t(Is,"EditGatewayDialog");function Ds({gateway:s,profile:a,apps:r,agentNames:m,projectNames:u,toggleDisabled:i,onToggle:j}){const{pushToast:x}=W(),y=`${typeof window<"u"?window.location.origin:""}${s.endpointPath}`,f=vs(s),w=Ts(s),g=r.filter(b=>b.needsAttention),k=Me(s),p=["{",' "mcpServers": {',` "paperclip-${s.displaySlug}": {`,` "url": "${y}",`,' "headers": { "Authorization": "Bearer pcgw_•••_TOKEN" }'," }"," }","}"].join(`
|
|
2
|
+
`);async function N(b,d){try{await ae(b),x({title:"Copied",body:d,tone:"success"})}catch{x({title:"Copy failed",body:"Clipboard access is unavailable.",tone:"error"})}}return t(N,"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-border p-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:k?"On":"Off"}),(0,e.jsx)("div",{className:"mt-2",children:(0,e.jsx)(Je,{checked:k,disabled:i,onCheckedChange:j,"aria-label":"Toggle gateway"})}),(0,e.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:"Toggle the whole gateway off here."})]}),(0,e.jsxs)(oe,{label:"Apps",children:[r.length," ",r.length===1?"app":"apps",a?` · ${ue(a)}`:""]}),(0,e.jsxs)(oe,{label:"Tokens",children:[f," active",w>0?` · ${w} expiring`:""]}),(0,e.jsx)(oe,{label:"Health",children:g.length===0?"All green":`${g.length} needs attention`})]}),(0,e.jsxs)("section",{className:"rounded-lg border border-border 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-foreground",children:"Who can use it"}),(0,e.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",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)(ie,{children:["Scope · ",ws(s,u,m)]}),(0,e.jsxs)(ie,{children:["Profile · ",a?.name??"Unavailable"]}),(0,e.jsxs)(ie,{children:[f," active ",f===1?"token":"tokens"]})]})]}),(0,e.jsxs)("section",{className:"rounded-lg border border-border p-4",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Apps in this gateway"}),r.length===0?(0,e.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"This gateway’s profile doesn’t include any apps yet."}):(0,e.jsx)("ul",{className:"mt-3 divide-y divide-border",children:r.map(b=>(0,e.jsx)(Ms,{app:b},b.application.id))})]}),(0,e.jsxs)("section",{className:"rounded-lg border border-border bg-muted/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-foreground",children:"How clients connect"}),(0,e.jsxs)(c,{variant:"outline",size:"sm",onClick:t(()=>{N(p,"Client config")},"onClick"),children:[(0,e.jsx)(L,{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-background p-3 font-mono text-xs text-muted-foreground",children:p})]})]})}t(Ds,"OverviewPanel");function oe({label:s,children:a}){return(0,e.jsxs)("div",{className:"rounded-lg border border-border p-4",children:[(0,e.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:s}),(0,e.jsx)("div",{className:"mt-2 text-sm font-semibold text-foreground",children:a})]})}t(oe,"StatCard");function ie({children:s}){return(0,e.jsx)("span",{className:"inline-flex items-center rounded-full border border-border px-3 py-1 text-xs font-medium text-foreground",children:s})}t(ie,"Chip");function Ms({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)(Y,{to:a,className:"font-medium text-foreground hover:underline",children:De(s)}),(0,e.jsxs)("div",{className:"text-xs text-muted-foreground",children:[s.toolCount," ",s.toolCount===1?"tool":"tools",s.needsAttention&&s.attentionReason?` · ${s.attentionReason}`:""]})]}),(0,e.jsx)("span",{className:A("shrink-0 rounded-full border px-2 py-0.5 text-xs font-medium",s.needsAttention?"border-foreground bg-foreground text-background":"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"),children:s.needsAttention?"Needs attention":"Healthy"})]})}t(Ms,"AppRow");function zs({apps:s,profile:a}){return(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("p",{className:"text-sm text-muted-foreground",children:["These apps go through this gateway. The bound profile",a?` (${a.name})`:""," decides which tools are allowed",a?` — ${ue(a)}.`:"."," Change the profile under Advanced."]}),s.length===0?(0,e.jsx)("div",{className:"rounded-md border border-dashed border-border p-6 text-center text-sm text-muted-foreground",children:"No apps are assigned to this gateway’s profile yet."}):(0,e.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border",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-border bg-muted/40 text-left text-(length:--text-micro) font-semibold uppercase tracking-wide text-muted-foreground",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(r=>{const m=r.connection?`/apps/${r.connection.id}/permissions`:`/apps/app/${r.application.id}/permissions`;return(0,e.jsxs)("tr",{className:"border-b border-border last:border-0",children:[(0,e.jsxs)("td",{className:"px-4 py-3",children:[(0,e.jsx)(Y,{to:m,className:"font-medium text-foreground hover:underline",children:De(r)}),r.needsAttention&&r.attentionReason?(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:r.attentionReason}):null]}),(0,e.jsxs)("td",{className:"px-4 py-3 text-muted-foreground",children:[r.toolCount," ",r.toolCount===1?"tool":"tools"]}),(0,e.jsx)("td",{className:"px-4 py-3",children:(0,e.jsx)("span",{className:A("inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-medium",r.needsAttention?"border-foreground bg-foreground text-background":"border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"),children:r.needsAttention?"Needs attention":"Healthy"})}),(0,e.jsx)("td",{className:"px-4 py-3 text-right",children:(0,e.jsx)(Y,{to:m,className:"text-xs font-medium text-primary hover:underline",children:"Open →"})})]},r.application.id)})})]})})]})}t(zs,"AppsToolsPanel");var $s=["tools/list","tools/call"],le=10;function fe(){return new Date(Date.now()+7776e6).toISOString().slice(0,10)}t(fe,"defaultExpiry");var qs={pending:"border-amber-500/40 bg-amber-500/10 text-amber-700 dark:text-amber-300",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-border bg-muted text-muted-foreground",revoked:"border-foreground bg-foreground text-background"};function ge({status:s}){return(0,e.jsx)("span",{className:A("inline-flex shrink-0 items-center rounded-full border px-2 py-0.5 text-xs font-medium",qs[s]),children:Cs[s]})}t(ge,"StatusBadge");function ee({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-muted-foreground",children:s}),(0,e.jsx)("dd",{className:"mt-0.5 truncate text-foreground",children:a})]})}t(ee,"TokenField");function de({token:s}){const a=ys(s.expiresAt);return a?a.getTime()<=Date.now()?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{className:"font-medium text-foreground",children:"Expired"})," ",(0,e.jsx)(O,{value:s.expiresAt})]}):(0,e.jsxs)(e.Fragment,{children:["Expires ",(0,e.jsx)(O,{value:s.expiresAt})]}):(0,e.jsx)(e.Fragment,{children:"No expiry"})}t(de,"ExpiryValue");function Rs({companyId:s,gateway:a,onTokenCreated:r}){const m=Z(),{pushToast:u}=W(),[i,j]=(0,l.useState)(!1),[x,y]=(0,l.useState)(""),[f,w]=(0,l.useState)(""),[g,k]=(0,l.useState)(fe()),[p,N]=(0,l.useState)(null),[b,d]=(0,l.useState)(!1),[M,T]=(0,l.useState)(!1),[E,S]=(0,l.useState)(1),[v,o]=(0,l.useState)(""),[C,I]=(0,l.useState)(null),G=t(()=>m.invalidateQueries({queryKey:V(s)}),"invalidate"),D=(0,l.useMemo)(()=>[...a.tokens].sort((n,z)=>new Date(z.createdAt).getTime()-new Date(n.createdAt).getTime()),[a.tokens]),{userId:Q}=ts(),h=(0,l.useMemo)(()=>D.filter(n=>te(n)==="pending"&&(!n.responsibleUserId||!Q||n.responsibleUserId===Q)),[D,Q]),_=Math.max(1,Math.ceil(D.length/le)),X=D.slice((E-1)*le,E*le);(0,l.useEffect)(()=>{S(n=>Math.min(n,_))},[_]);const ne=F({mutationFn:t(()=>P.createGatewayToken(s,a.id,{name:x.trim(),clientLabel:x.trim(),ownerNote:f.trim(),allowedActions:$s,expiresAt:g?`${g}T23:59:59.000Z`:null}),"mutationFn"),onSuccess:t(async n=>{N(n),d(!0),j(!1),y(""),w(""),k(fe()),u({title:"Token issued",body:"Copy it now — you won’t see the full value again after leaving this page.",tone:"success"}),r?.(n),await G()},"onSuccess"),onError:t(n=>u({title:"Token was not issued",body:$(n).body,tone:"error"}),"onError")}),me=F({mutationFn:t(n=>P.revealGatewayToken(s,n),"mutationFn"),onSuccess:t(async n=>{N(n),d(!0),u({title:"Token revealed",body:"Copy it now — you won’t see the full value again after leaving this page.",tone:"success"}),r?.(n),await G()},"onSuccess"),onError:t(n=>u({title:"Token was not revealed",body:$(n).body,tone:"error"}),"onError")}),re=F({mutationFn:t(n=>P.revokeGatewayToken(s,n),"mutationFn"),onSuccess:t(async n=>{I(null),o(""),u({title:"Token revoked",body:`${n.name} can no longer connect.`,tone:"success"}),await G()},"onSuccess"),onError:t(n=>u({title:"Token was not revoked",body:$(n).body,tone:"error"}),"onError")});async function $e(n){try{await ae(n),u({title:"Copied",body:"Access token",tone:"success"})}catch(z){u({title:"Copy failed",body:$(z).body,tone:"error"})}}t($e,"copyToken");function qe(){!i&&!x.trim()&&y(ze(a)),j(n=>!n)}t(qe,"startIssuing");function Re(n){n.preventDefault(),x.trim()&&ne.mutate()}t(Re,"submit");function xe(n){I({id:n.id,name:n.name}),o("")}return t(xe,"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-muted-foreground",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-muted-foreground",children:"Microvac 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)(c,{size:"sm",onClick:qe,children:[(0,e.jsx)(cs,{className:"mr-1.5 h-3.5 w-3.5"}),"Issue token"]})]}),i?(0,e.jsxs)("form",{className:"space-y-3",onSubmit:Re,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-muted-foreground",children:"Token name"}),(0,e.jsx)(U,{value:x,onChange:t(n=>y(n.target.value),"onChange"),required:!0,autoFocus:!0}),(0,e.jsx)("span",{className:"text-xs text-muted-foreground",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-muted-foreground",children:"Expires"}),(0,e.jsx)(U,{type:"date",value:g,onChange:t(n=>k(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-muted-foreground",children:"Owner note (optional)"}),(0,e.jsx)(U,{value:f,onChange:t(n=>w(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)(c,{type:"button",variant:"ghost",size:"sm",onClick:t(()=>j(!1),"onClick"),children:"Cancel"}),(0,e.jsx)(c,{type:"submit",size:"sm",disabled:ne.isPending||!x.trim(),children:ne.isPending?"Issuing…":"Issue token"})]})]}):null,h.length>0?(0,e.jsxs)("section",{className:"space-y-2 border-y border-border py-4","aria-label":"Tokens waiting to be revealed",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-semibold text-foreground",children:"Waiting for you to reveal"}),(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:"An agent created these tokens for you. A value is generated when you reveal it and is shown only once."})]}),h.map(n=>(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"truncate font-medium text-foreground",children:n.name}),(0,e.jsxs)("div",{className:"text-xs text-muted-foreground",children:[R(n)," · ",(0,e.jsx)(de,{token:n})]})]}),(0,e.jsx)(c,{size:"sm",disabled:me.isPending,onClick:t(()=>me.mutate(n.id),"onClick"),"aria-label":`Reveal token ${n.name}`,children:"Reveal token"})]},n.id))]}):null,p?(0,e.jsxs)("div",{className:"space-y-2 border-y border-border 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-foreground",children:"New token — copy now"}),(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:"It is now available in Client snippets for a copy-ready configuration."})]}),(0,e.jsx)(c,{variant:"ghost",size:"sm",onClick:t(()=>N(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:A("min-w-0 flex-1 truncate rounded bg-muted px-3 py-2 font-mono text-xs text-foreground",os),children:b?p.token:R(p)}),b?(0,e.jsxs)(c,{variant:"outline",size:"sm",onClick:t(()=>{$e(p.token)},"onClick"),children:[(0,e.jsx)(L,{className:"mr-1 h-3.5 w-3.5"}),"Copy"]}):(0,e.jsx)(c,{variant:"outline",size:"sm",onClick:t(()=>d(!0),"onClick"),children:"Show"})]})]}):null,(0,e.jsxs)(js,{open:M,onOpenChange:T,children:[(0,e.jsx)(as,{asChild:!0,children:(0,e.jsxs)(c,{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-foreground",children:[(0,e.jsx)(Ye,{className:"h-4 w-4 text-muted-foreground"}),"Token history",(0,e.jsx)("span",{className:"font-normal text-muted-foreground",children:D.length})]}),M?(0,e.jsx)(es,{className:"h-4 w-4"}):(0,e.jsx)(Te,{className:"h-4 w-4"})]})}),(0,e.jsx)(Ve,{className:"space-y-3 pt-3",children:D.length===0?(0,e.jsx)("p",{className:"py-4 text-sm text-muted-foreground",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-border 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-border bg-muted/40 text-left text-(length:--text-micro) font-semibold uppercase tracking-wide text-muted-foreground",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:X.map(n=>{const z=te(n);return(0,e.jsxs)("tr",{className:"border-b border-border last:border-0",children:[(0,e.jsxs)("td",{className:"px-4 py-3",children:[(0,e.jsx)("div",{className:"font-medium text-foreground",children:n.name}),(0,e.jsx)("div",{className:"font-mono text-xs text-muted-foreground",children:R(n)})]}),(0,e.jsx)("td",{className:"px-4 py-3 text-muted-foreground",children:n.clientLabel||n.ownerNote||"—"}),(0,e.jsx)("td",{className:"px-4 py-3 text-muted-foreground",children:(0,e.jsx)(O,{value:n.createdAt})}),(0,e.jsx)("td",{className:"px-4 py-3 text-muted-foreground",children:n.lastUsedAt?(0,e.jsx)(O,{value:n.lastUsedAt}):"—"}),(0,e.jsx)("td",{className:"px-4 py-3 text-muted-foreground",children:(0,e.jsx)(de,{token:n})}),(0,e.jsx)("td",{className:"px-4 py-3",children:(0,e.jsx)(ge,{status:z})}),(0,e.jsx)("td",{className:"px-4 py-3 text-right",children:z!=="revoked"?(0,e.jsx)(c,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs text-destructive hover:text-destructive",onClick:t(()=>xe(n),"onClick"),children:"Revoke"}):null})]},n.id)})})]})}),(0,e.jsx)("div",{className:"space-y-3 sm:hidden",children:X.map(n=>{const z=te(n);return(0,e.jsxs)("div",{className:"border-b border-border 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-foreground",children:n.name}),(0,e.jsx)("div",{className:"font-mono text-xs text-muted-foreground",children:R(n)})]}),(0,e.jsx)(ge,{status:z})]}),(0,e.jsxs)("dl",{className:"mt-3 grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[(0,e.jsx)(ee,{label:"Owner",value:n.clientLabel||n.ownerNote||"—"}),(0,e.jsx)(ee,{label:"Created",value:(0,e.jsx)(O,{value:n.createdAt})}),(0,e.jsx)(ee,{label:"Last used",value:n.lastUsedAt?(0,e.jsx)(O,{value:n.lastUsedAt}):"—"}),(0,e.jsx)(ee,{label:"Expiry",value:(0,e.jsx)(de,{token:n})})]}),z!=="revoked"?(0,e.jsx)(c,{variant:"ghost",size:"sm",className:"mt-3 w-full text-xs text-destructive hover:text-destructive",onClick:t(()=>xe(n),"onClick"),children:"Revoke"}):null]},n.id)})}),_>1?(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Page ",E," of ",_," · ",D.length," tokens"]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)(c,{variant:"ghost",size:"sm",disabled:E===1,onClick:t(()=>S(n=>Math.max(1,n-1)),"onClick"),"aria-label":"Previous token page",children:(0,e.jsx)(He,{className:"h-4 w-4"})}),(0,e.jsx)(c,{variant:"ghost",size:"sm",disabled:E===_,onClick:t(()=>S(n=>Math.min(_,n+1)),"onClick"),"aria-label":"Next token page",children:(0,e.jsx)(Ae,{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-border bg-card p-5 shadow-lg",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:"Revoke this token?"}),(0,e.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground",children:["Any client using ",(0,e.jsx)("span",{className:"font-medium text-foreground",children:C.name})," goes silent immediately. This can’t be undone. Type the token name to confirm."]})]}),(0,e.jsx)(U,{value:v,onChange:t(n=>o(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)(c,{variant:"ghost",size:"sm",onClick:t(()=>{I(null),o("")},"onClick"),children:"Cancel"}),(0,e.jsx)(c,{variant:"destructive",size:"sm",disabled:v.trim()!==C.name||re.isPending,onClick:t(()=>re.mutate(C.id),"onClick"),children:re.isPending?"Revoking…":"Revoke token"})]})]})}):null]})}t(Rs,"TokensPanel");var Gs=25,be={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 ce(s,a){const r=s?.[a];return typeof r=="string"&&r.trim().length>0?r:null}t(ce,"detailString");function je(s){if(!s?.summary)return null;try{return JSON.stringify(JSON.parse(s.summary),null,2)}catch{return s.summary}}t(je,"formatSummary");function ye(s,a){const r=s?.[a];if(!r||typeof r!="object"||Array.isArray(r))return null;const m=r.summary;return typeof m=="string"?{summary:m}:null}t(ye,"summaryFromDetails");function Os(s){const a=s.invocation?.startedAt?new Date(s.invocation.startedAt).getTime():NaN,r=s.invocation?.completedAt?new Date(s.invocation.completedAt).getTime():NaN;return!Number.isFinite(a)||!Number.isFinite(r)||r<a?null:`${r-a} ms`}t(Os,"durationLabel");function q({label:s,value:a,mono:r=!1}){return(0,e.jsxs)("div",{className:"flex gap-3 py-1",children:[(0,e.jsx)("dt",{className:"w-28 shrink-0 text-muted-foreground",children:s}),(0,e.jsx)("dd",{className:r?"min-w-0 break-all font-mono text-(length:--text-micro) text-foreground":"min-w-0 text-foreground",children:a})]})}t(q,"Fact");function Fs({event:s}){const[a,r]=(0,l.useState)(!1),m=be[s.normalizedOutcome]??be.unknown,u=s.agentDisplayName??"Client",i=s.appDisplayName??s.connectionDisplayName??s.applicationDisplayName??"App",j=s.toolDisplayName??s.invocation?.toolName??"Tool call",x=s.invocation?.toolName??ce(s.details,"tool")??ce(s.details,"toolName"),y=ce(s.details,"reasonCode"),f=je(s.invocation?.argumentsSummary??ye(s.details,"argumentsSummary")),w=je(s.invocation?.resultSummary??ye(s.details,"resultSummary")),g=Os(s);return(0,e.jsxs)("li",{className:"text-sm",children:[(0,e.jsxs)("button",{type:"button",onClick:t(()=>r(k=>!k),"onClick"),className:"flex w-full items-start gap-2.5 px-4 py-3 text-left hover:bg-accent/50","aria-expanded":a,children:[a?(0,e.jsx)(Te,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}):(0,e.jsx)(Ae,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),(0,e.jsx)("span",{className:"min-w-0 flex-1",children:(0,e.jsxs)("span",{className:"block text-foreground",children:[(0,e.jsx)("span",{className:"font-medium",children:u})," used ",(0,e.jsx)("span",{className:"font-medium",children:j})," in ",i]})}),(0,e.jsxs)("span",{className:"flex shrink-0 items-center gap-2 whitespace-nowrap",children:[(0,e.jsx)(Qe,{status:m.status,label:m.label}),(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:["· ",(0,e.jsx)(O,{value:s.createdAt})]})]})]}),a?(0,e.jsxs)("div",{className:"border-t border-border bg-muted/30 px-4 py-3 pl-10 text-xs",children:[(0,e.jsxs)("dl",{children:[x?(0,e.jsx)(q,{label:"Tool",value:x,mono:!0}):null,s.invocation?.status?(0,e.jsx)(q,{label:"Call status",value:s.invocation.status}):null,s.invocation?.policyDecision?(0,e.jsx)(q,{label:"Decision",value:s.invocation.policyDecision}):null,y?(0,e.jsx)(q,{label:"Reason",value:y,mono:!0}):null,g?(0,e.jsx)(q,{label:"Duration",value:g}):null,s.invocation?.id?(0,e.jsx)(q,{label:"Invocation ID",value:s.invocation.id,mono:!0}):null,s.invocation?.errorCode?(0,e.jsx)(q,{label:"Error code",value:s.invocation.errorCode,mono:!0}):null,s.invocation?.errorMessage?(0,e.jsx)(q,{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-muted-foreground",children:"Arguments (redacted)"}),(0,e.jsx)("pre",{className:A("overflow-x-auto whitespace-pre-wrap break-words rounded-md border border-border bg-background p-3 font-mono text-xs text-foreground",H),children:f})]}):null,w?(0,e.jsxs)("div",{className:"mt-3 space-y-1",children:[(0,e.jsx)("div",{className:"text-muted-foreground",children:"Result (redacted)"}),(0,e.jsx)("pre",{className:A("overflow-x-auto whitespace-pre-wrap break-words rounded-md border border-border bg-background p-3 font-mono text-xs text-foreground",H),children:w})]}):null]}):null]})}t(Fs,"ActivityRow");function Ls({companyId:s,gateway:a}){const r=Le({queryKey:J.tools.activity(s,{gateway:a.id,window:"30d"}),queryFn:t(({pageParam:i})=>P.listActivity(s,{gateway:a.id,window:"30d",limit:Gs,cursor:i??void 0}),"queryFn"),initialPageParam:null,getNextPageParam:t(i=>i.nextCursor??void 0,"getNextPageParam")}),m=Ee(r),u=(0,l.useMemo)(()=>r.data?.pages.flatMap(i=>i.events)??[],[r.data]);return r.isLoading||m.kind==="reconnecting"?(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(B,{className:"h-12 w-full"}),(0,e.jsx)(B,{className:"h-12 w-full"}),(0,e.jsx)(B,{className:"h-12 w-full"})]}):m.kind==="error"?(0,e.jsx)(we,{error:r.error,action:"load gateway activity",onRetry:m.retry,retrying:m.isFetching}):(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Calls through this gateway from the last 30 days. Open a row to inspect its tool, redacted arguments, result, and decision."}),u.length===0?(0,e.jsx)("div",{className:"rounded-md border border-dashed border-border p-6 text-center text-sm text-muted-foreground",children:"No calls have gone through this gateway yet."}):(0,e.jsx)("ul",{className:"divide-y divide-border rounded-lg border border-border",children:u.map(i=>(0,e.jsx)(Fs,{event:i},i.id))}),r.hasNextPage?(0,e.jsx)("div",{className:"flex justify-center",children:(0,e.jsx)(c,{variant:"outline",size:"sm",onClick:t(()=>r.fetchNextPage(),"onClick"),disabled:r.isFetchingNextPage,children:r.isFetchingNextPage?"Loading…":"Load more"})}):null]})}t(Ls,"GatewayActivityPanel");function Qs({companyId:s,gateway:a}){const r=Z(),m=Ne(),{pushToast:u}=W(),[i,j]=(0,l.useState)(!1),[x,y]=(0,l.useState)(""),f=`${typeof window<"u"?window.location.origin:""}${a.endpointPath}`,w=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),g=F({mutationFn:t(()=>P.updateGateway(s,a.id,{status:"archived"}),"mutationFn"),onSuccess:t(async()=>{u({title:"Gateway archived",body:`${a.name} is no longer reachable.`,tone:"success"}),await r.invalidateQueries({queryKey:V(s)}),m("/apps/gateways")},"onSuccess"),onError:t(p=>u({title:"Couldn't archive the gateway",body:$(p).body,tone:"error"}),"onError")});async function k(p,N){try{await ae(p),u({title:"Copied",body:N,tone:"success"})}catch{u({title:"Copy failed",body:"Clipboard access is unavailable.",tone:"error"})}}return t(k,"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-foreground",children:"Transport"}),(0,e.jsxs)("dl",{className:"grid gap-x-6 gap-y-2 text-sm sm:grid-cols-2",children:[(0,e.jsx)(se,{label:"Transport",value:"streamable_http"}),(0,e.jsx)(se,{label:"Authentication",value:"bearer"}),(0,e.jsx)(se,{label:"Protocol version",value:"2025-03-26"}),(0,e.jsx)(se,{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-muted px-3 py-2 font-mono text-xs text-muted-foreground",children:f}),(0,e.jsxs)(c,{variant:"outline",size:"sm",onClick:t(()=>{k(f,"Endpoint URL")},"onClick"),children:[(0,e.jsx)(L,{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-foreground",children:"Raw configuration"}),(0,e.jsxs)(c,{variant:"outline",size:"sm",onClick:t(()=>{k(w,"Gateway config JSON")},"onClick"),children:[(0,e.jsx)(L,{className:"mr-1 h-3.5 w-3.5"}),"Copy JSON"]})]}),(0,e.jsx)("pre",{className:A("max-h-96 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted p-3 font-mono text-xs text-muted-foreground",H),children:w})]}),(0,e.jsxs)("section",{className:"space-y-2 rounded-lg border border-destructive/40 p-4",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold text-destructive",children:"Danger zone"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Archiving takes the gateway offline for every client. Existing tokens stop working. Type the gateway name to confirm."}),i?(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(U,{value:x,onChange:t(p=>y(p.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)(c,{variant:"destructive",size:"sm",disabled:x.trim()!==a.name||g.isPending,onClick:t(()=>g.mutate(),"onClick"),children:g.isPending?"Archiving…":"Archive gateway"}),(0,e.jsx)(c,{variant:"ghost",size:"sm",onClick:t(()=>{j(!1),y("")},"onClick"),children:"Cancel"})]})]}):(0,e.jsx)(c,{variant:"outline",size:"sm",className:"text-destructive",onClick:t(()=>j(!0),"onClick"),children:"Archive gateway"})]})]})}t(Qs,"GatewayAdvancedPanel");function se({label:s,value:a,mono:r}){return(0,e.jsxs)("div",{children:[(0,e.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:s}),(0,e.jsx)("dd",{className:r?"mt-0.5 font-mono text-foreground":"mt-0.5 text-foreground",children:a})]})}t(se,"Row");function Xs(){const{gatewayId:s="",tab:a}=rs(),r=Ne(),m=Z(),{pushToast:u}=W(),{selectedCompanyId:i}=Ze(),{setBreadcrumbs:j}=is(),[x,y]=(0,l.useState)(!1),[f,w]=(0,l.useState)(!1),[g,k]=(0,l.useState)([]),p=Ss(a)?a:null,N=K({queryKey:V(i??"__none__"),queryFn:t(()=>P.listGateways(i),"queryFn"),enabled:!!i}),b=K({queryKey:J.tools.profiles(i??"__none__"),queryFn:t(()=>P.listProfiles(i),"queryFn"),enabled:!!i}),d=K({queryKey:J.tools.connections(i??"__none__"),queryFn:t(()=>P.listConnections(i),"queryFn"),enabled:!!i}),M=K({queryKey:J.tools.applications(i??"__none__"),queryFn:t(()=>P.listApplications(i),"queryFn"),enabled:!!i}),T=K({queryKey:J.agents.list(i??"__none__"),queryFn:t(()=>ms.list(i),"queryFn"),enabled:!!i}),E=K({...fs(i??"__none__",{includeArchived:!0}),enabled:!!i}),S=Ee(N),v=(0,l.useMemo)(()=>(N.data?.gateways??[]).find(h=>h.id===s),[N.data,s]),o=(0,l.useMemo)(()=>(b.data?.profiles??[]).find(h=>h.id===v?.profileId),[b.data,v?.profileId]),C=(0,l.useMemo)(()=>Ns(o,M.data?.applications??[],d.data?.connections??[]),[o,M.data,d.data]),I=(0,l.useMemo)(()=>new Map((T.data??[]).map(h=>[h.id,h.name])),[T.data]),G=(0,l.useMemo)(()=>new Map((E.data??[]).map(h=>[h.id,h.name])),[E.data]);function D(h){k(_=>[h,..._.filter(X=>X.id!==h.id)])}t(D,"rememberCreatedToken"),(0,l.useEffect)(()=>{if(v)return j([{label:"Connectors",href:"/apps"},{label:"Gateways",href:"/apps/gateways"},{label:v.name}]),()=>j([])},[j,v]);const Q=F({mutationFn:t(()=>P.updateGateway(i,s,{status:v&&Me(v)?"disabled":"active"}),"mutationFn"),onSuccess:t(async h=>{u({title:h.status==="active"?"Gateway on":"Gateway off",body:h.status==="active"?`${h.name} is exposing its tools again.`:`${h.name} is off — every client goes silent.`,tone:"success"}),await m.invalidateQueries({queryKey:V(i)})},"onSuccess"),onError:t(h=>u({title:"Couldn't update the gateway",body:$(h).body,tone:"error"}),"onError")});return i?p?N.isLoading||S.kind==="reconnecting"?(0,e.jsxs)("div",{className:"max-w-4xl space-y-4",children:[(0,e.jsx)(B,{className:"h-10 w-64"}),(0,e.jsx)(B,{className:"h-9 w-full max-w-lg"}),(0,e.jsx)(B,{className:"h-64 w-full"})]}):S.kind==="error"?(0,e.jsx)(we,{size:"page",error:N.error,action:"load the gateway",onRetry:S.retry,retrying:S.isFetching}):v?(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-muted-foreground",children:(0,e.jsx)(Y,{to:"/apps/gateways",className:"hover:underline",children:"Apps · Gateways"})}),(0,e.jsx)("h1",{className:"mt-1 text-2xl font-bold tracking-tight",children:v.name}),(0,e.jsx)(As,{endpointPath:v.endpointPath,className:"mt-1 max-w-xl"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsxs)(c,{variant:"outline",onClick:t(()=>w(!0),"onClick"),children:[(0,e.jsx)(ns,{className:"mr-1.5 h-4 w-4"}),"Edit"]}),(0,e.jsxs)(c,{onClick:t(()=>y(!0),"onClick"),children:[(0,e.jsx)(Ue,{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-border text-sm","aria-label":"Gateway tabs",children:Ps.map(h=>{const _=h.key===p;return(0,e.jsx)(Y,{to:he(s,h.key),className:A("-mb-px shrink-0 border-b-2 pb-2.5 pt-1 font-medium transition-colors",_?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),"aria-current":_?"page":void 0,children:h.label},h.key)})}),p==="overview"&&(0,e.jsx)(Ds,{gateway:v,profile:o,apps:C,agentNames:I,projectNames:G,toggleDisabled:Q.isPending,onToggle:t(()=>Q.mutate(),"onToggle")}),p==="apps"&&(0,e.jsx)(zs,{apps:C,profile:o}),p==="tokens"&&(0,e.jsx)(Rs,{companyId:i,gateway:v,onTokenCreated:D}),p==="activity"&&(0,e.jsx)(Ls,{companyId:i,gateway:v}),p==="advanced"&&(0,e.jsx)(Qs,{companyId:i,gateway:v}),(0,e.jsx)(Es,{gateway:v,open:x,onOpenChange:y,createdTokens:g,onTokenCreated:D}),(0,e.jsx)(Is,{companyId:i,gateway:v,profiles:b.data?.profiles??[],open:f,onOpenChange:w})]}):(0,e.jsxs)("div",{className:"max-w-3xl p-6",children:[(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"We couldn’t find that gateway."}),(0,e.jsx)(c,{className:"mt-4",variant:"outline",onClick:t(()=>r("/apps/gateways"),"onClick"),children:"Back to gateways"})]}):(0,e.jsx)(us,{replace:!0,to:he(s,"overview")}):(0,e.jsx)("div",{className:"p-6 text-sm text-muted-foreground",children:"Select an organization to manage gateways."})}t(Xs,"GatewayDetail");export{Xs as GatewayDetail};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var W=Object.defineProperty;var r=(o,d)=>W(o,"name",{value:d,configurable:!0});import{a as B}from"./rolldown-runtime-DhZMWcEn.js";import{$A as U,Ep as X,GS as g,IC as Z,Jp as u,LS as ee,ME as se,NE as O,Yb as ae,__ as te,ab as re,bE as ne,hE as oe,ib as ie,mb as L,nj as le,qC as R,rb as ce,sv as de,ub as pe,xE as l,x_ as me}from"./index-Bt31d8ga.js";import{a as A}from"./shared-CIwISWMj.js";import{a as ue,b as P,c as xe,d as F,l as he,m as ye,n as be,o as ge,p as k,r as K,t as I}from"./CopyableGatewayUrl-PTn061ft.js";var c=B(le(),1),e=B(U(),1);function Ce(){const o=ae(),d=se(),{pushToast:S}=de(),{selectedCompanyId:t}=ee(),{setBreadcrumbs:w}=ie(),[f,z]=(0,c.useState)(""),[D,N]=(0,c.useState)(!1);(0,c.useEffect)(()=>(w([{label:"Connectors",href:"/apps"},{label:"Gateways"}]),()=>w([])),[w]);const x=l({queryKey:K(t??"__none__"),queryFn:r(()=>u.listGateways(t),"queryFn"),enabled:!!t}),q=l({queryKey:g.tools.profiles(t??"__none__"),queryFn:r(()=>u.listProfiles(t),"queryFn"),enabled:!!t}),H=l({queryKey:g.tools.connections(t??"__none__"),queryFn:r(()=>u.listConnections(t),"queryFn"),enabled:!!t}),V=l({queryKey:g.tools.applications(t??"__none__"),queryFn:r(()=>u.listApplications(t),"queryFn"),enabled:!!t}),G=l({queryKey:g.agents.list(t??"__none__"),queryFn:r(()=>ce.list(t),"queryFn"),enabled:!!t}),Q=l({...me(t??"__none__"),enabled:!!t}),h=pe(x),Y=(0,c.useMemo)(()=>new Map((q.data?.profiles??[]).map(s=>[s.id,s])),[q.data]),$=(0,c.useMemo)(()=>new Map((G.data??[]).map(s=>[s.id,s.name])),[G.data]),E=(0,c.useMemo)(()=>new Map((Q.data??[]).map(s=>[s.id,s.name])),[Q.data]),M=ne({mutationFn:r(({gateway:s})=>u.updateGateway(t,s.id,{status:k(s)?"disabled":"active"}),"mutationFn"),onSuccess:r(async s=>{S({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:K(t)})},"onSuccess"),onError:r(s=>S({title:"Couldn't update the gateway",body:oe(s).body,tone:"error"}),"onError")});if(!t)return(0,e.jsx)("div",{className:"p-6 text-sm text-muted-foreground",children:"Select an organization to manage gateways."});const v=x.data?.gateways??[],y=f.trim().toLowerCase(),J=y?v.filter(s=>{const b=F(s,E,$).toLowerCase();return s.name.toLowerCase().includes(y)||s.displaySlug.toLowerCase().includes(y)||b.includes(y)}):v;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-muted-foreground",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."})]}),x.isLoading||h.kind==="reconnecting"?(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"})]}):h.kind==="error"?(0,e.jsx)(re,{error:x.error,action:"load gateways",onRetry:h.retry,retrying:h.isFetching}):v.length===0?(0,e.jsx)(je,{onCreate:r(()=>N(!0),"onCreate")}):(0,e.jsxs)("div",{className:"space-y-4 pt-1",children:[(0,e.jsxs)("div",{"data-canonical-toolbar":"gateways",role:"toolbar","aria-label":"Gateway controls",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)(Z,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,e.jsx)(te,{value:f,onChange:r(s=>z(s.target.value),"onChange"),placeholder:"Search by name, app, or owner",className:"pl-9","aria-label":"Search gateways"})]}),(0,e.jsxs)(O,{"data-toolbar-primary":!0,className:"ml-auto",onClick:r(()=>N(!0),"onClick"),children:[(0,e.jsx)(R,{className:"mr-1.5 h-4 w-4"}),"New gateway"]})]}),(()=>{const s=J.map(a=>{const n=Y.get(a.profileId),i=xe(n,V.data?.applications??[],H.data?.connections??[]);return{gateway:a,profile:n,scope:F(a,E,$),appsLabel:`${i.length} ${i.length===1?"app":"apps"}${n?` · ${ge(n)}`:""}`,active:ue(a),expiring:he(a),lastUsed:ye(a),href:P(a.id,"overview")}}),b=r(a=>(0,e.jsx)(X,{checked:k(a),disabled:M.isPending,onClick:r(n=>n.stopPropagation(),"onClick"),onCheckedChange:r(()=>M.mutate({gateway:a}),"onCheckedChange"),"aria-label":`Turn ${a.name} ${k(a)?"off":"on"}`}),"toggle"),T=(0,e.jsxs)("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:["No gateways match “",f.trim(),"”."]});return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"hidden overflow-x-auto rounded-lg border border-border 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-border bg-muted/40 text-left text-(length:--text-micro) font-semibold uppercase tracking-wide text-muted-foreground",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:a,scope:n,appsLabel:i,active:_,expiring:p,lastUsed:m,href:C})=>(0,e.jsxs)("tr",{onClick:r(()=>o(C),"onClick"),className:"cursor-pointer border-b border-border transition-colors last:border-0 hover:bg-muted/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-foreground",children:a.name}),(0,e.jsx)(I,{endpointPath:a.endpointPath})]}),(0,e.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-muted-foreground",children:n}),(0,e.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-muted-foreground",children:i}),(0,e.jsxs)("td",{className:"whitespace-nowrap px-4 py-3 text-muted-foreground",children:[_," active",p>0?` · ${p} expiring`:""]}),(0,e.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-muted-foreground",children:m?(0,e.jsx)(A,{value:m}):"—"}),(0,e.jsx)("td",{className:"px-4 py-3",children:(0,e.jsx)("div",{className:"flex justify-end",children:b(a)})})]},a.id)),s.length===0?(0,e.jsx)("tr",{children:(0,e.jsx)("td",{colSpan:6,children:T})}):null]})]})}),(0,e.jsxs)("div",{className:"space-y-3 sm:hidden",children:[s.map(({gateway:a,scope:n,appsLabel:i,active:_,expiring:p,lastUsed:m,href:C})=>(0,e.jsxs)("div",{onClick:r(()=>o(C),"onClick"),className:"cursor-pointer rounded-lg border border-border p-4 transition-colors hover:bg-muted/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-foreground",children:a.name}),(0,e.jsx)(I,{endpointPath:a.endpointPath})]}),(0,e.jsx)("div",{className:"shrink-0",children:b(a)})]}),(0,e.jsxs)("dl",{className:"mt-3 grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[(0,e.jsx)(j,{label:"Scope",value:n}),(0,e.jsx)(j,{label:"Apps",value:i}),(0,e.jsx)(j,{label:"Tokens",value:`${_} active${p>0?` · ${p} expiring`:""}`}),(0,e.jsx)(j,{label:"Last used",value:m?(0,e.jsx)(A,{value:m}):"—"})]})]},a.id)),s.length===0?(0,e.jsx)("div",{className:"rounded-lg border border-border",children:T}):null]})]})})(),(0,e.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 px-4 py-3",children:[(0,e.jsx)("div",{className:"text-sm font-semibold text-foreground",children:"Why a gateway?"}),(0,e.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",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)(be,{companyId:t,open:D,onOpenChange:N,onCreated:r(s=>o(P(s,"overview")),"onCreated")})]})}r(Ce,"GatewaysList");function j({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-muted-foreground",children:o}),(0,e.jsx)("dd",{className:"mt-0.5 truncate text-foreground",children:d})]})}r(j,"MobileField");function je({onCreate:o}){return(0,e.jsxs)("div",{className:"rounded-2xl border border-dashed border-border p-12 text-center",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"No gateways yet"}),(0,e.jsx)("p",{className:"mx-auto mt-2 max-w-sm text-sm text-muted-foreground",children:"Group your connected apps into one safe endpoint you can hand to a client, then revoke it in one move."}),(0,e.jsxs)(O,{className:"mt-5",onClick:o,children:[(0,e.jsx)(R,{className:"mr-1.5 h-4 w-4"}),"New gateway"]})]})}r(je,"EmptyGateways");export{Ce as GatewaysList};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var pe=Object.defineProperty;var a=(t,s)=>pe(t,"name",{value:s,configurable:!0});import{a as V}from"./rolldown-runtime-DhZMWcEn.js";import{a as ue}from"./chat-channels-DWyry-9M.js";import{$A as he,$S as Q,Fu as W,Gb as E,HC as me,NE as h,Ti as Y,Wf as ge,__ as f,_w as Z,hC as xe,kT as F,nj as be,op as J,rT as ve,tT as S,vT as X,vb as ee,xb as te,yb as se,zE as ae}from"./index-Bt31d8ga.js";function we(t,s){const i=t.setup?.slackAccount;return s&&i?.status==="linked"&&i.paperclipUserId===s&&i.dmChannelId&&t.providerAccountId?`https://app.slack.com/client/${encodeURIComponent(t.providerAccountId)}/${encodeURIComponent(i.dmChannelId)}`:t.setup?.providerUrl??"https://app.slack.com"}a(we,"slackConversationUrl");var e=V(he(),1);function Ce({children:t,label:s="Advanced"}){return(0,e.jsxs)("details",{className:"group text-sm",children:[(0,e.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,e.jsx)(F,{className:"size-4 transition-transform group-open:rotate-90","aria-hidden":"true"}),s]}),(0,e.jsx)("div",{className:"mt-4 space-y-4",children:t})]})}a(Ce,"SlackSetupAdvanced");function Ae({value:t,readOnly:s,onChange:i,onBlur:g}){const c=ue.safeParse(t);return(0,e.jsxs)("div",{className:"space-y-3 text-sm",children:[[["appName","Slack app name",35,"The name of your app in Slack’s app directory and settings."],["botName","Bot display name",80,"The name people see when your bot sends a message."],["command","Slash command",32,"The command people type in Slack to talk to this agent."]].map(([d,x,N,o])=>(0,e.jsxs)("div",{className:"grid items-center gap-2 sm:grid-cols-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)("label",{htmlFor:`slack-${d}`,children:x}),(0,e.jsxs)(ee,{children:[(0,e.jsx)(te,{asChild:!0,children:(0,e.jsx)("button",{type:"button","aria-label":`Help with ${x.toLowerCase()}`,className:"rounded-sm text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,e.jsx)(X,{className:"size-3.5","aria-hidden":"true"})})}),(0,e.jsx)(se,{className:ae("max-w-xs",Q),children:o})]})]}),(0,e.jsx)(f,{id:`slack-${d}`,value:t[d],maxLength:N,readOnly:s,"aria-invalid":!c.success&&c.error.issues.some(m=>m.path[0]===d),onChange:a(m=>i({...t,[d]:m.target.value}),"onChange"),onBlur:g})]},d)),!c.success&&(0,e.jsx)("p",{role:"alert",className:"text-destructive",children:c.error.issues[0].message})]})}a(Ae,"SlackAppDetails");var p=V(be(),1);function q(t){return`${t.replace(/[^a-zA-Z0-9_-]+/g,"-")||"agent"}-avatar.png`}a(q,"agentAvatarFilename");function ie({avatarUrl:t,name:s,iconOnly:i=!1}){const[g,c]=(0,p.useState)(!1),[d,x]=(0,p.useState)(!1),N=a(async()=>{if(!g){c(!0),x(!1);try{const o=await fetch(t);if(!o.ok||!o.headers.get("content-type")?.startsWith("image/png"))throw new Error("Avatar unavailable");const m=URL.createObjectURL(await o.blob()),n=document.createElement("a");n.href=m,n.download=q(s),document.body.append(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(m),1e3)}catch{x(!0)}finally{c(!1)}}},"download");return(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(h,{variant:i?"ghost":"outline",size:i?"icon":"default",asChild:!0,children:(0,e.jsxs)("a",{"aria-label":"Download avatar",title:"Download avatar",href:t,download:q(s),"aria-disabled":g,onClick:a(o=>{o.preventDefault(),N()},"onClick"),children:[g?(0,e.jsx)(Z,{className:"size-4 animate-spin"}):(0,e.jsx)(ve,{className:"size-4"}),!i&&"Download avatar"]})}),d&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:"Couldn’t download the avatar. Try downloading it again."})]})}a(ie,"AgentAvatarDownload");function fe({title:t,children:s}){return(0,e.jsxs)("details",{className:"group/disclosure text-sm",children:[(0,e.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-2 rounded-sm py-2 font-medium text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:[(0,e.jsx)(F,{className:"size-4 shrink-0 transition-transform group-open/disclosure:rotate-90"}),t]}),(0,e.jsx)("div",{className:"space-y-4 pb-2 pt-3",children:s})]})}a(fe,"GitHubSettingsDisclosure");function ne(t){const s=t.botUsername?.replace(/^@/,"").replace(/\[bot\]$/,"");return s?`@${s}`:null}a(ne,"gitHubBotMention");function H(t){const s=t.setup?.github,i=ne(t)?.slice(1);return i?s?.appOwnerType==="organization"&&s.appOwnerLogin?`https://github.com/organizations/${encodeURIComponent(s.appOwnerLogin)}/settings/apps/${encodeURIComponent(i)}`:s?.appOwnerType==="personal"?`https://github.com/settings/apps/${encodeURIComponent(i)}`:"https://github.com/settings/apps":"https://github.com/settings/apps"}a(H,"gitHubAppSettingsUrl");function Ge({endpoint:t}){const s=ne(t);return s?(0,e.jsx)(W,{text:s,ariaLabel:"Copy GitHub mention",title:"Copy GitHub mention",className:"break-all font-mono text-xs",children:s}):null}a(Ge,"GitHubBotMention");function Se({endpoint:t,avatarUrl:s}){return(0,e.jsx)(fe,{title:"GitHub App name and logo",children:(0,e.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Change the name or upload a logo in the App’s Display information settings on GitHub."}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[s&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("img",{src:s,alt:`${t.assignedAgentName}’s avatar for download`,className:"size-12 shrink-0 object-contain"}),(0,e.jsx)(ie,{avatarUrl:s,name:t.botLabel??t.assignedAgentName})]}),(0,e.jsx)(h,{variant:"outline",asChild:!0,children:(0,e.jsxs)("a",{href:H(t),target:"_blank",rel:"noreferrer","aria-label":"Edit App name and logo on GitHub",children:["Edit on GitHub ",(0,e.jsx)(S,{className:"size-4"})]})})]}),(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Renaming also changes its @mention."," ",(0,e.jsx)(E,{className:"underline underline-offset-4",to:`/apps/chat/connect?provider=github&resume=${t.id}&reconnect=1`,children:"Reconnect afterward"})," ","to update it here."]})]})})}a(Se,"GitHubAppBranding");function He({endpoint:t,avatarUrl:s}){return(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[s&&(0,e.jsx)(ie,{avatarUrl:s,name:t.botLabel??t.assignedAgentName,iconOnly:!0}),(0,e.jsx)(h,{variant:"ghost",size:"sm",asChild:!0,children:(0,e.jsxs)("a",{href:H(t),target:"_blank",rel:"noreferrer","aria-label":"Edit App name and logo on GitHub",title:"Change the App name or upload its logo on GitHub",children:["Edit App ",(0,e.jsx)(S,{className:"size-3.5"})]})}),(0,e.jsx)(h,{variant:"ghost",size:"icon",asChild:!0,children:(0,e.jsx)(E,{to:`/apps/chat/connect?provider=github&resume=${t.id}&reconnect=1`,"aria-label":"Refresh GitHub App identity",title:"Reconnect after renaming the App to refresh its @mention",children:(0,e.jsx)(me,{className:"size-3.5"})})})]})}a(He,"GitHubAppIdentityActions");function Ie({endpoint:t}){return["attention","revoked"].includes(t.status)?(0,e.jsxs)("section",{"aria-label":"GitHub connection needs repair",className:"flex items-start gap-3 rounded-lg border border-destructive/40 bg-destructive/5 p-4",children:[(0,e.jsx)(xe,{className:"mt-0.5 size-5 shrink-0 text-destructive","aria-hidden":"true"}),(0,e.jsxs)("div",{className:"min-w-0 space-y-3",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("h2",{className:"text-base font-semibold",children:t.status==="revoked"?"GitHub bot is disconnected":"GitHub connection needs repair"}),(0,e.jsx)("p",{className:"text-sm",children:"Reconnect this bot to restore GitHub reviews and @mentions. Start with the App already saved in Microvac."})]}),(0,e.jsx)(h,{asChild:!0,children:(0,e.jsx)(E,{to:`/apps/chat/connect?provider=github&resume=${t.id}&reconnect=1`,children:"Reconnect GitHub"})}),(t.lastError||t.healthMessage)&&(0,e.jsxs)("details",{className:"text-sm",children:[(0,e.jsx)("summary",{className:"cursor-pointer text-muted-foreground",children:"Connection details"}),(0,e.jsx)("p",{className:"mt-2 break-words",children:t.lastError??t.healthMessage})]})]})]}):null}a(Ie,"GitHubConnectionRecoveryNotice");var Re=["privateKey","webhookSecret","clientSecret"];function G({id:t,label:s,help:i}){return(0,e.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,e.jsx)(J,{htmlFor:t,children:s}),(0,e.jsxs)(ee,{children:[(0,e.jsx)(te,{asChild:!0,children:(0,e.jsx)("button",{type:"button","aria-label":`Help with ${s}`,className:"rounded-sm text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",children:(0,e.jsx)(X,{className:"size-3.5","aria-hidden":"true"})})}),(0,e.jsx)(se,{className:ae("max-w-xs",Q),children:i})]})]})}a(G,"CredentialLabel");function Ee({endpoint:t,reconnect:s,credentialFields:i,requireAllCredentialFields:g=!1,rotateWebhookSecret:c=!1,rotationAlreadyCommitted:d=!1,onConnect:x,onExit:N}){const[o,m]=(0,p.useState)(!!i||!s),[n,j]=(0,p.useState)({appId:t.botExternalId??"",privateKey:"",webhookSecret:""}),[T,I]=(0,p.useState)(""),[l,y]=(0,p.useState)(!1),[D,b]=(0,p.useState)(""),[z,R]=(0,p.useState)(""),[v,L]=(0,p.useState)(""),[_,U]=(0,p.useState)(null),[w,C]=(0,p.useState)(!1),$=!i||i.includes("privateKey"),P=i?i.includes("webhookSecret"):!s&&!["active","paused","revoked"].includes(t.status),K=t.botLabel??t.setup?.github?.appName??"your existing App",A=!!n.appId.trim()&&!/^\d+$/.test(n.appId.trim()),k=!!n.privateKey.trim()&&!/-----BEGIN (?:RSA )?PRIVATE KEY-----/.test(n.privateKey),M=!!n.privateKey.trim()&&!k&&!T,re=i?!i.length||A||k||(g?i.some(r=>!n[r]?.trim()):i.every(r=>!n[r]?.trim())):o&&(!n.appId.trim()||!n.privateKey.trim()||A||k||P&&!n.webhookSecret.trim()),O=l?"Checking GitHub…":o?s?"Verify and reconnect":"Connect existing App":"Reconnect saved App";async function oe(){y(!0),b("");try{await x(o?n:void 0)}catch(r){b(r instanceof Error?r.message:"Could not reconnect GitHub. Try again.")}finally{y(!1)}}a(oe,"connect");async function B(r){try{const u=await Y.get(t.id);if(r!==void 0&&(u.setup?.credentialRotationId??null)===r)return C(!1),!0;L(""),U(null),b("The webhook secret changed, but this page did not receive it. Generate another secret and update GitHub.")}catch{}return C(!0),!1}a(B,"checkSavedRotation");async function le(){const r=_??(v?void 0:t.setup?.credentialRotationId??null);y(!0),b("");try{const u=await Y.generateSetupSecret(t.id);L(u.webhookSecret),U(u.credentialRotationId??null),C(!1)}catch(u){b(u instanceof Error?u.message:"Could not generate the webhook secret. Try again."),C(!0),await B(r)}finally{y(!1)}}return a(le,"generateSecret"),(0,e.jsxs)("div",{className:"space-y-6",children:[s&&(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("p",{className:"text-sm",children:["Restore ",(0,e.jsx)("strong",{children:K})," using its saved credentials. Microvac will check the App and its installation, then repair event delivery."]}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Your agent, repository choices, review settings, and task history stay attached to this connection. You don’t need to create another GitHub App."})]}),c&&(0,e.jsxs)("section",{"aria-label":"Rotate webhook secret",className:"space-y-3",children:[(0,e.jsx)("h2",{className:"text-base font-semibold",children:"Rotate the webhook secret"}),(0,e.jsx)("p",{className:"text-sm",children:d?"The rotated secret is saved. Reconnect using that value; Microvac will check GitHub’s signed delivery.":(0,e.jsxs)(e.Fragment,{children:["Generate a new secret, then replace the webhook secret in ",(0,e.jsx)("a",{href:H(t),target:"_blank",rel:"noreferrer",className:"underline",children:"GitHub App settings"}),". GitHub must verify the new secret before you reconnect."]})}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Generating immediately invalidates the previous secret. This value is shown only here; keep this page open until you have copied it."}),(0,e.jsx)(h,{type:"button",variant:"outline",disabled:l,onClick:a(()=>{le()},"onClick"),children:v||d?"Generate another secret":"Generate webhook secret"}),w&&(0,e.jsx)("p",{role:"status",className:"text-sm",children:"The active secret is not confirmed. Check its saved status before using an earlier value."}),w&&v&&(0,e.jsx)(h,{type:"button",variant:"outline",disabled:l,onClick:a(async()=>{y(!0);try{await B(_??void 0)&&b("")}finally{y(!1)}},"onClick"),children:"Check saved secret status"}),v&&!w&&(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(J,{htmlFor:"github-rotation-secret",children:"New webhook secret"}),(0,e.jsx)(f,{id:"github-rotation-secret",type:"password",autoComplete:"off",disabled:l,readOnly:!0,value:v}),!l&&(0,e.jsx)(W,{text:v,ariaLabel:"Copy webhook secret",className:"text-sm underline",children:"Copy webhook secret"})]})]}),D&&(0,e.jsxs)("div",{role:"alert",className:"space-y-2 rounded-lg border border-destructive/40 bg-destructive/5 p-4 text-sm",children:[(0,e.jsx)("p",{className:"font-medium",children:c?"Could not finish secret rotation":o?"Could not reconnect this App":"Could not reconnect the saved App"}),(0,e.jsx)("p",{className:"break-words",children:D}),(0,e.jsx)("p",{children:c?"Use the newest secret in GitHub App settings, then retry reconnecting after GitHub verifies delivery.":"Try again if the service is temporarily unavailable. If GitHub rejected the saved key, replace the credentials for this same App below."})]}),s&&!c&&!i&&(0,e.jsx)(h,{variant:"link",className:"h-auto p-0",disabled:l,onClick:a(()=>{m(!o),b("")},"onClick"),children:o?"Use saved credentials instead":"Replace App credentials…"}),o&&(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,e.jsx)("h2",{className:"text-base font-semibold",children:s?"Replace credentials for the same App":"Connect your existing GitHub App"}),(0,e.jsxs)("p",{children:[(0,e.jsxs)("a",{href:H(t),target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 underline",children:["Open GitHub App settings",(0,e.jsx)(S,{className:"size-3.5"})]})," and choose ",(0,e.jsx)("strong",{children:K}),"."]}),(0,e.jsx)("p",{className:"text-muted-foreground",children:"If it’s owned by an organization, open that organization’s Settings → Developer settings → GitHub Apps → Edit. You’ll need permission to manage the App."}),i&&(0,e.jsx)("p",{className:"text-muted-foreground",children:"Enter the requested credentials below. Other saved credentials stay in place."})]}),$&&(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(G,{id:"github-app-id",label:"App ID",help:"The numeric App ID on the GitHub App’s settings page. This is different from its Client ID or installation ID."}),(0,e.jsxs)("p",{id:"github-app-id-help",className:"text-sm text-muted-foreground",children:["Copy ",(0,e.jsx)("strong",{children:"App ID"})," from the App’s settings page. ",s&&"The saved ID is filled in when available."]}),(0,e.jsx)(f,{id:"github-app-id","aria-describedby":"github-app-id-help",inputMode:"numeric",value:n.appId,disabled:l,"aria-invalid":A,onChange:a(r=>j({...n,appId:r.target.value}),"onChange")}),A&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:"Use the numeric App ID, not the Client ID."})]}),$&&(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(G,{id:"github-private-key",label:"Private key",help:"Upload the .pem file downloaded from this GitHub App, or paste its entire contents, including the BEGIN and END lines."}),(0,e.jsxs)("ol",{id:"github-private-key-help",className:"list-decimal space-y-2 pl-5 text-sm text-muted-foreground",children:[(0,e.jsxs)("li",{children:["In the same App’s settings, open ",(0,e.jsx)("strong",{children:"Credentials → Key pairs → New key"}),". On the older settings page, use ",(0,e.jsx)("strong",{children:"Private keys → Generate a private key"}),"."]}),(0,e.jsxs)("li",{children:["Upload the downloaded ",(0,e.jsx)("strong",{children:".pem"})," file below, or paste its entire contents."]})]}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"You can reuse a .pem file you already saved. GitHub cannot show an old private key again. Creating a new key for the same App keeps its installation."}),(0,e.jsx)(f,{type:"file",accept:".pem","aria-label":"Upload private key PEM file",disabled:l,onChange:a(async r=>{const u=r.target.files?.[0];if(u){R("");try{const ce=await u.text();j(de=>({...de,privateKey:ce})),I("")}catch{R("Could not read this file. Try again or paste the key below.")}}},"onChange")}),(0,e.jsx)(f,{id:"github-private-key",type:"password",autoComplete:"off",placeholder:M?"Paste a replacement PEM key":"Or paste the complete PEM key","aria-describedby":"github-private-key-help",disabled:l,value:T,"aria-invalid":k,onPaste:a(r=>{r.preventDefault(),j({...n,privateKey:r.clipboardData.getData("text")}),I(""),R("")},"onPaste"),onChange:a(r=>{I(r.target.value),j({...n,privateKey:r.target.value})},"onChange")}),M&&(0,e.jsx)("p",{role:"status",className:"text-sm",children:"Private key loaded. Paste or upload another key to replace it."}),k&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:"Use a PEM private key, including its BEGIN and END lines. A token or client secret won’t work here."}),z&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:z}),(0,e.jsxs)("a",{className:"inline-flex items-center gap-1 text-sm underline",href:"https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/managing-private-keys-for-github-apps",target:"_blank",rel:"noreferrer",children:["GitHub’s private key instructions",(0,e.jsx)(S,{className:"size-3.5"})]})]}),P&&(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(G,{id:"github-webhook-secret",label:"Webhook secret",help:"The secret configured for this App’s webhook. It must match GitHub exactly."}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Use the secret saved when you configured this App’s webhook. If you no longer have it, change the webhook secret in GitHub App settings and enter the same value here."}),(0,e.jsx)(f,{id:"github-webhook-secret",type:"password",autoComplete:"off",disabled:l,value:n.webhookSecret,onChange:a(r=>j({...n,webhookSecret:r.target.value}),"onChange")})]}),i?.includes("clientSecret")&&(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(G,{id:"github-client-secret",label:"Client secret",help:"The client secret for this GitHub App’s user authentication. Leave the saved private key in place."}),(0,e.jsx)(f,{id:"github-client-secret",type:"password",autoComplete:"off",disabled:l,value:n.clientSecret??"",onChange:a(r=>j({...n,clientSecret:r.target.value}),"onChange")})]})]}),(0,e.jsx)(ge,{onSaveExit:N,disabled:l,children:(0,e.jsxs)(h,{"aria-label":O,disabled:l||re||w||c&&!v&&!d,onClick:a(()=>{oe()},"onClick"),children:[l&&(0,e.jsx)(Z,{className:"size-4 animate-spin","aria-hidden":"true"}),(0,e.jsx)("span",{className:"sm:hidden","aria-hidden":"true",children:l?"Checking…":s?"Reconnect":"Connect"}),(0,e.jsx)("span",{className:"hidden sm:inline","aria-hidden":"true",children:O})]})})]})}a(Ee,"GitHubAppRecovery");export{He as a,fe as c,we as d,Se as i,Ae as l,Ee as n,Ge as o,Ie as r,ne as s,Re as t,Ce as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var H=Object.defineProperty;var t=(s,n)=>H(s,"name",{value:n,configurable:!0});import{a as L}from"./rolldown-runtime-DhZMWcEn.js";import{et as E}from"./issue-detail-4PCbYpdv.js";import{b,i as R}from"./collections-BxrcELwt.js";import{$A as J,Ai as G,Cx as W,DC as F,Dy as X,Ex as Y,Fd as Z,GS as m,Gb as k,IE as ee,LS as O,ME as se,Mi as A,NE as v,Tx as ae,UE as q,_ as te,aE as ne,ab as re,bE as _,ci as le,d as ie,eD as oe,ei as ce,fk as de,g as ue,ib as me,ji as pe,ki as xe,nj as he,p as je,pb as fe,pk as ge,qC as ye,rb as be,ub as ve,xE as j,x_ as Ne,zE as Q}from"./index-Bt31d8ga.js";import{t as y}from"./goals-CvMWzjH4.js";import{t as Se}from"./EntityRow-gpsOgEtu.js";import{t as we}from"./GoalTree-laRjXp0P.js";var h=L(he(),1),e=L(J(),1);function u({label:s,children:n}){return(0,e.jsxs)("div",{className:"flex items-start gap-3 py-1.5",children:[(0,e.jsx)("span",{className:"text-xs text-muted-foreground shrink-0 w-20 mt-0.5",children:s}),(0,e.jsx)("div",{className:"flex items-center gap-1.5 min-w-0 flex-1 flex-wrap",children:n})]})}t(u,"PropertyRow");function Pe(s){return s.replace(/_/g," ").replace(/\b\w/g,n=>n.toUpperCase())}t(Pe,"label");function z({current:s,options:n,onChange:l,children:p}){const[x,c]=(0,h.useState)(!1);return(0,e.jsxs)(W,{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)(ae,{className:"w-40 p-1",align:"end",children:n.map(d=>(0,e.jsx)(v,{variant:"ghost",size:"sm",className:Q("w-full justify-start text-xs",d===s&&"bg-accent"),onClick:t(()=>{l(d),c(!1)},"onClick"),children:Pe(d)},d))})]})}t(z,"PickerButton");function T({goal:s,onUpdate:n}){const{selectedCompanyId:l}=O(),{data:p}=j({queryKey:m.agents.list(l),queryFn:t(()=>be.list(l),"queryFn"),enabled:!!l}),{data:x}=j({queryKey:m.goals.list(l),queryFn:t(()=>y.list(l),"queryFn"),enabled:!!l}),c=s.ownerAgentId?p?.find(i=>i.id===s.ownerAgentId):null,d=s.parentId?x?.find(i=>i.id===s.parentId):null;return(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)(u,{label:"Status",children:n?(0,e.jsx)(z,{current:s.status,options:ge,onChange:t(i=>n({status:i}),"onChange"),children:(0,e.jsx)(b,{status:s.status})}):(0,e.jsx)(b,{status:s.status})}),(0,e.jsx)(u,{label:"Level",children:n?(0,e.jsx)(z,{current:s.level,options:de,onChange:t(i=>n({level:i}),"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:ee(c),className:"text-sm hover:underline",children:c.name}):(0,e.jsx)("span",{className:"text-sm text-muted-foreground",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)(R,{}),(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)(u,{label:"Created",children:(0,e.jsx)("span",{className:"text-sm",children:q(s.createdAt)})}),(0,e.jsx)(u,{label:"Updated",children:(0,e.jsx)("span",{className:"text-sm",children:q(s.updatedAt)})})]})]})}t(T,"GoalProperties");function Ie({panelVisible:s,onShowProperties:n}){return(0,e.jsx)(v,{variant:"ghost",size:"icon-xs",className:Q("hidden md:inline-flex shrink-0 transition-opacity duration-200",s?"opacity-0 pointer-events-none w-0 overflow-hidden":"opacity-100"),onClick:n,"aria-label":"Show properties",title:"Show properties",children:(0,e.jsx)(F,{className:"h-4 w-4"})})}t(Ie,"GoalPropertiesToggleButton");function Te(){const{goalId:s}=ne(),{selectedCompanyId:n,setSelectedCompanyId:l}=O(),{openNewGoal:p}=X(),{openPanel:x,closePanel:c,panelVisible:d,setPanelVisible:i}=le(),{setBreadcrumbs:w}=me(),P=se(),[K,I]=(0,h.useState)(!1),C=j({queryKey:m.goals.detail(s),queryFn:t(()=>y.get(s),"queryFn"),enabled:!!s}),{data:r,isLoading:B,error:D}=C,f=ve(C),o=r?.companyId??n,{data:U}=j({queryKey:m.goals.list(o),queryFn:t(()=>y.list(o),"queryFn"),enabled:!!o}),{data:V}=j({...Ne(o,{includeArchived:!0}),enabled:!!o});(0,h.useEffect)(()=>{!r?.companyId||r.companyId===n||l(r.companyId,{source:"route_sync"})},[r?.companyId,n,l]);const g=_({mutationFn:t(a=>y.update(s,a),"mutationFn"),onSuccess:t(()=>{P.invalidateQueries({queryKey:m.goals.detail(s)}),o&&P.invalidateQueries({queryKey:m.goals.list(o)})},"onSuccess")}),M=_({mutationFn:t(async a=>{if(!o)throw new Error("No organization selected");return Z.uploadImage(o,a,`goals/${s??"draft"}`)},"mutationFn")}),N=(U??[]).filter(a=>a.parentId===s),S=(V??[]).filter(a=>s?a.goalIds.includes(s)||a.goals.some($=>$.id===s)?!0:a.goalId===s:!1);return(0,h.useEffect)(()=>{w([{label:"Goals",href:"/goals"},{label:r?.title??s??"Goal"}])},[w,r,s]),(0,h.useEffect)(()=>(r&&x((0,e.jsx)(T,{goal:r,onUpdate:t(a=>g.mutate(a),"onUpdate")})),()=>c()),[r]),B||f.kind==="reconnecting"?(0,e.jsx)(fe,{variant:"detail"}):f.kind==="error"?(0,e.jsx)(re,{size:"page",error:D,action:"load this goal",onRetry:f.retry,retrying:f.isFetching}):r?(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-xs uppercase text-muted-foreground",children:r.level}),(0,e.jsx)(b,{status:r.status}),(0,e.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,e.jsx)(v,{variant:"ghost",size:"icon-xs",className:"inline-flex md:hidden shrink-0",onClick:t(()=>I(!0),"onClick"),"aria-label":"Properties",title:"Properties",children:(0,e.jsx)(F,{className:"h-4 w-4"})}),(0,e.jsx)(Ie,{panelVisible:d,onShowProperties:t(()=>i(!0),"onShowProperties")})]})]}),(0,e.jsx)(E,{value:r.title,onSave:t(a=>g.mutate({title:a}),"onSave"),as:"h2",className:"text-xl font-bold"}),(0,e.jsx)(E,{value:r.description??"",onSave:t(a=>g.mutate({description:a}),"onSave"),as:"p",className:"text-sm text-muted-foreground",placeholder:"Add a description...",multiline:!0,imageUploadHandler:t(async a=>(await M.mutateAsync(a)).contentPath,"imageUploadHandler")})]}),(0,e.jsxs)(xe,{defaultValue:"children",children:[(0,e.jsxs)(pe,{children:[(0,e.jsxs)(A,{value:"children",children:["Sub-Goals (",N.length,")"]}),(0,e.jsxs)(A,{value:"projects",children:["Projects (",S.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)(v,{size:"sm",variant:"outline",onClick:t(()=>p({parentId:s}),"onClick"),children:[(0,e.jsx)(ye,{className:"h-3.5 w-3.5 mr-1.5"}),"Sub Goal"]})}),N.length===0?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"No sub-goals."}):(0,e.jsx)(we,{goals:N,goalLink:t(a=>`/goals/${a.id}`,"goalLink")})]}),(0,e.jsx)(G,{value:"projects",className:"mt-4",children:S.length===0?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"No linked projects."}):(0,e.jsx)("div",{className:"border border-border",children:S.map(a=>(0,e.jsx)(Se,{title:a.name,subtitle:a.description??void 0,to:oe(a),trailing:(0,e.jsx)(b,{status:a.status})},a.id))})})]}),(0,e.jsx)(ie,{open:K,onOpenChange:I,children:(0,e.jsxs)(je,{side:"bottom",className:"max-h-(--sz-85dvh) pb-(--sz-safe-bottom)","data-testid":"mobile-goal-properties-sheet",children:[(0,e.jsx)(ue,{children:(0,e.jsx)(te,{className:"text-sm",children:"Properties"})}),(0,e.jsx)(ce,{className:"flex-1 overflow-y-auto",children:(0,e.jsx)("div",{className:"px-4 pb-4",children:(0,e.jsx)(T,{goal:r,onUpdate:t(a=>g.mutate(a),"onUpdate")})})})]})})]}):null}t(Te,"GoalDetail");export{Te as GoalDetail};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var v=Object.defineProperty;var d=(t,s)=>v(t,"name",{value:s,configurable:!0});import{a as h}from"./rolldown-runtime-DhZMWcEn.js";import{b}from"./collections-BxrcELwt.js";import{$A as _,Gb as I,kT as k,nj as y,zE as l}from"./index-Bt31d8ga.js";var C=h(y(),1),e=h(_(),1);function j({goal:t,children:s,allGoals:o,depth:i,goalLink:c,onSelect:r}){const[n,f]=(0,C.useState)(!0),p=s.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(),f(!n)},"onClick"),"aria-label":`${t.title} subtree`,"aria-expanded":n,children:(0,e.jsx)(k,{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-muted-foreground capitalize",children:t.level}),(0,e.jsx)("span",{className:"flex-1 truncate",children:t.title}),(0,e.jsx)(b,{status:t.status})]}),u=l("flex items-center gap-2 px-3 py-1.5 text-sm transition-colors cursor-pointer hover:bg-accent/50");return(0,e.jsxs)("div",{children:[x?(0,e.jsx)(I,{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(()=>r?.(t),"onClick"),children:m}),p&&n&&(0,e.jsx)("div",{children:s.map(a=>(0,e.jsx)(j,{goal:a,children:o.filter(N=>N.parentId===a.id),allGoals:o,depth:i+1,goalLink:c,onSelect:r},a.id))})]})}d(j,"GoalNode");function S({goals:t,goalLink:s,onSelect:o}){const i=new Set(t.map(r=>r.id)),c=t.filter(r=>!r.parentId||!i.has(r.parentId));return t.length===0?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"No goals."}):(0,e.jsx)("div",{className:"border border-border py-1",children:c.map(r=>(0,e.jsx)(j,{goal:r,children:t.filter(n=>n.parentId===r.id),allGoals:t,depth:0,goalLink:s,onSelect:o},r.id))})}d(S,"GoalTree");export{S as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var p=Object.defineProperty;var a=(s,o)=>p(s,"name",{value:o,configurable:!0});import{a as u}from"./rolldown-runtime-DhZMWcEn.js";import{$A as d,Dy as y,GS as x,LS as j,NE as f,ab as b,ib as h,nj as v,on as l,pb as _,qC as G,ub as N,vC as c,xE as S}from"./index-Bt31d8ga.js";import{t as q}from"./goals-CvMWzjH4.js";import{t as w}from"./GoalTree-laRjXp0P.js";var E=u(v(),1),e=u(d(),1);function B(){const{selectedCompanyId:s}=j(),{openNewGoal:o}=y(),{setBreadcrumbs:n}=h();(0,E.useEffect)(()=>{n([{label:"Goals"}])},[n]);const i=S({queryKey:x.goals.list(s),queryFn:a(()=>q.list(s),"queryFn"),enabled:!!s}),{data:r,isLoading:m}=i,t=N(i);return s?m||t.kind==="reconnecting"?(0,e.jsx)(_,{variant:"list"}):t.kind==="error"?(0,e.jsx)(b,{size:"page",error:t.error,action:"load goals",onRetry:t.retry,retrying:t.isFetching}):(0,e.jsxs)("div",{className:"space-y-4",children:[r&&r.length===0&&(0,e.jsx)(l,{placement:"upper",icon:c,message:"No goals yet.",action:"Add Goal",onAction:a(()=>o(),"onAction")}),r&&r.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"flex items-center justify-start",children:(0,e.jsxs)(f,{size:"sm",variant:"outline",onClick:a(()=>o(),"onClick"),children:[(0,e.jsx)(G,{className:"h-3.5 w-3.5 mr-1.5"}),"New Goal"]})}),(0,e.jsx)(w,{goals:r,goalLink:a(g=>`/goals/${g.id}`,"goalLink")})]})]}):(0,e.jsx)(l,{placement:"upper",icon:c,message:"Select an organization to view goals."})}a(B,"Goals");export{B as Goals};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var M=Object.defineProperty;var t=(y,x)=>M(y,"name",{value:x,configurable:!0});import{a as z}from"./rolldown-runtime-DhZMWcEn.js";import{$A as P,AC as L,E_ as q,GS as c,ME as R,NE as Q,OC as V,Sp as O,VS as B,ab as b,ay as u,bE as E,ib as D,nj as T,sv as $,ub as v,xE as N,zS as G}from"./index-Bt31d8ga.js";var i=z(T(),1),e=z(P(),1);function X(){const{userId:y,settled:x}=B(),{setBreadcrumbs:S}=D(),{pushToast:w}=$(),o=R(),[l,U]=(0,i.useState)(""),[a,A]=(0,i.useState)(null),[C,I]=(0,i.useState)(new Set);(0,i.useEffect)(()=>{S([{label:"Settings",href:"/company/settings"},{label:"Instance settings",href:"/company/settings/instance/general"},{label:"Access"}])},[S]);const n=N({queryKey:c.access.adminUsers(l),queryFn:t(()=>u.searchAdminUsers(l),"queryFn")}),m=v(n),h=N({...G(y),enabled:x&&n.isSuccess}),g=v(h),K=h.data??[],d=(0,i.useMemo)(()=>n.data?.find(s=>s.id===a)??null,[a,n.data]),r=N({queryKey:c.access.userCompanyAccess(a??""),queryFn:t(()=>u.getUserCompanyAccess(a),"queryFn"),enabled:!!a}),p=v(r);(0,i.useEffect)(()=>{!a&&n.data?.[0]&&A(n.data[0].id)},[a,n.data]),(0,i.useEffect)(()=>{r.data&&I(new Set(r.data.companyAccess.filter(s=>s.status==="active").map(s=>s.companyId)))},[r.data]);const f=E({mutationFn:t(()=>u.setUserCompanyAccess(a,[...C]),"mutationFn"),onSuccess:t(async()=>{await o.invalidateQueries({queryKey:c.access.userCompanyAccess(a)}),await o.invalidateQueries({queryKey:c.access.adminUsers(l)}),await o.invalidateQueries({queryKey:c.companies.all}),w({title:"Organization access updated",tone:"success"})},"onSuccess")}),k=E({mutationFn:t(async s=>{if(!a)throw new Error("No user selected");return s?u.promoteInstanceAdmin(a):u.demoteInstanceAdmin(a)},"mutationFn"),onSuccess:t(async()=>{await o.invalidateQueries({queryKey:c.access.adminUsers(l)}),a&&await o.invalidateQueries({queryKey:c.access.userCompanyAccess(a)}),w({title:"Instance role updated",tone:"success"})},"onSuccess")});return n.isLoading||m.kind==="reconnecting"||!x||n.isSuccess&&(h.isPending||g.kind==="reconnecting")?(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:"Loading instance access…"}):m.kind==="error"?m.errorKind==="forbidden"?(0,e.jsx)("div",{className:"text-sm text-destructive",children:"Instance admin access is required to manage users."}):(0,e.jsx)(b,{size:"page",error:n.error,action:"load users",onRetry:m.retry,retrying:m.isFetching}):g.kind==="error"?(0,e.jsx)(b,{size:"page",error:h.error,action:"load organizations",onRetry:g.retry,retrying:g.isFetching}):(0,e.jsxs)("div",{className:"max-w-6xl 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)(V,{className:"h-5 w-5 text-muted-foreground"}),(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Instance Access"})]}),(0,e.jsx)("p",{className:"max-w-3xl text-sm text-muted-foreground",children:"Search users, manage instance-admin status, and control which organizations they can access."})]}),(0,e.jsxs)("div",{className:"grid gap-6 lg:grid-cols-(--gtc-34)",children:[(0,e.jsxs)(q,{className:"block space-y-4 p-4",children:[(0,e.jsxs)("label",{className:"block space-y-2 text-sm",children:[(0,e.jsx)("span",{className:"font-medium",children:"Search users"}),(0,e.jsx)("input",{className:"w-full rounded-md border border-border bg-background px-3 py-2",value:l,onChange:t(s=>U(s.target.value),"onChange"),placeholder:"Search by name or email"})]}),(0,e.jsx)("div",{className:"space-y-2",children:(n.data??[]).map(s=>(0,e.jsxs)("button",{type:"button",onClick:t(()=>A(s.id),"onClick"),className:`w-full rounded-lg border px-3 py-3 text-left transition-colors ${s.id===a?"border-foreground bg-accent":"border-border hover:bg-accent/40"}`,children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("div",{className:"truncate font-medium",children:s.name||s.email||s.id}),(0,e.jsx)("div",{className:"truncate text-sm text-muted-foreground",children:s.email||s.id})]}),s.isInstanceAdmin?(0,e.jsx)(L,{className:"h-4 w-4 text-emerald-600"}):null]}),(0,e.jsxs)("div",{className:"mt-2 text-xs text-muted-foreground",children:[s.activeCompanyMembershipCount," active organization memberships"]})]},s.id))})]}),(0,e.jsx)(q,{className:"block space-y-4 p-5",children:a?r.isLoading||p.kind==="reconnecting"?(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:"Loading user access…"}):p.kind==="error"?(0,e.jsx)(b,{error:r.error,action:"load user access",onRetry:p.retry,retrying:p.isFetching}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-lg font-semibold",children:d?.name||d?.email||a}),(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:d?.email||a})]}),(0,e.jsx)(Q,{variant:d?.isInstanceAdmin?"outline":"default",onClick:t(()=>k.mutate(!(d?.isInstanceAdmin??!1)),"onClick"),disabled:k.isPending,children:d?.isInstanceAdmin?"Remove instance admin":"Promote to instance admin"})]}),(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h2",{className:"text-sm font-semibold",children:"Organization access"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Toggle organization membership for this user. New access defaults to an active operator membership."})]}),(0,e.jsx)("div",{className:"grid gap-3 md:grid-cols-2",children:K.map(s=>(0,e.jsxs)("label",{className:"flex items-start gap-3 rounded-lg border border-border px-3 py-3",children:[(0,e.jsx)(O,{checked:C.has(s.id),onCheckedChange:t(_=>{I(F=>{const j=new Set(F);return _?j.add(s.id):j.delete(s.id),j})},"onCheckedChange")}),(0,e.jsxs)("span",{className:"space-y-1",children:[(0,e.jsx)("span",{className:"block text-sm font-medium",children:s.name}),(0,e.jsx)("span",{className:"block text-xs text-muted-foreground",children:s.issuePrefix})]})]},s.id))}),(0,e.jsx)("div",{className:"flex justify-end",children:(0,e.jsx)(Q,{onClick:t(()=>f.mutate(),"onClick"),disabled:f.isPending,children:f.isPending?"Saving…":"Save organization access"})})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("h2",{className:"text-sm font-semibold",children:"Current memberships"}),(0,e.jsx)("div",{className:"space-y-2",children:(r.data?.companyAccess??[]).map(s=>(0,e.jsxs)("div",{className:"flex items-center justify-between rounded-lg border border-border px-3 py-2 text-sm",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"font-medium",children:s.companyName||s.companyId}),(0,e.jsxs)("div",{className:"text-muted-foreground",children:[s.membershipRole||"unset"," • ",s.status]})]}),(0,e.jsx)("div",{className:"text-xs text-muted-foreground",children:new Date(s.updatedAt).toLocaleDateString()})]},s.id))})]})]}):(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:"Select a user to inspect instance access."})})]})]})}t(X,"InstanceAccess");export{X as InstanceAccess};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var ce=Object.defineProperty;var n=(l,o)=>ce(l,"name",{value:o,configurable:!0});import{a as N}from"./rolldown-runtime-DhZMWcEn.js";import{$A as ge,Dr as ue,E_ as C,Ep as w,Er as me,GS as d,H_ as be,JC as pe,Kv as I,Kw as he,LS as xe,ME as ke,NE as fe,ab as ye,bE as ve,hC as P,hE as Ce,hw as we,ib as Se,jD as D,nj as je,ry as M,ub as Te,xE as Ee,zb as Ie}from"./index-Bt31d8ga.js";var L=N(je(),1),e=N(ge(),1);function v(){const{selectedCompany:l}=xe(),o=Ie(),c=o.error instanceof Error?o.error.message:null;return(0,e.jsxs)(C,{className:"block bg-transparent p-5",children:[(0,e.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsx)("h3",{id:"classic-workspace-title",className:"text-sm font-medium",children:"Classic workspace"}),(0,e.jsx)("p",{id:"classic-workspace-description",className:"text-sm text-muted-foreground",children:"Use the previous workspace instead of the standard Coordinator workspace. This changes your interface across companies on this instance."}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Off by default. Turn it off to return to Coordinator. Your work and your teammates’ settings stay the same."}),o.userId==="local-board"&&(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"This local instance uses the shared Local Board identity."})]}),(0,e.jsx)(w,{checked:o.loaded&&!o.enabled,disabled:!o.loaded||o.isSaving||!o.userId||!l||!!o.error,"aria-label":"Enable classic workspace","aria-describedby":"classic-workspace-description",onCheckedChange:n(u=>{l&&o.setEnabled(l.id,!u).catch(()=>{})},"onCheckedChange")})]}),o.isSaving&&(0,e.jsx)("p",{role:"status",className:"mt-3 text-sm text-muted-foreground",children:"Saving your workspace…"}),!o.loaded&&(0,e.jsx)("p",{role:"status",className:"mt-3 text-sm text-muted-foreground",children:"Loading your preference…"}),c&&(0,e.jsxs)("div",{role:"alert",className:"mt-3 flex items-center gap-2 text-sm text-destructive",children:[(0,e.jsx)("span",{children:c}),(0,e.jsx)(fe,{variant:"ghost",size:"sm",onClick:n(()=>{o.retry()},"onClick"),children:"Retry"})]})]})}n(v,"ClassicWorkspaceSetting");function Pe(l,o){return l?.enableWorktreeRunExecution!==!0?{kind:"off"}:l.worktreeRunExecutionActivatedAt?o?l.worktreeRunExecutionActivationInstanceId!==o?{kind:"fail_closed",reason:"instance_mismatch"}:{kind:"armed",activatedAt:l.worktreeRunExecutionActivatedAt}:{kind:"fail_closed",reason:"missing_instance_id"}:{kind:"fail_closed",reason:"missing_cutoff"}}n(Pe,"resolveWorktreeRunExecutionDisplayState");function Le(l){const o=new Date(l);return Number.isNaN(o.getTime())?l:o.toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}n(Le,"formatActivationTimestamp");function R(){return(0,e.jsxs)(be,{variant:"outline",className:"text-muted-foreground",children:[(0,e.jsx)(we,{"aria-hidden":"true"}),"Managed by Microvac Cloud"]})}n(R,"ManagedByCloudBadge");function r({title:l,description:o,footnote:c,checked:u,onCheckedChange:p,disabled:s,settingKey:g,managed:t,ariaLabel:f}){const{hidden:i}=M(),m=t?.managed===!0;return i.has(D(g))?null:(0,e.jsx)(C,{id:`experimental-${g}`,className:"block scroll-mt-4 bg-transparent p-5",children:(0,e.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold",children:l}),m?(0,e.jsx)(R,{}):null]}),(0,e.jsx)("p",{className:"max-w-2xl text-sm text-muted-foreground",children:o}),c?(0,e.jsx)("p",{className:"max-w-2xl text-xs text-muted-foreground",children:c}):null]}),(0,e.jsx)(w,{checked:u,onCheckedChange:n(b=>{m||p(b)},"onCheckedChange"),disabled:s||m,"aria-label":f})]})})}n(r,"ExperimentalToggleCard");function Re(){const{setBreadcrumbs:l}=Se(),o=ke(),{hidden:c}=M(),[u,p]=(0,L.useState)(null);(0,L.useEffect)(()=>{l([{label:"Settings",href:"/company/settings"},{label:"Experimental"}])},[l]);const s=Ee({queryKey:d.instance.experimentalSettings,queryFn:n(()=>I.getExperimental(),"queryFn")}),g=Te(s),t=ve({mutationFn:n(async a=>I.updateExperimental(a),"mutationFn"),onMutate:n(async a=>{await o.cancelQueries({queryKey:d.instance.experimentalSettings});const k=o.getQueryData(d.instance.experimentalSettings);return k&&o.setQueryData(d.instance.experimentalSettings,{...k,...a}),{previousSettings:k}},"onMutate"),onSuccess:n(async a=>{p(null),o.setQueryData(d.instance.experimentalSettings,a),await Promise.all([o.invalidateQueries({queryKey:d.instance.experimentalSettings}),o.invalidateQueries({queryKey:d.adapters.all}),o.invalidateQueries({queryKey:["built-in-agents"]}),o.invalidateQueries({queryKey:d.health}),o.invalidateQueries({queryKey:["apps"]})])},"onSuccess"),onError:n((a,k,E)=>{E?.previousSettings&&o.setQueryData(d.instance.experimentalSettings,E.previousSettings),p(Ce(a).body)},"onError")});if(s.isLoading||g.kind==="reconnecting")return(0,e.jsxs)("div",{className:"max-w-6xl space-y-6",children:[(0,e.jsx)(v,{},"personal-workspace"),(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:"Loading experimental settings..."})]});if(g.kind==="error")return(0,e.jsxs)("div",{className:"max-w-6xl space-y-6",children:[(0,e.jsx)(v,{},"personal-workspace")," ",(0,e.jsx)(ye,{size:"page",error:s.error,action:"load experimental settings",onRetry:g.retry,retrying:g.isFetching})]});const f=ue(),i=s.data?.managedKeys??{},m=s.data?.enableWorktreeRunExecution===!0,b=i.enableWorktreeRunExecution?.managed===!0,h=Pe(s.data,me()),A=s.data?.enableEnvironments===!0,K=s.data?.enableNativeRunner===!0,W=s.data?.enableChatConnectors===!0,B=s.data?.enableManagedSandboxOnly===!0,S=s.data?.enableIsolatedWorkspaces===!0,G=s.data?.enableIsolatedWorkspacesByDefault===!0,O=s.data?.enableStreamlinedUi!==!1;s.data?.enableConferenceRoomChat;const q=s.data?.enableClassicTaskInterface===!0,F=s.data?.enableIssuePlanDecompositions===!0,_=s.data?.enableExperimentalFileViewer===!0,V=s.data?.enableExternalObjects===!0,Q=s.data?.enableBuiltInAgents===!0,U=s.data?.enableBetaSkills===!0,j=s.data?.enableSummaries===!0,y=s.data?.enableStatusCards===!0,H=i.enableSummaries?.managed===!0,z=i.enableStatusCards?.managed===!0,Y=H&&!j,$=z&&y,J=s.data?.enableDecisions===!0,Z=s.data?.enableResponsibilities===!0,X=s.data?.enableGoalsSidebarLink===!0,ee=s.data?.enableCases===!0,ae=s.data?.enableServerInfoDebugView===!0,te=s.data?.enablePaperclipDeveloperMode===!0,ne=s.data?.enableSimplifiedEnglishInteractions===!0,se=s.data?.enableFirstTaskPlanProposal===!0,ie=s.data?.enableCloudTrialInference===!0,re=s.data?.enableSmokeLab===!0,oe=s.data?.autoRestartDevServerWhenIdle===!0,x=n(a=>!c.has(D(a)),"isVisible"),T=f&&x("enableWorktreeRunExecution"),le=T||["autoRestartDevServerWhenIdle","enableManagedSandboxOnly","enablePaperclipDeveloperMode","enableServerInfoDebugView","enableSmokeLab","enableIssuePlanDecompositions"].some(x),de=x("enableClassicTaskInterface")||x("enableGoalsSidebarLink");return(0,e.jsxs)("div",{className:"max-w-6xl space-y-6",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(he,{className:"h-5 w-5 text-muted-foreground"}),(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Experimental"})]}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Opt into features that are still being evaluated before they become default behavior."})]}),(0,e.jsx)(v,{},"personal-workspace"),(0,e.jsx)("div",{role:"alert",className:"rounded-lg border border-amber-500/30 bg-amber-500/5 px-4 py-3",children:(0,e.jsxs)("div",{className:"flex items-start gap-3",children:[(0,e.jsx)(P,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-700"}),(0,e.jsxs)("div",{className:"space-y-1 text-sm",children:[(0,e.jsx)("p",{className:"font-medium text-foreground",children:"Experimental features may break at any time."}),(0,e.jsx)("p",{className:"text-muted-foreground",children:"These features are opt-in and come with no compatibility guarantees. They may change, break, or be removed without notice. Avoid relying on them for critical or production workflows."})]})]})}),u&&(0,e.jsx)("div",{className:"rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-sm text-destructive",children:u}),(0,e.jsxs)("section",{className:"space-y-3","aria-labelledby":"experimental-features-heading",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("h2",{id:"experimental-features-heading",className:"text-sm font-semibold",children:"Experimental features"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Optional product features that are still being evaluated."})]}),(0,e.jsx)(r,{title:"Areas & Responsibilities dashboard",description:"Replace the classic dashboard with one built around the areas you care about and the responsibilities you own in each. An agent can interview you to create it, and you can undo any change.",footnote:"Turning this off brings back the classic dashboard. Your areas and responsibilities are kept.",checked:Z,onCheckedChange:n(a=>t.mutate({enableResponsibilities:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableResponsibilities",managed:i.enableResponsibilities,ariaLabel:"Toggle Areas & Responsibilities dashboard experimental setting"}),(0,e.jsx)(r,{title:"Beta skills",description:"Allow agents to pin beta releases of the Microvac core skill. Disabling this returns every agent to the default live skill without removing saved pins.",checked:U,onCheckedChange:n(a=>t.mutate({enableBetaSkills:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableBetaSkills",managed:i.enableBetaSkills,ariaLabel:"Toggle beta skills experimental setting"}),(0,e.jsx)(r,{title:"Built-in Agents",description:"Show Paperclip-managed built-in agent surfaces, including built-in roster badges, the Built-in agents tab, and built-in agent setup controls.",checked:Q,onCheckedChange:n(a=>t.mutate({enableBuiltInAgents:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableBuiltInAgents",managed:i.enableBuiltInAgents,ariaLabel:"Toggle built-in agents experimental setting"}),(0,e.jsx)(r,{title:"Cases",description:"Durable work products (blog posts, tweet storms…) that tasks create and iterate on. Adds the Cases tab and the agent case API.",footnote:"Turning Cases off hides the tab and blocks the case API; existing case data is kept.",checked:ee,onCheckedChange:n(a=>t.mutate({enableCases:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableCases",managed:i.enableCases,ariaLabel:"Toggle cases experimental setting"}),(0,e.jsx)(r,{title:"Chat connectors",description:"Connect agents to Slack, Discord, Microsoft Teams, and Telegram conversations.",footnote:"Turning this off hides experimental chat setup and connected-task controls. Existing chat connections keep running. AgentMail, GitHub review bots, and tool connectors are unaffected.",checked:W,onCheckedChange:n(a=>t.mutate({enableChatConnectors:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableChatConnectors",managed:i.enableChatConnectors,ariaLabel:"Toggle chat connectors experimental setting"}),(0,e.jsx)(r,{title:"Cloud starter inference",description:"Lets new Cloud workspaces start their first agent right away (OpenCode / GPT-6 Luna via server proxy) before asking the user to connect a model provider.",checked:ie,onCheckedChange:n(a=>t.mutate({enableCloudTrialInference:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableCloudTrialInference",managed:i.enableCloudTrialInference,ariaLabel:"Toggle Cloud starter inference experimental setting"}),(0,e.jsx)(r,{title:"Combined Inbox + Task List",description:"In the Classic workspace, fold Inbox into Tasks. One Tasks row carries the unread badge, and a Views menu reaches every personal and organization task view.",footnote:"Coordinator always includes personal views in Tasks. For Classic, turning this off restores its separate Inbox. No data changes.",checked:s.data?.enableCombinedInboxTasks??!1,onCheckedChange:n(a=>t.mutate({enableCombinedInboxTasks:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableCombinedInboxTasks",managed:i.enableCombinedInboxTasks,ariaLabel:"Toggle combined inbox and task list experimental setting"}),null,(0,e.jsx)(r,{title:"Command/Ctrl+Enter to Submit",description:"Restore the previous keyboard shortcut for task replies and new tasks: Command/Ctrl+Enter submits, and Enter adds a new line.",footnote:"Off by default: Enter submits, and Shift+Enter adds a new line.",checked:s.data?.enableLegacyComposerSubmit===!0,onCheckedChange:n(a=>t.mutate({enableLegacyComposerSubmit:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableLegacyComposerSubmit",managed:i.enableLegacyComposerSubmit,ariaLabel:"Toggle Command/Ctrl+Enter to submit"}),(0,e.jsx)(r,{title:"Decisions",description:"Show the Decisions item in the main sidebar — the attention home that surfaces the tasks awaiting your input — while the surface is still being evaluated.",checked:J,onCheckedChange:n(a=>t.mutate({enableDecisions:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableDecisions",managed:i.enableDecisions,ariaLabel:"Toggle decisions experimental setting"}),(0,e.jsx)(r,{title:"Durable app actions (MCP Tasks)",description:"Let connected apps run long actions, such as CI runs or deploys, as tasks Microvac keeps track of. If an action outlasts a call, a restart, or a deploy, the agent collects the result later and the work is never started twice.",footnote:"Applies to apps that support MCP Tasks. Turning this off stops new tasks; apps then answer as before.",checked:s.data?.enableMcpTasks===!0,onCheckedChange:n(a=>t.mutate({enableMcpTasks:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableMcpTasks",managed:i.enableMcpTasks,ariaLabel:"Toggle durable app actions experimental setting"}),(0,e.jsx)(r,{title:"Google Antigravity swarm",description:"Start a comment on a Google Antigravity agent's task with /swarm to run its native swarm: a coordinator, helpers and a checker that work together in the task folder.",footnote:"Local computers with a Google sign-in only. Helper actions are approved automatically. Microvac does not sandbox the helpers: their shell commands can write outside the task folder, for example in temp directories.",checked:s.data?.enableAntigravitySwarm===!0,onCheckedChange:n(a=>t.mutate({enableAntigravitySwarm:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableAntigravitySwarm",managed:i.enableAntigravitySwarm,ariaLabel:"Toggle Google Antigravity swarm experimental setting"}),(0,e.jsx)(r,{title:"Enable Environments",description:"Show environment management in company settings and allow project and agent environment assignment controls.",checked:A,onCheckedChange:n(a=>t.mutate({enableEnvironments:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableEnvironments",managed:i.enableEnvironments,ariaLabel:"Toggle environments experimental setting"}),(0,e.jsx)(r,{title:"Enable External Objects",description:"Detect external URLs in issues and show resolved status for pull requests, tickets, and other referenced work objects.",checked:V,onCheckedChange:n(a=>t.mutate({enableExternalObjects:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableExternalObjects",managed:i.enableExternalObjects,ariaLabel:"Toggle external objects experimental setting"}),(0,e.jsx)(r,{title:"Enable Isolated Workspaces",description:"Show execution workspace controls in project configuration and allow isolated workspace behavior for new and existing task runs.",checked:S,onCheckedChange:n(a=>t.mutate({enableIsolatedWorkspaces:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableIsolatedWorkspaces",managed:i.enableIsolatedWorkspaces,ariaLabel:"Toggle isolated workspaces experimental setting"}),(0,e.jsx)(r,{title:"Experimental fast responses",description:"Allow short acknowledgements while agents begin work. Configure them in Settings → Connections.",checked:s.data?.enableFastResponses??!1,onCheckedChange:n(a=>t.mutate({enableFastResponses:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableFastResponses",managed:i.enableFastResponses,ariaLabel:"Toggle fast responses experimental setting"}),(0,e.jsx)(r,{title:"Experimental File Viewer",description:"Show task detail controls for browsing and previewing workspace files relative to a task.",checked:_,onCheckedChange:n(a=>t.mutate({enableExperimentalFileViewer:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableExperimentalFileViewer",managed:i.enableExperimentalFileViewer,ariaLabel:"Toggle experimental file viewer setting"}),(0,e.jsx)(r,{title:"First task: propose with a plan document",description:"When the user's first request is a single task, the chief of staff writes a short plan document and a checkbox card instead of a one-card confirmation. Applies to organizations created after the toggle is flipped.",checked:se,onCheckedChange:n(a=>t.mutate({enableFirstTaskPlanProposal:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableFirstTaskPlanProposal",managed:i.enableFirstTaskPlanProposal,ariaLabel:"Toggle first task plan proposal experimental setting"}),(0,e.jsx)(r,{title:"Google Workspace connector (Microvac)",description:"Show the built-in Google Workspace connector for Gmail, Drive, and Calendar while Google verification is pending.",footnote:"Off by default. While off, Google apps are offered through Composio and Arcade instead, and the built-in connector cannot be set up or run.",checked:s.data?.enableGoogleWorkspaceConnector===!0,onCheckedChange:n(a=>t.mutate({enableGoogleWorkspaceConnector:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableGoogleWorkspaceConnector",managed:i.enableGoogleWorkspaceConnector,ariaLabel:"Toggle Microvac Google Workspace connector experimental setting"}),(0,e.jsx)(r,{title:"Grok Bot",description:"Connect an existing Grok Bot as an agent. Verify routine delivery and an authenticated reply before assigning work.",footnote:"Requires Microvac Runner and authenticated public HTTPS. Usage is not reported. Turning this off blocks Grok calls and new dispatch.",checked:s.data?.enableGrokBot===!0,onCheckedChange:n(a=>t.mutate({enableGrokBot:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableGrokBot",managed:i.enableGrokBot,ariaLabel:"Toggle Grok Bot experimental setting"}),(0,e.jsx)(r,{title:"Memory connectors",description:"Connect Mem0, Zep, Supermemory, Cognee, and Honcho for long-term memory and context.",footnote:"Turning this off hides setup for these connectors. Existing connections keep running.",checked:s.data?.enableMemoryConnectors===!0,onCheckedChange:n(a=>t.mutate({enableMemoryConnectors:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableMemoryConnectors",managed:i.enableMemoryConnectors,ariaLabel:"Toggle memory connectors experimental setting"}),(0,e.jsx)(r,{title:"Muse — Personal agent",description:"Connect your personal Meta Muse. Pair it, detect its receiver, and verify an independent background reply before assigning tasks.",footnote:"Requires Microvac Runner and an authenticated instance with a public HTTPS URL. Turning this off blocks new work; cleanup and stop evidence remain available. Provider usage and cost are unavailable.",checked:s.data?.enableMuse===!0,onCheckedChange:n(a=>t.mutate({enableMuse:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableMuse",managed:i.enableMuse,ariaLabel:"Toggle Muse experimental setting"}),(0,e.jsx)(r,{title:"OpenAI Dot",description:"Add OpenAI Dot as a standalone agent choice. Pair your Dot and verify event delivery before assigning work.",footnote:"Requires an authenticated instance with a public HTTPS URL. Turning this off blocks Dot calls and new work; saved connections are kept.",checked:s.data?.enableOpenAiDot===!0,onCheckedChange:n(a=>t.mutate({enableOpenAiDot:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableOpenAiDot",managed:i.enableOpenAiDot,ariaLabel:"Toggle OpenAI Dot experimental setting"}),(0,e.jsx)(r,{title:"Microvac Runner",description:"Allow agents to select Microvac Runner, including authenticated runner ingress when a sandbox requires it. First-run setup offers qualified GitHub Copilot. Turning this off hides the choice without affecting existing native runs.",checked:K,onCheckedChange:n(a=>t.mutate({enableNativeRunner:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableNativeRunner",managed:i.enableNativeRunner,ariaLabel:"Toggle Microvac Runner experimental setting"}),(0,e.jsx)(r,{title:"Simplified English Interactions",description:"Instruct agents to write user interactions (plan confirmations, questions, suggested tasks, checkbox prompts) in ASD-STE100 Simplified Technical English, with brief context on what information the decision needs and what happens for each choice.",checked:ne,onCheckedChange:n(a=>t.mutate({enableSimplifiedEnglishInteractions:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableSimplifiedEnglishInteractions",managed:i.enableSimplifiedEnglishInteractions,ariaLabel:"Toggle simplified english interactions experimental setting"}),(0,e.jsx)(r,{title:"Status Cards",description:"Enable the experimental shared status-card board and its gated API. Existing card data is kept when this is disabled.",footnote:"Enabling Status Cards also enables Summaries.",checked:y,onCheckedChange:n(a=>t.mutate(a?{enableSummaries:!0,enableStatusCards:!0}:{enableStatusCards:!1}),"onCheckedChange"),disabled:t.isPending||Y,settingKey:"enableStatusCards",managed:i.enableStatusCards,ariaLabel:"Toggle status cards experimental setting"}),(0,e.jsx)(r,{title:"Streamlined UI",description:"Use the simplified main sidebar, shared Tasks and Inbox presentation, focused task detail layout, and contextual navigation across Agents, Routines, Skills, and Settings.",footnote:"Turning this off restores the legacy shell and navigation. Task and page data are unchanged.",checked:O,onCheckedChange:n(a=>t.mutate({enableStreamlinedUi:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableStreamlinedUi",managed:i.enableStreamlinedUi,ariaLabel:"Toggle Streamlined UI experimental setting"}),(0,e.jsx)(r,{title:"Summaries",description:"Show Summarizer-generated status slots on project and workspace pages, with on-demand refresh and revision history. Existing summary data is kept when this is disabled.",footnote:"Status Cards requires Summaries. Disabling Summaries also disables Status Cards.",checked:j,onCheckedChange:n(a=>t.mutate(a||!y?{enableSummaries:a}:{enableSummaries:!1,enableStatusCards:!1}),"onCheckedChange"),disabled:t.isPending||$,settingKey:"enableSummaries",managed:i.enableSummaries,ariaLabel:"Toggle summaries experimental setting"}),S&&(0,e.jsx)(r,{title:"Use Isolated Workspaces By Default",description:"Treat a project that has no execution workspace policy of its own as if it selected isolated workspaces, so its tasks get a per-task worktree instead of sharing the project checkout. A project that carries its own policy keeps it.",checked:G,onCheckedChange:n(a=>t.mutate({enableIsolatedWorkspacesByDefault:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableIsolatedWorkspacesByDefault",managed:i.enableIsolatedWorkspacesByDefault,ariaLabel:"Toggle isolated workspaces by default experimental setting"})]}),le?(0,e.jsxs)("section",{className:"space-y-3","aria-labelledby":"developer-mode-heading",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("h2",{id:"developer-mode-heading",className:"text-sm font-semibold",children:"Microvac Developer Mode"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Internal tools for developing, testing, and debugging Microvac."})]}),(0,e.jsx)(r,{title:"Auto-Restart Dev Server When Idle",description:"In `pnpm dev:once`, wait for all queued and running local agent runs to finish, then restart the server automatically when backend changes or migrations make the current boot stale.",checked:oe,onCheckedChange:n(a=>t.mutate({autoRestartDevServerWhenIdle:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"autoRestartDevServerWhenIdle",managed:i.autoRestartDevServerWhenIdle,ariaLabel:"Toggle guarded dev-server auto-restart"}),(0,e.jsx)(r,{title:"Managed Environment Only",description:"Hide the local environment and run all agents in the platform-managed environment.",checked:B,onCheckedChange:n(a=>t.mutate({enableManagedSandboxOnly:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableManagedSandboxOnly",managed:i.enableManagedSandboxOnly,ariaLabel:"Toggle managed environment only experimental setting"}),(0,e.jsx)(r,{title:"Microvac Developer Mode",description:"Show internal Microvac maintainer tools and observability links, including Honeycomb trace queries on run pages.",checked:te,onCheckedChange:n(a=>t.mutate({enablePaperclipDeveloperMode:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enablePaperclipDeveloperMode",managed:i.enablePaperclipDeveloperMode,ariaLabel:"Toggle Microvac developer mode experimental setting"}),T?(0,e.jsx)(C,{className:"block bg-transparent p-5",children:(0,e.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,e.jsxs)("div",{className:"space-y-1.5",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold",children:"Run tasks in this worktree"}),b?(0,e.jsx)(R,{}):null]}),(0,e.jsx)("p",{className:"max-w-2xl text-sm text-muted-foreground",children:"This is an isolated git-worktree preview instance. Turn this on to let the scheduler execute runs here. Only tasks created after enabling will run automatically — copied/pre-existing tasks stay parked. Toggling off and on resets the cutoff."})]}),(0,e.jsx)(w,{checked:m,onCheckedChange:n(a=>{b||t.mutate({enableWorktreeRunExecution:a})},"onCheckedChange"),disabled:t.isPending||b,"aria-label":"Toggle worktree run execution setting"})]}),h.kind==="armed"?(0,e.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-emerald-500/30 bg-emerald-500/5 px-3 py-2 text-sm text-foreground",children:[(0,e.jsx)(pe,{className:"h-4 w-4 shrink-0 text-emerald-600"}),(0,e.jsxs)("span",{children:["Running tasks created after"," ",(0,e.jsx)("span",{className:"font-medium",children:Le(h.activatedAt)}),"."]})]}):null,h.kind==="fail_closed"?(0,e.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-sm",children:[(0,e.jsx)(P,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-700"}),(0,e.jsxs)("div",{className:"space-y-0.5",children:[(0,e.jsx)("p",{className:"font-medium text-foreground",children:"Execution is suppressed — effectively off."}),(0,e.jsxs)("p",{className:"text-muted-foreground",children:[h.reason==="instance_mismatch"?"This setting was armed in a different instance and copied here, so no tasks run automatically.":"This setting is missing its activation cutoff, so no tasks run automatically."," ","Toggle it off and back on to arm execution for tasks created here."]})]})]}):null]})}):null,(0,e.jsx)(r,{title:"Server Info Debug View",description:'Show a "Server" section in the account drawer with the current server restart time and running commit.',checked:ae,onCheckedChange:n(a=>t.mutate({enableServerInfoDebugView:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableServerInfoDebugView",managed:i.enableServerInfoDebugView,ariaLabel:"Toggle server info debug view experimental setting"}),(0,e.jsx)(r,{title:"Smoke Lab",description:'Add a "Smoke Lab" tab under Apps → Developer and an "Integration smoke" card on the dashboard for exercising every integration path against deterministic local fixtures (fake OAuth provider + loopback MCP servers). Private (non-public) deployments only.',checked:re,onCheckedChange:n(a=>t.mutate({enableSmokeLab:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableSmokeLab",managed:i.enableSmokeLab,ariaLabel:"Toggle smoke lab experimental setting"}),(0,e.jsx)(r,{title:"Task Plan Decomposition",description:"Show accepted-plan decomposition history on task detail pages. Intended for debugging and validating subtask creation behavior while the presentation is still being refined.",checked:F,onCheckedChange:n(a=>t.mutate({enableIssuePlanDecompositions:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableIssuePlanDecompositions",managed:i.enableIssuePlanDecompositions,ariaLabel:"Toggle task plan decomposition panel experimental setting"})]}):null,de?(0,e.jsxs)("section",{className:"space-y-3","aria-labelledby":"legacy-heading",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("h2",{id:"legacy-heading",className:"text-sm font-semibold",children:"Legacy"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"These features are going to be removed."})]}),(0,e.jsx)(r,{title:"Classic Task Interface",description:"Restores the previous task detail page: the page-level header with inline description editing, the plain comment thread, and the fixed Properties sidebar. Chat-only features — streaming activity folding, inline plan and question cards, the three-mode composer — are unavailable in the classic view.",footnote:"Switching takes effect immediately. No task data is affected.",checked:q,onCheckedChange:n(a=>t.mutate({enableClassicTaskInterface:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableClassicTaskInterface",managed:i.enableClassicTaskInterface,ariaLabel:"Toggle classic task interface experimental setting"}),(0,e.jsx)(r,{title:"Goals Sidebar Link",description:"Restore the Goals item in the main sidebar while the goals surface is being evaluated.",checked:X,onCheckedChange:n(a=>t.mutate({enableGoalsSidebarLink:a}),"onCheckedChange"),disabled:t.isPending,settingKey:"enableGoalsSidebarLink",managed:i.enableGoalsSidebarLink,ariaLabel:"Toggle goals sidebar link experimental setting"})]}):null]})}n(Re,"InstanceExperimentalSettings");export{Re as InstanceExperimentalSettings};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Ee=Object.defineProperty;var s=(a,i)=>Ee(a,"name",{value:i,configurable:!0});import{a as ve}from"./rolldown-runtime-DhZMWcEn.js";import{$A as Ie,BS as Te,GS as g,Gb as ce,JS as qe,LS as Me,ME as Pe,NE as C,Pm as Le,UE as Re,US as Fe,Vb as Be,XS as Ue,YS as K,Yb as Oe,aE as $e,ak as Qe,ay as J,bE as oe,eC as le,hE as Ke,nj as Je,qd as He,uv as Ye,xE as H,zE as de}from"./index-Bt31d8ga.js";import{r as ue,t as L}from"./invite-memory-BKdqfr5K.js";var l=ve(Je(),1),e=ve(Ie(),1),De=Qe.filter(a=>a!=="paperclip_runner"),Y=new Set(["claude_local","codex_local","gemini_local","kimi_local","opencode_local","pi_local","cursor"]);function Ge(a,i){let c=a;for(const d of i){if(!c||typeof c!="object")return null;c=c[d]}return typeof c=="string"&&c.trim().length>0?c:null}s(Ge,"readNestedString");var z="w-full border border-zinc-800 bg-zinc-950 px-3 py-2 text-sm text-zinc-100 outline-none focus:border-zinc-500",me="border border-zinc-800 bg-zinc-950/95 p-6",pe="flex-1 border px-3 py-2 text-sm transition-colors";function We(a){return a?a.charAt(0).toUpperCase()+a.slice(1):null}s(We,"formatHumanRole");function be(a){if(!a||typeof a!="object")return null;const i=a.code;return typeof i=="string"&&i.trim().length>0?i:null}s(be,"getAuthErrorCode");function Ve(a){if(!(a instanceof Error))return null;const i=a.message.trim();return i.length>0?i:null}s(Ve,"getAuthErrorMessage");function xe(a,i){return a instanceof qe&&a.status===i&&Ue(a.body)===null}s(xe,"isUnexplainedAuthStatus");function Xe(a,i,c){const d=be(a),r=Ve(a),o=c.trim().length>0?c.trim():"that email";return d==="USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL"?{tone:"info",message:`An account already exists for ${o}. Sign in below to continue with this invite.`}:d==="INVALID_EMAIL_OR_PASSWORD"?{tone:"error",message:"That email and password did not match an existing Microvac account. Check both fields, or create an account first if you are new here."}:i==="sign_in"&&xe(a,401)?{tone:"error",message:"That email and password did not match an existing Microvac account. Check both fields, or create an account first if you are new here."}:i==="sign_up"&&xe(a,422)?{tone:"info",message:`An account may already exist for ${o}. Try signing in instead.`}:{tone:"error",message:r??"Authentication failed"}}s(Xe,"mapInviteAuthFeedback");function he(a){return!!(a&&typeof a=="object"&&"bootstrapAccepted"in a)}s(he,"isBootstrapAcceptancePayload");function Ze(a,i){return!a||typeof a!="object"||i?!1:a.status==="approved"}s(Ze,"isApprovedHumanJoinPayload");function D({companyDisplayName:a,companyLogoUrl:i,className:c}){return(0,e.jsx)(Ye,{companyName:a,logoUrl:i,logoFit:"contain",className:c})}s(D,"InviteCompanyLogo");function ge({companyDisplayName:a,companyLogoUrl:i,invitedByUserName:c,claimSecret:d=null,claimApiKeyPath:r=null,onboardingTextUrl:o=null}){return(0,e.jsx)("div",{className:"min-h-screen bg-zinc-950 px-6 py-12 text-zinc-100",children:(0,e.jsxs)("div",{className:"mx-auto max-w-md border border-zinc-800 bg-zinc-950 p-6","data-testid":"invite-pending-approval",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)(D,{companyDisplayName:a,companyLogoUrl:i,className:"h-12 w-12 border border-zinc-800 rounded-none"}),(0,e.jsxs)("h1",{className:"text-lg font-semibold",children:["Request to join ",a]})]}),(0,e.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,e.jsxs)("p",{className:"text-sm text-zinc-400",children:["Your request is still awaiting approval. ",c??"An organization admin"," must approve your request to join."]}),(0,e.jsxs)("div",{className:"border border-zinc-800 p-3",children:[(0,e.jsx)("p",{className:"text-xs text-zinc-500 mb-1",children:"Approval page"}),(0,e.jsx)("p",{className:"text-sm text-zinc-200",children:"Settings → Members"})]}),(0,e.jsxs)("p",{className:"text-sm text-zinc-400",children:["Ask them to visit ",(0,e.jsx)("span",{className:"text-zinc-200",children:"Settings → Members"})," to approve your request."]}),(0,e.jsx)("p",{className:"text-xs text-zinc-500",children:"Refresh this page after you've been approved — you'll be redirected automatically."})]}),d&&r?(0,e.jsxs)("div",{className:"mt-4 space-y-1 border border-zinc-800 p-3 text-xs text-zinc-400",children:[(0,e.jsx)("div",{className:"text-zinc-200",children:"Claim secret"}),(0,e.jsx)("div",{className:de("font-mono break-all",le),children:d}),(0,e.jsxs)("div",{className:"font-mono break-all",children:["POST ",r]})]}):null,o?(0,e.jsxs)("div",{className:"mt-4 text-xs text-zinc-400",children:["Onboarding: ",(0,e.jsx)("span",{className:de("font-mono break-all",le),children:o})]}):null]})})}s(ge,"AwaitingJoinApprovalPanel");function st(){const a=Le(),i=Pe(),c=Oe(),{setSelectedCompanyId:d}=Me(),r=($e().token??"").trim(),[o,R]=(0,l.useState)("sign_up"),[F,ye]=(0,l.useState)(""),[A,fe]=(0,l.useState)(""),[w,G]=(0,l.useState)(""),[B,je]=(0,l.useState)(""),[W,Ne]=(0,l.useState)("claude_local"),[V,ze]=(0,l.useState)(""),[E,Ae]=(0,l.useState)(null),[_,U]=(0,l.useState)(null),[x,v]=(0,l.useState)(null),[X,Z]=(0,l.useState)(!1),I="invite-auth-error",T=H({queryKey:g.health,queryFn:s(()=>Be.get(),"queryFn")}),ee=De.filter(t=>!T.data?.cloud||a.isCloudHarnessAllowed(t)),te=ee.filter(t=>Y.has(t)),N=te.includes(W)?W:te[0],p=H({queryKey:g.auth.session,queryFn:s(()=>K.getSession(),"queryFn")}),f=H({queryKey:g.access.invite(r),queryFn:s(()=>J.getInvite(r),"queryFn"),enabled:r.length>0}),q=Fe({enabled:!!p.data&&!!f.data?.companyId,staleTime:0}),M=T.data?.deploymentMode!=="local_trusted"?q.isFetchedAfterMount:!0,we=M?q.data?.companies??[]:[];(0,l.useEffect)(()=>{r&&ue(r)},[r]),(0,l.useEffect)(()=>{Z(!1)},[r]),(0,l.useEffect)(()=>{if(!M)return;const t=q.data?.companies;!t||!f.data?.companyId||t.some(h=>h.id===f.data.companyId)&&L(r)},[q.data,f.data,M,r]);const n=f.data,O=!!p.data&&!!n?.companyId&&!M,b=!!n?.companyId&&we.some(t=>t.id===n?.companyId),u=n?.companyName?.trim()||"this Microvac company",P=n?.companyLogoUrl?.trim()||null,$=n?.invitedByUserName?.trim()||null,ae=n?.inviteMessage?.trim()||null,_e=We(n?.humanRole),j=n?.joinRequestStatus??null,ne=n?.joinRequestType??null,Q=ne==="human"&&(j==="pending_approval"||j==="approved"),se=T.data?.deploymentMode==="authenticated"&&!p.data&&n?.allowedJoinTypes!=="agent",y=n?.inviteType!=="bootstrap_ceo"&&n?.allowedJoinTypes==="agent",S=!!p.data&&!y&&n?.inviteType!=="bootstrap_ceo"&&(!j||Q)&&!O&&!b&&!E&&_===null,Se=p.data?.user.name?.trim()||p.data?.user.email?.trim()||"this account",ie=A.trim().length>0&&w.trim().length>0&&(o==="sign_in"||F.trim().length>0&&w.trim().length>=8),m=oe({mutationFn:s(async()=>{if(!n)throw new Error("Invite not found");if(O)throw new Error("Checking your organization access. Try again in a moment.");if(b)throw new Error("This account already belongs to the organization.");if(n.inviteType==="bootstrap_ceo"||n.allowedJoinTypes!=="agent")return J.acceptInvite(r,{requestType:"human"});if(!N)throw new Error("No adapters are available for this invite.");return J.acceptInvite(r,{requestType:"agent",agentName:B.trim(),adapterType:N,capabilities:V.trim()||null})},"mutationFn"),onSuccess:s(async t=>{U(null),L(r);const h=he(t);Ae({kind:h?"bootstrap":"join",payload:t}),await i.invalidateQueries({queryKey:g.auth.session}),await i.invalidateQueries({queryKey:g.access.currentBoardAccess}),await i.invalidateQueries({queryKey:g.companies.all}),n?.companyId&&Ze(t,y)&&(d(n.companyId,{source:"manual"}),c("/",{replace:!0}))},"onSuccess"),onError:s(t=>{U(Ke(t).body)},"onError")});(0,l.useEffect)(()=>{!S||X||m.isPending||(Z(!0),U(null),m.mutate())},[m,X,S]);const k=oe({mutationFn:s(async()=>{if(o==="sign_in"){await K.signInEmail({email:A.trim(),password:w});return}await K.signUpEmail({name:F.trim(),email:A.trim(),password:w})},"mutationFn"),onSuccess:s(async()=>{v(null),ue(r),await i.invalidateQueries({queryKey:g.auth.session}),await i.invalidateQueries({queryKey:g.health}),await i.invalidateQueries({queryKey:g.access.currentBoardAccess});const{companies:t}=await Te(i);if(n?.companyId&&t.some(h=>h.id===n.companyId)){L(r),d(n.companyId,{source:"manual"}),c("/",{replace:!0});return}if(!(!n||n.inviteType!=="bootstrap_ceo"))try{he(await m.mutateAsync())&&c("/",{replace:!0})}catch{return}},"onSuccess"),onError:s(t=>{const h=Xe(t,o,A);be(t)==="USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL"&&(R("sign_in"),G("")),v(h)},"onError")}),re=(0,l.useMemo)(()=>n?b?"Open organization":n.inviteType==="bootstrap_ceo"?"Accept invite":y?"Submit request":p.data?"Accept invite":"Continue":"Continue",[n,b,p.data,y]);if(!r)return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10 text-sm text-destructive",children:"Invalid invite token."});if(f.isLoading||T.isLoading||p.isLoading)return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10 text-sm text-muted-foreground",children:"Loading invite..."});if(O)return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10 text-sm text-muted-foreground",children:"Checking your access..."});if(f.error||!n)return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,e.jsxs)("div",{className:"border border-border bg-card p-6","data-testid":"invite-error",children:[(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Invite not available"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"This invite may be expired, revoked, or already used."})]})});if(j==="approved"&&ne==="human"&&b)return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10 text-sm text-muted-foreground",children:"Opening organization..."});if(j==="pending_approval"&&!Q)return(0,e.jsx)(ge,{companyDisplayName:u,companyLogoUrl:P,invitedByUserName:$});if(j&&!Q)return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,e.jsxs)("div",{className:"border border-border bg-card p-6","data-testid":"invite-error",children:[(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Invite not available"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:j==="rejected"?"This join request was not approved.":"This invite has already been used."})]})});if(E?.kind==="bootstrap")return(0,e.jsx)("div",{className:"min-h-screen bg-zinc-950 px-6 py-12 text-zinc-100",children:(0,e.jsxs)("div",{className:"mx-auto max-w-md border border-zinc-800 bg-zinc-950 p-6",children:[(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Bootstrap complete"}),(0,e.jsx)("div",{className:"mt-4",children:(0,e.jsx)(C,{asChild:!0,className:"rounded-none",children:(0,e.jsx)(ce,{to:"/",children:"Open board"})})})]})});if(E?.kind==="join"){const t=E.payload,h=typeof t.claimSecret=="string"?t.claimSecret:null,ke=typeof t.claimApiKeyPath=="string"?t.claimApiKeyPath:null,Ce=Ge(t.onboarding,["textInstructions","url"]);return!y&&t.status==="approved"?(0,e.jsx)("div",{className:"min-h-screen bg-zinc-950 px-6 py-12 text-zinc-100",children:(0,e.jsxs)("div",{className:"mx-auto max-w-md border border-zinc-800 bg-zinc-950 p-6",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)(D,{companyDisplayName:u,companyLogoUrl:P,className:"h-12 w-12 border border-zinc-800 rounded-none"}),(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"You joined the organization"})]}),(0,e.jsx)("div",{className:"mt-4",children:(0,e.jsx)(C,{asChild:!0,className:"w-full rounded-none",children:(0,e.jsx)(ce,{to:"/",children:"Open board"})})})]})}):(0,e.jsx)(ge,{companyDisplayName:u,companyLogoUrl:P,invitedByUserName:$,claimSecret:h,claimApiKeyPath:ke,onboardingTextUrl:Ce})}return(0,e.jsx)("div",{className:"min-h-screen bg-zinc-950 px-6 py-12 text-zinc-100",children:(0,e.jsx)("div",{className:"mx-auto max-w-5xl",children:(0,e.jsxs)("div",{className:"grid gap-6 lg:grid-cols-(--gtc-36)",children:[(0,e.jsxs)("section",{className:`${me} space-y-6`,children:[(0,e.jsxs)("div",{className:"flex items-start gap-4",children:[(0,e.jsx)(D,{companyDisplayName:u,companyLogoUrl:P,className:"h-16 w-16 rounded-none border border-zinc-800"}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsx)("p",{className:"text-xs uppercase tracking-(--tracking-caps) text-zinc-500",children:"You've been invited to join Microvac"}),(0,e.jsx)("h1",{className:"mt-2 text-2xl font-semibold",children:n.inviteType==="bootstrap_ceo"?"Set up Microvac":`Join ${u}`}),(0,e.jsx)("p",{className:"mt-2 max-w-2xl text-sm leading-6 text-zinc-300",children:y?"Review the invite details, then submit the agent information below to start the join request.":se?"Create your Microvac account first. If you already have one, switch to sign in and continue the invite with the same email.":"Your account is ready. Review the invite details, then accept it to continue."})]})]}),(0,e.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,e.jsxs)("div",{className:"border border-zinc-800 p-3",children:[(0,e.jsx)("div",{className:"text-xs uppercase tracking-(--tracking-caps) text-zinc-500",children:"Organization"}),(0,e.jsx)("div",{className:"mt-1 text-sm text-zinc-100",children:u})]}),(0,e.jsxs)("div",{className:"border border-zinc-800 p-3",children:[(0,e.jsx)("div",{className:"text-xs uppercase tracking-(--tracking-caps) text-zinc-500",children:"Invited by"}),(0,e.jsx)("div",{className:"mt-1 text-sm text-zinc-100",children:$??"Microvac board"})]}),(0,e.jsxs)("div",{className:"border border-zinc-800 p-3",children:[(0,e.jsx)("div",{className:"text-xs uppercase tracking-(--tracking-caps) text-zinc-500",children:"Requested access"}),(0,e.jsx)("div",{className:"mt-1 text-sm text-zinc-100",children:y?"Agent join request":_e??"Organization access"})]}),(0,e.jsxs)("div",{className:"border border-zinc-800 p-3",children:[(0,e.jsx)("div",{className:"text-xs uppercase tracking-(--tracking-caps) text-zinc-500",children:"Invite expires"}),(0,e.jsx)("div",{className:"mt-1 text-sm text-zinc-100",children:Re(n.expiresAt)})]})]}),ae?(0,e.jsxs)("div",{className:"border border-amber-500/40 bg-amber-500/10 p-4",children:[(0,e.jsx)("div",{className:"text-xs uppercase tracking-(--tracking-caps) text-amber-200/80",children:"Message from inviter"}),(0,e.jsx)("p",{className:"mt-2 text-sm leading-6 text-amber-50",children:ae})]}):null,p.data?(0,e.jsxs)("div",{className:"border border-emerald-500/40 bg-emerald-500/10 p-4 text-sm text-emerald-50",children:["Signed in as ",(0,e.jsx)("span",{className:"font-medium",children:Se}),"."]}):null]}),(0,e.jsx)("section",{className:`${me} h-fit`,children:y?(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Submit agent details"}),(0,e.jsxs)("p",{className:"mt-1 text-sm text-zinc-400",children:["This invite will create an approval request for a new agent in ",u,"."]})]}),(0,e.jsxs)("label",{className:"block text-sm",children:[(0,e.jsx)("span",{className:"mb-1 block text-zinc-400",children:"Agent name"}),(0,e.jsx)("input",{className:z,value:B,onChange:s(t=>je(t.target.value),"onChange")})]}),(0,e.jsxs)("label",{className:"block text-sm",children:[(0,e.jsx)("span",{className:"mb-1 block text-zinc-400",children:"Adapter type"}),(0,e.jsxs)("select",{className:z,value:N??"",disabled:!N,onChange:s(t=>Ne(t.target.value),"onChange"),children:[!N&&(0,e.jsx)("option",{value:"",disabled:!0,children:"No available adapter"}),ee.map(t=>(0,e.jsxs)("option",{value:t,disabled:!Y.has(t),children:[He(t),Y.has(t)?"":" (Coming soon)"]},t))]})]}),(0,e.jsxs)("label",{className:"block text-sm",children:[(0,e.jsx)("span",{className:"mb-1 block text-zinc-400",children:"Capabilities"}),(0,e.jsx)("textarea",{className:z,rows:4,value:V,onChange:s(t=>ze(t.target.value),"onChange")})]}),_?(0,e.jsx)("p",{className:"text-xs text-red-400",children:_}):null,(0,e.jsx)(C,{className:"w-full rounded-none",disabled:m.isPending||B.trim().length===0||!N,onClick:s(()=>m.mutate(),"onClick"),children:m.isPending?"Working...":re})]}):se?(0,e.jsxs)("div",{className:"space-y-5",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:o==="sign_up"?"Create your account":"Sign in to continue"}),(0,e.jsx)("p",{className:"mt-1 text-sm text-zinc-400",children:o==="sign_up"?`Start with a Microvac account. After that, you'll come right back here to accept the invite for ${u}.`:"Use the Microvac account that already matches this invite. If you do not have one yet, switch back to create account."})]}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)("button",{type:"button",className:`${pe} ${o==="sign_up"?"border-zinc-100 bg-zinc-100 text-zinc-950":"border-zinc-800 text-zinc-300 hover:border-zinc-600"}`,onClick:s(()=>{v(null),R("sign_up")},"onClick"),children:"Create account"}),(0,e.jsx)("button",{type:"button",className:`${pe} ${o==="sign_in"?"border-zinc-100 bg-zinc-100 text-zinc-950":"border-zinc-800 text-zinc-300 hover:border-zinc-600"}`,onClick:s(()=>{v(null),R("sign_in")},"onClick"),children:"I already have an account"})]}),(0,e.jsxs)("form",{className:"space-y-4",method:"post",action:o==="sign_up"?"/api/auth/sign-up/email":"/api/auth/sign-in/email",onSubmit:s(t=>{if(t.preventDefault(),!k.isPending){if(!ie){v({tone:"error",message:"Please fill in all required fields."});return}k.mutate()}},"onSubmit"),"data-testid":"invite-inline-auth",children:[o==="sign_up"?(0,e.jsxs)("label",{className:"block text-sm",htmlFor:"invite-name",children:[(0,e.jsx)("span",{className:"mb-1 block text-zinc-400",children:"Name"}),(0,e.jsx)("input",{id:"invite-name",name:"name",className:z,value:F,onChange:s(t=>{ye(t.target.value),v(null)},"onChange"),autoComplete:"name",required:!0,"aria-required":"true","aria-invalid":x?.tone==="error"?!0:void 0,"aria-describedby":x?I:void 0,autoFocus:!0})]}):null,(0,e.jsxs)("label",{className:"block text-sm",htmlFor:"invite-email",children:[(0,e.jsx)("span",{className:"mb-1 block text-zinc-400",children:"Email"}),(0,e.jsx)("input",{id:"invite-email",name:"email",type:"email",className:z,value:A,onChange:s(t=>{fe(t.target.value),v(null)},"onChange"),autoComplete:"username",required:!0,"aria-required":"true","aria-invalid":x?.tone==="error"?!0:void 0,"aria-describedby":x?I:void 0,autoFocus:o==="sign_in"})]}),(0,e.jsxs)("label",{className:"block text-sm",htmlFor:"invite-password",children:[(0,e.jsx)("span",{className:"mb-1 block text-zinc-400",children:"Password"}),(0,e.jsx)("input",{id:"invite-password",name:"password",type:"password",className:z,value:w,onChange:s(t=>{G(t.target.value),v(null)},"onChange"),autoComplete:o==="sign_in"?"current-password":"new-password",required:!0,"aria-required":"true","aria-invalid":x?.tone==="error"?!0:void 0,"aria-describedby":x?I:void 0})]}),x?(0,e.jsx)("p",{id:I,role:"alert",className:`text-xs ${x.tone==="info"?"text-amber-300":"text-red-400"}`,children:x.message}):null,(0,e.jsx)(C,{type:"submit",className:"w-full rounded-none",disabled:k.isPending,"aria-disabled":!ie||k.isPending,children:k.isPending?"Working...":o==="sign_in"?"Sign in and continue":"Create account and continue"})]}),(0,e.jsx)("p",{className:"text-xs leading-5 text-zinc-500",children:o==="sign_up"?"Already signed up before? Use the existing-account option instead so the invite lands on the right Microvac user.":"No account yet? Switch back to create account so you can accept the invite with a new login."})]}):(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:b?"Already in this organization":S?"Completing organization access":n.inviteType==="bootstrap_ceo"?"Accept bootstrap invite":"Accept organization invite"}),(0,e.jsx)("p",{className:"mt-1 text-sm text-zinc-400",children:S?`Granting your access to ${u}.`:b?`This account already belongs to ${u}.`:`This will ${n.inviteType==="bootstrap_ceo"?"finish setting up Microvac":`grant or complete your access to ${u}`}.`})]}),_?(0,e.jsx)("p",{className:"text-xs text-red-400",children:_}):null,S?(0,e.jsx)("div",{className:"text-sm text-zinc-400",children:m.isPending?"Submitting request...":"Finishing sign-in..."}):(0,e.jsx)(C,{className:"w-full rounded-none",disabled:m.isPending,onClick:s(()=>{if(b&&n.companyId){L(r),d(n.companyId,{source:"manual"}),c("/",{replace:!0});return}m.mutate()},"onClick"),children:m.isPending?"Working...":re})]})})]})})})}s(st,"InviteLandingPage");export{st as InviteLandingPage};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var P=Object.defineProperty;var n=(t,r)=>P(t,"name",{value:r,configurable:!0});import{a as I}from"./rolldown-runtime-DhZMWcEn.js";import{W as L}from"./issue-detail-4PCbYpdv.js";import{$A as O,E_ as x,H_ as C,M_ as b,O_ as v,j_ as j,nj as E}from"./index-Bt31d8ga.js";var o=I(E(),1);var $=new Date("2026-04-28T14:00:00.000Z").getTime();function i(t){return new Date($+t*6e4)}n(i,"atMinute");function M(t,r,a,A){const l=new Date("2026-04-28T14:00:00.000Z");return{id:t,companyId:"company-long-thread",name:r,urlKey:A,role:"engineer",title:null,icon:a,status:"active",reportsTo:null,capabilities:null,adapterType:"codex_local",adapterConfig:{},runtimeConfig:{},budgetMonthlyCents:0,spentMonthlyCents:0,lastHeartbeatAt:null,metadata:null,createdAt:l,updatedAt:l,pauseReason:null,pausedAt:null,permissions:{canCreateAgents:!1}}}n(M,"createAgent");var m=M("agent-perf-codex","CodexCoder","code","codexcoder"),h=M("agent-perf-reviewer","ReviewBot","sparkles","reviewbot"),B=new Map([[m.id,m],[h.id,h]]);function U(t){return[`## Baseline note ${t}`,"",`This assistant update captures a deterministic markdown-heavy row for long-thread rendering. It references [PAP-${2600+t}](/PAP/issues/PAP-${2600+t}) and includes enough structure to exercise markdown parsing.`,"","- Parsed checklist item one with inline `code`","- Parsed checklist item two with **bold** and _italic_ text","- Parsed checklist item three with a link to [Microvac](/PAP/dashboard)","","| Metric | Value |","| --- | ---: |",`| Fixture row | ${t} |`,`| Synthetic tokens | ${1200+t} |`,"","```ts",`const fixtureRow${t} = { markdown: true, deterministic: true };`,"```"].join(`
|
|
2
|
+
`)}n(U,"markdownBody");function F(t){return`Board checkpoint ${t}: keep the issue-detail page responsive while the thread is full of historical comments.`}n(F,"plainUserBody");function H(t){return`Processed checkpoint ${t}. The current direct-render path should keep this row mounted with the rest of the thread.`}n(H,"plainAssistantBody");function G(t){const r=t<150,a=r||t%4===1||t%4===2?t%7===0?h.id:m.id:null;return{id:`long-thread-comment-${String(t+1).padStart(3,"0")}`,companyId:"company-long-thread",issueId:"issue-long-thread",authorType:a?"agent":"user",authorAgentId:a,authorUserId:a?null:"user-board",body:r?U(t+1):a?H(t+1):F(t+1),presentation:null,metadata:null,createdAt:i(t),updatedAt:i(t)}}n(G,"createComment");var R=Array.from({length:469},(t,r)=>G(r)),V=new Set(R.slice(0,150).map(t=>t.id)),_=Array.from({length:12},(t,r)=>({id:`long-thread-event-${r+1}`,createdAt:i(r*36+18),actorType:r%3===0?"user":"agent",actorId:r%3===0?"user-board":m.id,statusChange:r%2===0?{from:r===0?"todo":"in_progress",to:"in_progress"}:void 0,assigneeChange:r%2===1?{from:{agentId:null,userId:null},to:{agentId:r%4===1?m.id:h.id,userId:null}}:void 0})),T=Array.from({length:6},(t,r)=>({runId:`long-thread-run-${r+1}`,status:r%3===0?"failed":r%3===1?"timed_out":"succeeded",agentId:r%2===0?m.id:h.id,agentName:r%2===0?m.name:h.name,adapterType:"codex_local",createdAt:i(r*72+12),startedAt:i(r*72+12),finishedAt:i(r*72+16),hasStoredOutput:!0})),q=[],k=new Map(T.map((t,r)=>[t.runId,[{kind:"thinking",ts:i(r*72+13).toISOString(),text:`Inspecting long-thread segment ${r+1}.`},{kind:"tool_call",ts:i(r*72+14).toISOString(),name:"read_file",toolUseId:`long-thread-tool-${r+1}`,input:{path:"ui/src/components/IssueChatThread.tsx"}},{kind:"tool_result",ts:i(r*72+15).toISOString(),toolUseId:`long-thread-tool-${r+1}`,content:"Confirmed the direct-render fixture keeps the full message subtree mounted.",isError:t.status!=="succeeded"},{kind:"assistant",ts:i(r*72+16).toISOString(),text:`Run ${r+1} produced a compact transcript row for adjacent run context.`}]])),z={issue:{identifier:"PAP-PERF",title:"Long-thread rendering baseline fixture",status:"in_progress",priority:"medium",projectName:"Microvac App"},documents:["Implementation Plan","Profiler Notes","Release Checklist","QA Readout"],subIssues:["Phase 1: Add long-thread perf fixture and baseline","Phase 2: Isolate issue-thread row rendering and Markdown work","Phase 3: Apply virtualization and guard scroll behavior","Phase 4: Verify production issue profile improvement"],sidebarStats:[["Comments",String(469)],["Markdown bodies",String(150)],["Timeline events",String(12)],["Linked runs",String(6)]]},e=I(O(),1),K=n(async()=>{},"noop"),y={commitCount:0,mountActualDuration:null,latestActualDuration:null,maxActualDuration:0,totalActualDuration:0};function w(t){return t===null||!Number.isFinite(t)?"pending":`${t.toFixed(1)} ms`}n(w,"formatMs");function c({label:t,value:r,testId:a}){return(0,e.jsxs)("div",{className:"rounded-md border border-border bg-background px-3 py-2",children:[(0,e.jsx)("div",{className:"text-(length:--text-micro) font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground",children:t}),(0,e.jsx)("div",{"data-testid":a,className:"mt-1 font-mono text-sm text-foreground",children:r})]})}n(c,"MetricTile");function X(){const[t,r]=(0,o.useState)(y),a=(0,o.useRef)(y),A=(0,o.useRef)(performance.now()),l=(0,o.useRef)(null),g=(0,o.useRef)(!1),u=z,D=(0,o.useMemo)(()=>469+_.length+T.length,[]),N=(0,o.useCallback)(()=>{g.current||l.current!==null||(l.current=window.setTimeout(()=>{l.current=null,g.current=!0,r(a.current)},0))},[]);(0,o.useEffect)(()=>(a.current.commitCount>0&&N(),()=>{l.current!==null&&(window.clearTimeout(l.current),l.current=null)}),[N]),(0,o.useLayoutEffect)(()=>{if(g.current||a.current.commitCount>0)return;const s=performance.now()-A.current,d={commitCount:1,mountActualDuration:s,latestActualDuration:s,maxActualDuration:s,totalActualDuration:s};a.current=d,g.current=!0,r(d)},[]);const S=n((s,d,f)=>{const p=a.current;a.current={commitCount:p.commitCount+1,mountActualDuration:d==="mount"&&p.mountActualDuration===null?f:p.mountActualDuration,latestActualDuration:f,maxActualDuration:Math.max(p.maxActualDuration,f),totalActualDuration:p.totalActualDuration+f},N()},"handleRender");return(0,e.jsxs)("div",{"data-testid":"issue-chat-long-thread-perf",className:"space-y-5",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-3 border-b border-border pb-5 lg:flex-row lg:items-end lg:justify-between",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(C,{variant:"outline",className:"font-mono text-(length:--text-micro)",children:u.issue.identifier}),(0,e.jsx)(C,{variant:"secondary",children:u.issue.status.replace(/_/g," ")}),(0,e.jsx)(C,{variant:"outline",children:u.issue.projectName})]}),(0,e.jsx)("h1",{className:"mt-3 text-2xl font-semibold tracking-tight",children:u.issue.title}),(0,e.jsx)("p",{className:"mt-2 max-w-3xl text-sm leading-6 text-muted-foreground",children:"Deterministic local fixture for measuring the current direct-render issue chat path with hundreds of merged thread rows, markdown-heavy assistant bodies, linked runs, documents, sub-issues, and sidebar context."})]}),(0,e.jsxs)("div",{className:"grid min-w-(--sz-280px) grid-cols-2 gap-2",children:[(0,e.jsx)(c,{label:"Fixture rows",value:String(D),testId:"perf-fixture-row-target"}),(0,e.jsx)(c,{label:"Markdown rows",value:String(150),testId:"perf-fixture-markdown-rows"})]})]}),(0,e.jsxs)("div",{className:"grid gap-4 xl:grid-cols-(--gtc-40)",children:[(0,e.jsxs)("main",{className:"min-w-0 space-y-4",children:[(0,e.jsxs)(x,{className:"border-border/70",children:[(0,e.jsx)(j,{className:"pb-2",children:(0,e.jsx)(b,{className:"text-base",children:"Issue documents"})}),(0,e.jsx)(v,{className:"grid gap-2 sm:grid-cols-2",children:u.documents.map(s=>(0,e.jsx)("div",{className:"rounded-md border border-border bg-muted/30 px-3 py-2 text-sm",children:s},s))})]}),(0,e.jsxs)(x,{className:"border-border/70",children:[(0,e.jsx)(j,{className:"pb-2",children:(0,e.jsx)(b,{className:"text-base",children:"Sub-issues"})}),(0,e.jsx)(v,{className:"space-y-2",children:u.subIssues.map((s,d)=>(0,e.jsxs)("div",{className:"flex items-center gap-3 rounded-md border border-border bg-background px-3 py-2 text-sm",children:[(0,e.jsxs)("span",{className:"font-mono text-xs text-muted-foreground",children:["#",d+1]}),(0,e.jsx)("span",{children:s})]},s))})]}),(0,e.jsx)(o.Profiler,{id:"issue-chat-long-thread",onRender:S,children:(0,e.jsx)(L,{comments:R,linkedRuns:T,timelineEvents:_,liveRuns:q,issueStatus:"in_progress",agentMap:B,currentUserId:"user-board",onAdd:K,showComposer:!1,showJumpToLatest:!1,enableLiveTranscriptPolling:!1,transcriptsByRunId:k,hasOutputForRun:n(s=>k.has(s),"hasOutputForRun")})})]}),(0,e.jsxs)("aside",{className:"space-y-4 xl:sticky xl:top-4 xl:self-start",children:[(0,e.jsxs)(x,{className:"border-border/70",children:[(0,e.jsx)(j,{className:"pb-2",children:(0,e.jsx)(b,{className:"text-base",children:"Baseline metrics"})}),(0,e.jsxs)(v,{className:"grid gap-2",children:[(0,e.jsx)(c,{label:"Profiler commits",value:String(t.commitCount),testId:"perf-commit-count"}),(0,e.jsx)(c,{label:"Mount duration",value:w(t.mountActualDuration),testId:"perf-mount-duration"}),(0,e.jsx)(c,{label:"Latest duration",value:w(t.latestActualDuration),testId:"perf-latest-duration"}),(0,e.jsx)(c,{label:"Max duration",value:w(t.maxActualDuration),testId:"perf-max-duration"}),(0,e.jsx)(c,{label:"Total duration",value:w(t.totalActualDuration),testId:"perf-total-duration"})]})]}),(0,e.jsxs)(x,{className:"border-border/70",children:[(0,e.jsx)(j,{className:"pb-2",children:(0,e.jsx)(b,{className:"text-base",children:"Fixture shape"})}),(0,e.jsxs)(v,{className:"space-y-2",children:[u.sidebarStats.map(([s,d])=>(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3 text-sm",children:[(0,e.jsx)("span",{className:"text-muted-foreground",children:s}),(0,e.jsx)("span",{className:"font-mono",children:d})]},s)),(0,e.jsx)("div",{className:"hidden","data-testid":"perf-markdown-comment-id-sample",children:[...V].slice(0,3).join(",")})]})]})]})]})]})}n(X,"IssueChatLongThreadPerf");export{X as IssueChatLongThreadPerf};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var k=Object.defineProperty;var t=(l,a)=>k(l,"name",{value:a,configurable:!0});import{a as f}from"./rolldown-runtime-DhZMWcEn.js";import{$A as q,E_ as g,GS as o,H_ as u,LS as _,ME as S,NE as y,QT as T,ab as Q,ay as m,bE as b,ib as M,nj as C,sv as E,ub as I,xE as $}from"./index-Bt31d8ga.js";var N={name:"user-round-plus",size:24,node:[["path",{d:"M2 21a8 8 0 0 1 13.292-6",key:"bjp14o"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M22 19h-6",key:"vcuq98"}]],aliases:["user-plus-2"]};N.node;var J=T(N),p=f(C(),1),e=f(q(),1);function z(){const{selectedCompany:l,selectedCompanyId:a}=_(),{setBreadcrumbs:x}=M(),{pushToast:v}=E(),c=S(),[i,w]=(0,p.useState)("pending_approval"),[n,R]=(0,p.useState)("all");(0,p.useEffect)(()=>{x([{label:l?.name??"Organization",href:"/dashboard"},{label:"Inbox",href:"/inbox"},{label:"Join Requests"}])},[l?.name,x]);const r=$({queryKey:o.access.joinRequests(a??"",`${i}:${n}`),queryFn:t(()=>m.listJoinRequests(a,i,n==="all"?void 0:n),"queryFn"),enabled:!!a}),d=I(r),h=b({mutationFn:t(s=>m.approveJoinRequest(a,s),"mutationFn"),onSuccess:t(async()=>{await c.invalidateQueries({queryKey:o.access.joinRequests(a,`${i}:${n}`)}),await c.invalidateQueries({queryKey:o.access.companyMembers(a)}),await c.invalidateQueries({queryKey:o.access.companyUserDirectory(a)}),v({title:"Join request approved",tone:"success"})},"onSuccess")}),j=b({mutationFn:t(s=>m.rejectJoinRequest(a,s),"mutationFn"),onSuccess:t(async()=>{await c.invalidateQueries({queryKey:o.access.joinRequests(a,`${i}:${n}`)}),v({title:"Join request rejected",tone:"success"})},"onSuccess")});return a?r.isLoading||d.kind==="reconnecting"?(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:"Loading join requests…"}):d.kind==="error"?d.errorKind==="forbidden"?(0,e.jsx)("div",{className:"text-sm text-destructive",children:"You do not have permission to review join requests for this organization."}):(0,e.jsx)(Q,{size:"page",error:r.error,action:"load join requests",onRetry:d.retry,retrying:d.isFetching}):(0,e.jsxs)("div",{className:"max-w-6xl 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)(J,{className:"h-5 w-5 text-muted-foreground"}),(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Join Request Queue"})]}),(0,e.jsx)("p",{className:"max-w-3xl text-sm text-muted-foreground",children:"Review human and agent join requests outside the mixed inbox feed. This queue uses the same approval mutations as the inline inbox cards."})]}),(0,e.jsxs)(g,{className:"flex-row flex-wrap gap-3 p-4",children:[(0,e.jsxs)("label",{className:"space-y-2 text-sm",children:[(0,e.jsx)("span",{className:"font-medium",children:"Status"}),(0,e.jsxs)("select",{className:"rounded-md border border-border bg-background px-3 py-2",value:i,onChange:t(s=>w(s.target.value),"onChange"),children:[(0,e.jsx)("option",{value:"pending_approval",children:"Pending approval"}),(0,e.jsx)("option",{value:"approved",children:"Approved"}),(0,e.jsx)("option",{value:"rejected",children:"Rejected"})]})]}),(0,e.jsxs)("label",{className:"space-y-2 text-sm",children:[(0,e.jsx)("span",{className:"font-medium",children:"Request type"}),(0,e.jsxs)("select",{className:"rounded-md border border-border bg-background px-3 py-2",value:n,onChange:t(s=>R(s.target.value),"onChange"),children:[(0,e.jsx)("option",{value:"all",children:"All"}),(0,e.jsx)("option",{value:"human",children:"Human"}),(0,e.jsx)("option",{value:"agent",children:"Agent"})]})]})]}),(0,e.jsx)("div",{className:"space-y-4",children:(r.data??[]).length===0?(0,e.jsx)("div",{className:"rounded-xl border border-dashed border-border px-4 py-8 text-sm text-muted-foreground",children:"No join requests match the current filters."}):r.data.map(s=>(0,e.jsxs)(g,{className:"block p-4",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(u,{variant:s.status==="pending_approval"?"secondary":s.status==="approved"?"outline":"destructive",children:s.status.replace("_"," ")}),(0,e.jsx)(u,{variant:"outline",children:s.requestType}),s.adapterType?(0,e.jsx)(u,{variant:"outline",children:s.adapterType}):null]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-base font-medium",children:s.requestType==="human"?s.requesterUser?.name||s.requestEmailSnapshot||s.requestingUserId||"Unknown human requester":s.agentName||"Unknown agent requester"}),(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:s.requestType==="human"?s.requesterUser?.email||s.requestEmailSnapshot||s.requestingUserId:s.capabilities||s.requestIp})]})]}),s.status==="pending_approval"?(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(y,{variant:"outline",onClick:t(()=>j.mutate(s.id),"onClick"),disabled:j.isPending,children:"Reject"}),(0,e.jsx)(y,{onClick:t(()=>h.mutate(s.id),"onClick"),disabled:h.isPending,children:"Approve"})]}):null]}),(0,e.jsxs)("div",{className:"mt-4 grid gap-3 text-sm text-muted-foreground md:grid-cols-2",children:[(0,e.jsxs)("div",{className:"rounded-lg border border-border bg-background px-3 py-2",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-wide",children:"Invite context"}),(0,e.jsx)("div",{className:"mt-2",children:s.invite?`${s.invite.allowedJoinTypes} join invite${s.invite.humanRole?` • default role ${s.invite.humanRole}`:""}`:"Invite metadata unavailable"}),s.invite?.inviteMessage?(0,e.jsx)("div",{className:"mt-2 text-foreground",children:s.invite.inviteMessage}):null]}),(0,e.jsxs)("div",{className:"rounded-lg border border-border bg-background px-3 py-2",children:[(0,e.jsx)("div",{className:"text-xs font-medium uppercase tracking-wide",children:"Request details"}),(0,e.jsxs)("div",{className:"mt-2",children:["Submitted ",new Date(s.createdAt).toLocaleString()]}),(0,e.jsxs)("div",{children:["Source IP ",s.requestIp]}),s.requestType==="agent"&&s.capabilities?(0,e.jsx)("div",{children:s.capabilities}):null]})]})]},s.id))})]}):(0,e.jsx)("div",{className:"text-sm text-muted-foreground",children:"Select an organization to review join requests."})}t(z,"JoinRequestQueue");export{z as JoinRequestQueue};
|