mcp-lab-agent 2.2.0 → 2.3.1

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.
@@ -52,15 +52,15 @@ async function handler(req, res) {
52
52
  }
53
53
 
54
54
  const url = new URL(req.url || "/", `http://${req.headers.host}`);
55
- const path = url.pathname;
55
+ const pathname = url.pathname;
56
56
 
57
57
  try {
58
- if (path === "/health") {
58
+ if (pathname === "/health") {
59
59
  send(res, 200, { ok: true, service: "learning-hub", version: "1.0.0" });
60
60
  return;
61
61
  }
62
62
 
63
- if (path === "/learning" && req.method === "POST") {
63
+ if (pathname === "/learning" && req.method === "POST") {
64
64
  const body = await parseBody(req);
65
65
  const learnings = body.learnings ?? (body.type ? body : null);
66
66
  if (!learnings) {
@@ -73,7 +73,7 @@ async function handler(req, res) {
73
73
  return;
74
74
  }
75
75
 
76
- if (path === "/patterns" && req.method === "GET") {
76
+ if (pathname === "/patterns" && req.method === "GET") {
77
77
  const framework = url.searchParams.get("framework");
78
78
  const projectId = url.searchParams.get("projectId");
79
79
  const limit = parseInt(url.searchParams.get("limit") || "500", 10);
@@ -82,7 +82,7 @@ async function handler(req, res) {
82
82
  return;
83
83
  }
84
84
 
85
- if (path === "/" || path === "") {
85
+ if (pathname === "/" || pathname === "") {
86
86
  const dashboardPath = path.join(__dirname, "dashboard.html");
87
87
  if (fs.existsSync(dashboardPath)) {
88
88
  res.writeHead(200, { "Content-Type": "text/html" });
@@ -101,7 +101,7 @@ async function handler(req, res) {
101
101
  return;
102
102
  }
103
103
 
104
- if (path === "/api") {
104
+ if (pathname === "/api") {
105
105
  send(res, 200, {
106
106
  name: "qa-lab-learning-hub",
107
107
  endpoints: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-lab-agent",
3
- "version": "2.2.0",
3
+ "version": "2.3.1",
4
4
  "description": "Sistema de Inteligência em Qualidade de Software: executa, analisa, prevê, recomenda e aprende. Memória local + Learning Hub.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",