Module: Legion::Extensions::Agentic::Integration::Map::Helpers::Constants

Defined in:
lib/legion/extensions/agentic/integration/map/helpers/constants.rb

Constant Summary collapse

MAX_LOCATIONS =

Graph size limits

500
MAX_EDGES_PER_LOCATION =
20
MAX_PATHS_CACHED =
100
DEFAULT_DISTANCE =

Edge weights

1.0
DISTANCE_FLOOR =
0.01
FAMILIARITY_ALPHA =

Familiarity EMA

0.12
FAMILIARITY_DECAY =
0.005
FAMILIARITY_FLOOR =
0.05
VISIT_BOOST =
0.1
MAX_VISIT_HISTORY =

Visit history ring buffer

300
REMAP_THRESHOLD =

Context remapping

0.5
MAX_CONTEXTS =
10
FAMILIARITY_LEVELS =

Familiarity level labels (ascending thresholds)

{
  (0.0...0.2) => :unknown,
  (0.2...0.4) => :sparse,
  (0.4...0.6) => :moderate,
  (0.6...0.8) => :familiar,
  (0.8..1.0)  => :intimate
}.freeze
DISTANCE_CATEGORIES =

Distance category labels (ascending thresholds)

{
  (0.0...0.5) => :adjacent,
  (0.5...1.5) => :near,
  (1.5...3.0) => :moderate,
  (3.0...6.0) => :distant,
  (6.0..)     => :remote
}.freeze

Class Method Summary collapse

Class Method Details

.distance_category(value) ⇒ Object



59
60
61
62
63
64
# File 'lib/legion/extensions/agentic/integration/map/helpers/constants.rb', line 59

def distance_category(value)
  DISTANCE_CATEGORIES.each do |range, label|
    return label if range.cover?(value)
  end
  :remote
end

.familiarity_level(value) ⇒ Object



52
53
54
55
56
57
# File 'lib/legion/extensions/agentic/integration/map/helpers/constants.rb', line 52

def familiarity_level(value)
  FAMILIARITY_LEVELS.each do |range, label|
    return label if range.cover?(value)
  end
  :intimate
end