lex-agentic-self 0.1.4 → 0.1.5

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: 5e075b1a80471e528efd16849defb563ae95db0ee992d22e36e271083d5ae779
4
- data.tar.gz: 2e1c5ef85659f71bea0c6632dd97f1d78a28011e4c6311eb4ebf1e1be8468c07
3
+ metadata.gz: 98d452ce56f3fa7c6ece3361c2a6db2ea8d27d90920a3f0213b7104d18266d6d
4
+ data.tar.gz: 11f243a38794e5f2ddd7984f180b266cedfaf80f9e45900c3aa3ed34846de2c3
5
5
  SHA512:
6
- metadata.gz: 32ee36cbcaa4723a8a5b689b1d9ce003940d4c2879f3f3ad24a4fbfe05157495ba70c36a74122fe9f47bbcfcf8dd97cd6f94f63e2bc7041102341e25479e9597
7
- data.tar.gz: e0a21323f1e65b5baa55a2ada5240a668a9453ee755b0e8fb7cc70e3932540f73cdee3ad7dd31be67b5f2e6d79ab67edae192be092860e9dec5ce351759b0b1c
6
+ metadata.gz: a7151c1a8a11a302d7a5f462862329fb0342322d08f364bc74df27f96c9c26e5e8b160ef7fe1ee0217ecd985b43a9a26c43805c5ba87b141f47a1a23f250b854
7
+ data.tar.gz: c89c2f6752325ee99d28964dba687a49f303ef445d3e909d4dedd0add8969431b03e21fc481cc587983473af445e7f32384c96d9717a359f0dc3755a3f069415
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.5] - 2026-03-23
4
+
5
+ ### Changed
6
+ - route llm calls through pipeline when available, add caller identity for attribution
7
+
3
8
  ## [0.1.4] - 2026-03-23
4
9
 
5
10
  ### Fixed
@@ -50,12 +50,31 @@ module Legion
50
50
  # --- Private helpers ---
51
51
 
52
52
  def llm_ask(prompt)
53
- chat = Legion::LLM.chat
54
- chat.with_instructions(SYSTEM_PROMPT)
55
- chat.ask(prompt)
53
+ if pipeline_available?
54
+ response = Legion::LLM::Pipeline::GaiaCaller.chat(
55
+ message: prompt,
56
+ phase: 'self_talk',
57
+ caller: { extension: 'lex-agentic-self', mode: :self_talk }
58
+ )
59
+ content = response&.message&.dig(:content)
60
+ ::Struct.new(:content).new(content) if content
61
+ else
62
+ chat = Legion::LLM.chat
63
+ chat.with_instructions(SYSTEM_PROMPT)
64
+ chat.ask(prompt)
65
+ end
56
66
  end
57
67
  private_class_method :llm_ask
58
68
 
69
+ def pipeline_available?
70
+ !!(defined?(Legion::LLM::Pipeline::GaiaCaller) &&
71
+ Legion::LLM.respond_to?(:pipeline_enabled?) &&
72
+ Legion::LLM.pipeline_enabled?)
73
+ rescue StandardError
74
+ false
75
+ end
76
+ private_class_method :pipeline_available?
77
+
59
78
  def build_generate_turn_prompt(voice_type:, topic:, prior_turns:)
60
79
  prior_lines = prior_turns.map do |t|
61
80
  "[#{t[:voice_name] || t[:voice_id]}] (#{t[:position]}): #{t[:content]}"
@@ -4,7 +4,7 @@ module Legion
4
4
  module Extensions
5
5
  module Agentic
6
6
  module Self
7
- VERSION = '0.1.4'
7
+ VERSION = '0.1.5'
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-agentic-self
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity