snow-flow 3.4.26 → 3.4.27
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/.mcp.json +208 -0
- package/README.md +283 -601
- package/dist/cli.js +1 -1
- package/memory/agents/README.md +2 -30
- package/package.json +1 -1
- package/servicenow/README.md +3 -0
package/.mcp.json
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"servicenow-deployment": {
|
|
4
|
+
"command": "node",
|
|
5
|
+
"args": [
|
|
6
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-deployment-mcp.js"
|
|
7
|
+
],
|
|
8
|
+
"description": "Widget and artifact deployment with COHERENCE VALIDATION - ensures HTML template, client script, server script work together perfectly. Tools: snow_deploy, snow_update, snow_validate_deployment, snow_rollback_deployment, snow_deployment_status, snow_export_artifact, snow_import_artifact, snow_preview_widget, snow_widget_test, snow_create_solution_package",
|
|
9
|
+
"env": {
|
|
10
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
11
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
12
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}",
|
|
13
|
+
"SNOW_DEPLOYMENT_TIMEOUT": "${SNOW_DEPLOYMENT_TIMEOUT}",
|
|
14
|
+
"MCP_DEPLOYMENT_TIMEOUT": "${MCP_DEPLOYMENT_TIMEOUT}"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"servicenow-operations": {
|
|
18
|
+
"command": "node",
|
|
19
|
+
"args": [
|
|
20
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-operations-mcp.js"
|
|
21
|
+
],
|
|
22
|
+
"description": "Core ServiceNow operations - universal table query (snow_query_table), CRUD operations, incident/request/problem management, CMDB search, user/group management, catalog items, knowledge search, field discovery (snow_discover_table_fields), get by sys_id",
|
|
23
|
+
"env": {
|
|
24
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
25
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
26
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"servicenow-automation": {
|
|
30
|
+
"command": "node",
|
|
31
|
+
"args": [
|
|
32
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-automation-mcp.js"
|
|
33
|
+
],
|
|
34
|
+
"description": "Script execution with output capture (snow_execute_script_with_output), scheduled jobs, event rules, notifications, SLA definitions, workflow activities, script history, REST testing, system logs (snow_get_logs), execution tracing, background scripts with autoConfirm option",
|
|
35
|
+
"env": {
|
|
36
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
37
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
38
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"servicenow-platform-development": {
|
|
42
|
+
"command": "node",
|
|
43
|
+
"args": [
|
|
44
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-platform-development-mcp.js"
|
|
45
|
+
],
|
|
46
|
+
"description": "Platform development - create UI pages, script includes, business rules, client scripts, UI policies/actions, ACLs, dictionary entries, catalog items, workflows, transform maps",
|
|
47
|
+
"env": {
|
|
48
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
49
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
50
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"servicenow-integration": {
|
|
54
|
+
"command": "node",
|
|
55
|
+
"args": [
|
|
56
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-integration-mcp.js"
|
|
57
|
+
],
|
|
58
|
+
"description": "Integration management - REST messages, SOAP messages, transform maps, import sets, web services, email configuration, OAuth providers, endpoint discovery, integration testing",
|
|
59
|
+
"env": {
|
|
60
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
61
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
62
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"servicenow-system-properties": {
|
|
66
|
+
"command": "node",
|
|
67
|
+
"args": [
|
|
68
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-system-properties-mcp.js"
|
|
69
|
+
],
|
|
70
|
+
"description": "System property management - get/set/list/delete properties (snow_property_get, snow_property_set), bulk operations, import/export JSON, validate values, search by pattern, categories, audit history",
|
|
71
|
+
"env": {
|
|
72
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
73
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
74
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"servicenow-update-set": {
|
|
78
|
+
"command": "node",
|
|
79
|
+
"args": [
|
|
80
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-update-set-mcp.js"
|
|
81
|
+
],
|
|
82
|
+
"description": "Update set management - create/switch/complete update sets, preview changes, export/import XML, ensure active update set, add artifacts to sets, batch operations",
|
|
83
|
+
"env": {
|
|
84
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
85
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
86
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"servicenow-development-assistant": {
|
|
90
|
+
"command": "node",
|
|
91
|
+
"args": [
|
|
92
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-development-assistant-mcp.js"
|
|
93
|
+
],
|
|
94
|
+
"description": "Development assistance - code generation, best practices, pattern recommendations, code review, performance optimization, ES5 conversion, documentation generation, requirement analysis (snow_find_artifact, snow_edit_artifact, snow_analyze_artifact)",
|
|
95
|
+
"env": {
|
|
96
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
97
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
98
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"servicenow-security-compliance": {
|
|
102
|
+
"command": "node",
|
|
103
|
+
"args": [
|
|
104
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-security-compliance-mcp.js"
|
|
105
|
+
],
|
|
106
|
+
"description": "Security and compliance - security policies, compliance rules (SOX/GDPR/HIPAA), audit trails, access control review, vulnerability scanning, risk assessment, encryption settings",
|
|
107
|
+
"env": {
|
|
108
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
109
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
110
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"servicenow-reporting-analytics": {
|
|
114
|
+
"command": "node",
|
|
115
|
+
"args": [
|
|
116
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-reporting-analytics-mcp.js"
|
|
117
|
+
],
|
|
118
|
+
"description": "Reporting and analytics - create reports/dashboards/KPIs, data visualization, performance analytics, scheduled reports, data quality analysis, metrics collection, trend analysis",
|
|
119
|
+
"env": {
|
|
120
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
121
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
122
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"servicenow-machine-learning": {
|
|
126
|
+
"command": "node",
|
|
127
|
+
"args": [
|
|
128
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-machine-learning-mcp.js"
|
|
129
|
+
],
|
|
130
|
+
"description": "Machine learning - train/classify incidents (snow_train_classifier), change risk prediction, anomaly detection, forecast incidents, sentiment analysis, process optimization, hybrid recommendations with TensorFlow.js",
|
|
131
|
+
"env": {
|
|
132
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
133
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
134
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"servicenow-knowledge-catalog": {
|
|
138
|
+
"command": "node",
|
|
139
|
+
"args": [
|
|
140
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-knowledge-catalog-mcp.js"
|
|
141
|
+
],
|
|
142
|
+
"description": "Knowledge and catalog management - create/search/update knowledge articles, knowledge bases, catalog items, catalog variables, UI policies, client scripts, order items, discover catalogs",
|
|
143
|
+
"env": {
|
|
144
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
145
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
146
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"servicenow-change-virtualagent-pa": {
|
|
150
|
+
"command": "node",
|
|
151
|
+
"args": [
|
|
152
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-change-virtualagent-pa-mcp.js"
|
|
153
|
+
],
|
|
154
|
+
"description": "Change management, Virtual Agent, and Performance Analytics - create/manage change requests, CAB meetings, VA topics/blocks, conversations, PA indicators/widgets/breakdowns, thresholds, data collection",
|
|
155
|
+
"env": {
|
|
156
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
157
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
158
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"servicenow-flow-workspace-mobile": {
|
|
162
|
+
"command": "node",
|
|
163
|
+
"args": [
|
|
164
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-flow-workspace-mobile-mcp.js"
|
|
165
|
+
],
|
|
166
|
+
"description": "Flow Designer, Workspace, and Mobile - create flows/actions/subflows/triggers, test flows, workspaces/tabs/lists, contextual panels, mobile app config, layouts, push notifications, offline sync",
|
|
167
|
+
"env": {
|
|
168
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
169
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
170
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"servicenow-cmdb-event-hr-csm-devops": {
|
|
174
|
+
"command": "node",
|
|
175
|
+
"args": [
|
|
176
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/servicenow-cmdb-event-hr-csm-devops-mcp.js"
|
|
177
|
+
],
|
|
178
|
+
"description": "CMDB, Event Management, HR, CSM, and DevOps - create CIs/relationships, discovery, impact analysis, events/alerts, HR cases/onboarding, customer cases/accounts, DevOps pipelines/deployments",
|
|
179
|
+
"env": {
|
|
180
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
181
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
182
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"servicenow-advanced-features": {
|
|
186
|
+
"command": "node",
|
|
187
|
+
"args": [
|
|
188
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/advanced/servicenow-advanced-features-mcp.js"
|
|
189
|
+
],
|
|
190
|
+
"description": "Advanced features - batch API operations (80% reduction), table relationships analysis, query optimization, field usage analysis, code pattern detection, process discovery, workflow analysis, documentation generation",
|
|
191
|
+
"env": {
|
|
192
|
+
"SNOW_INSTANCE": "${SNOW_INSTANCE}",
|
|
193
|
+
"SNOW_CLIENT_ID": "${SNOW_CLIENT_ID}",
|
|
194
|
+
"SNOW_CLIENT_SECRET": "${SNOW_CLIENT_SECRET}"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"snow-flow": {
|
|
198
|
+
"command": "node",
|
|
199
|
+
"args": [
|
|
200
|
+
"/Users/nielsvanderwerf/Projects/snow-flow-dev/snow-flow/dist/mcp/snow-flow-mcp.js"
|
|
201
|
+
],
|
|
202
|
+
"description": "Snow-Flow orchestration - swarm init/status, agent spawn/discover, task orchestrate/categorize, neural train/patterns (TensorFlow.js), memory store/search (timeout-protected), performance reports, token usage tracking",
|
|
203
|
+
"env": {
|
|
204
|
+
"SNOW_FLOW_ENV": "${SNOW_FLOW_ENV}"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
package/README.md
CHANGED
|
@@ -1,709 +1,391 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
**
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- **
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
30
|
-
- **
|
|
1
|
+
# Snow-Flow: Multi-Agent ServiceNow Development Platform 🚀
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
## 🆕 What's New in v1.1.51
|
|
6
|
+
|
|
7
|
+
### 🎯 CRITICAL FIXES - All User Issues Resolved!
|
|
8
|
+
- **ROOT CAUSE SOLVED**: Flow Designer validation failures completely eliminated
|
|
9
|
+
- **JSON SCHEMA FLEXIBILITY**: Accepts both "steps" and "activities" arrays with auto-conversion
|
|
10
|
+
- **DOCUMENTATION SYNC**: Init command now creates comprehensive CLAUDE.md (373 lines vs 15)
|
|
11
|
+
- **COMPLETE GUIDE**: New users get full Snow-Flow development environment from day one
|
|
12
|
+
|
|
13
|
+
### 🧠 Intelligent Error Recovery (v1.1.48-1.1.49)
|
|
14
|
+
- **AUTOMATIC FALLBACKS**: Flow Designer → Business Rule conversion when deployment fails
|
|
15
|
+
- **SMART SESSIONS**: Update Sets auto-create when none exist - no more "no active session" errors
|
|
16
|
+
- **ZERO MANUAL WORK**: All systematic errors from user feedback now automatically handled
|
|
17
|
+
- **COMPREHENSIVE TESTING**: Enhanced flow testing with Business Rule fallback detection
|
|
18
|
+
|
|
19
|
+
### 🚀 Enhanced Swarm Command (v1.1.42+)
|
|
20
|
+
Most intelligent features are now **enabled by default** - één command voor alles!
|
|
21
|
+
- **DEFAULT TRUE**: `--smart-discovery`, `--live-testing`, `--auto-deploy`, `--auto-rollback`, `--shared-memory`, `--progress-monitoring`
|
|
22
|
+
- **INTELLIGENT ORCHESTRATION**: Uses `snow_orchestrate_development` MCP tool automatically
|
|
23
|
+
- **NO FLAGS NEEDED**: Just run `snow-flow swarm "create widget"` and everything works!
|
|
24
|
+
|
|
25
|
+
### 🔍 Real-Time ServiceNow Integration (v1.1.41+)
|
|
26
|
+
- **LIVE VALIDATION**: `snow_validate_live_connection` - real-time auth and permission checking
|
|
27
|
+
- **SMART PREVENTION**: `snow_discover_existing_flows` - prevents duplicate flows
|
|
28
|
+
- **LIVE TESTING**: `snow_test_flow_execution` - real flow testing in live instances
|
|
29
|
+
- **BATCH VALIDATION**: `batch_deployment_validator` - comprehensive multi-artifact validation
|
|
30
|
+
- **AUTO ROLLBACK**: `deployment_rollback_manager` - automatic rollback with backup creation
|
|
31
|
+
|
|
32
|
+
## 🌟 Key Features
|
|
33
|
+
|
|
34
|
+
### 🤖 11 Specialized MCP Servers
|
|
35
|
+
Each server provides autonomous capabilities for different aspects of ServiceNow development:
|
|
36
|
+
|
|
37
|
+
1. **Deployment MCP** - Autonomous widget and application deployment
|
|
38
|
+
2. **Update Set MCP** - Professional change tracking and deployment management
|
|
39
|
+
3. **Intelligent MCP** - AI-powered artifact discovery and editing
|
|
40
|
+
4. **Graph Memory MCP** - Relationship tracking and impact analysis
|
|
41
|
+
5. **Platform Development MCP** - Development workflow automation
|
|
42
|
+
6. **Integration MCP** - Third-party system integration
|
|
43
|
+
7. **Operations MCP** - Operations and monitoring management
|
|
44
|
+
8. **Automation MCP** - Workflow and process automation
|
|
45
|
+
9. **Security & Compliance MCP** - Security auditing and compliance
|
|
46
|
+
10. **Reporting & Analytics MCP** - Data _analysis and reporting
|
|
47
|
+
11. **Memory MCP** - Multi-agent coordination and todo management
|
|
48
|
+
|
|
49
|
+
### 🎯 Core Capabilities
|
|
50
|
+
|
|
51
|
+
- **Natural Language Processing**: Create complex ServiceNow artifacts using plain English/Dutch commands
|
|
52
|
+
- **Intelligent Decision Making**: Automatically determines optimal architecture (flow vs subflow)
|
|
53
|
+
- **Zero Configuration**: All values dynamically discovered from your ServiceNow instance
|
|
54
|
+
- **Autonomous Deployment**: Direct deployment to ServiceNow with automatic error handling
|
|
55
|
+
- **Update Set Management**: Professional change tracking like ServiceNow pros use
|
|
56
|
+
- **Global Scope Strategy**: Intelligent scope selection with fallback mechanisms
|
|
57
|
+
- **Multi-Agent Coordination**: Parallel execution for complex tasks
|
|
31
58
|
|
|
32
59
|
## 🚀 Quick Start
|
|
33
60
|
|
|
61
|
+
### Prerequisites
|
|
62
|
+
- Node.js 18+ and npm
|
|
63
|
+
- ServiceNow instance with admin access
|
|
64
|
+
- OAuth application configured in ServiceNow
|
|
65
|
+
|
|
34
66
|
### Installation
|
|
67
|
+
|
|
35
68
|
```bash
|
|
36
|
-
# Install globally
|
|
69
|
+
# Install Snow-Flow globally
|
|
37
70
|
npm install -g snow-flow
|
|
38
71
|
|
|
39
|
-
# Initialize in your project
|
|
72
|
+
# Initialize Snow-Flow in your project directory
|
|
40
73
|
snow-flow init
|
|
41
|
-
|
|
42
|
-
# Authenticate with ServiceNow
|
|
43
|
-
snow-flow auth login
|
|
44
74
|
```
|
|
45
75
|
|
|
46
|
-
|
|
76
|
+
#### Alternative: Install from source
|
|
47
77
|
```bash
|
|
48
|
-
#
|
|
49
|
-
snow-flow
|
|
50
|
-
|
|
51
|
-
# Snow-Flow will:
|
|
52
|
-
# 1. Research best practices
|
|
53
|
-
# 2. Design the architecture
|
|
54
|
-
# 3. Create the widget with perfect coherence
|
|
55
|
-
# 4. Test everything
|
|
56
|
-
# 5. Deploy to your instance
|
|
57
|
-
# 6. Provide the widget URL
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## 💡 Core Features
|
|
61
|
-
|
|
62
|
-
### 🤖 AI-Powered Development
|
|
63
|
-
Snow-Flow integrates Claude AI to understand your requirements and generate production-ready ServiceNow code:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
# Natural language to ServiceNow artifacts
|
|
67
|
-
snow-flow sparc "Create a business rule that auto-assigns incidents based on category"
|
|
68
|
-
|
|
69
|
-
# The AI understands ServiceNow context and generates ES5-compatible code
|
|
70
|
-
```
|
|
78
|
+
# Clone the repository
|
|
79
|
+
git clone https://github.com/groeimetai/snow-flow.git
|
|
80
|
+
cd snow-flow
|
|
71
81
|
|
|
72
|
-
|
|
73
|
-
|
|
82
|
+
# Install dependencies
|
|
83
|
+
npm install
|
|
74
84
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
script: `
|
|
78
|
-
gs.info('Analyzing incidents...');
|
|
79
|
-
var stats = {};
|
|
80
|
-
var gr = new GlideRecord('incident');
|
|
81
|
-
gr.addActiveQuery();
|
|
82
|
-
gr.query();
|
|
83
|
-
stats.total = gr.getRowCount();
|
|
84
|
-
gs.print('Found ' + stats.total + ' active incidents');
|
|
85
|
-
|
|
86
|
-
// Get priority breakdown
|
|
87
|
-
var agg = new GlideAggregate('incident');
|
|
88
|
-
agg.addActiveQuery();
|
|
89
|
-
agg.groupBy('priority');
|
|
90
|
-
agg.addAggregate('COUNT');
|
|
91
|
-
agg.query();
|
|
92
|
-
|
|
93
|
-
stats.byPriority = {};
|
|
94
|
-
while(agg.next()) {
|
|
95
|
-
var p = agg.getValue('priority');
|
|
96
|
-
stats.byPriority[p] = agg.getAggregate('COUNT');
|
|
97
|
-
gs.info('Priority ' + p + ': ' + agg.getAggregate('COUNT'));
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return stats;
|
|
101
|
-
`
|
|
102
|
-
});
|
|
85
|
+
# Build the project
|
|
86
|
+
npm run build
|
|
103
87
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
// Found 42 active incidents
|
|
107
|
-
// [INFO] Priority 1: 5
|
|
108
|
-
// [INFO] Priority 2: 12
|
|
109
|
-
// [INFO] Priority 3: 25
|
|
110
|
-
// Return value: { total: 42, byPriority: { "1": 5, "2": 12, "3": 25 } }
|
|
88
|
+
# Link globally (optional)
|
|
89
|
+
npm link
|
|
111
90
|
```
|
|
112
91
|
|
|
113
|
-
###
|
|
114
|
-
Deploy widgets that actually work - Snow-Flow validates the communication between all components:
|
|
92
|
+
### Configuration
|
|
115
93
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<p>{{inc.short_description}}</p>
|
|
124
|
-
<span class="priority-{{inc.priority}}">P{{inc.priority}}</span>
|
|
125
|
-
</div>
|
|
126
|
-
<button ng-click="refreshData()" class="btn btn-primary">Refresh</button>
|
|
127
|
-
</div>
|
|
128
|
-
`,
|
|
129
|
-
server_script: `
|
|
130
|
-
(function() {
|
|
131
|
-
// Server provides data that HTML uses
|
|
132
|
-
data.incidents = [];
|
|
133
|
-
|
|
134
|
-
var gr = new GlideRecord('incident');
|
|
135
|
-
gr.addActiveQuery();
|
|
136
|
-
gr.orderByDesc('sys_created_on');
|
|
137
|
-
gr.setLimit(10);
|
|
138
|
-
gr.query();
|
|
139
|
-
|
|
140
|
-
while(gr.next()) {
|
|
141
|
-
data.incidents.push({
|
|
142
|
-
sys_id: gr.getUniqueValue(),
|
|
143
|
-
number: gr.getValue('number'),
|
|
144
|
-
short_description: gr.getValue('short_description'),
|
|
145
|
-
priority: gr.getValue('priority')
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// Handle client actions
|
|
150
|
-
if (input.action === 'refresh') {
|
|
151
|
-
// Refresh logic here
|
|
152
|
-
data.refreshed = true;
|
|
153
|
-
}
|
|
154
|
-
})();
|
|
155
|
-
`,
|
|
156
|
-
client_script: `
|
|
157
|
-
function($scope, spUtil) {
|
|
158
|
-
var c = this;
|
|
159
|
-
|
|
160
|
-
// Implement methods that HTML calls
|
|
161
|
-
$scope.openIncident = function(sysId) {
|
|
162
|
-
window.open('/incident.do?sys_id=' + sysId, '_blank');
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
$scope.refreshData = function() {
|
|
166
|
-
// Call server action
|
|
167
|
-
c.server.get({action: 'refresh'}).then(function(response) {
|
|
168
|
-
c.data.incidents = response.data.incidents;
|
|
169
|
-
spUtil.addInfoMessage("Data refreshed!");
|
|
170
|
-
});
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
`
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
// Snow-Flow validates:
|
|
177
|
-
// ✅ data.incidents exists in server and is used in HTML
|
|
178
|
-
// ✅ openIncident() in HTML has implementation in client
|
|
179
|
-
// ✅ refreshData() in HTML has implementation in client
|
|
180
|
-
// ✅ action: 'refresh' in client has handler in server
|
|
94
|
+
1. Create a `.env` file in the project root:
|
|
95
|
+
```env
|
|
96
|
+
SNOW_INSTANCE=your-instance.service-now.com
|
|
97
|
+
SNOW_CLIENT_ID=your-oauth-client-id
|
|
98
|
+
SNOW_CLIENT_SECRET=your-oauth-client-secret
|
|
99
|
+
SNOW_USERNAME=your-username
|
|
100
|
+
SNOW_PASSWORD=your-password
|
|
181
101
|
```
|
|
182
102
|
|
|
183
|
-
|
|
184
|
-
Coordinate multiple specialized agents working in parallel:
|
|
103
|
+
2. Set up OAuth in ServiceNow (see [SERVICENOW-OAUTH-SETUP.md](./SERVICENOW-OAUTH-SETUP.md))
|
|
185
104
|
|
|
105
|
+
3. Authenticate with ServiceNow:
|
|
186
106
|
```bash
|
|
187
|
-
|
|
188
|
-
snow-flow swarm "Build complete change management system" \
|
|
189
|
-
--strategy development \
|
|
190
|
-
--mode hierarchical \
|
|
191
|
-
--max-agents 8 \
|
|
192
|
-
--monitor
|
|
193
|
-
|
|
194
|
-
# Agents work simultaneously:
|
|
195
|
-
# - Researcher: Analyzes requirements and best practices
|
|
196
|
-
# - Architect: Designs system architecture
|
|
197
|
-
# - Coder Team: Develops components in parallel
|
|
198
|
-
# - Tester: Creates and runs tests
|
|
199
|
-
# - Deployer: Handles deployment
|
|
200
|
-
# - Documenter: Generates documentation
|
|
107
|
+
snow-flow auth login
|
|
201
108
|
```
|
|
202
109
|
|
|
203
|
-
###
|
|
204
|
-
Built-in TensorFlow.js for intelligent automation:
|
|
110
|
+
### 🎯 MCP Server Activation (v1.1.25+)
|
|
205
111
|
|
|
206
|
-
|
|
207
|
-
// Train incident classifier
|
|
208
|
-
const model = await snow_train_classifier({
|
|
209
|
-
type: 'incident_category',
|
|
210
|
-
training_data: {
|
|
211
|
-
table: 'incident',
|
|
212
|
-
fields: ['short_description', 'description'],
|
|
213
|
-
label: 'category',
|
|
214
|
-
limit: 1000
|
|
215
|
-
},
|
|
216
|
-
model_config: {
|
|
217
|
-
type: 'lstm',
|
|
218
|
-
epochs: 50,
|
|
219
|
-
batch_size: 32
|
|
220
|
-
}
|
|
221
|
-
});
|
|
112
|
+
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:
|
|
222
113
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
model_id: model.id,
|
|
226
|
-
input: {
|
|
227
|
-
short_description: "Email not working",
|
|
228
|
-
description: "Cannot connect to Exchange server"
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
// Result: { category: "Email", confidence: 0.94 }
|
|
232
|
-
```
|
|
114
|
+
```bash
|
|
115
|
+
snow-flow init
|
|
233
116
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
### 1. 🚀 **Deployment Server** (40+ tools)
|
|
239
|
-
Deploy artifacts with automatic validation and rollback capabilities
|
|
240
|
-
- `snow_deploy_widget` - Widgets with coherence validation
|
|
241
|
-
- `snow_deploy_flow` - Flow Designer flows
|
|
242
|
-
- `snow_deploy_portal_page` - Service Portal pages
|
|
243
|
-
- `snow_create_update_set` - Update set management
|
|
244
|
-
|
|
245
|
-
### 2. ⚙️ **Operations Server** (30+ tools)
|
|
246
|
-
Core CRUD operations and data management
|
|
247
|
-
- `snow_query_table` - Advanced table queries
|
|
248
|
-
- `snow_discover_table_fields` - Schema discovery
|
|
249
|
-
- `snow_batch_api` - Batch operations (80% API reduction)
|
|
250
|
-
- `snow_cmdb_search` - CMDB exploration
|
|
251
|
-
|
|
252
|
-
### 3. 🤖 **Automation Server** (25+ tools)
|
|
253
|
-
Script execution and automation
|
|
254
|
-
- `snow_execute_script_with_output` - Full output capture
|
|
255
|
-
- `snow_get_logs` - System log access
|
|
256
|
-
- `snow_trace_execution` - Performance tracing
|
|
257
|
-
- `snow_test_rest_connection` - REST testing
|
|
258
|
-
|
|
259
|
-
### 4. 🧠 **Machine Learning Server** (20+ tools)
|
|
260
|
-
AI/ML capabilities with TensorFlow.js
|
|
261
|
-
- `snow_train_classifier` - Train custom models
|
|
262
|
-
- `snow_detect_anomalies` - Anomaly detection
|
|
263
|
-
- `snow_forecast_incidents` - Predictive analytics
|
|
264
|
-
- `snow_sentiment_analysis` - Text analysis
|
|
265
|
-
|
|
266
|
-
### 5. 💻 **Platform Development Server** (20+ tools)
|
|
267
|
-
Create platform artifacts
|
|
268
|
-
- `snow_create_script_include` - Script Includes
|
|
269
|
-
- `snow_create_business_rule` - Business Rules
|
|
270
|
-
- `snow_create_ui_policy` - UI Policies
|
|
271
|
-
- `snow_create_client_script` - Client Scripts
|
|
272
|
-
|
|
273
|
-
### 6. 🔗 **Integration Server** (15+ tools)
|
|
274
|
-
External integrations and data import
|
|
275
|
-
- `snow_create_rest_message` - REST integrations
|
|
276
|
-
- `snow_create_transform_map` - Data transformations
|
|
277
|
-
- `snow_test_web_service` - Service testing
|
|
278
|
-
- `snow_configure_oauth` - OAuth setup
|
|
279
|
-
|
|
280
|
-
### 7. ⚙️ **System Properties Server** (10+ tools)
|
|
281
|
-
Configuration management
|
|
282
|
-
- `snow_property_get/set` - Property CRUD
|
|
283
|
-
- `snow_property_bulk_update` - Bulk operations
|
|
284
|
-
- `snow_property_export/import` - Configuration backup
|
|
285
|
-
|
|
286
|
-
### 8. 📦 **Update Set Server** (10+ tools)
|
|
287
|
-
Change management
|
|
288
|
-
- `snow_create_update_set` - Create sets
|
|
289
|
-
- `snow_preview_update_set` - Preview changes
|
|
290
|
-
- `snow_export_update_set` - Export as XML
|
|
291
|
-
|
|
292
|
-
### 9. 🎯 **Development Assistant Server** (15+ tools)
|
|
293
|
-
Code generation and optimization
|
|
294
|
-
- `snow_generate_code` - AI code generation
|
|
295
|
-
- `snow_suggest_pattern` - Design patterns
|
|
296
|
-
- `snow_convert_to_es5` - ES5 conversion
|
|
297
|
-
- `snow_optimize_performance` - Performance tips
|
|
298
|
-
|
|
299
|
-
### 10. 🔒 **Security & Compliance Server** (15+ tools)
|
|
300
|
-
Security and compliance management
|
|
301
|
-
- `snow_scan_vulnerabilities` - Security scanning
|
|
302
|
-
- `snow_audit_compliance` - SOX/GDPR/HIPAA
|
|
303
|
-
- `snow_review_access_control` - ACL analysis
|
|
304
|
-
|
|
305
|
-
### 11. 📊 **Reporting & Analytics Server** (20+ tools)
|
|
306
|
-
Advanced reporting and visualization
|
|
307
|
-
- `snow_create_dashboard` - Dashboard builder
|
|
308
|
-
- `snow_define_kpi` - KPI management
|
|
309
|
-
- `snow_analyze_data_quality` - Data validation
|
|
310
|
-
|
|
311
|
-
### 12. 📚 **Knowledge & Catalog Server** (14+ tools)
|
|
312
|
-
Knowledge base and service catalog management
|
|
313
|
-
- `snow_create_knowledge_article` - Create articles
|
|
314
|
-
- `snow_search_knowledge` - Search knowledge base
|
|
315
|
-
- `snow_create_catalog_item` - Create catalog items
|
|
316
|
-
- `snow_create_catalog_variable` - Catalog variables
|
|
317
|
-
- `snow_order_catalog_item` - Order items
|
|
318
|
-
|
|
319
|
-
### 13. 🔄 **Change, Virtual Agent & PA Server** (19+ tools)
|
|
320
|
-
Change management, Virtual Agent, and Performance Analytics
|
|
321
|
-
- `snow_create_change_request` - Change requests
|
|
322
|
-
- `snow_schedule_cab_meeting` - CAB meetings
|
|
323
|
-
- `snow_create_va_topic` - Virtual Agent topics
|
|
324
|
-
- `snow_create_pa_indicator` - PA indicators
|
|
325
|
-
- `snow_get_pa_scores` - Performance scores
|
|
326
|
-
|
|
327
|
-
### 14. 📱 **Flow, Workspace & Mobile Server** (20+ tools)
|
|
328
|
-
Flow Designer, Workspace, and Mobile app management
|
|
329
|
-
- `snow_list_flows` - List and discover flows
|
|
330
|
-
- `snow_execute_flow` - Execute existing flows
|
|
331
|
-
- `snow_get_flow_execution_status` - Monitor flow execution
|
|
332
|
-
- `snow_get_flow_execution_history` - View execution history
|
|
333
|
-
- `snow_get_flow_details` - Get flow configuration details
|
|
334
|
-
- `snow_import_flow_from_xml` - Import flows from XML (only programmatic creation method)
|
|
335
|
-
- `snow_create_workspace` - Create workspaces
|
|
336
|
-
- `snow_configure_mobile_app` - Mobile config
|
|
337
|
-
- `snow_send_push_notification` - Push notifications
|
|
338
|
-
|
|
339
|
-
### 15. 🗄️ **CMDB, Event, HR, CSM & DevOps Server** (23+ tools)
|
|
340
|
-
Configuration, Events, HR, Customer Service, DevOps
|
|
341
|
-
- `snow_create_ci` - Create CIs
|
|
342
|
-
- `snow_run_discovery` - Run discovery
|
|
343
|
-
- `snow_create_event` - Create events
|
|
344
|
-
- `snow_employee_onboarding` - HR onboarding
|
|
345
|
-
- `snow_create_devops_pipeline` - DevOps pipelines
|
|
346
|
-
|
|
347
|
-
### 16. ⚡ **Advanced Features Server** (14+ tools)
|
|
348
|
-
Advanced optimization and analysis capabilities
|
|
349
|
-
- `snow_batch_api` - Batch operations (80% API reduction)
|
|
350
|
-
- `snow_get_table_relationships` - Table analysis
|
|
351
|
-
- `snow_discover_process` - Process mining
|
|
352
|
-
- `snow_analyze_workflow_execution` - Workflow analysis
|
|
353
|
-
- `snow_generate_documentation` - Auto-documentation
|
|
354
|
-
|
|
355
|
-
### 17. 👑 **Orchestration Server** (25+ tools)
|
|
356
|
-
Multi-agent coordination
|
|
357
|
-
- `snow_swarm_init` - Initialize swarms
|
|
358
|
-
- `snow_agent_spawn` - Create agents
|
|
359
|
-
- `snow_memory_store` - Persistent memory
|
|
360
|
-
- `snow_task_orchestrate` - Task management
|
|
361
|
-
|
|
362
|
-
## 📝 ES5 JavaScript - The ServiceNow Reality
|
|
363
|
-
|
|
364
|
-
ServiceNow uses the Rhino JavaScript engine which only supports ES5. Snow-Flow handles this automatically:
|
|
365
|
-
|
|
366
|
-
### ❌ What Doesn't Work in ServiceNow:
|
|
367
|
-
```javascript
|
|
368
|
-
// Modern JavaScript that WILL FAIL in ServiceNow:
|
|
369
|
-
const name = 'John'; // const/let not supported
|
|
370
|
-
let items = []; // use var instead
|
|
371
|
-
const add = (a, b) => a + b; // arrow functions fail
|
|
372
|
-
var msg = `Hello ${name}`; // template literals fail
|
|
373
|
-
var {x, y} = point; // destructuring fails
|
|
374
|
-
for (let item of items) { } // for...of fails
|
|
375
|
-
async function getData() { } // async/await fails
|
|
376
|
-
items.map(x => x * 2); // array methods limited
|
|
377
|
-
class Widget { } // classes not supported
|
|
378
|
-
enum Status { ACTIVE, INACTIVE } // enums not supported
|
|
117
|
+
# You'll see:
|
|
118
|
+
# 🚀 Would you like to start Claude Code with MCP servers automatically? (Y/n)
|
|
119
|
+
# Press Y to launch Claude Code with all MCP servers ready to use!
|
|
379
120
|
```
|
|
380
121
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
function add(a, b) { return a + b; }
|
|
387
|
-
var msg = 'Hello ' + name;
|
|
388
|
-
var x = point.x, y = point.y;
|
|
389
|
-
for (var i = 0; i < items.length; i++) { }
|
|
390
|
-
function getData(callback) { }
|
|
391
|
-
var doubled = [];
|
|
392
|
-
for (var i = 0; i < items.length; i++) {
|
|
393
|
-
doubled.push(items[i] * 2);
|
|
394
|
-
}
|
|
395
|
-
function Widget() { }
|
|
396
|
-
var Status = { ACTIVE: 'active', INACTIVE: 'inactive' };
|
|
397
|
-
```
|
|
122
|
+
The MCP servers are automatically:
|
|
123
|
+
- ✅ Configured with correct paths for global npm installations
|
|
124
|
+
- ✅ Registered in Claude Code's settings
|
|
125
|
+
- ✅ Activated without manual approval steps
|
|
126
|
+
- ✅ Ready to use immediately after initialization
|
|
398
127
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
### Core Commands
|
|
128
|
+
If you need to manually activate MCP servers later:
|
|
402
129
|
```bash
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
130
|
+
# For Mac/Linux:
|
|
131
|
+
claude --mcp-config .mcp.json .
|
|
132
|
+
|
|
133
|
+
# For Windows:
|
|
134
|
+
claude.exe --mcp-config .mcp.json .
|
|
407
135
|
```
|
|
408
136
|
|
|
409
|
-
|
|
137
|
+
## 💡 Usage Examples
|
|
138
|
+
|
|
139
|
+
### Create a Complex Flow with Natural Language
|
|
410
140
|
```bash
|
|
411
|
-
snow-flow
|
|
412
|
-
snow-flow agent spawn coder # Create coding agent
|
|
413
|
-
snow-flow agent list # List active agents
|
|
141
|
+
snow-flow sparc "Create an approval workflow for iPhone 6 orders that notifies managers, creates tasks, and updates inventory"
|
|
414
142
|
```
|
|
415
143
|
|
|
416
|
-
###
|
|
144
|
+
### Deploy a Widget Directly to ServiceNow
|
|
417
145
|
```bash
|
|
418
|
-
snow-flow
|
|
419
|
-
snow-flow task list # View task queue
|
|
420
|
-
snow-flow task status # Check task progress
|
|
146
|
+
snow-flow sparc "Create and deploy a widget that shows all critical incidents with real-time updates"
|
|
421
147
|
```
|
|
422
148
|
|
|
423
|
-
###
|
|
149
|
+
### Start a Multi-Agent Swarm for Complex Projects
|
|
424
150
|
```bash
|
|
425
|
-
|
|
426
|
-
snow-flow
|
|
427
|
-
|
|
428
|
-
|
|
151
|
+
# Most intelligent features are enabled by default!
|
|
152
|
+
snow-flow swarm "Build a complete incident management system with dashboard, workflows, and notifications"
|
|
153
|
+
|
|
154
|
+
# Default settings:
|
|
155
|
+
# ✅ --smart-discovery (true) - Reuses existing artifacts
|
|
156
|
+
# ✅ --live-testing (true) - Tests in real-time
|
|
157
|
+
# ✅ --auto-deploy (true) - Deploys automatically (safe with update sets)
|
|
158
|
+
# ✅ --auto-rollback (true) - Rollbacks on failures
|
|
159
|
+
# ✅ --shared-memory (true) - Agents share context
|
|
160
|
+
# ✅ --progress-monitoring (true) - Real-time status
|
|
161
|
+
|
|
162
|
+
# Add --auto-permissions to enable automatic permission escalation
|
|
163
|
+
snow-flow swarm "Create enterprise workflow" --auto-permissions
|
|
164
|
+
|
|
165
|
+
# Disable specific features with --no- prefix
|
|
166
|
+
snow-flow swarm "Test workflow" --no-auto-deploy --no-live-testing
|
|
429
167
|
```
|
|
430
168
|
|
|
431
|
-
###
|
|
169
|
+
### Intelligent Artifact Discovery
|
|
432
170
|
```bash
|
|
433
|
-
snow-flow
|
|
434
|
-
snow-flow memory get "api_key" # Retrieve data
|
|
435
|
-
snow-flow memory list # List all keys
|
|
436
|
-
snow-flow memory export backup.json # Export memory
|
|
171
|
+
snow-flow sparc "Find and modify the approval workflow to add an extra approval step for orders over $1000"
|
|
437
172
|
```
|
|
438
173
|
|
|
439
|
-
###
|
|
174
|
+
### Create Flows in Dutch
|
|
440
175
|
```bash
|
|
441
|
-
snow-flow
|
|
442
|
-
--strategy development \
|
|
443
|
-
--mode hierarchical \
|
|
444
|
-
--max-agents 10 \
|
|
445
|
-
--parallel \
|
|
446
|
-
--monitor \
|
|
447
|
-
--auto-deploy
|
|
176
|
+
snow-flow sparc "Maak een flow voor het automatisch toewijzen van incidenten aan de juiste groep op basis van categorie"
|
|
448
177
|
```
|
|
449
178
|
|
|
450
|
-
##
|
|
179
|
+
## 🛠️ Advanced Features
|
|
451
180
|
|
|
452
|
-
###
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
- Client Secret: (set your secret)
|
|
459
|
-
- Redirect URL: `http://localhost:3000/oauth/callback`
|
|
460
|
-
4. Save and copy the Client ID and Secret
|
|
181
|
+
### Flow vs Subflow Intelligence
|
|
182
|
+
Snow-Flow automatically analyzes your requirements and decides whether to create a main flow or break it into reusable subflows:
|
|
183
|
+
- Complexity analysis
|
|
184
|
+
- Reusability assessment
|
|
185
|
+
- Performance optimization
|
|
186
|
+
- Maintainability considerations
|
|
461
187
|
|
|
462
|
-
###
|
|
463
|
-
|
|
464
|
-
```env
|
|
465
|
-
SNOW_INSTANCE=your-instance.service-now.com
|
|
466
|
-
SNOW_CLIENT_ID=your-client-id
|
|
467
|
-
SNOW_CLIENT_SECRET=your-client-secret
|
|
468
|
-
SNOW_USERNAME=admin
|
|
469
|
-
SNOW_PASSWORD=your-password
|
|
470
|
-
```
|
|
471
|
-
|
|
472
|
-
### First Authentication
|
|
188
|
+
### Update Set Management
|
|
189
|
+
Professional change tracking just like ServiceNow developers use:
|
|
473
190
|
```bash
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
191
|
+
# Create a new update set for your feature
|
|
192
|
+
snow-flow sparc "Create update set for new approval features"
|
|
193
|
+
|
|
194
|
+
# All subsequent changes are automatically tracked
|
|
195
|
+
snow-flow sparc "Add approval widget to portal"
|
|
477
196
|
```
|
|
478
197
|
|
|
479
|
-
|
|
198
|
+
### Global Scope Strategy
|
|
199
|
+
Intelligent deployment scope selection:
|
|
200
|
+
- Automatic permission validation
|
|
201
|
+
- Fallback mechanisms for restricted environments
|
|
202
|
+
- Environment-aware deployment (dev/test/prod)
|
|
480
203
|
|
|
481
|
-
###
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
-
|
|
485
|
-
-
|
|
486
|
-
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
# Snow-Flow will create, test, and deploy everything
|
|
491
|
-
```
|
|
204
|
+
### Template Matching
|
|
205
|
+
Recognizes common patterns and applies best practices:
|
|
206
|
+
- Approval workflows
|
|
207
|
+
- Fulfillment processes
|
|
208
|
+
- Notification systems
|
|
209
|
+
- Integration patterns
|
|
210
|
+
|
|
211
|
+
## 🔧 New MCP Tools (v1.1.44+)
|
|
492
212
|
|
|
493
|
-
###
|
|
213
|
+
### Catalog Item Search with Fuzzy Matching
|
|
214
|
+
Find catalog items even when you don't know the exact name:
|
|
494
215
|
```javascript
|
|
495
|
-
//
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
script: `
|
|
502
|
-
(function executeRule(current, previous) {
|
|
503
|
-
// Get on-call engineer
|
|
504
|
-
var oncall = new GlideRecord('cmn_rota_member');
|
|
505
|
-
oncall.addQuery('rota', 'critical_response_team');
|
|
506
|
-
oncall.addQuery('active', true);
|
|
507
|
-
oncall.query();
|
|
508
|
-
|
|
509
|
-
if (oncall.next()) {
|
|
510
|
-
current.assigned_to = oncall.getValue('user');
|
|
511
|
-
gs.addInfoMessage('Critical incident assigned to on-call engineer');
|
|
512
|
-
}
|
|
513
|
-
})(current, previous);
|
|
514
|
-
`
|
|
216
|
+
// In Claude Code with MCP tools
|
|
217
|
+
snow_catalog_item_search({
|
|
218
|
+
query: "iPhone", // Finds iPhone 6S, iPhone 7, etc.
|
|
219
|
+
fuzzy_match: true, // Intelligent variations
|
|
220
|
+
category_filter: "mobile devices",
|
|
221
|
+
include_variables: true // Get catalog variables
|
|
515
222
|
});
|
|
516
223
|
```
|
|
517
224
|
|
|
518
|
-
###
|
|
519
|
-
|
|
520
|
-
# Create complete application with single command
|
|
521
|
-
snow-flow sparc tdd "Employee onboarding application with:
|
|
522
|
-
- Request form with approval workflow
|
|
523
|
-
- Automated account provisioning
|
|
524
|
-
- Task assignments to IT, HR, Facilities
|
|
525
|
-
- Progress tracking dashboard
|
|
526
|
-
- Email notifications at each step"
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
## 🛠️ Advanced Features
|
|
530
|
-
|
|
531
|
-
### Batch API Operations
|
|
532
|
-
Reduce API calls by 80% with intelligent batching:
|
|
225
|
+
### Flow Testing with Mock Data
|
|
226
|
+
Test flows without affecting production data:
|
|
533
227
|
```javascript
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
228
|
+
snow_test_flow_with_mock({
|
|
229
|
+
flow_id: "equipment_provisioning_flow",
|
|
230
|
+
create_test_user: true, // Auto-creates test user
|
|
231
|
+
mock_catalog_items: true, // Creates test items
|
|
232
|
+
mock_catalog_data: [
|
|
233
|
+
{
|
|
234
|
+
name: "Test iPhone 6S",
|
|
235
|
+
price: "699.00"
|
|
236
|
+
}
|
|
539
237
|
],
|
|
540
|
-
|
|
238
|
+
simulate_approvals: true, // Auto-approves
|
|
239
|
+
cleanup_after_test: true // Removes test data
|
|
541
240
|
});
|
|
542
241
|
```
|
|
543
242
|
|
|
544
|
-
###
|
|
545
|
-
|
|
243
|
+
### Direct Catalog-Flow Linking
|
|
244
|
+
Link catalog items directly to flows for automated fulfillment:
|
|
546
245
|
```javascript
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
246
|
+
snow_link_catalog_to_flow({
|
|
247
|
+
catalog_item_id: "iPhone 6S",
|
|
248
|
+
flow_id: "mobile_provisioning_flow",
|
|
249
|
+
link_type: "flow_catalog_process", // Modern approach
|
|
250
|
+
variable_mapping: [
|
|
251
|
+
{
|
|
252
|
+
catalog_variable: "phone_model",
|
|
253
|
+
flow_input: "device_type"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
catalog_variable: "user_department",
|
|
257
|
+
flow_input: "department"
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
trigger_condition: 'current.stage == "request_approved"',
|
|
261
|
+
execution_options: {
|
|
262
|
+
run_as: "user", // 🔒 SEC-001 FIX: Default to 'user' to prevent privilege escalation
|
|
263
|
+
wait_for_completion: true
|
|
264
|
+
},
|
|
265
|
+
test_link: true // Creates test request
|
|
553
266
|
});
|
|
554
|
-
// Returns process flow, bottlenecks, and optimization opportunities
|
|
555
267
|
```
|
|
556
268
|
|
|
557
|
-
###
|
|
269
|
+
### Bulk Deployment
|
|
270
|
+
Deploy multiple artifacts in a single transaction:
|
|
558
271
|
```javascript
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
272
|
+
snow_bulk_deploy({
|
|
273
|
+
artifacts: [
|
|
274
|
+
{ type: "widget", data: widgetData },
|
|
275
|
+
{ type: "flow", data: flowData },
|
|
276
|
+
{ type: "script", data: scriptData }
|
|
277
|
+
],
|
|
278
|
+
transaction_mode: true, // All-or-nothing deployment
|
|
279
|
+
parallel: true, // Deploy simultaneously
|
|
280
|
+
dry_run: false
|
|
564
281
|
});
|
|
565
282
|
```
|
|
566
283
|
|
|
567
|
-
##
|
|
284
|
+
## 📁 Project Structure
|
|
568
285
|
|
|
569
|
-
Snow-Flow is built with:
|
|
570
|
-
- **TypeScript** - Type-safe development
|
|
571
|
-
- **Node.js 18+** - Modern JavaScript runtime
|
|
572
|
-
- **MCP (Model Context Protocol)** - Standardized AI-tool communication
|
|
573
|
-
- **TensorFlow.js** - Machine learning capabilities
|
|
574
|
-
- **OAuth 2.0** - Secure authentication
|
|
575
|
-
- **WebSocket** - Real-time communication
|
|
576
|
-
|
|
577
|
-
### Directory Structure
|
|
578
286
|
```
|
|
579
287
|
snow-flow/
|
|
580
288
|
├── src/
|
|
581
|
-
│ ├── mcp/
|
|
582
|
-
│
|
|
583
|
-
│
|
|
584
|
-
│ ├──
|
|
585
|
-
│ ├──
|
|
586
|
-
│
|
|
587
|
-
|
|
588
|
-
├──
|
|
589
|
-
├── memory/
|
|
590
|
-
└──
|
|
289
|
+
│ ├── mcp/ # 11 MCP server implementations
|
|
290
|
+
│ ├── orchestrator/ # Flow composition and intelligence
|
|
291
|
+
│ ├── strategies/ # Deployment and scope strategies
|
|
292
|
+
│ ├── api/ # ServiceNow API integration
|
|
293
|
+
│ ├── managers/ # Resource and scope management
|
|
294
|
+
│ └── utils/ # Utilities and helpers
|
|
295
|
+
├── .snow-flow/ # Snow-Flow configuration
|
|
296
|
+
├── .claude/ # Claude configuration
|
|
297
|
+
├── memory/ # Persistent agent memory
|
|
298
|
+
└── coordination/ # Multi-agent coordination
|
|
591
299
|
```
|
|
592
300
|
|
|
593
|
-
##
|
|
301
|
+
## 🔧 Development Commands
|
|
594
302
|
|
|
595
|
-
### Enable Debug Mode
|
|
596
303
|
```bash
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
```
|
|
304
|
+
# Run tests
|
|
305
|
+
npm test
|
|
600
306
|
|
|
601
|
-
|
|
307
|
+
# Run linting
|
|
308
|
+
npm run lint
|
|
602
309
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
# Snow-Flow automatically converts to ES5, but you can test:
|
|
606
|
-
snow-flow validate-es5 myScript.js
|
|
607
|
-
```
|
|
310
|
+
# Type checking
|
|
311
|
+
npm run typecheck
|
|
608
312
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
# Validate widget coherence:
|
|
612
|
-
snow-flow validate-widget myWidget.js
|
|
613
|
-
```
|
|
313
|
+
# Development mode
|
|
314
|
+
npm run dev
|
|
614
315
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
# Refresh OAuth token:
|
|
618
|
-
snow-flow auth refresh
|
|
316
|
+
# Build for production
|
|
317
|
+
npm run build
|
|
619
318
|
```
|
|
620
319
|
|
|
621
|
-
##
|
|
320
|
+
## 📚 Documentation
|
|
622
321
|
|
|
623
|
-
|
|
624
|
-
-
|
|
625
|
-
-
|
|
626
|
-
-
|
|
627
|
-
- **Connection pooling** for optimal performance
|
|
628
|
-
- **Parallel execution** where possible
|
|
629
|
-
- **Smart caching** of frequently accessed data
|
|
322
|
+
- [MCP Server Documentation](./MCP_SERVERS.md) - Detailed info on all 11 MCP servers
|
|
323
|
+
- [OAuth Setup Guide](./SERVICENOW-OAUTH-SETUP.md) - ServiceNow OAuth configuration
|
|
324
|
+
- [Update Set Guide](./UPDATE_SET_DEPLOYMENT_GUIDE.md) - Professional change management
|
|
325
|
+
- [API Integration Guide](./API_INTEGRATION_GUIDE.md) - ServiceNow API details
|
|
630
326
|
|
|
631
327
|
## 🤝 Contributing
|
|
632
328
|
|
|
633
|
-
We welcome contributions!
|
|
329
|
+
We welcome contributions! Please see our contributing guidelines (coming soon).
|
|
634
330
|
|
|
635
|
-
|
|
636
|
-
```bash
|
|
637
|
-
git clone https://github.com/groeimetai/snow-flow.git
|
|
638
|
-
cd snow-flow
|
|
639
|
-
npm install
|
|
640
|
-
npm run build
|
|
641
|
-
npm link # Use local version globally
|
|
642
|
-
```
|
|
331
|
+
## 🔒 Security
|
|
643
332
|
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
npm run test:integration # Integration tests
|
|
649
|
-
npm run typecheck # TypeScript validation
|
|
650
|
-
```
|
|
333
|
+
- All credentials stored securely in environment variables
|
|
334
|
+
- OAuth 2.0 authentication with ServiceNow
|
|
335
|
+
- No hardcoded values - everything discovered dynamically
|
|
336
|
+
- Secure token management with automatic refresh
|
|
651
337
|
|
|
652
|
-
##
|
|
338
|
+
## 🎯 Use Cases
|
|
653
339
|
|
|
654
|
-
|
|
655
|
-
-
|
|
656
|
-
-
|
|
657
|
-
-
|
|
340
|
+
### For ServiceNow Developers
|
|
341
|
+
- Rapidly prototype flows and workflows
|
|
342
|
+
- Automate repetitive development tasks
|
|
343
|
+
- Ensure consistency across implementations
|
|
344
|
+
- Reduce development time by 80%
|
|
658
345
|
|
|
659
|
-
|
|
346
|
+
### For ServiceNow Architects
|
|
347
|
+
- Validate architectural decisions
|
|
348
|
+
- Ensure best practices are followed
|
|
349
|
+
- Analyze impact of changes
|
|
350
|
+
- Optimize performance and maintainability
|
|
660
351
|
|
|
661
|
-
###
|
|
662
|
-
-
|
|
663
|
-
-
|
|
664
|
-
-
|
|
665
|
-
-
|
|
666
|
-
- [ ] GraphQL API support
|
|
667
|
-
- [ ] Real-time collaboration features
|
|
352
|
+
### For ServiceNow Administrators
|
|
353
|
+
- Quick deployments and updates
|
|
354
|
+
- Professional change tracking
|
|
355
|
+
- Automated testing and validation
|
|
356
|
+
- Simplified migration between instances
|
|
668
357
|
|
|
669
|
-
|
|
670
|
-
- [x] Widget coherence validation
|
|
671
|
-
- [x] ES5 automatic conversion
|
|
672
|
-
- [x] Full output capture for scripts
|
|
673
|
-
- [x] Machine learning integration
|
|
674
|
-
- [ ] Visual workflow designer
|
|
675
|
-
- [ ] Performance profiler
|
|
358
|
+
## 🚦 Roadmap
|
|
676
359
|
|
|
677
|
-
|
|
360
|
+
- [ ] Visual flow designer integration
|
|
361
|
+
- [ ] Enhanced Neo4j graph visualization
|
|
362
|
+
- [ ] Multi-instance synchronization
|
|
363
|
+
- [ ] AI-powered code review
|
|
364
|
+
- [ ] Automated testing framework
|
|
365
|
+
- [ ] Performance optimization recommendations
|
|
678
366
|
|
|
679
|
-
|
|
680
|
-
- **Discussions**: [Ask questions and share ideas](https://github.com/groeimetai/snow-flow/discussions)
|
|
681
|
-
- **Email**: snow-flow@example.com
|
|
367
|
+
## 🆕 What's New in v1.1.25
|
|
682
368
|
|
|
683
|
-
|
|
369
|
+
### Automatic MCP Server Activation 🎯
|
|
370
|
+
- **Interactive Prompt**: During `snow-flow init`, you're now prompted to automatically start Claude Code with all MCP servers
|
|
371
|
+
- **Zero Manual Steps**: No more manual MCP approval in Claude Code - servers load automatically using `claude --mcp-config`
|
|
372
|
+
- **Cross-Platform Support**: Works on Mac, Linux, and Windows with platform-specific activation scripts
|
|
373
|
+
- **Instant Availability**: All 11 ServiceNow MCP servers are immediately available in Claude Code after initialization
|
|
684
374
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
6. **Active Development** - Regular updates and new features
|
|
691
|
-
7. **Open Source** - MIT licensed, free forever
|
|
375
|
+
### Previous Updates
|
|
376
|
+
- **v1.1.24**: Added `snow-flow mcp debug` command for troubleshooting MCP configurations
|
|
377
|
+
- **v1.1.23**: Fixed .npmignore to include essential .claude configuration files
|
|
378
|
+
- **v1.1.22**: Verified global npm installation correctly registers all MCP servers
|
|
379
|
+
- **v1.1.20**: Added enabledMcpjsonServers to ensure MCP visibility in Claude Code
|
|
692
380
|
|
|
693
|
-
##
|
|
381
|
+
## 📝 License
|
|
694
382
|
|
|
695
|
-
MIT License - see
|
|
383
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
696
384
|
|
|
697
385
|
## 🙏 Acknowledgments
|
|
698
386
|
|
|
699
|
-
Special thanks to
|
|
700
|
-
- The ServiceNow developer community
|
|
701
|
-
- Anthropic for Claude AI
|
|
702
|
-
- Contributors and early adopters
|
|
703
|
-
- Everyone who reported bugs and suggested features
|
|
387
|
+
Built with the power of Claude AI and the ServiceNow platform. Special thanks to the ServiceNow developer community for inspiration and best practices.
|
|
704
388
|
|
|
705
389
|
---
|
|
706
390
|
|
|
707
|
-
**
|
|
708
|
-
|
|
709
|
-
*Snow-Flow - Where ServiceNow development meets artificial intelligence.* 🏔️
|
|
391
|
+
**Ready to revolutionize your ServiceNow development?** Start with `snow-flow init` and experience the future of ServiceNow automation! 🚀
|
package/dist/cli.js
CHANGED
|
@@ -2431,7 +2431,7 @@ async function createMCPConfig(targetDir, force = false) {
|
|
|
2431
2431
|
.replace(/{{SNOW_FLOW_ENV}}/g, '${SNOW_FLOW_ENV}');
|
|
2432
2432
|
// Parse to ensure it's valid JSON
|
|
2433
2433
|
const mcpConfig = JSON.parse(mcpConfigContent);
|
|
2434
|
-
//
|
|
2434
|
+
// Keep the standard MCP structure that Claude Code expects
|
|
2435
2435
|
const finalConfig = {
|
|
2436
2436
|
"mcpServers": mcpConfig.servers
|
|
2437
2437
|
};
|
package/memory/agents/README.md
CHANGED
|
@@ -1,31 +1,3 @@
|
|
|
1
|
-
# Agent Memory
|
|
1
|
+
# Agent Memory
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
This directory stores agent-specific memory data, configurations, and persistent state information for individual Claude agents in the orchestration system.
|
|
5
|
-
|
|
6
|
-
## Structure
|
|
7
|
-
Each agent gets its own subdirectory for isolated memory storage:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
memory/agents/
|
|
11
|
-
├── agent_001/
|
|
12
|
-
│ ├── state.json # Agent state and configuration
|
|
13
|
-
│ ├── knowledge.md # Agent-specific knowledge base
|
|
14
|
-
│ ├── tasks.json # Completed and active tasks
|
|
15
|
-
│ └── calibration.json # Agent-specific calibrations
|
|
16
|
-
├── agent_002/
|
|
17
|
-
│ └── ...
|
|
18
|
-
└── shared/
|
|
19
|
-
├── common_knowledge.md # Shared knowledge across agents
|
|
20
|
-
└── global_config.json # Global agent configurations
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Usage Guidelines
|
|
24
|
-
1. **Agent Isolation**: Each agent should only read/write to its own directory
|
|
25
|
-
2. **Shared Resources**: Use the `shared/` directory for cross-agent information
|
|
26
|
-
3. **State Persistence**: Update state.json whenever agent status changes
|
|
27
|
-
4. **Knowledge Sharing**: Document discoveries in knowledge.md files
|
|
28
|
-
5. **Cleanup**: Remove directories for terminated agents periodically
|
|
29
|
-
|
|
30
|
-
## Last Updated
|
|
31
|
-
2025-08-07T21:13:17.654Z
|
|
3
|
+
This directory contains persistent memory for ServiceNow agents.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snow-flow",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.27",
|
|
4
4
|
"description": "ServiceNow development framework with MCP server integration. Executes background scripts using ES5 JavaScript only (ServiceNow Rhino engine requirement). Provides 17 MCP servers for complete ServiceNow operations including widget deployment with coherence validation, table operations, script execution, machine learning, advanced features, and comprehensive platform management.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "commonjs",
|