local-operator-ui 0.31.22 → 0.31.24

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 (91) hide show
  1. package/out/main/index.js +377 -32
  2. package/out/renderer/assets/{_basePickBy-DF0sHvnl.js → _basePickBy-DvYnhuYU.js} +1 -1
  3. package/out/renderer/assets/{_baseUniq-BFKFl7Wd.js → _baseUniq-bfmokOo7.js} +1 -1
  4. package/out/renderer/assets/{agent-details-page-vTsZEkqQ.js → agent-details-page-CKuk0h6D.js} +2 -2
  5. package/out/renderer/assets/agent-hub-page-mjoCtkLM.js +11 -0
  6. package/out/renderer/assets/{agents-page-DC8A3FoC.js → agents-page-CKyDYjEM.js} +2 -2
  7. package/out/renderer/assets/aida-control-B8b5SXix.js +50 -0
  8. package/out/renderer/assets/{arc-D0w6ee3G.js → arc-CFcKtuSP.js} +1 -1
  9. package/out/renderer/assets/{architectureDiagram-IEHRJDOE-BHo23p2c.js → architectureDiagram-IEHRJDOE-iKar6Oic.js} +1 -1
  10. package/out/renderer/assets/{blockDiagram-JOT3LUYC-C4PlyJ6T.js → blockDiagram-JOT3LUYC-B2zh8hXK.js} +1 -1
  11. package/out/renderer/assets/{book-open-BI_Ayn7w.js → book-open-ARKlovXx.js} +1 -1
  12. package/out/renderer/assets/browser-page-UoqCN-xN.js +1 -0
  13. package/out/renderer/assets/{browser-webauthn-prompt-B5MUKS69.js → browser-webauthn-prompt-CFO8FunV.js} +1 -1
  14. package/out/renderer/assets/{c4Diagram-VJAJSXHY-CjzI59bD.js → c4Diagram-VJAJSXHY-BMHJDEcf.js} +1 -1
  15. package/out/renderer/assets/channel-CIrWsSCo.js +1 -0
  16. package/out/renderer/assets/{chunk-4BMEZGHF-hXZ4B7Yp.js → chunk-4BMEZGHF-DRAVdspP.js} +1 -1
  17. package/out/renderer/assets/{chunk-A2AXSNBT-C6wS72cg.js → chunk-A2AXSNBT-Cud6VnlY.js} +1 -1
  18. package/out/renderer/assets/{chunk-AEK57VVT-CLqS3upu.js → chunk-AEK57VVT-BDCFuoNl.js} +1 -1
  19. package/out/renderer/assets/{chunk-D6G4REZN-C6hjevFK.js → chunk-D6G4REZN-DlMa4UAs.js} +1 -1
  20. package/out/renderer/assets/{chunk-RZ5BOZE2-Bz6LVJIn.js → chunk-RZ5BOZE2-EHEIhkiY.js} +1 -1
  21. package/out/renderer/assets/{chunk-XZIHB7SX-DmbrcRnR.js → chunk-XZIHB7SX-D6SPBzK4.js} +1 -1
  22. package/out/renderer/assets/classDiagram-GIVACNV2-BDlMBcMy.js +1 -0
  23. package/out/renderer/assets/classDiagram-v2-COTLJTTW-BDlMBcMy.js +1 -0
  24. package/out/renderer/assets/clone-DkQdBey4.js +1 -0
  25. package/out/renderer/assets/{console-mirror-CHRPaR1r.js → console-mirror-iQjAVQrh.js} +1 -1
  26. package/out/renderer/assets/{consoleCapture-DCMDDQHm.js → consoleCapture-f4bHcMlg.js} +1 -1
  27. package/out/renderer/assets/{dagre-OKDRZEBW-D80irjtc.js → dagre-OKDRZEBW-C69-0hU9.js} +1 -1
  28. package/out/renderer/assets/{diagram-SSKATNLV-Cw1zxYSh.js → diagram-SSKATNLV-DsUPj3k9.js} +1 -1
  29. package/out/renderer/assets/{diagram-VNBRO52H-DMzy3XEu.js → diagram-VNBRO52H-3cLE7l86.js} +1 -1
  30. package/out/renderer/assets/{erDiagram-Q7BY3M3F-YenYV77V.js → erDiagram-Q7BY3M3F-Gqm9ZUtK.js} +1 -1
  31. package/out/renderer/assets/{error-boundary-DYh9GOqG.js → error-boundary-BheI-_hJ.js} +1 -1
  32. package/out/renderer/assets/{flowDiagram-4HSFHLVR-Bds7_Ont.js → flowDiagram-4HSFHLVR-bu5rejsx.js} +1 -1
  33. package/out/renderer/assets/{ganttDiagram-APWFNJXF-Nl53cyHj.js → ganttDiagram-APWFNJXF-DOpEB0OK.js} +4 -4
  34. package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-BJBHzwkB.js → gitGraphDiagram-7IBYFJ6S-BitJPB27.js} +1 -1
  35. package/out/renderer/assets/{graph-BPbBedPT.js → graph-CyyuMUaw.js} +1 -1
  36. package/out/renderer/assets/index-CsbIIOFq.css +1 -0
  37. package/out/renderer/assets/{index-BNjEDIyj.js → index-D-d-ykb4.js} +1 -1
  38. package/out/renderer/assets/{index-Bnk19Me4.js → index-Db927tvJ.js} +1 -1
  39. package/out/renderer/assets/{index-ec0p7piv.js → index-FOmxzVhB.js} +456 -431
  40. package/out/renderer/assets/infoDiagram-PH2N3AL5-D3FD5ygR.js +2 -0
  41. package/out/renderer/assets/installer-Dq_j5D8p.js +1 -0
  42. package/out/renderer/assets/{journeyDiagram-U35MCT3I-D6V9F8qH.js → journeyDiagram-U35MCT3I-CMXDard0.js} +1 -1
  43. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-3AEAKd1U.js → kanban-definition-NDS4AKOZ-CGZPXBz-.js} +1 -1
  44. package/out/renderer/assets/{layout-CWH68IUl.js → layout-TTjt9cpH.js} +1 -1
  45. package/out/renderer/assets/{legacy-agents-page-CaXRBxnF.js → legacy-agents-page-DsEHBb_T.js} +3 -3
  46. package/out/renderer/assets/{mermaid.core-SkXjY8IF.js → mermaid.core-BGnJVp5q.js} +5 -5
  47. package/out/renderer/assets/{mesh-page-Cr_4iB8D.js → mesh-page-BuM1oQ_i.js} +1 -1
  48. package/out/renderer/assets/{mindmap-definition-ALO5MXBD-CLOmofrv.js → mindmap-definition-ALO5MXBD-CaLpfI_E.js} +1 -1
  49. package/out/renderer/assets/{mini-BAGYXudo.js → mini-KOisKeMi.js} +1 -1
  50. package/out/renderer/assets/org-surface-gate-CZiYqd1P.js +1 -0
  51. package/out/renderer/assets/{page-header-Dz4E9Ji9.js → page-header-B2VyeyKK.js} +1 -1
  52. package/out/renderer/assets/{pieDiagram-IB7DONF6-BVWVZWCS.js → pieDiagram-IB7DONF6-DgCZ_Tpy.js} +1 -1
  53. package/out/renderer/assets/projects-page-D8CTmXCv.js +35 -0
  54. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-DeqQdNl0.js → quadrantDiagram-7GDLP6J5-8FVHpZVN.js} +1 -1
  55. package/out/renderer/assets/{radar-MK3ICKWK-aqXYJ4Ku.js → radar-MK3ICKWK-4pgGQ-2B.js} +1 -1
  56. package/out/renderer/assets/{radient-auth-buttons-BqeoOp94.js → radient-auth-buttons-DUT18lNx.js} +1 -1
  57. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-D81fmjDn.js → requirementDiagram-KVF5MWMF-BubgmAeX.js} +1 -1
  58. package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-C0C6sBpn.js → sankeyDiagram-QLVOVGJD-C8luu1Ce.js} +1 -1
  59. package/out/renderer/assets/{schedules-page-Blr9zzCG.js → schedules-page-CajtG50s.js} +3 -3
  60. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-TB7F8Hqt.js → sequenceDiagram-X6HHIX6F-DyNeye_f.js} +1 -1
  61. package/out/renderer/assets/settings-page-DZNyJZ23.js +292 -0
  62. package/out/renderer/assets/{settings-section-lpy--SWL.js → settings-section-DQ45Riip.js} +1 -1
  63. package/out/renderer/assets/{stateDiagram-DGXRK772-B6dcayLG.js → stateDiagram-DGXRK772-DRqrOBmL.js} +1 -1
  64. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-o-zf-20f.js +1 -0
  65. package/out/renderer/assets/{textarea-dtE2fZRJ.js → textarea-CaRKMTTG.js} +5 -5
  66. package/out/renderer/assets/{timeline-definition-BDJGKUSR-DUOG5GaW.js → timeline-definition-BDJGKUSR-DC76uMim.js} +1 -1
  67. package/out/renderer/assets/ui-preferences-store-qSXgzAHu.js +1 -0
  68. package/out/renderer/assets/{use-download-agent-mutation-724n3ZAY.js → use-download-agent-mutation-B_qjSLGd.js} +2 -2
  69. package/out/renderer/assets/{use-memberships-query-CComBrZl.js → use-memberships-query-Q1_CwjZE.js} +1 -1
  70. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-BLvnlG7d.js → xychartDiagram-VJFVF3MP-CyMpnVUJ.js} +1 -1
  71. package/out/renderer/console-capture.html +5 -5
  72. package/out/renderer/index.html +8 -8
  73. package/out/renderer/installer.html +5 -5
  74. package/out/renderer/mini.html +6 -6
  75. package/package.json +2 -2
  76. package/out/renderer/assets/agent-hub-page-jm_fZiZn.js +0 -6
  77. package/out/renderer/assets/aida-control-Bwkluijq.js +0 -42
  78. package/out/renderer/assets/browser-page-TT7eVydU.js +0 -1
  79. package/out/renderer/assets/channel-BnPqoquV.js +0 -1
  80. package/out/renderer/assets/classDiagram-GIVACNV2-D_CSusj-.js +0 -1
  81. package/out/renderer/assets/classDiagram-v2-COTLJTTW-D_CSusj-.js +0 -1
  82. package/out/renderer/assets/clone-BRW-kqpe.js +0 -1
  83. package/out/renderer/assets/index-DcDXH072.css +0 -1
  84. package/out/renderer/assets/infoDiagram-PH2N3AL5-DBjhwY6o.js +0 -2
  85. package/out/renderer/assets/installer-BgtX9Kgc.js +0 -1
  86. package/out/renderer/assets/org-surface-gate-Dj95j2Nj.js +0 -1
  87. package/out/renderer/assets/projects-page-Cu2gc5tY.js +0 -40
  88. package/out/renderer/assets/settings-page-DpqcsEmy.js +0 -297
  89. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-TfdpV2Sz.js +0 -1
  90. package/out/renderer/assets/ui-preferences-store-B6-k1D10.js +0 -1
  91. /package/out/renderer/assets/{index-BJJKraKa.js → index-C8q85hqs.js} +0 -0
