local-operator-ui 0.31.32 → 0.31.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/main/index.js +3 -2
- package/out/renderer/assets/{_basePickBy-BzFdg-GF.js → _basePickBy-BGuZGQlL.js} +1 -1
- package/out/renderer/assets/{_baseUniq-Bm2KnnbI.js → _baseUniq-avrxGYhI.js} +1 -1
- package/out/renderer/assets/{agent-details-page-BMiohCvb.js → agent-details-page-CSjm9_q7.js} +2 -2
- package/out/renderer/assets/{agent-hub-page-CAJMRlDU.js → agent-hub-page-BXiVDudt.js} +3 -3
- package/out/renderer/assets/agents-page-CDuIQEse.js +7 -0
- package/out/renderer/assets/{arc-CcekKWMM.js → arc-CQRcxcOn.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-8foMClj9.js → architectureDiagram-IEHRJDOE-CkwuxGbl.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-DhfZvGTr.js → blockDiagram-JOT3LUYC-DErhLlTs.js} +1 -1
- package/out/renderer/assets/{browser-page-MbQ-dd2e.js → browser-page-BH9k2DzV.js} +1 -1
- package/out/renderer/assets/{browser-webauthn-prompt-DrMpnMBW.js → browser-webauthn-prompt-D5Ca5EtW.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-BtAFjDFO.js → c4Diagram-VJAJSXHY-Bvg0BHpF.js} +1 -1
- package/out/renderer/assets/channel-238GQ5wt.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-hEpjTUlR.js → chunk-4BMEZGHF-EIhFYl3X.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-BQE33qQV.js → chunk-A2AXSNBT-xwy-uUTS.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-Bfv-VOfu.js → chunk-AEK57VVT-Br1voKIL.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-CDEQDet7.js → chunk-D6G4REZN-C4Dh_tJf.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-BHPvStD5.js → chunk-RZ5BOZE2-bSGVs_Tb.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-DOAEvfwX.js → chunk-XZIHB7SX-CN1-qcAy.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-BFR--RB2.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-BFR--RB2.js +1 -0
- package/out/renderer/assets/clone-DJut1uh5.js +1 -0
- package/out/renderer/assets/{console-mirror-CiDuCMfE.js → console-mirror-D3uHRfYy.js} +1 -1
- package/out/renderer/assets/{consoleCapture-PlJxiaGX.js → consoleCapture-DwjQLM40.js} +1 -1
- package/out/renderer/assets/{conversation-input-sync-zDEtF-9C.js → conversation-input-sync-QxTZG_kn.js} +235 -235
- package/out/renderer/assets/{dagre-OKDRZEBW-DY30NVKc.js → dagre-OKDRZEBW-BY039iHz.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-Cj6GWkPW.js → diagram-SSKATNLV-bB3dlGcF.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-B1BnbNGr.js → diagram-VNBRO52H-Cyhtu1_5.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-Dt2TZzKY.js → erDiagram-Q7BY3M3F-CNtBW35e.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-B0y5c9qz.js → flowDiagram-4HSFHLVR-DpPSE1IC.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-twBGRDsR.js → ganttDiagram-APWFNJXF-xMxTMO4B.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-vi21DxCt.js → gitGraphDiagram-7IBYFJ6S-B7-mMQYk.js} +1 -1
- package/out/renderer/assets/{graph-BVnn4QNL.js → graph-By5Jgx_F.js} +1 -1
- package/out/renderer/assets/{index-QVureTEn.js → index-CL3E7OEw.js} +196 -191
- package/out/renderer/assets/{index-Dwxu7UOq.js → index-DE0OwCyE.js} +1 -1
- package/out/renderer/assets/{index-D94pB35A.js → index-jwwX9AyN.js} +1 -1
- package/out/renderer/assets/{infoDiagram-PH2N3AL5-B-Ch65yi.js → infoDiagram-PH2N3AL5-DX8aEhB8.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-Bp6eVPe6.js → journeyDiagram-U35MCT3I-CH_A0wDP.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-D6I-GN7U.js → kanban-definition-NDS4AKOZ-DtwsMDtl.js} +1 -1
- package/out/renderer/assets/{layout-DFC3HVFP.js → layout-HO9_Xm1P.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-Dfrz_ZCe.js → legacy-agents-page-D6fK_4tD.js} +3 -3
- package/out/renderer/assets/{mermaid.core-DKfPxzKU.js → mermaid.core-w9t0zfcx.js} +5 -5
- package/out/renderer/assets/{mesh-page-DoKTWh-X.js → mesh-page-D4paHK3u.js} +1 -1
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-kM4s__rt.js → mindmap-definition-ALO5MXBD-B76wJgpo.js} +1 -1
- package/out/renderer/assets/mini-BUYwiX1L.js +1 -0
- package/out/renderer/assets/{org-surface-gate-DArMk6ID.js → org-surface-gate-CoX7en0B.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-DM1JhBgg.js → pieDiagram-IB7DONF6-DBCDwb5q.js} +1 -1
- package/out/renderer/assets/projects-page-agDoCBOh.js +55 -0
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-B8T16HnV.js → quadrantDiagram-7GDLP6J5-OWbzuMt_.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-DnM_Vl89.js → radar-MK3ICKWK-CRLok0av.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-Doso02jc.js → radient-auth-buttons-BuYF7pw2.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-M7JjuiAa.js → requirementDiagram-KVF5MWMF-Ct-Jg5Jo.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-pZ0w_k-t.js → sankeyDiagram-QLVOVGJD-BJ0V1pBE.js} +1 -1
- package/out/renderer/assets/{schedules-page-OVNdDci6.js → schedules-page-BjwANHEZ.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-B7YWpV3i.js → sequenceDiagram-X6HHIX6F-CqLGptQb.js} +1 -1
- package/out/renderer/assets/settings-page-NSosCB_S.js +292 -0
- package/out/renderer/assets/{stateDiagram-DGXRK772-DwDArxIb.js → stateDiagram-DGXRK772-B-WRbN_h.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CzCtqiki.js +1 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-COfMTtoJ.js → timeline-definition-BDJGKUSR-Cdvoj120.js} +1 -1
- package/out/renderer/assets/ui-preferences-store-ClQPCzID.js +1 -0
- package/out/renderer/assets/{use-download-agent-mutation-fP7MSQui.js → use-download-agent-mutation-BEa3kVfY.js} +2 -2
- package/out/renderer/assets/{use-memberships-query-B_qwJ7_k.js → use-memberships-query-TpnxzBRP.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-COiK9nJs.js → xychartDiagram-VJFVF3MP-c6md61_B.js} +1 -1
- package/out/renderer/console-capture.html +3 -3
- package/out/renderer/index.html +4 -4
- package/out/renderer/mini.html +3 -3
- package/package.json +4 -4
- package/out/renderer/assets/agents-page-GLKOnCr6.js +0 -7
- package/out/renderer/assets/channel-er9Isqc8.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-CiL29Sc-.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-CiL29Sc-.js +0 -1
- package/out/renderer/assets/clone-Bsk4HvnO.js +0 -1
- package/out/renderer/assets/mini-D0On64Oc.js +0 -1
- package/out/renderer/assets/projects-page-Bb200mtz.js +0 -55
- package/out/renderer/assets/settings-page-CrOBuOHy.js +0 -292
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CEqnEMuN.js +0 -1
- package/out/renderer/assets/ui-preferences-store-BaXpFsZf.js +0 -1
package/out/renderer/assets/{stateDiagram-DGXRK772-DwDArxIb.js → stateDiagram-DGXRK772-B-WRbN_h.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
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};
|
|
1
|
+
import{s as W,a as P,S as N}from"./chunk-AEK57VVT-Br1voKIL.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-w9t0zfcx.js";import{G as F}from"./graph-By5Jgx_F.js";import{l as O}from"./layout-HO9_Xm1P.js";import{v as J,x as X}from"./conversation-input-sync-QxTZG_kn.js";import"./chunk-RZ5BOZE2-bSGVs_Tb.js";import"./index-DvjcW_EJ.js";import"./_baseUniq-avrxGYhI.js";import"./_basePickBy-BGuZGQlL.js";import"./ui-preferences-store-ClQPCzID.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-Br1voKIL.js";import{_ as i}from"./mermaid.core-w9t0zfcx.js";import"./chunk-RZ5BOZE2-bSGVs_Tb.js";import"./conversation-input-sync-QxTZG_kn.js";import"./ui-preferences-store-ClQPCzID.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-
|
|
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-w9t0zfcx.js";import{d as nt}from"./arc-CQRcxcOn.js";import"./conversation-input-sync-QxTZG_kn.js";import"./ui-preferences-store-ClQPCzID.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()+`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as N,D as ae}from"./index-DvjcW_EJ.js";const D=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(g=>g(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},ie=e=>e?D(e):D,ce=e=>e;function le(e,n=ce){const t=N.useSyncExternalStore(e.subscribe,()=>n(e.getState()),()=>n(e.getInitialState()));return N.useDebugValue(t),t}const L=e=>{const n=ie(e),t=o=>le(n,o);return Object.assign(t,n),t},ue=e=>e?L(e):L;function de(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 R=e=>n=>{try{const t=e(n);return t instanceof Promise?t:{then(o){return R(o)(t)},catch(o){return this}}}catch(t){return{then(o){return this},catch(o){return R(o)(t)}}}},fe=(e,n)=>(t,o,r)=>{let s={storage:de(()=>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 g;const v=()=>{var d,S;if(!u)return;a=!1,i.forEach(f=>{var p;return f((p=o())!=null?p:l)});const O=((S=s.onRehydrateStorage)==null?void 0:S.call(s,(d=o())!=null?d:l))||void 0;return R(u.getItem.bind(u))(s.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==s.version){if(s.migrate){const p=s.migrate(f.state,f.version);return p instanceof Promise?p.then(E=>[!0,E]):[!0,p]}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 p;const[E,se]=f;if(g=s.merge(se,(p=o())!=null?p:l),t(g,!0),E)return m()}).then(()=>{O?.(g,void 0),g=o(),a=!0,c.forEach(f=>f(g))}).catch(f=>{O?.(void 0,f)})};return r.persist={setOptions:d=>{s={...s,...d},d.storage&&(u=d.storage)},clearStorage:()=>{u?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:d=>(i.add(d),()=>{i.delete(d)}),onFinishHydration:d=>(c.add(d),()=>{c.delete(d)})},s.skipHydration||v(),g||l},he=fe,b=260,G=220,X=320,w=56,me=b,pe=1024,V=480,Y=400,ge=560;function j(e){return Math.max(0,Math.min(ge,e-V))}function B(e){return j(e)>=Y?"docked":"overlay"}function Se(e,n=b){return B(e-K(n))==="overlay"&&B(e-w)==="docked"}function K(e){return Number.isNaN(e)?b:Math.min(X,Math.max(G,e))}function hn(e,n,t,o=b,r=!1){if(e>=pe){const a=!n&&r&&Se(e,o);return{mode:n||a?"strip":"docked",width:n||a?w:K(o),collapsed:n||a,sheetOpen:!1,resizable:!n&&!a}}return{mode:t?"overlay":"strip",width:t?me:w,collapsed:!0,sheetOpen:t,resizable:!1}}function mn(e){return e.shiftKey||e.altKey||!(e.metaKey||e.ctrlKey)?!1:e.key.toLowerCase()==="b"}const pn=e=>e?"⌘B":"Ctrl+B",gn="@container/chatcol",Sn="w-full @min-[750px]/chatcol:max-w-[var(--lo-chat-measure)] @min-[750px]/chatcol:mx-auto",_e="--lo-chat-measure-shipped",H="--lo-chat-measure-override",_n=()=>{if(typeof document>"u"||typeof getComputedStyle!="function")return null;const e=getComputedStyle(document.documentElement).getPropertyValue(_e).trim(),n=Number.parseFloat(e);return Number.isFinite(n)&&n>0?n:null},Cn="px-6",yn="max-h-[7.5rem] overflow-y-auto leading-5",Ce=520,ye=1100,Ae=3,Q=e=>Math.min(ye,Math.max(Ce,Math.round(e))),be=({startWidth:e,deltaX:n,edge:t})=>Q(t==="right"?e+n*2:e-n*2),W=(e,n)=>Math.min(e,n),An=({startWidth:e,deltaX:n,edge:t,panePx:o})=>{if(Math.abs(n)<Ae)return null;const r=be({startWidth:e,deltaX:n,edge:t});return W(r,o)===W(e,o)?null:r},Oe=["active","created"],bn={running:"Running",today:"Today",week:"This week",older:"Older"},Ee=new Set(["busy","delegating","approval","answer","wedged"]);function J(e){return Ee.has(e.status?.code??"")}const Pe=24*60*60*1e3,Re=e=>{const n=new Date(e);return n.setHours(0,0,0,0),n.getTime()};function Z(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 we(e,n,t){if(J(e))return"running";const o=Z(e,t);if(o===null)return"older";const r=Re(n);return o>=r?"today":o>=r-6*Pe?"week":"older"}function On(e,n,t){const o={running:[],today:[],week:[],older:[]};for(const r of e)o[we(r,n,t)].push(r);return o}function Ie(e,n,t){const o=Z(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 En(e,n,t){const o=Ie(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 I=["pinned","running","today","week","older","agents","teams"],Pn={pinned:"Pinned",running:"Running",today:"Today",week:"This week",older:"Older",agents:"Agents",teams:"Teams"};function Rn(e){return e==="agents"||e==="teams"}const A=8;function Te(e,n){if(!(n in e))return e;const t={...e};return delete t[n],t}function wn(e,n){return{...e,[n]:(e[n]??A)+A}}function In(e,n,t,o,r){const s=!(e[t]??o);return{expanded:{...e,[t]:s},caps:!s&&!r?Te(n,t):n}}function Tn(e,n,t,o){return(e||n!=="")&&(o>A||t.trim()!=="")}const Mn="Collapse, then reopen, to restore the compact list";function vn(e){return(e??A)>A}const Nn=e=>`section-grown-hint-${e}`,Me=e=>e===1?"Show 1 more":`Show ${e} more`;function Dn(e,n){return`${Me(e)} ${n}`}const y={hidden:[],order:[...I],pins:[],groupBy:"section",basis:"active",orderBy:"active-first",loads:0,pinnedAgents:[]},ve=10,_=[25,50],Ne=50,De=500,Le=64;function T(e){const n=Math.max(0,Math.floor(e));return n===0?ve:n<=_.length?_[n-1]:_[_.length-1]+(n-_.length)*Ne}function Ln(e,n){const t=T(e+1)-T(e),o=Math.max(0,Math.min(t,n));return o===1?"Show 1 more chat":`Show ${o} more chats`}function z(e){return J(e)}function Bn(e,n){if(n==="recent")return[...e];const t=[],o=[];for(const r of e)(z(r)?t:o).push(r);return[...t,...o]}function Hn(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 Wn(e,n){if(n.searching)return{rows:[...e],lifted:!1,hidden:0,held:e.length};const t=T(n.loads),o=[];let r=t;for(const c of e){if(z(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 xn(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 Be="mt-4",He="mt-2";function Un(e){return e?Be:He}function kn(e,n,t,o){return t?e.toLocaleLowerCase().includes(t.toLocaleLowerCase())||(o??"").toLocaleLowerCase().includes(t.toLocaleLowerCase())||n>0:!0}function $n(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 We(e,n){return!e.hidden.includes(n)}function q(e){return e.order.filter(n=>We(e,n))}function Fn(e,n){const t=e.hidden.includes(n)?e.hidden.filter(o=>o!==n):[...e.hidden,n];return{...e,hidden:t}}function Gn(e,n,t){const o=q(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 xe=["running","today","week","older"];function x(e){return xe.includes(e)}function Xn(e,n,t,o){if(!x(n)||o&&!o(n))return!1;const r=q(e),s=r.indexOf(n);if(s<0)return!1;const a=r[s+t];return a===void 0||!x(a)?!1:o?o(a):!0}const Ue=["section","agent","flat"],ke=["active-first","recent"];function Vn(e){if(typeof e!="object"||e===null)return y;const n=e,t=new Set(I),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 I)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=Ue.includes(n.groupBy)?n.groupBy:y.groupBy,a=Oe.includes(n.basis)?n.basis:y.basis,i=ke.includes(n.orderBy)?n.orderBy:y.orderBy,c=typeof n.loads=="number"&&Number.isFinite(n.loads)&&n.loads>0?Math.min(De,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>=Le)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 $e="both",ee="by-turn",M=[{value:"by-turn",label:"By turn"},{value:"by-response",label:"By response"}];function Yn(e){for(const n of M)if(e===n.value)return n.value;return ee}function jn(e){return M.find(n=>n.value===e)?.label??M[0].label}const U={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"},Fe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kn=(e=document.documentElement)=>{const n=getComputedStyle(e),t={};for(const o of Object.keys(U)){const r=Ye(n,U[o]);r&&(t[o]=r)}return Object.keys(t).length===0&&Xe(e),t},Qn=(e,n=document.documentElement)=>{if(e==null)return;n.dataset.theme=e,n.classList.toggle("dark",e.toLowerCase().includes("light")===!1),Ge(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`)},Ge=(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`))},Ve=13,Ye=(e,n)=>{const t=Fe(n),o=e.getPropertyValue(`--color-${t}`).trim();if($(o))return o;const r=e.getPropertyValue(`--lo-${t}`).trim();return $(r)?r:""},je=/^#[0-9a-fA-F]{3,8}$/,Ke=/^(rgb|rgba|hsl|hsla|color)\(/,$=e=>je.test(e)||Ke.test(e),Qe=(e=document.documentElement)=>typeof document>"u"||typeof getComputedStyle!="function"?"monospace":getComputedStyle(e).getPropertyValue("--font-mono").trim()||"monospace",Je=(e,n=Ve,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??Qe(),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=Ze(u,t)),{cellWidth:o,cellHeight:r}},Ze=(e,n)=>Math.ceil(e*n)/n,C=e=>({isRunPanelOpen:e==="isRunPanelOpen",isCanvasOpen:e==="isCanvasOpen",isBrowserPaneOpen:e==="isBrowserPaneOpen",isConsolePaneOpen:e==="isConsolePaneOpen"});function Jn(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(Y,n.rightSlotWidth||ne);break;case"run":o=Math.max(on,n.rightSlotWidth||te);break;case"browser":o=Math.max(rn,n.rightSlotWidth||oe);break;case"console":o=Math.max(sn,n.rightSlotWidth||re);break}return e<=0?o:t==="canvas"?Math.min(o,j(e)):Math.min(o,Math.max(0,e-V))}const ne=800,F=b,te=420,ze=20,qe=4,oe=640,en=100,nn=16,tn=()=>Math.ceil(en*Je().cellWidth)+nn,re=tn(),on=320,rn=480,sn=480,an=5e3,Zn=(e,n)=>e.some(t=>t.surface===n),zn=(e,n=Date.now())=>e.some(t=>n-t.at<an),cn=[],P=e=>{if(typeof document>"u")return;const n=document.documentElement;if(e===null){n.style.removeProperty(H);return}n.style.setProperty(H,`${e}px`)},qn=ue()(he(e=>({isCommandPaletteOpen:!1,commandPaletteQuery:"",isSidebarCollapsed:!1,showAgentReasoning:!1,transcriptDisplayMode:ee,themeName:ae,rightSlotWidth:0,chatSidebarWidth:F,chatSidebarRegions:$e,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:cn,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})},setTranscriptDisplayMode:n=>{e({transcriptDisplayMode: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(X,Math.max(G,n))})},setChatSidebarRegions:n=>{e({chatSidebarRegions:n})},setChatSidebarListHeight:n=>{e({chatSidebarListHeight:n})},restoreDefaultChatSidebarListHeight:()=>{e({chatSidebarListHeight:null})},setChatMeasureWidth:n=>{const t=Q(n);P(t),e({chatMeasureWidth:t})},restoreDefaultChatMeasureWidth:()=>{P(null),e({chatMeasureWidth:null})},setChatSidebarOrder:n=>{e({chatSidebarOrder:n})},setChatSidebarView:n=>{e({chatSidebarView:n})},dismissBuiltinOffer:n=>{e({dismissedBuiltinOfferSignature:n})},restoreDefaultChatSidebarWidth:()=>{e({chatSidebarWidth:F})},rememberMention:(n,t)=>{e(o=>{const r=o.mentionRecents,s=r?.cwd===n?r.paths:[],a=[t,...s.filter(i=>i!==t)].slice(0,ze);return{mentionRecents:{cwd:n,paths:a}}})},rememberProfile:(n,t)=>{e(o=>({profileRecents:{...o.profileRecents,[n]:ln(o.profileRecents[n]??[],t)}}))}}),{name:"ui-preferences-storage",version:1,migrate:dn,partialize:un,onRehydrateStorage:()=>e=>{P(e?.chatMeasureWidth??null)}}));function ln(e,n){return[n,...e.filter(t=>t!==n)].slice(0,qe)}function un(e){const{runPanelReveal:n,consoleOpenIntent:t,...o}=e;return o}function dn(e,n){const t={...e??{}};if(n>=1)return t;const o=[["canvasWidth",ne],["runPanelWidth",te],["browserPanelWidth",oe],["consolePanelWidth",re]];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{Y as $,kn as A,A as B,Cn as C,y as D,Un as E,$n as F,Ln as G,vn as H,Mn as I,Nn as J,Me as K,Dn as L,wn as M,Wn as N,xn as O,Ie as P,J as Q,En as R,Pn as S,Ve as T,bn as U,In as V,jn as W,Jn as X,on as Y,gn as Z,Sn as _,Qn as a,j as a0,rn as a1,sn as a2,te as a3,B as a4,oe as a5,re as a6,V as a7,pn as a8,K as a9,de as aa,hn as ab,mn as ac,pe as ad,w as ae,X as af,G as ag,ee as ah,ye as ai,Ce as aj,H as ak,W as al,An as am,be as an,_n as ao,yn as ap,M as b,ue as c,Yn as d,zn as e,an as f,Z as g,We as h,Zn as i,x as j,Rn as k,Fn as l,Je as m,Gn as n,Xn as o,he as p,Vn as q,Kn as r,Hn as s,Qe as t,qn as u,T as v,Bn as w,On as x,q as y,Tn as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as l,j as
|
|
1
|
+
import{c as l,j as F}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{bH as q,bb as O,bI as B,aM as k,aG as P,u as w,aN as b,aQ as Y,aO as D,be as Z,a8 as C,bf as G}from"./conversation-input-sync-QxTZG_kn.js";import{aw as W,ax as X,ay as I}from"./index-CL3E7OEw.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-TpnxzBRP.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,j as T}from"./error-boundary-BCN3_4Dn.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,
|
|
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,T=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&&T!=="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 L={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(B,{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=>L[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",Be=({tags:e,categories:t,className:o})=>{if((!e||e.length===0)&&(!t||t.length===0))return null;const a=new Set((t??[]).map(s=>(L[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))]})},Pe=({orgName:e,className:t})=>r.jsxs(F,{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]]},Ie=e=>[...new Set(e)].sort(),Ye=({agentIds:e,enabled:t=!0})=>{const{isAuthenticated:o}=k(),a=e.join(","),n=V.useMemo(()=>Ie(e),[a]),s=P({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})}})},Le=(e,t)=>{const o=[];for(const[,a]of e.getQueriesData({queryKey:I}))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,Le(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:I}),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{Be as A,L as C,Ue as H,Pe 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};
|
package/out/renderer/assets/{use-memberships-query-B_qwJ7_k.js → use-memberships-query-TpnxzBRP.js}
RENAMED
|
@@ -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-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
|
+
import{ay as v,az as A,aA as $,aB as I,aC as h,aD as R,aE as L,aF as r,aG as _,aH as w,aI as q,aJ as N,aK as P,aL as S,aM as k}from"./conversation-input-sync-QxTZG_kn.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"],B=e=>{const n=e.toLowerCase();return j.some(t=>n.includes(t))||I(e)},D=(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.`:B(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}`},x="The action did not complete.",Z=(e,n,t)=>e==="download"?D(n,t):v(x,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-
|
|
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-w9t0zfcx.js";import{q as kt,o as Tt,v as Rt}from"./conversation-input-sync-QxTZG_kn.js";import"./index-DvjcW_EJ.js";import"./ui-preferences-store-ClQPCzID.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,10 +6,10 @@
|
|
|
6
6
|
<title>Local Operator Console Capture</title>
|
|
7
7
|
<meta http-equiv="Content-Security-Policy"
|
|
8
8
|
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
|
|
9
|
-
<script type="module" crossorigin src="./assets/consoleCapture-
|
|
9
|
+
<script type="module" crossorigin src="./assets/consoleCapture-DwjQLM40.js"></script>
|
|
10
10
|
<link rel="modulepreload" crossorigin href="./assets/index-DvjcW_EJ.js">
|
|
11
|
-
<link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/console-mirror-
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-ClQPCzID.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror-D3uHRfYy.js">
|
|
13
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>
|
package/out/renderer/index.html
CHANGED
|
@@ -31,12 +31,12 @@
|
|
|
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-
|
|
34
|
+
<script type="module" crossorigin src="./assets/index-CL3E7OEw.js"></script>
|
|
35
35
|
<link rel="modulepreload" crossorigin href="./assets/index-DvjcW_EJ.js">
|
|
36
|
-
<link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-
|
|
36
|
+
<link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-ClQPCzID.js">
|
|
37
37
|
<link rel="modulepreload" crossorigin href="./assets/error-boundary-BCN3_4Dn.js">
|
|
38
|
-
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-
|
|
39
|
-
<link rel="modulepreload" crossorigin href="./assets/console-mirror-
|
|
38
|
+
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-QxTZG_kn.js">
|
|
39
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror-D3uHRfYy.js">
|
|
40
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">
|
package/out/renderer/mini.html
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
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-
|
|
9
|
+
<script type="module" crossorigin src="./assets/mini-BUYwiX1L.js"></script>
|
|
10
10
|
<link rel="modulepreload" crossorigin href="./assets/index-DvjcW_EJ.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="./assets/error-boundary-BCN3_4Dn.js">
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-ClQPCzID.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-QxTZG_kn.js">
|
|
14
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>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-operator-ui",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.34",
|
|
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,12 +65,12 @@
|
|
|
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:evidence-fold": "Wires the clone merge driver for docs/evidence/manifest.json, so `git merge` does not stop on a
|
|
68
|
+
"//prepare:evidence-fold": "Wires the clone merge driver for docs/evidence/manifest.json, so `git merge` does not stop on a manifest a sibling lane also rewrote. 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. The driver is not needed for the ordinary fold any more - with the retired tree stamps gone, a merge that only moved `src/` or `scripts/` does not touch this file at all - but it is still what resolves the 18-in-30 folds where two lanes genuinely both edited it.",
|
|
69
69
|
"prepare": "node scripts/hooks-install.mjs --tolerate-failure && node scripts/evidence-fold.mjs --install --tolerate-failure",
|
|
70
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.",
|
|
71
71
|
"hooks:install": "node scripts/hooks-install.mjs",
|
|
72
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
|
|
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 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 - every field the manifest still claims about its tree is written by this tool and then checked by the real guards - and a fold that moved only `src/` or `scripts/` now writes NOTHING (`the manifest already describes this tree`), because the `srcTree`/`scriptsTree` pair that used to change on every such merge is retired and is dropped from whichever side still carries it. 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
74
|
"evidence:fold": "node scripts/evidence-fold.mjs",
|
|
75
75
|
"evidence:fold:install": "node scripts/evidence-fold.mjs --install",
|
|
76
76
|
"evidence:fold:check": "node scripts/evidence-fold.mjs --check",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"check-types": "pnpm run check-types:main && pnpm run check-types:renderer",
|
|
87
87
|
"check-changed": "node scripts/ci-scope.mjs --since \"$(git merge-base origin/main HEAD)\" --run",
|
|
88
88
|
"test:session-cookies": "node scripts/session-cookie-electron.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",
|
|
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/draft-slash-identity.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-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 scripts/projects-quick-send.test.mjs",
|
|
90
90
|
"check-themes": "node scripts/generate-theme-css.mjs --check && node scripts/contrast-contract.mjs",
|
|
91
91
|
"check-vendored": "node scripts/check-vendored.mjs",
|
|
92
92
|
"check-evidence": "node scripts/check-evidence.mjs",
|