@mcp-graph-workflow/mcp-graph 5.20.1 → 5.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/web/dashboard/dist/assets/benchmark-tab-D7nae4k4.js +1 -0
  2. package/dist/web/dashboard/dist/assets/circle-alert-vaRHjxbG.js +6 -0
  3. package/dist/web/dashboard/dist/assets/context-tab-DRUGmBRL.js +1 -0
  4. package/dist/web/dashboard/dist/assets/{gitnexus-tab-Caz7v7Mn.js → gitnexus-tab-h8BwIua3.js} +10 -10
  5. package/dist/web/dashboard/dist/assets/{graph-section-B2T_NMja.js → graph-section-C4ymXtzh.js} +1 -1
  6. package/dist/web/dashboard/dist/assets/graph-tab-C6nWMQkR.js +6 -0
  7. package/dist/web/dashboard/dist/assets/{graph-utils-CpifDP5W.js → graph-utils-DkRXfigF.js} +1 -1
  8. package/dist/web/dashboard/dist/assets/{index-C9AGF8Ai.js → index-BW0cq1-5.js} +1 -1
  9. package/dist/web/dashboard/dist/assets/index-CvAguK65.css +1 -0
  10. package/dist/web/dashboard/dist/assets/index-DSPPavjF.js +218 -0
  11. package/dist/web/dashboard/dist/assets/{index-BPPSD6wP.js → index-DmT4Jne7.js} +1 -1
  12. package/dist/web/dashboard/dist/assets/{insights-tab-8XuKAe-4.js → insights-tab-CL9LCuow.js} +15 -15
  13. package/dist/web/dashboard/dist/assets/journey-tab-CbJSfdpz.js +1 -0
  14. package/dist/web/dashboard/dist/assets/languages-tab-Vjkz6r99.js +70 -0
  15. package/dist/web/dashboard/dist/assets/loader-circle-CrUmRfZB.js +6 -0
  16. package/dist/web/dashboard/dist/assets/{logs-tab-Y5DvtoGU.js → logs-tab-CeH_wY9u.js} +2 -2
  17. package/dist/web/dashboard/dist/assets/lsp-tab-BLIpJrAk.js +49 -0
  18. package/dist/web/dashboard/dist/assets/memories-tab-BHOvEW0o.js +1 -0
  19. package/dist/web/dashboard/dist/assets/prd-backlog-tab-BBUG4V7M.js +1 -0
  20. package/dist/web/dashboard/dist/assets/refresh-cw-DRsAUgYq.js +6 -0
  21. package/dist/web/dashboard/dist/assets/{siebel-tab-Bkeox_-_.js → siebel-tab-DZXhcoUu.js} +3 -3
  22. package/dist/web/dashboard/dist/assets/skills-tab-_A8OYt_b.js +1 -0
  23. package/dist/web/dashboard/dist/assets/{style-Cca8j3c-.js → style-DpBYmOVU.js} +1 -1
  24. package/dist/web/dashboard/dist/assets/triangle-alert-N0TixBQV.js +16 -0
  25. package/dist/web/dashboard/dist/index.html +2 -2
  26. package/package.json +1 -1
  27. package/dist/web/dashboard/dist/assets/benchmark-tab-BxKC16Rh.js +0 -1
  28. package/dist/web/dashboard/dist/assets/context-tab-CyTA0xHn.js +0 -1
  29. package/dist/web/dashboard/dist/assets/graph-tab-H8UjUBJg.js +0 -1
  30. package/dist/web/dashboard/dist/assets/index-CW7bjrwy.js +0 -218
  31. package/dist/web/dashboard/dist/assets/index-DDQD2WTj.css +0 -1
  32. package/dist/web/dashboard/dist/assets/journey-tab-L-g_jwf1.js +0 -1
  33. package/dist/web/dashboard/dist/assets/languages-tab-171i5Bxw.js +0 -63
  34. package/dist/web/dashboard/dist/assets/lsp-tab-Dprc5zKc.js +0 -64
  35. package/dist/web/dashboard/dist/assets/memories-tab-DvgKhmWu.js +0 -1
  36. package/dist/web/dashboard/dist/assets/prd-backlog-tab-OHV_0-dF.js +0 -1
  37. package/dist/web/dashboard/dist/assets/skills-tab-DCHjQiA2.js +0 -1
  38. package/dist/web/dashboard/dist/assets/triangle-alert-uww45pBS.js +0 -11
