Module: Legion::Extensions::Agentic::Defense::Phantom::Helpers::Constants
- Defined in:
- lib/legion/extensions/agentic/defense/phantom/helpers/constants.rb
Constant Summary collapse
- MAX_PHANTOMS =
100- INITIAL_INTENSITY =
0.8- INTENSITY_DECAY =
0.05- MIN_INTENSITY =
0.01- PHANTOM_STATES =
%i[acute adapting residual resolved].freeze
- TRIGGER_TYPES =
%i[stimulus_match contextual_association temporal_pattern habitual].freeze
- STATE_THRESHOLDS =
{ acute: 0.6, adapting: 0.3, residual: MIN_INTENSITY }.freeze
- PHANTOM_LABELS =
{ acute: 'Active phantom — strong ghost signals firing', adapting: 'Adapting — agent learning to cope with absence', residual: 'Residual — faint ghost signals, near resolution', resolved: 'Resolved — phantom fully integrated and silent' }.freeze
Class Method Summary collapse
Class Method Details
.label_for(state) ⇒ Object
33 34 35 |
# File 'lib/legion/extensions/agentic/defense/phantom/helpers/constants.rb', line 33 def label_for(state) PHANTOM_LABELS.fetch(state, 'Unknown state') end |
.state_for(intensity) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/legion/extensions/agentic/defense/phantom/helpers/constants.rb', line 37 def state_for(intensity) if intensity >= STATE_THRESHOLDS[:acute] :acute elsif intensity >= STATE_THRESHOLDS[:adapting] :adapting elsif intensity > MIN_INTENSITY :residual else :resolved end end |