snow-flow 1.4.3 → 1.4.4

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/dist/cli.js +47 -14
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -2096,9 +2096,25 @@ program
2096
2096
  console.log(' ✓ CLAUDE.md - Development documentation');
2097
2097
  console.log(' ✓ README.md - Project documentation');
2098
2098
  if (!options.skipMcp) {
2099
- console.log(chalk_1.default.yellow.bold('\n📝 MCP servers are configured for Claude Code'));
2100
- console.log('\nTo activate MCP servers in Claude Code, run:');
2101
- console.log(chalk_1.default.cyan(' claude --mcp-config .mcp.json .'));
2099
+ // Start MCP servers automatically
2100
+ console.log(chalk_1.default.yellow.bold('\n🚀 Starting MCP servers in the background...'));
2101
+ try {
2102
+ const { MCPServerManager } = await Promise.resolve().then(() => __importStar(require('./utils/mcp-server-manager.js')));
2103
+ const manager = new MCPServerManager();
2104
+ await manager.initialize();
2105
+ console.log('📡 Starting all ServiceNow MCP servers...');
2106
+ await manager.startAllServers();
2107
+ const status = manager.getServerStatus();
2108
+ const running = status.filter((s) => s.status === 'running').length;
2109
+ const total = status.length;
2110
+ console.log(chalk_1.default.green(`✅ Started ${running}/${total} MCP servers successfully!`));
2111
+ console.log(chalk_1.default.blue('\n📋 MCP servers are now running in the background'));
2112
+ console.log('🎯 They will be available when you run swarm commands');
2113
+ }
2114
+ catch (error) {
2115
+ console.log(chalk_1.default.yellow('\n⚠️ Could not start MCP servers automatically'));
2116
+ console.log('📝 You can start them manually with: ' + chalk_1.default.cyan('snow-flow mcp start'));
2117
+ }
2102
2118
  }
2103
2119
  }
2104
2120
  console.log(chalk_1.default.blue.bold('\n🎯 Next steps:'));
@@ -4438,12 +4454,29 @@ async function checkNeo4jAvailability() {
4438
4454
  }
4439
4455
  }
4440
4456
  async function createMCPConfig(targetDir) {
4457
+ // Determine the snow-flow installation directory
4458
+ let snowFlowRoot;
4459
+ // Check if we're in a global npm installation
4460
+ const isGlobalInstall = __dirname.includes('node_modules/snow-flow') ||
4461
+ __dirname.includes('node_modules/.pnpm') ||
4462
+ __dirname.includes('npm/snow-flow');
4463
+ if (isGlobalInstall) {
4464
+ // For global installs, find the snow-flow package root
4465
+ const parts = __dirname.split(/node_modules[\/\\]/);
4466
+ snowFlowRoot = parts[0] + 'node_modules/snow-flow';
4467
+ }
4468
+ else {
4469
+ // For local development or local install
4470
+ snowFlowRoot = process.cwd();
4471
+ }
4472
+ // Ensure we have the correct path to dist directory
4473
+ const distPath = (0, path_1.join)(snowFlowRoot, 'dist');
4441
4474
  // Create the correct .mcp.json file for Claude Code discovery
4442
4475
  const mcpConfig = {
4443
4476
  "mcpServers": {
4444
4477
  "servicenow-deployment": {
4445
4478
  "command": "node",
4446
- "args": ["dist/mcp/servicenow-deployment-mcp.js"],
4479
+ "args": [(0, path_1.join)(distPath, "mcp/servicenow-deployment-mcp.js")],
4447
4480
  "env": {
4448
4481
  "SNOW_INSTANCE": "${SNOW_INSTANCE}",
4449
4482
  "SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
@@ -4452,7 +4485,7 @@ async function createMCPConfig(targetDir) {
4452
4485
  },
4453
4486
  "servicenow-flow-composer": {
4454
4487
  "command": "node",
4455
- "args": ["dist/mcp/servicenow-flow-composer-mcp.js"],
4488
+ "args": [(0, path_1.join)(distPath, "mcp/servicenow-flow-composer-mcp.js")],
4456
4489
  "env": {
4457
4490
  "SNOW_INSTANCE": "${SNOW_INSTANCE}",
4458
4491
  "SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
@@ -4461,7 +4494,7 @@ async function createMCPConfig(targetDir) {
4461
4494
  },
4462
4495
  "servicenow-update-set": {
4463
4496
  "command": "node",
4464
- "args": ["dist/mcp/servicenow-update-set-mcp.js"],
4497
+ "args": [(0, path_1.join)(distPath, "mcp/servicenow-update-set-mcp.js")],
4465
4498
  "env": {
4466
4499
  "SNOW_INSTANCE": "${SNOW_INSTANCE}",
4467
4500
  "SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
@@ -4470,7 +4503,7 @@ async function createMCPConfig(targetDir) {
4470
4503
  },
4471
4504
  "servicenow-intelligent": {
4472
4505
  "command": "node",
4473
- "args": ["dist/mcp/servicenow-intelligent-mcp.js"],
4506
+ "args": [(0, path_1.join)(distPath, "mcp/servicenow-intelligent-mcp.js")],
4474
4507
  "env": {
4475
4508
  "SNOW_INSTANCE": "${SNOW_INSTANCE}",
4476
4509
  "SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
@@ -4479,7 +4512,7 @@ async function createMCPConfig(targetDir) {
4479
4512
  },
4480
4513
  "servicenow-graph-memory": {
4481
4514
  "command": "node",
4482
- "args": ["dist/mcp/servicenow-graph-memory-mcp.js"],
4515
+ "args": [(0, path_1.join)(distPath, "mcp/servicenow-graph-memory-mcp.js")],
4483
4516
  "env": {
4484
4517
  "NEO4J_URI": "${NEO4J_URI}",
4485
4518
  "NEO4J_USER": "${NEO4J_USER}",
@@ -4491,7 +4524,7 @@ async function createMCPConfig(targetDir) {
4491
4524
  },
4492
4525
  "servicenow-operations": {
4493
4526
  "command": "node",
4494
- "args": ["dist/mcp/servicenow-operations-mcp.js"],
4527
+ "args": [(0, path_1.join)(distPath, "mcp/servicenow-operations-mcp.js")],
4495
4528
  "env": {
4496
4529
  "SNOW_INSTANCE": "${SNOW_INSTANCE}",
4497
4530
  "SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
@@ -4500,7 +4533,7 @@ async function createMCPConfig(targetDir) {
4500
4533
  },
4501
4534
  "servicenow-platform-development": {
4502
4535
  "command": "node",
4503
- "args": ["dist/mcp/servicenow-platform-development-mcp.js"],
4536
+ "args": [(0, path_1.join)(distPath, "mcp/servicenow-platform-development-mcp.js")],
4504
4537
  "env": {
4505
4538
  "SNOW_INSTANCE": "${SNOW_INSTANCE}",
4506
4539
  "SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
@@ -4509,7 +4542,7 @@ async function createMCPConfig(targetDir) {
4509
4542
  },
4510
4543
  "servicenow-integration": {
4511
4544
  "command": "node",
4512
- "args": ["dist/mcp/servicenow-integration-mcp.js"],
4545
+ "args": [(0, path_1.join)(distPath, "mcp/servicenow-integration-mcp.js")],
4513
4546
  "env": {
4514
4547
  "SNOW_INSTANCE": "${SNOW_INSTANCE}",
4515
4548
  "SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
@@ -4518,7 +4551,7 @@ async function createMCPConfig(targetDir) {
4518
4551
  },
4519
4552
  "servicenow-automation": {
4520
4553
  "command": "node",
4521
- "args": ["dist/mcp/servicenow-automation-mcp.js"],
4554
+ "args": [(0, path_1.join)(distPath, "mcp/servicenow-automation-mcp.js")],
4522
4555
  "env": {
4523
4556
  "SNOW_INSTANCE": "${SNOW_INSTANCE}",
4524
4557
  "SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
@@ -4527,7 +4560,7 @@ async function createMCPConfig(targetDir) {
4527
4560
  },
4528
4561
  "servicenow-security-compliance": {
4529
4562
  "command": "node",
4530
- "args": ["dist/mcp/servicenow-security-compliance-mcp.js"],
4563
+ "args": [(0, path_1.join)(distPath, "mcp/servicenow-security-compliance-mcp.js")],
4531
4564
  "env": {
4532
4565
  "SNOW_INSTANCE": "${SNOW_INSTANCE}",
4533
4566
  "SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
@@ -4536,7 +4569,7 @@ async function createMCPConfig(targetDir) {
4536
4569
  },
4537
4570
  "servicenow-reporting-analytics": {
4538
4571
  "command": "node",
4539
- "args": ["dist/mcp/servicenow-reporting-analytics-mcp.js"],
4572
+ "args": [(0, path_1.join)(distPath, "mcp/servicenow-reporting-analytics-mcp.js")],
4540
4573
  "env": {
4541
4574
  "SNOW_INSTANCE": "${SNOW_INSTANCE}",
4542
4575
  "SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "ServiceNow Queen Agent - Hive-Mind Intelligence for ServiceNow Development inspired by claude-flow. Transform complex workflows into elegant one-command orchestration.",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",