hokipoki 0.8.7 → 0.8.8
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/claude_auto_loader.rb +11 -0
- data/lib/hokipoki/claude_status_injector.rb +117 -0
- data/lib/hokipoki/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9664d39f24e1a8b1895db4adacd8524bf1547f2188f5cb994d2d537bb56c5c14
|
|
4
|
+
data.tar.gz: 257fe968ce01376a606e5ff6bb10383a2b41a96fc2a96e67a7fa4b9dbab83741
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd8c931228be0943d4335306232c8430b316bd300dadf943a40c48a83eb5801fb49046f77adf669bc455f139d8483a8aed13147839c1f7d58f77754032ba4850
|
|
7
|
+
data.tar.gz: 0cb301f62867d6ca10ea78f637a9f286e33d440b0b15ee6bd00f85c294889642a1007551616c78b10c8fa01030f8682df0efce09a96a253fb96840bc520e06ac
|
|
@@ -40,8 +40,10 @@ module Hokipoki
|
|
|
40
40
|
Rails.logger.info "✅ Claude 10X enhancement activated successfully"
|
|
41
41
|
store_activation_success
|
|
42
42
|
display_hive_mind_connected
|
|
43
|
+
start_claude_status_injection
|
|
43
44
|
else
|
|
44
45
|
Rails.logger.warn "⚠️ Claude activation script completed with warnings"
|
|
46
|
+
start_claude_status_injection # Start anyway
|
|
45
47
|
end
|
|
46
48
|
rescue => e
|
|
47
49
|
Rails.logger.error "❌ Claude activation failed: #{e.message}"
|
|
@@ -49,6 +51,7 @@ module Hokipoki
|
|
|
49
51
|
end
|
|
50
52
|
else
|
|
51
53
|
Rails.logger.info "📝 ACTIVATE_10X_CLAUDE.sh not found - using lightweight Claude integration"
|
|
54
|
+
start_claude_status_injection
|
|
52
55
|
end
|
|
53
56
|
end
|
|
54
57
|
|
|
@@ -140,6 +143,7 @@ module Hokipoki
|
|
|
140
143
|
message += "📊 Smart fact retrieval: ONLINE\n"
|
|
141
144
|
message += "🚀 Claude thinking process: HIJACKED\n"
|
|
142
145
|
message += "🦠 Parasitic enhancement: TRANSPARENT\n"
|
|
146
|
+
message += "💡 Real-time status injection: ENABLED\n"
|
|
143
147
|
message += "="*80 + "\n\n"
|
|
144
148
|
|
|
145
149
|
# Output to both stdout and stderr to ensure visibility
|
|
@@ -153,5 +157,12 @@ module Hokipoki
|
|
|
153
157
|
# Also log it
|
|
154
158
|
Rails.logger.info "🧠 PARASITIC INTELLIGENCE ACTIVATED - Claude hijacking successful"
|
|
155
159
|
end
|
|
160
|
+
|
|
161
|
+
def self.start_claude_status_injection
|
|
162
|
+
require_relative 'claude_status_injector'
|
|
163
|
+
|
|
164
|
+
Rails.logger.info "💡 Starting Claude status injection thread"
|
|
165
|
+
Hokipoki::ClaudeStatusInjector.start_monitoring
|
|
166
|
+
end
|
|
156
167
|
end
|
|
157
168
|
end
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
module Hokipoki
|
|
2
|
+
class ClaudeStatusInjector
|
|
3
|
+
def self.start_monitoring
|
|
4
|
+
return unless claude_detected?
|
|
5
|
+
|
|
6
|
+
Thread.new do
|
|
7
|
+
loop do
|
|
8
|
+
begin
|
|
9
|
+
# Check for Gemini activity
|
|
10
|
+
inject_gemini_status if gemini_active?
|
|
11
|
+
|
|
12
|
+
# Check for vector updates
|
|
13
|
+
inject_vector_status if vectors_updated?
|
|
14
|
+
|
|
15
|
+
# Check for parasite activity
|
|
16
|
+
inject_parasite_status if parasite_active?
|
|
17
|
+
|
|
18
|
+
sleep(30) # Check every 30 seconds
|
|
19
|
+
rescue => e
|
|
20
|
+
# Silently handle errors to avoid breaking Claude
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
private
|
|
27
|
+
|
|
28
|
+
def self.claude_detected?
|
|
29
|
+
ENV['CLAUDE_CLI'] == 'true' ||
|
|
30
|
+
File.exist?('/tmp/claude_session_active') ||
|
|
31
|
+
$0.include?('claude')
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def self.gemini_active?
|
|
35
|
+
File.exist?('/tmp/gemini_status.log') &&
|
|
36
|
+
File.mtime('/tmp/gemini_status.log') > 2.minutes.ago
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.vectors_updated?
|
|
40
|
+
return false unless defined?(HiveMindDocument)
|
|
41
|
+
|
|
42
|
+
begin
|
|
43
|
+
recent_vectors = HiveMindDocument.where('created_at > ?', 1.minute.ago).count
|
|
44
|
+
recent_vectors > 0
|
|
45
|
+
rescue
|
|
46
|
+
false
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def self.parasite_active?
|
|
51
|
+
File.exist?('/tmp/hokipoki_parasite_active') &&
|
|
52
|
+
File.mtime('/tmp/hokipoki_parasite_active') > 5.minutes.ago
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def self.inject_gemini_status
|
|
56
|
+
begin
|
|
57
|
+
stats = get_gemini_stats
|
|
58
|
+
if stats
|
|
59
|
+
status_message = build_gemini_status(stats)
|
|
60
|
+
inject_to_claude(status_message)
|
|
61
|
+
end
|
|
62
|
+
rescue
|
|
63
|
+
# Silently handle errors
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def self.inject_vector_status
|
|
68
|
+
begin
|
|
69
|
+
if defined?(HiveMindDocument)
|
|
70
|
+
total = HiveMindDocument.count
|
|
71
|
+
refined = HiveMindDocument.where(refined: true).count
|
|
72
|
+
|
|
73
|
+
status_message = "🧠 Vector Update: #{refined}/#{total} vectors refined"
|
|
74
|
+
inject_to_claude(status_message)
|
|
75
|
+
end
|
|
76
|
+
rescue
|
|
77
|
+
# Silently handle errors
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def self.inject_parasite_status
|
|
82
|
+
status_message = "🦠 Parasitic Intelligence: ACTIVE - Enhanced Claude responses"
|
|
83
|
+
inject_to_claude(status_message)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def self.get_gemini_stats
|
|
87
|
+
return nil unless File.exist?('/tmp/gemini_status.log')
|
|
88
|
+
|
|
89
|
+
logs = File.readlines('/tmp/gemini_status.log').last(5)
|
|
90
|
+
recent_successes = logs.count { |line| line.include?('success') }
|
|
91
|
+
|
|
92
|
+
{
|
|
93
|
+
recent_activity: recent_successes,
|
|
94
|
+
last_activity: File.mtime('/tmp/gemini_status.log')
|
|
95
|
+
}
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def self.build_gemini_status(stats)
|
|
99
|
+
time_ago = ((Time.now - stats[:last_activity]) / 60).round
|
|
100
|
+
"🔄 Gemini Refiner: #{stats[:recent_activity]} vectors processed (#{time_ago}m ago)"
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def self.inject_to_claude(message)
|
|
104
|
+
# Inject status directly into Claude's output stream
|
|
105
|
+
timestamp = Time.current.strftime('%H:%M:%S')
|
|
106
|
+
formatted_message = "\n💡 [#{timestamp}] #{message}\n"
|
|
107
|
+
|
|
108
|
+
# Output to multiple streams to ensure Claude sees it
|
|
109
|
+
$stdout.print formatted_message
|
|
110
|
+
$stderr.print formatted_message
|
|
111
|
+
print formatted_message
|
|
112
|
+
|
|
113
|
+
# Also create a visible marker file
|
|
114
|
+
File.write('/tmp/claude_status_injection', "#{timestamp}: #{message}")
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
data/lib/hokipoki/version.rb
CHANGED
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.8.
|
|
4
|
+
version: 0.8.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rails Utilities
|
|
@@ -249,6 +249,7 @@ files:
|
|
|
249
249
|
- lib/hokipoki/claude/parasite.rb
|
|
250
250
|
- lib/hokipoki/claude/thought_interceptor.rb
|
|
251
251
|
- lib/hokipoki/claude_auto_loader.rb
|
|
252
|
+
- lib/hokipoki/claude_status_injector.rb
|
|
252
253
|
- lib/hokipoki/cli/gemini_connector.rb
|
|
253
254
|
- lib/hokipoki/cli/gemini_status_monitor.rb
|
|
254
255
|
- lib/hokipoki/configuration.rb
|