snow-flow 3.4.13 → 3.4.15

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.
@@ -0,0 +1,750 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Snow-Flow - Advanced ServiceNow Development Framework</title>
7
+ <link rel="stylesheet" href="css/style.css">
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
11
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css">
12
+ </head>
13
+ <body>
14
+ <!-- Navigation -->
15
+ <nav class="navbar">
16
+ <div class="container">
17
+ <div class="nav-brand">
18
+ <span class="logo">🏔️❄️</span>
19
+ <span class="brand-name">Snow-Flow</span>
20
+ </div>
21
+ <ul class="nav-menu">
22
+ <li><a href="#home" class="nav-link">Home</a></li>
23
+ <li><a href="#features" class="nav-link">Features</a></li>
24
+ <li><a href="#mcp-servers" class="nav-link">MCP Servers</a></li>
25
+ <li><a href="#installation" class="nav-link">Installation</a></li>
26
+ <li><a href="#examples" class="nav-link">Examples</a></li>
27
+ <li><a href="#api" class="nav-link">API</a></li>
28
+ <li><a href="https://github.com/groeimetai/snow-flow" class="nav-link github">GitHub</a></li>
29
+ </ul>
30
+ <div class="hamburger">
31
+ <span></span>
32
+ <span></span>
33
+ <span></span>
34
+ </div>
35
+ </div>
36
+ </nav>
37
+
38
+ <!-- Hero Section -->
39
+ <section id="home" class="hero">
40
+ <div class="container">
41
+ <div class="hero-content">
42
+ <div class="hero-logo">🏔️❄️</div>
43
+ <h1 class="hero-title">Snow-Flow</h1>
44
+ <p class="hero-subtitle">Advanced ServiceNow Development Framework with AI-Powered Automation</p>
45
+ <p class="hero-description">
46
+ Snow-Flow is a cutting-edge development framework that revolutionizes ServiceNow development through
47
+ intelligent automation, multi-agent coordination, and the Model Context Protocol (MCP).
48
+ </p>
49
+ <div class="hero-buttons">
50
+ <a href="#installation" class="btn btn-primary">Get Started</a>
51
+ <a href="#features" class="btn btn-secondary">Learn More</a>
52
+ </div>
53
+ <div class="hero-stats">
54
+ <div class="stat">
55
+ <span class="stat-number">16+</span>
56
+ <span class="stat-label">MCP Servers</span>
57
+ </div>
58
+ <div class="stat">
59
+ <span class="stat-number">200+</span>
60
+ <span class="stat-label">Tools</span>
61
+ </div>
62
+ <div class="stat">
63
+ <span class="stat-number">80%</span>
64
+ <span class="stat-label">API Reduction</span>
65
+ </div>
66
+ <div class="stat">
67
+ <span class="stat-number">100%</span>
68
+ <span class="stat-label">Real Data</span>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ </section>
74
+
75
+ <!-- What is Snow-Flow -->
76
+ <section class="what-is">
77
+ <div class="container">
78
+ <h2 class="section-title">What is Snow-Flow?</h2>
79
+ <div class="what-is-grid">
80
+ <div class="what-is-card">
81
+ <div class="card-icon">🤖</div>
82
+ <h3>AI-Powered Development</h3>
83
+ <p>Snow-Flow integrates Claude AI for intelligent code generation, pattern recognition, and automated development workflows. It understands ServiceNow's ES5 JavaScript requirements and generates production-ready code.</p>
84
+ </div>
85
+ <div class="what-is-card">
86
+ <div class="card-icon">🔄</div>
87
+ <h3>Multi-Agent Orchestration</h3>
88
+ <p>Coordinate multiple specialized agents working in parallel. From researchers to coders, testers to deployers - Snow-Flow manages complex development tasks through intelligent agent swarms.</p>
89
+ </div>
90
+ <div class="what-is-card">
91
+ <div class="card-icon">⚡</div>
92
+ <h3>MCP Integration</h3>
93
+ <p>Built on the Model Context Protocol, Snow-Flow provides 16+ specialized MCP servers that handle everything from widget deployment to machine learning, each with dedicated tools for ServiceNow operations.</p>
94
+ </div>
95
+ <div class="what-is-card">
96
+ <div class="card-icon">📊</div>
97
+ <h3>Real-Time Analytics</h3>
98
+ <p>No mock data ever! Snow-Flow connects directly to your ServiceNow instance, providing real-time analytics, performance monitoring, and data-driven insights from actual production data.</p>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ </section>
103
+
104
+ <!-- Features Section -->
105
+ <section id="features" class="features">
106
+ <div class="container">
107
+ <h2 class="section-title">Core Features</h2>
108
+ <div class="features-grid">
109
+ <div class="feature">
110
+ <div class="feature-icon">🚀</div>
111
+ <h3>Instant Deployment</h3>
112
+ <p>Deploy widgets, flows, and applications directly to ServiceNow with automatic coherence validation and rollback capabilities.</p>
113
+ </div>
114
+ <div class="feature">
115
+ <div class="feature-icon">🧠</div>
116
+ <h3>Machine Learning</h3>
117
+ <p>Built-in TensorFlow.js integration for incident classification, anomaly detection, and predictive analytics.</p>
118
+ </div>
119
+ <div class="feature">
120
+ <div class="feature-icon">✅</div>
121
+ <h3>ES5 Validation</h3>
122
+ <p>Automatic conversion and validation of JavaScript code to ensure compatibility with ServiceNow's Rhino engine.</p>
123
+ </div>
124
+ <div class="feature">
125
+ <div class="feature-icon">📝</div>
126
+ <h3>Script Execution</h3>
127
+ <p>Execute background scripts with full output capture, including gs.print, gs.info, gs.warn, and gs.error messages.</p>
128
+ </div>
129
+ <div class="feature">
130
+ <div class="feature-icon">🔍</div>
131
+ <h3>Smart Discovery</h3>
132
+ <p>Automatically discover tables, fields, relationships, and dependencies in your ServiceNow instance.</p>
133
+ </div>
134
+ <div class="feature">
135
+ <div class="feature-icon">🔒</div>
136
+ <h3>Security & Compliance</h3>
137
+ <p>Built-in security scanning, compliance checking, and access control validation for SOX, GDPR, and HIPAA.</p>
138
+ </div>
139
+ </div>
140
+ </div>
141
+ </section>
142
+
143
+ <!-- MCP Servers Section -->
144
+ <section id="mcp-servers" class="mcp-servers">
145
+ <div class="container">
146
+ <h2 class="section-title">MCP Servers & Tools</h2>
147
+ <p class="section-subtitle">Snow-Flow includes 16+ specialized MCP servers, each providing powerful tools for ServiceNow development</p>
148
+
149
+ <div class="mcp-grid">
150
+ <!-- ServiceNow Deployment MCP -->
151
+ <div class="mcp-card">
152
+ <div class="mcp-header">
153
+ <h3>🚀 Deployment Server</h3>
154
+ <span class="mcp-badge">40+ Tools</span>
155
+ </div>
156
+ <p class="mcp-description">Widget and artifact deployment with automatic coherence validation</p>
157
+ <div class="mcp-tools">
158
+ <h4>Key Tools:</h4>
159
+ <ul>
160
+ <li><code>snow_deploy_widget</code> - Deploy widgets with validation</li>
161
+ <li><code>snow_deploy_portal_page</code> - Deploy portal pages</li>
162
+ <li><code>snow_deploy_flow</code> - Deploy Flow Designer flows</li>
163
+ <li><code>snow_create_update_set</code> - Create update sets</li>
164
+ <li><code>snow_validate_deployment</code> - Validate deployments</li>
165
+ <li><code>snow_rollback_deployment</code> - Rollback on failure</li>
166
+ </ul>
167
+ </div>
168
+ </div>
169
+
170
+ <!-- ServiceNow Operations MCP -->
171
+ <div class="mcp-card">
172
+ <div class="mcp-header">
173
+ <h3>⚙️ Operations Server</h3>
174
+ <span class="mcp-badge">30+ Tools</span>
175
+ </div>
176
+ <p class="mcp-description">Core ServiceNow operations and CRUD functionality</p>
177
+ <div class="mcp-tools">
178
+ <h4>Key Tools:</h4>
179
+ <ul>
180
+ <li><code>snow_query_table</code> - Universal table querying</li>
181
+ <li><code>snow_create_incident</code> - Create incidents</li>
182
+ <li><code>snow_update_record</code> - Update any record</li>
183
+ <li><code>snow_discover_table_fields</code> - Discover schema</li>
184
+ <li><code>snow_cmdb_search</code> - Search CMDB</li>
185
+ <li><code>snow_get_by_sysid</code> - Get record by sys_id</li>
186
+ </ul>
187
+ </div>
188
+ </div>
189
+
190
+ <!-- ServiceNow Automation MCP -->
191
+ <div class="mcp-card">
192
+ <div class="mcp-header">
193
+ <h3>🤖 Automation Server</h3>
194
+ <span class="mcp-badge">25+ Tools</span>
195
+ </div>
196
+ <p class="mcp-description">Script execution and automation with output capture</p>
197
+ <div class="mcp-tools">
198
+ <h4>Key Tools:</h4>
199
+ <ul>
200
+ <li><code>snow_execute_script_with_output</code> - Execute with output</li>
201
+ <li><code>snow_get_script_output</code> - Retrieve execution history</li>
202
+ <li><code>snow_execute_script_sync</code> - Synchronous execution</li>
203
+ <li><code>snow_get_logs</code> - Access system logs</li>
204
+ <li><code>snow_test_rest_connection</code> - Test REST APIs</li>
205
+ <li><code>snow_trace_execution</code> - Trace execution</li>
206
+ </ul>
207
+ </div>
208
+ </div>
209
+
210
+ <!-- ServiceNow Machine Learning MCP -->
211
+ <div class="mcp-card">
212
+ <div class="mcp-header">
213
+ <h3>🧠 Machine Learning Server</h3>
214
+ <span class="mcp-badge">20+ Tools</span>
215
+ </div>
216
+ <p class="mcp-description">AI/ML capabilities with TensorFlow.js integration</p>
217
+ <div class="mcp-tools">
218
+ <h4>Key Tools:</h4>
219
+ <ul>
220
+ <li><code>snow_train_classifier</code> - Train incident classifier</li>
221
+ <li><code>snow_predict_change_risk</code> - Predict risks</li>
222
+ <li><code>snow_detect_anomalies</code> - Anomaly detection</li>
223
+ <li><code>snow_forecast_incidents</code> - Incident forecasting</li>
224
+ <li><code>snow_optimize_process</code> - Process optimization</li>
225
+ <li><code>snow_sentiment_analysis</code> - Analyze sentiment</li>
226
+ </ul>
227
+ </div>
228
+ </div>
229
+
230
+ <!-- ServiceNow Platform Development MCP -->
231
+ <div class="mcp-card">
232
+ <div class="mcp-header">
233
+ <h3>💻 Platform Development Server</h3>
234
+ <span class="mcp-badge">20+ Tools</span>
235
+ </div>
236
+ <p class="mcp-description">Create platform artifacts and custom applications</p>
237
+ <div class="mcp-tools">
238
+ <h4>Key Tools:</h4>
239
+ <ul>
240
+ <li><code>snow_create_script_include</code> - Create Script Includes</li>
241
+ <li><code>snow_create_business_rule</code> - Create Business Rules</li>
242
+ <li><code>snow_create_client_script</code> - Create Client Scripts</li>
243
+ <li><code>snow_create_ui_policy</code> - Create UI Policies</li>
244
+ <li><code>snow_create_ui_action</code> - Create UI Actions</li>
245
+ <li><code>snow_create_ui_page</code> - Create UI Pages</li>
246
+ </ul>
247
+ </div>
248
+ </div>
249
+
250
+ <!-- ServiceNow Integration MCP -->
251
+ <div class="mcp-card">
252
+ <div class="mcp-header">
253
+ <h3>🔗 Integration Server</h3>
254
+ <span class="mcp-badge">15+ Tools</span>
255
+ </div>
256
+ <p class="mcp-description">REST/SOAP integrations and data transformations</p>
257
+ <div class="mcp-tools">
258
+ <h4>Key Tools:</h4>
259
+ <ul>
260
+ <li><code>snow_create_rest_message</code> - Create REST integrations</li>
261
+ <li><code>snow_create_transform_map</code> - Data transformations</li>
262
+ <li><code>snow_create_import_set</code> - Manage import sets</li>
263
+ <li><code>snow_test_web_service</code> - Test web services</li>
264
+ <li><code>snow_configure_email</code> - Email configuration</li>
265
+ <li><code>snow_create_oauth_profile</code> - OAuth setup</li>
266
+ </ul>
267
+ </div>
268
+ </div>
269
+
270
+ <!-- ServiceNow System Properties MCP -->
271
+ <div class="mcp-card">
272
+ <div class="mcp-header">
273
+ <h3>⚙️ System Properties Server</h3>
274
+ <span class="mcp-badge">10+ Tools</span>
275
+ </div>
276
+ <p class="mcp-description">System property management and configuration</p>
277
+ <div class="mcp-tools">
278
+ <h4>Key Tools:</h4>
279
+ <ul>
280
+ <li><code>snow_property_get</code> - Get property values</li>
281
+ <li><code>snow_property_set</code> - Set property values</li>
282
+ <li><code>snow_property_list</code> - List by pattern</li>
283
+ <li><code>snow_property_bulk_update</code> - Bulk operations</li>
284
+ <li><code>snow_property_export</code> - Export to JSON</li>
285
+ <li><code>snow_property_import</code> - Import from JSON</li>
286
+ </ul>
287
+ </div>
288
+ </div>
289
+
290
+ <!-- ServiceNow Update Set MCP -->
291
+ <div class="mcp-card">
292
+ <div class="mcp-header">
293
+ <h3>📦 Update Set Server</h3>
294
+ <span class="mcp-badge">10+ Tools</span>
295
+ </div>
296
+ <p class="mcp-description">Change management and update set operations</p>
297
+ <div class="mcp-tools">
298
+ <h4>Key Tools:</h4>
299
+ <ul>
300
+ <li><code>snow_create_update_set</code> - Create update sets</li>
301
+ <li><code>snow_switch_update_set</code> - Switch active set</li>
302
+ <li><code>snow_complete_update_set</code> - Mark complete</li>
303
+ <li><code>snow_preview_update_set</code> - Preview changes</li>
304
+ <li><code>snow_export_update_set</code> - Export as XML</li>
305
+ <li><code>snow_import_update_set</code> - Import XML</li>
306
+ </ul>
307
+ </div>
308
+ </div>
309
+
310
+ <!-- ServiceNow Development Assistant MCP -->
311
+ <div class="mcp-card">
312
+ <div class="mcp-header">
313
+ <h3>🎯 Development Assistant Server</h3>
314
+ <span class="mcp-badge">15+ Tools</span>
315
+ </div>
316
+ <p class="mcp-description">Code generation and best practices enforcement</p>
317
+ <div class="mcp-tools">
318
+ <h4>Key Tools:</h4>
319
+ <ul>
320
+ <li><code>snow_generate_code</code> - Generate ServiceNow code</li>
321
+ <li><code>snow_suggest_pattern</code> - Design patterns</li>
322
+ <li><code>snow_review_code</code> - Code review</li>
323
+ <li><code>snow_optimize_performance</code> - Performance tips</li>
324
+ <li><code>snow_convert_to_es5</code> - ES5 conversion</li>
325
+ <li><code>snow_generate_documentation</code> - Auto docs</li>
326
+ </ul>
327
+ </div>
328
+ </div>
329
+
330
+ <!-- ServiceNow Security & Compliance MCP -->
331
+ <div class="mcp-card">
332
+ <div class="mcp-header">
333
+ <h3>🔒 Security & Compliance Server</h3>
334
+ <span class="mcp-badge">15+ Tools</span>
335
+ </div>
336
+ <p class="mcp-description">Security scanning and compliance validation</p>
337
+ <div class="mcp-tools">
338
+ <h4>Key Tools:</h4>
339
+ <ul>
340
+ <li><code>snow_create_security_policy</code> - Security policies</li>
341
+ <li><code>snow_audit_compliance</code> - Compliance audit</li>
342
+ <li><code>snow_scan_vulnerabilities</code> - Vulnerability scan</li>
343
+ <li><code>snow_assess_risk</code> - Risk assessment</li>
344
+ <li><code>snow_review_access_control</code> - ACL review</li>
345
+ <li><code>snow_gdpr_compliance_check</code> - GDPR check</li>
346
+ </ul>
347
+ </div>
348
+ </div>
349
+
350
+ <!-- ServiceNow Reporting & Analytics MCP -->
351
+ <div class="mcp-card">
352
+ <div class="mcp-header">
353
+ <h3>📊 Reporting & Analytics Server</h3>
354
+ <span class="mcp-badge">20+ Tools</span>
355
+ </div>
356
+ <p class="mcp-description">Advanced reporting and data visualization</p>
357
+ <div class="mcp-tools">
358
+ <h4>Key Tools:</h4>
359
+ <ul>
360
+ <li><code>snow_create_report</code> - Create reports</li>
361
+ <li><code>snow_create_dashboard</code> - Build dashboards</li>
362
+ <li><code>snow_define_kpi</code> - Define KPIs</li>
363
+ <li><code>snow_schedule_report</code> - Schedule delivery</li>
364
+ <li><code>snow_analyze_data_quality</code> - Data quality</li>
365
+ <li><code>snow_create_performance_dashboard</code> - Performance</li>
366
+ </ul>
367
+ </div>
368
+ </div>
369
+
370
+ <!-- Snow-Flow Orchestration MCP -->
371
+ <div class="mcp-card">
372
+ <div class="mcp-header">
373
+ <h3>👑 Orchestration Server</h3>
374
+ <span class="mcp-badge">25+ Tools</span>
375
+ </div>
376
+ <p class="mcp-description">Multi-agent coordination and task management</p>
377
+ <div class="mcp-tools">
378
+ <h4>Key Tools:</h4>
379
+ <ul>
380
+ <li><code>snow_swarm_init</code> - Initialize agent swarms</li>
381
+ <li><code>snow_agent_spawn</code> - Create specialized agents</li>
382
+ <li><code>snow_task_orchestrate</code> - Orchestrate tasks</li>
383
+ <li><code>snow_memory_store</code> - Persistent memory</li>
384
+ <li><code>snow_neural_train</code> - Train neural networks</li>
385
+ <li><code>snow_performance_analyze</code> - Performance analysis</li>
386
+ </ul>
387
+ </div>
388
+ </div>
389
+ </div>
390
+ </div>
391
+ </section>
392
+
393
+ <!-- How It Works -->
394
+ <section class="how-it-works">
395
+ <div class="container">
396
+ <h2 class="section-title">How Snow-Flow Works</h2>
397
+ <div class="workflow-diagram">
398
+ <div class="workflow-step">
399
+ <div class="step-number">1</div>
400
+ <h3>Initialize</h3>
401
+ <p>Install Snow-Flow and authenticate with your ServiceNow instance using OAuth</p>
402
+ </div>
403
+ <div class="workflow-arrow">→</div>
404
+ <div class="workflow-step">
405
+ <div class="step-number">2</div>
406
+ <h3>Command</h3>
407
+ <p>Use natural language or CLI commands to describe what you want to build</p>
408
+ </div>
409
+ <div class="workflow-arrow">→</div>
410
+ <div class="workflow-step">
411
+ <div class="step-number">3</div>
412
+ <h3>Orchestrate</h3>
413
+ <p>Snow-Flow coordinates multiple agents and MCP servers to complete the task</p>
414
+ </div>
415
+ <div class="workflow-arrow">→</div>
416
+ <div class="workflow-step">
417
+ <div class="step-number">4</div>
418
+ <h3>Deploy</h3>
419
+ <p>Automatically deploy validated artifacts directly to ServiceNow</p>
420
+ </div>
421
+ </div>
422
+ </div>
423
+ </section>
424
+
425
+ <!-- Installation Section -->
426
+ <section id="installation" class="installation">
427
+ <div class="container">
428
+ <h2 class="section-title">Installation & Setup</h2>
429
+
430
+ <div class="install-tabs">
431
+ <button class="tab-btn active" data-tab="npm">NPM Install</button>
432
+ <button class="tab-btn" data-tab="git">Git Clone</button>
433
+ <button class="tab-btn" data-tab="config">Configuration</button>
434
+ </div>
435
+
436
+ <div class="tab-content active" id="npm">
437
+ <h3>Install via NPM</h3>
438
+ <pre><code class="language-bash"># Install Snow-Flow globally
439
+ npm install -g snow-flow
440
+
441
+ # Initialize Snow-Flow in your project
442
+ snow-flow init
443
+
444
+ # Authenticate with ServiceNow
445
+ snow-flow auth login</code></pre>
446
+ </div>
447
+
448
+ <div class="tab-content" id="git">
449
+ <h3>Install from GitHub</h3>
450
+ <pre><code class="language-bash"># Clone the repository
451
+ git clone https://github.com/groeimetai/snow-flow.git
452
+
453
+ # Navigate to directory
454
+ cd snow-flow
455
+
456
+ # Install dependencies
457
+ npm install
458
+
459
+ # Build the project
460
+ npm run build
461
+
462
+ # Link globally
463
+ npm link
464
+
465
+ # Initialize
466
+ snow-flow init</code></pre>
467
+ </div>
468
+
469
+ <div class="tab-content" id="config">
470
+ <h3>Configuration</h3>
471
+ <pre><code class="language-javascript">// .snow-flow.config.json
472
+ {
473
+ "instance": "https://your-instance.service-now.com",
474
+ "auth": {
475
+ "type": "oauth",
476
+ "clientId": "your-client-id",
477
+ "clientSecret": "your-client-secret"
478
+ },
479
+ "mcp": {
480
+ "servers": ["all"], // or specific servers
481
+ "timeout": 30000,
482
+ "maxRetries": 3
483
+ },
484
+ "development": {
485
+ "es5Validation": true,
486
+ "autoTest": true,
487
+ "coherenceCheck": true
488
+ }
489
+ }</code></pre>
490
+ </div>
491
+ </div>
492
+ </section>
493
+
494
+ <!-- Examples Section -->
495
+ <section id="examples" class="examples">
496
+ <div class="container">
497
+ <h2 class="section-title">Real-World Examples</h2>
498
+ <p class="section-subtitle">See Snow-Flow in action with these practical ServiceNow development scenarios</p>
499
+
500
+ <div class="example-grid">
501
+ <!-- Example 1: Widget Deployment -->
502
+ <div class="example-card">
503
+ <h3>Deploy a Dashboard Widget</h3>
504
+ <pre><code class="language-javascript">// Create and deploy an incident dashboard widget
505
+ await snow_deploy_widget({
506
+ name: "Incident Dashboard",
507
+ template: `
508
+ &lt;div class="dashboard"&gt;
509
+ &lt;div ng-repeat="incident in data.incidents"&gt;
510
+ &lt;span&gt;{{incident.number}}&lt;/span&gt;
511
+ &lt;span&gt;{{incident.short_description}}&lt;/span&gt;
512
+ &lt;/div&gt;
513
+ &lt;/div&gt;
514
+ `,
515
+ server_script: `
516
+ (function() {
517
+ var gr = new GlideRecord('incident');
518
+ gr.addActiveQuery();
519
+ gr.query();
520
+ data.incidents = [];
521
+ while(gr.next()) {
522
+ data.incidents.push({
523
+ number: gr.getValue('number'),
524
+ short_description: gr.getValue('short_description')
525
+ });
526
+ }
527
+ })();
528
+ `,
529
+ client_script: `
530
+ function($scope) {
531
+ var c = this;
532
+ // Client logic here
533
+ }
534
+ `
535
+ });</code></pre>
536
+ </div>
537
+
538
+ <!-- Example 2: Script Execution -->
539
+ <div class="example-card">
540
+ <h3>Execute Background Script</h3>
541
+ <pre><code class="language-javascript">// Execute script with full output capture
542
+ const result = await snow_execute_script_with_output({
543
+ script: `
544
+ gs.info('Starting incident analysis...');
545
+
546
+ var stats = {};
547
+ var gr = new GlideRecord('incident');
548
+ gr.addActiveQuery();
549
+ gr.query();
550
+
551
+ stats.total = gr.getRowCount();
552
+
553
+ var priority = new GlideAggregate('incident');
554
+ priority.addActiveQuery();
555
+ priority.groupBy('priority');
556
+ priority.addAggregate('COUNT');
557
+ priority.query();
558
+
559
+ stats.byPriority = {};
560
+ while(priority.next()) {
561
+ var p = priority.getValue('priority');
562
+ stats.byPriority[p] = priority.getAggregate('COUNT');
563
+ }
564
+
565
+ gs.print('Analysis complete: ' + JSON.stringify(stats));
566
+ return stats;
567
+ `
568
+ });
569
+
570
+ console.log('Execution Output:', result.output);
571
+ console.log('Returned Data:', result.returnValue);</code></pre>
572
+ </div>
573
+
574
+ <!-- Example 3: Multi-Agent Task -->
575
+ <div class="example-card">
576
+ <h3>Multi-Agent Development</h3>
577
+ <pre><code class="language-bash"># Use swarm coordination for complex tasks
578
+ snow-flow swarm "Build complete incident management system with SLA tracking, automated assignment, and reporting dashboard" \
579
+ --strategy development \
580
+ --mode hierarchical \
581
+ --max-agents 8 \
582
+ --monitor
583
+
584
+ # The swarm will:
585
+ # 1. Research best practices
586
+ # 2. Design the architecture
587
+ # 3. Develop components in parallel
588
+ # 4. Test everything
589
+ # 5. Deploy to ServiceNow
590
+ # 6. Generate documentation</code></pre>
591
+ </div>
592
+
593
+ <!-- Example 4: Machine Learning -->
594
+ <div class="example-card">
595
+ <h3>Train Incident Classifier</h3>
596
+ <pre><code class="language-javascript">// Train ML model for incident classification
597
+ const model = await snow_train_classifier({
598
+ type: 'incident_category',
599
+ training_data: {
600
+ table: 'incident',
601
+ fields: ['short_description', 'description'],
602
+ label: 'category',
603
+ limit: 1000
604
+ },
605
+ model_config: {
606
+ type: 'lstm',
607
+ epochs: 50,
608
+ batch_size: 32
609
+ }
610
+ });
611
+
612
+ // Use the trained model
613
+ const prediction = await snow_predict({
614
+ model_id: model.id,
615
+ input: {
616
+ short_description: "Cannot access email",
617
+ description: "Outlook is not connecting to server"
618
+ }
619
+ });
620
+
621
+ console.log('Predicted category:', prediction.category);
622
+ console.log('Confidence:', prediction.confidence);</code></pre>
623
+ </div>
624
+
625
+ <!-- User Examples Placeholder -->
626
+ <div class="example-card user-examples">
627
+ <h3>📝 Your Examples</h3>
628
+ <div class="user-examples-placeholder">
629
+ <p>This section is reserved for your ServiceNow developer instance examples.</p>
630
+ <p>Add your own real-world implementations here!</p>
631
+ <div class="example-template">
632
+ <pre><code class="language-javascript">// Your custom example code
633
+ // From your ServiceNow developer instance
634
+ // Show real implementations and use cases</code></pre>
635
+ </div>
636
+ </div>
637
+ </div>
638
+ </div>
639
+ </div>
640
+ </section>
641
+
642
+ <!-- API Reference -->
643
+ <section id="api" class="api-reference">
644
+ <div class="container">
645
+ <h2 class="section-title">API Reference</h2>
646
+ <div class="api-categories">
647
+ <div class="api-category">
648
+ <h3>CLI Commands</h3>
649
+ <ul class="api-list">
650
+ <li><code>snow-flow init</code> - Initialize project</li>
651
+ <li><code>snow-flow auth login</code> - Authenticate</li>
652
+ <li><code>snow-flow start</code> - Start orchestration</li>
653
+ <li><code>snow-flow agent spawn &lt;type&gt;</code> - Create agent</li>
654
+ <li><code>snow-flow swarm "&lt;task&gt;"</code> - Multi-agent task</li>
655
+ <li><code>snow-flow memory store</code> - Store data</li>
656
+ <li><code>snow-flow sparc &lt;mode&gt;</code> - SPARC modes</li>
657
+ </ul>
658
+ </div>
659
+ <div class="api-category">
660
+ <h3>JavaScript API</h3>
661
+ <ul class="api-list">
662
+ <li><code>snow_deploy_widget()</code> - Deploy widgets</li>
663
+ <li><code>snow_execute_script()</code> - Run scripts</li>
664
+ <li><code>snow_query_table()</code> - Query data</li>
665
+ <li><code>snow_create_flow()</code> - Create flows</li>
666
+ <li><code>snow_train_classifier()</code> - Train ML</li>
667
+ <li><code>snow_test_rest_connection()</code> - Test APIs</li>
668
+ <li><code>snow_property_manager()</code> - Properties</li>
669
+ </ul>
670
+ </div>
671
+ </div>
672
+ </div>
673
+ </section>
674
+
675
+ <!-- Best Practices -->
676
+ <section class="best-practices">
677
+ <div class="container">
678
+ <h2 class="section-title">Best Practices</h2>
679
+ <div class="practices-grid">
680
+ <div class="practice">
681
+ <h3>🔍 Always Verify First</h3>
682
+ <p>Never assume something doesn't exist. Always verify with background scripts before making changes.</p>
683
+ </div>
684
+ <div class="practice">
685
+ <h3>📝 Use ES5 JavaScript</h3>
686
+ <p>ServiceNow uses Rhino engine. Always write ES5-compatible code - no arrow functions, const/let, or template literals.</p>
687
+ </div>
688
+ <div class="practice">
689
+ <h3>🔄 Sync User Changes</h3>
690
+ <p>When users modify artifacts in ServiceNow, always fetch the latest version before making additional changes.</p>
691
+ </div>
692
+ <div class="practice">
693
+ <h3>✅ Widget Coherence</h3>
694
+ <p>Ensure perfect communication between HTML template, client script, and server script in widgets.</p>
695
+ </div>
696
+ <div class="practice">
697
+ <h3>📊 Use Real Data</h3>
698
+ <p>Snow-Flow never uses mock data. Always test with real ServiceNow instance data.</p>
699
+ </div>
700
+ <div class="practice">
701
+ <h3>🚀 Leverage MCP Servers</h3>
702
+ <p>Use specialized MCP servers for specific tasks - each is optimized for its domain.</p>
703
+ </div>
704
+ </div>
705
+ </div>
706
+ </section>
707
+
708
+ <!-- Footer -->
709
+ <footer class="footer">
710
+ <div class="container">
711
+ <div class="footer-content">
712
+ <div class="footer-section">
713
+ <h4>Snow-Flow</h4>
714
+ <p>Advanced ServiceNow Development Framework</p>
715
+ <div class="footer-logo">🏔️❄️</div>
716
+ </div>
717
+ <div class="footer-section">
718
+ <h4>Quick Links</h4>
719
+ <ul>
720
+ <li><a href="#installation">Installation</a></li>
721
+ <li><a href="#mcp-servers">MCP Servers</a></li>
722
+ <li><a href="#examples">Examples</a></li>
723
+ <li><a href="#api">API Reference</a></li>
724
+ </ul>
725
+ </div>
726
+ <div class="footer-section">
727
+ <h4>Resources</h4>
728
+ <ul>
729
+ <li><a href="https://github.com/groeimetai/snow-flow">GitHub</a></li>
730
+ <li><a href="https://www.npmjs.com/package/snow-flow">NPM Package</a></li>
731
+ <li><a href="docs/claude-md.html">CLAUDE.md</a></li>
732
+ <li><a href="docs/api-full.html">Full API Docs</a></li>
733
+ </ul>
734
+ </div>
735
+ <div class="footer-section">
736
+ <h4>Version</h4>
737
+ <p>v3.4.14</p>
738
+ <p>MIT License</p>
739
+ <p>&copy; 2024 Snow-Flow Team</p>
740
+ </div>
741
+ </div>
742
+ </div>
743
+ </footer>
744
+
745
+ <script src="js/main.js"></script>
746
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
747
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-javascript.min.js"></script>
748
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-bash.min.js"></script>
749
+ </body>
750
+ </html>