lex-agentic-inference 0.1.0 → 0.1.1

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: 6dd00ebbcc35eceb42f311a3fe5a3eb05cd85dfe202b25e990aa9e763c767e9a
4
- data.tar.gz: e77d26da91244a176b5a784838b5cc39e6e98d7e24db1e8670c632fce8cde8e3
3
+ metadata.gz: 5f2289fe802a7e5c9389f186070ac7cc29e78f32be14f75377d63efaf7cd5fbe
4
+ data.tar.gz: df18916164427f2aedf35357431b720c49d24f0519f3c949e816e81ba1f1406f
5
5
  SHA512:
6
- metadata.gz: fda03d8791a5668dedc78b0017abb410b75d941d309d594e8cf46ac96b9d6e81ae6324e3fe2b71ebe89de8244771905330e84e20ea914bdec6fa964738fc63e2
7
- data.tar.gz: 7a971543bc03ec39d07f1165428bcebccb49c9b9d5c938530b9aa6593752f204f6e9a4f83c50b1baed2f422790bd2fffaab50703212f931c3cc81b49c058c7d1
6
+ metadata.gz: b8b3b82eaf31d7fbdd78a7d7ee8e3b8e90160efaef782c9bc03b0a9eed215b2b65d25442093f7def1f10461ad129b9d50817ae86aef16367d266cb9d88f27d96
7
+ data.tar.gz: ad9678b737411b4fdddc7cec8c1df6bded639a0a0eb1ad6dae14460af85353e31b02ef8da06b30f2a04a462a52c16a4234b65a4d961e75443ed6b5925c421366
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.1.1] - 2026-03-18
6
+
7
+ ### Changed
8
+ - Enforce IDEA_TYPES validation in Momentum::MomentumEngine#create_idea (returns nil for invalid types)
9
+
5
10
  ## [0.1.0] - 2026-03-18
6
11
 
7
12
  ### Added
data/README.md CHANGED
@@ -1,13 +1,66 @@
1
1
  # lex-agentic-inference
2
2
 
3
- LEX agentic inference domain: causal reasoning, prediction, belief updating
3
+ Domain consolidation gem for reasoning, inference, and belief management. Bundles 27 source extensions into one loadable unit under `Legion::Extensions::Agentic::Inference`.
4
4
 
5
- ## Sub-modules
5
+ ## Overview
6
6
 
7
- *(populated as extensions are consolidated)*
7
+ **Gem**: `lex-agentic-inference`
8
+ **Version**: 0.1.1
9
+ **Namespace**: `Legion::Extensions::Agentic::Inference`
10
+
11
+ ## Sub-Modules
12
+
13
+ | Sub-Module | Source Gem | Purpose |
14
+ |---|---|---|
15
+ | `Inference::Abductive` | `lex-abductive-reasoning` | Best-explanation inference — hypothesis generation and ranking |
16
+ | `Inference::Analogical` | `lex-analogical-reasoning` | Structural analogy mapping between domains |
17
+ | `Inference::ArgumentMapping` | `lex-argument-mapping` | Argument tree — premises, conclusions, objections, rebuttals |
18
+ | `Inference::Bayesian` | `lex-bayesian-belief` | Bayesian belief updating with likelihood ratios |
19
+ | `Inference::BeliefRevision` | `lex-belief-revision` | AGM-model contraction, expansion, and revision |
20
+ | `Inference::CausalAttribution` | `lex-causal-attribution` | Weiner's attribution model — internal/external, stable/unstable |
21
+ | `Inference::CausalReasoning` | `lex-causal-reasoning` | Causal graph inference, do-calculus |
22
+ | `Inference::Counterfactual` | `lex-counterfactual` | Nearest-world counterfactual simulation |
23
+ | `Inference::HypothesisTesting` | `lex-hypothesis-testing` | Scientific reasoning loop — generate, predict, test, evaluate |
24
+ | `Inference::Prediction` | `lex-prediction` | Forward-model prediction — four modes, rolling accuracy tracking |
25
+ | `Inference::PredictiveCoding` | `lex-predictive-coding` | Hierarchical predictive coding with precision-weighted error |
26
+ | `Inference::PredictiveProcessing` | `lex-predictive-processing` | Unified perception/action loop |
27
+ | `Inference::FreeEnergy` | `lex-free-energy` | Friston Free Energy Principle — minimize prediction error |
28
+ | `Inference::Intuition` | `lex-intuition` | Fast heuristic-based inference |
29
+ | `Inference::Schema` | `lex-schema` | Organized knowledge structures — schema activation |
30
+ | `Inference::ExpectationViolation` | `lex-expectation-violation` | Surprise from violated predictions |
31
+ | `Inference::UncertaintyTolerance` | `lex-uncertainty-tolerance` | Tolerance for ambiguity and incomplete information |
32
+ | `Inference::RealityTesting` | `lex-reality-testing` | Tests whether beliefs match available evidence |
33
+ | `Inference::Affordance` | `lex-affordance` | Gibson affordance theory — action possibilities from environment |
34
+ | `Inference::EnactiveCognition` | `lex-enactive-cognition` | Varela/Maturana enactivism — sensorimotor loops as meaning |
35
+ | `Inference::PerceptualInference` | `lex-perceptual-inference` | Bayesian perception — sensory likelihoods + priors |
36
+ | `Inference::Coherence` | `lex-cognitive-coherence` | Belief coherence assessment and maintenance |
37
+ | `Inference::Debugging` | `lex-cognitive-debugging` | Systematic diagnosis of cognitive errors |
38
+ | `Inference::Horizon` | `lex-cognitive-horizon` | Reasoning boundary and scope management |
39
+ | `Inference::Gravity` | `lex-cognitive-gravity` | Attractor patterns in belief space |
40
+ | `Inference::Momentum` | `lex-cognitive-momentum` | Inference momentum — continuation bias in reasoning chains |
41
+ | `Inference::Magnet` | `lex-cognitive-magnet` | Magnetic pull of salient attractors |
42
+
43
+ ## Actors
44
+
45
+ - `Inference::Affordance::Actors::Scan` — interval actor, scans for available affordances
46
+ - `Inference::Horizon::Actors::Adjust` — interval actor, adjusts reasoning horizon bounds
47
+ - `Inference::Prediction::Actors::ExpirePredictions` — runs every 300s, expires stale predictions
48
+ - `Inference::PredictiveCoding::Actors::Decay` — interval actor, decays precision weights
8
49
 
