local-operator-ui 0.31.18 → 0.31.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/README.md +24 -0
  2. package/out/main/index.js +233 -106
  3. package/out/renderer/assets/{_basePickBy-D1XXNWdy.js → _basePickBy-_G13yD_N.js} +1 -1
  4. package/out/renderer/assets/{_baseUniq-DD_DKvaU.js → _baseUniq-cZFY6WR-.js} +1 -1
  5. package/out/renderer/assets/{agent-details-page-Q8dgdQp2.js → agent-details-page-DohUpAW5.js} +1 -1
  6. package/out/renderer/assets/{agent-hub-page-CBHsotVj.js → agent-hub-page-D2Wo_RcW.js} +2 -2
  7. package/out/renderer/assets/agents-page-Bme3mW2i.js +2 -0
  8. package/out/renderer/assets/{renderer-platform-RsXXlY5x.js → aida-control-DVTI-DZP.js} +19 -19
  9. package/out/renderer/assets/{arc-BII0LAll.js → arc-_ZSLPSD3.js} +1 -1
  10. package/out/renderer/assets/architectureDiagram-IEHRJDOE-BMozIO-d.js +36 -0
  11. package/out/renderer/assets/{blockDiagram-JOT3LUYC-BsfIO03o.js → blockDiagram-JOT3LUYC-CnCGGby6.js} +6 -6
  12. package/out/renderer/assets/{book-open-Bau36KjM.js → book-open-BWKY7M9P.js} +1 -1
  13. package/out/renderer/assets/browser-page-Ca86jJVo.js +1 -0
  14. package/out/renderer/assets/browser-webauthn-prompt-Zq7Sensn.js +1 -0
  15. package/out/renderer/assets/{c4Diagram-VJAJSXHY-CHKu8u4B.js → c4Diagram-VJAJSXHY-D6vlxi2G.js} +1 -1
  16. package/out/renderer/assets/channel-DBxTgGZs.js +1 -0
  17. package/out/renderer/assets/{chunk-4BMEZGHF-Do_SeY3I.js → chunk-4BMEZGHF-CgxwmKpR.js} +1 -1
  18. package/out/renderer/assets/{chunk-A2AXSNBT-C7_NoYUm.js → chunk-A2AXSNBT-DL4YbfpC.js} +1 -1
  19. package/out/renderer/assets/{chunk-AEK57VVT-C3I1E4qy.js → chunk-AEK57VVT-C7STzYq2.js} +1 -1
  20. package/out/renderer/assets/{chunk-D6G4REZN-BEkTCb-4.js → chunk-D6G4REZN-BiGlWxbN.js} +1 -1
  21. package/out/renderer/assets/{chunk-RZ5BOZE2-Ccs-Kaym.js → chunk-RZ5BOZE2-FPI-zkVi.js} +1 -1
  22. package/out/renderer/assets/{chunk-XZIHB7SX-Db28vmME.js → chunk-XZIHB7SX-pQtxBw7K.js} +1 -1
  23. package/out/renderer/assets/classDiagram-GIVACNV2-oRXPz12L.js +1 -0
  24. package/out/renderer/assets/classDiagram-v2-COTLJTTW-oRXPz12L.js +1 -0
  25. package/out/renderer/assets/clone-CWgQ1AK5.js +1 -0
  26. package/out/renderer/assets/{console-mirror-CUQyeXIE.js → console-mirror-CG9RcMIb.js} +1 -1
  27. package/out/renderer/assets/{consoleCapture-emgU7WyW.js → consoleCapture-CpTo2RAv.js} +1 -1
  28. package/out/renderer/assets/dagre-OKDRZEBW-BoM7akd9.js +4 -0
  29. package/out/renderer/assets/diagram-SSKATNLV-D9w1aNay.js +43 -0
  30. package/out/renderer/assets/diagram-VNBRO52H-D6xO4h26.js +24 -0
  31. package/out/renderer/assets/{erDiagram-Q7BY3M3F-BYRglvp5.js → erDiagram-Q7BY3M3F-lgEC_hRU.js} +1 -1
  32. package/out/renderer/assets/{error-boundary-BFYdHP26.js → error-boundary-DVk48CIF.js} +1 -1
  33. package/out/renderer/assets/{flowDiagram-4HSFHLVR-C6ReCJC9.js → flowDiagram-4HSFHLVR-B8gXHejR.js} +1 -1
  34. package/out/renderer/assets/{ganttDiagram-APWFNJXF-CMDShfzg.js → ganttDiagram-APWFNJXF-Ds8ML93J.js} +3 -3
  35. package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-D5gdmSVh.js +65 -0
  36. package/out/renderer/assets/{graph-BK-Vf19N.js → graph-DNi4FjaS.js} +1 -1
  37. package/out/renderer/assets/index-40tBsZ9r.js +7 -0
  38. package/out/renderer/assets/{index-BDPyvriR.js → index-BhRzR-VW.js} +391 -376
  39. package/out/renderer/assets/index-BlalL3ro.js +1 -0
  40. package/out/renderer/assets/index-FjyWTJXV.css +1 -0
  41. package/out/renderer/assets/infoDiagram-PH2N3AL5-BDTgzxhS.js +2 -0
  42. package/out/renderer/assets/{installer-DfFRjYBs.js → installer-BgW1Tkr8.js} +1 -1
  43. package/out/renderer/assets/{journeyDiagram-U35MCT3I-CeBVrNEA.js → journeyDiagram-U35MCT3I-BdnGNrZc.js} +1 -1
  44. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-DnIH3R0V.js → kanban-definition-NDS4AKOZ-BuQLa1-R.js} +1 -1
  45. package/out/renderer/assets/{layout-IqcTjCQI.js → layout-Pvac8TnM.js} +1 -1
  46. package/out/renderer/assets/{legacy-agents-page-DbLTVwq0.js → legacy-agents-page-BR_oPhtA.js} +3 -3
  47. package/out/renderer/assets/{mermaid.core-BrRc254F.js → mermaid.core-Dol6F2oY.js} +5 -5
  48. package/out/renderer/assets/mesh-page-CcSpUIcL.js +2 -0
  49. package/out/renderer/assets/mindmap-definition-ALO5MXBD-DDnWPtbR.js +95 -0
  50. package/out/renderer/assets/mini-D1QQjR0V.js +1 -0
  51. package/out/renderer/assets/org-surface-gate-_kP5Dpsg.js +1 -0
  52. package/out/renderer/assets/{page-header-BtO13sx8.js → page-header-B3RA2AMB.js} +1 -1
  53. package/out/renderer/assets/{pieDiagram-IB7DONF6-CnRMxjLj.js → pieDiagram-IB7DONF6-Dc1zeStB.js} +1 -1
  54. package/out/renderer/assets/{projects-page-BgRRDkEz.js → projects-page-Cb7bJ1ue.js} +1 -1
  55. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-bRLUBm5r.js → quadrantDiagram-7GDLP6J5-AlzvyKPw.js} +1 -1
  56. package/out/renderer/assets/{radar-MK3ICKWK-BV3WfB2Y.js → radar-MK3ICKWK-BLuijs-X.js} +1 -1
  57. package/out/renderer/assets/radient-auth-buttons-gtgUk3ts.js +1 -0
  58. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-Bzqys165.js → requirementDiagram-KVF5MWMF-CfgMH9Xy.js} +1 -1
  59. package/out/renderer/assets/sankeyDiagram-QLVOVGJD-CGSaFjvZ.js +10 -0
  60. package/out/renderer/assets/{schedules-page-CbOATI1U.js → schedules-page-yCFUUqqb.js} +1 -1
  61. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-bfcEv3LN.js → sequenceDiagram-X6HHIX6F-BKLpPHnF.js} +1 -1
  62. package/out/renderer/assets/settings-page-6S9zTaN7.js +297 -0
  63. package/out/renderer/assets/{settings-section-BXGO9Lv0.js → settings-section-D3WEX0WK.js} +1 -1
  64. package/out/renderer/assets/stateDiagram-DGXRK772-CukEj5Ge.js +1 -0
  65. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CaoB6DdD.js +1 -0
  66. package/out/renderer/assets/{textarea-B83uQCj2.js → textarea-BX6EeK34.js} +1 -1
  67. package/out/renderer/assets/{timeline-definition-BDJGKUSR-BlN_DgVS.js → timeline-definition-BDJGKUSR-ZSpHRGCR.js} +1 -1
  68. package/out/renderer/assets/{ui-preferences-store-DzXZGWGz.js → ui-preferences-store-DjUQd2R7.js} +1 -1
  69. package/out/renderer/assets/{use-download-agent-mutation-DrENBWNa.js → use-download-agent-mutation-BwZi8Zfx.js} +2 -2
  70. package/out/renderer/assets/use-memberships-query-CSOmeH29.js +1 -0
  71. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-C1DOS4ES.js → xychartDiagram-VJFVF3MP-B4P41D_W.js} +1 -1
  72. package/out/renderer/console-capture.html +5 -5
  73. package/out/renderer/index.html +8 -8
  74. package/out/renderer/installer.html +5 -5
  75. package/out/renderer/mini.html +6 -6
  76. package/package.json +2 -2
  77. package/out/renderer/assets/agents-page-9zkhLfa8.js +0 -2
  78. package/out/renderer/assets/architectureDiagram-IEHRJDOE-Yh4i0oDy.js +0 -36
  79. package/out/renderer/assets/browser-page-CrHmmBk0.js +0 -1
  80. package/out/renderer/assets/browser-webauthn-prompt-_nNd3iSK.js +0 -1
  81. package/out/renderer/assets/channel-DXiH5yDB.js +0 -1
  82. package/out/renderer/assets/classDiagram-GIVACNV2-D2MG4USX.js +0 -1
  83. package/out/renderer/assets/classDiagram-v2-COTLJTTW-D2MG4USX.js +0 -1
  84. package/out/renderer/assets/clone-BDi6ICAs.js +0 -1
  85. package/out/renderer/assets/dagre-OKDRZEBW-k4D1AM8X.js +0 -4
  86. package/out/renderer/assets/diagram-SSKATNLV-B0DOtyf9.js +0 -43
  87. package/out/renderer/assets/diagram-VNBRO52H-BmzuI3Lr.js +0 -24
  88. package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-pvPc8CHP.js +0 -65
  89. package/out/renderer/assets/index-B5DwqFlK.js +0 -7
  90. package/out/renderer/assets/index-DITdBETY.css +0 -1
  91. package/out/renderer/assets/index-_oyU7kmX.js +0 -1
  92. package/out/renderer/assets/infoDiagram-PH2N3AL5-COePE42k.js +0 -2
  93. package/out/renderer/assets/mesh-page-W9oV_bPF.js +0 -2
  94. package/out/renderer/assets/mindmap-definition-ALO5MXBD-BMHndK7E.js +0 -95
  95. package/out/renderer/assets/mini-CbmMlUkq.js +0 -1
  96. package/out/renderer/assets/org-surface-gate-BgtTWHt3.js +0 -1
  97. package/out/renderer/assets/radient-auth-buttons-Briy2cZb.js +0 -1
  98. package/out/renderer/assets/sankeyDiagram-QLVOVGJD--IgSaXgN.js +0 -10
  99. package/out/renderer/assets/settings-page-Bn87mGZ1.js +0 -307
  100. package/out/renderer/assets/stateDiagram-DGXRK772-CDJAoYUf.js +0 -1
  101. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-Di7PMVrt.js +0 -1
  102. package/out/renderer/assets/use-memberships-query-C2Yus1QJ.js +0 -1
  103. /package/out/renderer/assets/{index-CDaH3A1m.js → index-VKe88JN9.js} +0 -0
