lex-agentic-executive 0.1.7 → 0.1.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: 162085450c8aaeacfd84ced17da35c78b086d34d1ee9e4a0305a46784ac8d3ea
4
- data.tar.gz: 8a8f9a4f5ffca47bbdcecd40fdc3b4616e3fc24bf0777458e0547a12317ad7df
3
+ metadata.gz: aa05cbaa427f25a935f58ac66ee531e41acef3593516fce1aac5e14eab157750
4
+ data.tar.gz: d30b10206deb7330d7a36a2cf15f985e3cea95013e46fb53672634c468a77b82
5
5
  SHA512:
6
- metadata.gz: f06abb9d450194b60de1e128952885bdb712ada8d8dd3cffa2a1744590c86ee91130b2c6ddb950cd7d04dfeaf5af943d781cd1061fcceddfdb9f5ef399fbc3d7
7
- data.tar.gz: fb613003c03d2f7a571731433f2f1b08bd45645ea6ac22d70637ed2f03567487c34c0e0d3b1f3bfc7d8c465785567195d2446d08ae22c53ca82ce023a6dd3f4c
6
+ metadata.gz: 2819dad3c8f57b6614e57b700ee50bafa9a7181b87fe6b5da3189f6e285b5b027e80b86d95646d6eba5fb53096af842adef6589af4ad4c24737c036e50152a1f
7
+ data.tar.gz: 3bbf61fe80e780a1d1ecd6cc6428a80e4cba9125f640267df84dcac367120294ef925df0497e2398090ff3d0fcc06b9ffe6d6a9d46e5095fc811ac029b33fa06
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.9] - 2026-04-03
4
+
5
+ ### Fixed
6
+ - Use `::Process::CLOCK_MONOTONIC` instead of `Process::CLOCK_MONOTONIC` in DualProcessEngine to avoid resolving to `Legion::Process`
7
+
8
+ ## [0.1.8] - 2026-04-03
9
+
10
+ ### Changed
11
+ - Fix drive synthesizer default values to avoid fabricating urgency, epistemic, and social drive without evidence
12
+ - Return 0.0 (not 0.5) for arousal and trust when no signal is present
13
+ - Short-circuit epistemic and social drive to 0.0 when prediction and mesh/trust state are empty
14
+ - Lower calm gut signal from 0.1 to 0.05 and unknown signals from 0.3 to 0.0
15
+
3
16
  ## [0.1.7] - 2026-03-31
4
17
 
5
18
  ### Added
@@ -42,7 +42,7 @@ module Legion
42
42
 
43
43
  def execute_system_one(query:, domain:)
44
44
  matching = find_matching_heuristic(query, domain)
45
- start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
45
+ start = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC)
46
46
 
47
47
  if matching
48
48
  matching.use!(success: true)
@@ -53,7 +53,7 @@ module Legion
53
53
  response = :no_heuristic
54
54
  end
55
55
 
56
- elapsed = ((Process.clock_gettime(Process::CLOCK_MONOTONIC) - start) * 1000).round
56
+ elapsed = ((::Process.clock_gettime(::Process::CLOCK_MONOTONIC) - start) * 1000).round
57
57
 
58
58
  decision = Decision.new(
59
59
  query: query,
@@ -70,13 +70,13 @@ module Legion
70
70
  end
71
71
 
72
72
  def execute_system_two(query:, domain:, deliberation: {})
73
- start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
73
+ start = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC)
74
74
  @effort_budget = (@effort_budget - EFFORT_COST).clamp(0.0, MAX_EFFORT_BUDGET)
75
75
 
76
76
  confidence = deliberation.fetch(:confidence, DEFAULT_CONFIDENCE + HEURISTIC_BOOST)
77
77
  .clamp(CONFIDENCE_FLOOR, CONFIDENCE_CEILING)
78
78
  response = deliberation.fetch(:response, :deliberated)
79
- elapsed = ((Process.clock_gettime(Process::CLOCK_MONOTONIC) - start) * 1000).round
79
+ elapsed = ((::Process.clock_gettime(::Process::CLOCK_MONOTONIC) - start) * 1000).round
80
80
 
81
81
  decision = Decision.new(
82
82
  query: query,
@@ -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.9'
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.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity