legion-gaia 0.9.54 → 0.9.55

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: f7adc19980f0a22cd2a66ce9a7d76d09322b4e03ed02281d8f38e08fd1094417
4
- data.tar.gz: '038b5dc7cf7177fb3c7708a297993037e8c755577aabbecf00487cb68dbb477f'
3
+ metadata.gz: ab8bf4d2db554a118e3fb0b149bebb11d89474cf67896cfe1a2442636813694b
4
+ data.tar.gz: 714d3941f76f84a5aab4e3f470b1c920de508514a2e2e02f00beee827eff2cc7
5
5
  SHA512:
6
- metadata.gz: 3739abb6d354660faa2ca878b7d59658f1cf551ed717ee9a73dbe0b994d66c381b3652e73bdc16e95dd450bd56d5f1b6038c29f0a76e5597b0757ffa55f66c3a
7
- data.tar.gz: 1cbda4d21a05c55a95338fdf9ec9e6d956147971f1bfa6bd8572e37a5cf3a0a6603ffb6bd3958eff780c03356f2209e5c779ca748e80dac5d2dbd6407b545682
6
+ metadata.gz: c8d260c1ffcd8d8e05a68169d3d7522131214232feeb44a2a2b5b5f16eef1bef59cda3e367d44bb4bf528ba2692ad057d093ed0eaee284b7254725f251405260
7
+ data.tar.gz: f9d88b523709c8cac921300da1b863a24184ed31b1c2a32ec3a2272fa88d013b1c8dabc0c5e8922a67150d79f7a959bd275da9fa624b44915d0c5ccee9b134b5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.55] - 2026-05-11
4
+
5
+ ### Fixed
6
+ - `append_action_markers`: handle Array values for `new_intentions` and `active_intentions` — use `.size` for Arrays instead of calling `.to_i`, preventing `NoMethodError` when action selection returns intention lists rather than integer counts.
7
+
3
8
  ## [0.9.54] - 2026-05-09
4
9
 
5
10
  ### Removed
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Gaia
5
- VERSION = '0.9.54'
5
+ VERSION = '0.9.55'
6
6
  end
7
7
  end
data/lib/legion/gaia.rb CHANGED
@@ -901,12 +901,21 @@ module Legion
901
901
  parts << "reflection=#{category}:#{truncate_text(observation, 48).inspect}"
902
902
  end
903
903
 
904
+ def count_marker_value(value)
905
+ return value.size if value.is_a?(Array)
906
+ return 0 unless value.respond_to?(:to_i)
907
+
908
+ value.to_i
909
+ end
910
+
904
911
  def append_action_markers(parts, action, tick_number)
905
912
  return unless action.is_a?(Hash)
906
913
 
907
- new_intentions = action[:new_intentions].to_i
914
+ new_intentions = count_marker_value(action[:new_intentions])
908
915
  parts << "intentions+#{new_intentions}" if new_intentions.positive?
909
- parts << "active_intentions=#{action[:active_intentions]}" if action[:active_intentions].to_i.positive?
916
+ if count_marker_value(action[:active_intentions]).positive?
917
+ parts << "active_intentions=#{count_marker_value(action[:active_intentions])}"
918
+ end
910
919
  parts << "drive=#{action[:dominant_drive]}" if action[:dominant_drive]
911
920
  append_action_goal_marker(parts, action)
912
921
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-gaia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.54
4
+ version: 0.9.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity