snow-flow 3.0.8 → 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 (295) 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/dist/utils/snow-oauth.js +53 -16
  16. package/memory/agents/README.md +1 -1
  17. package/memory/claude-flow-data.json +1 -1
  18. package/memory/sessions/README.md +1 -1
  19. package/package.json +2 -2
  20. package/.mcp.json +0 -22
  21. package/claude-flow.config.json +0 -20
  22. package/dist/agents/app-creator.agent.d.ts +0 -55
  23. package/dist/agents/app-creator.agent.js +0 -1292
  24. package/dist/agents/base/base-snow-agent.d.ts +0 -75
  25. package/dist/agents/base/base-snow-agent.js +0 -169
  26. package/dist/agents/base-snow-agent.d.ts +0 -63
  27. package/dist/agents/base-snow-agent.js +0 -296
  28. package/dist/agents/coordinator.d.ts +0 -200
  29. package/dist/agents/coordinator.js +0 -777
  30. package/dist/agents/flow-builder-agent.d.ts +0 -18
  31. package/dist/agents/flow-builder-agent.js +0 -197
  32. package/dist/agents/queen-403-handler.d.ts +0 -47
  33. package/dist/agents/queen-403-handler.js +0 -175
  34. package/dist/agents/queen-agent-example.d.ts +0 -23
  35. package/dist/agents/queen-agent-example.js +0 -240
  36. package/dist/agents/queen-agent.test.d.ts +0 -6
  37. package/dist/agents/script-generator.agent.d.ts +0 -32
  38. package/dist/agents/script-generator.agent.js +0 -772
  39. package/dist/agents/script-writer-agent.d.ts +0 -22
  40. package/dist/agents/script-writer-agent.js +0 -695
  41. package/dist/agents/security-agent.d.ts +0 -23
  42. package/dist/agents/security-agent.js +0 -619
  43. package/dist/agents/specialists/automation-specialist.agent.d.ts +0 -44
  44. package/dist/agents/specialists/automation-specialist.agent.js +0 -204
  45. package/dist/agents/specialists/data-specialist.agent.d.ts +0 -165
  46. package/dist/agents/specialists/data-specialist.agent.js +0 -484
  47. package/dist/agents/specialists/integration-specialist.agent.d.ts +0 -227
  48. package/dist/agents/specialists/integration-specialist.agent.js +0 -725
  49. package/dist/agents/specialists/reporting-specialist.agent.d.ts +0 -54
  50. package/dist/agents/specialists/reporting-specialist.agent.js +0 -193
  51. package/dist/agents/specialists/security-specialist.agent.d.ts +0 -85
  52. package/dist/agents/specialists/security-specialist.agent.js +0 -309
  53. package/dist/agents/teams/adaptive/adaptive-coordinator.agent.d.ts +0 -111
  54. package/dist/agents/teams/adaptive/adaptive-coordinator.agent.js +0 -383
  55. package/dist/agents/teams/base-team.d.ts +0 -72
  56. package/dist/agents/teams/base-team.js +0 -253
  57. package/dist/agents/teams/team-types.d.ts +0 -265
  58. package/dist/agents/teams/team-types.js +0 -3
  59. package/dist/agents/teams/widget/widget-architect.agent.d.ts +0 -61
  60. package/dist/agents/teams/widget/widget-architect.agent.js +0 -436
  61. package/dist/agents/teams/widget/widget-backend.agent.d.ts +0 -74
  62. package/dist/agents/teams/widget/widget-backend.agent.js +0 -1531
  63. package/dist/agents/teams/widget/widget-frontend.agent.d.ts +0 -67
  64. package/dist/agents/teams/widget/widget-frontend.agent.js +0 -1014
  65. package/dist/agents/teams/widget/widget-platform.agent.d.ts +0 -90
  66. package/dist/agents/teams/widget/widget-platform.agent.js +0 -1190
  67. package/dist/agents/teams/widget/widget-uiux.agent.d.ts +0 -107
  68. package/dist/agents/teams/widget/widget-uiux.agent.js +0 -1033
  69. package/dist/agents/test-agent.d.ts +0 -26
  70. package/dist/agents/test-agent.js +0 -734
  71. package/dist/agents/test-agents.d.ts +0 -7
  72. package/dist/agents/test-agents.js +0 -64
  73. package/dist/agents/ui-builder.agent.d.ts +0 -50
  74. package/dist/agents/ui-builder.agent.js +0 -1539
  75. package/dist/agents/widget-builder.agent.d.ts +0 -32
  76. package/dist/agents/widget-builder.agent.js +0 -439
  77. package/dist/agents/widget-creator-agent.d.ts +0 -18
  78. package/dist/agents/widget-creator-agent.js +0 -498
  79. package/dist/agents/workflow-designer.agent.d.ts +0 -31
  80. package/dist/agents/workflow-designer.agent.js +0 -583
  81. package/dist/api/error-handling.d.ts +0 -325
  82. package/dist/api/error-handling.js +0 -1488
  83. package/dist/api/flow-designer-api.d.ts +0 -167
  84. package/dist/api/flow-designer-api.js +0 -554
  85. package/dist/api/natural-language-mapper.d.ts +0 -124
  86. package/dist/api/natural-language-mapper.js +0 -501
  87. package/dist/api/performance-optimizer.d.ts +0 -240
  88. package/dist/api/performance-optimizer.js +0 -706
  89. package/dist/api/transaction-manager.d.ts +0 -189
  90. package/dist/api/transaction-manager.js +0 -576
  91. package/dist/assembly/team-assembler.d.ts +0 -140
  92. package/dist/assembly/team-assembler.js +0 -502
  93. package/dist/benchmark-performance.d.ts +0 -41
  94. package/dist/benchmark-performance.js +0 -230
  95. package/dist/cli/snow-flow-cli-integration.d.ts +0 -30
  96. package/dist/cli/snow-flow-cli-integration.js +0 -396
  97. package/dist/coordination/coordination-engine.d.ts +0 -41
  98. package/dist/coordination/coordination-engine.js +0 -324
  99. package/dist/coordination/coordination.test.d.ts +0 -6
  100. package/dist/coordination/example.d.ts +0 -31
  101. package/dist/coordination/example.js +0 -394
  102. package/dist/coordination/execution-patterns.d.ts +0 -43
  103. package/dist/coordination/execution-patterns.js +0 -507
  104. package/dist/coordination/factory.d.ts +0 -94
  105. package/dist/coordination/factory.js +0 -433
  106. package/dist/coordination/index.d.ts +0 -71
  107. package/dist/coordination/index.js +0 -135
  108. package/dist/coordination/progress-monitor.d.ts +0 -71
  109. package/dist/coordination/progress-monitor.js +0 -505
  110. package/dist/coordination/quality-gates.d.ts +0 -124
  111. package/dist/coordination/quality-gates.js +0 -577
  112. package/dist/coordination/shared-memory.d.ts +0 -39
  113. package/dist/coordination/shared-memory.js +0 -289
  114. package/dist/coordination/task-dependencies.d.ts +0 -50
  115. package/dist/coordination/task-dependencies.js +0 -407
  116. package/dist/coordination/team-coordinator.d.ts +0 -59
  117. package/dist/coordination/team-coordinator.js +0 -550
  118. package/dist/coordination/types.d.ts +0 -152
  119. package/dist/coordination/types.js +0 -3
  120. package/dist/mcp/mcp-wrapper.d.ts +0 -8
  121. package/dist/mcp/mcp-wrapper.js +0 -77
  122. package/dist/mcp/servicenow-flow-composer-enhanced.js +0 -396
  123. package/dist/mcp/servicenow-flow-composer-mcp.d.ts +0 -7
  124. package/dist/mcp/servicenow-flow-composer-mcp.js +0 -3103
  125. package/dist/mcp/servicenow-graph-memory-mcp.d.ts +0 -7
  126. package/dist/mcp/servicenow-intelligent-mcp.d.ts +0 -143
  127. package/dist/mcp/servicenow-intelligent-mcp.js +0 -4156
  128. package/dist/mcp/servicenow-xml-flow-mcp.d.ts +0 -53
  129. package/dist/mcp/servicenow-xml-flow-mcp.js +0 -1704
  130. package/dist/mcp/singleton-check.js +0 -31
  131. package/dist/mcp/test-simple-mcp.d.ts +0 -6
  132. package/dist/mcp/test-simple-mcp.js +0 -63
  133. package/dist/memory/hierarchical-memory-system.d.ts +0 -90
  134. package/dist/memory/hierarchical-memory-system.js +0 -400
  135. package/dist/memory/index.d.ts +0 -9
  136. package/dist/memory/index.js +0 -20
  137. package/dist/memory/mcp-integration-example.d.ts +0 -6
  138. package/dist/memory/mcp-integration-example.js +0 -281
  139. package/dist/memory/memory-client.d.ts +0 -199
  140. package/dist/memory/memory-client.js +0 -364
  141. package/dist/memory/memory-manager.d.ts +0 -29
  142. package/dist/memory/memory-manager.js +0 -280
  143. package/dist/memory/memory-operations.d.ts +0 -179
  144. package/dist/memory/memory-operations.js +0 -691
  145. package/dist/memory/memory-system.d.ts +0 -153
  146. package/dist/memory/memory-system.js +0 -651
  147. package/dist/memory/memory-test.d.ts +0 -6
  148. package/dist/memory/memory-test.js +0 -161
  149. package/dist/memory/snow-flow-memory-patterns.d.ts +0 -213
  150. package/dist/memory/snow-flow-memory-patterns.js +0 -200
  151. package/dist/memory/snow-memory.d.ts +0 -54
  152. package/dist/memory/snow-memory.js +0 -301
  153. package/dist/memory/swarm-memory.d.ts +0 -135
  154. package/dist/memory/swarm-memory.js +0 -378
  155. package/dist/optimization/flow-performance-optimizer.js +0 -723
  156. package/dist/orchestration/discovery/service-discovery.d.ts +0 -81
  157. package/dist/orchestration/discovery/service-discovery.js +0 -808
  158. package/dist/orchestration/distributed-orchestrator.d.ts +0 -131
  159. package/dist/orchestration/distributed-orchestrator.js +0 -712
  160. package/dist/orchestration/distribution/task-distribution-engine.d.ts +0 -53
  161. package/dist/orchestration/distribution/task-distribution-engine.js +0 -586
  162. package/dist/orchestration/flow-update-orchestrator.js +0 -648
  163. package/dist/orchestration/interfaces/distributed-orchestration.interface.d.ts +0 -606
  164. package/dist/orchestration/interfaces/distributed-orchestration.interface.js +0 -65
  165. package/dist/orchestration/protocols/mcpx-protocol.d.ts +0 -71
  166. package/dist/orchestration/protocols/mcpx-protocol.js +0 -668
  167. package/dist/orchestration/state/distributed-state-manager.d.ts +0 -89
  168. package/dist/orchestration/state/distributed-state-manager.js +0 -716
  169. package/dist/orchestrator/flow-composer.d.ts +0 -105
  170. package/dist/orchestrator/flow-composer.js +0 -404
  171. package/dist/orchestrator/flow-pattern-templates.d.ts +0 -260
  172. package/dist/orchestrator/flow-pattern-templates.js +0 -908
  173. package/dist/orchestrator/flow-subflow-decision-engine.d.ts +0 -202
  174. package/dist/orchestrator/flow-subflow-decision-engine.js +0 -769
  175. package/dist/orchestrator/flow-validation-engine.d.ts +0 -169
  176. package/dist/orchestrator/flow-validation-engine.js +0 -913
  177. package/dist/orchestrator/snow-orchestrator.d.ts +0 -49
  178. package/dist/orchestrator/snow-orchestrator.js +0 -235
  179. package/dist/orchestrator/subflow-creation-handler.d.ts +0 -230
  180. package/dist/orchestrator/subflow-creation-handler.js +0 -791
  181. package/dist/patterns/adaptive-patterns.d.ts +0 -140
  182. package/dist/patterns/adaptive-patterns.js +0 -549
  183. package/dist/queen/advanced-integration-test.d.ts +0 -48
  184. package/dist/queen/advanced-integration-test.js +0 -473
  185. package/dist/queen/integration-example.d.ts +0 -82
  186. package/dist/queen/integration-example.js +0 -219
  187. package/dist/queen/integration-test.d.ts +0 -72
  188. package/dist/queen/integration-test.js +0 -563
  189. package/dist/queen/mock-mcp-client.d.ts +0 -71
  190. package/dist/queen/mock-mcp-client.js +0 -317
  191. package/dist/queen/run-integration-tests.d.ts +0 -9
  192. package/dist/queen/run-integration-tests.js +0 -27
  193. package/dist/sparc/coordinators/adaptive-coordinator.d.ts +0 -54
  194. package/dist/sparc/coordinators/adaptive-coordinator.js +0 -367
  195. package/dist/sparc/coordinators/team-coordinator.d.ts +0 -66
  196. package/dist/sparc/coordinators/team-coordinator.js +0 -402
  197. package/dist/sparc/modes/team-modes.d.ts +0 -33
  198. package/dist/sparc/modes/team-modes.js +0 -399
  199. package/dist/sparc/teams/application-team.d.ts +0 -73
  200. package/dist/sparc/teams/application-team.js +0 -463
  201. package/dist/sparc/teams/flow-team.d.ts +0 -67
  202. package/dist/sparc/teams/flow-team.js +0 -373
  203. package/dist/sparc/teams/widget-team.d.ts +0 -61
  204. package/dist/sparc/teams/widget-team.js +0 -280
  205. package/dist/specialists/app-specialists.d.ts +0 -93
  206. package/dist/specialists/app-specialists.js +0 -1639
  207. package/dist/specialists/base-specialist.d.ts +0 -19
  208. package/dist/specialists/base-specialist.js +0 -54
  209. package/dist/specialists/flow-specialists.d.ts +0 -113
  210. package/dist/specialists/flow-specialists.js +0 -1787
  211. package/dist/specialists/individual-specialists.d.ts +0 -67
  212. package/dist/specialists/individual-specialists.js +0 -632
  213. package/dist/specialists/widget-specialists.d.ts +0 -70
  214. package/dist/specialists/widget-specialists.js +0 -1264
  215. package/dist/src/utils/agent-detector.js +0 -655
  216. package/dist/teams/adaptive-team.d.ts +0 -81
  217. package/dist/teams/adaptive-team.js +0 -1153
  218. package/dist/teams/application-team.d.ts +0 -30
  219. package/dist/teams/application-team.js +0 -547
  220. package/dist/teams/base-team.d.ts +0 -55
  221. package/dist/teams/base-team.js +0 -243
  222. package/dist/teams/flow-team.d.ts +0 -28
  223. package/dist/teams/flow-team.js +0 -525
  224. package/dist/teams/widget-team.d.ts +0 -26
  225. package/dist/teams/widget-team.js +0 -459
  226. package/dist/templates/flow-template-system.js +0 -625
  227. package/dist/test-fetch-incidents.d.ts +0 -2
  228. package/dist/test-fetch-incidents.js +0 -84
  229. package/dist/test-incident-access.d.ts +0 -2
  230. package/dist/test-incident-access.js +0 -72
  231. package/dist/test-iphone-flow.js +0 -189
  232. package/dist/test-limit-problem.d.ts +0 -2
  233. package/dist/test-limit-problem.js +0 -60
  234. package/dist/test-ml-batch-fix.d.ts +0 -2
  235. package/dist/test-ml-batch-fix.js +0 -104
  236. package/dist/test-ml-batch.d.ts +0 -2
  237. package/dist/test-ml-batch.js +0 -87
  238. package/dist/test-ml-query.d.ts +0 -2
  239. package/dist/test-ml-query.js +0 -100
  240. package/dist/test-ml-training-fix.d.ts +0 -12
  241. package/dist/test-ml-training-fix.js +0 -113
  242. package/dist/test-ml-training.d.ts +0 -2
  243. package/dist/test-ml-training.js +0 -32
  244. package/dist/test-operations-query.d.ts +0 -2
  245. package/dist/test-operations-query.js +0 -84
  246. package/dist/test-performance-query.d.ts +0 -2
  247. package/dist/test-performance-query.js +0 -52
  248. package/dist/test-singleton-protection.d.ts +0 -8
  249. package/dist/test-singleton-protection.js +0 -110
  250. package/dist/test-smart-limits.d.ts +0 -13
  251. package/dist/test-smart-limits.js +0 -100
  252. package/dist/test-snow-query-incidents.d.ts +0 -2
  253. package/dist/test-snow-query-incidents.js +0 -66
  254. package/dist/test-universal-query.d.ts +0 -2
  255. package/dist/test-universal-query.js +0 -106
  256. package/dist/testing/flow-testing-automation.js +0 -641
  257. package/dist/utils/complete-flow-xml-generator.js +0 -1285
  258. package/dist/utils/file-storage-fallback.d.ts +0 -62
  259. package/dist/utils/file-storage-fallback.js +0 -289
  260. package/dist/utils/flow-api-discovery.d.ts +0 -151
  261. package/dist/utils/flow-api-discovery.js +0 -439
  262. package/dist/utils/flow-examples.js +0 -720
  263. package/dist/utils/flow-structure-builder.js +0 -677
  264. package/dist/utils/flow-xml-generator.d.ts +0 -41
  265. package/dist/utils/flow-xml-generator.js +0 -258
  266. package/dist/utils/improved-flow-xml-generator.js +0 -820
  267. package/dist/utils/mcp-process-manager.backup.d.ts +0 -58
  268. package/dist/utils/mcp-process-manager.backup.js +0 -220
  269. package/dist/utils/mcp-singleton-enforcer.d.ts +0 -36
  270. package/dist/utils/mcp-singleton-enforcer.js +0 -201
  271. package/dist/utils/mcp-timeout-fix.d.ts +0 -53
  272. package/dist/utils/mcp-timeout-fix.js +0 -221
  273. package/dist/utils/migrate-claude-flow.d.ts +0 -22
  274. package/dist/utils/migrate-claude-flow.js +0 -120
  275. package/dist/utils/scope-utils.d.ts +0 -72
  276. package/dist/utils/scope-utils.js +0 -386
  277. package/dist/utils/snow-oauth-old.d.ts +0 -65
  278. package/dist/utils/snow-oauth-old.js +0 -345
  279. package/dist/utils/xml-first-flow-generator.js +0 -513
  280. package/memory/servicenow_artifacts/000d9224c895221055906c7518aa2d3d.json +0 -30
  281. package/memory/servicenow_artifacts/0196b66173303010e46b4a2214f6a7a2.json +0 -36
  282. package/memory/servicenow_artifacts/125e5d1d837e2a102a7ea130ceaad397.json +0 -30
  283. package/memory/servicenow_artifacts/7637c1f2b7112210a5e5911cde11a972.json +0 -30
  284. package/memory/servicenow_artifacts/default_documentation_tables_1754056582292.json +0 -55
  285. package/memory/servicenow_artifacts/default_documentation_tables_1754057477189.json +0 -55
  286. package/memory/update-set-sessions/01f82af583faea102a7ea130ceaad3d4.json +0 -9
  287. package/memory/update-set-sessions/27718fb983faea102a7ea130ceaad34b.json +0 -9
  288. package/memory/update-set-sessions/412e9bf6833e22502a7ea130ceaad30a.json +0 -8
  289. package/memory/update-set-sessions/66fc5a79837aea102a7ea130ceaad3ab.json +0 -9
  290. package/memory/update-set-sessions/71a30ff5837eea102a7ea130ceaad37f.json +0 -9
  291. package/memory/update-set-sessions/74fba27983faea102a7ea130ceaad3bd.json +0 -9
  292. package/memory/update-set-sessions/a0b147b5837eea102a7ea130ceaad344.json +0 -58
  293. package/memory/update-set-sessions/b13f5eb983baea102a7ea130ceaad33e.json +0 -9
  294. package/reports/swarm-auto-centralized-1752649029776.json +0 -13
  295. package/src/memory/README.md +0 -240
