legion-tty 0.4.37 → 0.4.38

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6aab5b9e38570a9072b676e7573506c5051693e503ff3861c1f7c042e836267
4
- data.tar.gz: 412cd703adfd6117e87fb0a57820d8d01c60d2701dea9b2b0c6c30c5f0a44f06
3
+ metadata.gz: 5015163992ac8b889c19088f2caa60b3e80fc09445c7feb27085f4c39c0857a5
4
+ data.tar.gz: 6eadf44a9366956867b097b1a10769ae18b01d1a644daae91c3ea5fade6681b3
5
5
  SHA512:
6
- metadata.gz: e6164b922a3e05f202cc8ae224ce0a8ebc84cba655ee333bfc74dfaf66f3ab62aeff4dfde49e624d7d40f26e0cb377a3ba36a20b0f03e0806f55f08e9efd43da
7
- data.tar.gz: 37b23570482bc80906620439d165594bd436d56c87da0f13612729e8e5d06f26ebf786881c88b708236efb9af3d55f71c407e46051680479bd1f6c95940f1d68
6
+ metadata.gz: 914de3d2b07691224655ac5b1dd4bb7b1dd9b88083fde6a0b719c9398a654c0b91640c621ea88865d11ad8b737909af0a24dcbae9ff1e4d200be8eda58d14af6
7
+ data.tar.gz: dd740544c87c71fa843e72ad602f49d029cd485f16d4b2532e55927ce33b2019042772812f59281aa00633c75af9ed5b3ce0f89c84070bd250ce51c27db304bf
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.38] - 2026-03-26
4
+
5
+ ### Added
6
+ - `build_system_prompt` injects a live self-awareness section from `lex-agentic-self` Metacognition when the gem is loaded; guarded with a `defined?` check and `rescue StandardError` so chat is unaffected if the module is absent or raises; narrative is stripped and capped at 2000 chars to prevent prompt bloat
7
+
3
8
  ## [0.4.37] - 2026-03-26
4
9
 
5
10
  ### Fixed
@@ -344,6 +344,26 @@ module Legion
344
344
  lines << "Top languages: #{env[:top_languages].keys.join(', ')}" if env[:top_languages]&.any?
345
345
  end
346
346
 
347
+ if defined?(Legion::Extensions::Agentic::Self::Metacognition::Runners::Metacognition)
348
+ begin
349
+ result = Legion::Extensions::Agentic::Self::Metacognition::Runners::Metacognition.self_narrative
350
+ narrative = result[:prose] if result.is_a?(Hash) && result[:prose]
351
+ if narrative
352
+ narrative = narrative.strip
353
+ narrative = narrative[0, 2000] if narrative.length > 2000
354
+ end
355
+ if narrative && !narrative.empty?
356
+ lines << ''
357
+ lines << 'Current self-awareness:'
358
+ lines << narrative
359
+ end
360
+ rescue StandardError => e
361
+ if defined?(Legion::Logging)
362
+ Legion::Logging.warn("Metacognition.self_narrative failed: #{e.class}: #{e.message}")
363
+ end
364
+ end
365
+ end
366
+
347
367
  lines.join("\n")
348
368
  end
349
369
  # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module TTY
5
- VERSION = '0.4.37'
5
+ VERSION = '0.4.38'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-tty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.37
4
+ version: 0.4.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity