enhance_swarm 1.0.0 โ†’ 2.1.0

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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/CLAUDE.md +164 -0
  3. data/.claude/MCP.md +117 -0
  4. data/.claude/PERSONAS.md +114 -0
  5. data/.claude/RULES.md +221 -0
  6. data/.enhance_swarm/archives/session_1751182876_06ee7e0e_20250629_094116.json +16 -0
  7. data/.enhance_swarm/archives/session_1751187567_9d1227c8_20250629_105927.json +16 -0
  8. data/.enhance_swarm/archives/session_1751190454_6faf48a2_20250629_114734.json +16 -0
  9. data/.enhance_swarm/archives/session_1751190516_3e4f9437_20250629_114836.json +16 -0
  10. data/.enhance_swarm/archives/session_1751192354_79568f0f_20250629_121914.json +16 -0
  11. data/.enhance_swarm/archives/session_1751195070_99653548_20250629_130433.json +16 -0
  12. data/.enhance_swarm/archives/session_1751196542_a292e40c_20250629_132902.json +7 -0
  13. data/.enhance_swarm/archives/session_1751196824_9b65d28e_20250629_133344.json +24 -0
  14. data/.enhance_swarm/archives/session_1751197867_d16edbc5_20250629_135109.json +24 -0
  15. data/.enhance_swarm/archives/session_1751208541_f9531ce5_20250629_164901.json +16 -0
  16. data/.enhance_swarm/logs/backend_error.log +0 -0
  17. data/.enhance_swarm/logs/backend_output.log +0 -0
  18. data/.enhance_swarm/logs/debug_manual_error.log +0 -0
  19. data/.enhance_swarm/logs/debug_manual_output.log +18 -0
  20. data/.enhance_swarm/logs/frontend_error.log +0 -0
  21. data/.enhance_swarm/logs/frontend_output.log +45 -0
  22. data/.enhance_swarm/logs/general_error.log +0 -0
  23. data/.enhance_swarm/logs/general_output.log +0 -0
  24. data/.enhance_swarm/user_patterns.json +5 -5
  25. data/.enhance_swarm.yml +33 -0
  26. data/CHANGELOG.md +71 -0
  27. data/DEPLOYMENT.md +344 -0
  28. data/README.md +277 -789
  29. data/lib/enhance_swarm/agent_spawner.rb +210 -13
  30. data/lib/enhance_swarm/cli.rb +169 -8
  31. data/lib/enhance_swarm/control_agent.rb +28 -27
  32. data/lib/enhance_swarm/smart_orchestration.rb +60 -0
  33. data/lib/enhance_swarm/task_coordinator.rb +1327 -0
  34. data/lib/enhance_swarm/version.rb +1 -1
  35. data/lib/enhance_swarm/visual_dashboard.rb +2 -1
  36. metadata +34 -20
  37. data/PRODUCTION_TEST_LOG.md +0 -502
  38. data/setup.sh +0 -86
  39. data/test_builtin_functionality.rb +0 -121
  40. data/test_core_components.rb +0 -156
  41. data/test_real_claude_integration.rb +0 -285
  42. data/test_security.rb +0 -150
  43. data/test_smart_defaults.rb +0 -155
  44. data/test_task_integration.rb +0 -173
  45. data/test_web_ui.rb +0 -245
  46. data/web/assets/css/main.css +0 -645
  47. data/web/assets/js/kanban.js +0 -499
  48. data/web/assets/js/main.js +0 -525
  49. data/web/templates/dashboard.html.erb +0 -226
  50. data/web/templates/kanban.html.erb +0 -193
