local-operator-ui 0.31.27 → 0.31.28

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 (113) hide show
  1. package/out/main/index.js +240 -39
  2. package/out/preload/index.js +37 -0
  3. package/out/renderer/assets/{_basePickBy-oM-LmypH.js → _basePickBy-D16oopNi.js} +1 -1
  4. package/out/renderer/assets/{_baseUniq-CfyEpPZd.js → _baseUniq-BYKYfwtj.js} +1 -1
  5. package/out/renderer/assets/{agent-details-page-DIBks4X5.js → agent-details-page-CpwkLhdq.js} +2 -2
  6. package/out/renderer/assets/{agent-hub-page-oV4gEqC4.js → agent-hub-page-BYeba0zC.js} +3 -3
  7. package/out/renderer/assets/{agents-page-CZrNPorc.js → agents-page-BQdR1fgV.js} +3 -3
  8. package/out/renderer/assets/arc-BYg3WIzZ.js +1 -0
  9. package/out/renderer/assets/architectureDiagram-IEHRJDOE-np6HwkQz.js +36 -0
  10. package/out/renderer/assets/{blockDiagram-JOT3LUYC-Cn1dvDZU.js → blockDiagram-JOT3LUYC-CaR7YwVl.js} +2 -2
  11. package/out/renderer/assets/{book-open-P6KBj9Du.js → book-open--g1VlVMp.js} +1 -1
  12. package/out/renderer/assets/browser-page-BPwZPQY2.js +1 -0
  13. package/out/renderer/assets/browser-webauthn-prompt-Bsk0eXNZ.js +1 -0
  14. package/out/renderer/assets/{c4Diagram-VJAJSXHY-B8F1XGHT.js → c4Diagram-VJAJSXHY-DqBT3rl5.js} +4 -4
  15. package/out/renderer/assets/channel-mWTr8anL.js +1 -0
  16. package/out/renderer/assets/{chunk-4BMEZGHF-CVoXO2u6.js → chunk-4BMEZGHF-B7-MzFPi.js} +1 -1
  17. package/out/renderer/assets/{chunk-A2AXSNBT-LFo0s6P7.js → chunk-A2AXSNBT-B9IqNrNg.js} +1 -1
  18. package/out/renderer/assets/{chunk-AEK57VVT-B8s36YJo.js → chunk-AEK57VVT-DFzBJNd9.js} +1 -1
  19. package/out/renderer/assets/{chunk-D6G4REZN-BKkRpyOx.js → chunk-D6G4REZN-DW-XzsAv.js} +1 -1
  20. package/out/renderer/assets/{chunk-RZ5BOZE2-qoB87AlE.js → chunk-RZ5BOZE2-C7el6yre.js} +1 -1
  21. package/out/renderer/assets/{chunk-XZIHB7SX-BACgoEDe.js → chunk-XZIHB7SX-BGYrq1Wn.js} +1 -1
  22. package/out/renderer/assets/classDiagram-GIVACNV2-DsNAZ0y6.js +1 -0
  23. package/out/renderer/assets/classDiagram-v2-COTLJTTW-DsNAZ0y6.js +1 -0
  24. package/out/renderer/assets/clone-48M_nlg0.js +1 -0
  25. package/out/renderer/assets/{console-mirror-fXJ5fMxl.js → console-mirror-ffbsozOd.js} +1 -1
  26. package/out/renderer/assets/{consoleCapture-Df4uIOqu.js → consoleCapture-CiApa6fi.js} +1 -1
  27. package/out/renderer/assets/conversation-input-sync-CIGg7Rga.css +1 -0
  28. package/out/renderer/assets/conversation-input-sync-DQUYkOfh.js +911 -0
  29. package/out/renderer/assets/dagre-OKDRZEBW-BVScRDvj.js +4 -0
  30. package/out/renderer/assets/diagram-SSKATNLV-B0iQ6YY1.js +43 -0
  31. package/out/renderer/assets/diagram-VNBRO52H-Co6YPtUT.js +24 -0
  32. package/out/renderer/assets/{erDiagram-Q7BY3M3F-CGjlhqbg.js → erDiagram-Q7BY3M3F-C9XIuSQl.js} +2 -2
  33. package/out/renderer/assets/error-boundary-DH4MhqhL.js +126 -0
  34. package/out/renderer/assets/{flowDiagram-4HSFHLVR-rb1I18B8.js → flowDiagram-4HSFHLVR-QTHrGPk1.js} +2 -2
  35. package/out/renderer/assets/{ganttDiagram-APWFNJXF-D-bSpERZ.js → ganttDiagram-APWFNJXF-qC1VnBIz.js} +2 -2
  36. package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-D7UGP8uH.js +65 -0
  37. package/out/renderer/assets/{graph-BkNT14na.js → graph-BIUuz2bp.js} +1 -1
  38. package/out/renderer/assets/index-C5Ighs_C.css +1 -0
  39. package/out/renderer/assets/index-Ckvy9Zge.js +1 -0
  40. package/out/renderer/assets/{index-_dbvHdgc.js → index-D-TXozHA.js} +1 -1
  41. package/out/renderer/assets/index-DHKnfVbX.css +1 -0
  42. package/out/renderer/assets/index-DTc-sJ8S.js +7 -0
  43. package/out/renderer/assets/index-vK67PDia.js +784 -0
  44. package/out/renderer/assets/infoDiagram-PH2N3AL5-DYtVGJC7.js +2 -0
  45. package/out/renderer/assets/installer-BcSiJA6N.js +1 -0
  46. package/out/renderer/assets/{journeyDiagram-U35MCT3I-B5bji5kb.js → journeyDiagram-U35MCT3I-vVg2sFTp.js} +6 -6
  47. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-BGi8PMEB.js → kanban-definition-NDS4AKOZ-BE36wSk2.js} +4 -4
  48. package/out/renderer/assets/{layout-D3rwe0Wt.js → layout-bOQrw0b8.js} +1 -1
  49. package/out/renderer/assets/{legacy-agents-page-DnpWTuf8.js → legacy-agents-page-BSKz_UrV.js} +4 -4
  50. package/out/renderer/assets/{mermaid.core-CHiYins7.js → mermaid.core-DpvY6Bhk.js} +5 -5
  51. package/out/renderer/assets/mesh-page-9Q8Sc9J_.js +1 -0
  52. package/out/renderer/assets/mindmap-definition-ALO5MXBD-B9PPN6sb.js +95 -0
  53. package/out/renderer/assets/mini-ySULdryU.js +1 -0
  54. package/out/renderer/assets/org-surface-gate-Dl4zcl5q.js +1 -0
  55. package/out/renderer/assets/{page-header-B3kbzqCp.js → page-header-DazB-GQz.js} +1 -1
  56. package/out/renderer/assets/pieDiagram-IB7DONF6-DkioNhQY.js +30 -0
  57. package/out/renderer/assets/projects-page-C37RiUJz.js +35 -0
  58. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-BZkLgvoE.js → quadrantDiagram-7GDLP6J5-4m3m0N6F.js} +4 -4
  59. package/out/renderer/assets/{radar-MK3ICKWK-QB0E4nFC.js → radar-MK3ICKWK-DS8YGAOb.js} +1 -1
  60. package/out/renderer/assets/radient-auth-buttons-DZeHRL7u.js +1 -0
  61. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-Cb1rqfe3.js → requirementDiagram-KVF5MWMF-DsBdUu3C.js} +3 -3
  62. package/out/renderer/assets/sankeyDiagram-QLVOVGJD-CnaPYKR6.js +10 -0
  63. package/out/renderer/assets/{schedules-page-DnHKOQij.js → schedules-page-B0dSGpXt.js} +12 -12
  64. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-Bh-yCDC0.js → sequenceDiagram-X6HHIX6F-C3eja1QY.js} +2 -2
  65. package/out/renderer/assets/settings-page-CrMsVX3d.js +292 -0
  66. package/out/renderer/assets/{settings-section-C9etJXA9.js → settings-section-BGG4XzV0.js} +1 -1
  67. package/out/renderer/assets/stateDiagram-DGXRK772-CjFKiyXn.js +1 -0
  68. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-BsbYpgkp.js +1 -0
  69. package/out/renderer/assets/{timeline-definition-BDJGKUSR-pgK_gxyk.js → timeline-definition-BDJGKUSR-CAXy0nQD.js} +2 -2
  70. package/out/renderer/assets/ui-preferences-store-B6Fr0UX9.js +1 -0
  71. package/out/renderer/assets/{use-download-agent-mutation-CXw_g4Rv.js → use-download-agent-mutation-LsNre_-6.js} +3 -3
  72. package/out/renderer/assets/use-memberships-query-BgiSfYgr.js +1 -0
  73. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-CYYxIZAM.js → xychartDiagram-VJFVF3MP-CfNm8SWG.js} +6 -6
  74. package/out/renderer/console-capture.html +5 -5
  75. package/out/renderer/index.html +9 -9
  76. package/out/renderer/installer.html +4 -5
  77. package/out/renderer/mini.html +7 -6
  78. package/package.json +2 -3
  79. package/out/renderer/assets/aida-control-CQx1CGx-.js +0 -50
  80. package/out/renderer/assets/arc-DXJiD7SC.js +0 -1
  81. package/out/renderer/assets/architectureDiagram-IEHRJDOE-VHM5BLyo.js +0 -36
  82. package/out/renderer/assets/browser-page-D6eiItUp.js +0 -1
  83. package/out/renderer/assets/browser-webauthn-prompt-CByfVm08.js +0 -1
  84. package/out/renderer/assets/channel-DZQWNfux.js +0 -1
  85. package/out/renderer/assets/classDiagram-GIVACNV2-jw9F6ZK-.js +0 -1
  86. package/out/renderer/assets/classDiagram-v2-COTLJTTW-jw9F6ZK-.js +0 -1
  87. package/out/renderer/assets/clone-DzWAH3PE.js +0 -1
  88. package/out/renderer/assets/dagre-OKDRZEBW-CLMw1D7m.js +0 -4
  89. package/out/renderer/assets/diagram-SSKATNLV-plMydQ5N.js +0 -43
  90. package/out/renderer/assets/diagram-VNBRO52H-BptPse7H.js +0 -24
  91. package/out/renderer/assets/error-boundary-D3Um1PIl.js +0 -6
  92. package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-DDJQIXgd.js +0 -65
  93. package/out/renderer/assets/index-2qmFWi_F.css +0 -1
  94. package/out/renderer/assets/index-BXamXVGw.js +0 -7
  95. package/out/renderer/assets/index-D3ICBbhi.js +0 -1642
  96. package/out/renderer/assets/index-DHcQTmYa.js +0 -1
  97. package/out/renderer/assets/index-DuUnXH9L.css +0 -1
  98. package/out/renderer/assets/infoDiagram-PH2N3AL5-Bg2dnJEw.js +0 -2
  99. package/out/renderer/assets/installer-D-IQpqXR.js +0 -1
  100. package/out/renderer/assets/mesh-page-B2_ZtHTQ.js +0 -1
  101. package/out/renderer/assets/mindmap-definition-ALO5MXBD-BwO55Ck2.js +0 -95
  102. package/out/renderer/assets/mini-D7VYY0xP.js +0 -1
  103. package/out/renderer/assets/org-surface-gate-Da1VmZbG.js +0 -1
  104. package/out/renderer/assets/pieDiagram-IB7DONF6-j0i7dQ2D.js +0 -30
  105. package/out/renderer/assets/projects-page-f-tkHojn.js +0 -35
  106. package/out/renderer/assets/radient-auth-buttons-2wnsv7f6.js +0 -1
  107. package/out/renderer/assets/sankeyDiagram-QLVOVGJD-ST_5m9Zy.js +0 -10
  108. package/out/renderer/assets/settings-page-D1dF4GZE.js +0 -292
  109. package/out/renderer/assets/stateDiagram-DGXRK772-D6MGh56o.js +0 -1
  110. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-Dvv5Bcoz.js +0 -1
  111. package/out/renderer/assets/textarea-DeXGhzIK.js +0 -121
  112. package/out/renderer/assets/ui-preferences-store-BLiDaCIL.js +0 -1
  113. package/out/renderer/assets/use-memberships-query-BGPQ6jDl.js +0 -1
