跳到主要內容

Teams 會議流水線

通過 Hermes CLI 操作 Teams 會議摘要流水線——摘要會議、檢查流水線狀態、重放作業、管理 Microsoft Graph 訂閱。

技能元數據

來源捆綁(默認安裝)
路徑skills/productivity/teams-meeting-pipeline
版本1.1.0
作者Hermes Agent + Teknium
許可證MIT
標籤Teams, Microsoft Graph, Meetings, Productivity, Operations

參考:完整 SKILL.md

信息

以下是 Hermes 在觸發此技能時加載的完整技能定義。這是技能激活時代理看到的指令。

Teams 會議流水線

當用戶詢問有關 Microsoft Teams 會議摘要、轉錄稿、錄音、行動項、Graph 訂閱或有關 Teams 會議流水線的任何操作性問題時,使用此技能。適用於任何語言——下面的觸發器僅為示例,並非詳盡列表。

所有面向操作員的功能都是通過終端工具運行的 hermes teams-pipeline 子命令。此流水線沒有新的模型工具——CLI 是其操作界面。

何時使用此技能

用戶要求:

  • 摘要 Teams 會議 / 提取行動項 / 拉取會議筆記
  • 檢查流水線狀態、檢查存儲的會議作業或查看最近的會議
  • 重放/重新運行失敗或需要新鮮摘要的存儲作業
  • 在更改環境變量或配置後驗證 Microsoft Graph 設置
  • 排查“未收到會議摘要”或“沒有新會議被攝入”的問題
  • 管理 Graph webhook 訂閱(創建、續訂、刪除、檢查)
  • 設置自動訂閱續訂(見下方的陷阱)

多語言觸發器示例(非詳盡):

  • 英語:"summarize the Teams meeting", "pipeline status", "replay job X"
  • 土耳其語:"Teams meeting özetle", "action item çıkar", "toplantı notu", "pipeline durumu", "replay job"

先決條件

在使用流水線之前,請驗證 ~/.hermes/.env 中是否設置了以下變量:

MSGRAPH_TENANT_ID=...
MSGRAPH_CLIENT_ID=...
MSGRAPH_CLIENT_SECRET=...

如果缺少任何變量,請引導用戶前往 /docs/guides/microsoft-graph-app-registration 處的 Azure 應用註冊指南——他們需要具有管理員同意的 Graph 應用程序權限的 Azure AD 應用註冊,流水線才能正常工作。

命令參考

狀態和檢查(從此開始)

hermes teams-pipeline validate              # config snapshot — run first after any change
hermes teams-pipeline token-health # Graph token status
hermes teams-pipeline token-health --force-refresh # force a fresh token acquisition
hermes teams-pipeline list # recent meeting jobs
hermes teams-pipeline list --status failed # only failed jobs
hermes teams-pipeline show <job-id> # full detail of one job
hermes teams-pipeline subscriptions # current Graph webhook subscriptions

重新運行 / 調試

hermes teams-pipeline run <job-id>          # replay a stored job (re-summarize, re-deliver)
hermes teams-pipeline fetch --meeting-id <id> # dry-run: resolve meeting + transcript without persisting
hermes teams-pipeline fetch --join-web-url "<url>" # dry-run by join URL

訂閱管理

hermes teams-pipeline subscribe \
--resource communications/onlineMeetings/getAllTranscripts \
--notification-url https://<your-public-host>/msgraph/webhook \
--client-state "$MSGRAPH_WEBHOOK_CLIENT_STATE"

hermes teams-pipeline renew-subscription <sub-id> --expiration <iso-8601>
hermes teams-pipeline delete-subscription <sub-id>
hermes teams-pipeline maintain-subscriptions # renew near-expiry ones
hermes teams-pipeline maintain-subscriptions --dry-run # show what would be renewed

常見請求的決策樹

  • 用戶詢問“為什麼我沒有收到今天會議的摘要?” → 從 list --status failed 開始,然後在相關行上執行 show <job-id>。如果作業根本不存在,請檢查 subscriptions —— webhook 可能已過期(見下方的陷阱)。
  • 用戶詢問“設置是否正常工作?” → 執行 validate,然後執行 token-health,再執行 subscriptions。如果這三項都通過,請求進行一次測試會議,並檢查 list 以查看是否有新行。
  • 用戶詢問“重新運行會議 X 的摘要” → 執行 list 以查找作業 ID,執行 run <job-id> 以重放。如果再次失敗,執行 show <job-id> 以檢查錯誤,並執行 fetch --meeting-id 以幹跑工件解析。
  • 用戶詢問“將會議 X 添加到流水線” → 通常不需要這樣做——流水線是由訂閱驅動的,而不是針對每個會議。如果他們希望摘要特定的過去會議,請使用 fetch 拉取轉錄稿,並在創建作業後使用 run

關鍵陷阱:Graph 訂閱在 72 小時後過期

Microsoft Graph 將 webhook 訂閱限制為 72 小時,並且不會自動續訂。如果未調度 maintain-subscriptions,則在手動創建訂閱 3 天后,會議通知將靜默停止到達。

當用戶報告“流水線昨天還正常工作,但今天沒有收到任何內容”時:

  1. 運行 hermes teams-pipeline subscriptions —— 如果為空或所有條目顯示的 expirationDateTime 已過去,這就是原因。
  2. 如上所示使用 subscribe 重新創建。
  3. 立即通過 hermes cron add、systemd timer 或普通 crontab 設置自動續訂。位於 /docs/guides/operate-teams-meeting-pipeline#automating-subscription-renewal-required-for-production 的操作員運行手冊提供了這三種選項。12 小時間隔是安全的(相對於 72 小時限制有 6 倍的餘量)。

其他陷阱

  • 轉錄稿尚不可用。 Teams 在會議結束後需要一些時間來生成轉錄稿文件。對剛剛結束的會議執行 fetch --meeting-id 可能會返回空結果。請等待 2-5 分鐘後重試,或讓 Graph webhook 自然驅動數據攝入。
  • 交付模式不匹配。 如果已生成摘要(list 顯示成功),但沒有任何內容送達 Teams,請檢查 platforms.teams.extra.delivery_mode 以及匹配的目標配置(incoming_webhook_urlchat_idteam_id+channel_id)。寫入器會從 config.yaml 或 TEAMS_* 環境變量中讀取這些配置。
  • Graph 應用權限。 令牌獲取正常(token-health 通過),但當權限已添加而未重新授予管理員同意時,Graph API 調用會返回 401/403。請讓用戶在 Azure 門戶中重新訪問應用註冊,並再次點擊“授予管理員同意”。

當用戶需要比本技能涵蓋更深入的內容時,請引導他們參考以下文檔:

  • Azure 應用註冊演練:/docs/guides/microsoft-graph-app-registration
  • 完整流水線設置:/docs/user-guide/messaging/teams-meetings
  • 操作員運行手冊(續訂自動化、故障排除、上線檢查清單):/docs/guides/operate-teams-meeting-pipeline
  • Webhook 監聽器設置:/docs/user-guide/messaging/msgraph-webhook