@@ -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-SkXjY8IF.js";import{d as nt}from"./arc-D0w6ee3G.js";import"./index-ec0p7piv.js";import"./index-BJJKraKa.js";import"./aida-control-Bwkluijq.js";import"./ui-preferences-store-B6-k1D10.js";import"./textarea-dtE2fZRJ.js";import"./error-boundary-DYh9GOqG.js";import"./console-mirror-CHRPaR1r.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-BGnJVp5q.js";import{d as nt}from"./arc-CFcKtuSP.js";import"./index-FOmxzVhB.js";import"./index-C8q85hqs.js";import"./aida-control-B8b5SXix.js";import"./ui-preferences-store-qSXgzAHu.js";import"./textarea-CaRKMTTG.js";import"./error-boundary-BheI-_hJ.js";import"./console-mirror-iQjAVQrh.js";var Q=function(){var n=s(function(x,i,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],u={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,c,p,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:p.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:p.addTask(o[v],0,""),this.$=o[v];break;case 16:p.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:s(function(i){var a=this,c=[0],p=[],y=[null],o=[],w=this.table,v="",N=0,A=0,V=2,U=1,M=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(i,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var P=g.yylloc;o.push(P);var W=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=p.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(p=T,T=p.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,C,I,J,R={},B,$,et,O;;){if(C=c[c.length-1],this.defaultActions[C]?I=this.defaultActions[C]:((S===null||typeof S>"u")&&(S=tt()),I=w[C]&&w[C][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[C])this.terminals_[B]&&B>V&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`:
2
2
  `+g.showPosition()+`
