local-operator-ui 0.37.0 → 0.38.0

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 (98) hide show
  1. package/out/main/index.js +318 -62
  2. package/out/preload/index.js +28 -2
  3. package/out/renderer/assets/{_basePickBy-Ccz_FVoP.js → _basePickBy-DhcDqJuW.js} +1 -1
  4. package/out/renderer/assets/{_baseUniq-i6vGpLRc.js → _baseUniq-DlAVpNmp.js} +1 -1
  5. package/out/renderer/assets/{agent-details-page-Vg5HG_l0.js → agent-details-page-ydYZH4Kq.js} +2 -2
  6. package/out/renderer/assets/agent-hub-page-C46GCUT2.js +6 -0
  7. package/out/renderer/assets/agents-page-BaARss9y.js +7 -0
  8. package/out/renderer/assets/{arc-B4AUWIOq.js → arc-C-BSLMbh.js} +1 -1
  9. package/out/renderer/assets/{architectureDiagram-IEHRJDOE-B6S5IVGr.js → architectureDiagram-IEHRJDOE-nDfnCWAM.js} +1 -1
  10. package/out/renderer/assets/{arrow-up-BQ3q9CbG.js → arrow-up-JQ86w8h2.js} +1 -1
  11. package/out/renderer/assets/{blockDiagram-JOT3LUYC-LpW3K6pq.js → blockDiagram-JOT3LUYC-BJgd2uGT.js} +1 -1
  12. package/out/renderer/assets/{book-open-1KhbTE6j.js → book-open-yjstLkVS.js} +1 -1
  13. package/out/renderer/assets/browser-page-BVFs2_w9.js +1 -0
  14. package/out/renderer/assets/{browser-webauthn-prompt-DW_0ckOh.js → browser-webauthn-prompt-Ch0P_oH9.js} +1 -1
  15. package/out/renderer/assets/{building-2-B-r5qz8T.js → building-2-Cupv31tS.js} +1 -1
  16. package/out/renderer/assets/{c4Diagram-VJAJSXHY-CAqRIAIW.js → c4Diagram-VJAJSXHY-lIXnBLZ5.js} +1 -1
  17. package/out/renderer/assets/channel-BqEnrEwi.js +1 -0
  18. package/out/renderer/assets/{chunk-4BMEZGHF-xA1Nsxex.js → chunk-4BMEZGHF-DF2ktHZp.js} +1 -1
  19. package/out/renderer/assets/{chunk-A2AXSNBT-CUDzamID.js → chunk-A2AXSNBT-CNRON9Qy.js} +1 -1
  20. package/out/renderer/assets/{chunk-AEK57VVT-DlMRhXPR.js → chunk-AEK57VVT-BGXI1SR5.js} +1 -1
  21. package/out/renderer/assets/{chunk-D6G4REZN-VcBIri9Q.js → chunk-D6G4REZN-CW_SyuGg.js} +1 -1
  22. package/out/renderer/assets/{chunk-RZ5BOZE2-CCsj9xK4.js → chunk-RZ5BOZE2-gU0oYsA6.js} +1 -1
  23. package/out/renderer/assets/{chunk-XZIHB7SX-CKTgVOcT.js → chunk-XZIHB7SX-BrVtbfMc.js} +1 -1
  24. package/out/renderer/assets/classDiagram-GIVACNV2-DNUqXdeF.js +1 -0
  25. package/out/renderer/assets/classDiagram-v2-COTLJTTW-DNUqXdeF.js +1 -0
  26. package/out/renderer/assets/clone-_PvxPvQz.js +1 -0
  27. package/out/renderer/assets/{console-mirror-rnDJat8Q.js → console-mirror-CkCxHgcU.js} +1 -1
  28. package/out/renderer/assets/{consoleCapture-BDAHhWI6.js → consoleCapture-EZYleEWx.js} +1 -1
  29. package/out/renderer/assets/{conversation-input-sync-DkdrIqiD.js → conversation-input-sync-bgD4kyw3.js} +278 -278
  30. package/out/renderer/assets/{dagre-OKDRZEBW-BLJ3cLu1.js → dagre-OKDRZEBW-BDR0956-.js} +1 -1
  31. package/out/renderer/assets/{diagram-SSKATNLV-BH0p-5Dv.js → diagram-SSKATNLV-DbCZDtm7.js} +1 -1
  32. package/out/renderer/assets/{diagram-VNBRO52H-B82m2-a7.js → diagram-VNBRO52H-BpXb_OjM.js} +1 -1
  33. package/out/renderer/assets/{erDiagram-Q7BY3M3F-B49jRhsr.js → erDiagram-Q7BY3M3F-CZukR1Y4.js} +1 -1
  34. package/out/renderer/assets/{error-boundary-2fpGTHTH.js → error-boundary-DJAF_aYL.js} +1 -1
  35. package/out/renderer/assets/{flowDiagram-4HSFHLVR-OEuTrGbc.js → flowDiagram-4HSFHLVR-CqKOnXAd.js} +1 -1
  36. package/out/renderer/assets/{ganttDiagram-APWFNJXF-WrHus6zK.js → ganttDiagram-APWFNJXF-B9I0smi4.js} +1 -1
  37. package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-sdpNtvIC.js → gitGraphDiagram-7IBYFJ6S-Bj6-u-5w.js} +1 -1
  38. package/out/renderer/assets/{graph-CPx4Z3cH.js → graph-BsgoQZc2.js} +1 -1
  39. package/out/renderer/assets/{hash-MswM3CQT.js → hash-BLfEUuGg.js} +1 -1
  40. package/out/renderer/assets/index-CL2MVLxd.css +1 -0
  41. package/out/renderer/assets/{index-bD-9hTJ5.js → index-D7pJoOu_.js} +1 -1
  42. package/out/renderer/assets/index-N0lyyVVo.js +57 -0
  43. package/out/renderer/assets/index-jVCAPb0a.js +825 -0
  44. package/out/renderer/assets/{index-D0ZcaKHz.js → index-lMi7GI2V.js} +1 -1
  45. package/out/renderer/assets/{infoDiagram-PH2N3AL5-CgbaZe5Z.js → infoDiagram-PH2N3AL5-DQ3aMjor.js} +1 -1
  46. package/out/renderer/assets/{installer-GzNnUma-.js → installer-Ch3nb3kq.js} +1 -1
  47. package/out/renderer/assets/{journeyDiagram-U35MCT3I-CIWLEQby.js → journeyDiagram-U35MCT3I-B_RccO_x.js} +1 -1
  48. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-ORj0JKQO.js → kanban-definition-NDS4AKOZ-BvVJZaiy.js} +1 -1
  49. package/out/renderer/assets/{layout-5wBU4YOj.js → layout-DCACUDHF.js} +1 -1
  50. package/out/renderer/assets/{legacy-agents-page-ou1Xp1az.js → legacy-agents-page-BovdqsXe.js} +4 -4
  51. package/out/renderer/assets/{library-page-BloF_iPE.js → library-page-Cm-o3Z-q.js} +3 -3
  52. package/out/renderer/assets/{mermaid.core-bCTq7TEV.js → mermaid.core-BXcegHmP.js} +5 -5
  53. package/out/renderer/assets/{mesh-page-IaVtAjU1.js → mesh-page-ChyvMUoR.js} +1 -1
  54. package/out/renderer/assets/{mindmap-definition-ALO5MXBD-Ddhl_xII.js → mindmap-definition-ALO5MXBD-Bx_gU6ka.js} +1 -1
  55. package/out/renderer/assets/{mini-CwNeJTk5.js → mini-DRt4PdyG.js} +1 -1
  56. package/out/renderer/assets/{notebook-pen-BY9EwH-7.js → notebook-pen-CKr2WSrK.js} +1 -1
  57. package/out/renderer/assets/org-access-CU1oOVqv.js +1 -0
  58. package/out/renderer/assets/{org-surface-gate-B-MS3UYv.js → org-surface-gate-C86b758Z.js} +1 -1
  59. package/out/renderer/assets/{page-header-CD8VERYn.js → page-header-CZcbRwLy.js} +1 -1
  60. package/out/renderer/assets/{pieDiagram-IB7DONF6-STqRBD1R.js → pieDiagram-IB7DONF6-jEzs31M9.js} +1 -1
  61. package/out/renderer/assets/{projects-page-EY7aplWJ.js → projects-page-BSvdM2gY.js} +1 -1
  62. package/out/renderer/assets/publication-validation-g2Kk53C8.js +1 -0
  63. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-D93w-jxI.js → quadrantDiagram-7GDLP6J5-C07DLJe_.js} +1 -1
  64. package/out/renderer/assets/{radar-MK3ICKWK-Dh3CwqLm.js → radar-MK3ICKWK-DFqDL3G4.js} +1 -1
  65. package/out/renderer/assets/{radient-auth-buttons-BuUoxJkL.js → radient-auth-buttons-DP81yj6b.js} +1 -1
  66. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-pKCmrqyl.js → requirementDiagram-KVF5MWMF-DZVSGDrD.js} +1 -1
  67. package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-Dv2syjv2.js → sankeyDiagram-QLVOVGJD-Efyu9UfS.js} +1 -1
  68. package/out/renderer/assets/{schedules-page-DJ7BtTi7.js → schedules-page-CNIApkVt.js} +1 -1
  69. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-D14uGazi.js → sequenceDiagram-X6HHIX6F-C5QQ4cH3.js} +1 -1
  70. package/out/renderer/assets/{settings-page-BPkUfxJX.js → settings-page-Cd8GUEn_.js} +1 -1
  71. package/out/renderer/assets/{smartart-uE0Bdv7c.js → smartart-DAuiyto3.js} +1 -1
  72. package/out/renderer/assets/{stateDiagram-DGXRK772-CTKP8UrZ.js → stateDiagram-DGXRK772-DlvSEVs4.js} +1 -1
  73. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CCLt0TcZ.js +1 -0
  74. package/out/renderer/assets/{team-bridge-page-ClnOkizZ.js → team-bridge-page-CosfhCZV.js} +2 -2
  75. package/out/renderer/assets/{timeline-definition-BDJGKUSR-bs2AK5mP.js → timeline-definition-BDJGKUSR-XgOjVv3O.js} +1 -1
  76. package/out/renderer/assets/ui-preferences-store-C91RrpgH.js +1 -0
  77. package/out/renderer/assets/{use-download-agent-mutation-B3IkEPEZ.js → use-download-agent-mutation-B-kxWpF6.js} +4 -4
  78. package/out/renderer/assets/{use-session-snapshot-BKx6oLGB.js → use-session-snapshot-BiiULlsj.js} +1 -1
  79. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-B8vPLffn.js → xychartDiagram-VJFVF3MP-B0CsPCbY.js} +1 -1
  80. package/out/renderer/console-capture.html +5 -5
  81. package/out/renderer/index.html +7 -7
  82. package/out/renderer/installer.html +4 -4
  83. package/out/renderer/mini.html +7 -7
  84. package/package.json +3 -3
  85. package/out/renderer/assets/agent-hub-page-K4pCiyVg.js +0 -6
  86. package/out/renderer/assets/agents-page-DO-dA64a.js +0 -7
  87. package/out/renderer/assets/browser-page-C2PcMomi.js +0 -1
  88. package/out/renderer/assets/channel-C3p9uq-y.js +0 -1
  89. package/out/renderer/assets/classDiagram-GIVACNV2-E64bGPOA.js +0 -1
  90. package/out/renderer/assets/classDiagram-v2-COTLJTTW-E64bGPOA.js +0 -1
  91. package/out/renderer/assets/clone-Cp6fbpqM.js +0 -1
  92. package/out/renderer/assets/index-Bt4e_nGt.js +0 -57
  93. package/out/renderer/assets/index-CXF8GwAZ.js +0 -825
  94. package/out/renderer/assets/index-Ct_f1nHS.css +0 -1
  95. package/out/renderer/assets/org-access-c2-UvVYd.js +0 -1
  96. package/out/renderer/assets/publication-validation-cVu_vGjF.js +0 -1
  97. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-C1y1no_O.js +0 -1
  98. package/out/renderer/assets/ui-preferences-store-B5lixHt9.js +0 -1
@@ -1,4 +1,4 @@
1
- import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-bCTq7TEV.js";import{x as kt,v as Tt,y as Rt}from"./conversation-input-sync-DkdrIqiD.js";import"./index-Bt4e_nGt.js";import"./ui-preferences-store-B5lixHt9.js";import"./error-boundary-2fpGTHTH.js";var at=function(){var t=n(function(B,h,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=h);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],y=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],r=[1,36],D=[1,37],N=[1,43],mt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,l,c,u,m,a,X){var x=a.length-1;switch(m){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(y,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:39,13:38,24:N,27:mt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:mt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,l){if(l.recoverable)this.trace(h);else{var c=new Error(h);throw c.hash=l,c}},"parseError"),parse:n(function(h){var l=this,c=[0],u=[],m=[null],a=[],X=this.table,x="",G=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(h,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,m.length=m.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(G+1)+`:
1
+ import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-BXcegHmP.js";import{x as kt,v as Tt,y as Rt}from"./conversation-input-sync-bgD4kyw3.js";import"./index-N0lyyVVo.js";import"./ui-preferences-store-C91RrpgH.js";import"./error-boundary-DJAF_aYL.js";var at=function(){var t=n(function(B,h,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=h);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],y=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],r=[1,36],D=[1,37],N=[1,43],mt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,l,c,u,m,a,X){var x=a.length-1;switch(m){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(y,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:39,13:38,24:N,27:mt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:mt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,l){if(l.recoverable)this.trace(h);else{var c=new Error(h);throw c.hash=l,c}},"parseError"),parse:n(function(h){var l=this,c=[0],u=[],m=[null],a=[],X=this.table,x="",G=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(h,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,m.length=m.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(G+1)+`:
2
2
  `+A.showPosition()+`
