local-operator-ui 0.32.6 → 0.32.8
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 +16 -5
- package/out/renderer/assets/{_basePickBy-DKoZeIiV.js → _basePickBy-BVC0XNJH.js} +1 -1
- package/out/renderer/assets/{_baseUniq-C8hJNmch.js → _baseUniq-C7eWOOYb.js} +1 -1
- package/out/renderer/assets/agent-details-page-C81oDk7f.js +6 -0
- package/out/renderer/assets/agent-hub-page-Ceo588n5.js +11 -0
- package/out/renderer/assets/{agents-page-CYWvyNdc.js → agents-page-BSVe1KCZ.js} +3 -3
- package/out/renderer/assets/{arc-uw5_lFqp.js → arc-w10GsDUf.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-AUHXHvv3.js → architectureDiagram-IEHRJDOE-BA0csVSM.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-D0H83vjo.js → blockDiagram-JOT3LUYC-ClkWAsYC.js} +1 -1
- package/out/renderer/assets/{book-open-Dm0X0_nl.js → book-open-CS6BVwFH.js} +1 -1
- package/out/renderer/assets/browser-page-BCOb-Xan.js +1 -0
- package/out/renderer/assets/{browser-webauthn-prompt-3xNEHGLY.js → browser-webauthn-prompt-RAnWFJ8g.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-DodvshAd.js → c4Diagram-VJAJSXHY-DR8-ewFo.js} +1 -1
- package/out/renderer/assets/channel-D_JNqTLY.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-OzKXPF8R.js → chunk-4BMEZGHF-BE4gI_QJ.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-Ct1BZZXg.js → chunk-A2AXSNBT-DkD0gkwL.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-BHiT1sWc.js → chunk-AEK57VVT-ri-b4iUE.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-CRINwskD.js → chunk-D6G4REZN-BJZn9wXF.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-DNgn9hCK.js → chunk-RZ5BOZE2-Cn9FORLx.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-Ccv0arOC.js → chunk-XZIHB7SX-C75N0koe.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-Dq0xtWlR.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-Dq0xtWlR.js +1 -0
- package/out/renderer/assets/clone-BAIqA4Cm.js +1 -0
- package/out/renderer/assets/{console-mirror-DnYOpy0k.js → console-mirror-Cv0xGlLz.js} +1 -1
- package/out/renderer/assets/{consoleCapture-D1k4piuO.js → consoleCapture-I28yMN4C.js} +1 -1
- package/out/renderer/assets/{conversation-input-sync-BqLOUkeH.js → conversation-input-sync-Cy3TOKHt.js} +236 -236
- package/out/renderer/assets/{dagre-OKDRZEBW-B11ZU6Xx.js → dagre-OKDRZEBW-DgukjZnt.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-DrwhyX56.js → diagram-SSKATNLV-hmy8Y0GW.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-aSPgFYi2.js → diagram-VNBRO52H-Bdf3WsYo.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-DcbaYYfZ.js → erDiagram-Q7BY3M3F-ClJE5Uv3.js} +1 -1
- package/out/renderer/assets/{error-boundary-Chq_L-1d.js → error-boundary-1lnqnGrx.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-BBzv0zFG.js → flowDiagram-4HSFHLVR-D8j0fuW3.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-DkcTCTt0.js → ganttDiagram-APWFNJXF-xMA4DSJR.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-xw2yirbt.js → gitGraphDiagram-7IBYFJ6S-WatkOZfI.js} +1 -1
- package/out/renderer/assets/{graph-qwYxgxyc.js → graph-CYjr0w97.js} +1 -1
- package/out/renderer/assets/{index-DZLsffDF.js → index-C9OPvdB2.js} +1 -1
- package/out/renderer/assets/{index-mW28AQ77.js → index-CzirllYp.js} +192 -192
- package/out/renderer/assets/{index-fF2DHaz_.js → index-DiGtZNc3.js} +1 -1
- package/out/renderer/assets/index-Dn0HxtZW.css +1 -0
- package/out/renderer/assets/{infoDiagram-PH2N3AL5-BVLs1aDF.js → infoDiagram-PH2N3AL5-49juECXY.js} +1 -1
- package/out/renderer/assets/{installer-DuK5l8cx.js → installer-umQjYqSc.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-CkU_9yhz.js → journeyDiagram-U35MCT3I-DyN23Gzy.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-CGRF8vyF.js → kanban-definition-NDS4AKOZ-BTfYyqd3.js} +1 -1
- package/out/renderer/assets/{layout-BNd7pNRu.js → layout-CtvurMjC.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-BvUyebk5.js → legacy-agents-page-BTKE6AMC.js} +8 -8
- package/out/renderer/assets/{mermaid.core-DRRrLi2O.js → mermaid.core-Dwbjsy71.js} +5 -5
- package/out/renderer/assets/{mesh-page-C-n-hCY_.js → mesh-page-DzKEA22C.js} +1 -1
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-B_4Ih6Yi.js → mindmap-definition-ALO5MXBD-gcj9m4g7.js} +1 -1
- package/out/renderer/assets/{mini-Bxoztlxm.js → mini-Bt7WhIJf.js} +1 -1
- package/out/renderer/assets/{org-surface-gate-BITMDGzG.js → org-surface-gate-vMTwl4YQ.js} +1 -1
- package/out/renderer/assets/{page-header-DuslXJJm.js → page-header-HowVGnes.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-DcV_cjIJ.js → pieDiagram-IB7DONF6-BBMl_ufz.js} +1 -1
- package/out/renderer/assets/{projects-page-msXYQijV.js → projects-page-b-9r3Yfl.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-BTsImhy5.js → quadrantDiagram-7GDLP6J5--EMCkyUb.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-DIJEDV67.js → radar-MK3ICKWK-Cj8CKv7a.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-Qt9mSrQ9.js → radient-auth-buttons-BB8dXz_W.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-7W45_C2g.js → requirementDiagram-KVF5MWMF-Bxkhh8Oa.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-DpKVKYb8.js → sankeyDiagram-QLVOVGJD-CKx76cUQ.js} +1 -1
- package/out/renderer/assets/{schedules-page-DIdYeSyE.js → schedules-page-DBTBlTTo.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-CkRQ1Qe9.js → sequenceDiagram-X6HHIX6F-CPreS1M6.js} +1 -1
- package/out/renderer/assets/{settings-page-xGedwp-j.js → settings-page-DtwcZC-0.js} +1 -1
- package/out/renderer/assets/{settings-section-BYsjs9LS.js → settings-section-5T3ALtdA.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-CiVqVK1c.js → stateDiagram-DGXRK772-ChFAfUGc.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-9spx2tcK.js +1 -0
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-68EK0vG3.js → timeline-definition-BDJGKUSR-BLBPQKIQ.js} +1 -1
- package/out/renderer/assets/{ui-preferences-store-CQBrpBXN.js → ui-preferences-store-Bgn5CwS9.js} +1 -1
- package/out/renderer/assets/use-download-agent-mutation-CeWNZ1O_.js +61 -0
- package/out/renderer/assets/use-memberships-query-Dj4a-tk9.js +1 -0
- package/out/renderer/assets/{use-session-snapshot-BltqS3B5.js → use-session-snapshot-DPp3cTXw.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-DhGts_MT.js → xychartDiagram-VJFVF3MP-Cw6KFaQM.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 -3
- package/out/renderer/assets/agent-details-page-D5re4dqw.js +0 -6
- package/out/renderer/assets/agent-hub-page-DZJY-UP0.js +0 -11
- package/out/renderer/assets/browser-page-CvA1J99h.js +0 -1
- package/out/renderer/assets/channel-DmsDKY9d.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-fVydu6FQ.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-fVydu6FQ.js +0 -1
- package/out/renderer/assets/clone-C0ZHQaU3.js +0 -1
- package/out/renderer/assets/index-CUrucNe7.css +0 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CcBEewVF.js +0 -1
- package/out/renderer/assets/use-download-agent-mutation-D0YsaAhr.js +0 -61
- package/out/renderer/assets/use-memberships-query-D908h9SA.js +0 -1
- /package/out/renderer/assets/{index-DkZDDEqx.js → index-Cq55Enpx.js} +0 -0
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import{c as l,j as F}from"./error-boundary-Chq_L-1d.js";import{t as j,c as R,n as K,b as _,g as Q,f as U,h as z,i as N,j as S,a as v}from"./en-US-BcB1DWxG.js";import{j as r,c as g,r as V}from"./index-DkZDDEqx.js";import{bI as q,bc as O,bJ as B,aM as k,aG as P,u as w,aN as b,aQ as Y,aO as D,bf as Z,a8 as C,bg as G}from"./conversation-input-sync-BqLOUkeH.js";import{au as W,av as J,aw as I}from"./index-mW28AQ77.js";import{B as X}from"./book-open-Dm0X0_nl.js";import{j as ee,k as te,m as ae,n as ne,o as se,q as oe,r as ie}from"./use-memberships-query-D908h9SA.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 re=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],ce=l("briefcase",re);/**
|
|
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 le=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],ue=l("chart-no-axes-column",le);/**
|
|
12
|
-
* @license lucide-react v0.507.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const de=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],he=l("clipboard-list",de);/**
|
|
17
|
-
* @license lucide-react v0.507.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const me=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],fe=l("earth",me);/**
|
|
22
|
-
* @license lucide-react v0.507.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const ye=[["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]],ge=l("file-question",ye);/**
|
|
27
|
-
* @license lucide-react v0.507.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const pe=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],xe=l("flask-conical",pe);/**
|
|
32
|
-
* @license lucide-react v0.507.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const ke=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],we=l("graduation-cap",ke);/**
|
|
37
|
-
* @license lucide-react v0.507.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const be=[["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"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]],Me=l("heart-pulse",be);/**
|
|
42
|
-
* @license lucide-react v0.507.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const Ae=[["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"}]],Ue=l("heart",Ae);/**
|
|
47
|
-
* @license lucide-react v0.507.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const je=[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]],_e=l("megaphone",je);/**
|
|
52
|
-
* @license lucide-react v0.507.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const ze=[["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"}]],Ne=l("scale",ze);/**
|
|
57
|
-
* @license lucide-react v0.507.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const Se=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],ve=l("shopping-cart",Se);function De(e,t){const o=+j(e)-+j(t);return o<0?-1:o>0?1:o}function Ce(e){return R(e,Date.now())}function $e(e){return t=>{const a=(e?Math[e]:Math.trunc)(t);return a===0?0:a}}function qe(e,t,o){const a=Q(),n=o?.locale??a.locale??U,s=De(e,t);if(isNaN(s))throw new RangeError("Invalid time value");const i=Object.assign({},o,{addSuffix:o?.addSuffix,comparison:s}),[h,m]=K(o?.in,...s>0?[t,e]:[e,t]),d=$e("round"),x=m.getTime()-h.getTime(),f=x/v,H=_(m)-_(h),y=(x-H)/v,T=o?.unit;let u;if(f<1?u="second":f<60?u="minute":f<z?u="hour":y<N?u="day":y<S?u="month":u="year",u==="second"){const c=d(x/1e3);return n.formatDistance("xSeconds",c,i)}else if(u==="minute"){const c=d(f);return n.formatDistance("xMinutes",c,i)}else if(u==="hour"){const c=d(f/60);return n.formatDistance("xHours",c,i)}else if(u==="day"){const c=d(y/z);return n.formatDistance("xDays",c,i)}else if(u==="month"){const c=d(y/N);return c===12&&T!=="month"?n.formatDistance("xYears",1,i):n.formatDistance("xMonths",c,i)}else{const c=d(y/S);return n.formatDistance("xYears",c,i)}}function Ve(e,t){return qe(e,Ce(e),t)}const L={investment:{icon:r.jsx(ce,{size:14,"aria-hidden":"true"}),label:"Investment"},accounting:{icon:r.jsx(X,{size:14,"aria-hidden":"true"}),label:"Accounting"},healthcare:{icon:r.jsx(Me,{size:14,"aria-hidden":"true"}),label:"Healthcare"},legal:{icon:r.jsx(Ne,{size:14,"aria-hidden":"true"}),label:"Legal"},software:{icon:r.jsx(B,{size:14,"aria-hidden":"true"}),label:"Software"},security:{icon:r.jsx(J,{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(W,{size:14,"aria-hidden":"true"}),label:"Personal assistance"},education:{icon:r.jsx(we,{size:14,"aria-hidden":"true"}),label:"Education"},marketing:{icon:r.jsx(_e,{size:14,"aria-hidden":"true"}),label:"Marketing"},sales:{icon:r.jsx(ve,{size:14,"aria-hidden":"true"}),label:"Sales"},research:{icon:r.jsx(xe,{size:14,"aria-hidden":"true"}),label:"Research"},analysis:{icon:r.jsx(ue,{size:14,"aria-hidden":"true"}),label:"Analysis"},management:{icon:r.jsx(he,{size:14,"aria-hidden":"true"}),label:"Management"},social_media:{icon:r.jsx(fe,{size:14,"aria-hidden":"true"}),label:"Social media"},other:{icon:r.jsx(ge,{size:14,"aria-hidden":"true"}),label:"Other"}};function p(e){const t=e.split("_").join(" ");return t.charAt(0).toUpperCase()+t.slice(1)}const Oe=e=>L[e]??{icon:r.jsx(q,{size:14,"aria-hidden":"true"}),label:p(e)},$="inline-flex min-h-5.5 items-center rounded-full border border-hairline bg-sunken px-2 text-meta leading-none",Be=({tags:e,categories:t,className:o})=>{if((!e||e.length===0)&&(!t||t.length===0))return null;const a=new Set((t??[]).map(s=>(L[s]?.label??p(s)).toLowerCase())),n=(e??[]).filter(s=>!a.has(p(s).toLowerCase()));return r.jsxs("div",{className:g("relative flex flex-wrap items-center gap-1.5 overflow-hidden",o),"data-testid":"agent-tags-and-categories",children:[t?.map(s=>{const i=Oe(s);return r.jsxs("span",{className:g($,"gap-1 font-medium text-ink-muted"),children:[i.icon,i.label]},s)}),n.map(s=>r.jsxs("span",{className:g($,"gap-1 font-normal text-ink-dim"),children:[r.jsx(q,{size:12,"aria-hidden":"true"}),p(s)]},s))]})},Pe=({orgName:e,className:t})=>r.jsxs(F,{variant:"neutral",className:g("gap-1",t),"data-testid":"agent-org-badge",title:e?`Shared with ${e}, not the public hub`:"Shared with an organization, not the public hub",children:[r.jsx(O,{"aria-hidden":"true"}),e??"Organization"]}),M={all:["agent-statuses"],page:e=>[...M.all,"page",[...e]]},Ie=e=>[...new Set(e)].sort(),Ye=({agentIds:e,enabled:t=!0})=>{const{isAuthenticated:o}=k(),a=e.join(","),n=V.useMemo(()=>Ie(e),[a]),s=P({queryKey:M.page(n),queryFn:async()=>(await ee(n)).result?.statuses??{},enabled:t&&o&&n.length>0,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:!1});return{...s,statuses:s.data??{},isKnown:s.isSuccess}},Ze=(e,t,o)=>o?e&&t[o]!==void 0:!1,E=(e,t,o)=>{e.setQueriesData({queryKey:M.all},a=>{if(!a)return a;const n=a[t]??{liked:!1,favourited:!1};return{...a,[t]:{...n,...o}}})},A=(e,{agentId:t,field:o,delta:a})=>{e.setQueriesData({queryKey:te.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})},Ge=()=>{const e=w(),{isAuthenticated:t}=k();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 ae(a),{favourited:!1,changed:!0}):{favourited:!0,changed:(await ne(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})}})},We=()=>{const e=w(),{isAuthenticated:t}=k();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 se(a),{liked:!1,changed:!0}):{liked:!0,changed:(await oe(a)).result?.already_liked!==!0}},onSuccess:({liked:a,changed:n},s)=>{E(e,s.agentId,{liked:a}),n&&A(e,{agentId:s.agentId,field:"like_count",delta:a?1:-1})}})},Le=(e,t)=>{const o=[];for(const[,a]of e.getQueriesData({queryKey:I}))for(const n of a?.agents??[])n.id!==t&&o.push(n.name);return o},Je=()=>{const e=w(),t=Y();return b({mutationFn:async({agentId:a})=>{if(!C.baseUrl)throw new Error("Local Operator API URL is not configured.");return G.downloadAgentFromRadient(C.baseUrl,a)},onSuccess:(a,n)=>{const s=a.result,i=s?.name?.trim()||n.agentName?.trim()||"Agent",h=s?.renamed_from?.trim()||null,m=s?.id?ie(i,Le(e,s.id)):null;h?D(`Downloaded "${i}" — you already have an agent called "${h}".`):m?Z(`Downloaded "${i}". You already have an agent called "${m}", so two agents now answer to that name and either may be picked. Rename one of them.`):D(`Downloaded "${i}" from the hub.`),e.invalidateQueries({queryKey:I}),A(e,{agentId:n.agentId,field:"download_count",delta:1});const d=a.result;d?.id?t(`/chat/${d.id}`):console.warn("Downloaded agent ID not found in response, cannot navigate to chat.")}})};export{Be as A,L as C,Ue as H,Pe as O,We as a,Ge as b,Je as c,Oe as d,qe as e,Ve as f,Ze as i,Ye as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ay as v,az as A,aA as $,aB as I,aC as h,aD as R,aE as L,aF as r,aG as _,aH as w,aI as q,aJ as N,aK as P,aL as S,aM as k}from"./conversation-input-sync-BqLOUkeH.js";const f={malware_or_exploitation:"Instructions to build or spread malware, or to attack systems you do not own, cannot be published.",credential_theft:"Instructions to obtain someone else's credentials or tokens cannot be published.",fraud_or_deception:"Instructions to deceive or defraud people cannot be published.",harassment_or_hate:"Instructions to harass, threaten or target people cannot be published.",sexual_content_minors:"This agent cannot be published. If you believe this is a mistake, contact support.",sexual_content:"Explicit sexual content cannot be published.",violence_or_weapons:"Instructions to build weapons or to injure people cannot be published.",drugs_or_controlled_substances:"Instructions to make or traffic illegal drugs cannot be published.",self_harm:"This agent cannot be published. If you believe this is a mistake, contact support.",mass_surveillance_or_privacy_abuse:"Instructions to surveil or profile people without their consent cannot be published.",evasion_or_abuse_tooling:"Instructions to evade or defeat safety and anti-abuse systems cannot be published.",prompt_injection:"This instruction set tries to instruct the reviewer rather than describe an agent, so it cannot be published.",unclear_dual_use:"We could not tell whether this is aimed at your own systems or someone else's. Add a sentence stating the scope and target, then publish again.",other_harmful:"This agent was rejected because its instructions would cause harm."},E=e=>{const n=e.trim();return n.length>12&&/\s/.test(n)&&!/^(not found|bad request|unauthorized|error|internal server error)\.?$/i.test(n)};function O(e){const n=e?.categories?.[0];return n&&L(n)?f[n]:f.other_harmful}function C(e,n){const t=n?.rule?` ${n.rule}`:"";switch(n?.field){case"name":return{body:`Name${t||" is not acceptable"}.`,field:"name"};case"instructions":return{body:t?`The instruction body${t}.`:`The instruction body must be between 1 and ${R} characters.`,field:"instructions"};case"description":return{body:`Description${t}.`,field:"description"};case"tools":return{body:`Tools${t}.`,field:"tools"};case"when_to_use":return{body:`When to use${t}.`,field:"when_to_use"};case"categories":return{body:`Categories${t}.`,field:"categories"};case"tags":return{body:`Tags${t}.`,field:"tags"};default:return{body:e,field:null}}}function X(e,n){const t=n.surface==="pull",a=t?"Nothing was pulled.":"Nothing was published.",o=t?"pull again":"publish again",i=n.name.trim()||(t?"this team":"this agent");switch(e.code){case"name_taken":return e.details?.owned_by_caller===!0?{variant:"danger",headline:"You already published this agent",body:`You published "${i}" already. Update that listing instead of publishing a second one.`,note:null,actions:e.details?.existing_agent_id||n.hubAgentId?["update-listing","focus-name"]:["focus-name"]}:{variant:"danger",headline:"That name is taken",body:`"${i}" is already published on the hub by another account. Agent names are unique across the hub.`,note:null,actions:["focus-name"]};case"name_claim_in_flight":return{variant:"warning",headline:"That name is being published right now",body:`Someone is publishing an agent called "${i}" at this moment. It is not claimed — try again in a moment.`,note:null,actions:["retry"]};case"name_reserved_builtin":{const s=e.details?.builtin_name,d=s?h(s)===h(i):!1;return{variant:"danger",headline:"That name is reserved",body:s&&!d?`"${i}" is reserved by the built-in agent "${s}". Built-in names cannot be published to the hub.`:`"${s??i}" is the name of a built-in agent. Built-in names cannot be published to the hub.`,note:null,actions:["focus-name","install-builtin"]}}case"moderation_rejected":return{variant:"danger",headline:"This agent was not accepted",body:e.details?.reason?.trim()||e.message,note:O(e.details),actions:["edit-instructions"]};case"moderation_unavailable":return{variant:"warning",headline:"Review is temporarily unavailable",body:"We could not review this agent just now. Nothing was published. Try again in a minute.",note:null,actions:["retry"]};case"invalid_instruction_set":{const{body:s,field:d}=C(e.message,e.details);return{variant:"danger",headline:"The agent document is not valid",body:s,note:null,actions:d==="name"?["focus-name"]:d==="instructions"?["edit-instructions"]:["edit-agent"]}}case"payload_too_large":{const s=e.details?.limit_bytes;return{variant:"danger",headline:"This agent is too large to publish",body:s?`The instruction set is larger than ${Math.round(s/1024)} KiB. Shorten the instructions.`:"The instruction set is larger than the hub accepts. Shorten the instructions.",note:null,actions:["edit-instructions"]}}case"not_owner":return{variant:"danger",headline:"You cannot update this listing",body:"This listing belongs to another account.",note:null,actions:["publish-as-new"]};case"agent_not_found":return{variant:"danger",headline:"That listing no longer exists",body:"It may have been delisted.",note:null,actions:["publish-as-new","refresh-hub"]};case"hub_unauthorized":return{variant:"danger",headline:"The hub refused this machine's sign-in",body:`${a} Sign in to Radient again to replace the credential the hub refused, then ${o}.`,note:null,actions:["sign-in"]};case"hub_unavailable":return{variant:"warning",headline:t?"The pull did not go through":"The publication did not go through",body:E(e.message)?e.message:`${a} Try again in a moment, or update the backend if the hub has moved.`,note:null,actions:["retry"]};case"local_failure":return{variant:"warning",headline:t?"The team could not be pulled from this machine":"The agent could not be published from this machine",body:e.message,note:null,actions:["retry"]};case"team_plan_required":return{variant:"warning",headline:"That organization needs an active Team plan",body:t?"Reading an organization's teams is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then pull again.":"Sharing agents inside an organization is part of the Team plan. Ask an owner of the organization to activate it in the Radient console, then publish again.",note:null,actions:["retry"]};case"not_a_member":return{variant:"danger",headline:"You are not a member of that organization",body:`${a} Ask an owner of the organization to invite you, then ${o}.`,note:null,actions:[]};case"insufficient_role":{const s=e.details?.required;return{variant:"danger",headline:"Your organization role does not allow this",body:s?`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} the ${s} role. Ask an owner of the organization to change your role, then ${o}.`:`${t?"Reading an organization's teams needs":"Publishing into an organization needs"} a higher role than yours. Ask an owner of the organization to change your role, then ${o}.`,note:null,actions:[]}}case"team_not_found":return{variant:"danger",headline:"That team is no longer published",body:"It may have been delisted since this page was loaded.",note:null,actions:["refresh-hub"]};default:return{variant:"danger",headline:"The agent could not be published",body:e.message,note:null,actions:["retry"]}}}const z=[/^(?:Download agent from Radient failed: )?(?:Error downloading agent from Radient: )?\s*/,/^Failed to download agent(?: [^\s]+)? from Radient Agent Hub(?: due to a requests error)?:\s*/,/^[A-Za-z_][\w.]*\([^)]*\):\s*/],U=/^(\d{3})\b/,F=new Set([404,410]),j=["read timed out","connection timed out","connection refused","connection aborted","connection reset","connectionerror","connecttimeout","remote end closed connection","max retries exceeded","temporary failure in name resolution","name or service not known","no route to host"],B=e=>{const n=e.toLowerCase();return j.some(t=>n.includes(t))||I(e)},D=(e,n)=>{const t=n.trim()?`"${n.trim()}"`:"That agent";if(A(e))switch(e.code){case"agent_not_found":return`${t} is no longer on the hub, so nothing was downloaded.`;case"hub_unavailable":return`The hub did not complete the download, so ${t} was not downloaded.`;default:return`${t} was not downloaded: ${e.message}`}const a=z.reduce((i,s)=>i.replace(s,""),$(e,"").trim()).trim();if(!a)return`${t} could not be downloaded.`;const o=Number(U.exec(a)?.[1]??Number.NaN);return F.has(o)?`${t} is no longer on the hub, so nothing was downloaded.`:B(a)||o===408?`The hub could not be reached, so ${t} was not downloaded.`:o===429?`The hub is busy, so ${t} was not downloaded. Try again in a moment.`:o===401||o===403?`The hub refused this machine's sign-in, so ${t} was not downloaded.`:o>=500?`The hub could not complete the download, so ${t} was not downloaded. Try again in a moment.`:o>=400?`The hub refused the download, so ${t} is not here.`:`${t} was not downloaded: ${a}`},x="The action did not complete.",Z=(e,n,t)=>e==="download"?D(n,t):v(x,n),V={"focus-name":"Choose another name","update-listing":"Update the existing listing","install-builtin":"Install the built-in instead",retry:"Try again","edit-instructions":"Edit the instructions","edit-agent":"Edit the agent","publish-as-new":"Publish as a new listing","sign-in":"Sign in again","refresh-hub":"Refresh the hub"};function c(){return crypto.randomUUID()}async function K(e=1,n=20,t){const a={page:e,per_page:n};if(t)for(const[o,i]of Object.entries(t))i&&(a[o]=i);return r({operation:"agents.list",query:a})}async function ee(e){return r({operation:"agents.get",agentId:e})}async function ne(e){return r({operation:"agents.delete",agentId:e,requestId:c(),confirmed:!0})}async function te(e){return r({operation:"agents.like",agentId:e,requestId:c()})}async function ae(e){return r({operation:"agents.unlike",agentId:e,requestId:c(),confirmed:!0})}async function oe(e){return r({operation:"agents.favourite",agentId:e,requestId:c()})}async function se(e){return r({operation:"agents.unfavourite",agentId:e,requestId:c(),confirmed:!0})}async function ie(e,n){return r({operation:"comments.create",agentId:e,payload:n,requestId:c()})}async function re(e,n=1,t=20){return r({operation:"comments.list",agentId:e,query:{page:n,per_page:t}})}async function ue(e,n,t){return r({operation:"comments.update",agentId:e,commentId:n,payload:t,requestId:c()})}async function le(e,n){return r({operation:"comments.delete",agentId:e,commentId:n,requestId:c(),confirmed:!0})}async function ce(e){return r({operation:"agents.statuses",query:{agent_ids:e.join(",")}})}async function M(){return r({operation:"memberships.list"})}async function Q(e,n=1,t=20,a){const o={page:n,per_page:t};if(a)for(const[i,s]of Object.entries(a))s&&(o[i]=s);return r({operation:"org_agents.list",tenantId:e,query:o})}async function de(e){return r({operation:"org_teams.list",tenantId:e})}const W="download_count",b={all:["public-agents"],list:e=>[...b.all,"list",{page:e.page,perPage:e.perPage,categories:e.categories?.join(",")??void 0,name:e.name??void 0,description:e.description??void 0,sort:e.sort,order:e.order}]},m={all:["org-agents"],list:(e,n)=>[...m.all,"list",e,{page:n.page,perPage:n.perPage,categories:n.categories?.join(",")??void 0,name:n.name??void 0,description:n.description??void 0,sort:n.sort,order:n.order}]},Y=e=>e&&e[0]===m.all[0]?String(e[2]??""):null,he=e=>e.invalidateQueries({queryKey:b.all}),ge=(e,n)=>e.invalidateQueries({queryKey:n?[...m.all,"list",n]:m.all}),me=({page:e=1,perPage:n=20,enabled:t=!0,categories:a,name:o,description:i,sort:s=W,order:d="desc",tenantId:g}={})=>{const p={page:e,perPage:n,categories:a,name:o,description:i,sort:s,order:d},T=g?m.list(g,p):b.list(p),l=_({queryKey:T,queryFn:async()=>{const u={};return a&&a.length>0&&(u.categories=a.join(",")),o&&(u.name=o),i&&(u.description=i),u.sort=s,u.order=d,g?await Q(g,e,n,u):await K(e,n,u)},select:u=>u.result,enabled:t,retry:w,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,placeholderData:(u,y)=>Y(y?.queryKey)===(g??null)?u:void 0});return{...l,agents:l.data?.records,isRefreshing:l.isFetching&&l.data!==void 0,pagination:l.data?{page:l.data.page,perPage:l.data.per_page,totalPages:l.data.total_pages,totalRecords:l.data.total_records}:void 0}},H={name:"Name",description:"Description",instructions:"The instruction body",tools:"Tools"};function be(e){const n=[],t=(a,o)=>{o&&n.push({field:a,message:`${H[a]} ${o}.`})};return t("name",q(e.name)),t("description",N(e.description)),e.instructions!==null&&t("instructions",P(e.instructions)),t("tools",S(e.tools??[])),n}function pe(e,n){const t=h(e);return n.some(a=>h(a)===t)}function ye(e){for(const n of e??[]){const t=n.indexOf(":");if(t<0||n.slice(0,t).trim().toLowerCase()!=="tools")continue;const a=n.slice(t+1).split(",").map(o=>o.trim()).filter(Boolean);return a.length>0?a:null}return null}function fe(e,n){const t=h(e);return n.find(a=>h(a)===t)??null}const G={all:["memberships"]},_e=({enabled:e=!0}={})=>{const{isAuthenticated:n}=k(),t=_({queryKey:G.all,queryFn:async()=>(await M()).result??{memberships:[]},enabled:e&&n,staleTime:5*60*1e3,gcTime:10*60*1e3,refetchOnWindowFocus:!1,retry:w});return{...t,memberships:t.data?.memberships??[]}};export{V as P,ne as a,_e as b,ie as c,le as d,Z as e,de as f,ee as g,me as h,he as i,ce as j,b as k,re as l,se as m,oe as n,ae as o,X as p,te as q,fe as r,ge as s,pe as t,ue as u,be as v,ye as w};
|
|
File without changes
|