snow-flow 3.0.9 → 3.0.10

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 (294) hide show
  1. package/claude-flow.bat +0 -0
  2. package/claude-flow.ps1 +0 -0
  3. package/dist/mcp/servicenow-automation-mcp.js +0 -0
  4. package/dist/mcp/servicenow-deployment-mcp.js +0 -0
  5. package/dist/mcp/servicenow-integration-mcp.js +0 -0
  6. package/dist/mcp/servicenow-mcp-server.js +0 -0
  7. package/dist/mcp/servicenow-operations-mcp.js +0 -0
  8. package/dist/mcp/servicenow-platform-development-mcp.js +0 -0
  9. package/dist/mcp/servicenow-progressive-indexer.js +0 -0
  10. package/dist/mcp/servicenow-reporting-analytics-mcp.js +133 -19
  11. package/dist/mcp/servicenow-security-compliance-mcp.js +0 -0
  12. package/dist/mcp/servicenow-update-set-mcp.js +0 -0
  13. package/dist/mcp/start-all-mcp-servers.js +0 -0
  14. package/dist/mcp/start-servicenow-mcp.js +0 -0
  15. package/memory/agents/README.md +1 -1
  16. package/memory/claude-flow-data.json +1 -1
  17. package/memory/sessions/README.md +1 -1
  18. package/package.json +2 -2
  19. package/.mcp.json +0 -22
  20. package/claude-flow.config.json +0 -20
  21. package/dist/agents/app-creator.agent.d.ts +0 -55
  22. package/dist/agents/app-creator.agent.js +0 -1292
  23. package/dist/agents/base/base-snow-agent.d.ts +0 -75
  24. package/dist/agents/base/base-snow-agent.js +0 -169
  25. package/dist/agents/base-snow-agent.d.ts +0 -63
  26. package/dist/agents/base-snow-agent.js +0 -296
  27. package/dist/agents/coordinator.d.ts +0 -200
  28. package/dist/agents/coordinator.js +0 -777
  29. package/dist/agents/flow-builder-agent.d.ts +0 -18
  30. package/dist/agents/flow-builder-agent.js +0 -197
  31. package/dist/agents/queen-403-handler.d.ts +0 -47
  32. package/dist/agents/queen-403-handler.js +0 -175
  33. package/dist/agents/queen-agent-example.d.ts +0 -23
  34. package/dist/agents/queen-agent-example.js +0 -240
  35. package/dist/agents/queen-agent.test.d.ts +0 -6
  36. package/dist/agents/script-generator.agent.d.ts +0 -32
  37. package/dist/agents/script-generator.agent.js +0 -772
  38. package/dist/agents/script-writer-agent.d.ts +0 -22
  39. package/dist/agents/script-writer-agent.js +0 -695
  40. package/dist/agents/security-agent.d.ts +0 -23
  41. package/dist/agents/security-agent.js +0 -619
  42. package/dist/agents/specialists/automation-specialist.agent.d.ts +0 -44
  43. package/dist/agents/specialists/automation-specialist.agent.js +0 -204
  44. package/dist/agents/specialists/data-specialist.agent.d.ts +0 -165
  45. package/dist/agents/specialists/data-specialist.agent.js +0 -484
  46. package/dist/agents/specialists/integration-specialist.agent.d.ts +0 -227
  47. package/dist/agents/specialists/integration-specialist.agent.js +0 -725
  48. package/dist/agents/specialists/reporting-specialist.agent.d.ts +0 -54
  49. package/dist/agents/specialists/reporting-specialist.agent.js +0 -193
  50. package/dist/agents/specialists/security-specialist.agent.d.ts +0 -85
  51. package/dist/agents/specialists/security-specialist.agent.js +0 -309
  52. package/dist/agents/teams/adaptive/adaptive-coordinator.agent.d.ts +0 -111
  53. package/dist/agents/teams/adaptive/adaptive-coordinator.agent.js +0 -383
  54. package/dist/agents/teams/base-team.d.ts +0 -72
  55. package/dist/agents/teams/base-team.js +0 -253
  56. package/dist/agents/teams/team-types.d.ts +0 -265
  57. package/dist/agents/teams/team-types.js +0 -3
  58. package/dist/agents/teams/widget/widget-architect.agent.d.ts +0 -61
  59. package/dist/agents/teams/widget/widget-architect.agent.js +0 -436
  60. package/dist/agents/teams/widget/widget-backend.agent.d.ts +0 -74
  61. package/dist/agents/teams/widget/widget-backend.agent.js +0 -1531
  62. package/dist/agents/teams/widget/widget-frontend.agent.d.ts +0 -67
  63. package/dist/agents/teams/widget/widget-frontend.agent.js +0 -1014
  64. package/dist/agents/teams/widget/widget-platform.agent.d.ts +0 -90
  65. package/dist/agents/teams/widget/widget-platform.agent.js +0 -1190
  66. package/dist/agents/teams/widget/widget-uiux.agent.d.ts +0 -107
  67. package/dist/agents/teams/widget/widget-uiux.agent.js +0 -1033
  68. package/dist/agents/test-agent.d.ts +0 -26
  69. package/dist/agents/test-agent.js +0 -734
  70. package/dist/agents/test-agents.d.ts +0 -7
  71. package/dist/agents/test-agents.js +0 -64
  72. package/dist/agents/ui-builder.agent.d.ts +0 -50
  73. package/dist/agents/ui-builder.agent.js +0 -1539
  74. package/dist/agents/widget-builder.agent.d.ts +0 -32
  75. package/dist/agents/widget-builder.agent.js +0 -439
  76. package/dist/agents/widget-creator-agent.d.ts +0 -18
  77. package/dist/agents/widget-creator-agent.js +0 -498
  78. package/dist/agents/workflow-designer.agent.d.ts +0 -31
  79. package/dist/agents/workflow-designer.agent.js +0 -583
  80. package/dist/api/error-handling.d.ts +0 -325
  81. package/dist/api/error-handling.js +0 -1488
  82. package/dist/api/flow-designer-api.d.ts +0 -167
  83. package/dist/api/flow-designer-api.js +0 -554
  84. package/dist/api/natural-language-mapper.d.ts +0 -124
  85. package/dist/api/natural-language-mapper.js +0 -501
  86. package/dist/api/performance-optimizer.d.ts +0 -240
  87. package/dist/api/performance-optimizer.js +0 -706
  88. package/dist/api/transaction-manager.d.ts +0 -189
  89. package/dist/api/transaction-manager.js +0 -576
  90. package/dist/assembly/team-assembler.d.ts +0 -140
  91. package/dist/assembly/team-assembler.js +0 -502
  92. package/dist/benchmark-performance.d.ts +0 -41
  93. package/dist/benchmark-performance.js +0 -230
  94. package/dist/cli/snow-flow-cli-integration.d.ts +0 -30
  95. package/dist/cli/snow-flow-cli-integration.js +0 -396
  96. package/dist/coordination/coordination-engine.d.ts +0 -41
  97. package/dist/coordination/coordination-engine.js +0 -324
  98. package/dist/coordination/coordination.test.d.ts +0 -6
  99. package/dist/coordination/example.d.ts +0 -31
  100. package/dist/coordination/example.js +0 -394
  101. package/dist/coordination/execution-patterns.d.ts +0 -43
  102. package/dist/coordination/execution-patterns.js +0 -507
  103. package/dist/coordination/factory.d.ts +0 -94
  104. package/dist/coordination/factory.js +0 -433
  105. package/dist/coordination/index.d.ts +0 -71
  106. package/dist/coordination/index.js +0 -135
  107. package/dist/coordination/progress-monitor.d.ts +0 -71
  108. package/dist/coordination/progress-monitor.js +0 -505
  109. package/dist/coordination/quality-gates.d.ts +0 -124
  110. package/dist/coordination/quality-gates.js +0 -577
  111. package/dist/coordination/shared-memory.d.ts +0 -39
  112. package/dist/coordination/shared-memory.js +0 -289
  113. package/dist/coordination/task-dependencies.d.ts +0 -50
  114. package/dist/coordination/task-dependencies.js +0 -407
  115. package/dist/coordination/team-coordinator.d.ts +0 -59
  116. package/dist/coordination/team-coordinator.js +0 -550
  117. package/dist/coordination/types.d.ts +0 -152
  118. package/dist/coordination/types.js +0 -3
  119. package/dist/mcp/mcp-wrapper.d.ts +0 -8
  120. package/dist/mcp/mcp-wrapper.js +0 -77
  121. package/dist/mcp/servicenow-flow-composer-enhanced.js +0 -396
  122. package/dist/mcp/servicenow-flow-composer-mcp.d.ts +0 -7
  123. package/dist/mcp/servicenow-flow-composer-mcp.js +0 -3103
  124. package/dist/mcp/servicenow-graph-memory-mcp.d.ts +0 -7
  125. package/dist/mcp/servicenow-intelligent-mcp.d.ts +0 -143
  126. package/dist/mcp/servicenow-intelligent-mcp.js +0 -4156
  127. package/dist/mcp/servicenow-xml-flow-mcp.d.ts +0 -53
  128. package/dist/mcp/servicenow-xml-flow-mcp.js +0 -1704
  129. package/dist/mcp/singleton-check.js +0 -31
  130. package/dist/mcp/test-simple-mcp.d.ts +0 -6
  131. package/dist/mcp/test-simple-mcp.js +0 -63
  132. package/dist/memory/hierarchical-memory-system.d.ts +0 -90
  133. package/dist/memory/hierarchical-memory-system.js +0 -400
  134. package/dist/memory/index.d.ts +0 -9
  135. package/dist/memory/index.js +0 -20
  136. package/dist/memory/mcp-integration-example.d.ts +0 -6
  137. package/dist/memory/mcp-integration-example.js +0 -281
  138. package/dist/memory/memory-client.d.ts +0 -199
  139. package/dist/memory/memory-client.js +0 -364
  140. package/dist/memory/memory-manager.d.ts +0 -29
  141. package/dist/memory/memory-manager.js +0 -280
  142. package/dist/memory/memory-operations.d.ts +0 -179
  143. package/dist/memory/memory-operations.js +0 -691
  144. package/dist/memory/memory-system.d.ts +0 -153
  145. package/dist/memory/memory-system.js +0 -651
  146. package/dist/memory/memory-test.d.ts +0 -6
  147. package/dist/memory/memory-test.js +0 -161
  148. package/dist/memory/snow-flow-memory-patterns.d.ts +0 -213
  149. package/dist/memory/snow-flow-memory-patterns.js +0 -200
  150. package/dist/memory/snow-memory.d.ts +0 -54
  151. package/dist/memory/snow-memory.js +0 -301
  152. package/dist/memory/swarm-memory.d.ts +0 -135
  153. package/dist/memory/swarm-memory.js +0 -378
  154. package/dist/optimization/flow-performance-optimizer.js +0 -723
  155. package/dist/orchestration/discovery/service-discovery.d.ts +0 -81
  156. package/dist/orchestration/discovery/service-discovery.js +0 -808
  157. package/dist/orchestration/distributed-orchestrator.d.ts +0 -131
  158. package/dist/orchestration/distributed-orchestrator.js +0 -712
  159. package/dist/orchestration/distribution/task-distribution-engine.d.ts +0 -53
  160. package/dist/orchestration/distribution/task-distribution-engine.js +0 -586
  161. package/dist/orchestration/flow-update-orchestrator.js +0 -648
  162. package/dist/orchestration/interfaces/distributed-orchestration.interface.d.ts +0 -606
  163. package/dist/orchestration/interfaces/distributed-orchestration.interface.js +0 -65
  164. package/dist/orchestration/protocols/mcpx-protocol.d.ts +0 -71
  165. package/dist/orchestration/protocols/mcpx-protocol.js +0 -668
  166. package/dist/orchestration/state/distributed-state-manager.d.ts +0 -89
  167. package/dist/orchestration/state/distributed-state-manager.js +0 -716
  168. package/dist/orchestrator/flow-composer.d.ts +0 -105
  169. package/dist/orchestrator/flow-composer.js +0 -404
  170. package/dist/orchestrator/flow-pattern-templates.d.ts +0 -260
  171. package/dist/orchestrator/flow-pattern-templates.js +0 -908
  172. package/dist/orchestrator/flow-subflow-decision-engine.d.ts +0 -202
  173. package/dist/orchestrator/flow-subflow-decision-engine.js +0 -769
  174. package/dist/orchestrator/flow-validation-engine.d.ts +0 -169
  175. package/dist/orchestrator/flow-validation-engine.js +0 -913
  176. package/dist/orchestrator/snow-orchestrator.d.ts +0 -49
  177. package/dist/orchestrator/snow-orchestrator.js +0 -235
  178. package/dist/orchestrator/subflow-creation-handler.d.ts +0 -230
  179. package/dist/orchestrator/subflow-creation-handler.js +0 -791
  180. package/dist/patterns/adaptive-patterns.d.ts +0 -140
  181. package/dist/patterns/adaptive-patterns.js +0 -549
  182. package/dist/queen/advanced-integration-test.d.ts +0 -48
  183. package/dist/queen/advanced-integration-test.js +0 -473
  184. package/dist/queen/integration-example.d.ts +0 -82
  185. package/dist/queen/integration-example.js +0 -219
  186. package/dist/queen/integration-test.d.ts +0 -72
  187. package/dist/queen/integration-test.js +0 -563
  188. package/dist/queen/mock-mcp-client.d.ts +0 -71
  189. package/dist/queen/mock-mcp-client.js +0 -317
  190. package/dist/queen/run-integration-tests.d.ts +0 -9
  191. package/dist/queen/run-integration-tests.js +0 -27
  192. package/dist/sparc/coordinators/adaptive-coordinator.d.ts +0 -54
  193. package/dist/sparc/coordinators/adaptive-coordinator.js +0 -367
  194. package/dist/sparc/coordinators/team-coordinator.d.ts +0 -66
  195. package/dist/sparc/coordinators/team-coordinator.js +0 -402
  196. package/dist/sparc/modes/team-modes.d.ts +0 -33
  197. package/dist/sparc/modes/team-modes.js +0 -399
  198. package/dist/sparc/teams/application-team.d.ts +0 -73
  199. package/dist/sparc/teams/application-team.js +0 -463
  200. package/dist/sparc/teams/flow-team.d.ts +0 -67
  201. package/dist/sparc/teams/flow-team.js +0 -373
  202. package/dist/sparc/teams/widget-team.d.ts +0 -61
  203. package/dist/sparc/teams/widget-team.js +0 -280
  204. package/dist/specialists/app-specialists.d.ts +0 -93
  205. package/dist/specialists/app-specialists.js +0 -1639
  206. package/dist/specialists/base-specialist.d.ts +0 -19
  207. package/dist/specialists/base-specialist.js +0 -54
  208. package/dist/specialists/flow-specialists.d.ts +0 -113
  209. package/dist/specialists/flow-specialists.js +0 -1787
  210. package/dist/specialists/individual-specialists.d.ts +0 -67
  211. package/dist/specialists/individual-specialists.js +0 -632
  212. package/dist/specialists/widget-specialists.d.ts +0 -70
  213. package/dist/specialists/widget-specialists.js +0 -1264
  214. package/dist/src/utils/agent-detector.js +0 -655
  215. package/dist/teams/adaptive-team.d.ts +0 -81
  216. package/dist/teams/adaptive-team.js +0 -1153
  217. package/dist/teams/application-team.d.ts +0 -30
  218. package/dist/teams/application-team.js +0 -547
  219. package/dist/teams/base-team.d.ts +0 -55
  220. package/dist/teams/base-team.js +0 -243
  221. package/dist/teams/flow-team.d.ts +0 -28
  222. package/dist/teams/flow-team.js +0 -525
  223. package/dist/teams/widget-team.d.ts +0 -26
  224. package/dist/teams/widget-team.js +0 -459
  225. package/dist/templates/flow-template-system.js +0 -625
  226. package/dist/test-fetch-incidents.d.ts +0 -2
  227. package/dist/test-fetch-incidents.js +0 -84
  228. package/dist/test-incident-access.d.ts +0 -2
  229. package/dist/test-incident-access.js +0 -72
  230. package/dist/test-iphone-flow.js +0 -189
  231. package/dist/test-limit-problem.d.ts +0 -2
  232. package/dist/test-limit-problem.js +0 -60
  233. package/dist/test-ml-batch-fix.d.ts +0 -2
  234. package/dist/test-ml-batch-fix.js +0 -104
  235. package/dist/test-ml-batch.d.ts +0 -2
  236. package/dist/test-ml-batch.js +0 -87
  237. package/dist/test-ml-query.d.ts +0 -2
  238. package/dist/test-ml-query.js +0 -100
  239. package/dist/test-ml-training-fix.d.ts +0 -12
  240. package/dist/test-ml-training-fix.js +0 -113
  241. package/dist/test-ml-training.d.ts +0 -2
  242. package/dist/test-ml-training.js +0 -32
  243. package/dist/test-operations-query.d.ts +0 -2
  244. package/dist/test-operations-query.js +0 -84
  245. package/dist/test-performance-query.d.ts +0 -2
  246. package/dist/test-performance-query.js +0 -52
  247. package/dist/test-singleton-protection.d.ts +0 -8
  248. package/dist/test-singleton-protection.js +0 -110
  249. package/dist/test-smart-limits.d.ts +0 -13
  250. package/dist/test-smart-limits.js +0 -100
  251. package/dist/test-snow-query-incidents.d.ts +0 -2
  252. package/dist/test-snow-query-incidents.js +0 -66
  253. package/dist/test-universal-query.d.ts +0 -2
  254. package/dist/test-universal-query.js +0 -106
  255. package/dist/testing/flow-testing-automation.js +0 -641
  256. package/dist/utils/complete-flow-xml-generator.js +0 -1285
  257. package/dist/utils/file-storage-fallback.d.ts +0 -62
  258. package/dist/utils/file-storage-fallback.js +0 -289
  259. package/dist/utils/flow-api-discovery.d.ts +0 -151
  260. package/dist/utils/flow-api-discovery.js +0 -439
  261. package/dist/utils/flow-examples.js +0 -720
  262. package/dist/utils/flow-structure-builder.js +0 -677
  263. package/dist/utils/flow-xml-generator.d.ts +0 -41
  264. package/dist/utils/flow-xml-generator.js +0 -258
  265. package/dist/utils/improved-flow-xml-generator.js +0 -820
  266. package/dist/utils/mcp-process-manager.backup.d.ts +0 -58
  267. package/dist/utils/mcp-process-manager.backup.js +0 -220
  268. package/dist/utils/mcp-singleton-enforcer.d.ts +0 -36
  269. package/dist/utils/mcp-singleton-enforcer.js +0 -201
  270. package/dist/utils/mcp-timeout-fix.d.ts +0 -53
  271. package/dist/utils/mcp-timeout-fix.js +0 -221
  272. package/dist/utils/migrate-claude-flow.d.ts +0 -22
  273. package/dist/utils/migrate-claude-flow.js +0 -120
  274. package/dist/utils/scope-utils.d.ts +0 -72
  275. package/dist/utils/scope-utils.js +0 -386
  276. package/dist/utils/snow-oauth-old.d.ts +0 -65
  277. package/dist/utils/snow-oauth-old.js +0 -345
  278. package/dist/utils/xml-first-flow-generator.js +0 -513
  279. package/memory/servicenow_artifacts/000d9224c895221055906c7518aa2d3d.json +0 -30
  280. package/memory/servicenow_artifacts/0196b66173303010e46b4a2214f6a7a2.json +0 -36
  281. package/memory/servicenow_artifacts/125e5d1d837e2a102a7ea130ceaad397.json +0 -30
  282. package/memory/servicenow_artifacts/7637c1f2b7112210a5e5911cde11a972.json +0 -30
  283. package/memory/servicenow_artifacts/default_documentation_tables_1754056582292.json +0 -55
  284. package/memory/servicenow_artifacts/default_documentation_tables_1754057477189.json +0 -55
  285. package/memory/update-set-sessions/01f82af583faea102a7ea130ceaad3d4.json +0 -9
  286. package/memory/update-set-sessions/27718fb983faea102a7ea130ceaad34b.json +0 -9
  287. package/memory/update-set-sessions/412e9bf6833e22502a7ea130ceaad30a.json +0 -8
  288. package/memory/update-set-sessions/66fc5a79837aea102a7ea130ceaad3ab.json +0 -9
  289. package/memory/update-set-sessions/71a30ff5837eea102a7ea130ceaad37f.json +0 -9
  290. package/memory/update-set-sessions/74fba27983faea102a7ea130ceaad3bd.json +0 -9
  291. package/memory/update-set-sessions/a0b147b5837eea102a7ea130ceaad344.json +0 -58
  292. package/memory/update-set-sessions/b13f5eb983baea102a7ea130ceaad33e.json +0 -9
  293. package/reports/swarm-auto-centralized-1752649029776.json +0 -13
  294. package/src/memory/README.md +0 -240
