local-operator-ui 0.34.53 → 0.34.55

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 (90) hide show
  1. package/out/main/index.js +193 -18
  2. package/out/renderer/assets/{_basePickBy-CvpcKweF.js → _basePickBy-Be_5LfVS.js} +1 -1
  3. package/out/renderer/assets/{_baseUniq-D1oOSrqB.js → _baseUniq-hdy9kmQQ.js} +1 -1
  4. package/out/renderer/assets/{agent-details-page-Dbd7Qqbd.js → agent-details-page-CLbcLEwm.js} +2 -2
  5. package/out/renderer/assets/agent-hub-page-Bf5Aw-Jn.js +11 -0
  6. package/out/renderer/assets/{agents-page-DfuX5-79.js → agents-page-BpaQBOFJ.js} +3 -3
  7. package/out/renderer/assets/{arc-BajJ7pje.js → arc-CgN-UZqL.js} +1 -1
  8. package/out/renderer/assets/{architectureDiagram-IEHRJDOE-D1-CNSAD.js → architectureDiagram-IEHRJDOE-DowMu2Qf.js} +1 -1
  9. package/out/renderer/assets/{blockDiagram-JOT3LUYC-CD5T8WZA.js → blockDiagram-JOT3LUYC-DgKTIFqt.js} +1 -1
  10. package/out/renderer/assets/{book-open-CfuxuX-l.js → book-open-yKrSTgbR.js} +1 -1
  11. package/out/renderer/assets/browser-page-CKyYrwF0.js +1 -0
  12. package/out/renderer/assets/{browser-webauthn-prompt-DW800ko_.js → browser-webauthn-prompt-CJ6FJJMN.js} +1 -1
  13. package/out/renderer/assets/{c4Diagram-VJAJSXHY-COKPfAva.js → c4Diagram-VJAJSXHY-Ctyv3nA_.js} +1 -1
  14. package/out/renderer/assets/channel-DaruqAQQ.js +1 -0
  15. package/out/renderer/assets/{chunk-4BMEZGHF-iSOGNS5q.js → chunk-4BMEZGHF-CW43fWPt.js} +1 -1
  16. package/out/renderer/assets/{chunk-A2AXSNBT-B7eDvfbn.js → chunk-A2AXSNBT-BfdEIIIg.js} +1 -1
  17. package/out/renderer/assets/{chunk-AEK57VVT-CTtvvIx6.js → chunk-AEK57VVT-Bx4nZ-57.js} +1 -1
  18. package/out/renderer/assets/{chunk-D6G4REZN-D89NRhvc.js → chunk-D6G4REZN-BA6hwejS.js} +1 -1
  19. package/out/renderer/assets/{chunk-RZ5BOZE2-D9-5Iwp7.js → chunk-RZ5BOZE2-Civ6_Z-P.js} +1 -1
  20. package/out/renderer/assets/{chunk-XZIHB7SX-Cdyx-enm.js → chunk-XZIHB7SX-BVPRrS8K.js} +1 -1
  21. package/out/renderer/assets/classDiagram-GIVACNV2-D8vhGZVf.js +1 -0
  22. package/out/renderer/assets/classDiagram-v2-COTLJTTW-D8vhGZVf.js +1 -0
  23. package/out/renderer/assets/clone-HcmO38Fx.js +1 -0
  24. package/out/renderer/assets/{console-mirror-D4VUczn2.js → console-mirror-D12eLWy7.js} +1 -1
  25. package/out/renderer/assets/{consoleCapture-BZscABJW.js → consoleCapture-B5s47GGM.js} +1 -1
  26. package/out/renderer/assets/{conversation-input-sync-Dlf10JWF.js → conversation-input-sync-oIWpPfzj.js} +259 -259
  27. package/out/renderer/assets/{dagre-OKDRZEBW-hOluomAX.js → dagre-OKDRZEBW-CayNWWG3.js} +1 -1
  28. package/out/renderer/assets/{diagram-SSKATNLV-BWdY9OnP.js → diagram-SSKATNLV-CNrEYtm4.js} +1 -1
  29. package/out/renderer/assets/{diagram-VNBRO52H-CUZoZ2hJ.js → diagram-VNBRO52H-jzZ7n3uT.js} +1 -1
  30. package/out/renderer/assets/{erDiagram-Q7BY3M3F-BaXRnwVj.js → erDiagram-Q7BY3M3F-9BaZ6ZkV.js} +1 -1
  31. package/out/renderer/assets/{error-boundary-BCQ7FGQc.js → error-boundary-BfL6ia-P.js} +1 -1
  32. package/out/renderer/assets/{flowDiagram-4HSFHLVR-D3gvS8EU.js → flowDiagram-4HSFHLVR-CptBIl13.js} +1 -1
  33. package/out/renderer/assets/{ganttDiagram-APWFNJXF-DRKxbsB1.js → ganttDiagram-APWFNJXF-CgcFEyO7.js} +3 -3
  34. package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-B-6CMRoo.js → gitGraphDiagram-7IBYFJ6S-cmMetjXL.js} +1 -1
  35. package/out/renderer/assets/{graph-Bvgoe8Zc.js → graph-R1Ok41yA.js} +1 -1
  36. package/out/renderer/assets/{index-DWZ82U8c.js → index-BFzgup69.js} +1 -1
  37. package/out/renderer/assets/{index-dNBOt_b9.js → index-CNvEPxPr.js} +197 -197
  38. package/out/renderer/assets/index-CsR1USrT.js +57 -0
  39. package/out/renderer/assets/{index-Bg8G2adf.js → index-Dsm4DzII.js} +1 -1
  40. package/out/renderer/assets/{index-DxyRyuQP.css → index-pufheB69.css} +1 -1
  41. package/out/renderer/assets/{infoDiagram-PH2N3AL5-g5rZp0e7.js → infoDiagram-PH2N3AL5-DeSmG1nL.js} +1 -1
  42. package/out/renderer/assets/{installer-BRjexwGb.js → installer-BM-QRi7Y.js} +1 -1
  43. package/out/renderer/assets/{journeyDiagram-U35MCT3I-CyyN61cm.js → journeyDiagram-U35MCT3I--ZNfC2qt.js} +1 -1
  44. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-BcYjcFGg.js → kanban-definition-NDS4AKOZ-kUi3-HdL.js} +1 -1
  45. package/out/renderer/assets/{layout-DIrLHdoU.js → layout-DQq3NfPk.js} +1 -1
  46. package/out/renderer/assets/{legacy-agents-page-C4087qcZ.js → legacy-agents-page-D0vembfV.js} +7 -7
  47. package/out/renderer/assets/{mermaid.core-TBXZ6m8l.js → mermaid.core-kSHzKq9G.js} +5 -5
  48. package/out/renderer/assets/mesh-page-BhfRHXQS.js +1 -0
  49. package/out/renderer/assets/{mindmap-definition-ALO5MXBD-CDtMt6Do.js → mindmap-definition-ALO5MXBD-BsJiNdkz.js} +1 -1
  50. package/out/renderer/assets/mini-DngBC0gl.js +1 -0
  51. package/out/renderer/assets/{notebook-pen-Dd0WXtBw.js → notebook-pen-BbGvgaYT.js} +1 -1
  52. package/out/renderer/assets/{org-access-BVkMTwKq.js → org-access-DVLt_Z75.js} +1 -1
  53. package/out/renderer/assets/{org-surface-gate-CV-1baVy.js → org-surface-gate-J1G29FUu.js} +1 -1
  54. package/out/renderer/assets/{page-header-Dl5IO6UP.js → page-header-BSVtXSul.js} +1 -1
  55. package/out/renderer/assets/{pieDiagram-IB7DONF6-gmMGr-ui.js → pieDiagram-IB7DONF6-D9NPKlbA.js} +1 -1
  56. package/out/renderer/assets/projects-page-CV3ap9Ch.js +45 -0
  57. package/out/renderer/assets/{publication-validation-cIO-Z0gj.js → publication-validation-CXXK8RMX.js} +1 -1
  58. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-Ctwtym9P.js → quadrantDiagram-7GDLP6J5-Dp6sSgy_.js} +1 -1
  59. package/out/renderer/assets/{radar-MK3ICKWK-CApF2ugX.js → radar-MK3ICKWK-BdYaxH9C.js} +1 -1
  60. package/out/renderer/assets/{radient-auth-buttons-B1WkSc0e.js → radient-auth-buttons-2gyRX5Xg.js} +1 -1
  61. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-DB3NXRpA.js → requirementDiagram-KVF5MWMF-CSxZpxDc.js} +1 -1
  62. package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-lcLgzHR-.js → sankeyDiagram-QLVOVGJD-DNfJtnGS.js} +1 -1
  63. package/out/renderer/assets/{schedules-page-ByfZ04x2.js → schedules-page-BMY6s4UJ.js} +1 -1
  64. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-C92s7I-3.js → sequenceDiagram-X6HHIX6F-wP1VuU8h.js} +1 -1
  65. package/out/renderer/assets/settings-page-CVUD4U35.js +292 -0
  66. package/out/renderer/assets/{stateDiagram-DGXRK772-D1MupxMG.js → stateDiagram-DGXRK772-BRguDCdq.js} +1 -1
  67. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CqO4MBYu.js +1 -0
  68. package/out/renderer/assets/{timeline-definition-BDJGKUSR-SK8QkNlF.js → timeline-definition-BDJGKUSR-Sovor235.js} +1 -1
  69. package/out/renderer/assets/{ui-preferences-store-BSjv1eml.js → ui-preferences-store-g6-xQ9NA.js} +1 -1
  70. package/out/renderer/assets/{use-download-agent-mutation-Bik5KhXj.js → use-download-agent-mutation-CKVzPGPY.js} +4 -4
  71. package/out/renderer/assets/{use-memberships-query-CXnke9-r.js → use-memberships-query-BgAi_tHu.js} +1 -1
  72. package/out/renderer/assets/{use-session-snapshot-D20-nQEA.js → use-session-snapshot-Ba7FspxL.js} +1 -1
  73. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-_YTSS36c.js → xychartDiagram-VJFVF3MP-BBlbpFBv.js} +1 -1
  74. package/out/renderer/console-capture.html +5 -5
  75. package/out/renderer/index.html +7 -7
  76. package/out/renderer/installer.html +4 -4
  77. package/out/renderer/mini.html +7 -7
  78. package/package.json +2 -2
  79. package/out/renderer/assets/agent-hub-page-hB4xULfK.js +0 -11
  80. package/out/renderer/assets/browser-page-DbFH9sog.js +0 -1
  81. package/out/renderer/assets/channel-5khbBi1K.js +0 -1
  82. package/out/renderer/assets/classDiagram-GIVACNV2-B_cQ6qiw.js +0 -1
  83. package/out/renderer/assets/classDiagram-v2-COTLJTTW-B_cQ6qiw.js +0 -1
  84. package/out/renderer/assets/clone-DUh4Smnq.js +0 -1
  85. package/out/renderer/assets/index-C9huVbt8.js +0 -57
  86. package/out/renderer/assets/mesh-page-Z6_brJoS.js +0 -1
  87. package/out/renderer/assets/mini-DDoFzOhf.js +0 -1
  88. package/out/renderer/assets/projects-page-B4mpUcqQ.js +0 -45
  89. package/out/renderer/assets/settings-page-DaWmx0G_.js +0 -292
  90. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-BsNwRWuq.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as d,u as O,z as R}from"./error-boundary-BCQ7FGQc.js";import{t as z,c as U,n as Q,b as N,g as B,e as V,h as S,i as C,j as D,a as v}from"./en-US-CHJkXXr4.js";import{j as i,c as p,t as c,r as P}from"./index-C9huVbt8.js";import{bJ as $,bz as T,bK as Y,B as w,C as Z,u as M,aG as A,aJ as G,aH as q,bE as J,ar as W,ai as I,bF as X}from"./conversation-input-sync-Dlf10JWF.js";import{aN as ee,aO as te,aP as E}from"./index-dNBOt_b9.js";import{B as ae}from"./book-open-CfuxuX-l.js";import{k as ne,m as se,n as oe,o as re,q as ie}from"./use-memberships-query-CXnke9-r.js";import{b as ce,l as ue}from"./publication-validation-cIO-Z0gj.js";/**
1
+ import{c as d,u as O,z as F}from"./error-boundary-BfL6ia-P.js";import{t as N,c as U,n as Q,b as z,g as B,e as V,h as S,i as C,j as D,a as v}from"./en-US-CHJkXXr4.js";import{j as i,c as p,t as c,r as P}from"./index-CsR1USrT.js";import{bN as $,bD as T,bO as Y,B as w,C as Z,u as M,aK as A,aN as G,aL as I,bI as W,ar as J,ai as q,bJ as X}from"./conversation-input-sync-oIWpPfzj.js";import{aN as ee,aO as te,aP as E}from"./index-CNvEPxPr.js";import{B as ae}from"./book-open-yKrSTgbR.js";import{k as ne,m as se,n as oe,o as re,q as ie}from"./use-memberships-query-BgAi_tHu.js";import{b as ce,l as ue}from"./publication-validation-CXXK8RMX.js";/**
2
2
  * @license lucide-react v0.507.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -43,12 +43,12 @@ import{c as d,u as O,z as R}from"./error-boundary-BCQ7FGQc.js";import{t as z,c a
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const ze=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Je=d("heart",ze);/**
46
+ */const Ne=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],We=d("heart",Ne);/**
47
47
  * @license lucide-react v0.507.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */const Ne=[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]],Se=d("megaphone",Ne);/**
51
+ */const ze=[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]],Se=d("megaphone",ze);/**
52
52
  * @license lucide-react v0.507.0 - ISC
53
53
  *
54
54
  * This source code is licensed under the ISC license.
@@ -58,4 +58,4 @@ import{c as d,u as O,z as R}from"./error-boundary-BCQ7FGQc.js";import{t as z,c a
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const ve=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],qe=d("shopping-cart",ve);function Ie(e,t){const o=+z(e)-+z(t);return o<0?-1:o>0?1:o}function Le(e){return U(e,Date.now())}function Oe(e){return t=>{const a=(e?Math[e]:Math.trunc)(t);return a===0?0:a}}function $e(e,t,o){const a=B(),n=o?.locale??a.locale??V,s=Ie(e,t);if(isNaN(s))throw new RangeError("Invalid time value");const r=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:s}),[m,y]=Q(o?.in,...s>0?[t,e]:[e,t]),h=Oe(o?.roundingMethod??"round"),b=y.getTime()-m.getTime(),g=b/v,F=N(y)-N(m),f=(b-F)/v,k=o?.unit;let u;if(k?u=k:g<1?u="second":g<60?u="minute":g<S?u="hour":f<C?u="day":f<D?u="month":u="year",u==="second"){const l=h(b/1e3);return n.formatDistance("xSeconds",l,r)}else if(u==="minute"){const l=h(g);return n.formatDistance("xMinutes",l,r)}else if(u==="hour"){const l=h(g/60);return n.formatDistance("xHours",l,r)}else if(u==="day"){const l=h(f/S);return n.formatDistance("xDays",l,r)}else if(u==="month"){const l=h(f/C);return l===12&&k!=="month"?n.formatDistance("xYears",1,r):n.formatDistance("xMonths",l,r)}else{const l=h(f/D);return n.formatDistance("xYears",l,r)}}function We(e,t){return $e(e,Le(e),t)}const Te={investment:{icon:i.jsx(de,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.investment")}},accounting:{icon:i.jsx(ae,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.accounting")}},healthcare:{icon:i.jsx(je,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.healthcare")}},legal:{icon:i.jsx(De,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.legal")}},software:{icon:i.jsx(Y,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.software")}},security:{icon:i.jsx(te,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.security")}},role_play:{icon:i.jsx(T,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.role_play")}},personal_assistance:{icon:i.jsx(ee,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.personal_assistance")}},education:{icon:i.jsx(Ae,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.education")}},marketing:{icon:i.jsx(Se,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.marketing")}},sales:{icon:i.jsx(qe,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.sales")}},research:{icon:i.jsx(we,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.research")}},analysis:{icon:i.jsx(me,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.analysis")}},management:{icon:i.jsx(ge,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.management")}},social_media:{icon:i.jsx(pe,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.social_media")}},other:{icon:i.jsx(be,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.other")}}};function x(e){const t=e.split("_").join(" ");return t.charAt(0).toUpperCase()+t.slice(1)}const Ee=e=>Te[e]??{icon:i.jsx($,{size:14,"aria-hidden":"true"}),label:x(e)},L="inline-flex min-h-5.5 items-center rounded-full border border-hairline bg-sunken px-2 text-meta leading-none",Xe=({tags:e,categories:t,className:o})=>{if(O(),(!e||e.length===0)&&(!t||t.length===0))return null;const a=new Set((t??[]).map(s=>x(s).toLowerCase())),n=(e??[]).filter(s=>!a.has(x(s).toLowerCase()));return i.jsxs("div",{className:p("relative flex flex-wrap items-center gap-1.5 overflow-hidden",o),"data-testid":"agent-tags-and-categories",children:[t?.map(s=>{const r=Ee(s);return i.jsxs("span",{className:p(L,"gap-1 font-medium text-ink-muted"),children:[r.icon,r.label]},s)}),n.map(s=>i.jsxs("span",{className:p(L,"gap-1 font-normal text-ink-dim"),children:[i.jsx($,{size:12,"aria-hidden":"true"}),x(s)]},s))]})},et=({orgName:e,className:t})=>(O(),i.jsxs(R,{variant:"neutral",className:p("gap-1",t),"data-testid":"agent-org-badge",title:e?c("ui.hub.taxonomy.origin.named",{name:e}):c("ui.hub.taxonomy.origin.unnamed"),children:[i.jsx(T,{"aria-hidden":"true"}),e??c("ui.hub.taxonomy.origin.organization")]})),He=new Set(["qa","ai","api","tui","ux","ui"]),H=/[._-]+/,tt=e=>e.toLowerCase().replace(H," "),Ke=e=>e.split(H).filter(Boolean).map(t=>He.has(t.toLowerCase())?t.toUpperCase():t.charAt(0).toUpperCase()+t.slice(1)).join(" "),at=e=>Ke(e),_={all:["agent-statuses"],page:e=>[..._.all,"page",[...e]]},Fe=e=>[...new Set(e)].sort(),nt=({agentIds:e,enabled:t=!0})=>{const{isAuthenticated:o}=w(),a=e.join(","),n=P.useMemo(()=>Fe(e),[a]),s=Z({queryKey:_.page(n),queryFn:async()=>(await ne(n)).result?.statuses??{},enabled:t&&o&&n.length>0,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:!1});return{...s,statuses:s.data??{},isKnown:s.isSuccess}},st=(e,t,o)=>o?e&&t[o]!==void 0:!1,K=(e,t,o)=>{e.setQueriesData({queryKey:_.all},a=>{if(!a)return a;const n=a[t]??{liked:!1,favourited:!1};return{...a,[t]:{...n,...o}}})},j=(e,{agentId:t,field:o,delta:a})=>{e.setQueriesData({queryKey:ce.all},n=>{if(!n)return n;const s=n.result?.records??[];return s.some(r=>r.id===t)?{...n,result:{...n.result,records:s.map(r=>r.id===t?{...r,[o]:Math.max(0,(r[o]??0)+a)}:r)}}:n})},ot=()=>{const e=M(),{isAuthenticated:t}=w();return A({mutationFn:async({agentId:a,isCurrentlyFavourited:n})=>{if(!t)throw new Error("Authentication required to favourite/unfavourite an agent.");if(!a)throw new Error("Agent ID is required.");return n?(await se(a),{favourited:!1,changed:!0}):{favourited:!0,changed:(await oe(a)).result?.already_favourited!==!0}},onSuccess:({favourited:a,changed:n},s)=>{K(e,s.agentId,{favourited:a}),n&&j(e,{agentId:s.agentId,field:"favourite_count",delta:a?1:-1})}})},rt=()=>{const e=M(),{isAuthenticated:t}=w();return A({mutationFn:async({agentId:a,isCurrentlyLiked:n})=>{if(!t)throw new Error("Authentication required to like/unlike an agent.");if(!a)throw new Error("Agent ID is required.");return n?(await re(a),{liked:!1,changed:!0}):{liked:!0,changed:(await ie(a)).result?.already_liked!==!0}},onSuccess:({liked:a,changed:n},s)=>{K(e,s.agentId,{liked:a}),n&&j(e,{agentId:s.agentId,field:"like_count",delta:a?1:-1})}})},Re=(e,t)=>{const o=[];for(const[,a]of e.getQueriesData({queryKey:E}))for(const n of a?.agents??[])n.id!==t&&o.push(n.name);return o},it=()=>{const e=M(),t=G();return A({mutationFn:async({agentId:a})=>{if(!I.baseUrl)throw new Error("Local Operator API URL is not configured.");return X.downloadAgentFromRadient(I.baseUrl,a)},onSuccess:(a,n)=>{const s=a.result,r=s?.name?.trim()||n.agentName?.trim()||"Agent",m=s?.renamed_from?.trim()||null,y=s?.id?ue(r,Re(e,s.id)):null;m?q(`Downloaded "${r}" — you already have an agent called "${m}".`):y?J(`Downloaded "${r}". You already have an agent called "${y}", so two agents now answer to that name and either may be picked. Rename one of them.`):q(`Downloaded "${r}" from the hub.`),e.invalidateQueries({queryKey:E}),j(e,{agentId:n.agentId,field:"download_count",delta:1}),a.result?.id?(W.getState().stageDraft({kind:"agent",name:r}),t("/chat")):console.warn("Downloaded agent ID not found in response, cannot navigate to chat.")}})};export{Xe as A,Te as C,Je as H,et as O,rt as a,ot as b,it as c,We as d,Ee as e,$e as f,at as h,st as i,tt as n,nt as u};
61
+ */const ve=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],Ie=d("shopping-cart",ve);function qe(e,t){const o=+N(e)-+N(t);return o<0?-1:o>0?1:o}function Le(e){return U(e,Date.now())}function Oe(e){return t=>{const a=(e?Math[e]:Math.trunc)(t);return a===0?0:a}}function $e(e,t,o){const a=B(),n=o?.locale??a.locale??V,s=qe(e,t);if(isNaN(s))throw new RangeError("Invalid time value");const r=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:s}),[m,y]=Q(o?.in,...s>0?[t,e]:[e,t]),h=Oe(o?.roundingMethod??"round"),b=y.getTime()-m.getTime(),g=b/v,R=z(y)-z(m),f=(b-R)/v,k=o?.unit;let u;if(k?u=k:g<1?u="second":g<60?u="minute":g<S?u="hour":f<C?u="day":f<D?u="month":u="year",u==="second"){const l=h(b/1e3);return n.formatDistance("xSeconds",l,r)}else if(u==="minute"){const l=h(g);return n.formatDistance("xMinutes",l,r)}else if(u==="hour"){const l=h(g/60);return n.formatDistance("xHours",l,r)}else if(u==="day"){const l=h(f/S);return n.formatDistance("xDays",l,r)}else if(u==="month"){const l=h(f/C);return l===12&&k!=="month"?n.formatDistance("xYears",1,r):n.formatDistance("xMonths",l,r)}else{const l=h(f/D);return n.formatDistance("xYears",l,r)}}function Je(e,t){return $e(e,Le(e),t)}const Te={investment:{icon:i.jsx(de,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.investment")}},accounting:{icon:i.jsx(ae,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.accounting")}},healthcare:{icon:i.jsx(je,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.healthcare")}},legal:{icon:i.jsx(De,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.legal")}},software:{icon:i.jsx(Y,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.software")}},security:{icon:i.jsx(te,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.security")}},role_play:{icon:i.jsx(T,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.role_play")}},personal_assistance:{icon:i.jsx(ee,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.personal_assistance")}},education:{icon:i.jsx(Ae,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.education")}},marketing:{icon:i.jsx(Se,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.marketing")}},sales:{icon:i.jsx(Ie,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.sales")}},research:{icon:i.jsx(we,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.research")}},analysis:{icon:i.jsx(me,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.analysis")}},management:{icon:i.jsx(ge,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.management")}},social_media:{icon:i.jsx(pe,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.social_media")}},other:{icon:i.jsx(be,{size:14,"aria-hidden":"true"}),get label(){return c("ui.hub.taxonomy.category.other")}}};function x(e){const t=e.split("_").join(" ");return t.charAt(0).toUpperCase()+t.slice(1)}const Ee=e=>Te[e]??{icon:i.jsx($,{size:14,"aria-hidden":"true"}),label:x(e)},L="inline-flex min-h-5.5 items-center rounded-full border border-hairline bg-sunken px-2 text-meta leading-none",Xe=({tags:e,categories:t,className:o})=>{if(O(),(!e||e.length===0)&&(!t||t.length===0))return null;const a=new Set((t??[]).map(s=>x(s).toLowerCase())),n=(e??[]).filter(s=>!a.has(x(s).toLowerCase()));return i.jsxs("div",{className:p("relative flex flex-wrap items-center gap-1.5 overflow-hidden",o),"data-testid":"agent-tags-and-categories",children:[t?.map(s=>{const r=Ee(s);return i.jsxs("span",{className:p(L,"gap-1 font-medium text-ink-muted"),children:[r.icon,r.label]},s)}),n.map(s=>i.jsxs("span",{className:p(L,"gap-1 font-normal text-ink-dim"),children:[i.jsx($,{size:12,"aria-hidden":"true"}),x(s)]},s))]})},et=({orgName:e,className:t})=>(O(),i.jsxs(F,{variant:"neutral",className:p("gap-1",t),"data-testid":"agent-org-badge",title:e?c("ui.hub.taxonomy.origin.named",{name:e}):c("ui.hub.taxonomy.origin.unnamed"),children:[i.jsx(T,{"aria-hidden":"true"}),e??c("ui.hub.taxonomy.origin.organization")]})),He=new Set(["qa","ai","api","tui","ux","ui"]),H=/[._-]+/,tt=e=>e.toLowerCase().replace(H," "),Ke=e=>e.split(H).filter(Boolean).map(t=>He.has(t.toLowerCase())?t.toUpperCase():t.charAt(0).toUpperCase()+t.slice(1)).join(" "),at=e=>Ke(e),_={all:["agent-statuses"],page:e=>[..._.all,"page",[...e]]},Re=e=>[...new Set(e)].sort(),nt=({agentIds:e,enabled:t=!0})=>{const{isAuthenticated:o}=w(),a=e.join(","),n=P.useMemo(()=>Re(e),[a]),s=Z({queryKey:_.page(n),queryFn:async()=>(await ne(n)).result?.statuses??{},enabled:t&&o&&n.length>0,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:!1});return{...s,statuses:s.data??{},isKnown:s.isSuccess}},st=(e,t,o)=>o?e&&t[o]!==void 0:!1,K=(e,t,o)=>{e.setQueriesData({queryKey:_.all},a=>{if(!a)return a;const n=a[t]??{liked:!1,favourited:!1};return{...a,[t]:{...n,...o}}})},j=(e,{agentId:t,field:o,delta:a})=>{e.setQueriesData({queryKey:ce.all},n=>{if(!n)return n;const s=n.result?.records??[];return s.some(r=>r.id===t)?{...n,result:{...n.result,records:s.map(r=>r.id===t?{...r,[o]:Math.max(0,(r[o]??0)+a)}:r)}}:n})},ot=()=>{const e=M(),{isAuthenticated:t}=w();return A({mutationFn:async({agentId:a,isCurrentlyFavourited:n})=>{if(!t)throw new Error("Authentication required to favourite/unfavourite an agent.");if(!a)throw new Error("Agent ID is required.");return n?(await se(a),{favourited:!1,changed:!0}):{favourited:!0,changed:(await oe(a)).result?.already_favourited!==!0}},onSuccess:({favourited:a,changed:n},s)=>{K(e,s.agentId,{favourited:a}),n&&j(e,{agentId:s.agentId,field:"favourite_count",delta:a?1:-1})}})},rt=()=>{const e=M(),{isAuthenticated:t}=w();return A({mutationFn:async({agentId:a,isCurrentlyLiked:n})=>{if(!t)throw new Error("Authentication required to like/unlike an agent.");if(!a)throw new Error("Agent ID is required.");return n?(await re(a),{liked:!1,changed:!0}):{liked:!0,changed:(await ie(a)).result?.already_liked!==!0}},onSuccess:({liked:a,changed:n},s)=>{K(e,s.agentId,{liked:a}),n&&j(e,{agentId:s.agentId,field:"like_count",delta:a?1:-1})}})},Fe=(e,t)=>{const o=[];for(const[,a]of e.getQueriesData({queryKey:E}))for(const n of a?.agents??[])n.id!==t&&o.push(n.name);return o},it=()=>{const e=M(),t=G();return A({mutationFn:async({agentId:a})=>{if(!q.baseUrl)throw new Error("Local Operator API URL is not configured.");return X.downloadAgentFromRadient(q.baseUrl,a)},onSuccess:(a,n)=>{const s=a.result,r=s?.name?.trim()||n.agentName?.trim()||"Agent",m=s?.renamed_from?.trim()||null,y=s?.id?ue(r,Fe(e,s.id)):null;m?I(`Downloaded "${r}" — you already have an agent called "${m}".`):y?W(`Downloaded "${r}". You already have an agent called "${y}", so two agents now answer to that name and either may be picked. Rename one of them.`):I(`Downloaded "${r}" from the hub.`),e.invalidateQueries({queryKey:E}),j(e,{agentId:n.agentId,field:"download_count",delta:1}),a.result?.id?(J.getState().stageDraft({kind:"agent",name:r}),t("/chat")):console.warn("Downloaded agent ID not found in response, cannot navigate to chat.")}})};export{Xe as A,Te as C,We as H,et as O,rt as a,ot as b,it as c,Je as d,Ee as e,$e as f,at as h,st as i,tt as n,nt as u};
@@ -1 +1 @@
1
- import{A as s,B as d,C as m,D as y}from"./conversation-input-sync-Dlf10JWF.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-oIWpPfzj.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-Dlf10JWF.js";import{r as n}from"./index-C9huVbt8.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-oIWpPfzj.js";import{r as n}from"./index-CsR1USrT.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-TBXZ6m8l.js";import{x as kt,v as Tt,y as Rt}from"./conversation-input-sync-Dlf10JWF.js";import"./index-C9huVbt8.js";import"./ui-preferences-store-BSjv1eml.js";import"./error-boundary-BCQ7FGQc.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-kSHzKq9G.js";import{x as kt,v as Tt,y as Rt}from"./conversation-input-sync-oIWpPfzj.js";import"./index-CsR1USrT.js";import"./ui-preferences-store-g6-xQ9NA.js";import"./error-boundary-BfL6ia-P.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-BZscABJW.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-C9huVbt8.js">
11
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-BSjv1eml.js">
12
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-D4VUczn2.js">
13
- <link rel="stylesheet" crossorigin href="./assets/index-DxyRyuQP.css">
9
+ <script type="module" crossorigin src="./assets/consoleCapture-B5s47GGM.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-CsR1USrT.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-g6-xQ9NA.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-D12eLWy7.js">
13
+ <link rel="stylesheet" crossorigin href="./assets/index-pufheB69.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-dNBOt_b9.js"></script>
45
- <link rel="modulepreload" crossorigin href="./assets/index-C9huVbt8.js">
46
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-BSjv1eml.js">
47
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BCQ7FGQc.js">
48
- <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-Dlf10JWF.js">
49
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-D4VUczn2.js">
50
- <link rel="stylesheet" crossorigin href="./assets/index-DxyRyuQP.css">
44
+ <script type="module" crossorigin src="./assets/index-CNvEPxPr.js"></script>
45
+ <link rel="modulepreload" crossorigin href="./assets/index-CsR1USrT.js">
46
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-g6-xQ9NA.js">
47
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-BfL6ia-P.js">
48
+ <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-oIWpPfzj.js">
49
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-D12eLWy7.js">
50
+ <link rel="stylesheet" crossorigin href="./assets/index-pufheB69.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-BRjexwGb.js"></script>
12
- <link rel="modulepreload" crossorigin href="./assets/index-C9huVbt8.js">
13
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BCQ7FGQc.js">
14
- <link rel="stylesheet" crossorigin href="./assets/index-DxyRyuQP.css">
11
+ <script type="module" crossorigin src="./assets/installer-BM-QRi7Y.js"></script>
12
+ <link rel="modulepreload" crossorigin href="./assets/index-CsR1USrT.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-BfL6ia-P.js">
14
+ <link rel="stylesheet" crossorigin href="./assets/index-pufheB69.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-DDoFzOhf.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-C9huVbt8.js">
11
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BCQ7FGQc.js">
12
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-BSjv1eml.js">
13
- <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-Dlf10JWF.js">
14
- <link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-D20-nQEA.js">
15
- <link rel="stylesheet" crossorigin href="./assets/index-DxyRyuQP.css">
9
+ <script type="module" crossorigin src="./assets/mini-DngBC0gl.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-CsR1USrT.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-BfL6ia-P.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-g6-xQ9NA.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-oIWpPfzj.js">
14
+ <link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-Ba7FspxL.js">
15
+ <link rel="stylesheet" crossorigin href="./assets/index-pufheB69.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.53",
3
+ "version": "0.34.55",
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",
@@ -89,7 +89,7 @@
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
91
  "test:window-glass": "node --test scripts/window-glass-cdp.test.mjs",
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/agent-messages-busy.test.mjs scripts/agent-messages-dialog.test.mjs scripts/agent-messages-model.test.mjs scripts/team-member-overrides.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-design-kit.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/supplement-image-grid.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 scripts/i18n/es-activation.test.mjs scripts/i18n/ru-activation.test.mjs scripts/i18n/vi-activation.test.mjs scripts/skill-row.test.mjs scripts/skill-seal-behaviour.test.mjs scripts/i18n/hi-activation.test.mjs scripts/i18n/zh-CN-activation.test.mjs scripts/projects-i18n-locale.test.mjs scripts/window-glass.test.mjs scripts/window-glass-main.test.mjs",
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/agent-messages-busy.test.mjs scripts/agent-messages-dialog.test.mjs scripts/agent-messages-model.test.mjs scripts/team-member-overrides.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/context-readout-monotonic.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/check-design-kit.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/supplement-image-grid.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 scripts/i18n/es-activation.test.mjs scripts/i18n/ru-activation.test.mjs scripts/i18n/vi-activation.test.mjs scripts/skill-row.test.mjs scripts/skill-seal-behaviour.test.mjs scripts/i18n/hi-activation.test.mjs scripts/i18n/zh-CN-activation.test.mjs scripts/projects-i18n-locale.test.mjs scripts/window-glass.test.mjs scripts/window-glass-main.test.mjs scripts/default-effort-options.test.mjs",
93
93
  "check-evidence": "node scripts/check-evidence.mjs",
94
94
  "check-evidence:parity": "node scripts/evidence-histogram-parity.mjs",
95
95
  "check-edit-diffs": "node scripts/check-edit-diffs.mjs",
@@ -1,11 +0,0 @@
1
- import{r as c,j as e,c as D,t as u}from"./index-C9huVbt8.js";import{aJ as cs,B as Ce,aL as Ve,bC as Ws,A as os,C as Z,ai as K,u as ae,a as Re,D as Ae,c as me,aG as Ie,d as Ee,bD as Ye,bE as Gs,aH as Js,bF as Zs,$ as ds,_ as $e,aP as us,bG as ce,br as Xs,bA as et,bH as st,aT as tt,bI as at}from"./conversation-input-sync-Dlf10JWF.js";import{P as nt}from"./page-header-Dl5IO6UP.js";import{c as ms,l as J,B as C,k as _,u as he,y as it,I as te,T as hs,A as X,m as ee,n as se,Y as lt,Z as rt,_ as ct,$ as ot,F as We,G as Ge,H as Je,J as Ze,K as Xe}from"./error-boundary-BCQ7FGQc.js";import{a as dt,p as xs,P as gs,u as ut}from"./publication-validation-cIO-Z0gj.js";import{h as W,O as mt,A as ht,d as xt,H as gt,a as bt,b as pt,c as ft,e as bs,C as jt,f as kt,n as yt,u as vt,i as Nt}from"./use-download-agent-mutation-Bik5KhXj.js";import{g as wt,aL as St,aK as Pt,aG as Se,aw as Tt,aq as ps,aM as _t}from"./index-dNBOt_b9.js";import{n as Pe,i as Ct,H as fs,p as es,o as js,u as Rt}from"./org-access-BVkMTwKq.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-CXnke9-r.js";import"./ui-preferences-store-BSjv1eml.js";import{R as Ns}from"./radient-auth-buttons-B1WkSc0e.js";import{f as Ft}from"./format-esAOn2VS.js";import{o as Ot,a as ss}from"./org-surface-gate-CV-1baVy.js";import"./en-US-CHJkXXr4.js";import"./book-open-CfuxuX-l.js";import"./console-mirror-D4VUczn2.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:m=!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}=Ce(),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",h=f?t?"Unlike agent":"Like agent":"Like state unavailable",E=f?n?"Unfavourite agent":"Favourite agent":"Favourite state unavailable",l=s.visibility==="org",p=W(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:m||!d||!f,"aria-label":h,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}=Ce(),[o,m]=c.useState(null),w=t?.liked??!1,y=t?.favourited??!1,j=bt(),N=pt(),x=ft(),f=()=>{!i||j.isPending||(m(null),j.mutate({agentId:s.id,isCurrentlyLiked:w},{onError:()=>m("like")}))},g=()=>{!i||N.isPending||(m(null),N.mutate({agentId:s.id,isCurrentlyFavourited:y},{onError:()=>m("favourite")}))},S=()=>{x.isPending||(m(null),x.mutate({agentId:s.id,agentName:s.name},{onError:()=>m("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,W(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})=>{he();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:u("ui.hub.taxonomy.heading")}),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"})}),u("ui.hub.taxonomy.all")]}),a.map(i=>{const o=bs(i),m=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:m}),o.label]},i)})]})]})},Fe=({page:s,count:t,onChange:n,ariaLabel:a="Agent pages"})=>{const i=c.useRef(null),o=c.useRef(null),m=c.useRef(null);return c.useEffect(()=>{const w=m.current;m.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&&(m.current="next"),n(s-1)},disabled:s<=1,"aria-label":"Previous page",children:[e.jsx(Ws,{"aria-hidden":"true"}),"Previous"]}),e.jsxs(C,{variant:"secondary",size:"sm",ref:o,onClick:()=>{s+1>=t&&(m.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 Kt(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 Qt(s,t){return ys(ks(s,"skills",t))}function Vt(s){return os({operation:"org_skills.list",tenantId:s})}function Yt(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]},xe=(s,t)=>t instanceof vs?t.status===null?!1:t.status>=500&&s<1:s<1,Wt=({page:s=1,perPage:t=ws,enabled:n=!0}={})=>{const a=Z({queryKey:oe.list(s,t),queryFn:()=>At(K.radientBaseUrl,s,t),select:i=>i.result,enabled:n,retry:xe,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(K.radientBaseUrl,s),select:a=>a.result,enabled:t&&!!s,retry:xe,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1});return{...n,team:n.data}};function ge(s){if(s.getQueryState(Ye.capabilities)?.status!=="success"||!me(s.getQueryData(Ye.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=Re();return Z({queryKey:["hub-skills",K.radientBaseUrl,s.visibility,s.tenantId,t],enabled:n&&!i.isError&&me(i.data,"hub_skills"),queryFn:async()=>{if(ge(a),s.visibility==="org"){const m=(await Vt(s.tenantId)).result;return{rows:m.skills,pages:1,contract:m.sync_contract}}const o=(await Kt(K.radientBaseUrl,t,20)).result;return{rows:o.records,pages:o.total_pages,contract:o.sync_contract}},staleTime:3e4,retry:s.visibility==="org"?Ae:xe,retryOnMount:!1,refetchOnWindowFocus:!1})}function Zt(s,t,n){const a=ae(),i=Re();return Z({queryKey:["hub-skill",K.radientBaseUrl,s.visibility,s.tenantId,t],enabled:n&&t!==null&&!i.isError&&me(i.data,"hub_skills"),queryFn:async()=>(ge(a),(s.visibility==="org"?await Yt(s.tenantId,t):await Qt(K.radientBaseUrl,t)).result),staleTime:3e4,retry:s.visibility==="org"?Ae:xe,retryOnMount:!1})}function Xt(){const s=ae();return Ie({mutationFn:t=>(ge(s),Ee({op:"hub.skillPull",requestId:t.requestId,hubId:t.remoteId,hubSource:K.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(Se,t.links)},onSettled:()=>{s.invalidateQueries({queryKey:Se}),s.invalidateQueries({queryKey:["desktop","skills"]})}})}function ea(){const s=ae();return Ie({mutationFn:t=>(ge(s),Ee({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:Se}),s.invalidateQueries({queryKey:["desktop","skills"]}),s.invalidateQueries({queryKey:["hub-skills"]}))}})}function sa({scope:s,source:t,verifiedCas:n,enabled:a=!0}){he();const i=c.useId(),[o,m]=c.useState(""),[w,y]=c.useState(""),[j,N]=c.useState(Pe),[x,f]=c.useState(null),[g,S]=c.useState(!1),d=ea(),T=c.useRef(null),R=Z({queryKey:["desktop","skills","hub-publication"],queryFn:()=>Ee({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(h=>({...h,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 h=setTimeout(()=>{f(null),S(!0)},Math.max(0,Math.min(Date.parse(x.expires_at)-Date.now(),2147483647)));return()=>clearTimeout(h)},[x]);const A=h=>{if(!a||d.isPending||!o||!w||h&&!I)return;const E=JSON.stringify({draft:P,receipt:h?x?.preview_receipt:null}),l=T.current&&T.current.tuple===E&&(h||d.error)?T.current:{tuple:E,id:crypto.randomUUID()};T.current=l,h||(f(null),S(!1)),d.mutate({requestId:l.id,draft:P,...h&&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:u("ui.hub.skills.publish_title")}),e.jsx("label",{htmlFor:`${i}-source`,className:"text-body-sm text-ink",children:u("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:h=>{m(h.target.value),y(h.target.value),f(null),N(E=>({...E,autoPush:!1,confirmPublicEgress:!1}))},children:[e.jsx("option",{value:"",children:u("ui.hub.skills.select_authored")}),R.data?.data.skills.map(h=>e.jsx("option",{value:h.name,children:h.name},h.name))]}),e.jsx("label",{htmlFor:`${i}-alias`,className:"text-body-sm text-ink",children:u("ui.hub.subscriptions.alias")}),e.jsx(te,{id:`${i}-alias`,"data-testid":"hub-skill-publish-alias",value:w,disabled:d.isPending||!a,onChange:h=>{y(h.target.value),N(E=>({...E,autoPush:!1,confirmPublicEgress:!1}))}}),e.jsx("p",{className:"text-meta text-ink-muted",children:u("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:u("ui.hub.skills.loading")}),R.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:u("ui.hub.status.other_error")}),d.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:u("ui.hub.links.action_failed",{direction:u("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:u("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:u("ui.hub.links.preview_payload",{source:t})}),e.jsx(hs,{readOnly:!0,rows:12,"aria-label":u("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((h,E)=>e.jsx("p",{className:"break-words text-body-sm text-warning",children:h},`${E}-${h}`)),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:u("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)?u("ui.hub.links.published",{item:d.data.link?.name??w,source:d.data.link?ps(d.data.link):t}):u("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:u("ui.hub.subscriptions.preview_publish")}),e.jsx(C,{"data-testid":"hub-skill-publish-confirm",disabled:!a||d.isPending||!I,onClick:()=>A(!0),children:u("ui.hub.links.confirm_publish")})]})]})}function ta({scope:s,signedIn:t,accessible:n=!0}){he();const a=c.useId(),[i,o]=c.useState(1),[m,w]=c.useState(""),[y,j]=c.useState(null),[N,x]=c.useState(""),[f,g]=c.useState(Pe),S=c.useRef(null),d=s.visibility==="public"?u("ui.hub.links.source_public"):s.organization?u("ui.hub.links.source_private",{organization:s.organization}):u("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,h=(T.data?.rows??[]).filter(l=>`${l.name} ${l.description}`.toLocaleLowerCase().includes(m.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:u("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:u("ui.hub.status.no_credential")}):e.jsxs(e.Fragment,{children:[e.jsx("label",{className:"sr-only",htmlFor:`${a}-search`,children:u("ui.hub.skills.search")}),e.jsx(te,{id:`${a}-search`,"data-testid":"hub-skill-search",value:m,placeholder:u("ui.hub.skills.search"),onChange:l=>w(l.target.value)}),e.jsx("p",{className:"text-meta text-ink-muted",children:u("ui.hub.skills.search_loaded")}),T.isLoading&&e.jsx("output",{className:"min-h-20 text-body-sm text-ink-muted",children:u("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:u("ui.hub.skills.catalogue_failed",{source:d})}),e.jsx(C,{variant:"outline",disabled:T.isFetching,onClick:()=>void T.refetch(),children:u("ui.hub.links.retry")})]}),T.isSuccess&&!R&&e.jsx("p",{className:"text-body-sm text-warning",children:u("ui.hub.skills.unavailable")}),R&&e.jsxs(e.Fragment,{children:[h.length===0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:u(m?"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:h.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(Pe()),b.reset()},children:u("ui.hub.skills.open_detail",{item:l.name})})]},l.id))}),e.jsx(Fe,{page:i,count:T.data?.pages??1,onChange:o,ariaLabel:u("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:u("ui.hub.skills.loading")}),k.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:u("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:u("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:u("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:u("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:u("ui.hub.subscriptions.create_copy")})]}),!t&&e.jsx("p",{className:"text-meta text-ink-muted",children:u("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:u("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:u("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:u("ui.hub.skills.session_selection")})]}),!n&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:u("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:Ae});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 Ie({mutationFn:async({teamId:t,tenantId:n})=>{if(!K.baseUrl)throw new Error("Local Operator API URL is not configured.");return Zs.pullOrgTeamFromRadient(K.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,Te=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},_e=240,ra=_e/2,ca=(s,t)=>{if(t||s.length<=_e)return s;const n=s.slice(0,_e),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:m,refetch:w}=Ps({tenantId:s}),y=js(m),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]),h=(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(Ne,{}),e.jsx(Ne,{}),e.jsx(Ne,{})]}),!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.",m)}),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 ${W(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??`"${W(l.name)}" could not be pulled.`}),A?.actions.filter(p=>ma.includes(p)).map(p=>e.jsx(C,{variant:"primary",size:"sm",onClick:()=>h(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:Te(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,m)=>e.jsxs("span",{children:[m>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:W(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]})},Ne=()=>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:m,isLoading:w,isFetching:y,isError:j,error:N,refetch:x,pagination:f}=Wt({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?m.filter(v=>W(v.name).toLowerCase().includes(P)||(v.description??"").toLowerCase().includes(P)):m,[m,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)}))},h=c.useMemo(()=>{if(!ds(g.error))return null;const v=m.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,m]),E=h?.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&&m.length===0,q=f?.totalRecords??m.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(we,{}),e.jsx(we,{}),e.jsx(we,{})]}),!$&&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&&m.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&&m.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 ${m.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:h,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:m,onTreatmentAction:w,reauthenticating:y,onReauthenticated:j,pullButtonRef:N})=>{const[x,f]=c.useState(!1),g=Gt({teamId:x?s.id:void 0}),S=W(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:Te(s),children:e.jsx("span",{className:"truncate text-ink-muted",children:Te(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}),m?.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}`))]})]})]})},we=()=>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,Y="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}=Ce(),[n,a]=c.useState(1),[i]=c.useState(12),[o,m]=c.useState(null),[w,y]=c.useState(""),[j,N]=c.useState("name"),[x,f]=c.useState(re[0].value),[g,S]=c.useState(Y),[d,T]=c.useState("agents");he();const[R,k]=c.useState([]),b=va(w,wa),P=re.find(r=>r.value===x)??re[0],I=Re(),A=!I.isError&&me(I.data,"hub_skills"),h=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===Y||$.some(r=>r.tenant_id===g);c.useEffect(()=>{!q&&h!=="skills"&&S(Y)},[q,h]);const F=g===Y?null:$.find(r=>r.tenant_id===g)??null,z=F?.tenant_id,v=F?.tenant_name||null,O=o!==null||b!=="",be=Ps({tenantId:z}),ne=z&&be.isSuccess&&!O?be.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:Q,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(Q):null,le=Os??[],Le=U&&ie!==void 0,{statuses:ze,isKnown:zs,isError:Ms,isFetching:pe,refetch:Ds}=vt({agentIds:z?[]:le.map(r=>r.id)}),fe=c.useRef(null),je=c.useRef(null),[Me,qs]=c.useState(0);c.useEffect(()=>{Me!==0&&(fe.current??je.current)?.focus()},[Me]);const De=c.useRef(null),ke=c.useRef(!1),ye=c.useMemo(()=>[...new Set((ie?.records??[]).flatMap(r=>r.categories??[]))],[ie]);c.useEffect(()=>{k(r=>ye.every(V=>r.includes(V))?r:[...new Set([...r,...ye])])},[ye]);const Us=()=>{m(null),y(""),a(1),qs(r=>r+1)},M=(Ls||U)&&ie===void 0,qe=!M&&!O&&(Q!==null||le.length===0);c.useEffect(()=>{!ke.current||M||(ke.current=!1,Q?De.current?.focus():(fe.current??je.current)?.focus())},[M,Q]);const Ue=c.useRef(null),Bs=r=>{a(r),Ue.current?.scrollIntoView({block:"nearest"})},Hs=r=>{m(r),a(1)},Ks=r=>{y(r),a(1)},Qs=r=>{S(r),a(1)},Be=c.useRef(new Map),Vs=r=>{N(r),a(1)},He=B&&!O?B.totalRecords:null,ve=z?`shared with ${v??"this organization"}`:"in the public hub",Ke=(r,V)=>`${r} ${V}${r===1?"":"s"} ${ve}`;let H;return h==="skills"?H=" ":h==="teams"?z?be.isLoading?H="Loading teams…":ne!==null?H=Ke(ne,"team"):H=`Teams ${ve}`:H=" ":M?H="Loading agents…":B?H=Ke(B.totalRecords,"agent"):H=`Agents ${ve}`,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:h,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":h===r?rs:void 0,"data-testid":`agent-hub-view-${r}`,children:[r==="agents"?"Agents":r==="teams"?"Teams":u("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:Y,label:"Public hub",Icon:at},...$.map(r=>({value:r.tenant_id,label:r.tenant_name||"Organization",Icon:zt}))].map(({value:r,label:V,Icon:Ys})=>e.jsxs(C,{ref:Qe=>{Qe?Be.current.set(r,Qe):Be.current.delete(r)},variant:"ghost",size:"sm","aria-pressed":g===r,onClick:()=>Qs(r),title:V,"data-testid":`agent-hub-scope-${r===Y?"public":`org-${r}`}`,className:D("max-w-48",g===r&&"bg-surface text-ink hover:bg-surface"),children:[e.jsx(Ys,{"aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:V})]},r))})]})]})]}),e.jsx(ot,{id:rs,labelledBy:ls[h],children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-row overflow-hidden",children:[h==="agents"&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"mr-6 hidden w-60 shrink-0 rounded-md bg-surface p-2 md:block","data-glass-region":"panel","data-tour-tag":"agent-hub-sidebar-container",children:!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:[h==="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:fe,type:"search",value:w,onChange:r=>Ks(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(We,{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(We,{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,h==="agents"&&Le?e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{"data-testid":"agent-hub-updating",children:"Updating…"})]}):null]}),h==="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:pe,"aria-busy":pe,children:pe?"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&&Q&&!G?"block":"sr-only"),children:!M&&Q&&!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.",Q):"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:()=>{ke.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&&!Q&&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:je,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})]}),h==="skills"&&(A?e.jsx(ta,{scope:g===Y?{visibility:"public",tenantId:null,organization:null}:{visibility:"org",tenantId:g,organization:v},signedIn:t,accessible:q&&(g===Y||ss(l))},`skills:${g}`):e.jsx("p",{className:"text-body-sm text-warning",children:u("ui.hub.skills.unavailable")})),h==="teams"&&(F?e.jsx(ha,{tenantId:F.tenant_id,orgName:v}):e.jsx(ja,{signedIn:t,onOpenSettings:()=>s("/settings")}))]})]})})]})]})};export{Ua as AgentHubPage};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-C9huVbt8.js";import{B as o}from"./index-dNBOt_b9.js";import"./conversation-input-sync-Dlf10JWF.js";import"./ui-preferences-store-BSjv1eml.js";import"./error-boundary-BCQ7FGQc.js";import"./console-mirror-D4VUczn2.js";const m=()=>r.jsx(o,{tabScope:"all",requestScope:"all",hostSessionId:null,isRoutePage:!0,surfaceTag:"browser-route",dockSurfaceTag:"browser-approvals-dock"});export{m as BrowserPage};
@@ -1 +0,0 @@
1
- import{U as a,C as n}from"./mermaid.core-TBXZ6m8l.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-B7eDvfbn.js";import{_ as i}from"./mermaid.core-TBXZ6m8l.js";import"./chunk-RZ5BOZE2-D9-5Iwp7.js";import"./conversation-input-sync-Dlf10JWF.js";import"./ui-preferences-store-BSjv1eml.js";import"./index-C9huVbt8.js";import"./error-boundary-BCQ7FGQc.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-B7eDvfbn.js";import{_ as i}from"./mermaid.core-TBXZ6m8l.js";import"./chunk-RZ5BOZE2-D9-5Iwp7.js";import"./conversation-input-sync-Dlf10JWF.js";import"./ui-preferences-store-BSjv1eml.js";import"./index-C9huVbt8.js";import"./error-boundary-BCQ7FGQc.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1 +0,0 @@
1
- import{b as r}from"./_baseUniq-D1oOSrqB.js";var e=4;function a(o){return r(o,e)}export{a as c};