local-operator-ui 0.30.35 → 0.31.1

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 (102) hide show
  1. package/out/main/index.js +826 -11
  2. package/out/preload/index.js +77 -0
  3. package/out/renderer/assets/{_basePickBy-DBMIejg7.js → _basePickBy-Crl5Z_Pk.js} +1 -1
  4. package/out/renderer/assets/{_baseUniq-BcqrDipQ.js → _baseUniq-lQY3ywEZ.js} +1 -1
  5. package/out/renderer/assets/{agent-details-page-CKouhYcx.js → agent-details-page-BzDE7WbM.js} +2 -2
  6. package/out/renderer/assets/agent-hub-page-DR48vILu.js +6 -0
  7. package/out/renderer/assets/agents-page-BfwkfrEO.js +2 -0
  8. package/out/renderer/assets/{arc-C7db1al4.js → arc-gshxvskr.js} +1 -1
  9. package/out/renderer/assets/architectureDiagram-IEHRJDOE-C3dQvrMH.js +36 -0
  10. package/out/renderer/assets/{blockDiagram-JOT3LUYC-DFXKZ0Pd.js → blockDiagram-JOT3LUYC-DQTNXYLN.js} +1 -1
  11. package/out/renderer/assets/book-open-CykMtqSE.js +6 -0
  12. package/out/renderer/assets/brand-mark-Bv0Hu-Cz.png +0 -0
  13. package/out/renderer/assets/browser-page-7T5O7_eK.js +1 -0
  14. package/out/renderer/assets/browser-webauthn-prompt-DzDALs8L.js +1 -0
  15. package/out/renderer/assets/{c4Diagram-VJAJSXHY-DREcsmeA.js → c4Diagram-VJAJSXHY-DeNuMdtv.js} +1 -1
  16. package/out/renderer/assets/channel-B1YKOpml.js +1 -0
  17. package/out/renderer/assets/{chunk-4BMEZGHF-1AW6sHDl.js → chunk-4BMEZGHF-CfQJf7ZV.js} +1 -1
  18. package/out/renderer/assets/{chunk-A2AXSNBT-BHYmovGQ.js → chunk-A2AXSNBT-QLV_8ftp.js} +1 -1
  19. package/out/renderer/assets/{chunk-AEK57VVT-VSZdczYO.js → chunk-AEK57VVT-CYj_TvcV.js} +1 -1
  20. package/out/renderer/assets/{chunk-D6G4REZN-CHy8bDy2.js → chunk-D6G4REZN-BTwxHZFL.js} +1 -1
  21. package/out/renderer/assets/{chunk-RZ5BOZE2-D7gxwymY.js → chunk-RZ5BOZE2-JwBm2JL9.js} +1 -1
  22. package/out/renderer/assets/{chunk-XZIHB7SX-Bu9gT-3-.js → chunk-XZIHB7SX-DPAqSKiB.js} +1 -1
  23. package/out/renderer/assets/classDiagram-GIVACNV2-BwbP74kr.js +1 -0
  24. package/out/renderer/assets/classDiagram-v2-COTLJTTW-BwbP74kr.js +1 -0
  25. package/out/renderer/assets/clone-CkMWxgkB.js +1 -0
  26. package/out/renderer/assets/compact-pagination-B0hoPapl.js +1 -0
  27. package/out/renderer/assets/{console-mirror-Bjpk3DAz.js → console-mirror-naCglSJA.js} +14 -14
  28. package/out/renderer/assets/{consoleCapture-B-P-8vPw.js → consoleCapture-BmsgtbeJ.js} +1 -1
  29. package/out/renderer/assets/dagre-OKDRZEBW-BNS66odd.js +4 -0
  30. package/out/renderer/assets/diagram-SSKATNLV-TQ8UWNaL.js +43 -0
  31. package/out/renderer/assets/diagram-VNBRO52H-zxD3pv8s.js +24 -0
  32. package/out/renderer/assets/en-US-BkS8Ixxl.js +1 -0
  33. package/out/renderer/assets/{erDiagram-Q7BY3M3F-Dzwd2fLB.js → erDiagram-Q7BY3M3F-VXo3Cqqj.js} +1 -1
  34. package/out/renderer/assets/error-boundary-Du4Xf2hu.js +126 -0
  35. package/out/renderer/assets/{flowDiagram-4HSFHLVR-DpqxYeov.js → flowDiagram-4HSFHLVR-CAdzCrMJ.js} +1 -1
  36. package/out/renderer/assets/{ganttDiagram-APWFNJXF-CJqzp0mX.js → ganttDiagram-APWFNJXF-CGVbBlO6.js} +3 -3
  37. package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-DbLEZe6o.js +65 -0
  38. package/out/renderer/assets/{graph-BKZN53d3.js → graph-Do1SGRQn.js} +1 -1
  39. package/out/renderer/assets/index-1qEdZEMQ.js +1 -0
  40. package/out/renderer/assets/index-CSPo12AE.css +1 -0
  41. package/out/renderer/assets/{index-7OErfuvQ.js → index-CZlj7Oq2.js} +1 -1
  42. package/out/renderer/assets/index-DjpNajWu.js +7 -0
  43. package/out/renderer/assets/index-OpIz2cV2.css +1 -0
  44. package/out/renderer/assets/{index-C6pxQu_W.js → index-YQ32HBTm.js} +408 -447
  45. package/out/renderer/assets/infoDiagram-PH2N3AL5-CuB0GSNM.js +2 -0
  46. package/out/renderer/assets/installer-Cu5fgVHl.js +1 -0
  47. package/out/renderer/assets/{journeyDiagram-U35MCT3I-BG7areA5.js → journeyDiagram-U35MCT3I-BqN69StY.js} +1 -1
  48. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-BgMtdkNP.js → kanban-definition-NDS4AKOZ-CO2S4ykb.js} +1 -1
  49. package/out/renderer/assets/{layout-Bw_CgLbc.js → layout-7oQ5xKpW.js} +1 -1
  50. package/out/renderer/assets/{legacy-agents-page-NU8mTf6U.js → legacy-agents-page-B-wHGQFq.js} +4 -4
  51. package/out/renderer/assets/{mermaid.core-Dz6HoxZc.js → mermaid.core-SWP-HDAp.js} +19 -19
  52. package/out/renderer/assets/mindmap-definition-ALO5MXBD-ClOBpdLn.js +95 -0
  53. package/out/renderer/assets/{page-header-CYtvpazS.js → page-header-dIIc14HB.js} +1 -1
  54. package/out/renderer/assets/parseISO-BWtr7JL9.js +1 -0
  55. package/out/renderer/assets/{pieDiagram-IB7DONF6-DR4ycBv-.js → pieDiagram-IB7DONF6-UfaIVAHl.js} +1 -1
  56. package/out/renderer/assets/publication-validation-7J4xzRVZ.js +1 -0
  57. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-DeXlOkVg.js → quadrantDiagram-7GDLP6J5-CFqb2JGS.js} +1 -1
  58. package/out/renderer/assets/{radar-MK3ICKWK-Dr73Vn9F.js → radar-MK3ICKWK-B10S5swo.js} +1 -1
  59. package/out/renderer/assets/radient-auth-buttons-QWV7OGyX.js +6 -0
  60. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-DHeR1FW9.js → requirementDiagram-KVF5MWMF-BK2G66d1.js} +1 -1
  61. package/out/renderer/assets/sankeyDiagram-QLVOVGJD-D6ZCPpc5.js +10 -0
  62. package/out/renderer/assets/{schedules-page-C_-aK6li.js → schedules-page-CWzMhoam.js} +6 -6
  63. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-BBJ035AA.js → sequenceDiagram-X6HHIX6F-AtPuLuMe.js} +1 -1
  64. package/out/renderer/assets/settings-page-CAn17oJ5.js +307 -0
  65. package/out/renderer/assets/stateDiagram-DGXRK772-CeU2ihmd.js +1 -0
  66. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-a70Okwiy.js +1 -0
  67. package/out/renderer/assets/{timeline-definition-BDJGKUSR-BbDHYeOO.js → timeline-definition-BDJGKUSR-I9TCj8Py.js} +1 -1
  68. package/out/renderer/assets/use-download-agent-mutation-9tp697PV.js +61 -0
  69. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-B4F8fbBE.js → xychartDiagram-VJFVF3MP-COG1JJYK.js} +1 -1
  70. package/out/renderer/console-capture.html +4 -4
  71. package/out/renderer/index.html +6 -6
  72. package/out/renderer/installer.html +4 -4
  73. package/package.json +31 -2
  74. package/out/renderer/assets/agent-hub-page-CVdr01hB.js +0 -6
  75. package/out/renderer/assets/agents-page-HLrle3JE.js +0 -2
  76. package/out/renderer/assets/architectureDiagram-IEHRJDOE-CIccpocP.js +0 -36
  77. package/out/renderer/assets/browser-page-DA_7uhAS.js +0 -1
  78. package/out/renderer/assets/browser-webauthn-prompt-DIhdYBWb.js +0 -1
  79. package/out/renderer/assets/channel-Bpdhm4cc.js +0 -1
  80. package/out/renderer/assets/classDiagram-GIVACNV2-Dy2svcuX.js +0 -1
  81. package/out/renderer/assets/classDiagram-v2-COTLJTTW-Dy2svcuX.js +0 -1
  82. package/out/renderer/assets/clone-DnsDN_54.js +0 -1
  83. package/out/renderer/assets/compact-pagination-BRR4OtYY.js +0 -1
  84. package/out/renderer/assets/dagre-OKDRZEBW-CeR0cM5J.js +0 -4
  85. package/out/renderer/assets/diagram-SSKATNLV-Dhu6_Dgz.js +0 -43
  86. package/out/renderer/assets/diagram-VNBRO52H-R0bWQ_Bk.js +0 -24
  87. package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-PSAaXIbu.js +0 -65
  88. package/out/renderer/assets/icon-Cf2gAQ3W.js +0 -126
  89. package/out/renderer/assets/index-BIOY3qsR.css +0 -1
  90. package/out/renderer/assets/index-BV47Bsxl.js +0 -7
  91. package/out/renderer/assets/index-ByGvbPtr.css +0 -1
  92. package/out/renderer/assets/index-CeIHQLkR.js +0 -1
  93. package/out/renderer/assets/infoDiagram-PH2N3AL5-0WYVxV0b.js +0 -2
  94. package/out/renderer/assets/installer-DIgdF65j.js +0 -1
  95. package/out/renderer/assets/mindmap-definition-ALO5MXBD-C9GjbpP_.js +0 -95
  96. package/out/renderer/assets/parseISO-BIBIiSY3.js +0 -6
  97. package/out/renderer/assets/radient-auth-buttons--2wV70ya.js +0 -6
  98. package/out/renderer/assets/sankeyDiagram-QLVOVGJD-BwC3hgaf.js +0 -10
  99. package/out/renderer/assets/settings-page-BxyC2IfK.js +0 -307
  100. package/out/renderer/assets/stateDiagram-DGXRK772-DAU2jfYz.js +0 -1
  101. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-DJY1Hfi_.js +0 -1
  102. package/out/renderer/assets/use-agent-like-mutation-asZxgbHQ.js +0 -1
@@ -0,0 +1 @@
1
+ import{s as W,a as P,S as N}from"./chunk-AEK57VVT-CYj_TvcV.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,u as U}from"./mermaid.core-SWP-HDAp.js";import{G as F}from"./graph-Do1SGRQn.js";import{l as O}from"./layout-7oQ5xKpW.js";import{G as J,H as X}from"./index-YQ32HBTm.js";import"./chunk-RZ5BOZE2-JwBm2JL9.js";import"./index-CZlj7Oq2.js";import"./_baseUniq-lQY3ywEZ.js";import"./_basePickBy-Crl5Z_Pk.js";import"./error-boundary-Du4Xf2hu.js";import"./console-mirror-naCglSJA.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),A=u(()=>Object.keys(L),"keys"),I=u(()=>A().length,"size"),$={get:Y,set:D,keys:A,size:I},j=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),q=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Z=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),K=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(x,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),c=Math.max(p.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",p.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Q=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),x=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let c=Math.max(p,x);c===x&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,p>x&&(l=(x-c)/2+o),Math.abs(a-B.x)<o&&p>x&&(l=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),p<=x&&s.attr("x",a+(c-n)/2-p/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const p=y.trim();if(p.length>0){const c=g.append("tspan");if(c.text(p),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),G=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&j(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&q(n),i.type==="default"&&i.descriptions.length===0&&Z(n,i),i.type==="default"&&i.descriptions.length>0&&K(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),_=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=J().x(function(s){return s.x}).y(function(s){return s.y}).curve(X),x=e.append("path").attr("d",g(n)).attr("id","edge"+_).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),x.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:p}=U.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",p+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,p+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,p)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",p+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",p-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}_++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const x=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,x,a,o);const p=b.padding,c=s.node().getBBox(),l=c.width+p*2,B=c.height+p*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,x)=>{const a=new F({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){y=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),c=x.db.getRelations(),l=Object.keys(p);for(const r of l){const f=p[r];d&&(f.parentId=d);let h;if(f.doc){let w=i.append("g").attr("id",f.id).attr("class","stateGroup");h=R(f.doc,w,f.id,!o,n,g,x);{w=Q(w,f,o);let v=w.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[f.id]={y:b.compositTitleSize}}}else h=G(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=G(i,w,a);f.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;c.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:dt(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),O(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),g.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},Bt={parser:P,get db(){return new N(1)},renderer:ot,styles:W,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{Bt as diagram};
@@ -0,0 +1 @@
1
+ import{s as r,b as e,a,S as s}from"./chunk-AEK57VVT-CYj_TvcV.js";import{_ as i}from"./mermaid.core-SWP-HDAp.js";import"./chunk-RZ5BOZE2-JwBm2JL9.js";import"./index-YQ32HBTm.js";import"./index-CZlj7Oq2.js";import"./error-boundary-Du4Xf2hu.js";import"./console-mirror-naCglSJA.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1,4 +1,4 @@
1
- import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-Dz6HoxZc.js";import{d as nt}from"./arc-C7db1al4.js";import"./index-C6pxQu_W.js";import"./index-7OErfuvQ.js";import"./icon-Cf2gAQ3W.js";import"./console-mirror-Bjpk3DAz.js";var Q=function(){var n=s(function(x,i,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],u={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,c,p,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:p.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:p.addTask(o[v],0,""),this.$=o[v];break;case 16:p.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:s(function(i){var a=this,c=[0],p=[],y=[null],o=[],w=this.table,v="",N=0,A=0,V=2,U=1,M=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(i,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var P=g.yylloc;o.push(P);var W=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=p.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(p=T,T=p.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,C,I,J,R={},B,$,et,O;;){if(C=c[c.length-1],this.defaultActions[C]?I=this.defaultActions[C]:((S===null||typeof S>"u")&&(S=tt()),I=w[C]&&w[C][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[C])this.terminals_[B]&&B>V&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`:
1
+ import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-SWP-HDAp.js";import{d as nt}from"./arc-gshxvskr.js";import"./index-YQ32HBTm.js";import"./index-CZlj7Oq2.js";import"./error-boundary-Du4Xf2hu.js";import"./console-mirror-naCglSJA.js";var Q=function(){var n=s(function(x,i,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],u={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,c,p,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:p.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:p.addTask(o[v],0,""),this.$=o[v];break;case 16:p.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:s(function(i){var a=this,c=[0],p=[],y=[null],o=[],w=this.table,v="",N=0,A=0,V=2,U=1,M=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(i,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var P=g.yylloc;o.push(P);var W=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=p.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(p=T,T=p.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,C,I,J,R={},B,$,et,O;;){if(C=c[c.length-1],this.defaultActions[C]?I=this.defaultActions[C]:((S===null||typeof S>"u")&&(S=tt()),I=w[C]&&w[C][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[C])this.terminals_[B]&&B>V&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`:
2
2
  `+g.showPosition()+`
3
3
  Expecting `+O.join(", ")+", got '"+(this.terminals_[S]||S)+"'":K="Parse error on line "+(N+1)+": Unexpected "+(S==U?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(K,{text:g.match,token:this.terminals_[S]||S,line:g.yylineno,loc:P,expected:O})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+S);switch(I[0]){case 1:c.push(S),y.push(g.yytext),o.push(g.yylloc),c.push(I[1]),S=null,A=g.yyleng,v=g.yytext,N=g.yylineno,P=g.yylloc;break;case 2:if($=this.productions_[I[1]][1],R.$=y[y.length-$],R._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},W&&(R._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),J=this.performAction.apply(R,[v,A,N,b.yy,I[1],y,o].concat(M)),typeof J<"u")return J;$&&(c=c.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),c.push(this.productions_[I[1]][0]),y.push(R.$),o.push(R._$),et=w[c[c.length-2]][c[c.length-1]],c.push(et);break;case 3:return!0}}return!0},"parse")},k=function(){var x={EOF:1,parseError:s(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,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:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=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 y=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===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -0,0 +1,61 @@
1
+ import{c as d}from"./error-boundary-Du4Xf2hu.js";import{t as q,c as H,n as K,a as z,g as Q,e as V,h as D,i as N,j as C,f as S}from"./en-US-BkS8Ixxl.js";import{j as i,c as A,r as Y}from"./index-CZlj7Oq2.js";import{aY as T,aZ as Z,U as B,a_ as G,a$ as W,b0 as h,am as b,g as E,b1 as X,b2 as J,f as _,ar as M,h as ee,as as I,b3 as te,b4 as F,b5 as $,b6 as ne}from"./index-YQ32HBTm.js";import{B as ae}from"./book-open-CykMtqSE.js";import{l as se}from"./publication-validation-7J4xzRVZ.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 oe=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],re=d("briefcase",oe);/**
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 ie=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],ce=d("chart-no-axes-column",ie);/**
12
+ * @license lucide-react v0.507.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const ue=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],le=d("clipboard-list",ue);/**
17
+ * @license lucide-react v0.507.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const de=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],he=d("earth",de);/**
22
+ * @license lucide-react v0.507.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const me=[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]],fe=d("file-question",me);/**
27
+ * @license lucide-react v0.507.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const ye=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],ge=d("flask-conical",ye);/**
32
+ * @license lucide-react v0.507.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const pe=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],ke=d("graduation-cap",pe);/**
37
+ * @license lucide-react v0.507.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const xe=[["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"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]],we=d("heart-pulse",xe);/**
42
+ * @license lucide-react v0.507.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const Ae=[["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"}]],Ze=d("heart",Ae);/**
47
+ * @license lucide-react v0.507.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const be=[["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"}]],_e=d("megaphone",be);/**
52
+ * @license lucide-react v0.507.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const Me=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],je=d("scale",Me);/**
57
+ * @license lucide-react v0.507.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
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 ze(e,t){const o=+q(e)-+q(t);return o<0?-1:o>0?1:o}function De(e){return H(e,Date.now())}function Ne(e){return t=>{const n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function Ce(e,t,o){const n=Q(),a=o?.locale??n.locale??V,s=ze(e,t);if(isNaN(s))throw new RangeError("Invalid time value");const r=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:s}),[f,g]=K(o?.in,...s>0?[t,e]:[e,t]),c=Ne("round"),u=g.getTime()-f.getTime(),p=u/S,P=z(g)-z(f),k=(u-P)/S,U=o?.unit;let m;if(p<1?m="second":p<60?m="minute":p<D?m="hour":k<N?m="day":k<C?m="month":m="year",m==="second"){const l=c(u/1e3);return a.formatDistance("xSeconds",l,r)}else if(m==="minute"){const l=c(p);return a.formatDistance("xMinutes",l,r)}else if(m==="hour"){const l=c(p/60);return a.formatDistance("xHours",l,r)}else if(m==="day"){const l=c(k/D);return a.formatDistance("xDays",l,r)}else if(m==="month"){const l=c(k/N);return l===12&&U!=="month"?a.formatDistance("xYears",1,r):a.formatDistance("xMonths",l,r)}else{const l=c(k/C);return a.formatDistance("xYears",l,r)}}function Be(e,t){return Ce(e,De(e),t)}const O={investment:{icon:i.jsx(re,{size:14,"aria-hidden":"true"}),label:"Investment"},accounting:{icon:i.jsx(ae,{size:14,"aria-hidden":"true"}),label:"Accounting"},healthcare:{icon:i.jsx(we,{size:14,"aria-hidden":"true"}),label:"Healthcare"},legal:{icon:i.jsx(je,{size:14,"aria-hidden":"true"}),label:"Legal"},software:{icon:i.jsx(W,{size:14,"aria-hidden":"true"}),label:"Software"},security:{icon:i.jsx(G,{size:14,"aria-hidden":"true"}),label:"Security"},role_play:{icon:i.jsx(B,{size:14,"aria-hidden":"true"}),label:"Role play"},personal_assistance:{icon:i.jsx(Z,{size:14,"aria-hidden":"true"}),label:"Personal assistance"},education:{icon:i.jsx(ke,{size:14,"aria-hidden":"true"}),label:"Education"},marketing:{icon:i.jsx(_e,{size:14,"aria-hidden":"true"}),label:"Marketing"},sales:{icon:i.jsx(qe,{size:14,"aria-hidden":"true"}),label:"Sales"},research:{icon:i.jsx(ge,{size:14,"aria-hidden":"true"}),label:"Research"},analysis:{icon:i.jsx(ce,{size:14,"aria-hidden":"true"}),label:"Analysis"},management:{icon:i.jsx(le,{size:14,"aria-hidden":"true"}),label:"Management"},social_media:{icon:i.jsx(he,{size:14,"aria-hidden":"true"}),label:"Social media"},other:{icon:i.jsx(fe,{size:14,"aria-hidden":"true"}),label:"Other"}};function x(e){const t=e.split("_").join(" ");return t.charAt(0).toUpperCase()+t.slice(1)}const Se=e=>O[e]??{icon:i.jsx(T,{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",Ge=({tags:e,categories:t,className:o})=>{if((!e||e.length===0)&&(!t||t.length===0))return null;const n=new Set((t??[]).map(s=>(O[s]?.label??x(s)).toLowerCase())),a=(e??[]).filter(s=>!n.has(x(s).toLowerCase()));return i.jsxs("div",{className:A("relative flex flex-wrap items-center gap-1.5 overflow-hidden",o),"data-testid":"agent-tags-and-categories",children:[t?.map(s=>{const r=Se(s);return i.jsxs("span",{className:A(L,"gap-1 font-medium text-ink-muted"),children:[r.icon,r.label]},s)}),a.map(s=>i.jsxs("span",{className:A(L,"gap-1 font-normal text-ink-dim"),children:[i.jsx(T,{size:12,"aria-hidden":"true"}),x(s)]},s))]})};function y(){return crypto.randomUUID()}async function Ie(e=1,t=20,o){const n={page:e,per_page:t};if(o)for(const[a,s]of Object.entries(o))s&&(n[a]=s);return h({operation:"agents.list",query:n})}async function We(e){return h({operation:"agents.get",agentId:e})}async function Xe(e){return h({operation:"agents.delete",agentId:e,requestId:y(),confirmed:!0})}async function $e(e){return h({operation:"agents.like",agentId:e,requestId:y()})}async function Le(e){return h({operation:"agents.unlike",agentId:e,requestId:y(),confirmed:!0})}async function Te(e){return h({operation:"agents.favourite",agentId:e,requestId:y()})}async function Ee(e){return h({operation:"agents.unfavourite",agentId:e,requestId:y(),confirmed:!0})}async function Je(e,t){return h({operation:"comments.create",agentId:e,payload:t,requestId:y()})}async function et(e,t=1,o=20){return h({operation:"comments.list",agentId:e,query:{page:t,per_page:o}})}async function tt(e,t,o){return h({operation:"comments.update",agentId:e,commentId:t,payload:o,requestId:y()})}async function nt(e,t){return h({operation:"comments.delete",agentId:e,commentId:t,requestId:y(),confirmed:!0})}async function Fe(e){return h({operation:"agents.statuses",query:{agent_ids:e.join(",")}})}const j={all:["agent-statuses"],page:e=>[...j.all,"page",[...e]]},Oe=e=>[...new Set(e)].sort(),at=({agentIds:e,enabled:t=!0})=>{const{isAuthenticated:o}=b(),n=e.join(","),a=Y.useMemo(()=>Oe(e),[n]),s=E({queryKey:j.page(a),queryFn:async()=>(await Fe(a)).result?.statuses??{},enabled:t&&o&&a.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,R=(e,t,o)=>{e.setQueriesData({queryKey:j.all},n=>{if(!n)return n;const a=n[t]??{liked:!1,favourited:!1};return{...n,[t]:{...a,...o}}})},Re="download_count",w={all:["public-agents"],list:e=>[...w.all,"list",{page:e.page,perPage:e.perPage,categories:e.categories?.join(",")??void 0,name:e.name??void 0,description:e.description??void 0,sort:e.sort,order:e.order}]},ot=e=>e.invalidateQueries({queryKey:w.all}),rt=({page:e=1,perPage:t=20,enabled:o=!0,categories:n,name:a,description:s,sort:r=Re,order:f="desc"}={})=>{const g={page:e,perPage:t,categories:n,name:a,description:s,sort:r,order:f},c=E({queryKey:w.list(g),queryFn:async()=>{const u={};return n&&n.length>0&&(u.categories=n.join(",")),a&&(u.name=a),s&&(u.description=s),u.sort=r,u.order=f,await Ie(e,t,u)},select:u=>u.result,enabled:o,retry:J,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,placeholderData:X});return{...c,agents:c.data?.records,isRefreshing:c.isFetching&&c.data!==void 0,pagination:c.data?{page:c.data.page,perPage:c.data.per_page,totalPages:c.data.total_pages,totalRecords:c.data.total_records}:void 0}},v=(e,{agentId:t,field:o,delta:n})=>{e.setQueriesData({queryKey:w.all},a=>{if(!a)return a;const s=a.result?.records??[];return s.some(r=>r.id===t)?{...a,result:{...a.result,records:s.map(r=>r.id===t?{...r,[o]:Math.max(0,(r[o]??0)+n)}:r)}}:a})},it=()=>{const e=_(),{isAuthenticated:t}=b();return M({mutationFn:async({agentId:n,isCurrentlyFavourited:a})=>{if(!t)throw new Error("Authentication required to favourite/unfavourite an agent.");if(!n)throw new Error("Agent ID is required.");return a?(await Ee(n),{favourited:!1,changed:!0}):{favourited:!0,changed:(await Te(n)).result?.already_favourited!==!0}},onSuccess:({favourited:n,changed:a},s)=>{R(e,s.agentId,{favourited:n}),a&&v(e,{agentId:s.agentId,field:"favourite_count",delta:n?1:-1})}})},ct=()=>{const e=_(),{isAuthenticated:t}=b();return M({mutationFn:async({agentId:n,isCurrentlyLiked:a})=>{if(!t)throw new Error("Authentication required to like/unlike an agent.");if(!n)throw new Error("Agent ID is required.");return a?(await Le(n),{liked:!1,changed:!0}):{liked:!0,changed:(await $e(n)).result?.already_liked!==!0}},onSuccess:({liked:n,changed:a},s)=>{R(e,s.agentId,{liked:n}),a&&v(e,{agentId:s.agentId,field:"like_count",delta:n?1:-1})}})},Pe=(e,t)=>{const o=[];for(const[,n]of e.getQueriesData({queryKey:F}))for(const a of n?.agents??[])a.id!==t&&o.push(a.name);return o},ut=()=>{const e=_(),t=ee();return M({mutationFn:async({agentId:n})=>{if(!$.baseUrl)throw new Error("Local Operator API URL is not configured.");return ne.downloadAgentFromRadient($.baseUrl,n)},onSuccess:(n,a)=>{const s=n.result,r=s?.name?.trim()||a.agentName?.trim()||"Agent",f=s?.renamed_from?.trim()||null,g=s?.id?se(r,Pe(e,s.id)):null;f?I(`Downloaded "${r}" — you already have an agent called "${f}".`):g?te(`Downloaded "${r}". You already have an agent called "${g}", 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:F}),v(e,{agentId:a.agentId,field:"download_count",delta:1});const c=n.result;c?.id?t(`/chat/${c.id}`):console.warn("Downloaded agent ID not found in response, cannot navigate to chat.")}})};export{Ge as A,O as C,Ze as H,it as a,ut as b,Se as c,rt as d,at as e,Be as f,Je as g,tt as h,st as i,nt as j,We as k,et as l,ot as m,Xe as n,ct 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-Dz6HoxZc.js";import{F as kt,E as Tt,G as Rt}from"./index-C6pxQu_W.js";import"./index-7OErfuvQ.js";import"./icon-Cf2gAQ3W.js";import"./console-mirror-Bjpk3DAz.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="",q=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 "+(q+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-SWP-HDAp.js";import{F as kt,E as Tt,G as Rt}from"./index-YQ32HBTm.js";import"./index-CZlj7Oq2.js";import"./error-boundary-Du4Xf2hu.js";import"./console-mirror-naCglSJA.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="",q=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 "+(q+1)+`:
2
2
  `+A.showPosition()+`
3
3
  Expecting `+Q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":nt="Parse error on line "+(q+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,q=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,q,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,10 +6,10 @@
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-B-P-8vPw.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-7OErfuvQ.js">
11
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-Bjpk3DAz.js">
12
- <link rel="stylesheet" crossorigin href="./assets/index-ByGvbPtr.css">
9
+ <script type="module" crossorigin src="./assets/consoleCapture-BmsgtbeJ.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-CZlj7Oq2.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-naCglSJA.js">
12
+ <link rel="stylesheet" crossorigin href="./assets/index-OpIz2cV2.css">
13
13
  <link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
14
14
  </head>
15
15
 
@@ -31,13 +31,13 @@
31
31
  <meta http-equiv="Content-Security-Policy"
32
32
  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: http://localhost:1111 http://127.0.0.1:1111 https://accounts.google.com https://login.microsoftonline.com" />
33
33
  <meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin-allow-popups" />
34
- <script type="module" crossorigin src="./assets/index-C6pxQu_W.js"></script>
35
- <link rel="modulepreload" crossorigin href="./assets/index-7OErfuvQ.js">
36
- <link rel="modulepreload" crossorigin href="./assets/icon-Cf2gAQ3W.js">
37
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-Bjpk3DAz.js">
38
- <link rel="stylesheet" crossorigin href="./assets/index-ByGvbPtr.css">
34
+ <script type="module" crossorigin src="./assets/index-YQ32HBTm.js"></script>
35
+ <link rel="modulepreload" crossorigin href="./assets/index-CZlj7Oq2.js">
36
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-Du4Xf2hu.js">
37
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-naCglSJA.js">
38
+ <link rel="stylesheet" crossorigin href="./assets/index-OpIz2cV2.css">
39
39
  <link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
40
- <link rel="stylesheet" crossorigin href="./assets/index-BIOY3qsR.css">
40
+ <link rel="stylesheet" crossorigin href="./assets/index-CSPo12AE.css">
41
41
  </head>
42
42
 
43
43
  <body>
@@ -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-DIgdF65j.js"></script>
12
- <link rel="modulepreload" crossorigin href="./assets/index-7OErfuvQ.js">
13
- <link rel="modulepreload" crossorigin href="./assets/icon-Cf2gAQ3W.js">
14
- <link rel="stylesheet" crossorigin href="./assets/index-ByGvbPtr.css">
11
+ <script type="module" crossorigin src="./assets/installer-Cu5fgVHl.js"></script>
12
+ <link rel="modulepreload" crossorigin href="./assets/index-CZlj7Oq2.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-Du4Xf2hu.js">
14
+ <link rel="stylesheet" crossorigin href="./assets/index-OpIz2cV2.css">
15
15
  </head>
16
16
 
17
17
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-operator-ui",
3
- "version": "0.30.35",
3
+ "version": "0.31.1",
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",
@@ -76,7 +76,7 @@
76
76
  "check-types": "pnpm run check-types:main && pnpm run check-types:renderer",
77
77
  "check-changed": "node scripts/ci-scope.mjs --since \"$(git merge-base origin/main HEAD)\" --run",
78
78
  "test:session-cookies": "node scripts/session-cookie-electron.test.mjs",
79
- "test:desktop": "node scripts/run-desktop-tests.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/desktop-contract.test.mjs scripts/transcript-reducer.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/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.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-sidebar-scope-paging.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/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/working-line-clock.test.mjs scripts/attachment-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/managed-python.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.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/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/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.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/chat-session-status.test.mjs scripts/draft-selection.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-chrome.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.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/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-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/run-panel-navigation.test.mjs scripts/backend-settings-tiers.test.mjs scripts/backend-settings-collapse.test.mjs scripts/check-build-env.test.mjs scripts/test-inventory.test.mjs scripts/conflict-markers.test.mjs scripts/compact-receipt.test.mjs scripts/chat-image-expand.test.mjs scripts/prune-python-seed.test.mjs scripts/mcp-auth-complete-no-retry.test.mjs scripts/panel-presentation.test.mjs scripts/turn-timestamp.test.mjs scripts/analytics-session-table.test.mjs scripts/theme-grid-navigation.test.mjs scripts/theme-registry-exhaustiveness.test.mjs scripts/scheduled-task-model.test.mjs scripts/backend-setting-combos.test.mjs scripts/model-setting-options.test.mjs scripts/searchable-select.test.mjs scripts/backend-settings-drafts.test.mjs scripts/typed-row-call-sites.test.mjs scripts/palette-focus.test.mjs scripts/composer-seeding.test.mjs scripts/composer-refusal.test.mjs scripts/ci-scope.test.mjs scripts/browser-tab-strip-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/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-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.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/integration-model.test.mjs scripts/mcp-catalog-parity.test.mjs scripts/btw-aside.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-text-authority.test.mjs",
79
+ "test:desktop": "node scripts/run-desktop-tests.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/desktop-contract.test.mjs scripts/transcript-reducer.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/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.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/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/working-line-clock.test.mjs scripts/attachment-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/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.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/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/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.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/chat-session-status.test.mjs scripts/draft-selection.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-chrome.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.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/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-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/run-panel-navigation.test.mjs scripts/backend-settings-tiers.test.mjs scripts/backend-settings-collapse.test.mjs scripts/check-build-env.test.mjs scripts/test-inventory.test.mjs scripts/conflict-markers.test.mjs scripts/compact-receipt.test.mjs scripts/chat-image-expand.test.mjs scripts/prune-python-seed.test.mjs scripts/mcp-auth-complete-no-retry.test.mjs scripts/panel-presentation.test.mjs scripts/turn-timestamp.test.mjs scripts/analytics-session-table.test.mjs scripts/theme-grid-navigation.test.mjs scripts/theme-registry-exhaustiveness.test.mjs scripts/scheduled-task-model.test.mjs scripts/backend-setting-combos.test.mjs scripts/model-setting-options.test.mjs scripts/searchable-select.test.mjs scripts/backend-settings-drafts.test.mjs scripts/typed-row-call-sites.test.mjs scripts/palette-focus.test.mjs scripts/composer-seeding.test.mjs scripts/composer-refusal.test.mjs scripts/ci-scope.test.mjs scripts/browser-tab-strip-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/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-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.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-view.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/chat-sidebar-sections.test.mjs scripts/titlebar-options.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/btw-aside.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-text-authority.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/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/header-identity-model.test.mjs",
80
80
  "check-themes": "node scripts/generate-theme-css.mjs --check && node scripts/contrast-contract.mjs",
81
81
  "check-vendored": "node scripts/check-vendored.mjs",
82
82
  "check-evidence": "node scripts/check-evidence.mjs",
@@ -97,6 +97,7 @@
97
97
  "notarize-dmg": "node scripts/notarize-artifacts.mjs",
98
98
  "verify-macos-artifacts": "node scripts/verify-macos-artifacts.mjs",
99
99
  "setup-python": "./scripts/setup-python-resource.sh",
100
+ "setup-python:win": "powershell -NoProfile -ExecutionPolicy Bypass -File scripts/setup-python-resource.ps1",
100
101
  "storybook": "storybook dev -p 6006",
101
102
  "build-storybook": "storybook build",
102
103
  "app:driver": "node scripts/renderer-driver.mjs",
@@ -333,6 +334,20 @@
333
334
  "filter": [
334
335
  "**/*"
335
336
  ]
337
+ },
338
+ {
339
+ "from": "resources/uv",
340
+ "to": "uv/x64",
341
+ "filter": [
342
+ "**/*"
343
+ ]
344
+ },
345
+ {
346
+ "from": "resources/uv_aarch64",
347
+ "to": "uv/arm64",
348
+ "filter": [
349
+ "**/*"
350
+ ]
336
351
  }
