hokipoki 0.1.1 → 0.1.2
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/lib/hokipoki/version.rb +1 -1
- metadata +18 -77
- data/LICENSE +0 -26
- data/lib/generators/hive_mind/install_generator.rb +0 -761
- data/lib/hokipoki/claude/auto_loader.rb +0 -162
- data/lib/hokipoki/claude/connection_manager.rb +0 -382
- data/lib/hokipoki/claude/parasite.rb +0 -333
- data/lib/hokipoki/configuration.rb +0 -187
- data/lib/hokipoki/engine.rb +0 -122
- data/lib/hokipoki/feedback/ascii_banners.rb +0 -108
- data/lib/hokipoki/feedback/display_manager.rb +0 -436
- data/lib/hokipoki/intelligence/smart_retrieval_engine.rb +0 -401
- data/lib/hokipoki/intelligence/unified_orchestrator.rb +0 -395
- data/lib/hokipoki/license_validator.rb +0 -296
- data/lib/hokipoki/parasites/universal_generator.rb +0 -662
- data/lib/hokipoki/railtie.rb +0 -34
- data/lib/hokipoki.rb +0 -176
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Hokipoki
|
|
4
|
-
module Feedback
|
|
5
|
-
# ASCII Art Banners for Component Installations
|
|
6
|
-
class AsciiBanners
|
|
7
|
-
PARASITE = <<~ASCII
|
|
8
|
-
╔════════════════════════════════════════════════════════════════╗
|
|
9
|
-
║ ██╗ ██╗ ██████╗ ██╗ ██╗██╗ ██████╗ ██████╗ ██╗ ██╗██╗║
|
|
10
|
-
║ ██║ ██║██╔═══██╗██║ ██╔╝██║ ██╔══██╗██╔═══██╗██║ ██╔╝██║║
|
|
11
|
-
║ ███████║██║ ██║█████╔╝ ██║█████╗██████╔╝██║ ██║█████╔╝ ██║║
|
|
12
|
-
║ ██╔══██║██║ ██║██╔═██╗ ██║╚════╝██╔═══╝ ██║ ██║██╔═██╗ ██║║
|
|
13
|
-
║ ██║ ██║╚██████╔╝██║ ██╗██║ ██║ ╚██████╔╝██║ ██╗██║║
|
|
14
|
-
║ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝║
|
|
15
|
-
╚══════════════════════ P A R A S I T E ══════════════════════════╝
|
|
16
|
-
ASCII
|
|
17
|
-
|
|
18
|
-
FORGE_GENERATOR = <<~ASCII
|
|
19
|
-
╔══════════════════════════════════════════════════════════════════════╗
|
|
20
|
-
║ ███████╗ ██████╗ ██████╗ ██████╗ ███████╗ ║
|
|
21
|
-
║ ██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██╔════╝ ║
|
|
22
|
-
║ █████╗ ██║ ██║██████╔╝██║ ███╗█████╗ ║
|
|
23
|
-
║ ██╔══╝ ██║ ██║██╔══██╗██║ ██║██╔══╝ ║
|
|
24
|
-
║ ██║ ╚██████╔╝██║ ██║╚██████╔╝███████╗ ║
|
|
25
|
-
║ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ║
|
|
26
|
-
║ ║
|
|
27
|
-
║ ██████╗ ███████╗███╗ ██╗███████╗██████╗ █████╗ ████████╗ ██████╗ ██████╗ ║
|
|
28
|
-
║ ██╔════╝ ██╔════╝████╗ ██║██╔════╝██╔══██╗██╔══██╗╚══██╔══╝██╔═══██╗██╔══██╗║
|
|
29
|
-
║ ██║ ███╗█████╗ ██╔██╗ ██║█████╗ ██████╔╝███████║ ██║ ██║ ██║██████╔╝║
|
|
30
|
-
║ ██║ ██║██╔══╝ ██║╚██╗██║██╔══╝ ██╔══██╗██╔══██║ ██║ ██║ ██║██╔══██╗║
|
|
31
|
-
║ ╚██████╔╝███████╗██║ ╚████║███████╗██║ ██║██║ ██║ ██║ ╚██████╔╝██║ ██║║
|
|
32
|
-
║ ╚═════╝ ╚══════╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝║
|
|
33
|
-
╚═════════════════════ F O R G E _ G E N E R A T O R ═════════════════════╝
|
|
34
|
-
ASCII
|
|
35
|
-
|
|
36
|
-
HIVE_MIND = <<~ASCII
|
|
37
|
-
╔══════════════════════════════════════════════════════════════════════════════╗
|
|
38
|
-
║ ██╗ ██╗██╗██╗ ██╗███████╗ ███╗ ███╗██╗███╗ ██╗██████╗ ║
|
|
39
|
-
║ ██║ ██║██║██║ ██║██╔════╝ ████╗ ████║██║████╗ ██║██╔══██╗ ║
|
|
40
|
-
║ ███████║██║██║ ██║█████╗ █████╗ ██╔████╔██║██║██╔██╗ ██║██║ ██║ ║
|
|
41
|
-
║ ██╔══██║██║╚██╗ ██╔╝██╔══╝ ╚════╝ ██║╚██╔╝██║██║██║╚██╗██║██║ ██║ ║
|
|
42
|
-
║ ██║ ██║██║ ╚████╔╝ ███████╗ ██║ ╚═╝ ██║██║██║ ╚████║██████╔╝ ║
|
|
43
|
-
║ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚══════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═════╝ ║
|
|
44
|
-
╚═══════════════════════════ H I V E - M I N D ═══════════════════════════════╝
|
|
45
|
-
ASCII
|
|
46
|
-
|
|
47
|
-
class << self
|
|
48
|
-
def display_banner(component, pastel = nil)
|
|
49
|
-
pastel ||= Pastel.new
|
|
50
|
-
|
|
51
|
-
case component.to_s.downcase
|
|
52
|
-
when 'parasite', 'parasites'
|
|
53
|
-
puts pastel.magenta.bold(PARASITE)
|
|
54
|
-
when 'forge', 'forge_generator', 'generator_forge'
|
|
55
|
-
puts pastel.yellow.bold(FORGE_GENERATOR)
|
|
56
|
-
when 'hive_mind', 'hivemind', 'vector_db', 'database'
|
|
57
|
-
puts pastel.cyan.bold(HIVE_MIND)
|
|
58
|
-
else
|
|
59
|
-
puts pastel.green.bold("🚀 #{component.to_s.upcase} INSTALLED")
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
def parasite_banner(pastel = nil)
|
|
64
|
-
pastel ||= Pastel.new
|
|
65
|
-
puts pastel.magenta.bold(PARASITE)
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
def forge_banner(pastel = nil)
|
|
69
|
-
pastel ||= Pastel.new
|
|
70
|
-
puts pastel.yellow.bold(FORGE_GENERATOR)
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
def hive_mind_banner(pastel = nil)
|
|
74
|
-
pastel ||= Pastel.new
|
|
75
|
-
puts pastel.cyan.bold(HIVE_MIND)
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
# Combined installation banner
|
|
79
|
-
def installation_complete_banner(components, pastel = nil)
|
|
80
|
-
pastel ||= Pastel.new
|
|
81
|
-
|
|
82
|
-
puts "\n" + "═" * 80
|
|
83
|
-
puts pastel.green.bold("🎉 HOKIPOKI INSTALLATION COMPLETE! 🎉").center(80)
|
|
84
|
-
puts "═" * 80
|
|
85
|
-
|
|
86
|
-
components.each do |component|
|
|
87
|
-
case component.to_s.downcase
|
|
88
|
-
when 'parasite', 'parasites'
|
|
89
|
-
puts pastel.magenta("🦠 UNIVERSAL PARASITE SYSTEM: ACTIVE")
|
|
90
|
-
when 'forge', 'forge_generator'
|
|
91
|
-
puts pastel.yellow("🏭 GENERATOR FORGE: OPERATIONAL")
|
|
92
|
-
when 'hive_mind', 'vector_db'
|
|
93
|
-
puts pastel.cyan("🧠 HIVE-MIND VECTOR DB: CONNECTED")
|
|
94
|
-
when 'security'
|
|
95
|
-
puts pastel.red("🔒 ENTERPRISE SECURITY: ENABLED")
|
|
96
|
-
when 'claude'
|
|
97
|
-
puts pastel.blue("🤖 CLAUDE INTEGRATION: READY")
|
|
98
|
-
end
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
puts "═" * 80
|
|
102
|
-
puts pastel.rainbow("Your Rails app is now a revolutionary AI intelligence platform!")
|
|
103
|
-
puts "═" * 80 + "\n"
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
end
|
|
@@ -1,436 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'pastel'
|
|
4
|
-
require 'tty-spinner'
|
|
5
|
-
require_relative 'ascii_banners'
|
|
6
|
-
|
|
7
|
-
module Hokipoki
|
|
8
|
-
module Feedback
|
|
9
|
-
# Display Manager - Provides real-time user feedback for all operations
|
|
10
|
-
# Shows exactly what's happening during vector retrieval, parasite generation, etc.
|
|
11
|
-
class DisplayManager
|
|
12
|
-
include Singleton
|
|
13
|
-
|
|
14
|
-
def initialize
|
|
15
|
-
@pastel = Pastel.new
|
|
16
|
-
@enabled = true
|
|
17
|
-
@verbose = ENV['HOKIPOKI_VERBOSE'] == 'true'
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
# Enable/disable feedback display
|
|
21
|
-
def enabled=(value)
|
|
22
|
-
@enabled = value
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def enabled?
|
|
26
|
-
@enabled
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# Vector retrieval feedback
|
|
30
|
-
def performing_vector_retrieval(query, token_budget = nil)
|
|
31
|
-
return unless @enabled
|
|
32
|
-
|
|
33
|
-
budget_text = token_budget ? " (budget: #{token_budget} tokens)" : ""
|
|
34
|
-
puts @pastel.cyan("🔍 <performing retrieval to hive_mind#{budget_text}>")
|
|
35
|
-
puts @pastel.dim(" Query: #{truncate_query(query)}")
|
|
36
|
-
|
|
37
|
-
yield if block_given?
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def pulling_from_hive_mind(operation_type = 'vectors')
|
|
41
|
-
return unless @enabled
|
|
42
|
-
|
|
43
|
-
puts @pastel.cyan("📥 <pulling #{operation_type} from hive_mind>")
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def creating_vector_embeds
|
|
47
|
-
return unless @enabled
|
|
48
|
-
|
|
49
|
-
puts @pastel.magenta("🔮 <creating new vector embeds to hive_mind>")
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
def vector_results_found(count, processing_time = nil)
|
|
53
|
-
return unless @enabled
|
|
54
|
-
|
|
55
|
-
time_text = processing_time ? " in #{processing_time}ms" : ""
|
|
56
|
-
|
|
57
|
-
if count > 0
|
|
58
|
-
puts @pastel.green("✓ <#{count} vectors found#{time_text}>")
|
|
59
|
-
else
|
|
60
|
-
puts @pastel.yellow("⚠ <no vectors found#{time_text}>")
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
def vector_context_built(facts_count, total_tokens)
|
|
65
|
-
return unless @enabled
|
|
66
|
-
|
|
67
|
-
puts @pastel.cyan("🧠 <context built from #{facts_count} facts, #{total_tokens} tokens>")
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def total_tokens_saved(saved_tokens, session_total = nil)
|
|
71
|
-
return unless @enabled
|
|
72
|
-
|
|
73
|
-
if session_total
|
|
74
|
-
puts @pastel.green("💾 <total tokens saved: #{saved_tokens} (session total: #{session_total})>")
|
|
75
|
-
else
|
|
76
|
-
puts @pastel.green("💾 <total tokens saved: #{saved_tokens}>")
|
|
77
|
-
end
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
def embedding_operation(operation, count = nil)
|
|
81
|
-
return unless @enabled
|
|
82
|
-
|
|
83
|
-
case operation
|
|
84
|
-
when 'generating'
|
|
85
|
-
count_text = count ? " (#{count} embeddings)" : ""
|
|
86
|
-
puts @pastel.yellow("🔮 <generating embeddings#{count_text}>")
|
|
87
|
-
when 'storing'
|
|
88
|
-
count_text = count ? " (#{count} vectors)" : ""
|
|
89
|
-
puts @pastel.cyan("💾 <storing vectors to hive_mind#{count_text}>")
|
|
90
|
-
when 'updating'
|
|
91
|
-
count_text = count ? " (#{count} updated)" : ""
|
|
92
|
-
puts @pastel.blue("🔄 <updating existing vectors#{count_text}>")
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
# Parasite generation feedback
|
|
97
|
-
def generating_parasite(tool, model)
|
|
98
|
-
return unless @enabled
|
|
99
|
-
|
|
100
|
-
puts @pastel.magenta("🦠 <generating #{tool} + #{model} parasite>")
|
|
101
|
-
|
|
102
|
-
yield if block_given?
|
|
103
|
-
end
|
|
104
|
-
|
|
105
|
-
def parasite_template_found(template_name, similarity_score = nil)
|
|
106
|
-
return unless @enabled
|
|
107
|
-
|
|
108
|
-
score_text = similarity_score ? " (similarity: #{(similarity_score * 100).round(1)}%)" : ""
|
|
109
|
-
puts @pastel.green("✓ <template found: #{template_name}#{score_text}>")
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
def parasite_generation_complete(parasite_name, generation_time)
|
|
113
|
-
return unless @enabled
|
|
114
|
-
|
|
115
|
-
puts @pastel.green("✅ <parasite '#{parasite_name}' generated in #{generation_time}ms>")
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
# Intelligence orchestrator feedback
|
|
119
|
-
def processing_intelligence_request(request_type, request_id)
|
|
120
|
-
return unless @enabled
|
|
121
|
-
|
|
122
|
-
puts @pastel.blue("🧠 <processing #{request_type} request [#{request_id}]>")
|
|
123
|
-
|
|
124
|
-
yield if block_given?
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
def template_routing(template_name, template_type = nil)
|
|
128
|
-
return unless @enabled
|
|
129
|
-
|
|
130
|
-
type_text = template_type ? " (#{template_type})" : ""
|
|
131
|
-
puts @pastel.cyan("🎯 <routing to template: #{template_name}#{type_text}>")
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
def intelligence_processing_complete(request_type, execution_time)
|
|
135
|
-
return unless @enabled
|
|
136
|
-
|
|
137
|
-
puts @pastel.green("✅ <#{request_type} completed in #{execution_time}s>")
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
# Database operations feedback
|
|
141
|
-
def connecting_to_database
|
|
142
|
-
return unless @enabled
|
|
143
|
-
|
|
144
|
-
puts @pastel.yellow("🔗 <connecting to vector database>")
|
|
145
|
-
|
|
146
|
-
yield if block_given?
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
def database_status(status, document_count = nil)
|
|
150
|
-
return unless @enabled
|
|
151
|
-
|
|
152
|
-
case status
|
|
153
|
-
when 'connected'
|
|
154
|
-
count_text = document_count ? " (#{document_count} documents)" : ""
|
|
155
|
-
puts @pastel.green("✓ <database connected#{count_text}>")
|
|
156
|
-
when 'disconnected'
|
|
157
|
-
puts @pastel.red("✗ <database disconnected>")
|
|
158
|
-
when 'error'
|
|
159
|
-
puts @pastel.red("❌ <database connection error>")
|
|
160
|
-
end
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
# Cache operations feedback
|
|
164
|
-
def checking_cache(cache_key)
|
|
165
|
-
return unless @enabled && @verbose
|
|
166
|
-
|
|
167
|
-
puts @pastel.dim("💾 <checking cache: #{truncate_key(cache_key)}>")
|
|
168
|
-
|
|
169
|
-
yield if block_given?
|
|
170
|
-
end
|
|
171
|
-
|
|
172
|
-
def cache_hit(cache_key)
|
|
173
|
-
return unless @enabled && @verbose
|
|
174
|
-
|
|
175
|
-
puts @pastel.green("✓ <cache hit: #{truncate_key(cache_key)}>")
|
|
176
|
-
end
|
|
177
|
-
|
|
178
|
-
def cache_miss(cache_key)
|
|
179
|
-
return unless @enabled && @verbose
|
|
180
|
-
|
|
181
|
-
puts @pastel.yellow("○ <cache miss: #{truncate_key(cache_key)}>")
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
# Brain switching feedback
|
|
185
|
-
def switching_brain(from_brain, to_brain)
|
|
186
|
-
return unless @enabled
|
|
187
|
-
|
|
188
|
-
puts @pastel.magenta("🧠 <switching brain: #{from_brain} → #{to_brain}>")
|
|
189
|
-
|
|
190
|
-
yield if block_given?
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
def brain_switched(brain_name, context_size = nil)
|
|
194
|
-
return unless @enabled
|
|
195
|
-
|
|
196
|
-
context_text = context_size ? " (#{context_size} context items)" : ""
|
|
197
|
-
puts @pastel.green("✓ <brain active: #{brain_name}#{context_text}>")
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
# Security operations feedback
|
|
201
|
-
def validating_license
|
|
202
|
-
return unless @enabled
|
|
203
|
-
|
|
204
|
-
puts @pastel.yellow("🔒 <validating license>")
|
|
205
|
-
|
|
206
|
-
yield if block_given?
|
|
207
|
-
end
|
|
208
|
-
|
|
209
|
-
def license_status(status, license_type = nil)
|
|
210
|
-
return unless @enabled
|
|
211
|
-
|
|
212
|
-
case status
|
|
213
|
-
when 'valid'
|
|
214
|
-
type_text = license_type ? " (#{license_type})" : ""
|
|
215
|
-
puts @pastel.green("✓ <license valid#{type_text}>")
|
|
216
|
-
when 'invalid'
|
|
217
|
-
puts @pastel.red("✗ <license invalid>")
|
|
218
|
-
when 'expired'
|
|
219
|
-
puts @pastel.red("❌ <license expired>")
|
|
220
|
-
end
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
# Performance feedback
|
|
224
|
-
def performance_metrics(operation, metrics)
|
|
225
|
-
return unless @enabled && @verbose
|
|
226
|
-
|
|
227
|
-
puts @pastel.dim("📊 <#{operation}: #{format_metrics(metrics)}>")
|
|
228
|
-
end
|
|
229
|
-
|
|
230
|
-
def token_usage(used_tokens, budget_tokens)
|
|
231
|
-
return unless @enabled
|
|
232
|
-
|
|
233
|
-
percentage = (used_tokens.to_f / budget_tokens * 100).round(1)
|
|
234
|
-
|
|
235
|
-
if percentage > 90
|
|
236
|
-
puts @pastel.red("⚠ <token usage: #{used_tokens}/#{budget_tokens} (#{percentage}%)>")
|
|
237
|
-
elsif percentage > 70
|
|
238
|
-
puts @pastel.yellow("⚡ <token usage: #{used_tokens}/#{budget_tokens} (#{percentage}%)>")
|
|
239
|
-
else
|
|
240
|
-
puts @pastel.green("✓ <token usage: #{used_tokens}/#{budget_tokens} (#{percentage}%)>")
|
|
241
|
-
end
|
|
242
|
-
end
|
|
243
|
-
|
|
244
|
-
# Error feedback
|
|
245
|
-
def operation_error(operation, error_message)
|
|
246
|
-
return unless @enabled
|
|
247
|
-
|
|
248
|
-
puts @pastel.red("❌ <#{operation} failed: #{error_message}>")
|
|
249
|
-
end
|
|
250
|
-
|
|
251
|
-
def operation_warning(operation, warning_message)
|
|
252
|
-
return unless @enabled
|
|
253
|
-
|
|
254
|
-
puts @pastel.yellow("⚠ <#{operation} warning: #{warning_message}>")
|
|
255
|
-
end
|
|
256
|
-
|
|
257
|
-
# Spinner operations for longer tasks
|
|
258
|
-
def with_spinner(message, success_message = nil, &block)
|
|
259
|
-
return yield unless @enabled
|
|
260
|
-
|
|
261
|
-
spinner = TTY::Spinner.new("[:spinner] #{@pastel.cyan(message)}", format: :dots)
|
|
262
|
-
spinner.auto_spin
|
|
263
|
-
|
|
264
|
-
begin
|
|
265
|
-
result = yield
|
|
266
|
-
spinner.stop(@pastel.green('✓'))
|
|
267
|
-
puts @pastel.green(success_message) if success_message
|
|
268
|
-
result
|
|
269
|
-
rescue => e
|
|
270
|
-
spinner.stop(@pastel.red('✗'))
|
|
271
|
-
puts @pastel.red("❌ <operation failed: #{e.message}>")
|
|
272
|
-
raise e
|
|
273
|
-
end
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
# Progress tracking for multi-step operations
|
|
277
|
-
def progress_tracker(total_steps, operation_name)
|
|
278
|
-
return yield unless @enabled
|
|
279
|
-
|
|
280
|
-
current_step = 0
|
|
281
|
-
|
|
282
|
-
progress_proc = proc do |step_name|
|
|
283
|
-
current_step += 1
|
|
284
|
-
percentage = (current_step.to_f / total_steps * 100).round(1)
|
|
285
|
-
puts @pastel.cyan("📈 <#{operation_name}: step #{current_step}/#{total_steps} (#{percentage}%) - #{step_name}>")
|
|
286
|
-
end
|
|
287
|
-
|
|
288
|
-
yield(progress_proc)
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
# System status feedback
|
|
292
|
-
def system_status_check(component, status, details = nil)
|
|
293
|
-
return unless @enabled
|
|
294
|
-
|
|
295
|
-
status_icon = case status
|
|
296
|
-
when 'healthy', 'operational', 'online' then @pastel.green('✓')
|
|
297
|
-
when 'degraded', 'warning' then @pastel.yellow('⚠')
|
|
298
|
-
when 'unhealthy', 'offline', 'error' then @pastel.red('✗')
|
|
299
|
-
else @pastel.dim('○')
|
|
300
|
-
end
|
|
301
|
-
|
|
302
|
-
details_text = details ? " (#{details})" : ""
|
|
303
|
-
puts "#{status_icon} <#{component}: #{status}#{details_text}>"
|
|
304
|
-
end
|
|
305
|
-
|
|
306
|
-
# Development/debug feedback
|
|
307
|
-
def debug_info(category, info)
|
|
308
|
-
return unless @enabled && (@verbose || Rails.env.development?)
|
|
309
|
-
|
|
310
|
-
puts @pastel.dim("🔧 <debug #{category}: #{info}>")
|
|
311
|
-
end
|
|
312
|
-
|
|
313
|
-
# Component installation banners
|
|
314
|
-
def component_installed(component)
|
|
315
|
-
return unless @enabled
|
|
316
|
-
|
|
317
|
-
puts "\n"
|
|
318
|
-
AsciiBanners.display_banner(component, @pastel)
|
|
319
|
-
puts @pastel.green.bold("✅ #{component.to_s.upcase} INSTALLATION COMPLETE!")
|
|
320
|
-
puts ""
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
def parasite_installed
|
|
324
|
-
return unless @enabled
|
|
325
|
-
|
|
326
|
-
puts "\n"
|
|
327
|
-
AsciiBanners.parasite_banner(@pastel)
|
|
328
|
-
puts @pastel.magenta.bold("🦠 UNIVERSAL PARASITE SYSTEM INSTALLED!")
|
|
329
|
-
puts @pastel.cyan(" 94% code reduction achieved - 17 parasites → 1 universal system")
|
|
330
|
-
puts ""
|
|
331
|
-
end
|
|
332
|
-
|
|
333
|
-
def forge_installed
|
|
334
|
-
return unless @enabled
|
|
335
|
-
|
|
336
|
-
puts "\n"
|
|
337
|
-
AsciiBanners.forge_banner(@pastel)
|
|
338
|
-
puts @pastel.yellow.bold("🏭 GENERATOR FORGE INSTALLED!")
|
|
339
|
-
puts @pastel.cyan(" Multi-LLM orchestration and heavy processing capabilities")
|
|
340
|
-
puts ""
|
|
341
|
-
end
|
|
342
|
-
|
|
343
|
-
def hive_mind_installed(document_count = nil)
|
|
344
|
-
return unless @enabled
|
|
345
|
-
|
|
346
|
-
puts "\n"
|
|
347
|
-
AsciiBanners.hive_mind_banner(@pastel)
|
|
348
|
-
puts @pastel.cyan.bold("🧠 HIVE-MIND VECTOR DATABASE INSTALLED!")
|
|
349
|
-
|
|
350
|
-
if document_count
|
|
351
|
-
puts @pastel.green(" Vector database ready with #{document_count} documents")
|
|
352
|
-
else
|
|
353
|
-
puts @pastel.green(" Vector intelligence system operational")
|
|
354
|
-
end
|
|
355
|
-
puts ""
|
|
356
|
-
end
|
|
357
|
-
|
|
358
|
-
def installation_complete(components)
|
|
359
|
-
return unless @enabled
|
|
360
|
-
|
|
361
|
-
AsciiBanners.installation_complete_banner(components, @pastel)
|
|
362
|
-
end
|
|
363
|
-
|
|
364
|
-
# Enhanced feedback for specific operations
|
|
365
|
-
def pulling_from_hive_mind(operation_type = 'vectors')
|
|
366
|
-
return unless @enabled
|
|
367
|
-
|
|
368
|
-
puts @pastel.cyan("📥 <pulling #{operation_type} from HIVE-MIND>")
|
|
369
|
-
end
|
|
370
|
-
|
|
371
|
-
def creating_vector_embeds
|
|
372
|
-
return unless @enabled
|
|
373
|
-
|
|
374
|
-
puts @pastel.magenta("🔮 <creating new vector embeds to HIVE-MIND>")
|
|
375
|
-
end
|
|
376
|
-
|
|
377
|
-
def performing_vector_retrieval(query, token_budget = nil)
|
|
378
|
-
return unless @enabled
|
|
379
|
-
|
|
380
|
-
budget_text = token_budget ? " (budget: #{token_budget} tokens)" : ""
|
|
381
|
-
puts @pastel.cyan("🔍 <performing retrieval to HIVE-MIND#{budget_text}>")
|
|
382
|
-
puts @pastel.dim(" Query: #{truncate_query(query)}")
|
|
383
|
-
|
|
384
|
-
yield if block_given?
|
|
385
|
-
end
|
|
386
|
-
|
|
387
|
-
def generating_parasite(tool, model)
|
|
388
|
-
return unless @enabled
|
|
389
|
-
|
|
390
|
-
puts @pastel.magenta("🦠 <generating #{tool} + #{model} PARASITE>")
|
|
391
|
-
|
|
392
|
-
yield if block_given?
|
|
393
|
-
end
|
|
394
|
-
|
|
395
|
-
def forge_processing(operation)
|
|
396
|
-
return unless @enabled
|
|
397
|
-
|
|
398
|
-
puts @pastel.yellow("🏭 <FORGE_GENERATOR #{operation}>")
|
|
399
|
-
end
|
|
400
|
-
|
|
401
|
-
private
|
|
402
|
-
|
|
403
|
-
def truncate_query(query, max_length = 60)
|
|
404
|
-
return query if query.length <= max_length
|
|
405
|
-
"#{query[0..max_length-4]}..."
|
|
406
|
-
end
|
|
407
|
-
|
|
408
|
-
def truncate_key(key, max_length = 30)
|
|
409
|
-
return key if key.length <= max_length
|
|
410
|
-
"#{key[0..max_length-4]}..."
|
|
411
|
-
end
|
|
412
|
-
|
|
413
|
-
def format_metrics(metrics)
|
|
414
|
-
case metrics
|
|
415
|
-
when Hash
|
|
416
|
-
metrics.map { |k, v| "#{k}: #{v}" }.join(', ')
|
|
417
|
-
when String
|
|
418
|
-
metrics
|
|
419
|
-
else
|
|
420
|
-
metrics.to_s
|
|
421
|
-
end
|
|
422
|
-
end
|
|
423
|
-
|
|
424
|
-
# Quick access class methods
|
|
425
|
-
class << self
|
|
426
|
-
def method_missing(method_name, *args, &block)
|
|
427
|
-
instance.respond_to?(method_name) ? instance.send(method_name, *args, &block) : super
|
|
428
|
-
end
|
|
429
|
-
|
|
430
|
-
def respond_to_missing?(method_name, include_private = false)
|
|
431
|
-
instance.respond_to?(method_name, include_private) || super
|
|
432
|
-
end
|
|
433
|
-
end
|
|
434
|
-
end
|
|
435
|
-
end
|
|
436
|
-
end
|