@@ -1 +0,0 @@
1
- import{b as M,D as oe}from"./index-_dbvHdgc.js";const v=e=>{let n;const t=new Set,o=(u,m)=>{const h=typeof u=="function"?u(n):u;if(!Object.is(h,n)){const l=n;n=m??(typeof h!="object"||h===null)?h:Object.assign({},n,h),t.forEach(p=>p(n,l))}},r=()=>n,i={setState:o,getState:r,getInitialState:()=>c,subscribe:u=>(t.add(u),()=>t.delete(u))},c=n=e(o,r,i);return i},re=e=>e?v(e):v,se=e=>e;function ae(e,n=se){const t=M.useSyncExternalStore(e.subscribe,()=>n(e.getState()),()=>n(e.getInitialState()));return M.useDebugValue(t),t}const N=e=>{const n=re(e),t=o=>ae(n,o);return Object.assign(t,n),t},ie=e=>e?N(e):N;function ce(e,n){let t;try{t=e()}catch{return}return{getItem:r=>{var s;const a=c=>c===null?null:JSON.parse(c,void 0),i=(s=t.getItem(r))!=null?s:null;return i instanceof Promise?i.then(a):a(i)},setItem:(r,s)=>t.setItem(r,JSON.stringify(s,void 0)),removeItem:r=>t.removeItem(r)}}const P=e=>n=>{try{const t=e(n);return t instanceof Promise?t:{then(o){return P(o)(t)},catch(o){return this}}}catch(t){return{then(o){return this},catch(o){return P(o)(t)}}}},le=(e,n)=>(t,o,r)=>{let s={storage:ce(()=>localStorage),partialize:d=>d,version:0,merge:(d,S)=>({...S,...d}),...n},a=!1;const i=new Set,c=new Set;let u=s.storage;if(!u)return e((...d)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...d)},o,r);const m=()=>{const d=s.partialize({...o()});return u.setItem(s.name,{state:d,version:s.version})},h=r.setState;r.setState=(d,S)=>{h(d,S),m()};const l=e((...d)=>{t(...d),m()},o,r);r.getInitialState=()=>l;let p;const T=()=>{var d,S;if(!u)return;a=!1,i.forEach(f=>{var g;return f((g=o())!=null?g:l)});const E=((S=s.onRehydrateStorage)==null?void 0:S.call(s,(d=o())!=null?d:l))||void 0;return P(u.getItem.bind(u))(s.name).then(f=>{if(f)if(typeof f.version=="number"&&f.version!==s.version){if(s.migrate){const g=s.migrate(f.state,f.version);return g instanceof Promise?g.then(O=>[!0,O]):[!0,g]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,f.state];return[!1,void 0]}).then(f=>{var g;const[O,te]=f;if(p=s.merge(te,(g=o())!=null?g:l),t(p,!0),O)return m()}).then(()=>{E?.(p,void 0),p=o(),a=!0,c.forEach(f=>f(p))}).catch(f=>{E?.(void 0,f)})};return r.persist={setOptions:d=>{s={...s,...d},d.storage&&(u=d.storage)},clearStorage:()=>{u?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>T(),hasHydrated:()=>a,onHydrate:d=>(i.add(d),()=>{i.delete(d)}),onFinishHydration:d=>(c.add(d),()=>{c.delete(d)})},s.skipHydration||T(),p||l},ue=le,A=260,$=220,F=320,R=56,de=A,fe=1024,X=480,G=400,he=560;function V(e){return Math.max(0,Math.min(he,e-X))}function L(e){return V(e)>=G?"docked":"overlay"}function me(e,n=A){return L(e-j(n))==="overlay"&&L(e-R)==="docked"}function j(e){return Number.isNaN(e)?A:Math.min(F,Math.max($,e))}function cn(e,n,t,o=A,r=!1){if(e>=fe){const a=!n&&r&&me(e,o);return{mode:n||a?"strip":"docked",width:n||a?R:j(o),collapsed:n||a,sheetOpen:!1,resizable:!n&&!a}}return{mode:t?"overlay":"strip",width:t?de:R,collapsed:!0,sheetOpen:t,resizable:!1}}function ln(e){return e.shiftKey||e.altKey||!(e.metaKey||e.ctrlKey)?!1:e.key.toLowerCase()==="b"}const un=e=>e?"⌘B":"Ctrl+B",dn="@container/chatcol",fn="w-full @min-[750px]/chatcol:max-w-[var(--lo-chat-measure)] @min-[750px]/chatcol:mx-auto",ge="--lo-chat-measure-shipped",D="--lo-chat-measure-override",hn=()=>{if(typeof document>"u"||typeof getComputedStyle!="function")return null;const e=getComputedStyle(document.documentElement).getPropertyValue(ge).trim(),n=Number.parseFloat(e);return Number.isFinite(n)&&n>0?n:null},mn="px-6",gn="max-h-[7.5rem] overflow-y-auto leading-5",pe=520,Se=1100,_e=3,Y=e=>Math.min(Se,Math.max(pe,Math.round(e))),Ce=({startWidth:e,deltaX:n,edge:t})=>Y(t==="right"?e+n*2:e-n*2),B=(e,n)=>Math.min(e,n),pn=({startWidth:e,deltaX:n,edge:t,panePx:o})=>{if(Math.abs(n)<_e)return null;const r=Ce({startWidth:e,deltaX:n,edge:t});return B(r,o)===B(e,o)?null:r},ye=["active","created"],Sn={running:"Running",today:"Today",week:"This week",older:"Older"},Ae=new Set(["busy","delegating","approval","answer","wedged"]);function K(e){return Ae.has(e.status?.code??"")}const Ee=24*60*60*1e3,Oe=e=>{const n=new Date(e);return n.setHours(0,0,0,0),n.getTime()};function Q(e,n){const t=n==="created"?e.created_at:e.updated_at;return typeof t!="number"||!Number.isFinite(t)||n==="created"&&t<=0?null:t*1e3}function be(e,n,t){if(K(e))return"running";const o=Q(e,t);if(o===null)return"older";const r=Oe(n);return o>=r?"today":o>=r-6*Ee?"week":"older"}function _n(e,n,t){const o={running:[],today:[],week:[],older:[]};for(const r of e)o[be(r,n,t)].push(r);return o}function Pe(e,n,t){const o=Q(e,t);if(o===null)return"";const r=Math.floor(Math.max(0,n-o)/6e4);if(r<1)return"now";if(r<60)return`${r}m`;const s=Math.floor(r/60);if(s<24)return`${s}h`;const a=Math.floor(s/24);if(a<7)return`${a}d`;const i=Math.floor(a/7);return a<365?`${i}w`:`${Math.floor(a/365)}y`}function Cn(e,n,t){const o=Pe(e,n,t);if(!o)return"";const r=t==="created"?"created":"last active";if(o==="now")return`${r} just now`;const s={m:"minute",h:"hour",d:"day",w:"week",y:"year"},a=Number.parseInt(o,10),i=s[o.slice(-1)];return`${r} ${a} ${i}${a===1?"":"s"} ago`}const w=["pinned","running","today","week","older","agents","teams"],yn={pinned:"Pinned",running:"Running",today:"Today",week:"This week",older:"Older",agents:"Agents",teams:"Teams"};function An(e){return e==="agents"||e==="teams"}const En=8,y={hidden:[],order:[...w],pins:[],groupBy:"section",basis:"active",orderBy:"active-first",loads:0,pinnedAgents:[]},Re=10,_=[25,50],we=50,Ie=500,Te=64;function I(e){const n=Math.max(0,Math.floor(e));return n===0?Re:n<=_.length?_[n-1]:_[_.length-1]+(n-_.length)*we}function On(e,n){const t=I(e+1)-I(e),o=Math.max(0,Math.min(t,n));return o===1?"Show 1 more chat":`Show ${o} more chats`}function J(e){return K(e)}function bn(e,n){if(n==="recent")return[...e];const t=[],o=[];for(const r of e)(J(r)?t:o).push(r);return[...t,...o]}function Pn(e,n){const{limit:t,currentId:o,searching:r=!1}=n;if(r)return{rows:[...e],lifted:!1,remaining:0};const s=e.slice(0,Math.max(0,t)),a=Math.max(0,e.length-s.length);if(!o)return{rows:s,lifted:!1,remaining:a};const i=e.findIndex(c=>c.session_id===o);return i<0||i<s.length?{rows:s,lifted:!1,remaining:a}:{rows:[e[i],...s],lifted:!0,remaining:a}}function Rn(e,n){if(n.searching)return{rows:[...e],lifted:!1,hidden:0,held:e.length};const t=I(n.loads),o=[];let r=t;for(const c of e){if(J(c)){o.push(c);continue}r>0&&(o.push(c),r-=1)}const s=n.currentId,a=s==null?null:e.find(c=>c.session_id===s)??null,i=a!==null&&!o.includes(a);return{rows:i&&a!==null?[a,...o]:o,lifted:i,hidden:e.length-o.length-(i?1:0),held:e.length}}function wn(e){if(e.add<=0)return null;const n=e.add===1?"Show 1 more chat":`Show ${e.add} more chats`;if(e.drawn>=e.total)return{label:n,aria:n};const t=`${e.drawn} of ${e.total}`;return{label:`${n} · ${t}`,aria:`${n} · ${t} shown`}}const Me="mt-4",ve="mt-2";function In(e){return e?Me:ve}function Tn(e,n,t){return t?e.toLocaleLowerCase().includes(t.toLocaleLowerCase())||n>0:!0}function Mn(e,n){if(n==="section")return null;if(n==="flat")return[{key:"all",label:"",rows:[...e]}];const t=new Map;for(const s of e){const a=s.binding?.team||s.binding?.agent||"",i=a||"ungrouped",c=t.get(i)??{key:i,label:a||"Ungrouped",rows:[]};c.rows.push(s),t.set(i,c)}const o=[...t.values()],r=o.findIndex(s=>s.key==="ungrouped");return r>0&&o.push(...o.splice(r,1)),o}function Ne(e,n){return!e.hidden.includes(n)}function Z(e){return e.order.filter(n=>Ne(e,n))}function vn(e,n){const t=e.hidden.includes(n)?e.hidden.filter(o=>o!==n):[...e.hidden,n];return{...e,hidden:t}}function Nn(e,n,t){const o=Z(e),r=o.indexOf(n),s=o[r+t];if(r<0||s===void 0)return e;const a=e.order.indexOf(n),i=e.order.indexOf(s),c=[...e.order];return c[a]=s,c[i]=n,{...e,order:c}}const Le=["running","today","week","older"];function H(e){return Le.includes(e)}function Ln(e,n,t,o){if(!H(n)||o&&!o(n))return!1;const r=Z(e),s=r.indexOf(n);if(s<0)return!1;const a=r[s+t];return a===void 0||!H(a)?!1:o?o(a):!0}const De=["section","agent","flat"],Be=["active-first","recent"];function Dn(e){if(typeof e!="object"||e===null)return y;const n=e,t=new Set(w),o=[];if(Array.isArray(n.order))for(const l of n.order)typeof l=="string"&&t.has(l)&&(o.includes(l)||o.push(l));for(const l of w)o.includes(l)||o.push(l);const r=[];if(Array.isArray(n.hidden))for(const l of n.hidden)typeof l=="string"&&t.has(l)&&(r.includes(l)||r.push(l));const s=De.includes(n.groupBy)?n.groupBy:y.groupBy,a=ye.includes(n.basis)?n.basis:y.basis,i=Be.includes(n.orderBy)?n.orderBy:y.orderBy,c=typeof n.loads=="number"&&Number.isFinite(n.loads)&&n.loads>0?Math.min(Ie,Math.floor(n.loads)):0,u=[];if(Array.isArray(n.pinnedAgents)){for(const l of n.pinnedAgents)if(typeof l=="string"&&l!==""&&!u.includes(l)){if(u.length>=Te)break;u.push(l)}}const m=[],h=new Set;if(Array.isArray(n.pins))for(const l of n.pins)typeof l=="string"&&l.length!==0&&(h.has(l)||(h.add(l),m.push(l)));return{hidden:r,order:o,groupBy:s,basis:a,orderBy:i,loads:c,pins:m,pinnedAgents:u}}const He="both",W={background:"sunken",foreground:"ink",cursor:"accent",cursorAccent:"surface",selectionBackground:"accent",selectionForeground:"onAccent",black:"inkDim",red:"danger",green:"success",yellow:"warning",blue:"info",magenta:"danger",cyan:"info",white:"ink",brightBlack:"inkMuted",brightRed:"danger",brightGreen:"success",brightYellow:"warning",brightBlue:"info",brightMagenta:"danger",brightCyan:"info",brightWhite:"ink"},We=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Bn=(e=document.documentElement)=>{const n=getComputedStyle(e),t={};for(const o of Object.keys(W)){const r=$e(n,W[o]);r&&(t[o]=r)}return Object.keys(t).length===0&&xe(e),t},Hn=(e,n=document.documentElement)=>{if(e==null)return;n.dataset.theme=e,n.classList.toggle("dark",e.toLowerCase().includes("light")===!1),ke(n,"--color-sunken")||console.warn(`[console] the capture view was fed theme "${e}", which resolves no role variables; the frame will not be this app's colours`)},ke=(e,n)=>typeof getComputedStyle!="function"?"":getComputedStyle(e).getPropertyValue(n).trim(),k=new Set,xe=e=>{const n=e.dataset.theme??"(none)";k.has(n)||(k.add(n),console.warn(`[console] no terminal role resolved for theme "${n}": the terminal is painting xterm's own defaults, not this app's palette`))},Ue=13,$e=(e,n)=>{const t=We(n),o=e.getPropertyValue(`--color-${t}`).trim();if(x(o))return o;const r=e.getPropertyValue(`--lo-${t}`).trim();return x(r)?r:""},Fe=/^#[0-9a-fA-F]{3,8}$/,Xe=/^(rgb|rgba|hsl|hsla|color)\(/,x=e=>Fe.test(e)||Xe.test(e),Ge=(e=document.documentElement)=>typeof document>"u"||typeof getComputedStyle!="function"?"monospace":getComputedStyle(e).getPropertyValue("--font-mono").trim()||"monospace",Ve=(e,n=Ue,t=typeof window>"u"?1:window.devicePixelRatio||1)=>{let o=n*.6,r=n*1.2;if(typeof document>"u")return{cellWidth:o,cellHeight:r};const s=e??Ge(),i=document.createElement("canvas").getContext("2d");if(!i)return{cellWidth:o,cellHeight:r};i.font=`${n}px ${s}`;const c=i.measureText("W");Number.isFinite(c.width)&&c.width>0&&(o=c.width);const u=c.fontBoundingBoxAscent+c.fontBoundingBoxDescent;return Number.isFinite(u)&&u>0&&(r=je(u,t)),{cellWidth:o,cellHeight:r}},je=(e,n)=>Math.ceil(e*n)/n,C=e=>({isRunPanelOpen:e==="isRunPanelOpen",isCanvasOpen:e==="isCanvasOpen",isBrowserPaneOpen:e==="isBrowserPaneOpen",isConsolePaneOpen:e==="isConsolePaneOpen"});function Wn(e,n){const t=n.isCanvasOpen?"canvas":n.isRunPanelOpen?"run":n.isBrowserPaneOpen?"browser":n.isConsolePaneOpen?"console":null;if(t===null)return 0;let o;switch(t){case"canvas":o=Math.max(G,n.rightSlotWidth||z);break;case"run":o=Math.max(ze,n.rightSlotWidth||q);break;case"browser":o=Math.max(qe,n.rightSlotWidth||ee);break;case"console":o=Math.max(en,n.rightSlotWidth||ne);break}return e<=0?o:t==="canvas"?Math.min(o,V(e)):Math.min(o,Math.max(0,e-X))}const z=800,U=A,q=420,Ye=20,Ke=4,ee=640,Qe=100,Je=16,Ze=()=>Math.ceil(Qe*Ve().cellWidth)+Je,ne=Ze(),ze=320,qe=480,en=480,nn=5e3,kn=(e,n)=>e.some(t=>t.surface===n),xn=(e,n=Date.now())=>e.some(t=>n-t.at<nn),tn=[],b=e=>{if(typeof document>"u")return;const n=document.documentElement;if(e===null){n.style.removeProperty(D);return}n.style.setProperty(D,`${e}px`)},Un=ie()(ue(e=>({isCommandPaletteOpen:!1,commandPaletteQuery:"",isSidebarCollapsed:!1,showAgentReasoning:!1,themeName:oe,rightSlotWidth:0,chatSidebarWidth:U,chatSidebarRegions:He,chatSidebarView:y,chatSidebarListHeight:null,chatMeasureWidth:null,chatSidebarOrder:"entities-first",dismissedBuiltinOfferSignature:"",isCanvasOpen:!1,isRunPanelOpen:!1,isBrowserPaneOpen:!1,isConsolePaneOpen:!1,consoleOpenIntent:null,runPanelReveal:null,browserPaneScope:"conversation",consoleActiveSurface:null,consoleUnseen:tn,isCreateAgentDialogOpen:!1,mentionRecents:null,profileRecents:{agent:[],team:[]},openCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!0})},closeCreateAgentDialog:()=>{e({isCreateAgentDialogOpen:!1})},openCommandPalette:()=>{e({isCommandPaletteOpen:!0})},closeCommandPalette:()=>{e({isCommandPaletteOpen:!1,commandPaletteQuery:""})},toggleCommandPalette:(n="")=>{e(t=>({isCommandPaletteOpen:!t.isCommandPaletteOpen,commandPaletteQuery:t.isCommandPaletteOpen?t.commandPaletteQuery:n}))},setCommandPaletteQuery:n=>{e({commandPaletteQuery:n})},toggleSidebar:()=>{e(n=>({isSidebarCollapsed:!n.isSidebarCollapsed}))},setSidebarCollapsed:n=>{e({isSidebarCollapsed:n})},setShowAgentReasoning:n=>{e({showAgentReasoning:n})},setTheme:n=>{e({themeName:n})},setCanvasOpen:n=>{e(n?C("isCanvasOpen"):{isCanvasOpen:!1})},setRunPanelOpen:n=>{e(n?C("isRunPanelOpen"):{isRunPanelOpen:!1})},setBrowserPaneOpen:n=>{e(n?C("isBrowserPaneOpen"):{isBrowserPaneOpen:!1})},setConsolePaneOpen:n=>{e(n?C("isConsolePaneOpen"):{isConsolePaneOpen:!1})},setConsoleActiveSurface:n=>{e({consoleActiveSurface:n})},requestConsoleOpen:n=>{e({consoleOpenIntent:n})},clearConsoleOpenIntent:n=>{e(t=>t.consoleOpenIntent===n?{consoleOpenIntent:null}:{})},markConsoleUnseen:(n,t)=>{e(o=>o.consoleUnseen.some(r=>r.surface===t)?{}:{consoleUnseen:[...o.consoleUnseen,{sessionId:n,surface:t,at:Date.now()}]})},clearConsoleUnseen:n=>{const t=Array.isArray(n)?n:[n];e(o=>{const r=o.consoleUnseen.filter(s=>!t.includes(s.surface));return r.length===o.consoleUnseen.length?{}:{consoleUnseen:r}})},setRightSlotWidth:n=>{e({rightSlotWidth:n})},restoreDefaultRightSlotWidth:()=>{e({rightSlotWidth:0})},setBrowserPaneScope:n=>{e({browserPaneScope:n})},revealRunPanelSection:n=>{e(t=>({...C("isRunPanelOpen"),runPanelReveal:{section:n,nonce:(t.runPanelReveal?.nonce??0)+1}}))},clearRunPanelReveal:n=>{e(t=>t.runPanelReveal?.nonce===n?{runPanelReveal:null}:{})},setChatSidebarWidth:n=>{e({chatSidebarWidth:Math.min(F,Math.max($,n))})},setChatSidebarRegions:n=>{e({chatSidebarRegions:n})},setChatSidebarListHeight:n=>{e({chatSidebarListHeight:n})},restoreDefaultChatSidebarListHeight:()=>{e({chatSidebarListHeight:null})},setChatMeasureWidth:n=>{const t=Y(n);b(t),e({chatMeasureWidth:t})},restoreDefaultChatMeasureWidth:()=>{b(null),e({chatMeasureWidth:null})},setChatSidebarOrder:n=>{e({chatSidebarOrder:n})},setChatSidebarView:n=>{e({chatSidebarView:n})},dismissBuiltinOffer:n=>{e({dismissedBuiltinOfferSignature:n})},restoreDefaultChatSidebarWidth:()=>{e({chatSidebarWidth:U})},rememberMention:(n,t)=>{e(o=>{const r=o.mentionRecents,s=r?.cwd===n?r.paths:[],a=[t,...s.filter(i=>i!==t)].slice(0,Ye);return{mentionRecents:{cwd:n,paths:a}}})},rememberProfile:(n,t)=>{e(o=>({profileRecents:{...o.profileRecents,[n]:on(o.profileRecents[n]??[],t)}}))}}),{name:"ui-preferences-storage",version:1,migrate:sn,partialize:rn,onRehydrateStorage:()=>e=>{b(e?.chatMeasureWidth??null)}}));function on(e,n){return[n,...e.filter(t=>t!==n)].slice(0,Ke)}function rn(e){const{runPanelReveal:n,consoleOpenIntent:t,...o}=e;return o}function sn(e,n){const t={...e??{}};if(n>=1)return t;const o=[["canvasWidth",z],["runPanelWidth",q],["browserPanelWidth",ee],["consolePanelWidth",ne]];let r=0;for(const[s,a]of o){const i=t[s];if(typeof i=="number"&&i>0&&i!==a){r=i;break}}for(const[s]of o)delete t[s];return t.rightSlotWidth=r,t}export{Pe as $,nn as A,kn as B,Se as C,Q as D,Ne as E,H as F,An as G,yn as H,vn as I,Nn as J,Ln as K,Dn as L,Pn as M,I as N,bn as O,y as P,_n as Q,Z as R,fe as S,Ue as T,En as U,Tn as V,In as W,Mn as X,On as Y,Rn as Z,wn as _,Hn as a,K as a0,Cn as a1,Sn as a2,ze as a3,G as a4,V as a5,qe as a6,en as a7,q as a8,L as a9,ee as aa,ne as ab,X as ac,ce as b,ie as c,cn as d,R as e,Wn as f,F as g,$ as h,ln as i,pe as j,D as k,B as l,Ve as m,pn as n,Ce as o,ue as p,hn as q,Bn as r,un as s,Ge as t,Un as u,fn as v,dn as w,gn as x,mn as y,xn as z};
@@ -1 +0,0 @@
1
- import{x as v,y as A,z as h,P as $,B as _,C as w,E as I,F as R,G as q,H as L}from"./aida-control-CQx1CGx-.js";import{V as P,W as N,X as S,Y as r,Z as k}from"./index-D3ICBbhi.js";const f={malware_or_exploitation:"Instructions to build or spread malware, or to attack systems you do not own, cannot be published.",credential_theft:"Instructions to obtain someone else's credentials or tokens cannot be published.",fraud_or_deception:"Instructions to deceive or defraud people cannot be published.",harassment_or_hate:"Instructions to harass, threaten or target people cannot be published.",sexual_content_minors:"This agent cannot be published. If you believe this is a mistake, contact support.",sexual_content:"Explicit sexual content cannot be published.",violence_or_weapons:"Instructions to build weapons or to injure people cannot be published.",drugs_or_controlled_substances:"Instructions to make or traffic illegal drugs cannot be published.",self_harm:"This agent cannot be published. If you believe this is a mistake, contact support.",mass_surveillance_or_privacy_abuse:"Instructions to surveil or profile people without their consent cannot be published.",evasion_or_abuse_tooling:"Instructions to evade or defeat safety and anti-abuse systems cannot be published.",prompt_injection:"This instruction set tries to instruct the reviewer rather than describe an agent, so it cannot be published.",unclear_dual_use:"We could not tell whether this is aimed at your own systems or someone else's. Add a sentence stating the scope and target, then publish again.",other_harmful:"This agent was rejected because its instructions would cause harm."},E=e=>{const n=e.trim();return n.length>12&&/\s/.test(n)&&!/^(not found|bad request|unauthorized|error|internal server error)\.?$/i.test(n)};function O(e){const n=e?.categories?.[0];return n&&S(n)?f[n]:f.other_harmful}function C(e,n){const t=n?.rule?` ${n.rule}`:"";switch(n?.field){case"name":return{body:`Name${t||" is not acceptable"}.`,field:"name"};case"instructions":return{body:t?`The instruction body${t}.`:`The instruction body must be between 1 and ${$} characters.`,field:"instructions"};case"description":return{body:`Description${t}.`,field:"description"};case"tools":return{body:`Tools${t}.`,field:"tools"};case"when_to_use":return{body:`When to use${t}.`,field:"when_to_use"};case"categories":return{body:`Categories${t}.`,field:"categories"};case"tags":return{body:`Tags${t}.`,field:"tags"};default:return{body:e,field:null}}}function V(e,n){const t=n.surface==="pull",a=t?"Nothing was pulled.":"Nothing was published.",o=t?"pull again":"publish again",i=n.name.trim()||(t?"this team":"this agent");switch(e.code){case"name_taken":return e.details?.owned_by_caller===!0?{variant:"danger",headline:"You already published this agent",body:`You published "${i}" already. Update that listing instead of publishing a second one.`,note:null,actions:e.details?.existing_agent_id||n.hubAgentId?["update-listing","focus-name"]:["focus-name"]}:{variant:"danger",headline:"That name is taken",body:`"${i}" is already published on the hub by another account. Agent names are unique across the hub.`,note:null,actions:["focus-name"]};case"name_claim_in_flight":return{variant:"warning",headline:"That name is being published right now",body:`Someone is publishing an agent called "${i}" at this moment. It is not claimed — try again in a moment.`,note:null,actions:["retry"]};case"name_reserved_builtin":{const s=e.details?.builtin_name,d=s?h(s)===h(i):!1;return{variant:"danger",headline:"That name is reserved",body:s&&!d?`"${i}" is reserved by the built-in agent "${s}". Built-in names cannot be published to the hub.`:`"${s??i}" is the name of a built-in agent. Built-in names cannot be published to the hub.`,note:null,actions:["focus-name","install-builtin"]}}case"moderation_rejected":return{variant:"danger",headline:"This agent was not accepted",body:e.details?.reason?.trim()||e.message,note:O(e.details),actions:["edit-instructions"]};case"moderation_unavailable":return{variant:"warning",headline:"Review is temporarily unavailable",body:"We could not review this agent just now. Nothing was published. Try again in a minute.",note:null,actions:["retry"]};case"invalid_instruction_set":{const{body:s,field:d}=C(e.message,e.details);return{variant:"danger",headline:"The agent document is not valid",body:s,note:null,actions:d==="name"?["focus-name"]:d==="instructions"?["edit-instructions"]:["edit-agent"]}}case"payload_too_large":{const s=e.details?.limit_bytes;return{variant:"danger",headline:"This agent is too large to publish",body:s?`The instruction set is larger than ${Math.round(s/1024)} KiB. Shorten the instructions.`:"The instruction set is larger than the hub accepts. Shorten the instructions.",note:null,actions:["edit-instructions"]}}case"not_owner":return{variant:"danger",headline:"You cannot update this listing",body:"This listing belongs to another account.",note:null,actions:["publish-as-new"]};case"agent_not_found":return{variant:"danger",headline:"That listing no longer exists",body:"It may have been delisted.",note:null,actions:["publish-as-new","refresh-hub"]};case"hub_unauthorized":return{variant:"danger",headline:"The hub refused this machine's sign-in",body:`${a} Sign in to Radient again to replace the credential the hub refused, then ${o}.`,note:null,actions:["sign-in"]};case"hub_unavailable":return{variant:"warning",headline:t?"The pull did not go through":"The publication did not go through",body:E(e.message)?e.message:`${a} Try again in a moment, or update the backend if the hub has moved.`,note:null,actions:["retry"]};case"local_failure":return{variant:"warning",headline:t?"The team could not be pulled from this machine":"The agent could not be published from this machine",body:e.message,note:null,actions:["retry"]};case"team_plan_required":return{variant:"warning",headline:"That organization needs an active Team plan",body:t?"Reading an organization's teams is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then pull again.":"Sharing agents inside an organization is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then publish again.",note:null,actions:["retry"]};case"not_a_member":return{variant:"danger",headline:"You are not a member of that organization",body:`${a} Ask an owner of the organization to invite you, then ${o}.`,note:null,actions:[]};case"insufficient_role":{const s=e.details?.required;return{variant:"danger",headline:"Your organization role does not allow this",body:s?`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} the ${s} role. Ask an owner of the organization to change your role, then ${o}.`:`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} a higher role than yours. Ask an owner of the organization to change your role, then ${o}.`,note:null,actions:[]}}case"team_not_found":return{variant:"danger",headline:"That team is no longer published",body:"It may have been delisted since this page was loaded.",note:null,actions:["refresh-hub"]};default:return{variant:"danger",headline:"The agent could not be published",body:e.message,note:null,actions:["retry"]}}}const z=[/^(?:Download agent from Radient failed: )?(?:Error downloading agent from Radient: )?\s*/,/^Failed to download agent(?: [^\s]+)? from Radient Agent Hub(?: due to a requests error)?:\s*/,/^[A-Za-z_][\w.]*\([^)]*\):\s*/],U=/^(\d{3})\b/,F=new Set([404,410]),j=["read timed out","connection timed out","connection refused","connection aborted","connection reset","connectionerror","connecttimeout","remote end closed connection","max retries exceeded","temporary failure in name resolution","name or service not known","no route to host"],x=e=>{const n=e.toLowerCase();return j.some(t=>n.includes(t))||N(e)},B=(e,n)=>{const t=n.trim()?`"${n.trim()}"`:"That agent";if(P(e))switch(e.code){case"agent_not_found":return`${t} is no longer on the hub, so nothing was downloaded.`;case"hub_unavailable":return`The hub did not complete the download, so ${t} was not downloaded.`;default:return`${t} was not downloaded: ${e.message}`}const a=z.reduce((i,s)=>i.replace(s,""),A(e,"").trim()).trim();if(!a)return`${t} could not be downloaded.`;const o=Number(U.exec(a)?.[1]??Number.NaN);return F.has(o)?`${t} is no longer on the hub, so nothing was downloaded.`:x(a)||o===408?`The hub could not be reached, so ${t} was not downloaded.`:o===429?`The hub is busy, so ${t} was not downloaded. Try again in a moment.`:o===401||o===403?`The hub refused this machine's sign-in, so ${t} was not downloaded.`:o>=500?`The hub could not complete the download, so ${t} was not downloaded. Try again in a moment.`:o>=400?`The hub refused the download, so ${t} is not here.`:`${t} was not downloaded: ${a}`},D="The action did not complete.",J=(e,n,t)=>e==="download"?B(n,t):v(D,n),ee={"focus-name":"Choose another name","update-listing":"Update the existing listing","install-builtin":"Install the built-in instead",retry:"Try again","edit-instructions":"Edit the instructions","edit-agent":"Edit the agent","publish-as-new":"Publish as a new listing","sign-in":"Sign in again","refresh-hub":"Refresh the hub"};function c(){return crypto.randomUUID()}async function K(e=1,n=20,t){const a={page:e,per_page:n};if(t)for(const[o,i]of Object.entries(t))i&&(a[o]=i);return r({operation:"agents.list",query:a})}async function ne(e){return r({operation:"agents.get",agentId:e})}async function te(e){return r({operation:"agents.delete",agentId:e,requestId:c(),confirmed:!0})}async function ae(e){return r({operation:"agents.like",agentId:e,requestId:c()})}async function oe(e){return r({operation:"agents.unlike",agentId:e,requestId:c(),confirmed:!0})}async function se(e){return r({operation:"agents.favourite",agentId:e,requestId:c()})}async function ie(e){return r({operation:"agents.unfavourite",agentId:e,requestId:c(),confirmed:!0})}async function re(e,n){return r({operation:"comments.create",agentId:e,payload:n,requestId:c()})}async function ue(e,n=1,t=20){return r({operation:"comments.list",agentId:e,query:{page:n,per_page:t}})}async function le(e,n,t){return r({operation:"comments.update",agentId:e,commentId:n,payload:t,requestId:c()})}async function ce(e,n){return r({operation:"comments.delete",agentId:e,commentId:n,requestId:c(),confirmed:!0})}async function de(e){return r({operation:"agents.statuses",query:{agent_ids:e.join(",")}})}async function M(){return r({operation:"memberships.list"})}async function W(e,n=1,t=20,a){const o={page:n,per_page:t};if(a)for(const[i,s]of Object.entries(a))s&&(o[i]=s);return r({operation:"org_agents.list",tenantId:e,query:o})}async function he(e){return r({operation:"org_teams.list",tenantId:e})}const Y="download_count",b={all:["public-agents"],list:e=>[...b.all,"list",{page:e.page,perPage:e.perPage,categories:e.categories?.join(",")??void 0,name:e.name??void 0,description:e.description??void 0,sort:e.sort,order:e.order}]},m={all:["org-agents"],list:(e,n)=>[...m.all,"list",e,{page:n.page,perPage:n.perPage,categories:n.categories?.join(",")??void 0,name:n.name??void 0,description:n.description??void 0,sort:n.sort,order:n.order}]},Q=e=>e&&e[0]===m.all[0]?String(e[2]??""):null,ge=e=>e.invalidateQueries({queryKey:b.all}),me=(e,n)=>e.invalidateQueries({queryKey:n?[...m.all,"list",n]:m.all}),be=({page:e=1,perPage:n=20,enabled:t=!0,categories:a,name:o,description:i,sort:s=Y,order:d="desc",tenantId:g}={})=>{const p={page:e,perPage:n,categories:a,name:o,description:i,sort:s,order:d},T=g?m.list(g,p):b.list(p),l=_({queryKey:T,queryFn:async()=>{const u={};return a&&a.length>0&&(u.categories=a.join(",")),o&&(u.name=o),i&&(u.description=i),u.sort=s,u.order=d,g?await W(g,e,n,u):await K(e,n,u)},select:u=>u.result,enabled:t,retry:w,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,placeholderData:(u,y)=>Q(y?.queryKey)===(g??null)?u:void 0});return{...l,agents:l.data?.records,isRefreshing:l.isFetching&&l.data!==void 0,pagination:l.data?{page:l.data.page,perPage:l.data.per_page,totalPages:l.data.total_pages,totalRecords:l.data.total_records}:void 0}},H={name:"Name",description:"Description",instructions:"The instruction body",tools:"Tools"};function pe(e){const n=[],t=(a,o)=>{o&&n.push({field:a,message:`${H[a]} ${o}.`})};return t("name",I(e.name)),t("description",R(e.description)),e.instructions!==null&&t("instructions",q(e.instructions)),t("tools",L(e.tools??[])),n}function ye(e,n){const t=h(e);return n.some(a=>h(a)===t)}function fe(e){for(const n of e??[]){const t=n.indexOf(":");if(t<0||n.slice(0,t).trim().toLowerCase()!=="tools")continue;const a=n.slice(t+1).split(",").map(o=>o.trim()).filter(Boolean);return a.length>0?a:null}return null}function _e(e,n){const t=h(e);return n.find(a=>h(a)===t)??null}const G={all:["memberships"]},we=({enabled:e=!0}={})=>{const{isAuthenticated:n}=k(),t=_({queryKey:G.all,queryFn:async()=>(await M()).result??{memberships:[]},enabled:e&&n,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:w});return{...t,memberships:t.data?.memberships??[]}};export{ee as P,te as a,we as b,re as c,ce as d,J as e,he as f,ne as g,be as h,ge as i,de as j,b as k,ue as l,ie as m,se as n,oe as o,V as p,ae as q,_e as r,me as s,ye as t,le as u,pe as v,fe as w};