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.
Files changed (302) hide show
  1. package/claude-flow.bat +0 -0
  2. package/claude-flow.ps1 +0 -0
  3. package/dist/mcp/intelligent-reporting-mcp.d.ts +7 -0
  4. package/dist/mcp/intelligent-reporting-mcp.js +379 -0
  5. package/dist/mcp/servicenow-automation-mcp.js +0 -0
  6. package/dist/mcp/servicenow-deployment-mcp.js +0 -0
  7. package/dist/mcp/servicenow-integration-mcp.js +0 -0
  8. package/dist/mcp/servicenow-mcp-server.js +0 -0
  9. package/dist/mcp/servicenow-operations-mcp.js +0 -0
  10. package/dist/mcp/servicenow-platform-development-mcp.js +0 -0
  11. package/dist/mcp/servicenow-progressive-indexer.js +0 -0
  12. package/dist/mcp/servicenow-reporting-analytics-mcp.js +280 -29
  13. package/dist/mcp/servicenow-security-compliance-mcp.js +0 -0
  14. package/dist/mcp/servicenow-update-set-mcp.js +0 -0
  15. package/dist/mcp/start-all-mcp-servers.js +0 -0
  16. package/dist/mcp/start-servicenow-mcp.js +0 -0
  17. package/dist/services/widget-deployment-service.d.ts +2 -1
  18. package/dist/services/widget-deployment-service.js +17 -16
  19. package/dist/utils/anti-mock-data-validator.d.ts +66 -0
  20. package/dist/utils/anti-mock-data-validator.js +316 -0
  21. package/dist/utils/servicenow-eventual-consistency.d.ts +120 -0
  22. package/dist/utils/servicenow-eventual-consistency.js +220 -0
  23. package/memory/agents/README.md +1 -1
  24. package/memory/claude-flow-data.json +1 -1
  25. package/memory/sessions/README.md +1 -1
  26. package/package.json +4 -3
  27. package/.mcp.json +0 -22
  28. package/claude-flow.config.json +0 -20
  29. package/dist/agents/app-creator.agent.d.ts +0 -55
  30. package/dist/agents/app-creator.agent.js +0 -1292
  31. package/dist/agents/base/base-snow-agent.d.ts +0 -75
  32. package/dist/agents/base/base-snow-agent.js +0 -169
  33. package/dist/agents/base-snow-agent.d.ts +0 -63
  34. package/dist/agents/base-snow-agent.js +0 -296
  35. package/dist/agents/coordinator.d.ts +0 -200
  36. package/dist/agents/coordinator.js +0 -777
  37. package/dist/agents/flow-builder-agent.d.ts +0 -18
  38. package/dist/agents/flow-builder-agent.js +0 -197
  39. package/dist/agents/queen-403-handler.d.ts +0 -47
  40. package/dist/agents/queen-403-handler.js +0 -175
  41. package/dist/agents/queen-agent-example.d.ts +0 -23
  42. package/dist/agents/queen-agent-example.js +0 -240
  43. package/dist/agents/queen-agent.test.d.ts +0 -6
  44. package/dist/agents/script-generator.agent.d.ts +0 -32
  45. package/dist/agents/script-generator.agent.js +0 -772
  46. package/dist/agents/script-writer-agent.d.ts +0 -22
  47. package/dist/agents/script-writer-agent.js +0 -695
  48. package/dist/agents/security-agent.d.ts +0 -23
  49. package/dist/agents/security-agent.js +0 -619
  50. package/dist/agents/specialists/automation-specialist.agent.d.ts +0 -44
  51. package/dist/agents/specialists/automation-specialist.agent.js +0 -204
  52. package/dist/agents/specialists/data-specialist.agent.d.ts +0 -165
  53. package/dist/agents/specialists/data-specialist.agent.js +0 -484
  54. package/dist/agents/specialists/integration-specialist.agent.d.ts +0 -227
  55. package/dist/agents/specialists/integration-specialist.agent.js +0 -725
  56. package/dist/agents/specialists/reporting-specialist.agent.d.ts +0 -54
  57. package/dist/agents/specialists/reporting-specialist.agent.js +0 -193
  58. package/dist/agents/specialists/security-specialist.agent.d.ts +0 -85
  59. package/dist/agents/specialists/security-specialist.agent.js +0 -309
  60. package/dist/agents/teams/adaptive/adaptive-coordinator.agent.d.ts +0 -111
  61. package/dist/agents/teams/adaptive/adaptive-coordinator.agent.js +0 -383
  62. package/dist/agents/teams/base-team.d.ts +0 -72
  63. package/dist/agents/teams/base-team.js +0 -253
  64. package/dist/agents/teams/team-types.d.ts +0 -265
  65. package/dist/agents/teams/team-types.js +0 -3
  66. package/dist/agents/teams/widget/widget-architect.agent.d.ts +0 -61
  67. package/dist/agents/teams/widget/widget-architect.agent.js +0 -436
  68. package/dist/agents/teams/widget/widget-backend.agent.d.ts +0 -74
  69. package/dist/agents/teams/widget/widget-backend.agent.js +0 -1531
  70. package/dist/agents/teams/widget/widget-frontend.agent.d.ts +0 -67
  71. package/dist/agents/teams/widget/widget-frontend.agent.js +0 -1014
  72. package/dist/agents/teams/widget/widget-platform.agent.d.ts +0 -90
  73. package/dist/agents/teams/widget/widget-platform.agent.js +0 -1190
  74. package/dist/agents/teams/widget/widget-uiux.agent.d.ts +0 -107
  75. package/dist/agents/teams/widget/widget-uiux.agent.js +0 -1033
  76. package/dist/agents/test-agent.d.ts +0 -26
  77. package/dist/agents/test-agent.js +0 -734
  78. package/dist/agents/test-agents.d.ts +0 -7
  79. package/dist/agents/test-agents.js +0 -64
  80. package/dist/agents/ui-builder.agent.d.ts +0 -50
  81. package/dist/agents/ui-builder.agent.js +0 -1539
  82. package/dist/agents/widget-builder.agent.d.ts +0 -32
  83. package/dist/agents/widget-builder.agent.js +0 -439
  84. package/dist/agents/widget-creator-agent.d.ts +0 -18
  85. package/dist/agents/widget-creator-agent.js +0 -498
  86. package/dist/agents/workflow-designer.agent.d.ts +0 -31
  87. package/dist/agents/workflow-designer.agent.js +0 -583
  88. package/dist/api/error-handling.d.ts +0 -325
  89. package/dist/api/error-handling.js +0 -1488
  90. package/dist/api/flow-designer-api.d.ts +0 -167
  91. package/dist/api/flow-designer-api.js +0 -554
  92. package/dist/api/natural-language-mapper.d.ts +0 -124
  93. package/dist/api/natural-language-mapper.js +0 -501
  94. package/dist/api/performance-optimizer.d.ts +0 -240
  95. package/dist/api/performance-optimizer.js +0 -706
  96. package/dist/api/transaction-manager.d.ts +0 -189
  97. package/dist/api/transaction-manager.js +0 -576
  98. package/dist/assembly/team-assembler.d.ts +0 -140
  99. package/dist/assembly/team-assembler.js +0 -502
  100. package/dist/benchmark-performance.d.ts +0 -41
  101. package/dist/benchmark-performance.js +0 -230
  102. package/dist/cli/snow-flow-cli-integration.d.ts +0 -30
  103. package/dist/cli/snow-flow-cli-integration.js +0 -396
  104. package/dist/coordination/coordination-engine.d.ts +0 -41
  105. package/dist/coordination/coordination-engine.js +0 -324
  106. package/dist/coordination/coordination.test.d.ts +0 -6
  107. package/dist/coordination/example.d.ts +0 -31
  108. package/dist/coordination/example.js +0 -394
  109. package/dist/coordination/execution-patterns.d.ts +0 -43
  110. package/dist/coordination/execution-patterns.js +0 -507
  111. package/dist/coordination/factory.d.ts +0 -94
  112. package/dist/coordination/factory.js +0 -433
  113. package/dist/coordination/index.d.ts +0 -71
  114. package/dist/coordination/index.js +0 -135
  115. package/dist/coordination/progress-monitor.d.ts +0 -71
  116. package/dist/coordination/progress-monitor.js +0 -505
  117. package/dist/coordination/quality-gates.d.ts +0 -124
  118. package/dist/coordination/quality-gates.js +0 -577
  119. package/dist/coordination/shared-memory.d.ts +0 -39
  120. package/dist/coordination/shared-memory.js +0 -289
  121. package/dist/coordination/task-dependencies.d.ts +0 -50
  122. package/dist/coordination/task-dependencies.js +0 -407
  123. package/dist/coordination/team-coordinator.d.ts +0 -59
  124. package/dist/coordination/team-coordinator.js +0 -550
  125. package/dist/coordination/types.d.ts +0 -152
  126. package/dist/coordination/types.js +0 -3
  127. package/dist/mcp/mcp-wrapper.d.ts +0 -8
  128. package/dist/mcp/mcp-wrapper.js +0 -77
  129. package/dist/mcp/servicenow-flow-composer-enhanced.js +0 -396
  130. package/dist/mcp/servicenow-flow-composer-mcp.d.ts +0 -7
  131. package/dist/mcp/servicenow-flow-composer-mcp.js +0 -3103
  132. package/dist/mcp/servicenow-graph-memory-mcp.d.ts +0 -7
  133. package/dist/mcp/servicenow-intelligent-mcp.d.ts +0 -143
  134. package/dist/mcp/servicenow-intelligent-mcp.js +0 -4156
  135. package/dist/mcp/servicenow-xml-flow-mcp.d.ts +0 -53
  136. package/dist/mcp/servicenow-xml-flow-mcp.js +0 -1704
  137. package/dist/mcp/singleton-check.js +0 -31
  138. package/dist/mcp/test-simple-mcp.d.ts +0 -6
  139. package/dist/mcp/test-simple-mcp.js +0 -63
  140. package/dist/memory/hierarchical-memory-system.d.ts +0 -90
  141. package/dist/memory/hierarchical-memory-system.js +0 -400
  142. package/dist/memory/index.d.ts +0 -9
  143. package/dist/memory/index.js +0 -20
  144. package/dist/memory/mcp-integration-example.d.ts +0 -6
  145. package/dist/memory/mcp-integration-example.js +0 -281
  146. package/dist/memory/memory-client.d.ts +0 -199
  147. package/dist/memory/memory-client.js +0 -364
  148. package/dist/memory/memory-manager.d.ts +0 -29
  149. package/dist/memory/memory-manager.js +0 -280
  150. package/dist/memory/memory-operations.d.ts +0 -179
  151. package/dist/memory/memory-operations.js +0 -691
  152. package/dist/memory/memory-system.d.ts +0 -153
  153. package/dist/memory/memory-system.js +0 -651
  154. package/dist/memory/memory-test.d.ts +0 -6
  155. package/dist/memory/memory-test.js +0 -161
  156. package/dist/memory/snow-flow-memory-patterns.d.ts +0 -213
  157. package/dist/memory/snow-flow-memory-patterns.js +0 -200
  158. package/dist/memory/snow-memory.d.ts +0 -54
  159. package/dist/memory/snow-memory.js +0 -301
  160. package/dist/memory/swarm-memory.d.ts +0 -135
  161. package/dist/memory/swarm-memory.js +0 -378
  162. package/dist/optimization/flow-performance-optimizer.js +0 -723
  163. package/dist/orchestration/discovery/service-discovery.d.ts +0 -81
  164. package/dist/orchestration/discovery/service-discovery.js +0 -808
  165. package/dist/orchestration/distributed-orchestrator.d.ts +0 -131
  166. package/dist/orchestration/distributed-orchestrator.js +0 -712
  167. package/dist/orchestration/distribution/task-distribution-engine.d.ts +0 -53
  168. package/dist/orchestration/distribution/task-distribution-engine.js +0 -586
  169. package/dist/orchestration/flow-update-orchestrator.js +0 -648
  170. package/dist/orchestration/interfaces/distributed-orchestration.interface.d.ts +0 -606
  171. package/dist/orchestration/interfaces/distributed-orchestration.interface.js +0 -65
  172. package/dist/orchestration/protocols/mcpx-protocol.d.ts +0 -71
  173. package/dist/orchestration/protocols/mcpx-protocol.js +0 -668
  174. package/dist/orchestration/state/distributed-state-manager.d.ts +0 -89
  175. package/dist/orchestration/state/distributed-state-manager.js +0 -716
  176. package/dist/orchestrator/flow-composer.d.ts +0 -105
  177. package/dist/orchestrator/flow-composer.js +0 -404
  178. package/dist/orchestrator/flow-pattern-templates.d.ts +0 -260
  179. package/dist/orchestrator/flow-pattern-templates.js +0 -908
  180. package/dist/orchestrator/flow-subflow-decision-engine.d.ts +0 -202
  181. package/dist/orchestrator/flow-subflow-decision-engine.js +0 -769
  182. package/dist/orchestrator/flow-validation-engine.d.ts +0 -169
  183. package/dist/orchestrator/flow-validation-engine.js +0 -913
  184. package/dist/orchestrator/snow-orchestrator.d.ts +0 -49
  185. package/dist/orchestrator/snow-orchestrator.js +0 -235
  186. package/dist/orchestrator/subflow-creation-handler.d.ts +0 -230
  187. package/dist/orchestrator/subflow-creation-handler.js +0 -791
  188. package/dist/patterns/adaptive-patterns.d.ts +0 -140
  189. package/dist/patterns/adaptive-patterns.js +0 -549
  190. package/dist/queen/advanced-integration-test.d.ts +0 -48
  191. package/dist/queen/advanced-integration-test.js +0 -473
  192. package/dist/queen/integration-example.d.ts +0 -82
  193. package/dist/queen/integration-example.js +0 -219
  194. package/dist/queen/integration-test.d.ts +0 -72
  195. package/dist/queen/integration-test.js +0 -563
  196. package/dist/queen/mock-mcp-client.d.ts +0 -71
  197. package/dist/queen/mock-mcp-client.js +0 -317
  198. package/dist/queen/run-integration-tests.d.ts +0 -9
  199. package/dist/queen/run-integration-tests.js +0 -27
  200. package/dist/sparc/coordinators/adaptive-coordinator.d.ts +0 -54
  201. package/dist/sparc/coordinators/adaptive-coordinator.js +0 -367
  202. package/dist/sparc/coordinators/team-coordinator.d.ts +0 -66
  203. package/dist/sparc/coordinators/team-coordinator.js +0 -402
  204. package/dist/sparc/modes/team-modes.d.ts +0 -33
  205. package/dist/sparc/modes/team-modes.js +0 -399
  206. package/dist/sparc/teams/application-team.d.ts +0 -73
  207. package/dist/sparc/teams/application-team.js +0 -463
  208. package/dist/sparc/teams/flow-team.d.ts +0 -67
  209. package/dist/sparc/teams/flow-team.js +0 -373
  210. package/dist/sparc/teams/widget-team.d.ts +0 -61
  211. package/dist/sparc/teams/widget-team.js +0 -280
  212. package/dist/specialists/app-specialists.d.ts +0 -93
  213. package/dist/specialists/app-specialists.js +0 -1639
  214. package/dist/specialists/base-specialist.d.ts +0 -19
  215. package/dist/specialists/base-specialist.js +0 -54
  216. package/dist/specialists/flow-specialists.d.ts +0 -113
  217. package/dist/specialists/flow-specialists.js +0 -1787
  218. package/dist/specialists/individual-specialists.d.ts +0 -67
  219. package/dist/specialists/individual-specialists.js +0 -632
  220. package/dist/specialists/widget-specialists.d.ts +0 -70
  221. package/dist/specialists/widget-specialists.js +0 -1264
  222. package/dist/src/utils/agent-detector.js +0 -655
  223. package/dist/teams/adaptive-team.d.ts +0 -81
  224. package/dist/teams/adaptive-team.js +0 -1153
  225. package/dist/teams/application-team.d.ts +0 -30
  226. package/dist/teams/application-team.js +0 -547
  227. package/dist/teams/base-team.d.ts +0 -55
  228. package/dist/teams/base-team.js +0 -243
  229. package/dist/teams/flow-team.d.ts +0 -28
  230. package/dist/teams/flow-team.js +0 -525
  231. package/dist/teams/widget-team.d.ts +0 -26
  232. package/dist/teams/widget-team.js +0 -459
  233. package/dist/templates/flow-template-system.js +0 -625
  234. package/dist/test-fetch-incidents.d.ts +0 -2
  235. package/dist/test-fetch-incidents.js +0 -84
  236. package/dist/test-incident-access.d.ts +0 -2
  237. package/dist/test-incident-access.js +0 -72
  238. package/dist/test-iphone-flow.js +0 -189
  239. package/dist/test-limit-problem.d.ts +0 -2
  240. package/dist/test-limit-problem.js +0 -60
  241. package/dist/test-ml-batch-fix.d.ts +0 -2
  242. package/dist/test-ml-batch-fix.js +0 -104
  243. package/dist/test-ml-batch.d.ts +0 -2
  244. package/dist/test-ml-batch.js +0 -87
  245. package/dist/test-ml-query.d.ts +0 -2
  246. package/dist/test-ml-query.js +0 -100
  247. package/dist/test-ml-training-fix.d.ts +0 -12
  248. package/dist/test-ml-training-fix.js +0 -113
  249. package/dist/test-ml-training.d.ts +0 -2
  250. package/dist/test-ml-training.js +0 -32
  251. package/dist/test-operations-query.d.ts +0 -2
  252. package/dist/test-operations-query.js +0 -84
  253. package/dist/test-performance-query.d.ts +0 -2
  254. package/dist/test-performance-query.js +0 -52
  255. package/dist/test-singleton-protection.d.ts +0 -8
  256. package/dist/test-singleton-protection.js +0 -110
  257. package/dist/test-smart-limits.d.ts +0 -13
  258. package/dist/test-smart-limits.js +0 -100
  259. package/dist/test-snow-query-incidents.d.ts +0 -2
  260. package/dist/test-snow-query-incidents.js +0 -66
  261. package/dist/test-universal-query.d.ts +0 -2
  262. package/dist/test-universal-query.js +0 -106
  263. package/dist/testing/flow-testing-automation.js +0 -641
  264. package/dist/utils/complete-flow-xml-generator.js +0 -1285
  265. package/dist/utils/file-storage-fallback.d.ts +0 -62
  266. package/dist/utils/file-storage-fallback.js +0 -289
  267. package/dist/utils/flow-api-discovery.d.ts +0 -151
  268. package/dist/utils/flow-api-discovery.js +0 -439
  269. package/dist/utils/flow-examples.js +0 -720
  270. package/dist/utils/flow-structure-builder.js +0 -677
  271. package/dist/utils/flow-xml-generator.d.ts +0 -41
  272. package/dist/utils/flow-xml-generator.js +0 -258
  273. package/dist/utils/improved-flow-xml-generator.js +0 -820
  274. package/dist/utils/mcp-process-manager.backup.d.ts +0 -58
  275. package/dist/utils/mcp-process-manager.backup.js +0 -220
  276. package/dist/utils/mcp-singleton-enforcer.d.ts +0 -36
  277. package/dist/utils/mcp-singleton-enforcer.js +0 -201
  278. package/dist/utils/mcp-timeout-fix.d.ts +0 -53
  279. package/dist/utils/mcp-timeout-fix.js +0 -221
  280. package/dist/utils/migrate-claude-flow.d.ts +0 -22
  281. package/dist/utils/migrate-claude-flow.js +0 -120
  282. package/dist/utils/scope-utils.d.ts +0 -72
  283. package/dist/utils/scope-utils.js +0 -386
  284. package/dist/utils/snow-oauth-old.d.ts +0 -65
  285. package/dist/utils/snow-oauth-old.js +0 -345
  286. package/dist/utils/xml-first-flow-generator.js +0 -513
  287. package/memory/servicenow_artifacts/000d9224c895221055906c7518aa2d3d.json +0 -30
  288. package/memory/servicenow_artifacts/0196b66173303010e46b4a2214f6a7a2.json +0 -36
  289. package/memory/servicenow_artifacts/125e5d1d837e2a102a7ea130ceaad397.json +0 -30
  290. package/memory/servicenow_artifacts/7637c1f2b7112210a5e5911cde11a972.json +0 -30
  291. package/memory/servicenow_artifacts/default_documentation_tables_1754056582292.json +0 -55
  292. package/memory/servicenow_artifacts/default_documentation_tables_1754057477189.json +0 -55
  293. package/memory/update-set-sessions/01f82af583faea102a7ea130ceaad3d4.json +0 -9
  294. package/memory/update-set-sessions/27718fb983faea102a7ea130ceaad34b.json +0 -9
  295. package/memory/update-set-sessions/412e9bf6833e22502a7ea130ceaad30a.json +0 -8
  296. package/memory/update-set-sessions/66fc5a79837aea102a7ea130ceaad3ab.json +0 -9
  297. package/memory/update-set-sessions/71a30ff5837eea102a7ea130ceaad37f.json +0 -9
  298. package/memory/update-set-sessions/74fba27983faea102a7ea130ceaad3bd.json +0 -9
  299. package/memory/update-set-sessions/a0b147b5837eea102a7ea130ceaad344.json +0 -58
  300. package/memory/update-set-sessions/b13f5eb983baea102a7ea130ceaad33e.json +0 -9
  301. package/reports/swarm-auto-centralized-1752649029776.json +0 -13
  302. package/src/memory/README.md +0 -240