@@ -0,0 +1 @@
1
+ import{s as r,b as e,a,S as i}from"./chunk-AEK57VVT-C7STzYq2.js";import{_ as s}from"./mermaid.core-Dol6F2oY.js";import"./chunk-RZ5BOZE2-FPI-zkVi.js";import"./index-BhRzR-VW.js";import"./index-VKe88JN9.js";import"./aida-control-DVTI-DZP.js";import"./ui-preferences-store-DjUQd2R7.js";import"./textarea-BX6EeK34.js";import"./error-boundary-DVk48CIF.js";import"./console-mirror-CG9RcMIb.js";var g={parser:a,get db(){return new i(2)},renderer:e,styles:r,init:s(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{g as diagram};
@@ -1,4 +1,4 @@
1
- import{d as Zi,g as Qi,e as Ji,r as i,j as u,c as M,f as St}from"./index-CDaH3A1m.js";var Ct=Zi();const Mg=Qi(Ct),yr=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Sr=Ji,it=(t,e)=>n=>{var o;if(e?.variants==null)return Sr(t,n?.class,n?.className);const{variants:r,defaultVariants:s}=e,a=Object.keys(r).map(d=>{const h=n?.[d],f=s?.[d];if(h===null)return null;const p=yr(h)||yr(f);return r[d][p]}),c=n&&Object.entries(n).reduce((d,h)=>{let[f,p]=h;return p===void 0||(d[f]=p),d},{}),l=e==null||(o=e.compoundVariants)===null||o===void 0?void 0:o.reduce((d,h)=>{let{class:f,className:p,...m}=h;return Object.entries(m).every(v=>{let[g,b]=v;return Array.isArray(b)?b.includes({...s,...c}[g]):{...s,...c}[g]===b})?[...d,f,p]:d},[]);return Sr(t,a,l,n?.class,n?.className)};/**
1
+ import{d as Zi,g as Qi,e as Ji,r as i,j as u,c as M,f as St}from"./index-VKe88JN9.js";var Ct=Zi();const Mg=Qi(Ct),yr=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Sr=Ji,it=(t,e)=>n=>{var o;if(e?.variants==null)return Sr(t,n?.class,n?.className);const{variants:r,defaultVariants:s}=e,a=Object.keys(r).map(d=>{const h=n?.[d],f=s?.[d];if(h===null)return null;const p=yr(h)||yr(f);return r[d][p]}),c=n&&Object.entries(n).reduce((d,h)=>{let[f,p]=h;return p===void 0||(d[f]=p),d},{}),l=e==null||(o=e.compoundVariants)===null||o===void 0?void 0:o.reduce((d,h)=>{let{class:f,className:p,...m}=h;return Object.entries(m).every(v=>{let[g,b]=v;return Array.isArray(b)?b.includes({...s,...c}[g]):{...s,...c}[g]===b})?[...d,f,p]:d},[]);return Sr(t,a,l,n?.class,n?.className)};/**
2
2
  * @license lucide-react v0.507.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -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-BrRc254F.js";import{d as nt}from"./arc-BII0LAll.js";import"./index-BDPyvriR.js";import"./index-CDaH3A1m.js";import"./renderer-platform-RsXXlY5x.js";import"./ui-preferences-store-DzXZGWGz.js";import"./textarea-B83uQCj2.js";import"./error-boundary-BFYdHP26.js";import"./console-mirror-CUQyeXIE.js";var Q=function(){var n=s(function(x,i,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],u={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,c,p,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:p.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:p.addTask(o[v],0,""),this.$=o[v];break;case 16:p.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:s(function(i){var a=this,c=[0],p=[],y=[null],o=[],w=this.table,v="",N=0,A=0,V=2,U=1,M=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(i,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var P=g.yylloc;o.push(P);var W=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=p.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(p=T,T=p.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,C,I,J,R={},B,$,et,O;;){if(C=c[c.length-1],this.defaultActions[C]?I=this.defaultActions[C]:((S===null||typeof S>"u")&&(S=tt()),I=w[C]&&w[C][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[C])this.terminals_[B]&&B>V&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`:
1
+ import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-Dol6F2oY.js";import{d as nt}from"./arc-_ZSLPSD3.js";import"./index-BhRzR-VW.js";import"./index-VKe88JN9.js";import"./aida-control-DVTI-DZP.js";import"./ui-preferences-store-DjUQd2R7.js";import"./textarea-BX6EeK34.js";import"./error-boundary-DVk48CIF.js";import"./console-mirror-CG9RcMIb.js";var Q=function(){var n=s(function(x,i,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],u={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,c,p,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:p.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:p.addTask(o[v],0,""),this.$=o[v];break;case 16:p.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:s(function(i){var a=this,c=[0],p=[],y=[null],o=[],w=this.table,v="",N=0,A=0,V=2,U=1,M=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(i,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var P=g.yylloc;o.push(P);var W=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=p.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(p=T,T=p.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,C,I,J,R={},B,$,et,O;;){if(C=c[c.length-1],this.defaultActions[C]?I=this.defaultActions[C]:((S===null||typeof S>"u")&&(S=tt()),I=w[C]&&w[C][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[C])this.terminals_[B]&&B>V&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`:
2
2
  `+g.showPosition()+`
3
3
  Expecting `+O.join(", ")+", got '"+(this.terminals_[S]||S)+"'":K="Parse error on line "+(N+1)+": Unexpected "+(S==U?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(K,{text:g.match,token:this.terminals_[S]||S,line:g.yylineno,loc:P,expected:O})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+S);switch(I[0]){case 1:c.push(S),y.push(g.yytext),o.push(g.yylloc),c.push(I[1]),S=null,A=g.yyleng,v=g.yytext,N=g.yylineno,P=g.yylloc;break;case 2:if($=this.productions_[I[1]][1],R.$=y[y.length-$],R._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},W&&(R._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),J=this.performAction.apply(R,[v,A,N,b.yy,I[1],y,o].concat(M)),typeof J<"u")return J;$&&(c=c.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),c.push(this.productions_[I[1]][0]),y.push(R.$),o.push(R._$),et=w[c[c.length-2]][c[c.length-1]],c.push(et);break;case 3:return!0}}return!0},"parse")},k=function(){var x={EOF:1,parseError:s(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{b as D,D as Z}from"./index-CDaH3A1m.js";const B=e=>{let n;const o=new Set,t=(c,p)=>{const m=typeof c=="function"?c(n):c;if(!Object.is(m,n)){const g=n;n=p??(typeof m!="object"||m===null)?m:Object.assign({},n,m),o.forEach(h=>h(n,g))}},r=()=>n,i={setState:t,getState:r,getInitialState:()=>l,subscribe:c=>(o.add(c),()=>o.delete(c))},l=n=e(t,r,i);return i},z=e=>e?B(e):B,q=e=>e;function ee(e,n=q){const o=D.useSyncExternalStore(e.subscribe,()=>n(e.getState()),()=>n(e.getInitialState()));return D.useDebugValue(o),o}const N=e=>{const n=z(e),o=t=>ee(n,t);return Object.assign(o,n),o},ne=e=>e?N(e):N;function te(e,n){let o;try{o=e()}catch{return}return{getItem:r=>{var s;const a=l=>l===null?null:JSON.parse(l,void 0),i=(s=o.getItem(r))!=null?s:null;return i instanceof Promise?i.then(a):a(i)},setItem:(r,s)=>o.setItem(r,JSON.stringify(s,void 0)),removeItem:r=>o.removeItem(r)}}const A=e=>n=>{try{const o=e(n);return o instanceof Promise?o:{then(t){return A(t)(o)},catch(t){return this}}}catch(o){return{then(t){return this},catch(t){return A(t)(o)}}}},oe=(e,n)=>(o,t,r)=>{let s={storage:te(()=>localStorage),partialize:u=>u,version:0,merge:(u,S)=>({...S,...u}),...n},a=!1;const i=new Set,l=new Set;let c=s.storage;if(!c)return e((...u)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),o(...u)},t,r);const p=()=>{const u=s.partialize({...t()});return c.setItem(s.name,{state:u,version:s.version})},m=r.setState;r.setState=(u,S)=>{m(u,S),p()};const g=e((...u)=>{o(...u),p()},t,r);r.getInitialState=()=>g;let h;const T=()=>{var u,S;if(!c)return;a=!1,i.forEach(d=>{var f;return d((f=t())!=null?f:g)});const _=((S=s.onRehydrateStorage)==null?void 0:S.call(s,(u=t())!=null?u:g))||void 0;return A(c.getItem.bind(c))(s.name).then(d=>{if(d)if(typeof d.version=="number"&&d.version!==s.version){if(s.migrate){const f=s.migrate(d.state,d.version);return f instanceof Promise?f.then(y=>[!0,y]):[!0,f]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,d.state];return[!1,void 0]}).then(d=>{var f;const[y,J]=d;if(h=s.merge(J,(f=t())!=null?f:g),o(h,!0),y)return p()}).then(()=>{_?.(h,void 0),h=t(),a=!0,l.forEach(d=>d(h))}).catch(d=>{_?.(void 0,d)})};return r.persist={setOptions:u=>{s={...s,...u},u.storage&&(c=u.storage)},clearStorage:()=>{c?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>T(),hasHydrated:()=>a,onHydrate:u=>(i.add(u),()=>{i.delete(u)}),onFinishHydration:u=>(l.add(u),()=>{l.delete(u)})},s.skipHydration||T(),h||g},re=oe,P=260,$=220,j=320,w=56,se=P,ae=1024,G=480,ie=400,ce=560;function V(e){return Math.max(0,Math.min(ce,e-G))}function L(e){return V(e)>=ie?"docked":"overlay"}function le(e,n=P){return L(e-X(n))==="overlay"&&L(e-w)==="docked"}function X(e){return Number.isNaN(e)?P:Math.min(j,Math.max($,e))}function Ge(e,n,o,t=P,r=!1){if(e>=ae){const a=!n&&r&&le(e,t);return{mode:n||a?"strip":"docked",width:n||a?w:X(t),collapsed:n||a,sheetOpen:!1,resizable:!n&&!a}}return{mode:o?"overlay":"strip",width:o?se:w,collapsed:!0,sheetOpen:o,resizable:!1}}function Ve(e){return e.shiftKey||e.altKey||!(e.metaKey||e.ctrlKey)?!1:e.key.toLowerCase()==="b"}const Xe=e=>e?"⌘B":"Ctrl+B",ue=["active","created"],Ke={running:"Running",today:"Today",week:"This week",older:"Older"},de=new Set(["busy","delegating","approval","answer","wedged"]);function K(e){return de.has(e.status?.code??"")}const fe=24*60*60*1e3,he=e=>{const n=new Date(e);return n.setHours(0,0,0,0),n.getTime()};function Q(e,n){const o=n==="created"?e.created_at:e.updated_at;return typeof o!="number"||!Number.isFinite(o)||n==="created"&&o<=0?null:o*1e3}function me(e,n,o){if(K(e))return"running";const t=Q(e,o);if(t===null)return"older";const r=he(n);return t>=r?"today":t>=r-6*fe?"week":"older"}function Qe(e,n,o){const t={running:[],today:[],week:[],older:[]};for(const r of e)t[me(r,n,o)].push(r);return t}function ge(e,n,o){const t=Q(e,o);if(t===null)return"";const r=Math.floor(Math.max(0,n-t)/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 Ye(e,n,o){const t=ge(e,n,o);if(!t)return"";const r=o==="created"?"created":"last active";if(t==="now")return`${r} just now`;const s={m:"minute",h:"hour",d:"day",w:"week",y:"year"},a=Number.parseInt(t,10),i=s[t.slice(-1)];return`${r} ${a} ${i}${a===1?"":"s"} ago`}const E=["pinned","running","today","week","older","agents","teams"],Je={pinned:"Pinned",running:"Running",today:"Today",week:"This week",older:"Older",agents:"Agents",teams:"Teams"};function Ze(e){return e==="agents"||e==="teams"}const ze=8,C={hidden:[],order:[...E],groupBy:"section",basis:"active",orderBy:"active-first",loads:0},pe=10,b=[25,50],Se=50,be=500;function M(e){const n=Math.max(0,Math.floor(e));return n===0?pe:n<=b.length?b[n-1]:b[b.length-1]+(n-b.length)*Se}function qe(e,n){const o=M(e+1)-M(e),t=Math.max(0,Math.min(o,n));return t===1?"Show 1 more chat":`Show ${t} more chats`}function Oe(e){return K(e)}function en(e,n){if(n==="recent")return[...e];const o=[],t=[];for(const r of e)(Oe(r)?o:t).push(r);return[...o,...t]}function nn(e,n){const{limit:o,currentId:t,searching:r=!1}=n;if(r)return{rows:[...e],lifted:!1,remaining:0};const s=e.slice(0,Math.max(0,o)),a=Math.max(0,e.length-s.length);if(!t)return{rows:s,lifted:!1,remaining:a};const i=e.findIndex(l=>l.session_id===t);return i<0||i<s.length?{rows:s,lifted:!1,remaining:a}:{rows:[e[i],...s],lifted:!0,remaining:a}}function tn(e,n){if(n==="section")return null;if(n==="flat")return[{key:"all",label:"",rows:[...e]}];const o=new Map;for(const s of e){const a=s.binding?.team||s.binding?.agent||"",i=a||"ungrouped",l=o.get(i)??{key:i,label:a||"Ungrouped",rows:[]};l.rows.push(s),o.set(i,l)}const t=[...o.values()],r=t.findIndex(s=>s.key==="ungrouped");return r>0&&t.push(...t.splice(r,1)),t}function Ce(e,n){return!e.hidden.includes(n)}function Y(e){return e.order.filter(n=>Ce(e,n))}function on(e,n){const o=e.hidden.includes(n)?e.hidden.filter(t=>t!==n):[...e.hidden,n];return{...e,hidden:o}}function rn(e,n,o){const t=Y(e),r=t.indexOf(n),s=t[r+o];if(r<0||s===void 0)return e;const a=e.order.indexOf(n),i=e.order.indexOf(s),l=[...e.order];return l[a]=s,l[i]=n,{...e,order:l}}const Pe=["running","today","week","older"];function W(e){return Pe.includes(e)}function sn(e,n,o,t){if(!W(n)||t&&!t(n))return!1;const r=Y(e),s=r.indexOf(n);if(s<0)return!1;const a=r[s+o];return a===void 0||!W(a)?!1:t?t(a):!0}const _e=["section","agent","flat"],ye=["active-first","recent"];function an(e){if(typeof e!="object"||e===null)return C;const n=e,o=new Set(E),t=[];if(Array.isArray(n.order))for(const c of n.order)typeof c=="string"&&o.has(c)&&(t.includes(c)||t.push(c));for(const c of E)t.includes(c)||t.push(c);const r=[];if(Array.isArray(n.hidden))for(const c of n.hidden)typeof c=="string"&&o.has(c)&&(r.includes(c)||r.push(c));const s=_e.includes(n.groupBy)?n.groupBy:C.groupBy,a=ue.includes(n.basis)?n.basis:C.basis,i=ye.includes(n.orderBy)?n.orderBy:C.orderBy,l=typeof n.loads=="number"&&Number.isFinite(n.loads)&&n.loads>0?Math.min(be,Math.floor(n.loads)):0;return{hidden:r,order:t,groupBy:s,basis:a,orderBy:i,loads:l}}const Ae="both",k={background:"sunken",foreground:"ink",cursor:"accent",cursorAccent:"surface",selectionBackground:"accent",selectionForeground:"onAccent",black:"inkDim",red:"danger",green:"success",yellow:"warning",blue:"info",magenta:"danger",cyan:"info",white:"ink",brightBlack:"inkMuted",brightRed:"danger",brightGreen:"success",brightYellow:"warning",brightBlue:"info",brightMagenta:"danger",brightCyan:"info",brightWhite:"ink"},we=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cn=(e=document.documentElement)=>{const n=getComputedStyle(e),o={};for(const t of Object.keys(k)){const r=Ie(n,k[t]);r&&(o[t]=r)}return Object.keys(o).length===0&&ve(e),o},ln=(e,n=document.documentElement)=>{if(e==null)return;n.dataset.theme=e,n.classList.toggle("dark",e.toLowerCase().includes("light")===!1),Ee(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`)},Ee=(e,n)=>typeof getComputedStyle!="function"?"":getComputedStyle(e).getPropertyValue(n).trim(),H=new Set,ve=e=>{const n=e.dataset.theme??"(none)";H.has(n)||(H.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`))},Re=13,Ie=(e,n)=>{const o=we(n),t=e.getPropertyValue(`--color-${o}`).trim();if(U(t))return t;const r=e.getPropertyValue(`--lo-${o}`).trim();return U(r)?r:""},Te=/^#[0-9a-fA-F]{3,8}$/,De=/^(rgb|rgba|hsl|hsla|color)\(/,U=e=>Te.test(e)||De.test(e),Be=(e=document.documentElement)=>typeof document>"u"||typeof getComputedStyle!="function"?"monospace":getComputedStyle(e).getPropertyValue("--font-mono").trim()||"monospace",Ne=(e,n=Re,o=typeof window>"u"?1:window.devicePixelRatio||1)=>{let t=n*.6,r=n*1.2;if(typeof document>"u")return{cellWidth:t,cellHeight:r};const s=e??Be(),i=document.createElement("canvas").getContext("2d");if(!i)return{cellWidth:t,cellHeight:r};i.font=`${n}px ${s}`;const l=i.measureText("W");Number.isFinite(l.width)&&l.width>0&&(t=l.width);const c=l.fontBoundingBoxAscent+l.fontBoundingBoxDescent;return Number.isFinite(c)&&c>0&&(r=Le(c,o)),{cellWidth:t,cellHeight:r}},Le=(e,n)=>Math.ceil(e*n)/n,O=e=>({isRunPanelOpen:e==="isRunPanelOpen",isCanvasOpen:e==="isCanvasOpen",isBrowserPaneOpen:e==="isBrowserPaneOpen",isConsolePaneOpen:e==="isConsolePaneOpen"});function un(e,n){const o=n.isCanvasOpen?"canvas":n.isRunPanelOpen?"run":n.isBrowserPaneOpen?"browser":n.isConsolePaneOpen?"console":null;if(o===null)return 0;let t;switch(o){case"canvas":t=n.canvasWidth||Me;break;case"run":t=n.runPanelWidth||v;break;case"browser":t=n.browserPanelWidth||R;break;case"console":t=n.consolePanelWidth||I;break}return e<=0?t:o==="canvas"?Math.min(t,V(e)):Math.min(t,Math.max(0,e-G))}const x=800,Me=450,F=P,v=420,We=20,R=640,ke=100,He=16,Ue=()=>Math.ceil(ke*Ne().cellWidth)+He,I=Ue(),xe=5e3,dn=(e,n)=>e.some(o=>o.surface===n),fn=(e,n=Date.now())=>e.some(o=>n-o.at<xe),Fe=[],hn=ne()(re(e=>({isCommandPaletteOpen:!1,commandPaletteQuery:"",isSidebarCollapsed:!1,showAgentReasoning:!1,themeName:Z,canvasWidth:x,chatSidebarWidth:F,chatSidebarRegions:Ae,chatSidebarView:C,chatSidebarListHeight:null,chatSidebarOrder:"entities-first",dismissedBuiltinOfferSignature:"",isCanvasOpen:!1,isRunPanelOpen:!1,isBrowserPaneOpen:!1,isConsolePaneOpen:!1,consoleOpenIntent:null,runPanelReveal:null,runPanelWidth:v,browserPanelWidth:R,browserPaneScope:"conversation",consolePanelWidth:I,consoleActiveSurface:null,consoleUnseen:Fe,isCreateAgentDialogOpen:!1,mentionRecents:null,openCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!0})},closeCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!1})},openCommandPalette:()=>{e({isCommandPaletteOpen:!0})},closeCommandPalette:()=>{e({isCommandPaletteOpen:!1,commandPaletteQuery:""})},toggleCommandPalette:()=>{e(n=>({isCommandPaletteOpen:!n.isCommandPaletteOpen,commandPaletteQuery:n.isCommandPaletteOpen?n.commandPaletteQuery:""}))},setCommandPaletteQuery:n=>{e({commandPaletteQuery:n})},toggleSidebar:()=>{e(n=>({isSidebarCollapsed:!n.isSidebarCollapsed}))},setSidebarCollapsed:n=>{e({isSidebarCollapsed:n})},setShowAgentReasoning:n=>{e({showAgentReasoning:n})},setTheme:n=>{e({themeName:n})},setCanvasOpen:n=>{e(n?O("isCanvasOpen"):{isCanvasOpen:!1})},setRunPanelOpen:n=>{e(n?O("isRunPanelOpen"):{isRunPanelOpen:!1})},setBrowserPaneOpen:n=>{e(n?O("isBrowserPaneOpen"):{isBrowserPaneOpen:!1})},setConsolePaneOpen:n=>{e(n?O("isConsolePaneOpen"):{isConsolePaneOpen:!1})},setConsolePanelWidth:n=>{e({consolePanelWidth:n})},restoreDefaultConsolePanelWidth:()=>{e({consolePanelWidth:I})},setConsoleActiveSurface:n=>{e({consoleActiveSurface:n})},requestConsoleOpen:n=>{e({consoleOpenIntent:n})},clearConsoleOpenIntent:n=>{e(o=>o.consoleOpenIntent===n?{consoleOpenIntent:null}:{})},markConsoleUnseen:(n,o)=>{e(t=>t.consoleUnseen.some(r=>r.surface===o)?{}:{consoleUnseen:[...t.consoleUnseen,{sessionId:n,surface:o,at:Date.now()}]})},clearConsoleUnseen:n=>{const o=Array.isArray(n)?n:[n];e(t=>{const r=t.consoleUnseen.filter(s=>!o.includes(s.surface));return r.length===t.consoleUnseen.length?{}:{consoleUnseen:r}})},setBrowserPanelWidth:n=>{e({browserPanelWidth:n})},restoreDefaultBrowserPanelWidth:()=>{e({browserPanelWidth:R})},setBrowserPaneScope:n=>{e({browserPaneScope:n})},revealRunPanelSection:n=>{e(o=>({...O("isRunPanelOpen"),runPanelReveal:{section:n,nonce:(o.runPanelReveal?.nonce??0)+1}}))},clearRunPanelReveal:n=>{e(o=>o.runPanelReveal?.nonce===n?{runPanelReveal:null}:{})},setRunPanelWidth:n=>{e({runPanelWidth:n})},restoreDefaultRunPanelWidth:()=>{e({runPanelWidth:v})},setCanvasWidth:n=>{e({canvasWidth:n})},setChatSidebarWidth:n=>{e({chatSidebarWidth:Math.min(j,Math.max($,n))})},setChatSidebarRegions:n=>{e({chatSidebarRegions:n})},setChatSidebarListHeight:n=>{e({chatSidebarListHeight:n})},restoreDefaultChatSidebarListHeight:()=>{e({chatSidebarListHeight:null})},setChatSidebarOrder:n=>{e({chatSidebarOrder:n})},setChatSidebarView:n=>{e({chatSidebarView:n})},dismissBuiltinOffer:n=>{e({dismissedBuiltinOfferSignature:n})},restoreDefaultCanvasWidth:()=>{e({canvasWidth:x})},restoreDefaultChatSidebarWidth:()=>{e({chatSidebarWidth:F})},rememberMention:(n,o)=>{e(t=>{const r=t.mentionRecents,s=r?.cwd===n?r.paths:[],a=[o,...s.filter(i=>i!==o)].slice(0,We);return{mentionRecents:{cwd:n,paths:a}}})}}),{name:"ui-preferences-storage",partialize:$e}));function $e(e){const{runPanelReveal:n,consoleOpenIntent:o,...t}=e;return t}export{en as A,Qe as B,xe as C,C as D,Y as E,tn as F,qe as G,ze as H,ge as I,K as J,Ye as K,Ke as L,v as M,R as N,I as O,L as P,G as Q,ae as S,Re as T,ln as a,Ge as b,ne as c,w as d,un as e,j as f,$ as g,fn as h,Ve as i,dn as j,Ce as k,W as l,Ne as m,Ze as n,Je as o,re as p,on as q,cn as r,Xe as s,Be as t,hn as u,rn as v,sn as w,an as x,nn as y,M as z};
1
+ import{b as D,D as Z}from"./index-VKe88JN9.js";const B=e=>{let n;const o=new Set,t=(c,p)=>{const m=typeof c=="function"?c(n):c;if(!Object.is(m,n)){const g=n;n=p??(typeof m!="object"||m===null)?m:Object.assign({},n,m),o.forEach(h=>h(n,g))}},r=()=>n,i={setState:t,getState:r,getInitialState:()=>l,subscribe:c=>(o.add(c),()=>o.delete(c))},l=n=e(t,r,i);return i},z=e=>e?B(e):B,q=e=>e;function ee(e,n=q){const o=D.useSyncExternalStore(e.subscribe,()=>n(e.getState()),()=>n(e.getInitialState()));return D.useDebugValue(o),o}const N=e=>{const n=z(e),o=t=>ee(n,t);return Object.assign(o,n),o},ne=e=>e?N(e):N;function te(e,n){let o;try{o=e()}catch{return}return{getItem:r=>{var s;const a=l=>l===null?null:JSON.parse(l,void 0),i=(s=o.getItem(r))!=null?s:null;return i instanceof Promise?i.then(a):a(i)},setItem:(r,s)=>o.setItem(r,JSON.stringify(s,void 0)),removeItem:r=>o.removeItem(r)}}const A=e=>n=>{try{const o=e(n);return o instanceof Promise?o:{then(t){return A(t)(o)},catch(t){return this}}}catch(o){return{then(t){return this},catch(t){return A(t)(o)}}}},oe=(e,n)=>(o,t,r)=>{let s={storage:te(()=>localStorage),partialize:u=>u,version:0,merge:(u,S)=>({...S,...u}),...n},a=!1;const i=new Set,l=new Set;let c=s.storage;if(!c)return e((...u)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),o(...u)},t,r);const p=()=>{const u=s.partialize({...t()});return c.setItem(s.name,{state:u,version:s.version})},m=r.setState;r.setState=(u,S)=>{m(u,S),p()};const g=e((...u)=>{o(...u),p()},t,r);r.getInitialState=()=>g;let h;const T=()=>{var u,S;if(!c)return;a=!1,i.forEach(d=>{var f;return d((f=t())!=null?f:g)});const _=((S=s.onRehydrateStorage)==null?void 0:S.call(s,(u=t())!=null?u:g))||void 0;return A(c.getItem.bind(c))(s.name).then(d=>{if(d)if(typeof d.version=="number"&&d.version!==s.version){if(s.migrate){const f=s.migrate(d.state,d.version);return f instanceof Promise?f.then(y=>[!0,y]):[!0,f]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,d.state];return[!1,void 0]}).then(d=>{var f;const[y,J]=d;if(h=s.merge(J,(f=t())!=null?f:g),o(h,!0),y)return p()}).then(()=>{_?.(h,void 0),h=t(),a=!0,l.forEach(d=>d(h))}).catch(d=>{_?.(void 0,d)})};return r.persist={setOptions:u=>{s={...s,...u},u.storage&&(c=u.storage)},clearStorage:()=>{c?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>T(),hasHydrated:()=>a,onHydrate:u=>(i.add(u),()=>{i.delete(u)}),onFinishHydration:u=>(l.add(u),()=>{l.delete(u)})},s.skipHydration||T(),h||g},re=oe,P=260,$=220,j=320,w=56,se=P,ae=1024,G=480,ie=400,ce=560;function V(e){return Math.max(0,Math.min(ce,e-G))}function L(e){return V(e)>=ie?"docked":"overlay"}function le(e,n=P){return L(e-X(n))==="overlay"&&L(e-w)==="docked"}function X(e){return Number.isNaN(e)?P:Math.min(j,Math.max($,e))}function Ge(e,n,o,t=P,r=!1){if(e>=ae){const a=!n&&r&&le(e,t);return{mode:n||a?"strip":"docked",width:n||a?w:X(t),collapsed:n||a,sheetOpen:!1,resizable:!n&&!a}}return{mode:o?"overlay":"strip",width:o?se:w,collapsed:!0,sheetOpen:o,resizable:!1}}function Ve(e){return e.shiftKey||e.altKey||!(e.metaKey||e.ctrlKey)?!1:e.key.toLowerCase()==="b"}const Xe=e=>e?"⌘B":"Ctrl+B",ue=["active","created"],Ke={running:"Running",today:"Today",week:"This week",older:"Older"},de=new Set(["busy","delegating","approval","answer","wedged"]);function K(e){return de.has(e.status?.code??"")}const fe=24*60*60*1e3,he=e=>{const n=new Date(e);return n.setHours(0,0,0,0),n.getTime()};function Q(e,n){const o=n==="created"?e.created_at:e.updated_at;return typeof o!="number"||!Number.isFinite(o)||n==="created"&&o<=0?null:o*1e3}function me(e,n,o){if(K(e))return"running";const t=Q(e,o);if(t===null)return"older";const r=he(n);return t>=r?"today":t>=r-6*fe?"week":"older"}function Qe(e,n,o){const t={running:[],today:[],week:[],older:[]};for(const r of e)t[me(r,n,o)].push(r);return t}function ge(e,n,o){const t=Q(e,o);if(t===null)return"";const r=Math.floor(Math.max(0,n-t)/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 Ye(e,n,o){const t=ge(e,n,o);if(!t)return"";const r=o==="created"?"created":"last active";if(t==="now")return`${r} just now`;const s={m:"minute",h:"hour",d:"day",w:"week",y:"year"},a=Number.parseInt(t,10),i=s[t.slice(-1)];return`${r} ${a} ${i}${a===1?"":"s"} ago`}const E=["pinned","running","today","week","older","agents","teams"],Je={pinned:"Pinned",running:"Running",today:"Today",week:"This week",older:"Older",agents:"Agents",teams:"Teams"};function Ze(e){return e==="agents"||e==="teams"}const ze=8,C={hidden:[],order:[...E],groupBy:"section",basis:"active",orderBy:"active-first",loads:0},pe=10,b=[25,50],Se=50,be=500;function M(e){const n=Math.max(0,Math.floor(e));return n===0?pe:n<=b.length?b[n-1]:b[b.length-1]+(n-b.length)*Se}function qe(e,n){const o=M(e+1)-M(e),t=Math.max(0,Math.min(o,n));return t===1?"Show 1 more chat":`Show ${t} more chats`}function Oe(e){return K(e)}function en(e,n){if(n==="recent")return[...e];const o=[],t=[];for(const r of e)(Oe(r)?o:t).push(r);return[...o,...t]}function nn(e,n){const{limit:o,currentId:t,searching:r=!1}=n;if(r)return{rows:[...e],lifted:!1,remaining:0};const s=e.slice(0,Math.max(0,o)),a=Math.max(0,e.length-s.length);if(!t)return{rows:s,lifted:!1,remaining:a};const i=e.findIndex(l=>l.session_id===t);return i<0||i<s.length?{rows:s,lifted:!1,remaining:a}:{rows:[e[i],...s],lifted:!0,remaining:a}}function tn(e,n){if(n==="section")return null;if(n==="flat")return[{key:"all",label:"",rows:[...e]}];const o=new Map;for(const s of e){const a=s.binding?.team||s.binding?.agent||"",i=a||"ungrouped",l=o.get(i)??{key:i,label:a||"Ungrouped",rows:[]};l.rows.push(s),o.set(i,l)}const t=[...o.values()],r=t.findIndex(s=>s.key==="ungrouped");return r>0&&t.push(...t.splice(r,1)),t}function Ce(e,n){return!e.hidden.includes(n)}function Y(e){return e.order.filter(n=>Ce(e,n))}function on(e,n){const o=e.hidden.includes(n)?e.hidden.filter(t=>t!==n):[...e.hidden,n];return{...e,hidden:o}}function rn(e,n,o){const t=Y(e),r=t.indexOf(n),s=t[r+o];if(r<0||s===void 0)return e;const a=e.order.indexOf(n),i=e.order.indexOf(s),l=[...e.order];return l[a]=s,l[i]=n,{...e,order:l}}const Pe=["running","today","week","older"];function W(e){return Pe.includes(e)}function sn(e,n,o,t){if(!W(n)||t&&!t(n))return!1;const r=Y(e),s=r.indexOf(n);if(s<0)return!1;const a=r[s+o];return a===void 0||!W(a)?!1:t?t(a):!0}const _e=["section","agent","flat"],ye=["active-first","recent"];function an(e){if(typeof e!="object"||e===null)return C;const n=e,o=new Set(E),t=[];if(Array.isArray(n.order))for(const c of n.order)typeof c=="string"&&o.has(c)&&(t.includes(c)||t.push(c));for(const c of E)t.includes(c)||t.push(c);const r=[];if(Array.isArray(n.hidden))for(const c of n.hidden)typeof c=="string"&&o.has(c)&&(r.includes(c)||r.push(c));const s=_e.includes(n.groupBy)?n.groupBy:C.groupBy,a=ue.includes(n.basis)?n.basis:C.basis,i=ye.includes(n.orderBy)?n.orderBy:C.orderBy,l=typeof n.loads=="number"&&Number.isFinite(n.loads)&&n.loads>0?Math.min(be,Math.floor(n.loads)):0;return{hidden:r,order:t,groupBy:s,basis:a,orderBy:i,loads:l}}const Ae="both",k={background:"sunken",foreground:"ink",cursor:"accent",cursorAccent:"surface",selectionBackground:"accent",selectionForeground:"onAccent",black:"inkDim",red:"danger",green:"success",yellow:"warning",blue:"info",magenta:"danger",cyan:"info",white:"ink",brightBlack:"inkMuted",brightRed:"danger",brightGreen:"success",brightYellow:"warning",brightBlue:"info",brightMagenta:"danger",brightCyan:"info",brightWhite:"ink"},we=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cn=(e=document.documentElement)=>{const n=getComputedStyle(e),o={};for(const t of Object.keys(k)){const r=Ie(n,k[t]);r&&(o[t]=r)}return Object.keys(o).length===0&&ve(e),o},ln=(e,n=document.documentElement)=>{if(e==null)return;n.dataset.theme=e,n.classList.toggle("dark",e.toLowerCase().includes("light")===!1),Ee(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`)},Ee=(e,n)=>typeof getComputedStyle!="function"?"":getComputedStyle(e).getPropertyValue(n).trim(),H=new Set,ve=e=>{const n=e.dataset.theme??"(none)";H.has(n)||(H.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`))},Re=13,Ie=(e,n)=>{const o=we(n),t=e.getPropertyValue(`--color-${o}`).trim();if(U(t))return t;const r=e.getPropertyValue(`--lo-${o}`).trim();return U(r)?r:""},Te=/^#[0-9a-fA-F]{3,8}$/,De=/^(rgb|rgba|hsl|hsla|color)\(/,U=e=>Te.test(e)||De.test(e),Be=(e=document.documentElement)=>typeof document>"u"||typeof getComputedStyle!="function"?"monospace":getComputedStyle(e).getPropertyValue("--font-mono").trim()||"monospace",Ne=(e,n=Re,o=typeof window>"u"?1:window.devicePixelRatio||1)=>{let t=n*.6,r=n*1.2;if(typeof document>"u")return{cellWidth:t,cellHeight:r};const s=e??Be(),i=document.createElement("canvas").getContext("2d");if(!i)return{cellWidth:t,cellHeight:r};i.font=`${n}px ${s}`;const l=i.measureText("W");Number.isFinite(l.width)&&l.width>0&&(t=l.width);const c=l.fontBoundingBoxAscent+l.fontBoundingBoxDescent;return Number.isFinite(c)&&c>0&&(r=Le(c,o)),{cellWidth:t,cellHeight:r}},Le=(e,n)=>Math.ceil(e*n)/n,O=e=>({isRunPanelOpen:e==="isRunPanelOpen",isCanvasOpen:e==="isCanvasOpen",isBrowserPaneOpen:e==="isBrowserPaneOpen",isConsolePaneOpen:e==="isConsolePaneOpen"});function un(e,n){const o=n.isCanvasOpen?"canvas":n.isRunPanelOpen?"run":n.isBrowserPaneOpen?"browser":n.isConsolePaneOpen?"console":null;if(o===null)return 0;let t;switch(o){case"canvas":t=n.canvasWidth||Me;break;case"run":t=n.runPanelWidth||v;break;case"browser":t=n.browserPanelWidth||R;break;case"console":t=n.consolePanelWidth||I;break}return e<=0?t:o==="canvas"?Math.min(t,V(e)):Math.min(t,Math.max(0,e-G))}const x=800,Me=450,F=P,v=420,We=20,R=640,ke=100,He=16,Ue=()=>Math.ceil(ke*Ne().cellWidth)+He,I=Ue(),xe=5e3,dn=(e,n)=>e.some(o=>o.surface===n),fn=(e,n=Date.now())=>e.some(o=>n-o.at<xe),Fe=[],hn=ne()(re(e=>({isCommandPaletteOpen:!1,commandPaletteQuery:"",isSidebarCollapsed:!1,showAgentReasoning:!1,themeName:Z,canvasWidth:x,chatSidebarWidth:F,chatSidebarRegions:Ae,chatSidebarView:C,chatSidebarListHeight:null,chatSidebarOrder:"entities-first",dismissedBuiltinOfferSignature:"",isCanvasOpen:!1,isRunPanelOpen:!1,isBrowserPaneOpen:!1,isConsolePaneOpen:!1,consoleOpenIntent:null,runPanelReveal:null,runPanelWidth:v,browserPanelWidth:R,browserPaneScope:"conversation",consolePanelWidth:I,consoleActiveSurface:null,consoleUnseen:Fe,isCreateAgentDialogOpen:!1,mentionRecents:null,openCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!0})},closeCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!1})},openCommandPalette:()=>{e({isCommandPaletteOpen:!0})},closeCommandPalette:()=>{e({isCommandPaletteOpen:!1,commandPaletteQuery:""})},toggleCommandPalette:()=>{e(n=>({isCommandPaletteOpen:!n.isCommandPaletteOpen,commandPaletteQuery:n.isCommandPaletteOpen?n.commandPaletteQuery:""}))},setCommandPaletteQuery:n=>{e({commandPaletteQuery:n})},toggleSidebar:()=>{e(n=>({isSidebarCollapsed:!n.isSidebarCollapsed}))},setSidebarCollapsed:n=>{e({isSidebarCollapsed:n})},setShowAgentReasoning:n=>{e({showAgentReasoning:n})},setTheme:n=>{e({themeName:n})},setCanvasOpen:n=>{e(n?O("isCanvasOpen"):{isCanvasOpen:!1})},setRunPanelOpen:n=>{e(n?O("isRunPanelOpen"):{isRunPanelOpen:!1})},setBrowserPaneOpen:n=>{e(n?O("isBrowserPaneOpen"):{isBrowserPaneOpen:!1})},setConsolePaneOpen:n=>{e(n?O("isConsolePaneOpen"):{isConsolePaneOpen:!1})},setConsolePanelWidth:n=>{e({consolePanelWidth:n})},restoreDefaultConsolePanelWidth:()=>{e({consolePanelWidth:I})},setConsoleActiveSurface:n=>{e({consoleActiveSurface:n})},requestConsoleOpen:n=>{e({consoleOpenIntent:n})},clearConsoleOpenIntent:n=>{e(o=>o.consoleOpenIntent===n?{consoleOpenIntent:null}:{})},markConsoleUnseen:(n,o)=>{e(t=>t.consoleUnseen.some(r=>r.surface===o)?{}:{consoleUnseen:[...t.consoleUnseen,{sessionId:n,surface:o,at:Date.now()}]})},clearConsoleUnseen:n=>{const o=Array.isArray(n)?n:[n];e(t=>{const r=t.consoleUnseen.filter(s=>!o.includes(s.surface));return r.length===t.consoleUnseen.length?{}:{consoleUnseen:r}})},setBrowserPanelWidth:n=>{e({browserPanelWidth:n})},restoreDefaultBrowserPanelWidth:()=>{e({browserPanelWidth:R})},setBrowserPaneScope:n=>{e({browserPaneScope:n})},revealRunPanelSection:n=>{e(o=>({...O("isRunPanelOpen"),runPanelReveal:{section:n,nonce:(o.runPanelReveal?.nonce??0)+1}}))},clearRunPanelReveal:n=>{e(o=>o.runPanelReveal?.nonce===n?{runPanelReveal:null}:{})},setRunPanelWidth:n=>{e({runPanelWidth:n})},restoreDefaultRunPanelWidth:()=>{e({runPanelWidth:v})},setCanvasWidth:n=>{e({canvasWidth:n})},setChatSidebarWidth:n=>{e({chatSidebarWidth:Math.min(j,Math.max($,n))})},setChatSidebarRegions:n=>{e({chatSidebarRegions:n})},setChatSidebarListHeight:n=>{e({chatSidebarListHeight:n})},restoreDefaultChatSidebarListHeight:()=>{e({chatSidebarListHeight:null})},setChatSidebarOrder:n=>{e({chatSidebarOrder:n})},setChatSidebarView:n=>{e({chatSidebarView:n})},dismissBuiltinOffer:n=>{e({dismissedBuiltinOfferSignature:n})},restoreDefaultCanvasWidth:()=>{e({canvasWidth:x})},restoreDefaultChatSidebarWidth:()=>{e({chatSidebarWidth:F})},rememberMention:(n,o)=>{e(t=>{const r=t.mentionRecents,s=r?.cwd===n?r.paths:[],a=[o,...s.filter(i=>i!==o)].slice(0,We);return{mentionRecents:{cwd:n,paths:a}}})}}),{name:"ui-preferences-storage",partialize:$e}));function $e(e){const{runPanelReveal:n,consoleOpenIntent:o,...t}=e;return t}export{en as A,Qe as B,xe as C,C as D,Y as E,tn as F,qe as G,ze as H,ge as I,K as J,Ye as K,Ke as L,v as M,R as N,I as O,L as P,G as Q,ae as S,Re as T,ln as a,Ge as b,ne as c,w as d,un as e,j as f,$ as g,fn as h,Ve as i,dn as j,Ce as k,W as l,Ne as m,Ze as n,Je as o,re as p,on as q,cn as r,Xe as s,Be as t,hn as u,rn as v,sn as w,an as x,nn as y,M as z};
@@ -1,4 +1,4 @@
1
- import{c as l,F as T}from"./textarea-B83uQCj2.js";import{t as j,c as R,n as K,a as _,g as Q,e as U,h as z,i as N,j as S,f as v}from"./en-US-BkS8Ixxl.js";import{j as r,c as g,r as V}from"./index-CDaH3A1m.js";import{bl as q,bm as B,U as O,bn as P,bo as Y,a9 as k,aa as w,e as Z,ab as D,aW as W,bp as I,aX as G}from"./index-BDPyvriR.js";import{B as X}from"./book-open-Bau36KjM.js";import{j as J,k as ee,m as te,n as ae,o as ne,q as se,r as oe}from"./use-memberships-query-C2Yus1QJ.js";import{b as ie,a as b,i as C}from"./renderer-platform-RsXXlY5x.js";/**
1
+ import{c as l,F as T}from"./textarea-BX6EeK34.js";import{t as j,c as R,n as K,a as _,g as Q,e as U,h as z,i as N,j as S,f as v}from"./en-US-BkS8Ixxl.js";import{j as r,c as g,r as V}from"./index-VKe88JN9.js";import{bm as $,bn as B,U as O,bo as P,bp as Y,a9 as k,aa as w,e as Z,ab as D,aW as W,bq as I,aX as G}from"./index-BhRzR-VW.js";import{B as X}from"./book-open-BWKY7M9P.js";import{j as J,k as ee,m as te,n as ae,o as ne,q as se,r as oe}from"./use-memberships-query-CSOmeH29.js";import{b as ie,a as b,i as C}from"./aida-control-DVTI-DZP.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,F as T}from"./textarea-B83uQCj2.js";import{t as j,c as R,n as K,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,F=_(m)-_(h),y=(x-F)/v,H=o?.unit;let u;if(f<1?u="second":f<60?u="minute":f<z?u="hour":y<N?u="day":y<S?u="month":u="year",u==="second"){const c=d(x/1e3);return n.formatDistance("xSeconds",c,i)}else if(u==="minute"){const c=d(f);return n.formatDistance("xMinutes",c,i)}else if(u==="hour"){const c=d(f/60);return n.formatDistance("xHours",c,i)}else if(u==="day"){const c=d(y/z);return n.formatDistance("xDays",c,i)}else if(u==="month"){const c=d(y/N);return c===12&&H!=="month"?n.formatDistance("xYears",1,i):n.formatDistance("xMonths",c,i)}else{const c=d(y/S);return n.formatDistance("xYears",c,i)}}function Ve(e,t){return qe(e,Ce(e),t)}const L={investment:{icon:r.jsx(ce,{size:14,"aria-hidden":"true"}),label:"Investment"},accounting:{icon:r.jsx(X,{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(Y,{size:14,"aria-hidden":"true"}),label:"Software"},security:{icon:r.jsx(P,{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(B,{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(T,{variant:"neutral",className:g("gap-1",t),"data-testid":"agent-org-badge",title:e?`Shared with ${e}, not the public hub`:"Shared with an organization, not the public hub",children:[r.jsx(O,{"aria-hidden":"true"}),e??"Organization"]}),M={all:["agent-statuses"],page:e=>[...M.all,"page",[...e]]},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=ie({queryKey:M.page(n),queryFn:async()=>(await J(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,E=(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:ee.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})},We=()=>{const e=b(),{isAuthenticated:t}=k();return w({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 te(a),{favourited:!1,changed:!0}):{favourited:!0,changed:(await ae(a)).result?.already_favourited!==!0}},onSuccess:({favourited:a,changed:n},s)=>{E(e,s.agentId,{favourited:a}),n&&A(e,{agentId:s.agentId,field:"favourite_count",delta:a?1:-1})}})},Ge=()=>{const e=b(),{isAuthenticated:t}=k();return w({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 ne(a),{liked:!1,changed:!0}):{liked:!0,changed:(await se(a)).result?.already_liked!==!0}},onSuccess:({liked:a,changed:n},s)=>{E(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=b(),t=Z();return w({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?oe(i,Le(e,s.id)):null;h?D(`Downloaded "${i}" — you already have an agent called "${h}".`):m?W(`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,Ge as a,We as b,Xe as c,Oe as d,Ve as f,Ze as i,Ye as u};
61
+ */const Se=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],ve=l("shopping-cart",Se);function De(e,t){const o=+j(e)-+j(t);return o<0?-1:o>0?1:o}function Ce(e){return R(e,Date.now())}function qe(e){return t=>{const a=(e?Math[e]:Math.trunc)(t);return a===0?0:a}}function $e(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=qe("round"),x=m.getTime()-h.getTime(),f=x/v,F=_(m)-_(h),y=(x-F)/v,H=o?.unit;let u;if(f<1?u="second":f<60?u="minute":f<z?u="hour":y<N?u="day":y<S?u="month":u="year",u==="second"){const c=d(x/1e3);return n.formatDistance("xSeconds",c,i)}else if(u==="minute"){const c=d(f);return n.formatDistance("xMinutes",c,i)}else if(u==="hour"){const c=d(f/60);return n.formatDistance("xHours",c,i)}else if(u==="day"){const c=d(y/z);return n.formatDistance("xDays",c,i)}else if(u==="month"){const c=d(y/N);return c===12&&H!=="month"?n.formatDistance("xYears",1,i):n.formatDistance("xMonths",c,i)}else{const c=d(y/S);return n.formatDistance("xYears",c,i)}}function Ve(e,t){return $e(e,Ce(e),t)}const L={investment:{icon:r.jsx(ce,{size:14,"aria-hidden":"true"}),label:"Investment"},accounting:{icon:r.jsx(X,{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(Y,{size:14,"aria-hidden":"true"}),label:"Software"},security:{icon:r.jsx(P,{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(B,{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($,{size:14,"aria-hidden":"true"}),label:p(e)},q="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(q,"gap-1 font-medium text-ink-muted"),children:[i.icon,i.label]},s)}),n.map(s=>r.jsxs("span",{className:g(q,"gap-1 font-normal text-ink-dim"),children:[r.jsx($,{size:12,"aria-hidden":"true"}),p(s)]},s))]})},Pe=({orgName:e,className:t})=>r.jsxs(T,{variant:"neutral",className:g("gap-1",t),"data-testid":"agent-org-badge",title:e?`Shared with ${e}, not the public hub`:"Shared with an organization, not the public hub",children:[r.jsx(O,{"aria-hidden":"true"}),e??"Organization"]}),M={all:["agent-statuses"],page:e=>[...M.all,"page",[...e]]},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=ie({queryKey:M.page(n),queryFn:async()=>(await J(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,E=(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:ee.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})},We=()=>{const e=b(),{isAuthenticated:t}=k();return w({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 te(a),{favourited:!1,changed:!0}):{favourited:!0,changed:(await ae(a)).result?.already_favourited!==!0}},onSuccess:({favourited:a,changed:n},s)=>{E(e,s.agentId,{favourited:a}),n&&A(e,{agentId:s.agentId,field:"favourite_count",delta:a?1:-1})}})},Ge=()=>{const e=b(),{isAuthenticated:t}=k();return w({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 ne(a),{liked:!1,changed:!0}):{liked:!0,changed:(await se(a)).result?.already_liked!==!0}},onSuccess:({liked:a,changed:n},s)=>{E(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=b(),t=Z();return w({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?oe(i,Le(e,s.id)):null;h?D(`Downloaded "${i}" — you already have an agent called "${h}".`):m?W(`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,Ge as a,We as b,Xe as c,Oe as d,Ve as f,Ze as i,Ye as u};
@@ -0,0 +1 @@
1
+ import{y as v,z as A,B as h,P as $,b as _,C as w,E as I,F as R,G as q,H as L}from"./aida-control-DVTI-DZP.js";import{a5 as P,a6 as N,a7 as S,a8 as r,a9 as k}from"./index-BhRzR-VW.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&&S(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 ${$} 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 J(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))||N(e)},x=(e,n)=>{const t=n.trim()?`"${n.trim()}"`:"That agent";if(P(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,""),A(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}`},D="The action did not complete.",V=(e,n,t)=>e==="download"?x(n,t):v(D,n),ee={"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 ne(e){return r({operation:"agents.get",agentId:e})}async function te(e){return r({operation:"agents.delete",agentId:e,requestId:c(),confirmed:!0})}async function ae(e){return r({operation:"agents.like",agentId:e,requestId:c()})}async function oe(e){return r({operation:"agents.unlike",agentId:e,requestId:c(),confirmed:!0})}async function se(e){return r({operation:"agents.favourite",agentId:e,requestId:c()})}async function ie(e){return r({operation:"agents.unfavourite",agentId:e,requestId:c(),confirmed:!0})}async function re(e,n){return r({operation:"comments.create",agentId:e,payload:n,requestId:c()})}async function ue(e,n=1,t=20){return r({operation:"comments.list",agentId:e,query:{page:n,per_page:t}})}async function le(e,n,t){return r({operation:"comments.update",agentId:e,commentId:n,payload:t,requestId:c()})}async function ce(e,n){return r({operation:"comments.delete",agentId:e,commentId:n,requestId:c(),confirmed:!0})}async function de(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 he(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,ge=e=>e.invalidateQueries({queryKey:b.all}),me=(e,n)=>e.invalidateQueries({queryKey:n?[...m.all,"list",n]:m.all}),be=({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 pe(e){const n=[],t=(a,o)=>{o&&n.push({field:a,message:`${H[a]} ${o}.`})};return t("name",I(e.name)),t("description",R(e.description)),e.instructions!==null&&t("instructions",q(e.instructions)),t("tools",L(e.tools??[])),n}function ye(e,n){const t=h(e);return n.some(a=>h(a)===t)}function fe(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 _e(e,n){const t=h(e);return n.find(a=>h(a)===t)??null}const G={all:["memberships"]},we=({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{ee as P,te as a,we as b,re as c,ce as d,V as e,he as f,ne as g,be as h,ge as i,de as j,b as k,ue as l,ie as m,se as n,oe as o,J as p,ae as q,_e as r,me as s,ye as t,le as u,pe as v,fe 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 ri,z as hi,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-BrRc254F.js";import{y as kt,x as Tt,z as Rt}from"./index-BDPyvriR.js";import"./index-CDaH3A1m.js";import"./renderer-platform-RsXXlY5x.js";import"./ui-preferences-store-DzXZGWGz.js";import"./textarea-B83uQCj2.js";import"./error-boundary-BFYdHP26.js";import"./console-mirror-CUQyeXIE.js";var at=function(){var t=n(function(B,r,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=r);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],m=[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],h=[1,36],D=[1,37],N=[1,43],yt=[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(r,l,c,u,y,a,X){var x=a.length-1;switch(y){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(m,[2,34]),t(m,[2,35]),t(m,[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(m,[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:h,50:D},{11:39,13:38,24:N,27:yt,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:h,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:h,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:h,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:h,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:h,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:yt}),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:h,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:h,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(r,l){if(l.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=l,c}},"parseError"),parse:n(function(r){var l=this,c=[0],u=[],y=[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(r,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,y.length=y.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(G+1)+`:
1
+ import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as ri,z as hi,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-Dol6F2oY.js";import{A as kt,z as Tt,C as Rt}from"./index-BhRzR-VW.js";import"./index-VKe88JN9.js";import"./aida-control-DVTI-DZP.js";import"./ui-preferences-store-DjUQd2R7.js";import"./textarea-BX6EeK34.js";import"./error-boundary-DVk48CIF.js";import"./console-mirror-CG9RcMIb.js";var at=function(){var t=n(function(B,r,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=r);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],m=[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],h=[1,36],D=[1,37],N=[1,43],yt=[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(r,l,c,u,y,a,X){var x=a.length-1;switch(y){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(m,[2,34]),t(m,[2,35]),t(m,[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(m,[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:h,50:D},{11:39,13:38,24:N,27:yt,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:h,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:h,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:h,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:h,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:h,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:yt}),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:h,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:h,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(r,l){if(l.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=l,c}},"parseError"),parse:n(function(r){var l=this,c=[0],u=[],y=[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(r,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,y.length=y.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),y.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.$=y[y.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],y,a].concat(Zt)),typeof st<"u")return st;M&&(c=c.slice(0,-1*M*2),y=y.slice(0,-1*M),a=a.slice(0,-1*M)),c.push(this.productions_[v[1]][0]),y.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(r,l){return this.yy=l||this.yy||{},this._input=r,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 r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.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),r},"input"),unput:n(function(r){var l=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+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 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===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=[y[0],y[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(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
@@ -6,11 +6,11 @@
6
6
  <title>Local Operator Console Capture</title>
7
7
  <meta http-equiv="Content-Security-Policy"
8
8
  content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
9
- <script type="module" crossorigin src="./assets/consoleCapture-emgU7WyW.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-CDaH3A1m.js">
11
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-DzXZGWGz.js">
12
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-CUQyeXIE.js">
13
- <link rel="stylesheet" crossorigin href="./assets/index-DITdBETY.css">
9
+ <script type="module" crossorigin src="./assets/consoleCapture-CpTo2RAv.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-VKe88JN9.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-DjUQd2R7.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-CG9RcMIb.js">
13
+ <link rel="stylesheet" crossorigin href="./assets/index-FjyWTJXV.css">
14
14
  <link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
15
15
  </head>
16
16
 
@@ -31,14 +31,14 @@
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-BDPyvriR.js"></script>
35
- <link rel="modulepreload" crossorigin href="./assets/index-CDaH3A1m.js">
36
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-DzXZGWGz.js">
37
- <link rel="modulepreload" crossorigin href="./assets/textarea-B83uQCj2.js">
38
- <link rel="modulepreload" crossorigin href="./assets/renderer-platform-RsXXlY5x.js">
39
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BFYdHP26.js">
40
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-CUQyeXIE.js">
41
- <link rel="stylesheet" crossorigin href="./assets/index-DITdBETY.css">
34
+ <script type="module" crossorigin src="./assets/index-BhRzR-VW.js"></script>
35
+ <link rel="modulepreload" crossorigin href="./assets/index-VKe88JN9.js">
36
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-DjUQd2R7.js">
37
+ <link rel="modulepreload" crossorigin href="./assets/textarea-BX6EeK34.js">
38
+ <link rel="modulepreload" crossorigin href="./assets/aida-control-DVTI-DZP.js">
39
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-DVk48CIF.js">
40
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-CG9RcMIb.js">
41
+ <link rel="stylesheet" crossorigin href="./assets/index-FjyWTJXV.css">
42
42
  <link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
43
43
  <link rel="stylesheet" crossorigin href="./assets/index-CSPo12AE.css">
44
44
  </head>
@@ -8,11 +8,11 @@
8
8
  <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
9
9
  <meta http-equiv="Content-Security-Policy"
10
10
  content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:" />
11
- <script type="module" crossorigin src="./assets/installer-DfFRjYBs.js"></script>
12
- <link rel="modulepreload" crossorigin href="./assets/index-CDaH3A1m.js">
13
- <link rel="modulepreload" crossorigin href="./assets/textarea-B83uQCj2.js">
14
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-BFYdHP26.js">
15
- <link rel="stylesheet" crossorigin href="./assets/index-DITdBETY.css">
11
+ <script type="module" crossorigin src="./assets/installer-BgW1Tkr8.js"></script>
12
+ <link rel="modulepreload" crossorigin href="./assets/index-VKe88JN9.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/textarea-BX6EeK34.js">
14
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-DVk48CIF.js">
15
+ <link rel="stylesheet" crossorigin href="./assets/index-FjyWTJXV.css">
16
16
  </head>
17
17
 
18
18
  <body>
@@ -6,12 +6,12 @@
6
6
  <title>Local Operator Quick Send</title>
7
7
  <meta http-equiv="Content-Security-Policy"
8
8
  content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
9
- <script type="module" crossorigin src="./assets/mini-CbmMlUkq.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-CDaH3A1m.js">
11
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-DzXZGWGz.js">
12
- <link rel="modulepreload" crossorigin href="./assets/textarea-B83uQCj2.js">
13
- <link rel="modulepreload" crossorigin href="./assets/renderer-platform-RsXXlY5x.js">
14
- <link rel="stylesheet" crossorigin href="./assets/index-DITdBETY.css">
9
+ <script type="module" crossorigin src="./assets/mini-D1QQjR0V.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-VKe88JN9.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-DjUQd2R7.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/textarea-BX6EeK34.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/aida-control-DVTI-DZP.js">
14
+ <link rel="stylesheet" crossorigin href="./assets/index-FjyWTJXV.css">
15
15
  </head>
16
16
 
17
17
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-operator-ui",
3
- "version": "0.31.18",
3
+ "version": "0.31.20",
4
4
  "productName": "Local Operator",
5
5
  "description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
6
6
  "main": "./out/main/index.js",
@@ -76,7 +76,7 @@
76
76
  "check-types": "pnpm run check-types:main && pnpm run check-types:renderer",
77
77
  "check-changed": "node scripts/ci-scope.mjs --since \"$(git merge-base origin/main HEAD)\" --run",
78
78
  "test:session-cookies": "node scripts/session-cookie-electron.test.mjs",
79
- "test:desktop": "node scripts/run-desktop-tests.mjs scripts/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-paging-hook.test.mjs scripts/seed-placement.test.mjs scripts/seed-label-gap.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.test.mjs scripts/backend-error-surfaces.test.mjs scripts/canonical-chat.test.mjs scripts/stale-caption.test.mjs scripts/desktop-watch-lease.test.mjs scripts/session-switch.test.mjs scripts/chat-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/notification-lifetime.test.mjs scripts/launch-session.test.mjs scripts/desktop-feed.test.mjs scripts/session-status-feed.test.mjs scripts/viewer-record.test.mjs scripts/desktop-stream.test.mjs scripts/python-bytecode-cache.test.mjs scripts/preload-updater-surface.test.mjs scripts/update-affirmation.test.mjs scripts/update-global-install.test.mjs scripts/update-robustness.test.mjs scripts/merge-update-feed.test.mjs scripts/prune-bundled-resources.test.mjs scripts/bundled-runtime-layout.test.mjs scripts/verify-bundled-uv.test.mjs scripts/managed-python.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.test.mjs scripts/composer-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/about-panel.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/picker-feedback.test.mjs scripts/picker-host-selection.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chrome.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/logger-log-dir.test.mjs scripts/draft-splash.test.mjs scripts/suggestion-stack.test.mjs scripts/suggestion-stack-react.test.mjs scripts/notifications-off.test.mjs scripts/notification-launch.test.mjs scripts/notification-spawn-sites.test.mjs scripts/chrome-keychain.test.mjs scripts/interrupt-control.test.mjs scripts/interrupt-slot-hold-react.test.mjs scripts/chat-sidebar-archive.test.mjs scripts/chat-sidebar-selection.test.mjs scripts/message-quote.test.mjs scripts/panel-chart-hover.test.mjs scripts/panel-read-policy.test.mjs scripts/composer-suggestions.test.mjs scripts/composer-tip-react.test.mjs scripts/sidebar-catalogue-gate.test.mjs scripts/telemetry-launch.test.mjs scripts/telemetry-spawn-sites.test.mjs scripts/sidebar-focus-hold.test.mjs scripts/credential-capture.test.mjs scripts/soft-breaks.test.mjs scripts/credential-composer.test.mjs scripts/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/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/transcription-failure-copy.test.mjs scripts/backend-version-drift.test.mjs scripts/live-seed-placement.test.mjs scripts/agents-publication.test.mjs scripts/agent-hub-queries.test.mjs scripts/install-builtin-batch.test.mjs scripts/install-progress.test.mjs scripts/attention-seen.test.mjs scripts/mark-all-read-control.test.mjs scripts/update-global-guard.test.mjs scripts/delivery-gate.test.mjs scripts/canvas-file-freshness.test.mjs scripts/no-websocket-plane.test.mjs scripts/update-window-report.test.mjs scripts/canvas-tab-close.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/webauthn.test.mjs scripts/render-mac-entitlements.test.mjs scripts/row-state-floors.test.mjs scripts/pairing-card-copy.test.mjs scripts/update-install-copy.test.mjs scripts/update-shipit.test.mjs scripts/console-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.test.mjs scripts/console-mirror.test.mjs scripts/shell-path.test.mjs scripts/build-env-guard.test.mjs scripts/install-scripts-network.test.mjs scripts/console-pane-render.test.mjs scripts/settings-section-routes.test.mjs scripts/authoring-refresh.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/provider-chip-verdict.test.mjs scripts/child-reader-foot-react.test.mjs scripts/backend-spawn-address.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-sidebar-view.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/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/btw-aside.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-text-authority.test.mjs scripts/analytics-rate-format.test.mjs scripts/provider-catalog.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-status.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/provider-detail-remount.test.mjs scripts/model-select-store.test.mjs scripts/onboarding-step-block.test.mjs scripts/onboarding-default-model.test.mjs scripts/server-release-notes.test.mjs scripts/no-hardlink-write.test.mjs scripts/canvas-goals.test.mjs scripts/overlay-drag-zones.test.mjs scripts/message-surface-floors.test.mjs scripts/header-identity-model.test.mjs 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/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/transcript-rail-refusal.test.mjs scripts/reveal-record.test.mjs scripts/hotkey-registration.test.mjs scripts/mini-view-dictation.test.mjs scripts/mini-view-contract.test.mjs scripts/hold-escape-claim.test.mjs scripts/ptt-keymap-binding.test.mjs",
79
+ "test:desktop": "node scripts/run-desktop-tests.mjs scripts/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-paging-hook.test.mjs scripts/seed-placement.test.mjs scripts/seed-label-gap.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.test.mjs scripts/backend-error-surfaces.test.mjs scripts/canonical-chat.test.mjs scripts/stale-caption.test.mjs scripts/desktop-watch-lease.test.mjs scripts/session-switch.test.mjs scripts/chat-search.test.mjs scripts/session-archive-delete.test.mjs scripts/chat-archived.test.mjs scripts/chat-archive-press.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/palette-contract.test.mjs scripts/palette-panel-request.test.mjs scripts/run-child-reader.test.mjs scripts/run-detail-model.test.mjs scripts/subagent-pulse.test.mjs scripts/chat-title.test.mjs scripts/clear-search.test.mjs scripts/tool-row.test.mjs scripts/working-line-clock.test.mjs scripts/attachment-url.test.mjs scripts/desktop-notifier.test.mjs scripts/launch-session.test.mjs scripts/desktop-feed.test.mjs scripts/session-status-feed.test.mjs scripts/viewer-record.test.mjs scripts/desktop-stream.test.mjs scripts/python-bytecode-cache.test.mjs scripts/preload-updater-surface.test.mjs scripts/update-affirmation.test.mjs scripts/update-global-install.test.mjs scripts/update-robustness.test.mjs scripts/merge-update-feed.test.mjs scripts/prune-bundled-resources.test.mjs scripts/bundled-runtime-layout.test.mjs scripts/verify-bundled-uv.test.mjs scripts/managed-python.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.test.mjs scripts/composer-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/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/picker-feedback.test.mjs scripts/picker-host-selection.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chrome.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/logger-log-dir.test.mjs scripts/draft-splash.test.mjs scripts/suggestion-stack.test.mjs scripts/suggestion-stack-react.test.mjs scripts/notifications-off.test.mjs scripts/notification-launch.test.mjs scripts/notification-spawn-sites.test.mjs scripts/chrome-keychain.test.mjs scripts/interrupt-control.test.mjs scripts/interrupt-slot-hold-react.test.mjs scripts/chat-sidebar-archive.test.mjs scripts/chat-sidebar-selection.test.mjs scripts/message-quote.test.mjs scripts/panel-chart-hover.test.mjs scripts/panel-read-policy.test.mjs scripts/composer-suggestions.test.mjs scripts/composer-tip-react.test.mjs scripts/sidebar-catalogue-gate.test.mjs scripts/telemetry-launch.test.mjs scripts/telemetry-spawn-sites.test.mjs scripts/sidebar-focus-hold.test.mjs scripts/credential-capture.test.mjs scripts/soft-breaks.test.mjs scripts/credential-composer.test.mjs scripts/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/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/transcription-failure-copy.test.mjs scripts/backend-version-drift.test.mjs scripts/live-seed-placement.test.mjs scripts/agents-publication.test.mjs scripts/agent-hub-queries.test.mjs scripts/install-builtin-batch.test.mjs scripts/install-progress.test.mjs scripts/attention-seen.test.mjs scripts/mark-all-read-control.test.mjs scripts/update-global-guard.test.mjs scripts/delivery-gate.test.mjs scripts/canvas-file-freshness.test.mjs scripts/no-websocket-plane.test.mjs scripts/update-window-report.test.mjs scripts/canvas-tab-close.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/webauthn.test.mjs scripts/render-mac-entitlements.test.mjs scripts/row-state-floors.test.mjs scripts/pairing-card-copy.test.mjs scripts/update-install-copy.test.mjs scripts/update-shipit.test.mjs scripts/console-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.test.mjs scripts/console-mirror.test.mjs scripts/shell-path.test.mjs scripts/build-env-guard.test.mjs scripts/install-scripts-network.test.mjs scripts/console-pane-render.test.mjs scripts/settings-section-routes.test.mjs scripts/authoring-refresh.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/provider-chip-verdict.test.mjs scripts/child-reader-foot-react.test.mjs scripts/backend-spawn-address.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-sidebar-view.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/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/btw-aside.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-text-authority.test.mjs scripts/analytics-rate-format.test.mjs scripts/provider-catalog.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-status.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/provider-detail-remount.test.mjs scripts/model-select-store.test.mjs scripts/onboarding-step-block.test.mjs scripts/onboarding-default-model.test.mjs scripts/server-release-notes.test.mjs scripts/no-hardlink-write.test.mjs scripts/canvas-goals.test.mjs scripts/overlay-drag-zones.test.mjs scripts/message-surface-floors.test.mjs scripts/header-identity-model.test.mjs 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/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",
80
80
  "check-themes": "node scripts/generate-theme-css.mjs --check && node scripts/contrast-contract.mjs",
81
81
  "check-vendored": "node scripts/check-vendored.mjs",
82
82
  "check-evidence": "node scripts/check-evidence.mjs",
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./legacy-agents-page-DbLTVwq0.js","./index-CDaH3A1m.js","./index-DITdBETY.css","./index-BDPyvriR.js","./renderer-platform-RsXXlY5x.js","./ui-preferences-store-DzXZGWGz.js","./textarea-B83uQCj2.js","./error-boundary-BFYdHP26.js","./console-mirror-CUQyeXIE.js","./console-mirror-DOrYoP_4.css","./index-CSPo12AE.css","./page-header-BtO13sx8.js","./settings-section-BXGO9Lv0.js","./org-surface-gate-BgtTWHt3.js","./use-memberships-query-C2Yus1QJ.js","./radient-auth-buttons-Briy2cZb.js"])))=>i.map(i=>d[i]);
2
- import{u as O,a as Q,b as J,c as V,d as W,B as G,U as H,P as X,r as Y,_ as Z,e as $}from"./index-BDPyvriR.js";import{j as e,r as n,c as w}from"./index-CDaH3A1m.js";import{u as ee,d as te,a as ae,b as se,c as z,e as L}from"./renderer-platform-RsXXlY5x.js";import{B as h}from"./textarea-B83uQCj2.js";import"./ui-preferences-store-DzXZGWGz.js";import"./error-boundary-BFYdHP26.js";import"./console-mirror-CUQyeXIE.js";const ne=n.lazy(()=>Z(()=>import("./legacy-agents-page-DbLTVwq0.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]),import.meta.url).then(t=>({default:t.LegacyAgentsPage}))),m="w-full rounded-md border border-control bg-surface px-3 py-2 text-body-sm text-ink";function T({profile:t,creating:E,onSaved:b}){const[j,r]=n.useState(!1),[v,c]=n.useState(E),[p,x]=n.useState(t?.name??""),[g,y]=n.useState(t?.kind??"role"),[P,d]=n.useState(t?.description??""),[N,u]=n.useState(t?.instructions??""),[_,D]=n.useState(t?.tools?.join(", ")??""),[I,k]=n.useState(t?.effort??"inherit"),[U,R]=n.useState(t?.delegate??!1),[f,a]=n.useState(!1),[o,l]=n.useState(null),i=n.useRef(null),C=$(),S=E||j,K=async s=>{if(s.preventDefault(),f)return;const M={kind:g,description:P,instructions:N,tools:_.split(",").map(q=>q.trim()).filter(Boolean),effort:I,delegate:U},A=JSON.stringify({name:p,fields:M,fresh:S});if(i.current&&i.current.body!==A){l("The previous save has not been confirmed. Retry it unchanged or reload the profile to reconcile before editing again.");return}i.current??={id:crypto.randomUUID(),body:A},a(!0),l(null);try{const q=await L({op:S?"profiles.create":"profiles.update",requestId:i.current.id,name:p,fields:M});i.current=null,c(!1),b(q.name)}catch(q){l(q instanceof Error?q.message:"Profile could not be saved.")}finally{a(!1)}},F=async()=>{if(!(!t||f)){a(!0),l(null);try{const s=await L({op:"profiles.install",name:t.name,requestId:crypto.randomUUID()});c(!1),r(!1),i.current=null,x(s.name),y(s.kind),d(s.description??""),u(s.instructions??""),D(s.tools?.join(", ")??""),k(s.effort??"inherit"),R(s.delegate??!1),b(s.name)}catch(s){l(s instanceof Error?s.message:"Profile could not be installed.")}finally{a(!1)}}};return e.jsxs("div",{className:"max-w-3xl space-y-6",children:[e.jsxs("header",{children:[e.jsx("h1",{className:"text-title",children:S?j?"Extend agent":"Create agent":t?.name}),e.jsx("p",{className:"mt-2 text-body-sm text-ink-muted",children:"Reusable instructions shared by agent commands, subagents and teams. Chats remain separate."})]}),t&&!S&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("span",{className:"text-meta text-ink-muted",children:[t.source==="builtin"?"Built-in":t.source==="installed"?"Installed":"Custom",t.divergent_fields?.length?" · Modified":""," ·"," ",t.kind]}),t.source==="builtin"?e.jsx(h,{variant:"outline",onClick:F,disabled:f,children:"Install"}):e.jsx(h,{variant:"outline",onClick:()=>c(!0),children:"Edit"}),e.jsx(h,{variant:"outline",onClick:()=>{r(!0),c(!0),x(""),i.current=null},children:"Extend"}),e.jsx(h,{onClick:()=>{z.getState().stageDraft({kind:"agent",name:t.name}),C("/chat")},children:"New chat"})]}),o&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:o}),!v&&t?.source==="builtin"&&e.jsx("p",{id:"builtin-readonly",className:"text-body-sm text-ink-muted",children:"Built-in agents are read-only. Install this one to edit it, or Extend it to start a separate agent from its instructions."}),e.jsxs("form",{onSubmit:K,className:"space-y-4",children:[e.jsxs("fieldset",{disabled:!v||f,className:"space-y-4",children:[e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Name"}),e.jsx("input",{className:m,value:p,disabled:!S,required:!0,"aria-describedby":t?.source==="builtin"?"builtin-readonly":void 0,onChange:s=>x(s.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Kind"}),e.jsxs("select",{className:m,value:g,disabled:!S,onChange:s=>y(s.target.value),children:[e.jsx("option",{value:"role",children:"Role"}),e.jsx("option",{value:"specialist",children:"Specialist"})]})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"When to use this agent"}),e.jsx("input",{className:m,value:P,maxLength:8e3,onChange:s=>d(s.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Instructions"}),e.jsx("textarea",{className:w(m,"min-h-52"),value:N,required:!0,maxLength:8e3,onChange:s=>u(s.target.value)})]}),g==="role"&&e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Allowed tools"}),e.jsx("input",{className:m,value:_,onChange:s=>D(s.target.value),placeholder:"All tools when empty; otherwise comma-separated names"})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Effort tier"}),e.jsx("input",{className:m,value:I,onChange:s=>k(s.target.value),"aria-describedby":"effort-help"}),e.jsx("span",{id:"effort-help",className:"text-meta text-ink-muted",children:"Use inherit, or a tier configured in backend settings. Unsupported tiers are rejected before saving."})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 text-body-sm",children:[e.jsx("input",{type:"checkbox",checked:U,onChange:s=>R(s.target.checked)}),"May delegate to subagents"]})]})]}),v&&e.jsx(h,{type:"submit",disabled:f,children:f?"Saving…":S?"Create agent":"Save changes"})]}),!v&&t?.packaged_instructions&&t.divergent_fields?.length?e.jsxs("details",{className:"text-body-sm",children:[e.jsx("summary",{children:"Compare packaged instructions"}),e.jsx("pre",{className:"mt-2 whitespace-pre-wrap text-body-sm text-ink-muted",children:t.packaged_instructions})]}):null]})}function B({team:t,onSaved:E}){const[b,j]=n.useState(t?.name??""),[r,v]=n.useState(t?.description??""),[c,p]=n.useState(t?.manager??"manager"),[x,g]=n.useState((t?.members??[]).map(a=>({...a,key:crypto.randomUUID()}))),[y,P]=n.useState(t?.instructions??""),[d,N]=n.useState(t?.project??""),[u,_]=n.useState(!1),[D,I]=n.useState(null),k=n.useRef(null),U=$(),R=async a=>{if(a.preventDefault(),u)return;const o={name:b,description:r,manager:c,members:x.map(({key:i,...C})=>C),instructions:y,project:d},l=JSON.stringify(o);if(k.current&&k.current.body!==l){I("The previous save has not been confirmed. Reload the team before changing that request.");return}k.current??={id:crypto.randomUUID(),body:l},_(!0),I(null);try{const i=t?await L({op:"teams.update",name:t.name,requestId:k.current.id,fields:o}):await L({op:"teams.create",requestId:k.current.id,fields:o});k.current=null,E(i.name)}catch(i){I(i instanceof Error?i.message:"Team could not be saved.")}finally{_(!1)}},f=(a,o)=>g(l=>l.map((i,C)=>C===a?{...i,...o}:i));return e.jsxs("div",{className:"max-w-3xl space-y-6",children:[e.jsxs("header",{children:[e.jsx("h1",{className:"text-title",children:t?t.name:"Create team"}),e.jsx("p",{className:"mt-2 text-body-sm text-ink-muted",children:"The manager leads the chat. Members retain their own instructions and start only when delegated work."})]}),t&&e.jsx(h,{onClick:()=>{z.getState().stageDraft({kind:"team",name:t.name}),U("/chat")},children:"New team chat"}),D&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:D}),e.jsxs("form",{onSubmit:R,className:"space-y-4",children:[e.jsxs("fieldset",{disabled:u,className:"space-y-4",children:[e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Name"}),e.jsx("input",{className:m,required:!0,maxLength:64,value:b,onChange:a=>j(a.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Description"}),e.jsx("input",{className:m,value:r,onChange:a=>v(a.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Manager agent"}),e.jsx("input",{className:m,required:!0,value:c,onChange:a=>p(a.target.value)})]}),e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-heading",children:"Members"}),x.map((a,o)=>e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("input",{className:w(m,"w-48 flex-1"),"aria-label":`Member ${o+1} name`,required:!0,value:a.role,onChange:l=>f(o,{role:l.target.value})}),e.jsxs("select",{className:w(m,"w-32"),"aria-label":`Member ${o+1} kind`,value:a.kind,onChange:l=>f(o,{kind:l.target.value}),children:[e.jsx("option",{value:"agent",children:"Agent"}),e.jsx("option",{value:"team",children:"Nested team"})]}),e.jsx("input",{className:w(m,"w-20"),"aria-label":`Member ${o+1} count`,type:"number",min:1,max:16,value:a.count,onChange:l=>f(o,{count:Number(l.target.value)})}),e.jsx(h,{type:"button",variant:"ghost",onClick:()=>g(l=>l.filter((i,C)=>C!==o)),children:"Remove"})]},a.key)),e.jsx(h,{type:"button",variant:"outline",onClick:()=>g(a=>[...a,{role:"",count:1,kind:"agent",key:crypto.randomUUID()}]),children:"Add member"})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Collaboration instructions"}),e.jsx("textarea",{className:w(m,"min-h-36"),maxLength:8e3,value:y,onChange:a=>P(a.target.value)})]}),e.jsxs("label",{className:"block space-y-1 text-body-sm",children:[e.jsx("span",{children:"Project brief"}),e.jsx("textarea",{className:w(m,"min-h-36"),maxLength:8e3,value:d,onChange:a=>N(a.target.value)})]})]}),e.jsx(h,{type:"submit",disabled:u,children:u?"Saving…":t?"Save team":"Create team"})]})]})}function me(){const t=O(),{agentId:E}=Q(),[b,j]=J(),r=b.get("kind")==="team"||b.get("create")==="team",v=b.has("create"),c=b.get("name"),p=ee(),x=te(p.data,r?"team_catalogue":"profile_catalogue"),g=V(x&&!r),y=W(x&&r),P=ae(),d=se({queryKey:["desktop",r?"team":"profile",c],enabled:x&&!!c&&!v,queryFn:()=>L({op:r?"teams.get":"profiles.get",name:c??""}),retry:!1}),N=async u=>{await P.invalidateQueries({queryKey:["desktop"]}),j({kind:r?"team":"agent",name:u})};return E?e.jsx(n.Suspense,{fallback:e.jsx("p",{className:"p-6 text-body",children:"Loading saved agent…"}),children:e.jsx(ne,{})}):e.jsxs("div",{className:"flex h-full min-h-0 bg-canvas text-ink",children:[e.jsxs("aside",{ref:t,className:"flex w-64 shrink-0 flex-col gap-4 border-r border-hairline bg-surface p-4",children:[e.jsx("h1",{className:"text-heading",children:"Agents and teams"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(h,{variant:r?"ghost":"outline",onClick:()=>j({kind:"agent"}),children:[e.jsx(G,{className:"size-4"}),"Agents"]}),e.jsxs(h,{variant:r?"outline":"ghost",onClick:()=>j({kind:"team"}),children:[e.jsx(H,{className:"size-4"}),"Teams"]})]}),e.jsxs(h,{variant:"outline",disabled:!x,onClick:()=>j({create:r?"team":"agent"}),children:[e.jsx(X,{className:"size-4"}),r?"Create team":"Create agent"]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:(r?y.data:g.data)?.map(u=>e.jsx("button",{type:"button",className:w("flex h-8 w-full items-center rounded-md px-2 text-left text-body-sm hover:bg-row-hover",u.name===c&&Y),onClick:()=>j({kind:r?"team":"agent",name:u.name}),children:e.jsx("span",{className:"truncate",children:u.name})},u.name))})]}),e.jsx("main",{className:"min-w-0 flex-1 overflow-auto p-6",children:x?g.error||y.error||d.error?e.jsxs("div",{role:"alert",children:[e.jsx("p",{className:"text-danger",children:g.error?.message||y.error?.message||d.error?.message}),e.jsx(h,{variant:"outline",onClick:()=>{g.refetch(),y.refetch(),d.refetch()},children:"Retry"})]}):v?r?e.jsx(B,{onSaved:N},"create-team"):e.jsx(T,{creating:!0,onSaved:N},"create-agent"):c&&d.isLoading?e.jsx("p",{"aria-live":"polite",children:"Loading details…"}):c&&d.data?r?e.jsx(B,{team:d.data,onSaved:N},c):e.jsx(T,{profile:d.data,creating:!1,onSaved:N},`${c}:${d.data.source}`):e.jsxs("div",{children:[e.jsx("h2",{className:"text-title",children:r?"Reusable teams":"Reusable agents"}),e.jsx("p",{className:"mt-2 text-body text-ink-muted",children:"Select a definition to view or edit it. A new chat does not change its definition."})]}):e.jsxs("div",{"aria-live":"polite",className:"space-y-3 text-body-sm",children:[e.jsx("p",{children:p.isLoading?"Connecting to the backend…":p.error?p.error.message:"Update the backend to manage reusable agents and teams. Saved chats are unchanged."}),e.jsx(h,{variant:"outline",onClick:()=>void p.refetch(),children:"Retry connection"})]})})]})}export{me as AgentsPage};