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,1264 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QASpecialist = exports.ServiceNowSpecialist = exports.UIUXSpecialist = exports.BackendSpecialist = exports.FrontendSpecialist = void 0;
|
|
4
|
-
const base_specialist_js_1 = require("./base-specialist.js");
|
|
5
|
-
class FrontendSpecialist extends base_specialist_js_1.BaseSpecialist {
|
|
6
|
-
constructor(options = {}) {
|
|
7
|
-
super('Frontend Developer', 'Frontend Developer', ['HTML', 'CSS', 'JavaScript', 'Responsive Design', 'Accessibility', 'UI Components'], options);
|
|
8
|
-
}
|
|
9
|
-
async execute(task, context) {
|
|
10
|
-
await this.logProgress(`Analyzing frontend requirements for: ${task}`);
|
|
11
|
-
const analysis = await this.analyzeTask(task);
|
|
12
|
-
// Frontend-specific analysis
|
|
13
|
-
const frontendRequirements = {
|
|
14
|
-
templateStructure: this.analyzeTemplateNeeds(task),
|
|
15
|
-
styleRequirements: this.analyzeStyleNeeds(task),
|
|
16
|
-
interactivity: this.analyzeInteractivityNeeds(task),
|
|
17
|
-
responsiveness: this.analyzeResponsivenessNeeds(task),
|
|
18
|
-
accessibility: this.analyzeAccessibilityNeeds(task)
|
|
19
|
-
};
|
|
20
|
-
await this.logProgress('Creating HTML template structure');
|
|
21
|
-
const template = await this.createTemplate(frontendRequirements);
|
|
22
|
-
await this.logProgress('Designing CSS styles and responsive layout');
|
|
23
|
-
const styles = await this.createStyles(frontendRequirements);
|
|
24
|
-
await this.logProgress('Implementing client-side interactions');
|
|
25
|
-
const clientScript = await this.createClientScript(frontendRequirements);
|
|
26
|
-
return {
|
|
27
|
-
...analysis,
|
|
28
|
-
specialist: 'Frontend Developer',
|
|
29
|
-
deliverables: {
|
|
30
|
-
template,
|
|
31
|
-
styles,
|
|
32
|
-
clientScript,
|
|
33
|
-
requirements: frontendRequirements
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
analyzeTemplateNeeds(task) {
|
|
38
|
-
const needs = {
|
|
39
|
-
layout: 'grid',
|
|
40
|
-
components: [],
|
|
41
|
-
dataBinding: false,
|
|
42
|
-
forms: false,
|
|
43
|
-
charts: false,
|
|
44
|
-
tables: false
|
|
45
|
-
};
|
|
46
|
-
const lowerTask = task.toLowerCase();
|
|
47
|
-
if (lowerTask.includes('dashboard') || lowerTask.includes('chart')) {
|
|
48
|
-
needs.layout = 'dashboard';
|
|
49
|
-
needs.charts = true;
|
|
50
|
-
needs.components.push('chart-container', 'kpi-cards', 'filter-panel');
|
|
51
|
-
}
|
|
52
|
-
if (lowerTask.includes('form') || lowerTask.includes('input')) {
|
|
53
|
-
needs.forms = true;
|
|
54
|
-
needs.components.push('form-fields', 'validation', 'submit-buttons');
|
|
55
|
-
}
|
|
56
|
-
if (lowerTask.includes('list') || lowerTask.includes('table')) {
|
|
57
|
-
needs.tables = true;
|
|
58
|
-
needs.components.push('data-table', 'pagination', 'search');
|
|
59
|
-
}
|
|
60
|
-
return needs;
|
|
61
|
-
}
|
|
62
|
-
analyzeStyleNeeds(task) {
|
|
63
|
-
const needs = {
|
|
64
|
-
theme: 'modern',
|
|
65
|
-
colorScheme: 'primary',
|
|
66
|
-
spacing: 'standard',
|
|
67
|
-
typography: 'readable',
|
|
68
|
-
animations: false,
|
|
69
|
-
responsive: true
|
|
70
|
-
};
|
|
71
|
-
const lowerTask = task.toLowerCase();
|
|
72
|
-
if (lowerTask.includes('mobile') || lowerTask.includes('responsive')) {
|
|
73
|
-
needs.responsive = true;
|
|
74
|
-
needs.spacing = 'compact';
|
|
75
|
-
}
|
|
76
|
-
if (lowerTask.includes('dashboard') || lowerTask.includes('executive')) {
|
|
77
|
-
needs.theme = 'executive';
|
|
78
|
-
needs.animations = true;
|
|
79
|
-
}
|
|
80
|
-
return needs;
|
|
81
|
-
}
|
|
82
|
-
analyzeInteractivityNeeds(task) {
|
|
83
|
-
const needs = {
|
|
84
|
-
events: [],
|
|
85
|
-
filters: false,
|
|
86
|
-
sorting: false,
|
|
87
|
-
pagination: false,
|
|
88
|
-
realtime: false
|
|
89
|
-
};
|
|
90
|
-
const lowerTask = task.toLowerCase();
|
|
91
|
-
if (lowerTask.includes('filter') || lowerTask.includes('search')) {
|
|
92
|
-
needs.filters = true;
|
|
93
|
-
needs.events.push('filter-change', 'search-input');
|
|
94
|
-
}
|
|
95
|
-
if (lowerTask.includes('sort') || lowerTask.includes('order')) {
|
|
96
|
-
needs.sorting = true;
|
|
97
|
-
needs.events.push('sort-column');
|
|
98
|
-
}
|
|
99
|
-
if (lowerTask.includes('realtime') || lowerTask.includes('live')) {
|
|
100
|
-
needs.realtime = true;
|
|
101
|
-
needs.events.push('data-refresh', 'websocket-update');
|
|
102
|
-
}
|
|
103
|
-
return needs;
|
|
104
|
-
}
|
|
105
|
-
analyzeResponsivenessNeeds(task) {
|
|
106
|
-
return {
|
|
107
|
-
breakpoints: ['mobile', 'tablet', 'desktop'],
|
|
108
|
-
flexibleLayouts: true,
|
|
109
|
-
touchOptimized: true,
|
|
110
|
-
mobileFirst: true
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
analyzeAccessibilityNeeds(task) {
|
|
114
|
-
return {
|
|
115
|
-
wcagLevel: 'AA',
|
|
116
|
-
screenReader: true,
|
|
117
|
-
keyboardNavigation: true,
|
|
118
|
-
colorContrast: true,
|
|
119
|
-
semanticMarkup: true
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
async createTemplate(requirements) {
|
|
123
|
-
if (requirements.templateStructure.layout === 'dashboard') {
|
|
124
|
-
return this.createDashboardTemplate(requirements);
|
|
125
|
-
}
|
|
126
|
-
else if (requirements.templateStructure.forms) {
|
|
127
|
-
return this.createFormTemplate(requirements);
|
|
128
|
-
}
|
|
129
|
-
else if (requirements.templateStructure.tables) {
|
|
130
|
-
return this.createTableTemplate(requirements);
|
|
131
|
-
}
|
|
132
|
-
return this.createGenericTemplate(requirements);
|
|
133
|
-
}
|
|
134
|
-
createDashboardTemplate(requirements) {
|
|
135
|
-
return `
|
|
136
|
-
<div class="widget-container dashboard-layout" role="main" aria-label="Dashboard Widget">
|
|
137
|
-
<div class="dashboard-header">
|
|
138
|
-
<h2 class="widget-title">{{data.title || 'Dashboard'}}</h2>
|
|
139
|
-
${requirements.interactivity.filters ? '<div class="filter-panel" role="region" aria-label="Filters"></div>' : ''}
|
|
140
|
-
</div>
|
|
141
|
-
|
|
142
|
-
<div class="dashboard-content">
|
|
143
|
-
${requirements.templateStructure.charts ? `
|
|
144
|
-
<div class="chart-container" role="img" aria-label="Data Visualization">
|
|
145
|
-
<canvas id="chart-{{::data.chartId}}" width="400" height="200"></canvas>
|
|
146
|
-
</div>
|
|
147
|
-
` : ''}
|
|
148
|
-
|
|
149
|
-
<div class="kpi-grid" role="region" aria-label="Key Performance Indicators">
|
|
150
|
-
<div ng-repeat="kpi in data.kpis" class="kpi-card" tabindex="0">
|
|
151
|
-
<div class="kpi-value">{{kpi.value}}</div>
|
|
152
|
-
<div class="kpi-label">{{kpi.label}}</div>
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
|
|
157
|
-
${requirements.interactivity.realtime ? `
|
|
158
|
-
<div class="realtime-indicator" role="status" aria-live="polite">
|
|
159
|
-
<span ng-if="data.lastUpdated">Last updated: {{data.lastUpdated | date:'short'}}</span>
|
|
160
|
-
</div>
|
|
161
|
-
` : ''}
|
|
162
|
-
</div>
|
|
163
|
-
`.trim();
|
|
164
|
-
}
|
|
165
|
-
createFormTemplate(requirements) {
|
|
166
|
-
return `
|
|
167
|
-
<div class="widget-container form-layout" role="main" aria-label="Form Widget">
|
|
168
|
-
<form class="widget-form" role="form" ng-submit="c.submitForm()">
|
|
169
|
-
<div class="form-header">
|
|
170
|
-
<h2 class="widget-title">{{data.title || 'Form'}}</h2>
|
|
171
|
-
</div>
|
|
172
|
-
|
|
173
|
-
<div class="form-content">
|
|
174
|
-
<div ng-repeat="field in data.fields" class="form-group">
|
|
175
|
-
<label for="field-{{field.name}}" class="form-label">{{field.label}}</label>
|
|
176
|
-
<input
|
|
177
|
-
id="field-{{field.name}}"
|
|
178
|
-
type="{{field.type || 'text'}}"
|
|
179
|
-
class="form-control"
|
|
180
|
-
ng-model="c.formData[field.name]"
|
|
181
|
-
ng-required="field.required"
|
|
182
|
-
aria-describedby="{{field.name}}-help">
|
|
183
|
-
<div id="{{field.name}}-help" class="form-help" ng-if="field.help">{{field.help}}</div>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
|
|
187
|
-
<div class="form-actions">
|
|
188
|
-
<button type="submit" class="btn btn-primary" ng-disabled="!c.isFormValid()">
|
|
189
|
-
{{data.submitLabel || 'Submit'}}
|
|
190
|
-
</button>
|
|
191
|
-
<button type="button" class="btn btn-secondary" ng-click="c.resetForm()">
|
|
192
|
-
Reset
|
|
193
|
-
</button>
|
|
194
|
-
</div>
|
|
195
|
-
</form>
|
|
196
|
-
</div>
|
|
197
|
-
`.trim();
|
|
198
|
-
}
|
|
199
|
-
createTableTemplate(requirements) {
|
|
200
|
-
return `
|
|
201
|
-
<div class="widget-container table-layout" role="main" aria-label="Data Table Widget">
|
|
202
|
-
<div class="table-header">
|
|
203
|
-
<h2 class="widget-title">{{data.title || 'Data Table'}}</h2>
|
|
204
|
-
${requirements.interactivity.filters ? `
|
|
205
|
-
<div class="table-controls">
|
|
206
|
-
<input type="search"
|
|
207
|
-
class="search-input"
|
|
208
|
-
placeholder="Search..."
|
|
209
|
-
ng-model="c.searchTerm"
|
|
210
|
-
aria-label="Search table data">
|
|
211
|
-
</div>
|
|
212
|
-
` : ''}
|
|
213
|
-
</div>
|
|
214
|
-
|
|
215
|
-
<div class="table-container" role="region" aria-label="Data Table">
|
|
216
|
-
<table class="data-table" role="table">
|
|
217
|
-
<thead>
|
|
218
|
-
<tr role="row">
|
|
219
|
-
<th ng-repeat="column in data.columns"
|
|
220
|
-
role="columnheader"
|
|
221
|
-
ng-click="c.sortBy(column.field)"
|
|
222
|
-
class="sortable"
|
|
223
|
-
tabindex="0">
|
|
224
|
-
{{column.label}}
|
|
225
|
-
<span class="sort-indicator" ng-if="c.sortField === column.field">
|
|
226
|
-
{{c.sortDirection === 'asc' ? '↑' : '↓'}}
|
|
227
|
-
</span>
|
|
228
|
-
</th>
|
|
229
|
-
</tr>
|
|
230
|
-
</thead>
|
|
231
|
-
<tbody>
|
|
232
|
-
<tr ng-repeat="row in c.filteredData" role="row" tabindex="0">
|
|
233
|
-
<td ng-repeat="column in data.columns" role="gridcell">
|
|
234
|
-
{{row[column.field]}}
|
|
235
|
-
</td>
|
|
236
|
-
</tr>
|
|
237
|
-
</tbody>
|
|
238
|
-
</table>
|
|
239
|
-
</div>
|
|
240
|
-
|
|
241
|
-
${requirements.interactivity.pagination ? `
|
|
242
|
-
<div class="pagination" role="navigation" aria-label="Table pagination">
|
|
243
|
-
<button ng-click="c.previousPage()" ng-disabled="c.currentPage === 1">Previous</button>
|
|
244
|
-
<span>Page {{c.currentPage}} of {{c.totalPages}}</span>
|
|
245
|
-
<button ng-click="c.nextPage()" ng-disabled="c.currentPage === c.totalPages">Next</button>
|
|
246
|
-
</div>
|
|
247
|
-
` : ''}
|
|
248
|
-
</div>
|
|
249
|
-
`.trim();
|
|
250
|
-
}
|
|
251
|
-
createGenericTemplate(requirements) {
|
|
252
|
-
return `
|
|
253
|
-
<div class="widget-container generic-layout" role="main" aria-label="Widget">
|
|
254
|
-
<div class="widget-header">
|
|
255
|
-
<h2 class="widget-title">{{data.title || 'Widget'}}</h2>
|
|
256
|
-
</div>
|
|
257
|
-
|
|
258
|
-
<div class="widget-content">
|
|
259
|
-
<div ng-if="data.message" class="widget-message">{{data.message}}</div>
|
|
260
|
-
<div ng-if="data.items" class="widget-items">
|
|
261
|
-
<div ng-repeat="item in data.items" class="widget-item" tabindex="0">
|
|
262
|
-
{{item.title || item.name || item}}
|
|
263
|
-
</div>
|
|
264
|
-
</div>
|
|
265
|
-
</div>
|
|
266
|
-
</div>
|
|
267
|
-
`.trim();
|
|
268
|
-
}
|
|
269
|
-
async createStyles(requirements) {
|
|
270
|
-
const baseStyles = `
|
|
271
|
-
.widget-container {
|
|
272
|
-
font-family: 'Source Sans Pro', Arial, sans-serif;
|
|
273
|
-
line-height: 1.6;
|
|
274
|
-
color: #333;
|
|
275
|
-
background: #fff;
|
|
276
|
-
border-radius: 8px;
|
|
277
|
-
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
278
|
-
overflow: hidden;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.widget-title {
|
|
282
|
-
font-size: 1.25rem;
|
|
283
|
-
font-weight: 600;
|
|
284
|
-
margin: 0 0 1rem 0;
|
|
285
|
-
color: #2c3e50;
|
|
286
|
-
}
|
|
287
|
-
`;
|
|
288
|
-
const responsiveStyles = requirements.styleRequirements.responsive ? `
|
|
289
|
-
@media (max-width: 768px) {
|
|
290
|
-
.widget-container {
|
|
291
|
-
margin: 0.5rem;
|
|
292
|
-
border-radius: 4px;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.widget-title {
|
|
296
|
-
font-size: 1.1rem;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
@media (min-width: 1200px) {
|
|
301
|
-
.widget-container {
|
|
302
|
-
margin: 1rem;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
` : '';
|
|
306
|
-
const layoutSpecificStyles = this.getLayoutStyles(requirements);
|
|
307
|
-
return `${baseStyles}\n${layoutSpecificStyles}\n${responsiveStyles}`.trim();
|
|
308
|
-
}
|
|
309
|
-
getLayoutStyles(requirements) {
|
|
310
|
-
if (requirements.templateStructure.layout === 'dashboard') {
|
|
311
|
-
return `
|
|
312
|
-
.dashboard-layout {
|
|
313
|
-
padding: 1.5rem;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
.dashboard-header {
|
|
317
|
-
display: flex;
|
|
318
|
-
justify-content: space-between;
|
|
319
|
-
align-items: center;
|
|
320
|
-
margin-bottom: 1.5rem;
|
|
321
|
-
padding-bottom: 1rem;
|
|
322
|
-
border-bottom: 2px solid #e9ecef;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
.chart-container {
|
|
326
|
-
margin-bottom: 2rem;
|
|
327
|
-
text-align: center;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
.kpi-grid {
|
|
331
|
-
display: grid;
|
|
332
|
-
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
333
|
-
gap: 1rem;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.kpi-card {
|
|
337
|
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
338
|
-
color: white;
|
|
339
|
-
padding: 1.5rem;
|
|
340
|
-
border-radius: 8px;
|
|
341
|
-
text-align: center;
|
|
342
|
-
transition: transform 0.2s ease;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.kpi-card:hover, .kpi-card:focus {
|
|
346
|
-
transform: translateY(-2px);
|
|
347
|
-
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.kpi-value {
|
|
351
|
-
font-size: 2rem;
|
|
352
|
-
font-weight: bold;
|
|
353
|
-
margin-bottom: 0.5rem;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
.kpi-label {
|
|
357
|
-
font-size: 0.9rem;
|
|
358
|
-
opacity: 0.9;
|
|
359
|
-
}
|
|
360
|
-
`;
|
|
361
|
-
}
|
|
362
|
-
return '';
|
|
363
|
-
}
|
|
364
|
-
async createClientScript(requirements) {
|
|
365
|
-
const baseScript = `
|
|
366
|
-
function($scope, $timeout) {
|
|
367
|
-
var c = this;
|
|
368
|
-
|
|
369
|
-
// Initialize component
|
|
370
|
-
c.init = function() {
|
|
371
|
-
c.loading = false;
|
|
372
|
-
c.error = null;
|
|
373
|
-
c.setupEventHandlers();
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
c.setupEventHandlers = function() {
|
|
377
|
-
// Base event handling
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
// Initialize
|
|
381
|
-
c.init();
|
|
382
|
-
}
|
|
383
|
-
`;
|
|
384
|
-
const interactivityScript = this.generateInteractivityScript(requirements);
|
|
385
|
-
return `${baseScript}\n${interactivityScript}`.trim();
|
|
386
|
-
}
|
|
387
|
-
generateInteractivityScript(requirements) {
|
|
388
|
-
let script = '';
|
|
389
|
-
if (requirements.interactivity.filters) {
|
|
390
|
-
script += `
|
|
391
|
-
// Filter functionality
|
|
392
|
-
c.searchTerm = '';
|
|
393
|
-
c.filterData = function() {
|
|
394
|
-
if (!c.searchTerm) {
|
|
395
|
-
c.filteredData = c.data.items || [];
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
c.filteredData = (c.data.items || []).filter(function(item) {
|
|
400
|
-
return JSON.stringify(item).toLowerCase().includes(c.searchTerm.toLowerCase());
|
|
401
|
-
});
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
$scope.$watch('c.searchTerm', c.filterData);
|
|
405
|
-
`;
|
|
406
|
-
}
|
|
407
|
-
if (requirements.interactivity.sorting) {
|
|
408
|
-
script += `
|
|
409
|
-
// Sorting functionality
|
|
410
|
-
c.sortField = null;
|
|
411
|
-
c.sortDirection = 'asc';
|
|
412
|
-
|
|
413
|
-
c.sortBy = function(field) {
|
|
414
|
-
if (c.sortField === field) {
|
|
415
|
-
c.sortDirection = c.sortDirection === 'asc' ? 'desc' : 'asc';
|
|
416
|
-
} else {
|
|
417
|
-
c.sortField = field;
|
|
418
|
-
c.sortDirection = 'asc';
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
c.applySorting();
|
|
422
|
-
};
|
|
423
|
-
|
|
424
|
-
c.applySorting = function() {
|
|
425
|
-
if (!c.sortField) return;
|
|
426
|
-
|
|
427
|
-
c.filteredData.sort(function(a, b) {
|
|
428
|
-
var aVal = a[c.sortField];
|
|
429
|
-
var bVal = b[c.sortField];
|
|
430
|
-
|
|
431
|
-
if (c.sortDirection === 'asc') {
|
|
432
|
-
return aVal > bVal ? 1 : -1;
|
|
433
|
-
} else {
|
|
434
|
-
return aVal < bVal ? 1 : -1;
|
|
435
|
-
}
|
|
436
|
-
});
|
|
437
|
-
};
|
|
438
|
-
`;
|
|
439
|
-
}
|
|
440
|
-
if (requirements.interactivity.realtime) {
|
|
441
|
-
script += `
|
|
442
|
-
// Real-time updates
|
|
443
|
-
c.refreshInterval = null;
|
|
444
|
-
|
|
445
|
-
c.startRealTimeUpdates = function() {
|
|
446
|
-
c.refreshInterval = $timeout(function() {
|
|
447
|
-
c.refreshData();
|
|
448
|
-
c.startRealTimeUpdates();
|
|
449
|
-
}, 30000); // 30 seconds
|
|
450
|
-
};
|
|
451
|
-
|
|
452
|
-
c.refreshData = function() {
|
|
453
|
-
// Refresh data logic would go here
|
|
454
|
-
c.data.lastUpdated = new Date();
|
|
455
|
-
};
|
|
456
|
-
|
|
457
|
-
$scope.$on('$destroy', function() {
|
|
458
|
-
if (c.refreshInterval) {
|
|
459
|
-
$timeout.cancel(c.refreshInterval);
|
|
460
|
-
}
|
|
461
|
-
});
|
|
462
|
-
|
|
463
|
-
// Start real-time updates
|
|
464
|
-
c.startRealTimeUpdates();
|
|
465
|
-
`;
|
|
466
|
-
}
|
|
467
|
-
return script;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
exports.FrontendSpecialist = FrontendSpecialist;
|
|
471
|
-
class BackendSpecialist extends base_specialist_js_1.BaseSpecialist {
|
|
472
|
-
constructor(options = {}) {
|
|
473
|
-
super('Backend Developer', 'Backend Developer', ['Server Scripts', 'GlideRecord', 'REST APIs', 'Data Processing', 'Performance', 'Caching'], options);
|
|
474
|
-
}
|
|
475
|
-
async execute(task, context) {
|
|
476
|
-
await this.logProgress(`Analyzing backend requirements for: ${task}`);
|
|
477
|
-
const analysis = await this.analyzeTask(task);
|
|
478
|
-
// Backend-specific analysis
|
|
479
|
-
const backendRequirements = {
|
|
480
|
-
dataSource: this.analyzeDataSource(task),
|
|
481
|
-
apiRequirements: this.analyzeApiRequirements(task),
|
|
482
|
-
performance: this.analyzePerformanceRequirements(task),
|
|
483
|
-
security: this.analyzeSecurityRequirements(task),
|
|
484
|
-
caching: this.analyzeCachingRequirements(task)
|
|
485
|
-
};
|
|
486
|
-
await this.logProgress('Creating server script for data processing');
|
|
487
|
-
const serverScript = await this.createServerScript(backendRequirements);
|
|
488
|
-
await this.logProgress('Designing data access patterns');
|
|
489
|
-
const dataAccess = await this.createDataAccessPatterns(backendRequirements);
|
|
490
|
-
await this.logProgress('Implementing performance optimizations');
|
|
491
|
-
const optimizations = await this.createOptimizations(backendRequirements);
|
|
492
|
-
return {
|
|
493
|
-
...analysis,
|
|
494
|
-
specialist: 'Backend Developer',
|
|
495
|
-
deliverables: {
|
|
496
|
-
serverScript,
|
|
497
|
-
dataAccess,
|
|
498
|
-
optimizations,
|
|
499
|
-
requirements: backendRequirements
|
|
500
|
-
}
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
analyzeDataSource(task) {
|
|
504
|
-
const lowerTask = task.toLowerCase();
|
|
505
|
-
const dataSources = {
|
|
506
|
-
primary: 'incident',
|
|
507
|
-
tables: [],
|
|
508
|
-
joins: false,
|
|
509
|
-
aggregation: false,
|
|
510
|
-
realtime: false
|
|
511
|
-
};
|
|
512
|
-
if (lowerTask.includes('incident')) {
|
|
513
|
-
dataSources.primary = 'incident';
|
|
514
|
-
dataSources.tables.push('incident');
|
|
515
|
-
}
|
|
516
|
-
else if (lowerTask.includes('request')) {
|
|
517
|
-
dataSources.primary = 'sc_request';
|
|
518
|
-
dataSources.tables.push('sc_request', 'sc_req_item');
|
|
519
|
-
}
|
|
520
|
-
else if (lowerTask.includes('change')) {
|
|
521
|
-
dataSources.primary = 'change_request';
|
|
522
|
-
dataSources.tables.push('change_request');
|
|
523
|
-
}
|
|
524
|
-
else if (lowerTask.includes('user')) {
|
|
525
|
-
dataSources.primary = 'sys_user';
|
|
526
|
-
dataSources.tables.push('sys_user');
|
|
527
|
-
}
|
|
528
|
-
if (lowerTask.includes('dashboard') || lowerTask.includes('chart')) {
|
|
529
|
-
dataSources.aggregation = true;
|
|
530
|
-
}
|
|
531
|
-
if (lowerTask.includes('realtime') || lowerTask.includes('live')) {
|
|
532
|
-
dataSources.realtime = true;
|
|
533
|
-
}
|
|
534
|
-
return dataSources;
|
|
535
|
-
}
|
|
536
|
-
analyzeApiRequirements(task) {
|
|
537
|
-
return {
|
|
538
|
-
restCalls: task.toLowerCase().includes('api') || task.toLowerCase().includes('integration'),
|
|
539
|
-
authentication: true,
|
|
540
|
-
errorHandling: true,
|
|
541
|
-
rateLimiting: false
|
|
542
|
-
};
|
|
543
|
-
}
|
|
544
|
-
analyzePerformanceRequirements(task) {
|
|
545
|
-
const lowerTask = task.toLowerCase();
|
|
546
|
-
return {
|
|
547
|
-
indexedQueries: true,
|
|
548
|
-
pagination: lowerTask.includes('list') || lowerTask.includes('table'),
|
|
549
|
-
caching: lowerTask.includes('dashboard') || lowerTask.includes('chart'),
|
|
550
|
-
batchProcessing: lowerTask.includes('bulk') || lowerTask.includes('batch')
|
|
551
|
-
};
|
|
552
|
-
}
|
|
553
|
-
analyzeSecurityRequirements(task) {
|
|
554
|
-
return {
|
|
555
|
-
acl: true,
|
|
556
|
-
inputValidation: true,
|
|
557
|
-
outputSanitization: true,
|
|
558
|
-
auditLogging: task.toLowerCase().includes('sensitive') || task.toLowerCase().includes('security')
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
analyzeCachingRequirements(task) {
|
|
562
|
-
const lowerTask = task.toLowerCase();
|
|
563
|
-
return {
|
|
564
|
-
enabled: lowerTask.includes('dashboard') || lowerTask.includes('performance'),
|
|
565
|
-
ttl: lowerTask.includes('realtime') ? 30 : 300, // seconds
|
|
566
|
-
strategy: lowerTask.includes('realtime') ? 'short' : 'medium'
|
|
567
|
-
};
|
|
568
|
-
}
|
|
569
|
-
async createServerScript(requirements) {
|
|
570
|
-
if (requirements.dataSource.aggregation) {
|
|
571
|
-
return this.createDashboardServerScript(requirements);
|
|
572
|
-
}
|
|
573
|
-
else if (requirements.performance.pagination) {
|
|
574
|
-
return this.createListServerScript(requirements);
|
|
575
|
-
}
|
|
576
|
-
return this.createGenericServerScript(requirements);
|
|
577
|
-
}
|
|
578
|
-
createDashboardServerScript(requirements) {
|
|
579
|
-
return `
|
|
580
|
-
(function() {
|
|
581
|
-
'use strict';
|
|
582
|
-
|
|
583
|
-
var data = {};
|
|
584
|
-
var cache = new GlideCache();
|
|
585
|
-
var cacheKey = 'widget_dashboard_' + gs.getUserID();
|
|
586
|
-
|
|
587
|
-
// Check cache first
|
|
588
|
-
if (${requirements.caching.enabled}) {
|
|
589
|
-
var cached = cache.get(cacheKey);
|
|
590
|
-
if (cached) {
|
|
591
|
-
data = JSON.parse(cached);
|
|
592
|
-
data.cached = true;
|
|
593
|
-
data.lastUpdated = new Date();
|
|
594
|
-
return;
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
// Security check
|
|
599
|
-
if (!gs.hasRole('${requirements.dataSource.primary}_read')) {
|
|
600
|
-
data.error = 'Insufficient privileges';
|
|
601
|
-
return;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
try {
|
|
605
|
-
// Get dashboard data
|
|
606
|
-
data.kpis = getKPIData();
|
|
607
|
-
data.chartData = getChartData();
|
|
608
|
-
data.summary = getSummaryData();
|
|
609
|
-
data.lastUpdated = new Date();
|
|
610
|
-
|
|
611
|
-
// Cache the results
|
|
612
|
-
if (${requirements.caching.enabled}) {
|
|
613
|
-
cache.put(cacheKey, JSON.stringify(data), ${requirements.caching.ttl});
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
} catch (error) {
|
|
617
|
-
gs.error('Dashboard widget error: ' + error.message);
|
|
618
|
-
data.error = 'Error loading dashboard data';
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
function getKPIData() {
|
|
622
|
-
var kpis = [];
|
|
623
|
-
|
|
624
|
-
// Total incidents
|
|
625
|
-
var gr = new GlideRecord('${requirements.dataSource.primary}');
|
|
626
|
-
gr.addQuery('active', true);
|
|
627
|
-
gr.query();
|
|
628
|
-
kpis.push({
|
|
629
|
-
label: 'Active Items',
|
|
630
|
-
value: gr.getRowCount(),
|
|
631
|
-
trend: 'up'
|
|
632
|
-
});
|
|
633
|
-
|
|
634
|
-
// High priority items
|
|
635
|
-
gr = new GlideRecord('${requirements.dataSource.primary}');
|
|
636
|
-
gr.addQuery('priority', '1');
|
|
637
|
-
gr.addQuery('active', true);
|
|
638
|
-
gr.query();
|
|
639
|
-
kpis.push({
|
|
640
|
-
label: 'High Priority',
|
|
641
|
-
value: gr.getRowCount(),
|
|
642
|
-
trend: 'stable'
|
|
643
|
-
});
|
|
644
|
-
|
|
645
|
-
return kpis;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
function getChartData() {
|
|
649
|
-
var chartData = {
|
|
650
|
-
labels: [],
|
|
651
|
-
datasets: [{
|
|
652
|
-
label: 'Items by State',
|
|
653
|
-
data: [],
|
|
654
|
-
backgroundColor: ['#FF6384', '#36A2EB', '#FFCE56', '#4BC0C0']
|
|
655
|
-
}]
|
|
656
|
-
};
|
|
657
|
-
|
|
658
|
-
var ga = new GlideAggregate('${requirements.dataSource.primary}');
|
|
659
|
-
ga.addAggregate('COUNT');
|
|
660
|
-
ga.groupBy('state');
|
|
661
|
-
ga.query();
|
|
662
|
-
|
|
663
|
-
while (ga.next()) {
|
|
664
|
-
chartData.labels.push(ga.getDisplayValue('state'));
|
|
665
|
-
chartData.datasets[0].data.push(parseInt(ga.getAggregate('COUNT')));
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
return chartData;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
function getSummaryData() {
|
|
672
|
-
return {
|
|
673
|
-
totalItems: getTotalCount(),
|
|
674
|
-
openItems: getOpenCount(),
|
|
675
|
-
resolvedToday: getResolvedTodayCount()
|
|
676
|
-
};
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
function getTotalCount() {
|
|
680
|
-
var gr = new GlideRecord('${requirements.dataSource.primary}');
|
|
681
|
-
gr.query();
|
|
682
|
-
return gr.getRowCount();
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
function getOpenCount() {
|
|
686
|
-
var gr = new GlideRecord('${requirements.dataSource.primary}');
|
|
687
|
-
gr.addQuery('active', true);
|
|
688
|
-
gr.query();
|
|
689
|
-
return gr.getRowCount();
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
function getResolvedTodayCount() {
|
|
693
|
-
var gr = new GlideRecord('${requirements.dataSource.primary}');
|
|
694
|
-
gr.addQuery('resolved_at', '>=', gs.daysAgoStart(0));
|
|
695
|
-
gr.query();
|
|
696
|
-
return gr.getRowCount();
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
})();
|
|
700
|
-
`.trim();
|
|
701
|
-
}
|
|
702
|
-
createListServerScript(requirements) {
|
|
703
|
-
return `
|
|
704
|
-
(function() {
|
|
705
|
-
'use strict';
|
|
706
|
-
|
|
707
|
-
var data = {};
|
|
708
|
-
|
|
709
|
-
// Security check
|
|
710
|
-
if (!gs.hasRole('${requirements.dataSource.primary}_read')) {
|
|
711
|
-
data.error = 'Insufficient privileges';
|
|
712
|
-
return;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
// Pagination parameters
|
|
716
|
-
var limit = parseInt(options.limit) || 25;
|
|
717
|
-
var offset = parseInt(options.offset) || 0;
|
|
718
|
-
var orderBy = options.orderBy || 'sys_created_on';
|
|
719
|
-
var orderDirection = options.orderDirection || 'DESC';
|
|
720
|
-
|
|
721
|
-
try {
|
|
722
|
-
// Get data with pagination
|
|
723
|
-
var gr = new GlideRecord('${requirements.dataSource.primary}');
|
|
724
|
-
|
|
725
|
-
// Apply filters
|
|
726
|
-
if (options.filter) {
|
|
727
|
-
gr.addEncodedQuery(options.filter);
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
// Apply ordering
|
|
731
|
-
if (orderDirection === 'DESC') {
|
|
732
|
-
gr.orderByDesc(orderBy);
|
|
733
|
-
} else {
|
|
734
|
-
gr.orderBy(orderBy);
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
// Apply pagination
|
|
738
|
-
gr.chooseWindow(offset, offset + limit);
|
|
739
|
-
gr.query();
|
|
740
|
-
|
|
741
|
-
data.items = [];
|
|
742
|
-
data.columns = getColumns();
|
|
743
|
-
|
|
744
|
-
while (gr.next()) {
|
|
745
|
-
var item = {};
|
|
746
|
-
data.columns.forEach(function(column) {
|
|
747
|
-
item[column.field] = gr.getDisplayValue(column.field);
|
|
748
|
-
});
|
|
749
|
-
item.sys_id = gr.getUniqueValue();
|
|
750
|
-
data.items.push(item);
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
// Get total count for pagination
|
|
754
|
-
data.totalCount = getTotalCount(options.filter);
|
|
755
|
-
data.hasMore = (offset + limit) < data.totalCount;
|
|
756
|
-
data.pagination = {
|
|
757
|
-
limit: limit,
|
|
758
|
-
offset: offset,
|
|
759
|
-
totalCount: data.totalCount,
|
|
760
|
-
currentPage: Math.floor(offset / limit) + 1,
|
|
761
|
-
totalPages: Math.ceil(data.totalCount / limit)
|
|
762
|
-
};
|
|
763
|
-
|
|
764
|
-
} catch (error) {
|
|
765
|
-
gs.error('List widget error: ' + error.message);
|
|
766
|
-
data.error = 'Error loading list data';
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
function getColumns() {
|
|
770
|
-
return [
|
|
771
|
-
{ field: 'number', label: 'Number' },
|
|
772
|
-
{ field: 'short_description', label: 'Description' },
|
|
773
|
-
{ field: 'state', label: 'State' },
|
|
774
|
-
{ field: 'priority', label: 'Priority' },
|
|
775
|
-
{ field: 'assigned_to', label: 'Assigned To' },
|
|
776
|
-
{ field: 'sys_created_on', label: 'Created' }
|
|
777
|
-
];
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
function getTotalCount(filter) {
|
|
781
|
-
var gr = new GlideRecord('${requirements.dataSource.primary}');
|
|
782
|
-
if (filter) {
|
|
783
|
-
gr.addEncodedQuery(filter);
|
|
784
|
-
}
|
|
785
|
-
gr.query();
|
|
786
|
-
return gr.getRowCount();
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
})();
|
|
790
|
-
`.trim();
|
|
791
|
-
}
|
|
792
|
-
createGenericServerScript(requirements) {
|
|
793
|
-
return `
|
|
794
|
-
(function() {
|
|
795
|
-
'use strict';
|
|
796
|
-
|
|
797
|
-
var data = {};
|
|
798
|
-
|
|
799
|
-
// Security check
|
|
800
|
-
if (!gs.hasRole('${requirements.dataSource.primary}_read')) {
|
|
801
|
-
data.error = 'Insufficient privileges';
|
|
802
|
-
return;
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
try {
|
|
806
|
-
// Basic data retrieval
|
|
807
|
-
var gr = new GlideRecord('${requirements.dataSource.primary}');
|
|
808
|
-
gr.orderByDesc('sys_created_on');
|
|
809
|
-
gr.setLimit(10);
|
|
810
|
-
gr.query();
|
|
811
|
-
|
|
812
|
-
data.items = [];
|
|
813
|
-
while (gr.next()) {
|
|
814
|
-
data.items.push({
|
|
815
|
-
sys_id: gr.getUniqueValue(),
|
|
816
|
-
number: gr.getDisplayValue('number'),
|
|
817
|
-
short_description: gr.getDisplayValue('short_description'),
|
|
818
|
-
state: gr.getDisplayValue('state')
|
|
819
|
-
});
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
data.title = 'Recent ${requirements.dataSource.primary}';
|
|
823
|
-
data.count = data.items.length;
|
|
824
|
-
|
|
825
|
-
} catch (error) {
|
|
826
|
-
gs.error('Widget error: ' + error.message);
|
|
827
|
-
data.error = 'Error loading data';
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
})();
|
|
831
|
-
`.trim();
|
|
832
|
-
}
|
|
833
|
-
async createDataAccessPatterns(requirements) {
|
|
834
|
-
return {
|
|
835
|
-
queryOptimization: {
|
|
836
|
-
indexedFields: ['sys_created_on', 'state', 'priority'],
|
|
837
|
-
efficientQueries: true,
|
|
838
|
-
avoidCountQueries: true
|
|
839
|
-
},
|
|
840
|
-
caching: requirements.caching,
|
|
841
|
-
batchProcessing: requirements.performance.batchProcessing
|
|
842
|
-
};
|
|
843
|
-
}
|
|
844
|
-
async createOptimizations(requirements) {
|
|
845
|
-
return {
|
|
846
|
-
database: {
|
|
847
|
-
useIndexes: true,
|
|
848
|
-
limitResults: true,
|
|
849
|
-
avoidJoins: true
|
|
850
|
-
},
|
|
851
|
-
memory: {
|
|
852
|
-
objectPooling: true,
|
|
853
|
-
garbageCollection: true
|
|
854
|
-
},
|
|
855
|
-
caching: requirements.caching
|
|
856
|
-
};
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
exports.BackendSpecialist = BackendSpecialist;
|
|
860
|
-
class UIUXSpecialist extends base_specialist_js_1.BaseSpecialist {
|
|
861
|
-
constructor(options = {}) {
|
|
862
|
-
super('UI/UX Designer', 'UI/UX Designer', ['User Experience', 'Design Systems', 'Accessibility', 'Usability', 'Visual Design'], options);
|
|
863
|
-
}
|
|
864
|
-
async execute(task, context) {
|
|
865
|
-
await this.logProgress(`Analyzing UX requirements for: ${task}`);
|
|
866
|
-
const analysis = await this.analyzeTask(task);
|
|
867
|
-
const uxRequirements = {
|
|
868
|
-
userJourney: this.analyzeUserJourney(task),
|
|
869
|
-
designPatterns: this.identifyDesignPatterns(task),
|
|
870
|
-
accessibility: this.analyzeAccessibilityNeeds(task),
|
|
871
|
-
usability: this.analyzeUsabilityRequirements(task)
|
|
872
|
-
};
|
|
873
|
-
await this.logProgress('Creating user experience design');
|
|
874
|
-
const uxDesign = await this.createUXDesign(uxRequirements);
|
|
875
|
-
await this.logProgress('Defining design specifications');
|
|
876
|
-
const designSpecs = await this.createDesignSpecifications(uxRequirements);
|
|
877
|
-
return {
|
|
878
|
-
...analysis,
|
|
879
|
-
specialist: 'UI/UX Designer',
|
|
880
|
-
deliverables: {
|
|
881
|
-
uxDesign,
|
|
882
|
-
designSpecs,
|
|
883
|
-
requirements: uxRequirements
|
|
884
|
-
}
|
|
885
|
-
};
|
|
886
|
-
}
|
|
887
|
-
analyzeUserJourney(task) {
|
|
888
|
-
const lowerTask = task.toLowerCase();
|
|
889
|
-
if (lowerTask.includes('dashboard')) {
|
|
890
|
-
return {
|
|
891
|
-
userType: 'analyst',
|
|
892
|
-
primaryGoal: 'monitor_metrics',
|
|
893
|
-
actions: ['view_overview', 'drill_down', 'filter_data'],
|
|
894
|
-
painPoints: ['information_overload', 'slow_loading']
|
|
895
|
-
};
|
|
896
|
-
}
|
|
897
|
-
if (lowerTask.includes('form')) {
|
|
898
|
-
return {
|
|
899
|
-
userType: 'end_user',
|
|
900
|
-
primaryGoal: 'submit_request',
|
|
901
|
-
actions: ['fill_form', 'validate_data', 'submit'],
|
|
902
|
-
painPoints: ['complex_fields', 'validation_errors']
|
|
903
|
-
};
|
|
904
|
-
}
|
|
905
|
-
return {
|
|
906
|
-
userType: 'general',
|
|
907
|
-
primaryGoal: 'complete_task',
|
|
908
|
-
actions: ['view_data', 'interact'],
|
|
909
|
-
painPoints: ['unclear_interface']
|
|
910
|
-
};
|
|
911
|
-
}
|
|
912
|
-
identifyDesignPatterns(task) {
|
|
913
|
-
const patterns = [];
|
|
914
|
-
const lowerTask = task.toLowerCase();
|
|
915
|
-
if (lowerTask.includes('dashboard')) {
|
|
916
|
-
patterns.push('card_layout', 'progressive_disclosure', 'data_visualization');
|
|
917
|
-
}
|
|
918
|
-
if (lowerTask.includes('form')) {
|
|
919
|
-
patterns.push('stepped_form', 'inline_validation', 'smart_defaults');
|
|
920
|
-
}
|
|
921
|
-
if (lowerTask.includes('list') || lowerTask.includes('table')) {
|
|
922
|
-
patterns.push('infinite_scroll', 'filtering', 'sorting');
|
|
923
|
-
}
|
|
924
|
-
return patterns;
|
|
925
|
-
}
|
|
926
|
-
analyzeAccessibilityNeeds(task) {
|
|
927
|
-
return {
|
|
928
|
-
wcagLevel: 'AA',
|
|
929
|
-
requirements: [
|
|
930
|
-
'keyboard_navigation',
|
|
931
|
-
'screen_reader_support',
|
|
932
|
-
'high_contrast',
|
|
933
|
-
'focus_indicators',
|
|
934
|
-
'aria_labels'
|
|
935
|
-
]
|
|
936
|
-
};
|
|
937
|
-
}
|
|
938
|
-
analyzeUsabilityRequirements(task) {
|
|
939
|
-
return {
|
|
940
|
-
principles: ['clarity', 'efficiency', 'consistency'],
|
|
941
|
-
metrics: ['task_completion_rate', 'time_to_complete', 'error_rate'],
|
|
942
|
-
testing: ['usability_testing', 'a11y_testing']
|
|
943
|
-
};
|
|
944
|
-
}
|
|
945
|
-
async createUXDesign(requirements) {
|
|
946
|
-
return {
|
|
947
|
-
wireframes: this.createWireframes(requirements),
|
|
948
|
-
userFlow: this.createUserFlow(requirements),
|
|
949
|
-
interactionDesign: this.createInteractionDesign(requirements)
|
|
950
|
-
};
|
|
951
|
-
}
|
|
952
|
-
createWireframes(requirements) {
|
|
953
|
-
return {
|
|
954
|
-
layout: requirements.designPatterns.includes('card_layout') ? 'card_grid' : 'linear',
|
|
955
|
-
components: requirements.designPatterns,
|
|
956
|
-
hierarchy: 'visual_hierarchy_defined'
|
|
957
|
-
};
|
|
958
|
-
}
|
|
959
|
-
createUserFlow(requirements) {
|
|
960
|
-
return {
|
|
961
|
-
entry_point: 'widget_load',
|
|
962
|
-
steps: requirements.userJourney.actions,
|
|
963
|
-
exit_point: 'task_completion',
|
|
964
|
-
error_handling: 'graceful_degradation'
|
|
965
|
-
};
|
|
966
|
-
}
|
|
967
|
-
createInteractionDesign(requirements) {
|
|
968
|
-
return {
|
|
969
|
-
hover_states: true,
|
|
970
|
-
focus_states: true,
|
|
971
|
-
loading_states: true,
|
|
972
|
-
error_states: true,
|
|
973
|
-
animations: 'subtle_transitions'
|
|
974
|
-
};
|
|
975
|
-
}
|
|
976
|
-
async createDesignSpecifications(requirements) {
|
|
977
|
-
return {
|
|
978
|
-
colorPalette: {
|
|
979
|
-
primary: '#0073e6',
|
|
980
|
-
secondary: '#6c757d',
|
|
981
|
-
success: '#28a745',
|
|
982
|
-
warning: '#ffc107',
|
|
983
|
-
danger: '#dc3545'
|
|
984
|
-
},
|
|
985
|
-
typography: {
|
|
986
|
-
headings: 'Source Sans Pro',
|
|
987
|
-
body: 'Source Sans Pro',
|
|
988
|
-
sizes: {
|
|
989
|
-
h1: '2rem',
|
|
990
|
-
h2: '1.5rem',
|
|
991
|
-
body: '1rem',
|
|
992
|
-
small: '0.875rem'
|
|
993
|
-
}
|
|
994
|
-
},
|
|
995
|
-
spacing: {
|
|
996
|
-
unit: '0.5rem',
|
|
997
|
-
sections: '2rem',
|
|
998
|
-
components: '1rem'
|
|
999
|
-
},
|
|
1000
|
-
accessibility: requirements.accessibility
|
|
1001
|
-
};
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
exports.UIUXSpecialist = UIUXSpecialist;
|
|
1005
|
-
class ServiceNowSpecialist extends base_specialist_js_1.BaseSpecialist {
|
|
1006
|
-
constructor(options = {}) {
|
|
1007
|
-
super('ServiceNow Platform Expert', 'ServiceNow Specialist', ['Platform Integration', 'Best Practices', 'Performance', 'Security', 'Update Sets'], options);
|
|
1008
|
-
}
|
|
1009
|
-
async execute(task, context) {
|
|
1010
|
-
await this.logProgress(`Analyzing ServiceNow platform requirements for: ${task}`);
|
|
1011
|
-
const analysis = await this.analyzeTask(task);
|
|
1012
|
-
const platformRequirements = {
|
|
1013
|
-
scope: this.analyzeScopeRequirements(task),
|
|
1014
|
-
performance: this.analyzePlatformPerformance(task),
|
|
1015
|
-
security: this.analyzePlatformSecurity(task),
|
|
1016
|
-
updateSets: this.analyzeUpdateSetStrategy(task),
|
|
1017
|
-
bestPractices: this.identifyBestPractices(task)
|
|
1018
|
-
};
|
|
1019
|
-
await this.logProgress('Creating platform integration strategy');
|
|
1020
|
-
const integrationStrategy = await this.createIntegrationStrategy(platformRequirements);
|
|
1021
|
-
await this.logProgress('Defining deployment strategy');
|
|
1022
|
-
const deploymentStrategy = await this.createDeploymentStrategy(platformRequirements);
|
|
1023
|
-
return {
|
|
1024
|
-
...analysis,
|
|
1025
|
-
specialist: 'ServiceNow Specialist',
|
|
1026
|
-
deliverables: {
|
|
1027
|
-
integrationStrategy,
|
|
1028
|
-
deploymentStrategy,
|
|
1029
|
-
requirements: platformRequirements
|
|
1030
|
-
}
|
|
1031
|
-
};
|
|
1032
|
-
}
|
|
1033
|
-
analyzeScopeRequirements(task) {
|
|
1034
|
-
const lowerTask = task.toLowerCase();
|
|
1035
|
-
if (lowerTask.includes('global') || lowerTask.includes('enterprise')) {
|
|
1036
|
-
return { type: 'global', requiresAdmin: true };
|
|
1037
|
-
}
|
|
1038
|
-
if (lowerTask.includes('application') || lowerTask.includes('scoped')) {
|
|
1039
|
-
return { type: 'application', requiresAdmin: false };
|
|
1040
|
-
}
|
|
1041
|
-
return { type: 'auto', requiresAdmin: false };
|
|
1042
|
-
}
|
|
1043
|
-
analyzePlatformPerformance(task) {
|
|
1044
|
-
return {
|
|
1045
|
-
caching: true,
|
|
1046
|
-
batchProcessing: task.toLowerCase().includes('bulk'),
|
|
1047
|
-
indexOptimization: true,
|
|
1048
|
-
memoryManagement: true
|
|
1049
|
-
};
|
|
1050
|
-
}
|
|
1051
|
-
analyzePlatformSecurity(task) {
|
|
1052
|
-
return {
|
|
1053
|
-
acls: true,
|
|
1054
|
-
roleBasedAccess: true,
|
|
1055
|
-
dataValidation: true,
|
|
1056
|
-
auditCompliance: task.toLowerCase().includes('audit') || task.toLowerCase().includes('compliance')
|
|
1057
|
-
};
|
|
1058
|
-
}
|
|
1059
|
-
analyzeUpdateSetStrategy(task) {
|
|
1060
|
-
return {
|
|
1061
|
-
required: true,
|
|
1062
|
-
naming: 'auto_generated',
|
|
1063
|
-
tracking: 'comprehensive',
|
|
1064
|
-
validation: 'pre_commit'
|
|
1065
|
-
};
|
|
1066
|
-
}
|
|
1067
|
-
identifyBestPractices(task) {
|
|
1068
|
-
const practices = [
|
|
1069
|
-
'use_update_sets',
|
|
1070
|
-
'follow_naming_conventions',
|
|
1071
|
-
'implement_error_handling',
|
|
1072
|
-
'optimize_queries',
|
|
1073
|
-
'ensure_security'
|
|
1074
|
-
];
|
|
1075
|
-
if (task.toLowerCase().includes('widget')) {
|
|
1076
|
-
practices.push('responsive_design', 'accessibility', 'performance_optimization');
|
|
1077
|
-
}
|
|
1078
|
-
if (task.toLowerCase().includes('flow')) {
|
|
1079
|
-
practices.push('reusable_subflows', 'error_handling', 'testing_coverage');
|
|
1080
|
-
}
|
|
1081
|
-
return practices;
|
|
1082
|
-
}
|
|
1083
|
-
async createIntegrationStrategy(requirements) {
|
|
1084
|
-
return {
|
|
1085
|
-
scope: requirements.scope,
|
|
1086
|
-
security: requirements.security,
|
|
1087
|
-
performance: requirements.performance,
|
|
1088
|
-
monitoring: {
|
|
1089
|
-
enabled: true,
|
|
1090
|
-
metrics: ['response_time', 'error_rate', 'usage_stats']
|
|
1091
|
-
}
|
|
1092
|
-
};
|
|
1093
|
-
}
|
|
1094
|
-
async createDeploymentStrategy(requirements) {
|
|
1095
|
-
return {
|
|
1096
|
-
updateSet: requirements.updateSets,
|
|
1097
|
-
testing: {
|
|
1098
|
-
required: true,
|
|
1099
|
-
types: ['unit', 'integration', 'user_acceptance']
|
|
1100
|
-
},
|
|
1101
|
-
rollback: {
|
|
1102
|
-
strategy: 'update_set_rollback',
|
|
1103
|
-
automated: true
|
|
1104
|
-
},
|
|
1105
|
-
validation: {
|
|
1106
|
-
preDeployment: true,
|
|
1107
|
-
postDeployment: true
|
|
1108
|
-
}
|
|
1109
|
-
};
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
exports.ServiceNowSpecialist = ServiceNowSpecialist;
|
|
1113
|
-
class QASpecialist extends base_specialist_js_1.BaseSpecialist {
|
|
1114
|
-
constructor(options = {}) {
|
|
1115
|
-
super('QA Tester', 'QA Specialist', ['Testing', 'Quality Assurance', 'Test Automation', 'Bug Detection', 'Validation'], options);
|
|
1116
|
-
}
|
|
1117
|
-
async execute(task, context) {
|
|
1118
|
-
await this.logProgress(`Analyzing testing requirements for: ${task}`);
|
|
1119
|
-
const analysis = await this.analyzeTask(task);
|
|
1120
|
-
const testingRequirements = {
|
|
1121
|
-
testTypes: this.identifyTestTypes(task),
|
|
1122
|
-
scenarios: this.createTestScenarios(task),
|
|
1123
|
-
automation: this.analyzeAutomationNeeds(task),
|
|
1124
|
-
validation: this.createValidationRules(task)
|
|
1125
|
-
};
|
|
1126
|
-
await this.logProgress('Creating comprehensive test plan');
|
|
1127
|
-
const testPlan = await this.createTestPlan(testingRequirements);
|
|
1128
|
-
await this.logProgress('Generating test scenarios and validation');
|
|
1129
|
-
const testCases = await this.createTestCases(testingRequirements);
|
|
1130
|
-
return {
|
|
1131
|
-
...analysis,
|
|
1132
|
-
specialist: 'QA Specialist',
|
|
1133
|
-
deliverables: {
|
|
1134
|
-
testPlan,
|
|
1135
|
-
testCases,
|
|
1136
|
-
requirements: testingRequirements
|
|
1137
|
-
}
|
|
1138
|
-
};
|
|
1139
|
-
}
|
|
1140
|
-
identifyTestTypes(task) {
|
|
1141
|
-
const types = ['functional', 'ui', 'integration'];
|
|
1142
|
-
const lowerTask = task.toLowerCase();
|
|
1143
|
-
if (lowerTask.includes('performance') || lowerTask.includes('load')) {
|
|
1144
|
-
types.push('performance');
|
|
1145
|
-
}
|
|
1146
|
-
if (lowerTask.includes('security') || lowerTask.includes('access')) {
|
|
1147
|
-
types.push('security');
|
|
1148
|
-
}
|
|
1149
|
-
if (lowerTask.includes('accessibility') || lowerTask.includes('a11y')) {
|
|
1150
|
-
types.push('accessibility');
|
|
1151
|
-
}
|
|
1152
|
-
return types;
|
|
1153
|
-
}
|
|
1154
|
-
createTestScenarios(task) {
|
|
1155
|
-
const scenarios = [
|
|
1156
|
-
{
|
|
1157
|
-
name: 'Happy Path',
|
|
1158
|
-
description: 'Test normal user workflow',
|
|
1159
|
-
priority: 'high'
|
|
1160
|
-
},
|
|
1161
|
-
{
|
|
1162
|
-
name: 'Error Handling',
|
|
1163
|
-
description: 'Test error conditions and recovery',
|
|
1164
|
-
priority: 'high'
|
|
1165
|
-
},
|
|
1166
|
-
{
|
|
1167
|
-
name: 'Edge Cases',
|
|
1168
|
-
description: 'Test boundary conditions',
|
|
1169
|
-
priority: 'medium'
|
|
1170
|
-
}
|
|
1171
|
-
];
|
|
1172
|
-
const lowerTask = task.toLowerCase();
|
|
1173
|
-
if (lowerTask.includes('form')) {
|
|
1174
|
-
scenarios.push({
|
|
1175
|
-
name: 'Form Validation',
|
|
1176
|
-
description: 'Test field validation and error messages',
|
|
1177
|
-
priority: 'high'
|
|
1178
|
-
});
|
|
1179
|
-
}
|
|
1180
|
-
if (lowerTask.includes('dashboard')) {
|
|
1181
|
-
scenarios.push({
|
|
1182
|
-
name: 'Data Loading',
|
|
1183
|
-
description: 'Test data retrieval and display',
|
|
1184
|
-
priority: 'high'
|
|
1185
|
-
});
|
|
1186
|
-
}
|
|
1187
|
-
return scenarios;
|
|
1188
|
-
}
|
|
1189
|
-
analyzeAutomationNeeds(task) {
|
|
1190
|
-
return {
|
|
1191
|
-
enabled: true,
|
|
1192
|
-
framework: 'selenium',
|
|
1193
|
-
coverage: 'critical_paths',
|
|
1194
|
-
reporting: 'detailed'
|
|
1195
|
-
};
|
|
1196
|
-
}
|
|
1197
|
-
createValidationRules(task) {
|
|
1198
|
-
return [
|
|
1199
|
-
{
|
|
1200
|
-
rule: 'All required fields must be validated',
|
|
1201
|
-
type: 'functional'
|
|
1202
|
-
},
|
|
1203
|
-
{
|
|
1204
|
-
rule: 'Error messages must be user-friendly',
|
|
1205
|
-
type: 'ui'
|
|
1206
|
-
},
|
|
1207
|
-
{
|
|
1208
|
-
rule: 'Performance must meet SLA requirements',
|
|
1209
|
-
type: 'performance'
|
|
1210
|
-
},
|
|
1211
|
-
{
|
|
1212
|
-
rule: 'Security controls must be enforced',
|
|
1213
|
-
type: 'security'
|
|
1214
|
-
}
|
|
1215
|
-
];
|
|
1216
|
-
}
|
|
1217
|
-
async createTestPlan(requirements) {
|
|
1218
|
-
return {
|
|
1219
|
-
scope: 'Widget functionality and integration',
|
|
1220
|
-
objectives: [
|
|
1221
|
-
'Verify functional requirements',
|
|
1222
|
-
'Ensure quality standards',
|
|
1223
|
-
'Validate user experience',
|
|
1224
|
-
'Confirm security compliance'
|
|
1225
|
-
],
|
|
1226
|
-
testTypes: requirements.testTypes,
|
|
1227
|
-
schedule: {
|
|
1228
|
-
phases: ['unit', 'integration', 'system', 'acceptance'],
|
|
1229
|
-
duration: '2-3 days'
|
|
1230
|
-
},
|
|
1231
|
-
resources: ['QA Engineer', 'Test Environment', 'Test Data'],
|
|
1232
|
-
deliverables: ['Test Cases', 'Test Reports', 'Bug Reports', 'Sign-off']
|
|
1233
|
-
};
|
|
1234
|
-
}
|
|
1235
|
-
async createTestCases(requirements) {
|
|
1236
|
-
return requirements.scenarios.map((scenario, index) => ({
|
|
1237
|
-
id: `TC_${index + 1}`,
|
|
1238
|
-
name: scenario.name,
|
|
1239
|
-
description: scenario.description,
|
|
1240
|
-
priority: scenario.priority,
|
|
1241
|
-
steps: this.generateTestSteps(scenario),
|
|
1242
|
-
expectedResult: 'Functionality works as expected',
|
|
1243
|
-
actualResult: '',
|
|
1244
|
-
status: 'pending'
|
|
1245
|
-
}));
|
|
1246
|
-
}
|
|
1247
|
-
generateTestSteps(scenario) {
|
|
1248
|
-
const baseSteps = [
|
|
1249
|
-
'Navigate to the widget',
|
|
1250
|
-
'Verify widget loads correctly',
|
|
1251
|
-
'Interact with widget features'
|
|
1252
|
-
];
|
|
1253
|
-
if (scenario.name === 'Error Handling') {
|
|
1254
|
-
baseSteps.push('Trigger error condition', 'Verify error message displays', 'Verify system recovers gracefully');
|
|
1255
|
-
}
|
|
1256
|
-
if (scenario.name === 'Form Validation') {
|
|
1257
|
-
baseSteps.push('Submit form with invalid data', 'Verify validation messages', 'Correct data and resubmit');
|
|
1258
|
-
}
|
|
1259
|
-
baseSteps.push('Verify expected outcome');
|
|
1260
|
-
return baseSteps;
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
exports.QASpecialist = QASpecialist;
|
|
1264
|
-
//# sourceMappingURL=widget-specialists.js.map
|