Skip to content

Commit 729a659

Browse files
dlkakbsteknium1
authored andcommitted
fix(teams-pipeline): add skill asset and fix async test env
1 parent b79ef88 commit 729a659

2 files changed

Lines changed: 64 additions & 14 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: teams-meeting-pipeline
3+
description: "Operate the Teams meeting summary pipeline via Hermes CLI."
4+
version: 1.0.0
5+
author: Hermes Agent
6+
license: MIT
7+
prerequisites:
8+
env_vars: [MSGRAPH_TENANT_ID, MSGRAPH_CLIENT_ID, MSGRAPH_CLIENT_SECRET]
9+
commands: [hermes]
10+
metadata:
11+
hermes:
12+
tags: [Teams, Microsoft Graph, Meetings, Productivity, Operations]
13+
---
14+
15+
# Teams Meeting Pipeline
16+
17+
Use this skill when the user asks to summarize a Teams meeting, extract action items, inspect pipeline status, replay a stored job, or validate Microsoft Graph meeting-ingest setup.
18+
19+
Prefer the Hermes CLI over ad hoc scripts. Route operator actions through the terminal tool with `hermes teams-pipeline ...`.
20+
21+
## When to use
22+
23+
- "Teams meeting ozetle"
24+
- "action item cikar"
25+
- "toplanti notu"
26+
- "pipeline durumu"
27+
- "replay job"
28+
29+
## Required environment
30+
31+
Set these in `~/.hermes/.env` before using the pipeline:
32+
33+
```bash
34+
MSGRAPH_TENANT_ID=...
35+
MSGRAPH_CLIENT_ID=...
36+
MSGRAPH_CLIENT_SECRET=...
37+
```
38+
39+
## Common commands
40+
41+
```bash
42+
hermes teams-pipeline list
43+
hermes teams-pipeline show <job-id>
44+
hermes teams-pipeline replay <job-id>
45+
hermes teams-pipeline fetch --meeting-id <meeting-id>
46+
hermes teams-pipeline token-health
47+
hermes teams-pipeline maintain-subscriptions
48+
```
49+
50+
Start with `validate`, `list`, or `show` when the user asks for status. Use `replay` only when they explicitly want to rerun a stored job. Use `fetch` for dry-run artifact checks before changing pipeline config.

tests/gateway/test_teams.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def test_interactive_setup_persists_credentials(self, tmp_path, monkeypatch):
360360
assert "TEAMS_TENANT_ID=tenant-id" in env_text
361361

