hokipoki 0.7.1 โ†’ 0.8.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a28a93f7a63fe34c78ad0a7a8cbafd7b580394706ad0aed259b1f5c2d7577f55
4
- data.tar.gz: 8e848a028577835f20bf1b950b4089efc58d858ec88e2f4a8fc892539ba6f4e4
3
+ metadata.gz: 442a9a68f04339c19320537ec38cf109012d2d9c779b4f9a4426ec5feb19d927
4
+ data.tar.gz: a7a7b96a3f842fd092409e4c6fd721c6a196c89a25f6db32b4173bb99362e600
5
5
  SHA512:
6
- metadata.gz: f7e2f1efc86028b124b4b3ef2e84fbf374c446321e8e6ad377f4bd97cff86e79751eb8edaa8e356b44f77495e6ad520643e453b98fa734cc9652c1d004df9b7d
7
- data.tar.gz: 4d84834ef11b9cc98400cf9269e01df1ac6b89f2f2bc8d7162a1fc4f751ddf399e9d090916d2db0cc1c11c05c599dd1383663e17b9dec849d571f5f80f17e5b3
6
+ metadata.gz: 38c2e9156e49bb5ab24f053e003b84fc22291032cda88a22d183bb60073e2f5c2943c9c51370c09b11c65e094d43c20a0bada082e69c55ef4c49bc867958e035
7
+ data.tar.gz: 369bd8d52c249f864104dae9f2d7657653fca40372d2778889b38503fb72ca70fbeb0a3e8711a44632a5aac98caecb03007ff90d864e17261f0f54280f897ba4
@@ -41,13 +41,16 @@ module HiveMind
41
41
 
42
42
  def check_hokipoki_installation
43
43
  unless File.exist?('config/initializers/hokipoki.rb')
44
- say @pastel.red("โŒ Hokipoki not installed!")
45
- say @pastel.yellow("Please run: rails g hokipoki:install first")
46
- say @pastel.white("This sets up core dependencies and authentication.")
47
- exit(1)
48
- end
44
+ say @pastel.yellow("๐Ÿ“ฆ Hokipoki not installed - installing automatically...")
45
+ say @pastel.cyan("Running: rails g hokipoki:install")
46
+
47
+ # Automatically run hokipoki:install
48
+ invoke 'hokipoki:install', [], {}
49
49
 
50
- say @pastel.green("โœ… Hokipoki core detected")
50
+ say @pastel.green("โœ… Hokipoki core installed")
51
+ else
52
+ say @pastel.green("โœ… Hokipoki core detected")
53
+ end
51
54
  end
52
55
 
53
56
  def gather_installation_preferences
@@ -175,6 +178,9 @@ module HiveMind
175
178
  run 'yarn install' if @config[:frontend_assets] && File.exist?('package.json')
176
179
  end
177
180
 
181
+ # Automatically attach parasite for Claude
182
+ setup_automatic_parasite_attachment
183
+
178
184
  # Display component banners as they're installed
179
185
  display_component_installations
180
186
 
@@ -195,46 +201,59 @@ module HiveMind
195
201
  end
196
202
  end
197
203
 
198
- def display_completion_message
199
- say "\n#{@pastel.green.bold('โœ… HokiPoki lightweight installation completed!')}"
200
- say "\n#{@pastel.cyan.bold('๐ŸŽฏ ESSENTIAL NEXT STEPS - START SERVICES:')}"
204
+ def setup_automatic_parasite_attachment
205
+ say "\n#{@pastel.cyan('๐Ÿฆ  Setting up automatic parasite attachment...')}"
206
+
207
+ # Run the parasite attachment generator
208
+ invoke 'hokipoki:attach_parasite', ['claude_cli'], {
209
+ parasite_type: 'claude_cli',
210
+ auto_hijack: true,
211
+ behavioral_analysis: true,
212
+ intelligent_injection: true
213
+ }
201
214
 
202
- say "\n #{@pastel.yellow('1. Install gem dependencies:')}"
203
- say " #{@pastel.cyan('bundle install')}"
215
+ say @pastel.green("โœ… Parasite attachment configured for Claude")
216
+ end
204
217
 
205
- say "\n #{@pastel.yellow('2. Run database migrations:')}"
206
- say " #{@pastel.cyan('rails db:migrate')}"
218
+ def display_completion_message
219
+ say "\n#{@pastel.green.bold('๐ŸŽ‰ COMPLETE UNIFIED INSTALLATION FINISHED!')}"
220
+ say "\n#{@pastel.cyan.bold('๐ŸŽฏ EVERYTHING IS NOW READY - JUST START YOUR SERVICES:')}"
207
221
 