@@ -1,253 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TeamFactory = exports.BaseTeam = exports.BaseSnowAgent = void 0;
4
- /**
5
- * Abstract base class for all specialized agents
6
- */
7
- class BaseSnowAgent {
8
- constructor(id, name, role, capabilities, specialization, config) {
9
- this.status = 'available';
10
- this.id = id;
11
- this.name = name;
12
- this.role = role;
13
- this.capabilities = capabilities;
14
- this.specialization = specialization;
15
- this.config = config;
16
- }
17
- // Common agent methods
18
- getId() {
19
- return this.id;
20
- }
21
- getName() {
22
- return this.name;
23
- }
24
- getRole() {
25
- return this.role;
26
- }
27
- getCapabilities() {
28
- return this.capabilities;
29
- }
30
- getStatus() {
31
- return this.status;
32
- }
33
- setStatus(status) {
34
- this.status = status;
35
- }
36
- // Check if agent can handle a specific requirement
37
- canHandle(requirement) {
38
- return this.specialization.primary.includes(requirement) ||
39
- this.specialization.secondary.includes(requirement);
40
- }
41
- // Get proficiency for a specific capability
42
- getProficiency(capability) {
43
- const cap = this.capabilities.find(c => c.name === capability);
44
- return cap ? cap.proficiency : 0;
45
- }
46
- // Common error handling
47
- handleError(error) {
48
- console.error(`Agent ${this.name} encountered error:`, error);
49
- return {
50
- success: false,
51
- error: error.message || 'Unknown error occurred',
52
- metadata: {
53
- duration: 0,
54
- performance: null,
55
- quality: null
56
- }
57
- };
58
- }
59
- // Common validation
60
- validateRequirements(requirements) {
61
- return requirements !== null && requirements !== undefined;
62
- }
63
- }
64
- exports.BaseSnowAgent = BaseSnowAgent;
65
- /**
66
- * Abstract base class for specialized teams
67
- */
68
- class BaseTeam {
69
- constructor(id, name, architect, specialists, coordinationStrategy, config) {
70
- this.id = id;
71
- this.name = name;
72
- this.architect = architect;
73
- this.specialists = specialists;
74
- this.coordinationStrategy = coordinationStrategy;
75
- this.config = config;
76
- }
77
- // Common team methods
78
- getId() {
79
- return this.id;
80
- }
81
- getName() {
82
- return this.name;
83
- }
84
- getArchitect() {
85
- return this.architect;
86
- }
87
- getSpecialists() {
88
- return this.specialists;
89
- }
90
- getAllMembers() {
91
- return [this.architect, ...this.specialists];
92
- }
93
- // Find best agent for a specific task
94
- findBestAgent(requirement) {
95
- const allAgents = this.getAllMembers();
96
- // Sort by proficiency for the requirement
97
- const sortedAgents = allAgents
98
- .filter(agent => agent.canHandle(requirement))
99
- .sort((a, b) => b.getProficiency(requirement) - a.getProficiency(requirement));
100
- return sortedAgents[0] || this.architect;
101
- }
102
- // Execute task with coordination strategy
103
- async coordinatedExecution(specification) {
104
- try {
105
- this.setAllAgentsStatus('busy');
106
- const startTime = Date.now();
107
- let result;
108
- switch (this.coordinationStrategy.type) {
109
- case 'sequential':
110
- result = await this.executeSequential(specification);
111
- break;
112
- case 'parallel':
113
- result = await this.executeParallel(specification);
114
- break;
115
- case 'hybrid':
116
- result = await this.executeHybrid(specification);
117
- break;
118
- default:
119
- result = await this.executeSequential(specification);
120
- }
121
- const duration = Date.now() - startTime;
122
- if (result.metadata) {
123
- result.metadata.duration = duration;
124
- }
125
- this.setAllAgentsStatus('available');
126
- return result;
127
- }
128
- catch (error) {
129
- this.setAllAgentsStatus('available');
130
- return {
131
- success: false,
132
- error: error instanceof Error ? error.message : 'Unknown error',
133
- metadata: {
134
- duration: 0,
135
- performance: null,
136
- quality: null
137
- }
138
- };
139
- }
140
- }
141
- // Sequential execution strategy
142
- async executeSequential(specification) {
143
- // First, architect analyzes and creates plan
144
- const architectPlan = await this.architect.analyzeRequirements(specification.requirements);
145
- // Then, execute specialists in order
146
- let currentResult = architectPlan;
147
- for (const specialist of this.specialists) {
148
- currentResult = await specialist.execute(currentResult);
149
- if (!currentResult.success) {
150
- return currentResult;
151
- }
152
- }
153
- return currentResult;
154
- }
155
- // Parallel execution strategy
156
- async executeParallel(specification) {
157
- // Architect creates plan
158
- const architectPlan = await this.architect.analyzeRequirements(specification.requirements);
159
- // Execute specialists in parallel
160
- const specialistPromises = this.specialists.map(specialist => specialist.execute(architectPlan));
161
- const results = await Promise.all(specialistPromises);
162
- // Combine results
163
- return this.combineResults(results);
164
- }
165
- // Hybrid execution strategy
166
- async executeHybrid(specification) {
167
- // Implement based on dependencies
168
- const architectPlan = await this.architect.analyzeRequirements(specification.requirements);
169
- // Execute based on dependency graph
170
- return await this.executeDependencyGraph(architectPlan);
171
- }
172
- // Combine multiple specialist results
173
- combineResults(results) {
174
- const failed = results.find(r => !r.success);
175
- if (failed) {
176
- return failed;
177
- }
178
- return {
179
- success: true,
180
- artifact: results.map(r => r.artifact),
181
- metadata: {
182
- duration: Math.max(...results.map(r => r.metadata?.duration || 0)),
183
- performance: results.map(r => r.metadata?.performance),
184
- quality: results.map(r => r.metadata?.quality)
185
- }
186
- };
187
- }
188
- // Execute based on dependency graph
189
- async executeDependencyGraph(plan) {
190
- // Simplified implementation - can be enhanced with proper dependency resolution
191
- const dependencies = this.coordinationStrategy.dependencies;
192
- const executed = new Set();
193
- const results = [];
194
- // Execute agents in dependency order
195
- for (const specialist of this.specialists) {
196
- const agentId = specialist.getId();
197
- const deps = dependencies.filter(d => d.to === agentId);
198
- // Wait for dependencies
199
- const depsSatisfied = deps.every(d => executed.has(d.from));
200
- if (depsSatisfied) {
201
- const result = await specialist.execute(plan);
202
- results.push(result);
203
- executed.add(agentId);
204
- if (!result.success) {
205
- return result;
206
- }
207
- }
208
- }
209
- return this.combineResults(results);
210
- }
211
- // Utility methods
212
- setAllAgentsStatus(status) {
213
- this.architect.setStatus(status);
214
- this.specialists.forEach(agent => agent.setStatus(status));
215
- }
216
- // Get team status
217
- getTeamStatus() {
218
- return {
219
- architect: this.architect.getStatus(),
220
- specialists: this.specialists.map(s => ({
221
- name: s.getName(),
222
- status: s.getStatus()
223
- }))
224
- };
225
- }
226
- // Validate team readiness
227
- isTeamReady() {
228
- return this.getAllMembers().every(agent => agent.getStatus() === 'available');
229
- }
230
- }
231
- exports.BaseTeam = BaseTeam;
232
- /**
233
- * Team factory for creating specialized teams
234
- */
235
- class TeamFactory {
236
- static createTeam(type, config) {
237
- switch (type) {
238
- case 'widget':
239
- // Will be implemented in widget team files
240
- throw new Error('Widget team factory not implemented yet');
241
- case 'flow':
242
- // Will be implemented in flow team files
243
- throw new Error('Flow team factory not implemented yet');
244
- case 'application':
245
- // Will be implemented in application team files
246
- throw new Error('Application team factory not implemented yet');
247
- default:
248
- throw new Error(`Unknown team type: ${type}`);
249
- }
250
- }
251
- }
252
- exports.TeamFactory = TeamFactory;
253
- //# sourceMappingURL=base-team.js.map
@@ -1,265 +0,0 @@
1
- export interface TeamSpecification {
2
- id: string;
3
- requirements: any;
4
- complexity: 'simple' | 'medium' | 'complex';
5
- estimatedTime: number;
6
- dependencies: string[];
7
- assignedTo?: string;
8
- }
9
- export interface TeamMember {
10
- id: string;
11
- name: string;
12
- role: string;
13
- specialization: string[];
14
- capabilities: string[];
15
- status: 'available' | 'busy' | 'offline';
16
- }
17
- export interface TeamResult {
18
- success: boolean;
19
- artifact?: any;
20
- error?: string;
21
- metadata?: {
22
- duration: number;
23
- performance: any;
24
- quality: any;
25
- };
26
- }
27
- export interface WidgetSpecification extends TeamSpecification {
28
- requirements: WidgetRequirements;
29
- }
30
- export interface WidgetRequirements {
31
- type: 'dashboard' | 'form' | 'list' | 'chart' | 'custom';
32
- data: {
33
- source: string;
34
- fields: string[];
35
- filters?: any;
36
- };
37
- ui: {
38
- responsive: boolean;
39
- theme: string;
40
- accessibility: boolean;
41
- };
42
- functionality: {
43
- interactive: boolean;
44
- realtime: boolean;
45
- export?: boolean;
46
- };
47
- integrations?: string[];
48
- }
49
- export interface FrontendRequirements {
50
- template: {
51
- layout: string;
52
- components: string[];
53
- responsive: boolean;
54
- };
55
- styling: {
56
- theme: string;
57
- customCSS?: string;
58
- accessibility: boolean;
59
- };
60
- clientScript: {
61
- framework: 'angular' | 'vanilla' | 'react';
62
- events: string[];
63
- apiCalls: string[];
64
- };
65
- }
66
- export interface BackendRequirements {
67
- serverScript: {
68
- dataProcessing: string[];
69
- apiIntegrations: string[];
70
- businessLogic: string[];
71
- };
72
- performance: {
73
- caching: boolean;
74
- optimization: string[];
75
- };
76
- security: {
77
- validation: string[];
78
- authorization: string[];
79
- };
80
- }
81
- export interface DesignRequirements {
82
- uiPattern: string;
83
- accessibility: {
84
- wcag: string;
85
- screenReader: boolean;
86
- keyboard: boolean;
87
- };
88
- userExperience: {
89
- workflow: string[];
90
- feedback: string[];
91
- };
92
- }
93
- export interface DesignSpec {
94
- colorScheme: string;
95
- typography: any;
96
- layout: any;
97
- interactions: any;
98
- accessibility: any;
99
- }
100
- export interface UsabilityReport {
101
- score: number;
102
- issues: any[];
103
- recommendations: string[];
104
- }
105
- export interface FlowSpecification extends TeamSpecification {
106
- requirements: FlowRequirements;
107
- }
108
- export interface FlowRequirements {
109
- type: 'approval' | 'automation' | 'integration' | 'notification' | 'custom';
110
- trigger: {
111
- type: string;
112
- condition: string;
113
- table?: string;
114
- };
115
- process: {
116
- steps: FlowStep[];
117
- branches: FlowBranch[];
118
- decisions: FlowDecision[];
119
- };
120
- data: {
121
- inputs: any[];
122
- outputs: any[];
123
- transformations: any[];
124
- };
125
- security: {
126
- permissions: string[];
127
- compliance: string[];
128
- };
129
- }
130
- export interface FlowStep {
131
- id: string;
132
- name: string;
133
- type: string;
134
- configuration: any;
135
- order: number;
136
- }
137
- export interface FlowBranch {
138
- condition: string;
139
- steps: FlowStep[];
140
- }
141
- export interface FlowDecision {
142
- condition: string;
143
- truePath: string;
144
- falsePath: string;
145
- }
146
- export interface ProcessRequirements {
147
- logic: string[];
148
- steps: FlowStep[];
149
- errorHandling: string[];
150
- }
151
- export interface TriggerRequirements {
152
- events: string[];
153
- conditions: string[];
154
- schedules?: string[];
155
- }
156
- export interface DataRequirements {
157
- sources: string[];
158
- transformations: string[];
159
- destinations: string[];
160
- }
161
- export interface SecurityRequirements {
162
- authentication: string[];
163
- authorization: string[];
164
- compliance: string[];
165
- }
166
- export interface ApplicationSpecification extends TeamSpecification {
167
- requirements: ApplicationRequirements;
168
- }
169
- export interface ApplicationRequirements {
170
- scope: 'global' | 'scoped';
171
- database: {
172
- tables: TableDefinition[];
173
- relationships: any[];
174
- };
175
- businessLogic: {
176
- rules: BusinessRuleDefinition[];
177
- scripts: ScriptDefinition[];
178
- };
179
- interface: {
180
- forms: FormDefinition[];
181
- lists: ListDefinition[];
182
- modules: ModuleDefinition[];
183
- };
184
- security: {
185
- roles: RoleDefinition[];
186
- acls: ACLDefinition[];
187
- };
188
- }
189
- export interface TableDefinition {
190
- name: string;
191
- label: string;
192
- fields: FieldDefinition[];
193
- extends?: string;
194
- }
195
- export interface FieldDefinition {
196
- name: string;
197
- label: string;
198
- type: string;
199
- required: boolean;
200
- reference?: string;
201
- }
202
- export interface BusinessRuleDefinition {
203
- name: string;
204
- table: string;
205
- when: string;
206
- script: string;
207
- }
208
- export interface ScriptDefinition {
209
- name: string;
210
- type: 'script_include' | 'client_script' | 'ui_script';
211
- script: string;
212
- }
213
- export interface FormDefinition {
214
- name: string;
215
- table: string;
216
- sections: any[];
217
- }
218
- export interface ListDefinition {
219
- name: string;
220
- table: string;
221
- fields: string[];
222
- }
223
- export interface ModuleDefinition {
224
- name: string;
225
- table: string;
226
- role?: string;
227
- }
228
- export interface RoleDefinition {
229
- name: string;
230
- description: string;
231
- contains?: string[];
232
- }
233
- export interface ACLDefinition {
234
- table: string;
235
- operation: string;
236
- roles: string[];
237
- }
238
- export interface TeamCoordinationStrategy {
239
- type: 'sequential' | 'parallel' | 'hybrid';
240
- dependencies: TeamDependency[];
241
- communication: CommunicationProtocol;
242
- }
243
- export interface TeamDependency {
244
- from: string;
245
- to: string;
246
- type: 'blocking' | 'data' | 'approval';
247
- }
248
- export interface CommunicationProtocol {
249
- channels: string[];
250
- updates: 'realtime' | 'periodic';
251
- notifications: boolean;
252
- }
253
- export interface AgentCapability {
254
- name: string;
255
- description: string;
256
- proficiency: number;
257
- tools: string[];
258
- }
259
- export interface SpecializationProfile {
260
- primary: string[];
261
- secondary: string[];
262
- tools: string[];
263
- experience: number;
264
- }
265
- //# sourceMappingURL=team-types.d.ts.map
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=team-types.js.map
@@ -1,61 +0,0 @@
1
- /**
2
- * Widget Architect Agent - Coordinates widget development team
3
- * Analyzes requirements and orchestrates specialized team members
4
- */
5
- import { BaseSnowAgent } from '../base-team';
6
- import { WidgetSpecification, WidgetRequirements, TeamResult } from '../team-types';
7
- import { ServiceNowAgentConfig } from '../../../types/servicenow.types';
8
- export declare class WidgetArchitectAgent extends BaseSnowAgent {
9
- private frontendAgent?;
10
- private backendAgent?;
11
- private uiuxAgent?;
12
- private platformAgent?;
13
- constructor(config: ServiceNowAgentConfig);
14
- /**
15
- * Set team members that this architect will coordinate
16
- */
17
- setTeamMembers(frontendAgent: BaseSnowAgent, backendAgent: BaseSnowAgent, uiuxAgent: BaseSnowAgent, platformAgent: BaseSnowAgent): void;
18
- /**
19
- * Analyze widget requirements and create technical specification
20
- */
21
- analyzeRequirements(requirements: WidgetRequirements): Promise<WidgetSpecification>;
22
- /**
23
- * Coordinate the entire widget development team
24
- */
25
- execute(specification: WidgetSpecification): Promise<TeamResult>;
26
- /**
27
- * Break down widget specification into specialized tasks
28
- */
29
- private createTaskBreakdown;
30
- /**
31
- * Coordinate team execution with proper dependency management
32
- */
33
- private coordinateTeam;
34
- /**
35
- * Integrate all components into final widget
36
- */
37
- private integrateComponents;
38
- /**
39
- * Deploy the integrated widget
40
- */
41
- private deployWidget;
42
- private assessComplexity;
43
- private estimateTime;
44
- private identifyDependencies;
45
- private determineLayout;
46
- private identifyComponents;
47
- private identifyClientEvents;
48
- private identifyApiCalls;
49
- private identifyDataProcessing;
50
- private identifyBusinessLogic;
51
- private requiresCaching;
52
- private identifyOptimizations;
53
- private identifyValidations;
54
- private identifyAuthorization;
55
- private determineUIPattern;
56
- private identifyWorkflows;
57
- private identifyFeedbackNeeds;
58
- private identifyPlatformDependencies;
59
- private identifyPermissions;
60
- }
61
- //# sourceMappingURL=widget-architect.agent.d.ts.map