local-operator-ui 0.52.7 → 0.52.8
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/out/main/index.js +158 -22
- package/out/renderer/assets/{_basePickBy-Cn6QfSqv.js → _basePickBy-BG2VhiIr.js} +1 -1
- package/out/renderer/assets/{_baseUniq-DvtjRZBO.js → _baseUniq-G4ujmd2X.js} +1 -1
- package/out/renderer/assets/{agent-details-page-Bxrn_AT6.js → agent-details-page-CGBPck3M.js} +1 -1
- package/out/renderer/assets/agent-hub-page-oNcQi-BL.js +7 -0
- package/out/renderer/assets/{agents-page-BFDBD9AA.js → agents-page-BM9GCJql.js} +3 -3
- package/out/renderer/assets/{appearance-CdmD45BF.js → appearance-B-Sdp9IA.js} +36 -36
- package/out/renderer/assets/{approvalsOverlay-BEPoTGeb.js → approvalsOverlay-CT-lsZQd.js} +1 -1
- package/out/renderer/assets/{arc-DkFGP-FZ.js → arc-BN6jtH3A.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-CJxjagYN.js → architectureDiagram-IEHRJDOE-DsuIeLu0.js} +1 -1
- package/out/renderer/assets/{avatar-cropper-Dz0ipbuz.js → avatar-cropper-DlNZ1v12.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-BX-DQQld.js → blockDiagram-JOT3LUYC-DJvSMoVj.js} +1 -1
- package/out/renderer/assets/{book-open-B_tNY4KA.js → book-open-Cp8uKo-d.js} +1 -1
- package/out/renderer/assets/browser-page-onX8FqEA.js +1 -0
- package/out/renderer/assets/{browser-webauthn-prompt-GZSUrY94.js → browser-webauthn-prompt-CHryNF4a.js} +1 -1
- package/out/renderer/assets/{building-2-S91Q-HFt.js → building-2-DjXAKQ-_.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-BtqbckVB.js → c4Diagram-VJAJSXHY-BxuD4dqm.js} +1 -1
- package/out/renderer/assets/channel-Dpjqf8Pr.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-CxrhkLzw.js → chunk-4BMEZGHF-B-9ZkOo4.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-BH6_YcXd.js → chunk-A2AXSNBT-DYX_2Wnw.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-BfSHypbQ.js → chunk-AEK57VVT-Bt8NwGtc.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-CEf3Ob5y.js → chunk-D6G4REZN-Cgk8iMci.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-B1oObDF1.js → chunk-RZ5BOZE2-BjDeLAwH.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-NzAsvJnk.js → chunk-XZIHB7SX-PPlj1JKr.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-Bd3jAzCq.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-Bd3jAzCq.js +1 -0
- package/out/renderer/assets/clone-BgtnSptX.js +1 -0
- package/out/renderer/assets/{console-mirror-B21mv5xh.js → console-mirror-Icddfzc5.js} +14 -14
- package/out/renderer/assets/{consoleCapture-DbuMCHv1.js → consoleCapture-D0hv_YWG.js} +1 -1
- package/out/renderer/assets/{conversation-input-sync-OWxmq4zX.js → conversation-input-sync-D9Xccwx1.js} +4 -4
- package/out/renderer/assets/{dagre-OKDRZEBW-TI8wrMwZ.js → dagre-OKDRZEBW-YoenwJF-.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-DiuvjlIQ.js → diagram-SSKATNLV-BxRRTg9E.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-SBCP7W0-.js → diagram-VNBRO52H-CwmxlyUn.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-Be-kevat.js → erDiagram-Q7BY3M3F-10_uYtjI.js} +1 -1
- package/out/renderer/assets/{error-boundary-iNbBBB3v.js → error-boundary-DfFcgZm0.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-ChKlZnvv.js → flowDiagram-4HSFHLVR-BIi6hVks.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-m7hdnycR.js → ganttDiagram-APWFNJXF-D_OgK0jY.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-CHmzBlmf.js → gitGraphDiagram-7IBYFJ6S-DL22eEyk.js} +1 -1
- package/out/renderer/assets/{graph-BGrC6Hfx.js → graph-BD4wR-0f.js} +1 -1
- package/out/renderer/assets/{heart-DMfZg11o.js → heart-bD3ezZjX.js} +1 -1
- package/out/renderer/assets/{index-qz7T7xAV.js → index-C5MuLj2j.js} +1 -1
- package/out/renderer/assets/{index-D-BaobqX.js → index-CSQMTsGZ.js} +1 -1
- package/out/renderer/assets/{index-DoVjJu6F.js → index-CVc_oCb8.js} +1 -1
- package/out/renderer/assets/{index-5nnHkCvU.js → index-zeRfNJaS.js} +3 -3
- package/out/renderer/assets/infoDiagram-PH2N3AL5-M2sSQges.js +2 -0
- package/out/renderer/assets/{installer-CVV6WR5Y.js → installer-Ddkg6-C5.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-C0KHA5Fo.js → journeyDiagram-U35MCT3I-ClJJE5-O.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-D5LqjQe3.js → kanban-definition-NDS4AKOZ-Vmh-ffzp.js} +1 -1
- package/out/renderer/assets/{layout-CofsTb_n.js → layout-viZOtHI3.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-RoKJOLAC.js → legacy-agents-page-CUK9HFM4.js} +1 -1
- package/out/renderer/assets/{library-page-D364qPaH.js → library-page-d7jnJ1cM.js} +3 -3
- package/out/renderer/assets/{log-in-BMURtcLk.js → log-in-DRqGQiMM.js} +1 -1
- package/out/renderer/assets/{mermaid.core-CRutHT7B.js → mermaid.core-ZnA0Lmkj.js} +5 -5
- package/out/renderer/assets/{mesh-page-CNqutPsU.js → mesh-page-C972n1XX.js} +1 -1
- package/out/renderer/assets/{messages-CjI8V3o6.js → messages-BdH-KMeX.js} +10 -10
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-BMHv6mmG.js → mindmap-definition-ALO5MXBD-oyMq2Ffx.js} +1 -1
- package/out/renderer/assets/{mini-hQqzZmLY.js → mini-XTqXeT0x.js} +1 -1
- package/out/renderer/assets/{notebook-pen-B9De8HRk.js → notebook-pen-CgBQhdFa.js} +1 -1
- package/out/renderer/assets/{notifications-page-DnRTPmsg.js → notifications-page-C0pIdEuW.js} +1 -1
- package/out/renderer/assets/{org-access-CSvWotkU.js → org-access-D_YDOtGr.js} +1 -1
- package/out/renderer/assets/{org-surface-gate-D1cQMCPq.js → org-surface-gate-BRBzEvbn.js} +1 -1
- package/out/renderer/assets/{page-header-FRvAuVa5.js → page-header-Bz2lz4LI.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-B3dl8PAh.js → pieDiagram-IB7DONF6-CJ7Aytd-.js} +1 -1
- package/out/renderer/assets/{project-markdown-B6i3hW9x.js → project-markdown-DYciqMBs.js} +1 -1
- package/out/renderer/assets/{projects-page-DbLor3Wq.js → projects-page-JmH0vUnI.js} +1 -1
- package/out/renderer/assets/{publication-validation-CcVpgrCU.js → publication-validation-quCeNj-v.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-BNCSmGNZ.js → quadrantDiagram-7GDLP6J5-CLPvPjaT.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-CjpC5GXo.js → radar-MK3ICKWK-Dl4nMpzG.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-r1SLaVYS.js → radient-auth-buttons-DKI9Bh07.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-b-bdNYve.js → requirementDiagram-KVF5MWMF-B3VtoeFm.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-Bk2jSYW-.js → sankeyDiagram-QLVOVGJD-D0ll6mUD.js} +1 -1
- package/out/renderer/assets/{schedules-page-DkoUCdGL.js → schedules-page-Bj-EKraP.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-CrWu9Act.js → sequenceDiagram-X6HHIX6F-DI1TMyGm.js} +1 -1
- package/out/renderer/assets/{settings-page-DS-Emp0f.js → settings-page-DTjdJ7Xe.js} +15 -15
- package/out/renderer/assets/{smartart-Dt5OHgL0.js → smartart-89hlq0Z-.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-CPEB-zup.js → stateDiagram-DGXRK772-AlwHo7F1.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-BMk0V1sn.js +1 -0
- package/out/renderer/assets/{team-bridge-page-BYsUTX6d.js → team-bridge-page-vIR1dP5K.js} +1 -1
- package/out/renderer/assets/{team-bridge-scope-preference-DarSp0-H.js → team-bridge-scope-preference-Dlf6h_m5.js} +1 -1
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-DRCjj8mV.js → timeline-definition-BDJGKUSR-B7rXhxSU.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-D0VLYK_u.js → use-download-agent-mutation-DPsC_HGf.js} +1 -1
- package/out/renderer/assets/{use-session-snapshot-CwV-f4ml.js → use-session-snapshot-DO0nbiYH.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-DY5NVy6E.js → xychartDiagram-VJFVF3MP-B5a0ZuzY.js} +1 -1
- package/out/renderer/browser-approvals-overlay.html +2 -2
- package/out/renderer/console-capture.html +5 -5
- package/out/renderer/index.html +7 -7
- package/out/renderer/installer.html +4 -4
- package/out/renderer/mini.html +7 -7
- package/package.json +6 -2
- package/out/renderer/assets/agent-hub-page-CI0_3cgV.js +0 -7
- package/out/renderer/assets/browser-page-BHpD48Cg.js +0 -1
- package/out/renderer/assets/channel-Qv6Kv9n_.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-ja7Pq_F9.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-ja7Pq_F9.js +0 -1
- package/out/renderer/assets/clone-bejLhD1C.js +0 -1
- package/out/renderer/assets/infoDiagram-PH2N3AL5-CjGQEcoF.js +0 -2
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-Ds89SmF1.js +0 -1
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e,c as B}from"./index-qz7T7xAV.js";import{s as Ss,N as Cs,h as Ps,d as ot,a as Ts,c as Ve,r as ct,u as ut,af as dt,f as Ye,ag as mt,t as ht}from"./appearance-CdmD45BF.js";import{P as xt}from"./page-header-FRvAuVa5.js";import{c as bt,u as U,w as oe,B as w,f as O,J as pt,h as gt,K as Te,T as Is,n as Oe,o as Fe,y as ze,p as De,z as Me,F as $e,A as xe,q as be,x as pe,N as ft,O as jt,P as kt,Q as vt,R as ns,U as ls,V as rs,W as os,Y as cs}from"./error-boundary-iNbBBB3v.js";import{bu as Ge,bx as us,c4 as yt,c5 as As,b5 as Qe,bv as Nt,c6 as wt,ay as _t,c7 as St,T as Rs,bC as Es,c8 as Se,c9 as Ct,ca as Pt}from"./conversation-input-sync-OWxmq4zX.js";import{t as s}from"./messages-CjI8V3o6.js";import{a as Tt,p as Ls,P as ce,u as It}from"./publication-validation-CcVpgrCU.js";import{h as ne,O as At,A as Rt,c as Os,a as Et,b as Lt,d as Ot,e as Fs,C as Ft,n as zt,u as Dt,i as Mt}from"./use-download-agent-mutation-D0VLYK_u.js";import{H as $t}from"./heart-DMfZg11o.js";import{x as qt,aY as Ut,aZ as Ht,a_ as Bt,a$ as zs,b0 as Vt,b1 as Qt,y as Wt,D as Kt,E as ds,T as ms,b2 as Yt,b3 as Gt,L as Jt,t as Xt,b4 as Zt}from"./index-5nnHkCvU.js";import{u as Ds,s as ea,a as sa,n as ta,b as aa,i as ia,H as na,p as hs,c as Ms,h as xs,d as la,e as ra,f as oa,g as ca,j as ua,k as da,l as bs,m as ps,o as gs,q as fs,S as js,r as ma,t as ha,v as xa,w as $s,x as qs,P as Us,y as ba,z as pa}from"./org-access-CSvWotkU.js";import{R as Hs}from"./radient-auth-buttons-r1SLaVYS.js";import{o as ga,a as qe}from"./org-surface-gate-D1cQMCPq.js";import{B as fa}from"./building-2-S91Q-HFt.js";import"./roles-D1pcbxAx.js";import"./book-open-B_tNY4KA.js";import"./en-US-CW_dDnkH.js";import"./console-mirror-B21mv5xh.js";/**
|
|
2
|
-
* @license lucide-react v0.507.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const ja=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]],ka=bt("circle-ellipsis",ja),va=({agent:t,isLiked:a,isFavourited:i,onLikeToggle:n,onFavouriteToggle:o,onDownload:h,isLikeActionLoading:x=!1,isFavouriteActionLoading:f=!1,isDownloading:b=!1,actionError:j=null,onRetryAction:T,showActions:_=!0,viewerStateKnown:c=!0,orgName:u=null})=>{U();const E=Ss(),{isAuthenticated:k}=Ge();U();const S=t.description??"",[I,z]=l.useState(!1),A=l.useRef(null),v=l.useCallback(L=>{if(A.current?.disconnect(),A.current=null,!L)return;const R=()=>z(L.scrollHeight-L.clientHeight>1);R();const V=new ResizeObserver(R);V.observe(L),A.current=V},[]),F=k?c?a?s("ui.hub.viewer.unlike"):s("ui.hub.viewer.like"):s("ui.hub.viewer.like_unknown"):s("ui.hub.viewer.like_signed_out"),N=k?c?i?s("ui.hub.viewer.unfavourite"):s("ui.hub.viewer.favourite"):s("ui.hub.viewer.favourite_unknown"):s("ui.hub.viewer.favourite_signed_out"),g=c?a?s("ui.hub.viewer.unlike"):s("ui.hub.viewer.like"):s("ui.hub.viewer.like_unavailable"),y=c?i?s("ui.hub.viewer.unfavourite"):s("ui.hub.viewer.favourite"):s("ui.hub.viewer.favourite_unavailable"),d=t.visibility==="org",p=ne(t.name);return e.jsxs("div",{"data-glass-block":"",className:"flex h-full flex-col overflow-hidden rounded-md bg-surface transition-colors duration-fast ease-out-quart hover:bg-elevated",children:[e.jsxs("button",{type:"button",onClick:()=>E(`/agent-hub/${t.id}`),className:"flex min-h-0 flex-1 cursor-pointer flex-col gap-2 p-4 text-left","aria-label":s("ui.hub.card.view_details",{name:p}),children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:p}),d&&e.jsx(At,{orgName:u}),e.jsx(oe,{content:I?S:"",children:e.jsx("span",{ref:v,className:"line-clamp-3 min-h-0 text-body-sm text-ink-muted",children:S})}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsx(Rt,{tags:t.tags,categories:t.categories}),e.jsxs("p",{className:"truncate text-ink-dim text-meta",children:[t.account_metadata?.name??s("ui.hub.card.unknown_author"),e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),s("ui.hub.pages.card.updated",{when:Os(new Date(t.updated_at))})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 border-t border-hairline px-3 py-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-0.5","data-viewer-state":d?"org":k?c?"known":"unknown":"signed-out",children:[!d&&e.jsxs(e.Fragment,{children:[e.jsx(oe,{content:F,children:e.jsx("span",{children:e.jsxs(w,{variant:"ghost",size:"sm",onClick:k&&c?()=>n(t.id):void 0,disabled:x||!k||!c,"aria-label":g,className:B(a&&"text-danger"),children:[e.jsx($t,{fill:a?"currentColor":"none","data-testid":"agent-like-heart"}),e.jsx("span",{"data-testid":"agent-like-count",className:"inline-flex h-4 min-w-4 items-center font-mono text-mono-sm text-ink-muted",children:t.like_count??0})]})})}),e.jsx(oe,{content:N,children:e.jsx("span",{children:e.jsxs(w,{variant:"ghost",size:"sm",onClick:k?()=>o(t.id):void 0,disabled:f||!k||!c,"aria-label":y,className:B(i&&"text-warning"),children:[e.jsx(qt,{fill:i?"currentColor":"none","data-testid":"agent-favourite-star"}),e.jsx("span",{"data-testid":"agent-favourite-count",className:"inline-flex h-4 min-w-4 items-center font-mono text-mono-sm text-ink-muted",children:t.favourite_count??0})]})})})]}),e.jsx(oe,{content:s("ui.hub.card.downloads_tooltip"),children:e.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 pr-1 text-ink-dim",children:[e.jsx(us,{"aria-hidden":"true",className:"size-3.5"}),e.jsx("span",{className:"inline-flex h-4 min-w-6 items-center font-mono text-mono-sm",children:b?e.jsx(O,{className:"h-3 w-6"}):(t.download_count??0).toLocaleString()})]})})]}),_&&h&&e.jsx("div",{className:"ml-auto flex shrink-0 items-center",children:e.jsxs(w,{variant:"secondary",size:"sm",onClick:()=>h(t),disabled:b,"aria-label":s("ui.hub.card.download_named",{name:p}),"data-tour-tag":"agent-hub-download-button",children:[e.jsx(us,{"data-testid":"agent-download"}),s("ui.hub.pages.card.get")]})})]}),j&&e.jsxs("output",{"data-testid":"agent-card-error",className:"flex flex-wrap items-center gap-x-2 gap-y-1 border-t border-hairline px-3 py-2 text-body-sm text-danger",children:[e.jsx("span",{className:"min-w-0 flex-1",children:j}),T&&e.jsx(w,{variant:"ghost",size:"sm",onClick:T,children:s("ui.common.actions.retry_again")})]})]})},ya=({agent:t,status:a,viewerStateKnown:i=!0,orgName:n=null})=>{const{isAuthenticated:o}=Ge(),[h,x]=l.useState(null),f=a?.liked??!1,b=a?.favourited??!1,j=Et(),T=Lt(),_=Ot(),c=()=>{!o||j.isPending||(x(null),j.mutate({agentId:t.id,isCurrentlyLiked:f},{onError:()=>x("like")}))},u=()=>{!o||T.isPending||(x(null),T.mutate({agentId:t.id,isCurrentlyFavourited:b},{onError:()=>x("favourite")}))},E=()=>{_.isPending||(x(null),_.mutate({agentId:t.id,agentName:t.name},{onError:()=>x("download")}))},k=h?h==="like"?{action:"like",error:j.error,retry:c}:h==="favourite"?{action:"favourite",error:T.error,retry:u}:{action:"download",error:_.error,retry:E}:null;return e.jsx(va,{agent:t,isLiked:o&&f,isFavourited:o&&b,onLikeToggle:c,onFavouriteToggle:u,onDownload:E,isLikeActionLoading:j.isPending,isFavouriteActionLoading:T.isPending,isDownloading:_.isPending,viewerStateKnown:i,orgName:n,actionError:k?Tt(k.action,k.error,ne(t.name)):null,onRetryAction:k?.retry})},ks=({selected:t,onClick:a,children:i,...n})=>e.jsx("button",{type:"button",onClick:a,"aria-pressed":t,className:B("flex w-full cursor-pointer items-center gap-2.5 rounded-sm px-3 py-1.5 text-left","text-body-sm transition-colors duration-fast ease-out-quart",t?Ht:"text-ink hover:bg-row-hover"),...n,children:i}),vs=Object.keys(Ft),Na=t=>[...t].sort((a,i)=>{const n=vs.indexOf(a),o=vs.indexOf(i);return n!==-1&&o!==-1?n-o:n!==-1?-1:o!==-1?1:a.localeCompare(i)}),wa=({selectedCategory:t,onSelectCategory:a,categories:i})=>{U();const n=Na(t&&!i.includes(t)?[...i,t]:i);return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto",children:[e.jsx("h2",{className:"mb-2 px-3 font-medium text-ink-dim text-meta",children:s("ui.hub.taxonomy.heading")}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs(ks,{selected:t===null,onClick:()=>a(null),"data-testid":"category-all",children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e.jsx(Ut,{size:16,"aria-hidden":"true"})}),s("ui.hub.taxonomy.all")]}),n.map(o=>{const h=Fs(o),x=o==="other"?e.jsx(ka,{size:16}):h.icon;return e.jsxs(ks,{selected:t===o,onClick:()=>a(o),"data-testid":`category-${o}`,children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:x}),h.label]},o)})]})]})},Je=({page:t,count:a,onChange:i,ariaLabel:n})=>{U();const o=l.useRef(null),h=l.useRef(null),x=l.useRef(null);return l.useEffect(()=>{const f=x.current;x.current=null,f==="previous"&&o.current?.focus(),f==="next"&&h.current?.focus()},[t]),a<=1?null:e.jsxs("nav",{"aria-label":n??s("ui.hub.pages.pager.nav_aria"),className:"mt-6 flex min-h-13 items-center justify-between gap-3 border-t border-hairline","data-testid":"agent-hub-pager",children:[e.jsx("span",{className:"select-none text-meta text-ink-dim",children:s("ui.common.forms.pagination.position",{page:String(t),count:String(a)})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(w,{variant:"secondary",size:"sm",ref:o,onClick:()=>{t-1<=1&&(x.current="next"),i(t-1)},disabled:t<=1,"aria-label":s("ui.common.forms.compact_pagination.previous_page"),children:[e.jsx(yt,{"aria-hidden":"true"}),s("ui.hub.pages.pager.previous")]}),e.jsxs(w,{variant:"secondary",size:"sm",ref:h,onClick:()=>{t+1>=a&&(x.current="previous"),i(t+1)},disabled:t>=a,"aria-label":s("ui.common.forms.compact_pagination.next_page"),children:[s("ui.hub.pages.pager.next"),e.jsx(pt,{"aria-hidden":"true"})]})]})]})},_a=/alias/i;function we(t){return t instanceof Cs?t.code==="alias-occupied"?!0:t.code==="origin-conflict"&&_a.test(t.message):!1}const Sa={same:"ui.hub.adoption.file_same","hub-only":"ui.hub.adoption.file_hub","local-only":"ui.hub.adoption.file_local","kept-local":"ui.hub.adoption.file_local","taken-hub":"ui.hub.adoption.file_hub",merged:"ui.hub.adoption.file_merged","set-aside":"ui.hub.adoption.file_aside","needs-choice":"ui.hub.adoption.file_choice",carried:"ui.hub.adoption.file_carried","not-installed":"ui.hub.adoption.file_not_adopted",relocated:"ui.hub.adoption.file_relocated"};function Ca(t){return Sa[t]??"ui.hub.adoption.file_review"}function Ue({text:t,diff:a=!1}){return e.jsx("pre",{className:"max-w-full overflow-x-auto whitespace-pre-wrap break-words rounded border border-hairline bg-surface p-3 font-mono text-body-sm text-ink",children:t||(a?s("ui.hub.adoption.no_difference"):"")})}function Pa({state:t,allowLlm:a,onAllowLlm:i,onPreview:n,onConfirm:o,onCancel:h}){U();const x=l.useId(),{preview:f,pending:b,applied:j,error:T}=t,_=f?.adoption.state==="needs-choice";return j?e.jsxs("div",{"aria-live":"polite",className:"space-y-2 text-body-sm text-success",children:[e.jsx("p",{children:s("ui.hub.adoption.applied")}),f&&e.jsx("p",{className:"break-all text-ink-muted",children:s("ui.hub.adoption.snapshot",{path:f.snapshot.path})}),e.jsx(w,{variant:"outline",onClick:h,children:s("ui.hub.adoption.done")})]}):e.jsxs("section",{"aria-label":s("ui.hub.adoption.title"),className:"min-w-0 space-y-4 rounded border border-warning-border p-4","data-testid":"hub-skill-adoption",children:[e.jsx("h3",{className:"text-body font-medium text-ink",children:s("ui.hub.adoption.title")}),e.jsx("p",{className:"text-body-sm text-ink-muted",children:s("ui.hub.adoption.preservation")}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(gt,{id:x,checked:a,disabled:b||!!f,onCheckedChange:c=>i(c===!0)}),e.jsx("label",{htmlFor:x,className:"text-body-sm text-ink",children:s("ui.hub.adoption.model_consent")})]}),b&&e.jsx("p",{"aria-live":"polite",className:"text-body-sm text-ink-muted",children:s("ui.hub.adoption.loading")}),T&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:s(T==="stale"?"ui.hub.adoption.stale":"ui.hub.adoption.failed")}),f&&e.jsxs("div",{className:"min-w-0 space-y-4",children:[e.jsx("p",{className:"break-all text-body-sm text-ink-muted",children:s("ui.hub.adoption.snapshot",{path:f.snapshot.path})}),f.adoption.model&&e.jsx("p",{className:"break-all text-body-sm text-ink-muted",children:s("ui.hub.adoption.model",{model:f.adoption.model})}),f.adoption.warnings?.map((c,u)=>e.jsx("p",{className:"text-body-sm text-warning",children:c},`${u}-${c}`)),_&&e.jsx("p",{"aria-live":"polite",className:"text-body-sm text-warning",children:s("ui.hub.adoption.needs_choice")}),f.adoption.files.map(c=>e.jsxs("article",{className:"min-w-0 space-y-3 border-t border-hairline pt-4",children:[e.jsx("h4",{className:"break-all font-mono text-body-sm text-ink",children:c.path}),c.local_path&&c.local_path!==c.path&&e.jsx("p",{className:"break-all text-body-sm text-ink-muted",children:s("ui.hub.adoption.local_path",{path:c.local_path})}),e.jsx("p",{className:"text-body-sm text-ink-muted",children:s(Ca(c.action))}),c.kept&&e.jsx("dl",{className:"space-y-1 text-body-sm text-ink-muted",children:["local","hub","combined","unresolved"].map(u=>c.kept?.[u]?.length?e.jsxs("div",{children:[e.jsx("dt",{className:"font-medium",children:s(`ui.hub.adoption.kept_${u}`)}),e.jsx("dd",{className:"whitespace-pre-wrap break-words",children:c.kept[u].join(`
|
|
7
|
-
`)})]},u):null)}),e.jsx("h5",{className:"text-body-sm font-medium text-ink",children:s("ui.hub.adoption.proposed")}),c.proposed===null?e.jsx("p",{className:"text-body-sm text-ink-muted",children:s("ui.hub.adoption.no_proposal")}):e.jsx(Ue,{text:c.proposed}),e.jsxs("details",{open:!0,children:[e.jsx("summary",{className:"cursor-pointer text-body-sm text-ink",children:s("ui.hub.adoption.diff_local")}),e.jsx(Ue,{diff:!0,text:c.diff_vs_local})]}),e.jsxs("details",{open:!0,children:[e.jsx("summary",{className:"cursor-pointer text-body-sm text-ink",children:s("ui.hub.adoption.diff_hub")}),e.jsx(Ue,{diff:!0,text:c.diff_vs_hub})]})]},c.path))]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(w,{variant:"outline",disabled:b,onClick:()=>n(f?.adoption.strategy==="equal"?"merge":f?.adoption.strategy??"merge"),children:s(f||T?"ui.hub.adoption.repreview":"ui.hub.adoption.preview")}),_&&e.jsxs(e.Fragment,{children:[e.jsx(w,{variant:"outline",disabled:b,onClick:()=>n("keep-local"),children:s("ui.hub.adoption.keep_local")}),e.jsx(w,{variant:"outline",disabled:b,onClick:()=>n("take-hub"),children:s("ui.hub.adoption.take_hub")})]}),f&&e.jsx(w,{disabled:b||!!T||_,onClick:o,children:s("ui.hub.adoption.confirm")}),e.jsx(w,{variant:"ghost",disabled:b,onClick:h,children:s("ui.hub.adoption.cancel")})]})]})}function Ta({input:t,onClose:a}){const i=Ds({retry:0}),[n,o]=l.useState(null),[h,x]=l.useState("merge"),[f,b]=l.useState(!1),[j,T]=l.useState(null),[_,c]=l.useState(!1),u=l.useRef(""),E=I=>T(I instanceof Cs&&I.code==="adoption-preview-changed"?"stale":"failed"),k=I=>{T(null),o(null),x(I),i.mutate({...t,requestId:crypto.randomUUID(),dryRun:!0,adoptionStrategy:I,allowLlm:f},{onSuccess:z=>{const A=sa.safeParse(z);if(!A.success){T("failed");return}u.current=crypto.randomUUID(),o(A.data)},onError:E})},S=()=>{!n||n.adoption.state==="needs-choice"||j||i.isPending||i.mutate({...t,requestId:u.current,dryRun:!1,confirm:!0,adoptionReceipt:n.adoption_receipt,adoptionStrategy:h,allowLlm:f},{onSuccess:I=>{ea(I)?c(!0):T("failed")},onError:E})};return e.jsx(Pa,{state:{preview:n,pending:i.isPending,applied:_,error:j},allowLlm:f,onAllowLlm:b,onPreview:k,onConfirm:S,onCancel:a})}function Ia({scope:t,source:a,verifiedCas:i,enabled:n=!0,heading:o=!0}){U();const h=l.useId(),[x,f]=l.useState(""),[b,j]=l.useState(""),[T,_]=l.useState(ta),[c,u]=l.useState(null),[E,k]=l.useState(!1),S=aa(),I=l.useRef(null),z=Ps({queryKey:["desktop","skills","hub-publication"],queryFn:()=>ot({op:"skills.list"}),staleTime:3e4,retry:!1}),A=`${t.visibility}:${t.tenantId??""}`,v=l.useRef(A);l.useEffect(()=>{v.current!==A&&(v.current=A,_(y=>({...y,autoPush:!1,confirmPublicEgress:!1})),u(null),k(!0))},[A]);const F={sourceSkill:x,localAlias:b,visibility:t.visibility,tenantId:t.tenantId,...T},N=c?ia(c,F):!1;l.useEffect(()=>{if(!c)return;const y=setTimeout(()=>{u(null),k(!0)},Math.max(0,Math.min(Date.parse(c.expires_at)-Date.now(),2147483647)));return()=>clearTimeout(y)},[c]);const g=y=>{if(!n||S.isPending||!x||!b||y&&!N)return;const d=JSON.stringify({draft:F,receipt:y?c?.preview_receipt:null}),p=I.current&&I.current.tuple===d&&(y||S.error)?I.current:{tuple:d,id:crypto.randomUUID()};I.current=p,y||(u(null),k(!1)),S.mutate({requestId:p.id,draft:F,...y&&c?{previewReceipt:c.preview_receipt}:{}},{onSuccess:L=>{L.preview?(u(L.preview),k(!1)):hs(L)&&u(null)}})};return e.jsxs("section",{className:"flex min-w-0 flex-col gap-4","data-hub-skill-publication":!0,children:[o&&e.jsx("h3",{className:"text-heading text-ink",children:s("ui.hub.skills.publish_title")}),e.jsx("label",{htmlFor:`${h}-source`,className:"text-body-sm text-ink",children:s("ui.hub.skills.select_authored")}),e.jsxs("select",{id:`${h}-source`,"data-testid":"hub-skill-publish-source",value:x,disabled:S.isPending||!n,className:"rounded-md border border-control bg-surface px-3 py-2 text-body-sm text-ink",onChange:y=>{f(y.target.value),j(y.target.value),u(null),_(d=>({...d,autoPush:!1,confirmPublicEgress:!1}))},children:[e.jsx("option",{value:"",children:s("ui.hub.skills.select_authored")}),z.data?.data.skills.map(y=>e.jsx("option",{value:y.name,children:y.name},y.name))]}),e.jsx("label",{htmlFor:`${h}-alias`,className:"text-body-sm text-ink",children:s("ui.hub.subscriptions.alias")}),e.jsx(Te,{id:`${h}-alias`,"data-testid":"hub-skill-publish-alias",value:b,disabled:S.isPending||!n,onChange:y=>{j(y.target.value),_(d=>({...d,autoPush:!1,confirmPublicEgress:!1}))}}),e.jsx("p",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.text_limits")}),e.jsx(na,{value:T,onChange:_,source:a,item:x||b,visibility:t.visibility,organization:t.organization,destinationKey:`${A}:${x}`,canEnableAutoPush:i,disabled:S.isPending||!n}),z.isLoading&&e.jsx("output",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.loading")}),z.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:s("ui.hub.status.other_error")}),S.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:s("ui.hub.links.action_failed",{direction:s("ui.hub.links.direction_push"),item:x||b,source:a})}),(E||c&&!N&&c.can_confirm)&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:s("ui.hub.links.preview_changed")}),c&&c.visibility===t.visibility&&c.tenant_id===t.tenantId&&e.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[e.jsx("h4",{className:"text-body-sm text-ink",children:s("ui.hub.links.preview_payload",{source:a})}),e.jsx(Is,{readOnly:!0,rows:12,"aria-label":s("ui.hub.links.preview_payload",{source:a}),value:JSON.stringify(c.proposal.fields,null,2),className:"max-h-96 bg-sunken text-mono-sm"}),c.warnings.map((y,d)=>e.jsx("p",{className:"break-words text-body-sm text-warning",children:y},`${d}-${y}`)),c.reason&&e.jsx("p",{className:"text-body-sm text-warning",children:Bt(c.reason)})]}),S.data?.publication===null&&S.data.local_link_receipt?.state==="pending-reconciliation"&&e.jsx("output",{className:"text-body-sm text-warning","data-testid":"hub-skill-pending-reconcile",children:s("ui.hub.links.publication_pending")}),S.data?.publication&&e.jsx("output",{className:"text-body-sm text-ink","data-testid":"hub-skill-published",children:hs(S.data)?s("ui.hub.links.published",{item:S.data.link?.name??b,source:S.data.link?zs(S.data.link):a}):s("ui.hub.skills.policy_pending")}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(w,{variant:"outline","data-testid":"hub-skill-publish-preview",disabled:!n||S.isPending||!x||!b,onClick:()=>g(!1),children:s("ui.hub.subscriptions.preview_publish")}),e.jsx(w,{"data-testid":"hub-skill-publish-confirm",disabled:!n||S.isPending||!N,onClick:()=>g(!0),children:s("ui.hub.links.confirm_publish")})]})]})}function ys(t,a){const i=t.publisher?.trim();return i?s("ui.hub.skills.published_by",{publisher:i}):t.visibility==="org"?a??s("ui.hub.links.source_unavailable"):s("ui.hub.skills.public_hub")}function Aa({scope:t,signedIn:a,accessible:i=!0}){U();const n=l.useId(),[o,h]=l.useState(1),[x,f]=l.useState(""),[b,j]=l.useState(null),[T,_]=l.useState(!1),[c,u]=l.useState("unsubscribe"),[E,k]=l.useState(!1),S=l.useRef(null),I=t.visibility==="public"?s("ui.hub.links.source_public"):t.organization?s("ui.hub.links.source_private",{organization:t.organization}):s("ui.hub.links.source_unavailable"),z=Ts(),A=i&&Ve(z.data,"hub_updates"),v=Ms(t,o,i&&(t.visibility==="public"||a)),F=xs(v.data?.contract),N=la(t,b,F&&i),g=Ds(),[y,d]=l.useState(null),p=ra(),L=oa(),R=Vt(),V=we(p.error)&&p.variables?{...p.variables,subscribe:!0,autoPush:!1,consent:!1}:we(g.error)&&g.variables?g.variables:null,D=Qt(i&&Ve(z.data,"hub_links")),q=Wt(A),C=l.useMemo(()=>ca(D.data?.links,ua(Qe.radientBaseUrl)),[D.data]),M=l.useMemo(()=>Kt(q.data),[q.data]),ue=g.data?.link?.link_id,ae=!D.isLoading&&!D.error,ge=D.error?s("ui.hub.skills.inventory_unknown"):s("ui.hub.links.loading"),de=N.data?.visibility===t.visibility&&(t.visibility==="public"?!N.data.tenant_id:N.data.tenant_id===t.tenantId),se=i&&!N.error&&!v.error&&de&&xs(N.data?.sync_contract)&&!!N.data?.revision,me=(v.data?.rows??[]).filter(m=>da(m,t)),fe=me.filter(m=>`${m.name} ${m.description}`.toLocaleLowerCase().includes(x.toLocaleLowerCase())),J=me.find(m=>m.id===b),P=J?C.get(bs({id:J.id,visibility:J.visibility,tenantId:J.tenant_id??null})):void 0,je=P?M.get(ds("skill",P.name)):void 0,ke=ps(P,je,ae),Q=P?ms(P)==="present":!1,Ie=m=>{const $=C.get(bs({id:m.id,visibility:m.visibility,tenantId:m.tenant_id??null})),Z=$?M.get(ds("skill",$.name)):void 0;return{link:$,update:Z,state:ps($,Z,ae)}},he=m=>(S.current?.tuple!==m&&(S.current={tuple:m,id:crypto.randomUUID()}),S.current.id),W=m=>{if(!b||!se||!a)return;const $=m?.name??J?.name??"";if(!$)return;p.reset();const Z=m?m.policy.subscribe:!1,re=m?.policy.auto_push??!1,ye=!1;g.mutate({requestId:he(ha({selected:b,scope:t,localAlias:$,subscribe:Z,autoPush:re,consent:ye})),remoteId:b,scope:t,alias:$,subscribe:Z,autoPush:re,consent:ye})},X=()=>{if(!b||!se||!a)return;if(xa(P)==="policy"&&P){if(P.policy.subscribe||R.isPending)return;u("subscribe"),R.mutate({link:P,patch:{subscribe:!0}});return}const m=J?.name??"";m&&(g.reset(),p.mutate({requestId:he(JSON.stringify({op:"subscribe",selected:b,scope:t,localAlias:m})),remoteId:b,scope:t,alias:m}))},ve=()=>{P&&L.mutate({requestId:he(JSON.stringify({op:"unpull",link:P.link_id})),linkId:P.link_id},{onSuccess:()=>{g.reset(),p.reset()}})},K=()=>{!P||P.policy.subscribe===!1||R.isPending||!R.canWrite||(u("unsubscribe"),R.mutate({link:P,patch:{subscribe:!1}}))},te=a&&F&&i&&!v.error,ie=v.data?.total??me.length,le=v.error?null:v.isLoading?s("ui.hub.skills.loading"):t.organization?s("ui.hub.skills.count_shared",{count:ie,organization:t.organization}):s("ui.hub.skills.count",{count:ie});return e.jsxs("section",{className:"flex min-w-0 flex-col gap-4","data-hub-skills-library":!0,children:[t.visibility==="org"&&!a?e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:s("ui.hub.status.no_credential")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:B("flex min-w-56 max-w-md flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(As,{"aria-hidden":"true",className:"ml-2 shrink-0 text-ink-dim"}),e.jsx(Te,{id:`${n}-search`,type:"search","data-testid":"hub-skill-search",value:x,placeholder:s("ui.hub.skills.search"),"aria-label":s("ui.hub.skills.search"),onChange:m=>f(m.target.value),className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none"})]}),te&&e.jsx(w,{variant:"secondary","data-testid":"hub-skill-publish-open",onClick:()=>k(!0),children:s("ui.hub.skills.publish_title")})]}),le!==null&&e.jsx("p",{"aria-live":"polite",className:"text-meta text-ink-dim","data-testid":"hub-skill-status",children:t.organization||v.isLoading?e.jsx("span",{"data-testid":"hub-skill-source",children:le}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:le})," · ",e.jsx("span",{"data-testid":"hub-skill-source",children:s("ui.hub.skills.public_hub")})]})}),v.error&&e.jsxs("div",{role:"alert",className:"flex flex-col items-start gap-2 text-body-sm text-warning",children:[e.jsx("p",{children:s("ui.hub.skills.catalogue_failed",{source:I})}),e.jsx(w,{variant:"outline",className:"self-start",disabled:v.isFetching,onClick:()=>void v.refetch(),children:s("ui.hub.links.retry")})]}),v.isSuccess&&!F&&e.jsx("p",{className:"text-body-sm text-warning",children:s("ui.hub.skills.unavailable")}),F&&e.jsxs(e.Fragment,{children:[fe.length===0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:s(x?"ui.hub.skills.search_empty":"ui.hub.skills.remote_empty")}),e.jsx("ul",{className:"grid list-none grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6 p-0",children:fe.map(m=>{const $=Ie(m),Z=gs($.state,$.update,$.link?ms($.link)==="present":!1);return e.jsx("li",{className:"min-w-0",children:e.jsxs("button",{type:"button","aria-haspopup":"dialog","aria-expanded":b===m.id,"aria-label":s("ui.hub.skills.open_detail",{item:m.name}),"data-testid":"hub-skill-open","data-skill-id":m.id,"data-skill-state":$.state.kind,onClick:()=>{j(m.id),g.reset(),p.reset(),L.reset(),R.reset()},className:B("flex h-full w-full flex-col overflow-hidden rounded-md bg-surface text-left","transition-colors duration-fast ease-out-quart hover:bg-elevated","focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-1"),children:[e.jsxs("span",{className:"flex min-h-0 flex-1 flex-col gap-2 p-4",children:[e.jsx("span",{className:"truncate font-medium text-heading text-ink",children:m.name}),m.description?e.jsx("span",{className:"line-clamp-3 text-body-sm text-ink-muted",children:m.description}):null,e.jsx("span",{className:"mt-auto truncate text-ink-dim text-meta",children:ys(m,t.organization)})]}),e.jsxs("span",{className:"flex items-center justify-between gap-2 border-t border-hairline px-4 py-2 text-meta",children:[e.jsx("span",{className:"truncate text-ink-muted",children:fs($.state,ge)}),e.jsx(js,{mark:Z})]})]})},m.id)})}),e.jsx(Je,{page:o,count:v.data?.pages??1,onChange:h,ariaLabel:s("ui.hub.skills.title")})]})]}),!i&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:s("ui.hub.status.access_lost")}),e.jsx(Oe,{open:!!b&&F,onOpenChange:m=>{m||(j(null),d(null),g.reset(),p.reset())},children:e.jsxs(Fe,{"data-hub-skill-detail":"",className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[e.jsxs(ze,{children:[e.jsx(De,{"data-testid":"hub-skill-detail-name",children:N.data?.name??J?.name??s("ui.hub.skills.title")}),e.jsx(Me,{children:N.data&&de?ys(N.data,t.organization):I})]}),N.isLoading&&e.jsx("output",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.loading")}),N.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:s("ui.hub.status.other_error")}),N.data&&de&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("p",{className:"text-body-sm text-ink-muted",children:[fs(ke,ge),e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),s("ui.hub.skills.revision",{revision:String(N.data.content_revision)})]}),e.jsx(js,{mark:gs(ke,je,Q)})]}),e.jsx("p",{"data-testid":"hub-skill-description",className:"max-w-3xl select-text whitespace-pre-wrap break-words text-body-sm text-ink-muted",children:N.data.description}),P&&Q&&P.local_path&&e.jsx("p",{"data-testid":"hub-skill-local-path",className:"break-words font-mono text-meta text-ink-dim",children:s("ui.hub.skills.local_path",{path:`${P.local_path}`})}),e.jsx("h4",{className:"text-body-sm text-ink",children:s("ui.hub.skills.files")}),e.jsx("p",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.file_count",{count:N.data.files.length})}),N.data.files.map(m=>e.jsxs("details",{className:"min-w-0",children:[e.jsx("summary",{className:"break-words text-mono-sm text-ink",children:m.path}),e.jsx(Is,{readOnly:!0,rows:12,"aria-label":m.path,value:m.content,className:"max-h-96 bg-sunken text-mono-sm"})]},m.path)),P&&e.jsxs("div",{className:"flex flex-col gap-2 border-t border-hairline pt-3",children:[e.jsx(Yt,{link:P}),P.policy.subscribe&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(w,{variant:"outline",size:"sm","data-testid":"hub-skill-unsubscribe",disabled:R.isPending||!R.canWrite,onClick:K,children:s("ui.hub.skills.unsubscribe")}),e.jsx("span",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.unsubscribe_help")})]}),R.error&&e.jsx("p",{role:"alert",className:"text-meta text-danger",children:s("ui.hub.subscriptions.save_failed",{setting:c==="subscribe"?s("ui.hub.subscriptions.subscribe"):s("ui.hub.skills.unsubscribe"),source:I})})]}),P&&Q&&e.jsx(ma,{kind:"skill",name:P.name,enabled:A}),g.error&&!y&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-pull-failed",children:s(we(g.error)?"ui.hub.skills.local_exists":"ui.hub.skills.pull_failed")}),!y&&V&&e.jsx(w,{variant:"outline",onClick:()=>d(V),children:s("ui.hub.adoption.review")}),y&&e.jsx(Ta,{input:y,onClose:()=>{d(null),g.reset(),p.reset()}}),g.data&&!g.data.reports?.some(m=>m.applied||m.outcome==="unchanged")&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-pull-failed",children:s("ui.hub.skills.pull_failed")}),g.data?.link&&g.data.reports?.some(m=>m.link_id===ue&&m.direction==="pull"&&m.applied)&&e.jsx("output",{"data-testid":"hub-skill-installed",className:"text-body-sm text-ink",children:s("ui.hub.skills.installed_alias",{item:g.data.link.name,source:zs(g.data.link)})}),L.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-unpull-failed",children:s("ui.hub.skills.unpull_failed")}),p.error&&!y&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-subscribe-failed",children:s(we(p.error)?"ui.hub.skills.local_exists":"ui.hub.skills.subscribe_failed")}),!a&&e.jsx("p",{className:"text-meta text-ink-muted",children:s("ui.hub.status.no_credential")}),!y&&(!P||!Q)&&e.jsxs($e,{className:"flex-row flex-wrap justify-start gap-2",children:[e.jsx(w,{"data-testid":"hub-skill-download",disabled:!a||!se||g.isPending||!ae,"aria-label":s("ui.hub.skills.pull_title",{item:N.data.name,source:I}),onClick:()=>W(P),children:s("ui.hub.skills.download")}),!P?.policy.subscribe&&e.jsx(w,{variant:"outline","data-testid":"hub-skill-subscribe",disabled:!a||!se||!ae||p.isPending||R.isPending||(P?!R.canWrite:!1),onClick:X,children:s("ui.hub.subscriptions.subscribe")})]}),P&&Q&&e.jsx($e,{className:"flex-row flex-wrap justify-start gap-2",children:e.jsx(w,{variant:"outline","data-testid":"hub-skill-unpull",disabled:L.isPending,onClick:()=>{L.reset(),_(!0)},children:s("ui.hub.skills.unpull")})}),!y&&(!P||!Q)&&e.jsx("p",{className:"text-meta text-ink-muted",children:P?.policy.subscribe?s("ui.hub.skills.download_help"):s("ui.hub.skills.subscribe_help")})]})]})}),e.jsx(Oe,{open:T,onOpenChange:m=>{m||_(!1)},children:e.jsxs(Fe,{className:"sm:max-w-md",children:[e.jsxs(ze,{children:[e.jsx(De,{children:s("ui.hub.skills.unpull_title",{item:N.data?.name??P?.name??""})}),e.jsx(Me,{children:s("ui.hub.skills.unpull_body")})]}),e.jsxs($e,{children:[e.jsx(w,{variant:"outline",onClick:()=>_(!1),children:s("ui.hub.subscriptions.cancel")}),e.jsx(w,{"data-testid":"hub-skill-unpull-confirm",disabled:L.isPending,onClick:()=>{ve(),_(!1)},children:s("ui.hub.skills.unpull")})]})]})}),e.jsx(Oe,{open:E,onOpenChange:k,children:e.jsxs(Fe,{className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[e.jsxs(ze,{children:[e.jsx(De,{children:s("ui.hub.skills.publish_title")}),e.jsx(Me,{children:I})]}),e.jsx(Ia,{scope:t,source:I,verifiedCas:F&&i&&a,enabled:F&&i&&a,heading:!1})]})})]})}const Bs={all:["org-teams"],list:t=>[...Bs.all,"list",t]},Vs=({tenantId:t,enabled:a=!0})=>{const i=Ps({queryKey:Bs.list(t??""),queryFn:async()=>(await Gt(t)).result??{teams:[]},enabled:a&&!!t,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1,retry:ct});return{...i,teams:i.data?.teams??[]}},Ra=(t,a)=>{const i=t?.name?.trim()||a?.trim()||"Team",n=t?.renamed_from?.trim()||null;return t?.invalid_name===!0&&n?{level:"warning",message:s("ui.notices.hub.team_pulled_renamed",{stored:i,published:n})}:n?{level:"success",message:s("ui.notices.hub.team_pulled_collision",{stored:i,published:n})}:{level:"success",message:s("ui.notices.hub.team_pulled",{name:i})}},Qs=()=>{const t=ut();return Nt({mutationFn:async({teamId:a,tenantId:i})=>{if(!Qe.baseUrl)throw new Error("Local Operator API URL is not configured.");return St.pullOrgTeamFromRadient(Qe.baseUrl,a,i)},onSuccess:(a,i)=>{const n=Ra(a.result,i.name);n.level==="warning"?wt(n.message):_t(n.message),t.invalidateQueries({queryKey:["desktop","teams"]})},onError:a=>{console.error("Pulling an organization team failed:",a)}})},Ea=/^v/i,Ws=t=>t.members.reduce((a,i)=>a+i.count,0),La=t=>t.count>1?`${t.role} ×${t.count}`:t.role,We=t=>t.members.map(La).join(", "),Ks=t=>{const a=(t.version??"").trim().replace(Ea,"").trim();return a===""?null:a},Ys=t=>{const a=t.account_metadata?.name?.trim();return a||null},Oa=t=>{const a=(t.description??"").trim();return a===""?null:a},Ke=240,Fa=Ke/2,za=(t,a)=>{if(a||t.length<=Ke)return t;const i=t.slice(0,Ke),n=i.lastIndexOf(" ");return`${(n>=Fa?i.slice(0,n):i).trimEnd()}…`},Ce=t=>dt(t,{day:"numeric",month:"short",year:"numeric"}),Pe=t=>{if(!t)return null;const a=new Date(t);return Number.isNaN(a.getTime())?null:a},Ns=(t,a,i)=>{const n=i-a.getTime();let o;return n<0?o=Ce(a):n<6e4?o=s("ui.hub.updates.ago.now"):o=Os(a,i),{label:t,when:o,iso:a.toISOString(),exact:Ce(a)}},Da=(t,a=Date.now())=>{const i=Pe(t.updated_at);if(i)return Ns("updated",i,a);const n=Pe(t.created_date);return n?Ns("created",n,a):null},Ma=t=>{const a=Pe(t.created_date),i=Pe(t.updated_at);return{created:a?Ce(a):null,updated:i?Ce(i):null}},$a=t=>t==="role"?s("ui.hub.teams.kind.role"):t==="specialist"?s("ui.hub.teams.kind.specialist"):t,qa=["refresh-hub","retry","sign-in"],Ua=({tenantId:t,orgName:a})=>{const{teams:i,isLoading:n,isFetching:o,isError:h,error:x,refetch:f}=Vs({tenantId:t}),b=$s(x),j=Qs(),[T,_]=l.useState(null),[c,u]=l.useState(null),E=l.useRef(new Map),k=l.useRef(null);l.useEffect(()=>{j.isPending||k.current===null||(E.current.get(k.current)?.focus(),k.current=null)},[j.isPending]);const[S,I]=l.useState(!1),[z,A]=l.useState(()=>new Set),v=(d,p)=>A(L=>{const R=new Set(L);return p?R.add(d):R.delete(d),R}),F=(d,p)=>{d.key!=="Escape"||!z.has(p)||(d.target instanceof Element?d.target:null)?.closest('[data-testid="org-team-pull-error"]')||(v(p,!1),d.currentTarget.querySelector("button[aria-expanded]")?.focus(),d.preventDefault())},N=l.useMemo(()=>{if(!Rs(j.error))return null;const d=i.find(p=>p.id===T);return Ls({code:j.error.code,message:j.error.message,details:j.error.details},{name:d?.name??"this team",hubAgentId:null,surface:"pull"})},[j.error,T,i]),g=(d,p)=>{switch(d){case"refresh-hub":f();break;case"retry":y(p);break;case"sign-in":I(!0);break}},y=d=>{j.isPending||(k.current=d.id,_(null),u(d.id),j.mutate({teamId:d.id,tenantId:t,name:d.name},{onSettled:()=>u(null),onError:()=>_(d.id)}))};return e.jsxs("section",{className:"mb-6 max-w-4xl rounded-md bg-surface","aria-label":s("ui.hub.teams.org.aria",{org:a??s("ui.hub.pages.scope.org_unnamed")}),"data-testid":"org-teams",children:[n&&e.jsxs("div",{"aria-hidden":"true",className:"flex flex-col divide-y divide-hairline","data-testid":"org-teams-loading",children:[e.jsx(He,{}),e.jsx(He,{}),e.jsx(He,{})]}),!n&&h&&e.jsxs(xe,{variant:b?"warning":"danger",className:"m-4 w-auto","data-testid":"org-teams-error",children:[e.jsx(be,{children:b==="plan"?s("ui.hub.teams.org.plan_headline"):b==="no_access"?s("ui.hub.teams.org.no_access_headline"):s("ui.hub.teams.org.load_headline")}),e.jsx(pe,{children:b==="plan"?s("ui.hub.teams.org.plan_body",{org:a??s("ui.hub.pages.scope.org_unnamed")}):b==="no_access"?s("ui.hub.teams.org.no_access_body",{org:a??s("ui.hub.teams.org.that_organization")}):Ye(s("ui.hub.teams.org.unreadable"),x)}),b!=="no_access"&&e.jsx("div",{className:"mt-2",children:e.jsx(w,{variant:"primary",size:"sm",onClick:()=>void f(),disabled:o,"aria-busy":o,children:o?s("ui.hub.teams.public.trying"):ce.retry})})]}),!n&&!h&&i.length===0&&e.jsx("p",{className:"p-4 text-body-sm text-ink-muted","data-testid":"org-teams-empty",children:s("ui.hub.teams.org.empty",{org:a??s("ui.hub.pages.scope.org_unnamed")})}),!n&&!h&&i.length>0&&e.jsx("ul",{className:"flex flex-col divide-y divide-hairline",children:i.map(d=>e.jsxs("li",{className:B(Gs,"transition-colors duration-fast ease-out-quart hover:bg-elevated first:rounded-t-md last:rounded-b-md"),onKeyDown:p=>F(p,d.id),children:[e.jsx(Es,{className:"min-w-0",open:z.has(d.id),onOpenChange:p=>v(d.id,p),summaryAlign:"firstLine",triggerClassName:"min-w-0",chevronClassName:"text-ink-dim mt-1",rowClassName:"py-0",summary:e.jsx(Va,{team:d,expanded:z.has(d.id)}),trailing:e.jsx("div",{className:"-mt-1 ml-3 shrink-0 self-start",children:e.jsx(w,{ref:p=>{p?E.current.set(d.id,p):E.current.delete(d.id)},variant:"secondary",size:"sm",onClick:()=>y(d),disabled:j.isPending,"aria-label":s("ui.hub.teams.pull_target",{name:ne(d.name)}),children:c===d.id?s("ui.hub.teams.pulling"):s("ui.hub.teams.pull")})}),children:e.jsx(Qa,{team:d})}),T===d.id&&e.jsxs("div",{className:"mt-1 flex flex-col items-start gap-1 pl-5","data-testid":"org-team-pull-error",children:[e.jsx("output",{className:"text-meta text-danger",children:N?.body??j.error?.message??s("ui.hub.teams.pull_failed",{name:ne(d.name)})}),N?.actions.filter(p=>qa.includes(p)).map(p=>e.jsx(w,{variant:"primary",size:"sm",onClick:()=>g(p,d),children:ce[p]},p)),S&&e.jsx("div",{className:"mt-1","data-testid":"org-team-pull-reauth",children:e.jsx(Hs,{titleText:ce["sign-in"],descriptionText:"",onSignInSuccess:()=>{I(!1),_(null),f()}})})]})]},d.id))})]})},Gs="px-4 py-3",Js=()=>e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),e.jsx("span",{className:"sr-only",children:", "})]}),Ha=({team:t})=>{U();const a=t.manager?.trim(),i=Ws(t);return e.jsxs("span",{className:"block truncate text-meta",children:[a?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.manager_label")})," ",e.jsx("span",{className:"text-ink-muted",children:a})]}):null,a?e.jsx(Js,{}):null,t.members.length===0?e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.no_members")}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.member_count",{count:i})})," ",e.jsx("span",{className:"text-ink-muted",children:We(t)})]})]})},Ba=({team:t})=>{U();const a=t.project?.trim(),i=Ys(t),n=Da(t),o=[];return a&&o.push({key:"project",node:a}),i&&o.push({key:"author",node:i}),n&&o.push({key:"recency",node:e.jsx(oe,{content:n.exact,children:e.jsx("time",{dateTime:n.iso,children:n.label==="updated"?s("ui.hub.teams.recency.updated",{when:n.when}):s("ui.hub.teams.recency.created",{when:n.when})})})}),o.length===0?null:e.jsx("span",{className:"block truncate text-ink-dim text-meta",children:o.map((h,x)=>e.jsxs("span",{children:[x>0?e.jsx(Js,{}):null,h.node]},h.key))})},Va=({team:t,expanded:a})=>{U();const i=Oa(t),n=Ks(t);return e.jsxs("span",{className:"flex min-w-0 flex-col",children:[e.jsxs("span",{className:"flex min-w-0 items-baseline",children:[e.jsx("span",{className:"truncate font-medium text-body text-ink",children:ne(t.name)}),n?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",n]}):null]}),i?e.jsxs(e.Fragment,{children:[e.jsx("span",{...Se,"aria-hidden":"true",className:B("mt-1 select-text break-words text-body-sm text-ink-muted",a?"line-clamp-[12] whitespace-pre-line":"line-clamp-2"),children:i}),e.jsx("span",{className:"sr-only",children:za(i,a)})]}):e.jsx("span",{className:"mt-1 text-body-sm text-ink-dim",children:s("ui.hub.teams.no_description")}),e.jsxs("span",{className:"mt-1 flex min-w-0 flex-col",children:[e.jsx(Ha,{team:t}),e.jsx(Ba,{team:t})]})]})},Qa=({team:t})=>{U();const a=t.manager?.trim(),i=Ma(t),n=[i.created?s("ui.hub.teams.detail.created",{date:i.created}):null,i.updated?s("ui.hub.teams.detail.updated",{date:i.updated}):null].filter(h=>h!==null),o=!!a||t.members.length>0;return e.jsxs("div",{className:"mt-1 flex flex-col gap-2",children:[o||n.length===0?e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.members")}),e.jsxs("ul",{className:"flex flex-col gap-0.5",children:[a?e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:a}),e.jsx("span",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.manager")})]}):null,t.members.map(h=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:h.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:$a(h.kind)}),h.count>1?e.jsxs("span",{className:"text-ink-dim text-meta tabular-nums",children:["×",h.count]}):null]},`${h.kind}:${h.role}`)),o?null:e.jsx("li",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.no_members")})]})]}):null,n.length>0?e.jsx("p",{className:"text-ink-dim text-meta",children:n.join(" · ")}):null]})},He=()=>e.jsxs("div",{className:B(Gs,"pl-9"),"data-testid":"org-team-skeleton-row",children:[e.jsx("div",{className:"flex h-[1lh] items-center text-body",children:e.jsx(O,{className:"h-4.5 w-40"})}),e.jsxs("div",{className:"mt-1 flex h-[2lh] flex-col justify-evenly text-body-sm",children:[e.jsx(O,{className:"h-3.5 w-full"}),e.jsx(O,{className:"h-3.5 w-2/3"})]}),e.jsx("div",{className:"mt-1 flex h-[1lh] items-center text-meta",children:e.jsx(O,{className:"h-3 w-64"})}),e.jsx("div",{className:"flex h-[1lh] items-center text-meta",children:e.jsx(O,{className:"h-3 w-48"})})]}),Xs=(t,a)=>a instanceof Jt?a.message:Ye(t,a),Wa=["refresh-hub","retry","sign-in"],Ka=({signedIn:t,onOpenSettings:a})=>{U();const[i,n]=l.useState(1),[o,h]=l.useState(""),{teams:x,isLoading:f,isFetching:b,isError:j,error:T,refetch:_,pagination:c}=qs({page:i,perPage:Us}),u=Qs(),[E,k]=l.useState(null),[S,I]=l.useState(null),z=l.useRef(new Map),A=l.useRef(null);l.useEffect(()=>{u.isPending||A.current===null||(z.current.get(A.current)?.focus(),A.current=null)},[u.isPending]);const v=zt(o.trim()),F=l.useMemo(()=>v?x.filter(C=>ne(C.name).toLowerCase().includes(v)||(C.description??"").toLowerCase().includes(v)):x,[x,v]),N=C=>{u.isPending||(k(null),I(C.id),A.current=C.id,u.mutate({teamId:C.id,name:C.name},{onSettled:()=>I(null),onError:()=>k(C.id)}))},g=l.useMemo(()=>{if(!Rs(u.error))return null;const C=x.find(M=>M.id===E);return Ls({code:u.error.code,message:u.error.message,details:u.error.details},{name:C?.name??"this team",hubAgentId:null,surface:"pull"})},[u.error,E,x]),y=g?.body??(mt(u.error)==="unauthorized"?s("ui.hub.teams.public.pull_no_signin"):s("ui.hub.teams.public.pull_failed")),[d,p]=l.useState(!1),L=(C,M)=>{switch(C){case"refresh-hub":_();break;case"retry":N(M);break;case"sign-in":p(!0);break}},R=f&&x.length===0,V=c?.totalRecords??x.length,D=l.useRef(null),q=C=>{const M=o!=="";h(C),M&&C===""&&D.current?.focus()};return e.jsxs("section",{"aria-label":s("ui.hub.teams.public.aria"),className:"flex flex-col","data-testid":"agent-hub-public-teams",children:[e.jsx("h2",{className:"sr-only",children:s("ui.hub.teams.public.aria")}),e.jsx("p",{className:"mb-3 max-w-3xl text-body-sm text-ink-muted",children:s("ui.hub.teams.public.intro")}),t?null:e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2","data-testid":"agent-hub-public-teams-signed-out",children:[e.jsx("span",{className:"text-meta text-ink-dim",children:s("ui.hub.teams.public.sign_in_hint")}),e.jsx(w,{variant:"secondary",size:"sm",onClick:a,children:s("ui.hub.teams.public.open_settings")})]}),e.jsx("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:e.jsxs("div",{className:B("flex min-w-56 max-w-md flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(As,{"aria-hidden":"true",className:"ml-2 shrink-0 text-ink-dim"}),e.jsx(Te,{ref:D,type:"search",value:o,onChange:C=>q(C.target.value),placeholder:s("ui.hub.teams.public.search_placeholder"),"aria-label":s("ui.hub.teams.public.search_aria"),className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none","data-testid":"agent-hub-public-teams-search"})]})}),R&&e.jsxs("div",{"aria-hidden":"true",className:"flex max-w-4xl flex-col gap-3","data-testid":"agent-hub-public-teams-loading",children:[e.jsx(Be,{}),e.jsx(Be,{}),e.jsx(Be,{})]}),!R&&j&&e.jsxs(xe,{variant:"danger",className:"w-auto max-w-2xl","data-testid":"agent-hub-public-teams-error",children:[e.jsx(be,{children:s("ui.hub.teams.public.load_failed")}),e.jsx(pe,{children:Xs(s("ui.hub.teams.public.catalogue_unreadable"),T)}),e.jsx("div",{className:"mt-2",children:e.jsx(w,{variant:"primary",size:"sm",onClick:()=>void _(),disabled:b,"aria-busy":b,children:b?s("ui.hub.teams.public.trying"):s("ui.common.actions.retry_again")})})]}),!R&&!j&&x.length===0&&e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted","data-testid":"agent-hub-public-teams-empty",children:s("ui.hub.teams.public.empty")}),!R&&!j&&x.length>0&&e.jsxs(e.Fragment,{children:[!v||F.length>0?e.jsxs("p",{className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-public-teams-status",children:[v?s("ui.hub.teams.public.match_line",{visible:String(F.length),total:x.length,query:o.trim()}):s("ui.hub.pages.status.count.teams",{count:V,scope:s("ui.hub.pages.status.scope.public")}),v?e.jsxs("span",{className:"text-ink-dim",children:[" ",s("ui.hub.teams.public.search_scope")]}):null]}):null,F.length===0?e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted","data-testid":"agent-hub-public-teams-search-miss",children:s("ui.hub.teams.public.search_miss",{query:o.trim()})}):e.jsx("ul",{className:"flex max-w-4xl flex-col gap-3",children:F.map(C=>e.jsx(Ya,{team:C,pulling:S===C.id,pullPending:u.isPending,onPull:N,pullButtonRef:M=>{M?z.current.set(C.id,M):z.current.delete(C.id)},failed:E===C.id,failureBody:y,treatment:g,onTreatmentAction:L,reauthenticating:d,onReauthenticated:()=>{p(!1),k(null),_()}},C.id))}),!v&&c&&c.totalPages>1&&e.jsx(Je,{count:c.totalPages,page:c.page,onChange:C=>{n(C),D.current?.scrollIntoView({block:"nearest"})}})]})]})},Ya=({team:t,pulling:a,pullPending:i,onPull:n,failed:o,failureBody:h,treatment:x,onTreatmentAction:f,reauthenticating:b,onReauthenticated:j,pullButtonRef:T})=>{U();const[_,c]=l.useState(!1),u=ba({teamId:_?t.id:void 0}),E=ne(t.name),k=Ks(t),S=Ys(t),I=t.manager?.trim(),z=Ws(t),A=(t.description??"").trim();return e.jsxs("li",{className:"rounded-md bg-surface p-4","data-testid":"agent-hub-public-team","data-team-name":t.name,children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-baseline",children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:E}),k?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",k]}):null]}),A?e.jsx("p",{...Se,className:"mt-1 line-clamp-3 max-w-3xl select-text text-body-sm text-ink-muted",children:A}):e.jsx("p",{className:"mt-1 text-body-sm text-ink-dim",children:s("ui.hub.teams.no_description")}),e.jsxs("p",{className:"mt-2 flex flex-wrap items-baseline gap-x-2 text-meta",children:[I?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.manager_label")}),e.jsx("span",{className:"text-ink-muted",children:I})]}):null,t.members.length===0?e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.no_members")}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.member_count",{count:z})}),e.jsx(oe,{content:We(t),children:e.jsx("span",{className:"truncate text-ink-muted",children:We(t)})})]})]}),S?e.jsxs("p",{className:"mt-1 text-ink-dim text-meta",children:[s("ui.hub.teams.public.published_by")," ",e.jsx("span",{className:"text-ink-muted",children:S})]}):null]}),e.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-2",children:[e.jsx(w,{ref:T,variant:"secondary",size:"sm",onClick:()=>n(t),disabled:i,"aria-label":s("ui.hub.teams.pull_target",{name:E}),children:a?s("ui.hub.teams.pulling"):s("ui.hub.teams.pull")}),o&&e.jsxs("div",{className:"flex max-w-56 flex-col items-end gap-1","data-testid":"agent-hub-public-team-pull-error",children:[e.jsx("output",{className:"text-right text-meta text-danger",children:h}),x?.actions.filter(v=>Wa.includes(v)).map(v=>e.jsx(w,{variant:"primary",size:"sm",onClick:()=>f(v,t),children:ce[v]},v)),b&&e.jsx("div",{"data-testid":"agent-hub-public-team-pull-reauth",children:e.jsx(Hs,{titleText:ce["sign-in"],descriptionText:"",onSignInSuccess:j})})]})]})]}),e.jsx("div",{className:"mt-2",children:e.jsx(Es,{summary:s("ui.hub.teams.brief.trigger"),open:_,onOpenChange:c,className:"w-full",triggerClassName:"w-full",triggerLabel:s("ui.hub.teams.brief.trigger_aria",{name:E}),chevronClassName:"text-ink-dim",children:e.jsx(Ga,{detail:u})})})]})},Ga=({detail:t})=>{if(U(),t.isLoading)return e.jsxs("div",{className:"flex flex-col gap-1","data-testid":"agent-hub-public-team-brief-loading",children:[e.jsx(O,{className:"h-[1lh] w-2/3"}),e.jsx(O,{className:"h-[2lh] w-full"})]});if(t.isError)return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx("output",{className:"text-meta text-danger",children:Xs(s("ui.hub.teams.brief.unreadable"),t.error)}),e.jsx(w,{variant:"primary",size:"sm",onClick:()=>void t.refetch(),disabled:t.isFetching,"aria-busy":t.isFetching,children:t.isFetching?s("ui.hub.teams.public.trying"):ce.retry})]});const a=t.team;if(!a)return null;const i=(a.instructions??"").trim(),n=(a.project??"").trim();return e.jsxs("div",{className:"flex max-w-3xl flex-col gap-3 text-body-sm","data-testid":"agent-hub-public-team-brief",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.brief.collaboration")}),i?e.jsx("p",{...Se,className:"whitespace-pre-line select-text text-ink-muted",children:i}):e.jsx("p",{className:"text-ink-dim",children:s("ui.hub.teams.brief.collaboration_empty")})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.brief.project")}),n?e.jsx("p",{...Se,className:"whitespace-pre-line select-text text-ink-muted",children:n}):e.jsx("p",{className:"text-ink-dim",children:s("ui.hub.teams.brief.project_empty")})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.brief.roster")}),e.jsxs("ul",{className:"flex flex-col gap-0.5",children:[a.manager?.trim()?e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:a.manager.trim()}),e.jsx("span",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.manager")})]}):null,a.members.length===0?e.jsx("li",{className:"text-ink-dim",children:s("ui.hub.teams.no_members")}):a.members.map(o=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:o.count>1?`${o.role} ×${o.count}`:o.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:o.kind})]},`${o.kind}:${o.role}`))]})]})]})},Be=()=>e.jsxs("div",{className:"rounded-md bg-surface p-4",children:[e.jsx(O,{className:"h-[1lh] w-1/3"}),e.jsx(O,{className:"mt-1 flex h-[3lh] w-full"}),e.jsx(O,{className:"mt-2 h-[1lh] w-2/3"})]}),Ja=(t,a)=>{const[i,n]=l.useState(t);return l.useEffect(()=>{const o=setTimeout(()=>n(t),a);return()=>clearTimeout(o)},[t,a]),i},_e=[{value:"download_count:desc",label:"ui.hub.pages.sort.most_downloaded",sort:"download_count",order:"desc"},{value:"like_count:desc",label:"ui.hub.pages.sort.most_liked",sort:"like_count",order:"desc"},{value:"favourite_count:desc",label:"ui.hub.pages.sort.most_favourited",sort:"favourite_count",order:"desc"},{value:"created_at:desc",label:"ui.hub.pages.sort.newest",sort:"created_at",order:"desc"},{value:"updated_at:desc",label:"ui.hub.pages.sort.recently_updated",sort:"updated_at",order:"desc"},{value:"name:asc",label:"ui.hub.pages.sort.name_asc",sort:"name",order:"asc"}],Xa=[{value:"name",label:"ui.hub.pages.search_field.name"},{value:"description",label:"ui.hub.pages.search_field.description"}],Za=300,H="public",ws={agents:"agent-hub-view-agents",teams:"agent-hub-view-teams",skills:"agent-hub-view-skills"},_s="agent-hub-view-panel",ei=()=>e.jsxs("div",{className:"flex h-full flex-col overflow-hidden rounded-md bg-surface",children:[e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 p-4",children:[e.jsx(O,{className:"h-5.5 w-2/3"}),e.jsx(O,{className:"h-3.5 w-full"}),e.jsx(O,{className:"h-3.5 w-full"}),e.jsx(O,{className:"h-3.5 w-1/2"}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(O,{className:"h-5.5 w-24"}),e.jsx(O,{className:"h-5.5 w-20"})]}),e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsx(O,{className:"h-5.5 w-24"})})]}),e.jsx(O,{className:"h-4.5 w-32"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 border-t border-hairline px-3 py-2",children:[e.jsx(O,{className:"size-4"}),e.jsx(O,{className:"h-4 w-6"}),e.jsx(O,{className:"size-4"}),e.jsx(O,{className:"h-4 w-6"}),e.jsx(O,{className:"ml-auto h-7 w-16"})]})]}),ji=()=>{const t=Ss(),{isAuthenticated:a}=Ge(),[i,n]=l.useState(1),[o]=l.useState(12),[h,x]=l.useState(null),[f,b]=l.useState(""),[j,T]=l.useState("name"),[_,c]=l.useState(_e[0].value),[u,E]=l.useState(H),[k,S]=l.useState("agents");U();const[I,z]=l.useState([]),A=Ja(f,Za),v=_e.find(r=>r.value===_)??_e[0],F=Ts(),N=!F.isError&&Ve(F.data,"hub_skills"),g=k==="skills"&&!N?"agents":k;l.useEffect(()=>{k==="skills"&&!N&&S("agents")},[k,N]);const y=Ct(),d=ht(F.data,"radient_org"),p=a?ga(d,y??null):null,{memberships:L}=Xt({enabled:qe(d)}),R=l.useMemo(()=>pa(L),[L]),V=u===H||R.some(r=>r.tenant_id===u);l.useEffect(()=>{!V&&g!=="skills"&&E(H)},[V,g]);const D=u===H?null:R.find(r=>r.tenant_id===u)??null,q=D?.tenant_id,C=D?.tenant_name||null,M=h!==null||A!=="",ue=Vs({tenantId:q}),ae=qs({page:1,perPage:Us,enabled:u===H}),ge=q&&ue.isSuccess?ue.teams.length:null,de=ae.isSuccess?ae.pagination?.totalRecords??null:null,se=M?null:u===H?de:ge,me=u===H?{visibility:"public",tenantId:null}:{visibility:"org",tenantId:u},fe=V&&(u===H||qe(d)),J=Ms(me,1,N&&fe&&(u===H||a)),P=J.isSuccess?J.data.total:null,je=D?.role==="owner"||D?.role==="admin",ke=l.useMemo(()=>new Map(L.map(r=>[r.tenant_id,r.tenant_name])),[L]),{data:Q,agents:Ie,isLoading:he,isFetching:W,error:X,refetch:ve,pagination:K}=It({page:i,perPage:o,categories:h?[h]:void 0,name:j==="name"&&A||void 0,description:j==="description"&&A||void 0,sort:v.sort,order:v.order,tenantId:q}),te=D?$s(X):null,ie=Ie??[],le=W&&Q!==void 0,{statuses:m,isKnown:$,isError:Z,isFetching:re,refetch:ye}=Dt({agentIds:q?[]:ie.map(r=>r.id)}),Ae=l.useRef(null),Re=l.useRef(null),[Xe,Zs]=l.useState(0);l.useEffect(()=>{Xe!==0&&(Ae.current??Re.current)?.focus()},[Xe]);const Ze=l.useRef(null),Ee=l.useRef(!1),Le=l.useMemo(()=>[...new Set((Q?.records??[]).flatMap(r=>r.categories??[]))],[Q]);l.useEffect(()=>{z(r=>Le.every(G=>r.includes(G))?r:[...new Set([...r,...Le])])},[Le]);const et=()=>{x(null),b(""),n(1),Zs(r=>r+1)},Y=(he||W)&&Q===void 0,es=!Y&&!M&&(X!==null||ie.length===0);l.useEffect(()=>{!Ee.current||Y||(Ee.current=!1,X?Ze.current?.focus():(Ae.current??Re.current)?.focus())},[Y,X]);const ss=l.useRef(null),st=r=>{n(r),ss.current?.scrollIntoView({block:"nearest"})},tt=r=>{x(r),n(1)},at=r=>{b(r),n(1)},it=r=>{E(r),n(1)},ts=l.useRef(new Map),nt=r=>{T(r),n(1)},lt=K&&!M?K.totalRecords:null,Ne=q?s("ui.hub.pages.status.scope.shared_with",{org:C??s("ui.hub.pages.scope.org_unnamed")}):s("ui.hub.pages.status.scope.public"),as=(r,G)=>G==="team"?s("ui.hub.pages.status.count.teams",{count:r,scope:Ne}):s("ui.hub.pages.status.count.agents",{count:r,scope:Ne});let ee;return g==="skills"?ee=" ":g==="teams"?q?ue.isLoading?ee=s("ui.hub.pages.status.loading_teams"):se!==null?ee=as(se,"team"):ee=s("ui.hub.pages.status.teams_scope",{scope:Ne}):ee=" ":Y?ee=s("ui.hub.pages.status.loading_agents"):K?ee=as(K.totalRecords,"agent"):ee=s("ui.hub.pages.status.agents_scope",{scope:Ne}),e.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[e.jsx(xt,{title:s("ui.hub.pages.header.title"),subtitle:s("ui.hub.pages.header.subtitle"),icon:Zt}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[p&&e.jsxs(xe,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-unavailable",children:[e.jsx(be,{children:s("ui.hub.pages.orgs_unavailable")}),e.jsx(pe,{children:p})]}),e.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-x-4 gap-y-2","data-testid":"agent-hub-browse-bar",children:[e.jsx(ft,{value:g,onValueChange:r=>S(r),children:e.jsx(jt,{"aria-label":s("ui.hub.pages.browse_aria"),children:["agents","teams",...N?["skills"]:[]].map(r=>{const G=r==="agents"?lt:r==="teams"?se:P;return e.jsxs(kt,{value:r,id:ws[r],"aria-controls":g===r?_s:void 0,"data-testid":`agent-hub-view-${r}`,children:[r==="agents"?s("ui.hub.pages.tab.agents"):r==="teams"?s("ui.hub.pages.tab.teams"):s("ui.hub.skills.title"),G!==null&&e.jsx("span",{className:"min-w-[2ch] font-normal text-ink-dim tabular-nums",children:G})]},r)})})}),R.length>0&&e.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-2",children:[e.jsx("span",{"aria-hidden":"true",className:"text-meta text-ink-muted",children:s("ui.hub.pages.scope_label")}),e.jsxs("fieldset",{className:"m-0 min-w-0 border-0 p-0","data-testid":"agent-hub-scope",children:[e.jsx("legend",{className:"sr-only",children:s("ui.hub.pages.scope_legend")}),e.jsx("div",{className:"flex flex-wrap gap-0.5 rounded-md bg-sunken p-0.5",children:[{value:H,label:s("ui.hub.pages.scope.public"),Icon:Pt},...R.map(r=>({value:r.tenant_id,label:r.tenant_name||s("ui.hub.pages.scope.org_label"),Icon:fa}))].map(({value:r,label:G,Icon:rt})=>e.jsxs(w,{ref:is=>{is?ts.current.set(r,is):ts.current.delete(r)},variant:"ghost",size:"sm","aria-pressed":u===r,onClick:()=>it(r),title:G,"data-testid":`agent-hub-scope-${r===H?"public":`org-${r}`}`,className:B("max-w-48",u===r&&"bg-surface text-ink hover:bg-surface"),children:[e.jsx(rt,{"aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:G})]},r))})]})]})]}),e.jsx(vt,{id:_s,labelledBy:ws[g],children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-row overflow-hidden",children:[g==="agents"&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"mr-6 hidden w-60 shrink-0 rounded-md bg-surface p-2 md:block","data-glass-region":"panel","data-tour-tag":"agent-hub-sidebar-container",children:!es&&e.jsx(wa,{selectedCategory:h,onSelectCategory:tt,categories:I})})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-y-auto",children:[g==="agents"&&!es&&e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:B("flex min-w-56 flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(Te,{ref:Ae,type:"search",value:f,onChange:r=>at(r.target.value),placeholder:s("ui.hub.pages.search.placeholder"),"aria-label":s("ui.hub.pages.search.aria"),className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none","data-testid":"agent-hub-search"}),e.jsxs(ns,{value:j,onValueChange:nt,children:[e.jsx(ls,{className:"w-auto shrink-0 border-y-0 border-l border-hairline border-r-0 bg-transparent pl-2 outline-none","aria-label":s("ui.hub.pages.search.scope_aria"),"data-testid":"agent-hub-search-scope",children:e.jsx(rs,{})}),e.jsx(os,{children:Xa.map(r=>e.jsx(cs,{value:r.value,children:s(r.label)},r.value))})]})]}),e.jsxs(ns,{value:_,onValueChange:c,children:[e.jsx(ls,{className:"w-48","aria-label":s("ui.hub.pages.sort.aria"),"data-testid":"agent-hub-sort",children:e.jsx(rs,{})}),e.jsx(os,{children:_e.map(r=>e.jsx(cs,{value:r.value,children:s(r.label)},r.value))})]})]}),e.jsxs("p",{ref:ss,"aria-live":"polite",className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-status",children:[ee,g==="agents"&&le?e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{"data-testid":"agent-hub-updating",children:s("ui.hub.pages.updating")})]}):null]}),g==="agents"&&e.jsxs(e.Fragment,{children:[a&&Z&&e.jsxs("output",{className:"mb-3 flex flex-wrap items-center gap-2 text-meta text-warning","data-testid":"agent-hub-status-unknown",children:[e.jsx("span",{children:s("ui.hub.pages.viewer_unknown")}),e.jsx(w,{variant:"ghost",size:"sm",onClick:()=>void ye(),disabled:re,"aria-busy":re,children:re?s("ui.common.actions.retrying"):s("ui.common.actions.retry_again")})]}),Y&&e.jsx("div",{"data-testid":"agent-hub-loading",className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6",children:Array.from({length:6},(r,G)=>e.jsx(ei,{},G))}),Y&&K===void 0&&e.jsx("div",{"aria-hidden":"true",className:"mt-6 flex min-h-13 items-center justify-center","data-testid":"agent-hub-pager-placeholder",children:e.jsx(O,{className:"h-4 w-24"})}),e.jsx("output",{"aria-live":"polite","data-testid":"agent-hub-outage",className:B(!Y&&X&&!te?"block":"sr-only"),children:!Y&&X&&!te&&e.jsxs(xe,{variant:"danger",className:"max-w-2xl","aria-busy":W,"data-testid":"agent-hub-error",children:[e.jsx(be,{children:a?s("ui.hub.pages.load_failed.title"):s("ui.hub.pages.signed_out.title")}),e.jsx(pe,{children:a?Ye("The agent list could not be loaded.",X):s("ui.hub.pages.signed_out.body")}),e.jsx("div",{className:"mt-2",children:e.jsx(w,{ref:Ze,variant:"outline",size:"sm",onClick:()=>{Ee.current=!0,ve()},disabled:W,"aria-busy":W,children:W?s("ui.hub.detail.trying"):s("ui.common.actions.retry_again")})})]})}),!Y&&te&&D&&e.jsxs(xe,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-no-access",children:[e.jsx(be,{children:te==="plan"?"That organization needs an active Team plan":"You do not have access to that organization"}),e.jsx(pe,{children:te==="plan"?`Sharing agents inside an organization is part of the Team plan. An owner of ${D.tenant_name||"this organization"} can activate it in the Radient console, and then its agents will be listed here.`:`You are not a member of ${D.tenant_name||"that organization"}, so its agents are not listed here. An owner can invite you again.`}),te==="plan"&&e.jsx("div",{className:"mt-2",children:e.jsx(w,{variant:"primary",size:"sm",onClick:()=>void ve(),disabled:W,"aria-busy":W,children:W?s("ui.hub.detail.trying"):s("ui.common.actions.retry_again")})})]}),!Y&&!X&&e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6","aria-busy":le,children:ie.length===0?e.jsxs("div",{"data-testid":"agent-hub-empty",className:B("col-span-full w-full flex flex-col items-center gap-2 rounded-md bg-surface px-6 py-10 text-center",!q&&"max-w-2xl justify-self-center"),children:[e.jsx("p",{className:"text-heading text-ink",children:q?"This organization has no shared agents yet.":h?`No agents in ${Fs(h).label}.`:M?"No agents match that search.":"The hub is empty."}),e.jsx("p",{className:"max-w-md text-body-sm text-ink-muted",children:q?`Agents published into ${D?.tenant_name||"this organization"} appear here for its members.`:h?"Nothing in this category yet. Clear the filter to see the whole hub.":M?"No agent's name or description carries that. Clear it to see the whole hub.":"Nobody has published an agent yet. Yours could be the first."}),e.jsx("div",{className:"mt-2 flex flex-wrap items-center justify-center gap-2",children:M?e.jsx(w,{variant:"secondary",onClick:et,children:h?"Clear filter":"Clear search"}):q&&!je?null:e.jsx(w,{ref:Re,variant:"secondary",onClick:()=>t("/agents"),children:s("ui.hub.pages.publish")})})]}):ie.map(r=>e.jsx(ya,{agent:r,status:a?m[r.id]:void 0,viewerStateKnown:a&&Mt($,m,r.id),orgName:r.visibility==="org"?ke.get(r.tenant_id)??null:null},r.id))}),!Y&&K&&K.totalPages>1&&e.jsx(Je,{count:K.totalPages,page:K.page,onChange:st})]}),g==="skills"&&(N?e.jsx(Aa,{scope:u===H?{visibility:"public",tenantId:null,organization:null}:{visibility:"org",tenantId:u,organization:C},signedIn:a,accessible:V&&(u===H||qe(d))},`skills:${u}`):e.jsx("p",{className:"text-body-sm text-warning",children:s("ui.hub.skills.unavailable")})),g==="teams"&&(D?e.jsx(Ua,{tenantId:D.tenant_id,orgName:C}):e.jsx(Ka,{signedIn:a,onOpenSettings:()=>t("/settings")}))]})]})})]})]})};export{ji as AgentHubPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-qz7T7xAV.js";import{B as o}from"./index-5nnHkCvU.js";import"./messages-CjI8V3o6.js";import"./appearance-CdmD45BF.js";import"./roles-D1pcbxAx.js";import"./error-boundary-iNbBBB3v.js";import"./conversation-input-sync-OWxmq4zX.js";import"./console-mirror-B21mv5xh.js";const c=()=>r.jsx(o,{tabScope:"all",requestScope:"all",hostSessionId:null,isRoutePage:!0,surfaceTag:"browser-route",dockSurfaceTag:"browser-approvals-dock"});export{c as BrowserPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as a,C as n}from"./mermaid.core-CRutHT7B.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-BH6_YcXd.js";import{_ as i}from"./mermaid.core-CRutHT7B.js";import"./chunk-RZ5BOZE2-B1oObDF1.js";import"./conversation-input-sync-OWxmq4zX.js";import"./index-qz7T7xAV.js";import"./messages-CjI8V3o6.js";import"./appearance-CdmD45BF.js";import"./roles-D1pcbxAx.js";import"./error-boundary-iNbBBB3v.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-BH6_YcXd.js";import{_ as i}from"./mermaid.core-CRutHT7B.js";import"./chunk-RZ5BOZE2-B1oObDF1.js";import"./conversation-input-sync-OWxmq4zX.js";import"./index-qz7T7xAV.js";import"./messages-CjI8V3o6.js";import"./appearance-CdmD45BF.js";import"./roles-D1pcbxAx.js";import"./error-boundary-iNbBBB3v.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./_baseUniq-DvtjRZBO.js";var e=4;function a(o){return r(o,e)}export{a as c};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,l as o,K as s,e as p,L as n}from"./mermaid.core-CRutHT7B.js";import{p as m}from"./radar-MK3ICKWK-CjpC5GXo.js";import"./conversation-input-sync-OWxmq4zX.js";import"./index-qz7T7xAV.js";import"./messages-CjI8V3o6.js";import"./appearance-CdmD45BF.js";import"./roles-D1pcbxAx.js";import"./error-boundary-iNbBBB3v.js";import"./_baseUniq-DvtjRZBO.js";import"./_basePickBy-Cn6QfSqv.js";import"./clone-bejLhD1C.js";var g={parse:e(async r=>{const a=await m("info",r);o.debug(a)},"parse")},v={version:n.version},d=e(()=>v.version,"getVersion"),c={getVersion:d},l=e((r,a,i)=>{o.debug(`rendering info diagram
|
|
2
|
-
`+r);const t=s(a);p(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${i}`)},"draw"),f={draw:l},V={parser:g,db:c,renderer:f};export{V as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,b as e,a,S as i}from"./chunk-AEK57VVT-BfSHypbQ.js";import{_ as s}from"./mermaid.core-CRutHT7B.js";import"./chunk-RZ5BOZE2-B1oObDF1.js";import"./conversation-input-sync-OWxmq4zX.js";import"./index-qz7T7xAV.js";import"./messages-CjI8V3o6.js";import"./appearance-CdmD45BF.js";import"./roles-D1pcbxAx.js";import"./error-boundary-iNbBBB3v.js";var f={parser:a,get db(){return new i(2)},renderer:e,styles:r,init:s(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{f as diagram};
|