maestro-agent 0.0.2 → 0.0.3
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/web/apple-touch-icon.png +0 -0
- package/dist/web/assets/Connections-BMA04Ycg.js +11 -0
- package/dist/web/assets/GanttView-DXjh0gxg.js +49 -0
- package/dist/web/assets/Home-Ct3Ho0Qt.js +1 -0
- package/dist/web/assets/HooksCrons--0kyVJcR.js +11 -0
- package/dist/web/assets/ProjectDetail-B_IqEpFu.js +1 -0
- package/dist/web/assets/Roles-D1tIQzto.js +24 -0
- package/dist/web/assets/Settings-yts4LUmH.js +11 -0
- package/dist/web/assets/Skills-DbuNLjIV.js +12 -0
- package/dist/web/assets/Wizard-vJol8-Y4.js +11 -0
- package/dist/web/assets/WorkspaceChat-DrsLs4m2.js +56 -0
- package/dist/web/assets/WorkspaceDashboard-B9vgrd2Z.js +6 -0
- package/dist/web/assets/WorkspaceNew-DoNGYHCG.js +1 -0
- package/dist/web/assets/WorkspaceProjects-DDp3mUse.js +6 -0
- package/dist/web/assets/WorkspaceSchedules-BTjmCbYG.js +1 -0
- package/dist/web/assets/WorkspaceTasks-mPU-bhKR.js +41 -0
- package/dist/web/assets/activity-CIA8bIA4.js +6 -0
- package/dist/web/assets/addon-fit-BlxrFPDK.js +1 -0
- package/dist/web/assets/arrow-right-S7ID7nDp.js +6 -0
- package/dist/web/assets/badge-DDTUzWIi.js +1 -0
- package/dist/web/assets/circle-check-B3P1qK0Z.js +6 -0
- package/dist/web/assets/clock-f9aYZox0.js +6 -0
- package/dist/web/assets/{index-B1k33vcR.js → index-BRo4Du_s.js} +3 -3
- package/dist/web/assets/index-C7kx39S9.js +196 -0
- package/dist/web/assets/index-D6LSdZea.css +1 -0
- package/dist/web/assets/plus-BHnOxbns.js +6 -0
- package/dist/web/assets/refresh-cw-BWX04Hg3.js +6 -0
- package/dist/web/assets/save-BLbb_9xz.js +6 -0
- package/dist/web/assets/sparkles-CDr6Dw1e.js +6 -0
- package/dist/web/assets/trash-2-9-ThEdey.js +6 -0
- package/dist/web/assets/{useEventStream-DTID465I.js → useEventStream-DXt2Hmei.js} +1 -1
- package/dist/web/assets/x-DVdKPXXy.js +6 -0
- package/dist/web/assets/xterm-DYP7pi_n.css +32 -0
- package/dist/web/assets/xterm-DlVFs1Kw.js +9 -0
- package/dist/web/favicon-512.png +0 -0
- package/dist/web/favicon.png +0 -0
- package/dist/web/index.html +4 -2
- package/package.json +1 -1
- package/dist/web/assets/Connections-DV2Kql1Z.js +0 -1
- package/dist/web/assets/GanttView-CCT_rFpY.js +0 -39
- package/dist/web/assets/Home-BFbUIh2z.js +0 -1
- package/dist/web/assets/HooksCrons-ASM5-jDm.js +0 -1
- package/dist/web/assets/ProjectDetail-KZZi6IAd.js +0 -1
- package/dist/web/assets/Roles-KQ94PG3H.js +0 -4
- package/dist/web/assets/ScheduledTasks-CdJHJpEV.js +0 -1
- package/dist/web/assets/Settings-CTflMta-.js +0 -1
- package/dist/web/assets/Skills-D09W1mwX.js +0 -2
- package/dist/web/assets/Wizard-CW6B0wc3.js +0 -1
- package/dist/web/assets/WorkspaceChat-CthETL_A.js +0 -1
- package/dist/web/assets/WorkspaceDashboard-DTAesQuT.js +0 -1
- package/dist/web/assets/WorkspaceNew-Em4msIKn.js +0 -1
- package/dist/web/assets/WorkspaceProjects-Dxg2BpQy.js +0 -1
- package/dist/web/assets/WorkspaceTasks-C20mnnkP.js +0 -1
- package/dist/web/assets/index-Bk2hHz7P.css +0 -1
- package/dist/web/assets/index-Ddy5AJwx.js +0 -61
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as o,r as c,g as n,j as d}from"./index-Ddy5AJwx.js";const r="maestro_last_workspace";function l(){const e=o();return c.useEffect(()=>{n("/workspaces").then(a=>{if(a.length===0){e("/workspaces/new",{replace:!0});return}const t=localStorage.getItem(r);t&&a.some(s=>s.id===t)?e(`/space/${t}/dashboard`,{replace:!0}):(localStorage.setItem(r,a[0].id),e(`/space/${a[0].id}/dashboard`,{replace:!0}))}).catch(()=>{})},[e]),d.jsx("div",{style:{color:"#888",padding:"2rem"},children:"Loading workspace..."})}export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,j as e,g as d,b as p}from"./index-Ddy5AJwx.js";function b(){const[n,r]=a.useState([]),[s,i]=a.useState([]),[l,c]=a.useState(""),x=()=>Promise.all([d("/hooks"),d("/crons")]).then(([t,m])=>{r(t),i(m)}).catch(t=>c(t.message));a.useEffect(()=>{x()},[]);const h=()=>p("/crons/run",{}).then(x).catch(t=>c(t.message));return e.jsxs("div",{style:{padding:"1.5rem"},children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Hooks & Crons"}),e.jsx("button",{onClick:h,className:"bg-slate-800 text-white px-3 py-1.5 rounded text-sm",children:"Run due crons"})]}),l&&e.jsx("div",{className:"text-red-700 text-sm mb-4",children:l}),e.jsx(o,{title:"Hooks",rows:n}),e.jsx("div",{className:"mt-6",children:e.jsx(o,{title:"Crons",rows:s})})]})}function o({title:n,rows:r}){return e.jsxs("section",{className:"bg-white rounded-lg border border-gray-200 shadow-sm overflow-hidden",children:[e.jsx("h2",{className:"font-semibold px-4 py-3 border-b border-gray-200",children:n}),e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-gray-50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-4 py-2",children:"Scope"}),e.jsx("th",{className:"text-left px-4 py-2",children:"Trigger"}),e.jsx("th",{className:"text-left px-4 py-2",children:"When"}),e.jsx("th",{className:"text-left px-4 py-2",children:"Action"}),e.jsx("th",{className:"text-left px-4 py-2",children:"Enabled"})]})}),e.jsx("tbody",{children:r.map(s=>e.jsxs("tr",{className:"border-t border-gray-100",children:[e.jsxs("td",{className:"px-4 py-2",children:[s.scope,":",s.scope_id]}),e.jsx("td",{className:"px-4 py-2",children:s.event||s.cron_expr}),e.jsx("td",{className:"px-4 py-2 text-gray-500",children:s.when_expr||"-"}),e.jsx("td",{className:"px-4 py-2 text-gray-600 max-w-xl truncate",children:s.action}),e.jsx("td",{className:"px-4 py-2",children:s.enabled?"yes":"no"})]},s.id))})]}),r.length===0&&e.jsx("p",{className:"p-4 text-sm text-gray-500",children:"No bindings."})]})}export{b as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as E,u as C,r,j as e,g as c,p as $}from"./index-Ddy5AJwx.js";import{G as P}from"./GanttView-CCT_rFpY.js";import{u as T}from"./useEventStream-DTID465I.js";function G(){const{id:s}=E(),j=C(),[i,d]=r.useState(null),[m,y]=r.useState([]),[v,N]=r.useState([]),[x,u]=r.useState(""),[g,o]=r.useState(""),[k,h]=r.useState(!1),[l,p]=r.useState("board"),{lastEvent:f}=T("task.*,session.*"),n=r.useRef(null),b=()=>{s&&Promise.all([c(`/projects/${s}`),c(`/tasks?project_id=${s}`),c(`/tasks/workflow/statuses?project_id=${s}`)]).then(([t,a,S])=>{d(t),o(t.workdir||""),y(a),N(S)}).catch(t=>u(t.message))};r.useEffect(()=>{b()},[s]),r.useEffect(()=>{if(f)return n.current&&clearTimeout(n.current),n.current=setTimeout(b,300),()=>{n.current&&clearTimeout(n.current)}},[f,s]);const w=()=>{s&&(h(!0),$(`/projects/${s}`,{workdir:g.trim()||null}).then(t=>{d(t),o(t.workdir||"")}).catch(t=>u(t.message)).finally(()=>h(!1)))};return x?e.jsx("div",{className:"text-red-700 text-sm",children:x}):i?e.jsxs("div",{style:{padding:"1rem",height:"100%",display:"flex",flexDirection:"column"},children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("button",{onClick:()=>j(-1),className:"text-sm text-blue-600 hover:underline",children:"← Back"}),e.jsx("h1",{className:"text-2xl font-bold mt-2",children:i.name}),e.jsx("p",{className:"text-sm text-gray-500",children:i.status})]}),e.jsxs("div",{className:"mb-4 border border-gray-200 rounded bg-white p-3",children:[e.jsx("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:"Project workdir"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{value:g,onChange:t=>o(t.target.value),placeholder:"Use agent workspace",className:"border border-gray-300 rounded px-3 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 flex-1"}),e.jsx("button",{onClick:w,disabled:k,className:"bg-slate-800 text-white px-3 py-1.5 rounded text-sm hover:bg-slate-900 disabled:opacity-60",children:"Save"})]})]}),e.jsxs("div",{className:"flex gap-1 mb-4",children:[e.jsx("button",{onClick:()=>p("board"),className:`px-3 py-1 text-sm rounded ${l==="board"?"bg-slate-800 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:"Board"}),e.jsx("button",{onClick:()=>p("gantt"),className:`px-3 py-1 text-sm rounded ${l==="gantt"?"bg-slate-800 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:"Gantt"})]}),l==="board"&&e.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:"repeat(auto-fit, minmax(180px, 1fr))"},children:v.map(t=>e.jsxs("section",{className:"bg-gray-50 rounded-lg border border-gray-200 p-3",children:[e.jsx("h2",{className:"font-semibold text-sm uppercase tracking-wide text-gray-600 mb-3",children:t.label||t.id}),e.jsxs("div",{className:"space-y-2",children:[m.filter(a=>a.status===t.id).map(a=>e.jsxs("article",{className:"bg-white rounded border border-gray-200 p-3 shadow-sm",children:[e.jsx("div",{className:"font-medium text-sm",children:a.title}),e.jsx("div",{className:"text-xs text-gray-500 mt-1",children:a.assignee_agent_id||"unassigned"})]},a.id)),m.filter(a=>a.status===t.id).length===0&&e.jsx("p",{className:"text-xs text-gray-400",children:"No tasks"})]})]},t.id))}),l==="gantt"&&s&&i&&e.jsx("div",{className:"flex-1 min-h-0",style:{minHeight:"400px"},children:e.jsx(P,{workspaceId:i.workspace_id,projectFilter:s})})]}):e.jsx("p",{className:"text-gray-500 text-sm",children:"Loading..."})}export{G as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B1k33vcR.js","assets/index-Ddy5AJwx.js","assets/index-Bk2hHz7P.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{f as J,r as a,j as e,g as u,b as B,e as K,_ as Q}from"./index-Ddy5AJwx.js";import{u as U}from"./useEventStream-DTID465I.js";const X=a.lazy(()=>Q(()=>import("./index-B1k33vcR.js"),__vite__mapDeps([0,1,2])));function Y(r){const o=r.match(/^---\s*\n([\s\S]*?)\n---/);if(!o)return null;const c=o[1].match(/^extends:\s*(.+)$/m);return c?c[1].trim():null}function te(){const{id:r}=J(),[o,S]=a.useState([]),[c,D]=a.useState([]),[O,V]=a.useState([]),[w,i]=a.useState(""),[n,p]=a.useState(null),[h,g]=a.useState(""),[z,C]=a.useState(""),[R,_]=a.useState(!1),[b,P]=a.useState(!1),[y,E]=a.useState(!1),[m,k]=a.useState(""),[f,$]=a.useState(""),[j,A]=a.useState(""),[F,H]=a.useState(1),[v,M]=a.useState(""),{lastEvent:x}=U("role.*,agent.*"),d=()=>{const t=r?`/workspaces/${r}/roles`:"/roles";return Promise.all([u(t),u("/agents"),u("/runtimes")]).then(([s,l,N])=>{S(s),D(l),V(N),!v&&N.length>0&&M(N[0].id)}).catch(s=>i(s.message))};a.useEffect(()=>{d(),p(null)},[r]),a.useEffect(()=>{x&&(!x.type.startsWith("role.")&&!x.type.startsWith("agent.")||d())},[x,r]);const L=()=>{(r?d():B("/roles/reload",{}).then(()=>d())).catch(s=>i(s.message))},T=t=>{if(n===t){p(null);return}p(t),P(!1);const s=o.find(l=>l.id===t);if(!(s!=null&&s.role_md_path)){g(`# ${(s==null?void 0:s.name)||t}
|
|
3
|
-
|
|
4
|
-
No role.md file is attached to this role yet.`),C("");return}u(`/roles/${t}/content`).then(l=>{g(l.content),C(l.full_prompt)}).catch(l=>i(l.message))},q=()=>{n&&(_(!0),K(`/roles/${n}/content`,{content:h}).then(()=>d()).catch(t=>i(t.message)).finally(()=>_(!1)))},G=async t=>{if(t.preventDefault(),!(!r||!m.trim()||y)){E(!0),i("");try{await B(`/workspaces/${r}/roles`,{name:m.trim(),runtime_id:v||null,capabilities:f?f.split(",").map(s=>s.trim()).filter(Boolean):[],preferred_runtimes:j?j.split(",").map(s=>s.trim()).filter(Boolean):[],headcount:Math.max(1,Number(F||1))}),k(""),$(""),A(""),H(1),d()}catch(s){i(s.message)}finally{E(!1)}}},W=n?Y(h):null,I=a.useMemo(()=>n?c.filter(t=>t.role_id===n&&t.status!=="offline"):[],[c,n]);return e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:r?"Workspace Roles":"Roles"}),e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Role is the primary object. Agents are attached execution instances."})]}),e.jsx("button",{onClick:L,className:"bg-blue-600 text-white px-3 py-1.5 rounded text-sm hover:bg-blue-700",children:"Reload role.md"})]}),w&&e.jsx("div",{className:"text-red-700 text-sm",children:w}),r&&e.jsxs("form",{onSubmit:G,className:"bg-white border border-gray-200 rounded-lg p-4 space-y-3 shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("h2",{className:"text-sm font-semibold text-gray-800",children:"Create Role"}),e.jsxs("span",{className:"text-xs text-gray-400",children:["1 role ","->"," 1 agent today"]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-3",children:[e.jsx("input",{value:m,onChange:t=>k(t.target.value),placeholder:"Role name",className:"border border-gray-300 rounded px-3 py-2 text-sm"}),e.jsx("input",{value:f,onChange:t=>$(t.target.value),placeholder:"Role capabilities, comma separated",className:"border border-gray-300 rounded px-3 py-2 text-sm"}),e.jsx("select",{value:v,onChange:t=>M(t.target.value),className:"border border-gray-300 rounded px-3 py-2 text-sm",children:O.map(t=>e.jsxs("option",{value:t.id,children:[t.type," / ",t.id]},t.id))}),e.jsx("input",{type:"number",min:1,value:F,onChange:t=>H(Number(t.target.value||1)),className:"border border-gray-300 rounded px-3 py-2 text-sm"})]}),e.jsx("input",{value:j,onChange:t=>A(t.target.value),placeholder:"Preferred runtimes, comma separated",className:"w-full border border-gray-300 rounded px-3 py-2 text-sm"}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{disabled:y||!m.trim(),className:"bg-slate-900 text-white px-4 py-2 rounded text-sm disabled:opacity-50",children:y?"Creating...":"Create Role"})})]}),e.jsx("div",{className:"bg-white rounded-lg border border-gray-200 shadow-sm overflow-hidden",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left px-4 py-2",children:"Role"}),e.jsx("th",{className:"text-left px-4 py-2",children:"Version"}),e.jsx("th",{className:"text-left px-4 py-2",children:"Capabilities"}),e.jsx("th",{className:"text-left px-4 py-2",children:"Headcount"}),e.jsx("th",{className:"text-left px-4 py-2",children:"Path"})]})}),e.jsx("tbody",{children:o.map(t=>e.jsxs(e.Fragment,{children:[e.jsxs("tr",{onClick:()=>T(t.id),className:`border-b border-gray-100 cursor-pointer hover:bg-gray-50 ${n===t.id?"bg-blue-50":""}`,children:[e.jsx("td",{className:"px-4 py-2 font-medium",children:t.name||t.id}),e.jsx("td",{className:"px-4 py-2 text-gray-600",children:t.version||"-"}),e.jsx("td",{className:"px-4 py-2 text-gray-600",children:t.capabilities_json||"[]"}),e.jsx("td",{className:"px-4 py-2 text-gray-600",children:t.headcount??1}),e.jsx("td",{className:"px-4 py-2 text-gray-500",children:t.role_md_path||"-"})]},t.id),n===t.id&&e.jsx("tr",{children:e.jsxs("td",{colSpan:5,className:"px-4 py-4 bg-gray-50 border-b border-gray-200 space-y-4",children:[W&&e.jsxs("div",{className:"text-xs text-gray-500",children:[e.jsx("span",{className:"font-medium text-gray-700",children:"Inheritance:"})," ",t.name||t.id," → ",W]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-semibold text-gray-800 mb-2",children:"Attached Agents"}),e.jsxs("div",{className:"space-y-2",children:[I.map(s=>e.jsx("div",{className:"flex items-center justify-between rounded border border-gray-200 bg-white px-3 py-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-gray-800",children:s.name}),e.jsxs("div",{className:"text-xs text-gray-500",children:[s.status," · ",s.runtime_id||"no runtime"]})]})},s.id)),I.length===0&&e.jsx("div",{className:"text-sm text-gray-400",children:"No active agents yet"})]})]}),e.jsx(a.Suspense,{fallback:e.jsx("div",{className:"h-64 bg-gray-100 animate-pulse rounded"}),children:e.jsx(X,{height:"400px",language:"markdown",theme:"vs-dark",value:h,onChange:s=>g(s||""),options:{minimap:{enabled:!1},wordWrap:"on"}})}),e.jsxs("div",{className:"mt-3 flex items-center gap-3",children:[e.jsx("button",{onClick:q,disabled:R,className:"bg-blue-600 text-white px-4 py-1.5 rounded text-sm hover:bg-blue-700 disabled:opacity-50",children:R?"Saving...":"Save"}),e.jsx("button",{onClick:()=>P(!b),className:"text-sm text-blue-600 hover:text-blue-800",children:b?"Hide Full Prompt Preview":"Full Prompt Preview"})]}),b&&e.jsx("textarea",{className:"w-full h-48 font-mono text-sm border border-gray-300 rounded p-3 mt-3 bg-gray-100 text-gray-700",value:z,readOnly:!0})]})},`${t.id}-detail`)]}))})]})})]})}export{te as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as F,r as d,j as t,g as b,p as M,b as j,d as B}from"./index-Ddy5AJwx.js";const _={name:"",task_title:"",task_description:"",project_id:"",schedule_type:"once",schedule_expr:"",assignee_role_id:"",enabled:!0};function G(){const{id:a}=F(),[n,c]=d.useState([]),[p,C]=d.useState([]),[g,$]=d.useState([]),[s,l]=d.useState(_),[f,o]=d.useState(""),[E,N]=d.useState(!0),[v,k]=d.useState(!1),q=d.useMemo(()=>s.schedule_type==="once"?String(Date.now()+3600*1e3):s.schedule_type==="interval"?"3600000":"0 9 * * *",[s.schedule_type]),x=()=>{a&&(N(!0),Promise.all([b(`/scheduled-tasks?workspace_id=${a}`),b(`/workspaces/${a}/projects`),b(`/workspaces/${a}/roles`)]).then(([e,r,h])=>{c(e),C(r),$(h),l(i=>{var m,S;return{...i,project_id:i.project_id||((m=r[0])==null?void 0:m.id)||"",assignee_role_id:i.assignee_role_id||((S=h[0])==null?void 0:S.id)||""}}),o("")}).catch(e=>o(e.message)).finally(()=>N(!1)))};d.useEffect(()=>{x()},[a]);const D=e=>{if(e.preventDefault(),!a)return;k(!0),o("");const r={workspace_id:a,project_id:s.project_id,name:s.name,task_title:s.task_title,task_description:s.task_description,schedule_type:s.schedule_type,schedule_expr:s.schedule_expr,assignee_role_id:s.assignee_role_id,enabled:s.enabled};(s.id?M(`/scheduled-tasks/${s.id}`,r):j("/scheduled-tasks",r)).then(()=>{var i,m;return l({..._,project_id:((i=p[0])==null?void 0:i.id)||"",assignee_role_id:((m=g[0])==null?void 0:m.id)||""}),x()}).catch(i=>o(i.message)).finally(()=>k(!1))},R=e=>{l({id:e.id,name:e.name,task_title:e.task_title,task_description:e.task_description||"",project_id:e.project_id,schedule_type:e.schedule_type,schedule_expr:e.schedule_expr,assignee_role_id:e.assignee_role_id,enabled:!!e.enabled})},L=e=>{const r=e.enabled?`/scheduled-tasks/${e.id}/disable`:`/scheduled-tasks/${e.id}/enable`;j(r,{}).then(x).catch(h=>o(h.message))},P=e=>{B(`/scheduled-tasks/${e.id}`).then(x).catch(r=>o(r.message))},T=()=>{j("/scheduled-tasks/run",{}).then(x).catch(e=>o(e.message))};return E?t.jsx("div",{className:"p-6 text-sm text-gray-500",children:"Loading..."}):t.jsxs("div",{className:"p-6 h-full overflow-auto bg-gray-50",children:[t.jsxs("div",{className:"flex items-center justify-between mb-5",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Scheduled Tasks"}),t.jsx("button",{onClick:T,className:"px-3 py-1.5 rounded bg-slate-800 text-white text-sm",children:"Run due"})]}),f&&t.jsx("div",{className:"mb-4 rounded border border-red-200 bg-red-50 text-red-700 px-3 py-2 text-sm",children:f}),t.jsxs("div",{className:"grid gap-5",style:{gridTemplateColumns:"minmax(320px, 420px) minmax(0, 1fr)"},children:[t.jsxs("form",{onSubmit:D,className:"bg-white border border-gray-200 rounded-lg p-4 shadow-sm h-fit",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h2",{className:"font-semibold text-gray-900",children:s.id?"Edit Schedule":"Create Schedule"}),s.id&&t.jsx("button",{type:"button",onClick:()=>{var e,r;return l({..._,project_id:((e=p[0])==null?void 0:e.id)||"",assignee_role_id:((r=g[0])==null?void 0:r.id)||""})},className:"text-sm text-gray-500 hover:text-gray-800",children:"New"})]}),t.jsx(u,{label:"Name",children:t.jsx("input",{value:s.name,onChange:e=>l({...s,name:e.target.value}),required:!0,className:"form-input"})}),t.jsx(u,{label:"Task title",children:t.jsx("input",{value:s.task_title,onChange:e=>l({...s,task_title:e.target.value}),required:!0,className:"form-input"})}),t.jsx(u,{label:"Description",children:t.jsx("textarea",{value:s.task_description,onChange:e=>l({...s,task_description:e.target.value}),rows:3,className:"form-input resize-none"})}),t.jsx(u,{label:"Project",children:t.jsxs("select",{value:s.project_id,onChange:e=>l({...s,project_id:e.target.value}),required:!0,className:"form-input",children:[t.jsx("option",{value:"",disabled:!0,children:"Select project"}),p.map(e=>t.jsx("option",{value:e.id,children:e.name},e.id))]})}),t.jsx(u,{label:"Assign role",children:t.jsxs("select",{value:s.assignee_role_id,onChange:e=>l({...s,assignee_role_id:e.target.value}),required:!0,className:"form-input",children:[t.jsx("option",{value:"",disabled:!0,children:"Select role"}),g.map(e=>t.jsx("option",{value:e.id,children:e.name},e.id))]})}),t.jsxs(u,{label:"Schedule",children:[t.jsx("div",{className:"grid grid-cols-3 gap-1 mb-2",children:["once","interval","cron"].map(e=>t.jsx("button",{type:"button",onClick:()=>l({...s,schedule_type:e,schedule_expr:""}),className:`px-2 py-1.5 rounded text-sm ${s.schedule_type===e?"bg-slate-800 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:e},e))}),t.jsx("input",{value:s.schedule_expr,onChange:e=>l({...s,schedule_expr:e.target.value}),placeholder:q,required:!0,className:"form-input"})]}),t.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-700 mb-4",children:[t.jsx("input",{type:"checkbox",checked:s.enabled,onChange:e=>l({...s,enabled:e.target.checked})}),"Enabled"]}),t.jsx("button",{disabled:v||p.length===0||g.length===0,className:"w-full px-3 py-2 rounded bg-slate-800 text-white text-sm disabled:opacity-50",children:v?"Saving...":s.id?"Save schedule":"Create schedule"})]}),t.jsxs("section",{className:"bg-white border border-gray-200 rounded-lg shadow-sm overflow-hidden",children:[t.jsxs("table",{className:"w-full text-sm",children:[t.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:t.jsxs("tr",{children:[t.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Name"}),t.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Execution"}),t.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Role"}),t.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Status"}),t.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Last / Next"}),t.jsx("th",{className:"text-right px-4 py-2 font-medium text-gray-600",children:"Actions"})]})}),t.jsx("tbody",{children:n.map(e=>t.jsxs("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[t.jsxs("td",{className:"px-4 py-3",children:[t.jsx("div",{className:"font-medium text-gray-900",children:e.name}),t.jsx("div",{className:"text-xs text-gray-500",children:e.task_title})]}),t.jsxs("td",{className:"px-4 py-3",children:[t.jsx("div",{className:"text-gray-900",children:I(e)}),t.jsx("div",{className:"text-xs text-gray-500",children:e.project_name||e.project_id})]}),t.jsx("td",{className:"px-4 py-3 text-gray-700",children:e.assignee_role_name||e.assignee_role_id}),t.jsx("td",{className:"px-4 py-3",children:t.jsx(A,{row:e})}),t.jsxs("td",{className:"px-4 py-3 text-xs text-gray-500",children:[t.jsxs("div",{children:["Last: ",y(e.last_fired_at)]}),t.jsxs("div",{children:["Next: ",y(e.next_fire_at)]})]}),t.jsx("td",{className:"px-4 py-3",children:t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx("button",{onClick:()=>R(e),className:"action-button",children:"Edit"}),t.jsx("button",{onClick:()=>L(e),className:"action-button",children:e.enabled?"Disable":"Enable"}),t.jsx("button",{onClick:()=>P(e),className:"action-button text-red-700 hover:bg-red-50",children:"Delete"})]})})]},e.id))})]}),n.length===0&&t.jsx("div",{className:"p-8 text-center text-sm text-gray-400",children:"No scheduled tasks"})]})]})]})}function u({label:a,children:n}){return t.jsxs("label",{className:"block text-sm text-gray-700 mb-3",children:[t.jsx("span",{className:"block mb-1 font-medium",children:a}),n]})}function A({row:a}){const c=!!a.enabled?"bg-green-50 text-green-700 border-green-200":a.status==="executed"?"bg-blue-50 text-blue-700 border-blue-200":"bg-gray-50 text-gray-600 border-gray-200";return t.jsx("span",{className:`inline-flex px-2 py-0.5 rounded-full border text-xs font-medium ${c}`,children:a.status})}function I(a){return a.schedule_type==="once"?`Once at ${y(Number(a.schedule_expr))}`:a.schedule_type==="interval"?`Every ${z(Number(a.schedule_expr))}`:a.schedule_expr}function z(a){if(!Number.isFinite(a))return"-";const n=Math.round(a/6e4);if(n<60)return`${n} min`;const c=Math.round(n/60);return c<24?`${c} hr`:`${Math.round(c/24)} day`}function y(a){return a?new Date(Number(a)).toLocaleString():"-"}export{G as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,j as e,g as i,b as o,p as w}from"./index-Ddy5AJwx.js";function S(){const[p,j]=c.useState([]),[t,N]=c.useState(null),[r,x]=c.useState({}),[m,y]=c.useState(null),[h,f]=c.useState(""),[g,d]=c.useState(""),b=()=>Promise.all([i("/runtimes"),i("/ops/stats"),i("/config")]).then(([s,a,l])=>{j(s),N(a),x(l)}).catch(s=>d(s.message));c.useEffect(()=>{b()},[]);const v=s=>o(`/runtimes/${s}/healthcheck`,{}).then(b).catch(a=>d(a.message)),k=()=>o("/bridges/lark/events",{text:"/status"}).then(y).catch(s=>d(s.message)),n=(s,a)=>{w("/config",{[s]:a}).then(l=>x(l)).catch(l=>d(l.message))},_=()=>o("/ops/backup",{}).then(s=>f(s.path)).catch(s=>d(s.message));return e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Settings"}),g&&e.jsx("div",{className:"text-red-700 text-sm mb-4",children:g}),e.jsxs("section",{className:"bg-white rounded-lg border border-gray-200 p-4 mb-6",children:[e.jsx("h2",{className:"font-semibold mb-3",children:"Cost Panel"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 text-sm",children:[e.jsxs("div",{className:"border border-gray-100 rounded p-3",children:[e.jsx("div",{className:"text-gray-500",children:"Sessions"}),e.jsx("div",{className:"text-xl font-semibold",children:(t==null?void 0:t.cost.sessions)??0})]}),e.jsxs("div",{className:"border border-gray-100 rounded p-3",children:[e.jsx("div",{className:"text-gray-500",children:"Est. Tokens"}),e.jsx("div",{className:"text-xl font-semibold",children:(t==null?void 0:t.cost.estimated_tokens)??0})]}),e.jsxs("div",{className:"border border-gray-100 rounded p-3",children:[e.jsx("div",{className:"text-gray-500",children:"Est. USD"}),e.jsxs("div",{className:"text-xl font-semibold",children:["$",(t==null?void 0:t.cost.estimated_usd)??0]})]})]})]}),e.jsxs("section",{className:"bg-white rounded-lg border border-gray-200 p-4 mb-6",children:[e.jsx("h2",{className:"font-semibold mb-3",children:"Chief Agent"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("label",{className:"text-sm text-gray-600 w-32",children:"Interval (min):"}),e.jsx("input",{type:"range",min:5,max:60,value:r.chief_interval_min||"15",onChange:s=>n("chief_interval_min",s.target.value),className:"flex-1"}),e.jsx("span",{className:"text-sm font-mono w-8",children:r.chief_interval_min||"15"})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("label",{className:"text-sm text-gray-600 w-32",children:"API Key:"}),e.jsx("input",{type:"password",value:r.chief_api_key||"",onChange:s=>n("chief_api_key",s.target.value),placeholder:"sk-ant-...",className:"border border-gray-300 rounded px-2 py-1 text-sm flex-1"})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("label",{className:"text-sm text-gray-600 w-32",children:"Base URL:"}),e.jsx("input",{value:r.chief_base_url||"",onChange:s=>n("chief_base_url",s.target.value),placeholder:"https://api.anthropic.com",className:"border border-gray-300 rounded px-2 py-1 text-sm flex-1"})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("label",{className:"text-sm text-gray-600 w-32",children:"Model:"}),e.jsx("input",{value:r.chief_model||"",onChange:s=>n("chief_model",s.target.value),placeholder:"claude-sonnet-4-20250514",className:"border border-gray-300 rounded px-2 py-1 text-sm flex-1"})]})]})]}),e.jsxs("section",{className:"bg-white rounded-lg border border-gray-200 p-4 mb-6",children:[e.jsx("h2",{className:"font-semibold mb-3",children:"Agent Runtimes"}),e.jsx("div",{className:"space-y-2",children:p.map(s=>{var l,u;const a=((l=s.waterline)==null?void 0:l.utilization)??0;return e.jsxs("div",{className:"border border-gray-100 rounded p-3 text-sm",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"font-medium",children:[s.type," · ",s.transport]}),e.jsxs("div",{className:"text-gray-500",children:[s.status," · capacity ",s.capacity," · running ",((u=s.waterline)==null?void 0:u.running)??0," · ",s.target||"local"]})]}),e.jsx("button",{onClick:()=>v(s.id),className:"bg-gray-100 px-2 py-1 rounded text-xs",children:"Healthcheck"})]}),s.capacity>0&&e.jsxs("div",{className:"mt-2",children:[e.jsxs("div",{className:"flex justify-between text-xs text-gray-500 mb-1",children:[e.jsx("span",{children:"Utilization"}),e.jsxs("span",{children:[Math.round(a*100),"%"]})]}),e.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:e.jsx("div",{className:`h-2 rounded-full ${a>.8?"bg-red-500":a>.5?"bg-yellow-500":"bg-green-500"}`,style:{width:`${Math.min(100,a*100)}%`}})})]})]},s.id)})})]}),e.jsxs("section",{className:"bg-white rounded-lg border border-gray-200 p-4 mb-6",children:[e.jsx("h2",{className:"font-semibold mb-3",children:"Backup & Restore"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:_,className:"bg-slate-800 text-white px-3 py-1.5 rounded text-sm",children:"Create Backup"}),h&&e.jsxs("span",{className:"text-xs text-green-600",children:["Saved: ",h]})]})]}),e.jsxs("section",{className:"bg-white rounded-lg border border-gray-200 p-4 mb-6",children:[e.jsx("h2",{className:"font-semibold mb-3",children:"IM Bridge"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"Lark Webhook URL"}),e.jsx("input",{value:r.lark_webhook_url||"",onChange:s=>n("lark_webhook_url",s.target.value),placeholder:"https://open.larksuite.com/open-apis/bot/v2/hook/...",className:"w-full border border-gray-300 rounded px-2 py-1 text-sm"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm text-gray-600 block mb-1",children:"Telegram Bot Token"}),e.jsx("input",{value:r.telegram_bot_token||"",onChange:s=>n("telegram_bot_token",s.target.value),placeholder:"123456:ABC-DEF...",className:"w-full border border-gray-300 rounded px-2 py-1 text-sm"})]}),e.jsx("button",{onClick:k,className:"bg-blue-600 text-white px-3 py-1.5 rounded text-sm",children:"Test Lark /status"}),m&&e.jsx("pre",{className:"text-xs bg-gray-50 p-3 mt-2 overflow-auto",children:JSON.stringify(m,null,2)})]})]})]})}export{S as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as l,j as s,b as o,g as W,d as H}from"./index-Ddy5AJwx.js";const y=["claude","codex","gemini","opencode","hermes"],n={claude:"#e87040",codex:"#4a9eff",gemini:"#34a853",opencode:"#9b59b6",hermes:"#6c757d"};function K(){const[i,T]=l.useState([]),[g,_]=l.useState([]),[c,f]=l.useState("all"),[B,h]=l.useState(!1),[D,j]=l.useState(!1),[u,v]=l.useState([]),[N,w]=l.useState(!1),[S,k]=l.useState(!1),[C,r]=l.useState(""),[x,A]=l.useState(""),[I,$]=l.useState(""),[m,F]=l.useState("local"),[E,z]=l.useState(""),[p,R]=l.useState({claude:!0,codex:!1,gemini:!1,opencode:!1,hermes:!1}),d=()=>{Promise.all([W("/skills"),W("/skills/agents")]).then(([e,t])=>{T(e),_(t)}).catch(e=>r(e.message))};l.useEffect(()=>{d()},[]);const G=()=>{x.trim()&&o("/skills",{name:x.trim(),description:I.trim()||null,source:m,source_url:E.trim()||null,agents:p}).then(()=>{h(!1),A(""),$(""),z(""),R({claude:!0,codex:!1,gemini:!1,opencode:!1,hermes:!1}),d()}).catch(e=>r(e.message))},L=(e,t,a)=>{o(`/skills/${e}/toggle`,{agent:t,enabled:a}).then(d).catch(b=>r(b.message))},O=(e,t)=>{confirm(`确认卸载 skill "${t}"? 文件将移入回收站。`)&&H(`/skills/${e}`).then(d).catch(a=>r(a.message))},P=()=>{k(!0),o("/skills/sync",{}).then(e=>{var t;(t=e.errors)!=null&&t.length&&r(e.errors.join(`
|
|
2
|
-
`)),d()}).catch(e=>r(e.message)).finally(()=>k(!1))},Z=()=>{w(!0),o("/skills/scan",{}).then(e=>{v(e),j(!0)}).catch(e=>r(e.message)).finally(()=>w(!1))},U=c==="all"?i:i.filter(e=>e.agents[c]),q=e=>i.filter(t=>t.agents[e]).length;return s.jsxs("div",{style:{padding:"1.5rem"},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1.5rem"},children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Agent Skills"}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[s.jsx("button",{onClick:P,disabled:S,className:"px-3 py-1.5 rounded text-sm border border-gray-300 text-gray-600 hover:bg-gray-50 disabled:opacity-50",children:S?"同步中...":"⟳ 全量同步"}),s.jsx("button",{onClick:Z,disabled:N,className:"px-3 py-1.5 rounded text-sm border border-gray-300 text-gray-600 hover:bg-gray-50 disabled:opacity-50",children:N?"扫描中...":"↓ 导入已有"}),s.jsx("button",{onClick:()=>h(!0),className:"bg-blue-600 text-white px-3 py-1.5 rounded text-sm hover:bg-blue-700",children:"+ 添加 Skill"})]})]}),C&&s.jsxs("div",{className:"text-red-700 text-sm mb-4 bg-red-50 border border-red-200 px-3 py-2 rounded",children:[C,s.jsx("button",{onClick:()=>r(""),className:"ml-2 text-red-400",children:"✕"})]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginBottom:"1.25rem",flexWrap:"wrap",alignItems:"center"},children:[s.jsxs("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium border ${c==="all"?"bg-gray-800 text-white border-gray-800":"bg-white text-gray-600 border-gray-300"}`,children:["已安装 ",i.length]}),y.map(e=>{const t=g.find(a=>a.name===e);return s.jsxs("button",{onClick:()=>f(e),className:`px-3 py-1 rounded-full text-xs font-medium border ${c===e?"text-white":"bg-white border-gray-300"}`,style:c===e?{background:n[e],borderColor:n[e]}:{color:n[e]},title:(t==null?void 0:t.dir)||"",children:[e.charAt(0).toUpperCase()+e.slice(1),": ",q(e)]},e)})]}),s.jsxs("div",{className:"bg-white rounded-lg border border-gray-200 divide-y divide-gray-100",children:[U.length===0&&s.jsx("div",{className:"p-8 text-center text-gray-400 text-sm",children:i.length===0?"尚未安装任何 Skill。点击「+ 添加 Skill」或「↓ 导入已有」开始。":"当前筛选无结果"}),U.map(e=>s.jsxs("div",{className:"px-4 py-3 flex items-center justify-between hover:bg-gray-50",children:[s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[s.jsx("span",{className:"font-semibold text-sm",children:e.name}),s.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${e.source==="local"?"bg-gray-100 text-gray-600":e.source==="url"?"bg-blue-50 text-blue-600":"bg-purple-50 text-purple-600"}`,children:e.source}),!e.dir_exists&&s.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-yellow-50 text-yellow-700",children:"目录缺失"})]}),e.description&&s.jsx("div",{className:"text-xs text-gray-500 mt-0.5 truncate",style:{maxWidth:"550px"},children:e.description})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",flexShrink:0},children:[y.map(t=>s.jsx("button",{onClick:()=>L(e.id,t,!e.agents[t]),style:{width:22,height:22,borderRadius:"50%",border:`2px solid ${e.agents[t]?n[t]:"#e5e7eb"}`,background:e.agents[t]?n[t]:"transparent",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",color:e.agents[t]?"#fff":"#ccc"},title:`${t}: ${e.agents[t]?"已启用":"未启用"}`,children:e.agents[t]?"✓":""},t)),s.jsx("button",{onClick:()=>O(e.id,e.name),className:"ml-2 text-xs px-2 py-1 rounded bg-red-50 text-red-600 hover:bg-red-100",children:"卸载"})]})]},e.id))]}),g.length>0&&s.jsxs("div",{className:"mt-6",children:[s.jsx("h3",{className:"text-sm font-medium text-gray-600 mb-2",children:"Agent 目录"}),s.jsx("div",{className:"bg-white rounded-lg border border-gray-200 divide-y divide-gray-100 text-xs",children:g.map(e=>s.jsxs("div",{className:"px-4 py-2 flex items-center justify-between",children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[s.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:e.available?"#22c55e":"#ef4444"}}),s.jsx("span",{className:"font-medium",style:{color:n[e.name]},children:e.name})]}),s.jsx("span",{className:"text-gray-400 font-mono",children:e.dir})]},e.name))})]}),B&&s.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.4)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},children:s.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md shadow-xl",children:[s.jsx("h3",{className:"text-lg font-semibold mb-4",children:"添加 Skill"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"名称 *"}),s.jsx("input",{value:x,onChange:e=>A(e.target.value),placeholder:"e.g. brainstorming",className:"w-full border border-gray-300 rounded px-3 py-2 text-sm",autoFocus:!0})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"描述"}),s.jsx("textarea",{value:I,onChange:e=>$(e.target.value),placeholder:"Skill 的功能描述...",rows:2,className:"w-full border border-gray-300 rounded px-3 py-2 text-sm"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"来源"}),s.jsxs("select",{value:m,onChange:e=>F(e.target.value),className:"w-full border border-gray-300 rounded px-3 py-2 text-sm",children:[s.jsx("option",{value:"local",children:"本地"}),s.jsx("option",{value:"url",children:"URL"}),s.jsx("option",{value:"zip",children:"ZIP"})]})]}),m!=="local"&&s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"来源地址"}),s.jsx("input",{value:E,onChange:e=>z(e.target.value),placeholder:m==="url"?"https://github.com/...":"/path/to/skill.zip",className:"w-full border border-gray-300 rounded px-3 py-2 text-sm"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"启用到哪些 Agent"}),s.jsx("div",{style:{display:"flex",gap:"0.75rem",flexWrap:"wrap"},children:y.map(e=>s.jsxs("label",{className:"flex items-center gap-1.5 text-xs cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:p[e],onChange:t=>R({...p,[e]:t.target.checked})}),s.jsx("span",{style:{color:n[e],fontWeight:500},children:e})]},e))})]})]}),s.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem",marginTop:"1.5rem"},children:[s.jsx("button",{onClick:()=>h(!1),className:"px-3 py-1.5 rounded text-sm text-gray-600 border border-gray-300 hover:bg-gray-50",children:"取消"}),s.jsx("button",{onClick:G,disabled:!x.trim(),className:"px-3 py-1.5 rounded text-sm bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50",children:"安装"})]})]})}),D&&s.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.4)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},children:s.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-lg shadow-xl max-h-[80vh] overflow-auto",children:[s.jsx("h3",{className:"text-lg font-semibold mb-4",children:"发现未管理的 Skills"}),u.length===0?s.jsx("p",{className:"text-sm text-gray-500",children:"所有 Agent 目录中的 Skills 均已被管理。"}):s.jsx("div",{className:"space-y-2",children:u.map((e,t)=>s.jsxs("div",{className:"border border-gray-200 rounded p-3 text-sm flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:e.name}),s.jsxs("div",{className:"text-xs text-gray-500",children:["来自 ",s.jsx("span",{style:{color:n[e.agent]||"#666"},children:e.agent})]}),e.description&&s.jsx("div",{className:"text-xs text-gray-400 mt-0.5",children:e.description})]}),s.jsx("button",{onClick:()=>{o("/skills",{name:e.name,description:e.description||null,source:"local",agents:{[e.agent]:!0}}).then(()=>{v(u.filter((a,b)=>b!==t)),d()}).catch(a=>r(a.message))},className:"text-xs px-2 py-1 rounded bg-blue-50 text-blue-600 hover:bg-blue-100 whitespace-nowrap",children:"导入"})]},t))}),s.jsx("div",{className:"mt-4 text-right",children:s.jsx("button",{onClick:()=>j(!1),className:"px-3 py-1.5 rounded text-sm text-gray-600 border border-gray-300 hover:bg-gray-50",children:"关闭"})})]})})]})}export{K as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as Q,u as X,r as n,g as C,j as s,b as j}from"./index-Ddy5AJwx.js";function Z(){var A,M;const{workspaceId:h}=Q(),G=X(),[o,m]=n.useState(1),[g,R]=n.useState([]),[N,H]=n.useState([]),[x,T]=n.useState([]),[l,y]=n.useState(h||""),[v,_]=n.useState(""),[L,$]=n.useState(""),[i,w]=n.useState(new Map),[b,B]=n.useState(""),[k,p]=n.useState(!1),[P,a]=n.useState(""),[W,E]=n.useState(!1),[F,I]=n.useState(!1),[S,O]=n.useState(null);n.useEffect(()=>{C("/workspaces").then(R).catch(e=>a(e.message)),C("/roles").then(H).catch(e=>a(e.message)),C("/runtimes").then(T).catch(e=>a(e.message))},[]),n.useEffect(()=>{h&&g.length>0&&g.find(e=>e.id===h)&&(y(h),m(2))},[h,g]);const d=g.find(e=>e.id===l),U=async()=>{if(v.trim()){p(!0);try{const e=await j("/workspaces",{name:v,goal:L});R(r=>[...r,e]),y(e.id),_(""),$(""),m(2)}catch(e){a(e.message)}finally{p(!1)}}},V=()=>{if(!l){a("Please select a workspace");return}a(""),m(2)},q=(e,r)=>{w(c=>{const t=new Map(c);return t.has(e)?t.delete(e):t.set(e,{role_id:e,runtime_id:x.length>0?x[0].id:"",headcount:r.headcount||1}),t})},z=(e,r,c)=>{w(t=>{const u=new Map(t),f=u.get(e);return f&&u.set(e,{...f,[r]:c}),u})},D=async()=>{if(l){E(!0);try{const e=await j(`/workspaces/${l}/recommend-roles`,{});w(r=>{const c=new Map(r);for(const t of e){const u=N.find(f=>f.id===t.role_id);u&&!c.has(t.role_id)&&c.set(t.role_id,{role_id:t.role_id,runtime_id:x.length>0?x[0].id:"",headcount:u.headcount||1})}return c})}catch(e){a(e.message)}finally{E(!1)}}},J=()=>{if(i.size===0){a("Please select at least one role");return}a(""),m(3)},K=async()=>{if(!b.trim()){a("Please enter a project name");return}p(!0),a("");try{const e=await j(`/workspaces/${l}/wizard`,{project_name:b,roles:Array.from(i.values())});O(e),I(!0)}catch(e){a(e.message)}finally{p(!1)}};return F&&S?s.jsx("div",{className:"max-w-lg mx-auto py-16 text-center",children:s.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-8",children:[s.jsx("div",{className:"text-4xl mb-4",children:"🚀"}),s.jsx("h2",{className:"text-xl font-bold text-green-800 mb-2",children:"Workspace Launched!"}),s.jsxs("p",{className:"text-green-700 text-sm mb-4",children:["Project ",s.jsx("span",{className:"font-semibold",children:((A=S.project)==null?void 0:A.name)||b})," created with ",s.jsx("span",{className:"font-semibold",children:((M=S.agents)==null?void 0:M.length)||0})," agent(s)."]}),s.jsx("button",{onClick:()=>G("/runtimes"),className:"bg-green-600 text-white px-4 py-2 rounded text-sm hover:bg-green-700",children:"View Agent Runtimes →"})]})}):s.jsxs("div",{className:"max-w-3xl mx-auto",children:[s.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Launch Wizard"}),s.jsx("div",{className:"flex items-center mb-8",children:[1,2,3].map(e=>s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${e===o?"bg-blue-600 text-white":e<o?"bg-blue-100 text-blue-700":"bg-gray-200 text-gray-500"}`,children:e}),s.jsx("span",{className:`ml-2 text-sm ${e===o?"font-medium text-gray-900":"text-gray-500"}`,children:e===1?"Workspace":e===2?"Roles":"Launch"}),e<3&&s.jsx("div",{className:"w-12 h-px bg-gray-300 mx-3"})]},e))}),P&&s.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded mb-4 text-sm",children:P}),o===1&&s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Select a Workspace"}),s.jsx("div",{className:"space-y-2 mb-6",children:g.map(e=>s.jsxs("label",{className:`flex items-center gap-3 p-3 border rounded-lg cursor-pointer transition ${l===e.id?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"}`,children:[s.jsx("input",{type:"radio",name:"workspace",checked:l===e.id,onChange:()=>y(e.id),className:"accent-blue-600"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-sm",children:e.name}),e.goal&&s.jsx("div",{className:"text-xs text-gray-500",children:e.goal})]})]},e.id))}),s.jsxs("div",{className:"border-t border-gray-200 pt-4",children:[s.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-3",children:"Or create a new workspace"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{placeholder:"Name",value:v,onChange:e=>_(e.target.value),className:"border border-gray-300 rounded px-3 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"}),s.jsx("input",{placeholder:"Goal",value:L,onChange:e=>$(e.target.value),className:"border border-gray-300 rounded px-3 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 flex-1"}),s.jsx("button",{onClick:U,disabled:k,className:"bg-slate-800 text-white px-3 py-1.5 rounded text-sm hover:bg-slate-900 disabled:opacity-50",children:"Create & Select"})]})]}),s.jsx("div",{className:"flex justify-end mt-8",children:s.jsx("button",{onClick:V,className:"bg-blue-600 text-white px-4 py-2 rounded text-sm hover:bg-blue-700",children:"Next →"})})]}),o===2&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Choose Roles & Headcount"}),s.jsx("button",{onClick:D,disabled:W,className:"bg-purple-600 text-white px-3 py-1.5 rounded text-sm hover:bg-purple-700 disabled:opacity-50",children:W?"Recommending...":"✨ AI Recommend"})]}),s.jsx("div",{className:"space-y-3 mb-6",children:N.map(e=>{const r=i.has(e.id),c=i.get(e.id);return s.jsxs("div",{className:`border rounded-lg p-4 transition ${r?"border-blue-500 bg-blue-50":"border-gray-200"}`,children:[s.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:r,onChange:()=>q(e.id,e),className:"accent-blue-600"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-sm",children:e.name}),s.jsxs("div",{className:"text-xs text-gray-500",children:[e.version&&`v${e.version}`,e.capabilities_json&&` · Capabilities: ${e.capabilities_json}`]})]})]}),r&&c&&s.jsxs("div",{className:"mt-3 ml-7 flex gap-4 items-center",children:[s.jsxs("label",{className:"text-xs text-gray-600",children:["Runtime:",s.jsx("select",{value:c.runtime_id,onChange:t=>z(e.id,"runtime_id",t.target.value),className:"ml-1 border border-gray-300 rounded px-2 py-1 text-xs focus:outline-none focus:ring-2 focus:ring-blue-500",children:x.map(t=>s.jsxs("option",{value:t.id,children:[t.name," (",t.provider,")"]},t.id))})]}),s.jsxs("label",{className:"text-xs text-gray-600",children:["Headcount:",s.jsx("input",{type:"number",min:1,value:c.headcount,onChange:t=>z(e.id,"headcount",Math.max(1,parseInt(t.target.value)||1)),className:"ml-1 w-16 border border-gray-300 rounded px-2 py-1 text-xs focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]})]},e.id)})}),s.jsxs("div",{className:"flex justify-between mt-8",children:[s.jsx("button",{onClick:()=>{a(""),m(1)},className:"text-gray-600 px-4 py-2 rounded text-sm hover:bg-gray-100",children:"← Back"}),s.jsx("button",{onClick:J,className:"bg-blue-600 text-white px-4 py-2 rounded text-sm hover:bg-blue-700",children:"Next →"})]})]}),o===3&&s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Confirm & Launch"}),s.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-4 mb-4",children:[s.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Workspace"}),s.jsx("div",{className:"font-medium",children:d==null?void 0:d.name}),(d==null?void 0:d.goal)&&s.jsx("div",{className:"text-xs text-gray-500 mt-0.5",children:d.goal})]}),s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Project Name"}),s.jsx("input",{value:b,onChange:e=>B(e.target.value),placeholder:"Enter project name",className:"w-full border border-gray-300 rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),s.jsxs("div",{className:"mb-6",children:[s.jsxs("div",{className:"text-sm font-medium text-gray-700 mb-2",children:["Roles (",i.size,")"]}),s.jsx("div",{className:"space-y-2",children:Array.from(i.values()).map(e=>{const r=N.find(t=>t.id===e.role_id),c=x.find(t=>t.id===e.runtime_id);return s.jsxs("div",{className:"flex items-center justify-between border border-gray-200 rounded p-3 text-sm",children:[s.jsx("span",{className:"font-medium",children:(r==null?void 0:r.name)||e.role_id}),s.jsxs("span",{className:"text-gray-500",children:["Runtime: ",(c==null?void 0:c.name)||"-"," · Headcount: ",e.headcount]})]},e.role_id)})})]}),s.jsx("div",{className:"mb-4",children:s.jsx("button",{onClick:async()=>{try{await j("/templates",{name:b||"Untitled Template",roles:Array.from(i.values()),workspace_id:l}),a(""),alert("Template saved!")}catch(e){a(e.message)}},className:"text-sm text-purple-600 hover:underline",children:"💾 Save as Template"})}),s.jsxs("div",{className:"flex justify-between mt-8",children:[s.jsx("button",{onClick:()=>{a(""),m(2)},className:"text-gray-600 px-4 py-2 rounded text-sm hover:bg-gray-100",children:"← Back"}),s.jsx("button",{onClick:K,disabled:k,className:"bg-green-600 text-white px-5 py-2 rounded text-sm hover:bg-green-700 disabled:opacity-50",children:k?"Launching...":"🚀 Launch"})]})]})]})}export{Z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as n,g as v,b as J,j as e,f as W}from"./index-Ddy5AJwx.js";import{u as D}from"./useEventStream-DTID465I.js";function H(t,r){const l=r?Array.from(r):[],d=l.length>0?new Set(l):null;return t.filter(a=>a.status==="offline"?!1:d?!!a.role_id&&d.has(a.role_id):!0).map(a=>({id:a.id,name:a.name,status:a.status,role_id:a.role_id}))}function O(t){if(Array.isArray(t))return t;if(!t)return[];try{const r=JSON.parse(t);return Array.isArray(r)?r:[]}catch{return[]}}function V(t,r){const l=O(r).filter(o=>Number.isInteger(o.start)&&Number.isInteger(o.end)).sort((o,i)=>o.start-i.start);if(l.length===0)return Y(t);const d=[];let a=0;for(const o of l){const i=Math.max(0,o.start),m=Math.min(t.length,o.end);i<a||m<=i||(i>a&&d.push({type:"text",text:t.slice(a,i)}),d.push({type:"mention",text:t.slice(i,m),mention:o}),a=m)}return a<t.length&&d.push({type:"text",text:t.slice(a)}),d.length>0?d:[{type:"text",text:t}]}function Y(t){return t.split(/(@[A-Za-z0-9_-]+)/g).filter(Boolean).map(l=>l.startsWith("@")?{type:"mention",text:l,mention:{type:"role",id:l.slice(1),name:l.slice(1),token:l}}:{type:"text",text:l})}function Z(t){const[r,l]=n.useState([]),[d,a]=n.useState(!0),[o,i]=n.useState(!1),[m,y]=n.useState(""),g=n.useRef(new Set),{lastEvent:x}=D("chat.*");n.useEffect(()=>{t&&(a(!0),v(`/chat/messages?workspace_id=${t}&limit=50`).then(u=>{g.current=new Set(u.map(c=>c.id)),l(u),y("")}).catch(u=>y(u.message)).finally(()=>a(!1)))},[t]),n.useEffect(()=>{if(!x||x.type!=="chat.message")return;const u=x.payload;u.workspace_id===t&&(u.sender_type==="agent"&&i(!1),v(`/chat/messages?workspace_id=${t}&limit=50`).then(c=>{g.current=new Set(c.map(h=>h.id)),l(c)}).catch(()=>{}))},[x,t]);const p=n.useCallback(async u=>{i(!0);try{const c=await J("/chat/messages",{workspace_id:t,content:u});return g.current.has(c.id)||(g.current.add(c.id),l(h=>[...h,c])),c}catch(c){throw i(!1),c}},[t]);return{messages:r,sendMessage:p,loading:d,thinking:o,error:m}}function q({workspaceId:t}){const{messages:r,sendMessage:l,loading:d,thinking:a,error:o}=Z(t),[i,m]=n.useState(""),[y,g]=n.useState(!1),[x,p]=n.useState(!1),[u,c]=n.useState(""),[h,T]=n.useState([]),[k,K]=n.useState([]),w=n.useRef(null),C=n.useRef(null),{lastEvent:A}=D("agent.*"),b=n.useCallback(()=>Promise.all([v(`/workspaces/${t}/roles`),v("/agents")]).then(([s,f])=>{T(Array.isArray(s)?s:[]),K(Array.isArray(f)?f:[])}).catch(()=>{}),[t]);n.useEffect(()=>{b()},[b]),n.useEffect(()=>{r.length&&b()},[r.length,b]),n.useEffect(()=>{A&&b()},[A,b]);const _=n.useMemo(()=>new Set(h.map(s=>s.id)),[h]),E=n.useMemo(()=>H(k,_),[k,_]),$=n.useMemo(()=>h.filter(s=>s.name.toLowerCase()!=="chief"),[h]),j=n.useMemo(()=>$.filter(s=>s.name.toLowerCase().includes(u.toLowerCase())),[$,u]);n.useEffect(()=>{var s;(s=C.current)==null||s.scrollIntoView({behavior:"smooth"})},[r,a]);const z=s=>{const f=s.target.value;m(f);const S=s.target.selectionStart||f.length,N=f.slice(0,S).match(/@(\w*)$/);N?(p(!0),c(N[1])):(p(!1),c(""))},M=s=>{var P,B;const f=((P=w.current)==null?void 0:P.selectionStart)||i.length,S=i.slice(0,f),L=i.slice(f),N=S.replace(/@\w*$/,`@${s} `);m(N+L),p(!1),c(""),(B=w.current)==null||B.focus()},R=async()=>{const s=i.trim();if(!(!s||y)){g(!0),p(!1);try{await l(s),m("")}catch{}g(!1)}},F=s=>{if(x&&s.key==="Escape"){p(!1);return}if(x&&s.key==="Tab"&&j.length>0){s.preventDefault(),M(j[0].name);return}if(s.key==="Enter"&&!s.shiftKey){if(x&&j.length>0){s.preventDefault(),M(j[0].name);return}s.preventDefault(),R()}};return d?e.jsx("div",{className:"text-gray-500 text-sm p-4",children:"Loading chat..."}):e.jsxs("div",{className:"flex h-full gap-0",children:[e.jsxs("div",{className:"flex-1 flex flex-col border border-gray-200 rounded-l-lg bg-white min-w-0",children:[o&&e.jsx("div",{className:"px-4 py-2 bg-red-50 text-red-700 text-xs border-b border-red-200",children:o}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 min-h-0",children:[r.length===0&&e.jsx("p",{className:"text-gray-400 text-sm text-center mt-8",children:"No messages yet. Start a conversation!"}),r.map(s=>e.jsx(Q,{message:s},s.id)),a&&e.jsx(G,{}),e.jsx("div",{ref:C})]}),e.jsxs("div",{className:"border-t border-gray-200 p-3 flex gap-2 items-end relative",children:[x&&j.length>0&&e.jsxs("div",{className:"absolute bottom-full left-3 mb-1 bg-white border border-gray-200 rounded-lg shadow-lg py-1 min-w-[180px] z-10 max-h-[200px] overflow-y-auto",children:[e.jsx("div",{className:"px-3 py-1 text-[10px] text-gray-400 uppercase",children:"Mention agent"}),j.map(s=>e.jsxs("button",{onClick:()=>M(s.name),className:"w-full text-left px-3 py-1.5 text-sm hover:bg-blue-50 flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:s.name})]},s.name))]}),e.jsx("input",{ref:w,value:i,onChange:z,onKeyDown:F,placeholder:"Type a message... (@ to mention)",className:"flex-1 border border-gray-300 rounded-lg px-3 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",disabled:y}),e.jsx("button",{onClick:R,disabled:!i.trim()||y,className:"bg-blue-600 text-white px-3 py-1.5 rounded-lg text-sm hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:"Send"})]})]}),e.jsxs("div",{className:"w-48 border border-l-0 border-gray-200 rounded-r-lg bg-gray-50 p-3 flex-shrink-0",children:[e.jsx("div",{className:"text-xs font-semibold text-gray-500 uppercase mb-2",children:"Members"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0 bg-blue-500"}),e.jsx("span",{className:"text-xs text-gray-700 truncate",children:"You"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] uppercase tracking-wide text-gray-400 mb-1",children:"Agents"}),e.jsxs("div",{className:"space-y-1.5",children:[E.map(s=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0 bg-green-500"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-xs text-gray-700 truncate",children:s.name}),e.jsx("div",{className:"text-[10px] text-gray-400 truncate",children:s.status})]})]},s.id)),E.length===0&&e.jsx("div",{className:"text-xs text-gray-400",children:"No active agents yet"})]})]})]})]})]})}function G(){return e.jsx("div",{className:"flex justify-start",children:e.jsx("div",{className:"bg-gray-100 rounded-lg px-3 py-2",children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"text-xs text-gray-500",children:"Thinking"}),e.jsxs("span",{className:"flex gap-0.5",children:[e.jsx("span",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce [animation-delay:0ms]"}),e.jsx("span",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce [animation-delay:150ms]"}),e.jsx("span",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce [animation-delay:300ms]"})]})]})})})}function Q({message:t}){const r=t.sender_type==="human",l=d=>V(d,t.mentions_json).map((o,i)=>o.type==="mention"?e.jsx("button",{type:"button",title:o.mention.agent_name||o.mention.name,className:`inline-flex max-w-full align-baseline rounded px-1 py-0.5 text-xs font-semibold ${r?"bg-white/20 text-white ring-1 ring-white/30":"bg-blue-50 text-blue-700 ring-1 ring-blue-200"}`,children:o.text},i):e.jsx("span",{children:o.text},i));return e.jsx("div",{className:`flex ${r?"justify-end":"justify-start"}`,children:e.jsxs("div",{className:`max-w-[75%] rounded-lg px-3 py-2 ${r?"bg-blue-600 text-white":"bg-gray-100 text-gray-900"}`,children:[!r&&e.jsx("div",{className:"text-xs font-medium mb-0.5 opacity-70",children:t.sender_id}),e.jsx("div",{className:"text-sm whitespace-pre-wrap break-words",children:l(t.content)}),e.jsx("div",{className:`text-xs mt-1 ${r?"text-blue-200":"text-gray-400"}`,children:new Date(t.created_at).toLocaleTimeString()})]})})}function I(){const{id:t}=W();return t?e.jsx("div",{style:{height:"100%",padding:"1rem"},children:e.jsx(q,{workspaceId:t})}):null}export{I as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as j,u as p,r as l,g as u,j as e}from"./index-Ddy5AJwx.js";import{u as v}from"./useEventStream-DTID465I.js";function T(){const{id:a}=j(),i=p(),[s,h]=l.useState(null),[m,g]=l.useState([]),[b,f]=l.useState(""),{lastEvent:x}=v("task.*,project.*,session.*"),o=l.useRef(null),c=l.useCallback(()=>{a&&(u(`/workspaces/${a}`).then(t=>f(t.name)).catch(()=>{}),Promise.all([u(`/workspaces/${a}/projects`),u(`/tasks?workspace_id=${a}`)]).then(([t,n])=>{g(t),h({totalTasks:n.length,openTasks:n.filter(r=>r.status==="open").length,claimedTasks:n.filter(r=>r.status==="claimed").length,doneTasks:n.filter(r=>r.status==="done").length,blockedTasks:n.filter(r=>r.status==="blocked").length,totalProjects:t.length,totalAgents:0})}).catch(()=>{}))},[a]);return l.useEffect(()=>{c()},[c]),l.useEffect(()=>{if(x)return o.current&&clearTimeout(o.current),o.current=setTimeout(c,300),()=>{o.current&&clearTimeout(o.current)}},[x,c]),e.jsxs("div",{style:{padding:"1.5rem"},children:[e.jsx("h1",{className:"text-2xl font-bold mb-6",children:b||"Dashboard"}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[e.jsx(d,{label:"Total Tasks",value:(s==null?void 0:s.totalTasks)??0}),e.jsx(d,{label:"Open",value:(s==null?void 0:s.openTasks)??0,color:"#3b82f6"}),e.jsx(d,{label:"In Progress",value:(s==null?void 0:s.claimedTasks)??0,color:"#f59e0b"}),e.jsx(d,{label:"Done",value:(s==null?void 0:s.doneTasks)??0,color:"#10b981"})]}),s&&s.totalTasks>0&&e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-600 mb-2",children:[e.jsx("span",{children:"Overall Progress"}),e.jsxs("span",{children:[Math.round(s.doneTasks/s.totalTasks*100),"%"]})]}),e.jsx("div",{className:"h-3 bg-gray-100 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${s.doneTasks/s.totalTasks*100}%`,background:"linear-gradient(90deg, #10b981, #34d399)"}})})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Projects"}),m.length===0?e.jsx("p",{className:"text-gray-400 text-sm",children:"No projects yet."}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:m.map(t=>e.jsxs("button",{type:"button",onClick:()=>i(`/projects/${t.id}`),className:"text-left border border-gray-200 rounded-lg p-4 bg-white hover:border-blue-300 hover:bg-blue-50 transition",children:[e.jsx("div",{className:"font-medium text-sm",children:t.name}),e.jsx("div",{className:"text-xs text-gray-500 mt-1",children:t.status})]},t.id))})]})]})}function d({label:a,value:i,color:s}){return e.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[e.jsx("div",{className:"text-2xl font-bold",style:{color:s||"#1f2937"},children:i}),e.jsx("div",{className:"text-xs text-gray-500 mt-1",children:a})]})}export{T as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as x,r as a,j as e,b}from"./index-Ddy5AJwx.js";function f(){x();const[t,i]=a.useState(""),[o,u]=a.useState(""),[l,d]=a.useState(""),[n,c]=a.useState(!1),m=s=>{s.preventDefault(),t.trim()&&(c(!0),b("/workspaces",{name:t,goal:o}).then(r=>{window.location.href=`/space/${r.id}/dashboard`}).catch(r=>d(r.message)).finally(()=>c(!1)))};return e.jsxs("div",{className:"max-w-md w-full",style:{padding:"2rem"},children:[e.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Create Workspace"}),e.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"A workspace is your team's collaboration space for projects, tasks, and agents."}),l&&e.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded mb-4 text-sm",children:l}),e.jsxs("form",{onSubmit:m,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name"}),e.jsx("input",{value:t,onChange:s=>i(s.target.value),placeholder:"e.g. Launch v2.0",className:"w-full border border-gray-300 rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",autoFocus:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Goal (optional)"}),e.jsx("textarea",{value:o,onChange:s=>u(s.target.value),placeholder:"Describe what this workspace is for...",rows:3,className:"w-full border border-gray-300 rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),e.jsx("button",{type:"submit",disabled:n||!t.trim(),className:"w-full bg-blue-600 text-white px-4 py-2.5 rounded text-sm font-medium hover:bg-blue-700 disabled:opacity-50",children:n?"Creating...":"Create Workspace"})]})]})}export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as h,u as j,r as s,g as x,j as e,b as y}from"./index-Ddy5AJwx.js";function f(){const{id:r}=h(),m=j(),[o,d]=s.useState([]),[a,c]=s.useState(""),[n,l]=s.useState(""),[i,p]=s.useState("");s.useEffect(()=>{r&&x(`/workspaces/${r}/projects`).then(d).catch(()=>{})},[r]);const u=t=>{t.preventDefault(),a.trim()&&y(`/workspaces/${r}/projects`,{name:a,workdir:n.trim()||null}).then(()=>{c(""),l(""),x(`/workspaces/${r}/projects`).then(d)}).catch(g=>p(g.message))};return e.jsxs("div",{style:{padding:"1rem"},children:[i&&e.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded mb-4 text-sm",children:i}),e.jsxs("form",{onSubmit:u,className:"grid gap-2 mb-4",style:{gridTemplateColumns:"minmax(160px, 1fr) minmax(220px, 1.4fr) auto"},children:[e.jsx("input",{value:a,onChange:t=>c(t.target.value),placeholder:"New project name",className:"border border-gray-300 rounded px-3 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"}),e.jsx("input",{value:n,onChange:t=>l(t.target.value),placeholder:"Optional workdir",className:"border border-gray-300 rounded px-3 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500"}),e.jsx("button",{type:"submit",className:"bg-slate-800 text-white px-3 py-1.5 rounded text-sm hover:bg-slate-900",children:"Add Project"})]}),o.length===0?e.jsx("p",{className:"text-gray-400 text-sm",children:"No projects yet."}):e.jsx("div",{className:"bg-white rounded-lg border border-gray-200 shadow-sm overflow-hidden",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 bg-gray-50",children:[e.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Name"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Workdir"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Status"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Created"})]})}),e.jsx("tbody",{children:o.map(t=>e.jsxs("tr",{className:"border-b border-gray-100 hover:bg-gray-50 cursor-pointer",onClick:()=>m(`/projects/${t.id}`),children:[e.jsx("td",{className:"px-4 py-2 font-medium",children:t.name}),e.jsx("td",{className:"px-4 py-2 text-gray-500 max-w-xs truncate",children:t.workdir||"Agent workspace"}),e.jsx("td",{className:"px-4 py-2",children:e.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-700",children:t.status})}),e.jsx("td",{className:"px-4 py-2 text-gray-500",children:t.created_at?new Date(Number(t.created_at)).toLocaleDateString():"-"})]},t.id))})]})})]})}export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as C,r as d,j as t,g as j,p as $}from"./index-Ddy5AJwx.js";import{G as A}from"./GanttView-CCT_rFpY.js";import{u as I}from"./useEventStream-DTID465I.js";function V(s){switch(s){case"open":return"bg-blue-100 text-blue-700";case"claimed":return"bg-amber-100 text-amber-700";case"done":return"bg-green-100 text-green-700";case"blocked":return"bg-red-100 text-red-700";case"abandoned":return"bg-slate-200 text-slate-700";case"rejected":return"bg-orange-100 text-orange-700";default:return"bg-gray-100 text-gray-700"}}function R(s){switch(s){case"done":return"✓";case"blocked":return"!";case"claimed":return">";case"abandoned":return"×";case"rejected":return"-";default:return"•"}}function B(s,i,o){return s&&i.includes(s)?s:o}function G(s,i){const o=new Set(i.map(r=>r.id)),g=Array.from(new Set(s.map(r=>r.status).filter(r=>!o.has(r)))).map(r=>({id:r,label:r}));return[...i,...g].map(r=>({status:r,tasks:s.filter(p=>p.status===r.id)}))}const N="maestro.workspaceTasks.view",K=["board","table","gantt"];function H(){const{id:s}=C(),[i,o]=d.useState([]),[g,r]=d.useState([]),[p,k]=d.useState([]),[m,v]=d.useState(()=>B(window.localStorage.getItem(N),K,"board")),[l,S]=d.useState(""),[T,f]=d.useState(!0),[y,u]=d.useState(""),{lastEvent:w}=I("task.*,session.*"),x=d.useRef(null),h=()=>{s&&(f(!0),Promise.all([j(`/tasks?workspace_id=${s}`),j(`/workspaces/${s}/projects`),j(`/tasks/workflow/statuses${l?`?project_id=${l}`:""}`)]).then(([e,a,n])=>{o(e),r(a),k(n),u(""),f(!1)}).catch(e=>{u(e.message),f(!1)}))};d.useEffect(()=>{h()},[s,l]),d.useEffect(()=>{if(w)return x.current&&clearTimeout(x.current),x.current=setTimeout(h,300),()=>{x.current&&clearTimeout(x.current)}},[w,s]);const b=l?i.filter(e=>e.project_id===l):i,_=G(b,p),E=e=>{v(e),window.localStorage.setItem(N,e)},P=async(e,a)=>{if(e.status!==a)try{await $(`/tasks/${e.id}`,{status:a}),o(n=>n.map(c=>c.id===e.id?{...c,status:a}:c)),u("")}catch(n){u(n.message),h()}};return T?t.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"Loading..."}):t.jsxs("div",{style:{padding:"1.5rem",height:"100%",display:"flex",flexDirection:"column"},children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("div",{className:"flex gap-1",children:["table","board","gantt"].map(e=>t.jsx("button",{onClick:()=>E(e),className:`px-3 py-1.5 text-sm rounded ${m===e?"bg-slate-800 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:e==="table"?"Table":e==="board"?"Board":"Gantt"},e))}),t.jsxs("select",{value:l,onChange:e=>S(e.target.value),className:"border border-gray-200 rounded px-3 py-1.5 text-sm",children:[t.jsx("option",{value:"",children:"All Projects"}),g.map(e=>t.jsx("option",{value:e.id,children:e.name},e.id))]})]}),y&&t.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded mb-4 text-sm",children:y}),m==="table"&&t.jsx("div",{className:"bg-white rounded-lg border border-gray-200 shadow-sm overflow-auto",children:b.length===0?t.jsx("div",{className:"p-8 text-center text-gray-400 text-sm",children:"No tasks found"}):t.jsxs("table",{className:"w-full text-sm",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-gray-200 bg-gray-50",children:[t.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Title"}),t.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Project"}),t.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Status"}),t.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Priority"}),t.jsx("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Assignee"})]})}),t.jsx("tbody",{children:b.map(e=>t.jsxs("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 font-medium",children:e.title}),t.jsx("td",{className:"px-4 py-2 text-gray-500",children:e.project_name||"-"}),t.jsx("td",{className:"px-4 py-2",children:t.jsx(W,{status:e.status})}),t.jsx("td",{className:"px-4 py-2 text-gray-500",children:e.priority}),t.jsx("td",{className:"px-4 py-2 text-gray-500",children:e.assignee_agent_id||"-"})]},e.id))})]})}),m==="board"&&t.jsx("div",{className:"grid gap-4 overflow-auto",style:{gridTemplateColumns:"repeat(auto-fit, minmax(180px, 1fr))"},children:_.map(e=>t.jsxs("section",{onDragOver:a=>a.preventDefault(),onDrop:a=>{a.preventDefault();const n=a.dataTransfer.getData("text/plain"),c=i.find(D=>D.id===n);c&&P(c,e.status.id)},className:"bg-gray-50 rounded-lg border border-gray-200 p-3 min-h-[160px]",children:[t.jsxs("h2",{className:"font-semibold text-sm uppercase tracking-wide text-gray-600 mb-3",children:[e.status.label||e.status.id," (",e.tasks.length,")"]}),t.jsxs("div",{className:"space-y-2",children:[e.tasks.map(a=>t.jsxs("article",{draggable:!0,onDragStart:n=>{n.dataTransfer.setData("text/plain",a.id),n.dataTransfer.effectAllowed="move"},className:"bg-white rounded border border-gray-200 p-3 shadow-sm cursor-grab active:cursor-grabbing",children:[t.jsx("div",{className:"font-medium text-sm",children:a.title}),t.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:[a.project_name||"No project"," · ",a.assignee_agent_id||"unassigned"]})]},a.id)),e.tasks.length===0&&t.jsx("p",{className:"text-xs text-gray-400",children:"No tasks"})]})]},e.status.id))}),m==="gantt"&&s&&t.jsx("div",{className:"flex-1 min-h-0",style:{minHeight:"400px"},children:t.jsx(A,{workspaceId:s,projectFilter:l||void 0})})]})}function W({status:s}){return t.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${V(s)}`,children:[t.jsx("span",{"aria-hidden":"true",children:R(s)}),s]})}export{H as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-emerald-700:oklch(50.8% .118 165.612);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--radius-lg:.5rem;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.bottom-full{bottom:100%}.left-3{left:calc(var(--spacing) * 3)}.z-10{z-index:10}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.-mb-px{margin-bottom:-1px}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-7{margin-left:calc(var(--spacing) * 7)}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-8{height:calc(var(--spacing) * 8)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.max-h-\[80vh\]{max-height:80vh}.max-h-\[200px\]{max-height:200px}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-\[160px\]{min-height:160px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-8{width:calc(var(--spacing) * 8)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-32{width:calc(var(--spacing) * 32)}.w-48{width:calc(var(--spacing) * 48)}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-\[75\%\]{max-width:75%}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[180px\]{min-width:180px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.animate-bounce{animation:var(--animate-bounce)}.animate-pulse{animation:var(--animate-pulse)}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-gray-100>:not(:last-child)){border-color:var(--color-gray-100)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l-0{border-left-style:var(--tw-border-style);border-left-width:0}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-600{border-color:var(--color-blue-600)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-700{border-color:var(--color-gray-700)}.border-gray-800{border-color:var(--color-gray-800)}.border-green-200{border-color:var(--color-green-200)}.border-red-200{border-color:var(--color-red-200)}.border-transparent{border-color:#0000}.border-yellow-200{border-color:var(--color-yellow-200)}.bg-\[\#1e1e2e\]{background-color:#1e1e2e}.bg-amber-100{background-color:var(--color-amber-100)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-600{background-color:var(--color-green-600)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-600{background-color:var(--color-red-600)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-white{background-color:var(--color-white)}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-yellow-600{background-color:var(--color-yellow-600)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-baseline{vertical-align:baseline}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-blue-200{color:var(--color-blue-200)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-emerald-700{color:var(--color-emerald-700)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-orange-700{color:var(--color-orange-700)}.text-purple-600{color:var(--color-purple-600)}.text-red-400{color:var(--color-red-400)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-slate-700{color:var(--color-slate-700)}.text-white{color:var(--color-white)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.accent-blue-600{accent-color:var(--color-blue-600)}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-blue-200{--tw-ring-color:var(--color-blue-200)}.ring-white\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.ring-white\/30{--tw-ring-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[animation-delay\:0ms\]{animation-delay:0s}.\[animation-delay\:150ms\]{animation-delay:.15s}.\[animation-delay\:300ms\]{animation-delay:.3s}@media(hover:hover){.hover\:border-blue-300:hover{border-color:var(--color-blue-300)}.hover\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-slate-900:hover{background-color:var(--color-slate-900)}.hover\:bg-yellow-700:hover{background-color:var(--color-yellow-700)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:text-gray-800:hover{color:var(--color-gray-800)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media(min-width:40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}}@media(min-width:64rem){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}}.form-input{background:#fff;border:1px solid #d1d5db;border-radius:6px;width:100%;padding:.45rem .6rem;font-size:.875rem}.form-input:focus{outline-offset:1px;outline:2px solid #94a3b8}.action-button{color:#374151;background:#fff;border:1px solid #d1d5db;border-radius:6px;padding:.3rem .55rem;font-size:.8125rem}.action-button:hover{background:#f3f4f6}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}
|