secufusion-mcp 1.0.45 → 1.0.47
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/index.js +30 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -374,9 +374,37 @@ server.tool("manage_project_spec", "Manages the .secufusion-project-spec.json fi
|
|
|
374
374
|
}, inputChars);
|
|
375
375
|
}
|
|
376
376
|
const microservices = spec.microservices;
|
|
377
|
-
const
|
|
377
|
+
const svcNameLower = service_name.toLowerCase();
|
|
378
|
+
// 1. Direct match in microservices
|
|
379
|
+
let serviceBlock = microservices?.[service_name];
|
|
380
|
+
// 2. Case-insensitive match in microservices (e.g. "sfn-iam-api" vs "sfn-IAM-api")
|
|
381
|
+
if (!serviceBlock && microservices) {
|
|
382
|
+
const matchedKey = Object.keys(microservices).find(k => k.toLowerCase() === svcNameLower);
|
|
383
|
+
if (matchedKey)
|
|
384
|
+
serviceBlock = microservices[matchedKey];
|
|
385
|
+
}
|
|
386
|
+
// 3. Check spec.frontend by repo name (e.g. "sfn-web-ui")
|
|
387
|
+
const frontend = spec.frontend;
|
|
388
|
+
if (!serviceBlock && frontend) {
|
|
389
|
+
const repoName = String(frontend.repo ?? "").toLowerCase();
|
|
390
|
+
if (repoName === svcNameLower || svcNameLower.includes("web-ui") || svcNameLower.includes("frontend")) {
|
|
391
|
+
serviceBlock = frontend;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
// 4. Check spec.chrome_extension by repo name
|
|
395
|
+
const chromeExt = spec.chrome_extension;
|
|
396
|
+
if (!serviceBlock && chromeExt) {
|
|
397
|
+
const repoName = String(chromeExt.repo ?? "").toLowerCase();
|
|
398
|
+
if (repoName === svcNameLower || svcNameLower.includes("chrome") || svcNameLower.includes("extension")) {
|
|
399
|
+
serviceBlock = chromeExt;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
378
402
|
if (!serviceBlock) {
|
|
379
|
-
const available =
|
|
403
|
+
const available = [
|
|
404
|
+
...(microservices ? Object.keys(microservices) : []),
|
|
405
|
+
...(frontend?.repo ? [String(frontend.repo)] : []),
|
|
406
|
+
...(chromeExt?.repo ? [String(chromeExt.repo)] : []),
|
|
407
|
+
].join(", ");
|
|
380
408
|
return appendTelemetry({
|
|
381
409
|
isError: true,
|
|
382
410
|
content: [{ type: "text", text: `Service '${service_name}' not found in spec.\n\nAvailable services: ${available}` }],
|