208
- say "\n #{@pastel.yellow('3. ๐Ÿš€ START RAILS SERVER (REQUIRED):')}"
209
- say " #{@pastel.cyan('rails server')} #{@pastel.dim('(Keep this running in background)')}"
210
- say " #{@pastel.dim('๐Ÿ“ This enables HiveMind connection for Claude')}"
222
+ say "\n #{@pastel.green('โœ… Hokipoki Core:')} #{@pastel.dim('Installed automatically')}"
223
+ say " #{@pastel.green('โœ… HiveMind:')} #{@pastel.dim('Vector database ready')}"
224
+ say " #{@pastel.green('โœ… Parasite:')} #{@pastel.dim('Claude hijacking configured')}"
225
+ say " #{@pastel.green('โœ… Gemini Refiner:')} #{@pastel.dim('Vector refinement ready')}"
211
226
 
212
- say "\n #{@pastel.yellow('4. ๐Ÿง  START HIVEMIND CONNECTION:')}"
213
- say " #{@pastel.cyan('rails g hive_mind:start')} #{@pastel.dim('(Run this to establish Claude link)')}"
214
- say " #{@pastel.dim('๐Ÿ“ Creates bin/hive_mind_connect script')}"
227
+ say "\n #{@pastel.yellow('1. Start Rails server:')}"
228
+ say " #{@pastel.cyan('rails server')} #{@pastel.dim('(Keep this running)')}"
215
229
 
216
- say "\n #{@pastel.yellow('5. ๐Ÿฆ  ACTIVATE CLAUDE PARASITE:')}"
230
+ say "\n #{@pastel.yellow('2. Test Claude enhancement:')}"
217
231
  say " #{@pastel.cyan('Exit Claude and restart:')} #{@pastel.magenta('claude')}"
218
- say " #{@pastel.dim('๐Ÿ“ Auto-detects running Rails server + HiveMind')}"
232
+ say " #{@pastel.dim('๐Ÿฆ  Parasite will auto-attach when Claude starts')}"
233
+
234
+ say "\n #{@pastel.yellow('3. Optional - Start Gemini refinement:')}"
235
+ say " #{@pastel.cyan('rails gemini:start')} #{@pastel.dim('(In new terminal for vector refinement)')}"
219
236
 
220
237
  say "\n#{@pastel.red.bold('โš ๏ธ CONNECTION STATUS INDICATORS:')}"
221
238
  say " #{@pastel.green('๐Ÿง  HIVE_MIND: CONNECTED')} #{@pastel.dim('- HiveMind active')}"
222
239
  say " #{@pastel.green('๐Ÿฆ  PARASITE: INTERCEPTING')} #{@pastel.dim('- Claude enhancement active')}"
223
240
  say " #{@pastel.green('๐Ÿ’ฐ TOKEN SAVINGS: ACTIVE')} #{@pastel.dim('- Cost optimization running')}"
224
241
 
225
- say "\n #{@pastel.yellow('6. ๐Ÿงช TEST ENHANCED CLAUDE:')}"
242
+ say "\n #{@pastel.yellow('4. ๐Ÿงช TEST ENHANCED CLAUDE:')}"
226
243
  say " #{@pastel.dim('Ask Claude:')} #{@pastel.cyan('\"Explain this Rails app structure\"')}"
227
- say " #{@pastel.dim('Look for:')} #{@pastel.green('๐Ÿ“Š Tokens Saved, โšก Processing Time, ๐ŸŽฏ Efficiency')}"
228
-
229
- say "\n#{@pastel.blue.bold('๐Ÿ“ Files Created:')}"
230
- say " - config/initializers/hokipoki.rb"
231
- say " - app/models/hive_mind_document.rb (with vector embeddings)"
232
- say " - app/services/embedding_service.rb (Claude-focused)"
233
- say " - app/services/smart_retrieval_engine.rb"
234
- say " - db/migrate/create_hive_mind_documents.rb (with pgvector)"
235
-
236
- say "\n#{@pastel.green.bold('๐Ÿง  Claude + HiveMind Integration Ready!')}"
237
- say "#{@pastel.dim('Run the steps above to activate your enhanced Claude experience.')}"
244
+ say " #{@pastel.dim('Look for:')} #{@pastel.green('๐Ÿฆ  Parasitic enhancement active')}"
245
+
246
+ say "\n#{@pastel.blue.bold('๐Ÿ“ Complete Installation Includes:')}"
247
+ say " - #{@pastel.green('โœ…')} Hokipoki core (config/initializers/hokipoki.rb)"
248
+ say " - #{@pastel.green('โœ…')} HiveMind (app/models/hive_mind_document.rb)"
249
+ say " - #{@pastel.green('โœ…')} Vector embeddings (app/services/embedding_service.rb)"
250
+ say " - #{@pastel.green('โœ…')} Smart retrieval (app/services/smart_retrieval_engine.rb)"
251
+ say " - #{@pastel.green('โœ…')} Parasite attachment (automatic Claude hijacking)"
252
+ say " - #{@pastel.green('โœ…')} Gemini refinement (rails gemini:start)"
253
+ say " - #{@pastel.green('โœ…')} Database migrations (with pgvector)"
254
+
255
+ say "\n#{@pastel.green.bold('๐Ÿš€ ONE-COMMAND SETUP COMPLETE!')}"
256
+ say "#{@pastel.cyan('rails g hive_mind:install')} #{@pastel.dim('installs everything you need!')}"
238
257
  end
