dlw-machine-setup 0.3.0 → 0.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.
Files changed (2) hide show
  1. package/bin/installer.js +14 -149
  2. package/package.json +1 -1
package/bin/installer.js CHANGED
@@ -3244,125 +3244,6 @@ var import_fs5 = require("fs");
3244
3244
  var import_readline = require("readline");
3245
3245
  var import_path5 = require("path");
3246
3246
 
3247
- // data/wizard-options/agents.json
3248
- var agents_default = {
3249
- agents: [
3250
- { name: "Claude Code", value: "claude-code", active: true },
3251
- { name: "GitHub Copilot", value: "github-copilot", active: true },
3252
- { name: "Cursor", value: "cursor", active: false }
3253
- ]
3254
- };
3255
-
3256
- // data/wizard-options/personas.json
3257
- var personas_default = {
3258
- baseMcpServers: ["azure-devops", "context7"],
3259
- personas: [
3260
- {
3261
- id: "sapui5-developer",
3262
- name: "SAPUI5 Developer",
3263
- description: "Frontend development with SAP UI5 and Fiori",
3264
- domains: ["SAPUI5"],
3265
- mcpServers: ["azure-devops", "context7", "playwright", "@ui5/mcp-server"],
3266
- active: true
3267
- },
3268
- {
3269
- id: "cap-developer",
3270
- name: "CAP Developer",
3271
- description: "Backend development with SAP Cloud Application Programming model",
3272
- domains: ["CAP"],
3273
- mcpServers: ["azure-devops", "context7", "cds-mcp"],
3274
- active: true
3275
- },
3276
- {
3277
- id: "abap-developer",
3278
- name: "ABAP Developer",
3279
- description: "ABAP and SAP backend development",
3280
- domains: ["ABAP"],
3281
- mcpServers: ["azure-devops", "context7", "abap", "sap-researcher"],
3282
- active: true
3283
- },
3284
- {
3285
- id: "btp-developer",
3286
- name: "BTP Developer",
3287
- description: "SAP Business Technology Platform development",
3288
- domains: ["BTP"],
3289
- mcpServers: ["azure-devops", "context7"],
3290
- active: true
3291
- },
3292
- {
3293
- id: "sap-dm-developer",
3294
- name: "SAP Digital Manufacturing Developer",
3295
- description: "SAP Digital Manufacturing development",
3296
- domains: ["SAP_DM"],
3297
- mcpServers: ["azure-devops", "context7"],
3298
- active: true
3299
- },
3300
- {
3301
- id: "forms-developer",
3302
- name: "Forms Developer",
3303
- description: "SAP Forms development",
3304
- domains: ["FORMS"],
3305
- mcpServers: ["azure-devops", "context7"],
3306
- active: true
3307
- }
3308
- ]
3309
- };
3310
-
3311
- // data/wizard-options/mcp-servers.json
3312
- var mcp_servers_default = {
3313
- "azure-devops": {
3314
- command: "npx",
3315
- args: ["-y", "@azure-devops/mcp", "__AZURE_ORG__"],
3316
- description: "Access Azure DevOps work items, boards, pipelines and repositories",
3317
- useWhen: "User asks about work items, sprints, pipelines, pull requests or Azure DevOps tasks",
3318
- active: true
3319
- },
3320
- context7: {
3321
- type: "stdio",
3322
- command: "npx",
3323
- args: ["-y", "@upstash/context7-mcp"],
3324
- description: "Fetch up-to-date library and framework documentation",
3325
- useWhen: "User asks how something works in a specific library or framework (e.g. 'how does X work in SAPUI5?')",
3326
- active: true
3327
- },
3328
- "@ui5/mcp-server": {
3329
- type: "stdio",
3330
- command: "npx",
3331
- args: ["@ui5/mcp-server"],
3332
- description: "SAPUI5-specific tooling for views, controllers, manifest and OData",
3333
- useWhen: "User asks to create or modify SAPUI5 views, controllers, fragments or manifest.json",
3334
- active: true
3335
- },
3336
- playwright: {
3337
- command: "npx",
3338
- args: ["@playwright/mcp@latest"],
3339
- description: "Browser automation and end-to-end testing",
3340
- useWhen: "User asks to write or run browser tests, or automate browser interactions",
3341
- active: true
3342
- },
3343
- "cds-mcp": {
3344
- command: "npx",
3345
- args: ["-y", "@cap-js/mcp-server"],
3346
- description: "SAP CAP/CDS tooling for service definitions, handlers and CQL",
3347
- useWhen: "User asks about CAP services, CDS models, handlers or CQL queries",
3348
- active: true
3349
- },
3350
- abap: {
3351
- type: "http",
3352
- url: "http://localhost:5001/mcp",
3353
- description: "ABAP development assistant for SAP backend development",
3354
- useWhen: "User asks about ABAP code, RAP objects, CDS views or SAP backend logic",
3355
- active: true
3356
- },
3357
- "sap-researcher": {
3358
- command: "npx",
3359
- args: ["mcp-remote", "http://gsi-em-az1-0057/successormcp/mcp", "--allow-http"],
3360
- description: "Internal SAP knowledge base and documentation search",
3361
- useWhen: "User asks about SAP-specific topics, best practices or internal documentation",
3362
- active: true
3363
- }
3364
- };
3365
-
3366
3247
  // src/utils/data/fetch-wizard-options.ts
3367
3248
  var GITHUB_REPO = "DLW-INT-SAP-DEV/DBE_DLWR_AI_WORKSPACE_SETUP_client";
3368
3249
  async function fetchWizardOptions(token) {
@@ -3758,9 +3639,6 @@ function getAgentMCPTarget(agent) {
3758
3639
  return { filePath: ".vscode/mcp.json", rootKey: "servers", dir: ".vscode" };
3759
3640
  }
3760
3641
  }
3761
- var ALL_MCP_SERVERS = Object.fromEntries(
3762
- Object.entries(mcp_servers_default).filter(([, config]) => config.active !== false)
3763
- );
3764
3642
  async function setupMCPConfiguration(projectPath, mcpConfig, agent) {
3765
3643
  const target = getAgentMCPTarget(agent);
3766
3644
  const mcpJsonPath = (0, import_path3.join)(projectPath, target.filePath);
@@ -3795,18 +3673,17 @@ async function setupMCPConfiguration(projectPath, mcpConfig, agent) {
3795
3673
  (0, import_fs3.writeFileSync)(mcpJsonPath, JSON.stringify(outputFile, null, 2), "utf-8");
3796
3674
  return { addedServers, skippedServers };
3797
3675
  }
3798
- function buildMCPConfiguration(selectedItems, baseMcpServers2, allMcpServers) {
3799
- const servers = allMcpServers ?? ALL_MCP_SERVERS;
3676
+ function buildMCPConfiguration(selectedItems, baseMcpServers, allMcpServers) {
3800
3677
  const config = {};
3801
- for (const serverName of baseMcpServers2) {
3802
- if (servers[serverName]) {
3803
- config[serverName] = servers[serverName];
3678
+ for (const serverName of baseMcpServers) {
3679
+ if (allMcpServers[serverName]) {
3680
+ config[serverName] = allMcpServers[serverName];
3804
3681
  }
3805
3682
  }
3806
3683
  for (const item of selectedItems) {
3807
3684
  for (const serverName of item.mcpServers) {
3808
- if (servers[serverName] && !config[serverName]) {
3809
- config[serverName] = servers[serverName];
3685
+ if (allMcpServers[serverName] && !config[serverName]) {
3686
+ config[serverName] = allMcpServers[serverName];
3810
3687
  }
3811
3688
  }
3812
3689
  }
@@ -3936,31 +3813,19 @@ ${body}`;
3936
3813
  }
3937
3814
 
3938
3815
  // src/utils/mod.ts
3939
- var personas = personas_default.personas.filter((p) => p.active !== false);
3940
- var baseMcpServers = personas_default.baseMcpServers;
3941
- var agents = agents_default.agents.filter((a) => a.active !== false);
3942
3816
  async function loadWizardOptions(token) {
3943
3817
  const remote = await fetchWizardOptions(token);
3944
- if (remote) {
3945
- const filteredMcpServers = Object.fromEntries(
3946
- Object.entries(remote.mcpServers).filter(([, config]) => config.active !== false)
3947
- );
3948
- return {
3949
- personas: remote.personas.personas.filter((p) => p.active !== false),
3950
- agents: remote.agents.filter((a) => a.active !== false),
3951
- baseMcpServers: remote.personas.baseMcpServers,
3952
- mcpServers: filteredMcpServers
3953
- };
3818
+ if (!remote) {
3819
+ throw new Error("Failed to load configuration from GitHub release. Check your network and token.");
3954
3820
  }
3955
- console.log(" (Using bundled configuration)");
3956
- const fallbackMcpServers = Object.fromEntries(
3957
- Object.entries(mcp_servers_default).filter(([, c]) => c.active !== false)
3821
+ const filteredMcpServers = Object.fromEntries(
3822
+ Object.entries(remote.mcpServers).filter(([, config]) => config.active !== false)
3958
3823
  );
3959
3824
  return {
3960
- personas,
3961
- agents,
3962
- baseMcpServers,
3963
- mcpServers: fallbackMcpServers
3825
+ personas: remote.personas.personas.filter((p) => p.active !== false),
3826
+ agents: remote.agents.filter((a) => a.active !== false),
3827
+ baseMcpServers: remote.personas.baseMcpServers,
3828
+ mcpServers: filteredMcpServers
3964
3829
  };
3965
3830
  }
3966
3831
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dlw-machine-setup",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "One-shot installer for The Machine toolchain",
5
5
  "bin": {
6
6
  "dlw-machine-setup": "bin/installer.js"