9
50
  ## Installation
10
51
 
11
52
  ```ruby
12
53
  gem 'lex-agentic-inference'
13
54
  ```
55
+
56
+ ## Development
57
+
58
+ ```bash
59
+ bundle install
60
+ bundle exec rspec # 2286 examples, 0 failures
61
+ bundle exec rubocop # 0 offenses
62
+ ```
63
+
64
+ ## License
65
+
66
+ MIT
@@ -17,6 +17,8 @@ module Legion
17
17
  end
18
18
 
19
19
  def create_idea(content:, idea_type:, domain:, mass: DEFAULT_MASS)
20
+ return nil unless IDEA_TYPES.include?(idea_type)
21
+
20
22
  evict_oldest if @ideas.size >= MAX_IDEAS
21
23
 
22
24
  idea = Idea.new(content: content, idea_type: idea_type, domain: domain, mass: mass)
@@ -5,7 +5,7 @@ module Legion
5
5
  module Agentic
6
6
  module Inference
7
7
  module Momentum
8
- VERSION = '0.1.0'
8
+ VERSION = '0.1.1'
9
9
  end
10
10
  end
11
11
  end
@@ -4,7 +4,7 @@ module Legion
4
4
  module Extensions
5
5
  module Agentic
6
6
  module Inference
7
- VERSION = '0.1.0'
7
+ VERSION = '0.1.1'
8
8
  end
9
9
  end
10
10
  end
@@ -23,6 +23,18 @@ RSpec.describe Legion::Extensions::Agentic::Inference::Momentum::Helpers::Moment
23
23
  engine.create_idea(content: 'overflow', idea_type: :belief, domain: :d)
24
24
  expect(engine.to_h[:total_ideas]).to eq(max)
25
25
  end
26
+
27
+ it 'rejects invalid idea_type' do
28
+ expect(engine.create_idea(content: 'bad', idea_type: :daydream, domain: :d)).to be_nil
29
+ end
30
+
31
+ it 'accepts all valid IDEA_TYPES' do
32
+ constants = Legion::Extensions::Agentic::Inference::Momentum::Helpers::Constants
33
+ constants::IDEA_TYPES.each do |itype|
34
+ result = engine.create_idea(content: "idea_#{itype}", idea_type: itype, domain: :d)
35
+ expect(result).not_to be_nil
36
+ end
37
+ end
26
38
  end
27
39
 
28
40
  describe '#reinforce_idea' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-agentic-inference
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity