snow-flow 1.3.1 → 1.3.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/.claude-flow/queen/queen-memory.db +0 -0
- package/.env.example +249 -14
- package/CLAUDE.md +185 -24
- package/README.md +55 -5
- package/dist/api/error-handling.js +898 -4
- package/dist/api/performance-optimizer.js +3 -2
- package/dist/cli.js +590 -200
- package/dist/config/snow-flow-config.js +320 -8
- package/dist/health/system-health.js +288 -21
- package/dist/mcp/http-transport-wrapper.js +65 -4
- package/dist/mcp/servicenow-automation-mcp-refactored.js +90 -9
- package/dist/mcp/servicenow-deployment-mcp-refactored.js +151 -2
- package/dist/mcp/servicenow-deployment-mcp.js +828 -15
- package/dist/mcp/servicenow-integration-mcp-refactored.js +100 -9
- package/dist/mcp/servicenow-intelligent-mcp.js +198 -7
- package/dist/mcp/servicenow-memory-mcp.js +2 -1
- package/dist/mcp/servicenow-operations-mcp-refactored.js +3 -2
- package/dist/mcp/servicenow-xml-flow-mcp.js +671 -0
- package/dist/mcp/shared/base-mcp-server.js +1356 -8
- package/dist/mcp/shared/mcp-resource-manager.js +304 -0
- package/dist/queen/parallel-agent-engine.js +26 -8
- package/dist/queen/servicenow-queen.js +47 -44
- package/dist/sparc/sparc-help.js +37 -26
- package/dist/sparc/team-sparc.js +60 -16
- package/dist/utils/action-type-cache.js +2 -1
- package/dist/utils/mcp-config-manager.js +7 -3
- package/dist/utils/mcp-server-manager.js +7 -3
- package/dist/utils/servicenow-client.js +134 -107
- package/dist/utils/servicenow-id-generator.js +171 -0
- package/dist/utils/snow-oauth.js +13 -8
- package/dist/utils/widget-template-generator.js +1690 -0
- package/dist/utils/xml-first-flow-generator.js +473 -0
- package/flow-update-sets/flow_build_automated_approval_flow_with_notifications_flow.xml +203 -0
- package/flow-update-sets/flow_create_approval_flow_for_equipment_requests_flow.xml +206 -0
- package/flow-update-sets/flow_create_equipment_approval_flow_with_manager_approv_flow.xml +254 -0
- package/flow-update-sets/iphone_15_pro_approval_flow.xml +203 -0
- package/flow-update-sets/test_iphone_approval_flow_flow.xml +303 -0
- package/package.json +2 -1
- package/test-config.js +55 -0
- package/test-real-monitoring.js +184 -0
|
Binary file
|
package/.env.example
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
# ===========================================
|
|
1
2
|
# ServiceNow OAuth Configuration
|
|
3
|
+
# ===========================================
|
|
2
4
|
# Replace these values with your actual ServiceNow instance and OAuth credentials
|
|
3
5
|
|
|
4
6
|
# ServiceNow Instance URL (without https://)
|
|
@@ -12,26 +14,235 @@ SNOW_CLIENT_ID=your-oauth-client-id
|
|
|
12
14
|
# OAuth Client Secret from ServiceNow Application Registry
|
|
13
15
|
SNOW_CLIENT_SECRET=your-oauth-client-secret
|
|
14
16
|
|
|
15
|
-
# Optional:
|
|
16
|
-
#
|
|
17
|
+
# Optional: Basic authentication (not recommended for production)
|
|
18
|
+
# SNOW_USERNAME=your-username
|
|
19
|
+
# SNOW_PASSWORD=your-password
|
|
20
|
+
|
|
21
|
+
# Authentication type: oauth (default) or basic
|
|
22
|
+
# SNOW_AUTH_TYPE=oauth
|
|
23
|
+
|
|
24
|
+
# API version to use (default: now)
|
|
25
|
+
# SNOW_API_VERSION=now
|
|
26
|
+
|
|
27
|
+
# ServiceNow request timeout in milliseconds (default: 60000 = 60s)
|
|
28
|
+
# SNOW_REQUEST_TIMEOUT=60000
|
|
29
|
+
|
|
30
|
+
# Max retry attempts for failed requests (default: 3)
|
|
31
|
+
# SNOW_MAX_RETRIES=3
|
|
32
|
+
|
|
33
|
+
# Delay between retry attempts in milliseconds (default: 2000 = 2s)
|
|
34
|
+
# SNOW_RETRY_DELAY=2000
|
|
35
|
+
|
|
36
|
+
# OAuth redirect configuration
|
|
37
|
+
# Host for OAuth callback (default: localhost)
|
|
38
|
+
# SNOW_REDIRECT_HOST=localhost
|
|
39
|
+
|
|
40
|
+
# Port for OAuth callback (default: 3005)
|
|
41
|
+
# SNOW_REDIRECT_PORT=3005
|
|
42
|
+
|
|
43
|
+
# Path for OAuth callback (default: /callback)
|
|
44
|
+
# SNOW_REDIRECT_PATH=/callback
|
|
45
|
+
|
|
46
|
+
# ===========================================
|
|
47
|
+
# Snow-Flow System Configuration
|
|
48
|
+
# ===========================================
|
|
49
|
+
|
|
50
|
+
# Environment: development, staging, production (default: development)
|
|
51
|
+
# SNOW_FLOW_ENV=development
|
|
52
|
+
|
|
53
|
+
# Log level: debug, info, warn, error (default: info)
|
|
54
|
+
# SNOW_FLOW_LOG_LEVEL=info
|
|
55
|
+
|
|
56
|
+
# Data directory for configuration, cache, logs (default: ~/.snow-flow)
|
|
57
|
+
# SNOW_FLOW_DATA_DIR=/path/to/custom/data/dir
|
|
58
|
+
|
|
59
|
+
# Maximum concurrent operations (default: 10)
|
|
60
|
+
# SNOW_FLOW_MAX_CONCURRENT_OPS=10
|
|
61
|
+
|
|
62
|
+
# Session timeout in milliseconds (default: 3600000 = 1 hour)
|
|
63
|
+
# SNOW_FLOW_SESSION_TIMEOUT=3600000
|
|
64
|
+
|
|
65
|
+
# ===========================================
|
|
66
|
+
# Agent Configuration
|
|
67
|
+
# ===========================================
|
|
68
|
+
|
|
69
|
+
# Maximum number of worker agents (default: 10)
|
|
70
|
+
# SNOW_FLOW_MAX_WORKER_AGENTS=10
|
|
71
|
+
|
|
72
|
+
# Agent spawn timeout in milliseconds (default: 30000 = 30s)
|
|
73
|
+
# SNOW_FLOW_SPAWN_TIMEOUT=30000
|
|
74
|
+
|
|
75
|
+
# Agent coordination interval in milliseconds (default: 5000 = 5s)
|
|
76
|
+
# SNOW_FLOW_COORDINATION_INTERVAL=5000
|
|
77
|
+
|
|
78
|
+
# Maximum retry attempts for agent operations (default: 3)
|
|
79
|
+
# SNOW_FLOW_RETRY_ATTEMPTS=3
|
|
80
|
+
|
|
81
|
+
# Worker agent heartbeat interval in milliseconds (default: 10000 = 10s)
|
|
82
|
+
# SNOW_FLOW_HEARTBEAT_INTERVAL=10000
|
|
83
|
+
|
|
84
|
+
# Task timeout for worker agents in milliseconds (default: 300000 = 5 minutes)
|
|
85
|
+
# SNOW_FLOW_TASK_TIMEOUT=300000
|
|
86
|
+
|
|
87
|
+
# Maximum memory usage per worker agent in MB (default: 500)
|
|
88
|
+
# SNOW_FLOW_MAX_MEMORY_USAGE=500
|
|
89
|
+
|
|
90
|
+
# Auto-shutdown idle time in milliseconds (default: 600000 = 10 minutes)
|
|
91
|
+
# SNOW_FLOW_AUTO_SHUTDOWN_IDLE=600000
|
|
92
|
+
|
|
93
|
+
# ===========================================
|
|
94
|
+
# MCP Server Configuration
|
|
95
|
+
# ===========================================
|
|
96
|
+
|
|
97
|
+
# MCP server ports (defaults: 3001, 3002, 3003, 3004, 3005)
|
|
98
|
+
# MCP_DEPLOYMENT_PORT=3001
|
|
99
|
+
# MCP_INTELLIGENT_PORT=3002
|
|
100
|
+
# MCP_OPERATIONS_PORT=3003
|
|
101
|
+
# MCP_FLOW_COMPOSER_PORT=3004
|
|
102
|
+
# MCP_PLATFORM_DEV_PORT=3005
|
|
103
|
+
|
|
104
|
+
# MCP server host (default: localhost)
|
|
105
|
+
# MCP_HOST=localhost
|
|
106
|
+
|
|
107
|
+
# MCP transport timeout in milliseconds (default: 30000 = 30s)
|
|
108
|
+
# MCP_TIMEOUT=30000
|
|
109
|
+
|
|
110
|
+
# MCP retry attempts (default: 3)
|
|
111
|
+
# MCP_RETRY_ATTEMPTS=3
|
|
112
|
+
|
|
113
|
+
# MCP retry delay in milliseconds (default: 5000 = 5s)
|
|
114
|
+
# MCP_RETRY_DELAY=5000
|
|
115
|
+
|
|
116
|
+
# MCP authentication token expiry in milliseconds (default: 86400000 = 24 hours)
|
|
117
|
+
# MCP_AUTH_TOKEN_EXPIRY=86400000
|
|
118
|
+
|
|
119
|
+
# ===========================================
|
|
120
|
+
# Memory System Configuration
|
|
121
|
+
# ===========================================
|
|
122
|
+
|
|
123
|
+
# Database path for persistent memory (default: auto-generated in data dir)
|
|
124
|
+
# SNOW_FLOW_DB_PATH=/path/to/custom/memory.db
|
|
125
|
+
|
|
126
|
+
# Enable memory cache (default: true)
|
|
127
|
+
# SNOW_FLOW_CACHE_ENABLED=true
|
|
128
|
+
|
|
129
|
+
# Cache maximum size in MB (default: 100)
|
|
130
|
+
# SNOW_FLOW_CACHE_MAX_SIZE=100
|
|
131
|
+
|
|
132
|
+
# Cache TTL in milliseconds (default: 3600000 = 1 hour)
|
|
133
|
+
# SNOW_FLOW_CACHE_TTL=3600000
|
|
134
|
+
|
|
135
|
+
# Default TTL for memory entries in milliseconds (default: 86400000 = 24 hours)
|
|
136
|
+
# SNOW_FLOW_DEFAULT_TTL=86400000
|
|
137
|
+
|
|
138
|
+
# Session memory TTL in milliseconds (default: 86400000 = 24 hours)
|
|
139
|
+
# SNOW_FLOW_SESSION_TTL=86400000
|
|
140
|
+
|
|
141
|
+
# Artifact memory TTL in milliseconds (default: 604800000 = 7 days)
|
|
142
|
+
# SNOW_FLOW_ARTIFACT_TTL=604800000
|
|
143
|
+
|
|
144
|
+
# Metrics memory TTL in milliseconds (default: 2592000000 = 30 days)
|
|
145
|
+
# SNOW_FLOW_METRIC_TTL=2592000000
|
|
146
|
+
|
|
147
|
+
# Memory cleanup interval in milliseconds (default: 86400000 = 24 hours)
|
|
148
|
+
# SNOW_FLOW_CLEANUP_INTERVAL=86400000
|
|
149
|
+
|
|
150
|
+
# Memory retention in days (default: 30)
|
|
151
|
+
# SNOW_FLOW_RETENTION_DAYS=30
|
|
152
|
+
|
|
153
|
+
# ===========================================
|
|
154
|
+
# Monitoring Configuration
|
|
155
|
+
# ===========================================
|
|
156
|
+
|
|
157
|
+
# Enable performance monitoring (default: true)
|
|
158
|
+
# SNOW_FLOW_PERFORMANCE_ENABLED=true
|
|
159
|
+
|
|
160
|
+
# Performance monitoring sample rate 0.0-1.0 (default: 1.0 = 100%)
|
|
161
|
+
# SNOW_FLOW_SAMPLE_RATE=1.0
|
|
162
|
+
|
|
163
|
+
# Metrics retention in milliseconds (default: 604800000 = 7 days)
|
|
164
|
+
# SNOW_FLOW_METRICS_RETENTION=604800000
|
|
165
|
+
|
|
166
|
+
# Metrics aggregation interval in milliseconds (default: 300000 = 5 minutes)
|
|
167
|
+
# SNOW_FLOW_AGGREGATION_INTERVAL=300000
|
|
168
|
+
|
|
169
|
+
# Health check interval in milliseconds (default: 60000 = 1 minute)
|
|
170
|
+
# SNOW_FLOW_HEALTH_CHECK_INTERVAL=60000
|
|
171
|
+
|
|
172
|
+
# Memory usage threshold 0.0-1.0 (default: 0.8 = 80%)
|
|
173
|
+
# SNOW_FLOW_MEMORY_THRESHOLD=0.8
|
|
174
|
+
|
|
175
|
+
# CPU usage threshold 0.0-1.0 (default: 0.8 = 80%)
|
|
176
|
+
# SNOW_FLOW_CPU_THRESHOLD=0.8
|
|
177
|
+
|
|
178
|
+
# Error rate threshold 0.0-1.0 (default: 0.05 = 5%)
|
|
179
|
+
# SNOW_FLOW_ERROR_RATE_THRESHOLD=0.05
|
|
180
|
+
|
|
181
|
+
# Webhook URL for alerts (optional)
|
|
182
|
+
# SNOW_FLOW_WEBHOOK_URL=https://your-webhook-url.com/alerts
|
|
183
|
+
|
|
184
|
+
# Alert severity threshold: info, warn, error (default: warn)
|
|
185
|
+
# SNOW_FLOW_ALERT_SEVERITY=warn
|
|
186
|
+
|
|
187
|
+
# ===========================================
|
|
188
|
+
# Health Check Thresholds
|
|
189
|
+
# ===========================================
|
|
190
|
+
|
|
191
|
+
# Response time threshold in milliseconds (default: 5000 = 5s)
|
|
192
|
+
# SNOW_FLOW_RESPONSE_TIME_THRESHOLD=5000
|
|
193
|
+
|
|
194
|
+
# Health check memory threshold in MB (default: 1000)
|
|
195
|
+
# SNOW_FLOW_HEALTH_MEMORY_THRESHOLD=1000
|
|
196
|
+
|
|
197
|
+
# Queue size threshold (default: 100)
|
|
198
|
+
# SNOW_FLOW_QUEUE_SIZE_THRESHOLD=100
|
|
199
|
+
|
|
200
|
+
# ===========================================
|
|
201
|
+
# Feature Flags
|
|
202
|
+
# ===========================================
|
|
203
|
+
|
|
204
|
+
# Enable automatic permission escalation (default: false)
|
|
205
|
+
# SNOW_FLOW_AUTO_PERMISSIONS=false
|
|
206
|
+
|
|
207
|
+
# Enable smart artifact discovery and reuse (default: true)
|
|
208
|
+
# SNOW_FLOW_SMART_DISCOVERY=true
|
|
209
|
+
|
|
210
|
+
# Enable live testing during development (default: true)
|
|
211
|
+
# SNOW_FLOW_LIVE_TESTING=true
|
|
212
|
+
|
|
213
|
+
# Enable automatic deployment when ready (default: true)
|
|
214
|
+
# SNOW_FLOW_AUTO_DEPLOY=true
|
|
215
|
+
|
|
216
|
+
# Enable automatic rollback on failures (default: true)
|
|
217
|
+
# SNOW_FLOW_AUTO_ROLLBACK=true
|
|
218
|
+
|
|
219
|
+
# Enable shared memory between agents (default: true)
|
|
220
|
+
# SNOW_FLOW_SHARED_MEMORY=true
|
|
221
|
+
|
|
222
|
+
# Enable real-time progress monitoring (default: true)
|
|
223
|
+
# SNOW_FLOW_PROGRESS_MONITORING=true
|
|
224
|
+
|
|
225
|
+
# Enable neural pattern recognition (default: false)
|
|
226
|
+
# SNOW_FLOW_NEURAL_PATTERNS=false
|
|
227
|
+
|
|
228
|
+
# Enable cognitive analysis features (default: false)
|
|
229
|
+
# SNOW_FLOW_COGNITIVE_ANALYSIS=false
|
|
17
230
|
|
|
18
231
|
# ===========================================
|
|
19
|
-
#
|
|
232
|
+
# Legacy Configuration (for backwards compatibility)
|
|
20
233
|
# ===========================================
|
|
21
234
|
|
|
22
|
-
#
|
|
23
|
-
SNOW_FLOW_DEBUG=false
|
|
235
|
+
# Legacy debug flag (use SNOW_FLOW_LOG_LEVEL=debug instead)
|
|
236
|
+
# SNOW_FLOW_DEBUG=false
|
|
24
237
|
|
|
25
|
-
#
|
|
26
|
-
SNOW_FLOW_STRATEGY=development
|
|
238
|
+
# Legacy strategy flag (use swarm command options instead)
|
|
239
|
+
# SNOW_FLOW_STRATEGY=development
|
|
27
240
|
|
|
28
|
-
#
|
|
29
|
-
SNOW_FLOW_MAX_AGENTS=5
|
|
241
|
+
# Legacy max agents flag (use swarm command options instead)
|
|
242
|
+
# SNOW_FLOW_MAX_AGENTS=5
|
|
30
243
|
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
# Default: 60 minutes
|
|
34
|
-
SNOW_FLOW_TIMEOUT_MINUTES=0
|
|
244
|
+
# Legacy timeout flag (use SNOW_FLOW_SESSION_TIMEOUT instead)
|
|
245
|
+
# SNOW_FLOW_TIMEOUT_MINUTES=0
|
|
35
246
|
|
|
36
247
|
# ===========================================
|
|
37
248
|
# How to Set Up ServiceNow OAuth
|
|
@@ -43,7 +254,31 @@ SNOW_FLOW_TIMEOUT_MINUTES=0
|
|
|
43
254
|
# - Name: Snow-Flow Development
|
|
44
255
|
# - Client ID: (will be generated)
|
|
45
256
|
# - Client Secret: (will be generated)
|
|
46
|
-
# - Redirect URL: http://localhost:
|
|
257
|
+
# - Redirect URL: http://localhost:3005/callback
|
|
47
258
|
# - Grant Type: Authorization Code
|
|
259
|
+
# - Scopes: useraccount write admin
|
|
48
260
|
# 5. Copy the Client ID and Client Secret to this file
|
|
49
261
|
# 6. Run: snow-flow auth login
|
|
262
|
+
|
|
263
|
+
# ===========================================
|
|
264
|
+
# Environment-Specific Examples
|
|
265
|
+
# ===========================================
|
|
266
|
+
|
|
267
|
+
# Development Environment (high logging, low timeouts)
|
|
268
|
+
# SNOW_FLOW_ENV=development
|
|
269
|
+
# SNOW_FLOW_LOG_LEVEL=debug
|
|
270
|
+
# SNOW_REQUEST_TIMEOUT=30000
|
|
271
|
+
# SNOW_FLOW_PERFORMANCE_ENABLED=true
|
|
272
|
+
|
|
273
|
+
# Production Environment (optimized for performance)
|
|
274
|
+
# SNOW_FLOW_ENV=production
|
|
275
|
+
# SNOW_FLOW_LOG_LEVEL=warn
|
|
276
|
+
# SNOW_REQUEST_TIMEOUT=60000
|
|
277
|
+
# SNOW_FLOW_MAX_CONCURRENT_OPS=20
|
|
278
|
+
# SNOW_FLOW_PERFORMANCE_ENABLED=false
|
|
279
|
+
|
|
280
|
+
# Testing Environment (isolated and controlled)
|
|
281
|
+
# SNOW_FLOW_ENV=staging
|
|
282
|
+
# SNOW_FLOW_LOG_LEVEL=info
|
|
283
|
+
# SNOW_FLOW_AUTO_DEPLOY=false
|
|
284
|
+
# SNOW_FLOW_AUTO_ROLLBACK=true
|
package/CLAUDE.md
CHANGED
|
@@ -38,18 +38,36 @@ const gapAnalysis = await analyzeGaps("your objective", mcpTools, logger, {
|
|
|
38
38
|
console.log('🧠 Queen Agent spawning 6+ parallel agents for 2.8x faster development...');
|
|
39
39
|
|
|
40
40
|
// 5. MANDATORY: Real ServiceNow deployment
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
});
|
|
41
|
+
// For flows: Use XML-first approach (automatic detection)
|
|
42
|
+
if (isFlowDesignerTask) {
|
|
43
|
+
// XML generation and deployment
|
|
44
|
+
const xmlResult = generateProductionFlowXML(flowDefinition);
|
|
45
|
+
|
|
46
|
+
// Option 1: Auto-deploy XML (recommended)
|
|
47
|
+
const deployment = await snow_deploy({
|
|
48
|
+
type: "xml_update_set",
|
|
49
|
+
xml_file_path: xmlResult.filePath,
|
|
50
|
+
auto_preview: true,
|
|
51
|
+
auto_commit: true
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// Option 2: Manual deployment command
|
|
55
|
+
console.log(`Deploy with: snow-flow deploy-xml "${xmlResult.filePath}"`);
|
|
56
|
+
} else {
|
|
57
|
+
// For widgets, applications, scripts: Use standard MCP deployment
|
|
58
|
+
const deployment = await snow_deploy({
|
|
59
|
+
type: "widget|application|script",
|
|
60
|
+
config: { /* your config */ },
|
|
61
|
+
auto_update_set: true // Always track changes
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// Track in Update Set
|
|
65
|
+
await snow_update_set_add_artifact({
|
|
66
|
+
type: deployment.type,
|
|
67
|
+
sys_id: deployment.result.sys_id,
|
|
68
|
+
name: deployment.result.name
|
|
69
|
+
});
|
|
70
|
+
}
|
|
53
71
|
```
|
|
54
72
|
|
|
55
73
|
### 🚫 FORBIDDEN ACTIONS
|
|
@@ -157,15 +175,16 @@ snow-flow swarm "build approval workflow for equipment requests"
|
|
|
157
175
|
snow-flow swarm "deploy mobile-responsive widget with accessibility features"
|
|
158
176
|
```
|
|
159
177
|
|
|
160
|
-
**What happens internally in every swarm (v1.1
|
|
178
|
+
**What happens internally in every swarm (v1.3.1):**
|
|
161
179
|
1. ✅ **Pre-flight auth check** with `snow_validate_live_connection()`
|
|
162
180
|
2. ✅ **Smart discovery** with `snow_comprehensive_search()`
|
|
163
|
-
3. 🧠 **
|
|
164
|
-
4.
|
|
165
|
-
5.
|
|
166
|
-
6. ✅ **
|
|
167
|
-
7. ✅ **
|
|
168
|
-
8. ✅ **
|
|
181
|
+
3. 🧠 **Intelligent Gap Analysis** - detects ALL required ServiceNow configurations
|
|
182
|
+
4. 🔧 **NEW: Automatic Flow Designer Detection** - auto-switches to XML-first for Flow Designer flows
|
|
183
|
+
5. 🚀 **REVOLUTIONARY: 6+ Parallel Agent Spawning** - automatic specialized team creation
|
|
184
|
+
6. ✅ **Multi-agent coordination** with shared MCP context and 2.8x speedup
|
|
185
|
+
7. ✅ **Real deployment** with `snow_deploy()` or **XML Auto-Import** for flows
|
|
186
|
+
8. ✅ **Automatic tracking** with `snow_update_set_add_artifact()`
|
|
187
|
+
9. ✅ **Live testing** with `snow_test_flow_with_mock()` or `snow_widget_test()`
|
|
169
188
|
|
|
170
189
|
### Swarm MCP Integration Features
|
|
171
190
|
|
|
@@ -174,8 +193,124 @@ snow-flow swarm "deploy mobile-responsive widget with accessibility features"
|
|
|
174
193
|
- **🔄 Update Set Management**: Automatic `snow_smart_update_set()` creation
|
|
175
194
|
- **🐝 Swarm Coordination**: All agents share MCP context and coordinate via real ServiceNow data
|
|
176
195
|
- **🚀 Live Deployment**: Direct ServiceNow integration via MCP tools
|
|
196
|
+
- **🔧 Flow Designer Auto-Detection**: Automatically detects Flow Designer tasks and uses XML-first approach
|
|
197
|
+
- **📦 XML Auto-Import**: Automatically imports, previews, and commits XML update sets to ServiceNow
|
|
177
198
|
- **⚡ Revolutionary Parallel Execution**: 6+ specialized agents (widget-creator, css-specialist, backend-specialist, frontend-specialist, integration-specialist, performance-specialist, tester) work simultaneously for 2.8x faster development
|
|
178
199
|
|
|
200
|
+
## 🔧 NEW: Flow Designer XML Auto-Deployment (v1.3.1)
|
|
201
|
+
|
|
202
|
+
**No more manual XML imports! Snow-flow now automatically deploys Flow Designer flows to ServiceNow.**
|
|
203
|
+
|
|
204
|
+
### ⚡ Automatic Detection & Deployment
|
|
205
|
+
|
|
206
|
+
When you run any flow-related swarm command, Snow-flow automatically:
|
|
207
|
+
|
|
208
|
+
1. **🔍 Detects Flow Designer Tasks**:
|
|
209
|
+
```bash
|
|
210
|
+
snow-flow swarm "create approval flow for equipment requests"
|
|
211
|
+
snow-flow swarm "build automated notification workflow"
|
|
212
|
+
snow-flow swarm "design escalation flow with manager approval"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
2. **🔧 Shows XML-First Detection**:
|
|
216
|
+
```
|
|
217
|
+
🔧 Flow Designer Detected - Using XML-First Approach!
|
|
218
|
+
📋 Creating production-ready ServiceNow flow XML...
|
|
219
|
+
💡 Reason: Flow Designer flows are most reliable with XML-first approach
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
3. **📦 Generates Complete XML**: Creates production-ready Update Set XML with:
|
|
223
|
+
- `sys_hub_flow` - Main flow record
|
|
224
|
+
- `sys_hub_flow_snapshot` - Flow definition and structure
|
|
225
|
+
- `sys_hub_trigger_instance` - Flow trigger configuration
|
|
226
|
+
- `sys_hub_action_instance` - All flow activities (approval, notification, etc.)
|
|
227
|
+
- `sys_hub_flow_logic` - Activity connections and flow paths
|
|
228
|
+
|
|
229
|
+
4. **🚀 Provides Auto-Deploy Command**:
|
|
230
|
+
```bash
|
|
231
|
+
🚀 Auto-Deploy enabled - importing XML to ServiceNow...
|
|
232
|
+
💡 To deploy, use the following command:
|
|
233
|
+
snow-flow deploy-xml "flow-update-sets/your_flow.xml"
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### 🚀 One-Command Deployment
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
# Deploy any generated XML flow directly to ServiceNow
|
|
240
|
+
snow-flow deploy-xml flow-update-sets/my_flow.xml
|
|
241
|
+
|
|
242
|
+
# With options:
|
|
243
|
+
snow-flow deploy-xml my_flow.xml --no-preview # Skip preview step
|
|
244
|
+
snow-flow deploy-xml my_flow.xml --no-commit # Preview only, manual commit
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
**What the deploy-xml command does:**
|
|
248
|
+
1. ✅ **Import**: Uploads XML to ServiceNow as remote update set
|
|
249
|
+
2. ✅ **Load**: Loads the update set into local update sets
|
|
250
|
+
3. ✅ **Preview**: Checks for problems and conflicts
|
|
251
|
+
4. ✅ **Commit**: Auto-commits if preview is clean
|
|
252
|
+
5. ✅ **Verify**: Confirms flow is available in Flow Designer
|
|
253
|
+
|
|
254
|
+
### 🎯 Complete Flow Development Workflow
|
|
255
|
+
|
|
256
|
+
**End-to-End Flow Creation (Zero Manual Steps):**
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
# 1. Create flow with automatic XML generation
|
|
260
|
+
snow-flow swarm "create incident escalation flow with email notifications"
|
|
261
|
+
|
|
262
|
+
# Output:
|
|
263
|
+
# 🔧 Flow Designer Detected - Using XML-First Approach!
|
|
264
|
+
# ✅ XML Generated Successfully!
|
|
265
|
+
# 📁 File saved to: flow-update-sets/incident_escalation_flow.xml
|
|
266
|
+
# 🚀 Auto-Deploy enabled - importing XML to ServiceNow...
|
|
267
|
+
# 💡 To deploy, use the following command:
|
|
268
|
+
# snow-flow deploy-xml "flow-update-sets/incident_escalation_flow.xml"
|
|
269
|
+
|
|
270
|
+
# 2. Deploy to ServiceNow (one command!)
|
|
271
|
+
snow-flow deploy-xml flow-update-sets/incident_escalation_flow.xml
|
|
272
|
+
|
|
273
|
+
# Output:
|
|
274
|
+
# 📦 Deploying XML Update Set: flow-update-sets/incident_escalation_flow.xml
|
|
275
|
+
# ✅ XML imported successfully (sys_id: abc123...)
|
|
276
|
+
# ✅ Update set loaded: Incident_Escalation_Flow_Import
|
|
277
|
+
# 🔍 Previewing update set...
|
|
278
|
+
# ✅ Preview successful - no problems found
|
|
279
|
+
# 🚀 Committing update set...
|
|
280
|
+
# ✅ Update Set committed successfully!
|
|
281
|
+
# 📍 Navigate to Flow Designer > Designer to see your flow
|
|
282
|
+
# 🎉 Deployment complete!
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### 🔧 Advanced XML Deployment Features
|
|
286
|
+
|
|
287
|
+
**Error Handling & Safety**:
|
|
288
|
+
- **Preview Problems Detection**: Automatically detects and reports conflicts
|
|
289
|
+
- **Safe Auto-Commit**: Only commits if preview is completely clean
|
|
290
|
+
- **Graceful Fallbacks**: Provides manual steps if auto-deployment fails
|
|
291
|
+
- **Authentication Validation**: Ensures valid ServiceNow connection before deployment
|
|
292
|
+
|
|
293
|
+
**Manual Control Options**:
|
|
294
|
+
```bash
|
|
295
|
+
# Preview only (no commit) - for review and testing
|
|
296
|
+
snow-flow deploy-xml my_flow.xml --no-commit
|
|
297
|
+
|
|
298
|
+
# Direct commit (skip preview) - for trusted environments
|
|
299
|
+
snow-flow deploy-xml my_flow.xml --no-preview
|
|
300
|
+
|
|
301
|
+
# Check authentication first
|
|
302
|
+
snow-flow auth status
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**Troubleshooting**:
|
|
306
|
+
```bash
|
|
307
|
+
# If deployment fails, check:
|
|
308
|
+
1. snow-flow auth status # Verify authentication
|
|
309
|
+
2. Check XML file exists and is valid
|
|
310
|
+
3. Ensure admin permissions in ServiceNow
|
|
311
|
+
4. Review any preview problems reported
|
|
312
|
+
```
|
|
313
|
+
|
|
179
314
|
## 🔒 MANDATORY ServiceNow Development Workflow
|
|
180
315
|
|
|
181
316
|
### **STEP 1: Authentication Validation (ALWAYS FIRST)**
|
|
@@ -460,7 +595,15 @@ snow-flow queen "create ITSM solution with approval workflows"
|
|
|
460
595
|
### Core Deployment Tools
|
|
461
596
|
```javascript
|
|
462
597
|
// Universal deployment (replaces all old deploy_* tools)
|
|
463
|
-
snow_deploy({ type: "widget|
|
|
598
|
+
snow_deploy({ type: "widget|application|script", config: {...} })
|
|
599
|
+
|
|
600
|
+
// NEW: XML Update Set deployment for flows
|
|
601
|
+
snow_deploy({
|
|
602
|
+
type: "xml_update_set",
|
|
603
|
+
xml_file_path: "/path/to/flow.xml",
|
|
604
|
+
auto_preview: true,
|
|
605
|
+
auto_commit: true
|
|
606
|
+
})
|
|
464
607
|
|
|
465
608
|
// Smart artifact discovery
|
|
466
609
|
snow_find_artifact({ query: "natural language", type: "widget" })
|
|
@@ -624,14 +767,32 @@ Snow-flow is built on **MCP-native architecture**:
|
|
|
624
767
|
```bash
|
|
625
768
|
# ✅ PRIMARY INTERFACE - Use this!
|
|
626
769
|
snow-flow swarm "create incident dashboard widget"
|
|
627
|
-
snow-flow swarm "build approval
|
|
770
|
+
snow-flow swarm "build approval flow for equipment requests" # Auto-detects Flow Designer!
|
|
628
771
|
snow-flow swarm "deploy mobile-responsive widget with accessibility features"
|
|
629
772
|
|
|
630
773
|
# ✅ All swarm operations automatically include:
|
|
631
774
|
# 1. snow_validate_live_connection() - Auth check
|
|
632
775
|
# 2. snow_comprehensive_search() - Smart discovery
|
|
633
|
-
# 3.
|
|
634
|
-
# 4.
|
|
776
|
+
# 3. 🔧 Automatic Flow Designer detection (NEW!)
|
|
777
|
+
# 4. snow_deploy() OR XML generation + auto-import for flows
|
|
778
|
+
# 5. snow_update_set_add_artifact() - Automatic tracking
|
|
635
779
|
```
|
|
636
780
|
|
|
637
|
-
**Every swarm operation is MCP-native and ServiceNow-first!** 🐝
|
|
781
|
+
**Every swarm operation is MCP-native and ServiceNow-first!** 🐝
|
|
782
|
+
|
|
783
|
+
### 🚀 Complete Commands Reference
|
|
784
|
+
|
|
785
|
+
```bash
|
|
786
|
+
# Flow Designer workflows (auto-XML generation + deployment)
|
|
787
|
+
snow-flow swarm "create approval flow for equipment requests"
|
|
788
|
+
snow-flow deploy-xml flow-update-sets/approval_flow.xml
|
|
789
|
+
|
|
790
|
+
# Widget development (standard MCP deployment)
|
|
791
|
+
snow-flow swarm "create incident dashboard widget"
|
|
792
|
+
|
|
793
|
+
# Application development (standard MCP deployment)
|
|
794
|
+
snow-flow swarm "build complete ITSM application"
|
|
795
|
+
|
|
796
|
+
# Mixed development (intelligent routing)
|
|
797
|
+
snow-flow swarm "create incident management system with approval flows and dashboard widgets"
|
|
798
|
+
```
|
package/README.md
CHANGED
|
@@ -12,9 +12,31 @@
|
|
|
12
12
|
- 🎯 **Claude Code Integration**: All coordination happens through Claude Code interface
|
|
13
13
|
- 🚀 **One Command**: `snow-flow swarm "objective"` - everything else is automatic
|
|
14
14
|
|
|
15
|
-
## ✨ What's New in v1.1
|
|
15
|
+
## ✨ What's New in v1.3.1 - Flow Designer XML Auto-Deployment COMPLETE!
|
|
16
16
|
|
|
17
|
-
### 🚀 BREAKTHROUGH:
|
|
17
|
+
### 🚀 BREAKTHROUGH: Complete XML Update Set Auto-Import!
|
|
18
|
+
- **✅ ZERO MANUAL STEPS**: One command imports, previews, and commits XML update sets automatically
|
|
19
|
+
- **✅ FLOW DESIGNER INTEGRATION**: Automatic detection of Flow Designer artifacts in swarm commands
|
|
20
|
+
- **✅ XML GENERATION & DEPLOYMENT**: Complete workflow from swarm creation to XML deployment
|
|
21
|
+
- **✅ SAFETY CONTROLS**: Auto-preview with problem detection, only commits if clean
|
|
22
|
+
- **✅ NEW CLI COMMAND**: `snow-flow deploy-xml <file>` for standalone XML deployment
|
|
23
|
+
- **✅ MCP INTEGRATION**: Extended deployment MCP to support xml_update_set type
|
|
24
|
+
|
|
25
|
+
### 🔄 Flow Designer XML Workflow
|
|
26
|
+
```bash
|
|
27
|
+
# 1. Create flow with swarm
|
|
28
|
+
snow-flow swarm "create approval workflow for equipment requests"
|
|
29
|
+
|
|
30
|
+
# 2. Export XML automatically generated in flow-update-sets/
|
|
31
|
+
# 3. Deploy XML with single command - no manual import!
|
|
32
|
+
snow-flow deploy-xml flow-update-sets/flow_approval_workflow.xml
|
|
33
|
+
|
|
34
|
+
# ✅ Complete automation: Import → Load → Preview → Commit (only if clean)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 🚀 Previous Release: v1.1.93 - Revolutionary Parallel Agent Spawning WORKING!
|
|
38
|
+
|
|
39
|
+
#### 🚀 BREAKTHROUGH: 6+ Parallel Agents Working Simultaneously!
|
|
18
40
|
- **✅ PROVEN RESULTS**: 6+ specialized agents spawn automatically for widget development
|
|
19
41
|
- **✅ 2.8x SPEEDUP**: Demonstrated 2.8x faster development vs single-agent approach
|
|
20
42
|
- **✅ SPECIALIZED TEAMS**: widget-creator, css-specialist, backend-specialist, frontend-specialist, integration-specialist, performance-specialist, ui-ux-specialist, tester
|
|
@@ -171,6 +193,10 @@ snow-flow swarm "Create incident management dashboard with real-time charts"
|
|
|
171
193
|
|
|
172
194
|
# 🧠 NEW: Advanced example showing Gap Analysis Engine
|
|
173
195
|
snow-flow queen "create ITSM solution with LDAP authentication and custom approval workflows"
|
|
196
|
+
|
|
197
|
+
# 🚀 NEW: Complete Flow Designer XML deployment workflow
|
|
198
|
+
snow-flow swarm "create approval workflow for equipment requests"
|
|
199
|
+
snow-flow deploy-xml flow-update-sets/flow_approval_workflow.xml
|
|
174
200
|
```
|
|
175
201
|
|
|
176
202
|
### 🧠 What You'll See with Gap Analysis Engine
|
|
@@ -233,10 +259,24 @@ snow-flow memory stats
|
|
|
233
259
|
snow-flow memory export <file>
|
|
234
260
|
```
|
|
235
261
|
|
|
262
|
+
### 🚀 NEW: XML Update Set Deployment
|
|
263
|
+
```bash
|
|
264
|
+
# Deploy XML update sets automatically (Import → Preview → Commit)
|
|
265
|
+
snow-flow deploy-xml <xmlFile>
|
|
266
|
+
|
|
267
|
+
# Deploy with custom options
|
|
268
|
+
snow-flow deploy-xml flow.xml --no-preview # Skip preview step
|
|
269
|
+
snow-flow deploy-xml flow.xml --no-commit # Preview only, don't commit
|
|
270
|
+
|
|
271
|
+
# Example: Deploy generated flow XML
|
|
272
|
+
snow-flow deploy-xml flow-update-sets/flow_approval_workflow.xml
|
|
273
|
+
```
|
|
274
|
+
|
|
236
275
|
### 🚀 Intelligent Features (Enabled by Default)
|
|
237
276
|
- **🧠 Gap Analysis Engine**: Automatically detects ALL ServiceNow configurations beyond MCP tools
|
|
238
277
|
- **🤖 Auto-Resolution**: Attempts automatic configuration of system properties, navigation, auth
|
|
239
278
|
- **📚 Manual Guides**: Generates detailed step-by-step instructions for complex setups
|
|
279
|
+
- **🚀 XML Auto-Deployment**: Complete XML update set import workflow with safety controls
|
|
240
280
|
- **Smart Discovery**: Automatically discovers and reuses existing artifacts
|
|
241
281
|
- **Live Testing**: Real-time testing during development on your ServiceNow instance
|
|
242
282
|
- **Auto Deploy**: Automatic deployment when ready (safe with update sets)
|
|
@@ -294,16 +334,26 @@ snow-flow swarm "Create incident dashboard widget with pie charts and filter opt
|
|
|
294
334
|
# 4. Automatic deployment to ServiceNow with Update Set tracking
|
|
295
335
|
```
|
|
296
336
|
|
|
297
|
-
### Flow Creation
|
|
337
|
+
### Flow Creation & XML Deployment
|
|
298
338
|
```bash
|
|
299
|
-
# Complex approval workflow
|
|
339
|
+
# Complex approval workflow with automatic XML generation
|
|
300
340
|
snow-flow swarm "Build approval flow for equipment requests with manager and finance approval"
|
|
301
341
|
|
|
302
342
|
# The Queen Agent will:
|
|
303
343
|
# 1. Spawn Flow Builder + Security Agent
|
|
304
344
|
# 2. Flow Builder designs multi-step approval process
|
|
305
345
|
# 3. Security Agent validates permissions and compliance
|
|
306
|
-
# 4.
|
|
346
|
+
# 4. Automatic XML generation in flow-update-sets/ directory
|
|
347
|
+
# 5. Display deploy-xml command for seamless deployment
|
|
348
|
+
|
|
349
|
+
# 🚀 NEW: Complete XML deployment workflow
|
|
350
|
+
snow-flow deploy-xml flow-update-sets/flow_equipment_approval.xml
|
|
351
|
+
|
|
352
|
+
# ✅ Automatic process:
|
|
353
|
+
# • Import XML to ServiceNow
|
|
354
|
+
# • Load remote update set
|
|
355
|
+
# • Preview changes & check for conflicts
|
|
356
|
+
# • Commit automatically if clean (or prompt if issues found)
|
|
307
357
|
```
|
|
308
358
|
|
|
309
359
|
### Complete Solutions
|