@lousy-agents/cli 1.0.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/LICENSE +21 -0
- package/README.md +148 -0
- package/dist/commands/copilot-setup.d.ts +5 -0
- package/dist/commands/copilot-setup.d.ts.map +1 -0
- package/dist/commands/copilot-setup.js +97 -0
- package/dist/commands/copilot-setup.js.map +1 -0
- package/dist/commands/init.d.ts +12 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +115 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/new.d.ts +11 -0
- package/dist/commands/new.d.ts.map +1 -0
- package/dist/commands/new.js +41 -0
- package/dist/commands/new.js.map +1 -0
- package/dist/entities/copilot-agent.d.ts +15 -0
- package/dist/entities/copilot-agent.d.ts.map +1 -0
- package/dist/entities/copilot-agent.js +53 -0
- package/dist/entities/copilot-agent.js.map +1 -0
- package/dist/entities/copilot-setup.d.ts +65 -0
- package/dist/entities/copilot-setup.d.ts.map +1 -0
- package/dist/entities/copilot-setup.js +6 -0
- package/dist/entities/copilot-setup.js.map +1 -0
- package/dist/entities/index.d.ts +6 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +6 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/gateways/action-version-gateway.d.ts +39 -0
- package/dist/gateways/action-version-gateway.d.ts.map +1 -0
- package/dist/gateways/action-version-gateway.js +47 -0
- package/dist/gateways/action-version-gateway.js.map +1 -0
- package/dist/gateways/agent-file-gateway.d.ts +50 -0
- package/dist/gateways/agent-file-gateway.d.ts.map +1 -0
- package/dist/gateways/agent-file-gateway.js +34 -0
- package/dist/gateways/agent-file-gateway.js.map +1 -0
- package/dist/gateways/environment-gateway.d.ts +30 -0
- package/dist/gateways/environment-gateway.d.ts.map +1 -0
- package/dist/gateways/environment-gateway.js +56 -0
- package/dist/gateways/environment-gateway.js.map +1 -0
- package/dist/gateways/file-system-utils.d.ts +8 -0
- package/dist/gateways/file-system-utils.d.ts.map +1 -0
- package/dist/gateways/file-system-utils.js +17 -0
- package/dist/gateways/file-system-utils.js.map +1 -0
- package/dist/gateways/file-system-workflow-gateway.d.ts +27 -0
- package/dist/gateways/file-system-workflow-gateway.d.ts.map +1 -0
- package/dist/gateways/file-system-workflow-gateway.js +99 -0
- package/dist/gateways/file-system-workflow-gateway.js.map +1 -0
- package/dist/gateways/index.d.ts +9 -0
- package/dist/gateways/index.d.ts.map +1 -0
- package/dist/gateways/index.js +9 -0
- package/dist/gateways/index.js.map +1 -0
- package/dist/gateways/workflow-gateway.d.ts +43 -0
- package/dist/gateways/workflow-gateway.d.ts.map +1 -0
- package/dist/gateways/workflow-gateway.js +6 -0
- package/dist/gateways/workflow-gateway.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/config.d.ts +27 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +226 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/copilot-setup-config.d.ts +79 -0
- package/dist/lib/copilot-setup-config.d.ts.map +1 -0
- package/dist/lib/copilot-setup-config.js +119 -0
- package/dist/lib/copilot-setup-config.js.map +1 -0
- package/dist/lib/filesystem-structure.d.ts +45 -0
- package/dist/lib/filesystem-structure.d.ts.map +1 -0
- package/dist/lib/filesystem-structure.js +69 -0
- package/dist/lib/filesystem-structure.js.map +1 -0
- package/dist/lib/mcp-test-client.d.ts +43 -0
- package/dist/lib/mcp-test-client.d.ts.map +1 -0
- package/dist/lib/mcp-test-client.js +167 -0
- package/dist/lib/mcp-test-client.js.map +1 -0
- package/dist/lib/project-name-validation.d.ts +43 -0
- package/dist/lib/project-name-validation.d.ts.map +1 -0
- package/dist/lib/project-name-validation.js +131 -0
- package/dist/lib/project-name-validation.js.map +1 -0
- package/dist/mcp/index.d.ts +5 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +5 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/server.d.ts +15 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +120 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/analyze-action-versions.d.ts +9 -0
- package/dist/mcp/tools/analyze-action-versions.d.ts.map +1 -0
- package/dist/mcp/tools/analyze-action-versions.js +81 -0
- package/dist/mcp/tools/analyze-action-versions.js.map +1 -0
- package/dist/mcp/tools/create-copilot-setup-workflow.d.ts +9 -0
- package/dist/mcp/tools/create-copilot-setup-workflow.d.ts.map +1 -0
- package/dist/mcp/tools/create-copilot-setup-workflow.js +121 -0
- package/dist/mcp/tools/create-copilot-setup-workflow.js.map +1 -0
- package/dist/mcp/tools/discover-environment.d.ts +9 -0
- package/dist/mcp/tools/discover-environment.d.ts.map +1 -0
- package/dist/mcp/tools/discover-environment.js +30 -0
- package/dist/mcp/tools/discover-environment.js.map +1 -0
- package/dist/mcp/tools/discover-workflow-setup-actions.d.ts +9 -0
- package/dist/mcp/tools/discover-workflow-setup-actions.d.ts.map +1 -0
- package/dist/mcp/tools/discover-workflow-setup-actions.js +37 -0
- package/dist/mcp/tools/discover-workflow-setup-actions.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +11 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js +11 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/read-copilot-setup-workflow.d.ts +9 -0
- package/dist/mcp/tools/read-copilot-setup-workflow.d.ts.map +1 -0
- package/dist/mcp/tools/read-copilot-setup-workflow.js +38 -0
- package/dist/mcp/tools/read-copilot-setup-workflow.js.map +1 -0
- package/dist/mcp/tools/resolve-action-versions.d.ts +10 -0
- package/dist/mcp/tools/resolve-action-versions.d.ts.map +1 -0
- package/dist/mcp/tools/resolve-action-versions.js +61 -0
- package/dist/mcp/tools/resolve-action-versions.js.map +1 -0
- package/dist/mcp/tools/types.d.ts +67 -0
- package/dist/mcp/tools/types.d.ts.map +1 -0
- package/dist/mcp/tools/types.js +24 -0
- package/dist/mcp/tools/types.js.map +1 -0
- package/dist/mcp-server.d.ts +7 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +17 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/use-cases/action-resolution.d.ts +66 -0
- package/dist/use-cases/action-resolution.d.ts.map +1 -0
- package/dist/use-cases/action-resolution.js +107 -0
- package/dist/use-cases/action-resolution.js.map +1 -0
- package/dist/use-cases/candidate-builder.d.ts +17 -0
- package/dist/use-cases/candidate-builder.d.ts.map +1 -0
- package/dist/use-cases/candidate-builder.js +67 -0
- package/dist/use-cases/candidate-builder.js.map +1 -0
- package/dist/use-cases/copilot-setup.d.ts +8 -0
- package/dist/use-cases/copilot-setup.d.ts.map +1 -0
- package/dist/use-cases/copilot-setup.js +10 -0
- package/dist/use-cases/copilot-setup.js.map +1 -0
- package/dist/use-cases/create-copilot-agent.d.ts +29 -0
- package/dist/use-cases/create-copilot-agent.d.ts.map +1 -0
- package/dist/use-cases/create-copilot-agent.js +73 -0
- package/dist/use-cases/create-copilot-agent.js.map +1 -0
- package/dist/use-cases/index.d.ts +9 -0
- package/dist/use-cases/index.d.ts.map +1 -0
- package/dist/use-cases/index.js +9 -0
- package/dist/use-cases/index.js.map +1 -0
- package/dist/use-cases/setup-step-discovery.d.ts +87 -0
- package/dist/use-cases/setup-step-discovery.d.ts.map +1 -0
- package/dist/use-cases/setup-step-discovery.js +202 -0
- package/dist/use-cases/setup-step-discovery.js.map +1 -0
- package/dist/use-cases/workflow-generator.d.ts +34 -0
- package/dist/use-cases/workflow-generator.d.ts.map +1 -0
- package/dist/use-cases/workflow-generator.js +195 -0
- package/dist/use-cases/workflow-generator.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP test client for integration testing.
|
|
3
|
+
*
|
|
4
|
+
* This client communicates with an MCP server process via stdio,
|
|
5
|
+
* sending JSON-RPC messages and receiving responses.
|
|
6
|
+
*/
|
|
7
|
+
import { spawn } from "node:child_process";
|
|
8
|
+
/**
|
|
9
|
+
* Time to wait for the MCP server process to start and be ready
|
|
10
|
+
* to accept connections. Allows for process initialization overhead.
|
|
11
|
+
*/
|
|
12
|
+
const SERVER_STARTUP_DELAY_MS = 100;
|
|
13
|
+
/**
|
|
14
|
+
* Maximum time to wait for a response from the MCP server
|
|
15
|
+
* before considering the request timed out.
|
|
16
|
+
*/
|
|
17
|
+
const REQUEST_TIMEOUT_MS = 5000;
|
|
18
|
+
/**
|
|
19
|
+
* MCP client for testing.
|
|
20
|
+
* Sends JSON-RPC messages to the MCP server and receives responses.
|
|
21
|
+
*/
|
|
22
|
+
export class McpTestClient {
|
|
23
|
+
process = null;
|
|
24
|
+
messageId = 0;
|
|
25
|
+
responseBuffer = "";
|
|
26
|
+
pendingResponses = new Map();
|
|
27
|
+
isStarted = false;
|
|
28
|
+
/**
|
|
29
|
+
* Starts the MCP server process.
|
|
30
|
+
*/
|
|
31
|
+
async start() {
|
|
32
|
+
return new Promise((resolve, reject) => {
|
|
33
|
+
// Start the MCP server using the built dist file
|
|
34
|
+
this.process = spawn("node", ["dist/mcp-server.js"], {
|
|
35
|
+
cwd: process.cwd(),
|
|
36
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
37
|
+
});
|
|
38
|
+
if (!this.process.stdout || !this.process.stdin) {
|
|
39
|
+
reject(new Error("Failed to create process streams"));
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
// Handle stdout data
|
|
43
|
+
this.process.stdout.on("data", (data) => {
|
|
44
|
+
this.responseBuffer += data.toString();
|
|
45
|
+
this.processResponses();
|
|
46
|
+
});
|
|
47
|
+
// Handle stderr for debugging
|
|
48
|
+
this.process.stderr?.on("data", (data) => {
|
|
49
|
+
// Log errors but don't fail - stderr is expected for some operations
|
|
50
|
+
console.error("MCP server stderr:", data.toString());
|
|
51
|
+
});
|
|
52
|
+
this.process.on("error", (error) => {
|
|
53
|
+
reject(error);
|
|
54
|
+
});
|
|
55
|
+
this.process.on("exit", () => {
|
|
56
|
+
this.isStarted = false;
|
|
57
|
+
});
|
|
58
|
+
this.isStarted = true;
|
|
59
|
+
// Give the server a moment to start
|
|
60
|
+
setTimeout(resolve, SERVER_STARTUP_DELAY_MS);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
processResponses() {
|
|
64
|
+
// Try to parse complete JSON-RPC messages
|
|
65
|
+
const lines = this.responseBuffer.split("\n");
|
|
66
|
+
for (let i = 0; i < lines.length - 1; i++) {
|
|
67
|
+
const line = lines[i].trim();
|
|
68
|
+
if (line) {
|
|
69
|
+
try {
|
|
70
|
+
const response = JSON.parse(line);
|
|
71
|
+
if (response.id !== undefined) {
|
|
72
|
+
const pending = this.pendingResponses.get(response.id);
|
|
73
|
+
if (pending) {
|
|
74
|
+
this.pendingResponses.delete(response.id);
|
|
75
|
+
if (response.error) {
|
|
76
|
+
pending.reject(new Error(response.error.message));
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
pending.resolve(response.result);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
// Not a valid JSON line, skip
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
// Keep the last incomplete line in the buffer
|
|
90
|
+
this.responseBuffer = lines[lines.length - 1];
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Sends a JSON-RPC request to the MCP server.
|
|
94
|
+
*/
|
|
95
|
+
async sendRequest(method, params) {
|
|
96
|
+
if (!this.process?.stdin || !this.isStarted) {
|
|
97
|
+
throw new Error("MCP server not started");
|
|
98
|
+
}
|
|
99
|
+
const id = ++this.messageId;
|
|
100
|
+
const request = {
|
|
101
|
+
jsonrpc: "2.0",
|
|
102
|
+
id,
|
|
103
|
+
method,
|
|
104
|
+
params: params || {},
|
|
105
|
+
};
|
|
106
|
+
return new Promise((resolve, reject) => {
|
|
107
|
+
this.pendingResponses.set(id, { resolve, reject });
|
|
108
|
+
// Set a timeout
|
|
109
|
+
const timeout = setTimeout(() => {
|
|
110
|
+
this.pendingResponses.delete(id);
|
|
111
|
+
reject(new Error(`Request timeout for ${method}`));
|
|
112
|
+
}, REQUEST_TIMEOUT_MS);
|
|
113
|
+
// Check if stdin is still writable before writing
|
|
114
|
+
if (!this.process?.stdin?.writable) {
|
|
115
|
+
clearTimeout(timeout);
|
|
116
|
+
this.pendingResponses.delete(id);
|
|
117
|
+
reject(new Error("MCP server stdin is not writable"));
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this.process.stdin.write(`${JSON.stringify(request)}\n`, (error) => {
|
|
121
|
+
if (error) {
|
|
122
|
+
clearTimeout(timeout);
|
|
123
|
+
this.pendingResponses.delete(id);
|
|
124
|
+
reject(error);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Sends an initialize request to the MCP server.
|
|
131
|
+
*/
|
|
132
|
+
async initialize() {
|
|
133
|
+
return this.sendRequest("initialize", {
|
|
134
|
+
protocolVersion: "2024-11-05",
|
|
135
|
+
capabilities: {},
|
|
136
|
+
clientInfo: { name: "test-client", version: "1.0.0" },
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Lists all available tools from the MCP server.
|
|
141
|
+
*/
|
|
142
|
+
async listTools() {
|
|
143
|
+
return this.sendRequest("tools/list", {});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Calls a tool on the MCP server.
|
|
147
|
+
*/
|
|
148
|
+
async callTool(name, args) {
|
|
149
|
+
return this.sendRequest("tools/call", { name, arguments: args });
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Stops the MCP server process.
|
|
153
|
+
*/
|
|
154
|
+
stop() {
|
|
155
|
+
if (this.process) {
|
|
156
|
+
this.isStarted = false;
|
|
157
|
+
// Clear pending responses before killing
|
|
158
|
+
for (const [id, pending] of this.pendingResponses) {
|
|
159
|
+
pending.reject(new Error("MCP server stopped"));
|
|
160
|
+
this.pendingResponses.delete(id);
|
|
161
|
+
}
|
|
162
|
+
this.process.kill();
|
|
163
|
+
this.process = null;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=mcp-test-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-test-client.js","sourceRoot":"","sources":["../../src/lib/mcp-test-client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAqB,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE9D;;;GAGG;AACH,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAEpC;;;GAGG;AACH,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEhC;;;GAGG;AACH,MAAM,OAAO,aAAa;IACd,OAAO,GAAwB,IAAI,CAAC;IACpC,SAAS,GAAG,CAAC,CAAC;IACd,cAAc,GAAG,EAAE,CAAC;IACpB,gBAAgB,GAGpB,IAAI,GAAG,EAAE,CAAC;IACN,SAAS,GAAG,KAAK,CAAC;IAE1B;;OAEG;IACH,KAAK,CAAC,KAAK;QACP,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,iDAAiD;YACjD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,oBAAoB,CAAC,EAAE;gBACjD,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;gBAClB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;aAClC,CAAC,CAAC;YAEH,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;gB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E,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE;SACxD,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,SAAS;QACX,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ,CACV,IAAY,EACZ,IAA6B;QAE7B,OAAO,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;OAEG;IACH,IAAI;QACA,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YACvB,yCAAyC;YACzC,KAAK,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBAChD,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC,CAAC;gBAChD,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACrC,CAAC;YACD,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACxB,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project name validation utilities for npm/TypeScript projects.
|
|
3
|
+
* This module provides validation for project names that can be reused
|
|
4
|
+
* across different project types (webapp, CLI, probot, MCP server, etc.).
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Result of project name validation
|
|
8
|
+
*/
|
|
9
|
+
export interface ProjectNameValidationResult {
|
|
10
|
+
isValid: boolean;
|
|
11
|
+
errorMessage?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Validates that a project name is a valid npm package name.
|
|
15
|
+
* Supports both unscoped (e.g., "my-package") and scoped (e.g., "@scope/my-package") names.
|
|
16
|
+
*
|
|
17
|
+
* Based on npm naming rules:
|
|
18
|
+
* - Lowercase only
|
|
19
|
+
* - No spaces
|
|
20
|
+
* - Can contain hyphens, underscores, periods, and numbers
|
|
21
|
+
* - Unscoped names cannot start with . or _
|
|
22
|
+
* - Maximum 214 characters
|
|
23
|
+
*
|
|
24
|
+
* @param name The project name to validate
|
|
25
|
+
* @returns Validation result with isValid flag and optional error message
|
|
26
|
+
*/
|
|
27
|
+
export declare function validateProjectName(name: string): ProjectNameValidationResult;
|
|
28
|
+
/**
|
|
29
|
+
* Simple boolean check for project name validity.
|
|
30
|
+
* Use validateProjectName() when you need the error message.
|
|
31
|
+
*
|
|
32
|
+
* @param name The project name to validate
|
|
33
|
+
* @returns true if the name is valid, false otherwise
|
|
34
|
+
*/
|
|
35
|
+
export declare function isValidProjectName(name: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Gets a user-friendly error message for an invalid project name.
|
|
38
|
+
*
|
|
39
|
+
* @param name The project name that was validated
|
|
40
|
+
* @returns Error message describing why the name is invalid, or undefined if valid
|
|
41
|
+
*/
|
|
42
|
+
export declare function getProjectNameError(name: string): string | undefined;
|
|
43
|
+
//# sourceMappingURL=project-name-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-name-validation.d.ts","sourceRoot":"","sources":["../../src/lib/project-name-validation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,2BAA2B;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AA2HD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,2BAA2B,CAa7E;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEpE"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project name validation utilities for npm/TypeScript projects.
|
|
3
|
+
* This module provides validation for project names that can be reused
|
|
4
|
+
* across different project types (webapp, CLI, probot, MCP server, etc.).
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Pattern for valid npm package name segments (scope or package name)
|
|
8
|
+
*/
|
|
9
|
+
const NPM_NAME_PATTERN = /^[a-z0-9][-a-z0-9._]*$/;
|
|
10
|
+
/**
|
|
11
|
+
* Maximum allowed length for npm package names
|
|
12
|
+
*/
|
|
13
|
+
const MAX_NAME_LENGTH = 214;
|
|
14
|
+
/**
|
|
15
|
+
* Creates validation result from error message (undefined = valid)
|
|
16
|
+
*/
|
|
17
|
+
const toResult = (errorMessage) => errorMessage ? { isValid: false, errorMessage } : { isValid: true };
|
|
18
|
+
/**
|
|
19
|
+
* Runs validation rules in order, returning first failure or success
|
|
20
|
+
*/
|
|
21
|
+
const runValidationRules = (name, rules) => {
|
|
22
|
+
for (const rule of rules) {
|
|
23
|
+
const error = rule(name);
|
|
24
|
+
if (error) {
|
|
25
|
+
return toResult(error);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return toResult(undefined);
|
|
29
|
+
};
|
|
30
|
+
// ============================================================================
|
|
31
|
+
// Validation Rules
|
|
32
|
+
// ============================================================================
|
|
33
|
+
const requiredRule = (name) => !name || name.length === 0 ? "Project name is required" : undefined;
|
|
34
|
+
const maxLengthRule = (name) => name.length > MAX_NAME_LENGTH
|
|
35
|
+
? "Project name must be 214 characters or less"
|
|
36
|
+
: undefined;
|
|
37
|
+
const noLeadingDotOrUnderscoreRule = (name) => name.startsWith(".") || name.startsWith("_")
|
|
38
|
+
? "Project name cannot start with . or _"
|
|
39
|
+
: undefined;
|
|
40
|
+
const validCharactersRule = (name) => !NPM_NAME_PATTERN.test(name)
|
|
41
|
+
? "Project name must be lowercase and can only contain letters, numbers, hyphens, underscores, and periods"
|
|
42
|
+
: undefined;
|
|
43
|
+
// ============================================================================
|
|
44
|
+
// Scoped Package Validation
|
|
45
|
+
// ============================================================================
|
|
46
|
+
const validateScopedName = (name) => {
|
|
47
|
+
const parts = name.split("/");
|
|
48
|
+
const scopeFormatRule = () => parts.length !== 2
|
|
49
|
+
? "Scoped package name must be in format @scope/name"
|
|
50
|
+
: undefined;
|
|
51
|
+
const scopeNotEmptyRule = () => parts[0].length < 2 ? "Scope name cannot be empty" : undefined;
|
|
52
|
+
const scopeValidRule = () => {
|
|
53
|
+
const scope = parts[0].slice(1); // Remove leading @
|
|
54
|
+
return !NPM_NAME_PATTERN.test(scope)
|
|
55
|
+
? "Scope must be lowercase and can only contain letters, numbers, hyphens, underscores, and periods"
|
|
56
|
+
: undefined;
|
|
57
|
+
};
|
|
58
|
+
const packageNameNotEmptyRule = () => !parts[1] || parts[1].length === 0
|
|
59
|
+
? "Package name after scope cannot be empty"
|
|
60
|
+
: undefined;
|
|
61
|
+
const packageNameValidRule = () => !NPM_NAME_PATTERN.test(parts[1])
|
|
62
|
+
? "Package name must be lowercase and can only contain letters, numbers, hyphens, underscores, and periods"
|
|
63
|
+
: undefined;
|
|
64
|
+
const scopedRules = [
|
|
65
|
+
scopeFormatRule,
|
|
66
|
+
scopeNotEmptyRule,
|
|
67
|
+
scopeValidRule,
|
|
68
|
+
packageNameNotEmptyRule,
|
|
69
|
+
packageNameValidRule,
|
|
70
|
+
];
|
|
71
|
+
return runValidationRules(name, scopedRules);
|
|
72
|
+
};
|
|
73
|
+
// ============================================================================
|
|
74
|
+
// Unscoped Package Validation
|
|
75
|
+
// ============================================================================
|
|
76
|
+
const validateUnscopedName = (name) => {
|
|
77
|
+
const unscopedRules = [
|
|
78
|
+
noLeadingDotOrUnderscoreRule,
|
|
79
|
+
validCharactersRule,
|
|
80
|
+
];
|
|
81
|
+
return runValidationRules(name, unscopedRules);
|
|
82
|
+
};
|
|
83
|
+
// ============================================================================
|
|
84
|
+
// Main Validation Function
|
|
85
|
+
// ============================================================================
|
|
86
|
+
/**
|
|
87
|
+
* Validates that a project name is a valid npm package name.
|
|
88
|
+
* Supports both unscoped (e.g., "my-package") and scoped (e.g., "@scope/my-package") names.
|
|
89
|
+
*
|
|
90
|
+
* Based on npm naming rules:
|
|
91
|
+
* - Lowercase only
|
|
92
|
+
* - No spaces
|
|
93
|
+
* - Can contain hyphens, underscores, periods, and numbers
|
|
94
|
+
* - Unscoped names cannot start with . or _
|
|
95
|
+
* - Maximum 214 characters
|
|
96
|
+
*
|
|
97
|
+
* @param name The project name to validate
|
|
98
|
+
* @returns Validation result with isValid flag and optional error message
|
|
99
|
+
*/
|
|
100
|
+
export function validateProjectName(name) {
|
|
101
|
+
// Common rules that apply to all package names
|
|
102
|
+
const commonRules = [requiredRule, maxLengthRule];
|
|
103
|
+
const commonResult = runValidationRules(name, commonRules);
|
|
104
|
+
if (!commonResult.isValid) {
|
|
105
|
+
return commonResult;
|
|
106
|
+
}
|
|
107
|
+
// Route to scoped or unscoped validation
|
|
108
|
+
return name.startsWith("@")
|
|
109
|
+
? validateScopedName(name)
|
|
110
|
+
: validateUnscopedName(name);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Simple boolean check for project name validity.
|
|
114
|
+
* Use validateProjectName() when you need the error message.
|
|
115
|
+
*
|
|
116
|
+
* @param name The project name to validate
|
|
117
|
+
* @returns true if the name is valid, false otherwise
|
|
118
|
+
*/
|
|
119
|
+
export function isValidProjectName(name) {
|
|
120
|
+
return validateProjectName(name).isValid;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Gets a user-friendly error message for an invalid project name.
|
|
124
|
+
*
|
|
125
|
+
* @param name The project name that was validated
|
|
126
|
+
* @returns Error message describing why the name is invalid, or undefined if valid
|
|
127
|
+
*/
|
|
128
|
+
export function getProjectNameError(name) {
|
|
129
|
+
return validateProjectName(name).errorMessage;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=project-name-validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-name-validation.js","sourceRoot":"","sources":["../../src/lib/project-name-validation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAeH;;GAEG;AACH,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAElD;;GAEG;AACH,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B;;GAEG;AACH,MAAM,QAAQ,GAAG,CACb,YAAgC,EACL,EAAE,CAC7B,YAAY,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAExE;;GAEG;AACH,MAAM,kBAAkB,GAAG,CACvB,IAAY,EACZ,KAAuB,EACI,EAAE;IAC7B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,KAAK,EAAE,CAAC;YACR,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,MAAM,YAAY,GAAmB,CAAC,IAAI,EAAE,EAAE,CAC1C,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,SAAS,CAAC;AAExE,MAAM,aAAa,GAAmB,CAAC,IAAI,EAAE,EAAE,CAC3C,IAAI,CAAC,MAAM,GAAG,eAAe;IACzB,CAAC,CAAC,6CAA6C;IAC/C,CAAC,CAAC,SAAS,CAAC;AAEpB,MAAM,4BAA4B,GAAmB,CAAC,IAAI,EAAE,EAAE,CAC1D,IAAI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,CAAC,IAAY;IAC5C,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Server for Copilot Setup Steps workflow management.
|
|
3
|
+
*
|
|
4
|
+
* This is a Layer 3 (Adapters) component that:
|
|
5
|
+
* - Handles MCP protocol communication
|
|
6
|
+
* - Routes tool calls to appropriate handlers
|
|
7
|
+
* - Does NOT contain business logic
|
|
8
|
+
*/
|
|
9
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
10
|
+
/**
|
|
11
|
+
* Creates and configures the MCP server with all tools.
|
|
12
|
+
*/
|
|
13
|
+
export declare function createMcpServer(): McpServer;
|
|
14
|
+
export { analyzeActionVersionsHandler, createCopilotSetupWorkflowHandler, discoverEnvironmentHandler, discoverWorkflowSetupActionsHandler, readCopilotSetupWorkflowHandler, resolveActionVersionsHandler, } from "./tools/index.js";
|
|
15
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAqJpE;;GAEG;AACH,wBAAgB,eAAe,IAAI,SAAS,CAS3C;AAGD,OAAO,EACH,4BAA4B,EAC5B,iCAAiC,EACjC,0BAA0B,EAC1B,mCAAmC,EACnC,+BAA+B,EAC/B,4BAA4B,GAC/B,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Server for Copilot Setup Steps workflow management.
|
|
3
|
+
*
|
|
4
|
+
* This is a Layer 3 (Adapters) component that:
|
|
5
|
+
* - Handles MCP protocol communication
|
|
6
|
+
* - Routes tool calls to appropriate handlers
|
|
7
|
+
* - Does NOT contain business logic
|
|
8
|
+
*/
|
|
9
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
import { analyzeActionVersionsHandler, createCopilotSetupWorkflowHandler, discoverEnvironmentHandler, discoverWorkflowSetupActionsHandler, readCopilotSetupWorkflowHandler, resolveActionVersionsHandler, } from "./tools/index.js";
|
|
12
|
+
/**
|
|
13
|
+
* Resolved version schema for input validation.
|
|
14
|
+
*/
|
|
15
|
+
const resolvedVersionSchema = z.object({
|
|
16
|
+
action: z.string().describe("Action name (e.g., 'actions/setup-node')"),
|
|
17
|
+
sha: z.string().describe("Commit SHA for the action version"),
|
|
18
|
+
versionTag: z.string().describe("Version tag (e.g., 'v4.0.0')"),
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Shared input schema for tools that operate on a target directory.
|
|
22
|
+
*/
|
|
23
|
+
const targetDirInputSchema = {
|
|
24
|
+
targetDir: z
|
|
25
|
+
.string()
|
|
26
|
+
.optional()
|
|
27
|
+
.describe("Target directory to operate on. Defaults to current working directory."),
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Extended input schema for create_copilot_setup_workflow tool.
|
|
31
|
+
*/
|
|
32
|
+
const createWorkflowInputSchema = {
|
|
33
|
+
...targetDirInputSchema,
|
|
34
|
+
resolvedVersions: z
|
|
35
|
+
.array(resolvedVersionSchema)
|
|
36
|
+
.optional()
|
|
37
|
+
.describe("Array of resolved action versions with SHA and tag. Use this to provide SHA-pinned versions after looking them up."),
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Input schema for resolve_action_versions tool.
|
|
41
|
+
*/
|
|
42
|
+
const resolveActionsInputSchema = {
|
|
43
|
+
...targetDirInputSchema,
|
|
44
|
+
actions: z
|
|
45
|
+
.array(z.string())
|
|
46
|
+
.optional()
|
|
47
|
+
.describe("List of action names to resolve (e.g., ['actions/setup-node']). If not provided, returns common setup actions."),
|
|
48
|
+
resolvedVersions: z
|
|
49
|
+
.array(resolvedVersionSchema)
|
|
50
|
+
.optional()
|
|
51
|
+
.describe("Array of already-resolved versions to filter out."),
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* All available MCP tools.
|
|
55
|
+
*/
|
|
56
|
+
const TOOLS = [
|
|
57
|
+
{
|
|
58
|
+
name: "discover_environment",
|
|
59
|
+
description: "Discover environment configuration files (mise.toml, version files like .nvmrc, .python-version, etc.) in a target directory",
|
|
60
|
+
handler: discoverEnvironmentHandler,
|
|
61
|
+
inputSchema: targetDirInputSchema,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "discover_workflow_setup_actions",
|
|
65
|
+
description: "Discover setup actions used in existing GitHub Actions workflows in a target directory",
|
|
66
|
+
handler: discoverWorkflowSetupActionsHandler,
|
|
67
|
+
inputSchema: targetDirInputSchema,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "read_copilot_setup_workflow",
|
|
71
|
+
description: "Read the existing Copilot Setup Steps workflow (copilot-setup-steps.yml or .yaml) from a target directory",
|
|
72
|
+
handler: readCopilotSetupWorkflowHandler,
|
|
73
|
+
inputSchema: targetDirInputSchema,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "create_copilot_setup_workflow",
|
|
77
|
+
description: "Create or update the Copilot Setup Steps workflow (copilot-setup-steps.yml) based on detected environment configuration. Returns actions needing version resolution and instructions for SHA-pinning.",
|
|
78
|
+
handler: createCopilotSetupWorkflowHandler,
|
|
79
|
+
inputSchema: createWorkflowInputSchema,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "analyze_action_versions",
|
|
83
|
+
description: "Analyze GitHub Action versions used across all workflow files in a target directory",
|
|
84
|
+
handler: analyzeActionVersionsHandler,
|
|
85
|
+
inputSchema: targetDirInputSchema,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "resolve_action_versions",
|
|
89
|
+
description: "Get version resolution metadata for GitHub Actions. Returns lookup URLs and instructions for the LLM to fetch latest versions and SHA-pin them. Can be called independently of workflow creation.",
|
|
90
|
+
handler: resolveActionVersionsHandler,
|
|
91
|
+
inputSchema: resolveActionsInputSchema,
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
/**
|
|
95
|
+
* Registers all MCP tools on the server.
|
|
96
|
+
*/
|
|
97
|
+
function registerTools(server) {
|
|
98
|
+
// TypeScript has deep type inference issues with MCP SDK generics
|
|
99
|
+
const registerTool = server.registerTool.bind(server);
|
|
100
|
+
for (const tool of TOOLS) {
|
|
101
|
+
registerTool(tool.name, {
|
|
102
|
+
description: tool.description,
|
|
103
|
+
inputSchema: tool.inputSchema,
|
|
104
|
+
}, tool.handler);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Creates and configures the MCP server with all tools.
|
|
109
|
+
*/
|
|
110
|
+
export function createMcpServer() {
|
|
111
|
+
const server = new McpServer({
|
|
112
|
+
name: "lousy-agents",
|
|
113
|
+
version: "0.1.0",
|
|
114
|
+
});
|
|
115
|
+
registerTools(server);
|
|
116
|
+
return server;
|
|
117
|
+
}
|
|
118
|
+
// Re-export tool handlers for testing
|
|
119
|
+
export { analyzeActionVersionsHandler, createCopilotSetupWorkflowHandler, discoverEnvironmentHandler, discoverWorkflowSetupActionsHandler, readCopilotSetupWorkflowHandler, resolveActionVersionsHandler, } from "./tools/index.js";
|
|
120
|
+
//# sourceMappingURL=server.js.map
|
|
@@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AAI,EAAE,cAAc;QACpB,OAAO,EAAE,OAAO;KACnB,CAAC,CAAC;IAEH,aAAa,CAAC,MAAM,CAAC,CAAC;IAEtB,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,sCAAsC;AACtC,OAAO,EACH,4BAA4B,EAC5B,iCAAiC,EACjC,0BAA0B,EAC1B,mCAAmC,EACnC,+BAA+B,EAC/B,4BAA4B,GAC/B,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tool handler for analyzing GitHub Action versions across workflows.
|
|
3
|
+
*/
|
|
4
|
+
import { type ToolHandler } from "./types.js";
|
|
5
|
+
/**
|
|
6
|
+
* Analyzes GitHub Action versions used across all workflow files.
|
|
7
|
+
*/
|
|
8
|
+
export declare const analyzeActionVersionsHandler: ToolHandler;
|
|
9
|
+
//# sourceMappingURL=analyze-action-versions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyze-action-versions.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/analyze-action-versions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,EAIH,KAAK,WAAW,EACnB,MAAM,YAAY,CAAC;AA8CpB;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,WAyD1C,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tool handler for analyzing GitHub Action versions across workflows.
|
|
3
|
+
*/
|
|
4
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { parse as parseYaml } from "yaml";
|
|
7
|
+
import { fileExists } from "../../gateways/index.js";
|
|
8
|
+
import { extractActionsFromWorkflow, } from "../../use-cases/setup-step-discovery.js";
|
|
9
|
+
import { errorResponse, successResponse, } from "./types.js";
|
|
10
|
+
/**
|
|
11
|
+
* Parses a workflow file and extracts action references.
|
|
12
|
+
*/
|
|
13
|
+
async function parseWorkflowFile(filePath) {
|
|
14
|
+
try {
|
|
15
|
+
const content = await readFile(filePath, "utf-8");
|
|
16
|
+
const workflow = parseYaml(content);
|
|
17
|
+
return extractActionsFromWorkflow(workflow);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
// Intentionally ignore parse errors for malformed YAML files
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Builds a map of unique actions to their versions.
|
|
26
|
+
*/
|
|
27
|
+
function buildUniqueActionsMap(workflows) {
|
|
28
|
+
const actionVersions = new Map();
|
|
29
|
+
for (const workflow of workflows) {
|
|
30
|
+
for (const action of workflow.actions) {
|
|
31
|
+
if (!actionVersions.has(action.name)) {
|
|
32
|
+
actionVersions.set(action.name, new Set());
|
|
33
|
+
}
|
|
34
|
+
actionVersions.get(action.name)?.add(action.version);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return actionVersions;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Analyzes GitHub Action versions used across all workflow files.
|
|
41
|
+
*/
|
|
42
|
+
export const analyzeActionVersionsHandler = async (args) => {
|
|
43
|
+
const dir = args.targetDir || process.cwd();
|
|
44
|
+
if (!(await fileExists(dir))) {
|
|
45
|
+
return errorResponse(`Target directory does not exist: ${dir}`);
|
|
46
|
+
}
|
|
47
|
+
const workflowsDir = join(dir, ".github", "workflows");
|
|
48
|
+
if (!(await fileExists(workflowsDir))) {
|
|
49
|
+
return successResponse({
|
|
50
|
+
workflows: [],
|
|
51
|
+
uniqueActions: [],
|
|
52
|
+
message: "No .github/workflows directory found - no workflows to analyze",
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// Read all workflow files
|
|
56
|
+
const files = await readdir(workflowsDir);
|
|
57
|
+
const yamlFiles = files.filter((f) => f.endsWith(".yml") || f.endsWith(".yaml"));
|
|
58
|
+
const workflows = [];
|
|
59
|
+
for (const file of yamlFiles) {
|
|
60
|
+
const filePath = join(workflowsDir, file);
|
|
61
|
+
const actions = await parseWorkflowFile(filePath);
|
|
62
|
+
if (actions && actions.length > 0) {
|
|
63
|
+
workflows.push({ file, actions });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// Build unique actions map
|
|
67
|
+
const actionVersionsMap = buildUniqueActionsMap(workflows);
|
|
68
|
+
const uniqueActions = Array.from(actionVersionsMap.entries()).map(([name, versions]) => ({
|
|
69
|
+
name,
|
|
70
|
+
versions: Array.from(versions),
|
|
71
|
+
}));
|
|
72
|
+
const totalActions = workflows.reduce((sum, w) => sum + w.actions.length, 0);
|
|
73
|
+
return successResponse({
|
|
74
|
+
workflows,
|
|
75
|
+
uniqueActions,
|
|
76
|
+
message: workflows.length > 0
|
|
77
|
+
? `Found ${totalActions} action reference(s) across ${workflows.length} workflow(s), ${uniqueActions.length} unique action(s)`
|
|
78
|
+
: "No action references found in workflows",
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=analyze-action-versions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyze-action-versions.js","sourceRoot":"","sources":["../../../src/mcp/tools/analyze-action-versions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAEH,0BAA0B,GAC7B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACH,aAAa,EACb,eAAe,GAGlB,MAAM,YAAY,CAAC;AAUpB;;GAEG;AACH,KAAK,UAAU,iBAAiB,CAC5B,QAAgB;IAEhB,IAAI,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ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,eAAe,CAAC;QACnB,SAAS;QACT,aAAa;QACb,OAAO,EACH,SAAS,CAAC,MAAM,GAAG,CAAC;YAChB,CAAC,CAAC,SAAS,YAAY,+BAA+B,SAAS,CAAC,MAAM,iBAAiB,aAAa,CAAC,MAAM,mBAAmB;YAC9H,CAAC,CAAC,yCAAyC;KACtD,CAAC,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tool handler for creating or updating Copilot Setup Steps workflow.
|
|
3
|
+
*/
|
|
4
|
+
import { type CreateWorkflowHandler } from "./types.js";
|
|
5
|
+
/**
|
|
6
|
+
* Creates or updates the Copilot Setup Steps workflow.
|
|
7
|
+
*/
|
|
8
|
+
export declare const createCopilotSetupWorkflowHandler: CreateWorkflowHandler;
|
|
9
|
+
//# sourceMappingURL=create-copilot-setup-workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-copilot-setup-workflow.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/create-copilot-setup-workflow.ts"],"names":[],"mappings":"AAAA;;GAEG;AAwBH,OAAO,EAEH,KAAK,qBAAqB,EAI7B,MAAM,YAAY,CAAC;AAyIpB;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,qBAiC/C,CAAC"}
|