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,161 +0,0 @@
1
- "use strict";
2
- /**
3
- * Snow-Flow Memory System Test
4
- * Demonstrates and tests the SQLite memory system functionality
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- const memory_client_js_1 = require("./memory-client.js");
8
- const logger_js_1 = require("../utils/logger.js");
9
- const logger = new logger_js_1.Logger('MemoryTest');
10
- async function testMemorySystem() {
11
- logger.info('Starting memory system tests');
12
- // Create a test session
13
- const sessionId = `test_session_${Date.now()}`;
14
- // Create memory clients for different agents
15
- const widgetAgent = memory_client_js_1.MemoryClient.forAgent('widget_creator_001', 'widget-creator', sessionId);
16
- const uiAgent = memory_client_js_1.MemoryClient.forAgent('ui_specialist_001', 'ui-specialist', sessionId);
17
- const testAgent = memory_client_js_1.MemoryClient.forAgent('test_agent_001', 'tester', sessionId);
18
- try {
19
- logger.info('Test 1: Agent Registration and Coordination');
20
- // Register agents
21
- await widgetAgent.register(['create_incident_widget']);
22
- await uiAgent.register(['style_widget', 'add_responsiveness']);
23
- await testAgent.register(['test_widget_functionality']);
24
- // Update progress
25
- await widgetAgent.updateProgress(25, 'analyzing_requirements');
26
- await widgetAgent.updateProgress(50, 'creating_template');
27
- await widgetAgent.updateProgress(75, 'implementing_server_script');
28
- logger.info('Test 2: Shared Context Storage');
29
- // Store widget requirements in shared context
30
- await widgetAgent.store({
31
- key: 'widget_requirements',
32
- value: {
33
- name: 'incident_dashboard',
34
- features: ['real-time updates', 'chart visualization', 'filters'],
35
- data_sources: ['incident', 'problem'],
36
- priority: 'high'
37
- }
38
- });
39
- // UI agent retrieves requirements
40
- const requirements = await uiAgent.retrieve({ key: 'widget_requirements' });
41
- logger.info('UI Agent retrieved requirements', requirements);
42
- logger.info('Test 3: Artifact Management');
43
- // Widget agent creates artifact
44
- await widgetAgent.storeArtifact({
45
- sys_id: 'widget_12345',
46
- type: 'widget',
47
- name: 'Incident Dashboard Widget',
48
- description: 'Real-time incident monitoring dashboard',
49
- status: 'created',
50
- metadata: {
51
- template_size: '5KB',
52
- has_client_script: true,
53
- has_server_script: true
54
- }
55
- });
56
- // Update artifact status
57
- await widgetAgent.updateArtifactStatus('widget_12345', 'tested');
58
- logger.info('Test 4: Agent Communication');
59
- // Widget agent hands off to UI specialist
60
- await widgetAgent.handoff({
61
- to_agent: 'ui_specialist_001',
62
- artifact_reference: 'widget_12345',
63
- data: {
64
- template_ready: true,
65
- styling_requirements: {
66
- theme: 'dark',
67
- responsive: true,
68
- accessibility: 'WCAG 2.1'
69
- }
70
- }
71
- });
72
- // UI agent checks for handoffs
73
- const handoffs = await uiAgent.checkHandoffs();
74
- logger.info('UI Agent received handoffs', handoffs);
75
- // UI agent reports dependency ready to test agent
76
- await uiAgent.reportDependencyReady('test_agent_001', 'widget_12345');
77
- logger.info('Test 5: Performance Tracking');
78
- // Track widget creation operation
79
- const tracker = widgetAgent.trackOperation('create_widget_template');
80
- // Simulate operation
81
- await new Promise(resolve => setTimeout(resolve, 100));
82
- // Complete tracking
83
- await tracker.complete(true, undefined, { lines_of_code: 250 });
84
- // Get performance stats
85
- const stats = await widgetAgent.getPerformanceStats('create_widget_template');
86
- logger.info('Performance stats', stats);
87
- logger.info('Test 6: Deployment History');
88
- // Record deployment events
89
- await widgetAgent.recordDeployment('widget_12345', 'create', true);
90
- await uiAgent.recordDeployment('widget_12345', 'update', true);
91
- await testAgent.recordDeployment('widget_12345', 'test', true);
92
- await widgetAgent.recordDeployment('widget_12345', 'verify', true);
93
- // Get deployment history
94
- const history = await widgetAgent.getDeploymentHistory('widget_12345');
95
- logger.info('Deployment history', history);
96
- logger.info('Test 7: Session State Management');
97
- // Mark agents as completed
98
- await widgetAgent.complete();
99
- await uiAgent.complete();
100
- await testAgent.complete();
101
- // Get complete session state
102
- const sessionState = await widgetAgent.getSessionState();
103
- logger.info('Session state', {
104
- activeAgents: sessionState.agents.length,
105
- artifacts: sessionState.artifacts.length,
106
- pendingMessages: sessionState.pendingMessages,
107
- contextKeys: sessionState.activeContext.map(c => c.context_key),
108
- performanceSummary: sessionState.performanceSummary
109
- });
110
- logger.info('Test 8: Memory Statistics');
111
- const stats2 = widgetAgent.getStats();
112
- logger.info('Memory statistics', stats2);
113
- logger.info('Test 9: Query Performance');
114
- // Test query performance (should be <100ms as per requirements)
115
- const startTime = Date.now();
116
- // Run multiple queries
117
- await Promise.all([
118
- widgetAgent.findSessionArtifacts(),
119
- widgetAgent.getSessionData(),
120
- widgetAgent.getPerformanceStats('create_widget_template'),
121
- uiAgent.checkHandoffs(),
122
- testAgent.checkDependencies()
123
- ]);
124
- const queryTime = Date.now() - startTime;
125
- logger.info(`Query performance: ${queryTime}ms (requirement: <100ms)`);
126
- logger.info('Test 10: Concurrent Operations');
127
- // Test thread-safe concurrent operations
128
- const concurrentOps = [];
129
- for (let i = 0; i < 10; i++) {
130
- concurrentOps.push(widgetAgent.store({
131
- key: `concurrent_test_${i}`,
132
- value: `value_${i}`
133
- }));
134
- }
135
- await Promise.all(concurrentOps);
136
- logger.info('Concurrent operations completed successfully');
137
- // Cleanup
138
- await widgetAgent.cleanup();
139
- logger.info('All tests completed successfully!');
140
- }
141
- catch (error) {
142
- logger.error('Test failed', error);
143
- throw error;
144
- }
145
- finally {
146
- // Shutdown memory system
147
- memory_client_js_1.MemoryClient.shutdown();
148
- }
149
- }
150
- // Run tests if called directly
151
- if (require.main === module) {
152
- testMemorySystem()
153
- .then(() => {
154
- logger.info('Memory system test completed');
155
- process.exit(0);
156
- })
157
- .catch((error) => {
158
- logger.error('Memory system test failed', error);
159
- process.exit(1);
160
- });
161
- }
@@ -1,213 +0,0 @@
1
- /**
2
- * Snow-Flow Memory Patterns
3
- * Hierarchical memory organization for ServiceNow development
4
- */
5
- export interface SnowFlowMemoryPatterns {
6
- patterns: {
7
- 'specs/requirements': 'Store user stories and requirements';
8
- 'specs/acceptance-criteria': 'Acceptance criteria for features';
9
- 'specs/business-rules': 'Business logic specifications';
10
- 'architecture/decisions': 'Architecture choices and rationale';
11
- 'architecture/data-model': 'ServiceNow table relationships';
12
- 'architecture/integrations': 'Integration points and APIs';
13
- 'architecture/security': 'Security model and ACLs';
14
- 'artifacts/widgets/[name]': 'Service Portal widgets';
15
- 'artifacts/flows/[name]': 'Flow Designer flows';
16
- 'artifacts/scripts/[name]': 'Script Includes and Business Rules';
17
- 'artifacts/tables/[name]': 'Custom table definitions';
18
- 'artifacts/ui-pages/[name]': 'UI Pages and interfaces';
19
- 'code/client-scripts/[name]': 'Client-side scripts';
20
- 'code/server-scripts/[name]': 'Server-side scripts';
21
- 'code/rest-apis/[endpoint]': 'REST API implementations';
22
- 'code/scheduled-jobs/[name]': 'Scheduled job scripts';
23
- 'tests/unit/[module]': 'Unit test results';
24
- 'tests/integration/[flow]': 'Integration test outcomes';
25
- 'tests/atf/[suite]': 'Automated Test Framework results';
26
- 'tests/performance/[metric]': 'Performance benchmarks';
27
- 'docs/api/[endpoint]': 'API documentation';
28
- 'docs/user-guide/[feature]': 'User documentation';
29
- 'docs/admin-guide/[config]': 'Admin configuration guides';
30
- 'docs/runbooks/[procedure]': 'Operational procedures';
31
- 'deploy/update-sets/[name]': 'Update Set tracking';
32
- 'deploy/instances/[env]': 'Instance-specific configs';
33
- 'deploy/migrations/[version]': 'Data migration scripts';
34
- 'patterns/successful/[type]': 'Successful implementation patterns';
35
- 'patterns/anti/[type]': 'Anti-patterns to avoid';
36
- 'patterns/reusable/[component]': 'Reusable components';
37
- };
38
- }
39
- export declare class SnowFlowMemoryOrganizer {
40
- /**
41
- * Generate hierarchical key for ServiceNow artifacts
42
- */
43
- static generateKey(category: string, type: string, name: string): string;
44
- /**
45
- * Store widget information with metadata
46
- */
47
- static getWidgetMemoryStructure(widgetName: string): {
48
- key: string;
49
- metadata: {
50
- type: string;
51
- created: string;
52
- tags: string[];
53
- };
54
- searchableFields: string[];
55
- };
56
- /**
57
- * Store flow information with relationships
58
- */
59
- static getFlowMemoryStructure(flowName: string): {
60
- key: string;
61
- metadata: {
62
- type: string;
63
- created: string;
64
- tags: string[];
65
- };
66
- relationships: {
67
- triggers: any[];
68
- actions: any[];
69
- subflows: any[];
70
- tables: any[];
71
- };
72
- };
73
- /**
74
- * Store script information with dependencies
75
- */
76
- static getScriptMemoryStructure(scriptName: string, scriptType: string): {
77
- key: string;
78
- metadata: {
79
- type: string;
80
- created: string;
81
- tags: string[];
82
- };
83
- dependencies: {
84
- tables: any[];
85
- scriptIncludes: any[];
86
- glideRecords: any[];
87
- apis: any[];
88
- };
89
- };
90
- /**
91
- * Store test results with coverage
92
- */
93
- static getTestMemoryStructure(testName: string, testType: string): {
94
- key: string;
95
- metadata: {
96
- type: string;
97
- executed: string;
98
- tags: string[];
99
- };
100
- results: {
101
- passed: number;
102
- failed: number;
103
- skipped: number;
104
- coverage: number;
105
- duration: number;
106
- };
107
- };
108
- /**
109
- * Store deployment information
110
- */
111
- static getDeploymentMemoryStructure(updateSetName: string): {
112
- key: string;
113
- metadata: {
114
- type: string;
115
- created: string;
116
- tags: string[];
117
- };
118
- contents: {
119
- artifacts: any[];
120
- dependencies: any[];
121
- conflicts: any[];
122
- targetInstance: string;
123
- };
124
- };
125
- }
126
- /**
127
- * Agent capability mappings for ServiceNow development
128
- */
129
- export declare const SNOW_FLOW_AGENT_CAPABILITIES: {
130
- 'widget-developer': string[];
131
- 'ui-designer': string[];
132
- 'flow-builder': string[];
133
- 'integration-specialist': string[];
134
- 'script-developer': string[];
135
- 'client-scripter': string[];
136
- 'data-architect': string[];
137
- 'security-engineer': string[];
138
- 'test-engineer': string[];
139
- 'quality-analyst': string[];
140
- 'technical-writer': string[];
141
- 'solution-architect': string[];
142
- };
143
- /**
144
- * Coordination patterns for Snow-Flow agents
145
- */
146
- export interface SnowFlowCoordinationPatterns {
147
- spawnPatterns: {
148
- widgetDevelopment: {
149
- agents: ['widget-developer', 'ui-designer', 'test-engineer'];
150
- coordination: 'parallel-with-sync-points';
151
- };
152
- flowDevelopment: {
153
- agents: ['flow-builder', 'integration-specialist', 'test-engineer'];
154
- coordination: 'sequential-with-validation';
155
- };
156
- fullStackFeature: {
157
- agents: ['data-architect', 'script-developer', 'widget-developer', 'flow-builder'];
158
- coordination: 'hierarchical-with-dependencies';
159
- };
160
- };
161
- memorySync: {
162
- sharedSpecs: 'specs/*';
163
- architectureDecisions: 'architecture/decisions/*';
164
- codeArtifacts: 'code/**/*';
165
- testResults: 'tests/**/latest';
166
- };
167
- progressTracking: {
168
- phases: ['design', 'development', 'testing', 'deployment'];
169
- checkpoints: ['spec-approved', 'code-complete', 'tests-passed', 'deployed'];
170
- metrics: ['velocity', 'quality', 'coverage', 'performance'];
171
- };
172
- }
173
- /**
174
- * Example usage patterns for ServiceNow development
175
- */
176
- export declare class SnowFlowWorkflowExamples {
177
- /**
178
- * Example: Create incident dashboard widget
179
- */
180
- static createIncidentDashboard(): Promise<void>;
181
- /**
182
- * Example: Create approval workflow
183
- */
184
- static createApprovalFlow(): Promise<void>;
185
- }
186
- /**
187
- * Monitoring patterns for Snow-Flow
188
- */
189
- export interface SnowFlowMonitoringPatterns {
190
- swarmMonitor: {
191
- activeAgents: number;
192
- taskProgress: Map<string, number>;
193
- memoryUsage: {
194
- artifacts: number;
195
- specs: number;
196
- tests: number;
197
- total: number;
198
- };
199
- performance: {
200
- avgTaskTime: number;
201
- successRate: number;
202
- activeErrors: string[];
203
- };
204
- };
205
- statusReport: {
206
- phase: string;
207
- completedTasks: string[];
208
- pendingTasks: string[];
209
- blockers: string[];
210
- nextSteps: string[];
211
- };
212
- }
213
- //# sourceMappingURL=snow-flow-memory-patterns.d.ts.map
@@ -1,200 +0,0 @@
1
- "use strict";
2
- /**
3
- * Snow-Flow Memory Patterns
4
- * Hierarchical memory organization for ServiceNow development
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.SnowFlowWorkflowExamples = exports.SNOW_FLOW_AGENT_CAPABILITIES = exports.SnowFlowMemoryOrganizer = void 0;
8
- class SnowFlowMemoryOrganizer {
9
- /**
10
- * Generate hierarchical key for ServiceNow artifacts
11
- */
12
- static generateKey(category, type, name) {
13
- const sanitizedName = name.toLowerCase().replace(/\s+/g, '_').replace(/[^a-z0-9_]/g, '');
14
- return `${category}/${type}/${sanitizedName}`;
15
- }
16
- /**
17
- * Store widget information with metadata
18
- */
19
- static getWidgetMemoryStructure(widgetName) {
20
- return {
21
- key: this.generateKey('artifacts', 'widgets', widgetName),
22
- metadata: {
23
- type: 'service_portal_widget',
24
- created: new Date().toISOString(),
25
- tags: ['widget', 'ui', 'service-portal'],
26
- },
27
- searchableFields: ['name', 'title', 'description', 'template', 'script'],
28
- };
29
- }
30
- /**
31
- * Store flow information with relationships
32
- */
33
- static getFlowMemoryStructure(flowName) {
34
- return {
35
- key: this.generateKey('artifacts', 'flows', flowName),
36
- metadata: {
37
- type: 'flow_designer',
38
- created: new Date().toISOString(),
39
- tags: ['flow', 'automation', 'workflow'],
40
- },
41
- relationships: {
42
- triggers: [],
43
- actions: [],
44
- subflows: [],
45
- tables: [],
46
- },
47
- };
48
- }
49
- /**
50
- * Store script information with dependencies
51
- */
52
- static getScriptMemoryStructure(scriptName, scriptType) {
53
- return {
54
- key: this.generateKey('code', `${scriptType}-scripts`, scriptName),
55
- metadata: {
56
- type: scriptType,
57
- created: new Date().toISOString(),
58
- tags: ['script', scriptType],
59
- },
60
- dependencies: {
61
- tables: [],
62
- scriptIncludes: [],
63
- glideRecords: [],
64
- apis: [],
65
- },
66
- };
67
- }
68
- /**
69
- * Store test results with coverage
70
- */
71
- static getTestMemoryStructure(testName, testType) {
72
- return {
73
- key: this.generateKey('tests', testType, testName),
74
- metadata: {
75
- type: `${testType}_test`,
76
- executed: new Date().toISOString(),
77
- tags: ['test', testType],
78
- },
79
- results: {
80
- passed: 0,
81
- failed: 0,
82
- skipped: 0,
83
- coverage: 0,
84
- duration: 0,
85
- },
86
- };
87
- }
88
- /**
89
- * Store deployment information
90
- */
91
- static getDeploymentMemoryStructure(updateSetName) {
92
- return {
93
- key: this.generateKey('deploy', 'update-sets', updateSetName),
94
- metadata: {
95
- type: 'update_set',
96
- created: new Date().toISOString(),
97
- tags: ['deployment', 'update-set'],
98
- },
99
- contents: {
100
- artifacts: [],
101
- dependencies: [],
102
- conflicts: [],
103
- targetInstance: '',
104
- },
105
- };
106
- }
107
- }
108
- exports.SnowFlowMemoryOrganizer = SnowFlowMemoryOrganizer;
109
- /**
110
- * Agent capability mappings for ServiceNow development
111
- */
112
- exports.SNOW_FLOW_AGENT_CAPABILITIES = {
113
- // UI Development
114
- 'widget-developer': ['html', 'css', 'javascript', 'angular', 'service-portal-api'],
115
- 'ui-designer': ['ui-builder', 'themes', 'branding', 'responsive-design'],
116
- // Flow Development
117
- 'flow-builder': ['flow-designer', 'triggers', 'actions', 'subflows', 'approvals'],
118
- 'integration-specialist': ['rest-api', 'soap', 'mid-server', 'integration-hub'],
119
- // Scripting
120
- 'script-developer': ['glide-api', 'business-rules', 'script-includes', 'scheduled-jobs'],
121
- 'client-scripter': ['client-scripts', 'ui-policies', 'catalog-client-scripts'],
122
- // Data & Configuration
123
- 'data-architect': ['tables', 'relationships', 'acls', 'data-policies'],
124
- 'security-engineer': ['security-rules', 'authentication', 'encryption', 'audit'],
125
- // Testing & Quality
126
- 'test-engineer': ['atf', 'unit-testing', 'regression-testing', 'performance-testing'],
127
- 'quality-analyst': ['code-review', 'best-practices', 'performance-optimization'],
128
- // Documentation & Training
129
- 'technical-writer': ['api-docs', 'user-guides', 'runbooks', 'knowledge-articles'],
130
- 'solution-architect': ['architecture-docs', 'design-patterns', 'roadmaps'],
131
- };
132
- /**
133
- * Example usage patterns for ServiceNow development
134
- */
135
- class SnowFlowWorkflowExamples {
136
- /**
137
- * Example: Create incident dashboard widget
138
- */
139
- static async createIncidentDashboard() {
140
- // 1. Store requirements
141
- // await memory.store('specs/requirements/incident-dashboard', {
142
- // title: 'Incident Dashboard Widget',
143
- // features: ['real-time updates', 'priority filtering', 'assignment groups'],
144
- // acceptance: ['shows active incidents', 'updates every 30s', 'filterable'],
145
- // });
146
- // 2. Spawn specialized agents
147
- const agents = await Promise.all([
148
- // agentSpawn({ type: 'widget-developer', capabilities: SNOW_FLOW_AGENT_CAPABILITIES['widget-developer'] }),
149
- // agentSpawn({ type: 'ui-designer', capabilities: SNOW_FLOW_AGENT_CAPABILITIES['ui-designer'] }),
150
- // agentSpawn({ type: 'test-engineer', capabilities: SNOW_FLOW_AGENT_CAPABILITIES['test-engineer'] }),
151
- ]);
152
- // 3. Coordinate work
153
- // await agentCommunicate({
154
- // to: agents[0].id,
155
- // message: 'Create widget structure based on specs/requirements/incident-dashboard'
156
- // });
157
- // await agentCommunicate({
158
- // to: agents[1].id,
159
- // message: 'Design responsive layout for incident data visualization'
160
- // });
161
- // 4. Store artifacts
162
- // await memory.store('artifacts/widgets/incident-dashboard', {
163
- // html: '<!-- widget template -->',
164
- // css: '/* widget styles */',
165
- // clientScript: '// client controller',
166
- // serverScript: '// server script',
167
- // });
168
- // 5. Track progress
169
- // await taskUpdate({ taskId: 'incident-dashboard', progress: 100 });
170
- }
171
- /**
172
- * Example: Create approval workflow
173
- */
174
- static async createApprovalFlow() {
175
- // 1. Store flow design
176
- // await memory.store('architecture/decisions/approval-flow', {
177
- // pattern: 'multi-level-approval',
178
- // levels: ['manager', 'director', 'vp'],
179
- // escalation: 'time-based',
180
- // });
181
- // 2. Spawn flow specialists
182
- // const flowBuilder = await agentSpawn({
183
- // type: 'flow-builder',
184
- // capabilities: SNOW_FLOW_AGENT_CAPABILITIES['flow-builder']
185
- // });
186
- // 3. Build flow with memory reference
187
- // await agentCommunicate({
188
- // to: flowBuilder.id,
189
- // message: 'Build approval flow using architecture/decisions/approval-flow pattern'
190
- // });
191
- // 4. Store flow artifact
192
- // await memory.store('artifacts/flows/equipment-approval', {
193
- // trigger: 'record.inserted',
194
- // actions: ['lookup-manager', 'send-approval', 'wait-response', 'update-record'],
195
- // table: 'x_company_equipment',
196
- // });
197
- }
198
- }
199
- exports.SnowFlowWorkflowExamples = SnowFlowWorkflowExamples;
200
- //# sourceMappingURL=snow-flow-memory-patterns.js.map
@@ -1,54 +0,0 @@
1
- import { MemoryEntry } from '../types/snow-flow.types.js';
2
- export interface SnowMemoryOptions {
3
- namespace?: string;
4
- dbPath?: string;
5
- enableCompression?: boolean;
6
- maxEntries?: number;
7
- cleanupInterval?: number;
8
- }
9
- export interface StoreOptions {
10
- namespace?: string;
11
- ttl?: number;
12
- metadata?: Record<string, any>;
13
- }
14
- export interface SearchOptions {
15
- namespace?: string;
16
- pattern?: string;
17
- limit?: number;
18
- offset?: number;
19
- orderBy?: 'created' | 'updated' | 'accessed';
20
- order?: 'asc' | 'desc';
21
- }
22
- export declare class SnowMemory {
23
- private db;
24
- private namespace;
25
- private dbPath;
26
- private cleanupTimer?;
27
- private options;
28
- constructor(options?: SnowMemoryOptions);
29
- initialize(): Promise<void>;
30
- store(key: string, value: any, options?: StoreOptions): Promise<void>;
31
- retrieve(key: string, namespace?: string): Promise<any>;
32
- delete(key: string, namespace?: string): Promise<void>;
33
- search(options?: SearchOptions): Promise<MemoryEntry[]>;
34
- list(namespace?: string): Promise<string[]>;
35
- exists(key: string, namespace?: string): Promise<boolean>;
36
- clear(namespace?: string): Promise<void>;
37
- cleanup(): Promise<number>;
38
- enforceMaxEntries(): Promise<void>;
39
- getStats(): Promise<{
40
- totalEntries: number;
41
- namespaces: string[];
42
- totalSize: number;
43
- oldestEntry: Date | null;
44
- newestEntry: Date | null;
45
- mostAccessed: {
46
- key: string;
47
- count: number;
48
- } | null;
49
- }>;
50
- export(filePath: string, namespace?: string): Promise<void>;
51
- import(filePath: string): Promise<number>;
52
- close(): Promise<void>;
53
- }
54
- //# sourceMappingURL=snow-memory.d.ts.map