snow-flow 2.8.8 → 2.8.9
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/cli.js +30 -0
- package/dist/mcp/servicenow-deployment-mcp.js +18 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -417,6 +417,36 @@ async function executeClaudeCode(prompt) {
|
|
|
417
417
|
// Check for MCP config
|
|
418
418
|
const mcpConfigPath = (0, path_1.join)(process.cwd(), '.mcp.json');
|
|
419
419
|
const hasMcpConfig = (0, fs_2.existsSync)(mcpConfigPath);
|
|
420
|
+
// Auto-start MCP servers if they're not running
|
|
421
|
+
if (hasMcpConfig) {
|
|
422
|
+
cliLogger.info('🔧 Checking MCP server status...');
|
|
423
|
+
try {
|
|
424
|
+
const { MCPServerManager } = await Promise.resolve().then(() => __importStar(require('./utils/mcp-server-manager.js')));
|
|
425
|
+
const manager = new MCPServerManager();
|
|
426
|
+
await manager.initialize();
|
|
427
|
+
const systemStatus = manager.getSystemStatus();
|
|
428
|
+
if (systemStatus.running === 0) {
|
|
429
|
+
cliLogger.info('🚀 Starting MCP servers automatically for swarm operation...');
|
|
430
|
+
await manager.startAllServers();
|
|
431
|
+
const newStatus = manager.getSystemStatus();
|
|
432
|
+
cliLogger.info(`✅ Started ${newStatus.running}/${newStatus.total} MCP servers`);
|
|
433
|
+
}
|
|
434
|
+
else if (systemStatus.running < systemStatus.total) {
|
|
435
|
+
cliLogger.info(`⚠️ Only ${systemStatus.running}/${systemStatus.total} MCP servers running`);
|
|
436
|
+
cliLogger.info('🔄 Starting remaining servers...');
|
|
437
|
+
await manager.startAllServers();
|
|
438
|
+
const newStatus = manager.getSystemStatus();
|
|
439
|
+
cliLogger.info(`✅ All ${newStatus.running}/${newStatus.total} MCP servers running`);
|
|
440
|
+
}
|
|
441
|
+
else {
|
|
442
|
+
cliLogger.info(`✅ All ${systemStatus.running} MCP servers already running`);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
catch (error) {
|
|
446
|
+
cliLogger.warn('⚠️ Could not auto-start MCP servers:', error instanceof Error ? error.message : error);
|
|
447
|
+
cliLogger.info('💡 You may need to run "npm run mcp:start" manually');
|
|
448
|
+
}
|
|
449
|
+
}
|
|
420
450
|
// Launch Claude Code with MCP config and skip permissions to avoid raw mode issues
|
|
421
451
|
const claudeArgs = hasMcpConfig
|
|
422
452
|
? ['--mcp-config', '.mcp.json', '.', '--dangerously-skip-permissions']
|
|
@@ -643,9 +643,15 @@ class ServiceNowDeploymentMCP {
|
|
|
643
643
|
has_preview: true,
|
|
644
644
|
category: args.category || 'custom',
|
|
645
645
|
});
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
646
|
+
// ONLY set success if the operation actually succeeded
|
|
647
|
+
if (result?.success) {
|
|
648
|
+
deploymentMethod = 'direct_api';
|
|
649
|
+
deploymentSuccess = true;
|
|
650
|
+
this.logger.info('✅ Direct deployment successful');
|
|
651
|
+
}
|
|
652
|
+
else {
|
|
653
|
+
throw new Error(`Widget creation failed: ${result?.error || 'Unknown error'}`);
|
|
654
|
+
}
|
|
649
655
|
}
|
|
650
656
|
catch (error) {
|
|
651
657
|
directError = error;
|
|
@@ -706,8 +712,15 @@ class ServiceNowDeploymentMCP {
|
|
|
706
712
|
roles: '',
|
|
707
713
|
servicenow: false
|
|
708
714
|
});
|
|
709
|
-
|
|
710
|
-
|
|
715
|
+
// ONLY set success if the operation actually succeeded
|
|
716
|
+
if (result?.success) {
|
|
717
|
+
deploymentMethod = 'table_record';
|
|
718
|
+
deploymentSuccess = true;
|
|
719
|
+
this.logger.info('✅ Fallback deployment successful');
|
|
720
|
+
}
|
|
721
|
+
else {
|
|
722
|
+
throw new Error(`Table record creation failed: ${result?.error || 'Unknown error'}`);
|
|
723
|
+
}
|
|
711
724
|
// createRecord should already return a ServiceNowAPIResponse structure
|
|
712
725
|
// No need to wrap it again
|
|
713
726
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.9",
|
|
4
4
|
"description": "Snow-Flow: ServiceNow Advanced Intelligence Platform - 100+ real MCP tools with AI-powered swarm orchestration and neural networks. Dynamic task categorization using AI. Machine learning for incident classification, change risk prediction, and anomaly detection. Zero Mock Data, 100% Real API Integration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "commonjs",
|