local-operator-ui 0.34.47 → 0.34.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/out/main/index.js +2259 -47
  2. package/out/preload/index.js +1 -0
  3. package/out/renderer/assets/{_basePickBy-B2JiaFKi.js → _basePickBy-Coq1U1Is.js} +1 -1
  4. package/out/renderer/assets/{_baseUniq-CfpDxOYw.js → _baseUniq-CN5nbj15.js} +1 -1
  5. package/out/renderer/assets/agent-details-page-BOHG1UL8.js +6 -0
  6. package/out/renderer/assets/agent-hub-page-lDe6m3U_.js +11 -0
  7. package/out/renderer/assets/agents-page-CS2ctxLL.js +7 -0
  8. package/out/renderer/assets/{arc-K65ZzfoN.js → arc-CyEksofH.js} +1 -1
  9. package/out/renderer/assets/architectureDiagram-IEHRJDOE-o2ZHU4e3.js +36 -0
  10. package/out/renderer/assets/{blockDiagram-JOT3LUYC-DpImr7tl.js → blockDiagram-JOT3LUYC-B0Yyp4_C.js} +1 -1
  11. package/out/renderer/assets/{book-open-BEOtYKZe.js → book-open-CEakesEi.js} +1 -1
  12. package/out/renderer/assets/browser-page-CjbkyuiR.js +1 -0
  13. package/out/renderer/assets/browser-webauthn-prompt-Dq82YVua.js +1 -0
  14. package/out/renderer/assets/{c4Diagram-VJAJSXHY-CD9xVR0f.js → c4Diagram-VJAJSXHY-DLUNsMlf.js} +1 -1
  15. package/out/renderer/assets/channel-BrqzOdfK.js +1 -0
  16. package/out/renderer/assets/{chunk-4BMEZGHF-CTvc3b4C.js → chunk-4BMEZGHF-TEJuQZ1Y.js} +1 -1
  17. package/out/renderer/assets/{chunk-A2AXSNBT-ByqThlbf.js → chunk-A2AXSNBT-B_dFl8CN.js} +1 -1
  18. package/out/renderer/assets/{chunk-AEK57VVT-DD6OqDr0.js → chunk-AEK57VVT-BZoQ5TO6.js} +1 -1
  19. package/out/renderer/assets/{chunk-D6G4REZN-DyRn0cWl.js → chunk-D6G4REZN-D1bYNZJL.js} +1 -1
  20. package/out/renderer/assets/{chunk-RZ5BOZE2-CnZV3WTJ.js → chunk-RZ5BOZE2-DbkFvpUt.js} +1 -1
  21. package/out/renderer/assets/{chunk-XZIHB7SX-DolFB-S0.js → chunk-XZIHB7SX-C0c85hT-.js} +1 -1
  22. package/out/renderer/assets/classDiagram-GIVACNV2-C4Q7B2pX.js +1 -0
  23. package/out/renderer/assets/classDiagram-v2-COTLJTTW-C4Q7B2pX.js +1 -0
  24. package/out/renderer/assets/clone-T21nSsyt.js +1 -0
  25. package/out/renderer/assets/{console-mirror-DpL-JwpC.js → console-mirror-DDhXu5hQ.js} +2 -2
  26. package/out/renderer/assets/consoleCapture-DomsRGWw.js +1 -0
  27. package/out/renderer/assets/{conversation-input-sync-BX8IVirL.js → conversation-input-sync-B3FVv0Mq.js} +257 -258
  28. package/out/renderer/assets/dagre-OKDRZEBW-CAb1XIuS.js +4 -0
  29. package/out/renderer/assets/diagram-SSKATNLV-CAh7vH7L.js +43 -0
  30. package/out/renderer/assets/diagram-VNBRO52H-CU4FF4Qr.js +24 -0
  31. package/out/renderer/assets/en-US-CHJkXXr4.js +1 -0
  32. package/out/renderer/assets/{erDiagram-Q7BY3M3F-CKncNCh2.js → erDiagram-Q7BY3M3F-CbnNz_kj.js} +1 -1
  33. package/out/renderer/assets/error-boundary-etstfCzN.js +126 -0
  34. package/out/renderer/assets/{flowDiagram-4HSFHLVR-DxgK_2s-.js → flowDiagram-4HSFHLVR-BB6aJVKV.js} +1 -1
  35. package/out/renderer/assets/{format-CZUObkkr.js → format-esAOn2VS.js} +1 -1
  36. package/out/renderer/assets/{ganttDiagram-APWFNJXF-C26kU1-9.js → ganttDiagram-APWFNJXF-CtOJM4d7.js} +1 -1
  37. package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-DvrevAjH.js +65 -0
  38. package/out/renderer/assets/{graph-CnXCW8BP.js → graph-DOR9Sgwh.js} +1 -1
  39. package/out/renderer/assets/index-5vl5RXGq.js +1 -0
  40. package/out/renderer/assets/index-9_-S4Njy.js +809 -0
  41. package/out/renderer/assets/index-CZ5usiad.js +7 -0
  42. package/out/renderer/assets/index-CftawgM9.js +57 -0
  43. package/out/renderer/assets/index-VwZaZzVv.css +1 -0
  44. package/out/renderer/assets/infoDiagram-PH2N3AL5-CTd32x3B.js +2 -0
  45. package/out/renderer/assets/installer-CjbOLDvI.js +1 -0
  46. package/out/renderer/assets/{journeyDiagram-U35MCT3I-C-Aue1NR.js → journeyDiagram-U35MCT3I-2BsbTilL.js} +1 -1
  47. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-DhgXwdEM.js → kanban-definition-NDS4AKOZ-DoYAcNl0.js} +1 -1
  48. package/out/renderer/assets/{layout-Dw8q0WZh.js → layout-DSk91znb.js} +1 -1
  49. package/out/renderer/assets/legacy-agents-page-BGSPncrN.js +33 -0
  50. package/out/renderer/assets/{mermaid.core-CLdsX7Rp.js → mermaid.core-BqK7XNWH.js} +5 -5
  51. package/out/renderer/assets/mesh-page-BxEA5Aan.js +1 -0
  52. package/out/renderer/assets/mindmap-definition-ALO5MXBD-HV-ovM7g.js +95 -0
  53. package/out/renderer/assets/mini-Bco2ITLo.js +1 -0
  54. package/out/renderer/assets/{notebook-pen-B5Stfimb.js → notebook-pen-DsGb6zKu.js} +1 -1
  55. package/out/renderer/assets/org-access-B_xqEqnd.js +1 -0
  56. package/out/renderer/assets/{org-surface-gate-i_SGPHN5.js → org-surface-gate-D4SilXIt.js} +1 -1
  57. package/out/renderer/assets/{page-header-BR-fmx4f.js → page-header-DZ04Whs5.js} +1 -1
  58. package/out/renderer/assets/{parseISO-CZfAC2_J.js → parseISO-BHJWTxrA.js} +1 -1
  59. package/out/renderer/assets/{pieDiagram-IB7DONF6-DjDH1mVr.js → pieDiagram-IB7DONF6-BArx4Jik.js} +1 -1
  60. package/out/renderer/assets/{projects-page-CGRUr8ls.js → projects-page-DABVK4s_.js} +14 -14
  61. package/out/renderer/assets/publication-validation-BmkCCv-H.js +1 -0
  62. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-Ba5XUz4h.js → quadrantDiagram-7GDLP6J5-Dmmo_urD.js} +1 -1
  63. package/out/renderer/assets/{radar-MK3ICKWK-eQRm6qEE.js → radar-MK3ICKWK-D8Sc1Ajv.js} +1 -1
  64. package/out/renderer/assets/radient-auth-buttons-BmQt2D1Y.js +1 -0
  65. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-BSpyCNos.js → requirementDiagram-KVF5MWMF-BU04-wPA.js} +1 -1
  66. package/out/renderer/assets/sankeyDiagram-QLVOVGJD-CIQO7kso.js +10 -0
  67. package/out/renderer/assets/schedules-page-DllGJFS2.js +115 -0
  68. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-DdHVib_S.js → sequenceDiagram-X6HHIX6F-BN2soxj_.js} +1 -1
  69. package/out/renderer/assets/settings-page-DKzDa5P5.js +292 -0
  70. package/out/renderer/assets/stateDiagram-DGXRK772-bGNaZvy4.js +1 -0
  71. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CNVQhmQM.js +1 -0
  72. package/out/renderer/assets/{timeline-definition-BDJGKUSR-5dsF-6I0.js → timeline-definition-BDJGKUSR-DmM_eb2d.js} +1 -1
  73. package/out/renderer/assets/ui-preferences-store-Byw1dJtt.js +1 -0
  74. package/out/renderer/assets/use-download-agent-mutation-CXv_tRQE.js +61 -0
  75. package/out/renderer/assets/{use-memberships-query-BMGVy3RO.js → use-memberships-query-C4IVeIBl.js} +1 -1
  76. package/out/renderer/assets/{use-session-snapshot-D3QghcPD.js → use-session-snapshot-CrOrWGgL.js} +1 -1
  77. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-DmEwPPnE.js → xychartDiagram-VJFVF3MP-CbbQZrKE.js} +1 -1
  78. package/out/renderer/console-capture.html +5 -5
  79. package/out/renderer/index.html +7 -7
  80. package/out/renderer/installer.html +4 -4
  81. package/out/renderer/mini.html +7 -7
  82. package/package.json +3 -5
  83. package/out/renderer/assets/agent-details-page-C0GdJMfq.js +0 -6
  84. package/out/renderer/assets/agent-hub-page-C6ze_xjQ.js +0 -11
  85. package/out/renderer/assets/agents-page-DSNLtN_J.js +0 -7
  86. package/out/renderer/assets/architectureDiagram-IEHRJDOE-CLJdV8y-.js +0 -36
  87. package/out/renderer/assets/browser-page-Hj-3V4SP.js +0 -1
  88. package/out/renderer/assets/browser-webauthn-prompt-4jHz_1RY.js +0 -1
  89. package/out/renderer/assets/channel-CjH9_X6K.js +0 -1
  90. package/out/renderer/assets/classDiagram-GIVACNV2-DNFX9Bxc.js +0 -1
  91. package/out/renderer/assets/classDiagram-v2-COTLJTTW-DNFX9Bxc.js +0 -1
  92. package/out/renderer/assets/clone-Dh-7KwYI.js +0 -1
  93. package/out/renderer/assets/consoleCapture-DD1Sq_ph.js +0 -1
  94. package/out/renderer/assets/dagre-OKDRZEBW-CDaLTqSD.js +0 -4
  95. package/out/renderer/assets/diagram-SSKATNLV-CT01eufZ.js +0 -43
  96. package/out/renderer/assets/diagram-VNBRO52H-Dm95zJ6Z.js +0 -24
  97. package/out/renderer/assets/en-US-BcB1DWxG.js +0 -1
  98. package/out/renderer/assets/error-boundary-BDLNfQKz.js +0 -126
  99. package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-B22ejsPk.js +0 -65
  100. package/out/renderer/assets/index-Be9pTy7F.js +0 -7
  101. package/out/renderer/assets/index-CnQsclLj.js +0 -809
  102. package/out/renderer/assets/index-DF_hRerL.js +0 -55
  103. package/out/renderer/assets/index-Dk4-Px6P.css +0 -1
  104. package/out/renderer/assets/index-UE_QEAqr.js +0 -1
  105. package/out/renderer/assets/infoDiagram-PH2N3AL5-DJZU3P7J.js +0 -2
  106. package/out/renderer/assets/installer-CIu909RT.js +0 -1
  107. package/out/renderer/assets/legacy-agents-page-u84wTmRV.js +0 -33
  108. package/out/renderer/assets/mesh-page-Dys9-2sY.js +0 -1
  109. package/out/renderer/assets/messages-Yrm2FT2V.js +0 -3
  110. package/out/renderer/assets/mindmap-definition-ALO5MXBD-BjBiqabY.js +0 -95
  111. package/out/renderer/assets/mini-BXXRy4rW.js +0 -1
  112. package/out/renderer/assets/org-access-CyjYN726.js +0 -1
  113. package/out/renderer/assets/publication-validation-B4k6VAFZ.js +0 -1
  114. package/out/renderer/assets/radient-auth-buttons-BW_zi2lF.js +0 -1
  115. package/out/renderer/assets/sankeyDiagram-QLVOVGJD-C-fzkOnd.js +0 -10
  116. package/out/renderer/assets/schedules-page-CiSL5P8q.js +0 -115
  117. package/out/renderer/assets/settings-page-C11l7qyA.js +0 -292
  118. package/out/renderer/assets/stateDiagram-DGXRK772-DEwuWkNd.js +0 -1
  119. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-DRPVtafh.js +0 -1
  120. package/out/renderer/assets/use-download-agent-mutation-DGGt-uXR.js +0 -61
@@ -1 +1 @@
1
- import{A as s,B as d,C as m,D as y}from"./conversation-input-sync-BX8IVirL.js";function a(){return crypto.randomUUID()}async function q(e=1,t=20,n){const r={page:e,per_page:t};if(n)for(const[o,u]of Object.entries(n))u&&(r[o]=u);return s({operation:"agents.list",query:r})}async function w(e){return s({operation:"agents.get",agentId:e})}async function T(e){return s({operation:"agents.delete",agentId:e,requestId:a(),confirmed:!0})}async function I(e){return s({operation:"agents.like",agentId:e,requestId:a()})}async function $(e){return s({operation:"agents.unlike",agentId:e,requestId:a(),confirmed:!0})}async function k(e){return s({operation:"agents.favourite",agentId:e,requestId:a()})}async function v(e){return s({operation:"agents.unfavourite",agentId:e,requestId:a(),confirmed:!0})}async function _(e,t){return s({operation:"comments.create",agentId:e,payload:t,requestId:a()})}async function j(e,t=1,n=20){return s({operation:"comments.list",agentId:e,query:{page:t,per_page:n}})}async function C(e,t,n){return s({operation:"comments.update",agentId:e,commentId:t,payload:n,requestId:a()})}async function P(e,t){return s({operation:"comments.delete",agentId:e,commentId:t,requestId:a(),confirmed:!0})}async function E(e){return s({operation:"agents.statuses",query:{agent_ids:e.join(",")}})}async function f(){return s({operation:"memberships.list"})}async function O(e,t=1,n=20,r){const o={page:t,per_page:n};if(r)for(const[u,c]of Object.entries(r))c&&(o[u]=c);return s({operation:"org_agents.list",tenantId:e,query:o})}async function H(e){return s({operation:"org_teams.list",tenantId:e})}class i extends Error{status;reason;constructor(t,n,r){super(t),this.name="PublicHubError",this.status=n,this.reason=r}}const b=/\/+$/,h=(e,t,n)=>{const r=e.replace(b,"");return n?`${r}/v1/${t}/${encodeURIComponent(n)}`:`${r}/v1/${t}`},p=(e,t)=>h(e,"teams",t),l=async e=>{let t;try{t=await fetch(e,{method:"GET",headers:{Accept:"application/json"},redirect:"error"})}catch(r){throw console.error("The public hub could not be reached:",r),new i("The public hub could not be reached.",null,r)}if(!t.ok)throw new i(`The public hub answered ${t.status}.`,t.status);let n;try{n=await t.json()}catch{throw new i("The public hub answered with a body that is not JSON.",t.status)}if(!n||typeof n!="object"||!("result"in n))throw new i("The public hub answered with a body this app cannot read.",t.status);return n};async function S(e,t=1,n=12){const r=`${p(e)}?page=${t}&per_page=${n}`;return l(r)}async function U(e,t){return l(p(e,t))}const g={all:["memberships"]},x=({enabled:e=!0}={})=>{const{isAuthenticated:t}=d(),n=m({queryKey:g.all,queryFn:async()=>(await f()).result??{memberships:[]},enabled:e&&t,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:y});return{...n,memberships:n.data?.memberships??[]}};export{i as P,q as a,j as b,_ as c,P as d,T as e,x as f,w as g,S as h,U as i,H as j,E as k,O as l,v as m,k as n,$ as o,h as p,I as q,l as r,C as u};
1
+ import{A as s,B as d,C as m,D as y}from"./conversation-input-sync-B3FVv0Mq.js";function a(){return crypto.randomUUID()}async function q(e=1,t=20,n){const r={page:e,per_page:t};if(n)for(const[o,u]of Object.entries(n))u&&(r[o]=u);return s({operation:"agents.list",query:r})}async function w(e){return s({operation:"agents.get",agentId:e})}async function T(e){return s({operation:"agents.delete",agentId:e,requestId:a(),confirmed:!0})}async function I(e){return s({operation:"agents.like",agentId:e,requestId:a()})}async function $(e){return s({operation:"agents.unlike",agentId:e,requestId:a(),confirmed:!0})}async function k(e){return s({operation:"agents.favourite",agentId:e,requestId:a()})}async function v(e){return s({operation:"agents.unfavourite",agentId:e,requestId:a(),confirmed:!0})}async function _(e,t){return s({operation:"comments.create",agentId:e,payload:t,requestId:a()})}async function j(e,t=1,n=20){return s({operation:"comments.list",agentId:e,query:{page:t,per_page:n}})}async function C(e,t,n){return s({operation:"comments.update",agentId:e,commentId:t,payload:n,requestId:a()})}async function P(e,t){return s({operation:"comments.delete",agentId:e,commentId:t,requestId:a(),confirmed:!0})}async function E(e){return s({operation:"agents.statuses",query:{agent_ids:e.join(",")}})}async function f(){return s({operation:"memberships.list"})}async function O(e,t=1,n=20,r){const o={page:t,per_page:n};if(r)for(const[u,c]of Object.entries(r))c&&(o[u]=c);return s({operation:"org_agents.list",tenantId:e,query:o})}async function H(e){return s({operation:"org_teams.list",tenantId:e})}class i extends Error{status;reason;constructor(t,n,r){super(t),this.name="PublicHubError",this.status=n,this.reason=r}}const b=/\/+$/,h=(e,t,n)=>{const r=e.replace(b,"");return n?`${r}/v1/${t}/${encodeURIComponent(n)}`:`${r}/v1/${t}`},p=(e,t)=>h(e,"teams",t),l=async e=>{let t;try{t=await fetch(e,{method:"GET",headers:{Accept:"application/json"},redirect:"error"})}catch(r){throw console.error("The public hub could not be reached:",r),new i("The public hub could not be reached.",null,r)}if(!t.ok)throw new i(`The public hub answered ${t.status}.`,t.status);let n;try{n=await t.json()}catch{throw new i("The public hub answered with a body that is not JSON.",t.status)}if(!n||typeof n!="object"||!("result"in n))throw new i("The public hub answered with a body this app cannot read.",t.status);return n};async function S(e,t=1,n=12){const r=`${p(e)}?page=${t}&per_page=${n}`;return l(r)}async function U(e,t){return l(p(e,t))}const g={all:["memberships"]},x=({enabled:e=!0}={})=>{const{isAuthenticated:t}=d(),n=m({queryKey:g.all,queryFn:async()=>(await f()).result??{memberships:[]},enabled:e&&t,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:y});return{...n,memberships:n.data?.memberships??[]}};export{i as P,q as a,j as b,_ as c,P as d,T as e,x as f,w as g,S as h,U as i,H as j,E as k,O as l,v as m,k as n,$ as o,h as p,I as q,l as r,C as u};
@@ -1 +1 @@
1
- import{d as c}from"./conversation-input-sync-BX8IVirL.js";import{r as n}from"./index-DF_hRerL.js";function s(){const[f,a]=n.useState(null),[l,o]=n.useState(null),r=n.useRef(null),u=n.useCallback(async e=>{r.current=e,a(t=>t&&t.id!==e?null:t),o(t=>t&&t.id!==e?null:t);try{const t=await c({op:"sessions.get",sessionId:e});if(r.current!==e)return;a({id:e,frontend:t.payload.frontend.snapshot})}catch{}try{const t=await c({op:"commands.entities",sessionId:e,command:"effort"});if(r.current!==e)return;o({id:e,entities:t.entities})}catch{}},[]);return{frontend:f?.frontend??null,effortEntities:l?.entities,refresh:u}}export{s as u};
1
+ import{d as c}from"./conversation-input-sync-B3FVv0Mq.js";import{r as n}from"./index-CftawgM9.js";function s(){const[f,a]=n.useState(null),[l,o]=n.useState(null),r=n.useRef(null),u=n.useCallback(async e=>{r.current=e,a(t=>t&&t.id!==e?null:t),o(t=>t&&t.id!==e?null:t);try{const t=await c({op:"sessions.get",sessionId:e});if(r.current!==e)return;a({id:e,frontend:t.payload.frontend.snapshot})}catch{}try{const t=await c({op:"commands.entities",sessionId:e,command:"effort"});if(r.current!==e)return;o({id:e,entities:t.entities})}catch{}},[]);return{frontend:f?.frontend??null,effortEntities:l?.entities,refresh:u}}export{s as u};
@@ -1,4 +1,4 @@
1
- import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-CLdsX7Rp.js";import{x as kt,v as Tt,y as Rt}from"./conversation-input-sync-BX8IVirL.js";import"./index-DF_hRerL.js";import"./messages-Yrm2FT2V.js";import"./error-boundary-BDLNfQKz.js";var at=function(){var t=n(function(B,h,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=h);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],y=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],r=[1,36],D=[1,37],N=[1,43],mt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,l,c,u,m,a,X){var x=a.length-1;switch(m){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(y,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:39,13:38,24:N,27:mt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:mt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,l){if(l.recoverable)this.trace(h);else{var c=new Error(h);throw c.hash=l,c}},"parseError"),parse:n(function(h){var l=this,c=[0],u=[],m=[null],a=[],X=this.table,x="",G=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(h,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,m.length=m.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(G+1)+`:
1
+ import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-BqK7XNWH.js";import{x as kt,v as Tt,y as Rt}from"./conversation-input-sync-B3FVv0Mq.js";import"./index-CftawgM9.js";import"./ui-preferences-store-Byw1dJtt.js";import"./error-boundary-etstfCzN.js";var at=function(){var t=n(function(B,h,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=h);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],y=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],r=[1,36],D=[1,37],N=[1,43],mt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,l,c,u,m,a,X){var x=a.length-1;switch(m){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(y,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:39,13:38,24:N,27:mt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:mt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,l){if(l.recoverable)this.trace(h);else{var c=new Error(h);throw c.hash=l,c}},"parseError"),parse:n(function(h){var l=this,c=[0],u=[],m=[null],a=[],X=this.table,x="",G=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(h,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,m.length=m.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(G+1)+`:
2
2
  `+A.showPosition()+`
3
3
  Expecting `+Q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":nt="Parse error on line "+(G+1)+": Unexpected "+(w==wt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(nt,{text:A.match,token:this.terminals_[w]||w,line:A.yylineno,loc:et,expected:Q})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+w);switch(v[0]){case 1:c.push(w),m.push(A.yytext),a.push(A.yylloc),c.push(v[1]),w=null,Ct=A.yyleng,x=A.yytext,G=A.yylineno,et=A.yylloc;break;case 2:if(M=this.productions_[v[1]][1],z.$=m[m.length-M],z._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},Jt&&(z._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),st=this.performAction.apply(z,[x,Ct,G,W.yy,v[1],m,a].concat(Zt)),typeof st<"u")return st;M&&(c=c.slice(0,-1*M*2),m=m.slice(0,-1*M),a=a.slice(0,-1*M)),c.push(this.productions_[v[1]][0]),m.push(z.$),a.push(z._$),_t=X[c[c.length-2]][c[c.length-1]],c.push(_t);break;case 3:return!0}}return!0},"parse")},Qt=function(){var B={EOF:1,parseError:n(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw new Error(l)},"parseError"),setInput:n(function(h,l){return this.yy=l||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var l=h.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:n(function(h){var l=h.length,c=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var h=this.pastInput(),l=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
@@ -6,11 +6,11 @@
6
6
  <title>Local Operator Console Capture</title>
7
7
  <meta http-equiv="Content-Security-Policy"
8
8
  content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
9
- <script type="module" crossorigin src="./assets/consoleCapture-DD1Sq_ph.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-DF_hRerL.js">
11
- <link rel="modulepreload" crossorigin href="./assets/messages-Yrm2FT2V.js">
12
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-DpL-JwpC.js">
13
- <link rel="stylesheet" crossorigin href="./assets/index-Dk4-Px6P.css">
9
+ <script type="module" crossorigin src="./assets/consoleCapture-DomsRGWw.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-CftawgM9.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-Byw1dJtt.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-DDhXu5hQ.js">
13
+ <link rel="stylesheet" crossorigin href="./assets/index-VwZaZzVv.css">
14
14
  <link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
15
15
  </head>
16
16
 
@@ -41,13 +41,13 @@
41
41
  <meta http-equiv="Content-Security-Policy"
42
42
  content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111 http://localhost:8080 http://127.0.0.1:8080 https://api.radienthq.com https://us.i.posthog.com https://login.microsoftonline.com https://accounts.google.com; script-src 'self' https://us-assets.i.posthog.com https://accounts.google.com https://login.microsoftonline.com; style-src 'self' 'unsafe-inline' data:; img-src 'self' data: blob: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' blob: http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:; frame-src 'self' data: blob: lo-supplement: http://localhost:1111 http://127.0.0.1:1111 https://accounts.google.com https://login.microsoftonline.com" />
43
43
  <meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin-allow-popups" />
44
- <script type="module" crossorigin src="./assets/index-CnQsclLj.js"></script>
45
- <link rel="modulepreload" crossorigin href="./assets/index-DF_hRerL.js">
46
- <link rel="modulepreload" crossorigin href="./assets/messages-Yrm2FT2V.js">
47
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BDLNfQKz.js">
48
- <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-BX8IVirL.js">
49
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-DpL-JwpC.js">
50
- <link rel="stylesheet" crossorigin href="./assets/index-Dk4-Px6P.css">
44
+ <script type="module" crossorigin src="./assets/index-9_-S4Njy.js"></script>
45
+ <link rel="modulepreload" crossorigin href="./assets/index-CftawgM9.js">
46
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-Byw1dJtt.js">
47
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-etstfCzN.js">
48
+ <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-B3FVv0Mq.js">
49
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-DDhXu5hQ.js">
50
+ <link rel="stylesheet" crossorigin href="./assets/index-VwZaZzVv.css">
51
51
  <link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-CAX4_ErH.css">
52
52
  <link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
53
53
  <link rel="stylesheet" crossorigin href="./assets/index-DHKnfVbX.css">
@@ -8,10 +8,10 @@
8
8
  <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
9
9
  <meta http-equiv="Content-Security-Policy"
10
10
  content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:" />
11
- <script type="module" crossorigin src="./assets/installer-CIu909RT.js"></script>
12
- <link rel="modulepreload" crossorigin href="./assets/index-DF_hRerL.js">
13
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BDLNfQKz.js">
14
- <link rel="stylesheet" crossorigin href="./assets/index-Dk4-Px6P.css">
11
+ <script type="module" crossorigin src="./assets/installer-CjbOLDvI.js"></script>
12
+ <link rel="modulepreload" crossorigin href="./assets/index-CftawgM9.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-etstfCzN.js">
14
+ <link rel="stylesheet" crossorigin href="./assets/index-VwZaZzVv.css">
15
15
  </head>
16
16
 
17
17
  <body>
@@ -6,13 +6,13 @@
6
6
  <title>Local Operator Quick Send</title>
7
7
  <meta http-equiv="Content-Security-Policy"
8
8
  content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
9
- <script type="module" crossorigin src="./assets/mini-BXXRy4rW.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-DF_hRerL.js">
11
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BDLNfQKz.js">
12
- <link rel="modulepreload" crossorigin href="./assets/messages-Yrm2FT2V.js">
13
- <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-BX8IVirL.js">
14
- <link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-D3QghcPD.js">
15
- <link rel="stylesheet" crossorigin href="./assets/index-Dk4-Px6P.css">
9
+ <script type="module" crossorigin src="./assets/mini-Bco2ITLo.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-CftawgM9.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-etstfCzN.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-Byw1dJtt.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-B3FVv0Mq.js">
14
+ <link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-CrOrWGgL.js">
15
+ <link rel="stylesheet" crossorigin href="./assets/index-VwZaZzVv.css">
16
16
  <link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-CAX4_ErH.css">
17
17
  </head>
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-operator-ui",
3
- "version": "0.34.47",
3
+ "version": "0.34.49",
4
4
  "productName": "Local Operator",
5
5
  "description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
6
6
  "main": "./out/main/index.js",
@@ -88,15 +88,13 @@
88
88
  "check-themes": "node scripts/generate-theme-css.mjs --check && node scripts/contrast-contract.mjs",
89
89
  "test:session-cookies": "node scripts/session-cookie-electron.test.mjs",
90
90
  "test:window-guards": "node scripts/window-guards-electron.test.mjs",
91
-
92
- "test:desktop": "node scripts/run-desktop-tests.mjs scripts/browser-startup.test.mjs scripts/agents-config-summary.test.mjs scripts/agents-config-retry.test.mjs scripts/agent-class-toggle.test.mjs scripts/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/evidence-tz.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/transcript-focus.test.mjs scripts/transcript-focus-behaviour.test.mjs scripts/transcript-dom-window.test.mjs scripts/transcript-dom-window-hook.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-paging-hook.test.mjs scripts/seed-placement.test.mjs scripts/seed-label-gap.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/session-load-sequence.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.test.mjs scripts/speech-settings.test.mjs scripts/backend-error-surfaces.test.mjs scripts/canonical-chat.test.mjs scripts/stale-caption.test.mjs scripts/desktop-watch-lease.test.mjs scripts/session-switch.test.mjs scripts/chat-search.test.mjs scripts/session-archive-delete.test.mjs scripts/chat-archived.test.mjs scripts/chat-archive-press.test.mjs scripts/desktop-test-lane-bound.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/palette-contract.test.mjs scripts/palette-panel-request.test.mjs scripts/run-child-reader.test.mjs scripts/run-detail-model.test.mjs scripts/subagent-pulse.test.mjs scripts/chat-title.test.mjs scripts/clear-search.test.mjs scripts/tool-row.test.mjs scripts/image-gen-card.test.mjs scripts/job-cancel-panel.test.mjs scripts/job-controls.test.mjs scripts/working-line-clock.test.mjs scripts/attachment-url.test.mjs scripts/file-blob-url.test.mjs scripts/desktop-notifier.test.mjs scripts/launch-session.test.mjs scripts/desktop-feed.test.mjs scripts/session-status-feed.test.mjs scripts/viewer-record.test.mjs scripts/desktop-stream.test.mjs scripts/python-bytecode-cache.test.mjs scripts/preload-updater-surface.test.mjs scripts/update-affirmation.test.mjs scripts/update-global-install.test.mjs scripts/update-robustness.test.mjs scripts/merge-update-feed.test.mjs scripts/prune-bundled-resources.test.mjs scripts/bundled-runtime-layout.test.mjs scripts/verify-bundled-uv.test.mjs scripts/managed-python.test.mjs scripts/managed-python-transaction.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.test.mjs scripts/composer-file-drop.test.mjs scripts/ask-draft-swap.test.mjs scripts/ask-queue.test.mjs scripts/ask-revise.test.mjs scripts/ask-composer-no-routing.test.mjs scripts/ask-open-policy.test.mjs scripts/ask-open-render.test.mjs scripts/ask-other.test.mjs scripts/composer-queued-send.test.mjs scripts/composer-tabs.test.mjs scripts/scroll-region-to-top.test.mjs scripts/ask-options.test.mjs scripts/click-proof-expect.test.mjs scripts/window-mode.test.mjs scripts/relaunch-during-quit-proof.test.mjs scripts/about-panel.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/desktop-test-memory-guard.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/finder-files.test.mjs scripts/session-files-hook.test.mjs scripts/picker-feedback.test.mjs scripts/picker-host-selection.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/check-geometry-sources.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/draft-slash-identity.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chord.test.mjs scripts/browser-page-controls.test.mjs scripts/browser-find-row.test.mjs scripts/browser-chord-renderer.test.mjs scripts/browser-chrome.test.mjs scripts/browser-tab-management.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/renderer-driver-api.test.mjs scripts/logger-log-dir.test.mjs scripts/draft-splash.test.mjs scripts/suggestion-stack.test.mjs scripts/suggestion-stack-react.test.mjs scripts/notifications-off.test.mjs scripts/agent-shell-spawn-env.test.mjs scripts/notification-launch.test.mjs scripts/notification-spawn-sites.test.mjs scripts/chrome-keychain.test.mjs scripts/interrupt-control.test.mjs scripts/interrupt-slot-hold-react.test.mjs scripts/chat-sidebar-archive.test.mjs scripts/chat-sidebar-hover-intent.test.mjs scripts/chat-sidebar-selection.test.mjs scripts/message-quote.test.mjs scripts/panel-chart-hover.test.mjs scripts/panel-read-policy.test.mjs scripts/composer-suggestions.test.mjs scripts/composer-tip-react.test.mjs scripts/sidebar-catalogue-gate.test.mjs scripts/telemetry-launch.test.mjs scripts/telemetry-spawn-sites.test.mjs scripts/sidebar-focus-hold.test.mjs scripts/credential-capture.test.mjs scripts/soft-breaks.test.mjs scripts/credential-composer.test.mjs scripts/secret-ask.test.mjs scripts/run-panel-navigation.test.mjs scripts/panel-rail.test.mjs scripts/backend-settings-tiers.test.mjs scripts/settings-language-row.test.mjs scripts/backend-settings-collapse.test.mjs scripts/check-build-env.test.mjs scripts/test-inventory.test.mjs scripts/conflict-markers.test.mjs scripts/compact-receipt.test.mjs scripts/chat-image-expand.test.mjs scripts/prune-python-seed.test.mjs scripts/mcp-auth-complete-no-retry.test.mjs scripts/panel-presentation.test.mjs scripts/turn-timestamp.test.mjs scripts/analytics-session-table.test.mjs scripts/theme-grid-navigation.test.mjs scripts/theme-registry-exhaustiveness.test.mjs scripts/scheduled-task-model.test.mjs scripts/backend-setting-combos.test.mjs scripts/model-setting-options.test.mjs scripts/searchable-select.test.mjs scripts/backend-settings-drafts.test.mjs scripts/retention-duration.test.mjs scripts/typed-row-call-sites.test.mjs scripts/palette-focus.test.mjs scripts/composer-seeding.test.mjs scripts/skill-invocation.test.mjs scripts/skill-list.test.mjs scripts/skill-highlight.test.mjs scripts/theme-inline.test.mjs scripts/composer-refusal.test.mjs scripts/ci-scope.test.mjs scripts/browser-tab-strip-focus.test.mjs scripts/projects-board-focus.test.mjs scripts/browser-file-transfer-row.test.mjs scripts/link-targets.test.mjs scripts/link-actions.test.mjs scripts/chat-link-affordances.test.mjs scripts/streaming-markdown-parity.test.mjs scripts/transcription-failure-copy.test.mjs scripts/backend-version-drift.test.mjs scripts/live-seed-placement.test.mjs scripts/agents-publication.test.mjs scripts/agent-hub-queries.test.mjs scripts/install-builtin-batch.test.mjs scripts/install-progress.test.mjs scripts/attention-seen.test.mjs scripts/mark-all-read-control.test.mjs scripts/update-global-guard.test.mjs scripts/delivery-gate.test.mjs scripts/canvas-file-freshness.test.mjs scripts/no-websocket-plane.test.mjs scripts/update-window-report.test.mjs scripts/canvas-tab-close.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/webauthn.test.mjs scripts/render-mac-entitlements.test.mjs scripts/row-state-floors.test.mjs scripts/pairing-card-copy.test.mjs scripts/update-install-copy.test.mjs scripts/update-shipit.test.mjs scripts/console-close.test.mjs scripts/console-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-pin-order.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.test.mjs scripts/console-i18n-fit.test.mjs scripts/console-mirror.test.mjs scripts/shell-path.test.mjs scripts/build-env-guard.test.mjs scripts/install-scripts-network.test.mjs scripts/console-pane-render.test.mjs scripts/settings-section-routes.test.mjs scripts/authoring-refresh.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/provider-chip-verdict.test.mjs scripts/child-reader-foot-react.test.mjs scripts/backend-spawn-address.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-sidebar-agents.test.mjs scripts/chat-sidebar-view.test.mjs scripts/chat-sidebar-time-order.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/drafts-clear-on-send.test.mjs scripts/chat-sidebar-drafts.test.mjs scripts/undo-toasts.test.mjs scripts/chat-sidebar-sections.test.mjs scripts/titlebar-options.test.mjs scripts/lane-leading.test.mjs scripts/trace-fold-model.test.mjs scripts/trace-fold-behaviour.test.mjs scripts/chat-status-strip.test.mjs scripts/chat-pane-floors.test.mjs scripts/path-utils.test.mjs scripts/window-chrome.test.mjs scripts/chat-sidebar-scope-paging.test.mjs scripts/chat-sidebar-connection-voices.test.mjs scripts/integration-model.test.mjs scripts/mcp-catalog-parity.test.mjs scripts/mcp-catalog-transport.test.mjs scripts/btw-aside.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-text-authority.test.mjs scripts/shared-composer.test.mjs scripts/analytics-rate-format.test.mjs scripts/provider-catalog.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-status.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/provider-detail-remount.test.mjs scripts/model-select-store.test.mjs scripts/onboarding-step-block.test.mjs scripts/onboarding-default-model.test.mjs scripts/onboarding-i18n-contract.test.mjs scripts/server-release-notes.test.mjs scripts/no-hardlink-write.test.mjs scripts/canvas-goals.test.mjs scripts/overlay-drag-zones.test.mjs scripts/message-surface-floors.test.mjs scripts/media-surface-floors.test.mjs scripts/header-identity-model.test.mjs scripts/pane-slot-ground.test.mjs scripts/projects-tab.test.mjs scripts/agent-hub-org-sharing.test.mjs scripts/agent-hub-public-teams.test.mjs scripts/mesh-tab.test.mjs scripts/peers-catalogue.test.mjs scripts/onboarding-search-step.test.mjs scripts/provider-error-guidance.test.mjs scripts/radient-verify-callout.test.mjs scripts/phone-access-block.test.mjs scripts/sidebar-account-reconnect.test.mjs scripts/stopped-row-measure.test.mjs scripts/aida-rail-marks.test.mjs scripts/aida-sidebar.test.mjs scripts/currency-math.test.mjs scripts/mesh-canvas-bench.test.mjs scripts/agents-offer-dismiss.test.mjs scripts/projects-card-click.test.mjs scripts/lane-registration.test.mjs scripts/team-initials.test.mjs scripts/projects-sheet.test.mjs scripts/turn-collapse-model.test.mjs scripts/collapse-plan-per-pass.test.mjs scripts/turn-collapse-behaviour.test.mjs scripts/checkpoint-model.test.mjs scripts/checkpoint-rail.test.mjs scripts/use-checkpoints.test.mjs scripts/reveal-record.test.mjs scripts/transcript-loader.test.mjs scripts/transcript-deep-jump.test.mjs scripts/thread-search-contract.test.mjs scripts/thread-search-model.test.mjs scripts/thread-search-overlay.test.mjs scripts/use-thread-search.test.mjs scripts/notification-lifetime.test.mjs scripts/transcript-rail-refusal.test.mjs scripts/use-active-checkpoint.test.mjs scripts/held-claim-reach.test.mjs scripts/hold-escape-claim.test.mjs scripts/hotkey-registration.test.mjs scripts/mini-view-dictation.test.mjs scripts/mini-view-contract.test.mjs scripts/ptt-keymap-binding.test.mjs scripts/cross-session-visibility.test.mjs scripts/fold-open.test.mjs scripts/transcript-foot-slot.test.mjs scripts/chat-remote.test.mjs scripts/chat-session-copy-id.test.mjs scripts/header-identity-menu.test.mjs scripts/hub-updates.test.mjs scripts/hub-link-view.test.mjs scripts/hub-links-scene.test.mjs scripts/hub-skills-capability.test.mjs scripts/hub-mutation-safety.test.mjs scripts/monitor-controls.test.mjs scripts/monitor-cancel-dialog.test.mjs scripts/child-transcript-paging.test.mjs scripts/loader-state-machine.test.mjs scripts/transcript-cursor-continuity.test.mjs scripts/older-history-slot.test.mjs scripts/chat-session-subagents.test.mjs scripts/message-actions.test.mjs scripts/update-indicator-segments.test.mjs scripts/reload-picker-close.test.mjs scripts/projects-time-window.test.mjs scripts/audio-recording-levels.test.mjs scripts/chat-sidebar-row-menu.test.mjs scripts/navigation-gesture.test.mjs scripts/fleet-asks.test.mjs scripts/right-slot-width.test.mjs scripts/right-slot-memory.test.mjs scripts/transcript-fade.test.mjs scripts/agents-config-probe-cadence.test.mjs scripts/turn-segments.test.mjs scripts/turn-partition-predicate.test.mjs scripts/chat-device-model.test.mjs scripts/chat-device-placement.test.mjs scripts/org-teams-summary.test.mjs scripts/markdown-table-widths.test.mjs scripts/turn-answer-rail.test.mjs scripts/scrollbar-activity.test.mjs scripts/stt-mic-gate-session.test.mjs scripts/transcript-perflush-perf.test.mjs scripts/speech-clip.test.mjs scripts/speech-store.test.mjs scripts/speech-controls.test.mjs scripts/speech-selection.test.mjs scripts/speech-user-copy.test.mjs scripts/pre-push-gate.test.mjs scripts/update-rollover.test.mjs scripts/projects-filters.test.mjs scripts/projects-force-done.test.mjs scripts/projects-search.test.mjs scripts/projects-search-index.test.mjs scripts/projects-sort.test.mjs scripts/project-view-perf.test.mjs scripts/projects-request-update.test.mjs scripts/projects-inline-edit.test.mjs scripts/speech-target.test.mjs scripts/agents-composer-mount.test.mjs scripts/evidence-fold.test.mjs scripts/projects-quick-send.test.mjs scripts/palette-main-door.test.mjs scripts/external-open-refusal.test.mjs scripts/window-guards.test.mjs scripts/palette-recents.test.mjs scripts/projects-entry-scroll.test.mjs scripts/wake-controls.test.mjs scripts/wake-cancel-panel.test.mjs scripts/code-review-model.test.mjs scripts/code-review-refresh-cue.test.mjs scripts/radient-credits-guidance.test.mjs scripts/quota-notice.test.mjs scripts/use-ever-in-view.test.mjs scripts/image-actions.test.mjs scripts/image-preview-decode.test.mjs scripts/analytics-channels.test.mjs scripts/i18n/check-strings.test.mjs scripts/i18n/typed-keys.test.mjs scripts/i18n/runtime.test.mjs scripts/i18n/format.test.mjs scripts/supplement-model.test.mjs scripts/supplement-row.test.mjs scripts/supplement-file-actions.test.mjs scripts/preview-signed-urls.test.mjs scripts/language-live-updates.test.mjs scripts/language-dialog.test.mjs scripts/code-review-delayed-flag.test.mjs scripts/audio-meter-stream.test.mjs scripts/keymap-chords.test.mjs scripts/keymap-retention.test.mjs scripts/keymap-registry.test.mjs scripts/keymap-dispatch.test.mjs scripts/keyboard-shortcuts-section.test.mjs scripts/keymap-persistence.test.mjs scripts/transcript-strand-hold.test.mjs scripts/transcript-journal-order.test.mjs scripts/journal-order-query.test.mjs scripts/peer-journal-source.test.mjs scripts/peer-source-unified.test.mjs scripts/i18n/activation.test.mjs scripts/i18n/locale-parity.test.mjs scripts/i18n/locale-reactivity.test.mjs scripts/i18n/ledger-check.test.mjs scripts/i18n/ledger-assemble.test.mjs scripts/streaming-live-markdown.test.mjs scripts/markdown-remend.test.mjs scripts/stream-order-live.test.mjs",
93
- "check-vendored": "node scripts/check-vendored.mjs",
91
+ "test:desktop": "node scripts/run-desktop-tests.mjs scripts/browser-startup.test.mjs scripts/agents-config-summary.test.mjs scripts/agents-config-retry.test.mjs scripts/agent-class-toggle.test.mjs scripts/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/evidence-tz.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/transcript-focus.test.mjs scripts/transcript-focus-behaviour.test.mjs scripts/transcript-dom-window.test.mjs scripts/transcript-dom-window-hook.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-paging-hook.test.mjs scripts/seed-placement.test.mjs scripts/seed-label-gap.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/session-load-sequence.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.test.mjs scripts/speech-settings.test.mjs scripts/backend-error-surfaces.test.mjs scripts/canonical-chat.test.mjs scripts/stale-caption.test.mjs scripts/desktop-watch-lease.test.mjs scripts/session-switch.test.mjs scripts/chat-search.test.mjs scripts/session-archive-delete.test.mjs scripts/chat-archived.test.mjs scripts/chat-archive-press.test.mjs scripts/desktop-test-lane-bound.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/palette-contract.test.mjs scripts/palette-panel-request.test.mjs scripts/run-child-reader.test.mjs scripts/run-detail-model.test.mjs scripts/subagent-pulse.test.mjs scripts/chat-title.test.mjs scripts/clear-search.test.mjs scripts/tool-row.test.mjs scripts/image-gen-card.test.mjs scripts/job-cancel-panel.test.mjs scripts/job-controls.test.mjs scripts/working-line-clock.test.mjs scripts/attachment-url.test.mjs scripts/file-blob-url.test.mjs scripts/desktop-notifier.test.mjs scripts/launch-session.test.mjs scripts/desktop-feed.test.mjs scripts/session-status-feed.test.mjs scripts/viewer-record.test.mjs scripts/desktop-stream.test.mjs scripts/python-bytecode-cache.test.mjs scripts/preload-updater-surface.test.mjs scripts/update-affirmation.test.mjs scripts/update-global-install.test.mjs scripts/update-robustness.test.mjs scripts/merge-update-feed.test.mjs scripts/prune-bundled-resources.test.mjs scripts/bundled-runtime-layout.test.mjs scripts/verify-bundled-uv.test.mjs scripts/managed-python.test.mjs scripts/managed-python-transaction.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.test.mjs scripts/composer-file-drop.test.mjs scripts/ask-draft-swap.test.mjs scripts/ask-queue.test.mjs scripts/ask-revise.test.mjs scripts/ask-composer-no-routing.test.mjs scripts/ask-open-policy.test.mjs scripts/ask-open-render.test.mjs scripts/ask-other.test.mjs scripts/composer-queued-send.test.mjs scripts/composer-tabs.test.mjs scripts/scroll-region-to-top.test.mjs scripts/ask-options.test.mjs scripts/click-proof-expect.test.mjs scripts/window-mode.test.mjs scripts/relaunch-during-quit-proof.test.mjs scripts/about-panel.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/desktop-test-memory-guard.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/finder-files.test.mjs scripts/session-files-hook.test.mjs scripts/picker-feedback.test.mjs scripts/picker-host-selection.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/check-geometry-sources.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/draft-slash-identity.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chord.test.mjs scripts/browser-page-controls.test.mjs scripts/browser-find-row.test.mjs scripts/browser-chord-renderer.test.mjs scripts/browser-chrome.test.mjs scripts/browser-tab-management.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/renderer-driver-api.test.mjs scripts/logger-log-dir.test.mjs scripts/draft-splash.test.mjs scripts/suggestion-stack.test.mjs scripts/suggestion-stack-react.test.mjs scripts/notifications-off.test.mjs scripts/agent-shell-spawn-env.test.mjs scripts/notification-launch.test.mjs scripts/notification-spawn-sites.test.mjs scripts/chrome-keychain.test.mjs scripts/interrupt-control.test.mjs scripts/interrupt-slot-hold-react.test.mjs scripts/chat-sidebar-archive.test.mjs scripts/chat-sidebar-hover-intent.test.mjs scripts/chat-sidebar-selection.test.mjs scripts/message-quote.test.mjs scripts/panel-chart-hover.test.mjs scripts/panel-read-policy.test.mjs scripts/composer-suggestions.test.mjs scripts/composer-tip-react.test.mjs scripts/sidebar-catalogue-gate.test.mjs scripts/telemetry-launch.test.mjs scripts/telemetry-spawn-sites.test.mjs scripts/sidebar-focus-hold.test.mjs scripts/credential-capture.test.mjs scripts/soft-breaks.test.mjs scripts/credential-composer.test.mjs scripts/secret-ask.test.mjs scripts/run-panel-navigation.test.mjs scripts/panel-rail.test.mjs scripts/backend-settings-tiers.test.mjs scripts/settings-language-row.test.mjs scripts/backend-settings-collapse.test.mjs scripts/check-build-env.test.mjs scripts/asks-app-regression.test.mjs scripts/test-inventory.test.mjs scripts/conflict-markers.test.mjs scripts/compact-receipt.test.mjs scripts/chat-image-expand.test.mjs scripts/prune-python-seed.test.mjs scripts/mcp-auth-complete-no-retry.test.mjs scripts/panel-presentation.test.mjs scripts/turn-timestamp.test.mjs scripts/analytics-session-table.test.mjs scripts/theme-grid-navigation.test.mjs scripts/theme-registry-exhaustiveness.test.mjs scripts/scheduled-task-model.test.mjs scripts/backend-setting-combos.test.mjs scripts/model-setting-options.test.mjs scripts/searchable-select.test.mjs scripts/backend-settings-drafts.test.mjs scripts/retention-duration.test.mjs scripts/typed-row-call-sites.test.mjs scripts/palette-focus.test.mjs scripts/composer-seeding.test.mjs scripts/skill-invocation.test.mjs scripts/skill-list.test.mjs scripts/skill-highlight.test.mjs scripts/theme-inline.test.mjs scripts/composer-refusal.test.mjs scripts/ci-scope.test.mjs scripts/browser-tab-strip-focus.test.mjs scripts/projects-board-focus.test.mjs scripts/browser-file-transfer-row.test.mjs scripts/link-targets.test.mjs scripts/link-actions.test.mjs scripts/chat-link-affordances.test.mjs scripts/streaming-markdown-parity.test.mjs scripts/transcription-failure-copy.test.mjs scripts/backend-version-drift.test.mjs scripts/live-seed-placement.test.mjs scripts/agents-publication.test.mjs scripts/agent-hub-queries.test.mjs scripts/install-builtin-batch.test.mjs scripts/install-progress.test.mjs scripts/attention-seen.test.mjs scripts/mark-all-read-control.test.mjs scripts/update-global-guard.test.mjs scripts/delivery-gate.test.mjs scripts/canvas-file-freshness.test.mjs scripts/no-websocket-plane.test.mjs scripts/update-window-report.test.mjs scripts/canvas-tab-close.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/webauthn.test.mjs scripts/render-mac-entitlements.test.mjs scripts/row-state-floors.test.mjs scripts/pairing-card-copy.test.mjs scripts/update-install-copy.test.mjs scripts/update-shipit.test.mjs scripts/console-close.test.mjs scripts/console-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-pin-order.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.test.mjs scripts/console-i18n-fit.test.mjs scripts/console-mirror.test.mjs scripts/shell-path.test.mjs scripts/build-env-guard.test.mjs scripts/install-scripts-network.test.mjs scripts/console-pane-render.test.mjs scripts/settings-section-routes.test.mjs scripts/authoring-refresh.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/provider-chip-verdict.test.mjs scripts/child-reader-foot-react.test.mjs scripts/backend-spawn-address.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-sidebar-agents.test.mjs scripts/chat-sidebar-view.test.mjs scripts/chat-sidebar-time-order.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/drafts-clear-on-send.test.mjs scripts/chat-sidebar-drafts.test.mjs scripts/undo-toasts.test.mjs scripts/chat-sidebar-sections.test.mjs scripts/titlebar-options.test.mjs scripts/lane-leading.test.mjs scripts/trace-fold-model.test.mjs scripts/trace-fold-behaviour.test.mjs scripts/chat-status-strip.test.mjs scripts/chat-pane-floors.test.mjs scripts/path-utils.test.mjs scripts/window-chrome.test.mjs scripts/chat-sidebar-scope-paging.test.mjs scripts/chat-sidebar-connection-voices.test.mjs scripts/integration-model.test.mjs scripts/mcp-catalog-parity.test.mjs scripts/mcp-catalog-transport.test.mjs scripts/btw-aside.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-text-authority.test.mjs scripts/shared-composer.test.mjs scripts/analytics-rate-format.test.mjs scripts/provider-catalog.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-status.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/provider-detail-remount.test.mjs scripts/model-select-store.test.mjs scripts/onboarding-step-block.test.mjs scripts/onboarding-default-model.test.mjs scripts/onboarding-i18n-contract.test.mjs scripts/server-release-notes.test.mjs scripts/no-hardlink-write.test.mjs scripts/canvas-goals.test.mjs scripts/overlay-drag-zones.test.mjs scripts/message-surface-floors.test.mjs scripts/media-surface-floors.test.mjs scripts/header-identity-model.test.mjs scripts/pane-slot-ground.test.mjs scripts/projects-tab.test.mjs scripts/agent-hub-org-sharing.test.mjs scripts/agent-hub-public-teams.test.mjs scripts/mesh-tab.test.mjs scripts/peers-catalogue.test.mjs scripts/onboarding-search-step.test.mjs scripts/provider-error-guidance.test.mjs scripts/radient-verify-callout.test.mjs scripts/phone-access-block.test.mjs scripts/sidebar-account-reconnect.test.mjs scripts/stopped-row-measure.test.mjs scripts/aida-rail-marks.test.mjs scripts/aida-sidebar.test.mjs scripts/currency-math.test.mjs scripts/mesh-canvas-bench.test.mjs scripts/agents-offer-dismiss.test.mjs scripts/projects-card-click.test.mjs scripts/lane-registration.test.mjs scripts/team-initials.test.mjs scripts/projects-sheet.test.mjs scripts/turn-collapse-model.test.mjs scripts/collapse-plan-per-pass.test.mjs scripts/turn-collapse-behaviour.test.mjs scripts/checkpoint-model.test.mjs scripts/checkpoint-rail.test.mjs scripts/use-checkpoints.test.mjs scripts/reveal-record.test.mjs scripts/transcript-loader.test.mjs scripts/transcript-deep-jump.test.mjs scripts/thread-search-contract.test.mjs scripts/thread-search-model.test.mjs scripts/thread-search-overlay.test.mjs scripts/use-thread-search.test.mjs scripts/notification-lifetime.test.mjs scripts/transcript-rail-refusal.test.mjs scripts/use-active-checkpoint.test.mjs scripts/held-claim-reach.test.mjs scripts/hold-escape-claim.test.mjs scripts/hotkey-registration.test.mjs scripts/mini-view-dictation.test.mjs scripts/mini-view-contract.test.mjs scripts/ptt-keymap-binding.test.mjs scripts/cross-session-visibility.test.mjs scripts/fold-open.test.mjs scripts/transcript-foot-slot.test.mjs scripts/chat-remote.test.mjs scripts/chat-session-copy-id.test.mjs scripts/header-identity-menu.test.mjs scripts/hub-updates.test.mjs scripts/hub-link-view.test.mjs scripts/hub-links-scene.test.mjs scripts/hub-skills-capability.test.mjs scripts/hub-mutation-safety.test.mjs scripts/monitor-controls.test.mjs scripts/monitor-cancel-dialog.test.mjs scripts/child-transcript-paging.test.mjs scripts/loader-state-machine.test.mjs scripts/transcript-cursor-continuity.test.mjs scripts/older-history-slot.test.mjs scripts/chat-session-subagents.test.mjs scripts/message-actions.test.mjs scripts/update-indicator-segments.test.mjs scripts/reload-picker-close.test.mjs scripts/picker-default-checkbox.test.mjs scripts/projects-time-window.test.mjs scripts/audio-recording-levels.test.mjs scripts/chat-sidebar-row-menu.test.mjs scripts/navigation-gesture.test.mjs scripts/fleet-asks.test.mjs scripts/right-slot-width.test.mjs scripts/right-slot-memory.test.mjs scripts/transcript-fade.test.mjs scripts/agents-config-probe-cadence.test.mjs scripts/turn-segments.test.mjs scripts/turn-partition-predicate.test.mjs scripts/chat-device-model.test.mjs scripts/chat-device-placement.test.mjs scripts/org-teams-summary.test.mjs scripts/markdown-table-widths.test.mjs scripts/turn-answer-rail.test.mjs scripts/scrollbar-activity.test.mjs scripts/stt-mic-gate-session.test.mjs scripts/transcript-perflush-perf.test.mjs scripts/speech-clip.test.mjs scripts/speech-store.test.mjs scripts/speech-controls.test.mjs scripts/speech-selection.test.mjs scripts/speech-user-copy.test.mjs scripts/pre-push-gate.test.mjs scripts/update-rollover.test.mjs scripts/projects-filters.test.mjs scripts/projects-force-done.test.mjs scripts/projects-search.test.mjs scripts/projects-search-index.test.mjs scripts/projects-sort.test.mjs scripts/project-view-perf.test.mjs scripts/projects-request-update.test.mjs scripts/projects-inline-edit.test.mjs scripts/speech-target.test.mjs scripts/agents-composer-mount.test.mjs scripts/evidence-fold.test.mjs scripts/projects-quick-send.test.mjs scripts/palette-main-door.test.mjs scripts/external-open-refusal.test.mjs scripts/window-guards.test.mjs scripts/palette-recents.test.mjs scripts/projects-entry-scroll.test.mjs scripts/wake-controls.test.mjs scripts/wake-cancel-panel.test.mjs scripts/code-review-model.test.mjs scripts/code-review-refresh-cue.test.mjs scripts/radient-credits-guidance.test.mjs scripts/quota-notice.test.mjs scripts/use-ever-in-view.test.mjs scripts/image-actions.test.mjs scripts/image-preview-decode.test.mjs scripts/analytics-channels.test.mjs scripts/i18n/check-strings.test.mjs scripts/i18n/typed-keys.test.mjs scripts/i18n/runtime.test.mjs scripts/i18n/format.test.mjs scripts/supplement-model.test.mjs scripts/supplement-row.test.mjs scripts/supplement-file-actions.test.mjs scripts/preview-signed-urls.test.mjs scripts/language-live-updates.test.mjs scripts/language-dialog.test.mjs scripts/code-review-delayed-flag.test.mjs scripts/audio-meter-stream.test.mjs scripts/keymap-chords.test.mjs scripts/keymap-retention.test.mjs scripts/keymap-registry.test.mjs scripts/keymap-dispatch.test.mjs scripts/keyboard-shortcuts-section.test.mjs scripts/keymap-persistence.test.mjs scripts/transcript-strand-hold.test.mjs scripts/transcript-journal-order.test.mjs scripts/journal-order-query.test.mjs scripts/peer-journal-source.test.mjs scripts/peer-source-unified.test.mjs scripts/i18n/activation.test.mjs scripts/i18n/locale-parity.test.mjs scripts/i18n/locale-reactivity.test.mjs scripts/i18n/ledger-check.test.mjs scripts/i18n/ledger-assemble.test.mjs scripts/streaming-live-markdown.test.mjs scripts/markdown-remend.test.mjs scripts/stream-order-live.test.mjs scripts/browser-toolbar.test.mjs scripts/copy-button-copy-locale.test.mjs scripts/i18n/context-parity.test.mjs scripts/browser-start-page.test.mjs scripts/tooltip-browser-view.test.mjs scripts/resolve-package-union.test.mjs",
94
92
  "check-evidence": "node scripts/check-evidence.mjs",
95
93
  "check-evidence:parity": "node scripts/evidence-histogram-parity.mjs",
96
94
  "check-edit-diffs": "node scripts/check-edit-diffs.mjs",
97
95
  "check-runtime-deps": "node scripts/check-runtime-deps.mjs",
98
96
  "check-fold-keys": "node scripts/check-fold-keys.mjs",
99
- "check-i18n": "node scripts/i18n/generate.mjs --check && node scripts/i18n/check-strings.mjs && node scripts/i18n/ledger-check.mjs",
97
+ "check-i18n": "node scripts/i18n/generate.mjs --check && node scripts/i18n/check-strings.mjs && node scripts/i18n/ledger-check.mjs && node scripts/i18n/context-parity.mjs",
100
98
  "gen-themes": "node scripts/generate-theme-css.mjs",
101
99
  "bundle-size": "node scripts/bundle-size.mjs",
102
100
  "startup-closure": "node scripts/startup-closure.mjs",
@@ -1,6 +0,0 @@
1
- import{r as F,j as e,c as Z}from"./index-DF_hRerL.js";import{i as he,a as xe}from"./publication-validation-B4k6VAFZ.js";import{C as ie,u as K,B as C,aH as O,aG as Y,aI as B,aJ as re,aK as oe,aL as ge,$ as je,aM as fe,aN as ee,aF as pe,aO as ye,aP as ve}from"./conversation-input-sync-BX8IVirL.js";import{c as we,L as be,T as te,B as o,S as I,h as le,i as M,j as z,k as w,X as Ce,l as b,A as se,m as ae,n as ne}from"./error-boundary-BDLNfQKz.js";import{f as W,h as Ne,u as Ae,i as ke,a as Se,b as De,c as Ee,O as Fe,H as Te,A as _e}from"./use-download-agent-mutation-DGGt-uXR.js";import{b as Pe,c as qe,u as Le,d as Me,g as ze,e as Ie,f as Ke}from"./use-memberships-query-BMGVy3RO.js";import{S as Oe,a as Be,A as Qe,b as Ue,c as Re}from"./index-CnQsclLj.js";import"./messages-Yrm2FT2V.js";import"./en-US-BcB1DWxG.js";import"./book-open-BEOtYKZe.js";import"./console-mirror-DpL-JwpC.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 $e=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],He=we("message-circle",$e),T={all:["agent-comments"],list:t=>[...T.all,"list",t]},We=({agentId:t,enabled:r=!0})=>ie({queryKey:T.list(t||"invalid"),queryFn:async()=>{if(!t)throw new Error("Agent ID is required to fetch comments.");return(await Pe(t)).result},enabled:!!t&&r,staleTime:2*60*1e3,gcTime:5*60*1e3,refetchOnWindowFocus:!0}),Ye=()=>{const t=K(),{isAuthenticated:r}=C();return O({mutationFn:async a=>{const{agentId:i,data:s}=a;if(!r)throw new Error("Authentication required.");return qe(i,s)},onSuccess:(a,i)=>{t.invalidateQueries({queryKey:T.list(i.agentId)}),B("Comment posted")},onError:a=>{Y(`Failed to post comment: ${a.message}`)}})},Ge=()=>{const t=K(),{isAuthenticated:r}=C();return O({mutationFn:async a=>{const{agentId:i,commentId:s,data:l}=a;if(!r)throw new Error("Authentication required.");return Le(i,s,l)},onSuccess:(a,i)=>{t.invalidateQueries({queryKey:T.list(i.agentId)}),B("Comment updated")},onError:a=>{Y(`Failed to update comment: ${a.message}`)}})},Je=()=>{const t=K(),{isAuthenticated:r}=C();return O({mutationFn:async a=>{const{agentId:i,commentId:s}=a;if(!r)throw new Error("Authentication required.");return Me(i,s)},onSuccess:(a,i)=>{t.invalidateQueries({queryKey:T.list(i.agentId)}),B("Comment deleted")},onError:a=>{Y(`Failed to delete comment: ${a.message}`)}})},Ve=({agentId:t})=>{const{isAuthenticated:r,user:a}=C(),[i,s]=F.useState(""),[l,f]=F.useState(null),[h,N]=F.useState(""),{data:d,isLoading:p,error:A}=We({agentId:t}),_=d?.records??[],x=Ye(),k=Ge(),Q=Je(),S=async n=>{if(n.preventDefault(),!(!i.trim()||!r||!t))try{await x.mutateAsync({agentId:t,data:{text:i}}),s("")}catch(c){console.error("Submit comment error caught in component:",c)}},U=(n,c)=>{f(n),N(c)},m=()=>{f(null),N("")},y=async()=>{if(!(!l||!h.trim()||!r||!t))try{await k.mutateAsync({agentId:t,commentId:l,data:{text:h}}),m()}catch(n){console.error("Update comment error caught in component:",n)}},v=async n=>{if(!(!r||!t)&&window.confirm("Are you sure you want to delete this comment?"))try{await Q.mutateAsync({agentId:t,commentId:n})}catch(c){console.error("Delete comment error caught in component:",c)}},R=n=>r&&a?.radientUser?.account?.id===n.account_id;return e.jsxs("div",{className:"mt-6",children:[e.jsx("h2",{className:"mb-4 font-semibold text-heading text-ink",children:"Comments"}),r?e.jsxs("div",{className:"mb-4 flex flex-col gap-1.5",children:[e.jsxs(be,{htmlFor:"new-comment",children:[e.jsx(He,{size:14,"aria-hidden":"true"}),"Leave a comment"]}),e.jsxs("form",{onSubmit:S,className:"flex flex-col gap-3",children:[e.jsx(te,{id:"new-comment",placeholder:"Share your thoughts...",rows:3,value:i,onChange:n=>s(n.target.value),required:!0}),e.jsx(o,{type:"submit",variant:"primary",disabled:x.isPending||!i.trim(),className:"self-end",children:x.isPending?e.jsx(I,{size:"sm",label:"Posting comment"}):"Post comment"})]})]}):e.jsx("p",{className:"mt-6 mb-4 text-body-sm text-ink-muted",children:"Sign in to leave comments."}),e.jsx(le,{className:"my-6"}),p&&e.jsx("ul",{className:"flex flex-col",children:[...Array(3)].map((n,c)=>e.jsxs("li",{className:"flex gap-3 pb-6",children:[e.jsx(M,{children:e.jsx(z,{children:e.jsx(w,{className:"size-full"})})}),e.jsxs("div",{className:"flex w-full flex-col gap-1.5",children:[e.jsx(w,{className:"h-3.5 w-24"}),e.jsx(w,{className:"h-3 w-15"}),e.jsx(w,{className:"mt-2 h-3.5 w-full"}),e.jsx(w,{className:"h-3.5 w-4/5"})]})]},`skeleton-${c}`))}),A&&e.jsxs("p",{role:"alert",className:"my-6 text-body-sm text-danger",children:["Failed to load comments: ",A.message]}),!p&&!A&&e.jsx("ul",{className:"flex flex-col gap-6",children:_.length===0?e.jsx("li",{className:"text-body-sm text-ink-muted",children:"No comments yet. Yours would be the first."}):_.map(n=>l===n.id?e.jsxs("li",{className:"flex gap-3",children:[e.jsx(M,{children:e.jsx(z,{children:n.account_metadata?.name?.charAt(0).toUpperCase()||"?"})}),e.jsxs("div",{className:"flex w-full flex-col gap-2",children:[e.jsx(te,{rows:3,value:h,onChange:c=>N(c.target.value),autoFocus:!0,"aria-label":"Edit comment"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(o,{variant:"secondary",size:"sm",onClick:m,children:[e.jsx(Ce,{}),"Cancel"]}),e.jsxs(o,{variant:"primary",size:"sm",onClick:y,disabled:k.isPending||!h.trim(),children:[k.isPending?e.jsx(I,{size:"xs",label:"Saving comment"}):e.jsx(Oe,{}),"Save"]})]})]})]},n.id):e.jsxs("li",{className:"flex gap-3",children:[e.jsx(M,{children:e.jsx(z,{children:n.account_metadata?.name?.charAt(0).toUpperCase()||"?"})}),e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-body text-ink",children:n.account_metadata?.name||"Anonymous"}),e.jsxs("p",{className:"text-ink-muted text-meta",children:[W(new Date(n.created_at))," ","ago"]})]}),R(n)&&e.jsxs("div",{className:"flex gap-0.5",children:[e.jsx(b,{content:"Edit comment",children:e.jsx(o,{variant:"ghost",size:"icon-sm",onClick:()=>U(n.id,n.text),disabled:!!l,"aria-label":"Edit comment",children:e.jsx(Be,{})})}),e.jsx(b,{content:"Delete comment",children:e.jsx(o,{variant:"ghost",size:"icon-sm",onClick:()=>v(n.id),disabled:!!l,"aria-label":"Delete comment",children:e.jsx(re,{})})})]})]}),e.jsx("p",{className:"mt-2 text-body-sm text-ink whitespace-pre-wrap",children:n.text})]})]},n.id))})]})},G={all:["agent-details"],detail:t=>[...G.all,t]},Xe=({agentId:t,enabled:r=!0})=>ie({queryKey:G.detail(t||"invalid"),queryFn:async()=>{if(!t)throw new Error("Agent ID is required to fetch details.");return await ze(t)},select:i=>i.result,enabled:!!t&&r,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1}),Ze=()=>{const t=K(),r=oe(),{isAuthenticated:a}=C();return O({mutationFn:async({agentId:s})=>{if(!a)throw new Error("Authentication required to delist an agent.");if(!s)throw new Error("Agent ID is required to delist.");return Ie(s)},onSuccess:(s,l)=>{B("Agent delisted"),t.invalidateQueries({queryKey:G.detail(l.agentId)}),he(t),r("/agent-hub")},onError:s=>{console.error("Delist agent error:",s)}})},et={like:"The like did not go through",favourite:"The favourite did not go through",download:"The download did not start",delist:"The agent was not delisted"},H=({children:t})=>e.jsx("span",{className:"inline-flex h-4 min-w-5 items-center text-meta text-ink-muted",children:t}),ut=()=>{const{agentId:t}=ge(),r=oe(),{isAuthenticated:a,user:i}=C(),{data:s,isLoading:l,isFetching:f,error:h,refetch:N}=Xe({agentId:t??"",enabled:!!t}),d=s?.visibility==="org",p=s?Ne(s.name):"",{memberships:A}=Ke({enabled:d}),_=d?A.find(ue=>ue.tenant_id===s?.tenant_id)?.tenant_name??null:null,{statuses:x,isKnown:k,isError:Q,isFetching:S,refetch:U}=Ae({agentIds:t&&!d?[t]:[]}),m=ke(k,x,t),y=m&&x[t??""]?.liked===!0,v=m&&x[t??""]?.favourited===!0,R=s?.like_count??0,n=s?.favourite_count??0,c=s?.download_count??0,P=Se(),q=De(),D=Ee(),g=Ze(),[ce,L]=F.useState(!1),[j,u]=F.useState(null),$=!!i&&!!s&&i.radientUser?.account?.id===s.account_id,J=()=>{!t||!a||P.isPending||(u(null),P.mutate({agentId:t,isCurrentlyLiked:y},{onError:()=>u("like")}))},V=()=>{!t||!a||q.isPending||(u(null),q.mutate({agentId:t,isCurrentlyFavourited:v},{onError:()=>u("favourite")}))},X=()=>{!t||!s||D.isPending||(u(null),D.mutate({agentId:s.id,agentName:s.name},{onError:()=>u("download")}))},de=()=>{!t||!$||g.isPending||(u(null),g.mutate({agentId:t},{onError:()=>u("delist")}),L(!1))},E=j?j==="like"?{action:"like",error:P.error,retry:J}:j==="favourite"?{action:"favourite",error:q.error,retry:V}:j==="download"?{action:"download",error:D.error,retry:X}:{action:"delist",error:g.error,retry:void 0}:null,me=()=>{r("/agent-hub")};return l?e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx(I,{label:"Loading agent details"})}):h?e.jsx("div",{className:"flex h-full items-center justify-center p-6",children:e.jsxs(se,{variant:"danger",className:"max-w-2xl",children:[e.jsx(ae,{children:"This agent could not be loaded"}),e.jsx(ne,{children:je("The Radient agent catalogue did not answer.",h)}),e.jsx("div",{className:"mt-2",children:e.jsx(o,{variant:"outline",size:"sm",onClick:()=>void N(),disabled:f,"aria-busy":f,children:f?"Trying…":"Try again"})})]})}):s?e.jsxs("div",{className:"m-6 flex flex-1 flex-col rounded-md bg-surface p-8",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[e.jsx(o,{variant:"ghost",size:"icon",onClick:me,"aria-label":"Back to Agent hub",children:e.jsx(Qe,{})}),e.jsx(M,{className:"size-11 shrink-0",children:e.jsx(z,{children:e.jsx(Ue,{size:22,"aria-hidden":"true"})})}),e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsx("h1",{className:"truncate text-display text-ink",children:p}),d&&e.jsx(Fe,{orgName:_})]})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[!d&&e.jsxs(e.Fragment,{children:[e.jsx(b,{content:"Sign in to Radient to use this feature",disabled:a,children:e.jsx("span",{children:e.jsxs(o,{variant:"ghost",size:"sm",onClick:J,disabled:!a||P.isPending||!m,"aria-label":m?y?"Unlike agent":"Like agent":"Like state unavailable",className:Z(y&&"text-danger"),children:[e.jsx(Te,{fill:y?"currentColor":"none"}),e.jsx(H,{children:R})]})})}),e.jsx(b,{content:"Sign in to Radient to use this feature",disabled:a,children:e.jsx("span",{children:e.jsxs(o,{variant:"ghost",size:"sm",onClick:V,disabled:!a||q.isPending||!m,"aria-label":m?v?"Unfavourite agent":"Favourite agent":"Favourite state unavailable",className:Z(v&&"text-warning"),children:[e.jsx(Re,{fill:v?"currentColor":"none"}),e.jsx(H,{children:n})]})})})]}),e.jsx(b,{content:"Download agent to your computer",children:e.jsx("span",{children:e.jsxs(o,{variant:"ghost",size:"icon",onClick:X,disabled:D.isPending,"aria-label":"Download agent",className:"ml-1",children:[e.jsx(fe,{}),e.jsx(H,{children:D.isPending?e.jsx(w,{className:"h-3.5 w-5"}):c})]})})}),$&&!d&&e.jsx(b,{content:"Permanently delist this agent from Agent hub",children:e.jsx("span",{children:e.jsx(o,{variant:"ghost",size:"icon",onClick:()=>L(!0),disabled:g.isPending,"aria-label":"Delist agent",className:"ml-1 text-danger hover:bg-danger-wash hover:text-danger",children:e.jsx(re,{})})})})]})]}),a&&Q&&!j&&!d&&e.jsxs("output",{className:"mb-6 flex flex-wrap items-center gap-2 text-meta text-warning","data-testid":"agent-details-status-unknown",children:[e.jsx("span",{children:"Your likes and favourites could not be read, so this agent's viewer state is not shown."}),e.jsx(o,{variant:"ghost",size:"sm",onClick:()=>void U(),disabled:S,"aria-busy":S,children:S?"Trying…":"Try again"})]}),E&&j&&e.jsxs(se,{variant:"danger",className:"mb-6","data-testid":"agent-details-error",children:[e.jsx(ae,{children:et[j]}),e.jsx(ne,{children:xe(E.action,E.error,p)}),E.retry&&e.jsx("div",{className:"mt-2",children:e.jsx(o,{variant:"outline",size:"sm",onClick:E.retry,children:"Try again"})})]}),e.jsx(_e,{tags:s.tags,categories:s.categories}),e.jsxs("div",{className:"mt-4 mb-6 flex flex-col gap-2 text-body-sm text-ink-muted",children:[e.jsxs("p",{children:["Created by: ",s.account_metadata?.name??"Unknown",s.account_metadata?.email?` (${s.account_metadata.email})`:""]}),e.jsxs("p",{children:["Created: ",W(new Date(s.created_at))," ago (",ee(s.created_at),")"]}),e.jsxs("p",{children:["Last modified: ",W(new Date(s.updated_at))," ","ago (",ee(s.updated_at),")"]})]}),e.jsx("div",{className:"mt-2 mb-8 leading-relaxed text-body text-ink",children:s.description||"No description provided."}),e.jsx(le,{className:"my-6"}),!d&&e.jsx(Ve,{agentId:s.id}),e.jsx(pe,{open:ce,onClose:()=>L(!1),title:"Delist this agent?",maxWidth:"xs",actions:e.jsxs(e.Fragment,{children:[e.jsx(ye,{onClick:()=>L(!1),children:"Cancel"}),e.jsx(ve,{onClick:()=>{!t||!$||g.isPending||de()},disabled:g.isPending,children:g.isPending?e.jsx(I,{size:"sm",label:"Delisting agent"}):"Delist"})]}),dialogProps:{"aria-describedby":"delist-dialog-description"},children:e.jsxs("div",{id:"delist-dialog-description",className:"text-body text-ink-muted",children:['This takes "',p,'" off the hub straight away, and nobody will be able to download it. You can upload it again later.']})})]}):e.jsx("div",{className:"flex h-full items-center justify-center",children:e.jsx("p",{className:"text-body text-ink",children:"Agent not found."})})};export{ut as AgentDetailsPage};
@@ -1,11 +0,0 @@
1
- import{r as c,j as e,c as D}from"./index-DF_hRerL.js";import{aK as cs,B as _e,aM as Ve,bB as Ys,A as os,C as Z,ah as Q,u as ae,a as Ce,D as Re,c as me,aH as Ae,d as Ie,bC as We,Z as Ee,bD as Gs,aI as Js,bE as Zs,a0 as ds,$ as $e,aQ as us,bF as ce,bG as Xs,bz as et,bH as st,aU as tt,bI as at}from"./conversation-input-sync-BX8IVirL.js";import{P as nt}from"./page-header-BR-fmx4f.js";import{c as ms,l as J,B as C,k as _,x as it,I as te,T as hs,A as X,m as ee,n as se,W as lt,Y as rt,Z as ct,_ as ot,z as Ye,F as Ge,G as Je,H as Ze,J as Xe}from"./error-boundary-BDLNfQKz.js";import{t as h}from"./messages-Yrm2FT2V.js";import{a as dt,p as xs,P as gs,u as ut}from"./publication-validation-B4k6VAFZ.js";import{h as Y,O as mt,A as ht,f as xt,H as gt,a as bt,b as pt,c as ft,d as bs,C as jt,e as kt,n as yt,u as vt,i as Nt}from"./use-download-agent-mutation-DGGt-uXR.js";import{c as wt,aD as St,aC as Pt,ay as we,ao as Tt,ai as ps,aE as _t}from"./index-CnQsclLj.js";import{n as Se,i as Ct,H as fs,p as es,o as js,u as Rt}from"./org-access-CyjYN726.js";import{p as ks,r as ys,P as vs,h as At,i as It,j as Et,f as $t}from"./use-memberships-query-BMGVy3RO.js";import{R as Ns}from"./radient-auth-buttons-BW_zi2lF.js";import{f as Ft}from"./format-CZUObkkr.js";import{o as Ot,a as ss}from"./org-surface-gate-i_SGPHN5.js";import"./en-US-BcB1DWxG.js";import"./book-open-BEOtYKZe.js";import"./console-mirror-DpL-JwpC.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 Lt=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],zt=ms("building-2",Lt);/**
7
- * @license lucide-react v0.507.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const Mt=[["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"}]],Dt=ms("circle-ellipsis",Mt),qt=({agent:s,isLiked:t,isFavourited:n,onLikeToggle:a,onFavouriteToggle:i,onDownload:o,isLikeActionLoading:u=!1,isFavouriteActionLoading:w=!1,isDownloading:y=!1,actionError:j=null,onRetryAction:N,showActions:x=!0,viewerStateKnown:f=!0,orgName:g=null})=>{const S=cs(),{isAuthenticated:d}=_e(),T=s.description??"",[R,k]=c.useState(!1),b=c.useRef(null),P=c.useCallback(L=>{if(b.current?.disconnect(),b.current=null,!L)return;const $=()=>k(L.scrollHeight-L.clientHeight>1);$();const q=new ResizeObserver($);q.observe(L),b.current=q},[]),I=d?f?t?"Unlike agent":"Like agent":"Your likes could not be read, so this is not shown as unliked.":"Log in to Radient to like agents",A=d?f?n?"Unfavourite agent":"Favourite agent":"Your favourites could not be read, so this is not shown as unfavourited.":"Log in to Radient to favourite agents",m=f?t?"Unlike agent":"Like agent":"Like state unavailable",E=f?n?"Unfavourite agent":"Favourite agent":"Favourite state unavailable",l=s.visibility==="org",p=Y(s.name);return e.jsxs("div",{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:()=>S(`/agent-hub/${s.id}`),className:"flex min-h-0 flex-1 cursor-pointer flex-col gap-2 p-4 text-left","aria-label":`View details for ${p}`,children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:p}),l&&e.jsx(mt,{orgName:g}),e.jsx(J,{content:R?T:"",children:e.jsx("span",{ref:P,className:"line-clamp-3 min-h-0 text-body-sm text-ink-muted",children:T})}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsx(ht,{tags:s.tags,categories:s.categories}),e.jsxs("p",{className:"truncate text-ink-dim text-meta",children:[s.account_metadata?.name??"Unknown author",e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),"updated ",xt(new Date(s.updated_at))," ago"]})]})]}),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":l?"org":d?f?"known":"unknown":"signed-out",children:[!l&&e.jsxs(e.Fragment,{children:[e.jsx(J,{content:I,children:e.jsx("span",{children:e.jsxs(C,{variant:"ghost",size:"sm",onClick:d&&f?()=>a(s.id):void 0,disabled:u||!d||!f,"aria-label":m,className:D(t&&"text-danger"),children:[e.jsx(gt,{fill:t?"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:s.like_count??0})]})})}),e.jsx(J,{content:A,children:e.jsx("span",{children:e.jsxs(C,{variant:"ghost",size:"sm",onClick:d?()=>i(s.id):void 0,disabled:w||!d||!f,"aria-label":E,className:D(n&&"text-warning"),children:[e.jsx(wt,{fill:n?"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:s.favourite_count??0})]})})})]}),e.jsx(J,{content:"Downloads",children:e.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 pr-1 text-ink-dim",children:[e.jsx(Ve,{"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:y?e.jsx(_,{className:"h-3 w-6"}):(s.download_count??0).toLocaleString()})]})})]}),x&&o&&e.jsx("div",{className:"ml-auto flex shrink-0 items-center",children:e.jsxs(C,{variant:"secondary",size:"sm",onClick:()=>o(s),disabled:y,"aria-label":`Download ${p}`,"data-tour-tag":"agent-hub-download-button",children:[e.jsx(Ve,{"data-testid":"agent-download"}),"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}),N&&e.jsx(C,{variant:"ghost",size:"sm",onClick:N,children:"Try again"})]})]})},Ut=({agent:s,status:t,viewerStateKnown:n=!0,orgName:a=null})=>{const{isAuthenticated:i}=_e(),[o,u]=c.useState(null),w=t?.liked??!1,y=t?.favourited??!1,j=bt(),N=pt(),x=ft(),f=()=>{!i||j.isPending||(u(null),j.mutate({agentId:s.id,isCurrentlyLiked:w},{onError:()=>u("like")}))},g=()=>{!i||N.isPending||(u(null),N.mutate({agentId:s.id,isCurrentlyFavourited:y},{onError:()=>u("favourite")}))},S=()=>{x.isPending||(u(null),x.mutate({agentId:s.id,agentName:s.name},{onError:()=>u("download")}))},d=o?o==="like"?{action:"like",error:j.error,retry:f}:o==="favourite"?{action:"favourite",error:N.error,retry:g}:{action:"download",error:x.error,retry:S}:null;return e.jsx(qt,{agent:s,isLiked:i&&w,isFavourited:i&&y,onLikeToggle:f,onFavouriteToggle:g,onDownload:S,isLikeActionLoading:j.isPending,isFavouriteActionLoading:N.isPending,isDownloading:x.isPending,viewerStateKnown:n,orgName:a,actionError:d?dt(d.action,d.error,Y(s.name)):null,onRetryAction:d?.retry})},ts=({selected:s,onClick:t,children:n,...a})=>e.jsx("button",{type:"button",onClick:t,"aria-pressed":s,className:D("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",s?Pt:"text-ink hover:bg-row-hover"),...a,children:n}),as=Object.keys(jt),Bt=s=>[...s].sort((t,n)=>{const a=as.indexOf(t),i=as.indexOf(n);return a!==-1&&i!==-1?a-i:a!==-1?-1:i!==-1?1:t.localeCompare(n)}),Ht=({selectedCategory:s,onSelectCategory:t,categories:n})=>{const a=Bt(s&&!n.includes(s)?[...n,s]:n);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:"Categories"}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs(ts,{selected:s===null,onClick:()=>t(null),"data-testid":"category-all",children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e.jsx(St,{size:16,"aria-hidden":"true"})}),"All categories"]}),a.map(i=>{const o=bs(i),u=i==="other"?e.jsx(Dt,{size:16}):o.icon;return e.jsxs(ts,{selected:s===i,onClick:()=>t(i),"data-testid":`category-${i}`,children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:u}),o.label]},i)})]})]})},Fe=({page:s,count:t,onChange:n,ariaLabel:a="Agent pages"})=>{const i=c.useRef(null),o=c.useRef(null),u=c.useRef(null);return c.useEffect(()=>{const w=u.current;u.current=null,w==="previous"&&i.current?.focus(),w==="next"&&o.current?.focus()},[s]),t<=1?null:e.jsxs("nav",{"aria-label":a,className:"mt-6 flex min-h-13 items-center justify-between gap-3 border-t border-hairline","data-testid":"agent-hub-pager",children:[e.jsxs("span",{className:"select-none text-meta text-ink-dim",children:["Page ",s," of ",t]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(C,{variant:"secondary",size:"sm",ref:i,onClick:()=>{s-1<=1&&(u.current="next"),n(s-1)},disabled:s<=1,"aria-label":"Previous page",children:[e.jsx(Ys,{"aria-hidden":"true"}),"Previous"]}),e.jsxs(C,{variant:"secondary",size:"sm",ref:o,onClick:()=>{s+1>=t&&(u.current="previous"),n(s+1)},disabled:s>=t,"aria-label":"Next page",children:["Next",e.jsx(it,{"aria-hidden":"true"})]})]})]})},ns=s=>s?.skills===1&&s.revision_cas===1;function Qt(s,t=1,n=20){const a=new URL(ks(s,"skills"));return a.searchParams.set("page",String(t)),a.searchParams.set("per_page",String(n)),ys(a.toString())}function Kt(s,t){return ys(ks(s,"skills",t))}function Vt(s){return os({operation:"org_skills.list",tenantId:s})}function Wt(s,t){return os({operation:"org_skill.get",tenantId:s,skillId:t})}const ws=12,oe={all:["public-teams"],list:(s,t)=>[...oe.all,"list",{page:s,perPage:t}],detail:s=>[...oe.all,"detail",s]},he=(s,t)=>t instanceof vs?t.status===null?!1:t.status>=500&&s<1:s<1,Yt=({page:s=1,perPage:t=ws,enabled:n=!0}={})=>{const a=Z({queryKey:oe.list(s,t),queryFn:()=>At(Q.radientBaseUrl,s,t),select:i=>i.result,enabled:n,retry:he,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,placeholderData:i=>i});return{...a,teams:a.data?.records??[],isRefreshing:a.isFetching&&a.data!==void 0,pagination:a.data?{page:a.data.page,perPage:a.data.per_page,totalPages:a.data.total_pages,totalRecords:a.data.total_records}:void 0}},Gt=({teamId:s,enabled:t=!0})=>{const n=Z({queryKey:oe.detail(s??""),queryFn:()=>It(Q.radientBaseUrl,s),select:a=>a.result,enabled:t&&!!s,retry:he,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1});return{...n,team:n.data}};function xe(s){if(s.getQueryState(We.capabilities)?.status!=="success"||!me(s.getQueryData(We.capabilities),"hub_skills"))throw new Error("This backend does not support the complete Hub Skills adapter.")}function Jt(s,t,n){const a=ae(),i=Ce();return Z({queryKey:["hub-skills",Q.radientBaseUrl,s.visibility,s.tenantId,t],enabled:n&&!i.isError&&me(i.data,"hub_skills"),queryFn:async()=>{if(xe(a),s.visibility==="org"){const u=(await Vt(s.tenantId)).result;return{rows:u.skills,pages:1,contract:u.sync_contract}}const o=(await Qt(Q.radientBaseUrl,t,20)).result;return{rows:o.records,pages:o.total_pages,contract:o.sync_contract}},staleTime:3e4,retry:s.visibility==="org"?Re:he,retryOnMount:!1,refetchOnWindowFocus:!1})}function Zt(s,t,n){const a=ae(),i=Ce();return Z({queryKey:["hub-skill",Q.radientBaseUrl,s.visibility,s.tenantId,t],enabled:n&&t!==null&&!i.isError&&me(i.data,"hub_skills"),queryFn:async()=>(xe(a),(s.visibility==="org"?await Wt(s.tenantId,t):await Kt(Q.radientBaseUrl,t)).result),staleTime:3e4,retry:s.visibility==="org"?Re:he,retryOnMount:!1})}function Xt(){const s=ae();return Ae({mutationFn:t=>(xe(s),Ie({op:"hub.skillPull",requestId:t.requestId,hubId:t.remoteId,hubSource:Q.radientBaseUrl,visibility:t.scope.visibility,tenantId:t.scope.tenantId,localAlias:t.alias,subscribe:t.subscribe,autoPush:t.autoPush,confirmPublicEgress:t.consent})),onSuccess:t=>{s.setQueryData(we,t.links)},onSettled:()=>{s.invalidateQueries({queryKey:we}),s.invalidateQueries({queryKey:["desktop","skills"]})}})}function ea(){const s=ae();return Ae({mutationFn:t=>(xe(s),Ie({op:"hub.skillPublish",requestId:t.requestId,...t.draft,dryRun:t.previewReceipt===void 0,...t.previewReceipt?{previewReceipt:t.previewReceipt,confirmPublish:!0}:{}})),onSuccess:t=>{t.local_link_receipt?.state==="complete"&&(s.invalidateQueries({queryKey:we}),s.invalidateQueries({queryKey:["desktop","skills"]}),s.invalidateQueries({queryKey:["hub-skills"]}))}})}function sa({scope:s,source:t,verifiedCas:n,enabled:a=!0}){Ee();const i=c.useId(),[o,u]=c.useState(""),[w,y]=c.useState(""),[j,N]=c.useState(Se),[x,f]=c.useState(null),[g,S]=c.useState(!1),d=ea(),T=c.useRef(null),R=Z({queryKey:["desktop","skills","hub-publication"],queryFn:()=>Ie({op:"skills.list"}),staleTime:3e4,retry:!1}),k=`${s.visibility}:${s.tenantId??""}`,b=c.useRef(k);c.useEffect(()=>{b.current!==k&&(b.current=k,N(m=>({...m,autoPush:!1,confirmPublicEgress:!1})),f(null),S(!0))},[k]);const P={sourceSkill:o,localAlias:w,visibility:s.visibility,tenantId:s.tenantId,...j},I=x?Ct(x,P):!1;c.useEffect(()=>{if(!x)return;const m=setTimeout(()=>{f(null),S(!0)},Math.max(0,Math.min(Date.parse(x.expires_at)-Date.now(),2147483647)));return()=>clearTimeout(m)},[x]);const A=m=>{if(!a||d.isPending||!o||!w||m&&!I)return;const E=JSON.stringify({draft:P,receipt:m?x?.preview_receipt:null}),l=T.current&&T.current.tuple===E&&(m||d.error)?T.current:{tuple:E,id:crypto.randomUUID()};T.current=l,m||(f(null),S(!1)),d.mutate({requestId:l.id,draft:P,...m&&x?{previewReceipt:x.preview_receipt}:{}},{onSuccess:p=>{p.preview?(f(p.preview),S(!1)):es(p)&&f(null)}})};return e.jsxs("section",{className:"flex min-w-0 flex-col gap-4","data-hub-skill-publication":!0,children:[e.jsx("h3",{className:"text-heading text-ink",children:h("ui.hub.skills.publish_title")}),e.jsx("label",{htmlFor:`${i}-source`,className:"text-body-sm text-ink",children:h("ui.hub.skills.select_authored")}),e.jsxs("select",{id:`${i}-source`,"data-testid":"hub-skill-publish-source",value:o,disabled:d.isPending||!a,className:"rounded-md border border-control bg-surface px-3 py-2 text-body-sm text-ink",onChange:m=>{u(m.target.value),y(m.target.value),f(null),N(E=>({...E,autoPush:!1,confirmPublicEgress:!1}))},children:[e.jsx("option",{value:"",children:h("ui.hub.skills.select_authored")}),R.data?.data.skills.map(m=>e.jsx("option",{value:m.name,children:m.name},m.name))]}),e.jsx("label",{htmlFor:`${i}-alias`,className:"text-body-sm text-ink",children:h("ui.hub.subscriptions.alias")}),e.jsx(te,{id:`${i}-alias`,"data-testid":"hub-skill-publish-alias",value:w,disabled:d.isPending||!a,onChange:m=>{y(m.target.value),N(E=>({...E,autoPush:!1,confirmPublicEgress:!1}))}}),e.jsx("p",{className:"text-meta text-ink-muted",children:h("ui.hub.skills.text_limits")}),e.jsx(fs,{value:j,onChange:N,source:t,item:o||w,visibility:s.visibility,organization:s.organization,destinationKey:`${k}:${o}`,canEnableAutoPush:n,disabled:d.isPending||!a}),R.isLoading&&e.jsx("output",{className:"text-meta text-ink-muted",children:h("ui.hub.skills.loading")}),R.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:h("ui.hub.status.other_error")}),d.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:h("ui.hub.links.action_failed",{direction:h("ui.hub.links.direction_push"),item:o||w,source:t})}),(g||x&&!I&&x.can_confirm)&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:h("ui.hub.links.preview_changed")}),x&&x.visibility===s.visibility&&x.tenant_id===s.tenantId&&e.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[e.jsx("h4",{className:"text-body-sm text-ink",children:h("ui.hub.links.preview_payload",{source:t})}),e.jsx(hs,{readOnly:!0,rows:12,"aria-label":h("ui.hub.links.preview_payload",{source:t}),value:JSON.stringify(x.proposal.fields,null,2),className:"max-h-96 bg-sunken text-mono-sm"}),x.warnings.map((m,E)=>e.jsx("p",{className:"break-words text-body-sm text-warning",children:m},`${E}-${m}`)),x.reason&&e.jsx("p",{className:"text-body-sm text-warning",children:Tt(x.reason)})]}),d.data?.publication===null&&d.data.local_link_receipt?.state==="pending-reconciliation"&&e.jsx("output",{className:"text-body-sm text-warning","data-testid":"hub-skill-pending-reconcile",children:h("ui.hub.links.publication_pending")}),d.data?.publication&&e.jsx("output",{className:"text-body-sm text-ink","data-testid":"hub-skill-published",children:es(d.data)?h("ui.hub.links.published",{item:d.data.link?.name??w,source:d.data.link?ps(d.data.link):t}):h("ui.hub.skills.policy_pending")}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(C,{variant:"outline","data-testid":"hub-skill-publish-preview",disabled:!a||d.isPending||!o||!w,onClick:()=>A(!1),children:h("ui.hub.subscriptions.preview_publish")}),e.jsx(C,{"data-testid":"hub-skill-publish-confirm",disabled:!a||d.isPending||!I,onClick:()=>A(!0),children:h("ui.hub.links.confirm_publish")})]})]})}function ta({scope:s,signedIn:t,accessible:n=!0}){Ee();const a=c.useId(),[i,o]=c.useState(1),[u,w]=c.useState(""),[y,j]=c.useState(null),[N,x]=c.useState(""),[f,g]=c.useState(Se),S=c.useRef(null),d=s.visibility==="public"?h("ui.hub.links.source_public"):s.organization?h("ui.hub.links.source_private",{organization:s.organization}):h("ui.hub.links.source_unavailable"),T=Jt(s,i,n&&(s.visibility==="public"||t)),R=ns(T.data?.contract),k=Zt(s,y,R&&n),b=Xt(),P=b.data?.link?.link_id,I=k.data?.visibility===s.visibility&&(s.visibility==="public"?!k.data.tenant_id:k.data.tenant_id===s.tenantId),A=n&&!k.error&&!T.error&&I&&ns(k.data?.sync_contract)&&!!k.data?.revision,m=(T.data?.rows??[]).filter(l=>`${l.name} ${l.description}`.toLocaleLowerCase().includes(u.toLocaleLowerCase())),E=()=>{if(!y||!A||!N||b.isPending||!t)return;const l=JSON.stringify({selected:y,scope:s,alias:N,policy:f});S.current?.tuple!==l&&(S.current={tuple:l,id:crypto.randomUUID()}),b.mutate({requestId:S.current.id,remoteId:y,scope:s,alias:N,subscribe:f.subscribe,autoPush:f.autoPush,consent:f.confirmPublicEgress})};return e.jsxs("section",{className:"flex min-w-0 flex-col gap-5","data-hub-skills-library":!0,children:[e.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("h2",{className:"text-heading text-ink",children:h("ui.hub.skills.title")}),e.jsx("span",{className:"text-meta text-ink-muted","data-testid":"hub-skill-source",children:d})]}),s.visibility==="org"&&!t?e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:h("ui.hub.status.no_credential")}):e.jsxs(e.Fragment,{children:[e.jsx("label",{className:"sr-only",htmlFor:`${a}-search`,children:h("ui.hub.skills.search")}),e.jsx(te,{id:`${a}-search`,"data-testid":"hub-skill-search",value:u,placeholder:h("ui.hub.skills.search"),onChange:l=>w(l.target.value)}),e.jsx("p",{className:"text-meta text-ink-muted",children:h("ui.hub.skills.search_loaded")}),T.isLoading&&e.jsx("output",{className:"min-h-20 text-body-sm text-ink-muted",children:h("ui.hub.skills.loading")}),T.error&&e.jsxs("div",{role:"alert",className:"flex flex-col gap-2 text-body-sm text-warning",children:[e.jsx("p",{children:h("ui.hub.skills.catalogue_failed",{source:d})}),e.jsx(C,{variant:"outline",disabled:T.isFetching,onClick:()=>void T.refetch(),children:h("ui.hub.links.retry")})]}),T.isSuccess&&!R&&e.jsx("p",{className:"text-body-sm text-warning",children:h("ui.hub.skills.unavailable")}),R&&e.jsxs(e.Fragment,{children:[m.length===0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:h(u?"ui.hub.skills.search_empty":"ui.hub.skills.remote_empty")}),e.jsx("div",{className:"grid min-w-0 gap-3 sm:grid-cols-2",children:m.map(l=>e.jsxs("div",{className:"flex min-w-0 flex-col gap-3 rounded-md border border-hairline p-4",children:[e.jsx("h3",{className:"break-words text-body-sm font-medium text-ink",children:l.name}),e.jsx("p",{className:"break-words text-meta text-ink-muted",children:l.description}),e.jsx(C,{variant:"outline","aria-pressed":y===l.id,"data-testid":"hub-skill-open",disabled:b.isPending,onClick:()=>{j(l.id),x(l.name),g(Se()),b.reset()},children:h("ui.hub.skills.open_detail",{item:l.name})})]},l.id))}),e.jsx(Fe,{page:i,count:T.data?.pages??1,onChange:o,ariaLabel:h("ui.hub.skills.title")})]})]}),y&&R&&e.jsxs("section",{className:"flex min-w-0 flex-col gap-3 border-t border-hairline pt-4","data-hub-skill-detail":!0,children:[k.isLoading&&e.jsx("output",{className:"text-meta text-ink-muted",children:h("ui.hub.skills.loading")}),k.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:h("ui.hub.status.other_error")}),k.data&&I&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"break-words text-heading text-ink",children:k.data.name}),e.jsx("p",{className:"text-meta text-ink-muted",children:h("ui.hub.skills.file_count",{count:k.data.files.length})}),k.data.files.map(l=>e.jsxs("details",{className:"min-w-0",children:[e.jsx("summary",{className:"break-words text-mono-sm text-ink",children:l.path}),e.jsx(hs,{readOnly:!0,rows:12,"aria-label":l.path,value:l.content,className:"max-h-96 bg-sunken text-mono-sm"})]},l.path)),e.jsx("label",{htmlFor:`${a}-alias`,className:"text-body-sm text-ink",children:h("ui.hub.subscriptions.alias")}),e.jsx(te,{id:`${a}-alias`,"data-testid":"hub-skill-alias",value:N,disabled:b.isPending,onChange:l=>{x(l.target.value),g(p=>({...p,autoPush:!1,confirmPublicEgress:!1}))}}),e.jsx("p",{className:"text-meta text-ink-muted",children:h("ui.hub.skills.pull_help")}),e.jsx(fs,{value:f,onChange:g,source:d,item:N,visibility:s.visibility,organization:s.organization,destinationKey:`${s.visibility}:${s.tenantId??""}:${y}`,canEnableAutoPush:!!A,disabled:b.isPending}),e.jsx(C,{"data-testid":"hub-skill-create",disabled:!t||!A||!N||b.isPending,onClick:E,children:h("ui.hub.subscriptions.create_copy")})]}),!t&&e.jsx("p",{className:"text-meta text-ink-muted",children:h("ui.hub.status.no_credential")}),(b.error||b.data&&!b.data.reports?.some(l=>l.applied||l.outcome==="unchanged"))&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-pull-failed",children:h("ui.hub.skills.pull_failed")}),b.data?.link&&b.data.reports?.some(l=>l.link_id===P&&l.direction==="pull"&&l.applied)&&e.jsx("output",{className:"text-body-sm text-ink","data-testid":"hub-skill-installed",children:h("ui.hub.skills.installed_alias",{item:b.data.link.name,source:ps(b.data.link)})}),b.data?.link&&e.jsx("p",{className:"text-meta text-ink-muted",children:h("ui.hub.skills.session_selection")})]}),!n&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:h("ui.hub.status.access_lost")}),e.jsx("div",{className:"border-t border-hairline pt-5",children:e.jsx(sa,{scope:s,source:d,verifiedCas:R&&n&&t,enabled:R&&n&&t})})]})}const Ss={all:["org-teams"],list:s=>[...Ss.all,"list",s]},Ps=({tenantId:s,enabled:t=!0})=>{const n=Z({queryKey:Ss.list(s??""),queryFn:async()=>(await Et(s)).result??{teams:[]},enabled:t&&!!s,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1,retry:Re});return{...n,teams:n.data?.teams??[]}},aa=(s,t)=>{const n=s?.name?.trim()||t?.trim()||"Team",a=s?.renamed_from?.trim()||null;return s?.invalid_name===!0&&a?{level:"warning",message:`Pulled "${n}". The published name "${a}" is not usable locally, so the team was stored as "${n}".`}:a?{level:"success",message:`Pulled "${n}" (you already have a team called "${a}").`}:{level:"success",message:`Pulled team "${n}".`}},Ts=()=>{const s=ae();return Ae({mutationFn:async({teamId:t,tenantId:n})=>{if(!Q.baseUrl)throw new Error("Local Operator API URL is not configured.");return Zs.pullOrgTeamFromRadient(Q.baseUrl,t,n)},onSuccess:(t,n)=>{const a=aa(t.result,n.name);a.level==="warning"?Gs(a.message):Js(a.message),s.invalidateQueries({queryKey:["desktop","teams"]})},onError:t=>{console.error("Pulling an organization team failed:",t)}})},na=/^v/i,_s=s=>s.members.reduce((t,n)=>t+n.count,0),ia=s=>s.count>1?`${s.role} ×${s.count}`:s.role,Pe=s=>s.members.map(ia).join(", "),Cs=s=>{const t=(s.version??"").trim().replace(na,"").trim();return t===""?null:t},Rs=s=>{const t=s.account_metadata?.name?.trim();return t||null},la=s=>{const t=(s.description??"").trim();return t===""?null:t},Te=240,ra=Te/2,ca=(s,t)=>{if(t||s.length<=Te)return s;const n=s.slice(0,Te),a=n.lastIndexOf(" ");return`${(a>=ra?n.slice(0,a):n).trimEnd()}…`},de=s=>Ft(s,"d MMM yyyy"),ue=s=>{if(!s)return null;const t=new Date(s);return Number.isNaN(t.getTime())?null:t},is=(s,t,n)=>{const a=n-t.getTime();let i;return a<0?i=de(t):a<6e4?i="just now":i=`${kt(t,new Date(n))} ago`,{label:s,when:i,iso:t.toISOString(),exact:de(t)}},oa=(s,t=Date.now())=>{const n=ue(s.updated_at);if(n)return is("updated",n,t);const a=ue(s.created_date);return a?is("created",a,t):null},da=s=>{const t=ue(s.created_date),n=ue(s.updated_at);return{created:t?de(t):null,updated:n?de(n):null}},ua=s=>s==="role"?"Role":s==="specialist"?"Specialist":s,ma=["refresh-hub","retry","sign-in"],ha=({tenantId:s,orgName:t})=>{const{teams:n,isLoading:a,isFetching:i,isError:o,error:u,refetch:w}=Ps({tenantId:s}),y=js(u),j=Ts(),[N,x]=c.useState(null),[f,g]=c.useState(null),S=c.useRef(new Map),d=c.useRef(null);c.useEffect(()=>{j.isPending||d.current===null||(S.current.get(d.current)?.focus(),d.current=null)},[j.isPending]);const[T,R]=c.useState(!1),[k,b]=c.useState(()=>new Set),P=(l,p)=>b(L=>{const $=new Set(L);return p?$.add(l):$.delete(l),$}),I=(l,p)=>{l.key!=="Escape"||!k.has(p)||(l.target instanceof Element?l.target:null)?.closest('[data-testid="org-team-pull-error"]')||(P(p,!1),l.currentTarget.querySelector("button[aria-expanded]")?.focus(),l.preventDefault())},A=c.useMemo(()=>{if(!ds(j.error))return null;const l=n.find(p=>p.id===N);return xs({code:j.error.code,message:j.error.message,details:j.error.details},{name:l?.name??"this team",hubAgentId:null,surface:"pull"})},[j.error,N,n]),m=(l,p)=>{switch(l){case"refresh-hub":w();break;case"retry":E(p);break;case"sign-in":R(!0);break}},E=l=>{j.isPending||(d.current=l.id,x(null),g(l.id),j.mutate({teamId:l.id,tenantId:s,name:l.name},{onSettled:()=>g(null),onError:()=>x(l.id)}))};return e.jsxs("section",{className:"mb-6 max-w-4xl rounded-md bg-surface","aria-label":`Teams shared with ${t??"this organization"}`,"data-testid":"org-teams",children:[a&&e.jsxs("div",{"aria-hidden":"true",className:"flex flex-col divide-y divide-hairline","data-testid":"org-teams-loading",children:[e.jsx(ve,{}),e.jsx(ve,{}),e.jsx(ve,{})]}),!a&&o&&e.jsxs(X,{variant:y?"warning":"danger",className:"m-4 w-auto","data-testid":"org-teams-error",children:[e.jsx(ee,{children:y==="plan"?"That organization needs an active Team plan":y==="no_access"?"You do not have access to that organization":"Teams could not be loaded"}),e.jsx(se,{children:y==="plan"?`Reading an organization's teams is part of the Team plan. An owner of ${t??"this organization"} can activate it in the Radient console, and then its teams will be listed here.`:y==="no_access"?`You are not a member of ${t??"that organization"}, so its teams are not listed here. An owner can invite you again.`:$e("The teams shared with this organization could not be read.",u)}),y!=="no_access"&&e.jsx("div",{className:"mt-2",children:e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void w(),disabled:i,"aria-busy":i,children:i?"Trying…":"Try again"})})]}),!a&&!o&&n.length===0&&e.jsx("p",{className:"p-4 text-body-sm text-ink-muted","data-testid":"org-teams-empty",children:`Teams shared into ${t??"this organization"} appear here for its members.`}),!a&&!o&&n.length>0&&e.jsx("ul",{className:"flex flex-col divide-y divide-hairline",children:n.map(l=>e.jsxs("li",{className:D(As,"transition-colors duration-fast ease-out-quart hover:bg-elevated first:rounded-t-md last:rounded-b-md"),onKeyDown:p=>I(p,l.id),children:[e.jsx(us,{className:"min-w-0",open:k.has(l.id),onOpenChange:p=>P(l.id,p),summaryAlign:"firstLine",triggerClassName:"min-w-0",chevronClassName:"text-ink-dim mt-1",rowClassName:"py-0",summary:e.jsx(ba,{team:l,expanded:k.has(l.id)}),trailing:e.jsx("div",{className:"-mt-1 ml-3 shrink-0 self-start",children:e.jsx(C,{ref:p=>{p?S.current.set(l.id,p):S.current.delete(l.id)},variant:"secondary",size:"sm",onClick:()=>E(l),disabled:j.isPending,"aria-label":`Pull team ${Y(l.name)}`,children:f===l.id?"Pulling…":"Pull"})}),children:e.jsx(pa,{team:l})}),N===l.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:A?.body??j.error?.message??`"${Y(l.name)}" could not be pulled.`}),A?.actions.filter(p=>ma.includes(p)).map(p=>e.jsx(C,{variant:"primary",size:"sm",onClick:()=>m(p,l),children:gs[p]},p)),T&&e.jsx("div",{className:"mt-1","data-testid":"org-team-pull-reauth",children:e.jsx(Ns,{titleText:"Sign in again",descriptionText:"",onSignInSuccess:()=>{R(!1),x(null),w()}})})]})]},l.id))})]})},As="px-4 py-3",Is=()=>e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),e.jsx("span",{className:"sr-only",children:", "})]}),xa=({team:s})=>{const t=s.manager?.trim(),n=_s(s);return e.jsxs("span",{className:"block truncate text-meta",children:[t?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:"Manager:"})," ",e.jsx("span",{className:"text-ink-muted",children:t})]}):null,t?e.jsx(Is,{}):null,s.members.length===0?e.jsx("span",{className:"text-ink-dim",children:"No members"}):e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-ink-dim",children:[n," ",n===1?"member":"members",":"]})," ",e.jsx("span",{className:"text-ink-muted",children:Pe(s)})]})]})},ga=({team:s})=>{const t=s.project?.trim(),n=Rs(s),a=oa(s),i=[];return t&&i.push({key:"project",node:t}),n&&i.push({key:"author",node:n}),a&&i.push({key:"recency",node:e.jsxs(e.Fragment,{children:[a.label," ",e.jsx(J,{content:a.exact,children:e.jsx("time",{dateTime:a.iso,children:a.when})})]})}),i.length===0?null:e.jsx("span",{className:"block truncate text-ink-dim text-meta",children:i.map((o,u)=>e.jsxs("span",{children:[u>0?e.jsx(Is,{}):null,o.node]},o.key))})},ba=({team:s,expanded:t})=>{const n=la(s),a=Cs(s);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:Y(s.name)}),a?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",a]}):null]}),n?e.jsxs(e.Fragment,{children:[e.jsx("span",{...ce,"aria-hidden":"true",className:D("mt-1 select-text break-words text-body-sm text-ink-muted",t?"line-clamp-[12] whitespace-pre-line":"line-clamp-2"),children:n}),e.jsx("span",{className:"sr-only",children:ca(n,t)})]}):e.jsx("span",{className:"mt-1 text-body-sm text-ink-dim",children:"No description"}),e.jsxs("span",{className:"mt-1 flex min-w-0 flex-col",children:[e.jsx(xa,{team:s}),e.jsx(ga,{team:s})]})]})},pa=({team:s})=>{const t=s.manager?.trim(),n=da(s),a=[n.created?`Created ${n.created}`:null,n.updated?`Updated ${n.updated}`:null].filter(o=>o!==null),i=!!t||s.members.length>0;return e.jsxs("div",{className:"mt-1 flex flex-col gap-2",children:[i||a.length===0?e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:"Members"}),e.jsxs("ul",{className:"flex flex-col gap-0.5",children:[t?e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:t}),e.jsx("span",{className:"text-ink-dim text-meta",children:"Manager"})]}):null,s.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.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:ua(o.kind)}),o.count>1?e.jsxs("span",{className:"text-ink-dim text-meta tabular-nums",children:["×",o.count]}):null]},`${o.kind}:${o.role}`)),i?null:e.jsx("li",{className:"text-ink-dim text-meta",children:"No members"})]})]}):null,a.length>0?e.jsx("p",{className:"text-ink-dim text-meta",children:a.join(" · ")}):null]})},ve=()=>e.jsxs("div",{className:D(As,"pl-9"),"data-testid":"org-team-skeleton-row",children:[e.jsx("div",{className:"flex h-[1lh] items-center text-body",children:e.jsx(_,{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(_,{className:"h-3.5 w-full"}),e.jsx(_,{className:"h-3.5 w-2/3"})]}),e.jsx("div",{className:"mt-1 flex h-[1lh] items-center text-meta",children:e.jsx(_,{className:"h-3 w-64"})}),e.jsx("div",{className:"flex h-[1lh] items-center text-meta",children:e.jsx(_,{className:"h-3 w-48"})})]}),Es=(s,t)=>t instanceof vs?t.message:$e(s,t),fa=["refresh-hub","retry","sign-in"],ja=({signedIn:s,onOpenSettings:t})=>{const[n,a]=c.useState(1),[i,o]=c.useState(""),{teams:u,isLoading:w,isFetching:y,isError:j,error:N,refetch:x,pagination:f}=Yt({page:n,perPage:ws}),g=Ts(),[S,d]=c.useState(null),[T,R]=c.useState(null),k=c.useRef(new Map),b=c.useRef(null);c.useEffect(()=>{g.isPending||b.current===null||(k.current.get(b.current)?.focus(),b.current=null)},[g.isPending]);const P=yt(i.trim()),I=c.useMemo(()=>P?u.filter(v=>Y(v.name).toLowerCase().includes(P)||(v.description??"").toLowerCase().includes(P)):u,[u,P]),A=v=>{g.isPending||(d(null),R(v.id),b.current=v.id,g.mutate({teamId:v.id,name:v.name},{onSettled:()=>R(null),onError:()=>d(v.id)}))},m=c.useMemo(()=>{if(!ds(g.error))return null;const v=u.find(O=>O.id===S);return xs({code:g.error.code,message:g.error.message,details:g.error.details},{name:v?.name??"this team",hubAgentId:null,surface:"pull"})},[g.error,S,u]),E=m?.body??(Xs(g.error)==="unauthorized"?"The team could not be pulled: this machine has no Radient sign-in for the hub. Sign in on the settings page, then pull again.":"The team could not be pulled."),[l,p]=c.useState(!1),L=(v,O)=>{switch(v){case"refresh-hub":x();break;case"retry":A(O);break;case"sign-in":p(!0);break}},$=w&&u.length===0,q=f?.totalRecords??u.length,F=c.useRef(null),z=v=>{const O=i!=="";o(v),O&&v===""&&F.current?.focus()};return e.jsxs("section",{"aria-label":"Public teams",className:"flex flex-col","data-testid":"agent-hub-public-teams",children:[e.jsx("h2",{className:"sr-only",children:"Public teams"}),e.jsx("p",{className:"mb-3 max-w-3xl text-body-sm text-ink-muted",children:"Public teams are published to the hub by anyone and can be read here without signing in. Pulling one copies it into this machine's local team registry."}),s?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:"Sign in to Radient to pull a team into this machine."}),e.jsx(C,{variant:"secondary",size:"sm",onClick:t,children:"Open settings to sign in"})]}),e.jsx("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:e.jsxs("div",{className:D("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(et,{"aria-hidden":"true",className:"ml-2 shrink-0 text-ink-dim"}),e.jsx(te,{ref:F,type:"search",value:i,onChange:v=>z(v.target.value),placeholder:"Search teams","aria-label":"Search teams",className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none","data-testid":"agent-hub-public-teams-search"})]})}),$&&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(Ne,{}),e.jsx(Ne,{}),e.jsx(Ne,{})]}),!$&&j&&e.jsxs(X,{variant:"danger",className:"w-auto max-w-2xl","data-testid":"agent-hub-public-teams-error",children:[e.jsx(ee,{children:"Public teams could not be loaded"}),e.jsx(se,{children:Es("The public team catalogue could not be read.",N)}),e.jsx("div",{className:"mt-2",children:e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void x(),disabled:y,"aria-busy":y,children:y?"Trying…":"Try again"})})]}),!$&&!j&&u.length===0&&e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted","data-testid":"agent-hub-public-teams-empty",children:"No teams have been published to the public hub yet."}),!$&&!j&&u.length>0&&e.jsxs(e.Fragment,{children:[!P||I.length>0?e.jsxs("p",{className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-public-teams-status",children:[P?`${I.length} of ${u.length} teams on this page match "${i.trim()}"`:`${q} ${q===1?"team":"teams"} in the public hub`,P?e.jsxs("span",{className:"text-ink-dim",children:[" ","· search covers the teams loaded here"]}):null]}):null,I.length===0?e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted","data-testid":"agent-hub-public-teams-search-miss",children:`No team on this page matches "${i.trim()}".`}):e.jsx("ul",{className:"flex max-w-4xl flex-col gap-3",children:I.map(v=>e.jsx(ka,{team:v,pulling:T===v.id,pullPending:g.isPending,onPull:A,pullButtonRef:O=>{O?k.current.set(v.id,O):k.current.delete(v.id)},failed:S===v.id,failureBody:E,treatment:m,onTreatmentAction:L,reauthenticating:l,onReauthenticated:()=>{p(!1),d(null),x()}},v.id))}),!P&&f&&f.totalPages>1&&e.jsx(Fe,{count:f.totalPages,page:f.page,onChange:v=>{a(v),F.current?.scrollIntoView({block:"nearest"})}})]})]})},ka=({team:s,pulling:t,pullPending:n,onPull:a,failed:i,failureBody:o,treatment:u,onTreatmentAction:w,reauthenticating:y,onReauthenticated:j,pullButtonRef:N})=>{const[x,f]=c.useState(!1),g=Gt({teamId:x?s.id:void 0}),S=Y(s.name),d=Cs(s),T=Rs(s),R=s.manager?.trim(),k=_s(s),b=(s.description??"").trim();return e.jsxs("li",{className:"rounded-md bg-surface p-4","data-testid":"agent-hub-public-team","data-team-name":s.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:S}),d?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",d]}):null]}),b?e.jsx("p",{...ce,className:"mt-1 line-clamp-3 max-w-3xl select-text text-body-sm text-ink-muted",children:b}):e.jsx("p",{className:"mt-1 text-body-sm text-ink-dim",children:"No description"}),e.jsxs("p",{className:"mt-2 flex flex-wrap items-baseline gap-x-2 text-meta",children:[R?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:"Manager:"}),e.jsx("span",{className:"text-ink-muted",children:R})]}):null,s.members.length===0?e.jsx("span",{className:"text-ink-dim",children:"No members"}):e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-ink-dim",children:[k," ",k===1?"member":"members",":"]}),e.jsx(J,{content:Pe(s),children:e.jsx("span",{className:"truncate text-ink-muted",children:Pe(s)})})]})]}),T?e.jsxs("p",{className:"mt-1 text-ink-dim text-meta",children:["Published by ",e.jsx("span",{className:"text-ink-muted",children:T})]}):null]}),e.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-2",children:[e.jsx(C,{ref:N,variant:"secondary",size:"sm",onClick:()=>a(s),disabled:n,"aria-label":`Pull team ${S}`,children:t?"Pulling…":"Pull"}),i&&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:o}),u?.actions.filter(P=>fa.includes(P)).map(P=>e.jsx(C,{variant:"primary",size:"sm",onClick:()=>w(P,s),children:gs[P]},P)),y&&e.jsx("div",{"data-testid":"agent-hub-public-team-pull-reauth",children:e.jsx(Ns,{titleText:"Sign in again",descriptionText:"",onSignInSuccess:j})})]})]})]}),e.jsx("div",{className:"mt-2",children:e.jsx(us,{summary:"Brief",open:x,onOpenChange:f,className:"w-full",triggerClassName:"w-full",triggerLabel:`View the brief for ${S}`,chevronClassName:"text-ink-dim",children:e.jsx(ya,{detail:g})})})]})},ya=({detail:s})=>{if(s.isLoading)return e.jsxs("div",{className:"flex flex-col gap-1","data-testid":"agent-hub-public-team-brief-loading",children:[e.jsx(_,{className:"h-[1lh] w-2/3"}),e.jsx(_,{className:"h-[2lh] w-full"})]});if(s.isError)return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx("output",{className:"text-meta text-danger",children:Es("This team's brief could not be read.",s.error)}),e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void s.refetch(),disabled:s.isFetching,"aria-busy":s.isFetching,children:s.isFetching?"Trying…":"Try again"})]});const t=s.team;if(!t)return null;const n=(t.instructions??"").trim(),a=(t.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:"Collaboration brief"}),n?e.jsx("p",{...ce,className:"whitespace-pre-line select-text text-ink-muted",children:n}):e.jsx("p",{className:"text-ink-dim",children:"This team has no collaboration brief."})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:"Project brief"}),a?e.jsx("p",{...ce,className:"whitespace-pre-line select-text text-ink-muted",children:a}):e.jsx("p",{className:"text-ink-dim",children:"This team has no project brief."})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:"Roster"}),e.jsxs("ul",{className:"flex flex-col gap-0.5",children:[t.manager?.trim()?e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:t.manager.trim()}),e.jsx("span",{className:"text-ink-dim text-meta",children:"Manager"})]}):null,t.members.length===0?e.jsx("li",{className:"text-ink-dim",children:"No members"}):t.members.map(i=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:i.count>1?`${i.role} ×${i.count}`:i.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:i.kind})]},`${i.kind}:${i.role}`))]})]})]})},Ne=()=>e.jsxs("div",{className:"rounded-md bg-surface p-4",children:[e.jsx(_,{className:"h-[1lh] w-1/3"}),e.jsx(_,{className:"mt-1 flex h-[3lh] w-full"}),e.jsx(_,{className:"mt-2 h-[1lh] w-2/3"})]}),va=(s,t)=>{const[n,a]=c.useState(s);return c.useEffect(()=>{const i=setTimeout(()=>a(s),t);return()=>clearTimeout(i)},[s,t]),n},re=[{value:"download_count:desc",label:"Most downloaded",sort:"download_count",order:"desc"},{value:"like_count:desc",label:"Most liked",sort:"like_count",order:"desc"},{value:"favourite_count:desc",label:"Most favourited",sort:"favourite_count",order:"desc"},{value:"created_at:desc",label:"Newest",sort:"created_at",order:"desc"},{value:"updated_at:desc",label:"Recently updated",sort:"updated_at",order:"desc"},{value:"name:asc",label:"Name (A to Z)",sort:"name",order:"asc"}],Na=[{value:"name",label:"Name"},{value:"description",label:"Description"}],wa=300,W="public",ls={agents:"agent-hub-view-agents",teams:"agent-hub-view-teams",skills:"agent-hub-view-skills"},rs="agent-hub-view-panel",Sa=()=>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(_,{className:"h-5.5 w-2/3"}),e.jsx(_,{className:"h-3.5 w-full"}),e.jsx(_,{className:"h-3.5 w-full"}),e.jsx(_,{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(_,{className:"h-5.5 w-24"}),e.jsx(_,{className:"h-5.5 w-20"})]}),e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsx(_,{className:"h-5.5 w-24"})})]}),e.jsx(_,{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(_,{className:"size-4"}),e.jsx(_,{className:"h-4 w-6"}),e.jsx(_,{className:"size-4"}),e.jsx(_,{className:"h-4 w-6"}),e.jsx(_,{className:"ml-auto h-7 w-16"})]})]}),Ua=()=>{const s=cs(),{isAuthenticated:t}=_e(),[n,a]=c.useState(1),[i]=c.useState(12),[o,u]=c.useState(null),[w,y]=c.useState(""),[j,N]=c.useState("name"),[x,f]=c.useState(re[0].value),[g,S]=c.useState(W),[d,T]=c.useState("agents");Ee();const[R,k]=c.useState([]),b=va(w,wa),P=re.find(r=>r.value===x)??re[0],I=Ce(),A=!I.isError&&me(I.data,"hub_skills"),m=d==="skills"&&!A?"agents":d;c.useEffect(()=>{d==="skills"&&!A&&T("agents")},[d,A]);const E=st(),l=tt(I.data,"radient_org"),p=t?Ot(l,E??null):null,{memberships:L}=$t({enabled:ss(l)}),$=c.useMemo(()=>Rt(L),[L]),q=g===W||$.some(r=>r.tenant_id===g);c.useEffect(()=>{!q&&m!=="skills"&&S(W)},[q,m]);const F=g===W?null:$.find(r=>r.tenant_id===g)??null,z=F?.tenant_id,v=F?.tenant_name||null,O=o!==null||b!=="",ge=Ps({tenantId:z}),ne=z&&ge.isSuccess&&!O?ge.teams.length:null,$s=F?.role==="owner"||F?.role==="admin",Fs=c.useMemo(()=>new Map(L.map(r=>[r.tenant_id,r.tenant_name])),[L]),{data:ie,agents:Os,isLoading:Ls,isFetching:U,error:K,refetch:Oe,pagination:B}=ut({page:n,perPage:i,categories:o?[o]:void 0,name:j==="name"&&b||void 0,description:j==="description"&&b||void 0,sort:P.sort,order:P.order,tenantId:z}),G=F?js(K):null,le=Os??[],Le=U&&ie!==void 0,{statuses:ze,isKnown:zs,isError:Ms,isFetching:be,refetch:Ds}=vt({agentIds:z?[]:le.map(r=>r.id)}),pe=c.useRef(null),fe=c.useRef(null),[Me,qs]=c.useState(0);c.useEffect(()=>{Me!==0&&(pe.current??fe.current)?.focus()},[Me]);const De=c.useRef(null),je=c.useRef(!1),ke=c.useMemo(()=>[...new Set((ie?.records??[]).flatMap(r=>r.categories??[]))],[ie]);c.useEffect(()=>{k(r=>ke.every(V=>r.includes(V))?r:[...new Set([...r,...ke])])},[ke]);const Us=()=>{u(null),y(""),a(1),qs(r=>r+1)},M=(Ls||U)&&ie===void 0,qe=!M&&!O&&(K!==null||le.length===0);c.useEffect(()=>{!je.current||M||(je.current=!1,K?De.current?.focus():(pe.current??fe.current)?.focus())},[M,K]);const Ue=c.useRef(null),Bs=r=>{a(r),Ue.current?.scrollIntoView({block:"nearest"})},Hs=r=>{u(r),a(1)},Qs=r=>{y(r),a(1)},Ks=r=>{S(r),a(1)},Be=c.useRef(new Map),Vs=r=>{N(r),a(1)},He=B&&!O?B.totalRecords:null,ye=z?`shared with ${v??"this organization"}`:"in the public hub",Qe=(r,V)=>`${r} ${V}${r===1?"":"s"} ${ye}`;let H;return m==="skills"?H=" ":m==="teams"?z?ge.isLoading?H="Loading teams…":ne!==null?H=Qe(ne,"team"):H=`Teams ${ye}`:H=" ":M?H="Loading agents…":B?H=Qe(B.totalRecords,"agent"):H=`Agents ${ye}`,e.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[e.jsx(nt,{title:"Agent hub",subtitle:"Discover and download community agents on Radient",icon:_t}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[p&&e.jsxs(X,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-unavailable",children:[e.jsx(ee,{children:"Organizations are unavailable"}),e.jsx(se,{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(lt,{value:m,onValueChange:r=>T(r),children:e.jsx(rt,{"aria-label":"Browse the hub by type",children:["agents","teams",...A?["skills"]:[]].map(r=>e.jsxs(ct,{value:r,id:ls[r],"aria-controls":m===r?rs:void 0,"data-testid":`agent-hub-view-${r}`,children:[r==="agents"?"Agents":r==="teams"?"Teams":h("ui.hub.skills.title"),r!=="skills"&&(r==="agents"?He:ne)!==null&&e.jsx("span",{className:"min-w-[2ch] font-normal text-ink-dim tabular-nums",children:r==="agents"?He:ne})]},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:"Showing"}),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:"Show the hub of"}),e.jsx("div",{className:"flex flex-wrap gap-0.5 rounded-md bg-sunken p-0.5",children:[{value:W,label:"Public hub",Icon:at},...$.map(r=>({value:r.tenant_id,label:r.tenant_name||"Organization",Icon:zt}))].map(({value:r,label:V,Icon:Ws})=>e.jsxs(C,{ref:Ke=>{Ke?Be.current.set(r,Ke):Be.current.delete(r)},variant:"ghost",size:"sm","aria-pressed":g===r,onClick:()=>Ks(r),title:V,"data-testid":`agent-hub-scope-${r===W?"public":`org-${r}`}`,className:D("max-w-48",g===r&&"bg-surface text-ink hover:bg-surface"),children:[e.jsx(Ws,{"aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:V})]},r))})]})]})]}),e.jsx(ot,{id:rs,labelledBy:ls[m],children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-row overflow-hidden",children:[m==="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-tour-tag":"agent-hub-sidebar-container",children:!qe&&e.jsx(Ht,{selectedCategory:o,onSelectCategory:Hs,categories:R})})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-y-auto",children:[m==="agents"&&!qe&&e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:D("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:pe,type:"search",value:w,onChange:r=>Qs(r.target.value),placeholder:"Search agents","aria-label":"Search agents",className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none","data-testid":"agent-hub-search"}),e.jsxs(Ye,{value:j,onValueChange:Vs,children:[e.jsx(Ge,{className:"w-auto shrink-0 border-y-0 border-l border-hairline border-r-0 bg-transparent pl-2 outline-none","aria-label":"Search in","data-testid":"agent-hub-search-scope",children:e.jsx(Je,{})}),e.jsx(Ze,{children:Na.map(r=>e.jsx(Xe,{value:r.value,children:r.label},r.value))})]})]}),e.jsxs(Ye,{value:x,onValueChange:f,children:[e.jsx(Ge,{className:"w-48","aria-label":"Sort agents","data-testid":"agent-hub-sort",children:e.jsx(Je,{})}),e.jsx(Ze,{children:re.map(r=>e.jsx(Xe,{value:r.value,children:r.label},r.value))})]})]}),e.jsxs("p",{ref:Ue,"aria-live":"polite",className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-status",children:[H,m==="agents"&&Le?e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{"data-testid":"agent-hub-updating",children:"Updating…"})]}):null]}),m==="agents"&&e.jsxs(e.Fragment,{children:[t&&Ms&&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:"Your likes and favourites could not be read, so no card shows a viewer state."}),e.jsx(C,{variant:"ghost",size:"sm",onClick:()=>void Ds(),disabled:be,"aria-busy":be,children:be?"Trying…":"Try again"})]}),M&&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,V)=>e.jsx(Sa,{},V))}),M&&B===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(_,{className:"h-4 w-24"})}),e.jsx("output",{"aria-live":"polite","data-testid":"agent-hub-outage",className:D(!M&&K&&!G?"block":"sr-only"),children:!M&&K&&!G&&e.jsxs(X,{variant:"danger",className:"max-w-2xl","aria-busy":U,"data-testid":"agent-hub-error",children:[e.jsx(ee,{children:t?"The hub could not be loaded":"Sign in to use the hub"}),e.jsx(se,{children:t?$e("The agent list could not be loaded.",K):"You are not signed in to Radient, so the hub has no credential to read the agent list with. Sign in on the settings page, then try again."}),e.jsx("div",{className:"mt-2",children:e.jsx(C,{ref:De,variant:"outline",size:"sm",onClick:()=>{je.current=!0,Oe()},disabled:U,"aria-busy":U,children:U?"Trying…":"Try again"})})]})}),!M&&G&&F&&e.jsxs(X,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-no-access",children:[e.jsx(ee,{children:G==="plan"?"That organization needs an active Team plan":"You do not have access to that organization"}),e.jsx(se,{children:G==="plan"?`Sharing agents inside an organization is part of the Team plan. An owner of ${F.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 ${F.tenant_name||"that organization"}, so its agents are not listed here. An owner can invite you again.`}),G==="plan"&&e.jsx("div",{className:"mt-2",children:e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void Oe(),disabled:U,"aria-busy":U,children:U?"Trying…":"Try again"})})]}),!M&&!K&&e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6","aria-busy":Le,children:le.length===0?e.jsxs("div",{"data-testid":"agent-hub-empty",className:D("col-span-full w-full flex flex-col items-center gap-2 rounded-md bg-surface px-6 py-10 text-center",!z&&"max-w-2xl justify-self-center"),children:[e.jsx("p",{className:"text-heading text-ink",children:z?"This organization has no shared agents yet.":o?`No agents in ${bs(o).label}.`:O?"No agents match that search.":"The hub is empty."}),e.jsx("p",{className:"max-w-md text-body-sm text-ink-muted",children:z?`Agents published into ${F?.tenant_name||"this organization"} appear here for its members.`:o?"Nothing in this category yet. Clear the filter to see the whole hub.":O?"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:O?e.jsx(C,{variant:"secondary",onClick:Us,children:o?"Clear filter":"Clear search"}):z&&!$s?null:e.jsx(C,{ref:fe,variant:"secondary",onClick:()=>s("/agents"),children:"Publish an agent"})})]}):le.map(r=>e.jsx(Ut,{agent:r,status:t?ze[r.id]:void 0,viewerStateKnown:t&&Nt(zs,ze,r.id),orgName:r.visibility==="org"?Fs.get(r.tenant_id)??null:null},r.id))}),!M&&B&&B.totalPages>1&&e.jsx(Fe,{count:B.totalPages,page:B.page,onChange:Bs})]}),m==="skills"&&(A?e.jsx(ta,{scope:g===W?{visibility:"public",tenantId:null,organization:null}:{visibility:"org",tenantId:g,organization:v},signedIn:t,accessible:q&&(g===W||ss(l))},`skills:${g}`):e.jsx("p",{className:"text-body-sm text-warning",children:h("ui.hub.skills.unavailable")})),m==="teams"&&(F?e.jsx(ha,{tenantId:F.tenant_id,orgName:v}):e.jsx(ja,{signedIn:t,onOpenSettings:()=>s("/settings")}))]})]})})]})]})};export{Ua as AgentHubPage};