@@ -1,459 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WidgetTeam = void 0;
4
- const base_team_js_1 = require("./base-team.js");
5
- const widget_specialists_js_1 = require("../specialists/widget-specialists.js");
6
- class WidgetTeam extends base_team_js_1.BaseTeam {
7
- constructor(options = { sharedMemory: true, validation: true, parallel: false, monitor: false }) {
8
- super(options);
9
- }
10
- initializeTeam() {
11
- this.members = [
12
- {
13
- name: 'Alex Frontend',
14
- role: 'Frontend Developer',
15
- expertise: ['HTML', 'CSS', 'JavaScript', 'Responsive Design', 'Accessibility'],
16
- execute: async (task, context) => {
17
- const specialist = new widget_specialists_js_1.FrontendSpecialist(this.options);
18
- return await specialist.execute(task.description, context);
19
- }
20
- },
21
- {
22
- name: 'Sam Backend',
23
- role: 'Backend Developer',
24
- expertise: ['Server Scripts', 'GlideRecord', 'REST APIs', 'Performance', 'Caching'],
25
- execute: async (task, context) => {
26
- const specialist = new widget_specialists_js_1.BackendSpecialist(this.options);
27
- return await specialist.execute(task.description, context);
28
- }
29
- },
30
- {
31
- name: 'Jordan UX',
32
- role: 'UI/UX Designer',
33
- expertise: ['User Experience', 'Design Systems', 'Accessibility', 'Usability'],
34
- execute: async (task, context) => {
35
- const specialist = new widget_specialists_js_1.UIUXSpecialist(this.options);
36
- return await specialist.execute(task.description, context);
37
- }
38
- },
39
- {
40
- name: 'Taylor Platform',
41
- role: 'ServiceNow Specialist',
42
- expertise: ['Platform Integration', 'Best Practices', 'Security', 'Update Sets'],
43
- execute: async (task, context) => {
44
- const specialist = new widget_specialists_js_1.ServiceNowSpecialist(this.options);
45
- return await specialist.execute(task.description, context);
46
- }
47
- },
48
- {
49
- name: 'Casey QA',
50
- role: 'QA Specialist',
51
- expertise: ['Testing', 'Quality Assurance', 'Automation', 'Validation'],
52
- execute: async (task, context) => {
53
- const specialist = new widget_specialists_js_1.QASpecialist(this.options);
54
- return await specialist.execute(task.description, context);
55
- }
56
- }
57
- ];
58
- // Initialize widget-specific quality gates
59
- this.initializeWidgetQualityGates();
60
- }
61
- async execute(task) {
62
- console.log(`\n🎨 Widget Development Team Activated`);
63
- console.log(`📋 Mission: ${task}`);
64
- return await this.executeWithCoordination(task);
65
- }
66
- async analyzeRequirements(task) {
67
- console.log(`\n🔍 Widget Team: Analyzing requirements...`);
68
- const complexity = this.assessComplexity(task);
69
- const components = this.identifyComponents(task);
70
- const widgetType = this.identifyWidgetType(task);
71
- const features = this.identifyRequiredFeatures(task);
72
- const requirements = {
73
- task,
74
- complexity,
75
- components,
76
- widgetType,
77
- features,
78
- coordination: this.determineCoordinationPattern(complexity, components),
79
- estimatedTime: this.estimateProjectTime(complexity, features),
80
- risks: this.identifyRisks(task),
81
- dependencies: this.findDependencies(task)
82
- };
83
- console.log(` Widget Type: ${widgetType}`);
84
- console.log(` Complexity: ${complexity}`);
85
- console.log(` Components: ${components.join(', ')}`);
86
- console.log(` Coordination: ${requirements.coordination}`);
87
- return requirements;
88
- }
89
- async createTaskBreakdown(requirements) {
90
- console.log(`\n📋 Widget Team: Creating task breakdown...`);
91
- const tasks = [];
92
- // Always start with UX analysis for widgets
93
- tasks.push({
94
- id: 'ux_analysis',
95
- description: `Analyze user experience requirements for ${requirements.widgetType} widget`,
96
- assignedTo: this.getMemberByRole('UI/UX Designer'),
97
- dependencies: [],
98
- priority: 'high',
99
- estimatedTime: '30 min'
100
- });
101
- // Platform analysis in parallel or after UX
102
- tasks.push({
103
- id: 'platform_analysis',
104
- description: `Analyze ServiceNow platform requirements and deployment strategy`,
105
- assignedTo: this.getMemberByRole('ServiceNow Specialist'),
106
- dependencies: requirements.coordination === 'sequential' ? ['ux_analysis'] : [],
107
- priority: 'high',
108
- estimatedTime: '30 min'
109
- });
110
- // Backend development
111
- tasks.push({
112
- id: 'backend_development',
113
- description: `Develop server scripts and data access for ${requirements.widgetType}`,
114
- assignedTo: this.getMemberByRole('Backend Developer'),
115
- dependencies: ['platform_analysis'],
116
- priority: 'high',
117
- estimatedTime: this.estimateBackendTime(requirements)
118
- });
119
- // Frontend development
120
- tasks.push({
121
- id: 'frontend_development',
122
- description: `Create HTML templates, CSS styles, and client scripts for ${requirements.widgetType}`,
123
- assignedTo: this.getMemberByRole('Frontend Developer'),
124
- dependencies: ['ux_analysis', 'backend_development'],
125
- priority: 'high',
126
- estimatedTime: this.estimateFrontendTime(requirements)
127
- });
128
- // Integration and testing
129
- tasks.push({
130
- id: 'integration_testing',
131
- description: `Integrate components and perform comprehensive testing`,
132
- assignedTo: this.getMemberByRole('QA Specialist'),
133
- dependencies: ['frontend_development', 'backend_development'],
134
- priority: 'medium',
135
- estimatedTime: '45 min'
136
- });
137
- // Final validation by platform specialist
138
- tasks.push({
139
- id: 'platform_validation',
140
- description: `Validate deployment readiness and best practices compliance`,
141
- assignedTo: this.getMemberByRole('ServiceNow Specialist'),
142
- dependencies: ['integration_testing'],
143
- priority: 'medium',
144
- estimatedTime: '20 min'
145
- });
146
- console.log(` Created ${tasks.length} specialized tasks`);
147
- tasks.forEach(task => {
148
- console.log(` ${task.assignedTo.role}: ${task.description} (${task.estimatedTime})`);
149
- });
150
- return tasks;
151
- }
152
- async integrateResults(results) {
153
- console.log(`\n🔗 Widget Team: Integrating all specialist deliverables...`);
154
- const integration = {
155
- teamType: 'Widget Development Team',
156
- task: this.sharedContext.get('task'),
157
- timestamp: new Date(),
158
- specialists: {},
159
- finalDeliverable: {},
160
- qualityMetrics: {},
161
- deploymentPackage: {}
162
- };
163
- // Organize results by specialist role
164
- for (const result of results) {
165
- if (result.status === 'success' && result.result) {
166
- const specialist = result.result.specialist;
167
- integration.specialists[specialist] = result.result;
168
- }
169
- }
170
- // Create integrated widget deliverable
171
- integration.finalDeliverable = await this.createWidgetDeliverable(integration.specialists);
172
- // Calculate quality metrics
173
- integration.qualityMetrics = await this.calculateQualityMetrics(results);
174
- // Prepare deployment package
175
- integration.deploymentPackage = await this.prepareDeploymentPackage(integration.finalDeliverable);
176
- console.log(`✅ Widget integration completed successfully`);
177
- console.log(` Components: ${Object.keys(integration.specialists).length} specialists contributed`);
178
- console.log(` Quality Score: ${integration.qualityMetrics.overallScore}/100`);
179
- return integration;
180
- }
181
- identifyWidgetType(task) {
182
- const lowerTask = task.toLowerCase();
183
- if (lowerTask.includes('dashboard') || lowerTask.includes('chart') || lowerTask.includes('kpi')) {
184
- return 'dashboard';
185
- }
186
- else if (lowerTask.includes('form') || lowerTask.includes('input') || lowerTask.includes('submit')) {
187
- return 'form';
188
- }
189
- else if (lowerTask.includes('list') || lowerTask.includes('table') || lowerTask.includes('grid')) {
190
- return 'list';
191
- }
192
- else if (lowerTask.includes('filter') || lowerTask.includes('search')) {
193
- return 'filter';
194
- }
195
- else if (lowerTask.includes('report') || lowerTask.includes('analytics')) {
196
- return 'reporting';
197
- }
198
- return 'display';
199
- }
200
- identifyRequiredFeatures(task) {
201
- const features = [];
202
- const lowerTask = task.toLowerCase();
203
- if (lowerTask.includes('responsive') || lowerTask.includes('mobile')) {
204
- features.push('responsive_design');
205
- }
206
- if (lowerTask.includes('realtime') || lowerTask.includes('live')) {
207
- features.push('real_time_updates');
208
- }
209
- if (lowerTask.includes('chart') || lowerTask.includes('graph')) {
210
- features.push('data_visualization');
211
- }
212
- if (lowerTask.includes('filter') || lowerTask.includes('search')) {
213
- features.push('filtering');
214
- }
215
- if (lowerTask.includes('sort') || lowerTask.includes('order')) {
216
- features.push('sorting');
217
- }
218
- if (lowerTask.includes('export') || lowerTask.includes('download')) {
219
- features.push('data_export');
220
- }
221
- if (lowerTask.includes('print')) {
222
- features.push('print_support');
223
- }
224
- return features;
225
- }
226
- determineCoordinationPattern(complexity, components) {
227
- if (complexity === 'complex' || components.length > 3) {
228
- return 'hybrid'; // Mix of sequential and parallel
229
- }
230
- else if (complexity === 'moderate') {
231
- return 'parallel'; // Most tasks can run in parallel
232
- }
233
- return 'sequential'; // Simple linear workflow
234
- }
235
- estimateProjectTime(complexity, features) {
236
- const baseTime = {
237
- 'simple': 60,
238
- 'moderate': 120,
239
- 'complex': 180
240
- };
241
- const featureTime = features.length * 15; // 15 min per feature
242
- const totalMinutes = baseTime[complexity] + featureTime;
243
- if (totalMinutes < 60) {
244
- return `${totalMinutes} minutes`;
245
- }
246
- else {
247
- const hours = Math.floor(totalMinutes / 60);
248
- const minutes = totalMinutes % 60;
249
- return minutes > 0 ? `${hours}h ${minutes}m` : `${hours}h`;
250
- }
251
- }
252
- identifyRisks(task) {
253
- const risks = [];
254
- const lowerTask = task.toLowerCase();
255
- if (lowerTask.includes('complex') || lowerTask.includes('advanced')) {
256
- risks.push('implementation_complexity');
257
- }
258
- if (lowerTask.includes('performance') || lowerTask.includes('large')) {
259
- risks.push('performance_requirements');
260
- }
261
- if (lowerTask.includes('integration') || lowerTask.includes('api')) {
262
- risks.push('external_dependencies');
263
- }
264
- if (lowerTask.includes('realtime')) {
265
- risks.push('real_time_synchronization');
266
- }
267
- return risks;
268
- }
269
- estimateBackendTime(requirements) {
270
- const baseTime = requirements.complexity === 'complex' ? 45 : 30;
271
- const featureTime = requirements.features.length * 5;
272
- return `${baseTime + featureTime} min`;
273
- }
274
- estimateFrontendTime(requirements) {
275
- const baseTime = requirements.complexity === 'complex' ? 60 : 45;
276
- const featureTime = requirements.features.length * 8;
277
- return `${baseTime + featureTime} min`;
278
- }
279
- getMemberByRole(role) {
280
- const member = this.members.find(m => m.role === role);
281
- if (!member) {
282
- throw new Error(`No team member found with role: ${role}`);
283
- }
284
- return member;
285
- }
286
- async createWidgetDeliverable(specialists) {
287
- const deliverable = {
288
- type: 'ServiceNow Widget',
289
- timestamp: new Date(),
290
- components: {}
291
- };
292
- // Frontend components
293
- if (specialists['Frontend Developer']) {
294
- deliverable.components.frontend = {
295
- template: specialists['Frontend Developer'].deliverables?.template || '',
296
- styles: specialists['Frontend Developer'].deliverables?.styles || '',
297
- clientScript: specialists['Frontend Developer'].deliverables?.clientScript || ''
298
- };
299
- }
300
- // Backend components
301
- if (specialists['Backend Developer']) {
302
- deliverable.components.backend = {
303
- serverScript: specialists['Backend Developer'].deliverables?.serverScript || '',
304
- dataAccess: specialists['Backend Developer'].deliverables?.dataAccess || {},
305
- optimizations: specialists['Backend Developer'].deliverables?.optimizations || {}
306
- };
307
- }
308
- // UX specifications
309
- if (specialists['UI/UX Designer']) {
310
- deliverable.components.ux = specialists['UI/UX Designer'].deliverables?.uxDesign || {};
311
- }
312
- // Platform configuration
313
- if (specialists['ServiceNow Specialist']) {
314
- deliverable.components.platform = {
315
- integrationStrategy: specialists['ServiceNow Specialist'].deliverables?.integrationStrategy || {},
316
- deploymentStrategy: specialists['ServiceNow Specialist'].deliverables?.deploymentStrategy || {}
317
- };
318
- }
319
- // Testing artifacts
320
- if (specialists['QA Specialist']) {
321
- deliverable.components.testing = {
322
- testPlan: specialists['QA Specialist'].deliverables?.testPlan || {},
323
- testCases: specialists['QA Specialist'].deliverables?.testCases || []
324
- };
325
- }
326
- return deliverable;
327
- }
328
- async calculateQualityMetrics(results) {
329
- const successfulTasks = results.filter(r => r.status === 'success').length;
330
- const totalTasks = results.length;
331
- const completionRate = (successfulTasks / totalTasks) * 100;
332
- // Calculate component quality scores
333
- const qualityFactors = {
334
- completeness: completionRate,
335
- codeQuality: 85, // Would be calculated from actual code analysis
336
- testCoverage: 90, // Would be calculated from test results
337
- performance: 88, // Would be measured from performance tests
338
- accessibility: 92, // Would be validated through a11y tools
339
- security: 90 // Would be assessed through security scans
340
- };
341
- const overallScore = Object.values(qualityFactors).reduce((sum, score) => sum + score, 0) / Object.keys(qualityFactors).length;
342
- return {
343
- overallScore: Math.round(overallScore),
344
- factors: qualityFactors,
345
- completionRate,
346
- recommendations: this.generateQualityRecommendations(qualityFactors)
347
- };
348
- }
349
- generateQualityRecommendations(factors) {
350
- const recommendations = [];
351
- if (factors.completeness < 90) {
352
- recommendations.push('Complete remaining development tasks');
353
- }
354
- if (factors.codeQuality < 85) {
355
- recommendations.push('Refactor code for better quality');
356
- }
357
- if (factors.testCoverage < 80) {
358
- recommendations.push('Increase test coverage');
359
- }
360
- if (factors.performance < 85) {
361
- recommendations.push('Optimize performance bottlenecks');
362
- }
363
- if (factors.accessibility < 90) {
364
- recommendations.push('Improve accessibility compliance');
365
- }
366
- if (factors.security < 90) {
367
- recommendations.push('Address security vulnerabilities');
368
- }
369
- return recommendations;
370
- }
371
- async prepareDeploymentPackage(deliverable) {
372
- return {
373
- widgetDefinition: {
374
- name: this.generateWidgetName(),
375
- title: this.generateWidgetTitle(),
376
- description: 'Generated by Widget Development Team',
377
- template: deliverable.components?.frontend?.template || '',
378
- css: deliverable.components?.frontend?.styles || '',
379
- client_script: deliverable.components?.frontend?.clientScript || '',
380
- server_script: deliverable.components?.backend?.serverScript || '',
381
- demo_data: this.generateDemoData()
382
- },
383
- deploymentInstructions: {
384
- updateSet: 'Create new update set before deployment',
385
- testing: 'Execute test plan before going live',
386
- rollback: 'Keep backup of previous version'
387
- },
388
- qualityAssurance: {
389
- checklist: [
390
- 'All tests passing',
391
- 'Performance benchmarks met',
392
- 'Accessibility standards complied',
393
- 'Security review completed'
394
- ]
395
- }
396
- };
397
- }
398
- generateWidgetName() {
399
- const task = this.sharedContext.get('task') || 'custom_widget';
400
- return task.toLowerCase().replace(/[^a-z0-9]/g, '_').substring(0, 40);
401
- }
402
- generateWidgetTitle() {
403
- const task = this.sharedContext.get('task') || 'Custom Widget';
404
- return task.charAt(0).toUpperCase() + task.slice(1);
405
- }
406
- generateDemoData() {
407
- return {
408
- title: 'Demo Widget',
409
- message: 'This is a demonstration of the widget functionality',
410
- items: [
411
- { name: 'Sample Item 1', value: '100' },
412
- { name: 'Sample Item 2', value: '200' },
413
- { name: 'Sample Item 3', value: '150' }
414
- ]
415
- };
416
- }
417
- initializeWidgetQualityGates() {
418
- // Add widget-specific quality gates
419
- this.qualityGates.push({
420
- name: 'Frontend code validation',
421
- check: async (results) => {
422
- const frontendResult = results.find(r => r.result?.specialist === 'Frontend Developer');
423
- return frontendResult?.status === 'success' && frontendResult.result?.deliverables?.template;
424
- },
425
- onFailure: async (results) => {
426
- console.log('❌ Frontend validation failed - missing or invalid template');
427
- }
428
- }, {
429
- name: 'Backend script validation',
430
- check: async (results) => {
431
- const backendResult = results.find(r => r.result?.specialist === 'Backend Developer');
432
- return backendResult?.status === 'success' && backendResult.result?.deliverables?.serverScript;
433
- },
434
- onFailure: async (results) => {
435
- console.log('❌ Backend validation failed - missing or invalid server script');
436
- }
437
- }, {
438
- name: 'UX design completeness',
439
- check: async (results) => {
440
- const uxResult = results.find(r => r.result?.specialist === 'UI/UX Designer');
441
- return uxResult?.status === 'success' && uxResult.result?.deliverables?.uxDesign;
442
- }
443
- }, {
444
- name: 'Platform compliance',
445
- check: async (results) => {
446
- const platformResult = results.find(r => r.result?.specialist === 'ServiceNow Specialist');
447
- return platformResult?.status === 'success' && platformResult.result?.deliverables?.integrationStrategy;
448
- }
449
- }, {
450
- name: 'Quality assurance passed',
451
- check: async (results) => {
452
- const qaResult = results.find(r => r.result?.specialist === 'QA Specialist');
453
- return qaResult?.status === 'success' && qaResult.result?.deliverables?.testPlan;
454
- }
455
- });
456
- }
457
- }
458
- exports.WidgetTeam = WidgetTeam;
459
- //# sourceMappingURL=widget-team.js.map