titan-agent 5.2.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -8
- package/dist/eval/harness.js +49 -0
- package/dist/eval/harness.js.map +1 -1
- package/dist/eval/parity.js +148 -0
- package/dist/eval/parity.js.map +1 -0
- package/dist/eval/record.js +96 -0
- package/dist/eval/record.js.map +1 -0
- package/dist/gateway/metrics.js +20 -1
- package/dist/gateway/metrics.js.map +1 -1
- package/dist/gateway/server.js +5 -1
- package/dist/gateway/server.js.map +1 -1
- package/dist/utils/constants.js +1 -1
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/safety.js +31 -1
- package/dist/utils/safety.js.map +1 -1
- package/package.json +5 -1
- package/scripts/eval-gate.sh +189 -0
- package/scripts/eval-record.ts +133 -0
- package/ui/dist/assets/{AuditPanel-DLy0WJQZ.js → AuditPanel-C31LRHZX.js} +1 -1
- package/ui/dist/assets/{AutonomyPanel-DjFAQGns.js → AutonomyPanel-CxQU72ZY.js} +1 -1
- package/ui/dist/assets/{AutopilotPanel-nBluaHA4.js → AutopilotPanel-D4FnBwJm.js} +1 -1
- package/ui/dist/assets/{AutoresearchPanel-BDy8y_Cs.js → AutoresearchPanel-BYHXZ9AO.js} +1 -1
- package/ui/dist/assets/{BackupPanel-B_Fv2pJA.js → BackupPanel-C4CQKf2P.js} +1 -1
- package/ui/dist/assets/{BrowserPanel-DOCT3-Rq.js → BrowserPanel-C-OFYyLm.js} +1 -1
- package/ui/dist/assets/{CPAgents-CpkHf0b8.js → CPAgents-CvkZDm_3.js} +1 -1
- package/ui/dist/assets/{CPDashboard-CnMd6qNK.js → CPDashboard-JmBLBbj7.js} +1 -1
- package/ui/dist/assets/{CPFiles-BDRjJpYl.js → CPFiles-BDToRw0a.js} +1 -1
- package/ui/dist/assets/{CPGoals-2DrwHk62.js → CPGoals-Dh9qJNWa.js} +1 -1
- package/ui/dist/assets/{CPInbox-C6l2o4FD.js → CPInbox-B6iaIbNG.js} +1 -1
- package/ui/dist/assets/{CPSocial-Cea6NptR.js → CPSocial-CsFrwZRC.js} +1 -1
- package/ui/dist/assets/{ChannelsPanel-5EhhyXeg.js → ChannelsPanel-D-S4ktFn.js} +1 -1
- package/ui/dist/assets/{CheckpointsPanel-BVt2oEUe.js → CheckpointsPanel-D-sP9ZuS.js} +1 -1
- package/ui/dist/assets/{CommandPostHub-PXKE62DN.js → CommandPostHub-BhlNyeDH.js} +3 -3
- package/ui/dist/assets/{CronPanel-lAsoKavq.js → CronPanel-Bf3rV7N2.js} +1 -1
- package/ui/dist/assets/{DaemonPanel-xt08Rs10.js → DaemonPanel-GGBWjTG2.js} +1 -1
- package/ui/dist/assets/{DataTable-BHOu7fZP.js → DataTable-D2Px4o6f.js} +1 -1
- package/ui/dist/assets/{EmptyState-Dk7BBthD.js → EmptyState-DH6-Jy6A.js} +1 -1
- package/ui/dist/assets/EvalHarnessPanel-Cz9dRg61.js +2 -0
- package/ui/dist/assets/{EvalPanel-D9rDf1bk.js → EvalPanel-CdjxzHlJ.js} +1 -1
- package/ui/dist/assets/{FilesPanel-CNrDLmix.js → FilesPanel-Dz8TFydL.js} +1 -1
- package/ui/dist/assets/{FleetPanel-DP_ji0AE.js → FleetPanel-CWwWWTD4.js} +1 -1
- package/ui/dist/assets/{HomelabPanel-B4bCsrBw.js → HomelabPanel-C7VBV7AC.js} +1 -1
- package/ui/dist/assets/{InfraView-C5OYx_9s.js → InfraView-B1TgXARJ.js} +2 -2
- package/ui/dist/assets/{InlineEditableField-DyBCbIoN.js → InlineEditableField-DOJNOL8m.js} +1 -1
- package/ui/dist/assets/{Input-DWnbv1Yh.js → Input-BgyHgQ3D.js} +1 -1
- package/ui/dist/assets/{IntegrationsPanel-DsB6hjvE.js → IntegrationsPanel-O26b4nhv.js} +1 -1
- package/ui/dist/assets/{IntelligenceView-PIFGvIg_.js → IntelligenceView-DUhTQ8f_.js} +2 -2
- package/ui/dist/assets/{LearningPanel-D_S4HFX5.js → LearningPanel-DX5S9ovg.js} +1 -1
- package/ui/dist/assets/{LogsPanel-BnWNREPX.js → LogsPanel-DdeTnATQ.js} +1 -1
- package/ui/dist/assets/{McpPanel-CIMxZ2Am.js → McpPanel-BpXWrP1a.js} +1 -1
- package/ui/dist/assets/{MemoryGraphPanel-DD7x4rrm.js → MemoryGraphPanel-CNkZmTUy.js} +1 -1
- package/ui/dist/assets/{MemoryWikiPanel-BPPVAH0b.js → MemoryWikiPanel-o4L8Df-n.js} +1 -1
- package/ui/dist/assets/{MeshPanel-CiuwR3oV.js → MeshPanel-DMBQJFCC.js} +1 -1
- package/ui/dist/assets/{NvidiaPanel-DVntoRrH.js → NvidiaPanel-C8P-tJFG.js} +1 -1
- package/ui/dist/assets/{OrganismPanel-pqIKtHrW.js → OrganismPanel-CcfHDWDk.js} +1 -1
- package/ui/dist/assets/OverviewPanel-BSotI1Zv.js +1 -0
- package/ui/dist/assets/{PageHeader-CF75km05.js → PageHeader-DPJuAgJk.js} +1 -1
- package/ui/dist/assets/{PaperclipPanel-CwN5-cKg.js → PaperclipPanel-aXoXUjo6.js} +1 -1
- package/ui/dist/assets/{PersonasPanel-ClC_TTGX.js → PersonasPanel-DdPZxz2C.js} +1 -1
- package/ui/dist/assets/{RecipesPanel-Di2l-eOe.js → RecipesPanel-D7qffXQN.js} +1 -1
- package/ui/dist/assets/{SecurityPanel-DjC4pXGM.js → SecurityPanel-BDRK5el7.js} +1 -1
- package/ui/dist/assets/{SelfImprovePanel-CNpCp5N4.js → SelfImprovePanel-oYiMwFnA.js} +1 -1
- package/ui/dist/assets/{SelfProposalsPanel-BJL6Fjxo.js → SelfProposalsPanel-DOpNU_rr.js} +1 -1
- package/ui/dist/assets/{SessionsPanel-EAGKDQp0.js → SessionsPanel-eRbM3D9P.js} +1 -1
- package/ui/dist/assets/{SessionsTab-tc0njI15.js → SessionsTab-Jq3UKQCI.js} +1 -1
- package/ui/dist/assets/{SettingsPanel-BdSGImIa.js → SettingsPanel-DBIvKUYY.js} +1 -1
- package/ui/dist/assets/{SettingsView-DQB64bjy.js → SettingsView-yfSY4OLt.js} +2 -2
- package/ui/dist/assets/{SkeletonLoader-P8SFCyGi.js → SkeletonLoader-D1d-Gyyg.js} +1 -1
- package/ui/dist/assets/{SkillsPanel-lDMl_8da.js → SkillsPanel-bubl9nag.js} +1 -1
- package/ui/dist/assets/{SomaView-BG7YvBu2.js → SomaView-D3aFL8Tw.js} +1 -1
- package/ui/dist/assets/{StatCard-Cv2u-yqA.js → StatCard-CEVFsz7t.js} +1 -1
- package/ui/dist/assets/{StatusBadge-JJeoEdCm.js → StatusBadge-DxeA9LNd.js} +1 -1
- package/ui/dist/assets/{TeamsPanel-D-iCyyYd.js → TeamsPanel-D6IJJIR_.js} +1 -1
- package/ui/dist/assets/{TelemetryPanel-DHNFyCwn.js → TelemetryPanel-SMPebdjQ.js} +1 -1
- package/ui/dist/assets/{TitanCanvas-BhurNMK3.js → TitanCanvas-BQU1yxqf.js} +3 -3
- package/ui/dist/assets/ToolsView-DgP4uRPr.js +2 -0
- package/ui/dist/assets/{Tooltip-D4IeQDJL.js → Tooltip-CNPQr7IO.js} +1 -1
- package/ui/dist/assets/{TraceViewer-CMd-Wi0z.js → TraceViewer-BbISy_ET.js} +1 -1
- package/ui/dist/assets/{TrainingPanel-CLtiBq2h.js → TrainingPanel-BdCHcv6t.js} +1 -1
- package/ui/dist/assets/{VoiceOverlay-BXPVdnJc.js → VoiceOverlay-l6yoasVz.js} +1 -1
- package/ui/dist/assets/{VramPanel-DjuwGUzA.js → VramPanel-XLhmen92.js} +1 -1
- package/ui/dist/assets/{WatchView-B7sDnMpl.js → WatchView-Bt-lNNWJ.js} +1 -1
- package/ui/dist/assets/{WorkTab-B5nQ4Y7A.js → WorkTab-IG-F6Qll.js} +1 -1
- package/ui/dist/assets/{WorkflowsPanel-2z0TeXyR.js → WorkflowsPanel-DsMpnwLK.js} +1 -1
- package/ui/dist/assets/{arrow-left-BKOkzkae.js → arrow-left-C_H9Z2Tm.js} +1 -1
- package/ui/dist/assets/{chart-column-D39PCk17.js → chart-column-rR6tb72l.js} +1 -1
- package/ui/dist/assets/{circle-check-big-CMz0QouP.js → circle-check-big-B1hMwau0.js} +1 -1
- package/ui/dist/assets/{dollar-sign-Bu8fZOQl.js → dollar-sign-DhYwsTnR.js} +1 -1
- package/ui/dist/assets/{download-vvx6zJ-U.js → download-UDDcAlZC.js} +1 -1
- package/ui/dist/assets/{eye-off-BPXFIzlW.js → eye-off-Cx0M_VQb.js} +1 -1
- package/ui/dist/assets/{funnel-Bqns-i8I.js → funnel-B7YvM1ei.js} +1 -1
- package/ui/dist/assets/{git-branch-CdmeqL8d.js → git-branch-BhTBN3J6.js} +1 -1
- package/ui/dist/assets/index-D0RJ8701.css +1 -0
- package/ui/dist/assets/{index-C6oarzis.js → index-D7Clon2u.js} +2 -2
- package/ui/dist/assets/layers-B6jDzitD.js +6 -0
- package/ui/dist/assets/{legacy-DFIaZTiF.js → legacy-av079XKu.js} +1 -1
- package/ui/dist/assets/{lightbulb-DOL6Q-iP.js → lightbulb-DRuQ3Chf.js} +1 -1
- package/ui/dist/assets/{pause-B0XymOnS.js → pause-DqkRWPB_.js} +1 -1
- package/ui/dist/assets/{play-Dwp2l5HG.js → play-hUyR3CVS.js} +1 -1
- package/ui/dist/assets/{plug-DRlTjWqQ.js → plug-CvpyjJt_.js} +1 -1
- package/ui/dist/assets/{proxy-sXxWK7WF.js → proxy-Cc5bR828.js} +1 -1
- package/ui/dist/assets/{square-yh0jffQZ.js → square-CdiC0J8Z.js} +1 -1
- package/ui/dist/assets/{target-GxtNG2RW.js → target-DemL8_0v.js} +1 -1
- package/ui/dist/assets/{toggle-right-CYQd_Ux1.js → toggle-right-Dsk892k5.js} +1 -1
- package/ui/dist/assets/{trash-2-B4jp_pAQ.js → trash-2-Byj4OvKB.js} +1 -1
- package/ui/dist/assets/{trending-up-B26tNhFP.js → trending-up-Dh_CffGX.js} +1 -1
- package/ui/dist/assets/{trophy-Bf3ZeSeb.js → trophy-DDr2AePx.js} +1 -1
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/EvalHarnessPanel-CJv8CUDy.js +0 -1
- package/ui/dist/assets/OverviewPanel-gqYRhmpF.js +0 -6
- package/ui/dist/assets/ToolsView-C8sWxLny.js +0 -2
- package/ui/dist/assets/index-DsFoD9SP.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,j as e,e as F,K as S,b as C,$ as K}from"./index-
|
|
1
|
+
import{r as l,j as e,e as F,K as S,b as C,$ as K}from"./index-D7Clon2u.js";import{P as A}from"./plug-CvpyjJt_.js";import{C as U}from"./circle-check-big-B1hMwau0.js";import{E as T}from"./eye-off-Cx0M_VQb.js";import{i as I,c as O}from"./TitanCanvas-BQU1yxqf.js";import{a as R,C as q}from"./VoiceOverlay-l6yoasVz.js";const k=[{id:"anthropic",label:"Anthropic",fieldKey:"anthropicKey",fieldType:"key",placeholder:"sk-ant-..."},{id:"openai",label:"OpenAI",fieldKey:"openaiKey",fieldType:"key",placeholder:"sk-..."},{id:"google",label:"Google AI",fieldKey:"googleKey",fieldType:"key",placeholder:"AIza..."},{id:"groq",label:"Groq",fieldKey:"groqKey",fieldType:"key",placeholder:"gsk_..."},{id:"mistral",label:"Mistral",fieldKey:"mistralKey",fieldType:"key",placeholder:"API key"},{id:"openrouter",label:"OpenRouter",fieldKey:"openrouterKey",fieldType:"key",placeholder:"sk-or-..."},{id:"fireworks",label:"Fireworks AI",fieldKey:"fireworksKey",fieldType:"key",placeholder:"API key"},{id:"xai",label:"xAI (Grok)",fieldKey:"xaiKey",fieldType:"key",placeholder:"xai-..."},{id:"together",label:"Together AI",fieldKey:"togetherKey",fieldType:"key",placeholder:"API key"},{id:"deepseek",label:"DeepSeek",fieldKey:"deepseekKey",fieldType:"key",placeholder:"sk-..."},{id:"perplexity",label:"Perplexity",fieldKey:"perplexityKey",fieldType:"key",placeholder:"pplx-..."},{id:"ollama",label:"Ollama",fieldKey:"ollamaUrl",fieldType:"url",placeholder:"http://localhost:11434"}];function P({configured:a}){return e.jsxs("span",{className:`inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium ${a?"bg-success/10 text-success":"bg-border-light/20 text-text-muted"}`,children:[e.jsx("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${a?"bg-success":"bg-border-light"}`}),a?"Configured":"Not configured"]})}function M({provider:a,configured:b,currentUrl:o,onSave:p,saving:v}){const[f,y]=l.useState(!1),[c,d]=l.useState(a.fieldType==="url"&&o||""),[x,u]=l.useState(!1),h=a.fieldType==="key",i=v===a.id;return e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary",children:[e.jsxs("button",{onClick:()=>y(!f),className:"flex w-full items-center justify-between px-4 py-3 text-left",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[f?e.jsx(R,{className:"h-4 w-4 text-text-muted"}):e.jsx(q,{className:"h-4 w-4 text-text-muted"}),e.jsx("span",{className:"text-sm font-medium text-text",children:a.label})]}),e.jsx(P,{configured:b})]}),f&&e.jsxs("div",{className:"border-t border-bg-tertiary px-4 py-4 space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-text-muted",children:h?"API Key":"Base URL"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:`integration-${a.id}`,name:`integration-${a.id}`,type:h&&!x?"password":"text",value:c,onChange:j=>d(j.target.value),placeholder:a.placeholder,className:"w-full rounded-lg border border-border bg-bg px-3 py-2 pr-10 text-sm text-text outline-none focus:border-accent"}),h&&e.jsx("button",{type:"button",onClick:()=>u(!x),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-secondary",children:x?e.jsx(T,{className:"h-4 w-4"}):e.jsx(I,{className:"h-4 w-4"})})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:()=>p(a.fieldKey,c),disabled:i||!c,className:"flex items-center gap-2 rounded-lg bg-accent px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-accent/80 disabled:opacity-50",children:[e.jsx(O,{className:"h-3.5 w-3.5"}),i?"Saving...":"Save"]})})]})]})}function Q(){const[a,b]=l.useState({}),[o,p]=l.useState({clientIdSet:!1,clientSecretSet:!1}),[v,f]=l.useState(!0),[y,c]=l.useState(null),[d,x]=l.useState(null),[u,h]=l.useState(""),[i,j]=l.useState(""),[N,G]=l.useState(!1);l.useEffect(()=>{(async()=>{var t;try{const n=await S();if(n.providers&&b(n.providers),(t=n.oauth)!=null&&t.google){const g=n.oauth.google;try{const r=await(await C("/api/auth/google/status")).json();g.connected=r.connected,g.email=r.email}catch{}p(g)}}catch{}finally{f(!1)}})()},[]);const E=()=>{window.location.href="/api/auth/google/start"},$=async()=>{try{await C("/api/auth/google/disconnect",{method:"POST"}),p(s=>({...s,connected:!1,email:void 0})),m("success","Google account disconnected")}catch{m("error","Failed to disconnect")}},m=(s,t)=>{x({type:s,message:t}),setTimeout(()=>x(null),3e3)},D=async(s,t)=>{var g,w;const n=((g=k.find(r=>r.fieldKey===s))==null?void 0:g.id)||s;c(n);try{await K({[s]:t});const r=await S();r.providers&&b(r.providers),m("success",`${((w=k.find(B=>B.fieldKey===s))==null?void 0:w.label)||"Provider"} saved`)}catch(r){m("error",r instanceof Error?r.message:"Failed to save")}finally{c(null)}},L=async()=>{var s;c("oauth");try{const t={};u&&(t.googleOAuthClientId=u),i&&(t.googleOAuthClientSecret=i),await K(t);const n=await S();(s=n.oauth)!=null&&s.google&&p(n.oauth.google),m("success","Google OAuth settings saved"),h(""),j("")}catch(t){m("error",t instanceof Error?t.message:"Failed to save")}finally{c(null)}};return v?e.jsx("div",{className:"space-y-4",children:Array.from({length:4}).map((s,t)=>e.jsx("div",{className:"h-14 animate-pulse rounded-xl border border-border bg-bg-secondary"},t))}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-accent/10",children:e.jsx(A,{className:"h-4 w-4 text-accent-hover"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg font-semibold text-text",children:"Integrations"}),e.jsx("p",{className:"text-xs text-text-muted",children:"Configure LLM providers and external service connections"})]})]}),d&&e.jsxs("div",{className:`flex items-center gap-2 rounded-lg border px-4 py-2 text-sm ${d.type==="success"?"border-success/50 text-success":"border-error/50 text-error"}`,children:[d.type==="success"?e.jsx(U,{className:"h-4 w-4"}):e.jsx(F,{className:"h-4 w-4"}),d.message]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"LLM Providers"}),e.jsx("div",{className:"space-y-2",children:k.map(s=>{const t=a[s.id],n=s.id==="ollama"?!!(t!=null&&t.baseUrl):!!(t!=null&&t.configured);return e.jsx(M,{provider:s,configured:n,currentUrl:s.fieldType==="url"?(t==null?void 0:t.baseUrl)||"":void 0,onSave:D,saving:y},s.id)})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"Google Services (OAuth)"}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-text",children:"Google OAuth 2.0"}),e.jsx("p",{className:"text-xs text-text-muted mt-0.5",children:o.connected&&o.email?`Connected as ${o.email}`:"Gmail, Drive, Calendar, Docs, Sheets, Tasks"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(P,{configured:!!o.connected}),o.clientIdSet&&!o.connected&&e.jsxs("button",{onClick:E,className:"flex items-center gap-1.5 rounded-lg bg-accent px-3 py-1.5 text-xs font-medium text-white hover:bg-accent/80 transition-colors",children:[e.jsx(A,{className:"h-3.5 w-3.5"}),"Connect Google"]}),o.connected&&e.jsx("button",{onClick:$,className:"flex items-center gap-1.5 rounded-lg border border-red-500/30 px-3 py-1.5 text-xs font-medium text-red-400 hover:bg-red-500/10 transition-colors",children:"Disconnect"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-text-muted",children:"Client ID"}),e.jsx("input",{id:"integration-google-client-id",name:"integration-google-client-id",type:"text",value:u,onChange:s=>h(s.target.value),placeholder:o.clientIdSet?"(configured)":"your-client-id.apps.googleusercontent.com",className:"w-full rounded-lg border border-border bg-bg px-3 py-2 text-sm text-text outline-none focus:border-accent"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-text-muted",children:"Client Secret"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:"integration-google-client-secret",name:"integration-google-client-secret",type:N?"text":"password",value:i,onChange:s=>j(s.target.value),placeholder:o.clientSecretSet?"(configured)":"GOCSPX-...",className:"w-full rounded-lg border border-border bg-bg px-3 py-2 pr-10 text-sm text-text outline-none focus:border-accent"}),e.jsx("button",{type:"button",onClick:()=>G(!N),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-secondary",children:N?e.jsx(T,{className:"h-4 w-4"}):e.jsx(I,{className:"h-4 w-4"})})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs("button",{onClick:L,disabled:y==="oauth"||!u&&!i,className:"flex items-center gap-2 rounded-lg bg-accent px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-accent/80 disabled:opacity-50",children:[e.jsx(O,{className:"h-3.5 w-3.5"}),y==="oauth"?"Saving...":"Save OAuth Settings"]})})]})]})]})}export{Q as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AutopilotPanel-
|
|
2
|
-
import{r as s,j as e,n as a,_ as t}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AutopilotPanel-D4FnBwJm.js","assets/index-D7Clon2u.js","assets/index-D0RJ8701.css","assets/PageHeader-DPJuAgJk.js","assets/VoiceOverlay-l6yoasVz.js","assets/WorkflowsPanel-DsMpnwLK.js","assets/Input-BgyHgQ3D.js","assets/TitanCanvas-BQU1yxqf.js","assets/TitanCanvas-BfitWg9R.css","assets/InlineEditableField-DOJNOL8m.js","assets/target-DemL8_0v.js","assets/play-hUyR3CVS.js","assets/pause-DqkRWPB_.js","assets/trash-2-Byj4OvKB.js","assets/toggle-right-Dsk892k5.js","assets/LearningPanel-DX5S9ovg.js","assets/lightbulb-DRuQ3Chf.js","assets/trending-up-Dh_CffGX.js","assets/MemoryGraphPanel-CNkZmTUy.js","assets/SelfImprovePanel-oYiMwFnA.js","assets/circle-check-big-B1hMwau0.js","assets/trophy-DDr2AePx.js","assets/PersonasPanel-DdPZxz2C.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as s,j as e,n as a,_ as t}from"./index-D7Clon2u.js";const i=s.lazy(()=>t(()=>import("./AutopilotPanel-D4FnBwJm.js"),__vite__mapDeps([0,1,2,3,4]))),n=s.lazy(()=>t(()=>import("./WorkflowsPanel-DsMpnwLK.js"),__vite__mapDeps([5,1,2,3,4,6,7,8,9,10,11,12,13,14]))),d=s.lazy(()=>t(()=>import("./LearningPanel-DX5S9ovg.js"),__vite__mapDeps([15,1,2,3,4,7,8,16,17]))),c=s.lazy(()=>t(()=>import("./MemoryGraphPanel-CNkZmTUy.js"),__vite__mapDeps([18,1,2,7,4,8,13]))),m=s.lazy(()=>t(()=>import("./SelfImprovePanel-oYiMwFnA.js"),__vite__mapDeps([19,1,2,7,4,8,20,21,17,11,13]))),x=s.lazy(()=>t(()=>import("./PersonasPanel-DdPZxz2C.js"),__vite__mapDeps([22,1,2]))),p=[{id:"autopilot",label:"Autopilot"},{id:"workflows",label:"Workflows"},{id:"learning",label:"Learning"},{id:"memory",label:"Memory & Graph"},{id:"self-improve",label:"Self-Improve"},{id:"personas",label:"Personas"}];function u(){const[l,r]=s.useState("autopilot");return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"shrink-0 px-5 pt-4 pb-0",children:[e.jsx("h1",{className:"text-sm font-semibold text-text mb-3",children:"Intelligence"}),e.jsx("div",{className:"flex items-center gap-0.5 border-b border-border/50",children:p.map(o=>e.jsxs("button",{onClick:()=>r(o.id),className:a("px-3 py-2 text-xs font-medium transition-colors relative",l===o.id?"text-accent":"text-text-muted hover:text-text-secondary"),children:[o.label,l===o.id&&e.jsx("div",{className:"absolute bottom-0 left-1 right-1 h-[2px] bg-accent rounded-full"})]},o.id))})]}),e.jsx("div",{className:"flex-1 min-h-0 overflow-auto p-5",children:e.jsxs(s.Suspense,{fallback:e.jsx("div",{className:"skeleton-shimmer h-40 rounded-lg"}),children:[l==="autopilot"&&e.jsx(i,{}),l==="workflows"&&e.jsx(n,{}),l==="learning"&&e.jsx(d,{}),l==="memory"&&e.jsx(c,{}),l==="self-improve"&&e.jsx(m,{}),l==="personas"&&e.jsx(x,{})]})})]})}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as e,T as g,b as x}from"./index-
|
|
1
|
+
import{r as o,j as e,T as g,b as x}from"./index-D7Clon2u.js";import{P as j}from"./PageHeader-DPJuAgJk.js";import{R as f,d as p,W as N,D as v}from"./TitanCanvas-BQU1yxqf.js";import{L as y}from"./lightbulb-DRuQ3Chf.js";import{T as C}from"./trending-up-Dh_CffGX.js";import"./VoiceOverlay-l6yoasVz.js";function w(t){return t<3600?`${Math.floor(t/60)}m`:t<86400?`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`:`${Math.floor(t/86400)}d ${Math.floor(t%86400/3600)}h`}function k(t){return t<1e3?String(t):t<1e6?`${(t/1e3).toFixed(1)}K`:`${(t/1e6).toFixed(2)}M`}function l({icon:t,label:i,value:r,color:n,sub:a}){return e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-md",style:{backgroundColor:n+"15"},children:e.jsx(t,{className:"h-3.5 w-3.5",style:{color:n}})}),e.jsx("p",{className:"text-xs text-text-muted",children:i})]}),e.jsx("p",{className:"text-2xl font-bold text-text",children:r}),a&&e.jsx("p",{className:"text-[10px] text-text-muted mt-1",children:a})]})}function R(){const[t,i]=o.useState(null),[r,n]=o.useState(null),[a,b]=o.useState(null),[h,m]=o.useState(!0),u=()=>{m(!0),Promise.all([x("/api/learning").then(s=>s.ok?s.json():null).catch(()=>null),x("/api/stats").then(s=>s.ok?s.json():null).catch(()=>null),x("/api/graphiti").then(s=>s.ok?s.json():null).catch(()=>null)]).then(([s,c,d])=>{i(s),n(c),b(d?{nodeCount:d.nodeCount||0,edgeCount:d.edgeCount||0,episodeCount:d.episodeCount||0}:null)}).finally(()=>m(!1))};return o.useEffect(()=>{u()},[]),h?e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"h-10 animate-pulse rounded-xl bg-bg-secondary"}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:Array.from({length:8}).map((s,c)=>e.jsx("div",{className:"h-24 animate-pulse rounded-xl bg-bg-secondary"},c))})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsx(j,{title:"Learning",subtitle:"Knowledge base, tool mastery, and memory systems",breadcrumbs:[{label:"Admin",href:"/overview"},{label:"Memory"},{label:"Learning"}],actions:e.jsxs("button",{onClick:u,className:"flex items-center gap-1.5 rounded-lg bg-bg-tertiary px-3 py-1.5 text-xs text-text-secondary hover:bg-border hover:text-text transition-colors",children:[e.jsx(f,{className:"h-3.5 w-3.5"})," Refresh"]})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"Knowledge Base"}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(l,{icon:p,label:"Knowledge Entries",value:(t==null?void 0:t.knowledgeEntries)??0,color:"#6366f1",sub:"Facts, patterns, corrections"}),e.jsx(l,{icon:N,label:"Tools Tracked",value:(t==null?void 0:t.toolsTracked)??0,color:"#22d3ee",sub:"Success rates learned"}),e.jsx(l,{icon:g,label:"Error Patterns",value:(t==null?void 0:t.errorPatterns)??0,color:"#f59e0b",sub:"Known failure modes"}),e.jsx(l,{icon:y,label:"Corrections",value:(t==null?void 0:t.corrections)??0,color:"#34d399",sub:"User-taught improvements"})]})]}),a&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"Memory Graph"}),e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsx(l,{icon:v,label:"Entities",value:a.nodeCount,color:"#818cf8",sub:"People, topics, projects"}),e.jsx(l,{icon:C,label:"Relationships",value:a.edgeCount,color:"#22d3ee",sub:"Connections between entities"}),e.jsx(l,{icon:p,label:"Episodes",value:a.episodeCount,color:"#34d399",sub:"Conversation memories"})]})]}),r&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-3",children:"System"}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-4",children:[e.jsx("p",{className:"text-xs text-text-muted",children:"Tokens Used"}),e.jsx("p",{className:"text-xl font-bold text-text",children:k(r.totalTokens)})]}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-4",children:[e.jsx("p",{className:"text-xs text-text-muted",children:"Requests"}),e.jsx("p",{className:"text-xl font-bold text-text",children:r.totalRequests})]}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-4",children:[e.jsx("p",{className:"text-xs text-text-muted",children:"Uptime"}),e.jsx("p",{className:"text-xl font-bold text-text",children:w(r.uptime)})]}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-4",children:[e.jsx("p",{className:"text-xs text-text-muted",children:"Memory"}),e.jsxs("p",{className:"text-xl font-bold text-text",children:[r.memoryMB,"MB"]})]})]})]})]})}export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,ab as v,j as e}from"./index-
|
|
1
|
+
import{r,ab as v,j as e}from"./index-D7Clon2u.js";import{R as j}from"./TitanCanvas-BQU1yxqf.js";import"./VoiceOverlay-l6yoasVz.js";const x={debug:"bg-text-muted/20 text-text-secondary",info:"bg-info/20 text-info",warn:"bg-warning/20 text-warning",warning:"bg-warning/20 text-warning",error:"bg-error/20 text-error"};function L(){const[c,u]=r.useState([]),[g,m]=r.useState(!0),[i,d]=r.useState(null),[a,b]=r.useState(""),[o,h]=r.useState(100),[l,p]=r.useState(!1),s=r.useRef(null),n=r.useCallback(async()=>{try{const t=await v(a||void 0,o);u(t),d(null)}catch(t){d(t instanceof Error?t.message:"Failed to fetch logs")}finally{m(!1)}},[a,o]);return r.useEffect(()=>{n()},[n]),r.useEffect(()=>(l?s.current=setInterval(n,5e3):s.current&&(clearInterval(s.current),s.current=null),()=>{s.current&&clearInterval(s.current)}),[l,n]),g?e.jsx("div",{className:"h-96 animate-pulse rounded-xl border border-border bg-bg-secondary"}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-lg font-semibold text-text",children:"Logs"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("select",{value:a,onChange:t=>b(t.target.value),className:"rounded-lg border border-border bg-bg px-3 py-2 text-sm text-text outline-none focus:border-accent",children:[e.jsx("option",{value:"",children:"All levels"}),e.jsx("option",{value:"debug",children:"Debug"}),e.jsx("option",{value:"info",children:"Info"}),e.jsx("option",{value:"warn",children:"Warn"}),e.jsx("option",{value:"error",children:"Error"})]}),e.jsxs("select",{value:o,onChange:t=>h(Number(t.target.value)),className:"rounded-lg border border-border bg-bg px-3 py-2 text-sm text-text outline-none focus:border-accent",children:[e.jsx("option",{value:50,children:"50 entries"}),e.jsx("option",{value:100,children:"100 entries"}),e.jsx("option",{value:200,children:"200 entries"})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-text-secondary",children:[e.jsx("input",{type:"checkbox",checked:l,onChange:t=>p(t.target.checked),className:"h-4 w-4 rounded border-border accent-accent"}),"Auto-refresh (5s)"]}),e.jsx("button",{onClick:n,className:"ml-auto rounded-lg p-2 text-text-secondary transition-colors hover:bg-bg-tertiary hover:text-text",title:"Refresh",children:e.jsx(j,{className:"h-4 w-4"})})]}),i&&e.jsx("div",{className:"rounded-lg border border-error/50 bg-bg-secondary px-4 py-2 text-sm text-error",children:i}),e.jsx("div",{className:"max-h-[600px] overflow-y-auto rounded-xl border border-border bg-bg-secondary",children:c.length===0?e.jsx("p",{className:"px-4 py-12 text-center text-text-muted",children:"No logs found"}):e.jsx("div",{className:"divide-y divide-border",children:c.map((t,f)=>e.jsxs("div",{className:"flex items-start gap-3 px-4 py-2.5",children:[e.jsx("span",{className:"shrink-0 font-mono text-xs text-text-muted",children:new Date(t.timestamp).toLocaleTimeString()}),e.jsx("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-xs font-medium uppercase ${x[t.level]??x.debug}`,children:t.level}),e.jsx("span",{className:"min-w-0 break-all text-sm text-text",children:t.message})]},f))})})]})}export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,j as e,G as k,ai as z,aj as $,ak as b,al as R,am as I,an as E}from"./index-C6oarzis.js";import{P as h}from"./plug-DRlTjWqQ.js";import{R as D,P as L,h as g,l as G,m as B}from"./TitanCanvas-BhurNMK3.js";import{T as F}from"./trash-2-B4jp_pAQ.js";import"./VoiceOverlay-BXPVdnJc.js";function J(){const[n,j]=d.useState([]),[N,y]=d.useState([]),[f,x]=d.useState(!0),[m,c]=d.useState(!1),[v,p]=d.useState(null),[l,i]=d.useState(null),[s,a]=d.useState({id:"",name:"",description:"",type:"stdio",command:"",args:"",url:""}),o=async()=>{x(!0);try{const[t,r]=await Promise.all([z(),$()]);j(t),y(r)}catch{}x(!1)};d.useEffect(()=>{o()},[]);const C=async()=>{try{await b({id:s.id,name:s.name,description:s.description,type:s.type,...s.type==="stdio"?{command:s.command,args:s.args.split(/\s+/).filter(Boolean)}:{url:s.url}}),c(!1),a({id:"",name:"",description:"",type:"stdio",command:"",args:"",url:""}),o()}catch(t){alert(t.message)}},P=async t=>{try{await b({presetId:t}),o()}catch(r){alert(r.message)}},w=async t=>{confirm(`Remove MCP server "${t}"?`)&&(await E(t),o())},M=async(t,r)=>{await I(t,r),o()},T=async t=>{p(t),i(null);try{const r=await R(t);i({id:t,...r})}catch(r){i({id:t,ok:!1,tools:0,error:r.message})}p(null)},S=t=>t==="connected"?"text-[var(--success)]":t==="error"?"text-[var(--error)]":"text-[var(--text-muted)]",A=t=>t==="connected"?"bg-[var(--success)]":t==="error"?"bg-[var(--error)]":"bg-[var(--text-muted)]",u=N.filter(t=>!n.some(r=>r.id===t.id));return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(h,{className:"w-6 h-6 text-[var(--accent)]"}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl font-bold text-[var(--text)]",children:"MCP Connections"}),e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Connect to external tools via Model Context Protocol"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:o,className:"px-3 py-1.5 text-sm rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors",children:e.jsx(D,{size:14})}),e.jsxs("button",{onClick:()=>c(!m),className:"flex items-center gap-2 px-3 py-1.5 text-sm rounded-md bg-[var(--accent)] text-white hover:bg-[var(--accent-hover)] transition-colors",children:[e.jsx(L,{size:14})," Add Server"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Configured Servers"}),e.jsx("p",{className:"text-2xl font-bold text-[var(--text)]",children:n.length})]}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Connected"}),e.jsx("p",{className:"text-2xl font-bold text-[var(--success)]",children:n.filter(t=>t.status==="connected").length})]}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"External Tools"}),e.jsx("p",{className:"text-2xl font-bold text-[var(--accent)]",children:n.reduce((t,r)=>t+r.toolCount,0)})]})]}),m&&e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4 space-y-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)]",children:"Add MCP Server"}),u.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)] mb-2",children:"Quick Add Presets"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(t=>e.jsxs("button",{onClick:()=>P(t.id),className:"flex items-center gap-2 px-3 py-1.5 text-xs rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors",children:[e.jsx(g,{size:12})," ",t.name]},t.id))})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"ID"}),e.jsx("input",{id:"mcp-server-id",name:"mcp-server-id",value:s.id,onChange:t=>a({...s,id:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"my-server"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Name"}),e.jsx("input",{id:"mcp-server-name",name:"mcp-server-name",value:s.name,onChange:t=>a({...s,name:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"My MCP Server"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Description"}),e.jsx("input",{id:"mcp-server-description",name:"mcp-server-description",value:s.description,onChange:t=>a({...s,description:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"What does this server do?"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Type"}),e.jsxs("select",{id:"mcp-server-type",name:"mcp-server-type",value:s.type,onChange:t=>a({...s,type:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",children:[e.jsx("option",{value:"stdio",children:"stdio (local process)"}),e.jsx("option",{value:"http",children:"HTTP (remote server)"})]})]}),s.type==="stdio"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Command"}),e.jsx("input",{id:"mcp-server-command",name:"mcp-server-command",value:s.command,onChange:t=>a({...s,command:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"npx @modelcontextprotocol/server-xxx"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Arguments (space-separated)"}),e.jsx("input",{id:"mcp-server-args",name:"mcp-server-args",value:s.args,onChange:t=>a({...s,args:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"--port 3000"})]})]}):e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Server URL"}),e.jsx("input",{id:"mcp-server-url",name:"mcp-server-url",value:s.url,onChange:t=>a({...s,url:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"http://localhost:3000/mcp"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:C,disabled:!s.id||!s.name,className:"px-4 py-1.5 text-sm rounded-md bg-[var(--accent)] text-white hover:bg-[var(--accent-hover)] disabled:opacity-40 transition-colors",children:"Add Server"}),e.jsx("button",{onClick:()=>c(!1),className:"px-4 py-1.5 text-sm rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors",children:"Cancel"})]})]}),f?e.jsx("div",{className:"text-[var(--text-muted)] text-sm",children:"Loading MCP servers..."}):n.length===0?e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-8 text-center",children:[e.jsx(h,{className:"w-10 h-10 text-[var(--text-muted)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--text-secondary)] mb-1",children:"No MCP servers configured"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"Add an MCP server to connect TITAN to external tools like databases, APIs, and services."})]}):e.jsx("div",{className:"space-y-3",children:n.map(t=>e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5",children:t.type==="stdio"?e.jsx(g,{size:18,className:"text-[var(--text-muted)]"}):e.jsx(k,{size:18,className:"text-[var(--text-muted)]"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-[var(--text)]",children:t.name}),e.jsxs("span",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${A(t.status)}`}),e.jsx("span",{className:S(t.status),children:t.status})]}),t.toolCount>0&&e.jsxs("span",{className:"text-xs px-1.5 py-0.5 rounded bg-[var(--accent)]/10 text-[var(--accent)]",children:[t.toolCount," tools"]})]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-0.5",children:t.description}),e.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-1 font-mono",children:t.type==="stdio"?`${t.command} ${(t.args||[]).join(" ")}`:t.url})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>T(t.id),disabled:v===t.id,title:"Test connection",className:"p-1.5 rounded-md text-[var(--text-muted)] hover:text-[var(--text)] hover:bg-[var(--bg-tertiary)] transition-colors disabled:opacity-40",children:e.jsx(G,{size:14,className:v===t.id?"animate-pulse":""})}),e.jsx("button",{onClick:()=>M(t.id,!t.enabled),title:t.enabled?"Disable":"Enable",className:`p-1.5 rounded-md transition-colors hover:bg-[var(--bg-tertiary)] ${t.enabled?"text-[var(--success)]":"text-[var(--text-muted)]"}`,children:e.jsx(B,{size:14})}),e.jsx("button",{onClick:()=>w(t.id),title:"Remove",className:"p-1.5 rounded-md text-[var(--text-muted)] hover:text-[var(--error)] hover:bg-[var(--bg-tertiary)] transition-colors",children:e.jsx(F,{size:14})})]})]}),(l==null?void 0:l.id)===t.id&&e.jsx("div",{className:`mt-3 px-3 py-2 rounded-md text-xs ${l.ok?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:l.ok?`Connected successfully — ${l.tools} tools discovered`:`Connection failed: ${l.error}`})]},t.id))}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)] mb-2",children:"About MCP"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)] leading-relaxed",children:["Model Context Protocol (MCP) is the universal standard for connecting AI agents to external tools. TITAN acts as both an MCP ",e.jsx("strong",{className:"text-[var(--text-secondary)]",children:"server"})," (exposing its tools to other agents) and an MCP ",e.jsx("strong",{className:"text-[var(--text-secondary)]",children:"client"})," (connecting to external MCP servers). Add any MCP-compatible server and its tools automatically become available in TITAN."]})]})]})}export{J as default};
|
|
1
|
+
import{r as d,j as e,G as k,ai as z,aj as $,ak as b,al as R,am as I,an as E}from"./index-D7Clon2u.js";import{P as h}from"./plug-CvpyjJt_.js";import{R as D,P as L,h as g,l as G,m as B}from"./TitanCanvas-BQU1yxqf.js";import{T as F}from"./trash-2-Byj4OvKB.js";import"./VoiceOverlay-l6yoasVz.js";function J(){const[n,j]=d.useState([]),[N,y]=d.useState([]),[f,x]=d.useState(!0),[m,c]=d.useState(!1),[v,p]=d.useState(null),[l,i]=d.useState(null),[s,a]=d.useState({id:"",name:"",description:"",type:"stdio",command:"",args:"",url:""}),o=async()=>{x(!0);try{const[t,r]=await Promise.all([z(),$()]);j(t),y(r)}catch{}x(!1)};d.useEffect(()=>{o()},[]);const C=async()=>{try{await b({id:s.id,name:s.name,description:s.description,type:s.type,...s.type==="stdio"?{command:s.command,args:s.args.split(/\s+/).filter(Boolean)}:{url:s.url}}),c(!1),a({id:"",name:"",description:"",type:"stdio",command:"",args:"",url:""}),o()}catch(t){alert(t.message)}},P=async t=>{try{await b({presetId:t}),o()}catch(r){alert(r.message)}},w=async t=>{confirm(`Remove MCP server "${t}"?`)&&(await E(t),o())},M=async(t,r)=>{await I(t,r),o()},T=async t=>{p(t),i(null);try{const r=await R(t);i({id:t,...r})}catch(r){i({id:t,ok:!1,tools:0,error:r.message})}p(null)},S=t=>t==="connected"?"text-[var(--success)]":t==="error"?"text-[var(--error)]":"text-[var(--text-muted)]",A=t=>t==="connected"?"bg-[var(--success)]":t==="error"?"bg-[var(--error)]":"bg-[var(--text-muted)]",u=N.filter(t=>!n.some(r=>r.id===t.id));return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(h,{className:"w-6 h-6 text-[var(--accent)]"}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl font-bold text-[var(--text)]",children:"MCP Connections"}),e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Connect to external tools via Model Context Protocol"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:o,className:"px-3 py-1.5 text-sm rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors",children:e.jsx(D,{size:14})}),e.jsxs("button",{onClick:()=>c(!m),className:"flex items-center gap-2 px-3 py-1.5 text-sm rounded-md bg-[var(--accent)] text-white hover:bg-[var(--accent-hover)] transition-colors",children:[e.jsx(L,{size:14})," Add Server"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Configured Servers"}),e.jsx("p",{className:"text-2xl font-bold text-[var(--text)]",children:n.length})]}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Connected"}),e.jsx("p",{className:"text-2xl font-bold text-[var(--success)]",children:n.filter(t=>t.status==="connected").length})]}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"External Tools"}),e.jsx("p",{className:"text-2xl font-bold text-[var(--accent)]",children:n.reduce((t,r)=>t+r.toolCount,0)})]})]}),m&&e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4 space-y-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)]",children:"Add MCP Server"}),u.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)] mb-2",children:"Quick Add Presets"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:u.map(t=>e.jsxs("button",{onClick:()=>P(t.id),className:"flex items-center gap-2 px-3 py-1.5 text-xs rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors",children:[e.jsx(g,{size:12})," ",t.name]},t.id))})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"ID"}),e.jsx("input",{id:"mcp-server-id",name:"mcp-server-id",value:s.id,onChange:t=>a({...s,id:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"my-server"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Name"}),e.jsx("input",{id:"mcp-server-name",name:"mcp-server-name",value:s.name,onChange:t=>a({...s,name:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"My MCP Server"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Description"}),e.jsx("input",{id:"mcp-server-description",name:"mcp-server-description",value:s.description,onChange:t=>a({...s,description:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"What does this server do?"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Type"}),e.jsxs("select",{id:"mcp-server-type",name:"mcp-server-type",value:s.type,onChange:t=>a({...s,type:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",children:[e.jsx("option",{value:"stdio",children:"stdio (local process)"}),e.jsx("option",{value:"http",children:"HTTP (remote server)"})]})]}),s.type==="stdio"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Command"}),e.jsx("input",{id:"mcp-server-command",name:"mcp-server-command",value:s.command,onChange:t=>a({...s,command:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"npx @modelcontextprotocol/server-xxx"})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Arguments (space-separated)"}),e.jsx("input",{id:"mcp-server-args",name:"mcp-server-args",value:s.args,onChange:t=>a({...s,args:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"--port 3000"})]})]}):e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:"Server URL"}),e.jsx("input",{id:"mcp-server-url",name:"mcp-server-url",value:s.url,onChange:t=>a({...s,url:t.target.value}),className:"w-full mt-1 px-3 py-1.5 text-sm bg-[var(--bg)] border border-[var(--border)] rounded-md text-[var(--text)]",placeholder:"http://localhost:3000/mcp"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:C,disabled:!s.id||!s.name,className:"px-4 py-1.5 text-sm rounded-md bg-[var(--accent)] text-white hover:bg-[var(--accent-hover)] disabled:opacity-40 transition-colors",children:"Add Server"}),e.jsx("button",{onClick:()=>c(!1),className:"px-4 py-1.5 text-sm rounded-md border border-[var(--border)] text-[var(--text-secondary)] hover:bg-[var(--bg-tertiary)] transition-colors",children:"Cancel"})]})]}),f?e.jsx("div",{className:"text-[var(--text-muted)] text-sm",children:"Loading MCP servers..."}):n.length===0?e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-8 text-center",children:[e.jsx(h,{className:"w-10 h-10 text-[var(--text-muted)] mx-auto mb-3"}),e.jsx("p",{className:"text-[var(--text-secondary)] mb-1",children:"No MCP servers configured"}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"Add an MCP server to connect TITAN to external tools like databases, APIs, and services."})]}):e.jsx("div",{className:"space-y-3",children:n.map(t=>e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-0.5",children:t.type==="stdio"?e.jsx(g,{size:18,className:"text-[var(--text-muted)]"}):e.jsx(k,{size:18,className:"text-[var(--text-muted)]"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-[var(--text)]",children:t.name}),e.jsxs("span",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${A(t.status)}`}),e.jsx("span",{className:S(t.status),children:t.status})]}),t.toolCount>0&&e.jsxs("span",{className:"text-xs px-1.5 py-0.5 rounded bg-[var(--accent)]/10 text-[var(--accent)]",children:[t.toolCount," tools"]})]}),e.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-0.5",children:t.description}),e.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-1 font-mono",children:t.type==="stdio"?`${t.command} ${(t.args||[]).join(" ")}`:t.url})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>T(t.id),disabled:v===t.id,title:"Test connection",className:"p-1.5 rounded-md text-[var(--text-muted)] hover:text-[var(--text)] hover:bg-[var(--bg-tertiary)] transition-colors disabled:opacity-40",children:e.jsx(G,{size:14,className:v===t.id?"animate-pulse":""})}),e.jsx("button",{onClick:()=>M(t.id,!t.enabled),title:t.enabled?"Disable":"Enable",className:`p-1.5 rounded-md transition-colors hover:bg-[var(--bg-tertiary)] ${t.enabled?"text-[var(--success)]":"text-[var(--text-muted)]"}`,children:e.jsx(B,{size:14})}),e.jsx("button",{onClick:()=>w(t.id),title:"Remove",className:"p-1.5 rounded-md text-[var(--text-muted)] hover:text-[var(--error)] hover:bg-[var(--bg-tertiary)] transition-colors",children:e.jsx(F,{size:14})})]})]}),(l==null?void 0:l.id)===t.id&&e.jsx("div",{className:`mt-3 px-3 py-2 rounded-md text-xs ${l.ok?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:l.ok?`Connected successfully — ${l.tools} tools discovered`:`Connection failed: ${l.error}`})]},t.id))}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)] mb-2",children:"About MCP"}),e.jsxs("p",{className:"text-xs text-[var(--text-muted)] leading-relaxed",children:["Model Context Protocol (MCP) is the universal standard for connecting AI agents to external tools. TITAN acts as both an MCP ",e.jsx("strong",{className:"text-[var(--text-secondary)]",children:"server"})," (exposing its tools to other agents) and an MCP ",e.jsx("strong",{className:"text-[var(--text-secondary)]",children:"client"})," (connecting to external MCP servers). Add any MCP-compatible server and its tools automatically become available in TITAN."]})]})]})}export{J as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ye,r as j,b as be,j as o,X as Se}from"./index-
|
|
1
|
+
import{c as ye,r as j,b as be,j as o,X as Se}from"./index-D7Clon2u.js";import{N as ve,R as Ce,a as ke}from"./TitanCanvas-BQU1yxqf.js";import{T as $e}from"./trash-2-Byj4OvKB.js";import"./VoiceOverlay-l6yoasVz.js";/**
|
|
2
2
|
* @license lucide-react v0.513.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as g,r as n,b as h,j as e}from"./index-
|
|
1
|
+
import{c as g,r as n,b as h,j as e}from"./index-D7Clon2u.js";import{P as u}from"./PageHeader-DPJuAgJk.js";import{A as v}from"./arrow-left-C_H9Z2Tm.js";import{C as w,a as k,d as S}from"./TitanCanvas-BQU1yxqf.js";import"./VoiceOverlay-l6yoasVz.js";/**
|
|
2
2
|
* @license lucide-react v0.513.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as l,r as n,j as e,ar as y,as as j,at as N,au as f,av as k}from"./index-
|
|
1
|
+
import{c as l,r as n,j as e,ar as y,as as j,at as N,au as f,av as k}from"./index-D7Clon2u.js";import{D as v}from"./DataTable-D2Px4o6f.js";import{R as w,n as P}from"./TitanCanvas-BQU1yxqf.js";import"./VoiceOverlay-l6yoasVz.js";/**
|
|
2
2
|
* @license lucide-react v0.513.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,b as y,j as e,C as K,e as U,Z as O,A as B,d as E,K as G,$ as T}from"./index-C6oarzis.js";import{R as D,c as L,E as V,a as $,i as M}from"./TitanCanvas-BhurNMK3.js";import{C as F}from"./circle-check-big-CMz0QouP.js";import{E as H}from"./eye-off-BPXFIzlW.js";import"./VoiceOverlay-BXPVdnJc.js";const _={enabled:!1,apiKey:"",cuopt:{enabled:!1,url:"http://localhost:5000"},asr:{enabled:!1,grpcUrl:"localhost:50051",healthUrl:"http://localhost:9000"},openshell:{enabled:!1,binaryPath:"openshell",policyPath:""}};function v({status:s}){const l={unknown:"bg-border-light",checking:"bg-[#eab308] animate-pulse",healthy:"bg-success",unhealthy:"bg-error"},d={unknown:"Not checked",checking:"Checking...",healthy:"Healthy",unhealthy:"Unreachable"};return e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-text-muted",children:[e.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${l[s]}`}),d[s]]})}function f({title:s,description:l,icon:d,enabled:r,onToggle:h,children:p}){return e.jsxs("div",{className:`rounded-xl border bg-bg-secondary transition-colors ${r?"border-[#76b900]/30":"border-bg-tertiary"}`,children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`flex h-9 w-9 items-center justify-center rounded-lg ${r?"bg-nvidia/15":"bg-bg-tertiary"}`,children:e.jsx(d,{className:`h-4.5 w-4.5 ${r?"text-nvidia":"text-text-muted"}`})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-text",children:s}),e.jsx("p",{className:"text-xs text-text-muted mt-0.5",children:l})]})]}),e.jsx("button",{onClick:h,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${r?"bg-nvidia":"bg-border"}`,children:e.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white transition-transform ${r?"translate-x-6":"translate-x-1"}`})})]}),r&&e.jsx("div",{className:"border-t border-bg-tertiary px-5 py-4 space-y-3",children:p})]})}function u({id:s,label:l,value:d,onChange:r,placeholder:h,type:p="text",secret:x=!1}){const[m,b]=o.useState(!1);return e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-text-muted",children:l}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:s,name:s,type:x&&!m?"password":p,value:d,onChange:n=>r(n.target.value),placeholder:h,className:"w-full rounded-lg border border-border bg-bg px-3 py-2 pr-10 text-sm text-text outline-none focus:border-[#76b900] transition-colors"}),x&&e.jsx("button",{type:"button",onClick:()=>b(!m),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-secondary",children:m?e.jsx(H,{className:"h-4 w-4"}):e.jsx(M,{className:"h-4 w-4"})})]})]})}function X(){const[s,l]=o.useState(_),[d,r]=o.useState(!0),[h,p]=o.useState(!1),[x,m]=o.useState(null),[b,n]=o.useState({cuopt:"unknown",asr:"unknown",nim:"unknown"}),[g,j]=o.useState(!1),N=o.useCallback((t,a)=>{m({type:t,message:a}),setTimeout(()=>m(null),3e3)},[]);o.useEffect(()=>{(async()=>{var a,c,w,k,S,A,I,C;try{const i=await G();i.nvidia&&(l({enabled:i.nvidia.enabled??!1,apiKey:"",cuopt:{enabled:((a=i.nvidia.cuopt)==null?void 0:a.enabled)??!1,url:((c=i.nvidia.cuopt)==null?void 0:c.url)??"http://localhost:5000"},asr:{enabled:((w=i.nvidia.asr)==null?void 0:w.enabled)??!1,grpcUrl:((k=i.nvidia.asr)==null?void 0:k.grpcUrl)??"localhost:50051",healthUrl:((S=i.nvidia.asr)==null?void 0:S.healthUrl)??"http://localhost:9000"},openshell:{enabled:((A=i.nvidia.openshell)==null?void 0:A.enabled)??!1,binaryPath:((I=i.nvidia.openshell)==null?void 0:I.binaryPath)??"openshell",policyPath:((C=i.nvidia.openshell)==null?void 0:C.policyPath)??""}}),j(i.nvidia.apiKeySet??!1))}catch{}finally{r(!1)}})()},[]);const P=o.useCallback(async()=>{if(s.cuopt.enabled){n(t=>({...t,cuopt:"checking"}));try{const a=await(await y("/api/nvidia/health/cuopt")).json();n(c=>({...c,cuopt:a.healthy?"healthy":"unhealthy"}))}catch{n(t=>({...t,cuopt:"unhealthy"}))}}if(s.asr.enabled){n(t=>({...t,asr:"checking"}));try{const a=await(await y("/api/nvidia/health/asr")).json();n(c=>({...c,asr:a.healthy?"healthy":"unhealthy"}))}catch{n(t=>({...t,asr:"unhealthy"}))}}if(g||s.apiKey){n(t=>({...t,nim:"checking"}));try{const a=await(await y("/api/nvidia/health/nim")).json();n(c=>({...c,nim:a.healthy?"healthy":"unhealthy"}))}catch{n(t=>({...t,nim:"unhealthy"}))}}},[s.cuopt.enabled,s.asr.enabled,g,s.apiKey]),R=async()=>{p(!0);try{const t={nvidia:{enabled:s.enabled,cuopt:s.cuopt,asr:s.asr,openshell:s.openshell}};s.apiKey&&(t.nvidia.apiKey=s.apiKey),await T(t),N("success","NVIDIA configuration saved"),s.apiKey&&(j(!0),l(a=>({...a,apiKey:""})))}catch(t){N("error",t instanceof Error?t.message:"Failed to save")}finally{p(!1)}};return d?e.jsx("div",{className:"space-y-4",children:Array.from({length:4}).map((t,a)=>e.jsx("div",{className:"h-20 animate-pulse rounded-xl border border-border bg-bg-secondary"},a))}):e.jsxs("div",{className:"space-y-6 max-w-3xl",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-nvidia/15",children:e.jsx(K,{className:"h-5 w-5 text-nvidia"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg font-semibold text-text",children:"NVIDIA"}),e.jsx("p",{className:"text-xs text-text-muted",children:"GPU-accelerated AI services — NIM, cuOpt, Nemotron-ASR, OpenShell"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:P,className:"flex items-center gap-1.5 rounded-lg border border-border px-3 py-1.5 text-xs text-text-secondary hover:bg-bg-tertiary transition-colors",children:[e.jsx(D,{className:"h-3.5 w-3.5"}),"Check Health"]}),e.jsxs("button",{onClick:R,disabled:h,className:"flex items-center gap-2 rounded-lg bg-nvidia px-4 py-1.5 text-xs font-medium text-black transition-colors hover:bg-nvidia/80 disabled:opacity-50",children:[e.jsx(L,{className:"h-3.5 w-3.5"}),h?"Saving...":"Save"]})]})]}),x&&e.jsxs("div",{className:`flex items-center gap-2 rounded-lg border px-4 py-2 text-sm ${x.type==="success"?"border-success/50 text-success":"border-error/50 text-error"}`,children:[x.type==="success"?e.jsx(F,{className:"h-4 w-4"}):e.jsx(U,{className:"h-4 w-4"}),x.message]}),e.jsx("div",{className:`rounded-xl border p-5 transition-colors ${s.enabled?"border-[#76b900]/30 bg-nvidia/5":"border-bg-tertiary bg-bg-secondary"}`,children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-medium text-text",children:"Enable NVIDIA Skills"}),e.jsxs("p",{className:"text-xs text-text-muted mt-0.5",children:["Load NVIDIA GPU-accelerated skills (cuOpt, AI-Q Research, etc.) when TITAN starts. Equivalent to setting ",e.jsx("code",{className:"text-nvidia/70 bg-nvidia/10 px-1 rounded",children:"TITAN_NVIDIA=1"})]})]}),e.jsx("button",{onClick:()=>l(t=>({...t,enabled:!t.enabled})),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${s.enabled?"bg-nvidia":"bg-border"}`,children:e.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white transition-transform ${s.enabled?"translate-x-6":"translate-x-1"}`})})]})}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-5 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(O,{className:"h-4 w-4 text-nvidia"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-text",children:"NVIDIA NIM API"}),e.jsx("p",{className:"text-xs text-text-muted mt-0.5",children:"Cloud inference for Nemotron 3 Super and other NIM models"})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(v,{status:b.nim}),g&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-success/10 px-2.5 py-0.5 text-xs font-medium text-success",children:[e.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-success"}),"Key configured"]})]})]}),e.jsx(u,{id:"nvidia-api-key",label:"API Key",value:s.apiKey,onChange:t=>l(a=>({...a,apiKey:t})),placeholder:g?"(configured — enter new key to replace)":"nvapi-...",secret:!0}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["Get your key at"," ",e.jsxs("a",{href:"https://build.nvidia.com",target:"_blank",rel:"noopener noreferrer",className:"text-nvidia hover:underline inline-flex items-center gap-0.5",children:["build.nvidia.com ",e.jsx(V,{className:"h-2.5 w-2.5"})]})]})]}),e.jsxs(f,{title:"cuOpt Optimization",description:"GPU-accelerated routing, scheduling, and mathematical programming (MILP/LP/QP)",icon:B,enabled:s.cuopt.enabled,onToggle:()=>l(t=>({...t,cuopt:{...t.cuopt,enabled:!t.cuopt.enabled}})),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Service Status"}),e.jsx(v,{status:b.cuopt})]}),e.jsx(u,{id:"nvidia-cuopt-url",label:"cuOpt Server URL",value:s.cuopt.url,onChange:t=>l(a=>({...a,cuopt:{...a.cuopt,url:t}})),placeholder:"http://localhost:5000"}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["Start cuOpt: ",e.jsx("code",{className:"bg-bg-tertiary px-1.5 py-0.5 rounded text-text-secondary",children:"docker compose -f docker-compose.nvidia.yml --profile cuopt up -d"})]})]}),e.jsxs(f,{title:"Nemotron-ASR Streaming",description:"NVIDIA speech recognition with 24ms median finalization — replaces faster-whisper for voice chat",icon:$,enabled:s.asr.enabled,onToggle:()=>l(t=>({...t,asr:{...t.asr,enabled:!t.asr.enabled}})),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Service Status"}),e.jsx(v,{status:b.asr})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{id:"nvidia-asr-grpc-url",label:"gRPC Address",value:s.asr.grpcUrl,onChange:t=>l(a=>({...a,asr:{...a.asr,grpcUrl:t}})),placeholder:"localhost:50051"}),e.jsx(u,{id:"nvidia-asr-health-url",label:"Health Check URL",value:s.asr.healthUrl,onChange:t=>l(a=>({...a,asr:{...a.asr,healthUrl:t}})),placeholder:"http://localhost:9000"})]}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["Start ASR: ",e.jsx("code",{className:"bg-bg-tertiary px-1.5 py-0.5 rounded text-text-secondary",children:"docker compose -f docker-compose.nvidia.yml --profile asr up -d"})]}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["VRAM: ~3-4 GB. Set ",e.jsx("code",{className:"bg-bg-tertiary px-1 rounded text-text-secondary",children:"STT_ENGINE=nemotron-asr"})," in voice agent env."]})]}),e.jsxs(f,{title:"OpenShell Sandbox",description:"NVIDIA secure sandbox runtime for code execution with declarative policy enforcement",icon:E,enabled:s.openshell.enabled,onToggle:()=>l(t=>({...t,openshell:{...t.openshell,enabled:!t.openshell.enabled}})),children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{id:"nvidia-openshell-binary-path",label:"Binary Path",value:s.openshell.binaryPath,onChange:t=>l(a=>({...a,openshell:{...a.openshell,binaryPath:t}})),placeholder:"openshell"}),e.jsx(u,{id:"nvidia-openshell-policy-path",label:"Policy File Path (optional)",value:s.openshell.policyPath,onChange:t=>l(a=>({...a,openshell:{...a.openshell,policyPath:t}})),placeholder:"Auto-detected"})]}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["When enabled, code execution uses OpenShell instead of Docker. Set ",e.jsx("code",{className:"bg-bg-tertiary px-1 rounded text-text-secondary",children:'sandbox.engine: "openshell"'})," in config."]})]}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-5",children:[e.jsx("h3",{className:"text-sm font-medium text-text mb-3",children:"VRAM Budget (RTX 5090, 32 GB)"}),e.jsxs("div",{className:"space-y-2",children:[[{label:"Nemotron 3 Nano 30B",vram:"~24 GB",note:"Full local inference"},{label:"Nemotron 3 Nano 4B",vram:"~3 GB",note:"Lightweight variant"},{label:"Nemotron-ASR",vram:"~3-4 GB",note:"Speech recognition"},{label:"cuOpt",vram:"~2-4 GB",note:"Optimization solver"}].map(({label:t,vram:a,note:c})=>e.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-text",children:t}),e.jsx("span",{className:"text-[10px] text-text-muted ml-2",children:c})]}),e.jsx("span",{className:"text-xs font-mono text-nvidia",children:a})]},t)),e.jsx("div",{className:"border-t border-bg-tertiary pt-2 mt-2",children:e.jsx("p",{className:"text-[10px] text-text-muted",children:"Recommended: Nano 4B + ASR + cuOpt = ~10 GB, leaving room for other models. Or use NIM cloud API for LLM inference (0 GB local)."})})]})]}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-5",children:[e.jsx("h3",{className:"text-sm font-medium text-text mb-2",children:"Quick Start"}),e.jsxs("div",{className:"space-y-2 text-xs text-text-muted",children:[e.jsx("p",{children:"Start all NVIDIA services:"}),e.jsx("code",{className:"block bg-bg border border-bg-tertiary rounded-lg px-3 py-2 text-text-secondary font-mono text-xs",children:"docker compose -f docker-compose.nvidia.yml --profile all up -d"}),e.jsx("p",{className:"mt-2",children:"Or start individual services:"}),e.jsxs("div",{className:"space-y-1 font-mono text-[10px] text-text-muted",children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-nvidia",children:"cuopt:"})," --profile cuopt"]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-nvidia",children:"asr:"})," --profile asr (includes Riva bridge)"]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-nvidia",children:"voice:"})," --profile voice (ASR + bridge)"]})]})]})]})]})}export{X as default};
|
|
1
|
+
import{r as o,b as y,j as e,C as K,e as U,Z as O,A as B,d as E,K as G,$ as T}from"./index-D7Clon2u.js";import{R as D,c as L,E as V,a as $,i as M}from"./TitanCanvas-BQU1yxqf.js";import{C as F}from"./circle-check-big-B1hMwau0.js";import{E as H}from"./eye-off-Cx0M_VQb.js";import"./VoiceOverlay-l6yoasVz.js";const _={enabled:!1,apiKey:"",cuopt:{enabled:!1,url:"http://localhost:5000"},asr:{enabled:!1,grpcUrl:"localhost:50051",healthUrl:"http://localhost:9000"},openshell:{enabled:!1,binaryPath:"openshell",policyPath:""}};function v({status:s}){const l={unknown:"bg-border-light",checking:"bg-[#eab308] animate-pulse",healthy:"bg-success",unhealthy:"bg-error"},d={unknown:"Not checked",checking:"Checking...",healthy:"Healthy",unhealthy:"Unreachable"};return e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-text-muted",children:[e.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${l[s]}`}),d[s]]})}function f({title:s,description:l,icon:d,enabled:r,onToggle:h,children:p}){return e.jsxs("div",{className:`rounded-xl border bg-bg-secondary transition-colors ${r?"border-[#76b900]/30":"border-bg-tertiary"}`,children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`flex h-9 w-9 items-center justify-center rounded-lg ${r?"bg-nvidia/15":"bg-bg-tertiary"}`,children:e.jsx(d,{className:`h-4.5 w-4.5 ${r?"text-nvidia":"text-text-muted"}`})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-text",children:s}),e.jsx("p",{className:"text-xs text-text-muted mt-0.5",children:l})]})]}),e.jsx("button",{onClick:h,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${r?"bg-nvidia":"bg-border"}`,children:e.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white transition-transform ${r?"translate-x-6":"translate-x-1"}`})})]}),r&&e.jsx("div",{className:"border-t border-bg-tertiary px-5 py-4 space-y-3",children:p})]})}function u({id:s,label:l,value:d,onChange:r,placeholder:h,type:p="text",secret:x=!1}){const[m,b]=o.useState(!1);return e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-text-muted",children:l}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{id:s,name:s,type:x&&!m?"password":p,value:d,onChange:n=>r(n.target.value),placeholder:h,className:"w-full rounded-lg border border-border bg-bg px-3 py-2 pr-10 text-sm text-text outline-none focus:border-[#76b900] transition-colors"}),x&&e.jsx("button",{type:"button",onClick:()=>b(!m),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-secondary",children:m?e.jsx(H,{className:"h-4 w-4"}):e.jsx(M,{className:"h-4 w-4"})})]})]})}function X(){const[s,l]=o.useState(_),[d,r]=o.useState(!0),[h,p]=o.useState(!1),[x,m]=o.useState(null),[b,n]=o.useState({cuopt:"unknown",asr:"unknown",nim:"unknown"}),[g,j]=o.useState(!1),N=o.useCallback((t,a)=>{m({type:t,message:a}),setTimeout(()=>m(null),3e3)},[]);o.useEffect(()=>{(async()=>{var a,c,w,k,S,A,I,C;try{const i=await G();i.nvidia&&(l({enabled:i.nvidia.enabled??!1,apiKey:"",cuopt:{enabled:((a=i.nvidia.cuopt)==null?void 0:a.enabled)??!1,url:((c=i.nvidia.cuopt)==null?void 0:c.url)??"http://localhost:5000"},asr:{enabled:((w=i.nvidia.asr)==null?void 0:w.enabled)??!1,grpcUrl:((k=i.nvidia.asr)==null?void 0:k.grpcUrl)??"localhost:50051",healthUrl:((S=i.nvidia.asr)==null?void 0:S.healthUrl)??"http://localhost:9000"},openshell:{enabled:((A=i.nvidia.openshell)==null?void 0:A.enabled)??!1,binaryPath:((I=i.nvidia.openshell)==null?void 0:I.binaryPath)??"openshell",policyPath:((C=i.nvidia.openshell)==null?void 0:C.policyPath)??""}}),j(i.nvidia.apiKeySet??!1))}catch{}finally{r(!1)}})()},[]);const P=o.useCallback(async()=>{if(s.cuopt.enabled){n(t=>({...t,cuopt:"checking"}));try{const a=await(await y("/api/nvidia/health/cuopt")).json();n(c=>({...c,cuopt:a.healthy?"healthy":"unhealthy"}))}catch{n(t=>({...t,cuopt:"unhealthy"}))}}if(s.asr.enabled){n(t=>({...t,asr:"checking"}));try{const a=await(await y("/api/nvidia/health/asr")).json();n(c=>({...c,asr:a.healthy?"healthy":"unhealthy"}))}catch{n(t=>({...t,asr:"unhealthy"}))}}if(g||s.apiKey){n(t=>({...t,nim:"checking"}));try{const a=await(await y("/api/nvidia/health/nim")).json();n(c=>({...c,nim:a.healthy?"healthy":"unhealthy"}))}catch{n(t=>({...t,nim:"unhealthy"}))}}},[s.cuopt.enabled,s.asr.enabled,g,s.apiKey]),R=async()=>{p(!0);try{const t={nvidia:{enabled:s.enabled,cuopt:s.cuopt,asr:s.asr,openshell:s.openshell}};s.apiKey&&(t.nvidia.apiKey=s.apiKey),await T(t),N("success","NVIDIA configuration saved"),s.apiKey&&(j(!0),l(a=>({...a,apiKey:""})))}catch(t){N("error",t instanceof Error?t.message:"Failed to save")}finally{p(!1)}};return d?e.jsx("div",{className:"space-y-4",children:Array.from({length:4}).map((t,a)=>e.jsx("div",{className:"h-20 animate-pulse rounded-xl border border-border bg-bg-secondary"},a))}):e.jsxs("div",{className:"space-y-6 max-w-3xl",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-nvidia/15",children:e.jsx(K,{className:"h-5 w-5 text-nvidia"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg font-semibold text-text",children:"NVIDIA"}),e.jsx("p",{className:"text-xs text-text-muted",children:"GPU-accelerated AI services — NIM, cuOpt, Nemotron-ASR, OpenShell"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:P,className:"flex items-center gap-1.5 rounded-lg border border-border px-3 py-1.5 text-xs text-text-secondary hover:bg-bg-tertiary transition-colors",children:[e.jsx(D,{className:"h-3.5 w-3.5"}),"Check Health"]}),e.jsxs("button",{onClick:R,disabled:h,className:"flex items-center gap-2 rounded-lg bg-nvidia px-4 py-1.5 text-xs font-medium text-black transition-colors hover:bg-nvidia/80 disabled:opacity-50",children:[e.jsx(L,{className:"h-3.5 w-3.5"}),h?"Saving...":"Save"]})]})]}),x&&e.jsxs("div",{className:`flex items-center gap-2 rounded-lg border px-4 py-2 text-sm ${x.type==="success"?"border-success/50 text-success":"border-error/50 text-error"}`,children:[x.type==="success"?e.jsx(F,{className:"h-4 w-4"}):e.jsx(U,{className:"h-4 w-4"}),x.message]}),e.jsx("div",{className:`rounded-xl border p-5 transition-colors ${s.enabled?"border-[#76b900]/30 bg-nvidia/5":"border-bg-tertiary bg-bg-secondary"}`,children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-medium text-text",children:"Enable NVIDIA Skills"}),e.jsxs("p",{className:"text-xs text-text-muted mt-0.5",children:["Load NVIDIA GPU-accelerated skills (cuOpt, AI-Q Research, etc.) when TITAN starts. Equivalent to setting ",e.jsx("code",{className:"text-nvidia/70 bg-nvidia/10 px-1 rounded",children:"TITAN_NVIDIA=1"})]})]}),e.jsx("button",{onClick:()=>l(t=>({...t,enabled:!t.enabled})),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${s.enabled?"bg-nvidia":"bg-border"}`,children:e.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white transition-transform ${s.enabled?"translate-x-6":"translate-x-1"}`})})]})}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-5 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(O,{className:"h-4 w-4 text-nvidia"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium text-text",children:"NVIDIA NIM API"}),e.jsx("p",{className:"text-xs text-text-muted mt-0.5",children:"Cloud inference for Nemotron 3 Super and other NIM models"})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(v,{status:b.nim}),g&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-success/10 px-2.5 py-0.5 text-xs font-medium text-success",children:[e.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-success"}),"Key configured"]})]})]}),e.jsx(u,{id:"nvidia-api-key",label:"API Key",value:s.apiKey,onChange:t=>l(a=>({...a,apiKey:t})),placeholder:g?"(configured — enter new key to replace)":"nvapi-...",secret:!0}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["Get your key at"," ",e.jsxs("a",{href:"https://build.nvidia.com",target:"_blank",rel:"noopener noreferrer",className:"text-nvidia hover:underline inline-flex items-center gap-0.5",children:["build.nvidia.com ",e.jsx(V,{className:"h-2.5 w-2.5"})]})]})]}),e.jsxs(f,{title:"cuOpt Optimization",description:"GPU-accelerated routing, scheduling, and mathematical programming (MILP/LP/QP)",icon:B,enabled:s.cuopt.enabled,onToggle:()=>l(t=>({...t,cuopt:{...t.cuopt,enabled:!t.cuopt.enabled}})),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Service Status"}),e.jsx(v,{status:b.cuopt})]}),e.jsx(u,{id:"nvidia-cuopt-url",label:"cuOpt Server URL",value:s.cuopt.url,onChange:t=>l(a=>({...a,cuopt:{...a.cuopt,url:t}})),placeholder:"http://localhost:5000"}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["Start cuOpt: ",e.jsx("code",{className:"bg-bg-tertiary px-1.5 py-0.5 rounded text-text-secondary",children:"docker compose -f docker-compose.nvidia.yml --profile cuopt up -d"})]})]}),e.jsxs(f,{title:"Nemotron-ASR Streaming",description:"NVIDIA speech recognition with 24ms median finalization — replaces faster-whisper for voice chat",icon:$,enabled:s.asr.enabled,onToggle:()=>l(t=>({...t,asr:{...t.asr,enabled:!t.asr.enabled}})),children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Service Status"}),e.jsx(v,{status:b.asr})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{id:"nvidia-asr-grpc-url",label:"gRPC Address",value:s.asr.grpcUrl,onChange:t=>l(a=>({...a,asr:{...a.asr,grpcUrl:t}})),placeholder:"localhost:50051"}),e.jsx(u,{id:"nvidia-asr-health-url",label:"Health Check URL",value:s.asr.healthUrl,onChange:t=>l(a=>({...a,asr:{...a.asr,healthUrl:t}})),placeholder:"http://localhost:9000"})]}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["Start ASR: ",e.jsx("code",{className:"bg-bg-tertiary px-1.5 py-0.5 rounded text-text-secondary",children:"docker compose -f docker-compose.nvidia.yml --profile asr up -d"})]}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["VRAM: ~3-4 GB. Set ",e.jsx("code",{className:"bg-bg-tertiary px-1 rounded text-text-secondary",children:"STT_ENGINE=nemotron-asr"})," in voice agent env."]})]}),e.jsxs(f,{title:"OpenShell Sandbox",description:"NVIDIA secure sandbox runtime for code execution with declarative policy enforcement",icon:E,enabled:s.openshell.enabled,onToggle:()=>l(t=>({...t,openshell:{...t.openshell,enabled:!t.openshell.enabled}})),children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{id:"nvidia-openshell-binary-path",label:"Binary Path",value:s.openshell.binaryPath,onChange:t=>l(a=>({...a,openshell:{...a.openshell,binaryPath:t}})),placeholder:"openshell"}),e.jsx(u,{id:"nvidia-openshell-policy-path",label:"Policy File Path (optional)",value:s.openshell.policyPath,onChange:t=>l(a=>({...a,openshell:{...a.openshell,policyPath:t}})),placeholder:"Auto-detected"})]}),e.jsxs("p",{className:"text-[10px] text-text-muted",children:["When enabled, code execution uses OpenShell instead of Docker. Set ",e.jsx("code",{className:"bg-bg-tertiary px-1 rounded text-text-secondary",children:'sandbox.engine: "openshell"'})," in config."]})]}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-5",children:[e.jsx("h3",{className:"text-sm font-medium text-text mb-3",children:"VRAM Budget (RTX 5090, 32 GB)"}),e.jsxs("div",{className:"space-y-2",children:[[{label:"Nemotron 3 Nano 30B",vram:"~24 GB",note:"Full local inference"},{label:"Nemotron 3 Nano 4B",vram:"~3 GB",note:"Lightweight variant"},{label:"Nemotron-ASR",vram:"~3-4 GB",note:"Speech recognition"},{label:"cuOpt",vram:"~2-4 GB",note:"Optimization solver"}].map(({label:t,vram:a,note:c})=>e.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-text",children:t}),e.jsx("span",{className:"text-[10px] text-text-muted ml-2",children:c})]}),e.jsx("span",{className:"text-xs font-mono text-nvidia",children:a})]},t)),e.jsx("div",{className:"border-t border-bg-tertiary pt-2 mt-2",children:e.jsx("p",{className:"text-[10px] text-text-muted",children:"Recommended: Nano 4B + ASR + cuOpt = ~10 GB, leaving room for other models. Or use NIM cloud API for LLM inference (0 GB local)."})})]})]}),e.jsxs("div",{className:"rounded-xl border border-bg-tertiary bg-bg-secondary p-5",children:[e.jsx("h3",{className:"text-sm font-medium text-text mb-2",children:"Quick Start"}),e.jsxs("div",{className:"space-y-2 text-xs text-text-muted",children:[e.jsx("p",{children:"Start all NVIDIA services:"}),e.jsx("code",{className:"block bg-bg border border-bg-tertiary rounded-lg px-3 py-2 text-text-secondary font-mono text-xs",children:"docker compose -f docker-compose.nvidia.yml --profile all up -d"}),e.jsx("p",{className:"mt-2",children:"Or start individual services:"}),e.jsxs("div",{className:"space-y-1 font-mono text-[10px] text-text-muted",children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-nvidia",children:"cuopt:"})," --profile cuopt"]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-nvidia",children:"asr:"})," --profile asr (includes Riva bridge)"]}),e.jsxs("p",{children:[e.jsx("span",{className:"text-nvidia",children:"voice:"})," --profile voice (ASR + bridge)"]})]})]})]})]})}export{X as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,aX as g,aY as b,j as e,T as d,d as f,aZ as h}from"./index-
|
|
1
|
+
import{r as t,aX as g,aY as b,j as e,T as d,d as f,aZ as h}from"./index-D7Clon2u.js";import{P as p}from"./PageHeader-DPJuAgJk.js";import{R as j}from"./TitanCanvas-BQU1yxqf.js";import{C as u}from"./circle-check-big-B1hMwau0.js";import"./VoiceOverlay-l6yoasVz.js";function A(){const[n,m]=t.useState([]),[i,o]=t.useState({}),[l,c]=t.useState(!0),r=t.useCallback(async()=>{c(!0);try{const[s,a]=await Promise.all([g(),b()]);m(s.alerts||[]),o(a)}catch{}c(!1)},[]);t.useEffect(()=>{r()},[r]);const x=async s=>{try{await h(s),await r()}catch{}};return e.jsxs("div",{className:"space-y-4",children:[e.jsx(p,{title:"Organism Monitor",breadcrumbs:[{label:"Admin",href:"/overview"},{label:"Safety"},{label:"Organism"}]}),e.jsx("div",{className:"flex gap-2",children:e.jsxs("button",{onClick:r,disabled:l,className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-[#27272a] text-[#a1a1aa] text-sm font-medium hover:bg-[#3f3f46] disabled:opacity-50",children:[e.jsx(j,{className:`w-4 h-4 ${l?"animate-spin":""}`})," Refresh"]})}),Object.keys(i).length>0&&e.jsx("div",{className:"grid grid-cols-4 gap-2",children:Object.entries(i).map(([s,a])=>e.jsxs("div",{className:"p-2 rounded-lg bg-[#0a0a0f] border border-[#27272a]",children:[e.jsx("div",{className:"text-xs text-[#52525b] capitalize",children:s}),e.jsx("div",{className:"text-sm font-semibold text-[#e4e4e7]",children:typeof a=="number"?a.toFixed(2):a})]},s))}),e.jsx("div",{className:"space-y-2",children:n.map(s=>e.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${s.severity==="critical"?"bg-red-950/20 border-red-900/50":s.severity==="warning"?"bg-amber-950/20 border-amber-900/50":"bg-[#0a0a0f] border-[#27272a]"}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[s.severity==="critical"?e.jsx(d,{className:"w-4 h-4 text-red-400"}):s.severity==="warning"?e.jsx(d,{className:"w-4 h-4 text-amber-400"}):e.jsx(f,{className:"w-4 h-4 text-[#6366f1]"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-[#e4e4e7]",children:s.message}),e.jsxs("div",{className:"text-xs text-[#52525b]",children:[s.source," • ",new Date(s.timestamp).toLocaleString()]})]})]}),!s.acknowledged&&e.jsxs("button",{onClick:()=>x(s.id),className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md bg-[#27272a] text-[#a1a1aa] text-xs hover:bg-[#3f3f46]",children:[e.jsx(u,{className:"w-3.5 h-3.5"})," Ack"]})]},s.id))})]})}export{A as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,j as e,Z as v,A as x,H as f,C as h,aB as g}from"./index-D7Clon2u.js";import{S as a}from"./StatCard-CEVFsz7t.js";import{P as c}from"./PageHeader-DPJuAgJk.js";import{S as j}from"./SkeletonLoader-D1d-Gyyg.js";import{C as p,M as b,h as y}from"./TitanCanvas-BQU1yxqf.js";import{L as S}from"./layers-B6jDzitD.js";import"./VoiceOverlay-l6yoasVz.js";function w(t){const s=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return s>0?`${s}d ${r}h ${i}m`:r>0?`${r}h ${i}m`:`${i}m`}function m(t){const s=t/1024/1024;return s>1024?`${(s/1024).toFixed(1)} GB`:`${s.toFixed(0)} MB`}function L(){const[t,s]=o.useState(null),[r,i]=o.useState(null),[d,u]=o.useState(!0),n=async()=>{try{const l=await g();s(l),i(null)}catch(l){i(l instanceof Error?l.message:"Failed to fetch stats")}finally{u(!1)}};return o.useEffect(()=>{n();const l=setInterval(n,1e4);return()=>clearInterval(l)},[]),d?e.jsxs("div",{className:"space-y-4 md:space-y-6",children:[e.jsx(c,{title:"System Overview",breadcrumbs:[{label:"Admin",href:"/overview"},{label:"Monitoring"},{label:"Overview"}]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:e.jsx(j,{variant:"metric",count:8})})]}):r?e.jsx("div",{className:"rounded-xl border border-error/50 bg-bg-secondary p-6 text-center text-error",children:r}):t?e.jsxs("div",{className:"space-y-4 md:space-y-6",children:[e.jsx(c,{title:"System Overview",subtitle:"Real-time system health and metrics",breadcrumbs:[{label:"Admin",href:"/overview"},{label:"Monitoring"},{label:"Overview"}]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[e.jsx(a,{title:"Uptime",value:w(t.uptime),icon:e.jsx(p,{className:"h-5 w-5"})}),e.jsx(a,{title:"Total Requests",value:t.totalRequests.toLocaleString(),icon:e.jsx(v,{className:"h-5 w-5"})}),e.jsx(a,{title:"Active Agents",value:t.activeAgents,icon:e.jsx(x,{className:"h-5 w-5"})}),e.jsx(a,{title:"Active Sessions",value:t.activeSessions,icon:e.jsx(b,{className:"h-5 w-5"})}),e.jsx(a,{title:"Memory Usage",value:m(t.memoryUsage.heapUsed),icon:e.jsx(f,{className:"h-5 w-5"}),subtitle:`${m(t.memoryUsage.heapTotal)} total`}),e.jsx(a,{title:"Model",value:t.model,icon:e.jsx(h,{className:"h-5 w-5"})}),e.jsx(a,{title:"Provider",value:t.provider,icon:e.jsx(y,{className:"h-5 w-5"})}),e.jsx(a,{title:"Version",value:t.version,icon:e.jsx(S,{className:"h-5 w-5"})})]})]}):null}export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,aA as i}from"./index-
|
|
1
|
+
import{j as e,aA as i}from"./index-D7Clon2u.js";import{C as r}from"./VoiceOverlay-l6yoasVz.js";function h({title:n,subtitle:a,breadcrumbs:t,actions:l}){return e.jsxs("div",{className:"mb-4 md:mb-6",children:[t&&t.length>0&&e.jsx("nav",{className:"mb-2 flex items-center gap-1 text-[10px] md:text-xs text-text-muted overflow-x-auto scrollbar-thin pb-1",children:t.map((s,x)=>e.jsxs("span",{className:"flex items-center gap-1 flex-shrink-0",children:[x>0&&e.jsx(r,{size:12,className:"opacity-50 flex-shrink-0"}),s.href?e.jsx(i,{to:s.href,className:"hover:text-text transition-colors whitespace-nowrap",children:s.label}):e.jsx("span",{className:x===t.length-1?"text-text-secondary whitespace-nowrap":"",children:s.label})]},x))}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg md:text-xl font-semibold text-text",children:n}),a&&e.jsx("p",{className:"mt-0.5 text-[11px] md:text-sm text-text-muted",children:a})]}),l&&e.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:l})]})]})}export{h as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,b0 as m,j as e,b1 as d,b2 as p}from"./index-
|
|
1
|
+
import{r as t,b0 as m,j as e,b1 as d,b2 as p}from"./index-D7Clon2u.js";import{P as x}from"./PageHeader-DPJuAgJk.js";import{R as u,p as f,q as h}from"./TitanCanvas-BQU1yxqf.js";import{P as b}from"./play-hUyR3CVS.js";import{S as g}from"./square-CdiC0J8Z.js";import"./VoiceOverlay-l6yoasVz.js";function S(){const[a,n]=t.useState(null),[r,l]=t.useState(!0),s=t.useCallback(async()=>{l(!0);try{const o=await m();n(o)}catch{}l(!1)},[]);t.useEffect(()=>{s()},[s]);const i=async()=>{try{await d(),await s()}catch{}},c=async()=>{try{await p(),await s()}catch{}};return e.jsxs("div",{className:"space-y-4",children:[e.jsx(x,{title:"Paperclip",breadcrumbs:[{label:"Admin",href:"/overview"},{label:"Tools"},{label:"Paperclip"}]}),e.jsx("div",{className:"flex gap-2",children:e.jsxs("button",{onClick:s,disabled:r,className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-[#27272a] text-[#a1a1aa] text-sm font-medium hover:bg-[#3f3f46] disabled:opacity-50",children:[e.jsx(u,{className:`w-4 h-4 ${r?"animate-spin":""}`})," Refresh"]})}),a&&e.jsxs("div",{className:"p-3 rounded-lg bg-[#0a0a0f] border border-[#27272a]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(f,{className:`w-4 h-4 ${a.running?"text-emerald-400":"text-[#52525b]"}`}),e.jsx("span",{className:"text-sm font-medium text-[#e4e4e7]",children:a.running?"Running":"Stopped"}),a.pid&&e.jsxs("span",{className:"text-xs text-[#52525b]",children:["PID ",a.pid]})]}),a.url&&e.jsx("div",{className:"text-xs text-[#52525b] mb-3",children:a.url}),e.jsxs("div",{className:"flex gap-2",children:[!a.running&&e.jsxs("button",{onClick:i,className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-[#6366f1] text-white text-sm font-medium hover:bg-[#4f46e5]",children:[e.jsx(b,{className:"w-4 h-4"})," Start"]}),a.running&&e.jsxs("button",{onClick:c,className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-red-600 text-white text-sm font-medium hover:bg-red-700",children:[e.jsx(g,{className:"w-4 h-4"})," Stop"]}),e.jsxs("button",{onClick:s,className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-[#27272a] text-[#a1a1aa] text-sm font-medium hover:bg-[#3f3f46]",children:[e.jsx(h,{className:"w-4 h-4"})," Reset"]})]})]})]})}export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as s,a2 as y,a3 as j}from"./index-
|
|
1
|
+
import{r as a,j as s,a2 as y,a3 as j}from"./index-D7Clon2u.js";function w(){const[r,g]=a.useState([]),[c,l]=a.useState("default"),[h,f]=a.useState(!0),[o,d]=a.useState(null),[n,x]=a.useState(null),[i,b]=a.useState("all");a.useEffect(()=>{(async()=>{try{const t=await y();g(t.personas),l(t.active)}catch(t){d(t instanceof Error?t.message:"Failed to fetch personas")}finally{f(!1)}})()},[]);const p=a.useMemo(()=>{const e=new Set(r.map(t=>t.division));return["all",...Array.from(e).sort()]},[r]),m=a.useMemo(()=>i==="all"?r:r.filter(e=>e.division===i),[r,i]),v=async e=>{if(!(e===c||n)){x(e);try{const t=await j(e);l(t.active)}catch(t){d(t instanceof Error?t.message:"Failed to switch persona")}finally{x(null)}}};return h?s.jsx("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-3",children:Array.from({length:6}).map((e,t)=>s.jsx("div",{className:"h-32 animate-pulse rounded-xl border border-border bg-bg-secondary"},t))}):o?s.jsx("div",{className:"rounded-xl border border-error/50 bg-bg-secondary p-6 text-center text-error",children:o}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-lg font-semibold text-text",children:"Personas"}),s.jsxs("span",{className:"text-sm text-text-muted",children:[r.length," available"]})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:p.map(e=>s.jsx("button",{onClick:()=>b(e),className:`rounded-lg px-3 py-1.5 text-sm font-medium capitalize transition-colors ${i===e?"bg-accent text-white":"bg-bg-tertiary text-text-secondary hover:text-text"}`,children:e},e))}),s.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[m.map(e=>{const t=e.id===c,u=e.id===n;return s.jsxs("button",{onClick:()=>v(e.id),disabled:t||!!n,className:`rounded-xl border p-4 text-left transition-all ${t?"border-accent bg-accent/10 ring-1 ring-accent/30":"border-border bg-bg-secondary hover:border-border-light hover:bg-bg-secondary"} ${u?"opacity-60":""} disabled:cursor-default`,children:[s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("h3",{className:"font-medium text-text",children:e.name}),t&&s.jsx("span",{className:"rounded-full bg-accent/20 px-2 py-0.5 text-xs font-medium text-accent-hover",children:"Active"}),u&&s.jsx("span",{className:"text-xs text-text-secondary",children:"Switching..."})]}),s.jsx("p",{className:"text-sm text-text-secondary line-clamp-2",children:e.description}),s.jsx("p",{className:"mt-2 text-xs capitalize text-text-muted",children:e.division})]},e.id)}),m.length===0&&s.jsx("p",{className:"col-span-full py-12 text-center text-text-muted",children:"No personas in this division"})]})]})}export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,aM as p,j as e,aN as h,aO as f}from"./index-
|
|
1
|
+
import{r as a,aM as p,j as e,aN as h,aO as f}from"./index-D7Clon2u.js";import{P as u}from"./PageHeader-DPJuAgJk.js";import{R as b,d as g}from"./TitanCanvas-BQU1yxqf.js";import{P as j}from"./play-hUyR3CVS.js";import{T as N}from"./trash-2-Byj4OvKB.js";import"./VoiceOverlay-l6yoasVz.js";function P(){const[d,o]=a.useState([]),[i,n]=a.useState(!0),[c,l]=a.useState(null),t=a.useCallback(async()=>{n(!0);try{const s=await p();o(s.recipes||[])}catch{}n(!1)},[]);a.useEffect(()=>{t()},[t]);const m=async s=>{l(s);try{await h(s)}catch{}l(null)},x=async s=>{if(confirm("Delete this recipe?"))try{await f(s),await t()}catch{}};return e.jsxs("div",{className:"space-y-4",children:[e.jsx(u,{title:"Recipe Kitchen",breadcrumbs:[{label:"Admin",href:"/overview"},{label:"Tools"},{label:"Recipes"}]}),e.jsx("div",{className:"flex gap-2",children:e.jsxs("button",{onClick:t,disabled:i,className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-[#27272a] text-[#a1a1aa] text-sm font-medium hover:bg-[#3f3f46] disabled:opacity-50",children:[e.jsx(b,{className:`w-4 h-4 ${i?"animate-spin":""}`})," Refresh"]})}),e.jsx("div",{className:"space-y-2",children:d.map(s=>{var r;return e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-[#0a0a0f] border border-[#27272a]",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(g,{className:"w-4 h-4 text-[#6366f1] shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm text-[#e4e4e7] truncate",children:s.name}),e.jsx("div",{className:"text-xs text-[#52525b] truncate",children:s.description}),e.jsxs("div",{className:"text-xs text-[#52525b]",children:[s.steps.length," steps • ",(r=s.tags)==null?void 0:r.join(", ")]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsxs("button",{onClick:()=>m(s.id),disabled:c===s.id,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-md bg-[#6366f1] text-white text-xs hover:bg-[#4f46e5] disabled:opacity-50",children:[e.jsx(j,{className:"w-3.5 h-3.5"})," ",c===s.id?"Running...":"Run"]}),e.jsx("button",{onClick:()=>x(s.id),className:"p-1.5 rounded-md bg-[#27272a] text-[#a1a1aa] hover:bg-[#3f3f46] hover:text-red-400",children:e.jsx(N,{className:"w-3.5 h-3.5"})})]})]},s.id)})})]})}export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,b as n,j as e}from"./index-
|
|
1
|
+
import{r as t,b as n,j as e}from"./index-D7Clon2u.js";import{P as i}from"./PageHeader-DPJuAgJk.js";import"./VoiceOverlay-l6yoasVz.js";function b(){const[a,d]=t.useState(null),[o,l]=t.useState(!0);if(t.useEffect(()=>{n("/api/config",{headers:{"Content-Type":"application/json"}}).then(s=>s.json()).then(s=>d(s.security||{})).catch(()=>d({})).finally(()=>l(!1))},[]),o)return e.jsx("div",{className:"text-[var(--text-muted)]",children:"Loading security config..."});const r=a||{};return e.jsxs("div",{className:"space-y-6",children:[e.jsx(i,{title:"Security",breadcrumbs:[{label:"Admin",href:"/overview"},{label:"Settings"},{label:"Security"}]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Sandbox Mode"}),e.jsx("p",{className:"text-lg font-semibold text-[var(--text)]",children:String(r.sandboxMode||"none")})]}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Shield"}),e.jsx("p",{className:"text-lg font-semibold text-[var(--text)]",children:r.shield?"Enabled":"Disabled"})]}),e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Denied Tools"}),e.jsx("p",{className:"text-lg font-semibold text-[var(--text)]",children:Array.isArray(r.deniedTools)?r.deniedTools.length:0})]})]}),Array.isArray(r.deniedTools)&&r.deniedTools.length>0&&e.jsxs("div",{className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-lg p-4",children:[e.jsx("h2",{className:"text-sm font-medium text-[var(--text-secondary)] mb-2",children:"Denied Tools"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:r.deniedTools.map(s=>e.jsx("span",{className:"px-2 py-1 text-xs rounded bg-red-500/10 text-red-400 border border-red-500/20",children:s},s))})]})]})}export{b as default};
|