362362
class TestTeamsConnect:
363-
@pytest.mark.asyncio
363+
@pytest.mark.anyio
364364
async def test_connect_fails_without_sdk(self, monkeypatch):
365365
monkeypatch.setattr(_teams_mod, "TEAMS_SDK_AVAILABLE", False)
366366
adapter = TeamsAdapter(_make_config(
@@ -369,7 +369,7 @@ async def test_connect_fails_without_sdk(self, monkeypatch):
369369
result = await adapter.connect()
370370
assert result is False
371371

372-
@pytest.mark.asyncio
372+
@pytest.mark.anyio
373373
async def test_connect_fails_without_credentials(self):
374374
adapter = TeamsAdapter(_make_config())
375375
adapter._client_id = ""
@@ -378,7 +378,7 @@ async def test_connect_fails_without_credentials(self):
378378
result = await adapter.connect()
379379
assert result is False
380380

381-
@pytest.mark.asyncio
381+
@pytest.mark.anyio
382382
async def test_disconnect_cleans_up(self):
383383
adapter = TeamsAdapter(_make_config(
384384
client_id="id", client_secret="secret", tenant_id="tenant",
@@ -400,7 +400,7 @@ async def test_disconnect_cleans_up(self):
400400
# ---------------------------------------------------------------------------
401401

402402
class TestTeamsSend:
403-
@pytest.mark.asyncio
403+
@pytest.mark.anyio
404404
async def test_send_returns_error_without_app(self):
405405
adapter = TeamsAdapter(_make_config(
406406
client_id="id", client_secret="secret", tenant_id="tenant",
@@ -410,7 +410,7 @@ async def test_send_returns_error_without_app(self):
410410
assert result.success is False
411411
assert "not initialized" in result.error
412412

413-
@pytest.mark.asyncio
413+
@pytest.mark.anyio
414414
async def test_send_calls_app_send(self):
415415
adapter = TeamsAdapter(_make_config(
416416
client_id="id", client_secret="secret", tenant_id="tenant",
@@ -426,7 +426,7 @@ async def test_send_calls_app_send(self):
426426
assert result.message_id == "msg-123"
427427
mock_app.send.assert_awaited_once_with("conv-id", "Hello")
428428

429-
@pytest.mark.asyncio
429+
@pytest.mark.anyio
430430
async def test_send_handles_error(self):
431431
adapter = TeamsAdapter(_make_config(
432432
client_id="id", client_secret="secret", tenant_id="tenant",
@@ -439,7 +439,7 @@ async def test_send_handles_error(self):
439439
assert result.success is False
440440
assert "Network error" in result.error
441441

442-
@pytest.mark.asyncio
442+
@pytest.mark.anyio
443443
async def test_send_typing(self):
444444
adapter = TeamsAdapter(_make_config(
445445
client_id="id", client_secret="secret", tenant_id="tenant",
@@ -594,7 +594,7 @@ def _make_ctx(self, activity):
594594
ctx.activity = activity
595595
return ctx
596596

597-
@pytest.mark.asyncio
597+
@pytest.mark.anyio
598598
async def test_personal_message_creates_dm_event(self):
599599
adapter = TeamsAdapter(_make_config(
600600
client_id="bot-id", client_secret="secret", tenant_id="tenant",
@@ -610,7 +610,7 @@ async def test_personal_message_creates_dm_event(self):
610610
event = adapter.handle_message.call_args[0][0]
611611
assert event.source.chat_type == "dm"
612612

613-
@pytest.mark.asyncio
613+
@pytest.mark.anyio
614614
async def test_group_message_creates_group_event(self):
615615
adapter = TeamsAdapter(_make_config(
616616
client_id="bot-id", client_secret="secret", tenant_id="tenant",
@@ -625,7 +625,7 @@ async def test_group_message_creates_group_event(self):
625625
event = adapter.handle_message.call_args[0][0]
626626
assert event.source.chat_type == "group"
627627

628-
@pytest.mark.asyncio
628+
@pytest.mark.anyio
629629
async def test_channel_message_creates_channel_event(self):
630630
adapter = TeamsAdapter(_make_config(
631631
client_id="bot-id", client_secret="secret", tenant_id="tenant",
@@ -640,7 +640,7 @@ async def test_channel_message_creates_channel_event(self):
640640
event = adapter.handle_message.call_args[0][0]
641641
assert event.source.chat_type == "channel"
642642

643-
@pytest.mark.asyncio
643+
@pytest.mark.anyio
644644
async def test_user_id_uses_aad_object_id(self):
645645
adapter = TeamsAdapter(_make_config(
646646
client_id="bot-id", client_secret="secret", tenant_id="tenant",
@@ -655,7 +655,7 @@ async def test_user_id_uses_aad_object_id(self):
655655
event = adapter.handle_message.call_args[0][0]
656656
assert event.source.user_id == "aad-stable-id"
657657

658-
@pytest.mark.asyncio
658+
@pytest.mark.anyio
659659
async def test_self_message_filtered(self):
660660
adapter = TeamsAdapter(_make_config(
661661
client_id="bot-id", client_secret="secret", tenant_id="tenant",
@@ -669,7 +669,7 @@ async def test_self_message_filtered(self):
669669

670670
adapter.handle_message.assert_not_awaited()
671671

672-
@pytest.mark.asyncio
672+
@pytest.mark.anyio
673673
async def test_bot_mention_stripped_from_text(self):
674674
adapter = TeamsAdapter(_make_config(
675675
client_id="bot-id", client_secret="secret", tenant_id="tenant",
@@ -687,7 +687,7 @@ async def test_bot_mention_stripped_from_text(self):
687687
event = adapter.handle_message.call_args[0][0]
688688
assert event.text == "what is the weather?"
689689

690-
@pytest.mark.asyncio
690+
@pytest.mark.anyio
691691
async def test_deduplication(self):
692692
adapter = TeamsAdapter(_make_config(
693693
client_id="bot-id", client_secret="secret", tenant_id="tenant",

0 commit comments

Comments
 (0)