agent-tower 0.3.9 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/executors/base.executor.d.ts +1 -1
  2. package/dist/executors/base.executor.d.ts.map +1 -1
  3. package/dist/executors/base.executor.js +1 -1
  4. package/dist/executors/base.executor.js.map +1 -1
  5. package/dist/pipeline/agent-pipeline.d.ts +1 -1
  6. package/dist/pipeline/agent-pipeline.d.ts.map +1 -1
  7. package/dist/routes/app-settings.d.ts +3 -0
  8. package/dist/routes/app-settings.d.ts.map +1 -0
  9. package/dist/routes/app-settings.js +39 -0
  10. package/dist/routes/app-settings.js.map +1 -0
  11. package/dist/routes/index.d.ts.map +1 -1
  12. package/dist/routes/index.js +3 -0
  13. package/dist/routes/index.js.map +1 -1
  14. package/dist/routes/notifications.d.ts.map +1 -1
  15. package/dist/routes/notifications.js +6 -1
  16. package/dist/routes/notifications.js.map +1 -1
  17. package/dist/routes/system.d.ts.map +1 -1
  18. package/dist/routes/system.js +9 -0
  19. package/dist/routes/system.js.map +1 -1
  20. package/dist/services/notifications/defaults.d.ts +3 -0
  21. package/dist/services/notifications/defaults.d.ts.map +1 -0
  22. package/dist/services/notifications/defaults.js +23 -0
  23. package/dist/services/notifications/defaults.js.map +1 -0
  24. package/dist/services/notifications/notification.service.d.ts.map +1 -1
  25. package/dist/services/notifications/notification.service.js +5 -9
  26. package/dist/services/notifications/notification.service.js.map +1 -1
  27. package/dist/services/slash-command-catalog.service.d.ts +4 -0
  28. package/dist/services/slash-command-catalog.service.d.ts.map +1 -0
  29. package/dist/services/slash-command-catalog.service.js +265 -0
  30. package/dist/services/slash-command-catalog.service.js.map +1 -0
  31. package/dist/services/terminal-manager.js +1 -1
  32. package/dist/services/terminal-manager.js.map +1 -1
  33. package/dist/web/assets/AgentDemoPage-BpV7uQ3g.js +1 -0
  34. package/dist/web/assets/DemoPage-BGjHCKHx.js +4 -0
  35. package/dist/web/assets/GeneralSettingsPage-D8GaBU89.js +1 -0
  36. package/dist/web/assets/NotificationSettingsPage-R1vzDEfU.js +1 -0
  37. package/dist/web/assets/ProfileSettingsPage-DrNxHv3c.js +3 -0
  38. package/dist/web/assets/ProjectKanbanPage-B3aK9esV.js +85 -0
  39. package/dist/web/assets/ProjectSettingsPage-Cmopz-Gr.js +2 -0
  40. package/dist/web/assets/ProviderSettingsPage-Pf3xga4g.js +54 -0
  41. package/dist/web/assets/button-mT6fR5Wv.js +1 -0
  42. package/dist/web/assets/{chevron-down-DrP9EgY9.js → chevron-down-KO5Wcpg9.js} +1 -1
  43. package/dist/web/assets/circle-alert-CZMIHvRs.js +1 -0
  44. package/dist/web/assets/circle-check-CdWs_twI.js +1 -0
  45. package/dist/web/assets/code-block-OCS4YCEC-CVVuqs_P.js +2 -0
  46. package/dist/web/assets/confirm-dialog-COaPglPO.js +1 -0
  47. package/dist/web/assets/folder-picker-CPaFyHlQ.js +1 -0
  48. package/dist/web/assets/index-CTITGUzC.js +13 -0
  49. package/dist/web/assets/index-HqeZJR3B.css +1 -0
  50. package/dist/web/assets/loader-circle-B49bBnM9.js +1 -0
  51. package/dist/web/assets/{mermaid-NOHMQCX5-BvevrkjG.js → mermaid-NOHMQCX5-drOfvylS.js} +42 -42
  52. package/dist/web/assets/modal-D6YfM74t.js +1 -0
  53. package/dist/web/assets/pencil-CvEjUv9A.js +1 -0
  54. package/dist/web/assets/select-B3kLwiMg.js +1 -0
  55. package/dist/web/assets/use-profiles-nR91n9X5.js +1 -0
  56. package/dist/web/assets/use-projects-CP8WXqHv.js +1 -0
  57. package/dist/web/assets/utils-CkSf8FUe.js +1 -0
  58. package/dist/web/assets/x-BP0L8Jra.js +1 -0
  59. package/dist/web/index.html +2 -2
  60. package/node_modules/@agent-tower/shared/dist/types.d.ts +19 -0
  61. package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
  62. package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
  63. package/package.json +2 -2
  64. package/prisma/migrations/20260331000000_add_app_settings/migration.sql +5 -0
  65. package/prisma/schema.prisma +6 -0
  66. package/scripts/postinstall.js +16 -14
  67. package/dist/web/assets/AgentDemoPage-CzND8Y0f.js +0 -1
  68. package/dist/web/assets/DemoPage-CmUJ0dvS.js +0 -4
  69. package/dist/web/assets/NotificationSettingsPage-B1SDsL68.js +0 -1
  70. package/dist/web/assets/ProfileSettingsPage-Z42bsJop.js +0 -3
  71. package/dist/web/assets/ProjectKanbanPage-BsRLM_To.js +0 -85
  72. package/dist/web/assets/ProjectSettingsPage-DizbsdCH.js +0 -2
  73. package/dist/web/assets/ProviderSettingsPage-BnLCrZgD.js +0 -54
  74. package/dist/web/assets/api-client-CgvcCTaj.js +0 -1
  75. package/dist/web/assets/circle-alert-wdB5gDUz.js +0 -1
  76. package/dist/web/assets/circle-check-DilG10OC.js +0 -1
  77. package/dist/web/assets/code-block-OCS4YCEC-BQpzSGnw.js +0 -2
  78. package/dist/web/assets/confirm-dialog-zLKSUa6j.js +0 -1
  79. package/dist/web/assets/folder-picker-CmgJx3lM.js +0 -1
  80. package/dist/web/assets/index-B-QFtMnj.js +0 -13
  81. package/dist/web/assets/index-DX47RnmN.css +0 -1
  82. package/dist/web/assets/loader-circle-B8Hk0gt3.js +0 -1
  83. package/dist/web/assets/modal-CCInxYr_.js +0 -1
  84. package/dist/web/assets/pencil-u5vhUMho.js +0 -1
  85. package/dist/web/assets/query-keys-BGgDKleg.js +0 -1
  86. package/dist/web/assets/select-CinUO48b.js +0 -1
  87. package/dist/web/assets/use-profiles-DJwSheDq.js +0 -1
  88. package/dist/web/assets/use-projects-OFs5uSW6.js +0 -1
  89. package/dist/web/assets/x-Bz9Stptu.js +0 -1
