lex-agentic-social 0.1.0
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 +7 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +5 -0
- data/LICENSE +21 -0
- data/README.md +13 -0
- data/lex-agentic-social.gemspec +30 -0
- data/lib/legion/extensions/agentic/social/apprenticeship/client.rb +28 -0
- data/lib/legion/extensions/agentic/social/apprenticeship/helpers/apprenticeship.rb +90 -0
- data/lib/legion/extensions/agentic/social/apprenticeship/helpers/apprenticeship_engine.rb +109 -0
- data/lib/legion/extensions/agentic/social/apprenticeship/helpers/apprenticeship_model.rb +93 -0
- data/lib/legion/extensions/agentic/social/apprenticeship/runners/cognitive_apprenticeship.rb +112 -0
- data/lib/legion/extensions/agentic/social/apprenticeship/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/apprenticeship.rb +19 -0
- data/lib/legion/extensions/agentic/social/conflict/actors/stale_check.rb +45 -0
- data/lib/legion/extensions/agentic/social/conflict/client.rb +27 -0
- data/lib/legion/extensions/agentic/social/conflict/helpers/conflict_log.rb +70 -0
- data/lib/legion/extensions/agentic/social/conflict/helpers/llm_enhancer.rb +130 -0
- data/lib/legion/extensions/agentic/social/conflict/helpers/severity.rb +47 -0
- data/lib/legion/extensions/agentic/social/conflict/runners/conflict.rb +112 -0
- data/lib/legion/extensions/agentic/social/conflict/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/conflict.rb +19 -0
- data/lib/legion/extensions/agentic/social/conscience/client.rb +26 -0
- data/lib/legion/extensions/agentic/social/conscience/helpers/constants.rb +53 -0
- data/lib/legion/extensions/agentic/social/conscience/helpers/moral_evaluator.rb +178 -0
- data/lib/legion/extensions/agentic/social/conscience/helpers/moral_store.rb +116 -0
- data/lib/legion/extensions/agentic/social/conscience/runners/conscience.rb +117 -0
- data/lib/legion/extensions/agentic/social/conscience/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/conscience.rb +19 -0
- data/lib/legion/extensions/agentic/social/consent/actors/tier_evaluation.rb +45 -0
- data/lib/legion/extensions/agentic/social/consent/client.rb +27 -0
- data/lib/legion/extensions/agentic/social/consent/helpers/consent_map.rb +199 -0
- data/lib/legion/extensions/agentic/social/consent/helpers/tiers.rb +54 -0
- data/lib/legion/extensions/agentic/social/consent/local_migrations/20260316000010_create_consent_domains.rb +16 -0
- data/lib/legion/extensions/agentic/social/consent/runners/consent.rb +228 -0
- data/lib/legion/extensions/agentic/social/consent/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/consent.rb +25 -0
- data/lib/legion/extensions/agentic/social/entrainment/client.rb +19 -0
- data/lib/legion/extensions/agentic/social/entrainment/helpers/constants.rb +40 -0
- data/lib/legion/extensions/agentic/social/entrainment/helpers/entrainment_engine.rb +120 -0
- data/lib/legion/extensions/agentic/social/entrainment/helpers/pairing.rb +86 -0
- data/lib/legion/extensions/agentic/social/entrainment/runners/cognitive_entrainment.rb +89 -0
- data/lib/legion/extensions/agentic/social/entrainment/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/entrainment.rb +19 -0
- data/lib/legion/extensions/agentic/social/governance/actors/shadow_ai_scan.rb +19 -0
- data/lib/legion/extensions/agentic/social/governance/actors/vote_timeout.rb +45 -0
- data/lib/legion/extensions/agentic/social/governance/client.rb +27 -0
- data/lib/legion/extensions/agentic/social/governance/helpers/layers.rb +40 -0
- data/lib/legion/extensions/agentic/social/governance/helpers/proposal.rb +94 -0
- data/lib/legion/extensions/agentic/social/governance/runners/governance.rb +87 -0
- data/lib/legion/extensions/agentic/social/governance/runners/shadow_ai.rb +93 -0
- data/lib/legion/extensions/agentic/social/governance/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/governance.rb +20 -0
- data/lib/legion/extensions/agentic/social/joint_attention/actors/decay.rb +45 -0
- data/lib/legion/extensions/agentic/social/joint_attention/client.rb +28 -0
- data/lib/legion/extensions/agentic/social/joint_attention/helpers/attention_target.rb +124 -0
- data/lib/legion/extensions/agentic/social/joint_attention/helpers/constants.rb +34 -0
- data/lib/legion/extensions/agentic/social/joint_attention/helpers/joint_focus_manager.rb +157 -0
- data/lib/legion/extensions/agentic/social/joint_attention/runners/joint_attention.rb +88 -0
- data/lib/legion/extensions/agentic/social/joint_attention/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/joint_attention.rb +20 -0
- data/lib/legion/extensions/agentic/social/mentalizing/actors/decay.rb +45 -0
- data/lib/legion/extensions/agentic/social/mentalizing/client.rb +28 -0
- data/lib/legion/extensions/agentic/social/mentalizing/helpers/belief_attribution.rb +58 -0
- data/lib/legion/extensions/agentic/social/mentalizing/helpers/constants.rb +33 -0
- data/lib/legion/extensions/agentic/social/mentalizing/helpers/mental_model.rb +137 -0
- data/lib/legion/extensions/agentic/social/mentalizing/runners/mentalizing.rb +93 -0
- data/lib/legion/extensions/agentic/social/mentalizing/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/mentalizing.rb +20 -0
- data/lib/legion/extensions/agentic/social/mirror/client.rb +33 -0
- data/lib/legion/extensions/agentic/social/mirror/helpers/constants.rb +65 -0
- data/lib/legion/extensions/agentic/social/mirror/helpers/mirror_engine.rb +132 -0
- data/lib/legion/extensions/agentic/social/mirror/helpers/mirror_event.rb +46 -0
- data/lib/legion/extensions/agentic/social/mirror/helpers/simulation.rb +43 -0
- data/lib/legion/extensions/agentic/social/mirror/runners/observe.rb +52 -0
- data/lib/legion/extensions/agentic/social/mirror/runners/resonance.rb +79 -0
- data/lib/legion/extensions/agentic/social/mirror/runners/simulate.rb +63 -0
- data/lib/legion/extensions/agentic/social/mirror/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/mirror.rb +22 -0
- data/lib/legion/extensions/agentic/social/mirror_system/actors/decay.rb +45 -0
- data/lib/legion/extensions/agentic/social/mirror_system/client.rb +28 -0
- data/lib/legion/extensions/agentic/social/mirror_system/helpers/constants.rb +62 -0
- data/lib/legion/extensions/agentic/social/mirror_system/helpers/mirror_system.rb +162 -0
- data/lib/legion/extensions/agentic/social/mirror_system/helpers/observed_behavior.rb +67 -0
- data/lib/legion/extensions/agentic/social/mirror_system/runners/mirror.rb +99 -0
- data/lib/legion/extensions/agentic/social/mirror_system/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/mirror_system.rb +20 -0
- data/lib/legion/extensions/agentic/social/moral_reasoning/client.rb +19 -0
- data/lib/legion/extensions/agentic/social/moral_reasoning/helpers/constants.rb +49 -0
- data/lib/legion/extensions/agentic/social/moral_reasoning/helpers/dilemma.rb +68 -0
- data/lib/legion/extensions/agentic/social/moral_reasoning/helpers/llm_enhancer.rb +140 -0
- data/lib/legion/extensions/agentic/social/moral_reasoning/helpers/moral_engine.rb +239 -0
- data/lib/legion/extensions/agentic/social/moral_reasoning/helpers/moral_foundation.rb +45 -0
- data/lib/legion/extensions/agentic/social/moral_reasoning/runners/moral_reasoning.rb +121 -0
- data/lib/legion/extensions/agentic/social/moral_reasoning/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/moral_reasoning.rb +21 -0
- data/lib/legion/extensions/agentic/social/perspective_shifting/client.rb +29 -0
- data/lib/legion/extensions/agentic/social/perspective_shifting/helpers/constants.rb +67 -0
- data/lib/legion/extensions/agentic/social/perspective_shifting/helpers/perspective.rb +45 -0
- data/lib/legion/extensions/agentic/social/perspective_shifting/helpers/perspective_view.rb +57 -0
- data/lib/legion/extensions/agentic/social/perspective_shifting/helpers/shifting_engine.rb +166 -0
- data/lib/legion/extensions/agentic/social/perspective_shifting/runners/perspective_shifting.rb +167 -0
- data/lib/legion/extensions/agentic/social/perspective_shifting/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/perspective_shifting.rb +20 -0
- data/lib/legion/extensions/agentic/social/social/client.rb +25 -0
- data/lib/legion/extensions/agentic/social/social/helpers/constants.rb +84 -0
- data/lib/legion/extensions/agentic/social/social/helpers/social_graph.rb +172 -0
- data/lib/legion/extensions/agentic/social/social/runners/social.rb +146 -0
- data/lib/legion/extensions/agentic/social/social/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/social.rb +18 -0
- data/lib/legion/extensions/agentic/social/social_learning/client.rb +25 -0
- data/lib/legion/extensions/agentic/social/social_learning/helpers/constants.rb +42 -0
- data/lib/legion/extensions/agentic/social/social_learning/helpers/model_agent.rb +82 -0
- data/lib/legion/extensions/agentic/social/social_learning/helpers/observed_behavior.rb +61 -0
- data/lib/legion/extensions/agentic/social/social_learning/helpers/social_learning_engine.rb +134 -0
- data/lib/legion/extensions/agentic/social/social_learning/runners/social_learning.rb +105 -0
- data/lib/legion/extensions/agentic/social/social_learning/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/social_learning.rb +20 -0
- data/lib/legion/extensions/agentic/social/symbiosis/client.rb +23 -0
- data/lib/legion/extensions/agentic/social/symbiosis/helpers/constants.rb +50 -0
- data/lib/legion/extensions/agentic/social/symbiosis/helpers/ecosystem.rb +113 -0
- data/lib/legion/extensions/agentic/social/symbiosis/helpers/symbiosis_engine.rb +104 -0
- data/lib/legion/extensions/agentic/social/symbiosis/helpers/symbiotic_bond.rb +112 -0
- data/lib/legion/extensions/agentic/social/symbiosis/runners/cognitive_symbiosis.rb +101 -0
- data/lib/legion/extensions/agentic/social/symbiosis/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/symbiosis.rb +22 -0
- data/lib/legion/extensions/agentic/social/theory_of_mind/client.rb +26 -0
- data/lib/legion/extensions/agentic/social/theory_of_mind/helpers/agent_model.rb +173 -0
- data/lib/legion/extensions/agentic/social/theory_of_mind/helpers/constants.rb +70 -0
- data/lib/legion/extensions/agentic/social/theory_of_mind/helpers/mental_state_tracker.rb +169 -0
- data/lib/legion/extensions/agentic/social/theory_of_mind/runners/theory_of_mind.rb +159 -0
- data/lib/legion/extensions/agentic/social/theory_of_mind/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/theory_of_mind.rb +19 -0
- data/lib/legion/extensions/agentic/social/trust/actors/decay.rb +45 -0
- data/lib/legion/extensions/agentic/social/trust/client.rb +27 -0
- data/lib/legion/extensions/agentic/social/trust/helpers/trust_map.rb +160 -0
- data/lib/legion/extensions/agentic/social/trust/helpers/trust_model.rb +52 -0
- data/lib/legion/extensions/agentic/social/trust/local_migrations/20260316000020_create_trust_entries.rb +23 -0
- data/lib/legion/extensions/agentic/social/trust/runners/trust.rb +80 -0
- data/lib/legion/extensions/agentic/social/trust/version.rb +13 -0
- data/lib/legion/extensions/agentic/social/trust.rb +25 -0
- data/lib/legion/extensions/agentic/social/version.rb +11 -0
- data/lib/legion/extensions/agentic/social.rb +34 -0
- data/spec/legion/extensions/agentic/social/apprenticeship/client_spec.rb +20 -0
- data/spec/legion/extensions/agentic/social/apprenticeship/cognitive_apprenticeship_spec.rb +11 -0
- data/spec/legion/extensions/agentic/social/apprenticeship/helpers/apprenticeship_engine_spec.rb +146 -0
- data/spec/legion/extensions/agentic/social/apprenticeship/helpers/apprenticeship_model_spec.rb +124 -0
- data/spec/legion/extensions/agentic/social/apprenticeship/helpers/apprenticeship_spec.rb +136 -0
- data/spec/legion/extensions/agentic/social/apprenticeship/runners/cognitive_apprenticeship_spec.rb +154 -0
- data/spec/legion/extensions/agentic/social/conflict/actors/stale_check_spec.rb +45 -0
- data/spec/legion/extensions/agentic/social/conflict/client_spec.rb +15 -0
- data/spec/legion/extensions/agentic/social/conflict/helpers/conflict_log_spec.rb +232 -0
- data/spec/legion/extensions/agentic/social/conflict/helpers/llm_enhancer_spec.rb +189 -0
- data/spec/legion/extensions/agentic/social/conflict/helpers/severity_spec.rb +215 -0
- data/spec/legion/extensions/agentic/social/conflict/runners/conflict_spec.rb +151 -0
- data/spec/legion/extensions/agentic/social/conscience/client_spec.rb +58 -0
- data/spec/legion/extensions/agentic/social/conscience/helpers/constants_spec.rb +124 -0
- data/spec/legion/extensions/agentic/social/conscience/helpers/moral_evaluator_spec.rb +253 -0
- data/spec/legion/extensions/agentic/social/conscience/helpers/moral_store_spec.rb +230 -0
- data/spec/legion/extensions/agentic/social/conscience/runners/conscience_spec.rb +239 -0
- data/spec/legion/extensions/agentic/social/consent/actors/tier_evaluation_spec.rb +46 -0
- data/spec/legion/extensions/agentic/social/consent/client_spec.rb +33 -0
- data/spec/legion/extensions/agentic/social/consent/helpers/tiers_spec.rb +49 -0
- data/spec/legion/extensions/agentic/social/consent/local_persistence_spec.rb +234 -0
- data/spec/legion/extensions/agentic/social/consent/runners/consent_spec.rb +224 -0
- data/spec/legion/extensions/agentic/social/entrainment/client_spec.rb +21 -0
- data/spec/legion/extensions/agentic/social/entrainment/helpers/entrainment_engine_spec.rb +116 -0
- data/spec/legion/extensions/agentic/social/entrainment/helpers/pairing_spec.rb +103 -0
- data/spec/legion/extensions/agentic/social/entrainment/runners/cognitive_entrainment_spec.rb +87 -0
- data/spec/legion/extensions/agentic/social/governance/actors/vote_timeout_spec.rb +45 -0
- data/spec/legion/extensions/agentic/social/governance/client_spec.rb +14 -0
- data/spec/legion/extensions/agentic/social/governance/helpers/layers_spec.rb +190 -0
- data/spec/legion/extensions/agentic/social/governance/helpers/proposal_spec.rb +188 -0
- data/spec/legion/extensions/agentic/social/governance/runners/governance_spec.rb +101 -0
- data/spec/legion/extensions/agentic/social/governance/runners/shadow_ai_spec.rb +65 -0
- data/spec/legion/extensions/agentic/social/joint_attention/client_spec.rb +36 -0
- data/spec/legion/extensions/agentic/social/joint_attention/helpers/attention_target_spec.rb +258 -0
- data/spec/legion/extensions/agentic/social/joint_attention/helpers/joint_focus_manager_spec.rb +238 -0
- data/spec/legion/extensions/agentic/social/joint_attention/runners/joint_attention_spec.rb +228 -0
- data/spec/legion/extensions/agentic/social/mentalizing/client_spec.rb +19 -0
- data/spec/legion/extensions/agentic/social/mentalizing/helpers/belief_attribution_spec.rb +108 -0
- data/spec/legion/extensions/agentic/social/mentalizing/helpers/mental_model_spec.rb +179 -0
- data/spec/legion/extensions/agentic/social/mentalizing/runners/mentalizing_spec.rb +162 -0
- data/spec/legion/extensions/agentic/social/mirror/client_spec.rb +92 -0
- data/spec/legion/extensions/agentic/social/mirror/helpers/constants_spec.rb +123 -0
- data/spec/legion/extensions/agentic/social/mirror/helpers/mirror_engine_spec.rb +217 -0
- data/spec/legion/extensions/agentic/social/mirror/helpers/mirror_event_spec.rb +102 -0
- data/spec/legion/extensions/agentic/social/mirror/helpers/simulation_spec.rb +100 -0
- data/spec/legion/extensions/agentic/social/mirror/runners/observe_spec.rb +77 -0
- data/spec/legion/extensions/agentic/social/mirror/runners/resonance_spec.rb +123 -0
- data/spec/legion/extensions/agentic/social/mirror/runners/simulate_spec.rb +103 -0
- data/spec/legion/extensions/agentic/social/mirror_system/client_spec.rb +40 -0
- data/spec/legion/extensions/agentic/social/mirror_system/helpers/mirror_system_spec.rb +144 -0
- data/spec/legion/extensions/agentic/social/mirror_system/helpers/observed_behavior_spec.rb +98 -0
- data/spec/legion/extensions/agentic/social/mirror_system/runners/mirror_spec.rb +122 -0
- data/spec/legion/extensions/agentic/social/moral_reasoning/client_spec.rb +34 -0
- data/spec/legion/extensions/agentic/social/moral_reasoning/helpers/dilemma_spec.rb +108 -0
- data/spec/legion/extensions/agentic/social/moral_reasoning/helpers/llm_enhancer_spec.rb +232 -0
- data/spec/legion/extensions/agentic/social/moral_reasoning/helpers/moral_engine_spec.rb +266 -0
- data/spec/legion/extensions/agentic/social/moral_reasoning/helpers/moral_foundation_spec.rb +70 -0
- data/spec/legion/extensions/agentic/social/moral_reasoning/runners/moral_reasoning_spec.rb +275 -0
- data/spec/legion/extensions/agentic/social/perspective_shifting/client_spec.rb +30 -0
- data/spec/legion/extensions/agentic/social/perspective_shifting/helpers/constants_spec.rb +99 -0
- data/spec/legion/extensions/agentic/social/perspective_shifting/helpers/perspective_spec.rb +77 -0
- data/spec/legion/extensions/agentic/social/perspective_shifting/helpers/perspective_view_spec.rb +105 -0
- data/spec/legion/extensions/agentic/social/perspective_shifting/helpers/shifting_engine_spec.rb +246 -0
- data/spec/legion/extensions/agentic/social/perspective_shifting/runners/perspective_shifting_spec.rb +277 -0
- data/spec/legion/extensions/agentic/social/social/client_spec.rb +72 -0
- data/spec/legion/extensions/agentic/social/social/helpers/constants_spec.rb +99 -0
- data/spec/legion/extensions/agentic/social/social/helpers/social_graph_spec.rb +322 -0
- data/spec/legion/extensions/agentic/social/social/runners/social_spec.rb +220 -0
- data/spec/legion/extensions/agentic/social/social_learning/client_spec.rb +25 -0
- data/spec/legion/extensions/agentic/social/social_learning/helpers/constants_spec.rb +44 -0
- data/spec/legion/extensions/agentic/social/social_learning/helpers/model_agent_spec.rb +120 -0
- data/spec/legion/extensions/agentic/social/social_learning/helpers/observed_behavior_spec.rb +81 -0
- data/spec/legion/extensions/agentic/social/social_learning/helpers/social_learning_engine_spec.rb +196 -0
- data/spec/legion/extensions/agentic/social/social_learning/runners/social_learning_spec.rb +150 -0
- data/spec/legion/extensions/agentic/social/symbiosis/client_spec.rb +45 -0
- data/spec/legion/extensions/agentic/social/symbiosis/helpers/constants_spec.rb +73 -0
- data/spec/legion/extensions/agentic/social/symbiosis/helpers/ecosystem_spec.rb +185 -0
- data/spec/legion/extensions/agentic/social/symbiosis/helpers/symbiosis_engine_spec.rb +182 -0
- data/spec/legion/extensions/agentic/social/symbiosis/helpers/symbiotic_bond_spec.rb +209 -0
- data/spec/legion/extensions/agentic/social/symbiosis/runners/cognitive_symbiosis_spec.rb +182 -0
- data/spec/legion/extensions/agentic/social/theory_of_mind/client_spec.rb +63 -0
- data/spec/legion/extensions/agentic/social/theory_of_mind/helpers/agent_model_spec.rb +244 -0
- data/spec/legion/extensions/agentic/social/theory_of_mind/helpers/constants_spec.rb +71 -0
- data/spec/legion/extensions/agentic/social/theory_of_mind/helpers/mental_state_tracker_spec.rb +228 -0
- data/spec/legion/extensions/agentic/social/theory_of_mind/runners/theory_of_mind_spec.rb +221 -0
- data/spec/legion/extensions/agentic/social/trust/actors/decay_spec.rb +62 -0
- data/spec/legion/extensions/agentic/social/trust/client_spec.rb +17 -0
- data/spec/legion/extensions/agentic/social/trust/helpers/trust_map_spec.rb +299 -0
- data/spec/legion/extensions/agentic/social/trust/helpers/trust_model_spec.rb +179 -0
- data/spec/legion/extensions/agentic/social/trust/local_persistence_spec.rb +359 -0
- data/spec/legion/extensions/agentic/social/trust/runners/trust_spec.rb +84 -0
- data/spec/spec_helper.rb +54 -0
- metadata +319 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Agentic
|
|
6
|
+
module Social
|
|
7
|
+
module MirrorSystem
|
|
8
|
+
module Helpers
|
|
9
|
+
module Constants
|
|
10
|
+
# Maximum observed behaviors to store
|
|
11
|
+
MAX_OBSERVATIONS = 200
|
|
12
|
+
|
|
13
|
+
# Maximum imitation candidates per domain
|
|
14
|
+
MAX_IMITATIONS = 50
|
|
15
|
+
|
|
16
|
+
# How quickly observed behaviors are internalized
|
|
17
|
+
MIRROR_ALPHA = 0.15
|
|
18
|
+
|
|
19
|
+
# Default resonance strength for new observations
|
|
20
|
+
DEFAULT_RESONANCE = 0.3
|
|
21
|
+
|
|
22
|
+
# Minimum resonance to keep an observation
|
|
23
|
+
RESONANCE_FLOOR = 0.05
|
|
24
|
+
|
|
25
|
+
# Resonance decay per tick
|
|
26
|
+
RESONANCE_DECAY = 0.01
|
|
27
|
+
|
|
28
|
+
# Boost when observation matches own repertoire
|
|
29
|
+
FAMILIARITY_BOOST = 0.2
|
|
30
|
+
|
|
31
|
+
# Boost from repeated observation of same behavior
|
|
32
|
+
REPETITION_BOOST = 0.1
|
|
33
|
+
|
|
34
|
+
# Maximum resonance value
|
|
35
|
+
MAX_RESONANCE = 1.0
|
|
36
|
+
|
|
37
|
+
# Imitation fidelity: how accurately behaviors are copied (0..1)
|
|
38
|
+
DEFAULT_FIDELITY = 0.7
|
|
39
|
+
|
|
40
|
+
# Fidelity improvement per successful imitation
|
|
41
|
+
FIDELITY_LEARNING_RATE = 0.05
|
|
42
|
+
|
|
43
|
+
# Maximum agents to mirror simultaneously
|
|
44
|
+
MAX_MIRRORED_AGENTS = 20
|
|
45
|
+
|
|
46
|
+
# Maximum behaviors in own repertoire
|
|
47
|
+
MAX_REPERTOIRE = 100
|
|
48
|
+
|
|
49
|
+
RESONANCE_LABELS = {
|
|
50
|
+
(0.8..) => :strong_mirror,
|
|
51
|
+
(0.6...0.8) => :resonating,
|
|
52
|
+
(0.4...0.6) => :echoing,
|
|
53
|
+
(0.2...0.4) => :faint,
|
|
54
|
+
(..0.2) => :silent
|
|
55
|
+
}.freeze
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Agentic
|
|
6
|
+
module Social
|
|
7
|
+
module MirrorSystem
|
|
8
|
+
module Helpers
|
|
9
|
+
class MirrorSystem
|
|
10
|
+
include Constants
|
|
11
|
+
|
|
12
|
+
attr_reader :observations, :repertoire, :fidelity_scores, :imitation_history
|
|
13
|
+
|
|
14
|
+
def initialize
|
|
15
|
+
@observations = {}
|
|
16
|
+
@repertoire = {}
|
|
17
|
+
@fidelity_scores = {}
|
|
18
|
+
@imitation_history = []
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def observe(agent_id:, action:, domain:, context: nil, outcome: nil)
|
|
22
|
+
key = observation_key(agent_id, action, domain)
|
|
23
|
+
if @observations.key?(key)
|
|
24
|
+
@observations[key].observe_again
|
|
25
|
+
@observations[key]
|
|
26
|
+
else
|
|
27
|
+
ensure_observation_capacity
|
|
28
|
+
obs = ObservedBehavior.new(
|
|
29
|
+
agent_id: agent_id,
|
|
30
|
+
action: action,
|
|
31
|
+
domain: domain,
|
|
32
|
+
context: context,
|
|
33
|
+
outcome: outcome
|
|
34
|
+
)
|
|
35
|
+
obs.boost_familiarity if repertoire_includes?(action, domain)
|
|
36
|
+
@observations[key] = obs
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def imitate(action:, domain:, source_agent: nil)
|
|
41
|
+
candidates = if source_agent
|
|
42
|
+
observations_for_agent(source_agent).select { |o| o.action == action && o.domain == domain }
|
|
43
|
+
else
|
|
44
|
+
@observations.values.select { |o| o.action == action && o.domain == domain }
|
|
45
|
+
end
|
|
46
|
+
return nil if candidates.empty?
|
|
47
|
+
|
|
48
|
+
best = candidates.max_by(&:resonance)
|
|
49
|
+
fidelity = fidelity_for(action, domain)
|
|
50
|
+
add_to_repertoire(action, domain, fidelity)
|
|
51
|
+
record_imitation(action, domain, source_agent, fidelity)
|
|
52
|
+
{ observation: best, fidelity: fidelity }
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def add_to_repertoire(action, domain, fidelity = DEFAULT_FIDELITY)
|
|
56
|
+
key = repertoire_key(action, domain)
|
|
57
|
+
if @repertoire.key?(key)
|
|
58
|
+
old = @repertoire[key][:fidelity]
|
|
59
|
+
@repertoire[key][:fidelity] = ema(old, fidelity, MIRROR_ALPHA)
|
|
60
|
+
@repertoire[key][:practice_count] += 1
|
|
61
|
+
else
|
|
62
|
+
trim_repertoire if @repertoire.size >= MAX_REPERTOIRE
|
|
63
|
+
@repertoire[key] = { action: action, domain: domain, fidelity: fidelity, practice_count: 1 }
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def update_fidelity(action:, domain:, success:)
|
|
68
|
+
key = repertoire_key(action, domain)
|
|
69
|
+
@fidelity_scores[key] ||= DEFAULT_FIDELITY
|
|
70
|
+
delta = success ? FIDELITY_LEARNING_RATE : -FIDELITY_LEARNING_RATE
|
|
71
|
+
@fidelity_scores[key] = (@fidelity_scores[key] + delta).clamp(0.0, 1.0)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def fidelity_for(action, domain)
|
|
75
|
+
@fidelity_scores.fetch(repertoire_key(action, domain), DEFAULT_FIDELITY)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def observations_for_agent(agent_id)
|
|
79
|
+
@observations.values.select { |o| o.agent_id == agent_id }
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def observations_in_domain(domain)
|
|
83
|
+
@observations.values.select { |o| o.domain == domain }
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def strongest_mirrors(count = 5)
|
|
87
|
+
@observations.values.sort_by { |o| -o.resonance }.first(count)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def repertoire_includes?(action, domain)
|
|
91
|
+
@repertoire.key?(repertoire_key(action, domain))
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def decay_all
|
|
95
|
+
@observations.each_value(&:decay)
|
|
96
|
+
@observations.reject! { |_, o| o.faded? }
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def observation_count
|
|
100
|
+
@observations.size
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def repertoire_size
|
|
104
|
+
@repertoire.size
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def mirrored_agents
|
|
108
|
+
@observations.values.map(&:agent_id).uniq
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def to_h
|
|
112
|
+
{
|
|
113
|
+
observations: observation_count,
|
|
114
|
+
repertoire_size: repertoire_size,
|
|
115
|
+
mirrored_agents: mirrored_agents.size,
|
|
116
|
+
history_size: @imitation_history.size
|
|
117
|
+
}
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
private
|
|
121
|
+
|
|
122
|
+
def observation_key(agent_id, action, domain)
|
|
123
|
+
:"#{agent_id}:#{action}:#{domain}"
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def repertoire_key(action, domain)
|
|
127
|
+
:"#{action}:#{domain}"
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def ema(old_val, new_val, alpha)
|
|
131
|
+
old_val + (alpha * (new_val - old_val))
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
def ensure_observation_capacity
|
|
135
|
+
return if @observations.size < MAX_OBSERVATIONS
|
|
136
|
+
|
|
137
|
+
weakest = @observations.min_by { |_, o| o.resonance }
|
|
138
|
+
@observations.delete(weakest.first) if weakest
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
def trim_repertoire
|
|
142
|
+
weakest = @repertoire.min_by { |_, r| r[:fidelity] }
|
|
143
|
+
@repertoire.delete(weakest.first) if weakest
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
def record_imitation(action, domain, source_agent, fidelity)
|
|
147
|
+
@imitation_history << {
|
|
148
|
+
action: action,
|
|
149
|
+
domain: domain,
|
|
150
|
+
source_agent: source_agent,
|
|
151
|
+
fidelity: fidelity,
|
|
152
|
+
at: Time.now.utc
|
|
153
|
+
}
|
|
154
|
+
@imitation_history.shift while @imitation_history.size > MAX_OBSERVATIONS
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Agentic
|
|
6
|
+
module Social
|
|
7
|
+
module MirrorSystem
|
|
8
|
+
module Helpers
|
|
9
|
+
class ObservedBehavior
|
|
10
|
+
attr_reader :id, :agent_id, :action, :domain, :context, :outcome, :created_at
|
|
11
|
+
attr_accessor :resonance, :observation_count
|
|
12
|
+
|
|
13
|
+
def initialize(agent_id:, action:, domain:, context: nil, outcome: nil, resonance: nil)
|
|
14
|
+
@id = SecureRandom.uuid
|
|
15
|
+
@agent_id = agent_id
|
|
16
|
+
@action = action
|
|
17
|
+
@domain = domain
|
|
18
|
+
@context = context
|
|
19
|
+
@outcome = outcome
|
|
20
|
+
@resonance = (resonance || Constants::DEFAULT_RESONANCE).clamp(0.0, Constants::MAX_RESONANCE)
|
|
21
|
+
@observation_count = 1
|
|
22
|
+
@created_at = Time.now.utc
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def observe_again
|
|
26
|
+
@observation_count += 1
|
|
27
|
+
@resonance = [@resonance + Constants::REPETITION_BOOST, Constants::MAX_RESONANCE].min
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def boost_familiarity
|
|
31
|
+
@resonance = [@resonance + Constants::FAMILIARITY_BOOST, Constants::MAX_RESONANCE].min
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def decay
|
|
35
|
+
@resonance = [@resonance - Constants::RESONANCE_DECAY, Constants::RESONANCE_FLOOR].max
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def faded?
|
|
39
|
+
@resonance <= Constants::RESONANCE_FLOOR
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def label
|
|
43
|
+
Constants::RESONANCE_LABELS.each { |range, lbl| return lbl if range.cover?(@resonance) }
|
|
44
|
+
:silent
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def to_h
|
|
48
|
+
{
|
|
49
|
+
id: @id,
|
|
50
|
+
agent_id: @agent_id,
|
|
51
|
+
action: @action,
|
|
52
|
+
domain: @domain,
|
|
53
|
+
context: @context,
|
|
54
|
+
outcome: @outcome,
|
|
55
|
+
resonance: @resonance,
|
|
56
|
+
observation_count: @observation_count,
|
|
57
|
+
label: label,
|
|
58
|
+
created_at: @created_at
|
|
59
|
+
}
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Agentic
|
|
6
|
+
module Social
|
|
7
|
+
module MirrorSystem
|
|
8
|
+
module Runners
|
|
9
|
+
module Mirror
|
|
10
|
+
include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
|
|
11
|
+
Legion::Extensions::Helpers.const_defined?(:Lex)
|
|
12
|
+
|
|
13
|
+
def observe_behavior(agent_id:, action:, domain:, context: nil, outcome: nil, **)
|
|
14
|
+
obs = mirror_system.observe(agent_id: agent_id, action: action, domain: domain, context: context, outcome: outcome)
|
|
15
|
+
Legion::Logging.debug "[mirror] observe: agent=#{agent_id} action=#{action} domain=#{domain} " \
|
|
16
|
+
"resonance=#{obs.resonance.round(3)} count=#{obs.observation_count}"
|
|
17
|
+
{ success: true, observation: obs.to_h }
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def imitate_behavior(action:, domain:, source_agent: nil, **)
|
|
21
|
+
result = mirror_system.imitate(action: action, domain: domain, source_agent: source_agent)
|
|
22
|
+
if result
|
|
23
|
+
Legion::Logging.debug "[mirror] imitate: action=#{action} domain=#{domain} " \
|
|
24
|
+
"fidelity=#{result[:fidelity].round(3)}"
|
|
25
|
+
{
|
|
26
|
+
success: true,
|
|
27
|
+
imitated: true,
|
|
28
|
+
action: action,
|
|
29
|
+
domain: domain,
|
|
30
|
+
fidelity: result[:fidelity].round(4),
|
|
31
|
+
source: result[:observation].agent_id,
|
|
32
|
+
resonance: result[:observation].resonance.round(4)
|
|
33
|
+
}
|
|
34
|
+
else
|
|
35
|
+
Legion::Logging.debug "[mirror] imitate: action=#{action} domain=#{domain} no_observation"
|
|
36
|
+
{ success: true, imitated: false, action: action, domain: domain }
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def report_imitation_outcome(action:, domain:, success_flag:, **)
|
|
41
|
+
mirror_system.update_fidelity(action: action, domain: domain, success: success_flag)
|
|
42
|
+
fidelity = mirror_system.fidelity_for(action, domain)
|
|
43
|
+
Legion::Logging.debug "[mirror] outcome: action=#{action} domain=#{domain} " \
|
|
44
|
+
"success=#{success_flag} fidelity=#{fidelity.round(3)}"
|
|
45
|
+
{ success: true, action: action, domain: domain, fidelity: fidelity.round(4) }
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def strongest_mirrors(count: 5, **)
|
|
49
|
+
mirrors = mirror_system.strongest_mirrors(count)
|
|
50
|
+
Legion::Logging.debug "[mirror] strongest: count=#{mirrors.size}"
|
|
51
|
+
{ success: true, mirrors: mirrors.map(&:to_h), count: mirrors.size }
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def observations_for(agent_id:, **)
|
|
55
|
+
observations = mirror_system.observations_for_agent(agent_id)
|
|
56
|
+
Legion::Logging.debug "[mirror] observations_for: agent=#{agent_id} count=#{observations.size}"
|
|
57
|
+
{ success: true, agent_id: agent_id, observations: observations.map(&:to_h), count: observations.size }
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def observations_in(domain:, **)
|
|
61
|
+
observations = mirror_system.observations_in_domain(domain)
|
|
62
|
+
Legion::Logging.debug "[mirror] observations_in: domain=#{domain} count=#{observations.size}"
|
|
63
|
+
{ success: true, domain: domain, observations: observations.map(&:to_h), count: observations.size }
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def repertoire_status(**)
|
|
67
|
+
rep = mirror_system.repertoire
|
|
68
|
+
Legion::Logging.debug "[mirror] repertoire: size=#{rep.size}"
|
|
69
|
+
{ success: true, repertoire: rep.values, size: rep.size }
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def update_mirror(**)
|
|
73
|
+
mirror_system.decay_all
|
|
74
|
+
Legion::Logging.debug "[mirror] tick: observations=#{mirror_system.observation_count} " \
|
|
75
|
+
"repertoire=#{mirror_system.repertoire_size} agents=#{mirror_system.mirrored_agents.size}"
|
|
76
|
+
{
|
|
77
|
+
success: true,
|
|
78
|
+
observations: mirror_system.observation_count,
|
|
79
|
+
repertoire: mirror_system.repertoire_size,
|
|
80
|
+
agents: mirror_system.mirrored_agents.size
|
|
81
|
+
}
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def mirror_stats(**)
|
|
85
|
+
{ success: true, stats: mirror_system.to_h }
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
private
|
|
89
|
+
|
|
90
|
+
def mirror_system
|
|
91
|
+
@mirror_system ||= Helpers::MirrorSystem.new
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'securerandom'
|
|
4
|
+
require 'legion/extensions/agentic/social/mirror_system/version'
|
|
5
|
+
require 'legion/extensions/agentic/social/mirror_system/helpers/constants'
|
|
6
|
+
require 'legion/extensions/agentic/social/mirror_system/helpers/observed_behavior'
|
|
7
|
+
require 'legion/extensions/agentic/social/mirror_system/helpers/mirror_system'
|
|
8
|
+
require 'legion/extensions/agentic/social/mirror_system/runners/mirror'
|
|
9
|
+
require 'legion/extensions/agentic/social/mirror_system/client'
|
|
10
|
+
|
|
11
|
+
module Legion
|
|
12
|
+
module Extensions
|
|
13
|
+
module Agentic
|
|
14
|
+
module Social
|
|
15
|
+
module MirrorSystem
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'runners/moral_reasoning'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module Extensions
|
|
7
|
+
module Agentic
|
|
8
|
+
module Social
|
|
9
|
+
module MoralReasoning
|
|
10
|
+
class Client
|
|
11
|
+
include Runners::MoralReasoning
|
|
12
|
+
|
|
13
|
+
def initialize(**); end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Agentic
|
|
6
|
+
module Social
|
|
7
|
+
module MoralReasoning
|
|
8
|
+
module Helpers
|
|
9
|
+
module Constants
|
|
10
|
+
MAX_DILEMMAS = 100
|
|
11
|
+
MAX_PRINCIPLES = 50
|
|
12
|
+
MAX_HISTORY = 300
|
|
13
|
+
|
|
14
|
+
DEFAULT_WEIGHT = 0.5
|
|
15
|
+
WEIGHT_FLOOR = 0.1
|
|
16
|
+
WEIGHT_CEILING = 1.0
|
|
17
|
+
REINFORCEMENT_RATE = 0.1
|
|
18
|
+
DECAY_RATE = 0.01
|
|
19
|
+
|
|
20
|
+
# Haidt's 6 Moral Foundations
|
|
21
|
+
MORAL_FOUNDATIONS = %i[care fairness loyalty authority sanctity liberty].freeze
|
|
22
|
+
|
|
23
|
+
# Kohlberg's 6 Stages (grouped into 3 levels)
|
|
24
|
+
KOHLBERG_STAGES = %i[obedience self_interest conformity law_and_order social_contract universal_ethics].freeze
|
|
25
|
+
|
|
26
|
+
KOHLBERG_LEVELS = {
|
|
27
|
+
preconventional: %i[obedience self_interest],
|
|
28
|
+
conventional: %i[conformity law_and_order],
|
|
29
|
+
postconventional: %i[social_contract universal_ethics]
|
|
30
|
+
}.freeze
|
|
31
|
+
|
|
32
|
+
# Ethical frameworks for dilemma resolution
|
|
33
|
+
ETHICAL_FRAMEWORKS = %i[utilitarian deontological virtue care justice rights].freeze
|
|
34
|
+
|
|
35
|
+
# Dilemma severity labels keyed by endless/beginless ranges
|
|
36
|
+
SEVERITY_LABELS = {
|
|
37
|
+
(0.8..) => :critical,
|
|
38
|
+
(0.6...0.8) => :serious,
|
|
39
|
+
(0.4...0.6) => :moderate,
|
|
40
|
+
(0.2...0.4) => :minor,
|
|
41
|
+
(..0.2) => :trivial
|
|
42
|
+
}.freeze
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Agentic
|
|
6
|
+
module Social
|
|
7
|
+
module MoralReasoning
|
|
8
|
+
module Helpers
|
|
9
|
+
class Dilemma
|
|
10
|
+
include Constants
|
|
11
|
+
|
|
12
|
+
attr_reader :id, :description, :domain, :severity, :options,
|
|
13
|
+
:chosen_option, :reasoning, :framework_used,
|
|
14
|
+
:created_at, :resolved_at
|
|
15
|
+
|
|
16
|
+
def initialize(id:, description:, options:, domain: :general, severity: 0.5)
|
|
17
|
+
@id = id
|
|
18
|
+
@description = description
|
|
19
|
+
@domain = domain
|
|
20
|
+
@severity = severity.clamp(0.0, 1.0)
|
|
21
|
+
@options = options
|
|
22
|
+
@chosen_option = nil
|
|
23
|
+
@reasoning = nil
|
|
24
|
+
@framework_used = nil
|
|
25
|
+
@resolved = false
|
|
26
|
+
@created_at = Time.now.utc
|
|
27
|
+
@resolved_at = nil
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def severity_label
|
|
31
|
+
SEVERITY_LABELS.find { |range, _| range.cover?(@severity) }&.last
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def resolve(option_id:, reasoning:, framework:)
|
|
35
|
+
@chosen_option = option_id
|
|
36
|
+
@reasoning = reasoning
|
|
37
|
+
@framework_used = framework
|
|
38
|
+
@resolved = true
|
|
39
|
+
@resolved_at = Time.now.utc
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def resolved?
|
|
43
|
+
@resolved
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def to_h
|
|
47
|
+
{
|
|
48
|
+
id: @id,
|
|
49
|
+
description: @description,
|
|
50
|
+
domain: @domain,
|
|
51
|
+
severity: @severity,
|
|
52
|
+
severity_label: severity_label,
|
|
53
|
+
options: @options,
|
|
54
|
+
chosen_option: @chosen_option,
|
|
55
|
+
reasoning: @reasoning,
|
|
56
|
+
framework_used: @framework_used,
|
|
57
|
+
resolved: @resolved,
|
|
58
|
+
created_at: @created_at,
|
|
59
|
+
resolved_at: @resolved_at
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|