apteva 0.4.41 → 0.4.48

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 (103) hide show
  1. package/dist/ActivityPage.sw9p594m.js +3 -0
  2. package/dist/ApiDocsPage.90e03bz7.js +4 -0
  3. package/dist/App.0ws87fpx.js +53 -0
  4. package/dist/App.3vnrera5.js +4 -0
  5. package/dist/App.94x6mh7f.js +20 -0
  6. package/dist/{App.7fb3e7mp.js → App.9sryp183.js} +1 -1
  7. package/dist/App.d9tny4t0.js +221 -0
  8. package/dist/App.jhb45d7r.js +8 -0
  9. package/dist/App.p7jjw1zf.js +4 -0
  10. package/dist/App.pfbdzrhh.js +4 -0
  11. package/dist/App.stgng5bx.js +13 -0
  12. package/dist/App.tm3k7h4b.js +4 -0
  13. package/dist/App.vkg121c6.js +4 -0
  14. package/dist/App.wghtdzsk.js +1 -0
  15. package/dist/App.xf7wsckg.js +4 -0
  16. package/dist/App.xva0tfzh.js +4 -0
  17. package/dist/App.ysxy7akk.js +61 -0
  18. package/dist/App.yzkh4gq2.js +4 -0
  19. package/dist/ConnectionsPage.q5f9fd37.js +3 -0
  20. package/dist/McpPage.f3ccrezb.js +3 -0
  21. package/dist/SettingsPage.3sqx6wm4.js +3 -0
  22. package/dist/SkillsPage.whxnez67.js +3 -0
  23. package/dist/TasksPage.zp4jfevw.js +3 -0
  24. package/dist/TelemetryPage.a9fmxq87.js +3 -0
  25. package/dist/TestsPage.18krj0d1.js +3 -0
  26. package/dist/ThreadsPage.nnphgy98.js +3 -0
  27. package/dist/apteva-kit.css +1 -1
  28. package/dist/index.html +1 -1
  29. package/dist/styles.css +1 -1
  30. package/package.json +11 -10
  31. package/src/db.ts +61 -13
  32. package/src/integrations/agentdojo.ts +1 -0
  33. package/src/mcp-platform.ts +418 -63
  34. package/src/openapi.ts +96 -0
  35. package/src/providers.ts +55 -24
  36. package/src/routes/api/agent-utils.ts +25 -4
  37. package/src/routes/api/agents.ts +19 -1
  38. package/src/routes/api/meta-agent.ts +2 -0
  39. package/src/routes/api/system.ts +90 -1
  40. package/src/routes/api/telemetry.ts +38 -2
  41. package/src/routes/share.ts +85 -0
  42. package/src/server.ts +64 -1
  43. package/src/web/App.tsx +89 -11
  44. package/src/web/components/activity/ActivityPage.tsx +14 -14
  45. package/src/web/components/agents/AgentCard.tsx +19 -17
  46. package/src/web/components/agents/AgentPanel.tsx +541 -220
  47. package/src/web/components/agents/AgentsView.tsx +4 -4
  48. package/src/web/components/agents/CreateAgentModal.tsx +24 -82
  49. package/src/web/components/api/ApiDocsPage.tsx +66 -66
  50. package/src/web/components/auth/CreateAccountStep.tsx +16 -16
  51. package/src/web/components/auth/LoginPage.tsx +10 -10
  52. package/src/web/components/common/LoadingSpinner.tsx +2 -2
  53. package/src/web/components/common/Modal.tsx +9 -9
  54. package/src/web/components/common/Select.tsx +9 -9
  55. package/src/web/components/connections/ConnectionsPage.tsx +4 -4
  56. package/src/web/components/connections/IntegrationsTab.tsx +18 -18
  57. package/src/web/components/connections/OverviewTab.tsx +13 -13
  58. package/src/web/components/connections/TriggersTab.tsx +99 -99
  59. package/src/web/components/dashboard/Dashboard.tsx +32 -32
  60. package/src/web/components/layout/Header.tsx +50 -34
  61. package/src/web/components/layout/Sidebar.tsx +35 -15
  62. package/src/web/components/mcp/IntegrationsPanel.tsx +40 -40
  63. package/src/web/components/mcp/McpPage.tsx +208 -208
  64. package/src/web/components/meta-agent/MetaAgent.tsx +12 -10
  65. package/src/web/components/onboarding/OnboardingWizard.tsx +25 -25
  66. package/src/web/components/settings/SettingsPage.tsx +291 -175
  67. package/src/web/components/skills/SkillsPage.tsx +88 -88
  68. package/src/web/components/tasks/TasksPage.tsx +539 -78
  69. package/src/web/components/telemetry/TelemetryPage.tsx +405 -65
  70. package/src/web/components/tests/TestsPage.tsx +50 -50
  71. package/src/web/components/threads/ThreadsPage.tsx +23 -21
  72. package/src/web/context/ProjectContext.tsx +6 -1
  73. package/src/web/context/ThemeContext.tsx +90 -0
  74. package/src/web/context/index.ts +2 -0
  75. package/src/web/index.html +1 -6
  76. package/src/web/styles.css +52 -3
  77. package/src/web/themes.ts +162 -0
  78. package/src/web/types.ts +0 -4
  79. package/dist/ActivityPage.7907h64p.js +0 -3
  80. package/dist/ApiDocsPage.k3jjenpq.js +0 -4
  81. package/dist/App.01nq20st.js +0 -4
  82. package/dist/App.1maqvamf.js +0 -4
  83. package/dist/App.2yjrh32f.js +0 -4
  84. package/dist/App.3qw8nben.js +0 -20
  85. package/dist/App.7sy3wq8c.js +0 -4
  86. package/dist/App.apjrmctz.js +0 -57
  87. package/dist/App.av6t2yhe.js +0 -4
  88. package/dist/App.jqj5a094.js +0 -46
  89. package/dist/App.mc7xf85h.js +0 -4
  90. package/dist/App.myxqcj9x.js +0 -4
  91. package/dist/App.nm91r1mp.js +0 -13
  92. package/dist/App.p02f4ret.js +0 -1
  93. package/dist/App.qcknavjz.js +0 -221
  94. package/dist/App.vc7vfhg4.js +0 -4
  95. package/dist/App.z4s9zkw5.js +0 -4
  96. package/dist/ConnectionsPage.z1pw5xe2.js +0 -3
  97. package/dist/McpPage.8vc97z0b.js +0 -3
  98. package/dist/SettingsPage.p61bz8kd.js +0 -3
  99. package/dist/SkillsPage.r9x43g3g.js +0 -3
  100. package/dist/TasksPage.1e0zkye4.js +0 -3
  101. package/dist/TelemetryPage.p9vbe4gf.js +0 -3
  102. package/dist/TestsPage.d4xy504e.js +0 -3
  103. package/dist/ThreadsPage.m016am3x.js +0 -3
