lex-microsoft_teams 0.6.15 → 0.6.16

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: 1f1d44ab9629e5fae32a00f28afb74942d9872083de6e378e6585eeb7ae091ba
4
- data.tar.gz: 5994c5df760cbe750b1dbb53dfc7de3f04812d173efd29cad18d5d49890c85e3
3
+ metadata.gz: 7ad20d81a8d2c2a597d2415f896f8ae4c8209efde74efd99fd0c1b630cc2ce60
4
+ data.tar.gz: 44d7b8e2d0831df8116a44379096f9264d6d27302d8787fdc97a9652762f5c3b
5
5
  SHA512:
6
- metadata.gz: 7548451323db291361400838619ba453d2b1eac29ac5291ab3688f61b604d1600aca5841446f60816fc10639905b03a1edcde82cbff80b66848a8ed6fc90c48f
7
- data.tar.gz: 5a0c144c9ee151dd7a68d621377ea591fbbb0e83ef03b208e877f979a69be1681e6af5bfa32533f560cdfd8626cadf4193f74fcb1af5b4771f0a11d8b298b817
6
+ metadata.gz: e6d66af6d00faed231e1d889e60f906f22f03a79ff9ebced10745fd41cb0a260929f1fb25222e39a6a6c0705414799e768a36ab1f163cdf7c67980654c3ccbb7
7
+ data.tar.gz: 54fe1f02a29d2edb885bec85f56c94173b7857815d01532299fb05e985535eace1237a9322bc54a0752efdb68213e2e7701d27fecbd765f6bb250b4ae4361216
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ ### Changed
6
+ - add caller identity to llm_chat calls in bot and profile_ingest runners for pipeline attribution
7
+
3
8
  ## [0.6.15] - 2026-03-23
4
9
 
5
10
  ### Added
@@ -118,7 +118,7 @@ module Legion
118
118
  def observe_message(chat_id:, owner_id:, text:, from:, peer_name:, timestamp: nil, **)
119
119
  return { result: :skipped, reason: :observe_disabled } unless observe_enabled?
120
120
 
121
- extraction = extract_from_message(text: text, from: from, peer_name: peer_name)
121
+ extraction = extract_from_message(text: text, from: from, peer_name: peer_name, owner_id: owner_id)
122
122
 
123
123
  store_observation(
124
124
  chat_id: chat_id, owner_id: owner_id, text: text,
@@ -178,7 +178,8 @@ module Legion
178
178
  text,
179
179
  instructions: session[:system_prompt],
180
180
  model: config[:model],
181
- intent: config[:intent]
181
+ intent: config[:intent],
182
+ caller: { id: session[:owner_id], extension: 'lex-microsoft_teams', mode: :bot_response }
182
183
  )
183
184
  response.content
184
185
  rescue StandardError => e
@@ -219,13 +220,13 @@ module Legion
219
220
  Legion::Settings.dig(:microsoft_teams, :bot, :observe, :notify) == true
220
221
  end
221
222
 
222
- def extract_from_message(text:, from:, peer_name:)
223
+ def extract_from_message(text:, from:, peer_name:, owner_id: nil)
223
224
  return nil unless llm_available?
224
225
 
225
226
  prompt = resolve_prompt(mode: :observe, conversation_id: nil)
226
227
  context = "#{from[:name] || peer_name} said: #{text}"
227
228
 
228
- response = llm_chat(context, instructions: prompt)
229
+ response = llm_chat(context, instructions: prompt, caller: { id: owner_id, extension: 'lex-microsoft_teams', mode: :observe })
229
230
  parse_extraction(response.content)
230
231
  rescue StandardError => e
231
232
  log.error("Observation extraction failed: #{e.message}")
@@ -229,7 +229,8 @@ module Legion
229
229
  result = client.transform(text: text, **definition)
230
230
  result[:result] || result[:error] ? nil : result
231
231
  elsif defined?(Legion::LLM)
232
- Legion::LLM.ask(prompt: "#{definition[:prompt]}\n\nConversation with #{peer_name}:\n#{text}")
232
+ Legion::LLM.ask(prompt: "#{definition[:prompt]}\n\nConversation with #{peer_name}:\n#{text}",
233
+ caller: { extension: 'lex-microsoft_teams', runner: 'profile_ingest' })
233
234
  end
234
235
  rescue StandardError => e
235
236
  log.debug("ProfileIngest: extract_conversation failed: #{e.message}")
@@ -3,7 +3,7 @@
3
3
  module Legion
4
4
  module Extensions
5
5
  module MicrosoftTeams
6
- VERSION = '0.6.15'
6
+ VERSION = '0.6.16'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-microsoft_teams
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.15
4
+ version: 0.6.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity