lex-microsoft_teams 0.6.47 → 0.6.49
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/.gitignore +1 -0
- data/CHANGELOG.md +6 -1
- data/lib/legion/extensions/microsoft_teams/absorbers/channel.rb +2 -1
- data/lib/legion/extensions/microsoft_teams/absorbers/chat.rb +2 -1
- data/lib/legion/extensions/microsoft_teams/absorbers/meeting.rb +4 -2
- data/lib/legion/extensions/microsoft_teams/actors/channel_poller.rb +1 -1
- data/lib/legion/extensions/microsoft_teams/runners/api_ingest.rb +2 -0
- data/lib/legion/extensions/microsoft_teams/runners/call_events.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/channel_messages.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/chats.rb +3 -0
- data/lib/legion/extensions/microsoft_teams/runners/files.rb +5 -0
- data/lib/legion/extensions/microsoft_teams/runners/local_cache.rb +2 -0
- data/lib/legion/extensions/microsoft_teams/runners/meeting_artifacts.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/meetings.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/messages.rb +5 -0
- data/lib/legion/extensions/microsoft_teams/runners/ownership.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/presence.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/profile_ingest.rb +7 -1
- data/lib/legion/extensions/microsoft_teams/runners/subscriptions.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/teams.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/transcripts.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/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: 7d7ed7b213d241bf12a0a136a8dc25f2947bc9ca3ddd12a9d82209ba48f32a09
|
|
4
|
+
data.tar.gz: d95e3207bd11005fc666fe9b041af5a5f5293258b61e66c178d0ce6d14180621
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 69406bc97f76d99714cf2956b42f60f86554878139f7ff2c1af43de259d295c5de2fc0b2440ed77476e5596d1514f7a524109a88baa5315de55d927c6a83f7e7
|
|
7
|
+
data.tar.gz: 4dc517d8e65e5fbed9e685c17e3966da84030a0b5a51087e391903720c3ee49097ca041d83fd1062dad40e4825805d156685cd617305ffe8ca70ca10abb06564
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [
|
|
3
|
+
## [0.6.48] - 2026-05-18
|
|
4
|
+
### Added
|
|
5
|
+
- Definition DSL declarations across all runners for proper tool discovery and MCP exposure
|
|
6
|
+
- Fix transformer API: map definition[:prompt] to transform(transformation:) for lex-transformer 0.3.8
|
|
7
|
+
|
|
4
8
|
### Fixed
|
|
5
9
|
- Bot response and observation extraction now pass explicit system and user messages to native `Legion::LLM.chat` dispatch instead of routing through the legacy nil-input `llm_chat` helper path.
|
|
10
|
+
- Runner modules that declare `definition` now explicitly `extend Legion::Extensions::Definitions` before those DSL calls, fixing `NoMethodError: undefined method 'definition'` during Legion extension boot.
|
|
6
11
|
|
|
7
12
|
## [0.6.45] - 2026-04-23
|
|
8
13
|
|
|
@@ -168,7 +168,8 @@ module Legion
|
|
|
168
168
|
tags: ['teams', 'channel', 'thread', channel_name],
|
|
169
169
|
source_file: "teams://teams/#{team_id}/channels/#{channel_id}/messages/#{msg_id}",
|
|
170
170
|
heading: "Channel Thread: #{channel_name}#{" — #{subject}" if subject}",
|
|
171
|
-
content_type: 'teams_channel_thread'
|
|
171
|
+
content_type: 'teams_channel_thread',
|
|
172
|
+
access_scope: 'private'
|
|
172
173
|
)
|
|
173
174
|
results[:chunks] += 1
|
|
174
175
|
rescue StandardError => e
|
|
@@ -116,7 +116,8 @@ module Legion
|
|
|
116
116
|
tags: ['teams', 'chat', 'messages', topic],
|
|
117
117
|
source_file: "teams://chats/#{chat_id}/messages",
|
|
118
118
|
heading: "Chat: #{topic}",
|
|
119
|
-
content_type: 'teams_chat_thread'
|
|
119
|
+
content_type: 'teams_chat_thread',
|
|
120
|
+
access_scope: 'private'
|
|
120
121
|
)
|
|
121
122
|
results[:chunks] += 1
|
|
122
123
|
log.info("Chat#ingest_messages stored #{lines.length} lines for chat_id=#{chat_id}")
|
|
@@ -134,7 +134,8 @@ module Legion
|
|
|
134
134
|
tags: ['meeting', 'transcript', subject],
|
|
135
135
|
source_file: "teams://meetings/#{meeting_id}/transcripts/#{transcript_id}",
|
|
136
136
|
heading: "Transcript: #{subject}",
|
|
137
|
-
content_type: 'meeting_transcript'
|
|
137
|
+
content_type: 'meeting_transcript',
|
|
138
|
+
access_scope: 'private'
|
|
138
139
|
)
|
|
139
140
|
results[:chunks] += 1
|
|
140
141
|
end
|
|
@@ -174,7 +175,8 @@ module Legion
|
|
|
174
175
|
tags: ['meeting', 'ai-insight', 'action-item', subject],
|
|
175
176
|
source_file: "teams://meetings/#{meeting_id}/insights/#{insight_id}",
|
|
176
177
|
heading: "AI Insight: #{subject}",
|
|
177
|
-
content_type: 'meeting_insight'
|
|
178
|
+
content_type: 'meeting_insight',
|
|
179
|
+
access_scope: 'private'
|
|
178
180
|
)
|
|
179
181
|
results[:chunks] += 1
|
|
180
182
|
end
|
|
@@ -327,6 +327,7 @@ module Legion
|
|
|
327
327
|
source_agent: 'teams-api-ingest',
|
|
328
328
|
source_provider: 'microsoft',
|
|
329
329
|
source_channel: 'teams_graph_api',
|
|
330
|
+
access_scope: 'private',
|
|
330
331
|
context: { person: person_name, message_count: texts.length }
|
|
331
332
|
)
|
|
332
333
|
ingested += 1 if result[:success]
|
|
@@ -356,6 +357,7 @@ module Legion
|
|
|
356
357
|
source_agent: 'teams-entity-extractor',
|
|
357
358
|
source_provider: 'microsoft',
|
|
358
359
|
source_channel: 'teams_graph_api',
|
|
360
|
+
access_scope: 'private',
|
|
359
361
|
context: { entity_name: entity[:name], entity_type: entity[:type],
|
|
360
362
|
confidence: entity[:confidence], extracted_from: person_name }
|
|
361
363
|
)
|
|
@@ -23,6 +23,7 @@ module Legion
|
|
|
23
23
|
trigger_words: %w[chats conversations]
|
|
24
24
|
|
|
25
25
|
def list_chats(user_id: 'me', top: 50, **)
|
|
26
|
+
log.debug "list_chats(user_id: #{user_id}, top: #{top})"
|
|
26
27
|
params = { '$top' => top }
|
|
27
28
|
response = graph_connection(**).get("#{user_path(user_id)}/chats", params)
|
|
28
29
|
{ result: response.body }
|
|
@@ -40,6 +41,7 @@ module Legion
|
|
|
40
41
|
trigger_words: %w[chat details]
|
|
41
42
|
|
|
42
43
|
def get_chat(chat_id:, **)
|
|
44
|
+
log.debug("get_chat(chat_id: #{chat_id}, **)")
|
|
43
45
|
response = graph_connection(**).get("chats/#{chat_id}")
|
|
44
46
|
{ result: response.body }
|
|
45
47
|
end
|
|
@@ -74,6 +76,7 @@ module Legion
|
|
|
74
76
|
trigger_words: %w[members participants]
|
|
75
77
|
|
|
76
78
|
def list_chat_members(chat_id:, **)
|
|
79
|
+
log.debug "list_chat_members(chat_id: #{chat_id})"
|
|
77
80
|
response = graph_connection(**).get("chats/#{chat_id}/members")
|
|
78
81
|
{ result: response.body }
|
|
79
82
|
end
|
|
@@ -7,6 +7,7 @@ module Legion
|
|
|
7
7
|
module MicrosoftTeams
|
|
8
8
|
module Runners
|
|
9
9
|
module Files
|
|
10
|
+
extend Legion::Extensions::Definitions
|
|
10
11
|
include Legion::Extensions::MicrosoftTeams::Helpers::Client
|
|
11
12
|
|
|
12
13
|
def self.trigger_words
|
|
@@ -22,6 +23,7 @@ module Legion
|
|
|
22
23
|
trigger_words: %w[files drive onedrive]
|
|
23
24
|
|
|
24
25
|
def list_drive_items(user_id: 'me', **)
|
|
26
|
+
log.debug "list_drive_items(user_id: #{user_id})"
|
|
25
27
|
response = graph_connection(**).get("#{user_path(user_id)}/drive/root/children")
|
|
26
28
|
{ result: response.body }
|
|
27
29
|
end
|
|
@@ -36,6 +38,7 @@ module Legion
|
|
|
36
38
|
trigger_words: %w[file item]
|
|
37
39
|
|
|
38
40
|
def get_drive_item(item_id:, user_id: 'me', **)
|
|
41
|
+
log.debug "get_drive_item(item_id: #{item_id}), user_id: #{user_id}"
|
|
39
42
|
response = graph_connection(**).get("#{user_path(user_id)}/drive/items/#{item_id}")
|
|
40
43
|
{ result: response.body }
|
|
41
44
|
end
|
|
@@ -50,6 +53,7 @@ module Legion
|
|
|
50
53
|
trigger_words: %w[download content read]
|
|
51
54
|
|
|
52
55
|
def get_drive_item_content(item_id:, user_id: 'me', **)
|
|
56
|
+
log.debug "get_drive_item_content(item_id: #{item_id}, user_id: #{user_id})"
|
|
53
57
|
response = graph_connection(**).get("#{user_path(user_id)}/drive/items/#{item_id}/content")
|
|
54
58
|
{ result: response.body }
|
|
55
59
|
end
|
|
@@ -64,6 +68,7 @@ module Legion
|
|
|
64
68
|
trigger_words: %w[sharepoint documents team]
|
|
65
69
|
|
|
66
70
|
def list_team_drive_items(team_id:, **)
|
|
71
|
+
log.debug "list_team_drive_items(team_id: #{team_id})"
|
|
67
72
|
response = graph_connection(**).get("teams/#{team_id}/drive/root/children")
|
|
68
73
|
{ result: response.body }
|
|
69
74
|
end
|
|
@@ -7,6 +7,8 @@ module Legion
|
|
|
7
7
|
module MicrosoftTeams
|
|
8
8
|
module Runners
|
|
9
9
|
module LocalCache
|
|
10
|
+
extend Legion::Extensions::Definitions
|
|
11
|
+
|
|
10
12
|
definition :extract_local_messages, mcp_exposed: false
|
|
11
13
|
definition :local_cache_available?, mcp_exposed: false
|
|
12
14
|
definition :local_cache_stats, mcp_exposed: false
|
|
@@ -26,6 +26,7 @@ module Legion
|
|
|
26
26
|
trigger_words: %w[messages history read]
|
|
27
27
|
|
|
28
28
|
def list_chat_messages(chat_id:, top: 50, **)
|
|
29
|
+
log.debug "list_chat_messages(chat_id: #{chat_id}, top: #{top})"
|
|
29
30
|
params = { '$top' => top }
|
|
30
31
|
response = graph_connection(**).get("chats/#{chat_id}/messages", params)
|
|
31
32
|
{ result: response.body }
|
|
@@ -43,6 +44,7 @@ module Legion
|
|
|
43
44
|
trigger_words: %w[message fetch]
|
|
44
45
|
|
|
45
46
|
def get_chat_message(chat_id:, message_id:, **)
|
|
47
|
+
log.debug "get_chat_message(chat_id: #{chat_id}, message_id: #{message_id})"
|
|
46
48
|
response = graph_connection(**).get("chats/#{chat_id}/messages/#{message_id}")
|
|
47
49
|
{ result: response.body }
|
|
48
50
|
end
|
|
@@ -60,6 +62,7 @@ module Legion
|
|
|
60
62
|
trigger_words: %w[send post write]
|
|
61
63
|
|
|
62
64
|
def send_chat_message(chat_id:, content:, content_type: 'text', attachments: [], **)
|
|
65
|
+
log.debug "send_chat_message(chat_id: #{chat_id}, content: #{content}, content_type: #{content_type})"
|
|
63
66
|
payload = { body: { contentType: content_type, content: content } }
|
|
64
67
|
payload[:attachments] = attachments unless attachments.empty?
|
|
65
68
|
response = graph_connection(**).post("chats/#{chat_id}/messages", payload)
|
|
@@ -79,6 +82,7 @@ module Legion
|
|
|
79
82
|
trigger_words: %w[reply respond]
|
|
80
83
|
|
|
81
84
|
def reply_to_chat_message(chat_id:, message_id:, content:, content_type: 'text', **)
|
|
85
|
+
log.debug "reply_to_chat_message(chat_id: #{chat_id}, message_id: #{message_id}, content: #{content}, content_type: #{content_type})"
|
|
82
86
|
payload = { body: { contentType: content_type, content: content } }
|
|
83
87
|
response = graph_connection(**).post("chats/#{chat_id}/messages/#{message_id}/replies", payload)
|
|
84
88
|
{ result: response.body }
|
|
@@ -96,6 +100,7 @@ module Legion
|
|
|
96
100
|
trigger_words: %w[replies thread]
|
|
97
101
|
|
|
98
102
|
def list_message_replies(chat_id:, message_id:, top: 50, **)
|
|
103
|
+
log.debug "list_message_replies(chat_id: #{chat_id}, message_id: #{message_id}, top: #{top})"
|
|
99
104
|
params = { '$top' => top }
|
|
100
105
|
response = graph_connection(**).get("chats/#{chat_id}/messages/#{message_id}/replies", params)
|
|
101
106
|
{ result: response.body }
|
|
@@ -241,7 +241,13 @@ module Legion
|
|
|
241
241
|
|
|
242
242
|
if defined?(Legion::Extensions::Transformer::Client)
|
|
243
243
|
client = Legion::Extensions::Transformer::Client.new
|
|
244
|
-
result = client.transform(
|
|
244
|
+
result = client.transform(
|
|
245
|
+
payload: text,
|
|
246
|
+
transformation: definition[:prompt],
|
|
247
|
+
schema: definition[:schema],
|
|
248
|
+
engine_options: definition[:engine_options] || {},
|
|
249
|
+
name: definition[:name]
|
|
250
|
+
)
|
|
245
251
|
result[:result] || result[:error] ? nil : result
|
|
246
252
|
elsif defined?(Legion::LLM)
|
|
247
253
|
llm_ask(message: "#{definition[:prompt]}\n\nConversation with #{peer_name}:\n#{text}")
|