lex-agentic-social 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: 80ee16f8854bb04f18fc39c15b9c6b32b5332ce7ecde6f25258fe897bce3116c
4
- data.tar.gz: dbff7513ce10185e77b74cf224a74550ce6bc356a1f170e33305f23190691951
3
+ metadata.gz: 0d2b8d0e9bed537ff039356f4233ec634fceccd71d0d8f7c2cc0c6b4f6ee5460
4
+ data.tar.gz: d519aae044f338a2513b3b4da84cce41c8ae82642a0088db2dbb4f01a2969bcf
5
5
  SHA512:
6
- metadata.gz: 402582867dcf379985efdb90d1763448d57c1158662cd65f2862b7765ecb7767933df2deee9f24381b9197fa8ae85fe2a2191325100215ac224340f184574768
7
- data.tar.gz: 5dd65fa4d350317c6fe6fe0f7e330dd507c1b678726d106f688dccd98ea4233689755e62e9dd7d42c446fb2d80c38e2df930e86964072482d7968e2929732cbb
6
+ metadata.gz: 82feaa18dd902800c7d1012adbd37f2cb13c589c06184029e25171e3f816451ccff8c41257f68fd681dd406f696ae657643d382056508ccd21cc1509959bb3a3
7
+ data.tar.gz: f23a587d9b7825cce9b3ae304e9769dfa8e65fd47cfd9a38aa225def5d1e2f2e7c70c506df3cc3b7b6c5d6bacc6330d627ea90ba41a85a17ad86f1f4b6f1068e
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 PRIORITY_TYPES validation in ShiftingEngine#add_perspective (returns error hash for invalid priorities)
9
+
5
10
  ## [0.1.0] - 2026-03-18
6
11
 
7
12
  ### Added
data/README.md CHANGED
@@ -1,13 +1,60 @@
1
1
  # lex-agentic-social
2
2
 
3
- LEX agentic social domain: empathy, social cognition, theory of mind
3
+ Domain consolidation gem for social cognition, governance, and multi-agent interaction. Bundles 17 source extensions into one loadable unit under `Legion::Extensions::Agentic::Social`.
4
4
 
5
- ## Sub-modules
5
+ ## Overview
6
6
 
7
- *(populated as extensions are consolidated)*
7
+ **Gem**: `lex-agentic-social`
8
+ **Version**: 0.1.1
9
+ **Namespace**: `Legion::Extensions::Agentic::Social`
10
+
11
+ ## Sub-Modules
12
+
13
+ | Sub-Module | Source Gem | Purpose |
14
+ |---|---|---|
15
+ | `Social::Social` | `lex-social` | Group membership, multi-dimensional reputation, reciprocity, norm violations |
16
+ | `Social::TheoryOfMind` | `lex-theory-of-mind` | BDI model — belief/desire/intention tracking, false-belief detection |
17
+ | `Social::Mentalizing` | `lex-mentalizing` | Mentalizing network — tracking of mentalizing capacity |
18
+ | `Social::SocialLearning` | `lex-social-learning` | Learning by observation — vicarious reinforcement |
19
+ | `Social::PerspectiveShifting` | `lex-perspective-shifting` | Deliberate perspective adoption |
20
+ | `Social::Trust` | `lex-trust` | Domain-scoped trust scores — asymmetric reinforcement and decay |
21
+ | `Social::Conflict` | `lex-conflict` | Conflict registration, severity-based posture, optional LLM resolution |
22
+ | `Social::Conscience` | `lex-conscience` | Internalized moral compass — guilt/pride signal generation |
23
+ | `Social::Consent` | `lex-consent` | Four-tier consent gradient with earned autonomy, HITL gate |
24
+ | `Social::MoralReasoning` | `lex-moral-reasoning` | Six Haidt foundations, six Kohlberg stages, six ethical frameworks |
25
+ | `Social::Governance` | `lex-governance` | Four-layer governance — council proposals, quorum voting, action validation |
26
+ | `Social::JointAttention` | `lex-joint-attention` | Shared attention between agents — coordinating focus |
27
+ | `Social::Mirror` | `lex-mirror` | Mirror neuron analog — action observation and imitation |
28
+ | `Social::MirrorSystem` | `lex-mirror` | Extended mirror system |
29
+ | `Social::Entrainment` | `lex-cognitive-entrainment` | Rhythmic synchronization between agents |
30
+ | `Social::Symbiosis` | `lex-cognitive-symbiosis` | Mutually beneficial cognitive partnerships |
31
+ | `Social::Apprenticeship` | `lex-cognitive-apprenticeship` | Expert-novice learning relationships |
32
+
33
+ ## Actors
34
+
35
+ - `Social::Conflict::Actors::StaleCheck` — runs every 3600s, checks for stale conflicts
36
+ - `Social::Consent::Actors::TierEvaluation` — runs every 3600s, evaluates and applies consent tiers
37
+ - `Social::Governance::Actors::ShadowAiScan` — interval actor, scans for shadow AI activity
38
+ - `Social::Governance::Actors::VoteTimeout` — runs every 300s, times out expired proposals
39
+ - `Social::JointAttention::Actors::Decay` — interval actor, decays joint attention focus
40
+ - `Social::Mentalizing::Actors::Decay` — interval actor, decays mentalizing model confidence
41
+ - `Social::MirrorSystem::Actors::Decay` — interval actor, decays mirror system activation
42
+ - `Social::Trust::Actors::Decay` — runs every 300s, decays all trust scores
8
43
 