@@ -0,0 +1 @@
1
+ import{e as f,r as a,j as e}from"./index-CTITGUzC.js";import{c as i}from"./utils-CkSf8FUe.js";import{X as x}from"./x-BP0L8Jra.js";const y=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],j=f("trash-2",y),b=({isOpen:t,onClose:r,title:d,children:c,action:l,className:u})=>{const[m,n]=a.useState(!1);a.useEffect(()=>{if(t)n(!0),document.body.style.overflow="hidden";else{const o=setTimeout(()=>n(!1),200);return document.body.style.overflow="unset",()=>clearTimeout(o)}},[t]);const s=a.useCallback(o=>{o.key==="Escape"&&r()},[r]);return a.useEffect(()=>{if(t)return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[t,s]),!m&&!t?null:e.jsxs("div",{className:i("fixed inset-0 z-50 flex items-center justify-center p-4 transition-opacity duration-200",t?"opacity-100":"opacity-0"),children:[e.jsx("div",{className:"absolute inset-0 bg-white/80 backdrop-blur-sm",onClick:r}),e.jsxs("div",{className:i("relative w-full max-w-lg bg-white rounded-xl shadow-2xl shadow-neutral-200/50 border border-neutral-100 transform transition-all duration-200",t?"scale-100 translate-y-0":"scale-95 translate-y-2",u),children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-neutral-50",children:[e.jsx("h3",{className:"font-semibold text-neutral-900",children:d}),e.jsx("button",{onClick:r,className:"text-neutral-400 hover:text-neutral-900 transition-colors",children:e.jsx(x,{size:18})})]}),e.jsx("div",{className:"p-6",children:c}),l?e.jsx("div",{className:"px-6 py-4 bg-neutral-50 rounded-b-xl border-t border-neutral-100 flex justify-end gap-3",children:l}):null]})]})},w=Object.freeze(Object.defineProperty({__proto__:null,Modal:b},Symbol.toStringTag,{value:"Module"}));export{b as M,j as T,w as m};
@@ -0,0 +1 @@
1
+ import{e as a}from"./index-CTITGUzC.js";const e=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],c=a("pencil",e);export{c as P};
@@ -0,0 +1 @@
1
+ import{u as p,r as n,j as t}from"./index-CTITGUzC.js";import{c as r}from"./utils-CkSf8FUe.js";import{C as w,a as v}from"./chevron-down-KO5Wcpg9.js";function g({value:l,onChange:d,options:o,placeholder:m="Select...",disabled:f=!1,className:x}){const{t:i}=p(),[s,a]=n.useState(!1),c=n.useRef(null),u=o.find(e=>e.value===l);n.useEffect(()=>{if(!s)return;const e=h=>{c.current&&!c.current.contains(h.target)&&a(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s]);const b=n.useCallback(e=>{e.key==="Escape"&&a(!1)},[]);return t.jsxs("div",{ref:c,className:r("relative",x),onKeyDown:b,children:[t.jsxs("button",{type:"button",disabled:f,onClick:()=>a(e=>!e),className:r("flex items-center justify-between w-full h-9 px-3 border rounded-lg text-sm transition-colors","bg-white border-neutral-200 hover:border-neutral-300","focus:outline-none focus:border-neutral-400","disabled:opacity-50 disabled:cursor-not-allowed",s&&"border-neutral-400",!u&&"text-neutral-400"),children:[t.jsx("span",{className:"truncate",children:u?u.label:i(m)}),t.jsx(w,{size:14,className:r("ml-2 shrink-0 text-neutral-400 transition-transform duration-150",s&&"rotate-180")})]}),s&&t.jsx("div",{className:"absolute z-50 mt-1 w-full min-w-[160px] bg-white border border-neutral-200 rounded-lg shadow-lg shadow-neutral-200/50 py-1 max-h-[200px] overflow-y-auto",children:o.length===0?t.jsx("div",{className:"px-3 py-2 text-sm text-neutral-400",children:i("No options")}):o.map(e=>t.jsxs("button",{type:"button",disabled:e.disabled,onClick:()=>{d(e.value),a(!1)},className:r("flex items-center w-full px-3 py-1.5 text-sm text-left transition-colors","hover:bg-neutral-50",e.value===l?"text-neutral-900 font-medium":"text-neutral-600",e.disabled&&"opacity-40 cursor-not-allowed"),children:[t.jsx(v,{size:14,className:r("mr-2 shrink-0",e.value===l?"opacity-100":"opacity-0")}),t.jsx("span",{className:"truncate",children:e.label})]},e.value))})]})}export{g as S};
@@ -0,0 +1 @@
1
+ import{a as n,b as a,c as i,q as s,d as r}from"./index-CTITGUzC.js";function f(){return n({queryKey:s.profiles.all,queryFn:()=>r.get("/profiles")})}function c(){return n({queryKey:s.profiles.defaults,queryFn:()=>r.get("/profiles/defaults")})}function y(e){return n({queryKey:s.profiles.agent(e),queryFn:()=>r.get(`/profiles/${e}`),enabled:!!e})}function p(){const e=a();return i({mutationFn:({agentType:u,variant:t,config:l})=>r.put(`/profiles/${u}/${t}`,l),onSuccess:()=>{e.invalidateQueries({queryKey:s.profiles.all})}})}function q(){const e=a();return i({mutationFn:({agentType:u,variant:t})=>r.delete(`/profiles/${u}/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:s.profiles.all})}})}export{c as a,p as b,q as c,y as d,f as u};
@@ -0,0 +1 @@
1
+ import{e as u,a as n,b as c,c as i,q as a,d as r}from"./index-CTITGUzC.js";const o=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],p=u("file",o);const l=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],d=u("folder",l);function j(e){const t={};return e?.page!=null&&(t.page=String(e.page)),e?.limit!=null&&(t.limit=String(e.limit)),n({queryKey:a.projects.list(e),queryFn:()=>r.get("/projects",{params:t})})}function f(e){return n({queryKey:a.projects.detail(e),queryFn:()=>r.get(`/projects/${e}`),enabled:!!e})}function q(){const e=c();return i({mutationFn:t=>r.post("/projects",t),onSuccess:()=>{e.invalidateQueries({queryKey:a.projects.all})}})}function g(){const e=c();return i({mutationFn:({id:t,...s})=>r.put(`/projects/${t}`,s),onSuccess:(t,s)=>{e.invalidateQueries({queryKey:a.projects.all}),e.invalidateQueries({queryKey:a.projects.detail(s.id)})}})}export{d as F,p as a,g as b,f as c,q as d,j as u};
@@ -0,0 +1 @@
1
+ function ke(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=ke(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Te(){for(var e,t,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=ke(e))&&(o&&(o+=" "),o+=t);return o}const Oe=(e,t)=>{const r=new Array(e.length+t.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<t.length;o++)r[e.length+o]=t[o];return r},je=(e,t)=>({classGroupId:e,validator:t}),xe=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),K="-",fe=[],Le="arbitrary..",Ee=e=>{const t=Ve(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Ne(a);const u=a.split(K),l=u[0]===""&&u.length>1?1:0;return ye(u,l,t)},getConflictingClassGroupIds:(a,u)=>{if(u){const l=o[a],f=r[a];return l?f?Oe(f,l):l:f||fe}return r[a]||fe}}},ye=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],d=r.nextPart.get(i);if(d){const f=ye(e,t+1,d);if(f)return f}const a=r.validators;if(a===null)return;const u=t===0?e.join(K):e.slice(t).join(K),l=a.length;for(let f=0;f<l;f++){const b=a[f];if(b.validator(u))return b.classGroupId}},Ne=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),o=t.slice(0,r);return o?Le+o:void 0})(),Ve=e=>{const{theme:t,classGroups:r}=e;return Fe(r,t)},Fe=(e,t)=>{const r=xe();for(const o in e){const i=e[o];ne(i,r,o,t)}return r},ne=(e,t,r,o)=>{const i=e.length;for(let d=0;d<i;d++){const a=e[d];We(a,t,r,o)}},We=(e,t,r,o)=>{if(typeof e=="string"){Be(e,t,r);return}if(typeof e=="function"){_e(e,t,r,o);return}$e(e,t,r,o)},Be=(e,t,r)=>{const o=e===""?t:ve(t,e);o.classGroupId=r},_e=(e,t,r,o)=>{if(Ue(e)){ne(e(o),t,r,o);return}t.validators===null&&(t.validators=[]),t.validators.push(je(r,e))},$e=(e,t,r,o)=>{const i=Object.entries(e),d=i.length;for(let a=0;a<d;a++){const[u,l]=i[a];ne(l,ve(t,u),r,o)}},ve=(e,t)=>{let r=e;const o=t.split(K),i=o.length;for(let d=0;d<i;d++){const a=o[d];let u=r.nextPart.get(a);u||(u=xe(),r.nextPart.set(a,u)),r=u}return r},Ue=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,De=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),o=Object.create(null);const i=(d,a)=>{r[d]=a,t++,t>e&&(t=0,o=r,r=Object.create(null))};return{get(d){let a=r[d];if(a!==void 0)return a;if((a=o[d])!==void 0)return i(d,a),a},set(d,a){d in r?r[d]=a:i(d,a)}}},se="!",be=":",Ye=[],ge=(e,t,r,o,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:o,isExternal:i}),qe=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=i=>{const d=[];let a=0,u=0,l=0,f;const b=i.length;for(let v=0;v<b;v++){const x=i[v];if(a===0&&u===0){if(x===be){d.push(i.slice(l,v)),l=v+1;continue}if(x==="/"){f=v;continue}}x==="["?a++:x==="]"?a--:x==="("?u++:x===")"&&u--}const w=d.length===0?i:i.slice(l);let z=w,M=!1;w.endsWith(se)?(z=w.slice(0,-1),M=!0):w.startsWith(se)&&(z=w.slice(1),M=!0);const I=f&&f>l?f-l:void 0;return ge(d,M,z,I)};if(t){const i=t+be,d=o;o=a=>a.startsWith(i)?d(a.slice(i.length)):ge(Ye,!1,a,void 0,!0)}if(r){const i=o;o=d=>r({className:d,parseClassName:i})}return o},Xe=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{t.set(r,1e6+o)}),r=>{const o=[];let i=[];for(let d=0;d<r.length;d++){const a=r[d],u=a[0]==="[",l=t.has(a);u||l?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(a)):i.push(a)}return i.length>0&&(i.sort(),o.push(...i)),o}},Je=e=>({cache:De(e.cacheSize),parseClassName:qe(e),sortModifiers:Xe(e),...Ee(e)}),He=/\s+/,Ke=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:d}=t,a=[],u=e.trim().split(He);let l="";for(let f=u.length-1;f>=0;f-=1){const b=u[f],{isExternal:w,modifiers:z,hasImportantModifier:M,baseClassName:I,maybePostfixModifierPosition:v}=r(b);if(w){l=b+(l.length>0?" "+l:l);continue}let x=!!v,P=o(x?I.substring(0,v):I);if(!P){if(!x){l=b+(l.length>0?" "+l:l);continue}if(P=o(I),!P){l=b+(l.length>0?" "+l:l);continue}x=!1}const $=z.length===0?"":z.length===1?z[0]:d(z).join(":"),W=M?$+se:$,j=W+P;if(a.indexOf(j)>-1)continue;a.push(j);const L=i(P,x);for(let G=0;G<L.length;++G){const B=L[G];a.push(W+B)}l=b+(l.length>0?" "+l:l)}return l},Qe=(...e)=>{let t=0,r,o,i="";for(;t<e.length;)(r=e[t++])&&(o=ze(r))&&(i&&(i+=" "),i+=o);return i},ze=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=ze(e[o]))&&(r&&(r+=" "),r+=t);return r},Ze=(e,...t)=>{let r,o,i,d;const a=l=>{const f=t.reduce((b,w)=>w(b),e());return r=Je(f),o=r.cache.get,i=r.cache.set,d=u,u(l)},u=l=>{const f=o(l);if(f)return f;const b=Ke(l,r);return i(l,b),b};return d=a,(...l)=>d(Qe(...l))},eo=[],g=e=>{const t=r=>r[e]||eo;return t.isThemeGetter=!0,t},Ce=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ae=/^\((?:(\w[\w-]*):)?(.+)\)$/i,oo=/^\d+\/\d+$/,ro=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,to=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,so=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,no=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ao=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,N=e=>oo.test(e),p=e=>!!e&&!Number.isNaN(Number(e)),R=e=>!!e&&Number.isInteger(Number(e)),oe=e=>e.endsWith("%")&&p(e.slice(0,-1)),S=e=>ro.test(e),io=()=>!0,lo=e=>to.test(e)&&!so.test(e),Se=()=>!1,co=e=>no.test(e),mo=e=>ao.test(e),po=e=>!s(e)&&!n(e),uo=e=>V(e,Ie,Se),s=e=>Ce.test(e),O=e=>V(e,Pe,lo),re=e=>V(e,wo,p),he=e=>V(e,Re,Se),fo=e=>V(e,Me,mo),J=e=>V(e,Ge,co),n=e=>Ae.test(e),_=e=>F(e,Pe),bo=e=>F(e,ko),we=e=>F(e,Re),go=e=>F(e,Ie),ho=e=>F(e,Me),H=e=>F(e,Ge,!0),V=(e,t,r)=>{const o=Ce.exec(e);return o?o[1]?t(o[1]):r(o[2]):!1},F=(e,t,r=!1)=>{const o=Ae.exec(e);return o?o[1]?t(o[1]):r:!1},Re=e=>e==="position"||e==="percentage",Me=e=>e==="image"||e==="url",Ie=e=>e==="length"||e==="size"||e==="bg-size",Pe=e=>e==="length",wo=e=>e==="number",ko=e=>e==="family-name",Ge=e=>e==="shadow",xo=()=>{const e=g("color"),t=g("font"),r=g("text"),o=g("font-weight"),i=g("tracking"),d=g("leading"),a=g("breakpoint"),u=g("container"),l=g("spacing"),f=g("radius"),b=g("shadow"),w=g("inset-shadow"),z=g("text-shadow"),M=g("drop-shadow"),I=g("blur"),v=g("perspective"),x=g("aspect"),P=g("ease"),$=g("animate"),W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...j(),n,s],G=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],m=()=>[n,s,l],C=()=>[N,"full","auto",...m()],ae=()=>[R,"none","subgrid",n,s],ie=()=>["auto",{span:["full",R,n,s]},R,n,s],U=()=>[R,"auto",n,s],le=()=>["auto","min","max","fr",n,s],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],E=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...m()],T=()=>[N,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...m()],c=()=>[e,n,s],ce=()=>[...j(),we,he,{position:[n,s]}],de=()=>["no-repeat",{repeat:["","x","y","space","round"]}],me=()=>["auto","cover","contain",go,uo,{size:[n,s]}],Z=()=>[oe,_,O],k=()=>["","none","full",f,n,s],y=()=>["",p,_,O],D=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],h=()=>[p,oe,we,he],ue=()=>["","none",I,n,s],Y=()=>["none",p,n,s],q=()=>["none",p,n,s],ee=()=>[p,n,s],X=()=>[N,"full",...m()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[S],breakpoint:[S],color:[io],container:[S],"drop-shadow":[S],ease:["in","out","in-out"],font:[po],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[S],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[S],shadow:[S],spacing:["px",p],text:[S],"text-shadow":[S],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",N,s,n,x]}],container:["container"],columns:[{columns:[p,s,n,u]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[R,"auto",n,s]}],basis:[{basis:[N,"full","auto",u,...m()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[p,N,"auto","initial","none",s]}],grow:[{grow:["",p,n,s]}],shrink:[{shrink:["",p,n,s]}],order:[{order:[R,"first","last","none",n,s]}],"grid-cols":[{"grid-cols":ae()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":ae()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:m()}],"gap-x":[{"gap-x":m()}],"gap-y":[{"gap-y":m()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...E(),"normal"]}],"justify-self":[{"justify-self":["auto",...E()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...E(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...E(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...E(),"baseline"]}],"place-self":[{"place-self":["auto",...E()]}],p:[{p:m()}],px:[{px:m()}],py:[{py:m()}],ps:[{ps:m()}],pe:[{pe:m()}],pt:[{pt:m()}],pr:[{pr:m()}],pb:[{pb:m()}],pl:[{pl:m()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":m()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":m()}],"space-y-reverse":["space-y-reverse"],size:[{size:T()}],w:[{w:[u,"screen",...T()]}],"min-w":[{"min-w":[u,"screen","none",...T()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...T()]}],h:[{h:["screen","lh",...T()]}],"min-h":[{"min-h":["screen","lh","none",...T()]}],"max-h":[{"max-h":["screen","lh",...T()]}],"font-size":[{text:["base",r,_,O]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,n,re]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",oe,s]}],"font-family":[{font:[bo,s,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,n,s]}],"line-clamp":[{"line-clamp":[p,"none",n,re]}],leading:[{leading:[d,...m()]}],"list-image":[{"list-image":["none",n,s]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",n,s]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:c()}],"text-color":[{text:c()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[p,"from-font","auto",n,O]}],"text-decoration-color":[{decoration:c()}],"underline-offset":[{"underline-offset":[p,"auto",n,s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:m()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",n,s]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",n,s]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:de()}],"bg-size":[{bg:me()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},R,n,s],radial:["",n,s],conic:[R,n,s]},ho,fo]}],"bg-color":[{bg:c()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:c()}],"gradient-via":[{via:c()}],"gradient-to":[{to:c()}],rounded:[{rounded:k()}],"rounded-s":[{"rounded-s":k()}],"rounded-e":[{"rounded-e":k()}],"rounded-t":[{"rounded-t":k()}],"rounded-r":[{"rounded-r":k()}],"rounded-b":[{"rounded-b":k()}],"rounded-l":[{"rounded-l":k()}],"rounded-ss":[{"rounded-ss":k()}],"rounded-se":[{"rounded-se":k()}],"rounded-ee":[{"rounded-ee":k()}],"rounded-es":[{"rounded-es":k()}],"rounded-tl":[{"rounded-tl":k()}],"rounded-tr":[{"rounded-tr":k()}],"rounded-br":[{"rounded-br":k()}],"rounded-bl":[{"rounded-bl":k()}],"border-w":[{border:y()}],"border-w-x":[{"border-x":y()}],"border-w-y":[{"border-y":y()}],"border-w-s":[{"border-s":y()}],"border-w-e":[{"border-e":y()}],"border-w-t":[{"border-t":y()}],"border-w-r":[{"border-r":y()}],"border-w-b":[{"border-b":y()}],"border-w-l":[{"border-l":y()}],"divide-x":[{"divide-x":y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:c()}],"border-color-x":[{"border-x":c()}],"border-color-y":[{"border-y":c()}],"border-color-s":[{"border-s":c()}],"border-color-e":[{"border-e":c()}],"border-color-t":[{"border-t":c()}],"border-color-r":[{"border-r":c()}],"border-color-b":[{"border-b":c()}],"border-color-l":[{"border-l":c()}],"divide-color":[{divide:c()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[p,n,s]}],"outline-w":[{outline:["",p,_,O]}],"outline-color":[{outline:c()}],shadow:[{shadow:["","none",b,H,J]}],"shadow-color":[{shadow:c()}],"inset-shadow":[{"inset-shadow":["none",w,H,J]}],"inset-shadow-color":[{"inset-shadow":c()}],"ring-w":[{ring:y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:c()}],"ring-offset-w":[{"ring-offset":[p,O]}],"ring-offset-color":[{"ring-offset":c()}],"inset-ring-w":[{"inset-ring":y()}],"inset-ring-color":[{"inset-ring":c()}],"text-shadow":[{"text-shadow":["none",z,H,J]}],"text-shadow-color":[{"text-shadow":c()}],opacity:[{opacity:[p,n,s]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[p]}],"mask-image-linear-from-pos":[{"mask-linear-from":h()}],"mask-image-linear-to-pos":[{"mask-linear-to":h()}],"mask-image-linear-from-color":[{"mask-linear-from":c()}],"mask-image-linear-to-color":[{"mask-linear-to":c()}],"mask-image-t-from-pos":[{"mask-t-from":h()}],"mask-image-t-to-pos":[{"mask-t-to":h()}],"mask-image-t-from-color":[{"mask-t-from":c()}],"mask-image-t-to-color":[{"mask-t-to":c()}],"mask-image-r-from-pos":[{"mask-r-from":h()}],"mask-image-r-to-pos":[{"mask-r-to":h()}],"mask-image-r-from-color":[{"mask-r-from":c()}],"mask-image-r-to-color":[{"mask-r-to":c()}],"mask-image-b-from-pos":[{"mask-b-from":h()}],"mask-image-b-to-pos":[{"mask-b-to":h()}],"mask-image-b-from-color":[{"mask-b-from":c()}],"mask-image-b-to-color":[{"mask-b-to":c()}],"mask-image-l-from-pos":[{"mask-l-from":h()}],"mask-image-l-to-pos":[{"mask-l-to":h()}],"mask-image-l-from-color":[{"mask-l-from":c()}],"mask-image-l-to-color":[{"mask-l-to":c()}],"mask-image-x-from-pos":[{"mask-x-from":h()}],"mask-image-x-to-pos":[{"mask-x-to":h()}],"mask-image-x-from-color":[{"mask-x-from":c()}],"mask-image-x-to-color":[{"mask-x-to":c()}],"mask-image-y-from-pos":[{"mask-y-from":h()}],"mask-image-y-to-pos":[{"mask-y-to":h()}],"mask-image-y-from-color":[{"mask-y-from":c()}],"mask-image-y-to-color":[{"mask-y-to":c()}],"mask-image-radial":[{"mask-radial":[n,s]}],"mask-image-radial-from-pos":[{"mask-radial-from":h()}],"mask-image-radial-to-pos":[{"mask-radial-to":h()}],"mask-image-radial-from-color":[{"mask-radial-from":c()}],"mask-image-radial-to-color":[{"mask-radial-to":c()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[p]}],"mask-image-conic-from-pos":[{"mask-conic-from":h()}],"mask-image-conic-to-pos":[{"mask-conic-to":h()}],"mask-image-conic-from-color":[{"mask-conic-from":c()}],"mask-image-conic-to-color":[{"mask-conic-to":c()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:de()}],"mask-size":[{mask:me()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",n,s]}],filter:[{filter:["","none",n,s]}],blur:[{blur:ue()}],brightness:[{brightness:[p,n,s]}],contrast:[{contrast:[p,n,s]}],"drop-shadow":[{"drop-shadow":["","none",M,H,J]}],"drop-shadow-color":[{"drop-shadow":c()}],grayscale:[{grayscale:["",p,n,s]}],"hue-rotate":[{"hue-rotate":[p,n,s]}],invert:[{invert:["",p,n,s]}],saturate:[{saturate:[p,n,s]}],sepia:[{sepia:["",p,n,s]}],"backdrop-filter":[{"backdrop-filter":["","none",n,s]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[p,n,s]}],"backdrop-contrast":[{"backdrop-contrast":[p,n,s]}],"backdrop-grayscale":[{"backdrop-grayscale":["",p,n,s]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p,n,s]}],"backdrop-invert":[{"backdrop-invert":["",p,n,s]}],"backdrop-opacity":[{"backdrop-opacity":[p,n,s]}],"backdrop-saturate":[{"backdrop-saturate":[p,n,s]}],"backdrop-sepia":[{"backdrop-sepia":["",p,n,s]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":m()}],"border-spacing-x":[{"border-spacing-x":m()}],"border-spacing-y":[{"border-spacing-y":m()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",n,s]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[p,"initial",n,s]}],ease:[{ease:["linear","initial",P,n,s]}],delay:[{delay:[p,n,s]}],animate:[{animate:["none",$,n,s]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,n,s]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:q()}],"scale-x":[{"scale-x":q()}],"scale-y":[{"scale-y":q()}],"scale-z":[{"scale-z":q()}],"scale-3d":["scale-3d"],skew:[{skew:ee()}],"skew-x":[{"skew-x":ee()}],"skew-y":[{"skew-y":ee()}],transform:[{transform:[n,s,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:X()}],"translate-x":[{"translate-x":X()}],"translate-y":[{"translate-y":X()}],"translate-z":[{"translate-z":X()}],"translate-none":["translate-none"],accent:[{accent:c()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:c()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",n,s]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":m()}],"scroll-mx":[{"scroll-mx":m()}],"scroll-my":[{"scroll-my":m()}],"scroll-ms":[{"scroll-ms":m()}],"scroll-me":[{"scroll-me":m()}],"scroll-mt":[{"scroll-mt":m()}],"scroll-mr":[{"scroll-mr":m()}],"scroll-mb":[{"scroll-mb":m()}],"scroll-ml":[{"scroll-ml":m()}],"scroll-p":[{"scroll-p":m()}],"scroll-px":[{"scroll-px":m()}],"scroll-py":[{"scroll-py":m()}],"scroll-ps":[{"scroll-ps":m()}],"scroll-pe":[{"scroll-pe":m()}],"scroll-pt":[{"scroll-pt":m()}],"scroll-pr":[{"scroll-pr":m()}],"scroll-pb":[{"scroll-pb":m()}],"scroll-pl":[{"scroll-pl":m()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",n,s]}],fill:[{fill:["none",...c()]}],"stroke-w":[{stroke:[p,_,O,re]}],stroke:[{stroke:["none",...c()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},yo=Ze(xo);function vo(...e){return yo(Te(e))}function te(e){let t=0;for(const r of e){const o=r.codePointAt(0);o>=19968&&o<=40959||o>=13312&&o<=19903||o>=65280&&o<=65376||o>=12288&&o<=12351?t+=2:t+=1}return t}function zo(e,t){if(te(e)<=t)return e;const r=t-1,o=Math.ceil(r/2),i=Math.floor(r/2);let d="",a=0;for(const b of e){const w=te(b);if(a+w>o)break;d+=b,a+=w}const u=[...e];let l="",f=0;for(let b=u.length-1;b>=0;b--){const w=te(u[b]);if(f+w>i)break;l=u[b]+l,f+=w}return d+"…"+l}export{Te as a,yo as b,vo as c,zo as t};
@@ -0,0 +1 @@
1
+ import{e}from"./index-CTITGUzC.js";const o=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],c=e("plus",o);const t=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],a=e("x",t);export{c as P,a as X};
@@ -5,8 +5,8 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
7
7
  <title>web</title>
8
- <script type="module" crossorigin src="/assets/index-B-QFtMnj.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-DX47RnmN.css">
8
+ <script type="module" crossorigin src="/assets/index-CTITGUzC.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-HqeZJR3B.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
@@ -83,6 +83,18 @@ export interface QuickCommand {
83
83
  name: string;
84
84
  command: string;
85
85
  }
86
+ export type SlashCommandKind = 'builtin' | 'command' | 'skill';
87
+ export type SlashCommandScope = 'project' | 'user';
88
+ export interface SlashCommandOption {
89
+ command: string;
90
+ description: string;
91
+ aliases?: string[];
92
+ kind?: SlashCommandKind;
93
+ scope?: SlashCommandScope;
94
+ }
95
+ export interface SlashCommandCatalogResponse {
96
+ commands: SlashCommandOption[];
97
+ }
86
98
  /** 项目 */
87
99
  export interface Project {
88
100
  id: string;
@@ -207,6 +219,13 @@ export interface Attachment {
207
219
  storagePath: string;
208
220
  createdAt?: string;
209
221
  }
222
+ /** 应用支持的语言 */
223
+ export type AppLocale = 'zh-CN' | 'en';
224
+ /** 全局应用设置 */
225
+ export interface AppSettings {
226
+ id: string;
227
+ locale: AppLocale | null;
228
+ }
210
229
  /** 第三方通知渠道 */
211
230
  export type ThirdPartyChannel = 'none' | 'feishu';
212
231
  /** 通知事件类型 */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,WAAW;AACX,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,SAAS,cAAc;CACxB;AAED,aAAa;AACb,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,cAAc;AACd,oBAAY,SAAS;IACnB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,KAAK,UAAU;CAChB;AAED,WAAW;AACX,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,WAAW;AACX,oBAAY,cAAc;IACxB,eAAe;IACf,IAAI,SAAS;IACb,2BAA2B;IAC3B,UAAU,eAAe;CAC1B;AAKD,kBAAkB;AAClB,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,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B,CAAC,EANW,UAAU,KAAV,UAAU,QAMrB;AAED,aAAa;AACb,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,0CAAuB,CAAA;AACzB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAED,cAAc;AACd,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,sCAAyB,CAAA;IACzB,0CAA6B,CAAA;IAC7B,4BAAe,CAAA;AACjB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAED,WAAW;AACX,MAAM,CAAN,IAAY,aAMX;AAND,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;IACvB,kCAAiB,CAAA;IACjB,wCAAuB,CAAA;AACzB,CAAC,EANW,aAAa,KAAb,aAAa,QAMxB;AAED,WAAW;AACX,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,eAAe;IACf,+BAAa,CAAA;IACb,2BAA2B;IAC3B,2CAAyB,CAAA;AAC3B,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB;AA2JD,qCAAqC;AAErC,aAAa;AACb,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,6BAAe,CAAA;AACjB,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-tower",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "description": "AI Agent Task Management Dashboard",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -27,10 +27,10 @@
27
27
  "@fastify/static": "^7.0.4",
28
28
  "@modelcontextprotocol/sdk": "^1.26.0",
29
29
  "@prisma/client": "^5.9.1",
30
+ "@shitiandmw/node-pty": "1.1.0-shitiandmw.1",
30
31
  "cloudflared": "^0.7.1",
31
32
  "fast-json-patch": "^3.1.1",
32
33
  "fastify": "^4.26.0",
33
- "node-pty": "^1.0.0",
34
34
  "simple-git": "^3.22.0",
35
35
  "smol-toml": "^1.6.0",
36
36
  "socket.io": "^4.8.3",
@@ -0,0 +1,5 @@
1
+ -- CreateTable
2
+ CREATE TABLE "AppSettings" (
3
+ "id" TEXT NOT NULL PRIMARY KEY DEFAULT 'singleton',
4
+ "locale" TEXT
5
+ );
@@ -118,6 +118,12 @@ model Attachment {
118
118
  @@index([hash])
119
119
  }
120
120
 
121
+ // 应用设置 (单例,只有一行)
122
+ model AppSettings {
123
+ id String @id @default("singleton")
124
+ locale String?
125
+ }
126
+
121
127
  // 通知配置 (单例,只有一行)
122
128
  // thirdPartyChannel: none, feishu
123
129
  model NotificationSettings {
@@ -1,13 +1,8 @@
1
1
  /**
2
- * postinstall 脚本 - 修复 node-pty 原生模块权限问题
2
+ * postinstall 脚本 - 修复 node-pty spawn-helper 权限问题
3
3
  *
4
- * 问题背景:
5
- * node-pty 是一个用于创建伪终端 (PTY) 的 Node.js 库,用于与 Claude Code、Gemini CLI 等 Agent 进行交互。
6
- * 在 macOS 上,pnpm 安装 node-pty 时,预编译的 spawn-helper 二进制文件可能会丢失执行权限,
7
- * 导致 "posix_spawnp failed" 错误。
8
- *
9
- * 解决方案:
10
- * 在 postinstall 阶段自动为 spawn-helper 添加执行权限。
4
+ * Agent Tower 使用 fork 后的 `@shitiandmw/node-pty`,其中 darwin fd 泄漏已在上游源码层修复。
5
+ * 这里仅保留一个安装期兜底:确保 `spawn-helper` 二进制文件具有可执行权限。
11
6
  */
12
7
 
13
8
  import { readdirSync, chmodSync, statSync, existsSync } from 'fs';
@@ -15,6 +10,7 @@ import { join, dirname } from 'path';
15
10
  import { fileURLToPath } from 'url';
16
11
 
17
12
  const __dirname = dirname(fileURLToPath(import.meta.url));
13
+ const NODE_PTY_PATH_RE = /(^|[\\/])(?:@shitiandmw[\\/])?node-pty(?:[\\/]|$)/;
18
14
 
19
15
  /**
20
16
  * 向上查找 monorepo 根目录(包含 pnpm-workspace.yaml 或根 node_modules)
@@ -61,10 +57,7 @@ function findFiles(dir, pattern, results = [], depth = 0, maxDepth = 10) {
61
57
  return results;
62
58
  }
63
59
 
64
- /**
65
- * 修复 spawn-helper 权限
66
- */
67
- function fixSpawnHelperPermissions() {
60
+ function collectSearchDirs() {
68
61
  // 1. 优先查找包自身的 node_modules(npm 全局安装场景)
69
62
  const packageRoot = join(__dirname, '..');
70
63
  const localNodeModules = join(packageRoot, 'node_modules');
@@ -82,6 +75,16 @@ function fixSpawnHelperPermissions() {
82
75
  searchDirs.push(monorepoNodeModules);
83
76
  }
84
77
 
78
+ return {
79
+ packageRoot,
80
+ monorepoRoot,
81
+ searchDirs,
82
+ };
83
+ }
84
+
85
+ function fixSpawnHelperPermissions() {
86
+ const { searchDirs } = collectSearchDirs();
87
+
85
88
  if (searchDirs.length === 0) {
86
89
  console.log('[postinstall] 未找到 node_modules 目录,跳过 spawn-helper 权限修复');
87
90
  return;
@@ -93,7 +96,7 @@ function fixSpawnHelperPermissions() {
93
96
  const spawnHelpers = findFiles(nodeModulesDir, /^spawn-helper$/);
94
97
 
95
98
  for (const file of spawnHelpers) {
96
- if (!file.includes('node-pty')) continue;
99
+ if (!NODE_PTY_PATH_RE.test(file)) continue;
97
100
 
98
101
  try {
99
102
  const stats = statSync(file);
@@ -116,5 +119,4 @@ function fixSpawnHelperPermissions() {
116
119
  console.log('[postinstall] 所有 spawn-helper 权限正常,无需修复');
117
120
  }
118
121
  }
119
-
120
122
  fixSpawnHelperPermissions();
@@ -1 +0,0 @@
1
- import{c as b,r as s,j as e,L as W}from"./index-B-QFtMnj.js";import{a as f,B as y}from"./api-client-CgvcCTaj.js";import{u as Q,a as X,b as L,c as Y,d as Z,S as ee,e as te,T as se,P as ne,G as re,f as ae}from"./mermaid-NOHMQCX5-BvevrkjG.js";import{d as le}from"./use-profiles-DJwSheDq.js";import{C as ie}from"./chevron-down-DrP9EgY9.js";import"./log-adapter-50wgehrc.js";import"./query-keys-BGgDKleg.js";const oe=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]],ce=b("at-sign",oe);const de=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xe=b("chevron-up",de);const me=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],ue=b("hash",me);const pe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],he=b("send",pe),ge=!0;function Se(){const[w,_]=s.useState([]),[l,S]=s.useState(""),[d,k]=s.useState("DEFAULT"),[i,A]=s.useState(""),[r,D]=s.useState(null),[a,o]=s.useState("idle"),[h,E]=s.useState(!1),[x,j]=s.useState(""),$=s.useRef(null),C=s.useRef(null),m=s.useRef(null),{data:u}=le(l),H=u?Object.keys(u):["DEFAULT"],U=t=>{S(t),k("DEFAULT")},F=s.useCallback(t=>{o(t===0?"stopped":"error")},[]),M=s.useCallback(t=>{console.error("Agent error:",t),o("error")},[]),{isConnected:p,isAttached:g,logs:v,entries:V,agentSessionId:I,attach:z,clearLogs:P}=Q({sessionId:r||"",onExit:F,onError:M}),{todos:R}=X(V);s.useEffect(()=>{f.get("/demo/agents").then(t=>{_(t.agents);const n=t.agents.find(N=>N.available);n&&S(n.type)})},[]),s.useEffect(()=>{$.current?.scrollToBottom("smooth")},[v]),s.useEffect(()=>{console.log(`[AgentDemoPage:useEffect] t=${Date.now()} sessionId=${r} isConnected=${p} isAttached=${g}`),r&&p&&!g&&(console.log(`[AgentDemoPage:useEffect] t=${Date.now()} calling attach()`),z())},[r,p,g,z]);const B=t=>{if(j(t.target.value),m.current){m.current.style.height="auto";const N=Math.min(m.current.scrollHeight,210);m.current.style.height=`${N}px`}},G=async()=>{if(!l||!i.trim())return;const t=Date.now();console.log(`[AgentDemoPage:handleStart] t=${t} starting...`),o("starting"),P();try{const n=await f.post("/demo/start",{agentType:l,prompt:i.trim(),variant:d});ge&&console.log(`[AgentDemoPage:handleStart] t=${Date.now()} apiTime=${Date.now()-t}ms sessionId=${n.sessionId}`),D(n.sessionId),o("running")}catch(n){console.error("Start failed:",n),o("error")}},T=async()=>{if(!r||!x.trim())return;const t=x.trim();j("");try{await f.post(`/demo/${r}/message`,{message:t})}catch(n){console.error("Send failed:",n)}},O=async()=>{if(r)try{await f.post(`/demo/${r}/stop`),o("stopped")}catch(t){console.error("Stop failed:",t)}},K=()=>{D(null),o("idle"),A(""),j(""),P()},q=a==="running",c=r!==null,J=w.find(t=>t.type===l);return e.jsxs("div",{className:"flex flex-col h-full bg-white",children:[e.jsxs("div",{className:"px-8 py-5 border-b border-neutral-100 bg-white transition-all duration-300",children:[e.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:"text-base font-medium text-blue-600",children:"Agent Demo"}),e.jsx("span",{className:"text-neutral-300 text-sm",children:"/"}),e.jsx("span",{className:"text-xl font-bold text-neutral-900 tracking-tight",children:c?i.slice(0,50)+(i.length>50?"...":""):"新会话"})]}),e.jsxs("div",{className:"flex items-center",children:[a==="running"&&e.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-blue-50 text-blue-700 rounded-full text-xs font-medium border border-blue-100",children:[e.jsx(L,{className:"w-3.5 h-3.5 animate-pulse"}),e.jsx("span",{children:"Running"})]}),a==="stopped"&&e.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-emerald-50 text-emerald-700 rounded-full text-xs font-medium border border-emerald-100",children:[e.jsx(Y,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Done"})]}),a==="idle"&&e.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-neutral-100 text-neutral-600 rounded-full text-xs font-medium border border-neutral-200",children:[e.jsx(Z,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Idle"})]}),a==="starting"&&e.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-amber-50 text-amber-700 rounded-full text-xs font-medium border border-amber-100",children:[e.jsx(L,{className:"w-3.5 h-3.5 animate-spin"}),e.jsx("span",{children:"Starting..."})]}),a==="error"&&e.jsx("div",{className:"flex items-center gap-1.5 px-2.5 py-0.5 bg-red-50 text-red-700 rounded-full text-xs font-medium border border-red-100",children:e.jsx("span",{children:"Error"})})]})]}),c&&e.jsxs("div",{className:"mt-1.5 flex items-start gap-2 group max-w-4xl",children:[e.jsx("div",{className:`text-sm text-neutral-600 leading-relaxed cursor-pointer transition-all ${h?"":"truncate"}`,onClick:()=>E(!h),children:i}),e.jsx("button",{onClick:()=>E(!h),className:"mt-0.5 text-neutral-400 opacity-0 group-hover:opacity-100 hover:text-neutral-600 transition-opacity",children:h?e.jsx(xe,{size:14}):e.jsx(ie,{size:14})})]}),e.jsxs("div",{className:"flex items-center gap-6 mt-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-neutral-400 font-medium",children:"Agent"}),e.jsx("div",{className:"flex items-center gap-1.5 text-neutral-900 font-medium bg-neutral-50 px-2 py-1 rounded border border-neutral-100",children:J?.name||l||"未选择"})]}),d!=="DEFAULT"&&e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-neutral-400 font-medium",children:"Variant"}),e.jsx("div",{className:"flex items-center gap-1.5 text-neutral-700 font-medium bg-blue-50 px-2 py-1 rounded border border-blue-100",children:d})]}),I&&e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-neutral-400 font-medium",children:"Session"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-neutral-700 font-mono bg-neutral-50 px-2 py-1 rounded border border-neutral-100",children:[I.slice(0,8),"..."]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-neutral-400 font-medium",children:"连接"}),e.jsx("div",{className:`flex items-center gap-1.5 font-medium px-2 py-1 rounded border ${p?"text-emerald-700 bg-emerald-50 border-emerald-100":"text-neutral-500 bg-neutral-50 border-neutral-100"}`,children:p?g?"已连接":"连接中...":"未连接"})]}),c&&e.jsx(y,{variant:"outline",size:"sm",onClick:K,className:"ml-auto",children:"新会话"}),e.jsxs(W,{to:"/settings/profiles",className:`flex items-center gap-1.5 text-xs text-neutral-500 hover:text-neutral-900 transition-colors ${c?"":"ml-auto"}`,children:[e.jsx(ee,{size:14}),e.jsx("span",{children:"Profiles 设置"})]})]})]}),e.jsx("div",{ref:C,className:"flex-1 overflow-y-auto px-8 py-6",children:c?e.jsx("div",{className:"min-h-[200px]",children:v.length===0?e.jsx("div",{className:"text-neutral-400 text-center py-8",children:"等待 Agent 响应..."}):e.jsx(te,{ref:$,logs:v,scrollElementRef:C})}):e.jsxs("div",{className:"max-w-2xl mx-auto space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-3 text-neutral-900",children:"选择 Agent"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:w.map(t=>e.jsxs(y,{variant:l===t.type?"default":"outline",disabled:!t.available,onClick:()=>U(t.type),children:[t.name,t.available&&t.version&&` (${t.version})`,!t.available&&" (不可用)"]},t.type))})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-3 text-neutral-900",children:"配置变体 (Profile Variant)"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:H.map(t=>e.jsx("button",{onClick:()=>k(t),className:`px-3 py-1.5 rounded-full text-sm font-medium border transition-colors ${d===t?"bg-neutral-900 text-white border-neutral-900":"bg-white text-neutral-600 border-neutral-200 hover:border-neutral-400"}`,children:t},t))}),u&&u[d]&&e.jsx("p",{className:"mt-2 text-xs text-neutral-500 font-mono",children:Object.entries(u[d]).map(([t,n])=>`${t}: ${JSON.stringify(n)}`).join(", ")})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold mb-3 text-neutral-900",children:"输入任务"}),e.jsxs("div",{className:"relative border border-neutral-200 rounded-xl shadow-sm bg-white focus-within:ring-1 focus-within:ring-neutral-300 focus-within:border-neutral-300 transition-all duration-200",children:[e.jsx("textarea",{value:i,onChange:t=>A(t.target.value),rows:4,placeholder:"描述你想让 Agent 完成的任务...",className:"w-full px-4 py-3 bg-transparent border-none focus:outline-none focus:ring-0 resize-none text-neutral-900 placeholder-neutral-400 leading-relaxed text-sm"}),e.jsx("div",{className:"flex items-center justify-end px-3 pb-3 pt-1",children:e.jsx(y,{onClick:G,disabled:a==="starting"||!l||!i.trim(),children:a==="starting"?"启动中...":"开始"})})]})]})]})}),c&&R.length>0&&e.jsx("div",{className:"px-8 py-2 bg-white border-t border-neutral-100",children:e.jsx(se,{todos:R})}),c&&e.jsx("div",{className:"px-8 py-6 border-t border-neutral-100 bg-white",children:e.jsxs("div",{className:"relative border border-neutral-200 rounded-xl shadow-sm bg-white focus-within:ring-1 focus-within:ring-neutral-300 focus-within:border-neutral-300 transition-all duration-200",children:[e.jsx("textarea",{ref:m,value:x,onChange:B,rows:3,placeholder:"发送消息给 Agent...",className:"w-full px-4 py-3 bg-transparent border-none focus:outline-none focus:ring-0 resize-none text-neutral-900 placeholder-neutral-400 leading-relaxed text-sm scrollbar-thin scrollbar-thumb-neutral-200 scrollbar-track-transparent",style:{minHeight:"80px",maxHeight:"210px"},onKeyDown:t=>{t.key==="Enter"&&!t.shiftKey&&!t.repeat&&!t.nativeEvent.isComposing&&t.nativeEvent.keyCode!==229&&(t.preventDefault(),T())}}),e.jsxs("div",{className:"flex items-center justify-between px-3 pb-3 pt-1 border-t border-transparent",children:[e.jsxs("div",{className:"flex items-center gap-1 text-neutral-400",children:[e.jsx("button",{className:"p-2 hover:bg-neutral-100 hover:text-neutral-600 rounded-lg transition-colors",title:"Attach File",children:e.jsx(ne,{size:18})}),e.jsx("button",{className:"p-2 hover:bg-neutral-100 hover:text-neutral-600 rounded-lg transition-colors",title:"Mention",children:e.jsx(ce,{size:18})}),e.jsx("button",{className:"p-2 hover:bg-neutral-100 hover:text-neutral-600 rounded-lg transition-colors",title:"Reference Issue",children:e.jsx(ue,{size:18})}),e.jsx("div",{className:"w-px h-4 bg-neutral-200 mx-1"}),e.jsx("button",{className:"p-2 hover:bg-neutral-100 hover:text-neutral-600 rounded-lg transition-colors",title:"Search Web",children:e.jsx(re,{size:18})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[q&&e.jsxs("button",{onClick:O,className:"flex items-center gap-2 px-3 py-2 text-xs font-semibold text-red-600 bg-red-50 hover:bg-red-100 rounded-lg transition-colors",children:[e.jsx(ae,{size:12,fill:"currentColor"}),e.jsx("span",{children:"Stop"})]}),e.jsxs("button",{onClick:T,disabled:!x.trim(),className:`flex items-center gap-2 px-3 py-2 text-xs font-semibold rounded-lg transition-all ${x.trim()?"bg-neutral-900 text-white hover:bg-black shadow-sm":"bg-neutral-100 text-neutral-400 cursor-not-allowed"}`,children:[e.jsx("span",{children:"Send"}),e.jsx(he,{size:14})]})]})]})]})})]})}export{Se as AgentDemoPage};
@@ -1,4 +0,0 @@
1
- import{r as n,s as E,S as d,C as k,j as s}from"./index-B-QFtMnj.js";import{c as _,a as R,B}from"./api-client-CgvcCTaj.js";function T(I){const{sessionId:a,onOutput:x,onExit:b,onError:u}=I,[j,c]=n.useState(()=>E.isConnected()),[v,m]=n.useState(!1),r=n.useRef({onOutput:x,onExit:b,onError:u});r.current={onOutput:x,onExit:b,onError:u},n.useEffect(()=>{const t=E.getSocket();c(t.connected);const i=()=>c(!0),p=()=>{c(!1),m(!1)},O=l=>{l.sessionId===a&&r.current.onOutput?.(l.data)},h=l=>{l.sessionId===a&&(m(!1),r.current.onExit?.(l.exitCode))},g=l=>{l.sessionId===a&&r.current.onError?.(l.message)},N=l=>{l.sessionId===a&&m(!0)},C=l=>{l.sessionId===a&&m(!1)};return t.on("connect",i),t.on("disconnect",p),t.on(d.SESSION_STDOUT,O),t.on(d.SESSION_EXIT,h),t.on(d.SESSION_ERROR,g),t.on(d.SESSION_SUBSCRIBED,N),t.on(d.SESSION_UNSUBSCRIBED,C),c(t.connected),()=>{t.off("connect",i),t.off("disconnect",p),t.off(d.SESSION_STDOUT,O),t.off(d.SESSION_EXIT,h),t.off(d.SESSION_ERROR,g),t.off(d.SESSION_SUBSCRIBED,N),t.off(d.SESSION_UNSUBSCRIBED,C),t.emit(k.UNSUBSCRIBE,{topic:"session",id:a})}},[a]);const y=n.useCallback(()=>new Promise(t=>{const i=E.getSocket();if(!i.connected){t(!1);return}i.emit(k.SUBSCRIBE,{topic:"session",id:a},p=>{t(p.success)})}),[a]),w=n.useCallback(()=>{E.getSocket().emit(k.UNSUBSCRIBE,{topic:"session",id:a})},[a]),S=n.useCallback(t=>{E.getSocket().emit(k.INPUT,{sessionId:a,data:t})},[a]),D=n.useCallback((t,i)=>{E.getSocket().emit(k.RESIZE,{sessionId:a,cols:t,rows:i})},[a]);return{isConnected:j,isAttached:v,attach:y,detach:w,sendInput:S,resize:D}}function U({className:I,...a}){return s.jsx("div",{"data-slot":"card",className:_("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",I),...a})}function P(){const[I,a]=n.useState([]),[x,b]=n.useState(""),[u,j]=n.useState(""),[c,v]=n.useState(null),[m,r]=n.useState([]),[y,w]=n.useState(!1),[S,D]=n.useState(""),t=n.useRef(null),i=n.useCallback(e=>{r(o=>{const f=o[o.length-1];return f&&f.role==="agent"?[...o.slice(0,-1),{...f,content:f.content+e}]:[...o,{role:"agent",content:e,timestamp:new Date}]})},[]),p=n.useCallback(e=>{r(o=>[...o,{role:"agent",content:`
2
- [进程退出,退出码: ${e}]`,timestamp:new Date}]),v(null)},[]),O=n.useCallback(e=>{r(o=>[...o,{role:"agent",content:`
3
- [错误: ${e}]`,timestamp:new Date}])},[]),{isConnected:h,isAttached:g,attach:N}=T({sessionId:c||"",onOutput:i,onExit:p,onError:O});n.useEffect(()=>{R.get("/demo/agents").then(e=>{a(e.agents);const o=e.agents.find(f=>f.available);o&&b(o.type)})},[]),n.useEffect(()=>{t.current?.scrollIntoView({behavior:"smooth"})},[m]),n.useEffect(()=>{c&&h&&!g&&N()},[c,h,g,N]);const C=async()=>{if(!(!x||!u.trim())){w(!0),r([{role:"user",content:u,timestamp:new Date}]);try{const e=await R.post("/demo/start",{agentType:x,prompt:u.trim()});v(e.sessionId),j("")}catch(e){r(o=>[...o,{role:"agent",content:`启动失败: ${e instanceof Error?e.message:"未知错误"}`,timestamp:new Date}])}finally{w(!1)}}},l=async()=>{if(!c||!S.trim())return;const e=S.trim();r(o=>[...o,{role:"user",content:e,timestamp:new Date}]),D("");try{await R.post(`/demo/${c}/message`,{message:e})}catch(o){r(f=>[...f,{role:"agent",content:`发送失败: ${o instanceof Error?o.message:"未知错误"}`,timestamp:new Date}])}},A=async()=>{if(c)try{await R.post(`/demo/${c}/stop`),r(e=>[...e,{role:"agent",content:`
4
- [会话已停止]`,timestamp:new Date}]),v(null)}catch(e){console.error("Stop failed:",e)}};return s.jsxs("div",{className:"flex flex-col h-full max-w-4xl mx-auto p-4 gap-4",children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Agent 交互演示"}),!c&&s.jsxs(U,{className:"p-4",children:[s.jsx("h2",{className:"text-lg font-semibold mb-3",children:"选择 Agent"}),s.jsx("div",{className:"flex gap-2 flex-wrap mb-4",children:I.map(e=>s.jsxs(B,{variant:x===e.type?"default":"outline",disabled:!e.available,onClick:()=>b(e.type),children:[e.name,e.available&&e.version&&` (${e.version})`,!e.available&&" (不可用)"]},e.type))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:u,onChange:e=>j(e.target.value),onKeyDown:e=>e.key==="Enter"&&!e.nativeEvent.isComposing&&e.nativeEvent.keyCode!==229&&C(),placeholder:"输入你的问题或任务...",className:"flex-1 px-3 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"}),s.jsx(B,{onClick:C,disabled:y||!x||!u.trim(),children:y?"启动中...":"开始"})]})]}),s.jsxs(U,{className:"flex-1 p-4 overflow-hidden flex flex-col",children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h2",{className:"text-lg font-semibold",children:"对话"}),c&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-gray-500",children:h?g?"已连接":"连接中...":"未连接"}),s.jsx(B,{variant:"outline",size:"sm",onClick:A,children:"停止"})]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto space-y-3",children:[m.length===0?s.jsx("div",{className:"text-gray-400 text-center py-8",children:"选择 Agent 并输入问题开始对话"}):m.map((e,o)=>s.jsxs("div",{className:`p-3 rounded-lg ${e.role==="user"?"bg-blue-100 ml-8":"bg-gray-100 mr-8"}`,children:[s.jsx("div",{className:"text-xs text-gray-500 mb-1",children:e.role==="user"?"你":"Agent"}),s.jsx("pre",{className:"whitespace-pre-wrap font-mono text-sm",children:e.content})]},o)),s.jsx("div",{ref:t})]}),c&&s.jsxs("div",{className:"flex gap-2 mt-3 pt-3 border-t",children:[s.jsx("input",{type:"text",value:S,onChange:e=>D(e.target.value),onKeyDown:e=>e.key==="Enter"&&!e.repeat&&!e.nativeEvent.isComposing&&e.nativeEvent.keyCode!==229&&l(),placeholder:"发送后续消息...",className:"flex-1 px-3 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"}),s.jsx(B,{onClick:l,disabled:!S.trim(),children:"发送"})]})]})]})}export{P as DemoPage};
@@ -1 +0,0 @@
1
- import{c as U,u as S,r as l,j as e}from"./index-B-QFtMnj.js";import{u as E,a as j,q as y}from"./query-keys-BGgDKleg.js";import{a as x,B as g}from"./api-client-CgvcCTaj.js";import{S as I}from"./select-CinUO48b.js";import{L as P}from"./loader-circle-B8Hk0gt3.js";import{C as q}from"./circle-check-DilG10OC.js";import{C as R}from"./circle-alert-wdB5gDUz.js";import"./chevron-down-DrP9EgY9.js";const z=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],L=U("link",z);function B(){return E({queryKey:y.notifications.settings,queryFn:()=>x.get("/notifications/settings")})}function A(){const s=S();return j({mutationFn:c=>x.put("/notifications/settings",c),onSuccess:()=>{s.invalidateQueries({queryKey:y.notifications.settings})}})}function F(){return j({mutationFn:s=>x.post("/notifications/test",s)})}const K=[{value:"none",label:"无"},{value:"feishu",label:"飞书"}];function G(){const{data:s,isLoading:c}=B(),r=A(),a=F(),[n,p]=l.useState({webhookUrl:"",baseUrl:"",titleTemplate:"",bodyTemplate:""}),[u,h]=l.useState(!1),[f,i]=l.useState("idle"),d=l.useRef(void 0);if(l.useEffect(()=>{s&&!u&&p({webhookUrl:s.feishuWebhookUrl??"",baseUrl:s.thirdPartyBaseUrl??"",titleTemplate:s.taskInReviewTitleTemplate??"",bodyTemplate:s.taskInReviewBodyTemplate??""})},[s,u]),l.useEffect(()=>(a.isSuccess?(i("success"),d.current=setTimeout(()=>i("idle"),3e3)):a.isError&&(i("error"),d.current=setTimeout(()=>i("idle"),5e3)),()=>clearTimeout(d.current)),[a.isSuccess,a.isError]),c)return e.jsx("div",{className:"p-6 text-sm text-neutral-400",children:"加载中..."});const m=s?.osNotificationEnabled??!0,b=s?.thirdPartyChannel??"none",o=(t,w)=>{p(C=>({...C,[t]:w})),h(!0)},N=()=>{r.mutate({osNotificationEnabled:!m})},k=t=>{r.mutate({thirdPartyChannel:t})},v=()=>{r.mutate({feishuWebhookUrl:n.webhookUrl.trim()||null,thirdPartyBaseUrl:n.baseUrl.trim()||null,taskInReviewTitleTemplate:n.titleTemplate.trim()||"Agent Tower",taskInReviewBodyTemplate:n.bodyTemplate.trim()||'✅ "{taskTitle}" 已完成,等待审查'},{onSuccess:()=>h(!1)})},T=()=>{n.webhookUrl.trim()&&a.mutate({channel:"feishu",webhookUrl:n.webhookUrl.trim(),baseUrl:n.baseUrl.trim()||void 0})};return e.jsxs("div",{className:"px-10 py-6 mx-auto w-full max-w-3xl space-y-8",children:[e.jsxs("section",{children:[e.jsx("h3",{className:"text-[13px] font-semibold text-neutral-900 mb-1",children:"系统通知"}),e.jsx("p",{className:"text-[12px] text-neutral-400 mb-3",children:"任务完成时弹出桌面通知"}),e.jsx("button",{onClick:N,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors ${m?"bg-neutral-900":"bg-neutral-200"}`,children:e.jsx("span",{className:`inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform ${m?"translate-x-[18px]":"translate-x-[3px]"}`})})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-[13px] font-semibold text-neutral-900 mb-1",children:"第三方通知"}),e.jsx("p",{className:"text-[12px] text-neutral-400 mb-3",children:"选择一个第三方渠道接收通知"}),e.jsx(I,{value:b,onChange:t=>k(t),options:K}),b==="feishu"&&e.jsxs("div",{className:"mt-4 space-y-4",children:[e.jsxs("div",{className:"p-4 border border-neutral-100 rounded-lg space-y-3",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"flex items-center gap-1 text-[13px] font-medium text-neutral-700 mb-1",children:[e.jsx(L,{size:12}),"Webhook URL"]}),e.jsx("input",{type:"text",value:n.webhookUrl,onChange:t=>o("webhookUrl",t.target.value),placeholder:"https://open.feishu.cn/open-apis/bot/v2/hook/...",className:"w-full px-3 py-2 border border-neutral-200 rounded-lg text-sm font-mono focus:outline-none focus:ring-1 focus:ring-neutral-300"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(g,{size:"sm",variant:"outline",onClick:T,disabled:!n.webhookUrl.trim()||a.isPending,children:[a.isPending&&e.jsx(P,{size:12,className:"animate-spin mr-1"}),"测试发送"]}),f==="success"&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-green-600",children:[e.jsx(q,{size:12}),"发送成功"]}),f==="error"&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-red-500",children:[e.jsx(R,{size:12}),"发送失败"]})]})]}),e.jsx("div",{className:"p-4 border border-neutral-100 rounded-lg space-y-3",children:e.jsxs("div",{children:[e.jsx("label",{className:"block text-[13px] font-medium text-neutral-700 mb-1",children:"跳转地址(用于生成任务链接)"}),e.jsx("input",{type:"text",value:n.baseUrl,onChange:t=>o("baseUrl",t.target.value),placeholder:"http://localhost:5173",className:"w-full px-3 py-2 border border-neutral-200 rounded-lg text-sm font-mono focus:outline-none focus:ring-1 focus:ring-neutral-300"}),e.jsxs("p",{className:"text-[11px] text-neutral-400 mt-1",children:['通知卡片中的"查看任务"按钮将跳转到 ',"{baseUrl}/projects/{projectId}/tasks/{taskId}"]})]})})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-[13px] font-semibold text-neutral-900 mb-1",children:"通知模板"}),e.jsxs("p",{className:"text-[12px] text-neutral-400 mb-3",children:["支持变量: ","{taskTitle}",", ","{taskId}",", ","{projectId}",", ","{projectName}",", ","{status}"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[13px] font-medium text-neutral-700 mb-1",children:"标题模板"}),e.jsx("input",{type:"text",value:n.titleTemplate,onChange:t=>o("titleTemplate",t.target.value),placeholder:"Agent Tower",className:"w-full px-3 py-2 border border-neutral-200 rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-neutral-300"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[13px] font-medium text-neutral-700 mb-1",children:"内容模板"}),e.jsx("textarea",{value:n.bodyTemplate,onChange:t=>o("bodyTemplate",t.target.value),placeholder:'✅ "{taskTitle}" 已完成,等待审查',rows:2,className:"w-full px-3 py-2 border border-neutral-200 rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-neutral-300 resize-none"})]})]})]}),u&&e.jsx("div",{className:"sticky bottom-6 flex justify-end",children:e.jsx(g,{size:"sm",onClick:v,disabled:r.isPending,children:r.isPending?"保存中...":"保存所有更改"})})]})}export{G as NotificationSettingsPage};
@@ -1,3 +0,0 @@
1
- import{r as o,j as e}from"./index-B-QFtMnj.js";import{u as J,a as V,b as $,c as L}from"./use-profiles-DJwSheDq.js";import{B as N}from"./api-client-CgvcCTaj.js";import{T as A,M as D}from"./modal-CCInxYr_.js";import{P as I}from"./x-Bz9Stptu.js";import{P as M}from"./pencil-u5vhUMho.js";import"./query-keys-BGgDKleg.js";function U(i){return Object.entries(i).map(([c,u])=>`${c}: ${JSON.stringify(u)}`).join(", ")}const g={CLAUDE_CODE:"Claude Code",GEMINI_CLI:"Gemini CLI",CURSOR_AGENT:"Cursor Agent"};function q(){const{data:i,isLoading:c}=J(),{data:u}=V(),d=$(),v=L(),[r,a]=o.useState(null),[f,x]=o.useState(""),[m,p]=o.useState(""),[h,l]=o.useState(""),C=(t,s,n)=>{a({agentType:t,variant:s,config:n,isNew:!1}),p(s),x(JSON.stringify(n,null,2)),l("")},S=t=>{a({agentType:t,variant:"",config:{},isNew:!0}),p(""),x(`{
2
-
3
- }`),l("")},E=()=>{if(!(!r||!m.trim()))try{const t=JSON.parse(f);l(""),d.mutate({agentType:r.agentType,variant:m.trim().toUpperCase(),config:t},{onSuccess:()=>a(null)})}catch{l("JSON 格式错误")}},w=(t,s)=>{confirm(`确定删除 ${t} / ${s}?`)&&v.mutate({agentType:t,variant:s})},y=(t,s)=>!!u?.executors[t]?.[s];if(c)return e.jsx("div",{className:"p-6 text-sm text-neutral-400",children:"加载中..."});const O=i?.executors??{};return e.jsxs("div",{className:"px-10 py-6 mx-auto w-full max-w-3xl",children:[Object.entries(O).map(([t,s])=>e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h3",{className:"text-[13px] font-semibold text-neutral-900",children:g[t]??t}),e.jsxs("button",{onClick:()=>S(t),className:"flex items-center gap-1 text-xs text-neutral-400 hover:text-neutral-900 transition-colors",children:[e.jsx(I,{size:12}),e.jsx("span",{children:"新增"})]})]}),e.jsx("div",{className:"border border-neutral-100 rounded-lg overflow-hidden",children:Object.entries(s).map(([n,b],P,k)=>{const j=y(t,n);return e.jsxs("div",{className:`flex items-center gap-3 px-4 py-2.5 hover:bg-neutral-50 transition-colors group ${P<k.length-1?"border-b border-neutral-100":""}`,children:[e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-semibold tracking-wide ${n==="DEFAULT"?"bg-blue-50 text-blue-600":"bg-neutral-50 text-neutral-600"}`,children:n}),e.jsx("span",{className:"flex-1 text-[12px] text-neutral-400 font-mono truncate",children:U(b)}),j&&e.jsx("span",{className:"text-[11px] text-neutral-300 font-medium",children:"内置"}),e.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx("button",{onClick:()=>C(t,n,b),className:"p-1 text-neutral-300 hover:text-neutral-700 rounded transition-colors",children:e.jsx(M,{size:13})}),!j&&e.jsx("button",{onClick:()=>w(t,n),className:"p-1 text-neutral-300 hover:text-red-500 rounded transition-colors",children:e.jsx(A,{size:13})})]})]},n)})})]},t)),e.jsx(D,{isOpen:!!r,onClose:()=>a(null),title:r?.isNew?`新增 Variant — ${g[r.agentType]??r.agentType}`:`编辑 ${r?.variant}`,action:e.jsxs(e.Fragment,{children:[e.jsx(N,{variant:"outline",onClick:()=>a(null),children:"取消"}),e.jsx(N,{onClick:E,disabled:d.isPending,children:d.isPending?"保存中...":"保存"})]}),children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[13px] font-medium text-neutral-700 mb-1",children:"Variant 名称"}),e.jsx("input",{type:"text",value:m,onChange:t=>p(t.target.value),disabled:!r?.isNew,placeholder:"例如: CUSTOM",className:"w-full px-3 py-2 border border-neutral-200 rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-neutral-300 disabled:bg-neutral-50 disabled:text-neutral-500 font-mono"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[13px] font-medium text-neutral-700 mb-1",children:"配置 (JSON)"}),e.jsx("textarea",{value:f,onChange:t=>{x(t.target.value),l("")},rows:6,className:"w-full px-3 py-2 border border-neutral-200 rounded-lg text-sm font-mono focus:outline-none focus:ring-1 focus:ring-neutral-300 resize-none"}),h&&e.jsx("p",{className:"mt-1 text-xs text-red-500",children:h})]})]})})]})}export{q as ProfileSettingsPage};