Module: Legion::Extensions::Agentic::Affect::Interoception::Helpers::Constants

Included in:
BodyBudget
Defined in:
lib/legion/extensions/agentic/affect/interoception/helpers/constants.rb

Constant Summary collapse

VITAL_CHANNELS =

Vital signal channels the agent monitors

%i[
  cpu_load memory_pressure queue_depth
  response_latency error_rate connection_health
  disk_usage thread_count gc_pressure
].freeze
MARKER_POSITIVE_THRESHOLD =

Somatic marker valence thresholds

0.3
MARKER_NEGATIVE_THRESHOLD =
-0.3
MARKER_INFLUENCE =

How strongly markers bias decisions (0..1)

0.4
VITAL_ALPHA =

EMA alpha for vital signal smoothing

0.15
DEFAULT_BASELINE =

Default baseline for vitals (normalized 0..1)

0.5
DEVIATION_THRESHOLD =

Deviation from baseline that triggers a somatic marker

0.2
MAX_MARKERS =

Maximum stored somatic markers

200
MAX_VITAL_HISTORY =

Maximum stored vital snapshots per channel

100
MARKER_DECAY =

Marker decay per tick

0.02
MARKER_FLOOR =

Marker floor (below this, marker is pruned)

0.05
BODY_BUDGET_LABELS =

Body budget labels based on overall vital health

{
  (0.8..)     => :thriving,
  (0.6...0.8) => :comfortable,
  (0.4...0.6) => :strained,
  (0.2...0.4) => :distressed,
  (..0.2)     => :critical
}.freeze
VITAL_LABELS =

Vital health labels

{
  (0.8..)     => :healthy,
  (0.6...0.8) => :nominal,
  (0.4...0.6) => :elevated,
  (0.2...0.4) => :warning,
  (..0.2)     => :critical
}.freeze