snow-flow 1.4.8 → 1.4.10
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/commands/helpers/standard-checkpoint-hooks.sh +179 -0
- package/.claude/settings.json +109 -32
- package/CLAUDE.md +1425 -229
- package/README.md +372 -141
- package/SNOW_FLOW_ADVANCED_FEATURES_PLAIN.txt +78 -0
- package/claude-flow +81 -34
- package/claude-flow.bat +0 -0
- package/claude-flow.ps1 +0 -0
- package/dist/cli.js +164 -0
- package/dist/cli.js.map +1 -1
- package/dist/intelligence/performance-recommendations-engine.js +1 -1
- package/dist/intelligence/performance-recommendations-engine.js.map +1 -1
- package/dist/mcp/advanced/servicenow-advanced-features-mcp.d.ts +925 -0
- package/dist/mcp/advanced/servicenow-advanced-features-mcp.d.ts.map +1 -0
- package/dist/mcp/advanced/servicenow-advanced-features-mcp.js +14159 -0
- package/dist/mcp/advanced/servicenow-advanced-features-mcp.js.map +1 -0
- package/dist/mcp/servicenow-deployment-mcp.js +32 -0
- package/dist/mcp/servicenow-deployment-mcp.js.map +1 -1
- package/dist/mcp/shared/mcp-memory-manager.js +1 -1
- package/dist/mcp/shared/mcp-memory-manager.js.map +1 -1
- package/dist/queen/queen-memory.js +2 -2
- package/dist/queen/queen-memory.js.map +1 -1
- package/dist/utils/migrate-claude-flow.d.ts +22 -0
- package/dist/utils/migrate-claude-flow.d.ts.map +1 -0
- package/dist/utils/migrate-claude-flow.js +120 -0
- package/dist/utils/migrate-claude-flow.js.map +1 -0
- package/dist/utils/snow-memory-manager.d.ts +78 -0
- package/dist/utils/snow-memory-manager.d.ts.map +1 -0
- package/dist/utils/snow-memory-manager.js +530 -0
- package/dist/utils/snow-memory-manager.js.map +1 -0
- package/dist/version.d.ts +4 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +26 -1
- package/dist/version.js.map +1 -1
- package/package.json +268 -3
- package/.env.example +0 -284
|
@@ -0,0 +1,925 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ServiceNow Advanced Features MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Provides 14 AI-powered tools for deep ServiceNow insights, automated documentation,
|
|
6
|
+
* and process mining capabilities that revolutionize ServiceNow management.
|
|
7
|
+
*/
|
|
8
|
+
import { BaseMCPServer } from '../base-mcp-server.js';
|
|
9
|
+
export declare class ServiceNowAdvancedFeaturesMCP extends BaseMCPServer {
|
|
10
|
+
private memoryManager;
|
|
11
|
+
private batchQueue;
|
|
12
|
+
private cacheManager;
|
|
13
|
+
constructor();
|
|
14
|
+
protected setupTools(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Feature 1: Smart Batch API Operations
|
|
17
|
+
* Reduces API calls by 80% through intelligent batching and caching
|
|
18
|
+
*/
|
|
19
|
+
private executeBatchApi;
|
|
20
|
+
/**
|
|
21
|
+
* Group operations by type and table for optimization
|
|
22
|
+
*/
|
|
23
|
+
private groupOperations;
|
|
24
|
+
/**
|
|
25
|
+
* Calculate optimized API calls based on grouping
|
|
26
|
+
*/
|
|
27
|
+
private calculateOptimizedCalls;
|
|
28
|
+
/**
|
|
29
|
+
* Execute operations in parallel
|
|
30
|
+
*/
|
|
31
|
+
private executeParallelBatch;
|
|
32
|
+
/**
|
|
33
|
+
* Execute batch query operations
|
|
34
|
+
*/
|
|
35
|
+
private executeBatchQuery;
|
|
36
|
+
/**
|
|
37
|
+
* Execute batch insert operations
|
|
38
|
+
*/
|
|
39
|
+
private executeBatchInsert;
|
|
40
|
+
/**
|
|
41
|
+
* Execute batch update operations
|
|
42
|
+
*/
|
|
43
|
+
private executeBatchUpdate;
|
|
44
|
+
/**
|
|
45
|
+
* Execute batch delete operations
|
|
46
|
+
*/
|
|
47
|
+
private executeBatchDelete;
|
|
48
|
+
/**
|
|
49
|
+
* Execute operations in a transaction
|
|
50
|
+
*/
|
|
51
|
+
private executeTransactionalBatch;
|
|
52
|
+
/**
|
|
53
|
+
* Execute operations sequentially
|
|
54
|
+
*/
|
|
55
|
+
private executeSequentialBatch;
|
|
56
|
+
private executeSingleQuery;
|
|
57
|
+
private executeSingleInsert;
|
|
58
|
+
private executeSingleUpdate;
|
|
59
|
+
private executeSingleDelete;
|
|
60
|
+
private checkCache;
|
|
61
|
+
private getFromCache;
|
|
62
|
+
private setCache;
|
|
63
|
+
private cleanCache;
|
|
64
|
+
private cacheResults;
|
|
65
|
+
private combineFields;
|
|
66
|
+
private groupUpdatesByFields;
|
|
67
|
+
private prepareRollback;
|
|
68
|
+
/**
|
|
69
|
+
* Feature 2: Table Relationship Mapping
|
|
70
|
+
* Maps all dependencies including extensions, references, and common query patterns
|
|
71
|
+
*/
|
|
72
|
+
private getTableRelationships;
|
|
73
|
+
/**
|
|
74
|
+
* Get table information including metadata
|
|
75
|
+
*/
|
|
76
|
+
private getTableInfo;
|
|
77
|
+
/**
|
|
78
|
+
* Analyze table hierarchy (parent/child relationships)
|
|
79
|
+
*/
|
|
80
|
+
private analyzeTableHierarchy;
|
|
81
|
+
/**
|
|
82
|
+
* Get parent tables (tables this table extends from)
|
|
83
|
+
*/
|
|
84
|
+
private getParentTables;
|
|
85
|
+
/**
|
|
86
|
+
* Get child tables (tables that extend this table)
|
|
87
|
+
*/
|
|
88
|
+
private getChildTables;
|
|
89
|
+
/**
|
|
90
|
+
* Analyze reference fields in the table
|
|
91
|
+
*/
|
|
92
|
+
private analyzeReferences;
|
|
93
|
+
/**
|
|
94
|
+
* Find tables that reference this table
|
|
95
|
+
*/
|
|
96
|
+
private findReferencingTables;
|
|
97
|
+
/**
|
|
98
|
+
* Analyze common query patterns for the table
|
|
99
|
+
*/
|
|
100
|
+
private analyzeQueryPatterns;
|
|
101
|
+
/**
|
|
102
|
+
* Generate human-readable description of query pattern
|
|
103
|
+
*/
|
|
104
|
+
private describeQueryPattern;
|
|
105
|
+
/**
|
|
106
|
+
* Get performance tip for query pattern
|
|
107
|
+
*/
|
|
108
|
+
private getQueryPerformanceTip;
|
|
109
|
+
/**
|
|
110
|
+
* Discover custom patterns based on table fields
|
|
111
|
+
*/
|
|
112
|
+
private discoverCustomPatterns;
|
|
113
|
+
/**
|
|
114
|
+
* Generate relationship statistics
|
|
115
|
+
*/
|
|
116
|
+
private generateRelationshipStats;
|
|
117
|
+
/**
|
|
118
|
+
* Generate Mermaid diagram for visualization
|
|
119
|
+
*/
|
|
120
|
+
private generateMermaidDiagram;
|
|
121
|
+
/**
|
|
122
|
+
* Feature 3: Query Performance Analyzer
|
|
123
|
+
* Predicts query performance before execution and provides optimization recommendations
|
|
124
|
+
*/
|
|
125
|
+
private analyzeQueryPerformance;
|
|
126
|
+
/**
|
|
127
|
+
* Parse ServiceNow encoded query into conditions
|
|
128
|
+
*/
|
|
129
|
+
private parseEncodedQuery;
|
|
130
|
+
/**
|
|
131
|
+
* Parse individual condition
|
|
132
|
+
*/
|
|
133
|
+
private parseCondition;
|
|
134
|
+
/**
|
|
135
|
+
* Get table schema information
|
|
136
|
+
*/
|
|
137
|
+
private getTableSchema;
|
|
138
|
+
/**
|
|
139
|
+
* Analyze individual condition performance
|
|
140
|
+
*/
|
|
141
|
+
private analyzeCondition;
|
|
142
|
+
/**
|
|
143
|
+
* Check for missing indexes
|
|
144
|
+
*/
|
|
145
|
+
private checkMissingIndexes;
|
|
146
|
+
/**
|
|
147
|
+
* Analyze join performance for dot-walked fields
|
|
148
|
+
*/
|
|
149
|
+
private analyzeJoinPerformance;
|
|
150
|
+
/**
|
|
151
|
+
* Suggest alternative query formulations
|
|
152
|
+
*/
|
|
153
|
+
private suggestAlternativeQueries;
|
|
154
|
+
/**
|
|
155
|
+
* Calculate risk assessment
|
|
156
|
+
*/
|
|
157
|
+
private calculateRiskAssessment;
|
|
158
|
+
/**
|
|
159
|
+
* Estimate query execution time
|
|
160
|
+
*/
|
|
161
|
+
private estimateExecutionTime;
|
|
162
|
+
/**
|
|
163
|
+
* Check if field is indexed
|
|
164
|
+
*/
|
|
165
|
+
private isFieldIndexed;
|
|
166
|
+
/**
|
|
167
|
+
* Find composite index opportunities
|
|
168
|
+
*/
|
|
169
|
+
private findCompositeIndexOpportunities;
|
|
170
|
+
/**
|
|
171
|
+
* Get table indexes
|
|
172
|
+
*/
|
|
173
|
+
private getTableIndexes;
|
|
174
|
+
/**
|
|
175
|
+
* Get approximate record count
|
|
176
|
+
*/
|
|
177
|
+
private getApproximateRecordCount;
|
|
178
|
+
/**
|
|
179
|
+
* Hash query for caching
|
|
180
|
+
*/
|
|
181
|
+
private hashQuery;
|
|
182
|
+
/**
|
|
183
|
+
* Feature 4: Field Usage Intelligence
|
|
184
|
+
* Discovers which fields are actually used across the platform to identify safe-to-deprecate fields
|
|
185
|
+
*/
|
|
186
|
+
private analyzeFieldUsage;
|
|
187
|
+
/**
|
|
188
|
+
* Get all fields for a table
|
|
189
|
+
*/
|
|
190
|
+
private getTableFields;
|
|
191
|
+
/**
|
|
192
|
+
* Analyze field usage in database queries (business rules, script includes, etc.)
|
|
193
|
+
*/
|
|
194
|
+
private analyzeFieldInQueries;
|
|
195
|
+
/**
|
|
196
|
+
* Analyze field usage in views (list views, forms)
|
|
197
|
+
*/
|
|
198
|
+
private analyzeFieldInViews;
|
|
199
|
+
/**
|
|
200
|
+
* Analyze field usage in reports
|
|
201
|
+
*/
|
|
202
|
+
private analyzeFieldInReports;
|
|
203
|
+
/**
|
|
204
|
+
* Analyze field usage in business rules
|
|
205
|
+
*/
|
|
206
|
+
private analyzeFieldInBusinessRules;
|
|
207
|
+
/**
|
|
208
|
+
* Analyze field usage in UI policies
|
|
209
|
+
*/
|
|
210
|
+
private analyzeFieldInUIPolicies;
|
|
211
|
+
/**
|
|
212
|
+
* Analyze field usage in workflows and flows
|
|
213
|
+
*/
|
|
214
|
+
private analyzeFieldInWorkflows;
|
|
215
|
+
/**
|
|
216
|
+
* Calculate overall usage score for a field
|
|
217
|
+
*/
|
|
218
|
+
private calculateFieldUsageScore;
|
|
219
|
+
/**
|
|
220
|
+
* Categorize field based on usage score
|
|
221
|
+
*/
|
|
222
|
+
private categorizeFieldUsage;
|
|
223
|
+
/**
|
|
224
|
+
* Perform deprecation analysis
|
|
225
|
+
*/
|
|
226
|
+
private performDeprecationAnalysis;
|
|
227
|
+
/**
|
|
228
|
+
* Calculate technical debt score
|
|
229
|
+
*/
|
|
230
|
+
private calculateTechnicalDebtScore;
|
|
231
|
+
/**
|
|
232
|
+
* Generate recommendations based on field usage analysis
|
|
233
|
+
*/
|
|
234
|
+
private generateFieldUsageRecommendations;
|
|
235
|
+
/**
|
|
236
|
+
* ✨ FEATURE 5: MIGRATION HELPER - Create comprehensive migration plan
|
|
237
|
+
*
|
|
238
|
+
* Creates detailed migration plans for moving data between tables with:
|
|
239
|
+
* - Automatic field mapping with confidence scores
|
|
240
|
+
* - Data transformation detection and scripting
|
|
241
|
+
* - Migration complexity estimation
|
|
242
|
+
* - Risk assessment and warnings
|
|
243
|
+
* - Generated migration scripts (SQL and JavaScript)
|
|
244
|
+
* - Performance optimization suggestions
|
|
245
|
+
*/
|
|
246
|
+
private createMigrationPlan;
|
|
247
|
+
/**
|
|
248
|
+
* Analyze schemas for both source and target tables
|
|
249
|
+
*/
|
|
250
|
+
private analyzeTableSchemas;
|
|
251
|
+
/**
|
|
252
|
+
* Get detailed schema information for a table
|
|
253
|
+
*/
|
|
254
|
+
private getDetailedTableSchema;
|
|
255
|
+
/**
|
|
256
|
+
* Create field mappings between source and target tables with confidence scoring
|
|
257
|
+
*/
|
|
258
|
+
private createFieldMappings;
|
|
259
|
+
/**
|
|
260
|
+
* Calculate confidence score for field mapping
|
|
261
|
+
*/
|
|
262
|
+
private calculateFieldMappingScore;
|
|
263
|
+
/**
|
|
264
|
+
* Calculate string similarity using Levenshtein distance
|
|
265
|
+
*/
|
|
266
|
+
private calculateStringSimilarity;
|
|
267
|
+
/**
|
|
268
|
+
* Calculate data type compatibility score
|
|
269
|
+
*/
|
|
270
|
+
private calculateTypeCompatibility;
|
|
271
|
+
/**
|
|
272
|
+
* Determine required transformation for field mapping
|
|
273
|
+
*/
|
|
274
|
+
private determineRequiredTransformation;
|
|
275
|
+
/**
|
|
276
|
+
* Get conversion complexity level
|
|
277
|
+
*/
|
|
278
|
+
private getConversionComplexity;
|
|
279
|
+
/**
|
|
280
|
+
* Classify mapping type based on confidence score
|
|
281
|
+
*/
|
|
282
|
+
private classifyMappingType;
|
|
283
|
+
/**
|
|
284
|
+
* Assess data compatibility between fields
|
|
285
|
+
*/
|
|
286
|
+
private assessDataCompatibility;
|
|
287
|
+
/**
|
|
288
|
+
* Identify potential issues with field mapping
|
|
289
|
+
*/
|
|
290
|
+
private identifyPotentialIssues;
|
|
291
|
+
/**
|
|
292
|
+
* Generate mapping notes
|
|
293
|
+
*/
|
|
294
|
+
private generateMappingNotes;
|
|
295
|
+
/**
|
|
296
|
+
* Identify required data transformations
|
|
297
|
+
*/
|
|
298
|
+
private identifyDataTransformations;
|
|
299
|
+
/**
|
|
300
|
+
* Generate transformation description
|
|
301
|
+
*/
|
|
302
|
+
private generateTransformationDescription;
|
|
303
|
+
/**
|
|
304
|
+
* Generate transformation script template
|
|
305
|
+
*/
|
|
306
|
+
private generateTransformationScript;
|
|
307
|
+
/**
|
|
308
|
+
* Assess transformation risk level
|
|
309
|
+
*/
|
|
310
|
+
private assessTransformationRisk;
|
|
311
|
+
/**
|
|
312
|
+
* Identify global transformations needed
|
|
313
|
+
*/
|
|
314
|
+
private identifyGlobalTransformations;
|
|
315
|
+
/**
|
|
316
|
+
* Estimate migration complexity and performance
|
|
317
|
+
*/
|
|
318
|
+
private estimateMigrationComplexity;
|
|
319
|
+
/**
|
|
320
|
+
* Get base time per record for complexity level
|
|
321
|
+
*/
|
|
322
|
+
private getBaseTimePerRecord;
|
|
323
|
+
/**
|
|
324
|
+
* Format duration in human readable format
|
|
325
|
+
*/
|
|
326
|
+
private formatDurationMinutes;
|
|
327
|
+
/**
|
|
328
|
+
* Estimate performance impact
|
|
329
|
+
*/
|
|
330
|
+
private estimatePerformanceImpact;
|
|
331
|
+
/**
|
|
332
|
+
* Identify risk factors
|
|
333
|
+
*/
|
|
334
|
+
private identifyRiskFactors;
|
|
335
|
+
/**
|
|
336
|
+
* Generate migration scripts
|
|
337
|
+
*/
|
|
338
|
+
private generateMigrationScripts;
|
|
339
|
+
/**
|
|
340
|
+
* Generate SQL migration script
|
|
341
|
+
*/
|
|
342
|
+
private generateSQLMigrationScript;
|
|
343
|
+
/**
|
|
344
|
+
* Generate JavaScript migration script
|
|
345
|
+
*/
|
|
346
|
+
private generateJavaScriptMigrationScript;
|
|
347
|
+
/**
|
|
348
|
+
* Generate rollback script
|
|
349
|
+
*/
|
|
350
|
+
private generateRollbackScript;
|
|
351
|
+
/**
|
|
352
|
+
* Generate validation script
|
|
353
|
+
*/
|
|
354
|
+
private generateValidationScript;
|
|
355
|
+
/**
|
|
356
|
+
* Validate migration plan
|
|
357
|
+
*/
|
|
358
|
+
private validateMigrationPlan;
|
|
359
|
+
/**
|
|
360
|
+
* Assess data loss risk
|
|
361
|
+
*/
|
|
362
|
+
private assessDataLossRisk;
|
|
363
|
+
/**
|
|
364
|
+
* Recommend migration approach
|
|
365
|
+
*/
|
|
366
|
+
private recommendMigrationApproach;
|
|
367
|
+
/**
|
|
368
|
+
* Generate key considerations
|
|
369
|
+
*/
|
|
370
|
+
private generateKeyConsiderations;
|
|
371
|
+
/**
|
|
372
|
+
* ✨ FEATURE 6: DEEP TABLE ANALYSIS - Comprehensive table insights
|
|
373
|
+
*
|
|
374
|
+
* Provides comprehensive analysis of ServiceNow tables including:
|
|
375
|
+
* - Detailed table structure and metadata analysis
|
|
376
|
+
* - Data quality metrics and validation
|
|
377
|
+
* - Performance analysis and bottleneck identification
|
|
378
|
+
* - Security and compliance assessment
|
|
379
|
+
* - Usage patterns and statistics
|
|
380
|
+
* - Dependency mapping and impact analysis
|
|
381
|
+
* - Actionable optimization recommendations
|
|
382
|
+
*/
|
|
383
|
+
private analyzeTableDeep;
|
|
384
|
+
/**
|
|
385
|
+
* Analyze table structure and metadata
|
|
386
|
+
*/
|
|
387
|
+
private analyzeTableStructure;
|
|
388
|
+
/**
|
|
389
|
+
* Analyze data quality metrics
|
|
390
|
+
*/
|
|
391
|
+
private analyzeDataQuality;
|
|
392
|
+
/**
|
|
393
|
+
* Analyze table performance
|
|
394
|
+
*/
|
|
395
|
+
private analyzeTablePerformance;
|
|
396
|
+
/**
|
|
397
|
+
* Analyze table security
|
|
398
|
+
*/
|
|
399
|
+
private analyzeTableSecurity;
|
|
400
|
+
/**
|
|
401
|
+
* Analyze table compliance
|
|
402
|
+
*/
|
|
403
|
+
private analyzeTableCompliance;
|
|
404
|
+
/**
|
|
405
|
+
* Analyze usage patterns
|
|
406
|
+
*/
|
|
407
|
+
private analyzeUsagePatterns;
|
|
408
|
+
/**
|
|
409
|
+
* Analyze dependencies
|
|
410
|
+
*/
|
|
411
|
+
private analyzeTableDependencies;
|
|
412
|
+
private estimateGrowthTrend;
|
|
413
|
+
private assessStructureHealth;
|
|
414
|
+
private generateStructureRecommendations;
|
|
415
|
+
private analyzeCompleteness;
|
|
416
|
+
private analyzeConsistency;
|
|
417
|
+
private analyzeValidity;
|
|
418
|
+
private analyzeUniqueness;
|
|
419
|
+
private identifyDataIssues;
|
|
420
|
+
private calculateQualityScore;
|
|
421
|
+
private estimateQueryPerformance;
|
|
422
|
+
private calculateIndexCoverage;
|
|
423
|
+
private identifyPerformanceBottlenecks;
|
|
424
|
+
private assessOptimizationPotential;
|
|
425
|
+
private getPerformanceRecommendations;
|
|
426
|
+
private calculateSecurityScore;
|
|
427
|
+
private identifyTableSecurityIssues;
|
|
428
|
+
private assessComplianceStatus;
|
|
429
|
+
private analyzeACLCoverage;
|
|
430
|
+
private classifyDataSensitivity;
|
|
431
|
+
private analyzeEncryption;
|
|
432
|
+
private assessAuditRequirements;
|
|
433
|
+
private isAuditRecommended;
|
|
434
|
+
private assessPrivacyCompliance;
|
|
435
|
+
private analyzeRetentionRequirements;
|
|
436
|
+
private calculateTableComplianceScore;
|
|
437
|
+
private identifyComplianceViolations;
|
|
438
|
+
private generateComplianceRecommendations;
|
|
439
|
+
private estimateAccessPatterns;
|
|
440
|
+
private analyzeTemporalPatterns;
|
|
441
|
+
private estimateUserInteractions;
|
|
442
|
+
private analyzeIntegrationUsage;
|
|
443
|
+
private assessCouplingLevel;
|
|
444
|
+
private calculateImpactRadius;
|
|
445
|
+
private analyzeStringFormats;
|
|
446
|
+
private checkDataTypeValidity;
|
|
447
|
+
private generateAnalysisSummary;
|
|
448
|
+
private generateOptimizationRecommendations;
|
|
449
|
+
private calculateRiskScores;
|
|
450
|
+
private calculateOverallRisk;
|
|
451
|
+
private generateTableExecutiveSummary;
|
|
452
|
+
/**
|
|
453
|
+
* ✨ FEATURE 7: CODE PATTERN DETECTOR - AI-powered code analysis
|
|
454
|
+
*
|
|
455
|
+
* Detects anti-patterns, code smells, and optimization opportunities in ServiceNow code:
|
|
456
|
+
* - Anti-pattern detection (N+1 queries, hardcoded values, etc.)
|
|
457
|
+
* - Performance issues (inefficient queries, long-running scripts)
|
|
458
|
+
* - Security vulnerabilities (injection risks, access control bypass)
|
|
459
|
+
* - Maintainability issues (complex functions, duplicate code)
|
|
460
|
+
* - Best practices violations (naming conventions, error handling)
|
|
461
|
+
* - Code complexity analysis (cyclomatic complexity, nesting levels)
|
|
462
|
+
* - Technical debt identification and prioritization
|
|
463
|
+
*/
|
|
464
|
+
private detectCodePatterns;
|
|
465
|
+
/**
|
|
466
|
+
* Collect scripts for analysis based on scope and filters
|
|
467
|
+
*/
|
|
468
|
+
private collectScriptsForAnalysis;
|
|
469
|
+
/**
|
|
470
|
+
* Collect business rules for analysis
|
|
471
|
+
*/
|
|
472
|
+
private collectBusinessRules;
|
|
473
|
+
/**
|
|
474
|
+
* Collect client scripts for analysis
|
|
475
|
+
*/
|
|
476
|
+
private collectClientScripts;
|
|
477
|
+
/**
|
|
478
|
+
* Collect script includes for analysis
|
|
479
|
+
*/
|
|
480
|
+
private collectScriptIncludes;
|
|
481
|
+
/**
|
|
482
|
+
* Collect UI scripts for analysis
|
|
483
|
+
*/
|
|
484
|
+
private collectUIScripts;
|
|
485
|
+
/**
|
|
486
|
+
* Collect workflows for analysis (simplified - would need workflow activities)
|
|
487
|
+
*/
|
|
488
|
+
private collectWorkflows;
|
|
489
|
+
/**
|
|
490
|
+
* Collect REST APIs for analysis
|
|
491
|
+
*/
|
|
492
|
+
private collectRestAPIs;
|
|
493
|
+
/**
|
|
494
|
+
* Collect scheduled jobs for analysis
|
|
495
|
+
*/
|
|
496
|
+
private collectScheduledJobs;
|
|
497
|
+
/**
|
|
498
|
+
* Collect transform maps for analysis (script fields)
|
|
499
|
+
*/
|
|
500
|
+
private collectTransformMaps;
|
|
501
|
+
/**
|
|
502
|
+
* Analyze individual script for patterns
|
|
503
|
+
*/
|
|
504
|
+
private analyzeScript;
|
|
505
|
+
/**
|
|
506
|
+
* Detect anti-patterns in code
|
|
507
|
+
*/
|
|
508
|
+
private detectAntiPatterns;
|
|
509
|
+
/**
|
|
510
|
+
* Detect performance issues
|
|
511
|
+
*/
|
|
512
|
+
private detectPerformanceIssues;
|
|
513
|
+
/**
|
|
514
|
+
* Detect security issues
|
|
515
|
+
*/
|
|
516
|
+
private detectSecurityIssues;
|
|
517
|
+
/**
|
|
518
|
+
* Detect maintainability issues
|
|
519
|
+
*/
|
|
520
|
+
private detectMaintainabilityIssues;
|
|
521
|
+
/**
|
|
522
|
+
* Detect best practice violations
|
|
523
|
+
*/
|
|
524
|
+
private detectBestPracticeViolations;
|
|
525
|
+
/**
|
|
526
|
+
* Detect complexity issues
|
|
527
|
+
*/
|
|
528
|
+
private detectComplexityIssues;
|
|
529
|
+
/**
|
|
530
|
+
* Detect code smells
|
|
531
|
+
*/
|
|
532
|
+
private detectCodeSmells;
|
|
533
|
+
/**
|
|
534
|
+
* Detect technical debt
|
|
535
|
+
*/
|
|
536
|
+
private detectTechnicalDebt;
|
|
537
|
+
private detectNPlusOneQuery;
|
|
538
|
+
private detectStringConcatInLoop;
|
|
539
|
+
private findPatternLineRegex;
|
|
540
|
+
private calculateMaxNestingLevel;
|
|
541
|
+
private calculateCyclomaticComplexity;
|
|
542
|
+
private calculateComplexityMetrics;
|
|
543
|
+
private findDuplicateCodeBlocks;
|
|
544
|
+
private chunkArray;
|
|
545
|
+
private filterPatternsBySeverity;
|
|
546
|
+
private analyzeScriptDependencies;
|
|
547
|
+
private generatePatternSummary;
|
|
548
|
+
private generateCodeRecommendations;
|
|
549
|
+
private generateCodeAnalysisReport;
|
|
550
|
+
private calculateOverallCodeHealth;
|
|
551
|
+
private generateNextSteps;
|
|
552
|
+
/**
|
|
553
|
+
* Feature 8: Predictive Impact Analysis
|
|
554
|
+
* Analyzes potential impacts of changes across ServiceNow platform to prevent unintended consequences
|
|
555
|
+
*/
|
|
556
|
+
private predictChangeImpact;
|
|
557
|
+
private analyzeChangeDetails;
|
|
558
|
+
private calculateTableChangeComplexity;
|
|
559
|
+
private calculateBusinessRuleComplexity;
|
|
560
|
+
private calculateWorkflowComplexity;
|
|
561
|
+
private calculateScriptComplexity;
|
|
562
|
+
private calculateUIPolicyComplexity;
|
|
563
|
+
private calculateACLComplexity;
|
|
564
|
+
private calculateFieldChangeComplexity;
|
|
565
|
+
private calculateIntegrationComplexity;
|
|
566
|
+
private analyzeChangeDependencies;
|
|
567
|
+
private analyzeTableChangeDependencies;
|
|
568
|
+
private analyzeScriptChangeDependencies;
|
|
569
|
+
private analyzeWorkflowDependencies;
|
|
570
|
+
private analyzeUIPolicyDependencies;
|
|
571
|
+
private analyzeACLDependencies;
|
|
572
|
+
private analyzeGenericDependencies;
|
|
573
|
+
private assessRisk;
|
|
574
|
+
private getActionRiskScore;
|
|
575
|
+
private getTypeRiskScore;
|
|
576
|
+
private predictImpacts;
|
|
577
|
+
private predictDirectImpacts;
|
|
578
|
+
private predictDependencyImpacts;
|
|
579
|
+
private predictSystemImpacts;
|
|
580
|
+
private getSeverityWeight;
|
|
581
|
+
private generateMitigationStrategies;
|
|
582
|
+
private getPriorityWeight;
|
|
583
|
+
private generateImpactRecommendations;
|
|
584
|
+
/**
|
|
585
|
+
* Feature 9: Auto Documentation Generator
|
|
586
|
+
* Automatically generates comprehensive documentation from code, flows, and system behavior
|
|
587
|
+
*/
|
|
588
|
+
private generateDocumentation;
|
|
589
|
+
private discoverDocumentationObjects;
|
|
590
|
+
private discoverTables;
|
|
591
|
+
private discoverBusinessRules;
|
|
592
|
+
private discoverWorkflows;
|
|
593
|
+
private discoverFlows;
|
|
594
|
+
private discoverWidgets;
|
|
595
|
+
private discoverScriptIncludes;
|
|
596
|
+
private discoverIntegrations;
|
|
597
|
+
private discoverAPIs;
|
|
598
|
+
private discoverProcesses;
|
|
599
|
+
private discoverArchitecture;
|
|
600
|
+
private analyzeObjectsForDocumentation;
|
|
601
|
+
private analyzeObjectForDocumentation;
|
|
602
|
+
private analyzeTableForDocumentation;
|
|
603
|
+
private analyzeBusinessRuleForDocumentation;
|
|
604
|
+
private analyzeWorkflowForDocumentation;
|
|
605
|
+
private analyzeFlowForDocumentation;
|
|
606
|
+
private analyzeWidgetForDocumentation;
|
|
607
|
+
private analyzeScriptIncludeForDocumentation;
|
|
608
|
+
private analyzeIntegrationForDocumentation;
|
|
609
|
+
private analyzeAPIForDocumentation;
|
|
610
|
+
private generateTableStructureDoc;
|
|
611
|
+
private generateFieldDefinitionsDoc;
|
|
612
|
+
private generateTableRelationshipsDoc;
|
|
613
|
+
private generateBusinessRuleLogicDoc;
|
|
614
|
+
private generateTriggerConditionsDoc;
|
|
615
|
+
private generateWorkflowStepsDoc;
|
|
616
|
+
private generateApprovalProcessDoc;
|
|
617
|
+
private generateFlowDefinitionDoc;
|
|
618
|
+
private generateFlowExecutionDoc;
|
|
619
|
+
private generateWidgetConfigDoc;
|
|
620
|
+
private generateWidgetUsageDoc;
|
|
621
|
+
private generateScriptIncludeAPIDoc;
|
|
622
|
+
private generateCodeExamplesDoc;
|
|
623
|
+
private generateIntegrationConfigDoc;
|
|
624
|
+
private generateDataMappingDoc;
|
|
625
|
+
private generateAPIEndpointsDoc;
|
|
626
|
+
private generateAPIExamplesDoc;
|
|
627
|
+
private analyzeDependenciesForDocumentation;
|
|
628
|
+
private analyzeUsagePatternsForDocumentation;
|
|
629
|
+
private generateDocumentationContent;
|
|
630
|
+
private generateDocumentationTitle;
|
|
631
|
+
private generateTableOfContents;
|
|
632
|
+
private generateDocumentationExecutiveSummary;
|
|
633
|
+
private generateArchitectureOverview;
|
|
634
|
+
private generateObjectDocumentation;
|
|
635
|
+
private generateBestPracticesSection;
|
|
636
|
+
private generateDiagrams;
|
|
637
|
+
private generateArchitectureDiagram;
|
|
638
|
+
private generateERDiagram;
|
|
639
|
+
private generateProcessFlowDiagram;
|
|
640
|
+
private generateAPIDocumentation;
|
|
641
|
+
private generateAPIParameters;
|
|
642
|
+
private generateAPIResponses;
|
|
643
|
+
private generateAPIExamples;
|
|
644
|
+
private formatDocumentation;
|
|
645
|
+
private formatAsMarkdown;
|
|
646
|
+
private formatAsHTML;
|
|
647
|
+
private formatAsConfluence;
|
|
648
|
+
private formatAsJSON;
|
|
649
|
+
private setupAutoUpdate;
|
|
650
|
+
private countWords;
|
|
651
|
+
private calculateCompletenessScore;
|
|
652
|
+
private calculateAccuracyScore;
|
|
653
|
+
private calculateReadabilityScore;
|
|
654
|
+
private calculateCoveragePercentage;
|
|
655
|
+
/**
|
|
656
|
+
* Feature 10: Intelligent Refactoring
|
|
657
|
+
* Automatically refactors ServiceNow code to improve quality, performance, and maintainability
|
|
658
|
+
*/
|
|
659
|
+
private refactorCode;
|
|
660
|
+
private discoverCodeForRefactoring;
|
|
661
|
+
private discoverBusinessRulesForRefactoring;
|
|
662
|
+
private discoverClientScriptsForRefactoring;
|
|
663
|
+
private discoverScriptIncludesForRefactoring;
|
|
664
|
+
private discoverUIScriptsForRefactoring;
|
|
665
|
+
private discoverWorkflowsForRefactoring;
|
|
666
|
+
private discoverFlowsForRefactoring;
|
|
667
|
+
private discoverRestApisForRefactoring;
|
|
668
|
+
private discoverScheduledJobsForRefactoring;
|
|
669
|
+
private analyzeCodeForRefactoring;
|
|
670
|
+
private analyzeCodeObject;
|
|
671
|
+
private analyzeBusinessRuleCode;
|
|
672
|
+
private analyzeClientScriptCode;
|
|
673
|
+
private analyzeScriptIncludeCode;
|
|
674
|
+
private analyzeGenericCode;
|
|
675
|
+
private calculateCognitiveComplexity;
|
|
676
|
+
private identifyPerformanceIssues;
|
|
677
|
+
private identifyCodeSecurityIssues;
|
|
678
|
+
private identifyMaintainabilityIssues;
|
|
679
|
+
private identifyReadabilityIssues;
|
|
680
|
+
private identifyClientScriptIssues;
|
|
681
|
+
private identifyDOMManipulationIssues;
|
|
682
|
+
private identifyAPIDesignIssues;
|
|
683
|
+
private identifyErrorHandlingIssues;
|
|
684
|
+
private identifyRefactoringOpportunities;
|
|
685
|
+
private findPatternLineString;
|
|
686
|
+
private generateRefactoringPlan;
|
|
687
|
+
private calculateExpectedPerformanceImprovement;
|
|
688
|
+
private calculateExpectedMaintainabilityImprovement;
|
|
689
|
+
private calculateExpectedQualityImprovement;
|
|
690
|
+
private prioritizeRefactoringActions;
|
|
691
|
+
private generateRefactoredCode;
|
|
692
|
+
private applyRefactoringAction;
|
|
693
|
+
private generateRefactoredCodeSample;
|
|
694
|
+
private updateChangeSummary;
|
|
695
|
+
private validateRefactoredCode;
|
|
696
|
+
private validateCodeObject;
|
|
697
|
+
private generateTestsForRefactoredCode;
|
|
698
|
+
private generateTestFile;
|
|
699
|
+
private createCodeBackup;
|
|
700
|
+
private applyRefactoringChanges;
|
|
701
|
+
private calculateQualityImprovement;
|
|
702
|
+
private calculatePerformanceImprovement;
|
|
703
|
+
private calculateComplexityReduction;
|
|
704
|
+
private calculateMaintainabilityGain;
|
|
705
|
+
private generateRefactoringRecommendations;
|
|
706
|
+
/**
|
|
707
|
+
* Feature 11: Process Mining Engine
|
|
708
|
+
* Discovers actual process flows by analyzing ServiceNow event logs and transactions
|
|
709
|
+
*/
|
|
710
|
+
private discoverProcess;
|
|
711
|
+
/**
|
|
712
|
+
* Phase 1: Setup process discovery configuration
|
|
713
|
+
*/
|
|
714
|
+
private setupProcessDiscovery;
|
|
715
|
+
/**
|
|
716
|
+
* Phase 2: Collect event logs from ServiceNow tables
|
|
717
|
+
*/
|
|
718
|
+
private collectEventLogs;
|
|
719
|
+
/**
|
|
720
|
+
* Collect events from a specific table
|
|
721
|
+
*/
|
|
722
|
+
private collectTableEvents;
|
|
723
|
+
/**
|
|
724
|
+
* Collect audit logs for user interactions
|
|
725
|
+
*/
|
|
726
|
+
private collectAuditLogs;
|
|
727
|
+
/**
|
|
728
|
+
* Collect workflow execution logs
|
|
729
|
+
*/
|
|
730
|
+
private collectWorkflowLogs;
|
|
731
|
+
/**
|
|
732
|
+
* Phase 3: Analyze process patterns from event logs
|
|
733
|
+
*/
|
|
734
|
+
private analyzeProcessPatterns;
|
|
735
|
+
/**
|
|
736
|
+
* Phase 4: Generate process models and visualizations
|
|
737
|
+
*/
|
|
738
|
+
private generateProcessModels;
|
|
739
|
+
/**
|
|
740
|
+
* Phase 5: Analyze process performance and identify bottlenecks
|
|
741
|
+
*/
|
|
742
|
+
private analyzeProcessPerformance;
|
|
743
|
+
/**
|
|
744
|
+
* Phase 6: Analyze process compliance and deviations
|
|
745
|
+
*/
|
|
746
|
+
private analyzeProcessCompliance;
|
|
747
|
+
/**
|
|
748
|
+
* Phase 7: Generate process optimization recommendations
|
|
749
|
+
*/
|
|
750
|
+
private generateProcessOptimizations;
|
|
751
|
+
/**
|
|
752
|
+
* Phase 8: Export process mining results
|
|
753
|
+
*/
|
|
754
|
+
private exportProcessMiningResults;
|
|
755
|
+
private parsePeriodToDays;
|
|
756
|
+
private calculateDataQualityScore;
|
|
757
|
+
private calculateProcessComplexity;
|
|
758
|
+
private formatDuration;
|
|
759
|
+
private generateProcessMap;
|
|
760
|
+
private generateBPMNModel;
|
|
761
|
+
private calculateActivityFrequencies;
|
|
762
|
+
private calculateTransitionProbabilities;
|
|
763
|
+
private calculateResourceUtilization;
|
|
764
|
+
private generatePerformanceRecommendations;
|
|
765
|
+
private identifyBasicDeviations;
|
|
766
|
+
private calculateBasicComplianceScore;
|
|
767
|
+
private parseReferenceModel;
|
|
768
|
+
private performConformanceChecking;
|
|
769
|
+
private calculateConformanceScore;
|
|
770
|
+
private identifyConformanceDeviations;
|
|
771
|
+
private calculateProcessComplianceScore;
|
|
772
|
+
private generateCSVExport;
|
|
773
|
+
private generateHTMLReport;
|
|
774
|
+
private generateProcessMapExport;
|
|
775
|
+
/**
|
|
776
|
+
* Feature 12: Workflow Reality Analyzer
|
|
777
|
+
* Compares actual workflow executions against designed workflows
|
|
778
|
+
*/
|
|
779
|
+
private analyzeWorkflowExecution;
|
|
780
|
+
/**
|
|
781
|
+
* Phase 1: Setup workflow analysis configuration
|
|
782
|
+
*/
|
|
783
|
+
private setupWorkflowAnalysis;
|
|
784
|
+
/**
|
|
785
|
+
* Phase 2: Collect workflow design information
|
|
786
|
+
*/
|
|
787
|
+
private collectWorkflowDesigns;
|
|
788
|
+
/**
|
|
789
|
+
* Get detailed workflow design information
|
|
790
|
+
*/
|
|
791
|
+
private getWorkflowDetails;
|
|
792
|
+
/**
|
|
793
|
+
* Phase 3: Collect workflow execution data
|
|
794
|
+
*/
|
|
795
|
+
private collectWorkflowExecutions;
|
|
796
|
+
/**
|
|
797
|
+
* Get detailed execution information
|
|
798
|
+
*/
|
|
799
|
+
private getExecutionDetails;
|
|
800
|
+
/**
|
|
801
|
+
* Phase 4: Compare design vs reality
|
|
802
|
+
*/
|
|
803
|
+
private compareDesignVsReality;
|
|
804
|
+
/**
|
|
805
|
+
* Phase 5: Analyze workflow performance
|
|
806
|
+
*/
|
|
807
|
+
private analyzeWorkflowPerformance;
|
|
808
|
+
/**
|
|
809
|
+
* Phase 6: Analyze workflow errors and deviations
|
|
810
|
+
*/
|
|
811
|
+
private analyzeWorkflowErrors;
|
|
812
|
+
/**
|
|
813
|
+
* Phase 7: Analyze workflow usage patterns
|
|
814
|
+
*/
|
|
815
|
+
private analyzeWorkflowUsagePatterns;
|
|
816
|
+
/**
|
|
817
|
+
* Phase 8: Generate workflow optimization recommendations
|
|
818
|
+
*/
|
|
819
|
+
private generateWorkflowOptimizations;
|
|
820
|
+
/**
|
|
821
|
+
* Phase 9: Export workflow analysis results
|
|
822
|
+
*/
|
|
823
|
+
private exportWorkflowAnalysis;
|
|
824
|
+
private parseDurationFromString;
|
|
825
|
+
private calculateExecutionDataQuality;
|
|
826
|
+
private calculateDataCompleteness;
|
|
827
|
+
private calculateMedian;
|
|
828
|
+
private calculateStandardDeviation;
|
|
829
|
+
private identifyDesignGaps;
|
|
830
|
+
private aggregateMissingActivities;
|
|
831
|
+
private aggregateUnexpectedActivities;
|
|
832
|
+
private categorizeError;
|
|
833
|
+
private identifyAutomationCandidates;
|
|
834
|
+
private generateWorkflowCSVExport;
|
|
835
|
+
private generateWorkflowHTMLReport;
|
|
836
|
+
private generateWorkflowDiagram;
|
|
837
|
+
private generatePerformanceChart;
|
|
838
|
+
/**
|
|
839
|
+
* Feature 13: Cross Table Process Discovery
|
|
840
|
+
* Analyzes and discovers complex processes that span multiple ServiceNow tables
|
|
841
|
+
*/
|
|
842
|
+
private discoverCrossTableProcess;
|
|
843
|
+
private discoverTableRelationships;
|
|
844
|
+
private analyzeCrossTableDataFlow;
|
|
845
|
+
private trackCrossTableProcessInstances;
|
|
846
|
+
private mapCrossTableUserJourneys;
|
|
847
|
+
private recognizeCrossTableProcessPatterns;
|
|
848
|
+
private analyzeCrossTablePerformance;
|
|
849
|
+
private detectCrossTableAutomationOpportunities;
|
|
850
|
+
private getAllSystemTables;
|
|
851
|
+
private getModuleTables;
|
|
852
|
+
private getHighTrafficTables;
|
|
853
|
+
private calculateRelationshipStrength;
|
|
854
|
+
private analyzeDataFlowBetweenTables;
|
|
855
|
+
private calculateDataFlowComplexity;
|
|
856
|
+
private identifyProcessChains;
|
|
857
|
+
private buildProcessChain;
|
|
858
|
+
private getProcessInstancesForChain;
|
|
859
|
+
private calculateJourneyDuration;
|
|
860
|
+
private calculateJourneyComplexity;
|
|
861
|
+
private calculateJourneyEfficiency;
|
|
862
|
+
private extractJourneyPattern;
|
|
863
|
+
private categorizeComplexity;
|
|
864
|
+
private calculateOptimizationPotential;
|
|
865
|
+
private analyzePatternPerformance;
|
|
866
|
+
private calculateAutomationScore;
|
|
867
|
+
private determineAutomationType;
|
|
868
|
+
private calculateAutomationSavings;
|
|
869
|
+
private assessImplementationComplexity;
|
|
870
|
+
private generateAutomationDescription;
|
|
871
|
+
private calculateAutomationROI;
|
|
872
|
+
private generateCrossTableRecommendations;
|
|
873
|
+
private generateMigrationSuggestions;
|
|
874
|
+
private findSimilarPatterns;
|
|
875
|
+
private calculatePatternSimilarity;
|
|
876
|
+
private generateCrossTableJsonExport;
|
|
877
|
+
private generateCrossTableCsvExport;
|
|
878
|
+
private generateCrossTableHtmlReport;
|
|
879
|
+
private generateCrossTableProcessDiagram;
|
|
880
|
+
private generateCrossTableDependencyMap;
|
|
881
|
+
private generateCrossTableOptimizationPlan;
|
|
882
|
+
private groupTablesByModule;
|
|
883
|
+
private countInternalConnections;
|
|
884
|
+
private countExternalConnections;
|
|
885
|
+
private generateOptimizationDescription;
|
|
886
|
+
private calculateOptimizationImpact;
|
|
887
|
+
/**
|
|
888
|
+
* Feature 14: Real Time Process Monitoring
|
|
889
|
+
* Monitors active ServiceNow processes in real-time with live alerting and performance tracking
|
|
890
|
+
*/
|
|
891
|
+
private monitorProcess;
|
|
892
|
+
private discoverMonitoringTargets;
|
|
893
|
+
private establishPerformanceBaselines;
|
|
894
|
+
private setupMonitoringLoop;
|
|
895
|
+
private executeLiveMonitoring;
|
|
896
|
+
private processAlertsAndAnomalies;
|
|
897
|
+
private getAllActiveProcesses;
|
|
898
|
+
private getProcessById;
|
|
899
|
+
private getProcessesByCategory;
|
|
900
|
+
private getCriticalProcesses;
|
|
901
|
+
private enrichProcessInformation;
|
|
902
|
+
private calculateProcessPriorities;
|
|
903
|
+
private categorizeProcess;
|
|
904
|
+
private getHistoricalExecutionTimes;
|
|
905
|
+
private getHistoricalThroughput;
|
|
906
|
+
private getHistoricalErrorRate;
|
|
907
|
+
private setupAlertTriggers;
|
|
908
|
+
private setupDataCollectors;
|
|
909
|
+
private collectLiveProcessData;
|
|
910
|
+
private detectRealTimeAnomalies;
|
|
911
|
+
private evaluatePerformanceAlerts;
|
|
912
|
+
private generateAlertRecommendation;
|
|
913
|
+
private analyzeAlertTrends;
|
|
914
|
+
private calculateAlertImpact;
|
|
915
|
+
private generateSuggestedActions;
|
|
916
|
+
private generateRealTimeRecommendations;
|
|
917
|
+
private generateRealTimeDashboard;
|
|
918
|
+
private generateJsonStream;
|
|
919
|
+
private generateCsvLog;
|
|
920
|
+
private generateMonitoringHtmlReport;
|
|
921
|
+
private generateMetricsExport;
|
|
922
|
+
private generateAlertSummary;
|
|
923
|
+
}
|
|
924
|
+
export default ServiceNowAdvancedFeaturesMCP;
|
|
925
|
+
//# sourceMappingURL=servicenow-advanced-features-mcp.d.ts.map
|