337
352
  ],
338
353
  "target": [
@@ -369,6 +384,20 @@
369
384
  "filter": [
370
385
  "**/*"
371
386
  ]
387
+ },
388
+ {
389
+ "from": "resources/uv",
390
+ "to": "uv/x64",
391
+ "filter": [
392
+ "**/*"
393
+ ]
394
+ },
395
+ {
396
+ "from": "resources/uv_aarch64",
397
+ "to": "uv/arm64",
398
+ "filter": [
399
+ "**/*"
400
+ ]
372
401
  }
373
402
  ],
374
403
  "category": "ArtificialIntelligence",
@@ -1,6 +0,0 @@
1
- import{r,j as e,c as L}from"./index-7OErfuvQ.js";import{a4 as G,ah as ce,ai as de,aj as ue,ak as he,al as Z,r as me,am as ge,h as xe,an as fe,ao as pe,ap as be}from"./index-C6pxQu_W.js";import{C as ve}from"./compact-pagination-BRR4OtYY.js";import{P as je}from"./page-header-CYtvpazS.js";import{c as Ne,I as we,a as K,b as Y,d as $,e as q,f as B,B as k,g as c,A as ye,h as Se,i as Ce}from"./icon-Cf2gAQ3W.js";import{u as ke,a as Ae,b as Re,i as Ee}from"./use-agent-like-mutation-asZxgbHQ.js";import"./console-mirror-Bjpk3DAz.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 Pe=[["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"}]],Te=Ne("circle-ellipsis",Pe),_e=({agent:s,status:n,viewerStateKnown:o=!0})=>{const{isAuthenticated:a}=G(),[i,l]=r.useState(null),m=n?.liked??!1,v=n?.favourited??!1,g=ke(),u=Ae(),f=ce(),j=()=>{!a||g.isPending||(l(null),g.mutate({agentId:s.id,isCurrentlyLiked:m},{onError:()=>l("like")}))},N=()=>{!a||u.isPending||(l(null),u.mutate({agentId:s.id,isCurrentlyFavourited:v},{onError:()=>l("favourite")}))},w=()=>{f.isPending||(l(null),f.mutate({agentId:s.id,agentName:s.name},{onError:()=>l("download")}))},p=i?i==="like"?{action:"like",error:g.error,retry:j}:i==="favourite"?{action:"favourite",error:u.error,retry:N}:{action:"download",error:f.error,retry:w}:null;return e.jsx(de,{agent:s,isLiked:a&&m,isFavourited:a&&v,onLikeToggle:j,onFavouriteToggle:N,onDownload:w,isLikeActionLoading:g.isPending,isFavouriteActionLoading:u.isPending,isDownloading:f.isPending,viewerStateKnown:o,actionError:p?ue(p.action,p.error,s.name):null,onRetryAction:p?.retry})},U=({selected:s,onClick:n,children:o,...a})=>e.jsx("button",{type:"button",onClick:n,"aria-pressed":s,className:L("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?me:"text-ink hover:bg-row-hover"),...a,children:o}),Q=Object.keys(ge),Fe=s=>[...s].sort((n,o)=>{const a=Q.indexOf(n),i=Q.indexOf(o);return a!==-1&&i!==-1?a-i:a!==-1?-1:i!==-1?1:n.localeCompare(o)}),Me=({selectedCategory:s,onSelectCategory:n,categories:o})=>{const a=Fe(s&&!o.includes(s)?[...o,s]:o);return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto",children:[e.jsx("h2",{className:"mb-2 px-3 font-medium text-ink-dim text-meta",children:"Categories"}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs(U,{selected:s===null,onClick:()=>n(null),"data-testid":"category-all",children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e.jsx(he,{size:16,"aria-hidden":"true"})}),"All categories"]}),a.map(i=>{const l=Z(i),m=i==="other"?e.jsx(Te,{size:16}):l.icon;return e.jsxs(U,{selected:s===i,onClick:()=>n(i),"data-testid":`category-${i}`,children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:m}),l.label]},i)})]})]})},Le=(s,n)=>{const[o,a]=r.useState(s);return r.useEffect(()=>{const i=setTimeout(()=>a(s),n);return()=>clearTimeout(i)},[s,n]),o},A=[{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"}],Ie=[{value:"name",label:"Name"},{value:"description",label:"Description"}],Oe=300,De=()=>e.jsxs("div",{className:"flex h-full flex-col overflow-hidden rounded-lg border border-hairline bg-surface",children:[e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 p-4",children:[e.jsx(c,{className:"h-5.5 w-2/3"}),e.jsx(c,{className:"h-3.5 w-full"}),e.jsx(c,{className:"h-3.5 w-full"}),e.jsx(c,{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(c,{className:"h-5.5 w-24"}),e.jsx(c,{className:"h-5.5 w-20"})]}),e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsx(c,{className:"h-5.5 w-24"})})]}),e.jsx(c,{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(c,{className:"size-4"}),e.jsx(c,{className:"h-4 w-6"}),e.jsx(c,{className:"size-4"}),e.jsx(c,{className:"h-4 w-6"}),e.jsx(c,{className:"ml-auto h-7 w-16"})]})]}),Be=()=>{const s=xe(),{isAuthenticated:n}=G(),[o,a]=r.useState(1),[i]=r.useState(12),[l,m]=r.useState(null),[v,g]=r.useState(""),[u,f]=r.useState("name"),[j,N]=r.useState(A[0].value),[w,p]=r.useState([]),R=Le(v,Oe),I=A.find(t=>t.value===j)??A[0],{data:y,agents:J,isLoading:W,isFetching:b,error:x,refetch:X,pagination:h}=fe({page:o,perPage:i,categories:l?[l]:void 0,name:u==="name"&&R||void 0,description:u==="description"&&R||void 0,sort:I.sort,order:I.order}),S=J??[],O=b&&y!==void 0,{statuses:D,isKnown:ee,isError:te,isFetching:E,refetch:se}=Re({agentIds:S.map(t=>t.id)}),P=r.useRef(null),T=r.useRef(null),[z,ae]=r.useState(0);r.useEffect(()=>{z!==0&&(P.current??T.current)?.focus()},[z]);const V=r.useRef(null),_=r.useRef(!1),F=r.useMemo(()=>[...new Set((y?.records??[]).flatMap(t=>t.categories??[]))],[y]);r.useEffect(()=>{p(t=>F.every(M=>t.includes(M))?t:[...new Set([...t,...F])])},[F]);const C=l!==null||R!=="",ne=()=>{m(null),g(""),a(1),ae(t=>t+1)},d=(W||b)&&y===void 0,H=!d&&!C&&(x!==null||S.length===0);r.useEffect(()=>{!_.current||d||(_.current=!1,x?V.current?.focus():(P.current??T.current)?.focus())},[d,x]);const re=t=>{a(t)},ie=t=>{m(t),a(1)},le=t=>{g(t),a(1)},oe=t=>{f(t),a(1)};return e.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[e.jsx(je,{title:"Agent hub",subtitle:"Discover and download community agents on Radient",icon:pe}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-row overflow-hidden",children:[e.jsx("div",{className:"mr-6 hidden w-60 shrink-0 rounded-md bg-surface p-2 md:block","data-tour-tag":"agent-hub-sidebar-container",children:!H&&e.jsx(Me,{selectedCategory:l,onSelectCategory:ie,categories:w})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-y-auto",children:[!H&&e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:L("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(we,{ref:P,type:"search",value:v,onChange:t=>le(t.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(K,{value:u,onValueChange:oe,children:[e.jsx(Y,{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($,{})}),e.jsx(q,{children:Ie.map(t=>e.jsx(B,{value:t.value,children:t.label},t.value))})]})]}),e.jsxs(K,{value:j,onValueChange:N,children:[e.jsx(Y,{className:"w-48","aria-label":"Sort agents","data-testid":"agent-hub-sort",children:e.jsx($,{})}),e.jsx(q,{children:A.map(t=>e.jsx(B,{value:t.value,children:t.label},t.value))})]})]}),e.jsxs("p",{"aria-live":"polite",className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-status",children:[d?"Loading agents…":h?`${h.totalRecords} ${h.totalRecords===1?"agent":"agents"}`:"",O?e.jsx(e.Fragment,{children:" Updating…"}):null]}),n&&te&&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(k,{variant:"ghost",size:"sm",onClick:()=>void se(),disabled:E,"aria-busy":E,children:E?"Trying…":"Try again"})]}),d&&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},(t,M)=>e.jsx(De,{},M))}),d&&h===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(c,{className:"h-4 w-24"})}),e.jsx("output",{"aria-live":"polite","data-testid":"agent-hub-outage",className:L(!d&&x?"block":"sr-only"),children:!d&&x&&e.jsxs(ye,{variant:"danger",className:"max-w-2xl","aria-busy":b,"data-testid":"agent-hub-error",children:[e.jsx(Se,{children:n?"The hub could not be loaded":"Sign in to use the hub"}),e.jsx(Ce,{children:n?be("The agent list could not be loaded.",x):"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(k,{ref:V,variant:"outline",size:"sm",onClick:()=>{_.current=!0,X()},disabled:b,"aria-busy":b,children:b?"Trying…":"Try again"})})]})}),!d&&!x&&e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6","aria-busy":O,children:S.length===0?e.jsxs("div",{"data-testid":"agent-hub-empty",className:"col-span-full w-full max-w-2xl justify-self-center flex flex-col items-center gap-2 rounded-lg border border-hairline bg-surface px-6 py-10 text-center",children:[e.jsx("p",{className:"text-heading text-ink",children:l?`No agents in ${Z(l).label}.`:C?"No agents match that search.":"The hub is empty."}),e.jsx("p",{className:"max-w-md text-body-sm text-ink-muted",children:l?"Nothing in this category yet. Clear the filter to see the whole hub.":C?"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:C?e.jsx(k,{variant:"secondary",onClick:ne,children:l?"Clear filter":"Clear search"}):e.jsx(k,{ref:T,variant:"secondary",onClick:()=>s("/agents"),children:"Publish an agent"})})]}):S.map(t=>e.jsx(_e,{agent:t,status:n?D[t.id]:void 0,viewerStateKnown:n&&Ee(ee,D,t.id)},t.id))}),!d&&h&&h.totalPages>1&&e.jsx("div",{className:"mt-6 flex justify-center",children:e.jsx(ve,{count:h.totalPages,page:h.page,onChange:re})})]})]})]})};export{Be as AgentHubPage};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./legacy-agents-page-NU8mTf6U.js","./index-7OErfuvQ.js","./index-ByGvbPtr.css","./page-header-CYtvpazS.js","./icon-Cf2gAQ3W.js","./index-C6pxQu_W.js","./console-mirror-Bjpk3DAz.js","./console-mirror-DOrYoP_4.css","./index-BIOY3qsR.css","./radient-auth-buttons--2wV70ya.js","./compact-pagination-BRR4OtYY.js"])))=>i.map(i=>d[i]);
2
- import{u as O,a as Q,b as J,d as V,c as W,e as G,f as H,g as X,B as Y,U as Z,P as ee,r as te,_ as ae,h as $,i as z,j as U}from"./index-C6pxQu_W.js";import{j as e,r as n,c as P}from"./index-7OErfuvQ.js";import{B as u}from"./icon-Cf2gAQ3W.js";import"./console-mirror-Bjpk3DAz.js";const se=n.lazy(()=>ae(()=>import("./legacy-agents-page-NU8mTf6U.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(t=>({default:t.LegacyAgentsPage}))),d="w-full rounded-md border border-control bg-surface px-3 py-2 text-body-sm text-ink";function T({profile:t,creating:v,onSaved:g}){const[r,k]=n.useState(!1),[o,m]=n.useState(v),[p,b]=n.useState(t?.name??""),[x,C]=n.useState(t?.kind??"role"),[h,y]=n.useState(t?.description??""),[j,S]=n.useState(t?.instructions??""),[_,D]=n.useState(t?.tools?.join(", ")??""),[I,N]=n.useState(t?.effort??"inherit"),[R,L]=n.useState(t?.delegate??!1),[f,a]=n.useState(!1),[c,l]=n.useState(null),i=n.useRef(null),w=$(),E=v||r,K=async s=>{if(s.preventDefault(),f)return;const M={kind:x,description:h,instructions:j,tools:_.split(",").map(q=>q.trim()).filter(Boolean),effort:I,delegate:R},A=JSON.stringify({name:p,fields:M,fresh:E});if(i.current&&i.current.body!==A){l("The previous save has not been confirmed. Retry it unchanged or reload the profile to reconcile before editing again.");return}i.current??={id:crypto.randomUUID(),body:A},a(!0),l(null);try{const q=await U({op:E?"profiles.create":"profiles.update",requestId:i.current.id,name:p,fields:M});i.current=null,m(!1),g(q.name)}catch(q){l(q instanceof Error?q.message:"Profile could not be saved.")}finally{a(!1)}},F=async()=>{if(!(!t||f)){a(!0),l(null);try{const s=await U({op:"profiles.install",name:t.name,requestId:crypto.randomUUID()});m(!1),k(!1),i.current=null,b(s.name),C(s.kind),y(s.description??""),S(s.instructions??""),D(s.tools?.join(", ")??""),N(s.effort??"inherit"),L(s.delegate??!1),g(s.name)}catch(s){l(s instanceof Error?s.message:"Profile could not be installed.")}finally{a(!1)}}};return e.jsxs("div",{className:"max-w-3xl space-y-6",children:[e.jsxs("header",{children:[e.jsx("h1",{className:"text-title",children:E?r?"Extend agent":"Create agent":t?.name}),e.jsx("p",{className:"mt-2 text-body-sm text-ink-muted",children:"Reusable instructions shared by agent commands, subagents and teams. Chats remain separate."})]}),t&&!E&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("span",{className:"text-meta text-ink-muted",children:[t.source==="builtin"?"Built-in":t.source==="installed"?"Installed":"Custom",t.divergent_fields?.length?" · Modified":""," ·"," ",t.kind]}),t.source==="builtin"?e.jsx(u,{variant:"outline",onClick:F,disabled:f,children:"Install"}):e.jsx(u,{variant:"outline",onClick:()=>m(!0),children:"Edit"}),e.jsx(u,{variant:"outline",onClick:()=>{k(!0),m(!0),b(""),i.current=null},children:"Extend"}),e.jsx(u,{onClick:()=>{z.getState().stageDraft({kind:"agent",name:t.name}),w("/chat")},children:"New chat"})]}),c&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:c}),!o&&t?.source==="builtin"&&e.jsx("p",{id:"builtin-readonly",className:"text-body-sm text-ink-muted",children:"Built-in agents are read-only. Install this one to edit it, or Extend it to start a separate agent from its instructions."}),e.jsxs("form",{onSubmit:K,className:"space-y-4",children:[e.jsxs("fieldset",{disabled:!o||f,className:"space-y-4",children:[e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Name"}),e.jsx("input",{className:d,value:p,disabled:!E,required:!0,"aria-describedby":t?.source==="builtin"?"builtin-readonly":void 0,onChange:s=>b(s.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Kind"}),e.jsxs("select",{className:d,value:x,disabled:!E,onChange:s=>C(s.target.value),children:[e.jsx("option",{value:"role",children:"Role"}),e.jsx("option",{value:"specialist",children:"Specialist"})]})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"When to use this agent"}),e.jsx("input",{className:d,value:h,maxLength:8e3,onChange:s=>y(s.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Instructions"}),e.jsx("textarea",{className:P(d,"min-h-52"),value:j,required:!0,maxLength:8e3,onChange:s=>S(s.target.value)})]}),x==="role"&&e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Allowed tools"}),e.jsx("input",{className:d,value:_,onChange:s=>D(s.target.value),placeholder:"All tools when empty; otherwise comma-separated names"})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Effort tier"}),e.jsx("input",{className:d,value:I,onChange:s=>N(s.target.value),"aria-describedby":"effort-help"}),e.jsx("span",{id:"effort-help",className:"text-meta text-ink-muted",children:"Use inherit, or a tier configured in backend settings. Unsupported tiers are rejected before saving."})]}),e.jsxs("label",{className:"flex items-center gap-2 text-body-sm",children:[e.jsx("input",{type:"checkbox",checked:R,onChange:s=>L(s.target.checked)}),"May delegate to subagents"]})]})]}),o&&e.jsx(u,{type:"submit",disabled:f,children:f?"Saving…":E?"Create agent":"Save changes"})]}),!o&&t?.packaged_instructions&&t.divergent_fields?.length?e.jsxs("details",{className:"text-body-sm",children:[e.jsx("summary",{children:"Compare packaged instructions"}),e.jsx("pre",{className:"mt-2 whitespace-pre-wrap text-body-sm text-ink-muted",children:t.packaged_instructions})]}):null]})}function B({team:t,onSaved:v}){const[g,r]=n.useState(t?.name??""),[k,o]=n.useState(t?.description??""),[m,p]=n.useState(t?.manager??"manager"),[b,x]=n.useState((t?.members??[]).map(a=>({...a,key:crypto.randomUUID()}))),[C,h]=n.useState(t?.instructions??""),[y,j]=n.useState(t?.project??""),[S,_]=n.useState(!1),[D,I]=n.useState(null),N=n.useRef(null),R=$(),L=async a=>{if(a.preventDefault(),S)return;const c={name:g,description:k,manager:m,members:b.map(({key:i,...w})=>w),instructions:C,project:y},l=JSON.stringify(c);if(N.current&&N.current.body!==l){I("The previous save has not been confirmed. Reload the team before changing that request.");return}N.current??={id:crypto.randomUUID(),body:l},_(!0),I(null);try{const i=t?await U({op:"teams.update",name:t.name,requestId:N.current.id,fields:c}):await U({op:"teams.create",requestId:N.current.id,fields:c});N.current=null,v(i.name)}catch(i){I(i instanceof Error?i.message:"Team could not be saved.")}finally{_(!1)}},f=(a,c)=>x(l=>l.map((i,w)=>w===a?{...i,...c}:i));return e.jsxs("div",{className:"max-w-3xl space-y-6",children:[e.jsxs("header",{children:[e.jsx("h1",{className:"text-title",children:t?t.name:"Create team"}),e.jsx("p",{className:"mt-2 text-body-sm text-ink-muted",children:"The manager leads the chat. Members retain their own instructions and start only when delegated work."})]}),t&&e.jsx(u,{onClick:()=>{z.getState().stageDraft({kind:"team",name:t.name}),R("/chat")},children:"New team chat"}),D&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:D}),e.jsxs("form",{onSubmit:L,className:"space-y-4",children:[e.jsxs("fieldset",{disabled:S,className:"space-y-4",children:[e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Name"}),e.jsx("input",{className:d,required:!0,maxLength:64,value:g,onChange:a=>r(a.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Description"}),e.jsx("input",{className:d,value:k,onChange:a=>o(a.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Manager agent"}),e.jsx("input",{className:d,required:!0,value:m,onChange:a=>p(a.target.value)})]}),e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-heading",children:"Members"}),b.map((a,c)=>e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("input",{className:P(d,"w-48 flex-1"),"aria-label":`Member ${c+1} name`,required:!0,value:a.role,onChange:l=>f(c,{role:l.target.value})}),e.jsxs("select",{className:P(d,"w-32"),"aria-label":`Member ${c+1} kind`,value:a.kind,onChange:l=>f(c,{kind:l.target.value}),children:[e.jsx("option",{value:"agent",children:"Agent"}),e.jsx("option",{value:"team",children:"Nested team"})]}),e.jsx("input",{className:P(d,"w-20"),"aria-label":`Member ${c+1} count`,type:"number",min:1,max:16,value:a.count,onChange:l=>f(c,{count:Number(l.target.value)})}),e.jsx(u,{type:"button",variant:"ghost",onClick:()=>x(l=>l.filter((i,w)=>w!==c)),children:"Remove"})]},a.key)),e.jsx(u,{type:"button",variant:"outline",onClick:()=>x(a=>[...a,{role:"",count:1,kind:"agent",key:crypto.randomUUID()}]),children:"Add member"})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Collaboration instructions"}),e.jsx("textarea",{className:P(d,"min-h-36"),maxLength:8e3,value:C,onChange:a=>h(a.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Project brief"}),e.jsx("textarea",{className:P(d,"min-h-36"),maxLength:8e3,value:y,onChange:a=>j(a.target.value)})]})]}),e.jsx(u,{type:"submit",disabled:S,children:S?"Saving…":t?"Save team":"Create team"})]})]})}function ce(){const{agentId:t}=O(),[v,g]=Q(),r=v.get("kind")==="team"||v.get("create")==="team",k=v.has("create"),o=v.get("name"),m=J(),p=V(m.data,r?"team_catalogue":"profile_catalogue"),b=W(p&&!r),x=G(p&&r),C=H(),h=X({queryKey:["desktop",r?"team":"profile",o],enabled:p&&!!o&&!k,queryFn:()=>U({op:r?"teams.get":"profiles.get",name:o??""}),retry:!1}),y=async j=>{await C.invalidateQueries({queryKey:["desktop"]}),g({kind:r?"team":"agent",name:j})};return t?e.jsx(n.Suspense,{fallback:e.jsx("p",{className:"p-6 text-body",children:"Loading saved agent…"}),children:e.jsx(se,{})}):e.jsxs("div",{className:"flex h-full min-h-0 bg-canvas text-ink",children:[e.jsxs("aside",{className:"flex w-64 shrink-0 flex-col gap-4 border-r border-hairline bg-surface p-4",children:[e.jsx("h1",{className:"text-heading",children:"Agents and teams"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(u,{variant:r?"ghost":"outline",onClick:()=>g({kind:"agent"}),children:[e.jsx(Y,{className:"size-4"}),"Agents"]}),e.jsxs(u,{variant:r?"outline":"ghost",onClick:()=>g({kind:"team"}),children:[e.jsx(Z,{className:"size-4"}),"Teams"]})]}),e.jsxs(u,{variant:"outline",disabled:!p,onClick:()=>g({create:r?"team":"agent"}),children:[e.jsx(ee,{className:"size-4"}),r?"Create team":"Create agent"]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:(r?x.data:b.data)?.map(j=>e.jsx("button",{type:"button",className:P("flex h-8 w-full items-center rounded-md px-2 text-left text-body-sm hover:bg-row-hover",j.name===o&&te),onClick:()=>g({kind:r?"team":"agent",name:j.name}),children:e.jsx("span",{className:"truncate",children:j.name})},j.name))})]}),e.jsx("main",{className:"min-w-0 flex-1 overflow-auto p-6",children:p?b.error||x.error||h.error?e.jsxs("div",{role:"alert",children:[e.jsx("p",{className:"text-danger",children:b.error?.message||x.error?.message||h.error?.message}),e.jsx(u,{variant:"outline",onClick:()=>{b.refetch(),x.refetch(),h.refetch()},children:"Retry"})]}):k?r?e.jsx(B,{onSaved:y},"create-team"):e.jsx(T,{creating:!0,onSaved:y},"create-agent"):o&&h.isLoading?e.jsx("p",{"aria-live":"polite",children:"Loading details…"}):o&&h.data?r?e.jsx(B,{team:h.data,onSaved:y},o):e.jsx(T,{profile:h.data,creating:!1,onSaved:y},`${o}:${h.data.source}`):e.jsxs("div",{children:[e.jsx("h2",{className:"text-title",children:r?"Reusable teams":"Reusable agents"}),e.jsx("p",{className:"mt-2 text-body text-ink-muted",children:"Select a definition to view or edit it. A new chat does not change its definition."})]}):e.jsxs("div",{"aria-live":"polite",className:"space-y-3 text-body-sm",children:[e.jsx("p",{children:m.isLoading?"Connecting to the backend…":m.error?m.error.message:"Update the backend to manage reusable agents and teams. Saved chats are unchanged."}),e.jsx(u,{variant:"outline",onClick:()=>void m.refetch(),children:"Retry connection"})]})})]})}export{ce as AgentsPage};