9
44
  ## Installation
10
45
 
11
46
  ```ruby
12
47
  gem 'lex-agentic-social'
13
48
  ```
49
+
50
+ ## Development
51
+
52
+ ```bash
53
+ bundle install
54
+ bundle exec rspec # 1646 examples, 0 failures
55
+ bundle exec rubocop # 0 offenses
56
+ ```
57
+
58
+ ## License
59
+
60
+ MIT
@@ -21,6 +21,10 @@ module Legion
21
21
  return { error: :too_many_perspectives } if @perspectives.size >= Constants::MAX_PERSPECTIVES
22
22
  return { error: :invalid_type } unless Constants::PERSPECTIVE_TYPES.include?(type)
23
23
 
24
+ sym_priorities = Array(priorities).map(&:to_sym)
25
+ invalid = sym_priorities - Constants::PRIORITY_TYPES
26
+ return { error: :invalid_priorities, invalid: invalid } unless invalid.empty?
27
+
24
28
  p = Perspective.new(
25
29
  name: name,
26
30
  perspective_type: type,
@@ -5,7 +5,7 @@ module Legion
5
5
  module Agentic
6
6
  module Social
7
7
  module PerspectiveShifting
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 Social
7
- VERSION = '0.1.0'
7
+ VERSION = '0.1.1'
8
8
  end
9
9
  end
10
10
  end
@@ -35,6 +35,17 @@ RSpec.describe Legion::Extensions::Agentic::Social::PerspectiveShifting::Helpers
35
35
  result = engine.add_perspective(name: 'overflow', type: :stakeholder)
36
36
  expect(result[:error]).to eq(:too_many_perspectives)
37
37
  end
38
+
39
+ it 'rejects invalid priorities' do
40
+ result = engine.add_perspective(name: 'x', type: :stakeholder, priorities: %i[telepathy])
41
+ expect(result[:error]).to eq(:invalid_priorities)
42
+ end
43
+
44
+ it 'accepts all valid PRIORITY_TYPES' do
45
+ constants = Legion::Extensions::Agentic::Social::PerspectiveShifting::Helpers::Constants
46
+ result = engine.add_perspective(name: 'all', type: :stakeholder, priorities: constants::PRIORITY_TYPES.dup)
47
+ expect(result).to be_a(Legion::Extensions::Agentic::Social::PerspectiveShifting::Helpers::Perspective)
48
+ end
38
49
  end
39
50
 
40
51
  describe '#add_situation' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-agentic-social
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