lex-agentic-executive 0.1.7 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 162085450c8aaeacfd84ced17da35c78b086d34d1ee9e4a0305a46784ac8d3ea
4
- data.tar.gz: 8a8f9a4f5ffca47bbdcecd40fdc3b4616e3fc24bf0777458e0547a12317ad7df
3
+ metadata.gz: f8b462cfe7996e5d0e29c0be80280aa7e2d41cb839a2f9abe9add558d6fc0d0f
4
+ data.tar.gz: a0c5d73d86245d74b6705193916306da3b6db2af5d5a31898377138c1c16ca3d
5
5
  SHA512:
6
- metadata.gz: f06abb9d450194b60de1e128952885bdb712ada8d8dd3cffa2a1744590c86ee91130b2c6ddb950cd7d04dfeaf5af943d781cd1061fcceddfdb9f5ef399fbc3d7
7
- data.tar.gz: fb613003c03d2f7a571731433f2f1b08bd45645ea6ac22d70637ed2f03567487c34c0e0d3b1f3bfc7d8c465785567195d2446d08ae22c53ca82ce023a6dd3f4c
6
+ metadata.gz: 60b7246e2235da77e1e63ba488566c346870605d40291a2e52bd15b93740722eeda4b73a5c70d3b5f266327a0cc0d25d601e50a749f44a00ccea48581d115568
7
+ data.tar.gz: f5ee84e895c7e651d286754cfadf7656ae18da2ae4e76a31405b71239d168b018c541fc6bc93ae32df82559f76ddc310504bb7a9033e3a28e657cb9f8dbfff47
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.8] - 2026-04-03
4
+
5
+ ### Changed
6
+ - Fix drive synthesizer default values to avoid fabricating urgency, epistemic, and social drive without evidence
7
+ - Return 0.0 (not 0.5) for arousal and trust when no signal is present
8
+ - Short-circuit epistemic and social drive to 0.0 when prediction and mesh/trust state are empty
9
+ - Lower calm gut signal from 0.1 to 0.05 and unknown signals from 0.3 to 0.0
10
+
3
11
  ## [0.1.7] - 2026-03-31
4
12
 
5
13
  ### Added
@@ -4,7 +4,7 @@ module Legion
4
4
  module Extensions
5
5
  module Agentic
6
6
  module Executive
7
- VERSION = '0.1.7'
7
+ VERSION = '0.1.8'
8
8
  end
9
9
  end
10
10
  end
@@ -74,7 +74,7 @@ module Legion
74
74
  gut = tick_results[:gut_instinct] || cognitive_state[:gut] || {}
75
75
  emotion = tick_results[:emotional_evaluation] || {}
76
76
 
77
- arousal = emotion[:arousal] || cognitive_state.dig(:emotion, :arousal) || 0.5
77
+ arousal = emotion[:arousal] || cognitive_state.dig(:emotion, :arousal) || 0.0
78
78
  gut_signal = extract_gut_strength(gut)
79
79
 
80
80
  ((arousal * 0.5) + (gut_signal * 0.5)).clamp(0.0, 1.0)
@@ -84,7 +84,9 @@ module Legion
84
84
  pred = tick_results[:prediction_engine] || {}
85
85
  pred_state = cognitive_state[:prediction] || {}
86
86
 
87
- confidence = pred[:confidence] || pred_state[:confidence] || 0.5
87
+ return 0.0 if pred.empty? && pred_state.empty?
88
+
89
+ confidence = pred[:confidence] || pred_state[:confidence] || 1.0
88
90
  pending = pred_state[:pending_count] || 0
89
91
 
90
92
  confidence_gap = 1.0 - confidence
@@ -96,8 +98,10 @@ module Legion
96
98
  mesh = cognitive_state[:mesh] || {}
97
99
  trust = cognitive_state[:trust] || {}
98
100
 
101
+ return 0.0 if mesh.empty? && trust.empty?
102
+
99
103
  peer_count = mesh[:peer_count] || 0
100
- trust_level = trust[:avg_composite] || 0.5
104
+ trust_level = trust[:avg_composite] || 0.0
101
105
 
102
106
  peer_factor = [peer_count / 5.0, 1.0].min
103
107
  ((peer_factor * 0.4) + (trust_level * 0.6)).clamp(0.0, 1.0)
@@ -105,15 +109,15 @@ module Legion
105
109
 
106
110
  def extract_gut_strength(gut)
107
111
  signal = gut[:signal]
108
- return 0.3 unless signal
112
+ return 0.0 unless signal
109
113
 
110
114
  case signal
111
115
  when :alarm then 1.0
112
116
  when :heightened then 0.7
113
117
  when :explore then 0.5
114
118
  when :attend then 0.4
115
- when :calm then 0.1
116
- else 0.3
119
+ when :calm then 0.05
120
+ else 0.0
117
121
  end
118
122
  end
119
123
 
@@ -20,6 +20,14 @@ RSpec.describe Legion::Extensions::Agentic::Executive::Volition::Helpers::DriveS
20
20
  )
21
21
  drives.each_value { |v| expect(v).to be_between(0.0, 1.0) }
22
22
  end
23
+
24
+ it 'does not fabricate urgency, epistemic, or social drive without evidence' do
25
+ drives = synth.synthesize(tick_results: {}, cognitive_state: {})
26
+
27
+ expect(drives[:urgency]).to eq(0.0)
28
+ expect(drives[:epistemic]).to eq(0.0)
29
+ expect(drives[:social]).to eq(0.0)
30
+ end
23
31
  end
24
32
 
25
33
  describe '.compute_curiosity_drive' do
@@ -91,9 +99,9 @@ RSpec.describe Legion::Extensions::Agentic::Executive::Volition::Helpers::DriveS
91
99
  it 'maps gut signal symbols to numeric strength' do
92
100
  expect(synth.extract_gut_strength({ signal: :alarm })).to eq(1.0)
93
101
  expect(synth.extract_gut_strength({ signal: :heightened })).to eq(0.7)
94
- expect(synth.extract_gut_strength({ signal: :calm })).to eq(0.1)
95
- expect(synth.extract_gut_strength({ signal: :neutral })).to eq(0.3)
96
- expect(synth.extract_gut_strength({})).to eq(0.3)
102
+ expect(synth.extract_gut_strength({ signal: :calm })).to eq(0.05)
103
+ expect(synth.extract_gut_strength({ signal: :neutral })).to eq(0.0)
104
+ expect(synth.extract_gut_strength({})).to eq(0.0)
97
105
  end
98
106
  end
99
107
  end
@@ -27,7 +27,8 @@ RSpec.describe Legion::Extensions::Agentic::Executive::Volition::Runners::Voliti
27
27
  it 'handles empty inputs' do
28
28
  result = client.form_intentions(tick_results: {}, cognitive_state: {})
29
29
  expect(result[:drives]).to be_a(Hash)
30
- expect(result[:active_intentions]).to be >= 0
30
+ expect(result[:active_intentions]).to eq(0)
31
+ expect(result[:current_intention]).to be_nil
31
32
  end
32
33
 
33
34
  it 'decays existing intentions over multiple ticks' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-agentic-executive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity