lex-microsoft_teams 0.6.46 → 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/activities.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/ai_insights.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/api_ingest.rb +3 -0
- data/lib/legion/extensions/microsoft_teams/runners/app_installations.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/auth.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/cache_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/channels.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/chats.rb +4 -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/loop.rb +1 -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 +6 -0
- data/lib/legion/extensions/microsoft_teams/runners/ownership.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/people.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/presence.rb +1 -0
- data/lib/legion/extensions/microsoft_teams/runners/profile_ingest.rb +8 -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
|
|
@@ -11,6 +11,7 @@ module Legion
|
|
|
11
11
|
module MicrosoftTeams
|
|
12
12
|
module Runners
|
|
13
13
|
module ApiIngest
|
|
14
|
+
extend Legion::Extensions::Definitions
|
|
14
15
|
include Helpers::Client
|
|
15
16
|
include Helpers::PermissionGuard
|
|
16
17
|
include Helpers::HighWaterMark
|
|
@@ -326,6 +327,7 @@ module Legion
|
|
|
326
327
|
source_agent: 'teams-api-ingest',
|
|
327
328
|
source_provider: 'microsoft',
|
|
328
329
|
source_channel: 'teams_graph_api',
|
|
330
|
+
access_scope: 'private',
|
|
329
331
|
context: { person: person_name, message_count: texts.length }
|
|
330
332
|
)
|
|
331
333
|
ingested += 1 if result[:success]
|
|
@@ -355,6 +357,7 @@ module Legion
|
|
|
355
357
|
source_agent: 'teams-entity-extractor',
|
|
356
358
|
source_provider: 'microsoft',
|
|
357
359
|
source_channel: 'teams_graph_api',
|
|
360
|
+
access_scope: 'private',
|
|
358
361
|
context: { entity_name: entity[:name], entity_type: entity[:type],
|
|
359
362
|
confidence: entity[:confidence], extracted_from: person_name }
|
|
360
363
|
)
|
|
@@ -7,6 +7,7 @@ module Legion
|
|
|
7
7
|
module MicrosoftTeams
|
|
8
8
|
module Runners
|
|
9
9
|
module Chats
|
|
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[chats conversations]
|
|
23
24
|
|
|
24
25
|
def list_chats(user_id: 'me', top: 50, **)
|
|
26
|
+
log.debug "list_chats(user_id: #{user_id}, top: #{top})"
|
|
25
27
|
params = { '$top' => top }
|
|
26
28
|
response = graph_connection(**).get("#{user_path(user_id)}/chats", params)
|
|
27
29
|
{ result: response.body }
|
|
@@ -39,6 +41,7 @@ module Legion
|
|
|
39
41
|
trigger_words: %w[chat details]
|
|
40
42
|
|
|
41
43
|
def get_chat(chat_id:, **)
|
|
44
|
+
log.debug("get_chat(chat_id: #{chat_id}, **)")
|
|
42
45
|
response = graph_connection(**).get("chats/#{chat_id}")
|
|
43
46
|
{ result: response.body }
|
|
44
47
|
end
|
|
@@ -73,6 +76,7 @@ module Legion
|
|
|
73
76
|
trigger_words: %w[members participants]
|
|
74
77
|
|
|
75
78
|
def list_chat_members(chat_id:, **)
|
|
79
|
+
log.debug "list_chat_members(chat_id: #{chat_id})"
|
|
76
80
|
response = graph_connection(**).get("chats/#{chat_id}/members")
|
|
77
81
|
{ result: response.body }
|
|
78
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
|
|
@@ -7,6 +7,7 @@ module Legion
|
|
|
7
7
|
module MicrosoftTeams
|
|
8
8
|
module Runners
|
|
9
9
|
module Messages
|
|
10
|
+
extend Legion::Extensions::Definitions
|
|
10
11
|
include Legion::Extensions::MicrosoftTeams::Helpers::Client
|
|
11
12
|
|
|
12
13
|
def self.trigger_words
|
|
@@ -25,6 +26,7 @@ module Legion
|
|
|
25
26
|
trigger_words: %w[messages history read]
|
|
26
27
|
|
|
27
28
|
def list_chat_messages(chat_id:, top: 50, **)
|
|
29
|
+
log.debug "list_chat_messages(chat_id: #{chat_id}, top: #{top})"
|
|
28
30
|
params = { '$top' => top }
|
|
29
31
|
response = graph_connection(**).get("chats/#{chat_id}/messages", params)
|
|
30
32
|
{ result: response.body }
|
|
@@ -42,6 +44,7 @@ module Legion
|
|
|
42
44
|
trigger_words: %w[message fetch]
|
|
43
45
|
|
|
44
46
|
def get_chat_message(chat_id:, message_id:, **)
|
|
47
|
+
log.debug "get_chat_message(chat_id: #{chat_id}, message_id: #{message_id})"
|
|
45
48
|
response = graph_connection(**).get("chats/#{chat_id}/messages/#{message_id}")
|
|
46
49
|
{ result: response.body }
|
|
47
50
|
end
|
|
@@ -59,6 +62,7 @@ module Legion
|
|
|
59
62
|
trigger_words: %w[send post write]
|
|
60
63
|
|
|
61
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})"
|
|
62
66
|
payload = { body: { contentType: content_type, content: content } }
|
|
63
67
|
payload[:attachments] = attachments unless attachments.empty?
|
|
64
68
|
response = graph_connection(**).post("chats/#{chat_id}/messages", payload)
|
|
@@ -78,6 +82,7 @@ module Legion
|
|
|
78
82
|
trigger_words: %w[reply respond]
|
|
79
83
|
|
|
80
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})"
|
|
81
86
|
payload = { body: { contentType: content_type, content: content } }
|
|
82
87
|
response = graph_connection(**).post("chats/#{chat_id}/messages/#{message_id}/replies", payload)
|
|
83
88
|
{ result: response.body }
|
|
@@ -95,6 +100,7 @@ module Legion
|
|
|
95
100
|
trigger_words: %w[replies thread]
|
|
96
101
|
|
|
97
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})"
|
|
98
104
|
params = { '$top' => top }
|
|
99
105
|
response = graph_connection(**).get("chats/#{chat_id}/messages/#{message_id}/replies", params)
|
|
100
106
|
{ result: response.body }
|
|
@@ -11,6 +11,7 @@ module Legion
|
|
|
11
11
|
module MicrosoftTeams
|
|
12
12
|
module Runners
|
|
13
13
|
module ProfileIngest
|
|
14
|
+
extend Legion::Extensions::Definitions
|
|
14
15
|
include Helpers::Client
|
|
15
16
|
include Helpers::PermissionGuard
|
|
16
17
|
include Helpers::HighWaterMark
|
|
@@ -240,7 +241,13 @@ module Legion
|
|
|
240
241
|
|
|
241
242
|
if defined?(Legion::Extensions::Transformer::Client)
|
|
242
243
|
client = Legion::Extensions::Transformer::Client.new
|
|
243
|
-
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
|
+
)
|
|
244
251
|
result[:result] || result[:error] ? nil : result
|
|
245
252
|
elsif defined?(Legion::LLM)
|
|
246
253
|
llm_ask(message: "#{definition[:prompt]}\n\nConversation with #{peer_name}:\n#{text}")
|