hokipoki 0.3.2 → 0.3.4
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae36fdf3aa3e19cb03cfc046274a8106d29726a51b48bf2a4fbdccfaa3f7783f
|
|
4
|
+
data.tar.gz: 93099cfd9a17a53109ac0148c31a2907091e9728eece13134af4c9a8f3eb850c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0cd8b985b1031073a8d1c540e99936d6b107d4e0e68529990aec7d5458cb2a8c55354c185bfc791f06b3cc9dbdcf293be88de54e0299553d6f4b44d7ee45902
|
|
7
|
+
data.tar.gz: 2db34753199210f301e8b2fa69a32a67dd31d4f2c83d9b1b24386d977bf04d4329be049e21923dcec6fd7a430155a92d8c357270d6c9ebe992fe9316234b53f4
|
|
@@ -27,39 +27,10 @@ module HiveMind
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def security_authentication
|
|
30
|
-
|
|
31
|
-
say @pastel.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
current_otp = generate_current_otp
|
|
35
|
-
say @pastel.cyan("Current OTP for #{Rails.application.class.module_parent_name}: #{@pastel.bold(current_otp)}")
|
|
36
|
-
say @pastel.dim("(OTP changes every 30 seconds)")
|
|
37
|
-
|
|
38
|
-
max_attempts = 3
|
|
39
|
-
attempts = 0
|
|
40
|
-
|
|
41
|
-
while attempts < max_attempts
|
|
42
|
-
otp_code = @prompt.ask("Enter the 6-digit OTP code shown above:")
|
|
43
|
-
|
|
44
|
-
if validate_otp_code(otp_code)
|
|
45
|
-
say @pastel.green("✅ Authentication successful!")
|
|
46
|
-
return true
|
|
47
|
-
else
|
|
48
|
-
attempts += 1
|
|
49
|
-
remaining = max_attempts - attempts
|
|
50
|
-
if remaining > 0
|
|
51
|
-
say @pastel.red("❌ Invalid OTP code. #{remaining} attempts remaining.")
|
|
52
|
-
# Show refreshed OTP
|
|
53
|
-
current_otp = generate_current_otp
|
|
54
|
-
say @pastel.cyan("Updated OTP: #{@pastel.bold(current_otp)}")
|
|
55
|
-
else
|
|
56
|
-
say @pastel.red("❌ Authentication failed. Installation aborted for security.")
|
|
57
|
-
exit(1)
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
false
|
|
30
|
+
# Removed fake OTP system - use real RubyGems authentication instead
|
|
31
|
+
say "\n#{@pastel.green.bold('🔒 SIMPLIFIED AUTHENTICATION')}"
|
|
32
|
+
say @pastel.yellow("No fake OTP required - use your real RubyGems account authentication.")
|
|
33
|
+
true
|
|
63
34
|
end
|
|
64
35
|
|
|
65
36
|
def welcome_message
|
|
@@ -69,10 +40,7 @@ module HiveMind
|
|
|
69
40
|
end
|
|
70
41
|
|
|
71
42
|
def gather_installation_preferences
|
|
72
|
-
#
|
|
73
|
-
security_authentication
|
|
74
|
-
|
|
75
|
-
# Always install minimal lightweight version
|
|
43
|
+
# Always install minimal lightweight version (no OTP required)
|
|
76
44
|
@config = {
|
|
77
45
|
hive_mind_enabled: true,
|
|
78
46
|
claude_parasite_enabled: true,
|
|
@@ -245,34 +213,6 @@ module HiveMind
|
|
|
245
213
|
|
|
246
214
|
private
|
|
247
215
|
|
|
248
|
-
def generate_current_otp
|
|
249
|
-
current_time = Time.now.to_i / 30
|
|
250
|
-
secret_key = "HOKIPOKI_SECURITY_#{Rails.application.class.module_parent_name}"
|
|
251
|
-
|
|
252
|
-
require 'digest'
|
|
253
|
-
Digest::SHA256.hexdigest("#{current_time}#{secret_key}").last(6)
|
|
254
|
-
end
|
|
255
|
-
|
|
256
|
-
def validate_otp_code(otp_code)
|
|
257
|
-
# Basic validation: 6 digits
|
|
258
|
-
return false unless otp_code =~ /^\d{6}$/
|
|
259
|
-
|
|
260
|
-
# For maximum security, we could integrate with actual OTP providers
|
|
261
|
-
# For now, we'll use a time-based validation that changes every 30 seconds
|
|
262
|
-
current_time = Time.now.to_i / 30
|
|
263
|
-
secret_key = "HOKIPOKI_SECURITY_#{Rails.application.class.module_parent_name}"
|
|
264
|
-
|
|
265
|
-
# Generate expected OTP based on time and app-specific secret
|
|
266
|
-
require 'digest'
|
|
267
|
-
expected_otp = Digest::SHA256.hexdigest("#{current_time}#{secret_key}").last(6)
|
|
268
|
-
|
|
269
|
-
# Also check previous 30-second window for clock drift tolerance
|
|
270
|
-
previous_time = current_time - 1
|
|
271
|
-
previous_otp = Digest::SHA256.hexdigest("#{previous_time}#{secret_key}").last(6)
|
|
272
|
-
|
|
273
|
-
otp_code == expected_otp || otp_code == previous_otp
|
|
274
|
-
end
|
|
275
|
-
|
|
276
216
|
def display_hive_mind_installation
|
|
277
217
|
require 'hokipoki/feedback/display_manager'
|
|
278
218
|
|
|
@@ -99,7 +99,7 @@ module Hokipoki
|
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
puts "═" * 80
|
|
102
|
-
puts pastel.
|
|
102
|
+
puts pastel.bright_magenta("Your Rails app is now a revolutionary AI intelligence platform!")
|
|
103
103
|
puts "═" * 80 + "\n"
|
|
104
104
|
end
|
|
105
105
|
end
|
data/lib/hokipoki/version.rb
CHANGED