snow-flow 3.0.9 → 3.0.13
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-flow.bat +0 -0
- package/claude-flow.ps1 +0 -0
- package/dist/mcp/intelligent-reporting-mcp.d.ts +7 -0
- package/dist/mcp/intelligent-reporting-mcp.js +379 -0
- package/dist/mcp/servicenow-automation-mcp.js +0 -0
- package/dist/mcp/servicenow-deployment-mcp.js +0 -0
- package/dist/mcp/servicenow-integration-mcp.js +0 -0
- package/dist/mcp/servicenow-mcp-server.js +0 -0
- package/dist/mcp/servicenow-operations-mcp.js +0 -0
- package/dist/mcp/servicenow-platform-development-mcp.js +0 -0
- package/dist/mcp/servicenow-progressive-indexer.js +0 -0
- package/dist/mcp/servicenow-reporting-analytics-mcp.js +280 -29
- package/dist/mcp/servicenow-security-compliance-mcp.js +0 -0
- package/dist/mcp/servicenow-update-set-mcp.js +0 -0
- package/dist/mcp/start-all-mcp-servers.js +0 -0
- package/dist/mcp/start-servicenow-mcp.js +0 -0
- package/dist/services/widget-deployment-service.d.ts +2 -1
- package/dist/services/widget-deployment-service.js +17 -16
- package/dist/utils/anti-mock-data-validator.d.ts +66 -0
- package/dist/utils/anti-mock-data-validator.js +316 -0
- package/dist/utils/servicenow-eventual-consistency.d.ts +120 -0
- package/dist/utils/servicenow-eventual-consistency.js +220 -0
- package/memory/agents/README.md +1 -1
- package/memory/claude-flow-data.json +1 -1
- package/memory/sessions/README.md +1 -1
- package/package.json +4 -3
- package/.mcp.json +0 -22
- package/claude-flow.config.json +0 -20
- package/dist/agents/app-creator.agent.d.ts +0 -55
- package/dist/agents/app-creator.agent.js +0 -1292
- package/dist/agents/base/base-snow-agent.d.ts +0 -75
- package/dist/agents/base/base-snow-agent.js +0 -169
- package/dist/agents/base-snow-agent.d.ts +0 -63
- package/dist/agents/base-snow-agent.js +0 -296
- package/dist/agents/coordinator.d.ts +0 -200
- package/dist/agents/coordinator.js +0 -777
- package/dist/agents/flow-builder-agent.d.ts +0 -18
- package/dist/agents/flow-builder-agent.js +0 -197
- package/dist/agents/queen-403-handler.d.ts +0 -47
- package/dist/agents/queen-403-handler.js +0 -175
- package/dist/agents/queen-agent-example.d.ts +0 -23
- package/dist/agents/queen-agent-example.js +0 -240
- package/dist/agents/queen-agent.test.d.ts +0 -6
- package/dist/agents/script-generator.agent.d.ts +0 -32
- package/dist/agents/script-generator.agent.js +0 -772
- package/dist/agents/script-writer-agent.d.ts +0 -22
- package/dist/agents/script-writer-agent.js +0 -695
- package/dist/agents/security-agent.d.ts +0 -23
- package/dist/agents/security-agent.js +0 -619
- package/dist/agents/specialists/automation-specialist.agent.d.ts +0 -44
- package/dist/agents/specialists/automation-specialist.agent.js +0 -204
- package/dist/agents/specialists/data-specialist.agent.d.ts +0 -165
- package/dist/agents/specialists/data-specialist.agent.js +0 -484
- package/dist/agents/specialists/integration-specialist.agent.d.ts +0 -227
- package/dist/agents/specialists/integration-specialist.agent.js +0 -725
- package/dist/agents/specialists/reporting-specialist.agent.d.ts +0 -54
- package/dist/agents/specialists/reporting-specialist.agent.js +0 -193
- package/dist/agents/specialists/security-specialist.agent.d.ts +0 -85
- package/dist/agents/specialists/security-specialist.agent.js +0 -309
- package/dist/agents/teams/adaptive/adaptive-coordinator.agent.d.ts +0 -111
- package/dist/agents/teams/adaptive/adaptive-coordinator.agent.js +0 -383
- package/dist/agents/teams/base-team.d.ts +0 -72
- package/dist/agents/teams/base-team.js +0 -253
- package/dist/agents/teams/team-types.d.ts +0 -265
- package/dist/agents/teams/team-types.js +0 -3
- package/dist/agents/teams/widget/widget-architect.agent.d.ts +0 -61
- package/dist/agents/teams/widget/widget-architect.agent.js +0 -436
- package/dist/agents/teams/widget/widget-backend.agent.d.ts +0 -74
- package/dist/agents/teams/widget/widget-backend.agent.js +0 -1531
- package/dist/agents/teams/widget/widget-frontend.agent.d.ts +0 -67
- package/dist/agents/teams/widget/widget-frontend.agent.js +0 -1014
- package/dist/agents/teams/widget/widget-platform.agent.d.ts +0 -90
- package/dist/agents/teams/widget/widget-platform.agent.js +0 -1190
- package/dist/agents/teams/widget/widget-uiux.agent.d.ts +0 -107
- package/dist/agents/teams/widget/widget-uiux.agent.js +0 -1033
- package/dist/agents/test-agent.d.ts +0 -26
- package/dist/agents/test-agent.js +0 -734
- package/dist/agents/test-agents.d.ts +0 -7
- package/dist/agents/test-agents.js +0 -64
- package/dist/agents/ui-builder.agent.d.ts +0 -50
- package/dist/agents/ui-builder.agent.js +0 -1539
- package/dist/agents/widget-builder.agent.d.ts +0 -32
- package/dist/agents/widget-builder.agent.js +0 -439
- package/dist/agents/widget-creator-agent.d.ts +0 -18
- package/dist/agents/widget-creator-agent.js +0 -498
- package/dist/agents/workflow-designer.agent.d.ts +0 -31
- package/dist/agents/workflow-designer.agent.js +0 -583
- package/dist/api/error-handling.d.ts +0 -325
- package/dist/api/error-handling.js +0 -1488
- package/dist/api/flow-designer-api.d.ts +0 -167
- package/dist/api/flow-designer-api.js +0 -554
- package/dist/api/natural-language-mapper.d.ts +0 -124
- package/dist/api/natural-language-mapper.js +0 -501
- package/dist/api/performance-optimizer.d.ts +0 -240
- package/dist/api/performance-optimizer.js +0 -706
- package/dist/api/transaction-manager.d.ts +0 -189
- package/dist/api/transaction-manager.js +0 -576
- package/dist/assembly/team-assembler.d.ts +0 -140
- package/dist/assembly/team-assembler.js +0 -502
- package/dist/benchmark-performance.d.ts +0 -41
- package/dist/benchmark-performance.js +0 -230
- package/dist/cli/snow-flow-cli-integration.d.ts +0 -30
- package/dist/cli/snow-flow-cli-integration.js +0 -396
- package/dist/coordination/coordination-engine.d.ts +0 -41
- package/dist/coordination/coordination-engine.js +0 -324
- package/dist/coordination/coordination.test.d.ts +0 -6
- package/dist/coordination/example.d.ts +0 -31
- package/dist/coordination/example.js +0 -394
- package/dist/coordination/execution-patterns.d.ts +0 -43
- package/dist/coordination/execution-patterns.js +0 -507
- package/dist/coordination/factory.d.ts +0 -94
- package/dist/coordination/factory.js +0 -433
- package/dist/coordination/index.d.ts +0 -71
- package/dist/coordination/index.js +0 -135
- package/dist/coordination/progress-monitor.d.ts +0 -71
- package/dist/coordination/progress-monitor.js +0 -505
- package/dist/coordination/quality-gates.d.ts +0 -124
- package/dist/coordination/quality-gates.js +0 -577
- package/dist/coordination/shared-memory.d.ts +0 -39
- package/dist/coordination/shared-memory.js +0 -289
- package/dist/coordination/task-dependencies.d.ts +0 -50
- package/dist/coordination/task-dependencies.js +0 -407
- package/dist/coordination/team-coordinator.d.ts +0 -59
- package/dist/coordination/team-coordinator.js +0 -550
- package/dist/coordination/types.d.ts +0 -152
- package/dist/coordination/types.js +0 -3
- package/dist/mcp/mcp-wrapper.d.ts +0 -8
- package/dist/mcp/mcp-wrapper.js +0 -77
- package/dist/mcp/servicenow-flow-composer-enhanced.js +0 -396
- package/dist/mcp/servicenow-flow-composer-mcp.d.ts +0 -7
- package/dist/mcp/servicenow-flow-composer-mcp.js +0 -3103
- package/dist/mcp/servicenow-graph-memory-mcp.d.ts +0 -7
- package/dist/mcp/servicenow-intelligent-mcp.d.ts +0 -143
- package/dist/mcp/servicenow-intelligent-mcp.js +0 -4156
- package/dist/mcp/servicenow-xml-flow-mcp.d.ts +0 -53
- package/dist/mcp/servicenow-xml-flow-mcp.js +0 -1704
- package/dist/mcp/singleton-check.js +0 -31
- package/dist/mcp/test-simple-mcp.d.ts +0 -6
- package/dist/mcp/test-simple-mcp.js +0 -63
- package/dist/memory/hierarchical-memory-system.d.ts +0 -90
- package/dist/memory/hierarchical-memory-system.js +0 -400
- package/dist/memory/index.d.ts +0 -9
- package/dist/memory/index.js +0 -20
- package/dist/memory/mcp-integration-example.d.ts +0 -6
- package/dist/memory/mcp-integration-example.js +0 -281
- package/dist/memory/memory-client.d.ts +0 -199
- package/dist/memory/memory-client.js +0 -364
- package/dist/memory/memory-manager.d.ts +0 -29
- package/dist/memory/memory-manager.js +0 -280
- package/dist/memory/memory-operations.d.ts +0 -179
- package/dist/memory/memory-operations.js +0 -691
- package/dist/memory/memory-system.d.ts +0 -153
- package/dist/memory/memory-system.js +0 -651
- package/dist/memory/memory-test.d.ts +0 -6
- package/dist/memory/memory-test.js +0 -161
- package/dist/memory/snow-flow-memory-patterns.d.ts +0 -213
- package/dist/memory/snow-flow-memory-patterns.js +0 -200
- package/dist/memory/snow-memory.d.ts +0 -54
- package/dist/memory/snow-memory.js +0 -301
- package/dist/memory/swarm-memory.d.ts +0 -135
- package/dist/memory/swarm-memory.js +0 -378
- package/dist/optimization/flow-performance-optimizer.js +0 -723
- package/dist/orchestration/discovery/service-discovery.d.ts +0 -81
- package/dist/orchestration/discovery/service-discovery.js +0 -808
- package/dist/orchestration/distributed-orchestrator.d.ts +0 -131
- package/dist/orchestration/distributed-orchestrator.js +0 -712
- package/dist/orchestration/distribution/task-distribution-engine.d.ts +0 -53
- package/dist/orchestration/distribution/task-distribution-engine.js +0 -586
- package/dist/orchestration/flow-update-orchestrator.js +0 -648
- package/dist/orchestration/interfaces/distributed-orchestration.interface.d.ts +0 -606
- package/dist/orchestration/interfaces/distributed-orchestration.interface.js +0 -65
- package/dist/orchestration/protocols/mcpx-protocol.d.ts +0 -71
- package/dist/orchestration/protocols/mcpx-protocol.js +0 -668
- package/dist/orchestration/state/distributed-state-manager.d.ts +0 -89
- package/dist/orchestration/state/distributed-state-manager.js +0 -716
- package/dist/orchestrator/flow-composer.d.ts +0 -105
- package/dist/orchestrator/flow-composer.js +0 -404
- package/dist/orchestrator/flow-pattern-templates.d.ts +0 -260
- package/dist/orchestrator/flow-pattern-templates.js +0 -908
- package/dist/orchestrator/flow-subflow-decision-engine.d.ts +0 -202
- package/dist/orchestrator/flow-subflow-decision-engine.js +0 -769
- package/dist/orchestrator/flow-validation-engine.d.ts +0 -169
- package/dist/orchestrator/flow-validation-engine.js +0 -913
- package/dist/orchestrator/snow-orchestrator.d.ts +0 -49
- package/dist/orchestrator/snow-orchestrator.js +0 -235
- package/dist/orchestrator/subflow-creation-handler.d.ts +0 -230
- package/dist/orchestrator/subflow-creation-handler.js +0 -791
- package/dist/patterns/adaptive-patterns.d.ts +0 -140
- package/dist/patterns/adaptive-patterns.js +0 -549
- package/dist/queen/advanced-integration-test.d.ts +0 -48
- package/dist/queen/advanced-integration-test.js +0 -473
- package/dist/queen/integration-example.d.ts +0 -82
- package/dist/queen/integration-example.js +0 -219
- package/dist/queen/integration-test.d.ts +0 -72
- package/dist/queen/integration-test.js +0 -563
- package/dist/queen/mock-mcp-client.d.ts +0 -71
- package/dist/queen/mock-mcp-client.js +0 -317
- package/dist/queen/run-integration-tests.d.ts +0 -9
- package/dist/queen/run-integration-tests.js +0 -27
- package/dist/sparc/coordinators/adaptive-coordinator.d.ts +0 -54
- package/dist/sparc/coordinators/adaptive-coordinator.js +0 -367
- package/dist/sparc/coordinators/team-coordinator.d.ts +0 -66
- package/dist/sparc/coordinators/team-coordinator.js +0 -402
- package/dist/sparc/modes/team-modes.d.ts +0 -33
- package/dist/sparc/modes/team-modes.js +0 -399
- package/dist/sparc/teams/application-team.d.ts +0 -73
- package/dist/sparc/teams/application-team.js +0 -463
- package/dist/sparc/teams/flow-team.d.ts +0 -67
- package/dist/sparc/teams/flow-team.js +0 -373
- package/dist/sparc/teams/widget-team.d.ts +0 -61
- package/dist/sparc/teams/widget-team.js +0 -280
- package/dist/specialists/app-specialists.d.ts +0 -93
- package/dist/specialists/app-specialists.js +0 -1639
- package/dist/specialists/base-specialist.d.ts +0 -19
- package/dist/specialists/base-specialist.js +0 -54
- package/dist/specialists/flow-specialists.d.ts +0 -113
- package/dist/specialists/flow-specialists.js +0 -1787
- package/dist/specialists/individual-specialists.d.ts +0 -67
- package/dist/specialists/individual-specialists.js +0 -632
- package/dist/specialists/widget-specialists.d.ts +0 -70
- package/dist/specialists/widget-specialists.js +0 -1264
- package/dist/src/utils/agent-detector.js +0 -655
- package/dist/teams/adaptive-team.d.ts +0 -81
- package/dist/teams/adaptive-team.js +0 -1153
- package/dist/teams/application-team.d.ts +0 -30
- package/dist/teams/application-team.js +0 -547
- package/dist/teams/base-team.d.ts +0 -55
- package/dist/teams/base-team.js +0 -243
- package/dist/teams/flow-team.d.ts +0 -28
- package/dist/teams/flow-team.js +0 -525
- package/dist/teams/widget-team.d.ts +0 -26
- package/dist/teams/widget-team.js +0 -459
- package/dist/templates/flow-template-system.js +0 -625
- package/dist/test-fetch-incidents.d.ts +0 -2
- package/dist/test-fetch-incidents.js +0 -84
- package/dist/test-incident-access.d.ts +0 -2
- package/dist/test-incident-access.js +0 -72
- package/dist/test-iphone-flow.js +0 -189
- package/dist/test-limit-problem.d.ts +0 -2
- package/dist/test-limit-problem.js +0 -60
- package/dist/test-ml-batch-fix.d.ts +0 -2
- package/dist/test-ml-batch-fix.js +0 -104
- package/dist/test-ml-batch.d.ts +0 -2
- package/dist/test-ml-batch.js +0 -87
- package/dist/test-ml-query.d.ts +0 -2
- package/dist/test-ml-query.js +0 -100
- package/dist/test-ml-training-fix.d.ts +0 -12
- package/dist/test-ml-training-fix.js +0 -113
- package/dist/test-ml-training.d.ts +0 -2
- package/dist/test-ml-training.js +0 -32
- package/dist/test-operations-query.d.ts +0 -2
- package/dist/test-operations-query.js +0 -84
- package/dist/test-performance-query.d.ts +0 -2
- package/dist/test-performance-query.js +0 -52
- package/dist/test-singleton-protection.d.ts +0 -8
- package/dist/test-singleton-protection.js +0 -110
- package/dist/test-smart-limits.d.ts +0 -13
- package/dist/test-smart-limits.js +0 -100
- package/dist/test-snow-query-incidents.d.ts +0 -2
- package/dist/test-snow-query-incidents.js +0 -66
- package/dist/test-universal-query.d.ts +0 -2
- package/dist/test-universal-query.js +0 -106
- package/dist/testing/flow-testing-automation.js +0 -641
- package/dist/utils/complete-flow-xml-generator.js +0 -1285
- package/dist/utils/file-storage-fallback.d.ts +0 -62
- package/dist/utils/file-storage-fallback.js +0 -289
- package/dist/utils/flow-api-discovery.d.ts +0 -151
- package/dist/utils/flow-api-discovery.js +0 -439
- package/dist/utils/flow-examples.js +0 -720
- package/dist/utils/flow-structure-builder.js +0 -677
- package/dist/utils/flow-xml-generator.d.ts +0 -41
- package/dist/utils/flow-xml-generator.js +0 -258
- package/dist/utils/improved-flow-xml-generator.js +0 -820
- package/dist/utils/mcp-process-manager.backup.d.ts +0 -58
- package/dist/utils/mcp-process-manager.backup.js +0 -220
- package/dist/utils/mcp-singleton-enforcer.d.ts +0 -36
- package/dist/utils/mcp-singleton-enforcer.js +0 -201
- package/dist/utils/mcp-timeout-fix.d.ts +0 -53
- package/dist/utils/mcp-timeout-fix.js +0 -221
- package/dist/utils/migrate-claude-flow.d.ts +0 -22
- package/dist/utils/migrate-claude-flow.js +0 -120
- package/dist/utils/scope-utils.d.ts +0 -72
- package/dist/utils/scope-utils.js +0 -386
- package/dist/utils/snow-oauth-old.d.ts +0 -65
- package/dist/utils/snow-oauth-old.js +0 -345
- package/dist/utils/xml-first-flow-generator.js +0 -513
- package/memory/servicenow_artifacts/000d9224c895221055906c7518aa2d3d.json +0 -30
- package/memory/servicenow_artifacts/0196b66173303010e46b4a2214f6a7a2.json +0 -36
- package/memory/servicenow_artifacts/125e5d1d837e2a102a7ea130ceaad397.json +0 -30
- package/memory/servicenow_artifacts/7637c1f2b7112210a5e5911cde11a972.json +0 -30
- package/memory/servicenow_artifacts/default_documentation_tables_1754056582292.json +0 -55
- package/memory/servicenow_artifacts/default_documentation_tables_1754057477189.json +0 -55
- package/memory/update-set-sessions/01f82af583faea102a7ea130ceaad3d4.json +0 -9
- package/memory/update-set-sessions/27718fb983faea102a7ea130ceaad34b.json +0 -9
- package/memory/update-set-sessions/412e9bf6833e22502a7ea130ceaad30a.json +0 -8
- package/memory/update-set-sessions/66fc5a79837aea102a7ea130ceaad3ab.json +0 -9
- package/memory/update-set-sessions/71a30ff5837eea102a7ea130ceaad37f.json +0 -9
- package/memory/update-set-sessions/74fba27983faea102a7ea130ceaad3bd.json +0 -9
- package/memory/update-set-sessions/a0b147b5837eea102a7ea130ceaad344.json +0 -58
- package/memory/update-set-sessions/b13f5eb983baea102a7ea130ceaad33e.json +0 -9
- package/reports/swarm-auto-centralized-1752649029776.json +0 -13
- package/src/memory/README.md +0 -240
|
@@ -1,725 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Integration Specialist Agent - Handles system integrations, APIs, and data synchronization
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.IntegrationSpecialistAgent = void 0;
|
|
7
|
-
const base_snow_agent_js_1 = require("../base/base-snow-agent.js");
|
|
8
|
-
class IntegrationSpecialistAgent extends base_snow_agent_js_1.BaseSnowAgent {
|
|
9
|
-
constructor() {
|
|
10
|
-
const capabilities = {
|
|
11
|
-
primarySkills: [
|
|
12
|
-
'api_integration',
|
|
13
|
-
'data_synchronization',
|
|
14
|
-
'system_connectivity',
|
|
15
|
-
'authentication_setup',
|
|
16
|
-
'error_handling',
|
|
17
|
-
'monitoring_setup'
|
|
18
|
-
],
|
|
19
|
-
secondarySkills: [
|
|
20
|
-
'performance_optimization',
|
|
21
|
-
'security_configuration',
|
|
22
|
-
'testing_automation',
|
|
23
|
-
'documentation',
|
|
24
|
-
'troubleshooting'
|
|
25
|
-
],
|
|
26
|
-
complexity: 'high',
|
|
27
|
-
autonomy: 'semi-autonomous'
|
|
28
|
-
};
|
|
29
|
-
super('integration-specialist', 'IntegrationSpecialist', capabilities);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Execute integration-related tasks
|
|
33
|
-
*/
|
|
34
|
-
async execute(task, input) {
|
|
35
|
-
await this.startTask(task);
|
|
36
|
-
try {
|
|
37
|
-
const taskType = task.metadata?.type || 'integration_analysis';
|
|
38
|
-
let result;
|
|
39
|
-
switch (taskType) {
|
|
40
|
-
case 'integration_analysis':
|
|
41
|
-
result = await this.analyzeIntegrationNeeds(task.description, input);
|
|
42
|
-
break;
|
|
43
|
-
case 'integration_design':
|
|
44
|
-
result = await this.createIntegration(input?.requirements || {});
|
|
45
|
-
break;
|
|
46
|
-
case 'api_setup':
|
|
47
|
-
result = await this.setupAPIIntegration(input?.config || {});
|
|
48
|
-
break;
|
|
49
|
-
case 'data_sync':
|
|
50
|
-
result = await this.setupDataSynchronization(input?.mapping || {});
|
|
51
|
-
break;
|
|
52
|
-
case 'monitoring_setup':
|
|
53
|
-
result = await this.setupMonitoring(input?.requirements || {});
|
|
54
|
-
break;
|
|
55
|
-
case 'testing_setup':
|
|
56
|
-
result = await this.setupIntegrationTesting(input?.config || {});
|
|
57
|
-
break;
|
|
58
|
-
default:
|
|
59
|
-
result = await this.analyzeIntegrationNeeds(task.description, input);
|
|
60
|
-
}
|
|
61
|
-
await this.completeTask(result);
|
|
62
|
-
return result;
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
await this.handleError(error);
|
|
66
|
-
throw error;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Analyze integration needs from description
|
|
71
|
-
*/
|
|
72
|
-
async analyzeIntegrationNeeds(description, context) {
|
|
73
|
-
this.logger.info('Analyzing integration needs', { description });
|
|
74
|
-
try {
|
|
75
|
-
const normalizedDesc = description.toLowerCase();
|
|
76
|
-
// Identify source and target systems
|
|
77
|
-
const sourceSystem = this.identifySourceSystem(normalizedDesc);
|
|
78
|
-
const targetSystem = this.identifyTargetSystem(normalizedDesc);
|
|
79
|
-
// Determine synchronization type
|
|
80
|
-
const synchronizationType = this.determineSyncType(normalizedDesc);
|
|
81
|
-
// Plan data mapping
|
|
82
|
-
const dataMapping = await this.planDataMapping(normalizedDesc, context);
|
|
83
|
-
// Configure authentication
|
|
84
|
-
const authentication = this.configureAuthentication(normalizedDesc);
|
|
85
|
-
// Setup error handling
|
|
86
|
-
const errorHandling = this.setupErrorHandling(normalizedDesc);
|
|
87
|
-
// Configure monitoring
|
|
88
|
-
const monitoring = this.configureMonitoring(normalizedDesc);
|
|
89
|
-
const requirements = {
|
|
90
|
-
sourceSystem,
|
|
91
|
-
targetSystem,
|
|
92
|
-
dataMapping,
|
|
93
|
-
synchronizationType,
|
|
94
|
-
authentication,
|
|
95
|
-
errorHandling,
|
|
96
|
-
monitoring
|
|
97
|
-
};
|
|
98
|
-
this.logger.info('Integration needs analysis completed', {
|
|
99
|
-
sourceType: sourceSystem.type,
|
|
100
|
-
targetType: targetSystem.type,
|
|
101
|
-
syncType: synchronizationType,
|
|
102
|
-
mappingCount: dataMapping.length
|
|
103
|
-
});
|
|
104
|
-
return requirements;
|
|
105
|
-
}
|
|
106
|
-
catch (error) {
|
|
107
|
-
this.logger.error('Integration needs analysis failed', error);
|
|
108
|
-
throw error;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Create comprehensive integration solution
|
|
113
|
-
*/
|
|
114
|
-
async createIntegration(requirements) {
|
|
115
|
-
this.logger.info('Creating integration solution', { requirements });
|
|
116
|
-
try {
|
|
117
|
-
// Generate unique integration ID
|
|
118
|
-
const integrationId = `integration_${Date.now()}`;
|
|
119
|
-
// Create integration components
|
|
120
|
-
const components = await this.createIntegrationComponents(requirements);
|
|
121
|
-
// Setup deployment configuration
|
|
122
|
-
const deployment = this.createDeploymentConfig(requirements);
|
|
123
|
-
// Setup testing configuration
|
|
124
|
-
const testing = this.createTestingConfig(requirements);
|
|
125
|
-
// Setup documentation
|
|
126
|
-
const documentation = this.createDocumentationConfig(requirements);
|
|
127
|
-
const integration = {
|
|
128
|
-
id: integrationId,
|
|
129
|
-
name: `${requirements.sourceSystem.name} to ${requirements.targetSystem.name} Integration`,
|
|
130
|
-
description: `Integration between ${requirements.sourceSystem.name} and ${requirements.targetSystem.name}`,
|
|
131
|
-
requirements,
|
|
132
|
-
components,
|
|
133
|
-
deployment,
|
|
134
|
-
testing,
|
|
135
|
-
documentation
|
|
136
|
-
};
|
|
137
|
-
// Validate integration design
|
|
138
|
-
await this.validateIntegrationDesign(integration);
|
|
139
|
-
this.logger.info('Integration solution created successfully', {
|
|
140
|
-
integrationId,
|
|
141
|
-
componentCount: components.length
|
|
142
|
-
});
|
|
143
|
-
return integration;
|
|
144
|
-
}
|
|
145
|
-
catch (error) {
|
|
146
|
-
this.logger.error('Integration creation failed', error);
|
|
147
|
-
throw error;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Setup API integration
|
|
152
|
-
*/
|
|
153
|
-
async setupAPIIntegration(config) {
|
|
154
|
-
this.logger.info('Setting up API integration', { config });
|
|
155
|
-
const apiComponents = {
|
|
156
|
-
restMessage: {
|
|
157
|
-
name: `${config.name}_rest_message`,
|
|
158
|
-
endpoint: config.endpoint || 'https://api.example.com',
|
|
159
|
-
authentication: config.authentication || { type: 'api-key' },
|
|
160
|
-
methods: [
|
|
161
|
-
{
|
|
162
|
-
name: 'GET',
|
|
163
|
-
httpMethod: 'GET',
|
|
164
|
-
endpoint: '/data',
|
|
165
|
-
headers: { 'Content-Type': 'application/json' }
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
name: 'POST',
|
|
169
|
-
httpMethod: 'POST',
|
|
170
|
-
endpoint: '/data',
|
|
171
|
-
headers: { 'Content-Type': 'application/json' }
|
|
172
|
-
}
|
|
173
|
-
]
|
|
174
|
-
},
|
|
175
|
-
transformMap: {
|
|
176
|
-
name: `${config.name}_transform_map`,
|
|
177
|
-
sourceTable: 'import_set_table',
|
|
178
|
-
targetTable: config.targetTable || 'custom_table',
|
|
179
|
-
fieldMappings: config.fieldMappings || []
|
|
180
|
-
},
|
|
181
|
-
scheduledJob: {
|
|
182
|
-
name: `${config.name}_sync_job`,
|
|
183
|
-
schedule: config.schedule || 'daily',
|
|
184
|
-
script: this.generateSyncScript(config)
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
return {
|
|
188
|
-
success: true,
|
|
189
|
-
components: apiComponents,
|
|
190
|
-
recommendations: [
|
|
191
|
-
'Test API connectivity before full deployment',
|
|
192
|
-
'Setup monitoring for API health',
|
|
193
|
-
'Implement proper error handling and retries'
|
|
194
|
-
]
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Setup data synchronization
|
|
199
|
-
*/
|
|
200
|
-
async setupDataSynchronization(mapping) {
|
|
201
|
-
this.logger.info('Setting up data synchronization', { mapping });
|
|
202
|
-
const syncConfig = {
|
|
203
|
-
schedule: mapping.schedule || 'hourly',
|
|
204
|
-
direction: mapping.direction || 'bidirectional',
|
|
205
|
-
conflictResolution: mapping.conflictResolution || 'last_write_wins',
|
|
206
|
-
batchSize: mapping.batchSize || 100,
|
|
207
|
-
incrementalSync: mapping.incrementalSync !== false,
|
|
208
|
-
validation: {
|
|
209
|
-
enabled: true,
|
|
210
|
-
rules: [
|
|
211
|
-
'required_fields_check',
|
|
212
|
-
'data_type_validation',
|
|
213
|
-
'business_rule_validation'
|
|
214
|
-
]
|
|
215
|
-
},
|
|
216
|
-
monitoring: {
|
|
217
|
-
successMetrics: true,
|
|
218
|
-
errorTracking: true,
|
|
219
|
-
performanceMonitoring: true
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
return {
|
|
223
|
-
success: true,
|
|
224
|
-
configuration: syncConfig,
|
|
225
|
-
estimatedSetupTime: '2-4 hours',
|
|
226
|
-
requirements: [
|
|
227
|
-
'Source system API access',
|
|
228
|
-
'Target system write permissions',
|
|
229
|
-
'Monitoring dashboard setup'
|
|
230
|
-
]
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Setup monitoring for integration
|
|
235
|
-
*/
|
|
236
|
-
async setupMonitoring(requirements) {
|
|
237
|
-
this.logger.info('Setting up integration monitoring', { requirements });
|
|
238
|
-
const monitoringSetup = {
|
|
239
|
-
healthChecks: [
|
|
240
|
-
{
|
|
241
|
-
name: 'API Connectivity',
|
|
242
|
-
endpoint: '/health',
|
|
243
|
-
interval: 300, // 5 minutes
|
|
244
|
-
timeout: 30000, // 30 seconds
|
|
245
|
-
alerts: ['email', 'slack']
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
name: 'Data Sync Status',
|
|
249
|
-
check: 'last_sync_timestamp',
|
|
250
|
-
threshold: 3600000, // 1 hour
|
|
251
|
-
alerts: ['email']
|
|
252
|
-
}
|
|
253
|
-
],
|
|
254
|
-
metrics: [
|
|
255
|
-
'request_count',
|
|
256
|
-
'response_time',
|
|
257
|
-
'error_rate',
|
|
258
|
-
'sync_success_rate',
|
|
259
|
-
'data_throughput'
|
|
260
|
-
],
|
|
261
|
-
dashboards: [
|
|
262
|
-
{
|
|
263
|
-
name: 'Integration Overview',
|
|
264
|
-
widgets: ['status', 'metrics', 'recent_errors']
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
name: 'Performance Dashboard',
|
|
268
|
-
widgets: ['response_times', 'throughput', 'error_trends']
|
|
269
|
-
}
|
|
270
|
-
],
|
|
271
|
-
alerting: {
|
|
272
|
-
thresholds: {
|
|
273
|
-
error_rate: { warning: 0.05, critical: 0.1 },
|
|
274
|
-
response_time: { warning: 5000, critical: 10000 },
|
|
275
|
-
sync_delay: { warning: 3600, critical: 7200 }
|
|
276
|
-
},
|
|
277
|
-
channels: requirements.alertChannels || ['email']
|
|
278
|
-
}
|
|
279
|
-
};
|
|
280
|
-
return {
|
|
281
|
-
success: true,
|
|
282
|
-
monitoring: monitoringSetup,
|
|
283
|
-
implementation: {
|
|
284
|
-
effort: 'medium',
|
|
285
|
-
duration: '1-2 days',
|
|
286
|
-
dependencies: ['monitoring tools', 'alert channels']
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* Setup integration testing
|
|
292
|
-
*/
|
|
293
|
-
async setupIntegrationTesting(config) {
|
|
294
|
-
this.logger.info('Setting up integration testing', { config });
|
|
295
|
-
const testingFramework = {
|
|
296
|
-
unitTests: [
|
|
297
|
-
{
|
|
298
|
-
name: 'Data Transformation Test',
|
|
299
|
-
description: 'Verify data mapping and transformation',
|
|
300
|
-
testData: 'sample_input.json',
|
|
301
|
-
assertions: ['field_mapping', 'data_types', 'validation_rules']
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
name: 'Authentication Test',
|
|
305
|
-
description: 'Verify authentication mechanisms',
|
|
306
|
-
testData: 'auth_credentials.json',
|
|
307
|
-
assertions: ['token_generation', 'token_validation', 'refresh_flow']
|
|
308
|
-
}
|
|
309
|
-
],
|
|
310
|
-
integrationTests: [
|
|
311
|
-
{
|
|
312
|
-
name: 'End-to-End Sync Test',
|
|
313
|
-
description: 'Full integration workflow test',
|
|
314
|
-
scenario: 'create_update_sync_verify',
|
|
315
|
-
dataSet: 'integration_test_data.json'
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
name: 'Error Handling Test',
|
|
319
|
-
description: 'Test error scenarios and recovery',
|
|
320
|
-
scenarios: ['network_timeout', 'auth_failure', 'data_validation_error']
|
|
321
|
-
}
|
|
322
|
-
],
|
|
323
|
-
performanceTests: [
|
|
324
|
-
{
|
|
325
|
-
name: 'Load Test',
|
|
326
|
-
load: 100, // requests per second
|
|
327
|
-
duration: 300, // 5 minutes
|
|
328
|
-
expectedResponseTime: 2000 // 2 seconds
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
name: 'Stress Test',
|
|
332
|
-
load: 500,
|
|
333
|
-
duration: 600,
|
|
334
|
-
expectedResponseTime: 5000
|
|
335
|
-
}
|
|
336
|
-
],
|
|
337
|
-
mockServices: {
|
|
338
|
-
enabled: true,
|
|
339
|
-
scenarios: [
|
|
340
|
-
'success_responses',
|
|
341
|
-
'error_responses',
|
|
342
|
-
'timeout_scenarios',
|
|
343
|
-
'partial_failures'
|
|
344
|
-
]
|
|
345
|
-
}
|
|
346
|
-
};
|
|
347
|
-
return {
|
|
348
|
-
success: true,
|
|
349
|
-
testing: testingFramework,
|
|
350
|
-
automation: {
|
|
351
|
-
cicdIntegration: true,
|
|
352
|
-
continuousTesting: true,
|
|
353
|
-
reportGeneration: true
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* Identify source system from description
|
|
359
|
-
*/
|
|
360
|
-
identifySourceSystem(description) {
|
|
361
|
-
// Common system patterns
|
|
362
|
-
if (description.includes('salesforce') || description.includes('sfdc')) {
|
|
363
|
-
return {
|
|
364
|
-
name: 'Salesforce',
|
|
365
|
-
type: 'REST',
|
|
366
|
-
baseUrl: 'https://instance.salesforce.com',
|
|
367
|
-
protocol: 'HTTPS',
|
|
368
|
-
port: 443
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
if (description.includes('sap') || description.includes('erp')) {
|
|
372
|
-
return {
|
|
373
|
-
name: 'SAP',
|
|
374
|
-
type: 'SOAP',
|
|
375
|
-
protocol: 'HTTPS',
|
|
376
|
-
port: 443
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
if (description.includes('database') || description.includes('sql')) {
|
|
380
|
-
return {
|
|
381
|
-
name: 'Database',
|
|
382
|
-
type: 'Database',
|
|
383
|
-
port: 1433
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
// Default REST API
|
|
387
|
-
return {
|
|
388
|
-
name: 'External System',
|
|
389
|
-
type: 'REST',
|
|
390
|
-
protocol: 'HTTPS',
|
|
391
|
-
port: 443
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
/**
|
|
395
|
-
* Identify target system (usually ServiceNow)
|
|
396
|
-
*/
|
|
397
|
-
identifyTargetSystem(description) {
|
|
398
|
-
return {
|
|
399
|
-
name: 'ServiceNow',
|
|
400
|
-
type: 'REST',
|
|
401
|
-
baseUrl: `https://${process.env.SNOW_INSTANCE || 'instance'}.service-now.com`,
|
|
402
|
-
protocol: 'HTTPS',
|
|
403
|
-
port: 443
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* Determine synchronization type
|
|
408
|
-
*/
|
|
409
|
-
determineSyncType(description) {
|
|
410
|
-
if (description.includes('real-time') || description.includes('immediate')) {
|
|
411
|
-
return 'real-time';
|
|
412
|
-
}
|
|
413
|
-
if (description.includes('batch') || description.includes('scheduled')) {
|
|
414
|
-
return 'batch';
|
|
415
|
-
}
|
|
416
|
-
if (description.includes('on-demand') || description.includes('manual')) {
|
|
417
|
-
return 'on-demand';
|
|
418
|
-
}
|
|
419
|
-
// Default to batch for most integrations
|
|
420
|
-
return 'batch';
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* Plan data mapping between systems
|
|
424
|
-
*/
|
|
425
|
-
async planDataMapping(description, context) {
|
|
426
|
-
const mappings = [];
|
|
427
|
-
// Common field mappings
|
|
428
|
-
const commonMappings = [
|
|
429
|
-
{
|
|
430
|
-
sourceField: 'id',
|
|
431
|
-
targetField: 'external_id',
|
|
432
|
-
required: true
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
sourceField: 'name',
|
|
436
|
-
targetField: 'short_description',
|
|
437
|
-
required: true
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
sourceField: 'description',
|
|
441
|
-
targetField: 'description',
|
|
442
|
-
required: false
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
sourceField: 'status',
|
|
446
|
-
targetField: 'state',
|
|
447
|
-
transformation: {
|
|
448
|
-
type: 'lookup',
|
|
449
|
-
expression: 'status_mapping_table',
|
|
450
|
-
parameters: { table: 'status_mapping' }
|
|
451
|
-
},
|
|
452
|
-
required: true
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
sourceField: 'created_date',
|
|
456
|
-
targetField: 'sys_created_on',
|
|
457
|
-
transformation: {
|
|
458
|
-
type: 'format',
|
|
459
|
-
expression: 'ISO8601_to_ServiceNow_datetime',
|
|
460
|
-
parameters: { format: 'yyyy-MM-dd HH:mm:ss' }
|
|
461
|
-
},
|
|
462
|
-
required: false
|
|
463
|
-
}
|
|
464
|
-
];
|
|
465
|
-
mappings.push(...commonMappings);
|
|
466
|
-
// Add custom mappings based on context
|
|
467
|
-
if (context?.customFields) {
|
|
468
|
-
Object.entries(context.customFields).forEach(([source, target]) => {
|
|
469
|
-
mappings.push({
|
|
470
|
-
sourceField: source,
|
|
471
|
-
targetField: target,
|
|
472
|
-
required: false
|
|
473
|
-
});
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
|
-
return mappings;
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Configure authentication for integration
|
|
480
|
-
*/
|
|
481
|
-
configureAuthentication(description) {
|
|
482
|
-
if (description.includes('oauth') || description.includes('token')) {
|
|
483
|
-
return {
|
|
484
|
-
type: 'oauth',
|
|
485
|
-
tokenEndpoint: '/oauth/token',
|
|
486
|
-
refreshToken: true
|
|
487
|
-
};
|
|
488
|
-
}
|
|
489
|
-
if (description.includes('api key') || description.includes('api-key')) {
|
|
490
|
-
return {
|
|
491
|
-
type: 'api-key'
|
|
492
|
-
};
|
|
493
|
-
}
|
|
494
|
-
if (description.includes('certificate') || description.includes('cert')) {
|
|
495
|
-
return {
|
|
496
|
-
type: 'certificate'
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
// Default to basic auth
|
|
500
|
-
return {
|
|
501
|
-
type: 'basic'
|
|
502
|
-
};
|
|
503
|
-
}
|
|
504
|
-
/**
|
|
505
|
-
* Setup error handling configuration
|
|
506
|
-
*/
|
|
507
|
-
setupErrorHandling(description) {
|
|
508
|
-
return {
|
|
509
|
-
retryAttempts: 3,
|
|
510
|
-
retryDelay: 5000, // 5 seconds
|
|
511
|
-
failureActions: [
|
|
512
|
-
{
|
|
513
|
-
condition: 'network_timeout',
|
|
514
|
-
action: 'retry',
|
|
515
|
-
parameters: { maxRetries: 3, backoffDelay: 2000 }
|
|
516
|
-
},
|
|
517
|
-
{
|
|
518
|
-
condition: 'authentication_failure',
|
|
519
|
-
action: 'notify',
|
|
520
|
-
parameters: { severity: 'high', channels: ['email'] }
|
|
521
|
-
},
|
|
522
|
-
{
|
|
523
|
-
condition: 'data_validation_error',
|
|
524
|
-
action: 'skip',
|
|
525
|
-
parameters: { logError: true, continueProcessing: true }
|
|
526
|
-
}
|
|
527
|
-
],
|
|
528
|
-
alerting: {
|
|
529
|
-
channels: ['email'],
|
|
530
|
-
recipients: ['admin@company.com'],
|
|
531
|
-
severity: 'medium'
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* Configure monitoring setup
|
|
537
|
-
*/
|
|
538
|
-
configureMonitoring(description) {
|
|
539
|
-
return {
|
|
540
|
-
metrics: [
|
|
541
|
-
'request_count',
|
|
542
|
-
'response_time',
|
|
543
|
-
'error_rate',
|
|
544
|
-
'data_throughput',
|
|
545
|
-
'sync_lag'
|
|
546
|
-
],
|
|
547
|
-
healthChecks: [
|
|
548
|
-
{
|
|
549
|
-
name: 'API Health',
|
|
550
|
-
endpoint: '/health',
|
|
551
|
-
interval: 300000, // 5 minutes
|
|
552
|
-
timeout: 30000 // 30 seconds
|
|
553
|
-
}
|
|
554
|
-
],
|
|
555
|
-
logging: {
|
|
556
|
-
level: 'info',
|
|
557
|
-
retention: 30, // 30 days
|
|
558
|
-
structured: true
|
|
559
|
-
},
|
|
560
|
-
dashboard: true
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
/**
|
|
564
|
-
* Create integration components
|
|
565
|
-
*/
|
|
566
|
-
async createIntegrationComponents(requirements) {
|
|
567
|
-
const components = [];
|
|
568
|
-
// REST Message component
|
|
569
|
-
if (requirements.sourceSystem.type === 'REST') {
|
|
570
|
-
components.push({
|
|
571
|
-
type: 'rest_message',
|
|
572
|
-
name: `${requirements.sourceSystem.name}_rest_message`,
|
|
573
|
-
configuration: {
|
|
574
|
-
endpoint: requirements.sourceSystem.baseUrl,
|
|
575
|
-
authentication: requirements.authentication,
|
|
576
|
-
timeout: requirements.sourceSystem.timeout || 30000
|
|
577
|
-
},
|
|
578
|
-
dependencies: []
|
|
579
|
-
});
|
|
580
|
-
}
|
|
581
|
-
// Transform Map component
|
|
582
|
-
components.push({
|
|
583
|
-
type: 'transform_map',
|
|
584
|
-
name: `${requirements.sourceSystem.name}_transform_map`,
|
|
585
|
-
configuration: {
|
|
586
|
-
sourceTable: 'import_set_table',
|
|
587
|
-
targetTable: 'target_table',
|
|
588
|
-
fieldMappings: requirements.dataMapping
|
|
589
|
-
},
|
|
590
|
-
dependencies: ['import_set']
|
|
591
|
-
});
|
|
592
|
-
// Import Set component
|
|
593
|
-
components.push({
|
|
594
|
-
type: 'import_set',
|
|
595
|
-
name: `${requirements.sourceSystem.name}_import_set`,
|
|
596
|
-
configuration: {
|
|
597
|
-
label: `${requirements.sourceSystem.name} Import Set`,
|
|
598
|
-
fields: requirements.dataMapping.map(mapping => mapping.sourceField)
|
|
599
|
-
},
|
|
600
|
-
dependencies: []
|
|
601
|
-
});
|
|
602
|
-
// Scheduled Job for batch sync
|
|
603
|
-
if (requirements.synchronizationType === 'batch') {
|
|
604
|
-
components.push({
|
|
605
|
-
type: 'scheduled_job',
|
|
606
|
-
name: `${requirements.sourceSystem.name}_sync_job`,
|
|
607
|
-
configuration: {
|
|
608
|
-
schedule: 'daily',
|
|
609
|
-
script: this.generateSyncScript(requirements)
|
|
610
|
-
},
|
|
611
|
-
dependencies: ['rest_message', 'transform_map']
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
return components;
|
|
615
|
-
}
|
|
616
|
-
/**
|
|
617
|
-
* Create deployment configuration
|
|
618
|
-
*/
|
|
619
|
-
createDeploymentConfig(requirements) {
|
|
620
|
-
return {
|
|
621
|
-
environment: 'development',
|
|
622
|
-
rollbackPlan: 'Disable scheduled jobs and revert component changes',
|
|
623
|
-
notifications: ['integration-team@company.com']
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
/**
|
|
627
|
-
* Create testing configuration
|
|
628
|
-
*/
|
|
629
|
-
createTestingConfig(requirements) {
|
|
630
|
-
return {
|
|
631
|
-
unitTests: [
|
|
632
|
-
{
|
|
633
|
-
name: 'Data Mapping Test',
|
|
634
|
-
description: 'Test data transformation logic',
|
|
635
|
-
input: { sample: 'data' },
|
|
636
|
-
expectedOutput: { transformed: 'data' },
|
|
637
|
-
assertions: ['field_presence', 'data_types']
|
|
638
|
-
}
|
|
639
|
-
],
|
|
640
|
-
integrationTests: [
|
|
641
|
-
{
|
|
642
|
-
name: 'End-to-End Test',
|
|
643
|
-
description: 'Full integration flow test',
|
|
644
|
-
input: { test: 'scenario' },
|
|
645
|
-
expectedOutput: { success: true },
|
|
646
|
-
assertions: ['data_sync', 'error_handling']
|
|
647
|
-
}
|
|
648
|
-
],
|
|
649
|
-
performanceTests: [
|
|
650
|
-
{
|
|
651
|
-
name: 'Load Test',
|
|
652
|
-
load: 10,
|
|
653
|
-
duration: 60,
|
|
654
|
-
expectedResponseTime: 5000
|
|
655
|
-
}
|
|
656
|
-
],
|
|
657
|
-
mockData: [
|
|
658
|
-
{
|
|
659
|
-
endpoint: '/test-data',
|
|
660
|
-
responses: [
|
|
661
|
-
{
|
|
662
|
-
condition: 'success',
|
|
663
|
-
response: { data: 'sample' },
|
|
664
|
-
status: 200
|
|
665
|
-
}
|
|
666
|
-
]
|
|
667
|
-
}
|
|
668
|
-
]
|
|
669
|
-
};
|
|
670
|
-
}
|
|
671
|
-
/**
|
|
672
|
-
* Create documentation configuration
|
|
673
|
-
*/
|
|
674
|
-
createDocumentationConfig(requirements) {
|
|
675
|
-
return {
|
|
676
|
-
apiDocumentation: true,
|
|
677
|
-
userGuide: true,
|
|
678
|
-
troubleshooting: true,
|
|
679
|
-
examples: true
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
/**
|
|
683
|
-
* Validate integration design
|
|
684
|
-
*/
|
|
685
|
-
async validateIntegrationDesign(integration) {
|
|
686
|
-
// Validate component dependencies
|
|
687
|
-
integration.components.forEach(component => {
|
|
688
|
-
component.dependencies.forEach(dep => {
|
|
689
|
-
const dependencyExists = integration.components.some(c => c.name.includes(dep));
|
|
690
|
-
if (!dependencyExists) {
|
|
691
|
-
this.logger.warn(`Component ${component.name} depends on ${dep} which is not found`);
|
|
692
|
-
}
|
|
693
|
-
});
|
|
694
|
-
});
|
|
695
|
-
// Validate authentication configuration
|
|
696
|
-
if (!integration.requirements.authentication.type) {
|
|
697
|
-
throw new Error('Authentication type is required');
|
|
698
|
-
}
|
|
699
|
-
// Validate data mappings
|
|
700
|
-
if (integration.requirements.dataMapping.length === 0) {
|
|
701
|
-
this.logger.warn('No data mappings defined - manual mapping may be required');
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
/**
|
|
705
|
-
* Generate synchronization script
|
|
706
|
-
*/
|
|
707
|
-
generateSyncScript(config) {
|
|
708
|
-
return `
|
|
709
|
-
// Generated sync script for ${config.name || 'integration'}
|
|
710
|
-
var syncManager = new SyncManager();
|
|
711
|
-
try {
|
|
712
|
-
var data = syncManager.fetchData('${config.endpoint || 'external_api'}');
|
|
713
|
-
var transformedData = syncManager.transformData(data);
|
|
714
|
-
var result = syncManager.loadData(transformedData);
|
|
715
|
-
gs.info('Sync completed successfully: ' + result.recordsProcessed + ' records');
|
|
716
|
-
} catch (error) {
|
|
717
|
-
gs.error('Sync failed: ' + error.message);
|
|
718
|
-
// Send notification to admin
|
|
719
|
-
gs.eventQueue('sync.failed', null, error.message);
|
|
720
|
-
}
|
|
721
|
-
`.trim();
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
exports.IntegrationSpecialistAgent = IntegrationSpecialistAgent;
|
|
725
|
-
//# sourceMappingURL=integration-specialist.agent.js.map
|