data/test_web_ui.rb DELETED
@@ -1,245 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- # Test script for Web UI functionality
5
-
6
- require_relative 'lib/enhance_swarm'
7
-
8
- def test_web_ui_components
9
- puts "๐Ÿงช Testing Web UI Components"
10
- puts "=" * 50
11
-
12
- begin
13
- # Test WebUI class creation
14
- puts "\n๐ŸŒ Testing WebUI class:"
15
-
16
- web_ui = EnhanceSwarm::WebUI.new(port: 4568, host: 'localhost')
17
- puts " โœ… WebUI instance created successfully"
18
- puts " ๐Ÿ“Š Port: #{web_ui.port}"
19
- puts " ๐Ÿ“Š Server: #{web_ui.server.class.name}"
20
-
21
- # Test template directory structure
22
- puts "\n๐Ÿ“ Testing template structure:"
23
-
24
- templates_dir = File.join(Dir.pwd, 'web', 'templates')
25
- assets_dir = File.join(Dir.pwd, 'web', 'assets')
26
-
27
- puts " ๐Ÿ“‚ Templates directory: #{File.exist?(templates_dir) ? 'โœ…' : 'โŒ'} #{templates_dir}"
28
- puts " ๐Ÿ“‚ Assets directory: #{File.exist?(assets_dir) ? 'โœ…' : 'โŒ'} #{assets_dir}"
29
-
30
- # Check for key template files
31
- template_files = ['dashboard.html.erb', 'kanban.html.erb']
32
- template_files.each do |file|
33
- file_path = File.join(templates_dir, file)
34
- puts " ๐Ÿ“„ #{file}: #{File.exist?(file_path) ? 'โœ…' : 'โŒ'}"
35
- end
36
-
37
- # Check for asset files
38
- css_file = File.join(assets_dir, 'css', 'main.css')
39
- js_files = ['main.js', 'kanban.js']
40
-
41
- puts " ๐ŸŽจ main.css: #{File.exist?(css_file) ? 'โœ…' : 'โŒ'}"
42
- js_files.each do |file|
43
- file_path = File.join(assets_dir, 'js', file)
44
- puts " ๐Ÿ“œ #{file}: #{File.exist?(file_path) ? 'โœ…' : 'โŒ'}"
45
- end
46
-
47
- puts "\nโœ… Web UI components test completed successfully!"
48
-
49
- rescue StandardError => e
50
- puts "\nโŒ Error testing Web UI components: #{e.message}"
51
- puts e.backtrace.first(5).join("\n")
52
- return false
53
- end
54
-
55
- true
56
- end
57
-
58
- def test_api_integration
59
- puts "\n๐Ÿ”— Testing API Integration:"
60
- puts "=" * 50
61
-
62
- begin
63
- # Test orchestrator integration
64
- orchestrator = EnhanceSwarm::Orchestrator.new
65
- puts " โœ… Orchestrator created for API integration"
66
-
67
- # Test task management data
68
- task_data = orchestrator.get_task_management_data
69
- puts " ๐Ÿ“Š Task management data structure: #{task_data.keys.join(', ')}"
70
-
71
- # Test process monitor
72
- monitor = EnhanceSwarm::ProcessMonitor.new
73
- status_data = monitor.status
74
- puts " ๐Ÿ“Š Process monitor status: #{status_data[:session_exists] ? 'Session exists' : 'No session'}"
75
-
76
- # Test configuration
77
- config = EnhanceSwarm.configuration
78
- puts " โš™๏ธ Configuration loaded: #{config.project_name}"
79
-
80
- puts " โœ… API integration test completed!"
81
-
82
- rescue StandardError => e
83
- puts " โŒ Error testing API integration: #{e.message}"
84
- return false
85
- end
86
-
87
- true
88
- end
89
-
90
- def test_cli_command
91
- puts "\n๐Ÿ’ป Testing CLI Command:"
92
- puts "=" * 50
93
-
94
- begin
95
- # Test CLI help to see if ui command is available
96
- help_output = `bundle exec enhance-swarm help 2>/dev/null`
97
-
98
- if help_output.include?('ui')
99
- puts " โœ… 'ui' command available in CLI"
100
- else
101
- puts " โŒ 'ui' command not found in CLI help"
102
- return false
103
- end
104
-
105
- # Test UI command help
106
- ui_help = `bundle exec enhance-swarm help ui 2>/dev/null`
107
-
108
- if ui_help.include?('Start the EnhanceSwarm Web UI')
109
- puts " โœ… UI command help text correct"
110
- else
111
- puts " โš ๏ธ UI command help may be missing or incorrect"
112
- end
113
-
114
- puts " โœ… CLI command test completed!"
115
-
116
- rescue StandardError => e
117
- puts " โŒ Error testing CLI command: #{e.message}"
118
- return false
119
- end
120
-
121
- true
122
- end
123
-
124
- def test_file_contents
125
- puts "\n๐Ÿ“„ Testing File Contents:"
126
- puts "=" * 50
127
-
128
- begin
129
- # Test dashboard template
130
- dashboard_path = File.join(Dir.pwd, 'web', 'templates', 'dashboard.html.erb')
131
- if File.exist?(dashboard_path)
132
- dashboard_content = File.read(dashboard_path)
133
-
134
- # Check for key components
135
- components = ['navbar', 'dashboard-grid', 'status-overview', 'active-agents', 'kanban']
136
- components.each do |component|
137
- if dashboard_content.include?(component)
138
- puts " โœ… Dashboard contains #{component}"
139
- else
140
- puts " โš ๏ธ Dashboard missing #{component}"
141
- end
142
- end
143
- end
144
-
145
- # Test CSS file
146
- css_path = File.join(Dir.pwd, 'web', 'assets', 'css', 'main.css')
147
- if File.exist?(css_path)
148
- css_content = File.read(css_path)
149
- css_size_kb = (css_content.length / 1024.0).round(1)
150
- puts " โœ… CSS file size: #{css_size_kb}KB"
151
-
152
- # Check for key styles
153
- styles = ['navbar', 'kanban-board', 'task-card', 'modal']
154
- styles.each do |style|
155
- if css_content.include?(style)
156
- puts " โœ… CSS contains #{style} styles"
157
- else
158
- puts " โš ๏ธ CSS missing #{style} styles"
159
- end
160
- end
161
- end
162
-
163
- # Test JavaScript
164
- js_path = File.join(Dir.pwd, 'web', 'assets', 'js', 'main.js')
165
- if File.exist?(js_path)
166
- js_content = File.read(js_path)
167
- js_size_kb = (js_content.length / 1024.0).round(1)
168
- puts " โœ… Main JS file size: #{js_size_kb}KB"
169
-
170
- # Check for key functions
171
- functions = ['apiRequest', 'initializeDashboard', 'spawnAgent', 'showNotification']
172
- functions.each do |func|
173
- if js_content.include?(func)
174
- puts " โœ… JS contains #{func} function"
175
- else
176
- puts " โš ๏ธ JS missing #{func} function"
177
- end
178
- end
179
- end
180
-
181
- puts " โœ… File contents test completed!"
182
-
183
- rescue StandardError => e
184
- puts " โŒ Error testing file contents: #{e.message}"
185
- return false
186
- end
187
-
188
- true
189
- end
190
-
191
- def manual_ui_test_instructions
192
- puts "\n๐ŸŽฏ Manual UI Testing Instructions:"
193
- puts "=" * 50
194
- puts
195
- puts "To manually test the Web UI:"
196
- puts "1. Run: bundle exec enhance-swarm ui"
197
- puts "2. Open browser to: http://localhost:4567"
198
- puts "3. Test the following features:"
199
- puts " โ€ข Dashboard loads with status overview"
200
- puts " โ€ข Navigation between pages works"
201
- puts " โ€ข Kanban board displays task columns"
202
- puts " โ€ข Agent spawning modal opens and functions"
203
- puts " โ€ข Auto-refresh updates data every 30 seconds"
204
- puts " โ€ข Responsive design works on mobile"
205
- puts
206
- puts "4. Check browser console for JavaScript errors"
207
- puts "5. Verify API endpoints return proper JSON:"
208
- puts " โ€ข GET /api/status"
209
- puts " โ€ข GET /api/tasks"
210
- puts " โ€ข GET /api/config"
211
- puts " โ€ข GET /api/project/analyze"
212
- puts " โ€ข POST /api/agents/spawn"
213
- puts
214
- end
215
-
216
- # Run tests
217
- puts "๐Ÿš€ Starting Web UI Tests"
218
- puts
219
-
220
- all_passed = true
221
-
222
- all_passed &= test_web_ui_components
223
- all_passed &= test_api_integration
224
- all_passed &= test_cli_command
225
- all_passed &= test_file_contents
226
-
227
- if all_passed
228
- puts "\n๐ŸŽ‰ All Web UI tests passed!"
229
- manual_ui_test_instructions
230
-
231
- puts "\n๐Ÿ“‹ UI Development Summary:"
232
- puts " โœ… Complete web-based interface created"
233
- puts " โœ… Task management kanban board implemented"
234
- puts " โœ… Agent monitoring dashboard built"
235
- puts " โœ… Project management features included"
236
- puts " โœ… Responsive design with modern UI/UX"
237
- puts " โœ… Real-time updates and notifications"
238
- puts " โœ… REST API backend for all functionality"
239
- puts " โœ… Integration with swarm-tasks gem"
240
- puts " โœ… Smart project analysis and defaults"
241
- puts
242
- puts "๐ŸŽฏ Ready for production use!"
243
- else
244
- puts "\n๐Ÿ’ฅ Some Web UI tests failed!"
245
- end