@lousy-agents/mcp 5.16.0 → 5.17.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/dist/mcp-server.js +42 -37
- package/package.json +1 -1
package/dist/mcp-server.js
CHANGED
|
@@ -37583,46 +37583,51 @@ function createWorkflowGateway(cwd) {
|
|
|
37583
37583
|
/**
|
|
37584
37584
|
* Analyzes GitHub Action versions used across all workflow files.
|
|
37585
37585
|
*/ const analyzeActionVersionsHandler = async (args)=>{
|
|
37586
|
-
|
|
37587
|
-
|
|
37588
|
-
|
|
37589
|
-
|
|
37590
|
-
|
|
37591
|
-
|
|
37592
|
-
|
|
37593
|
-
|
|
37594
|
-
|
|
37595
|
-
|
|
37596
|
-
|
|
37597
|
-
|
|
37598
|
-
}
|
|
37599
|
-
// Read all workflow files
|
|
37600
|
-
const entries = await file_system_utils_listDirectoryWithinRoot(dir, workflowsRelativeDir);
|
|
37601
|
-
const files = entries.filter((entry)=>entry.isFile()).map((entry)=>entry.name);
|
|
37602
|
-
const yamlFiles = files.filter((f)=>f.endsWith(".yml") || f.endsWith(".yaml"));
|
|
37603
|
-
const workflows = [];
|
|
37604
|
-
for (const file of yamlFiles){
|
|
37605
|
-
const filePath = (0,external_node_path_.join)(workflowsRelativeDir, file);
|
|
37606
|
-
const actions = await parseWorkflowFile(dir, filePath);
|
|
37607
|
-
if (actions && actions.length > 0) {
|
|
37608
|
-
workflows.push({
|
|
37609
|
-
file,
|
|
37610
|
-
actions
|
|
37586
|
+
try {
|
|
37587
|
+
const dir = args.targetDir || process.cwd();
|
|
37588
|
+
const dirStat = await (0,promises_.stat)(dir).catch(()=>null);
|
|
37589
|
+
if (dirStat === null || !dirStat.isDirectory()) {
|
|
37590
|
+
return types_errorResponse(`Target directory does not exist: ${dir}`);
|
|
37591
|
+
}
|
|
37592
|
+
const workflowsRelativeDir = (0,external_node_path_.join)(".github", "workflows");
|
|
37593
|
+
if (!await file_system_utils_pathExistsWithinRoot(dir, workflowsRelativeDir)) {
|
|
37594
|
+
return successResponse({
|
|
37595
|
+
workflows: [],
|
|
37596
|
+
uniqueActions: [],
|
|
37597
|
+
message: "No .github/workflows directory found - no workflows to analyze"
|
|
37611
37598
|
});
|
|
37612
37599
|
}
|
|
37600
|
+
// Read all workflow files
|
|
37601
|
+
const entries = await file_system_utils_listDirectoryWithinRoot(dir, workflowsRelativeDir);
|
|
37602
|
+
const files = entries.filter((entry)=>entry.isFile()).map((entry)=>entry.name);
|
|
37603
|
+
const yamlFiles = files.filter((f)=>f.endsWith(".yml") || f.endsWith(".yaml"));
|
|
37604
|
+
const workflows = [];
|
|
37605
|
+
for (const file of yamlFiles){
|
|
37606
|
+
const filePath = (0,external_node_path_.join)(workflowsRelativeDir, file);
|
|
37607
|
+
const actions = await parseWorkflowFile(dir, filePath);
|
|
37608
|
+
if (actions && actions.length > 0) {
|
|
37609
|
+
workflows.push({
|
|
37610
|
+
file,
|
|
37611
|
+
actions
|
|
37612
|
+
});
|
|
37613
|
+
}
|
|
37614
|
+
}
|
|
37615
|
+
// Build unique actions map
|
|
37616
|
+
const actionVersionsMap = buildUniqueActionsMap(workflows);
|
|
37617
|
+
const uniqueActions = Array.from(actionVersionsMap.entries()).map(([name, versions])=>({
|
|
37618
|
+
name,
|
|
37619
|
+
versions: Array.from(versions)
|
|
37620
|
+
}));
|
|
37621
|
+
const totalActions = workflows.reduce((sum, w)=>sum + w.actions.length, 0);
|
|
37622
|
+
return successResponse({
|
|
37623
|
+
workflows,
|
|
37624
|
+
uniqueActions,
|
|
37625
|
+
message: workflows.length > 0 ? `Found ${totalActions} action reference(s) across ${workflows.length} workflow(s), ${uniqueActions.length} unique action(s)` : "No action references found in workflows"
|
|
37626
|
+
});
|
|
37627
|
+
} catch (error) {
|
|
37628
|
+
const message = error instanceof Error ? error.message : "Unknown error occurred";
|
|
37629
|
+
return types_errorResponse(`Failed to analyze action versions: ${message}`);
|
|
37613
37630
|
}
|
|
37614
|
-
// Build unique actions map
|
|
37615
|
-
const actionVersionsMap = buildUniqueActionsMap(workflows);
|
|
37616
|
-
const uniqueActions = Array.from(actionVersionsMap.entries()).map(([name, versions])=>({
|
|
37617
|
-
name,
|
|
37618
|
-
versions: Array.from(versions)
|
|
37619
|
-
}));
|
|
37620
|
-
const totalActions = workflows.reduce((sum, w)=>sum + w.actions.length, 0);
|
|
37621
|
-
return successResponse({
|
|
37622
|
-
workflows,
|
|
37623
|
-
uniqueActions,
|
|
37624
|
-
message: workflows.length > 0 ? `Found ${totalActions} action reference(s) across ${workflows.length} workflow(s), ${uniqueActions.length} unique action(s)` : "No action references found in workflows"
|
|
37625
|
-
});
|
|
37626
37631
|
};
|
|
37627
37632
|
|
|
37628
37633
|
;// CONCATENATED MODULE: ../core/src/gateways/instruction-file-discovery-gateway.ts
|