legion-gaia 0.9.56 → 0.9.57
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/legion/gaia/input_frame.rb +11 -4
- data/lib/legion/gaia/phase_wiring.rb +4 -9
- data/lib/legion/gaia/router/agent_bridge.rb +2 -1
- data/lib/legion/gaia/router/transport/messages/input_frame_message.rb +2 -1
- data/lib/legion/gaia/tracker_persistence.rb +10 -2
- data/lib/legion/gaia/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 304d68143516d528bf4b5c72d3cc1d42395e46942e162c40566d9b8051a047af
|
|
4
|
+
data.tar.gz: 25fcee870f9b736fa469739d13850e07e1996ef56c5f88ec99bc5701c2cf358a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b783cc1c8b0ef180dae9a9eee46ca40a71dcc5de87b5ba746d225aa050a4ad7f29ed733cdf80caba41567927437cf0b541962e2b8c29d33f5bd5fab51d599aa1
|
|
7
|
+
data.tar.gz: c60c7881c78115c0854f5b77cdec2e8d79f75daae060d2b10baca28087b44bd511fe88eb82d9ee7a0a3fc8a47932643d60b839df883970dd2e7e7f60b649b679
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.57] - 2026-05-15
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Stop GAIA dream-cycle knowledge promotion from storing consolidation-count bookkeeping in Apollo; maintenance summaries like `Consolidated N memory trace(s) to long-term storage` are no longer promoted as actionable knowledge.
|
|
7
|
+
|
|
3
8
|
## [0.9.56] - 2026-05-15
|
|
4
9
|
|
|
5
10
|
### Fixed
|
|
@@ -16,9 +16,10 @@ module Legion
|
|
|
16
16
|
:session_continuity_id,
|
|
17
17
|
:auth_context,
|
|
18
18
|
:metadata,
|
|
19
|
-
:received_at
|
|
19
|
+
:received_at,
|
|
20
|
+
:principal_id
|
|
20
21
|
) do
|
|
21
|
-
def initialize(
|
|
22
|
+
def initialize( # rubocop:disable Metrics/ParameterLists
|
|
22
23
|
content:,
|
|
23
24
|
channel_id:,
|
|
24
25
|
id: SecureRandom.uuid,
|
|
@@ -28,7 +29,8 @@ module Legion
|
|
|
28
29
|
session_continuity_id: nil,
|
|
29
30
|
auth_context: {},
|
|
30
31
|
metadata: {},
|
|
31
|
-
received_at: Time.now.utc
|
|
32
|
+
received_at: Time.now.utc,
|
|
33
|
+
principal_id: nil
|
|
32
34
|
)
|
|
33
35
|
super
|
|
34
36
|
end
|
|
@@ -45,6 +47,10 @@ module Legion
|
|
|
45
47
|
metadata[:salience] || 0.0
|
|
46
48
|
end
|
|
47
49
|
|
|
50
|
+
def resolved_principal_id
|
|
51
|
+
principal_id || auth_context&.dig(:principal_id)
|
|
52
|
+
end
|
|
53
|
+
|
|
48
54
|
def to_signal
|
|
49
55
|
{
|
|
50
56
|
value: content,
|
|
@@ -52,7 +58,8 @@ module Legion
|
|
|
52
58
|
salience: salience,
|
|
53
59
|
channel_id: channel_id,
|
|
54
60
|
frame_id: id,
|
|
55
|
-
received_at: received_at
|
|
61
|
+
received_at: received_at,
|
|
62
|
+
principal_id: resolved_principal_id
|
|
56
63
|
}
|
|
57
64
|
end
|
|
58
65
|
end
|
|
@@ -89,7 +89,8 @@ module Legion
|
|
|
89
89
|
{ limit: knowledge_setting(:memory_retrieval_limit, 10) }
|
|
90
90
|
},
|
|
91
91
|
knowledge_retrieval: lambda { |ctx|
|
|
92
|
-
|
|
92
|
+
human_signal = ctx[:signals]&.select { |s| s.is_a?(Hash) && s[:source_type] == :human_direct }&.last
|
|
93
|
+
current_signal = human_signal || ctx[:signals]&.last
|
|
93
94
|
memory_results = ctx.dig(:prior_results, :memory_retrieval)
|
|
94
95
|
skip_threshold = knowledge_setting(:memory_skip_threshold, 0.8)
|
|
95
96
|
|
|
@@ -102,7 +103,8 @@ module Legion
|
|
|
102
103
|
text: current_signal[:value] || current_signal[:content] || current_signal.to_s,
|
|
103
104
|
limit: knowledge_setting(:retrieval_limit, 5),
|
|
104
105
|
min_confidence: knowledge_setting(:retrieval_min_confidence, 0.3),
|
|
105
|
-
tags: current_signal[:tags]
|
|
106
|
+
tags: current_signal[:tags],
|
|
107
|
+
requesting_principal_id: current_signal[:principal_id]
|
|
106
108
|
}
|
|
107
109
|
},
|
|
108
110
|
identity_entropy_check: ->(_ctx) { {} },
|
|
@@ -517,7 +519,6 @@ module Legion
|
|
|
517
519
|
parts = [
|
|
518
520
|
extract_association(prior_results[:association_walk]),
|
|
519
521
|
extract_conflicts(prior_results[:contradiction_resolution]),
|
|
520
|
-
extract_consolidation(prior_results[:consolidation_commit]),
|
|
521
522
|
extract_reflection(prior_results[:dream_reflection]),
|
|
522
523
|
extract_agenda(prior_results[:agenda_formation])
|
|
523
524
|
].compact
|
|
@@ -560,12 +561,6 @@ module Legion
|
|
|
560
561
|
"Resolved #{conflicts[:resolved]} contradiction(s)"
|
|
561
562
|
end
|
|
562
563
|
|
|
563
|
-
def extract_consolidation(consol)
|
|
564
|
-
return unless consol.is_a?(Hash) && consol[:migrated].to_i.positive?
|
|
565
|
-
|
|
566
|
-
"Consolidated #{consol[:migrated]} memory trace(s) to long-term storage"
|
|
567
|
-
end
|
|
568
|
-
|
|
569
564
|
def extract_reflection(reflection)
|
|
570
565
|
return unless reflection.is_a?(Hash) && reflection[:insight].is_a?(String) && !reflection[:insight].empty?
|
|
571
566
|
|
|
@@ -85,7 +85,8 @@ module Legion
|
|
|
85
85
|
device_context: payload[:device_context] || {},
|
|
86
86
|
session_continuity_id: payload[:session_continuity_id],
|
|
87
87
|
auth_context: payload[:auth_context] || {},
|
|
88
|
-
metadata: payload[:metadata] || {}
|
|
88
|
+
metadata: payload[:metadata] || {},
|
|
89
|
+
principal_id: payload[:principal_id]
|
|
89
90
|
)
|
|
90
91
|
rescue StandardError => e
|
|
91
92
|
handle_exception(e, level: :warn, operation: 'gaia.router.agent_bridge.reconstruct_input_frame',
|
|
@@ -29,7 +29,8 @@ module Legion
|
|
|
29
29
|
session_continuity_id: frame.session_continuity_id,
|
|
30
30
|
auth_context: frame.auth_context,
|
|
31
31
|
metadata: frame.metadata,
|
|
32
|
-
received_at: frame.received_at.to_s
|
|
32
|
+
received_at: frame.received_at.to_s,
|
|
33
|
+
principal_id: frame.principal_id
|
|
33
34
|
}
|
|
34
35
|
end
|
|
35
36
|
|
|
@@ -96,8 +96,16 @@ module Legion
|
|
|
96
96
|
def flush_tracker(tracker, store:)
|
|
97
97
|
entries = tracker.to_apollo_entries
|
|
98
98
|
results = entries.map do |entry|
|
|
99
|
-
store.upsert(
|
|
100
|
-
|
|
99
|
+
store.upsert(
|
|
100
|
+
content: entry[:content],
|
|
101
|
+
tags: entry[:tags],
|
|
102
|
+
source_channel: 'gaia',
|
|
103
|
+
confidence: entry.fetch(:confidence, 0.9),
|
|
104
|
+
access_scope: entry.fetch(:access_scope, 'global'),
|
|
105
|
+
identity_canonical_name: entry[:identity_canonical_name],
|
|
106
|
+
identity_principal_id: entry[:identity_principal_id],
|
|
107
|
+
identity_id: entry[:identity_id]
|
|
108
|
+
)
|
|
101
109
|
end
|
|
102
110
|
|
|
103
111
|
unless results.all? { |result| upsert_succeeded?(result) }
|
data/lib/legion/gaia/version.rb
CHANGED