snow-flow 2.0.2 → 2.0.3

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 (173) hide show
  1. package/{.claude/mcp-config.json → .mcp.json} +13 -12
  2. package/.releaserc.json +47 -0
  3. package/README.md +6 -0
  4. package/package.json +1 -1
  5. package/.claude/claude-settings.json +0 -15
  6. package/.claude/commands/analysis/README.md +0 -9
  7. package/.claude/commands/automation/README.md +0 -9
  8. package/.claude/commands/github/README.md +0 -11
  9. package/.claude/commands/helpers/standard-checkpoint-hooks.sh +0 -179
  10. package/.claude/commands/hooks/README.md +0 -11
  11. package/.claude/commands/monitoring/README.md +0 -9
  12. package/.claude/commands/optimization/README.md +0 -9
  13. package/.claude/commands/training/README.md +0 -9
  14. package/.claude/commands/workflows/README.md +0 -9
  15. package/.claude/config.json +0 -36
  16. package/.claude/helpers/github-setup.sh +0 -28
  17. package/.claude/helpers/quick-start.sh +0 -19
  18. package/.claude/helpers/setup-mcp.sh +0 -18
  19. package/.claude/settings.json +0 -114
  20. package/.claude/settings.local.json +0 -33
  21. package/.claude-flow/metrics/agent-metrics.json +0 -1
  22. package/.claude-flow/metrics/performance.json +0 -9
  23. package/.claude-flow/metrics/system-metrics.json +0 -15986
  24. package/.claude-flow/metrics/task-metrics.json +0 -10
  25. package/.roo/README.md +0 -402
  26. package/.roo/mcp-list.txt +0 -257
  27. package/.roo/mcp.json +0 -32
  28. package/.roo/workflows/basic-tdd.json +0 -32
  29. package/.roomodes +0 -201
  30. package/CLAUDE.md +0 -393
  31. package/bin/snow-flow.js +0 -3
  32. package/dist/cli.js.bak +0 -2052
  33. package/dist/config/snow-flow-config.d.ts +0 -1492
  34. package/dist/config/snow-flow-config.js +0 -938
  35. package/scripts/create-env.js +0 -91
  36. package/scripts/postinstall.js +0 -30
  37. package/scripts/register-mcp-servers.js +0 -210
  38. package/scripts/reset-mcp-servers.js +0 -246
  39. package/scripts/setup-mcp.js +0 -106
  40. package/scripts/update-version.js +0 -31
  41. package/src/agents/README.md +0 -192
  42. package/src/agents/base-agent.ts +0 -251
  43. package/src/agents/coordinator.ts +0 -971
  44. package/src/agents/index.ts +0 -18
  45. package/src/agents/queen-403-handler.ts +0 -230
  46. package/src/agents/queen-agent.ts +0 -1399
  47. package/src/agents/script-writer-agent.ts +0 -769
  48. package/src/agents/security-agent.ts +0 -726
  49. package/src/agents/widget-creator-agent.ts +0 -568
  50. package/src/api/error-handling.ts +0 -1758
  51. package/src/api/natural-language-mapper.ts +0 -630
  52. package/src/api/performance-optimizer.ts +0 -891
  53. package/src/api/transaction-manager.ts +0 -754
  54. package/src/cli/deploy-artifact.ts +0 -304
  55. package/src/cli/snow-flow-cli-integration.ts +0 -434
  56. package/src/cli.ts +0 -4455
  57. package/src/cli.ts.bak +0 -5616
  58. package/src/compliance/advanced-compliance-system.ts +0 -1268
  59. package/src/compliance/index.ts +0 -19
  60. package/src/config/snow-flow-config.ts +0 -1019
  61. package/src/documentation/index.ts +0 -16
  62. package/src/documentation/self-documenting-system.ts +0 -1421
  63. package/src/dynamic-version.ts +0 -44
  64. package/src/healing/index.ts +0 -20
  65. package/src/healing/self-healing-system.ts +0 -1435
  66. package/src/health/README.md +0 -161
  67. package/src/health/system-health.ts +0 -995
  68. package/src/index.ts +0 -60
  69. package/src/intelligence/acl-analyzer.ts +0 -377
  70. package/src/intelligence/auto-resolution-engine.ts +0 -643
  71. package/src/intelligence/gap-analysis-engine.ts +0 -488
  72. package/src/intelligence/manual-instructions-generator.ts +0 -744
  73. package/src/intelligence/mcp-coverage-analyzer.ts +0 -708
  74. package/src/intelligence/multi-pass-requirements-analyzer.ts +0 -603
  75. package/src/intelligence/performance-recommendations-engine.ts +0 -1223
  76. package/src/intelligence/requirements-analyzer.ts +0 -1148
  77. package/src/intelligence/task-analyzer.ts +0 -628
  78. package/src/managers/scope-manager.ts +0 -555
  79. package/src/mcp/advanced/servicenow-advanced-features-mcp.ts +0 -16110
  80. package/src/mcp/base-mcp-server.ts +0 -660
  81. package/src/mcp/http-transport-wrapper.ts +0 -426
  82. package/src/mcp/service-discovery-client.ts +0 -312
  83. package/src/mcp/servicenow-automation-mcp-refactored.ts +0 -678
  84. package/src/mcp/servicenow-automation-mcp.ts +0 -838
  85. package/src/mcp/servicenow-deployment-mcp-refactored.ts +0 -1292
  86. package/src/mcp/servicenow-deployment-mcp.ts +0 -7244
  87. package/src/mcp/servicenow-graph-memory-mcp-refactored.ts +0 -721
  88. package/src/mcp/servicenow-graph-memory-mcp.ts +0 -832
  89. package/src/mcp/servicenow-integration-mcp-refactored.ts +0 -655
  90. package/src/mcp/servicenow-integration-mcp.ts +0 -819
  91. package/src/mcp/servicenow-intelligent-mcp-refactored.ts +0 -977
  92. package/src/mcp/servicenow-intelligent-mcp.ts +0 -4638
  93. package/src/mcp/servicenow-mcp-server.ts +0 -728
  94. package/src/mcp/servicenow-memory-mcp.ts +0 -474
  95. package/src/mcp/servicenow-operations-mcp-refactored.ts +0 -1995
  96. package/src/mcp/servicenow-operations-mcp.ts +0 -3384
  97. package/src/mcp/servicenow-platform-development-mcp-refactored.ts +0 -611
  98. package/src/mcp/servicenow-platform-development-mcp.ts +0 -970
  99. package/src/mcp/servicenow-progressive-indexer.ts +0 -370
  100. package/src/mcp/servicenow-reporting-analytics-mcp-refactored.ts +0 -695
  101. package/src/mcp/servicenow-reporting-analytics-mcp.ts +0 -1123
  102. package/src/mcp/servicenow-security-compliance-mcp-refactored.ts +0 -642
  103. package/src/mcp/servicenow-security-compliance-mcp.ts +0 -1157
  104. package/src/mcp/servicenow-update-set-mcp-refactored.ts +0 -751
  105. package/src/mcp/servicenow-update-set-mcp.ts +0 -811
  106. package/src/mcp/shared/agent-context-provider.ts +0 -365
  107. package/src/mcp/shared/base-mcp-server.ts +0 -2463
  108. package/src/mcp/shared/mcp-memory-manager.ts +0 -540
  109. package/src/mcp/shared/mcp-resource-manager.ts +0 -367
  110. package/src/mcp/snow-flow-mcp.ts +0 -911
  111. package/src/mcp/start-all-mcp-servers.ts +0 -102
  112. package/src/mcp/start-servicenow-mcp.ts +0 -67
  113. package/src/monitoring/enhanced-monitoring-system.ts +0 -1345
  114. package/src/monitoring/performance-tracker.ts +0 -777
  115. package/src/optimization/cost-optimization-engine.ts +0 -1125
  116. package/src/optimization/index.ts +0 -10
  117. package/src/queen/README.md +0 -403
  118. package/src/queen/agent-factory.ts +0 -574
  119. package/src/queen/index.ts +0 -94
  120. package/src/queen/mcp-execution-bridge.ts +0 -681
  121. package/src/queen/neural-learning.ts +0 -319
  122. package/src/queen/parallel-agent-engine.ts +0 -848
  123. package/src/queen/queen-memory-system.ts +0 -490
  124. package/src/queen/queen-memory.ts +0 -456
  125. package/src/queen/servicenow-queen.ts +0 -1029
  126. package/src/queen/types.ts +0 -87
  127. package/src/rollback/smart-rollback-system.ts +0 -866
  128. package/src/schemas/deployment.schema.json +0 -58
  129. package/src/schemas/flow.schema.json +0 -79
  130. package/src/schemas/widget.schema.json +0 -72
  131. package/src/snow-flow-system.ts +0 -541
  132. package/src/sparc/sparc-help.ts +0 -49
  133. package/src/sparc/team-sparc.ts +0 -88
  134. package/src/strategies/global-scope-strategy.ts +0 -736
  135. package/src/templates/base/application.template.json +0 -45
  136. package/src/templates/base/business_rule.template.json +0 -33
  137. package/src/templates/base/script_include.template.json +0 -18
  138. package/src/templates/base/table.template.json +0 -64
  139. package/src/templates/base/widget.template.json +0 -25
  140. package/src/templates/patterns/composite.incident-management.template.json +0 -140
  141. package/src/templates/patterns/widget.dashboard.template.json +0 -238
  142. package/src/templates/patterns/widget.datatable.template.json +0 -292
  143. package/src/testing/integration-test-suite.ts +0 -1276
  144. package/src/types/index.ts +0 -183
  145. package/src/types/neo4j-driver.d.ts +0 -23
  146. package/src/types/servicenow.types.ts +0 -307
  147. package/src/types/snow-flow.types.ts +0 -186
  148. package/src/types/todo.types.ts +0 -70
  149. package/src/utils/action-type-cache.ts +0 -286
  150. package/src/utils/agent-detector.ts +0 -573
  151. package/src/utils/artifact-tracker.ts +0 -379
  152. package/src/utils/dependency-detector.ts +0 -233
  153. package/src/utils/deployment-metadata-handler.ts +0 -518
  154. package/src/utils/error-recovery.ts +0 -680
  155. package/src/utils/logger.ts +0 -60
  156. package/src/utils/mcp-auth-middleware.ts +0 -262
  157. package/src/utils/mcp-config-manager.ts +0 -270
  158. package/src/utils/mcp-server-manager.ts +0 -446
  159. package/src/utils/mcp-tool-registry.ts +0 -298
  160. package/src/utils/migrate-snow-flow.ts +0 -98
  161. package/src/utils/oauth-html-templates.ts +0 -188
  162. package/src/utils/scope-utils.ts +0 -443
  163. package/src/utils/servicenow-client.ts +0 -3321
  164. package/src/utils/servicenow-id-generator.ts +0 -181
  165. package/src/utils/snow-memory-manager.ts +0 -605
  166. package/src/utils/snow-oauth.ts +0 -797
  167. package/src/utils/template-engine.ts +0 -463
  168. package/src/utils/theme-manager.ts +0 -295
  169. package/src/utils/unified-auth-store.ts +0 -222
  170. package/src/utils/update-set-importer.ts +0 -422
  171. package/src/utils/update-set-xml-packager.ts +0 -371
  172. package/src/utils/widget-template-generator.ts +0 -1744
  173. package/src/version.ts +0 -1950
