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.
- checksums.yaml +4 -4
- data/.claude/CLAUDE.md +164 -0
- data/.claude/MCP.md +117 -0
- data/.claude/PERSONAS.md +114 -0
- data/.claude/RULES.md +221 -0
- data/.enhance_swarm/archives/session_1751182876_06ee7e0e_20250629_094116.json +16 -0
- data/.enhance_swarm/archives/session_1751187567_9d1227c8_20250629_105927.json +16 -0
- data/.enhance_swarm/archives/session_1751190454_6faf48a2_20250629_114734.json +16 -0
- data/.enhance_swarm/archives/session_1751190516_3e4f9437_20250629_114836.json +16 -0
- data/.enhance_swarm/archives/session_1751192354_79568f0f_20250629_121914.json +16 -0
- data/.enhance_swarm/archives/session_1751195070_99653548_20250629_130433.json +16 -0
- data/.enhance_swarm/archives/session_1751196542_a292e40c_20250629_132902.json +7 -0
- data/.enhance_swarm/archives/session_1751196824_9b65d28e_20250629_133344.json +24 -0
- data/.enhance_swarm/archives/session_1751197867_d16edbc5_20250629_135109.json +24 -0
- data/.enhance_swarm/archives/session_1751208541_f9531ce5_20250629_164901.json +16 -0
- data/.enhance_swarm/logs/backend_error.log +0 -0
- data/.enhance_swarm/logs/backend_output.log +0 -0
- data/.enhance_swarm/logs/debug_manual_error.log +0 -0
- data/.enhance_swarm/logs/debug_manual_output.log +18 -0
- data/.enhance_swarm/logs/frontend_error.log +0 -0
- data/.enhance_swarm/logs/frontend_output.log +45 -0
- data/.enhance_swarm/logs/general_error.log +0 -0
- data/.enhance_swarm/logs/general_output.log +0 -0
- data/.enhance_swarm/user_patterns.json +5 -5
- data/.enhance_swarm.yml +33 -0
- data/CHANGELOG.md +71 -0
- data/DEPLOYMENT.md +344 -0
- data/README.md +277 -789
- data/lib/enhance_swarm/agent_spawner.rb +210 -13
- data/lib/enhance_swarm/cli.rb +169 -8
- data/lib/enhance_swarm/control_agent.rb +28 -27
- data/lib/enhance_swarm/smart_orchestration.rb +60 -0
- data/lib/enhance_swarm/task_coordinator.rb +1327 -0
- data/lib/enhance_swarm/version.rb +1 -1
- data/lib/enhance_swarm/visual_dashboard.rb +2 -1
- metadata +34 -20
- data/PRODUCTION_TEST_LOG.md +0 -502
- data/setup.sh +0 -86
- data/test_builtin_functionality.rb +0 -121
- data/test_core_components.rb +0 -156
- data/test_real_claude_integration.rb +0 -285
- data/test_security.rb +0 -150
- data/test_smart_defaults.rb +0 -155
- data/test_task_integration.rb +0 -173
- data/test_web_ui.rb +0 -245
- data/web/assets/css/main.css +0 -645
- data/web/assets/js/kanban.js +0 -499
- data/web/assets/js/main.js +0 -525
- data/web/templates/dashboard.html.erb +0 -226
- 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
|