@swarmroom/server 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/app.js +13 -4
  2. package/dist/public/assets/_agentId-B5f3yJc6.js +36 -0
  3. package/dist/public/assets/activity-B3TqhZ-f.js +6 -0
  4. package/dist/public/assets/arrow-left-u9wxRsmJ.js +6 -0
  5. package/dist/public/assets/avatar-B_Cqbi60.js +1 -0
  6. package/dist/public/assets/card-B896vjxa.js +1 -0
  7. package/dist/public/assets/chevron-down-CwGQLAwz.js +6 -0
  8. package/dist/public/assets/error-boundary-GFV_5F1L.js +11 -0
  9. package/dist/public/assets/external-link-skx4o5wJ.js +6 -0
  10. package/dist/public/assets/index-CZLH7_Xl.js +36 -0
  11. package/dist/public/assets/index-D0-THR73.js +16 -0
  12. package/dist/public/assets/index-D8d9U5S5.js +26 -0
  13. package/dist/public/assets/index-DC3HeWGk.js +6 -0
  14. package/dist/public/assets/index-DcbqFmA_.css +1 -0
  15. package/dist/public/assets/index-DqvmWes8.js +213 -0
  16. package/dist/public/assets/index-Drki27xM.js +26 -0
  17. package/dist/public/assets/index-MKgtdaN5.js +6 -0
  18. package/dist/public/assets/input-BROwVVEx.js +1 -0
  19. package/dist/public/assets/loader-circle-atY3HcdA.js +6 -0
  20. package/dist/public/assets/plus-Bq20n-_S.js +6 -0
  21. package/dist/public/assets/radio-D8C4proJ.js +6 -0
  22. package/dist/public/assets/scroll-area-C4F6zoWB.js +1 -0
  23. package/dist/public/assets/send-Dl7T7Bm1.js +6 -0
  24. package/dist/public/assets/useMutation-BhJRnGsH.js +1 -0
  25. package/dist/public/assets/user-minus-SI0czWZH.js +11 -0
  26. package/dist/public/assets/utils-AH9TuImk.js +6 -0
  27. package/dist/public/assets/wifi-BMnLTkMX.js +26 -0
  28. package/dist/public/index.html +14 -0
  29. package/dist/public/vite.svg +4 -0
  30. package/package.json +3 -2
@@ -0,0 +1,26 @@
1
+ import{c as m,u as k,j as e,b as x,U as A,A as b,t as c,r as C,C as z,q as E,s as S,v as M,w as U,p as y}from"./index-DqvmWes8.js";import{C as u,b as h,c as f,d as g,a as p}from"./card-B896vjxa.js";import{R as H,S as j,B as v,E as T}from"./error-boundary-GFV_5F1L.js";import{A as L}from"./activity-B3TqhZ-f.js";import{W as q,G as F,C as I,a as $,F as B}from"./wifi-BMnLTkMX.js";import{R as O}from"./radio-D8C4proJ.js";import{E as P}from"./external-link-skx4o5wJ.js";/**
2
+ * @license lucide-react v0.400.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 R=m("Clipboard",[["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"}]]);/**
7
+ * @license lucide-react v0.400.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 G=m("Heart",[["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"}]]);/**
12
+ * @license lucide-react v0.400.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 J=m("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
17
+ * @license lucide-react v0.400.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 w=m("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
22
+ * @license lucide-react v0.400.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 _=m("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);function D(s){const r=Math.floor(s/86400),t=Math.floor(s%86400/3600),a=Math.floor(s%3600/60),o=Math.floor(s%60),i=[];return r>0&&i.push(`${r}d`),t>0&&i.push(`${t}h`),a>0&&i.push(`${a}m`),i.push(`${o}s`),i.join(" ")}function W(){return`${window.location.protocol}//${window.location.host}`}function K(){const{data:s,isLoading:r,isError:t,refetch:a,isFetching:o}=k({queryKey:["health"],queryFn:async()=>{const n=await fetch(`${b}/health`);if(!n.ok)throw new Error("Failed to fetch health");return n.json()},refetchInterval:3e4,retry:2});async function i(){try{const n=await fetch(`${b}/health`);if(!n.ok)throw new Error(`HTTP ${n.status}`);const l=await n.json();l.status==="ok"?c.success("Connection successful",{description:`Hub v${l.version} is running with ${l.agentCount} agent(s)`}):c.error("Unexpected response",{description:`Status: ${l.status}`})}catch(n){c.error("Connection failed",{description:n instanceof Error?n.message:"Could not reach the hub"})}}const N=W();return e.jsxs(u,{children:[e.jsx(h,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex size-10 items-center justify-center rounded-lg bg-brand-500/10 text-brand-500",children:e.jsx(w,{className:"size-5"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx(f,{className:"text-lg",children:"Hub Information"}),e.jsx(g,{children:"Status and details of your SwarmRoom hub"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(x,{variant:"outline",size:"sm",onClick:()=>a(),disabled:o,children:[e.jsx(H,{className:`size-3.5 ${o?"animate-spin":""}`}),"Refresh"]}),e.jsxs(x,{variant:"default",size:"sm",onClick:i,children:[e.jsx(L,{className:"size-3.5"}),"Test Connection"]})]})]})}),e.jsx(p,{children:r?e.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:5}).map((n,l)=>e.jsxs("div",{className:"flex items-center gap-3 rounded-lg border p-4",children:[e.jsx(j,{className:"size-9 rounded-md"}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(j,{className:"h-3 w-16"}),e.jsx(j,{className:"h-5 w-24"})]})]},l))}):t?e.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-lg border border-dashed border-destructive/30 bg-destructive/5 py-8 text-center",children:[e.jsx(q,{className:"size-8 text-destructive/60"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-destructive",children:"Unable to reach hub"}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Check that the server is running at ",N]})]}),e.jsx(x,{variant:"outline",size:"sm",onClick:()=>a(),children:"Retry"})]}):e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsx(d,{icon:e.jsx(F,{className:"size-4"}),label:"Hub URL",value:N,mono:!0}),e.jsx(d,{icon:e.jsx(O,{className:"size-4"}),label:"Status",value:e.jsxs(v,{variant:(s==null?void 0:s.status)==="ok"?"default":"destructive",className:(s==null?void 0:s.status)==="ok"?"bg-emerald-500/15 text-emerald-600 dark:text-emerald-400":"",children:[e.jsxs("span",{className:"relative flex size-1.5",children:[e.jsx("span",{className:`absolute inline-flex size-full animate-ping rounded-full opacity-75 ${(s==null?void 0:s.status)==="ok"?"bg-emerald-500":"bg-destructive"}`}),e.jsx("span",{className:`relative inline-flex size-1.5 rounded-full ${(s==null?void 0:s.status)==="ok"?"bg-emerald-500":"bg-destructive"}`})]}),(s==null?void 0:s.status)==="ok"?"Online":"Degraded"]})}),e.jsx(d,{icon:e.jsx(w,{className:"size-4"}),label:"Version",value:`v${(s==null?void 0:s.version)??"0.0.0"}`,mono:!0}),e.jsx(d,{icon:e.jsx(I,{className:"size-4"}),label:"Uptime",value:s?D(s.uptime):"—",mono:!0}),e.jsx(d,{icon:e.jsx(A,{className:"size-4"}),label:"Connected Agents",value:String((s==null?void 0:s.agentCount)??0)})]})})]})}function d({icon:s,label:r,value:t,mono:a}){return e.jsxs("div",{className:"flex items-center gap-3 rounded-lg border bg-muted/30 p-4 transition-colors hover:bg-muted/50",children:[e.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-background text-muted-foreground shadow-sm",children:s}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-xs font-medium tracking-wide text-muted-foreground uppercase",children:r}),e.jsx("div",{className:`mt-0.5 truncate text-sm font-semibold ${a?"font-mono text-[13px]":""}`,children:t})]})]})}function V(){return`${window.location.protocol}//${window.location.host}`}const Q=[{id:"claude",name:"Claude Code",file:".mcp.json",icon:e.jsx(_,{className:"size-4"}),getConfig:s=>JSON.stringify({mcpServers:{swarmroom:{url:s}}},null,2)},{id:"opencode",name:"OpenCode",file:"opencode.json",icon:e.jsx($,{className:"size-4"}),getConfig:s=>JSON.stringify({mcp:{swarmroom:{type:"streamable-http",url:s}}},null,2)},{id:"gemini",name:"Gemini CLI",file:".gemini/settings.json",icon:e.jsx(B,{className:"size-4"}),getConfig:s=>JSON.stringify({mcpServers:{swarmroom:{httpUrl:s}}},null,2)}];function X(){const r=`${V()}/mcp`;return e.jsxs(u,{children:[e.jsx(h,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex size-10 items-center justify-center rounded-lg bg-accent-500/10 text-accent-500",children:e.jsx($,{className:"size-5"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx(f,{className:"text-lg",children:"Connection"}),e.jsx(g,{children:"Configure your AI tools to connect to this SwarmRoom hub"})]})]})}),e.jsxs(p,{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-xs font-medium tracking-wide text-muted-foreground uppercase",children:"Hub MCP Endpoint"}),e.jsx(Z,{value:r})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs font-medium tracking-wide text-muted-foreground uppercase",children:"Configuration Examples"}),e.jsx("div",{className:"grid gap-3",children:Q.map(t=>e.jsx(Y,{config:t,mcpUrl:r},t.id))})]})]})]})}function Z({value:s}){const[r,t]=C.useState(!1);async function a(){try{await navigator.clipboard.writeText(s),t(!0),c.success("Copied to clipboard"),setTimeout(()=>t(!1),2e3)}catch{c.error("Failed to copy")}}return e.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center gap-2 rounded-lg border bg-muted/30 px-4 py-3 text-left transition-colors hover:bg-muted/50",children:[e.jsx("code",{className:"flex-1 truncate font-mono text-sm",children:s}),e.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors group-hover:bg-background group-hover:shadow-sm",children:r?e.jsx(z,{className:"size-3.5 text-emerald-500"}):e.jsx(R,{className:"size-3.5"})})]})}function Y({config:s,mcpUrl:r}){const[t,a]=C.useState(!1),o=s.getConfig(r);async function i(){try{await navigator.clipboard.writeText(o),a(!0),c.success(`${s.name} config copied`),setTimeout(()=>a(!1),2e3)}catch{c.error("Failed to copy")}}return e.jsxs("div",{className:"overflow-hidden rounded-lg border bg-muted/20",children:[e.jsxs("div",{className:"flex items-center gap-2 border-b bg-muted/40 px-4 py-2.5",children:[e.jsx("span",{className:"text-muted-foreground",children:s.icon}),e.jsx("span",{className:"flex-1 text-sm font-medium",children:s.name}),e.jsx(v,{variant:"outline",className:"font-mono text-[11px]",children:s.file}),e.jsx(x,{variant:"ghost",size:"icon-xs",onClick:i,className:"ml-1",children:t?e.jsx(z,{className:"size-3 text-emerald-500"}):e.jsx(R,{className:"size-3"})})]}),e.jsx("pre",{className:"overflow-x-auto p-4 font-mono text-[13px] leading-relaxed text-foreground/80",children:o})]})}const ee=[{value:"light",label:"Light",icon:S,description:"Bright and clean"},{value:"dark",label:"Dark",icon:M,description:"Easy on the eyes"},{value:"system",label:"System",icon:U,description:"Match your OS"}];function se(){const{theme:s,setTheme:r}=E();return e.jsxs(u,{children:[e.jsx(h,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex size-10 items-center justify-center rounded-lg bg-brand-500/10 text-brand-500",children:e.jsx(S,{className:"size-5"})}),e.jsxs("div",{children:[e.jsx(f,{className:"text-lg",children:"Appearance"}),e.jsx(g,{children:"Customize how SwarmRoom looks on your device"})]})]})}),e.jsx(p,{children:e.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:ee.map(t=>{const a=s===t.value;return e.jsxs("button",{type:"button",onClick:()=>r(t.value),className:`group relative flex flex-col items-center gap-3 rounded-xl border-2 p-5 transition-all ${a?"border-brand-500 bg-brand-500/5 shadow-sm shadow-brand-500/10":"border-transparent bg-muted/30 hover:border-border hover:bg-muted/50"}`,children:[e.jsx("div",{className:`flex size-12 items-center justify-center rounded-xl transition-colors ${a?"bg-brand-500/15 text-brand-500":"bg-background text-muted-foreground shadow-sm dark:border dark:border-border group-hover:text-foreground"}`,children:e.jsx(t.icon,{className:"size-5"})}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:`text-sm font-semibold ${a?"text-brand-500":"text-foreground"}`,children:t.label}),e.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:t.description})]}),a&&e.jsx("div",{className:"absolute -top-1 -right-1 flex size-5 items-center justify-center rounded-full bg-brand-500 text-white shadow-sm",children:e.jsx("svg",{className:"size-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})})]},t.value)})})})]})}function te(){const{data:s}=k({queryKey:["health"],queryFn:async()=>{const t=await fetch(`${b}/health`);if(!t.ok)throw new Error("Failed to fetch health");return t.json()},staleTime:6e4}),r=(s==null?void 0:s.version)??"0.0.0";return e.jsxs(u,{children:[e.jsx(h,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex size-10 items-center justify-center rounded-lg bg-accent-500/10 text-accent-500",children:e.jsx(J,{className:"size-5"})}),e.jsxs("div",{children:[e.jsx(f,{className:"text-lg",children:"About"}),e.jsx(g,{children:"SwarmRoom project information"})]})]})}),e.jsxs(p,{className:"space-y-5",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"flex size-14 items-center justify-center rounded-2xl bg-gradient-to-br from-brand-500 to-accent-500 shadow-lg shadow-brand-500/20",children:e.jsx("span",{className:"text-2xl font-black text-white",children:"S"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold tracking-tight",children:"SwarmRoom"}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsxs(v,{variant:"secondary",className:"font-mono text-xs",children:["v",r]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Open Source"})]})]})]}),e.jsx(y,{}),e.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:"LAN-based agent discovery and communication hub. SwarmRoom enables AI agents to find each other on local networks and collaborate through a shared MCP-compatible interface."}),e.jsx("div",{className:"flex flex-wrap gap-2",children:e.jsxs("a",{href:"https://github.com/swarmroom/swarmroom",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 rounded-md border bg-muted/30 px-3 py-1.5 text-xs font-medium transition-colors hover:bg-muted/50",children:[e.jsx(P,{className:"size-3"}),"GitHub"]})}),e.jsx(y,{}),e.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:["Made with ",e.jsx(G,{className:"size-3 text-red-500"})," for the agent ecosystem"]})]})]})}function re(){return e.jsxs("div",{className:"mx-auto w-full max-w-4xl space-y-8 p-4 pb-16 sm:p-6 lg:p-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Settings"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Configure your SwarmRoom instance"})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(K,{}),e.jsx(X,{}),e.jsx(se,{}),e.jsx(te,{})]})]})}function me(){return e.jsx(T,{featureName:"Settings",children:e.jsx(re,{})})}export{me as component};
@@ -0,0 +1,6 @@
1
+ import{c as ne,j as e,U as Y,n as $,r as h,D as L,d as O,e as k,f as E,g as Q,o as K,b as x,t as v,A as b,u as M,S as re,p as ie,m as W}from"./index-DqvmWes8.js";import{B as I,S as D,E as le}from"./error-boundary-GFV_5F1L.js";import{C as X,a as Z}from"./card-B896vjxa.js";import{A as oe,a as _,b as U,c as ce}from"./avatar-B_Cqbi60.js";import{g as R,a as B,s as T,T as de}from"./utils-AH9TuImk.js";import{u as w}from"./useMutation-BhJRnGsH.js";import{I as S}from"./input-BROwVVEx.js";import{L as P}from"./loader-circle-atY3HcdA.js";import{S as ee}from"./scroll-area-C4F6zoWB.js";import{P as G}from"./plus-Bq20n-_S.js";import{P as me,U as ue}from"./user-minus-SI0czWZH.js";/**
2
+ * @license lucide-react v0.400.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 xe=ne("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);function he({team:a,onClick:i}){const o=a.topAgentNames??[],r=a.agentCount-o.length;return e.jsxs(X,{className:"group relative cursor-pointer gap-0 overflow-hidden py-0 transition-all duration-200 hover:shadow-lg hover:-translate-y-0.5",onClick:i,children:[e.jsx("div",{className:"absolute inset-y-0 left-0 w-1 transition-all duration-200 group-hover:w-1.5",style:{backgroundColor:a.color??"#6366f1"}}),e.jsxs(Z,{className:"flex flex-col gap-4 p-5 pl-5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h3",{className:"truncate text-base font-semibold leading-tight text-foreground",children:a.name}),a.description&&e.jsx("p",{className:"mt-1 line-clamp-2 text-sm text-muted-foreground leading-relaxed",children:a.description})]}),e.jsxs(I,{variant:"secondary",className:"shrink-0 gap-1 tabular-nums text-xs",children:[e.jsx(Y,{className:"size-3"}),a.agentCount]})]}),e.jsx("div",{className:"flex items-center gap-3 border-t border-border/40 pt-3",children:o.length>0?e.jsxs(oe,{children:[o.slice(0,5).map(m=>e.jsx(_,{size:"sm",children:e.jsx(U,{className:"text-[9px] font-semibold text-white",style:{backgroundColor:B(m)},children:R(m)})},m)),r>0&&e.jsxs(ce,{className:"text-[10px] font-medium",children:["+",r]})]}):e.jsx("span",{className:"text-xs text-muted-foreground italic",children:"No members yet"})})]})]})}function fe(){return e.jsxs(X,{className:"gap-0 overflow-hidden py-0",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 w-1 bg-muted"}),e.jsxs(Z,{className:"flex flex-col gap-4 p-5 pl-5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx("div",{className:"h-5 w-32 animate-pulse rounded bg-muted"}),e.jsx("div",{className:"h-4 w-48 animate-pulse rounded bg-muted"})]}),e.jsx("div",{className:"h-5 w-12 animate-pulse rounded-full bg-muted"})]}),e.jsx("div",{className:"flex gap-1 border-t border-border/40 pt-3",children:Array.from({length:3}).map((a,i)=>e.jsx("div",{className:"size-6 animate-pulse rounded-full bg-muted"},i))})]})]})}const q=["#6366f1","#8b5cf6","#ec4899","#f43f5e","#ef4444","#f97316","#eab308","#22c55e","#10b981","#06b6d4","#3b82f6","#64748b"];function ge({open:a,onOpenChange:i}){const o=$(),[r,m]=h.useState(""),[c,l]=h.useState(""),[g,N]=h.useState(q[0]),j=w({mutationFn:async()=>{var f;const t=await fetch(`${b}/teams`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r.trim(),description:c.trim()||void 0,color:g})});if(!t.ok){const u=await t.json().catch(()=>null);throw new Error(((f=u==null?void 0:u.error)==null?void 0:f.message)??`Failed to create team (${t.status})`)}return t.json()},onSuccess:()=>{o.invalidateQueries({queryKey:["teams"]}),v.success("Team created"),y()},onError:t=>{v.error(t.message)}});function y(){m(""),l(""),N(q[0]),i(!1)}function n(t){t.preventDefault(),r.trim()&&j.mutate()}return e.jsx(L,{open:a,onOpenChange:i,children:e.jsx(O,{className:"sm:max-w-md",children:e.jsxs("form",{onSubmit:n,children:[e.jsxs(k,{children:[e.jsx(E,{children:"Create Team"}),e.jsx(Q,{children:"Group agents into a collaborative team."})]}),e.jsxs("div",{className:"mt-4 flex flex-col gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{htmlFor:"team-name",className:"text-sm font-medium text-foreground",children:"Name"}),e.jsx(S,{id:"team-name",value:r,onChange:t=>m(t.target.value),placeholder:"e.g. Frontend Squad",autoFocus:!0,required:!0})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{htmlFor:"team-desc",className:"text-sm font-medium text-foreground",children:"Description"}),e.jsx(S,{id:"team-desc",value:c,onChange:t=>l(t.target.value),placeholder:"What does this team focus on?"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"text-sm font-medium text-foreground",children:"Color"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:q.map(t=>e.jsx("button",{type:"button",onClick:()=>N(t),className:"relative size-7 rounded-full transition-transform hover:scale-110 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",style:{backgroundColor:t},children:g===t&&e.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("span",{className:"size-2 rounded-full bg-white"})})},t))})]})]}),e.jsxs(K,{className:"mt-6",children:[e.jsx(x,{type:"button",variant:"outline",onClick:y,disabled:j.isPending,children:"Cancel"}),e.jsxs(x,{type:"submit",disabled:!r.trim()||j.isPending,children:[j.isPending&&e.jsx(P,{className:"animate-spin"}),"Create"]})]})]})})})}function je({open:a,onOpenChange:i,teamId:o,currentAgentIds:r}){var y;const m=$(),[c,l]=h.useState(""),g=M({queryKey:["agents"],queryFn:async()=>{const n=await fetch(`${b}/agents`);if(!n.ok)throw new Error("Failed to fetch agents");return(await n.json()).data},enabled:a,staleTime:3e4}),N=w({mutationFn:async n=>{var f;const t=await fetch(`${b}/teams/${o}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:n})});if(!t.ok){const u=await t.json().catch(()=>null);throw new Error(((f=u==null?void 0:u.error)==null?void 0:f.message)??`Failed to add agent (${t.status})`)}return t.json()},onSuccess:()=>{m.invalidateQueries({queryKey:["teams"]}),m.invalidateQueries({queryKey:["team",o]}),v.success("Agent added to team")},onError:n=>{v.error(n.message)}}),j=h.useMemo(()=>{const n=g.data??[],t=new Set(r);let f=n.filter(u=>!t.has(u.id));if(c){const u=c.toLowerCase();f=f.filter(C=>C.displayName.toLowerCase().includes(u)||C.name.toLowerCase().includes(u))}return f},[g.data,r,c]);return e.jsx(L,{open:a,onOpenChange:i,children:e.jsxs(O,{className:"sm:max-w-md",children:[e.jsxs(k,{children:[e.jsx(E,{children:"Add Agent"}),e.jsx(Q,{children:"Select an agent to add to this team."})]}),e.jsxs("div",{className:"relative",children:[e.jsx(re,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(S,{value:c,onChange:n=>l(n.target.value),placeholder:"Search agents...",className:"pl-9"})]}),e.jsx(ee,{className:"max-h-64",children:g.isLoading?e.jsx("div",{className:"flex flex-col gap-2 p-1",children:Array.from({length:3}).map((n,t)=>e.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-muted"},t))}):j.length===0?e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:(((y=g.data)==null?void 0:y.length)??0)===0?"No agents available":c?"No matching agents":"All agents are already in this team"}):e.jsx("div",{className:"flex flex-col gap-1 p-1",children:j.map(n=>{const t=T[n.status]??T.offline;return e.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2 transition-colors hover:bg-accent",children:[e.jsx(_,{size:"sm",children:e.jsx(U,{className:"text-[9px] font-semibold text-white",style:{backgroundColor:B(n.displayName)},children:R(n.displayName)})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:n.displayName}),e.jsx("span",{className:`inline-block size-1.5 shrink-0 rounded-full ${t.dot}`})]}),e.jsx("p",{className:"truncate text-xs text-muted-foreground font-mono",children:n.name})]}),e.jsxs(x,{size:"xs",variant:"outline",onClick:()=>N.mutate(n.id),disabled:N.isPending,children:[e.jsx(G,{className:"size-3"}),"Add"]})]},n.id)})})}),e.jsx(K,{children:e.jsx(x,{variant:"outline",onClick:()=>i(!1),children:"Done"})})]})})}function pe({teamId:a,open:i,onOpenChange:o}){const r=$(),[m,c]=h.useState(!1),[l,g]=h.useState(""),[N,j]=h.useState(""),[y,n]=h.useState(""),[t,f]=h.useState(!1),[u,C]=h.useState(!1),H=M({queryKey:["team",a],queryFn:async()=>{const s=await fetch(`${b}/teams/${a}`);if(!s.ok)throw new Error("Failed to fetch team");return(await s.json()).data},enabled:i&&!!a,staleTime:1e4}),d=H.data,A=w({mutationFn:async s=>{var V;const p=await fetch(`${b}/teams/${a}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!p.ok){const z=await p.json().catch(()=>null);throw new Error(((V=z==null?void 0:z.error)==null?void 0:V.message)??`Failed to update team (${p.status})`)}return p.json()},onSuccess:()=>{r.invalidateQueries({queryKey:["teams"]}),r.invalidateQueries({queryKey:["team",a]}),v.success("Team updated"),c(!1)},onError:s=>{v.error(s.message)}}),F=w({mutationFn:async()=>{if(!(await fetch(`${b}/teams/${a}`,{method:"DELETE"})).ok)throw new Error("Failed to delete team")},onSuccess:()=>{r.invalidateQueries({queryKey:["teams"]}),v.success("Team deleted"),o(!1)},onError:s=>{v.error(s.message)}}),J=w({mutationFn:async s=>{if(!(await fetch(`${b}/teams/${a}/agents/${s}`,{method:"DELETE"})).ok)throw new Error("Failed to remove agent")},onSuccess:()=>{r.invalidateQueries({queryKey:["teams"]}),r.invalidateQueries({queryKey:["team",a]}),v.success("Agent removed from team")},onError:s=>{v.error(s.message)}});function se(){d&&(g(d.name),j(d.description??""),n(d.color??"#6366f1"),c(!0))}function te(s){s.preventDefault(),l.trim()&&A.mutate({name:l.trim(),description:N.trim()||void 0,color:y})}const ae=["#6366f1","#8b5cf6","#ec4899","#f43f5e","#ef4444","#f97316","#eab308","#22c55e","#10b981","#06b6d4","#3b82f6","#64748b"];return e.jsxs(e.Fragment,{children:[e.jsx(L,{open:i,onOpenChange:o,children:e.jsx(O,{className:"sm:max-w-lg",children:H.isLoading?e.jsxs("div",{className:"flex flex-col gap-4 py-8",children:[e.jsx("div",{className:"h-6 w-40 animate-pulse rounded bg-muted"}),e.jsx("div",{className:"h-4 w-64 animate-pulse rounded bg-muted"}),e.jsx("div",{className:"h-px bg-border"}),Array.from({length:3}).map((s,p)=>e.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-muted"},p))]}):d?m?e.jsxs("form",{onSubmit:te,children:[e.jsx(k,{children:e.jsx(E,{children:"Edit Team"})}),e.jsxs("div",{className:"mt-4 flex flex-col gap-4",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{htmlFor:"edit-name",className:"text-sm font-medium text-foreground",children:"Name"}),e.jsx(S,{id:"edit-name",value:l,onChange:s=>g(s.target.value),autoFocus:!0,required:!0})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{htmlFor:"edit-desc",className:"text-sm font-medium text-foreground",children:"Description"}),e.jsx(S,{id:"edit-desc",value:N,onChange:s=>j(s.target.value)})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"text-sm font-medium text-foreground",children:"Color"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:ae.map(s=>e.jsx("button",{type:"button",onClick:()=>n(s),className:"relative size-7 rounded-full transition-transform hover:scale-110 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",style:{backgroundColor:s},children:y===s&&e.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("span",{className:"size-2 rounded-full bg-white"})})},s))})]})]}),e.jsxs(K,{className:"mt-6",children:[e.jsx(x,{type:"button",variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsxs(x,{type:"submit",disabled:!l.trim()||A.isPending,children:[A.isPending&&e.jsx(P,{className:"animate-spin"}),"Save"]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs(k,{children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-4 shrink-0 rounded-full",style:{backgroundColor:d.color??"#6366f1"}}),e.jsx(E,{className:"truncate",children:d.name})]}),d.description&&e.jsx(Q,{children:d.description})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(x,{size:"sm",variant:"outline",onClick:se,children:[e.jsx(me,{}),"Edit"]}),e.jsxs(x,{size:"sm",variant:"outline",onClick:()=>f(!0),children:[e.jsx(xe,{}),"Add Agent"]}),e.jsx("div",{className:"flex-1"}),u?e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-xs text-destructive font-medium",children:"Delete?"}),e.jsx(x,{size:"xs",variant:"destructive",onClick:()=>F.mutate(),disabled:F.isPending,children:F.isPending?e.jsx(P,{className:"animate-spin"}):"Yes"}),e.jsx(x,{size:"xs",variant:"outline",onClick:()=>C(!1),children:"No"})]}):e.jsx(x,{size:"sm",variant:"ghost",className:"text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>C(!0),children:e.jsx(de,{})})]}),e.jsx(ie,{}),e.jsx("div",{className:"space-y-1",children:e.jsxs("h4",{className:"text-sm font-medium",children:["Members",e.jsx(I,{variant:"secondary",className:"ml-2 tabular-nums",children:d.agents.length})]})}),e.jsx(ee,{className:"max-h-64",children:d.agents.length===0?e.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground italic",children:"No agents in this team yet"}):e.jsx("div",{className:"flex flex-col gap-1",children:d.agents.map(s=>{const p=T[s.status]??T.offline;return e.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2 transition-colors hover:bg-accent/50",children:[e.jsx(_,{size:"sm",children:e.jsx(U,{className:"text-[9px] font-semibold text-white",style:{backgroundColor:B(s.displayName)},children:R(s.displayName)})}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:s.displayName}),e.jsx("span",{className:`inline-block size-1.5 shrink-0 rounded-full ${p.dot}`})]})}),e.jsx(x,{size:"icon-xs",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:()=>J.mutate(s.id),disabled:J.isPending,children:e.jsx(ue,{className:"size-3.5"})})]},s.id)})})})]}):e.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"Team not found"})})}),e.jsx(je,{open:t,onOpenChange:f,teamId:a,currentAgentIds:(d==null?void 0:d.agents.map(s=>s.id))??[]})]})}function ve(){const[a,i]=h.useState(!1),[o,r]=h.useState(null),m=M({queryKey:["teams"],queryFn:async()=>{const l=await fetch(`${b}/teams`);if(!l.ok)throw new Error("Failed to fetch teams");return(await l.json()).data},staleTime:3e4,refetchInterval:15e3,retry:1});if(m.isLoading)return e.jsx(ye,{});const c=m.data??[];return e.jsxs("div",{className:"flex flex-col gap-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Teams"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Organize agents into collaborative teams"})]}),e.jsxs(x,{onClick:()=>i(!0),children:[e.jsx(G,{}),"Create Team"]})]}),c.length===0?e.jsx(Ne,{onCreateClick:()=>i(!0)}):e.jsx(W.div,{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4",initial:"hidden",animate:"visible",variants:{hidden:{},visible:{transition:{staggerChildren:.05}}},children:c.map(l=>e.jsx(W.div,{variants:{hidden:{opacity:0,y:12},visible:{opacity:1,y:0,transition:{duration:.25}}},children:e.jsx(he,{team:l,onClick:()=>r(l.id)})},l.id))}),e.jsx(ge,{open:a,onOpenChange:i}),o&&e.jsx(pe,{teamId:o,open:!!o,onOpenChange:l=>{l||r(null)}})]})}function Ne({onCreateClick:a}){return e.jsxs("div",{className:"flex flex-col items-center justify-center rounded-xl border border-dashed border-border/60 py-20",children:[e.jsx("div",{className:"flex size-16 items-center justify-center rounded-2xl bg-muted",children:e.jsx(Y,{className:"size-8 text-muted-foreground"})}),e.jsx("h2",{className:"mt-5 text-lg font-semibold",children:"No teams yet"}),e.jsx("p",{className:"mt-1.5 max-w-sm text-center text-sm text-muted-foreground",children:"Create your first team to organize agents into focused groups that collaborate on tasks together."}),e.jsxs(x,{className:"mt-6",onClick:a,children:[e.jsx(G,{}),"Create Team"]})]})}function ye(){return e.jsxs("div",{className:"flex flex-col gap-6 p-4 sm:p-6",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx(D,{className:"h-8 w-28"}),e.jsx(D,{className:"mt-2 h-4 w-64"})]}),e.jsx(D,{className:"h-9 w-32"})]}),e.jsx("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4",children:Array.from({length:4}).map((a,i)=>e.jsx(fe,{},i))})]})}function qe(){return e.jsx(le,{featureName:"Teams",children:e.jsx(ve,{})})}export{qe as component};
@@ -0,0 +1 @@
1
+ import{j as t,x as n}from"./index-DqvmWes8.js";function a({className:e,type:i,...r}){return t.jsx("input",{type:i,"data-slot":"input",className:n("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}export{a as I};
@@ -0,0 +1,6 @@
1
+ import{c as e}from"./index-DqvmWes8.js";/**
2
+ * @license lucide-react v0.400.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 r=e("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);export{r as L};
@@ -0,0 +1,6 @@
1
+ import{c as e}from"./index-DqvmWes8.js";/**
2
+ * @license lucide-react v0.400.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 a=e("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);export{a as P};
@@ -0,0 +1,6 @@
1
+ import{c}from"./index-DqvmWes8.js";/**
2
+ * @license lucide-react v0.400.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 a=c("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);export{a as R};
@@ -0,0 +1 @@
1
+ import{r as s,j as h,I as se,J as T,K as ce,P as O,N as ae,O as C,Q as P,R as ie,x as F}from"./index-DqvmWes8.js";function de(e,[o,r]){return Math.min(r,Math.max(o,e))}var ue=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],L=ue.reduce((e,o)=>{const r=se(`Primitive.${o}`),l=s.forwardRef((t,n)=>{const{asChild:c,...a}=t,i=c?r:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(i,{...a,ref:n})});return l.displayName=`Primitive.${o}`,{...e,[o]:l}},{});function fe(e,o){return s.useReducer((r,l)=>o[r][l]??r,e)}var U="ScrollArea",[$]=ae(U),[he,p]=$(U),q=s.forwardRef((e,o)=>{const{__scopeScrollArea:r,type:l="hover",dir:t,scrollHideDelay:n=600,...c}=e,[a,i]=s.useState(null),[f,d]=s.useState(null),[b,u]=s.useState(null),[S,m]=s.useState(null),[A,X]=s.useState(null),[x,_]=s.useState(0),[Y,D]=s.useState(0),[j,y]=s.useState(!1),[N,W]=s.useState(!1),v=T(o,R=>i(R)),w=ce(t);return h.jsx(he,{scope:r,type:l,dir:w,scrollHideDelay:n,scrollArea:a,viewport:f,onViewportChange:d,content:b,onContentChange:u,scrollbarX:S,onScrollbarXChange:m,scrollbarXEnabled:j,onScrollbarXEnabledChange:y,scrollbarY:A,onScrollbarYChange:X,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:_,onCornerHeightChange:D,children:h.jsx(L.div,{dir:w,...c,ref:v,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":Y+"px",...e.style}})})});q.displayName=U;var J="ScrollAreaViewport",K=s.forwardRef((e,o)=>{const{__scopeScrollArea:r,children:l,nonce:t,...n}=e,c=p(J,r),a=s.useRef(null),i=T(o,a,c.onViewportChange);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),h.jsx(L.div,{"data-radix-scroll-area-viewport":"",...n,ref:i,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style},children:h.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=s.forwardRef((e,o)=>{const{forceMount:r,...l}=e,t=p(g,e.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:c}=t,a=e.orientation==="horizontal";return s.useEffect(()=>(a?n(!0):c(!0),()=>{a?n(!1):c(!1)}),[a,n,c]),t.type==="hover"?h.jsx(be,{...l,ref:o,forceMount:r}):t.type==="scroll"?h.jsx(Se,{...l,ref:o,forceMount:r}):t.type==="auto"?h.jsx(G,{...l,ref:o,forceMount:r}):t.type==="always"?h.jsx(V,{...l,ref:o}):null});Q.displayName=g;var be=s.forwardRef((e,o)=>{const{forceMount:r,...l}=e,t=p(g,e.__scopeScrollArea),[n,c]=s.useState(!1);return s.useEffect(()=>{const a=t.scrollArea;let i=0;if(a){const f=()=>{window.clearTimeout(i),c(!0)},d=()=>{i=window.setTimeout(()=>c(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",f),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(i),a.removeEventListener("pointerenter",f),a.removeEventListener("pointerleave",d)}}},[t.scrollArea,t.scrollHideDelay]),h.jsx(O,{present:r||n,children:h.jsx(G,{"data-state":n?"visible":"hidden",...l,ref:o})})}),Se=s.forwardRef((e,o)=>{const{forceMount:r,...l}=e,t=p(g,e.__scopeScrollArea),n=e.orientation==="horizontal",c=M(()=>i("SCROLL_END"),100),[a,i]=fe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return s.useEffect(()=>{if(a==="idle"){const f=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,t.scrollHideDelay,i]),s.useEffect(()=>{const f=t.viewport,d=n?"scrollLeft":"scrollTop";if(f){let b=f[d];const u=()=>{const S=f[d];b!==S&&(i("SCROLL"),c()),b=S};return f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[t.viewport,n,i,c]),h.jsx(O,{present:r||a!=="hidden",children:h.jsx(V,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:o,onPointerEnter:C(e.onPointerEnter,()=>i("POINTER_ENTER")),onPointerLeave:C(e.onPointerLeave,()=>i("POINTER_LEAVE"))})})}),G=s.forwardRef((e,o)=>{const r=p(g,e.__scopeScrollArea),{forceMount:l,...t}=e,[n,c]=s.useState(!1),a=e.orientation==="horizontal",i=M(()=>{if(r.viewport){const f=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;c(a?f:d)}},10);return E(r.viewport,i),E(r.content,i),h.jsx(O,{present:l||n,children:h.jsx(V,{"data-state":n?"visible":"hidden",...t,ref:o})})}),V=s.forwardRef((e,o)=>{const{orientation:r="vertical",...l}=e,t=p(g,e.__scopeScrollArea),n=s.useRef(null),c=s.useRef(0),[a,i]=s.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=te(a.viewport,a.content),d={...l,sizes:a,onSizesChange:i,hasThumb:f>0&&f<1,onThumbChange:u=>n.current=u,onThumbPointerUp:()=>c.current=0,onThumbPointerDown:u=>c.current=u};function b(u,S){return xe(u,c.current,a,S)}return r==="horizontal"?h.jsx(ve,{...d,ref:o,onThumbPositionChange:()=>{if(t.viewport&&n.current){const u=t.viewport.scrollLeft,S=k(u,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:u=>{t.viewport&&(t.viewport.scrollLeft=u)},onDragScroll:u=>{t.viewport&&(t.viewport.scrollLeft=b(u,t.dir))}}):r==="vertical"?h.jsx(me,{...d,ref:o,onThumbPositionChange:()=>{if(t.viewport&&n.current){const u=t.viewport.scrollTop,S=k(u,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:u=>{t.viewport&&(t.viewport.scrollTop=u)},onDragScroll:u=>{t.viewport&&(t.viewport.scrollTop=b(u))}}):null}),ve=s.forwardRef((e,o)=>{const{sizes:r,onSizesChange:l,...t}=e,n=p(g,e.__scopeScrollArea),[c,a]=s.useState(),i=s.useRef(null),f=T(o,i,n.onScrollbarXChange);return s.useEffect(()=>{i.current&&a(getComputedStyle(i.current))},[i]),h.jsx(ee,{"data-orientation":"horizontal",...t,ref:f,sizes:r,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,b)=>{if(n.viewport){const u=n.viewport.scrollLeft+d.deltaX;e.onWheelScroll(u),le(u,b)&&d.preventDefault()}},onResize:()=>{i.current&&n.viewport&&c&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:i.current.clientWidth,paddingStart:z(c.paddingLeft),paddingEnd:z(c.paddingRight)}})}})}),me=s.forwardRef((e,o)=>{const{sizes:r,onSizesChange:l,...t}=e,n=p(g,e.__scopeScrollArea),[c,a]=s.useState(),i=s.useRef(null),f=T(o,i,n.onScrollbarYChange);return s.useEffect(()=>{i.current&&a(getComputedStyle(i.current))},[i]),h.jsx(ee,{"data-orientation":"vertical",...t,ref:f,sizes:r,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,b)=>{if(n.viewport){const u=n.viewport.scrollTop+d.deltaY;e.onWheelScroll(u),le(u,b)&&d.preventDefault()}},onResize:()=>{i.current&&n.viewport&&c&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:i.current.clientHeight,paddingStart:z(c.paddingTop),paddingEnd:z(c.paddingBottom)}})}})}),[pe,Z]=$(g),ee=s.forwardRef((e,o)=>{const{__scopeScrollArea:r,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:c,onThumbPointerDown:a,onThumbPositionChange:i,onDragScroll:f,onWheelScroll:d,onResize:b,...u}=e,S=p(g,r),[m,A]=s.useState(null),X=T(o,v=>A(v)),x=s.useRef(null),_=s.useRef(""),Y=S.viewport,D=l.content-l.viewport,j=P(d),y=P(i),N=M(b,10);function W(v){if(x.current){const w=v.clientX-x.current.left,R=v.clientY-x.current.top;f({x:w,y:R})}}return s.useEffect(()=>{const v=w=>{const R=w.target;(m==null?void 0:m.contains(R))&&j(w,D)};return document.addEventListener("wheel",v,{passive:!1}),()=>document.removeEventListener("wheel",v,{passive:!1})},[Y,m,D,j]),s.useEffect(y,[l,y]),E(m,N),E(S.content,N),h.jsx(pe,{scope:r,scrollbar:m,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(c),onThumbPositionChange:y,onThumbPointerDown:P(a),children:h.jsx(L.div,{...u,ref:X,style:{position:"absolute",...u.style},onPointerDown:C(e.onPointerDown,v=>{v.button===0&&(v.target.setPointerCapture(v.pointerId),x.current=m.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(v))}),onPointerMove:C(e.onPointerMove,W),onPointerUp:C(e.onPointerUp,v=>{const w=v.target;w.hasPointerCapture(v.pointerId)&&w.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=_.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),H="ScrollAreaThumb",re=s.forwardRef((e,o)=>{const{forceMount:r,...l}=e,t=Z(H,e.__scopeScrollArea);return h.jsx(O,{present:r||t.hasThumb,children:h.jsx(we,{ref:o,...l})})}),we=s.forwardRef((e,o)=>{const{__scopeScrollArea:r,style:l,...t}=e,n=p(H,r),c=Z(H,r),{onThumbPositionChange:a}=c,i=T(o,b=>c.onThumbChange(b)),f=s.useRef(void 0),d=M(()=>{f.current&&(f.current(),f.current=void 0)},100);return s.useEffect(()=>{const b=n.viewport;if(b){const u=()=>{if(d(),!f.current){const S=Pe(b,a);f.current=S,a()}};return a(),b.addEventListener("scroll",u),()=>b.removeEventListener("scroll",u)}},[n.viewport,d,a]),h.jsx(L.div,{"data-state":c.hasThumb?"visible":"hidden",...t,ref:i,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(e.onPointerDownCapture,b=>{const S=b.target.getBoundingClientRect(),m=b.clientX-S.left,A=b.clientY-S.top;c.onThumbPointerDown({x:m,y:A})}),onPointerUp:C(e.onPointerUp,c.onThumbPointerUp)})});re.displayName=H;var B="ScrollAreaCorner",oe=s.forwardRef((e,o)=>{const r=p(B,e.__scopeScrollArea),l=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&l?h.jsx(ge,{...e,ref:o}):null});oe.displayName=B;var ge=s.forwardRef((e,o)=>{const{__scopeScrollArea:r,...l}=e,t=p(B,r),[n,c]=s.useState(0),[a,i]=s.useState(0),f=!!(n&&a);return E(t.scrollbarX,()=>{var b;const d=((b=t.scrollbarX)==null?void 0:b.offsetHeight)||0;t.onCornerHeightChange(d),i(d)}),E(t.scrollbarY,()=>{var b;const d=((b=t.scrollbarY)==null?void 0:b.offsetWidth)||0;t.onCornerWidthChange(d),c(d)}),f?h.jsx(L.div,{...l,ref:o,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function z(e){return e?parseInt(e,10):0}function te(e,o){const r=e/o;return isNaN(r)?0:r}function I(e){const o=te(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,l=(e.scrollbar.size-r)*o;return Math.max(l,18)}function xe(e,o,r,l="ltr"){const t=I(r),n=t/2,c=o||n,a=t-c,i=r.scrollbar.paddingStart+c,f=r.scrollbar.size-r.scrollbar.paddingEnd-a,d=r.content-r.viewport,b=l==="ltr"?[0,d]:[d*-1,0];return ne([i,f],b)(e)}function k(e,o,r="ltr"){const l=I(o),t=o.scrollbar.paddingStart+o.scrollbar.paddingEnd,n=o.scrollbar.size-t,c=o.content-o.viewport,a=n-l,i=r==="ltr"?[0,c]:[c*-1,0],f=de(e,i);return ne([0,c],[0,a])(f)}function ne(e,o){return r=>{if(e[0]===e[1]||o[0]===o[1])return o[0];const l=(o[1]-o[0])/(e[1]-e[0]);return o[0]+l*(r-e[0])}}function le(e,o){return e>0&&e<o}var Pe=(e,o=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},l=0;return(function t(){const n={left:e.scrollLeft,top:e.scrollTop},c=r.left!==n.left,a=r.top!==n.top;(c||a)&&o(),r=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function M(e,o){const r=P(e),l=s.useRef(0);return s.useEffect(()=>()=>window.clearTimeout(l.current),[]),s.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(r,o)},[r,o])}function E(e,o){const r=P(o);ie(()=>{let l=0;if(e){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(r)});return t.observe(e),()=>{window.cancelAnimationFrame(l),t.unobserve(e)}}},[e,r])}var Ce=q,Re=K,Ee=oe;function Le({className:e,children:o,...r}){return h.jsxs(Ce,{"data-slot":"scroll-area",className:F("relative",e),...r,children:[h.jsx(Re,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:o}),h.jsx(Te,{}),h.jsx(Ee,{})]})}function Te({className:e,orientation:o="vertical",...r}){return h.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:o,className:F("flex touch-none p-px transition-colors select-none",o==="vertical"&&"h-full w-2.5 border-l border-l-transparent",o==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...r,children:h.jsx(re,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}export{Le as S};
@@ -0,0 +1,6 @@
1
+ import{c as e}from"./index-DqvmWes8.js";/**
2
+ * @license lucide-react v0.400.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 a=e("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);export{a as S};
@@ -0,0 +1 @@
1
+ var R=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||R("Cannot "+s);var e=(i,t,s)=>(E(i,t,"read from private field"),s?s.call(i):t.get(i)),m=(i,t,s)=>t.has(i)?R("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),p=(i,t,s,r)=>(E(i,t,"write to private field"),r?r.call(i,s):t.set(i,s),s),y=(i,t,s)=>(E(i,t,"access private method"),s);import{aa as U,ab as k,ac as j,ad as q,ae as P,n as L,r as v,af as A,ag as D}from"./index-DqvmWes8.js";var a,c,o,h,n,C,S,w,I=(w=class extends U{constructor(t,s){super();m(this,n);m(this,a);m(this,c);m(this,o);m(this,h);p(this,a,t),this.setOptions(s),this.bindMethods(),y(this,n,C).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=e(this,a).defaultMutationOptions(t),k(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&j(s.mutationKey)!==j(this.options.mutationKey)?this.reset():((r=e(this,o))==null?void 0:r.state.status)==="pending"&&e(this,o).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=e(this,o))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,n,C).call(this),y(this,n,S).call(this,t)}getCurrentResult(){return e(this,c)}reset(){var t;(t=e(this,o))==null||t.removeObserver(this),p(this,o,void 0),y(this,n,C).call(this),y(this,n,S).call(this)}mutate(t,s){var r;return p(this,h,s),(r=e(this,o))==null||r.removeObserver(this),p(this,o,e(this,a).getMutationCache().build(e(this,a),this.options)),e(this,o).addObserver(this),e(this,o).execute(t)}},a=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakMap,n=new WeakSet,C=function(){var s;const t=((s=e(this,o))==null?void 0:s.state)??q();p(this,c,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},S=function(t){P.batch(()=>{var s,r,u,f,d,O,x,K;if(e(this,h)&&this.hasListeners()){const b=e(this,c).variables,g=e(this,c).context,M={client:e(this,a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,h)).onSuccess)==null||r.call(s,t.data,b,g,M)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,b,g,M)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,h)).onError)==null||O.call(d,t.error,b,g,M)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,b,g,M)}catch(l){Promise.reject(l)}}}this.listeners.forEach(b=>{b(e(this,c))})})},w);function z(i,t){const s=L(),[r]=v.useState(()=>new I(s,i));v.useEffect(()=>{r.setOptions(i)},[r,i]);const u=v.useSyncExternalStore(v.useCallback(d=>r.subscribe(P.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=v.useCallback((d,O)=>{r.mutate(d,O).catch(A)},[r]);if(u.error&&D(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{z as u};
@@ -0,0 +1,11 @@
1
+ import{c as e}from"./index-DqvmWes8.js";/**
2
+ * @license lucide-react v0.400.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 c=e("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
7
+ * @license lucide-react v0.400.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 s=e("UserMinus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);export{c as P,s as U};
@@ -0,0 +1,6 @@
1
+ import{c as f}from"./index-DqvmWes8.js";/**
2
+ * @license lucide-react v0.400.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 u=f("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),g={online:{label:"Online",dot:"bg-emerald-500",variant:"default"},offline:{label:"Offline",dot:"bg-zinc-400 dark:bg-zinc-500",variant:"secondary"},busy:{label:"Busy",dot:"bg-amber-500",variant:"outline"},idle:{label:"Idle",dot:"bg-sky-400",variant:"outline"}};function b(e){const t=Date.now(),n=new Date(e).getTime(),o=t-n;if(o<0)return"just now";const a=Math.floor(o/1e3);if(a<60)return`${a}s ago`;const r=Math.floor(a/60);if(r<60)return`${r}m ago`;const s=Math.floor(r/60);if(s<24)return`${s}h ago`;const i=Math.floor(s/24);return i<30?`${i}d ago`:`${Math.floor(i/30)}mo ago`}function d(e){const t=e.replace(/([a-z])([A-Z])/g,"$1 $2").split(/[\s\-_]+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].substring(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}const c=["#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e","#ef4444","#f97316","#f59e0b","#eab308","#84cc16","#22c55e","#10b981","#14b8a6","#06b6d4","#0ea5e9","#3b82f6","#2563eb"];function y(e){let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return c[Math.abs(t)%c.length]}function p(e,t=32){try{const n=new URL(e),o=n.host+n.pathname;return o.length>t?o.substring(0,t)+"…":o}catch{return e.length>t?e.substring(0,t)+"…":e}}export{u as T,y as a,b as f,d as g,g as s,p as t};
@@ -0,0 +1,26 @@
1
+ import{c as a}from"./index-DqvmWes8.js";/**
2
+ * @license lucide-react v0.400.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 o=a("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
7
+ * @license lucide-react v0.400.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 t=a("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
12
+ * @license lucide-react v0.400.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 p=a("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
17
+ * @license lucide-react v0.400.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 y=a("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
22
+ * @license lucide-react v0.400.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 c=a("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);export{o as C,p as F,y as G,c as W,t as a};
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en" class="dark">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>SwarmRoom</title>
8
+ <script type="module" crossorigin src="/assets/index-DqvmWes8.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-DcbqFmA_.css">
10
+ </head>
11
+ <body>
12
+ <div id="root"></div>
13
+ </body>
14
+ </html>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
2
+ <rect width="32" height="32" rx="6" fill="#6366f1"/>
3
+ <path d="M8 16C8 11.6 11.6 8 16 8s8 3.6 8 8-3.6 8-8 8" stroke="#fff" stroke-width="2.5" stroke-linecap="round"/>
4
+ <circle cx="16" cy="16" r="3" fill="#a78bfa"/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swarmroom/server",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "description": "SwarmRoom hub server - HTTP, WebSocket, MCP, and mDNS services",
6
6
  "keywords": ["swarmroom", "server", "hub", "mcp", "websocket"],
@@ -22,6 +22,7 @@
22
22
  "files": ["dist", "README.md", "LICENSE"],
23
23
  "scripts": {
24
24
  "build": "tsc",
25
+ "postbuild": "node -e \"const fs=require('fs'),p=require('path'),s=p.join(__dirname,'../web/dist'),d=p.join(__dirname,'dist/public');fs.existsSync(s)?(fs.cpSync(s,d,{recursive:true}),console.log('Web dashboard bundled')):console.log('Web dist not found, skipping')\"",
25
26
  "dev": "tsx watch src/index.ts",
26
27
  "start": "node dist/index.js",
27
28
  "test": "vitest run",
@@ -32,7 +33,7 @@
32
33
  "@hono/node-server": "^1.19.9",
33
34
  "@hono/node-ws": "^1.3.0",
34
35
  "@modelcontextprotocol/sdk": "^1.26.0",
35
- "@swarmroom/shared": "^0.1.0",
36
+ "@swarmroom/shared": "^0.2.0",
36
37
  "better-sqlite3": "^12.6.2",
37
38
  "drizzle-orm": "^0.45.1",
38
39
  "hono": "^4.11.9",