3
3
  Expecting `+Q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":nt="Parse error on line "+(G+1)+": Unexpected "+(w==wt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(nt,{text:A.match,token:this.terminals_[w]||w,line:A.yylineno,loc:et,expected:Q})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+w);switch(v[0]){case 1:c.push(w),m.push(A.yytext),a.push(A.yylloc),c.push(v[1]),w=null,Ct=A.yyleng,x=A.yytext,G=A.yylineno,et=A.yylloc;break;case 2:if(M=this.productions_[v[1]][1],z.$=m[m.length-M],z._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},Jt&&(z._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),st=this.performAction.apply(z,[x,Ct,G,W.yy,v[1],m,a].concat(Zt)),typeof st<"u")return st;M&&(c=c.slice(0,-1*M*2),m=m.slice(0,-1*M),a=a.slice(0,-1*M)),c.push(this.productions_[v[1]][0]),m.push(z.$),a.push(z._$),_t=X[c[c.length-2]][c[c.length-1]],c.push(_t);break;case 3:return!0}}return!0},"parse")},Qt=function(){var B={EOF:1,parseError:n(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw new Error(l)},"parseError"),setInput:n(function(h,l){return this.yy=l||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var l=h.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:n(function(h){var l=h.length,c=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var h=this.pastInput(),l=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
@@ -6,11 +6,11 @@
6
6
  <title>Local Operator Console Capture</title>
7
7
  <meta http-equiv="Content-Security-Policy"
8
8
  content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
9
- <script type="module" crossorigin src="./assets/consoleCapture-BDAHhWI6.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-Bt4e_nGt.js">
11
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-B5lixHt9.js">
12
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-rnDJat8Q.js">
13
- <link rel="stylesheet" crossorigin href="./assets/index-Ct_f1nHS.css">
9
+ <script type="module" crossorigin src="./assets/consoleCapture-EZYleEWx.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-N0lyyVVo.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-C91RrpgH.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-CkCxHgcU.js">
13
+ <link rel="stylesheet" crossorigin href="./assets/index-CL2MVLxd.css">
14
14
  <link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
15
15
  </head>
16
16
 
@@ -41,13 +41,13 @@
41
41
  <meta http-equiv="Content-Security-Policy"
42
42
  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: lo-supplement: http://localhost:1111 http://127.0.0.1:1111 https://accounts.google.com https://login.microsoftonline.com" />
43
43
  <meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin-allow-popups" />
44
- <script type="module" crossorigin src="./assets/index-CXF8GwAZ.js"></script>
45
- <link rel="modulepreload" crossorigin href="./assets/index-Bt4e_nGt.js">
46
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-B5lixHt9.js">
47
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-2fpGTHTH.js">
48
- <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-DkdrIqiD.js">
49
- <link rel="modulepreload" crossorigin href="./assets/console-mirror-rnDJat8Q.js">
50
- <link rel="stylesheet" crossorigin href="./assets/index-Ct_f1nHS.css">
44
+ <script type="module" crossorigin src="./assets/index-jVCAPb0a.js"></script>
45
+ <link rel="modulepreload" crossorigin href="./assets/index-N0lyyVVo.js">
46
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-C91RrpgH.js">
47
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-DJAF_aYL.js">
48
+ <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-bgD4kyw3.js">
49
+ <link rel="modulepreload" crossorigin href="./assets/console-mirror-CkCxHgcU.js">
50
+ <link rel="stylesheet" crossorigin href="./assets/index-CL2MVLxd.css">
51
51
  <link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-CAX4_ErH.css">
52
52
  <link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
53
53
  <link rel="stylesheet" crossorigin href="./assets/index-DHKnfVbX.css">
@@ -8,10 +8,10 @@
8
8
  <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
9
9
  <meta http-equiv="Content-Security-Policy"
10
10
  content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:" />
11
- <script type="module" crossorigin src="./assets/installer-GzNnUma-.js"></script>
12
- <link rel="modulepreload" crossorigin href="./assets/index-Bt4e_nGt.js">
13
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-2fpGTHTH.js">
14
- <link rel="stylesheet" crossorigin href="./assets/index-Ct_f1nHS.css">
11
+ <script type="module" crossorigin src="./assets/installer-Ch3nb3kq.js"></script>
12
+ <link rel="modulepreload" crossorigin href="./assets/index-N0lyyVVo.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-DJAF_aYL.js">
14
+ <link rel="stylesheet" crossorigin href="./assets/index-CL2MVLxd.css">
15
15
  </head>
16
16
 
17
17
  <body>
@@ -6,13 +6,13 @@
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-CwNeJTk5.js"></script>
10
- <link rel="modulepreload" crossorigin href="./assets/index-Bt4e_nGt.js">
11
- <link rel="modulepreload" crossorigin href="./assets/error-boundary-2fpGTHTH.js">
12
- <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-B5lixHt9.js">
13
- <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-DkdrIqiD.js">
14
- <link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-BKx6oLGB.js">
15
- <link rel="stylesheet" crossorigin href="./assets/index-Ct_f1nHS.css">
9
+ <script type="module" crossorigin src="./assets/mini-DRt4PdyG.js"></script>
10
+ <link rel="modulepreload" crossorigin href="./assets/index-N0lyyVVo.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/error-boundary-DJAF_aYL.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/ui-preferences-store-C91RrpgH.js">
13
+ <link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-bgD4kyw3.js">
14
+ <link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-BiiULlsj.js">
15
+ <link rel="stylesheet" crossorigin href="./assets/index-CL2MVLxd.css">
16
16
  <link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-CAX4_ErH.css">
17
17
  </head>
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-operator-ui",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
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",
@@ -90,7 +90,7 @@
90
90
  "test:window-guards": "node scripts/window-guards-electron.test.mjs",
91
91
  "test:window-glass": "node --test scripts/window-glass-cdp.test.mjs",
92
92
  "test:tag-dialogs": "node scripts/run-desktop-tests.mjs scripts/chat-tag-dialogs-immediate.test.mjs scripts/chat-tag-dialogs-escape.test.mjs",
93
- "test:desktop": "node scripts/run-desktop-tests.mjs scripts/browser-startup.test.mjs scripts/agents-config-summary.test.mjs scripts/agents-config-retry.test.mjs scripts/agent-class-toggle.test.mjs scripts/agent-messages-busy.test.mjs scripts/agent-messages-dialog.test.mjs scripts/agent-messages-model.test.mjs scripts/agent-messages-settings.test.mjs scripts/team-member-overrides.test.mjs scripts/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/check-evidence-structure.test.mjs scripts/capture-evidence.test.mjs scripts/evidence-tz.test.mjs scripts/desktop-contract.test.mjs scripts/transcript-reducer.test.mjs scripts/transcript-focus.test.mjs scripts/transcript-focus-behaviour.test.mjs scripts/transcript-dom-window.test.mjs scripts/transcript-dom-window-hook.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-paging-hook.test.mjs scripts/seed-placement.test.mjs scripts/seed-label-gap.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/session-load-sequence.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.test.mjs scripts/speech-settings.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/desktop-test-lane-bound.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/image-gen-card.test.mjs scripts/job-cancel-panel.test.mjs scripts/job-controls.test.mjs scripts/working-line-clock.test.mjs scripts/attachment-url.test.mjs scripts/file-blob-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/managed-python-transaction.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/spend-payment-basis.test.mjs scripts/composer-readings.test.mjs scripts/composer-file-drop.test.mjs scripts/ask-draft-swap.test.mjs scripts/ask-queue.test.mjs scripts/session-asks.test.mjs scripts/library-markdown.test.mjs scripts/library-model.test.mjs scripts/library-page.test.mjs scripts/library-pptx.test.mjs scripts/ask-revise.test.mjs scripts/ask-composer-no-routing.test.mjs scripts/ask-open-policy.test.mjs scripts/ask-open-render.test.mjs scripts/ask-other.test.mjs scripts/composer-queued-send.test.mjs scripts/composer-tabs.test.mjs scripts/scroll-region-to-top.test.mjs scripts/ask-options.test.mjs scripts/click-proof-expect.test.mjs scripts/window-mode.test.mjs scripts/relaunch-during-quit-proof.test.mjs scripts/about-panel.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/desktop-test-memory-guard.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/finder-files.test.mjs scripts/finder-reveal-scroll.test.mjs scripts/session-files-hook.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/context-readout-monotonic.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/check-design-kit.test.mjs scripts/check-geometry-sources.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/draft-slash-identity.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chord.test.mjs scripts/browser-page-controls.test.mjs scripts/browser-find-row.test.mjs scripts/browser-chord-renderer.test.mjs scripts/browser-chrome.test.mjs scripts/browser-tab-management.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/renderer-driver-api.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/agent-shell-spawn-env.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-hover-intent.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/panel-rail.test.mjs scripts/backend-settings-tiers.test.mjs scripts/settings-language-row.test.mjs scripts/backend-settings-collapse.test.mjs scripts/check-build-env.test.mjs scripts/asks-app-regression.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/retention-duration.test.mjs scripts/typed-row-call-sites.test.mjs scripts/palette-focus.test.mjs scripts/composer-seeding.test.mjs scripts/skill-invocation.test.mjs scripts/skill-list.test.mjs scripts/skill-highlight.test.mjs scripts/theme-inline.test.mjs scripts/composer-refusal.test.mjs scripts/ci-scope.test.mjs scripts/browser-tab-strip-focus.test.mjs scripts/projects-board-focus.test.mjs scripts/browser-file-transfer-row.test.mjs scripts/link-targets.test.mjs scripts/link-actions.test.mjs scripts/chat-link-affordances.test.mjs scripts/streaming-markdown-parity.test.mjs scripts/transcription-failure-copy.test.mjs scripts/backend-version-drift.test.mjs scripts/live-seed-placement.test.mjs scripts/agents-publication.test.mjs scripts/agent-hub-queries.test.mjs scripts/install-builtin-batch.test.mjs scripts/install-progress.test.mjs scripts/attention-seen.test.mjs scripts/mark-all-read-control.test.mjs scripts/update-global-guard.test.mjs scripts/delivery-gate.test.mjs scripts/canvas-file-freshness.test.mjs scripts/no-websocket-plane.test.mjs scripts/update-window-report.test.mjs scripts/canvas-tab-close.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/webauthn.test.mjs scripts/render-mac-entitlements.test.mjs scripts/row-state-floors.test.mjs scripts/pairing-card-copy.test.mjs scripts/update-install-copy.test.mjs scripts/update-shipit.test.mjs scripts/console-close.test.mjs scripts/console-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-pin-order.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.test.mjs scripts/console-i18n-fit.test.mjs scripts/console-mirror.test.mjs scripts/shell-path.test.mjs scripts/build-env-guard.test.mjs scripts/install-scripts-network.test.mjs scripts/console-pane-render.test.mjs scripts/settings-section-routes.test.mjs scripts/authoring-refresh.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/provider-chip-verdict.test.mjs scripts/child-reader-foot-react.test.mjs scripts/backend-spawn-address.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-sidebar-agents.test.mjs scripts/chat-sidebar-view.test.mjs scripts/chat-sidebar-time-order.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/drafts-clear-on-send.test.mjs scripts/chat-sidebar-drafts.test.mjs scripts/undo-toasts.test.mjs scripts/chat-sidebar-sections.test.mjs scripts/titlebar-options.test.mjs scripts/lane-leading.test.mjs scripts/trace-fold-model.test.mjs scripts/trace-fold-behaviour.test.mjs scripts/chat-status-strip.test.mjs scripts/chat-pane-floors.test.mjs scripts/path-utils.test.mjs scripts/window-chrome.test.mjs scripts/chat-sidebar-scope-paging.test.mjs scripts/chat-sidebar-connection-voices.test.mjs scripts/integration-model.test.mjs scripts/mcp-catalog-parity.test.mjs scripts/mcp-catalog-transport.test.mjs scripts/btw-aside.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-text-authority.test.mjs scripts/shared-composer.test.mjs scripts/analytics-rate-format.test.mjs scripts/provider-catalog.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-status.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/provider-detail-remount.test.mjs scripts/model-select-store.test.mjs scripts/onboarding-step-block.test.mjs scripts/onboarding-default-model.test.mjs scripts/onboarding-i18n-contract.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/media-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/agent-hub-public-teams.test.mjs scripts/mesh-tab.test.mjs scripts/peers-catalogue.test.mjs scripts/onboarding-search-step.test.mjs scripts/provider-error-guidance.test.mjs scripts/radient-verify-callout.test.mjs scripts/phone-access-block.test.mjs scripts/sidebar-account-reconnect.test.mjs scripts/stopped-row-measure.test.mjs scripts/aida-rail-marks.test.mjs scripts/aida-sidebar.test.mjs scripts/currency-math.test.mjs scripts/mesh-canvas-bench.test.mjs scripts/agents-offer-dismiss.test.mjs scripts/projects-card-click.test.mjs scripts/lane-registration.test.mjs scripts/team-initials.test.mjs scripts/projects-sheet.test.mjs scripts/turn-collapse-model.test.mjs scripts/collapse-plan-per-pass.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/held-claim-reach.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-remote.test.mjs scripts/chat-session-copy-id.test.mjs scripts/header-identity-menu.test.mjs scripts/hub-updates.test.mjs scripts/hub-link-view.test.mjs scripts/hub-links-scene.test.mjs scripts/hub-skills-capability.test.mjs scripts/hub-mutation-safety.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/transcript-copy-affordances.test.mjs scripts/update-indicator-segments.test.mjs scripts/reload-picker-close.test.mjs scripts/picker-default-checkbox.test.mjs scripts/projects-time-window.test.mjs scripts/audio-recording-levels.test.mjs scripts/chat-sidebar-row-menu.test.mjs scripts/chat-sidebar-tags.test.mjs scripts/navigation-gesture.test.mjs scripts/fleet-asks.test.mjs scripts/right-slot-width.test.mjs scripts/right-slot-memory.test.mjs scripts/transcript-fade.test.mjs scripts/agents-config-probe-cadence.test.mjs scripts/turn-segments.test.mjs scripts/turn-partition-predicate.test.mjs scripts/chat-device-model.test.mjs scripts/chat-device-placement.test.mjs scripts/org-teams-summary.test.mjs scripts/markdown-table-widths.test.mjs scripts/turn-answer-rail.test.mjs scripts/scrollbar-activity.test.mjs scripts/stt-mic-gate-session.test.mjs scripts/transcript-perflush-perf.test.mjs scripts/speech-clip.test.mjs scripts/speech-store.test.mjs scripts/speech-controls.test.mjs scripts/speech-selection.test.mjs scripts/speech-user-copy.test.mjs scripts/response-copy.test.mjs scripts/pre-push-gate.test.mjs scripts/update-rollover.test.mjs scripts/projects-filters.test.mjs scripts/projects-force-done.test.mjs scripts/projects-search.test.mjs scripts/projects-search-index.test.mjs scripts/projects-sort.test.mjs scripts/project-update-assets.test.mjs scripts/project-view-perf.test.mjs scripts/projects-request-update.test.mjs scripts/projects-inline-edit.test.mjs scripts/speech-target.test.mjs scripts/agents-composer-mount.test.mjs scripts/evidence-fold.test.mjs scripts/projects-quick-send.test.mjs scripts/palette-main-door.test.mjs scripts/external-open-refusal.test.mjs scripts/window-guards.test.mjs scripts/palette-recents.test.mjs scripts/projects-entry-scroll.test.mjs scripts/wake-controls.test.mjs scripts/wake-cancel-panel.test.mjs scripts/code-review-model.test.mjs scripts/code-review-refresh-cue.test.mjs scripts/radient-credits-guidance.test.mjs scripts/quota-notice.test.mjs scripts/use-ever-in-view.test.mjs scripts/image-actions.test.mjs scripts/image-preview-decode.test.mjs scripts/analytics-channels.test.mjs scripts/i18n/check-strings.test.mjs scripts/i18n/typed-keys.test.mjs scripts/i18n/runtime.test.mjs scripts/i18n/format.test.mjs scripts/supplement-model.test.mjs scripts/supplement-row.test.mjs scripts/supplement-disclosure.test.mjs scripts/supplement-file-actions.test.mjs scripts/supplement-image-grid.test.mjs scripts/preview-signed-urls.test.mjs scripts/language-live-updates.test.mjs scripts/language-dialog.test.mjs scripts/code-review-delayed-flag.test.mjs scripts/code-review-row-layout.test.mjs scripts/audio-meter-stream.test.mjs scripts/keymap-chords.test.mjs scripts/keymap-retention.test.mjs scripts/keymap-registry.test.mjs scripts/keymap-dispatch.test.mjs scripts/keyboard-shortcuts-section.test.mjs scripts/keymap-persistence.test.mjs scripts/transcript-strand-hold.test.mjs scripts/transcript-journal-order.test.mjs scripts/journal-order-query.test.mjs scripts/peer-journal-source.test.mjs scripts/peer-source-unified.test.mjs scripts/i18n/absent-locale.test.mjs scripts/i18n/activation.test.mjs scripts/i18n/locale-parity.test.mjs scripts/i18n/locale-reactivity.test.mjs scripts/i18n/ledger-check.test.mjs scripts/i18n/ledger-assemble.test.mjs scripts/streaming-live-markdown.test.mjs scripts/markdown-remend.test.mjs scripts/stream-order-live.test.mjs scripts/browser-address-history.test.mjs scripts/browser-address-autocomplete.test.mjs scripts/browser-url-autocomplete.test.mjs scripts/browser-toolbar.test.mjs scripts/copy-button-copy-locale.test.mjs scripts/i18n/context-parity.test.mjs scripts/browser-start-page.test.mjs scripts/tooltip-browser-view.test.mjs scripts/resolve-package-union.test.mjs scripts/i18n/es-activation.test.mjs scripts/i18n/ru-activation.test.mjs scripts/i18n/vi-activation.test.mjs scripts/skill-row.test.mjs scripts/skill-seal-behaviour.test.mjs scripts/i18n/hi-activation.test.mjs scripts/i18n/zh-CN-activation.test.mjs scripts/projects-i18n-locale.test.mjs scripts/window-glass.test.mjs scripts/window-glass-main.test.mjs scripts/window-glass-renderer.test.mjs scripts/default-effort-options.test.mjs scripts/browser-chrome-gaps.test.mjs scripts/import-settings-view.test.mjs scripts/import-settings-section.test.mjs scripts/audio-engine.test.mjs scripts/waveform-model.test.mjs scripts/sound-player.test.mjs scripts/sounds-fixture.test.mjs scripts/sidebar-tag-drag.test.mjs scripts/receipt-fold-behaviour.test.mjs scripts/team-bridge-model.test.mjs scripts/team-bridge-scope.test.mjs scripts/dev-shortcuts.test.mjs scripts/i18n/ur-activation.test.mjs scripts/team-bridge-channels.test.mjs scripts/sidebar-tag-picker.test.mjs scripts/team-bridge-notify.test.mjs scripts/team-bridge-notifications-mount.test.mjs scripts/document-direction.test.mjs scripts/sidebar-tag-auto.test.mjs scripts/team-bridge-directory.test.mjs",
93
+ "test:desktop": "node scripts/run-desktop-tests.mjs scripts/browser-startup.test.mjs scripts/agents-config-summary.test.mjs scripts/agents-config-retry.test.mjs scripts/agent-class-toggle.test.mjs scripts/agent-messages-busy.test.mjs scripts/agent-messages-dialog.test.mjs scripts/agent-messages-model.test.mjs scripts/agent-messages-settings.test.mjs scripts/team-member-overrides.test.mjs scripts/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/check-evidence-structure.test.mjs scripts/capture-evidence.test.mjs scripts/evidence-tz.test.mjs scripts/desktop-contract.test.mjs scripts/hub-skill-state.test.mjs scripts/transcript-reducer.test.mjs scripts/transcript-focus.test.mjs scripts/transcript-focus-behaviour.test.mjs scripts/transcript-dom-window.test.mjs scripts/transcript-dom-window-hook.test.mjs scripts/tool-compose-lifecycle.test.mjs scripts/transcript-paging.test.mjs scripts/transcript-paging-hook.test.mjs scripts/seed-placement.test.mjs scripts/seed-label-gap.test.mjs scripts/provider-state.test.mjs scripts/stale-agent.test.mjs scripts/desktop-renderer-transport.test.mjs scripts/desktop-proxy.test.mjs scripts/session-stream-token.test.mjs scripts/session-load-recovery.test.mjs scripts/session-load-sequence.test.mjs scripts/provider-grid-error-copy.test.mjs scripts/provider-grid-pin.test.mjs scripts/settings-time-to-error.test.mjs scripts/speech-settings.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/desktop-test-lane-bound.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/image-gen-card.test.mjs scripts/job-cancel-panel.test.mjs scripts/job-controls.test.mjs scripts/working-line-clock.test.mjs scripts/attachment-url.test.mjs scripts/file-blob-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/managed-python-transaction.test.mjs scripts/usage-view.test.mjs scripts/usage-container.test.mjs scripts/session-status.test.mjs scripts/spend-payment-basis.test.mjs scripts/composer-readings.test.mjs scripts/composer-file-drop.test.mjs scripts/ask-draft-swap.test.mjs scripts/ask-queue.test.mjs scripts/session-asks.test.mjs scripts/library-markdown.test.mjs scripts/library-model.test.mjs scripts/library-page.test.mjs scripts/library-pptx.test.mjs scripts/ask-revise.test.mjs scripts/ask-composer-no-routing.test.mjs scripts/ask-open-policy.test.mjs scripts/ask-open-render.test.mjs scripts/ask-other.test.mjs scripts/composer-queued-send.test.mjs scripts/composer-tabs.test.mjs scripts/scroll-region-to-top.test.mjs scripts/ask-options.test.mjs scripts/click-proof-expect.test.mjs scripts/window-mode.test.mjs scripts/relaunch-during-quit-proof.test.mjs scripts/about-panel.test.mjs scripts/evidence-manifest.test.mjs scripts/canonical-notice.test.mjs scripts/evidence-histogram-parity.test.mjs scripts/evidence-run-guard.test.mjs scripts/desktop-test-concurrency.test.mjs scripts/desktop-test-memory-guard.test.mjs scripts/run-desktop-tests.test.mjs scripts/mcp-foreign-config-origin.test.mjs scripts/mentioned-files.test.mjs scripts/finder-files.test.mjs scripts/finder-reveal-scroll.test.mjs scripts/session-files-hook.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/context-readout-monotonic.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/check-design-kit.test.mjs scripts/check-geometry-sources.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/draft-slash-identity.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chord.test.mjs scripts/browser-page-controls.test.mjs scripts/browser-find-row.test.mjs scripts/browser-chord-renderer.test.mjs scripts/browser-chrome.test.mjs scripts/browser-tab-management.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/renderer-driver-api.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/agent-shell-spawn-env.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-hover-intent.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/panel-rail.test.mjs scripts/backend-settings-tiers.test.mjs scripts/settings-language-row.test.mjs scripts/backend-settings-collapse.test.mjs scripts/check-build-env.test.mjs scripts/asks-app-regression.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/retention-duration.test.mjs scripts/typed-row-call-sites.test.mjs scripts/palette-focus.test.mjs scripts/composer-seeding.test.mjs scripts/skill-invocation.test.mjs scripts/skill-list.test.mjs scripts/skill-highlight.test.mjs scripts/theme-inline.test.mjs scripts/composer-refusal.test.mjs scripts/ci-scope.test.mjs scripts/browser-tab-strip-focus.test.mjs scripts/projects-board-focus.test.mjs scripts/browser-file-transfer-row.test.mjs scripts/link-targets.test.mjs scripts/link-actions.test.mjs scripts/chat-link-affordances.test.mjs scripts/streaming-markdown-parity.test.mjs scripts/transcription-failure-copy.test.mjs scripts/backend-version-drift.test.mjs scripts/live-seed-placement.test.mjs scripts/agents-publication.test.mjs scripts/agent-hub-queries.test.mjs scripts/install-builtin-batch.test.mjs scripts/install-progress.test.mjs scripts/attention-seen.test.mjs scripts/mark-all-read-control.test.mjs scripts/update-global-guard.test.mjs scripts/delivery-gate.test.mjs scripts/canvas-file-freshness.test.mjs scripts/no-websocket-plane.test.mjs scripts/update-window-report.test.mjs scripts/canvas-tab-close.test.mjs scripts/chat-sidebar-pins.test.mjs scripts/webauthn.test.mjs scripts/render-mac-entitlements.test.mjs scripts/row-state-floors.test.mjs scripts/pairing-card-copy.test.mjs scripts/update-install-copy.test.mjs scripts/update-shipit.test.mjs scripts/console-close.test.mjs scripts/console-host.test.mjs scripts/console-pack.test.mjs scripts/settings-account-gate.test.mjs scripts/sidebar-pin-order.test.mjs scripts/sidebar-split.test.mjs scripts/radient-session-issue.test.mjs scripts/console-pane.test.mjs scripts/console-i18n-fit.test.mjs scripts/console-mirror.test.mjs scripts/shell-path.test.mjs scripts/build-env-guard.test.mjs scripts/install-scripts-network.test.mjs scripts/console-pane-render.test.mjs scripts/settings-section-routes.test.mjs scripts/authoring-refresh.test.mjs scripts/verify-macos-artifacts.test.mjs scripts/provider-chip-verdict.test.mjs scripts/child-reader-foot-react.test.mjs scripts/backend-spawn-address.test.mjs scripts/connectivity-banner-copy.test.mjs scripts/connectivity-banner-notice.test.mjs scripts/chat-list-sections.test.mjs scripts/chat-keyboard-regions.test.mjs scripts/chat-sidebar-agents.test.mjs scripts/chat-sidebar-view.test.mjs scripts/chat-sidebar-time-order.test.mjs scripts/chat-sidebar-layout.test.mjs scripts/drafts-clear-on-send.test.mjs scripts/chat-sidebar-drafts.test.mjs scripts/undo-toasts.test.mjs scripts/chat-sidebar-sections.test.mjs scripts/titlebar-options.test.mjs scripts/lane-leading.test.mjs scripts/trace-fold-model.test.mjs scripts/trace-fold-behaviour.test.mjs scripts/chat-status-strip.test.mjs scripts/chat-pane-floors.test.mjs scripts/path-utils.test.mjs scripts/window-chrome.test.mjs scripts/chat-sidebar-scope-paging.test.mjs scripts/chat-sidebar-connection-voices.test.mjs scripts/integration-model.test.mjs scripts/mcp-catalog-parity.test.mjs scripts/mcp-catalog-transport.test.mjs scripts/btw-aside.test.mjs scripts/composer-send-failure.test.mjs scripts/composer-text-authority.test.mjs scripts/shared-composer.test.mjs scripts/analytics-rate-format.test.mjs scripts/provider-catalog.test.mjs scripts/provider-sign-in-flow.test.mjs scripts/provider-status.test.mjs scripts/evidence-sign-in-states.test.mjs scripts/provider-detail-remount.test.mjs scripts/model-select-store.test.mjs scripts/onboarding-step-block.test.mjs scripts/onboarding-default-model.test.mjs scripts/onboarding-i18n-contract.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/media-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/agent-hub-public-teams.test.mjs scripts/mesh-tab.test.mjs scripts/peers-catalogue.test.mjs scripts/onboarding-search-step.test.mjs scripts/provider-error-guidance.test.mjs scripts/radient-verify-callout.test.mjs scripts/phone-access-block.test.mjs scripts/sidebar-account-reconnect.test.mjs scripts/stopped-row-measure.test.mjs scripts/aida-rail-marks.test.mjs scripts/aida-sidebar.test.mjs scripts/currency-math.test.mjs scripts/mesh-canvas-bench.test.mjs scripts/agents-offer-dismiss.test.mjs scripts/projects-card-click.test.mjs scripts/lane-registration.test.mjs scripts/team-initials.test.mjs scripts/projects-sheet.test.mjs scripts/turn-collapse-model.test.mjs scripts/collapse-plan-per-pass.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/held-claim-reach.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-remote.test.mjs scripts/chat-session-copy-id.test.mjs scripts/header-identity-menu.test.mjs scripts/hub-updates.test.mjs scripts/hub-link-view.test.mjs scripts/hub-links-scene.test.mjs scripts/hub-skills-capability.test.mjs scripts/hub-mutation-safety.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/transcript-copy-affordances.test.mjs scripts/update-indicator-segments.test.mjs scripts/reload-picker-close.test.mjs scripts/picker-default-checkbox.test.mjs scripts/projects-time-window.test.mjs scripts/audio-recording-levels.test.mjs scripts/chat-sidebar-row-menu.test.mjs scripts/chat-sidebar-tags.test.mjs scripts/navigation-gesture.test.mjs scripts/fleet-asks.test.mjs scripts/right-slot-width.test.mjs scripts/right-slot-memory.test.mjs scripts/transcript-fade.test.mjs scripts/agents-config-probe-cadence.test.mjs scripts/turn-segments.test.mjs scripts/turn-partition-predicate.test.mjs scripts/chat-device-model.test.mjs scripts/chat-device-placement.test.mjs scripts/org-teams-summary.test.mjs scripts/markdown-table-widths.test.mjs scripts/turn-answer-rail.test.mjs scripts/scrollbar-activity.test.mjs scripts/stt-mic-gate-session.test.mjs scripts/transcript-perflush-perf.test.mjs scripts/speech-clip.test.mjs scripts/speech-store.test.mjs scripts/speech-controls.test.mjs scripts/speech-selection.test.mjs scripts/speech-user-copy.test.mjs scripts/response-copy.test.mjs scripts/pre-push-gate.test.mjs scripts/update-rollover.test.mjs scripts/projects-filters.test.mjs scripts/projects-force-done.test.mjs scripts/projects-search.test.mjs scripts/projects-search-index.test.mjs scripts/projects-sort.test.mjs scripts/project-update-assets.test.mjs scripts/project-view-perf.test.mjs scripts/projects-request-update.test.mjs scripts/projects-inline-edit.test.mjs scripts/speech-target.test.mjs scripts/agents-composer-mount.test.mjs scripts/evidence-fold.test.mjs scripts/projects-quick-send.test.mjs scripts/palette-main-door.test.mjs scripts/external-open-refusal.test.mjs scripts/window-guards.test.mjs scripts/palette-recents.test.mjs scripts/projects-entry-scroll.test.mjs scripts/wake-controls.test.mjs scripts/wake-cancel-panel.test.mjs scripts/code-review-model.test.mjs scripts/code-review-refresh-cue.test.mjs scripts/radient-credits-guidance.test.mjs scripts/quota-notice.test.mjs scripts/use-ever-in-view.test.mjs scripts/image-actions.test.mjs scripts/image-preview-decode.test.mjs scripts/analytics-channels.test.mjs scripts/i18n/check-strings.test.mjs scripts/i18n/typed-keys.test.mjs scripts/i18n/runtime.test.mjs scripts/i18n/format.test.mjs scripts/supplement-model.test.mjs scripts/supplement-row.test.mjs scripts/supplement-disclosure.test.mjs scripts/supplement-file-actions.test.mjs scripts/supplement-image-grid.test.mjs scripts/preview-signed-urls.test.mjs scripts/language-live-updates.test.mjs scripts/language-dialog.test.mjs scripts/code-review-delayed-flag.test.mjs scripts/code-review-row-layout.test.mjs scripts/audio-meter-stream.test.mjs scripts/keymap-chords.test.mjs scripts/keymap-retention.test.mjs scripts/keymap-registry.test.mjs scripts/keymap-dispatch.test.mjs scripts/keyboard-shortcuts-section.test.mjs scripts/keymap-persistence.test.mjs scripts/transcript-strand-hold.test.mjs scripts/transcript-journal-order.test.mjs scripts/journal-order-query.test.mjs scripts/peer-journal-source.test.mjs scripts/peer-source-unified.test.mjs scripts/i18n/absent-locale.test.mjs scripts/i18n/activation.test.mjs scripts/i18n/locale-parity.test.mjs scripts/i18n/locale-reactivity.test.mjs scripts/i18n/ledger-check.test.mjs scripts/i18n/ledger-assemble.test.mjs scripts/streaming-live-markdown.test.mjs scripts/markdown-remend.test.mjs scripts/stream-order-live.test.mjs scripts/browser-address-history.test.mjs scripts/browser-address-autocomplete.test.mjs scripts/browser-url-autocomplete.test.mjs scripts/browser-toolbar.test.mjs scripts/copy-button-copy-locale.test.mjs scripts/i18n/context-parity.test.mjs scripts/browser-start-page.test.mjs scripts/tooltip-browser-view.test.mjs scripts/resolve-package-union.test.mjs scripts/i18n/es-activation.test.mjs scripts/i18n/ru-activation.test.mjs scripts/i18n/vi-activation.test.mjs scripts/skill-row.test.mjs scripts/skill-seal-behaviour.test.mjs scripts/i18n/hi-activation.test.mjs scripts/i18n/zh-CN-activation.test.mjs scripts/projects-i18n-locale.test.mjs scripts/window-glass.test.mjs scripts/window-glass-main.test.mjs scripts/window-glass-renderer.test.mjs scripts/default-effort-options.test.mjs scripts/browser-chrome-gaps.test.mjs scripts/import-settings-view.test.mjs scripts/import-settings-section.test.mjs scripts/audio-engine.test.mjs scripts/waveform-model.test.mjs scripts/sound-player.test.mjs scripts/sounds-fixture.test.mjs scripts/sidebar-tag-drag.test.mjs scripts/receipt-fold-behaviour.test.mjs scripts/team-bridge-model.test.mjs scripts/team-bridge-scope.test.mjs scripts/dev-shortcuts.test.mjs scripts/i18n/ur-activation.test.mjs scripts/team-bridge-channels.test.mjs scripts/sidebar-tag-picker.test.mjs scripts/team-bridge-notify.test.mjs scripts/team-bridge-notifications-mount.test.mjs scripts/document-direction.test.mjs scripts/sidebar-tag-auto.test.mjs scripts/team-bridge-directory.test.mjs scripts/slash-tags.test.mjs scripts/slash-tags-popup.test.mjs scripts/slash-tags-reopen.test.mjs",
94
94
  "check-evidence": "node scripts/check-evidence.mjs",
95
95
  "check-evidence:parity": "node scripts/evidence-histogram-parity.mjs",
96
96
  "check-edit-diffs": "node scripts/check-edit-diffs.mjs",
@@ -242,7 +242,7 @@
242
242
  "appId": "com.local-operator",
243
243
  "electronVersion": "44.3.0",
244
244
  "productName": "Local Operator",
245
- "copyright": "Copyright \u00a9 2025 Radient Inc.",
245
+ "copyright": "Copyright © 2025 Radient Inc.",
246
246
  "asar": {
247
247
  "smartUnpack": false
248
248
  },
@@ -1,6 +0,0 @@
1
- import{r as c,j as e,c as D,t as u}from"./index-Bt4e_nGt.js";import{aR as cs,aN as Ce,aT as Ve,bQ as Ws,bR as os,$ as J,ag as Q,u as ae,a as Re,a0 as Ae,c as me,aO as Ie,d as Ee,bS as We,bT as Ys,aP as Gs,bU as Xs,X as ds,W as Oe,aX as us,bV as ce,bG as Js,bO as Zs,bW as et,b7 as st,bX as tt}from"./conversation-input-sync-DkdrIqiD.js";import{P as at}from"./page-header-CD8VERYn.js";import{c as nt,y as X,B as C,x as _,u as he,J as it,I as te,T as ms,A as Z,z as ee,E as se,a0 as lt,a1 as rt,a2 as ct,a3 as ot,K as Ye,M as Ge,N as Xe,O as Je,P as Ze}from"./error-boundary-2fpGTHTH.js";import{a as dt,p as hs,P as xs,u as ut}from"./publication-validation-cVu_vGjF.js";import{h as Y,O as mt,A as ht,d as xt,H as gt,a as bt,b as pt,c as ft,e as gs,C as jt,f as kt,n as yt,u as Nt,i as vt}from"./use-download-agent-mutation-B3IkEPEZ.js";import{a6 as wt,bn as St,bm as Pt,bo as bs,bp as ps,bq as fs,br as Tt,bs as _t,bj as Se,b5 as Ct,b3 as js,bt as Rt,D as At,bu as It}from"./index-CXF8GwAZ.js";import{n as Pe,i as Et,H as ks,p as es,o as ys,u as Ot}from"./org-access-c2-UvVYd.js";import"./ui-preferences-store-B5lixHt9.js";import{R as Ns}from"./radient-auth-buttons-BuUoxJkL.js";import{f as $t}from"./format-esAOn2VS.js";import{o as Ft,a as ss}from"./org-surface-gate-B-MS3UYv.js";import{B as Lt}from"./building-2-B-r5qz8T.js";import"./en-US-CHJkXXr4.js";import"./book-open-1KhbTE6j.js";import"./console-mirror-rnDJat8Q.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 zt=[["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"}]],Mt=nt("circle-ellipsis",zt),Dt=({agent:s,isLiked:t,isFavourited:n,onLikeToggle:a,onFavouriteToggle:i,onDownload:o,isLikeActionLoading:m=!1,isFavouriteActionLoading:w=!1,isDownloading:y=!1,actionError:j=null,onRetryAction:v,showActions:x=!0,viewerStateKnown:f=!0,orgName:g=null})=>{const S=cs(),{isAuthenticated:d}=Ce(),T=s.description??"",[R,k]=c.useState(!1),b=c.useRef(null),P=c.useCallback(L=>{if(b.current?.disconnect(),b.current=null,!L)return;const O=()=>k(L.scrollHeight-L.clientHeight>1);O();const q=new ResizeObserver(O);q.observe(L),b.current=q},[]),I=d?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",A=d?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",h=f?t?"Unlike agent":"Like agent":"Like state unavailable",E=f?n?"Unfavourite agent":"Favourite agent":"Favourite state unavailable",l=s.visibility==="org",p=Y(s.name);return e.jsxs("div",{"data-glass-block":"",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:()=>S(`/agent-hub/${s.id}`),className:"flex min-h-0 flex-1 cursor-pointer flex-col gap-2 p-4 text-left","aria-label":`View details for ${p}`,children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:p}),l&&e.jsx(mt,{orgName:g}),e.jsx(X,{content:R?T:"",children:e.jsx("span",{ref:P,className:"line-clamp-3 min-h-0 text-body-sm text-ink-muted",children:T})}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsx(ht,{tags:s.tags,categories:s.categories}),e.jsxs("p",{className:"truncate text-ink-dim text-meta",children:[s.account_metadata?.name??"Unknown author",e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),"updated ",xt(new Date(s.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":l?"org":d?f?"known":"unknown":"signed-out",children:[!l&&e.jsxs(e.Fragment,{children:[e.jsx(X,{content:I,children:e.jsx("span",{children:e.jsxs(C,{variant:"ghost",size:"sm",onClick:d&&f?()=>a(s.id):void 0,disabled:m||!d||!f,"aria-label":h,className:D(t&&"text-danger"),children:[e.jsx(gt,{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:s.like_count??0})]})})}),e.jsx(X,{content:A,children:e.jsx("span",{children:e.jsxs(C,{variant:"ghost",size:"sm",onClick:d?()=>i(s.id):void 0,disabled:w||!d||!f,"aria-label":E,className:D(n&&"text-warning"),children:[e.jsx(wt,{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:s.favourite_count??0})]})})})]}),e.jsx(X,{content:"Downloads",children:e.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 pr-1 text-ink-dim",children:[e.jsx(Ve,{"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:y?e.jsx(_,{className:"h-3 w-6"}):(s.download_count??0).toLocaleString()})]})})]}),x&&o&&e.jsx("div",{className:"ml-auto flex shrink-0 items-center",children:e.jsxs(C,{variant:"secondary",size:"sm",onClick:()=>o(s),disabled:y,"aria-label":`Download ${p}`,"data-tour-tag":"agent-hub-download-button",children:[e.jsx(Ve,{"data-testid":"agent-download"}),"Get"]})})]}),j&&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:j}),v&&e.jsx(C,{variant:"ghost",size:"sm",onClick:v,children:"Try again"})]})]})},qt=({agent:s,status:t,viewerStateKnown:n=!0,orgName:a=null})=>{const{isAuthenticated:i}=Ce(),[o,m]=c.useState(null),w=t?.liked??!1,y=t?.favourited??!1,j=bt(),v=pt(),x=ft(),f=()=>{!i||j.isPending||(m(null),j.mutate({agentId:s.id,isCurrentlyLiked:w},{onError:()=>m("like")}))},g=()=>{!i||v.isPending||(m(null),v.mutate({agentId:s.id,isCurrentlyFavourited:y},{onError:()=>m("favourite")}))},S=()=>{x.isPending||(m(null),x.mutate({agentId:s.id,agentName:s.name},{onError:()=>m("download")}))},d=o?o==="like"?{action:"like",error:j.error,retry:f}:o==="favourite"?{action:"favourite",error:v.error,retry:g}:{action:"download",error:x.error,retry:S}:null;return e.jsx(Dt,{agent:s,isLiked:i&&w,isFavourited:i&&y,onLikeToggle:f,onFavouriteToggle:g,onDownload:S,isLikeActionLoading:j.isPending,isFavouriteActionLoading:v.isPending,isDownloading:x.isPending,viewerStateKnown:n,orgName:a,actionError:d?dt(d.action,d.error,Y(s.name)):null,onRetryAction:d?.retry})},ts=({selected:s,onClick:t,children:n,...a})=>e.jsx("button",{type:"button",onClick:t,"aria-pressed":s,className:D("flex w-full cursor-pointer items-center gap-2.5 rounded-sm px-3 py-1.5 text-left","text-body-sm transition-colors duration-fast ease-out-quart",s?Pt:"text-ink hover:bg-row-hover"),...a,children:n}),as=Object.keys(jt),Ut=s=>[...s].sort((t,n)=>{const a=as.indexOf(t),i=as.indexOf(n);return a!==-1&&i!==-1?a-i:a!==-1?-1:i!==-1?1:t.localeCompare(n)}),Bt=({selectedCategory:s,onSelectCategory:t,categories:n})=>{he();const a=Ut(s&&!n.includes(s)?[...n,s]: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:u("ui.hub.taxonomy.heading")}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs(ts,{selected:s===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(St,{size:16,"aria-hidden":"true"})}),u("ui.hub.taxonomy.all")]}),a.map(i=>{const o=gs(i),m=i==="other"?e.jsx(Mt,{size:16}):o.icon;return e.jsxs(ts,{selected:s===i,onClick:()=>t(i),"data-testid":`category-${i}`,children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:m}),o.label]},i)})]})]})},$e=({page:s,count:t,onChange:n,ariaLabel:a="Agent pages"})=>{const i=c.useRef(null),o=c.useRef(null),m=c.useRef(null);return c.useEffect(()=>{const w=m.current;m.current=null,w==="previous"&&i.current?.focus(),w==="next"&&o.current?.focus()},[s]),t<=1?null:e.jsxs("nav",{"aria-label":a,className:"mt-6 flex min-h-13 items-center justify-between gap-3 border-t border-hairline","data-testid":"agent-hub-pager",children:[e.jsxs("span",{className:"select-none text-meta text-ink-dim",children:["Page ",s," of ",t]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(C,{variant:"secondary",size:"sm",ref:i,onClick:()=>{s-1<=1&&(m.current="next"),n(s-1)},disabled:s<=1,"aria-label":"Previous page",children:[e.jsx(Ws,{"aria-hidden":"true"}),"Previous"]}),e.jsxs(C,{variant:"secondary",size:"sm",ref:o,onClick:()=>{s+1>=t&&(m.current="previous"),n(s+1)},disabled:s>=t,"aria-label":"Next page",children:["Next",e.jsx(it,{"aria-hidden":"true"})]})]})]})},ns=s=>s?.skills===1&&s.revision_cas===1;function Ht(s,t=1,n=20){const a=new URL(bs(s,"skills"));return a.searchParams.set("page",String(t)),a.searchParams.set("per_page",String(n)),ps(a.toString())}function Qt(s,t){return ps(bs(s,"skills",t))}function Kt(s){return os({operation:"org_skills.list",tenantId:s})}function Vt(s,t){return os({operation:"org_skill.get",tenantId:s,skillId:t})}const vs=12,oe={all:["public-teams"],list:(s,t)=>[...oe.all,"list",{page:s,perPage:t}],detail:s=>[...oe.all,"detail",s]},xe=(s,t)=>t instanceof fs?t.status===null?!1:t.status>=500&&s<1:s<1,Wt=({page:s=1,perPage:t=vs,enabled:n=!0}={})=>{const a=J({queryKey:oe.list(s,t),queryFn:()=>Tt(Q.radientBaseUrl,s,t),select:i=>i.result,enabled:n,retry:xe,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,placeholderData:i=>i});return{...a,teams:a.data?.records??[],isRefreshing:a.isFetching&&a.data!==void 0,pagination:a.data?{page:a.data.page,perPage:a.data.per_page,totalPages:a.data.total_pages,totalRecords:a.data.total_records}:void 0}},Yt=({teamId:s,enabled:t=!0})=>{const n=J({queryKey:oe.detail(s??""),queryFn:()=>_t(Q.radientBaseUrl,s),select:a=>a.result,enabled:t&&!!s,retry:xe,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1});return{...n,team:n.data}};function ge(s){if(s.getQueryState(We.capabilities)?.status!=="success"||!me(s.getQueryData(We.capabilities),"hub_skills"))throw new Error("This backend does not support the complete Hub Skills adapter.")}function Gt(s,t,n){const a=ae(),i=Re();return J({queryKey:["hub-skills",Q.radientBaseUrl,s.visibility,s.tenantId,t],enabled:n&&!i.isError&&me(i.data,"hub_skills"),queryFn:async()=>{if(ge(a),s.visibility==="org"){const m=(await Kt(s.tenantId)).result;return{rows:m.skills,pages:1,contract:m.sync_contract}}const o=(await Ht(Q.radientBaseUrl,t,20)).result;return{rows:o.records,pages:o.total_pages,contract:o.sync_contract}},staleTime:3e4,retry:s.visibility==="org"?Ae:xe,retryOnMount:!1,refetchOnWindowFocus:!1})}function Xt(s,t,n){const a=ae(),i=Re();return J({queryKey:["hub-skill",Q.radientBaseUrl,s.visibility,s.tenantId,t],enabled:n&&t!==null&&!i.isError&&me(i.data,"hub_skills"),queryFn:async()=>(ge(a),(s.visibility==="org"?await Vt(s.tenantId,t):await Qt(Q.radientBaseUrl,t)).result),staleTime:3e4,retry:s.visibility==="org"?Ae:xe,retryOnMount:!1})}function Jt(){const s=ae();return Ie({mutationFn:t=>(ge(s),Ee({op:"hub.skillPull",requestId:t.requestId,hubId:t.remoteId,hubSource:Q.radientBaseUrl,visibility:t.scope.visibility,tenantId:t.scope.tenantId,localAlias:t.alias,subscribe:t.subscribe,autoPush:t.autoPush,confirmPublicEgress:t.consent})),onSuccess:t=>{s.setQueryData(Se,t.links)},onSettled:()=>{s.invalidateQueries({queryKey:Se}),s.invalidateQueries({queryKey:["desktop","skills"]})}})}function Zt(){const s=ae();return Ie({mutationFn:t=>(ge(s),Ee({op:"hub.skillPublish",requestId:t.requestId,...t.draft,dryRun:t.previewReceipt===void 0,...t.previewReceipt?{previewReceipt:t.previewReceipt,confirmPublish:!0}:{}})),onSuccess:t=>{t.local_link_receipt?.state==="complete"&&(s.invalidateQueries({queryKey:Se}),s.invalidateQueries({queryKey:["desktop","skills"]}),s.invalidateQueries({queryKey:["hub-skills"]}))}})}function ea({scope:s,source:t,verifiedCas:n,enabled:a=!0}){he();const i=c.useId(),[o,m]=c.useState(""),[w,y]=c.useState(""),[j,v]=c.useState(Pe),[x,f]=c.useState(null),[g,S]=c.useState(!1),d=Zt(),T=c.useRef(null),R=J({queryKey:["desktop","skills","hub-publication"],queryFn:()=>Ee({op:"skills.list"}),staleTime:3e4,retry:!1}),k=`${s.visibility}:${s.tenantId??""}`,b=c.useRef(k);c.useEffect(()=>{b.current!==k&&(b.current=k,v(h=>({...h,autoPush:!1,confirmPublicEgress:!1})),f(null),S(!0))},[k]);const P={sourceSkill:o,localAlias:w,visibility:s.visibility,tenantId:s.tenantId,...j},I=x?Et(x,P):!1;c.useEffect(()=>{if(!x)return;const h=setTimeout(()=>{f(null),S(!0)},Math.max(0,Math.min(Date.parse(x.expires_at)-Date.now(),2147483647)));return()=>clearTimeout(h)},[x]);const A=h=>{if(!a||d.isPending||!o||!w||h&&!I)return;const E=JSON.stringify({draft:P,receipt:h?x?.preview_receipt:null}),l=T.current&&T.current.tuple===E&&(h||d.error)?T.current:{tuple:E,id:crypto.randomUUID()};T.current=l,h||(f(null),S(!1)),d.mutate({requestId:l.id,draft:P,...h&&x?{previewReceipt:x.preview_receipt}:{}},{onSuccess:p=>{p.preview?(f(p.preview),S(!1)):es(p)&&f(null)}})};return e.jsxs("section",{className:"flex min-w-0 flex-col gap-4","data-hub-skill-publication":!0,children:[e.jsx("h3",{className:"text-heading text-ink",children:u("ui.hub.skills.publish_title")}),e.jsx("label",{htmlFor:`${i}-source`,className:"text-body-sm text-ink",children:u("ui.hub.skills.select_authored")}),e.jsxs("select",{id:`${i}-source`,"data-testid":"hub-skill-publish-source",value:o,disabled:d.isPending||!a,className:"rounded-md border border-control bg-surface px-3 py-2 text-body-sm text-ink",onChange:h=>{m(h.target.value),y(h.target.value),f(null),v(E=>({...E,autoPush:!1,confirmPublicEgress:!1}))},children:[e.jsx("option",{value:"",children:u("ui.hub.skills.select_authored")}),R.data?.data.skills.map(h=>e.jsx("option",{value:h.name,children:h.name},h.name))]}),e.jsx("label",{htmlFor:`${i}-alias`,className:"text-body-sm text-ink",children:u("ui.hub.subscriptions.alias")}),e.jsx(te,{id:`${i}-alias`,"data-testid":"hub-skill-publish-alias",value:w,disabled:d.isPending||!a,onChange:h=>{y(h.target.value),v(E=>({...E,autoPush:!1,confirmPublicEgress:!1}))}}),e.jsx("p",{className:"text-meta text-ink-muted",children:u("ui.hub.skills.text_limits")}),e.jsx(ks,{value:j,onChange:v,source:t,item:o||w,visibility:s.visibility,organization:s.organization,destinationKey:`${k}:${o}`,canEnableAutoPush:n,disabled:d.isPending||!a}),R.isLoading&&e.jsx("output",{className:"text-meta text-ink-muted",children:u("ui.hub.skills.loading")}),R.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:u("ui.hub.status.other_error")}),d.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:u("ui.hub.links.action_failed",{direction:u("ui.hub.links.direction_push"),item:o||w,source:t})}),(g||x&&!I&&x.can_confirm)&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:u("ui.hub.links.preview_changed")}),x&&x.visibility===s.visibility&&x.tenant_id===s.tenantId&&e.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[e.jsx("h4",{className:"text-body-sm text-ink",children:u("ui.hub.links.preview_payload",{source:t})}),e.jsx(ms,{readOnly:!0,rows:12,"aria-label":u("ui.hub.links.preview_payload",{source:t}),value:JSON.stringify(x.proposal.fields,null,2),className:"max-h-96 bg-sunken text-mono-sm"}),x.warnings.map((h,E)=>e.jsx("p",{className:"break-words text-body-sm text-warning",children:h},`${E}-${h}`)),x.reason&&e.jsx("p",{className:"text-body-sm text-warning",children:Ct(x.reason)})]}),d.data?.publication===null&&d.data.local_link_receipt?.state==="pending-reconciliation"&&e.jsx("output",{className:"text-body-sm text-warning","data-testid":"hub-skill-pending-reconcile",children:u("ui.hub.links.publication_pending")}),d.data?.publication&&e.jsx("output",{className:"text-body-sm text-ink","data-testid":"hub-skill-published",children:es(d.data)?u("ui.hub.links.published",{item:d.data.link?.name??w,source:d.data.link?js(d.data.link):t}):u("ui.hub.skills.policy_pending")}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(C,{variant:"outline","data-testid":"hub-skill-publish-preview",disabled:!a||d.isPending||!o||!w,onClick:()=>A(!1),children:u("ui.hub.subscriptions.preview_publish")}),e.jsx(C,{"data-testid":"hub-skill-publish-confirm",disabled:!a||d.isPending||!I,onClick:()=>A(!0),children:u("ui.hub.links.confirm_publish")})]})]})}function sa({scope:s,signedIn:t,accessible:n=!0}){he();const a=c.useId(),[i,o]=c.useState(1),[m,w]=c.useState(""),[y,j]=c.useState(null),[v,x]=c.useState(""),[f,g]=c.useState(Pe),S=c.useRef(null),d=s.visibility==="public"?u("ui.hub.links.source_public"):s.organization?u("ui.hub.links.source_private",{organization:s.organization}):u("ui.hub.links.source_unavailable"),T=Gt(s,i,n&&(s.visibility==="public"||t)),R=ns(T.data?.contract),k=Xt(s,y,R&&n),b=Jt(),P=b.data?.link?.link_id,I=k.data?.visibility===s.visibility&&(s.visibility==="public"?!k.data.tenant_id:k.data.tenant_id===s.tenantId),A=n&&!k.error&&!T.error&&I&&ns(k.data?.sync_contract)&&!!k.data?.revision,h=(T.data?.rows??[]).filter(l=>`${l.name} ${l.description}`.toLocaleLowerCase().includes(m.toLocaleLowerCase())),E=()=>{if(!y||!A||!v||b.isPending||!t)return;const l=JSON.stringify({selected:y,scope:s,alias:v,policy:f});S.current?.tuple!==l&&(S.current={tuple:l,id:crypto.randomUUID()}),b.mutate({requestId:S.current.id,remoteId:y,scope:s,alias:v,subscribe:f.subscribe,autoPush:f.autoPush,consent:f.confirmPublicEgress})};return e.jsxs("section",{className:"flex min-w-0 flex-col gap-5","data-hub-skills-library":!0,children:[e.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("h2",{className:"text-heading text-ink",children:u("ui.hub.skills.title")}),e.jsx("span",{className:"text-meta text-ink-muted","data-testid":"hub-skill-source",children:d})]}),s.visibility==="org"&&!t?e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:u("ui.hub.status.no_credential")}):e.jsxs(e.Fragment,{children:[e.jsx("label",{className:"sr-only",htmlFor:`${a}-search`,children:u("ui.hub.skills.search")}),e.jsx(te,{id:`${a}-search`,"data-testid":"hub-skill-search",value:m,placeholder:u("ui.hub.skills.search"),onChange:l=>w(l.target.value)}),e.jsx("p",{className:"text-meta text-ink-muted",children:u("ui.hub.skills.search_loaded")}),T.isLoading&&e.jsx("output",{className:"min-h-20 text-body-sm text-ink-muted",children:u("ui.hub.skills.loading")}),T.error&&e.jsxs("div",{role:"alert",className:"flex flex-col gap-2 text-body-sm text-warning",children:[e.jsx("p",{children:u("ui.hub.skills.catalogue_failed",{source:d})}),e.jsx(C,{variant:"outline",disabled:T.isFetching,onClick:()=>void T.refetch(),children:u("ui.hub.links.retry")})]}),T.isSuccess&&!R&&e.jsx("p",{className:"text-body-sm text-warning",children:u("ui.hub.skills.unavailable")}),R&&e.jsxs(e.Fragment,{children:[h.length===0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:u(m?"ui.hub.skills.search_empty":"ui.hub.skills.remote_empty")}),e.jsx("div",{className:"grid min-w-0 gap-3 sm:grid-cols-2",children:h.map(l=>e.jsxs("div",{className:"flex min-w-0 flex-col gap-3 rounded-md border border-hairline p-4",children:[e.jsx("h3",{className:"break-words text-body-sm font-medium text-ink",children:l.name}),e.jsx("p",{className:"break-words text-meta text-ink-muted",children:l.description}),e.jsx(C,{variant:"outline","aria-pressed":y===l.id,"data-testid":"hub-skill-open",disabled:b.isPending,onClick:()=>{j(l.id),x(l.name),g(Pe()),b.reset()},children:u("ui.hub.skills.open_detail",{item:l.name})})]},l.id))}),e.jsx($e,{page:i,count:T.data?.pages??1,onChange:o,ariaLabel:u("ui.hub.skills.title")})]})]}),y&&R&&e.jsxs("section",{className:"flex min-w-0 flex-col gap-3 border-t border-hairline pt-4","data-hub-skill-detail":!0,children:[k.isLoading&&e.jsx("output",{className:"text-meta text-ink-muted",children:u("ui.hub.skills.loading")}),k.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:u("ui.hub.status.other_error")}),k.data&&I&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{className:"break-words text-heading text-ink",children:k.data.name}),e.jsx("p",{className:"text-meta text-ink-muted",children:u("ui.hub.skills.file_count",{count:k.data.files.length})}),k.data.files.map(l=>e.jsxs("details",{className:"min-w-0",children:[e.jsx("summary",{className:"break-words text-mono-sm text-ink",children:l.path}),e.jsx(ms,{readOnly:!0,rows:12,"aria-label":l.path,value:l.content,className:"max-h-96 bg-sunken text-mono-sm"})]},l.path)),e.jsx("label",{htmlFor:`${a}-alias`,className:"text-body-sm text-ink",children:u("ui.hub.subscriptions.alias")}),e.jsx(te,{id:`${a}-alias`,"data-testid":"hub-skill-alias",value:v,disabled:b.isPending,onChange:l=>{x(l.target.value),g(p=>({...p,autoPush:!1,confirmPublicEgress:!1}))}}),e.jsx("p",{className:"text-meta text-ink-muted",children:u("ui.hub.skills.pull_help")}),e.jsx(ks,{value:f,onChange:g,source:d,item:v,visibility:s.visibility,organization:s.organization,destinationKey:`${s.visibility}:${s.tenantId??""}:${y}`,canEnableAutoPush:!!A,disabled:b.isPending}),e.jsx(C,{"data-testid":"hub-skill-create",disabled:!t||!A||!v||b.isPending,onClick:E,children:u("ui.hub.subscriptions.create_copy")})]}),!t&&e.jsx("p",{className:"text-meta text-ink-muted",children:u("ui.hub.status.no_credential")}),(b.error||b.data&&!b.data.reports?.some(l=>l.applied||l.outcome==="unchanged"))&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-pull-failed",children:u("ui.hub.skills.pull_failed")}),b.data?.link&&b.data.reports?.some(l=>l.link_id===P&&l.direction==="pull"&&l.applied)&&e.jsx("output",{className:"text-body-sm text-ink","data-testid":"hub-skill-installed",children:u("ui.hub.skills.installed_alias",{item:b.data.link.name,source:js(b.data.link)})}),b.data?.link&&e.jsx("p",{className:"text-meta text-ink-muted",children:u("ui.hub.skills.session_selection")})]}),!n&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:u("ui.hub.status.access_lost")}),e.jsx("div",{className:"border-t border-hairline pt-5",children:e.jsx(ea,{scope:s,source:d,verifiedCas:R&&n&&t,enabled:R&&n&&t})})]})}const ws={all:["org-teams"],list:s=>[...ws.all,"list",s]},Ss=({tenantId:s,enabled:t=!0})=>{const n=J({queryKey:ws.list(s??""),queryFn:async()=>(await Rt(s)).result??{teams:[]},enabled:t&&!!s,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1,retry:Ae});return{...n,teams:n.data?.teams??[]}},ta=(s,t)=>{const n=s?.name?.trim()||t?.trim()||"Team",a=s?.renamed_from?.trim()||null;return s?.invalid_name===!0&&a?{level:"warning",message:`Pulled "${n}". The published name "${a}" is not usable locally, so the team was stored as "${n}".`}:a?{level:"success",message:`Pulled "${n}" (you already have a team called "${a}").`}:{level:"success",message:`Pulled team "${n}".`}},Ps=()=>{const s=ae();return Ie({mutationFn:async({teamId:t,tenantId:n})=>{if(!Q.baseUrl)throw new Error("Local Operator API URL is not configured.");return Xs.pullOrgTeamFromRadient(Q.baseUrl,t,n)},onSuccess:(t,n)=>{const a=ta(t.result,n.name);a.level==="warning"?Ys(a.message):Gs(a.message),s.invalidateQueries({queryKey:["desktop","teams"]})},onError:t=>{console.error("Pulling an organization team failed:",t)}})},aa=/^v/i,Ts=s=>s.members.reduce((t,n)=>t+n.count,0),na=s=>s.count>1?`${s.role} ×${s.count}`:s.role,Te=s=>s.members.map(na).join(", "),_s=s=>{const t=(s.version??"").trim().replace(aa,"").trim();return t===""?null:t},Cs=s=>{const t=s.account_metadata?.name?.trim();return t||null},ia=s=>{const t=(s.description??"").trim();return t===""?null:t},_e=240,la=_e/2,ra=(s,t)=>{if(t||s.length<=_e)return s;const n=s.slice(0,_e),a=n.lastIndexOf(" ");return`${(a>=la?n.slice(0,a):n).trimEnd()}…`},de=s=>$t(s,"d MMM yyyy"),ue=s=>{if(!s)return null;const t=new Date(s);return Number.isNaN(t.getTime())?null:t},is=(s,t,n)=>{const a=n-t.getTime();let i;return a<0?i=de(t):a<6e4?i="just now":i=`${kt(t,new Date(n))} ago`,{label:s,when:i,iso:t.toISOString(),exact:de(t)}},ca=(s,t=Date.now())=>{const n=ue(s.updated_at);if(n)return is("updated",n,t);const a=ue(s.created_date);return a?is("created",a,t):null},oa=s=>{const t=ue(s.created_date),n=ue(s.updated_at);return{created:t?de(t):null,updated:n?de(n):null}},da=s=>s==="role"?"Role":s==="specialist"?"Specialist":s,ua=["refresh-hub","retry","sign-in"],ma=({tenantId:s,orgName:t})=>{const{teams:n,isLoading:a,isFetching:i,isError:o,error:m,refetch:w}=Ss({tenantId:s}),y=ys(m),j=Ps(),[v,x]=c.useState(null),[f,g]=c.useState(null),S=c.useRef(new Map),d=c.useRef(null);c.useEffect(()=>{j.isPending||d.current===null||(S.current.get(d.current)?.focus(),d.current=null)},[j.isPending]);const[T,R]=c.useState(!1),[k,b]=c.useState(()=>new Set),P=(l,p)=>b(L=>{const O=new Set(L);return p?O.add(l):O.delete(l),O}),I=(l,p)=>{l.key!=="Escape"||!k.has(p)||(l.target instanceof Element?l.target:null)?.closest('[data-testid="org-team-pull-error"]')||(P(p,!1),l.currentTarget.querySelector("button[aria-expanded]")?.focus(),l.preventDefault())},A=c.useMemo(()=>{if(!ds(j.error))return null;const l=n.find(p=>p.id===v);return hs({code:j.error.code,message:j.error.message,details:j.error.details},{name:l?.name??"this team",hubAgentId:null,surface:"pull"})},[j.error,v,n]),h=(l,p)=>{switch(l){case"refresh-hub":w();break;case"retry":E(p);break;case"sign-in":R(!0);break}},E=l=>{j.isPending||(d.current=l.id,x(null),g(l.id),j.mutate({teamId:l.id,tenantId:s,name:l.name},{onSettled:()=>g(null),onError:()=>x(l.id)}))};return e.jsxs("section",{className:"mb-6 max-w-4xl rounded-md bg-surface","aria-label":`Teams shared with ${t??"this organization"}`,"data-testid":"org-teams",children:[a&&e.jsxs("div",{"aria-hidden":"true",className:"flex flex-col divide-y divide-hairline","data-testid":"org-teams-loading",children:[e.jsx(ve,{}),e.jsx(ve,{}),e.jsx(ve,{})]}),!a&&o&&e.jsxs(Z,{variant:y?"warning":"danger",className:"m-4 w-auto","data-testid":"org-teams-error",children:[e.jsx(ee,{children:y==="plan"?"That organization needs an active Team plan":y==="no_access"?"You do not have access to that organization":"Teams could not be loaded"}),e.jsx(se,{children:y==="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.`:y==="no_access"?`You are not a member of ${t??"that organization"}, so its teams are not listed here. An owner can invite you again.`:Oe("The teams shared with this organization could not be read.",m)}),y!=="no_access"&&e.jsx("div",{className:"mt-2",children:e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void w(),disabled:i,"aria-busy":i,children:i?"Trying…":"Try again"})})]}),!a&&!o&&n.length===0&&e.jsx("p",{className:"p-4 text-body-sm text-ink-muted","data-testid":"org-teams-empty",children:`Teams shared into ${t??"this organization"} appear here for its members.`}),!a&&!o&&n.length>0&&e.jsx("ul",{className:"flex flex-col divide-y divide-hairline",children:n.map(l=>e.jsxs("li",{className:D(Rs,"transition-colors duration-fast ease-out-quart hover:bg-elevated first:rounded-t-md last:rounded-b-md"),onKeyDown:p=>I(p,l.id),children:[e.jsx(us,{className:"min-w-0",open:k.has(l.id),onOpenChange:p=>P(l.id,p),summaryAlign:"firstLine",triggerClassName:"min-w-0",chevronClassName:"text-ink-dim mt-1",rowClassName:"py-0",summary:e.jsx(ga,{team:l,expanded:k.has(l.id)}),trailing:e.jsx("div",{className:"-mt-1 ml-3 shrink-0 self-start",children:e.jsx(C,{ref:p=>{p?S.current.set(l.id,p):S.current.delete(l.id)},variant:"secondary",size:"sm",onClick:()=>E(l),disabled:j.isPending,"aria-label":`Pull team ${Y(l.name)}`,children:f===l.id?"Pulling…":"Pull"})}),children:e.jsx(ba,{team:l})}),v===l.id&&e.jsxs("div",{className:"mt-1 flex flex-col items-start gap-1 pl-5","data-testid":"org-team-pull-error",children:[e.jsx("output",{className:"text-meta text-danger",children:A?.body??j.error?.message??`"${Y(l.name)}" could not be pulled.`}),A?.actions.filter(p=>ua.includes(p)).map(p=>e.jsx(C,{variant:"primary",size:"sm",onClick:()=>h(p,l),children:xs[p]},p)),T&&e.jsx("div",{className:"mt-1","data-testid":"org-team-pull-reauth",children:e.jsx(Ns,{titleText:"Sign in again",descriptionText:"",onSignInSuccess:()=>{R(!1),x(null),w()}})})]})]},l.id))})]})},Rs="px-4 py-3",As=()=>e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),e.jsx("span",{className:"sr-only",children:", "})]}),ha=({team:s})=>{const t=s.manager?.trim(),n=Ts(s);return e.jsxs("span",{className:"block truncate text-meta",children:[t?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:"Manager:"})," ",e.jsx("span",{className:"text-ink-muted",children:t})]}):null,t?e.jsx(As,{}):null,s.members.length===0?e.jsx("span",{className:"text-ink-dim",children:"No members"}):e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-ink-dim",children:[n," ",n===1?"member":"members",":"]})," ",e.jsx("span",{className:"text-ink-muted",children:Te(s)})]})]})},xa=({team:s})=>{const t=s.project?.trim(),n=Cs(s),a=ca(s),i=[];return t&&i.push({key:"project",node:t}),n&&i.push({key:"author",node:n}),a&&i.push({key:"recency",node:e.jsxs(e.Fragment,{children:[a.label," ",e.jsx(X,{content:a.exact,children:e.jsx("time",{dateTime:a.iso,children:a.when})})]})}),i.length===0?null:e.jsx("span",{className:"block truncate text-ink-dim text-meta",children:i.map((o,m)=>e.jsxs("span",{children:[m>0?e.jsx(As,{}):null,o.node]},o.key))})},ga=({team:s,expanded:t})=>{const n=ia(s),a=_s(s);return e.jsxs("span",{className:"flex min-w-0 flex-col",children:[e.jsxs("span",{className:"flex min-w-0 items-baseline",children:[e.jsx("span",{className:"truncate font-medium text-body text-ink",children:Y(s.name)}),a?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",a]}):null]}),n?e.jsxs(e.Fragment,{children:[e.jsx("span",{...ce,"aria-hidden":"true",className:D("mt-1 select-text break-words text-body-sm text-ink-muted",t?"line-clamp-[12] whitespace-pre-line":"line-clamp-2"),children:n}),e.jsx("span",{className:"sr-only",children:ra(n,t)})]}):e.jsx("span",{className:"mt-1 text-body-sm text-ink-dim",children:"No description"}),e.jsxs("span",{className:"mt-1 flex min-w-0 flex-col",children:[e.jsx(ha,{team:s}),e.jsx(xa,{team:s})]})]})},ba=({team:s})=>{const t=s.manager?.trim(),n=oa(s),a=[n.created?`Created ${n.created}`:null,n.updated?`Updated ${n.updated}`:null].filter(o=>o!==null),i=!!t||s.members.length>0;return e.jsxs("div",{className:"mt-1 flex flex-col gap-2",children:[i||a.length===0?e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:"Members"}),e.jsxs("ul",{className:"flex flex-col gap-0.5",children:[t?e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:t}),e.jsx("span",{className:"text-ink-dim text-meta",children:"Manager"})]}):null,s.members.map(o=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:o.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:da(o.kind)}),o.count>1?e.jsxs("span",{className:"text-ink-dim text-meta tabular-nums",children:["×",o.count]}):null]},`${o.kind}:${o.role}`)),i?null:e.jsx("li",{className:"text-ink-dim text-meta",children:"No members"})]})]}):null,a.length>0?e.jsx("p",{className:"text-ink-dim text-meta",children:a.join(" · ")}):null]})},ve=()=>e.jsxs("div",{className:D(Rs,"pl-9"),"data-testid":"org-team-skeleton-row",children:[e.jsx("div",{className:"flex h-[1lh] items-center text-body",children:e.jsx(_,{className:"h-4.5 w-40"})}),e.jsxs("div",{className:"mt-1 flex h-[2lh] flex-col justify-evenly text-body-sm",children:[e.jsx(_,{className:"h-3.5 w-full"}),e.jsx(_,{className:"h-3.5 w-2/3"})]}),e.jsx("div",{className:"mt-1 flex h-[1lh] items-center text-meta",children:e.jsx(_,{className:"h-3 w-64"})}),e.jsx("div",{className:"flex h-[1lh] items-center text-meta",children:e.jsx(_,{className:"h-3 w-48"})})]}),Is=(s,t)=>t instanceof fs?t.message:Oe(s,t),pa=["refresh-hub","retry","sign-in"],fa=({signedIn:s,onOpenSettings:t})=>{const[n,a]=c.useState(1),[i,o]=c.useState(""),{teams:m,isLoading:w,isFetching:y,isError:j,error:v,refetch:x,pagination:f}=Wt({page:n,perPage:vs}),g=Ps(),[S,d]=c.useState(null),[T,R]=c.useState(null),k=c.useRef(new Map),b=c.useRef(null);c.useEffect(()=>{g.isPending||b.current===null||(k.current.get(b.current)?.focus(),b.current=null)},[g.isPending]);const P=yt(i.trim()),I=c.useMemo(()=>P?m.filter(N=>Y(N.name).toLowerCase().includes(P)||(N.description??"").toLowerCase().includes(P)):m,[m,P]),A=N=>{g.isPending||(d(null),R(N.id),b.current=N.id,g.mutate({teamId:N.id,name:N.name},{onSettled:()=>R(null),onError:()=>d(N.id)}))},h=c.useMemo(()=>{if(!ds(g.error))return null;const N=m.find(F=>F.id===S);return hs({code:g.error.code,message:g.error.message,details:g.error.details},{name:N?.name??"this team",hubAgentId:null,surface:"pull"})},[g.error,S,m]),E=h?.body??(Js(g.error)==="unauthorized"?"The team could not be pulled: this machine has no Radient sign-in for the hub. Sign in on the settings page, then pull again.":"The team could not be pulled."),[l,p]=c.useState(!1),L=(N,F)=>{switch(N){case"refresh-hub":x();break;case"retry":A(F);break;case"sign-in":p(!0);break}},O=w&&m.length===0,q=f?.totalRecords??m.length,$=c.useRef(null),z=N=>{const F=i!=="";o(N),F&&N===""&&$.current?.focus()};return e.jsxs("section",{"aria-label":"Public teams",className:"flex flex-col","data-testid":"agent-hub-public-teams",children:[e.jsx("h2",{className:"sr-only",children:"Public teams"}),e.jsx("p",{className:"mb-3 max-w-3xl text-body-sm text-ink-muted",children:"Public teams are published to the hub by anyone and can be read here without signing in. Pulling one copies it into this machine's local team registry."}),s?null:e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2","data-testid":"agent-hub-public-teams-signed-out",children:[e.jsx("span",{className:"text-meta text-ink-dim",children:"Sign in to Radient to pull a team into this machine."}),e.jsx(C,{variant:"secondary",size:"sm",onClick:t,children:"Open settings to sign in"})]}),e.jsx("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:e.jsxs("div",{className:D("flex min-w-56 max-w-md 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(Zs,{"aria-hidden":"true",className:"ml-2 shrink-0 text-ink-dim"}),e.jsx(te,{ref:$,type:"search",value:i,onChange:N=>z(N.target.value),placeholder:"Search teams","aria-label":"Search teams",className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none","data-testid":"agent-hub-public-teams-search"})]})}),O&&e.jsxs("div",{"aria-hidden":"true",className:"flex max-w-4xl flex-col gap-3","data-testid":"agent-hub-public-teams-loading",children:[e.jsx(we,{}),e.jsx(we,{}),e.jsx(we,{})]}),!O&&j&&e.jsxs(Z,{variant:"danger",className:"w-auto max-w-2xl","data-testid":"agent-hub-public-teams-error",children:[e.jsx(ee,{children:"Public teams could not be loaded"}),e.jsx(se,{children:Is("The public team catalogue could not be read.",v)}),e.jsx("div",{className:"mt-2",children:e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void x(),disabled:y,"aria-busy":y,children:y?"Trying…":"Try again"})})]}),!O&&!j&&m.length===0&&e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted","data-testid":"agent-hub-public-teams-empty",children:"No teams have been published to the public hub yet."}),!O&&!j&&m.length>0&&e.jsxs(e.Fragment,{children:[!P||I.length>0?e.jsxs("p",{className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-public-teams-status",children:[P?`${I.length} of ${m.length} teams on this page match "${i.trim()}"`:`${q} ${q===1?"team":"teams"} in the public hub`,P?e.jsxs("span",{className:"text-ink-dim",children:[" ","· search covers the teams loaded here"]}):null]}):null,I.length===0?e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted","data-testid":"agent-hub-public-teams-search-miss",children:`No team on this page matches "${i.trim()}".`}):e.jsx("ul",{className:"flex max-w-4xl flex-col gap-3",children:I.map(N=>e.jsx(ja,{team:N,pulling:T===N.id,pullPending:g.isPending,onPull:A,pullButtonRef:F=>{F?k.current.set(N.id,F):k.current.delete(N.id)},failed:S===N.id,failureBody:E,treatment:h,onTreatmentAction:L,reauthenticating:l,onReauthenticated:()=>{p(!1),d(null),x()}},N.id))}),!P&&f&&f.totalPages>1&&e.jsx($e,{count:f.totalPages,page:f.page,onChange:N=>{a(N),$.current?.scrollIntoView({block:"nearest"})}})]})]})},ja=({team:s,pulling:t,pullPending:n,onPull:a,failed:i,failureBody:o,treatment:m,onTreatmentAction:w,reauthenticating:y,onReauthenticated:j,pullButtonRef:v})=>{const[x,f]=c.useState(!1),g=Yt({teamId:x?s.id:void 0}),S=Y(s.name),d=_s(s),T=Cs(s),R=s.manager?.trim(),k=Ts(s),b=(s.description??"").trim();return e.jsxs("li",{className:"rounded-md bg-surface p-4","data-testid":"agent-hub-public-team","data-team-name":s.name,children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-baseline",children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:S}),d?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",d]}):null]}),b?e.jsx("p",{...ce,className:"mt-1 line-clamp-3 max-w-3xl select-text text-body-sm text-ink-muted",children:b}):e.jsx("p",{className:"mt-1 text-body-sm text-ink-dim",children:"No description"}),e.jsxs("p",{className:"mt-2 flex flex-wrap items-baseline gap-x-2 text-meta",children:[R?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:"Manager:"}),e.jsx("span",{className:"text-ink-muted",children:R})]}):null,s.members.length===0?e.jsx("span",{className:"text-ink-dim",children:"No members"}):e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"text-ink-dim",children:[k," ",k===1?"member":"members",":"]}),e.jsx(X,{content:Te(s),children:e.jsx("span",{className:"truncate text-ink-muted",children:Te(s)})})]})]}),T?e.jsxs("p",{className:"mt-1 text-ink-dim text-meta",children:["Published by ",e.jsx("span",{className:"text-ink-muted",children:T})]}):null]}),e.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-2",children:[e.jsx(C,{ref:v,variant:"secondary",size:"sm",onClick:()=>a(s),disabled:n,"aria-label":`Pull team ${S}`,children:t?"Pulling…":"Pull"}),i&&e.jsxs("div",{className:"flex max-w-56 flex-col items-end gap-1","data-testid":"agent-hub-public-team-pull-error",children:[e.jsx("output",{className:"text-right text-meta text-danger",children:o}),m?.actions.filter(P=>pa.includes(P)).map(P=>e.jsx(C,{variant:"primary",size:"sm",onClick:()=>w(P,s),children:xs[P]},P)),y&&e.jsx("div",{"data-testid":"agent-hub-public-team-pull-reauth",children:e.jsx(Ns,{titleText:"Sign in again",descriptionText:"",onSignInSuccess:j})})]})]})]}),e.jsx("div",{className:"mt-2",children:e.jsx(us,{summary:"Brief",open:x,onOpenChange:f,className:"w-full",triggerClassName:"w-full",triggerLabel:`View the brief for ${S}`,chevronClassName:"text-ink-dim",children:e.jsx(ka,{detail:g})})})]})},ka=({detail:s})=>{if(s.isLoading)return e.jsxs("div",{className:"flex flex-col gap-1","data-testid":"agent-hub-public-team-brief-loading",children:[e.jsx(_,{className:"h-[1lh] w-2/3"}),e.jsx(_,{className:"h-[2lh] w-full"})]});if(s.isError)return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx("output",{className:"text-meta text-danger",children:Is("This team's brief could not be read.",s.error)}),e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void s.refetch(),disabled:s.isFetching,"aria-busy":s.isFetching,children:s.isFetching?"Trying…":"Try again"})]});const t=s.team;if(!t)return null;const n=(t.instructions??"").trim(),a=(t.project??"").trim();return e.jsxs("div",{className:"flex max-w-3xl flex-col gap-3 text-body-sm","data-testid":"agent-hub-public-team-brief",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:"Collaboration brief"}),n?e.jsx("p",{...ce,className:"whitespace-pre-line select-text text-ink-muted",children:n}):e.jsx("p",{className:"text-ink-dim",children:"This team has no collaboration brief."})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:"Project brief"}),a?e.jsx("p",{...ce,className:"whitespace-pre-line select-text text-ink-muted",children:a}):e.jsx("p",{className:"text-ink-dim",children:"This team has no project brief."})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:"Roster"}),e.jsxs("ul",{className:"flex flex-col gap-0.5",children:[t.manager?.trim()?e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:t.manager.trim()}),e.jsx("span",{className:"text-ink-dim text-meta",children:"Manager"})]}):null,t.members.length===0?e.jsx("li",{className:"text-ink-dim",children:"No members"}):t.members.map(i=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:i.count>1?`${i.role} ×${i.count}`:i.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:i.kind})]},`${i.kind}:${i.role}`))]})]})]})},we=()=>e.jsxs("div",{className:"rounded-md bg-surface p-4",children:[e.jsx(_,{className:"h-[1lh] w-1/3"}),e.jsx(_,{className:"mt-1 flex h-[3lh] w-full"}),e.jsx(_,{className:"mt-2 h-[1lh] w-2/3"})]}),ya=(s,t)=>{const[n,a]=c.useState(s);return c.useEffect(()=>{const i=setTimeout(()=>a(s),t);return()=>clearTimeout(i)},[s,t]),n},re=[{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"}],Na=[{value:"name",label:"Name"},{value:"description",label:"Description"}],va=300,W="public",ls={agents:"agent-hub-view-agents",teams:"agent-hub-view-teams",skills:"agent-hub-view-skills"},rs="agent-hub-view-panel",wa=()=>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(_,{className:"h-5.5 w-2/3"}),e.jsx(_,{className:"h-3.5 w-full"}),e.jsx(_,{className:"h-3.5 w-full"}),e.jsx(_,{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(_,{className:"h-5.5 w-24"}),e.jsx(_,{className:"h-5.5 w-20"})]}),e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsx(_,{className:"h-5.5 w-24"})})]}),e.jsx(_,{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(_,{className:"size-4"}),e.jsx(_,{className:"h-4 w-6"}),e.jsx(_,{className:"size-4"}),e.jsx(_,{className:"h-4 w-6"}),e.jsx(_,{className:"ml-auto h-7 w-16"})]})]}),qa=()=>{const s=cs(),{isAuthenticated:t}=Ce(),[n,a]=c.useState(1),[i]=c.useState(12),[o,m]=c.useState(null),[w,y]=c.useState(""),[j,v]=c.useState("name"),[x,f]=c.useState(re[0].value),[g,S]=c.useState(W),[d,T]=c.useState("agents");he();const[R,k]=c.useState([]),b=ya(w,va),P=re.find(r=>r.value===x)??re[0],I=Re(),A=!I.isError&&me(I.data,"hub_skills"),h=d==="skills"&&!A?"agents":d;c.useEffect(()=>{d==="skills"&&!A&&T("agents")},[d,A]);const E=et(),l=st(I.data,"radient_org"),p=t?Ft(l,E??null):null,{memberships:L}=At({enabled:ss(l)}),O=c.useMemo(()=>Ot(L),[L]),q=g===W||O.some(r=>r.tenant_id===g);c.useEffect(()=>{!q&&h!=="skills"&&S(W)},[q,h]);const $=g===W?null:O.find(r=>r.tenant_id===g)??null,z=$?.tenant_id,N=$?.tenant_name||null,F=o!==null||b!=="",be=Ss({tenantId:z}),ne=z&&be.isSuccess&&!F?be.teams.length:null,Es=$?.role==="owner"||$?.role==="admin",Os=c.useMemo(()=>new Map(L.map(r=>[r.tenant_id,r.tenant_name])),[L]),{data:ie,agents:$s,isLoading:Fs,isFetching:U,error:K,refetch:Fe,pagination:B}=ut({page:n,perPage:i,categories:o?[o]:void 0,name:j==="name"&&b||void 0,description:j==="description"&&b||void 0,sort:P.sort,order:P.order,tenantId:z}),G=$?ys(K):null,le=$s??[],Le=U&&ie!==void 0,{statuses:ze,isKnown:Ls,isError:zs,isFetching:pe,refetch:Ms}=Nt({agentIds:z?[]:le.map(r=>r.id)}),fe=c.useRef(null),je=c.useRef(null),[Me,Ds]=c.useState(0);c.useEffect(()=>{Me!==0&&(fe.current??je.current)?.focus()},[Me]);const De=c.useRef(null),ke=c.useRef(!1),ye=c.useMemo(()=>[...new Set((ie?.records??[]).flatMap(r=>r.categories??[]))],[ie]);c.useEffect(()=>{k(r=>ye.every(V=>r.includes(V))?r:[...new Set([...r,...ye])])},[ye]);const qs=()=>{m(null),y(""),a(1),Ds(r=>r+1)},M=(Fs||U)&&ie===void 0,qe=!M&&!F&&(K!==null||le.length===0);c.useEffect(()=>{!ke.current||M||(ke.current=!1,K?De.current?.focus():(fe.current??je.current)?.focus())},[M,K]);const Ue=c.useRef(null),Us=r=>{a(r),Ue.current?.scrollIntoView({block:"nearest"})},Bs=r=>{m(r),a(1)},Hs=r=>{y(r),a(1)},Qs=r=>{S(r),a(1)},Be=c.useRef(new Map),Ks=r=>{v(r),a(1)},He=B&&!F?B.totalRecords:null,Ne=z?`shared with ${N??"this organization"}`:"in the public hub",Qe=(r,V)=>`${r} ${V}${r===1?"":"s"} ${Ne}`;let H;return h==="skills"?H=" ":h==="teams"?z?be.isLoading?H="Loading teams…":ne!==null?H=Qe(ne,"team"):H=`Teams ${Ne}`:H=" ":M?H="Loading agents…":B?H=Qe(B.totalRecords,"agent"):H=`Agents ${Ne}`,e.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[e.jsx(at,{title:"Agent hub",subtitle:"Discover and download community agents on Radient",icon:It}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[p&&e.jsxs(Z,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-unavailable",children:[e.jsx(ee,{children:"Organizations are unavailable"}),e.jsx(se,{children:p})]}),e.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-x-4 gap-y-2","data-testid":"agent-hub-browse-bar",children:[e.jsx(lt,{value:h,onValueChange:r=>T(r),children:e.jsx(rt,{"aria-label":"Browse the hub by type",children:["agents","teams",...A?["skills"]:[]].map(r=>e.jsxs(ct,{value:r,id:ls[r],"aria-controls":h===r?rs:void 0,"data-testid":`agent-hub-view-${r}`,children:[r==="agents"?"Agents":r==="teams"?"Teams":u("ui.hub.skills.title"),r!=="skills"&&(r==="agents"?He:ne)!==null&&e.jsx("span",{className:"min-w-[2ch] font-normal text-ink-dim tabular-nums",children:r==="agents"?He:ne})]},r))})}),O.length>0&&e.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-2",children:[e.jsx("span",{"aria-hidden":"true",className:"text-meta text-ink-muted",children:"Showing"}),e.jsxs("fieldset",{className:"m-0 min-w-0 border-0 p-0","data-testid":"agent-hub-scope",children:[e.jsx("legend",{className:"sr-only",children:"Show the hub of"}),e.jsx("div",{className:"flex flex-wrap gap-0.5 rounded-md bg-sunken p-0.5",children:[{value:W,label:"Public hub",Icon:tt},...O.map(r=>({value:r.tenant_id,label:r.tenant_name||"Organization",Icon:Lt}))].map(({value:r,label:V,Icon:Vs})=>e.jsxs(C,{ref:Ke=>{Ke?Be.current.set(r,Ke):Be.current.delete(r)},variant:"ghost",size:"sm","aria-pressed":g===r,onClick:()=>Qs(r),title:V,"data-testid":`agent-hub-scope-${r===W?"public":`org-${r}`}`,className:D("max-w-48",g===r&&"bg-surface text-ink hover:bg-surface"),children:[e.jsx(Vs,{"aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:V})]},r))})]})]})]}),e.jsx(ot,{id:rs,labelledBy:ls[h],children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-row overflow-hidden",children:[h==="agents"&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"mr-6 hidden w-60 shrink-0 rounded-md bg-surface p-2 md:block","data-glass-region":"panel","data-tour-tag":"agent-hub-sidebar-container",children:!qe&&e.jsx(Bt,{selectedCategory:o,onSelectCategory:Bs,categories:R})})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-y-auto",children:[h==="agents"&&!qe&&e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:D("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(te,{ref:fe,type:"search",value:w,onChange:r=>Hs(r.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(Ye,{value:j,onValueChange:Ks,children:[e.jsx(Ge,{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(Xe,{})}),e.jsx(Je,{children:Na.map(r=>e.jsx(Ze,{value:r.value,children:r.label},r.value))})]})]}),e.jsxs(Ye,{value:x,onValueChange:f,children:[e.jsx(Ge,{className:"w-48","aria-label":"Sort agents","data-testid":"agent-hub-sort",children:e.jsx(Xe,{})}),e.jsx(Je,{children:re.map(r=>e.jsx(Ze,{value:r.value,children:r.label},r.value))})]})]}),e.jsxs("p",{ref:Ue,"aria-live":"polite",className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-status",children:[H,h==="agents"&&Le?e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{"data-testid":"agent-hub-updating",children:"Updating…"})]}):null]}),h==="agents"&&e.jsxs(e.Fragment,{children:[t&&zs&&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(C,{variant:"ghost",size:"sm",onClick:()=>void Ms(),disabled:pe,"aria-busy":pe,children:pe?"Trying…":"Try again"})]}),M&&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},(r,V)=>e.jsx(wa,{},V))}),M&&B===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(_,{className:"h-4 w-24"})}),e.jsx("output",{"aria-live":"polite","data-testid":"agent-hub-outage",className:D(!M&&K&&!G?"block":"sr-only"),children:!M&&K&&!G&&e.jsxs(Z,{variant:"danger",className:"max-w-2xl","aria-busy":U,"data-testid":"agent-hub-error",children:[e.jsx(ee,{children:t?"The hub could not be loaded":"Sign in to use the hub"}),e.jsx(se,{children:t?Oe("The agent list could not be loaded.",K):"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(C,{ref:De,variant:"outline",size:"sm",onClick:()=>{ke.current=!0,Fe()},disabled:U,"aria-busy":U,children:U?"Trying…":"Try again"})})]})}),!M&&G&&$&&e.jsxs(Z,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-no-access",children:[e.jsx(ee,{children:G==="plan"?"That organization needs an active Team plan":"You do not have access to that organization"}),e.jsx(se,{children:G==="plan"?`Sharing agents inside an organization is part of the Team plan. An owner of ${$.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 ${$.tenant_name||"that organization"}, so its agents are not listed here. An owner can invite you again.`}),G==="plan"&&e.jsx("div",{className:"mt-2",children:e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void Fe(),disabled:U,"aria-busy":U,children:U?"Trying…":"Try again"})})]}),!M&&!K&&e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6","aria-busy":Le,children:le.length===0?e.jsxs("div",{"data-testid":"agent-hub-empty",className:D("col-span-full w-full flex flex-col items-center gap-2 rounded-md bg-surface px-6 py-10 text-center",!z&&"max-w-2xl justify-self-center"),children:[e.jsx("p",{className:"text-heading text-ink",children:z?"This organization has no shared agents yet.":o?`No agents in ${gs(o).label}.`:F?"No agents match that search.":"The hub is empty."}),e.jsx("p",{className:"max-w-md text-body-sm text-ink-muted",children:z?`Agents published into ${$?.tenant_name||"this organization"} appear here for its members.`:o?"Nothing in this category yet. Clear the filter to see the whole hub.":F?"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:F?e.jsx(C,{variant:"secondary",onClick:qs,children:o?"Clear filter":"Clear search"}):z&&!Es?null:e.jsx(C,{ref:je,variant:"secondary",onClick:()=>s("/agents"),children:"Publish an agent"})})]}):le.map(r=>e.jsx(qt,{agent:r,status:t?ze[r.id]:void 0,viewerStateKnown:t&&vt(Ls,ze,r.id),orgName:r.visibility==="org"?Os.get(r.tenant_id)??null:null},r.id))}),!M&&B&&B.totalPages>1&&e.jsx($e,{count:B.totalPages,page:B.page,onChange:Us})]}),h==="skills"&&(A?e.jsx(sa,{scope:g===W?{visibility:"public",tenantId:null,organization:null}:{visibility:"org",tenantId:g,organization:N},signedIn:t,accessible:q&&(g===W||ss(l))},`skills:${g}`):e.jsx("p",{className:"text-body-sm text-warning",children:u("ui.hub.skills.unavailable")})),h==="teams"&&($?e.jsx(ma,{tenantId:$.tenant_id,orgName:N}):e.jsx(fa,{signedIn:t,onOpenSettings:()=>s("/settings")}))]})]})})]})]})};export{qa as AgentHubPage};