@lacneu/atrium 0.10.13 → 0.10.14
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/dist/assets/{AccessTab-CEi2jEXZ.js → AccessTab-CFUhNbEQ.js} +1 -1
- package/dist/assets/{AdvancedFilter-EPxqO-eA.js → AdvancedFilter-sOa21WZa.js} +1 -1
- package/dist/assets/AgentFilesTab-0CEL_189.js +3 -0
- package/dist/assets/AnomaliesTab-Bzis3k_A.js +1 -0
- package/dist/assets/AuditTab-bAmqwkT3.js +1 -0
- package/dist/assets/BridgeTab-Bq__DahB.js +1 -0
- package/dist/assets/{ChatDefaultsTab-lJmDn_58.js → ChatDefaultsTab-BfEiY-pO.js} +1 -1
- package/dist/assets/{DataTableShell-BpD7pA0i.js → DataTableShell-CNAywBhk.js} +1 -1
- package/dist/assets/{DetailChips-BA1mq7Wm.js → DetailChips-Br7hAIc4.js} +1 -1
- package/dist/assets/FeedbacksTab-DC-_G2Aa.js +1 -0
- package/dist/assets/{FieldLabel-CFckKZrw.js → FieldLabel-BK4gahoq.js} +1 -1
- package/dist/assets/FilesTab-D8QEtgO1.js +1 -0
- package/dist/assets/{FilterBar-DB-b7WAm.js → FilterBar-B8N9UkBx.js} +1 -1
- package/dist/assets/GroupsTab-CvKN_t9R.js +1 -0
- package/dist/assets/InstancesTab-BYOcZJOW.js +1 -0
- package/dist/assets/IntegrationsTab-DVa_wHID.js +1 -0
- package/dist/assets/{KpiTab-CYRAZPuB.js → KpiTab-BWSStR84.js} +1 -1
- package/dist/assets/PreferencesTab-DwOv7U1l.js +1 -0
- package/dist/assets/PromptInjectionsTab-DtFY9ld_.js +2 -0
- package/dist/assets/RolesTab-CMDYfCow.js +1 -0
- package/dist/assets/ServiceAccountsTab-bj548I6S.js +1 -0
- package/dist/assets/ThemeShowroom-CkYoRvZ1.js +1 -0
- package/dist/assets/{TimeRangePicker--wX3a-5x.js → TimeRangePicker-DWrq_FCQ.js} +1 -1
- package/dist/assets/TracesTab-D1EhbufN.js +1 -0
- package/dist/assets/UsersTab-CK5drBqa.js +1 -0
- package/dist/assets/{button-x4eiKyNo.js → button-BrnfkSI9.js} +1 -1
- package/dist/assets/{card-BpwyvJ1X.js → card-wW3kyHUE.js} +1 -1
- package/dist/assets/chevrons-up-down-BHsIRLCo.js +1 -0
- package/dist/assets/{compatView-D1fAiei9.js → compatView-DluwniOa.js} +1 -1
- package/dist/assets/{dispatchErrorInfo-CIQ2MRwS.js → dispatchErrorInfo-BDRjZfle.js} +1 -1
- package/dist/assets/{dist-uStCogeE.js → dist-6eZ6dWkC.js} +1 -1
- package/dist/assets/dist-CZX9zbI2.js +44 -0
- package/dist/assets/{dist-VD7Y9bPB.js → dist-H66mmoJ1.js} +1 -1
- package/dist/assets/{dist-BiCy_qcc.js → dist-dHvFJWR_.js} +1 -1
- package/dist/assets/{highlighted-body-OFNGDK62-CdPsDE0f.js → highlighted-body-OFNGDK62-DH82tOP5.js} +1 -1
- package/dist/assets/index-BTsyEV0K.css +2 -0
- package/dist/assets/index-f6pazIt8.js +220 -0
- package/dist/assets/mermaid-GHXKKRXX-DQhmj5Mi.js +1 -0
- package/dist/assets/roleDescriptions-CYTQtU6M.js +1 -0
- package/dist/assets/{table-BQp_EgUj.js → table-COCoVKnB.js} +1 -1
- package/dist/assets/x-CAiUAKpk.js +1 -0
- package/dist/index.html +8 -8
- package/package.json +1 -1
- package/dist/assets/AgentFilesTab-lYSv6XmB.js +0 -3
- package/dist/assets/AnomaliesTab-BOKqiWd2.js +0 -1
- package/dist/assets/AuditTab-DnBhTYMJ.js +0 -1
- package/dist/assets/BridgeTab-BiMrYTrr.js +0 -1
- package/dist/assets/FeedbacksTab-Dt92LCDU.js +0 -1
- package/dist/assets/FilesTab-CABwvKIR.js +0 -1
- package/dist/assets/GroupsTab-01UtVbu_.js +0 -1
- package/dist/assets/InstancesTab-CRA7-G_l.js +0 -1
- package/dist/assets/IntegrationsTab-Dtf3L_gX.js +0 -1
- package/dist/assets/PreferencesTab-CjVBIxqe.js +0 -1
- package/dist/assets/PromptInjectionsTab-O-RMzIb1.js +0 -2
- package/dist/assets/RolesTab-68zkT6ks.js +0 -1
- package/dist/assets/ServiceAccountsTab-CvguS5Iy.js +0 -1
- package/dist/assets/ThemeShowroom-DhKQpNPj.js +0 -1
- package/dist/assets/TracesTab-DO0c_Ypn.js +0 -1
- package/dist/assets/UsersTab-BMM1oQPU.js +0 -1
- package/dist/assets/chevrons-up-down-Dn5VCqqo.js +0 -1
- package/dist/assets/dist-BhemspoL.js +0 -44
- package/dist/assets/index-BlZ8oKFa.js +0 -220
- package/dist/assets/index-D2yjtZhd.css +0 -2
- package/dist/assets/mermaid-GHXKKRXX-DgFC5iC-.js +0 -1
- package/dist/assets/roleDescriptions-DJHA0ezr.js +0 -1
- package/dist/assets/x-C9JKw9Pc.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$C as r,$g as i,Al as a,Bg as o,Bl as s,Cl as c,Dl as l,El as u,Fl as d,Gg as f,Gl as ee,Hg as p,Hl as te,Il as ne,Jg as m,Jl as re,Kg as h,Kl as ie,Ll as ae,Ml as oe,Nl as se,Ol as ce,Pl as le,Qg as g,Rl as ue,Sl as de,Tl as fe,Ug as _,Ul as pe,Vg as v,Vl as me,Wg as y,Wl as he,Xg as b,Xl as ge,Yg as x,Yl as _e,Zg as S,_l as ve,aw as C,bl as ye,e_ as w,fl as T,gl as be,hl as xe,jl as Se,kl as Ce,ml as E,ow as D,pl as O,qg as k,ql as we,t_ as A,vl as Te,wl as Ee,xl as De,yl as Oe,zl as ke}from"./dist-CZX9zbI2.js";import{n as Ae}from"./TimeRangePicker-DWrq_FCQ.js";import{t as je}from"./x-CAiUAKpk.js";import{t as j}from"./button-BrnfkSI9.js";import{C as M,Dt as Me,F as N,L as P,N as F,Ot as Ne,P as I,R as L,S as R,a as Pe,at as z,b as B,i as Fe,m as V,o as Ie,r as Le,x as H,y as U}from"./index-f6pazIt8.js";import{t as Re}from"./FilterBar-B8N9UkBx.js";import{t as ze}from"./AdvancedFilter-sOa21WZa.js";import{t as Be}from"./DataTableShell-CNAywBhk.js";var W=t(e(),1),G=n(),K=e=>e===null?`—`:String(Math.round(e));function Ve(){let e=D(r.me.getMe,{host:z})?.role===`admin`,t=D(r.deliveryTiming.getDeliveryStatus,{}),n=C(r.deliveryTiming.startDeliveryRecord),a=C(r.deliveryTiming.stopDeliveryRecord),[o,s]=(0,W.useState)(!1),c=D(r.deliveryTiming.getDeliveryReport,o?{}:`skip`),[l,u]=(0,W.useState)(!1),d=t?.recording??!1,f=async()=>{u(!0);try{d?await a({}):await n({})}finally{u(!1)}};return(0,G.jsxs)(`section`,{className:`mb-4 flex flex-col gap-3 rounded-lg border border-border p-4`,children:[(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h3`,{className:`text-sm font-semibold`,children:A()}),(0,G.jsx)(`p`,{className:`oc-admin__hint`,children:w()})]}),e?(0,G.jsx)(j,{variant:d?`destructive`:`default`,size:`sm`,disabled:l||t===void 0,onClick:()=>void f(),children:d?g():i()}):null]}),d?(0,G.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,G.jsx)(V,{variant:`secondary`,children:S()}),t?.startedAt?(0,G.jsx)(`span`,{className:`text-muted-foreground`,children:b({time:new Date(t.startedAt).toLocaleTimeString(`fr-FR`)})}):null]}):null,(0,G.jsx)(`div`,{children:(0,G.jsx)(j,{variant:`outline`,size:`sm`,onClick:()=>s(e=>!e),children:o?m():x()})}),o?(0,G.jsx)(q,{report:c}):null]})}function q({report:e}){if(!e)return null;if(e.count===0||e.segments===null)return(0,G.jsx)(`p`,{className:`oc-admin__hint`,children:k()});let t=e.segments,n=(e,t)=>(0,G.jsxs)(`tr`,{className:`border-t border-border`,children:[(0,G.jsx)(`td`,{className:`py-1`,children:e}),(0,G.jsx)(`td`,{className:`py-1 text-right tabular-nums`,children:t.count}),(0,G.jsxs)(`td`,{className:`py-1 text-right tabular-nums`,children:[K(t.p50),` / `,K(t.p95),` / `,K(t.max)]})]});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,G.jsx)(`th`,{className:`py-1 font-medium`,children:h()}),(0,G.jsx)(`th`,{className:`py-1 text-right font-medium`,children:f()}),(0,G.jsx)(`th`,{className:`py-1 text-right font-medium`,children:y()})]})}),(0,G.jsxs)(`tbody`,{children:[n(_(),t.A),n(p(),t.B),n(v(),t.C)]})]}),(0,G.jsx)(`p`,{className:`oc-admin__hint`,children:o()})]})}var He=[50,100,200,500],J=`all`,Y=`__all__`,Ue=[`2xx`,`4xx`,`5xx`],We=[`user`,`service`,`system`],Ge=[`inbound`,`outbound`,`internal`],Ke={kind:`relative`,from:`now-30d`,to:`now`},qe=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:`latence (ms)`},{value:`principalType`,label:`principal`},{value:`direction`,label:`direction`},{value:`roleKey`,label:`rôle`},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function X(){let e=Ne({from:`/settings/traces`}),t=Me({from:`/settings/traces`}),n=e.limit,i=e.kind,o=e.statusClass??Y,f=e.principalType??Y,p=e.direction??Y,m=e.roleKey??Y,h=e.q??``,g=Le(e.from,e.to),_=(0,W.useMemo)(()=>Ie(e.adv),[e.adv]),{from:v,to:y}=Ae(g),[b,x]=(0,W.useState)(null),[S,C]=(0,W.useState)(null),w=e=>void t({search:t=>({...t,limit:e})}),T=e=>void t({search:t=>({...t,kind:e})}),E=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),O=e=>void t({search:t=>({...t,statusClass:e===Y?void 0:e})}),k=e=>void t({search:t=>({...t,principalType:e===Y?void 0:e})}),A=e=>void t({search:t=>({...t,direction:e===Y?void 0:e})}),N=e=>void t({search:t=>({...t,roleKey:e===Y?void 0:e})}),P=e=>void t({search:t=>({...t,...Pe(e)})}),F=e=>void t({search:t=>({...t,adv:Fe(e)}),replace:!0}),I=D(r.observability.listEvents,{limit:n}),L=D(r.observability.listEvents,{limit:n,kind:i===J?void 0:i,filter:{q:h||void 0,from:v,to:y,statusClass:o===Y?void 0:o,principalType:f===Y?void 0:f,direction:p===Y?void 0:p,roleKey:m===Y?void 0:m,advanced:_.length>0?_:void 0}}),z=(0,W.useMemo)(()=>{let e=new Set;for(let t of I??[])e.add(t.kind);return[...e].sort()},[I]),K=(0,W.useMemo)(()=>{let e=new Set;for(let t of I??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[I]),q=h!==``||o!==Y||f!==Y||p!==Y||m!==Y||_.length>0||g.kind!==`relative`||g.from!==Ke.from;function X(){t({search:{limit:100,kind:`all`},replace:!0})}let Ye=b?I?.filter(e=>e.correlationId===b):L;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ve,{}),(0,G.jsxs)(`p`,{className:`oc-admin__hint`,children:[ge(),(0,G.jsx)(`strong`,{children:_e()}),re(),` `,(0,G.jsx)(`span`,{className:`oc-filter__window`,children:we()})]}),(0,G.jsxs)(Re,{q:h,onQChange:E,searchPlaceholder:ie(),timeRange:g,onTimeRangeChange:P,onReset:X,canReset:q,children:[(0,G.jsxs)(U,{value:o,onValueChange:O,children:[(0,G.jsx)(R,{size:`sm`,className:`w-32`,children:(0,G.jsx)(M,{placeholder:ee()})}),(0,G.jsxs)(B,{children:[(0,G.jsx)(H,{value:Y,children:he()}),Ue.map(e=>(0,G.jsx)(H,{value:e,children:e},e))]})]}),(0,G.jsxs)(U,{value:f,onValueChange:k,children:[(0,G.jsx)(R,{size:`sm`,className:`w-32`,children:(0,G.jsx)(M,{placeholder:pe()})}),(0,G.jsxs)(B,{children:[(0,G.jsx)(H,{value:Y,children:te()}),We.map(e=>(0,G.jsx)(H,{value:e,children:e},e))]})]}),(0,G.jsxs)(U,{value:p,onValueChange:A,children:[(0,G.jsx)(R,{size:`sm`,className:`w-32`,children:(0,G.jsx)(M,{placeholder:me()})}),(0,G.jsxs)(B,{children:[(0,G.jsx)(H,{value:Y,children:s()}),Ge.map(e=>(0,G.jsx)(H,{value:e,children:e},e))]})]}),(0,G.jsxs)(U,{value:m,onValueChange:N,children:[(0,G.jsx)(R,{size:`sm`,className:`w-36`,children:(0,G.jsx)(M,{placeholder:ke()})}),(0,G.jsxs)(B,{children:[(0,G.jsx)(H,{value:Y,children:ue()}),K.map(e=>(0,G.jsx)(H,{value:e,children:e},e))]})]}),(0,G.jsxs)(U,{value:i,onValueChange:T,children:[(0,G.jsx)(R,{size:`sm`,className:`w-44`,children:(0,G.jsx)(M,{placeholder:ae()})}),(0,G.jsxs)(B,{children:[(0,G.jsx)(H,{value:J,children:ne()}),z.map(e=>(0,G.jsx)(H,{value:e,children:e},e))]})]}),(0,G.jsxs)(U,{value:String(n),onValueChange:e=>w(Number(e)),children:[(0,G.jsx)(R,{size:`sm`,className:`w-28`,children:(0,G.jsx)(M,{})}),(0,G.jsx)(B,{children:He.map(e=>(0,G.jsx)(H,{value:String(e),children:d({count:e})},e))})]})]}),(0,G.jsx)(ze,{fields:qe,seed:_,onChange:F}),b?(0,G.jsx)(`div`,{className:`oc-traces__followline`,children:(0,G.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>x(null),title:le(),children:[(0,G.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[se(),(0,G.jsx)(`code`,{children:Q(b)})]}),(0,G.jsx)(je,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,G.jsx)(`span`,{className:`sr-only`,children:oe()})]})}):null,(0,G.jsx)(Be,{title:Se(),rows:Ye,emptyHint:b?a():Ce(),columns:[{header:ce(),sort:e=>e.at,cell:e=>(0,G.jsx)(`span`,{className:`oc-traces__time`,children:new Date(e.at).toLocaleString(`fr-FR`)})},{header:l(),sort:e=>e.kind,cell:e=>(0,G.jsx)(V,{variant:`secondary`,children:e.kind})},{header:u(),sort:e=>$(e)??null,cell:e=>{let t=$(e);return t?(0,G.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,G.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":fe(),children:`✓`})}},{header:Ee(),sort:e=>e.direction,cell:e=>e.direction?(0,G.jsx)(V,{variant:`outline`,children:e.direction}):(0,G.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:c(),sort:e=>e.principalType,cell:e=>(0,G.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,G.jsx)(V,{variant:`outline`,children:e.principalType}),e.principalId?(0,G.jsx)(`code`,{className:`oc-traces__mono`,children:Q(e.principalId)}):null]})},{header:de(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,G.jsx)(V,{variant:`secondary`,children:e.roleKey}):(0,G.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:De(),sort:e=>e.route,cell:e=>e.route?(0,G.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,G.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,G.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,G.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:ye(),sort:e=>e.status,cell:e=>e.status===null?(0,G.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,G.jsx)(`span`,{className:`oc-traces__status ${Z(e.status)}`,children:e.status})},{header:Oe(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,G.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,G.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:Te(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,G.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:ve(),onClick:()=>x(e.correlationId),children:Q(e.correlationId)}):(0,G.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:be(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,G.jsx)(j,{variant:`outline`,size:`sm`,onClick:()=>C(e),children:xe()}):(0,G.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,G.jsx)(Je,{row:S,onClose:()=>C(null)})]})}function Z(e){return e>=500?`oc-traces__status--5xx`:e>=400?`oc-traces__status--4xx`:e>=200&&e<300?`oc-traces__status--2xx`:`oc-traces__status--other`}function Q(e){return e.length>8?e.slice(0,8):e}function $(e){if(typeof e.status==`number`&&e.status>=400)return String(e.status);if(!e.meta)return null;try{let t=JSON.parse(e.meta);if(e.kind===`openclaw.dispatch`&&t.dispatchStatus===`failed`)return t.errorCode??`failed`;if(e.kind===`assistant.stream`&&t.phase===`finalize`&&(t.streamStatus===`error`||t.streamStatus===`aborted`))return t.streamStatus;if(e.kind===`openclaw.ingest.denied`)return`denied`}catch{}return null}function Je({row:e,onClose:t}){let n=(0,W.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,G.jsx)(F,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,G.jsxs)(I,{className:`max-w-lg`,children:[(0,G.jsxs)(P,{children:[(0,G.jsxs)(L,{className:`oc-traces__meta-title`,children:[E(),` `,(0,G.jsx)(`code`,{children:e.kind}),(0,G.jsx)(V,{variant:`outline`,children:O()})]}),(0,G.jsx)(N,{children:T()})]}),(0,G.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{X as TracesTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$C as r,Ac as i,Am as a,Cm as o,Dc as s,Dm as c,Em as l,Fc as u,Ic as d,Lc as f,Mc as p,Nc as m,Oc as h,Om as g,Pc as _,Rc as v,Rp as y,Sm as b,Tm as ee,_m as x,am as te,aw as S,bm as ne,cm as re,dm as ie,fm as ae,gm as oe,hm as se,im as C,jc as w,jm as T,kc as E,km as D,lm as O,mm as k,om as ce,ow as A,pm as le,rm as ue,sm as de,um as fe,vm as pe,wm as me,xm as he,ym as ge,zc as j}from"./dist-CZX9zbI2.js";import{t as M}from"./button-BrnfkSI9.js";import{$ as N,A as P,C as F,Dt as I,F as L,L as R,M as _e,N as z,O as B,Ot as ve,P as ye,Q as be,R as xe,S as V,Z as Se,at as Ce,b as H,d as U,et as we,f as Te,gt as W,ht as G,j as Ee,m as K,nt as De,p as q,x as J,y as Y}from"./index-f6pazIt8.js";import{t as X}from"./FilterBar-B8N9UkBx.js";import{t as Oe}from"./DataTableShell-CNAywBhk.js";import{t as ke}from"./DetailChips-Br7hAIc4.js";var Z=t(e(),1),Q=n();function Ae({profileId:e,userLabel:t,open:n,onOpenChange:i}){let a=A(r.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),o=A(r.agents.listUserAgents,n&&e?{profileId:e}:`skip`),s=new Set((o??[]).map(e=>`${e.instanceName}/${e.agentId}`)),c=(o??[]).find(e=>e.isDefault)??null,l=c?`${c.instanceName}/${c.agentId}`:null,m=new Set((a?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),h=[...(a?.agents??[]).map(e=>({...e,outOfPool:!1})),...(o??[]).filter(e=>!m.has(`${e.instanceName}/${e.agentId}`)).map(e=>({instanceName:e.instanceName,agentId:e.agentId,displayName:e.displayName,emoji:e.emoji,model:e.model,kind:e.kind,state:e.state,outOfPool:!0}))],g=new Map;for(let e of h){let t=g.get(e.instanceName)??[];t.push(e),g.set(e.instanceName,t)}return(0,Q.jsx)(z,{open:n,onOpenChange:i,children:(0,Q.jsxs)(ye,{className:`oc-access`,children:[(0,Q.jsxs)(R,{children:[(0,Q.jsx)(xe,{children:j({user:t})}),(0,Q.jsx)(L,{children:v()})]}),a?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:a.inGroup?f():d()}):null,(0,Q.jsx)(`div`,{className:`oc-access__list`,children:a===void 0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:u()}):h.length===0?(0,Q.jsx)(`p`,{className:`oc-access__hint`,children:p()}):[...g.entries()].map(([t,n])=>(0,Q.jsx)(je,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:s,defaultKey:l},t))})]})})}function je({profileId:e,instanceName:t,kind:n,agents:a,assigned:o,defaultKey:c}){let l=S(r.agents.assignAgent),u=S(r.agents.removeAgent),d=S(r.agents.setDefaultAgent),f=P();if(!e)return null;async function p(n,r){try{r?await u({profileId:e,instanceName:t,agentId:n}):await l({profileId:e,instanceName:t,agentId:n})}catch(e){f.error(_(),e)}}async function g(n){try{await d({profileId:e,instanceName:t,agentId:n})}catch(e){f.error(m(),e)}}return(0,Q.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Q.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Q.jsx)(W,{size:13,"aria-hidden":!0}),(0,Q.jsx)(`span`,{children:t}),(0,Q.jsx)(K,{variant:`outline`,className:`oc-access__kind`,children:n})]}),a.map(e=>{let n=`${t}/${e.agentId}`,r=o.has(n),a=c===n,l=e.state===`deleted`;return(0,Q.jsxs)(`div`,{className:`oc-access__row`,children:[(0,Q.jsx)(B,{checked:r,disabled:l&&!r,onCheckedChange:()=>void p(e.agentId,r),"aria-label":w({name:e.displayName??e.agentId})}),(0,Q.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,Q.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,l?(0,Q.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:i()}):null,e.outOfPool?(0,Q.jsx)(K,{variant:`outline`,className:`oc-access__gone`,children:E()}):null,r?a?(0,Q.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":h(),title:h(),children:(0,Q.jsx)(G,{size:14,fill:`currentColor`})}):(0,Q.jsx)(M,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":s(),title:s(),onClick:()=>void g(e.agentId),children:(0,Q.jsx)(G,{size:14})}):null]},e.agentId)})]})}var $=`__all__`;function Me({granted:e,onToggle:t}){let n=new Set(e),r=U.filter(e=>n.has(q[e])).length;return(0,Q.jsxs)(Se,{children:[(0,Q.jsx)(De,{asChild:!0,children:(0,Q.jsx)(M,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:r===0?T():a({count:r})})}),(0,Q.jsxs)(be,{align:`start`,className:`w-52`,children:[(0,Q.jsx)(we,{children:D()}),U.map(e=>{let r=q[e];return(0,Q.jsxs)(N,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Q.jsx)(B,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Q.jsx)(`span`,{children:Te[e]??e})]},e)})]})]})}function Ne(){let e=ve({from:`/settings/users`}),t=I({from:`/settings/users`}),n=e.q??``,i=e.role??$,a=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),s=e=>void t({search:t=>({...t,role:e===$?void 0:e})}),u=A(r.admin.listUsers,{filter:{q:n||void 0,role:i===$?void 0:i},withAgents:!0}),d=A(r.me.getMe,{host:Ce}),f=S(r.admin.setRole),p=S(r.admin.setUserPermissions),m=S(r.admin.startImpersonation),h=S(r.admin.deleteUser),_=S(r.admin.setUserName),v=Ee(),w=_e(),T=P(),[E,D]=(0,Z.useState)(null),j=(0,Z.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of u??[])e.add(t.role);return[...e]},[u]),M=n!==``||i!==$;function N(){t({search:{},replace:!0})}async function L(e){try{await f(e)}catch(e){T.error(g(),e)}}async function R(e){try{await p(e)}catch(e){T.error(c(),e)}}async function z(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await v({title:ne(),description:ge({user:t}),confirmWord:pe(),confirmLabel:x(),destructive:!0}))try{await h({profileId:e._id}),T.success(se({user:t}))}catch(e){T.error(oe(),e)}}async function B(e){let t=e.email||e.name||e.userId.slice(0,8),n=await w({title:le(),label:ae({user:t}),placeholder:ie(),defaultValue:e.name??``,confirmLabel:y()});if(n!==null)try{await _({profileId:e._id,name:n}),T.success(fe())}catch(e){T.error(O(),e)}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(X,{q:n,onQChange:a,searchPlaceholder:l(),onReset:N,canReset:M,children:(0,Q.jsxs)(Y,{value:i,onValueChange:s,children:[(0,Q.jsx)(V,{size:`sm`,className:`w-36`,children:(0,Q.jsx)(F,{})}),(0,Q.jsxs)(H,{children:[(0,Q.jsx)(J,{value:$,children:ee()}),j.map(e=>(0,Q.jsx)(J,{value:e,children:e},e))]})]})}),(0,Q.jsx)(Oe,{title:me(),rows:u,emptyHint:o(),rowActions:e=>{let t=[{label:ue(),onSelect:()=>D({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:k(),onSelect:()=>void B(e)}];return e.userId!==d?.userId&&t.push({label:b(),onSelect:()=>void m({profileId:e._id})},{label:he(),variant:`destructive`,onSelect:()=>void z(e)}),t},columns:[{header:re(),cell:e=>{let t=e.email||e.name||e.canonical||e.userId.slice(0,8),n=e.email&&e.name&&e.name!==e.email?e.name:null;return(0,Q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Q.jsx)(`span`,{children:t}),n?(0,Q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:de(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Q.jsxs)(Y,{value:e.role,onValueChange:t=>void L({profileId:e._id,role:t}),children:[(0,Q.jsx)(V,{size:`sm`,className:`w-28`,children:(0,Q.jsx)(F,{})}),(0,Q.jsxs)(H,{children:[(0,Q.jsx)(J,{value:`pending`,children:`pending`}),(0,Q.jsx)(J,{value:`user`,children:`user`}),(0,Q.jsx)(J,{value:`admin`,children:`admin`})]})]})},{header:ce(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,Q.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:te()}):(0,Q.jsx)(Me,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),R({profileId:e._id,permissions:[...n]})}})},{header:C(),cell:e=>(0,Q.jsx)(ke,{icon:(0,Q.jsx)(W,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Q.jsx)(Ae,{profileId:E?.profileId??null,userLabel:E?.label??``,open:E!==null,onOpenChange:e=>{e||D(null)}})]})}export{Ne as UsersTab};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{
|
|
1
|
+
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{JC as n,n as r,t as i}from"./dist-CZX9zbI2.js";e();var a=t(),o=i(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function s({className:e,variant:t=`default`,size:i=`default`,asChild:s=!1,...c}){return(0,a.jsx)(s?n:`button`,{"data-slot":`button`,"data-variant":t,"data-size":i,className:r(o({variant:t,size:i,className:e})),...c})}export{o as n,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-
|
|
1
|
+
import{a as e,r as t}from"./bundle-mjs-C73ZY4La.js";import{n}from"./dist-CZX9zbI2.js";e();var r=t();function i({className:e,size:t=`default`,...i}){return(0,r.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:n(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...i})}function a({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-header`,className:n(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function o({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-title`,className:n(`font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function s({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-description`,className:n(`text-sm text-muted-foreground`,e),...t})}function c({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-content`,className:n(`px-4 group-data-[size=sm]/card:px-3`,e),...t})}function l({className:e,...t}){return(0,r.jsx)(`div`,{"data-slot":`card-footer`,className:n(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,e),...t})}export{a,l as i,c as n,o,s as r,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ew as e}from"./dist-CZX9zbI2.js";var t=e(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,c as t,i as n,o as r,r as i,s as a}from"./dist-
|
|
1
|
+
import{_ as e,c as t,i as n,o as r,r as i,s as a}from"./dist-CZX9zbI2.js";var o=e=>typeof e==`string`?e:null;function s(e){return/^\d+\.\d+\.\d+$/.test(e)?e.split(`.`).map(e=>Number.parseInt(e,10)):null}function c(e,t){let n=s(e),r=s(t);if(n===null||r===null)return null;for(let e=0;e<3;e++){let t=n[e]-r[e];if(t!==0)return t}return 0}function l(e,t){if(e===null||t===null)return!1;let n=c(t,e.min);return n!==null&&n>=0}function u(e,t){let n={range:null,validatedVersions:[]};if(typeof e!=`object`||!e)return n;let r=e.providers;if(typeof r!=`object`||!r)return n;let i=r[t];if(typeof i!=`object`||!i)return n;let a=i,s=null;if(typeof a.supportedRange==`object`&&a.supportedRange!==null){let e=a.supportedRange,t=o(e.min),n=o(e.maxValidated);t!==null&&n!==null&&(s={min:t,maxValidated:n})}let c=Array.isArray(a.validatedVersions)?a.validatedVersions.filter(e=>typeof e==`string`):[];return{range:s,validatedVersions:c}}function d(e,t,n){if(e===null)return`unknown`;let{range:r}=u(n,t);return l(r,e)?r!==null&&(c(e,r.maxValidated)??0)>0?`beyond`:`supported`:`unknown`}function f(e){return e===`supported`?t():e===`beyond`?a():r()}function p(t){return t??e()}function m(e){return e===null?i():n({version:e})}function h(e,t){if(typeof e!=`object`||!e)return!1;let n=e.providers;return typeof n!=`object`||!n?!1:t in n}export{p as a,m as i,h as n,c as o,f as r,u as s,d as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ai as e,Bi as t,Ci as n,Di as r,Ei as i,Fi as a,Hi as o,Ii as s,Li as c,Mi as l,Ni as u,Oi as d,Pi as f,Ri as p,Si as m,Ti as h,Ui as g,Vi as _,_i as v,bi as y,gi as b,hi as x,ji as S,ki as C,vi as w,wi as T,xi as E,yi as D,zi as O}from"./dist-
|
|
1
|
+
import{Ai as e,Bi as t,Ci as n,Di as r,Ei as i,Fi as a,Hi as o,Ii as s,Li as c,Mi as l,Ni as u,Oi as d,Pi as f,Ri as p,Si as m,Ti as h,Ui as g,Vi as _,_i as v,bi as y,gi as b,hi as x,ji as S,ki as C,vi as w,wi as T,xi as E,yi as D,zi as O}from"./dist-CZX9zbI2.js";var k={AGENT_NOT_FOUND:()=>({label:g(),hint:o()}),AUTH_TOKEN_MISMATCH:()=>({label:_(),hint:t()}),DEVICE_SIGNING_FAILED:()=>({label:O(),hint:p()}),SESSION_SCOPE_DENIED:()=>({label:c(),hint:s()}),GATEWAY_TIMEOUT:()=>({label:a(),hint:f()}),GATEWAY_DISCONNECTED:()=>({label:u(),hint:l()}),ATTACHMENT_TOO_LARGE:()=>({label:C(),hint:d()}),ATTACHMENT_REJECTED:()=>({label:r(),hint:i()}),BRIDGE_UNREACHABLE:()=>({label:S(),hint:e()}),INVALID_REQUEST:()=>({label:h(),hint:T()}),NOT_CONFIGURED:()=>({label:n(),hint:m()}),UNROUTED:()=>({label:E(),hint:y()}),UPSTREAM_ERROR:()=>({label:D(),hint:w()}),UNKNOWN:()=>({label:v(),hint:b()})};function A(e){return e?k[e]?.()??{label:e,hint:x()}:k.UNKNOWN()}export{A as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{
|
|
1
|
+
import{a as e,l as t}from"./bundle-mjs-C73ZY4La.js";import{ew as n}from"./dist-CZX9zbI2.js";var r=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),i=t(e(),1);function a(e){let t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}export{r as n,a as t};
|