snow-flow 1.1.86 → 1.1.89

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.
Files changed (47) hide show
  1. package/CLAUDE.md +232 -10
  2. package/README.md +70 -9
  3. package/dist/cli.js +49 -0
  4. package/dist/cli.js.map +1 -1
  5. package/dist/intelligence/auto-resolution-engine.d.ts +74 -0
  6. package/dist/intelligence/auto-resolution-engine.d.ts.map +1 -0
  7. package/dist/intelligence/auto-resolution-engine.js +518 -0
  8. package/dist/intelligence/auto-resolution-engine.js.map +1 -0
  9. package/dist/intelligence/gap-analysis-engine.d.ts +103 -0
  10. package/dist/intelligence/gap-analysis-engine.d.ts.map +1 -0
  11. package/dist/intelligence/gap-analysis-engine.js +333 -0
  12. package/dist/intelligence/gap-analysis-engine.js.map +1 -0
  13. package/dist/intelligence/manual-instructions-generator.d.ts +88 -0
  14. package/dist/intelligence/manual-instructions-generator.d.ts.map +1 -0
  15. package/dist/intelligence/manual-instructions-generator.js +641 -0
  16. package/dist/intelligence/manual-instructions-generator.js.map +1 -0
  17. package/dist/intelligence/mcp-coverage-analyzer.d.ts +89 -0
  18. package/dist/intelligence/mcp-coverage-analyzer.d.ts.map +1 -0
  19. package/dist/intelligence/mcp-coverage-analyzer.js +556 -0
  20. package/dist/intelligence/mcp-coverage-analyzer.js.map +1 -0
  21. package/dist/intelligence/requirements-analyzer.d.ts +59 -0
  22. package/dist/intelligence/requirements-analyzer.d.ts.map +1 -0
  23. package/dist/intelligence/requirements-analyzer.js +978 -0
  24. package/dist/intelligence/requirements-analyzer.js.map +1 -0
  25. package/dist/mcp/servicenow-platform-development-mcp.js +37 -4
  26. package/dist/mcp/servicenow-platform-development-mcp.js.map +1 -1
  27. package/dist/queen/index.d.ts +1 -0
  28. package/dist/queen/index.d.ts.map +1 -1
  29. package/dist/queen/index.js +2 -1
  30. package/dist/queen/index.js.map +1 -1
  31. package/dist/queen/servicenow-queen.d.ts +12 -0
  32. package/dist/queen/servicenow-queen.d.ts.map +1 -1
  33. package/dist/queen/servicenow-queen.js +168 -9
  34. package/dist/queen/servicenow-queen.js.map +1 -1
  35. package/dist/utils/dependency-detector.d.ts +44 -0
  36. package/dist/utils/dependency-detector.d.ts.map +1 -0
  37. package/dist/utils/dependency-detector.js +208 -0
  38. package/dist/utils/dependency-detector.js.map +1 -0
  39. package/dist/utils/theme-manager.d.ts +54 -0
  40. package/dist/utils/theme-manager.d.ts.map +1 -0
  41. package/dist/utils/theme-manager.js +214 -0
  42. package/dist/utils/theme-manager.js.map +1 -0
  43. package/dist/version.d.ts +15 -1
  44. package/dist/version.d.ts.map +1 -1
  45. package/dist/version.js +72 -1
  46. package/dist/version.js.map +1 -1
  47. package/package.json +1 -1