3
3
  Expecting `+O.join(", ")+", got '"+(this.terminals_[S]||S)+"'":K="Parse error on line "+(N+1)+": Unexpected "+(S==U?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(K,{text:g.match,token:this.terminals_[S]||S,line:g.yylineno,loc:P,expected:O})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+S);switch(I[0]){case 1:c.push(S),y.push(g.yytext),o.push(g.yylloc),c.push(I[1]),S=null,A=g.yyleng,v=g.yytext,N=g.yylineno,P=g.yylloc;break;case 2:if($=this.productions_[I[1]][1],R.$=y[y.length-$],R._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},W&&(R._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),J=this.performAction.apply(R,[v,A,N,b.yy,I[1],y,o].concat(M)),typeof J<"u")return J;$&&(c=c.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),c.push(this.productions_[I[1]][0]),y.push(R.$),o.push(R._$),et=w[c[c.length-2]][c[c.length-1]],c.push(et);break;case 3:return!0}}return!0},"parse")},k=function(){var x={EOF:1,parseError:s(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import{b as M,D as oe}from"./index-C8q85hqs.js";const v=e=>{let n;const t=new Set,o=(d,h)=>{const l=typeof d=="function"?d(n):d;if(!Object.is(l,n)){const p=n;n=h??(typeof l!="object"||l===null)?l:Object.assign({},n,l),t.forEach(g=>g(n,p))}},r=()=>n,i={setState:o,getState:r,getInitialState:()=>c,subscribe:d=>(t.add(d),()=>t.delete(d))},c=n=e(o,r,i);return i},re=e=>e?v(e):v,se=e=>e;function ae(e,n=se){const t=M.useSyncExternalStore(e.subscribe,()=>n(e.getState()),()=>n(e.getInitialState()));return M.useDebugValue(t),t}const N=e=>{const n=re(e),t=o=>ae(n,o);return Object.assign(t,n),t},ie=e=>e?N(e):N;function ce(e,n){let t;try{t=e()}catch{return}return{getItem:r=>{var s;const a=c=>c===null?null:JSON.parse(c,void 0),i=(s=t.getItem(r))!=null?s:null;return i instanceof Promise?i.then(a):a(i)},setItem:(r,s)=>t.setItem(r,JSON.stringify(s,void 0)),removeItem:r=>t.removeItem(r)}}const P=e=>n=>{try{const t=e(n);return t instanceof Promise?t:{then(o){return P(o)(t)},catch(o){return this}}}catch(t){return{then(o){return this},catch(o){return P(o)(t)}}}},le=(e,n)=>(t,o,r)=>{let s={storage:ce(()=>localStorage),partialize:u=>u,version:0,merge:(u,S)=>({...S,...u}),...n},a=!1;const i=new Set,c=new Set;let d=s.storage;if(!d)return e((...u)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...u)},o,r);const h=()=>{const u=s.partialize({...o()});return d.setItem(s.name,{state:u,version:s.version})},l=r.setState;r.setState=(u,S)=>{l(u,S),h()};const p=e((...u)=>{t(...u),h()},o,r);r.getInitialState=()=>p;let g;const T=()=>{var u,S;if(!d)return;a=!1,i.forEach(f=>{var m;return f((m=o())!=null?m:p)});const E=((S=s.onRehydrateStorage)==null?void 0:S.call(s,(u=o())!=null?u:p))||void 0;return P(d.getItem.bind(d))(s.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==s.version){if(s.migrate){const m=s.migrate(f.state,f.version);return m instanceof Promise?m.then(b=>[!0,b]):[!0,m]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,f.state];return[!1,void 0]}).then(f=>{var m;const[b,te]=f;if(g=s.merge(te,(m=o())!=null?m:p),t(g,!0),b)return h()}).then(()=>{E?.(g,void 0),g=o(),a=!0,c.forEach(f=>f(g))}).catch(f=>{E?.(void 0,f)})};return r.persist={setOptions:u=>{s={...s,...u},u.storage&&(d=u.storage)},clearStorage:()=>{d?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>T(),hasHydrated:()=>a,onHydrate:u=>(i.add(u),()=>{i.delete(u)}),onFinishHydration:u=>(c.add(u),()=>{c.delete(u)})},s.skipHydration||T(),g||p},ue=le,O=260,$=220,F=320,R=56,de=O,fe=1024,X=480,G=400,he=560;function V(e){return Math.max(0,Math.min(he,e-X))}function D(e){return V(e)>=G?"docked":"overlay"}function me(e,n=O){return D(e-j(n))==="overlay"&&D(e-R)==="docked"}function j(e){return Number.isNaN(e)?O:Math.min(F,Math.max($,e))}function an(e,n,t,o=O,r=!1){if(e>=fe){const a=!n&&r&&me(e,o);return{mode:n||a?"strip":"docked",width:n||a?R:j(o),collapsed:n||a,sheetOpen:!1,resizable:!n&&!a}}return{mode:t?"overlay":"strip",width:t?de:R,collapsed:!0,sheetOpen:t,resizable:!1}}function cn(e){return e.shiftKey||e.altKey||!(e.metaKey||e.ctrlKey)?!1:e.key.toLowerCase()==="b"}const ln=e=>e?"⌘B":"Ctrl+B",un="@container/chatcol",dn="w-full @min-[750px]/chatcol:max-w-[var(--lo-chat-measure)] @min-[750px]/chatcol:mx-auto",ge="--lo-chat-measure-shipped",L="--lo-chat-measure-override",fn=()=>{if(typeof document>"u"||typeof getComputedStyle!="function")return null;const e=getComputedStyle(document.documentElement).getPropertyValue(ge).trim(),n=Number.parseFloat(e);return Number.isFinite(n)&&n>0?n:null},hn="px-6",mn="max-h-[7.5rem] overflow-y-auto leading-5",pe=520,Se=1100,_e=3,Y=e=>Math.min(Se,Math.max(pe,Math.round(e))),Ce=({startWidth:e,deltaX:n,edge:t})=>Y(t==="right"?e+n*2:e-n*2),B=(e,n)=>Math.min(e,n),gn=({startWidth:e,deltaX:n,edge:t,panePx:o})=>{if(Math.abs(n)<_e)return null;const r=Ce({startWidth:e,deltaX:n,edge:t});return B(r,o)===B(e,o)?null:r},ye=["active","created"],pn={running:"Running",today:"Today",week:"This week",older:"Older"},Oe=new Set(["busy","delegating","approval","answer","wedged"]);function K(e){return Oe.has(e.status?.code??"")}const Ee=24*60*60*1e3,be=e=>{const n=new Date(e);return n.setHours(0,0,0,0),n.getTime()};function Q(e,n){const t=n==="created"?e.created_at:e.updated_at;return typeof t!="number"||!Number.isFinite(t)||n==="created"&&t<=0?null:t*1e3}function Ae(e,n,t){if(K(e))return"running";const o=Q(e,t);if(o===null)return"older";const r=be(n);return o>=r?"today":o>=r-6*Ee?"week":"older"}function Sn(e,n,t){const o={running:[],today:[],week:[],older:[]};for(const r of e)o[Ae(r,n,t)].push(r);return o}function Pe(e,n,t){const o=Q(e,t);if(o===null)return"";const r=Math.floor(Math.max(0,n-o)/6e4);if(r<1)return"now";if(r<60)return`${r}m`;const s=Math.floor(r/60);if(s<24)return`${s}h`;const a=Math.floor(s/24);if(a<7)return`${a}d`;const i=Math.floor(a/7);return a<365?`${i}w`:`${Math.floor(a/365)}y`}function _n(e,n,t){const o=Pe(e,n,t);if(!o)return"";const r=t==="created"?"created":"last active";if(o==="now")return`${r} just now`;const s={m:"minute",h:"hour",d:"day",w:"week",y:"year"},a=Number.parseInt(o,10),i=s[o.slice(-1)];return`${r} ${a} ${i}${a===1?"":"s"} ago`}const w=["pinned","running","today","week","older","agents","teams"],Cn={pinned:"Pinned",running:"Running",today:"Today",week:"This week",older:"Older",agents:"Agents",teams:"Teams"};function yn(e){return e==="agents"||e==="teams"}const On=8,y={hidden:[],order:[...w],pins:[],groupBy:"section",basis:"active",orderBy:"active-first",loads:0},Re=10,_=[25,50],we=50,Ie=500;function I(e){const n=Math.max(0,Math.floor(e));return n===0?Re:n<=_.length?_[n-1]:_[_.length-1]+(n-_.length)*we}function En(e,n){const t=I(e+1)-I(e),o=Math.max(0,Math.min(t,n));return o===1?"Show 1 more chat":`Show ${o} more chats`}function J(e){return K(e)}function bn(e,n){if(n==="recent")return[...e];const t=[],o=[];for(const r of e)(J(r)?t:o).push(r);return[...t,...o]}function An(e,n){const{limit:t,currentId:o,searching:r=!1}=n;if(r)return{rows:[...e],lifted:!1,remaining:0};const s=e.slice(0,Math.max(0,t)),a=Math.max(0,e.length-s.length);if(!o)return{rows:s,lifted:!1,remaining:a};const i=e.findIndex(c=>c.session_id===o);return i<0||i<s.length?{rows:s,lifted:!1,remaining:a}:{rows:[e[i],...s],lifted:!0,remaining:a}}function Pn(e,n){if(n.searching)return{rows:[...e],lifted:!1,hidden:0,held:e.length};const t=I(n.loads),o=[];let r=t;for(const c of e){if(J(c)){o.push(c);continue}r>0&&(o.push(c),r-=1)}const s=n.currentId,a=s==null?null:e.find(c=>c.session_id===s)??null,i=a!==null&&!o.includes(a);return{rows:i&&a!==null?[a,...o]:o,lifted:i,hidden:e.length-o.length-(i?1:0),held:e.length}}function Rn(e){if(e.add<=0)return null;const n=e.add===1?"Show 1 more chat":`Show ${e.add} more chats`;if(e.drawn>=e.total)return{label:n,aria:n};const t=`${e.drawn} of ${e.total}`;return{label:`${n} · ${t}`,aria:`${n} · ${t} shown`}}const Te="mt-4",Me="mt-2";function wn(e){return e?Te:Me}function In(e,n){if(n==="section")return null;if(n==="flat")return[{key:"all",label:"",rows:[...e]}];const t=new Map;for(const s of e){const a=s.binding?.team||s.binding?.agent||"",i=a||"ungrouped",c=t.get(i)??{key:i,label:a||"Ungrouped",rows:[]};c.rows.push(s),t.set(i,c)}const o=[...t.values()],r=o.findIndex(s=>s.key==="ungrouped");return r>0&&o.push(...o.splice(r,1)),o}function ve(e,n){return!e.hidden.includes(n)}function Z(e){return e.order.filter(n=>ve(e,n))}function Tn(e,n){const t=e.hidden.includes(n)?e.hidden.filter(o=>o!==n):[...e.hidden,n];return{...e,hidden:t}}function Mn(e,n,t){const o=Z(e),r=o.indexOf(n),s=o[r+t];if(r<0||s===void 0)return e;const a=e.order.indexOf(n),i=e.order.indexOf(s),c=[...e.order];return c[a]=s,c[i]=n,{...e,order:c}}const Ne=["running","today","week","older"];function H(e){return Ne.includes(e)}function vn(e,n,t,o){if(!H(n)||o&&!o(n))return!1;const r=Z(e),s=r.indexOf(n);if(s<0)return!1;const a=r[s+t];return a===void 0||!H(a)?!1:o?o(a):!0}const De=["section","agent","flat"],Le=["active-first","recent"];function Nn(e){if(typeof e!="object"||e===null)return y;const n=e,t=new Set(w),o=[];if(Array.isArray(n.order))for(const l of n.order)typeof l=="string"&&t.has(l)&&(o.includes(l)||o.push(l));for(const l of w)o.includes(l)||o.push(l);const r=[];if(Array.isArray(n.hidden))for(const l of n.hidden)typeof l=="string"&&t.has(l)&&(r.includes(l)||r.push(l));const s=De.includes(n.groupBy)?n.groupBy:y.groupBy,a=ye.includes(n.basis)?n.basis:y.basis,i=Le.includes(n.orderBy)?n.orderBy:y.orderBy,c=typeof n.loads=="number"&&Number.isFinite(n.loads)&&n.loads>0?Math.min(Ie,Math.floor(n.loads)):0,d=[],h=new Set;if(Array.isArray(n.pins))for(const l of n.pins)typeof l=="string"&&l.length!==0&&(h.has(l)||(h.add(l),d.push(l)));return{hidden:r,order:o,groupBy:s,basis:a,orderBy:i,loads:c,pins:d}}const Be="both",W={background:"sunken",foreground:"ink",cursor:"accent",cursorAccent:"surface",selectionBackground:"accent",selectionForeground:"onAccent",black:"inkDim",red:"danger",green:"success",yellow:"warning",blue:"info",magenta:"danger",cyan:"info",white:"ink",brightBlack:"inkMuted",brightRed:"danger",brightGreen:"success",brightYellow:"warning",brightBlue:"info",brightMagenta:"danger",brightCyan:"info",brightWhite:"ink"},He=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Dn=(e=document.documentElement)=>{const n=getComputedStyle(e),t={};for(const o of Object.keys(W)){const r=Ue(n,W[o]);r&&(t[o]=r)}return Object.keys(t).length===0&&xe(e),t},Ln=(e,n=document.documentElement)=>{if(e==null)return;n.dataset.theme=e,n.classList.toggle("dark",e.toLowerCase().includes("light")===!1),We(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`)},We=(e,n)=>typeof getComputedStyle!="function"?"":getComputedStyle(e).getPropertyValue(n).trim(),x=new Set,xe=e=>{const n=e.dataset.theme??"(none)";x.has(n)||(x.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`))},ke=13,Ue=(e,n)=>{const t=He(n),o=e.getPropertyValue(`--color-${t}`).trim();if(k(o))return o;const r=e.getPropertyValue(`--lo-${t}`).trim();return k(r)?r:""},$e=/^#[0-9a-fA-F]{3,8}$/,Fe=/^(rgb|rgba|hsl|hsla|color)\(/,k=e=>$e.test(e)||Fe.test(e),Xe=(e=document.documentElement)=>typeof document>"u"||typeof getComputedStyle!="function"?"monospace":getComputedStyle(e).getPropertyValue("--font-mono").trim()||"monospace",Ge=(e,n=ke,t=typeof window>"u"?1:window.devicePixelRatio||1)=>{let o=n*.6,r=n*1.2;if(typeof document>"u")return{cellWidth:o,cellHeight:r};const s=e??Xe(),i=document.createElement("canvas").getContext("2d");if(!i)return{cellWidth:o,cellHeight:r};i.font=`${n}px ${s}`;const c=i.measureText("W");Number.isFinite(c.width)&&c.width>0&&(o=c.width);const d=c.fontBoundingBoxAscent+c.fontBoundingBoxDescent;return Number.isFinite(d)&&d>0&&(r=Ve(d,t)),{cellWidth:o,cellHeight:r}},Ve=(e,n)=>Math.ceil(e*n)/n,C=e=>({isRunPanelOpen:e==="isRunPanelOpen",isCanvasOpen:e==="isCanvasOpen",isBrowserPaneOpen:e==="isBrowserPaneOpen",isConsolePaneOpen:e==="isConsolePaneOpen"});function Bn(e,n){const t=n.isCanvasOpen?"canvas":n.isRunPanelOpen?"run":n.isBrowserPaneOpen?"browser":n.isConsolePaneOpen?"console":null;if(t===null)return 0;let o;switch(t){case"canvas":o=Math.max(G,n.rightSlotWidth||q);break;case"run":o=Math.max(Ze,n.rightSlotWidth||z);break;case"browser":o=Math.max(qe,n.rightSlotWidth||ee);break;case"console":o=Math.max(ze,n.rightSlotWidth||ne);break}return e<=0?o:t==="canvas"?Math.min(o,V(e)):Math.min(o,Math.max(0,e-X))}const q=800,U=O,z=420,je=20,Ye=4,ee=640,Ke=100,Qe=16,Je=()=>Math.ceil(Ke*Ge().cellWidth)+Qe,ne=Je(),Ze=320,qe=480,ze=480,en=5e3,Hn=(e,n)=>e.some(t=>t.surface===n),Wn=(e,n=Date.now())=>e.some(t=>n-t.at<en),nn=[],A=e=>{if(typeof document>"u")return;const n=document.documentElement;if(e===null){n.style.removeProperty(L);return}n.style.setProperty(L,`${e}px`)},xn=ie()(ue(e=>({isCommandPaletteOpen:!1,commandPaletteQuery:"",isSidebarCollapsed:!1,showAgentReasoning:!1,themeName:oe,rightSlotWidth:0,chatSidebarWidth:U,chatSidebarRegions:Be,chatSidebarView:y,chatSidebarListHeight:null,chatMeasureWidth:null,chatSidebarOrder:"entities-first",dismissedBuiltinOfferSignature:"",isCanvasOpen:!1,isRunPanelOpen:!1,isBrowserPaneOpen:!1,isConsolePaneOpen:!1,consoleOpenIntent:null,runPanelReveal:null,browserPaneScope:"conversation",consoleActiveSurface:null,consoleUnseen:nn,isCreateAgentDialogOpen:!1,mentionRecents:null,profileRecents:{agent:[],team:[]},openCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!0})},closeCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!1})},openCommandPalette:()=>{e({isCommandPaletteOpen:!0})},closeCommandPalette:()=>{e({isCommandPaletteOpen:!1,commandPaletteQuery:""})},toggleCommandPalette:(n="")=>{e(t=>({isCommandPaletteOpen:!t.isCommandPaletteOpen,commandPaletteQuery:t.isCommandPaletteOpen?t.commandPaletteQuery:n}))},setCommandPaletteQuery:n=>{e({commandPaletteQuery:n})},toggleSidebar:()=>{e(n=>({isSidebarCollapsed:!n.isSidebarCollapsed}))},setSidebarCollapsed:n=>{e({isSidebarCollapsed:n})},setShowAgentReasoning:n=>{e({showAgentReasoning:n})},setTheme:n=>{e({themeName:n})},setCanvasOpen:n=>{e(n?C("isCanvasOpen"):{isCanvasOpen:!1})},setRunPanelOpen:n=>{e(n?C("isRunPanelOpen"):{isRunPanelOpen:!1})},setBrowserPaneOpen:n=>{e(n?C("isBrowserPaneOpen"):{isBrowserPaneOpen:!1})},setConsolePaneOpen:n=>{e(n?C("isConsolePaneOpen"):{isConsolePaneOpen:!1})},setConsoleActiveSurface:n=>{e({consoleActiveSurface:n})},requestConsoleOpen:n=>{e({consoleOpenIntent:n})},clearConsoleOpenIntent:n=>{e(t=>t.consoleOpenIntent===n?{consoleOpenIntent:null}:{})},markConsoleUnseen:(n,t)=>{e(o=>o.consoleUnseen.some(r=>r.surface===t)?{}:{consoleUnseen:[...o.consoleUnseen,{sessionId:n,surface:t,at:Date.now()}]})},clearConsoleUnseen:n=>{const t=Array.isArray(n)?n:[n];e(o=>{const r=o.consoleUnseen.filter(s=>!t.includes(s.surface));return r.length===o.consoleUnseen.length?{}:{consoleUnseen:r}})},setRightSlotWidth:n=>{e({rightSlotWidth:n})},restoreDefaultRightSlotWidth:()=>{e({rightSlotWidth:0})},setBrowserPaneScope:n=>{e({browserPaneScope:n})},revealRunPanelSection:n=>{e(t=>({...C("isRunPanelOpen"),runPanelReveal:{section:n,nonce:(t.runPanelReveal?.nonce??0)+1}}))},clearRunPanelReveal:n=>{e(t=>t.runPanelReveal?.nonce===n?{runPanelReveal:null}:{})},setChatSidebarWidth:n=>{e({chatSidebarWidth:Math.min(F,Math.max($,n))})},setChatSidebarRegions:n=>{e({chatSidebarRegions:n})},setChatSidebarListHeight:n=>{e({chatSidebarListHeight:n})},restoreDefaultChatSidebarListHeight:()=>{e({chatSidebarListHeight:null})},setChatMeasureWidth:n=>{const t=Y(n);A(t),e({chatMeasureWidth:t})},restoreDefaultChatMeasureWidth:()=>{A(null),e({chatMeasureWidth:null})},setChatSidebarOrder:n=>{e({chatSidebarOrder:n})},setChatSidebarView:n=>{e({chatSidebarView:n})},dismissBuiltinOffer:n=>{e({dismissedBuiltinOfferSignature:n})},restoreDefaultChatSidebarWidth:()=>{e({chatSidebarWidth:U})},rememberMention:(n,t)=>{e(o=>{const r=o.mentionRecents,s=r?.cwd===n?r.paths:[],a=[t,...s.filter(i=>i!==t)].slice(0,je);return{mentionRecents:{cwd:n,paths:a}}})},rememberProfile:(n,t)=>{e(o=>({profileRecents:{...o.profileRecents,[n]:tn(o.profileRecents[n]??[],t)}}))}}),{name:"ui-preferences-storage",version:1,migrate:rn,partialize:on,onRehydrateStorage:()=>e=>{A(e?.chatMeasureWidth??null)}}));function tn(e,n){return[n,...e.filter(t=>t!==n)].slice(0,Ye)}function on(e){const{runPanelReveal:n,consoleOpenIntent:t,...o}=e;return o}function rn(e,n){const t={...e??{}};if(n>=1)return t;const o=[["canvasWidth",q],["runPanelWidth",z],["browserPanelWidth",ee],["consolePanelWidth",ne]];let r=0;for(const[s,a]of o){const i=t[s];if(typeof i=="number"&&i>0&&i!==a){r=i;break}}for(const[s]of o)delete t[s];return t.rightSlotWidth=r,t}export{_n as $,en as A,Hn as B,Se as C,ve as D,H as E,yn as F,Cn as G,Tn as H,Mn as I,vn as J,Nn as K,An as L,I as M,bn as N,y as O,Sn as P,Z as Q,wn as R,fe as S,ke as T,In as U,En as V,On as W,Pn as X,Rn as Y,Pe as Z,K as _,Ln as a,pn as a0,Ze as a1,G as a2,V as a3,qe as a4,ze as a5,z as a6,D as a7,ee as a8,ne as a9,X as aa,ce as b,ie as c,an as d,R as e,Bn as f,F as g,$ as h,cn as i,pe as j,L as k,B as l,Ge as m,gn as n,Ce as o,ue as p,fn as q,Dn as r,ln as s,Xe as t,xn as u,dn as v,un as w,mn as x,hn as y,Wn as z};
@@ -1,4 +1,4 @@
1
- import{c as l,F as T}from"./textarea-dtE2fZRJ.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-BJJKraKa.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-ec0p7piv.js";import{B as X}from"./book-open-BI_Ayn7w.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-CComBrZl.js";import{b as ie,a as b,i as C}from"./aida-control-Bwkluijq.js";/**
1
+ import{c as l,K as F}from"./textarea-CaRKMTTG.js";import{t as j,c as K,n as R,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-C8q85hqs.js";import{bn as $,bo as B,U as O,bp as P,bq as Y,a8 as k,a9 as w,e as Z,aa as D,aW as W,br as I,aX as G}from"./index-FOmxzVhB.js";import{B as X}from"./book-open-ARKlovXx.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-Q1_CwjZE.js";import{b as ie,a as b,i as C}from"./aida-control-B8b5SXix.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-dtE2fZRJ.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 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};
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 K(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]=R(o?.in,...s>0?[t,e]:[e,t]),d=qe("round"),x=m.getTime()-h.getTime(),f=x/v,H=_(m)-_(h),y=(x-H)/v,T=o?.unit;let u;if(f<1?u="second":f<60?u="minute":f<z?u="hour":y<N?u="day":y<S?u="month":u="year",u==="second"){const c=d(x/1e3);return n.formatDistance("xSeconds",c,i)}else if(u==="minute"){const c=d(f);return n.formatDistance("xMinutes",c,i)}else if(u==="hour"){const c=d(f/60);return n.formatDistance("xHours",c,i)}else if(u==="day"){const c=d(y/z);return n.formatDistance("xDays",c,i)}else if(u==="month"){const c=d(y/N);return c===12&&T!=="month"?n.formatDistance("xYears",1,i):n.formatDistance("xMonths",c,i)}else{const c=d(y/S);return n.formatDistance("xYears",c,i)}}function Ve(e,t){return $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(F,{variant:"neutral",className:g("gap-1",t),"data-testid":"agent-org-badge",title:e?`Shared with ${e}, not the public hub`:"Shared with an organization, not the public hub",children:[r.jsx(O,{"aria-hidden":"true"}),e??"Organization"]}),M={all:["agent-statuses"],page:e=>[...M.all,"page",[...e]]},Ie=e=>[...new Set(e)].sort(),Ye=({agentIds:e,enabled:t=!0})=>{const{isAuthenticated:o}=k(),a=e.join(","),n=V.useMemo(()=>Ie(e),[a]),s=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};
@@ -1 +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-Bwkluijq.js";import{a5 as P,a6 as N,a7 as S,a8 as r,a9 as k}from"./index-ec0p7piv.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
+ 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-B8b5SXix.js";import{a4 as P,a5 as N,a6 as S,a7 as r,a8 as k}from"./index-FOmxzVhB.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-SkXjY8IF.js";import{A as kt,z as Tt,C as Rt}from"./index-ec0p7piv.js";import"./index-BJJKraKa.js";import"./aida-control-Bwkluijq.js";import"./ui-preferences-store-B6-k1D10.js";import"./textarea-dtE2fZRJ.js";import"./error-boundary-DYh9GOqG.js";import"./console-mirror-CHRPaR1r.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-BGnJVp5q.js";import{A as kt,z as Tt,C as Rt}from"./index-FOmxzVhB.js";import"./index-C8q85hqs.js";import"./aida-control-B8b5SXix.js";import"./ui-preferences-store-qSXgzAHu.js";import"./textarea-CaRKMTTG.js";import"./error-boundary-BheI-_hJ.js";import"./console-mirror-iQjAVQrh.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-DCMDDQHm.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-BJJKraKa.js">
11
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-B6-k1D10.js">
12
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-CHRPaR1r.js">
13
- <link rel="stylesheet" crossorigin href="./assets/index-DcDXH072.css">
9
+ <script type="module" crossorigin src="./assets/consoleCapture-f4bHcMlg.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-C8q85hqs.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-qSXgzAHu.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-iQjAVQrh.js">
13
+ <link rel="stylesheet" crossorigin href="./assets/index-CsbIIOFq.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-ec0p7piv.js"></script>
35
- <link rel="modulepreload" crossorigin href="./assets/index-BJJKraKa.js">
36
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-B6-k1D10.js">
37
- <link rel="modulepreload" crossorigin href="./assets/textarea-dtE2fZRJ.js">
38
- <link rel="modulepreload" crossorigin href="./assets/aida-control-Bwkluijq.js">
39
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-DYh9GOqG.js">
40
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-CHRPaR1r.js">
41
- <link rel="stylesheet" crossorigin href="./assets/index-DcDXH072.css">
34
+ <script type="module" crossorigin src="./assets/index-FOmxzVhB.js"></script>
35
+ <link rel="modulepreload" crossorigin href="./assets/index-C8q85hqs.js">
36
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-qSXgzAHu.js">
37
+ <link rel="modulepreload" crossorigin href="./assets/textarea-CaRKMTTG.js">
38
+ <link rel="modulepreload" crossorigin href="./assets/aida-control-B8b5SXix.js">
39
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-BheI-_hJ.js">
40
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-iQjAVQrh.js">
41
+ <link rel="stylesheet" crossorigin href="./assets/index-CsbIIOFq.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-BgtX9Kgc.js"></script>
12
- <link rel="modulepreload" crossorigin href="./assets/index-BJJKraKa.js">
13
- <link rel="modulepreload" crossorigin href="./assets/textarea-dtE2fZRJ.js">
14
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-DYh9GOqG.js">
15
- <link rel="stylesheet" crossorigin href="./assets/index-DcDXH072.css">
11
+ <script type="module" crossorigin src="./assets/installer-Dq_j5D8p.js"></script>
12
+ <link rel="modulepreload" crossorigin href="./assets/index-C8q85hqs.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/textarea-CaRKMTTG.js">
14
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-BheI-_hJ.js">
15
+ <link rel="stylesheet" crossorigin href="./assets/index-CsbIIOFq.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-BAGYXudo.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-BJJKraKa.js">
11
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-B6-k1D10.js">
12
- <link rel="modulepreload" crossorigin href="./assets/textarea-dtE2fZRJ.js">
13
- <link rel="modulepreload" crossorigin href="./assets/aida-control-Bwkluijq.js">
14
- <link rel="stylesheet" crossorigin href="./assets/index-DcDXH072.css">
9
+ <script type="module" crossorigin src="./assets/mini-KOisKeMi.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-C8q85hqs.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-qSXgzAHu.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/textarea-CaRKMTTG.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/aida-control-B8b5SXix.js">
14
+ <link rel="stylesheet" crossorigin href="./assets/index-CsbIIOFq.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.22",
3
+ "version": "0.31.24",
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/transcript-focus.test.mjs scripts/transcript-focus-behaviour.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-paging-hook.test.mjs scripts/seed-placement.test.mjs scripts/seed-label-gap.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.test.mjs scripts/backend-error-surfaces.test.mjs scripts/canonical-chat.test.mjs scripts/stale-caption.test.mjs scripts/desktop-watch-lease.test.mjs scripts/session-switch.test.mjs scripts/chat-search.test.mjs scripts/session-archive-delete.test.mjs scripts/chat-archived.test.mjs scripts/chat-archive-press.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/palette-contract.test.mjs scripts/palette-panel-request.test.mjs scripts/run-child-reader.test.mjs scripts/run-detail-model.test.mjs scripts/subagent-pulse.test.mjs scripts/chat-title.test.mjs scripts/clear-search.test.mjs scripts/tool-row.test.mjs scripts/working-line-clock.test.mjs scripts/attachment-url.test.mjs scripts/desktop-notifier.test.mjs scripts/launch-session.test.mjs scripts/desktop-feed.test.mjs scripts/session-status-feed.test.mjs scripts/viewer-record.test.mjs scripts/desktop-stream.test.mjs scripts/python-bytecode-cache.test.mjs scripts/preload-updater-surface.test.mjs scripts/update-affirmation.test.mjs scripts/update-global-install.test.mjs scripts/update-robustness.test.mjs scripts/merge-update-feed.test.mjs scripts/prune-bundled-resources.test.mjs scripts/bundled-runtime-layout.test.mjs scripts/verify-bundled-uv.test.mjs scripts/managed-python.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.test.mjs scripts/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",
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/transcript-focus.test.mjs scripts/transcript-focus-behaviour.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-paging-hook.test.mjs scripts/seed-placement.test.mjs scripts/seed-label-gap.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.test.mjs scripts/backend-error-surfaces.test.mjs scripts/canonical-chat.test.mjs scripts/stale-caption.test.mjs scripts/desktop-watch-lease.test.mjs scripts/session-switch.test.mjs scripts/chat-search.test.mjs scripts/session-archive-delete.test.mjs scripts/chat-archived.test.mjs scripts/chat-archive-press.test.mjs scripts/palette-search.test.mjs scripts/palette-shortcut.test.mjs scripts/palette-contract.test.mjs scripts/palette-panel-request.test.mjs scripts/run-child-reader.test.mjs scripts/run-detail-model.test.mjs scripts/subagent-pulse.test.mjs scripts/chat-title.test.mjs scripts/clear-search.test.mjs scripts/tool-row.test.mjs scripts/working-line-clock.test.mjs scripts/attachment-url.test.mjs scripts/desktop-notifier.test.mjs scripts/launch-session.test.mjs scripts/desktop-feed.test.mjs scripts/session-status-feed.test.mjs scripts/viewer-record.test.mjs scripts/desktop-stream.test.mjs scripts/python-bytecode-cache.test.mjs scripts/preload-updater-surface.test.mjs scripts/update-affirmation.test.mjs scripts/update-global-install.test.mjs scripts/update-robustness.test.mjs scripts/merge-update-feed.test.mjs scripts/prune-bundled-resources.test.mjs scripts/bundled-runtime-layout.test.mjs scripts/verify-bundled-uv.test.mjs scripts/managed-python.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/composer-readings.test.mjs scripts/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-pin-order.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.test.mjs scripts/console-mirror.test.mjs scripts/shell-path.test.mjs scripts/build-env-guard.test.mjs scripts/install-scripts-network.test.mjs scripts/console-pane-render.test.mjs scripts/settings-section-routes.test.mjs scripts/authoring-refresh.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/provider-chip-verdict.test.mjs scripts/child-reader-foot-react.test.mjs scripts/backend-spawn-address.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-sidebar-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/shared-composer.test.mjs scripts/analytics-rate-format.test.mjs scripts/provider-catalog.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-status.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/provider-detail-remount.test.mjs scripts/model-select-store.test.mjs scripts/onboarding-step-block.test.mjs scripts/onboarding-default-model.test.mjs scripts/server-release-notes.test.mjs scripts/no-hardlink-write.test.mjs scripts/canvas-goals.test.mjs scripts/overlay-drag-zones.test.mjs scripts/message-surface-floors.test.mjs scripts/header-identity-model.test.mjs scripts/pane-slot-ground.test.mjs scripts/projects-tab.test.mjs scripts/agent-hub-org-sharing.test.mjs scripts/mesh-tab.test.mjs scripts/onboarding-search-step.test.mjs scripts/provider-error-guidance.test.mjs scripts/radient-verify-callout.test.mjs scripts/sidebar-account-reconnect.test.mjs scripts/stopped-row-measure.test.mjs scripts/aida-rail-marks.test.mjs scripts/aida-sidebar.test.mjs scripts/currency-math.test.mjs scripts/mesh-canvas-bench.test.mjs scripts/agents-offer-dismiss.test.mjs scripts/projects-card-click.test.mjs scripts/lane-registration.test.mjs scripts/projects-sheet.test.mjs scripts/turn-collapse-model.test.mjs scripts/turn-collapse-behaviour.test.mjs scripts/checkpoint-model.test.mjs scripts/checkpoint-rail.test.mjs scripts/use-checkpoints.test.mjs scripts/reveal-record.test.mjs scripts/transcript-loader.test.mjs scripts/transcript-deep-jump.test.mjs scripts/thread-search-contract.test.mjs scripts/thread-search-model.test.mjs scripts/thread-search-overlay.test.mjs scripts/use-thread-search.test.mjs scripts/notification-lifetime.test.mjs scripts/transcript-rail-refusal.test.mjs scripts/use-active-checkpoint.test.mjs scripts/hold-escape-claim.test.mjs scripts/hotkey-registration.test.mjs scripts/mini-view-dictation.test.mjs scripts/mini-view-contract.test.mjs scripts/ptt-keymap-binding.test.mjs scripts/cross-session-visibility.test.mjs scripts/fold-open.test.mjs scripts/transcript-foot-slot.test.mjs scripts/chat-measure-drag.test.mjs scripts/chat-measure-handle.test.mjs scripts/header-identity-menu.test.mjs scripts/monitor-controls.test.mjs scripts/monitor-cancel-dialog.test.mjs scripts/child-transcript-paging.test.mjs scripts/loader-state-machine.test.mjs scripts/transcript-cursor-continuity.test.mjs scripts/older-history-slot.test.mjs scripts/chat-session-subagents.test.mjs scripts/message-actions.test.mjs scripts/update-indicator-segments.test.mjs scripts/reload-picker-close.test.mjs scripts/projects-time-window.test.mjs scripts/chat-sidebar-row-menu.test.mjs scripts/navigation-gesture.test.mjs scripts/right-slot-width.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,6 +0,0 @@
1
- import{r,j as e,c as L}from"./index-BJJKraKa.js";import{b as Ee,C as Ie,a as Le,i as he,y as pe,u as Fe,I as Me}from"./aida-control-Bwkluijq.js";import{o as be,u as $e,a as De,C as Ue,b as Ye}from"./org-surface-gate-Dj95j2Nj.js";import{P as qe}from"./page-header-Dz4E9Ji9.js";import{c as Ve,g as V,B as N,f as m,A as Q,h as W,i as G,q as se,r as te,s as ne,t as ie,u as B,I as Be}from"./textarea-dtE2fZRJ.js";import{e as je,a9 as re,ag as He,ah as ge,aV as Qe,r as We,aa as Ge,aW as Ze,ab as Xe,aX as Je,a5 as Ke,aY as ea,aZ as aa}from"./index-ec0p7piv.js";import{e as sa,f as ta,p as na,P as ia,b as ra,h as la}from"./use-memberships-query-CComBrZl.js";import{O as oa,A as ca,f as da,H as ua,a as ma,b as ha,c as ga,d as ve,C as xa,u as fa,i as pa}from"./use-download-agent-mutation-724n3ZAY.js";import{R as ba}from"./radient-auth-buttons-BqeoOp94.js";import"./ui-preferences-store-B6-k1D10.js";import"./error-boundary-DYh9GOqG.js";import"./console-mirror-CHRPaR1r.js";import"./en-US-BkS8Ixxl.js";import"./book-open-BI_Ayn7w.js";/**
2
- * @license lucide-react v0.507.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const ja=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]],va=Ve("circle-ellipsis",ja),Na=({agent:a,isLiked:t,isFavourited:n,onLikeToggle:i,onFavouriteToggle:o,onDownload:c,isLikeActionLoading:h=!1,isFavouriteActionLoading:y=!1,isDownloading:x=!1,actionError:d=null,onRetryAction:p,showActions:b=!0,viewerStateKnown:f=!0,orgName:j=null})=>{const k=je(),{isAuthenticated:u}=re(),_=a.description??"",[P,R]=r.useState(!1),l=r.useRef(null),v=r.useCallback(g=>{if(l.current?.disconnect(),l.current=null,!g)return;const C=()=>R(g.scrollHeight-g.clientHeight>1);C();const D=new ResizeObserver(C);D.observe(g),l.current=D},[]),M=u?f?t?"Unlike agent":"Like agent":"Your likes could not be read, so this is not shown as unliked.":"Log in to Radient to like agents",$=u?f?n?"Unfavourite agent":"Favourite agent":"Your favourites could not be read, so this is not shown as unfavourited.":"Log in to Radient to favourite agents",z=f?t?"Unlike agent":"Like agent":"Like state unavailable",O=f?n?"Unfavourite agent":"Favourite agent":"Favourite state unavailable",E=a.visibility==="org";return e.jsxs("div",{className:"flex h-full flex-col overflow-hidden rounded-md bg-surface transition-colors duration-fast ease-out-quart hover:bg-elevated",children:[e.jsxs("button",{type:"button",onClick:()=>k(`/agent-hub/${a.id}`),className:"flex min-h-0 flex-1 cursor-pointer flex-col gap-2 p-4 text-left","aria-label":`View details for ${a.name}`,children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:a.name}),E&&e.jsx(oa,{orgName:j}),e.jsx(V,{content:P?_:"",children:e.jsx("span",{ref:v,className:"line-clamp-3 min-h-0 text-body-sm text-ink-muted",children:_})}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsx(ca,{tags:a.tags,categories:a.categories}),e.jsxs("p",{className:"truncate text-ink-dim text-meta",children:[a.account_metadata?.name??"Unknown author",e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),"updated ",da(new Date(a.updated_at))," ago"]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 border-t border-hairline px-3 py-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-0.5","data-viewer-state":E?"org":u?f?"known":"unknown":"signed-out",children:[!E&&e.jsxs(e.Fragment,{children:[e.jsx(V,{content:M,children:e.jsx("span",{children:e.jsxs(N,{variant:"ghost",size:"sm",onClick:u&&f?()=>i(a.id):void 0,disabled:h||!u||!f,"aria-label":z,className:L(t&&"text-danger"),children:[e.jsx(ua,{fill:t?"currentColor":"none","data-testid":"agent-like-heart"}),e.jsx("span",{"data-testid":"agent-like-count",className:"inline-flex h-4 min-w-4 items-center font-mono text-mono-sm text-ink-muted",children:a.like_count??0})]})})}),e.jsx(V,{content:$,children:e.jsx("span",{children:e.jsxs(N,{variant:"ghost",size:"sm",onClick:u?()=>o(a.id):void 0,disabled:y||!u||!f,"aria-label":O,className:L(n&&"text-warning"),children:[e.jsx(He,{fill:n?"currentColor":"none","data-testid":"agent-favourite-star"}),e.jsx("span",{"data-testid":"agent-favourite-count",className:"inline-flex h-4 min-w-4 items-center font-mono text-mono-sm text-ink-muted",children:a.favourite_count??0})]})})})]}),e.jsx(V,{content:"Downloads",children:e.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 pr-1 text-ink-dim",children:[e.jsx(ge,{"aria-hidden":"true",className:"size-3.5"}),e.jsx("span",{className:"inline-flex h-4 min-w-6 items-center font-mono text-mono-sm",children:x?e.jsx(m,{className:"h-3 w-6"}):(a.download_count??0).toLocaleString()})]})})]}),b&&c&&e.jsx("div",{className:"ml-auto flex shrink-0 items-center",children:e.jsxs(N,{variant:"secondary",size:"sm",onClick:()=>c(a),disabled:x,"aria-label":`Download ${a.name}`,"data-tour-tag":"agent-hub-download-button",children:[e.jsx(ge,{"data-testid":"agent-download"}),"Get"]})})]}),d&&e.jsxs("output",{"data-testid":"agent-card-error",className:"flex flex-wrap items-center gap-x-2 gap-y-1 border-t border-hairline px-3 py-2 text-body-sm text-danger",children:[e.jsx("span",{className:"min-w-0 flex-1",children:d}),p&&e.jsx(N,{variant:"ghost",size:"sm",onClick:p,children:"Try again"})]})]})},ya=({agent:a,status:t,viewerStateKnown:n=!0,orgName:i=null})=>{const{isAuthenticated:o}=re(),[c,h]=r.useState(null),y=t?.liked??!1,x=t?.favourited??!1,d=ma(),p=ha(),b=ga(),f=()=>{!o||d.isPending||(h(null),d.mutate({agentId:a.id,isCurrentlyLiked:y},{onError:()=>h("like")}))},j=()=>{!o||p.isPending||(h(null),p.mutate({agentId:a.id,isCurrentlyFavourited:x},{onError:()=>h("favourite")}))},k=()=>{b.isPending||(h(null),b.mutate({agentId:a.id,agentName:a.name},{onError:()=>h("download")}))},u=c?c==="like"?{action:"like",error:d.error,retry:f}:c==="favourite"?{action:"favourite",error:p.error,retry:j}:{action:"download",error:b.error,retry:k}:null;return e.jsx(Na,{agent:a,isLiked:o&&y,isFavourited:o&&x,onLikeToggle:f,onFavouriteToggle:j,onDownload:k,isLikeActionLoading:d.isPending,isFavouriteActionLoading:p.isPending,isDownloading:b.isPending,viewerStateKnown:n,orgName:i,actionError:u?sa(u.action,u.error,a.name):null,onRetryAction:u?.retry})},xe=({selected:a,onClick:t,children:n,...i})=>e.jsx("button",{type:"button",onClick:t,"aria-pressed":a,className:L("flex w-full cursor-pointer items-center gap-2.5 rounded-sm px-3 py-1.5 text-left","text-body-sm transition-colors duration-fast ease-out-quart",a?We:"text-ink hover:bg-row-hover"),...i,children:n}),fe=Object.keys(xa),wa=a=>[...a].sort((t,n)=>{const i=fe.indexOf(t),o=fe.indexOf(n);return i!==-1&&o!==-1?i-o:i!==-1?-1:o!==-1?1:t.localeCompare(n)}),ka=({selectedCategory:a,onSelectCategory:t,categories:n})=>{const i=wa(a&&!n.includes(a)?[...n,a]:n);return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto",children:[e.jsx("h2",{className:"mb-2 px-3 font-medium text-ink-dim text-meta",children:"Categories"}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs(xe,{selected:a===null,onClick:()=>t(null),"data-testid":"category-all",children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e.jsx(Qe,{size:16,"aria-hidden":"true"})}),"All categories"]}),i.map(o=>{const c=ve(o),h=o==="other"?e.jsx(va,{size:16}):c.icon;return e.jsxs(xe,{selected:a===o,onClick:()=>t(o),"data-testid":`category-${o}`,children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:h}),c.label]},o)})]})]})},Ne={all:["org-teams"],list:a=>[...Ne.all,"list",a]},Ca=({tenantId:a,enabled:t=!0})=>{const n=Ee({queryKey:Ne.list(a??""),queryFn:async()=>(await ta(a)).result??{teams:[]},enabled:t&&!!a,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retry:Ie});return{...n,teams:n.data?.teams??[]}},Sa=(a,t)=>{const n=a?.name?.trim()||t?.trim()||"Team",i=a?.renamed_from?.trim()||null;return a?.invalid_name===!0&&i?{level:"warning",message:`Pulled "${n}". The published name "${i}" is not usable locally, so the team was stored as "${n}".`}:i?{level:"success",message:`Pulled "${n}" (you already have a team called "${i}").`}:{level:"success",message:`Pulled team "${n}".`}},Ta=()=>{const a=Le();return Ge({mutationFn:async({teamId:t,tenantId:n})=>{if(!he.baseUrl)throw new Error("Local Operator API URL is not configured.");return Je.pullOrgTeamFromRadient(he.baseUrl,t,n)},onSuccess:(t,n)=>{const i=Sa(t.result,n.name);i.level==="warning"?Ze(i.message):Xe(i.message),a.invalidateQueries({queryKey:["desktop","teams"]})},onError:t=>{console.error("Pulling an organization team failed:",t)}})},Aa=["refresh-hub","retry","sign-in"],_a=({tenantId:a,orgName:t})=>{const{teams:n,isLoading:i,isFetching:o,isError:c,error:h,refetch:y}=Ca({tenantId:a}),x=be(h),d=Ta(),[p,b]=r.useState(null),[f,j]=r.useState(null),[k,u]=r.useState(!1),_=r.useMemo(()=>{if(!Ke(d.error))return null;const l=n.find(v=>v.id===p);return na({code:d.error.code,message:d.error.message,details:d.error.details},{name:l?.name??"this team",hubAgentId:null,surface:"pull"})},[d.error,p,n]),P=(l,v)=>{switch(l){case"refresh-hub":y();break;case"retry":R(v);break;case"sign-in":u(!0);break}},R=l=>{d.isPending||(b(null),j(l.id),d.mutate({teamId:l.id,tenantId:a,name:l.name},{onSettled:()=>j(null),onError:()=>b(l.id)}))};return e.jsxs("section",{className:"mb-6 rounded-md bg-surface","aria-labelledby":"org-teams-heading","data-testid":"org-teams",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2 px-4 pt-3 pb-2",children:[e.jsx("h2",{id:"org-teams-heading",className:"font-medium text-heading text-ink",children:"Teams"}),!i&&!c&&e.jsxs("p",{className:"text-meta text-ink-dim","data-testid":"org-teams-count",children:[n.length," ",n.length===1?"team":"teams"," shared with"," ",t??"this organization"]})]}),i&&e.jsxs("div",{className:"flex flex-col gap-2 px-4 pb-4","data-testid":"org-teams-loading",children:[e.jsx("span",{className:"sr-only",children:"Loading teams…"}),e.jsxs("div",{"aria-hidden":"true",className:"flex flex-col gap-2",children:[e.jsx(m,{className:"h-4.5 w-40"}),e.jsx(m,{className:"h-3.5 w-64"})]})]}),!i&&c&&e.jsxs(Q,{variant:x?"warning":"danger",className:"mx-4 mb-4","data-testid":"org-teams-error",children:[e.jsx(W,{children:x==="plan"?"That organization needs an active Team plan":x==="no_access"?"You do not have access to that organization":"Teams could not be loaded"}),e.jsx(G,{children:x==="plan"?`Reading an organization's teams is part of the Team plan. An owner of ${t??"this organization"} can activate it in the Radient console, and then its teams will be listed here.`:x==="no_access"?`You are not a member of ${t??"that organization"}, so its teams are not listed here. An owner can invite you again.`:pe("The teams shared with this organization could not be read.",h)}),x!=="no_access"&&e.jsx("div",{className:"mt-2",children:e.jsx(N,{variant:"primary",size:"sm",onClick:()=>void y(),disabled:o,"aria-busy":o,children:o?"Trying…":"Try again"})})]}),!i&&!c&&n.length===0&&e.jsx("p",{className:"px-4 pb-4 text-body-sm text-ink-muted","data-testid":"org-teams-empty",children:"No teams have been shared with this organization yet."}),!i&&!c&&n.length>0&&e.jsx("ul",{className:"flex flex-col divide-y divide-hairline border-t border-hairline",children:n.map(l=>e.jsxs("li",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 px-4 py-2.5",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsx("span",{className:"truncate font-medium text-body text-ink",children:l.name}),e.jsxs("span",{className:"truncate text-meta text-ink-muted",children:[l.project||"No project",e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),Pa(l),l.version?e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),"v",l.version]}):null]}),p===l.id&&e.jsxs("div",{className:"mt-1 flex flex-col items-start gap-1","data-testid":"org-team-pull-error",children:[e.jsx("output",{className:"text-meta text-danger",children:_?.body??d.error?.message??`"${l.name}" could not be pulled.`}),_?.actions.filter(v=>Aa.includes(v)).map(v=>e.jsx(N,{variant:"primary",size:"sm",onClick:()=>P(v,l),children:ia[v]},v)),k&&e.jsx("div",{className:"mt-1","data-testid":"org-team-pull-reauth",children:e.jsx(ba,{titleText:"Sign in again",descriptionText:"",onSignInSuccess:()=>{u(!1),b(null),y()}})})]})]}),e.jsx(N,{variant:"secondary",size:"sm",onClick:()=>R(l),disabled:d.isPending,"aria-label":`Pull team ${l.name}`,children:f===l.id?"Pulling…":"Pull"})]},l.id))})]})},Pa=a=>a.members.length===0?"No members":a.members.map(t=>t.count>1?`${t.role} ×${t.count}`:t.role).join(", "),Ra=(a,t)=>{const[n,i]=r.useState(a);return r.useEffect(()=>{const o=setTimeout(()=>i(a),t);return()=>clearTimeout(o)},[a,t]),n},H=[{value:"download_count:desc",label:"Most downloaded",sort:"download_count",order:"desc"},{value:"like_count:desc",label:"Most liked",sort:"like_count",order:"desc"},{value:"favourite_count:desc",label:"Most favourited",sort:"favourite_count",order:"desc"},{value:"created_at:desc",label:"Newest",sort:"created_at",order:"desc"},{value:"updated_at:desc",label:"Recently updated",sort:"updated_at",order:"desc"},{value:"name:asc",label:"Name (A to Z)",sort:"name",order:"asc"}],za=[{value:"name",label:"Name"},{value:"description",label:"Description"}],Oa=300,F="public",Ea=()=>e.jsxs("div",{className:"flex h-full flex-col overflow-hidden rounded-md bg-surface",children:[e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 p-4",children:[e.jsx(m,{className:"h-5.5 w-2/3"}),e.jsx(m,{className:"h-3.5 w-full"}),e.jsx(m,{className:"h-3.5 w-full"}),e.jsx(m,{className:"h-3.5 w-1/2"}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(m,{className:"h-5.5 w-24"}),e.jsx(m,{className:"h-5.5 w-20"})]}),e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsx(m,{className:"h-5.5 w-24"})})]}),e.jsx(m,{className:"h-4.5 w-32"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 border-t border-hairline px-3 py-2",children:[e.jsx(m,{className:"size-4"}),e.jsx(m,{className:"h-4 w-6"}),e.jsx(m,{className:"size-4"}),e.jsx(m,{className:"h-4 w-6"}),e.jsx(m,{className:"ml-auto h-7 w-16"})]})]}),Ga=()=>{const a=je(),{isAuthenticated:t}=re(),[n,i]=r.useState(1),[o]=r.useState(12),[c,h]=r.useState(null),[y,x]=r.useState(""),[d,p]=r.useState("name"),[b,f]=r.useState(H[0].value),[j,k]=r.useState(F),[u,_]=r.useState([]),P=Ra(y,Oa),R=H.find(s=>s.value===b)??H[0],l=Fe(),v=ea(),M=Me(l.data,"radient_org"),$=t?De(M,v):null,{memberships:z}=ra({enabled:Ye(M)}),O=r.useMemo(()=>$e(z),[z]),E=j===F||O.some(s=>s.tenant_id===j);r.useEffect(()=>{E||k(F)},[E]);const g=j===F?null:O.find(s=>s.tenant_id===j)??null,C=g?.tenant_id,D=g?.role==="owner"||g?.role==="admin",ye=r.useMemo(()=>new Map(z.map(s=>[s.tenant_id,s.tenant_name])),[z]),{data:U,agents:we,isLoading:ke,isFetching:S,error:T,refetch:le,pagination:A}=la({page:n,perPage:o,categories:c?[c]:void 0,name:d==="name"&&P||void 0,description:d==="description"&&P||void 0,sort:R.sort,order:R.order,tenantId:C}),I=g?be(T):null,Y=we??[],oe=S&&U!==void 0,{statuses:ce,isKnown:Ce,isError:Se,isFetching:Z,refetch:Te}=fa({agentIds:C?[]:Y.map(s=>s.id)}),X=r.useRef(null),J=r.useRef(null),[de,Ae]=r.useState(0);r.useEffect(()=>{de!==0&&(X.current??J.current)?.focus()},[de]);const ue=r.useRef(null),K=r.useRef(!1),ee=r.useMemo(()=>[...new Set((U?.records??[]).flatMap(s=>s.categories??[]))],[U]);r.useEffect(()=>{_(s=>ee.every(ae=>s.includes(ae))?s:[...new Set([...s,...ee])])},[ee]);const q=c!==null||P!=="",_e=()=>{h(null),x(""),i(1),Ae(s=>s+1)},w=(ke||S)&&U===void 0,me=!w&&!q&&(T!==null||Y.length===0);r.useEffect(()=>{!K.current||w||(K.current=!1,T?ue.current?.focus():(X.current??J.current)?.focus())},[w,T]);const Pe=s=>{i(s)},Re=s=>{h(s),i(1)},ze=s=>{x(s),i(1)},Oe=s=>{p(s),i(1)};return e.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[e.jsx(qe,{title:"Agent hub",subtitle:"Discover and download community agents on Radient",icon:aa}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-row overflow-hidden",children:[e.jsx("div",{className:"mr-6 hidden w-60 shrink-0 rounded-md bg-surface p-2 md:block","data-tour-tag":"agent-hub-sidebar-container",children:!me&&e.jsx(ka,{selectedCategory:c,onSelectCategory:Re,categories:u})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-y-auto",children:[$&&e.jsxs(Q,{variant:"warning",className:"mb-3 max-w-2xl","data-testid":"agent-hub-org-unavailable",children:[e.jsx(W,{children:"Organizations are unavailable"}),e.jsx(G,{children:$})]}),O.length>0&&e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[e.jsx("span",{id:"agent-hub-scope-label",className:"text-meta text-ink-muted",children:"Showing"}),e.jsxs(se,{value:j,onValueChange:s=>{k(s),i(1)},children:[e.jsx(te,{className:"w-56","aria-labelledby":"agent-hub-scope-label","data-testid":"agent-hub-scope",children:e.jsx(ne,{})}),e.jsxs(ie,{children:[e.jsx(B,{value:F,children:"Public hub"}),O.map(s=>e.jsx(B,{value:s.tenant_id,children:s.tenant_name||"Organization"},s.tenant_id))]})]})]}),!me&&e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:L("flex min-w-56 flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(Be,{ref:X,type:"search",value:y,onChange:s=>ze(s.target.value),placeholder:"Search agents","aria-label":"Search agents",className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none","data-testid":"agent-hub-search"}),e.jsxs(se,{value:d,onValueChange:Oe,children:[e.jsx(te,{className:"w-auto shrink-0 border-y-0 border-l border-hairline border-r-0 bg-transparent pl-2 outline-none","aria-label":"Search in","data-testid":"agent-hub-search-scope",children:e.jsx(ne,{})}),e.jsx(ie,{children:za.map(s=>e.jsx(B,{value:s.value,children:s.label},s.value))})]})]}),e.jsxs(se,{value:b,onValueChange:f,children:[e.jsx(te,{className:"w-48","aria-label":"Sort agents","data-testid":"agent-hub-sort",children:e.jsx(ne,{})}),e.jsx(ie,{children:H.map(s=>e.jsx(B,{value:s.value,children:s.label},s.value))})]})]}),e.jsxs("p",{"aria-live":"polite",className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-status",children:[w?"Loading agents…":A?`${A.totalRecords} ${A.totalRecords===1?"agent":"agents"}`:"",oe?e.jsx(e.Fragment,{children:" Updating…"}):null]}),t&&Se&&e.jsxs("output",{className:"mb-3 flex flex-wrap items-center gap-2 text-meta text-warning","data-testid":"agent-hub-status-unknown",children:[e.jsx("span",{children:"Your likes and favourites could not be read, so no card shows a viewer state."}),e.jsx(N,{variant:"ghost",size:"sm",onClick:()=>void Te(),disabled:Z,"aria-busy":Z,children:Z?"Trying…":"Try again"})]}),w&&e.jsx("div",{"data-testid":"agent-hub-loading",className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6",children:Array.from({length:6},(s,ae)=>e.jsx(Ea,{},ae))}),w&&A===void 0&&e.jsx("div",{"aria-hidden":"true",className:"mt-6 flex min-h-13 items-center justify-center","data-testid":"agent-hub-pager-placeholder",children:e.jsx(m,{className:"h-4 w-24"})}),e.jsx("output",{"aria-live":"polite","data-testid":"agent-hub-outage",className:L(!w&&T&&!I?"block":"sr-only"),children:!w&&T&&!I&&e.jsxs(Q,{variant:"danger",className:"max-w-2xl","aria-busy":S,"data-testid":"agent-hub-error",children:[e.jsx(W,{children:t?"The hub could not be loaded":"Sign in to use the hub"}),e.jsx(G,{children:t?pe("The agent list could not be loaded.",T):"You are not signed in to Radient, so the hub has no credential to read the agent list with. Sign in on the settings page, then try again."}),e.jsx("div",{className:"mt-2",children:e.jsx(N,{ref:ue,variant:"outline",size:"sm",onClick:()=>{K.current=!0,le()},disabled:S,"aria-busy":S,children:S?"Trying…":"Try again"})})]})}),!w&&I&&g&&e.jsxs(Q,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-no-access",children:[e.jsx(W,{children:I==="plan"?"That organization needs an active Team plan":"You do not have access to that organization"}),e.jsx(G,{children:I==="plan"?`Sharing agents inside an organization is part of the Team plan. An owner of ${g.tenant_name||"this organization"} can activate it in the Radient console, and then its agents will be listed here.`:`You are not a member of ${g.tenant_name||"that organization"}, so its agents are not listed here. An owner can invite you again.`}),I==="plan"&&e.jsx("div",{className:"mt-2",children:e.jsx(N,{variant:"primary",size:"sm",onClick:()=>void le(),disabled:S,"aria-busy":S,children:S?"Trying…":"Try again"})})]}),!w&&!T&&e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6","aria-busy":oe,children:Y.length===0?e.jsxs("div",{"data-testid":"agent-hub-empty",className:L("col-span-full w-full flex flex-col items-center gap-2 rounded-md bg-surface px-6 py-10 text-center",!C&&"max-w-2xl justify-self-center"),children:[e.jsx("p",{className:"text-heading text-ink",children:C?"This organization has no shared agents yet.":c?`No agents in ${ve(c).label}.`:q?"No agents match that search.":"The hub is empty."}),e.jsx("p",{className:"max-w-md text-body-sm text-ink-muted",children:C?`Agents published into ${g?.tenant_name||"this organization"} appear here for its members.`:c?"Nothing in this category yet. Clear the filter to see the whole hub.":q?"No agent's name or description carries that. Clear it to see the whole hub.":"Nobody has published an agent yet. Yours could be the first."}),e.jsx("div",{className:"mt-2 flex flex-wrap items-center justify-center gap-2",children:q?e.jsx(N,{variant:"secondary",onClick:_e,children:c?"Clear filter":"Clear search"}):C&&!D?null:e.jsx(N,{ref:J,variant:"secondary",onClick:()=>a("/agents"),children:"Publish an agent"})})]}):Y.map(s=>e.jsx(ya,{agent:s,status:t?ce[s.id]:void 0,viewerStateKnown:t&&pa(Ce,ce,s.id),orgName:s.visibility==="org"?ye.get(s.tenant_id)??null:null},s.id))}),!w&&A&&A.totalPages>1&&e.jsx("div",{className:"mt-6 flex justify-center",children:e.jsx(Ue,{count:A.totalPages,page:A.page,onChange:Pe})}),g&&e.jsx(_a,{tenantId:g.tenant_id,orgName:g.tenant_name||null})]})]})]})};export{Ga as AgentHubPage};