brainiac 0.0.8 → 0.0.9

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: e339beb822c90dafae1ad7037263adcaac1915e3c3a41c578d4d70e8253c385a
4
- data.tar.gz: dca3c1958e07d06be3642b30d220b4711443dcb11b74e6123fc7618539ee860e
3
+ metadata.gz: ccb3d560afc2531dc6ba8e5f7b8fdf16cce8ee8e7a9d0ffe662f4f1c25c21a60
4
+ data.tar.gz: a4c644e18a11ece4aa474b92d7e9335a7331989942f46f8c1c6611927b49461f
5
5
  SHA512:
6
- metadata.gz: 18f9f5de76b193a39ea0e5ef82cacfcb6f503681fc0868d02784127285c57ef3f3ebb0157d9d79ebcf9f7e2842d190b44b45f49a3e986d16804479f08720ec67
7
- data.tar.gz: 7d511730180afa46955140cac32122d35b0a93bf2df9e94c5d1ac6c60ad499a87c2baba819bdac509f75dde87fd51fa5f8ac8cdf74dbc44917f2aa344c65c9e1
6
+ metadata.gz: b1ff06751f2335f44f151f3405800e6060eda047ae40a92470cc03c29829f4966b5826a6acd010a5b5db0f8e0f432be88af7f9c323779ee5dd9dd954e1ec8548
7
+ data.tar.gz: 0b21425f705084aad4b7a09f2153915f389f608244e77c7797e65b101870b68d8e83ca830a2629fa432d6fb8c475cd97f15f08bbae85bf80412d3cddb193c625
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brainiac (0.0.8)
4
+ brainiac (0.0.9)
5
5
  puma (~> 7.2)
6
6
  rackup (~> 2.3)
7
7
  sinatra (~> 4.1)
@@ -90,7 +90,7 @@ DEPENDENCIES
90
90
  CHECKSUMS
91
91
  ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
92
92
  base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
93
- brainiac (0.0.8)
93
+ brainiac (0.0.9)
94
94
  event_emitter (0.2.6) sha256=c72697bd5cce9d36594be1972c17f1c9a573236f44303a4d1d548080364e1391
95
95
  json (2.19.9) sha256=9b9025b7cdddafa38d316eca0b2358488e42d417045c1b90d216a9fefe46b79a
96
96
  language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
data/bin/brainiac CHANGED
@@ -2207,10 +2207,10 @@ when "install"
2207
2207
  exit 1
2208
2208
  end
2209
2209
 
2210
- entry_file = File.join(local_path, "lib", "brainiac-#{name}.rb")
2210
+ entry_file = File.join(local_path, "lib", "brainiac_#{name}.rb")
2211
2211
  unless File.exist?(entry_file)
2212
2212
  puts "Error: Expected entry file not found: #{entry_file}"
2213
- puts " Plugin gems must have lib/brainiac-<name>.rb"
2213
+ puts " Plugin gems must have lib/brainiac_<name>.rb"
2214
2214
  exit 1
2215
2215
  end
2216
2216
 
@@ -823,7 +823,9 @@ def handle_completed_session(exit_status:, agent_name:, agent_config_name:, chan
823
823
  extract_response_from_log(response_file, meta_file, log_file, exit_status, agent_name, agent_config_name, message_id)
824
824
  deliver_discord_response(agent_name, channel_id, message_id, bot_token, response_file, meta_file)
825
825
  update_brain_after_session(agent_name, message_id)
826
- check_brainiac_restart(agent_name, project_config, head_before, status_before)
826
+
827
+ project_key = PROJECTS.find { |_k, v| v == project_config }&.first
828
+ check_brainiac_restart(head_before, status_before, project_config&.dig("repo_path"), project_key, agent_config_name)
827
829
  end
828
830
 
829
831
  def deliver_discord_response(agent_name, channel_id, message_id, bot_token, response_file, meta_file)
@@ -852,20 +854,6 @@ def update_brain_after_session(agent_name, message_id)
852
854
  brain_push(message: "#{agent_name}: discord-#{message_id}")
853
855
  end
854
856
 
855
- def check_brainiac_restart(agent_name, project_config, head_before, status_before)
856
- return unless project_config && head_before
857
-
858
- project_key = PROJECTS.find { |_k, v| v == project_config }&.first
859
- return unless project_key == "brainiac"
860
-
861
- head_after, status_after = capture_git_state(project_config["repo_path"])
862
- if head_after != head_before || status_after != status_before
863
- queue_brainiac_restart(agent_name)
864
- else
865
- LOG.info "[Brainiac] #{agent_name} Discord session on brainiac had no changes — skipping restart"
866
- end
867
- end
868
-
869
857
  def schedule_temp_cleanup(prompt_file, attachment_paths)
870
858
  Thread.new do
871
859
  sleep 300
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Brainiac
4
4
  # @return [String] the current gem version
5
- VERSION = "0.0.8"
5
+ VERSION = "0.0.9"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brainiac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Davis