@@ -0,0 +1,556 @@
1
+ "use strict";
2
+ /**
3
+ * MCP Coverage Analyzer - Maps what ServiceNow MCP tools can handle
4
+ *
5
+ * This module analyzes what ServiceNow configurations and operations
6
+ * our current MCP tools can handle versus what requires manual intervention
7
+ * or additional automation.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.McpCoverageAnalyzer = exports.UNCOVERED_REQUIREMENTS = exports.MCP_TOOL_CAPABILITIES = void 0;
11
+ /**
12
+ * Comprehensive mapping of all ServiceNow MCP tool capabilities
13
+ */
14
+ exports.MCP_TOOL_CAPABILITIES = [
15
+ // Core Development Tools (Primary Coverage)
16
+ {
17
+ tool: 'snow_deploy',
18
+ requirementTypes: ['widget', 'flow', 'application', 'script_include', 'business_rule', 'table'],
19
+ description: 'Unified deployment for core ServiceNow artifacts',
20
+ scope: 'both',
21
+ autoDeployable: true,
22
+ requiresPermissions: ['app_creator', 'admin']
23
+ },
24
+ // Intelligent & Discovery Tools
25
+ {
26
+ tool: 'snow_find_artifact',
27
+ requirementTypes: ['widget', 'flow', 'script_include', 'business_rule', 'table', 'application'],
28
+ description: 'AI-powered artifact discovery and search',
29
+ scope: 'both',
30
+ autoDeployable: false
31
+ },
32
+ {
33
+ tool: 'snow_comprehensive_search',
34
+ requirementTypes: ['widget', 'flow', 'script_include', 'business_rule', 'table', 'user_role'],
35
+ description: 'Multi-table search across ServiceNow',
36
+ scope: 'both',
37
+ autoDeployable: false
38
+ },
39
+ // Flow Development
40
+ {
41
+ tool: 'snow_create_flow',
42
+ requirementTypes: ['flow', 'approval_workflow', 'notification_rule'],
43
+ description: 'Natural language flow creation with AI',
44
+ scope: 'both',
45
+ autoDeployable: true,
46
+ requiresPermissions: ['flow_designer']
47
+ },
48
+ {
49
+ tool: 'snow_test_flow_with_mock',
50
+ requirementTypes: ['flow', 'approval_workflow'],
51
+ description: 'Flow testing with mock data and users',
52
+ scope: 'both',
53
+ autoDeployable: true
54
+ },
55
+ // Operations & ITSM
56
+ {
57
+ tool: 'snow_query_incidents',
58
+ requirementTypes: ['incident_table', 'query_rule'],
59
+ description: 'Advanced incident querying and analysis',
60
+ scope: 'both',
61
+ autoDeployable: false
62
+ },
63
+ {
64
+ tool: 'snow_analyze_incident',
65
+ requirementTypes: ['incident_analysis', 'knowledge_article'],
66
+ description: 'AI-powered incident analysis with suggestions',
67
+ scope: 'both',
68
+ autoDeployable: false
69
+ },
70
+ // Catalog Management
71
+ {
72
+ tool: 'snow_catalog_item_search',
73
+ requirementTypes: ['catalog_item', 'catalog_category'],
74
+ description: 'Intelligent catalog item discovery with fuzzy matching',
75
+ scope: 'both',
76
+ autoDeployable: false
77
+ },
78
+ {
79
+ tool: 'snow_catalog_item_manager',
80
+ requirementTypes: ['catalog_item', 'catalog_variable'],
81
+ description: 'Complete catalog item lifecycle management',
82
+ scope: 'both',
83
+ autoDeployable: true,
84
+ requiresPermissions: ['catalog_admin']
85
+ },
86
+ {
87
+ tool: 'snow_link_catalog_to_flow',
88
+ requirementTypes: ['catalog_item', 'flow', 'workflow_integration'],
89
+ description: 'Direct catalog-flow linking for fulfillment',
90
+ scope: 'both',
91
+ autoDeployable: true
92
+ },
93
+ // User & Group Management
94
+ {
95
+ tool: 'snow_create_user',
96
+ requirementTypes: ['user_account'],
97
+ description: 'User creation with department and role assignment',
98
+ scope: 'global',
99
+ autoDeployable: true,
100
+ requiresPermissions: ['user_admin']
101
+ },
102
+ {
103
+ tool: 'snow_create_user_group',
104
+ requirementTypes: ['user_group'],
105
+ description: 'Group creation with hierarchy support',
106
+ scope: 'global',
107
+ autoDeployable: true,
108
+ requiresPermissions: ['user_admin']
109
+ },
110
+ {
111
+ tool: 'snow_assign_user_to_group',
112
+ requirementTypes: ['group_membership'],
113
+ description: 'User-group assignment management',
114
+ scope: 'global',
115
+ autoDeployable: true,
116
+ requiresPermissions: ['user_admin']
117
+ },
118
+ // Platform Development
119
+ {
120
+ tool: 'snow_create_ui_page',
121
+ requirementTypes: ['ui_page'],
122
+ description: 'UI Page creation with client and server scripts',
123
+ scope: 'both',
124
+ autoDeployable: true,
125
+ requiresPermissions: ['admin']
126
+ },
127
+ {
128
+ tool: 'snow_create_client_script',
129
+ requirementTypes: ['client_script'],
130
+ description: 'Client script creation for forms',
131
+ scope: 'both',
132
+ autoDeployable: true,
133
+ requiresPermissions: ['admin']
134
+ },
135
+ {
136
+ tool: 'snow_create_ui_policy',
137
+ requirementTypes: ['ui_policy'],
138
+ description: 'UI Policy creation for dynamic forms',
139
+ scope: 'both',
140
+ autoDeployable: true,
141
+ requiresPermissions: ['admin']
142
+ },
143
+ {
144
+ tool: 'snow_create_ui_action',
145
+ requirementTypes: ['ui_action'],
146
+ description: 'UI Action creation for forms and lists',
147
+ scope: 'both',
148
+ autoDeployable: true,
149
+ requiresPermissions: ['admin']
150
+ },
151
+ // Integration Tools
152
+ {
153
+ tool: 'snow_create_rest_message',
154
+ requirementTypes: ['rest_message', 'integration_endpoint'],
155
+ description: 'REST Message endpoint creation',
156
+ scope: 'both',
157
+ autoDeployable: true,
158
+ requiresPermissions: ['web_service_admin']
159
+ },
160
+ {
161
+ tool: 'snow_create_transform_map',
162
+ requirementTypes: ['transform_map', 'import_set'],
163
+ description: 'Data transformation and import mapping',
164
+ scope: 'both',
165
+ autoDeployable: true,
166
+ requiresPermissions: ['import_admin']
167
+ },
168
+ // Automation Tools
169
+ {
170
+ tool: 'snow_create_scheduled_job',
171
+ requirementTypes: ['scheduled_job', 'scheduled_task'],
172
+ description: 'Scheduled job creation with cron patterns',
173
+ scope: 'both',
174
+ autoDeployable: true,
175
+ requiresPermissions: ['scheduler_admin']
176
+ },
177
+ {
178
+ tool: 'snow_create_notification',
179
+ requirementTypes: ['notification_rule', 'email_template'],
180
+ description: 'Email notification creation with templates',
181
+ scope: 'both',
182
+ autoDeployable: true,
183
+ requiresPermissions: ['notification_admin']
184
+ },
185
+ {
186
+ tool: 'snow_create_event_rule',
187
+ requirementTypes: ['event_rule', 'event_registration'],
188
+ description: 'Event-driven automation rules',
189
+ scope: 'both',
190
+ autoDeployable: true,
191
+ requiresPermissions: ['admin']
192
+ },
193
+ // Security & Compliance
194
+ {
195
+ tool: 'snow_create_access_control',
196
+ requirementTypes: ['acl_rule'],
197
+ description: 'Access Control List creation',
198
+ scope: 'both',
199
+ autoDeployable: true,
200
+ requiresPermissions: ['security_admin'],
201
+ limitations: ['Complex role hierarchies require manual review']
202
+ },
203
+ {
204
+ tool: 'snow_create_data_policy',
205
+ requirementTypes: ['data_policy'],
206
+ description: 'Data policy and validation rules',
207
+ scope: 'both',
208
+ autoDeployable: true,
209
+ requiresPermissions: ['admin']
210
+ },
211
+ // Reporting & Analytics
212
+ {
213
+ tool: 'snow_create_report',
214
+ requirementTypes: ['report', 'dashboard_tab'],
215
+ description: 'Report creation with dynamic fields',
216
+ scope: 'both',
217
+ autoDeployable: true,
218
+ requiresPermissions: ['report_admin']
219
+ },
220
+ {
221
+ tool: 'snow_create_dashboard',
222
+ requirementTypes: ['dashboard', 'homepage'],
223
+ description: 'Dashboard creation with widgets',
224
+ scope: 'both',
225
+ autoDeployable: true,
226
+ requiresPermissions: ['admin']
227
+ },
228
+ // Update Set Management
229
+ {
230
+ tool: 'snow_update_set_create',
231
+ requirementTypes: ['update_set'],
232
+ description: 'Update Set lifecycle management',
233
+ scope: 'global',
234
+ autoDeployable: true,
235
+ requiresPermissions: ['admin']
236
+ }
237
+ ];
238
+ /**
239
+ * Requirements that have NO current MCP coverage and require manual intervention
240
+ */
241
+ exports.UNCOVERED_REQUIREMENTS = [
242
+ // Advanced Authentication
243
+ 'ldap_config', 'saml_config', 'oauth_provider', 'sso_config', 'mfa_config',
244
+ // System Configuration
245
+ 'system_property', 'system_definition', 'application_menu', 'module_navigation',
246
+ 'theme_configuration', 'branding_config',
247
+ // Database & Performance
248
+ 'database_index', 'database_view', 'table_rotation', 'partitioning_config',
249
+ 'cache_configuration',
250
+ // Advanced Integration
251
+ 'web_service', 'soap_message', 'import_set_transformer', 'coremeta_data',
252
+ 'data_source', 'ldap_server',
253
+ // Workflow & Process
254
+ 'workflow_activity', 'workflow_transition', 'sla_definition', 'escalation_rule',
255
+ 'approval_definition',
256
+ // Advanced Automation
257
+ 'inbound_email_action', 'processor', 'pdf_generator', 'sys_script_validator',
258
+ // Performance & Monitoring
259
+ 'performance_analytics', 'metric_definition', 'job_queue', 'transaction_quota',
260
+ // Advanced UI
261
+ 'form_layout', 'form_section', 'list_layout', 'related_list', 'formatter',
262
+ 'reference_qualifier', 'choice_list', 'dictionary_entry'
263
+ ];
264
+ class McpCoverageAnalyzer {
265
+ /**
266
+ * Analyze coverage for a list of requirements
267
+ */
268
+ static analyzeCoverage(requirements) {
269
+ const covered = [];
270
+ const gaps = [];
271
+ const partialCoverage = [];
272
+ for (const requirement of requirements) {
273
+ const capability = this.findToolCapability(requirement.type);
274
+ if (!capability) {
275
+ gaps.push(requirement);
276
+ }
277
+ else if (capability.limitations && capability.limitations.length > 0) {
278
+ // Partial coverage - tool exists but has limitations
279
+ partialCoverage.push({
280
+ requirement,
281
+ coveringTool: capability.tool,
282
+ limitations: capability.limitations,
283
+ manualSteps: this.generateManualSteps(requirement, capability)
284
+ });
285
+ }
286
+ else {
287
+ covered.push(requirement);
288
+ }
289
+ }
290
+ const coveragePercentage = Math.round(((covered.length + partialCoverage.length * 0.5) / requirements.length) * 100);
291
+ const recommendations = this.generateRecommendations(covered, gaps, partialCoverage);
292
+ return {
293
+ covered,
294
+ gaps,
295
+ partialCoverage,
296
+ coveragePercentage,
297
+ recommendations
298
+ };
299
+ }
300
+ /**
301
+ * Analyze automation capabilities for a specific requirement
302
+ */
303
+ static analyzeAutomationCapability(requirement) {
304
+ const capability = this.findToolCapability(requirement.type);
305
+ if (!capability) {
306
+ return {
307
+ canAutomate: false,
308
+ riskLevel: 'high',
309
+ complexity: 'complex',
310
+ estimatedTime: 'Manual setup required',
311
+ fallbackStrategy: 'Provide detailed manual instructions'
312
+ };
313
+ }
314
+ if (!capability.autoDeployable) {
315
+ return {
316
+ canAutomate: false,
317
+ automationTool: capability.tool,
318
+ riskLevel: 'low',
319
+ complexity: 'simple',
320
+ estimatedTime: '1-2 minutes',
321
+ fallbackStrategy: 'Use tool for discovery, manual configuration'
322
+ };
323
+ }
324
+ // Assess risk based on requirements and permissions
325
+ const riskLevel = this.assessRiskLevel(requirement, capability);
326
+ const complexity = this.assessComplexity(requirement, capability);
327
+ return {
328
+ canAutomate: true,
329
+ automationTool: capability.tool,
330
+ requiredPermissions: capability.requiresPermissions,
331
+ riskLevel,
332
+ complexity,
333
+ estimatedTime: this.estimateTime(complexity),
334
+ fallbackStrategy: this.getFallbackStrategy(requirement, capability)
335
+ };
336
+ }
337
+ /**
338
+ * Get all available tools for a requirement type
339
+ */
340
+ static getAvailableTools(requirementType) {
341
+ return exports.MCP_TOOL_CAPABILITIES.filter(cap => cap.requirementTypes.includes(requirementType));
342
+ }
343
+ /**
344
+ * Check if a requirement type is completely uncovered
345
+ */
346
+ static isUncovered(requirementType) {
347
+ return exports.UNCOVERED_REQUIREMENTS.includes(requirementType);
348
+ }
349
+ /**
350
+ * Generate automation strategy for a list of requirements
351
+ */
352
+ static generateAutomationStrategy(requirements) {
353
+ const automatable = requirements.filter(req => {
354
+ const capability = this.analyzeAutomationCapability(req);
355
+ return capability.canAutomate;
356
+ });
357
+ const manual = requirements.filter(req => {
358
+ const capability = this.analyzeAutomationCapability(req);
359
+ return !capability.canAutomate;
360
+ });
361
+ // Generate execution sequence
362
+ const sequence = this.planExecutionSequence(automatable);
363
+ return { automatable, manual, sequence };
364
+ }
365
+ // Private helper methods
366
+ static findToolCapability(requirementType) {
367
+ return exports.MCP_TOOL_CAPABILITIES.find(cap => cap.requirementTypes.includes(requirementType));
368
+ }
369
+ static generateManualSteps(requirement, capability) {
370
+ const steps = [];
371
+ if (capability.limitations) {
372
+ for (const limitation of capability.limitations) {
373
+ if (limitation.includes('permissions')) {
374
+ steps.push(`Verify ${capability.requiresPermissions?.join(', ')} permissions before deployment`);
375
+ }
376
+ if (limitation.includes('manual review')) {
377
+ steps.push(`Review generated configuration before activation`);
378
+ }
379
+ if (limitation.includes('testing')) {
380
+ steps.push(`Test thoroughly in development environment first`);
381
+ }
382
+ }
383
+ }
384
+ return steps;
385
+ }
386
+ static generateRecommendations(covered, gaps, partial) {
387
+ const recommendations = [];
388
+ if (covered.length > 0) {
389
+ recommendations.push(`✅ ${covered.length} requirements can be fully automated`);
390
+ }
391
+ if (partial.length > 0) {
392
+ recommendations.push(`⚠️ ${partial.length} requirements have partial automation - manual steps needed`);
393
+ }
394
+ if (gaps.length > 0) {
395
+ recommendations.push(`❌ ${gaps.length} requirements require manual configuration`);
396
+ // Group gaps by category for better recommendations
397
+ const gapsByCategory = this.categorizeGaps(gaps);
398
+ for (const [category, count] of Object.entries(gapsByCategory)) {
399
+ if (count > 0) {
400
+ recommendations.push(`• ${count} ${category} configurations need manual setup`);
401
+ }
402
+ }
403
+ }
404
+ // Strategic recommendations
405
+ if (gaps.length / (covered.length + partial.length + gaps.length) > 0.3) {
406
+ recommendations.push('💡 Consider extending MCP tools to cover more requirements');
407
+ }
408
+ if (partial.length > 0) {
409
+ recommendations.push('🔧 Enable auto-permissions flag to reduce manual intervention');
410
+ }
411
+ return recommendations;
412
+ }
413
+ static categorizeGaps(gaps) {
414
+ const categories = {
415
+ 'Authentication': 0,
416
+ 'Database': 0,
417
+ 'Integration': 0,
418
+ 'UI/Forms': 0,
419
+ 'Workflow': 0,
420
+ 'Security': 0,
421
+ 'System': 0
422
+ };
423
+ for (const gap of gaps) {
424
+ switch (gap.type) {
425
+ case 'ldap_config':
426
+ case 'saml_config':
427
+ case 'oauth_provider':
428
+ case 'sso_config':
429
+ case 'mfa_config':
430
+ categories['Authentication']++;
431
+ break;
432
+ case 'database_index':
433
+ case 'database_view':
434
+ case 'table_rotation':
435
+ case 'partitioning_config':
436
+ categories['Database']++;
437
+ break;
438
+ case 'web_service':
439
+ case 'soap_message':
440
+ case 'import_set_transformer':
441
+ case 'data_source':
442
+ categories['Integration']++;
443
+ break;
444
+ case 'form_layout':
445
+ case 'form_section':
446
+ case 'list_layout':
447
+ case 'dictionary_entry':
448
+ categories['UI/Forms']++;
449
+ break;
450
+ case 'workflow_activity':
451
+ case 'workflow_transition':
452
+ case 'sla_definition':
453
+ case 'escalation_rule':
454
+ categories['Workflow']++;
455
+ break;
456
+ case 'acl_rule':
457
+ case 'data_policy':
458
+ categories['Security']++;
459
+ break;
460
+ default:
461
+ categories['System']++;
462
+ }
463
+ }
464
+ return categories;
465
+ }
466
+ static assessRiskLevel(requirement, capability) {
467
+ // Security-related requirements have higher risk
468
+ if (['acl_rule', 'data_policy', 'user_role'].includes(requirement.type)) {
469
+ return 'high';
470
+ }
471
+ // Global scope operations have medium risk
472
+ if (capability.scope === 'global') {
473
+ return 'medium';
474
+ }
475
+ // Standard development artifacts are low risk
476
+ return 'low';
477
+ }
478
+ static assessComplexity(requirement, capability) {
479
+ if (capability.limitations && capability.limitations.length > 2) {
480
+ return 'complex';
481
+ }
482
+ if (capability.requiresPermissions && capability.requiresPermissions.length > 2) {
483
+ return 'moderate';
484
+ }
485
+ return 'simple';
486
+ }
487
+ static estimateTime(complexity) {
488
+ switch (complexity) {
489
+ case 'simple': return '1-2 minutes';
490
+ case 'moderate': return '3-5 minutes';
491
+ case 'complex': return '5-10 minutes';
492
+ }
493
+ }
494
+ static getFallbackStrategy(requirement, capability) {
495
+ if (capability.limitations) {
496
+ return 'Automatic deployment with manual verification';
497
+ }
498
+ if (capability.requiresPermissions) {
499
+ return 'Request permissions, then automatic deployment';
500
+ }
501
+ return 'Full automatic deployment';
502
+ }
503
+ static planExecutionSequence(requirements) {
504
+ // Group by dependencies and complexity
505
+ const grouped = this.groupByExecutionOrder(requirements);
506
+ return grouped.map((group, index) => ({
507
+ step: index + 1,
508
+ requirements: group,
509
+ strategy: group.length > 1 ? 'parallel' : 'sequential',
510
+ estimatedTime: this.calculateGroupTime(group)
511
+ }));
512
+ }
513
+ static groupByExecutionOrder(requirements) {
514
+ // Simple grouping - in a real implementation, this would analyze dependencies
515
+ const groups = [];
516
+ // Group 1: Foundation (tables, applications)
517
+ const foundation = requirements.filter(req => ['table', 'application'].includes(req.type));
518
+ if (foundation.length > 0)
519
+ groups.push(foundation);
520
+ // Group 2: Security and Users
521
+ const security = requirements.filter(req => ['user_role', 'user_group', 'acl_rule', 'data_policy'].includes(req.type));
522
+ if (security.length > 0)
523
+ groups.push(security);
524
+ // Group 3: Core Logic
525
+ const logic = requirements.filter(req => ['business_rule', 'script_include', 'client_script'].includes(req.type));
526
+ if (logic.length > 0)
527
+ groups.push(logic);
528
+ // Group 4: UI and Workflows
529
+ const ui = requirements.filter(req => ['widget', 'flow', 'ui_page', 'ui_action'].includes(req.type));
530
+ if (ui.length > 0)
531
+ groups.push(ui);
532
+ // Group 5: Integration and Automation
533
+ const automation = requirements.filter(req => ['scheduled_job', 'notification_rule', 'rest_message'].includes(req.type));
534
+ if (automation.length > 0)
535
+ groups.push(automation);
536
+ return groups;
537
+ }
538
+ static calculateGroupTime(requirements) {
539
+ let totalMinutes = 0;
540
+ for (const req of requirements) {
541
+ const capability = this.analyzeAutomationCapability(req);
542
+ const timeStr = capability.estimatedTime || '2 minutes';
543
+ const minutes = parseInt(timeStr.match(/\d+/)?.[0] || '2');
544
+ totalMinutes += minutes;
545
+ }
546
+ // For parallel execution, use the maximum time rather than sum
547
+ const maxTime = Math.max(...requirements.map(req => {
548
+ const capability = this.analyzeAutomationCapability(req);
549
+ const timeStr = capability.estimatedTime || '2 minutes';
550
+ return parseInt(timeStr.match(/\d+/)?.[0] || '2');
551
+ }));
552
+ return requirements.length > 1 ? `${maxTime} minutes (parallel)` : `${totalMinutes} minutes`;
553
+ }
554
+ }
555
+ exports.McpCoverageAnalyzer = McpCoverageAnalyzer;
556
+ //# sourceMappingURL=mcp-coverage-analyzer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-coverage-analyzer.js","sourceRoot":"","sources":["../../src/intelligence/mcp-coverage-analyzer.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAqCH;;GAEG;AACU,QAAA,qBAAqB,GAAwB;IACxD,4CAA4C;IAC5C;QACE,IAAI,EAAE,aAAa;QACnB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,CAAC;QAC/F,WAAW,EAAE,kDAAkD;QAC/D,KAAK,EAAE,MAAM;QACb,cAAc,EAAE,IAAI;QACpB,mBAAmB,EAAE,CAAC,aAAa,EAAE,OAAO,CAAC;KAC9C;IAED,gCAAgC;IAChC;QACE,IAAI,EAAE,oBAAoB;QAC1B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,aAAa,CAAC;QAC/F,WAAW,EAAE,0CAA0C;QACvD,KAAK,EAAE,MAAM;QACb,cAAc,EAAE,KAAK;KACtB;IACD;QACE,IAAI,EAAE,2BAA2B;QACjC,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,CAAC;QAC7F,WAAW,EAAE,sCAAsC;QACnD,KAAK,EA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I,WAAW,CAAC;YACxD,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC,CAAC;QAEJ,OAAO,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,qBAAqB,CAAC,CAAC,CAAC,GAAG,YAAY,UAAU,CAAC;IAC/F,CAAC;CACF;AAvYD,kDAuYC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Requirements Analyzer - Intelligent Gap Analysis Engine
3
+ *
4
+ * Analyzes objectives to identify ALL required ServiceNow components,
5
+ * not just what MCP tools can handle.
6
+ */
7
+ export interface ServiceNowRequirement {
8
+ id: string;
9
+ type: RequirementType;
10
+ name: string;
11
+ description: string;
12
+ priority: 'high' | 'medium' | 'low';
13
+ dependencies: string[];
14
+ estimatedEffort: 'low' | 'medium' | 'high';
15
+ automatable: boolean;
16
+ mcpCoverage: boolean;
17
+ category: RequirementCategory;
18
+ specificSteps?: string[];
19
+ validationCriteria?: string[];
20
+ riskLevel: 'low' | 'medium' | 'high';
21
+ }
22
+ export type RequirementType = 'widget' | 'flow' | 'business_rule' | 'script_include' | 'table' | 'application' | 'user_role' | 'acl_rule' | 'oauth_provider' | 'sso_config' | 'data_policy' | 'security_policy' | 'audit_rule' | 'encryption_context' | 'import_set' | 'transform_map' | 'field_map' | 'web_service' | 'rest_message' | 'email_config' | 'ldap_config' | 'database_view' | 'database_index' | 'ui_action' | 'ui_policy' | 'ui_page' | 'ui_macro' | 'ui_script' | 'client_script' | 'css_include' | 'navigator_module' | 'homepage' | 'workflow' | 'scheduled_job' | 'event_rule' | 'notification' | 'email_template' | 'sla_definition' | 'escalation_rule' | 'approval_rule' | 'state_flow' | 'dictionary_entry' | 'choice_list' | 'ui_formatter' | 'display_value' | 'reference_qualifier' | 'data_lookup' | 'sys_property' | 'system_setting' | 'report' | 'dashboard' | 'metric' | 'kpi' | 'scheduled_report' | 'data_source' | 'gauge' | 'chart_configuration' | 'probe' | 'sensor' | 'discovery_rule' | 'cmdb_identification' | 'orchestration_workflow' | 'runbook' | 'knowledge_article' | 'mobile_app_config' | 'service_portal_config' | 'portal_widget' | 'portal_page' | 'portal_theme' | 'mobile_ui_policy';
23
+ export type RequirementCategory = 'core_development' | 'security_compliance' | 'data_integration' | 'user_interface' | 'process_automation' | 'system_configuration' | 'reporting_analytics' | 'mobile_portal' | 'monitoring_operations';
24
+ export interface ObjectiveAnalysis {
25
+ objective: string;
26
+ requirements: ServiceNowRequirement[];
27
+ totalRequirements: number;
28
+ mcpCoveredCount: number;
29
+ gapCount: number;
30
+ mcpCoveragePercentage: number;
31
+ estimatedComplexity: 'low' | 'medium' | 'high' | 'enterprise';
32
+ riskAssessment: 'low' | 'medium' | 'high';
33
+ categories: RequirementCategory[];
34
+ criticalPath: string[];
35
+ estimatedDuration: string;
36
+ }
37
+ export declare class RequirementsAnalyzer {
38
+ private static readonly OBJECTIVE_PATTERNS;
39
+ private static readonly REQUIREMENT_DEFINITIONS;
40
+ /**
41
+ * Analyze an objective and identify all required ServiceNow components
42
+ */
43
+ static analyzeObjective(objective: string): ObjectiveAnalysis;
44
+ private static identifyRequirements;
45
+ private static createRequirement;
46
+ private static addCoreRequirements;
47
+ private static addRequirementIfMissing;
48
+ private static addImpliedRequirements;
49
+ private static generateRequirementName;
50
+ private static calculatePriority;
51
+ private static generateSpecificSteps;
52
+ private static generateValidationCriteria;
53
+ private static sortRequirements;
54
+ private static calculateComplexity;
55
+ private static assessRisk;
56
+ private static calculateCriticalPath;
57
+ private static estimateDuration;
58
+ }
59
+ //# sourceMappingURL=requirements-analyzer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requirements-analyzer.d.ts","sourceRoot":"","sources":["../../src/intelligence/requirements-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE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