@@ -0,0 +1,8 @@
1
+ import{$ as P,X as $,Y as U}from"./App.94x6mh7f.js";var I=U((C)=>{var Y=$(P());(function(){function z(){}function K(q){return""+q}function L(q,A,w){var M=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{K(M);var Q=!1}catch(X){Q=!0}return Q&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol==="function"&&Symbol.toStringTag&&M[Symbol.toStringTag]||M.constructor.name||"Object"),K(M)),{$$typeof:J,key:M==null?null:""+M,children:q,containerInfo:A,implementation:w}}function B(q,A){if(q==="font")return"";if(typeof A==="string")return A==="use-credentials"?A:""}function G(q){return q===null?"`null`":q===void 0?"`undefined`":q===""?"an empty string":'something with type "'+typeof q+'"'}function N(q){return q===null?"`null`":q===void 0?"`undefined`":q===""?"an empty string":typeof q==="string"?JSON.stringify(q):typeof q==="number"?"`"+q+"`":'something with type "'+typeof q+'"'}function Z(){var q=R.H;return q===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
2
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
3
+ 2. You might be breaking the Rules of Hooks
4
+ 3. You might have more than one copy of React in the same app
5
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),q}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var H={d:{f:z,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:z,C:z,L:z,m:z,X:z,S:z,M:z},p:0,findDOMNode:null},J=Symbol.for("react.portal"),R=Y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),C.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,C.createPortal=function(q,A){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!A||A.nodeType!==1&&A.nodeType!==9&&A.nodeType!==11)throw Error("Target container is not a DOM element.");return L(q,A,null,w)},C.flushSync=function(q){var A=R.T,w=H.p;try{if(R.T=null,H.p=2,q)return q()}finally{R.T=A,H.p=w,H.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},C.preconnect=function(q,A){typeof q==="string"&&q?A!=null&&typeof A!=="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",N(A)):A!=null&&typeof A.crossOrigin!=="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",G(A.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",G(q)),typeof q==="string"&&(A?(A=A.crossOrigin,A=typeof A==="string"?A==="use-credentials"?A:"":void 0):A=null,H.d.C(q,A))},C.prefetchDNS=function(q){if(typeof q!=="string"||!q)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",G(q));else if(1<arguments.length){var A=arguments[1];typeof A==="object"&&A.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",N(A)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",N(A))}typeof q==="string"&&H.d.D(q)},C.preinit=function(q,A){if(typeof q==="string"&&q?A==null||typeof A!=="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",N(A)):A.as!=="style"&&A.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',N(A.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",G(q)),typeof q==="string"&&A&&typeof A.as==="string"){var w=A.as,M=B(w,A.crossOrigin),Q=typeof A.integrity==="string"?A.integrity:void 0,X=typeof A.fetchPriority==="string"?A.fetchPriority:void 0;w==="style"?H.d.S(q,typeof A.precedence==="string"?A.precedence:void 0,{crossOrigin:M,integrity:Q,fetchPriority:X}):w==="script"&&H.d.X(q,{crossOrigin:M,integrity:Q,fetchPriority:X,nonce:typeof A.nonce==="string"?A.nonce:void 0})}},C.preinitModule=function(q,A){var w="";if(typeof q==="string"&&q||(w+=" The `href` argument encountered was "+G(q)+"."),A!==void 0&&typeof A!=="object"?w+=" The `options` argument encountered was "+G(A)+".":A&&("as"in A)&&A.as!=="script"&&(w+=" The `as` option encountered was "+N(A.as)+"."),w)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",w);else switch(w=A&&typeof A.as==="string"?A.as:"script",w){case"script":break;default:w=N(w),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',w,q)}if(typeof q==="string")if(typeof A==="object"&&A!==null){if(A.as==null||A.as==="script")w=B(A.as,A.crossOrigin),H.d.M(q,{crossOrigin:w,integrity:typeof A.integrity==="string"?A.integrity:void 0,nonce:typeof A.nonce==="string"?A.nonce:void 0})}else A==null&&H.d.M(q)},C.preload=function(q,A){var w="";if(typeof q==="string"&&q||(w+=" The `href` argument encountered was "+G(q)+"."),A==null||typeof A!=="object"?w+=" The `options` argument encountered was "+G(A)+".":typeof A.as==="string"&&A.as||(w+=" The `as` option encountered was "+G(A.as)+"."),w&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',w),typeof q==="string"&&typeof A==="object"&&A!==null&&typeof A.as==="string"){w=A.as;var M=B(w,A.crossOrigin);H.d.L(q,w,{crossOrigin:M,integrity:typeof A.integrity==="string"?A.integrity:void 0,nonce:typeof A.nonce==="string"?A.nonce:void 0,type:typeof A.type==="string"?A.type:void 0,fetchPriority:typeof A.fetchPriority==="string"?A.fetchPriority:void 0,referrerPolicy:typeof A.referrerPolicy==="string"?A.referrerPolicy:void 0,imageSrcSet:typeof A.imageSrcSet==="string"?A.imageSrcSet:void 0,imageSizes:typeof A.imageSizes==="string"?A.imageSizes:void 0,media:typeof A.media==="string"?A.media:void 0})}},C.preloadModule=function(q,A){var w="";typeof q==="string"&&q||(w+=" The `href` argument encountered was "+G(q)+"."),A!==void 0&&typeof A!=="object"?w+=" The `options` argument encountered was "+G(A)+".":A&&("as"in A)&&typeof A.as!=="string"&&(w+=" The `as` option encountered was "+G(A.as)+"."),w&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',w),typeof q==="string"&&(A?(w=B(A.as,A.crossOrigin),H.d.m(q,{as:typeof A.as==="string"&&A.as!=="script"?A.as:void 0,crossOrigin:w,integrity:typeof A.integrity==="string"?A.integrity:void 0})):H.d.m(q))},C.requestFormReset=function(q){H.d.r(q)},C.unstable_batchedUpdates=function(q,A){return q(A)},C.useFormState=function(q,A,w){return Z().useFormState(q,A,w)},C.useFormStatus=function(){return Z().useHostTransitionStatus()},C.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var _=U((g,T)=>{var S=$(I());T.exports=S});function v(z){var K,L,B="";if(typeof z=="string"||typeof z=="number")B+=z;else if(typeof z=="object")if(Array.isArray(z)){var G=z.length;for(K=0;K<G;K++)z[K]&&(L=v(z[K]))&&(B&&(B+=" "),B+=L)}else for(L in z)z[L]&&(B&&(B+=" "),B+=L);return B}function f(){for(var z,K,L=0,B="",G=arguments.length;L<G;L++)(z=arguments[L])&&(K=v(z))&&(B&&(B+=" "),B+=K);return B}
6
+ export{_ as V,f as W};
7
+
8
+ //# debugId=DB1348566379174F64756E2164756E21
@@ -0,0 +1,4 @@
1
+ import{$ as b,X as s,aa as d}from"./App.94x6mh7f.js";var r=s(b(),1),e=s(d(),1);function h({value:o,options:i,onChange:v,placeholder:m="Select...",compact:u}){let[a,l]=r.useState(!1),c=r.useRef(null),n=i.find((t)=>t.value===o);return r.useEffect(()=>{function t(f){if(c.current&&!c.current.contains(f.target))l(!1)}return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[]),e.jsxDEV("div",{ref:c,className:"relative",children:[e.jsxDEV("button",{type:"button",onClick:()=>l(!a),className:`w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] btn ${u?"px-2.5 py-1.5 text-sm":"px-3 py-2"} text-left flex items-center justify-between focus:outline-none focus:border-[var(--color-accent)] text-[var(--color-text)] hover:border-[var(--color-border-light)] transition`,children:[e.jsxDEV("span",{className:n?"text-[var(--color-text)]":"text-[var(--color-text-muted)]",children:n?e.jsxDEV(e.Fragment,{children:[n.label,n.recommended&&e.jsxDEV("span",{className:"text-[var(--color-accent)] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):m},void 0,!1,void 0,this),e.jsxDEV(p,{isOpen:a},void 0,!1,void 0,this)]},void 0,!0,void 0,this),a&&e.jsxDEV("div",{className:"absolute z-50 w-full min-w-max mt-1 bg-[var(--color-surface)] border border-[var(--color-border-light)] shadow-lg max-h-60 overflow-y-auto scrollbar-hide",style:{borderRadius:"var(--radius-button)"},children:i.map((t)=>e.jsxDEV("button",{type:"button",onClick:()=>{v(t.value),l(!1)},className:`w-full ${u?"px-2.5 py-1.5 text-sm":"px-3 py-2"} text-left flex items-center justify-between hover:bg-[var(--color-surface-raised)] transition ${t.value===o?"bg-[var(--color-surface-raised)] text-[var(--color-accent)]":"text-[var(--color-text)]"}`,children:[e.jsxDEV("span",{children:[t.label,t.recommended&&e.jsxDEV("span",{className:"text-[var(--color-accent)] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),t.value===o&&e.jsxDEV("svg",{className:"w-4 h-4 text-[var(--color-accent)]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},t.value,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function p({isOpen:o}){return e.jsxDEV("svg",{className:`w-4 h-4 text-[var(--color-text-muted)] transition-transform ${o?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}
2
+ export{h as U};
3
+
4
+ //# debugId=A830E20FD61DEFBB64756E2164756E21
@@ -0,0 +1,4 @@
1
+ import{O as V}from"./App.vkg121c6.js";import{U as D}from"./App.p7jjw1zf.js";import{$ as Kk,X as P,aa as v,da as i,ja as o,ma as d}from"./App.94x6mh7f.js";var J=P(Kk(),1);var q=P(v(),1);function Yk(){let{authFetch:K}=o(),{currentProjectId:X}=d(),{confirm:j,ConfirmDialog:E}=V(),[$,x]=J.useState([]),[A,c]=J.useState([]),[a,u]=J.useState(!0),[r,Y]=J.useState(!1),[H,C]=J.useState(null),[T,Q]=J.useState(new Set),[F,R]=J.useState(!1),[y,I]=J.useState(null),[w,f]=J.useState(null),[S,U]=J.useState({}),[M,N]=J.useState(""),[b,L]=J.useState(""),[g,B]=J.useState(""),Z=X&&X!=="all"&&X!=="unassigned"?X:null,n=Z?A.filter((k)=>k.projectId===Z):A,{events:p}=i({category:"test",limit:50}),_=J.useRef(new Set);J.useEffect(()=>{for(let k of p){if(_.current.has(k.id))continue;_.current.add(k.id);let z=k.data?.test_case_id;if(!z)continue;if(k.type==="test_started")U((G)=>({...G,[z]:{phase:"starting"}})),Q((G)=>new Set(G).add(z));else if(k.type==="test_planning")U((G)=>({...G,[z]:{phase:"planning"}}));else if(k.type==="test_executing"){let G=k.data?.agent_name;U((O)=>({...O,[z]:{phase:"executing",detail:G}}))}else if(k.type==="test_judging")U((G)=>({...G,[z]:{phase:"judging"}}));else if(k.type==="test_completed")U((G)=>{let O={...G};return delete O[z],O}),Q((G)=>{let O=new Set(G);return O.delete(z),O}),W()}if(_.current.size>500)_.current=new Set([..._.current].slice(-200))},[p]);let W=async()=>{try{let k=Z?`?project_id=${Z}`:"",z=await K(`/api/tests${k}`);if(z.ok)x(await z.json())}catch{}u(!1)},s=async()=>{try{let k=await K("/api/agents");if(k.ok){let z=await k.json();c((z.agents||z).map((G)=>({id:G.id,name:G.name,status:G.status,provider:G.provider,model:G.model,projectId:G.projectId||null})))}}catch{}};J.useEffect(()=>{Promise.all([W(),s()])},[X]);let l=()=>{C(null),N(""),L(""),B(""),Y(!0)},t=(k)=>{C(k),N(k.name),L(k.behavior||""),B(k.agent_id||""),Y(!0)},e=async()=>{if(!M||!b)return;let k={name:M,behavior:b,agent_id:g||null,project_id:Z||void 0};if(H)await K(`/api/tests/${H.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)});else await K("/api/tests",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)});Y(!1),W()},kk=async(k)=>{if(!await j("Delete this test case? Run history will also be deleted."))return;await K(`/api/tests/${k}`,{method:"DELETE"}),W()},qk=async(k)=>{Q((z)=>new Set(z).add(k));try{await K(`/api/tests/${k}/run`,{method:"POST"}),await W()}catch{}Q((z)=>{let G=new Set(z);return G.delete(k),G}),U((z)=>{let G={...z};return delete G[k],G})},zk=async()=>{R(!0);try{let k=$.map((z)=>z.id);Q(new Set(k)),await K("/api/tests/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({test_case_ids:k})}),await W()}catch{}Q(new Set),R(!1)},Gk=async(k)=>{try{let z=await K(`/api/tests/${k}/runs`);if(z.ok)I({testId:k,runs:await z.json()})}catch{}},h={starting:{label:"Starting",color:"bg-blue-900/50 text-blue-400 border-blue-500/30"},planning:{label:"Planning",color:"bg-purple-900/50 text-purple-400 border-purple-500/30"},executing:{label:"Executing",color:"bg-cyan-900/50 text-cyan-400 border-cyan-500/30"},judging:{label:"Judging",color:"bg-amber-900/50 text-amber-400 border-amber-500/30"}},m=(k)=>{return q.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${{passed:"bg-green-900/50 text-green-400",failed:"bg-red-900/50 text-red-400",error:"bg-yellow-900/50 text-yellow-400",running:"bg-blue-900/50 text-blue-400"}[k]||"bg-[var(--color-surface-raised)] text-[var(--color-text-muted)]"}`,children:k.toUpperCase()},void 0,!1,void 0,this)},Jk=(k)=>{let z=S[k];if(!z)return null;let G=h[z.phase]||h.starting;return q.jsxDEV("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-medium border ${G.color} animate-pulse`,children:[q.jsxDEV("span",{className:"w-1.5 h-1.5 rounded-full bg-current"},void 0,!1,void 0,this),G.label,z.detail?` · ${z.detail}`:""]},void 0,!0,void 0,this)};return q.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[E,q.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[q.jsxDEV("div",{children:[q.jsxDEV("h1",{className:"text-xl font-bold",children:"Tests"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:"Describe behavior, AI handles the rest"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"flex gap-2",children:[$.length>0&&q.jsxDEV("button",{onClick:zk,disabled:F,className:"px-4 py-2 bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] text-[var(--color-text)] rounded text-sm font-medium transition disabled:opacity-50",children:F?"Running...":"Run All"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:l,className:"px-4 py-2 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] text-white rounded text-sm font-medium transition",children:"+ New Test"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),a?q.jsxDEV("div",{className:"text-[var(--color-text-muted)] text-sm",children:"Loading..."},void 0,!1,void 0,this):$.length===0?q.jsxDEV("div",{className:"text-center py-16",children:[q.jsxDEV("div",{className:"text-[var(--color-border-light)] text-4xl mb-4",children:q.jsxDEV("svg",{className:"w-12 h-12 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:q.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-[var(--color-text-muted)] mb-2",children:"No tests yet"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-xs text-[var(--color-text-faint)] mb-4",children:"Describe what your agents should do and let AI verify it"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:l,className:"px-4 py-2 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] text-white rounded text-sm font-medium transition",children:"Create your first test"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):q.jsxDEV("div",{className:"space-y-3",children:$.map((k)=>q.jsxDEV("div",{className:"bg-[var(--color-surface)] card p-4",children:q.jsxDEV("div",{className:"flex items-start justify-between",children:[q.jsxDEV("div",{className:"flex-1 min-w-0",children:[q.jsxDEV("div",{className:"flex items-center gap-2 mb-1",children:[q.jsxDEV("span",{className:"font-medium text-sm",children:k.name},void 0,!1,void 0,this),S[k.id]?Jk(k.id):k.last_run&&q.jsxDEV(q.Fragment,{children:[m(k.last_run.status),k.last_run.score!=null&&q.jsxDEV("span",{className:"text-xs text-[var(--color-text-secondary)] font-mono",children:[k.last_run.score,"/10"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.behavior&&q.jsxDEV("p",{className:"text-xs text-[var(--color-text-secondary)] mb-1.5 line-clamp-2",children:k.behavior},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-xs text-[var(--color-text-muted)] space-y-0.5",children:[q.jsxDEV("div",{children:["Agent:"," ",q.jsxDEV("span",{className:"text-[var(--color-text-secondary)]",children:k.agent_name||(k.last_run?.selected_agent_name?`${k.last_run.selected_agent_name} (auto-selected)`:"Auto (AI picks)")},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.last_run?.generated_message&&q.jsxDEV("div",{className:"truncate",children:["Message: ",q.jsxDEV("span",{className:"text-[var(--color-text-secondary)]",children:['"',k.last_run.generated_message,'"']},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.input_message&&!k.last_run?.generated_message&&q.jsxDEV("div",{className:"truncate",children:["Message: ",q.jsxDEV("span",{className:"text-[var(--color-text-secondary)]",children:['"',k.input_message,'"']},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.last_run&&q.jsxDEV("div",{children:["Last run:"," ",q.jsxDEV("span",{className:"text-[var(--color-text-secondary)]",children:[k.last_run.duration_ms?`${(k.last_run.duration_ms/1000).toFixed(1)}s`:"---",k.last_run.judge_reasoning&&` --- "${k.last_run.judge_reasoning.slice(0,80)}${k.last_run.judge_reasoning.length>80?"...":""}"`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"flex items-center gap-1 ml-3 shrink-0",children:[q.jsxDEV("button",{onClick:()=>Gk(k.id),className:"px-2 py-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-raised)] rounded transition",title:"View run history",children:"History"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>qk(k.id),disabled:T.has(k.id),className:"px-3 py-1 text-xs bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] text-[var(--color-text)] rounded transition disabled:opacity-50",children:T.has(k.id)?"Running...":"Run"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>t(k),className:"px-2 py-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-raised)] rounded transition",children:"Edit"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>kk(k.id),className:"px-2 py-1 text-xs text-[var(--color-text-muted)] hover:text-red-400 hover:bg-[var(--color-surface-raised)] rounded transition",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},k.id,!1,void 0,this))},void 0,!1,void 0,this),y&&q.jsxDEV("div",{className:"mt-6",children:[q.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[q.jsxDEV("h2",{className:"text-sm font-bold text-[var(--color-text-secondary)]",children:"Run History"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>{I(null),f(null)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]",children:"Close"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y.runs.length===0?q.jsxDEV("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No runs yet"},void 0,!1,void 0,this):q.jsxDEV("div",{className:"space-y-2",children:y.runs.map((k)=>q.jsxDEV("div",{className:"bg-[var(--color-bg-secondary)] border border-[var(--color-border)] rounded p-3",children:[q.jsxDEV("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>f(w===k.id?null:k.id),children:[q.jsxDEV("div",{className:"flex items-center gap-3",children:[m(k.status),q.jsxDEV("span",{className:"text-xs text-[var(--color-text-muted)]",children:k.duration_ms?`${(k.duration_ms/1000).toFixed(1)}s`:"---"},void 0,!1,void 0,this),k.score!=null&&q.jsxDEV("span",{className:"text-xs text-[var(--color-text-secondary)] font-mono",children:[k.score,"/10"]},void 0,!0,void 0,this),k.selected_agent_name&&q.jsxDEV("span",{className:"text-xs text-[var(--color-text-faint)]",children:["Agent: ",k.selected_agent_name]},void 0,!0,void 0,this),q.jsxDEV("span",{className:"text-xs text-[var(--color-text-faint)]",children:new Date(k.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("span",{className:"text-xs text-[var(--color-text-faint)]",children:w===k.id?"---":"+"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w===k.id&&q.jsxDEV("div",{className:"mt-3 space-y-2",children:[k.planner_reasoning&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-[var(--color-text-muted)] mb-1",children:"Planner:"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded",children:[k.selected_agent_name&&q.jsxDEV("span",{className:"text-[var(--color-accent)]",children:k.selected_agent_name},void 0,!1,void 0,this),k.selected_agent_name&&" --- ",k.planner_reasoning]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.generated_message&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-[var(--color-text-muted)] mb-1",children:"Generated Message:"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded",children:['"',k.generated_message,'"']},void 0,!0,void 0,this)]},void 0,!0,void 0,this),k.judge_reasoning&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-[var(--color-text-muted)] mb-1",children:"Judge:"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded",children:k.judge_reasoning},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.error&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-red-400 mb-1",children:"Error:"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-sm text-red-300 bg-[var(--color-bg)] p-2 rounded",children:k.error},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k.agent_response&&q.jsxDEV("div",{children:[q.jsxDEV("div",{className:"text-xs text-[var(--color-text-muted)] mb-1",children:"Agent Response (Thread):"},void 0,!1,void 0,this),q.jsxDEV("pre",{className:"text-xs text-[var(--color-text-secondary)] bg-[var(--color-bg)] p-2 rounded overflow-auto max-h-64",children:k.agent_response},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},k.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),r&&q.jsxDEV("div",{className:"fixed inset-0 bg-black/60 z-50 flex items-center justify-center",onClick:()=>Y(!1),children:q.jsxDEV("div",{className:"bg-[var(--color-surface)] card w-full max-w-lg mx-4 p-6",onClick:(k)=>k.stopPropagation(),children:[q.jsxDEV("h2",{className:"text-lg font-bold mb-4",children:H?"Edit Test":"New Test"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"space-y-4",children:[q.jsxDEV("div",{children:[q.jsxDEV("label",{className:"block text-xs text-[var(--color-text-muted)] mb-1",children:"Name"},void 0,!1,void 0,this),q.jsxDEV("input",{value:M,onChange:(k)=>N(k.target.value),placeholder:"e.g. Social Media Posting",className:"w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded px-3 py-2 text-sm focus:outline-none focus:border-[var(--color-accent)]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{children:[q.jsxDEV("label",{className:"block text-xs text-[var(--color-text-muted)] mb-1",children:"Behavior"},void 0,!1,void 0,this),q.jsxDEV("textarea",{value:b,onChange:(k)=>L(k.target.value),placeholder:"Describe what should happen, e.g. 'When asked to post on social media, the agent creates a proper post with relevant hashtags and confirms it was published'",rows:3,className:"w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded px-3 py-2 text-sm focus:outline-none focus:border-[var(--color-accent)] resize-none"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-xs text-[var(--color-text-faint)] mt-1",children:"AI will generate the test message and evaluate results based on this"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{children:[q.jsxDEV("label",{className:"block text-xs text-[var(--color-text-muted)] mb-1",children:"Agent"},void 0,!1,void 0,this),q.jsxDEV(D,{value:g,onChange:B,placeholder:"Auto (AI picks the best agent)",options:n.map((k)=>({value:k.id,label:`${k.name} (${k.status})`}))},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-xs text-[var(--color-text-faint)] mt-1",children:"Leave empty to let AI choose the right agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"flex justify-end gap-2 mt-6",children:[q.jsxDEV("button",{onClick:()=>Y(!1),className:"px-4 py-2 text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-text)] transition",children:"Cancel"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:e,disabled:!M||!b,className:"px-4 py-2 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] disabled:opacity-50 text-white rounded text-sm font-medium transition",children:H?"Save":"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}
2
+ export{Yk as M};
3
+
4
+ //# debugId=2D14C6A7BC29E53364756E2164756E21
@@ -0,0 +1,13 @@
1
+ import{O as Oz,P as Wz}from"./App.vkg121c6.js";import{U as j}from"./App.p7jjw1zf.js";import{$ as Qz,X as n,aa as zz,ja as Jz,ma as Kz}from"./App.94x6mh7f.js";var W=n(Qz(),1);var z=n(zz(),1);function Rz(){let{authFetch:K}=Jz(),{projects:Z,currentProjectId:Y}=Kz(),[B,N]=W.useState([]),[y,M]=W.useState(!0),[X,U]=W.useState("installed"),[G,Q]=W.useState(!1),[C,H]=W.useState(!1),[v,T]=W.useState(null),{confirm:f,ConfirmDialog:w}=Oz(),{alert:P,AlertDialog:d}=Wz(),_=Z.length>0,[m,p]=W.useState(""),[h,Xz]=W.useState([]),[c,r]=W.useState(!1),[Yz,o]=W.useState(null),[a,i]=W.useState(""),[R,t]=W.useState([]),[I,u]=W.useState(!1),[V,b]=W.useState(null),[q,l]=W.useState(null),[e,S]=W.useState(null),[x,Zz]=W.useState(Y&&Y!=="unassigned"?Y:null),D=B.filter((J)=>{if(!Y)return!0;if(Y==="unassigned")return J.project_id===null;return J.project_id===null||J.project_id===Y}),F=async()=>{try{let O=await(await K("/api/skills")).json();N(O.skills||[])}catch(J){console.error("Failed to fetch skills:",J)}M(!1)},E=async(J)=>{r(!0);try{let O=J!==void 0?J:m,$=O?`/api/skills/marketplace/search?q=${encodeURIComponent(O)}`:"/api/skills/marketplace/featured",A=await(await K($)).json();Xz(A.skills||[])}catch(O){console.error("Failed to search marketplace:",O)}r(!1)};W.useEffect(()=>{F()},[K]),W.useEffect(()=>{if(X==="marketplace"&&h.length===0)E("")},[X]);let _z=async(J)=>{try{await K(`/api/skills/${J}/toggle`,{method:"POST"}),F()}catch(O){console.error("Failed to toggle skill:",O)}},$z=async(J)=>{if(!await f("Delete this skill?",{confirmText:"Delete",title:"Delete Skill"}))return;try{if(await K(`/api/skills/${J}`,{method:"DELETE"}),v?.id===J)T(null);F()}catch($){console.error("Failed to delete skill:",$)}},Bz=async(J)=>{o(J.id);try{let O=await K(`/api/skills/marketplace/${J.id}/install`,{method:"POST"}),$=await O.json();if(O.ok)await P(`Installed "${J.name}" successfully!`,{title:"Skill Installed"}),F(),U("installed");else await P($.error||"Failed to install skill",{title:"Installation Failed"})}catch(O){console.error("Failed to install skill:",O),await P("Failed to install skill",{title:"Error"})}o(null)},g=(J)=>B.some((O)=>O.name===J),s=async(J)=>{let O=J||a;if(!O.trim())return;let $="",L="";if(O.includes("github.com")){let A=O.match(/github\.com\/([^/]+)\/([^/]+)/);if(A)$=A[1],L=A[2].replace(/\.git$/,"")}else if(O.includes("/")){let A=O.split("/");$=A[0],L=A[1]}if(!$||!L){b("Invalid repo format. Use 'owner/repo' or GitHub URL");return}u(!0),b(null),t([]),l(null);try{let A=await K(`/api/skills/github/${$}/${L}`),k=await A.json();if(!A.ok){b(k.error||"Failed to fetch repository"),u(!1);return}t(k.skills||[]),l(k.repo||null)}catch(A){b("Failed to fetch repository")}u(!1)},Nz=async(J)=>{if(!q)return;S(J.name);try{let O=await K("/api/skills/github/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:q.owner,repo:q.repo,skillName:J.name,downloadUrl:J.downloadUrl,projectId:x})}),$=await O.json();if(O.ok)await P(`Installed "${J.name}" successfully!`,{title:"Skill Installed"}),F();else await P($.error||"Failed to install skill",{title:"Installation Failed",variant:"error"})}catch(O){await P("Failed to install skill",{title:"Error",variant:"error"})}S(null)},Uz=async()=>{if(!q||R.length===0)return;let J=R.filter((L)=>!g(L.name));if(J.length===0){await P("All skills are already installed",{title:"Info"});return}if(!await f(`Install ${J.length} skill(s) from ${q.owner}/${q.repo}?`,{confirmText:"Install All",title:"Install Skills"}))return;let $=0;for(let L of J){S(L.name);try{if((await K("/api/skills/github/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({owner:q.owner,repo:q.repo,skillName:L.name,downloadUrl:L.downloadUrl,projectId:x})})).ok)$++}catch(A){}}S(null),F(),await P(`Installed ${$} of ${J.length} skills`,{title:"Installation Complete"})};return z.jsxDEV(z.Fragment,{children:[w,d,z.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:z.jsxDEV("div",{className:"max-w-6xl",children:[z.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[z.jsxDEV("div",{children:[z.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Skills"},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-[var(--color-text-muted)]",children:"Manage agent skills - instructions that teach agents how to perform tasks."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X==="installed"&&z.jsxDEV("div",{className:"flex gap-2",children:[z.jsxDEV("button",{onClick:()=>H(!0),className:"bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] text-white px-4 py-2 rounded font-medium transition border border-[var(--color-border-light)]",children:"Import"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:()=>Q(!0),className:"bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] text-black px-4 py-2 rounded font-medium transition",children:"+ Create Skill"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[var(--color-surface)] card p-1 w-fit",children:[z.jsxDEV("button",{onClick:()=>U("installed"),className:`px-4 py-2 rounded text-sm font-medium transition ${X==="installed"?"bg-[var(--color-surface-raised)] text-white":"text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"}`,children:["Installed (",D.length,")"]},void 0,!0,void 0,this),z.jsxDEV("button",{onClick:()=>U("github"),className:`px-4 py-2 rounded text-sm font-medium transition ${X==="github"?"bg-[var(--color-surface-raised)] text-white":"text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"}`,children:"Browse GitHub"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:()=>U("marketplace"),className:`px-4 py-2 rounded text-sm font-medium transition ${X==="marketplace"?"bg-[var(--color-surface-raised)] text-white":"text-[var(--color-text-muted)] hover:text-[var(--color-text-secondary)]"}`,children:"Marketplace"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X==="installed"&&z.jsxDEV(z.Fragment,{children:y?z.jsxDEV("div",{className:"text-[var(--color-text-muted)]",children:"Loading skills..."},void 0,!1,void 0,this):B.length===0?z.jsxDEV("div",{className:"text-center py-20 text-[var(--color-text-muted)]",children:[z.jsxDEV("p",{className:"text-lg",children:"No skills installed"},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-sm mt-1",children:"Create a skill or browse the marketplace"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:()=>U("marketplace"),className:"mt-4 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] text-black px-4 py-2 rounded font-medium transition",children:"Browse Marketplace"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):D.length===0?z.jsxDEV("div",{className:"bg-[var(--color-surface)] card p-6 text-center",children:z.jsxDEV("p",{className:"text-[var(--color-text-muted)]",children:"No skills match this filter."},void 0,!1,void 0,this)},void 0,!1,void 0,this):z.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:D.map((J)=>{let O=_&&J.project_id?Z.find(($)=>$.id===J.project_id):null;return z.jsxDEV(Hz,{skill:J,project:O,onToggle:()=>_z(J.id),onDelete:()=>$z(J.id),onView:()=>T(J)},J.id,!1,void 0,this)})},void 0,!1,void 0,this)},void 0,!1,void 0,this),X==="github"&&z.jsxDEV("div",{className:"space-y-6",children:[z.jsxDEV("form",{onSubmit:(J)=>{J.preventDefault(),s()},className:"flex gap-2",children:[z.jsxDEV("input",{type:"text",value:a,onChange:(J)=>i(J.target.value),placeholder:"Enter GitHub repo (e.g., WordPress/agent-skills)",className:"flex-1 bg-[var(--color-surface)] border border-[var(--color-border-light)] rounded-lg px-4 py-3 focus:outline-none focus:border-[var(--color-accent)]"},void 0,!1,void 0,this),z.jsxDEV("button",{type:"submit",disabled:I,className:"bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] disabled:opacity-50 text-black px-6 py-3 rounded-lg font-medium transition",children:I?"...":"Browse"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_&&R.length>0&&z.jsxDEV("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded-lg",children:[z.jsxDEV("span",{className:"text-sm text-[var(--color-text-muted)]",children:"Install to:"},void 0,!1,void 0,this),z.jsxDEV(j,{value:x||"",onChange:(J)=>Zz(J||null),options:[{value:"",label:"Global (all projects)"},...Z.map((J)=>({value:J.id,label:J.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V&&z.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg",children:V},void 0,!1,void 0,this),q&&R.length>0&&z.jsxDEV("div",{className:"flex items-center justify-between",children:[z.jsxDEV("div",{className:"flex items-center gap-3",children:[z.jsxDEV("a",{href:q.url,target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-accent)] hover:underline font-medium",children:[q.owner,"/",q.repo]},void 0,!0,void 0,this),z.jsxDEV("span",{className:"text-sm text-[var(--color-text-muted)]",children:[R.length," skill",R.length!==1?"s":""," found"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),R.some((J)=>!g(J.name))&&z.jsxDEV("button",{onClick:Uz,disabled:!!e,className:"text-sm bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] hover:border-[var(--color-accent)] px-4 py-2 rounded transition disabled:opacity-50",children:"Install All"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),I&&z.jsxDEV("div",{className:"text-center py-8 text-[var(--color-text-muted)]",children:"Fetching skills from repository..."},void 0,!1,void 0,this),!I&&!q&&!V&&z.jsxDEV("div",{className:"bg-[var(--color-surface)] card p-8 text-center",children:[z.jsxDEV("div",{className:"text-4xl mb-4",children:"\uD83D\uDCE6"},void 0,!1,void 0,this),z.jsxDEV("h3",{className:"text-lg font-medium mb-2",children:"Browse Skills from GitHub"},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-[var(--color-text-muted)] mb-6 max-w-md mx-auto",children:"Enter a GitHub repository to browse and install skills. Skills are markdown files with instructions that teach agents how to perform specific tasks."},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex flex-wrap gap-2 justify-center",children:[{label:"WordPress Skills",repo:"WordPress/agent-skills"}].map(({label:J,repo:O})=>z.jsxDEV("button",{onClick:()=>{i(O),s(O)},className:"text-sm bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] hover:border-[var(--color-accent)] px-3 py-1.5 rounded transition",children:J},O,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!I&&q&&R.length===0&&z.jsxDEV("div",{className:"text-center py-8 text-[var(--color-text-muted)]",children:"No skills found in this repository. Skills should be in subdirectories with a SKILL.md file."},void 0,!1,void 0,this),R.length>0&&z.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:R.map((J)=>{let O=g(J.name),$=e===J.name;return z.jsxDEV("div",{className:`bg-[var(--color-surface)] border rounded-lg p-4 transition ${O?"border-green-500/30":"border-[var(--color-border)] hover:border-[var(--color-border-light)]"}`,children:z.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[z.jsxDEV("div",{className:"flex-1 min-w-0",children:[z.jsxDEV("div",{className:"flex items-center gap-2",children:[z.jsxDEV("h3",{className:"font-medium truncate",children:J.name},void 0,!1,void 0,this),O&&z.jsxDEV("span",{className:"text-xs text-green-400",children:"✓ Installed"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("p",{className:"text-sm text-[var(--color-text-muted)] mt-1 line-clamp-2",children:J.description||"No description"},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex items-center gap-2 mt-2 text-xs text-[var(--color-text-faint)]",children:[z.jsxDEV("span",{children:[(J.size/1024).toFixed(1),"KB"]},void 0,!0,void 0,this),z.jsxDEV("span",{className:"px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-400",children:"GitHub"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"flex-shrink-0",children:O?z.jsxDEV("span",{className:"text-xs text-[var(--color-text-faint)] px-3 py-1.5",children:"Added"},void 0,!1,void 0,this):z.jsxDEV("button",{onClick:()=>Nz(J),disabled:$,className:"text-sm bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] hover:border-[var(--color-accent)] px-3 py-1.5 rounded transition disabled:opacity-50",children:$?"Installing...":"Install"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},J.name,!1,void 0,this)})},void 0,!1,void 0,this),z.jsxDEV("div",{className:"p-4 bg-[var(--color-surface)] card text-sm text-[var(--color-text-muted)]",children:z.jsxDEV("p",{children:["Skills are sourced from GitHub repositories. Each skill should be in its own directory with a"," ",z.jsxDEV("code",{className:"text-[var(--color-text-secondary)] bg-[var(--color-bg)] px-1 rounded",children:"SKILL.md"},void 0,!1,void 0,this)," file containing instructions."]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),X==="marketplace"&&z.jsxDEV(z.Fragment,{children:[z.jsxDEV("div",{className:"mb-6",children:z.jsxDEV("div",{className:"flex gap-2",children:[z.jsxDEV("input",{type:"text",value:m,onChange:(J)=>p(J.target.value),onKeyDown:(J)=>J.key==="Enter"&&E(),placeholder:"Search skills...",className:"flex-1 bg-[var(--color-surface)] border border-[var(--color-border)] rounded px-4 py-2 focus:outline-none focus:border-[var(--color-accent)]"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:()=>E(),disabled:c,className:"bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] text-white px-4 py-2 rounded font-medium transition border border-[var(--color-border-light)]",children:c?"...":"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),c?z.jsxDEV("div",{className:"text-[var(--color-text-muted)]",children:"Loading..."},void 0,!1,void 0,this):h.length===0?z.jsxDEV("div",{className:"text-center py-20 text-[var(--color-text-muted)]",children:[z.jsxDEV("p",{className:"text-lg",children:"No skills found"},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-sm mt-1",children:"Try a different search term"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):z.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:h.map((J)=>z.jsxDEV(qz,{skill:J,installed:g(J.name),installing:Yz===J.id,onInstall:()=>Bz(J)},J.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),G&&z.jsxDEV(Az,{authFetch:K,onClose:()=>Q(!1),onCreated:()=>{Q(!1),F()},projects:_?Z:void 0,defaultProjectId:Y&&Y!=="unassigned"?Y:null},void 0,!1,void 0,this),C&&z.jsxDEV(yz,{authFetch:K,onClose:()=>H(!1),onImported:()=>{H(!1),F()}},void 0,!1,void 0,this),v&&z.jsxDEV(Mz,{skill:v,authFetch:K,onClose:()=>T(null),onUpdated:()=>{T(null),F()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Hz({skill:K,project:Z,onToggle:Y,onDelete:B,onView:N}){let y={local:"Local",skillsmp:"SkillsMP",github:"GitHub",import:"Imported"}[K.source],M=()=>{if(Z)return z.jsxDEV("span",{className:"text-xs px-1.5 py-0.5 rounded",style:{backgroundColor:`${Z.color}20`,color:Z.color},children:Z.name},void 0,!1,void 0,this);if(K.project_id===null)return z.jsxDEV("span",{className:"text-xs text-[var(--color-text-muted)] bg-[var(--color-surface-raised)] px-1.5 py-0.5 rounded",children:"Global"},void 0,!1,void 0,this);return null};return z.jsxDEV("div",{className:`bg-[var(--color-surface)] rounded-lg p-5 border transition cursor-pointer ${K.enabled?"border-[var(--color-border)]":"border-[var(--color-border)] opacity-60"} hover:border-[var(--color-border-light)]`,onClick:N,children:[z.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[z.jsxDEV("div",{className:"flex-1 min-w-0",children:[z.jsxDEV("div",{className:"flex items-center gap-2",children:[z.jsxDEV("h3",{className:"font-semibold text-lg truncate",children:K.name},void 0,!1,void 0,this),M()]},void 0,!0,void 0,this),z.jsxDEV("p",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-2 mt-0.5",children:[z.jsxDEV("span",{className:`px-1.5 py-0.5 rounded text-[10px] ${K.source==="skillsmp"?"bg-purple-500/20 text-purple-400":K.source==="github"?"bg-blue-500/20 text-blue-400":"bg-[var(--color-surface-raised)] text-[var(--color-text-secondary)]"}`,children:y},void 0,!1,void 0,this),K.metadata?.version&&z.jsxDEV("span",{children:["v",K.metadata.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("button",{onClick:(X)=>{X.stopPropagation(),Y()},className:`w-10 h-5 rounded-full transition-colors relative ${K.enabled?"bg-[var(--color-accent)]":"bg-[var(--color-surface-raised)]"}`,children:z.jsxDEV("span",{className:`absolute top-0.5 w-4 h-4 rounded-full bg-white transition-transform ${K.enabled?"left-5":"left-0.5"}`},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("p",{className:"text-sm text-[var(--color-text-secondary)] line-clamp-2 mb-4",children:K.description},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex items-center justify-between",children:[z.jsxDEV("div",{className:"flex gap-1 flex-wrap",children:[K.allowed_tools.slice(0,2).map((X)=>z.jsxDEV("span",{className:"text-xs bg-[var(--color-surface-raised)] px-2 py-0.5 rounded text-[var(--color-text-muted)]",children:X},X,!1,void 0,this)),K.allowed_tools.length>2&&z.jsxDEV("span",{className:"text-xs text-[var(--color-text-muted)]",children:["+",K.allowed_tools.length-2]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("button",{onClick:(X)=>{X.stopPropagation(),B()},className:"text-red-400 hover:text-red-300 text-sm",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function qz({skill:K,installed:Z,installing:Y,onInstall:B}){return z.jsxDEV("div",{className:"bg-[var(--color-surface)] rounded-lg p-5 border border-[var(--color-border)] hover:border-[var(--color-border-light)] transition",children:[z.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[z.jsxDEV("div",{className:"flex-1 min-w-0",children:[z.jsxDEV("h3",{className:"font-semibold text-lg truncate",children:K.name},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:["by ",K.author," · v",K.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"flex items-center gap-1 text-yellow-500 text-sm",children:["★ ",K.rating.toFixed(1)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("p",{className:"text-sm text-[var(--color-text-secondary)] line-clamp-2 mb-4",children:K.description},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex items-center justify-between",children:[z.jsxDEV("div",{className:"flex gap-1 flex-wrap",children:K.tags.slice(0,3).map((N)=>z.jsxDEV("span",{className:"text-xs bg-[var(--color-surface-raised)] px-2 py-0.5 rounded text-[var(--color-text-muted)]",children:N},N,!1,void 0,this))},void 0,!1,void 0,this),Z?z.jsxDEV("span",{className:"text-green-400 text-sm",children:"✓ Installed"},void 0,!1,void 0,this):z.jsxDEV("button",{onClick:B,disabled:Y,className:"bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] disabled:opacity-50 text-black px-3 py-1 rounded text-sm font-medium transition",children:Y?"Installing...":"Install"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"mt-3 text-xs text-[var(--color-text-faint)]",children:[K.downloads.toLocaleString()," downloads"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Az({authFetch:K,onClose:Z,onCreated:Y,projects:B,defaultProjectId:N}){let[y,M]=W.useState(""),[X,U]=W.useState(""),[G,Q]=W.useState(""),[C,H]=W.useState(N||null),[v,T]=W.useState(!1),[f,w]=W.useState(null),P=B&&B.length>0,d=async()=>{if(!y||!X||!G){w("All fields are required");return}T(!0),w(null);try{let _={name:y,description:X,content:G,source:"local"};if(C)_.project_id=C;let m=await K("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(_)}),p=await m.json();if(!m.ok){w(p.error||"Failed to create skill"),T(!1);return}Y()}catch(_){w("Failed to create skill"),T(!1)}};return z.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:Z,children:z.jsxDEV("div",{className:"bg-[var(--color-surface)] card w-full max-w-2xl max-h-[90vh] overflow-auto",onClick:(_)=>_.stopPropagation(),children:[z.jsxDEV("div",{className:"p-6 border-b border-[var(--color-border)]",children:z.jsxDEV("h2",{className:"text-xl font-semibold",children:"Create Skill"},void 0,!1,void 0,this)},void 0,!1,void 0,this),z.jsxDEV("div",{className:"p-6 space-y-4",children:[f&&z.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded p-3 text-red-400 text-sm",children:f},void 0,!1,void 0,this),z.jsxDEV("div",{children:[z.jsxDEV("label",{className:"block text-sm text-[var(--color-text-secondary)] mb-1",children:"Name"},void 0,!1,void 0,this),z.jsxDEV("input",{type:"text",value:y,onChange:(_)=>M(_.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"-")),placeholder:"my-skill-name",className:"w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded px-3 py-2 focus:outline-none focus:border-[var(--color-accent)]"},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-xs text-[var(--color-text-faint)] mt-1",children:"Lowercase letters, numbers, and hyphens only"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{children:[z.jsxDEV("label",{className:"block text-sm text-[var(--color-text-secondary)] mb-1",children:"Description"},void 0,!1,void 0,this),z.jsxDEV("input",{type:"text",value:X,onChange:(_)=>U(_.target.value),placeholder:"What this skill does and when to use it...",className:"w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded px-3 py-2 focus:outline-none focus:border-[var(--color-accent)]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P&&z.jsxDEV("div",{children:[z.jsxDEV("label",{className:"block text-sm text-[var(--color-text-secondary)] mb-1",children:"Scope"},void 0,!1,void 0,this),z.jsxDEV(j,{value:C||"",onChange:(_)=>H(_||null),options:[{value:"",label:"Global (all projects)"},...B.map((_)=>({value:_.id,label:_.name}))],placeholder:"Select scope..."},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-xs text-[var(--color-text-faint)] mt-1",children:"Global skills are available to all agents. Project-scoped skills are only available to agents in that project."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{children:[z.jsxDEV("label",{className:"block text-sm text-[var(--color-text-secondary)] mb-1",children:"Instructions (Markdown)"},void 0,!1,void 0,this),z.jsxDEV("textarea",{value:G,onChange:(_)=>Q(_.target.value),placeholder:`# Skill Instructions
2
+
3
+ Write detailed instructions here...`,rows:12,className:"w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded px-3 py-2 focus:outline-none focus:border-[var(--color-accent)] font-mono text-sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"p-6 border-t border-[var(--color-border)] flex justify-end gap-3",children:[z.jsxDEV("button",{onClick:Z,className:"px-4 py-2 text-[var(--color-text-secondary)] hover:text-white transition",children:"Cancel"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:d,disabled:v,className:"bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:v?"Creating...":"Create Skill"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function yz({authFetch:K,onClose:Z,onImported:Y}){let[B,N]=W.useState(""),[y,M]=W.useState(!1),[X,U]=W.useState(null);return z.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:Z,children:z.jsxDEV("div",{className:"bg-[var(--color-surface)] card w-full max-w-2xl max-h-[90vh] overflow-auto",onClick:(Q)=>Q.stopPropagation(),children:[z.jsxDEV("div",{className:"p-6 border-b border-[var(--color-border)]",children:[z.jsxDEV("h2",{className:"text-xl font-semibold",children:"Import Skill"},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:"Paste the contents of a SKILL.md file"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"p-6 space-y-4",children:[X&&z.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded p-3 text-red-400 text-sm",children:X},void 0,!1,void 0,this),z.jsxDEV("textarea",{value:B,onChange:(Q)=>N(Q.target.value),placeholder:`---
4
+ name: skill-name
5
+ description: What this skill does...
6
+ ---
7
+
8
+ # Instructions
9
+
10
+ Your skill instructions here...`,rows:16,className:"w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded px-3 py-2 focus:outline-none focus:border-[var(--color-accent)] font-mono text-sm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"p-6 border-t border-[var(--color-border)] flex justify-end gap-3",children:[z.jsxDEV("button",{onClick:Z,className:"px-4 py-2 text-[var(--color-text-secondary)] hover:text-white transition",children:"Cancel"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:async()=>{if(!B.trim()){U("Paste SKILL.md content");return}M(!0),U(null);try{let Q=await K("/api/skills/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:B})}),C=await Q.json();if(!Q.ok){U(C.error||"Failed to import skill"),M(!1);return}Y()}catch(Q){U("Failed to import skill"),M(!1)}},disabled:y,className:"bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:y?"Importing...":"Import Skill"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function Mz({skill:K,authFetch:Z,onClose:Y,onUpdated:B}){let[N,y]=W.useState(!1),[M,X]=W.useState(K.content),[U,G]=W.useState(!1),Q=async()=>{G(!0);try{await Z(`/api/skills/${K.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:M})}),B()}catch(H){console.error("Failed to save:",H)}G(!1)},C=async()=>{try{let v=await(await Z(`/api/skills/${K.id}/export`)).text(),T=new Blob([v],{type:"text/markdown"}),f=URL.createObjectURL(T),w=document.createElement("a");w.href=f,w.download=`${K.name}-SKILL.md`,w.click(),URL.revokeObjectURL(f)}catch(H){console.error("Failed to export:",H)}};return z.jsxDEV("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50 p-4",onClick:Y,children:z.jsxDEV("div",{className:"bg-[var(--color-surface)] card w-full max-w-3xl max-h-[90vh] overflow-auto",onClick:(H)=>H.stopPropagation(),children:[z.jsxDEV("div",{className:"p-6 border-b border-[var(--color-border)] flex items-center justify-between",children:[z.jsxDEV("div",{children:[z.jsxDEV("h2",{className:"text-xl font-semibold",children:K.name},void 0,!1,void 0,this),z.jsxDEV("p",{className:"text-sm text-[var(--color-text-muted)] mt-0.5",children:K.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"flex gap-2",children:[z.jsxDEV("button",{onClick:C,className:"text-sm text-[var(--color-text-secondary)] hover:text-white transition px-3 py-1 rounded border border-[var(--color-border-light)]",children:"Export"},void 0,!1,void 0,this),z.jsxDEV("button",{onClick:()=>y(!N),className:"text-sm text-[var(--color-text-secondary)] hover:text-white transition px-3 py-1 rounded border border-[var(--color-border-light)]",children:N?"View":"Edit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV("div",{className:"p-6",children:N?z.jsxDEV("textarea",{value:M,onChange:(H)=>X(H.target.value),rows:20,className:"w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded px-3 py-2 focus:outline-none focus:border-[var(--color-accent)] font-mono text-sm"},void 0,!1,void 0,this):z.jsxDEV("pre",{className:"bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded p-4 font-mono text-sm overflow-auto max-h-[60vh] whitespace-pre-wrap",children:K.content},void 0,!1,void 0,this)},void 0,!1,void 0,this),z.jsxDEV("div",{className:"p-6 border-t border-[var(--color-border)] flex justify-between",children:[z.jsxDEV("div",{className:"text-xs text-[var(--color-text-faint)]",children:K.source!=="local"&&K.source_url&&z.jsxDEV("a",{href:K.source_url,target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-accent)] hover:underline",children:"View source →"},void 0,!1,void 0,this)},void 0,!1,void 0,this),z.jsxDEV("div",{className:"flex gap-3",children:[z.jsxDEV("button",{onClick:Y,className:"px-4 py-2 text-[var(--color-text-secondary)] hover:text-white transition",children:"Close"},void 0,!1,void 0,this),N&&z.jsxDEV("button",{onClick:Q,disabled:U,className:"bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:U?"Saving...":"Save Changes"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}
11
+ export{Rz as L};
12
+
13
+ //# debugId=F89C130753CEA5A864756E2164756E21
@@ -0,0 +1,4 @@
1
+ import{$ as Rq,X as c,aa as Gq,ja as Jq}from"./App.94x6mh7f.js";var Q=c(Rq(),1);var q=c(Gq(),1);function C(H){return H.authSchemes.some((J)=>J.toUpperCase()==="API_KEY")}function Qq(H){return H.authSchemes.some((J)=>J.toUpperCase()==="OAUTH2")}function Lq(H){return C(H)&&Qq(H)}function wq({providerId:H="composio",projectId:J,onConnectionComplete:U,onBrowseTriggers:F,hideMcpConfig:y}){let{authFetch:Z}=Jq(),[A,I]=Q.useState([]),[k,P]=Q.useState([]),[S,h]=Q.useState(!0),[R,Wq]=Q.useState(""),[g,O]=Q.useState(null),[b,D]=Q.useState(null),[s,_]=Q.useState(null),[L,M]=Q.useState(null),[X,w]=Q.useState(null),[f,u]=Q.useState(""),[V,x]=Q.useState({}),[T,E]=Q.useState(null),[v,n]=Q.useState(""),[o,l]=Q.useState(!1),[t,j]=Q.useState(null),[r,i]=Q.useState(null),N=Q.useCallback(async()=>{h(!0),_(null);let z=J&&J!=="unassigned"?`?project_id=${J}`:"";try{let[G,W]=await Promise.all([Z(`/api/integrations/${H}/apps${z}`),Z(`/api/integrations/${H}/connected${z}`)]),Y=await G.json(),$=await W.json();I(Y.apps||[]),P($.accounts||[])}catch(G){console.error("Failed to fetch integrations:",G),_("Failed to load integrations")}h(!1)},[Z,H,J]);Q.useEffect(()=>{N()},[N]),Q.useEffect(()=>{if(new URLSearchParams(window.location.search).get("connected"))window.history.replaceState({},"",window.location.pathname),N(),U?.()},[N,U]),Q.useEffect(()=>{if(!b?.connectionId)return;let z=J&&J!=="unassigned"?`?project_id=${J}`:"",G=setInterval(async()=>{try{let Y=await(await Z(`/api/integrations/${H}/connection/${b.connectionId}${z}`)).json();if(Y.connection?.status==="active")D(null),O(null),N(),U?.();else if(Y.connection?.status==="failed")D(null),O(null),_(`Connection to ${b.appSlug} failed`)}catch(W){}},2000);return()=>clearInterval(G)},[b,Z,H,J,N,U]);let m=async(z,G,W,Y)=>{if(Lq(z)&&!G&&!Y&&!W){M({app:z});return}if(C(z)&&!G&&!Y&&!W){w({app:z}),u(""),x({});return}O(z.slug),_(null);try{let $={appSlug:z.slug};if(Y&&Object.keys(Y).length>0)$.credentials={authScheme:"API_KEY",fields:Y};else if(G)$.credentials={authScheme:"API_KEY",apiKey:G};let kq=J&&J!=="unassigned"?`?project_id=${J}`:"",qq=await Z(`/api/integrations/${H}/connect${kq}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)}),B=await qq.json();if(!qq.ok){_(B.error||"Failed to initiate connection"),O(null),w(null);return}if(B.status==="active"||!B.redirectUrl){O(null),w(null),N(),U?.();return}if(B.redirectUrl){D({appSlug:z.slug,connectionId:B.connectionId});let zq=window.open(B.redirectUrl,`connect-${z.slug}`,"width=600,height=700,left=200,top=100");if(!zq||zq.closed)window.location.href=B.redirectUrl}}catch($){_(`Failed to connect: ${$}`),O(null),w(null)}},Xq=(z)=>{if(z.preventDefault(),!X)return;if(X.app.credentialFields&&X.app.credentialFields.length>0){if(!X.app.credentialFields.filter(($)=>$.required!==!1).every(($)=>V[$.name]?.trim()))return;m(X.app,void 0,!1,V)}else{if(!f.trim())return;m(X.app,f.trim())}},Yq=async(z)=>{let G=J&&J!=="unassigned"?`?project_id=${J}`:"";try{let W=await Z(`/api/integrations/${H}/connection/${z.id}${G}`,{method:"DELETE"});if(W.ok)N();else{let Y=await W.json();_(Y.error||"Failed to disconnect")}}catch(W){_(`Failed to disconnect: ${W}`)}},Zq=(z)=>{E({app:z}),n(`${z.name} MCP`),j(null)},_q=async()=>{if(!T||!v.trim())return;l(!0),_(null);try{let z=J&&J!=="unassigned"?`?project_id=${J}`:"",G=await Z(`/api/integrations/${H}/configs${z}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:v.replace(/[^a-zA-Z0-9\s-]/g,"").substring(0,30),toolkitSlug:T.app.slug})}),W=await G.json();if(!G.ok){_(W.error||"Failed to create MCP config"),l(!1);return}let Y=!1;if(W.config?.id)try{Y=(await Z(`/api/integrations/${H}/configs/${W.config.id}/add${z}`,{method:"POST"})).ok}catch{}j(v),U?.()}catch(z){_(`Failed to create MCP config: ${z}`)}finally{l(!1)}},$q=(z)=>{i({message:`Disconnect ${z.appName}?`,onConfirm:()=>{Yq(z),i(null)}})},a=(z)=>{return k.some((G)=>G.status==="active"&&(G.appId===z.slug||z.providerSlug&&G.appId===z.providerSlug))},p=(z)=>{return k.find((G)=>G.appId===z.slug&&G.status==="active")||z.providerSlug&&k.find((G)=>G.appId===z.providerSlug&&G.status==="active")||k.find((G)=>G.appId===z.slug)||z.providerSlug&&k.find((G)=>G.appId===z.providerSlug)||void 0},e=A.filter((z)=>{if(!R)return!0;let G=R.toLowerCase();return z.name.toLowerCase().includes(G)||z.slug.toLowerCase().includes(G)||z.description?.toLowerCase().includes(G)||z.categories.some((W)=>W.toLowerCase().includes(G))}),d=e.filter((z)=>a(z)),K=e.filter((z)=>!a(z));if(S)return q.jsxDEV("div",{className:"text-center py-8 text-[var(--color-text-muted)]",children:"Loading apps..."},void 0,!1,void 0,this);return q.jsxDEV("div",{className:"space-y-6",children:[L&&q.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:q.jsxDEV("div",{className:"bg-[var(--color-surface)] border border-[var(--color-border-light)] rounded-lg p-6 w-full max-w-md mx-4",children:[q.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[L.app.logo&&q.jsxDEV("img",{src:L.app.logo,alt:L.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),q.jsxDEV("div",{children:[q.jsxDEV("h3",{className:"font-medium",children:["Connect ",L.app.name]},void 0,!0,void 0,this),q.jsxDEV("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Choose how to authenticate"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"space-y-3",children:[q.jsxDEV("button",{onClick:()=>{M(null),w({app:L.app}),u(""),x({})},className:"w-full text-left p-3 bg-[var(--color-bg)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] hover:border-[var(--color-accent)] rounded-lg transition",children:[q.jsxDEV("div",{className:"font-medium text-sm",children:"API Key"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:["Enter your ",L.app.name," API key directly"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("button",{onClick:()=>{M(null),m(L.app,void 0,!0)},className:"w-full text-left p-3 bg-[var(--color-bg)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] hover:border-[var(--color-accent)] rounded-lg transition",children:[q.jsxDEV("div",{className:"font-medium text-sm",children:"OAuth"},void 0,!1,void 0,this),q.jsxDEV("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:["Sign in with your ",L.app.name," account"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("button",{onClick:()=>M(null),className:"w-full text-sm text-[var(--color-text-muted)] hover:text-white mt-4 py-2 transition",children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),X&&q.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:q.jsxDEV("div",{className:"bg-[var(--color-surface)] border border-[var(--color-border-light)] rounded-lg p-6 w-full max-w-md mx-4",children:[q.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[X.app.logo&&q.jsxDEV("img",{src:X.app.logo,alt:X.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),q.jsxDEV("div",{children:[q.jsxDEV("h3",{className:"font-medium",children:["Connect ",X.app.name]},void 0,!0,void 0,this),q.jsxDEV("p",{className:"text-xs text-[var(--color-text-muted)]",children:X.app.credentialFields?.length?"Enter your credentials to connect":"Enter your API key to connect"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("form",{onSubmit:Xq,children:[X.app.credentialFields&&X.app.credentialFields.length>0?q.jsxDEV("div",{className:"space-y-3 mb-4",children:X.app.credentialFields.map((z,G)=>q.jsxDEV("div",{children:[q.jsxDEV("label",{className:"block text-xs text-[var(--color-text-secondary)] mb-1",children:[z.name.replace(/([A-Z])/g," $1").replace(/[-_]/g," ").replace(/\b\w/g,(W)=>W.toUpperCase()).trim(),z.required!==!1&&q.jsxDEV("span",{className:"text-red-400 ml-0.5",children:"*"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.description&&q.jsxDEV("p",{className:"text-[10px] text-[var(--color-text-faint)] mb-1",children:z.description},void 0,!1,void 0,this),q.jsxDEV("input",{type:"password",value:V[z.name]||"",onChange:(W)=>x((Y)=>({...Y,[z.name]:W.target.value})),placeholder:`Enter ${z.name}...`,className:"w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded-lg px-4 py-2 focus:outline-none focus:border-[var(--color-accent)]",autoFocus:G===0},void 0,!1,void 0,this)]},z.name,!0,void 0,this))},void 0,!1,void 0,this):q.jsxDEV("input",{type:"password",value:f,onChange:(z)=>u(z.target.value),placeholder:"Enter API Key...",className:"w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded-lg px-4 py-2 mb-4 focus:outline-none focus:border-[var(--color-accent)]",autoFocus:!0},void 0,!1,void 0,this),q.jsxDEV("div",{className:"flex gap-2",children:[q.jsxDEV("button",{type:"button",onClick:()=>w(null),className:"flex-1 text-sm bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),q.jsxDEV("button",{type:"submit",disabled:g===X.app.slug||(X.app.credentialFields?.length?!X.app.credentialFields.filter((z)=>z.required!==!1).every((z)=>V[z.name]?.trim()):!f.trim()),className:"flex-1 text-sm bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] text-white px-4 py-2 rounded transition disabled:opacity-50",children:g===X.app.slug?"Connecting...":"Connect"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),T&&q.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:q.jsxDEV("div",{className:"bg-[var(--color-surface)] border border-[var(--color-border-light)] rounded-lg p-6 w-full max-w-md mx-4",children:t?q.jsxDEV(q.Fragment,{children:[q.jsxDEV("div",{className:"text-center mb-4",children:[q.jsxDEV("div",{className:"w-12 h-12 bg-green-500/20 rounded-full flex items-center justify-center mx-auto mb-3",children:q.jsxDEV("span",{className:"text-green-400 text-2xl",children:"✓"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q.jsxDEV("h3",{className:"font-medium text-lg",children:"MCP Config Created!"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-sm text-[var(--color-text-secondary)] mt-2",children:['"',t,'" has been created and added to your servers.']},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("button",{onClick:()=>{E(null),j(null)},className:"w-full text-sm bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] text-white px-4 py-2 rounded transition",children:"Done"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):q.jsxDEV(q.Fragment,{children:[q.jsxDEV("div",{className:"flex items-center gap-3 mb-4",children:[T.app.logo&&q.jsxDEV("img",{src:T.app.logo,alt:T.app.name,className:"w-10 h-10 object-contain"},void 0,!1,void 0,this),q.jsxDEV("div",{children:[q.jsxDEV("h3",{className:"font-medium",children:"Create MCP Config"},void 0,!1,void 0,this),q.jsxDEV("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Create an MCP config for ",T.app.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("form",{onSubmit:(z)=>{z.preventDefault(),_q()},children:[q.jsxDEV("label",{className:"block text-xs text-[var(--color-text-secondary)] mb-1",children:"Config Name"},void 0,!1,void 0,this),q.jsxDEV("input",{type:"text",value:v,onChange:(z)=>n(z.target.value),placeholder:"Enter config name...",className:"w-full bg-[var(--color-bg)] border border-[var(--color-border-light)] rounded-lg px-4 py-2 mb-4 focus:outline-none focus:border-[var(--color-accent)]",autoFocus:!0,maxLength:30},void 0,!1,void 0,this),q.jsxDEV("div",{className:"flex gap-2",children:[q.jsxDEV("button",{type:"button",onClick:()=>E(null),className:"flex-1 text-sm bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),q.jsxDEV("button",{type:"submit",disabled:!v.trim()||o,className:"flex-1 text-sm bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] text-white px-4 py-2 rounded transition disabled:opacity-50",children:o?"Creating...":"Create Config"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),r&&q.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:q.jsxDEV("div",{className:"bg-[var(--color-surface)] border border-[var(--color-border-light)] rounded-lg p-6 w-full max-w-sm mx-4",children:[q.jsxDEV("p",{className:"text-center mb-4",children:r.message},void 0,!1,void 0,this),q.jsxDEV("div",{className:"flex gap-2",children:[q.jsxDEV("button",{onClick:()=>i(null),className:"flex-1 text-sm bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] px-4 py-2 rounded transition",children:"Cancel"},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:r.onConfirm,className:"flex-1 text-sm bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded transition",children:"Confirm"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),s&&q.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg flex items-center justify-between",children:[q.jsxDEV("span",{children:s},void 0,!1,void 0,this),q.jsxDEV("button",{onClick:()=>_(null),className:"text-red-400 hover:text-red-300",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),b&&q.jsxDEV("div",{className:"text-yellow-400 text-sm p-3 bg-yellow-500/10 border border-yellow-500/20 rounded-lg flex items-center gap-2",children:[q.jsxDEV("span",{className:"animate-spin",children:"⟳"},void 0,!1,void 0,this),q.jsxDEV("span",{children:["Waiting for ",b.appSlug," authorization..."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{children:q.jsxDEV("input",{type:"text",value:R,onChange:(z)=>Wq(z.target.value),placeholder:"Search apps...",className:"w-full bg-[var(--color-surface)] border border-[var(--color-border-light)] rounded-lg px-4 py-2 focus:outline-none focus:border-[var(--color-accent)]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),d.length>0&&q.jsxDEV("div",{children:[q.jsxDEV("h3",{className:"text-sm font-medium text-[var(--color-text-secondary)] mb-3",children:["Connected (",d.length,")"]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:d.map((z)=>q.jsxDEV(Hq,{app:z,connection:p(z),onConnect:()=>m(z),onDisconnect:()=>{let G=p(z);if(G)$q(G)},onCreateMcpConfig:y?void 0:()=>Zq(z),onBrowseTriggers:F?()=>F(z.slug):void 0,onUpdateKey:C(z)?()=>{w({app:z}),u(""),x({})}:void 0,connecting:g===z.slug},z.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{children:[q.jsxDEV("h3",{className:"text-sm font-medium text-[var(--color-text-secondary)] mb-3",children:["Available Apps (",K.length,")"]},void 0,!0,void 0,this),K.length===0?q.jsxDEV("p",{className:"text-[var(--color-text-muted)] text-sm",children:R?"No apps match your search":"No apps available"},void 0,!1,void 0,this):q.jsxDEV("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:K.slice(0,50).map((z)=>q.jsxDEV(Hq,{app:z,onConnect:()=>m(z),connecting:g===z.slug},z.id,!1,void 0,this))},void 0,!1,void 0,this),K.length>50&&q.jsxDEV("p",{className:"text-xs text-[var(--color-text-faint)] mt-3 text-center",children:["Showing first 50 of ",K.length," apps. Use search to find more."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function Hq({app:H,connection:J,onConnect:U,onDisconnect:F,onCreateMcpConfig:y,onBrowseTriggers:Z,onUpdateKey:A,connecting:I}){let k=J?.status==="active",P=C(H),S=Qq(H),h=P&&S;return q.jsxDEV("div",{className:`bg-[var(--color-surface)] border rounded-lg p-3 transition ${k?"border-green-500/30":"border-[var(--color-border)] hover:border-[var(--color-border-light)]"}`,children:[q.jsxDEV("div",{className:"flex items-start gap-3",children:[q.jsxDEV("div",{className:"w-10 h-10 rounded bg-[var(--color-surface-raised)] flex items-center justify-center flex-shrink-0 overflow-hidden",children:H.logo?q.jsxDEV("img",{src:H.logo,alt:H.name,className:"w-8 h-8 object-contain",onError:(R)=>{R.target.style.display="none"}},void 0,!1,void 0,this):q.jsxDEV("span",{className:"text-lg",children:H.name[0]?.toUpperCase()},void 0,!1,void 0,this)},void 0,!1,void 0,this),q.jsxDEV("div",{className:"flex-1 min-w-0",children:[q.jsxDEV("div",{className:"flex items-center gap-2",children:[q.jsxDEV("h4",{className:"font-medium text-sm truncate",children:H.name},void 0,!1,void 0,this),k&&q.jsxDEV("span",{className:"text-xs text-green-400",children:"✓"},void 0,!1,void 0,this),!k&&P&&!S&&q.jsxDEV("span",{className:"text-[10px] bg-[var(--color-surface-raised)] text-[var(--color-text-secondary)] px-1.5 py-0.5 rounded",title:"Requires API Key",children:"API Key"},void 0,!1,void 0,this),!k&&h&&q.jsxDEV("span",{className:"text-[10px] bg-[#1a2a1a] text-[#6a6] px-1.5 py-0.5 rounded",title:"Supports API Key or OAuth",children:"API Key / OAuth"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.description&&q.jsxDEV("p",{className:"text-xs text-[var(--color-text-muted)] line-clamp-2 mt-0.5",children:H.description},void 0,!1,void 0,this),H.categories.length>0&&q.jsxDEV("div",{className:"flex flex-wrap gap-1 mt-1",children:H.categories.slice(0,2).map((R)=>q.jsxDEV("span",{className:"text-[10px] bg-[var(--color-surface-raised)] text-[var(--color-text-faint)] px-1.5 py-0.5 rounded",children:R},R,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.jsxDEV("div",{className:"mt-3 flex gap-2",children:k?q.jsxDEV(q.Fragment,{children:[y&&q.jsxDEV("button",{onClick:y,className:"flex-1 text-xs bg-[#1a2a1a] hover:bg-[#1a3a1a] border border-green-500/30 hover:border-green-500/50 text-green-400 px-3 py-1.5 rounded transition",children:"Create MCP Config"},void 0,!1,void 0,this),Z&&q.jsxDEV("button",{onClick:Z,className:"flex-1 text-xs bg-[#1a1a2a] hover:bg-[#1a1a3a] border border-blue-500/30 hover:border-blue-500/50 text-blue-400 px-3 py-1.5 rounded transition",children:"Browse Triggers"},void 0,!1,void 0,this),A&&q.jsxDEV("button",{onClick:A,className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-accent)] transition px-2",title:"Update API Key",children:"Key"},void 0,!1,void 0,this),F&&q.jsxDEV("button",{onClick:F,className:"text-xs text-[var(--color-text-muted)] hover:text-red-400 transition px-2",title:"Disconnect",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):q.jsxDEV("button",{onClick:U,disabled:I,className:"w-full text-xs bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] hover:border-[var(--color-accent)] px-3 py-1.5 rounded transition disabled:opacity-50",children:I?"Connecting...":P&&!S?"Enter API Key":"Connect"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}
2
+ export{wq as j};
3
+
4
+ //# debugId=5A2FB95F167B84D164756E2164756E21
@@ -0,0 +1,4 @@
1
+ import{$ as P,X as L,aa as N}from"./App.94x6mh7f.js";var z=L(P(),1),w=L(N(),1);function U({children:q,onClose:y}){return w.jsxDEV("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:w.jsxDEV("div",{className:"bg-[var(--color-surface)] card p-6 w-full max-w-xl lg:max-w-2xl max-h-[90vh] overflow-y-auto",children:q},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Q({title:q,message:y,confirmText:F="Confirm",cancelText:B="Cancel",confirmVariant:G="danger",onConfirm:I,onCancel:J}){return w.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:w.jsxDEV("div",{className:"bg-[var(--color-surface)] card p-6 w-full max-w-sm",children:[q&&w.jsxDEV("h3",{className:"font-medium mb-2",children:q},void 0,!1,void 0,this),w.jsxDEV("p",{className:"text-sm text-[var(--color-text)] mb-4",children:y},void 0,!1,void 0,this),w.jsxDEV("div",{className:"flex gap-2",children:[w.jsxDEV("button",{onClick:J,className:"flex-1 text-sm bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] btn px-4 py-2 transition",children:B},void 0,!1,void 0,this),w.jsxDEV("button",{onClick:I,className:`flex-1 text-sm text-white px-4 py-2 btn transition ${G==="danger"?"bg-red-500 hover:bg-red-600":"bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)]"}`,children:F},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function R({title:q,message:y,buttonText:F="OK",variant:B="info",onClose:G}){let I={error:"bg-red-500/20 text-red-400",success:"bg-green-500/20 text-green-400",info:"bg-blue-500/20 text-blue-400"},J={error:"✕",success:"✓",info:"ℹ"};return w.jsxDEV("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:w.jsxDEV("div",{className:"bg-[var(--color-surface)] card p-6 w-full max-w-sm text-center",children:[w.jsxDEV("div",{className:`w-12 h-12 rounded-full flex items-center justify-center mx-auto mb-3 ${I[B]}`,children:w.jsxDEV("span",{className:"text-xl",children:J[B]},void 0,!1,void 0,this)},void 0,!1,void 0,this),q&&w.jsxDEV("h3",{className:"font-medium mb-2",children:q},void 0,!1,void 0,this),w.jsxDEV("p",{className:"text-sm text-[var(--color-text)] mb-4",children:y},void 0,!1,void 0,this),w.jsxDEV("button",{onClick:G,className:"w-full text-sm bg-[var(--color-surface-raised)] hover:bg-[var(--color-surface-raised)] border border-[var(--color-border-light)] px-4 py-2 btn transition",children:F},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function W(){let[q,y]=z.useState(null),F=z.useCallback((J,K={})=>{return new Promise((O)=>{y({message:J,options:K,resolve:O})})},[]),B=z.useCallback(()=>{q?.resolve(!0),y(null)},[q]),G=z.useCallback(()=>{q?.resolve(!1),y(null)},[q]),I=q?w.jsxDEV(Q,{title:q.options.title,message:q.message,confirmText:q.options.confirmText,cancelText:q.options.cancelText,confirmVariant:q.options.confirmVariant,onConfirm:B,onCancel:G},void 0,!1,void 0,this):null;return{confirm:F,ConfirmDialog:I}}function X(){let[q,y]=z.useState(null),F=z.useCallback((I,J={})=>{return new Promise((K)=>{y({message:I,options:J,resolve:K})})},[]),B=z.useCallback(()=>{q?.resolve(),y(null)},[q]),G=q?w.jsxDEV(R,{title:q.options.title,message:q.message,buttonText:q.options.buttonText,variant:q.options.variant,onClose:B},void 0,!1,void 0,this):null;return{alert:F,AlertDialog:G}}
2
+ export{U as N,W as O,X as P};
3
+
4
+ //# debugId=47B6BB0942493C6364756E2164756E21
@@ -0,0 +1 @@
1
+ @layer components{@keyframes blink{0%,to{opacity:1}50%{opacity:0}}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-slideUp{animation:.2s ease-out slideUp}.apteva-scrollbar-hidden{-ms-overflow-style:none;scrollbar-width:none}.apteva-scrollbar-hidden::-webkit-scrollbar{display:none}.apteva-md{white-space:pre-wrap!important;color:inherit!important;word-wrap:break-word!important;overflow-wrap:break-word!important;font-size:.875rem!important;line-height:1.625!important}.apteva-md-h2{all:unset!important;display:block!important;margin-top:.75rem!important;margin-bottom:.25rem!important;font-size:1.125rem!important;font-weight:600!important;line-height:1.3!important}.apteva-md-h3{all:unset!important;display:block!important;margin-top:.5rem!important;margin-bottom:.125rem!important;font-size:1rem!important;font-weight:600!important;line-height:1.3!important}.apteva-md-ul{all:unset!important;list-style-type:disc!important;list-style-position:outside!important;display:block!important;margin-top:.5rem!important;margin-bottom:.5rem!important;padding-left:1.5rem!important}.apteva-md-ol{all:unset!important;list-style-type:decimal!important;list-style-position:outside!important;display:block!important;margin-top:.5rem!important;margin-bottom:.5rem!important;padding-left:1.5rem!important}.apteva-md-li{all:unset!important;display:list-item!important;margin-bottom:.25rem!important;padding-left:.25rem!important}.apteva-tool-call{all:unset!important;display:flex!important;background-color:#8080801a!important;border:1px solid #80808033!important;border-radius:.5rem!important;align-items: center!important;gap:.5rem!important;margin:.5rem 0!important;padding:.5rem .75rem!important;font-size:.875rem!important}.apteva-tool-call-dot{all:unset!important;display:block!important;border-radius:50%!important;flex-shrink:0!important;width:.5rem!important;height:.5rem!important}.apteva-tool-call-dot-running{animation:1s infinite blink!important;background-color:#3b82f6!important}.apteva-tool-call-dot-completed{background-color:#22c55e!important}.apteva-tool-call-dot-error{background-color:#ef4444!important}.apteva-tool-call-name{all:unset!important;color:inherit!important;font-family:ui-monospace,monospace!important}.apteva-tool-call-status{all:unset!important;color:#808080cc!important;margin-left:auto!important}.apteva-tool-call-status-completed{color:#22c55e!important}.apteva-tool-call-status-error{color:#ef4444!important}.apteva-md-table-wrapper{overflow-x:auto!important;margin:.75rem 0!important}.apteva-md-table{border-collapse:collapse!important;width:100%!important;font-size:.8125rem!important;line-height:1.4!important}.apteva-md-th{text-align:left!important;white-space:nowrap!important;border-bottom:2px solid #8080804d!important;padding:.5rem .75rem!important;font-weight:600!important}.apteva-md-td{border-bottom:1px solid #80808026!important;padding:.5rem .75rem!important}.apteva-md-table tbody tr:hover{background-color:#8080800d!important}.apteva-md-table tbody tr:last-child .apteva-md-td{border-bottom:none!important}.apteva-md-img{display:block!important;border-radius:.5rem!important;max-width:100%!important;height:auto!important;margin:.5rem 0!important}.apteva-md-link{color:#3b82f6!important;text-underline-offset:2px!important;text-decoration:underline!important}.apteva-md-link:hover{color:#2563eb!important}.apteva-md-inline-code{background-color:#80808026!important;border-radius:.25rem!important;padding:.125rem .375rem!important;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace!important;font-size:.8125rem!important}.apteva-typing-indicator{display:inline-flex!important;align-items: center!important;gap:2px!important}.apteva-typing-indicator span{opacity:.4!important;animation:1.4s infinite both apteva-typing-blink!important;background-color:currentColor!important;border-radius:50%!important;width:6px!important;height:6px!important}.apteva-typing-indicator span:nth-child(2){animation-delay:.2s!important}.apteva-typing-indicator span:nth-child(3){animation-delay:.4s!important}@keyframes apteva-typing-blink{0%,80%,to{opacity:.4}40%{opacity:1}}.apteva-chat-header{all:unset!important;box-sizing:border-box!important;display:flex!important;justify-content:space-between!important;align-items: center!important;padding:.75rem 1rem!important}.apteva-chat-title{all:unset!important;color:#111827!important;display:block!important;font-size:1.125rem!important;font-weight:600!important;line-height:1.4!important}@media (prefers-color-scheme:dark){.apteva-chat-title{color:#fff!important}}.dark .apteva-chat-title{color:#fff!important}.apteva-chat-status{all:unset!important;display:block!important;margin-top:.125rem!important;font-size:.75rem!important;line-height:1.4!important}.apteva-chat-status-ready,.apteva-chat-status-thinking{color:#737373!important}.apteva-chat-status-tool{color:#3b82f6!important}@media (prefers-color-scheme:dark){.apteva-chat-status-ready,.apteva-chat-status-thinking{color:#525252!important}.apteva-chat-status-tool{color:#60a5fa!important}}.dark .apteva-chat-status-ready,.dark .apteva-chat-status-thinking{color:#525252!important}.dark .apteva-chat-status-tool{color:#60a5fa!important}.apteva-message-list{box-sizing:border-box!important;display:block!important;overflow-y:auto!important;flex:1!important;padding:1rem!important}.apteva-message-row-user{display:flex!important;justify-content:flex-end!important;margin-bottom:.75rem!important}.apteva-message-row-assistant{display:flex!important;justify-content:flex-start!important;margin-bottom:.75rem!important}.apteva-message-bubble{box-sizing:border-box!important;display:block!important;border-radius:1rem!important;max-width:95%!important;padding:.625rem 1rem!important;font-size:.875rem!important;line-height:1.5!important}.apteva-message-user{color:#fff!important;background-color:#2563eb!important;border-bottom-right-radius:.375rem!important}.apteva-message-assistant{color:#0a0a0a!important;background-color:#fafafa!important;border-bottom-left-radius:.375rem!important}@media (prefers-color-scheme:dark){.apteva-message-assistant{color:#fafafa!important;background-color:#262626!important}}.dark .apteva-message-assistant{color:#fafafa!important;background-color:#262626!important}.apteva-message-content-user,.apteva-message-content-assistant{display:block!important}.apteva-message-text{white-space:pre-wrap!important;color:inherit!important;display:block!important;font-size:.875rem!important;line-height:1.625!important}.apteva-message-widgets{display:block!important;margin-top:.5rem!important}.apteva-message-timestamp{display:block!important;margin-top:.375rem!important;font-size:.75rem!important}.apteva-message-timestamp-user{color:#bfdbfe!important}.apteva-message-timestamp-assistant,.apteva-welcome-empty{color:#737373!important}.apteva-welcome-icon{color:#a3a3a3!important}.apteva-welcome-title{color:#111827!important}.apteva-welcome-subtitle{color:#737373!important}.apteva-prompt-card{background-color:#fff!important;border-color:#e5e5e5!important}.apteva-prompt-card:hover{background-color:#fafafa!important;border-color:#93c5fd!important}.apteva-prompt-text{color:#111827!important}.apteva-prompt-desc{color:#737373!important}.apteva-prompt-icon{color:#a3a3a3!important}.group:hover .apteva-prompt-icon{color:#3b82f6!important}.apteva-prompt-icon-box{color:#737373!important;background-color:#f5f5f5!important}.group:hover .apteva-prompt-icon-box{color:#2563eb!important;background-color:#dbeafe!important}.apteva-prompt-chevron{color:#a3a3a3!important}.group:hover .apteva-prompt-chevron{color:#3b82f6!important}@media (prefers-color-scheme:dark){.apteva-welcome-empty{color:#a3a3a3!important}.apteva-welcome-icon{color:#525252!important}.apteva-welcome-title{color:#fff!important}.apteva-welcome-subtitle{color:#a3a3a3!important}.apteva-prompt-card{background-color:#262626!important;border-color:#404040!important}.apteva-prompt-card:hover{background-color:#1f1f1f!important;border-color:#3b82f6!important}.apteva-prompt-text{color:#fff!important}.apteva-prompt-desc{color:#a3a3a3!important}.apteva-prompt-icon{color:#525252!important}.group:hover .apteva-prompt-icon{color:#60a5fa!important}.apteva-prompt-icon-box{color:#a3a3a3!important;background-color:#404040!important}.group:hover .apteva-prompt-icon-box{color:#60a5fa!important;background-color:#3b82f626!important}.apteva-prompt-chevron{color:#525252!important}.group:hover .apteva-prompt-chevron{color:#60a5fa!important}}.dark .apteva-welcome-empty{color:#a3a3a3!important}.dark .apteva-welcome-icon{color:#525252!important}.dark .apteva-welcome-title{color:#fff!important}.dark .apteva-welcome-subtitle{color:#a3a3a3!important}.dark .apteva-prompt-card{background-color:#262626!important;border-color:#404040!important}.dark .apteva-prompt-card:hover{background-color:#1f1f1f!important;border-color:#3b82f6!important}.dark .apteva-prompt-text{color:#fff!important}.dark .apteva-prompt-desc{color:#a3a3a3!important}.dark .apteva-prompt-icon{color:#525252!important}.dark .group:hover .apteva-prompt-icon{color:#60a5fa!important}.dark .apteva-prompt-icon-box{color:#a3a3a3!important;background-color:#404040!important}.dark .group:hover .apteva-prompt-icon-box{color:#60a5fa!important;background-color:#3b82f626!important}.dark .apteva-prompt-chevron{color:#525252!important}.dark .group:hover .apteva-prompt-chevron{color:#60a5fa!important}.apteva-message-segmented{display:flex!important;flex-direction:column!important;gap:.5rem!important;width:95%!important;max-width:95%!important}.apteva-message-segmented .apteva-message-bubble{width:-moz-fit-content!important;width:fit-content!important;max-width:100%!important}.apteva-tool-call-standalone,.apteva-widget-standalone{display:block!important}.apteva-widget{--aw-bg:#fff;--aw-bg-subtle:#fafafa;--aw-bg-muted:#f5f5f5;--aw-bg-input:#fafafa;--aw-border:#e5e5e5;--aw-border-focus:#3b82f6;--aw-text:#171717;--aw-text-heading:#171717;--aw-text-body:#525252;--aw-text-muted:#737373;--aw-text-placeholder:#a3a3a3;--aw-text-on-primary:#fff;--aw-primary:#3b82f6;--aw-primary-hover:#2563eb;--aw-hover-bg:#fafafa;--aw-danger:#ef4444;color:var(--aw-text)!important;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important;font-size:.875rem!important;line-height:1.5!important}@media (prefers-color-scheme:dark){.apteva-widget{--aw-bg:#171717;--aw-bg-subtle:#1a1a1a;--aw-bg-muted:#262626;--aw-bg-input:#262626;--aw-border:#333;--aw-border-focus:#3b82f6;--aw-text:#fafafa;--aw-text-heading:#fff;--aw-text-body:#a3a3a3;--aw-text-muted:#737373;--aw-text-placeholder:#525252;--aw-primary:#3b82f6;--aw-primary-hover:#60a5fa;--aw-hover-bg:#262626;--aw-danger:#f87171}}.dark .apteva-widget,.apteva-widget.apteva-dark{--aw-bg:#171717;--aw-bg-subtle:#1a1a1a;--aw-bg-muted:#262626;--aw-bg-input:#262626;--aw-border:#333;--aw-border-focus:#3b82f6;--aw-text:#fafafa;--aw-text-heading:#fff;--aw-text-body:#a3a3a3;--aw-text-muted:#737373;--aw-text-placeholder:#525252;--aw-primary:#3b82f6;--aw-primary-hover:#60a5fa;--aw-hover-bg:#262626;--aw-danger:#f87171}.apteva-widget *,.apteva-widget :before,.apteva-widget :after{box-sizing:border-box!important}.apteva-widget h1,.apteva-widget h2,.apteva-widget h3,.apteva-widget h4,.apteva-widget p,.apteva-widget ul,.apteva-widget ol,.apteva-widget li,.apteva-widget figure,.apteva-widget figcaption,.apteva-widget table,.apteva-widget caption,.apteva-widget th,.apteva-widget td{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;margin:0!important;padding:0!important}.apteva-widget input,.apteva-widget select,.apteva-widget textarea,.apteva-widget button{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important}.apteva-widget table{border-collapse:collapse!important;border-spacing:0!important}.apteva-widget img{display:block!important;max-width:100%!important}.apteva-widget>div,.apteva-widget>form,.apteva-widget>figure{background-color:var(--aw-bg)!important;border-color:var(--aw-border)!important;color:var(--aw-text)!important}.apteva-widget h3,.apteva-widget h4{color:var(--aw-text-heading)!important}.apteva-widget p,.apteva-widget label{color:var(--aw-text-body)!important}.apteva-widget span{color:inherit!important}.apteva-widget input,.apteva-widget select,.apteva-widget textarea{background-color:var(--aw-bg-input)!important;border-color:var(--aw-border)!important;color:var(--aw-text)!important}.apteva-widget input::placeholder,.apteva-widget textarea::placeholder{color:var(--aw-text-placeholder)!important}.apteva-widget input:focus,.apteva-widget select:focus,.apteva-widget textarea:focus{border-color:var(--aw-border-focus)!important}.apteva-widget .apteva-kpi-value{color:var(--aw-text-heading)!important}.apteva-widget thead tr{background-color:var(--aw-bg-muted)!important}.apteva-widget th{color:var(--aw-text-heading)!important}.apteva-widget td{color:var(--aw-text-body)!important}.apteva-widget caption{background-color:var(--aw-bg-muted)!important;color:var(--aw-text-body)!important}.apteva-widget tbody tr{border-color:var(--aw-border)!important}.apteva-widget .apteva-list-item:hover{background-color:var(--aw-hover-bg)!important}.apteva-widget button[type=submit]{background-color:var(--aw-primary)!important;color:var(--aw-text-on-primary)!important}.apteva-widget button[type=submit]:hover{background-color:var(--aw-primary-hover)!important}.apteva-widget .apteva-file-drop{border-color:var(--aw-border)!important;background-color:var(--aw-bg-muted)!important;color:var(--aw-text-muted)!important}.apteva-widget .apteva-file-drop:hover{border-color:var(--aw-primary)!important;color:var(--aw-primary)!important}.apteva-widget .apteva-file-item-row{background-color:var(--aw-bg-muted)!important;color:var(--aw-text-body)!important}.apteva-widget .apteva-file-remove-btn{color:var(--aw-text-muted)!important}.apteva-widget .apteva-file-remove-btn:hover{color:var(--aw-danger)!important}.apteva-widget .apteva-select-trigger,.apteva-widget .apteva-datepicker-trigger{background-color:var(--aw-bg-input)!important;border-color:var(--aw-border)!important;color:var(--aw-text)!important;cursor:pointer!important}.apteva-widget .apteva-select-trigger:hover,.apteva-widget .apteva-datepicker-trigger:hover{border-color:var(--aw-text-muted)!important}.apteva-widget .apteva-select-placeholder{color:var(--aw-text-placeholder)!important}.apteva-widget .apteva-select-value,.apteva-widget .apteva-datepicker-value{color:var(--aw-text)!important}.apteva-widget .apteva-select-chevron{color:var(--aw-text-muted)!important}.apteva-widget .apteva-select-dropdown,.apteva-widget .apteva-datepicker-dropdown{background-color:var(--aw-bg)!important;border-color:var(--aw-border)!important}.apteva-widget .apteva-select-option{color:var(--aw-text)!important;background-color:#0000!important}.apteva-widget .apteva-select-option:hover{background-color:var(--aw-bg-muted)!important}.apteva-widget .apteva-select-option-active{background-color:var(--aw-primary)!important;color:var(--aw-text-on-primary)!important}.apteva-widget .apteva-select-option-active:hover{background-color:var(--aw-primary-hover)!important}.apteva-widget .apteva-datepicker-dropdown{min-width:280px!important}.apteva-widget .apteva-datepicker-header{background-color:var(--aw-bg-muted)!important;border-bottom:1px solid var(--aw-border)!important}.apteva-widget .apteva-datepicker-title{color:var(--aw-text-heading)!important}.apteva-widget .apteva-datepicker-nav{color:var(--aw-text-muted)!important;cursor:pointer!important;background-color:#0000!important;border:none!important}.apteva-widget .apteva-datepicker-nav:hover{color:var(--aw-text)!important;background-color:var(--aw-bg-muted)!important}.apteva-widget .apteva-datepicker-daylabel{color:var(--aw-text-muted)!important}.apteva-widget .apteva-datepicker-day{color:var(--aw-text)!important;cursor:pointer!important;background-color:#0000!important;border:none!important}.apteva-widget .apteva-datepicker-day:hover{background-color:var(--aw-bg-muted)!important}.apteva-widget .apteva-datepicker-day-selected{background-color:var(--aw-primary)!important;color:var(--aw-text-on-primary)!important}.apteva-widget .apteva-datepicker-day-selected:hover{background-color:var(--aw-primary-hover)!important}.apteva-widget .apteva-datepicker-day-today{text-underline-offset:2px!important;text-decoration:underline!important;font-weight:700!important}.apteva-widget .apteva-field-label,.apteva-widget .apteva-checkbox span{color:var(--aw-text-body)!important}.apteva-widget-skeleton{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.apteva-widget-skeleton *{box-sizing:border-box!important}@media (prefers-color-scheme:dark){.apteva-message-timestamp-assistant{color:#525252!important}}.dark .apteva-message-timestamp-assistant{color:#525252!important}.apteva-tool-card{box-sizing:border-box!important;display:flex!important;border-style:solid!important;border-width:1px!important;border-radius:.75rem!important;align-items: center!important;gap:.5rem!important;padding:.5rem .75rem!important;font-size:.875rem!important}.apteva-tool-card-running{color:#1d4ed8!important;background-color:#eff6ff!important;border-color:#bfdbfe!important}.apteva-tool-card-completed{color:#15803d!important;background-color:#f0fdf4!important;border-color:#bbf7d0!important}.apteva-tool-card-error{color:#b91c1c!important;background-color:#fef2f2!important;border-color:#fecaca!important}@media (prefers-color-scheme:dark){.apteva-tool-card-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-tool-card-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}}.dark .apteva-tool-card-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.dark .apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.dark .apteva-tool-card-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}.apteva-tool-icon{flex-shrink:0!important;width:1rem!important;height:1rem!important}.apteva-tool-icon-spin{animation:1s linear infinite apteva-spin!important}.apteva-tool-spinner-track{opacity:.25!important}.apteva-tool-spinner-fill{opacity:.75!important}.apteva-tool-label{font-size:inherit!important}.apteva-tool-label strong{font-weight:600!important}@keyframes apteva-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.apteva-tool-card-preparing{color:#92400e!important;background-color:#fef3c7!important;border-color:#fcd34d!important}@media (prefers-color-scheme:dark){.apteva-tool-card-preparing{color:#fbbf24!important;background-color:#fbbf2426!important;border-color:#fbbf2466!important}}.dark .apteva-tool-card-preparing{color:#fbbf24!important;background-color:#fbbf2426!important;border-color:#fbbf2466!important}@keyframes apteva-pulse-glow{0%,to{box-shadow:0 0 #fbbf2400}50%{box-shadow:0 0 8px 2px #fbbf2480}}.apteva-tool-receiving{animation:.4s ease-in-out apteva-pulse-glow!important}.apteva-tool-status-text{opacity:.7!important;font-weight:400!important}.apteva-tool-char-count{opacity:.6!important;font-variant-numeric:tabular-nums!important;font-size:.85em!important;font-weight:400!important}.apteva-tool-dots{display:inline-flex!important;margin-left:1px!important}.apteva-tool-dots span{opacity:.3!important;animation:1.4s ease-in-out infinite apteva-dot-pulse!important}.apteva-tool-dots span:first-child{animation-delay:0s!important}.apteva-tool-dots span:nth-child(2){animation-delay:.2s!important}.apteva-tool-dots span:nth-child(3){animation-delay:.4s!important}@keyframes apteva-dot-pulse{0%,60%,to{opacity:.3}30%{opacity:1}}.apteva-tool-stream-separator{opacity:.5!important}.apteva-tool-stream-output{opacity:.85!important;white-space:nowrap!important;text-overflow:ellipsis!important;vertical-align:bottom!important;display:inline-block!important;overflow:hidden!important;max-width:300px!important;font-weight:400!important}.apteva-tool-inline{display:flex!important;align-items: center!important;gap:0!important;width:100%!important;padding:.25rem 0!important}.apteva-tool-inline-line{background-color:#d4d4d4!important;flex:1!important;height:1px!important}.apteva-tool-inline-content{display:flex!important;flex-shrink:0!important;align-items: center!important;gap:.375rem!important;padding:0 .75rem!important}.apteva-tool-inline-icon{color:#7c3aed!important;flex-shrink:0!important;width:.875rem!important;height:.875rem!important}.apteva-tool-inline-text{color:#9ca3af!important;white-space:nowrap!important;font-size:.8125rem!important}@media (prefers-color-scheme:dark){.apteva-tool-inline-line{background-color:#404040!important}.apteva-tool-inline-icon{color:#a78bfa!important}.apteva-tool-inline-text{color:#6b7280!important}}.dark .apteva-tool-inline-line{background-color:#404040!important}.dark .apteva-tool-inline-icon{color:#a78bfa!important}.dark .apteva-tool-inline-text{color:#6b7280!important}.apteva-tool-group{overflow:hidden!important;border:1px solid!important;border-radius:.5rem!important;font-size:.8125rem!important}.apteva-tool-group-running{color:#1d4ed8!important;background-color:#eff6ff!important;border-color:#bfdbfe!important}.apteva-tool-group-completed{color:#15803d!important;background-color:#f0fdf4!important;border-color:#bbf7d0!important}.apteva-tool-group-error{color:#b91c1c!important;background-color:#fef2f2!important;border-color:#fecaca!important}.apteva-tool-group-header{color:inherit!important;font:inherit!important;cursor:pointer!important;display:flex!important;background:0 0!important;border:none!important;justify-content:space-between!important;align-items: center!important;width:100%!important;padding:.375rem .625rem!important}.apteva-tool-group-header:hover{opacity:.8!important}.apteva-tool-group-header-left{display:flex!important;align-items: center!important;gap:.375rem!important}.apteva-tool-group-icon{flex-shrink:0!important}.apteva-tool-group-status{font-weight:600!important}.apteva-tool-group-chevron{opacity:.6!important;flex-shrink:0!important;transition:transform .2s!important}.apteva-tool-group-chevron-open{transform:rotate(180deg)!important}.apteva-tool-group-stream-name{margin-right:.25rem!important;font-weight:600!important}.apteva-tool-group-list{display:flex!important;border-top:1px solid #00000014!important;flex-direction:column!important;gap:.25rem!important;padding:.25rem .625rem .375rem!important}.apteva-tool-group-item{display:flex!important;flex-direction:column!important;gap:.125rem!important;padding:.1875rem 0!important;font-size:.75rem!important}.apteva-tool-group-item-row{display:flex!important;align-items: center!important;gap:.375rem!important}.apteva-tool-group-item-icon{flex-shrink:0!important}.apteva-tool-group-item-done{color:#16a34a!important}.apteva-tool-group-item-error{color:#dc2626!important}.apteva-tool-group-item-spinner{opacity:.6!important;animation:.8s linear infinite apteva-tool-spin!important;border:2px solid!important;border-top-color:#0000!important;border-radius:50%!important;width:10px!important;height:10px!important}.apteva-tool-group-item-name{font-weight:500!important}.apteva-tool-group-item-running-label{opacity:.5!important;font-style:italic!important}.apteva-tool-group-item-detail{opacity:.65!important;white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important;max-width:100%!important;margin-left:calc(12px + .375rem)!important;font-size:.6875rem!important;line-height:1.3!important}.apteva-tool-group-item-result-text{opacity:.5!important}.apteva-tool-group-item-has-detail{padding-bottom:.25rem!important}@keyframes apteva-tool-spin{to{transform:rotate(360deg)}}@media (prefers-color-scheme:dark){.apteva-tool-group-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.apteva-tool-group-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-tool-group-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}.apteva-tool-group-list{border-top-color:#ffffff1a!important}.apteva-tool-group-item-done{color:#4ade80!important}.apteva-tool-group-item-error{color:#f87171!important}}.dark .apteva-tool-group-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.dark .apteva-tool-group-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.dark .apteva-tool-group-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}.dark .apteva-tool-group-list{border-top-color:#ffffff1a!important}.dark .apteva-tool-group-item-done{color:#4ade80!important}.dark .apteva-tool-group-item-error{color:#f87171!important}.apteva-composer{display:grid!important;position:relative!important;background-color:#fff!important;border:2px solid #d4d4d4!important;border-radius:1rem!important;gap:.5rem .75rem!important;padding:.5rem .75rem!important;transition:all .3s!important}.apteva-composer textarea{color:#171717!important;background-color:#0000!important}.apteva-composer textarea::placeholder{color:#a3a3a3!important}button.apteva-composer-menu-btn{color:#404040!important;background:0 0!important;border:none!important}button.apteva-composer-menu-btn:hover{background-color:#f5f5f5!important}.apteva-composer-menu{background-color:#262626!important}.apteva-composer-menu-item{color:#fff!important;background-color:#0000!important}.apteva-composer-menu-item:hover{background-color:#404040!important}.apteva-composer-menu-item-border{border-top:1px solid #404040!important}.apteva-composer-send-btn{color:#404040!important;background-color:#fff!important;border:1px solid #d4d4d4!important}.apteva-composer-send-btn svg{stroke:currentColor!important}.apteva-composer-stop-btn{all:unset!important;box-sizing:border-box!important;cursor:pointer!important;color:#dc2626!important;display:flex!important;background-color:#fef2f2!important;border:1px solid #f87171!important;border-radius:.5rem!important;flex-shrink:0!important;justify-content:center!important;align-items: center!important;width:2rem!important;height:2rem!important;margin:0!important;padding:0!important;transition:background-color .15s!important}.apteva-composer-stop-btn:hover{background-color:#fee2e2!important}.apteva-composer-stop-btn svg{fill:currentColor!important;width:14px!important;height:14px!important}@media (prefers-color-scheme:dark){.apteva-composer{background-color:#171717!important;border-color:#404040!important}.apteva-composer textarea{color:#fafafa!important}.apteva-composer textarea::placeholder{color:#525252!important}button.apteva-composer-menu-btn{color:#d4d4d4!important;background:0 0!important}button.apteva-composer-menu-btn:hover{background-color:#262626!important}.apteva-composer-send-btn{color:#d4d4d4!important;background-color:#262626!important;border-color:#404040!important}.apteva-composer-stop-btn{color:#f87171!important;background-color:#7f1d1d4d!important;border-color:#f87171!important}.apteva-composer-stop-btn:hover{background-color:#7f1d1d80!important}}.dark .apteva-composer{background-color:#171717!important;border-color:#404040!important}.dark .apteva-composer textarea{color:#fafafa!important}.dark .apteva-composer textarea::placeholder{color:#525252!important}.dark button.apteva-composer-menu-btn{color:#d4d4d4!important;background:0 0!important}.dark button.apteva-composer-menu-btn:hover{background-color:#262626!important}.dark .apteva-composer-send-btn{color:#d4d4d4!important;background-color:#262626!important;border-color:#404040!important}.dark .apteva-composer-stop-btn{color:#f87171!important;background-color:#7f1d1d4d!important;border-color:#f87171!important}.dark .apteva-composer-stop-btn:hover{background-color:#7f1d1d80!important}.apteva-file-preview{display:flex!important;flex-wrap:wrap!important;gap:.5rem!important;margin-bottom:.5rem!important}.apteva-file-item{all:unset!important;box-sizing:border-box!important;display:flex!important;position:relative!important;background-color:#f5f5f5!important;border:1px solid #e5e5e5!important;border-radius:.5rem!important;align-items: center!important;gap:.5rem!important;padding:.5rem .75rem!important;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.apteva-file-item:hover .apteva-file-remove{opacity:1!important}.apteva-file-thumb{object-fit:cover!important;border-radius:.25rem!important;flex-shrink:0!important;width:2rem!important;height:2rem!important}.apteva-file-icon{color:#737373!important;display:flex!important;background-color:#e5e5e5!important;border-radius:.25rem!important;flex-shrink:0!important;justify-content:center!important;align-items: center!important;width:2rem!important;height:2rem!important}.apteva-file-icon svg{width:1rem!important;height:1rem!important}.apteva-file-info{display:flex!important;flex-direction:column!important;min-width:0!important}.apteva-file-name{color:#404040!important;text-overflow:ellipsis!important;white-space:nowrap!important;overflow:hidden!important;max-width:120px!important;font-size:.75rem!important;font-weight:500!important}.apteva-file-size{color:#737373!important;font-size:.75rem!important}.apteva-file-remove{all:unset!important;box-sizing:border-box!important;color:#fff!important;opacity:0!important;cursor:pointer!important;display:flex!important;position:absolute!important;background-color:#737373!important;border-radius:50%!important;justify-content:center!important;align-items: center!important;width:1.25rem!important;height:1.25rem!important;transition:opacity .15s,background-color .15s!important;top:-.375rem!important;right:-.375rem!important}.apteva-file-remove:hover{background-color:#ef4444!important}.apteva-file-remove svg{width:.75rem!important;height:.75rem!important}.apteva-file-error{all:unset!important;box-sizing:border-box!important;z-index:20!important;position:absolute!important;background-color:#fef2f2!important;border:1px solid #fecaca!important;border-radius:.5rem!important;margin-bottom:.5rem!important;padding:.75rem!important;bottom:100%!important;left:1rem!important;right:1rem!important}.apteva-file-error-content{color:#b91c1c!important;display:flex!important;align-items: center!important;gap:.5rem!important;font-size:.875rem!important}.apteva-file-error-content svg{flex-shrink:0!important;width:1rem!important;height:1rem!important}@media (prefers-color-scheme:dark){.apteva-file-item{background-color:#262626!important;border-color:#404040!important}.apteva-file-icon{color:#a3a3a3!important;background-color:#404040!important}.apteva-file-name{color:#d4d4d4!important}.apteva-file-size{color:#a3a3a3!important}.apteva-file-error{background-color:#7f1d1d4d!important;border-color:#f87171!important}.apteva-file-error-content{color:#fca5a5!important}}.dark .apteva-file-item{background-color:#262626!important;border-color:#404040!important}.dark .apteva-file-icon{color:#a3a3a3!important;background-color:#404040!important}.dark .apteva-file-name{color:#d4d4d4!important}.dark .apteva-file-size{color:#a3a3a3!important}.dark .apteva-file-error{background-color:#7f1d1d4d!important;border-color:#f87171!important}.dark .apteva-file-error-content{color:#fca5a5!important}.apteva-file-badges{display:flex!important;flex-shrink:0!important;align-items: center!important;gap:.25rem!important}.apteva-file-badge{all:unset!important;box-sizing:border-box!important;display:flex!important;position:relative!important;overflow:hidden!important;background-color:#f5f5f5!important;border-radius:.25rem!important;justify-content:center!important;align-items: center!important;width:1.5rem!important;height:1.5rem!important}.apteva-file-badge:hover .apteva-file-badge-remove{opacity:1!important}.apteva-file-badge-img{object-fit:cover!important;width:1.5rem!important;height:1.5rem!important}.apteva-file-badge-icon{color:#737373!important;font-size:.75rem!important}.apteva-file-badge-icon svg{width:1rem!important;height:1rem!important}.apteva-file-badge-remove{all:unset!important;box-sizing:border-box!important;opacity:0!important;cursor:pointer!important;display:flex!important;position:absolute!important;background-color:#00000080!important;justify-content:center!important;align-items: center!important;transition:opacity .15s!important;inset:0!important}.apteva-file-badge-remove svg{color:#fff!important;width:.75rem!important;height:.75rem!important}@media (prefers-color-scheme:dark){.apteva-file-badge{background-color:#262626!important}.apteva-file-badge-icon{color:#a3a3a3!important}}.dark .apteva-file-badge{background-color:#262626!important}.dark .apteva-file-badge-icon{color:#a3a3a3!important}.apteva-composer-textarea{-ms-overflow-style:none!important;scrollbar-width:none!important}.apteva-composer-textarea::-webkit-scrollbar{display:none!important}.apteva-composer-mic-btn{all:unset!important;box-sizing:border-box!important;cursor:pointer!important;color:#737373!important;display:flex!important;background-color:#0000!important;border-radius:.5rem!important;flex-shrink:0!important;justify-content:center!important;align-items: center!important;width:2rem!important;height:2rem!important;transition:all .15s!important}.apteva-composer-mic-btn:hover{color:#3b82f6!important;background-color:#3b82f614!important}.apteva-composer-mic-btn:disabled{opacity:.3!important;cursor:not-allowed!important}.apteva-composer-mic-btn svg{width:16px!important;height:16px!important}.apteva-composer-rec-dot{display:flex!important;justify-content:center!important;align-items: center!important;width:2rem!important;height:2rem!important}.apteva-composer-rec-dot span{animation:1.2s ease-in-out infinite apteva-rec-pulse!important;display:block!important;background-color:#ef4444!important;border-radius:50%!important;width:10px!important;height:10px!important}@keyframes apteva-rec-pulse{0%,to{opacity:1;transform:scale(1);box-shadow:0 0 #ef444466}50%{opacity:.8;transform:scale(1.15);box-shadow:0 0 8px 3px #ef44444d}}.apteva-composer-waveform{display:flex!important;overflow:hidden!important;align-items: center!important;gap:.75rem!important;height:32px!important}.apteva-composer-waveform-canvas{display:block!important;flex:1!important;min-width:0!important;height:32px!important}.apteva-composer-recording-timer{font-variant-numeric:tabular-nums!important;color:#ef4444!important;text-align:right!important;flex-shrink:0!important;min-width:3rem!important;font-size:.8125rem!important;font-weight:500!important}.apteva-transcript-flash{z-index:20!important;animation:.3s ease-out apteva-flash-in!important;position:absolute!important;background-color:#eff6ff!important;border:1px solid #bfdbfe!important;border-radius:.75rem!important;margin-bottom:.5rem!important;padding:.625rem 1rem!important;bottom:100%!important;left:1rem!important;right:1rem!important}.apteva-transcript-flash span{color:#1d4ed8!important;font-size:.875rem!important;font-style:italic!important}@keyframes apteva-flash-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media (prefers-color-scheme:dark){.apteva-composer-mic-btn{color:#a3a3a3!important}.apteva-composer-mic-btn:hover{color:#60a5fa!important;background-color:#60a5fa1a!important}.apteva-transcript-flash{background-color:#3b82f626!important;border-color:#3b82f64d!important}.apteva-transcript-flash span{color:#93c5fd!important}}.dark .apteva-composer-mic-btn{color:#a3a3a3!important}.dark .apteva-composer-mic-btn:hover{color:#60a5fa!important;background-color:#60a5fa1a!important}.dark .apteva-transcript-flash{background-color:#3b82f626!important;border-color:#3b82f64d!important}.dark .apteva-transcript-flash span{color:#93c5fd!important}.apteva-chat-terminal .apteva-composer-mic-btn{color:#666!important}.apteva-chat-terminal .apteva-composer-mic-btn:hover{color:#f97316!important;background-color:#f973161a!important}.apteva-chat{background-color:#fff!important}.apteva-chat-header{background-color:#fff!important;border-color:#e5e5e5!important}.apteva-message-list{background-color:#f5f5f5!important}@media (prefers-color-scheme:dark){.apteva-chat{background-color:#0a0a0a!important}.apteva-chat-header{background-color:#171717!important;border-color:#262626!important}.apteva-message-list{background-color:#0a0a0a!important}}.dark .apteva-chat,.apteva-chat.dark{background-color:#0a0a0a!important}.dark .apteva-chat-header,.apteva-chat.dark .apteva-chat-header{background-color:#171717!important;border-color:#262626!important}.dark .apteva-message-list,.apteva-chat.dark .apteva-message-list,.apteva-force-dark.apteva-chat{background-color:#0a0a0a!important}.apteva-chat.apteva-force-dark .apteva-chat-header{background-color:#171717!important;border-color:#262626!important}.apteva-chat.apteva-force-dark .apteva-chat-title{color:#fff!important}.apteva-chat.apteva-force-dark .apteva-chat-status-ready,.apteva-chat.apteva-force-dark .apteva-chat-status-thinking{color:#525252!important}.apteva-chat.apteva-force-dark .apteva-chat-status-tool{color:#60a5fa!important}.apteva-chat.apteva-force-dark .apteva-message-list{background-color:#0a0a0a!important}.apteva-chat.apteva-force-dark .apteva-message-assistant{color:#fafafa!important;background-color:#262626!important}.apteva-chat.apteva-force-dark .apteva-message-timestamp-assistant{color:#525252!important}.apteva-chat.apteva-force-dark .apteva-composer{background-color:#171717!important;border-color:#404040!important}.apteva-chat.apteva-force-dark .apteva-composer textarea{color:#fafafa!important}.apteva-chat.apteva-force-dark .apteva-composer textarea::placeholder{color:#525252!important}.apteva-chat.apteva-force-dark .apteva-composer-send-btn{color:#d4d4d4!important;background-color:#262626!important;border-color:#404040!important}.apteva-chat.apteva-force-dark .apteva-composer-stop-btn{color:#f87171!important;background-color:#7f1d1d4d!important;border-color:#f87171!important}.apteva-chat.apteva-force-dark button.apteva-composer-menu-btn{background:0 0!important}.apteva-chat.apteva-force-dark .apteva-composer-mic-btn{color:#a3a3a3!important}.apteva-chat.apteva-force-dark .apteva-composer-mic-btn:hover{color:#60a5fa!important;background-color:#60a5fa1a!important}.apteva-chat.apteva-force-dark .apteva-file-item{background-color:#262626!important;border-color:#404040!important}.apteva-chat.apteva-force-dark .apteva-file-icon{color:#a3a3a3!important;background-color:#404040!important}.apteva-chat.apteva-force-dark .apteva-file-name{color:#d4d4d4!important}.apteva-chat.apteva-force-dark .apteva-file-size{color:#a3a3a3!important}.apteva-chat.apteva-force-dark .apteva-transcript-flash{background-color:#3b82f626!important;border-color:#3b82f64d!important}.apteva-chat.apteva-force-dark .apteva-transcript-flash span{color:#93c5fd!important}.apteva-chat.apteva-force-dark .apteva-widget,.apteva-widget.apteva-force-dark{--aw-bg:#171717;--aw-bg-subtle:#1a1a1a;--aw-bg-muted:#262626;--aw-bg-input:#262626;--aw-border:#333;--aw-border-focus:#3b82f6;--aw-text:#fafafa;--aw-text-heading:#fff;--aw-text-body:#a3a3a3;--aw-text-muted:#737373;--aw-text-placeholder:#525252;--aw-primary:#3b82f6;--aw-primary-hover:#60a5fa;--aw-hover-bg:#262626;--aw-danger:#f87171}.apteva-chat.apteva-force-dark .apteva-tool-card-running{color:#60a5fa!important;background-color:#3b82f61a!important;border-color:#3b82f64d!important}.apteva-chat.apteva-force-dark .apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-chat.apteva-force-dark .apteva-tool-card-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}.apteva-chat.apteva-force-dark .apteva-tool-card-preparing{color:#fbbf24!important;background-color:#fbbf2426!important;border-color:#fbbf2466!important}.apteva-chat.apteva-force-dark .apteva-tool-inline-line{background-color:#404040!important}.apteva-chat.apteva-force-dark .apteva-tool-inline-icon{color:#a78bfa!important}.apteva-chat.apteva-force-dark .apteva-tool-inline-text{color:#6b7280!important}.apteva-chat.apteva-force-dark .apteva-file-badge{background-color:#262626!important}.apteva-chat.apteva-force-dark .apteva-file-badge-icon,.apteva-chat.apteva-force-dark .apteva-welcome-empty{color:#a3a3a3!important}.apteva-chat.apteva-force-dark .apteva-welcome-icon{color:#525252!important}.apteva-chat.apteva-force-dark .apteva-welcome-title{color:#fff!important}.apteva-chat.apteva-force-dark .apteva-welcome-subtitle{color:#a3a3a3!important}.apteva-chat.apteva-force-dark .apteva-prompt-card{background-color:#262626!important;border-color:#404040!important}.apteva-chat.apteva-force-dark .apteva-prompt-card:hover{background-color:#1f1f1f!important;border-color:#3b82f6!important}.apteva-chat.apteva-force-dark .apteva-prompt-text{color:#fff!important}.apteva-chat.apteva-force-dark .apteva-prompt-desc{color:#a3a3a3!important}.apteva-chat.apteva-force-dark .apteva-prompt-icon-box{color:#a3a3a3!important;background-color:#404040!important}.apteva-chat.apteva-force-dark .group:hover .apteva-prompt-icon-box{color:#60a5fa!important;background-color:#3b82f626!important}.apteva-force-light.apteva-chat{background-color:#fff!important}.apteva-chat.apteva-force-light .apteva-chat-header{background-color:#fff!important;border-color:#e5e5e5!important}.apteva-chat.apteva-force-light .apteva-chat-title{color:#111827!important}.apteva-chat.apteva-force-light .apteva-chat-status-ready,.apteva-chat.apteva-force-light .apteva-chat-status-thinking{color:#737373!important}.apteva-chat.apteva-force-light .apteva-chat-status-tool{color:#3b82f6!important}.apteva-chat.apteva-force-light .apteva-message-list{background-color:#fff!important}.apteva-chat.apteva-force-light .apteva-message-user{color:#fff!important;background-color:#2563eb!important}.apteva-chat.apteva-force-light .apteva-message-assistant{color:#0a0a0a!important;background-color:#fff!important;border:1px solid #e5e7eb!important}.apteva-chat.apteva-force-light .apteva-message-timestamp-user{color:#bfdbfe!important}.apteva-chat.apteva-force-light .apteva-message-timestamp-assistant{color:#737373!important}.apteva-chat.apteva-force-light .apteva-composer{background-color:#fff!important;border-color:#d4d4d4!important}.apteva-chat.apteva-force-light .apteva-composer textarea{color:#171717!important}.apteva-chat.apteva-force-light .apteva-composer textarea::placeholder{color:#a3a3a3!important}.apteva-chat.apteva-force-light .apteva-composer-send-btn{color:#404040!important;background-color:#fff!important;border-color:#d4d4d4!important}.apteva-chat.apteva-force-light .apteva-composer-stop-btn{color:#dc2626!important;background-color:#fef2f2!important;border-color:#f87171!important}.apteva-chat.apteva-force-light button.apteva-composer-menu-btn{color:#404040!important;background:0 0!important}.apteva-chat.apteva-force-light button.apteva-composer-menu-btn:hover{background-color:#f5f5f5!important}.apteva-chat.apteva-force-light .apteva-composer-menu{background-color:#fff!important;border:1px solid #e5e5e5!important}.apteva-chat.apteva-force-light .apteva-composer-menu-item{color:#171717!important}.apteva-chat.apteva-force-light .apteva-composer-menu-item:hover{background-color:#f5f5f5!important}.apteva-chat.apteva-force-light .apteva-composer-menu-item-border{border-top-color:#e5e5e5!important}.apteva-chat.apteva-force-light .apteva-composer-mic-btn{color:#737373!important}.apteva-chat.apteva-force-light .apteva-composer-mic-btn:hover{color:#3b82f6!important;background-color:#3b82f614!important}.apteva-chat.apteva-force-light .apteva-file-item{background-color:#f5f5f5!important;border-color:#e5e5e5!important}.apteva-chat.apteva-force-light .apteva-file-icon{color:#737373!important;background-color:#e5e5e5!important}.apteva-chat.apteva-force-light .apteva-file-name{color:#404040!important}.apteva-chat.apteva-force-light .apteva-file-size{color:#737373!important}.apteva-chat.apteva-force-light .apteva-transcript-flash{background-color:#eff6ff!important;border-color:#bfdbfe!important}.apteva-chat.apteva-force-light .apteva-transcript-flash span{color:#1d4ed8!important}.apteva-chat.apteva-force-light .apteva-widget,.apteva-widget.apteva-force-light{--aw-bg:#fff;--aw-bg-subtle:#fafafa;--aw-bg-muted:#f5f5f5;--aw-bg-input:#fafafa;--aw-border:#e5e5e5;--aw-border-focus:#3b82f6;--aw-text:#171717;--aw-text-heading:#171717;--aw-text-body:#525252;--aw-text-muted:#737373;--aw-text-placeholder:#a3a3a3;--aw-primary:#3b82f6;--aw-primary-hover:#2563eb;--aw-hover-bg:#fafafa;--aw-danger:#ef4444}.apteva-chat.apteva-force-light .apteva-tool-card-running{color:#1d4ed8!important;background-color:#eff6ff!important;border-color:#bfdbfe!important}.apteva-chat.apteva-force-light .apteva-tool-card-completed{color:#15803d!important;background-color:#f0fdf4!important;border-color:#bbf7d0!important}.apteva-chat.apteva-force-light .apteva-tool-card-error{color:#b91c1c!important;background-color:#fef2f2!important;border-color:#fecaca!important}.apteva-chat.apteva-force-light .apteva-tool-card-preparing{color:#92400e!important;background-color:#fef3c7!important;border-color:#fcd34d!important}.apteva-chat.apteva-force-light .apteva-tool-inline-line{background-color:#d4d4d4!important}.apteva-chat.apteva-force-light .apteva-tool-inline-icon{color:#7c3aed!important}.apteva-chat.apteva-force-light .apteva-tool-inline-text{color:#9ca3af!important}.apteva-chat.apteva-force-light .apteva-file-badge{background-color:#f5f5f5!important}.apteva-chat.apteva-force-light .apteva-file-badge-icon,.apteva-chat.apteva-force-light .apteva-welcome-empty{color:#737373!important}.apteva-chat.apteva-force-light .apteva-welcome-icon{color:#a3a3a3!important}.apteva-chat.apteva-force-light .apteva-welcome-title{color:#111827!important}.apteva-chat.apteva-force-light .apteva-welcome-subtitle{color:#737373!important}.apteva-chat.apteva-force-light .apteva-prompt-card{background-color:#fff!important;border-color:#e5e5e5!important}.apteva-chat.apteva-force-light .apteva-prompt-card:hover{background-color:#fafafa!important;border-color:#93c5fd!important}.apteva-chat.apteva-force-light .apteva-prompt-text{color:#111827!important}.apteva-chat.apteva-force-light .apteva-prompt-desc{color:#737373!important}.apteva-chat.apteva-force-light .apteva-prompt-icon-box{color:#737373!important;background-color:#f5f5f5!important}.apteva-chat.apteva-force-light .group:hover .apteva-prompt-icon-box{color:#2563eb!important;background-color:#dbeafe!important}@keyframes apteva-slide-in{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes apteva-highlight-fade{0%{background-color:#3b82f626}to{background-color:#0000}}.apteva-list-item-new,.apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade!important}.apteva-table-row-new td{background-color:#3b82f61a!important}.apteva-list-streaming,.apteva-table-streaming{border-top:1px dashed #8080804d!important}@media (prefers-color-scheme:dark){.apteva-list-item-new,.apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade-dark!important}.apteva-table-row-new td{background-color:#3b82f626!important}}.dark .apteva-list-item-new,.dark .apteva-table-row-new{animation:.3s ease-out apteva-slide-in,.5s ease-out .3s apteva-highlight-fade-dark!important}.dark .apteva-table-row-new td{background-color:#3b82f626!important}@keyframes apteva-highlight-fade-dark{0%{background-color:#3b82f633}to{background-color:#0000}}.apteva-chat-minimal{background-color:#0000!important}.apteva-chat-minimal .apteva-chat-header{background-color:#0000!important;border:none!important}.apteva-chat-minimal .apteva-message-list{background-color:#0000!important}.apteva-chat-minimal .apteva-composer{background-color:#0000!important;border:1px solid #80808033!important}.apteva-chat-minimal .apteva-message-assistant{background-color:#80808014!important}.apteva-chat-minimal .apteva-message-user{color:inherit!important;background-color:#3b82f626!important}.apteva-chat-terminal{background-color:#0a0a0a!important;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace!important}.apteva-chat-terminal *{font-family:inherit!important}.apteva-chat-terminal .apteva-chat-header,.apteva-chat-terminal.apteva-force-dark .apteva-chat-header{background-color:#0a0a0a!important;border-color:#1a1a1a!important}.apteva-chat-terminal .apteva-chat-title,.apteva-chat-terminal.apteva-force-dark .apteva-chat-title{color:#e0e0e0!important;font-size:.875rem!important}.apteva-chat-terminal .apteva-chat-status,.apteva-chat-terminal.apteva-force-dark .apteva-chat-status{color:#666!important}.apteva-chat-terminal .apteva-chat-status-tool,.apteva-chat-terminal.apteva-force-dark .apteva-chat-status-tool{color:#f97316!important}.apteva-chat-terminal .apteva-message-list,.apteva-chat-terminal.apteva-force-dark .apteva-message-list{background-color:#0a0a0a!important}.apteva-chat-terminal .apteva-message-user,.apteva-chat-terminal.apteva-force-dark .apteva-message-user{color:#e0e0e0!important;background-color:#1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-message-assistant,.apteva-chat-terminal.apteva-force-dark .apteva-message-assistant{color:#e0e0e0!important;background-color:#111!important;border:1px solid #1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-message-timestamp,.apteva-chat-terminal.apteva-force-dark .apteva-message-timestamp-assistant{color:#444!important}.apteva-chat-terminal .apteva-message-timestamp-user{color:#666!important}.apteva-chat-terminal .apteva-composer,.apteva-chat-terminal.apteva-force-dark .apteva-composer{background-color:#111!important;border:1px solid #1a1a1a!important;border-radius:4px!important}.apteva-chat-terminal .apteva-composer textarea,.apteva-chat-terminal.apteva-force-dark .apteva-composer textarea{color:#e0e0e0!important}.apteva-chat-terminal .apteva-composer textarea::placeholder,.apteva-chat-terminal.apteva-force-dark .apteva-composer textarea::placeholder{color:#666!important}.apteva-chat-terminal .apteva-composer-send-btn,.apteva-chat-terminal.apteva-force-dark .apteva-composer-send-btn{color:#888!important;background-color:#1a1a1a!important;border-color:#333!important}.apteva-chat-terminal .apteva-composer-send-btn:hover{color:#f97316!important;border-color:#f97316!important}.apteva-chat-terminal .apteva-composer-stop-btn{color:#f97316!important;background-color:#f9731626!important;border-color:#f97316!important}.apteva-chat-terminal .apteva-composer-menu-btn{color:#666!important}.apteva-chat-terminal .apteva-composer-menu-btn:hover{color:#f97316!important;background-color:#1a1a1a!important}.apteva-chat-terminal .apteva-tool-card,.apteva-chat-terminal .apteva-tool-group{border-radius:4px!important}.apteva-chat-terminal .apteva-tool-card-running{color:#f97316!important;background-color:#f973161a!important;border-color:#f973164d!important}.apteva-chat-terminal .apteva-tool-card-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-chat-terminal .apteva-tool-card-preparing,.apteva-chat-terminal .apteva-tool-group-running{color:#f97316!important;background-color:#f973161a!important;border-color:#f973164d!important}.apteva-chat-terminal .apteva-tool-group-completed{color:#4ade80!important;background-color:#22c55e1a!important;border-color:#22c55e4d!important}.apteva-chat-terminal .apteva-tool-group-error{color:#f87171!important;background-color:#ef44441a!important;border-color:#ef44444d!important}.apteva-chat-terminal .apteva-tool-group-list{border-top-color:#ffffff1a!important}.apteva-chat-terminal .apteva-tool-group-item-done{color:#4ade80!important}.apteva-chat-terminal .apteva-tool-group-item-error{color:#f87171!important}.apteva-chat-terminal .apteva-md-link{color:#f97316!important}.apteva-chat-terminal .apteva-md-link:hover{color:#fb923c!important}.apteva-chat-terminal .apteva-md-inline-code{color:#3b82f6!important;background-color:#1a1a1a!important}@keyframes voicePulse{0%,to{opacity:.5;transform:scale(1)}50%{opacity:.15;transform:scale(1.4)}}.apteva-voice-overlay{display:flex;align-items: center;gap:.75rem;padding:.5rem 0}.apteva-voice-indicator{display:flex;position:relative;flex-shrink:0;justify-content:center;align-items: center;width:2rem;height:2rem}.apteva-voice-pulse{background-color:#ef4444;border-radius:50%;width:1rem;height:1rem}.apteva-voice-pulse-active{animation:1.5s ease-in-out infinite voicePulse;box-shadow:0 0 0 4px #ef444433}.apteva-voice-transcript-area{flex:1;min-width:0;font-size:.875rem;line-height:1.5}.apteva-voice-partial{color:inherit;opacity:.9}.apteva-voice-connecting{color:inherit;opacity:.5;font-style:italic}.apteva-voice-listening{color:inherit;opacity:.5}.apteva-voice-controls{display:flex;flex-shrink:0;align-items: center;gap:.5rem}.apteva-voice-duration{font-variant-numeric:tabular-nums;opacity:.5;font-size:.75rem}.apteva-voice-stop-btn{color:#fff;cursor:pointer;display:flex;background-color:#ef4444;border:none;border-radius:.5rem;justify-content:center;align-items: center;width:2rem;height:2rem;transition:background-color .15s}.apteva-voice-stop-btn:hover{background-color:#dc2626}.apteva-composer-voice-btn{cursor:pointer;display:flex;border:none;justify-content:center;align-items: center;transition:all .15s}.apteva-chat-status-voice{color:#ef4444!important}.apteva-force-light .apteva-voice-partial{color:#1f2937}.apteva-force-light .apteva-voice-connecting,.apteva-force-light .apteva-voice-listening{color:#6b7280}.apteva-force-light .apteva-voice-duration{color:#9ca3af}.apteva-force-light .apteva-composer-voice-btn{color:#6b7280}.apteva-force-light .apteva-composer-voice-btn:hover{color:#ef4444;background-color:#ef44441a}.apteva-force-dark .apteva-voice-partial{color:#e5e7eb}.apteva-force-dark .apteva-voice-connecting,.apteva-force-dark .apteva-voice-listening{color:#9ca3af}.apteva-force-dark .apteva-voice-duration{color:#6b7280}.apteva-force-dark .apteva-composer-voice-btn{color:#9ca3af}.apteva-force-dark .apteva-composer-voice-btn:hover{color:#ef4444;background-color:#ef444426}.apteva-chat-terminal .apteva-voice-partial{color:#e5e7eb}.apteva-chat-terminal .apteva-voice-connecting,.apteva-chat-terminal .apteva-voice-listening{color:#6b7280}.apteva-chat-terminal .apteva-voice-duration{color:#525252}.apteva-chat-terminal .apteva-composer-voice-btn{color:#737373}.apteva-chat-terminal .apteva-composer-voice-btn:hover{color:#ef4444;background-color:#ef44441a}.apteva-chat-terminal .apteva-voice-pulse{background-color:#f97316}.apteva-chat-terminal .apteva-voice-pulse-active{box-shadow:0 0 0 4px #f9731633}.apteva-chat-terminal .apteva-voice-stop-btn{background-color:#f97316}.apteva-chat-terminal .apteva-voice-stop-btn:hover{background-color:#ea580c}.apteva-chat-terminal .apteva-chat-status-voice{color:#f97316!important}}