239
258
 
240
259
  private
@@ -302,28 +302,44 @@ module Hokipoki
302
302
  main_config_file = "config/initializers/hokipoki.rb"
303
303
 
304
304
  if File.exist?(main_config_file)
305
- # Add parasite attachment flag to existing config
306
- config_addition = <<~RUBY
307
-
308
- # Parasite attachment enabled
309
- Rails.application.configure do |config|
310
- config.parasite_attachment = true
311
- config.parasite_type = '#{options[:parasite_type]}'
305
+ # Check if it's already a Hokipoki.configure block
306
+ file_content = File.read(main_config_file)
307
+
308
+ if file_content.include?('Hokipoki.configure')
309
+ # Add to existing Hokipoki.configure block
310
+ gsub_file main_config_file, /(Hokipoki\.configure do \|config\|.*?)(end)/m do |match|
311
+ existing_config = $1
312
+ existing_config + <<~RUBY
313
+ # Parasite attachment enabled
314
+ config.parasite_attachment = true
315
+ config.parasite_type = '#{options[:parasite_type]}'
316
+ RUBY
317
+ + $2
312
318
  end
313
- RUBY
319
+ else
320
+ # Add new Hokipoki.configure block
321
+ config_addition = <<~RUBY
322
+
323
+ # Parasite attachment configuration
324
+ Hokipoki.configure do |config|
325
+ config.parasite_attachment = true
326
+ config.parasite_type = '#{options[:parasite_type]}'
327
+ end
328
+ RUBY
329
+
330
+ append_to_file main_config_file, config_addition
331
+ end
314
332
 
315
- append_to_file main_config_file, config_addition
316
333
  say "๐Ÿ“ Updated main hokipoki config", :green
317
334
  else
318
335
  # Create the config file if it doesn't exist
319
336
  create_file main_config_file, <<~RUBY
320
- # HokiPoki Configuration
321
-
322
- Rails.application.configure do |config|
323
- # Parasite attachment enabled
324
- config.parasite_attachment = true
325
- config.parasite_type = '#{options[:parasite_type]}'
326
- end
337
+ # HokiPoki Configuration
338
+ Hokipoki.configure do |config|
339
+ # Parasite attachment enabled
340
+ config.parasite_attachment = true
341
+ config.parasite_type = '#{options[:parasite_type]}'
342
+ end
327
343
  RUBY
328
344
  say "๐Ÿ“ Created hokipoki config with parasite settings", :green
329
345
  end
@@ -25,6 +25,8 @@ module Hokipoki
25
25
  :verbose_logging,
26
26
  :hive_mind_enabled,
27
27
  :claude_parasite_enabled,
28
+ :parasite_attachment,
29
+ :parasite_type,
28
30
  :redis_url
29
31
 
30
32
  def initialize
@@ -62,6 +64,11 @@ module Hokipoki
62
64
  # Legacy settings
63
65
  @hive_mind_enabled = false # Will be true after installation
64
66
  @claude_parasite_enabled = true
67
+
68
+ # Parasite attachment settings
69
+ @parasite_attachment = false
70
+ @parasite_type = 'claude_cli'
71
+
65
72
  @redis_url = ENV.fetch('REDIS_URL', 'redis://localhost:6379/0')
66
73
  end
67
74
 
@@ -1,3 +1,3 @@
1
1
  module Hokipoki
2
- VERSION = "0.7.1"
2
+ VERSION = "0.8.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hokipoki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rails Utilities