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,140 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Team Assembler - Dynamic assembly of specialist agents based on requirements
|
|
3
|
-
*/
|
|
4
|
-
import { BaseSnowAgent } from '../agents/base/base-snow-agent.js';
|
|
5
|
-
import { SkillSet } from '../intelligence/task-analyzer.js';
|
|
6
|
-
export interface SpecialistPool {
|
|
7
|
-
available: Map<string, typeof BaseSnowAgent>;
|
|
8
|
-
active: Map<string, BaseSnowAgent>;
|
|
9
|
-
capacity: Map<string, CapacityInfo>;
|
|
10
|
-
performance: Map<string, PerformanceMetrics>;
|
|
11
|
-
}
|
|
12
|
-
export interface CapacityInfo {
|
|
13
|
-
maxConcurrent: number;
|
|
14
|
-
currentLoad: number;
|
|
15
|
-
reservedSlots: number;
|
|
16
|
-
nextAvailable?: Date;
|
|
17
|
-
}
|
|
18
|
-
export interface PerformanceMetrics {
|
|
19
|
-
averageExecutionTime: number;
|
|
20
|
-
successRate: number;
|
|
21
|
-
totalTasksCompleted: number;
|
|
22
|
-
lastActivity: Date;
|
|
23
|
-
complexityRating: number;
|
|
24
|
-
}
|
|
25
|
-
export interface TeamConfiguration {
|
|
26
|
-
maxTeamSize: number;
|
|
27
|
-
preferredStructure: 'flat' | 'hierarchical' | 'matrix';
|
|
28
|
-
loadBalancing: boolean;
|
|
29
|
-
skillOverlap: boolean;
|
|
30
|
-
performanceThreshold: number;
|
|
31
|
-
}
|
|
32
|
-
export interface AssemblyResult {
|
|
33
|
-
success: boolean;
|
|
34
|
-
team: Map<string, BaseSnowAgent>;
|
|
35
|
-
configuration: TeamConfiguration;
|
|
36
|
-
assemblyTime: number;
|
|
37
|
-
warnings: string[];
|
|
38
|
-
recommendations: string[];
|
|
39
|
-
fallbacks: FallbackOption[];
|
|
40
|
-
}
|
|
41
|
-
export interface FallbackOption {
|
|
42
|
-
description: string;
|
|
43
|
-
impact: 'low' | 'medium' | 'high';
|
|
44
|
-
alternative: string;
|
|
45
|
-
reason: string;
|
|
46
|
-
}
|
|
47
|
-
export interface SkillMapping {
|
|
48
|
-
skillType: string;
|
|
49
|
-
specialistTypes: string[];
|
|
50
|
-
fallbackTypes: string[];
|
|
51
|
-
complexityMapping: Record<string, string[]>;
|
|
52
|
-
}
|
|
53
|
-
export declare class TeamAssembler {
|
|
54
|
-
private logger;
|
|
55
|
-
private specialistPool;
|
|
56
|
-
private skillMappings;
|
|
57
|
-
private defaultConfig;
|
|
58
|
-
constructor();
|
|
59
|
-
/**
|
|
60
|
-
* Assemble team based on required skills
|
|
61
|
-
*/
|
|
62
|
-
assembleTeam(requiredSkills: SkillSet[], config?: Partial<TeamConfiguration>): Promise<Map<string, BaseSnowAgent>>;
|
|
63
|
-
/**
|
|
64
|
-
* Select optimal specialist for a skill requirement
|
|
65
|
-
*/
|
|
66
|
-
private selectSpecialist;
|
|
67
|
-
/**
|
|
68
|
-
* Find fallback specialist when primary selection fails
|
|
69
|
-
*/
|
|
70
|
-
private findFallbackSpecialist;
|
|
71
|
-
/**
|
|
72
|
-
* Get candidate specialist types based on skill complexity
|
|
73
|
-
*/
|
|
74
|
-
private getCandidateTypes;
|
|
75
|
-
/**
|
|
76
|
-
* Evaluate candidate specialists
|
|
77
|
-
*/
|
|
78
|
-
private evaluateCandidates;
|
|
79
|
-
/**
|
|
80
|
-
* Evaluate individual candidate
|
|
81
|
-
*/
|
|
82
|
-
private evaluateCandidate;
|
|
83
|
-
/**
|
|
84
|
-
* Select best candidate from evaluations
|
|
85
|
-
*/
|
|
86
|
-
private selectBestCandidate;
|
|
87
|
-
/**
|
|
88
|
-
* Instantiate specialist instance
|
|
89
|
-
*/
|
|
90
|
-
private instantiateSpecialist;
|
|
91
|
-
/**
|
|
92
|
-
* Check if specialist type is available
|
|
93
|
-
*/
|
|
94
|
-
private isSpecialistAvailable;
|
|
95
|
-
/**
|
|
96
|
-
* Apply load balancing to team
|
|
97
|
-
*/
|
|
98
|
-
private applyLoadBalancing;
|
|
99
|
-
/**
|
|
100
|
-
* Update capacity tracking
|
|
101
|
-
*/
|
|
102
|
-
private updateCapacity;
|
|
103
|
-
/**
|
|
104
|
-
* Calculate skill match score
|
|
105
|
-
*/
|
|
106
|
-
private calculateSkillMatch;
|
|
107
|
-
/**
|
|
108
|
-
* Calculate team synergy score
|
|
109
|
-
*/
|
|
110
|
-
private calculateTeamSynergy;
|
|
111
|
-
/**
|
|
112
|
-
* Calculate diversity bonus
|
|
113
|
-
*/
|
|
114
|
-
private calculateDiversityBonus;
|
|
115
|
-
/**
|
|
116
|
-
* Assess candidate risk level
|
|
117
|
-
*/
|
|
118
|
-
private assessCandidateRisk;
|
|
119
|
-
/**
|
|
120
|
-
* Initialize specialist pool
|
|
121
|
-
*/
|
|
122
|
-
private initializeSpecialistPool;
|
|
123
|
-
/**
|
|
124
|
-
* Initialize skill mappings
|
|
125
|
-
*/
|
|
126
|
-
private initializeSkillMappings;
|
|
127
|
-
/**
|
|
128
|
-
* Get team assembly statistics
|
|
129
|
-
*/
|
|
130
|
-
getAssemblyStatistics(): any;
|
|
131
|
-
/**
|
|
132
|
-
* Calculate overall capacity utilization
|
|
133
|
-
*/
|
|
134
|
-
private calculateCapacityUtilization;
|
|
135
|
-
/**
|
|
136
|
-
* Get aggregated performance metrics
|
|
137
|
-
*/
|
|
138
|
-
private getAggregatedPerformance;
|
|
139
|
-
}
|
|
140
|
-
//# sourceMappingURL=team-assembler.d.ts.map
|
|
@@ -1,502 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Team Assembler - Dynamic assembly of specialist agents based on requirements
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TeamAssembler = void 0;
|
|
7
|
-
const data_specialist_agent_js_1 = require("../agents/specialists/data-specialist.agent.js");
|
|
8
|
-
const integration_specialist_agent_js_1 = require("../agents/specialists/integration-specialist.agent.js");
|
|
9
|
-
const automation_specialist_agent_js_1 = require("../agents/specialists/automation-specialist.agent.js");
|
|
10
|
-
const reporting_specialist_agent_js_1 = require("../agents/specialists/reporting-specialist.agent.js");
|
|
11
|
-
const security_specialist_agent_js_1 = require("../agents/specialists/security-specialist.agent.js");
|
|
12
|
-
const logger_js_1 = require("../utils/logger.js");
|
|
13
|
-
class TeamAssembler {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.skillMappings = new Map();
|
|
16
|
-
this.logger = new logger_js_1.Logger('TeamAssembler');
|
|
17
|
-
this.specialistPool = this.initializeSpecialistPool();
|
|
18
|
-
this.initializeSkillMappings();
|
|
19
|
-
this.defaultConfig = {
|
|
20
|
-
maxTeamSize: 8,
|
|
21
|
-
preferredStructure: 'flat',
|
|
22
|
-
loadBalancing: true,
|
|
23
|
-
skillOverlap: false,
|
|
24
|
-
performanceThreshold: 0.8
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Assemble team based on required skills
|
|
29
|
-
*/
|
|
30
|
-
async assembleTeam(requiredSkills, config) {
|
|
31
|
-
const startTime = Date.now();
|
|
32
|
-
const teamConfig = { ...this.defaultConfig, ...config };
|
|
33
|
-
const team = new Map();
|
|
34
|
-
const warnings = [];
|
|
35
|
-
const fallbacks = [];
|
|
36
|
-
this.logger.info('Assembling team', {
|
|
37
|
-
requiredSkills: requiredSkills.map(s => s.type),
|
|
38
|
-
maxTeamSize: teamConfig.maxTeamSize
|
|
39
|
-
});
|
|
40
|
-
try {
|
|
41
|
-
// Group skills by importance
|
|
42
|
-
const primarySkills = requiredSkills.filter(s => s.importance === 'primary');
|
|
43
|
-
const secondarySkills = requiredSkills.filter(s => s.importance === 'secondary');
|
|
44
|
-
const optionalSkills = requiredSkills.filter(s => s.importance === 'optional');
|
|
45
|
-
// Assemble primary specialists first
|
|
46
|
-
for (const skill of primarySkills) {
|
|
47
|
-
const specialist = await this.selectSpecialist(skill, team, teamConfig);
|
|
48
|
-
if (specialist) {
|
|
49
|
-
team.set(skill.type, specialist);
|
|
50
|
-
this.updateCapacity(skill.type, 'allocate');
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
warnings.push(`Could not allocate primary specialist for ${skill.type}`);
|
|
54
|
-
const fallback = this.findFallbackSpecialist(skill, team, teamConfig);
|
|
55
|
-
if (fallback.specialist) {
|
|
56
|
-
team.set(skill.type, fallback.specialist);
|
|
57
|
-
fallbacks.push({
|
|
58
|
-
description: `Using ${fallback.type} as fallback for ${skill.type}`,
|
|
59
|
-
impact: 'medium',
|
|
60
|
-
alternative: fallback.type,
|
|
61
|
-
reason: fallback.reason
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
// Add secondary specialists if capacity allows
|
|
67
|
-
if (team.size < teamConfig.maxTeamSize) {
|
|
68
|
-
for (const skill of secondarySkills) {
|
|
69
|
-
if (team.size >= teamConfig.maxTeamSize)
|
|
70
|
-
break;
|
|
71
|
-
const specialist = await this.selectSpecialist(skill, team, teamConfig);
|
|
72
|
-
if (specialist) {
|
|
73
|
-
team.set(skill.type, specialist);
|
|
74
|
-
this.updateCapacity(skill.type, 'allocate');
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
// Add optional specialists if there's still capacity and no skill overlap concerns
|
|
79
|
-
if (team.size < teamConfig.maxTeamSize && !teamConfig.skillOverlap) {
|
|
80
|
-
for (const skill of optionalSkills) {
|
|
81
|
-
if (team.size >= teamConfig.maxTeamSize)
|
|
82
|
-
break;
|
|
83
|
-
const specialist = await this.selectSpecialist(skill, team, teamConfig);
|
|
84
|
-
if (specialist) {
|
|
85
|
-
team.set(skill.type, specialist);
|
|
86
|
-
this.updateCapacity(skill.type, 'allocate');
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
// Apply load balancing if enabled
|
|
91
|
-
if (teamConfig.loadBalancing) {
|
|
92
|
-
await this.applyLoadBalancing(team, teamConfig);
|
|
93
|
-
}
|
|
94
|
-
const assemblyTime = Date.now() - startTime;
|
|
95
|
-
this.logger.info('Team assembly completed', {
|
|
96
|
-
teamSize: team.size,
|
|
97
|
-
assemblyTime,
|
|
98
|
-
warningCount: warnings.length,
|
|
99
|
-
fallbackCount: fallbacks.length
|
|
100
|
-
});
|
|
101
|
-
return team;
|
|
102
|
-
}
|
|
103
|
-
catch (error) {
|
|
104
|
-
this.logger.error('Team assembly failed', error);
|
|
105
|
-
throw error;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Select optimal specialist for a skill requirement
|
|
110
|
-
*/
|
|
111
|
-
async selectSpecialist(skill, currentTeam, config) {
|
|
112
|
-
const skillMapping = this.skillMappings.get(skill.type);
|
|
113
|
-
if (!skillMapping) {
|
|
114
|
-
this.logger.warn('No skill mapping found', { skillType: skill.type });
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
// Get candidate specialist types based on complexity
|
|
118
|
-
const candidateTypes = this.getCandidateTypes(skill, skillMapping);
|
|
119
|
-
// Evaluate candidates
|
|
120
|
-
const candidates = await this.evaluateCandidates(candidateTypes, skill, currentTeam, config);
|
|
121
|
-
if (candidates.length === 0) {
|
|
122
|
-
return null;
|
|
123
|
-
}
|
|
124
|
-
// Select best candidate based on multiple criteria
|
|
125
|
-
const bestCandidate = this.selectBestCandidate(candidates, skill, config);
|
|
126
|
-
if (bestCandidate) {
|
|
127
|
-
return this.instantiateSpecialist(bestCandidate.type);
|
|
128
|
-
}
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Find fallback specialist when primary selection fails
|
|
133
|
-
*/
|
|
134
|
-
findFallbackSpecialist(skill, currentTeam, config) {
|
|
135
|
-
const skillMapping = this.skillMappings.get(skill.type);
|
|
136
|
-
if (!skillMapping) {
|
|
137
|
-
return { specialist: null, type: '', reason: 'No skill mapping available' };
|
|
138
|
-
}
|
|
139
|
-
// Try fallback types
|
|
140
|
-
for (const fallbackType of skillMapping.fallbackTypes) {
|
|
141
|
-
if (this.isSpecialistAvailable(fallbackType)) {
|
|
142
|
-
const specialist = this.instantiateSpecialist(fallbackType);
|
|
143
|
-
if (specialist) {
|
|
144
|
-
return {
|
|
145
|
-
specialist,
|
|
146
|
-
type: fallbackType,
|
|
147
|
-
reason: `Primary specialist ${skill.type} not available`
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
// Try existing team members with overlapping skills
|
|
153
|
-
for (const [teamMemberType, teamMember] of currentTeam) {
|
|
154
|
-
if (teamMember.canHandle(skill.type, skill.complexity) > 0.3) {
|
|
155
|
-
return {
|
|
156
|
-
specialist: teamMember,
|
|
157
|
-
type: teamMemberType,
|
|
158
|
-
reason: `Existing team member can handle ${skill.type} with lower efficiency`
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return { specialist: null, type: '', reason: 'No fallback options available' };
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Get candidate specialist types based on skill complexity
|
|
166
|
-
*/
|
|
167
|
-
getCandidateTypes(skill, mapping) {
|
|
168
|
-
const complexityMapping = mapping.complexityMapping[skill.complexity] || [];
|
|
169
|
-
if (complexityMapping.length > 0) {
|
|
170
|
-
return complexityMapping;
|
|
171
|
-
}
|
|
172
|
-
// Default to primary specialist types
|
|
173
|
-
return mapping.specialistTypes;
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Evaluate candidate specialists
|
|
177
|
-
*/
|
|
178
|
-
async evaluateCandidates(candidateTypes, skill, currentTeam, config) {
|
|
179
|
-
const candidates = [];
|
|
180
|
-
for (const candidateType of candidateTypes) {
|
|
181
|
-
if (!this.isSpecialistAvailable(candidateType)) {
|
|
182
|
-
continue;
|
|
183
|
-
}
|
|
184
|
-
const evaluation = await this.evaluateCandidate(candidateType, skill, currentTeam, config);
|
|
185
|
-
if (evaluation.score >= config.performanceThreshold) {
|
|
186
|
-
candidates.push(evaluation);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
return candidates.sort((a, b) => b.score - a.score);
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Evaluate individual candidate
|
|
193
|
-
*/
|
|
194
|
-
async evaluateCandidate(candidateType, skill, currentTeam, config) {
|
|
195
|
-
const performance = this.specialistPool.performance.get(candidateType);
|
|
196
|
-
const capacity = this.specialistPool.capacity.get(candidateType);
|
|
197
|
-
let score = 0;
|
|
198
|
-
const factors = {};
|
|
199
|
-
// Skill match score (40%)
|
|
200
|
-
const skillMatchScore = this.calculateSkillMatch(candidateType, skill);
|
|
201
|
-
factors.skillMatch = skillMatchScore;
|
|
202
|
-
score += skillMatchScore * 0.4;
|
|
203
|
-
// Performance score (25%)
|
|
204
|
-
if (performance) {
|
|
205
|
-
const performanceScore = (performance.successRate +
|
|
206
|
-
(performance.complexityRating / 5) +
|
|
207
|
-
Math.min(performance.totalTasksCompleted / 100, 1)) / 3;
|
|
208
|
-
factors.performance = performanceScore;
|
|
209
|
-
score += performanceScore * 0.25;
|
|
210
|
-
}
|
|
211
|
-
// Availability score (20%)
|
|
212
|
-
if (capacity) {
|
|
213
|
-
const availabilityScore = Math.max(0, (capacity.maxConcurrent - capacity.currentLoad) / capacity.maxConcurrent);
|
|
214
|
-
factors.availability = availabilityScore;
|
|
215
|
-
score += availabilityScore * 0.2;
|
|
216
|
-
}
|
|
217
|
-
// Team synergy score (10%)
|
|
218
|
-
const synergyScore = this.calculateTeamSynergy(candidateType, currentTeam);
|
|
219
|
-
factors.synergy = synergyScore;
|
|
220
|
-
score += synergyScore * 0.1;
|
|
221
|
-
// Diversity bonus (5%)
|
|
222
|
-
const diversityScore = this.calculateDiversityBonus(candidateType, currentTeam);
|
|
223
|
-
factors.diversity = diversityScore;
|
|
224
|
-
score += diversityScore * 0.05;
|
|
225
|
-
return {
|
|
226
|
-
type: candidateType,
|
|
227
|
-
score,
|
|
228
|
-
factors,
|
|
229
|
-
estimatedTime: skill.estimatedTime,
|
|
230
|
-
riskLevel: this.assessCandidateRisk(candidateType, skill)
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Select best candidate from evaluations
|
|
235
|
-
*/
|
|
236
|
-
selectBestCandidate(candidates, skill, config) {
|
|
237
|
-
if (candidates.length === 0) {
|
|
238
|
-
return null;
|
|
239
|
-
}
|
|
240
|
-
// For critical skills, prefer higher performance even if slightly less available
|
|
241
|
-
if (skill.importance === 'primary' && skill.complexity === 'high') {
|
|
242
|
-
return candidates.find(c => c.factors.performance > 0.8) || candidates[0];
|
|
243
|
-
}
|
|
244
|
-
// For secondary skills, prefer availability
|
|
245
|
-
if (skill.importance === 'secondary') {
|
|
246
|
-
return candidates.find(c => c.factors.availability > 0.7) || candidates[0];
|
|
247
|
-
}
|
|
248
|
-
// Default: highest overall score
|
|
249
|
-
return candidates[0];
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Instantiate specialist instance
|
|
253
|
-
*/
|
|
254
|
-
instantiateSpecialist(specialistType) {
|
|
255
|
-
const SpecialistClass = this.specialistPool.available.get(specialistType);
|
|
256
|
-
if (SpecialistClass) {
|
|
257
|
-
const instance = new SpecialistClass();
|
|
258
|
-
this.specialistPool.active.set(`${specialistType}_${Date.now()}`, instance);
|
|
259
|
-
return instance;
|
|
260
|
-
}
|
|
261
|
-
return null;
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Check if specialist type is available
|
|
265
|
-
*/
|
|
266
|
-
isSpecialistAvailable(specialistType) {
|
|
267
|
-
const capacity = this.specialistPool.capacity.get(specialistType);
|
|
268
|
-
return capacity ? capacity.currentLoad < capacity.maxConcurrent : false;
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Apply load balancing to team
|
|
272
|
-
*/
|
|
273
|
-
async applyLoadBalancing(team, config) {
|
|
274
|
-
// Calculate current load distribution
|
|
275
|
-
const loadDistribution = new Map();
|
|
276
|
-
team.forEach((specialist, skillType) => {
|
|
277
|
-
const capacity = this.specialistPool.capacity.get(skillType);
|
|
278
|
-
if (capacity) {
|
|
279
|
-
const loadPercentage = capacity.currentLoad / capacity.maxConcurrent;
|
|
280
|
-
loadDistribution.set(skillType, loadPercentage);
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
// If load is heavily skewed, consider redistributing
|
|
284
|
-
const maxLoad = Math.max(...loadDistribution.values());
|
|
285
|
-
const minLoad = Math.min(...loadDistribution.values());
|
|
286
|
-
if (maxLoad - minLoad > 0.5) { // 50% difference
|
|
287
|
-
this.logger.warn('Load imbalance detected', {
|
|
288
|
-
maxLoad,
|
|
289
|
-
minLoad,
|
|
290
|
-
difference: maxLoad - minLoad
|
|
291
|
-
});
|
|
292
|
-
// Could implement load redistribution logic here
|
|
293
|
-
// For now, just log the warning
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Update capacity tracking
|
|
298
|
-
*/
|
|
299
|
-
updateCapacity(specialistType, action) {
|
|
300
|
-
const capacity = this.specialistPool.capacity.get(specialistType);
|
|
301
|
-
if (capacity) {
|
|
302
|
-
if (action === 'allocate') {
|
|
303
|
-
capacity.currentLoad++;
|
|
304
|
-
}
|
|
305
|
-
else {
|
|
306
|
-
capacity.currentLoad = Math.max(0, capacity.currentLoad - 1);
|
|
307
|
-
}
|
|
308
|
-
this.specialistPool.capacity.set(specialistType, capacity);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Calculate skill match score
|
|
313
|
-
*/
|
|
314
|
-
calculateSkillMatch(candidateType, skill) {
|
|
315
|
-
// This would typically use the specialist's canHandle method
|
|
316
|
-
const skillMapping = this.skillMappings.get(skill.type);
|
|
317
|
-
if (!skillMapping)
|
|
318
|
-
return 0;
|
|
319
|
-
if (skillMapping.specialistTypes.includes(candidateType)) {
|
|
320
|
-
return 1.0; // Perfect match
|
|
321
|
-
}
|
|
322
|
-
if (skillMapping.fallbackTypes.includes(candidateType)) {
|
|
323
|
-
return 0.7; // Good fallback match
|
|
324
|
-
}
|
|
325
|
-
return 0.3; // Minimal capability
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Calculate team synergy score
|
|
329
|
-
*/
|
|
330
|
-
calculateTeamSynergy(candidateType, currentTeam) {
|
|
331
|
-
// Teams with complementary skills have higher synergy
|
|
332
|
-
const complementaryTypes = {
|
|
333
|
-
'data-specialist': ['reporting-specialist', 'integration-specialist'],
|
|
334
|
-
'integration-specialist': ['data-specialist', 'security-specialist'],
|
|
335
|
-
'automation-specialist': ['integration-specialist', 'data-specialist'],
|
|
336
|
-
'reporting-specialist': ['data-specialist'],
|
|
337
|
-
'security-specialist': ['integration-specialist', 'data-specialist']
|
|
338
|
-
};
|
|
339
|
-
const complementary = complementaryTypes[candidateType] || [];
|
|
340
|
-
let synergyScore = 0.5; // Base score
|
|
341
|
-
currentTeam.forEach((_, teamMemberType) => {
|
|
342
|
-
if (complementary.includes(teamMemberType)) {
|
|
343
|
-
synergyScore += 0.2;
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
return Math.min(synergyScore, 1.0);
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* Calculate diversity bonus
|
|
350
|
-
*/
|
|
351
|
-
calculateDiversityBonus(candidateType, currentTeam) {
|
|
352
|
-
// Bonus for adding different specialist types
|
|
353
|
-
const existingTypes = Array.from(currentTeam.keys());
|
|
354
|
-
return existingTypes.includes(candidateType) ? 0 : 1.0;
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* Assess candidate risk level
|
|
358
|
-
*/
|
|
359
|
-
assessCandidateRisk(candidateType, skill) {
|
|
360
|
-
const performance = this.specialistPool.performance.get(candidateType);
|
|
361
|
-
if (!performance)
|
|
362
|
-
return 'high';
|
|
363
|
-
if (performance.successRate > 0.9 && performance.totalTasksCompleted > 50) {
|
|
364
|
-
return 'low';
|
|
365
|
-
}
|
|
366
|
-
if (performance.successRate > 0.7 && performance.totalTasksCompleted > 10) {
|
|
367
|
-
return 'medium';
|
|
368
|
-
}
|
|
369
|
-
return 'high';
|
|
370
|
-
}
|
|
371
|
-
/**
|
|
372
|
-
* Initialize specialist pool
|
|
373
|
-
*/
|
|
374
|
-
initializeSpecialistPool() {
|
|
375
|
-
const available = new Map();
|
|
376
|
-
const capacity = new Map();
|
|
377
|
-
const performance = new Map();
|
|
378
|
-
// Register available specialists
|
|
379
|
-
available.set('data-specialist', data_specialist_agent_js_1.DataSpecialistAgent);
|
|
380
|
-
available.set('integration-specialist', integration_specialist_agent_js_1.IntegrationSpecialistAgent);
|
|
381
|
-
available.set('automation-specialist', automation_specialist_agent_js_1.AutomationSpecialistAgent);
|
|
382
|
-
available.set('reporting-specialist', reporting_specialist_agent_js_1.ReportingSpecialistAgent);
|
|
383
|
-
available.set('security-specialist', security_specialist_agent_js_1.SecuritySpecialistAgent);
|
|
384
|
-
// Initialize capacity information
|
|
385
|
-
available.forEach((_, type) => {
|
|
386
|
-
capacity.set(type, {
|
|
387
|
-
maxConcurrent: 3,
|
|
388
|
-
currentLoad: 0,
|
|
389
|
-
reservedSlots: 0
|
|
390
|
-
});
|
|
391
|
-
performance.set(type, {
|
|
392
|
-
averageExecutionTime: 300000, // 5 minutes
|
|
393
|
-
successRate: 0.85,
|
|
394
|
-
totalTasksCompleted: 0,
|
|
395
|
-
lastActivity: new Date(),
|
|
396
|
-
complexityRating: 3
|
|
397
|
-
});
|
|
398
|
-
});
|
|
399
|
-
return {
|
|
400
|
-
available,
|
|
401
|
-
active: new Map(),
|
|
402
|
-
capacity,
|
|
403
|
-
performance
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* Initialize skill mappings
|
|
408
|
-
*/
|
|
409
|
-
initializeSkillMappings() {
|
|
410
|
-
this.skillMappings.set('data_modeling', {
|
|
411
|
-
skillType: 'data_modeling',
|
|
412
|
-
specialistTypes: ['data-specialist'],
|
|
413
|
-
fallbackTypes: ['integration-specialist'],
|
|
414
|
-
complexityMapping: {
|
|
415
|
-
'low': ['data-specialist'],
|
|
416
|
-
'medium': ['data-specialist'],
|
|
417
|
-
'high': ['data-specialist', 'integration-specialist']
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
this.skillMappings.set('api_integration', {
|
|
421
|
-
skillType: 'api_integration',
|
|
422
|
-
specialistTypes: ['integration-specialist'],
|
|
423
|
-
fallbackTypes: ['data-specialist'],
|
|
424
|
-
complexityMapping: {
|
|
425
|
-
'low': ['integration-specialist'],
|
|
426
|
-
'medium': ['integration-specialist'],
|
|
427
|
-
'high': ['integration-specialist', 'security-specialist']
|
|
428
|
-
}
|
|
429
|
-
});
|
|
430
|
-
this.skillMappings.set('workflow_design', {
|
|
431
|
-
skillType: 'workflow_design',
|
|
432
|
-
specialistTypes: ['automation-specialist'],
|
|
433
|
-
fallbackTypes: ['integration-specialist'],
|
|
434
|
-
complexityMapping: {
|
|
435
|
-
'low': ['automation-specialist'],
|
|
436
|
-
'medium': ['automation-specialist'],
|
|
437
|
-
'high': ['automation-specialist', 'integration-specialist']
|
|
438
|
-
}
|
|
439
|
-
});
|
|
440
|
-
this.skillMappings.set('report_creation', {
|
|
441
|
-
skillType: 'report_creation',
|
|
442
|
-
specialistTypes: ['reporting-specialist'],
|
|
443
|
-
fallbackTypes: ['data-specialist'],
|
|
444
|
-
complexityMapping: {
|
|
445
|
-
'low': ['reporting-specialist'],
|
|
446
|
-
'medium': ['reporting-specialist'],
|
|
447
|
-
'high': ['reporting-specialist', 'data-specialist']
|
|
448
|
-
}
|
|
449
|
-
});
|
|
450
|
-
this.skillMappings.set('security_configuration', {
|
|
451
|
-
skillType: 'security_configuration',
|
|
452
|
-
specialistTypes: ['security-specialist'],
|
|
453
|
-
fallbackTypes: ['integration-specialist'],
|
|
454
|
-
complexityMapping: {
|
|
455
|
-
'low': ['security-specialist'],
|
|
456
|
-
'medium': ['security-specialist'],
|
|
457
|
-
'high': ['security-specialist', 'integration-specialist']
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
/**
|
|
462
|
-
* Get team assembly statistics
|
|
463
|
-
*/
|
|
464
|
-
getAssemblyStatistics() {
|
|
465
|
-
return {
|
|
466
|
-
availableSpecialists: this.specialistPool.available.size,
|
|
467
|
-
activeSpecialists: this.specialistPool.active.size,
|
|
468
|
-
capacityUtilization: this.calculateCapacityUtilization(),
|
|
469
|
-
skillMappings: this.skillMappings.size,
|
|
470
|
-
performanceMetrics: this.getAggregatedPerformance()
|
|
471
|
-
};
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* Calculate overall capacity utilization
|
|
475
|
-
*/
|
|
476
|
-
calculateCapacityUtilization() {
|
|
477
|
-
let totalCapacity = 0;
|
|
478
|
-
let totalUsed = 0;
|
|
479
|
-
this.specialistPool.capacity.forEach(capacity => {
|
|
480
|
-
totalCapacity += capacity.maxConcurrent;
|
|
481
|
-
totalUsed += capacity.currentLoad;
|
|
482
|
-
});
|
|
483
|
-
return totalCapacity > 0 ? totalUsed / totalCapacity : 0;
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* Get aggregated performance metrics
|
|
487
|
-
*/
|
|
488
|
-
getAggregatedPerformance() {
|
|
489
|
-
const performances = Array.from(this.specialistPool.performance.values());
|
|
490
|
-
if (performances.length === 0) {
|
|
491
|
-
return { averageSuccessRate: 0, totalTasksCompleted: 0 };
|
|
492
|
-
}
|
|
493
|
-
const avgSuccessRate = performances.reduce((sum, p) => sum + p.successRate, 0) / performances.length;
|
|
494
|
-
const totalTasks = performances.reduce((sum, p) => sum + p.totalTasksCompleted, 0);
|
|
495
|
-
return {
|
|
496
|
-
averageSuccessRate: avgSuccessRate,
|
|
497
|
-
totalTasksCompleted: totalTasks
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
exports.TeamAssembler = TeamAssembler;
|
|
502
|
-
//# sourceMappingURL=team-assembler.js.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
declare class PerformanceBenchmark {
|
|
3
|
-
private client;
|
|
4
|
-
private logger;
|
|
5
|
-
private results;
|
|
6
|
-
constructor();
|
|
7
|
-
/**
|
|
8
|
-
* Measure memory usage of a data structure
|
|
9
|
-
*/
|
|
10
|
-
private measureMemory;
|
|
11
|
-
/**
|
|
12
|
-
* Format bytes to human readable string
|
|
13
|
-
*/
|
|
14
|
-
private formatBytes;
|
|
15
|
-
/**
|
|
16
|
-
* Benchmark count-only queries (minimal memory footprint)
|
|
17
|
-
*/
|
|
18
|
-
benchmarkCountOnly(): Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* Benchmark specific field queries (optimized memory)
|
|
21
|
-
*/
|
|
22
|
-
benchmarkSpecificFields(): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Benchmark ML batch processing
|
|
25
|
-
*/
|
|
26
|
-
benchmarkMLBatchProcessing(): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Compare full content vs optimized queries
|
|
29
|
-
*/
|
|
30
|
-
benchmarkComparison(): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Generate summary report
|
|
33
|
-
*/
|
|
34
|
-
generateReport(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Run all benchmarks
|
|
37
|
-
*/
|
|
38
|
-
runAll(): Promise<void>;
|
|
39
|
-
}
|
|
40
|
-
export { PerformanceBenchmark };
|
|
41
|
-
//# sourceMappingURL=benchmark-performance.d.ts.map
|