local-operator-ui 0.31.30 → 0.31.32

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 (88) hide show
  1. package/out/main/index.js +121 -15
  2. package/out/preload/index.js +9 -0
  3. package/out/renderer/assets/{_basePickBy-Y9GC34gi.js → _basePickBy-BzFdg-GF.js} +1 -1
  4. package/out/renderer/assets/{_baseUniq-B0peOdjF.js → _baseUniq-Bm2KnnbI.js} +1 -1
  5. package/out/renderer/assets/{agent-details-page-DVzsvKvr.js → agent-details-page-BMiohCvb.js} +1 -1
  6. package/out/renderer/assets/{agent-hub-page-Dp8llcze.js → agent-hub-page-CAJMRlDU.js} +1 -1
  7. package/out/renderer/assets/agents-page-GLKOnCr6.js +7 -0
  8. package/out/renderer/assets/{arc-DQzRvMGZ.js → arc-CcekKWMM.js} +1 -1
  9. package/out/renderer/assets/{architectureDiagram-IEHRJDOE-BHLUr3Vi.js → architectureDiagram-IEHRJDOE-8foMClj9.js} +1 -1
  10. package/out/renderer/assets/{blockDiagram-JOT3LUYC-CVK0U-3j.js → blockDiagram-JOT3LUYC-DhfZvGTr.js} +1 -1
  11. package/out/renderer/assets/{book-open-j4JS3yvI.js → book-open-CueO0nwZ.js} +1 -1
  12. package/out/renderer/assets/browser-page-MbQ-dd2e.js +1 -0
  13. package/out/renderer/assets/{browser-webauthn-prompt-nwdqBWnv.js → browser-webauthn-prompt-DrMpnMBW.js} +1 -1
  14. package/out/renderer/assets/{c4Diagram-VJAJSXHY-BqLTGVHe.js → c4Diagram-VJAJSXHY-BtAFjDFO.js} +1 -1
  15. package/out/renderer/assets/channel-er9Isqc8.js +1 -0
  16. package/out/renderer/assets/{chunk-4BMEZGHF-BSPZPecM.js → chunk-4BMEZGHF-hEpjTUlR.js} +1 -1
  17. package/out/renderer/assets/{chunk-A2AXSNBT-CEEG3uIi.js → chunk-A2AXSNBT-BQE33qQV.js} +1 -1
  18. package/out/renderer/assets/{chunk-AEK57VVT-CvyIUWUR.js → chunk-AEK57VVT-Bfv-VOfu.js} +1 -1
  19. package/out/renderer/assets/{chunk-D6G4REZN-D4lVOdW7.js → chunk-D6G4REZN-CDEQDet7.js} +1 -1
  20. package/out/renderer/assets/{chunk-RZ5BOZE2-znegx9P6.js → chunk-RZ5BOZE2-BHPvStD5.js} +1 -1
  21. package/out/renderer/assets/{chunk-XZIHB7SX-DPz_D8Nf.js → chunk-XZIHB7SX-DOAEvfwX.js} +1 -1
  22. package/out/renderer/assets/classDiagram-GIVACNV2-CiL29Sc-.js +1 -0
  23. package/out/renderer/assets/classDiagram-v2-COTLJTTW-CiL29Sc-.js +1 -0
  24. package/out/renderer/assets/clone-Bsk4HvnO.js +1 -0
  25. package/out/renderer/assets/{console-mirror-GUGtzmyW.js → console-mirror-CiDuCMfE.js} +1 -1
  26. package/out/renderer/assets/{consoleCapture-D8nStIVt.js → consoleCapture-PlJxiaGX.js} +1 -1
  27. package/out/renderer/assets/{conversation-input-sync-CGaXAqah.js → conversation-input-sync-zDEtF-9C.js} +237 -237
  28. package/out/renderer/assets/{dagre-OKDRZEBW-ByuMXl-x.js → dagre-OKDRZEBW-DY30NVKc.js} +1 -1
  29. package/out/renderer/assets/{diagram-SSKATNLV-DrN1Clbm.js → diagram-SSKATNLV-Cj6GWkPW.js} +1 -1
  30. package/out/renderer/assets/{diagram-VNBRO52H-BU95qC98.js → diagram-VNBRO52H-B1BnbNGr.js} +1 -1
  31. package/out/renderer/assets/{erDiagram-Q7BY3M3F-CLttNK5z.js → erDiagram-Q7BY3M3F-Dt2TZzKY.js} +1 -1
  32. package/out/renderer/assets/error-boundary-BCN3_4Dn.js +126 -0
  33. package/out/renderer/assets/{flowDiagram-4HSFHLVR-BCsFW1Gf.js → flowDiagram-4HSFHLVR-B0y5c9qz.js} +1 -1
  34. package/out/renderer/assets/{ganttDiagram-APWFNJXF-Cdg1Q_-7.js → ganttDiagram-APWFNJXF-twBGRDsR.js} +1 -1
  35. package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-0tWQBOZl.js → gitGraphDiagram-7IBYFJ6S-vi21DxCt.js} +1 -1
  36. package/out/renderer/assets/{graph-BOvjqm1y.js → graph-BVnn4QNL.js} +1 -1
  37. package/out/renderer/assets/index-B4ItTI5Q.css +1 -0
  38. package/out/renderer/assets/{index-Bbr0EFhm.js → index-D94pB35A.js} +1 -1
  39. package/out/renderer/assets/{index-DbuNRNvX.js → index-Dwxu7UOq.js} +1 -1
  40. package/out/renderer/assets/index-QVureTEn.js +784 -0
  41. package/out/renderer/assets/{infoDiagram-PH2N3AL5-cyj8Lve1.js → infoDiagram-PH2N3AL5-B-Ch65yi.js} +1 -1
  42. package/out/renderer/assets/{installer-DDGjYv9v.js → installer-DovMkJto.js} +1 -1
  43. package/out/renderer/assets/{journeyDiagram-U35MCT3I-DWBKDniU.js → journeyDiagram-U35MCT3I-Bp6eVPe6.js} +1 -1
  44. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-Cl5Gtazo.js → kanban-definition-NDS4AKOZ-D6I-GN7U.js} +1 -1
  45. package/out/renderer/assets/{layout-CxuQX-mj.js → layout-DFC3HVFP.js} +1 -1
  46. package/out/renderer/assets/{legacy-agents-page-EmhBvGX8.js → legacy-agents-page-Dfrz_ZCe.js} +2 -2
  47. package/out/renderer/assets/{mermaid.core-eIMT1oSc.js → mermaid.core-DKfPxzKU.js} +5 -5
  48. package/out/renderer/assets/mesh-page-DoKTWh-X.js +1 -0
  49. package/out/renderer/assets/{mindmap-definition-ALO5MXBD-zPRivaIU.js → mindmap-definition-ALO5MXBD-kM4s__rt.js} +1 -1
  50. package/out/renderer/assets/{mini-D6nPFjTs.js → mini-D0On64Oc.js} +1 -1
  51. package/out/renderer/assets/{org-surface-gate-BeX5voGq.js → org-surface-gate-DArMk6ID.js} +1 -1
  52. package/out/renderer/assets/{page-header-BLBgjVqc.js → page-header-ouA0fPx9.js} +1 -1
  53. package/out/renderer/assets/{pieDiagram-IB7DONF6-CUTT0oqK.js → pieDiagram-IB7DONF6-DM1JhBgg.js} +1 -1
  54. package/out/renderer/assets/projects-page-Bb200mtz.js +55 -0
  55. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-B6ksoL9Y.js → quadrantDiagram-7GDLP6J5-B8T16HnV.js} +1 -1
  56. package/out/renderer/assets/{radar-MK3ICKWK-BpDoqWc2.js → radar-MK3ICKWK-DnM_Vl89.js} +1 -1
  57. package/out/renderer/assets/{radient-auth-buttons-Ep1e0Z5I.js → radient-auth-buttons-Doso02jc.js} +1 -1
  58. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-DQwmYS7R.js → requirementDiagram-KVF5MWMF-M7JjuiAa.js} +1 -1
  59. package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-Dc8VJLoV.js → sankeyDiagram-QLVOVGJD-pZ0w_k-t.js} +1 -1
  60. package/out/renderer/assets/{schedules-page-DyMkIr1h.js → schedules-page-OVNdDci6.js} +10 -10
  61. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-SsVDN37O.js → sequenceDiagram-X6HHIX6F-B7YWpV3i.js} +1 -1
  62. package/out/renderer/assets/{settings-page-C_1ja3uN.js → settings-page-CrOBuOHy.js} +6 -6
  63. package/out/renderer/assets/{settings-section-BLUoPALO.js → settings-section-8d2ITQC3.js} +1 -1
  64. package/out/renderer/assets/{stateDiagram-DGXRK772-vwQ-TB_f.js → stateDiagram-DGXRK772-DwDArxIb.js} +1 -1
  65. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CEqnEMuN.js +1 -0
  66. package/out/renderer/assets/{timeline-definition-BDJGKUSR-CQ_pAZms.js → timeline-definition-BDJGKUSR-COfMTtoJ.js} +1 -1
  67. package/out/renderer/assets/{ui-preferences-store-CxJfZcpf.js → ui-preferences-store-BaXpFsZf.js} +1 -1
  68. package/out/renderer/assets/{use-download-agent-mutation-DIujvdLj.js → use-download-agent-mutation-fP7MSQui.js} +2 -2
  69. package/out/renderer/assets/{use-memberships-query-BhO5nUlo.js → use-memberships-query-B_qwJ7_k.js} +1 -1
  70. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-Cs3B-KEl.js → xychartDiagram-VJFVF3MP-COiK9nJs.js} +1 -1
  71. package/out/renderer/console-capture.html +5 -5
  72. package/out/renderer/index.html +7 -7
  73. package/out/renderer/installer.html +4 -4
  74. package/out/renderer/mini.html +6 -6
  75. package/package.json +8 -3
  76. package/out/renderer/assets/agents-page-DlN3w0Rq.js +0 -7
  77. package/out/renderer/assets/browser-page-BI7a4ZtV.js +0 -1
  78. package/out/renderer/assets/channel-BP8e6HYH.js +0 -1
  79. package/out/renderer/assets/classDiagram-GIVACNV2-DVXt0ycE.js +0 -1
  80. package/out/renderer/assets/classDiagram-v2-COTLJTTW-DVXt0ycE.js +0 -1
  81. package/out/renderer/assets/clone-D0eJwRGh.js +0 -1
  82. package/out/renderer/assets/error-boundary-BR1z8pWF.js +0 -126
  83. package/out/renderer/assets/index-Cy3MjKxd.css +0 -1
  84. package/out/renderer/assets/index-D09I1LXM.js +0 -784
  85. package/out/renderer/assets/mesh-page-B8pGIWvO.js +0 -1
  86. package/out/renderer/assets/projects-page-D60z6cvI.js +0 -55
  87. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-D30uaRbQ.js +0 -1
  88. /package/out/renderer/assets/{index-CSNQxVPq.js → index-DvjcW_EJ.js} +0 -0
@@ -1 +1 @@
1
- import{s as W,a as P,S as N}from"./chunk-AEK57VVT-CvyIUWUR.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-eIMT1oSc.js";import{G as F}from"./graph-BOvjqm1y.js";import{l as O}from"./layout-CxuQX-mj.js";import{v as J,x as X}from"./conversation-input-sync-CGaXAqah.js";import"./chunk-RZ5BOZE2-znegx9P6.js";import"./index-CSNQxVPq.js";import"./_baseUniq-B0peOdjF.js";import"./_basePickBy-Y9GC34gi.js";import"./ui-preferences-store-CxJfZcpf.js";import"./error-boundary-BR1z8pWF.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,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"),_=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"),A=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"+A).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)}A++},"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=_(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=_(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};
1
+ import{s as W,a as P,S as N}from"./chunk-AEK57VVT-Bfv-VOfu.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-DKfPxzKU.js";import{G as F}from"./graph-BVnn4QNL.js";import{l as O}from"./layout-DFC3HVFP.js";import{v as J,x as X}from"./conversation-input-sync-zDEtF-9C.js";import"./chunk-RZ5BOZE2-BHPvStD5.js";import"./index-DvjcW_EJ.js";import"./_baseUniq-Bm2KnnbI.js";import"./_basePickBy-BzFdg-GF.js";import"./ui-preferences-store-BaXpFsZf.js";import"./error-boundary-BCN3_4Dn.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,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"),_=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"),A=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"+A).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)}A++},"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=_(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=_(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-Bfv-VOfu.js";import{_ as i}from"./mermaid.core-DKfPxzKU.js";import"./chunk-RZ5BOZE2-BHPvStD5.js";import"./conversation-input-sync-zDEtF-9C.js";import"./ui-preferences-store-BaXpFsZf.js";import"./index-DvjcW_EJ.js";import"./error-boundary-BCN3_4Dn.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-eIMT1oSc.js";import{d as nt}from"./arc-DQzRvMGZ.js";import"./conversation-input-sync-CGaXAqah.js";import"./ui-preferences-store-CxJfZcpf.js";import"./index-CSNQxVPq.js";import"./error-boundary-BR1z8pWF.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-DKfPxzKU.js";import{d as nt}from"./arc-CcekKWMM.js";import"./conversation-input-sync-zDEtF-9C.js";import"./ui-preferences-store-BaXpFsZf.js";import"./index-DvjcW_EJ.js";import"./error-boundary-BCN3_4Dn.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()+`
@@ -1 +1 @@
1
- import{b as M,D as oe}from"./index-CSNQxVPq.js";const v=e=>{let n;const t=new Set,o=(u,m)=>{const h=typeof u=="function"?u(n):u;if(!Object.is(h,n)){const l=n;n=m??(typeof h!="object"||h===null)?h:Object.assign({},n,h),t.forEach(p=>p(n,l))}},r=()=>n,i={setState:o,getState:r,getInitialState:()=>c,subscribe:u=>(t.add(u),()=>t.delete(u))},c=n=e(o,r,i);return i},re=e=>e?v(e):v,se=e=>e;function ae(e,n=se){const t=M.useSyncExternalStore(e.subscribe,()=>n(e.getState()),()=>n(e.getInitialState()));return M.useDebugValue(t),t}const N=e=>{const n=re(e),t=o=>ae(n,o);return Object.assign(t,n),t},ie=e=>e?N(e):N;function ce(e,n){let t;try{t=e()}catch{return}return{getItem:r=>{var s;const a=c=>c===null?null:JSON.parse(c,void 0),i=(s=t.getItem(r))!=null?s:null;return i instanceof Promise?i.then(a):a(i)},setItem:(r,s)=>t.setItem(r,JSON.stringify(s,void 0)),removeItem:r=>t.removeItem(r)}}const P=e=>n=>{try{const t=e(n);return t instanceof Promise?t:{then(o){return P(o)(t)},catch(o){return this}}}catch(t){return{then(o){return this},catch(o){return P(o)(t)}}}},le=(e,n)=>(t,o,r)=>{let s={storage:ce(()=>localStorage),partialize:d=>d,version:0,merge:(d,S)=>({...S,...d}),...n},a=!1;const i=new Set,c=new Set;let u=s.storage;if(!u)return e((...d)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...d)},o,r);const m=()=>{const d=s.partialize({...o()});return u.setItem(s.name,{state:d,version:s.version})},h=r.setState;r.setState=(d,S)=>{h(d,S),m()};const l=e((...d)=>{t(...d),m()},o,r);r.getInitialState=()=>l;let p;const T=()=>{var d,S;if(!u)return;a=!1,i.forEach(f=>{var g;return f((g=o())!=null?g:l)});const E=((S=s.onRehydrateStorage)==null?void 0:S.call(s,(d=o())!=null?d:l))||void 0;return P(u.getItem.bind(u))(s.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==s.version){if(s.migrate){const g=s.migrate(f.state,f.version);return g instanceof Promise?g.then(O=>[!0,O]):[!0,g]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,f.state];return[!1,void 0]}).then(f=>{var g;const[O,te]=f;if(p=s.merge(te,(g=o())!=null?g:l),t(p,!0),O)return m()}).then(()=>{E?.(p,void 0),p=o(),a=!0,c.forEach(f=>f(p))}).catch(f=>{E?.(void 0,f)})};return r.persist={setOptions:d=>{s={...s,...d},d.storage&&(u=d.storage)},clearStorage:()=>{u?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>T(),hasHydrated:()=>a,onHydrate:d=>(i.add(d),()=>{i.delete(d)}),onFinishHydration:d=>(c.add(d),()=>{c.delete(d)})},s.skipHydration||T(),p||l},ue=le,A=260,$=220,F=320,R=56,de=A,fe=1024,X=480,G=400,he=560;function V(e){return Math.max(0,Math.min(he,e-X))}function L(e){return V(e)>=G?"docked":"overlay"}function me(e,n=A){return L(e-j(n))==="overlay"&&L(e-R)==="docked"}function j(e){return Number.isNaN(e)?A:Math.min(F,Math.max($,e))}function cn(e,n,t,o=A,r=!1){if(e>=fe){const a=!n&&r&&me(e,o);return{mode:n||a?"strip":"docked",width:n||a?R:j(o),collapsed:n||a,sheetOpen:!1,resizable:!n&&!a}}return{mode:t?"overlay":"strip",width:t?de:R,collapsed:!0,sheetOpen:t,resizable:!1}}function ln(e){return e.shiftKey||e.altKey||!(e.metaKey||e.ctrlKey)?!1:e.key.toLowerCase()==="b"}const un=e=>e?"⌘B":"Ctrl+B",dn="@container/chatcol",fn="w-full @min-[750px]/chatcol:max-w-[var(--lo-chat-measure)] @min-[750px]/chatcol:mx-auto",ge="--lo-chat-measure-shipped",D="--lo-chat-measure-override",hn=()=>{if(typeof document>"u"||typeof getComputedStyle!="function")return null;const e=getComputedStyle(document.documentElement).getPropertyValue(ge).trim(),n=Number.parseFloat(e);return Number.isFinite(n)&&n>0?n:null},mn="px-6",gn="max-h-[7.5rem] overflow-y-auto leading-5",pe=520,Se=1100,_e=3,Y=e=>Math.min(Se,Math.max(pe,Math.round(e))),Ce=({startWidth:e,deltaX:n,edge:t})=>Y(t==="right"?e+n*2:e-n*2),B=(e,n)=>Math.min(e,n),pn=({startWidth:e,deltaX:n,edge:t,panePx:o})=>{if(Math.abs(n)<_e)return null;const r=Ce({startWidth:e,deltaX:n,edge:t});return B(r,o)===B(e,o)?null:r},ye=["active","created"],Sn={running:"Running",today:"Today",week:"This week",older:"Older"},Ae=new Set(["busy","delegating","approval","answer","wedged"]);function K(e){return Ae.has(e.status?.code??"")}const Ee=24*60*60*1e3,Oe=e=>{const n=new Date(e);return n.setHours(0,0,0,0),n.getTime()};function Q(e,n){const t=n==="created"?e.created_at:e.updated_at;return typeof t!="number"||!Number.isFinite(t)||n==="created"&&t<=0?null:t*1e3}function be(e,n,t){if(K(e))return"running";const o=Q(e,t);if(o===null)return"older";const r=Oe(n);return o>=r?"today":o>=r-6*Ee?"week":"older"}function _n(e,n,t){const o={running:[],today:[],week:[],older:[]};for(const r of e)o[be(r,n,t)].push(r);return o}function Pe(e,n,t){const o=Q(e,t);if(o===null)return"";const r=Math.floor(Math.max(0,n-o)/6e4);if(r<1)return"now";if(r<60)return`${r}m`;const s=Math.floor(r/60);if(s<24)return`${s}h`;const a=Math.floor(s/24);if(a<7)return`${a}d`;const i=Math.floor(a/7);return a<365?`${i}w`:`${Math.floor(a/365)}y`}function Cn(e,n,t){const o=Pe(e,n,t);if(!o)return"";const r=t==="created"?"created":"last active";if(o==="now")return`${r} just now`;const s={m:"minute",h:"hour",d:"day",w:"week",y:"year"},a=Number.parseInt(o,10),i=s[o.slice(-1)];return`${r} ${a} ${i}${a===1?"":"s"} ago`}const w=["pinned","running","today","week","older","agents","teams"],yn={pinned:"Pinned",running:"Running",today:"Today",week:"This week",older:"Older",agents:"Agents",teams:"Teams"};function An(e){return e==="agents"||e==="teams"}const En=8,y={hidden:[],order:[...w],pins:[],groupBy:"section",basis:"active",orderBy:"active-first",loads:0,pinnedAgents:[]},Re=10,_=[25,50],we=50,Ie=500,Te=64;function I(e){const n=Math.max(0,Math.floor(e));return n===0?Re:n<=_.length?_[n-1]:_[_.length-1]+(n-_.length)*we}function On(e,n){const t=I(e+1)-I(e),o=Math.max(0,Math.min(t,n));return o===1?"Show 1 more chat":`Show ${o} more chats`}function J(e){return K(e)}function bn(e,n){if(n==="recent")return[...e];const t=[],o=[];for(const r of e)(J(r)?t:o).push(r);return[...t,...o]}function Pn(e,n){const{limit:t,currentId:o,searching:r=!1}=n;if(r)return{rows:[...e],lifted:!1,remaining:0};const s=e.slice(0,Math.max(0,t)),a=Math.max(0,e.length-s.length);if(!o)return{rows:s,lifted:!1,remaining:a};const i=e.findIndex(c=>c.session_id===o);return i<0||i<s.length?{rows:s,lifted:!1,remaining:a}:{rows:[e[i],...s],lifted:!0,remaining:a}}function Rn(e,n){if(n.searching)return{rows:[...e],lifted:!1,hidden:0,held:e.length};const t=I(n.loads),o=[];let r=t;for(const c of e){if(J(c)){o.push(c);continue}r>0&&(o.push(c),r-=1)}const s=n.currentId,a=s==null?null:e.find(c=>c.session_id===s)??null,i=a!==null&&!o.includes(a);return{rows:i&&a!==null?[a,...o]:o,lifted:i,hidden:e.length-o.length-(i?1:0),held:e.length}}function wn(e){if(e.add<=0)return null;const n=e.add===1?"Show 1 more chat":`Show ${e.add} more chats`;if(e.drawn>=e.total)return{label:n,aria:n};const t=`${e.drawn} of ${e.total}`;return{label:`${n} · ${t}`,aria:`${n} · ${t} shown`}}const Me="mt-4",ve="mt-2";function In(e){return e?Me:ve}function Tn(e,n,t,o){return t?e.toLocaleLowerCase().includes(t.toLocaleLowerCase())||(o??"").toLocaleLowerCase().includes(t.toLocaleLowerCase())||n>0:!0}function Mn(e,n){if(n==="section")return null;if(n==="flat")return[{key:"all",label:"",rows:[...e]}];const t=new Map;for(const s of e){const a=s.binding?.team||s.binding?.agent||"",i=a||"ungrouped",c=t.get(i)??{key:i,label:a||"Ungrouped",rows:[]};c.rows.push(s),t.set(i,c)}const o=[...t.values()],r=o.findIndex(s=>s.key==="ungrouped");return r>0&&o.push(...o.splice(r,1)),o}function Ne(e,n){return!e.hidden.includes(n)}function Z(e){return e.order.filter(n=>Ne(e,n))}function vn(e,n){const t=e.hidden.includes(n)?e.hidden.filter(o=>o!==n):[...e.hidden,n];return{...e,hidden:t}}function Nn(e,n,t){const o=Z(e),r=o.indexOf(n),s=o[r+t];if(r<0||s===void 0)return e;const a=e.order.indexOf(n),i=e.order.indexOf(s),c=[...e.order];return c[a]=s,c[i]=n,{...e,order:c}}const Le=["running","today","week","older"];function H(e){return Le.includes(e)}function Ln(e,n,t,o){if(!H(n)||o&&!o(n))return!1;const r=Z(e),s=r.indexOf(n);if(s<0)return!1;const a=r[s+t];return a===void 0||!H(a)?!1:o?o(a):!0}const De=["section","agent","flat"],Be=["active-first","recent"];function Dn(e){if(typeof e!="object"||e===null)return y;const n=e,t=new Set(w),o=[];if(Array.isArray(n.order))for(const l of n.order)typeof l=="string"&&t.has(l)&&(o.includes(l)||o.push(l));for(const l of w)o.includes(l)||o.push(l);const r=[];if(Array.isArray(n.hidden))for(const l of n.hidden)typeof l=="string"&&t.has(l)&&(r.includes(l)||r.push(l));const s=De.includes(n.groupBy)?n.groupBy:y.groupBy,a=ye.includes(n.basis)?n.basis:y.basis,i=Be.includes(n.orderBy)?n.orderBy:y.orderBy,c=typeof n.loads=="number"&&Number.isFinite(n.loads)&&n.loads>0?Math.min(Ie,Math.floor(n.loads)):0,u=[];if(Array.isArray(n.pinnedAgents)){for(const l of n.pinnedAgents)if(typeof l=="string"&&l!==""&&!u.includes(l)){if(u.length>=Te)break;u.push(l)}}const m=[],h=new Set;if(Array.isArray(n.pins))for(const l of n.pins)typeof l=="string"&&l.length!==0&&(h.has(l)||(h.add(l),m.push(l)));return{hidden:r,order:o,groupBy:s,basis:a,orderBy:i,loads:c,pins:m,pinnedAgents:u}}const He="both",W={background:"sunken",foreground:"ink",cursor:"accent",cursorAccent:"surface",selectionBackground:"accent",selectionForeground:"onAccent",black:"inkDim",red:"danger",green:"success",yellow:"warning",blue:"info",magenta:"danger",cyan:"info",white:"ink",brightBlack:"inkMuted",brightRed:"danger",brightGreen:"success",brightYellow:"warning",brightBlue:"info",brightMagenta:"danger",brightCyan:"info",brightWhite:"ink"},We=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Bn=(e=document.documentElement)=>{const n=getComputedStyle(e),t={};for(const o of Object.keys(W)){const r=$e(n,W[o]);r&&(t[o]=r)}return Object.keys(t).length===0&&xe(e),t},Hn=(e,n=document.documentElement)=>{if(e==null)return;n.dataset.theme=e,n.classList.toggle("dark",e.toLowerCase().includes("light")===!1),ke(n,"--color-sunken")||console.warn(`[console] the capture view was fed theme "${e}", which resolves no role variables; the frame will not be this app's colours`)},ke=(e,n)=>typeof getComputedStyle!="function"?"":getComputedStyle(e).getPropertyValue(n).trim(),k=new Set,xe=e=>{const n=e.dataset.theme??"(none)";k.has(n)||(k.add(n),console.warn(`[console] no terminal role resolved for theme "${n}": the terminal is painting xterm's own defaults, not this app's palette`))},Ue=13,$e=(e,n)=>{const t=We(n),o=e.getPropertyValue(`--color-${t}`).trim();if(x(o))return o;const r=e.getPropertyValue(`--lo-${t}`).trim();return x(r)?r:""},Fe=/^#[0-9a-fA-F]{3,8}$/,Xe=/^(rgb|rgba|hsl|hsla|color)\(/,x=e=>Fe.test(e)||Xe.test(e),Ge=(e=document.documentElement)=>typeof document>"u"||typeof getComputedStyle!="function"?"monospace":getComputedStyle(e).getPropertyValue("--font-mono").trim()||"monospace",Ve=(e,n=Ue,t=typeof window>"u"?1:window.devicePixelRatio||1)=>{let o=n*.6,r=n*1.2;if(typeof document>"u")return{cellWidth:o,cellHeight:r};const s=e??Ge(),i=document.createElement("canvas").getContext("2d");if(!i)return{cellWidth:o,cellHeight:r};i.font=`${n}px ${s}`;const c=i.measureText("W");Number.isFinite(c.width)&&c.width>0&&(o=c.width);const u=c.fontBoundingBoxAscent+c.fontBoundingBoxDescent;return Number.isFinite(u)&&u>0&&(r=je(u,t)),{cellWidth:o,cellHeight:r}},je=(e,n)=>Math.ceil(e*n)/n,C=e=>({isRunPanelOpen:e==="isRunPanelOpen",isCanvasOpen:e==="isCanvasOpen",isBrowserPaneOpen:e==="isBrowserPaneOpen",isConsolePaneOpen:e==="isConsolePaneOpen"});function Wn(e,n){const t=n.isCanvasOpen?"canvas":n.isRunPanelOpen?"run":n.isBrowserPaneOpen?"browser":n.isConsolePaneOpen?"console":null;if(t===null)return 0;let o;switch(t){case"canvas":o=Math.max(G,n.rightSlotWidth||z);break;case"run":o=Math.max(ze,n.rightSlotWidth||q);break;case"browser":o=Math.max(qe,n.rightSlotWidth||ee);break;case"console":o=Math.max(en,n.rightSlotWidth||ne);break}return e<=0?o:t==="canvas"?Math.min(o,V(e)):Math.min(o,Math.max(0,e-X))}const z=800,U=A,q=420,Ye=20,Ke=4,ee=640,Qe=100,Je=16,Ze=()=>Math.ceil(Qe*Ve().cellWidth)+Je,ne=Ze(),ze=320,qe=480,en=480,nn=5e3,kn=(e,n)=>e.some(t=>t.surface===n),xn=(e,n=Date.now())=>e.some(t=>n-t.at<nn),tn=[],b=e=>{if(typeof document>"u")return;const n=document.documentElement;if(e===null){n.style.removeProperty(D);return}n.style.setProperty(D,`${e}px`)},Un=ie()(ue(e=>({isCommandPaletteOpen:!1,commandPaletteQuery:"",isSidebarCollapsed:!1,showAgentReasoning:!1,themeName:oe,rightSlotWidth:0,chatSidebarWidth:U,chatSidebarRegions:He,chatSidebarView:y,chatSidebarListHeight:null,chatMeasureWidth:null,chatSidebarOrder:"entities-first",dismissedBuiltinOfferSignature:"",isCanvasOpen:!1,isRunPanelOpen:!1,isBrowserPaneOpen:!1,isConsolePaneOpen:!1,consoleOpenIntent:null,runPanelReveal:null,browserPaneScope:"conversation",consoleActiveSurface:null,consoleUnseen:tn,isCreateAgentDialogOpen:!1,mentionRecents:null,profileRecents:{agent:[],team:[]},openCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!0})},closeCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!1})},openCommandPalette:()=>{e({isCommandPaletteOpen:!0})},closeCommandPalette:()=>{e({isCommandPaletteOpen:!1,commandPaletteQuery:""})},toggleCommandPalette:(n="")=>{e(t=>({isCommandPaletteOpen:!t.isCommandPaletteOpen,commandPaletteQuery:t.isCommandPaletteOpen?t.commandPaletteQuery:n}))},setCommandPaletteQuery:n=>{e({commandPaletteQuery:n})},toggleSidebar:()=>{e(n=>({isSidebarCollapsed:!n.isSidebarCollapsed}))},setSidebarCollapsed:n=>{e({isSidebarCollapsed:n})},setShowAgentReasoning:n=>{e({showAgentReasoning:n})},setTheme:n=>{e({themeName:n})},setCanvasOpen:n=>{e(n?C("isCanvasOpen"):{isCanvasOpen:!1})},setRunPanelOpen:n=>{e(n?C("isRunPanelOpen"):{isRunPanelOpen:!1})},setBrowserPaneOpen:n=>{e(n?C("isBrowserPaneOpen"):{isBrowserPaneOpen:!1})},setConsolePaneOpen:n=>{e(n?C("isConsolePaneOpen"):{isConsolePaneOpen:!1})},setConsoleActiveSurface:n=>{e({consoleActiveSurface:n})},requestConsoleOpen:n=>{e({consoleOpenIntent:n})},clearConsoleOpenIntent:n=>{e(t=>t.consoleOpenIntent===n?{consoleOpenIntent:null}:{})},markConsoleUnseen:(n,t)=>{e(o=>o.consoleUnseen.some(r=>r.surface===t)?{}:{consoleUnseen:[...o.consoleUnseen,{sessionId:n,surface:t,at:Date.now()}]})},clearConsoleUnseen:n=>{const t=Array.isArray(n)?n:[n];e(o=>{const r=o.consoleUnseen.filter(s=>!t.includes(s.surface));return r.length===o.consoleUnseen.length?{}:{consoleUnseen:r}})},setRightSlotWidth:n=>{e({rightSlotWidth:n})},restoreDefaultRightSlotWidth:()=>{e({rightSlotWidth:0})},setBrowserPaneScope:n=>{e({browserPaneScope:n})},revealRunPanelSection:n=>{e(t=>({...C("isRunPanelOpen"),runPanelReveal:{section:n,nonce:(t.runPanelReveal?.nonce??0)+1}}))},clearRunPanelReveal:n=>{e(t=>t.runPanelReveal?.nonce===n?{runPanelReveal:null}:{})},setChatSidebarWidth:n=>{e({chatSidebarWidth:Math.min(F,Math.max($,n))})},setChatSidebarRegions:n=>{e({chatSidebarRegions:n})},setChatSidebarListHeight:n=>{e({chatSidebarListHeight:n})},restoreDefaultChatSidebarListHeight:()=>{e({chatSidebarListHeight:null})},setChatMeasureWidth:n=>{const t=Y(n);b(t),e({chatMeasureWidth:t})},restoreDefaultChatMeasureWidth:()=>{b(null),e({chatMeasureWidth:null})},setChatSidebarOrder:n=>{e({chatSidebarOrder:n})},setChatSidebarView:n=>{e({chatSidebarView:n})},dismissBuiltinOffer:n=>{e({dismissedBuiltinOfferSignature:n})},restoreDefaultChatSidebarWidth:()=>{e({chatSidebarWidth:U})},rememberMention:(n,t)=>{e(o=>{const r=o.mentionRecents,s=r?.cwd===n?r.paths:[],a=[t,...s.filter(i=>i!==t)].slice(0,Ye);return{mentionRecents:{cwd:n,paths:a}}})},rememberProfile:(n,t)=>{e(o=>({profileRecents:{...o.profileRecents,[n]:on(o.profileRecents[n]??[],t)}}))}}),{name:"ui-preferences-storage",version:1,migrate:sn,partialize:rn,onRehydrateStorage:()=>e=>{b(e?.chatMeasureWidth??null)}}));function on(e,n){return[n,...e.filter(t=>t!==n)].slice(0,Ke)}function rn(e){const{runPanelReveal:n,consoleOpenIntent:t,...o}=e;return o}function sn(e,n){const t={...e??{}};if(n>=1)return t;const o=[["canvasWidth",z],["runPanelWidth",q],["browserPanelWidth",ee],["consolePanelWidth",ne]];let r=0;for(const[s,a]of o){const i=t[s];if(typeof i=="number"&&i>0&&i!==a){r=i;break}}for(const[s]of o)delete t[s];return t.rightSlotWidth=r,t}export{ce as $,On as A,Rn as B,nn as C,y as D,wn as E,Pe as F,K as G,Cn as H,Sn as I,Wn as J,mn as K,dn as L,fn as M,G as N,V as O,qe as P,en as Q,ze as R,yn as S,Ue as T,q as U,L as V,ee as W,ne as X,X as Y,un as Z,j as _,Hn as a,cn as a0,ln as a1,fe as a2,R as a3,F as a4,$ as a5,Se as a6,pe as a7,D as a8,B as a9,pn as aa,Ce as ab,hn as ac,gn as ad,xn as b,ie as c,Q as d,Ne as e,H as f,An as g,vn as h,kn as i,Nn as j,Ln as k,Dn as l,Ve as m,Pn as n,I as o,ue as p,bn as q,Bn as r,_n as s,Ge as t,Un as u,Z as v,En as w,Tn as x,In as y,Mn as z};
1
+ import{b as M,D as oe}from"./index-DvjcW_EJ.js";const v=e=>{let n;const t=new Set,o=(u,m)=>{const h=typeof u=="function"?u(n):u;if(!Object.is(h,n)){const l=n;n=m??(typeof h!="object"||h===null)?h:Object.assign({},n,h),t.forEach(p=>p(n,l))}},r=()=>n,i={setState:o,getState:r,getInitialState:()=>c,subscribe:u=>(t.add(u),()=>t.delete(u))},c=n=e(o,r,i);return i},re=e=>e?v(e):v,se=e=>e;function ae(e,n=se){const t=M.useSyncExternalStore(e.subscribe,()=>n(e.getState()),()=>n(e.getInitialState()));return M.useDebugValue(t),t}const N=e=>{const n=re(e),t=o=>ae(n,o);return Object.assign(t,n),t},ie=e=>e?N(e):N;function ce(e,n){let t;try{t=e()}catch{return}return{getItem:r=>{var s;const a=c=>c===null?null:JSON.parse(c,void 0),i=(s=t.getItem(r))!=null?s:null;return i instanceof Promise?i.then(a):a(i)},setItem:(r,s)=>t.setItem(r,JSON.stringify(s,void 0)),removeItem:r=>t.removeItem(r)}}const P=e=>n=>{try{const t=e(n);return t instanceof Promise?t:{then(o){return P(o)(t)},catch(o){return this}}}catch(t){return{then(o){return this},catch(o){return P(o)(t)}}}},le=(e,n)=>(t,o,r)=>{let s={storage:ce(()=>localStorage),partialize:d=>d,version:0,merge:(d,S)=>({...S,...d}),...n},a=!1;const i=new Set,c=new Set;let u=s.storage;if(!u)return e((...d)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...d)},o,r);const m=()=>{const d=s.partialize({...o()});return u.setItem(s.name,{state:d,version:s.version})},h=r.setState;r.setState=(d,S)=>{h(d,S),m()};const l=e((...d)=>{t(...d),m()},o,r);r.getInitialState=()=>l;let p;const T=()=>{var d,S;if(!u)return;a=!1,i.forEach(f=>{var g;return f((g=o())!=null?g:l)});const E=((S=s.onRehydrateStorage)==null?void 0:S.call(s,(d=o())!=null?d:l))||void 0;return P(u.getItem.bind(u))(s.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==s.version){if(s.migrate){const g=s.migrate(f.state,f.version);return g instanceof Promise?g.then(O=>[!0,O]):[!0,g]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,f.state];return[!1,void 0]}).then(f=>{var g;const[O,te]=f;if(p=s.merge(te,(g=o())!=null?g:l),t(p,!0),O)return m()}).then(()=>{E?.(p,void 0),p=o(),a=!0,c.forEach(f=>f(p))}).catch(f=>{E?.(void 0,f)})};return r.persist={setOptions:d=>{s={...s,...d},d.storage&&(u=d.storage)},clearStorage:()=>{u?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>T(),hasHydrated:()=>a,onHydrate:d=>(i.add(d),()=>{i.delete(d)}),onFinishHydration:d=>(c.add(d),()=>{c.delete(d)})},s.skipHydration||T(),p||l},ue=le,A=260,$=220,F=320,R=56,de=A,fe=1024,X=480,G=400,he=560;function V(e){return Math.max(0,Math.min(he,e-X))}function L(e){return V(e)>=G?"docked":"overlay"}function me(e,n=A){return L(e-j(n))==="overlay"&&L(e-R)==="docked"}function j(e){return Number.isNaN(e)?A:Math.min(F,Math.max($,e))}function cn(e,n,t,o=A,r=!1){if(e>=fe){const a=!n&&r&&me(e,o);return{mode:n||a?"strip":"docked",width:n||a?R:j(o),collapsed:n||a,sheetOpen:!1,resizable:!n&&!a}}return{mode:t?"overlay":"strip",width:t?de:R,collapsed:!0,sheetOpen:t,resizable:!1}}function ln(e){return e.shiftKey||e.altKey||!(e.metaKey||e.ctrlKey)?!1:e.key.toLowerCase()==="b"}const un=e=>e?"⌘B":"Ctrl+B",dn="@container/chatcol",fn="w-full @min-[750px]/chatcol:max-w-[var(--lo-chat-measure)] @min-[750px]/chatcol:mx-auto",ge="--lo-chat-measure-shipped",D="--lo-chat-measure-override",hn=()=>{if(typeof document>"u"||typeof getComputedStyle!="function")return null;const e=getComputedStyle(document.documentElement).getPropertyValue(ge).trim(),n=Number.parseFloat(e);return Number.isFinite(n)&&n>0?n:null},mn="px-6",gn="max-h-[7.5rem] overflow-y-auto leading-5",pe=520,Se=1100,_e=3,Y=e=>Math.min(Se,Math.max(pe,Math.round(e))),Ce=({startWidth:e,deltaX:n,edge:t})=>Y(t==="right"?e+n*2:e-n*2),B=(e,n)=>Math.min(e,n),pn=({startWidth:e,deltaX:n,edge:t,panePx:o})=>{if(Math.abs(n)<_e)return null;const r=Ce({startWidth:e,deltaX:n,edge:t});return B(r,o)===B(e,o)?null:r},ye=["active","created"],Sn={running:"Running",today:"Today",week:"This week",older:"Older"},Ae=new Set(["busy","delegating","approval","answer","wedged"]);function K(e){return Ae.has(e.status?.code??"")}const Ee=24*60*60*1e3,Oe=e=>{const n=new Date(e);return n.setHours(0,0,0,0),n.getTime()};function Q(e,n){const t=n==="created"?e.created_at:e.updated_at;return typeof t!="number"||!Number.isFinite(t)||n==="created"&&t<=0?null:t*1e3}function be(e,n,t){if(K(e))return"running";const o=Q(e,t);if(o===null)return"older";const r=Oe(n);return o>=r?"today":o>=r-6*Ee?"week":"older"}function _n(e,n,t){const o={running:[],today:[],week:[],older:[]};for(const r of e)o[be(r,n,t)].push(r);return o}function Pe(e,n,t){const o=Q(e,t);if(o===null)return"";const r=Math.floor(Math.max(0,n-o)/6e4);if(r<1)return"now";if(r<60)return`${r}m`;const s=Math.floor(r/60);if(s<24)return`${s}h`;const a=Math.floor(s/24);if(a<7)return`${a}d`;const i=Math.floor(a/7);return a<365?`${i}w`:`${Math.floor(a/365)}y`}function Cn(e,n,t){const o=Pe(e,n,t);if(!o)return"";const r=t==="created"?"created":"last active";if(o==="now")return`${r} just now`;const s={m:"minute",h:"hour",d:"day",w:"week",y:"year"},a=Number.parseInt(o,10),i=s[o.slice(-1)];return`${r} ${a} ${i}${a===1?"":"s"} ago`}const w=["pinned","running","today","week","older","agents","teams"],yn={pinned:"Pinned",running:"Running",today:"Today",week:"This week",older:"Older",agents:"Agents",teams:"Teams"};function An(e){return e==="agents"||e==="teams"}const En=8,y={hidden:[],order:[...w],pins:[],groupBy:"section",basis:"active",orderBy:"active-first",loads:0,pinnedAgents:[]},Re=10,_=[25,50],we=50,Ie=500,Te=64;function I(e){const n=Math.max(0,Math.floor(e));return n===0?Re:n<=_.length?_[n-1]:_[_.length-1]+(n-_.length)*we}function On(e,n){const t=I(e+1)-I(e),o=Math.max(0,Math.min(t,n));return o===1?"Show 1 more chat":`Show ${o} more chats`}function J(e){return K(e)}function bn(e,n){if(n==="recent")return[...e];const t=[],o=[];for(const r of e)(J(r)?t:o).push(r);return[...t,...o]}function Pn(e,n){const{limit:t,currentId:o,searching:r=!1}=n;if(r)return{rows:[...e],lifted:!1,remaining:0};const s=e.slice(0,Math.max(0,t)),a=Math.max(0,e.length-s.length);if(!o)return{rows:s,lifted:!1,remaining:a};const i=e.findIndex(c=>c.session_id===o);return i<0||i<s.length?{rows:s,lifted:!1,remaining:a}:{rows:[e[i],...s],lifted:!0,remaining:a}}function Rn(e,n){if(n.searching)return{rows:[...e],lifted:!1,hidden:0,held:e.length};const t=I(n.loads),o=[];let r=t;for(const c of e){if(J(c)){o.push(c);continue}r>0&&(o.push(c),r-=1)}const s=n.currentId,a=s==null?null:e.find(c=>c.session_id===s)??null,i=a!==null&&!o.includes(a);return{rows:i&&a!==null?[a,...o]:o,lifted:i,hidden:e.length-o.length-(i?1:0),held:e.length}}function wn(e){if(e.add<=0)return null;const n=e.add===1?"Show 1 more chat":`Show ${e.add} more chats`;if(e.drawn>=e.total)return{label:n,aria:n};const t=`${e.drawn} of ${e.total}`;return{label:`${n} · ${t}`,aria:`${n} · ${t} shown`}}const Me="mt-4",ve="mt-2";function In(e){return e?Me:ve}function Tn(e,n,t,o){return t?e.toLocaleLowerCase().includes(t.toLocaleLowerCase())||(o??"").toLocaleLowerCase().includes(t.toLocaleLowerCase())||n>0:!0}function Mn(e,n){if(n==="section")return null;if(n==="flat")return[{key:"all",label:"",rows:[...e]}];const t=new Map;for(const s of e){const a=s.binding?.team||s.binding?.agent||"",i=a||"ungrouped",c=t.get(i)??{key:i,label:a||"Ungrouped",rows:[]};c.rows.push(s),t.set(i,c)}const o=[...t.values()],r=o.findIndex(s=>s.key==="ungrouped");return r>0&&o.push(...o.splice(r,1)),o}function Ne(e,n){return!e.hidden.includes(n)}function Z(e){return e.order.filter(n=>Ne(e,n))}function vn(e,n){const t=e.hidden.includes(n)?e.hidden.filter(o=>o!==n):[...e.hidden,n];return{...e,hidden:t}}function Nn(e,n,t){const o=Z(e),r=o.indexOf(n),s=o[r+t];if(r<0||s===void 0)return e;const a=e.order.indexOf(n),i=e.order.indexOf(s),c=[...e.order];return c[a]=s,c[i]=n,{...e,order:c}}const Le=["running","today","week","older"];function H(e){return Le.includes(e)}function Ln(e,n,t,o){if(!H(n)||o&&!o(n))return!1;const r=Z(e),s=r.indexOf(n);if(s<0)return!1;const a=r[s+t];return a===void 0||!H(a)?!1:o?o(a):!0}const De=["section","agent","flat"],Be=["active-first","recent"];function Dn(e){if(typeof e!="object"||e===null)return y;const n=e,t=new Set(w),o=[];if(Array.isArray(n.order))for(const l of n.order)typeof l=="string"&&t.has(l)&&(o.includes(l)||o.push(l));for(const l of w)o.includes(l)||o.push(l);const r=[];if(Array.isArray(n.hidden))for(const l of n.hidden)typeof l=="string"&&t.has(l)&&(r.includes(l)||r.push(l));const s=De.includes(n.groupBy)?n.groupBy:y.groupBy,a=ye.includes(n.basis)?n.basis:y.basis,i=Be.includes(n.orderBy)?n.orderBy:y.orderBy,c=typeof n.loads=="number"&&Number.isFinite(n.loads)&&n.loads>0?Math.min(Ie,Math.floor(n.loads)):0,u=[];if(Array.isArray(n.pinnedAgents)){for(const l of n.pinnedAgents)if(typeof l=="string"&&l!==""&&!u.includes(l)){if(u.length>=Te)break;u.push(l)}}const m=[],h=new Set;if(Array.isArray(n.pins))for(const l of n.pins)typeof l=="string"&&l.length!==0&&(h.has(l)||(h.add(l),m.push(l)));return{hidden:r,order:o,groupBy:s,basis:a,orderBy:i,loads:c,pins:m,pinnedAgents:u}}const He="both",W={background:"sunken",foreground:"ink",cursor:"accent",cursorAccent:"surface",selectionBackground:"accent",selectionForeground:"onAccent",black:"inkDim",red:"danger",green:"success",yellow:"warning",blue:"info",magenta:"danger",cyan:"info",white:"ink",brightBlack:"inkMuted",brightRed:"danger",brightGreen:"success",brightYellow:"warning",brightBlue:"info",brightMagenta:"danger",brightCyan:"info",brightWhite:"ink"},We=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Bn=(e=document.documentElement)=>{const n=getComputedStyle(e),t={};for(const o of Object.keys(W)){const r=$e(n,W[o]);r&&(t[o]=r)}return Object.keys(t).length===0&&xe(e),t},Hn=(e,n=document.documentElement)=>{if(e==null)return;n.dataset.theme=e,n.classList.toggle("dark",e.toLowerCase().includes("light")===!1),ke(n,"--color-sunken")||console.warn(`[console] the capture view was fed theme "${e}", which resolves no role variables; the frame will not be this app's colours`)},ke=(e,n)=>typeof getComputedStyle!="function"?"":getComputedStyle(e).getPropertyValue(n).trim(),k=new Set,xe=e=>{const n=e.dataset.theme??"(none)";k.has(n)||(k.add(n),console.warn(`[console] no terminal role resolved for theme "${n}": the terminal is painting xterm's own defaults, not this app's palette`))},Ue=13,$e=(e,n)=>{const t=We(n),o=e.getPropertyValue(`--color-${t}`).trim();if(x(o))return o;const r=e.getPropertyValue(`--lo-${t}`).trim();return x(r)?r:""},Fe=/^#[0-9a-fA-F]{3,8}$/,Xe=/^(rgb|rgba|hsl|hsla|color)\(/,x=e=>Fe.test(e)||Xe.test(e),Ge=(e=document.documentElement)=>typeof document>"u"||typeof getComputedStyle!="function"?"monospace":getComputedStyle(e).getPropertyValue("--font-mono").trim()||"monospace",Ve=(e,n=Ue,t=typeof window>"u"?1:window.devicePixelRatio||1)=>{let o=n*.6,r=n*1.2;if(typeof document>"u")return{cellWidth:o,cellHeight:r};const s=e??Ge(),i=document.createElement("canvas").getContext("2d");if(!i)return{cellWidth:o,cellHeight:r};i.font=`${n}px ${s}`;const c=i.measureText("W");Number.isFinite(c.width)&&c.width>0&&(o=c.width);const u=c.fontBoundingBoxAscent+c.fontBoundingBoxDescent;return Number.isFinite(u)&&u>0&&(r=je(u,t)),{cellWidth:o,cellHeight:r}},je=(e,n)=>Math.ceil(e*n)/n,C=e=>({isRunPanelOpen:e==="isRunPanelOpen",isCanvasOpen:e==="isCanvasOpen",isBrowserPaneOpen:e==="isBrowserPaneOpen",isConsolePaneOpen:e==="isConsolePaneOpen"});function Wn(e,n){const t=n.isCanvasOpen?"canvas":n.isRunPanelOpen?"run":n.isBrowserPaneOpen?"browser":n.isConsolePaneOpen?"console":null;if(t===null)return 0;let o;switch(t){case"canvas":o=Math.max(G,n.rightSlotWidth||z);break;case"run":o=Math.max(ze,n.rightSlotWidth||q);break;case"browser":o=Math.max(qe,n.rightSlotWidth||ee);break;case"console":o=Math.max(en,n.rightSlotWidth||ne);break}return e<=0?o:t==="canvas"?Math.min(o,V(e)):Math.min(o,Math.max(0,e-X))}const z=800,U=A,q=420,Ye=20,Ke=4,ee=640,Qe=100,Je=16,Ze=()=>Math.ceil(Qe*Ve().cellWidth)+Je,ne=Ze(),ze=320,qe=480,en=480,nn=5e3,kn=(e,n)=>e.some(t=>t.surface===n),xn=(e,n=Date.now())=>e.some(t=>n-t.at<nn),tn=[],b=e=>{if(typeof document>"u")return;const n=document.documentElement;if(e===null){n.style.removeProperty(D);return}n.style.setProperty(D,`${e}px`)},Un=ie()(ue(e=>({isCommandPaletteOpen:!1,commandPaletteQuery:"",isSidebarCollapsed:!1,showAgentReasoning:!1,themeName:oe,rightSlotWidth:0,chatSidebarWidth:U,chatSidebarRegions:He,chatSidebarView:y,chatSidebarListHeight:null,chatMeasureWidth:null,chatSidebarOrder:"entities-first",dismissedBuiltinOfferSignature:"",isCanvasOpen:!1,isRunPanelOpen:!1,isBrowserPaneOpen:!1,isConsolePaneOpen:!1,consoleOpenIntent:null,runPanelReveal:null,browserPaneScope:"conversation",consoleActiveSurface:null,consoleUnseen:tn,isCreateAgentDialogOpen:!1,mentionRecents:null,profileRecents:{agent:[],team:[]},openCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!0})},closeCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!1})},openCommandPalette:()=>{e({isCommandPaletteOpen:!0})},closeCommandPalette:()=>{e({isCommandPaletteOpen:!1,commandPaletteQuery:""})},toggleCommandPalette:(n="")=>{e(t=>({isCommandPaletteOpen:!t.isCommandPaletteOpen,commandPaletteQuery:t.isCommandPaletteOpen?t.commandPaletteQuery:n}))},setCommandPaletteQuery:n=>{e({commandPaletteQuery:n})},toggleSidebar:()=>{e(n=>({isSidebarCollapsed:!n.isSidebarCollapsed}))},setSidebarCollapsed:n=>{e({isSidebarCollapsed:n})},setShowAgentReasoning:n=>{e({showAgentReasoning:n})},setTheme:n=>{e({themeName:n})},setCanvasOpen:n=>{e(n?C("isCanvasOpen"):{isCanvasOpen:!1})},setRunPanelOpen:n=>{e(n?C("isRunPanelOpen"):{isRunPanelOpen:!1})},setBrowserPaneOpen:n=>{e(n?C("isBrowserPaneOpen"):{isBrowserPaneOpen:!1})},setConsolePaneOpen:n=>{e(n?C("isConsolePaneOpen"):{isConsolePaneOpen:!1})},setConsoleActiveSurface:n=>{e({consoleActiveSurface:n})},requestConsoleOpen:n=>{e({consoleOpenIntent:n})},clearConsoleOpenIntent:n=>{e(t=>t.consoleOpenIntent===n?{consoleOpenIntent:null}:{})},markConsoleUnseen:(n,t)=>{e(o=>o.consoleUnseen.some(r=>r.surface===t)?{}:{consoleUnseen:[...o.consoleUnseen,{sessionId:n,surface:t,at:Date.now()}]})},clearConsoleUnseen:n=>{const t=Array.isArray(n)?n:[n];e(o=>{const r=o.consoleUnseen.filter(s=>!t.includes(s.surface));return r.length===o.consoleUnseen.length?{}:{consoleUnseen:r}})},setRightSlotWidth:n=>{e({rightSlotWidth:n})},restoreDefaultRightSlotWidth:()=>{e({rightSlotWidth:0})},setBrowserPaneScope:n=>{e({browserPaneScope:n})},revealRunPanelSection:n=>{e(t=>({...C("isRunPanelOpen"),runPanelReveal:{section:n,nonce:(t.runPanelReveal?.nonce??0)+1}}))},clearRunPanelReveal:n=>{e(t=>t.runPanelReveal?.nonce===n?{runPanelReveal:null}:{})},setChatSidebarWidth:n=>{e({chatSidebarWidth:Math.min(F,Math.max($,n))})},setChatSidebarRegions:n=>{e({chatSidebarRegions:n})},setChatSidebarListHeight:n=>{e({chatSidebarListHeight:n})},restoreDefaultChatSidebarListHeight:()=>{e({chatSidebarListHeight:null})},setChatMeasureWidth:n=>{const t=Y(n);b(t),e({chatMeasureWidth:t})},restoreDefaultChatMeasureWidth:()=>{b(null),e({chatMeasureWidth:null})},setChatSidebarOrder:n=>{e({chatSidebarOrder:n})},setChatSidebarView:n=>{e({chatSidebarView:n})},dismissBuiltinOffer:n=>{e({dismissedBuiltinOfferSignature:n})},restoreDefaultChatSidebarWidth:()=>{e({chatSidebarWidth:U})},rememberMention:(n,t)=>{e(o=>{const r=o.mentionRecents,s=r?.cwd===n?r.paths:[],a=[t,...s.filter(i=>i!==t)].slice(0,Ye);return{mentionRecents:{cwd:n,paths:a}}})},rememberProfile:(n,t)=>{e(o=>({profileRecents:{...o.profileRecents,[n]:on(o.profileRecents[n]??[],t)}}))}}),{name:"ui-preferences-storage",version:1,migrate:sn,partialize:rn,onRehydrateStorage:()=>e=>{b(e?.chatMeasureWidth??null)}}));function on(e,n){return[n,...e.filter(t=>t!==n)].slice(0,Ke)}function rn(e){const{runPanelReveal:n,consoleOpenIntent:t,...o}=e;return o}function sn(e,n){const t={...e??{}};if(n>=1)return t;const o=[["canvasWidth",z],["runPanelWidth",q],["browserPanelWidth",ee],["consolePanelWidth",ne]];let r=0;for(const[s,a]of o){const i=t[s];if(typeof i=="number"&&i>0&&i!==a){r=i;break}}for(const[s]of o)delete t[s];return t.rightSlotWidth=r,t}export{ce as $,Mn as A,On as B,mn as C,y as D,Rn as E,wn as F,Pe as G,K as H,Cn as I,Sn as J,Wn as K,dn as L,fn as M,G as N,V as O,qe as P,en as Q,ze as R,yn as S,Ue as T,q as U,L as V,ee as W,ne as X,X as Y,un as Z,j as _,Hn as a,cn as a0,ln as a1,fe as a2,R as a3,F as a4,$ as a5,Se as a6,pe as a7,D as a8,B as a9,pn as aa,Ce as ab,hn as ac,gn as ad,xn as b,ie as c,nn as d,Q as e,Ne as f,H as g,An as h,kn as i,vn as j,Nn as k,Ln as l,Ve as m,Dn as n,Pn as o,ue as p,I as q,Bn as r,bn as s,Ge as t,Un as u,_n as v,Z as w,En as x,Tn as y,In as z};
@@ -1,4 +1,4 @@
1
- import{c as l,p as T}from"./error-boundary-BR1z8pWF.js";import{t as j,c as R,n as K,b as _,g as Q,f as U,h as z,i as N,j as S,a as v}from"./en-US-BcB1DWxG.js";import{j as r,c as g,r as V}from"./index-CSNQxVPq.js";import{bF as q,b9 as O,bG as P,aL as k,aF as B,u as w,aM as b,aP as Y,aN as D,bc as Z,a8 as C,bd as G}from"./conversation-input-sync-CGaXAqah.js";import{ae as W,af as X,ag as L}from"./index-D09I1LXM.js";import{B as J}from"./book-open-j4JS3yvI.js";import{j as ee,k as te,m as ae,n as ne,o as se,q as oe,r as ie}from"./use-memberships-query-BhO5nUlo.js";/**
1
+ import{c as l,j as T}from"./error-boundary-BCN3_4Dn.js";import{t as j,c as R,n as K,b as _,g as Q,f as U,h as z,i as N,j as S,a as v}from"./en-US-BcB1DWxG.js";import{j as r,c as g,r as V}from"./index-DvjcW_EJ.js";import{bG as q,ba as O,bH as P,aL as k,aF as B,u as w,aM as b,aP as Y,aN as D,bd as Z,a8 as C,be as G}from"./conversation-input-sync-zDEtF-9C.js";import{aw as W,ax as X,ay as L}from"./index-QVureTEn.js";import{B as J}from"./book-open-CueO0nwZ.js";import{j as ee,k as te,m as ae,n as ne,o as se,q as oe,r as ie}from"./use-memberships-query-B_qwJ7_k.js";/**
2
2
  * @license lucide-react v0.507.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -58,4 +58,4 @@ import{c as l,p as T}from"./error-boundary-BR1z8pWF.js";import{t as j,c as R,n a
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const Se=[["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"}]],ve=l("shopping-cart",Se);function De(e,t){const o=+j(e)-+j(t);return o<0?-1:o>0?1:o}function Ce(e){return R(e,Date.now())}function $e(e){return t=>{const a=(e?Math[e]:Math.trunc)(t);return a===0?0:a}}function qe(e,t,o){const a=Q(),n=o?.locale??a.locale??U,s=De(e,t);if(isNaN(s))throw new RangeError("Invalid time value");const i=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:s}),[h,m]=K(o?.in,...s>0?[t,e]:[e,t]),d=$e("round"),x=m.getTime()-h.getTime(),f=x/v,E=_(m)-_(h),y=(x-E)/v,H=o?.unit;let u;if(f<1?u="second":f<60?u="minute":f<z?u="hour":y<N?u="day":y<S?u="month":u="year",u==="second"){const c=d(x/1e3);return n.formatDistance("xSeconds",c,i)}else if(u==="minute"){const c=d(f);return n.formatDistance("xMinutes",c,i)}else if(u==="hour"){const c=d(f/60);return n.formatDistance("xHours",c,i)}else if(u==="day"){const c=d(y/z);return n.formatDistance("xDays",c,i)}else if(u==="month"){const c=d(y/N);return c===12&&H!=="month"?n.formatDistance("xYears",1,i):n.formatDistance("xMonths",c,i)}else{const c=d(y/S);return n.formatDistance("xYears",c,i)}}function Ve(e,t){return qe(e,Ce(e),t)}const I={investment:{icon:r.jsx(ce,{size:14,"aria-hidden":"true"}),label:"Investment"},accounting:{icon:r.jsx(J,{size:14,"aria-hidden":"true"}),label:"Accounting"},healthcare:{icon:r.jsx(Me,{size:14,"aria-hidden":"true"}),label:"Healthcare"},legal:{icon:r.jsx(Ne,{size:14,"aria-hidden":"true"}),label:"Legal"},software:{icon:r.jsx(P,{size:14,"aria-hidden":"true"}),label:"Software"},security:{icon:r.jsx(X,{size:14,"aria-hidden":"true"}),label:"Security"},role_play:{icon:r.jsx(O,{size:14,"aria-hidden":"true"}),label:"Role play"},personal_assistance:{icon:r.jsx(W,{size:14,"aria-hidden":"true"}),label:"Personal assistance"},education:{icon:r.jsx(we,{size:14,"aria-hidden":"true"}),label:"Education"},marketing:{icon:r.jsx(_e,{size:14,"aria-hidden":"true"}),label:"Marketing"},sales:{icon:r.jsx(ve,{size:14,"aria-hidden":"true"}),label:"Sales"},research:{icon:r.jsx(xe,{size:14,"aria-hidden":"true"}),label:"Research"},analysis:{icon:r.jsx(ue,{size:14,"aria-hidden":"true"}),label:"Analysis"},management:{icon:r.jsx(he,{size:14,"aria-hidden":"true"}),label:"Management"},social_media:{icon:r.jsx(fe,{size:14,"aria-hidden":"true"}),label:"Social media"},other:{icon:r.jsx(ge,{size:14,"aria-hidden":"true"}),label:"Other"}};function p(e){const t=e.split("_").join(" ");return t.charAt(0).toUpperCase()+t.slice(1)}const Oe=e=>I[e]??{icon:r.jsx(q,{size:14,"aria-hidden":"true"}),label:p(e)},$="inline-flex min-h-5.5 items-center rounded-full border border-hairline bg-sunken px-2 text-meta leading-none",Pe=({tags:e,categories:t,className:o})=>{if((!e||e.length===0)&&(!t||t.length===0))return null;const a=new Set((t??[]).map(s=>(I[s]?.label??p(s)).toLowerCase())),n=(e??[]).filter(s=>!a.has(p(s).toLowerCase()));return r.jsxs("div",{className:g("relative flex flex-wrap items-center gap-1.5 overflow-hidden",o),"data-testid":"agent-tags-and-categories",children:[t?.map(s=>{const i=Oe(s);return r.jsxs("span",{className:g($,"gap-1 font-medium text-ink-muted"),children:[i.icon,i.label]},s)}),n.map(s=>r.jsxs("span",{className:g($,"gap-1 font-normal text-ink-dim"),children:[r.jsx(q,{size:12,"aria-hidden":"true"}),p(s)]},s))]})},Be=({orgName:e,className:t})=>r.jsxs(T,{variant:"neutral",className:g("gap-1",t),"data-testid":"agent-org-badge",title:e?`Shared with ${e}, not the public hub`:"Shared with an organization, not the public hub",children:[r.jsx(O,{"aria-hidden":"true"}),e??"Organization"]}),M={all:["agent-statuses"],page:e=>[...M.all,"page",[...e]]},Le=e=>[...new Set(e)].sort(),Ye=({agentIds:e,enabled:t=!0})=>{const{isAuthenticated:o}=k(),a=e.join(","),n=V.useMemo(()=>Le(e),[a]),s=B({queryKey:M.page(n),queryFn:async()=>(await ee(n)).result?.statuses??{},enabled:t&&o&&n.length>0,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:!1});return{...s,statuses:s.data??{},isKnown:s.isSuccess}},Ze=(e,t,o)=>o?e&&t[o]!==void 0:!1,F=(e,t,o)=>{e.setQueriesData({queryKey:M.all},a=>{if(!a)return a;const n=a[t]??{liked:!1,favourited:!1};return{...a,[t]:{...n,...o}}})},A=(e,{agentId:t,field:o,delta:a})=>{e.setQueriesData({queryKey:te.all},n=>{if(!n)return n;const s=n.result?.records??[];return s.some(i=>i.id===t)?{...n,result:{...n.result,records:s.map(i=>i.id===t?{...i,[o]:Math.max(0,(i[o]??0)+a)}:i)}}:n})},Ge=()=>{const e=w(),{isAuthenticated:t}=k();return b({mutationFn:async({agentId:a,isCurrentlyFavourited:n})=>{if(!t)throw new Error("Authentication required to favourite/unfavourite an agent.");if(!a)throw new Error("Agent ID is required.");return n?(await ae(a),{favourited:!1,changed:!0}):{favourited:!0,changed:(await ne(a)).result?.already_favourited!==!0}},onSuccess:({favourited:a,changed:n},s)=>{F(e,s.agentId,{favourited:a}),n&&A(e,{agentId:s.agentId,field:"favourite_count",delta:a?1:-1})}})},We=()=>{const e=w(),{isAuthenticated:t}=k();return b({mutationFn:async({agentId:a,isCurrentlyLiked:n})=>{if(!t)throw new Error("Authentication required to like/unlike an agent.");if(!a)throw new Error("Agent ID is required.");return n?(await se(a),{liked:!1,changed:!0}):{liked:!0,changed:(await oe(a)).result?.already_liked!==!0}},onSuccess:({liked:a,changed:n},s)=>{F(e,s.agentId,{liked:a}),n&&A(e,{agentId:s.agentId,field:"like_count",delta:a?1:-1})}})},Ie=(e,t)=>{const o=[];for(const[,a]of e.getQueriesData({queryKey:L}))for(const n of a?.agents??[])n.id!==t&&o.push(n.name);return o},Xe=()=>{const e=w(),t=Y();return b({mutationFn:async({agentId:a})=>{if(!C.baseUrl)throw new Error("Local Operator API URL is not configured.");return G.downloadAgentFromRadient(C.baseUrl,a)},onSuccess:(a,n)=>{const s=a.result,i=s?.name?.trim()||n.agentName?.trim()||"Agent",h=s?.renamed_from?.trim()||null,m=s?.id?ie(i,Ie(e,s.id)):null;h?D(`Downloaded "${i}" — you already have an agent called "${h}".`):m?Z(`Downloaded "${i}". You already have an agent called "${m}", so two agents now answer to that name and either may be picked. Rename one of them.`):D(`Downloaded "${i}" from the hub.`),e.invalidateQueries({queryKey:L}),A(e,{agentId:n.agentId,field:"download_count",delta:1});const d=a.result;d?.id?t(`/chat/${d.id}`):console.warn("Downloaded agent ID not found in response, cannot navigate to chat.")}})};export{Pe as A,I as C,Ue as H,Be as O,We as a,Ge as b,Xe as c,Oe as d,qe as e,Ve as f,Ze as i,Ye as u};
61
+ */const Se=[["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"}]],ve=l("shopping-cart",Se);function De(e,t){const o=+j(e)-+j(t);return o<0?-1:o>0?1:o}function Ce(e){return R(e,Date.now())}function $e(e){return t=>{const a=(e?Math[e]:Math.trunc)(t);return a===0?0:a}}function qe(e,t,o){const a=Q(),n=o?.locale??a.locale??U,s=De(e,t);if(isNaN(s))throw new RangeError("Invalid time value");const i=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:s}),[h,m]=K(o?.in,...s>0?[t,e]:[e,t]),d=$e("round"),x=m.getTime()-h.getTime(),f=x/v,E=_(m)-_(h),y=(x-E)/v,F=o?.unit;let u;if(f<1?u="second":f<60?u="minute":f<z?u="hour":y<N?u="day":y<S?u="month":u="year",u==="second"){const c=d(x/1e3);return n.formatDistance("xSeconds",c,i)}else if(u==="minute"){const c=d(f);return n.formatDistance("xMinutes",c,i)}else if(u==="hour"){const c=d(f/60);return n.formatDistance("xHours",c,i)}else if(u==="day"){const c=d(y/z);return n.formatDistance("xDays",c,i)}else if(u==="month"){const c=d(y/N);return c===12&&F!=="month"?n.formatDistance("xYears",1,i):n.formatDistance("xMonths",c,i)}else{const c=d(y/S);return n.formatDistance("xYears",c,i)}}function Ve(e,t){return qe(e,Ce(e),t)}const I={investment:{icon:r.jsx(ce,{size:14,"aria-hidden":"true"}),label:"Investment"},accounting:{icon:r.jsx(J,{size:14,"aria-hidden":"true"}),label:"Accounting"},healthcare:{icon:r.jsx(Me,{size:14,"aria-hidden":"true"}),label:"Healthcare"},legal:{icon:r.jsx(Ne,{size:14,"aria-hidden":"true"}),label:"Legal"},software:{icon:r.jsx(P,{size:14,"aria-hidden":"true"}),label:"Software"},security:{icon:r.jsx(X,{size:14,"aria-hidden":"true"}),label:"Security"},role_play:{icon:r.jsx(O,{size:14,"aria-hidden":"true"}),label:"Role play"},personal_assistance:{icon:r.jsx(W,{size:14,"aria-hidden":"true"}),label:"Personal assistance"},education:{icon:r.jsx(we,{size:14,"aria-hidden":"true"}),label:"Education"},marketing:{icon:r.jsx(_e,{size:14,"aria-hidden":"true"}),label:"Marketing"},sales:{icon:r.jsx(ve,{size:14,"aria-hidden":"true"}),label:"Sales"},research:{icon:r.jsx(xe,{size:14,"aria-hidden":"true"}),label:"Research"},analysis:{icon:r.jsx(ue,{size:14,"aria-hidden":"true"}),label:"Analysis"},management:{icon:r.jsx(he,{size:14,"aria-hidden":"true"}),label:"Management"},social_media:{icon:r.jsx(fe,{size:14,"aria-hidden":"true"}),label:"Social media"},other:{icon:r.jsx(ge,{size:14,"aria-hidden":"true"}),label:"Other"}};function p(e){const t=e.split("_").join(" ");return t.charAt(0).toUpperCase()+t.slice(1)}const Oe=e=>I[e]??{icon:r.jsx(q,{size:14,"aria-hidden":"true"}),label:p(e)},$="inline-flex min-h-5.5 items-center rounded-full border border-hairline bg-sunken px-2 text-meta leading-none",Pe=({tags:e,categories:t,className:o})=>{if((!e||e.length===0)&&(!t||t.length===0))return null;const a=new Set((t??[]).map(s=>(I[s]?.label??p(s)).toLowerCase())),n=(e??[]).filter(s=>!a.has(p(s).toLowerCase()));return r.jsxs("div",{className:g("relative flex flex-wrap items-center gap-1.5 overflow-hidden",o),"data-testid":"agent-tags-and-categories",children:[t?.map(s=>{const i=Oe(s);return r.jsxs("span",{className:g($,"gap-1 font-medium text-ink-muted"),children:[i.icon,i.label]},s)}),n.map(s=>r.jsxs("span",{className:g($,"gap-1 font-normal text-ink-dim"),children:[r.jsx(q,{size:12,"aria-hidden":"true"}),p(s)]},s))]})},Be=({orgName:e,className:t})=>r.jsxs(T,{variant:"neutral",className:g("gap-1",t),"data-testid":"agent-org-badge",title:e?`Shared with ${e}, not the public hub`:"Shared with an organization, not the public hub",children:[r.jsx(O,{"aria-hidden":"true"}),e??"Organization"]}),M={all:["agent-statuses"],page:e=>[...M.all,"page",[...e]]},Le=e=>[...new Set(e)].sort(),Ye=({agentIds:e,enabled:t=!0})=>{const{isAuthenticated:o}=k(),a=e.join(","),n=V.useMemo(()=>Le(e),[a]),s=B({queryKey:M.page(n),queryFn:async()=>(await ee(n)).result?.statuses??{},enabled:t&&o&&n.length>0,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:!1});return{...s,statuses:s.data??{},isKnown:s.isSuccess}},Ze=(e,t,o)=>o?e&&t[o]!==void 0:!1,H=(e,t,o)=>{e.setQueriesData({queryKey:M.all},a=>{if(!a)return a;const n=a[t]??{liked:!1,favourited:!1};return{...a,[t]:{...n,...o}}})},A=(e,{agentId:t,field:o,delta:a})=>{e.setQueriesData({queryKey:te.all},n=>{if(!n)return n;const s=n.result?.records??[];return s.some(i=>i.id===t)?{...n,result:{...n.result,records:s.map(i=>i.id===t?{...i,[o]:Math.max(0,(i[o]??0)+a)}:i)}}:n})},Ge=()=>{const e=w(),{isAuthenticated:t}=k();return b({mutationFn:async({agentId:a,isCurrentlyFavourited:n})=>{if(!t)throw new Error("Authentication required to favourite/unfavourite an agent.");if(!a)throw new Error("Agent ID is required.");return n?(await ae(a),{favourited:!1,changed:!0}):{favourited:!0,changed:(await ne(a)).result?.already_favourited!==!0}},onSuccess:({favourited:a,changed:n},s)=>{H(e,s.agentId,{favourited:a}),n&&A(e,{agentId:s.agentId,field:"favourite_count",delta:a?1:-1})}})},We=()=>{const e=w(),{isAuthenticated:t}=k();return b({mutationFn:async({agentId:a,isCurrentlyLiked:n})=>{if(!t)throw new Error("Authentication required to like/unlike an agent.");if(!a)throw new Error("Agent ID is required.");return n?(await se(a),{liked:!1,changed:!0}):{liked:!0,changed:(await oe(a)).result?.already_liked!==!0}},onSuccess:({liked:a,changed:n},s)=>{H(e,s.agentId,{liked:a}),n&&A(e,{agentId:s.agentId,field:"like_count",delta:a?1:-1})}})},Ie=(e,t)=>{const o=[];for(const[,a]of e.getQueriesData({queryKey:L}))for(const n of a?.agents??[])n.id!==t&&o.push(n.name);return o},Xe=()=>{const e=w(),t=Y();return b({mutationFn:async({agentId:a})=>{if(!C.baseUrl)throw new Error("Local Operator API URL is not configured.");return G.downloadAgentFromRadient(C.baseUrl,a)},onSuccess:(a,n)=>{const s=a.result,i=s?.name?.trim()||n.agentName?.trim()||"Agent",h=s?.renamed_from?.trim()||null,m=s?.id?ie(i,Ie(e,s.id)):null;h?D(`Downloaded "${i}" — you already have an agent called "${h}".`):m?Z(`Downloaded "${i}". You already have an agent called "${m}", so two agents now answer to that name and either may be picked. Rename one of them.`):D(`Downloaded "${i}" from the hub.`),e.invalidateQueries({queryKey:L}),A(e,{agentId:n.agentId,field:"download_count",delta:1});const d=a.result;d?.id?t(`/chat/${d.id}`):console.warn("Downloaded agent ID not found in response, cannot navigate to chat.")}})};export{Pe as A,I as C,Ue as H,Be as O,We as a,Ge as b,Xe as c,Oe as d,qe as e,Ve as f,Ze as i,Ye as u};
@@ -1 +1 @@
1
- import{ax as v,ay as A,az as $,aA as I,aB as h,aC as R,aD as L,aE as r,aF as _,aG as w,aH as q,aI as N,aJ as P,aK as S,aL as k}from"./conversation-input-sync-CGaXAqah.js";const f={malware_or_exploitation:"Instructions to build or spread malware, or to attack systems you do not own, cannot be published.",credential_theft:"Instructions to obtain someone else's credentials or tokens cannot be published.",fraud_or_deception:"Instructions to deceive or defraud people cannot be published.",harassment_or_hate:"Instructions to harass, threaten or target people cannot be published.",sexual_content_minors:"This agent cannot be published. If you believe this is a mistake, contact support.",sexual_content:"Explicit sexual content cannot be published.",violence_or_weapons:"Instructions to build weapons or to injure people cannot be published.",drugs_or_controlled_substances:"Instructions to make or traffic illegal drugs cannot be published.",self_harm:"This agent cannot be published. If you believe this is a mistake, contact support.",mass_surveillance_or_privacy_abuse:"Instructions to surveil or profile people without their consent cannot be published.",evasion_or_abuse_tooling:"Instructions to evade or defeat safety and anti-abuse systems cannot be published.",prompt_injection:"This instruction set tries to instruct the reviewer rather than describe an agent, so it cannot be published.",unclear_dual_use:"We could not tell whether this is aimed at your own systems or someone else's. Add a sentence stating the scope and target, then publish again.",other_harmful:"This agent was rejected because its instructions would cause harm."},E=e=>{const n=e.trim();return n.length>12&&/\s/.test(n)&&!/^(not found|bad request|unauthorized|error|internal server error)\.?$/i.test(n)};function O(e){const n=e?.categories?.[0];return n&&L(n)?f[n]:f.other_harmful}function C(e,n){const t=n?.rule?` ${n.rule}`:"";switch(n?.field){case"name":return{body:`Name${t||" is not acceptable"}.`,field:"name"};case"instructions":return{body:t?`The instruction body${t}.`:`The instruction body must be between 1 and ${R} characters.`,field:"instructions"};case"description":return{body:`Description${t}.`,field:"description"};case"tools":return{body:`Tools${t}.`,field:"tools"};case"when_to_use":return{body:`When to use${t}.`,field:"when_to_use"};case"categories":return{body:`Categories${t}.`,field:"categories"};case"tags":return{body:`Tags${t}.`,field:"tags"};default:return{body:e,field:null}}}function X(e,n){const t=n.surface==="pull",a=t?"Nothing was pulled.":"Nothing was published.",o=t?"pull again":"publish again",i=n.name.trim()||(t?"this team":"this agent");switch(e.code){case"name_taken":return e.details?.owned_by_caller===!0?{variant:"danger",headline:"You already published this agent",body:`You published "${i}" already. Update that listing instead of publishing a second one.`,note:null,actions:e.details?.existing_agent_id||n.hubAgentId?["update-listing","focus-name"]:["focus-name"]}:{variant:"danger",headline:"That name is taken",body:`"${i}" is already published on the hub by another account. Agent names are unique across the hub.`,note:null,actions:["focus-name"]};case"name_claim_in_flight":return{variant:"warning",headline:"That name is being published right now",body:`Someone is publishing an agent called "${i}" at this moment. It is not claimed — try again in a moment.`,note:null,actions:["retry"]};case"name_reserved_builtin":{const s=e.details?.builtin_name,d=s?h(s)===h(i):!1;return{variant:"danger",headline:"That name is reserved",body:s&&!d?`"${i}" is reserved by the built-in agent "${s}". Built-in names cannot be published to the hub.`:`"${s??i}" is the name of a built-in agent. Built-in names cannot be published to the hub.`,note:null,actions:["focus-name","install-builtin"]}}case"moderation_rejected":return{variant:"danger",headline:"This agent was not accepted",body:e.details?.reason?.trim()||e.message,note:O(e.details),actions:["edit-instructions"]};case"moderation_unavailable":return{variant:"warning",headline:"Review is temporarily unavailable",body:"We could not review this agent just now. Nothing was published. Try again in a minute.",note:null,actions:["retry"]};case"invalid_instruction_set":{const{body:s,field:d}=C(e.message,e.details);return{variant:"danger",headline:"The agent document is not valid",body:s,note:null,actions:d==="name"?["focus-name"]:d==="instructions"?["edit-instructions"]:["edit-agent"]}}case"payload_too_large":{const s=e.details?.limit_bytes;return{variant:"danger",headline:"This agent is too large to publish",body:s?`The instruction set is larger than ${Math.round(s/1024)} KiB. Shorten the instructions.`:"The instruction set is larger than the hub accepts. Shorten the instructions.",note:null,actions:["edit-instructions"]}}case"not_owner":return{variant:"danger",headline:"You cannot update this listing",body:"This listing belongs to another account.",note:null,actions:["publish-as-new"]};case"agent_not_found":return{variant:"danger",headline:"That listing no longer exists",body:"It may have been delisted.",note:null,actions:["publish-as-new","refresh-hub"]};case"hub_unauthorized":return{variant:"danger",headline:"The hub refused this machine's sign-in",body:`${a} Sign in to Radient again to replace the credential the hub refused, then ${o}.`,note:null,actions:["sign-in"]};case"hub_unavailable":return{variant:"warning",headline:t?"The pull did not go through":"The publication did not go through",body:E(e.message)?e.message:`${a} Try again in a moment, or update the backend if the hub has moved.`,note:null,actions:["retry"]};case"local_failure":return{variant:"warning",headline:t?"The team could not be pulled from this machine":"The agent could not be published from this machine",body:e.message,note:null,actions:["retry"]};case"team_plan_required":return{variant:"warning",headline:"That organization needs an active Team plan",body:t?"Reading an organization's teams is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then pull again.":"Sharing agents inside an organization is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then publish again.",note:null,actions:["retry"]};case"not_a_member":return{variant:"danger",headline:"You are not a member of that organization",body:`${a} Ask an owner of the organization to invite you, then ${o}.`,note:null,actions:[]};case"insufficient_role":{const s=e.details?.required;return{variant:"danger",headline:"Your organization role does not allow this",body:s?`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} the ${s} role. Ask an owner of the organization to change your role, then ${o}.`:`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} a higher role than yours. Ask an owner of the organization to change your role, then ${o}.`,note:null,actions:[]}}case"team_not_found":return{variant:"danger",headline:"That team is no longer published",body:"It may have been delisted since this page was loaded.",note:null,actions:["refresh-hub"]};default:return{variant:"danger",headline:"The agent could not be published",body:e.message,note:null,actions:["retry"]}}}const z=[/^(?:Download agent from Radient failed: )?(?:Error downloading agent from Radient: )?\s*/,/^Failed to download agent(?: [^\s]+)? from Radient Agent Hub(?: due to a requests error)?:\s*/,/^[A-Za-z_][\w.]*\([^)]*\):\s*/],U=/^(\d{3})\b/,F=new Set([404,410]),j=["read timed out","connection timed out","connection refused","connection aborted","connection reset","connectionerror","connecttimeout","remote end closed connection","max retries exceeded","temporary failure in name resolution","name or service not known","no route to host"],x=e=>{const n=e.toLowerCase();return j.some(t=>n.includes(t))||I(e)},B=(e,n)=>{const t=n.trim()?`"${n.trim()}"`:"That agent";if(A(e))switch(e.code){case"agent_not_found":return`${t} is no longer on the hub, so nothing was downloaded.`;case"hub_unavailable":return`The hub did not complete the download, so ${t} was not downloaded.`;default:return`${t} was not downloaded: ${e.message}`}const a=z.reduce((i,s)=>i.replace(s,""),$(e,"").trim()).trim();if(!a)return`${t} could not be downloaded.`;const o=Number(U.exec(a)?.[1]??Number.NaN);return F.has(o)?`${t} is no longer on the hub, so nothing was downloaded.`:x(a)||o===408?`The hub could not be reached, so ${t} was not downloaded.`:o===429?`The hub is busy, so ${t} was not downloaded. Try again in a moment.`:o===401||o===403?`The hub refused this machine's sign-in, so ${t} was not downloaded.`:o>=500?`The hub could not complete the download, so ${t} was not downloaded. Try again in a moment.`:o>=400?`The hub refused the download, so ${t} is not here.`:`${t} was not downloaded: ${a}`},D="The action did not complete.",Z=(e,n,t)=>e==="download"?B(n,t):v(D,n),V={"focus-name":"Choose another name","update-listing":"Update the existing listing","install-builtin":"Install the built-in instead",retry:"Try again","edit-instructions":"Edit the instructions","edit-agent":"Edit the agent","publish-as-new":"Publish as a new listing","sign-in":"Sign in again","refresh-hub":"Refresh the hub"};function c(){return crypto.randomUUID()}async function K(e=1,n=20,t){const a={page:e,per_page:n};if(t)for(const[o,i]of Object.entries(t))i&&(a[o]=i);return r({operation:"agents.list",query:a})}async function ee(e){return r({operation:"agents.get",agentId:e})}async function ne(e){return r({operation:"agents.delete",agentId:e,requestId:c(),confirmed:!0})}async function te(e){return r({operation:"agents.like",agentId:e,requestId:c()})}async function ae(e){return r({operation:"agents.unlike",agentId:e,requestId:c(),confirmed:!0})}async function oe(e){return r({operation:"agents.favourite",agentId:e,requestId:c()})}async function se(e){return r({operation:"agents.unfavourite",agentId:e,requestId:c(),confirmed:!0})}async function ie(e,n){return r({operation:"comments.create",agentId:e,payload:n,requestId:c()})}async function re(e,n=1,t=20){return r({operation:"comments.list",agentId:e,query:{page:n,per_page:t}})}async function ue(e,n,t){return r({operation:"comments.update",agentId:e,commentId:n,payload:t,requestId:c()})}async function le(e,n){return r({operation:"comments.delete",agentId:e,commentId:n,requestId:c(),confirmed:!0})}async function ce(e){return r({operation:"agents.statuses",query:{agent_ids:e.join(",")}})}async function M(){return r({operation:"memberships.list"})}async function Q(e,n=1,t=20,a){const o={page:n,per_page:t};if(a)for(const[i,s]of Object.entries(a))s&&(o[i]=s);return r({operation:"org_agents.list",tenantId:e,query:o})}async function de(e){return r({operation:"org_teams.list",tenantId:e})}const W="download_count",b={all:["public-agents"],list:e=>[...b.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}]},m={all:["org-agents"],list:(e,n)=>[...m.all,"list",e,{page:n.page,perPage:n.perPage,categories:n.categories?.join(",")??void 0,name:n.name??void 0,description:n.description??void 0,sort:n.sort,order:n.order}]},Y=e=>e&&e[0]===m.all[0]?String(e[2]??""):null,he=e=>e.invalidateQueries({queryKey:b.all}),ge=(e,n)=>e.invalidateQueries({queryKey:n?[...m.all,"list",n]:m.all}),me=({page:e=1,perPage:n=20,enabled:t=!0,categories:a,name:o,description:i,sort:s=W,order:d="desc",tenantId:g}={})=>{const p={page:e,perPage:n,categories:a,name:o,description:i,sort:s,order:d},T=g?m.list(g,p):b.list(p),l=_({queryKey:T,queryFn:async()=>{const u={};return a&&a.length>0&&(u.categories=a.join(",")),o&&(u.name=o),i&&(u.description=i),u.sort=s,u.order=d,g?await Q(g,e,n,u):await K(e,n,u)},select:u=>u.result,enabled:t,retry:w,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,placeholderData:(u,y)=>Y(y?.queryKey)===(g??null)?u:void 0});return{...l,agents:l.data?.records,isRefreshing:l.isFetching&&l.data!==void 0,pagination:l.data?{page:l.data.page,perPage:l.data.per_page,totalPages:l.data.total_pages,totalRecords:l.data.total_records}:void 0}},H={name:"Name",description:"Description",instructions:"The instruction body",tools:"Tools"};function be(e){const n=[],t=(a,o)=>{o&&n.push({field:a,message:`${H[a]} ${o}.`})};return t("name",q(e.name)),t("description",N(e.description)),e.instructions!==null&&t("instructions",P(e.instructions)),t("tools",S(e.tools??[])),n}function pe(e,n){const t=h(e);return n.some(a=>h(a)===t)}function ye(e){for(const n of e??[]){const t=n.indexOf(":");if(t<0||n.slice(0,t).trim().toLowerCase()!=="tools")continue;const a=n.slice(t+1).split(",").map(o=>o.trim()).filter(Boolean);return a.length>0?a:null}return null}function fe(e,n){const t=h(e);return n.find(a=>h(a)===t)??null}const G={all:["memberships"]},_e=({enabled:e=!0}={})=>{const{isAuthenticated:n}=k(),t=_({queryKey:G.all,queryFn:async()=>(await M()).result??{memberships:[]},enabled:e&&n,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:w});return{...t,memberships:t.data?.memberships??[]}};export{V as P,ne as a,_e as b,ie as c,le as d,Z as e,de as f,ee as g,me as h,he as i,ce as j,b as k,re as l,se as m,oe as n,ae as o,X as p,te as q,fe as r,ge as s,pe as t,ue as u,be as v,ye as w};
1
+ import{ax as v,ay as A,az as $,aA as I,aB as h,aC as R,aD as L,aE as r,aF as _,aG as w,aH as q,aI as N,aJ as P,aK as S,aL as k}from"./conversation-input-sync-zDEtF-9C.js";const f={malware_or_exploitation:"Instructions to build or spread malware, or to attack systems you do not own, cannot be published.",credential_theft:"Instructions to obtain someone else's credentials or tokens cannot be published.",fraud_or_deception:"Instructions to deceive or defraud people cannot be published.",harassment_or_hate:"Instructions to harass, threaten or target people cannot be published.",sexual_content_minors:"This agent cannot be published. If you believe this is a mistake, contact support.",sexual_content:"Explicit sexual content cannot be published.",violence_or_weapons:"Instructions to build weapons or to injure people cannot be published.",drugs_or_controlled_substances:"Instructions to make or traffic illegal drugs cannot be published.",self_harm:"This agent cannot be published. If you believe this is a mistake, contact support.",mass_surveillance_or_privacy_abuse:"Instructions to surveil or profile people without their consent cannot be published.",evasion_or_abuse_tooling:"Instructions to evade or defeat safety and anti-abuse systems cannot be published.",prompt_injection:"This instruction set tries to instruct the reviewer rather than describe an agent, so it cannot be published.",unclear_dual_use:"We could not tell whether this is aimed at your own systems or someone else's. Add a sentence stating the scope and target, then publish again.",other_harmful:"This agent was rejected because its instructions would cause harm."},E=e=>{const n=e.trim();return n.length>12&&/\s/.test(n)&&!/^(not found|bad request|unauthorized|error|internal server error)\.?$/i.test(n)};function O(e){const n=e?.categories?.[0];return n&&L(n)?f[n]:f.other_harmful}function C(e,n){const t=n?.rule?` ${n.rule}`:"";switch(n?.field){case"name":return{body:`Name${t||" is not acceptable"}.`,field:"name"};case"instructions":return{body:t?`The instruction body${t}.`:`The instruction body must be between 1 and ${R} characters.`,field:"instructions"};case"description":return{body:`Description${t}.`,field:"description"};case"tools":return{body:`Tools${t}.`,field:"tools"};case"when_to_use":return{body:`When to use${t}.`,field:"when_to_use"};case"categories":return{body:`Categories${t}.`,field:"categories"};case"tags":return{body:`Tags${t}.`,field:"tags"};default:return{body:e,field:null}}}function X(e,n){const t=n.surface==="pull",a=t?"Nothing was pulled.":"Nothing was published.",o=t?"pull again":"publish again",i=n.name.trim()||(t?"this team":"this agent");switch(e.code){case"name_taken":return e.details?.owned_by_caller===!0?{variant:"danger",headline:"You already published this agent",body:`You published "${i}" already. Update that listing instead of publishing a second one.`,note:null,actions:e.details?.existing_agent_id||n.hubAgentId?["update-listing","focus-name"]:["focus-name"]}:{variant:"danger",headline:"That name is taken",body:`"${i}" is already published on the hub by another account. Agent names are unique across the hub.`,note:null,actions:["focus-name"]};case"name_claim_in_flight":return{variant:"warning",headline:"That name is being published right now",body:`Someone is publishing an agent called "${i}" at this moment. It is not claimed — try again in a moment.`,note:null,actions:["retry"]};case"name_reserved_builtin":{const s=e.details?.builtin_name,d=s?h(s)===h(i):!1;return{variant:"danger",headline:"That name is reserved",body:s&&!d?`"${i}" is reserved by the built-in agent "${s}". Built-in names cannot be published to the hub.`:`"${s??i}" is the name of a built-in agent. Built-in names cannot be published to the hub.`,note:null,actions:["focus-name","install-builtin"]}}case"moderation_rejected":return{variant:"danger",headline:"This agent was not accepted",body:e.details?.reason?.trim()||e.message,note:O(e.details),actions:["edit-instructions"]};case"moderation_unavailable":return{variant:"warning",headline:"Review is temporarily unavailable",body:"We could not review this agent just now. Nothing was published. Try again in a minute.",note:null,actions:["retry"]};case"invalid_instruction_set":{const{body:s,field:d}=C(e.message,e.details);return{variant:"danger",headline:"The agent document is not valid",body:s,note:null,actions:d==="name"?["focus-name"]:d==="instructions"?["edit-instructions"]:["edit-agent"]}}case"payload_too_large":{const s=e.details?.limit_bytes;return{variant:"danger",headline:"This agent is too large to publish",body:s?`The instruction set is larger than ${Math.round(s/1024)} KiB. Shorten the instructions.`:"The instruction set is larger than the hub accepts. Shorten the instructions.",note:null,actions:["edit-instructions"]}}case"not_owner":return{variant:"danger",headline:"You cannot update this listing",body:"This listing belongs to another account.",note:null,actions:["publish-as-new"]};case"agent_not_found":return{variant:"danger",headline:"That listing no longer exists",body:"It may have been delisted.",note:null,actions:["publish-as-new","refresh-hub"]};case"hub_unauthorized":return{variant:"danger",headline:"The hub refused this machine's sign-in",body:`${a} Sign in to Radient again to replace the credential the hub refused, then ${o}.`,note:null,actions:["sign-in"]};case"hub_unavailable":return{variant:"warning",headline:t?"The pull did not go through":"The publication did not go through",body:E(e.message)?e.message:`${a} Try again in a moment, or update the backend if the hub has moved.`,note:null,actions:["retry"]};case"local_failure":return{variant:"warning",headline:t?"The team could not be pulled from this machine":"The agent could not be published from this machine",body:e.message,note:null,actions:["retry"]};case"team_plan_required":return{variant:"warning",headline:"That organization needs an active Team plan",body:t?"Reading an organization's teams is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then pull again.":"Sharing agents inside an organization is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then publish again.",note:null,actions:["retry"]};case"not_a_member":return{variant:"danger",headline:"You are not a member of that organization",body:`${a} Ask an owner of the organization to invite you, then ${o}.`,note:null,actions:[]};case"insufficient_role":{const s=e.details?.required;return{variant:"danger",headline:"Your organization role does not allow this",body:s?`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} the ${s} role. Ask an owner of the organization to change your role, then ${o}.`:`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} a higher role than yours. Ask an owner of the organization to change your role, then ${o}.`,note:null,actions:[]}}case"team_not_found":return{variant:"danger",headline:"That team is no longer published",body:"It may have been delisted since this page was loaded.",note:null,actions:["refresh-hub"]};default:return{variant:"danger",headline:"The agent could not be published",body:e.message,note:null,actions:["retry"]}}}const z=[/^(?:Download agent from Radient failed: )?(?:Error downloading agent from Radient: )?\s*/,/^Failed to download agent(?: [^\s]+)? from Radient Agent Hub(?: due to a requests error)?:\s*/,/^[A-Za-z_][\w.]*\([^)]*\):\s*/],U=/^(\d{3})\b/,F=new Set([404,410]),j=["read timed out","connection timed out","connection refused","connection aborted","connection reset","connectionerror","connecttimeout","remote end closed connection","max retries exceeded","temporary failure in name resolution","name or service not known","no route to host"],x=e=>{const n=e.toLowerCase();return j.some(t=>n.includes(t))||I(e)},B=(e,n)=>{const t=n.trim()?`"${n.trim()}"`:"That agent";if(A(e))switch(e.code){case"agent_not_found":return`${t} is no longer on the hub, so nothing was downloaded.`;case"hub_unavailable":return`The hub did not complete the download, so ${t} was not downloaded.`;default:return`${t} was not downloaded: ${e.message}`}const a=z.reduce((i,s)=>i.replace(s,""),$(e,"").trim()).trim();if(!a)return`${t} could not be downloaded.`;const o=Number(U.exec(a)?.[1]??Number.NaN);return F.has(o)?`${t} is no longer on the hub, so nothing was downloaded.`:x(a)||o===408?`The hub could not be reached, so ${t} was not downloaded.`:o===429?`The hub is busy, so ${t} was not downloaded. Try again in a moment.`:o===401||o===403?`The hub refused this machine's sign-in, so ${t} was not downloaded.`:o>=500?`The hub could not complete the download, so ${t} was not downloaded. Try again in a moment.`:o>=400?`The hub refused the download, so ${t} is not here.`:`${t} was not downloaded: ${a}`},D="The action did not complete.",Z=(e,n,t)=>e==="download"?B(n,t):v(D,n),V={"focus-name":"Choose another name","update-listing":"Update the existing listing","install-builtin":"Install the built-in instead",retry:"Try again","edit-instructions":"Edit the instructions","edit-agent":"Edit the agent","publish-as-new":"Publish as a new listing","sign-in":"Sign in again","refresh-hub":"Refresh the hub"};function c(){return crypto.randomUUID()}async function K(e=1,n=20,t){const a={page:e,per_page:n};if(t)for(const[o,i]of Object.entries(t))i&&(a[o]=i);return r({operation:"agents.list",query:a})}async function ee(e){return r({operation:"agents.get",agentId:e})}async function ne(e){return r({operation:"agents.delete",agentId:e,requestId:c(),confirmed:!0})}async function te(e){return r({operation:"agents.like",agentId:e,requestId:c()})}async function ae(e){return r({operation:"agents.unlike",agentId:e,requestId:c(),confirmed:!0})}async function oe(e){return r({operation:"agents.favourite",agentId:e,requestId:c()})}async function se(e){return r({operation:"agents.unfavourite",agentId:e,requestId:c(),confirmed:!0})}async function ie(e,n){return r({operation:"comments.create",agentId:e,payload:n,requestId:c()})}async function re(e,n=1,t=20){return r({operation:"comments.list",agentId:e,query:{page:n,per_page:t}})}async function ue(e,n,t){return r({operation:"comments.update",agentId:e,commentId:n,payload:t,requestId:c()})}async function le(e,n){return r({operation:"comments.delete",agentId:e,commentId:n,requestId:c(),confirmed:!0})}async function ce(e){return r({operation:"agents.statuses",query:{agent_ids:e.join(",")}})}async function M(){return r({operation:"memberships.list"})}async function Q(e,n=1,t=20,a){const o={page:n,per_page:t};if(a)for(const[i,s]of Object.entries(a))s&&(o[i]=s);return r({operation:"org_agents.list",tenantId:e,query:o})}async function de(e){return r({operation:"org_teams.list",tenantId:e})}const W="download_count",b={all:["public-agents"],list:e=>[...b.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}]},m={all:["org-agents"],list:(e,n)=>[...m.all,"list",e,{page:n.page,perPage:n.perPage,categories:n.categories?.join(",")??void 0,name:n.name??void 0,description:n.description??void 0,sort:n.sort,order:n.order}]},Y=e=>e&&e[0]===m.all[0]?String(e[2]??""):null,he=e=>e.invalidateQueries({queryKey:b.all}),ge=(e,n)=>e.invalidateQueries({queryKey:n?[...m.all,"list",n]:m.all}),me=({page:e=1,perPage:n=20,enabled:t=!0,categories:a,name:o,description:i,sort:s=W,order:d="desc",tenantId:g}={})=>{const p={page:e,perPage:n,categories:a,name:o,description:i,sort:s,order:d},T=g?m.list(g,p):b.list(p),l=_({queryKey:T,queryFn:async()=>{const u={};return a&&a.length>0&&(u.categories=a.join(",")),o&&(u.name=o),i&&(u.description=i),u.sort=s,u.order=d,g?await Q(g,e,n,u):await K(e,n,u)},select:u=>u.result,enabled:t,retry:w,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,placeholderData:(u,y)=>Y(y?.queryKey)===(g??null)?u:void 0});return{...l,agents:l.data?.records,isRefreshing:l.isFetching&&l.data!==void 0,pagination:l.data?{page:l.data.page,perPage:l.data.per_page,totalPages:l.data.total_pages,totalRecords:l.data.total_records}:void 0}},H={name:"Name",description:"Description",instructions:"The instruction body",tools:"Tools"};function be(e){const n=[],t=(a,o)=>{o&&n.push({field:a,message:`${H[a]} ${o}.`})};return t("name",q(e.name)),t("description",N(e.description)),e.instructions!==null&&t("instructions",P(e.instructions)),t("tools",S(e.tools??[])),n}function pe(e,n){const t=h(e);return n.some(a=>h(a)===t)}function ye(e){for(const n of e??[]){const t=n.indexOf(":");if(t<0||n.slice(0,t).trim().toLowerCase()!=="tools")continue;const a=n.slice(t+1).split(",").map(o=>o.trim()).filter(Boolean);return a.length>0?a:null}return null}function fe(e,n){const t=h(e);return n.find(a=>h(a)===t)??null}const G={all:["memberships"]},_e=({enabled:e=!0}={})=>{const{isAuthenticated:n}=k(),t=_({queryKey:G.all,queryFn:async()=>(await M()).result??{memberships:[]},enabled:e&&n,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:w});return{...t,memberships:t.data?.memberships??[]}};export{V as P,ne as a,_e as b,ie as c,le as d,Z as e,de as f,ee as g,me as h,he as i,ce as j,b as k,re as l,se as m,oe as n,ae as o,X as p,te as q,fe as r,ge as s,pe as t,ue as u,be as v,ye as w};
@@ -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-eIMT1oSc.js";import{q as kt,o as Tt,v as Rt}from"./conversation-input-sync-CGaXAqah.js";import"./index-CSNQxVPq.js";import"./ui-preferences-store-CxJfZcpf.js";import"./error-boundary-BR1z8pWF.js";var at=function(){var t=n(function(B,h,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=h);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],y=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],r=[1,36],D=[1,37],N=[1,43],mt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,l,c,u,m,a,X){var x=a.length-1;switch(m){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(y,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:39,13:38,24:N,27:mt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:mt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,l){if(l.recoverable)this.trace(h);else{var c=new Error(h);throw c.hash=l,c}},"parseError"),parse:n(function(h){var l=this,c=[0],u=[],m=[null],a=[],X=this.table,x="",G=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(h,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,m.length=m.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(G+1)+`:
1
+ import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-DKfPxzKU.js";import{q as kt,o as Tt,v as Rt}from"./conversation-input-sync-zDEtF-9C.js";import"./index-DvjcW_EJ.js";import"./ui-preferences-store-BaXpFsZf.js";import"./error-boundary-BCN3_4Dn.js";var at=function(){var t=n(function(B,h,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=h);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],y=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],r=[1,36],D=[1,37],N=[1,43],mt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,l,c,u,m,a,X){var x=a.length-1;switch(m){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(y,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:39,13:38,24:N,27:mt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:mt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,l){if(l.recoverable)this.trace(h);else{var c=new Error(h);throw c.hash=l,c}},"parseError"),parse:n(function(h){var l=this,c=[0],u=[],m=[null],a=[],X=this.table,x="",G=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(h,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,m.length=m.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(G+1)+`:
2
2
  `+A.showPosition()+`
3
3
  Expecting `+Q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":nt="Parse error on line "+(G+1)+": Unexpected "+(w==wt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(nt,{text:A.match,token:this.terminals_[w]||w,line:A.yylineno,loc:et,expected:Q})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+w);switch(v[0]){case 1:c.push(w),m.push(A.yytext),a.push(A.yylloc),c.push(v[1]),w=null,Ct=A.yyleng,x=A.yytext,G=A.yylineno,et=A.yylloc;break;case 2:if(M=this.productions_[v[1]][1],z.$=m[m.length-M],z._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},Jt&&(z._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),st=this.performAction.apply(z,[x,Ct,G,W.yy,v[1],m,a].concat(Zt)),typeof st<"u")return st;M&&(c=c.slice(0,-1*M*2),m=m.slice(0,-1*M),a=a.slice(0,-1*M)),c.push(this.productions_[v[1]][0]),m.push(z.$),a.push(z._$),_t=X[c[c.length-2]][c[c.length-1]],c.push(_t);break;case 3:return!0}}return!0},"parse")},Qt=function(){var B={EOF:1,parseError:n(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw new Error(l)},"parseError"),setInput:n(function(h,l){return this.yy=l||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var l=h.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:n(function(h){var l=h.length,c=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var h=this.pastInput(),l=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
@@ -6,11 +6,11 @@
6
6
  <title>Local Operator Console Capture</title>
7
7
  <meta http-equiv="Content-Security-Policy"
8
8
  content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
9
- <script type="module" crossorigin src="./assets/consoleCapture-D8nStIVt.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-CSNQxVPq.js">
11
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-CxJfZcpf.js">
12
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-GUGtzmyW.js">
13
- <link rel="stylesheet" crossorigin href="./assets/index-Cy3MjKxd.css">
9
+ <script type="module" crossorigin src="./assets/consoleCapture-PlJxiaGX.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-DvjcW_EJ.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-BaXpFsZf.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-CiDuCMfE.js">
13
+ <link rel="stylesheet" crossorigin href="./assets/index-B4ItTI5Q.css">
14
14
  <link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
15
15
  </head>
16
16
 
@@ -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-D09I1LXM.js"></script>
35
- <link rel="modulepreload" crossorigin href="./assets/index-CSNQxVPq.js">
36
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-CxJfZcpf.js">
37
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BR1z8pWF.js">
38
- <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-CGaXAqah.js">
39
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-GUGtzmyW.js">
40
- <link rel="stylesheet" crossorigin href="./assets/index-Cy3MjKxd.css">
34
+ <script type="module" crossorigin src="./assets/index-QVureTEn.js"></script>
35
+ <link rel="modulepreload" crossorigin href="./assets/index-DvjcW_EJ.js">
36
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-BaXpFsZf.js">
37
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-BCN3_4Dn.js">
38
+ <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-zDEtF-9C.js">
39
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-CiDuCMfE.js">
40
+ <link rel="stylesheet" crossorigin href="./assets/index-B4ItTI5Q.css">
41
41
  <link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-CIGg7Rga.css">
42
42
  <link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
43
43
  <link rel="stylesheet" crossorigin href="./assets/index-DHKnfVbX.css">
@@ -8,10 +8,10 @@
8
8
  <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
9
9
  <meta http-equiv="Content-Security-Policy"
10
10
  content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:" />
11
- <script type="module" crossorigin src="./assets/installer-DDGjYv9v.js"></script>
12
- <link rel="modulepreload" crossorigin href="./assets/index-CSNQxVPq.js">
13
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BR1z8pWF.js">
14
- <link rel="stylesheet" crossorigin href="./assets/index-Cy3MjKxd.css">
11
+ <script type="module" crossorigin src="./assets/installer-DovMkJto.js"></script>
12
+ <link rel="modulepreload" crossorigin href="./assets/index-DvjcW_EJ.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-BCN3_4Dn.js">
14
+ <link rel="stylesheet" crossorigin href="./assets/index-B4ItTI5Q.css">
15
15
  </head>
16
16
 
17
17
  <body>
@@ -6,12 +6,12 @@
6
6
  <title>Local Operator Quick Send</title>
7
7
  <meta http-equiv="Content-Security-Policy"
8
8
  content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
9
- <script type="module" crossorigin src="./assets/mini-D6nPFjTs.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-CSNQxVPq.js">
11
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BR1z8pWF.js">
12
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-CxJfZcpf.js">
13
- <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-CGaXAqah.js">
14
- <link rel="stylesheet" crossorigin href="./assets/index-Cy3MjKxd.css">
9
+ <script type="module" crossorigin src="./assets/mini-D0On64Oc.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-DvjcW_EJ.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-BCN3_4Dn.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-BaXpFsZf.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-zDEtF-9C.js">
14
+ <link rel="stylesheet" crossorigin href="./assets/index-B4ItTI5Q.css">
15
15
  <link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-CIGg7Rga.css">
16
16
  </head>
17
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-operator-ui",
3
- "version": "0.31.30",
3
+ "version": "0.31.32",
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",
@@ -65,10 +65,15 @@
65
65
  "postbuild": "chmod +x ./bin/local-operator-ui.js",
66
66
  "postinstall": "node ./bin/postinstall.js",
67
67
  "//prepare": "Wires this clone's pushes through the tracked .githooks/pre-push, so a worktree that would otherwise push ungated is either gated or refused loudly - git skips a hook file that is not there, in silence, which is exactly the state a fresh worktree is in. Not bin/postinstall.js, whose own contract is that it must never fail the install: a wiring that cannot be verified has to say so rather than report a success. Runs on `pnpm install` in a checkout and on a git-based install, and never for a published tarball's consumer, which has no repository to wire. pnpm hooks:install is the same thing by hand; pnpm hooks:check is the read-only form and a non-zero exit when pushes from this checkout are not gated. See scripts/hooks-install.mjs and docs/hooks.md.",
68
- "prepare": "node scripts/hooks-install.mjs --tolerate-failure",
68
+ "//prepare:evidence-fold": "Wires the clone merge driver for docs/evidence/manifest.json, so `git merge` does not stop on a fold manifest conflict. It runs from `prepare` for the same reason the hooks wiring does: a fresh clone (and every worktree of it, since the config is the clone LOCAL one) would otherwise fold with the driver missing, and the failure that produces is a conflict nobody knows to expect. Same contract as the hooks wiring - it fails loudly by hand and never fails the install, where `postinstall` owns the opposite rule. pnpm evidence:fold:install and pnpm evidence:fold:check are the by-hand forms.",
69
+ "prepare": "node scripts/hooks-install.mjs --tolerate-failure && node scripts/evidence-fold.mjs --install --tolerate-failure",
69
70
  "//hooks:install": "Idempotent, and safe to run at any time: it repoints core.hooksPath at <common git dir>/lop-hooks, whose pre-push runs the gate THE CURRENT WORKTREE carries. The directory lives in the clone's shared git directory and the path is absolute because a relative core.hooksPath is resolved against the working directory and a path that does not resolve is skipped by git without a word - which is how a worktree pushed ungated while reporting no problem.",
70
71
  "hooks:install": "node scripts/hooks-install.mjs",
71
72
  "hooks:check": "node scripts/hooks-install.mjs --check",
73
+ "//evidence:fold": "Completes an evidence fold: resolves docs/evidence/manifest.json across a merge a FIELD at a time (not whole-file, and not per entry), re-derives the stamps and counts from the merged tree, runs the real guards over the result and stages it - so a fold is ONE commit that carries correct values instead of a merge plus a hand re-lay. Reads the three sides from GIT OBJECTS, so it works on a conflicted working file too. It never weakens a guard: the stamps stay stored and the shipped-versus-HEAD comparison is unchanged. pnpm evidence:fold:install wires the clone merge driver so `git merge` does not stop on a manifest conflict at all; pnpm evidence:fold:check is the read-only form and exits non-zero when it is not wired. See scripts/evidence-fold.mjs and the evidence discipline in AGENTS.md.",
74
+ "evidence:fold": "node scripts/evidence-fold.mjs",
75
+ "evidence:fold:install": "node scripts/evidence-fold.mjs --install",
76
+ "evidence:fold:check": "node scripts/evidence-fold.mjs --check",
72
77
  "lint": "pnpm biome check src bin scripts/linux-sandbox.test.mjs",
73
78
  "lint:fix": "pnpm biome check --write src bin scripts/linux-sandbox.test.mjs",
74
79
  "//lint:scripts": "`pnpm lint` names the paths it checks by hand, so the whole of `scripts/` - the proof harnesses, evidence rigs and release gates - sat outside the lint and formatter contracts, and a formatter error rode into a merged pull request green. This gate runs the same `biome check` over the `scripts/` files a change touches against a base ref (`origin/main` locally, the merge commit's first parent in CI), so a violation cannot ride in with the diff that introduces it, while the tree's 106 pre-existing offenders are burnt down file by file rather than turned red at once. Widening `pnpm lint` to name `scripts/` outright is the follow-up once that backlog is gone; scripts/check-scripts-lint.mjs holds the measurements and the full rationale.",
@@ -81,7 +86,7 @@
81
86
  "check-types": "pnpm run check-types:main && pnpm run check-types:renderer",
82
87
  "check-changed": "node scripts/ci-scope.mjs --since \"$(git merge-base origin/main HEAD)\" --run",
83
88
  "test:session-cookies": "node scripts/session-cookie-electron.test.mjs",
84
- "test:desktop": "node scripts/run-desktop-tests.mjs scripts/agents-config-summary.test.mjs scripts/agents-config-retry.test.mjs scripts/agent-class-toggle.test.mjs scripts/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/transcript-focus.test.mjs scripts/transcript-focus-behaviour.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/ask-draft-swap.test.mjs scripts/ask-queue.test.mjs scripts/composer-queued-send.test.mjs scripts/composer-tabs.test.mjs scripts/scroll-region-to-top.test.mjs scripts/ask-options.test.mjs scripts/click-proof-expect.test.mjs scripts/window-mode.test.mjs scripts/relaunch-during-quit-proof.test.mjs scripts/about-panel.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/desktop-test-memory-guard.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/picker-feedback.test.mjs scripts/picker-host-selection.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/check-geometry-sources.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/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/secret-ask.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/skill-invocation.test.mjs scripts/skill-list.test.mjs scripts/skill-highlight.test.mjs scripts/theme-inline.test.mjs scripts/composer-refusal.test.mjs scripts/ci-scope.test.mjs scripts/browser-tab-strip-focus.test.mjs scripts/projects-board-focus.test.mjs scripts/browser-file-transfer-row.test.mjs scripts/link-targets.test.mjs scripts/link-actions.test.mjs scripts/chat-link-affordances.test.mjs scripts/streaming-markdown-parity.test.mjs scripts/transcription-failure-copy.test.mjs scripts/backend-version-drift.test.mjs scripts/live-seed-placement.test.mjs scripts/agents-publication.test.mjs scripts/agent-hub-queries.test.mjs scripts/install-builtin-batch.test.mjs scripts/install-progress.test.mjs scripts/attention-seen.test.mjs scripts/mark-all-read-control.test.mjs scripts/update-global-guard.test.mjs scripts/delivery-gate.test.mjs scripts/canvas-file-freshness.test.mjs scripts/no-websocket-plane.test.mjs scripts/update-window-report.test.mjs scripts/canvas-tab-close.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/webauthn.test.mjs scripts/render-mac-entitlements.test.mjs scripts/row-state-floors.test.mjs scripts/pairing-card-copy.test.mjs scripts/update-install-copy.test.mjs scripts/update-shipit.test.mjs scripts/console-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-pin-order.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.test.mjs scripts/console-mirror.test.mjs scripts/shell-path.test.mjs scripts/build-env-guard.test.mjs scripts/install-scripts-network.test.mjs scripts/console-pane-render.test.mjs scripts/settings-section-routes.test.mjs scripts/authoring-refresh.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/provider-chip-verdict.test.mjs scripts/child-reader-foot-react.test.mjs scripts/backend-spawn-address.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-sidebar-agents.test.mjs scripts/chat-sidebar-view.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/drafts-clear-on-send.test.mjs scripts/chat-sidebar-drafts.test.mjs scripts/undo-toasts.test.mjs scripts/chat-sidebar-sections.test.mjs scripts/titlebar-options.test.mjs scripts/lane-leading.test.mjs scripts/trace-fold-model.test.mjs scripts/trace-fold-behaviour.test.mjs scripts/chat-status-strip.test.mjs scripts/chat-pane-floors.test.mjs scripts/path-utils.test.mjs scripts/window-chrome.test.mjs scripts/chat-sidebar-scope-paging.test.mjs scripts/chat-sidebar-connection-voices.test.mjs scripts/integration-model.test.mjs scripts/mcp-catalog-parity.test.mjs scripts/mcp-catalog-transport.test.mjs scripts/btw-aside.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-text-authority.test.mjs scripts/shared-composer.test.mjs scripts/analytics-rate-format.test.mjs scripts/provider-catalog.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-status.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/provider-detail-remount.test.mjs scripts/model-select-store.test.mjs scripts/onboarding-step-block.test.mjs scripts/onboarding-default-model.test.mjs scripts/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 scripts/pane-slot-ground.test.mjs scripts/projects-tab.test.mjs scripts/agent-hub-org-sharing.test.mjs scripts/mesh-tab.test.mjs scripts/onboarding-search-step.test.mjs scripts/provider-error-guidance.test.mjs scripts/radient-verify-callout.test.mjs scripts/sidebar-account-reconnect.test.mjs scripts/stopped-row-measure.test.mjs scripts/aida-rail-marks.test.mjs scripts/aida-sidebar.test.mjs scripts/currency-math.test.mjs scripts/mesh-canvas-bench.test.mjs scripts/agents-offer-dismiss.test.mjs scripts/projects-card-click.test.mjs scripts/lane-registration.test.mjs scripts/team-initials.test.mjs scripts/projects-sheet.test.mjs scripts/turn-collapse-model.test.mjs scripts/turn-collapse-behaviour.test.mjs scripts/checkpoint-model.test.mjs scripts/checkpoint-rail.test.mjs scripts/use-checkpoints.test.mjs scripts/reveal-record.test.mjs scripts/transcript-loader.test.mjs scripts/transcript-deep-jump.test.mjs scripts/thread-search-contract.test.mjs scripts/thread-search-model.test.mjs scripts/thread-search-overlay.test.mjs scripts/use-thread-search.test.mjs scripts/notification-lifetime.test.mjs scripts/transcript-rail-refusal.test.mjs scripts/use-active-checkpoint.test.mjs scripts/hold-escape-claim.test.mjs scripts/hotkey-registration.test.mjs scripts/mini-view-dictation.test.mjs scripts/mini-view-contract.test.mjs scripts/ptt-keymap-binding.test.mjs scripts/cross-session-visibility.test.mjs scripts/fold-open.test.mjs scripts/transcript-foot-slot.test.mjs scripts/chat-measure-drag.test.mjs scripts/chat-measure-handle.test.mjs scripts/header-identity-menu.test.mjs scripts/hub-updates.test.mjs scripts/monitor-controls.test.mjs scripts/monitor-cancel-dialog.test.mjs scripts/child-transcript-paging.test.mjs scripts/loader-state-machine.test.mjs scripts/transcript-cursor-continuity.test.mjs scripts/older-history-slot.test.mjs scripts/chat-session-subagents.test.mjs scripts/message-actions.test.mjs scripts/update-indicator-segments.test.mjs scripts/reload-picker-close.test.mjs scripts/projects-time-window.test.mjs scripts/audio-recording-levels.test.mjs scripts/chat-sidebar-row-menu.test.mjs scripts/navigation-gesture.test.mjs scripts/right-slot-width.test.mjs scripts/transcript-fade.test.mjs scripts/agents-config-probe-cadence.test.mjs scripts/turn-segments.test.mjs scripts/turn-partition-predicate.test.mjs scripts/chat-device-model.test.mjs scripts/org-teams-summary.test.mjs scripts/markdown-table-widths.test.mjs scripts/turn-answer-rail.test.mjs scripts/scrollbar-activity.test.mjs scripts/stt-mic-gate-session.test.mjs scripts/transcript-perflush-perf.test.mjs scripts/speech-clip.test.mjs scripts/speech-store.test.mjs scripts/speech-controls.test.mjs scripts/speech-selection.test.mjs scripts/speech-user-copy.test.mjs scripts/pre-push-gate.test.mjs scripts/update-rollover.test.mjs scripts/projects-filters.test.mjs scripts/projects-search.test.mjs scripts/projects-sort.test.mjs scripts/project-view-perf.test.mjs scripts/projects-request-update.test.mjs scripts/speech-target.test.mjs",
89
+ "test:desktop": "node scripts/run-desktop-tests.mjs scripts/agents-config-summary.test.mjs scripts/agents-config-retry.test.mjs scripts/agent-class-toggle.test.mjs scripts/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/transcript-focus.test.mjs scripts/transcript-focus-behaviour.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-paging-hook.test.mjs scripts/seed-placement.test.mjs scripts/seed-label-gap.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/session-load-sequence.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.test.mjs scripts/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/ask-draft-swap.test.mjs scripts/ask-queue.test.mjs scripts/composer-queued-send.test.mjs scripts/composer-tabs.test.mjs scripts/scroll-region-to-top.test.mjs scripts/ask-options.test.mjs scripts/click-proof-expect.test.mjs scripts/window-mode.test.mjs scripts/relaunch-during-quit-proof.test.mjs scripts/about-panel.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/desktop-test-memory-guard.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/picker-feedback.test.mjs scripts/picker-host-selection.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/check-geometry-sources.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/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/secret-ask.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/skill-invocation.test.mjs scripts/skill-list.test.mjs scripts/skill-highlight.test.mjs scripts/theme-inline.test.mjs scripts/composer-refusal.test.mjs scripts/ci-scope.test.mjs scripts/browser-tab-strip-focus.test.mjs scripts/projects-board-focus.test.mjs scripts/browser-file-transfer-row.test.mjs scripts/link-targets.test.mjs scripts/link-actions.test.mjs scripts/chat-link-affordances.test.mjs scripts/streaming-markdown-parity.test.mjs scripts/transcription-failure-copy.test.mjs scripts/backend-version-drift.test.mjs scripts/live-seed-placement.test.mjs scripts/agents-publication.test.mjs scripts/agent-hub-queries.test.mjs scripts/install-builtin-batch.test.mjs scripts/install-progress.test.mjs scripts/attention-seen.test.mjs scripts/mark-all-read-control.test.mjs scripts/update-global-guard.test.mjs scripts/delivery-gate.test.mjs scripts/canvas-file-freshness.test.mjs scripts/no-websocket-plane.test.mjs scripts/update-window-report.test.mjs scripts/canvas-tab-close.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/webauthn.test.mjs scripts/render-mac-entitlements.test.mjs scripts/row-state-floors.test.mjs scripts/pairing-card-copy.test.mjs scripts/update-install-copy.test.mjs scripts/update-shipit.test.mjs scripts/console-close.test.mjs scripts/console-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-pin-order.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.test.mjs scripts/console-mirror.test.mjs scripts/shell-path.test.mjs scripts/build-env-guard.test.mjs scripts/install-scripts-network.test.mjs scripts/console-pane-render.test.mjs scripts/settings-section-routes.test.mjs scripts/authoring-refresh.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/provider-chip-verdict.test.mjs scripts/child-reader-foot-react.test.mjs scripts/backend-spawn-address.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-sidebar-agents.test.mjs scripts/chat-sidebar-view.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/drafts-clear-on-send.test.mjs scripts/chat-sidebar-drafts.test.mjs scripts/undo-toasts.test.mjs scripts/chat-sidebar-sections.test.mjs scripts/titlebar-options.test.mjs scripts/lane-leading.test.mjs scripts/trace-fold-model.test.mjs scripts/trace-fold-behaviour.test.mjs scripts/chat-status-strip.test.mjs scripts/chat-pane-floors.test.mjs scripts/path-utils.test.mjs scripts/window-chrome.test.mjs scripts/chat-sidebar-scope-paging.test.mjs scripts/chat-sidebar-connection-voices.test.mjs scripts/integration-model.test.mjs scripts/mcp-catalog-parity.test.mjs scripts/mcp-catalog-transport.test.mjs scripts/btw-aside.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-text-authority.test.mjs scripts/shared-composer.test.mjs scripts/analytics-rate-format.test.mjs scripts/provider-catalog.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-status.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/provider-detail-remount.test.mjs scripts/model-select-store.test.mjs scripts/onboarding-step-block.test.mjs scripts/onboarding-default-model.test.mjs scripts/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 scripts/pane-slot-ground.test.mjs scripts/projects-tab.test.mjs scripts/agent-hub-org-sharing.test.mjs scripts/mesh-tab.test.mjs scripts/onboarding-search-step.test.mjs scripts/provider-error-guidance.test.mjs scripts/radient-verify-callout.test.mjs scripts/sidebar-account-reconnect.test.mjs scripts/stopped-row-measure.test.mjs scripts/aida-rail-marks.test.mjs scripts/aida-sidebar.test.mjs scripts/currency-math.test.mjs scripts/mesh-canvas-bench.test.mjs scripts/agents-offer-dismiss.test.mjs scripts/projects-card-click.test.mjs scripts/lane-registration.test.mjs scripts/team-initials.test.mjs scripts/projects-sheet.test.mjs scripts/turn-collapse-model.test.mjs scripts/turn-collapse-behaviour.test.mjs scripts/checkpoint-model.test.mjs scripts/checkpoint-rail.test.mjs scripts/use-checkpoints.test.mjs scripts/reveal-record.test.mjs scripts/transcript-loader.test.mjs scripts/transcript-deep-jump.test.mjs scripts/thread-search-contract.test.mjs scripts/thread-search-model.test.mjs scripts/thread-search-overlay.test.mjs scripts/use-thread-search.test.mjs scripts/notification-lifetime.test.mjs scripts/transcript-rail-refusal.test.mjs scripts/use-active-checkpoint.test.mjs scripts/hold-escape-claim.test.mjs scripts/hotkey-registration.test.mjs scripts/mini-view-dictation.test.mjs scripts/mini-view-contract.test.mjs scripts/ptt-keymap-binding.test.mjs scripts/cross-session-visibility.test.mjs scripts/fold-open.test.mjs scripts/transcript-foot-slot.test.mjs scripts/chat-measure-drag.test.mjs scripts/chat-measure-handle.test.mjs scripts/header-identity-menu.test.mjs scripts/hub-updates.test.mjs scripts/monitor-controls.test.mjs scripts/monitor-cancel-dialog.test.mjs scripts/child-transcript-paging.test.mjs scripts/loader-state-machine.test.mjs scripts/transcript-cursor-continuity.test.mjs scripts/older-history-slot.test.mjs scripts/chat-session-subagents.test.mjs scripts/message-actions.test.mjs scripts/update-indicator-segments.test.mjs scripts/reload-picker-close.test.mjs scripts/projects-time-window.test.mjs scripts/audio-recording-levels.test.mjs scripts/chat-sidebar-row-menu.test.mjs scripts/navigation-gesture.test.mjs scripts/right-slot-width.test.mjs scripts/transcript-fade.test.mjs scripts/agents-config-probe-cadence.test.mjs scripts/turn-segments.test.mjs scripts/turn-partition-predicate.test.mjs scripts/chat-device-model.test.mjs scripts/org-teams-summary.test.mjs scripts/markdown-table-widths.test.mjs scripts/turn-answer-rail.test.mjs scripts/scrollbar-activity.test.mjs scripts/stt-mic-gate-session.test.mjs scripts/transcript-perflush-perf.test.mjs scripts/speech-clip.test.mjs scripts/speech-store.test.mjs scripts/speech-controls.test.mjs scripts/speech-selection.test.mjs scripts/speech-user-copy.test.mjs scripts/pre-push-gate.test.mjs scripts/update-rollover.test.mjs scripts/projects-filters.test.mjs scripts/projects-search.test.mjs scripts/projects-search-index.test.mjs scripts/projects-sort.test.mjs scripts/project-view-perf.test.mjs scripts/projects-request-update.test.mjs scripts/projects-inline-edit.test.mjs scripts/speech-target.test.mjs scripts/agents-composer-mount.test.mjs scripts/evidence-fold.test.mjs",
85
90
  "check-themes": "node scripts/generate-theme-css.mjs --check && node scripts/contrast-contract.mjs",
86
91
  "check-vendored": "node scripts/check-vendored.mjs",
87
92
  "check-evidence": "node scripts/check-evidence.mjs",