local-operator-ui 0.34.44 → 0.34.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/main/index.js +948 -66
- package/out/preload/index.js +234 -18
- package/out/renderer/assets/{_basePickBy-C-GwcPo5.js → _basePickBy-AOIZJtmP.js} +1 -1
- package/out/renderer/assets/{_baseUniq-whkmDW6w.js → _baseUniq-6rYoQPQm.js} +1 -1
- package/out/renderer/assets/{agent-details-page-DpCpkTfN.js → agent-details-page-B9MNIwUW.js} +2 -2
- package/out/renderer/assets/agent-hub-page-Bj3VsEfD.js +11 -0
- package/out/renderer/assets/agents-page-y_fPy8cB.js +7 -0
- package/out/renderer/assets/arc-DEIVtaqP.js +1 -0
- package/out/renderer/assets/architectureDiagram-IEHRJDOE-C6lgf3ft.js +36 -0
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-Dp4G8uLX.js → blockDiagram-JOT3LUYC-rUXOYgBS.js} +6 -6
- package/out/renderer/assets/{book-open-C9onOH1C.js → book-open-BWUyDXVa.js} +1 -1
- package/out/renderer/assets/browser-page-BENwHsVf.js +1 -0
- package/out/renderer/assets/browser-webauthn-prompt-BlawzvV4.js +1 -0
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-CnX5ELGv.js → c4Diagram-VJAJSXHY-B5DZCCX3.js} +1 -1
- package/out/renderer/assets/channel-vM9rusk9.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-DYgqjjvg.js → chunk-4BMEZGHF-LYO-H6gm.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-3DoU7E6Y.js → chunk-A2AXSNBT-C-eXpCGB.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-OX8UcnIV.js → chunk-AEK57VVT-CkjgDW9B.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-Dbt1r37J.js → chunk-D6G4REZN-hAERljt9.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-CdLKa5S8.js → chunk-RZ5BOZE2-D1aP9fPZ.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-B_CjCOio.js → chunk-XZIHB7SX-Chv37Bqx.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-BCqIuRq4.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-BCqIuRq4.js +1 -0
- package/out/renderer/assets/clone-Bj8HwBLn.js +1 -0
- package/out/renderer/assets/{console-mirror-D1YYJxrt.js → console-mirror-DF_IQ1r-.js} +14 -14
- package/out/renderer/assets/consoleCapture-CAbvxCQS.js +1 -0
- package/out/renderer/assets/{conversation-input-sync-BbbcfWqh.js → conversation-input-sync-BdhFw-JY.js} +259 -261
- package/out/renderer/assets/dagre-OKDRZEBW-ClDfyejg.js +4 -0
- package/out/renderer/assets/diagram-SSKATNLV-BECmfn9C.js +43 -0
- package/out/renderer/assets/diagram-VNBRO52H-82BMsx_Z.js +24 -0
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-Cs4yDA7g.js → erDiagram-Q7BY3M3F-BiCriqsZ.js} +1 -1
- package/out/renderer/assets/{error-boundary-YxH9ow-2.js → error-boundary-B4K6A3dS.js} +2 -2
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-BofJ9_8f.js → flowDiagram-4HSFHLVR-D4PQMO6X.js} +1 -1
- package/out/renderer/assets/ganttDiagram-APWFNJXF-Rts_QpVD.js +257 -0
- package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-B1rxvfyh.js +65 -0
- package/out/renderer/assets/{graph-D3WT1lJS.js → graph-DxQCKx-L.js} +1 -1
- package/out/renderer/assets/index-BJ-AJLyd.js +804 -0
- package/out/renderer/assets/index-BhsV-ipc.js +1 -0
- package/out/renderer/assets/index-C7mMgpwT.css +1 -0
- package/out/renderer/assets/index-XFXAg7sM.js +7 -0
- package/out/renderer/assets/infoDiagram-PH2N3AL5-CDvWuX2O.js +2 -0
- package/out/renderer/assets/{installer-BzSW3GXd.js → installer-B4Bd2pBF.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-DVmD515J.js → journeyDiagram-U35MCT3I-CnefKX-i.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-DpiJ7P3i.js → kanban-definition-NDS4AKOZ-Kd7aNO4_.js} +1 -1
- package/out/renderer/assets/{layout-BFA2wwh_.js → layout-CMQ0zdhs.js} +1 -1
- package/out/renderer/assets/legacy-agents-page-PBvD5xd9.js +33 -0
- package/out/renderer/assets/{mermaid.core-C7iGmYcY.js → mermaid.core-x5Fva3t5.js} +5 -5
- package/out/renderer/assets/mesh-page-IOGN512j.js +1 -0
- package/out/renderer/assets/messages-D3mGACg6.js +3 -0
- package/out/renderer/assets/mindmap-definition-ALO5MXBD-DJwQ3wYh.js +95 -0
- package/out/renderer/assets/mini-DHQCkYmb.js +1 -0
- package/out/renderer/assets/{notebook-pen-rCh1XFso.js → notebook-pen-CKFoYavJ.js} +1 -1
- package/out/renderer/assets/org-access-_jPzS_wW.js +1 -0
- package/out/renderer/assets/org-surface-gate-D29XdDTt.js +1 -0
- package/out/renderer/assets/{page-header-DWR3DkBt.js → page-header-D90TvAM5.js} +1 -1
- package/out/renderer/assets/pieDiagram-IB7DONF6-CW-ezwOn.js +30 -0
- package/out/renderer/assets/projects-page-DGLblpIY.js +45 -0
- package/out/renderer/assets/publication-validation-ZquLmMLD.js +1 -0
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-u3qKyomE.js → quadrantDiagram-7GDLP6J5-cgwnEsXh.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-DTXBXOd-.js → radar-MK3ICKWK-DvOkOeQ6.js} +1 -1
- package/out/renderer/assets/radient-auth-buttons-y3JK-yD8.js +1 -0
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-CIyOJzHO.js → requirementDiagram-KVF5MWMF-DOMWjtoO.js} +1 -1
- package/out/renderer/assets/sankeyDiagram-QLVOVGJD-CE3E7VO5.js +10 -0
- package/out/renderer/assets/{schedules-page-DHwzeRvF.js → schedules-page-ETT8R0wn.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-DCj3Ke6W.js → sequenceDiagram-X6HHIX6F-C4EGcl7U.js} +1 -1
- package/out/renderer/assets/{settings-page-Br0K0YLW.js → settings-page-BZDF6UIV.js} +1 -1
- package/out/renderer/assets/stateDiagram-DGXRK772-wBbKaUQh.js +1 -0
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-Bh0k2Dz3.js +1 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-C4cCAtD2.js → timeline-definition-BDJGKUSR-CgTCOxCY.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-CRmN4Z4O.js → use-download-agent-mutation-DkI3E5yA.js} +4 -4
- package/out/renderer/assets/use-memberships-query-Hv-eprVl.js +1 -0
- package/out/renderer/assets/{use-session-snapshot-DZAAvDEa.js → use-session-snapshot-CfEF5TPK.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-DG9g8Bz_.js → xychartDiagram-VJFVF3MP-G2SxM5sQ.js} +1 -1
- package/out/renderer/console-capture.html +5 -5
- package/out/renderer/index.html +7 -7
- package/out/renderer/installer.html +4 -4
- package/out/renderer/mini.html +7 -7
- package/package.json +2 -2
- package/out/renderer/assets/agent-hub-page-CUIy_Kx2.js +0 -11
- package/out/renderer/assets/agents-page-2HbuAEbx.js +0 -7
- package/out/renderer/assets/arc-DDs-mKBJ.js +0 -1
- package/out/renderer/assets/architectureDiagram-IEHRJDOE-CPUUDGvU.js +0 -36
- package/out/renderer/assets/browser-page-DYIlDoNt.js +0 -1
- package/out/renderer/assets/browser-webauthn-prompt-BCVHqXb0.js +0 -1
- package/out/renderer/assets/channel-DMF6TPjP.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-B0EbOHV0.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-B0EbOHV0.js +0 -1
- package/out/renderer/assets/clone-D1pjaXDr.js +0 -1
- package/out/renderer/assets/consoleCapture-B-w56zDU.js +0 -1
- package/out/renderer/assets/dagre-OKDRZEBW-Di-XleTu.js +0 -4
- package/out/renderer/assets/diagram-SSKATNLV-HX5Tirdq.js +0 -43
- package/out/renderer/assets/diagram-VNBRO52H-BkGCdAFk.js +0 -24
- package/out/renderer/assets/ganttDiagram-APWFNJXF-B8-HoTDC.js +0 -257
- package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-B72gxYgp.js +0 -65
- package/out/renderer/assets/index-B7VSZn2a.css +0 -1
- package/out/renderer/assets/index-Bo-U0L08.js +0 -804
- package/out/renderer/assets/index-BwwNZ8BB.js +0 -1
- package/out/renderer/assets/index-StPsU3lP.js +0 -7
- package/out/renderer/assets/infoDiagram-PH2N3AL5-ChbJv-y5.js +0 -2
- package/out/renderer/assets/legacy-agents-page-C_w_SC0A.js +0 -33
- package/out/renderer/assets/mesh-page-DMSyd0cL.js +0 -1
- package/out/renderer/assets/mindmap-definition-ALO5MXBD-FgYmOkcR.js +0 -95
- package/out/renderer/assets/mini-B9yZoGaU.js +0 -1
- package/out/renderer/assets/org-surface-gate-CDIyXoCz.js +0 -1
- package/out/renderer/assets/pieDiagram-IB7DONF6-Ahxca-lE.js +0 -30
- package/out/renderer/assets/projects-page-BclfcCc4.js +0 -50
- package/out/renderer/assets/radient-auth-buttons-D6EcW_pf.js +0 -1
- package/out/renderer/assets/sankeyDiagram-QLVOVGJD-DPL4XBFG.js +0 -10
- package/out/renderer/assets/stateDiagram-DGXRK772-C_ILyKXn.js +0 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-DgnGm7tu.js +0 -1
- package/out/renderer/assets/ui-preferences-store-lljzccwU.js +0 -1
- package/out/renderer/assets/use-memberships-query-DIOIcGCQ.js +0 -1
- /package/out/renderer/assets/{index-CzjIMcYW.js → index-B-uibf5k.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as l,
|
|
1
|
+
import{c as l,y as R}from"./error-boundary-B4K6A3dS.js";import{t as j,c as F,n as U,b as _,g as Q,f as B,h as S,i as z,j as N,a as C}from"./en-US-BcB1DWxG.js";import{j as r,c as g,r as V}from"./index-B-uibf5k.js";import{bJ as I,by as O,bK as P,B as w,C as Y,u as k,aH as b,aK as Z,aI as D,bD as G,aq as W,ah as v,bE as J}from"./conversation-input-sync-BdhFw-JY.js";import{aF as X,aG as ee,aH as L}from"./index-BJ-AJLyd.js";import{B as te}from"./book-open-BWUyDXVa.js";import{k as ae,m as ne,n as se,o as oe,q as ie}from"./use-memberships-query-Hv-eprVl.js";import{b as re,l as ce}from"./publication-validation-ZquLmMLD.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -43,7 +43,7 @@ import{c as l,r as F}from"./error-boundary-YxH9ow-2.js";import{t as j,c as K,n a
|
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const _e=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],
|
|
46
|
+
*/const _e=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Ze=l("heart",_e);/**
|
|
47
47
|
* @license lucide-react v0.507.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
@@ -53,9 +53,9 @@ import{c as l,r as F}from"./error-boundary-YxH9ow-2.js";import{t as j,c as K,n a
|
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const Ne=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],
|
|
56
|
+
*/const Ne=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],Ce=l("scale",Ne);/**
|
|
57
57
|
* @license lucide-react v0.507.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
61
|
+
*/const De=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],ve=l("shopping-cart",De);function qe(e,t){const o=+j(e)-+j(t);return o<0?-1:o>0?1:o}function Ie(e){return F(e,Date.now())}function Oe(e){return t=>{const a=(e?Math[e]:Math.trunc)(t);return a===0?0:a}}function Le(e,t,o){const a=Q(),n=o?.locale??a.locale??B,s=qe(e,t);if(isNaN(s))throw new RangeError("Invalid time value");const i=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:s}),[h,m]=U(o?.in,...s>0?[t,e]:[e,t]),d=Oe("round"),x=m.getTime()-h.getTime(),f=x/C,T=_(m)-_(h),y=(x-T)/C,K=o?.unit;let u;if(f<1?u="second":f<60?u="minute":f<S?u="hour":y<z?u="day":y<N?u="month":u="year",u==="second"){const c=d(x/1e3);return n.formatDistance("xSeconds",c,i)}else if(u==="minute"){const c=d(f);return n.formatDistance("xMinutes",c,i)}else if(u==="hour"){const c=d(f/60);return n.formatDistance("xHours",c,i)}else if(u==="day"){const c=d(y/S);return n.formatDistance("xDays",c,i)}else if(u==="month"){const c=d(y/z);return c===12&&K!=="month"?n.formatDistance("xYears",1,i):n.formatDistance("xMonths",c,i)}else{const c=d(y/N);return n.formatDistance("xYears",c,i)}}function Ge(e,t){return Le(e,Ie(e),t)}const $={investment:{icon:r.jsx(ue,{size:14,"aria-hidden":"true"}),label:"Investment"},accounting:{icon:r.jsx(te,{size:14,"aria-hidden":"true"}),label:"Accounting"},healthcare:{icon:r.jsx(je,{size:14,"aria-hidden":"true"}),label:"Healthcare"},legal:{icon:r.jsx(Ce,{size:14,"aria-hidden":"true"}),label:"Legal"},software:{icon:r.jsx(P,{size:14,"aria-hidden":"true"}),label:"Software"},security:{icon:r.jsx(ee,{size:14,"aria-hidden":"true"}),label:"Security"},role_play:{icon:r.jsx(O,{size:14,"aria-hidden":"true"}),label:"Role play"},personal_assistance:{icon:r.jsx(X,{size:14,"aria-hidden":"true"}),label:"Personal assistance"},education:{icon:r.jsx(Me,{size:14,"aria-hidden":"true"}),label:"Education"},marketing:{icon:r.jsx(ze,{size:14,"aria-hidden":"true"}),label:"Marketing"},sales:{icon:r.jsx(ve,{size:14,"aria-hidden":"true"}),label:"Sales"},research:{icon:r.jsx(ke,{size:14,"aria-hidden":"true"}),label:"Research"},analysis:{icon:r.jsx(he,{size:14,"aria-hidden":"true"}),label:"Analysis"},management:{icon:r.jsx(fe,{size:14,"aria-hidden":"true"}),label:"Management"},social_media:{icon:r.jsx(ge,{size:14,"aria-hidden":"true"}),label:"Social media"},other:{icon:r.jsx(xe,{size:14,"aria-hidden":"true"}),label:"Other"}};function p(e){const t=e.split("_").join(" ");return t.charAt(0).toUpperCase()+t.slice(1)}const $e=e=>$[e]??{icon:r.jsx(I,{size:14,"aria-hidden":"true"}),label:p(e)},q="inline-flex min-h-5.5 items-center rounded-full border border-hairline bg-sunken px-2 text-meta leading-none",We=({tags:e,categories:t,className:o})=>{if((!e||e.length===0)&&(!t||t.length===0))return null;const a=new Set((t??[]).map(s=>($[s]?.label??p(s)).toLowerCase())),n=(e??[]).filter(s=>!a.has(p(s).toLowerCase()));return r.jsxs("div",{className:g("relative flex flex-wrap items-center gap-1.5 overflow-hidden",o),"data-testid":"agent-tags-and-categories",children:[t?.map(s=>{const i=$e(s);return r.jsxs("span",{className:g(q,"gap-1 font-medium text-ink-muted"),children:[i.icon,i.label]},s)}),n.map(s=>r.jsxs("span",{className:g(q,"gap-1 font-normal text-ink-dim"),children:[r.jsx(I,{size:12,"aria-hidden":"true"}),p(s)]},s))]})},Je=({orgName:e,className:t})=>r.jsxs(R,{variant:"neutral",className:g("gap-1",t),"data-testid":"agent-org-badge",title:e?`Shared with ${e}, not the public hub`:"Shared with an organization, not the public hub",children:[r.jsx(O,{"aria-hidden":"true"}),e??"Organization"]}),He=new Set(["qa","ai","api","tui","ux","ui"]),H=/[._-]+/,Xe=e=>e.toLowerCase().replace(H," "),Ee=e=>e.split(H).filter(Boolean).map(t=>He.has(t.toLowerCase())?t.toUpperCase():t.charAt(0).toUpperCase()+t.slice(1)).join(" "),et=e=>Ee(e),M={all:["agent-statuses"],page:e=>[...M.all,"page",[...e]]},Te=e=>[...new Set(e)].sort(),tt=({agentIds:e,enabled:t=!0})=>{const{isAuthenticated:o}=w(),a=e.join(","),n=V.useMemo(()=>Te(e),[a]),s=Y({queryKey:M.page(n),queryFn:async()=>(await ae(n)).result?.statuses??{},enabled:t&&o&&n.length>0,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:!1});return{...s,statuses:s.data??{},isKnown:s.isSuccess}},at=(e,t,o)=>o?e&&t[o]!==void 0:!1,E=(e,t,o)=>{e.setQueriesData({queryKey:M.all},a=>{if(!a)return a;const n=a[t]??{liked:!1,favourited:!1};return{...a,[t]:{...n,...o}}})},A=(e,{agentId:t,field:o,delta:a})=>{e.setQueriesData({queryKey:re.all},n=>{if(!n)return n;const s=n.result?.records??[];return s.some(i=>i.id===t)?{...n,result:{...n.result,records:s.map(i=>i.id===t?{...i,[o]:Math.max(0,(i[o]??0)+a)}:i)}}:n})},nt=()=>{const e=k(),{isAuthenticated:t}=w();return b({mutationFn:async({agentId:a,isCurrentlyFavourited:n})=>{if(!t)throw new Error("Authentication required to favourite/unfavourite an agent.");if(!a)throw new Error("Agent ID is required.");return n?(await ne(a),{favourited:!1,changed:!0}):{favourited:!0,changed:(await se(a)).result?.already_favourited!==!0}},onSuccess:({favourited:a,changed:n},s)=>{E(e,s.agentId,{favourited:a}),n&&A(e,{agentId:s.agentId,field:"favourite_count",delta:a?1:-1})}})},st=()=>{const e=k(),{isAuthenticated:t}=w();return b({mutationFn:async({agentId:a,isCurrentlyLiked:n})=>{if(!t)throw new Error("Authentication required to like/unlike an agent.");if(!a)throw new Error("Agent ID is required.");return n?(await oe(a),{liked:!1,changed:!0}):{liked:!0,changed:(await ie(a)).result?.already_liked!==!0}},onSuccess:({liked:a,changed:n},s)=>{E(e,s.agentId,{liked:a}),n&&A(e,{agentId:s.agentId,field:"like_count",delta:a?1:-1})}})},Ke=(e,t)=>{const o=[];for(const[,a]of e.getQueriesData({queryKey:L}))for(const n of a?.agents??[])n.id!==t&&o.push(n.name);return o},ot=()=>{const e=k(),t=Z();return b({mutationFn:async({agentId:a})=>{if(!v.baseUrl)throw new Error("Local Operator API URL is not configured.");return J.downloadAgentFromRadient(v.baseUrl,a)},onSuccess:(a,n)=>{const s=a.result,i=s?.name?.trim()||n.agentName?.trim()||"Agent",h=s?.renamed_from?.trim()||null,m=s?.id?ce(i,Ke(e,s.id)):null;h?D(`Downloaded "${i}" — you already have an agent called "${h}".`):m?G(`Downloaded "${i}". You already have an agent called "${m}", so two agents now answer to that name and either may be picked. Rename one of them.`):D(`Downloaded "${i}" from the hub.`),e.invalidateQueries({queryKey:L}),A(e,{agentId:n.agentId,field:"download_count",delta:1}),a.result?.id?(W.getState().stageDraft({kind:"agent",name:i}),t("/chat")):console.warn("Downloaded agent ID not found in response, cannot navigate to chat.")}})};export{We as A,$ as C,Ze as H,Je as O,st as a,nt as b,ot as c,$e as d,Le as e,Ge as f,et as h,at as i,Xe as n,tt as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as s,B as d,C as m,D as y}from"./conversation-input-sync-BdhFw-JY.js";function a(){return crypto.randomUUID()}async function q(e=1,t=20,n){const r={page:e,per_page:t};if(n)for(const[o,u]of Object.entries(n))u&&(r[o]=u);return s({operation:"agents.list",query:r})}async function w(e){return s({operation:"agents.get",agentId:e})}async function T(e){return s({operation:"agents.delete",agentId:e,requestId:a(),confirmed:!0})}async function I(e){return s({operation:"agents.like",agentId:e,requestId:a()})}async function $(e){return s({operation:"agents.unlike",agentId:e,requestId:a(),confirmed:!0})}async function k(e){return s({operation:"agents.favourite",agentId:e,requestId:a()})}async function v(e){return s({operation:"agents.unfavourite",agentId:e,requestId:a(),confirmed:!0})}async function _(e,t){return s({operation:"comments.create",agentId:e,payload:t,requestId:a()})}async function j(e,t=1,n=20){return s({operation:"comments.list",agentId:e,query:{page:t,per_page:n}})}async function C(e,t,n){return s({operation:"comments.update",agentId:e,commentId:t,payload:n,requestId:a()})}async function P(e,t){return s({operation:"comments.delete",agentId:e,commentId:t,requestId:a(),confirmed:!0})}async function E(e){return s({operation:"agents.statuses",query:{agent_ids:e.join(",")}})}async function f(){return s({operation:"memberships.list"})}async function O(e,t=1,n=20,r){const o={page:t,per_page:n};if(r)for(const[u,c]of Object.entries(r))c&&(o[u]=c);return s({operation:"org_agents.list",tenantId:e,query:o})}async function H(e){return s({operation:"org_teams.list",tenantId:e})}class i extends Error{status;reason;constructor(t,n,r){super(t),this.name="PublicHubError",this.status=n,this.reason=r}}const b=/\/+$/,h=(e,t,n)=>{const r=e.replace(b,"");return n?`${r}/v1/${t}/${encodeURIComponent(n)}`:`${r}/v1/${t}`},p=(e,t)=>h(e,"teams",t),l=async e=>{let t;try{t=await fetch(e,{method:"GET",headers:{Accept:"application/json"},redirect:"error"})}catch(r){throw console.error("The public hub could not be reached:",r),new i("The public hub could not be reached.",null,r)}if(!t.ok)throw new i(`The public hub answered ${t.status}.`,t.status);let n;try{n=await t.json()}catch{throw new i("The public hub answered with a body that is not JSON.",t.status)}if(!n||typeof n!="object"||!("result"in n))throw new i("The public hub answered with a body this app cannot read.",t.status);return n};async function S(e,t=1,n=12){const r=`${p(e)}?page=${t}&per_page=${n}`;return l(r)}async function U(e,t){return l(p(e,t))}const g={all:["memberships"]},x=({enabled:e=!0}={})=>{const{isAuthenticated:t}=d(),n=m({queryKey:g.all,queryFn:async()=>(await f()).result??{memberships:[]},enabled:e&&t,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:y});return{...n,memberships:n.data?.memberships??[]}};export{i as P,q as a,j as b,_ as c,P as d,T as e,x as f,w as g,S as h,U as i,H as j,E as k,O as l,v as m,k as n,$ as o,h as p,I as q,l as r,C as u};
|
package/out/renderer/assets/{use-session-snapshot-DZAAvDEa.js → use-session-snapshot-CfEF5TPK.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as c}from"./conversation-input-sync-
|
|
1
|
+
import{d as c}from"./conversation-input-sync-BdhFw-JY.js";import{r as n}from"./index-B-uibf5k.js";function s(){const[f,a]=n.useState(null),[l,o]=n.useState(null),r=n.useRef(null),u=n.useCallback(async e=>{r.current=e,a(t=>t&&t.id!==e?null:t),o(t=>t&&t.id!==e?null:t);try{const t=await c({op:"sessions.get",sessionId:e});if(r.current!==e)return;a({id:e,frontend:t.payload.frontend.snapshot})}catch{}try{const t=await c({op:"commands.entities",sessionId:e,command:"effort"});if(r.current!==e)return;o({id:e,entities:t.entities})}catch{}},[]);return{frontend:f?.frontend??null,effortEntities:l?.entities,refresh:u}}export{s as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-
|
|
1
|
+
import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-x5Fva3t5.js";import{x as kt,v as Tt,y as Rt}from"./conversation-input-sync-BdhFw-JY.js";import"./index-B-uibf5k.js";import"./messages-D3mGACg6.js";import"./error-boundary-B4K6A3dS.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-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/console-mirror-
|
|
13
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
9
|
+
<script type="module" crossorigin src="./assets/consoleCapture-CAbvxCQS.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/index-B-uibf5k.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-D3mGACg6.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror-DF_IQ1r-.js">
|
|
13
|
+
<link rel="stylesheet" crossorigin href="./assets/index-C7mMgpwT.css">
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
|
|
15
15
|
</head>
|
|
16
16
|
|
package/out/renderer/index.html
CHANGED
|
@@ -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-
|
|
45
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
46
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
47
|
-
<link rel="modulepreload" crossorigin href="./assets/error-boundary-
|
|
48
|
-
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-
|
|
49
|
-
<link rel="modulepreload" crossorigin href="./assets/console-mirror-
|
|
50
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
44
|
+
<script type="module" crossorigin src="./assets/index-BJ-AJLyd.js"></script>
|
|
45
|
+
<link rel="modulepreload" crossorigin href="./assets/index-B-uibf5k.js">
|
|
46
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-D3mGACg6.js">
|
|
47
|
+
<link rel="modulepreload" crossorigin href="./assets/error-boundary-B4K6A3dS.js">
|
|
48
|
+
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-BdhFw-JY.js">
|
|
49
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror-DF_IQ1r-.js">
|
|
50
|
+
<link rel="stylesheet" crossorigin href="./assets/index-C7mMgpwT.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-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/error-boundary-
|
|
14
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/installer-B4Bd2pBF.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/index-B-uibf5k.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/error-boundary-B4K6A3dS.js">
|
|
14
|
+
<link rel="stylesheet" crossorigin href="./assets/index-C7mMgpwT.css">
|
|
15
15
|
</head>
|
|
16
16
|
|
|
17
17
|
<body>
|
package/out/renderer/mini.html
CHANGED
|
@@ -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-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="./assets/error-boundary-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-
|
|
15
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
9
|
+
<script type="module" crossorigin src="./assets/mini-DHQCkYmb.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/index-B-uibf5k.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/error-boundary-B4K6A3dS.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-D3mGACg6.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-BdhFw-JY.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-CfEF5TPK.js">
|
|
15
|
+
<link rel="stylesheet" crossorigin href="./assets/index-C7mMgpwT.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.34.
|
|
3
|
+
"version": "0.34.45",
|
|
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",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"test:session-cookies": "node scripts/session-cookie-electron.test.mjs",
|
|
90
90
|
"test:window-guards": "node scripts/window-guards-electron.test.mjs",
|
|
91
91
|
|
|
92
|
-
"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/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/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/composer-readings.test.mjs scripts/composer-file-drop.test.mjs scripts/ask-draft-swap.test.mjs scripts/ask-queue.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/picker-feedback.test.mjs scripts/picker-host-selection.test.mjs scripts/panel-chart-motion.test.mjs scripts/panel-info-credentials.test.mjs scripts/panel-info-fleet.test.mjs scripts/warm-session.test.mjs scripts/submit-latency.test.mjs scripts/completion-view-ack.test.mjs scripts/echo-delivery.test.mjs scripts/check-runtime-deps.test.mjs scripts/new-chat-row.test.mjs scripts/new-chat-row-evidence.test.mjs scripts/new-chat-shortcut.test.mjs scripts/reconnect-page-gap.test.mjs scripts/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/check-geometry-sources.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/draft-slash-identity.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-chrome.test.mjs scripts/browser-queue-expiry.test.mjs scripts/dev-driver-gate.test.mjs scripts/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/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-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/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/monitor-controls.test.mjs scripts/monitor-cancel-dialog.test.mjs scripts/child-transcript-paging.test.mjs scripts/loader-state-machine.test.mjs scripts/transcript-cursor-continuity.test.mjs scripts/older-history-slot.test.mjs scripts/chat-session-subagents.test.mjs scripts/message-actions.test.mjs scripts/update-indicator-segments.test.mjs scripts/reload-picker-close.test.mjs scripts/projects-time-window.test.mjs scripts/audio-recording-levels.test.mjs scripts/chat-sidebar-row-menu.test.mjs scripts/navigation-gesture.test.mjs scripts/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/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-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/preview-signed-urls.test.mjs scripts/language-live-updates.test.mjs scripts/language-dialog.test.mjs scripts/code-review-delayed-flag.test.mjs scripts/audio-meter-stream.test.mjs scripts/keymap-chords.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/activation.test.mjs scripts/i18n/locale-parity.test.mjs scripts/i18n/locale-reactivity.test.mjs scripts/i18n/ledger-check.test.mjs scripts/streaming-live-markdown.test.mjs scripts/markdown-remend.test.mjs scripts/stream-order-live.test.mjs",
|
|
92
|
+
"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/update-fleet-drain.test.mjs scripts/at-mentions.test.mjs scripts/directory-listing.test.mjs scripts/slash-token.test.mjs scripts/slash-rank.test.mjs scripts/slash-submit.test.mjs scripts/slash-highlight.test.mjs scripts/slash-contract.test.mjs scripts/slash-row-format.test.mjs scripts/owned-serve-lifecycle.test.mjs scripts/launcher-watch.test.mjs scripts/linux-sandbox.test.mjs scripts/capture-evidence.test.mjs scripts/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/composer-readings.test.mjs scripts/composer-file-drop.test.mjs scripts/ask-draft-swap.test.mjs scripts/ask-queue.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/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/browser-host.test.mjs scripts/check-vendored.test.mjs scripts/check-geometry-sources.test.mjs scripts/chat-session-status.test.mjs scripts/draft-selection.test.mjs scripts/draft-slash-identity.test.mjs scripts/toast-lifetime.test.mjs scripts/toast-close-placement.test.mjs scripts/storybook-query-fixture.test.mjs scripts/mcp-list-query.test.mjs scripts/mcp-target-resolution.test.mjs scripts/mcp-auth-surface.test.mjs scripts/mcp-failure-routing.test.mjs scripts/daemon-discovery.test.mjs scripts/daemon-health-state.test.mjs scripts/daemon-observation.test.mjs scripts/session-cookies.test.mjs scripts/move-session.test.mjs scripts/frontend-replace.test.mjs scripts/browser-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-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/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/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/update-indicator-segments.test.mjs scripts/reload-picker-close.test.mjs scripts/projects-time-window.test.mjs scripts/audio-recording-levels.test.mjs scripts/chat-sidebar-row-menu.test.mjs scripts/navigation-gesture.test.mjs scripts/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/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-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-file-actions.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/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/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",
|
|
93
93
|
"check-vendored": "node scripts/check-vendored.mjs",
|
|
94
94
|
"check-evidence": "node scripts/check-evidence.mjs",
|
|
95
95
|
"check-evidence:parity": "node scripts/evidence-histogram-parity.mjs",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e,c as I}from"./index-CzjIMcYW.js";import{aP as qe,aL as pe,aR as Ae,bF as Ss,aF as be,aG as Cs,u as Ps,aM as Rs,bG as _s,aN as As,a7 as te,bH as Os,ay as Ue,ax as je,aV as Ve,bI as ae,bJ as Es,bf as Is,a as Fs,bK as Ls,aZ as $s,bL as Ms}from"./conversation-input-sync-BbbcfWqh.js";import{P as zs}from"./page-header-DWR3DkBt.js";import{c as He,f as G,B as y,e as f,q as Ds,A as K,g as Z,h as X,I as Qe,N as Bs,O as qs,P as Us,Q as Vs,s as Oe,t as Ee,u as Ie,v as Fe,w as Le}from"./error-boundary-YxH9ow-2.js";import{e as Hs,f as Qs,p as Ye,P as We,h as Ys,j as Ws,k as Ge,b as Gs,m as Ks}from"./use-memberships-query-DIOIcGCQ.js";import{h as H,O as Zs,A as Xs,f as Js,H as et,a as st,b as tt,c as at,d as Ke,C as nt,e as it,n as rt,u as lt,i as ct}from"./use-download-agent-mutation-CRmN4Z4O.js";import{c as ot,ar as dt,aq as ut,as as mt}from"./index-Bo-U0L08.js";import{R as Ze}from"./radient-auth-buttons-D6EcW_pf.js";import{o as Xe,u as ht,a as xt,b as gt}from"./org-surface-gate-CDIyXoCz.js";import{f as ft}from"./format-CZUObkkr.js";import"./ui-preferences-store-lljzccwU.js";import"./en-US-BcB1DWxG.js";import"./book-open-C9onOH1C.js";import"./console-mirror-D1YYJxrt.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 pt=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],bt=He("building-2",pt);/**
|
|
7
|
-
* @license lucide-react v0.507.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const jt=[["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"}]],Nt=He("circle-ellipsis",jt),vt=({agent:s,isLiked:t,isFavourited:a,onLikeToggle:n,onFavouriteToggle:r,onDownload:o,isLikeActionLoading:d=!1,isFavouriteActionLoading:C=!1,isDownloading:N=!1,actionError:x=null,onRetryAction:k,showActions:v=!0,viewerStateKnown:p=!0,orgName:g=null})=>{const w=qe(),{isAuthenticated:u}=pe(),O=s.description??"",[_,P]=l.useState(!1),T=l.useRef(null),j=l.useCallback(A=>{if(T.current?.disconnect(),T.current=null,!A)return;const b=()=>P(A.scrollHeight-A.clientHeight>1);b();const S=new ResizeObserver(b);S.observe(A),T.current=S},[]),F=u?p?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",L=u?p?a?"Unfavourite agent":"Favourite agent":"Your favourites could not be read, so this is not shown as unfavourited.":"Log in to Radient to favourite agents",$=p?t?"Unlike agent":"Like agent":"Like state unavailable",M=p?a?"Unfavourite agent":"Favourite agent":"Favourite state unavailable",c=s.visibility==="org",m=H(s.name);return e.jsxs("div",{className:"flex h-full flex-col overflow-hidden rounded-md bg-surface transition-colors duration-fast ease-out-quart hover:bg-elevated",children:[e.jsxs("button",{type:"button",onClick:()=>w(`/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 ${m}`,children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:m}),c&&e.jsx(Zs,{orgName:g}),e.jsx(G,{content:_?O:"",children:e.jsx("span",{ref:j,className:"line-clamp-3 min-h-0 text-body-sm text-ink-muted",children:O})}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsx(Xs,{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 ",Js(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":c?"org":u?p?"known":"unknown":"signed-out",children:[!c&&e.jsxs(e.Fragment,{children:[e.jsx(G,{content:F,children:e.jsx("span",{children:e.jsxs(y,{variant:"ghost",size:"sm",onClick:u&&p?()=>n(s.id):void 0,disabled:d||!u||!p,"aria-label":$,className:I(t&&"text-danger"),children:[e.jsx(et,{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(G,{content:L,children:e.jsx("span",{children:e.jsxs(y,{variant:"ghost",size:"sm",onClick:u?()=>r(s.id):void 0,disabled:C||!u||!p,"aria-label":M,className:I(a&&"text-warning"),children:[e.jsx(ot,{fill:a?"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(G,{content:"Downloads",children:e.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 pr-1 text-ink-dim",children:[e.jsx(Ae,{"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:N?e.jsx(f,{className:"h-3 w-6"}):(s.download_count??0).toLocaleString()})]})})]}),v&&o&&e.jsx("div",{className:"ml-auto flex shrink-0 items-center",children:e.jsxs(y,{variant:"secondary",size:"sm",onClick:()=>o(s),disabled:N,"aria-label":`Download ${m}`,"data-tour-tag":"agent-hub-download-button",children:[e.jsx(Ae,{"data-testid":"agent-download"}),"Get"]})})]}),x&&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:x}),k&&e.jsx(y,{variant:"ghost",size:"sm",onClick:k,children:"Try again"})]})]})},yt=({agent:s,status:t,viewerStateKnown:a=!0,orgName:n=null})=>{const{isAuthenticated:r}=pe(),[o,d]=l.useState(null),C=t?.liked??!1,N=t?.favourited??!1,x=st(),k=tt(),v=at(),p=()=>{!r||x.isPending||(d(null),x.mutate({agentId:s.id,isCurrentlyLiked:C},{onError:()=>d("like")}))},g=()=>{!r||k.isPending||(d(null),k.mutate({agentId:s.id,isCurrentlyFavourited:N},{onError:()=>d("favourite")}))},w=()=>{v.isPending||(d(null),v.mutate({agentId:s.id,agentName:s.name},{onError:()=>d("download")}))},u=o?o==="like"?{action:"like",error:x.error,retry:p}:o==="favourite"?{action:"favourite",error:k.error,retry:g}:{action:"download",error:v.error,retry:w}:null;return e.jsx(vt,{agent:s,isLiked:r&&C,isFavourited:r&&N,onLikeToggle:p,onFavouriteToggle:g,onDownload:w,isLikeActionLoading:x.isPending,isFavouriteActionLoading:k.isPending,isDownloading:v.isPending,viewerStateKnown:a,orgName:n,actionError:u?Hs(u.action,u.error,H(s.name)):null,onRetryAction:u?.retry})},$e=({selected:s,onClick:t,children:a,...n})=>e.jsx("button",{type:"button",onClick:t,"aria-pressed":s,className:I("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?ut:"text-ink hover:bg-row-hover"),...n,children:a}),Me=Object.keys(nt),wt=s=>[...s].sort((t,a)=>{const n=Me.indexOf(t),r=Me.indexOf(a);return n!==-1&&r!==-1?n-r:n!==-1?-1:r!==-1?1:t.localeCompare(a)}),kt=({selectedCategory:s,onSelectCategory:t,categories:a})=>{const n=wt(s&&!a.includes(s)?[...a,s]:a);return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto",children:[e.jsx("h2",{className:"mb-2 px-3 font-medium text-ink-dim text-meta",children:"Categories"}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs($e,{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(dt,{size:16,"aria-hidden":"true"})}),"All categories"]}),n.map(r=>{const o=Ke(r),d=r==="other"?e.jsx(Nt,{size:16}):o.icon;return e.jsxs($e,{selected:s===r,onClick:()=>t(r),"data-testid":`category-${r}`,children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:d}),o.label]},r)})]})]})},Je=({page:s,count:t,onChange:a})=>{const n=l.useRef(null),r=l.useRef(null),o=l.useRef(null);return l.useEffect(()=>{const d=o.current;o.current=null,d==="previous"&&n.current?.focus(),d==="next"&&r.current?.focus()},[s]),t<=1?null:e.jsxs("nav",{"aria-label":"Agent pages",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(y,{variant:"secondary",size:"sm",ref:n,onClick:()=>{s-1<=1&&(o.current="next"),a(s-1)},disabled:s<=1,"aria-label":"Previous page",children:[e.jsx(Ss,{"aria-hidden":"true"}),"Previous"]}),e.jsxs(y,{variant:"secondary",size:"sm",ref:r,onClick:()=>{s+1>=t&&(o.current="previous"),a(s+1)},disabled:s>=t,"aria-label":"Next page",children:["Next",e.jsx(Ds,{"aria-hidden":"true"})]})]})]})},es={all:["org-teams"],list:s=>[...es.all,"list",s]},ss=({tenantId:s,enabled:t=!0})=>{const a=be({queryKey:es.list(s??""),queryFn:async()=>(await Qs(s)).result??{teams:[]},enabled:t&&!!s,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1,retry:Cs});return{...a,teams:a.data?.teams??[]}},Tt=(s,t)=>{const a=s?.name?.trim()||t?.trim()||"Team",n=s?.renamed_from?.trim()||null;return s?.invalid_name===!0&&n?{level:"warning",message:`Pulled "${a}". The published name "${n}" is not usable locally, so the team was stored as "${a}".`}:n?{level:"success",message:`Pulled "${a}" (you already have a team called "${n}").`}:{level:"success",message:`Pulled team "${a}".`}},ts=()=>{const s=Ps();return Rs({mutationFn:async({teamId:t,tenantId:a})=>{if(!te.baseUrl)throw new Error("Local Operator API URL is not configured.");return Os.pullOrgTeamFromRadient(te.baseUrl,t,a)},onSuccess:(t,a)=>{const n=Tt(t.result,a.name);n.level==="warning"?_s(n.message):As(n.message),s.invalidateQueries({queryKey:["desktop","teams"]})},onError:t=>{console.error("Pulling an organization team failed:",t)}})},St=/^v/i,as=s=>s.members.reduce((t,a)=>t+a.count,0),Ct=s=>s.count>1?`${s.role} ×${s.count}`:s.role,ge=s=>s.members.map(Ct).join(", "),ns=s=>{const t=(s.version??"").trim().replace(St,"").trim();return t===""?null:t},is=s=>{const t=s.account_metadata?.name?.trim();return t||null},Pt=s=>{const t=(s.description??"").trim();return t===""?null:t},fe=240,Rt=fe/2,_t=(s,t)=>{if(t||s.length<=fe)return s;const a=s.slice(0,fe),n=a.lastIndexOf(" ");return`${(n>=Rt?a.slice(0,n):a).trimEnd()}…`},ne=s=>ft(s,"d MMM yyyy"),ie=s=>{if(!s)return null;const t=new Date(s);return Number.isNaN(t.getTime())?null:t},ze=(s,t,a)=>{const n=a-t.getTime();let r;return n<0?r=ne(t):n<6e4?r="just now":r=`${it(t,new Date(a))} ago`,{label:s,when:r,iso:t.toISOString(),exact:ne(t)}},At=(s,t=Date.now())=>{const a=ie(s.updated_at);if(a)return ze("updated",a,t);const n=ie(s.created_date);return n?ze("created",n,t):null},Ot=s=>{const t=ie(s.created_date),a=ie(s.updated_at);return{created:t?ne(t):null,updated:a?ne(a):null}},Et=s=>s==="role"?"Role":s==="specialist"?"Specialist":s,It=["refresh-hub","retry","sign-in"],Ft=({tenantId:s,orgName:t})=>{const{teams:a,isLoading:n,isFetching:r,isError:o,error:d,refetch:C}=ss({tenantId:s}),N=Xe(d),x=ts(),[k,v]=l.useState(null),[p,g]=l.useState(null),w=l.useRef(new Map),u=l.useRef(null);l.useEffect(()=>{x.isPending||u.current===null||(w.current.get(u.current)?.focus(),u.current=null)},[x.isPending]);const[O,_]=l.useState(!1),[P,T]=l.useState(()=>new Set),j=(c,m)=>T(A=>{const b=new Set(A);return m?b.add(c):b.delete(c),b}),F=(c,m)=>{c.key!=="Escape"||!P.has(m)||(c.target instanceof Element?c.target:null)?.closest('[data-testid="org-team-pull-error"]')||(j(m,!1),c.currentTarget.querySelector("button[aria-expanded]")?.focus(),c.preventDefault())},L=l.useMemo(()=>{if(!Ue(x.error))return null;const c=a.find(m=>m.id===k);return Ye({code:x.error.code,message:x.error.message,details:x.error.details},{name:c?.name??"this team",hubAgentId:null,surface:"pull"})},[x.error,k,a]),$=(c,m)=>{switch(c){case"refresh-hub":C();break;case"retry":M(m);break;case"sign-in":_(!0);break}},M=c=>{x.isPending||(u.current=c.id,v(null),g(c.id),x.mutate({teamId:c.id,tenantId:s,name:c.name},{onSettled:()=>g(null),onError:()=>v(c.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:[n&&e.jsxs("div",{"aria-hidden":"true",className:"flex flex-col divide-y divide-hairline","data-testid":"org-teams-loading",children:[e.jsx(he,{}),e.jsx(he,{}),e.jsx(he,{})]}),!n&&o&&e.jsxs(K,{variant:N?"warning":"danger",className:"m-4 w-auto","data-testid":"org-teams-error",children:[e.jsx(Z,{children:N==="plan"?"That organization needs an active Team plan":N==="no_access"?"You do not have access to that organization":"Teams could not be loaded"}),e.jsx(X,{children:N==="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.`:N==="no_access"?`You are not a member of ${t??"that organization"}, so its teams are not listed here. An owner can invite you again.`:je("The teams shared with this organization could not be read.",d)}),N!=="no_access"&&e.jsx("div",{className:"mt-2",children:e.jsx(y,{variant:"primary",size:"sm",onClick:()=>void C(),disabled:r,"aria-busy":r,children:r?"Trying…":"Try again"})})]}),!n&&!o&&a.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.`}),!n&&!o&&a.length>0&&e.jsx("ul",{className:"flex flex-col divide-y divide-hairline",children:a.map(c=>e.jsxs("li",{className:I(rs,"transition-colors duration-fast ease-out-quart hover:bg-elevated first:rounded-t-md last:rounded-b-md"),onKeyDown:m=>F(m,c.id),children:[e.jsx(Ve,{className:"min-w-0",open:P.has(c.id),onOpenChange:m=>j(c.id,m),summaryAlign:"firstLine",triggerClassName:"min-w-0",chevronClassName:"text-ink-dim mt-1",rowClassName:"py-0",summary:e.jsx(Mt,{team:c,expanded:P.has(c.id)}),trailing:e.jsx("div",{className:"-mt-1 ml-3 shrink-0 self-start",children:e.jsx(y,{ref:m=>{m?w.current.set(c.id,m):w.current.delete(c.id)},variant:"secondary",size:"sm",onClick:()=>M(c),disabled:x.isPending,"aria-label":`Pull team ${H(c.name)}`,children:p===c.id?"Pulling…":"Pull"})}),children:e.jsx(zt,{team:c})}),k===c.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:L?.body??x.error?.message??`"${H(c.name)}" could not be pulled.`}),L?.actions.filter(m=>It.includes(m)).map(m=>e.jsx(y,{variant:"primary",size:"sm",onClick:()=>$(m,c),children:We[m]},m)),O&&e.jsx("div",{className:"mt-1","data-testid":"org-team-pull-reauth",children:e.jsx(Ze,{titleText:"Sign in again",descriptionText:"",onSignInSuccess:()=>{_(!1),v(null),C()}})})]})]},c.id))})]})},rs="px-4 py-3",ls=()=>e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),e.jsx("span",{className:"sr-only",children:", "})]}),Lt=({team:s})=>{const t=s.manager?.trim(),a=as(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(ls,{}):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:[a," ",a===1?"member":"members",":"]})," ",e.jsx("span",{className:"text-ink-muted",children:ge(s)})]})]})},$t=({team:s})=>{const t=s.project?.trim(),a=is(s),n=At(s),r=[];return t&&r.push({key:"project",node:t}),a&&r.push({key:"author",node:a}),n&&r.push({key:"recency",node:e.jsxs(e.Fragment,{children:[n.label," ",e.jsx(G,{content:n.exact,children:e.jsx("time",{dateTime:n.iso,children:n.when})})]})}),r.length===0?null:e.jsx("span",{className:"block truncate text-ink-dim text-meta",children:r.map((o,d)=>e.jsxs("span",{children:[d>0?e.jsx(ls,{}):null,o.node]},o.key))})},Mt=({team:s,expanded:t})=>{const a=Pt(s),n=ns(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:H(s.name)}),n?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",n]}):null]}),a?e.jsxs(e.Fragment,{children:[e.jsx("span",{...ae,"aria-hidden":"true",className:I("mt-1 select-text break-words text-body-sm text-ink-muted",t?"line-clamp-[12] whitespace-pre-line":"line-clamp-2"),children:a}),e.jsx("span",{className:"sr-only",children:_t(a,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(Lt,{team:s}),e.jsx($t,{team:s})]})]})},zt=({team:s})=>{const t=s.manager?.trim(),a=Ot(s),n=[a.created?`Created ${a.created}`:null,a.updated?`Updated ${a.updated}`:null].filter(o=>o!==null),r=!!t||s.members.length>0;return e.jsxs("div",{className:"mt-1 flex flex-col gap-2",children:[r||n.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:Et(o.kind)}),o.count>1?e.jsxs("span",{className:"text-ink-dim text-meta tabular-nums",children:["×",o.count]}):null]},`${o.kind}:${o.role}`)),r?null:e.jsx("li",{className:"text-ink-dim text-meta",children:"No members"})]})]}):null,n.length>0?e.jsx("p",{className:"text-ink-dim text-meta",children:n.join(" · ")}):null]})},he=()=>e.jsxs("div",{className:I(rs,"pl-9"),"data-testid":"org-team-skeleton-row",children:[e.jsx("div",{className:"flex h-[1lh] items-center text-body",children:e.jsx(f,{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(f,{className:"h-3.5 w-full"}),e.jsx(f,{className:"h-3.5 w-2/3"})]}),e.jsx("div",{className:"mt-1 flex h-[1lh] items-center text-meta",children:e.jsx(f,{className:"h-3 w-64"})}),e.jsx("div",{className:"flex h-[1lh] items-center text-meta",children:e.jsx(f,{className:"h-3 w-48"})})]}),cs=12,re={all:["public-teams"],list:(s,t)=>[...re.all,"list",{page:s,perPage:t}],detail:s=>[...re.all,"detail",s]},os=(s,t)=>t instanceof Ge?t.status===null?!1:t.status>=500&&s<1:s<1,Dt=({page:s=1,perPage:t=cs,enabled:a=!0}={})=>{const n=be({queryKey:re.list(s,t),queryFn:()=>Ys(te.radientBaseUrl,s,t),select:r=>r.result,enabled:a,retry:os,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,placeholderData:r=>r});return{...n,teams:n.data?.records??[],isRefreshing:n.isFetching&&n.data!==void 0,pagination:n.data?{page:n.data.page,perPage:n.data.per_page,totalPages:n.data.total_pages,totalRecords:n.data.total_records}:void 0}},Bt=({teamId:s,enabled:t=!0})=>{const a=be({queryKey:re.detail(s??""),queryFn:()=>Ws(te.radientBaseUrl,s),select:n=>n.result,enabled:t&&!!s,retry:os,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1});return{...a,team:a.data}},ds=(s,t)=>t instanceof Ge?t.message:je(s,t),qt=["refresh-hub","retry","sign-in"],Ut=({signedIn:s,onOpenSettings:t})=>{const[a,n]=l.useState(1),[r,o]=l.useState(""),{teams:d,isLoading:C,isFetching:N,isError:x,error:k,refetch:v,pagination:p}=Dt({page:a,perPage:cs}),g=ts(),[w,u]=l.useState(null),[O,_]=l.useState(null),P=l.useRef(new Map),T=l.useRef(null);l.useEffect(()=>{g.isPending||T.current===null||(P.current.get(T.current)?.focus(),T.current=null)},[g.isPending]);const j=rt(r.trim()),F=l.useMemo(()=>j?d.filter(h=>H(h.name).toLowerCase().includes(j)||(h.description??"").toLowerCase().includes(j)):d,[d,j]),L=h=>{g.isPending||(u(null),_(h.id),T.current=h.id,g.mutate({teamId:h.id,name:h.name},{onSettled:()=>_(null),onError:()=>u(h.id)}))},$=l.useMemo(()=>{if(!Ue(g.error))return null;const h=d.find(R=>R.id===w);return Ye({code:g.error.code,message:g.error.message,details:g.error.details},{name:h?.name??"this team",hubAgentId:null,surface:"pull"})},[g.error,w,d]),M=$?.body??(Es(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."),[c,m]=l.useState(!1),A=(h,R)=>{switch(h){case"refresh-hub":v();break;case"retry":L(R);break;case"sign-in":m(!0);break}},b=C&&d.length===0,S=p?.totalRecords??d.length,Q=l.useRef(null),B=h=>{const R=r!=="";o(h),R&&h===""&&Q.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(y,{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:I("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(Is,{"aria-hidden":"true",className:"ml-2 shrink-0 text-ink-dim"}),e.jsx(Qe,{ref:Q,type:"search",value:r,onChange:h=>B(h.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"})]})}),b&&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(xe,{}),e.jsx(xe,{}),e.jsx(xe,{})]}),!b&&x&&e.jsxs(K,{variant:"danger",className:"w-auto max-w-2xl","data-testid":"agent-hub-public-teams-error",children:[e.jsx(Z,{children:"Public teams could not be loaded"}),e.jsx(X,{children:ds("The public team catalogue could not be read.",k)}),e.jsx("div",{className:"mt-2",children:e.jsx(y,{variant:"primary",size:"sm",onClick:()=>void v(),disabled:N,"aria-busy":N,children:N?"Trying…":"Try again"})})]}),!b&&!x&&d.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."}),!b&&!x&&d.length>0&&e.jsxs(e.Fragment,{children:[!j||F.length>0?e.jsxs("p",{className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-public-teams-status",children:[j?`${F.length} of ${d.length} teams on this page match "${r.trim()}"`:`${S} ${S===1?"team":"teams"} in the public hub`,j?e.jsxs("span",{className:"text-ink-dim",children:[" ","· search covers the teams loaded here"]}):null]}):null,F.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 "${r.trim()}".`}):e.jsx("ul",{className:"flex max-w-4xl flex-col gap-3",children:F.map(h=>e.jsx(Vt,{team:h,pulling:O===h.id,pullPending:g.isPending,onPull:L,pullButtonRef:R=>{R?P.current.set(h.id,R):P.current.delete(h.id)},failed:w===h.id,failureBody:M,treatment:$,onTreatmentAction:A,reauthenticating:c,onReauthenticated:()=>{m(!1),u(null),v()}},h.id))}),!j&&p&&p.totalPages>1&&e.jsx(Je,{count:p.totalPages,page:p.page,onChange:h=>{n(h),Q.current?.scrollIntoView({block:"nearest"})}})]})]})},Vt=({team:s,pulling:t,pullPending:a,onPull:n,failed:r,failureBody:o,treatment:d,onTreatmentAction:C,reauthenticating:N,onReauthenticated:x,pullButtonRef:k})=>{const[v,p]=l.useState(!1),g=Bt({teamId:v?s.id:void 0}),w=H(s.name),u=ns(s),O=is(s),_=s.manager?.trim(),P=as(s),T=(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:w}),u?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",u]}):null]}),T?e.jsx("p",{...ae,className:"mt-1 line-clamp-3 max-w-3xl select-text text-body-sm text-ink-muted",children:T}):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:[_?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:"Manager:"}),e.jsx("span",{className:"text-ink-muted",children:_})]}):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:[P," ",P===1?"member":"members",":"]}),e.jsx(G,{content:ge(s),children:e.jsx("span",{className:"truncate text-ink-muted",children:ge(s)})})]})]}),O?e.jsxs("p",{className:"mt-1 text-ink-dim text-meta",children:["Published by ",e.jsx("span",{className:"text-ink-muted",children:O})]}):null]}),e.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-2",children:[e.jsx(y,{ref:k,variant:"secondary",size:"sm",onClick:()=>n(s),disabled:a,"aria-label":`Pull team ${w}`,children:t?"Pulling…":"Pull"}),r&&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}),d?.actions.filter(j=>qt.includes(j)).map(j=>e.jsx(y,{variant:"primary",size:"sm",onClick:()=>C(j,s),children:We[j]},j)),N&&e.jsx("div",{"data-testid":"agent-hub-public-team-pull-reauth",children:e.jsx(Ze,{titleText:"Sign in again",descriptionText:"",onSignInSuccess:x})})]})]})]}),e.jsx("div",{className:"mt-2",children:e.jsx(Ve,{summary:"Brief",open:v,onOpenChange:p,className:"w-full",triggerClassName:"w-full",triggerLabel:`View the brief for ${w}`,chevronClassName:"text-ink-dim",children:e.jsx(Ht,{detail:g})})})]})},Ht=({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(f,{className:"h-[1lh] w-2/3"}),e.jsx(f,{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:ds("This team's brief could not be read.",s.error)}),e.jsx(y,{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 a=(t.instructions??"").trim(),n=(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"}),a?e.jsx("p",{...ae,className:"whitespace-pre-line select-text text-ink-muted",children:a}):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"}),n?e.jsx("p",{...ae,className:"whitespace-pre-line select-text text-ink-muted",children:n}):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(r=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:r.count>1?`${r.role} ×${r.count}`:r.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:r.kind})]},`${r.kind}:${r.role}`))]})]})]})},xe=()=>e.jsxs("div",{className:"rounded-md bg-surface p-4",children:[e.jsx(f,{className:"h-[1lh] w-1/3"}),e.jsx(f,{className:"mt-1 flex h-[3lh] w-full"}),e.jsx(f,{className:"mt-2 h-[1lh] w-2/3"})]}),Qt=(s,t)=>{const[a,n]=l.useState(s);return l.useEffect(()=>{const r=setTimeout(()=>n(s),t);return()=>clearTimeout(r)},[s,t]),a},se=[{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"}],Yt=[{value:"name",label:"Name"},{value:"description",label:"Description"}],Wt=300,W="public",De={agents:"agent-hub-view-agents",teams:"agent-hub-view-teams"},Be="agent-hub-view-panel",Gt=()=>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(f,{className:"h-5.5 w-2/3"}),e.jsx(f,{className:"h-3.5 w-full"}),e.jsx(f,{className:"h-3.5 w-full"}),e.jsx(f,{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(f,{className:"h-5.5 w-24"}),e.jsx(f,{className:"h-5.5 w-20"})]}),e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsx(f,{className:"h-5.5 w-24"})})]}),e.jsx(f,{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(f,{className:"size-4"}),e.jsx(f,{className:"h-4 w-6"}),e.jsx(f,{className:"size-4"}),e.jsx(f,{className:"h-4 w-6"}),e.jsx(f,{className:"ml-auto h-7 w-16"})]})]}),da=()=>{const s=qe(),{isAuthenticated:t}=pe(),[a,n]=l.useState(1),[r]=l.useState(12),[o,d]=l.useState(null),[C,N]=l.useState(""),[x,k]=l.useState("name"),[v,p]=l.useState(se[0].value),[g,w]=l.useState(W),[u,O]=l.useState("agents"),[_,P]=l.useState([]),T=Qt(C,Wt),j=se.find(i=>i.value===v)??se[0],F=Fs(),L=Ls(),$=$s(F.data,"radient_org"),M=t?xt($,L??null):null,{memberships:c}=Gs({enabled:gt($)}),m=l.useMemo(()=>ht(c),[c]),A=g===W||m.some(i=>i.tenant_id===g);l.useEffect(()=>{A||w(W)},[A]);const b=g===W?null:m.find(i=>i.tenant_id===g)??null,S=b?.tenant_id,Q=b?.tenant_name||null,B=o!==null||T!=="",h=ss({tenantId:S}),R=S&&h.isSuccess&&!B?h.teams.length:null,us=b?.role==="owner"||b?.role==="admin",ms=l.useMemo(()=>new Map(c.map(i=>[i.tenant_id,i.tenant_name])),[c]),{data:J,agents:hs,isLoading:xs,isFetching:z,error:q,refetch:Ne,pagination:D}=Ks({page:a,perPage:r,categories:o?[o]:void 0,name:x==="name"&&T||void 0,description:x==="description"&&T||void 0,sort:j.sort,order:j.order,tenantId:S}),Y=b?Xe(q):null,ee=hs??[],ve=z&&J!==void 0,{statuses:ye,isKnown:gs,isError:fs,isFetching:le,refetch:ps}=lt({agentIds:S?[]:ee.map(i=>i.id)}),ce=l.useRef(null),oe=l.useRef(null),[we,bs]=l.useState(0);l.useEffect(()=>{we!==0&&(ce.current??oe.current)?.focus()},[we]);const ke=l.useRef(null),de=l.useRef(!1),ue=l.useMemo(()=>[...new Set((J?.records??[]).flatMap(i=>i.categories??[]))],[J]);l.useEffect(()=>{P(i=>ue.every(V=>i.includes(V))?i:[...new Set([...i,...ue])])},[ue]);const js=()=>{d(null),N(""),n(1),bs(i=>i+1)},E=(xs||z)&&J===void 0,Te=!E&&!B&&(q!==null||ee.length===0);l.useEffect(()=>{!de.current||E||(de.current=!1,q?ke.current?.focus():(ce.current??oe.current)?.focus())},[E,q]);const Se=l.useRef(null),Ns=i=>{n(i),Se.current?.scrollIntoView({block:"nearest"})},vs=i=>{d(i),n(1)},ys=i=>{N(i),n(1)},ws=i=>{w(i),n(1)},Ce=l.useRef(new Map),ks=i=>{k(i),n(1)},Pe=D&&!B?D.totalRecords:null,me=S?`shared with ${Q??"this organization"}`:"in the public hub",Re=(i,V)=>`${i} ${V}${i===1?"":"s"} ${me}`;let U;return u==="teams"?S?h.isLoading?U="Loading teams…":R!==null?U=Re(R,"team"):U=`Teams ${me}`:U=" ":E?U="Loading agents…":D?U=Re(D.totalRecords,"agent"):U=`Agents ${me}`,e.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[e.jsx(zs,{title:"Agent hub",subtitle:"Discover and download community agents on Radient",icon:mt}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[M&&e.jsxs(K,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-unavailable",children:[e.jsx(Z,{children:"Organizations are unavailable"}),e.jsx(X,{children:M})]}),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(Bs,{value:u,onValueChange:i=>O(i),children:e.jsx(qs,{"aria-label":"Browse the hub by type",children:["agents","teams"].map(i=>e.jsxs(Us,{value:i,id:De[i],"aria-controls":u===i?Be:void 0,"data-testid":`agent-hub-view-${i}`,children:[i==="agents"?"Agents":"Teams",(i==="agents"?Pe:R)!==null&&e.jsx("span",{className:"min-w-[2ch] font-normal text-ink-dim tabular-nums",children:i==="agents"?Pe:R})]},i))})}),m.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:Ms},...m.map(i=>({value:i.tenant_id,label:i.tenant_name||"Organization",Icon:bt}))].map(({value:i,label:V,Icon:Ts})=>e.jsxs(y,{ref:_e=>{_e?Ce.current.set(i,_e):Ce.current.delete(i)},variant:"ghost",size:"sm","aria-pressed":g===i,onClick:()=>ws(i),title:V,"data-testid":`agent-hub-scope-${i===W?"public":`org-${i}`}`,className:I("max-w-48",g===i&&"bg-surface text-ink hover:bg-surface"),children:[e.jsx(Ts,{"aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:V})]},i))})]})]})]}),e.jsx(Vs,{id:Be,labelledBy:De[u],children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-row overflow-hidden",children:[u==="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-tour-tag":"agent-hub-sidebar-container",children:!Te&&e.jsx(kt,{selectedCategory:o,onSelectCategory:vs,categories:_})})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-y-auto",children:[u==="agents"&&!Te&&e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:I("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(Qe,{ref:ce,type:"search",value:C,onChange:i=>ys(i.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(Oe,{value:x,onValueChange:ks,children:[e.jsx(Ee,{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(Ie,{})}),e.jsx(Fe,{children:Yt.map(i=>e.jsx(Le,{value:i.value,children:i.label},i.value))})]})]}),e.jsxs(Oe,{value:v,onValueChange:p,children:[e.jsx(Ee,{className:"w-48","aria-label":"Sort agents","data-testid":"agent-hub-sort",children:e.jsx(Ie,{})}),e.jsx(Fe,{children:se.map(i=>e.jsx(Le,{value:i.value,children:i.label},i.value))})]})]}),e.jsxs("p",{ref:Se,"aria-live":"polite",className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-status",children:[U,u==="agents"&&ve?e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{"data-testid":"agent-hub-updating",children:"Updating…"})]}):null]}),u==="agents"&&e.jsxs(e.Fragment,{children:[t&&fs&&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(y,{variant:"ghost",size:"sm",onClick:()=>void ps(),disabled:le,"aria-busy":le,children:le?"Trying…":"Try again"})]}),E&&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},(i,V)=>e.jsx(Gt,{},V))}),E&&D===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(f,{className:"h-4 w-24"})}),e.jsx("output",{"aria-live":"polite","data-testid":"agent-hub-outage",className:I(!E&&q&&!Y?"block":"sr-only"),children:!E&&q&&!Y&&e.jsxs(K,{variant:"danger",className:"max-w-2xl","aria-busy":z,"data-testid":"agent-hub-error",children:[e.jsx(Z,{children:t?"The hub could not be loaded":"Sign in to use the hub"}),e.jsx(X,{children:t?je("The agent list could not be loaded.",q):"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(y,{ref:ke,variant:"outline",size:"sm",onClick:()=>{de.current=!0,Ne()},disabled:z,"aria-busy":z,children:z?"Trying…":"Try again"})})]})}),!E&&Y&&b&&e.jsxs(K,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-no-access",children:[e.jsx(Z,{children:Y==="plan"?"That organization needs an active Team plan":"You do not have access to that organization"}),e.jsx(X,{children:Y==="plan"?`Sharing agents inside an organization is part of the Team plan. An owner of ${b.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 ${b.tenant_name||"that organization"}, so its agents are not listed here. An owner can invite you again.`}),Y==="plan"&&e.jsx("div",{className:"mt-2",children:e.jsx(y,{variant:"primary",size:"sm",onClick:()=>void Ne(),disabled:z,"aria-busy":z,children:z?"Trying…":"Try again"})})]}),!E&&!q&&e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6","aria-busy":ve,children:ee.length===0?e.jsxs("div",{"data-testid":"agent-hub-empty",className:I("col-span-full w-full flex flex-col items-center gap-2 rounded-md bg-surface px-6 py-10 text-center",!S&&"max-w-2xl justify-self-center"),children:[e.jsx("p",{className:"text-heading text-ink",children:S?"This organization has no shared agents yet.":o?`No agents in ${Ke(o).label}.`:B?"No agents match that search.":"The hub is empty."}),e.jsx("p",{className:"max-w-md text-body-sm text-ink-muted",children:S?`Agents published into ${b?.tenant_name||"this organization"} appear here for its members.`:o?"Nothing in this category yet. Clear the filter to see the whole hub.":B?"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:B?e.jsx(y,{variant:"secondary",onClick:js,children:o?"Clear filter":"Clear search"}):S&&!us?null:e.jsx(y,{ref:oe,variant:"secondary",onClick:()=>s("/agents"),children:"Publish an agent"})})]}):ee.map(i=>e.jsx(yt,{agent:i,status:t?ye[i.id]:void 0,viewerStateKnown:t&&ct(gs,ye,i.id),orgName:i.visibility==="org"?ms.get(i.tenant_id)??null:null},i.id))}),!E&&D&&D.totalPages>1&&e.jsx(Je,{count:D.totalPages,page:D.page,onChange:Ns})]}),u==="teams"&&(b?e.jsx(Ft,{tenantId:b.tenant_id,orgName:Q}):e.jsx(Ut,{signedIn:t,onOpenSettings:()=>s("/settings")}))]})]})})]})]})};export{da as AgentHubPage};
|