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.
- package/CLAUDE.md +232 -10
- package/README.md +70 -9
- package/dist/cli.js +49 -0
- package/dist/cli.js.map +1 -1
- package/dist/intelligence/auto-resolution-engine.d.ts +74 -0
- package/dist/intelligence/auto-resolution-engine.d.ts.map +1 -0
- package/dist/intelligence/auto-resolution-engine.js +518 -0
- package/dist/intelligence/auto-resolution-engine.js.map +1 -0
- package/dist/intelligence/gap-analysis-engine.d.ts +103 -0
- package/dist/intelligence/gap-analysis-engine.d.ts.map +1 -0
- package/dist/intelligence/gap-analysis-engine.js +333 -0
- package/dist/intelligence/gap-analysis-engine.js.map +1 -0
- package/dist/intelligence/manual-instructions-generator.d.ts +88 -0
- package/dist/intelligence/manual-instructions-generator.d.ts.map +1 -0
- package/dist/intelligence/manual-instructions-generator.js +641 -0
- package/dist/intelligence/manual-instructions-generator.js.map +1 -0
- package/dist/intelligence/mcp-coverage-analyzer.d.ts +89 -0
- package/dist/intelligence/mcp-coverage-analyzer.d.ts.map +1 -0
- package/dist/intelligence/mcp-coverage-analyzer.js +556 -0
- package/dist/intelligence/mcp-coverage-analyzer.js.map +1 -0
- package/dist/intelligence/requirements-analyzer.d.ts +59 -0
- package/dist/intelligence/requirements-analyzer.d.ts.map +1 -0
- package/dist/intelligence/requirements-analyzer.js +978 -0
- package/dist/intelligence/requirements-analyzer.js.map +1 -0
- package/dist/mcp/servicenow-platform-development-mcp.js +37 -4
- package/dist/mcp/servicenow-platform-development-mcp.js.map +1 -1
- package/dist/queen/index.d.ts +1 -0
- package/dist/queen/index.d.ts.map +1 -1
- package/dist/queen/index.js +2 -1
- package/dist/queen/index.js.map +1 -1
- package/dist/queen/servicenow-queen.d.ts +12 -0
- package/dist/queen/servicenow-queen.d.ts.map +1 -1
- package/dist/queen/servicenow-queen.js +168 -9
- package/dist/queen/servicenow-queen.js.map +1 -1
- package/dist/utils/dependency-detector.d.ts +44 -0
- package/dist/utils/dependency-detector.d.ts.map +1 -0
- package/dist/utils/dependency-detector.js +208 -0
- package/dist/utils/dependency-detector.js.map +1 -0
- package/dist/utils/theme-manager.d.ts +54 -0
- package/dist/utils/theme-manager.d.ts.map +1 -0
- package/dist/utils/theme-manager.js +214 -0
- package/dist/utils/theme-manager.js.map +1 -0
- package/dist/version.d.ts +15 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +72 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Intelligent Gap Analysis Engine - The core orchestrator
|
|
4
|
+
*
|
|
5
|
+
* This is the main engine that orchestrates all components to analyze objectives,
|
|
6
|
+
* detect missing ServiceNow configurations beyond MCP tools, and attempt automated
|
|
7
|
+
* resolution with fallback to detailed manual instructions.
|
|
8
|
+
*
|
|
9
|
+
* This fulfills the user's vision: "alle mogelijke soorten handelingen die nodig
|
|
10
|
+
* zouden zijn om een objective te bereiken die vallen buiten de standaard mcps"
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* const engine = new GapAnalysisEngine(mcpTools, logger, autoPermissions);
|
|
14
|
+
* const result = await engine.analyzeAndResolve("create incident widget with charts");
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.GapAnalysisEngine = void 0;
|
|
18
|
+
exports.analyzeGaps = analyzeGaps;
|
|
19
|
+
exports.quickAnalyze = quickAnalyze;
|
|
20
|
+
const requirements_analyzer_1 = require("./requirements-analyzer");
|
|
21
|
+
const mcp_coverage_analyzer_1 = require("./mcp-coverage-analyzer");
|
|
22
|
+
const auto_resolution_engine_1 = require("./auto-resolution-engine");
|
|
23
|
+
const manual_instructions_generator_1 = require("./manual-instructions-generator");
|
|
24
|
+
class GapAnalysisEngine {
|
|
25
|
+
constructor(mcpTools, logger, autoPermissions = false) {
|
|
26
|
+
this.mcpTools = mcpTools;
|
|
27
|
+
this.logger = logger;
|
|
28
|
+
this.autoResolutionEngine = new auto_resolution_engine_1.AutoResolutionEngine(mcpTools, logger, autoPermissions);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Main entry point - analyze objective and resolve all gaps
|
|
32
|
+
*/
|
|
33
|
+
async analyzeAndResolve(objective, options = {}) {
|
|
34
|
+
const startTime = Date.now();
|
|
35
|
+
const analysisId = `gap_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
36
|
+
this.logger.info(`🧠 Starting Intelligent Gap Analysis for: "${objective}"`);
|
|
37
|
+
this.logger.info(`📊 Analysis ID: ${analysisId}`);
|
|
38
|
+
try {
|
|
39
|
+
// Step 1: Analyze requirements from natural language objective
|
|
40
|
+
this.logger.info('🔍 Step 1: Analyzing requirements...');
|
|
41
|
+
const requirementsAnalysis = requirements_analyzer_1.RequirementsAnalyzer.analyzeObjective(objective);
|
|
42
|
+
if (requirementsAnalysis.requirements.length === 0) {
|
|
43
|
+
this.logger.warn('⚠️ No specific ServiceNow requirements detected');
|
|
44
|
+
return this.createEmptyResult(objective, analysisId, startTime);
|
|
45
|
+
}
|
|
46
|
+
this.logger.info(`📋 Detected ${requirementsAnalysis.requirements.length} requirements`);
|
|
47
|
+
// Step 2: Analyze MCP coverage vs gaps
|
|
48
|
+
this.logger.info('🎯 Step 2: Analyzing MCP coverage...');
|
|
49
|
+
const mcpCoverage = mcp_coverage_analyzer_1.McpCoverageAnalyzer.analyzeCoverage(requirementsAnalysis.requirements);
|
|
50
|
+
this.logger.info(`✅ MCP Coverage: ${mcpCoverage.coveragePercentage}% (${mcpCoverage.covered.length}/${requirementsAnalysis.requirements.length})`);
|
|
51
|
+
this.logger.info(`❌ Gaps requiring attention: ${mcpCoverage.gaps.length}`);
|
|
52
|
+
this.logger.info(`⚠️ Partial coverage items: ${mcpCoverage.partialCoverage.length}`);
|
|
53
|
+
// Step 3: Attempt automated resolution for gaps
|
|
54
|
+
let automationResults;
|
|
55
|
+
if (options.enableAutomation !== false && !options.dryRun) {
|
|
56
|
+
this.logger.info('🤖 Step 3: Attempting automated resolution...');
|
|
57
|
+
automationResults = await this.autoResolutionEngine.resolveBulk(mcpCoverage.gaps);
|
|
58
|
+
this.logger.info(`🚀 Automation complete: ${automationResults.successRate}% success rate`);
|
|
59
|
+
this.logger.info(`✅ Automated: ${automationResults.successful.length}`);
|
|
60
|
+
this.logger.info(`❌ Failed: ${automationResults.failed.length}`);
|
|
61
|
+
this.logger.info(`📋 Manual: ${automationResults.manual.length}`);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
// Dry run or automation disabled
|
|
65
|
+
automationResults = {
|
|
66
|
+
successful: [],
|
|
67
|
+
failed: [],
|
|
68
|
+
manual: mcpCoverage.gaps.map(req => ({
|
|
69
|
+
requirement: req,
|
|
70
|
+
status: 'manual_required',
|
|
71
|
+
manualSteps: ['Automation disabled - manual configuration required']
|
|
72
|
+
})),
|
|
73
|
+
totalTime: 0,
|
|
74
|
+
successRate: 0,
|
|
75
|
+
recommendations: ['Enable automation to attempt automatic resolution']
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
// Step 4: Generate manual guides for remaining gaps
|
|
79
|
+
let manualGuides = null;
|
|
80
|
+
const manualRequirements = [
|
|
81
|
+
...automationResults.failed.map(r => r.requirement),
|
|
82
|
+
...automationResults.manual.map(r => r.requirement)
|
|
83
|
+
];
|
|
84
|
+
if (manualRequirements.length > 0 && options.includeManualGuides !== false) {
|
|
85
|
+
this.logger.info(`📚 Step 4: Generating manual guides for ${manualRequirements.length} items...`);
|
|
86
|
+
manualGuides = manual_instructions_generator_1.ManualInstructionsGenerator.generateBulkInstructions(manualRequirements);
|
|
87
|
+
}
|
|
88
|
+
// Step 5: Build comprehensive result
|
|
89
|
+
const totalTime = Date.now() - startTime;
|
|
90
|
+
const result = this.buildGapAnalysisResult(objective, analysisId, startTime, requirementsAnalysis, mcpCoverage, automationResults, manualGuides, totalTime);
|
|
91
|
+
this.logger.info(`🎉 Gap Analysis complete in ${totalTime}ms`);
|
|
92
|
+
this.logger.info(`📊 Final Summary:`);
|
|
93
|
+
this.logger.info(` • Total Requirements: ${result.totalRequirements}`);
|
|
94
|
+
this.logger.info(` • MCP Coverage: ${result.mcpCoverage.coveragePercentage}%`);
|
|
95
|
+
this.logger.info(` • Automation Rate: ${result.summary.automationRate}%`);
|
|
96
|
+
this.logger.info(` • Manual Work Required: ${result.summary.requiresManualWork} items`);
|
|
97
|
+
return result;
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
this.logger.error('❌ Gap Analysis failed:', error);
|
|
101
|
+
throw new Error(`Gap Analysis failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Quick analysis without resolution - useful for planning
|
|
106
|
+
*/
|
|
107
|
+
async analyzeOnly(objective) {
|
|
108
|
+
this.logger.info(`🔍 Quick analysis for: "${objective}"`);
|
|
109
|
+
const analysis = requirements_analyzer_1.RequirementsAnalyzer.analyzeObjective(objective);
|
|
110
|
+
const coverage = mcp_coverage_analyzer_1.McpCoverageAnalyzer.analyzeCoverage(analysis.requirements);
|
|
111
|
+
let canAutomate = coverage.covered.length;
|
|
112
|
+
let requiresManual = coverage.gaps.length;
|
|
113
|
+
// Check automation capabilities for gaps
|
|
114
|
+
for (const gap of coverage.gaps) {
|
|
115
|
+
if (this.autoResolutionEngine.canAutoResolve(gap)) {
|
|
116
|
+
canAutomate++;
|
|
117
|
+
requiresManual--;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const estimatedTime = this.estimateTotalTime(analysis.requirements, canAutomate, requiresManual);
|
|
121
|
+
return {
|
|
122
|
+
requirements: analysis.requirements,
|
|
123
|
+
coverage,
|
|
124
|
+
canAutomate,
|
|
125
|
+
requiresManual,
|
|
126
|
+
estimatedTime
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Get detailed analysis for a specific requirement type
|
|
131
|
+
*/
|
|
132
|
+
analyzeRequirementType(requirementType) {
|
|
133
|
+
const mcpTools = mcp_coverage_analyzer_1.McpCoverageAnalyzer.getAvailableTools(requirementType);
|
|
134
|
+
const automationStrategies = this.autoResolutionEngine.getResolutionStrategies(requirementType);
|
|
135
|
+
return {
|
|
136
|
+
mcpTools: mcpTools.map(tool => tool.tool),
|
|
137
|
+
automationStrategies: automationStrategies.map(strategy => strategy.automationMethod),
|
|
138
|
+
manualSteps: automationStrategies.flatMap(strategy => strategy.fallbackInstructions),
|
|
139
|
+
riskLevel: automationStrategies[0]?.riskLevel || 'medium'
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
// Private helper methods
|
|
143
|
+
createEmptyResult(objective, analysisId, startTime) {
|
|
144
|
+
return {
|
|
145
|
+
objective,
|
|
146
|
+
analysisId,
|
|
147
|
+
timestamp: startTime,
|
|
148
|
+
requirements: [],
|
|
149
|
+
totalRequirements: 0,
|
|
150
|
+
mcpCoverage: {
|
|
151
|
+
covered: [],
|
|
152
|
+
gaps: [],
|
|
153
|
+
partialCoverage: [],
|
|
154
|
+
coveragePercentage: 100,
|
|
155
|
+
recommendations: ['No specific ServiceNow requirements detected in objective']
|
|
156
|
+
},
|
|
157
|
+
automationResults: {
|
|
158
|
+
successful: [],
|
|
159
|
+
failed: [],
|
|
160
|
+
manual: [],
|
|
161
|
+
totalTime: 0,
|
|
162
|
+
successRate: 100,
|
|
163
|
+
recommendations: ['Consider more specific ServiceNow requirements']
|
|
164
|
+
},
|
|
165
|
+
manualGuides: null,
|
|
166
|
+
summary: {
|
|
167
|
+
totalTime: Date.now() - startTime,
|
|
168
|
+
automationRate: 100,
|
|
169
|
+
successfulAutomation: 0,
|
|
170
|
+
requiresManualWork: 0,
|
|
171
|
+
completionPercentage: 100
|
|
172
|
+
},
|
|
173
|
+
nextSteps: {
|
|
174
|
+
automated: [],
|
|
175
|
+
manual: ['Refine objective with specific ServiceNow requirements'],
|
|
176
|
+
recommendations: ['Use more specific ServiceNow terminology in objective'],
|
|
177
|
+
risks: []
|
|
178
|
+
},
|
|
179
|
+
executionPlan: []
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
buildGapAnalysisResult(objective, analysisId, startTime, requirementsAnalysis, mcpCoverage, automationResults, manualGuides, totalTime) {
|
|
183
|
+
const totalRequirements = requirementsAnalysis.requirements.length;
|
|
184
|
+
const automationRate = totalRequirements > 0
|
|
185
|
+
? Math.round(((automationResults.successful.length) / totalRequirements) * 100)
|
|
186
|
+
: 100;
|
|
187
|
+
const completionPercentage = totalRequirements > 0
|
|
188
|
+
? Math.round(((mcpCoverage.covered.length + automationResults.successful.length) / totalRequirements) * 100)
|
|
189
|
+
: 100;
|
|
190
|
+
return {
|
|
191
|
+
objective,
|
|
192
|
+
analysisId,
|
|
193
|
+
timestamp: startTime,
|
|
194
|
+
requirements: requirementsAnalysis.requirements,
|
|
195
|
+
totalRequirements,
|
|
196
|
+
mcpCoverage,
|
|
197
|
+
automationResults,
|
|
198
|
+
manualGuides,
|
|
199
|
+
summary: {
|
|
200
|
+
totalTime,
|
|
201
|
+
automationRate,
|
|
202
|
+
successfulAutomation: automationResults.successful.length,
|
|
203
|
+
requiresManualWork: automationResults.failed.length + automationResults.manual.length,
|
|
204
|
+
completionPercentage
|
|
205
|
+
},
|
|
206
|
+
nextSteps: this.generateNextSteps(mcpCoverage, automationResults, manualGuides),
|
|
207
|
+
executionPlan: this.generateExecutionPlan(mcpCoverage, automationResults, manualGuides)
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
generateNextSteps(mcpCoverage, automationResults, manualGuides) {
|
|
211
|
+
const automated = [];
|
|
212
|
+
const manual = [];
|
|
213
|
+
const recommendations = [];
|
|
214
|
+
const risks = [];
|
|
215
|
+
// MCP-covered items
|
|
216
|
+
if (mcpCoverage.covered.length > 0) {
|
|
217
|
+
automated.push(`✅ ${mcpCoverage.covered.length} items fully covered by MCP tools`);
|
|
218
|
+
}
|
|
219
|
+
// Successfully automated items
|
|
220
|
+
if (automationResults.successful.length > 0) {
|
|
221
|
+
automated.push(`🤖 ${automationResults.successful.length} gaps automatically resolved`);
|
|
222
|
+
}
|
|
223
|
+
// Failed automation items
|
|
224
|
+
if (automationResults.failed.length > 0) {
|
|
225
|
+
manual.push(`❌ ${automationResults.failed.length} automation attempts failed - manual setup required`);
|
|
226
|
+
recommendations.push('Review failed automation attempts and adjust permissions or configurations');
|
|
227
|
+
}
|
|
228
|
+
// Manual-only items
|
|
229
|
+
if (automationResults.manual.length > 0) {
|
|
230
|
+
manual.push(`📋 ${automationResults.manual.length} items require manual configuration`);
|
|
231
|
+
}
|
|
232
|
+
// Manual guides available
|
|
233
|
+
if (manualGuides) {
|
|
234
|
+
manual.push(`📚 Detailed manual guides available for ${manualGuides.guides.length} configurations`);
|
|
235
|
+
}
|
|
236
|
+
// Recommendations from sub-systems
|
|
237
|
+
recommendations.push(...mcpCoverage.recommendations);
|
|
238
|
+
recommendations.push(...automationResults.recommendations);
|
|
239
|
+
// Risk identification
|
|
240
|
+
if (manualGuides?.overallRisks) {
|
|
241
|
+
risks.push(...manualGuides.overallRisks);
|
|
242
|
+
}
|
|
243
|
+
// Add strategic recommendations
|
|
244
|
+
const automationRate = automationResults.successful.length /
|
|
245
|
+
(automationResults.successful.length + automationResults.failed.length + automationResults.manual.length);
|
|
246
|
+
if (automationRate < 0.5) {
|
|
247
|
+
recommendations.push('💡 Consider enabling auto-permissions to increase automation success rate');
|
|
248
|
+
}
|
|
249
|
+
if (manual.length > automated.length) {
|
|
250
|
+
recommendations.push('🔧 Significant manual work required - consider phased implementation approach');
|
|
251
|
+
}
|
|
252
|
+
return { automated, manual, recommendations, risks };
|
|
253
|
+
}
|
|
254
|
+
generateExecutionPlan(mcpCoverage, automationResults, manualGuides) {
|
|
255
|
+
const plan = [];
|
|
256
|
+
// Phase 1: MCP Tool Deployment
|
|
257
|
+
if (mcpCoverage.covered.length > 0) {
|
|
258
|
+
plan.push({
|
|
259
|
+
phase: 'Phase 1: MCP Tool Deployment',
|
|
260
|
+
description: 'Deploy artifacts using standard MCP tools',
|
|
261
|
+
estimatedTime: `${mcpCoverage.covered.length * 3} minutes`,
|
|
262
|
+
status: 'pending',
|
|
263
|
+
actions: mcpCoverage.covered.map(req => `Deploy ${req.type}: ${req.name}`)
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
// Phase 2: Automated Gap Resolution
|
|
267
|
+
if (automationResults.successful.length > 0) {
|
|
268
|
+
plan.push({
|
|
269
|
+
phase: 'Phase 2: Automated Gap Resolution',
|
|
270
|
+
description: 'Automatically resolve configuration gaps',
|
|
271
|
+
estimatedTime: `${automationResults.totalTime}ms`,
|
|
272
|
+
status: 'completed',
|
|
273
|
+
actions: automationResults.successful.map(res => `✅ Automated: ${res.requirement.type} - ${res.requirement.name}`)
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
// Phase 3: Manual Configuration
|
|
277
|
+
const manualItems = automationResults.failed.length + automationResults.manual.length;
|
|
278
|
+
if (manualItems > 0) {
|
|
279
|
+
plan.push({
|
|
280
|
+
phase: 'Phase 3: Manual Configuration',
|
|
281
|
+
description: 'Complete remaining configurations manually',
|
|
282
|
+
estimatedTime: manualGuides?.executionOrder.reduce((total, phase) => total + parseInt(phase.estimatedTime.match(/\d+/)?.[0] || '10'), 0) + ' minutes' || `${manualItems * 15} minutes`,
|
|
283
|
+
status: 'manual_required',
|
|
284
|
+
actions: [
|
|
285
|
+
...automationResults.failed.map(res => `❌ Manual fix needed: ${res.requirement.name}`),
|
|
286
|
+
...automationResults.manual.map(res => `📋 Manual setup: ${res.requirement.name}`)
|
|
287
|
+
]
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
return plan;
|
|
291
|
+
}
|
|
292
|
+
estimateTotalTime(requirements, canAutomate, requiresManual) {
|
|
293
|
+
const automationTime = canAutomate * 2; // 2 minutes per automated item
|
|
294
|
+
const manualTime = requiresManual * 15; // 15 minutes per manual item
|
|
295
|
+
const totalMinutes = automationTime + manualTime;
|
|
296
|
+
if (totalMinutes < 60) {
|
|
297
|
+
return `${totalMinutes} minutes`;
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
const hours = Math.floor(totalMinutes / 60);
|
|
301
|
+
const minutes = totalMinutes % 60;
|
|
302
|
+
return `${hours}h ${minutes}m`;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
exports.GapAnalysisEngine = GapAnalysisEngine;
|
|
307
|
+
/**
|
|
308
|
+
* Convenience function for quick gap analysis
|
|
309
|
+
*/
|
|
310
|
+
async function analyzeGaps(objective, mcpTools, logger, options = {}) {
|
|
311
|
+
const engine = new GapAnalysisEngine(mcpTools, logger, options.autoPermissions);
|
|
312
|
+
return engine.analyzeAndResolve(objective, options);
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Quick analysis without resolution
|
|
316
|
+
*/
|
|
317
|
+
function quickAnalyze(objective) {
|
|
318
|
+
const analysis = requirements_analyzer_1.RequirementsAnalyzer.analyzeObjective(objective);
|
|
319
|
+
const coverage = mcp_coverage_analyzer_1.McpCoverageAnalyzer.analyzeCoverage(analysis.requirements);
|
|
320
|
+
let estimatedComplexity = 'simple';
|
|
321
|
+
if (analysis.requirements.length > 10 || coverage.coveragePercentage < 50) {
|
|
322
|
+
estimatedComplexity = 'complex';
|
|
323
|
+
}
|
|
324
|
+
else if (analysis.requirements.length > 5 || coverage.coveragePercentage < 80) {
|
|
325
|
+
estimatedComplexity = 'moderate';
|
|
326
|
+
}
|
|
327
|
+
return {
|
|
328
|
+
requirements: analysis.requirements,
|
|
329
|
+
coverage,
|
|
330
|
+
estimatedComplexity
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
//# sourceMappingURL=gap-analysis-engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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
|
2
|
+
* Manual Instructions Generator - Creates detailed manual setup guides
|
|
3
|
+
*
|
|
4
|
+
* This module generates comprehensive, step-by-step instructions for ServiceNow
|
|
5
|
+
* configurations that cannot be automated through MCP tools or direct API calls.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Role-specific instructions (admin, developer, end-user)
|
|
9
|
+
* - Environment-aware guidance (dev, test, prod)
|
|
10
|
+
* - Risk assessment and warnings
|
|
11
|
+
* - Prerequisites and dependencies
|
|
12
|
+
* - Verification steps and testing guidance
|
|
13
|
+
*/
|
|
14
|
+
import { ServiceNowRequirement, RequirementType } from './requirements-analyzer';
|
|
15
|
+
import { ResolutionResult } from './auto-resolution-engine';
|
|
16
|
+
export interface ManualInstruction {
|
|
17
|
+
step: number;
|
|
18
|
+
title: string;
|
|
19
|
+
description: string;
|
|
20
|
+
navigation: string[];
|
|
21
|
+
actions: string[];
|
|
22
|
+
screenshots?: string[];
|
|
23
|
+
warnings?: string[];
|
|
24
|
+
verificationSteps?: string[];
|
|
25
|
+
estimatedTime?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ManualGuide {
|
|
28
|
+
requirement: ServiceNowRequirement;
|
|
29
|
+
title: string;
|
|
30
|
+
overview: string;
|
|
31
|
+
prerequisites: string[];
|
|
32
|
+
totalEstimatedTime: string;
|
|
33
|
+
riskLevel: 'low' | 'medium' | 'high';
|
|
34
|
+
requiredRoles: string[];
|
|
35
|
+
environment: 'development' | 'testing' | 'production' | 'any';
|
|
36
|
+
instructions: ManualInstruction[];
|
|
37
|
+
verificationGuide: string[];
|
|
38
|
+
troubleshooting: Array<{
|
|
39
|
+
issue: string;
|
|
40
|
+
solution: string;
|
|
41
|
+
}>;
|
|
42
|
+
relatedDocuments: string[];
|
|
43
|
+
}
|
|
44
|
+
export interface BulkManualGuide {
|
|
45
|
+
title: string;
|
|
46
|
+
overview: string;
|
|
47
|
+
executionOrder: Array<{
|
|
48
|
+
phase: string;
|
|
49
|
+
requirements: ServiceNowRequirement[];
|
|
50
|
+
parallelExecution: boolean;
|
|
51
|
+
estimatedTime: string;
|
|
52
|
+
}>;
|
|
53
|
+
guides: ManualGuide[];
|
|
54
|
+
overallRisks: string[];
|
|
55
|
+
coordinationNotes: string[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Manual instruction templates for ServiceNow configurations
|
|
59
|
+
*/
|
|
60
|
+
export declare const MANUAL_INSTRUCTION_TEMPLATES: Record<RequirementType, Partial<ManualGuide>>;
|
|
61
|
+
export declare class ManualInstructionsGenerator {
|
|
62
|
+
/**
|
|
63
|
+
* Generate detailed manual instructions for a single requirement
|
|
64
|
+
*/
|
|
65
|
+
static generateInstructions(requirement: ServiceNowRequirement): ManualGuide;
|
|
66
|
+
/**
|
|
67
|
+
* Generate bulk manual guide for multiple requirements
|
|
68
|
+
*/
|
|
69
|
+
static generateBulkInstructions(requirements: ServiceNowRequirement[]): BulkManualGuide;
|
|
70
|
+
/**
|
|
71
|
+
* Generate instructions from failed automation results
|
|
72
|
+
*/
|
|
73
|
+
static generateFromFailedResults(results: ResolutionResult[]): ManualGuide[];
|
|
74
|
+
/**
|
|
75
|
+
* Generate environment-specific instructions
|
|
76
|
+
*/
|
|
77
|
+
static generateForEnvironment(requirement: ServiceNowRequirement, environment: 'development' | 'testing' | 'production'): ManualGuide;
|
|
78
|
+
private static generateGenericInstructions;
|
|
79
|
+
private static generateGenericVerification;
|
|
80
|
+
private static calculateTotalTime;
|
|
81
|
+
private static customizeInstructions;
|
|
82
|
+
private static generateBulkOverview;
|
|
83
|
+
private static planExecutionOrder;
|
|
84
|
+
private static identifyOverallRisks;
|
|
85
|
+
private static generateCoordinationNotes;
|
|
86
|
+
private static generateRelatedDocuments;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=manual-instructions-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manual-instructions-generator.d.ts","sourceRoot":"","sources":["../../src/intelligence/manual-instruct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