@@ -0,0 +1 @@
1
+ import{r as u,a as h,j as e}from"./index-DSPPavjF.js";function g(){const[r,d]=u.useState(null),[x,o]=u.useState(!0),[l,m]=u.useState(null);return u.useEffect(()=>{async function n(){try{const i=await h.request("/benchmark");d(i)}catch(i){m(i instanceof Error?i.message:"Failed to load benchmark data")}finally{o(!1)}}n()},[]),{data:r,loading:x,error:l}}function p(){const{data:r,loading:d,error:x}=g();if(d)return e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6",children:[e.jsx("div",{className:"h-5 w-40 rounded bg-surface animate-pulse"}),e.jsx("div",{className:"grid grid-cols-4 gap-3",children:Array.from({length:4}).map((t,a)=>e.jsx("div",{className:"h-20 rounded-xl border border-edge bg-surface-alt animate-pulse"},a))}),e.jsx("div",{className:"space-y-2",children:Array.from({length:5}).map((t,a)=>e.jsx("div",{className:"h-6 rounded bg-surface animate-pulse",style:{width:`${60+Math.random()*30}%`}},a))})]});if(x)return e.jsx("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm font-medium text-foreground",children:"Failed to load benchmark"}),e.jsx("p",{className:"text-xs text-muted mt-1",children:x})]})});if(!r)return e.jsx("div",{});const{tokenEconomy:o,layeredCompression:l,dependencyIntelligence:m,toolTokenUsage:n,formulas:i}=r;return e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Token Economy"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(s,{value:`${o.avgCompressionPercent}%`,label:"Avg Compress"}),e.jsx(s,{value:o.sampleSize>0?Math.round(o.totalTokensSaved/o.sampleSize).toLocaleString():"0",label:"Tokens Saved/Task"}),e.jsx(s,{value:o.totalNodes,label:"Nodes"}),e.jsx(s,{value:o.totalEdges,label:"Edges"})]}),o.perTaskMetrics.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-muted mb-2",children:"Context Compression per Task (vs Full Graph)"}),e.jsx("div",{className:"space-y-1.5","data-testid":"compression-bars",children:o.perTaskMetrics.slice(0,15).map(t=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-32 truncate",title:t.title,children:t.title}),e.jsx("div",{className:"flex-1 h-3 bg-surface-elevated rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-accent",style:{width:`${Math.min(t.compressionPercent,100)}%`}})}),e.jsxs("span",{className:"text-muted w-24 text-right",children:[t.compressionPercent,"% (",t.estimatedTokens," tok)"]})]},t.id))})]})]}),l&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Real Token Savings (Per-Layer)"}),e.jsxs("div",{className:"grid grid-cols-5 gap-3 mb-4",children:[e.jsx(s,{value:`${l.avgLayer1SavingsPercent}%`,label:"L1: Field Strip"}),e.jsx(s,{value:`${l.avgLayer2SavingsPercent}%`,label:"L2: Desc Truncate"}),e.jsx(s,{value:`${l.avgLayer3SavingsPercent}%`,label:"L3: Default Omit"}),e.jsx(s,{value:`${l.avgLayer4SavingsPercent}%`,label:"L4: Short Keys"}),e.jsx(s,{value:`${l.avgTotalRealSavingsPercent}%`,label:"Total Real Savings"})]}),(()=>{const t=Math.max(l.avgNaiveNeighborhoodTokens,1),a=[{label:"Naive Neighborhood",tokens:l.avgNaiveNeighborhoodTokens,color:"#ef4444"},{label:"L1: Field Stripping",tokens:l.avgCompactContextTokens,color:"#f97316"},{label:"L2: Desc Truncation",tokens:l.avgNeighborTruncatedTokens,color:"#eab308"},{label:"L3: Default Omission",tokens:l.avgDefaultOmittedTokens,color:"#22c55e"},{label:"L4: Short Keys",tokens:l.avgShortKeysTokens,color:"#3b82f6"},{label:"Summary Tier",tokens:l.avgSummaryTierTokens,color:"#8b5cf6"}];return e.jsx("div",{className:"space-y-1.5","data-testid":"waterfall-bars",children:a.map(c=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-40 truncate",title:c.label,children:c.label}),e.jsx("div",{className:"flex-1 h-3 bg-surface-elevated rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${Math.min(c.tokens/t*100,100)}%`,backgroundColor:c.color}})}),e.jsxs("span",{className:"text-muted w-20 text-right",children:[c.tokens.toLocaleString()," tok"]})]},c.label))})})()]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Dependency Intelligence"}),e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsx(s,{value:m.inferredDeps,label:"Auto Inferred"}),e.jsx(s,{value:`${m.blockedTasks}/${o.totalNodes}`,label:"Blocked Detected"}),e.jsx(s,{value:m.cycles,label:"Cycles Detected"})]})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Formulas & Justification"}),e.jsx("div",{className:"px-3 py-2 rounded-xl border border-edge shadow-sm hover:shadow-md transition-shadow bg-surface-alt text-xs space-y-1","data-testid":"formulas-section",children:Object.entries(i).map(([t,a])=>e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("span",{className:"text-muted font-mono w-40 shrink-0",children:[t,":"]}),e.jsx("span",{children:a})]},t))})]}),n&&n.totalCalls>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Tool Token Usage"}),e.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-4",children:[e.jsx(s,{value:n.totalCalls.toLocaleString(),label:"Total Calls"}),e.jsx(s,{value:n.totalInputTokens.toLocaleString(),label:"Total Input Tokens"}),e.jsx(s,{value:n.totalOutputTokens.toLocaleString(),label:"Total Output Tokens"})]}),n.perTool.length>0&&(()=>{const t=Math.max(...n.perTool.map(a=>a.totalTokens),1);return e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-muted mb-2",children:"Token Usage per Tool"}),e.jsx("div",{className:"space-y-1.5","data-testid":"tool-token-bars",children:n.perTool.slice(0,15).map(a=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-32 truncate font-mono",title:a.toolName,children:a.toolName}),e.jsx("div",{className:"flex-1 h-3 bg-surface-elevated rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-accent",style:{width:`${Math.min(a.totalTokens/t*100,100)}%`}})}),e.jsxs("span",{className:"text-muted w-32 text-right",children:[a.callCount," calls, ",a.totalTokens.toLocaleString()," tok"]})]},a.toolName))})]})})()]}),e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Cost Savings per Task"}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(s,{value:`$${o.costSavings.opusPerTask.toFixed(3)}`,label:"Opus Input"}),e.jsx(s,{value:`$${o.costSavings.sonnetPerTask.toFixed(3)}`,label:"Sonnet Input"})]})]})]})}function s({value:r,label:d}){return e.jsxs("div",{className:"p-3 rounded-xl border border-edge shadow-sm hover:shadow-md transition-shadow bg-surface-alt text-center","data-testid":"metric-card",children:[e.jsx("div",{className:"text-xl font-bold",children:r}),e.jsx("div",{className:"text-[10px] text-muted uppercase",children:d})]})}export{p as BenchmarkTab};
@@ -0,0 +1,6 @@
1
+ import{c as e}from"./index-DSPPavjF.js";/**
2
+ * @license lucide-react v1.7.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const c=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],y=e("circle-alert",c);export{y as C};
@@ -0,0 +1 @@
1
+ import{r as o,a as h,j as e}from"./index-DSPPavjF.js";function m(){const[s,x]=o.useState(null),[i,n]=o.useState(!0),[c,r]=o.useState(null),d=o.useCallback(async()=>{n(!0),r(null);try{const l=await h.getContextBudget();x(l)}catch(l){r(l instanceof Error?l.message:"Failed to load context budget")}finally{n(!1)}},[]);return o.useEffect(()=>{d()},[d]),{budget:s,loading:i,error:c,refresh:d}}const u={green:{bg:"bg-green-500/10",text:"text-green-500",border:"border-green-500/30"},yellow:{bg:"bg-yellow-500/10",text:"text-yellow-500",border:"border-yellow-500/30"},red:{bg:"bg-red-500/10",text:"text-red-500",border:"border-red-500/30"}};function g(){const{budget:s,loading:x,error:i,refresh:n}=m();if(i)return e.jsxs("div",{className:"flex items-center justify-center h-full text-danger",children:["Failed to load context budget: ",i]});if(x||!s)return e.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-6",children:[e.jsx("div",{className:"h-5 w-48 rounded bg-surface animate-pulse"}),e.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:Array.from({length:4}).map((t,a)=>e.jsx("div",{className:"h-20 rounded-xl border border-edge bg-surface-alt animate-pulse"},a))}),e.jsx("div",{className:"h-24 rounded-lg border border-edge bg-surface-alt animate-pulse"}),e.jsx("div",{className:"h-12 rounded-xl border border-edge bg-surface-alt animate-pulse"})]});const c=u[s.health]??u.green,[r,d]=o.useState(null),l=t=>{r===t?(d(null),h.toggleSkill(t,!1).then(()=>n())):(d(t),setTimeout(()=>d(a=>a===t?null:a),3e3))};return e.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-6 overflow-y-auto h-full",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Context Management"}),e.jsx("button",{onClick:()=>n(),className:"text-xs px-3 py-1.5 rounded-lg bg-accent text-white hover:opacity-90 transition-opacity",children:"Refresh"})]}),e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[e.jsxs("div",{className:"p-3 rounded-xl border border-edge shadow-sm hover:shadow-md transition-shadow bg-surface-alt text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:s.activeTokens.toLocaleString()}),e.jsx("div",{className:"text-[10px] text-muted uppercase",children:"Active Tokens"})]}),e.jsxs("div",{className:"p-3 rounded-xl border border-edge shadow-sm hover:shadow-md transition-shadow bg-surface-alt text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:s.totalTokens.toLocaleString()}),e.jsx("div",{className:"text-[10px] text-muted uppercase",children:"Total Tokens"})]}),e.jsxs("div",{className:"p-3 rounded-xl border border-edge shadow-sm hover:shadow-md transition-shadow bg-surface-alt text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:s.activeCount}),e.jsx("div",{className:"text-[10px] text-muted uppercase",children:"Active Skills"})]}),e.jsxs("div",{className:"p-3 rounded-xl border border-edge shadow-sm hover:shadow-md transition-shadow bg-surface-alt text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:s.totalCount}),e.jsx("div",{className:"text-[10px] text-muted uppercase",children:"Total Skills"})]})]}),e.jsxs("div",{className:`p-4 rounded-lg border ${c.bg} ${c.border}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:`w-3 h-3 rounded-full ${s.health==="green"?"bg-green-500":s.health==="yellow"?"bg-yellow-500":"bg-red-500"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:`text-sm font-medium ${c.text}`,children:["Session Health: ",s.health.charAt(0).toUpperCase()+s.health.slice(1)]}),e.jsx("div",{className:"text-xs text-muted mt-0.5",children:s.healthMessage})]})]}),s.recommendations.length>0&&e.jsx("div",{className:"mt-3 space-y-1",children:s.recommendations.map((t,a)=>e.jsx("div",{className:"text-xs text-muted",children:t},a))})]}),e.jsxs("div",{className:"p-4 rounded-xl border border-edge shadow-sm hover:shadow-md transition-shadow bg-surface-alt",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h3",{className:"text-xs font-semibold text-muted uppercase",children:"Token Budget"}),e.jsxs("span",{className:"text-xs text-muted",children:[s.activeTokens.toLocaleString()," / 4,000 (",Math.round(s.activeTokens/40),"%)"]})]}),e.jsxs("div",{className:"w-full h-3 rounded-full bg-edge relative",children:[e.jsx("div",{className:"h-full rounded-full absolute top-0 left-0 opacity-20",style:{width:`${Math.min(Math.round(s.totalTokens/40),100)}%`,background:"#6b7280"}}),e.jsx("div",{className:"h-full rounded-full absolute top-0 left-0 transition-all",style:{width:`${Math.min(Math.round(s.activeTokens/40),100)}%`,background:s.health==="red"?"#ef4444":s.health==="yellow"?"#f59e0b":"#10b981"}})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-xs font-semibold text-muted uppercase",children:"Token Breakdown by Skill"}),e.jsx("div",{className:"space-y-1",children:s.breakdown.map(t=>{const a=s.totalTokens>0?Math.round(t.tokens/s.totalTokens*100):0;return e.jsxs("div",{className:`flex items-center gap-3 p-2 rounded-xl border border-edge shadow-sm hover:shadow-md transition-shadow bg-surface-alt ${t.enabled?"":"opacity-40"}`,children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs font-medium truncate",children:t.name}),e.jsx("span",{className:`px-1 py-0.5 rounded text-[9px] ${t.source==="custom"?"bg-purple-500/10 text-purple-500":"bg-blue-500/10 text-blue-500"}`,children:t.source})]}),e.jsx("div",{className:"w-full h-1 rounded-full bg-edge mt-1",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${a}%`,background:t.enabled?"#3b82f6":"#6b7280"}})})]}),e.jsxs("span",{className:"text-[10px] text-muted shrink-0 w-16 text-right",children:[t.tokens.toLocaleString()," tok"]}),t.enabled&&e.jsx("button",{onClick:()=>l(t.name),className:`text-[10px] px-1.5 py-0.5 rounded border shrink-0 cursor-pointer transition-all ${r===t.name?"bg-red-500/10 text-red-400 border-red-500/30 font-medium":"border-edge text-muted hover:text-red-500 hover:border-red-500/50"}`,children:r===t.name?"Sure?":"Disable"})]},t.name)})})]})]})}export{g as ContextTab};