@greenarmor/ges 0.6.1 → 0.6.2
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/commands/mcp-setup.js +45 -3
- package/package.json +12 -12
|
@@ -23,6 +23,9 @@ const CLIENTS = [
|
|
|
23
23
|
name: "VS Code (Copilot)",
|
|
24
24
|
configPaths: [
|
|
25
25
|
path.join(".vscode", "mcp.json"),
|
|
26
|
+
path.join(os.homedir(), "Library", "Application Support", "Code", "User", "mcp.json"),
|
|
27
|
+
path.join(os.homedir(), ".config", "Code", "User", "mcp.json"),
|
|
28
|
+
path.join(os.homedir(), "AppData", "Roaming", "Code", "User", "mcp.json"),
|
|
26
29
|
],
|
|
27
30
|
configKey: "servers",
|
|
28
31
|
format: "servers",
|
|
@@ -136,7 +139,8 @@ function printSetupInstructions(client, configPath) {
|
|
|
136
139
|
console.log(" Restart Claude Desktop to load the server.");
|
|
137
140
|
break;
|
|
138
141
|
case "vscode":
|
|
139
|
-
console.log(" Reload the VS Code window (Cmd+Shift+P → Developer: Reload Window).");
|
|
142
|
+
console.log(" Reload the VS Code window (Cmd+Shift+P / Ctrl+Shift+P → Developer: Reload Window).");
|
|
143
|
+
console.log(" Verify: Open Copilot Chat → Agent mode → tools icon (🔨) → look for 'gesf'.");
|
|
140
144
|
break;
|
|
141
145
|
case "cursor":
|
|
142
146
|
console.log(" Restart Cursor to load the server.");
|
|
@@ -152,12 +156,16 @@ function printSetupInstructions(client, configPath) {
|
|
|
152
156
|
break;
|
|
153
157
|
}
|
|
154
158
|
}
|
|
155
|
-
async function setupClient(clientId) {
|
|
159
|
+
async function setupClient(clientId, defaultToGlobal = false) {
|
|
156
160
|
const client = CLIENTS.find((c) => c.id === clientId);
|
|
157
161
|
if (!client) {
|
|
158
162
|
console.error(`Unknown client: ${clientId}`);
|
|
159
163
|
process.exit(1);
|
|
160
164
|
}
|
|
165
|
+
if (client.id === "vscode") {
|
|
166
|
+
await setupVsCode(client, defaultToGlobal);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
161
169
|
const configPath = getConfigPath(client);
|
|
162
170
|
const existing = readJsonFile(configPath) || {};
|
|
163
171
|
const updated = addServerToConfig(existing, client);
|
|
@@ -166,12 +174,46 @@ async function setupClient(clientId) {
|
|
|
166
174
|
console.log(` Status: configured\n`);
|
|
167
175
|
await showNextStepsMenu("mcp-setup");
|
|
168
176
|
}
|
|
177
|
+
async function setupVsCode(client, defaultToGlobal = false) {
|
|
178
|
+
const globalPaths = client.configPaths.slice(1);
|
|
179
|
+
const globalPath = globalPaths.find((p) => fs.existsSync(p)) || globalPaths[0];
|
|
180
|
+
const projectPath = client.configPaths[0];
|
|
181
|
+
let choice;
|
|
182
|
+
if (defaultToGlobal) {
|
|
183
|
+
choice = "global";
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
console.log("\n VS Code MCP Setup\n");
|
|
187
|
+
console.log(" Choose configuration scope:\n");
|
|
188
|
+
console.log(` 1) Global — available in all projects (${globalPath})`);
|
|
189
|
+
console.log(` 2) Project — current project only (${projectPath})`);
|
|
190
|
+
console.log("");
|
|
191
|
+
choice = await select({
|
|
192
|
+
message: "Configuration scope:",
|
|
193
|
+
choices: [
|
|
194
|
+
{ name: "Global (recommended — all projects)", value: "global" },
|
|
195
|
+
{ name: "Project (current project only)", value: "project" },
|
|
196
|
+
],
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
const configPath = choice === "global" ? globalPath : projectPath;
|
|
200
|
+
const existing = readJsonFile(configPath) || {};
|
|
201
|
+
if (existing.inputs) {
|
|
202
|
+
delete existing.inputs;
|
|
203
|
+
console.log(" Removed invalid 'inputs' section from existing config.");
|
|
204
|
+
}
|
|
205
|
+
const updated = addServerToConfig(existing, client);
|
|
206
|
+
writeJsonFile(configPath, updated);
|
|
207
|
+
printSetupInstructions(client, configPath);
|
|
208
|
+
console.log(` Status: configured\n`);
|
|
209
|
+
await showNextStepsMenu("mcp-setup");
|
|
210
|
+
}
|
|
169
211
|
async function setupAll() {
|
|
170
212
|
console.log("\n GESF MCP Server Setup\n");
|
|
171
213
|
console.log(" ─────────────────────\n");
|
|
172
214
|
for (const client of CLIENTS) {
|
|
173
215
|
try {
|
|
174
|
-
await setupClient(client.id);
|
|
216
|
+
await setupClient(client.id, true);
|
|
175
217
|
}
|
|
176
218
|
catch (err) {
|
|
177
219
|
console.log(` ${client.name}: skipped (${err instanceof Error ? err.message : String(err)})\n`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@greenarmor/ges",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Green Engineering Standard Framework - Compliance-as-Code CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"commander": "^13.0.0",
|
|
16
|
-
"@greenarmor/ges-audit-engine": "0.6.
|
|
17
|
-
"@greenarmor/ges-cicd-generator": "0.6.
|
|
18
|
-
"@greenarmor/ges-
|
|
19
|
-
"@greenarmor/ges-
|
|
20
|
-
"@greenarmor/ges-
|
|
21
|
-
"@greenarmor/ges-
|
|
22
|
-
"@greenarmor/ges-
|
|
23
|
-
"@greenarmor/ges-scoring-engine": "0.6.
|
|
24
|
-
"@greenarmor/ges-
|
|
25
|
-
"@greenarmor/ges-
|
|
26
|
-
"@greenarmor/ges-
|
|
16
|
+
"@greenarmor/ges-audit-engine": "0.6.2",
|
|
17
|
+
"@greenarmor/ges-cicd-generator": "0.6.2",
|
|
18
|
+
"@greenarmor/ges-doc-generator": "0.6.2",
|
|
19
|
+
"@greenarmor/ges-report-generator": "0.6.2",
|
|
20
|
+
"@greenarmor/ges-scanner-integration": "0.6.2",
|
|
21
|
+
"@greenarmor/ges-compliance-engine": "0.6.2",
|
|
22
|
+
"@greenarmor/ges-core": "0.6.2",
|
|
23
|
+
"@greenarmor/ges-scoring-engine": "0.6.2",
|
|
24
|
+
"@greenarmor/ges-rules-engine": "0.6.2",
|
|
25
|
+
"@greenarmor/ges-mcp-server": "0.6.2",
|
|
26
|
+
"@greenarmor/ges-policy-engine": "0.6.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^22.0.0",
|