@@ -1,443 +0,0 @@
1
- /**
2
- * Utility functions for scope management and analysis
3
- */
4
-
5
- import { ScopeType } from '../strategies/global-scope-strategy.js';
6
-
7
- export interface ScopeAnalysisResult {
8
- recommendedScope: ScopeType;
9
- confidence: number;
10
- indicators: {
11
- global: string[];
12
- application: string[];
13
- system: string[];
14
- };
15
- complexity: 'low' | 'medium' | 'high';
16
- crossAppIntegration: boolean;
17
- }
18
-
19
- export class ScopeUtils {
20
- /**
21
- * Analyze artifact content to determine optimal scope
22
- */
23
- static analyzeArtifactScope(artifactType: string, artifactData: any): ScopeAnalysisResult {
24
- const _analysis: ScopeAnalysisResult = {
25
- recommendedScope: ScopeType.GLOBAL,
26
- confidence: 0,
27
- indicators: {
28
- global: [],
29
- application: [],
30
- system: []
31
- },
32
- complexity: 'low',
33
- crossAppIntegration: false
34
- };
35
-
36
- const content = this.extractArtifactContent(artifactData);
37
- const contentLower = content.toLowerCase();
38
-
39
- // Global scope indicators
40
- const globalIndicators = [
41
- { pattern: /\b(global|system|util|common|shared|library)\b/gi, weight: 0.3 },
42
- { pattern: /\b(cross[_-]?application|multi[_-]?app|enterprise)\b/gi, weight: 0.4 },
43
- { pattern: /\b(infrastructure|platform|framework)\b/gi, weight: 0.35 },
44
- { pattern: /\b(gs\.|GlideSystem|GlideRecord)\b/gi, weight: 0.2 },
45
- { pattern: /\b(api|rest|soap|integration)\b/gi, weight: 0.25 }
46
- ];
47
-
48
- // Application scope indicators
49
- const applicationIndicators = [
50
- { pattern: /\b(business|custom|specific|department)\b/gi, weight: 0.3 },
51
- { pattern: /\b(workflow|process|procedure)\b/gi, weight: 0.2 },
52
- { pattern: /\b(application[_-]?specific|app[_-]?only)\b/gi, weight: 0.4 },
53
- { pattern: /\b(isolated|contained|scoped)\b/gi, weight: 0.25 }
54
- ];
55
-
56
- // System indicators
57
- const systemIndicators = [
58
- { pattern: /\b(admin|administrator|system[_-]?admin)\b/gi, weight: 0.3 },
59
- { pattern: /\b(configuration|setting|property)\b/gi, weight: 0.2 },
60
- { pattern: /\b(maintenance|monitoring|logging)\b/gi, weight: 0.25 }
61
- ];
62
-
63
- // Analyze global indicators
64
- let globalScore = 0;
65
- globalIndicators.forEach(indicator => {
66
- const matches = content.match(indicator.pattern);
67
- if (matches) {
68
- globalScore += indicator.weight * matches.length;
69
- _analysis.indicators.global.push(`${indicator.pattern.source} (${matches.length} matches)`);
70
- }
71
- });
72
-
73
- // Analyze application indicators
74
- let applicationScore = 0;
75
- applicationIndicators.forEach(indicator => {
76
- const matches = content.match(indicator.pattern);
77
- if (matches) {
78
- applicationScore += indicator.weight * matches.length;
79
- _analysis.indicators.application.push(`${indicator.pattern.source} (${matches.length} matches)`);
80
- }
81
- });
82
-
83
- // Analyze system indicators
84
- let systemScore = 0;
85
- systemIndicators.forEach(indicator => {
86
- const matches = content.match(indicator.pattern);
87
- if (matches) {
88
- systemScore += indicator.weight * matches.length;
89
- _analysis.indicators.system.push(`${indicator.pattern.source} (${matches.length} matches)`);
90
- }
91
- });
92
-
93
- // Determine recommended scope
94
- const totalScore = globalScore + applicationScore + systemScore;
95
- if (totalScore > 0) {
96
- if (globalScore > applicationScore && globalScore > systemScore) {
97
- _analysis.recommendedScope = ScopeType.GLOBAL;
98
- _analysis.confidence = Math.min(globalScore / totalScore, 1.0);
99
- } else if (applicationScore > globalScore && applicationScore > systemScore) {
100
- _analysis.recommendedScope = ScopeType.APPLICATION;
101
- _analysis.confidence = Math.min(applicationScore / totalScore, 1.0);
102
- } else {
103
- _analysis.recommendedScope = ScopeType.AUTO;
104
- _analysis.confidence = 0.5;
105
- }
106
- } else {
107
- _analysis.confidence = 0.3;
108
- }
109
-
110
- // Analyze complexity
111
- _analysis.complexity = this.analyzeComplexity(artifactType, artifactData);
112
-
113
- // Check for cross-application integration
114
- _analysis.crossAppIntegration = this.hasCrossAppIntegration(content);
115
-
116
- return _analysis;
117
- }
118
-
119
- /**
120
- * Extract content from artifact for analysis
121
- */
122
- static extractArtifactContent(artifactData: any): string {
123
- const contentFields = [
124
- 'name', 'description', 'short_description', 'script', 'template',
125
- 'client_script', 'server_script', 'condition', 'instructions'
126
- ];
127
-
128
- let content = '';
129
- contentFields.forEach(field => {
130
- if (artifactData[field]) {
131
- content += ` ${artifactData[field]}`;
132
- }
133
- });
134
-
135
- // Include activity and variable information for flows
136
- if (artifactData.activities) {
137
- artifactData.activities.forEach((activity: any) => {
138
- content += ` ${activity.name} ${activity.type}`;
139
- if (activity.description) content += ` ${activity.description}`;
140
- });
141
- }
142
-
143
- return content;
144
- }
145
-
146
- /**
147
- * Analyze artifact complexity
148
- */
149
- static analyzeComplexity(artifactType: string, artifactData: any): 'low' | 'medium' | 'high' {
150
- let complexityScore = 0;
151
-
152
- // Type-specific complexity scoring
153
- switch (artifactType) {
154
- case 'flow':
155
- const activityCount = artifactData.activities?.length || 0;
156
- complexityScore += activityCount * 0.1;
157
-
158
- // Check for complex activity types
159
- if (artifactData.activities) {
160
- const complexTypes = ['script', 'condition', 'loop', 'rest', 'soap'];
161
- const complexActivities = artifactData.activities.filter((a: any) =>
162
- complexTypes.includes(a.type)
163
- );
164
- complexityScore += complexActivities.length * 0.3;
165
- }
166
- break;
167
-
168
- case 'script_include':
169
- const scriptLength = artifactData.script?.length || 0;
170
- complexityScore += scriptLength / 1000 * 0.2; // 0.2 per 1000 chars
171
-
172
- // Check for complex script patterns
173
- if (artifactData.script) {
174
- const complexPatterns = [
175
- /function\s+\w+\s*\(/g, // Function definitions
176
- /for\s*\(|while\s*\(/g, // Loops
177
- /if\s*\(|switch\s*\(/g, // Conditionals
178
- /try\s*\{|catch\s*\(/g // Error handling
179
- ];
180
-
181
- complexPatterns.forEach(pattern => {
182
- const matches = artifactData.script.match(pattern);
183
- if (matches) complexityScore += matches.length * 0.1;
184
- });
185
- }
186
- break;
187
-
188
- case 'widget':
189
- const templateLength = artifactData.template?.length || 0;
190
- const scriptLength2 = (artifactData.client_script?.length || 0) + (artifactData.server_script?.length || 0);
191
- complexityScore += (templateLength + scriptLength2) / 1000 * 0.15;
192
- break;
193
-
194
- default:
195
- complexityScore += 0.3; // Default complexity
196
- }
197
-
198
- // Return complexity level
199
- if (complexityScore > 2.0) return 'high';
200
- if (complexityScore > 1.0) return 'medium';
201
- return 'low';
202
- }
203
-
204
- /**
205
- * Check if artifact has cross-application integration
206
- */
207
- static hasCrossAppIntegration(content: string): boolean {
208
- const integrationPatterns = [
209
- /\b(rest|soap|api)\b/gi,
210
- /\b(integration|connector|bridge)\b/gi,
211
- /\b(cross[_-]?application|multi[_-]?app)\b/gi,
212
- /\b(external|third[_-]?party)\b/gi,
213
- /\b(http|https|url|endpoint)\b/gi
214
- ];
215
-
216
- return integrationPatterns.some(pattern => pattern.test(content));
217
- }
218
-
219
- /**
220
- * Validate scope configuration
221
- */
222
- static validateScopeConfiguration(config: any): { isValid: boolean; issues: string[] } {
223
- const issues: string[] = [];
224
-
225
- // Validate scope type
226
- if (!config.type || !Object.values(ScopeType).includes(config.type)) {
227
- issues.push('Invalid or missing scope type');
228
- }
229
-
230
- // Validate global scope configuration
231
- if (config.type === ScopeType.GLOBAL) {
232
- if (config.globalDomain && config.globalDomain !== 'global') {
233
- issues.push('Global scope should use "global" domain');
234
- }
235
- }
236
-
237
- // Validate application scope configuration
238
- if (config.type === ScopeType.APPLICATION) {
239
- if (!config.applicationId && !config.applicationName) {
240
- issues.push('Application scope requires applicationId or applicationName');
241
- }
242
- }
243
-
244
- return {
245
- isValid: issues.length === 0,
246
- issues
247
- };
248
- }
249
-
250
- /**
251
- * Generate scope recommendation report
252
- */
253
- static generateScopeReport(_analysis: ScopeAnalysisResult): string {
254
- const report = `
255
- Scope Analysis Report
256
- ====================
257
-
258
- Recommended Scope: ${_analysis.recommendedScope}
259
- Confidence: ${(_analysis.confidence * 100).toFixed(1)}%
260
- Complexity: ${_analysis.complexity}
261
- Cross-App Integration: ${_analysis.crossAppIntegration ? 'Yes' : 'No'}
262
-
263
- Indicators:
264
- -----------
265
- Global Scope Indicators:
266
- ${_analysis.indicators.global.map(i => ` • ${i}`).join('\n')}
267
-
268
- Application Scope Indicators:
269
- ${_analysis.indicators.application.map(i => ` • ${i}`).join('\n')}
270
-
271
- System Indicators:
272
- ${_analysis.indicators.system.map(i => ` • ${i}`).join('\n')}
273
-
274
- Recommendations:
275
- ---------------
276
- ${this.generateRecommendations(_analysis).map(r => ` • ${r}`).join('\n')}
277
- `;
278
-
279
- return report;
280
- }
281
-
282
- /**
283
- * Generate recommendations based on analysis
284
- */
285
- static generateRecommendations(_analysis: ScopeAnalysisResult): string[] {
286
- const recommendations: string[] = [];
287
-
288
- if (_analysis.confidence < 0.5) {
289
- recommendations.push('Consider manual scope selection due to low confidence');
290
- }
291
-
292
- if (_analysis.complexity === 'high') {
293
- recommendations.push('High complexity artifact - ensure proper testing');
294
- }
295
-
296
- if (_analysis.crossAppIntegration) {
297
- recommendations.push('Cross-application integration detected - global scope recommended');
298
- }
299
-
300
- if (_analysis.recommendedScope === ScopeType.GLOBAL) {
301
- recommendations.push('Ensure global scope permissions are available');
302
- recommendations.push('Consider impact on system performance');
303
- }
304
-
305
- if (_analysis.recommendedScope === ScopeType.APPLICATION) {
306
- recommendations.push('Ensure application scope is properly configured');
307
- recommendations.push('Consider application lifecycle management');
308
- }
309
-
310
- return recommendations;
311
- }
312
-
313
- /**
314
- * Compare two scope configurations
315
- */
316
- static compareScopeConfigurations(config1: any, config2: any): {
317
- isDifferent: boolean;
318
- differences: string[];
319
- } {
320
- const differences: string[] = [];
321
-
322
- if (config1.type !== config2.type) {
323
- differences.push(`Scope type: ${config1.type} vs ${config2.type}`);
324
- }
325
-
326
- if (config1.globalDomain !== config2.globalDomain) {
327
- differences.push(`Global domain: ${config1.globalDomain} vs ${config2.globalDomain}`);
328
- }
329
-
330
- if (config1.applicationId !== config2.applicationId) {
331
- differences.push(`Application ID: ${config1.applicationId} vs ${config2.applicationId}`);
332
- }
333
-
334
- if (config1.fallbackToGlobal !== config2.fallbackToGlobal) {
335
- differences.push(`Fallback to global: ${config1.fallbackToGlobal} vs ${config2.fallbackToGlobal}`);
336
- }
337
-
338
- return {
339
- isDifferent: differences.length > 0,
340
- differences
341
- };
342
- }
343
-
344
- /**
345
- * Get scope display name
346
- */
347
- static getScopeDisplayName(scope: ScopeType): string {
348
- switch (scope) {
349
- case ScopeType.GLOBAL:
350
- return 'Global Scope';
351
- case ScopeType.APPLICATION:
352
- return 'Application Scope';
353
- case ScopeType.AUTO:
354
- return 'Auto Selection';
355
- default:
356
- return 'Unknown Scope';
357
- }
358
- }
359
-
360
- /**
361
- * Get scope description
362
- */
363
- static getScopeDescription(scope: ScopeType): string {
364
- switch (scope) {
365
- case ScopeType.GLOBAL:
366
- return 'System-wide scope with no application boundaries';
367
- case ScopeType.APPLICATION:
368
- return 'Application-specific scope with isolation';
369
- case ScopeType.AUTO:
370
- return 'Automatic scope selection based on _analysis';
371
- default:
372
- return 'Unknown scope type';
373
- }
374
- }
375
-
376
- /**
377
- * Get scope benefits
378
- */
379
- static getScopeBenefits(scope: ScopeType): string[] {
380
- switch (scope) {
381
- case ScopeType.GLOBAL:
382
- return [
383
- 'System-wide availability',
384
- 'Cross-application integration',
385
- 'Simplified maintenance',
386
- 'Better performance for utilities',
387
- 'No boundary restrictions'
388
- ];
389
- case ScopeType.APPLICATION:
390
- return [
391
- 'Application isolation',
392
- 'Dedicated namespace',
393
- 'Simplified lifecycle management',
394
- 'Better security boundaries',
395
- 'Easier deployment control'
396
- ];
397
- case ScopeType.AUTO:
398
- return [
399
- 'Optimal scope selection',
400
- 'Reduced configuration complexity',
401
- 'Intelligent decision making',
402
- 'Automatic fallback support',
403
- 'Context-aware deployment'
404
- ];
405
- default:
406
- return [];
407
- }
408
- }
409
-
410
- /**
411
- * Get scope risks
412
- */
413
- static getScopeRisks(scope: ScopeType): string[] {
414
- switch (scope) {
415
- case ScopeType.GLOBAL:
416
- return [
417
- 'System-wide impact of changes',
418
- 'Potential security implications',
419
- 'Higher permission requirements',
420
- 'More complex troubleshooting',
421
- 'Broader testing requirements'
422
- ];
423
- case ScopeType.APPLICATION:
424
- return [
425
- 'Limited cross-application functionality',
426
- 'Potential integration challenges',
427
- 'Increased complexity for shared utilities',
428
- 'Multiple application management',
429
- 'Duplication of common functionality'
430
- ];
431
- case ScopeType.AUTO:
432
- return [
433
- 'Potential incorrect scope selection',
434
- 'Reduced user control',
435
- 'Dependency on _analysis accuracy',
436
- 'Complexity in troubleshooting decisions',
437
- 'Need for fallback mechanisms'
438
- ];
439
- default:
440
- return [];
441
- }
442
- }
443
- }