@@ -1,433 +0,0 @@
1
- "use strict";
2
- /**
3
- * Factory functions for creating coordination framework components
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TaskSpecificationBuilder = void 0;
7
- exports.createCoordinationEngine = createCoordinationEngine;
8
- exports.createStandardQualityGates = createStandardQualityGates;
9
- exports.createServiceNowQualityGates = createServiceNowQualityGates;
10
- exports.createProgressListener = createProgressListener;
11
- exports.createServiceNowTaskSpecification = createServiceNowTaskSpecification;
12
- exports.createServiceNowCoordinationSetup = createServiceNowCoordinationSetup;
13
- const coordination_engine_1 = require("./coordination-engine");
14
- const quality_gates_1 = require("./quality-gates");
15
- const logger_1 = require("../utils/logger");
16
- /**
17
- * Create a coordination engine with sensible defaults
18
- */
19
- function createCoordinationEngine(config = {}) {
20
- const defaultConfig = {
21
- maxConcurrentTasks: 5,
22
- taskTimeout: 300000, // 5 minutes
23
- enableRetries: true,
24
- maxRetries: 3,
25
- enableQualityGates: true,
26
- enableProgressMonitoring: true,
27
- executionPattern: 'auto',
28
- memoryTtl: 3600000, // 1 hour
29
- errorRecoveryStrategy: 'retry'
30
- };
31
- const finalConfig = { ...defaultConfig, ...config };
32
- logger_1.logger.info('🏭 Creating coordination engine', { config: finalConfig });
33
- return new coordination_engine_1.CoordinationEngine(finalConfig);
34
- }
35
- /**
36
- * Create standard quality gates for general development
37
- */
38
- function createStandardQualityGates() {
39
- const manager = new quality_gates_1.QualityGateManager({
40
- enableBlocking: true,
41
- enableScoring: true,
42
- minPassingScore: 0.7,
43
- enableMetrics: true,
44
- timeoutMs: 30000
45
- });
46
- // Add standard gates
47
- const codeGate = new quality_gates_1.CodeQualityGate({
48
- maxComplexity: 10,
49
- minCoverage: 80,
50
- requireDocumentation: true,
51
- blocking: true
52
- });
53
- const securityGate = new quality_gates_1.SecurityGate({
54
- checkInjection: true,
55
- checkXSS: true,
56
- checkSecrets: true,
57
- checkAuth: true
58
- });
59
- const performanceGate = new quality_gates_1.PerformanceGate({
60
- maxResponseTime: 5000,
61
- maxMemoryUsage: 100,
62
- blocking: false
63
- });
64
- logger_1.logger.info('🛡️ Created standard quality gates', {
65
- gates: ['code_quality', 'security', 'performance']
66
- });
67
- return manager;
68
- }
69
- /**
70
- * Create ServiceNow-specific quality gates
71
- */
72
- function createServiceNowQualityGates() {
73
- const manager = new quality_gates_1.QualityGateManager({
74
- enableBlocking: true,
75
- enableScoring: true,
76
- minPassingScore: 0.8,
77
- enableMetrics: true,
78
- timeoutMs: 45000 // Longer timeout for ServiceNow operations
79
- });
80
- // ServiceNow specific gates
81
- const snowGate = new quality_gates_1.ServiceNowGate({
82
- checkScope: true,
83
- checkUpdateSet: true,
84
- checkNaming: true,
85
- checkDependencies: true,
86
- blocking: true
87
- });
88
- const businessGate = new quality_gates_1.BusinessLogicGate({
89
- checkRequirements: true,
90
- checkOutputs: true,
91
- checkErrorHandling: true,
92
- blocking: true
93
- });
94
- const codeGate = new quality_gates_1.CodeQualityGate({
95
- maxComplexity: 15, // Slightly higher for ServiceNow scripts
96
- minCoverage: 70, // Slightly lower due to ServiceNow testing constraints
97
- requireDocumentation: true,
98
- blocking: true
99
- });
100
- const securityGate = new quality_gates_1.SecurityGate({
101
- checkInjection: true,
102
- checkXSS: true,
103
- checkSecrets: true,
104
- checkAuth: true,
105
- checkPermissions: true // Important for ServiceNow
106
- });
107
- logger_1.logger.info('🛡️ Created ServiceNow quality gates', {
108
- gates: ['servicenow_compliance', 'business_logic', 'code_quality', 'security']
109
- });
110
- return manager;
111
- }
112
- /**
113
- * Create a progress listener with common logging
114
- */
115
- function createProgressListener(config = {}) {
116
- const { logLevel = 'info', logProgress = true, logTasks = true, logAgents = false, logPerformance = false, customHandler } = config;
117
- return {
118
- onProgress(event, data) {
119
- try {
120
- // Custom handler takes precedence
121
- if (customHandler) {
122
- customHandler(event, data);
123
- return;
124
- }
125
- // Standard logging based on event type and configuration
126
- switch (event) {
127
- case 'task_progress':
128
- if (logProgress) {
129
- logger_1.logger[logLevel]('📊 Progress Update', {
130
- completed: data.completed,
131
- total: data.total,
132
- percentage: data.percentage,
133
- phase: data.currentPhase
134
- });
135
- }
136
- break;
137
- case 'task:completed':
138
- if (logTasks) {
139
- logger_1.logger[logLevel]('✅ Task Completed', {
140
- taskId: data.taskId,
141
- progress: `${Math.round(data.progress * 100)}%`
142
- });
143
- }
144
- break;
145
- case 'task:failed':
146
- if (logTasks) {
147
- logger_1.logger.error('❌ Task Failed', {
148
- taskId: data.taskId,
149
- error: data.error?.message
150
- });
151
- }
152
- break;
153
- case 'agent_health':
154
- if (logAgents) {
155
- const unhealthy = Object.entries(data.agents)
156
- .filter(([, health]) => health.status === 'error').length;
157
- if (unhealthy > 0) {
158
- logger_1.logger.warn('⚠️ Agent Health Issue', {
159
- unhealthyAgents: unhealthy,
160
- totalAgents: Object.keys(data.agents).length
161
- });
162
- }
163
- }
164
- break;
165
- case 'performance_metrics':
166
- if (logPerformance) {
167
- logger_1.logger[logLevel]('⚡ Performance Metrics', {
168
- efficiency: `${Math.round(data.efficiency * 100)}%`,
169
- throughput: data.throughput.toFixed(2),
170
- averageTime: `${Math.round(data.averageTaskTime / 1000)}s`
171
- });
172
- }
173
- break;
174
- case 'bottlenecks_detected':
175
- logger_1.logger.warn('🚧 Bottlenecks Detected', {
176
- count: data.bottlenecks?.length || 0,
177
- types: data.bottlenecks?.map((b) => b.type) || []
178
- });
179
- break;
180
- case 'memory:high_usage':
181
- logger_1.logger.warn('🧠 High Memory Usage', {
182
- usage: `${Math.round(data.usage)}%`
183
- });
184
- break;
185
- default:
186
- // Log unknown events at debug level
187
- logger_1.logger.debug('📡 Coordination Event', { event, data });
188
- }
189
- }
190
- catch (error) {
191
- logger_1.logger.error('❌ Progress listener error', {
192
- event,
193
- error: error.message
194
- });
195
- }
196
- }
197
- };
198
- }
199
- /**
200
- * Create a task specification builder for common ServiceNow patterns
201
- */
202
- function createServiceNowTaskSpecification(name, description) {
203
- return new TaskSpecificationBuilder(name, description);
204
- }
205
- /**
206
- * Builder pattern for creating task specifications
207
- */
208
- class TaskSpecificationBuilder {
209
- constructor(name, description) {
210
- this.spec = {
211
- name,
212
- description,
213
- tasks: [],
214
- sharedContext: {},
215
- qualityGates: [],
216
- executionPattern: 'auto'
217
- };
218
- }
219
- /**
220
- * Add a task to the specification
221
- */
222
- addTask(task) {
223
- this.spec.tasks.push({
224
- id: task.id,
225
- name: task.name,
226
- description: task.description,
227
- agentType: task.agentType,
228
- requirements: task.requirements,
229
- dependencies: task.dependencies || [],
230
- outputs: task.outputs || [],
231
- priority: task.priority || 'medium'
232
- });
233
- return this;
234
- }
235
- /**
236
- * Add shared context
237
- */
238
- addContext(key, value) {
239
- this.spec.sharedContext[key] = value;
240
- return this;
241
- }
242
- /**
243
- * Set execution pattern
244
- */
245
- setExecutionPattern(pattern) {
246
- this.spec.executionPattern = pattern;
247
- return this;
248
- }
249
- /**
250
- * Add quality gates
251
- */
252
- addQualityGates(config) {
253
- this.spec.qualityGates.push(config);
254
- return this;
255
- }
256
- /**
257
- * Add ServiceNow widget development tasks
258
- */
259
- addWidgetDevelopmentTasks(widgetName) {
260
- return this
261
- .addTask({
262
- id: 'analyze_requirements',
263
- name: 'Analyze Requirements',
264
- description: 'Analyze widget requirements and design specifications',
265
- agentType: 'analyst',
266
- requirements: {
267
- inputs: { widgetSpec: widgetName },
268
- outputs: ['requirements', 'design'],
269
- capabilities: ['analysis', 'design']
270
- }
271
- })
272
- .addTask({
273
- id: 'create_widget_template',
274
- name: 'Create Widget Template',
275
- description: 'Create HTML template for the widget',
276
- agentType: 'ui-builder',
277
- requirements: {
278
- inputs: {},
279
- outputs: ['template', 'css'],
280
- capabilities: ['html', 'css', 'servicenow']
281
- },
282
- dependencies: ['analyze_requirements']
283
- })
284
- .addTask({
285
- id: 'implement_client_script',
286
- name: 'Implement Client Script',
287
- description: 'Implement client-side JavaScript functionality',
288
- agentType: 'coder',
289
- requirements: {
290
- inputs: {},
291
- outputs: ['clientScript'],
292
- capabilities: ['javascript', 'servicenow', 'frontend']
293
- },
294
- dependencies: ['create_widget_template']
295
- })
296
- .addTask({
297
- id: 'implement_server_script',
298
- name: 'Implement Server Script',
299
- description: 'Implement server-side logic and data access',
300
- agentType: 'coder',
301
- requirements: {
302
- inputs: {},
303
- outputs: ['serverScript'],
304
- capabilities: ['javascript', 'servicenow', 'backend']
305
- },
306
- dependencies: ['analyze_requirements']
307
- })
308
- .addTask({
309
- id: 'deploy_widget',
310
- name: 'Deploy Widget',
311
- description: 'Deploy widget to ServiceNow instance',
312
- agentType: 'servicenow-specialist',
313
- requirements: {
314
- inputs: {},
315
- outputs: ['deploymentResult'],
316
- capabilities: ['servicenow', 'deployment']
317
- },
318
- dependencies: ['implement_client_script', 'implement_server_script']
319
- })
320
- .addTask({
321
- id: 'test_widget',
322
- name: 'Test Widget',
323
- description: 'Test widget functionality and integration',
324
- agentType: 'tester',
325
- requirements: {
326
- inputs: {},
327
- outputs: ['testResults'],
328
- capabilities: ['testing', 'servicenow']
329
- },
330
- dependencies: ['deploy_widget']
331
- });
332
- }
333
- /**
334
- * Add ServiceNow flow development tasks
335
- */
336
- addFlowDevelopmentTasks(flowName) {
337
- return this
338
- .addTask({
339
- id: 'design_flow',
340
- name: 'Design Flow',
341
- description: 'Design flow structure and logic',
342
- agentType: 'workflow-designer',
343
- requirements: {
344
- inputs: { flowSpec: flowName },
345
- outputs: ['flowDesign', 'flowSteps'],
346
- capabilities: ['workflow', 'design', 'servicenow']
347
- }
348
- })
349
- .addTask({
350
- id: 'implement_flow',
351
- name: 'Implement Flow',
352
- description: 'Implement flow using ServiceNow Flow Designer',
353
- agentType: 'servicenow-specialist',
354
- requirements: {
355
- inputs: {},
356
- outputs: ['flowDefinition'],
357
- capabilities: ['servicenow', 'flow-designer', 'automation']
358
- },
359
- dependencies: ['design_flow']
360
- })
361
- .addTask({
362
- id: 'test_flow',
363
- name: 'Test Flow',
364
- description: 'Test flow execution with mock data',
365
- agentType: 'tester',
366
- requirements: {
367
- inputs: {},
368
- outputs: ['testResults'],
369
- capabilities: ['testing', 'servicenow', 'automation']
370
- },
371
- dependencies: ['implement_flow']
372
- });
373
- }
374
- /**
375
- * Build the final task specification
376
- */
377
- build() {
378
- // Add default quality gates if none specified
379
- if (this.spec.qualityGates.length === 0) {
380
- this.spec.qualityGates.push({
381
- name: 'default_gates',
382
- taskIds: this.spec.tasks.map(t => t.id),
383
- gates: [] // Will be populated by createServiceNowQualityGates()
384
- });
385
- }
386
- logger_1.logger.info('🏗️ Built task specification', {
387
- name: this.spec.name,
388
- tasks: this.spec.tasks.length,
389
- qualityGates: this.spec.qualityGates.length
390
- });
391
- return { ...this.spec };
392
- }
393
- }
394
- exports.TaskSpecificationBuilder = TaskSpecificationBuilder;
395
- /**
396
- * Create a complete coordination setup for ServiceNow development
397
- */
398
- function createServiceNowCoordinationSetup(config) {
399
- const { maxConcurrentTasks = 5, enableAdvancedQualityGates = true, memoryTtl = 3600000, progressLogging = true } = config;
400
- // Create coordination engine
401
- const engine = createCoordinationEngine({
402
- maxConcurrentTasks,
403
- enableQualityGates: enableAdvancedQualityGates,
404
- memoryTtl,
405
- executionPattern: 'hybrid'
406
- });
407
- // Create quality gates
408
- const qualityGates = enableAdvancedQualityGates
409
- ? createServiceNowQualityGates()
410
- : createStandardQualityGates();
411
- // Create progress listener
412
- const progressListener = createProgressListener({
413
- logLevel: 'info',
414
- logProgress: progressLogging,
415
- logTasks: progressLogging,
416
- logAgents: true,
417
- logPerformance: true
418
- });
419
- // Task builder factory
420
- const taskBuilder = (name, description) => createServiceNowTaskSpecification(name, description);
421
- logger_1.logger.info('🚀 ServiceNow coordination setup created', {
422
- maxConcurrentTasks,
423
- advancedQualityGates: enableAdvancedQualityGates,
424
- progressLogging
425
- });
426
- return {
427
- engine,
428
- qualityGates,
429
- progressListener,
430
- taskBuilder
431
- };
432
- }
433
- //# sourceMappingURL=factory.js.map
@@ -1,71 +0,0 @@
1
- /**
2
- * Team Coordination Framework
3
- *
4
- * A comprehensive framework for managing communication, dependencies, and quality gates
5
- * between specialized agents in ServiceNow development workflows.
6
- */
7
- export { CoordinationEngine } from './coordination-engine';
8
- export { SharedMemoryManager } from './shared-memory';
9
- export { TaskDependencyGraph } from './task-dependencies';
10
- export { QualityGateManager, CodeQualityGate, SecurityGate, PerformanceGate, ServiceNowGate, BusinessLogicGate } from './quality-gates';
11
- export { ExecutionPattern, SequentialExecutionPattern, ParallelExecutionPattern, HybridExecutionPattern, AdaptiveExecutionPattern } from './execution-patterns';
12
- export { ProgressMonitor } from './progress-monitor';
13
- export * from './types';
14
- export { createCoordinationEngine, createStandardQualityGates, createServiceNowQualityGates, createProgressListener } from './factory';
15
- /**
16
- * Main coordination framework entry point
17
- *
18
- * Example usage:
19
- * ```typescript
20
- * import { CoordinationFramework } from './coordination';
21
- *
22
- * const framework = new CoordinationFramework({
23
- * maxConcurrentTasks: 5,
24
- * enableQualityGates: true,
25
- * executionPattern: 'hybrid'
26
- * });
27
- *
28
- * const result = await framework.coordinate(team, specification);
29
- * ```
30
- */
31
- export declare class CoordinationFramework {
32
- private engine;
33
- constructor(config?: Partial<import('./types').CoordinationConfig>);
34
- /**
35
- * Coordinate team execution of a task specification
36
- */
37
- coordinate(team: import('./types').BaseTeam, specification: import('./types').TaskSpecification): Promise<import('./types').CoordinationResult>;
38
- /**
39
- * Get execution plan without executing
40
- */
41
- plan(specification: import('./types').TaskSpecification): Promise<import('./types').ExecutionPlan>;
42
- /**
43
- * Access the shared memory manager
44
- */
45
- getSharedMemory(): SharedMemoryManager;
46
- /**
47
- * Access the quality gate manager
48
- */
49
- getQualityGates(): QualityGateManager;
50
- /**
51
- * Pause execution
52
- */
53
- pause(): Promise<void>;
54
- /**
55
- * Resume execution
56
- */
57
- resume(): Promise<void>;
58
- /**
59
- * Abort execution
60
- */
61
- abort(reason: string): Promise<void>;
62
- /**
63
- * Subscribe to coordination events
64
- */
65
- on(event: string, listener: (...args: any[]) => void): void;
66
- /**
67
- * Remove event listener
68
- */
69
- off(event: string, listener: (...args: any[]) => void): void;
70
- }
71
- //# sourceMappingURL=index.d.ts.map
@@ -1,135 +0,0 @@
1
- "use strict";
2
- /**
3
- * Team Coordination Framework
4
- *
5
- * A comprehensive framework for managing communication, dependencies, and quality gates
6
- * between specialized agents in ServiceNow development workflows.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
- };
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.CoordinationFramework = exports.createProgressListener = exports.createServiceNowQualityGates = exports.createStandardQualityGates = exports.createCoordinationEngine = exports.ProgressMonitor = exports.AdaptiveExecutionPattern = exports.HybridExecutionPattern = exports.ParallelExecutionPattern = exports.SequentialExecutionPattern = exports.ExecutionPattern = exports.BusinessLogicGate = exports.ServiceNowGate = exports.PerformanceGate = exports.SecurityGate = exports.CodeQualityGate = exports.QualityGateManager = exports.TaskDependencyGraph = exports.SharedMemoryManager = exports.CoordinationEngine = void 0;
24
- // Core coordination engine
25
- var coordination_engine_1 = require("./coordination-engine");
26
- Object.defineProperty(exports, "CoordinationEngine", { enumerable: true, get: function () { return coordination_engine_1.CoordinationEngine; } });
27
- // Shared memory management
28
- var shared_memory_1 = require("./shared-memory");
29
- Object.defineProperty(exports, "SharedMemoryManager", { enumerable: true, get: function () { return shared_memory_1.SharedMemoryManager; } });
30
- // Task dependency management
31
- var task_dependencies_1 = require("./task-dependencies");
32
- Object.defineProperty(exports, "TaskDependencyGraph", { enumerable: true, get: function () { return task_dependencies_1.TaskDependencyGraph; } });
33
- // Quality gates system
34
- var quality_gates_1 = require("./quality-gates");
35
- Object.defineProperty(exports, "QualityGateManager", { enumerable: true, get: function () { return quality_gates_1.QualityGateManager; } });
36
- Object.defineProperty(exports, "CodeQualityGate", { enumerable: true, get: function () { return quality_gates_1.CodeQualityGate; } });
37
- Object.defineProperty(exports, "SecurityGate", { enumerable: true, get: function () { return quality_gates_1.SecurityGate; } });
38
- Object.defineProperty(exports, "PerformanceGate", { enumerable: true, get: function () { return quality_gates_1.PerformanceGate; } });
39
- Object.defineProperty(exports, "ServiceNowGate", { enumerable: true, get: function () { return quality_gates_1.ServiceNowGate; } });
40
- Object.defineProperty(exports, "BusinessLogicGate", { enumerable: true, get: function () { return quality_gates_1.BusinessLogicGate; } });
41
- // Execution patterns
42
- var execution_patterns_1 = require("./execution-patterns");
43
- Object.defineProperty(exports, "ExecutionPattern", { enumerable: true, get: function () { return execution_patterns_1.ExecutionPattern; } });
44
- Object.defineProperty(exports, "SequentialExecutionPattern", { enumerable: true, get: function () { return execution_patterns_1.SequentialExecutionPattern; } });
45
- Object.defineProperty(exports, "ParallelExecutionPattern", { enumerable: true, get: function () { return execution_patterns_1.ParallelExecutionPattern; } });
46
- Object.defineProperty(exports, "HybridExecutionPattern", { enumerable: true, get: function () { return execution_patterns_1.HybridExecutionPattern; } });
47
- Object.defineProperty(exports, "AdaptiveExecutionPattern", { enumerable: true, get: function () { return execution_patterns_1.AdaptiveExecutionPattern; } });
48
- // Progress monitoring
49
- var progress_monitor_1 = require("./progress-monitor");
50
- Object.defineProperty(exports, "ProgressMonitor", { enumerable: true, get: function () { return progress_monitor_1.ProgressMonitor; } });
51
- // Type definitions
52
- __exportStar(require("./types"), exports);
53
- // Convenience factory functions
54
- var factory_1 = require("./factory");
55
- Object.defineProperty(exports, "createCoordinationEngine", { enumerable: true, get: function () { return factory_1.createCoordinationEngine; } });
56
- Object.defineProperty(exports, "createStandardQualityGates", { enumerable: true, get: function () { return factory_1.createStandardQualityGates; } });
57
- Object.defineProperty(exports, "createServiceNowQualityGates", { enumerable: true, get: function () { return factory_1.createServiceNowQualityGates; } });
58
- Object.defineProperty(exports, "createProgressListener", { enumerable: true, get: function () { return factory_1.createProgressListener; } });
59
- /**
60
- * Main coordination framework entry point
61
- *
62
- * Example usage:
63
- * ```typescript
64
- * import { CoordinationFramework } from './coordination';
65
- *
66
- * const framework = new CoordinationFramework({
67
- * maxConcurrentTasks: 5,
68
- * enableQualityGates: true,
69
- * executionPattern: 'hybrid'
70
- * });
71
- *
72
- * const result = await framework.coordinate(team, specification);
73
- * ```
74
- */
75
- class CoordinationFramework {
76
- constructor(config = {}) {
77
- this.engine = new CoordinationEngine(config);
78
- }
79
- /**
80
- * Coordinate team execution of a task specification
81
- */
82
- async coordinate(team, specification) {
83
- return await this.engine.coordinateTeamExecution(team, specification);
84
- }
85
- /**
86
- * Get execution plan without executing
87
- */
88
- async plan(specification) {
89
- return await this.engine.getExecutionPlan(specification);
90
- }
91
- /**
92
- * Access the shared memory manager
93
- */
94
- getSharedMemory() {
95
- return this.engine.getSharedMemory();
96
- }
97
- /**
98
- * Access the quality gate manager
99
- */
100
- getQualityGates() {
101
- return this.engine.getQualityGateManager();
102
- }
103
- /**
104
- * Pause execution
105
- */
106
- async pause() {
107
- return await this.engine.pauseExecution();
108
- }
109
- /**
110
- * Resume execution
111
- */
112
- async resume() {
113
- return await this.engine.resumeExecution();
114
- }
115
- /**
116
- * Abort execution
117
- */
118
- async abort(reason) {
119
- return await this.engine.abortExecution(reason);
120
- }
121
- /**
122
- * Subscribe to coordination events
123
- */
124
- on(event, listener) {
125
- this.engine.on(event, listener);
126
- }
127
- /**
128
- * Remove event listener
129
- */
130
- off(event, listener) {
131
- this.engine.off(event, listener);
132
- }
133
- }
134
- exports.CoordinationFramework = CoordinationFramework;
135
- //# sourceMappingURL=index.js.map