snow-flow 1.1.51 → 1.1.53

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 CHANGED
@@ -1259,29 +1259,398 @@ async function createReadmeFiles(targetDir) {
1259
1259
  // Only create README.md if it doesn't exist already
1260
1260
  const readmePath = (0, path_1.join)(targetDir, 'README.md');
1261
1261
  if (!(0, fs_2.existsSync)(readmePath)) {
1262
- const mainReadme = `# Snow-Flow Project
1262
+ const mainReadme = `# Snow-Flow: Multi-Agent ServiceNow Development Platform 🚀
1263
+
1264
+ Snow-Flow is a powerful multi-agent AI platform that revolutionizes ServiceNow development through intelligent automation, natural language processing, and autonomous deployment capabilities. Built with 11 specialized MCP (Model Context Protocol) servers, Snow-Flow enables developers to create, manage, and deploy ServiceNow artifacts using simple natural language commands.
1265
+
1266
+ ## 🆕 What's New in v1.1.51
1267
+
1268
+ ### đŸŽ¯ CRITICAL FIXES - All User Issues Resolved!
1269
+ - **ROOT CAUSE SOLVED**: Flow Designer validation failures completely eliminated
1270
+ - **JSON SCHEMA FLEXIBILITY**: Accepts both "steps" and "activities" arrays with auto-conversion
1271
+ - **DOCUMENTATION SYNC**: Init command now creates comprehensive CLAUDE.md (373 lines vs 15)
1272
+ - **COMPLETE GUIDE**: New users get full Snow-Flow development environment from day one
1273
+
1274
+ ### 🧠 Intelligent Error Recovery (v1.1.48-1.1.49)
1275
+ - **AUTOMATIC FALLBACKS**: Flow Designer → Business Rule conversion when deployment fails
1276
+ - **SMART SESSIONS**: Update Sets auto-create when none exist - no more "no active session" errors
1277
+ - **ZERO MANUAL WORK**: All systematic errors from user feedback now automatically handled
1278
+ - **COMPREHENSIVE TESTING**: Enhanced flow testing with Business Rule fallback detection
1279
+
1280
+ ### 🚀 Enhanced Swarm Command (v1.1.42+)
1281
+ Most intelligent features are now **enabled by default** - ÊÊn command voor alles!
1282
+ - **DEFAULT TRUE**: \`--smart-discovery\`, \`--live-testing\`, \`--auto-deploy\`, \`--auto-rollback\`, \`--shared-memory\`, \`--progress-monitoring\`
1283
+ - **INTELLIGENT ORCHESTRATION**: Uses \`snow_orchestrate_development\` MCP tool automatically
1284
+ - **NO FLAGS NEEDED**: Just run \`snow-flow swarm "create widget"\` and everything works!
1285
+
1286
+ ### 🔍 Real-Time ServiceNow Integration (v1.1.41+)
1287
+ - **LIVE VALIDATION**: \`snow_validate_live_connection\` - real-time auth and permission checking
1288
+ - **SMART PREVENTION**: \`snow_discover_existing_flows\` - prevents duplicate flows
1289
+ - **LIVE TESTING**: \`snow_test_flow_execution\` - real flow testing in live instances
1290
+ - **BATCH VALIDATION**: \`batch_deployment_validator\` - comprehensive multi-artifact validation
1291
+ - **AUTO ROLLBACK**: \`deployment_rollback_manager\` - automatic rollback with backup creation
1292
+
1293
+ ## 🌟 Key Features
1294
+
1295
+ ### 🤖 11 Specialized MCP Servers
1296
+ Each server provides autonomous capabilities for different aspects of ServiceNow development:
1297
+
1298
+ 1. **Deployment MCP** - Autonomous widget, flow, and application deployment
1299
+ 2. **Flow Composer MCP** - Natural language flow creation with intelligent analysis
1300
+ 3. **Update Set MCP** - Professional change tracking and deployment management
1301
+ 4. **Intelligent MCP** - AI-powered artifact discovery and editing
1302
+ 5. **Graph Memory MCP** - Relationship tracking and impact analysis
1303
+ 6. **Platform Development MCP** - Development workflow automation
1304
+ 7. **Integration MCP** - Third-party system integration
1305
+ 8. **Operations MCP** - Operations and monitoring management
1306
+ 9. **Automation MCP** - Workflow and process automation
1307
+ 10. **Security & Compliance MCP** - Security auditing and compliance
1308
+ 11. **Reporting & Analytics MCP** - Data analysis and reporting
1309
+
1310
+ ### đŸŽ¯ Core Capabilities
1311
+
1312
+ - **Natural Language Processing**: Create complex ServiceNow artifacts using plain English/Dutch commands
1313
+ - **Intelligent Decision Making**: Automatically determines optimal architecture (flow vs subflow)
1314
+ - **Zero Configuration**: All values dynamically discovered from your ServiceNow instance
1315
+ - **Autonomous Deployment**: Direct deployment to ServiceNow with automatic error handling
1316
+ - **Update Set Management**: Professional change tracking like ServiceNow pros use
1317
+ - **Global Scope Strategy**: Intelligent scope selection with fallback mechanisms
1318
+ - **Multi-Agent Coordination**: Parallel execution for complex tasks
1319
+
1320
+ ## 🚀 Quick Start
1321
+
1322
+ ### Prerequisites
1323
+ - Node.js 18+ and npm
1324
+ - ServiceNow instance with admin access
1325
+ - OAuth application configured in ServiceNow
1326
+
1327
+ ### Installation
1263
1328
 
1264
- This is a Snow-Flow project for ServiceNow multi-agent development.
1329
+ \`\`\`bash
1330
+ # Install Snow-Flow globally
1331
+ npm install -g snow-flow
1332
+
1333
+ # Initialize Snow-Flow in your project directory
1334
+ snow-flow init --sparc
1335
+ \`\`\`
1336
+
1337
+ #### Alternative: Install from source
1338
+ \`\`\`bash
1339
+ # Clone the repository
1340
+ git clone https://github.com/groeimetai/snow-flow.git
1341
+ cd snow-flow
1342
+
1343
+ # Install dependencies
1344
+ npm install
1345
+
1346
+ # Build the project
1347
+ npm run build
1348
+
1349
+ # Link globally (optional)
1350
+ npm link
1351
+ \`\`\`
1352
+
1353
+ ### Configuration
1354
+
1355
+ 1. Create a \`.env\` file in the project root:
1356
+ \`\`\`env
1357
+ SNOW_INSTANCE=your-instance.service-now.com
1358
+ SNOW_CLIENT_ID=your-oauth-client-id
1359
+ SNOW_CLIENT_SECRET=your-oauth-client-secret
1360
+ SNOW_USERNAME=your-username
1361
+ SNOW_PASSWORD=your-password
1362
+ \`\`\`
1363
+
1364
+ 2. Set up OAuth in ServiceNow (see [SERVICENOW-OAUTH-SETUP.md](./SERVICENOW-OAUTH-SETUP.md))
1365
+
1366
+ 3. Authenticate with ServiceNow:
1367
+ \`\`\`bash
1368
+ snow-flow auth login
1369
+ \`\`\`
1370
+
1371
+ ### đŸŽ¯ MCP Server Activation (v1.1.25+)
1372
+
1373
+ Snow-Flow now includes **automatic MCP server activation** for Claude Code! During initialization, you'll be prompted to automatically start Claude Code with all 11 MCP servers pre-loaded:
1374
+
1375
+ \`\`\`bash
1376
+ snow-flow init --sparc
1377
+
1378
+ # You'll see:
1379
+ # 🚀 Would you like to start Claude Code with MCP servers automatically? (Y/n)
1380
+ # Press Y to launch Claude Code with all MCP servers ready to use!
1381
+ \`\`\`
1382
+
1383
+ The MCP servers are automatically:
1384
+ - ✅ Configured with correct paths for global npm installations
1385
+ - ✅ Registered in Claude Code's settings
1386
+ - ✅ Activated without manual approval steps
1387
+ - ✅ Ready to use immediately after initialization
1388
+
1389
+ If you need to manually activate MCP servers later:
1390
+ \`\`\`bash
1391
+ # For Mac/Linux:
1392
+ claude --mcp-config .mcp.json .
1393
+
1394
+ # For Windows:
1395
+ claude.exe --mcp-config .mcp.json .
1396
+ \`\`\`
1265
1397
 
1266
- ## Quick Start
1398
+ ## 💡 Usage Examples
1267
1399
 
1268
- 1. Configure your ServiceNow credentials in .env
1269
- 2. Run: \`snow-flow auth login\`
1270
- 3. Start your first swarm: \`snow-flow swarm "create a widget for incident management"\`
1400
+ ### Create a Complex Flow with Natural Language
1401
+ \`\`\`bash
1402
+ snow-flow sparc "Create an approval workflow for iPhone 6 orders that notifies managers, creates tasks, and updates inventory"
1403
+ \`\`\`
1271
1404
 
1272
- ## Project Structure
1405
+ ### Deploy a Widget Directly to ServiceNow
1406
+ \`\`\`bash
1407
+ snow-flow sparc "Create and deploy a widget that shows all critical incidents with real-time updates"
1408
+ \`\`\`
1273
1409
 
1274
- - \`.claude/\` - Claude configuration and commands
1275
- - \`.swarm/\` - Swarm coordination and memory
1276
- - \`memory/\` - Persistent memory for agents
1277
- - \`coordination/\` - Agent coordination data
1278
- - \`servicenow/\` - Generated ServiceNow artifacts
1410
+ ### Start a Multi-Agent Swarm for Complex Projects
1411
+ \`\`\`bash
1412
+ # Most intelligent features are enabled by default!
1413
+ snow-flow swarm "Build a complete incident management system with dashboard, workflows, and notifications"
1414
+
1415
+ # Default settings:
1416
+ # ✅ --smart-discovery (true) - Reuses existing artifacts
1417
+ # ✅ --live-testing (true) - Tests in real-time
1418
+ # ✅ --auto-deploy (true) - Deploys automatically (safe with update sets)
1419
+ # ✅ --auto-rollback (true) - Rollbacks on failures
1420
+ # ✅ --shared-memory (true) - Agents share context
1421
+ # ✅ --progress-monitoring (true) - Real-time status
1422
+
1423
+ # Add --auto-permissions to enable automatic permission escalation
1424
+ snow-flow swarm "Create enterprise workflow" --auto-permissions
1425
+
1426
+ # Disable specific features with --no- prefix
1427
+ snow-flow swarm "Test workflow" --no-auto-deploy --no-live-testing
1428
+ \`\`\`
1429
+
1430
+ ### Intelligent Artifact Discovery
1431
+ \`\`\`bash
1432
+ snow-flow sparc "Find and modify the approval workflow to add an extra approval step for orders over $1000"
1433
+ \`\`\`
1434
+
1435
+ ### Create Flows in Dutch
1436
+ \`\`\`bash
1437
+ snow-flow sparc "Maak een flow voor het automatisch toewijzen van incidenten aan de juiste groep op basis van categorie"
1438
+ \`\`\`
1439
+
1440
+ ## đŸ› ī¸ Advanced Features
1441
+
1442
+ ### Flow vs Subflow Intelligence
1443
+ Snow-Flow automatically analyzes your requirements and decides whether to create a main flow or break it into reusable subflows:
1444
+ - Complexity analysis
1445
+ - Reusability assessment
1446
+ - Performance optimization
1447
+ - Maintainability considerations
1448
+
1449
+ ### Update Set Management
1450
+ Professional change tracking just like ServiceNow developers use:
1451
+ \`\`\`bash
1452
+ # Create a new update set for your feature
1453
+ snow-flow sparc "Create update set for new approval features"
1279
1454
 
1280
- ## Documentation
1455
+ # All subsequent changes are automatically tracked
1456
+ snow-flow sparc "Add approval widget to portal"
1457
+ \`\`\`
1458
+
1459
+ ### Global Scope Strategy
1460
+ Intelligent deployment scope selection:
1461
+ - Automatic permission validation
1462
+ - Fallback mechanisms for restricted environments
1463
+ - Environment-aware deployment (dev/test/prod)
1464
+
1465
+ ### Template Matching
1466
+ Recognizes common patterns and applies best practices:
1467
+ - Approval workflows
1468
+ - Fulfillment processes
1469
+ - Notification systems
1470
+ - Integration patterns
1471
+
1472
+ ## 🔧 New MCP Tools (v1.1.44+)
1473
+
1474
+ ### Catalog Item Search with Fuzzy Matching
1475
+ Find catalog items even when you don't know the exact name:
1476
+ \`\`\`javascript
1477
+ // In Claude Code with MCP tools
1478
+ snow_catalog_item_search({
1479
+ query: "iPhone", // Finds iPhone 6S, iPhone 7, etc.
1480
+ fuzzy_match: true, // Intelligent variations
1481
+ category_filter: "mobile devices",
1482
+ include_variables: true // Get catalog variables
1483
+ });
1484
+ \`\`\`
1485
+
1486
+ ### Flow Testing with Mock Data
1487
+ Test flows without affecting production data:
1488
+ \`\`\`javascript
1489
+ snow_test_flow_with_mock({
1490
+ flow_id: "equipment_provisioning_flow",
1491
+ create_test_user: true, // Auto-creates test user
1492
+ mock_catalog_items: true, // Creates test items
1493
+ mock_catalog_data: [
1494
+ {
1495
+ name: "Test iPhone 6S",
1496
+ price: "699.00"
1497
+ }
1498
+ ],
1499
+ simulate_approvals: true, // Auto-approves
1500
+ cleanup_after_test: true // Removes test data
1501
+ });
1502
+ \`\`\`
1503
+
1504
+ ### Direct Catalog-Flow Linking
1505
+ Link catalog items directly to flows for automated fulfillment:
1506
+ \`\`\`javascript
1507
+ snow_link_catalog_to_flow({
1508
+ catalog_item_id: "iPhone 6S",
1509
+ flow_id: "mobile_provisioning_flow",
1510
+ link_type: "flow_catalog_process", // Modern approach
1511
+ variable_mapping: [
1512
+ {
1513
+ catalog_variable: "phone_model",
1514
+ flow_input: "device_type"
1515
+ },
1516
+ {
1517
+ catalog_variable: "user_department",
1518
+ flow_input: "department"
1519
+ }
1520
+ ],
1521
+ trigger_condition: 'current.stage == "request_approved"',
1522
+ execution_options: {
1523
+ run_as: "system",
1524
+ wait_for_completion: true
1525
+ },
1526
+ test_link: true // Creates test request
1527
+ });
1528
+ \`\`\`
1529
+
1530
+ ### Bulk Deployment
1531
+ Deploy multiple artifacts in a single transaction:
1532
+ \`\`\`javascript
1533
+ snow_bulk_deploy({
1534
+ artifacts: [
1535
+ { type: "widget", data: widgetData },
1536
+ { type: "flow", data: flowData },
1537
+ { type: "script", data: scriptData }
1538
+ ],
1539
+ transaction_mode: true, // All-or-nothing deployment
1540
+ parallel: true, // Deploy simultaneously
1541
+ dry_run: false
1542
+ });
1543
+ \`\`\`
1544
+
1545
+ ## 📁 Project Structure
1546
+
1547
+ \`\`\`
1548
+ snow-flow/
1549
+ ├── src/
1550
+ │ ├── mcp/ # 11 MCP server implementations
1551
+ │ ├── orchestrator/ # Flow composition and intelligence
1552
+ │ ├── strategies/ # Deployment and scope strategies
1553
+ │ ├── api/ # ServiceNow API integration
1554
+ │ ├── managers/ # Resource and scope management
1555
+ │ └── utils/ # Utilities and helpers
1556
+ ├── .snow-flow/ # Snow-Flow configuration
1557
+ ├── .claude/ # Claude configuration
1558
+ ├── memory/ # Persistent agent memory
1559
+ └── coordination/ # Multi-agent coordination
1560
+ \`\`\`
1561
+
1562
+ ## 🔧 Development Commands
1563
+
1564
+ \`\`\`bash
1565
+ # Run tests
1566
+ npm test
1567
+
1568
+ # Run linting
1569
+ npm run lint
1570
+
1571
+ # Type checking
1572
+ npm run typecheck
1573
+
1574
+ # Development mode
1575
+ npm run dev
1576
+
1577
+ # Build for production
1578
+ npm run build
1579
+ \`\`\`
1580
+
1581
+ ## 📚 Documentation
1582
+
1583
+ - [MCP Server Documentation](./MCP_SERVERS.md) - Detailed info on all 11 MCP servers
1584
+ - [OAuth Setup Guide](./SERVICENOW-OAUTH-SETUP.md) - ServiceNow OAuth configuration
1585
+ - [Flow Composer Guide](./ENHANCED_FLOW_COMPOSER_DOCUMENTATION.md) - Advanced flow creation
1586
+ - [Update Set Guide](./UPDATE_SET_DEPLOYMENT_GUIDE.md) - Professional change management
1587
+ - [API Integration Guide](./API_INTEGRATION_GUIDE.md) - ServiceNow API details
1588
+
1589
+ ## 🤝 Contributing
1590
+
1591
+ We welcome contributions! Please see our contributing guidelines (coming soon).
1592
+
1593
+ ## 🔒 Security
1594
+
1595
+ - All credentials stored securely in environment variables
1596
+ - OAuth 2.0 authentication with ServiceNow
1597
+ - No hardcoded values - everything discovered dynamically
1598
+ - Secure token management with automatic refresh
1599
+
1600
+ ## đŸŽ¯ Use Cases
1601
+
1602
+ ### For ServiceNow Developers
1603
+ - Rapidly prototype flows and workflows
1604
+ - Automate repetitive development tasks
1605
+ - Ensure consistency across implementations
1606
+ - Reduce development time by 80%
1607
+
1608
+ ### For ServiceNow Architects
1609
+ - Validate architectural decisions
1610
+ - Ensure best practices are followed
1611
+ - Analyze impact of changes
1612
+ - Optimize performance and maintainability
1613
+
1614
+ ### For ServiceNow Administrators
1615
+ - Quick deployments and updates
1616
+ - Professional change tracking
1617
+ - Automated testing and validation
1618
+ - Simplified migration between instances
1619
+
1620
+ ## đŸšĻ Roadmap
1621
+
1622
+ - [ ] Visual flow designer integration
1623
+ - [ ] Enhanced Neo4j graph visualization
1624
+ - [ ] Multi-instance synchronization
1625
+ - [ ] AI-powered code review
1626
+ - [ ] Automated testing framework
1627
+ - [ ] Performance optimization recommendations
1628
+
1629
+ ## 🆕 What's New in v1.1.25
1630
+
1631
+ ### Automatic MCP Server Activation đŸŽ¯
1632
+ - **Interactive Prompt**: During \`snow-flow init --sparc\`, you're now prompted to automatically start Claude Code with all MCP servers
1633
+ - **Zero Manual Steps**: No more manual MCP approval in Claude Code - servers load automatically using \`claude --mcp-config\`
1634
+ - **Cross-Platform Support**: Works on Mac, Linux, and Windows with platform-specific activation scripts
1635
+ - **Instant Availability**: All 11 ServiceNow MCP servers are immediately available in Claude Code after initialization
1636
+
1637
+ ### Previous Updates
1638
+ - **v1.1.24**: Added \`snow-flow mcp debug\` command for troubleshooting MCP configurations
1639
+ - **v1.1.23**: Fixed .npmignore to include essential .claude configuration files
1640
+ - **v1.1.22**: Verified global npm installation correctly registers all MCP servers
1641
+ - **v1.1.20**: Added enabledMcpjsonServers to ensure MCP visibility in Claude Code
1642
+
1643
+ ## 📝 License
1644
+
1645
+ This project is licensed under the MIT License - see the LICENSE file for details.
1646
+
1647
+ ## 🙏 Acknowledgments
1648
+
1649
+ Built with the power of Claude AI and the ServiceNow platform. Special thanks to the ServiceNow developer community for inspiration and best practices.
1650
+
1651
+ ---
1281
1652
 
1282
- - Configuration: \`.claude/config.json\`
1283
- - Memory system: \`.swarm/memory.db\`
1284
- - Project structure: \`.claude/commands/\`
1653
+ **Ready to revolutionize your ServiceNow development?** Start with \`snow-flow init --sparc\` and experience the future of ServiceNow automation! 🚀
1285
1654
  `;
1286
1655
  await fs_1.promises.writeFile(readmePath, mainReadme);
1287
1656
  }